nf3 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +245 -306
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -303,8 +303,7 @@ const ERR_UNKNOWN_FILE_EXTENSION$1 = createError$1("ERR_UNKNOWN_FILE_EXTENSION",
303
303
  createError$1("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
304
304
  let inspected = inspect(value);
305
305
  if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
306
- const type = name.includes(".") ? "property" : "argument";
307
- return `The ${type} '${name}' ${reason}. Received ${inspected}`;
306
+ return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
308
307
  }, TypeError);
309
308
  const hasOwnProperty$1$1 = {}.hasOwnProperty;
310
309
  const cache$2 = /* @__PURE__ */ new Map();
@@ -349,17 +348,15 @@ function read$1(jsonPath, { base, specifier }) {
349
348
  function getPackageScopeConfig$1(resolved) {
350
349
  let packageJSONUrl = new URL("package.json", resolved);
351
350
  while (true) {
352
- const packageJSONPath2 = packageJSONUrl.pathname;
353
- if (packageJSONPath2.endsWith("node_modules/package.json")) break;
351
+ if (packageJSONUrl.pathname.endsWith("node_modules/package.json")) break;
354
352
  const packageConfig = read$1(fileURLToPath(packageJSONUrl), { specifier: resolved });
355
353
  if (packageConfig.exists) return packageConfig;
356
354
  const lastPackageJSONUrl = packageJSONUrl;
357
355
  packageJSONUrl = new URL("../package.json", packageJSONUrl);
358
356
  if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) break;
359
357
  }
360
- const packageJSONPath = fileURLToPath(packageJSONUrl);
361
358
  return {
362
- pjsonPath: packageJSONPath,
359
+ pjsonPath: fileURLToPath(packageJSONUrl),
363
360
  exists: false,
364
361
  type: "none"
365
362
  };
@@ -418,9 +415,8 @@ function getFileProtocolModuleFormat$1(url, _context, ignoreErrors) {
418
415
  }
419
416
  const format$1 = extensionFormatMap$1[ext];
420
417
  if (format$1) return format$1;
421
- if (ignoreErrors) return void 0;
422
- const filepath = fileURLToPath(url);
423
- throw new ERR_UNKNOWN_FILE_EXTENSION$1(ext, filepath);
418
+ if (ignoreErrors) return;
419
+ throw new ERR_UNKNOWN_FILE_EXTENSION$1(ext, fileURLToPath(url));
424
420
  }
425
421
  function defaultGetFormatWithoutErrors$1(url, context) {
426
422
  const protocol = url.protocol;
@@ -444,8 +440,7 @@ function emitInvalidSegmentDeprecation$1(target, request, match, packageJsonUrl,
444
440
  }
445
441
  function emitLegacyIndexDeprecation$1(url, packageJsonUrl, base, main) {
446
442
  if (process$1.noDeprecation) return;
447
- const format$1 = defaultGetFormatWithoutErrors$1(url, { parentURL: base.href });
448
- if (format$1 !== "module") return;
443
+ if (defaultGetFormatWithoutErrors$1(url, { parentURL: base.href }) !== "module") return;
449
444
  const urlPath = fileURLToPath(url.href);
450
445
  const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
451
446
  const basePath = fileURLToPath(base);
@@ -542,8 +537,7 @@ function exportsNotFound$1(subpath, packageJsonUrl, base) {
542
537
  return new ERR_PACKAGE_PATH_NOT_EXPORTED$1(fileURLToPath(new URL$1(".", packageJsonUrl)), subpath, base && fileURLToPath(base));
543
538
  }
544
539
  function throwInvalidSubpath$1(request, match, packageJsonUrl, internal, base) {
545
- const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`;
546
- throw new ERR_INVALID_MODULE_SPECIFIER$1(request, reason, base && fileURLToPath(base));
540
+ throw new ERR_INVALID_MODULE_SPECIFIER$1(request, `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base));
547
541
  }
548
542
  function invalidPackageTarget$1(subpath, target, packageJsonUrl, internal, base) {
549
543
  target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
@@ -558,18 +552,14 @@ function resolvePackageTargetString$1(target, subpath, match, packageJsonUrl, ba
558
552
  new URL$1(target);
559
553
  isURL = true;
560
554
  } catch {}
561
- if (!isURL) {
562
- const exportTarget = pattern ? RegExpPrototypeSymbolReplace$1.call(patternRegEx$1, target, () => subpath) : target + subpath;
563
- return packageResolve$1(exportTarget, packageJsonUrl, conditions);
564
- }
555
+ if (!isURL) return packageResolve$1(pattern ? RegExpPrototypeSymbolReplace$1.call(patternRegEx$1, target, () => subpath) : target + subpath, packageJsonUrl, conditions);
565
556
  }
566
557
  throw invalidPackageTarget$1(match, target, packageJsonUrl, internal, base);
567
558
  }
