const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.js');
const require_assertString$1 = require('./util/assertString.js');

//#region ../../node_modules/.pnpm/validator@13.12.0/node_modules/validator/lib/isIMEI.js
var require_isIMEI = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/validator@13.12.0/node_modules/validator/lib/isIMEI.js": ((exports, module) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.default = isIMEI;
	var _assertString = _interopRequireDefault(require_assertString$1.require_assertString());
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { default: obj };
	}
	var imeiRegexWithoutHypens = /^[0-9]{15}$/;
	var imeiRegexWithHypens = /^\d{2}-\d{6}-\d{6}-\d{1}$/;
	function isIMEI(str, options) {
		(0, _assertString.default)(str);
		options = options || {};
		var imeiRegex = imeiRegexWithoutHypens;
		if (options.allow_hyphens) imeiRegex = imeiRegexWithHypens;
		if (!imeiRegex.test(str)) return false;
		str = str.replace(/-/g, "");
		var sum = 0, mul = 2, l = 14;
		for (var i = 0; i < l; i++) {
			var digit = str.substring(l - i - 1, l - i);
			var tp = parseInt(digit, 10) * mul;
			if (tp >= 10) sum += tp % 10 + 1;
			else sum += tp;
			if (mul === 1) mul += 1;
			else mul -= 1;
		}
		if ((10 - sum % 10) % 10 !== parseInt(str.substring(14, 15), 10)) return false;
		return true;
	}
	module.exports = exports.default;
	module.exports.default = exports.default;
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_isIMEI();
  }
});