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

//#region ../../node_modules/.pnpm/validator@13.12.0/node_modules/validator/lib/isFQDN.js
var require_isFQDN = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/validator@13.12.0/node_modules/validator/lib/isFQDN.js": ((exports, module) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.default = isFQDN;
	var _assertString = _interopRequireDefault(require_assertString$1.require_assertString());
	var _merge = _interopRequireDefault(require_merge$1.require_merge());
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { default: obj };
	}
	var default_fqdn_options = {
		require_tld: true,
		allow_underscores: false,
		allow_trailing_dot: false,
		allow_numeric_tld: false,
		allow_wildcard: false,
		ignore_max_length: false
	};
	function isFQDN(str, options) {
		(0, _assertString.default)(str);
		options = (0, _merge.default)(options, default_fqdn_options);
		if (options.allow_trailing_dot && str[str.length - 1] === ".") str = str.substring(0, str.length - 1);
		if (options.allow_wildcard === true && str.indexOf("*.") === 0) str = str.substring(2);
		var parts = str.split(".");
		var tld = parts[parts.length - 1];
		if (options.require_tld) {
			if (parts.length < 2) return false;
			if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) return false;
			if (/\s/.test(tld)) return false;
		}
		if (!options.allow_numeric_tld && /^\d+$/.test(tld)) return false;
		return parts.every(function(part) {
			if (part.length > 63 && !options.ignore_max_length) return false;
			if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) return false;
			if (/[\uff01-\uff5e]/.test(part)) return false;
			if (/^-|-$/.test(part)) return false;
			if (!options.allow_underscores && /_/.test(part)) return false;
			return true;
		});
	}
	module.exports = exports.default;
	module.exports.default = exports.default;
}) });

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