568
559
  if (invalidSegmentRegEx$1.exec(target.slice(2)) !== null) if (deprecatedInvalidSegmentRegEx$1.exec(target.slice(2)) === null) {
569
560
  if (!isPathMap) {
570
561
  const request = pattern ? match.replace("*", () => subpath) : match + subpath;
571
- const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace$1.call(patternRegEx$1, target, () => subpath) : target;
572
- emitInvalidSegmentDeprecation$1(resolvedTarget, request, match, packageJsonUrl, internal, base, true);
562
+ emitInvalidSegmentDeprecation$1(pattern ? RegExpPrototypeSymbolReplace$1.call(patternRegEx$1, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, true);
573
563
  }
574
564
  } else throw invalidPackageTarget$1(match, target, packageJsonUrl, internal, base);
575
565
  const resolved = new URL$1(target, packageJsonUrl);
@@ -580,10 +570,7 @@ function resolvePackageTargetString$1(target, subpath, match, packageJsonUrl, ba
580
570
  if (invalidSegmentRegEx$1.exec(subpath) !== null) {
581
571
  const request = pattern ? match.replace("*", () => subpath) : match + subpath;
582
572
  if (deprecatedInvalidSegmentRegEx$1.exec(subpath) === null) {
583
- if (!isPathMap) {
584
- const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace$1.call(patternRegEx$1, target, () => subpath) : target;
585
- emitInvalidSegmentDeprecation$1(resolvedTarget, request, match, packageJsonUrl, internal, base, false);
586
- }
573
+ if (!isPathMap) emitInvalidSegmentDeprecation$1(pattern ? RegExpPrototypeSymbolReplace$1.call(patternRegEx$1, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, false);
587
574
  } else throwInvalidSubpath$1(request, match, packageJsonUrl, internal, base);
588
575
  }
589
576
  if (pattern) return new URL$1(RegExpPrototypeSymbolReplace$1.call(patternRegEx$1, resolved.href, () => subpath));
@@ -713,10 +700,7 @@ function patternKeyCompare$1(a, b$1) {
713
700
  return 0;
714
701
  }
715
702
  function packageImportsResolve$1(name, base, conditions) {
716
- if (name === "#" || name.startsWith("#/") || name.endsWith("/")) {
717
- const reason = "is not a valid internal imports specifier name";
718
- throw new ERR_INVALID_MODULE_SPECIFIER$1(name, reason, fileURLToPath(base));
719
- }
703
+ if (name === "#" || name.startsWith("#/") || name.endsWith("/")) throw new ERR_INVALID_MODULE_SPECIFIER$1(name, "is not a valid internal imports specifier name", fileURLToPath(base));
720
704
  let packageJsonUrl;
721
705
  const packageConfig = getPackageScopeConfig$1(base);
722
706
  if (packageConfig.exists) {
@@ -762,10 +746,9 @@ function parsePackageName$1(specifier, base) {
762
746
  const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);
763
747
  if (invalidPackageNameRegEx$1.exec(packageName) !== null) validPackageName = false;
764
748
  if (!validPackageName) throw new ERR_INVALID_MODULE_SPECIFIER$1(specifier, "is not a valid package name", fileURLToPath(base));
765
- const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex));
766
749
  return {
767
750
  packageName,
768
- packageSubpath,
751
+ packageSubpath: "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)),
769
752
  isScoped
770
753
  };
771
754
  }
@@ -773,10 +756,7 @@ function packageResolve$1(specifier, base, conditions) {
773
756
  if (nodeBuiltins.includes(specifier)) return new URL$1("node:" + specifier);
774
757
  const { packageName, packageSubpath, isScoped } = parsePackageName$1(specifier, base);
775
758
  const packageConfig = getPackageScopeConfig$1(base);
776
- if (packageConfig.exists && packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) {
777
- const packageJsonUrl2 = pathToFileURL(packageConfig.pjsonPath);
778
- return packageExportsResolve$1(packageJsonUrl2, packageSubpath, packageConfig, base, conditions);
779
- }
759
+ if (packageConfig.exists && packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve$1(pathToFileURL(packageConfig.pjsonPath), packageSubpath, packageConfig, base, conditions);
780
760
  let packageJsonUrl = new URL$1("./node_modules/" + packageName + "/package.json", base);
781
761
  let packageJsonPath = fileURLToPath(packageJsonUrl);
782
762
  let lastPath;
@@ -862,7 +842,7 @@ function resolveModuleURL(input, options) {
862
842
  const cached = cacheObj.get(cacheKey);
863
843
  if (typeof cached === "string") return cached;
864
844
  if (cached instanceof Error) {
865
- if (options?.try) return void 0;
845
+ if (options?.try) return;
866
846
  throw cached;
867
847
  }
868
848
  }
@@ -901,10 +881,10 @@ function resolveModuleURL(input, options) {
901
881
  if (resolved) break;
902
882
  }
903
883
  if (!resolved) {
904
- const error = new Error(`Cannot resolve module "${input}" (from: ${bases.map((u) => _fmtPath(u)).join(", ")})`);
884
+ const error = /* @__PURE__ */ new Error(`Cannot resolve module "${input}" (from: ${bases.map((u) => _fmtPath(u)).join(", ")})`);
905
885
  error.code = "ERR_MODULE_NOT_FOUND";
906
886
  if (cacheObj) cacheObj.set(cacheKey, error);
907
- if (options?.try) return void 0;
887
+ if (options?.try) return;
908
888
  throw error;
909
889
  }
910
890
  if (cacheObj) cacheObj.set(cacheKey, resolved.href);
@@ -912,8 +892,8 @@ function resolveModuleURL(input, options) {
912
892
  }
913
893
  function resolveModulePath(id, options) {
914
894
  const resolved = resolveModuleURL(id, options);
915
- if (!resolved) return void 0;
916
- if (!resolved.startsWith("file://") && options?.try) return void 0;
895
+ if (!resolved) return;
896
+ if (!resolved.startsWith("file://") && options?.try) return;
917
897
  const absolutePath = fileURLToPath(resolved);
918
898
  return isWindows ? _normalizeWinPath(absolutePath) : absolutePath;
919
899
  }
@@ -1032,8 +1012,7 @@ const join = function(...segments) {
1032
1012
  if (path$1.length > 0) {
1033
1013
  const pathTrailing = path$1[path$1.length - 1] === "/";
1034
1014
  const segLeading = seg[0] === "/";
1035
- const both = pathTrailing && segLeading;
1036
- if (both) path$1 += seg.slice(1);
1015
+ if (pathTrailing && segLeading) path$1 += seg.slice(1);
1037
1016
  else path$1 += pathTrailing || segLeading ? seg : `/${seg}`;
1038
1017
  } else path$1 += seg;
1039
1018
  }
@@ -1110,7 +1089,7 @@ function normalizeString(path$1, allowAboveRoot) {
1110
1089
  const isAbsolute$1 = function(p) {
1111
1090
  return _IS_ABSOLUTE_RE.test(p);
1112
1091
  };
1113
- const extname$1 = function(p) {
1092
+ const extname = function(p) {
1114
1093
  if (p === "..") return "";
1115
1094
  const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
1116
1095
  return match && match[1] || "";
@@ -1173,16 +1152,15 @@ const protocolRelative = Symbol.for("ufo:protocolRelative");
1173
1152
  //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.9388d834.mjs
1174
1153
  const m$1 = Symbol.for("__confbox_fmt__"), k$1 = /^(\s+)/, v$1 = /(\s+)$/;
1175
1154
  function x$3(e, t$5 = {}) {
1176
- const n = t$5.indent === void 0 && t$5.preserveIndentation !== !1 && e.slice(0, t$5?.sampleSize || 1024), i = t$5.preserveWhitespace === !1 ? void 0 : {
1177
- start: k$1.exec(e)?.[0] || "",
1178
- end: v$1.exec(e)?.[0] || ""
1179
- };
1180
1155
  return {
1181
- sample: n,
1182
- whiteSpace: i
1156
+ sample: t$5.indent === void 0 && t$5.preserveIndentation !== !1 && e.slice(0, t$5?.sampleSize || 1024),
1157
+ whiteSpace: t$5.preserveWhitespace === !1 ? void 0 : {
1158
+ start: k$1.exec(e)?.[0] || "",
1159
+ end: v$1.exec(e)?.[0] || ""
1160
+ }
1183
1161
  };
1184
1162
  }
1185
- function N$3(e, t$5, n) {
1163
+ function N$2(e, t$5, n) {
1186
1164
  !t$5 || typeof t$5 != "object" || Object.defineProperty(t$5, m$1, {
1187
1165
  enumerable: !1,
1188
1166
  configurable: !0,
@@ -1395,11 +1373,11 @@ var Q$1;
1395
1373
  (function(n) {
1396
1374
  n[n.lineFeed = 10] = "lineFeed", n[n.carriageReturn = 13] = "carriageReturn", n[n.space = 32] = "space", n[n._0 = 48] = "_0", n[n._1 = 49] = "_1", n[n._2 = 50] = "_2", n[n._3 = 51] = "_3", n[n._4 = 52] = "_4", n[n._5 = 53] = "_5", n[n._6 = 54] = "_6", n[n._7 = 55] = "_7", n[n._8 = 56] = "_8", n[n._9 = 57] = "_9", n[n.a = 97] = "a", n[n.b = 98] = "b", n[n.c = 99] = "c", n[n.d = 100] = "d", n[n.e = 101] = "e", n[n.f = 102] = "f", n[n.g = 103] = "g", n[n.h = 104] = "h", n[n.i = 105] = "i", n[n.j = 106] = "j", n[n.k = 107] = "k", n[n.l = 108] = "l", n[n.m = 109] = "m", n[n.n = 110] = "n", n[n.o = 111] = "o", n[n.p = 112] = "p", n[n.q = 113] = "q", n[n.r = 114] = "r", n[n.s = 115] = "s", n[n.t = 116] = "t", n[n.u = 117] = "u", n[n.v = 118] = "v", n[n.w = 119] = "w", n[n.x = 120] = "x", n[n.y = 121] = "y", n[n.z = 122] = "z", n[n.A = 65] = "A", n[n.B = 66] = "B", n[n.C = 67] = "C", n[n.D = 68] = "D", n[n.E = 69] = "E", n[n.F = 70] = "F", n[n.G = 71] = "G", n[n.H = 72] = "H", n[n.I = 73] = "I", n[n.J = 74] = "J", n[n.K = 75] = "K", n[n.L = 76] = "L", n[n.M = 77] = "M", n[n.N = 78] = "N", n[n.O = 79] = "O", n[n.P = 80] = "P", n[n.Q = 81] = "Q", n[n.R = 82] = "R", n[n.S = 83] = "S", n[n.T = 84] = "T", n[n.U = 85] = "U", n[n.V = 86] = "V", n[n.W = 87] = "W", n[n.X = 88] = "X", n[n.Y = 89] = "Y", n[n.Z = 90] = "Z", n[n.asterisk = 42] = "asterisk", n[n.backslash = 92] = "backslash", n[n.closeBrace = 125] = "closeBrace", n[n.closeBracket = 93] = "closeBracket", n[n.colon = 58] = "colon", n[n.comma = 44] = "comma", n[n.dot = 46] = "dot", n[n.doubleQuote = 34] = "doubleQuote", n[n.minus = 45] = "minus", n[n.openBrace = 123] = "openBrace", n[n.openBracket = 91] = "openBracket", n[n.plus = 43] = "plus", n[n.slash = 47] = "slash", n[n.formFeed = 12] = "formFeed", n[n.tab = 9] = "tab";
1397
1375
  })(Q$1 || (Q$1 = {})), new Array(20).fill(0).map((n, l) => " ".repeat(l));
1398
- const N$2 = 200;
1399
- new Array(N$2).fill(0).map((n, l) => `
1400
- ` + " ".repeat(l)), new Array(N$2).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N$2).fill(0).map((n, l) => `\r
1401
- ` + " ".repeat(l)), new Array(N$2).fill(0).map((n, l) => `
1402
- ` + " ".repeat(l)), new Array(N$2).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N$2).fill(0).map((n, l) => `\r
1376
+ const N$3 = 200;
1377
+ new Array(N$3).fill(0).map((n, l) => `
1378
+ ` + " ".repeat(l)), new Array(N$3).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N$3).fill(0).map((n, l) => `\r
1379
+ ` + " ".repeat(l)), new Array(N$3).fill(0).map((n, l) => `
1380
+ ` + " ".repeat(l)), new Array(N$3).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N$3).fill(0).map((n, l) => `\r
1403
1381
  ` + " ".repeat(l));
1404
1382
  var U$1;
1405
1383
  (function(n) {
@@ -1585,11 +1563,11 @@ var q$1;
1585
1563
  })(q$1 || (q$1 = {}));
1586
1564
  function x$2(n, l) {
1587
1565
  const g$1 = JSON.parse(n, l?.reviver);
1588
- return N$3(n, g$1, l), g$1;
1566
+ return N$2(n, g$1, l), g$1;
1589
1567
  }
1590
1568
  function h$2(n, l) {
1591
1569
  const g$1 = K$1(n, l?.errors, l);
1592
- return N$3(n, g$1, l), g$1;
1570
+ return N$2(n, g$1, l), g$1;
1593
1571
  }
1594
1572
 
1595
1573
  //#endregion
@@ -1645,9 +1623,8 @@ async function readPackageJSON$1(id, options = {}) {
1645
1623
  return parsed;
1646
1624
  }
1647
1625
  async function resolvePackageJSON$1(id = process.cwd(), options = {}) {
1648
- const resolvedPath = isAbsolute$1(id) ? id : await resolvePath(id, options);
1649
1626
  return findNearestFile$1("package.json", {
1650
- startingFrom: resolvedPath,
1627
+ startingFrom: isAbsolute$1(id) ? id : await resolvePath(id, options),
1651
1628
  ...options
1652
1629
  });
1653
1630
  }
@@ -1697,7 +1674,7 @@ function formatList(array, type = "and") {
1697
1674
  return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array[array.length - 1]}`;
1698
1675
  }
1699
1676
  /** @type {Map<string, MessageFunction | string>} */
1700
- const messages = new Map();
1677
+ const messages = /* @__PURE__ */ new Map();
1701
1678
  const nodeInternalPrefix = "__node_internal_";
1702
1679
  /** @type {number} */
1703
1680
  let userStackTraceLimit;
@@ -1861,8 +1838,7 @@ codes.ERR_INVALID_ARG_VALUE = createError(
1861
1838
  (name, value, reason = "is invalid") => {
1862
1839
  let inspected = inspect(value);
1863
1840
  if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
1864
- const type = name.includes(".") ? "property" : "argument";
1865
- return `The ${type} '${name}' ${reason}. Received ${inspected}`;
1841
+ return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
1866
1842
  },
1867
1843
  TypeError
1868
1844
  );
@@ -1993,7 +1969,7 @@ function determineSpecificType(value) {
1993
1969
  const hasOwnProperty$1 = {}.hasOwnProperty;
1994
1970
  const { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
1995
1971
  /** @type {Map<string, PackageConfig>} */
1996
- const cache$1 = new Map();
1972
+ const cache$1 = /* @__PURE__ */ new Map();
1997
1973
  /**
1998
1974
  * @param {string} jsonPath
1999
1975
  * @param {{specifier: URL | string, base?: URL}} options
@@ -2048,17 +2024,15 @@ function read(jsonPath, { base, specifier }) {
2048
2024
  function getPackageScopeConfig(resolved) {
2049
2025
  let packageJSONUrl = new URL("package.json", resolved);
2050
2026
  while (true) {
2051
- const packageJSONPath$1 = packageJSONUrl.pathname;
2052
- if (packageJSONPath$1.endsWith("node_modules/package.json")) break;
2027
+ if (packageJSONUrl.pathname.endsWith("node_modules/package.json")) break;
2053
2028
  const packageConfig = read(fileURLToPath(packageJSONUrl), { specifier: resolved });
2054
2029
  if (packageConfig.exists) return packageConfig;
2055
2030
  const lastPackageJSONUrl = packageJSONUrl;
2056
2031
  packageJSONUrl = new URL("../package.json", packageJSONUrl);
2057
2032
  if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) break;
2058
2033
  }
2059
- const packageJSONPath = fileURLToPath(packageJSONUrl);
2060
2034
  return {
2061
- pjsonPath: packageJSONPath,
2035
+ pjsonPath: fileURLToPath(packageJSONUrl),
2062
2036
  exists: false,
2063
2037
  type: "none"
2064
2038
  };
@@ -2131,7 +2105,7 @@ function getDataProtocolModuleFormat(parsed) {
2131
2105
  * @param {URL} url
2132
2106
  * @returns {string}
2133
2107
  */
2134
- function extname(url) {
2108
+ function extname$1(url) {
2135
2109
  const pathname = url.pathname;
2136
2110
  let index = pathname.length;
2137
2111
  while (index--) {
@@ -2145,7 +2119,7 @@ function extname(url) {
2145
2119
  * @type {ProtocolHandler}
2146
2120
  */
2147
2121
  function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
2148
- const value = extname(url);
2122
+ const value = extname$1(url);
2149
2123
  if (value === ".js") {
2150
2124
  const packageType = getPackageType(url);
2151
2125
  if (packageType !== "none") return packageType;
@@ -2158,9 +2132,8 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
2158
2132
  }
2159
2133
  const format$1 = extensionFormatMap[value];
2160
2134
  if (format$1) return format$1;
2161
- if (ignoreErrors) return void 0;
2162
- const filepath = fileURLToPath(url);
2163
- throw new ERR_UNKNOWN_FILE_EXTENSION(value, filepath);
2135
+ if (ignoreErrors) return;
2136
+ throw new ERR_UNKNOWN_FILE_EXTENSION(value, fileURLToPath(url));
2164
2137
  }
2165
2138
  function getHttpProtocolModuleFormat() {}
2166
2139
  /**
@@ -2182,7 +2155,7 @@ const invalidPackageNameRegEx = /^\.|%|\\/;
2182
2155
  const patternRegEx = /\*/g;
2183
2156
  const encodedSeparatorRegEx = /%2f|%5c/i;
2184
2157
  /** @type {Set<string>} */
2185
- const emittedPackageWarnings = new Set();
2158
+ const emittedPackageWarnings = /* @__PURE__ */ new Set();
2186
2159
  const doubleSlashRegEx = /[/\\]{2}/;
2187
2160
  /**
2188
2161
  *
@@ -2209,8 +2182,7 @@ function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, i
2209
2182
  */
2210
2183
  function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
2211
2184
  if (process$1.noDeprecation) return;
2212
- const format$1 = defaultGetFormatWithoutErrors(url, { parentURL: base.href });
2213
- if (format$1 !== "module") return;
2185
+ if (defaultGetFormatWithoutErrors(url, { parentURL: base.href }) !== "module") return;
2214
2186
  const urlPath = fileURLToPath(url.href);
2215
2187
  const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
2216
2188
  const basePath = fileURLToPath(base);
@@ -2355,8 +2327,7 @@ function exportsNotFound(subpath, packageJsonUrl, base) {
2355
2327
  * @returns {never}
2356
2328
  */
2357
2329
  function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {
2358
- const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`;
2359
- throw new ERR_INVALID_MODULE_SPECIFIER(request, reason, base && fileURLToPath(base));
2330
+ throw new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base));
2360
2331
  }
2361
2332
  /**
2362
2333
  * @param {string} subpath
@@ -2391,18 +2362,14 @@ function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base
2391
2362
  new URL$1(target);
2392
2363
  isURL = true;
2393
2364
  } catch {}
2394
- if (!isURL) {
2395
- const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath;
2396
- return packageResolve(exportTarget, packageJsonUrl, conditions);
2397
- }
2365
+ if (!isURL) return packageResolve(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath, packageJsonUrl, conditions);
2398
2366
  }
2399
2367
  throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);
2400
2368
  }
2401
2369
  if (invalidSegmentRegEx.exec(target.slice(2)) !== null) if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) {
2402
2370
  if (!isPathMap) {
2403
2371
  const request = pattern ? match.replace("*", () => subpath) : match + subpath;
2404
- const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target;
2405
- emitInvalidSegmentDeprecation(resolvedTarget, request, match, packageJsonUrl, internal, base, true);
2372
+ emitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, true);
2406
2373
  }
2407
2374
  } else throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);
2408
2375
  const resolved = new URL$1(target, packageJsonUrl);
@@ -2413,10 +2380,7 @@ function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base
2413
2380
  if (invalidSegmentRegEx.exec(subpath) !== null) {
2414
2381
  const request = pattern ? match.replace("*", () => subpath) : match + subpath;
2415
2382
  if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) {
2416
- if (!isPathMap) {
2417
- const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target;
2418
- emitInvalidSegmentDeprecation(resolvedTarget, request, match, packageJsonUrl, internal, base, false);
2419
- }
2383
+ if (!isPathMap) emitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, false);
2420
2384
  } else throwInvalidSubpath(request, match, packageJsonUrl, internal, base);
2421
2385
  }
2422
2386
  if (pattern) return new URL$1(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath));
@@ -2594,10 +2558,7 @@ function patternKeyCompare(a, b$1) {
2594
2558
  * @returns {URL}
2595
2559
  */
2596
2560
  function packageImportsResolve(name, base, conditions) {
2597
- if (name === "#" || name.startsWith("#/") || name.endsWith("/")) {
2598
- const reason = "is not a valid internal imports specifier name";
2599
- throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base));
2600
- }
2561
+ if (name === "#" || name.startsWith("#/") || name.endsWith("/")) throw new ERR_INVALID_MODULE_SPECIFIER(name, "is not a valid internal imports specifier name", fileURLToPath(base));
2601
2562
  /** @type {URL | undefined} */
2602
2563
  let packageJsonUrl;
2603
2564
  const packageConfig = getPackageScopeConfig(base);
@@ -2648,10 +2609,9 @@ function parsePackageName(specifier, base) {
2648
2609
  const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);
2649
2610
  if (invalidPackageNameRegEx.exec(packageName) !== null) validPackageName = false;
2650
2611
  if (!validPackageName) throw new ERR_INVALID_MODULE_SPECIFIER(specifier, "is not a valid package name", fileURLToPath(base));
2651
- const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex));
2652
2612
  return {
2653
2613
  packageName,
2654
- packageSubpath,
2614
+ packageSubpath: "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)),
2655
2615
  isScoped
2656
2616
  };
2657
2617
  }
@@ -2729,8 +2689,7 @@ function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
2729
2689
  */
2730
2690
  function moduleResolve(specifier, base, conditions, preserveSymlinks) {
2731
2691
  const protocol = base.protocol;
2732
- const isData = protocol === "data:";
2733
- const isRemote = isData || protocol === "http:" || protocol === "https:";
2692
+ const isRemote = protocol === "data:" || protocol === "http:" || protocol === "https:";
2734
2693
  /** @type {URL | undefined} */
2735
2694
  let resolved;
2736
2695
  if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) try {
@@ -2804,8 +2763,7 @@ function _resolve(id, options = {}) {
2804
2763
  if (BUILTIN_MODULES.has(id)) return "node:" + id;
2805
2764
  if (id.startsWith("file://")) id = fileURLToPath$1(id);
2806
2765
  if (isAbsolute$1(id)) try {
2807
- const stat$1 = statSync(id);
2808
- if (stat$1.isFile()) return pathToFileURL$1(id);
2766
+ if (statSync(id).isFile()) return pathToFileURL$1(id);
2809
2767
  } catch (error) {
2810
2768
  if (error?.code !== "ENOENT") throw error;
2811
2769
  }
@@ -2828,7 +2786,7 @@ function _resolve(id, options = {}) {
2828
2786
  if (resolved) break;
2829
2787
  }
2830
2788
  if (!resolved) {
2831
- const error = new Error(`Cannot find module ${id} imported from ${urls.join(", ")}`);
2789
+ const error = /* @__PURE__ */ new Error(`Cannot find module ${id} imported from ${urls.join(", ")}`);
2832
2790
  error.code = "ERR_MODULE_NOT_FOUND";
2833
2791
  throw error;
2834
2792
  }
@@ -2916,21 +2874,19 @@ async function isValidNodeImport(id, _options = {}) {
2916
2874
  if (proto && !options.allowedProtocols?.includes(proto)) return false;
2917
2875
  if (proto === "data") return true;
2918
2876
  const resolvedPath = await resolvePath(id, options);
2919
- const extension = extname$1(resolvedPath);
2877
+ const extension = extname(resolvedPath);
2920
2878
  if (BUILTIN_EXTENSIONS.has(extension)) return true;
2921
2879
  if (extension !== ".js") return false;
2922
- const package_ = await readPackageJSON$1(resolvedPath).catch(() => {});
2923
- if (package_?.type === "module") return true;
2880
+ if ((await readPackageJSON$1(resolvedPath).catch(() => {}))?.type === "module") return true;
2924
2881
  if (/\.(?:\w+-)?esm?(?:-\w+)?\.js$|\/esm?\//.test(resolvedPath)) return false;
2925
- const code = options.code || await promises.readFile(resolvedPath, "utf8").catch(() => {}) || "";
2926
- return !hasESMSyntax(code, { stripComments: options.stripComments });
2882
+ return !hasESMSyntax(options.code || await promises.readFile(resolvedPath, "utf8").catch(() => {}) || "", { stripComments: options.stripComments });
2927
2883
  }
2928
2884
 
2929
2885
  //#endregion
2930
2886
  //#region node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs
2931
- const b = /^(?:( )+|\t+)/, d = "space", h$1 = "tab";
2887
+ const b = /^(?:( )+|\t+)/, d$1 = "space", h$1 = "tab";
2932
2888
  function g(e, t$5) {
2933
- const n = new Map();
2889
+ const n = /* @__PURE__ */ new Map();
2934
2890
  let s = 0, o, i;
2935
2891
  for (const c of e.split(/\n/g)) {
2936
2892
  if (!c) continue;
@@ -2938,7 +2894,7 @@ function g(e, t$5) {
2938
2894
  const y = c.match(b);
2939
2895
  if (y === null) s = 0, o = "";
2940
2896
  else {
2941
- if (f = y[0].length, a = y[1] ? d : h$1, t$5 && a === d && f === 1) continue;
2897
+ if (f = y[0].length, a = y[1] ? d$1 : h$1, t$5 && a === d$1 && f === 1) continue;
2942
2898
  a !== o && (s = 0), o = a, l = 1, p = 0;
2943
2899
  const u = f - s;
2944
2900
  if (s = f, u === 0) l = 0, p = 1;
@@ -2952,13 +2908,12 @@ function g(e, t$5) {
2952
2908
  return n;
2953
2909
  }
2954
2910
  function T(e, t$5) {
2955
- return (e === d ? "s" : "t") + String(t$5);
2911
+ return (e === d$1 ? "s" : "t") + String(t$5);
2956
2912
  }
2957
2913
  function w(e) {
2958
- const n = e[0] === "s" ? d : h$1, s = Number(e.slice(1));
2959
2914
  return {
2960
- type: n,
2961
- amount: s
2915
+ type: e[0] === "s" ? d$1 : h$1,
2916
+ amount: Number(e.slice(1))
2962
2917
  };
2963
2918
  }
2964
2919
  function E(e) {
@@ -2967,7 +2922,7 @@ function E(e) {
2967
2922
  return t$5;
2968
2923
  }
2969
2924
  function S$1(e, t$5) {
2970
- return (e === d ? " " : " ").repeat(t$5);
2925
+ return (e === d$1 ? " " : " ").repeat(t$5);
2971
2926
  }
2972
2927
  function _(e) {
2973
2928
  if (typeof e != "string") throw new TypeError("Expected a string");
@@ -2983,16 +2938,15 @@ function _(e) {
2983
2938
  }
2984
2939
  const m = Symbol.for("__confbox_fmt__"), k = /^(\s+)/, v = /(\s+)$/;
2985
2940
  function x$1(e, t$5 = {}) {
2986
- const n = t$5.indent === void 0 && t$5.preserveIndentation !== !1 && e.slice(0, t$5?.sampleSize || 1024), s = t$5.preserveWhitespace === !1 ? void 0 : {
2987
- start: k.exec(e)?.[0] || "",
2988
- end: v.exec(e)?.[0] || ""
2989
- };
2990
2941
  return {
2991
- sample: n,
2992
- whiteSpace: s
2942
+ sample: t$5.indent === void 0 && t$5.preserveIndentation !== !1 && e.slice(0, t$5?.sampleSize || 1024),
2943
+ whiteSpace: t$5.preserveWhitespace === !1 ? void 0 : {
2944
+ start: k.exec(e)?.[0] || "",
2945
+ end: v.exec(e)?.[0] || ""
2946
+ }
2993
2947
  };
2994
2948
  }
2995
- function N$1(e, t$5, n) {
2949
+ function N(e, t$5, n) {
2996
2950
  !t$5 || typeof t$5 != "object" || Object.defineProperty(t$5, m, {
2997
2951
  enumerable: !1,
2998
2952
  configurable: !0,
@@ -3222,11 +3176,11 @@ var Q;
3222
3176
  (function(n) {
3223
3177
  n[n.lineFeed = 10] = "lineFeed", n[n.carriageReturn = 13] = "carriageReturn", n[n.space = 32] = "space", n[n._0 = 48] = "_0", n[n._1 = 49] = "_1", n[n._2 = 50] = "_2", n[n._3 = 51] = "_3", n[n._4 = 52] = "_4", n[n._5 = 53] = "_5", n[n._6 = 54] = "_6", n[n._7 = 55] = "_7", n[n._8 = 56] = "_8", n[n._9 = 57] = "_9", n[n.a = 97] = "a", n[n.b = 98] = "b", n[n.c = 99] = "c", n[n.d = 100] = "d", n[n.e = 101] = "e", n[n.f = 102] = "f", n[n.g = 103] = "g", n[n.h = 104] = "h", n[n.i = 105] = "i", n[n.j = 106] = "j", n[n.k = 107] = "k", n[n.l = 108] = "l", n[n.m = 109] = "m", n[n.n = 110] = "n", n[n.o = 111] = "o", n[n.p = 112] = "p", n[n.q = 113] = "q", n[n.r = 114] = "r", n[n.s = 115] = "s", n[n.t = 116] = "t", n[n.u = 117] = "u", n[n.v = 118] = "v", n[n.w = 119] = "w", n[n.x = 120] = "x", n[n.y = 121] = "y", n[n.z = 122] = "z", n[n.A = 65] = "A", n[n.B = 66] = "B", n[n.C = 67] = "C", n[n.D = 68] = "D", n[n.E = 69] = "E", n[n.F = 70] = "F", n[n.G = 71] = "G", n[n.H = 72] = "H", n[n.I = 73] = "I", n[n.J = 74] = "J", n[n.K = 75] = "K", n[n.L = 76] = "L", n[n.M = 77] = "M", n[n.N = 78] = "N", n[n.O = 79] = "O", n[n.P = 80] = "P", n[n.Q = 81] = "Q", n[n.R = 82] = "R", n[n.S = 83] = "S", n[n.T = 84] = "T", n[n.U = 85] = "U", n[n.V = 86] = "V", n[n.W = 87] = "W", n[n.X = 88] = "X", n[n.Y = 89] = "Y", n[n.Z = 90] = "Z", n[n.asterisk = 42] = "asterisk", n[n.backslash = 92] = "backslash", n[n.closeBrace = 125] = "closeBrace", n[n.closeBracket = 93] = "closeBracket", n[n.colon = 58] = "colon", n[n.comma = 44] = "comma", n[n.dot = 46] = "dot", n[n.doubleQuote = 34] = "doubleQuote", n[n.minus = 45] = "minus", n[n.openBrace = 123] = "openBrace", n[n.openBracket = 91] = "openBracket", n[n.plus = 43] = "plus", n[n.slash = 47] = "slash", n[n.formFeed = 12] = "formFeed", n[n.tab = 9] = "tab";
3224
3178
  })(Q || (Q = {})), new Array(20).fill(0).map((n, l) => " ".repeat(l));
3225
- const N = 200;
3226
- new Array(N).fill(0).map((n, l) => `
3227
- ` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `\r
3228
- ` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `
3229
- ` + " ".repeat(l)), new Array(N).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N).fill(0).map((n, l) => `\r
3179
+ const N$1 = 200;
3180
+ new Array(N$1).fill(0).map((n, l) => `
3181
+ ` + " ".repeat(l)), new Array(N$1).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N$1).fill(0).map((n, l) => `\r
3182
+ ` + " ".repeat(l)), new Array(N$1).fill(0).map((n, l) => `
3183
+ ` + " ".repeat(l)), new Array(N$1).fill(0).map((n, l) => "\r" + " ".repeat(l)), new Array(N$1).fill(0).map((n, l) => `\r
3230
3184
  ` + " ".repeat(l));
3231
3185
  var U;
3232
3186
  (function(n) {
@@ -3412,7 +3366,7 @@ var q;
3412
3366
  })(q || (q = {}));
3413
3367
  function x(n, l) {
3414
3368
  const g$1 = JSON.parse(n, l?.reviver);
3415
- return N$1(n, g$1, l), g$1;
3369
+ return N(n, g$1, l), g$1;
3416
3370
  }
3417
3371
  function z(n, l) {
3418
3372
  const g$1 = C(n, l), e = JSON.stringify(n, l?.replacer, g$1.indent);
@@ -3420,7 +3374,7 @@ function z(n, l) {
3420
3374
  }
3421
3375
  function h(n, l) {
3422
3376
  const g$1 = K(n, l?.errors, l);
3423
- return N$1(n, g$1, l), g$1;
3377
+ return N(n, g$1, l), g$1;
3424
3378
  }
3425
3379
 
3426
3380
  //#endregion
@@ -3496,7 +3450,7 @@ async function resolvePackageJSON(id = process.cwd(), options = {}) {
3496
3450
 
3497
3451
  //#endregion
3498
3452
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
3499
- var require_constants = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports, module) {
3453
+ var require_constants = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js": ((exports, module) => {
3500
3454
  const SEMVER_SPEC_VERSION = "2.0.0";
3501
3455
  const MAX_LENGTH$2 = 256;
3502
3456
  const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
@@ -3521,18 +3475,18 @@ var require_constants = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modul
3521
3475
  FLAG_INCLUDE_PRERELEASE: 1,
3522
3476
  FLAG_LOOSE: 2
3523
3477
  };
3524
- } });
3478
+ }) });
3525
3479
 
3526
3480
  //#endregion
3527
3481
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
3528
- var require_debug = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js"(exports, module) {
3482
+ var require_debug = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js": ((exports, module) => {
3529
3483
  const debug$4 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
3530
3484
  module.exports = debug$4;
3531
- } });
3485
+ }) });
3532
3486
 
3533
3487
  //#endregion
3534
3488
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
3535
- var require_re = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js"(exports, module) {
3489
+ var require_re = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js": ((exports, module) => {
3536
3490
  const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants();
3537
3491
  const debug$3 = require_debug();
3538
3492
  exports = module.exports = {};
@@ -3608,11 +3562,11 @@ var require_re = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semv
3608
3562
  createToken("STAR", "(<|>)?=?\\s*\\*");
3609
3563
  createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
3610
3564
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
3611
- } });
3565
+ }) });
3612
3566
 
