@eslint-sukka/eslint-plugin-stylistic 8.0.3 → 8.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.cjs +14 -13
  2. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -1,23 +1,24 @@
1
- "use strict";let e,t,n;require("node:module");var r,i,s,a,o,l,p,c,u,f,d,m,h,g,y,x,T,S,b,E,k,v,w,A=require("node:process"),C=Object.create,_=Object.defineProperty,O=Object.getOwnPropertyDescriptor,P=Object.getOwnPropertyNames,I=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty,L=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),D=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,s=P(t),a=0,o=s.length;a<o;a++)i=s[a],N.call(e,i)||i===n||_(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=O(t,i))||r.enumerable});return e},B=(e,t,n)=>D(_(null!=e?C(I(e)):{},"default",{value:e,enumerable:!0}),e);function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function R(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}let F={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"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],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"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],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(let e of Object.keys(F))Object.freeze(F[e]);Object.freeze(F);let M=new Set(["parent","leadingComments","trailingComments"]);function $(e){return!M.has(e)&&"_"!==e[0]}function V(e,t){let n=t.range[0],r=e,i=!1;do for(let e of(i=!1,r.childScopes)){let t=e.block.range;if(t[0]<=n&&n<t[1]){r=e,i=!0;break}}while(i);return r}function q(e,t){let n="",r=e;for("string"==typeof t?n=t:(n=t.name,r=V(r,t));null!=r;){let e=r.set.get(n);if(null!=e)return e;r=r.upper}return null}function Y(e){return t=>!e(t)}function X(e,t){return"Punctuator"===e.type&&e.value===t}function J(e){return X(e,"=>")}function U(e){return X(e,",")}function W(e){return X(e,";")}function K(e){return X(e,":")}function H(e){return X(e,"(")}function z(e){return X(e,")")}function G(e){return X(e,"[")}function Q(e){return X(e,"]")}function Z(e){return X(e,"{")}function ee(e){return X(e,"}")}function et(e){return["Block","Line","Shebang"].includes(e.type)}let en=Y(J),er=Y(U),ei=Y(W),es=Y(K),ea=Y(H),eo=Y(z),el=Y(G),ep=Y(Q),ec=Y(Z),eu=Y(ee),ef=Y(et);function ed(e,t){let n=e.parent,r=null,i=null;if("ArrowFunctionExpression"===e.type){let n=t.getTokenBefore(e.body,J);r=n.loc.start,i=n.loc.end}else{var s,a;r="Property"===n.type||"MethodDefinition"===n.type||"PropertyDefinition"===n.type?n.loc.start:e.loc.start,i=(s=e,a=t,s.id?a.getTokenAfter(s.id,H):a.getFirstToken(s,H)).loc.start}return{start:{...r},end:{...i}}}let em="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},eh=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),eg=new Set([Array.isArray,Array.of,Array.prototype.at,Array.prototype.concat,Array.prototype.entries,Array.prototype.every,Array.prototype.filter,Array.prototype.find,Array.prototype.findIndex,Array.prototype.flat,Array.prototype.includes,Array.prototype.indexOf,Array.prototype.join,Array.prototype.keys,Array.prototype.lastIndexOf,Array.prototype.slice,Array.prototype.some,Array.prototype.toString,Array.prototype.values,"function"==typeof BigInt?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,Map,Map.prototype.entries,Map.prototype.get,Map.prototype.has,Map.prototype.keys,Map.prototype.values,...Object.getOwnPropertyNames(Math).filter(e=>"random"!==e).map(e=>Math[e]).filter(e=>"function"==typeof e),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Number.prototype.toExponential,Number.prototype.toFixed,Number.prototype.toPrecision,Number.prototype.toString,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,Set,Set.prototype.entries,Set.prototype.has,Set.prototype.keys,Set.prototype.values,String,String.fromCharCode,String.fromCodePoint,String.raw,String.prototype.at,String.prototype.charAt,String.prototype.charCodeAt,String.prototype.codePointAt,String.prototype.concat,String.prototype.endsWith,String.prototype.includes,String.prototype.indexOf,String.prototype.lastIndexOf,String.prototype.normalize,String.prototype.padEnd,String.prototype.padStart,String.prototype.slice,String.prototype.startsWith,String.prototype.substr,String.prototype.substring,String.prototype.toLowerCase,String.prototype.toString,String.prototype.toUpperCase,String.prototype.trim,String.prototype.trimEnd,String.prototype.trimLeft,String.prototype.trimRight,String.prototype.trimStart,Symbol.for,Symbol.keyFor,unescape].filter(e=>"function"==typeof e)),ey=new Set([Object.freeze,Object.preventExtensions,Object.seal]),ex=[[Map,new Set(["size"])],[RegExp,new Set(["dotAll","flags","global","hasIndices","ignoreCase","multiline","source","sticky","unicode"])],[Set,new Set(["size"])]];function eT(e,t){let n=[];for(let r=0;r<e.length;++r){let i=e[r];if(null==i)n.length=r+1;else if("SpreadElement"===i.type){let e=eb(i.argument,t);if(null==e)return null;n.push(...e.value)}else{let e=eb(i,t);if(null==e)return null;n.push(e.value)}}return n}let eS=Object.freeze({ArrayExpression(e,t){let n=eT(e.elements,t);return null!=n?{value:n}:null},AssignmentExpression:(e,t)=>"="===e.operator?eb(e.right,t):null,BinaryExpression(e,t){if("in"===e.operator||"instanceof"===e.operator)return null;let n=eb(e.left,t),r=eb(e.right,t);if(null!=n&&null!=r)switch(e.operator){case"==":return{value:n.value==r.value};case"!=":return{value:n.value!=r.value};case"===":return{value:n.value===r.value};case"!==":return{value:n.value!==r.value};case"<":return{value:n.value<r.value};case"<=":return{value:n.value<=r.value};case">":return{value:n.value>r.value};case">=":return{value:n.value>=r.value};case"<<":return{value:n.value<<r.value};case">>":return{value:n.value>>r.value};case">>>":return{value:n.value>>>r.value};case"+":return{value:n.value+r.value};case"-":return{value:n.value-r.value};case"*":return{value:n.value*r.value};case"/":return{value:n.value/r.value};case"%":return{value:n.value%r.value};case"**":return{value:n.value**r.value};case"|":return{value:n.value|r.value};case"^":return{value:n.value^r.value};case"&":return{value:n.value&r.value}}return null},CallExpression(e,t){let n=e.callee,r=eT(e.arguments,t);if(null!=r)if("MemberExpression"===n.type){if("PrivateIdentifier"===n.property.type)return null;let i=eb(n.object,t);if(null!=i){if(null==i.value&&(i.optional||e.optional))return{value:void 0,optional:!0};let s=eE(n,t);if(null!=s){let e=i.value,t=s.value;if(eg.has(e[t]))return{value:e[t](...r)};if(ey.has(e[t]))return{value:r[0]}}}}else{let i=eb(n,t);if(null!=i){if(null==i.value&&e.optional)return{value:void 0,optional:!0};let t=i.value;if(eg.has(t))return{value:t(...r)};if(ey.has(t))return{value:r[0]}}}return null},ConditionalExpression(e,t){let n=eb(e.test,t);return null!=n?n.value?eb(e.consequent,t):eb(e.alternate,t):null},ExpressionStatement:(e,t)=>eb(e.expression,t),Identifier(e,t){if(null!=t){let n=q(t,e);if(null!=n){if(null!=n&&0===n.defs.length&&eh.has(n.name)&&n.name in em)return{value:em[n.name]};if(function(e){let t,n,r;if(1!==e.defs.length)return!1;let i=e.defs[0];return!!(i.parent&&"Variable"===i.type&&("const"===i.parent.kind||(n=(t=e.references).filter(e=>e.init).length,r=t.filter(e=>e.isReadOnly()).length,1===n&&r+n===t.length)))}(n)){let e=n.defs[0];if("Identifier"===e.node.id.type){let r=eb(e.node.init,t);return r&&"object"==typeof r.value&&null!==r.value&&function(e,t){for(let n of e.references){let e=n.identifier;for(;e&&e.parent&&"MemberExpression"===e.parent.type;)e=e.parent;if(e&&e.parent&&("AssignmentExpression"===e.parent.type&&e.parent.left===e||"UpdateExpression"===e.parent.type&&e.parent.argument===e||"CallExpression"===e.parent.type&&e.parent.callee===e&&"MemberExpression"===e.type&&function(e){if(null==e||null==e.value)return!1;let t=e.value;return"copyWithin"===t||"fill"===t||"pop"===t||"push"===t||"reverse"===t||"shift"===t||"sort"===t||"splice"===t||"unshift"===t}(eE(e,t))))return!0}return!1}(n,t)?null:r}}}}return null},Literal:e=>(null!=e.regex||null!=e.bigint)&&null==e.value?null:{value:e.value},LogicalExpression(e,t){let n=eb(e.left,t);if(null!=n){if("||"===e.operator&&!0==!!n.value||"&&"===e.operator&&!1==!!n.value||"??"===e.operator&&null!=n.value)return n;let r=eb(e.right,t);if(null!=r)return r}return null},MemberExpression(e,t){if("PrivateIdentifier"===e.property.type)return null;let n=eb(e.object,t);if(null!=n){if(null==n.value&&(n.optional||e.optional))return{value:void 0,optional:!0};let r=eE(e,t);if(null!=r){let e;if(null==(e=function(e,t){let n=e;for(;("object"==typeof n||"function"==typeof n)&&null!==n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}return null}(n.value,r.value))||null==e.get)return{value:n.value[r.value]};for(let[e,t]of ex)if(n.value instanceof e&&t.has(r.value))return{value:n.value[r.value]}}}return null},ChainExpression(e,t){let n=eb(e.expression,t);return null!=n?{value:n.value}:null},NewExpression(e,t){let n=eb(e.callee,t),r=eT(e.arguments,t);if(null!=n&&null!=r){let e=n.value;if(eg.has(e))return{value:new e(...r)}}return null},ObjectExpression(e,t){let n={};for(let r of e.properties)if("Property"===r.type){if("init"!==r.kind)return null;let e=eE(r,t),i=eb(r.value,t);if(null==e||null==i)return null;n[e.value]=i.value}else{if("SpreadElement"!==r.type&&"ExperimentalSpreadProperty"!==r.type)return null;let e=eb(r.argument,t);if(null==e)return null;Object.assign(n,e.value)}return{value:n}},SequenceExpression:(e,t)=>eb(e.expressions[e.expressions.length-1],t),TaggedTemplateExpression(e,t){let n=eb(e.tag,t),r=eT(e.quasi.expressions,t);if(null!=n&&null!=r){let t=n.value,i=e.quasi.quasis.map(e=>e.value.cooked);if(i.raw=e.quasi.quasis.map(e=>e.value.raw),t===String.raw)return{value:t(i,...r)}}return null},TemplateLiteral(e,t){let n=eT(e.expressions,t);if(null!=n){let t=e.quasis[0].value.cooked;for(let r=0;r<n.length;++r)t+=n[r],t+=e.quasis[r+1].value.cooked;return{value:t}}return null},UnaryExpression(e,t){if("delete"===e.operator)return null;if("void"===e.operator)return{value:void 0};let n=eb(e.argument,t);if(null!=n)switch(e.operator){case"-":return{value:-n.value};case"+":return{value:+n.value};case"!":return{value:!n.value};case"~":return{value:~n.value};case"typeof":return{value:typeof n.value}}return null},TSAsExpression:(e,t)=>eb(e.expression,t),TSSatisfiesExpression:(e,t)=>eb(e.expression,t),TSTypeAssertion:(e,t)=>eb(e.expression,t),TSNonNullExpression:(e,t)=>eb(e.expression,t),TSInstantiationExpression:(e,t)=>eb(e.expression,t)});function eb(e,t){return null!=e&&Object.hasOwnProperty.call(eS,e.type)?eS[e.type](e,t):null}function eE(e,t){let n="Property"===e.type?e.key:e.property;return e.computed?eb(n,t):"Identifier"===n.type?{value:n.name}:"Literal"===n.type?n.bigint?{value:n.bigint}:{value:String(n.value)}:null}function ek(e,t=null){try{return eb(e,t)}catch(e){return null}}function ev(e,t=null){if(e&&"Literal"===e.type&&null===e.value){if(e.regex)return`/${e.regex.pattern}/${e.regex.flags}`;if(e.bigint)return e.bigint}let n=ek(e,t);if(n)try{return String(n.value)}catch{}return null}function ew(e,t){switch(e.type){case"MemberExpression":if(e.computed)return ev(e.property,t);if("PrivateIdentifier"===e.property.type)break;return e.property.name;case"Property":case"MethodDefinition":case"PropertyDefinition":if(e.computed)return ev(e.key,t);if("Literal"===e.key.type)return String(e.key.value);if("PrivateIdentifier"===e.key.type)break;return e.key.name}return null}function eA(e,t){let n=e.parent,r=[],i="Property"===n.type&&n.value===e,s="MethodDefinition"===n.type&&n.value===e,a="PropertyDefinition"===n.type&&n.value===e;if((s||a)&&(n.static&&r.push("static"),"PrivateIdentifier"===n.key.type&&r.push("private")),e.async&&r.push("async"),e.generator&&r.push("generator"),i||s){if("constructor"===n.kind)return"constructor";"get"===n.kind?r.push("getter"):"set"===n.kind?r.push("setter"):r.push("method")}else a?r.push("method"):("ArrowFunctionExpression"===e.type&&r.push("arrow"),r.push("function"));if(i||s||a)if("PrivateIdentifier"===n.key.type)r.push(`#${n.key.name}`);else{let e=ew(n);if(e)r.push(`'${e}'`);else if(t){let e=t.getText(n.key);e.includes("\n")||r.push(`[${e}]`)}}else e.id?r.push(`'${e.id.name}'`):"VariableDeclarator"===n.type&&n.id&&"Identifier"===n.id.type?r.push(`'${n.id.name}'`):("AssignmentExpression"===n.type||"AssignmentPattern"===n.type)&&n.left&&"Identifier"===n.left.type?r.push(`'${n.left.name}'`):"ExportDefaultDeclaration"===n.type&&n.declaration===e&&r.push("'default'");return r.join(" ")}let eC=Object.freeze(new Set(["==","!=","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),e_=Object.freeze(new Set(["-","+","!","~"]));function eO(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}let eP=Object.freeze(Object.assign(Object.create(null),{$visit(e,t,n){let{type:r}=e;return"function"==typeof this[r]?this[r](e,t,n):this.$visitChildren(e,t,n)},$visitChildren(e,t,n){let{type:r}=e;for(let i of n[r]||Object.keys(e).filter($)){let r=e[i];if(Array.isArray(r)){for(let e of r)if(eO(e)&&this.$visit(e,t,n))return!0}else if(eO(r)&&this.$visit(r,t,n))return!0}return!1},ArrowFunctionExpression:()=>!1,AssignmentExpression:()=>!0,AwaitExpression:()=>!0,BinaryExpression(e,t,n){return!!(t.considerImplicitTypeConversion&&eC.has(e.operator))&&("Literal"!==e.left.type||"Literal"!==e.right.type)||this.$visitChildren(e,t,n)},CallExpression:()=>!0,FunctionExpression:()=>!1,ImportExpression:()=>!0,MemberExpression(e,t,n){return!!t.considerGetters||!!t.considerImplicitTypeConversion&&!!e.computed&&"Literal"!==e.property.type||this.$visitChildren(e,t,n)},MethodDefinition(e,t,n){return!!t.considerImplicitTypeConversion&&!!e.computed&&"Literal"!==e.key.type||this.$visitChildren(e,t,n)},NewExpression:()=>!0,Property(e,t,n){return!!t.considerImplicitTypeConversion&&!!e.computed&&"Literal"!==e.key.type||this.$visitChildren(e,t,n)},PropertyDefinition(e,t,n){return!!t.considerImplicitTypeConversion&&!!e.computed&&"Literal"!==e.key.type||this.$visitChildren(e,t,n)},UnaryExpression(e,t,n){return!!("delete"===e.operator||t.considerImplicitTypeConversion&&e_.has(e.operator)&&"Literal"!==e.argument.type)||this.$visitChildren(e,t,n)},UpdateExpression:()=>!0,YieldExpression:()=>!0}));function eI(e,t,n={}){let{considerGetters:r=!1,considerImplicitTypeConversion:i=!1}=n;return eP.$visit(e,{considerGetters:r,considerImplicitTypeConversion:i},t.visitorKeys||F)}function eN(e,t,n){let r,i,s,a,o;if("number"==typeof e){if(r=0|e,i=t,s=n,!(r>=1))throw TypeError("'times' should be a positive integer.")}else r=1,i=e,s=t;if(null==i||null==i.parent||"CatchClause"===i.parent.type&&i.parent.param===i)return!1;a=o=i;do a=s.getTokenBefore(a),o=s.getTokenAfter(o);while(null!=a&&null!=o&&H(a)&&z(o)&&a!==function(e,t){let n=e.parent;switch(n.type){case"CallExpression":case"NewExpression":if(1===n.arguments.length&&n.arguments[0]===e)return t.getTokenAfter(n.typeArguments||n.typeParameters||n.callee,H);return null;case"DoWhileStatement":if(n.test===e)return t.getTokenAfter(n.body,H);return null;case"IfStatement":case"WhileStatement":if(n.test===e)return t.getFirstToken(n,1);return null;case"ImportExpression":if(n.source===e)return t.getFirstToken(n,1);return null;case"SwitchStatement":if(n.discriminant===e)return t.getFirstToken(n,1);return null;case"WithStatement":if(n.object===e)return t.getFirstToken(n,1);return null;default:return null}}(i,s)&&--r>0);return 0===r}let eL=/\$(?:[$&`']|[1-9][0-9]?)/gu,eD=new WeakMap;class eB{constructor(e,t={}){let{escaped:n=!1}=t;if(!(e instanceof RegExp))throw TypeError("'pattern' should be a RegExp instance.");if(!e.flags.includes("g"))throw Error("'pattern' should contains 'g' flag.");eD.set(this,{pattern:new RegExp(e.source,e.flags),escaped:!!n})}*execAll(e){let{pattern:t,escaped:n}=eD.get(this),r=null,i=0;for(t.lastIndex=0;null!=(r=t.exec(e));)(n||!function(e,t){let n=!1;for(let r=t-1;r>=0&&92===e.charCodeAt(r);--r)n=!n;return n}(e,r.index))&&(i=t.lastIndex,yield r,t.lastIndex=i)}test(e){return!this.execAll(e).next().done}[Symbol.replace](e,t){return"function"==typeof t?function(e,t,n){let r=[],i=0;for(let s of e.execAll(t))r.push(t.slice(i,s.index)),r.push(String(n(...s,s.index,s.input))),i=s.index+s[0].length;return r.push(t.slice(i)),r.join("")}(this,String(e),t):function(e,t,n){let r=[],i=0;for(let s of e.execAll(t))r.push(t.slice(i,s.index)),r.push(n.replace(eL,e=>(function(e,n){switch(e){case"$$":return"$";case"$&":return n[0];case"$`":return t.slice(0,n.index);case"$'":return t.slice(n.index+n[0].length);default:{let t=e.slice(1);if(t in n)return n[t];return e}}})(e,s))),i=s.index+s[0].length;return r.push(t.slice(i)),r.join("")}(this,String(e),String(t))}}let ej=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,eR=Function.call.bind(Object.hasOwnProperty),eF=Symbol("read"),eM=Symbol("call"),e$=Symbol("construct"),eV=Symbol("esm"),eq={require:{[eM]:!0}};function eY(e){return null==e||0!==e.defs.length||e.references.some(e=>e.isWrite())}class eX{constructor(e,t={}){let{mode:n="strict",globalObjectNames:r=["global","globalThis","self","window"]}=t;this.variableStack=[],this.globalScope=e,this.mode=n,this.globalObjectNames=r.slice(0)}*iterateGlobalReferences(e){for(let t of Object.keys(e)){let n=e[t],r=[t],i=this.globalScope.set.get(t);eY(i)||(yield*this._iterateVariableReferences(i,r,n,!0))}for(let t of this.globalObjectNames){let n=[],r=this.globalScope.set.get(t);eY(r)||(yield*this._iterateVariableReferences(r,n,e,!1))}}*iterateCjsReferences(e){for(let{node:t}of this.iterateGlobalReferences(eq)){let n=ev(t.arguments[0]);if(null==n||!eR(e,n))continue;let r=e[n],i=[n];r[eF]&&(yield{node:t,path:i,type:eF,info:r[eF]}),yield*this._iteratePropertyReferences(t,i,r)}}*iterateEsmReferences(e){for(let t of this.globalScope.block.body){if(!ej.test(t.type)||null==t.source)continue;let n=t.source.value;if(!eR(e,n))continue;let r=e[n],i=[n];if(r[eF]&&(yield{node:t,path:i,type:eF,info:r[eF]}),"ExportAllDeclaration"===t.type)for(let e of Object.keys(r)){let n=r[e];n[eF]&&(yield{node:t,path:i.concat(e),type:eF,info:n[eF]})}else for(let e of t.specifiers){let t=eR(r,eV),n=this._iterateImportReferences(e,i,t?r:"legacy"===this.mode?{default:r,...r}:{default:r});if(t)yield*n;else for(let e of n)e.path=e.path.filter(eJ),(e.path.length>=2||e.type!==eF)&&(yield e)}}}*iteratePropertyReferences(e,t){yield*this._iteratePropertyReferences(e,[],t)}*_iterateVariableReferences(e,t,n,r){if(!this.variableStack.includes(e)){this.variableStack.push(e);try{for(let i of e.references){if(!i.isRead())continue;let e=i.identifier;r&&n[eF]&&(yield{node:e,path:t,type:eF,info:n[eF]}),yield*this._iteratePropertyReferences(e,t,n)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(e,t,n){let r=e;for(;function(e){let t=e.parent;if(t)switch(t.type){case"ConditionalExpression":return t.consequent===e||t.alternate===e;case"LogicalExpression":case"ChainExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":case"TSInstantiationExpression":return!0;case"SequenceExpression":return t.expressions[t.expressions.length-1]===e}return!1}(r);)r=r.parent;let i=r.parent;if("MemberExpression"===i.type){if(i.object===r){let e=ew(i);if(null==e||!eR(n,e))return;t=t.concat(e);let r=n[e];r[eF]&&(yield{node:i,path:t,type:eF,info:r[eF]}),yield*this._iteratePropertyReferences(i,t,r)}return}if("CallExpression"===i.type){i.callee===r&&n[eM]&&(yield{node:i,path:t,type:eM,info:n[eM]});return}if("NewExpression"===i.type){i.callee===r&&n[e$]&&(yield{node:i,path:t,type:e$,info:n[e$]});return}if("AssignmentExpression"===i.type){i.right===r&&(yield*this._iterateLhsReferences(i.left,t,n),yield*this._iteratePropertyReferences(i,t,n));return}if("AssignmentPattern"===i.type){i.right===r&&(yield*this._iterateLhsReferences(i.left,t,n));return}"VariableDeclarator"===i.type&&i.init===r&&(yield*this._iterateLhsReferences(i.id,t,n))}*_iterateLhsReferences(e,t,n){if("Identifier"===e.type){let r=q(this.globalScope,e);null!=r&&(yield*this._iterateVariableReferences(r,t,n,!1));return}if("ObjectPattern"===e.type){for(let r of e.properties){let e=ew(r);if(null==e||!eR(n,e))continue;let i=t.concat(e),s=n[e];s[eF]&&(yield{node:r,path:i,type:eF,info:s[eF]}),yield*this._iterateLhsReferences(r.value,i,s)}return}"AssignmentPattern"===e.type&&(yield*this._iterateLhsReferences(e.left,t,n))}*_iterateImportReferences(e,t,n){let r=e.type;if("ImportSpecifier"===r||"ImportDefaultSpecifier"===r){let i="ImportDefaultSpecifier"===r?"default":"Identifier"===e.imported.type?e.imported.name:e.imported.value;if(!eR(n,i))return;t=t.concat(i);let s=n[i];s[eF]&&(yield{node:e,path:t,type:eF,info:s[eF]}),yield*this._iterateVariableReferences(q(this.globalScope,e.local),t,s,!1);return}if("ImportNamespaceSpecifier"===r)return void(yield*this._iterateVariableReferences(q(this.globalScope,e.local),t,n,!1));if("ExportSpecifier"===r){let r="Identifier"===e.local.type?e.local.name:e.local.value;if(!eR(n,r))return;t=t.concat(r);let i=n[r];i[eF]&&(yield{node:e,path:t,type:eF,info:i[eF]})}}}function eJ(e,t){return 1!==t||"default"!==e}eX.READ=eF,eX.CALL=eM,eX.CONSTRUCT=e$,eX.ESM=eV;var eU=Object.freeze({__proto__:null,CALL:eM,CONSTRUCT:e$,ESM:eV,PatternMatcher:eB,READ:eF,ReferenceTracker:eX,default:{CALL:eM,CONSTRUCT:e$,ESM:eV,findVariable:q,getFunctionHeadLocation:ed,getFunctionNameWithKind:eA,getInnermostScope:V,getPropertyName:ew,getStaticValue:ek,getStringIfConstant:ev,hasSideEffect:eI,isArrowToken:J,isClosingBraceToken:ee,isClosingBracketToken:Q,isClosingParenToken:z,isColonToken:K,isCommaToken:U,isCommentToken:et,isNotArrowToken:en,isNotClosingBraceToken:eu,isNotClosingBracketToken:ep,isNotClosingParenToken:eo,isNotColonToken:es,isNotCommaToken:er,isNotCommentToken:ef,isNotOpeningBraceToken:ec,isNotOpeningBracketToken:el,isNotOpeningParenToken:ea,isNotSemicolonToken:ei,isOpeningBraceToken:Z,isOpeningBracketToken:G,isOpeningParenToken:H,isParenthesized:eN,isSemicolonToken:W,PatternMatcher:eB,READ:eF,ReferenceTracker:eX},findVariable:q,getFunctionHeadLocation:ed,getFunctionNameWithKind:eA,getInnermostScope:V,getPropertyName:ew,getStaticValue:ek,getStringIfConstant:ev,hasSideEffect:eI,isArrowToken:J,isClosingBraceToken:ee,isClosingBracketToken:Q,isClosingParenToken:z,isColonToken:K,isCommaToken:U,isCommentToken:et,isNotArrowToken:en,isNotClosingBraceToken:eu,isNotClosingBracketToken:ep,isNotClosingParenToken:eo,isNotColonToken:es,isNotCommaToken:er,isNotCommentToken:ef,isNotOpeningBraceToken:ec,isNotOpeningBracketToken:el,isNotOpeningParenToken:ea,isNotSemicolonToken:ei,isOpeningBraceToken:Z,isOpeningBracketToken:G,isOpeningParenToken:H,isParenthesized:eN,isSemicolonToken:W}),eW=R(eU),eK={},eH={};function ez(){var e,t,n,r;return a?eH:(a=1,Object.defineProperty(eH,"__esModule",{value:!0}),eH.AST_TOKEN_TYPES=eH.AST_NODE_TYPES=void 0,(n=e||(eH.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||(eH.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",eH)}var eG={},eQ={},eZ={};function e0(){var e,t,n;return c?eK:(c=1,e=eK&&eK.__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=eK&&eK.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)},Object.defineProperty(eK,"__esModule",{value:!0}),eK.AST_TOKEN_TYPES=eK.AST_NODE_TYPES=void 0,n=ez(),Object.defineProperty(eK,"AST_NODE_TYPES",{enumerable:!0,get:function(){return n.AST_NODE_TYPES}}),Object.defineProperty(eK,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return n.AST_TOKEN_TYPES}}),t((o||(o=1,Object.defineProperty(eG,"__esModule",{value:!0})),eG),eK),t((l||(l=1,Object.defineProperty(eQ,"__esModule",{value:!0})),eQ),eK),t(function(){if(p)return eZ;p=1;var e,t=eZ&&eZ.__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=eZ&&eZ.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=eZ&&eZ.__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(eZ,"__esModule",{value:!0}),eZ.TSESTree=void 0,eZ.TSESTree=r(ez()),eZ}(),eK),eK)}var e1=L(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});let s=i(eW);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}),e2=L(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=i(eW).PatternMatcher}),e3=L(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});let s=i(eW);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}),e6=L(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});let s=i(eW);s.ReferenceTracker.READ,s.ReferenceTracker.CALL,s.ReferenceTracker.CONSTRUCT,s.ReferenceTracker.ESM,e.ReferenceTracker=s.ReferenceTracker}),e4=L(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});let s=i(eW);e.findVariable=s.findVariable,e.getInnermostScope=s.getInnermostScope}),e5=L(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(e1(),e),n(e2(),e),n(e3(),e),n(e6(),e),n(e4(),e)}),e9=L(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)}),e8=L(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isTokenOnSameLine=function(e,t){return e.loc.end.line===t.loc.start.line},e.LINEBREAK_MATCHER=/\r\n|[\r\n\u2028\u2029]/}),e7=L(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TSESTree=e.AST_TOKEN_TYPES=e.AST_NODE_TYPES=void 0;var t=e0();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}})}),te=L(e=>{Object.defineProperty(e,"__esModule",{value:!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=e7(),n=e9();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])}),tt=L(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(e5(),e),n(e9(),e),n(e8(),e),n(te(),e)}),tn=e0();let tr={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(let e of Object.keys(tr))Object.freeze(tr[e]);Object.freeze(tr);var ti=[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],ts=[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],ta="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",to={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"},tl="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",tp={5:tl,"5module":tl+" export import",6:tl+" const class extends export import super"},tc=/^in(stanceof)?$/,tu=RegExp("["+ta+"]"),tf=RegExp("["+ta+"‌‍\xb7̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function td(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 tm(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&tu.test(String.fromCharCode(e)):!1!==t&&td(e,ts)))}function th(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&tf.test(String.fromCharCode(e)):!1!==t&&(td(e,ts)||td(e,ti)))))}var tg=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 ty(e,t){return new tg(e,{beforeExpr:!0,binop:t})}var tx={beforeExpr:!0},tT={startsExpr:!0},tS={};function tb(e,t){return void 0===t&&(t={}),t.keyword=e,tS[e]=new tg(e,t)}var tE={num:new tg("num",tT),regexp:new tg("regexp",tT),string:new tg("string",tT),name:new tg("name",tT),privateId:new tg("privateId",tT),eof:new tg("eof"),bracketL:new tg("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new tg("]"),braceL:new tg("{",{beforeExpr:!0,startsExpr:!0}),braceR:new tg("}"),parenL:new tg("(",{beforeExpr:!0,startsExpr:!0}),parenR:new tg(")"),comma:new tg(",",tx),semi:new tg(";",tx),colon:new tg(":",tx),dot:new tg("."),question:new tg("?",tx),questionDot:new tg("?."),arrow:new tg("=>",tx),template:new tg("template"),invalidTemplate:new tg("invalidTemplate"),ellipsis:new tg("...",tx),backQuote:new tg("`",tT),dollarBraceL:new tg("${",{beforeExpr:!0,startsExpr:!0}),eq:new tg("=",{beforeExpr:!0,isAssign:!0}),assign:new tg("_=",{beforeExpr:!0,isAssign:!0}),incDec:new tg("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new tg("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ty("||",1),logicalAND:ty("&&",2),bitwiseOR:ty("|",3),bitwiseXOR:ty("^",4),bitwiseAND:ty("&",5),equality:ty("==/!=/===/!==",6),relational:ty("</>/<=/>=",7),bitShift:ty("<</>>/>>>",8),plusMin:new tg("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ty("%",10),star:ty("*",10),slash:ty("/",10),starstar:new tg("**",{beforeExpr:!0}),coalesce:ty("??",1),_break:tb("break"),_case:tb("case",tx),_catch:tb("catch"),_continue:tb("continue"),_debugger:tb("debugger"),_default:tb("default",tx),_do:tb("do",{isLoop:!0,beforeExpr:!0}),_else:tb("else",tx),_finally:tb("finally"),_for:tb("for",{isLoop:!0}),_function:tb("function",tT),_if:tb("if"),_return:tb("return",tx),_switch:tb("switch"),_throw:tb("throw",tx),_try:tb("try"),_var:tb("var"),_const:tb("const"),_while:tb("while",{isLoop:!0}),_with:tb("with"),_new:tb("new",{beforeExpr:!0,startsExpr:!0}),_this:tb("this",tT),_super:tb("super",tT),_class:tb("class",tT),_extends:tb("extends",tx),_export:tb("export"),_import:tb("import",tT),_null:tb("null",tT),_true:tb("true",tT),_false:tb("false",tT),_in:tb("in",{beforeExpr:!0,binop:7}),_instanceof:tb("instanceof",{beforeExpr:!0,binop:7}),_typeof:tb("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:tb("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:tb("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},tk=/\r\n?|\n|\u2028|\u2029/,tv=RegExp(tk.source,"g");function tw(e){return 10===e||13===e||8232===e||8233===e}function tA(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(tw(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return -1}var tC=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,t_=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,tO=Object.prototype,tP=tO.hasOwnProperty,tI=tO.toString,tN=Object.hasOwn||function(e,t){return tP.call(e,t)},tL=Array.isArray||function(e){return"[object Array]"===tI.call(e)},tD=Object.create(null);function tB(e){return tD[e]||(tD[e]=RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function tj(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}var tR=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,tF=function(e,t){this.line=e,this.column=t};tF.prototype.offset=function(e){return new tF(this.line,this.column+e)};var tM=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function t$(e,t){for(var n=1,r=0;;){var i=tA(e,r,t);if(i<0)return new tF(n,t-r);++n,r=i}}var tV={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},tq=!1;function tY(e,t){return 2|4*!!e|8*!!t}var tX=function(e,t,n){this.options=e=function(e){var t,n,r={};for(var i in tV)r[i]=e&&tN(e,i)?e[i]:tV[i];if("latest"===r.ecmaVersion?r.ecmaVersion=1e8:null==r.ecmaVersion?(!tq&&"object"==typeof console&&console.warn&&(tq=!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),tL(r.onToken)){var s=r.onToken;r.onToken=function(e){return s.push(e)}}return tL(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 tM(this,a,o)),t.ranges&&(l.range=[i,s]),n.push(l)}),r}(e),this.sourceFile=e.sourceFile,this.keywords=tB(tp[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=to[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=tB(r);var i=(r?r+" ":"")+to.strict;this.reservedWordsStrict=tB(i),this.reservedWordsStrictBind=tB(i+" "+to.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(tk).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=tE.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=[]},tJ={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}};tX.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},tJ.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},tJ.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},tJ.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},tJ.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},tJ.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},tJ.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},tJ.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},tJ.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},tJ.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},tX.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},tX.parse=function(e,t){return new this(t,e).parse()},tX.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},tX.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(tX.prototype,tJ);var tU=tX.prototype,tW=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;tU.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){t_.lastIndex=e,e+=t_.exec(this.input)[0].length;var t=tW.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){t_.lastIndex=e+t[0].length;var n=t_.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return";"===i||"}"===i||tk.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}t_.lastIndex=e+=t[0].length,e+=t_.exec(this.input)[0].length,";"===this.input[e]&&e++}},tU.eat=function(e){return this.type===e&&(this.next(),!0)},tU.isContextual=function(e){return this.type===tE.name&&this.value===e&&!this.containsEsc},tU.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},tU.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},tU.canInsertSemicolon=function(){return this.type===tE.eof||this.type===tE.braceR||tk.test(this.input.slice(this.lastTokEnd,this.start))},tU.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},tU.semicolon=function(){this.eat(tE.semi)||this.insertSemicolon()||this.unexpected()},tU.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},tU.expect=function(e){this.eat(e)||this.unexpected()},tU.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var tK=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};tU.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")}},tU.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")},tU.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")},tU.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var tH=tX.prototype;tH.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==tE.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 tz={kind:"loop"},tG={kind:"switch"};tH.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;t_.lastIndex=this.pos;var t=t_.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(tm(r,!0)){for(var i=n+1;th(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var s=this.input.slice(n,i);if(!tc.test(s))return!0}return!1},tH.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;t_.lastIndex=this.pos;var e,t=t_.exec(this.input),n=this.pos+t[0].length;return!tk.test(this.input.slice(this.pos,n))&&"function"===this.input.slice(n,n+8)&&(n+8===this.input.length||!(th(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},tH.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;t_.lastIndex=this.pos;var n=t_.exec(this.input),r=this.pos+n[0].length;if(tk.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||th(i=this.input.charCodeAt(s))||i>55295&&i<56320)return!1;t_.lastIndex=s;var a=t_.exec(this.input);if(a&&tk.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||!th(o=this.input.charCodeAt(l))&&!(o>55295&&o<56320)))return!1}var p=this.input.charCodeAt(r);return tm(p,!0)||92===p},tH.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},tH.isUsing=function(e){return this.isUsingKeyword(!1,e)},tH.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=tE._var,r="let"),i){case tE._break:case tE._continue:return this.parseBreakContinueStatement(s,i.keyword);case tE._debugger:return this.parseDebuggerStatement(s);case tE._do:return this.parseDoStatement(s);case tE._for:return this.parseForStatement(s);case tE._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case tE._class:return e&&this.unexpected(),this.parseClass(s,!0);case tE._if:return this.parseIfStatement(s);case tE._return:return this.parseReturnStatement(s);case tE._switch:return this.parseSwitchStatement(s);case tE._throw:return this.parseThrowStatement(s);case tE._try:return this.parseTryStatement(s);case tE._const:case tE._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case tE._while:return this.parseWhileStatement(s);case tE._with:return this.parseWithStatement(s);case tE.braceL:return this.parseBlock(!0,s);case tE.semi:return this.parseEmptyStatement(s);case tE._export:case tE._import:if(this.options.ecmaVersion>10&&i===tE._import){t_.lastIndex=this.pos;var a=t_.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===tE._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===tE.name&&"Identifier"===u.type&&this.eat(tE.colon))return this.parseLabeledStatement(s,c,u,e);return this.parseExpressionStatement(s,u)}},tH.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(tE.semi)||this.insertSemicolon()?e.label=null:this.type!==tE.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")},tH.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},tH.parseDoStatement=function(e){return this.next(),this.labels.push(tz),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(tE._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(tE.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},tH.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(tz),this.enterScope(0),this.expect(tE.parenL),this.type===tE.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===tE._var||this.type===tE._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 tK,u=this.start,f=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===tE._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===tE._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(f.start!==u||p||"Identifier"!==f.type||"async"!==f.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),s&&a&&this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(f,!1,c),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},tH.parseForAfterInit=function(e,t,n){return(this.type===tE._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===tE._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},tH.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,tZ|(n?0:t0),!1,t)},tH.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(tE._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},tH.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(tE.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},tH.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(tE.braceL),this.labels.push(tG),this.enterScope(0);for(var t,n=!1;this.type!==tE.braceR;)if(this.type===tE._case||this.type===tE._default){var r=this.type===tE._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(tE.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")},tH.parseThrowStatement=function(e){return this.next(),tk.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 tQ=[];tH.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(32*!!t),this.checkLValPattern(e,t?4:2),this.expect(tE.parenR),e},tH.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===tE._catch){var t=this.startNode();this.next(),this.eat(tE.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(tE._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},tH.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},tH.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(tz),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},tH.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")},tH.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},tH.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===tE._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")},tH.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},tH.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(tE.braceL),e&&this.enterScope(0);this.type!==tE.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},tH.parseFor=function(e,t){return e.init=t,this.expect(tE.semi),e.test=this.type===tE.semi?null:this.parseExpression(),this.expect(tE.semi),e.update=this.type===tE.parenR?null:this.parseExpression(),this.expect(tE.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},tH.parseForIn=function(e,t){var n=this.type===tE._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(tE.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},tH.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(tE.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===tE._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===tE._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===tE._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(tE.comma))break}return e},tH.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 tZ=1,t0=2;function t1(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}tH.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===tE.star&&t&t0&&this.unexpected(),e.generator=this.eat(tE.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&tZ&&(e.id=4&t&&this.type!==tE.name?null:this.parseIdent(),e.id&&!(t&t0)&&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(tY(e.async,e.generator)),t&tZ||(e.id=this.type===tE.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&tZ?"FunctionDeclaration":"FunctionExpression")},tH.parseFunctionParams=function(e){this.expect(tE.parenL),e.params=this.parseBindingList(tE.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},tH.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(tE.braceL);this.type!==tE.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")},tH.parseClassElement=function(e){if(this.eat(tE.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(tE.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===tE.star?o=!0:r="static"}if(n.static=o,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===tE.star)&&!this.canInsertSemicolon()?s=!0:r="async"),!r&&(t>=9||!s)&&this.eat(tE.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===tE.parenL||"method"!==a||i||s){var p=!n.static&&t1(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},tH.isClassElementNameStart=function(){return this.type===tE.name||this.type===tE.privateId||this.type===tE.num||this.type===tE.string||this.type===tE.bracketL||this.type.keyword},tH.parseClassElementName=function(e){this.type===tE.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)},tH.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&&t1(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")},tH.parseClassField=function(e){return t1(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&t1(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(tE.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},tH.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==tE.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},tH.parseClassId=function(e,t){this.type===tE.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},tH.parseClassSuper=function(e){e.superClass=this.eat(tE._extends)?this.parseExprSubscripts(null,!1):null},tH.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},tH.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];tN(t,a.name)||(i?i.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},tH.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!==tE.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},tH.parseExport=function(e,t){if(this.next(),this.eat(tE.star))return this.parseExportAllDeclaration(e,t);if(this.eat(tE._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!==tE.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")},tH.parseExportDeclaration=function(e){return this.parseStatement(null)},tH.parseExportDefaultDeclaration=function(){if(this.type===tE._function||(e=this.isAsyncFunction())){var e,t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|tZ,!1,e)}if(this.type===tE._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},tH.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),tN(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},tH.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)},tH.checkVariableExport=function(e,t){if(e)for(var n=0;n<t.length;n+=1){var r=t[n];this.checkPatternExport(e,r.id)}},tH.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},tH.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")},tH.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(tE.braceL);!this.eat(tE.braceR);){if(n)n=!1;else if(this.expect(tE.comma),this.afterTrailingComma(tE.braceR))break;t.push(this.parseExportSpecifier(e))}return t},tH.parseImport=function(e){return this.next(),this.type===tE.string?(e.specifiers=tQ,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===tE.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},tH.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")},tH.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},tH.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")},tH.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===tE.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(tE.comma)))return e;if(this.type===tE.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(tE.braceL);!this.eat(tE.braceR);){if(t)t=!1;else if(this.expect(tE.comma),this.afterTrailingComma(tE.braceR))break;e.push(this.parseImportSpecifier())}return e},tH.parseWithClause=function(){var e=[];if(!this.eat(tE._with))return e;this.expect(tE.braceL);for(var t={},n=!0;!this.eat(tE.braceR);){if(n)n=!1;else if(this.expect(tE.comma),this.afterTrailingComma(tE.braceR))break;var r=this.parseImportAttribute(),i="Identifier"===r.key.type?r.key.name:r.key.value;tN(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e},tH.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===tE.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(tE.colon),this.type!==tE.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},tH.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===tE.string){var e=this.parseLiteral(this.value);return tR.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},tH.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)},tH.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 t2=tX.prototype;t2.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},t2.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},t2.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},t2.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==tE.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},t2.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case tE.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(tE.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case tE.braceL:return this.parseObj(!0)}return this.parseIdent()},t2.parseBindingList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(tE.comma),t&&this.type===tE.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===tE.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===tE.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},t2.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},t2.parseBindingListItem=function(e){return e},t2.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(tE.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},t2.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&&(tN(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")}},t2.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)}},t2.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 t3=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},t6={b_stat:new t3("{",!1),b_expr:new t3("{",!0),b_tmpl:new t3("${",!1),p_stat:new t3("(",!1),p_expr:new t3("(",!0),q_tmpl:new t3("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new t3("function",!1),f_expr:new t3("function",!0),f_expr_gen:new t3("function",!0,!1,null,!0),f_gen:new t3("function",!1,!1,null,!0)},t4=tX.prototype;t4.initialContext=function(){return[t6.b_stat]},t4.curContext=function(){return this.context[this.context.length-1]},t4.braceIsBlock=function(e){var t=this.curContext();return t===t6.f_expr||t===t6.f_stat||(e===tE.colon&&(t===t6.b_stat||t===t6.b_expr)?!t.isExpr:e===tE._return||e===tE.name&&this.exprAllowed?tk.test(this.input.slice(this.lastTokEnd,this.start)):e===tE._else||e===tE.semi||e===tE.eof||e===tE.parenR||e===tE.arrow||(e===tE.braceL?t===t6.b_stat:e!==tE._var&&e!==tE._const&&e!==tE.name&&!this.exprAllowed))},t4.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},t4.updateContext=function(e){var t,n=this.type;n.keyword&&e===tE.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},t4.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},tE.parenR.updateContext=tE.braceR.updateContext=function(){if(1===this.context.length){this.exprAllowed=!0;return}var e=this.context.pop();e===t6.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},tE.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?t6.b_stat:t6.b_expr),this.exprAllowed=!0},tE.dollarBraceL.updateContext=function(){this.context.push(t6.b_tmpl),this.exprAllowed=!0},tE.parenL.updateContext=function(e){var t=e===tE._if||e===tE._for||e===tE._with||e===tE._while;this.context.push(t?t6.p_stat:t6.p_expr),this.exprAllowed=!0},tE.incDec.updateContext=function(){},tE._function.updateContext=tE._class.updateContext=function(e){e.beforeExpr&&e!==tE._else&&(e!==tE.semi||this.curContext()===t6.p_stat)&&!(e===tE._return&&tk.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==tE.colon&&e!==tE.braceL||this.curContext()!==t6.b_stat)?this.context.push(t6.f_expr):this.context.push(t6.f_stat),this.exprAllowed=!1},tE.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},tE.backQuote.updateContext=function(){this.curContext()===t6.q_tmpl?this.context.pop():this.context.push(t6.q_tmpl),this.exprAllowed=!1},tE.star.updateContext=function(e){if(e===tE._function){var t=this.context.length-1;this.context[t]===t6.f_expr?this.context[t]=t6.f_expr_gen:this.context[t]=t6.f_gen}this.exprAllowed=!0},tE.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==tE.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var t5=tX.prototype;t5.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}},t5.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===tE.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(tE.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},t5.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 tK,r=!0);var o=this.start,l=this.startLoc;(this.type===tE.parenL||this.type===tE.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===tE.eq&&(p=this.toAssignable(p,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=p.start&&(t.shorthandAssign=-1),this.type===tE.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},t5.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(tE.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(tE.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},t5.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)},t5.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==tE._in)&&s>r){var a=this.type===tE.logicalOR||this.type===tE.logicalAND,o=this.type===tE.coalesce;o&&(s=tE.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),f=this.buildBinary(t,n,e,u,l,a||o);return(a&&this.type===tE.coalesce||o&&(this.type===tE.logicalOR||this.type===tE.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,t,n,r,i)}return e},t5.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")},t5.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===tE.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!==tE.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!==tE._in&&this.unexpected();return!n&&this.eat(tE.starstar)?t?void this.unexpected(this.lastTokStart):this.buildBinary(s,a,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1):i},t5.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},t5.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}},t5.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(tE.arrow)},t5.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},t5.parseSubscript=function(e,t,n,r,i,s,a){var o=this.options.ecmaVersion>=11,l=o&&this.eat(tE.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(tE.bracketL);if(p||l&&this.type!==tE.parenL&&this.type!==tE.backQuote||this.eat(tE.dot)){var c=this.startNodeAt(t,n);c.object=e,p?(c.property=this.parseExpression(),this.expect(tE.bracketR)):this.type===tE.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(tE.parenL)){var u=new tK,f=this.yieldPos,d=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(tE.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=f,this.awaitPos=d,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,a);this.checkExpressionErrors(u,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=d||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===tE.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},t5.parseExprAtom=function(e,t,n){this.type===tE.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case tE._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==tE.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==tE.dot&&this.type!==tE.bracketL&&this.type!==tE.parenL&&this.unexpected(),this.finishNode(r,"Super");case tE._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case tE.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(tE._function))return this.overrideContext(t6.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(tE.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===tE.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(tE.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}return l;case tE.regexp:var p=this.value;return(r=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},r;case tE.num:case tE.string:return this.parseLiteral(this.value);case tE._null:case tE._true:case tE._false:return(r=this.startNode()).value=this.type===tE._null?null:this.type===tE._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case tE.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 tE.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(tE.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case tE.braceL:return this.overrideContext(t6.b_expr),this.parseObj(!1,e);case tE._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case tE._class:return this.parseClass(this.startNode(),!1);case tE._new:return this.parseNew();case tE.backQuote:return this.parseTemplate();case tE._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);return this.unexpected();default:return this.parseExprAtomDefault()}},t5.parseExprAtomDefault=function(){this.unexpected()},t5.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===tE.parenL&&!e)return this.parseDynamicImport(t);if(this.type===tE.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()},t5.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(tE.parenR)?e.options=null:(this.expect(tE.comma),this.afterTrailingComma(tE.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),!this.eat(tE.parenR)&&(this.expect(tE.comma),this.afterTrailingComma(tE.parenR)||this.unexpected())));else if(!this.eat(tE.parenR)){var t=this.start;this.eat(tE.comma)&&this.eat(tE.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},t5.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")},t5.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")},t5.parseParenExpression=function(){this.expect(tE.parenL);var e=this.parseExpression();return this.expect(tE.parenR),e},t5.shouldParseArrow=function(e){return!this.canInsertSemicolon()},t5.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,f=new tK,d=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==tE.parenR;){if(c?c=!1:this.expect(tE.comma),s&&this.afterTrailingComma(tE.parenR,!0)){u=!0;break}if(this.type===tE.ellipsis){a=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===tE.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(tE.parenR),e&&this.shouldParseArrow(p)&&this.eat(tE.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=m,this.parseParenArrowList(r,i,p,t);(!p.length||u)&&this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(f,!0),this.yieldPos=d||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")},t5.parseParenItem=function(e){return e},t5.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var t9=[];t5.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===tE.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(tE.parenL)?e.arguments=this.parseExprList(tE.parenR,this.options.ecmaVersion>=8,!1):e.arguments=t9,this.finishNode(e,"NewExpression")},t5.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===tE.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===tE.backQuote,this.finishNode(n,"TemplateElement")},t5.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===tE.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(tE.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(tE.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},t5.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===tE.name||this.type===tE.num||this.type===tE.string||this.type===tE.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===tE.star)&&!tk.test(this.input.slice(this.lastTokEnd,this.start))},t5.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(tE.braceR);){if(r)r=!1;else if(this.expect(tE.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(tE.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")},t5.parseProperty=function(e,t){var n,r,i,s,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(tE.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===tE.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===tE.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(tE.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(tE.star),this.parsePropertyName(a)):r=!1,this.parsePropertyValue(a,e,n,r,i,s,t,o),this.finishNode(a,"Property")},t5.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")},t5.parsePropertyValue=function(e,t,n,r,i,s,a,o){(n||r)&&this.type===tE.colon&&this.unexpected(),this.eat(tE.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===tE.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===tE.comma||this.type===tE.braceR||this.type===tE.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===tE.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))},t5.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(tE.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(tE.bracketR),e.key;else e.computed=!1;return e.key=this.type===tE.num||this.type===tE.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},t5.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},t5.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|tY(t,r.generator)|128*!!n),this.expect(tE.parenL),r.params=this.parseBindingList(tE.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")},t5.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|tY(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")},t5.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==tE.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()},t5.isSimpleParamList=function(e){for(var t=0;t<e.length;t+=1)if("Identifier"!==e[t].type)return!1;return!0},t5.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)}},t5.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(tE.comma),t&&this.afterTrailingComma(e))break;var a=void 0;n&&this.type===tE.comma?a=null:this.type===tE.ellipsis?(a=this.parseSpread(r),r&&this.type===tE.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),i.push(a)}return i},t5.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"))},t5.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},t5.parseIdentNode=function(){var e=this.startNode();return this.type===tE.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=tE.name):this.unexpected(),e},t5.parsePrivateIdent=function(){var e=this.startNode();return this.type===tE.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},t5.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===tE.semi||this.canInsertSemicolon()||this.type!==tE.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(tE.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},t5.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 t8=tX.prototype;t8.raise=function(e,t){var n=t$(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},t8.raiseRecoverable=t8.raise,t8.curPosition=function(){if(this.options.locations)return new tF(this.curLine,this.pos-this.lineStart)};var t7=tX.prototype,ne=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};t7.enterScope=function(e){this.scopeStack.push(new ne(e))},t7.exitScope=function(){this.scopeStack.pop()},t7.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},t7.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")},t7.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},t7.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},t7.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},t7.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 nt=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new tM(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},nn=tX.prototype;function nr(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}nn.startNode=function(){return new nt(this,this.start,this.startLoc)},nn.startNodeAt=function(e,t){return new nt(this,e,t)},nn.finishNode=function(e,t){return nr.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},nn.finishNodeAt=function(e,t,n,r){return nr.call(this,e,t,n,r)},nn.copyNode=function(e){var t=new nt(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};for(var ni="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",ns=ni+" Extended_Pictographic",na=ns+" EBase EComp EMod EPres ExtPict",no={9:ni,10:ns,11:ns,12:na,13:na,14:na},nl={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"},np="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",nc="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",nu=nc+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",nf=nu+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",nd=nf+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",nm=nd+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",nh={9:nc,10:nu,11:nf,12:nd,13:nm,14:nm+" 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"},ng={},ny=0,nx=[9,10,11,12,13,14];ny<nx.length;ny+=1)!function(e){var t=ng[e]={binary:tB(no[e]+" "+np),binaryOfStrings:tB(nl[e]),nonBinary:{General_Category:tB(np),Script:tB(nh[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}(nx[ny]);var nT=tX.prototype,nS=function(e,t){this.parent=e,this.base=t||this};nS.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},nS.prototype.sibling=function(){return new nS(this.parent,this.base)};var nb=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=ng[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 nE(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function nk(e){return e>=65&&e<=90||e>=97&&e<=122}function nv(e){return nk(e)||95===e}function nw(e){return e>=48&&e<=57}function nA(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function nC(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}function n_(e){return e>=48&&e<=55}nb.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)},nb.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},nb.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},nb.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},nb.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},nb.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},nb.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},nb.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},nb.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},nT.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")},nT.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))},nT.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")}},nT.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new nS(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")},nT.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},nT.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)},nT.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},nT.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},nT.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},nT.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},nT.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)},nT.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},nT.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},nT.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},nT.regexp_eatModifiers=function(e){for(var t,n="",r=0;-1!==(r=e.current())&&(105===(t=r)||109===t||115===t);)n+=tj(r),e.advance();return n},nT.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)},nT.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},nT.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!nE(t)&&(e.lastIntValue=t,e.advance(),!0)},nT.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!nE(n);)e.advance();return e.pos!==t},nT.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)},nT.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}},nT.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},nT.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=tj(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=tj(e.lastIntValue);return!0}return!1},nT.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),tm(t=i,!0)||36===t||95===t)?(e.lastIntValue=i,!0):(e.pos=n,!1)},nT.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),th(t=i,!0)||36===t||95===t||8204===t||8205===t)?(e.lastIntValue=i,!0):(e.pos=n,!1)},nT.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)},nT.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},nT.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},nT.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)},nT.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},nT.regexp_eatZero=function(e){return!(48!==e.current()||nw(e.lookahead()))&&(e.lastIntValue=0,e.advance(),!0)},nT.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)},nT.regexp_eatControlLetter=function(e){var t=e.current();return!!nk(t)&&(e.lastIntValue=t%32,e.advance(),!0)},nT.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},nT.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)},nT.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},nT.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},nT.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},nT.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){tN(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},nT.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")},nT.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";nv(t=e.current());)e.lastStringValue+=tj(t),e.advance();return""!==e.lastStringValue},nT.regexp_eatUnicodePropertyValue=function(e){var t,n=0;for(e.lastStringValue="";nv(t=n=e.current())||nw(t);)e.lastStringValue+=tj(n),e.advance();return""!==e.lastStringValue},nT.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},nT.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},nT.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},nT.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")}}},nT.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||n_(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)},nT.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)},nT.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)}},nT.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},nT.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},nT.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},nT.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},nT.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},nT.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},nT.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)},nT.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)},nT.regexp_eatClassControlLetter=function(e){var t=e.current();return(!!nw(t)||95===t)&&(e.lastIntValue=t%32,e.advance(),!0)},nT.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},nT.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;nw(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},nT.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;nA(n=e.current());)e.lastIntValue=16*e.lastIntValue+nC(n),e.advance();return e.pos!==t},nT.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},nT.regexp_eatOctalDigit=function(e){var t=e.current();return n_(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},nT.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!nA(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+nC(i),e.advance()}return!0};var nO=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new tM(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},nP=tX.prototype;function nI(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}nP.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 nO(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},nP.getToken=function(){return this.next(),new nO(this)},"undefined"!=typeof Symbol&&(nP[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===tE.eof,value:t}}}}),nP.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(tE.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},nP.readToken=function(e){return tm(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},nP.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},nP.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=tA(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())},nP.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&&!tw(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())},nP.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&&tC.test(String.fromCharCode(e)))++this.pos;else break e}}},nP.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)},nP.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(tE.ellipsis)):(++this.pos,this.finishToken(tE.dot))},nP.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(tE.assign,2):this.finishOp(tE.slash,1)},nP.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?tE.star:tE.modulo;return(this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=tE.starstar,t=this.input.charCodeAt(this.pos+2)),61===t)?this.finishOp(tE.assign,n+1):this.finishOp(r,n)},nP.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(tE.assign,3):this.finishOp(124===e?tE.logicalOR:tE.logicalAND,2);return 61===t?this.finishOp(tE.assign,2):this.finishOp(124===e?tE.bitwiseOR:tE.bitwiseAND,1)},nP.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(tE.assign,2):this.finishOp(tE.bitwiseXOR,1)},nP.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||tk.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(tE.incDec,2):61===t?this.finishOp(tE.assign,2):this.finishOp(tE.plusMin,1)},nP.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(tE.assign,n+1):this.finishOp(tE.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(tE.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},nP.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(tE.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(tE.arrow)):this.finishOp(61===e?tE.eq:tE.prefix,1)},nP.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(tE.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(tE.assign,3):this.finishOp(tE.coalesce,2)}return this.finishOp(tE.question,1)},nP.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,tm(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(tE.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+tj(t)+"'")},nP.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(tE.parenL);case 41:return++this.pos,this.finishToken(tE.parenR);case 59:return++this.pos,this.finishToken(tE.semi);case 44:return++this.pos,this.finishToken(tE.comma);case 91:return++this.pos,this.finishToken(tE.bracketL);case 93:return++this.pos,this.finishToken(tE.bracketR);case 123:return++this.pos,this.finishToken(tE.braceL);case 125:return++this.pos,this.finishToken(tE.braceR);case 58:return++this.pos,this.finishToken(tE.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(tE.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(tE.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+tj(e)+"'")},nP.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},nP.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(tk.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 nb(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(tE.regexp,{pattern:i,flags:a,value:l})},nP.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},nP.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=nI(this.input.slice(t,this.pos)),++this.pos):tm(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(tE.num,n)},nP.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=nI(this.input.slice(n,this.pos));return++this.pos,tm(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(tE.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")),tm(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(tE.num,a)},nP.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},nP.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)):(tw(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(tE.string,t)};var nN={};nP.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===nN)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},nP.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nN;this.raise(e,t)},nP.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===tE.template||this.type===tE.invalidTemplate))if(36===n)return this.pos+=2,this.finishToken(tE.dollarBraceL);else return++this.pos,this.finishToken(tE.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(tE.template,e)}if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(tw(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}},nP.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(tE.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")},nP.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 tj(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(tw(t))return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";return String.fromCharCode(t)}},nP.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},nP.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(th(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?tm:th)(a,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=tj(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},nP.readWord=function(){var e=this.readWord1(),t=tE.name;return this.keywords.test(e)&&(t=tS[e]),this.finishToken(t,e)};var nL="8.15.0";tX.acorn={Parser:tX,version:nL,defaultOptions:tV,Position:tF,SourceLocation:tM,getLineInfo:t$,Node:nt,TokenType:tg,tokTypes:tE,keywordTypes:tS,TokContext:t3,tokContexts:t6,isIdentifierChar:th,isIdentifierStart:tm,Token:nO,isNewLine:tw,lineBreak:tk,lineBreakG:tv,nonASCIIwhitespace:tC};var nD=Object.freeze({__proto__:null,Node:nt,Parser:tX,Position:tF,SourceLocation:tM,TokContext:t3,Token:nO,TokenType:tg,defaultOptions:tV,getLineInfo:t$,isIdentifierChar:th,isIdentifierStart:tm,isNewLine:tw,keywordTypes:tS,lineBreak:tk,lineBreakG:tv,nonASCIIwhitespace:tC,parse:function(e,t){return tX.parse(e,t)},parseExpressionAt:function(e,t,n){return tX.parseExpressionAt(e,t,n)},tokContexts:t6,tokTypes:tE,tokenizer:function(e,t){return tX.tokenizer(e,t)},version:nL}),nB={exports:{}},nj=R(nD),nR=j((d||(d=1,!function(e){let t=f?u:(f=1,u={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){var o,l;let p,c,u,f,d,m,h,g,y,x,T;return o={allowNamespaces:!1!==e.allowNamespaces,allowNamespacedObjects:!!e.allowNamespacedObjects},l=i,c=s(p=l.acorn||nj),u=p.tokTypes,f=c.tokTypes,d=p.tokContexts,m=c.tokContexts.tc_oTag,h=c.tokContexts.tc_cTag,g=c.tokContexts.tc_expr,y=p.isNewLine,x=p.isIdentifierStart,T=p.isIdentifierChar,class extends l{static get acornJsx(){return c}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(f.jsxTagStart);return this.getTokenFromCode(n)}return e+=this.input.slice(t,this.pos),this.finishToken(f.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:y(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):y(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(u.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(T(e)||45===e);return this.finishToken(f.jsxName,this.input.slice(t,this.pos))}jsx_parseIdentifier(){let e=this.startNode();return this.type===f.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsx_parseNamespacedName(){let e=this.start,t=this.startLoc,n=this.jsx_parseIdentifier();if(!o.allowNamespaces||!this.eat(u.colon))return n;var r=this.startNodeAt(e,t);return r.namespace=n,r.name=this.jsx_parseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===f.jsxTagEnd)return"";let e=this.start,t=this.startLoc,n=this.jsx_parseNamespacedName();for(this.type!==u.dot||"JSXNamespacedName"!==n.type||o.allowNamespacedObjects||this.unexpected();this.eat(u.dot);){let r=this.startNodeAt(e,t);r.object=n,r.property=this.jsx_parseIdentifier(),n=this.finishNode(r,"JSXMemberExpression")}return n}jsx_parseAttributeValue(){switch(this.type){case u.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 f.jsxTagStart:case u.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===u.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(u.braceR),this.finishNode(e,"JSXExpressionContainer")}jsx_parseAttribute(){let e=this.startNode();return this.eat(u.braceL)?(this.expect(u.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(u.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(u.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!==u.slash&&this.type!==f.jsxTagEnd;)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(u.slash),this.expect(f.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(f.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 f.jsxTagStart:if(e=this.start,t=this.startLoc,this.next(),this.eat(u.slash)){s=this.jsx_parseClosingElementAt(e,t);break t}r.push(this.jsx_parseElementAt(e,t));break;case f.jsxText:r.push(this.parseExprAtom());break;case u.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===u.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===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===g)return this.jsx_readToken();if(t===m||t===h){if(x(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(f.jsxTagEnd);if((34===e||39===e)&&t==m)return this.jsx_readString(e)}return 60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==u.braceL){var t=this.curContext();t==m?this.context.push(d.b_expr):t==g?this.context.push(d.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else{if(this.type!==u.slash||e!==f.jsxTagStart)return super.updateContext(e);this.context.length-=2,this.context.push(h),this.exprAllowed=!1}}}}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(nj).tokTypes},configurable:!0,enumerable:!0})}(nB)),nB.exports));let nF="Keyword",nM="JSXText";function n$(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}n$.prototype={constructor:n$,translate(e,t){let n=e.type,r=this._acornTokTypes;if(n===r.name)e.type="Identifier","static"===e.value&&(e.type=nF),t.ecmaVersion>5&&("yield"===e.value||"let"===e.value)&&(e.type=nF);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=nM;else if(n.keyword)"true"===n.keyword||"false"===n.keyword?e.type="Boolean":"null"===n.keyword?e.type="Null":e.type=nF;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=nM):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=()=>{var e,t;let n,i,s;r.push((e=this._tokens,t=this._code,n=e[0],i=e.at(-1),s={type:"Template",value:t.slice(n.start,i.end)},n.loc&&(s.loc={start:n.loc.start,end:i.loc.end}),n.range&&(s.start=n.range[0],s.end=i.range[1],s.range=[s.start,s.end]),s)),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))}};let nV=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function nq(){return nV.at(-1)}let nY=Symbol("espree's internal state"),nX=Symbol("espree's esprimaFinishNode");var nJ=()=>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?nq():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),!nV.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 n$(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){var l;let p,c=(l=n,p={type:e?"Block":"#!"===l.slice(r,r+2)?"Hashbang":"Line",value:t},"number"==typeof r&&(p.start=r,p.end=i,p.range=[r,i]),"object"==typeof s&&(p.loc={start:s,end:a}),p);o.comments.push(c)}}},n),this[nY]=o}tokenize(){do this.next();while(this.type!==t.eof);this.next();let e=this[nY],n=e.tokens;return e.comments&&(n.comments=e.comments),n}finishNode(...e){let t=super.finishNode(...e);return this[nX](t)}finishNodeAt(...e){let t=super.finishNodeAt(...e);return this[nX](t)}parse(){let e=this[nY],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[nY].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[nY].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[nY].jsxAttrValueToken=!0),n}[nX](e){return"TemplateElement"===e.type&&this[nY].templateElements.push(e),e.type.includes("Function")&&!e.generator&&(e.generator=!1),e}}};let nU={_regular:null,_jsx:null,get regular(){return null===this._regular&&(this._regular=tX.extend(nJ())),this._regular},get jsx(){return null===this._jsx&&(this._jsx=tX.extend(nR(),nJ())),this._jsx},get(e){return e&&e.ecmaFeatures&&e.ecmaFeatures.jsx?this.jsx:this.regular}};function nW(e,t){let n=nU.get(t);return t&&!0===t.tokens||(t=Object.assign({},t,{tokens:!0})),new n(t,e).tokenize()}let nK,nH={};for(nK in"function"==typeof Object.create&&(nH=Object.create(null)),tr)Object.hasOwn(tr,nK)&&(nH[nK]=nK);"function"==typeof Object.freeze&&Object.freeze(nH);let nz=nq();var nG={},nQ=m?nG:(m=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 f(e){return null!=e&&"object"==typeof e&&"string"==typeof e.type}function d(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(d(l,y[h]))i=new c(x[g],[u,g],"Property",null);else{if(!f(x[g]))continue;i=new c(x[g],[u,g],null,null)}n.push(i)}}else if(f(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(d(l,y[h]))m=new c(x[g],[b,g],"Property",new p(x,g));else{if(!f(x[g]))continue;m=new c(x[g],[b,g],null,new p(x,g))}n.push(m)}}else f(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}(nG),nG);let nZ=new Set;function n0(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(!(A.env.TEST||nZ.has(r))&&(nZ.add(r),console.warn(`[@stylistic/eslint-plugin]: ${r}`)))}function n1(e,t,n,r=""){Array.isArray(t)||(t=[t]),t.forEach(t=>{e&&Object.hasOwn(e,t)&&n0(`option("${t.toString()}")`,n?`"${n.toString()}"`:void 0,r)})}var n2=B(tt());let n3=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,n6=new Set(["\r\n","\r","\n","\u2028","\u2029"]),n4=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),n5=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,n9=/^(?:[^\\]|\\.)*\\(?:[1-9]|0\d)/su,n8=["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","||=","&&=","??="],n7=["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"],re=[...n7,"arguments","as","async","await","eval","from","get","let","of","set","type","using","yield"].concat(["accessor","satisfies"]);function rt(){return RegExp(n2.LINEBREAK_MATCHER.source,"gu")}let rn=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u;function rr(e){for(let t=e;t;t=t.parent)if(rn.test(t.type))return t;return null}function ri(e){return"Literal"===e.type&&null===e.value&&!("regex"in e)&&!("bigint"in e)}function rs(e){switch(e.type){case"Literal":if(null!==e.value||ri(e))return String(e.value);if(rT(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 ra(e){let t;if(e)switch(e.type){case"ChainExpression":return ra(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?rs(t):t.name:null}function ro(e){return e&&"ChainExpression"===e.type?e.expression:e}function rl(e,t){let n=e.getTokenBefore(t),r=e.getTokenAfter(t);return!!n&&!!r&&(0,n2.isOpeningParenToken)(n)&&n.range[1]<=t.range[0]&&(0,n2.isClosingParenToken)(r)&&r.range[0]>=t.range[1]}function rp(e){return"="===e.value&&"Punctuator"===e.type}function rc(e){return"?"===e.value&&"Punctuator"===e.type}function ru(e){return e?.type==="Keyword"}function rf(e){return"Shebang"===e.type||"Hashbang"===e.type}function rd(e){return"LogicalExpression"===e.type&&("&&"===e.operator||"||"===e.operator)}function rm(e){return"LogicalExpression"===e.type&&"??"===e.operator}function rh(e,t){return rd(e)&&rm(t)||rm(e)&&rd(t)}function rg(e,t){return e.test?t.getTokenAfter(e.test,e=>(0,n2.isColonToken)(e)):t.getFirstToken(e,1)}function ry(e){if("ExpressionStatement"!==e.type)return!1;let t=e.parent;return"Program"===t.type||"BlockStatement"===t.type&&(0,n2.isFunction)(t.parent)}function rx(e){return"Literal"===e.type&&"string"==typeof e.value||"TemplateLiteral"===e.type}function rT(e){return"Literal"===e.type&&"regex"in e}function rS(e,t){return e[0]===t&&e[e.length-1]===t}function rb(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 tr)return 20;return -1}}function rE(e){return"Literal"===e.type&&"number"==typeof e.value&&n5.test(e.raw)}function rk(e){return"Numeric"===e.type&&n5.test(e.value)}function rv(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 rw(e){return"Literal"===e.type&&("number"==typeof e.value||!!("bigint"in e&&e.bigint))}function rA(e,t){let n,r,i={comment:!0,ecmaVersion:nz,range:!0};if("string"==typeof e){let t;try{t=nW(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(rf(n))return!1;if("string"==typeof t){let e;try{e=nW(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 rC(e){return n9.test(e)}let r_=/^\s*$/u;function rO(e){return"string"==typeof e&&r_.test(e)}function rP(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&&rO(i.at(-1)));return r}function rI(e,t){let n=rP(e,t);return!!n&&!(0,n2.isTokenOnSameLine)(n,t)}function rN(e){let t="attributes"in e&&e.attributes;return t&&0!==t.length?t[t.length-1]:e.name}function rL(e){return e.loc.start.line===e.loc.end.line}function rD(e,t,n,r=()=>!0){return null!==e.getFirstTokenBetween(t,n,{includeComments:!0,filter:e=>(0,n2.isCommentToken)(e)&&r(e)})}function rB(e,t,n){return e.getTokensBetween(t,n,{includeComments:!0,filter:n2.isCommentToken})}var rj=(e=>{let t={};for(var n in e)_(t,n,{get:e[n],enumerable:!0});return t})({ASSIGNMENT_OPERATOR:()=>n8,AST_NODE_TYPES:()=>tn.AST_NODE_TYPES,AST_TOKEN_TYPES:()=>tn.AST_TOKEN_TYPES,COMMENTS_IGNORE_PATTERN:()=>n3,DECIMAL_INTEGER_PATTERN:()=>n5,ES3_KEYWORDS:()=>n7,KEYWORDS:()=>re,LINEBREAKS:()=>n6,OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN:()=>n9,STATEMENT_LIST_PARENTS:()=>n4,WHITE_SPACES_PATTERN:()=>r_,canTokensBeAdjacent:()=>rA,createGlobalLinebreakMatcher:()=>rt,getCommentsBetween:()=>rB,getFirstNodeInLine:()=>rP,getNextLocation:()=>rv,getPrecedence:()=>rb,getStaticPropertyName:()=>ra,getStaticStringValue:()=>rs,getSwitchCaseColonToken:()=>rg,getTokenBeforeClosingBracket:()=>rN,getUpperFunction:()=>rr,hasCommentsBetween:()=>rD,hasOctalOrNonOctalDecimalEscapeSequence:()=>rC,isCoalesceExpression:()=>rm,isDecimalInteger:()=>rE,isDecimalIntegerNumericToken:()=>rk,isEqToken:()=>rp,isHashbangComment:()=>rf,isKeywordToken:()=>ru,isLogicalExpression:()=>rd,isMixedLogicalAndCoalesceExpressions:()=>rh,isNodeFirstInLine:()=>rI,isNullLiteral:()=>ri,isNumericLiteral:()=>rw,isParenthesised:()=>rl,isQuestionToken:()=>rc,isRegExpLiteral:()=>rT,isSingleLine:()=>rL,isStringLiteral:()=>rx,isSurroundedBy:()=>rS,isTopLevelExpressionStatement:()=>ry,isWhiteSpaces:()=>rO,skipChainExpression:()=>ro});function rR(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}function rF(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?rR(a)&&rR(o)?n[r]=rF(a,o):n[r]=o:i?n[r]=a:n[r]=o,n},{})}function rM({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(", "))}n0(`rule("${e}")`,t)}let s=Math.max(i.options.length,n.length);return t(i,Array.from({length:s},(e,t)=>rR(i.options[t])&&rR(n[t])?rF(n[t],i.options[t]):i.options[t]??n[t]))},defaultOptions:n,meta:{...r,docs:{...r.docs,url:`https://eslint.style/rules/${e}`}}}}D(rj,B(tt()),"default");let r$=/^[a-z]/;function rV(e){let t=rX(e);return r$.test(t)}function rq(e){return e&&["JSXElement","JSXFragment"].includes(e.type)}function rY(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 rX(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 rJ(t){return/^[\u0020-\u007F]*$/u.test(t)?t.length:[...(e??=new Intl.Segmenter).segment(t)].length}var rU=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=rr(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,"")}},rW=rM({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){var r;let i,s,a,o,l=n.elements,p=(i=!1,s=!1,a=0,(r=e.options[0])?"consistent"===r?(i=!0,a=1/0):"always"===r||"string"!=typeof r&&0===r.minItems?a=0:"never"===r?a=1/0:(s=!!r.multiline,a=r.minItems||1/0):(i=!1,s=!0,a=1/0),{ArrayExpression:o={consistent:i,multiline:s,minItems:a},ArrayPattern:o})[n.type],c=t.getFirstToken(n),u=t.getLastToken(n),f=t.getTokenAfter(c,{includeComments:!0}),d=t.getTokenBefore(u,{includeComments:!0}),m=t.getTokenAfter(c),h=t.getTokenBefore(u);l.length>=p.minItems||p.multiline&&l.length>0&&!(0,rj.isTokenOnSameLine)(d,f)||0===l.length&&"Block"===f.type&&!(0,rj.isTokenOnSameLine)(d,f)&&f===d||p.consistent&&!(0,rj.isTokenOnSameLine)(c,m)?((0,rj.isTokenOnSameLine)(c,m)&&e.report({node:n,loc:c.loc,messageId:"missingOpeningLinebreak",fix:e=>e.insertTextAfter(c,"\n")}),(0,rj.isTokenOnSameLine)(h,u)&&e.report({node:n,loc:u.loc,messageId:"missingClosingLinebreak",fix:e=>e.insertTextBefore(u,"\n")})):((0,rj.isTokenOnSameLine)(c,m)||e.report({node:n,loc:c.loc,messageId:"unexpectedOpeningLinebreak",fix(e){let n=t.getTokenAfter(c,{includeComments:!0});return!n||(0,rj.isCommentToken)(n)?null:e.removeRange([c.range[1],n.range[0]])}}),(0,rj.isTokenOnSameLine)(h,u)||e.report({node:n,loc:u.loc,messageId:"unexpectedClosingLinebreak",fix(e){let n=t.getTokenBefore(u,{includeComments:!0});return!n||(0,rj.isCommentToken)(n)?null:e.removeRange([n.range[1],u.range[0]])}}))}return{ArrayPattern:n,ArrayExpression:n}}}),rK=rM({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],f=c&&i.objectsInArraysException&&s(c)||c&&i.arraysInArraysException&&a(c)||i.singleElementException&&1===t.elements.length?!i.spaced:i.spaced,d=u&&i.objectsInArraysException&&s(u)||u&&i.arraysInArraysException&&a(u)||i.singleElementException&&1===t.elements.length?!i.spaced:i.spaced;if((0,rj.isTokenOnSameLine)(r,o)){let i;f&&!n.isSpaceBetween(r,o)&&e.report({node:t,loc:r.loc,messageId:"missingSpaceAfter",data:{tokenValue:r.value},fix:e=>e.insertTextAfter(r," ")}),!f&&n.isSpaceBetween(r,o)&&(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]])}))}if(r!==p&&(0,rj.isTokenOnSameLine)(p,l)){let r;d&&!n.isSpaceBetween(p,l)&&e.report({node:t,loc:l.loc,messageId:"missingSpaceBefore",data:{tokenValue:l.value},fix:e=>e.insertTextBefore(l," ")}),!d&&n.isSpaceBetween(p,l)&&(r=n.getTokenBefore(l),e.report({node:t,loc:{start:r.loc.end,end:l.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:l.value},fix:e=>e.removeRange([r.range[1],l.range[0]])}))}}return{ArrayPattern:o,ArrayExpression:o}}}),rH=rM({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&&!rL(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,rj.isCommaToken);!(0,rj.isTokenOnSameLine)(t.getTokenBefore(a),t.getTokenAfter(a))&&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,rj.isCommaToken),o=t.getTokenBefore(a),p=t.getTokenAfter(a);if(l){let n;(0,rj.isTokenOnSameLine)(o,p)&&(n=t.getTokenBefore(p,{includeComments:!0}),e.report({loc:{start:n.loc.end,end:p.loc.start},messageId:"missingLineBreak",fix:e=>e.replaceTextRange([n.range[1],p.range[0]],"\n")}))}else{let n;(0,rj.isTokenOnSameLine)(o,p)||(n=t.getTokenBefore(p,{includeComments:!0}),e.report({loc:{start:n.loc.end,end:p.loc.start},messageId:"unexpectedLineBreak",fix(e){if((0,rj.isCommentToken)(n))return null;if(!(0,rj.isTokenOnSameLine)(n,p))return e.replaceTextRange([n.range[1],p.range[0]]," ");let r=t.getTokenBefore(n,{includeComments:!0});return(0,rj.isCommentToken)(r)?null:e.replaceTextRange([r.range[1],n.range[0]],"")}}))}})}return{ArrayPattern:r,ArrayExpression:r}}}),rz=rM({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],rj.isClosingParenToken)}return{"ArrowFunctionExpression[params.length=1]":function(s){let a,o,l=!t||n&&"BlockStatement"===s.body.type,p=(a=r.getTokenBefore(s.params[0]))&&(0,rj.isOpeningParenToken)(a)&&s.range[0]<=a.range[0]?a:null,c=null!==p,[u]=s.params;l&&!c&&e.report({node:s,messageId:n?"expectedParensBlock":"expectedParens",loc:u.loc,*fix(e){yield e.insertTextBefore(u,"("),yield e.insertTextAfter(u,")")}}),l||!c||"Identifier"!==u.type||u.optional||u.typeAnnotation||s.returnType||r.commentsExistBetween(p,i(s))||(o=+!!s.async,r.getFirstToken(s,{skip:o})!==p)||e.report({node:s,messageId:n?"unexpectedParensInline":"unexpectedParens",loc:u.loc,*fix(e){let t=r.getTokenBefore(p),n=i(s);t&&t.range[1]===p.range[0]&&!rA(t,r.getFirstToken(u))&&(yield e.insertTextBefore(p," ")),yield e.removeRange([p.range[0],u.range[0]]),yield e.removeRange([u.range[1],n.range[1]])}})}}}}),rG=rM({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){let i,s=(i=n.getTokenBefore(r.body,rj.isArrowToken),{before:n.getTokenBefore(i),arrow:i,after:n.getTokenAfter(i)}),a={before:s.arrow.range[0]-s.before.range[1],after:s.after.range[0]-s.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]])})}}}}),rQ=rM({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,rj.isTokenOnSameLine)(e,t)||n.isSpaceBetween(e,t)===r}function a(t){let a=n.getFirstToken(t,{filter:e=>(0,rj.isOpeningBraceToken)(e)}),o=n.getLastToken(t),l=n.getTokenAfter(a,{includeComments:!0}),p=n.getTokenBefore(o,{includeComments:!0});if((0,rj.isOpeningBraceToken)(a)&&(0,rj.isClosingBraceToken)(o)&&l!==o&&(r||l.type!==tn.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}}}),rZ=rM({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,rj.isTokenOnSameLine)(t,n);i||(0,rj.isTokenOnSameLine)(o,t)||e.report({node:t,messageId:"nextLineOpen",fix:a(o,t)}),i&&(0,rj.isTokenOnSameLine)(o,t)&&!c&&e.report({node:t,messageId:"sameLineOpen",fix:e=>e.insertTextBefore(t,"\n")}),(0,rj.isTokenOnSameLine)(t,p)&&p!==n&&!c&&e.report({node:t,messageId:"blockSameLine",fix:e=>e.insertTextAfter(t,"\n")}),(0,rj.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,rj.isTokenOnSameLine)(t,r)||e.report({node:t,messageId:"nextLineClose",fix:a(t,r)}),"1tbs"!==n&&(0,rj.isTokenOnSameLine)(t,r)&&e.report({node:t,messageId:"sameLineClose",fix:e=>e.insertTextAfter(t,"\n")})}return{BlockStatement(e){n4.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))}}}});let r0=["always-multiline","always","never","only-multiline"];var r1=rM({name:"comma-dangle",meta:{type:"layout",docs:{description:"Require or disallow trailing commas"},schema:{$defs:{value:{type:"string",enum:r0},valueWithIgnore:{type:"string",enum:[...r0,"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,rj.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===tn.AST_NODE_TYPES.TSTypeParameterDeclaration&&1===t.node.params.length)return;let n=t.lastItem;if(!n)return;let s=l(t);s&&(0,rj.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:rv(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)})},TSTypeParameterInstantiation(e){a.never({node:e,lastItem:o(e.params)})},TSTupleType(e){a[n.tuples]({node:e,lastItem:o(e.elementTypes)})},TSDeclareFunction(e){a[n.functions]({node:e,lastItem:o(e.params)})},TSFunctionType(e){a[n.functions]({node:e,lastItem:o(e.params)})}}}}),r2=rM({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,rj.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,rj.isCommaToken)(r)&&a.add(r)}},ArrayExpression:o,ArrayPattern:o,"Program:exit":function(){s.forEach((t,o)=>{var l,p;if(!(0,rj.isCommaToken)(t))return;let c=s[o-1],u=s[o+1];l=(0,rj.isCommaToken)(c)||a.has(t)?null:c,p=u&&(0,rj.isCommaToken)(u)||a.has(t)?null:u,l&&(0,rj.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,rj.isTokenOnSameLine)(t,p)&&!(0,rj.isClosingParenToken)(p)&&!(0,rj.isClosingBracketToken)(p)&&!(0,rj.isClosingBraceToken)(p)&&!(!r&&p.type===tn.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]],"")})})}}}}),r3=rM({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.hasOwn(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(rj.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(rj.isCommaToken);let i=[],s=r[0],a=n.getTokenBefore(s);for(;a&&e.range[0]<=a.range[0];){if((0,rj.isCommaToken)(a))i.unshift(a);else if((0,rj.isNotOpeningParenToken)(a))break;a=n.getTokenBefore(a)}let o=null;for(let e of r){o&&i.push(...n.getTokensBetween(o,e).filter(rj.isCommaToken));let t=n.getLastToken(e);t&&(0,rj.isCommaToken)(t)&&i.push(t),o=e}let l=n.getTokenAfter(o);for(;l&&l.range[1]<=e.range[1];){if((0,rj.isCommaToken)(l))i.push(l);else if((0,rj.isNotClosingParenToken)(l))break;l=n.getTokenAfter(l)}return i})(r,s).forEach(r=>{let s=n.getTokenBefore(r),a=n.getTokenAfter(r);if(!((0,rj.isOpeningBracketToken)(s)||(0,rj.isCommaToken)(s)&&(0,rj.isOpeningBracketToken)(n.getTokenBefore(s,rj.isNotCommaToken)))&&(!(0,rj.isCommaToken)(a)||(0,rj.isTokenOnSameLine)(r,a)))if((0,rj.isTokenOnSameLine)(r,a)&&(0,rj.isTokenOnSameLine)(s,r));else if((0,rj.isTokenOnSameLine)(r,a)||(0,rj.isTokenOnSameLine)(s,r))"first"!==t||(0,rj.isTokenOnSameLine)(r,a)?"last"===t&&(0,rj.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,rj.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=f),r.ClassExpression||(a.ClassExpression=f),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=d),r.TSTypeLiteral||(a.TSTypeLiteral=d),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 f(e){e.implements&&s(e,e.implements)}function d(e){s(e,e.members)}function m(e){s(e,e.params)}}}),r6=rM({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,rj.isOpeningBracketToken),o=t.getTokenAfter(a,{includeComments:!0}),l=t.getTokenAfter(s,rj.isClosingBracketToken),p=t.getTokenBefore(l,{includeComments:!0});(0,rj.isTokenOnSameLine)(a,o)&&(n?!t.isSpaceBetween(a,o)&&(0,rj.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,rj.isTokenOnSameLine)(p,l)&&(n?!t.isSpaceBetween(p,l)&&(0,rj.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}});let r4={multiline:{type:"boolean"},minElements:{type:"integer",minimum:0},consistent:{type:"boolean"}},r5={oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:r4,additionalProperties:!1}]};var r9=((r=r9||{}).IfStatementConsequent="IfStatementConsequent",r.IfStatementAlternative="IfStatementAlternative",r.DoWhileStatement="DoWhileStatement",r.ForInStatement="ForInStatement",r.ForOfStatement="ForOfStatement",r.ForStatement="ForStatement",r.WhileStatement="WhileStatement",r.SwitchStatement="SwitchStatement",r.SwitchCase="SwitchCase",r.TryStatementBlock="TryStatementBlock",r.TryStatementHandler="TryStatementHandler",r.TryStatementFinalizer="TryStatementFinalizer",r.BlockStatement="BlockStatement",r.ArrowFunctionExpression="ArrowFunctionExpression",r.FunctionDeclaration="FunctionDeclaration",r.FunctionExpression="FunctionExpression",r.Property="Property",r.ClassBody="ClassBody",r.StaticBlock="StaticBlock",r.WithStatement="WithStatement",r.TSModuleBlock="TSModuleBlock",r);let r8={multiline:!1,minElements:1/0,consistent:!0},r7={multiline:!1,minElements:0,consistent:!1},ie={multiline:!1,minElements:1/0,consistent:!1};function it(e){return"always"===e?r7:"never"===e?ie:e?{consistent:!!e.consistent,minElements:e.minElements??1/0,multiline:!!e.multiline}:r8}var ir=rM({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(r9).map(([e])=>[e,r5])),...r4},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){var t;let n,r=e.sourceCode,i=(n=it(t=e.options[0]),Object.fromEntries(Object.entries(r9).map(([e])=>[e,"object"==typeof t&&null!=t&&e in t?it(t[e]):n])));function s(t,n){let s,a,o,l=i[n];switch(t.type){case"SwitchStatement":a=r.getLastToken(t),s=r.getTokenBefore(t.cases.length?t.cases[0]:a),o=t.cases.length;break;case"StaticBlock":s=r.getFirstToken(t,e=>"{"===e.value),a=r.getLastToken(t),o=t.body.length;break;default:s=r.getFirstToken(t),a=r.getLastToken(t),o=t.body.length}let p=r.getTokenAfter(s,{includeComments:!0}),c=r.getTokenBefore(a,{includeComments:!0}),u=o>=l.minElements||l.multiline&&o>0&&!(0,rj.isTokenOnSameLine)(c,p),f=(0,rj.isCommentToken)(p),d=(0,rj.isCommentToken)(c);if(p=r.getTokenAfter(s),c=r.getTokenBefore(a),u)(0,rj.isTokenOnSameLine)(s,p)&&e.report({messageId:"expectedLinebreakAfterOpeningBrace",node:t,loc:s.loc,fix:e=>f?null:e.insertTextAfter(s,"\n")}),(0,rj.isTokenOnSameLine)(c,a)&&e.report({messageId:"expectedLinebreakBeforeClosingBrace",node:t,loc:a.loc,fix:e=>d?null:e.insertTextBefore(a,"\n")});else{let n=l.consistent,r=!(0,rj.isTokenOnSameLine)(s,p),i=!(0,rj.isTokenOnSameLine)(c,a);(!n&&r||n&&r&&!i)&&e.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:t,loc:s.loc,fix:e=>f?null:e.removeRange([s.range[1],p.range[0]])}),(!n&&i||n&&!r&&i)&&e.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:t,loc:a.loc,fix:e=>d?null:e.removeRange([c.range[1],a.range[0]])})}}function a(e){s(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":s(e,t.type);break;case"FunctionExpression":"Property"===t.parent.type&&t.parent.method?s(e,"Property"):s(e,t.type);break;case"IfStatement":e===t.consequent&&s(e,"IfStatementConsequent"),e===t.alternate&&s(e,"IfStatementAlternative");break;case"TryStatement":e===t.block&&s(e,"TryStatementBlock"),e===t.finalizer&&s(e,"TryStatementFinalizer");break;case"CatchClause":s(e,"TryStatementHandler");break;default:"SwitchCase"===t.type&&1===t.consequent.length?s(e,"SwitchCase"):s(e,"BlockStatement")}},SwitchStatement:a,ClassBody:a,StaticBlock:a,TSModuleBlock:a}}}),ii=rM({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,rj.isTokenOnSameLine)(n,s)&&e.report({node:t,loc:s.loc,messageId:"expectedDotAfterObject",*fix(e){s.value.startsWith(".")&&rk(n)?yield e.insertTextAfter(n,` ${s.value}`):yield e.insertTextAfter(n,s.value),yield e.remove(s)}})}else s&&!(0,rj.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)}}}}),is=rM({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&&(n0('option("unix")','"always" and "@stylistic/eslint-plugin/rules/linebreak-style"',"eol-last"),o="always"),"windows"===o&&(n0('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")})}})}),ia=rM({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,rj.isTokenOnSameLine)(e,t),createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]]," ")},r={messageId:"missingLineBreak",check:(e,t)=>(0,rj.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";"never"===a?i(s,n):"always"===a?i(s,r):"consistent"===a&&((0,rj.isTokenOnSameLine)(t.getLastToken(s[0]),t.getFirstToken(s[1]))?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])}}}}),io=rM({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,rj.isOptionalCallExpression)(n),c=i.slice(o.range[1],l.range[0]).replace(/\/\*.*?\*\//gu,""),u=/\s/u.test(c),f=u&&rj.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),d=t?p:!p,m=i?u:!u,h=s||!f;d&&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(rj.LINEBREAK_MATCHER.source,"g");n=n.replaceAll(e," ")}return d||(n=t?` ${n}`:n.trimStart()),m||(n=i?`${n} `:n.trimEnd()),e.replaceTextRange([o.range[1],l.range[0]],n)}})}else u?!s&&f&&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,rj.isOpeningParenToken);i&&!(i.range[1]>=e.range[1])&&o(e,r.getTokenBefore(i,rj.isNotOptionalChainPunctuator),i)},ImportExpression(e){let t=r.getFirstToken(e);o(e,t,r.getTokenAfter(t))}}}}),il=rM({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,rj.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,rj.isOpeningParenToken)(t))};switch(e.type){case"NewExpression":if(!e.arguments.length&&!((0,rj.isOpeningParenToken)(n.getLastToken(e,{skip:1}))&&(0,rj.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());return{leftParen:r,rightParen:e.params.length?n.getTokenAfter(e.params[e.params.length-1],rj.isClosingParenToken):n.getTokenAfter(r)}}case"ArrowFunctionExpression":{let t=n.getFirstToken(e,{skip:+!!e.async});if(!(0,rj.isOpeningParenToken)(t))return null;return{leftParen:t,rightParen:e.params.length?n.getTokenAfter(e.params[e.params.length-1],rj.isClosingParenToken):n.getTokenAfter(t)}}case"ImportExpression":return{leftParen:n.getFirstToken(e,1),rightParen:n.getLastToken(e)};default:throw TypeError(`unexpected node with type ${e.type}`)}}(t);if(r="ImportExpression"===t.type?[t.source,...t.options?[t.options]:[]]:(0,rj.isFunction)(t)?t.params:t.arguments,i){let t,a,l,p,c,u,f;t=i.leftParen,a=i.rightParen,l=n.getTokenAfter(t),p=n.getTokenBefore(a),c=!(0,rj.isTokenOnSameLine)(t,l),u=!(0,rj.isTokenOnSameLine)(p,a),f=o(r,c),c&&!f?e.report({node:t,messageId:"unexpectedAfter",fix:e=>n.getText().slice(t.range[1],l.range[0]).trim()?null:e.removeRange([t.range[1],l.range[0]])}):!c&&f&&e.report({node:t,messageId:"expectedAfter",fix:e=>e.insertTextAfter(t,"\n")}),u&&!f?e.report({node:a,messageId:"unexpectedBefore",fix:e=>n.getText().slice(p.range[1],a.range[0]).trim()?null:e.removeRange([p.range[1],a.range[0]])}):!u&&f&&e.report({node:a,messageId:"expectedBefore",fix:e=>e.insertTextBefore(a,"\n")}),s&&function(t,r){let i=t.leftParen,s=o(r,!(0,rj.isTokenOnSameLine)(i,n.getTokenAfter(i)));for(let t=0;t<=r.length-2;t++){let n=r[t],i=r[t+1];(0,rj.isTokenOnSameLine)(n,i)&&s&&e.report({node:n,messageId:"expectedBetween",fix:e=>e.insertTextBefore(i,"\n")})}}(i,r)}}}}});let ip={oneOf:[{type:"string",enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]};var ic=rM({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:ip,anonymous:ip,method:ip,shorthand:ip},additionalProperties:!1}]}],defaultOptions:[{before:!0,after:!1}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e,[t]){let n={before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}};function r(e,t){return e?"string"==typeof e?n[e]:Object.assign({},t,e):t}let i=function(){let e=r(t,n.before),{named:i,anonymous:s,method:a,shorthand:o}=t;return{named:r(i,e),anonymous:r(s,e),method:r(a,e),shorthand:r(o??a,e)}}(),s=e.sourceCode;function a(e){return"*"===e.value&&"Punctuator"===e.type}function o(t,n,r,s){if(!!(s.range[0]-r.range[1])!==i[t][n]){let a="*"===r.value,o=i[t][n],l=a?r: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([r.range[1],s.range[0]])})}}function l(e){if(!e.generator)return;let t=s.getFirstToken("method"in e.parent&&e.parent.method||"MethodDefinition"===e.parent.type?e.parent:e,a),n=s.getTokenBefore(t),r=s.getTokenAfter(t),i="named";"Property"===e.parent.type&&e.parent.method?i="shorthand":"MethodDefinition"===e.parent.type?i="method":e.id||(i="anonymous"),("method"!==i&&"shorthand"!==i||t!==s.getFirstToken(e.parent))&&o(i,"before",n,t),o(i,"after",t,r)}return{FunctionDeclaration:l,FunctionExpression:l}}}),iu=rM({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,rj.isNotOpeningParenToken),s=t.getTokenAfter(i),a=(0,rj.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=>rD(t,i,s)?null:e.replaceTextRange([i.range[1],s.range[0]]," ")})})(r)}}}),id=rM({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 f=n.getTokenBefore(a),d=n.getTokenBefore(u);if(c.loc.start.line===d.loc.start.line)return;let m=(l=d.loc.start.line,n.tokensAndComments.find(e=>e.loc.start.line===l)),h=(p=d.loc.start.line,[...n.tokensAndComments].reverse().find(e=>e.loc.end.line===p)),g=ru(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(n8).includes(h?.value||"")||["[","(","{","=>",":"].concat(n8).includes(f?.value||"")&&m?.loc.start.line===f?.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}(d.loc.start.line)&&!["]",")","}"].includes(m?.value||""),x=s(d.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)})}}}});let im=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",tn.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",tn.AST_NODE_TYPES.TSAbstractKeyword,tn.AST_NODE_TYPES.TSAnyKeyword,tn.AST_NODE_TYPES.TSBooleanKeyword,tn.AST_NODE_TYPES.TSNeverKeyword,tn.AST_NODE_TYPES.TSNumberKeyword,tn.AST_NODE_TYPES.TSStringKeyword,tn.AST_NODE_TYPES.TSSymbolKeyword,tn.AST_NODE_TYPES.TSUndefinedKeyword,tn.AST_NODE_TYPES.TSUnknownKeyword,tn.AST_NODE_TYPES.TSVoidKeyword,tn.AST_NODE_TYPES.TSNullKeyword,tn.AST_NODE_TYPES.TSAbstractPropertyDefinition,tn.AST_NODE_TYPES.TSAbstractAccessorProperty,tn.AST_NODE_TYPES.TSAbstractMethodDefinition,tn.AST_NODE_TYPES.TSArrayType,tn.AST_NODE_TYPES.TSAsExpression,tn.AST_NODE_TYPES.TSCallSignatureDeclaration,tn.AST_NODE_TYPES.TSConditionalType,tn.AST_NODE_TYPES.TSConstructorType,tn.AST_NODE_TYPES.TSConstructSignatureDeclaration,tn.AST_NODE_TYPES.TSDeclareFunction,tn.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,tn.AST_NODE_TYPES.TSEnumDeclaration,tn.AST_NODE_TYPES.TSEnumBody,tn.AST_NODE_TYPES.TSEnumMember,tn.AST_NODE_TYPES.TSExportAssignment,tn.AST_NODE_TYPES.TSExternalModuleReference,tn.AST_NODE_TYPES.TSFunctionType,tn.AST_NODE_TYPES.TSImportType,tn.AST_NODE_TYPES.TSIndexedAccessType,tn.AST_NODE_TYPES.TSIndexSignature,tn.AST_NODE_TYPES.TSInferType,tn.AST_NODE_TYPES.TSInterfaceBody,tn.AST_NODE_TYPES.TSInterfaceDeclaration,tn.AST_NODE_TYPES.TSInterfaceHeritage,tn.AST_NODE_TYPES.TSImportEqualsDeclaration,tn.AST_NODE_TYPES.TSLiteralType,tn.AST_NODE_TYPES.TSMappedType,tn.AST_NODE_TYPES.TSMethodSignature,"TSMinusToken",tn.AST_NODE_TYPES.TSModuleBlock,tn.AST_NODE_TYPES.TSModuleDeclaration,tn.AST_NODE_TYPES.TSNonNullExpression,tn.AST_NODE_TYPES.TSParameterProperty,"TSPlusToken",tn.AST_NODE_TYPES.TSPropertySignature,tn.AST_NODE_TYPES.TSQualifiedName,"TSQuestionToken",tn.AST_NODE_TYPES.TSRestType,tn.AST_NODE_TYPES.TSThisType,tn.AST_NODE_TYPES.TSTupleType,tn.AST_NODE_TYPES.TSTypeAliasDeclaration,tn.AST_NODE_TYPES.TSTypeAnnotation,tn.AST_NODE_TYPES.TSTypeLiteral,tn.AST_NODE_TYPES.TSTypeOperator,tn.AST_NODE_TYPES.TSTypeParameter,tn.AST_NODE_TYPES.TSTypeParameterDeclaration,tn.AST_NODE_TYPES.TSTypeParameterInstantiation,tn.AST_NODE_TYPES.TSTypeReference,tn.AST_NODE_TYPES.Decorator]);var ih=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)}},ig=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])}},iy=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 ih(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}};let ix={oneOf:[{type:"integer",minimum:0},{type:"string",enum:["first","off"]}]};var iT=rM({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:[ix,{type:"object",properties:{var:ix,let:ix,const:ix,using:ix},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:ix,body:{type:"integer",minimum:0},returnType:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:ix,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:ix},additionalProperties:!1},ArrayExpression:ix,ObjectExpression:ix,ImportDeclaration:ix,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{oneOf:[{type:"boolean"},{type:"object",properties:{CallExpression:{type:"boolean"},AwaitExpression:{type:"boolean"},NewExpression:{type:"boolean"}},additionalProperties:!1}],default:!1},offsetTernaryExpressionsOffsetCallExpressions:{type:"boolean"},ignoredNodes:{type:"array",items:{type:"string",not:{type:"string",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){n1(e.options[1],"offsetTernaryExpressionsOffsetCallExpressions","offsetTernaryExpressions.CallExpression","indent");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 ig(s),o=new iy(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,rj.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,a=e[l-1],p=a&&i(a),c=a&&s.getLastToken(a);a&&c.loc.end.line-(null===(r=c.value.match(/\s*$/u)[0].match(rt()))?0:r.length)>t.loc.end.line&&o.setDesiredOffsets([a.range[1],n.range[1]],p,0)}})}function f(e){if("BlockStatement"!==e.type){let t=s.getTokenBefore(e,rj.isNotOpeningParenToken),n=s.getFirstToken(e),r=s.getLastToken(e);for(;(0,rj.isOpeningParenToken)(s.getTokenBefore(n))&&(0,rj.isClosingParenToken)(s.getTokenAfter(r));)n=s.getTokenBefore(n),r=s.getTokenAfter(r);o.setDesiredOffsets([n.range[0],r.range[1]],t,1)}}function d(e){let t;t=e.arguments.length?s.getTokenAfter(e.typeArguments??e.callee,rj.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,rj.isOptionalChainPunctuator),r=s.getTokensBetween(e.callee,n,{filter:rj.isClosingParenToken}).length,i=r?s.getTokenBefore(e.callee,{skip:r-1}):s.getFirstToken(e.callee),a=s.getTokenBefore(n),l=(0,rj.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===tn.AST_NODE_TYPES.TSTupleType?e.elementTypes:e.elements,n=s.getFirstToken(e);u(t,n,s.getTokenAfter([...t].reverse().find(e=>e)||n,rj.isClosingBracketToken),i.ArrayExpression)}function T(e,t){let n=s.getFirstToken(e,rj.isOpeningBraceToken);u(t,n,s.getTokenAfter(t.length?t[t.length-1]:n,rj.isClosingBraceToken),i.ObjectExpression)}function S(e,t,n,r){let a=s.getFirstToken(e);if(i.flatTernaryExpressions&&(0,rj.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))return;let l=!0===i.offsetTernaryExpressions?{CallExpression:i.offsetTernaryExpressionsOffsetCallExpressions??!0,AwaitExpression:i.offsetTernaryExpressionsOffsetCallExpressions??!0,NewExpression:!0}:i.offsetTernaryExpressions;function p(e,t){let n=1;if(l){let r=ro(e).type;("Punctuator"===t.type||l[r])&&(n=2)}o.setDesiredOffset(t,a,n)}let c=s.getFirstTokenBetween(t,n,rc),u=s.getFirstTokenBetween(n,r,rj.isColonToken),f=s.getTokenAfter(c),d=s.getTokenBefore(u),m=s.getTokenAfter(u);o.setDesiredOffset(c,a,1),o.setDesiredOffset(u,a,1),p(n,f),(0,rj.isTokenOnSameLine)(d,m)?o.setDesiredOffset(m,f,0):p(r,m)}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,rj.isNotClosingParenToken),l=s.getTokenAfter(a),p=s.getTokensBetween(t,n,{filter:rj.isClosingParenToken}).length,c=p?s.getTokenBefore(t,{skip:p-1}):s.getFirstToken(t),u=s.getTokenBefore(a),f=r?a:l;r&&(o.setDesiredOffset(s.getLastToken(e),a,0),o.setDesiredOffsets(n.range,a,1));let d=(0,rj.isTokenOnSameLine)(u,f)?u:c;"number"==typeof i.MemberExpression?(o.setDesiredOffset(a,d,i.MemberExpression),o.setDesiredOffset(l,r?a:d,i.MemberExpression)):(o.ignoreToken(a),o.ignoreToken(l),o.setDesiredOffset(a,d,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,n4.has(e.parent.type)||o.setDesiredOffset(s.getFirstToken(e),s.getFirstToken(e.parent),0),u(e.type===tn.AST_NODE_TYPES.TSEnumBody?e.members:e.body,s.getFirstToken(e),s.getLastToken(e),t)}function v(e,t){let n=s.getFirstToken(e),r=s.getTokenBefore(t[0],rj.isNotOpeningParenToken);o.setDesiredOffsets([r.range[0],e.body.range[0]],n,1)}function w(e){let t,n=s.getFirstToken(e),r=s.getLastToken(e);if(e.computed){let r=s.getTokenBefore(e.key,rj.isOpeningBracketToken),i=t=s.getTokenAfter(e.key,rj.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,rp);y(t),(0,rj.isSemicolonToken)(r)&&o.setDesiredOffset(r,t,1)}else(0,rj.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,rj.isOpeningParenToken)(t)){let n=s.getTokenBefore(e.returnType??e.body,{filter:rj.isClosingParenToken});l.add(t),l.add(n),u(e.params,t,n,i.FunctionExpression.parameters)}f(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,rp))},BinaryExpression(e){b(e.left,e.right,e.operator)},LogicalExpression(e){b(e.left,e.right,e.operator)},BlockStatement:k,ClassBody:k,CallExpression:d,ClassDeclaration(e){e.superClass&&v(e,[e.superClass])},ClassExpression(e){e.superClass&&v(e,[e.superClass])},ConditionalExpression(e){S(e,e.test,e.consequent,e.alternate)},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":function(e){f(e.body)},ExportNamedDeclaration(e){if(null===e.declaration){let t=e.source?s.getTokenBefore(e.source,rj.isClosingBraceToken):s.getLastToken(e,rj.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,rj.isNotSemicolonToken);o.setDesiredOffsets([n.range[0],r.range[1]],s.getFirstToken(e),1);let i=s.getLastToken(e,rj.isClosingBraceToken);if(i&&e.source.range[1]<i.range[0]){let t=s.getTokenAfter(e.source,rj.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,rj.isNotSemicolonToken);o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1);let r=s.getLastToken(e,rj.isClosingBraceToken);if(r&&e.source.range[1]<r.range[0]){let t=s.getTokenAfter(e.source,rj.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),f(e.body)},"FunctionDeclaration, FunctionExpression":function(e){let t=s.getTokenBefore(e.returnType??e.body,{filter:rj.isClosingParenToken}),n=s.getTokenBefore(e.params.length?e.params[0].decorators?.[0]??e.params[0]:t,{filter:rj.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){f(e.consequent),e.alternate&&f(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,rj.isSemicolonToken)(t)){let n=s.getTokenBefore(t),r=s.getTokenAfter(t);!(0,rj.isTokenOnSameLine)(n,t)&&r&&(0,rj.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,rj.isOpeningBraceToken),n=s.getTokenBefore(e.source,rj.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,rj.isNotSemicolonToken);t&&o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1);let r=s.getLastToken(e,rj.isClosingBraceToken);if(r&&e.source.range[1]<r.range[0]){let i=s.getTokenAfter(e.source,rj.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,rj.isClosingParenToken)(s.getLastToken(e))&&(0,rj.isOpeningParenToken)(s.getLastToken(e,1)))&&d(e)},Property(e){if(!e.shorthand&&!e.method&&"init"===e.kind){let t=s.getFirstTokenBetween(e.key,e.value,rj.isColonToken);o.ignoreToken(s.getTokenAfter(t))}},PropertyDefinition:w,AccessorProperty:w,TSAbstractPropertyDefinition:w,TSAbstractAccessorProperty:w,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,rj.isOpeningBraceToken),n=s.getLastToken(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,i.SwitchCase),e.cases.length&&rB(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=rL(l)?s.getFirstToken(l):null,u=(0,rj.isTokenOnSameLine)(l,t),f=(0,rj.isTokenOnSameLine)(t,p);if(c||f&&!u){o.setDesiredOffsets([l.range[1],p.range[0]],c,1),o.setDesiredOffset(s.getFirstToken(p),c,0);return}let d=s.text.slice(l.range[1]-l.loc.end.column,l.range[1]-2).split(""),m=d.findIndex(e=>" "!==e&&" "!==e);-1===m&&(m=d.length);let h=d.slice(0,m).filter(e=>" "===e).length,g=m-h+Math.ceil(h/("tab"===n?i.tabLength:r)),y=f?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.hasOwn(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,rj.isSemicolonToken)(c)&&o.ignoreToken(c)},VariableDeclarator(e){e.init&&y(s.getTokenBefore(e.init,rj.isNotOpeningParenToken));let t=s.getLastToken(e);(0,rj.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,rp))},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,rj.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,rj.isNotOpeningParenToken));let t=s.getLastToken(e);(0,rj.isSemicolonToken)(t)&&o.ignoreToken(t)},TSTupleType:x,TSEnumBody:k,TSEnumMember(e){e.initializer&&y(s.getTokenBefore(e.initializer,rp))},TSTypeLiteral(e){T(e,e.members)},TSMappedType(e){let t=s.getTokenBefore(e.constraint||e.typeParameter);T(e,[{parent:e,type:tn.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}])},TSAsExpression(e){b(e.expression,e.typeAnnotation,"as")},TSConditionalType(e){S(e,{parent:e,type:tn.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,rp));let t=s.getLastToken(e);(0,rj.isSemicolonToken)(t)&&o.ignoreToken(t)},TSIndexedAccessType(e){E(e,e.objectType,e.indexType,!0)},TSInterfaceBody:k,TSInterfaceDeclaration(e){0!==e.extends.length&&v(e,e.extends)},TSQualifiedName(e){E(e,e.left,e.right)},TSTypeParameter(e){e.default&&y(s.getTokenBefore(e.default,rp))},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){im.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,rj.isOpeningParenToken)(i)?t.push(i):(0,rj.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,rj.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,rj.isSemicolonToken)(n)&&!(0,rj.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))}}}}}});let iS=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 ib=rM({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&&iS.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}}}),iE=rM({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,l,p,c,u,f,d,m,h,g=n.attributes.at(-1),y=g?g.range[1]:null,x=(p=(l=e.sourceCode).getFirstToken(n).loc.start,c=l.getLastTokens(n,n.selfClosing?2:1)[0].loc.start,u=l.getFirstToken(n.name).loc.start,n.attributes.length&&(o=n.attributes[n.attributes.length-1],o={column:l.getFirstToken(o).loc.start.column,firstLine:l.getFirstToken(o).loc.start.line,lastLine:l.getLastToken(o).loc.end.line}),f=l.lines[p.line-1],d=l.lines[c.line-1],m={openTab:/^\t/.test(f),closeTab:/^\t/.test(d)},h={column:/^\s*/.exec(f)?.[0].length,line:p.line},{isTab:m,tag:u,opening:p,closing:c,lastProp:o,selfClosing:n.selfClosing,openingStartOfLine:h}),T=void 0===x.lastProp?"after-tag":x.opening.line===x.lastProp.lastLine?"after-props":x.selfClosing?i.selfClosing:i.nonEmpty,S=!0;"tag-aligned"===T&&(S=x.isTab.openTab===x.isTab.closeTab);let b=e.sourceCode.getCommentsInside(n).at(-1),E=b&&b.range[0]>(g??n.name).range[1];if(("after-props"===T||"after-tag"===T)&&!(a(x,T)&&S)&&E&&(T="line-aligned"),a(x,T)&&S)return;let k={location:t[T],details:""},v=s(x,T);null!==v&&(r=x.lastProp&&x.lastProp.lastLine===x.closing.line,k.details=` (expected column ${v+1}${r?" on the next line)":")"}`),e.report({node:n,messageId:"bracketLocation",loc:x.closing,data:k,fix(t){let i=x.selfClosing?"/>":">";switch(T){case"after-tag":if(y)return t.replaceTextRange([y,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([y,n.range[1]],(r?"\n":"")+i);case"props-aligned":case"tag-aligned":case"line-aligned":{let r=E?b.range[1]:y;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(" ")}(x,T,v)}${i}`)}}return null}})}}}});let ik="tag-aligned",iv={"tag-aligned":"matchIndent","line-aligned":"alignWithOpening"};var iw=rM({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:ik}]}]},defaultOptions:[ik],create(e){let t=e.options[0]||ik;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=rI(e,n)?iv[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 rI(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}}});let iA="always",iC="never",i_="ignore",iO=[iA,iC,i_],iP={props:iC,children:iC,propElementValues:i_};var iI=rM({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:iO},children:{type:"string",enum:iO},propElementValues:{type:"string",enum:iO}},additionalProperties:!1},{type:"string",enum:iO}]}]},create(e){let t=e.options[0],n="string"==typeof t?{props:t,children:t,propElementValues:i_}:Object.assign({},iP,t);function r(e){return rj.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&&rO(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=rq(i)?e.sourceCode.getText(i):"JSXAttribute"===t.parent.type?`"${"TemplateLiteral"===i.type?i.quasis[0].value.raw:i.raw.slice(1,-1)}"`:rq(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&&rO(e.value)}function f(e){return/^\s|\s$/.test(e)}function d(e,t,n){return"JSXAttribute"===e.type&&"string"==typeof t.props&&t.props===n||rq(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===iC&&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||rq(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))&&d(i,t,iC)})(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&&f(n.value)))&&(s=n.value,!/\/\*/.test(s))&&!o(n.raw,t)&&(rq(t.parent)||!a(n.value)))?"TemplateLiteral"!==r||0!==n.expressions.length||n.quasis[0].value.raw.includes("\n")||f(n.quasis[0].value.raw)||o(n.quasis[0].value.raw,t)||a(n.quasis[0].value.cooked)?rq(n)&&c(t):c(t):c(t)}}(t)},"JSXAttribute > JSXElement, Literal, JSXText":function(t){(function(e,t){if(rq(e))return t.propElementValues!==i_;if(p(e.raw)||s(e.raw))return!1;let n=e.parent;return!(n.children&&1===n.children.length&&l(n.children[0]))&&d(n,t,iA)})(t,n)&&e.report({messageId:"missingCurly",node:t,fix(n){var a;if(rq(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);if(i(e)){let e,t;return`${n}${e="<HTML_ENTITY>",t=r.split(/&[A-Z\d#]+;/gi).map(e=>""===e?"":`{${JSON.stringify(e)}}`).join(e),r.match(/&[A-Z\d#]+;/gi).reduce((t,n)=>t.replace(e,n),t)}`}return`${n}{${JSON.stringify(r)}}`}).join("\n"):`{${JSON.stringify(a)}}`;return n.replaceText(t,o)}})}}}}),iN=rM({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,n=e.sourceCode,r="consistent"===(t=e.options[0]||"consistent")?{multiline:"consistent",singleline:"consistent"}:"never"===t?{multiline:"forbid",singleline:"forbid"}:{multiline:t.multiline||"consistent",singleline:t.singleline||"consistent"};return{JSXExpressionContainer(t){var i,s;let a,o,l,p,c,u,f;i={leftCurly:n.getFirstToken(t),rightCurly:n.getLastToken(t)},s=t.expression,a=i.leftCurly,o=i.rightCurly,l=n.getTokenAfter(a),p=n.getTokenBefore(o),c=!(0,rj.isTokenOnSameLine)(a,l),u=!(0,rj.isTokenOnSameLine)(p,o),f=function(e,t){switch(!rL(e)?r.multiline:r.singleline){case"forbid":return!1;case"require":return!0;default:return t}}(s,c),c&&!f?e.report({node:a,messageId:"unexpectedAfter",fix:e=>n.getText().slice(a.range[1],l?.range[0]).trim()?null:e.removeRange([a.range[1],l.range[0]])}):!c&&f&&e.report({node:a,messageId:"expectedAfter",fix:e=>e.insertTextAfter(a,"\n")}),u&&!f?e.report({node:o,messageId:"unexpectedBefore",fix:e=>n.getText().slice(p.range[1],o.range[0]).trim()?null:e.removeRange([p.range[1],o.range[0]])}):!u&&f&&e.report({node:o,messageId:"expectedBefore",fix:e=>e.insertTextBefore(o,"\n")})}}}});let iL="always",iD="never",iB=[iL,iD],ij={type:"object",properties:{when:{type:"string",enum:iB},allowMultiline:{type:"boolean"},spacing:{type:"object",properties:{objectLiterals:{type:"string",enum:iB}},additionalProperties:!1}},additionalProperties:!1},iR={anyOf:[ij,{type:"boolean"}]};var iF=rM({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:{...ij.properties,attributes:iR,children:iR}},{type:"string",enum:iB}]},{type:"object",properties:{allowMultiline:{type:"boolean"},spacing:{type:"object",properties:{objectLiterals:{type:"string",enum:iB}},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]||{};iB.includes(n)&&(n=Object.assign({when:e.options[0]},e.options[1]));let r=t(n,{when:iD,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===iL&&("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}),f=r.getTokenBefore(a,{includeComments:!0});if(!u){u=r.getTokenAfter(i);let e=r.getCommentsBefore(u);u=e?e[0]:u}if(!f){f=r.getTokenBefore(a);let e=r.getCommentsAfter(f);f=e?e[e.length-1]:f}let d=i.value===u.value?n.objectLiteralSpaces:n.when;d===iL?(r.isSpaceBetween(i,u)?n.allowMultiline||(0,rj.isTokenOnSameLine)(i,u)||p(t,i,d):e.report({node:t,loc:i.loc.start,messageId:"spaceNeededAfter",data:{token:i.value},fix:e=>e.insertTextAfter(i," ")}),r.isSpaceBetween(f,a)?n.allowMultiline||(0,rj.isTokenOnSameLine)(f,a)||c(t,a,d):e.report({node:t,loc:a.loc.start,messageId:"spaceNeededBefore",data:{token:a.value},fix:e=>e.insertTextBefore(a," ")})):d===iD&&((0,rj.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,d),(0,rj.isTokenOnSameLine)(f,a)?r.isSpaceBetween(f,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,d))}return{JSXExpressionContainer:u,JSXSpreadAttribute:u}}}),iM=rM({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," ")}))})}}}}),i$=rM({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&&!rL(n)||"multiline-multiprop"===t&&!rL(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&&!rL(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]]," ")})}}}}}),iV=rM({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||!rq(n))return;let r=e.sourceCode;if("always"===t||!rL(n)){let t,i,s=!!(0,rj.isTokenOnSameLine)(e.sourceCode.getTokenBefore(n),n),a=(t=e.sourceCode.getTokenAfter(n),(!(i=e.sourceCode.getTokenAfter(n))||","!==i.value||!(i.range[0]>=n.range[1]))&&n.loc.end.line===t.loc.end.line);(s||a)&&e.report({node:n,messageId:"missingLineBreak",fix:e=>{let t=r.getText(n);return s&&(t=`
1
+ "use strict";let e,t,n,r,i;require("node:module");var s,a,o,l,p,c,u,f,d,m,h,g,y,x,T,S,b,E,k,v,w,A,C,_=require("node:process"),O=Object.create,P=Object.defineProperty,I=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,L=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,D=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),j=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,s=N(t),a=0,o=s.length;a<o;a++)i=s[a],B.call(e,i)||i===n||P(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=I(t,i))||r.enumerable});return e};function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F(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}let M={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"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],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"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],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(let e of Object.keys(M))Object.freeze(M[e]);Object.freeze(M);let $=new Set(["parent","leadingComments","trailingComments"]);function V(e){return!$.has(e)&&"_"!==e[0]}function q(e,t){let n=t.range[0],r=e,i=!1;do for(let e of(i=!1,r.childScopes)){let t=e.block.range;if(t[0]<=n&&n<t[1]){r=e,i=!0;break}}while(i);return r}function Y(e,t){let n="",r=e;for("string"==typeof t?n=t:(n=t.name,r=q(r,t));null!=r;){let e=r.set.get(n);if(null!=e)return e;r=r.upper}return null}function X(e){return t=>!e(t)}function J(e,t){return"Punctuator"===e.type&&e.value===t}function U(e){return J(e,"=>")}function W(e){return J(e,",")}function K(e){return J(e,";")}function H(e){return J(e,":")}function z(e){return J(e,"(")}function G(e){return J(e,")")}function Q(e){return J(e,"[")}function Z(e){return J(e,"]")}function ee(e){return J(e,"{")}function et(e){return J(e,"}")}function en(e){return["Block","Line","Shebang"].includes(e.type)}let er=X(U),ei=X(W),es=X(K),ea=X(H),eo=X(z),el=X(G),ep=X(Q),ec=X(Z),eu=X(ee),ef=X(et),ed=X(en);function em(e,t){let n=e.parent,r=null,i=null;if("ArrowFunctionExpression"===e.type){let n=t.getTokenBefore(e.body,U);r=n.loc.start,i=n.loc.end}else{var s,a;r="Property"===n.type||"MethodDefinition"===n.type||"PropertyDefinition"===n.type?n.loc.start:e.loc.start,i=(s=e,a=t,s.id?a.getTokenAfter(s.id,z):a.getFirstToken(s,z)).loc.start}return{start:{...r},end:{...i}}}let eh="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},eg=Object.freeze(new Set(["Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","isFinite","isNaN","isPrototypeOf","JSON","Map","Math","NaN","Number","Object","parseFloat","parseInt","Promise","Proxy","Reflect","RegExp","Set","String","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","WeakMap","WeakSet"])),ey=new Set([Array.isArray,Array.of,Array.prototype.at,Array.prototype.concat,Array.prototype.entries,Array.prototype.every,Array.prototype.filter,Array.prototype.find,Array.prototype.findIndex,Array.prototype.flat,Array.prototype.includes,Array.prototype.indexOf,Array.prototype.join,Array.prototype.keys,Array.prototype.lastIndexOf,Array.prototype.slice,Array.prototype.some,Array.prototype.toString,Array.prototype.values,"function"==typeof BigInt?BigInt:void 0,Boolean,Date,Date.parse,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,isFinite,isNaN,isPrototypeOf,Map,Map.prototype.entries,Map.prototype.get,Map.prototype.has,Map.prototype.keys,Map.prototype.values,...Object.getOwnPropertyNames(Math).filter(e=>"random"!==e).map(e=>Math[e]).filter(e=>"function"==typeof e),Number,Number.isFinite,Number.isNaN,Number.parseFloat,Number.parseInt,Number.prototype.toExponential,Number.prototype.toFixed,Number.prototype.toPrecision,Number.prototype.toString,Object,Object.entries,Object.is,Object.isExtensible,Object.isFrozen,Object.isSealed,Object.keys,Object.values,parseFloat,parseInt,RegExp,Set,Set.prototype.entries,Set.prototype.has,Set.prototype.keys,Set.prototype.values,String,String.fromCharCode,String.fromCodePoint,String.raw,String.prototype.at,String.prototype.charAt,String.prototype.charCodeAt,String.prototype.codePointAt,String.prototype.concat,String.prototype.endsWith,String.prototype.includes,String.prototype.indexOf,String.prototype.lastIndexOf,String.prototype.normalize,String.prototype.padEnd,String.prototype.padStart,String.prototype.slice,String.prototype.startsWith,String.prototype.substr,String.prototype.substring,String.prototype.toLowerCase,String.prototype.toString,String.prototype.toUpperCase,String.prototype.trim,String.prototype.trimEnd,String.prototype.trimLeft,String.prototype.trimRight,String.prototype.trimStart,Symbol.for,Symbol.keyFor,unescape].filter(e=>"function"==typeof e)),ex=new Set([Object.freeze,Object.preventExtensions,Object.seal]),eT=[[Map,new Set(["size"])],[RegExp,new Set(["dotAll","flags","global","hasIndices","ignoreCase","multiline","source","sticky","unicode"])],[Set,new Set(["size"])]];function eS(e,t){let n=[];for(let r=0;r<e.length;++r){let i=e[r];if(null==i)n.length=r+1;else if("SpreadElement"===i.type){let e=eE(i.argument,t);if(null==e)return null;n.push(...e.value)}else{let e=eE(i,t);if(null==e)return null;n.push(e.value)}}return n}let eb=Object.freeze({ArrayExpression(e,t){let n=eS(e.elements,t);return null!=n?{value:n}:null},AssignmentExpression:(e,t)=>"="===e.operator?eE(e.right,t):null,BinaryExpression(e,t){if("in"===e.operator||"instanceof"===e.operator)return null;let n=eE(e.left,t),r=eE(e.right,t);if(null!=n&&null!=r)switch(e.operator){case"==":return{value:n.value==r.value};case"!=":return{value:n.value!=r.value};case"===":return{value:n.value===r.value};case"!==":return{value:n.value!==r.value};case"<":return{value:n.value<r.value};case"<=":return{value:n.value<=r.value};case">":return{value:n.value>r.value};case">=":return{value:n.value>=r.value};case"<<":return{value:n.value<<r.value};case">>":return{value:n.value>>r.value};case">>>":return{value:n.value>>>r.value};case"+":return{value:n.value+r.value};case"-":return{value:n.value-r.value};case"*":return{value:n.value*r.value};case"/":return{value:n.value/r.value};case"%":return{value:n.value%r.value};case"**":return{value:n.value**r.value};case"|":return{value:n.value|r.value};case"^":return{value:n.value^r.value};case"&":return{value:n.value&r.value}}return null},CallExpression(e,t){let n=e.callee,r=eS(e.arguments,t);if(null!=r)if("MemberExpression"===n.type){if("PrivateIdentifier"===n.property.type)return null;let i=eE(n.object,t);if(null!=i){if(null==i.value&&(i.optional||e.optional))return{value:void 0,optional:!0};let s=ek(n,t);if(null!=s){let e=i.value,t=s.value;if(ey.has(e[t]))return{value:e[t](...r)};if(ex.has(e[t]))return{value:r[0]}}}}else{let i=eE(n,t);if(null!=i){if(null==i.value&&e.optional)return{value:void 0,optional:!0};let t=i.value;if(ey.has(t))return{value:t(...r)};if(ex.has(t))return{value:r[0]}}}return null},ConditionalExpression(e,t){let n=eE(e.test,t);return null!=n?n.value?eE(e.consequent,t):eE(e.alternate,t):null},ExpressionStatement:(e,t)=>eE(e.expression,t),Identifier(e,t){if(null!=t){let n=Y(t,e);if(null!=n){if(null!=n&&0===n.defs.length&&eg.has(n.name)&&n.name in eh)return{value:eh[n.name]};if(function(e){let t,n,r;if(1!==e.defs.length)return!1;let i=e.defs[0];return!!(i.parent&&"Variable"===i.type&&("const"===i.parent.kind||(n=(t=e.references).filter(e=>e.init).length,r=t.filter(e=>e.isReadOnly()).length,1===n&&r+n===t.length)))}(n)){let e=n.defs[0];if("Identifier"===e.node.id.type){let r=eE(e.node.init,t);return r&&"object"==typeof r.value&&null!==r.value&&function(e,t){for(let n of e.references){let e=n.identifier;for(;e&&e.parent&&"MemberExpression"===e.parent.type;)e=e.parent;if(e&&e.parent&&("AssignmentExpression"===e.parent.type&&e.parent.left===e||"UpdateExpression"===e.parent.type&&e.parent.argument===e||"CallExpression"===e.parent.type&&e.parent.callee===e&&"MemberExpression"===e.type&&function(e){if(null==e||null==e.value)return!1;let t=e.value;return"copyWithin"===t||"fill"===t||"pop"===t||"push"===t||"reverse"===t||"shift"===t||"sort"===t||"splice"===t||"unshift"===t}(ek(e,t))))return!0}return!1}(n,t)?null:r}}}}return null},Literal:e=>(null!=e.regex||null!=e.bigint)&&null==e.value?null:{value:e.value},LogicalExpression(e,t){let n=eE(e.left,t);if(null!=n){if("||"===e.operator&&!0==!!n.value||"&&"===e.operator&&!1==!!n.value||"??"===e.operator&&null!=n.value)return n;let r=eE(e.right,t);if(null!=r)return r}return null},MemberExpression(e,t){if("PrivateIdentifier"===e.property.type)return null;let n=eE(e.object,t);if(null!=n){if(null==n.value&&(n.optional||e.optional))return{value:void 0,optional:!0};let r=ek(e,t);if(null!=r){let e;if(null==(e=function(e,t){let n=e;for(;("object"==typeof n||"function"==typeof n)&&null!==n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}return null}(n.value,r.value))||null==e.get)return{value:n.value[r.value]};for(let[e,t]of eT)if(n.value instanceof e&&t.has(r.value))return{value:n.value[r.value]}}}return null},ChainExpression(e,t){let n=eE(e.expression,t);return null!=n?{value:n.value}:null},NewExpression(e,t){let n=eE(e.callee,t),r=eS(e.arguments,t);if(null!=n&&null!=r){let e=n.value;if(ey.has(e))return{value:new e(...r)}}return null},ObjectExpression(e,t){let n={};for(let r of e.properties)if("Property"===r.type){if("init"!==r.kind)return null;let e=ek(r,t),i=eE(r.value,t);if(null==e||null==i)return null;n[e.value]=i.value}else{if("SpreadElement"!==r.type&&"ExperimentalSpreadProperty"!==r.type)return null;let e=eE(r.argument,t);if(null==e)return null;Object.assign(n,e.value)}return{value:n}},SequenceExpression:(e,t)=>eE(e.expressions[e.expressions.length-1],t),TaggedTemplateExpression(e,t){let n=eE(e.tag,t),r=eS(e.quasi.expressions,t);if(null!=n&&null!=r){let t=n.value,i=e.quasi.quasis.map(e=>e.value.cooked);if(i.raw=e.quasi.quasis.map(e=>e.value.raw),t===String.raw)return{value:t(i,...r)}}return null},TemplateLiteral(e,t){let n=eS(e.expressions,t);if(null!=n){let t=e.quasis[0].value.cooked;for(let r=0;r<n.length;++r)t+=n[r],t+=e.quasis[r+1].value.cooked;return{value:t}}return null},UnaryExpression(e,t){if("delete"===e.operator)return null;if("void"===e.operator)return{value:void 0};let n=eE(e.argument,t);if(null!=n)switch(e.operator){case"-":return{value:-n.value};case"+":return{value:+n.value};case"!":return{value:!n.value};case"~":return{value:~n.value};case"typeof":return{value:typeof n.value}}return null},TSAsExpression:(e,t)=>eE(e.expression,t),TSSatisfiesExpression:(e,t)=>eE(e.expression,t),TSTypeAssertion:(e,t)=>eE(e.expression,t),TSNonNullExpression:(e,t)=>eE(e.expression,t),TSInstantiationExpression:(e,t)=>eE(e.expression,t)});function eE(e,t){return null!=e&&Object.hasOwnProperty.call(eb,e.type)?eb[e.type](e,t):null}function ek(e,t){let n="Property"===e.type?e.key:e.property;return e.computed?eE(n,t):"Identifier"===n.type?{value:n.name}:"Literal"===n.type?n.bigint?{value:n.bigint}:{value:String(n.value)}:null}function ev(e,t=null){try{return eE(e,t)}catch(e){return null}}function ew(e,t=null){if(e&&"Literal"===e.type&&null===e.value){if(e.regex)return`/${e.regex.pattern}/${e.regex.flags}`;if(e.bigint)return e.bigint}let n=ev(e,t);if(n)try{return String(n.value)}catch{}return null}function eA(e,t){switch(e.type){case"MemberExpression":if(e.computed)return ew(e.property,t);if("PrivateIdentifier"===e.property.type)break;return e.property.name;case"Property":case"MethodDefinition":case"PropertyDefinition":if(e.computed)return ew(e.key,t);if("Literal"===e.key.type)return String(e.key.value);if("PrivateIdentifier"===e.key.type)break;return e.key.name}return null}function eC(e,t){let n=e.parent,r=[],i="Property"===n.type&&n.value===e,s="MethodDefinition"===n.type&&n.value===e,a="PropertyDefinition"===n.type&&n.value===e;if((s||a)&&(n.static&&r.push("static"),"PrivateIdentifier"===n.key.type&&r.push("private")),e.async&&r.push("async"),e.generator&&r.push("generator"),i||s){if("constructor"===n.kind)return"constructor";"get"===n.kind?r.push("getter"):"set"===n.kind?r.push("setter"):r.push("method")}else a?r.push("method"):("ArrowFunctionExpression"===e.type&&r.push("arrow"),r.push("function"));if(i||s||a)if("PrivateIdentifier"===n.key.type)r.push(`#${n.key.name}`);else{let e=eA(n);if(e)r.push(`'${e}'`);else if(t){let e=t.getText(n.key);e.includes("\n")||r.push(`[${e}]`)}}else e.id?r.push(`'${e.id.name}'`):"VariableDeclarator"===n.type&&n.id&&"Identifier"===n.id.type?r.push(`'${n.id.name}'`):("AssignmentExpression"===n.type||"AssignmentPattern"===n.type)&&n.left&&"Identifier"===n.left.type?r.push(`'${n.left.name}'`):"ExportDefaultDeclaration"===n.type&&n.declaration===e&&r.push("'default'");return r.join(" ")}let e_=Object.freeze(new Set(["==","!=","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","in"])),eO=Object.freeze(new Set(["-","+","!","~"]));function eP(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type}let eI=Object.freeze(Object.assign(Object.create(null),{$visit(e,t,n){let{type:r}=e;return"function"==typeof this[r]?this[r](e,t,n):this.$visitChildren(e,t,n)},$visitChildren(e,t,n){let{type:r}=e;for(let i of n[r]||Object.keys(e).filter(V)){let r=e[i];if(Array.isArray(r)){for(let e of r)if(eP(e)&&this.$visit(e,t,n))return!0}else if(eP(r)&&this.$visit(r,t,n))return!0}return!1},ArrowFunctionExpression:()=>!1,AssignmentExpression:()=>!0,AwaitExpression:()=>!0,BinaryExpression(e,t,n){return!!(t.considerImplicitTypeConversion&&e_.has(e.operator))&&("Literal"!==e.left.type||"Literal"!==e.right.type)||this.$visitChildren(e,t,n)},CallExpression:()=>!0,FunctionExpression:()=>!1,ImportExpression:()=>!0,MemberExpression(e,t,n){return!!t.considerGetters||!!t.considerImplicitTypeConversion&&!!e.computed&&"Literal"!==e.property.type||this.$visitChildren(e,t,n)},MethodDefinition(e,t,n){return!!t.considerImplicitTypeConversion&&!!e.computed&&"Literal"!==e.key.type||this.$visitChildren(e,t,n)},NewExpression:()=>!0,Property(e,t,n){return!!t.considerImplicitTypeConversion&&!!e.computed&&"Literal"!==e.key.type||this.$visitChildren(e,t,n)},PropertyDefinition(e,t,n){return!!t.considerImplicitTypeConversion&&!!e.computed&&"Literal"!==e.key.type||this.$visitChildren(e,t,n)},UnaryExpression(e,t,n){return!!("delete"===e.operator||t.considerImplicitTypeConversion&&eO.has(e.operator)&&"Literal"!==e.argument.type)||this.$visitChildren(e,t,n)},UpdateExpression:()=>!0,YieldExpression:()=>!0}));function eN(e,t,n={}){let{considerGetters:r=!1,considerImplicitTypeConversion:i=!1}=n;return eI.$visit(e,{considerGetters:r,considerImplicitTypeConversion:i},t.visitorKeys||M)}function eL(e,t,n){let r,i,s,a,o;if("number"==typeof e){if(r=0|e,i=t,s=n,!(r>=1))throw TypeError("'times' should be a positive integer.")}else r=1,i=e,s=t;if(null==i||null==i.parent||"CatchClause"===i.parent.type&&i.parent.param===i)return!1;a=o=i;do a=s.getTokenBefore(a),o=s.getTokenAfter(o);while(null!=a&&null!=o&&z(a)&&G(o)&&a!==function(e,t){let n=e.parent;switch(n.type){case"CallExpression":case"NewExpression":if(1===n.arguments.length&&n.arguments[0]===e)return t.getTokenAfter(n.typeArguments||n.typeParameters||n.callee,z);return null;case"DoWhileStatement":if(n.test===e)return t.getTokenAfter(n.body,z);return null;case"IfStatement":case"WhileStatement":if(n.test===e)return t.getFirstToken(n,1);return null;case"ImportExpression":if(n.source===e)return t.getFirstToken(n,1);return null;case"SwitchStatement":if(n.discriminant===e)return t.getFirstToken(n,1);return null;case"WithStatement":if(n.object===e)return t.getFirstToken(n,1);return null;default:return null}}(i,s)&&--r>0);return 0===r}let eB=/\$(?:[$&`']|[1-9][0-9]?)/gu,eD=new WeakMap;class ej{constructor(e,t={}){let{escaped:n=!1}=t;if(!(e instanceof RegExp))throw TypeError("'pattern' should be a RegExp instance.");if(!e.flags.includes("g"))throw Error("'pattern' should contains 'g' flag.");eD.set(this,{pattern:new RegExp(e.source,e.flags),escaped:!!n})}*execAll(e){let{pattern:t,escaped:n}=eD.get(this),r=null,i=0;for(t.lastIndex=0;null!=(r=t.exec(e));)(n||!function(e,t){let n=!1;for(let r=t-1;r>=0&&92===e.charCodeAt(r);--r)n=!n;return n}(e,r.index))&&(i=t.lastIndex,yield r,t.lastIndex=i)}test(e){return!this.execAll(e).next().done}[Symbol.replace](e,t){return"function"==typeof t?function(e,t,n){let r=[],i=0;for(let s of e.execAll(t))r.push(t.slice(i,s.index)),r.push(String(n(...s,s.index,s.input))),i=s.index+s[0].length;return r.push(t.slice(i)),r.join("")}(this,String(e),t):function(e,t,n){let r=[],i=0;for(let s of e.execAll(t))r.push(t.slice(i,s.index)),r.push(n.replace(eB,e=>(function(e,n){switch(e){case"$$":return"$";case"$&":return n[0];case"$`":return t.slice(0,n.index);case"$'":return t.slice(n.index+n[0].length);default:{let t=e.slice(1);if(t in n)return n[t];return e}}})(e,s))),i=s.index+s[0].length;return r.push(t.slice(i)),r.join("")}(this,String(e),String(t))}}let eR=/^(?:Import|Export(?:All|Default|Named))Declaration$/u,eF=Function.call.bind(Object.hasOwnProperty),eM=Symbol("read"),e$=Symbol("call"),eV=Symbol("construct"),eq=Symbol("esm"),eY={require:{[e$]:!0}};function eX(e){return null==e||0!==e.defs.length||e.references.some(e=>e.isWrite())}class eJ{constructor(e,t={}){let{mode:n="strict",globalObjectNames:r=["global","globalThis","self","window"]}=t;this.variableStack=[],this.globalScope=e,this.mode=n,this.globalObjectNames=r.slice(0)}*iterateGlobalReferences(e){for(let t of Object.keys(e)){let n=e[t],r=[t],i=this.globalScope.set.get(t);eX(i)||(yield*this._iterateVariableReferences(i,r,n,!0))}for(let t of this.globalObjectNames){let n=[],r=this.globalScope.set.get(t);eX(r)||(yield*this._iterateVariableReferences(r,n,e,!1))}}*iterateCjsReferences(e){for(let{node:t}of this.iterateGlobalReferences(eY)){let n=ew(t.arguments[0]);if(null==n||!eF(e,n))continue;let r=e[n],i=[n];r[eM]&&(yield{node:t,path:i,type:eM,info:r[eM]}),yield*this._iteratePropertyReferences(t,i,r)}}*iterateEsmReferences(e){for(let t of this.globalScope.block.body){if(!eR.test(t.type)||null==t.source)continue;let n=t.source.value;if(!eF(e,n))continue;let r=e[n],i=[n];if(r[eM]&&(yield{node:t,path:i,type:eM,info:r[eM]}),"ExportAllDeclaration"===t.type)for(let e of Object.keys(r)){let n=r[e];n[eM]&&(yield{node:t,path:i.concat(e),type:eM,info:n[eM]})}else for(let e of t.specifiers){let t=eF(r,eq),n=this._iterateImportReferences(e,i,t?r:"legacy"===this.mode?{default:r,...r}:{default:r});if(t)yield*n;else for(let e of n)e.path=e.path.filter(eU),(e.path.length>=2||e.type!==eM)&&(yield e)}}}*iteratePropertyReferences(e,t){yield*this._iteratePropertyReferences(e,[],t)}*_iterateVariableReferences(e,t,n,r){if(!this.variableStack.includes(e)){this.variableStack.push(e);try{for(let i of e.references){if(!i.isRead())continue;let e=i.identifier;r&&n[eM]&&(yield{node:e,path:t,type:eM,info:n[eM]}),yield*this._iteratePropertyReferences(e,t,n)}}finally{this.variableStack.pop()}}}*_iteratePropertyReferences(e,t,n){let r=e;for(;function(e){let t=e.parent;if(t)switch(t.type){case"ConditionalExpression":return t.consequent===e||t.alternate===e;case"LogicalExpression":case"ChainExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":case"TSInstantiationExpression":return!0;case"SequenceExpression":return t.expressions[t.expressions.length-1]===e}return!1}(r);)r=r.parent;let i=r.parent;if("MemberExpression"===i.type){if(i.object===r){let e=eA(i);if(null==e||!eF(n,e))return;t=t.concat(e);let r=n[e];r[eM]&&(yield{node:i,path:t,type:eM,info:r[eM]}),yield*this._iteratePropertyReferences(i,t,r)}return}if("CallExpression"===i.type){i.callee===r&&n[e$]&&(yield{node:i,path:t,type:e$,info:n[e$]});return}if("NewExpression"===i.type){i.callee===r&&n[eV]&&(yield{node:i,path:t,type:eV,info:n[eV]});return}if("AssignmentExpression"===i.type){i.right===r&&(yield*this._iterateLhsReferences(i.left,t,n),yield*this._iteratePropertyReferences(i,t,n));return}if("AssignmentPattern"===i.type){i.right===r&&(yield*this._iterateLhsReferences(i.left,t,n));return}"VariableDeclarator"===i.type&&i.init===r&&(yield*this._iterateLhsReferences(i.id,t,n))}*_iterateLhsReferences(e,t,n){if("Identifier"===e.type){let r=Y(this.globalScope,e);null!=r&&(yield*this._iterateVariableReferences(r,t,n,!1));return}if("ObjectPattern"===e.type){for(let r of e.properties){let e=eA(r);if(null==e||!eF(n,e))continue;let i=t.concat(e),s=n[e];s[eM]&&(yield{node:r,path:i,type:eM,info:s[eM]}),yield*this._iterateLhsReferences(r.value,i,s)}return}"AssignmentPattern"===e.type&&(yield*this._iterateLhsReferences(e.left,t,n))}*_iterateImportReferences(e,t,n){let r=e.type;if("ImportSpecifier"===r||"ImportDefaultSpecifier"===r){let i="ImportDefaultSpecifier"===r?"default":"Identifier"===e.imported.type?e.imported.name:e.imported.value;if(!eF(n,i))return;t=t.concat(i);let s=n[i];s[eM]&&(yield{node:e,path:t,type:eM,info:s[eM]}),yield*this._iterateVariableReferences(Y(this.globalScope,e.local),t,s,!1);return}if("ImportNamespaceSpecifier"===r)return void(yield*this._iterateVariableReferences(Y(this.globalScope,e.local),t,n,!1));if("ExportSpecifier"===r){let r="Identifier"===e.local.type?e.local.name:e.local.value;if(!eF(n,r))return;t=t.concat(r);let i=n[r];i[eM]&&(yield{node:e,path:t,type:eM,info:i[eM]})}}}function eU(e,t){return 1!==t||"default"!==e}eJ.READ=eM,eJ.CALL=e$,eJ.CONSTRUCT=eV,eJ.ESM=eq;var eW=Object.freeze({__proto__:null,CALL:e$,CONSTRUCT:eV,ESM:eq,PatternMatcher:ej,READ:eM,ReferenceTracker:eJ,default:{CALL:e$,CONSTRUCT:eV,ESM:eq,findVariable:Y,getFunctionHeadLocation:em,getFunctionNameWithKind:eC,getInnermostScope:q,getPropertyName:eA,getStaticValue:ev,getStringIfConstant:ew,hasSideEffect:eN,isArrowToken:U,isClosingBraceToken:et,isClosingBracketToken:Z,isClosingParenToken:G,isColonToken:H,isCommaToken:W,isCommentToken:en,isNotArrowToken:er,isNotClosingBraceToken:ef,isNotClosingBracketToken:ec,isNotClosingParenToken:el,isNotColonToken:ea,isNotCommaToken:ei,isNotCommentToken:ed,isNotOpeningBraceToken:eu,isNotOpeningBracketToken:ep,isNotOpeningParenToken:eo,isNotSemicolonToken:es,isOpeningBraceToken:ee,isOpeningBracketToken:Q,isOpeningParenToken:z,isParenthesized:eL,isSemicolonToken:K,PatternMatcher:ej,READ:eM,ReferenceTracker:eJ},findVariable:Y,getFunctionHeadLocation:em,getFunctionNameWithKind:eC,getInnermostScope:q,getPropertyName:eA,getStaticValue:ev,getStringIfConstant:ew,hasSideEffect:eN,isArrowToken:U,isClosingBraceToken:et,isClosingBracketToken:Z,isClosingParenToken:G,isColonToken:H,isCommaToken:W,isCommentToken:en,isNotArrowToken:er,isNotClosingBraceToken:ef,isNotClosingBracketToken:ec,isNotClosingParenToken:el,isNotColonToken:ea,isNotCommaToken:ei,isNotCommentToken:ed,isNotOpeningBraceToken:eu,isNotOpeningBracketToken:ep,isNotOpeningParenToken:eo,isNotSemicolonToken:es,isOpeningBraceToken:ee,isOpeningBracketToken:Q,isOpeningParenToken:z,isParenthesized:eL,isSemicolonToken:K}),eK=F(eW),eH={},ez={};function eG(){var e,t,n,r;return l?ez:(l=1,Object.defineProperty(ez,"__esModule",{value:!0}),ez.AST_TOKEN_TYPES=ez.AST_NODE_TYPES=void 0,(n=e||(ez.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||(ez.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",ez)}var eQ={},eZ={},e0={};function e1(){var e,t,n;return f?eH:(f=1,e=eH&&eH.__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=eH&&eH.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)},Object.defineProperty(eH,"__esModule",{value:!0}),eH.AST_TOKEN_TYPES=eH.AST_NODE_TYPES=void 0,n=eG(),Object.defineProperty(eH,"AST_NODE_TYPES",{enumerable:!0,get:function(){return n.AST_NODE_TYPES}}),Object.defineProperty(eH,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return n.AST_TOKEN_TYPES}}),t((p||(p=1,Object.defineProperty(eQ,"__esModule",{value:!0})),eQ),eH),t((c||(c=1,Object.defineProperty(eZ,"__esModule",{value:!0})),eZ),eH),t(function(){if(u)return e0;u=1;var e,t=e0&&e0.__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=e0&&e0.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=e0&&e0.__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(e0,"__esModule",{value:!0}),e0.TSESTree=void 0,e0.TSESTree=r(eG()),e0}(),eH),eH)}var e2=D(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(eK);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}),e3=D(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(eK).PatternMatcher}),e6=D(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(eK);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}),e4=D(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(eK);s.ReferenceTracker.READ,s.ReferenceTracker.CALL,s.ReferenceTracker.CONSTRUCT,s.ReferenceTracker.ESM,e.ReferenceTracker=s.ReferenceTracker}),e5=D(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(eK);e.findVariable=s.findVariable,e.getInnermostScope=s.getInnermostScope}),e9=D(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(e2(),e),n(e3(),e),n(e6(),e),n(e4(),e),n(e5(),e)}),e8=D(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)}),e7=D(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]/}),te=D(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TSESTree=e.AST_TOKEN_TYPES=e.AST_NODE_TYPES=void 0;var t=e1();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}})}),tt=D(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=te(),n=e8();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])}),tn=D(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(e9(),e),n(e8(),e),n(e7(),e),n(tt(),e)}),tr=e1();let ti={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(let e of Object.keys(ti))Object.freeze(ti[e]);Object.freeze(ti);var ts=[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],ta=[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],to="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",tl={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"},tp="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",tc={5:tp,"5module":tp+" export import",6:tp+" const class extends export import super"},tu=/^in(stanceof)?$/,tf=RegExp("["+to+"]"),td=RegExp("["+to+"‌‍\xb7̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function tm(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 th(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&tf.test(String.fromCharCode(e)):!1!==t&&tm(e,ta)))}function tg(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&td.test(String.fromCharCode(e)):!1!==t&&(tm(e,ta)||tm(e,ts)))))}var ty=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 tx(e,t){return new ty(e,{beforeExpr:!0,binop:t})}var tT={beforeExpr:!0},tS={startsExpr:!0},tb={};function tE(e,t){return void 0===t&&(t={}),t.keyword=e,tb[e]=new ty(e,t)}var tk={num:new ty("num",tS),regexp:new ty("regexp",tS),string:new ty("string",tS),name:new ty("name",tS),privateId:new ty("privateId",tS),eof:new ty("eof"),bracketL:new ty("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new ty("]"),braceL:new ty("{",{beforeExpr:!0,startsExpr:!0}),braceR:new ty("}"),parenL:new ty("(",{beforeExpr:!0,startsExpr:!0}),parenR:new ty(")"),comma:new ty(",",tT),semi:new ty(";",tT),colon:new ty(":",tT),dot:new ty("."),question:new ty("?",tT),questionDot:new ty("?."),arrow:new ty("=>",tT),template:new ty("template"),invalidTemplate:new ty("invalidTemplate"),ellipsis:new ty("...",tT),backQuote:new ty("`",tS),dollarBraceL:new ty("${",{beforeExpr:!0,startsExpr:!0}),eq:new ty("=",{beforeExpr:!0,isAssign:!0}),assign:new ty("_=",{beforeExpr:!0,isAssign:!0}),incDec:new ty("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new ty("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:tx("||",1),logicalAND:tx("&&",2),bitwiseOR:tx("|",3),bitwiseXOR:tx("^",4),bitwiseAND:tx("&",5),equality:tx("==/!=/===/!==",6),relational:tx("</>/<=/>=",7),bitShift:tx("<</>>/>>>",8),plusMin:new ty("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:tx("%",10),star:tx("*",10),slash:tx("/",10),starstar:new ty("**",{beforeExpr:!0}),coalesce:tx("??",1),_break:tE("break"),_case:tE("case",tT),_catch:tE("catch"),_continue:tE("continue"),_debugger:tE("debugger"),_default:tE("default",tT),_do:tE("do",{isLoop:!0,beforeExpr:!0}),_else:tE("else",tT),_finally:tE("finally"),_for:tE("for",{isLoop:!0}),_function:tE("function",tS),_if:tE("if"),_return:tE("return",tT),_switch:tE("switch"),_throw:tE("throw",tT),_try:tE("try"),_var:tE("var"),_const:tE("const"),_while:tE("while",{isLoop:!0}),_with:tE("with"),_new:tE("new",{beforeExpr:!0,startsExpr:!0}),_this:tE("this",tS),_super:tE("super",tS),_class:tE("class",tS),_extends:tE("extends",tT),_export:tE("export"),_import:tE("import",tS),_null:tE("null",tS),_true:tE("true",tS),_false:tE("false",tS),_in:tE("in",{beforeExpr:!0,binop:7}),_instanceof:tE("instanceof",{beforeExpr:!0,binop:7}),_typeof:tE("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:tE("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:tE("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},tv=/\r\n?|\n|\u2028|\u2029/,tw=RegExp(tv.source,"g");function tA(e){return 10===e||13===e||8232===e||8233===e}function tC(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(tA(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return -1}var t_=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,tO=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,tP=Object.prototype,tI=tP.hasOwnProperty,tN=tP.toString,tL=Object.hasOwn||function(e,t){return tI.call(e,t)},tB=Array.isArray||function(e){return"[object Array]"===tN.call(e)},tD=Object.create(null);function tj(e){return tD[e]||(tD[e]=RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function tR(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}var tF=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,tM=function(e,t){this.line=e,this.column=t};tM.prototype.offset=function(e){return new tM(this.line,this.column+e)};var t$=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function tV(e,t){for(var n=1,r=0;;){var i=tC(e,r,t);if(i<0)return new tM(n,t-r);++n,r=i}}var tq={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},tY=!1;function tX(e,t){return 2|4*!!e|8*!!t}var tJ=function(e,t,n){this.options=e=function(e){var t,n,r={};for(var i in tq)r[i]=e&&tL(e,i)?e[i]:tq[i];if("latest"===r.ecmaVersion?r.ecmaVersion=1e8:null==r.ecmaVersion?(!tY&&"object"==typeof console&&console.warn&&(tY=!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),tB(r.onToken)){var s=r.onToken;r.onToken=function(e){return s.push(e)}}return tB(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 t$(this,a,o)),t.ranges&&(l.range=[i,s]),n.push(l)}),r}(e),this.sourceFile=e.sourceFile,this.keywords=tj(tc[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=tl[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=tj(r);var i=(r?r+" ":"")+tl.strict;this.reservedWordsStrict=tj(i),this.reservedWordsStrictBind=tj(i+" "+tl.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(tv).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=tk.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=[]},tU={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}};tJ.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},tU.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},tU.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},tU.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},tU.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},tU.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},tU.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},tU.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},tU.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},tU.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},tJ.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},tJ.parse=function(e,t){return new this(t,e).parse()},tJ.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},tJ.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(tJ.prototype,tU);var tW=tJ.prototype,tK=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;tW.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){tO.lastIndex=e,e+=tO.exec(this.input)[0].length;var t=tK.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){tO.lastIndex=e+t[0].length;var n=tO.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return";"===i||"}"===i||tv.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}tO.lastIndex=e+=t[0].length,e+=tO.exec(this.input)[0].length,";"===this.input[e]&&e++}},tW.eat=function(e){return this.type===e&&(this.next(),!0)},tW.isContextual=function(e){return this.type===tk.name&&this.value===e&&!this.containsEsc},tW.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},tW.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},tW.canInsertSemicolon=function(){return this.type===tk.eof||this.type===tk.braceR||tv.test(this.input.slice(this.lastTokEnd,this.start))},tW.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},tW.semicolon=function(){this.eat(tk.semi)||this.insertSemicolon()||this.unexpected()},tW.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},tW.expect=function(e){this.eat(e)||this.unexpected()},tW.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var tH=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};tW.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")}},tW.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")},tW.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")},tW.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var tz=tJ.prototype;tz.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==tk.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 tG={kind:"loop"},tQ={kind:"switch"};tz.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;tO.lastIndex=this.pos;var t=tO.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(th(r,!0)){for(var i=n+1;tg(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var s=this.input.slice(n,i);if(!tu.test(s))return!0}return!1},tz.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;tO.lastIndex=this.pos;var e,t=tO.exec(this.input),n=this.pos+t[0].length;return!tv.test(this.input.slice(this.pos,n))&&"function"===this.input.slice(n,n+8)&&(n+8===this.input.length||!(tg(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},tz.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;tO.lastIndex=this.pos;var n=tO.exec(this.input),r=this.pos+n[0].length;if(tv.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||tg(i=this.input.charCodeAt(s))||i>55295&&i<56320)return!1;tO.lastIndex=s;var a=tO.exec(this.input);if(a&&tv.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||!tg(o=this.input.charCodeAt(l))&&!(o>55295&&o<56320)))return!1}var p=this.input.charCodeAt(r);return th(p,!0)||92===p},tz.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},tz.isUsing=function(e){return this.isUsingKeyword(!1,e)},tz.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=tk._var,r="let"),i){case tk._break:case tk._continue:return this.parseBreakContinueStatement(s,i.keyword);case tk._debugger:return this.parseDebuggerStatement(s);case tk._do:return this.parseDoStatement(s);case tk._for:return this.parseForStatement(s);case tk._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case tk._class:return e&&this.unexpected(),this.parseClass(s,!0);case tk._if:return this.parseIfStatement(s);case tk._return:return this.parseReturnStatement(s);case tk._switch:return this.parseSwitchStatement(s);case tk._throw:return this.parseThrowStatement(s);case tk._try:return this.parseTryStatement(s);case tk._const:case tk._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case tk._while:return this.parseWhileStatement(s);case tk._with:return this.parseWithStatement(s);case tk.braceL:return this.parseBlock(!0,s);case tk.semi:return this.parseEmptyStatement(s);case tk._export:case tk._import:if(this.options.ecmaVersion>10&&i===tk._import){tO.lastIndex=this.pos;var a=tO.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===tk._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===tk.name&&"Identifier"===u.type&&this.eat(tk.colon))return this.parseLabeledStatement(s,c,u,e);return this.parseExpressionStatement(s,u)}},tz.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(tk.semi)||this.insertSemicolon()?e.label=null:this.type!==tk.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")},tz.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},tz.parseDoStatement=function(e){return this.next(),this.labels.push(tG),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(tk._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(tk.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},tz.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(tG),this.enterScope(0),this.expect(tk.parenL),this.type===tk.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===tk._var||this.type===tk._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 tH,u=this.start,f=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===tk._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===tk._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(f.start!==u||p||"Identifier"!==f.type||"async"!==f.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),s&&a&&this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(f,!1,c),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},tz.parseForAfterInit=function(e,t,n){return(this.type===tk._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===tk._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},tz.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,t0|(n?0:t1),!1,t)},tz.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(tk._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},tz.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(tk.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},tz.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(tk.braceL),this.labels.push(tQ),this.enterScope(0);for(var t,n=!1;this.type!==tk.braceR;)if(this.type===tk._case||this.type===tk._default){var r=this.type===tk._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(tk.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")},tz.parseThrowStatement=function(e){return this.next(),tv.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 tZ=[];tz.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(32*!!t),this.checkLValPattern(e,t?4:2),this.expect(tk.parenR),e},tz.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===tk._catch){var t=this.startNode();this.next(),this.eat(tk.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(tk._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},tz.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},tz.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(tG),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},tz.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")},tz.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},tz.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===tk._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")},tz.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},tz.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(tk.braceL),e&&this.enterScope(0);this.type!==tk.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},tz.parseFor=function(e,t){return e.init=t,this.expect(tk.semi),e.test=this.type===tk.semi?null:this.parseExpression(),this.expect(tk.semi),e.update=this.type===tk.parenR?null:this.parseExpression(),this.expect(tk.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},tz.parseForIn=function(e,t){var n=this.type===tk._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(tk.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},tz.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(tk.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===tk._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===tk._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===tk._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(tk.comma))break}return e},tz.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 t0=1,t1=2;function t2(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}tz.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===tk.star&&t&t1&&this.unexpected(),e.generator=this.eat(tk.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&t0&&(e.id=4&t&&this.type!==tk.name?null:this.parseIdent(),e.id&&!(t&t1)&&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(tX(e.async,e.generator)),t&t0||(e.id=this.type===tk.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&t0?"FunctionDeclaration":"FunctionExpression")},tz.parseFunctionParams=function(e){this.expect(tk.parenL),e.params=this.parseBindingList(tk.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},tz.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(tk.braceL);this.type!==tk.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")},tz.parseClassElement=function(e){if(this.eat(tk.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(tk.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===tk.star?o=!0:r="static"}if(n.static=o,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===tk.star)&&!this.canInsertSemicolon()?s=!0:r="async"),!r&&(t>=9||!s)&&this.eat(tk.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===tk.parenL||"method"!==a||i||s){var p=!n.static&&t2(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},tz.isClassElementNameStart=function(){return this.type===tk.name||this.type===tk.privateId||this.type===tk.num||this.type===tk.string||this.type===tk.bracketL||this.type.keyword},tz.parseClassElementName=function(e){this.type===tk.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)},tz.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&&t2(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")},tz.parseClassField=function(e){return t2(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&t2(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(tk.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},tz.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==tk.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},tz.parseClassId=function(e,t){this.type===tk.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},tz.parseClassSuper=function(e){e.superClass=this.eat(tk._extends)?this.parseExprSubscripts(null,!1):null},tz.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},tz.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];tL(t,a.name)||(i?i.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},tz.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!==tk.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},tz.parseExport=function(e,t){if(this.next(),this.eat(tk.star))return this.parseExportAllDeclaration(e,t);if(this.eat(tk._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!==tk.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")},tz.parseExportDeclaration=function(e){return this.parseStatement(null)},tz.parseExportDefaultDeclaration=function(){if(this.type===tk._function||(e=this.isAsyncFunction())){var e,t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|t0,!1,e)}if(this.type===tk._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},tz.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),tL(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},tz.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)},tz.checkVariableExport=function(e,t){if(e)for(var n=0;n<t.length;n+=1){var r=t[n];this.checkPatternExport(e,r.id)}},tz.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},tz.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")},tz.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(tk.braceL);!this.eat(tk.braceR);){if(n)n=!1;else if(this.expect(tk.comma),this.afterTrailingComma(tk.braceR))break;t.push(this.parseExportSpecifier(e))}return t},tz.parseImport=function(e){return this.next(),this.type===tk.string?(e.specifiers=tZ,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===tk.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},tz.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")},tz.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},tz.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")},tz.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===tk.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(tk.comma)))return e;if(this.type===tk.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(tk.braceL);!this.eat(tk.braceR);){if(t)t=!1;else if(this.expect(tk.comma),this.afterTrailingComma(tk.braceR))break;e.push(this.parseImportSpecifier())}return e},tz.parseWithClause=function(){var e=[];if(!this.eat(tk._with))return e;this.expect(tk.braceL);for(var t={},n=!0;!this.eat(tk.braceR);){if(n)n=!1;else if(this.expect(tk.comma),this.afterTrailingComma(tk.braceR))break;var r=this.parseImportAttribute(),i="Identifier"===r.key.type?r.key.name:r.key.value;tL(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e},tz.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===tk.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(tk.colon),this.type!==tk.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},tz.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===tk.string){var e=this.parseLiteral(this.value);return tF.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},tz.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)},tz.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 t3=tJ.prototype;t3.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},t3.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},t3.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},t3.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==tk.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},t3.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case tk.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(tk.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case tk.braceL:return this.parseObj(!0)}return this.parseIdent()},t3.parseBindingList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(tk.comma),t&&this.type===tk.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===tk.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===tk.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},t3.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},t3.parseBindingListItem=function(e){return e},t3.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(tk.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},t3.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&&(tL(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")}},t3.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)}},t3.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 t6=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},t4={b_stat:new t6("{",!1),b_expr:new t6("{",!0),b_tmpl:new t6("${",!1),p_stat:new t6("(",!1),p_expr:new t6("(",!0),q_tmpl:new t6("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new t6("function",!1),f_expr:new t6("function",!0),f_expr_gen:new t6("function",!0,!1,null,!0),f_gen:new t6("function",!1,!1,null,!0)},t5=tJ.prototype;t5.initialContext=function(){return[t4.b_stat]},t5.curContext=function(){return this.context[this.context.length-1]},t5.braceIsBlock=function(e){var t=this.curContext();return t===t4.f_expr||t===t4.f_stat||(e===tk.colon&&(t===t4.b_stat||t===t4.b_expr)?!t.isExpr:e===tk._return||e===tk.name&&this.exprAllowed?tv.test(this.input.slice(this.lastTokEnd,this.start)):e===tk._else||e===tk.semi||e===tk.eof||e===tk.parenR||e===tk.arrow||(e===tk.braceL?t===t4.b_stat:e!==tk._var&&e!==tk._const&&e!==tk.name&&!this.exprAllowed))},t5.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},t5.updateContext=function(e){var t,n=this.type;n.keyword&&e===tk.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},t5.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},tk.parenR.updateContext=tk.braceR.updateContext=function(){if(1===this.context.length){this.exprAllowed=!0;return}var e=this.context.pop();e===t4.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},tk.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?t4.b_stat:t4.b_expr),this.exprAllowed=!0},tk.dollarBraceL.updateContext=function(){this.context.push(t4.b_tmpl),this.exprAllowed=!0},tk.parenL.updateContext=function(e){var t=e===tk._if||e===tk._for||e===tk._with||e===tk._while;this.context.push(t?t4.p_stat:t4.p_expr),this.exprAllowed=!0},tk.incDec.updateContext=function(){},tk._function.updateContext=tk._class.updateContext=function(e){e.beforeExpr&&e!==tk._else&&(e!==tk.semi||this.curContext()===t4.p_stat)&&!(e===tk._return&&tv.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==tk.colon&&e!==tk.braceL||this.curContext()!==t4.b_stat)?this.context.push(t4.f_expr):this.context.push(t4.f_stat),this.exprAllowed=!1},tk.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},tk.backQuote.updateContext=function(){this.curContext()===t4.q_tmpl?this.context.pop():this.context.push(t4.q_tmpl),this.exprAllowed=!1},tk.star.updateContext=function(e){if(e===tk._function){var t=this.context.length-1;this.context[t]===t4.f_expr?this.context[t]=t4.f_expr_gen:this.context[t]=t4.f_gen}this.exprAllowed=!0},tk.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==tk.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var t9=tJ.prototype;t9.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}},t9.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===tk.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(tk.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},t9.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 tH,r=!0);var o=this.start,l=this.startLoc;(this.type===tk.parenL||this.type===tk.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===tk.eq&&(p=this.toAssignable(p,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=p.start&&(t.shorthandAssign=-1),this.type===tk.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},t9.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(tk.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(tk.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},t9.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)},t9.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==tk._in)&&s>r){var a=this.type===tk.logicalOR||this.type===tk.logicalAND,o=this.type===tk.coalesce;o&&(s=tk.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),f=this.buildBinary(t,n,e,u,l,a||o);return(a&&this.type===tk.coalesce||o&&(this.type===tk.logicalOR||this.type===tk.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,t,n,r,i)}return e},t9.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")},t9.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===tk.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!==tk.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!==tk._in&&this.unexpected();return!n&&this.eat(tk.starstar)?t?void this.unexpected(this.lastTokStart):this.buildBinary(s,a,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1):i},t9.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},t9.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}},t9.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(tk.arrow)},t9.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},t9.parseSubscript=function(e,t,n,r,i,s,a){var o=this.options.ecmaVersion>=11,l=o&&this.eat(tk.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(tk.bracketL);if(p||l&&this.type!==tk.parenL&&this.type!==tk.backQuote||this.eat(tk.dot)){var c=this.startNodeAt(t,n);c.object=e,p?(c.property=this.parseExpression(),this.expect(tk.bracketR)):this.type===tk.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(tk.parenL)){var u=new tH,f=this.yieldPos,d=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(tk.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=f,this.awaitPos=d,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,a);this.checkExpressionErrors(u,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=d||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===tk.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},t9.parseExprAtom=function(e,t,n){this.type===tk.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case tk._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==tk.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==tk.dot&&this.type!==tk.bracketL&&this.type!==tk.parenL&&this.unexpected(),this.finishNode(r,"Super");case tk._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case tk.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(tk._function))return this.overrideContext(t4.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(tk.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===tk.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(tk.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}return l;case tk.regexp:var p=this.value;return(r=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},r;case tk.num:case tk.string:return this.parseLiteral(this.value);case tk._null:case tk._true:case tk._false:return(r=this.startNode()).value=this.type===tk._null?null:this.type===tk._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case tk.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 tk.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(tk.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case tk.braceL:return this.overrideContext(t4.b_expr),this.parseObj(!1,e);case tk._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case tk._class:return this.parseClass(this.startNode(),!1);case tk._new:return this.parseNew();case tk.backQuote:return this.parseTemplate();case tk._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);return this.unexpected();default:return this.parseExprAtomDefault()}},t9.parseExprAtomDefault=function(){this.unexpected()},t9.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===tk.parenL&&!e)return this.parseDynamicImport(t);if(this.type===tk.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()},t9.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(tk.parenR)?e.options=null:(this.expect(tk.comma),this.afterTrailingComma(tk.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),!this.eat(tk.parenR)&&(this.expect(tk.comma),this.afterTrailingComma(tk.parenR)||this.unexpected())));else if(!this.eat(tk.parenR)){var t=this.start;this.eat(tk.comma)&&this.eat(tk.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},t9.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")},t9.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")},t9.parseParenExpression=function(){this.expect(tk.parenL);var e=this.parseExpression();return this.expect(tk.parenR),e},t9.shouldParseArrow=function(e){return!this.canInsertSemicolon()},t9.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,f=new tH,d=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==tk.parenR;){if(c?c=!1:this.expect(tk.comma),s&&this.afterTrailingComma(tk.parenR,!0)){u=!0;break}if(this.type===tk.ellipsis){a=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===tk.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(tk.parenR),e&&this.shouldParseArrow(p)&&this.eat(tk.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=m,this.parseParenArrowList(r,i,p,t);(!p.length||u)&&this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(f,!0),this.yieldPos=d||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")},t9.parseParenItem=function(e){return e},t9.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var t8=[];t9.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===tk.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(tk.parenL)?e.arguments=this.parseExprList(tk.parenR,this.options.ecmaVersion>=8,!1):e.arguments=t8,this.finishNode(e,"NewExpression")},t9.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===tk.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===tk.backQuote,this.finishNode(n,"TemplateElement")},t9.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===tk.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(tk.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(tk.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},t9.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===tk.name||this.type===tk.num||this.type===tk.string||this.type===tk.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===tk.star)&&!tv.test(this.input.slice(this.lastTokEnd,this.start))},t9.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(tk.braceR);){if(r)r=!1;else if(this.expect(tk.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(tk.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")},t9.parseProperty=function(e,t){var n,r,i,s,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(tk.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===tk.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===tk.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(tk.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(tk.star),this.parsePropertyName(a)):r=!1,this.parsePropertyValue(a,e,n,r,i,s,t,o),this.finishNode(a,"Property")},t9.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")},t9.parsePropertyValue=function(e,t,n,r,i,s,a,o){(n||r)&&this.type===tk.colon&&this.unexpected(),this.eat(tk.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===tk.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===tk.comma||this.type===tk.braceR||this.type===tk.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===tk.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))},t9.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(tk.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(tk.bracketR),e.key;else e.computed=!1;return e.key=this.type===tk.num||this.type===tk.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},t9.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},t9.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|tX(t,r.generator)|128*!!n),this.expect(tk.parenL),r.params=this.parseBindingList(tk.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")},t9.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|tX(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")},t9.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==tk.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()},t9.isSimpleParamList=function(e){for(var t=0;t<e.length;t+=1)if("Identifier"!==e[t].type)return!1;return!0},t9.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)}},t9.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(tk.comma),t&&this.afterTrailingComma(e))break;var a=void 0;n&&this.type===tk.comma?a=null:this.type===tk.ellipsis?(a=this.parseSpread(r),r&&this.type===tk.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),i.push(a)}return i},t9.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"))},t9.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},t9.parseIdentNode=function(){var e=this.startNode();return this.type===tk.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=tk.name):this.unexpected(),e},t9.parsePrivateIdent=function(){var e=this.startNode();return this.type===tk.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},t9.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===tk.semi||this.canInsertSemicolon()||this.type!==tk.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(tk.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},t9.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 t7=tJ.prototype;t7.raise=function(e,t){var n=tV(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},t7.raiseRecoverable=t7.raise,t7.curPosition=function(){if(this.options.locations)return new tM(this.curLine,this.pos-this.lineStart)};var ne=tJ.prototype,nt=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};ne.enterScope=function(e){this.scopeStack.push(new nt(e))},ne.exitScope=function(){this.scopeStack.pop()},ne.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},ne.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")},ne.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},ne.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ne.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},ne.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 nn=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new t$(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},nr=tJ.prototype;function ni(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}nr.startNode=function(){return new nn(this,this.start,this.startLoc)},nr.startNodeAt=function(e,t){return new nn(this,e,t)},nr.finishNode=function(e,t){return ni.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},nr.finishNodeAt=function(e,t,n,r){return ni.call(this,e,t,n,r)},nr.copyNode=function(e){var t=new nn(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};for(var ns="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",na=ns+" Extended_Pictographic",no=na+" EBase EComp EMod EPres ExtPict",nl={9:ns,10:na,11:na,12:no,13:no,14:no},np={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"},nc="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",nu="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",nf=nu+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",nd=nf+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",nm=nd+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",nh=nm+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ng={9:nu,10:nf,11:nd,12:nm,13:nh,14:nh+" 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"},ny={},nx=0,nT=[9,10,11,12,13,14];nx<nT.length;nx+=1)!function(e){var t=ny[e]={binary:tj(nl[e]+" "+nc),binaryOfStrings:tj(np[e]),nonBinary:{General_Category:tj(nc),Script:tj(ng[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}(nT[nx]);var nS=tJ.prototype,nb=function(e,t){this.parent=e,this.base=t||this};nb.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},nb.prototype.sibling=function(){return new nb(this.parent,this.base)};var nE=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=ny[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 nk(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function nv(e){return e>=65&&e<=90||e>=97&&e<=122}function nw(e){return nv(e)||95===e}function nA(e){return e>=48&&e<=57}function nC(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function n_(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}function nO(e){return e>=48&&e<=55}nE.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)},nE.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},nE.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},nE.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},nE.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},nE.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},nE.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},nE.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},nE.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},nS.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")},nS.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))},nS.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")}},nS.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new nb(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")},nS.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},nS.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)},nS.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},nS.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},nS.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},nS.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},nS.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)},nS.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},nS.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},nS.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},nS.regexp_eatModifiers=function(e){for(var t,n="",r=0;-1!==(r=e.current())&&(105===(t=r)||109===t||115===t);)n+=tR(r),e.advance();return n},nS.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)},nS.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},nS.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!nk(t)&&(e.lastIntValue=t,e.advance(),!0)},nS.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!nk(n);)e.advance();return e.pos!==t},nS.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)},nS.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}},nS.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},nS.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=tR(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=tR(e.lastIntValue);return!0}return!1},nS.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),th(t=i,!0)||36===t||95===t)?(e.lastIntValue=i,!0):(e.pos=n,!1)},nS.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),tg(t=i,!0)||36===t||95===t||8204===t||8205===t)?(e.lastIntValue=i,!0):(e.pos=n,!1)},nS.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)},nS.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},nS.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},nS.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)},nS.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},nS.regexp_eatZero=function(e){return!(48!==e.current()||nA(e.lookahead()))&&(e.lastIntValue=0,e.advance(),!0)},nS.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)},nS.regexp_eatControlLetter=function(e){var t=e.current();return!!nv(t)&&(e.lastIntValue=t%32,e.advance(),!0)},nS.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},nS.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)},nS.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},nS.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},nS.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},nS.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){tL(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},nS.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")},nS.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";nw(t=e.current());)e.lastStringValue+=tR(t),e.advance();return""!==e.lastStringValue},nS.regexp_eatUnicodePropertyValue=function(e){var t,n=0;for(e.lastStringValue="";nw(t=n=e.current())||nA(t);)e.lastStringValue+=tR(n),e.advance();return""!==e.lastStringValue},nS.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},nS.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},nS.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},nS.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")}}},nS.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||nO(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)},nS.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)},nS.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)}},nS.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},nS.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},nS.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},nS.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},nS.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},nS.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},nS.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)},nS.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)},nS.regexp_eatClassControlLetter=function(e){var t=e.current();return(!!nA(t)||95===t)&&(e.lastIntValue=t%32,e.advance(),!0)},nS.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},nS.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;nA(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},nS.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;nC(n=e.current());)e.lastIntValue=16*e.lastIntValue+n_(n),e.advance();return e.pos!==t},nS.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},nS.regexp_eatOctalDigit=function(e){var t=e.current();return nO(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},nS.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!nC(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+n_(i),e.advance()}return!0};var nP=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new t$(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},nI=tJ.prototype;function nN(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}nI.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 nP(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},nI.getToken=function(){return this.next(),new nP(this)},"undefined"!=typeof Symbol&&(nI[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===tk.eof,value:t}}}}),nI.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(tk.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},nI.readToken=function(e){return th(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},nI.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},nI.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=tC(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())},nI.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&&!tA(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())},nI.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&&t_.test(String.fromCharCode(e)))++this.pos;else break e}}},nI.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)},nI.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(tk.ellipsis)):(++this.pos,this.finishToken(tk.dot))},nI.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(tk.assign,2):this.finishOp(tk.slash,1)},nI.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?tk.star:tk.modulo;return(this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=tk.starstar,t=this.input.charCodeAt(this.pos+2)),61===t)?this.finishOp(tk.assign,n+1):this.finishOp(r,n)},nI.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(tk.assign,3):this.finishOp(124===e?tk.logicalOR:tk.logicalAND,2);return 61===t?this.finishOp(tk.assign,2):this.finishOp(124===e?tk.bitwiseOR:tk.bitwiseAND,1)},nI.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(tk.assign,2):this.finishOp(tk.bitwiseXOR,1)},nI.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||tv.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(tk.incDec,2):61===t?this.finishOp(tk.assign,2):this.finishOp(tk.plusMin,1)},nI.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(tk.assign,n+1):this.finishOp(tk.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(tk.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},nI.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(tk.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(tk.arrow)):this.finishOp(61===e?tk.eq:tk.prefix,1)},nI.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(tk.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(tk.assign,3):this.finishOp(tk.coalesce,2)}return this.finishOp(tk.question,1)},nI.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,th(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(tk.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+tR(t)+"'")},nI.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(tk.parenL);case 41:return++this.pos,this.finishToken(tk.parenR);case 59:return++this.pos,this.finishToken(tk.semi);case 44:return++this.pos,this.finishToken(tk.comma);case 91:return++this.pos,this.finishToken(tk.bracketL);case 93:return++this.pos,this.finishToken(tk.bracketR);case 123:return++this.pos,this.finishToken(tk.braceL);case 125:return++this.pos,this.finishToken(tk.braceR);case 58:return++this.pos,this.finishToken(tk.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(tk.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(tk.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+tR(e)+"'")},nI.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},nI.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(tv.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 nE(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(tk.regexp,{pattern:i,flags:a,value:l})},nI.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},nI.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=nN(this.input.slice(t,this.pos)),++this.pos):th(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(tk.num,n)},nI.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=nN(this.input.slice(n,this.pos));return++this.pos,th(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(tk.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")),th(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(tk.num,a)},nI.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},nI.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)):(tA(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(tk.string,t)};var nL={};nI.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===nL)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},nI.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw nL;this.raise(e,t)},nI.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===tk.template||this.type===tk.invalidTemplate))if(36===n)return this.pos+=2,this.finishToken(tk.dollarBraceL);else return++this.pos,this.finishToken(tk.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(tk.template,e)}if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(tA(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}},nI.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(tk.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")},nI.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 tR(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(tA(t))return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";return String.fromCharCode(t)}},nI.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},nI.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(tg(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?th:tg)(a,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=tR(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},nI.readWord=function(){var e=this.readWord1(),t=tk.name;return this.keywords.test(e)&&(t=tb[e]),this.finishToken(t,e)};var nB="8.15.0";tJ.acorn={Parser:tJ,version:nB,defaultOptions:tq,Position:tM,SourceLocation:t$,getLineInfo:tV,Node:nn,TokenType:ty,tokTypes:tk,keywordTypes:tb,TokContext:t6,tokContexts:t4,isIdentifierChar:tg,isIdentifierStart:th,Token:nP,isNewLine:tA,lineBreak:tv,lineBreakG:tw,nonASCIIwhitespace:t_};var nD=Object.freeze({__proto__:null,Node:nn,Parser:tJ,Position:tM,SourceLocation:t$,TokContext:t6,Token:nP,TokenType:ty,defaultOptions:tq,getLineInfo:tV,isIdentifierChar:tg,isIdentifierStart:th,isNewLine:tA,keywordTypes:tb,lineBreak:tv,lineBreakG:tw,nonASCIIwhitespace:t_,parse:function(e,t){return tJ.parse(e,t)},parseExpressionAt:function(e,t,n){return tJ.parseExpressionAt(e,t,n)},tokContexts:t4,tokTypes:tk,tokenizer:function(e,t){return tJ.tokenizer(e,t)},version:nB}),nj={exports:{}},nR=F(nD),nF=R((h||(h=1,!function(e){let t=m?d:(m=1,d={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){var o,l;let p,c,u,f,d,m,h,g,y,x,T;return o={allowNamespaces:!1!==e.allowNamespaces,allowNamespacedObjects:!!e.allowNamespacedObjects},l=i,c=s(p=l.acorn||nR),u=p.tokTypes,f=c.tokTypes,d=p.tokContexts,m=c.tokContexts.tc_oTag,h=c.tokContexts.tc_cTag,g=c.tokContexts.tc_expr,y=p.isNewLine,x=p.isIdentifierStart,T=p.isIdentifierChar,class extends l{static get acornJsx(){return c}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(f.jsxTagStart);return this.getTokenFromCode(n)}return e+=this.input.slice(t,this.pos),this.finishToken(f.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:y(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):y(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(u.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(T(e)||45===e);return this.finishToken(f.jsxName,this.input.slice(t,this.pos))}jsx_parseIdentifier(){let e=this.startNode();return this.type===f.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsx_parseNamespacedName(){let e=this.start,t=this.startLoc,n=this.jsx_parseIdentifier();if(!o.allowNamespaces||!this.eat(u.colon))return n;var r=this.startNodeAt(e,t);return r.namespace=n,r.name=this.jsx_parseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===f.jsxTagEnd)return"";let e=this.start,t=this.startLoc,n=this.jsx_parseNamespacedName();for(this.type!==u.dot||"JSXNamespacedName"!==n.type||o.allowNamespacedObjects||this.unexpected();this.eat(u.dot);){let r=this.startNodeAt(e,t);r.object=n,r.property=this.jsx_parseIdentifier(),n=this.finishNode(r,"JSXMemberExpression")}return n}jsx_parseAttributeValue(){switch(this.type){case u.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 f.jsxTagStart:case u.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===u.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(u.braceR),this.finishNode(e,"JSXExpressionContainer")}jsx_parseAttribute(){let e=this.startNode();return this.eat(u.braceL)?(this.expect(u.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(u.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(u.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!==u.slash&&this.type!==f.jsxTagEnd;)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(u.slash),this.expect(f.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(f.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 f.jsxTagStart:if(e=this.start,t=this.startLoc,this.next(),this.eat(u.slash)){s=this.jsx_parseClosingElementAt(e,t);break t}r.push(this.jsx_parseElementAt(e,t));break;case f.jsxText:r.push(this.parseExprAtom());break;case u.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===u.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===f.jsxText?this.jsx_parseText():this.type===f.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===g)return this.jsx_readToken();if(t===m||t===h){if(x(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(f.jsxTagEnd);if((34===e||39===e)&&t==m)return this.jsx_readString(e)}return 60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(f.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==u.braceL){var t=this.curContext();t==m?this.context.push(d.b_expr):t==g?this.context.push(d.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else{if(this.type!==u.slash||e!==f.jsxTagStart)return super.updateContext(e);this.context.length-=2,this.context.push(h),this.exprAllowed=!1}}}}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(nR).tokTypes},configurable:!0,enumerable:!0})}(nj)),nj.exports));let nM="Keyword",n$="JSXText";function nV(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}nV.prototype={constructor:nV,translate(e,t){let n=e.type,r=this._acornTokTypes;if(n===r.name)e.type="Identifier","static"===e.value&&(e.type=nM),t.ecmaVersion>5&&("yield"===e.value||"let"===e.value)&&(e.type=nM);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=n$;else if(n.keyword)"true"===n.keyword||"false"===n.keyword?e.type="Boolean":"null"===n.keyword?e.type="Null":e.type=nM;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=n$):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=()=>{var e,t;let n,i,s;r.push((e=this._tokens,t=this._code,n=e[0],i=e.at(-1),s={type:"Template",value:t.slice(n.start,i.end)},n.loc&&(s.loc={start:n.loc.start,end:i.loc.end}),n.range&&(s.start=n.range[0],s.end=i.range[1],s.range=[s.start,s.end]),s)),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))}};let nq=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function nY(){return nq.at(-1)}let nX=Symbol("espree's internal state"),nJ=Symbol("espree's esprimaFinishNode");var nU=()=>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?nY():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),!nq.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 nV(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){var l;let p,c=(l=n,p={type:e?"Block":"#!"===l.slice(r,r+2)?"Hashbang":"Line",value:t},"number"==typeof r&&(p.start=r,p.end=i,p.range=[r,i]),"object"==typeof s&&(p.loc={start:s,end:a}),p);o.comments.push(c)}}},n),this[nX]=o}tokenize(){do this.next();while(this.type!==t.eof);this.next();let e=this[nX],n=e.tokens;return e.comments&&(n.comments=e.comments),n}finishNode(...e){let t=super.finishNode(...e);return this[nJ](t)}finishNodeAt(...e){let t=super.finishNodeAt(...e);return this[nJ](t)}parse(){let e=this[nX],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[nX].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[nX].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[nX].jsxAttrValueToken=!0),n}[nJ](e){return"TemplateElement"===e.type&&this[nX].templateElements.push(e),e.type.includes("Function")&&!e.generator&&(e.generator=!1),e}}};let nW={_regular:null,_jsx:null,get regular(){return null===this._regular&&(this._regular=tJ.extend(nU())),this._regular},get jsx(){return null===this._jsx&&(this._jsx=tJ.extend(nF(),nU())),this._jsx},get(e){return e&&e.ecmaFeatures&&e.ecmaFeatures.jsx?this.jsx:this.regular}};function nK(e,t){let n=nW.get(t);return t&&!0===t.tokens||(t=Object.assign({},t,{tokens:!0})),new n(t,e).tokenize()}let nH,nz={};for(nH in"function"==typeof Object.create&&(nz=Object.create(null)),ti)Object.hasOwn(ti,nH)&&(nz[nH]=nH);"function"==typeof Object.freeze&&Object.freeze(nz);let nG=nY();var nQ={},nZ=g?nQ:(g=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 f(e){return null!=e&&"object"==typeof e&&"string"==typeof e.type}function d(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(d(l,y[h]))i=new c(x[g],[u,g],"Property",null);else{if(!f(x[g]))continue;i=new c(x[g],[u,g],null,null)}n.push(i)}}else if(f(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(d(l,y[h]))m=new c(x[g],[b,g],"Property",new p(x,g));else{if(!f(x[g]))continue;m=new c(x[g],[b,g],null,new p(x,g))}n.push(m)}}else f(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}(nQ),nQ);let n0=new Set;function n1(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(!(_.env.TEST||n0.has(r))&&(n0.add(r),console.warn(`[@stylistic/eslint-plugin]: ${r}`)))}function n2(e,t,n,r=""){Array.isArray(t)||(t=[t]),t.forEach(t=>{e&&Object.hasOwn(e,t)&&n1(`option("${t.toString()}")`,n?`"${n.toString()}"`:void 0,r)})}var n3=tn();let n6=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,n4=new Set(["\r\n","\r","\n","\u2028","\u2029"]),n5=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),n9=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,n8=/^(?:[^\\]|\\.)*\\(?:[1-9]|0\d)/su,n7=["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","||=","&&=","??="],re=["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"],rt=[...re,"arguments","as","async","await","eval","from","get","let","of","set","type","using","yield"].concat(["accessor","satisfies"]);function rn(){return RegExp(n3.LINEBREAK_MATCHER.source,"gu")}let rr=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u;function ri(e){for(let t=e;t;t=t.parent)if(rr.test(t.type))return t;return null}function rs(e){return"Literal"===e.type&&null===e.value&&!("regex"in e)&&!("bigint"in e)}function ra(e){switch(e.type){case"Literal":if(null!==e.value||rs(e))return String(e.value);if(rS(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 ro(e){let t;if(e)switch(e.type){case"ChainExpression":return ro(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?ra(t):t.name:null}function rl(e){return e&&"ChainExpression"===e.type?e.expression:e}function rp(e,t){let n=e.getTokenBefore(t),r=e.getTokenAfter(t);return!!n&&!!r&&(0,n3.isOpeningParenToken)(n)&&n.range[1]<=t.range[0]&&(0,n3.isClosingParenToken)(r)&&r.range[0]>=t.range[1]}function rc(e){return"="===e.value&&"Punctuator"===e.type}function ru(e){return"?"===e.value&&"Punctuator"===e.type}function rf(e){return e?.type==="Keyword"}function rd(e){return"Shebang"===e.type||"Hashbang"===e.type}function rm(e){return"LogicalExpression"===e.type&&("&&"===e.operator||"||"===e.operator)}function rh(e){return"LogicalExpression"===e.type&&"??"===e.operator}function rg(e,t){return rm(e)&&rh(t)||rh(e)&&rm(t)}function ry(e,t){return e.test?t.getTokenAfter(e.test,e=>(0,n3.isColonToken)(e)):t.getFirstToken(e,1)}function rx(e){if("ExpressionStatement"!==e.type)return!1;let t=e.parent;return"Program"===t.type||"BlockStatement"===t.type&&(0,n3.isFunction)(t.parent)}function rT(e){return"Literal"===e.type&&"string"==typeof e.value||"TemplateLiteral"===e.type}function rS(e){return"Literal"===e.type&&"regex"in e}function rb(e,t){return e[0]===t&&e[e.length-1]===t}function rE(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 ti)return 20;return -1}}function rk(e){return"Literal"===e.type&&"number"==typeof e.value&&n9.test(e.raw)}function rv(e){return"Numeric"===e.type&&n9.test(e.value)}function rw(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 rA(e){return"Literal"===e.type&&("number"==typeof e.value||!!("bigint"in e&&e.bigint))}function rC(e,t){let n,r,i={comment:!0,ecmaVersion:nG,range:!0};if("string"==typeof e){let t;try{t=nK(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(rd(n))return!1;if("string"==typeof t){let e;try{e=nK(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 r_(e){return n8.test(e)}let rO=/^\s*$/u;function rP(e){return"string"==typeof e&&rO.test(e)}function rI(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&&rP(i.at(-1)));return r}function rN(e,t){let n=rI(e,t);return!!n&&!(0,n3.isTokenOnSameLine)(n,t)}function rL(e){let t="attributes"in e&&e.attributes;return t&&0!==t.length?t[t.length-1]:e.name}function rB(e){return e.loc.start.line===e.loc.end.line}function rD(e,t,n,r=()=>!0){return null!==e.getFirstTokenBetween(t,n,{includeComments:!0,filter:e=>(0,n3.isCommentToken)(e)&&r(e)})}function rj(e,t,n){return e.getTokensBetween(t,n,{includeComments:!0,filter:n3.isCommentToken})}var rR=(e=>{let t={};for(var n in e)P(t,n,{get:e[n],enumerable:!0});return t})({ASSIGNMENT_OPERATOR:()=>n7,AST_NODE_TYPES:()=>tr.AST_NODE_TYPES,AST_TOKEN_TYPES:()=>tr.AST_TOKEN_TYPES,COMMENTS_IGNORE_PATTERN:()=>n6,DECIMAL_INTEGER_PATTERN:()=>n9,ES3_KEYWORDS:()=>re,KEYWORDS:()=>rt,LINEBREAKS:()=>n4,OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN:()=>n8,STATEMENT_LIST_PARENTS:()=>n5,WHITE_SPACES_PATTERN:()=>rO,canTokensBeAdjacent:()=>rC,createGlobalLinebreakMatcher:()=>rn,getCommentsBetween:()=>rj,getFirstNodeInLine:()=>rI,getNextLocation:()=>rw,getPrecedence:()=>rE,getStaticPropertyName:()=>ro,getStaticStringValue:()=>ra,getSwitchCaseColonToken:()=>ry,getTokenBeforeClosingBracket:()=>rL,getUpperFunction:()=>ri,hasCommentsBetween:()=>rD,hasOctalOrNonOctalDecimalEscapeSequence:()=>r_,isCoalesceExpression:()=>rh,isDecimalInteger:()=>rk,isDecimalIntegerNumericToken:()=>rv,isEqToken:()=>rc,isHashbangComment:()=>rd,isKeywordToken:()=>rf,isLogicalExpression:()=>rm,isMixedLogicalAndCoalesceExpressions:()=>rg,isNodeFirstInLine:()=>rN,isNullLiteral:()=>rs,isNumericLiteral:()=>rA,isParenthesised:()=>rp,isQuestionToken:()=>ru,isRegExpLiteral:()=>rS,isSingleLine:()=>rB,isStringLiteral:()=>rT,isSurroundedBy:()=>rb,isTopLevelExpressionStatement:()=>rx,isWhiteSpaces:()=>rP,skipChainExpression:()=>rl});function rF(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}function rM(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?rF(a)&&rF(o)?n[r]=rM(a,o):n[r]=o:i?n[r]=a:n[r]=o,n},{})}function r$({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(", "))}n1(`rule("${e}")`,t)}let s=Math.max(i.options.length,n.length);return t(i,Array.from({length:s},(e,t)=>rF(i.options[t])&&rF(n[t])?rM(n[t],i.options[t]):i.options[t]??n[t]))},defaultOptions:n,meta:{...r,docs:{...r.docs,url:`https://eslint.style/rules/${e}`}}}}r=j(P(null!=(n=tn())?O(L(n)):{},"default",{value:n,enumerable:!0}),n),j(rR,r,"default");let rV=/^[a-z]/;function rq(e){let t=rJ(e);return rV.test(t)}function rY(e){return e&&["JSXElement","JSXFragment"].includes(e.type)}function rX(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 rJ(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 rU(t){return/^[\u0020-\u007F]*$/u.test(t)?t.length:[...(e??=new Intl.Segmenter).segment(t)].length}var rW=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=ri(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,"")}},rK=r$({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){var r;let i,s,a,o,l=n.elements,p=(i=!1,s=!1,a=0,(r=e.options[0])?"consistent"===r?(i=!0,a=1/0):"always"===r||"string"!=typeof r&&0===r.minItems?a=0:"never"===r?a=1/0:(s=!!r.multiline,a=r.minItems||1/0):(i=!1,s=!0,a=1/0),{ArrayExpression:o={consistent:i,multiline:s,minItems:a},ArrayPattern:o})[n.type],c=t.getFirstToken(n),u=t.getLastToken(n),f=t.getTokenAfter(c,{includeComments:!0}),d=t.getTokenBefore(u,{includeComments:!0}),m=t.getTokenAfter(c),h=t.getTokenBefore(u);l.length>=p.minItems||p.multiline&&l.length>0&&!(0,rR.isTokenOnSameLine)(d,f)||0===l.length&&"Block"===f.type&&!(0,rR.isTokenOnSameLine)(d,f)&&f===d||p.consistent&&!(0,rR.isTokenOnSameLine)(c,m)?((0,rR.isTokenOnSameLine)(c,m)&&e.report({node:n,loc:c.loc,messageId:"missingOpeningLinebreak",fix:e=>e.insertTextAfter(c,"\n")}),(0,rR.isTokenOnSameLine)(h,u)&&e.report({node:n,loc:u.loc,messageId:"missingClosingLinebreak",fix:e=>e.insertTextBefore(u,"\n")})):((0,rR.isTokenOnSameLine)(c,m)||e.report({node:n,loc:c.loc,messageId:"unexpectedOpeningLinebreak",fix(e){let n=t.getTokenAfter(c,{includeComments:!0});return!n||(0,rR.isCommentToken)(n)?null:e.removeRange([c.range[1],n.range[0]])}}),(0,rR.isTokenOnSameLine)(h,u)||e.report({node:n,loc:u.loc,messageId:"unexpectedClosingLinebreak",fix(e){let n=t.getTokenBefore(u,{includeComments:!0});return!n||(0,rR.isCommentToken)(n)?null:e.removeRange([n.range[1],u.range[0]])}}))}return{ArrayPattern:n,ArrayExpression:n}}}),rH=r$({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],f=c&&i.objectsInArraysException&&s(c)||c&&i.arraysInArraysException&&a(c)||i.singleElementException&&1===t.elements.length?!i.spaced:i.spaced,d=u&&i.objectsInArraysException&&s(u)||u&&i.arraysInArraysException&&a(u)||i.singleElementException&&1===t.elements.length?!i.spaced:i.spaced;if((0,rR.isTokenOnSameLine)(r,o)){let i;f&&!n.isSpaceBetween(r,o)&&e.report({node:t,loc:r.loc,messageId:"missingSpaceAfter",data:{tokenValue:r.value},fix:e=>e.insertTextAfter(r," ")}),!f&&n.isSpaceBetween(r,o)&&(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]])}))}if(r!==p&&(0,rR.isTokenOnSameLine)(p,l)){let r;d&&!n.isSpaceBetween(p,l)&&e.report({node:t,loc:l.loc,messageId:"missingSpaceBefore",data:{tokenValue:l.value},fix:e=>e.insertTextBefore(l," ")}),!d&&n.isSpaceBetween(p,l)&&(r=n.getTokenBefore(l),e.report({node:t,loc:{start:r.loc.end,end:l.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:l.value},fix:e=>e.removeRange([r.range[1],l.range[0]])}))}}return{ArrayPattern:o,ArrayExpression:o}}}),rz=r$({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&&!rB(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,rR.isCommaToken);!(0,rR.isTokenOnSameLine)(t.getTokenBefore(a),t.getTokenAfter(a))&&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,rR.isCommaToken),o=t.getTokenBefore(a),p=t.getTokenAfter(a);if(l){let n;(0,rR.isTokenOnSameLine)(o,p)&&(n=t.getTokenBefore(p,{includeComments:!0}),e.report({loc:{start:n.loc.end,end:p.loc.start},messageId:"missingLineBreak",fix:e=>e.replaceTextRange([n.range[1],p.range[0]],"\n")}))}else{let n;(0,rR.isTokenOnSameLine)(o,p)||(n=t.getTokenBefore(p,{includeComments:!0}),e.report({loc:{start:n.loc.end,end:p.loc.start},messageId:"unexpectedLineBreak",fix(e){if((0,rR.isCommentToken)(n))return null;if(!(0,rR.isTokenOnSameLine)(n,p))return e.replaceTextRange([n.range[1],p.range[0]]," ");let r=t.getTokenBefore(n,{includeComments:!0});return(0,rR.isCommentToken)(r)?null:e.replaceTextRange([r.range[1],n.range[0]],"")}}))}})}return{ArrayPattern:r,ArrayExpression:r}}}),rG=r$({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],rR.isClosingParenToken)}return{"ArrowFunctionExpression[params.length=1]":function(s){let a,o,l=!t||n&&"BlockStatement"===s.body.type,p=(a=r.getTokenBefore(s.params[0]))&&(0,rR.isOpeningParenToken)(a)&&s.range[0]<=a.range[0]?a:null,c=null!==p,[u]=s.params;l&&!c&&e.report({node:s,messageId:n?"expectedParensBlock":"expectedParens",loc:u.loc,*fix(e){yield e.insertTextBefore(u,"("),yield e.insertTextAfter(u,")")}}),l||!c||"Identifier"!==u.type||u.optional||u.typeAnnotation||s.returnType||r.commentsExistBetween(p,i(s))||(o=+!!s.async,r.getFirstToken(s,{skip:o})!==p)||e.report({node:s,messageId:n?"unexpectedParensInline":"unexpectedParens",loc:u.loc,*fix(e){let t=r.getTokenBefore(p),n=i(s);t&&t.range[1]===p.range[0]&&!rC(t,r.getFirstToken(u))&&(yield e.insertTextBefore(p," ")),yield e.removeRange([p.range[0],u.range[0]]),yield e.removeRange([u.range[1],n.range[1]])}})}}}}),rQ=r$({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;function r(r){let i="ArrowFunctionExpression"===r.type?n.getTokenBefore(r.body,rR.isArrowToken):n.getFirstToken(r.returnType,rR.isArrowToken),s=n.getTokenBefore(i,{includeComments:!0}),a=n.isSpaceBetween(s,i);t.before?a||e.report({node:s,messageId:"expectedBefore",fix:e=>e.insertTextBefore(i," ")}):a&&e.report({node:s,messageId:"unexpectedBefore",fix:e=>e.removeRange([s.range[1],i.range[0]])});let o=n.getTokenAfter(i,{includeComments:!0}),l=n.isSpaceBetween(i,o);t.after?l||e.report({node:o,messageId:"expectedAfter",fix:e=>e.insertTextAfter(i," ")}):l&&e.report({node:o,messageId:"unexpectedAfter",fix:e=>e.removeRange([i.range[1],o.range[0]])})}return{ArrowFunctionExpression:r,TSFunctionType:r,TSConstructorType:r}}}),rZ=r$({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,rR.isTokenOnSameLine)(e,t)||n.isSpaceBetween(e,t)===r}function a(t){let a=n.getFirstToken(t,{filter:e=>(0,rR.isOpeningBraceToken)(e)}),o=n.getLastToken(t),l=n.getTokenAfter(a,{includeComments:!0}),p=n.getTokenBefore(o,{includeComments:!0});if((0,rR.isOpeningBraceToken)(a)&&(0,rR.isClosingBraceToken)(o)&&l!==o&&(r||l.type!==tr.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}}}),r0=r$({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,rR.isTokenOnSameLine)(t,n);i||(0,rR.isTokenOnSameLine)(o,t)||e.report({node:t,messageId:"nextLineOpen",fix:a(o,t)}),i&&(0,rR.isTokenOnSameLine)(o,t)&&!c&&e.report({node:t,messageId:"sameLineOpen",fix:e=>e.insertTextBefore(t,"\n")}),(0,rR.isTokenOnSameLine)(t,p)&&p!==n&&!c&&e.report({node:t,messageId:"blockSameLine",fix:e=>e.insertTextAfter(t,"\n")}),(0,rR.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,rR.isTokenOnSameLine)(t,r)||e.report({node:t,messageId:"nextLineClose",fix:a(t,r)}),"1tbs"!==n&&(0,rR.isTokenOnSameLine)(t,r)&&e.report({node:t,messageId:"sameLineClose",fix:e=>e.insertTextAfter(t,"\n")})}return{BlockStatement(e){n5.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))}}}});let r1=["always-multiline","always","never","only-multiline"];var r2=r$({name:"comma-dangle",meta:{type:"layout",docs:{description:"Require or disallow trailing commas"},schema:{$defs:{value:{type:"string",enum:r1},valueWithIgnore:{type:"string",enum:[...r1,"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,rR.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===tr.AST_NODE_TYPES.TSTypeParameterDeclaration&&1===t.node.params.length)return;let n=t.lastItem;if(!n)return;let s=l(t);s&&(0,rR.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:rw(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)})},TSTypeParameterInstantiation(e){a.never({node:e,lastItem:o(e.params)})},TSTupleType(e){a[n.tuples]({node:e,lastItem:o(e.elementTypes)})},TSDeclareFunction(e){a[n.functions]({node:e,lastItem:o(e.params)})},TSFunctionType(e){a[n.functions]({node:e,lastItem:o(e.params)})}}}}),r3=r$({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,rR.isCommaToken)(e)&&a.add(e):e=i.getTokenAfter(n),t=e}}return{ArrayExpression:o,ArrayPattern:o,TSTypeParameterDeclaration:function(e){let t=e.params.length;if(t){let n=e.params[t-1],r=i.getTokenAfter(n);r&&(0,rR.isCommaToken)(r)&&a.add(r)}},"Program:exit":function(){s.forEach((t,o)=>{var l,p;if(!(0,rR.isCommaToken)(t))return;let c=s[o-1],u=s[o+1];l=(0,rR.isCommaToken)(c)||a.has(t)?null:c,p=u&&(0,rR.isCommaToken)(u)||a.has(t)?null:u,l&&(0,rR.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,rR.isTokenOnSameLine)(t,p)&&!(0,rR.isClosingParenToken)(p)&&!(0,rR.isClosingBracketToken)(p)&&!(0,rR.isClosingBraceToken)(p)&&!(!r&&p.type===tr.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]],"")})})}}}}),r6=r$({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.hasOwn(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(rR.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(rR.isCommaToken);let i=[],s=r[0],a=n.getTokenBefore(s);for(;a&&e.range[0]<=a.range[0];){if((0,rR.isCommaToken)(a))i.unshift(a);else if((0,rR.isNotOpeningParenToken)(a))break;a=n.getTokenBefore(a)}let o=null;for(let e of r){o&&i.push(...n.getTokensBetween(o,e).filter(rR.isCommaToken));let t=n.getLastToken(e);t&&(0,rR.isCommaToken)(t)&&i.push(t),o=e}let l=n.getTokenAfter(o);for(;l&&l.range[1]<=e.range[1];){if((0,rR.isCommaToken)(l))i.push(l);else if((0,rR.isNotClosingParenToken)(l))break;l=n.getTokenAfter(l)}return i})(r,s).forEach(r=>{let s=n.getTokenBefore(r),a=n.getTokenAfter(r);if(!((0,rR.isOpeningBracketToken)(s)||(0,rR.isCommaToken)(s)&&(0,rR.isOpeningBracketToken)(n.getTokenBefore(s,rR.isNotCommaToken)))&&(!(0,rR.isCommaToken)(a)||(0,rR.isTokenOnSameLine)(r,a)))if((0,rR.isTokenOnSameLine)(r,a)&&(0,rR.isTokenOnSameLine)(s,r));else if((0,rR.isTokenOnSameLine)(r,a)||(0,rR.isTokenOnSameLine)(s,r))"first"!==t||(0,rR.isTokenOnSameLine)(r,a)?"last"===t&&(0,rR.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,rR.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=f),r.ClassExpression||(a.ClassExpression=f),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=d),r.TSTypeLiteral||(a.TSTypeLiteral=d),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 f(e){e.implements&&s(e,e.implements)}function d(e){s(e,e.members)}function m(e){s(e,e.params)}}}),r4=r$({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("TSIndexedAccessType"!==i.type&&!i.computed)return;let s=i[r],a=t.getTokenBefore(s,rR.isOpeningBracketToken),o=t.getTokenAfter(a,{includeComments:!0}),l=t.getTokenAfter(s,rR.isClosingBracketToken),p=t.getTokenBefore(l,{includeComments:!0});(0,rR.isTokenOnSameLine)(a,o)&&(n?!t.isSpaceBetween(a,o)&&(0,rR.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,rR.isTokenOnSameLine)(p,l)&&(n?!t.isSpaceBetween(p,l)&&(0,rR.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"),TSIndexedAccessType:i("indexType")};return r&&(s.MethodDefinition=i("key"),s.PropertyDefinition=i("key"),s.AccessorProperty=i("key")),s}});let r5={multiline:{type:"boolean"},minElements:{type:"integer",minimum:0},consistent:{type:"boolean"}},r9={oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:r5,additionalProperties:!1}]};var r8=((s=r8||{}).IfStatementConsequent="IfStatementConsequent",s.IfStatementAlternative="IfStatementAlternative",s.DoWhileStatement="DoWhileStatement",s.ForInStatement="ForInStatement",s.ForOfStatement="ForOfStatement",s.ForStatement="ForStatement",s.WhileStatement="WhileStatement",s.SwitchStatement="SwitchStatement",s.SwitchCase="SwitchCase",s.TryStatementBlock="TryStatementBlock",s.TryStatementHandler="TryStatementHandler",s.TryStatementFinalizer="TryStatementFinalizer",s.BlockStatement="BlockStatement",s.ArrowFunctionExpression="ArrowFunctionExpression",s.FunctionDeclaration="FunctionDeclaration",s.FunctionExpression="FunctionExpression",s.Property="Property",s.ClassBody="ClassBody",s.StaticBlock="StaticBlock",s.WithStatement="WithStatement",s.TSModuleBlock="TSModuleBlock",s);let r7={multiline:!1,minElements:1/0,consistent:!0},ie={multiline:!1,minElements:0,consistent:!1},it={multiline:!1,minElements:1/0,consistent:!1};function ir(e){return"always"===e?ie:"never"===e?it:e?{consistent:!!e.consistent,minElements:e.minElements??1/0,multiline:!!e.multiline}:r7}var ii=r$({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(r8).map(([e])=>[e,r9])),...r5},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){var t;let n,r=e.sourceCode,i=(n=ir(t=e.options[0]),Object.fromEntries(Object.entries(r8).map(([e])=>[e,"object"==typeof t&&null!=t&&e in t?ir(t[e]):n])));function s(t,n){let s,a,o,l=i[n];switch(t.type){case"SwitchStatement":a=r.getLastToken(t),s=r.getTokenBefore(t.cases.length?t.cases[0]:a),o=t.cases.length;break;case"StaticBlock":s=r.getFirstToken(t,e=>"{"===e.value),a=r.getLastToken(t),o=t.body.length;break;default:s=r.getFirstToken(t),a=r.getLastToken(t),o=t.body.length}let p=r.getTokenAfter(s,{includeComments:!0}),c=r.getTokenBefore(a,{includeComments:!0}),u=o>=l.minElements||l.multiline&&o>0&&!(0,rR.isTokenOnSameLine)(c,p),f=(0,rR.isCommentToken)(p),d=(0,rR.isCommentToken)(c);if(p=r.getTokenAfter(s),c=r.getTokenBefore(a),u)(0,rR.isTokenOnSameLine)(s,p)&&e.report({messageId:"expectedLinebreakAfterOpeningBrace",node:t,loc:s.loc,fix:e=>f?null:e.insertTextAfter(s,"\n")}),(0,rR.isTokenOnSameLine)(c,a)&&e.report({messageId:"expectedLinebreakBeforeClosingBrace",node:t,loc:a.loc,fix:e=>d?null:e.insertTextBefore(a,"\n")});else{let n=l.consistent,r=!(0,rR.isTokenOnSameLine)(s,p),i=!(0,rR.isTokenOnSameLine)(c,a);(!n&&r||n&&r&&!i)&&e.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:t,loc:s.loc,fix:e=>f?null:e.removeRange([s.range[1],p.range[0]])}),(!n&&i||n&&!r&&i)&&e.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:t,loc:a.loc,fix:e=>d?null:e.removeRange([c.range[1],a.range[0]])})}}function a(e){s(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":s(e,t.type);break;case"FunctionExpression":"Property"===t.parent.type&&t.parent.method?s(e,"Property"):s(e,t.type);break;case"IfStatement":e===t.consequent&&s(e,"IfStatementConsequent"),e===t.alternate&&s(e,"IfStatementAlternative");break;case"TryStatement":e===t.block&&s(e,"TryStatementBlock"),e===t.finalizer&&s(e,"TryStatementFinalizer");break;case"CatchClause":s(e,"TryStatementHandler");break;default:"SwitchCase"===t.type&&1===t.consequent.length?s(e,"SwitchCase"):s(e,"BlockStatement")}},SwitchStatement:a,ClassBody:a,StaticBlock:a,TSModuleBlock:a}}}),is=r$({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,rR.isTokenOnSameLine)(n,s)&&e.report({node:t,loc:s.loc,messageId:"expectedDotAfterObject",*fix(e){s.value.startsWith(".")&&rv(n)?yield e.insertTextAfter(n,` ${s.value}`):yield e.insertTextAfter(n,s.value),yield e.remove(s)}})}else s&&!(0,rR.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)}}}}),ia=r$({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&&(n1('option("unix")','"always" and "@stylistic/eslint-plugin/rules/linebreak-style"',"eol-last"),o="always"),"windows"===o&&(n1('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")})}})}),io=r$({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,rR.isTokenOnSameLine)(e,t),createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]]," ")},r={messageId:"missingLineBreak",check:(e,t)=>(0,rR.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";"never"===a?i(s,n):"always"===a?i(s,r):"consistent"===a&&((0,rR.isTokenOnSameLine)(t.getLastToken(s[0]),t.getFirstToken(s[1]))?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])}}}}),il=r$({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,rR.isOptionalCallExpression)(n),c=i.slice(o.range[1],l.range[0]).replace(/\/\*.*?\*\//gu,""),u=/\s/u.test(c),f=u&&rR.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),d=t?p:!p,m=i?u:!u,h=s||!f;d&&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(rR.LINEBREAK_MATCHER.source,"g");n=n.replaceAll(e," ")}return d||(n=t?` ${n}`:n.trimStart()),m||(n=i?`${n} `:n.trimEnd()),e.replaceTextRange([o.range[1],l.range[0]],n)}})}else u?!s&&f&&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,rR.isOpeningParenToken);i&&!(i.range[1]>=e.range[1])&&o(e,r.getTokenBefore(i,rR.isNotOptionalChainPunctuator),i)},ImportExpression(e){let t=r.getFirstToken(e);o(e,t,r.getTokenAfter(t))}}}}),ip=r$({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,rR.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,rR.isOpeningParenToken)(t))};switch(e.type){case"NewExpression":if(!e.arguments.length&&!((0,rR.isOpeningParenToken)(n.getLastToken(e,{skip:1}))&&(0,rR.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());return{leftParen:r,rightParen:e.params.length?n.getTokenAfter(e.params[e.params.length-1],rR.isClosingParenToken):n.getTokenAfter(r)}}case"ArrowFunctionExpression":{let t=n.getFirstToken(e,{skip:+!!e.async});if(!(0,rR.isOpeningParenToken)(t))return null;return{leftParen:t,rightParen:e.params.length?n.getTokenAfter(e.params[e.params.length-1],rR.isClosingParenToken):n.getTokenAfter(t)}}case"ImportExpression":return{leftParen:n.getFirstToken(e,1),rightParen:n.getLastToken(e)};default:throw TypeError(`unexpected node with type ${e.type}`)}}(t);if(r="ImportExpression"===t.type?[t.source,...t.options?[t.options]:[]]:(0,rR.isFunction)(t)?t.params:t.arguments,i){let t,a,l,p,c,u,f;t=i.leftParen,a=i.rightParen,l=n.getTokenAfter(t),p=n.getTokenBefore(a),c=!(0,rR.isTokenOnSameLine)(t,l),u=!(0,rR.isTokenOnSameLine)(p,a),f=o(r,c),c&&!f?e.report({node:t,messageId:"unexpectedAfter",fix:e=>n.getText().slice(t.range[1],l.range[0]).trim()?null:e.removeRange([t.range[1],l.range[0]])}):!c&&f&&e.report({node:t,messageId:"expectedAfter",fix:e=>e.insertTextAfter(t,"\n")}),u&&!f?e.report({node:a,messageId:"unexpectedBefore",fix:e=>n.getText().slice(p.range[1],a.range[0]).trim()?null:e.removeRange([p.range[1],a.range[0]])}):!u&&f&&e.report({node:a,messageId:"expectedBefore",fix:e=>e.insertTextBefore(a,"\n")}),s&&function(t,r){let i=t.leftParen,s=o(r,!(0,rR.isTokenOnSameLine)(i,n.getTokenAfter(i)));for(let t=0;t<=r.length-2;t++){let n=r[t],i=r[t+1];(0,rR.isTokenOnSameLine)(n,i)&&s&&e.report({node:n,messageId:"expectedBetween",fix:e=>e.insertTextBefore(i,"\n")})}}(i,r)}}}}});let ic={oneOf:[{type:"string",enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]};var iu=r$({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:ic,anonymous:ic,method:ic,shorthand:ic},additionalProperties:!1}]}],defaultOptions:[{before:!0,after:!1}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e,[t]){let n={before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}};function r(e,t){return e?"string"==typeof e?n[e]:Object.assign({},t,e):t}let i=function(){let e=r(t,n.before),{named:i,anonymous:s,method:a,shorthand:o}=t;return{named:r(i,e),anonymous:r(s,e),method:r(a,e),shorthand:r(o??a,e)}}(),s=e.sourceCode;function a(e){return"*"===e.value&&"Punctuator"===e.type}function o(t,n,r,s){if(!!(s.range[0]-r.range[1])!==i[t][n]){let a="*"===r.value,o=i[t][n],l=a?r: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([r.range[1],s.range[0]])})}}function l(e){if(!e.generator)return;let t=s.getFirstToken("method"in e.parent&&e.parent.method||"MethodDefinition"===e.parent.type?e.parent:e,a),n=s.getTokenBefore(t),r=s.getTokenAfter(t),i="named";"Property"===e.parent.type&&e.parent.method?i="shorthand":"MethodDefinition"===e.parent.type?i="method":e.id||(i="anonymous"),("method"!==i&&"shorthand"!==i||t!==s.getFirstToken(e.parent))&&o(i,"before",n,t),o(i,"after",t,r)}return{FunctionDeclaration:l,FunctionExpression:l}}}),id=r$({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,rR.isNotOpeningParenToken),s=t.getTokenAfter(i),a=(0,rR.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=>rD(t,i,s)?null:e.replaceTextRange([i.range[1],s.range[0]]," ")})})(r)}}}),im=r$({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 f=n.getTokenBefore(a),d=n.getTokenBefore(u);if(c.loc.start.line===d.loc.start.line)return;let m=(l=d.loc.start.line,n.tokensAndComments.find(e=>e.loc.start.line===l)),h=(p=d.loc.start.line,[...n.tokensAndComments].reverse().find(e=>e.loc.end.line===p)),g=rf(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(n7).includes(h?.value||"")||["[","(","{","=>",":"].concat(n7).includes(f?.value||"")&&m?.loc.start.line===f?.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}(d.loc.start.line)&&!["]",")","}"].includes(m?.value||""),x=s(d.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)})}}}});let ih=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",tr.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",tr.AST_NODE_TYPES.TSAbstractKeyword,tr.AST_NODE_TYPES.TSAnyKeyword,tr.AST_NODE_TYPES.TSBooleanKeyword,tr.AST_NODE_TYPES.TSNeverKeyword,tr.AST_NODE_TYPES.TSNumberKeyword,tr.AST_NODE_TYPES.TSStringKeyword,tr.AST_NODE_TYPES.TSSymbolKeyword,tr.AST_NODE_TYPES.TSUndefinedKeyword,tr.AST_NODE_TYPES.TSUnknownKeyword,tr.AST_NODE_TYPES.TSVoidKeyword,tr.AST_NODE_TYPES.TSNullKeyword,tr.AST_NODE_TYPES.TSAbstractPropertyDefinition,tr.AST_NODE_TYPES.TSAbstractAccessorProperty,tr.AST_NODE_TYPES.TSAbstractMethodDefinition,tr.AST_NODE_TYPES.TSArrayType,tr.AST_NODE_TYPES.TSAsExpression,tr.AST_NODE_TYPES.TSCallSignatureDeclaration,tr.AST_NODE_TYPES.TSConditionalType,tr.AST_NODE_TYPES.TSConstructorType,tr.AST_NODE_TYPES.TSConstructSignatureDeclaration,tr.AST_NODE_TYPES.TSDeclareFunction,tr.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,tr.AST_NODE_TYPES.TSEnumDeclaration,tr.AST_NODE_TYPES.TSEnumBody,tr.AST_NODE_TYPES.TSEnumMember,tr.AST_NODE_TYPES.TSExportAssignment,tr.AST_NODE_TYPES.TSExternalModuleReference,tr.AST_NODE_TYPES.TSFunctionType,tr.AST_NODE_TYPES.TSImportType,tr.AST_NODE_TYPES.TSIndexedAccessType,tr.AST_NODE_TYPES.TSIndexSignature,tr.AST_NODE_TYPES.TSInferType,tr.AST_NODE_TYPES.TSInterfaceBody,tr.AST_NODE_TYPES.TSInterfaceDeclaration,tr.AST_NODE_TYPES.TSInterfaceHeritage,tr.AST_NODE_TYPES.TSImportEqualsDeclaration,tr.AST_NODE_TYPES.TSLiteralType,tr.AST_NODE_TYPES.TSMappedType,tr.AST_NODE_TYPES.TSMethodSignature,"TSMinusToken",tr.AST_NODE_TYPES.TSModuleBlock,tr.AST_NODE_TYPES.TSModuleDeclaration,tr.AST_NODE_TYPES.TSNonNullExpression,tr.AST_NODE_TYPES.TSParameterProperty,"TSPlusToken",tr.AST_NODE_TYPES.TSPropertySignature,tr.AST_NODE_TYPES.TSQualifiedName,"TSQuestionToken",tr.AST_NODE_TYPES.TSRestType,tr.AST_NODE_TYPES.TSThisType,tr.AST_NODE_TYPES.TSTupleType,tr.AST_NODE_TYPES.TSTypeAliasDeclaration,tr.AST_NODE_TYPES.TSTypeAnnotation,tr.AST_NODE_TYPES.TSTypeLiteral,tr.AST_NODE_TYPES.TSTypeOperator,tr.AST_NODE_TYPES.TSTypeParameter,tr.AST_NODE_TYPES.TSTypeParameterDeclaration,tr.AST_NODE_TYPES.TSTypeParameterInstantiation,tr.AST_NODE_TYPES.TSTypeReference,tr.AST_NODE_TYPES.Decorator]);var ig=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)}},iy=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])}},ix=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 ig(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}};let iT={oneOf:[{type:"integer",minimum:0},{type:"string",enum:["first","off"]}]};var iS=r$({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:[iT,{type:"object",properties:{var:iT,let:iT,const:iT,using:iT},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:iT,body:{type:"integer",minimum:0},returnType:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:iT,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:iT},additionalProperties:!1},ArrayExpression:iT,ObjectExpression:iT,ImportDeclaration:iT,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{oneOf:[{type:"boolean"},{type:"object",properties:{CallExpression:{type:"boolean"},AwaitExpression:{type:"boolean"},NewExpression:{type:"boolean"}},additionalProperties:!1}],default:!1},offsetTernaryExpressionsOffsetCallExpressions:{type:"boolean"},ignoredNodes:{type:"array",items:{type:"string",not:{type:"string",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){n2(e.options[1],"offsetTernaryExpressionsOffsetCallExpressions","offsetTernaryExpressions.CallExpression","indent");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 iy(s),o=new ix(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,rR.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,a=e[l-1],p=a&&i(a),c=a&&s.getLastToken(a);a&&c.loc.end.line-(null===(r=c.value.match(/\s*$/u)[0].match(rn()))?0:r.length)>t.loc.end.line&&o.setDesiredOffsets([a.range[1],n.range[1]],p,0)}})}function f(e){if("BlockStatement"!==e.type){let t=s.getTokenBefore(e,rR.isNotOpeningParenToken),n=s.getFirstToken(e),r=s.getLastToken(e);for(;(0,rR.isOpeningParenToken)(s.getTokenBefore(n))&&(0,rR.isClosingParenToken)(s.getTokenAfter(r));)n=s.getTokenBefore(n),r=s.getTokenAfter(r);o.setDesiredOffsets([n.range[0],r.range[1]],t,1)}}function d(e){let t;t=e.arguments.length?s.getTokenAfter(e.typeArguments??e.callee,rR.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,rR.isOptionalChainPunctuator),r=s.getTokensBetween(e.callee,n,{filter:rR.isClosingParenToken}).length,i=r?s.getTokenBefore(e.callee,{skip:r-1}):s.getFirstToken(e.callee),a=s.getTokenBefore(n),l=(0,rR.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===tr.AST_NODE_TYPES.TSTupleType?e.elementTypes:e.elements,n=s.getFirstToken(e);u(t,n,s.getTokenAfter([...t].reverse().find(e=>e)||n,rR.isClosingBracketToken),i.ArrayExpression)}function T(e,t){let n=s.getFirstToken(e,rR.isOpeningBraceToken);u(t,n,s.getTokenAfter(t.length?t[t.length-1]:n,rR.isClosingBraceToken),i.ObjectExpression)}function S(e,t,n,r){let a=s.getFirstToken(e);if(i.flatTernaryExpressions&&(0,rR.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))return;let l=!0===i.offsetTernaryExpressions?{CallExpression:i.offsetTernaryExpressionsOffsetCallExpressions??!0,AwaitExpression:i.offsetTernaryExpressionsOffsetCallExpressions??!0,NewExpression:!0}:i.offsetTernaryExpressions;function p(e,t){let n=1;if(l){let r=rl(e).type;("Punctuator"===t.type||l[r])&&(n=2)}o.setDesiredOffset(t,a,n)}let c=s.getFirstTokenBetween(t,n,ru),u=s.getFirstTokenBetween(n,r,rR.isColonToken),f=s.getTokenAfter(c),d=s.getTokenBefore(u),m=s.getTokenAfter(u);o.setDesiredOffset(c,a,1),o.setDesiredOffset(u,a,1),p(n,f),(0,rR.isTokenOnSameLine)(d,m)?o.setDesiredOffset(m,f,0):p(r,m)}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,rR.isNotClosingParenToken),l=s.getTokenAfter(a),p=s.getTokensBetween(t,n,{filter:rR.isClosingParenToken}).length,c=p?s.getTokenBefore(t,{skip:p-1}):s.getFirstToken(t),u=s.getTokenBefore(a),f=r?a:l;r&&(o.setDesiredOffset(s.getLastToken(e),a,0),o.setDesiredOffsets(n.range,a,1));let d=(0,rR.isTokenOnSameLine)(u,f)?u:c;"number"==typeof i.MemberExpression?(o.setDesiredOffset(a,d,i.MemberExpression),o.setDesiredOffset(l,r?a:d,i.MemberExpression)):(o.ignoreToken(a),o.ignoreToken(l),o.setDesiredOffset(a,d,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,n5.has(e.parent.type)||o.setDesiredOffset(s.getFirstToken(e),s.getFirstToken(e.parent),0),u(e.type===tr.AST_NODE_TYPES.TSEnumBody?e.members:e.body,s.getFirstToken(e),s.getLastToken(e),t)}function v(e,t){let n=s.getFirstToken(e),r=s.getTokenBefore(t[0],rR.isNotOpeningParenToken);o.setDesiredOffsets([r.range[0],e.body.range[0]],n,1)}function w(e){let t,n=s.getFirstToken(e),r=s.getLastToken(e);if(e.computed){let r=s.getTokenBefore(e.key,rR.isOpeningBracketToken),i=t=s.getTokenAfter(e.key,rR.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,rc);y(t),(0,rR.isSemicolonToken)(r)&&o.setDesiredOffset(r,t,1)}else(0,rR.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,rR.isOpeningParenToken)(t)){let n=s.getTokenBefore(e.returnType??e.body,{filter:rR.isClosingParenToken});l.add(t),l.add(n),u(e.params,t,n,i.FunctionExpression.parameters)}f(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,rc))},BinaryExpression(e){b(e.left,e.right,e.operator)},LogicalExpression(e){b(e.left,e.right,e.operator)},BlockStatement:k,ClassBody:k,CallExpression:d,ClassDeclaration(e){e.superClass&&v(e,[e.superClass])},ClassExpression(e){e.superClass&&v(e,[e.superClass])},ConditionalExpression(e){S(e,e.test,e.consequent,e.alternate)},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":function(e){f(e.body)},ExportNamedDeclaration(e){if(null===e.declaration){let t=e.source?s.getTokenBefore(e.source,rR.isClosingBraceToken):s.getLastToken(e,rR.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,rR.isNotSemicolonToken);o.setDesiredOffsets([n.range[0],r.range[1]],s.getFirstToken(e),1);let i=s.getLastToken(e,rR.isClosingBraceToken);if(i&&e.source.range[1]<i.range[0]){let t=s.getTokenAfter(e.source,rR.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,rR.isNotSemicolonToken);o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1);let r=s.getLastToken(e,rR.isClosingBraceToken);if(r&&e.source.range[1]<r.range[0]){let t=s.getTokenAfter(e.source,rR.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),f(e.body)},"FunctionDeclaration, FunctionExpression":function(e){let t=s.getTokenBefore(e.returnType??e.body,{filter:rR.isClosingParenToken}),n=s.getTokenBefore(e.params.length?e.params[0].decorators?.[0]??e.params[0]:t,{filter:rR.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){f(e.consequent),e.alternate&&f(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,rR.isSemicolonToken)(t)){let n=s.getTokenBefore(t),r=s.getTokenAfter(t);!(0,rR.isTokenOnSameLine)(n,t)&&r&&(0,rR.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,rR.isOpeningBraceToken),n=s.getTokenBefore(e.source,rR.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,rR.isNotSemicolonToken);t&&o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1);let r=s.getLastToken(e,rR.isClosingBraceToken);if(r&&e.source.range[1]<r.range[0]){let i=s.getTokenAfter(e.source,rR.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,rR.isClosingParenToken)(s.getLastToken(e))&&(0,rR.isOpeningParenToken)(s.getLastToken(e,1)))&&d(e)},Property(e){if(!e.shorthand&&!e.method&&"init"===e.kind){let t=s.getFirstTokenBetween(e.key,e.value,rR.isColonToken);o.ignoreToken(s.getTokenAfter(t))}},PropertyDefinition:w,AccessorProperty:w,TSAbstractPropertyDefinition:w,TSAbstractAccessorProperty:w,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,rR.isOpeningBraceToken),n=s.getLastToken(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,i.SwitchCase),e.cases.length&&rj(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=rB(l)?s.getFirstToken(l):null,u=(0,rR.isTokenOnSameLine)(l,t),f=(0,rR.isTokenOnSameLine)(t,p);if(c||f&&!u){o.setDesiredOffsets([l.range[1],p.range[0]],c,1),o.setDesiredOffset(s.getFirstToken(p),c,0);return}let d=s.text.slice(l.range[1]-l.loc.end.column,l.range[1]-2).split(""),m=d.findIndex(e=>" "!==e&&" "!==e);-1===m&&(m=d.length);let h=d.slice(0,m).filter(e=>" "===e).length,g=m-h+Math.ceil(h/("tab"===n?i.tabLength:r)),y=f?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.hasOwn(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,rR.isSemicolonToken)(c)&&o.ignoreToken(c)},VariableDeclarator(e){e.init&&y(s.getTokenBefore(e.init,rR.isNotOpeningParenToken));let t=s.getLastToken(e);(0,rR.isSemicolonToken)(t)&&o.ignoreToken(t)},JSXText(t){if(!t.parent||"JSXElement"!==t.parent.type&&"JSXFragment"!==t.parent.type)return;let n=RegExp(`
3
+ (${o._indentType}*)[ ]*\\S`,"g"),i=Array.from(String(t.value).matchAll(n),e=>e[1]?e[1].length:0);if(0===i.length)return;let a=s.lines[t.parent.loc.start.line-1].slice(0,t.parent.loc.start.column),l=RegExp(`^[${o._indentType}]+`).exec(a),c=(l?l[0].length:0)+r;i.forEach(n=>{n!==c&&e.report({node:t,messageId:"wrongIndentation",data:p(c,n,n),fix(e){let n=Array(c+1).join(o._indentType),r=t.raw.replace(/\n[\t ]*(\S)/g,(e,t)=>`
4
+ ${n}${t}`);return e.replaceText(t,r)}})})},JSXAttribute(e){e.value&&y(s.getFirstTokenBetween(e.name,e.value,rc))},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,rR.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,rR.isNotOpeningParenToken));let t=s.getLastToken(e);(0,rR.isSemicolonToken)(t)&&o.ignoreToken(t)},TSTupleType:x,TSEnumBody:k,TSEnumMember(e){e.initializer&&y(s.getTokenBefore(e.initializer,rc))},TSTypeLiteral(e){T(e,e.members)},TSMappedType(e){let t=s.getTokenBefore(e.constraint||e.typeParameter);T(e,[{parent:e,type:tr.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}])},TSAsExpression(e){b(e.expression,e.typeAnnotation,"as")},TSConditionalType(e){S(e,{parent:e,type:tr.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,rc));let t=s.getLastToken(e);(0,rR.isSemicolonToken)(t)&&o.ignoreToken(t)},TSIndexedAccessType(e){E(e,e.objectType,e.indexType,!0)},TSInterfaceBody:k,TSInterfaceDeclaration(e){0!==e.extends.length&&v(e,e.extends)},TSQualifiedName(e){E(e,e.left,e.right)},TSTypeParameter(e){e.default&&y(s.getTokenBefore(e.default,rc))},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){ih.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,rR.isOpeningParenToken)(i)?t.push(i):(0,rR.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,rR.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,rR.isSemicolonToken)(n)&&!(0,rR.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))}}}}}});let ib=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 iE=r$({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&&ib.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}}}),ik=r$({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,l,p,c,u,f,d,m,h,g=n.attributes.at(-1),y=g?g.range[1]:null,x=(p=(l=e.sourceCode).getFirstToken(n).loc.start,c=l.getLastTokens(n,n.selfClosing?2:1)[0].loc.start,u=l.getFirstToken(n.name).loc.start,n.attributes.length&&(o=n.attributes[n.attributes.length-1],o={column:l.getFirstToken(o).loc.start.column,firstLine:l.getFirstToken(o).loc.start.line,lastLine:l.getLastToken(o).loc.end.line}),f=l.lines[p.line-1],d=l.lines[c.line-1],m={openTab:/^\t/.test(f),closeTab:/^\t/.test(d)},h={column:/^\s*/.exec(f)?.[0].length,line:p.line},{isTab:m,tag:u,opening:p,closing:c,lastProp:o,selfClosing:n.selfClosing,openingStartOfLine:h}),T=void 0===x.lastProp?"after-tag":x.opening.line===x.lastProp.lastLine?"after-props":x.selfClosing?i.selfClosing:i.nonEmpty,S=!0;"tag-aligned"===T&&(S=x.isTab.openTab===x.isTab.closeTab);let b=e.sourceCode.getCommentsInside(n).at(-1),E=b&&b.range[0]>(g??n.name).range[1];if(("after-props"===T||"after-tag"===T)&&!(a(x,T)&&S)&&E&&(T="line-aligned"),a(x,T)&&S)return;let k={location:t[T],details:""},v=s(x,T);null!==v&&(r=x.lastProp&&x.lastProp.lastLine===x.closing.line,k.details=` (expected column ${v+1}${r?" on the next line)":")"}`),e.report({node:n,messageId:"bracketLocation",loc:x.closing,data:k,fix(t){let i=x.selfClosing?"/>":">";switch(T){case"after-tag":if(y)return t.replaceTextRange([y,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([y,n.range[1]],(r?"\n":"")+i);case"props-aligned":case"tag-aligned":case"line-aligned":{let r=E?b.range[1]:y;return t.replaceTextRange([r,n.range[1]],`
5
+ ${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(" ")}(x,T,v)}${i}`)}}return null}})}}}});let iv="tag-aligned",iw={"tag-aligned":"matchIndent","line-aligned":"alignWithOpening"};var iA=r$({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:iv}]}]},defaultOptions:[iv],create(e){let t=e.options[0]||iv;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=rN(e,n)?iw[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 rN(e,n)?r.replaceTextRange([n.range[0]-n.loc.start.column,n.range[0]],s):r.insertTextBefore(n,`
6
+ ${s}`)}})}return{JSXClosingElement:n,JSXClosingFragment:n}}});let iC="always",i_="never",iO="ignore",iP=[iC,i_,iO],iI={props:i_,children:i_,propElementValues:iO};var iN=r$({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:iP},children:{type:"string",enum:iP},propElementValues:{type:"string",enum:iP}},additionalProperties:!1},{type:"string",enum:iP}]}]},create(e){let t=e.options[0],n="string"==typeof t?{props:t,children:t,propElementValues:iO}:Object.assign({},iI,t);function r(e){return rR.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&&rP(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=rY(i)?e.sourceCode.getText(i):"JSXAttribute"===t.parent.type?`"${"TemplateLiteral"===i.type?i.quasis[0].value.raw:i.raw.slice(1,-1)}"`:rY(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&&rP(e.value)}function f(e){return/^\s|\s$/.test(e)}function d(e,t,n){return"JSXAttribute"===e.type&&"string"==typeof t.props&&t.props===n||rY(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===i_&&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||rY(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))&&d(i,t,i_)})(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&&f(n.value)))&&(s=n.value,!/\/\*/.test(s))&&!o(n.raw,t)&&(rY(t.parent)||!a(n.value)))?"TemplateLiteral"!==r||0!==n.expressions.length||n.quasis[0].value.raw.includes("\n")||f(n.quasis[0].value.raw)||o(n.quasis[0].value.raw,t)||a(n.quasis[0].value.cooked)?rY(n)&&c(t):c(t):c(t)}}(t)},"JSXAttribute > JSXElement, Literal, JSXText":function(t){(function(e,t){if(rY(e))return t.propElementValues!==iO;if(p(e.raw)||s(e.raw))return!1;let n=e.parent;return!(n.children&&1===n.children.length&&l(n.children[0]))&&d(n,t,iC)})(t,n)&&e.report({messageId:"missingCurly",node:t,fix(n){var a;if(rY(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);if(i(e)){let e,t;return`${n}${e="<HTML_ENTITY>",t=r.split(/&[A-Z\d#]+;/gi).map(e=>""===e?"":`{${JSON.stringify(e)}}`).join(e),r.match(/&[A-Z\d#]+;/gi).reduce((t,n)=>t.replace(e,n),t)}`}return`${n}{${JSON.stringify(r)}}`}).join("\n"):`{${JSON.stringify(a)}}`;return n.replaceText(t,o)}})}}}}),iL=r$({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,n=e.sourceCode,r="consistent"===(t=e.options[0]||"consistent")?{multiline:"consistent",singleline:"consistent"}:"never"===t?{multiline:"forbid",singleline:"forbid"}:{multiline:t.multiline||"consistent",singleline:t.singleline||"consistent"};return{JSXExpressionContainer(t){var i,s;let a,o,l,p,c,u,f;i={leftCurly:n.getFirstToken(t),rightCurly:n.getLastToken(t)},s=t.expression,a=i.leftCurly,o=i.rightCurly,l=n.getTokenAfter(a),p=n.getTokenBefore(o),c=!(0,rR.isTokenOnSameLine)(a,l),u=!(0,rR.isTokenOnSameLine)(p,o),f=function(e,t){switch(!rB(e)?r.multiline:r.singleline){case"forbid":return!1;case"require":return!0;default:return t}}(s,c),c&&!f?e.report({node:a,messageId:"unexpectedAfter",fix:e=>n.getText().slice(a.range[1],l?.range[0]).trim()?null:e.removeRange([a.range[1],l.range[0]])}):!c&&f&&e.report({node:a,messageId:"expectedAfter",fix:e=>e.insertTextAfter(a,"\n")}),u&&!f?e.report({node:o,messageId:"unexpectedBefore",fix:e=>n.getText().slice(p.range[1],o.range[0]).trim()?null:e.removeRange([p.range[1],o.range[0]])}):!u&&f&&e.report({node:o,messageId:"expectedBefore",fix:e=>e.insertTextBefore(o,"\n")})}}}});let iB="always",iD="never",ij=[iB,iD],iR={type:"object",properties:{when:{type:"string",enum:ij},allowMultiline:{type:"boolean"},spacing:{type:"object",properties:{objectLiterals:{type:"string",enum:ij}},additionalProperties:!1}},additionalProperties:!1},iF={anyOf:[iR,{type:"boolean"}]};var iM=r$({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:{...iR.properties,attributes:iF,children:iF}},{type:"string",enum:ij}]},{type:"object",properties:{allowMultiline:{type:"boolean"},spacing:{type:"object",properties:{objectLiterals:{type:"string",enum:ij}},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]||{};ij.includes(n)&&(n=Object.assign({when:e.options[0]},e.options[1]));let r=t(n,{when:iD,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===iB&&("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}),f=r.getTokenBefore(a,{includeComments:!0});if(!u){u=r.getTokenAfter(i);let e=r.getCommentsBefore(u);u=e?e[0]:u}if(!f){f=r.getTokenBefore(a);let e=r.getCommentsAfter(f);f=e?e[e.length-1]:f}let d=i.value===u.value?n.objectLiteralSpaces:n.when;d===iB?(r.isSpaceBetween(i,u)?n.allowMultiline||(0,rR.isTokenOnSameLine)(i,u)||p(t,i,d):e.report({node:t,loc:i.loc.start,messageId:"spaceNeededAfter",data:{token:i.value},fix:e=>e.insertTextAfter(i," ")}),r.isSpaceBetween(f,a)?n.allowMultiline||(0,rR.isTokenOnSameLine)(f,a)||c(t,a,d):e.report({node:t,loc:a.loc.start,messageId:"spaceNeededBefore",data:{token:a.value},fix:e=>e.insertTextBefore(a," ")})):d===iD&&((0,rR.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,d),(0,rR.isTokenOnSameLine)(f,a)?r.isSpaceBetween(f,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,d))}return{JSXExpressionContainer:u,JSXSpreadAttribute:u}}}),i$=r$({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," ")}))})}}}}),iV=r$({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&&!rB(n)||"multiline-multiprop"===t&&!rB(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&&!rB(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]]," ")})}}}}}),iq=r$({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||!rY(n))return;let r=e.sourceCode;if("always"===t||!rB(n)){let t,i,s=!!(0,rR.isTokenOnSameLine)(e.sourceCode.getTokenBefore(n),n),a=(t=e.sourceCode.getTokenAfter(n),(!(i=e.sourceCode.getTokenAfter(n))||","!==i.value||!(i.range[0]>=n.range[1]))&&n.loc.end.line===t.loc.end.line);(s||a)&&e.report({node:n,messageId:"missingLineBreak",fix:e=>{let t=r.getText(n);return s&&(t=`
6
7
  ${t}`),a&&(t=`${t}
7
- `),e.replaceText(n,t)}})}}function r(e){0!==e.arguments.length&&e.arguments.forEach(n)}return{CallExpression(e){r(e)},NewExpression(e){r(e)}}}}),iq=rM({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&&rI(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?" ":" "))})})}}}}}),iY=rM({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
+ `),e.replaceText(n,t)}})}}function r(e){0!==e.arguments.length&&e.arguments.forEach(n)}return{CallExpression(e){r(e)},NewExpression(e){r(e)}}}}),iY=r$({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&&rN(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?" ":" "))})})}}}}}),iX=r$({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
9
  ${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,f=c(t)&&s-r==0;s!==r&&rI(e,t)&&!a&&!f&&o(t,r,s)}function f(t){let r=e.sourceCode,i=r.getTokenBefore(t);if(i){if("JSXText"===i.type||(0,rj.isCommaToken)(i))i="Literal"===(i=r.getNodeByRangeIndex(i.range[0])).type||"JSXText"===i.type?i.parent:i;else if((0,rj.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}u(t,l(i="JSXExpressionContainer"===i.type?i.expression:i)+(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))}}function d(e){e.parent&&u(e,l(e.parent.openingElement||e.parent.openingFragment))}function m(e){if(e.parent&&("JSXElement"===e.parent.type||"JSXFragment"===e.parent.type)){var r;let i,s,a;r=l(e.parent)+n,i=e.value,s="space"===t?/\n( *)[\t ]*\S/g:/\n(\t*)[\t ]*\S/g,(a=Array.from(String(i).matchAll(s),e=>e[1]?e[1].length:0)).length>0&&!a.every(e=>e===r)&&a.forEach(t=>{o(e,r,t)})}}return{JSXOpeningElement:f,JSXOpeningFragment:f,JSXClosingElement:d,JSXClosingFragment:d,JSXAttribute:function(t){if(!s||!t.value||"JSXExpressionContainer"!==t.value.type)return;let n=l(t.name),r=e.sourceCode.getLastToken(t.value),i=rP(e,r);i.loc.start.line===r.loc.start.line&&u(i,t.name.loc.start.line===i.loc.start.line?0:n)},JSXExpressionContainer(e){e.parent&&u(e,l(e.parent)+n)},Literal:m,JSXText:m,ReturnStatement(t){if(!t.parent||!t.argument||!rq(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":var s,a;let o;return rq((s=e.name,a=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}(t),(o=a.find(e=>e.name===s))&&o.defs[0]&&o.defs[0].node?"TypeAlias"===o.defs[0].node.type?o.defs[0].node.right:"ImportBinding"===o.defs[0].type?o.defs[0].node:o.defs[0].node.init:null));default:return!1}},s=!1;return!function(e,t){let n=e.type;if("ReturnStatement"===n)return t(e.argument,()=>{});if("ArrowFunctionExpression"===n&&e.expression)return t(e.body,()=>{});if("FunctionExpression"===n||"FunctionDeclaration"===n||"ArrowFunctionExpression"===n||"MethodDefinition"===n){var r,i;let n;r=e.body,(n=Object.assign({},{fallback:e=>Object.keys(e).filter(e=>"children"===e||"argument"===e)},i={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()}}})).keys=Object.assign({},i.keys,{JSXElement:["children"],JSXFragment:["children"]}),nQ.traverse(r,n)}}(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)}}}}),iX=rM({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=rL(t);if((n?r.single:r.multi)===1/0)return;let i=[[t.attributes[0]]];t.attributes.reduce((e,t)=>((0,rj.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)})}})}}}}),iJ=rM({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 f=!/\n\s*\n/.test(c.value);if(r(t))return;let d=a.slice(s+2).find(i);if(p&&(!rL(t)||d&&!rL(d))){if(!f)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(f===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)}}}});let iU={allow:"none"};var iW=rM({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:iU,additionalProperties:!1}]},create(e){let t=Object.assign({},iU,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 f={},d={};i.forEach(e=>{let t=0,n=0;if("Literal"===e.type||"JSXText"===e.type){if(rO(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?(f[r]||(f[r]=[]),f[r].push(e)):(f[r]||(f[r]=[]),f[r].push(e),f[i]||(f[i]=[]),f[i].push(e))});let m=Object.keys(f);if(1===m.length&&"single-line"===t.allow){let e=parseInt(m[0]),t=f[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=f[n].length-1;f[n].forEach((t,i)=>{let s,l,u,m;if(0===i?n===p&&(s=a):s=f[n][i-1],i===r&&n===c&&(l=o),!s&&!l)return;let h=e.sourceCode.getText(t),g=!!(s&&(u=e.sourceCode.getTokensBetween(s,t)[0],("Literal"===s.type||"JSXText"===s.type)&&s.raw.endsWith(" ")||("Literal"===t.type||"JSXText"===t.type)&&t.raw.startsWith(" ")||rO(u?.value))),y=!!(l&&(m=e.sourceCode.getTokensBetween(t,l)[0],("Literal"===l.type||"JSXText"===l.type)&&l.raw.startsWith(" ")||("Literal"===t.type||"JSXText"===t.type)&&t.raw.endsWith(" ")||rO(m?.value))),x=!!s,T=!!l,S=`${t.loc.start.line},${t.loc.start.column}`;d[S]||(d[S]={node:t,source:h}),g&&(d[S].leadingSpace=!0),x&&(d[S].leadingNewLine=!0),T&&(d[S].trailingNewLine=!0),y&&(d[S].trailingSpace=!0)})}),Object.keys(d).forEach(e=>{let t=d[e],r=t.node,i=t.source.replace(/(^ +| +$)/g,""),s=t.leadingSpace?"\n{' '}":"",a=t.trailingSpace?"{' '}\n":"",o=`${s}${t.leadingNewLine?"\n":""}${i}${t.trailingNewLine?"\n":""}${a}`;n(r,e=>e.replaceText(r,o))})}return{JSXElement:r,JSXFragment:r}}}),iK={};function iH(){if(g)return h;g=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 h={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 iz(){return y||(y=1,!function(e){let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=iH();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.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},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return -1===i?t:"\\"===t[i-1]?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",s=`${r}(?:${e})${i}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}}(iK)),iK}var iG=j(function(){if(w)return v;w=1;let e=function(){if(k)return E;k=1;let e=function(){if(T)return x;T=1;let e=iz(),{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:f,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:h}=iH(),g=e=>e===o||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return x=(x,T)=>{let S,b,E=T||{},k=x.length-1,v=!0===E.parts||!0===E.scanToEnd,w=[],A=[],C=[],_=x,O=-1,P=0,I=0,N=!1,L=!1,D=!1,B=!1,j=!1,R=!1,F=!1,M=!1,$=!1,V=!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,V=!0,!0===v)continue;break}if(b===d&&0==--q){R=!1,N=Y.isBrace=!0,V=!0;break}}if(!0===v)continue;break}if(b===o){if(w.push(O),A.push(Y),Y={value:"",depth:0,isGlob:!1},!0===V)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===f||b===a)&&J()===p){if(D=Y.isGlob=!0,B=Y.isExtglob=!0,V=!0,b===a&&O===P&&($=!0),!0===v){for(;!0!==X()&&(b=U());){if(b===r){F=Y.backslashes=!0,b=U();continue}if(b===m){D=Y.isGlob=!0,V=!0;break}}continue}break}if(b===t){if(S===t&&(j=Y.isGlobstar=!0),D=Y.isGlob=!0,V=!0,!0===v)continue;break}if(b===f){if(D=Y.isGlob=!0,V=!0,!0===v)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,V=!0;break}}if(!0===v)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===v){for(;!0!==X()&&(b=U());){if(b===p){F=Y.backslashes=!0,b=U();continue}if(b===m){V=!0;break}}continue}break}if(!0===D){if(V=!0,!0===v)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 z={prefix:K,input:x,start:P,base:W,glob:H,isBrace:N,isBracket:L,isGlob:D,isExtglob:B,isGlobstar:j,negated:M,negatedExtglob:$};if(!0===E.tokens&&(z.maxDepth=0,g(b)||A.push(Y),z.tokens=A),!0===E.parts||!0===E.tokens){let e;for(let t=0;t<w.length;t++){let n=e?e+1:P,r=w[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]),z.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]),z.maxDepth+=A[A.length-1].depth)}z.slashes=w,z.parts=C}return z}}(),t=function(){if(b)return S;b=1;let e=iH(),t=iz(),{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 f;if("string"!=typeof c)throw TypeError("Expected a string");c=a[c]||c;let d={...u},m="number"==typeof d.maxLength?Math.min(n,d.maxLength):n,h=c.length;if(h>m)throw SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${m}`);let g={type:"bos",value:"",output:d.prepend||""},y=[g],x=d.capture?"":"?:",T=e.globChars(d.windows),S=e.extglobChars(T),{DOT_LITERAL:b,PLUS_LITERAL:E,SLASH_LITERAL:k,ONE_CHAR:v,DOTS_SLASH:w,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?w:b}).)*?)`,D=d.dot?"":A,B=d.dot?O:P,j=!0===d.bash?L(d):I;d.capture&&(j=`(${j})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);let R={input:c,index:-1,start:0,dot:!0===d.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]++,$.push(e)},z=e=>{R[e]--,$.pop()},G=e=>{if("globstar"===V.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,-V.output.length),V.type="star",V.value="*",V.output=j,R.output+=V.output)}if(F.length&&"paren"!==e.type&&(F[F.length-1].inner+=e.value),(e.value||e.output)&&W(e),V&&"text"===V.type&&"text"===e.type){V.output=(V.output||V.value)+e.value,V.value+=e.value;return}e.prev=V,y.push(e),V=e},Q=(e,t)=>{let n={...S[t],conditions:1,inner:""};n.prev=V,n.parens=R.parens,n.output=R.output;let r=(d.capture?"(":"")+n.open;H("parens"),G({type:e,value:t,output:R.output?"":v}),G({type:"paren",extglob:!0,value:X(),output:r}),F.push(n)},Z=e=>{let t,n=e.close+(d.capture?")":"");if("negate"===e.type){let r=j;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=L(d)),(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)}G({type:"paren",extglob:!0,value:f,output:n}),z("parens")};if(!1!==d.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===d.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===c&&!0===d.contains)?R.output=c:R.output=t.wrapOutput(n,R,u),R}for(;!q();){if("\0"===(f=X()))continue;if("\\"===f){let e=Y();if("/"===e&&!0!==d.bash||"."===e||";"===e)continue;if(!e){G({type:"text",value:f+="\\"});continue}let t=/^\\+/.exec(J()),n=0;if(t&&t[0].length>2&&(n=t[0].length,R.index+=n,n%2!=0&&(f+="\\")),!0===d.unescape?f=X():f+=X(),0===R.brackets){G({type:"text",value:f});continue}}if(R.brackets>0&&("]"!==f||"["===V.value||"[^"===V.value)){if(!1!==d.posix&&":"===f){let e=V.value.slice(1);if(e.includes("[")&&(V.posix=!0,e.includes(":"))){let e=V.value.lastIndexOf("["),t=V.value.slice(0,e),n=r[V.value.slice(e+2)];if(n){V.value=t+n,R.backtrack=!0,X(),g.output||1!==y.indexOf(V)||(g.output=v);continue}}}("["===f&&":"!==Y()||"-"===f&&"]"===Y())&&(f=`\\${f}`),"]"===f&&("["===V.value||"[^"===V.value)&&(f=`\\${f}`),!0===d.posix&&"!"===f&&"["===V.value&&(f="^"),V.value+=f,W({value:f});continue}if(1===R.quotes&&'"'!==f){f=t.escapeRegex(f),V.value+=f,W({value:f});continue}if('"'===f){R.quotes=+(1!==R.quotes),!0===d.keepQuotes&&G({type:"text",value:f});continue}if("("===f){H("parens"),G({type:"paren",value:f});continue}if(")"===f){if(0===R.parens&&!0===d.strictBrackets)throw SyntaxError(l("opening","("));let e=F[F.length-1];if(e&&R.parens===e.parens+1){Z(F.pop());continue}G({type:"paren",value:f,output:R.parens?")":"\\)"}),z("parens");continue}if("["===f){if(!0!==d.nobracket&&J().includes("]"))H("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw SyntaxError(l("closing","]"));f=`\\${f}`}G({type:"bracket",value:f});continue}if("]"===f){if(!0===d.nobracket||V&&"bracket"===V.type&&1===V.value.length){G({type:"text",value:f,output:`\\${f}`});continue}if(0===R.brackets){if(!0===d.strictBrackets)throw SyntaxError(l("opening","["));G({type:"text",value:f,output:`\\${f}`});continue}z("brackets");let e=V.value.slice(1);if(!0===V.posix||"^"!==e[0]||e.includes("/")||(f=`/${f}`),V.value+=f,W({value:f}),!1===d.literalBrackets||t.hasRegexChars(e))continue;let n=t.escapeRegex(V.value);if(R.output=R.output.slice(0,-V.value.length),!0===d.literalBrackets){R.output+=n,V.value=n;continue}V.value=`(${x}${n}|${V.value})`,R.output+=V.value;continue}if("{"===f&&!0!==d.nobrace){H("braces");let e={type:"brace",value:f,output:"(",outputIndex:R.output.length,tokensIndex:R.tokens.length};M.push(e),G(e);continue}if("}"===f){let e=M[M.length-1];if(!0===d.nobrace||!e){G({type:"text",value:f,output:f});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,d),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="\\{",f=t="\\}",R.output=n,r))R.output+=i.output||i.value}G({type:"brace",value:f,output:t}),z("braces"),M.pop();continue}if("|"===f){F.length>0&&F[F.length-1].conditions++,G({type:"text",value:f});continue}if(","===f){let e=f,t=M[M.length-1];t&&"braces"===$[$.length-1]&&(t.comma=!0,e="|"),G({type:"comma",value:f,output:e});continue}if("/"===f){if("dot"===V.type&&R.index===R.start+1){R.start=R.index+1,R.consumed="",R.output="",y.pop(),V=g;continue}G({type:"slash",value:f,output:k});continue}if("."===f){if(R.braces>0&&"dot"===V.type){"."===V.value&&(V.output=b);let e=M[M.length-1];V.type="dots",V.output+=f,V.value+=f,e.dots=!0;continue}if(R.braces+R.parens===0&&"bos"!==V.type&&"slash"!==V.type){G({type:"text",value:f,output:b});continue}G({type:"dot",value:f,output:b});continue}if("?"===f){if(!(V&&"("===V.value)&&!0!==d.noextglob&&"("===Y()&&"?"!==Y(2)){Q("qmark",f);continue}if(V&&"paren"===V.type){let e=Y(),t=f;("("!==V.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(J()))||(t=`\\${f}`),G({type:"text",value:f,output:t});continue}if(!0!==d.dot&&("slash"===V.type||"bos"===V.type)){G({type:"qmark",value:f,output:P});continue}G({type:"qmark",value:f,output:O});continue}if("!"===f){if(!0!==d.noextglob&&"("===Y()&&("?"!==Y(2)||!/[!=<:]/.test(Y(3)))){Q("negate",f);continue}if(!0!==d.nonegate&&0===R.index){K();continue}}if("+"===f){if(!0!==d.noextglob&&"("===Y()&&"?"!==Y(2)){Q("plus",f);continue}if(V&&"("===V.value||!1===d.regex){G({type:"plus",value:f,output:E});continue}if(V&&("bracket"===V.type||"paren"===V.type||"brace"===V.type)||R.parens>0){G({type:"plus",value:f});continue}G({type:"plus",value:E});continue}if("@"===f){if(!0!==d.noextglob&&"("===Y()&&"?"!==Y(2)){G({type:"at",extglob:!0,value:f,output:""});continue}G({type:"text",value:f});continue}if("*"!==f){("$"===f||"^"===f)&&(f=`\\${f}`);let e=i.exec(J());e&&(f+=e[0],R.index+=e[0].length),G({type:"text",value:f});continue}if(V&&("globstar"===V.type||!0===V.star)){V.type="star",V.star=!0,V.value+=f,V.output=j,R.backtrack=!0,R.globstar=!0,U(f);continue}let e=J();if(!0!==d.noextglob&&/^\([^?]/.test(e)){Q("star",f);continue}if("star"===V.type){if(!0===d.noglobstar){U(f);continue}let t=V.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===d.bash&&(!r||e[0]&&"/"!==e[0])){G({type:"star",value:f,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){G({type:"star",value:f,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()){V.type="globstar",V.value+=f,V.output=L(d),R.output=V.output,R.globstar=!0,U(f);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&q()){R.output=R.output.slice(0,-(t.output+V.output).length),t.output=`(?:${t.output}`,V.type="globstar",V.output=L(d)+(d.strictSlashes?")":"|$)"),V.value+=f,R.globstar=!0,R.output+=t.output+V.output,U(f);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+V.output).length),t.output=`(?:${t.output}`,V.type="globstar",V.output=`${L(d)}${k}|${k}${n})`,V.value+=f,R.output+=t.output+V.output,R.globstar=!0,U(f+X()),G({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){V.type="globstar",V.value+=f,V.output=`(?:^|${k}|${L(d)}${k})`,R.output=V.output,R.globstar=!0,U(f+X()),G({type:"slash",value:"/",output:""});continue}R.output=R.output.slice(0,-V.output.length),V.type="globstar",V.output=L(d),V.value+=f,R.output+=V.output,R.globstar=!0,U(f);continue}let n={type:"star",value:f,output:j};if(!0===d.bash){n.output=".*?",("bos"===V.type||"slash"===V.type)&&(n.output=D+n.output),G(n);continue}if(V&&("bracket"===V.type||"paren"===V.type)&&!0===d.regex){n.output=f,G(n);continue}(R.index===R.start||"slash"===V.type||"dot"===V.type)&&("dot"===V.type?(R.output+=C,V.output+=C):!0===d.dot?(R.output+=_,V.output+=_):(R.output+=D,V.output+=D),"*"!==Y()&&(R.output+=v,V.output+=v)),G(n)}for(;R.brackets>0;){if(!0===d.strictBrackets)throw SyntaxError(l("closing","]"));R.output=t.escapeLast(R.output,"["),z("brackets")}for(;R.parens>0;){if(!0===d.strictBrackets)throw SyntaxError(l("closing",")"));R.output=t.escapeLast(R.output,"("),z("parens")}for(;R.braces>0;){if(!0===d.strictBrackets)throw SyntaxError(l("closing","}"));R.output=t.escapeLast(R.output,"{"),z("braces")}if(!0!==d.strictSlashes&&("star"===V.type||"bracket"===V.type)&&G({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:f,NO_DOT:d,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:y}=e.globChars(s.windows),x=s.dot?m:d,T=s.dot?h:d,S=s.capture?"":"?:",b=!0===s.bash?".*?":g;s.capture&&(b=`(${b})`);let E=e=>!0===e.noglobstar?b:`(${S}(?:(?!${y}${e.dot?f: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]}}},v=k(t.removePrefix(r,{negated:!1,prefix:""}));return v&&!0!==s.strictSlashes&&(v+=`${c}?`),v},S=p}(),n=iz(),r=iH(),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:f}=i.test(n,o,t,{glob:e,posix:a}),d={glob:e,state:l,regex:o,posix:a,input:n,output:f,match:u,isMatch:c};return("function"==typeof s.onResult&&s.onResult(d),!1===c)?(d.isMatch=!1,!!r&&d):p(n)?("function"==typeof s.onIgnore&&s.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof s.onMatch&&s.onMatch(d),!r||d)};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,E=i}(),t=iz();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),v=n}());function iQ(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function iZ(e){let t=e.toUpperCase();return e===t&&t!==e.toLowerCase()}var i0=rM({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=iG(i,{noglobstar:!0});return{JSXOpeningElement(a){if(rV(a))return;let o=rX(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=!(!iZ(c.charAt(0))||Array.prototype.some.call(c.slice(1),e=>e.toLowerCase()===e.toUpperCase()&&!iQ(e)))&&Array.prototype.some.call(c.slice(1),e=>{let t;return t=e.toLowerCase(),e===t&&t!==e.toUpperCase()||iQ(e)}),f=t&&function(e){let t=e.charAt(0);if(!(iZ(t)||iQ(t)))return!1;for(let t=1;t<e.length-1;t+=1){let n=e.charAt(t);if(!(iZ(n)||iQ(n)||"_"===n))return!1}let n=e.charAt(e.length-1);return!!(iZ(n)||iQ(n))}(c);if(!u&&!f&&!o){let n=t?"usePascalOrSnakeCase":"usePascalCase";e.report({messageId:n,node:a,data:{name:r}});break}p+=1}while(p<l.length&&!r)}}}}),i1=rM({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)=>((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})(r,i)&&e.report({messageId:"noLineGap",node:i,data:{prop1:n(r),prop2:n(i)}}),r.loc.end.line===i.loc.end.line&&" "!==t.text.slice(r.range[1],i.range[0])&&e.report({node:i,messageId:"onlyOneSpace",data:{prop1:n(r),prop2:n(i)},fix:e=>e.replaceTextRange([r.range[1],i.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))}}}});let i2={"prefer-double":{quote:'"',description:"singlequote",convert:e=>e.replace(/'/gu,'"')},"prefer-single":{quote:"'",description:"doublequote",convert:e=>e.replace(/"/gu,"'")}};var i3=rM({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=i2[e.options[0]||"prefer-double"];return{JSXAttribute(n){let r=n.value;r&&rx(r)&&!(r.value.includes(t.quote)||rS(r.raw,t.quote))&&e.report({node:r,messageId:"unexpected",data:{description:t.description},fix:e=>e.replaceText(r,t.convert(r.raw))})}}}});let i6={component:!0,html:!0};var i4=rM({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:i6.component,type:"boolean"},html:{default:i6.html,type:"boolean"}},additionalProperties:!1}]},create:e=>({JSXOpeningElement(t){var n,r;let i,s;n=t,((s=Object.assign({},i6,e.options[0])).component&&(r=n).name&&("JSXIdentifier"===r.name.type||"JSXMemberExpression"===r.name.type)&&!rV(r)||s.html&&rV(n))&&!n.selfClosing&&(0===n.parent.children.length||1===(i=n.parent.children).length&&"JSXText"===i[0].type&&i[0].value.includes("\n")&&""===i[0].value.replace(/(?!\xA0)\s/g,""))&&e.report({messageId:"notSelfClosing",node:t,fix(e){let n=[t.range[1]-1,t.parent.closingElement?.range[1]??NaN];return e.replaceTextRange(n," />")}})}})});function i5(e){return/^on[A-Z]/.test(e)}let i9=["children","dangerouslySetInnerHTML","key","ref"];function i8(e,t){return t.indexOf(e.split(":")[0])}function i7(e){let n=t.get(e);return!!n&&!!n.hasComment}let se=new WeakMap;function st(e,n,r,i,s){let a=se.get(e)||[];if(!a.includes(n)){let o,l,p,c,u,f;a.push(n),se.set(e,a),i.report({node:e.name??"",messageId:n,fix:(o=i.sourceCode,l=r.attributes.slice(0),c={ignoreCase:(p=i.options[0]||{}).ignoreCase||!1,callbacksLast:p.callbacksLast||!1,shorthandFirst:p.shorthandFirst||!1,shorthandLast:p.shorthandLast||!1,multiline:p.multiline||"ignore",noSortAlphabetically:p.noSortAlphabetically||!1,reservedFirst:p.reservedFirst||!1,reservedList:s,reservedLast:p.reservedLast||[],locale:p.locale||"auto"},f=(u=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],f="JSXSpreadAttribute"===o.type;if(u&&("JSXSpreadAttribute"!==u.type||f)||(i[(s+=1)-1]=[]),!f)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}(l,i)).slice(0).map(e=>[...e].sort((e,t)=>(function(e,t,n){let r=rY(e),i=rY(t),s=r.split(":")[0],a=i.split(":")[0],o=i7(e),l=i7(t);if(o&&!l)return 1;if(!o&&l)return -1;if(n.reservedFirst){let e=i8(r,n.reservedList),t=i8(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=i8(r,n.reservedLast),t=i8(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=i5(r),t=i5(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=!rL(e),s=!rL(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,c))),function(e){let n=[],r=o.getText();u.forEach((e,i)=>{e.forEach((e,s)=>{let a=f[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 i=n[0],s=n[n.length-1],a=s?s.range[0]:0,l=i?i.range[1]:-0;return n.forEach(e=>{r=`${r.slice(0,e.range[0])}${e.text}${r.slice(e.range[1])}`}),e.replaceTextRange([a,l],r.slice(a,l))})})}}var sn=rM({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:i9,f=n.reservedLast||[],d=n.locale||"auto";return{Program(){t=new WeakMap},JSXOpeningElement(t){let n=p&&!rV(t)?u.filter(e=>"dangerouslySetInnerHTML"!==e):u;t.attributes.reduce((u,m,h,g)=>{if("JSXSpreadAttribute"===m.type)return g[h+1];let y=rY(u),x=rY(m),T=y.split(":")[0],S=x.split(":")[0],b=u.value,E=m.value,k=i5(y),v=i5(x);if(r&&(y=y.toLowerCase(),x=x.toLowerCase()),p){if(c)return c(m),u;let r=i8(y,n),i=i8(x,n);if(r>-1&&-1===i)return m;if(!0!==p&&r>i||-1===r&&i>-1)return st(m,"listReservedPropsFirst",t,e,n),u;if(r>-1&&i>-1&&i>r&&T!==S)return m}if(f.length>0){let r=i8(y,f),i=i8(x,f);if(-1===r&&i>-1)return m;if(r<i||r>-1&&-1===i)return st(m,"listReservedPropsLast",t,e,n),u;if(r>-1&&i>-1&&i>r&&T!==S)return m}if(i){if(!k&&v)return m;if(k&&!v)return st(u,"listCallbacksLast",t,e,n),u}if(s){if(E&&!b)return m;if(!E&&b)return st(m,"listShorthandFirst",t,e,n),u}if(a){if(!E&&b)return m;if(E&&!b)return st(u,"listShorthandLast",t,e,n),u}let w=!rL(u),A=!rL(m);if("first"===o){if(w&&!A)return m;if(!w&&A)return st(m,"listMultilineFirst",t,e,n),u}else if("last"===o){if(!w&&A)return m;if(w&&!A)return st(u,"listMultilineLast",t,e,n),u}return!l&&(r||"auto"!==d?y.localeCompare(x,"auto"===d?void 0:d)>0:y>x)?(st(m,"sortPropsByAlpha",t,e,n),u):m},t.attributes[0])}}}});function sr(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 si(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 ss(e,t,n){if(!("selfClosing"in t&&t.selfClosing)){let r=e.sourceCode,i="proportional-always"===n?rN(t):r.getLastTokens(t,2)[0],s=r.getTokenAfter(i);if(!rL(t)&&"proportional-always"===n&&(0,rj.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!==rL(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]])})}}let sa={closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"allow"};var so=rM({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:sa,additionalProperties:!1}]},create(e){let t=Object.assign({},sa,e.options[0]);return{JSXOpeningElement(n){"allow"!==t.closingSlash&&n.selfClosing&&sr(e,n,t.closingSlash),"allow"!==t.afterOpening&&si(e,n,t.afterOpening),"allow"!==t.beforeSelfClosing&&n.selfClosing&&function(e,t,n){let r=e.sourceCode,i=rN(t),s=r.getTokenAfter(i);if(!rL(t)&&"proportional-always"===n&&(0,rj.isTokenOnSameLine)(i,s))return e.report({node:t,messageId:"beforeSelfCloseNeedNewline",loc:i.loc.end,fix:e=>e.insertTextBefore(s,"\n")});if(!(0,rj.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&&ss(e,n,t.beforeClosing)},JSXClosingElement(n){"allow"!==t.afterOpening&&si(e,n,t.afterOpening),"allow"!==t.closingSlash&&sr(e,n,t.closingSlash),"allow"!==t.beforeClosing&&ss(e,n,t.beforeClosing)}}}});let sl={declaration:"parens",assignment:"parens",return:"parens",arrow:"parens",condition:"ignore",logical:"ignore",prop:"ignore",propertyValue:"ignore"};var sp=rM({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]:sl[t]}function n(e){let n=t(e);return n&&"ignore"!==n}function r(n,r){if(!n||!rq(n))return;let i=e.sourceCode,s=t(r);if(!0!==s&&"parens"!==s||(0,rj.isParenthesized)(n,e.sourceCode)||rL(n)||e.report({node:n,messageId:"missingParens",fix:e=>e.replaceText(n,`(${i.getText(n)})`)}),"parens-new-line"===s&&!rL(n))if((0,rj.isParenthesized)(n,e.sourceCode)){let t,r,s=(t=e.sourceCode.getTokenBefore(n),!!(0,rj.isParenthesized)(n,e.sourceCode)&&!!(0,rj.isTokenOnSameLine)(t,n)),a=(r=e.sourceCode.getTokenAfter(n),!!(0,rj.isParenthesized)(n,e.sourceCode)&&!!(0,rj.isTokenOnSameLine)(n,r));(s||a)&&e.report({node:n,messageId:"parensOnNewLines",fix:e=>{let t=i.getText(n);return s&&(t=`
10
+ ${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,f=c(t)&&s-r==0;s!==r&&rN(e,t)&&!a&&!f&&o(t,r,s)}function f(t){let r=e.sourceCode,i=r.getTokenBefore(t);if(i){if("JSXText"===i.type||(0,rR.isCommaToken)(i))i="Literal"===(i=r.getNodeByRangeIndex(i.range[0])).type||"JSXText"===i.type?i.parent:i;else if((0,rR.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}u(t,l(i="JSXExpressionContainer"===i.type?i.expression:i)+(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))}}function d(e){e.parent&&u(e,l(e.parent.openingElement||e.parent.openingFragment))}function m(e){if(e.parent&&("JSXElement"===e.parent.type||"JSXFragment"===e.parent.type)){var r;let i,s,a;r=l(e.parent)+n,i=e.value,s="space"===t?/\n( *)[\t ]*\S/g:/\n(\t*)[\t ]*\S/g,(a=Array.from(String(i).matchAll(s),e=>e[1]?e[1].length:0)).length>0&&!a.every(e=>e===r)&&a.forEach(t=>{o(e,r,t)})}}return{JSXOpeningElement:f,JSXOpeningFragment:f,JSXClosingElement:d,JSXClosingFragment:d,JSXAttribute:function(t){if(!s||!t.value||"JSXExpressionContainer"!==t.value.type)return;let n=l(t.name),r=e.sourceCode.getLastToken(t.value),i=rI(e,r);i.loc.start.line===r.loc.start.line&&u(i,t.name.loc.start.line===i.loc.start.line?0:n)},JSXExpressionContainer(e){e.parent&&u(e,l(e.parent)+n)},Literal:m,JSXText:m,ReturnStatement(t){if(!t.parent||!t.argument||!rY(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":var s,a;let o;return rY((s=e.name,a=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}(t),(o=a.find(e=>e.name===s))&&o.defs[0]&&o.defs[0].node?"TypeAlias"===o.defs[0].node.type?o.defs[0].node.right:"ImportBinding"===o.defs[0].type?o.defs[0].node:o.defs[0].node.init:null));default:return!1}},s=!1;return!function(e,t){let n=e.type;if("ReturnStatement"===n)return t(e.argument,()=>{});if("ArrowFunctionExpression"===n&&e.expression)return t(e.body,()=>{});if("FunctionExpression"===n||"FunctionDeclaration"===n||"ArrowFunctionExpression"===n||"MethodDefinition"===n){var r,i;let n;r=e.body,(n=Object.assign({},{fallback:e=>Object.keys(e).filter(e=>"children"===e||"argument"===e)},i={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()}}})).keys=Object.assign({},i.keys,{JSXElement:["children"],JSXFragment:["children"]}),nZ.traverse(r,n)}}(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)}}}}),iJ=r$({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=rB(t);if((n?r.single:r.multi)===1/0)return;let i=[[t.attributes[0]]];t.attributes.reduce((e,t)=>((0,rR.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)})}})}}}}),iU=r$({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 f=!/\n\s*\n/.test(c.value);if(r(t))return;let d=a.slice(s+2).find(i);if(p&&(!rB(t)||d&&!rB(d))){if(!f)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(f===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)}}}});let iW={allow:"none"};var iK=r$({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:iW,additionalProperties:!1}]},create(e){let t=Object.assign({},iW,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 f={},d={};i.forEach(e=>{let t=0,n=0;if("Literal"===e.type||"JSXText"===e.type){if(rP(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?(f[r]||(f[r]=[]),f[r].push(e)):(f[r]||(f[r]=[]),f[r].push(e),f[i]||(f[i]=[]),f[i].push(e))});let m=Object.keys(f);if(1===m.length&&"single-line"===t.allow){let e=parseInt(m[0]),t=f[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=f[n].length-1;f[n].forEach((t,i)=>{let s,l,u,m;if(0===i?n===p&&(s=a):s=f[n][i-1],i===r&&n===c&&(l=o),!s&&!l)return;let h=e.sourceCode.getText(t),g=!!(s&&(u=e.sourceCode.getTokensBetween(s,t)[0],("Literal"===s.type||"JSXText"===s.type)&&s.raw.endsWith(" ")||("Literal"===t.type||"JSXText"===t.type)&&t.raw.startsWith(" ")||rP(u?.value))),y=!!(l&&(m=e.sourceCode.getTokensBetween(t,l)[0],("Literal"===l.type||"JSXText"===l.type)&&l.raw.startsWith(" ")||("Literal"===t.type||"JSXText"===t.type)&&t.raw.endsWith(" ")||rP(m?.value))),x=!!s,T=!!l,S=`${t.loc.start.line},${t.loc.start.column}`;d[S]||(d[S]={node:t,source:h}),g&&(d[S].leadingSpace=!0),x&&(d[S].leadingNewLine=!0),T&&(d[S].trailingNewLine=!0),y&&(d[S].trailingSpace=!0)})}),Object.keys(d).forEach(e=>{let t=d[e],r=t.node,i=t.source.replace(/(^ +| +$)/g,""),s=t.leadingSpace?"\n{' '}":"",a=t.trailingSpace?"{' '}\n":"",o=`${s}${t.leadingNewLine?"\n":""}${i}${t.trailingNewLine?"\n":""}${a}`;n(r,e=>e.replaceText(r,o))})}return{JSXElement:r,JSXFragment:r}}}),iH={};function iz(){if(x)return y;x=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 y={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 iG(){return T||(T=1,!function(e){let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=iz();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.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},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return -1===i?t:"\\"===t[i-1]?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",s=`${r}(?:${e})${i}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}}(iH)),iH}var iQ=R(function(){if(C)return A;C=1;let e=function(){if(w)return v;w=1;let e=function(){if(b)return S;b=1;let e=iG(),{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:f,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:h}=iz(),g=e=>e===o||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return S=(x,T)=>{let S,b,E=T||{},k=x.length-1,v=!0===E.parts||!0===E.scanToEnd,w=[],A=[],C=[],_=x,O=-1,P=0,I=0,N=!1,L=!1,B=!1,D=!1,j=!1,R=!1,F=!1,M=!1,$=!1,V=!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,B=Y.isGlob=!0,V=!0,!0===v)continue;break}if(b===d&&0==--q){R=!1,N=Y.isBrace=!0,V=!0;break}}if(!0===v)continue;break}if(b===o){if(w.push(O),A.push(Y),Y={value:"",depth:0,isGlob:!1},!0===V)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===f||b===a)&&J()===p){if(B=Y.isGlob=!0,D=Y.isExtglob=!0,V=!0,b===a&&O===P&&($=!0),!0===v){for(;!0!==X()&&(b=U());){if(b===r){F=Y.backslashes=!0,b=U();continue}if(b===m){B=Y.isGlob=!0,V=!0;break}}continue}break}if(b===t){if(S===t&&(j=Y.isGlobstar=!0),B=Y.isGlob=!0,V=!0,!0===v)continue;break}if(b===f){if(B=Y.isGlob=!0,V=!0,!0===v)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,B=Y.isGlob=!0,V=!0;break}}if(!0===v)continue;break}if(!0!==E.nonegate&&b===a&&O===P){M=Y.negated=!0,P++;continue}if(!0!==E.noparen&&b===p){if(B=Y.isGlob=!0,!0===v){for(;!0!==X()&&(b=U());){if(b===p){F=Y.backslashes=!0,b=U();continue}if(b===m){V=!0;break}}continue}break}if(!0===B){if(V=!0,!0===v)continue;break}}!0===E.noext&&(D=!1,B=!1);let W=_,K="",H="";P>0&&(K=_.slice(0,P),_=_.slice(P),I-=P),W&&!0===B&&I>0?(W=_.slice(0,I),H=_.slice(I)):!0===B?(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 z={prefix:K,input:x,start:P,base:W,glob:H,isBrace:N,isBracket:L,isGlob:B,isExtglob:D,isGlobstar:j,negated:M,negatedExtglob:$};if(!0===E.tokens&&(z.maxDepth=0,g(b)||A.push(Y),z.tokens=A),!0===E.parts||!0===E.tokens){let e;for(let t=0;t<w.length;t++){let n=e?e+1:P,r=w[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]),z.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]),z.maxDepth+=A[A.length-1].depth)}z.slashes=w,z.parts=C}return z}}(),t=function(){if(k)return E;k=1;let e=iz(),t=iG(),{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 f;if("string"!=typeof c)throw TypeError("Expected a string");c=a[c]||c;let d={...u},m="number"==typeof d.maxLength?Math.min(n,d.maxLength):n,h=c.length;if(h>m)throw SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${m}`);let g={type:"bos",value:"",output:d.prepend||""},y=[g],x=d.capture?"":"?:",T=e.globChars(d.windows),S=e.extglobChars(T),{DOT_LITERAL:b,PLUS_LITERAL:E,SLASH_LITERAL:k,ONE_CHAR:v,DOTS_SLASH:w,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?w:b}).)*?)`,B=d.dot?"":A,D=d.dot?O:P,j=!0===d.bash?L(d):I;d.capture&&(j=`(${j})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);let R={input:c,index:-1,start:0,dot:!0===d.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]++,$.push(e)},z=e=>{R[e]--,$.pop()},G=e=>{if("globstar"===V.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,-V.output.length),V.type="star",V.value="*",V.output=j,R.output+=V.output)}if(F.length&&"paren"!==e.type&&(F[F.length-1].inner+=e.value),(e.value||e.output)&&W(e),V&&"text"===V.type&&"text"===e.type){V.output=(V.output||V.value)+e.value,V.value+=e.value;return}e.prev=V,y.push(e),V=e},Q=(e,t)=>{let n={...S[t],conditions:1,inner:""};n.prev=V,n.parens=R.parens,n.output=R.output;let r=(d.capture?"(":"")+n.open;H("parens"),G({type:e,value:t,output:R.output?"":v}),G({type:"paren",extglob:!0,value:X(),output:r}),F.push(n)},Z=e=>{let t,n=e.close+(d.capture?")":"");if("negate"===e.type){let r=j;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=L(d)),(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)}G({type:"paren",extglob:!0,value:f,output:n}),z("parens")};if(!1!==d.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?D+(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===d.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===c&&!0===d.contains)?R.output=c:R.output=t.wrapOutput(n,R,u),R}for(;!q();){if("\0"===(f=X()))continue;if("\\"===f){let e=Y();if("/"===e&&!0!==d.bash||"."===e||";"===e)continue;if(!e){G({type:"text",value:f+="\\"});continue}let t=/^\\+/.exec(J()),n=0;if(t&&t[0].length>2&&(n=t[0].length,R.index+=n,n%2!=0&&(f+="\\")),!0===d.unescape?f=X():f+=X(),0===R.brackets){G({type:"text",value:f});continue}}if(R.brackets>0&&("]"!==f||"["===V.value||"[^"===V.value)){if(!1!==d.posix&&":"===f){let e=V.value.slice(1);if(e.includes("[")&&(V.posix=!0,e.includes(":"))){let e=V.value.lastIndexOf("["),t=V.value.slice(0,e),n=r[V.value.slice(e+2)];if(n){V.value=t+n,R.backtrack=!0,X(),g.output||1!==y.indexOf(V)||(g.output=v);continue}}}("["===f&&":"!==Y()||"-"===f&&"]"===Y())&&(f=`\\${f}`),"]"===f&&("["===V.value||"[^"===V.value)&&(f=`\\${f}`),!0===d.posix&&"!"===f&&"["===V.value&&(f="^"),V.value+=f,W({value:f});continue}if(1===R.quotes&&'"'!==f){f=t.escapeRegex(f),V.value+=f,W({value:f});continue}if('"'===f){R.quotes=+(1!==R.quotes),!0===d.keepQuotes&&G({type:"text",value:f});continue}if("("===f){H("parens"),G({type:"paren",value:f});continue}if(")"===f){if(0===R.parens&&!0===d.strictBrackets)throw SyntaxError(l("opening","("));let e=F[F.length-1];if(e&&R.parens===e.parens+1){Z(F.pop());continue}G({type:"paren",value:f,output:R.parens?")":"\\)"}),z("parens");continue}if("["===f){if(!0!==d.nobracket&&J().includes("]"))H("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw SyntaxError(l("closing","]"));f=`\\${f}`}G({type:"bracket",value:f});continue}if("]"===f){if(!0===d.nobracket||V&&"bracket"===V.type&&1===V.value.length){G({type:"text",value:f,output:`\\${f}`});continue}if(0===R.brackets){if(!0===d.strictBrackets)throw SyntaxError(l("opening","["));G({type:"text",value:f,output:`\\${f}`});continue}z("brackets");let e=V.value.slice(1);if(!0===V.posix||"^"!==e[0]||e.includes("/")||(f=`/${f}`),V.value+=f,W({value:f}),!1===d.literalBrackets||t.hasRegexChars(e))continue;let n=t.escapeRegex(V.value);if(R.output=R.output.slice(0,-V.value.length),!0===d.literalBrackets){R.output+=n,V.value=n;continue}V.value=`(${x}${n}|${V.value})`,R.output+=V.value;continue}if("{"===f&&!0!==d.nobrace){H("braces");let e={type:"brace",value:f,output:"(",outputIndex:R.output.length,tokensIndex:R.tokens.length};M.push(e),G(e);continue}if("}"===f){let e=M[M.length-1];if(!0===d.nobrace||!e){G({type:"text",value:f,output:f});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,d),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="\\{",f=t="\\}",R.output=n,r))R.output+=i.output||i.value}G({type:"brace",value:f,output:t}),z("braces"),M.pop();continue}if("|"===f){F.length>0&&F[F.length-1].conditions++,G({type:"text",value:f});continue}if(","===f){let e=f,t=M[M.length-1];t&&"braces"===$[$.length-1]&&(t.comma=!0,e="|"),G({type:"comma",value:f,output:e});continue}if("/"===f){if("dot"===V.type&&R.index===R.start+1){R.start=R.index+1,R.consumed="",R.output="",y.pop(),V=g;continue}G({type:"slash",value:f,output:k});continue}if("."===f){if(R.braces>0&&"dot"===V.type){"."===V.value&&(V.output=b);let e=M[M.length-1];V.type="dots",V.output+=f,V.value+=f,e.dots=!0;continue}if(R.braces+R.parens===0&&"bos"!==V.type&&"slash"!==V.type){G({type:"text",value:f,output:b});continue}G({type:"dot",value:f,output:b});continue}if("?"===f){if(!(V&&"("===V.value)&&!0!==d.noextglob&&"("===Y()&&"?"!==Y(2)){Q("qmark",f);continue}if(V&&"paren"===V.type){let e=Y(),t=f;("("!==V.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(J()))||(t=`\\${f}`),G({type:"text",value:f,output:t});continue}if(!0!==d.dot&&("slash"===V.type||"bos"===V.type)){G({type:"qmark",value:f,output:P});continue}G({type:"qmark",value:f,output:O});continue}if("!"===f){if(!0!==d.noextglob&&"("===Y()&&("?"!==Y(2)||!/[!=<:]/.test(Y(3)))){Q("negate",f);continue}if(!0!==d.nonegate&&0===R.index){K();continue}}if("+"===f){if(!0!==d.noextglob&&"("===Y()&&"?"!==Y(2)){Q("plus",f);continue}if(V&&"("===V.value||!1===d.regex){G({type:"plus",value:f,output:E});continue}if(V&&("bracket"===V.type||"paren"===V.type||"brace"===V.type)||R.parens>0){G({type:"plus",value:f});continue}G({type:"plus",value:E});continue}if("@"===f){if(!0!==d.noextglob&&"("===Y()&&"?"!==Y(2)){G({type:"at",extglob:!0,value:f,output:""});continue}G({type:"text",value:f});continue}if("*"!==f){("$"===f||"^"===f)&&(f=`\\${f}`);let e=i.exec(J());e&&(f+=e[0],R.index+=e[0].length),G({type:"text",value:f});continue}if(V&&("globstar"===V.type||!0===V.star)){V.type="star",V.star=!0,V.value+=f,V.output=j,R.backtrack=!0,R.globstar=!0,U(f);continue}let e=J();if(!0!==d.noextglob&&/^\([^?]/.test(e)){Q("star",f);continue}if("star"===V.type){if(!0===d.noglobstar){U(f);continue}let t=V.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===d.bash&&(!r||e[0]&&"/"!==e[0])){G({type:"star",value:f,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){G({type:"star",value:f,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()){V.type="globstar",V.value+=f,V.output=L(d),R.output=V.output,R.globstar=!0,U(f);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&q()){R.output=R.output.slice(0,-(t.output+V.output).length),t.output=`(?:${t.output}`,V.type="globstar",V.output=L(d)+(d.strictSlashes?")":"|$)"),V.value+=f,R.globstar=!0,R.output+=t.output+V.output,U(f);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+V.output).length),t.output=`(?:${t.output}`,V.type="globstar",V.output=`${L(d)}${k}|${k}${n})`,V.value+=f,R.output+=t.output+V.output,R.globstar=!0,U(f+X()),G({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){V.type="globstar",V.value+=f,V.output=`(?:^|${k}|${L(d)}${k})`,R.output=V.output,R.globstar=!0,U(f+X()),G({type:"slash",value:"/",output:""});continue}R.output=R.output.slice(0,-V.output.length),V.type="globstar",V.output=L(d),V.value+=f,R.output+=V.output,R.globstar=!0,U(f);continue}let n={type:"star",value:f,output:j};if(!0===d.bash){n.output=".*?",("bos"===V.type||"slash"===V.type)&&(n.output=B+n.output),G(n);continue}if(V&&("bracket"===V.type||"paren"===V.type)&&!0===d.regex){n.output=f,G(n);continue}(R.index===R.start||"slash"===V.type||"dot"===V.type)&&("dot"===V.type?(R.output+=C,V.output+=C):!0===d.dot?(R.output+=_,V.output+=_):(R.output+=B,V.output+=B),"*"!==Y()&&(R.output+=v,V.output+=v)),G(n)}for(;R.brackets>0;){if(!0===d.strictBrackets)throw SyntaxError(l("closing","]"));R.output=t.escapeLast(R.output,"["),z("brackets")}for(;R.parens>0;){if(!0===d.strictBrackets)throw SyntaxError(l("closing",")"));R.output=t.escapeLast(R.output,"("),z("parens")}for(;R.braces>0;){if(!0===d.strictBrackets)throw SyntaxError(l("closing","}"));R.output=t.escapeLast(R.output,"{"),z("braces")}if(!0!==d.strictSlashes&&("star"===V.type||"bracket"===V.type)&&G({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:f,NO_DOT:d,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:y}=e.globChars(s.windows),x=s.dot?m:d,T=s.dot?h:d,S=s.capture?"":"?:",b=!0===s.bash?".*?":g;s.capture&&(b=`(${b})`);let E=e=>!0===e.noglobstar?b:`(${S}(?:(?!${y}${e.dot?f: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]}}},v=k(t.removePrefix(r,{negated:!1,prefix:""}));return v&&!0!==s.strictSlashes&&(v+=`${c}?`),v},E=p}(),n=iG(),r=iz(),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:f}=i.test(n,o,t,{glob:e,posix:a}),d={glob:e,state:l,regex:o,posix:a,input:n,output:f,match:u,isMatch:c};return("function"==typeof s.onResult&&s.onResult(d),!1===c)?(d.isMatch=!1,!!r&&d):p(n)?("function"==typeof s.onIgnore&&s.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof s.onMatch&&s.onMatch(d),!r||d)};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,v=i}(),t=iG();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),A=n}());function iZ(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function i0(e){let t=e.toUpperCase();return e===t&&t!==e.toLowerCase()}var i1=r$({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=iQ(i,{noglobstar:!0});return{JSXOpeningElement(a){if(rq(a))return;let o=rJ(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=!(!i0(c.charAt(0))||Array.prototype.some.call(c.slice(1),e=>e.toLowerCase()===e.toUpperCase()&&!iZ(e)))&&Array.prototype.some.call(c.slice(1),e=>{let t;return t=e.toLowerCase(),e===t&&t!==e.toUpperCase()||iZ(e)}),f=t&&function(e){let t=e.charAt(0);if(!(i0(t)||iZ(t)))return!1;for(let t=1;t<e.length-1;t+=1){let n=e.charAt(t);if(!(i0(n)||iZ(n)||"_"===n))return!1}let n=e.charAt(e.length-1);return!!(i0(n)||iZ(n))}(c);if(!u&&!f&&!o){let n=t?"usePascalOrSnakeCase":"usePascalCase";e.report({messageId:n,node:a,data:{name:r}});break}p+=1}while(p<l.length&&!r)}}}}),i2=r$({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)=>((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})(r,i)&&e.report({messageId:"noLineGap",node:i,data:{prop1:n(r),prop2:n(i)}}),r.loc.end.line===i.loc.end.line&&" "!==t.text.slice(r.range[1],i.range[0])&&e.report({node:i,messageId:"onlyOneSpace",data:{prop1:n(r),prop2:n(i)},fix:e=>e.replaceTextRange([r.range[1],i.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))}}}});let i3={"prefer-double":{quote:'"',description:"singlequote",convert:e=>e.replace(/'/gu,'"')},"prefer-single":{quote:"'",description:"doublequote",convert:e=>e.replace(/"/gu,"'")}};var i6=r$({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=i3[e.options[0]||"prefer-double"];return{JSXAttribute(n){let r=n.value;r&&rT(r)&&!(r.value.includes(t.quote)||rb(r.raw,t.quote))&&e.report({node:r,messageId:"unexpected",data:{description:t.description},fix:e=>e.replaceText(r,t.convert(r.raw))})}}}});let i4={component:!0,html:!0};var i5=r$({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:i4.component,type:"boolean"},html:{default:i4.html,type:"boolean"}},additionalProperties:!1}]},create:e=>({JSXOpeningElement(t){var n,r;let i,s;n=t,((s=Object.assign({},i4,e.options[0])).component&&(r=n).name&&("JSXIdentifier"===r.name.type||"JSXMemberExpression"===r.name.type)&&!rq(r)||s.html&&rq(n))&&!n.selfClosing&&(0===n.parent.children.length||1===(i=n.parent.children).length&&"JSXText"===i[0].type&&i[0].value.includes("\n")&&""===i[0].value.replace(/(?!\xA0)\s/g,""))&&e.report({messageId:"notSelfClosing",node:t,fix(e){let n=[t.range[1]-1,t.parent.closingElement?.range[1]??NaN];return e.replaceTextRange(n," />")}})}})});function i9(e){return/^on[A-Z]/.test(e)}let i8=["children","dangerouslySetInnerHTML","key","ref"];function i7(e,t){return t.indexOf(e.split(":")[0])}function se(e){let n=t.get(e);return!!n&&!!n.hasComment}let st=new WeakMap;function sn(e,n,r,i,s){let a=st.get(e)||[];if(!a.includes(n)){let o,l,p,c,u,f;a.push(n),st.set(e,a),i.report({node:e.name??"",messageId:n,fix:(o=i.sourceCode,l=r.attributes.slice(0),c={ignoreCase:(p=i.options[0]||{}).ignoreCase||!1,callbacksLast:p.callbacksLast||!1,shorthandFirst:p.shorthandFirst||!1,shorthandLast:p.shorthandLast||!1,multiline:p.multiline||"ignore",noSortAlphabetically:p.noSortAlphabetically||!1,reservedFirst:p.reservedFirst||!1,reservedList:s,reservedLast:p.reservedLast||[],locale:p.locale||"auto"},f=(u=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],f="JSXSpreadAttribute"===o.type;if(u&&("JSXSpreadAttribute"!==u.type||f)||(i[(s+=1)-1]=[]),!f)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}(l,i)).slice(0).map(e=>[...e].sort((e,t)=>(function(e,t,n){let r=rX(e),i=rX(t),s=r.split(":")[0],a=i.split(":")[0],o=se(e),l=se(t);if(o&&!l)return 1;if(!o&&l)return -1;if(n.reservedFirst){let e=i7(r,n.reservedList),t=i7(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=i7(r,n.reservedLast),t=i7(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=i9(r),t=i9(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=!rB(e),s=!rB(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,c))),function(e){let n=[],r=o.getText();u.forEach((e,i)=>{e.forEach((e,s)=>{let a=f[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 i=n[0],s=n[n.length-1],a=s?s.range[0]:0,l=i?i.range[1]:-0;return n.forEach(e=>{r=`${r.slice(0,e.range[0])}${e.text}${r.slice(e.range[1])}`}),e.replaceTextRange([a,l],r.slice(a,l))})})}}var sr=r$({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:i8,f=n.reservedLast||[],d=n.locale||"auto";return{Program(){t=new WeakMap},JSXOpeningElement(t){let n=p&&!rq(t)?u.filter(e=>"dangerouslySetInnerHTML"!==e):u;t.attributes.reduce((u,m,h,g)=>{if("JSXSpreadAttribute"===m.type)return g[h+1];let y=rX(u),x=rX(m),T=y.split(":")[0],S=x.split(":")[0],b=u.value,E=m.value,k=i9(y),v=i9(x);if(r&&(y=y.toLowerCase(),x=x.toLowerCase()),p){if(c)return c(m),u;let r=i7(y,n),i=i7(x,n);if(r>-1&&-1===i)return m;if(!0!==p&&r>i||-1===r&&i>-1)return sn(m,"listReservedPropsFirst",t,e,n),u;if(r>-1&&i>-1&&i>r&&T!==S)return m}if(f.length>0){let r=i7(y,f),i=i7(x,f);if(-1===r&&i>-1)return m;if(r<i||r>-1&&-1===i)return sn(m,"listReservedPropsLast",t,e,n),u;if(r>-1&&i>-1&&i>r&&T!==S)return m}if(i){if(!k&&v)return m;if(k&&!v)return sn(u,"listCallbacksLast",t,e,n),u}if(s){if(E&&!b)return m;if(!E&&b)return sn(m,"listShorthandFirst",t,e,n),u}if(a){if(!E&&b)return m;if(E&&!b)return sn(u,"listShorthandLast",t,e,n),u}let w=!rB(u),A=!rB(m);if("first"===o){if(w&&!A)return m;if(!w&&A)return sn(m,"listMultilineFirst",t,e,n),u}else if("last"===o){if(!w&&A)return m;if(w&&!A)return sn(u,"listMultilineLast",t,e,n),u}return!l&&(r||"auto"!==d?y.localeCompare(x,"auto"===d?void 0:d)>0:y>x)?(sn(m,"sortPropsByAlpha",t,e,n),u):m},t.attributes[0])}}}});function si(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 ss(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 sa(e,t,n){if(!("selfClosing"in t&&t.selfClosing)){let r=e.sourceCode,i="proportional-always"===n?rL(t):r.getLastTokens(t,2)[0],s=r.getTokenAfter(i);if(!rB(t)&&"proportional-always"===n&&(0,rR.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!==rB(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]])})}}let so={closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"allow"};var sl=r$({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:so,additionalProperties:!1}]},create(e){let t=Object.assign({},so,e.options[0]);return{JSXOpeningElement(n){"allow"!==t.closingSlash&&n.selfClosing&&si(e,n,t.closingSlash),"allow"!==t.afterOpening&&ss(e,n,t.afterOpening),"allow"!==t.beforeSelfClosing&&n.selfClosing&&function(e,t,n){let r=e.sourceCode,i=rL(t),s=r.getTokenAfter(i);if(!rB(t)&&"proportional-always"===n&&(0,rR.isTokenOnSameLine)(i,s))return e.report({node:t,messageId:"beforeSelfCloseNeedNewline",loc:i.loc.end,fix:e=>e.insertTextBefore(s,"\n")});if(!(0,rR.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&&sa(e,n,t.beforeClosing)},JSXClosingElement(n){"allow"!==t.afterOpening&&ss(e,n,t.afterOpening),"allow"!==t.closingSlash&&si(e,n,t.closingSlash),"allow"!==t.beforeClosing&&sa(e,n,t.beforeClosing)}}}});let sp={declaration:"parens",assignment:"parens",return:"parens",arrow:"parens",condition:"ignore",logical:"ignore",prop:"ignore",propertyValue:"ignore"};var sc=r$({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]:sp[t]}function n(e){let n=t(e);return n&&"ignore"!==n}function r(n,r){if(!n||!rY(n))return;let i=e.sourceCode,s=t(r);if(!0!==s&&"parens"!==s||(0,rR.isParenthesized)(n,e.sourceCode)||rB(n)||e.report({node:n,messageId:"missingParens",fix:e=>e.replaceText(n,`(${i.getText(n)})`)}),"parens-new-line"===s&&!rB(n))if((0,rR.isParenthesized)(n,e.sourceCode)){let t,r,s=(t=e.sourceCode.getTokenBefore(n),!!(0,rR.isParenthesized)(n,e.sourceCode)&&!!(0,rR.isTokenOnSameLine)(t,n)),a=(r=e.sourceCode.getTokenAfter(n),!!(0,rR.isParenthesized)(n,e.sourceCode)&&!!(0,rR.isTokenOnSameLine)(n,r));(s||a)&&e.report({node:n,messageId:"parensOnNewLines",fix:e=>{let t=i.getText(n);return s&&(t=`
10
11
  ${t}`),a&&(t=`${t}
11
12
  `),e.replaceText(n,t)}})}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=>{let s;return e.replaceTextRange([t.range[0],r&&(";"===r.value||"}"===r.value)?r.range[0]:n.range[1]],`${(s="{"===t.value||"["===t.value,`${t.value.trim()}${s?"":" "}`)}(
12
13
  ${p}${a}${a.length>0?`
13
14
  ${p}`:""}${i.getText(n)}
14
15
  ${c})`)}})}else e.report({node:n,messageId:"missingParens",fix:e=>e.replaceText(n,`(
15
16
  ${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 sc(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 su=rM({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=sc({},r.align),n.align.on=r.align.on||"colon",n.align.mode=r.align.mode||"strict",n.multiLine=sc({},r.multiLine||r),n.singleLine=sc({},r.singleLine||r)):(n.multiLine=sc({},r.multiLine||r),n.singleLine=sc({},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&&rL(e.options);let n=t.getTokenBefore(e.attributes[0],rj.isOpeningBraceToken);return(0,rj.isTokenOnSameLine)(t.getTokenAfter(e.attributes[e.attributes.length-1],rj.isClosingBraceToken),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 f(e){return p.getTokenAfter(e,rj.isColonToken)}function d(e){let t=f(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&&rj.LINEBREAK_MATCHER.test(r))){let r,i,s=f(t.key),o=p.getTokenBefore(s,{includeComments:!0}),l=p.getTokenAfter(s,{includeComments:!0}),c="key"===n,u=a>0,d=Math.abs(a),m=Array(d+1).join(" "),h=c?o.loc.end:s.loc.start,g=c?s.loc.start:l.loc.start,y=c?o.loc:l.loc;if(u){let e;e=c?[o.range[1],o.range[1]+d]:[l.range[0]-d,l.range[0]],r=function(t){return t.removeRange(e)}}else r=c?function(e){return e.insertTextAfter(o,m)}:function(e){return e.insertTextBefore(l,m)};e.report({node:t[n],loc:u?{start:h,end:g}:y,messageId:u?"key"===n?"extraKey":"extraValue":"key"===n?"missingKey":"missingValue",data:{computed:"ImportAttribute"!==t.type&&t.computed?"computed ":"",key:(i=t.key,"ImportAttribute"!==t.type&&t.computed?p.getText().slice(i.range[0],i.range[1]):ra(t))},fix:r})}}function h(e){let t=p.getFirstToken(e),n=d(e.key);return rJ(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,r=e.loc.start.line,i=(u(t)?(n=f(t.key),p.getTokenAfter(n)):t).loc.start.line;if(i-r<=1)return!0;let s=p.getCommentsBefore(t);if(s.length&&s[0].loc.start.line-r<=1&&i-s.at(-1).loc.end.line<=1){for(let e=1;e<s.length;e++)if(s[e].loc.start.line-s[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;return(0,rj.isTokenOnSameLine)(e.at(-1),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 rJ(p.lines.at(t).slice(0,e.column))}function E(e){return(e.type===tn.AST_NODE_TYPES.TSPropertySignature||e.type===tn.AST_NODE_TYPES.TSIndexSignature||e.type===tn.AST_NODE_TYPES.PropertyDefinition)&&!!e.typeAnnotation}function k(e){return E(e)&&(0,rj.isTokenOnSameLine)(e,e.typeAnnotation)}function v(e){return e.type!==tn.AST_NODE_TYPES.TSIndexSignature?p.getText(e.key):p.getText(e).slice(0,p.getTokenAfter(e.parameters.at(-1),rj.isClosingBracketToken).range[1]-e.range[0])}function w(e){return d(e.type!==tn.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-w(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:v(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:v(t)}})}function _(t){if(l.includes(t.type))return;let n=t.type===tn.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?1: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(w(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:v(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),i=(t?r.singleLine?r.singleLine.afterColon:r.afterColon:r.multiLine?r.multiLine.afterColon:r.afterColon)??!0?1: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:rL(t)})}return{...o?{ObjectExpression(e){l.includes(e.type)||(rL(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,rL(e.parent)?a:s)},ImportAttribute(e){let t=e.parent;y(e,c(t,p)?a:s)}},TSTypeLiteral:_,TSInterfaceBody:_,ClassBody:_}}});let sf=/^[)\]}>]$/u,sd=/^(?:[([{<~!]|\+\+?|--?)$/u,sm=/^[)\]}>*]$/u,sh=/^[{*]$/u,sg=/\$\{$/u,sy=/^\}/u,sx=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u;var sT=rM({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:re.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&&sg.test(e.value)}function i(e){return"Template"===e.type&&sy.test(e.value)}function s(i,s){let a=t.getTokenBefore(i);a&&(sx.test(a.type)||s.test(a.value))&&!r(a)&&!n.has(a)&&(0,rj.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&&(sx.test(a.type)||s.test(a.value))&&!r(a)&&!n.has(a)&&(0,rj.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&&(sx.test(a.type)||s.test(a.value))&&!i(a)&&!n.has(a)&&(0,rj.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&&(sx.test(a.type)||s.test(a.value))&&!i(a)&&!n.has(a)&&(0,rj.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<re.length;++e){let c=re[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||sf)}function u(e,t){p[e.value].after(e,t||sd)}function f(e){c(e),u(e)}function d(e){let n=e&&t.getFirstToken(e);if(n){if(!ru(n)){if("VariableDeclaration"!==e.type)return;else if("using"!==e.kind&&"await using"!==e.kind||"Identifier"!==n.type)return}f(n)}}function m(e){let n=e&&t.getFirstToken(e);ru(n)&&c(n)}function h(e){if(e){let n=t.getTokenBefore(e,ru);n&&f(n)}}function g(e){let n=e&&t.getFirstToken(e);n&&(ru(n)&&"function"===n.value||"async"===n.value)&&c(n)}function y(e){d(e),h(e.superClass)}function x(e){let n=t.getFirstToken(e);if(c(n,sm),u(n,sh),"ExportDefaultDeclaration"===e.type&&f(t.getTokenAfter(n)),"ExportAllDeclaration"===e.type&&e.exported){let n=t.getTokenBefore(e.exported);c(n,sm),u(n,sh)}if("source"in e&&e.source){let n=t.getTokenBefore(e.source);if(c(n,sm),u(n,sh),e.attributes){let n=t.getTokenAfter(e.source);ru(n)&&f(n)}}"ExportDefaultDeclaration"!==e.type&&function(e){let n;switch(e.type){case tn.AST_NODE_TYPES.ImportDeclaration:n=e.importKind;break;case tn.AST_NODE_TYPES.ExportAllDeclaration:case tn.AST_NODE_TYPES.ExportNamedDeclaration:n=e.exportKind}if("type"!==n)return;let r=t.getFirstToken(e,{skip:1});(0,rj.isTypeKeyword)(r)&&(c(r,sm),u(r,sh))}(e)}function T(e){if("static"in e&&e.static&&d(e),"get"===e.kind||"set"===e.kind||("method"in e&&e.method||"MethodDefinition"===e.type)&&"async"in e.value&&e.value.async||e.type===tn.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");f(n)}}return{DebuggerStatement:d,WithStatement:d,BreakStatement:d,ContinueStatement:d,ReturnStatement:d,ThrowStatement:d,TryStatement(e){d(e),e.handler&&(e.handler.param?m(e.handler):d(e.handler)),h(e.finalizer)},IfStatement(e){d(e),h(e.alternate)},SwitchStatement:d,SwitchCase:d,DoWhileStatement(e){d(e),h(e.test)},ForInStatement(e){d(e);let n=t.getTokenBefore(e.right,rj.isNotOpeningParenToken);"PrivateIdentifier"!==t.getTokenBefore(n).type&&c(n),u(n)},ForOfStatement(e){e.await?(c(t.getFirstToken(e,0)),u(t.getFirstToken(e,1))):d(e);let n=t.getTokenBefore(e.right,rj.isNotOpeningParenToken);"PrivateIdentifier"!==t.getTokenBefore(n).type&&c(n),u(n)},ForStatement:d,WhileStatement:d,ClassDeclaration:y,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,FunctionDeclaration:g,ImportDeclaration:x,VariableDeclaration:d,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),sm)},ExportSpecifier(e){if(e.local.range[0]!==e.exported.range[0]){let n=t.getTokenBefore(e.exported);c(n,sm),u(n,sh)}},ImportNamespaceSpecifier(e){c(t.getFirstToken(e,1),sm)},MethodDefinition:T,PropertyDefinition:T,AccessorProperty:T,StaticBlock:d,Property:T,BinaryExpression(e){if(">"!==e.operator)return;let r=t.getTokenBefore(e.right,rj.isNotOpeningParenToken);n.add(r)},TSAsExpression(e){f(t.getTokenAfter(e.expression,e=>"as"===e.value))},TSSatisfiesExpression(e){f(t.getTokenAfter(e.expression,e=>"satisfies"===e.value))}}}}),sS=rM({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,n1(i,"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&&(n3.test(i.value)||a.test(i.value))||n&&r.test(i.value))return;let l=o.getTokenBefore(i,{includeComments:!0}),p=l&&(0,rj.isTokenOnSameLine)(l,i);t?p&&e.report({node:i,messageId:"above"}):p||e.report({node:i,messageId:"beside"})})}}}}),sb=rM({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=rt(),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)})}}}}}),sE=rM({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,r,i=RegExp(t.ignorePattern??"","u"),s=e.sourceCode,a=s.getAllComments(),o=s.lines,l=o.length+1,p=(n=[],a.forEach(e=>{let t=e.loc.start.line,r=e.loc.end.line;n.push(t,r)}),n),c=(r=[],o.forEach((e,t)=>{e.trim()||r.push(t+1)}),r),u=new Set(p.concat(c));function f(e){let t=s.getNodeByRangeIndex(e.range[0]);if(t&&"StaticBlock"===t.type){let n=s.getFirstToken(t,{skip:1});return n&&e.range[0]>=n.range[0]?t:null}return t}function d(e,t){let n=f(e);if(n&&n.type===t){let t=n;return"StaticBlock"===n.type?t=s.getFirstToken(n,{skip:1}):"SwitchStatement"===n.type&&(t=s.getTokenAfter(n.discriminant,{filter:rj.isOpeningBraceToken})),!!t&&e.loc.start.line-t.loc.start.line==1}return!1}function m(e,t){let n=f(e);return!!n&&n.type===t&&n.loc.end.line-e.loc.end.line==1}function h(e){return d(e,tn.AST_NODE_TYPES.ClassBody)}function g(e){return m(e,tn.AST_NODE_TYPES.ClassBody)}function y(n,{before:r,after:a}){if(!1!==t.applyDefaultIgnorePatterns&&n3.test(n.value)||t.ignorePattern&&i.test(n.value))return;let o=n.loc.start.line-1,p=n.loc.end.line+1;if(o<1&&(r=!1),p>=l&&(a=!1),function(e){let t=e;do t=s.getTokenBefore(t,{includeComments:!0});while(t&&(0,rj.isCommentToken)(t));if(t&&(0,rj.isTokenOnSameLine)(t,e))return!0;t=e;do t=s.getTokenAfter(t,{includeComments:!0});while(t&&(0,rj.isCommentToken)(t));return!!(t&&(0,rj.isTokenOnSameLine)(e,t))}(n))return;let c=!!t.allowBlockStart&&(d(n,tn.AST_NODE_TYPES.ClassBody)||d(n,tn.AST_NODE_TYPES.BlockStatement)||d(n,tn.AST_NODE_TYPES.StaticBlock)||d(n,tn.AST_NODE_TYPES.SwitchCase)||d(n,tn.AST_NODE_TYPES.SwitchStatement))&&!(!1===t.allowClassStart&&h(n)),f=!!t.allowBlockEnd&&(m(n,tn.AST_NODE_TYPES.ClassBody)||m(n,tn.AST_NODE_TYPES.BlockStatement)||m(n,tn.AST_NODE_TYPES.StaticBlock)||m(n,tn.AST_NODE_TYPES.SwitchCase)||m(n,tn.AST_NODE_TYPES.SwitchStatement))&&!(!1===t.allowClassEnd&&g(n)),y=!!t.allowClassStart&&h(n),x=!!t.allowClassEnd&&g(n),T=!!t.allowObjectStart&&(d(n,tn.AST_NODE_TYPES.ObjectExpression)||d(n,tn.AST_NODE_TYPES.ObjectPattern)),S=!!t.allowObjectEnd&&(m(n,tn.AST_NODE_TYPES.ObjectExpression)||m(n,tn.AST_NODE_TYPES.ObjectPattern)),b=!!t.allowArrayStart&&(d(n,tn.AST_NODE_TYPES.ArrayExpression)||d(n,tn.AST_NODE_TYPES.ArrayPattern)),E=!!t.allowArrayEnd&&(m(n,tn.AST_NODE_TYPES.ArrayExpression)||m(n,tn.AST_NODE_TYPES.ArrayPattern)),k=!!t.allowInterfaceStart&&d(n,tn.AST_NODE_TYPES.TSInterfaceBody),v=!!t.allowInterfaceEnd&&m(n,tn.AST_NODE_TYPES.TSInterfaceBody),w=!!t.allowTypeStart&&d(n,tn.AST_NODE_TYPES.TSTypeLiteral),A=!!t.allowTypeEnd&&m(n,tn.AST_NODE_TYPES.TSTypeLiteral),C=!!t.allowEnumStart&&(d(n,tn.AST_NODE_TYPES.TSEnumBody)||d(n,tn.AST_NODE_TYPES.TSEnumDeclaration)),_=!!t.allowEnumEnd&&(m(n,tn.AST_NODE_TYPES.TSEnumBody)||m(n,tn.AST_NODE_TYPES.TSEnumDeclaration)),O=!!t.allowModuleStart&&d(n,tn.AST_NODE_TYPES.TSModuleBlock),P=!!t.allowModuleEnd&&m(n,tn.AST_NODE_TYPES.TSModuleBlock),I=c||y||T||b||k||w||C||O,N=f||x||S||E||v||A||_||P,L=s.getTokenBefore(n,{includeComments:!0}),D=s.getTokenAfter(n,{includeComments:!0});if(!I&&r&&!u.has(o)&&!((0,rj.isCommentToken)(L)&&(0,rj.isTokenOnSameLine)(L,n))){let t=n.range[0]-n.loc.start.column,r=[t,t];e.report({node:n,messageId:"before",fix:e=>e.insertTextBeforeRange(r,"\n")})}N||!a||u.has(p)||(0,rj.isCommentToken)(D)&&(0,rj.isTokenOnSameLine)(n,D)||e.report({node:n,messageId:"after",fix:e=>e.insertTextAfter(n,"\n")})}return{Program(){a.forEach(e=>{e.type===tn.AST_TOKEN_TYPES.Line?(t.beforeLineComment||t.afterLineComment)&&y(e,{after:t.afterLineComment,before:t.beforeLineComment}):e.type===tn.AST_TOKEN_TYPES.Block?(t.beforeBlockComment||t.afterBlockComment)&&y(e,{after:t.afterBlockComment,before:t.beforeBlockComment}):rf(e)&&t.afterHashbangComment&&y(e,{after:t.afterHashbangComment,before:!1})})}}}});let sk={"*":{test:()=>!0},field:{test:e=>"PropertyDefinition"===e.type},method:{test:e=>"MethodDefinition"===e.type}};var sv=rM({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!==tn.AST_NODE_TYPES.TSAbstractMethodDefinition&&e.type!==tn.AST_NODE_TYPES.MethodDefinition||e.value.type!==tn.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,rj.isSemicolonToken)(n)&&!(0,rj.isTokenOnSameLine)(r,n)&&(0,rj.isTokenOnSameLine)(n,i)?{curLast:r,nextFirst:n}:{curLast:n,nextFirst:i}}(n[t],n[t+1]),c=!!(0,rj.isTokenOnSameLine)(o,l)&&r[1].exceptAfterSingleLine,u=a(l,p,1),f=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),d=f.loc.start.line-u.loc.end.line>1,m=0!==s.getTokensBetween(u,f,{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(sk[r.prev].test(e)&&sk[r.next].test(t))return r.blankLine}return null}(n[t],n[t+1]);"never"===g&&d?e.report({node:n[t+1],messageId:"never",fix:e=>m?null:e.replaceTextRange([u.range[1],f.range[0]],"\n")}):"always"!==g||c||d||e.report({node:n[t+1],messageId:"always",fix:e=>m?null:e.insertTextAfter(h,"\n")})}}}}}),sw=rM({name:"list-style",meta:{type:"layout",docs:{description:"Enforce consistent spacing and line break styles inside brackets.",experimental:!0},fixable:"whitespace",schema:[{$defs:{singleLineConfig:{type:"object",additionalProperties:!1,properties:{spacing:{type:"string",enum:["always","never"]},maxItems:{type:"integer",minimum:0}}},multiLineConfig:{type:"object",additionalProperties:!1,properties:{minItems:{type:"integer",minimum:0}}},baseConfig:{type:"object",additionalProperties:!1,properties:{singleLine:{$ref:"#/items/0/$defs/singleLineConfig"},multiline:{$ref:"#/items/0/$defs/multiLineConfig"}}}},type:"object",additionalProperties:!1,properties:{singleLine:{$ref:"#/items/0/$defs/singleLineConfig"},multiLine:{$ref:"#/items/0/$defs/multiLineConfig"},overrides:{type:"object",additionalProperties:!1,properties:{"[]":{$ref:"#/items/0/$defs/baseConfig"},"{}":{$ref:"#/items/0/$defs/baseConfig"},"<>":{$ref:"#/items/0/$defs/baseConfig"},"()":{$ref:"#/items/0/$defs/baseConfig"},ArrayExpression:{$ref:"#/items/0/$defs/baseConfig"},ArrayPattern:{$ref:"#/items/0/$defs/baseConfig"},ArrowFunctionExpression:{$ref:"#/items/0/$defs/baseConfig"},CallExpression:{$ref:"#/items/0/$defs/baseConfig"},ExportNamedDeclaration:{$ref:"#/items/0/$defs/baseConfig"},FunctionDeclaration:{$ref:"#/items/0/$defs/baseConfig"},FunctionExpression:{$ref:"#/items/0/$defs/baseConfig"},ImportDeclaration:{$ref:"#/items/0/$defs/baseConfig"},ImportAttributes:{$ref:"#/items/0/$defs/baseConfig"},NewExpression:{$ref:"#/items/0/$defs/baseConfig"},ObjectExpression:{$ref:"#/items/0/$defs/baseConfig"},ObjectPattern:{$ref:"#/items/0/$defs/baseConfig"},TSDeclareFunction:{$ref:"#/items/0/$defs/baseConfig"},TSFunctionType:{$ref:"#/items/0/$defs/baseConfig"},TSInterfaceBody:{$ref:"#/items/0/$defs/baseConfig"},TSEnumBody:{$ref:"#/items/0/$defs/baseConfig"},TSTupleType:{$ref:"#/items/0/$defs/baseConfig"},TSTypeLiteral:{$ref:"#/items/0/$defs/baseConfig"},TSTypeParameterDeclaration:{$ref:"#/items/0/$defs/baseConfig"},TSTypeParameterInstantiation:{$ref:"#/items/0/$defs/baseConfig"},JSONArrayExpression:{$ref:"#/items/0/$defs/baseConfig"},JSONObjectExpression:{$ref:"#/items/0/$defs/baseConfig"}}}}}],messages:{shouldSpacing:"Should have space between '{{prev}}' and '{{next}}'",shouldNotSpacing:"Should not have space(s) between '{{prev}}' and '{{next}}'",shouldWrap:"Should have line break between '{{prev}}' and '{{next}}'",shouldNotWrap:"Should not have line break(s) between '{{prev}}' and '{{next}}'"}},defaultOptions:[{singleLine:{spacing:"never",maxItems:1/0},multiLine:{minItems:0},overrides:{"{}":{singleLine:{spacing:"always"}}}}],create:(e,[t]=[{}])=>{let{sourceCode:n}=e,{singleLine:r,multiLine:i,overrides:s}=t,a={},o={"[]":{left:rj.isOpeningBracketToken,right:rj.isClosingBracketToken},"{}":{left:rj.isOpeningBraceToken,right:rj.isClosingBraceToken},"()":{left:rj.isOpeningParenToken,right:rj.isClosingParenToken},"<>":{left:e=>"<"===e.value,right:e=>">"===e.value}};function l(t,l,p){if(0===p.length)return;let c=function(e,t,r){switch(e.type){case tn.AST_NODE_TYPES.CallExpression:case tn.AST_NODE_TYPES.NewExpression:return n.getTokenAfter(e.typeArguments??e.callee);case tn.AST_NODE_TYPES.ArrayExpression:case tn.AST_NODE_TYPES.ArrayPattern:return n.getFirstToken(e);default:{let e=n.getTokenBefore(t[0]),{left:i}=o[r];return e&&i(e)?e:null}}}(l,p,t),u=function(e,t,r){switch(e.type){case tn.AST_NODE_TYPES.ArrayExpression:case tn.AST_NODE_TYPES.ArrayPattern:return n.getLastToken(e);default:{let e=n.getTokenAfter(t.at(-1),rj.isNotCommaToken),{right:i}=o[r];return e&&i(e)?e:null}}}(l,p,t);if(!c||!u)return;let f=function(e,t){if(!a[t]){let n=s[e]??{},o=s[t]??{};a[t]={singleLine:{...r,...n.singleLine,...o.singleLine},multiline:{...i,...n.multiline,...o.multiline}}}return a[t]}(t,p[0]?.type==="ImportAttribute"?"ImportAttributes":l.type);if((0,rj.isTokenOnSameLine)(c,u)&&p.length<=f.singleLine.maxItems){let t="always"===f.singleLine.spacing,r=n.getTokenAfter(c,{includeComments:!0}),i=n.getTokenBefore(u,{includeComments:!0});function d(r,i){let s=n.isSpaceBetween(r,i);!s&&t?e.report({node:l,messageId:"shouldSpacing",loc:{start:r.loc.end,end:i.loc.start},data:{prev:r.value,next:i.value},fix:e=>e.insertTextAfter(r," ")}):s&&!t&&e.report({node:l,messageId:"shouldNotSpacing",loc:{start:r.loc.end,end:i.loc.start},data:{prev:r.value,next:i.value},fix:e=>e.removeRange([r.range[1],i.range[0]])})}d(c,r),d(i,u)}else!function(t,r,i,s,a){let o=r.length,l=rL(t)?o>a.singleLine.maxItems:o>=a.multiline.minItems&&!(0,rj.isTokenOnSameLine)(i,r[0]??n.getTokenAfter(i));function p(i,s){if((0,rj.isTokenOnSameLine)(i,s))l&&e.report({node:t,messageId:"shouldWrap",loc:{start:i.loc.end,end:s.loc.start},data:{prev:i.value,next:s.value},fix:e=>rD(n,i,s)?null:e.insertTextBefore(s,"\n")});else{if(l)return;e.report({node:t,messageId:"shouldNotWrap",loc:{start:i.loc.end,end:s.loc.start},data:{prev:i.value,next:s.value},fix(e){if(rD(n,i,s))return null;let a=[i.range[1],s.range[0]],o=n.text.slice(...a),l=1===r.length?"":function(e,t){if("TSInterfaceBody"===e.type||"TSTypeLiteral"===e.type)return t.value.match(/(?:,|;)$/)?void 0:","}(t,i);return e.replaceTextRange(a,o.replaceAll(RegExp(rj.LINEBREAK_MATCHER,"g"),l??""))}})}}let c=n.getTokenAfter(i,{includeComments:!1});p(i,c);for(let e=0;e<o;e++){let t=r[e];if(!t)continue;let s=n.getFirstToken(t);(0!==e||c!==s)&&p(n.getTokenBefore(t,{filter:e=>(0,rj.isNotOpeningParenToken)(e)||e===i,includeComments:!1}),s)}p(n.getTokenBefore(s,{includeComments:!1}),s)}(l,p,c,u,f)}return{ArrayExpression(e){l("[]",e,e.elements)},ArrayPattern(e){l("[]",e,e.elements)},ObjectExpression(e){l("{}",e,e.properties)},ObjectPattern(e){l("{}",e,e.properties)},FunctionDeclaration(e){l("()",e,e.params)},FunctionExpression(e){l("()",e,e.params)},ArrowFunctionExpression(e){l("()",e,e.params)},CallExpression(e){l("()",e,e.arguments)},NewExpression(e){l("()",e,e.arguments)},ImportDeclaration(e){l("{}",e,e.specifiers.filter(e=>"ImportSpecifier"===e.type)),e.attributes&&l("{}",e,e.attributes)},ExportNamedDeclaration(e){l("{}",e,e.specifiers),e.attributes&&l("{}",e,e.attributes)},ExportAllDeclaration(e){e.attributes&&l("{}",e,e.attributes)},TSTupleType(e){l("[]",e,e.elementTypes)},TSTypeLiteral(e){l("{}",e,e.members)},TSInterfaceBody(e){l("{}",e,e.body)},TSEnumBody(e){l("{}",e,e.members)},TSDeclareFunction(e){l("()",e,e.params)},TSFunctionType(e){l("()",e,e.params)},TSTypeParameterDeclaration(e){l("<>",e,e.params)},TSTypeParameterInstantiation(e){l("<>",e,e.params)},JSONArrayExpression(e){l("[]",e,e.elements)},JSONObjectExpression(e){l("{}",e,e.properties)}}}});let sA={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},sC={anyOf:[sA,{type:"integer",minimum:0}]};var s_=rM({name:"max-len",meta:{type:"layout",docs:{description:"Enforce a maximum line length"},schema:[sC,sC,sA],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,f=r.comments,d=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&&(d=RegExp(r.ignorePattern,"u")),{Program:function(r){let y,x=n.lines,T=a||f||c?(y=[],n.getAllComments().forEach(e=>{let t=n.getNodeByRangeIndex(e.range[0]);t&&t.parent&&"JSXEmptyExpression"===t.type&&"JSXExpressionContainer"===t.parent.type&&rL(t.parent)?y[y.length-1]!==t.parent&&y.push(t.parent):y.push(e)}),y):[],S=0,b=g(n.ast.tokens.filter(e=>"String"===e.type||"JSXText"===e.type&&"JSXAttribute"===n.getNodeByRangeIndex(e.range[0]-1).type)),E=g(n.ast.tokens.filter(e=>"Template"===e.type)),k=g(n.ast.tokens.filter(e=>"RegularExpression"===e.type));x.forEach((n,g)=>{var y,x;let v,w,A=g+1,C=!1;if(S<T.length){let e,t,r,i=null;do i=T[++S];while(i&&i.loc.start.line<=A);if(e=(y=i=T[--S]).loc.start,t=y.loc.end,r=!n.slice(0,y.loc.start.column).trim(),y&&(e.line<A||e.line===A&&r)&&(t.line>A||t.line===A&&t.column===n.length))C=!0,v=n;else if(c&&m(n,A,i)){v=h(n,i);let e=S;for(;m(v,A,T[--e]);)v=h(v,T[e])}else v=n}else v=n;if(d&&d.test(v)||u&&t.test(v)||o&&b[A]||l&&E[A]||p&&k[A])return;let _=(w=0,(x=v).replace(/\t/gu,(e,t)=>{let n=t+w;return w+=s-(s?n%s:0)-1,""}),Array.from(x).length+w),O=C&&f;if(C&&a)return;let P={start:{line:A,column:0},end:{line:A,column:v.length}};O?_>f&&e.report({node:r,loc:P,messageId:"maxComment",data:{lineLength:_,maxCommentLength:f}}):_>i&&e.report({node:r,loc:P,messageId:"max",data:{lineLength:_,maxLength:i}})})}}}});let sO=["BreakStatement","ClassDeclaration","ContinueStatement","DebuggerStatement","DoWhileStatement","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","LabeledStatement","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","VariableDeclaration","WhileStatement","WithStatement","ExportNamedDeclaration","ExportDefaultDeclaration","ExportAllDeclaration"];var sP=rM({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:sO}}},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,rj.isNotSemicolonToken).loc.end.line;n!==s&&(p(),a=1,s=n)}let f={"Program:exit":p};for(let e of sO)i.includes(e)||(f[e]=c,f[`${e}:exit`]=u);return f}});let sI={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 sN=rM({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:sI},type:"object",properties:{...sI.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=rF(t,r.interface),s=rF(t,r.typeLiteral);function a(r){let a=r.type===tn.AST_NODE_TYPES.TSInterfaceBody?r.body:r.members,o=rL(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===tn.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"),f=s("comma"),d=s("none");";"===l.value?f?a="expectedComma":d&&(o=!0,a="unexpectedSemi"):","===l.value?u?a="expectedSemi":d&&(o=!0,a="unexpectedComma"):u?(o=!0,a="expectedSemi"):f&&(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:d,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}}}),sL=rM({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(rj.LINEBREAK_MATCHER);return t.length>0&&t.every((e,n)=>0===n||n===t.length-1?rO(e):a(e))}function l([e]){if("Block"!==e.type)return!1;let t=e.value.split(rj.LINEBREAK_MATCHER);return/^\*\s*$/u.test(t[0])&&t.slice(1,-1).every(e=>/^\s* /u.test(e))&&rO(t.at(-1))}function p([e]){if("Block"!==e.type)return!1;let t=e.value.split(rj.LINEBREAK_MATCHER);return/^!\s*$/u.test(t[0])&&t.slice(1,-1).every(e=>/^\s* /u.test(e))&&rO(t.at(-1))}function c(e){let[n]=e;if("Line"===n.type){let t;return t=e.every(({value:e})=>0===e.trim().length||e.startsWith(" ")),e.map(({value:e})=>t?e.replace(/^ /u,""):e)}if(o(e)){let e,t;return t=(e=n.value.split(rj.LINEBREAK_MATCHER).slice(1,-1).map(e=>e.replace(r_,""))).every(e=>{let t=e.replace(/\s*\*/u,"");return 0===t.trim().length||t.startsWith(" ")}),e.map(e=>e.replace(t?/\s*\* ?/u:/\s*\*/u,""))}return function(e){let n=e.value.split(rj.LINEBREAK_MATCHER).map(e=>e.replace(r_,"")),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 f(e,t){return`/* ${t.join(`
17
+ )`)})}}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 su(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 sf=r$({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=su({},r.align),n.align.on=r.align.on||"colon",n.align.mode=r.align.mode||"strict",n.multiLine=su({},r.multiLine||r),n.singleLine=su({},r.singleLine||r)):(n.multiLine=su({},r.multiLine||r),n.singleLine=su({},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&&rB(e.options);let n=t.getTokenBefore(e.attributes[0],rR.isOpeningBraceToken);return(0,rR.isTokenOnSameLine)(t.getTokenAfter(e.attributes[e.attributes.length-1],rR.isClosingBraceToken),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 f(e){return p.getTokenAfter(e,rR.isColonToken)}function d(e){let t=f(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&&rR.LINEBREAK_MATCHER.test(r))){let r,i,s=f(t.key),o=p.getTokenBefore(s,{includeComments:!0}),l=p.getTokenAfter(s,{includeComments:!0}),c="key"===n,u=a>0,d=Math.abs(a),m=Array(d+1).join(" "),h=c?o.loc.end:s.loc.start,g=c?s.loc.start:l.loc.start,y=c?o.loc:l.loc;if(u){let e;e=c?[o.range[1],o.range[1]+d]:[l.range[0]-d,l.range[0]],r=function(t){return t.removeRange(e)}}else r=c?function(e){return e.insertTextAfter(o,m)}:function(e){return e.insertTextBefore(l,m)};e.report({node:t[n],loc:u?{start:h,end:g}:y,messageId:u?"key"===n?"extraKey":"extraValue":"key"===n?"missingKey":"missingValue",data:{computed:"ImportAttribute"!==t.type&&t.computed?"computed ":"",key:(i=t.key,"ImportAttribute"!==t.type&&t.computed?p.getText().slice(i.range[0],i.range[1]):ro(t))},fix:r})}}function h(e){let t=p.getFirstToken(e),n=d(e.key);return rU(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,r=e.loc.start.line,i=(u(t)?(n=f(t.key),p.getTokenAfter(n)):t).loc.start.line;if(i-r<=1)return!0;let s=p.getCommentsBefore(t);if(s.length&&s[0].loc.start.line-r<=1&&i-s.at(-1).loc.end.line<=1){for(let e=1;e<s.length;e++)if(s[e].loc.start.line-s[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;return(0,rR.isTokenOnSameLine)(e.at(-1),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 rU(p.lines.at(t).slice(0,e.column))}function E(e){return(e.type===tr.AST_NODE_TYPES.TSPropertySignature||e.type===tr.AST_NODE_TYPES.TSIndexSignature||e.type===tr.AST_NODE_TYPES.PropertyDefinition)&&!!e.typeAnnotation}function k(e){return E(e)&&(0,rR.isTokenOnSameLine)(e,e.typeAnnotation)}function v(e){return e.type!==tr.AST_NODE_TYPES.TSIndexSignature?p.getText(e.key):p.getText(e).slice(0,p.getTokenAfter(e.parameters.at(-1),rR.isClosingBracketToken).range[1]-e.range[0])}function w(e){return d(e.type!==tr.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-w(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:v(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:v(t)}})}function _(t){if(l.includes(t.type))return;let n=t.type===tr.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?1: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(w(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:v(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),i=(t?r.singleLine?r.singleLine.afterColon:r.afterColon:r.multiLine?r.multiLine.afterColon:r.afterColon)??!0?1: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:rB(t)})}return{...o?{ObjectExpression(e){l.includes(e.type)||(rB(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,rB(e.parent)?a:s)},ImportAttribute(e){let t=e.parent;y(e,c(t,p)?a:s)}},TSTypeLiteral:_,TSInterfaceBody:_,ClassBody:_}}});let sd=/^[)\]}>]$/u,sm=/^(?:[([{<~!]|\+\+?|--?)$/u,sh=/^[)\]}>*]$/u,sg=/^[{*]$/u,sy=/\$\{$/u,sx=/^\}/u,sT=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u;var sS=r$({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:rt.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&&sy.test(e.value)}function i(e){return"Template"===e.type&&sx.test(e.value)}function s(i,s){let a=t.getTokenBefore(i);a&&(sT.test(a.type)||s.test(a.value))&&!r(a)&&!n.has(a)&&(0,rR.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&&(sT.test(a.type)||s.test(a.value))&&!r(a)&&!n.has(a)&&(0,rR.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&&(sT.test(a.type)||s.test(a.value))&&!i(a)&&!n.has(a)&&(0,rR.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&&(sT.test(a.type)||s.test(a.value))&&!i(a)&&!n.has(a)&&(0,rR.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<rt.length;++e){let c=rt[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||sd)}function u(e,t){p[e.value].after(e,t||sm)}function f(e){c(e),u(e)}function d(e){let n=e&&t.getFirstToken(e);if(n){if(!rf(n)){if("VariableDeclaration"!==e.type)return;else if("using"!==e.kind&&"await using"!==e.kind||"Identifier"!==n.type)return}f(n)}}function m(e){let n=e&&t.getFirstToken(e);rf(n)&&c(n)}function h(e){if(e){let n=t.getTokenBefore(e,rf);n&&f(n)}}function g(e){let n=e&&t.getFirstToken(e);n&&(rf(n)&&"function"===n.value||"async"===n.value)&&c(n)}function y(e){d(e),h(e.superClass)}function x(e){let n=t.getFirstToken(e);if(c(n,sh),u(n,sg),"ExportDefaultDeclaration"===e.type&&f(t.getTokenAfter(n)),"ExportAllDeclaration"===e.type&&e.exported){let n=t.getTokenBefore(e.exported);c(n,sh),u(n,sg)}if("source"in e&&e.source){let n=t.getTokenBefore(e.source);if(c(n,sh),u(n,sg),e.attributes){let n=t.getTokenAfter(e.source);rf(n)&&f(n)}}"ExportDefaultDeclaration"!==e.type&&function(e){let n;switch(e.type){case tr.AST_NODE_TYPES.ImportDeclaration:n=e.importKind;break;case tr.AST_NODE_TYPES.ExportAllDeclaration:case tr.AST_NODE_TYPES.ExportNamedDeclaration:n=e.exportKind}if("type"!==n)return;let r=t.getFirstToken(e,{skip:1});(0,rR.isTypeKeyword)(r)&&(c(r,sh),u(r,sg))}(e)}function T(e){if("static"in e&&e.static&&d(e),"get"===e.kind||"set"===e.kind||("method"in e&&e.method||"MethodDefinition"===e.type)&&"async"in e.value&&e.value.async||e.type===tr.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");f(n)}}return{DebuggerStatement:d,WithStatement:d,BreakStatement:d,ContinueStatement:d,ReturnStatement:d,ThrowStatement:d,TryStatement(e){d(e),e.handler&&(e.handler.param?m(e.handler):d(e.handler)),h(e.finalizer)},IfStatement(e){d(e),h(e.alternate)},SwitchStatement:d,SwitchCase:d,DoWhileStatement(e){d(e),h(e.test)},ForInStatement(e){d(e);let n=t.getTokenBefore(e.right,rR.isNotOpeningParenToken);"PrivateIdentifier"!==t.getTokenBefore(n).type&&c(n),u(n)},ForOfStatement(e){e.await?(c(t.getFirstToken(e,0)),u(t.getFirstToken(e,1))):d(e);let n=t.getTokenBefore(e.right,rR.isNotOpeningParenToken);"PrivateIdentifier"!==t.getTokenBefore(n).type&&c(n),u(n)},ForStatement:d,WhileStatement:d,ClassDeclaration:y,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,FunctionDeclaration:g,ImportDeclaration:x,VariableDeclaration:d,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),sh)},ExportSpecifier(e){if(e.local.range[0]!==e.exported.range[0]){let n=t.getTokenBefore(e.exported);c(n,sh),u(n,sg)}},ImportNamespaceSpecifier(e){c(t.getFirstToken(e,1),sh)},MethodDefinition:T,PropertyDefinition:T,AccessorProperty:T,StaticBlock:d,Property:T,BinaryExpression(e){if(">"!==e.operator)return;let r=t.getTokenBefore(e.right,rR.isNotOpeningParenToken);n.add(r)},TSAsExpression(e){f(t.getTokenAfter(e.expression,e=>"as"===e.value))},TSSatisfiesExpression(e){f(t.getTokenAfter(e.expression,e=>"satisfies"===e.value))}}}}),sb=r$({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,n2(i,"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&&(n6.test(i.value)||a.test(i.value))||n&&r.test(i.value))return;let l=o.getTokenBefore(i,{includeComments:!0}),p=l&&(0,rR.isTokenOnSameLine)(l,i);t?p&&e.report({node:i,messageId:"above"}):p||e.report({node:i,messageId:"beside"})})}}}}),sE=r$({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=rn(),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)})}}}}}),sk=r$({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,r,i=RegExp(t.ignorePattern??"","u"),s=e.sourceCode,a=s.getAllComments(),o=s.lines,l=o.length+1,p=(n=[],a.forEach(e=>{let t=e.loc.start.line,r=e.loc.end.line;n.push(t,r)}),n),c=(r=[],o.forEach((e,t)=>{e.trim()||r.push(t+1)}),r),u=new Set(p.concat(c));function f(e){let t=s.getNodeByRangeIndex(e.range[0]);if(t&&"StaticBlock"===t.type){let n=s.getFirstToken(t,{skip:1});return n&&e.range[0]>=n.range[0]?t:null}return t}function d(e,t){let n=f(e);if(n&&n.type===t){let t=n;return"StaticBlock"===n.type?t=s.getFirstToken(n,{skip:1}):"SwitchStatement"===n.type&&(t=s.getTokenAfter(n.discriminant,{filter:rR.isOpeningBraceToken})),!!t&&e.loc.start.line-t.loc.start.line==1}return!1}function m(e,t){let n=f(e);return!!n&&n.type===t&&n.loc.end.line-e.loc.end.line==1}function h(e){return d(e,tr.AST_NODE_TYPES.ClassBody)}function g(e){return m(e,tr.AST_NODE_TYPES.ClassBody)}function y(n,{before:r,after:a}){if(!1!==t.applyDefaultIgnorePatterns&&n6.test(n.value)||t.ignorePattern&&i.test(n.value))return;let o=n.loc.start.line-1,p=n.loc.end.line+1;if(o<1&&(r=!1),p>=l&&(a=!1),function(e){let t=e;do t=s.getTokenBefore(t,{includeComments:!0});while(t&&(0,rR.isCommentToken)(t));if(t&&(0,rR.isTokenOnSameLine)(t,e))return!0;t=e;do t=s.getTokenAfter(t,{includeComments:!0});while(t&&(0,rR.isCommentToken)(t));return!!(t&&(0,rR.isTokenOnSameLine)(e,t))}(n))return;let c=!!t.allowBlockStart&&(d(n,tr.AST_NODE_TYPES.ClassBody)||d(n,tr.AST_NODE_TYPES.BlockStatement)||d(n,tr.AST_NODE_TYPES.StaticBlock)||d(n,tr.AST_NODE_TYPES.SwitchCase)||d(n,tr.AST_NODE_TYPES.SwitchStatement))&&!(!1===t.allowClassStart&&h(n)),f=!!t.allowBlockEnd&&(m(n,tr.AST_NODE_TYPES.ClassBody)||m(n,tr.AST_NODE_TYPES.BlockStatement)||m(n,tr.AST_NODE_TYPES.StaticBlock)||m(n,tr.AST_NODE_TYPES.SwitchCase)||m(n,tr.AST_NODE_TYPES.SwitchStatement))&&!(!1===t.allowClassEnd&&g(n)),y=!!t.allowClassStart&&h(n),x=!!t.allowClassEnd&&g(n),T=!!t.allowObjectStart&&(d(n,tr.AST_NODE_TYPES.ObjectExpression)||d(n,tr.AST_NODE_TYPES.ObjectPattern)),S=!!t.allowObjectEnd&&(m(n,tr.AST_NODE_TYPES.ObjectExpression)||m(n,tr.AST_NODE_TYPES.ObjectPattern)),b=!!t.allowArrayStart&&(d(n,tr.AST_NODE_TYPES.ArrayExpression)||d(n,tr.AST_NODE_TYPES.ArrayPattern)),E=!!t.allowArrayEnd&&(m(n,tr.AST_NODE_TYPES.ArrayExpression)||m(n,tr.AST_NODE_TYPES.ArrayPattern)),k=!!t.allowInterfaceStart&&d(n,tr.AST_NODE_TYPES.TSInterfaceBody),v=!!t.allowInterfaceEnd&&m(n,tr.AST_NODE_TYPES.TSInterfaceBody),w=!!t.allowTypeStart&&d(n,tr.AST_NODE_TYPES.TSTypeLiteral),A=!!t.allowTypeEnd&&m(n,tr.AST_NODE_TYPES.TSTypeLiteral),C=!!t.allowEnumStart&&(d(n,tr.AST_NODE_TYPES.TSEnumBody)||d(n,tr.AST_NODE_TYPES.TSEnumDeclaration)),_=!!t.allowEnumEnd&&(m(n,tr.AST_NODE_TYPES.TSEnumBody)||m(n,tr.AST_NODE_TYPES.TSEnumDeclaration)),O=!!t.allowModuleStart&&d(n,tr.AST_NODE_TYPES.TSModuleBlock),P=!!t.allowModuleEnd&&m(n,tr.AST_NODE_TYPES.TSModuleBlock),I=c||y||T||b||k||w||C||O,N=f||x||S||E||v||A||_||P,L=s.getTokenBefore(n,{includeComments:!0}),B=s.getTokenAfter(n,{includeComments:!0});if(!I&&r&&!u.has(o)&&!((0,rR.isCommentToken)(L)&&(0,rR.isTokenOnSameLine)(L,n))){let t=n.range[0]-n.loc.start.column,r=[t,t];e.report({node:n,messageId:"before",fix:e=>e.insertTextBeforeRange(r,"\n")})}N||!a||u.has(p)||(0,rR.isCommentToken)(B)&&(0,rR.isTokenOnSameLine)(n,B)||e.report({node:n,messageId:"after",fix:e=>e.insertTextAfter(n,"\n")})}return{Program(){a.forEach(e=>{e.type===tr.AST_TOKEN_TYPES.Line?(t.beforeLineComment||t.afterLineComment)&&y(e,{after:t.afterLineComment,before:t.beforeLineComment}):e.type===tr.AST_TOKEN_TYPES.Block?(t.beforeBlockComment||t.afterBlockComment)&&y(e,{after:t.afterBlockComment,before:t.beforeBlockComment}):rd(e)&&t.afterHashbangComment&&y(e,{after:t.afterHashbangComment,before:!1})})}}}});let sv={"*":{test:()=>!0},field:{test:e=>"PropertyDefinition"===e.type},method:{test:e=>"MethodDefinition"===e.type}};var sw=r$({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!==tr.AST_NODE_TYPES.TSAbstractMethodDefinition&&e.type!==tr.AST_NODE_TYPES.MethodDefinition||e.value.type!==tr.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,rR.isSemicolonToken)(n)&&!(0,rR.isTokenOnSameLine)(r,n)&&(0,rR.isTokenOnSameLine)(n,i)?{curLast:r,nextFirst:n}:{curLast:n,nextFirst:i}}(n[t],n[t+1]),c=!!(0,rR.isTokenOnSameLine)(o,l)&&r[1].exceptAfterSingleLine,u=a(l,p,1),f=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),d=f.loc.start.line-u.loc.end.line>1,m=0!==s.getTokensBetween(u,f,{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(sv[r.prev].test(e)&&sv[r.next].test(t))return r.blankLine}return null}(n[t],n[t+1]);"never"===g&&d?e.report({node:n[t+1],messageId:"never",fix:e=>m?null:e.replaceTextRange([u.range[1],f.range[0]],"\n")}):"always"!==g||c||d||e.report({node:n[t+1],messageId:"always",fix:e=>m?null:e.insertTextAfter(h,"\n")})}}}}}),sA=r$({name:"list-style",meta:{type:"layout",docs:{description:"Enforce consistent spacing and line break styles inside brackets.",experimental:!0},fixable:"whitespace",schema:[{$defs:{singleLineConfig:{type:"object",additionalProperties:!1,properties:{spacing:{type:"string",enum:["always","never"]},maxItems:{type:"integer",minimum:0}}},multiLineConfig:{type:"object",additionalProperties:!1,properties:{minItems:{type:"integer",minimum:0}}},baseConfig:{type:"object",additionalProperties:!1,properties:{singleLine:{$ref:"#/items/0/$defs/singleLineConfig"},multiline:{$ref:"#/items/0/$defs/multiLineConfig"}}}},type:"object",additionalProperties:!1,properties:{singleLine:{$ref:"#/items/0/$defs/singleLineConfig"},multiLine:{$ref:"#/items/0/$defs/multiLineConfig"},overrides:{type:"object",additionalProperties:!1,properties:{"[]":{$ref:"#/items/0/$defs/baseConfig"},"{}":{$ref:"#/items/0/$defs/baseConfig"},"<>":{$ref:"#/items/0/$defs/baseConfig"},"()":{$ref:"#/items/0/$defs/baseConfig"},ArrayExpression:{$ref:"#/items/0/$defs/baseConfig"},ArrayPattern:{$ref:"#/items/0/$defs/baseConfig"},ArrowFunctionExpression:{$ref:"#/items/0/$defs/baseConfig"},CallExpression:{$ref:"#/items/0/$defs/baseConfig"},ExportNamedDeclaration:{$ref:"#/items/0/$defs/baseConfig"},FunctionDeclaration:{$ref:"#/items/0/$defs/baseConfig"},FunctionExpression:{$ref:"#/items/0/$defs/baseConfig"},ImportDeclaration:{$ref:"#/items/0/$defs/baseConfig"},ImportAttributes:{$ref:"#/items/0/$defs/baseConfig"},NewExpression:{$ref:"#/items/0/$defs/baseConfig"},ObjectExpression:{$ref:"#/items/0/$defs/baseConfig"},ObjectPattern:{$ref:"#/items/0/$defs/baseConfig"},TSDeclareFunction:{$ref:"#/items/0/$defs/baseConfig"},TSFunctionType:{$ref:"#/items/0/$defs/baseConfig"},TSInterfaceBody:{$ref:"#/items/0/$defs/baseConfig"},TSEnumBody:{$ref:"#/items/0/$defs/baseConfig"},TSTupleType:{$ref:"#/items/0/$defs/baseConfig"},TSTypeLiteral:{$ref:"#/items/0/$defs/baseConfig"},TSTypeParameterDeclaration:{$ref:"#/items/0/$defs/baseConfig"},TSTypeParameterInstantiation:{$ref:"#/items/0/$defs/baseConfig"},JSONArrayExpression:{$ref:"#/items/0/$defs/baseConfig"},JSONObjectExpression:{$ref:"#/items/0/$defs/baseConfig"}}}}}],messages:{shouldSpacing:"Should have space between '{{prev}}' and '{{next}}'",shouldNotSpacing:"Should not have space(s) between '{{prev}}' and '{{next}}'",shouldWrap:"Should have line break between '{{prev}}' and '{{next}}'",shouldNotWrap:"Should not have line break(s) between '{{prev}}' and '{{next}}'"}},defaultOptions:[{singleLine:{spacing:"never",maxItems:1/0},multiLine:{minItems:0},overrides:{"{}":{singleLine:{spacing:"always"}}}}],create:(e,[t]=[{}])=>{let{sourceCode:n}=e,{singleLine:r,multiLine:i,overrides:s}=t,a={},o={"[]":{left:rR.isOpeningBracketToken,right:rR.isClosingBracketToken},"{}":{left:rR.isOpeningBraceToken,right:rR.isClosingBraceToken},"()":{left:rR.isOpeningParenToken,right:rR.isClosingParenToken},"<>":{left:e=>"<"===e.value,right:e=>">"===e.value}};function l(t,l,p){if(0===p.length)return;let c=function(e,t,r){switch(e.type){case tr.AST_NODE_TYPES.CallExpression:case tr.AST_NODE_TYPES.NewExpression:return n.getTokenAfter(e.typeArguments??e.callee);case tr.AST_NODE_TYPES.ArrayExpression:case tr.AST_NODE_TYPES.ArrayPattern:return n.getFirstToken(e);default:{let e=n.getTokenBefore(t[0]),{left:i}=o[r];return e&&i(e)?e:null}}}(l,p,t),u=function(e,t,r){switch(e.type){case tr.AST_NODE_TYPES.ArrayExpression:case tr.AST_NODE_TYPES.ArrayPattern:return n.getLastToken(e);default:{let e=n.getTokenAfter(t.at(-1),rR.isNotCommaToken),{right:i}=o[r];return e&&i(e)?e:null}}}(l,p,t);if(!c||!u)return;let f=function(e,t){if(!a[t]){let n=s[e]??{},o=s[t]??{};a[t]={singleLine:{...r,...n.singleLine,...o.singleLine},multiline:{...i,...n.multiline,...o.multiline}}}return a[t]}(t,p[0]?.type==="ImportAttribute"?"ImportAttributes":l.type);if((0,rR.isTokenOnSameLine)(c,u)&&p.length<=f.singleLine.maxItems){let t="always"===f.singleLine.spacing,r=n.getTokenAfter(c,{includeComments:!0}),i=n.getTokenBefore(u,{includeComments:!0});function d(r,i){let s=n.isSpaceBetween(r,i);!s&&t?e.report({node:l,messageId:"shouldSpacing",loc:{start:r.loc.end,end:i.loc.start},data:{prev:r.value,next:i.value},fix:e=>e.insertTextAfter(r," ")}):s&&!t&&e.report({node:l,messageId:"shouldNotSpacing",loc:{start:r.loc.end,end:i.loc.start},data:{prev:r.value,next:i.value},fix:e=>e.removeRange([r.range[1],i.range[0]])})}d(c,r),d(i,u)}else!function(t,r,i,s,a){let o=r.length,l=rB(t)?o>a.singleLine.maxItems:o>=a.multiline.minItems&&!(0,rR.isTokenOnSameLine)(i,r[0]??n.getTokenAfter(i));function p(i,s){if((0,rR.isTokenOnSameLine)(i,s))l&&e.report({node:t,messageId:"shouldWrap",loc:{start:i.loc.end,end:s.loc.start},data:{prev:i.value,next:s.value},fix:e=>rD(n,i,s)?null:e.insertTextBefore(s,"\n")});else{if(l)return;e.report({node:t,messageId:"shouldNotWrap",loc:{start:i.loc.end,end:s.loc.start},data:{prev:i.value,next:s.value},fix(e){if(rD(n,i,s))return null;let a=[i.range[1],s.range[0]],o=n.text.slice(...a),l=1===r.length?"":function(e,t){if("TSInterfaceBody"===e.type||"TSTypeLiteral"===e.type)return t.value.match(/(?:,|;)$/)?void 0:","}(t,i);return e.replaceTextRange(a,o.replaceAll(RegExp(rR.LINEBREAK_MATCHER,"g"),l??""))}})}}let c=n.getTokenAfter(i,{includeComments:!1});p(i,c);for(let e=0;e<o;e++){let t=r[e];if(!t)continue;let s=n.getFirstToken(t);(0!==e||c!==s)&&p(n.getTokenBefore(t,{filter:e=>(0,rR.isNotOpeningParenToken)(e)||e===i,includeComments:!1}),s)}p(n.getTokenBefore(s,{includeComments:!1}),s)}(l,p,c,u,f)}return{ArrayExpression(e){l("[]",e,e.elements)},ArrayPattern(e){l("[]",e,e.elements)},ObjectExpression(e){l("{}",e,e.properties)},ObjectPattern(e){l("{}",e,e.properties)},FunctionDeclaration(e){l("()",e,e.params)},FunctionExpression(e){l("()",e,e.params)},ArrowFunctionExpression(e){l("()",e,e.params)},CallExpression(e){l("()",e,e.arguments)},NewExpression(e){l("()",e,e.arguments)},ImportDeclaration(e){l("{}",e,e.specifiers.filter(e=>"ImportSpecifier"===e.type)),e.attributes&&l("{}",e,e.attributes)},ExportNamedDeclaration(e){l("{}",e,e.specifiers),e.attributes&&l("{}",e,e.attributes)},ExportAllDeclaration(e){e.attributes&&l("{}",e,e.attributes)},TSTupleType(e){l("[]",e,e.elementTypes)},TSTypeLiteral(e){l("{}",e,e.members)},TSInterfaceBody(e){l("{}",e,e.body)},TSEnumBody(e){l("{}",e,e.members)},TSDeclareFunction(e){l("()",e,e.params)},TSFunctionType(e){l("()",e,e.params)},TSTypeParameterDeclaration(e){l("<>",e,e.params)},TSTypeParameterInstantiation(e){l("<>",e,e.params)},JSONArrayExpression(e){l("[]",e,e.elements)},JSONObjectExpression(e){l("{}",e,e.properties)}}}});let sC={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},s_={anyOf:[sC,{type:"integer",minimum:0}]};var sO=r$({name:"max-len",meta:{type:"layout",docs:{description:"Enforce a maximum line length"},schema:[s_,s_,sC],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,f=r.comments,d=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&&(d=RegExp(r.ignorePattern,"u")),{Program:function(r){let y,x=n.lines,T=a||f||c?(y=[],n.getAllComments().forEach(e=>{let t=n.getNodeByRangeIndex(e.range[0]);t&&t.parent&&"JSXEmptyExpression"===t.type&&"JSXExpressionContainer"===t.parent.type&&rB(t.parent)?y[y.length-1]!==t.parent&&y.push(t.parent):y.push(e)}),y):[],S=0,b=g(n.ast.tokens.filter(e=>"String"===e.type||"JSXText"===e.type&&"JSXAttribute"===n.getNodeByRangeIndex(e.range[0]-1).type)),E=g(n.ast.tokens.filter(e=>"Template"===e.type)),k=g(n.ast.tokens.filter(e=>"RegularExpression"===e.type));x.forEach((n,g)=>{var y,x;let v,w,A=g+1,C=!1;if(S<T.length){let e,t,r,i=null;do i=T[++S];while(i&&i.loc.start.line<=A);if(e=(y=i=T[--S]).loc.start,t=y.loc.end,r=!n.slice(0,y.loc.start.column).trim(),y&&(e.line<A||e.line===A&&r)&&(t.line>A||t.line===A&&t.column===n.length))C=!0,v=n;else if(c&&m(n,A,i)){v=h(n,i);let e=S;for(;m(v,A,T[--e]);)v=h(v,T[e])}else v=n}else v=n;if(d&&d.test(v)||u&&t.test(v)||o&&b[A]||l&&E[A]||p&&k[A])return;let _=(w=0,(x=v).replace(/\t/gu,(e,t)=>{let n=t+w;return w+=s-(s?n%s:0)-1,""}),Array.from(x).length+w),O=C&&f;if(C&&a)return;let P={start:{line:A,column:0},end:{line:A,column:v.length}};O?_>f&&e.report({node:r,loc:P,messageId:"maxComment",data:{lineLength:_,maxCommentLength:f}}):_>i&&e.report({node:r,loc:P,messageId:"max",data:{lineLength:_,maxLength:i}})})}}}});let sP=["BreakStatement","ClassDeclaration","ContinueStatement","DebuggerStatement","DoWhileStatement","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","LabeledStatement","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","VariableDeclaration","WhileStatement","WithStatement","ExportNamedDeclaration","ExportDefaultDeclaration","ExportAllDeclaration"];var sI=r$({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:sP}}},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,rR.isNotSemicolonToken).loc.end.line;n!==s&&(p(),a=1,s=n)}let f={"Program:exit":p};for(let e of sP)i.includes(e)||(f[e]=c,f[`${e}:exit`]=u);return f}});let sN={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 sL=r$({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:sN},type:"object",properties:{...sN.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=rM(t,r.interface),s=rM(t,r.typeLiteral);function a(r){let a=r.type===tr.AST_NODE_TYPES.TSInterfaceBody?r.body:r.members,o=rB(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===tr.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"),f=s("comma"),d=s("none");";"===l.value?f?a="expectedComma":d&&(o=!0,a="unexpectedSemi"):","===l.value?u?a="expectedSemi":d&&(o=!0,a="unexpectedComma"):u?(o=!0,a="expectedSemi"):f&&(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:d,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}}}),sB=r$({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(rR.LINEBREAK_MATCHER);return t.length>0&&t.every((e,n)=>0===n||n===t.length-1?rP(e):a(e))}function l([e]){if("Block"!==e.type)return!1;let t=e.value.split(rR.LINEBREAK_MATCHER);return/^\*\s*$/u.test(t[0])&&t.slice(1,-1).every(e=>/^\s* /u.test(e))&&rP(t.at(-1))}function p([e]){if("Block"!==e.type)return!1;let t=e.value.split(rR.LINEBREAK_MATCHER);return/^!\s*$/u.test(t[0])&&t.slice(1,-1).every(e=>/^\s* /u.test(e))&&rP(t.at(-1))}function c(e){let[n]=e;if("Line"===n.type){let t;return t=e.every(({value:e})=>0===e.trim().length||e.startsWith(" ")),e.map(({value:e})=>t?e.replace(/^ /u,""):e)}if(o(e)){let e,t;return t=(e=n.value.split(rR.LINEBREAK_MATCHER).slice(1,-1).map(e=>e.replace(rO,""))).every(e=>{let t=e.replace(/\s*\*/u,"");return 0===t.trim().length||t.startsWith(" ")}),e.map(e=>e.replace(t?/\s*\* ?/u:/\s*\*/u,""))}return function(e){let n=e.value.split(rR.LINEBREAK_MATCHER).map(e=>e.replace(rO,"")),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 f(e,t){return`/* ${t.join(`
17
18
  ${u(e)} `)} */`}let d={"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,s=[r.range[0],n.at(-1).range[1]];return i.some(e=>e.startsWith("/"))?null:e.replaceTextRange(s,(t=u(r),`/*
18
19
  ${i.map(e=>`${t} * ${e}`).join("\n")}
19
- ${t} */`))}});else{let n=r.value.split(rj.LINEBREAK_MATCHER),i=`${u(r)} *`;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
- ${i}`)})}rO(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
- ${i}/`)});for(let s=r.loc.start.line+1;s<=r.loc.end.line;s++){let o=t.lines[s-1],l=a(o)?"alignment":"missingStar";o.startsWith(i)||e.report({loc:{start:{line:s,column:0},end:{line:s,column:o.length}},messageId:l,fix(e){let a,p=t.getIndexFromLoc({line:s,column:0});if("alignment"===l){let[,t=""]=o.match(/^(\s*\*)/u)||[],n=p+t.length;return e.replaceTextRange([p,n],i)}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],`${i}${a}`)}})}}},"separate-lines":function(n){let[r]=n,a=l(n),o=p(n);if("Block"!==r.type||!i&&a||!s&&o)return;let f=c(n);(a||o)&&(f=f.slice(1,f.length-1));let d=t.getTokenAfter(r,{includeComments:!0});d&&(0,rj.isTokenOnSameLine)(r,d)||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,f.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]],f(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,f(n,r))})}};return{Program:()=>t.getAllComments().filter(e=>{if(rf(e)||n3.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&&rL(e[0])||(0,d[n])(e)})}}}),sD=rM({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,rj.isNotClosingParenToken),o=t.getTokenAfter(s.consequent,rj.isNotClosingParenToken),l=t.getFirstToken(s),p=t.getTokenBefore(a),c=t.getTokenAfter(a),u=t.getTokenBefore(o),f=t.getTokenAfter(o),d=(0,rj.isTokenOnSameLine)(p,c),m=(0,rj.isTokenOnSameLine)(u,f),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&&rL(s))return;d&&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 d||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,rj.isTokenOnSameLine)(p,a),r=(0,rj.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,rj.isTokenOnSameLine)(u,o),r=(0,rj.isTokenOnSameLine)(o,f);return n||t.push(e.removeRange([u.range[1],o.range[0]])),r||t.push(e.removeRange([o.range[1],f.range[0]])),t}})}}}}),sB=rM({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,rj.isClosingParenToken)(i),a=n.getTokenBefore(i),o=s&&(0,rj.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,")")]})}}}}),sj=rM({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=ro(r.callee);if("MemberExpression"!==i.type)return;let s=ro(i.object),a=1;for(;s&&"callee"in s&&s.callee;){a+=1;let e=ro(s.callee);if(!("object"in e))break;s=ro(e.object)}if(a>t&&(0,rj.isTokenOnSameLine)(i.object,i.property)){var o;let t,r,s,a=n.getTokenAfter(i.object,rj.isNotClosingParenToken);e.report({node:i.property,loc:{start:a.loc.start,end:i.loc.end},messageId:"expected",data:{callee:(t=(o=i).computed?o.optional?"?.[":"[":o.optional?"?.":".",r=n.getText(i.property).split(rj.LINEBREAK_MATCHER),s=i.computed&&1===r.length?"]":"",t+r[0]+s)},fix:e=>e.insertTextBefore(a,"\n")})}}}}}),sR=rM({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&&rl(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})}}}});let sF=(0,rj.isNodeOfTypes)([tn.AST_NODE_TYPES.TSAsExpression,tn.AST_NODE_TYPES.TSNonNullExpression,tn.AST_NODE_TYPES.TSSatisfiesExpression,tn.AST_NODE_TYPES.TSTypeAssertion]);var sM=rM({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,f=a&&n?.enforceForArrowConditionals===!1,d=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&&n&&new Set(Object.entries(n.allowNodesInSpreadElement||{}).filter(([e,t])=>t).map(([e])=>e));n1(n,["enforceForArrowConditionals","enforceForNewInMemberExpressions","allowNodesInSpreadElement"],"ignoredNodes","no-extra-parens");let T=rb({type:"AssignmentExpression"}),S=rb({type:"UpdateExpression"});function b(e){let t=ro(e);if("CallExpression"!==t.type)return!1;let n=ro(t.callee);return"MemberExpression"===n.type&&"FunctionExpression"===n.object.type&&["call","apply"].includes(ra(n))}function E(e){if("JSXElement"===e.type||"JSXFragment"===e.type)switch(u){case"all":return!1;case"multi-line":return rL(e);case"single-line":return!rL(e)}return!("SequenceExpression"===e.type&&d||b(e)&&h)&&(a||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type)}function k(e){return(0,rj.isParenthesized)(1,e,i)}function v(e){return(0,rj.isParenthesized)(2,e,i)}function w(e){return E(e)&&k(e)}function A(e){return E(e)&&v(e)}function C(e,t){return!!(E(e)&&k(e)&&(rb(e)>=t||v(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,rj.isOpeningParenToken)(n)&&(0,rj.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,rj.isTokenOnSameLine)(e,t)?w(t):A(t)}function D(e){let t=ro(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(!v(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;if(t>0&&RegExp(g,"u").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||v(t)||!ry(t.parent)?e=>{let r,s,o,l,p,c,u,f=i.text.slice(n.range[1],a.range[0]);return e.replaceTextRange([n.range[0],a.range[1]],((r=i.getTokenBefore(t),s=i.getTokenBefore(r,{includeComments:!0}),o=i.getTokenAfter(r,{includeComments:!0}),s&&s.range[1]===r.range[0]&&r.range[1]===o.range[0]&&!rA(s,o))?" ":"")+f+((p=(l=i.getTokensAfter(t,{count:2}))[0],c=l[1],u=i.getLastToken(t),p&&c&&!i.isSpaceBetween(p,c)&&!rA(u,c))?" ":""))}:null})}r?r.reports.push({node:t,finishReport:o}):o()}function R(e){"argument"in e&&e.argument&&C(e.argument,rb(e))&&j(e.argument)}function F(e){let t=sF(e.left),n=sF(e.right);if(t&&n)return;let r=e=>{let t=rb(e),n=rb(e.left),r=rb(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&&w(e.left)&&(!(["AwaitExpression","UnaryExpression"].includes(e.left.type)&&i)&&!rh(e.left,e)&&!("ReturnStatement"===e.parent.type&&e.parent.loc.start.line!==e.left.loc.start.line&&!k(e))&&(n>t||n===t&&!i)||v(e.left))&&j(e.left),!a&&w(e.right)&&(!rh(e.right,e)&&(r>t||r===t&&i)||v(e.right))&&j(e.right)};return r(t?{...e,left:{...e.left,type:tn.AST_NODE_TYPES.SequenceExpression}}:n?{...e,right:{...e.right,type:tn.AST_NODE_TYPES.SequenceExpression}}:e)}function M(e){let t=e=>{let t=e.callee;C(t,rb(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(sF(e.callee)?{...e,callee:{...e.callee,type:tn.AST_NODE_TYPES.SequenceExpression}}:e)}function $(e){e.superClass&&(rb(e.superClass)>S?w(e.superClass):A(e.superClass))&&j(e.superClass)}function V(e){let t=k(e)?i.getTokenBefore(e):i.getFirstToken(e),n=i.getTokenAfter(t,rj.isNotOpeningParenToken),r=n?i.getTokenAfter(n):null,a=n?i.getTokenAfter(n,rj.isNotClosingParenToken):null;(0,rj.isOpeningParenToken)(t)&&((0,rj.isOpeningBraceToken)(n)||ru(n)&&("function"===n.value||"class"===n.value||"let"===n.value&&a&&((0,rj.isOpeningBracketToken)(a)||"Identifier"===a.type))||n&&"Identifier"===n.type&&"async"===n.value&&ru(r)&&"function"===r.value)&&s.add(n),("ExportDefaultDeclaration"===e.parent.type?C(e,T):w(e))&&j(e)}function q(e){return sF(e.argument)?R({...e,argument:{...e.argument,type:tn.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,rj.isNodeOfTypes)([tn.AST_NODE_TYPES.TSUnionType,tn.AST_NODE_TYPES.TSIntersectionType])(t)?v(t):C(t,rb(e)))&&j(t)})}let J={ArrayExpression(e){e.elements.map(e=>sF(e)?{...e,type:tn.AST_NODE_TYPES.FunctionExpression}:e).forEach(e=>{e&&C(e,T)&&j(e)})},ArrayPattern(e){e.elements.forEach(e=>{e&&B(e)&&w(e)&&j(e)})},ArrowFunctionExpression(e){if(sF(e.body)||N(e)||"ConditionalExpression"===e.body.type&&f||"BlockStatement"===e.body.type)return;let t=i.getFirstToken(e.body,rj.isNotOpeningParenToken);(0,rj.isOpeningParenToken)(i.getTokenBefore(t))&&(0,rj.isOpeningBraceToken)(t)&&s.add(t),C(e.body,T)&&j(e.body)},AssignmentExpression(e){B(e.left)&&w(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)||v(e.left))&&j(e.left),!N(e)&&C(e.right,rb(e))&&j(e.right)},AssignmentPattern(e){let{left:t,right:n}=e;B(t)&&w(t)&&j(t),n&&C(n,T)&&j(n)},AwaitExpression:e=>sF(e.argument)?R({...e,argument:{...e.argument,type:tn.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===tn.AST_NODE_TYPES.TSAsExpression?$({...e,superClass:{...e.superClass,type:tn.AST_NODE_TYPES.SequenceExpression}}):$(e),ClassExpression:e=>e.superClass?.type===tn.AST_NODE_TYPES.TSAsExpression?$({...e,superClass:{...e.superClass,type:tn.AST_NODE_TYPES.SequenceExpression}}):$(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,rb({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(sF(e.test)?{...e,test:{...e.test,type:tn.AST_NODE_TYPES.SequenceExpression}}:sF(e.consequent)?{...e,consequent:{...e.consequent,type:tn.AST_NODE_TYPES.SequenceExpression}}:sF(e.alternate)?{...e,alternate:{...e.alternate,type:tn.AST_NODE_TYPES.SequenceExpression}}:e)},DoWhileStatement(e){w(e.test)&&!_(e)&&j(e.test)},ExportDefaultDeclaration(e){V(e.declaration)},ExpressionStatement(e){V(e.expression)},ForInStatement(e){if(!sF(e.right)){if("VariableDeclaration"!==e.left.type){let t=i.getFirstToken(e.left,rj.isNotOpeningParenToken);"let"===t.value&&(0,rj.isOpeningBracketToken)(i.getTokenAfter(t,rj.isNotClosingParenToken))&&s.add(t)}w(e.left)&&j(e.left),w(e.right)&&j(e.right)}},ForOfStatement(e){if("VariableDeclaration"!==e.left.type){let t=i.getFirstToken(e.left,rj.isNotOpeningParenToken);"let"===t.value&&s.add(t)}w(e.left)&&j(e.left),!sF(e.right)&&C(e.right,T)&&j(e.right)},ForStatement(e){if(e.test&&w(e.test)&&!_(e)&&!sF(e.test)&&j(e.test),e.update&&w(e.update)&&!sF(e.update)&&j(e.update),e.init&&!sF(e.init)){if("VariableDeclaration"!==e.init.type){let t=i.getFirstToken(e.init,rj.isNotOpeningParenToken);"let"===t.value&&(0,rj.isOpeningBracketToken)(i.getTokenAfter(t,rj.isNotClosingParenToken))&&s.add(t)}r={upper:r,inExpressionNodes:[],reports:[]},w(e.init)&&j(e.init)}},"ForStatement > *.init:exit":function(e){sF(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(v(t))return;s||(s=t)}}s&&(n=s,r&&(r.reports=r.reports.filter(e=>e.node!==n)))}),function(){let{upper:e,inExpressionNodes:t,reports:n}=r??{};e?(e.inExpressionNodes.push(...t??[]),e.reports.push(...n??[])):n?.forEach(({finishReport:e})=>e()),r=e}())},IfStatement(e){w(e.test)&&!_(e)&&j(e.test)},ImportExpression(e){let{source:t}=e;"SequenceExpression"===t.type?A(t)&&j(t):w(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):w(e.object)&&!(b(e.parent)&&"callee"in e.parent&&e.parent.callee===e&&h);t&&rb(e.object)>=rb(e)&&(e.computed||!(rE(e.object)||rT(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&&w(e.property)&&j(e.property)};return t(sF(e.object)?{...e,object:{...e.object,type:tn.AST_NODE_TYPES.SequenceExpression}}:sF(e.property)?{...e,property:{...e.property,type:tn.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)&&w(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)&&w(t)&&j(t)},ReturnStatement(e){let t=i.getFirstToken(e);!N(e)&&e.argument&&t&&L(t,e.argument)&&!rT(e.argument)&&j(e.argument)},SequenceExpression(e){let t=rb(e);e.expressions.forEach(e=>{C(e,t)&&j(e)})},SpreadElement(e){sF(e.argument)||x&&x.has(e.argument.type)||C(e.argument,T)&&j(e.argument)},SwitchCase(e){e.test&&!sF(e.test)&&w(e.test)&&j(e.test)},SwitchStatement(e){w(e.discriminant)&&j(e.discriminant)},TemplateLiteral(e){e.expressions.forEach(e=>{w(e)&&j(e)})},ThrowStatement(e){if(!e.argument||sF(e.argument))return;let t=i.getFirstToken(e);t&&L(t,e.argument)&&j(e.argument)},UnaryExpression:q,UpdateExpression(e){if(sF(e.argument))return q(e);if(e.prefix)R(e);else{let{argument:t}=e;(0,rj.isTokenOnSameLine)(t,i.getLastToken(e))?R(e):A(t)&&j(t)}},VariableDeclarator(e){let t=e=>{e.init&&C(e.init,T)&&!rT(e.init)&&j(e.init)};return t(sF(e.init)?{...e,type:tn.AST_NODE_TYPES.VariableDeclarator,init:{...e.init,type:tn.AST_NODE_TYPES.FunctionExpression}}:e)},WhileStatement(e){w(e.test)&&!_(e)&&j(e.test)},WithStatement(e){w(e.object)&&j(e.object)},YieldExpression(e){if(!e.argument||sF(e.argument))return;let t=i.getFirstToken(e);(rb(e.argument)>=rb(e)&&t&&L(t,e.argument)||A(e.argument))&&j(e.argument)},TSArrayType(e){C(e.elementType,rb(e))&&j(e.elementType)},TSIntersectionType:X,TSUnionType:X,TSTypeAnnotation(e){w(e.typeAnnotation)&&j(e.typeAnnotation)},TSTypeAliasDeclaration(e){w(e.typeAnnotation)&&j(e.typeAnnotation)},TSEnumMember(e){e.initializer&&w(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)}}}}}),s$=rM({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){let r;e.report({node:n,messageId:"unexpected",fix:(r=t.getTokenAfter(n))&&"String"===r.type&&ry(t.getNodeByRangeIndex(r.range[0]).parent)?null:t=>new rU(t,e.sourceCode).retainSurroundingTokens(n).remove(n)})}function r(e){for(let r=e;"Punctuator"===r.type&&!(0,rj.isClosingBraceToken)(r);r=t.getTokenAfter(r))(0,rj.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))}}}}),sV=rM({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]&&!rA(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")}))}}}});let sq=["+","-","*","/","%","**"],sY=["&","|","^","~","<<",">>",">>>"],sX=["==","!=","===","!==",">",">=","<","<="],sJ=["&&","||"],sU=["in","instanceof"],sW=[].concat(sq,sY,sX,sJ,sU,["?:"],["??"]),sK=[sq,sY,sX,sJ,sU],sH=/^(?:Binary|Logical|Conditional)Expression$/u;function sz(e){return"ConditionalExpression"===e.type?e.test:e.left}var sG=rM({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:sW},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:sK,allowSamePrecedence:!1!==e.allowSamePrecedence}}(e.options[0]);function r(e){return t.getTokenAfter(sz(e),rj.isNotClosingParenToken)}function i(i){var s,a,o,l;let p,c,u,f,d;sH.test(i.parent.type)&&(s=i).operator!==s.parent.operator&&!rl(t,s)&&(p=i.parent,a=n.groups??[],o=i.operator,l="ConditionalExpression"===p.type?"?:":p.operator,a.some(e=>e.includes(o)&&e.includes(l))&&(!n.allowSamePrecedence||rb(i)!==rb(p)))&&(u=sz(c=i.parent)===i?i:c,f=sz(c)!==i?i:c,d={leftOperator:u.operator||"?:",rightOperator:f.operator||"?:"},e.report({node:u,loc:r(u).loc,messageId:"unexpectedMixedOperator",data:d}),e.report({node:f,loc:r(f).loc,messageId:"unexpectedMixedOperator",data:d}))}return{BinaryExpression:i,LogicalExpression:i}}}),sQ=rM({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"})}}})}}}}),sZ=rM({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,rj.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]]," ")})}})}}}}),s0=rM({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)}}}});let s1=/\t+/gu,s2=/\S/u;var s3=rM({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=s1.exec(t));)(!n||s2.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"})})}}}}),s6=rM({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){var s;let l,p=RegExp(i,"u"),c=RegExp(r,"u"),u=t.lines,f=t.getText().match(rt()),d=(s=t.getAllComments(),l=new Set,s.forEach(e=>{let t="Block"===e.type?e.loc.end.line-1:e.loc.end.line;for(let n=e.loc.start.line;n<=t;n++)l.add(n)}),l),m=0;for(let r=0,i=u.length;r<i;r++){let i=r+1,s=f&&f[r]?f[r].length:1,l=u[r].length+s,h=p.exec(u[r]);if(h){let p={start:{line:i,column:h.index},end:{line:i,column:l-s}},f=m+p.start.column,g=m+p.end.column,y=t.getNodeByRangeIndex(f);if(y&&"TemplateElement"===y.type&&f>y.parent.range[0]&&g<y.parent.range[1]||a&&c.test(u[r])){m+=l;continue}let x=[f,g];o&&d.has(i)||function(t,n,r){e.report({node:t,loc:n,messageId:"trailingSpace",fix:e=>e.removeRange(r)})}(n,p,x)}m+=l}}}}}),s4=rM({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,rj.isTokenOnSameLine)(n.object,n.property)){var s,a;n.computed?(r=t.getTokenBefore(n.property,rj.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&&rE(n.object)||t.commentsExistBetween(s,a)?null:(n.optional?r="?.":n.computed||(r="."),e.replaceTextRange([s.range[1],a.range[0]],r))}}))}}}}});let s5={type:"string",enum:["beside","below","any"]};var s9=rM({name:"nonblock-statement-body-position",meta:{type:"layout",docs:{description:"Enforce the location of single-line statements"},fixable:"whitespace",schema:[s5,{type:"object",properties:{overrides:{type:"object",properties:{if:s5,else:s5,while:s5,do:s5,for:s5},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,rj.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")}}});let s8={oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]},s7={multiline:!1,minProperties:1/0,consistent:!0};var ae=rM({name:"object-curly-newline",meta:{type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces"},fixable:"whitespace",schema:[{oneOf:[s8,{type:"object",properties:{ObjectExpression:s8,ObjectPattern:s8,ImportDeclaration:s8,ExportDeclaration:s8,TSTypeLiteral:s8,TSInterfaceBody:s8,TSEnumBody:s8},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:s7,ObjectPattern:s7,ImportDeclaration:s7,ExportDeclaration:s7,TSTypeLiteral:s7,TSInterfaceBody:s7}],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}),f=(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,rj.isTokenOnSameLine)(i,r)),d=(0,rj.isCommentToken)(c),m=(0,rj.isCommentToken)(u);if(c=t.getTokenAfter(p),u=t.getTokenBefore(a),f)(0,rj.isTokenOnSameLine)(p,c)&&e.report({messageId:"expectedLinebreakAfterOpeningBrace",node:n,loc:p.loc,fix:e=>d?null:e.insertTextAfter(p,"\n")}),(0,rj.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,rj.isTokenOnSameLine)(p,c),i=!(0,rj.isTokenOnSameLine)(u,a);(!t&&r||t&&r&&!i)&&e.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:n,loc:p.loc,fix:e=>d?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}}}),at=rM({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"},overrides:{type:"object",properties:Object.fromEntries(["ObjectPattern","ObjectExpression","ImportDeclaration","ImportAttributes","ExportNamedDeclaration","ExportAllDeclaration","TSMappedType","TSTypeLiteral","TSInterfaceBody","TSEnumBody"].map(e=>[e,{type:"string",enum:["always","never"]}])),additionalProperties:!1},emptyObjects:{type:"string",enum:["ignore","always","never"]}},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}}'.",requiredSpaceInEmptyObject:"A space is required in empty '{{node}}'.",unexpectedSpaceInEmptyObject:"There should be no space in empty '{{node}}'."}},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"),overrides:n?.overrides??{},emptyObjects:n?.emptyObjects??"ignore"};function o(t,n,r,s=t.type){let l=i.getTokenAfter(n,{includeComments:!0}),p=a.overrides[s]?"always"===a.overrides[s]:a.spaced;if((0,rj.isTokenOnSameLine)(n,l)){let r,s=i.isSpaceBetween(n,l),o=i.getNodeByRangeIndex(l.range[0]).type,c=a.arraysInObjectsException&&[tn.AST_NODE_TYPES.TSMappedType,tn.AST_NODE_TYPES.TSIndexSignature].includes(o)?!p:p;c&&!s&&e.report({node:t,loc:n.loc,messageId:"requireSpaceAfter",data:{token:n.value},fix:e=>e.insertTextAfter(n," ")}),!c&&s&&l.type!==tn.AST_TOKEN_TYPES.Line&&(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]])}))}let c=i.getTokenBefore(r,{includeComments:!0});if((0,rj.isTokenOnSameLine)(c,r)){let n,s=a.arraysInObjectsException&&(0,rj.isClosingBracketToken)(c)||a.objectsInObjectsException&&(0,rj.isClosingBraceToken)(c)?i.getNodeByRangeIndex(c.range[0]).type:void 0,o=a.arraysInObjectsException&&[tn.AST_NODE_TYPES.ArrayExpression,tn.AST_NODE_TYPES.TSTupleType].includes(s)||a.objectsInObjectsException&&void 0!==s&&[tn.AST_NODE_TYPES.ObjectExpression,tn.AST_NODE_TYPES.ObjectPattern,tn.AST_NODE_TYPES.TSMappedType,tn.AST_NODE_TYPES.TSTypeLiteral].includes(s)?!p:p,l=i.isSpaceBetween(c,r);o&&!l&&e.report({node:t,loc:r.loc,messageId:"requireSpaceBefore",data:{token:r.value},fix:e=>e.insertTextBefore(r," ")}),!o&&l&&(n=i.getTokenBefore(r,{includeComments:!0}),e.report({node:t,loc:{start:n.loc.end,end:r.loc.start},messageId:"unexpectedSpaceBefore",data:{token:r.value},fix:e=>e.removeRange([n.range[1],r.range[0]])}))}}function l(t,n,r=t.type){let[s,p]=function(e,t=e.type){switch(t){case"ImportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":{let t=i.getTokens(e);return[t.find(e=>(0,rj.isOpeningBraceToken)(e)),t.find(e=>(0,rj.isClosingBraceToken)(e))]}case"ImportAttributes":{let t=i.getTokens(e),n=t.findLast(e=>(0,rj.isOpeningBraceToken)(e)),r=t.findLast(e=>(0,rj.isClosingBraceToken)(e));if(!n||!r||!e.source||n.range[0]<e.source.range[0])return[null,null];return[n,r]}case"ObjectPattern":case"ObjectExpression":case"TSMappedType":case"TSTypeLiteral":case"TSInterfaceBody":case"TSEnumBody":{let t=i.getTokens(e);return[t.find(e=>(0,rj.isOpeningBraceToken)(e)),t.findLast(e=>(0,rj.isClosingBraceToken)(e))]}default:throw Error(`Unsupported node type: ${t}`)}}(t,r);if(s&&p){if(0===n.length)return void function(t,n,r,s=t.type){if("ignore"===a.emptyObjects||!(0,rj.isTokenOnSameLine)(n,r)||i.commentsExistBetween(n,r))return;let o=i.getText().slice(n.range[0]+1,r.range[1]-1);if(""===o.trim()){if("always"===a.emptyObjects){if(" "===o)return;e.report({node:t,loc:{start:n.loc.end,end:r.loc.start},messageId:"requiredSpaceInEmptyObject",data:{node:s},fix:e=>e.replaceTextRange([n.range[1],r.range[0]]," ")})}else if("never"===a.emptyObjects){if(""===o)return;e.report({node:t,loc:{start:n.loc.end,end:r.loc.start},messageId:"unexpectedSpaceInEmptyObject",data:{node:s},fix:e=>e.removeRange([n.range[1],r.range[0]])})}}}(t,s,p,r);o(t,s,p,r)}}return{ObjectPattern(e){l(e,e.properties)},ObjectExpression(e){l(e,e.properties)},ImportDeclaration(e){e.attributes&&l(e,e.attributes,"ImportAttributes");let t=e.specifiers.findIndex(e=>"ImportSpecifier"===e.type);-1===t?l(e,[]):l(e,e.specifiers.slice(t))},ExportNamedDeclaration(e){l(e,e.specifiers),e.attributes&&l(e,e.attributes,"ImportAttributes")},ExportAllDeclaration(e){e.attributes&&l(e,e.attributes,"ImportAttributes")},TSMappedType(e){o(e,i.getFirstToken(e),i.getLastToken(e))},TSTypeLiteral(e){l(e,e.members)},TSInterfaceBody(e){l(e,e.body)},TSEnumBody(e){l(e,e.members)}}}}),an=rM({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&&(0,rj.isTokenOnSameLine)(r.getFirstToken(s[0]),r.getLastToken(s[s.length-1]))))for(let t=1;t<s.length;t++){let a=r.getLastToken(s[t-1]),o=r.getFirstToken(s[t]);(0,rj.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)}}}}),ar=rM({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,rj.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})}}}}),ai=rM({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,f=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,rj.isTokenOnSameLine)(r,o);if(!(0,rj.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=rt();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,rj.isTokenOnSameLine)(l,o)&&(0,rj.isTokenOnSameLine)(o,p)||("ignore"===c||(0,rj.isTokenOnSameLine)(l,o)||(0,rj.isTokenOnSameLine)(o,p)?"before"===u&&(0,rj.isTokenOnSameLine)(l,o)?e.report({node:t,loc:o.loc,messageId:"operatorAtBeginning",data:{operator:a},fix:f}):"after"===u&&(0,rj.isTokenOnSameLine)(o,p)?e.report({node:t,loc:o.loc,messageId:"operatorAtEnd",data:{operator:a},fix:f}):"none"===u&&e.report({node:t,loc:o.loc,messageId:"noLinebreak",data:{operator:a},fix:f}):e.report({node:t,loc:o.loc,messageId:"badLinebreak",data:{operator:a},fix:f}))}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,"=")}}}});let as=["always","never","start","end"];var aa=rM({name:"padded-blocks",meta:{type:"layout",docs:{description:"Require or disallow padding within blocks"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:as},{type:"object",properties:{blocks:{type:"string",enum:as},switches:{type:"string",enum:as},classes:{type:"string",enum:as}},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,rj.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,rj.isTokenOnSameLine)(n,t));return n}(i.getLastToken(n)),c=i.getTokenAfter(p,{includeComments:!0}),u=a(l,o),f=a(p,c);if(r.allowSingleLineBlocks&&(0,rj.isTokenOnSameLine)(l,c))return;let d=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"===d||"end"===d)&&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"===d||"start"===d)&&e.report({node:n,loc:{start:l.loc.start,end:o.loc.start},fix:e=>e.insertTextAfter(l,"\n"),messageId:"missingPadBlock"}),f?("never"===d||"start"===d)&&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"===d||"end"===d)&&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.hasOwn(t,"switches")&&(l.SwitchStatement=function(e){0!==e.cases.length&&o(e)}),Object.hasOwn(t,"blocks")&&(l.BlockStatement=function(e){0!==e.body.length&&o(e)},l.StaticBlock=l.BlockStatement),Object.hasOwn(t,"classes")&&(l.ClassBody=function(e){0!==e.body.length&&o(e)}),l}});let ao=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,al=/^require\(/u,ap=`[${Array.from(n6).join("")}]`,ac=RegExp(String.raw`^(\s*?${ap})\s*${ap}(\s*;?)$`,"u");function au(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 af(e){return{test:t=>t.type===e}}function ad(e){if(e.type===tn.AST_NODE_TYPES.ExpressionStatement){let t=ro(e.expression);if(t.type===tn.AST_NODE_TYPES.UnaryExpression&&(t=ro(t.argument)),t.type===tn.AST_NODE_TYPES.CallExpression){let e=t.callee;for(;e.type===tn.AST_NODE_TYPES.SequenceExpression;)e=e.expressions[e.expressions.length-1];return(0,rj.isFunction)(e)}}return!1}function am(e,t){return ry(e)&&e.expression.type===tn.AST_NODE_TYPES.Literal&&"string"==typeof e.expression.value&&!(0,rj.isParenthesized)(e.expression,t)}function ah(e,t){if(am(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(!am(n,t))return!1}return!0}return!1}function ag(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,rj.isSemicolonToken)(n)&&!(0,rj.isTokenOnSameLine)(r,n)&&(0,rj.isTokenOnSameLine)(n,i)?r:n}function ay(e,t,n){return t+n}function ax(e,t){if(rL(e))return e.loc;let n=e.loc.start.line;return{start:e.loc.start,end:{line:n,column:t.lines[n-1].length}}}let aT={any:{verify:function(){}},never:{verify:function(e,t,n,r){0!==r.length&&e.report({node:n,messageId:"unexpectedBlankLine",loc:ax(n,e.sourceCode),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.sourceCode.text.slice(s,a).replace(ac,ay);return t.replaceTextRange([s,a],o)}})}},always:{verify:function(e,t,n,r){r.length>0||e.report({node:n,messageId:"expectedBlankLine",loc:ax(n,e.sourceCode),fix(r){let i=e.sourceCode,s=ag(t,i),a=i.getFirstTokenBetween(s,n,{includeComments:!0,filter:e=>!(0,rj.isTokenOnSameLine)(s,e)||(s=e,!1)})||n,o=(0,rj.isTokenOnSameLine)(s,a)?"\n\n":"\n";return r.insertTextAfter(s,o)}})}}},aS={"block-like":{test:function(e,t){if(e.type===tn.AST_NODE_TYPES.DoWhileStatement&&e.body.type===tn.AST_NODE_TYPES.BlockStatement||ad(e))return!0;let n=t.getLastToken(e,rj.isNotSemicolonToken),r=n&&(0,rj.isClosingBraceToken)(n)?t.getNodeByRangeIndex(n.range[0]):null;return!!r&&(r.type===tn.AST_NODE_TYPES.BlockStatement||r.type===tn.AST_NODE_TYPES.SwitchStatement)}},expression:{test:function(e,t){return e.type===tn.AST_NODE_TYPES.ExpressionStatement&&!ah(e,t)}},return:au(tn.AST_NODE_TYPES.ReturnStatement,"return"),export:au([tn.AST_NODE_TYPES.ExportAllDeclaration,tn.AST_NODE_TYPES.ExportDefaultDeclaration,tn.AST_NODE_TYPES.ExportNamedDeclaration],"export"),var:au(tn.AST_NODE_TYPES.VariableDeclaration,"var"),let:au(tn.AST_NODE_TYPES.VariableDeclaration,"let"),const:au(tn.AST_NODE_TYPES.VariableDeclaration,"const"),using:{test:e=>"VariableDeclaration"===e.type&&("using"===e.kind||"await using"===e.kind)},type:au(tn.AST_NODE_TYPES.TSTypeAliasDeclaration,"type")},ab={"*":{test:()=>!0},exports:{test:function(e){if(e.type===tn.AST_NODE_TYPES.ExpressionStatement){let t=e.expression;if(t.type===tn.AST_NODE_TYPES.AssignmentExpression){let e=t.left;if(e.type===tn.AST_NODE_TYPES.MemberExpression){for(;e.object.type===tn.AST_NODE_TYPES.MemberExpression;)e=e.object;return e.object.type===tn.AST_NODE_TYPES.Identifier&&("exports"===e.object.name||"module"===e.object.name&&e.property.type===tn.AST_NODE_TYPES.Identifier&&"exports"===e.property.name)}}}return!1}},require:{test:function(e){if(e.type===tn.AST_NODE_TYPES.VariableDeclaration){let t=e.declarations[0];if(t?.init){let e=t?.init;for(;e.type===tn.AST_NODE_TYPES.MemberExpression;)e=e.object;if(e.type===tn.AST_NODE_TYPES.CallExpression&&e.callee.type===tn.AST_NODE_TYPES.Identifier)return"require"===e.callee.name}}return!1}},directive:{test:ah},iife:{test:ad},block:af(tn.AST_NODE_TYPES.BlockStatement),empty:af(tn.AST_NODE_TYPES.EmptyStatement),function:af(tn.AST_NODE_TYPES.FunctionDeclaration),"ts-method":af(tn.AST_NODE_TYPES.TSMethodSignature),break:au(tn.AST_NODE_TYPES.BreakStatement,"break"),case:au(tn.AST_NODE_TYPES.SwitchCase,"case"),class:au(tn.AST_NODE_TYPES.ClassDeclaration,"class"),continue:au(tn.AST_NODE_TYPES.ContinueStatement,"continue"),debugger:au(tn.AST_NODE_TYPES.DebuggerStatement,"debugger"),default:au([tn.AST_NODE_TYPES.SwitchCase,tn.AST_NODE_TYPES.ExportDefaultDeclaration],"default"),do:au(tn.AST_NODE_TYPES.DoWhileStatement,"do"),for:au([tn.AST_NODE_TYPES.ForStatement,tn.AST_NODE_TYPES.ForInStatement,tn.AST_NODE_TYPES.ForOfStatement],"for"),if:au(tn.AST_NODE_TYPES.IfStatement,"if"),import:au(tn.AST_NODE_TYPES.ImportDeclaration,"import"),switch:au(tn.AST_NODE_TYPES.SwitchStatement,"switch"),throw:au(tn.AST_NODE_TYPES.ThrowStatement,"throw"),try:au(tn.AST_NODE_TYPES.TryStatement,"try"),while:au([tn.AST_NODE_TYPES.WhileStatement,tn.AST_NODE_TYPES.DoWhileStatement],"while"),with:au(tn.AST_NODE_TYPES.WithStatement,"with"),"cjs-export":{test:(e,t)=>"ExpressionStatement"===e.type&&"AssignmentExpression"===e.expression.type&&ao.test(t.getText(e.expression.left))},"cjs-import":{test:(e,t)=>"VariableDeclaration"===e.type&&e.declarations.length>0&&!!e.declarations[0].init&&al.test(t.getText(e.declarations[0].init))},enum:au(tn.AST_NODE_TYPES.TSEnumDeclaration,"enum"),interface:au(tn.AST_NODE_TYPES.TSInterfaceDeclaration,"interface"),"function-overload":af(tn.AST_NODE_TYPES.TSDeclareFunction),...Object.fromEntries(Object.entries(aS).flatMap(([e,t])=>[[e,t],[`singleline-${e}`,{...t,test:(e,n)=>t.test(e,n)&&rL(e)}],[`multiline-${e}`,{...t,test:(e,n)=>t.test(e,n)&&!rL(e)}]]))};var aE=rM({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(aT)},statementType:{type:"string",enum:Object.keys(ab)},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===tn.AST_NODE_TYPES.LabeledStatement;)r=r.body;return Array.isArray(n)?n.some(a.bind(null,r)):ab[n].test(r,t)}function o(i){if(!i.parent||![tn.AST_NODE_TYPES.BlockStatement,tn.AST_NODE_TYPES.Program,tn.AST_NODE_TYPES.StaticBlock,tn.AST_NODE_TYPES.SwitchCase,tn.AST_NODE_TYPES.SwitchStatement,tn.AST_NODE_TYPES.TSInterfaceBody,tn.AST_NODE_TYPES.TSModuleBlock,tn.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 aT[i.blankLine]}return aT.any}(s,i),o=function(e,n){let r=[],i=ag(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}}}),ak=rM({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 n7.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 rx(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=nW(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&&rw(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 f(e,t){m(e.filter(e=>"SpreadElement"!==e.type&&e.key&&!e.method&&!e.computed&&!e.shorthand),t)}function d(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=nW(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&&f(e.properties,!1),"consistent-as-needed"===t&&f(e.properties,!0)},ImportAttribute(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},ImportDeclaration(e){d(e.attributes)},ExportAllDeclaration(e){d(e.attributes)},ExportNamedDeclaration(e){d(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&&f(e.members,!1),"consistent-as-needed"===t&&f(e.members,!0)},TSInterfaceBody(e){"consistent"===t&&f(e.body,!1),"consistent-as-needed"===t&&f(e.body,!0)},TSEnumDeclaration(e){let n=(e.body?.members||e.members).map(e=>({...e,key:e.id}));"consistent"===t&&f(n,!1),"consistent-as-needed"===t&&f(n,!0)}}}});function av(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}let aw={double:{quote:'"',alternateQuote:"'",description:"doublequote",convert:av},single:{quote:"'",alternateQuote:'"',description:"singlequote",convert:av},backtick:{quote:"`",alternateQuote:'"',description:"backtick",convert:av}},aA=RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(n6).join("")}]`,"u"),aC="avoid-escape";var a_=rM({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=aw[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&&(n0('value(boolean) for "allowTemplateLiterals"','"always"/"never"',"quotes"),o=!0===r.allowTemplateLiterals,l=!0===r.allowTemplateLiterals)):r===aC&&(n0(`option("${aC}")`,'"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 tn.AST_NODE_TYPES.ExpressionStatement:return!rl(i,e)&&function(e){if(!e.parent||!ry(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&&!rl(i,r.expression)))break}return!1}(e);case tn.AST_NODE_TYPES.Property:case tn.AST_NODE_TYPES.MethodDefinition:return t.key===e&&!t.computed;case tn.AST_NODE_TYPES.ImportDeclaration:case tn.AST_NODE_TYPES.ExportNamedDeclaration:return t.source===e;case tn.AST_NODE_TYPES.ExportAllDeclaration:return t.exported===e||t.source===e;case tn.AST_NODE_TYPES.ImportSpecifier:return t.imported===e;case tn.AST_NODE_TYPES.ExportSpecifier:return t.local===e||t.exported===e;case tn.AST_NODE_TYPES.ImportAttribute:return t.value===e;case tn.AST_NODE_TYPES.TSAbstractMethodDefinition:case tn.AST_NODE_TYPES.TSMethodSignature:case tn.AST_NODE_TYPES.TSPropertySignature:case tn.AST_NODE_TYPES.TSModuleDeclaration:case tn.AST_NODE_TYPES.TSExternalModuleReference:return!0;case tn.AST_NODE_TYPES.TSEnumMember:return e===t.id;case tn.AST_NODE_TYPES.TSAbstractPropertyDefinition:case tn.AST_NODE_TYPES.PropertyDefinition:case tn.AST_NODE_TYPES.AccessorProperty:return t.key===e&&!t.computed;case tn.AST_NODE_TYPES.TSLiteralType:return t.parent?.type===tn.AST_NODE_TYPES.TSImportType;default:return!1}}(r)||!!r.parent&&("JSXAttribute"===r.parent.type||"JSXElement"===r.parent.type||"JSXFragment"===r.parent.type)||rS(l,n.quote);!a&&s&&(a=rS(l,n.alternateQuote)&&l.includes(n.quote)),a||e.report({node:r,messageId:"wrongQuotes",data:{description:n.description},fix:e=>"backtick"===t&&rC(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&&aA.test(r.quasis[0].value.raw)||0||l&&s&&i.getText(r).includes(n.quote)||e.report({node:r,messageId:"wrongQuotes",data:{description:n.description},fix:e=>ry(r.parent)&&!rl(i,r)?null:e.replaceText(r,n.convert(i.getText(r)))})}}}}),aO=rM({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}}}),aP=rM({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,rj.isSemicolonToken)(t)){let a,o,l,p;if((a=n.getTokenBefore(t))&&(0,rj.isTokenOnSameLine)(a,t)&&n.isSpaceBetween(a,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((o=n.getTokenBefore(t))&&(0,rj.isTokenOnSameLine)(t,o)&&(l=n.getTokenAfter(t))&&(0,rj.isTokenOnSameLine)(t,l)&&!((p=n.getTokenAfter(t))&&(0,rj.isClosingBraceToken)(p)||(0,rj.isClosingParenToken)(p))){let r;if((r=n.getTokenAfter(t))&&(0,rj.isTokenOnSameLine)(t,r)&&n.isSpaceBetween(t,r)){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([tn.AST_NODE_TYPES.TSDeclareFunction]);e.parent&&!t.has(e.parent.type)&&a(e.parent)}}}}),aI=rM({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,rj.isTokenOnSameLine)(i,n),o=!s||(0,rj.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){var t;let n;if(!e.parent)return!0;let r=e.parent.type;if("IfStatement"===r&&e.parent.consequent===e&&e.parent.alternate||"DoWhileStatement"===r)return!0;let i="BlockStatement"===(n=(t=e.parent).type)||"StaticBlock"===n||"Program"===n||"ClassBody"===n?t.body:"SwitchCase"===n?t.consequent:null;return null!==i&&i[i.length-1]===e}(e))return;let i=t.getLastToken(e);(0,rj.isSemicolonToken)(i)&&r(i,n)},ForStatement(e){let n=e.init&&t.getTokenAfter(e.init,rj.isSemicolonToken),i=e.test&&t.getTokenAfter(e.test,rj.isSemicolonToken);n&&r(n,"last"),i&&r(i,"last")}}}}),aN=rM({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 rU(e,p).retainSurroundingTokens(s).remove(s)}):(i={start:s.loc.end,end:rv(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 f(e){let t=(0,rj.isSemicolonToken)(p.getLastToken(e));if(s){let i=p.getTokenAfter(e);t&&function(e){var t;let i,s,a,o;return t=p.getLastToken(e),!!(!(i=p.getTokenAfter(t))||(0,rj.isClosingBraceToken)(i)||(0,rj.isSemicolonToken)(i))||!(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)||(s=p.getLastToken(e,1),(a=p.getTokenAfter(e))&&(0,rj.isTokenOnSameLine)(s,a)))&&!(("PropertyDefinition"===e.type||"never"!==l||"DoWhileStatement"!==(o=e.type)&&"BreakStatement"!==o&&"ContinueStatement"!==o&&"DebuggerStatement"!==o&&"ImportDeclaration"!==o&&"ExportAllDeclaration"!==o&&("ReturnStatement"===o?e.argument:"ExportNamedDeclaration"===o?e.declaration:!function(e){if(!(0,rj.isClosingBraceToken)(e))return!1;let t=p.getNodeByRangeIndex(e.range[0]);return"BlockStatement"===t.type&&"ArrowFunctionExpression"===t.parent.type}(p.getLastToken(e,1))))&&u(p.getTokenAfter(e)))}(e)?c(e,!0):!t&&"always"===l&&"PropertyDefinition"!==e.type&&u(i)&&c(e)}else{let n,r,i,s,l=a&&(n=e.parent,!!(r=p.getTokenAfter(e))&&"}"===r.value&&("BlockStatement"===n.type?rL(n):"StaticBlock"===n.type&&(0,rj.isTokenOnSameLine)(n,p.getFirstToken(n,{skip:1})))),u=o&&(i=e.parent,!!(s=p.getTokenAfter(e))&&"}"===s.value&&"ClassBody"===i.type&&rL(i)),f=l||u;t&&f?c(e,!0):t||f||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||f(e)},ExpressionStatement:f,ReturnStatement:f,ThrowStatement:f,DoWhileStatement:f,DebuggerStatement:f,BreakStatement:f,ContinueStatement:f,ImportDeclaration:f,ExportAllDeclaration:f,ExportNamedDeclaration(e){e.declaration||f(e)},ExportDefaultDeclaration(e){e.declaration.type!==tn.AST_NODE_TYPES.TSInterfaceDeclaration&&(/(?:Class|Function)Declaration/u.test(e.declaration.type)||f(e))},PropertyDefinition:f,AccessorProperty:f,TSAbstractPropertyDefinition:f,TSDeclareFunction:f,TSExportAssignment:f,TSImportEqualsDeclaration:f,TSTypeAliasDeclaration:f,TSEmptyBodyFunctionExpression:f}}}),aL=rM({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,rj.isFunction)(t)&&t.body===e}function f(t){let f=n.getTokenBefore(t);if(f&&!((0,rj.isArrowToken)(f)||ru(f)&&!u(t)||(0,rj.isColonToken)(f)&&"parent"in t&&t.parent&&"SwitchCase"===t.parent.type&&f===rg(t.parent,n))&&(0,rj.isTokenOnSameLine)(f,t)){let d,m,h=n.isSpaceBetween(f,t);u(t)?(d=r,m=o):"ClassBody"===t.type||"TSEnumBody"===t.type||"TSInterfaceBody"===t.type?(d=s,m=p):"TSModuleBlock"===t.type?(d=a,m=c):(d=i,m=l),d&&!h?e.report({node:t,messageId:"missingSpace",fix:e=>e.insertTextBefore(t," ")}):m&&h&&e.report({node:t,messageId:"unexpectedSpace",fix:e=>e.removeRange([f.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:f,ClassBody:f,SwitchStatement(e){let t=e.cases;f(t.length>0?n.getTokenBefore(t[0]):n.getLastToken(e,1))},TSEnumBody:f,TSInterfaceBody:f,TSModuleBlock:f}}}),aD=rM({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===tn.AST_NODE_TYPES.ArrowFunctionExpression){if(e.async&&(0,rj.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===tn.AST_NODE_TYPES.MethodDefinition||t.type===tn.AST_NODE_TYPES.TSAbstractMethodDefinition||t.type===tn.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,rj.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,rj.isOpeningParenToken);a(e,n.getTokenBefore(s),s,t)}}}}),aB=rM({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){let l,p;l=[],p=[],r.braceException&&(l.push("{"),p.push("}")),r.bracketException&&(l.push("["),p.push("]")),r.parenException&&(l.push("("),p.push(")")),r.empty&&(l.push(")"),p.push("(")),i={openers:l,closers:p};let c=s.tokensAndComments;c.forEach((i,l)=>{let p=c[l-1],u=c[l+1];((0,rj.isOpeningParenToken)(i)||(0,rj.isClosingParenToken)(i))&&("("===i.value&&!(s.isSpaceBetween(i,u)||!r.empty&&(0,rj.isClosingParenToken)(u))&&(t?!a(u):a(u))&&e.report({node:n,loc:i.loc,messageId:"missingOpeningSpace",fix:e=>e.insertTextAfter(i," ")}),"("===i.value&&(0,rj.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(p,i)||!r.empty&&(0,rj.isOpeningParenToken)(p))&&(t?!o(p):o(p))&&e.report({node:n,loc:i.loc,messageId:"missingClosingSpace",fix:e=>e.insertTextBefore(i," ")}),")"===i.value&&(0,rj.isTokenOnSameLine)(p,i)&&s.isSpaceBetween(p,i)&&(t?o(p):!o(p))&&e.report({node:n,loc:{start:p.loc.end,end:i.loc.start},messageId:"rejectedClosingSpace",fix:e=>e.removeRange([p.range[1],i.range[0]])}))})}}}});let aj=["|","&"];var aR=rM({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=s("typeAnnotation"in e.left&&e.left.typeAnnotation?e.left.typeAnnotation:e.left,e.right,"operator"in e&&e.operator?e.operator:"=");n&&!(t&&r.getText(e).endsWith("|0"))&&i(e,n)}function o(e){return e.type===tn.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){l(e,e.optional&&!e.typeAnnotation?r.getTokenAfter(e.key):e.typeAnnotation??e.key,e.value)}function c(e){e.types.forEach(t=>{let s=t.type===tn.AST_NODE_TYPES.TSFunctionType?rj.isNotOpeningParenToken:0,a=r.getTokenBefore(t,s);if(!n&&null!=a&&aj.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)}}}}),aF=rM({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.hasOwn(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," ")}):rA(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=>rA(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)&&ru(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 aM(e){return`(?:${function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e)})`}function a$(e){return`${aM(e)}+`}function aV(e){let t="";return 0===e.length?t+="\\s":(t+="(?:\\s|",1===e.length?t+=a$(e[0]):(t+="(?:",t+=e.map(a$).join("|"),t+=")"),t+=`(?:$|[${Array.from(n6).join("")}]))`),t}var aq=rM({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+=aM(o[0]):(a+="(?:",a+=o.map(aM).join("|"),a+=")"),a+="?",RegExp(a+=aV(l),"u")):RegExp(`^(${o.map(aM).join("|")})?[ ]+`,"u"),endRegex:i&&n?RegExp(`${aV(l)}$`,"u"):RegExp("[ ]+$","u"),hasExceptions:l.length>0,captureMarker:RegExp(`^(${o.map(aM).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=>{rf(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)})}}}}),aY=rM({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,rj.isClosingBraceToken)(n)||!(0,rj.isTokenOnSameLine)(e,n)||t.isSpaceBetween(e,n)===r}function a(e,n,r,i){return rD(t,n,r)?null:i?e.insertTextAfter(n," "):e.removeRange([n.range[1],r.range[0]])}return{SwitchCase(n){let o=rg(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)})}}}}),aX=rM({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,rj.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,rj.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)}}}}),aJ=rM({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," ")})}}}}),aU=rM({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,i,s=[":","=>"],a=e.sourceCode,o=(n={...t?.before!==void 0?{before:t.before}:{},...t?.after!==void 0?{after:t.after}:{}},r=t?.overrides??{},{colon:i={before:!1,after:!0,...n,...r?.colon},arrow:{before:!0,after:!0,...n,...r?.arrow},variable:{...i,...r?.variable},property:{...i,...r?.property},parameter:{...i,...r?.parameter},returnType:{...i,...r?.returnType}});function l(t){let n=a.getTokenBefore(t,rj.isNotOpeningParenToken),r=n,i=a.getTokenBefore(n),l=n.value;if(!s.includes(l))return;let{before:p,after:c}=function(e,t){let n=t?.parent?.parent;if((0,rj.isTSFunctionType)(n)||(0,rj.isTSConstructorType)(n))return e.arrow;if((0,rj.isIdentifier)(n)){let t;return t=n?.parent,(0,rj.isVariableDeclarator)(t)?e.variable:(0,rj.isFunctionOrFunctionType)(t)?e.parameter:e.colon}return(0,rj.isClassOrTypeElement)(n)?e.property:(0,rj.isFunction)(n)?e.returnType:e.colon}(o,t);":"===l&&"?"===i.value&&(a.isSpaceBetween(i,r)&&e.report({node:r,messageId:"unexpectedSpaceBetween",data:{type:l,previousToken:i.value},fix:e=>e.removeRange([i.range[1],r.range[0]])}),l="?:",r=i,("+"===(i=a.getTokenBefore(i)).value||"-"===i.value)&&(l=`${i.value}?:`,r=i,i=a.getTokenBefore(i)));let u=a.isSpaceBetween(n,t);c&&!u?e.report({node:n,messageId:"expectedSpaceAfter",data:{type:l},fix:e=>e.insertTextAfter(n," ")}):!c&&u&&e.report({node:n,messageId:"unexpectedSpaceAfter",data:{type:l},fix:e=>e.removeRange([n.range[1],t.range[0]])});let f=a.isSpaceBetween(i,r);p&&!f?e.report({node:r,messageId:"expectedSpaceBefore",data:{type:l},fix:e=>e.insertTextAfter(i," ")}):!p&&f&&e.report({node:r,messageId:"unexpectedSpaceBefore",data:{type:l},fix:e=>e.removeRange([i.range[1],r.range[0]])})}return{TSMappedType(e){e.typeAnnotation&&l(e.typeAnnotation)},TSTypeAnnotation(e){l(e.typeAnnotation)}}}});let aW=new Set(["TSCallSignatureDeclaration","ArrowFunctionExpression","TSFunctionType","FunctionExpression","ClassExpression"]);var aK=rM({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;0!==n.length&&r(t.getTokenBefore(n[0]),t.getTokenAfter(n[n.length-1]))},TSTypeParameterDeclaration:n=>{if(!aW.has(n.parent.type)){let r=t.text.slice(0,n.range[0]).match(/(\s+)$/)?.[0];r&&r.length&&e.report({node:n,messageId:"genericSpacingMismatch",*fix(e){yield e.replaceTextRange([n.range[0]-r.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})}}}});let aH=/^([\w$]+)(\s*)(\?\s*)?:(\s*)(.*)$/;var az={rules:{"array-bracket-newline":rW,"array-bracket-spacing":rK,"array-element-newline":rH,"arrow-parens":rz,"arrow-spacing":rG,"block-spacing":rQ,"brace-style":rZ,"comma-dangle":r1,"comma-spacing":r2,"comma-style":r3,"computed-property-spacing":r6,"curly-newline":ir,"dot-location":ii,"eol-last":is,"function-call-argument-newline":ia,"function-call-spacing":io,"function-paren-newline":il,"generator-star-spacing":ic,"implicit-arrow-linebreak":iu,indent:iT,"indent-binary-ops":id,"jsx-child-element-spacing":ib,"jsx-closing-bracket-location":iE,"jsx-closing-tag-location":iw,"jsx-curly-brace-presence":iI,"jsx-curly-newline":iN,"jsx-curly-spacing":iF,"jsx-equals-spacing":iM,"jsx-first-prop-new-line":i$,"jsx-function-call-newline":iV,"jsx-indent":iY,"jsx-indent-props":iq,"jsx-max-props-per-line":iX,"jsx-newline":iJ,"jsx-one-expression-per-line":iW,"jsx-pascal-case":i0,"jsx-props-no-multi-spaces":i1,"jsx-quotes":i3,"jsx-self-closing-comp":i4,"jsx-sort-props":sn,"jsx-tag-spacing":so,"jsx-wrap-multilines":sp,"key-spacing":su,"keyword-spacing":sT,"line-comment-position":sS,"linebreak-style":sb,"lines-around-comment":sE,"lines-between-class-members":sv,"exp-list-style":sw,"max-len":s_,"max-statements-per-line":sP,"member-delimiter-style":sN,"multiline-comment-style":sL,"multiline-ternary":sD,"new-parens":sB,"newline-per-chained-call":sj,"no-confusing-arrow":sR,"no-extra-parens":sM,"no-extra-semi":s$,"no-floating-decimal":sV,"no-mixed-operators":sG,"no-mixed-spaces-and-tabs":sQ,"no-multi-spaces":sZ,"no-multiple-empty-lines":s0,"no-tabs":s3,"no-trailing-spaces":s6,"no-whitespace-before-property":s4,"nonblock-statement-body-position":s9,"object-curly-newline":ae,"object-curly-spacing":at,"object-property-newline":an,"one-var-declaration-per-line":ar,"operator-linebreak":ai,"padded-blocks":aa,"padding-line-between-statements":aE,"quote-props":ak,quotes:a_,"rest-spread-spacing":aO,semi:aN,"semi-spacing":aP,"semi-style":aI,"space-before-blocks":aL,"space-before-function-paren":aD,"space-in-parens":aB,"space-infix-ops":aR,"space-unary-ops":aF,"spaced-comment":aq,"switch-colon-spacing":aY,"template-curly-spacing":aX,"template-tag-spacing":aJ,"type-annotation-spacing":aU,"type-generic-spacing":aK,"type-named-tuple-spacing":rM({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.sourceCode;return{TSNamedTupleMember(n){let r=t.text.slice(n.range[0],n.range[1]),i=r.match(aH);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(aH,c()))}}),a?.length&&e.report({node:n,messageId:"unexpectedSpaceBefore",*fix(e){yield e.replaceTextRange(n.range,r.replace(aH,c()))}}),null!=l&&1!==l.length&&e.report({node:n,messageId:"expectedSpaceAfter",*fix(e){yield e.replaceTextRange(n.range,r.replace(aH,c()))}})}}}}),"wrap-iife":rM({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,a="FunctionExpression"===(s=ro(i.callee)).type?s:n&&"MemberExpression"===s.type&&"FunctionExpression"===s.object.type&&("call"===ra(s)||"apply"===ra(s))?s.object:null;if(!a)return;let o=rl(r,i),l=rl(r,a);o||l?"inside"!==t||l?"outside"!==t||o||e.report({node:i,messageId:"moveInvocation",fix(e){let t=r.getTokenAfter(a);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){let t;if((0,rj.isParenthesized)(i,r)&&(t=i.parent?.type==="ChainExpression"?i.parent:i,t.parent?.type!=="NewExpression"||t.parent.callee!==t)){let t=r.getTokenAfter(i);return e.replaceTextRange([a.range[1],t.range[1]],`)${r.getText().slice(a.range[1],t.range[0])}`)}return e.replaceText(a,`(${r.getText(a)})`)}}):e.report({node:i,messageId:"wrapInvocation",fix(e){let n="inside"===t?a:i;return e.replaceText(n,`(${r.getText(n)})`)}})}}}}),"wrap-regex":rM({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":rM({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 aG(e={}){let{arrowParens:t=!1,blockSpacing:n=!0,braceStyle:r="stroustrup",commaDangle:i="always-multiline",experimental:s=!1,indent:a=2,jsx:o=!0,pluginName:l="@stylistic",quoteProps:p="consistent-as-needed",quotes:c="single",semi:u=!1,severity:f="error"}=e,d={"@stylistic/array-bracket-spacing":[f,"never"],"@stylistic/arrow-parens":[f,t?"always":"as-needed",{requireForBlockBody:!0}],"@stylistic/arrow-spacing":[f,{after:!0,before:!0}],"@stylistic/block-spacing":[f,n?"always":"never"],"@stylistic/brace-style":[f,r,{allowSingleLine:!0}],"@stylistic/comma-dangle":[f,i],"@stylistic/comma-spacing":[f,{after:!0,before:!1}],"@stylistic/comma-style":[f,"last"],"@stylistic/computed-property-spacing":[f,"never",{enforceForClassMembers:!0}],"@stylistic/dot-location":[f,"property"],"@stylistic/eol-last":f,"@stylistic/generator-star-spacing":[f,{after:!0,before:!1}],"@stylistic/indent":[f,a,{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"===a?4:a,VariableDeclarator:1}],"@stylistic/indent-binary-ops":[f,a],"@stylistic/key-spacing":[f,{afterColon:!0,beforeColon:!1}],"@stylistic/keyword-spacing":[f,{after:!0,before:!0}],"@stylistic/lines-between-class-members":[f,"always",{exceptAfterSingleLine:!0}],"@stylistic/max-statements-per-line":[f,{max:1}],"@stylistic/member-delimiter-style":[f,{multiline:{delimiter:u?"semi":"none",requireLast:u},multilineDetection:"brackets",overrides:{interface:{multiline:{delimiter:u?"semi":"none",requireLast:u}}},singleline:{delimiter:u?"semi":"comma"}}],"@stylistic/multiline-ternary":[f,"always-multiline"],"@stylistic/new-parens":f,"@stylistic/no-extra-parens":[f,"functions"],"@stylistic/no-floating-decimal":f,"@stylistic/no-mixed-operators":[f,{allowSamePrecedence:!0,groups:[["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]]}],"@stylistic/no-mixed-spaces-and-tabs":f,"@stylistic/no-multi-spaces":f,"@stylistic/no-multiple-empty-lines":[f,{max:1,maxBOF:0,maxEOF:0}],"@stylistic/no-tabs":"tab"===a?"off":f,"@stylistic/no-trailing-spaces":f,"@stylistic/no-whitespace-before-property":f,"@stylistic/object-curly-spacing":[f,"always"],"@stylistic/operator-linebreak":[f,"before"],"@stylistic/padded-blocks":[f,{blocks:"never",classes:"never",switches:"never"}],"@stylistic/quote-props":[f,p],"@stylistic/quotes":[f,c,{allowTemplateLiterals:"always",avoidEscape:!1}],"@stylistic/rest-spread-spacing":[f,"never"],"@stylistic/semi":[f,u?"always":"never"],"@stylistic/semi-spacing":[f,{after:!0,before:!1}],"@stylistic/space-before-blocks":[f,"always"],"@stylistic/space-before-function-paren":[f,{anonymous:"always",asyncArrow:"always",named:"never"}],"@stylistic/space-in-parens":[f,"never"],"@stylistic/space-infix-ops":f,"@stylistic/space-unary-ops":[f,{nonwords:!1,words:!0}],"@stylistic/spaced-comment":[f,"always",{block:{balanced:!0,exceptions:["*"],markers:["!"]},line:{exceptions:["/","#"],markers:["/"]}}],"@stylistic/template-curly-spacing":f,"@stylistic/template-tag-spacing":[f,"never"],"@stylistic/type-annotation-spacing":[f,{}],"@stylistic/type-generic-spacing":f,"@stylistic/type-named-tuple-spacing":f,"@stylistic/wrap-iife":[f,"any",{functionPrototypeMethods:!0}],"@stylistic/yield-star-spacing":[f,{after:!0,before:!1}],...o?{"@stylistic/jsx-closing-bracket-location":f,"@stylistic/jsx-closing-tag-location":f,"@stylistic/jsx-curly-brace-presence":[f,{propElementValues:"always"}],"@stylistic/jsx-curly-newline":f,"@stylistic/jsx-curly-spacing":[f,"never"],"@stylistic/jsx-equals-spacing":f,"@stylistic/jsx-first-prop-new-line":f,"@stylistic/jsx-function-call-newline":[f,"multiline"],"@stylistic/jsx-indent-props":[f,a],"@stylistic/jsx-max-props-per-line":[f,{maximum:1,when:"multiline"}],"@stylistic/jsx-one-expression-per-line":[f,{allow:"single-child"}],"@stylistic/jsx-quotes":f,"@stylistic/jsx-tag-spacing":[f,{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"@stylistic/jsx-wrap-multilines":[f,{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(s&&(d={...d,"@stylistic/array-bracket-newline":"off","@stylistic/array-bracket-spacing":"off","@stylistic/array-element-newline":"off","@stylistic/exp-list-style":"error","@stylistic/function-call-argument-newline":"off","@stylistic/function-paren-newline":"off","@stylistic/jsx-function-call-newline":"off","@stylistic/object-curly-newline":"off","@stylistic/object-curly-spacing":"off","@stylistic/object-property-newline":"off"}),"@stylistic"!==l){let e=/^@stylistic\//;d=Object.fromEntries(Object.entries(d).map(([t,n])=>[t.replace(e,`${l}/`),n]))}return{plugins:{[l]:az},rules:d}}let aQ=[/^jsx-/,/^curly-newline$/],aZ=(i="@stylistic",s=e=>!aQ.some(t=>t.test(e)),n=Object.fromEntries(Object.entries(az.rules).filter(([e,t])=>t.meta.fixable&&!t.meta.deprecated&&!t.meta.experimental&&e===t.meta.docs.url.split("/").pop()&&(!s||s(e,t))).map(([e])=>[`${i}/${e}`,2])),{plugins:{[i]:az},rules:n}),a0=aG(),a1=Object.assign(az,{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:aG,recommended:a0,"recommended-flat":a0,all:aZ,"all-flat":aZ},{get(e,t,n){let r=t.toString();return r.endsWith("-flat")&&n0(`config("${r}")`,`"${r.replace("-flat","")}"`),Reflect.get(e,t,n)}})});exports.stylistic_eslint_plugin=a1;
20
+ ${t} */`))}});else{let n=r.value.split(rR.LINEBREAK_MATCHER),i=`${u(r)} *`;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],`
21
+ ${i}`)})}rP(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]],`
22
+ ${i}/`)});for(let s=r.loc.start.line+1;s<=r.loc.end.line;s++){let o=t.lines[s-1],l=a(o)?"alignment":"missingStar";o.startsWith(i)||e.report({loc:{start:{line:s,column:0},end:{line:s,column:o.length}},messageId:l,fix(e){let a,p=t.getIndexFromLoc({line:s,column:0});if("alignment"===l){let[,t=""]=o.match(/^(\s*\*)/u)||[],n=p+t.length;return e.replaceTextRange([p,n],i)}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],`${i}${a}`)}})}}},"separate-lines":function(n){let[r]=n,a=l(n),o=p(n);if("Block"!==r.type||!i&&a||!s&&o)return;let f=c(n);(a||o)&&(f=f.slice(1,f.length-1));let d=t.getTokenAfter(r,{includeComments:!0});d&&(0,rR.isTokenOnSameLine)(r,d)||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,f.map(e=>`// ${e}`).join(`
23
+ ${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]],f(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,f(n,r))})}};return{Program:()=>t.getAllComments().filter(e=>{if(rd(e)||n6.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&&rB(e[0])||(0,d[n])(e)})}}}),sD=r$({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,rR.isNotClosingParenToken),o=t.getTokenAfter(s.consequent,rR.isNotClosingParenToken),l=t.getFirstToken(s),p=t.getTokenBefore(a),c=t.getTokenAfter(a),u=t.getTokenBefore(o),f=t.getTokenAfter(o),d=(0,rR.isTokenOnSameLine)(p,c),m=(0,rR.isTokenOnSameLine)(u,f),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&&rB(s))return;d&&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 d||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,rR.isTokenOnSameLine)(p,a),r=(0,rR.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,rR.isTokenOnSameLine)(u,o),r=(0,rR.isTokenOnSameLine)(o,f);return n||t.push(e.removeRange([u.range[1],o.range[0]])),r||t.push(e.removeRange([o.range[1],f.range[0]])),t}})}}}}),sj=r$({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,rR.isClosingParenToken)(i),a=n.getTokenBefore(i),o=s&&(0,rR.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,")")]})}}}}),sR=r$({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=rl(r.callee);if("MemberExpression"!==i.type)return;let s=rl(i.object),a=1;for(;s&&"callee"in s&&s.callee;){a+=1;let e=rl(s.callee);if(!("object"in e))break;s=rl(e.object)}if(a>t&&(0,rR.isTokenOnSameLine)(i.object,i.property)){var o;let t,r,s,a=n.getTokenAfter(i.object,rR.isNotClosingParenToken);e.report({node:i.property,loc:{start:a.loc.start,end:i.loc.end},messageId:"expected",data:{callee:(t=(o=i).computed?o.optional?"?.[":"[":o.optional?"?.":".",r=n.getText(i.property).split(rR.LINEBREAK_MATCHER),s=i.computed&&1===r.length?"]":"",t+r[0]+s)},fix:e=>e.insertTextBefore(a,"\n")})}}}}}),sF=r$({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&&rp(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})}}}});let sM=(0,rR.isNodeOfTypes)([tr.AST_NODE_TYPES.TSAsExpression,tr.AST_NODE_TYPES.TSNonNullExpression,tr.AST_NODE_TYPES.TSSatisfiesExpression,tr.AST_NODE_TYPES.TSTypeAssertion]);var s$=r$({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,f=a&&n?.enforceForArrowConditionals===!1,d=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&&n&&new Set(Object.entries(n.allowNodesInSpreadElement||{}).filter(([e,t])=>t).map(([e])=>e));n2(n,["enforceForArrowConditionals","enforceForNewInMemberExpressions","allowNodesInSpreadElement"],"ignoredNodes","no-extra-parens");let T=rE({type:"AssignmentExpression"}),S=rE({type:"UpdateExpression"});function b(e){let t=rl(e);if("CallExpression"!==t.type)return!1;let n=rl(t.callee);return"MemberExpression"===n.type&&"FunctionExpression"===n.object.type&&["call","apply"].includes(ro(n))}function E(e){if("JSXElement"===e.type||"JSXFragment"===e.type)switch(u){case"all":return!1;case"multi-line":return rB(e);case"single-line":return!rB(e)}return!("SequenceExpression"===e.type&&d||b(e)&&h)&&(a||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type)}function k(e){return(0,rR.isParenthesized)(1,e,i)}function v(e){return(0,rR.isParenthesized)(2,e,i)}function w(e){return E(e)&&k(e)}function A(e){return E(e)&&v(e)}function C(e,t){return!!(E(e)&&k(e)&&(rE(e)>=t||v(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,rR.isOpeningParenToken)(n)&&(0,rR.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,rR.isTokenOnSameLine)(e,t)?w(t):A(t)}function B(e){let t=rl(e);return"CallExpression"===t.type&&"FunctionExpression"===t.callee.type}function D(e){return!!(e&&("Identifier"===e.type||"MemberExpression"===e.type))}function j(t){let n=i.getTokenBefore(t),a=i.getTokenAfter(t);if(!v(t)){if(s.has(i.getFirstToken(t))||B(t)&&!("callee"in t&&k(t.callee)))return;if(g){let e=i.getCommentsBefore(n),t=e.length;if(t>0&&RegExp(g,"u").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||v(t)||!rx(t.parent)?e=>{let r,s,o,l,p,c,u,f=i.text.slice(n.range[1],a.range[0]);return e.replaceTextRange([n.range[0],a.range[1]],((r=i.getTokenBefore(t),s=i.getTokenBefore(r,{includeComments:!0}),o=i.getTokenAfter(r,{includeComments:!0}),s&&s.range[1]===r.range[0]&&r.range[1]===o.range[0]&&!rC(s,o))?" ":"")+f+((p=(l=i.getTokensAfter(t,{count:2}))[0],c=l[1],u=i.getLastToken(t),p&&c&&!i.isSpaceBetween(p,c)&&!rC(u,c))?" ":""))}:null})}r?r.reports.push({node:t,finishReport:o}):o()}function R(e){"argument"in e&&e.argument&&C(e.argument,rE(e))&&j(e.argument)}function F(e){let t=sM(e.left),n=sM(e.right);if(t&&n)return;let r=e=>{let t=rE(e),n=rE(e.left),r=rE(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&&w(e.left)&&(!(["AwaitExpression","UnaryExpression"].includes(e.left.type)&&i)&&!rg(e.left,e)&&!("ReturnStatement"===e.parent.type&&e.parent.loc.start.line!==e.left.loc.start.line&&!k(e))&&(n>t||n===t&&!i)||v(e.left))&&j(e.left),!a&&w(e.right)&&(!rg(e.right,e)&&(r>t||r===t&&i)||v(e.right))&&j(e.right)};return r(t?{...e,left:{...e.left,type:tr.AST_NODE_TYPES.SequenceExpression}}:n?{...e,right:{...e.right,type:tr.AST_NODE_TYPES.SequenceExpression}}:e)}function M(e){let t=e=>{let t=e.callee;C(t,rE(e))&&(A(t)||!(B(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(sM(e.callee)?{...e,callee:{...e.callee,type:tr.AST_NODE_TYPES.SequenceExpression}}:e)}function $(e){e.superClass&&(rE(e.superClass)>S?w(e.superClass):A(e.superClass))&&j(e.superClass)}function V(e){let t=k(e)?i.getTokenBefore(e):i.getFirstToken(e),n=i.getTokenAfter(t,rR.isNotOpeningParenToken),r=n?i.getTokenAfter(n):null,a=n?i.getTokenAfter(n,rR.isNotClosingParenToken):null;(0,rR.isOpeningParenToken)(t)&&((0,rR.isOpeningBraceToken)(n)||rf(n)&&("function"===n.value||"class"===n.value||"let"===n.value&&a&&((0,rR.isOpeningBracketToken)(a)||"Identifier"===a.type))||n&&"Identifier"===n.type&&"async"===n.value&&rf(r)&&"function"===r.value)&&s.add(n),("ExportDefaultDeclaration"===e.parent.type?C(e,T):w(e))&&j(e)}function q(e){return sM(e.argument)?R({...e,argument:{...e.argument,type:tr.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,rR.isNodeOfTypes)([tr.AST_NODE_TYPES.TSUnionType,tr.AST_NODE_TYPES.TSIntersectionType])(t)?v(t):C(t,rE(e)))&&j(t)})}let J={ArrayExpression(e){e.elements.map(e=>sM(e)?{...e,type:tr.AST_NODE_TYPES.FunctionExpression}:e).forEach(e=>{e&&C(e,T)&&j(e)})},ArrayPattern(e){e.elements.forEach(e=>{e&&D(e)&&w(e)&&j(e)})},ArrowFunctionExpression(e){if(sM(e.body)||N(e)||"ConditionalExpression"===e.body.type&&f||"BlockStatement"===e.body.type)return;let t=i.getFirstToken(e.body,rR.isNotOpeningParenToken);(0,rR.isOpeningParenToken)(i.getTokenBefore(t))&&(0,rR.isOpeningBraceToken)(t)&&s.add(t),C(e.body,T)&&j(e.body)},AssignmentExpression(e){D(e.left)&&w(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)||v(e.left))&&j(e.left),!N(e)&&C(e.right,rE(e))&&j(e.right)},AssignmentPattern(e){let{left:t,right:n}=e;D(t)&&w(t)&&j(t),n&&C(n,T)&&j(n)},AwaitExpression:e=>sM(e.argument)?R({...e,argument:{...e.argument,type:tr.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===tr.AST_NODE_TYPES.TSAsExpression?$({...e,superClass:{...e.superClass,type:tr.AST_NODE_TYPES.SequenceExpression}}):$(e),ClassExpression:e=>e.superClass?.type===tr.AST_NODE_TYPES.TSAsExpression?$({...e,superClass:{...e.superClass,type:tr.AST_NODE_TYPES.SequenceExpression}}):$(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,rE({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(sM(e.test)?{...e,test:{...e.test,type:tr.AST_NODE_TYPES.SequenceExpression}}:sM(e.consequent)?{...e,consequent:{...e.consequent,type:tr.AST_NODE_TYPES.SequenceExpression}}:sM(e.alternate)?{...e,alternate:{...e.alternate,type:tr.AST_NODE_TYPES.SequenceExpression}}:e)},DoWhileStatement(e){w(e.test)&&!_(e)&&j(e.test)},ExportDefaultDeclaration(e){V(e.declaration)},ExpressionStatement(e){V(e.expression)},ForInStatement(e){if(!sM(e.right)){if("VariableDeclaration"!==e.left.type){let t=i.getFirstToken(e.left,rR.isNotOpeningParenToken);"let"===t.value&&(0,rR.isOpeningBracketToken)(i.getTokenAfter(t,rR.isNotClosingParenToken))&&s.add(t)}w(e.left)&&j(e.left),w(e.right)&&j(e.right)}},ForOfStatement(e){if("VariableDeclaration"!==e.left.type){let t=i.getFirstToken(e.left,rR.isNotOpeningParenToken);"let"===t.value&&s.add(t)}w(e.left)&&j(e.left),!sM(e.right)&&C(e.right,T)&&j(e.right)},ForStatement(e){if(e.test&&w(e.test)&&!_(e)&&!sM(e.test)&&j(e.test),e.update&&w(e.update)&&!sM(e.update)&&j(e.update),e.init&&!sM(e.init)){if("VariableDeclaration"!==e.init.type){let t=i.getFirstToken(e.init,rR.isNotOpeningParenToken);"let"===t.value&&(0,rR.isOpeningBracketToken)(i.getTokenAfter(t,rR.isNotClosingParenToken))&&s.add(t)}r={upper:r,inExpressionNodes:[],reports:[]},w(e.init)&&j(e.init)}},"ForStatement > *.init:exit":function(e){sM(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(v(t))return;s||(s=t)}}s&&(n=s,r&&(r.reports=r.reports.filter(e=>e.node!==n)))}),function(){let{upper:e,inExpressionNodes:t,reports:n}=r??{};e?(e.inExpressionNodes.push(...t??[]),e.reports.push(...n??[])):n?.forEach(({finishReport:e})=>e()),r=e}())},IfStatement(e){w(e.test)&&!_(e)&&j(e.test)},ImportExpression(e){let{source:t}=e;"SequenceExpression"===t.type?A(t)&&j(t):w(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):w(e.object)&&!(b(e.parent)&&"callee"in e.parent&&e.parent.callee===e&&h);t&&rE(e.object)>=rE(e)&&(e.computed||!(rk(e.object)||rS(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&&w(e.property)&&j(e.property)};return t(sM(e.object)?{...e,object:{...e.object,type:tr.AST_NODE_TYPES.SequenceExpression}}:sM(e.property)?{...e,property:{...e.property,type:tr.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&&D(e)&&w(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;D(t)&&w(t)&&j(t)},ReturnStatement(e){let t=i.getFirstToken(e);!N(e)&&e.argument&&t&&L(t,e.argument)&&!rS(e.argument)&&j(e.argument)},SequenceExpression(e){let t=rE(e);e.expressions.forEach(e=>{C(e,t)&&j(e)})},SpreadElement(e){sM(e.argument)||x&&x.has(e.argument.type)||C(e.argument,T)&&j(e.argument)},SwitchCase(e){e.test&&!sM(e.test)&&w(e.test)&&j(e.test)},SwitchStatement(e){w(e.discriminant)&&j(e.discriminant)},TemplateLiteral(e){e.expressions.forEach(e=>{w(e)&&j(e)})},ThrowStatement(e){if(!e.argument||sM(e.argument))return;let t=i.getFirstToken(e);t&&L(t,e.argument)&&j(e.argument)},UnaryExpression:q,UpdateExpression(e){if(sM(e.argument))return q(e);if(e.prefix)R(e);else{let{argument:t}=e;(0,rR.isTokenOnSameLine)(t,i.getLastToken(e))?R(e):A(t)&&j(t)}},VariableDeclarator(e){let t=e=>{e.init&&C(e.init,T)&&!rS(e.init)&&j(e.init)};return t(sM(e.init)?{...e,type:tr.AST_NODE_TYPES.VariableDeclarator,init:{...e.init,type:tr.AST_NODE_TYPES.FunctionExpression}}:e)},WhileStatement(e){w(e.test)&&!_(e)&&j(e.test)},WithStatement(e){w(e.object)&&j(e.object)},YieldExpression(e){if(!e.argument||sM(e.argument))return;let t=i.getFirstToken(e);(rE(e.argument)>=rE(e)&&t&&L(t,e.argument)||A(e.argument))&&j(e.argument)},TSArrayType(e){C(e.elementType,rE(e))&&j(e.elementType)},TSIntersectionType:X,TSUnionType:X,TSTypeAnnotation(e){w(e.typeAnnotation)&&j(e.typeAnnotation)},TSTypeAliasDeclaration(e){w(e.typeAnnotation)&&j(e.typeAnnotation)},TSEnumMember(e){e.initializer&&w(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)}}}}}),sV=r$({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){let r;e.report({node:n,messageId:"unexpected",fix:(r=t.getTokenAfter(n))&&"String"===r.type&&rx(t.getNodeByRangeIndex(r.range[0]).parent)?null:t=>new rW(t,e.sourceCode).retainSurroundingTokens(n).remove(n)})}function r(e){for(let r=e;"Punctuator"===r.type&&!(0,rR.isClosingBraceToken)(r);r=t.getTokenAfter(r))(0,rR.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))}}}}),sq=r$({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]&&!rC(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")}))}}}});let sY=["+","-","*","/","%","**"],sX=["&","|","^","~","<<",">>",">>>"],sJ=["==","!=","===","!==",">",">=","<","<="],sU=["&&","||"],sW=["in","instanceof"],sK=[].concat(sY,sX,sJ,sU,sW,["?:"],["??"]),sH=[sY,sX,sJ,sU,sW],sz=/^(?:Binary|Logical|Conditional)Expression$/u;function sG(e){return"ConditionalExpression"===e.type?e.test:e.left}var sQ=r$({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:sK},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:sH,allowSamePrecedence:!1!==e.allowSamePrecedence}}(e.options[0]);function r(e){return t.getTokenAfter(sG(e),rR.isNotClosingParenToken)}function i(i){var s,a,o,l;let p,c,u,f,d;sz.test(i.parent.type)&&(s=i).operator!==s.parent.operator&&!rp(t,s)&&(p=i.parent,a=n.groups??[],o=i.operator,l="ConditionalExpression"===p.type?"?:":p.operator,a.some(e=>e.includes(o)&&e.includes(l))&&(!n.allowSamePrecedence||rE(i)!==rE(p)))&&(u=sG(c=i.parent)===i?i:c,f=sG(c)!==i?i:c,d={leftOperator:u.operator||"?:",rightOperator:f.operator||"?:"},e.report({node:u,loc:r(u).loc,messageId:"unexpectedMixedOperator",data:d}),e.report({node:f,loc:r(f).loc,messageId:"unexpectedMixedOperator",data:d}))}return{BinaryExpression:i,LogicalExpression:i}}}),sZ=r$({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"})}}})}}}}),s0=r$({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,rR.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]]," ")})}})}}}}),s1=r$({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)}}}});let s2=/\t+/gu,s3=/\S/u;var s6=r$({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=s2.exec(t));)(!n||s3.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"})})}}}}),s4=r$({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){var s;let l,p=RegExp(i,"u"),c=RegExp(r,"u"),u=t.lines,f=t.getText().match(rn()),d=(s=t.getAllComments(),l=new Set,s.forEach(e=>{let t="Block"===e.type?e.loc.end.line-1:e.loc.end.line;for(let n=e.loc.start.line;n<=t;n++)l.add(n)}),l),m=0;for(let r=0,i=u.length;r<i;r++){let i=r+1,s=f&&f[r]?f[r].length:1,l=u[r].length+s,h=p.exec(u[r]);if(h){let p={start:{line:i,column:h.index},end:{line:i,column:l-s}},f=m+p.start.column,g=m+p.end.column,y=t.getNodeByRangeIndex(f);if(y&&"TemplateElement"===y.type&&f>y.parent.range[0]&&g<y.parent.range[1]||a&&c.test(u[r])){m+=l;continue}let x=[f,g];o&&d.has(i)||function(t,n,r){e.report({node:t,loc:n,messageId:"trailingSpace",fix:e=>e.removeRange(r)})}(n,p,x)}m+=l}}}}}),s5=r$({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;function n(n){let{node:r,leftToken:i,rightToken:s,propName:a,replacementText:o="",preventAutoFix:l}=n;e.report({node:r,messageId:"unexpectedWhitespace",data:{propName:a},fix:e=>t.commentsExistBetween(i,s)||l?.()?null:e.replaceTextRange([i.range[1],s.range[0]],o)})}return{MemberExpression(e){let r,i;if(!(0,rR.isTokenOnSameLine)(e.object,e.property)||(e.computed?(r=t.getTokenBefore(e.property,rR.isOpeningBracketToken),i=t.getTokenBefore(r,+!!e.optional)):(r=t.getFirstToken(e.property),i=t.getTokenBefore(r,1)),!t.isSpaceBetween(i,r)))return;let s="";e.optional?s="?.":e.computed||(s="."),n({node:e,leftToken:i,rightToken:r,propName:t.getText(e.property),replacementText:s,preventAutoFix:()=>!e.computed&&!e.optional&&rk(e.object)})},TSIndexedAccessType(e){let r=e.objectType,i=t.getTokenBefore(e.indexType);t.isSpaceBetween(r,i)&&n({node:e,leftToken:r,rightToken:i,propName:t.getText(e.indexType)})},TSQualifiedName(e){let r=e.left,i=e.right;t.isSpaceBetween(r,i)&&n({node:e,leftToken:r,rightToken:i,replacementText:".",propName:t.getText(e.right)})},TSImportType(e){if(!e.qualifier)return;let r=e.qualifier,i=t.getTokenBefore(r,1);t.isSpaceBetween(i,r)&&n({node:e,leftToken:i,rightToken:r,replacementText:".",propName:t.getText(e.qualifier)})}}}});let s9={type:"string",enum:["beside","below","any"]};var s8=r$({name:"nonblock-statement-body-position",meta:{type:"layout",docs:{description:"Enforce the location of single-line statements"},fixable:"whitespace",schema:[s9,{type:"object",properties:{overrides:{type:"object",properties:{if:s9,else:s9,while:s9,do:s9,for:s9},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,rR.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")}}});let s7={oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]},ae={multiline:!1,minProperties:1/0,consistent:!0};var at=r$({name:"object-curly-newline",meta:{type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces"},fixable:"whitespace",schema:[{oneOf:[s7,{type:"object",properties:{ObjectExpression:s7,ObjectPattern:s7,ImportDeclaration:s7,ExportDeclaration:s7,TSTypeLiteral:s7,TSInterfaceBody:s7,TSEnumBody:s7},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:ae,ObjectPattern:ae,ImportDeclaration:ae,ExportDeclaration:ae,TSTypeLiteral:ae,TSInterfaceBody:ae}],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}),f=(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,rR.isTokenOnSameLine)(i,r)),d=(0,rR.isCommentToken)(c),m=(0,rR.isCommentToken)(u);if(c=t.getTokenAfter(p),u=t.getTokenBefore(a),f)(0,rR.isTokenOnSameLine)(p,c)&&e.report({messageId:"expectedLinebreakAfterOpeningBrace",node:n,loc:p.loc,fix:e=>d?null:e.insertTextAfter(p,"\n")}),(0,rR.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,rR.isTokenOnSameLine)(p,c),i=!(0,rR.isTokenOnSameLine)(u,a);(!t&&r||t&&r&&!i)&&e.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:n,loc:p.loc,fix:e=>d?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}}}),an=r$({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"},overrides:{type:"object",properties:Object.fromEntries(["ObjectPattern","ObjectExpression","ImportDeclaration","ImportAttributes","ExportNamedDeclaration","ExportAllDeclaration","TSMappedType","TSTypeLiteral","TSInterfaceBody","TSEnumBody"].map(e=>[e,{type:"string",enum:["always","never"]}])),additionalProperties:!1},emptyObjects:{type:"string",enum:["ignore","always","never"]}},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}}'.",requiredSpaceInEmptyObject:"A space is required in empty '{{node}}'.",unexpectedSpaceInEmptyObject:"There should be no space in empty '{{node}}'."}},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"),overrides:n?.overrides??{},emptyObjects:n?.emptyObjects??"ignore"};function o(t,n,r,s=t.type){let l=i.getTokenAfter(n,{includeComments:!0}),p=a.overrides[s]?"always"===a.overrides[s]:a.spaced;if((0,rR.isTokenOnSameLine)(n,l)){let r,s=i.isSpaceBetween(n,l),o=i.getNodeByRangeIndex(l.range[0]).type,c=a.arraysInObjectsException&&[tr.AST_NODE_TYPES.TSMappedType,tr.AST_NODE_TYPES.TSIndexSignature].includes(o)?!p:p;c&&!s&&e.report({node:t,loc:n.loc,messageId:"requireSpaceAfter",data:{token:n.value},fix:e=>e.insertTextAfter(n," ")}),!c&&s&&l.type!==tr.AST_TOKEN_TYPES.Line&&(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]])}))}let c=i.getTokenBefore(r,{includeComments:!0});if((0,rR.isTokenOnSameLine)(c,r)){let n,s=a.arraysInObjectsException&&(0,rR.isClosingBracketToken)(c)||a.objectsInObjectsException&&(0,rR.isClosingBraceToken)(c)?i.getNodeByRangeIndex(c.range[0]).type:void 0,o=a.arraysInObjectsException&&[tr.AST_NODE_TYPES.ArrayExpression,tr.AST_NODE_TYPES.TSTupleType].includes(s)||a.objectsInObjectsException&&void 0!==s&&[tr.AST_NODE_TYPES.ObjectExpression,tr.AST_NODE_TYPES.ObjectPattern,tr.AST_NODE_TYPES.TSMappedType,tr.AST_NODE_TYPES.TSTypeLiteral].includes(s)?!p:p,l=i.isSpaceBetween(c,r);o&&!l&&e.report({node:t,loc:r.loc,messageId:"requireSpaceBefore",data:{token:r.value},fix:e=>e.insertTextBefore(r," ")}),!o&&l&&(n=i.getTokenBefore(r,{includeComments:!0}),e.report({node:t,loc:{start:n.loc.end,end:r.loc.start},messageId:"unexpectedSpaceBefore",data:{token:r.value},fix:e=>e.removeRange([n.range[1],r.range[0]])}))}}function l(t,n,r=t.type){let[s,p]=function(e,t=e.type){switch(t){case"ImportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":{let t=i.getTokens(e);return[t.find(e=>(0,rR.isOpeningBraceToken)(e)),t.find(e=>(0,rR.isClosingBraceToken)(e))]}case"ImportAttributes":{let t=i.getTokens(e),n=t.findLast(e=>(0,rR.isOpeningBraceToken)(e)),r=t.findLast(e=>(0,rR.isClosingBraceToken)(e));if(!n||!r||!e.source||n.range[0]<e.source.range[0])return[null,null];return[n,r]}case"ObjectPattern":case"ObjectExpression":case"TSMappedType":case"TSTypeLiteral":case"TSInterfaceBody":case"TSEnumBody":{let t=i.getTokens(e);return[t.find(e=>(0,rR.isOpeningBraceToken)(e)),t.findLast(e=>(0,rR.isClosingBraceToken)(e))]}default:throw Error(`Unsupported node type: ${t}`)}}(t,r);if(s&&p){if(0===n.length)return void function(t,n,r,s=t.type){if("ignore"===a.emptyObjects||!(0,rR.isTokenOnSameLine)(n,r)||i.commentsExistBetween(n,r))return;let o=i.getText().slice(n.range[0]+1,r.range[1]-1);if(""===o.trim()){if("always"===a.emptyObjects){if(" "===o)return;e.report({node:t,loc:{start:n.loc.end,end:r.loc.start},messageId:"requiredSpaceInEmptyObject",data:{node:s},fix:e=>e.replaceTextRange([n.range[1],r.range[0]]," ")})}else if("never"===a.emptyObjects){if(""===o)return;e.report({node:t,loc:{start:n.loc.end,end:r.loc.start},messageId:"unexpectedSpaceInEmptyObject",data:{node:s},fix:e=>e.removeRange([n.range[1],r.range[0]])})}}}(t,s,p,r);o(t,s,p,r)}}return{ObjectPattern(e){l(e,e.properties)},ObjectExpression(e){l(e,e.properties)},ImportDeclaration(e){e.attributes&&l(e,e.attributes,"ImportAttributes");let t=e.specifiers.findIndex(e=>"ImportSpecifier"===e.type);-1===t?l(e,[]):l(e,e.specifiers.slice(t))},ExportNamedDeclaration(e){l(e,e.specifiers),e.attributes&&l(e,e.attributes,"ImportAttributes")},ExportAllDeclaration(e){e.attributes&&l(e,e.attributes,"ImportAttributes")},TSMappedType(e){o(e,i.getFirstToken(e),i.getLastToken(e))},TSTypeLiteral(e){l(e,e.members)},TSInterfaceBody(e){l(e,e.body)},TSEnumBody(e){l(e,e.members)}}}}),ar=r$({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&&(0,rR.isTokenOnSameLine)(r.getFirstToken(s[0]),r.getLastToken(s[s.length-1]))))for(let t=1;t<s.length;t++){let a=r.getLastToken(s[t-1]),o=r.getFirstToken(s[t]);(0,rR.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)}}}}),ai=r$({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,rR.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}
24
+ `)}e.report({node:r,messageId:"expectVarOnNewline",loc:i.loc,fix:n})}s=i})}}}}),as=r$({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,f=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,rR.isTokenOnSameLine)(r,o);if(!(0,rR.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=rn();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,rR.isTokenOnSameLine)(l,o)&&(0,rR.isTokenOnSameLine)(o,p)||("ignore"===c||(0,rR.isTokenOnSameLine)(l,o)||(0,rR.isTokenOnSameLine)(o,p)?"before"===u&&(0,rR.isTokenOnSameLine)(l,o)?e.report({node:t,loc:o.loc,messageId:"operatorAtBeginning",data:{operator:a},fix:f}):"after"===u&&(0,rR.isTokenOnSameLine)(o,p)?e.report({node:t,loc:o.loc,messageId:"operatorAtEnd",data:{operator:a},fix:f}):"none"===u&&e.report({node:t,loc:o.loc,messageId:"noLinebreak",data:{operator:a},fix:f}):e.report({node:t,loc:o.loc,messageId:"badLinebreak",data:{operator:a},fix:f}))}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,"=")}}}});let aa=["always","never","start","end"];var ao=r$({name:"padded-blocks",meta:{type:"layout",docs:{description:"Require or disallow padding within blocks"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:aa},{type:"object",properties:{blocks:{type:"string",enum:aa},switches:{type:"string",enum:aa},classes:{type:"string",enum:aa}},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,rR.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,rR.isTokenOnSameLine)(n,t));return n}(i.getLastToken(n)),c=i.getTokenAfter(p,{includeComments:!0}),u=a(l,o),f=a(p,c);if(r.allowSingleLineBlocks&&(0,rR.isTokenOnSameLine)(l,c))return;let d=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"===d||"end"===d)&&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"===d||"start"===d)&&e.report({node:n,loc:{start:l.loc.start,end:o.loc.start},fix:e=>e.insertTextAfter(l,"\n"),messageId:"missingPadBlock"}),f?("never"===d||"start"===d)&&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"===d||"end"===d)&&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.hasOwn(t,"switches")&&(l.SwitchStatement=function(e){0!==e.cases.length&&o(e)}),Object.hasOwn(t,"blocks")&&(l.BlockStatement=function(e){0!==e.body.length&&o(e)},l.StaticBlock=l.BlockStatement),Object.hasOwn(t,"classes")&&(l.ClassBody=function(e){0!==e.body.length&&o(e)}),l}});let al=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,ap=/^require\(/u,ac=`[${Array.from(n4).join("")}]`,au=RegExp(String.raw`^(\s*?${ac})\s*${ac}(\s*;?)$`,"u");function af(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 ad(e){return{test:t=>t.type===e}}function am(e){if(e.type===tr.AST_NODE_TYPES.ExpressionStatement){let t=rl(e.expression);if(t.type===tr.AST_NODE_TYPES.UnaryExpression&&(t=rl(t.argument)),t.type===tr.AST_NODE_TYPES.CallExpression){let e=t.callee;for(;e.type===tr.AST_NODE_TYPES.SequenceExpression;)e=e.expressions[e.expressions.length-1];return(0,rR.isFunction)(e)}}return!1}function ah(e,t){return rx(e)&&e.expression.type===tr.AST_NODE_TYPES.Literal&&"string"==typeof e.expression.value&&!(0,rR.isParenthesized)(e.expression,t)}function ag(e,t){if(ah(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(!ah(n,t))return!1}return!0}return!1}function ay(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,rR.isSemicolonToken)(n)&&!(0,rR.isTokenOnSameLine)(r,n)&&(0,rR.isTokenOnSameLine)(n,i)?r:n}function ax(e,t,n){return t+n}function aT(e,t){if(rB(e))return e.loc;let n=e.loc.start.line;return{start:e.loc.start,end:{line:n,column:t.lines[n-1].length}}}let aS={any:{verify:function(){}},never:{verify:function(e,t,n,r){0!==r.length&&e.report({node:n,messageId:"unexpectedBlankLine",loc:aT(n,e.sourceCode),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.sourceCode.text.slice(s,a).replace(au,ax);return t.replaceTextRange([s,a],o)}})}},always:{verify:function(e,t,n,r){r.length>0||e.report({node:n,messageId:"expectedBlankLine",loc:aT(n,e.sourceCode),fix(r){let i=e.sourceCode,s=ay(t,i),a=i.getFirstTokenBetween(s,n,{includeComments:!0,filter:e=>!(0,rR.isTokenOnSameLine)(s,e)||(s=e,!1)})||n,o=(0,rR.isTokenOnSameLine)(s,a)?"\n\n":"\n";return r.insertTextAfter(s,o)}})}}},ab={"block-like":{test:function(e,t){if(e.type===tr.AST_NODE_TYPES.DoWhileStatement&&e.body.type===tr.AST_NODE_TYPES.BlockStatement||am(e))return!0;let n=t.getLastToken(e,rR.isNotSemicolonToken),r=n&&(0,rR.isClosingBraceToken)(n)?t.getNodeByRangeIndex(n.range[0]):null;return!!r&&(r.type===tr.AST_NODE_TYPES.BlockStatement||r.type===tr.AST_NODE_TYPES.SwitchStatement)}},expression:{test:function(e,t){return e.type===tr.AST_NODE_TYPES.ExpressionStatement&&!ag(e,t)}},return:af(tr.AST_NODE_TYPES.ReturnStatement,"return"),export:af([tr.AST_NODE_TYPES.ExportAllDeclaration,tr.AST_NODE_TYPES.ExportDefaultDeclaration,tr.AST_NODE_TYPES.ExportNamedDeclaration],"export"),var:af(tr.AST_NODE_TYPES.VariableDeclaration,"var"),let:af(tr.AST_NODE_TYPES.VariableDeclaration,"let"),const:af(tr.AST_NODE_TYPES.VariableDeclaration,"const"),using:{test:e=>"VariableDeclaration"===e.type&&("using"===e.kind||"await using"===e.kind)},type:af(tr.AST_NODE_TYPES.TSTypeAliasDeclaration,"type")},aE={"*":{test:()=>!0},exports:{test:function(e){if(e.type===tr.AST_NODE_TYPES.ExpressionStatement){let t=e.expression;if(t.type===tr.AST_NODE_TYPES.AssignmentExpression){let e=t.left;if(e.type===tr.AST_NODE_TYPES.MemberExpression){for(;e.object.type===tr.AST_NODE_TYPES.MemberExpression;)e=e.object;return e.object.type===tr.AST_NODE_TYPES.Identifier&&("exports"===e.object.name||"module"===e.object.name&&e.property.type===tr.AST_NODE_TYPES.Identifier&&"exports"===e.property.name)}}}return!1}},require:{test:function(e){if(e.type===tr.AST_NODE_TYPES.VariableDeclaration){let t=e.declarations[0];if(t?.init){let e=t?.init;for(;e.type===tr.AST_NODE_TYPES.MemberExpression;)e=e.object;if(e.type===tr.AST_NODE_TYPES.CallExpression&&e.callee.type===tr.AST_NODE_TYPES.Identifier)return"require"===e.callee.name}}return!1}},directive:{test:ag},iife:{test:am},block:ad(tr.AST_NODE_TYPES.BlockStatement),empty:ad(tr.AST_NODE_TYPES.EmptyStatement),function:ad(tr.AST_NODE_TYPES.FunctionDeclaration),"ts-method":ad(tr.AST_NODE_TYPES.TSMethodSignature),break:af(tr.AST_NODE_TYPES.BreakStatement,"break"),case:af(tr.AST_NODE_TYPES.SwitchCase,"case"),class:af(tr.AST_NODE_TYPES.ClassDeclaration,"class"),continue:af(tr.AST_NODE_TYPES.ContinueStatement,"continue"),debugger:af(tr.AST_NODE_TYPES.DebuggerStatement,"debugger"),default:af([tr.AST_NODE_TYPES.SwitchCase,tr.AST_NODE_TYPES.ExportDefaultDeclaration],"default"),do:af(tr.AST_NODE_TYPES.DoWhileStatement,"do"),for:af([tr.AST_NODE_TYPES.ForStatement,tr.AST_NODE_TYPES.ForInStatement,tr.AST_NODE_TYPES.ForOfStatement],"for"),if:af(tr.AST_NODE_TYPES.IfStatement,"if"),import:af(tr.AST_NODE_TYPES.ImportDeclaration,"import"),switch:af(tr.AST_NODE_TYPES.SwitchStatement,"switch"),throw:af(tr.AST_NODE_TYPES.ThrowStatement,"throw"),try:af(tr.AST_NODE_TYPES.TryStatement,"try"),while:af([tr.AST_NODE_TYPES.WhileStatement,tr.AST_NODE_TYPES.DoWhileStatement],"while"),with:af(tr.AST_NODE_TYPES.WithStatement,"with"),"cjs-export":{test:(e,t)=>"ExpressionStatement"===e.type&&"AssignmentExpression"===e.expression.type&&al.test(t.getText(e.expression.left))},"cjs-import":{test:(e,t)=>"VariableDeclaration"===e.type&&e.declarations.length>0&&!!e.declarations[0].init&&ap.test(t.getText(e.declarations[0].init))},enum:af(tr.AST_NODE_TYPES.TSEnumDeclaration,"enum"),interface:af(tr.AST_NODE_TYPES.TSInterfaceDeclaration,"interface"),"function-overload":ad(tr.AST_NODE_TYPES.TSDeclareFunction),...Object.fromEntries(Object.entries(ab).flatMap(([e,t])=>[[e,t],[`singleline-${e}`,{...t,test:(e,n)=>t.test(e,n)&&rB(e)}],[`multiline-${e}`,{...t,test:(e,n)=>t.test(e,n)&&!rB(e)}]]))};var ak=r$({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(aS)},statementType:{type:"string",enum:Object.keys(aE)},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===tr.AST_NODE_TYPES.LabeledStatement;)r=r.body;return Array.isArray(n)?n.some(a.bind(null,r)):aE[n].test(r,t)}function o(i){if(!i.parent||![tr.AST_NODE_TYPES.BlockStatement,tr.AST_NODE_TYPES.Program,tr.AST_NODE_TYPES.StaticBlock,tr.AST_NODE_TYPES.SwitchCase,tr.AST_NODE_TYPES.SwitchStatement,tr.AST_NODE_TYPES.TSInterfaceBody,tr.AST_NODE_TYPES.TSModuleBlock,tr.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 aS[i.blankLine]}return aS.any}(s,i),o=function(e,n){let r=[],i=ay(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}}}),av=r$({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 re.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 rT(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=nK(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&&rA(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 f(e,t){m(e.filter(e=>"SpreadElement"!==e.type&&e.key&&!e.method&&!e.computed&&!e.shorthand),t)}function d(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=nK(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&&f(e.properties,!1),"consistent-as-needed"===t&&f(e.properties,!0)},ImportAttribute(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},ImportDeclaration(e){d(e.attributes)},ExportAllDeclaration(e){d(e.attributes)},ExportNamedDeclaration(e){d(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&&f(e.members,!1),"consistent-as-needed"===t&&f(e.members,!0)},TSInterfaceBody(e){"consistent"===t&&f(e.body,!1),"consistent-as-needed"===t&&f(e.body,!0)},TSEnumDeclaration(e){let n=(e.body?.members||e.members).map(e=>({...e,key:e.id}));"consistent"===t&&f(n,!1),"consistent-as-needed"===t&&f(n,!0)}}}});function aw(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}let aA={double:{quote:'"',alternateQuote:"'",description:"doublequote",convert:aw},single:{quote:"'",alternateQuote:'"',description:"singlequote",convert:aw},backtick:{quote:"`",alternateQuote:'"',description:"backtick",convert:aw}},aC=RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(n4).join("")}]`,"u"),a_="avoid-escape";var aO=r$({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=aA[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&&(n1('value(boolean) for "allowTemplateLiterals"','"always"/"never"',"quotes"),o=!0===r.allowTemplateLiterals,l=!0===r.allowTemplateLiterals)):r===a_&&(n1(`option("${a_}")`,'"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 tr.AST_NODE_TYPES.ExpressionStatement:return!rp(i,e)&&function(e){if(!e.parent||!rx(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&&!rp(i,r.expression)))break}return!1}(e);case tr.AST_NODE_TYPES.Property:case tr.AST_NODE_TYPES.MethodDefinition:return t.key===e&&!t.computed;case tr.AST_NODE_TYPES.ImportDeclaration:case tr.AST_NODE_TYPES.ExportNamedDeclaration:return t.source===e;case tr.AST_NODE_TYPES.ExportAllDeclaration:return t.exported===e||t.source===e;case tr.AST_NODE_TYPES.ImportSpecifier:return t.imported===e;case tr.AST_NODE_TYPES.ExportSpecifier:return t.local===e||t.exported===e;case tr.AST_NODE_TYPES.ImportAttribute:return t.value===e;case tr.AST_NODE_TYPES.TSAbstractMethodDefinition:case tr.AST_NODE_TYPES.TSMethodSignature:case tr.AST_NODE_TYPES.TSPropertySignature:case tr.AST_NODE_TYPES.TSModuleDeclaration:case tr.AST_NODE_TYPES.TSExternalModuleReference:return!0;case tr.AST_NODE_TYPES.TSEnumMember:return e===t.id;case tr.AST_NODE_TYPES.TSAbstractPropertyDefinition:case tr.AST_NODE_TYPES.PropertyDefinition:case tr.AST_NODE_TYPES.AccessorProperty:return t.key===e&&!t.computed;case tr.AST_NODE_TYPES.TSLiteralType:return t.parent?.type===tr.AST_NODE_TYPES.TSImportType;default:return!1}}(r)||!!r.parent&&("JSXAttribute"===r.parent.type||"JSXElement"===r.parent.type||"JSXFragment"===r.parent.type)||rb(l,n.quote);!a&&s&&(a=rb(l,n.alternateQuote)&&l.includes(n.quote)),a||e.report({node:r,messageId:"wrongQuotes",data:{description:n.description},fix:e=>"backtick"===t&&r_(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&&aC.test(r.quasis[0].value.raw)||0||l&&s&&i.getText(r).includes(n.quote)||e.report({node:r,messageId:"wrongQuotes",data:{description:n.description},fix:e=>rx(r.parent)&&!rp(i,r)?null:e.replaceText(r,n.convert(i.getText(r)))})}}}}),aP=r$({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}}}),aI=r$({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,rR.isSemicolonToken)(t)){let a,o,l,p;if((a=n.getTokenBefore(t))&&(0,rR.isTokenOnSameLine)(a,t)&&n.isSpaceBetween(a,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((o=n.getTokenBefore(t))&&(0,rR.isTokenOnSameLine)(t,o)&&(l=n.getTokenAfter(t))&&(0,rR.isTokenOnSameLine)(t,l)&&!((p=n.getTokenAfter(t))&&(0,rR.isClosingBraceToken)(p)||(0,rR.isClosingParenToken)(p))){let r;if((r=n.getTokenAfter(t))&&(0,rR.isTokenOnSameLine)(t,r)&&n.isSpaceBetween(t,r)){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([tr.AST_NODE_TYPES.TSDeclareFunction]);e.parent&&!t.has(e.parent.type)&&a(e.parent)}}}}),aN=r$({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,rR.isTokenOnSameLine)(i,n),o=!s||(0,rR.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){var t;let n;if(!e.parent)return!0;let r=e.parent.type;if("IfStatement"===r&&e.parent.consequent===e&&e.parent.alternate||"DoWhileStatement"===r)return!0;let i="BlockStatement"===(n=(t=e.parent).type)||"StaticBlock"===n||"Program"===n||"ClassBody"===n?t.body:"SwitchCase"===n?t.consequent:null;return null!==i&&i[i.length-1]===e}(e))return;let i=t.getLastToken(e);(0,rR.isSemicolonToken)(i)&&r(i,n)},ForStatement(e){let n=e.init&&t.getTokenAfter(e.init,rR.isSemicolonToken),i=e.test&&t.getTokenAfter(e.test,rR.isSemicolonToken);n&&r(n,"last"),i&&r(i,"last")}}}}),aL=r$({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 rW(e,p).retainSurroundingTokens(s).remove(s)}):(i={start:s.loc.end,end:rw(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 f(e){let t=(0,rR.isSemicolonToken)(p.getLastToken(e));if(s){let i=p.getTokenAfter(e);t&&function(e){var t;let i,s,a,o;return t=p.getLastToken(e),!!(!(i=p.getTokenAfter(t))||(0,rR.isClosingBraceToken)(i)||(0,rR.isSemicolonToken)(i))||!(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)||(s=p.getLastToken(e,1),(a=p.getTokenAfter(e))&&(0,rR.isTokenOnSameLine)(s,a)))&&!(("PropertyDefinition"===e.type||"never"!==l||"DoWhileStatement"!==(o=e.type)&&"BreakStatement"!==o&&"ContinueStatement"!==o&&"DebuggerStatement"!==o&&"ImportDeclaration"!==o&&"ExportAllDeclaration"!==o&&("ReturnStatement"===o?e.argument:"ExportNamedDeclaration"===o?e.declaration:!function(e){if(!(0,rR.isClosingBraceToken)(e))return!1;let t=p.getNodeByRangeIndex(e.range[0]);return"BlockStatement"===t.type&&"ArrowFunctionExpression"===t.parent.type}(p.getLastToken(e,1))))&&u(p.getTokenAfter(e)))}(e)?c(e,!0):!t&&"always"===l&&"PropertyDefinition"!==e.type&&u(i)&&c(e)}else{let n,r,i,s,l=a&&(n=e.parent,!!(r=p.getTokenAfter(e))&&"}"===r.value&&("BlockStatement"===n.type?rB(n):"StaticBlock"===n.type&&(0,rR.isTokenOnSameLine)(n,p.getFirstToken(n,{skip:1})))),u=o&&(i=e.parent,!!(s=p.getTokenAfter(e))&&"}"===s.value&&"ClassBody"===i.type&&rB(i)),f=l||u;t&&f?c(e,!0):t||f||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||f(e)},ExpressionStatement:f,ReturnStatement:f,ThrowStatement:f,DoWhileStatement:f,DebuggerStatement:f,BreakStatement:f,ContinueStatement:f,ImportDeclaration:f,ExportAllDeclaration:f,ExportNamedDeclaration(e){e.declaration||f(e)},ExportDefaultDeclaration(e){e.declaration.type!==tr.AST_NODE_TYPES.TSInterfaceDeclaration&&(/(?:Class|Function)Declaration/u.test(e.declaration.type)||f(e))},PropertyDefinition:f,AccessorProperty:f,TSAbstractPropertyDefinition:f,TSDeclareFunction:f,TSExportAssignment:f,TSImportEqualsDeclaration:f,TSTypeAliasDeclaration:f,TSEmptyBodyFunctionExpression:f}}}),aB=r$({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,rR.isFunction)(t)&&t.body===e}function f(t){let f=n.getTokenBefore(t);if(f&&!((0,rR.isArrowToken)(f)||rf(f)&&!u(t)||(0,rR.isColonToken)(f)&&"parent"in t&&t.parent&&"SwitchCase"===t.parent.type&&f===ry(t.parent,n))&&(0,rR.isTokenOnSameLine)(f,t)){let d,m,h=n.isSpaceBetween(f,t);u(t)?(d=r,m=o):"ClassBody"===t.type||"TSEnumBody"===t.type||"TSInterfaceBody"===t.type?(d=s,m=p):"TSModuleBlock"===t.type?(d=a,m=c):(d=i,m=l),d&&!h?e.report({node:t,messageId:"missingSpace",fix:e=>e.insertTextBefore(t," ")}):m&&h&&e.report({node:t,messageId:"unexpectedSpace",fix:e=>e.removeRange([f.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:f,ClassBody:f,SwitchStatement(e){let t=e.cases;f(t.length>0?n.getTokenBefore(t[0]):n.getLastToken(e,1))},TSEnumBody:f,TSInterfaceBody:f,TSModuleBlock:f}}}),aD=r$({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===tr.AST_NODE_TYPES.ArrowFunctionExpression){if(e.async&&(0,rR.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===tr.AST_NODE_TYPES.MethodDefinition||t.type===tr.AST_NODE_TYPES.TSAbstractMethodDefinition||t.type===tr.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,rR.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,rR.isOpeningParenToken);a(e,n.getTokenBefore(s),s,t)}}}}),aj=r$({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){let l,p;l=[],p=[],r.braceException&&(l.push("{"),p.push("}")),r.bracketException&&(l.push("["),p.push("]")),r.parenException&&(l.push("("),p.push(")")),r.empty&&(l.push(")"),p.push("(")),i={openers:l,closers:p};let c=s.tokensAndComments;c.forEach((i,l)=>{let p=c[l-1],u=c[l+1];((0,rR.isOpeningParenToken)(i)||(0,rR.isClosingParenToken)(i))&&("("===i.value&&!(s.isSpaceBetween(i,u)||!r.empty&&(0,rR.isClosingParenToken)(u))&&(t?!a(u):a(u))&&e.report({node:n,loc:i.loc,messageId:"missingOpeningSpace",fix:e=>e.insertTextAfter(i," ")}),"("===i.value&&(0,rR.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(p,i)||!r.empty&&(0,rR.isOpeningParenToken)(p))&&(t?!o(p):o(p))&&e.report({node:n,loc:i.loc,messageId:"missingClosingSpace",fix:e=>e.insertTextBefore(i," ")}),")"===i.value&&(0,rR.isTokenOnSameLine)(p,i)&&s.isSpaceBetween(p,i)&&(t?o(p):!o(p))&&e.report({node:n,loc:{start:p.loc.end,end:i.loc.start},messageId:"rejectedClosingSpace",fix:e=>e.removeRange([p.range[1],i.range[0]])}))})}}}});let aR=["|","&"];var aF=r$({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,[t]){let{int32Hint:n,ignoreTypes:r}=t,i=e.sourceCode;function s(t,n){e.report({node:t,loc:n.loc,messageId:"missingSpace",data:{operator:n.value},fix(e){let t=i.getTokenBefore(n),r=i.getTokenAfter(n),s="";return n.range[0]-t.range[1]==0&&(s=" "),s+=n.value,r.range[0]-n.range[1]==0&&(s+=" "),e.replaceText(n,s)}})}function a(e){var t;let r,a,o,l="typeAnnotation"in e.left&&e.left.typeAnnotation?e.left.typeAnnotation:e.left,p=e.right,c=(t="operator"in e&&e.operator?e.operator:"=",r=i.getFirstTokenBetween(l,p,e=>e.value===t),a=i.getTokenBefore(r),o=i.getTokenAfter(r),i.isSpaceBetween(a,r)&&i.isSpaceBetween(r,o)?null:r);c&&!(n&&i.getText(e).endsWith("|0"))&&s(e,c)}function o(e){return e.type===tr.AST_TOKEN_TYPES.Punctuator&&/^[=?:]$/.test(e.value)}function l(e,t,n){if(!n||!t)return;let r=i.getFirstTokenBetween(t,n,o),a=i.getTokenBefore(r),l=i.getTokenAfter(r);i.isSpaceBetween(a,r)&&i.isSpaceBetween(r,l)||s(e,r)}function p(e){l(e,e.optional&&!e.typeAnnotation?i.getTokenAfter(e.key):e.typeAnnotation??e.key,e.value)}function c(e){e.types.forEach(t=>{let n=t.type===tr.AST_NODE_TYPES.TSFunctionType?rR.isNotOpeningParenToken:0,a=i.getTokenBefore(t,n);if(!r&&null!=a&&aR.includes(a.value)){let t=i.getTokenBefore(a),n=i.getTokenAfter(a);i.isSpaceBetween(t,a)&&i.isSpaceBetween(a,n)||s(e,a)}})}return{AssignmentExpression:a,AssignmentPattern:a,BinaryExpression:a,LogicalExpression:a,ConditionalExpression(e){l(e,e.test,e.consequent),l(e,e.consequent,e.alternate)},VariableDeclarator(e){l(e,e.id.typeAnnotation??e.id,e.init)},PropertyDefinition:p,AccessorProperty:p,TSEnumMember(e){l(e,e.id,e.initializer)},TSTypeAliasDeclaration(e){l(e,e.typeParameters??e.id,e.typeAnnotation)},TSUnionType:c,TSIntersectionType:c,TSConditionalType(e){l(e,e.extendsType,e.trueType),l(e,e.trueType,e.falseType)}}}}),aM=r$({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.hasOwn(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," ")}):rC(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=>rC(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)&&rf(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 a$(e){return`(?:${function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e)})`}function aV(e){return`${a$(e)}+`}function aq(e){let t="";return 0===e.length?t+="\\s":(t+="(?:\\s|",1===e.length?t+=aV(e[0]):(t+="(?:",t+=e.map(aV).join("|"),t+=")"),t+=`(?:$|[${Array.from(n4).join("")}]))`),t}var aY=r$({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+=a$(o[0]):(a+="(?:",a+=o.map(a$).join("|"),a+=")"),a+="?",RegExp(a+=aq(l),"u")):RegExp(`^(${o.map(a$).join("|")})?[ ]+`,"u"),endRegex:i&&n?RegExp(`${aq(l)}$`,"u"):RegExp("[ ]+$","u"),hasExceptions:l.length>0,captureMarker:RegExp(`^(${o.map(a$).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=>{rd(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)})}}}}),aX=r$({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,rR.isClosingBraceToken)(n)||!(0,rR.isTokenOnSameLine)(e,n)||t.isSpaceBetween(e,n)===r}function a(e,n,r,i){return rD(t,n,r)?null:i?e.insertTextAfter(n," "):e.removeRange([n.range[1],r.range[0]])}return{SwitchCase(n){let o=ry(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)})}}}}),aJ=r$({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,rR.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,rR.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)}}}}),aU=r$({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," ")})}}}}),aW=r$({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,i,s,a=[":","=>"],o=e.sourceCode,l=(n={...t?.before!==void 0?{before:t.before}:{},...t?.after!==void 0?{after:t.after}:{}},r=t?.overrides??{},i={before:!1,after:!0,...n,...r?.colon},s={before:!0,after:!0,...n,...r?.arrow},Object.hasOwn(r,"arrow")&&n1('options("overrides.arrow")','"arrow-spacing"',"type-annotation-spacing"),{colon:i,arrow:s,variable:{...i,...r?.variable},property:{...i,...r?.property},parameter:{...i,...r?.parameter},returnType:{...i,...r?.returnType}});function p(t){let n=o.getTokenBefore(t,rR.isNotOpeningParenToken),r=n,i=o.getTokenBefore(n),s=n.value;if(!a.includes(s))return;let{before:p,after:c}=function(e,t){let n=t?.parent?.parent;if((0,rR.isTSFunctionType)(n)||(0,rR.isTSConstructorType)(n))return e.arrow;if((0,rR.isIdentifier)(n)){let t;return t=n?.parent,(0,rR.isVariableDeclarator)(t)?e.variable:(0,rR.isFunctionOrFunctionType)(t)?e.parameter:e.colon}return(0,rR.isClassOrTypeElement)(n)?e.property:(0,rR.isFunction)(n)?e.returnType:e.colon}(l,t);":"===s&&"?"===i.value&&(o.isSpaceBetween(i,r)&&e.report({node:r,messageId:"unexpectedSpaceBetween",data:{type:s,previousToken:i.value},fix:e=>e.removeRange([i.range[1],r.range[0]])}),s="?:",r=i,("+"===(i=o.getTokenBefore(i)).value||"-"===i.value)&&(s=`${i.value}?:`,r=i,i=o.getTokenBefore(i)));let u=o.isSpaceBetween(n,t);c&&!u?e.report({node:n,messageId:"expectedSpaceAfter",data:{type:s},fix:e=>e.insertTextAfter(n," ")}):!c&&u&&e.report({node:n,messageId:"unexpectedSpaceAfter",data:{type:s},fix:e=>e.removeRange([n.range[1],t.range[0]])});let f=o.isSpaceBetween(i,r);p&&!f?e.report({node:r,messageId:"expectedSpaceBefore",data:{type:s},fix:e=>e.insertTextAfter(i," ")}):!p&&f&&e.report({node:r,messageId:"unexpectedSpaceBefore",data:{type:s},fix:e=>e.removeRange([i.range[1],r.range[0]])})}return{TSMappedType(e){e.typeAnnotation&&p(e.typeAnnotation)},TSTypeAnnotation(e){p(e.typeAnnotation)}}}});let aK=new Set(["TSCallSignatureDeclaration","ArrowFunctionExpression","TSFunctionType","TSConstructorType","FunctionExpression","ClassExpression"]);var aH=r$({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;0!==n.length&&r(t.getTokenBefore(n[0]),t.getTokenAfter(n[n.length-1]))},TSTypeParameterDeclaration:n=>{if(!aK.has(n.parent.type)){let r=t.text.slice(0,n.range[0]).match(/(\s+)$/)?.[0];r&&r.length&&e.report({node:n,messageId:"genericSpacingMismatch",*fix(e){yield e.replaceTextRange([n.range[0]-r.length,n.range[0]],"")}})}let i=n.params;0!==i.length&&r(t.getTokenBefore(i[0]),t.getTokenAfter(i[i.length-1]))},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})}}}});let az=/^([\w$]+)(\s*)(\?\s*)?:(\s*)(.*)$/;var aG={rules:{"array-bracket-newline":rK,"array-bracket-spacing":rH,"array-element-newline":rz,"arrow-parens":rG,"arrow-spacing":rQ,"block-spacing":rZ,"brace-style":r0,"comma-dangle":r2,"comma-spacing":r3,"comma-style":r6,"computed-property-spacing":r4,"curly-newline":ii,"dot-location":is,"eol-last":ia,"function-call-argument-newline":io,"function-call-spacing":il,"function-paren-newline":ip,"generator-star-spacing":iu,"implicit-arrow-linebreak":id,indent:iS,"indent-binary-ops":im,"jsx-child-element-spacing":iE,"jsx-closing-bracket-location":ik,"jsx-closing-tag-location":iA,"jsx-curly-brace-presence":iN,"jsx-curly-newline":iL,"jsx-curly-spacing":iM,"jsx-equals-spacing":i$,"jsx-first-prop-new-line":iV,"jsx-function-call-newline":iq,"jsx-indent":iX,"jsx-indent-props":iY,"jsx-max-props-per-line":iJ,"jsx-newline":iU,"jsx-one-expression-per-line":iK,"jsx-pascal-case":i1,"jsx-props-no-multi-spaces":i2,"jsx-quotes":i6,"jsx-self-closing-comp":i5,"jsx-sort-props":sr,"jsx-tag-spacing":sl,"jsx-wrap-multilines":sc,"key-spacing":sf,"keyword-spacing":sS,"line-comment-position":sb,"linebreak-style":sE,"lines-around-comment":sk,"lines-between-class-members":sw,"exp-list-style":sA,"max-len":sO,"max-statements-per-line":sI,"member-delimiter-style":sL,"multiline-comment-style":sB,"multiline-ternary":sD,"new-parens":sj,"newline-per-chained-call":sR,"no-confusing-arrow":sF,"no-extra-parens":s$,"no-extra-semi":sV,"no-floating-decimal":sq,"no-mixed-operators":sQ,"no-mixed-spaces-and-tabs":sZ,"no-multi-spaces":s0,"no-multiple-empty-lines":s1,"no-tabs":s6,"no-trailing-spaces":s4,"no-whitespace-before-property":s5,"nonblock-statement-body-position":s8,"object-curly-newline":at,"object-curly-spacing":an,"object-property-newline":ar,"one-var-declaration-per-line":ai,"operator-linebreak":as,"padded-blocks":ao,"padding-line-between-statements":ak,"quote-props":av,quotes:aO,"rest-spread-spacing":aP,semi:aL,"semi-spacing":aI,"semi-style":aN,"space-before-blocks":aB,"space-before-function-paren":aD,"space-in-parens":aj,"space-infix-ops":aF,"space-unary-ops":aM,"spaced-comment":aY,"switch-colon-spacing":aX,"template-curly-spacing":aJ,"template-tag-spacing":aU,"type-annotation-spacing":aW,"type-generic-spacing":aH,"type-named-tuple-spacing":r$({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.sourceCode;return{TSNamedTupleMember(n){let r=t.text.slice(n.range[0],n.range[1]),i=r.match(az);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(az,c()))}}),a?.length&&e.report({node:n,messageId:"unexpectedSpaceBefore",*fix(e){yield e.replaceTextRange(n.range,r.replace(az,c()))}}),null!=l&&1!==l.length&&e.report({node:n,messageId:"expectedSpaceAfter",*fix(e){yield e.replaceTextRange(n.range,r.replace(az,c()))}})}}}}),"wrap-iife":r$({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,a="FunctionExpression"===(s=rl(i.callee)).type?s:n&&"MemberExpression"===s.type&&"FunctionExpression"===s.object.type&&("call"===ro(s)||"apply"===ro(s))?s.object:null;if(!a)return;let o=rp(r,i),l=rp(r,a);o||l?"inside"!==t||l?"outside"!==t||o||e.report({node:i,messageId:"moveInvocation",fix(e){let t=r.getTokenAfter(a);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){let t;if((0,rR.isParenthesized)(i,r)&&(t=i.parent?.type==="ChainExpression"?i.parent:i,t.parent?.type!=="NewExpression"||t.parent.callee!==t)){let t=r.getTokenAfter(i);return e.replaceTextRange([a.range[1],t.range[1]],`)${r.getText().slice(a.range[1],t.range[0])}`)}return e.replaceText(a,`(${r.getText(a)})`)}}):e.report({node:i,messageId:"wrapInvocation",fix(e){let n="inside"===t?a:i;return e.replaceText(n,`(${r.getText(n)})`)}})}}}}),"wrap-regex":r$({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":r$({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 aQ(e={}){let{arrowParens:t=!1,blockSpacing:n=!0,braceStyle:r="stroustrup",commaDangle:i="always-multiline",experimental:s=!1,indent:a=2,jsx:o=!0,pluginName:l="@stylistic",quoteProps:p="consistent-as-needed",quotes:c="single",semi:u=!1,severity:f="error"}=e,d={"@stylistic/array-bracket-spacing":[f,"never"],"@stylistic/arrow-parens":[f,t?"always":"as-needed",{requireForBlockBody:!0}],"@stylistic/arrow-spacing":[f,{after:!0,before:!0}],"@stylistic/block-spacing":[f,n?"always":"never"],"@stylistic/brace-style":[f,r,{allowSingleLine:!0}],"@stylistic/comma-dangle":[f,i],"@stylistic/comma-spacing":[f,{after:!0,before:!1}],"@stylistic/comma-style":[f,"last"],"@stylistic/computed-property-spacing":[f,"never",{enforceForClassMembers:!0}],"@stylistic/dot-location":[f,"property"],"@stylistic/eol-last":f,"@stylistic/generator-star-spacing":[f,{after:!0,before:!1}],"@stylistic/indent":[f,a,{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"===a?4:a,VariableDeclarator:1}],"@stylistic/indent-binary-ops":[f,a],"@stylistic/key-spacing":[f,{afterColon:!0,beforeColon:!1}],"@stylistic/keyword-spacing":[f,{after:!0,before:!0}],"@stylistic/lines-between-class-members":[f,"always",{exceptAfterSingleLine:!0}],"@stylistic/max-statements-per-line":[f,{max:1}],"@stylistic/member-delimiter-style":[f,{multiline:{delimiter:u?"semi":"none",requireLast:u},multilineDetection:"brackets",overrides:{interface:{multiline:{delimiter:u?"semi":"none",requireLast:u}}},singleline:{delimiter:u?"semi":"comma"}}],"@stylistic/multiline-ternary":[f,"always-multiline"],"@stylistic/new-parens":f,"@stylistic/no-extra-parens":[f,"functions"],"@stylistic/no-floating-decimal":f,"@stylistic/no-mixed-operators":[f,{allowSamePrecedence:!0,groups:[["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]]}],"@stylistic/no-mixed-spaces-and-tabs":f,"@stylistic/no-multi-spaces":f,"@stylistic/no-multiple-empty-lines":[f,{max:1,maxBOF:0,maxEOF:0}],"@stylistic/no-tabs":"tab"===a?"off":f,"@stylistic/no-trailing-spaces":f,"@stylistic/no-whitespace-before-property":f,"@stylistic/object-curly-spacing":[f,"always"],"@stylistic/operator-linebreak":[f,"before"],"@stylistic/padded-blocks":[f,{blocks:"never",classes:"never",switches:"never"}],"@stylistic/quote-props":[f,p],"@stylistic/quotes":[f,c,{allowTemplateLiterals:"always",avoidEscape:!1}],"@stylistic/rest-spread-spacing":[f,"never"],"@stylistic/semi":[f,u?"always":"never"],"@stylistic/semi-spacing":[f,{after:!0,before:!1}],"@stylistic/space-before-blocks":[f,"always"],"@stylistic/space-before-function-paren":[f,{anonymous:"always",asyncArrow:"always",named:"never"}],"@stylistic/space-in-parens":[f,"never"],"@stylistic/space-infix-ops":f,"@stylistic/space-unary-ops":[f,{nonwords:!1,words:!0}],"@stylistic/spaced-comment":[f,"always",{block:{balanced:!0,exceptions:["*"],markers:["!"]},line:{exceptions:["/","#"],markers:["/"]}}],"@stylistic/template-curly-spacing":f,"@stylistic/template-tag-spacing":[f,"never"],"@stylistic/type-annotation-spacing":[f,{}],"@stylistic/type-generic-spacing":f,"@stylistic/type-named-tuple-spacing":f,"@stylistic/wrap-iife":[f,"any",{functionPrototypeMethods:!0}],"@stylistic/yield-star-spacing":[f,{after:!0,before:!1}],...o?{"@stylistic/jsx-closing-bracket-location":f,"@stylistic/jsx-closing-tag-location":f,"@stylistic/jsx-curly-brace-presence":[f,{propElementValues:"always"}],"@stylistic/jsx-curly-newline":f,"@stylistic/jsx-curly-spacing":[f,"never"],"@stylistic/jsx-equals-spacing":f,"@stylistic/jsx-first-prop-new-line":f,"@stylistic/jsx-function-call-newline":[f,"multiline"],"@stylistic/jsx-indent-props":[f,a],"@stylistic/jsx-max-props-per-line":[f,{maximum:1,when:"multiline"}],"@stylistic/jsx-one-expression-per-line":[f,{allow:"single-child"}],"@stylistic/jsx-quotes":f,"@stylistic/jsx-tag-spacing":[f,{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"@stylistic/jsx-wrap-multilines":[f,{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(s&&(d={...d,"@stylistic/array-bracket-newline":"off","@stylistic/array-bracket-spacing":"off","@stylistic/array-element-newline":"off","@stylistic/exp-list-style":"error","@stylistic/function-call-argument-newline":"off","@stylistic/function-paren-newline":"off","@stylistic/jsx-function-call-newline":"off","@stylistic/object-curly-newline":"off","@stylistic/object-curly-spacing":"off","@stylistic/object-property-newline":"off"}),"@stylistic"!==l){let e=/^@stylistic\//;d=Object.fromEntries(Object.entries(d).map(([t,n])=>[t.replace(e,`${l}/`),n]))}return{plugins:{[l]:aG},rules:d}}let aZ=[/^jsx-/,/^curly-newline$/],a0=(a="@stylistic",o=e=>!aZ.some(t=>t.test(e)),i=Object.fromEntries(Object.entries(aG.rules).filter(([e,t])=>t.meta.fixable&&!t.meta.deprecated&&!t.meta.experimental&&e===t.meta.docs.url.split("/").pop()&&(!o||o(e,t))).map(([e])=>[`${a}/${e}`,2])),{plugins:{[a]:aG},rules:i}),a1=aQ(),a2=Object.assign(aG,{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:aQ,recommended:a1,"recommended-flat":a1,all:a0,"all-flat":a0},{get(e,t,n){let r=t.toString();return r.endsWith("-flat")&&n1(`config("${r}")`,`"${r.replace("-flat","")}"`),Reflect.get(e,t,n)}})});exports.stylistic_eslint_plugin=a2;