import { insufficientResourcesErrorCodes as e } from "./error-codes.constants.mjs";
//#region libs/shared/common/src/error-handling/isInsufficientFundsError.ts
var t = (t) => {
	let n = t.toLowerCase(), r = [
		e.INSUFFICIENT_FUNDS,
		"insufficient funds",
		"not enough",
		"insufficient balance",
		"balance too low",
		"insufficientFundsForRent",
		"Insufficient SOL balance"
	].map((e) => e.toLowerCase()), i = [/custom program error:\s*(?:0x1(?![0-9a-f])|1(?![0-9]))\b/, /program error:\s*(?:0x1(?![0-9a-f])|1(?![0-9]))\b/], a = r.some((e) => n.includes(e)), o = i.some((e) => e.test(n));
	return a || o;
};
//#endregion
export { t as isInsufficientFundsError };