3613
3567
  //#endregion
3614
3568
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
3615
- var require_parse_options = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js"(exports, module) {
3569
+ var require_parse_options = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js": ((exports, module) => {
3616
3570
  const looseOption = Object.freeze({ loose: true });
3617
3571
  const emptyOpts = Object.freeze({});
3618
3572
  const parseOptions$3 = (options) => {
@@ -3621,11 +3575,11 @@ var require_parse_options = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_m
3621
3575
  return options;
3622
3576
  };
3623
3577
  module.exports = parseOptions$3;
3624
- } });
3578
+ }) });
3625
3579
 
3626
3580
  //#endregion
3627
3581
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
3628
- var require_identifiers = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports, module) {
3582
+ var require_identifiers = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js": ((exports, module) => {
3629
3583
  const numeric = /^[0-9]+$/;
3630
3584
  const compareIdentifiers$1 = (a, b$1) => {
3631
3585
  if (typeof a === "number" && typeof b$1 === "number") return a === b$1 ? 0 : a < b$1 ? -1 : 1;
@@ -3642,11 +3596,11 @@ var require_identifiers = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_mod
3642
3596
  compareIdentifiers: compareIdentifiers$1,
3643
3597
  rcompareIdentifiers
3644
3598
  };
3645
- } });
3599
+ }) });
3646
3600
 
