import { __commonJSMin } from "../../_virtual/rolldown_runtime.js";
import { require_isObject } from "./isObject.js";
import { require__baseTrim } from "./_baseTrim.js";
import { require_isSymbol } from "./isSymbol.js";
var require_toNumber = /* @__PURE__ */ __commonJSMin(((e, i) => {
	var a = require__baseTrim(), o = require_isObject(), s = require_isSymbol(), c = NaN, l = /^[-+]0x[0-9a-f]+$/i, u = /^0b[01]+$/i, d = /^0o[0-7]+$/i, f = parseInt;
	function p(e) {
		if (typeof e == "number") return e;
		if (s(e)) return c;
		if (o(e)) {
			var n = typeof e.valueOf == "function" ? e.valueOf() : e;
			e = o(n) ? n + "" : n;
		}
		if (typeof e != "string") return e === 0 ? e : +e;
		e = a(e);
		var r = u.test(e);
		return r || d.test(e) ? f(e.slice(2), r ? 2 : 8) : l.test(e) ? c : +e;
	}
	i.exports = p;
}));
export default require_toNumber();
export { require_toNumber };
