"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_versions__internal = require('./_internal.js');

//#region src/versions/range.ts
/**
* @file Range / set helpers — `satisfiesVersion` / `filterVersions` check
*   membership against a semver range, `maxVersion` / `minVersion` pick the
*   bounds of an arbitrary version array. The bound pickers use the vendored
*   `semver` directly because the prerelease-inclusion options aren't part of
*   the smol-versions surface.
*/
/**
* Get all versions from an array that satisfy a semver range.
*
* @example
*   ;```typescript
*   filterVersions(['1.0.0', '1.5.0', '2.0.0'], '>=1.0.0 <2.0.0')
*   // ['1.0.0', '1.5.0']
*   ```
*/
function filterVersions(versions, range) {
	/* c8 ignore next - External semver call */
	return versions.filter((v) => require_versions__internal.impl.satisfies(v, range));
}
/**
* Get the highest version from an array of versions.
*
* @example
*   ;```typescript
*   maxVersion(['1.0.0', '2.0.0', '1.5.0']) // '2.0.0'
*   ```
*/
function maxVersion(versions) {
	return require_versions__internal.getSemver().maxSatisfying(versions, "*", { includePrerelease: true }) || void 0;
}
/**
* Get the lowest version from an array of versions.
*
* @example
*   ;```typescript
*   minVersion(['1.0.0', '2.0.0', '1.5.0']) // '1.0.0'
*   ```
*/
function minVersion(versions) {
	return require_versions__internal.getSemver().minSatisfying(versions, "*", { includePrerelease: true }) || void 0;
}
/**
* Check if a version satisfies a semver range.
*
* @example
*   ;```typescript
*   satisfiesVersion('1.5.0', '>=1.0.0 <2.0.0') // true
*   satisfiesVersion('3.0.0', '>=1.0.0 <2.0.0') // false
*   ```
*/
function satisfiesVersion(version, range) {
	/* c8 ignore next - External semver call */
	return require_versions__internal.impl.satisfies(version, range);
}

//#endregion
exports.filterVersions = filterVersions;
exports.maxVersion = maxVersion;
exports.minVersion = minVersion;
exports.satisfiesVersion = satisfiesVersion;