3647
3601
  //#endregion
3648
3602
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
3649
- var require_semver$1 = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js"(exports, module) {
3603
+ var require_semver$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js": ((exports, module) => {
3650
3604
  const debug$2 = require_debug();
3651
3605
  const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
3652
3606
  const { safeRe: re$3, t: t$3 } = require_re();
@@ -3822,11 +3776,11 @@ var require_semver$1 = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_module
3822
3776
  }
3823
3777
  };
3824
3778
  module.exports = SemVer$15;
3825
- } });
3779
+ }) });
3826
3780
 
3827
3781
  //#endregion
3828
3782
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
3829
- var require_parse = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports, module) {
3783
+ var require_parse = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js": ((exports, module) => {
3830
3784
  const SemVer$14 = require_semver$1();
3831
3785
  const parse$6 = (version, options, throwErrors = false) => {
3832
3786
  if (version instanceof SemVer$14) return version;
@@ -3838,33 +3792,33 @@ var require_parse = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/s
3838
3792
  }
3839
3793
  };
3840
3794
  module.exports = parse$6;
3841
- } });
3795
+ }) });
3842
3796
 
3843
3797
  //#endregion
3844
3798
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js
3845
- var require_valid$1 = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports, module) {
3799
+ var require_valid$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js": ((exports, module) => {
3846
3800
  const parse$5 = require_parse();
3847
3801
  const valid$1 = (version, options) => {
3848
3802
  const v$2 = parse$5(version, options);
3849
3803
  return v$2 ? v$2.version : null;
3850
3804
  };
3851
3805
  module.exports = valid$1;
3852
- } });
3806
+ }) });
3853
3807
 
