import { i as __require, t as __commonJSMin } from "./rolldown-runtime.js";
var require_astUtilities = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __createBinding$6 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		var desc = Object.getOwnPropertyDescriptor(m, k);
		if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
			enumerable: true,
			get: function() {
				return m[k];
			}
		};
		Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		o[k2] = m[k];
	}));
	var __setModuleDefault$4 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
		Object.defineProperty(o, "default", {
			enumerable: true,
			value: v
		});
	}) : function(o, v) {
		o["default"] = v;
	});
	var __importStar$4 = exports && exports.__importStar || (function() {
		var ownKeys = function(o) {
			ownKeys = Object.getOwnPropertyNames || function(o$1) {
				var ar = [];
				for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
				return ar;
			};
			return ownKeys(o);
		};
		return function(mod) {
			if (mod && mod.__esModule) return mod;
			var result = {};
			if (mod != null) {
				for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$6(result, mod, k[i]);
			}
			__setModuleDefault$4(result, mod);
			return result;
		};
	})();
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.isParenthesized = exports.hasSideEffect = exports.getStringIfConstant = exports.getStaticValue = exports.getPropertyName = exports.getFunctionNameWithKind = exports.getFunctionHeadLocation = void 0;
	const eslintUtils$4 = __importStar$4(__require("@eslint-community/eslint-utils"));
	exports.getFunctionHeadLocation = eslintUtils$4.getFunctionHeadLocation;
	exports.getFunctionNameWithKind = eslintUtils$4.getFunctionNameWithKind;
	exports.getPropertyName = eslintUtils$4.getPropertyName;
	exports.getStaticValue = eslintUtils$4.getStaticValue;
	exports.getStringIfConstant = eslintUtils$4.getStringIfConstant;
	exports.hasSideEffect = eslintUtils$4.hasSideEffect;
	exports.isParenthesized = eslintUtils$4.isParenthesized;
}));
var require_PatternMatcher = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __createBinding$5 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		var desc = Object.getOwnPropertyDescriptor(m, k);
		if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
			enumerable: true,
			get: function() {
				return m[k];
			}
		};
		Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		o[k2] = m[k];
	}));
	var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
		Object.defineProperty(o, "default", {
			enumerable: true,
			value: v
		});
	}) : function(o, v) {
		o["default"] = v;
	});
	var __importStar$3 = exports && exports.__importStar || (function() {
		var ownKeys = function(o) {
			ownKeys = Object.getOwnPropertyNames || function(o$1) {
				var ar = [];
				for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
				return ar;
			};
			return ownKeys(o);
		};
		return function(mod) {
			if (mod && mod.__esModule) return mod;
			var result = {};
			if (mod != null) {
				for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$5(result, mod, k[i]);
			}
			__setModuleDefault$3(result, mod);
			return result;
		};
	})();
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.PatternMatcher = void 0;
	exports.PatternMatcher = __importStar$3(__require("@eslint-community/eslint-utils")).PatternMatcher;
}));
var require_predicates$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __createBinding$4 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		var desc = Object.getOwnPropertyDescriptor(m, k);
		if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
			enumerable: true,
			get: function() {
				return m[k];
			}
		};
		Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		o[k2] = m[k];
	}));
	var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
		Object.defineProperty(o, "default", {
			enumerable: true,
			value: v
		});
	}) : function(o, v) {
		o["default"] = v;
	});
	var __importStar$2 = exports && exports.__importStar || (function() {
		var ownKeys = function(o) {
			ownKeys = Object.getOwnPropertyNames || function(o$1) {
				var ar = [];
				for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
				return ar;
			};
			return ownKeys(o);
		};
		return function(mod) {
			if (mod && mod.__esModule) return mod;
			var result = {};
			if (mod != null) {
				for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$4(result, mod, k[i]);
			}
			__setModuleDefault$2(result, mod);
			return result;
		};
	})();
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.isNotSemicolonToken = exports.isSemicolonToken = exports.isNotOpeningParenToken = exports.isOpeningParenToken = exports.isNotOpeningBracketToken = exports.isOpeningBracketToken = exports.isNotOpeningBraceToken = exports.isOpeningBraceToken = exports.isNotCommentToken = exports.isCommentToken = exports.isNotCommaToken = exports.isCommaToken = exports.isNotColonToken = exports.isColonToken = exports.isNotClosingParenToken = exports.isClosingParenToken = exports.isNotClosingBracketToken = exports.isClosingBracketToken = exports.isNotClosingBraceToken = exports.isClosingBraceToken = exports.isNotArrowToken = exports.isArrowToken = void 0;
	const eslintUtils$2 = __importStar$2(__require("@eslint-community/eslint-utils"));
	exports.isArrowToken = eslintUtils$2.isArrowToken;
	exports.isNotArrowToken = eslintUtils$2.isNotArrowToken;
	exports.isClosingBraceToken = eslintUtils$2.isClosingBraceToken;
	exports.isNotClosingBraceToken = eslintUtils$2.isNotClosingBraceToken;
	exports.isClosingBracketToken = eslintUtils$2.isClosingBracketToken;
	exports.isNotClosingBracketToken = eslintUtils$2.isNotClosingBracketToken;
	exports.isClosingParenToken = eslintUtils$2.isClosingParenToken;
	exports.isNotClosingParenToken = eslintUtils$2.isNotClosingParenToken;
	exports.isColonToken = eslintUtils$2.isColonToken;
	exports.isNotColonToken = eslintUtils$2.isNotColonToken;
	exports.isCommaToken = eslintUtils$2.isCommaToken;
	exports.isNotCommaToken = eslintUtils$2.isNotCommaToken;
	exports.isCommentToken = eslintUtils$2.isCommentToken;
	exports.isNotCommentToken = eslintUtils$2.isNotCommentToken;
	exports.isOpeningBraceToken = eslintUtils$2.isOpeningBraceToken;
	exports.isNotOpeningBraceToken = eslintUtils$2.isNotOpeningBraceToken;
	exports.isOpeningBracketToken = eslintUtils$2.isOpeningBracketToken;
	exports.isNotOpeningBracketToken = eslintUtils$2.isNotOpeningBracketToken;
	exports.isOpeningParenToken = eslintUtils$2.isOpeningParenToken;
	exports.isNotOpeningParenToken = eslintUtils$2.isNotOpeningParenToken;
	exports.isSemicolonToken = eslintUtils$2.isSemicolonToken;
	exports.isNotSemicolonToken = eslintUtils$2.isNotSemicolonToken;
}));
var require_ReferenceTracker = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __createBinding$3 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		var desc = Object.getOwnPropertyDescriptor(m, k);
		if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
			enumerable: true,
			get: function() {
				return m[k];
			}
		};
		Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		o[k2] = m[k];
	}));
	var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
		Object.defineProperty(o, "default", {
			enumerable: true,
			value: v
		});
	}) : function(o, v) {
		o["default"] = v;
	});
	var __importStar$1 = exports && exports.__importStar || (function() {
		var ownKeys = function(o) {
			ownKeys = Object.getOwnPropertyNames || function(o$1) {
				var ar = [];
				for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
				return ar;
			};
			return ownKeys(o);
		};
		return function(mod) {
			if (mod && mod.__esModule) return mod;
			var result = {};
			if (mod != null) {
				for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$3(result, mod, k[i]);
			}
			__setModuleDefault$1(result, mod);
			return result;
		};
	})();
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.ReferenceTracker = void 0;
	const eslintUtils$1 = __importStar$1(__require("@eslint-community/eslint-utils"));
	eslintUtils$1.ReferenceTracker.READ;
	eslintUtils$1.ReferenceTracker.CALL;
	eslintUtils$1.ReferenceTracker.CONSTRUCT;
	eslintUtils$1.ReferenceTracker.ESM;
	exports.ReferenceTracker = eslintUtils$1.ReferenceTracker;
}));
var require_scopeAnalysis = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		var desc = Object.getOwnPropertyDescriptor(m, k);
		if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
			enumerable: true,
			get: function() {
				return m[k];
			}
		};
		Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		o[k2] = m[k];
	}));
	var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
		Object.defineProperty(o, "default", {
			enumerable: true,
			value: v
		});
	}) : function(o, v) {
		o["default"] = v;
	});
	var __importStar = exports && exports.__importStar || (function() {
		var ownKeys = function(o) {
			ownKeys = Object.getOwnPropertyNames || function(o$1) {
				var ar = [];
				for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
				return ar;
			};
			return ownKeys(o);
		};
		return function(mod) {
			if (mod && mod.__esModule) return mod;
			var result = {};
			if (mod != null) {
				for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$2(result, mod, k[i]);
			}
			__setModuleDefault(result, mod);
			return result;
		};
	})();
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.getInnermostScope = exports.findVariable = void 0;
	const eslintUtils = __importStar(__require("@eslint-community/eslint-utils"));
	exports.findVariable = eslintUtils.findVariable;
	exports.getInnermostScope = eslintUtils.getInnermostScope;
}));
var require_eslint_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		var desc = Object.getOwnPropertyDescriptor(m, k);
		if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
			enumerable: true,
			get: function() {
				return m[k];
			}
		};
		Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		o[k2] = m[k];
	}));
	var __exportStar$1 = exports && exports.__exportStar || function(m, exports$1) {
		for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding$1(exports$1, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	__exportStar$1(require_astUtilities(), exports);
	__exportStar$1(require_PatternMatcher(), exports);
	__exportStar$1(require_predicates$1(), exports);
	__exportStar$1(require_ReferenceTracker(), exports);
	__exportStar$1(require_scopeAnalysis(), exports);
}));
var require_helpers = /* @__PURE__ */ __commonJSMin(((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.isNotTokenOfTypeWithConditions = exports.isTokenOfTypeWithConditions = exports.isNodeOfTypeWithConditions = exports.isNodeOfTypes = exports.isNodeOfType = void 0;
	const isNodeOfType = (nodeType) => (node) => node?.type === nodeType;
	exports.isNodeOfType = isNodeOfType;
	const isNodeOfTypes = (nodeTypes) => (node) => !!node && nodeTypes.includes(node.type);
	exports.isNodeOfTypes = isNodeOfTypes;
	const isNodeOfTypeWithConditions = (nodeType, conditions) => {
		const entries = Object.entries(conditions);
		return (node) => node?.type === nodeType && entries.every(([key, value]) => node[key] === value);
	};
	exports.isNodeOfTypeWithConditions = isNodeOfTypeWithConditions;
	const isTokenOfTypeWithConditions = (tokenType, conditions) => {
		const entries = Object.entries(conditions);
		return (token) => token?.type === tokenType && entries.every(([key, value]) => token[key] === value);
	};
	exports.isTokenOfTypeWithConditions = isTokenOfTypeWithConditions;
	const isNotTokenOfTypeWithConditions = (tokenType, conditions) => (token) => !(0, exports.isTokenOfTypeWithConditions)(tokenType, conditions)(token);
	exports.isNotTokenOfTypeWithConditions = isNotTokenOfTypeWithConditions;
}));
var require_misc = /* @__PURE__ */ __commonJSMin(((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.LINEBREAK_MATCHER = void 0;
	exports.isTokenOnSameLine = isTokenOnSameLine;
	exports.LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/;
	function isTokenOnSameLine(left, right) {
		return left.loc.end.line === right.loc.start.line;
	}
}));
var require_ts_estree = /* @__PURE__ */ __commonJSMin(((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.TSESTree = exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
	var types_1 = __require("@typescript-eslint/types");
	Object.defineProperty(exports, "AST_NODE_TYPES", {
		enumerable: true,
		get: function() {
			return types_1.AST_NODE_TYPES;
		}
	});
	Object.defineProperty(exports, "AST_TOKEN_TYPES", {
		enumerable: true,
		get: function() {
			return types_1.AST_TOKEN_TYPES;
		}
	});
	Object.defineProperty(exports, "TSESTree", {
		enumerable: true,
		get: function() {
			return types_1.TSESTree;
		}
	});
}));
var require_predicates = /* @__PURE__ */ __commonJSMin(((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.isLoop = exports.isImportKeyword = exports.isTypeKeyword = exports.isAwaitKeyword = exports.isAwaitExpression = exports.isIdentifier = exports.isConstructor = exports.isClassOrTypeElement = exports.isTSConstructorType = exports.isTSFunctionType = exports.isFunctionOrFunctionType = exports.isFunctionType = exports.isFunction = exports.isVariableDeclarator = exports.isTypeAssertion = exports.isLogicalOrOperator = exports.isOptionalCallExpression = exports.isNotNonNullAssertionPunctuator = exports.isNonNullAssertionPunctuator = exports.isNotOptionalChainPunctuator = exports.isOptionalChainPunctuator = void 0;
	exports.isSetter = isSetter;
	const ts_estree_1 = require_ts_estree();
	const helpers_1 = require_helpers();
	exports.isOptionalChainPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "?." });
	exports.isNotOptionalChainPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "?." });
	exports.isNonNullAssertionPunctuator = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "!" });
	exports.isNotNonNullAssertionPunctuator = (0, helpers_1.isNotTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Punctuator, { value: "!" });
	exports.isOptionalCallExpression = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.CallExpression, { optional: true });
	exports.isLogicalOrOperator = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.LogicalExpression, { operator: "||" });
	exports.isTypeAssertion = (0, helpers_1.isNodeOfTypes)([ts_estree_1.AST_NODE_TYPES.TSAsExpression, ts_estree_1.AST_NODE_TYPES.TSTypeAssertion]);
	exports.isVariableDeclarator = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.VariableDeclarator);
	const functionTypes = [
		ts_estree_1.AST_NODE_TYPES.ArrowFunctionExpression,
		ts_estree_1.AST_NODE_TYPES.FunctionDeclaration,
		ts_estree_1.AST_NODE_TYPES.FunctionExpression
	];
	exports.isFunction = (0, helpers_1.isNodeOfTypes)(functionTypes);
	const functionTypeTypes = [
		ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
		ts_estree_1.AST_NODE_TYPES.TSConstructorType,
		ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
		ts_estree_1.AST_NODE_TYPES.TSDeclareFunction,
		ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
		ts_estree_1.AST_NODE_TYPES.TSFunctionType,
		ts_estree_1.AST_NODE_TYPES.TSMethodSignature
	];
	exports.isFunctionType = (0, helpers_1.isNodeOfTypes)(functionTypeTypes);
	exports.isFunctionOrFunctionType = (0, helpers_1.isNodeOfTypes)([...functionTypes, ...functionTypeTypes]);
	exports.isTSFunctionType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSFunctionType);
	exports.isTSConstructorType = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.TSConstructorType);
	exports.isClassOrTypeElement = (0, helpers_1.isNodeOfTypes)([
		ts_estree_1.AST_NODE_TYPES.PropertyDefinition,
		ts_estree_1.AST_NODE_TYPES.FunctionExpression,
		ts_estree_1.AST_NODE_TYPES.MethodDefinition,
		ts_estree_1.AST_NODE_TYPES.TSAbstractPropertyDefinition,
		ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition,
		ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
		ts_estree_1.AST_NODE_TYPES.TSIndexSignature,
		ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
		ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
		ts_estree_1.AST_NODE_TYPES.TSMethodSignature,
		ts_estree_1.AST_NODE_TYPES.TSPropertySignature
	]);
	exports.isConstructor = (0, helpers_1.isNodeOfTypeWithConditions)(ts_estree_1.AST_NODE_TYPES.MethodDefinition, { kind: "constructor" });
	function isSetter(node) {
		return !!node && (node.type === ts_estree_1.AST_NODE_TYPES.MethodDefinition || node.type === ts_estree_1.AST_NODE_TYPES.Property) && node.kind === "set";
	}
	exports.isIdentifier = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.Identifier);
	exports.isAwaitExpression = (0, helpers_1.isNodeOfType)(ts_estree_1.AST_NODE_TYPES.AwaitExpression);
	exports.isAwaitKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, { value: "await" });
	exports.isTypeKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Identifier, { value: "type" });
	exports.isImportKeyword = (0, helpers_1.isTokenOfTypeWithConditions)(ts_estree_1.AST_TOKEN_TYPES.Keyword, { value: "import" });
	exports.isLoop = (0, helpers_1.isNodeOfTypes)([
		ts_estree_1.AST_NODE_TYPES.DoWhileStatement,
		ts_estree_1.AST_NODE_TYPES.ForStatement,
		ts_estree_1.AST_NODE_TYPES.ForInStatement,
		ts_estree_1.AST_NODE_TYPES.ForOfStatement,
		ts_estree_1.AST_NODE_TYPES.WhileStatement
	]);
}));
var require_ast_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
	var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		var desc = Object.getOwnPropertyDescriptor(m, k);
		if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
			enumerable: true,
			get: function() {
				return m[k];
			}
		};
		Object.defineProperty(o, k2, desc);
	}) : (function(o, m, k, k2) {
		if (k2 === void 0) k2 = k;
		o[k2] = m[k];
	}));
	var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
		for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
	};
	Object.defineProperty(exports, "__esModule", { value: true });
	__exportStar(require_eslint_utils(), exports);
	__exportStar(require_helpers(), exports);
	__exportStar(require_misc(), exports);
	__exportStar(require_predicates(), exports);
}));
function escapeStringRegexp(string) {
	if (typeof string !== "string") throw new TypeError("Expected a string");
	return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
export { require_ast_utils as n, escapeStringRegexp as t };
