vite 7.0.0 → 7.0.2

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.
@@ -165,15 +165,15 @@ function withTrailingSlash(path$13) {
165
165
  }
166
166
  const AsyncFunction$1 = async function() {}.constructor;
167
167
  function promiseWithResolvers() {
168
- let resolve$5;
168
+ let resolve$4;
169
169
  let reject;
170
170
  const promise = new Promise((_resolve, _reject) => {
171
- resolve$5 = _resolve;
171
+ resolve$4 = _resolve;
172
172
  reject = _reject;
173
173
  });
174
174
  return {
175
175
  promise,
176
- resolve: resolve$5,
176
+ resolve: resolve$4,
177
177
  reject
178
178
  };
179
179
  }
@@ -185,7 +185,7 @@ const semicolon = ";".charCodeAt(0);
185
185
  const chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
186
186
  const intToChar = new Uint8Array(64);
187
187
  const charToInt = new Uint8Array(128);
188
- for (let i$1 = 0; i$1 < chars$1.length; i$1++) {
188
+ for (let i$1 = 0; i$1 < 64; i$1++) {
189
189
  const c = chars$1.charCodeAt(i$1);
190
190
  intToChar[i$1] = c;
191
191
  charToInt[c] = i$1;
@@ -512,24 +512,22 @@ function resolve$3(input, base) {
512
512
  }
513
513
 
514
514
  //#endregion
515
- //#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.25/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
516
- function resolve$4(input, base) {
517
- if (base && !base.endsWith("/")) base += "/";
518
- return resolve$3(input, base);
519
- }
520
- /**
521
- * Removes everything after the last "/", but leaves the slash.
522
- */
515
+ //#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.26/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
523
516
  function stripFilename(path$13) {
524
517
  if (!path$13) return "";
525
518
  const index = path$13.lastIndexOf("/");
526
519
  return path$13.slice(0, index + 1);
527
520
  }
528
- const COLUMN$1 = 0;
529
- const SOURCES_INDEX$1 = 1;
530
- const SOURCE_LINE$1 = 2;
531
- const SOURCE_COLUMN$1 = 3;
532
- const NAMES_INDEX$1 = 4;
521
+ function resolver(mapUrl, sourceRoot) {
522
+ const from = stripFilename(mapUrl);
523
+ const prefix$1 = sourceRoot ? sourceRoot + "/" : "";
524
+ return (source) => resolve$3(prefix$1 + (source || ""), from);
525
+ }
526
+ var COLUMN$1 = 0;
527
+ var SOURCES_INDEX$1 = 1;
528
+ var SOURCE_LINE$1 = 2;
529
+ var SOURCE_COLUMN$1 = 3;
530
+ var NAMES_INDEX$1 = 4;
533
531
  function maybeSort(mappings, owned) {
534
532
  const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
535
533
  if (unsortedIndex === mappings.length) return mappings;
@@ -552,23 +550,7 @@ function sortSegments(line, owned) {
552
550
  function sortComparator(a, b) {
553
551
  return a[COLUMN$1] - b[COLUMN$1];
554
552
  }
555
- let found = false;
556
- /**
557
- * A binary search implementation that returns the index if a match is found.
558
- * If no match is found, then the left-index (the index associated with the item that comes just
559
- * before the desired index) is returned. To maintain proper sort order, a splice would happen at
560
- * the next index:
561
- *
562
- * ```js
563
- * const array = [1, 3];
564
- * const needle = 2;
565
- * const index = binarySearch(array, needle, (item, needle) => item - needle);
566
- *
567
- * assert.equal(index, 0);
568
- * array.splice(index + 1, 0, needle);
569
- * assert.deepEqual(array, [1, 2, 3]);
570
- * ```
571
- */
553
+ var found = false;
572
554
  function binarySearch(haystack, needle, low, high) {
573
555
  while (low <= high) {
574
556
  const mid = low + (high - low >> 1);
@@ -598,10 +580,6 @@ function memoizedState() {
598
580
  lastIndex: -1
599
581
  };
600
582
  }
601
- /**
602
- * This overly complicated beast is just to record the last tested line/column and the resulting
603
- * index, allowing us to skip a few tests if mappings are monotonically increasing.
604
- */
605
583
  function memoizedBinarySearch(haystack, needle, state, key) {
606
584
  const { lastKey, lastNeedle, lastIndex } = state;
607
585
  let low = 0;
@@ -618,15 +596,18 @@ function memoizedBinarySearch(haystack, needle, state, key) {
618
596
  state.lastNeedle = needle;
619
597
  return state.lastIndex = binarySearch(haystack, needle, low, high);
620
598
  }
621
- const LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
622
- const COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
623
- const LEAST_UPPER_BOUND = -1;
624
- const GREATEST_LOWER_BOUND = 1;
599
+ function parse$16(map$1) {
600
+ return typeof map$1 === "string" ? JSON.parse(map$1) : map$1;
601
+ }
602
+ var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
603
+ var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
604
+ var LEAST_UPPER_BOUND = -1;
605
+ var GREATEST_LOWER_BOUND = 1;
625
606
  var TraceMap = class {
626
607
  constructor(map$1, mapUrl) {
627
608
  const isString$1 = typeof map$1 === "string";
628
609
  if (!isString$1 && map$1._decodedMemo) return map$1;
629
- const parsed = isString$1 ? JSON.parse(map$1) : map$1;
610
+ const parsed = parse$16(map$1);
630
611
  const { version: version$2, file, names, sourceRoot, sources, sourcesContent } = parsed;
631
612
  this.version = version$2;
632
613
  this.file = file;
@@ -635,47 +616,33 @@ var TraceMap = class {
635
616
  this.sources = sources;
636
617
  this.sourcesContent = sourcesContent;
637
618
  this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
638
- const from = resolve$4(sourceRoot || "", stripFilename(mapUrl));
639
- this.resolvedSources = sources.map((s$2) => resolve$4(s$2 || "", from));
619
+ const resolve$4 = resolver(mapUrl, sourceRoot);
620
+ this.resolvedSources = sources.map(resolve$4);
640
621
  const { mappings } = parsed;
641
622
  if (typeof mappings === "string") {
642
623
  this._encoded = mappings;
643
624
  this._decoded = void 0;
644
- } else {
625
+ } else if (Array.isArray(mappings)) {
645
626
  this._encoded = void 0;
646
627
  this._decoded = maybeSort(mappings, isString$1);
647
- }
628
+ } else if (parsed.sections) throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
629
+ else throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
648
630
  this._decodedMemo = memoizedState();
649
631
  this._bySources = void 0;
650
632
  this._bySourceMemos = void 0;
651
633
  }
652
634
  };
653
- /**
654
- * Typescript doesn't allow friend access to private fields, so this just casts the map into a type
655
- * with public access modifiers.
656
- */
657
635
  function cast$2(map$1) {
658
636
  return map$1;
659
637
  }
660
- /**
661
- * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
662
- */
663
638
  function encodedMappings(map$1) {
664
- var _a;
665
- var _b;
666
- return (_a = (_b = cast$2(map$1))._encoded) !== null && _a !== void 0 ? _a : _b._encoded = encode$1(cast$2(map$1)._decoded);
639
+ var _a, _b;
640
+ return (_b = (_a = cast$2(map$1))._encoded) != null ? _b : _a._encoded = encode$1(cast$2(map$1)._decoded);
667
641
  }
668
- /**
669
- * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
670
- */
671
642
  function decodedMappings(map$1) {
672
643
  var _a;
673
644
  return (_a = cast$2(map$1))._decoded || (_a._decoded = decode(cast$2(map$1)._encoded));
674
645
  }
675
- /**
676
- * A low-level API to find the segment associated with a generated line/column (think, from a
677
- * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
678
- */
679
646
  function traceSegment(map$1, line, column) {
680
647
  const decoded = decodedMappings(map$1);
681
648
  if (line >= decoded.length) return null;
@@ -683,11 +650,6 @@ function traceSegment(map$1, line, column) {
683
650
  const index = traceSegmentInternal(segments, cast$2(map$1)._decodedMemo, line, column, GREATEST_LOWER_BOUND);
684
651
  return index === -1 ? null : segments[index];
685
652
  }
686
- /**
687
- * A higher-level API to find the source/line/column associated with a generated line/column
688
- * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
689
- * `source-map` library.
690
- */
691
653
  function originalPositionFor(map$1, needle) {
692
654
  let { line, column, bias } = needle;
693
655
  line--;
@@ -703,17 +665,9 @@ function originalPositionFor(map$1, needle) {
703
665
  const { names, resolvedSources } = map$1;
704
666
  return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null);
705
667
  }
706
- /**
707
- * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
708
- * a sourcemap, or to JSON.stringify.
709
- */
710
668
  function decodedMap(map$1) {
711
669
  return clone(map$1, decodedMappings(map$1));
712
670
  }
713
- /**
714
- * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
715
- * a sourcemap, or to JSON.stringify.
716
- */
717
671
  function encodedMap(map$1) {
718
672
  return clone(map$1, encodedMappings(map$1));
719
673
  }
@@ -4165,9 +4119,9 @@ var import_commondir = __toESM(require_commondir(), 1);
4165
4119
  var import_is_reference = __toESM(require_is_reference(), 1);
4166
4120
  var version$1 = "28.0.6";
4167
4121
  var peerDependencies = { rollup: "^2.68.0||^3.0.0||^4.0.0" };
4168
- function tryParse(parse$16, code, id) {
4122
+ function tryParse(parse$17, code, id) {
4169
4123
  try {
4170
- return parse$16(code, { allowReturnOutsideFunction: true });
4124
+ return parse$17(code, { allowReturnOutsideFunction: true });
4171
4125
  } catch (err$2) {
4172
4126
  err$2.message += ` in ${id}`;
4173
4127
  throw err$2;
@@ -4179,8 +4133,8 @@ function hasCjsKeywords(code, ignoreGlobal) {
4179
4133
  const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
4180
4134
  return firstpass.test(code);
4181
4135
  }
4182
- function analyzeTopLevelStatements(parse$16, code, id) {
4183
- const ast = tryParse(parse$16, code, id);
4136
+ function analyzeTopLevelStatements(parse$17, code, id) {
4137
+ const ast = tryParse(parse$17, code, id);
4184
4138
  let isEsModule = false;
4185
4139
  let hasDefaultExport = false;
4186
4140
  let hasNamedExports = false;
@@ -4969,8 +4923,8 @@ function getGenerateRequireName() {
4969
4923
  }
4970
4924
  const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
4971
4925
  const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
4972
- async function transformCommonjs(parse$16, code, id, isEsModule, ignoreGlobal, ignoreRequire, ignoreDynamicRequires, getIgnoreTryCatchRequireStatementMode, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, astCache, defaultIsModuleExports, needsRequireWrapper, resolveRequireSourcesAndUpdateMeta, isRequired, checkDynamicRequire, commonjsMeta) {
4973
- const ast = astCache || tryParse(parse$16, code, id);
4926
+ async function transformCommonjs(parse$17, code, id, isEsModule, ignoreGlobal, ignoreRequire, ignoreDynamicRequires, getIgnoreTryCatchRequireStatementMode, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, astCache, defaultIsModuleExports, needsRequireWrapper, resolveRequireSourcesAndUpdateMeta, isRequired, checkDynamicRequire, commonjsMeta) {
4927
+ const ast = astCache || tryParse(parse$17, code, id);
4974
4928
  const magicString = new MagicString(code);
4975
4929
  const uses = {
4976
4930
  module: false,
@@ -5363,7 +5317,7 @@ function commonjs(options$1 = {}) {
5363
5317
  return getUnknownRequireProxy(actualId, isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true);
5364
5318
  }
5365
5319
  if (id.endsWith(ENTRY_SUFFIX)) {
5366
- const acutalId = id.slice(0, -ENTRY_SUFFIX.length);
5320
+ const acutalId = id.slice(0, -15);
5367
5321
  const { meta: { commonjs: commonjsMeta } } = this.getModuleInfo(acutalId);
5368
5322
  const shebang = commonjsMeta?.shebang ?? "";
5369
5323
  return getEntryProxy(acutalId, getDefaultIsModuleExports(acutalId), this.getModuleInfo, shebang);
@@ -5748,14 +5702,14 @@ const IS_POSIX = path.posix.sep === path.sep;
5748
5702
  * @returns {{resolve:(result:T)=>void, reject:(error:any)=>void, promise: Promise<T>}}
5749
5703
  */
5750
5704
  function makePromise() {
5751
- let resolve$5, reject;
5705
+ let resolve$4, reject;
5752
5706
  const promise = new Promise((res, rej) => {
5753
- resolve$5 = res;
5707
+ resolve$4 = res;
5754
5708
  reject = rej;
5755
5709
  });
5756
5710
  return {
5757
5711
  promise,
5758
- resolve: resolve$5,
5712
+ resolve: resolve$4,
5759
5713
  reject
5760
5714
  };
5761
5715
  }
@@ -5967,11 +5921,11 @@ async function find(filename, options$1) {
5967
5921
  const cache$1 = options$1?.cache;
5968
5922
  const configName = options$1?.configName ?? "tsconfig.json";
5969
5923
  if (cache$1?.hasConfigPath(dir, configName)) return cache$1.getConfigPath(dir, configName);
5970
- const { promise, resolve: resolve$5, reject } = makePromise();
5924
+ const { promise, resolve: resolve$4, reject } = makePromise();
5971
5925
  if (options$1?.root && !path.isAbsolute(options$1.root)) options$1.root = path.resolve(options$1.root);
5972
5926
  findUp(dir, {
5973
5927
  promise,
5974
- resolve: resolve$5,
5928
+ resolve: resolve$4,
5975
5929
  reject
5976
5930
  }, options$1);
5977
5931
  return promise;
@@ -5982,7 +5936,7 @@ async function find(filename, options$1) {
5982
5936
  * @param {{promise:Promise<string|null>,resolve:(result:string|null)=>void,reject:(err:any)=>void}} madePromise
5983
5937
  * @param {import('./public.d.ts').TSConfckFindOptions} [options] - options
5984
5938
  */
5985
- function findUp(dir, { resolve: resolve$5, reject, promise }, options$1) {
5939
+ function findUp(dir, { resolve: resolve$4, reject, promise }, options$1) {
5986
5940
  const { cache: cache$1, root, configName } = options$1 ?? {};
5987
5941
  if (cache$1) if (cache$1.hasConfigPath(dir, configName)) {
5988
5942
  let cached;
@@ -5992,19 +5946,19 @@ function findUp(dir, { resolve: resolve$5, reject, promise }, options$1) {
5992
5946
  reject(e$1);
5993
5947
  return;
5994
5948
  }
5995
- if (cached?.then) cached.then(resolve$5).catch(reject);
5996
- else resolve$5(cached);
5949
+ if (cached?.then) cached.then(resolve$4).catch(reject);
5950
+ else resolve$4(cached);
5997
5951
  } else cache$1.setConfigPath(dir, promise, configName);
5998
5952
  const tsconfig = path.join(dir, options$1?.configName ?? "tsconfig.json");
5999
5953
  fs.stat(tsconfig, (err$2, stats) => {
6000
- if (stats && (stats.isFile() || stats.isFIFO())) resolve$5(tsconfig);
5954
+ if (stats && (stats.isFile() || stats.isFIFO())) resolve$4(tsconfig);
6001
5955
  else if (err$2?.code !== "ENOENT") reject(err$2);
6002
5956
  else {
6003
5957
  let parent;
6004
- if (root === dir || (parent = path.dirname(dir)) === dir) resolve$5(null);
5958
+ if (root === dir || (parent = path.dirname(dir)) === dir) resolve$4(null);
6005
5959
  else findUp(parent, {
6006
5960
  promise,
6007
- resolve: resolve$5,
5961
+ resolve: resolve$4,
6008
5962
  reject
6009
5963
  }, options$1);
6010
5964
  }
@@ -6172,12 +6126,12 @@ async function parse$14(filename, options$1) {
6172
6126
  /** @type {import('./cache.js').TSConfckCache} */
6173
6127
  const cache$1 = options$1?.cache;
6174
6128
  if (cache$1?.hasParseResult(filename)) return getParsedDeep(filename, cache$1, options$1);
6175
- const { resolve: resolve$5, reject, promise } = makePromise();
6129
+ const { resolve: resolve$4, reject, promise } = makePromise();
6176
6130
  cache$1?.setParseResult(filename, promise, true);
6177
6131
  try {
6178
6132
  let tsconfigFile = await resolveTSConfigJson(filename, cache$1) || await find(filename, options$1);
6179
6133
  if (!tsconfigFile) {
6180
- resolve$5(not_found_result);
6134
+ resolve$4(not_found_result);
6181
6135
  return promise;
6182
6136
  }
6183
6137
  let result;
@@ -6187,7 +6141,7 @@ async function parse$14(filename, options$1) {
6187
6141
  await Promise.all([parseExtends(result, cache$1), parseReferences(result, options$1)]);
6188
6142
  }
6189
6143
  replaceTokens(result);
6190
- resolve$5(resolveSolutionTSConfig(filename, result));
6144
+ resolve$4(resolveSolutionTSConfig(filename, result));
6191
6145
  } catch (e$1) {
6192
6146
  reject(e$1);
6193
6147
  }
@@ -6857,8 +6811,8 @@ var Worker$1 = class {
6857
6811
  }
6858
6812
  async run(...args) {
6859
6813
  const worker = await this._getAvailableWorker();
6860
- return new Promise((resolve$5, reject) => {
6861
- worker.currentResolve = resolve$5;
6814
+ return new Promise((resolve$4, reject) => {
6815
+ worker.currentResolve = resolve$4;
6862
6816
  worker.currentReject = reject;
6863
6817
  worker.postMessage({ args });
6864
6818
  });
@@ -6920,20 +6874,20 @@ var Worker$1 = class {
6920
6874
  this._pool.push(worker);
6921
6875
  return worker;
6922
6876
  }
6923
- let resolve$5;
6877
+ let resolve$4;
6924
6878
  let reject;
6925
6879
  const onWorkerAvailablePromise = new Promise((r$2, rj) => {
6926
- resolve$5 = r$2;
6880
+ resolve$4 = r$2;
6927
6881
  reject = rj;
6928
6882
  });
6929
- this._queue.push([resolve$5, reject]);
6883
+ this._queue.push([resolve$4, reject]);
6930
6884
  return onWorkerAvailablePromise;
6931
6885
  }
6932
6886
  /** @internal */
6933
6887
  _assignDoneWorker(worker) {
6934
6888
  if (this._queue.length) {
6935
- const [resolve$5] = this._queue.shift();
6936
- resolve$5(worker);
6889
+ const [resolve$4] = this._queue.shift();
6890
+ resolve$4(worker);
6937
6891
  return;
6938
6892
  }
6939
6893
  this._idlePool.push(worker);
@@ -7027,13 +6981,13 @@ function genWorkerCode(fn, isModule, parentFunctions) {
7027
6981
  lock.waitUnlock();
7028
6982
  const resArgs = receive(syncPort).message;
7029
6983
  if (resArgs.isAsync) {
7030
- let resolve$5, reject;
6984
+ let resolve$4, reject;
7031
6985
  const promise = new Promise((res, rej) => {
7032
- resolve$5 = res;
6986
+ resolve$4 = res;
7033
6987
  reject = rej;
7034
6988
  });
7035
6989
  resolvers.set(id, {
7036
- resolve: resolve$5,
6990
+ resolve: resolve$4,
7037
6991
  reject
7038
6992
  });
7039
6993
  return promise;
@@ -7044,9 +6998,9 @@ function genWorkerCode(fn, isModule, parentFunctions) {
7044
6998
  asyncPort.on("message", (args) => {
7045
6999
  const id2 = args.id;
7046
7000
  if (resolvers.has(id2)) {
7047
- const { resolve: resolve$5, reject } = resolvers.get(id2);
7001
+ const { resolve: resolve$4, reject } = resolvers.get(id2);
7048
7002
  resolvers.delete(id2);
7049
- if ("result" in args) resolve$5(args.result);
7003
+ if ("result" in args) resolve$4(args.result);
7050
7004
  else reject(args.error);
7051
7005
  }
7052
7006
  });
@@ -9619,12 +9573,12 @@ function esbuildDepPlugin(environment, qualified, external) {
9619
9573
  scan: true,
9620
9574
  packageCache: cjsPackageCache
9621
9575
  });
9622
- const resolve$5 = (id, importer, kind, resolveDir) => {
9576
+ const resolve$4 = (id, importer, kind, resolveDir) => {
9623
9577
  let _importer;
9624
9578
  if (resolveDir) _importer = normalizePath(path.join(resolveDir, "*"));
9625
9579
  else _importer = importer in qualified ? qualified[importer] : importer;
9626
- const resolver = kind.startsWith("require") ? _resolveRequire : _resolve;
9627
- return resolver(environment, id, _importer);
9580
+ const resolver$1 = kind.startsWith("require") ? _resolveRequire : _resolve;
9581
+ return resolver$1(environment, id, _importer);
9628
9582
  };
9629
9583
  const resolveResult = (id, resolved) => {
9630
9584
  if (resolved.startsWith(browserExternalId)) return {
@@ -9651,10 +9605,10 @@ function esbuildDepPlugin(environment, qualified, external) {
9651
9605
  });
9652
9606
  build$3.onResolve({ filter: /* @__PURE__ */ new RegExp(`\\.(` + allExternalTypes.join("|") + `)(\\?.*)?$`) }, async ({ path: id, importer, kind }) => {
9653
9607
  if (id.startsWith(convertedExternalPrefix)) return {
9654
- path: id.slice(convertedExternalPrefix.length),
9608
+ path: id.slice(29),
9655
9609
  external: true
9656
9610
  };
9657
- const resolved = await resolve$5(id, importer, kind);
9611
+ const resolved = await resolve$4(id, importer, kind);
9658
9612
  if (resolved) {
9659
9613
  if (JS_TYPES_RE.test(resolved)) return {
9660
9614
  path: resolved,
@@ -9695,7 +9649,7 @@ function esbuildDepPlugin(environment, qualified, external) {
9695
9649
  const aliased = await _resolve(environment, id, void 0, true);
9696
9650
  if (aliased && (entry = resolveEntry(aliased))) return entry;
9697
9651
  }
9698
- const resolved = await resolve$5(id, importer, kind);
9652
+ const resolved = await resolve$4(id, importer, kind);
9699
9653
  if (resolved) return resolveResult(id, resolved);
9700
9654
  });
9701
9655
  build$3.onLoad({
@@ -9735,7 +9689,7 @@ function esbuildCjsExternalPlugin(externals, platform$2) {
9735
9689
  const filter$1 = new RegExp(externals.map(matchesEntireLine).join("|"));
9736
9690
  build$3.onResolve({ filter: /* @__PURE__ */ new RegExp(`^${nonFacadePrefix}`) }, (args) => {
9737
9691
  return {
9738
- path: args.path.slice(nonFacadePrefix.length),
9692
+ path: args.path.slice(25),
9739
9693
  external: true
9740
9694
  };
9741
9695
  });
@@ -10830,7 +10784,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10830
10784
  async function resolveId(id, importer) {
10831
10785
  return environment.pluginContainer.resolveId(id, importer && normalizePath(importer), { scan: true });
10832
10786
  }
10833
- const resolve$5 = async (id, importer) => {
10787
+ const resolve$4 = async (id, importer) => {
10834
10788
  const key = id + (importer && path.dirname(importer));
10835
10789
  if (seen$1.has(key)) return seen$1.get(key);
10836
10790
  const resolved = await resolveId(id, importer);
@@ -10854,7 +10808,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10854
10808
  let transpiledContents;
10855
10809
  if (loader$1 !== "js") transpiledContents = (await transform(contents, { loader: loader$1 })).code;
10856
10810
  else transpiledContents = contents;
10857
- const result = await transformGlobImport(transpiledContents, id, environment.config.root, resolve$5);
10811
+ const result = await transformGlobImport(transpiledContents, id, environment.config.root, resolve$4);
10858
10812
  return result?.s.toString() || transpiledContents;
10859
10813
  };
10860
10814
  return {
@@ -10882,7 +10836,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10882
10836
  return scripts[path$13];
10883
10837
  });
10884
10838
  build$3.onResolve({ filter: htmlTypesRE }, async ({ path: path$13, importer }) => {
10885
- const resolved = await resolve$5(path$13, importer);
10839
+ const resolved = await resolve$4(path$13, importer);
10886
10840
  if (!resolved) return;
10887
10841
  if (isInNodeModules(resolved) && isOptimizable(resolved, optimizeDepsOptions)) return;
10888
10842
  return {
@@ -10960,7 +10914,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10960
10914
  build$3.onResolve({ filter: /^[\w@][^:]/ }, async ({ path: id, importer }) => {
10961
10915
  if (moduleListContains(exclude, id)) return externalUnlessEntry({ path: id });
10962
10916
  if (depImports[id]) return externalUnlessEntry({ path: id });
10963
- const resolved = await resolve$5(id, importer);
10917
+ const resolved = await resolve$4(id, importer);
10964
10918
  if (resolved) {
10965
10919
  if (shouldExternalizeDep(resolved, id)) return externalUnlessEntry({ path: id });
10966
10920
  if (isInNodeModules(resolved) || include?.includes(id)) {
@@ -10988,7 +10942,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10988
10942
  setupExternalize(/* @__PURE__ */ new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`), isUnlessEntry);
10989
10943
  setupExternalize(SPECIAL_QUERY_RE, () => true);
10990
10944
  build$3.onResolve({ filter: /.*/ }, async ({ path: id, importer }) => {
10991
- const resolved = await resolve$5(id, importer);
10945
+ const resolved = await resolve$4(id, importer);
10992
10946
  if (resolved) {
10993
10947
  if (shouldExternalizeDep(resolved, id) || !isScannable(resolved, optimizeDepsOptions.extensions)) return externalUnlessEntry({ path: id });
10994
10948
  const namespace = htmlTypesRE.test(resolved) ? "html" : void 0;
@@ -11054,18 +11008,18 @@ function isScannable(id, extensions$1) {
11054
11008
  //#region src/node/optimizer/resolve.ts
11055
11009
  function createOptimizeDepsIncludeResolver(environment) {
11056
11010
  const topLevelConfig = environment.getTopLevelConfig();
11057
- const resolve$5 = createBackCompatIdResolver(topLevelConfig, {
11011
+ const resolve$4 = createBackCompatIdResolver(topLevelConfig, {
11058
11012
  asSrc: false,
11059
11013
  scan: true,
11060
11014
  packageCache: /* @__PURE__ */ new Map()
11061
11015
  });
11062
11016
  return async (id) => {
11063
11017
  const lastArrowIndex = id.lastIndexOf(">");
11064
- if (lastArrowIndex === -1) return await resolve$5(environment, id, void 0);
11018
+ if (lastArrowIndex === -1) return await resolve$4(environment, id, void 0);
11065
11019
  const nestedRoot = id.substring(0, lastArrowIndex).trim();
11066
11020
  const nestedPath = id.substring(lastArrowIndex + 1).trim();
11067
11021
  const basedir = nestedResolveBasedir(nestedRoot, topLevelConfig.root, topLevelConfig.resolve.preserveSymlinks);
11068
- return await resolve$5(environment, nestedPath, path.resolve(basedir, "package.json"));
11022
+ return await resolve$4(environment, nestedPath, path.resolve(basedir, "package.json"));
11069
11023
  };
11070
11024
  }
11071
11025
  /**
@@ -11472,11 +11426,11 @@ async function addManuallyIncludedOptimizeDeps(environment, deps) {
11472
11426
  i$1 += globIds.length - 1;
11473
11427
  }
11474
11428
  }
11475
- const resolve$5 = createOptimizeDepsIncludeResolver(environment);
11429
+ const resolve$4 = createOptimizeDepsIncludeResolver(environment);
11476
11430
  for (const id of includes) {
11477
11431
  const normalizedId = normalizeId(id);
11478
11432
  if (!deps[normalizedId]) {
11479
- const entry = await resolve$5(id);
11433
+ const entry = await resolve$4(id);
11480
11434
  if (entry) if (isOptimizable(entry, optimizeDeps$1)) deps[normalizedId] = entry;
11481
11435
  else unableToOptimize(id, "Cannot optimize dependency");
11482
11436
  else unableToOptimize(id, "Failed to resolve dependency");
@@ -11803,12 +11757,12 @@ function shouldExternalize(environment, id, importer) {
11803
11757
  }
11804
11758
  function createIsConfiguredAsExternal(environment) {
11805
11759
  const { config: config$2 } = environment;
11806
- const { root, resolve: resolve$5 } = config$2;
11807
- const { external, noExternal } = resolve$5;
11760
+ const { root, resolve: resolve$4 } = config$2;
11761
+ const { external, noExternal } = resolve$4;
11808
11762
  const noExternalFilter = typeof noExternal !== "boolean" && !(Array.isArray(noExternal) && noExternal.length === 0) && createFilter(void 0, noExternal, { resolve: false });
11809
- const targetConditions = resolve$5.externalConditions;
11763
+ const targetConditions = resolve$4.externalConditions;
11810
11764
  const resolveOptions = {
11811
- ...resolve$5,
11765
+ ...resolve$4,
11812
11766
  root,
11813
11767
  isProduction: false,
11814
11768
  isBuild: true,
@@ -11987,7 +11941,7 @@ function resolvePlugin(resolveOptions) {
11987
11941
  load: { handler(id) {
11988
11942
  if (id.startsWith(browserExternalId)) if (isProduction) return `export default {}`;
11989
11943
  else {
11990
- id = id.slice(browserExternalId.length + 1);
11944
+ id = id.slice(24);
11991
11945
  return `\
11992
11946
  export default new Proxy({}, {
11993
11947
  get(_, key) {
@@ -12412,11 +12366,11 @@ function throwFileNotFoundInOptimizedDep(id) {
12412
12366
  }
12413
12367
 
12414
12368
  //#endregion
12415
- //#region ../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json
12416
- var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json"(exports, module) {
12369
+ //#region ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json
12370
+ var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json"(exports, module) {
12417
12371
  module.exports = {
12418
12372
  "name": "dotenv",
12419
- "version": "16.5.0",
12373
+ "version": "16.6.1",
12420
12374
  "description": "Loads environment variables from .env file",
12421
12375
  "main": "lib/main.js",
12422
12376
  "types": "lib/main.d.ts",
@@ -12439,7 +12393,7 @@ var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_
12439
12393
  "lint": "standard",
12440
12394
  "pretest": "npm run lint && npm run dts-check",
12441
12395
  "test": "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
12442
- "test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",
12396
+ "test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
12443
12397
  "prerelease": "npm test",
12444
12398
  "release": "standard-version"
12445
12399
  },
@@ -12475,8 +12429,8 @@ var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_
12475
12429
  } });
12476
12430
 
12477
12431
  //#endregion
12478
- //#region ../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js
12479
- var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js"(exports, module) {
12432
+ //#region ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js
12433
+ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js"(exports, module) {
12480
12434
  const fs$11 = require("fs");
12481
12435
  const path$10 = require("path");
12482
12436
  const os$3 = require("os");
@@ -12504,8 +12458,10 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12504
12458
  return obj;
12505
12459
  }
12506
12460
  function _parseVault(options$1) {
12461
+ options$1 = options$1 || {};
12507
12462
  const vaultPath = _vaultPath(options$1);
12508
- const result = DotenvModule.configDotenv({ path: vaultPath });
12463
+ options$1.path = vaultPath;
12464
+ const result = DotenvModule.configDotenv(options$1);
12509
12465
  if (!result.parsed) {
12510
12466
  const err$2 = /* @__PURE__ */ new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
12511
12467
  err$2.code = "MISSING_DATA";
@@ -12530,6 +12486,9 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12530
12486
  function _debug(message) {
12531
12487
  console.log(`[dotenv@${version}][DEBUG] ${message}`);
12532
12488
  }
12489
+ function _log(message) {
12490
+ console.log(`[dotenv@${version}] ${message}`);
12491
+ }
12533
12492
  function _dotenvKey(options$1) {
12534
12493
  if (options$1 && options$1.DOTENV_KEY && options$1.DOTENV_KEY.length > 0) return options$1.DOTENV_KEY;
12535
12494
  if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) return process.env.DOTENV_KEY;
@@ -12585,7 +12544,8 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12585
12544
  }
12586
12545
  function _configVault(options$1) {
12587
12546
  const debug$19 = Boolean(options$1 && options$1.debug);
12588
- if (debug$19) _debug("Loading env from encrypted .env.vault");
12547
+ const quiet = options$1 && "quiet" in options$1 ? options$1.quiet : true;
12548
+ if (debug$19 || !quiet) _log("Loading env from encrypted .env.vault");
12589
12549
  const parsed = DotenvModule._parseVault(options$1);
12590
12550
  let processEnv = process.env;
12591
12551
  if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
@@ -12596,6 +12556,7 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12596
12556
  const dotenvPath = path$10.resolve(process.cwd(), ".env");
12597
12557
  let encoding = "utf8";
12598
12558
  const debug$19 = Boolean(options$1 && options$1.debug);
12559
+ const quiet = options$1 && "quiet" in options$1 ? options$1.quiet : true;
12599
12560
  if (options$1 && options$1.encoding) encoding = options$1.encoding;
12600
12561
  else if (debug$19) _debug("No encoding is specified. UTF-8 is used by default");
12601
12562
  let optionPaths = [dotenvPath];
@@ -12616,6 +12577,18 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12616
12577
  let processEnv = process.env;
12617
12578
  if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
12618
12579
  DotenvModule.populate(processEnv, parsedAll, options$1);
12580
+ if (debug$19 || !quiet) {
12581
+ const keysCount = Object.keys(parsedAll).length;
12582
+ const shortPaths = [];
12583
+ for (const filePath of optionPaths) try {
12584
+ const relative$3 = path$10.relative(process.cwd(), filePath);
12585
+ shortPaths.push(relative$3);
12586
+ } catch (e$1) {
12587
+ if (debug$19) _debug(`Failed to load ${filePath} ${e$1.message}`);
12588
+ lastError = e$1;
12589
+ }
12590
+ _log(`injecting env (${keysCount}) from ${shortPaths.join(",")}`);
12591
+ }
12619
12592
  if (lastError) return {
12620
12593
  parsed: parsedAll,
12621
12594
  error: lastError
@@ -14933,9 +14906,9 @@ var require_readdirp = __commonJS({ "../../node_modules/.pnpm/readdirp@3.6.0/nod
14933
14906
  return new ReaddirpStream(options$1);
14934
14907
  };
14935
14908
  const readdirpPromise = (root, options$1 = {}) => {
14936
- return new Promise((resolve$5, reject) => {
14909
+ return new Promise((resolve$4, reject) => {
14937
14910
  const files = [];
14938
- readdirp$1(root, options$1).on("data", (entry) => files.push(entry)).on("end", () => resolve$5(files)).on("error", (error$1) => reject(error$1));
14911
+ readdirp$1(root, options$1).on("data", (entry) => files.push(entry)).on("end", () => resolve$4(files)).on("error", (error$1) => reject(error$1));
14939
14912
  });
14940
14913
  };
14941
14914
  readdirp$1.promise = readdirpPromise;
@@ -16965,13 +16938,13 @@ var require_nodefs_handler = __commonJS({ "../../node_modules/.pnpm/chokidar@3.6
16965
16938
  this._addToNodeFs(path$13, initialAdd, wh, depth + 1);
16966
16939
  }
16967
16940
  }).on(EV_ERROR$2, this._boundHandleError);
16968
- return new Promise((resolve$5) => stream$1.once(STR_END$2, () => {
16941
+ return new Promise((resolve$4) => stream$1.once(STR_END$2, () => {
16969
16942
  if (this.fsw.closed) {
16970
16943
  stream$1 = void 0;
16971
16944
  return;
16972
16945
  }
16973
16946
  const wasThrottled = throttler ? throttler.clear() : false;
16974
- resolve$5();
16947
+ resolve$4();
16975
16948
  previous.getChildren().filter((item) => {
16976
16949
  return item !== directory && !current.has(item) && (!wh.hasGlob || wh.filterPath({ fullPath: sysPath$2.resolve(directory, item) }));
16977
16950
  }).forEach((item) => {
@@ -18255,7 +18228,7 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/shell-quote@1.8.2/n
18255
18228
  return typeof arg === "undefined" ? prev : prev.concat(arg);
18256
18229
  }, []);
18257
18230
  }
18258
- module.exports = function parse$16(s$2, env$2, opts) {
18231
+ module.exports = function parse$17(s$2, env$2, opts) {
18259
18232
  var mapped = parseInternal(s$2, env$2, opts);
18260
18233
  if (typeof env$2 !== "function") return mapped;
18261
18234
  return mapped.reduce(function(acc, s$3) {
@@ -18686,7 +18659,7 @@ async function readFileIfExists(value$1) {
18686
18659
  }
18687
18660
  async function httpServerStart(httpServer, serverOptions) {
18688
18661
  let { port, strictPort, host, logger } = serverOptions;
18689
- return new Promise((resolve$5, reject) => {
18662
+ return new Promise((resolve$4, reject) => {
18690
18663
  const onError$1 = (e$1) => {
18691
18664
  if (e$1.code === "EADDRINUSE") if (strictPort) {
18692
18665
  httpServer.removeListener("error", onError$1);
@@ -18703,7 +18676,7 @@ async function httpServerStart(httpServer, serverOptions) {
18703
18676
  httpServer.on("error", onError$1);
18704
18677
  httpServer.listen(port, host, () => {
18705
18678
  httpServer.removeListener("error", onError$1);
18706
- resolve$5(port);
18679
+ resolve$4(port);
18707
18680
  });
18708
18681
  });
18709
18682
  }
@@ -19785,14 +19758,14 @@ const baseOpen = async (options$1) => {
19785
19758
  if (platform === "darwin" && appArguments.length > 0) cliArguments.push("--args", ...appArguments);
19786
19759
  if (options$1.target) cliArguments.push(options$1.target);
19787
19760
  const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
19788
- if (options$1.wait) return new Promise((resolve$5, reject) => {
19761
+ if (options$1.wait) return new Promise((resolve$4, reject) => {
19789
19762
  subprocess.once("error", reject);
19790
19763
  subprocess.once("close", (exitCode) => {
19791
19764
  if (!options$1.allowNonzeroExitCode && exitCode > 0) {
19792
19765
  reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
19793
19766
  return;
19794
19767
  }
19795
- resolve$5(subprocess);
19768
+ resolve$4(subprocess);
19796
19769
  });
19797
19770
  });
19798
19771
  subprocess.unref();
@@ -19922,10 +19895,10 @@ var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modu
19922
19895
  }
19923
19896
  if (!cb) {
19924
19897
  if (typeof Promise !== "function") throw new TypeError("callback not provided");
19925
- return new Promise(function(resolve$5, reject) {
19898
+ return new Promise(function(resolve$4, reject) {
19926
19899
  isexe$1(path$13, options$1 || {}, function(er, is) {
19927
19900
  if (er) reject(er);
19928
- else resolve$5(is);
19901
+ else resolve$4(is);
19929
19902
  });
19930
19903
  });
19931
19904
  }
@@ -19979,21 +19952,21 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
19979
19952
  if (!opt) opt = {};
19980
19953
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
19981
19954
  const found$1 = [];
19982
- const step = (i$1) => new Promise((resolve$5, reject) => {
19983
- if (i$1 === pathEnv.length) return opt.all && found$1.length ? resolve$5(found$1) : reject(getNotFoundError(cmd));
19955
+ const step = (i$1) => new Promise((resolve$4, reject) => {
19956
+ if (i$1 === pathEnv.length) return opt.all && found$1.length ? resolve$4(found$1) : reject(getNotFoundError(cmd));
19984
19957
  const ppRaw = pathEnv[i$1];
19985
19958
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
19986
19959
  const pCmd = path$4.join(pathPart, cmd);
19987
19960
  const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
19988
- resolve$5(subStep(p$1, i$1, 0));
19961
+ resolve$4(subStep(p$1, i$1, 0));
19989
19962
  });
19990
- const subStep = (p$1, i$1, ii) => new Promise((resolve$5, reject) => {
19991
- if (ii === pathExt.length) return resolve$5(step(i$1 + 1));
19963
+ const subStep = (p$1, i$1, ii) => new Promise((resolve$4, reject) => {
19964
+ if (ii === pathExt.length) return resolve$4(step(i$1 + 1));
19992
19965
  const ext = pathExt[ii];
19993
19966
  isexe(p$1 + ext, { pathExt: pathExtExe }, (er, is) => {
19994
19967
  if (!er && is) if (opt.all) found$1.push(p$1 + ext);
19995
- else return resolve$5(p$1 + ext);
19996
- return resolve$5(subStep(p$1, i$1, ii + 1));
19968
+ else return resolve$4(p$1 + ext);
19969
+ return resolve$4(subStep(p$1, i$1, ii + 1));
19997
19970
  });
19998
19971
  });
19999
19972
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -20323,10 +20296,10 @@ async function startBrowserProcess(browser, browserArgs, url$6, logger) {
20323
20296
  }
20324
20297
  }
20325
20298
  function execAsync(command, options$1) {
20326
- return new Promise((resolve$5, reject) => {
20299
+ return new Promise((resolve$4, reject) => {
20327
20300
  exec(command, options$1, (error$1, stdout) => {
20328
20301
  if (error$1) reject(error$1);
20329
- else resolve$5(stdout.toString());
20302
+ else resolve$4(stdout.toString());
20330
20303
  });
20331
20304
  });
20332
20305
  }
@@ -20487,8 +20460,8 @@ function createNoopWatcher(options$1) {
20487
20460
  }
20488
20461
 
20489
20462
  //#endregion
20490
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/constants.js
20491
- var require_constants$1 = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/constants.js"(exports, module) {
20463
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/constants.js
20464
+ var require_constants$1 = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/constants.js"(exports, module) {
20492
20465
  const BINARY_TYPES$2 = [
20493
20466
  "nodebuffer",
20494
20467
  "arraybuffer",
@@ -20510,8 +20483,8 @@ var require_constants$1 = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_
20510
20483
  } });
20511
20484
 
20512
20485
  //#endregion
20513
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/buffer-util.js
20514
- var require_buffer_util = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/buffer-util.js"(exports, module) {
20486
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/buffer-util.js
20487
+ var require_buffer_util = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/buffer-util.js"(exports, module) {
20515
20488
  const { EMPTY_BUFFER: EMPTY_BUFFER$3 } = require_constants$1();
20516
20489
  const FastBuffer$2 = Buffer[Symbol.species];
20517
20490
  /**
@@ -20611,8 +20584,8 @@ var require_buffer_util = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_
20611
20584
  } });
20612
20585
 
20613
20586
  //#endregion
20614
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/limiter.js
20615
- var require_limiter = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/limiter.js"(exports, module) {
20587
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/limiter.js
20588
+ var require_limiter = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/limiter.js"(exports, module) {
20616
20589
  const kDone = Symbol("kDone");
20617
20590
  const kRun = Symbol("kRun");
20618
20591
  /**
@@ -20663,8 +20636,8 @@ var require_limiter = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modu
20663
20636
  } });
20664
20637
 
20665
20638
  //#endregion
20666
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/permessage-deflate.js
20667
- var require_permessage_deflate = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
20639
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js
20640
+ var require_permessage_deflate = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
20668
20641
  const zlib$1 = require("zlib");
20669
20642
  const bufferUtil = require_buffer_util();
20670
20643
  const Limiter = require_limiter();
@@ -21000,8 +20973,8 @@ var require_permessage_deflate = __commonJS({ "../../node_modules/.pnpm/ws@8.18.
21000
20973
  } });
21001
20974
 
21002
20975
  //#endregion
21003
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/validation.js
21004
- var require_validation = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/validation.js"(exports, module) {
20976
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js
20977
+ var require_validation = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js"(exports, module) {
21005
20978
  const { isUtf8 } = require("buffer");
21006
20979
  const { hasBlob } = require_constants$1();
21007
20980
  const tokenChars$2 = [
@@ -21197,8 +21170,8 @@ var require_validation = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_m
21197
21170
  } });
21198
21171
 
21199
21172
  //#endregion
21200
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/receiver.js
21201
- var require_receiver = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/receiver.js"(exports, module) {
21173
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js
21174
+ var require_receiver = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js"(exports, module) {
21202
21175
  const { Writable: Writable$1 } = require("stream");
21203
21176
  const PerMessageDeflate$3 = require_permessage_deflate();
21204
21177
  const { BINARY_TYPES: BINARY_TYPES$1, EMPTY_BUFFER: EMPTY_BUFFER$2, kStatusCode: kStatusCode$1, kWebSocket: kWebSocket$3 } = require_constants$1();
@@ -21663,8 +21636,8 @@ var require_receiver = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_mod
21663
21636
  } });
21664
21637
 
21665
21638
  //#endregion
21666
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/sender.js
21667
- var require_sender = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/sender.js"(exports, module) {
21639
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js
21640
+ var require_sender = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js"(exports, module) {
21668
21641
  const { Duplex: Duplex$3 } = require("stream");
21669
21642
  const { randomFillSync } = require("crypto");
21670
21643
  const PerMessageDeflate$2 = require_permessage_deflate();
@@ -22160,8 +22133,8 @@ var require_sender = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modul
22160
22133
  } });
22161
22134
 
22162
22135
  //#endregion
22163
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/event-target.js
22164
- var require_event_target = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/event-target.js"(exports, module) {
22136
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/event-target.js
22137
+ var require_event_target = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/event-target.js"(exports, module) {
22165
22138
  const { kForOnEventAttribute: kForOnEventAttribute$1, kListener: kListener$1 } = require_constants$1();
22166
22139
  const kCode = Symbol("kCode");
22167
22140
  const kData = Symbol("kData");
@@ -22380,8 +22353,8 @@ var require_event_target = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node
22380
22353
  } });
22381
22354
 
22382
22355
  //#endregion
22383
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/extension.js
22384
- var require_extension = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/extension.js"(exports, module) {
22356
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/extension.js
22357
+ var require_extension = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/extension.js"(exports, module) {
22385
22358
  const { tokenChars: tokenChars$1 } = require_validation();
22386
22359
  /**
22387
22360
  * Adds an offer to the map of extension offers or a parameter to the map of
@@ -22524,8 +22497,8 @@ var require_extension = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_mo
22524
22497
  } });
22525
22498
 
22526
22499
  //#endregion
22527
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/websocket.js
22528
- var require_websocket = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/websocket.js"(exports, module) {
22500
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js
22501
+ var require_websocket = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js"(exports, module) {
22529
22502
  const EventEmitter$3 = require("events");
22530
22503
  const https$3 = require("https");
22531
22504
  const http$4 = require("http");
@@ -23497,8 +23470,8 @@ var require_websocket = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_mo
23497
23470
  } });
23498
23471
 
23499
23472
  //#endregion
23500
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/stream.js
23501
- var require_stream = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/stream.js"(exports, module) {
23473
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js
23474
+ var require_stream = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js"(exports, module) {
23502
23475
  const WebSocket$2 = require_websocket();
23503
23476
  const { Duplex: Duplex$1 } = require("stream");
23504
23477
  /**
@@ -23614,8 +23587,8 @@ var require_stream = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modul
23614
23587
  } });
23615
23588
 
23616
23589
  //#endregion
23617
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/subprotocol.js
23618
- var require_subprotocol = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/subprotocol.js"(exports, module) {
23590
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/subprotocol.js
23591
+ var require_subprotocol = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/subprotocol.js"(exports, module) {
23619
23592
  const { tokenChars } = require_validation();
23620
23593
  /**
23621
23594
  * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
@@ -23654,8 +23627,8 @@ var require_subprotocol = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_
23654
23627
  } });
23655
23628
 
23656
23629
  //#endregion
23657
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/websocket-server.js
23658
- var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/websocket-server.js"(exports, module) {
23630
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js
23631
+ var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js"(exports, module) {
23659
23632
  const EventEmitter$2 = require("events");
23660
23633
  const http$3 = require("http");
23661
23634
  const { Duplex } = require("stream");
@@ -23849,9 +23822,9 @@ var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/
23849
23822
  abortHandshakeOrEmitwsClientError(this, req$4, socket, 400, message);
23850
23823
  return;
23851
23824
  }
23852
- if (version$2 !== 8 && version$2 !== 13) {
23825
+ if (version$2 !== 13 && version$2 !== 8) {
23853
23826
  const message = "Missing or invalid Sec-WebSocket-Version header";
23854
- abortHandshakeOrEmitwsClientError(this, req$4, socket, 400, message);
23827
+ abortHandshakeOrEmitwsClientError(this, req$4, socket, 400, message, { "Sec-WebSocket-Version": "13, 8" });
23855
23828
  return;
23856
23829
  }
23857
23830
  if (!this.shouldHandle(req$4)) {
@@ -24020,19 +23993,20 @@ var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/
24020
23993
  * @param {Duplex} socket The socket of the upgrade request
24021
23994
  * @param {Number} code The HTTP response status code
24022
23995
  * @param {String} message The HTTP response body
23996
+ * @param {Object} [headers] The HTTP response headers
24023
23997
  * @private
24024
23998
  */
24025
- function abortHandshakeOrEmitwsClientError(server, req$4, socket, code, message) {
23999
+ function abortHandshakeOrEmitwsClientError(server, req$4, socket, code, message, headers) {
24026
24000
  if (server.listenerCount("wsClientError")) {
24027
24001
  const err$2 = new Error(message);
24028
24002
  Error.captureStackTrace(err$2, abortHandshakeOrEmitwsClientError);
24029
24003
  server.emit("wsClientError", err$2, socket, req$4);
24030
- } else abortHandshake(socket, code, message);
24004
+ } else abortHandshake(socket, code, message, headers);
24031
24005
  }
24032
24006
  } });
24033
24007
 
24034
24008
  //#endregion
24035
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/wrapper.mjs
24009
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/wrapper.mjs
24036
24010
  var import_stream = __toESM(require_stream(), 1);
24037
24011
  var import_receiver = __toESM(require_receiver(), 1);
24038
24012
  var import_sender = __toESM(require_sender(), 1);
@@ -24299,7 +24273,7 @@ function createWebSocketServer(server, config$2, httpsOptions) {
24299
24273
  },
24300
24274
  close() {
24301
24275
  if (hmrServerWsListener && wsServer) wsServer.off("upgrade", hmrServerWsListener);
24302
- return new Promise((resolve$5, reject) => {
24276
+ return new Promise((resolve$4, reject) => {
24303
24277
  wss.clients.forEach((client) => {
24304
24278
  client.terminate();
24305
24279
  });
@@ -24307,9 +24281,9 @@ function createWebSocketServer(server, config$2, httpsOptions) {
24307
24281
  if (err$2) reject(err$2);
24308
24282
  else if (wsHttpServer) wsHttpServer.close((err$3) => {
24309
24283
  if (err$3) reject(err$3);
24310
- else resolve$5();
24284
+ else resolve$4();
24311
24285
  });
24312
- else resolve$5();
24286
+ else resolve$4();
24313
24287
  });
24314
24288
  });
24315
24289
  }
@@ -26728,8 +26702,8 @@ function traverseNodes(node, visitor) {
26728
26702
  if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
26729
26703
  }
26730
26704
  async function traverseHtml(html, filePath, visitor) {
26731
- const { parse: parse$16 } = await import("./dep-BO5GbxpL.js");
26732
- const ast = parse$16(html, {
26705
+ const { parse: parse$17 } = await import("./dep-BO5GbxpL.js");
26706
+ const ast = parse$17(html, {
26733
26707
  scriptingEnabled: false,
26734
26708
  sourceCodeLocationInfo: true,
26735
26709
  onParseError: (e$1) => {
@@ -28641,13 +28615,13 @@ function createServerCloseFn(server) {
28641
28615
  server.once("listening", () => {
28642
28616
  hasListened = true;
28643
28617
  });
28644
- return () => new Promise((resolve$5, reject) => {
28618
+ return () => new Promise((resolve$4, reject) => {
28645
28619
  openSockets.forEach((s$2) => s$2.destroy());
28646
28620
  if (hasListened) server.close((err$2) => {
28647
28621
  if (err$2) reject(err$2);
28648
- else resolve$5();
28622
+ else resolve$4();
28649
28623
  });
28650
- else resolve$5();
28624
+ else resolve$4();
28651
28625
  });
28652
28626
  }
28653
28627
  function resolvedAllowDir(root, dir) {
@@ -30755,9 +30729,9 @@ function parseDynamicImportPattern(strings) {
30755
30729
  rawPattern
30756
30730
  };
30757
30731
  }
30758
- async function transformDynamicImport(importSource, importer, resolve$5, root) {
30732
+ async function transformDynamicImport(importSource, importer, resolve$4, root) {
30759
30733
  if (importSource[1] !== "." && importSource[1] !== "/") {
30760
- const resolvedFileName = await resolve$5(importSource.slice(1, -1), importer);
30734
+ const resolvedFileName = await resolve$4(importSource.slice(1, -1), importer);
30761
30735
  if (!resolvedFileName) return null;
30762
30736
  const relativeFileName = normalizePath(posix.relative(posix.dirname(normalizePath(importer)), normalizePath(resolvedFileName)));
30763
30737
  importSource = "`" + (relativeFileName[0] === "." ? "" : "./") + relativeFileName + "`";
@@ -30778,7 +30752,7 @@ async function transformDynamicImport(importSource, importer, resolve$5, root) {
30778
30752
  };
30779
30753
  }
30780
30754
  function dynamicImportVarsPlugin(config$2) {
30781
- const resolve$5 = createBackCompatIdResolver(config$2, {
30755
+ const resolve$4 = createBackCompatIdResolver(config$2, {
30782
30756
  preferRelative: true,
30783
30757
  tryIndex: false,
30784
30758
  extensions: []
@@ -30815,7 +30789,7 @@ function dynamicImportVarsPlugin(config$2) {
30815
30789
  s$2 ||= new MagicString(source);
30816
30790
  let result;
30817
30791
  try {
30818
- result = await transformDynamicImport(source.slice(start, end), importer, (id, importer$1) => resolve$5(environment, id, importer$1), config$2.root);
30792
+ result = await transformDynamicImport(source.slice(start, end), importer, (id, importer$1) => resolve$4(environment, id, importer$1), config$2.root);
30819
30793
  } catch (error$1) {
30820
30794
  if (environment.config.build.dynamicImportVarsOptions.warnOnError) this.warn(error$1);
30821
30795
  else this.error(error$1);
@@ -30910,7 +30884,7 @@ function createFilterForTransform(idFilter, codeFilter, cwd) {
30910
30884
  async function resolvePlugins(config$2, prePlugins, normalPlugins, postPlugins) {
30911
30885
  const isBuild = config$2.command === "build";
30912
30886
  const isWorker = config$2.isWorker;
30913
- const buildPlugins = isBuild ? await (await import("./dep-pyXEOwQv.js")).resolveBuildPlugins(config$2) : {
30887
+ const buildPlugins = isBuild ? await (await import("./dep-DytQrE0P.js")).resolveBuildPlugins(config$2) : {
30914
30888
  pre: [],
30915
30889
  post: []
30916
30890
  };
@@ -31674,11 +31648,11 @@ function createPluginContainer(environments) {
31674
31648
  */
31675
31649
  function createBackCompatIdResolver(config$2, options$1) {
31676
31650
  const compatResolve = config$2.createResolver(options$1);
31677
- let resolve$5;
31651
+ let resolve$4;
31678
31652
  return async (environment, id, importer, aliasOnly) => {
31679
31653
  if (environment.name === "client" || environment.name === "ssr") return compatResolve(id, importer, aliasOnly, environment.name === "ssr");
31680
- resolve$5 ??= createIdResolver(config$2, options$1);
31681
- return resolve$5(environment, id, importer, aliasOnly);
31654
+ resolve$4 ??= createIdResolver(config$2, options$1);
31655
+ return resolve$4(environment, id, importer, aliasOnly);
31682
31656
  };
31683
31657
  }
31684
31658
  /**
@@ -31688,7 +31662,7 @@ function createBackCompatIdResolver(config$2, options$1) {
31688
31662
  function createIdResolver(config$2, options$1) {
31689
31663
  const scan = options$1?.scan;
31690
31664
  const pluginContainerMap = /* @__PURE__ */ new Map();
31691
- async function resolve$5(environment, id, importer) {
31665
+ async function resolve$4(environment, id, importer) {
31692
31666
  let pluginContainer = pluginContainerMap.get(environment);
31693
31667
  if (!pluginContainer) {
31694
31668
  pluginContainer = await createEnvironmentPluginContainer(environment, [alias({ entries: environment.config.resolve.alias }), resolvePlugin({
@@ -31715,7 +31689,7 @@ function createIdResolver(config$2, options$1) {
31715
31689
  return await pluginContainer.resolveId(id, importer, { scan });
31716
31690
  }
31717
31691
  return async (environment, id, importer, aliasOnly) => {
31718
- const resolveFn = aliasOnly ? resolveAlias : resolve$5;
31692
+ const resolveFn = aliasOnly ? resolveAlias : resolve$4;
31719
31693
  const resolved = await resolveFn(environment, id, importer);
31720
31694
  return resolved?.id;
31721
31695
  };
@@ -32205,7 +32179,7 @@ function createCSSResolvers(config$2) {
32205
32179
  },
32206
32180
  get sass() {
32207
32181
  if (!sassResolve) {
32208
- const resolver = createBackCompatIdResolver(config$2, {
32182
+ const resolver$1 = createBackCompatIdResolver(config$2, {
32209
32183
  extensions: [
32210
32184
  ".scss",
32211
32185
  ".sass",
@@ -32223,7 +32197,7 @@ function createCSSResolvers(config$2) {
32223
32197
  });
32224
32198
  sassResolve = async (...args) => {
32225
32199
  if (args[1].startsWith("file://")) args[1] = fileURLToPath(args[1], { windows: isWindows && !fileURLWithWindowsDriveRE.test(args[1]) ? false : void 0 });
32226
- return resolver(...args);
32200
+ return resolver$1(...args);
32227
32201
  };
32228
32202
  }
32229
32203
  return sassResolve;
@@ -32446,7 +32420,7 @@ function createCachedImport(imp) {
32446
32420
  };
32447
32421
  }
32448
32422
  const importPostcssImport = createCachedImport(() => import("./dep-DcjhO6Jt.js").then(__toDynamicImportESM(1)));
32449
- const importPostcssModules = createCachedImport(() => import("./dep-Do-w1DD4.js").then(__toDynamicImportESM(1)));
32423
+ const importPostcssModules = createCachedImport(() => import("./dep-BpPEUsd2.js").then(__toDynamicImportESM(1)));
32450
32424
  const importPostcss = createCachedImport(() => import("postcss"));
32451
32425
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
32452
32426
  let alwaysFakeWorkerWorkerControllerCache;
@@ -32868,7 +32842,7 @@ const scssProcessor = (maxWorkers) => {
32868
32842
  * relative url() inside \@imported sass and less files must be rebased to use
32869
32843
  * root file as base.
32870
32844
  */
32871
- async function rebaseUrls(environment, file, rootFile, resolver, ignoreUrl) {
32845
+ async function rebaseUrls(environment, file, rootFile, resolver$1, ignoreUrl) {
32872
32846
  file = path.resolve(file);
32873
32847
  const fileDir = path.dirname(file);
32874
32848
  const rootDir = path.dirname(rootFile);
@@ -32882,7 +32856,7 @@ async function rebaseUrls(environment, file, rootFile, resolver, ignoreUrl) {
32882
32856
  const rebaseFn = async (unquotedUrl, rawUrl) => {
32883
32857
  if (ignoreUrl?.(unquotedUrl, rawUrl)) return false;
32884
32858
  if (unquotedUrl[0] === "/") return unquotedUrl;
32885
- const absolute = await resolver(environment, unquotedUrl, file) || path.resolve(fileDir, unquotedUrl);
32859
+ const absolute = await resolver$1(environment, unquotedUrl, file) || path.resolve(fileDir, unquotedUrl);
32886
32860
  const relative$3 = path.relative(rootDir, absolute);
32887
32861
  return normalizePath(relative$3);
32888
32862
  };
@@ -33179,25 +33153,25 @@ async function compileLightningCSS(environment, id, src, deps, workerController,
33179
33153
  if (publicFile) return publicFile;
33180
33154
  const atImportResolvers = getAtImportResolvers(environment.getTopLevelConfig());
33181
33155
  const lang = CSS_LANGS_RE.exec(from)?.[1];
33182
- let resolver;
33156
+ let resolver$1;
33183
33157
  switch (lang) {
33184
33158
  case "css":
33185
33159
  case "sss":
33186
33160
  case "styl":
33187
33161
  case "stylus":
33188
33162
  case void 0:
33189
- resolver = atImportResolvers.css;
33163
+ resolver$1 = atImportResolvers.css;
33190
33164
  break;
33191
33165
  case "sass":
33192
33166
  case "scss":
33193
- resolver = atImportResolvers.sass;
33167
+ resolver$1 = atImportResolvers.sass;
33194
33168
  break;
33195
33169
  case "less":
33196
- resolver = atImportResolvers.less;
33170
+ resolver$1 = atImportResolvers.less;
33197
33171
  break;
33198
33172
  default: throw new Error(`Unknown lang: ${lang}`);
33199
33173
  }
33200
- const resolved = await resolver(environment, id$1, from);
33174
+ const resolved = await resolver$1(environment, id$1, from);
33201
33175
  if (resolved) {
33202
33176
  deps.add(resolved);
33203
33177
  return resolved;
@@ -33993,14 +33967,14 @@ async function buildEnvironment(environment) {
33993
33967
  const { logger } = environment;
33994
33968
  const ssr = environment.config.consumer === "server";
33995
33969
  logger.info(import_picocolors$4.default.cyan(`vite v${VERSION} ${import_picocolors$4.default.green(`building ${ssr ? `SSR bundle ` : ``}for ${environment.config.mode}...`)}`));
33996
- const resolve$5 = (p$1) => path.resolve(root, p$1);
33997
- const input = libOptions ? options$1.rollupOptions.input || (typeof libOptions.entry === "string" ? resolve$5(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve$5) : Object.fromEntries(Object.entries(libOptions.entry).map(([alias$2, file]) => [alias$2, resolve$5(file)]))) : typeof options$1.ssr === "string" ? resolve$5(options$1.ssr) : options$1.rollupOptions.input || resolve$5("index.html");
33970
+ const resolve$4 = (p$1) => path.resolve(root, p$1);
33971
+ const input = libOptions ? options$1.rollupOptions.input || (typeof libOptions.entry === "string" ? resolve$4(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve$4) : Object.fromEntries(Object.entries(libOptions.entry).map(([alias$2, file]) => [alias$2, resolve$4(file)]))) : typeof options$1.ssr === "string" ? resolve$4(options$1.ssr) : options$1.rollupOptions.input || resolve$4("index.html");
33998
33972
  if (ssr && typeof input === "string" && input.endsWith(".html")) throw new Error("rollupOptions.input should not be an html file when building for SSR. Please specify a dedicated SSR entry.");
33999
33973
  if (options$1.cssCodeSplit === false) {
34000
33974
  const inputs = typeof input === "string" ? [input] : Array.isArray(input) ? input : Object.values(input);
34001
33975
  if (inputs.some((input$1) => input$1.endsWith(".css"))) throw new Error(`When "build.cssCodeSplit: false" is set, "rollupOptions.input" should not include CSS files.`);
34002
33976
  }
34003
- const outDir = resolve$5(options$1.outDir);
33977
+ const outDir = resolve$4(options$1.outDir);
34004
33978
  const plugins$1 = environment.plugins.map((p$1) => injectEnvironmentToHooks(environment, p$1));
34005
33979
  const rollupOptions = {
34006
33980
  preserveEntrySignatures: ssr ? "allow-extension" : libOptions ? "strict" : false,
@@ -34661,7 +34635,7 @@ function createDepsOptimizer(environment) {
34661
34635
  }
34662
34636
  environment.waitForRequestsIdle().then(onCrawlEnd);
34663
34637
  if (noDiscovery) runOptimizer();
34664
- else depsOptimizer.scanProcessing = new Promise((resolve$5) => {
34638
+ else depsOptimizer.scanProcessing = new Promise((resolve$4) => {
34665
34639
  (async () => {
34666
34640
  try {
34667
34641
  debug$1?.(import_picocolors$3.default.green(`scanning for dependencies...`));
@@ -34688,7 +34662,7 @@ function createDepsOptimizer(environment) {
34688
34662
  } catch (e$1) {
34689
34663
  logger.error(e$1.stack || e$1.message);
34690
34664
  } finally {
34691
- resolve$5();
34665
+ resolve$4();
34692
34666
  depsOptimizer.scanProcessing = void 0;
34693
34667
  }
34694
34668
  })();
@@ -35880,13 +35854,13 @@ function resolveEnvironmentOptions(options$1, alias$2, preserveSymlinks, forceOp
35880
35854
  if (pathKey$1) logger.warnOnce(import_picocolors.default.yellow(`The \`define\` option contains an object with ${JSON.stringify(pathKey$1)} for "process.env" key. It looks like you may have passed the entire \`process.env\` object to \`define\`, which can unintentionally expose all environment variables. This poses a security risk and is discouraged.`));
35881
35855
  }
35882
35856
  }
35883
- const resolve$5 = resolveEnvironmentResolveOptions(options$1.resolve, alias$2, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment);
35857
+ const resolve$4 = resolveEnvironmentResolveOptions(options$1.resolve, alias$2, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment);
35884
35858
  return {
35885
35859
  define: options$1.define,
35886
- resolve: resolve$5,
35860
+ resolve: resolve$4,
35887
35861
  keepProcessEnv: options$1.keepProcessEnv ?? (isSsrTargetWebworkerEnvironment ? false : consumer === "server"),
35888
35862
  consumer,
35889
- optimizeDeps: resolveDepOptimizationOptions(options$1.optimizeDeps, resolve$5.preserveSymlinks, forceOptimizeDeps, consumer),
35863
+ optimizeDeps: resolveDepOptimizationOptions(options$1.optimizeDeps, resolve$4.preserveSymlinks, forceOptimizeDeps, consumer),
35890
35864
  dev: resolveDevEnvironmentOptions(options$1.dev, environmentName, consumer, preTransformRequests),
35891
35865
  build: resolveBuildEnvironmentOptions(options$1.build ?? {}, logger, consumer),
35892
35866
  plugins: void 0
@@ -35930,23 +35904,23 @@ const clientAlias = [{
35930
35904
  * alias and preserveSymlinks are not per-environment options, but they are
35931
35905
  * included in the resolved environment options for convenience.
35932
35906
  */
35933
- function resolveEnvironmentResolveOptions(resolve$5, alias$2, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment) {
35907
+ function resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment) {
35934
35908
  const resolvedResolve = mergeWithDefaults({
35935
35909
  ...configDefaults.resolve,
35936
35910
  mainFields: consumer === void 0 || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_MAIN_FIELDS : DEFAULT_SERVER_MAIN_FIELDS,
35937
35911
  conditions: consumer === void 0 || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_CONDITIONS : DEFAULT_SERVER_CONDITIONS.filter((c) => c !== "browser"),
35938
- builtins: resolve$5?.builtins ?? (consumer === "server" ? isSsrTargetWebworkerEnvironment && resolve$5?.noExternal === true ? [] : nodeLikeBuiltins : [])
35939
- }, resolve$5 ?? {});
35912
+ builtins: resolve$4?.builtins ?? (consumer === "server" ? isSsrTargetWebworkerEnvironment && resolve$4?.noExternal === true ? [] : nodeLikeBuiltins : [])
35913
+ }, resolve$4 ?? {});
35940
35914
  resolvedResolve.preserveSymlinks = preserveSymlinks;
35941
35915
  resolvedResolve.alias = alias$2;
35942
- if (resolve$5?.browserField === false && resolvedResolve.mainFields.includes("browser")) logger.warn(import_picocolors.default.yellow("`resolve.browserField` is set to false, but the option is removed in favour of the 'browser' string in `resolve.mainFields`. You may want to update `resolve.mainFields` to remove the 'browser' string and preserve the previous browser behaviour."));
35916
+ if (resolve$4?.browserField === false && resolvedResolve.mainFields.includes("browser")) logger.warn(import_picocolors.default.yellow("`resolve.browserField` is set to false, but the option is removed in favour of the 'browser' string in `resolve.mainFields`. You may want to update `resolve.mainFields` to remove the 'browser' string and preserve the previous browser behaviour."));
35943
35917
  return resolvedResolve;
35944
35918
  }
35945
- function resolveResolveOptions(resolve$5, logger) {
35946
- const alias$2 = normalizeAlias(mergeAlias(clientAlias, resolve$5?.alias || configDefaults.resolve.alias));
35947
- const preserveSymlinks = resolve$5?.preserveSymlinks ?? configDefaults.resolve.preserveSymlinks;
35919
+ function resolveResolveOptions(resolve$4, logger) {
35920
+ const alias$2 = normalizeAlias(mergeAlias(clientAlias, resolve$4?.alias || configDefaults.resolve.alias));
35921
+ const preserveSymlinks = resolve$4?.preserveSymlinks ?? configDefaults.resolve.preserveSymlinks;
35948
35922
  if (alias$2.some((a) => a.find === "/")) logger.warn(import_picocolors.default.yellow("`resolve.alias` contains an alias that maps `/`. This is not recommended as it can cause unexpected behavior when resolving paths."));
35949
- return resolveEnvironmentResolveOptions(resolve$5, alias$2, preserveSymlinks, logger, void 0);
35923
+ return resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks, logger, void 0);
35950
35924
  }
35951
35925
  function resolveDepOptimizationOptions(optimizeDeps$1, preserveSymlinks, forceOptimizeDeps, consumer) {
35952
35926
  return mergeWithDefaults({
@@ -36203,12 +36177,12 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36203
36177
  getSortedPlugins: void 0,
36204
36178
  getSortedPluginHooks: void 0,
36205
36179
  createResolver(options$1) {
36206
- const resolve$5 = createIdResolver(this, options$1);
36180
+ const resolve$4 = createIdResolver(this, options$1);
36207
36181
  const clientEnvironment = new PartialEnvironment("client", this);
36208
36182
  let ssrEnvironment;
36209
36183
  return async (id, importer, aliasOnly, ssr$1) => {
36210
36184
  if (ssr$1) ssrEnvironment ??= new PartialEnvironment("ssr", this);
36211
- return await resolve$5(ssr$1 ? ssrEnvironment : clientEnvironment, id, importer, aliasOnly);
36185
+ return await resolve$4(ssr$1 ? ssrEnvironment : clientEnvironment, id, importer, aliasOnly);
36212
36186
  };
36213
36187
  },
36214
36188
  fsDenyGlob: picomatch(server.fs.deny.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`), {
@@ -36318,8 +36292,8 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
36318
36292
  return null;
36319
36293
  }
36320
36294
  try {
36321
- const resolver = configLoader === "bundle" ? bundleAndLoadConfigFile : configLoader === "runner" ? runnerImportConfigFile : nativeImportConfigFile;
36322
- const { configExport, dependencies } = await resolver(resolvedPath);
36295
+ const resolver$1 = configLoader === "bundle" ? bundleAndLoadConfigFile : configLoader === "runner" ? runnerImportConfigFile : nativeImportConfigFile;
36296
+ const { configExport, dependencies } = await resolver$1(resolvedPath);
36323
36297
  debug?.(`config file loaded in ${getTime()}`);
36324
36298
  const config$2 = await (typeof configExport === "function" ? configExport(configEnv) : configExport);
36325
36299
  if (!isObject(config$2)) throw new Error(`config must export or return an object.`);