3854
3808
  //#endregion
3855
3809
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js
3856
- var require_clean = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports, module) {
3810
+ var require_clean = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js": ((exports, module) => {
3857
3811
  const parse$4 = require_parse();
3858
3812
  const clean$1 = (version, options) => {
3859
3813
  const s = parse$4(version.trim().replace(/^[=v]+/, ""), options);
3860
3814
  return s ? s.version : null;
3861
3815
  };
3862
3816
  module.exports = clean$1;
3863
- } });
3817
+ }) });
3864
3818
 
3865
3819
  //#endregion
3866
3820
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js
3867
- var require_inc = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js"(exports, module) {
3821
+ var require_inc = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.js": ((exports, module) => {
3868
3822
  const SemVer$13 = require_semver$1();
3869
3823
  const inc$1 = (version, release, options, identifier, identifierBase) => {
3870
3824
  if (typeof options === "string") {
@@ -3879,11 +3833,11 @@ var require_inc = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/sem
3879
3833
  }
3880
3834
  };
3881
3835
  module.exports = inc$1;
3882
- } });
3836
+ }) });
3883
3837
 
3884
3838
  //#endregion
3885
3839
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js
3886
- var require_diff = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports, module) {
3840
+ var require_diff = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js": ((exports, module) => {
3887
3841
  const parse$3 = require_parse();
3888
3842
  const diff$1 = (version1, version2) => {
3889
3843
  const v1 = parse$3(version1, null, true);
@@ -3894,8 +3848,7 @@ var require_diff = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/se
3894
3848
  const highVersion = v1Higher ? v1 : v2;
3895
3849
  const lowVersion = v1Higher ? v2 : v1;
3896
3850
  const highHasPre = !!highVersion.prerelease.length;
3897
- const lowHasPre = !!lowVersion.prerelease.length;
3898
- if (lowHasPre && !highHasPre) {
3851
+ if (!!lowVersion.prerelease.length && !highHasPre) {
3899
3852
  if (!lowVersion.patch && !lowVersion.minor) return "major";
3900
3853
  if (lowVersion.compareMain(highVersion) === 0) {
3901
3854
  if (lowVersion.minor && !lowVersion.patch) return "minor";
@@ -3909,70 +3862,70 @@ var require_diff = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/se
3909
3862
  return "prerelease";
3910
3863
  };
3911
3864
  module.exports = diff$1;
3912
- } });
3865
+ }) });
3913
3866
 
3914
3867
  //#endregion
3915
3868
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js
3916
- var require_major = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js"(exports, module) {
3869
+ var require_major = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.js": ((exports, module) => {
3917
3870
  const SemVer$12 = require_semver$1();
3918
3871
  const major$1 = (a, loose) => new SemVer$12(a, loose).major;
3919
3872
  module.exports = major$1;
3920
- } });
3873
+ }) });
3921
3874
 
3922
3875
  //#endregion
3923
3876
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js
3924
- var require_minor = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js"(exports, module) {
3877
+ var require_minor = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.js": ((exports, module) => {
3925
3878
  const SemVer$11 = require_semver$1();
3926
3879
  const minor$1 = (a, loose) => new SemVer$11(a, loose).minor;
3927
3880
  module.exports = minor$1;
3928
- } });
3881
+ }) });
3929
3882
 
3930
3883
  //#endregion
3931
3884
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js
3932
- var require_patch = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js"(exports, module) {
3885
+ var require_patch = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.js": ((exports, module) => {
3933
3886
  const SemVer$10 = require_semver$1();
3934
3887
  const patch$1 = (a, loose) => new SemVer$10(a, loose).patch;
3935
3888
  module.exports = patch$1;
3936
- } });
3889
+ }) });
3937
3890
 
3938
3891
  //#endregion
3939
3892
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js
3940
- var require_prerelease = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports, module) {
3893
+ var require_prerelease = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js": ((exports, module) => {
3941
3894
  const parse$2 = require_parse();
3942
3895
  const prerelease$1 = (version, options) => {
3943
3896
  const parsed = parse$2(version, options);
3944
3897
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
3945
3898
  };
3946
3899
  module.exports = prerelease$1;
3947
- } });
3900
+ }) });
3948
3901
 
3949
3902
  //#endregion
3950
3903
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
3951
- var require_compare = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js"(exports, module) {
3904
+ var require_compare = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js": ((exports, module) => {
3952
3905
  const SemVer$9 = require_semver$1();
3953
3906
  const compare$11 = (a, b$1, loose) => new SemVer$9(a, loose).compare(new SemVer$9(b$1, loose));
3954
3907
  module.exports = compare$11;
3955
- } });
3908
+ }) });
3956
3909
 
3957
3910
  //#endregion
3958
3911
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js
3959
- var require_rcompare = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js"(exports, module) {
3912
+ var require_rcompare = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.js": ((exports, module) => {
3960
3913
  const compare$10 = require_compare();
3961
3914
  const rcompare$1 = (a, b$1, loose) => compare$10(b$1, a, loose);
3962
3915
  module.exports = rcompare$1;
3963
- } });
3916
+ }) });
3964
3917
 
3965
3918
  //#endregion
3966
3919
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js
3967
- var require_compare_loose = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js"(exports, module) {
3920
+ var require_compare_loose = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.js": ((exports, module) => {
3968
3921
  const compare$9 = require_compare();
3969
3922
  const compareLoose$1 = (a, b$1) => compare$9(a, b$1, true);
3970
3923
  module.exports = compareLoose$1;
3971
- } });
3924
+ }) });
3972
3925
 
3973
3926
  //#endregion
3974
3927
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js
3975
- var require_compare_build = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js"(exports, module) {
3928
+ var require_compare_build = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.js": ((exports, module) => {
3976
3929
  const SemVer$8 = require_semver$1();
3977
3930
  const compareBuild$3 = (a, b$1, loose) => {
3978
3931
  const versionA = new SemVer$8(a, loose);
@@ -3980,75 +3933,75 @@ var require_compare_build = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_m
3980
3933
  return versionA.compare(versionB) || versionA.compareBuild(versionB);
3981
3934
  };
3982
3935
  module.exports = compareBuild$3;
3983
- } });
3936
+ }) });
3984
3937
 
3985
3938
  //#endregion
3986
3939
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js
3987
- var require_sort = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js"(exports, module) {
3940
+ var require_sort = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.js": ((exports, module) => {
3988
3941
  const compareBuild$2 = require_compare_build();
3989
3942
  const sort$1 = (list, loose) => list.sort((a, b$1) => compareBuild$2(a, b$1, loose));
