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/isPassportNumber.js
var require_isPassportNumber = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/validator@13.12.0/node_modules/validator/lib/isPassportNumber.js": ((exports, module) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.default = isPassportNumber;
	var _assertString = _interopRequireDefault(require_assertString$1.require_assertString());
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { default: obj };
	}
	/**
	* Reference:
	* https://en.wikipedia.org/ -- Wikipedia
	* https://docs.microsoft.com/en-us/microsoft-365/compliance/eu-passport-number -- EU Passport Number
	* https://countrycode.org/ -- Country Codes
	*/
	var passportRegexByCountryCode = {
		AM: /^[A-Z]{2}\d{7}$/,
		AR: /^[A-Z]{3}\d{6}$/,
		AT: /^[A-Z]\d{7}$/,
		AU: /^[A-Z]\d{7}$/,
		AZ: /^[A-Z]{1}\d{8}$/,
		BE: /^[A-Z]{2}\d{6}$/,
		BG: /^\d{9}$/,
		BR: /^[A-Z]{2}\d{6}$/,
		BY: /^[A-Z]{2}\d{7}$/,
		CA: /^[A-Z]{2}\d{6}$/,
		CH: /^[A-Z]\d{7}$/,
		CN: /^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,
		CY: /^[A-Z](\d{6}|\d{8})$/,
		CZ: /^\d{8}$/,
		DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,
		DK: /^\d{9}$/,
		DZ: /^\d{9}$/,
		EE: /^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,
		ES: /^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,
		FI: /^[A-Z]{2}\d{7}$/,
		FR: /^\d{2}[A-Z]{2}\d{5}$/,
		GB: /^\d{9}$/,
		GR: /^[A-Z]{2}\d{7}$/,
		HR: /^\d{9}$/,
		HU: /^[A-Z]{2}(\d{6}|\d{7})$/,
		IE: /^[A-Z0-9]{2}\d{7}$/,
		IN: /^[A-Z]{1}-?\d{7}$/,
		ID: /^[A-C]\d{7}$/,
		IR: /^[A-Z]\d{8}$/,
		IS: /^(A)\d{7}$/,
		IT: /^[A-Z0-9]{2}\d{7}$/,
		JM: /^[Aa]\d{7}$/,
		JP: /^[A-Z]{2}\d{7}$/,
		KR: /^[MS]\d{8}$/,
		KZ: /^[a-zA-Z]\d{7}$/,
		LI: /^[a-zA-Z]\d{5}$/,
		LT: /^[A-Z0-9]{8}$/,
		LU: /^[A-Z0-9]{8}$/,
		LV: /^[A-Z0-9]{2}\d{7}$/,
		LY: /^[A-Z0-9]{8}$/,
		MT: /^\d{7}$/,
		MZ: /^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,
		MY: /^[AHK]\d{8}$/,
		MX: /^\d{10,11}$/,
		NL: /^[A-Z]{2}[A-Z0-9]{6}\d$/,
		NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,
		PH: /^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,
		PK: /^[A-Z]{2}\d{7}$/,
		PL: /^[A-Z]{2}\d{7}$/,
		PT: /^[A-Z]\d{6}$/,
		RO: /^\d{8,9}$/,
		RU: /^\d{9}$/,
		SE: /^\d{8}$/,
		SL: /^(P)[A-Z]\d{7}$/,
		SK: /^[0-9A-Z]\d{7}$/,
		TH: /^[A-Z]{1,2}\d{6,7}$/,
		TR: /^[A-Z]\d{8}$/,
		UA: /^[A-Z]{2}\d{6}$/,
		US: /^\d{9}$/,
		ZA: /^[TAMD]\d{8}$/
	};
	/**
	* Check if str is a valid passport number
	* relative to provided ISO Country Code.
	*
	* @param {string} str
	* @param {string} countryCode
	* @return {boolean}
	*/
	function isPassportNumber(str, countryCode) {
		(0, _assertString.default)(str);
		/** Remove All Whitespaces, Convert to UPPERCASE */
		var normalizedStr = str.replace(/\s/g, "").toUpperCase();
		return countryCode.toUpperCase() in passportRegexByCountryCode && passportRegexByCountryCode[countryCode].test(normalizedStr);
	}
	module.exports = exports.default;
	module.exports.default = exports.default;
}) });

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