3990
3943
  module.exports = sort$1;
3991
- } });
3944
+ }) });
3992
3945
 
3993
3946
  //#endregion
3994
3947
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js
3995
- var require_rsort = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js"(exports, module) {
3948
+ var require_rsort = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.js": ((exports, module) => {
3996
3949
  const compareBuild$1 = require_compare_build();
3997
3950
  const rsort$1 = (list, loose) => list.sort((a, b$1) => compareBuild$1(b$1, a, loose));
3998
3951
  module.exports = rsort$1;
3999
- } });
3952
+ }) });
4000
3953
 
4001
3954
  //#endregion
4002
3955
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
4003
- var require_gt = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js"(exports, module) {
3956
+ var require_gt = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js": ((exports, module) => {
4004
3957
  const compare$8 = require_compare();
4005
3958
  const gt$4 = (a, b$1, loose) => compare$8(a, b$1, loose) > 0;
4006
3959
  module.exports = gt$4;
4007
- } });
3960
+ }) });
4008
3961
 
4009
3962
  //#endregion
4010
3963
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
4011
- var require_lt = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js"(exports, module) {
3964
+ var require_lt = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js": ((exports, module) => {
4012
3965
  const compare$7 = require_compare();
4013
3966
  const lt$3 = (a, b$1, loose) => compare$7(a, b$1, loose) < 0;
4014
3967
  module.exports = lt$3;
4015
- } });
3968
+ }) });
4016
3969
 
4017
3970
  //#endregion
4018
3971
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
4019
- var require_eq = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js"(exports, module) {
3972
+ var require_eq = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js": ((exports, module) => {
4020
3973
  const compare$6 = require_compare();
4021
3974
  const eq$2 = (a, b$1, loose) => compare$6(a, b$1, loose) === 0;
4022
3975
  module.exports = eq$2;
4023
- } });
3976
+ }) });
4024
3977
 
4025
3978
  //#endregion
4026
3979
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
4027
- var require_neq = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js"(exports, module) {
3980
+ var require_neq = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js": ((exports, module) => {
4028
3981
  const compare$5 = require_compare();
4029
3982
  const neq$2 = (a, b$1, loose) => compare$5(a, b$1, loose) !== 0;
4030
3983
  module.exports = neq$2;
4031
- } });
3984
+ }) });
4032
3985
 
4033
3986
  //#endregion
4034
3987
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
4035
- var require_gte = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js"(exports, module) {
3988
+ var require_gte = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js": ((exports, module) => {
4036
3989
  const compare$4 = require_compare();
4037
3990
  const gte$3 = (a, b$1, loose) => compare$4(a, b$1, loose) >= 0;
4038
3991
  module.exports = gte$3;
4039
- } });
3992
+ }) });
4040
3993
 
4041
3994
  //#endregion
4042
3995
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
4043
- var require_lte = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js"(exports, module) {
3996
+ var require_lte = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js": ((exports, module) => {
4044
3997
  const compare$3 = require_compare();
4045
3998
  const lte$3 = (a, b$1, loose) => compare$3(a, b$1, loose) <= 0;
4046
3999
  module.exports = lte$3;
4047
- } });
4000
+ }) });
4048
4001
 
4049
4002
  //#endregion
4050
4003
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
4051
- var require_cmp = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js"(exports, module) {
4004
+ var require_cmp = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js": ((exports, module) => {
4052
4005
  const eq$1 = require_eq();
4053
4006
  const neq$1 = require_neq();
4054
4007
  const gt$3 = require_gt();
@@ -4077,11 +4030,11 @@ var require_cmp = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/sem
4077
4030
  }
4078
4031
  };
4079
4032
  module.exports = cmp$2;
4080
- } });
4033
+ }) });
4081
4034
 
4082
4035
  //#endregion
4083
4036
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
4084
- var require_coerce = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports, module) {
4037
+ var require_coerce = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js": ((exports, module) => {
4085
4038
  const SemVer$7 = require_semver$1();
4086
4039
  const parse$1 = require_parse();
4087
4040
  const { safeRe: re$2, t: t$2 } = require_re();
@@ -4103,26 +4056,22 @@ var require_coerce = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/
4103
4056
  }
4104
4057
  if (match === null) return null;
4105
4058
  const major$2 = match[2];
4106
- const minor$2 = match[3] || "0";
4107
- const patch$2 = match[4] || "0";
4108
- const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : "";
4109
- const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
4110
- return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build}`, options);
4059
+ return parse$1(`${major$2}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
4111
4060
  };
4112
4061
  module.exports = coerce$1;
4113
- } });
4062
+ }) });
4114
4063
 
4115
4064
  //#endregion
4116
4065
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
4117
- var require_lrucache = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js"(exports, module) {
4066
+ var require_lrucache = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js": ((exports, module) => {
4118
4067
  var LRUCache = class {
4119
4068
  constructor() {
4120
4069
  this.max = 1e3;
4121
- this.map = new Map();
4070
+ this.map = /* @__PURE__ */ new Map();
4122
4071
  }
4123
4072
  get(key) {
4124
4073
  const value = this.map.get(key);
4125
- if (value === void 0) return void 0;
4074
+ if (value === void 0) return;
4126
4075
  else {
4127
4076
  this.map.delete(key);
4128
4077
  this.map.set(key, value);
@@ -4133,8 +4082,7 @@ var require_lrucache = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_module
4133
4082
  return this.map.delete(key);
4134
4083
  }
4135
4084
  set(key, value) {
4136
- const deleted = this.delete(key);
4137
- if (!deleted && value !== void 0) {
4085
+ if (!this.delete(key) && value !== void 0) {
4138
4086
  if (this.map.size >= this.max) {
4139
4087
  const firstKey = this.map.keys().next().value;
4140
4088
  this.delete(firstKey);
@@ -4145,11 +4093,11 @@ var require_lrucache = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_module
4145
4093
  }
4146
4094
  };
4147
4095
  module.exports = LRUCache;
4148
- } });
4096
+ }) });
4149
4097
 
4150
4098
  //#endregion
4151
4099
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
4152
- var require_range = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js"(exports, module) {
4100
+ var require_range = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js": ((exports, module) => {
4153
4101
  const SPACE_CHARACTERS = /\s+/g;
4154
4102
  var Range$11 = class Range$11 {
4155
4103
  constructor(range, options) {
@@ -4202,8 +4150,7 @@ var require_range = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/s
4202
4150
  return this.range;
4203
4151
  }
4204
4152
  parseRange(range) {
4205
- const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
4206
- const memoKey = memoOpts + ":" + range;
4153
+ const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
4207
4154
  const cached = cache.get(memoKey);
4208
4155
  if (cached) return cached;
4209
4156
  const loose = this.options.loose;
@@ -4222,7 +4169,7 @@ var require_range = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/s
4222
4169
  return !!comp.match(re$1[t$1.COMPARATORLOOSE]);
4223
4170
  });
4224
4171
  debug$1("range list", rangeList);
4225
- const rangeMap = new Map();
4172
+ const rangeMap = /* @__PURE__ */ new Map();
4226
4173
  const comparators = rangeList.map((comp) => new Comparator$4(comp, this.options));
4227
4174
  for (const comp of comparators) {
4228
4175
  if (isNullSet(comp)) return [comp];
@@ -4257,8 +4204,7 @@ var require_range = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/s
4257
4204
  }
4258
4205
  };
4259
4206
  module.exports = Range$11;
4260
- const LRU = require_lrucache();
4261
- const cache = new LRU();
4207
+ const cache = new (require_lrucache())();
4262
4208
  const parseOptions$1 = require_parse_options();
4263
4209
  const Comparator$4 = require_comparator();
4264
4210
  const debug$1 = require_debug();
@@ -4318,14 +4264,14 @@ var require_range = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/s
4318
4264
  const replaceCaret = (comp, options) => {
4319
4265
  debug$1("caret", comp, options);
4320
4266
  const r$3 = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET];
4321
- const z$1 = options.includePrerelease ? "-0" : "";
4267
+ const z$2 = options.includePrerelease ? "-0" : "";
4322
4268
  return comp.replace(r$3, (_$1, M, m$2, p, pr) => {
4323
4269
  debug$1("caret", comp, _$1, M, m$2, p, pr);
4324
4270
  let ret;
4325
4271
  if (isX(M)) ret = "";
4326
- else if (isX(m$2)) ret = `>=${M}.0.0${z$1} <${+M + 1}.0.0-0`;
4327
- else if (isX(p)) if (M === "0") ret = `>=${M}.${m$2}.0${z$1} <${M}.${+m$2 + 1}.0-0`;
4328
- else ret = `>=${M}.${m$2}.0${z$1} <${+M + 1}.0.0-0`;
4272
+ else if (isX(m$2)) ret = `>=${M}.0.0${z$2} <${+M + 1}.0.0-0`;
4273
+ else if (isX(p)) if (M === "0") ret = `>=${M}.${m$2}.0${z$2} <${M}.${+m$2 + 1}.0-0`;
4274
+ else ret = `>=${M}.${m$2}.0${z$2} <${+M + 1}.0.0-0`;
4329
4275
  else if (pr) {
4330
4276
  debug$1("replaceCaret pr", pr);
4331
4277
  if (M === "0") if (m$2 === "0") ret = `>=${M}.${m$2}.${p}-${pr} <${M}.${m$2}.${+p + 1}-0`;
@@ -4333,8 +4279,8 @@ var require_range = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/s
4333
4279
  else ret = `>=${M}.${m$2}.${p}-${pr} <${+M + 1}.0.0-0`;
4334
4280
  } else {
4335
4281
  debug$1("no pr");
4336
- if (M === "0") if (m$2 === "0") ret = `>=${M}.${m$2}.${p}${z$1} <${M}.${m$2}.${+p + 1}-0`;
4337
- else ret = `>=${M}.${m$2}.${p}${z$1} <${M}.${+m$2 + 1}.0-0`;
4282
+ if (M === "0") if (m$2 === "0") ret = `>=${M}.${m$2}.${p}${z$2} <${M}.${m$2}.${+p + 1}-0`;
4283
+ else ret = `>=${M}.${m$2}.${p}${z$2} <${M}.${+m$2 + 1}.0-0`;
4338
4284
  else ret = `>=${M}.${m$2}.${p} <${+M + 1}.0.0-0`;
4339
4285
  }
4340
4286
  debug$1("caret return", ret);
@@ -4421,11 +4367,11 @@ var require_range = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/s
4421
4367
  }
4422
4368
  return true;
4423
4369
  };
4424
- } });
4370
+ }) });
4425
4371
 
4426
4372
  //#endregion
4427
4373
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
4428
- var require_comparator = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js"(exports, module) {
4374
+ var require_comparator = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js": ((exports, module) => {
4429
4375
  const ANY$2 = Symbol("SemVer ANY");
4430
4376
  var Comparator$3 = class Comparator$3 {
4431
4377
  static get ANY() {
@@ -4493,11 +4439,11 @@ var require_comparator = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modu
4493
4439
  const debug = require_debug();
4494
4440
  const SemVer$5 = require_semver$1();
4495
4441
  const Range$10 = require_range();
4496
- } });
4442
+ }) });
4497
4443
 
4498
4444
  //#endregion
4499
4445
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
4500
- var require_satisfies = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports, module) {
4446
+ var require_satisfies = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js": ((exports, module) => {
4501
4447
  const Range$9 = require_range();
4502
4448
  const satisfies$4 = (version, range, options) => {
4503
4449
  try {
@@ -4508,19 +4454,19 @@ var require_satisfies = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modul
4508
4454
  return range.test(version);
4509
4455
  };
4510
4456
  module.exports = satisfies$4;
4511
- } });
4457
+ }) });
4512
4458
 
4513
4459
  //#endregion
4514
4460
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js
4515
- var require_to_comparators = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js"(exports, module) {
4461
+ var require_to_comparators = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.js": ((exports, module) => {
4516
4462
  const Range$8 = require_range();
4517
4463
  const toComparators$1 = (range, options) => new Range$8(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
4518
4464
  module.exports = toComparators$1;
4519
- } });
4465
+ }) });
4520
4466
 
4521
4467
  //#endregion
4522
4468
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js
4523
- var require_max_satisfying = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
4469
+ var require_max_satisfying = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.js": ((exports, module) => {
4524
4470
  const SemVer$4 = require_semver$1();
4525
4471
  const Range$7 = require_range();
4526
4472
  const maxSatisfying$1 = (versions, range, options) => {
@@ -4543,11 +4489,11 @@ var require_max_satisfying = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_
4543
4489
  return max;
4544
4490
  };
4545
4491
  module.exports = maxSatisfying$1;
4546
- } });
4492
+ }) });
4547
4493
 
4548
4494
  //#endregion
4549
4495
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js
4550
- var require_min_satisfying = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
4496
+ var require_min_satisfying = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.js": ((exports, module) => {
4551
4497
  const SemVer$3 = require_semver$1();
4552
4498
  const Range$6 = require_range();
4553
4499
  const minSatisfying$1 = (versions, range, options) => {
@@ -4570,11 +4516,11 @@ var require_min_satisfying = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_
4570
4516
  return min;
4571
4517
  };
4572
4518
  module.exports = minSatisfying$1;
4573
- } });
4519
+ }) });
4574
4520
 
4575
4521
  //#endregion
4576
4522
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js
4577
- var require_min_version = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js"(exports, module) {
4523
+ var require_min_version = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.js": ((exports, module) => {
4578
4524
  const SemVer$2 = require_semver$1();
4579
4525
  const Range$5 = require_range();
4580
4526
  const gt$2 = require_gt();
@@ -4610,11 +4556,11 @@ var require_min_version = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_mod
4610
4556
  return null;
4611
4557
  };
4612
4558
  module.exports = minVersion$1;
4613
- } });
4559
+ }) });
4614
4560
 
4615
4561
  //#endregion
4616
4562
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js
4617
- var require_valid = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js"(exports, module) {
4563
+ var require_valid = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.js": ((exports, module) => {
4618
4564
  const Range$4 = require_range();
4619
4565
  const validRange$1 = (range, options) => {
4620
4566
  try {
@@ -4624,11 +4570,11 @@ var require_valid = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/s
4624
4570
  }
4625
4571
  };
4626
4572
  module.exports = validRange$1;
4627
- } });
4573
+ }) });
4628
4574
 
4629
4575
  //#endregion
4630
4576
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js
4631
- var require_outside = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js"(exports, module) {
4577
+ var require_outside = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.js": ((exports, module) => {
4632
4578
  const SemVer$1 = require_semver$1();
4633
4579
  const Comparator$2 = require_comparator();
4634
4580
  const { ANY: ANY$1 } = Comparator$2;
@@ -4678,27 +4624,27 @@ var require_outside = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules
4678
4624
  return true;
4679
4625
  };
4680
4626
  module.exports = outside$3;
4681
- } });
4627
+ }) });
4682
4628
 
4683
4629
  //#endregion
4684
4630
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js
4685
- var require_gtr = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js"(exports, module) {
4631
+ var require_gtr = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.js": ((exports, module) => {
4686
4632
  const outside$2 = require_outside();
4687
4633
  const gtr$1 = (version, range, options) => outside$2(version, range, ">", options);
4688
4634
  module.exports = gtr$1;
4689
- } });
4635
+ }) });
4690
4636
 
4691
4637
  //#endregion
4692
4638
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js
4693
- var require_ltr = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js"(exports, module) {
4639
+ var require_ltr = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.js": ((exports, module) => {
4694
4640
  const outside$1 = require_outside();
4695
4641
  const ltr$1 = (version, range, options) => outside$1(version, range, "<", options);
4696
4642
  module.exports = ltr$1;
4697
- } });
4643
+ }) });
4698
4644
 
4699
4645
  //#endregion
4700
4646
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js
4701
- var require_intersects = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js"(exports, module) {
4647
+ var require_intersects = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.js": ((exports, module) => {
4702
4648
  const Range$2 = require_range();
4703
4649
  const intersects$1 = (r1, r2, options) => {
4704
4650
  r1 = new Range$2(r1, options);
@@ -4706,11 +4652,11 @@ var require_intersects = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modu
4706
4652
  return r1.intersects(r2, options);
4707
4653
  };
4708
4654
  module.exports = intersects$1;
4709
- } });
4655
+ }) });
4710
4656
 
4711
4657
  //#endregion
4712
4658
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js
4713
- var require_simplify = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js"(exports, module) {
4659
+ var require_simplify = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.js": ((exports, module) => {
4714
4660
  const satisfies$2 = require_satisfies();
4715
4661
  const compare$2 = require_compare();
4716
4662
  module.exports = (versions, range, options) => {
@@ -4718,16 +4664,13 @@ var require_simplify = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_module
4718
4664
  let first = null;
4719
4665
  let prev = null;
4720
4666
  const v$2 = versions.sort((a, b$1) => compare$2(a, b$1, options));
4721
- for (const version of v$2) {
4722
- const included = satisfies$2(version, range, options);
4723
- if (included) {
4724
- prev = version;
4725
- if (!first) first = version;
4726
- } else {
4727
- if (prev) set.push([first, prev]);
4728
- prev = null;
4729
- first = null;
4730
- }
4667
+ for (const version of v$2) if (satisfies$2(version, range, options)) {
4668
+ prev = version;
4669
+ if (!first) first = version;
4670
+ } else {
4671
+ if (prev) set.push([first, prev]);
4672
+ prev = null;
4673
+ first = null;
4731
4674
  }
4732
4675
  if (first) set.push([first, null]);
4733
4676
  const ranges = [];
@@ -4740,11 +4683,11 @@ var require_simplify = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_module
4740
4683
  const original = typeof range.raw === "string" ? range.raw : String(range);
4741
4684
  return simplified.length < original.length ? simplified : range;
4742
4685
  };
4743
- } });
4686
+ }) });
4744
4687
 
4745
4688
  //#endregion
4746
4689
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js
4747
- var require_subset = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js"(exports, module) {
4690
+ var require_subset = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.js": ((exports, module) => {
4748
4691
  const Range$1 = require_range();
4749
4692
  const Comparator$1 = require_comparator();
4750
4693
  const { ANY } = Comparator$1;
@@ -4774,7 +4717,7 @@ var require_subset = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/
4774
4717
  else sub = minimumVersion;
4775
4718
  if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
4776
4719
  else dom = minimumVersion;
4777
- const eqSet = new Set();
4720
+ const eqSet = /* @__PURE__ */ new Set();
4778
4721
  let gt$5, lt$4;
4779
4722
  for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt$5 = higherGT(gt$5, c, options);
4780
4723
  else if (c.operator === "<" || c.operator === "<=") lt$4 = lowerLT(lt$4, c, options);
@@ -4836,11 +4779,11 @@ var require_subset = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/
4836
4779
  return comp < 0 ? a : comp > 0 ? b$1 : b$1.operator === "<" && a.operator === "<=" ? b$1 : a;
4837
4780
  };
4838
4781
  module.exports = subset$1;
4839
- } });
4782
+ }) });
4840
4783
 
4841
4784
  //#endregion
4842
4785
  //#region node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js
4843
- var require_semver = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js"(exports, module) {
4786
+ var require_semver = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.js": ((exports, module) => {
4844
4787
  const internalRe = require_re();
4845
4788
  const constants = require_constants();
4846
4789
  const SemVer = require_semver$1();
@@ -4929,11 +4872,11 @@ var require_semver = __commonJS({ "node_modules/.pnpm/semver@7.7.3/node_modules/
4929
4872
  compareIdentifiers: identifiers.compareIdentifiers,
4930
4873
  rcompareIdentifiers: identifiers.rcompareIdentifiers
4931
4874
  };
4932
- } });
4875
+ }) });
4933
4876
 
4934
4877
  //#endregion
4935
4878
  //#region src/trace.ts
4936
- var import_semver = __toESM(require_semver(), 1);
4879
+ var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
4937
4880
  async function traceNodeModules(input, opts) {
4938
4881
  const _fileTrace = await nodeFileTrace([...input], {
4939
4882
  conditions: (opts.exportConditions || [
@@ -4956,15 +4899,13 @@ async function traceNodeModules(input, opts) {
4956
4899
  const { dir: baseDir, name: pkgName, subpath } = parseNodeModulePath(path$1);
4957
4900
  if (!baseDir || !pkgName) return;
4958
4901
  const pkgPath = join(baseDir, pkgName);
4959
- const parents = await Promise.all([...reasons.parents].map((p) => _resolveTracedPath(p)));
4960
- const tracedFile = {
4902
+ return [path$1, {
4961
4903
  path: path$1,
4962
- parents,
4904
+ parents: await Promise.all([...reasons.parents].map((p) => _resolveTracedPath(p))),
4963
4905
  subpath,
4964
4906
  pkgName,
4965
4907
  pkgPath
4966
- };
4967
- return [path$1, tracedFile];
4908
+ }];
4968
4909
  })).then((r$3) => r$3.filter(Boolean)));
4969
4910
  const tracedPackages = {};
4970
4911
  for (const tracedFile of Object.values(tracedFiles)) {
@@ -5022,9 +4963,7 @@ async function traceNodeModules(input, opts) {
5022
4963
  const linkPackage = async (from, to) => {
5023
4964
  const src$1 = join(outDir, from);
5024
4965
  const dst = join(outDir, to);
5025
- const dstStat = await promises.lstat(dst).catch(() => null);
5026
- const exists = dstStat?.isSymbolicLink();
5027
- if (exists) return;
4966
+ if ((await promises.lstat(dst).catch(() => null))?.isSymbolicLink()) return;
5028
4967
  await promises.mkdir(dirname(dst), { recursive: true });
5029
4968
  await promises.symlink(relative(dirname(dst), src$1), dst, isWindows$1 ? "junction" : "dir").catch((error) => {
5030
4969
  if (error.code !== "EEXIST") console.error("Cannot link", from, "to", to, error);
@@ -5032,12 +4971,11 @@ async function traceNodeModules(input, opts) {
5032
4971
  };
5033
4972
  const findPackageParents = (pkg, version) => {
5034
4973
  const versionFiles = pkg.versions[version].files.map((path$1) => tracedFiles[path$1]);
5035
- const parentPkgs = [...new Set(versionFiles.flatMap((file) => file.parents.map((parentPath) => {
4974
+ return [...new Set(versionFiles.flatMap((file) => file.parents.map((parentPath) => {
5036
4975
  const parentFile = tracedFiles[parentPath];
5037
4976
  if (!parentFile || parentFile.pkgName === pkg.name) return null;
5038
4977
  return `${parentFile.pkgName}@${parentFile.pkgVersion}`;
5039
4978
  }).filter(Boolean)))];
5040
- return parentPkgs;
5041
4979
  };
5042
4980
  const multiVersionPkgs = {};
5043
4981
  const singleVersionPackages = [];
@@ -5093,8 +5031,7 @@ function applyProductionCondition(exports$1) {
5093
5031
  }
5094
5032
  async function isFile(file) {
5095
5033
  try {
5096
- const stat$1 = await promises.stat(file);
5097
- return stat$1.isFile();
5034
+ return (await promises.stat(file)).isFile();
5098
5035
  } catch (error) {
5099
5036
  if (error?.code === "ENOENT") return false;
5100
5037
  throw error;
@@ -5104,7 +5041,7 @@ async function isFile(file) {
5104
5041
  //#endregion
5105
5042
  //#region src/plugin.ts
5106
5043
  function rollupNodeFileTrace(opts = {}) {
5107
- const trackedExternals = new Set();
5044
+ const trackedExternals = /* @__PURE__ */ new Set();
5108
5045
  const moduleDirectories = opts.moduleDirectories || [resolve(opts.rootDir || ".", "node_modules") + "/"];
5109
5046
  const tryResolve = (id, importer) => {
5110
5047
  if (id.startsWith("\0")) return id;
@@ -5134,53 +5071,55 @@ function rollupNodeFileTrace(opts = {}) {
5134
5071
  if (inlineMatch && (!externalMatch || externalMatch && (inlineMatch.score || 0) > (externalMatch.score || 0))) return true;
5135
5072
  };
5136
5073
  return {
5137
- name: "node-externals",
5138
- async resolveId(originalId, importer, options) {
5139
- if (!originalId || originalId.startsWith("\0") || originalId.includes("?") || originalId.startsWith("#")) return null;
5140
- if (originalId.startsWith(".")) return null;
5141
- const id = normalize(originalId);
5142
- if (isExplicitInline(id, importer)) return null;
5143
- const resolved = await this.resolve(originalId, importer, options) || { id };
5144
- if (isExplicitInline(resolved.id, importer)) return null;
5145
- if (!isAbsolute$1(resolved.id) || !existsSync(resolved.id) || await isDirectory(resolved.id)) resolved.id = tryResolve(resolved.id, importer) || resolved.id;
5146
- if (!await isValidNodeImport(resolved.id).catch(() => false)) return null;
5147
- if (opts.noTrace) return {
5148
- ...resolved,
5149
- id: isAbsolute$1(resolved.id) ? normalizeid(resolved.id) : resolved.id,
5150
- external: true
5151
- };
5152
- const { name: pkgName } = parseNodeModulePath(resolved.id);
5153
- if (!pkgName) return null;
5154
- if (pkgName !== originalId) {
5155
- if (!isAbsolute$1(originalId)) {
5156
- const fullPath = tryResolve(originalId, importer);
5157
- if (fullPath) {
5158
- trackedExternals.add(fullPath);
5159
- return {
5160
- id: originalId,
5161
- external: true
5162
- };
5074
+ name: "nf3",
5075
+ resolveId: {
5076
+ order: "pre",
5077
+ async handler(originalId, importer, options) {
5078
+ if (!originalId || originalId.startsWith("\0") || originalId.includes("?") || originalId.startsWith("#")) return null;
5079
+ if (originalId.startsWith(".")) return null;
5080
+ const id = normalize(originalId);
5081
+ if (isExplicitInline(id, importer)) return null;
5082
+ const resolved = await this.resolve(originalId, importer, options) || { id };
5083
+ if (isExplicitInline(resolved.id, importer)) return null;
5084
+ if (!isAbsolute$1(resolved.id) || !existsSync(resolved.id) || await isDirectory(resolved.id)) resolved.id = tryResolve(resolved.id, importer) || resolved.id;
5085
+ if (!await isValidNodeImport(resolved.id).catch(() => false)) return null;
5086
+ if (opts.noTrace) return {
5087
+ ...resolved,
5088
+ id: isAbsolute$1(resolved.id) ? normalizeid(resolved.id) : resolved.id,
5089
+ external: true
5090
+ };
5091
+ const { name: pkgName } = parseNodeModulePath(resolved.id);
5092
+ if (!pkgName) return null;
5093
+ if (pkgName !== originalId) {
5094
+ if (!isAbsolute$1(originalId)) {
5095
+ const fullPath = tryResolve(originalId, importer);
5096
+ if (fullPath) {
5097
+ trackedExternals.add(fullPath);
5098
+ return {
5099
+ id: originalId,
5100
+ external: true
5101
+ };
5102
+ }
5163
5103
  }
5164
- }
5165
- const packageEntry = tryResolve(pkgName, importer);
5166
- if (packageEntry !== id) {
5167
- const guessedSubpath = await lookupNodeModuleSubpath(id).catch(() => null);
5168
- const resolvedGuess = guessedSubpath && tryResolve(join(pkgName, guessedSubpath), importer);
5169
- if (resolvedGuess === id) {
5170
- trackedExternals.add(resolvedGuess);
5171
- return {
5172
- id: join(pkgName, guessedSubpath),
5173
- external: true
5174
- };
5104
+ if (tryResolve(pkgName, importer) !== id) {
5105
+ const guessedSubpath = await lookupNodeModuleSubpath(id).catch(() => null);
5106
+ const resolvedGuess = guessedSubpath && tryResolve(join(pkgName, guessedSubpath), importer);
5107
+ if (resolvedGuess === id) {
5108
+ trackedExternals.add(resolvedGuess);
5109
+ return {
5110
+ id: join(pkgName, guessedSubpath),
5111
+ external: true
5112
+ };
5113
+ }
5114
+ return null;
5175
5115
  }
5176
- return null;
5177
5116
  }
5117
+ trackedExternals.add(resolved.id);
5118
+ return {
5119
+ id: pkgName,
5120
+ external: true
5121
+ };
5178
5122
  }
5179
- trackedExternals.add(resolved.id);
5180
- return {
5181
- id: pkgName,
5182
- external: true
5183
- };
5184
5123
  },
5185
5124
  async buildEnd() {
5186
5125
  if (opts.noTrace) return;
@@ -5198,17 +5137,17 @@ function normalizeMatcher(input) {
5198
5137
  return input;
5199
5138
  }
5200
5139
  if (input instanceof RegExp) {
5201
- const matcher = (id) => input.test(id);
5140
+ const matcher = ((id) => input.test(id));
5202
5141
  matcher.score = input.toString().length;
5203
5142
  Object.defineProperty(matcher, "name", { value: `match(${input})` });
5204
5143
  return matcher;
5205
5144
  }
5206
5145
  if (typeof input === "string") {
5207
5146
  const pattern = normalize(input);
5208
- const matcher = (id) => {
5147
+ const matcher = ((id) => {
5209
5148
  const idWithoutNodeModules = id.split("node_modules/").pop();
5210
5149
  return id.startsWith(pattern) || idWithoutNodeModules?.startsWith(pattern);
5211
- };
5150
+ });
5212
5151
  matcher.score = input.length;
5213
5152
  if (!isAbsolute$1(input) && input[0] !== ".") matcher.score += 1e3;
5214
5153
  Object.defineProperty(matcher, "name", { value: `match(${pattern})` });