vite 4.3.2 → 4.3.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.

Potentially problematic release.


This version of vite might be problematic. Click here for more details.

@@ -2,6 +2,7 @@ import fs$l, { promises as promises$2 } from 'node:fs';
2
2
  import fsp from 'node:fs/promises';
3
3
  import path$o, { dirname as dirname$2, join as join$2, posix as posix$1, isAbsolute as isAbsolute$2, relative as relative$2, basename as basename$2, extname as extname$1 } from 'node:path';
4
4
  import { fileURLToPath, URL as URL$3, URLSearchParams, parse as parse$i, pathToFileURL } from 'node:url';
5
+ import { promisify as promisify$4, format as format$2, inspect } from 'node:util';
5
6
  import { performance as performance$1 } from 'node:perf_hooks';
6
7
  import { createRequire as createRequire$1, builtinModules } from 'node:module';
7
8
  import require$$0$3 from 'tty';
@@ -25,7 +26,6 @@ import { promises } from 'node:dns';
25
26
  import { CLIENT_ENTRY, OPTIMIZABLE_ENTRY_RE, wildcardHosts, loopbackHosts, VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER, FS_PREFIX, CLIENT_PUBLIC_PATH, ENV_PUBLIC_PATH, ENV_ENTRY, DEFAULT_MAIN_FIELDS, DEFAULT_EXTENSIONS as DEFAULT_EXTENSIONS$1, SPECIAL_QUERY_RE, DEP_VERSION_RE, CSS_LANGS_RE, KNOWN_ASSET_TYPES, CLIENT_DIR, JS_TYPES_RE, ESBUILD_MODULES_TARGET, VERSION as VERSION$1, VITE_PACKAGE_DIR, DEFAULT_DEV_PORT, DEFAULT_PREVIEW_PORT, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES } from '../constants.js';
26
27
  import require$$5$1 from 'crypto';
27
28
  import { Buffer as Buffer$1 } from 'node:buffer';
28
- import { promisify as promisify$4, format as format$2, inspect } from 'node:util';
29
29
  import require$$0$8, { createRequire as createRequire$2 } from 'module';
30
30
  import assert$1 from 'node:assert';
31
31
  import process$1 from 'node:process';
@@ -84,11 +84,7 @@ function getAugmentedNamespace(n) {
84
84
  return a;
85
85
  }
86
86
 
87
- var picocolorsExports = {};
88
- var picocolors = {
89
- get exports(){ return picocolorsExports; },
90
- set exports(v){ picocolorsExports = v; },
91
- };
87
+ var picocolors = {exports: {}};
92
88
 
93
89
  let tty = require$$0$3;
94
90
 
@@ -147,7 +143,10 @@ let createColors = (enabled = isColorSupported) => ({
147
143
  });
148
144
 
149
145
  picocolors.exports = createColors();
150
- picocolorsExports.createColors = createColors;
146
+ picocolors.exports.createColors = createColors;
147
+
148
+ var picocolorsExports = picocolors.exports;
149
+ var colors$1 = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports);
151
150
 
152
151
  function matches$1(pattern, importee) {
153
152
  if (pattern instanceof RegExp) {
@@ -429,12 +428,6 @@ function walk$4(ast, { enter, leave }) {
429
428
  return instance.visit(ast, null);
430
429
  }
431
430
 
432
- var picomatchExports = {};
433
- var picomatch$5 = {
434
- get exports(){ return picomatchExports; },
435
- set exports(v){ picomatchExports = v; },
436
- };
437
-
438
431
  var utils$k = {};
439
432
 
440
433
  const path$n = require$$0$4;
@@ -678,7 +671,7 @@ var constants$6 = {
678
671
  output = `(?:^(?!${output}).*$)`;
679
672
  }
680
673
  return output;
681
- };
674
+ };
682
675
  } (utils$k));
683
676
 
684
677
  const utils$j = utils$k;
@@ -2183,9 +2176,9 @@ const isObject$4 = val => val && typeof val === 'object' && !Array.isArray(val);
2183
2176
  * @api public
2184
2177
  */
2185
2178
 
2186
- const picomatch$4 = (glob, options, returnState = false) => {
2179
+ const picomatch$5 = (glob, options, returnState = false) => {
2187
2180
  if (Array.isArray(glob)) {
2188
- const fns = glob.map(input => picomatch$4(input, options, returnState));
2181
+ const fns = glob.map(input => picomatch$5(input, options, returnState));
2189
2182
  const arrayMatcher = str => {
2190
2183
  for (const isMatch of fns) {
2191
2184
  const state = isMatch(str);
@@ -2205,8 +2198,8 @@ const picomatch$4 = (glob, options, returnState = false) => {
2205
2198
  const opts = options || {};
2206
2199
  const posix = utils$h.isWindows(options);
2207
2200
  const regex = isState
2208
- ? picomatch$4.compileRe(glob, options)
2209
- : picomatch$4.makeRe(glob, options, false, true);
2201
+ ? picomatch$5.compileRe(glob, options)
2202
+ : picomatch$5.makeRe(glob, options, false, true);
2210
2203
 
2211
2204
  const state = regex.state;
2212
2205
  delete regex.state;
@@ -2214,11 +2207,11 @@ const picomatch$4 = (glob, options, returnState = false) => {
2214
2207
  let isIgnored = () => false;
2215
2208
  if (opts.ignore) {
2216
2209
  const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
2217
- isIgnored = picomatch$4(opts.ignore, ignoreOpts, returnState);
2210
+ isIgnored = picomatch$5(opts.ignore, ignoreOpts, returnState);
2218
2211
  }
2219
2212
 
2220
2213
  const matcher = (input, returnObject = false) => {
2221
- const { isMatch, match, output } = picomatch$4.test(input, regex, options, { glob, posix });
2214
+ const { isMatch, match, output } = picomatch$5.test(input, regex, options, { glob, posix });
2222
2215
  const result = { glob, state, regex, posix, input, output, match, isMatch };
2223
2216
 
2224
2217
  if (typeof opts.onResult === 'function') {
@@ -2268,7 +2261,7 @@ const picomatch$4 = (glob, options, returnState = false) => {
2268
2261
  * @api public
2269
2262
  */
2270
2263
 
2271
- picomatch$4.test = (input, regex, options, { glob, posix } = {}) => {
2264
+ picomatch$5.test = (input, regex, options, { glob, posix } = {}) => {
2272
2265
  if (typeof input !== 'string') {
2273
2266
  throw new TypeError('Expected input to be a string');
2274
2267
  }
@@ -2289,7 +2282,7 @@ picomatch$4.test = (input, regex, options, { glob, posix } = {}) => {
2289
2282
 
2290
2283
  if (match === false || opts.capture === true) {
2291
2284
  if (opts.matchBase === true || opts.basename === true) {
2292
- match = picomatch$4.matchBase(input, regex, options, posix);
2285
+ match = picomatch$5.matchBase(input, regex, options, posix);
2293
2286
  } else {
2294
2287
  match = regex.exec(output);
2295
2288
  }
@@ -2312,8 +2305,8 @@ picomatch$4.test = (input, regex, options, { glob, posix } = {}) => {
2312
2305
  * @api public
2313
2306
  */
2314
2307
 
2315
- picomatch$4.matchBase = (input, glob, options, posix = utils$h.isWindows(options)) => {
2316
- const regex = glob instanceof RegExp ? glob : picomatch$4.makeRe(glob, options);
2308
+ picomatch$5.matchBase = (input, glob, options, posix = utils$h.isWindows(options)) => {
2309
+ const regex = glob instanceof RegExp ? glob : picomatch$5.makeRe(glob, options);
2317
2310
  return regex.test(path$m.basename(input));
2318
2311
  };
2319
2312
 
@@ -2334,7 +2327,7 @@ picomatch$4.matchBase = (input, glob, options, posix = utils$h.isWindows(options
2334
2327
  * @api public
2335
2328
  */
2336
2329
 
2337
- picomatch$4.isMatch = (str, patterns, options) => picomatch$4(patterns, options)(str);
2330
+ picomatch$5.isMatch = (str, patterns, options) => picomatch$5(patterns, options)(str);
2338
2331
 
2339
2332
  /**
2340
2333
  * Parse a glob pattern to create the source string for a regular
@@ -2350,8 +2343,8 @@ picomatch$4.isMatch = (str, patterns, options) => picomatch$4(patterns, options)
2350
2343
  * @api public
2351
2344
  */
2352
2345
 
2353
- picomatch$4.parse = (pattern, options) => {
2354
- if (Array.isArray(pattern)) return pattern.map(p => picomatch$4.parse(p, options));
2346
+ picomatch$5.parse = (pattern, options) => {
2347
+ if (Array.isArray(pattern)) return pattern.map(p => picomatch$5.parse(p, options));
2355
2348
  return parse$g(pattern, { ...options, fastpaths: false });
2356
2349
  };
2357
2350
 
@@ -2382,7 +2375,7 @@ picomatch$4.parse = (pattern, options) => {
2382
2375
  * @api public
2383
2376
  */
2384
2377
 
2385
- picomatch$4.scan = (input, options) => scan$1(input, options);
2378
+ picomatch$5.scan = (input, options) => scan$1(input, options);
2386
2379
 
2387
2380
  /**
2388
2381
  * Compile a regular expression from the `state` object returned by the
@@ -2396,7 +2389,7 @@ picomatch$4.scan = (input, options) => scan$1(input, options);
2396
2389
  * @api public
2397
2390
  */
2398
2391
 
2399
- picomatch$4.compileRe = (state, options, returnOutput = false, returnState = false) => {
2392
+ picomatch$5.compileRe = (state, options, returnOutput = false, returnState = false) => {
2400
2393
  if (returnOutput === true) {
2401
2394
  return state.output;
2402
2395
  }
@@ -2410,7 +2403,7 @@ picomatch$4.compileRe = (state, options, returnOutput = false, returnState = fal
2410
2403
  source = `^(?!${source}).*$`;
2411
2404
  }
2412
2405
 
2413
- const regex = picomatch$4.toRegex(source, options);
2406
+ const regex = picomatch$5.toRegex(source, options);
2414
2407
  if (returnState === true) {
2415
2408
  regex.state = state;
2416
2409
  }
@@ -2437,7 +2430,7 @@ picomatch$4.compileRe = (state, options, returnOutput = false, returnState = fal
2437
2430
  * @api public
2438
2431
  */
2439
2432
 
2440
- picomatch$4.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
2433
+ picomatch$5.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
2441
2434
  if (!input || typeof input !== 'string') {
2442
2435
  throw new TypeError('Expected a non-empty string');
2443
2436
  }
@@ -2452,7 +2445,7 @@ picomatch$4.makeRe = (input, options = {}, returnOutput = false, returnState = f
2452
2445
  parsed = parse$g(input, options);
2453
2446
  }
2454
2447
 
2455
- return picomatch$4.compileRe(parsed, options, returnOutput, returnState);
2448
+ return picomatch$5.compileRe(parsed, options, returnOutput, returnState);
2456
2449
  };
2457
2450
 
2458
2451
  /**
@@ -2472,7 +2465,7 @@ picomatch$4.makeRe = (input, options = {}, returnOutput = false, returnState = f
2472
2465
  * @api public
2473
2466
  */
2474
2467
 
2475
- picomatch$4.toRegex = (source, options) => {
2468
+ picomatch$5.toRegex = (source, options) => {
2476
2469
  try {
2477
2470
  const opts = options || {};
2478
2471
  return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
@@ -2487,20 +2480,17 @@ picomatch$4.toRegex = (source, options) => {
2487
2480
  * @return {Object}
2488
2481
  */
2489
2482
 
2490
- picomatch$4.constants = constants$4;
2483
+ picomatch$5.constants = constants$4;
2491
2484
 
2492
2485
  /**
2493
2486
  * Expose "picomatch"
2494
2487
  */
2495
2488
 
2496
- var picomatch_1 = picomatch$4;
2489
+ var picomatch_1 = picomatch$5;
2497
2490
 
2498
- (function (module) {
2491
+ var picomatch$3 = picomatch_1;
2499
2492
 
2500
- module.exports = picomatch_1;
2501
- } (picomatch$5));
2502
-
2503
- var picomatch$3 = /*@__PURE__*/getDefaultExportFromCjs(picomatchExports);
2493
+ var picomatch$4 = /*@__PURE__*/getDefaultExportFromCjs(picomatch$3);
2504
2494
 
2505
2495
  const extractors = {
2506
2496
  ArrayPattern(names, param) {
@@ -2680,7 +2670,7 @@ const createFilter$1 = function createFilter(include, exclude, options) {
2680
2670
  test: (what) => {
2681
2671
  // this refactor is a tad overly verbose but makes for easy debugging
2682
2672
  const pattern = getMatcherString(id, resolutionBase);
2683
- const fn = picomatch$3(pattern, { dot: true });
2673
+ const fn = picomatch$4(pattern, { dot: true });
2684
2674
  const result = fn(what);
2685
2675
  return result;
2686
2676
  }
@@ -2836,6 +2826,8 @@ var commondir = function (basedir, relfiles) {
2836
2826
  return res.length > 1 ? res.join('/') : '/'
2837
2827
  };
2838
2828
 
2829
+ var getCommonDir = /*@__PURE__*/getDefaultExportFromCjs(commondir);
2830
+
2839
2831
  var old$1 = {};
2840
2832
 
2841
2833
  // Copyright Joyent, Inc. and other Node contributors.
@@ -4374,22 +4366,14 @@ let Minimatch$1 = class Minimatch {
4374
4366
 
4375
4367
  minimatch$1.Minimatch = Minimatch$1;
4376
4368
 
4377
- var inheritsExports = {};
4378
- var inherits = {
4379
- get exports(){ return inheritsExports; },
4380
- set exports(v){ inheritsExports = v; },
4381
- };
4369
+ var inherits = {exports: {}};
4382
4370
 
4383
- var inherits_browserExports = {};
4384
- var inherits_browser = {
4385
- get exports(){ return inherits_browserExports; },
4386
- set exports(v){ inherits_browserExports = v; },
4387
- };
4371
+ var inherits_browser = {exports: {}};
4388
4372
 
4389
4373
  var hasRequiredInherits_browser;
4390
4374
 
4391
4375
  function requireInherits_browser () {
4392
- if (hasRequiredInherits_browser) return inherits_browserExports;
4376
+ if (hasRequiredInherits_browser) return inherits_browser.exports;
4393
4377
  hasRequiredInherits_browser = 1;
4394
4378
  if (typeof Object.create === 'function') {
4395
4379
  // implementation from standard node.js 'util' module
@@ -4418,20 +4402,20 @@ function requireInherits_browser () {
4418
4402
  }
4419
4403
  };
4420
4404
  }
4421
- return inherits_browserExports;
4405
+ return inherits_browser.exports;
4422
4406
  }
4423
4407
 
4424
- (function (module) {
4425
- try {
4426
- var util = require('util');
4427
- /* istanbul ignore next */
4428
- if (typeof util.inherits !== 'function') throw '';
4429
- module.exports = util.inherits;
4430
- } catch (e) {
4431
- /* istanbul ignore next */
4432
- module.exports = requireInherits_browser();
4433
- }
4434
- } (inherits));
4408
+ try {
4409
+ var util$2 = require('util');
4410
+ /* istanbul ignore next */
4411
+ if (typeof util$2.inherits !== 'function') throw '';
4412
+ inherits.exports = util$2.inherits;
4413
+ } catch (e) {
4414
+ /* istanbul ignore next */
4415
+ inherits.exports = requireInherits_browser();
4416
+ }
4417
+
4418
+ var inheritsExports = inherits.exports;
4435
4419
 
4436
4420
  var common$c = {};
4437
4421
 
@@ -5199,15 +5183,11 @@ function wrappy$2 (fn, cb) {
5199
5183
  }
5200
5184
  }
5201
5185
 
5202
- var onceExports = {};
5203
- var once$2 = {
5204
- get exports(){ return onceExports; },
5205
- set exports(v){ onceExports = v; },
5206
- };
5186
+ var once$2 = {exports: {}};
5207
5187
 
5208
5188
  var wrappy$1 = wrappy_1;
5209
5189
  once$2.exports = wrappy$1(once$1);
5210
- onceExports.strict = wrappy$1(onceStrict);
5190
+ once$2.exports.strict = wrappy$1(onceStrict);
5211
5191
 
5212
5192
  once$1.proto = once$1(function () {
5213
5193
  Object.defineProperty(Function.prototype, 'once', {
@@ -5248,6 +5228,8 @@ function onceStrict (fn) {
5248
5228
  return f
5249
5229
  }
5250
5230
 
5231
+ var onceExports = once$2.exports;
5232
+
5251
5233
  var wrappy = wrappy_1;
5252
5234
  var reqs = Object.create(null);
5253
5235
  var once = onceExports;
@@ -6098,7 +6080,7 @@ function requireGlob () {
6098
6080
  }
6099
6081
 
6100
6082
  var globExports = requireGlob();
6101
- var glob = /*@__PURE__*/getDefaultExportFromCjs(globExports);
6083
+ var glob$1 = /*@__PURE__*/getDefaultExportFromCjs(globExports);
6102
6084
 
6103
6085
  const comma = ','.charCodeAt(0);
6104
6086
  const semicolon = ';'.charCodeAt(0);
@@ -7431,7 +7413,7 @@ function isReference(node, parent) {
7431
7413
  return false;
7432
7414
  }
7433
7415
 
7434
- var version$3 = "24.0.1";
7416
+ var version$3 = "24.1.0";
7435
7417
  var peerDependencies = {
7436
7418
  rollup: "^2.68.0||^3.0.0"
7437
7419
  };
@@ -7596,7 +7578,7 @@ function getDynamicRequireModules(patterns, dynamicRequireRoot) {
7596
7578
  isNegated
7597
7579
  ? dynamicRequireModules.delete(targetPath)
7598
7580
  : dynamicRequireModules.set(targetPath, resolvedPath);
7599
- for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {
7581
+ for (const path of glob$1.sync(isNegated ? pattern.substr(1) : pattern)) {
7600
7582
  const resolvedPath = resolve$3(path);
7601
7583
  const requirePath = normalizePathSlashes(resolvedPath);
7602
7584
  if (isDirectory(resolvedPath)) {
@@ -7611,7 +7593,7 @@ function getDynamicRequireModules(patterns, dynamicRequireRoot) {
7611
7593
  }
7612
7594
  }
7613
7595
  return {
7614
- commonDir: dirNames.size ? commondir([...dirNames, dynamicRequireRoot]) : null,
7596
+ commonDir: dirNames.size ? getCommonDir([...dirNames, dynamicRequireRoot]) : null,
7615
7597
  dynamicRequireModules
7616
7598
  };
7617
7599
  }
@@ -7835,13 +7817,16 @@ async function getStaticRequireProxy(id, requireReturnsDefault, loadModule) {
7835
7817
  } = await loadModule({ id });
7836
7818
  if (!commonjsMeta) {
7837
7819
  return getUnknownRequireProxy(id, requireReturnsDefault);
7838
- } else if (commonjsMeta.isCommonJS) {
7820
+ }
7821
+ if (commonjsMeta.isCommonJS) {
7839
7822
  return `export { __moduleExports as default } from ${JSON.stringify(id)};`;
7840
- } else if (!requireReturnsDefault) {
7823
+ }
7824
+ if (!requireReturnsDefault) {
7841
7825
  return `import { getAugmentedNamespace } from "${HELPERS_ID}"; import * as ${name} from ${JSON.stringify(
7842
7826
  id
7843
7827
  )}; export default /*@__PURE__*/getAugmentedNamespace(${name});`;
7844
- } else if (
7828
+ }
7829
+ if (
7845
7830
  requireReturnsDefault !== true &&
7846
7831
  (requireReturnsDefault === 'namespace' ||
7847
7832
  !commonjsMeta.hasDefaultExport ||
@@ -8331,11 +8316,16 @@ function getKeypath(node) {
8331
8316
 
8332
8317
  const KEY_COMPILED_ESM = '__esModule';
8333
8318
 
8334
- function isDefineCompiledEsm(node) {
8319
+ function getDefineCompiledEsmType(node) {
8320
+ const definedPropertyWithExports = getDefinePropertyCallName(node, 'exports');
8335
8321
  const definedProperty =
8336
- getDefinePropertyCallName(node, 'exports') || getDefinePropertyCallName(node, 'module.exports');
8322
+ definedPropertyWithExports || getDefinePropertyCallName(node, 'module.exports');
8337
8323
  if (definedProperty && definedProperty.key === KEY_COMPILED_ESM) {
8338
- return isTruthy(definedProperty.value);
8324
+ return isTruthy(definedProperty.value)
8325
+ ? definedPropertyWithExports
8326
+ ? 'exports'
8327
+ : 'module'
8328
+ : false;
8339
8329
  }
8340
8330
  return false;
8341
8331
  }
@@ -8379,20 +8369,6 @@ function isShorthandProperty(parent) {
8379
8369
  return parent && parent.type === 'Property' && parent.shorthand;
8380
8370
  }
8381
8371
 
8382
- function hasDefineEsmProperty(node) {
8383
- return node.properties.some((property) => {
8384
- if (
8385
- property.type === 'Property' &&
8386
- property.key.type === 'Identifier' &&
8387
- property.key.name === '__esModule' &&
8388
- isTruthy(property.value)
8389
- ) {
8390
- return true;
8391
- }
8392
- return false;
8393
- });
8394
- }
8395
-
8396
8372
  function wrapCode(magicString, uses, moduleName, exportsName, indentExclusionRanges) {
8397
8373
  const args = [];
8398
8374
  const passedArgs = [];
@@ -8402,19 +8378,22 @@ function wrapCode(magicString, uses, moduleName, exportsName, indentExclusionRan
8402
8378
  }
8403
8379
  if (uses.exports) {
8404
8380
  args.push('exports');
8405
- passedArgs.push(exportsName);
8381
+ passedArgs.push(uses.module ? `${moduleName}.exports` : exportsName);
8406
8382
  }
8407
8383
  magicString
8408
8384
  .trim()
8409
8385
  .indent('\t', { exclude: indentExclusionRanges })
8410
8386
  .prepend(`(function (${args.join(', ')}) {\n`)
8411
- .append(`\n} (${passedArgs.join(', ')}));`);
8387
+ // For some reason, this line is only indented correctly when using a
8388
+ // require-wrapper if we have this leading space
8389
+ .append(` \n} (${passedArgs.join(', ')}));`);
8412
8390
  }
8413
8391
 
8414
8392
  function rewriteExportsAndGetExportsBlock(
8415
8393
  magicString,
8416
8394
  moduleName,
8417
8395
  exportsName,
8396
+ exportedExportsName,
8418
8397
  wrapped,
8419
8398
  moduleExportsAssignments,
8420
8399
  firstTopLevelModuleExportsAssignment,
@@ -8425,7 +8404,6 @@ function rewriteExportsAndGetExportsBlock(
8425
8404
  code,
8426
8405
  HELPERS_NAME,
8427
8406
  exportMode,
8428
- detectWrappedDefault,
8429
8407
  defaultIsModuleExports,
8430
8408
  usesRequireWrapper,
8431
8409
  requireName
@@ -8453,17 +8431,20 @@ function rewriteExportsAndGetExportsBlock(
8453
8431
  exportDeclarations,
8454
8432
  moduleExportsAssignments,
8455
8433
  firstTopLevelModuleExportsAssignment,
8456
- exportsName
8434
+ exportsName,
8435
+ defaultIsModuleExports,
8436
+ HELPERS_NAME
8457
8437
  );
8458
8438
  } else {
8459
- exports.push(`${exportsName} as __moduleExports`);
8439
+ if (exportMode === 'module') {
8440
+ exportDeclarations.push(`var ${exportedExportsName} = ${moduleName}.exports`);
8441
+ exports.push(`${exportedExportsName} as __moduleExports`);
8442
+ } else {
8443
+ exports.push(`${exportsName} as __moduleExports`);
8444
+ }
8460
8445
  if (wrapped) {
8461
- getExportsWhenWrapping(
8462
- exportDeclarations,
8463
- exportsName,
8464
- detectWrappedDefault,
8465
- HELPERS_NAME,
8466
- defaultIsModuleExports
8446
+ exportDeclarations.push(
8447
+ getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME)
8467
8448
  );
8468
8449
  } else {
8469
8450
  getExports(
@@ -8476,17 +8457,19 @@ function rewriteExportsAndGetExportsBlock(
8476
8457
  topLevelAssignments,
8477
8458
  moduleName,
8478
8459
  exportsName,
8460
+ exportedExportsName,
8479
8461
  defineCompiledEsmExpressions,
8480
8462
  HELPERS_NAME,
8481
- defaultIsModuleExports
8463
+ defaultIsModuleExports,
8464
+ exportMode
8482
8465
  );
8483
8466
  }
8484
8467
  }
8485
8468
  if (exports.length) {
8486
- exportDeclarations.push(`export { ${exports.join(', ')} };`);
8469
+ exportDeclarations.push(`export { ${exports.join(', ')} }`);
8487
8470
  }
8488
8471
 
8489
- return `\n\n${exportDeclarations.join('\n')}`;
8472
+ return `\n\n${exportDeclarations.join(';\n')};`;
8490
8473
  }
8491
8474
 
8492
8475
  function getExportsWhenUsingRequireWrapper(
@@ -8501,35 +8484,32 @@ function getExportsWhenUsingRequireWrapper(
8501
8484
  requireName,
8502
8485
  defineCompiledEsmExpressions
8503
8486
  ) {
8504
- if (!wrapped) {
8505
- if (exportMode === 'replace') {
8506
- for (const { left } of moduleExportsAssignments) {
8507
- magicString.overwrite(left.start, left.end, exportsName);
8508
- }
8509
- } else {
8510
- // Collect and rewrite module.exports assignments
8511
- for (const { left } of moduleExportsAssignments) {
8512
- magicString.overwrite(left.start, left.end, `${moduleName}.exports`);
8513
- }
8514
- // Collect and rewrite named exports
8515
- for (const [exportName, { nodes }] of exportsAssignmentsByName) {
8516
- for (const node of nodes) {
8517
- magicString.overwrite(node.start, node.left.end, `${exportsName}.${exportName}`);
8518
- }
8519
- }
8520
- // Collect and rewrite exports.__esModule assignments
8521
- for (const expression of defineCompiledEsmExpressions) {
8522
- const moduleExportsExpression =
8523
- expression.type === 'CallExpression' ? expression.arguments[0] : expression.left.object;
8487
+ exports.push(`${requireName} as __require`);
8488
+ if (wrapped) return;
8489
+ if (exportMode === 'replace') {
8490
+ rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, exportsName);
8491
+ } else {
8492
+ rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, `${moduleName}.exports`);
8493
+ // Collect and rewrite named exports
8494
+ for (const [exportName, { nodes }] of exportsAssignmentsByName) {
8495
+ for (const { node, type } of nodes) {
8524
8496
  magicString.overwrite(
8525
- moduleExportsExpression.start,
8526
- moduleExportsExpression.end,
8527
- exportsName
8497
+ node.start,
8498
+ node.left.end,
8499
+ `${
8500
+ exportMode === 'module' && type === 'module' ? `${moduleName}.exports` : exportsName
8501
+ }.${exportName}`
8528
8502
  );
8529
8503
  }
8530
8504
  }
8505
+ replaceDefineCompiledEsmExpressionsAndGetIfRestorable(
8506
+ defineCompiledEsmExpressions,
8507
+ magicString,
8508
+ exportMode,
8509
+ moduleName,
8510
+ exportsName
8511
+ );
8531
8512
  }
8532
- exports.push(`${requireName} as __require`);
8533
8513
  }
8534
8514
 
8535
8515
  function getExportsForReplacedModuleExports(
@@ -8538,34 +8518,30 @@ function getExportsForReplacedModuleExports(
8538
8518
  exportDeclarations,
8539
8519
  moduleExportsAssignments,
8540
8520
  firstTopLevelModuleExportsAssignment,
8541
- exportsName
8521
+ exportsName,
8522
+ defaultIsModuleExports,
8523
+ HELPERS_NAME
8542
8524
  ) {
8543
8525
  for (const { left } of moduleExportsAssignments) {
8544
8526
  magicString.overwrite(left.start, left.end, exportsName);
8545
8527
  }
8546
8528
  magicString.prependRight(firstTopLevelModuleExportsAssignment.left.start, 'var ');
8547
8529
  exports.push(`${exportsName} as __moduleExports`);
8548
- exportDeclarations.push(`export default ${exportsName};`);
8549
- }
8550
-
8551
- function getExportsWhenWrapping(
8552
- exportDeclarations,
8553
- exportsName,
8554
- detectWrappedDefault,
8555
- HELPERS_NAME,
8556
- defaultIsModuleExports
8557
- ) {
8558
8530
  exportDeclarations.push(
8559
- `export default ${
8560
- detectWrappedDefault && defaultIsModuleExports === 'auto'
8561
- ? `/*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName})`
8562
- : defaultIsModuleExports === false
8563
- ? `${exportsName}.default`
8564
- : exportsName
8565
- };`
8531
+ getDefaultExportDeclaration(exportsName, defaultIsModuleExports, HELPERS_NAME)
8566
8532
  );
8567
8533
  }
8568
8534
 
8535
+ function getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME) {
8536
+ return `export default ${
8537
+ defaultIsModuleExports === true
8538
+ ? exportedExportsName
8539
+ : defaultIsModuleExports === false
8540
+ ? `${exportedExportsName}.default`
8541
+ : `/*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportedExportsName})`
8542
+ }`;
8543
+ }
8544
+
8569
8545
  function getExports(
8570
8546
  magicString,
8571
8547
  exports,
@@ -8576,9 +8552,11 @@ function getExports(
8576
8552
  topLevelAssignments,
8577
8553
  moduleName,
8578
8554
  exportsName,
8555
+ exportedExportsName,
8579
8556
  defineCompiledEsmExpressions,
8580
8557
  HELPERS_NAME,
8581
- defaultIsModuleExports
8558
+ defaultIsModuleExports,
8559
+ exportMode
8582
8560
  ) {
8583
8561
  let deconflictedDefaultExportName;
8584
8562
  // Collect and rewrite module.exports assignments
@@ -8590,8 +8568,10 @@ function getExports(
8590
8568
  for (const [exportName, { nodes }] of exportsAssignmentsByName) {
8591
8569
  const deconflicted = deconflictedExportNames[exportName];
8592
8570
  let needsDeclaration = true;
8593
- for (const node of nodes) {
8594
- let replacement = `${deconflicted} = ${exportsName}.${exportName}`;
8571
+ for (const { node, type } of nodes) {
8572
+ let replacement = `${deconflicted} = ${
8573
+ exportMode === 'module' && type === 'module' ? `${moduleName}.exports` : exportsName
8574
+ }.${exportName}`;
8595
8575
  if (needsDeclaration && topLevelAssignments.has(node)) {
8596
8576
  replacement = `var ${replacement}`;
8597
8577
  needsDeclaration = false;
@@ -8609,24 +8589,60 @@ function getExports(
8609
8589
  }
8610
8590
  }
8611
8591
 
8612
- // Collect and rewrite exports.__esModule assignments
8613
- let isRestorableCompiledEsm = false;
8614
- for (const expression of defineCompiledEsmExpressions) {
8615
- isRestorableCompiledEsm = true;
8616
- const moduleExportsExpression =
8617
- expression.type === 'CallExpression' ? expression.arguments[0] : expression.left.object;
8618
- magicString.overwrite(moduleExportsExpression.start, moduleExportsExpression.end, exportsName);
8619
- }
8592
+ const isRestorableCompiledEsm = replaceDefineCompiledEsmExpressionsAndGetIfRestorable(
8593
+ defineCompiledEsmExpressions,
8594
+ magicString,
8595
+ exportMode,
8596
+ moduleName,
8597
+ exportsName
8598
+ );
8620
8599
 
8621
- if (!isRestorableCompiledEsm || defaultIsModuleExports === true) {
8622
- exports.push(`${exportsName} as default`);
8623
- } else if (moduleExportsAssignments.length === 0 || defaultIsModuleExports === false) {
8624
- exports.push(`${deconflictedDefaultExportName || exportsName} as default`);
8600
+ if (
8601
+ defaultIsModuleExports === false ||
8602
+ (defaultIsModuleExports === 'auto' &&
8603
+ isRestorableCompiledEsm &&
8604
+ moduleExportsAssignments.length === 0)
8605
+ ) {
8606
+ // If there is no deconflictedDefaultExportName, then we use the namespace as
8607
+ // fallback because there can be no "default" property on the namespace
8608
+ exports.push(`${deconflictedDefaultExportName || exportedExportsName} as default`);
8609
+ } else if (
8610
+ defaultIsModuleExports === true ||
8611
+ (!isRestorableCompiledEsm && moduleExportsAssignments.length === 0)
8612
+ ) {
8613
+ exports.push(`${exportedExportsName} as default`);
8625
8614
  } else {
8626
8615
  exportDeclarations.push(
8627
- `export default /*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportsName});`
8616
+ getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME)
8617
+ );
8618
+ }
8619
+ }
8620
+
8621
+ function rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, exportsName) {
8622
+ for (const { left } of moduleExportsAssignments) {
8623
+ magicString.overwrite(left.start, left.end, exportsName);
8624
+ }
8625
+ }
8626
+
8627
+ function replaceDefineCompiledEsmExpressionsAndGetIfRestorable(
8628
+ defineCompiledEsmExpressions,
8629
+ magicString,
8630
+ exportMode,
8631
+ moduleName,
8632
+ exportsName
8633
+ ) {
8634
+ let isRestorableCompiledEsm = false;
8635
+ for (const { node, type } of defineCompiledEsmExpressions) {
8636
+ isRestorableCompiledEsm = true;
8637
+ const moduleExportsExpression =
8638
+ node.type === 'CallExpression' ? node.arguments[0] : node.left.object;
8639
+ magicString.overwrite(
8640
+ moduleExportsExpression.start,
8641
+ moduleExportsExpression.end,
8642
+ exportMode === 'module' && type === 'module' ? `${moduleName}.exports` : exportsName
8628
8643
  );
8629
8644
  }
8645
+ return isRestorableCompiledEsm;
8630
8646
  }
8631
8647
 
8632
8648
  function isRequireExpression(node, scope) {
@@ -8717,19 +8733,18 @@ function getRequireHandlers() {
8717
8733
  commonjsMeta
8718
8734
  ) {
8719
8735
  const imports = [];
8720
- imports.push(`import * as ${helpersName} from "${HELPERS_ID}";`);
8736
+ imports.push(`import * as ${helpersName} from "${HELPERS_ID}"`);
8721
8737
  if (dynamicRequireName) {
8722
8738
  imports.push(
8723
8739
  `import { ${
8724
8740
  isDynamicRequireModulesEnabled ? CREATE_COMMONJS_REQUIRE_EXPORT : COMMONJS_REQUIRE_EXPORT
8725
- } as ${dynamicRequireName} } from "${DYNAMIC_MODULES_ID}";`
8741
+ } as ${dynamicRequireName} } from "${DYNAMIC_MODULES_ID}"`
8726
8742
  );
8727
8743
  }
8728
8744
  if (exportMode === 'module') {
8729
8745
  imports.push(
8730
- `import { __module as ${moduleName}, exports as ${exportsName} } from ${JSON.stringify(
8731
- wrapId$1(id, MODULE_SUFFIX)
8732
- )}`
8746
+ `import { __module as ${moduleName} } from ${JSON.stringify(wrapId$1(id, MODULE_SUFFIX))}`,
8747
+ `var ${exportsName} = ${moduleName}.exports`
8733
8748
  );
8734
8749
  } else if (exportMode === 'exports') {
8735
8750
  imports.push(
@@ -8755,7 +8770,7 @@ function getRequireHandlers() {
8755
8770
  getIgnoreTryCatchRequireStatementMode,
8756
8771
  magicString
8757
8772
  );
8758
- return imports.length ? `${imports.join('\n')}\n\n` : '';
8773
+ return imports.length ? `${imports.join(';\n')};\n\n` : '';
8759
8774
  }
8760
8775
 
8761
8776
  return {
@@ -8815,9 +8830,9 @@ function processRequireExpressions(
8815
8830
  }
8816
8831
  if (needsImport) {
8817
8832
  if (isCommonJS === IS_WRAPPED_COMMONJS) {
8818
- imports.push(`import { __require as ${name} } from ${JSON.stringify(resolvedId)};`);
8833
+ imports.push(`import { __require as ${name} } from ${JSON.stringify(resolvedId)}`);
8819
8834
  } else {
8820
- imports.push(`import ${usesRequired ? `${name} from ` : ''}${JSON.stringify(resolvedId)};`);
8835
+ imports.push(`import ${usesRequired ? `${name} from ` : ''}${JSON.stringify(resolvedId)}`);
8821
8836
  }
8822
8837
  }
8823
8838
  }
@@ -8842,6 +8857,14 @@ const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/
8842
8857
 
8843
8858
  const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
8844
8859
 
8860
+ // There are three different types of CommonJS modules, described by their
8861
+ // "exportMode":
8862
+ // - exports: Only assignments to (module.)exports properties
8863
+ // - replace: A single assignment to module.exports itself
8864
+ // - module: Anything else
8865
+ // Special cases:
8866
+ // - usesRequireWrapper
8867
+ // - isWrapped
8845
8868
  async function transformCommonjs(
8846
8869
  parse,
8847
8870
  code,
@@ -8878,7 +8901,6 @@ async function transformCommonjs(
8878
8901
  let programDepth = 0;
8879
8902
  let currentTryBlockEnd = null;
8880
8903
  let shouldWrap = false;
8881
- let reexports = false;
8882
8904
 
8883
8905
  const globals = new Set();
8884
8906
  // A conditionalNode is a node for which execution is not guaranteed. If such a node is a require
@@ -8952,31 +8974,20 @@ async function transformCommonjs(
8952
8974
  } else if (!firstTopLevelModuleExportsAssignment) {
8953
8975
  firstTopLevelModuleExportsAssignment = node;
8954
8976
  }
8955
-
8956
- if (defaultIsModuleExports === false) {
8957
- shouldWrap = true;
8958
- } else if (defaultIsModuleExports === 'auto') {
8959
- if (node.right.type === 'ObjectExpression') {
8960
- if (hasDefineEsmProperty(node.right)) {
8961
- shouldWrap = true;
8962
- }
8963
- } else if (isRequireExpression(node.right, scope)) {
8964
- shouldWrap = true;
8965
- reexports = true;
8966
- }
8967
- }
8968
8977
  } else if (exportName === KEY_COMPILED_ESM) {
8969
8978
  if (programDepth > 3) {
8970
8979
  shouldWrap = true;
8971
8980
  } else {
8972
- topLevelDefineCompiledEsmExpressions.push(node);
8981
+ // The "type" is either "module" or "exports" to discern
8982
+ // assignments to module.exports vs exports if needed
8983
+ topLevelDefineCompiledEsmExpressions.push({ node, type: flattened.name });
8973
8984
  }
8974
8985
  } else {
8975
8986
  const exportsAssignments = exportsAssignmentsByName.get(exportName) || {
8976
8987
  nodes: [],
8977
8988
  scopes: new Set()
8978
8989
  };
8979
- exportsAssignments.nodes.push(node);
8990
+ exportsAssignments.nodes.push({ node, type: flattened.name });
8980
8991
  exportsAssignments.scopes.add(scope);
8981
8992
  exportsAccessScopes.add(scope);
8982
8993
  exportsAssignmentsByName.set(exportName, exportsAssignments);
@@ -8993,11 +9004,12 @@ async function transformCommonjs(
8993
9004
  }
8994
9005
  return;
8995
9006
  case 'CallExpression': {
8996
- if (isDefineCompiledEsm(node)) {
9007
+ const defineCompiledEsmType = getDefineCompiledEsmType(node);
9008
+ if (defineCompiledEsmType) {
8997
9009
  if (programDepth === 3 && parent.type === 'ExpressionStatement') {
8998
9010
  // skip special handling for [module.]exports until we know we render this
8999
9011
  skippedNodes.add(node.arguments[0]);
9000
- topLevelDefineCompiledEsmExpressions.push(node);
9012
+ topLevelDefineCompiledEsmExpressions.push({ node, type: defineCompiledEsmType });
9001
9013
  } else {
9002
9014
  shouldWrap = true;
9003
9015
  }
@@ -9015,6 +9027,7 @@ async function transformCommonjs(
9015
9027
  uses.require = true;
9016
9028
  const requireNode = node.callee.object;
9017
9029
  replacedDynamicRequires.push(requireNode);
9030
+ skippedNodes.add(node.callee);
9018
9031
  return;
9019
9032
  }
9020
9033
 
@@ -9257,11 +9270,6 @@ async function transformCommonjs(
9257
9270
 
9258
9271
  // We cannot wrap ES/mixed modules
9259
9272
  shouldWrap = !isEsModule && (shouldWrap || (uses.exports && moduleExportsAssignments.length > 0));
9260
- const detectWrappedDefault =
9261
- shouldWrap &&
9262
- (reexports ||
9263
- topLevelDefineCompiledEsmExpressions.length > 0 ||
9264
- code.indexOf('__esModule') >= 0);
9265
9273
 
9266
9274
  if (
9267
9275
  !(
@@ -9299,6 +9307,9 @@ async function transformCommonjs(
9299
9307
  ? 'exports'
9300
9308
  : 'module';
9301
9309
 
9310
+ const exportedExportsName =
9311
+ exportMode === 'module' ? deconflict([], globals, `${nameBase}Exports`) : exportsName;
9312
+
9302
9313
  const importBlock = await rewriteRequireExpressionsAndGetImportBlock(
9303
9314
  magicString,
9304
9315
  topLevelDeclarations,
@@ -9323,6 +9334,7 @@ async function transformCommonjs(
9323
9334
  magicString,
9324
9335
  moduleName,
9325
9336
  exportsName,
9337
+ exportedExportsName,
9326
9338
  shouldWrap,
9327
9339
  moduleExportsAssignments,
9328
9340
  firstTopLevelModuleExportsAssignment,
@@ -9333,7 +9345,6 @@ async function transformCommonjs(
9333
9345
  code,
9334
9346
  helpersName,
9335
9347
  exportMode,
9336
- detectWrappedDefault,
9337
9348
  defaultIsModuleExports,
9338
9349
  usesRequireWrapper,
9339
9350
  requireName
@@ -9347,15 +9358,16 @@ async function transformCommonjs(
9347
9358
  magicString.trim().indent('\t', {
9348
9359
  exclude: indentExclusionRanges
9349
9360
  });
9361
+ const exported = exportMode === 'module' ? `${moduleName}.exports` : exportsName;
9350
9362
  magicString.prepend(
9351
9363
  `var ${isRequiredName};
9352
9364
 
9353
9365
  function ${requireName} () {
9354
- \tif (${isRequiredName}) return ${exportsName};
9366
+ \tif (${isRequiredName}) return ${exported};
9355
9367
  \t${isRequiredName} = 1;
9356
9368
  `
9357
9369
  ).append(`
9358
- \treturn ${exportsName};
9370
+ \treturn ${exported};
9359
9371
  }`);
9360
9372
  if (exportMode === 'replace') {
9361
9373
  magicString.prepend(`var ${exportsName};\n`);
@@ -9585,15 +9597,9 @@ function commonjs(options = {}) {
9585
9597
  }
9586
9598
 
9587
9599
  if (isWrappedId(id, MODULE_SUFFIX)) {
9588
- const module = getName(unwrapId$1(id, MODULE_SUFFIX));
9589
- const moduleExports = `${module}Exports`;
9600
+ const name = getName(unwrapId$1(id, MODULE_SUFFIX));
9590
9601
  return {
9591
- code: `var ${moduleExports} = {};
9592
- var ${module} = {
9593
- get exports(){ return ${moduleExports}; },
9594
- set exports(v){ ${moduleExports} = v; },
9595
- };
9596
- export {${module} as __module, ${moduleExports} as exports}`,
9602
+ code: `var ${name} = {exports: {}}; export {${name} as __module}`,
9597
9603
  meta: { commonjs: { isCommonJS: false } }
9598
9604
  };
9599
9605
  }
@@ -9917,11 +9923,11 @@ function stripFilename(path) {
9917
9923
  return path.slice(0, index + 1);
9918
9924
  }
9919
9925
 
9920
- const COLUMN = 0;
9921
- const SOURCES_INDEX = 1;
9922
- const SOURCE_LINE = 2;
9923
- const SOURCE_COLUMN = 3;
9924
- const NAMES_INDEX = 4;
9926
+ const COLUMN$1 = 0;
9927
+ const SOURCES_INDEX$1 = 1;
9928
+ const SOURCE_LINE$1 = 2;
9929
+ const SOURCE_COLUMN$1 = 3;
9930
+ const NAMES_INDEX$1 = 4;
9925
9931
 
9926
9932
  function maybeSort(mappings, owned) {
9927
9933
  const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
@@ -9945,7 +9951,7 @@ function nextUnsortedSegmentLine(mappings, start) {
9945
9951
  }
9946
9952
  function isSorted(line) {
9947
9953
  for (let j = 1; j < line.length; j++) {
9948
- if (line[j][COLUMN] < line[j - 1][COLUMN]) {
9954
+ if (line[j][COLUMN$1] < line[j - 1][COLUMN$1]) {
9949
9955
  return false;
9950
9956
  }
9951
9957
  }
@@ -9957,7 +9963,7 @@ function sortSegments(line, owned) {
9957
9963
  return line.sort(sortComparator);
9958
9964
  }
9959
9965
  function sortComparator(a, b) {
9960
- return a[COLUMN] - b[COLUMN];
9966
+ return a[COLUMN$1] - b[COLUMN$1];
9961
9967
  }
9962
9968
 
9963
9969
  let found = false;
@@ -9980,7 +9986,7 @@ let found = false;
9980
9986
  function binarySearch(haystack, needle, low, high) {
9981
9987
  while (low <= high) {
9982
9988
  const mid = low + ((high - low) >> 1);
9983
- const cmp = haystack[mid][COLUMN] - needle;
9989
+ const cmp = haystack[mid][COLUMN$1] - needle;
9984
9990
  if (cmp === 0) {
9985
9991
  found = true;
9986
9992
  return mid;
@@ -9997,14 +10003,14 @@ function binarySearch(haystack, needle, low, high) {
9997
10003
  }
9998
10004
  function upperBound(haystack, needle, index) {
9999
10005
  for (let i = index + 1; i < haystack.length; index = i++) {
10000
- if (haystack[i][COLUMN] !== needle)
10006
+ if (haystack[i][COLUMN$1] !== needle)
10001
10007
  break;
10002
10008
  }
10003
10009
  return index;
10004
10010
  }
10005
10011
  function lowerBound(haystack, needle, index) {
10006
10012
  for (let i = index - 1; i >= 0; index = i--) {
10007
- if (haystack[i][COLUMN] !== needle)
10013
+ if (haystack[i][COLUMN$1] !== needle)
10008
10014
  break;
10009
10015
  }
10010
10016
  return index;
@@ -10026,7 +10032,7 @@ function memoizedBinarySearch(haystack, needle, state, key) {
10026
10032
  let high = haystack.length - 1;
10027
10033
  if (key === lastKey) {
10028
10034
  if (needle === lastNeedle) {
10029
- found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
10035
+ found = lastIndex !== -1 && haystack[lastIndex][COLUMN$1] === needle;
10030
10036
  return lastIndex;
10031
10037
  }
10032
10038
  if (needle >= lastNeedle) {
@@ -10123,7 +10129,7 @@ class TraceMap {
10123
10129
  if (segment.length === 1)
10124
10130
  return OMapping(null, null, null, null);
10125
10131
  const { names, resolvedSources } = map;
10126
- return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
10132
+ 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);
10127
10133
  };
10128
10134
  })();
10129
10135
  function OMapping(source, line, column, name) {
@@ -10176,11 +10182,19 @@ class SetArray {
10176
10182
  };
10177
10183
  })();
10178
10184
 
10185
+ const COLUMN = 0;
10186
+ const SOURCES_INDEX = 1;
10187
+ const SOURCE_LINE = 2;
10188
+ const SOURCE_COLUMN = 3;
10189
+ const NAMES_INDEX = 4;
10190
+
10191
+ const NO_NAME = -1;
10179
10192
  /**
10180
- * A low-level API to associate a generated position with an original source position. Line and
10181
- * column here are 0-based, unlike `addMapping`.
10193
+ * Same as `addSegment`, but will only add the segment if it generates useful information in the
10194
+ * resulting map. This only works correctly if segments are added **in order**, meaning you should
10195
+ * not add a segment with a lower generated line/column than one that came before.
10182
10196
  */
10183
- let addSegment;
10197
+ let maybeAddSegment;
10184
10198
  /**
10185
10199
  * Adds/removes the content of the source file to the source map.
10186
10200
  */
@@ -10189,12 +10203,14 @@ let setSourceContent;
10189
10203
  * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
10190
10204
  * a sourcemap, or to JSON.stringify.
10191
10205
  */
10192
- let decodedMap;
10206
+ let toDecodedMap;
10193
10207
  /**
10194
10208
  * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
10195
10209
  * a sourcemap, or to JSON.stringify.
10196
10210
  */
10197
- let encodedMap;
10211
+ let toEncodedMap;
10212
+ // This split declaration is only so that terser can elminiate the static initialization block.
10213
+ let addSegmentInternal;
10198
10214
  /**
10199
10215
  * Provides the state to generate a sourcemap.
10200
10216
  */
@@ -10209,32 +10225,19 @@ class GenMapping {
10209
10225
  }
10210
10226
  }
10211
10227
  (() => {
10212
- addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name) => {
10213
- const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
10214
- const line = getLine(mappings, genLine);
10215
- if (source == null) {
10216
- const seg = [genColumn];
10217
- const index = getColumnIndex(line, genColumn, seg);
10218
- return insert(line, index, seg);
10219
- }
10220
- const sourcesIndex = put(sources, source);
10221
- const seg = name
10222
- ? [genColumn, sourcesIndex, sourceLine, sourceColumn, put(names, name)]
10223
- : [genColumn, sourcesIndex, sourceLine, sourceColumn];
10224
- const index = getColumnIndex(line, genColumn, seg);
10225
- if (sourcesIndex === sourcesContent.length)
10226
- sourcesContent[sourcesIndex] = null;
10227
- insert(line, index, seg);
10228
+ maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
10229
+ return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
10228
10230
  };
10229
10231
  setSourceContent = (map, source, content) => {
10230
10232
  const { _sources: sources, _sourcesContent: sourcesContent } = map;
10231
10233
  sourcesContent[put(sources, source)] = content;
10232
10234
  };
10233
- decodedMap = (map) => {
10235
+ toDecodedMap = (map) => {
10234
10236
  const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
10237
+ removeEmptyFinalLines(mappings);
10235
10238
  return {
10236
10239
  version: 3,
10237
- file,
10240
+ file: file || undefined,
10238
10241
  names: names.array,
10239
10242
  sourceRoot: sourceRoot || undefined,
10240
10243
  sources: sources.array,
@@ -10242,10 +10245,31 @@ class GenMapping {
10242
10245
  mappings,
10243
10246
  };
10244
10247
  };
10245
- encodedMap = (map) => {
10246
- const decoded = decodedMap(map);
10248
+ toEncodedMap = (map) => {
10249
+ const decoded = toDecodedMap(map);
10247
10250
  return Object.assign(Object.assign({}, decoded), { mappings: encode$1(decoded.mappings) });
10248
10251
  };
10252
+ // Internal helpers
10253
+ addSegmentInternal = (skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
10254
+ const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map;
10255
+ const line = getLine(mappings, genLine);
10256
+ const index = getColumnIndex(line, genColumn);
10257
+ if (!source) {
10258
+ if (skipable && skipSourceless(line, index))
10259
+ return;
10260
+ return insert(line, index, [genColumn]);
10261
+ }
10262
+ const sourcesIndex = put(sources, source);
10263
+ const namesIndex = name ? put(names, name) : NO_NAME;
10264
+ if (sourcesIndex === sourcesContent.length)
10265
+ sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null;
10266
+ if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
10267
+ return;
10268
+ }
10269
+ return insert(line, index, name
10270
+ ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
10271
+ : [genColumn, sourcesIndex, sourceLine, sourceColumn]);
10272
+ };
10249
10273
  })();
10250
10274
  function getLine(mappings, index) {
10251
10275
  for (let i = mappings.length; i <= index; i++) {
@@ -10253,63 +10277,63 @@ function getLine(mappings, index) {
10253
10277
  }
10254
10278
  return mappings[index];
10255
10279
  }
10256
- function getColumnIndex(line, column, seg) {
10280
+ function getColumnIndex(line, genColumn) {
10257
10281
  let index = line.length;
10258
- for (let i = index - 1; i >= 0; i--, index--) {
10282
+ for (let i = index - 1; i >= 0; index = i--) {
10259
10283
  const current = line[i];
10260
- const col = current[0];
10261
- if (col > column)
10262
- continue;
10263
- if (col < column)
10264
- break;
10265
- const cmp = compare$1(current, seg);
10266
- if (cmp === 0)
10267
- return index;
10268
- if (cmp < 0)
10284
+ if (genColumn >= current[COLUMN])
10269
10285
  break;
10270
10286
  }
10271
10287
  return index;
10272
10288
  }
10273
- function compare$1(a, b) {
10274
- let cmp = compareNum(a.length, b.length);
10275
- if (cmp !== 0)
10276
- return cmp;
10277
- // We've already checked genColumn
10278
- if (a.length === 1)
10279
- return 0;
10280
- cmp = compareNum(a[1], b[1]);
10281
- if (cmp !== 0)
10282
- return cmp;
10283
- cmp = compareNum(a[2], b[2]);
10284
- if (cmp !== 0)
10285
- return cmp;
10286
- cmp = compareNum(a[3], b[3]);
10287
- if (cmp !== 0)
10288
- return cmp;
10289
- if (a.length === 4)
10290
- return 0;
10291
- return compareNum(a[4], b[4]);
10292
- }
10293
- function compareNum(a, b) {
10294
- return a - b;
10295
- }
10296
10289
  function insert(array, index, value) {
10297
- if (index === -1)
10298
- return;
10299
10290
  for (let i = array.length; i > index; i--) {
10300
10291
  array[i] = array[i - 1];
10301
10292
  }
10302
10293
  array[index] = value;
10303
10294
  }
10295
+ function removeEmptyFinalLines(mappings) {
10296
+ const { length } = mappings;
10297
+ let len = length;
10298
+ for (let i = len - 1; i >= 0; len = i, i--) {
10299
+ if (mappings[i].length > 0)
10300
+ break;
10301
+ }
10302
+ if (len < length)
10303
+ mappings.length = len;
10304
+ }
10305
+ function skipSourceless(line, index) {
10306
+ // The start of a line is already sourceless, so adding a sourceless segment to the beginning
10307
+ // doesn't generate any useful information.
10308
+ if (index === 0)
10309
+ return true;
10310
+ const prev = line[index - 1];
10311
+ // If the previous segment is also sourceless, then adding another sourceless segment doesn't
10312
+ // genrate any new information. Else, this segment will end the source/named segment and point to
10313
+ // a sourceless position, which is useful.
10314
+ return prev.length === 1;
10315
+ }
10316
+ function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
10317
+ // A source/named segment at the start of a line gives position at that genColumn
10318
+ if (index === 0)
10319
+ return false;
10320
+ const prev = line[index - 1];
10321
+ // If the previous segment is sourceless, then we're transitioning to a source.
10322
+ if (prev.length === 1)
10323
+ return false;
10324
+ // If the previous segment maps to the exact same source position, then this segment doesn't
10325
+ // provide any new position information.
10326
+ return (sourcesIndex === prev[SOURCES_INDEX] &&
10327
+ sourceLine === prev[SOURCE_LINE] &&
10328
+ sourceColumn === prev[SOURCE_COLUMN] &&
10329
+ namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME));
10330
+ }
10304
10331
 
10305
- const SOURCELESS_MAPPING = {
10306
- source: null,
10307
- column: null,
10308
- line: null,
10309
- name: null,
10310
- content: null,
10311
- };
10332
+ const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null);
10312
10333
  const EMPTY_SOURCES = [];
10334
+ function SegmentObject(source, line, column, name, content) {
10335
+ return { source, line, column, name, content };
10336
+ }
10313
10337
  function Source(map, sources, source, content) {
10314
10338
  return {
10315
10339
  map,
@@ -10337,15 +10361,14 @@ function OriginalSource(source, content) {
10337
10361
  * resolving each mapping in terms of the original source files.
10338
10362
  */
10339
10363
  function traceMappings(tree) {
10364
+ // TODO: Eventually support sourceRoot, which has to be removed because the sources are already
10365
+ // fully resolved. We'll need to make sources relative to the sourceRoot before adding them.
10340
10366
  const gen = new GenMapping({ file: tree.map.file });
10341
10367
  const { sources: rootSources, map } = tree;
10342
10368
  const rootNames = map.names;
10343
10369
  const rootMappings = decodedMappings(map);
10344
10370
  for (let i = 0; i < rootMappings.length; i++) {
10345
10371
  const segments = rootMappings[i];
10346
- let lastSource = null;
10347
- let lastSourceLine = null;
10348
- let lastSourceColumn = null;
10349
10372
  for (let j = 0; j < segments.length; j++) {
10350
10373
  const segment = segments[j];
10351
10374
  const genCol = segment[0];
@@ -10360,18 +10383,9 @@ function traceMappings(tree) {
10360
10383
  if (traced == null)
10361
10384
  continue;
10362
10385
  }
10363
- // So we traced a segment down into its original source file. Now push a
10364
- // new segment pointing to this location.
10365
10386
  const { column, line, name, content, source } = traced;
10366
- if (line === lastSourceLine && column === lastSourceColumn && source === lastSource) {
10367
- continue;
10368
- }
10369
- lastSourceLine = line;
10370
- lastSourceColumn = column;
10371
- lastSource = source;
10372
- // Sigh, TypeScript can't figure out source/line/column are either all null, or all non-null...
10373
- addSegment(gen, i, genCol, source, line, column, name);
10374
- if (content != null)
10387
+ maybeAddSegment(gen, i, genCol, source, line, column, name);
10388
+ if (source && content != null)
10375
10389
  setSourceContent(gen, source, content);
10376
10390
  }
10377
10391
  }
@@ -10383,7 +10397,7 @@ function traceMappings(tree) {
10383
10397
  */
10384
10398
  function originalPositionFor(source, line, column, name) {
10385
10399
  if (!source.map) {
10386
- return { column, line, name, source: source.source, content: source.content };
10400
+ return SegmentObject(source.source, line, column, name, source.content);
10387
10401
  }
10388
10402
  const segment = traceSegment(source.map, line, column);
10389
10403
  // If we couldn't find a segment, then this doesn't exist in the sourcemap.
@@ -10464,7 +10478,7 @@ function build$2(map, loader, importer, importerDepth) {
10464
10478
  */
10465
10479
  let SourceMap$1 = class SourceMap {
10466
10480
  constructor(map, options) {
10467
- const out = options.decodedMappings ? decodedMap(map) : encodedMap(map);
10481
+ const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);
10468
10482
  this.version = out.version; // SourceMap spec says this should be first.
10469
10483
  this.file = out.file;
10470
10484
  this.mappings = out.mappings;
@@ -10501,17 +10515,9 @@ function remapping(input, loader, options) {
10501
10515
  return new SourceMap$1(traceMappings(tree), opts);
10502
10516
  }
10503
10517
 
10504
- var srcExports$1 = {};
10505
- var src$2 = {
10506
- get exports(){ return srcExports$1; },
10507
- set exports(v){ srcExports$1 = v; },
10508
- };
10518
+ var src$2 = {exports: {}};
10509
10519
 
10510
- var browserExports$1 = {};
10511
- var browser$2 = {
10512
- get exports(){ return browserExports$1; },
10513
- set exports(v){ browserExports$1 = v; },
10514
- };
10520
+ var browser$2 = {exports: {}};
10515
10521
 
10516
10522
  /**
10517
10523
  * Helpers.
@@ -10971,7 +10977,7 @@ function requireCommon () {
10971
10977
  var hasRequiredBrowser$1;
10972
10978
 
10973
10979
  function requireBrowser$1 () {
10974
- if (hasRequiredBrowser$1) return browserExports$1;
10980
+ if (hasRequiredBrowser$1) return browser$2.exports;
10975
10981
  hasRequiredBrowser$1 = 1;
10976
10982
  (function (module, exports) {
10977
10983
  /**
@@ -11240,16 +11246,12 @@ function requireBrowser$1 () {
11240
11246
  } catch (error) {
11241
11247
  return '[UnexpectedJSONParseError]: ' + error.message;
11242
11248
  }
11243
- };
11244
- } (browser$2, browserExports$1));
11245
- return browserExports$1;
11249
+ };
11250
+ } (browser$2, browser$2.exports));
11251
+ return browser$2.exports;
11246
11252
  }
11247
11253
 
11248
- var nodeExports$1 = {};
11249
- var node$1 = {
11250
- get exports(){ return nodeExports$1; },
11251
- set exports(v){ nodeExports$1 = v; },
11252
- };
11254
+ var node$1 = {exports: {}};
11253
11255
 
11254
11256
  /**
11255
11257
  * Module dependencies.
@@ -11258,7 +11260,7 @@ var node$1 = {
11258
11260
  var hasRequiredNode$1;
11259
11261
 
11260
11262
  function requireNode$1 () {
11261
- if (hasRequiredNode$1) return nodeExports$1;
11263
+ if (hasRequiredNode$1) return node$1.exports;
11262
11264
  hasRequiredNode$1 = 1;
11263
11265
  (function (module, exports) {
11264
11266
  const tty = require$$0$3;
@@ -11519,9 +11521,9 @@ function requireNode$1 () {
11519
11521
  formatters.O = function (v) {
11520
11522
  this.inspectOpts.colors = this.useColors;
11521
11523
  return util.inspect(v, this.inspectOpts);
11522
- };
11523
- } (node$1, nodeExports$1));
11524
- return nodeExports$1;
11524
+ };
11525
+ } (node$1, node$1.exports));
11526
+ return node$1.exports;
11525
11527
  }
11526
11528
 
11527
11529
  /**
@@ -11529,14 +11531,13 @@ function requireNode$1 () {
11529
11531
  * treat as a browser.
11530
11532
  */
11531
11533
 
11532
- (function (module) {
11533
- if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
11534
- module.exports = requireBrowser$1();
11535
- } else {
11536
- module.exports = requireNode$1();
11537
- }
11538
- } (src$2));
11534
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
11535
+ src$2.exports = requireBrowser$1();
11536
+ } else {
11537
+ src$2.exports = requireNode$1();
11538
+ }
11539
11539
 
11540
+ var srcExports$1 = src$2.exports;
11540
11541
  var debug$g = /*@__PURE__*/getDefaultExportFromCjs(srcExports$1);
11541
11542
 
11542
11543
  // eslint-disable-next-line @typescript-eslint/consistent-type-imports
@@ -12001,13 +12002,13 @@ function timeFrom(start, subtract = 0) {
12001
12002
  const time = performance$1.now() - start - subtract;
12002
12003
  const timeString = (time.toFixed(2) + `ms`).padEnd(5, ' ');
12003
12004
  if (time < 10) {
12004
- return picocolorsExports.green(timeString);
12005
+ return colors$1.green(timeString);
12005
12006
  }
12006
12007
  else if (time < 50) {
12007
- return picocolorsExports.yellow(timeString);
12008
+ return colors$1.yellow(timeString);
12008
12009
  }
12009
12010
  else {
12010
- return picocolorsExports.red(timeString);
12011
+ return colors$1.red(timeString);
12011
12012
  }
12012
12013
  }
12013
12014
  /**
@@ -12018,10 +12019,10 @@ function prettifyUrl(url, root) {
12018
12019
  const isAbsoluteFile = url.startsWith(root);
12019
12020
  if (isAbsoluteFile || url.startsWith(FS_PREFIX)) {
12020
12021
  const file = path$o.relative(root, isAbsoluteFile ? url : fsPathFromId(url));
12021
- return picocolorsExports.dim(file);
12022
+ return colors$1.dim(file);
12022
12023
  }
12023
12024
  else {
12024
- return picocolorsExports.dim(url);
12025
+ return colors$1.dim(url);
12025
12026
  }
12026
12027
  }
12027
12028
  function isObject$2(value) {
@@ -12741,11 +12742,11 @@ function createLogger(level = 'info', options = {}) {
12741
12742
  const format = () => {
12742
12743
  if (options.timestamp) {
12743
12744
  const tag = type === 'info'
12744
- ? picocolorsExports.cyan(picocolorsExports.bold(prefix))
12745
+ ? colors$1.cyan(colors$1.bold(prefix))
12745
12746
  : type === 'warn'
12746
- ? picocolorsExports.yellow(picocolorsExports.bold(prefix))
12747
- : picocolorsExports.red(picocolorsExports.bold(prefix));
12748
- return `${picocolorsExports.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
12747
+ ? colors$1.yellow(colors$1.bold(prefix))
12748
+ : colors$1.red(colors$1.bold(prefix));
12749
+ return `${colors$1.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
12749
12750
  }
12750
12751
  else {
12751
12752
  return msg;
@@ -12758,7 +12759,7 @@ function createLogger(level = 'info', options = {}) {
12758
12759
  if (type === lastType && msg === lastMsg) {
12759
12760
  sameCount++;
12760
12761
  clear();
12761
- console[method](format(), picocolorsExports.yellow(`(x${sameCount + 1})`));
12762
+ console[method](format(), colors$1.yellow(`(x${sameCount + 1})`));
12762
12763
  }
12763
12764
  else {
12764
12765
  sameCount = 0;
@@ -12808,24 +12809,24 @@ function createLogger(level = 'info', options = {}) {
12808
12809
  return logger;
12809
12810
  }
12810
12811
  function printServerUrls(urls, optionsHost, info) {
12811
- const colorUrl = (url) => picocolorsExports.cyan(url.replace(/:(\d+)\//, (_, port) => `:${picocolorsExports.bold(port)}/`));
12812
+ const colorUrl = (url) => colors$1.cyan(url.replace(/:(\d+)\//, (_, port) => `:${colors$1.bold(port)}/`));
12812
12813
  for (const url of urls.local) {
12813
- info(` ${picocolorsExports.green('➜')} ${picocolorsExports.bold('Local')}: ${colorUrl(url)}`);
12814
+ info(` ${colors$1.green('➜')} ${colors$1.bold('Local')}: ${colorUrl(url)}`);
12814
12815
  }
12815
12816
  for (const url of urls.network) {
12816
- info(` ${picocolorsExports.green('➜')} ${picocolorsExports.bold('Network')}: ${colorUrl(url)}`);
12817
+ info(` ${colors$1.green('➜')} ${colors$1.bold('Network')}: ${colorUrl(url)}`);
12817
12818
  }
12818
12819
  if (urls.network.length === 0 && optionsHost === undefined) {
12819
- info(picocolorsExports.dim(` ${picocolorsExports.green('➜')} ${picocolorsExports.bold('Network')}: use `) +
12820
- picocolorsExports.bold('--host') +
12821
- picocolorsExports.dim(' to expose'));
12820
+ info(colors$1.dim(` ${colors$1.green('➜')} ${colors$1.bold('Network')}: use `) +
12821
+ colors$1.bold('--host') +
12822
+ colors$1.dim(' to expose'));
12822
12823
  }
12823
12824
  }
12824
12825
 
12825
12826
  const groups = [
12826
- { name: 'Assets', color: picocolorsExports.green },
12827
- { name: 'CSS', color: picocolorsExports.magenta },
12828
- { name: 'JS', color: picocolorsExports.cyan },
12827
+ { name: 'Assets', color: colors$1.green },
12828
+ { name: 'CSS', color: colors$1.magenta },
12829
+ { name: 'JS', color: colors$1.cyan },
12829
12830
  ];
12830
12831
  const COMPRESSIBLE_ASSETS_RE = /\.(?:html|json|svg|txt|xml|xhtml)$/;
12831
12832
  function buildReporterPlugin(config) {
@@ -12861,7 +12862,7 @@ function buildReporterPlugin(config) {
12861
12862
  return compressed.length;
12862
12863
  }
12863
12864
  const logTransform = throttle((id) => {
12864
- writeLine(`transforming (${transformedCount}) ${picocolorsExports.dim(path$o.relative(config.root, id))}`);
12865
+ writeLine(`transforming (${transformedCount}) ${colors$1.dim(path$o.relative(config.root, id))}`);
12865
12866
  });
12866
12867
  return {
12867
12868
  name: 'vite:reporter',
@@ -12894,7 +12895,7 @@ function buildReporterPlugin(config) {
12894
12895
  process.stdout.clearLine(0);
12895
12896
  process.stdout.cursorTo(0);
12896
12897
  }
12897
- config.logger.info(`${picocolorsExports.green(`✓`)} ${transformedCount} modules transformed.`);
12898
+ config.logger.info(`${colors$1.green(`✓`)} ${transformedCount} modules transformed.`);
12898
12899
  }
12899
12900
  },
12900
12901
  renderStart() {
@@ -12981,21 +12982,21 @@ function buildReporterPlugin(config) {
12981
12982
  const isLarge = group.name === 'JS' && entry.size / 1000 > chunkLimit;
12982
12983
  if (isLarge)
12983
12984
  hasLargeChunks = true;
12984
- const sizeColor = isLarge ? picocolorsExports.yellow : picocolorsExports.dim;
12985
- let log = picocolorsExports.dim(relativeOutDir + '/');
12985
+ const sizeColor = isLarge ? colors$1.yellow : colors$1.dim;
12986
+ let log = colors$1.dim(relativeOutDir + '/');
12986
12987
  log +=
12987
12988
  !config.build.lib && entry.name.startsWith(assetsDir)
12988
- ? picocolorsExports.dim(assetsDir) +
12989
+ ? colors$1.dim(assetsDir) +
12989
12990
  group.color(entry.name
12990
12991
  .slice(assetsDir.length)
12991
12992
  .padEnd(longest + 2 - assetsDir.length))
12992
12993
  : group.color(entry.name.padEnd(longest + 2));
12993
- log += picocolorsExports.bold(sizeColor(displaySize(entry.size).padStart(sizePad)));
12994
+ log += colors$1.bold(sizeColor(displaySize(entry.size).padStart(sizePad)));
12994
12995
  if (entry.compressedSize) {
12995
- log += picocolorsExports.dim(` │ gzip: ${displaySize(entry.compressedSize).padStart(compressPad)}`);
12996
+ log += colors$1.dim(` │ gzip: ${displaySize(entry.compressedSize).padStart(compressPad)}`);
12996
12997
  }
12997
12998
  if (entry.mapSize) {
12998
- log += picocolorsExports.dim(` │ map: ${displaySize(entry.mapSize).padStart(mapPad)}`);
12999
+ log += colors$1.dim(` │ map: ${displaySize(entry.mapSize).padStart(mapPad)}`);
12999
13000
  }
13000
13001
  config.logger.info(log);
13001
13002
  }
@@ -13010,7 +13011,7 @@ function buildReporterPlugin(config) {
13010
13011
  config.build.minify &&
13011
13012
  !config.build.lib &&
13012
13013
  !config.build.ssr) {
13013
- config.logger.warn(picocolorsExports.yellow(`\n(!) Some chunks are larger than ${chunkLimit} kBs after minification. Consider:\n` +
13014
+ config.logger.warn(colors$1.yellow(`\n(!) Some chunks are larger than ${chunkLimit} kBs after minification. Consider:\n` +
13014
13015
  `- Using dynamic import() to code-split the application\n` +
13015
13016
  `- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks\n` +
13016
13017
  `- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.`));
@@ -13018,7 +13019,7 @@ function buildReporterPlugin(config) {
13018
13019
  },
13019
13020
  closeBundle() {
13020
13021
  if (shouldLogInfo && !config.build.watch) {
13021
- config.logger.info(`${picocolorsExports.green(`✓ built in ${displayTime(Date.now() - startTime)}`)}`);
13022
+ config.logger.info(`${colors$1.green(`✓ built in ${displayTime(Date.now() - startTime)}`)}`);
13022
13023
  }
13023
13024
  },
13024
13025
  };
@@ -14010,7 +14011,7 @@ function resolveEsbuildTranspileOptions(config, format) {
14010
14011
  }
14011
14012
  }
14012
14013
  function prettifyMessage(m, code) {
14013
- let res = picocolorsExports.yellow(m.text);
14014
+ let res = colors$1.yellow(m.text);
14014
14015
  if (m.location) {
14015
14016
  const lines = code.split(/\r?\n/g);
14016
14017
  const line = Number(m.location.line);
@@ -14049,7 +14050,7 @@ async function initTSConfckParseOptions(workspaceRoot) {
14049
14050
  })),
14050
14051
  resolveWithEmptyIfConfigNotFound: true,
14051
14052
  };
14052
- debug$f?.(timeFrom(start), 'tsconfck init', picocolorsExports.dim(workspaceRoot));
14053
+ debug$f?.(timeFrom(start), 'tsconfck init', colors$1.dim(workspaceRoot));
14053
14054
  return options;
14054
14055
  }
14055
14056
  async function loadTsconfigJsonForFile(filename) {
@@ -14340,6 +14341,8 @@ var jsonStableStringify = function (obj, opts) {
14340
14341
  }({ '': obj }, '', obj, 0));
14341
14342
  };
14342
14343
 
14344
+ var jsonStableStringify$1 = /*@__PURE__*/getDefaultExportFromCjs(jsonStableStringify);
14345
+
14343
14346
  const mimes$1 = {
14344
14347
  "ez": "application/andrew-inset",
14345
14348
  "aw": "application/applixware",
@@ -16119,7 +16122,7 @@ async function fileToBuiltUrl(id, config, pluginContext, skipPublicCheck = false
16119
16122
  content.length < Number(config.build.assetsInlineLimit) &&
16120
16123
  !isGitLfsPlaceholder(content))) {
16121
16124
  if (config.build.lib && isGitLfsPlaceholder(content)) {
16122
- config.logger.warn(picocolorsExports.yellow(`Inlined file ${id} was not downloaded via Git LFS`));
16125
+ config.logger.warn(colors$1.yellow(`Inlined file ${id} was not downloaded via Git LFS`));
16123
16126
  }
16124
16127
  const mimeType = lookup(file) ?? 'application/octet-stream';
16125
16128
  // base64 inlined as a string
@@ -16269,7 +16272,7 @@ function manifestPlugin(config) {
16269
16272
  ? config.build.manifest
16270
16273
  : 'manifest.json',
16271
16274
  type: 'asset',
16272
- source: jsonStableStringify(manifest, { space: 2 }),
16275
+ source: jsonStableStringify$1(manifest, { space: 2 }),
16273
16276
  });
16274
16277
  }
16275
16278
  },
@@ -16322,10 +16325,10 @@ function dataURIPlugin() {
16322
16325
  };
16323
16326
  }
16324
16327
 
16325
- /* es-module-lexer 1.2.0 */
16326
- const A=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse$e(E,g="@"){if(!C)return init.then((()=>parse$e(E)));const I=E.length+1,o=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;o>0&&C.memory.grow(Math.ceil(o/65536));const K=C.sa(I-1);if((A?B:Q)(E,new Uint16Array(C.memory.buffer,K,I)),!C.parse())throw Object.assign(new Error(`Parse error ${g}:${E.slice(0,C.e()).split("\n").length}:${C.e()-E.lastIndexOf("\n",C.e()-1)}`),{idx:C.e()});const D=[],k=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.ai(),g=C.id(),I=C.ss(),o=C.se();let K;C.ip()&&(K=J(E.slice(-1===g?A-1:A,-1===g?Q+1:Q))),D.push({n:K,s:A,e:Q,ss:I,se:o,d:g,a:B});}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=E.slice(A,Q),o=I[0],K=B<0?void 0:E.slice(B,g),D=K?K[0]:"";k.push({s:A,e:Q,ls:B,le:g,n:'"'===o||"'"===o?J(I):I,ln:'"'===D||"'"===D?J(K):K});}function J(A){try{return (0, eval)(A)}catch(A){}}return [D,k,!!C.f()]}function Q(A,Q){const B=A.length;let C=0;for(;C<B;){const B=A.charCodeAt(C);Q[C++]=(255&B)<<8|B>>>8;}}function B(A,Q){const B=A.length;let C=0;for(;C<B;)Q[C]=A.charCodeAt(C++);}let C;const init=WebAssembly.compile((E="AGFzbQEAAAABKghgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gAn9/AAMvLgABAQICAgICAgICAgICAgICAgIAAwMDBAQAAAADAAAAAAMDAAUGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUGw8gALfwBBsPIACwdwEwZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAmFpAAgCaWQACQJpcAAKAmVzAAsCZWUADANlbHMADQNlbGUADgJyaQAPAnJlABABZgARBXBhcnNlABILX19oZWFwX2Jhc2UDAQrAOy5oAQF/QQAgADYC9AlBACgC0AkiASAAQQF0aiIAQQA7AQBBACAAQQJ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IQAgA0F2ag4EAgEBAgELIABBBGohAAwACwtBACACNgKgChAiQQAPC0EAIAI2AqAKQd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+IBAgBBgAgLxAEAAHgAcABvAHIAdABtAHAAbwByAHQAZQB0AGEAcgBvAG0AdQBuAGMAdABpAG8AbgBzAHMAZQByAHQAdgBvAHkAaQBlAGQAZQBsAGUAYwBvAG4AdABpAG4AaQBuAHMAdABhAG4AdAB5AGIAcgBlAGEAcgBlAHQAdQByAGQAZQBiAHUAZwBnAGUAYQB3AGEAaQB0AGgAcgB3AGgAaQBsAGUAZgBvAHIAaQBmAGMAYQB0AGMAZgBpAG4AYQBsAGwAZQBsAHMAAEHECQsQAQAAAAIAAAAABAAAMDkAAA==","undefined"!=typeof Buffer?Buffer.from(E,"base64"):Uint8Array.from(atob(E),(A=>A.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:A})=>{C=A;}));var E;
16328
+ /* es-module-lexer 1.2.1 */
16329
+ const A=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse$e(E,g="@"){if(!C)return init.then((()=>parse$e(E)));const I=E.length+1,o=(C.__heap_base.value||C.__heap_base)+4*I-C.memory.buffer.byteLength;o>0&&C.memory.grow(Math.ceil(o/65536));const D=C.sa(I-1);if((A?B:Q)(E,new Uint16Array(C.memory.buffer,D,I)),!C.parse())throw Object.assign(new Error(`Parse error ${g}:${E.slice(0,C.e()).split("\n").length}:${C.e()-E.lastIndexOf("\n",C.e()-1)}`),{idx:C.e()});const K=[],k=[];for(;C.ri();){const A=C.is(),Q=C.ie(),B=C.ai(),g=C.id(),I=C.ss(),o=C.se();let D;C.ip()&&(D=J(E.slice(-1===g?A-1:A,-1===g?Q+1:Q))),K.push({n:D,s:A,e:Q,ss:I,se:o,d:g,a:B});}for(;C.re();){const A=C.es(),Q=C.ee(),B=C.els(),g=C.ele(),I=E.slice(A,Q),o=I[0],D=B<0?void 0:E.slice(B,g),K=D?D[0]:"";k.push({s:A,e:Q,ls:B,le:g,n:'"'===o||"'"===o?J(I):I,ln:'"'===K||"'"===K?J(D):D});}function J(A){try{return (0, eval)(A)}catch(A){}}return [K,k,!!C.f()]}function Q(A,Q){const B=A.length;let C=0;for(;C<B;){const B=A.charCodeAt(C);Q[C++]=(255&B)<<8|B>>>8;}}function B(A,Q){const B=A.length;let C=0;for(;C<B;)Q[C]=A.charCodeAt(C++);}let C;const init=WebAssembly.compile((E="AGFzbQEAAAABKghgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gAn9/AAMvLgABAQICAgICAgICAgICAgICAgIAAwMDBAQAAAADAAAAAAMDAAUGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUGw8gALfwBBsPIACwdwEwZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAmFpAAgCaWQACQJpcAAKAmVzAAsCZWUADANlbHMADQNlbGUADgJyaQAPAnJlABABZgARBXBhcnNlABILX19oZWFwX2Jhc2UDAQqHPC5oAQF/QQAgADYC9AlBACgC0AkiASAAQQF0aiIAQQA7AQBBACAAQQJqIgA2AvgJQQAgADYC/AlBAEEANgLUCUEAQQA2AuQJQQBBADYC3AlBAEEANgLYCUEAQQA2AuwJQQBBADYC4AkgAQufAQEDf0EAKALkCSEEQQBBACgC/AkiBTYC5AlBACAENgLoCUEAIAVBIGo2AvwJIARBHGpB1AkgBBsgBTYCAEEAKALICSEEQQAoAsQJIQYgBSABNgIAIAUgADYCCCAFIAIgAkECakEAIAYgA0YbIAQgA0YbNgIMIAUgAzYCFCAFQQA2AhAgBSACNgIEIAVBADYCHCAFQQAoAsQJIANGOgAYC1YBAX9BACgC7AkiBEEQakHYCSAEG0EAKAL8CSIENgIAQQAgBDYC7AlBACAEQRRqNgL8CSAEQQA2AhAgBCADNgIMIAQgAjYCCCAEIAE2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AcwB0AGEAbgB0AHkAYgByAGUAYQByAGUAdAB1AHIAZABlAGIAdQBnAGcAZQBhAHcAYQBpAHQAaAByAHcAaABpAGwAZQBmAG8AcgBpAGYAYwBhAHQAYwBmAGkAbgBhAGwAbABlAGwAcwAAQcQJCxABAAAAAgAAAAAEAAAwOQAA","undefined"!=typeof Buffer?Buffer.from(E,"base64"):Uint8Array.from(atob(E),(A=>A.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:A})=>{C=A;}));var E;
16327
16330
 
16328
- var convertSourceMap = {};
16331
+ var convertSourceMap$1 = {};
16329
16332
 
16330
16333
  (function (exports) {
16331
16334
 
@@ -16559,8 +16562,10 @@ var convertSourceMap = {};
16559
16562
  exports.generateMapFileComment = function (file, options) {
16560
16563
  var data = 'sourceMappingURL=' + file;
16561
16564
  return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
16562
- };
16563
- } (convertSourceMap));
16565
+ };
16566
+ } (convertSourceMap$1));
16567
+
16568
+ var convertSourceMap = /*@__PURE__*/getDefaultExportFromCjs(convertSourceMap$1);
16564
16569
 
16565
16570
  const debug$e = createDebugger('vite:sourcemap', {
16566
16571
  onlyWhenFocused: true,
@@ -16641,7 +16646,7 @@ function applySourcemapIgnoreList(map, sourcemapPath, sourcemapIgnoreList, logge
16641
16646
  }
16642
16647
  }
16643
16648
 
16644
- function e(e,n,r){throw new Error(r?`No known conditions for "${n}" specifier in "${e}" package`:`Missing "${n}" specifier in "${e}" package`)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(void 0===a){let e,n,r,t;for(t in i)n&&t.length<n.length||("/"===t[t.length-1]&&l.startsWith(t)?(u=l.substring(t.length),n=t):t.length>1&&(r=t.indexOf("*",2),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)).exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n];}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g,f=/[/]$/;for(;t<i;t++)e[t]=o.test(r=e[t])?r.replace(o,n):f.test(r)?r+n:r;}(s,u),s}function r(e,n,r){if(e===n||"."===n)return ".";let t=e+"/",i=t.length,o=n.slice(0,i)===t,f=o?n.slice(i):n;return "#"===f[0]?f:o||!r?"./"===f.slice(0,2)?f:"./"+f:f}function t(e,n,r){if(e){if("string"==typeof e)return r&&r.add(e),[e];let i,o;if(Array.isArray(e)){for(o=r||new Set,i=0;i<e.length;i++)t(e[i],n,o);if(!r&&o.size)return [...o]}else for(i in e)if(n.has(i))return t(e[i],n,r)}}function o(e,r,t){let i,o=e.exports;if(o){if("string"==typeof o)o={".":o};else for(i in o){"."!==i[0]&&(o={".":o});break}return n(e.name,o,r||".",t)}}function f(e,r,t){if(e.imports)return n(e.name,e.imports,r,t)}
16649
+ function e(e,n,r){throw new Error(r?`No known conditions for "${n}" specifier in "${e}" package`:`Missing "${n}" specifier in "${e}" package`)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(void 0===a){let e,n,r,t;for(t in i)n&&t.length<n.length||("/"===t[t.length-1]&&l.startsWith(t)?(u=l.substring(t.length),n=t):t.length>1&&(r=t.indexOf("*",1),~r&&(e=RegExp("^"+t.substring(0,r)+"(.*)"+t.substring(1+r)).exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n];}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g,f=/[/]$/;for(;t<i;t++)e[t]=o.test(r=e[t])?r.replace(o,n):f.test(r)?r+n:r;}(s,u),s}function r(e,n,r){if(e===n||"."===n)return ".";let t=e+"/",i=t.length,o=n.slice(0,i)===t,f=o?n.slice(i):n;return "#"===f[0]?f:o||!r?"./"===f.slice(0,2)?f:"./"+f:f}function t(e,n,r){if(e){if("string"==typeof e)return r&&r.add(e),[e];let i,o;if(Array.isArray(e)){for(o=r||new Set,i=0;i<e.length;i++)t(e[i],n,o);if(!r&&o.size)return [...o]}else for(i in e)if(n.has(i))return t(e[i],n,r)}}function o(e,r,t){let i,o=e.exports;if(o){if("string"==typeof o)o={".":o};else for(i in o){"."!==i[0]&&(o={".":o});break}return n(e.name,o,r||".",t)}}function f(e,r,t){if(e.imports)return n(e.name,e.imports,r,t)}
16645
16650
 
16646
16651
  // This file was generated. Do not modify manually!
16647
16652
  var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
@@ -22773,7 +22778,7 @@ function resolvePlugin(resolveOptions) {
22773
22778
  // We don't need to resolve these paths since they are already resolved
22774
22779
  // always return here even if res doesn't exist since /@fs/ is explicit
22775
22780
  // if the file doesn't exist it should be a 404.
22776
- debug$d?.(`[@fs] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22781
+ debug$d?.(`[@fs] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`);
22777
22782
  return ensureVersionQuery(res, id, options, depsOptimizer);
22778
22783
  }
22779
22784
  // URL
@@ -22781,7 +22786,7 @@ function resolvePlugin(resolveOptions) {
22781
22786
  if (asSrc && id[0] === '/' && (rootInRoot || !id.startsWith(root))) {
22782
22787
  const fsPath = path$o.resolve(root, id.slice(1));
22783
22788
  if ((res = tryFsResolve(fsPath, options))) {
22784
- debug$d?.(`[url] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22789
+ debug$d?.(`[url] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`);
22785
22790
  return ensureVersionQuery(res, id, options, depsOptimizer);
22786
22791
  }
22787
22792
  }
@@ -22811,7 +22816,7 @@ function resolvePlugin(resolveOptions) {
22811
22816
  }
22812
22817
  if ((res = tryFsResolve(fsPath, options))) {
22813
22818
  res = ensureVersionQuery(res, id, options, depsOptimizer);
22814
- debug$d?.(`[relative] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22819
+ debug$d?.(`[relative] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`);
22815
22820
  // If this isn't a script imported from a .html file, include side effects
22816
22821
  // hints so the non-used code is properly tree-shaken during build time.
22817
22822
  if (!options.idOnly &&
@@ -22834,14 +22839,14 @@ function resolvePlugin(resolveOptions) {
22834
22839
  const basedir = importer ? path$o.dirname(importer) : process.cwd();
22835
22840
  const fsPath = path$o.resolve(basedir, id);
22836
22841
  if ((res = tryFsResolve(fsPath, options))) {
22837
- debug$d?.(`[drive-relative] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22842
+ debug$d?.(`[drive-relative] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`);
22838
22843
  return ensureVersionQuery(res, id, options, depsOptimizer);
22839
22844
  }
22840
22845
  }
22841
22846
  // absolute fs paths
22842
22847
  if (isNonDriveRelativeAbsolutePath(id) &&
22843
22848
  (res = tryFsResolve(id, options))) {
22844
- debug$d?.(`[fs] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22849
+ debug$d?.(`[fs] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`);
22845
22850
  return ensureVersionQuery(res, id, options, depsOptimizer);
22846
22851
  }
22847
22852
  // external
@@ -22888,7 +22893,7 @@ function resolvePlugin(resolveOptions) {
22888
22893
  else {
22889
22894
  if (!asSrc) {
22890
22895
  debug$d?.(`externalized node built-in "${id}" to empty module. ` +
22891
- `(imported by: ${picocolorsExports.white(picocolorsExports.dim(importer))})`);
22896
+ `(imported by: ${colors$1.white(colors$1.dim(importer))})`);
22892
22897
  }
22893
22898
  else if (isProduction) {
22894
22899
  this.warn(`Module "${id}" has been externalized for browser compatibility, imported by "${importer}". ` +
@@ -22900,7 +22905,7 @@ function resolvePlugin(resolveOptions) {
22900
22905
  }
22901
22906
  }
22902
22907
  }
22903
- debug$d?.(`[fallthrough] ${picocolorsExports.dim(id)}`);
22908
+ debug$d?.(`[fallthrough] ${colors$1.dim(id)}`);
22904
22909
  },
22905
22910
  load(id) {
22906
22911
  if (id.startsWith(browserExternalId)) {
@@ -23143,8 +23148,13 @@ function tryNodeResolve(id, importer, options, targetWeb, depsOptimizer, ssr = f
23143
23148
  }
23144
23149
  let resolvedId = id;
23145
23150
  if (deepMatch && !pkg?.data.exports && path$o.extname(id) !== resolvedExt) {
23146
- resolvedId = resolved.id.slice(resolved.id.indexOf(id));
23147
- debug$d?.(`[processResult] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(resolvedId)}`);
23151
+ // id date-fns/locale
23152
+ // resolve.id ...date-fns/esm/locale/index.js
23153
+ const index = resolved.id.indexOf(id);
23154
+ if (index > -1) {
23155
+ resolvedId = resolved.id.slice(index);
23156
+ debug$d?.(`[processResult] ${colors$1.cyan(id)} -> ${colors$1.dim(resolvedId)}`);
23157
+ }
23148
23158
  }
23149
23159
  return { ...resolved, id: resolvedId, external: true };
23150
23160
  };
@@ -23176,7 +23186,8 @@ function tryNodeResolve(id, importer, options, targetWeb, depsOptimizer, ssr = f
23176
23186
  exclude = options.ssrConfig?.optimizeDeps?.exclude;
23177
23187
  include = options.ssrConfig?.optimizeDeps?.include;
23178
23188
  }
23179
- const skipOptimization = !isJsType ||
23189
+ const skipOptimization = depsOptimizer?.options.noDiscovery ||
23190
+ !isJsType ||
23180
23191
  (importer && isInNodeModules(importer)) ||
23181
23192
  exclude?.includes(pkgId) ||
23182
23193
  exclude?.includes(id) ||
@@ -23358,7 +23369,7 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
23358
23369
  const entryPointPath = path$o.join(dir, entry);
23359
23370
  const resolvedEntryPoint = tryFsResolve(entryPointPath, options, true, true, skipPackageJson);
23360
23371
  if (resolvedEntryPoint) {
23361
- debug$d?.(`[package entry] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(resolvedEntryPoint)}`);
23372
+ debug$d?.(`[package entry] ${colors$1.cyan(id)} -> ${colors$1.dim(resolvedEntryPoint)}`);
23362
23373
  setResolvedCache('.', resolvedEntryPoint, targetWeb);
23363
23374
  return resolvedEntryPoint;
23364
23375
  }
@@ -23444,7 +23455,7 @@ function resolveDeepImport(id, { webResolvedImports, setResolvedCache, getResolv
23444
23455
  const resolved = tryFsResolve(path$o.join(dir, relativeId), options, !exportsField, // try index only if no exports field
23445
23456
  targetWeb);
23446
23457
  if (resolved) {
23447
- debug$d?.(`[node/deep-import] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(resolved)}`);
23458
+ debug$d?.(`[node/deep-import] ${colors$1.cyan(id)} -> ${colors$1.dim(resolved)}`);
23448
23459
  setResolvedCache(id, resolved, targetWeb);
23449
23460
  return resolved;
23450
23461
  }
@@ -23461,7 +23472,7 @@ function tryResolveBrowserMapping(id, importer, options, isFilePath, externalize
23461
23472
  if ((res = bareImportRE.test(browserMappedPath)
23462
23473
  ? tryNodeResolve(browserMappedPath, importer, options, true)?.id
23463
23474
  : tryFsResolve(path$o.join(pkg.dir, browserMappedPath), options))) {
23464
- debug$d?.(`[browser mapped] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
23475
+ debug$d?.(`[browser mapped] ${colors$1.cyan(id)} -> ${colors$1.dim(res)}`);
23465
23476
  let result = { id: res };
23466
23477
  if (options.idOnly) {
23467
23478
  return result;
@@ -24193,7 +24204,7 @@ var utils$f = {};
24193
24204
  };
24194
24205
  flat(args);
24195
24206
  return result;
24196
- };
24207
+ };
24197
24208
  } (utils$f));
24198
24209
 
24199
24210
  const utils$e = utils$f;
@@ -25502,7 +25513,7 @@ var braces_1 = braces$2;
25502
25513
 
25503
25514
  const util = require$$0$6;
25504
25515
  const braces$1 = braces_1;
25505
- const picomatch$2 = picomatchExports;
25516
+ const picomatch$2 = picomatch$3;
25506
25517
  const utils$b = utils$k;
25507
25518
  const isEmptyString = val => val === '' || val === './';
25508
25519
 
@@ -25966,6 +25977,8 @@ micromatch$1.braceExpand = (pattern, options) => {
25966
25977
 
25967
25978
  var micromatch_1 = micromatch$1;
25968
25979
 
25980
+ var micromatch$2 = /*@__PURE__*/getDefaultExportFromCjs(micromatch_1);
25981
+
25969
25982
  Object.defineProperty(pattern$1, "__esModule", { value: true });
25970
25983
  pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
25971
25984
  const path$f = require$$0$4;
@@ -26530,7 +26543,7 @@ var fs$f = {};
26530
26543
  }
26531
26544
  return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
26532
26545
  }
26533
- exports.createFileSystemAdapter = createFileSystemAdapter;
26546
+ exports.createFileSystemAdapter = createFileSystemAdapter;
26534
26547
  } (fs$f));
26535
26548
 
26536
26549
  Object.defineProperty(settings$3, "__esModule", { value: true });
@@ -26883,7 +26896,7 @@ var fs$b = {};
26883
26896
  }
26884
26897
  return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
26885
26898
  }
26886
- exports.createFileSystemAdapter = createFileSystemAdapter;
26899
+ exports.createFileSystemAdapter = createFileSystemAdapter;
26887
26900
  } (fs$b));
26888
26901
 
26889
26902
  Object.defineProperty(settings$2, "__esModule", { value: true });
@@ -26936,11 +26949,7 @@ function getSettings$1(settingsOrOptions = {}) {
26936
26949
  return new settings_1$2.default(settingsOrOptions);
26937
26950
  }
26938
26951
 
26939
- var queueExports = {};
26940
- var queue = {
26941
- get exports(){ return queueExports; },
26942
- set exports(v){ queueExports = v; },
26943
- };
26952
+ var queue = {exports: {}};
26944
26953
 
26945
26954
  function reusify$1 (Constructor) {
26946
26955
  var head = new Constructor();
@@ -27254,7 +27263,9 @@ function queueAsPromised (context, worker, concurrency) {
27254
27263
  }
27255
27264
 
27256
27265
  queue.exports = fastqueue;
27257
- queueExports.promise = queueAsPromised;
27266
+ queue.exports.promise = queueAsPromised;
27267
+
27268
+ var queueExports = queue.exports;
27258
27269
 
27259
27270
  var common$7 = {};
27260
27271
 
@@ -28232,7 +28243,7 @@ var settings = {};
28232
28243
  return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
28233
28244
  }
28234
28245
  }
28235
- exports.default = Settings;
28246
+ exports.default = Settings;
28236
28247
  } (settings));
28237
28248
 
28238
28249
  const taskManager = tasks;
@@ -28303,6 +28314,8 @@ function assertPatternsInput(input) {
28303
28314
  }
28304
28315
  var out = FastGlob;
28305
28316
 
28317
+ var glob = /*@__PURE__*/getDefaultExportFromCjs(out);
28318
+
28306
28319
  const debug$c = createDebugger('vite:ssr-external');
28307
28320
  /**
28308
28321
  * Converts "parent > child" syntax to just "child"
@@ -28664,7 +28677,7 @@ function optimizedDepsPlugin(config) {
28664
28677
  }
28665
28678
  }
28666
28679
  }
28667
- debug$b?.(`load ${picocolorsExports.cyan(file)}`);
28680
+ debug$b?.(`load ${colors$1.cyan(file)}`);
28668
28681
  // Load the file from the cache instead of waiting for other plugin
28669
28682
  // load hooks to avoid race conditions, once processing is resolved,
28670
28683
  // we are sure that the file has been properly save to disk
@@ -28727,7 +28740,7 @@ function optimizedDepsBuildPlugin(config) {
28727
28740
  const info = optimizedDepInfoFromFile(depsOptimizer.metadata, file);
28728
28741
  if (info) {
28729
28742
  await info.processing;
28730
- debug$b?.(`load ${picocolorsExports.cyan(file)}`);
28743
+ debug$b?.(`load ${colors$1.cyan(file)}`);
28731
28744
  }
28732
28745
  else {
28733
28746
  throw new Error(`Something unexpected happened while optimizing "${id}".`);
@@ -29004,7 +29017,7 @@ var dist = {};
29004
29017
  },
29005
29018
  };
29006
29019
  }
29007
- exports.lilconfigSync = lilconfigSync;
29020
+ exports.lilconfigSync = lilconfigSync;
29008
29021
  } (dist));
29009
29022
 
29010
29023
  const ALIAS = Symbol.for('yaml.alias');
@@ -36556,6 +36569,8 @@ const rc = withTypeScriptLoader((ctx, path, options) => {
36556
36569
  */
36557
36570
  var src$1 = rc;
36558
36571
 
36572
+ var postcssrc = /*@__PURE__*/getDefaultExportFromCjs(src$1);
36573
+
36559
36574
  function stripLiteralAcorn(code) {
36560
36575
  const FILL = " ";
36561
36576
  let result = "";
@@ -36621,11 +36636,7 @@ function stripLiteral(code) {
36621
36636
  }
36622
36637
  }
36623
36638
 
36624
- var mainExports = {};
36625
- var main$1 = {
36626
- get exports(){ return mainExports; },
36627
- set exports(v){ mainExports = v; },
36628
- };
36639
+ var main$1 = {exports: {}};
36629
36640
 
36630
36641
  var name = "dotenv";
36631
36642
  var version$1 = "16.0.3";
@@ -36810,8 +36821,8 @@ const DotenvModule = {
36810
36821
  parse: parse$9
36811
36822
  };
36812
36823
 
36813
- mainExports.config = DotenvModule.config;
36814
- var parse_1$1 = mainExports.parse = DotenvModule.parse;
36824
+ main$1.exports.config = DotenvModule.config;
36825
+ var parse_1$1 = main$1.exports.parse = DotenvModule.parse;
36815
36826
  main$1.exports = DotenvModule;
36816
36827
 
36817
36828
  function _interpolate (envValue, environment, config) {
@@ -37585,7 +37596,7 @@ function preImportMapHook(config) {
37585
37596
  return;
37586
37597
  if (importMapAppendIndex < importMapIndex) {
37587
37598
  const relativeHtml = normalizePath$3(path$o.relative(config.root, ctx.filename));
37588
- config.logger.warnOnce(picocolorsExports.yellow(picocolorsExports.bold(`(!) <script type="importmap"> should come before <script type="module"> and <link rel="modulepreload"> in /${relativeHtml}`)));
37599
+ config.logger.warnOnce(colors$1.yellow(colors$1.bold(`(!) <script type="importmap"> should come before <script type="module"> and <link rel="modulepreload"> in /${relativeHtml}`)));
37589
37600
  }
37590
37601
  };
37591
37602
  }
@@ -37629,7 +37640,7 @@ function htmlEnvHook(config) {
37629
37640
  else {
37630
37641
  if (envPrefix.some((prefix) => key.startsWith(prefix))) {
37631
37642
  const relativeHtml = normalizePath$3(path$o.relative(config.root, ctx.filename));
37632
- config.logger.warn(picocolorsExports.yellow(picocolorsExports.bold(`(!) ${text} is not defined in env variables found in /${relativeHtml}. ` +
37643
+ config.logger.warn(colors$1.yellow(colors$1.bold(`(!) ${text} is not defined in env variables found in /${relativeHtml}. ` +
37633
37644
  `Is the variable mistyped?`)));
37634
37645
  }
37635
37646
  return text;
@@ -38422,7 +38433,7 @@ async function compileCSS(id, code, config, urlReplacer) {
38422
38433
  // but we've shimmed to remove the `resolve` dep to cut on bundle size.
38423
38434
  // warn here to provide a better error message.
38424
38435
  if (!path$o.isAbsolute(id)) {
38425
- config.logger.error(picocolorsExports.red(`Unable to resolve \`@import "${id}"\` from ${basedir}`));
38436
+ config.logger.error(colors$1.red(`Unable to resolve \`@import "${id}"\` from ${basedir}`));
38426
38437
  }
38427
38438
  return id;
38428
38439
  },
@@ -38498,10 +38509,10 @@ async function compileCSS(id, code, config, urlReplacer) {
38498
38509
  else if (message.type === 'dir-dependency') {
38499
38510
  // https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md#3-dependencies
38500
38511
  const { dir, glob: globPattern = '**' } = message;
38501
- const pattern = out.escapePath(normalizePath$3(path$o.resolve(path$o.dirname(id), dir))) +
38512
+ const pattern = glob.escapePath(normalizePath$3(path$o.resolve(path$o.dirname(id), dir))) +
38502
38513
  `/` +
38503
38514
  globPattern;
38504
- const files = out.sync(pattern, {
38515
+ const files = glob.sync(pattern, {
38505
38516
  ignore: ['**/node_modules/**'],
38506
38517
  });
38507
38518
  for (let i = 0; i < files.length; i++) {
@@ -38516,7 +38527,7 @@ async function compileCSS(id, code, config, urlReplacer) {
38516
38527
  column: message.column,
38517
38528
  })}`;
38518
38529
  }
38519
- config.logger.warn(picocolorsExports.yellow(msg));
38530
+ config.logger.warn(colors$1.yellow(msg));
38520
38531
  }
38521
38532
  }
38522
38533
  }
@@ -38563,8 +38574,8 @@ function createCachedImport(imp) {
38563
38574
  return cached;
38564
38575
  };
38565
38576
  }
38566
- const importPostcssImport = createCachedImport(() => import('./dep-e3f470e2.js').then(function (n) { return n.i; }));
38567
- const importPostcssModules = createCachedImport(() => import('./dep-11cf3f0f.js').then(function (n) { return n.i; }));
38577
+ const importPostcssImport = createCachedImport(() => import('./dep-3ea2db5b.js').then(function (n) { return n.i; }));
38578
+ const importPostcssModules = createCachedImport(() => import('./dep-5728e8e9.js').then(function (n) { return n.i; }));
38568
38579
  const importPostcss = createCachedImport(() => import('postcss'));
38569
38580
  /**
38570
38581
  * @experimental
@@ -38628,7 +38639,7 @@ async function resolvePostcssConfig(config) {
38628
38639
  }
38629
38640
  else {
38630
38641
  const searchPath = typeof inlineOptions === 'string' ? inlineOptions : config.root;
38631
- result = src$1({}, searchPath).catch((e) => {
38642
+ result = postcssrc({}, searchPath).catch((e) => {
38632
38643
  if (!/No PostCSS Config found/.test(e.message)) {
38633
38644
  if (e instanceof Error) {
38634
38645
  const { name, message, stack } = e;
@@ -38775,7 +38786,7 @@ async function minifyCSS(css, config) {
38775
38786
  });
38776
38787
  if (warnings.length) {
38777
38788
  const msgs = await formatMessages(warnings, { kind: 'warning' });
38778
- config.logger.warn(picocolorsExports.yellow(`warnings when minifying css:\n${msgs.join('\n')}`));
38789
+ config.logger.warn(colors$1.yellow(`warnings when minifying css:\n${msgs.join('\n')}`));
38779
38790
  }
38780
38791
  return code;
38781
38792
  }
@@ -39490,7 +39501,7 @@ base.MethodDefinition = base.PropertyDefinition = base.Property = function (node
39490
39501
  if (node.value) { c(node.value, st, "Expression"); }
39491
39502
  };
39492
39503
 
39493
- const { isMatch: isMatch$1, scan } = micromatch_1;
39504
+ const { isMatch: isMatch$1, scan } = micromatch$2;
39494
39505
  function getAffectedGlobModules(file, server) {
39495
39506
  const modules = [];
39496
39507
  for (const [id, allGlobs] of server._importGlobMap) {
@@ -39723,7 +39734,7 @@ async function transformGlobImport(code, id, root, resolveId, isProduction, rest
39723
39734
  const s = new MagicString(code);
39724
39735
  const staticImports = (await Promise.all(matches.map(async ({ globs, globsResolved, isRelative, options, index, start, end, }) => {
39725
39736
  const cwd = getCommonBase(globsResolved) ?? root;
39726
- const files = (await out(globsResolved, {
39737
+ const files = (await glob(globsResolved, {
39727
39738
  cwd,
39728
39739
  absolute: true,
39729
39740
  dot: !!options.exhaustive,
@@ -39837,7 +39848,7 @@ async function transformGlobImport(code, id, root, resolveId, isProduction, rest
39837
39848
  function globSafePath(path) {
39838
39849
  // slash path to ensure \ is converted to / as \ could lead to a double escape scenario
39839
39850
  // see https://github.com/mrmlnc/fast-glob#advanced-syntax
39840
- return out.escapePath(normalizePath$3(path));
39851
+ return glob.escapePath(normalizePath$3(path));
39841
39852
  }
39842
39853
  function lastNthChar(str, n) {
39843
39854
  return str.charAt(str.length - 1 - n);
@@ -39925,20 +39936,20 @@ async function handleHMRUpdate(file, server, configOnly) {
39925
39936
  (fileName === '.env' || fileName.startsWith('.env.'));
39926
39937
  if (isConfig || isConfigDependency || isEnv) {
39927
39938
  // auto restart server
39928
- debugHmr?.(`[config change] ${picocolorsExports.dim(shortFile)}`);
39929
- config.logger.info(picocolorsExports.green(`${path$o.relative(process.cwd(), file)} changed, restarting server...`), { clear: true, timestamp: true });
39939
+ debugHmr?.(`[config change] ${colors$1.dim(shortFile)}`);
39940
+ config.logger.info(colors$1.green(`${path$o.relative(process.cwd(), file)} changed, restarting server...`), { clear: true, timestamp: true });
39930
39941
  try {
39931
39942
  await server.restart();
39932
39943
  }
39933
39944
  catch (e) {
39934
- config.logger.error(picocolorsExports.red(e));
39945
+ config.logger.error(colors$1.red(e));
39935
39946
  }
39936
39947
  return;
39937
39948
  }
39938
39949
  if (configOnly) {
39939
39950
  return;
39940
39951
  }
39941
- debugHmr?.(`[file change] ${picocolorsExports.dim(shortFile)}`);
39952
+ debugHmr?.(`[file change] ${colors$1.dim(shortFile)}`);
39942
39953
  // (dev only) the client itself cannot be hot updated.
39943
39954
  if (file.startsWith(normalizedClientDir)) {
39944
39955
  ws.send({
@@ -39966,7 +39977,7 @@ async function handleHMRUpdate(file, server, configOnly) {
39966
39977
  if (!hmrContext.modules.length) {
39967
39978
  // html file cannot be hot updated
39968
39979
  if (file.endsWith('.html')) {
39969
- config.logger.info(picocolorsExports.green(`page reload `) + picocolorsExports.dim(shortFile), {
39980
+ config.logger.info(colors$1.green(`page reload `) + colors$1.dim(shortFile), {
39970
39981
  clear: true,
39971
39982
  timestamp: true,
39972
39983
  });
@@ -39979,7 +39990,7 @@ async function handleHMRUpdate(file, server, configOnly) {
39979
39990
  }
39980
39991
  else {
39981
39992
  // loaded but not in the module graph, probably not js
39982
- debugHmr?.(`[no modules matched] ${picocolorsExports.dim(shortFile)}`);
39993
+ debugHmr?.(`[no modules matched] ${colors$1.dim(shortFile)}`);
39983
39994
  }
39984
39995
  return;
39985
39996
  }
@@ -40012,7 +40023,7 @@ function updateModules(file, modules, timestamp, { config, ws, moduleGraph }, af
40012
40023
  })));
40013
40024
  }
40014
40025
  if (needFullReload) {
40015
- config.logger.info(picocolorsExports.green(`page reload `) + picocolorsExports.dim(file), {
40026
+ config.logger.info(colors$1.green(`page reload `) + colors$1.dim(file), {
40016
40027
  clear: !afterInvalidation,
40017
40028
  timestamp: true,
40018
40029
  });
@@ -40022,11 +40033,11 @@ function updateModules(file, modules, timestamp, { config, ws, moduleGraph }, af
40022
40033
  return;
40023
40034
  }
40024
40035
  if (updates.length === 0) {
40025
- debugHmr?.(picocolorsExports.yellow(`no update happened `) + picocolorsExports.dim(file));
40036
+ debugHmr?.(colors$1.yellow(`no update happened `) + colors$1.dim(file));
40026
40037
  return;
40027
40038
  }
40028
- config.logger.info(picocolorsExports.green(`hmr update `) +
40029
- picocolorsExports.dim([...new Set(updates.map((u) => u.path))].join(', ')), { clear: !afterInvalidation, timestamp: true });
40039
+ config.logger.info(colors$1.green(`hmr update `) +
40040
+ colors$1.dim([...new Set(updates.map((u) => u.path))].join(', ')), { clear: !afterInvalidation, timestamp: true });
40030
40041
  ws.send({
40031
40042
  type: 'update',
40032
40043
  updates,
@@ -40056,7 +40067,7 @@ function propagateUpdate(node, traversedModules, boundaries, currentChain = [nod
40056
40067
  // if the imports of `node` have not been analyzed, then `node` has not
40057
40068
  // been loaded in the browser and we should stop propagation.
40058
40069
  if (node.id && node.isSelfAccepting === undefined) {
40059
- debugHmr?.(`[propagate update] stop propagation because not analyzed: ${picocolorsExports.dim(node.id)}`);
40070
+ debugHmr?.(`[propagate update] stop propagation because not analyzed: ${colors$1.dim(node.id)}`);
40060
40071
  return false;
40061
40072
  }
40062
40073
  if (node.isSelfAccepting) {
@@ -40120,7 +40131,7 @@ function handlePrunedModules(mods, { ws }) {
40120
40131
  const t = Date.now();
40121
40132
  mods.forEach((mod) => {
40122
40133
  mod.lastHMRTimestamp = t;
40123
- debugHmr?.(`[dispose] ${picocolorsExports.dim(mod.file)}`);
40134
+ debugHmr?.(`[dispose] ${colors$1.dim(mod.file)}`);
40124
40135
  });
40125
40136
  ws.send({
40126
40137
  type: 'prune',
@@ -40412,7 +40423,7 @@ function importAnalysisPlugin(config) {
40412
40423
  const ssr = options?.ssr === true;
40413
40424
  const prettyImporter = prettifyUrl(importer, root);
40414
40425
  if (canSkipImportAnalysis(importer)) {
40415
- debug$a?.(picocolorsExports.dim(`[skipped] ${prettyImporter}`));
40426
+ debug$a?.(colors$1.dim(`[skipped] ${prettyImporter}`));
40416
40427
  return null;
40417
40428
  }
40418
40429
  const start = performance$1.now();
@@ -40452,7 +40463,7 @@ function importAnalysisPlugin(config) {
40452
40463
  }
40453
40464
  if (!imports.length && !this._addedImports) {
40454
40465
  importerModule.isSelfAccepting = false;
40455
- debug$a?.(`${timeFrom(start)} ${picocolorsExports.dim(`[no imports] ${prettyImporter}`)}`);
40466
+ debug$a?.(`${timeFrom(start)} ${colors$1.dim(`[no imports] ${prettyImporter}`)}`);
40456
40467
  return source;
40457
40468
  }
40458
40469
  let hasHMR = false;
@@ -40650,11 +40661,11 @@ function importAnalysisPlugin(config) {
40650
40661
  ) {
40651
40662
  const newImport = sourceExp + specifier + `?inline` + source.slice(end, expEnd);
40652
40663
  this.warn(`\n` +
40653
- picocolorsExports.cyan(importerModule.file) +
40664
+ colors$1.cyan(importerModule.file) +
40654
40665
  `\n` +
40655
- picocolorsExports.reset(generateCodeFrame(source, start)) +
40666
+ colors$1.reset(generateCodeFrame(source, start)) +
40656
40667
  `\n` +
40657
- picocolorsExports.yellow(`Default and named imports from CSS files are deprecated. ` +
40668
+ colors$1.yellow(`Default and named imports from CSS files are deprecated. ` +
40658
40669
  `Use the ?inline query instead. ` +
40659
40670
  `For example: ${newImport}`));
40660
40671
  }
@@ -40676,7 +40687,7 @@ function importAnalysisPlugin(config) {
40676
40687
  // optimize info for them, but they don't need es interop. If the request isn't
40677
40688
  // a dynamic import, then it is an internal Vite error
40678
40689
  if (!file.match(optimizedDepDynamicRE$1)) {
40679
- config.logger.error(picocolorsExports.red(`Vite Error, ${url} optimized info should be defined`));
40690
+ config.logger.error(colors$1.red(`Vite Error, ${url} optimized info should be defined`));
40680
40691
  }
40681
40692
  }
40682
40693
  else if (needsInterop) {
@@ -40737,11 +40748,11 @@ function importAnalysisPlugin(config) {
40737
40748
  source.slice(dynamicIndex + 1, end));
40738
40749
  if (!hasViteIgnore) {
40739
40750
  this.warn(`\n` +
40740
- picocolorsExports.cyan(importerModule.file) +
40751
+ colors$1.cyan(importerModule.file) +
40741
40752
  `\n` +
40742
- picocolorsExports.reset(generateCodeFrame(source, start)) +
40743
- picocolorsExports.yellow(`\nThe above dynamic import cannot be analyzed by Vite.\n` +
40744
- `See ${picocolorsExports.blue(`https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations`)} ` +
40753
+ colors$1.reset(generateCodeFrame(source, start)) +
40754
+ colors$1.yellow(`\nThe above dynamic import cannot be analyzed by Vite.\n` +
40755
+ `See ${colors$1.blue(`https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations`)} ` +
40745
40756
  `for supported dynamic import formats. ` +
40746
40757
  `If this is intended to be left as-is, you can use the ` +
40747
40758
  `/* @vite-ignore */ comment inside the import() call to suppress this warning.\n`));
@@ -40815,7 +40826,7 @@ function importAnalysisPlugin(config) {
40815
40826
  handlePrunedModules(prunedImports, server);
40816
40827
  }
40817
40828
  }
40818
- debug$a?.(`${timeFrom(start)} ${picocolorsExports.dim(`[${importedUrls.size} imports rewritten] ${prettyImporter}`)}`);
40829
+ debug$a?.(`${timeFrom(start)} ${colors$1.dim(`[${importedUrls.size} imports rewritten] ${prettyImporter}`)}`);
40819
40830
  if (s) {
40820
40831
  return transformStableResult(s, importer, config);
40821
40832
  }
@@ -40877,7 +40888,7 @@ function transformCjsImport(importExp, url, rawUrl, importIndex, importer, confi
40877
40888
  if (config.command === 'serve' &&
40878
40889
  node.type === 'ExportAllDeclaration' &&
40879
40890
  !node.exported) {
40880
- config.logger.warn(picocolorsExports.yellow(`\nUnable to interop \`${importExp}\` in ${importer}, this may lose module exports. Please export "${rawUrl}" as ESM or use named exports instead, e.g. \`export { A, B } from "${rawUrl}"\``));
40891
+ config.logger.warn(colors$1.yellow(`\nUnable to interop \`${importExp}\` in ${importer}, this may lose module exports. Please export "${rawUrl}" as ESM or use named exports instead, e.g. \`export { A, B } from "${rawUrl}"\``));
40881
40892
  }
40882
40893
  else if (node.type === 'ImportDeclaration' ||
40883
40894
  node.type === 'ExportNamedDeclaration') {
@@ -41440,6 +41451,9 @@ function preAliasPlugin(config) {
41440
41451
  if (optimizedId) {
41441
41452
  return optimizedId; // aliased dep already optimized
41442
41453
  }
41454
+ if (depsOptimizer.options.noDiscovery) {
41455
+ return;
41456
+ }
41443
41457
  const resolved = await this.resolve(id, importer, {
41444
41458
  ...options,
41445
41459
  custom: { ...options.custom, 'vite:pre-alias': true },
@@ -42343,12 +42357,12 @@ function prepareError(err) {
42343
42357
  }
42344
42358
  function buildErrorMessage(err, args = [], includeStack = true) {
42345
42359
  if (err.plugin)
42346
- args.push(` Plugin: ${picocolorsExports.magenta(err.plugin)}`);
42360
+ args.push(` Plugin: ${colors$1.magenta(err.plugin)}`);
42347
42361
  const loc = err.loc ? `:${err.loc.line}:${err.loc.column}` : '';
42348
42362
  if (err.id)
42349
- args.push(` File: ${picocolorsExports.cyan(err.id)}${loc}`);
42363
+ args.push(` File: ${colors$1.cyan(err.id)}${loc}`);
42350
42364
  if (err.frame)
42351
- args.push(picocolorsExports.yellow(pad$1(err.frame)));
42365
+ args.push(colors$1.yellow(pad$1(err.frame)));
42352
42366
  if (includeStack && err.stack)
42353
42367
  args.push(pad$1(cleanStack(err.stack)));
42354
42368
  return args.join('\n');
@@ -42361,7 +42375,7 @@ function cleanStack(stack) {
42361
42375
  }
42362
42376
  function logError(server, err) {
42363
42377
  const msg = buildErrorMessage(err, [
42364
- picocolorsExports.red(`Internal server error: ${err.message}`),
42378
+ colors$1.red(`Internal server error: ${err.message}`),
42365
42379
  ]);
42366
42380
  server.config.logger.error(msg, {
42367
42381
  clear: true,
@@ -42431,8 +42445,8 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42431
42445
  },
42432
42446
  };
42433
42447
  function warnIncompatibleMethod(method, plugin) {
42434
- logger.warn(picocolorsExports.cyan(`[plugin:${plugin}] `) +
42435
- picocolorsExports.yellow(`context method ${picocolorsExports.bold(`${method}()`)} is not supported in serve mode. This plugin is likely not vite-compatible.`));
42448
+ logger.warn(colors$1.cyan(`[plugin:${plugin}] `) +
42449
+ colors$1.yellow(`context method ${colors$1.bold(`${method}()`)} is not supported in serve mode. This plugin is likely not vite-compatible.`));
42436
42450
  }
42437
42451
  // parallel, ignores returns
42438
42452
  async function hookParallel(hookName, context, args) {
@@ -42573,7 +42587,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42573
42587
  }
42574
42588
  warn(e, position) {
42575
42589
  const err = formatError(e, position, this);
42576
- const msg = buildErrorMessage(err, [picocolorsExports.yellow(`warning: ${err.message}`)], false);
42590
+ const msg = buildErrorMessage(err, [colors$1.yellow(`warning: ${err.message}`)], false);
42577
42591
  logger.warn(msg, {
42578
42592
  clear: true,
42579
42593
  timestamp: true,
@@ -42607,7 +42621,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42607
42621
  errLocation = numberToPos(ctx._activeCode, pos);
42608
42622
  }
42609
42623
  catch (err2) {
42610
- logger.error(picocolorsExports.red(`Error in error handler:\n${err2.stack || err2.message}\n`),
42624
+ logger.error(colors$1.red(`Error in error handler:\n${err2.stack || err2.message}\n`),
42611
42625
  // print extra newline to separate the two errors
42612
42626
  { error: err2 });
42613
42627
  throw err;
@@ -42813,7 +42827,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42813
42827
  // avoid spamming
42814
42828
  if (!seenResolves[key]) {
42815
42829
  seenResolves[key] = true;
42816
- debugResolve(`${timeFrom(resolveStart)} ${picocolorsExports.cyan(rawId)} -> ${picocolorsExports.dim(id)}`);
42830
+ debugResolve(`${timeFrom(resolveStart)} ${colors$1.cyan(rawId)} -> ${colors$1.dim(id)}`);
42817
42831
  }
42818
42832
  }
42819
42833
  if (id) {
@@ -42924,7 +42938,7 @@ function scanImports(config) {
42924
42938
  entries = computedEntries;
42925
42939
  if (!entries.length) {
42926
42940
  if (!config.optimizeDeps.entries && !config.optimizeDeps.include) {
42927
- config.logger.warn(picocolorsExports.yellow('(!) Could not auto-determine entry point from rollupOptions or html files ' +
42941
+ config.logger.warn(colors$1.yellow('(!) Could not auto-determine entry point from rollupOptions or html files ' +
42928
42942
  'and there are no explicit optimizeDeps.include patterns. ' +
42929
42943
  'Skipping dependency pre-bundling.'));
42930
42944
  }
@@ -42933,7 +42947,7 @@ function scanImports(config) {
42933
42947
  if (scanContext.cancelled)
42934
42948
  return;
42935
42949
  debug$9?.(`Crawling dependencies using entries: ${entries
42936
- .map((entry) => `\n ${picocolorsExports.dim(entry)}`)
42950
+ .map((entry) => `\n ${colors$1.dim(entry)}`)
42937
42951
  .join('')}`);
42938
42952
  return prepareEsbuildScanner(config, entries, deps, missing, scanContext);
42939
42953
  });
@@ -42967,7 +42981,7 @@ function scanImports(config) {
42967
42981
  // return an empty result instead
42968
42982
  return { deps: {}, missing: {} };
42969
42983
  }
42970
- const prependMessage = picocolorsExports.red(`\
42984
+ const prependMessage = colors$1.red(`\
42971
42985
  Failed to scan for dependencies from entries:
42972
42986
  ${entries.join('\n')}
42973
42987
 
@@ -42989,8 +43003,8 @@ function scanImports(config) {
42989
43003
  const duration = (performance$1.now() - start).toFixed(2);
42990
43004
  const depsStr = Object.keys(orderedDependencies(deps))
42991
43005
  .sort()
42992
- .map((id) => `\n ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(deps[id])}`)
42993
- .join('') || picocolorsExports.dim('no dependencies found');
43006
+ .map((id) => `\n ${colors$1.cyan(id)} -> ${colors$1.dim(deps[id])}`)
43007
+ .join('') || colors$1.dim('no dependencies found');
42994
43008
  debug$9(`Scan completed in ${duration}ms: ${depsStr}`);
42995
43009
  }
42996
43010
  });
@@ -43059,7 +43073,7 @@ function orderedDependencies(deps) {
43059
43073
  return Object.fromEntries(depsList);
43060
43074
  }
43061
43075
  function globEntries(pattern, config) {
43062
- return out(pattern, {
43076
+ return glob(pattern, {
43063
43077
  cwd: config.root,
43064
43078
  ignore: [
43065
43079
  '**/node_modules/**',
@@ -43470,7 +43484,7 @@ async function createDepsOptimizer(config, server) {
43470
43484
  let newDepsToLogHandle;
43471
43485
  const logNewlyDiscoveredDeps = () => {
43472
43486
  if (newDepsToLog.length) {
43473
- config.logger.info(picocolorsExports.green(`✨ new dependencies optimized: ${depsLogString(newDepsToLog)}`), {
43487
+ config.logger.info(colors$1.green(`✨ new dependencies optimized: ${depsLogString(newDepsToLog)}`), {
43474
43488
  timestamp: true,
43475
43489
  });
43476
43490
  newDepsToLog = [];
@@ -43524,12 +43538,17 @@ async function createDepsOptimizer(config, server) {
43524
43538
  });
43525
43539
  newDepsDiscovered = true;
43526
43540
  }
43527
- if (!isBuild) {
43541
+ if (config.optimizeDeps.noDiscovery) {
43542
+ // We don't need to scan for dependencies or wait for the static crawl to end
43543
+ // Run the first optimization run immediately
43544
+ runOptimizer();
43545
+ }
43546
+ else if (!isBuild) {
43528
43547
  // Important, the scanner is dev only
43529
43548
  depsOptimizer.scanProcessing = new Promise((resolve) => {
43530
43549
  (async () => {
43531
43550
  try {
43532
- debug$8?.(picocolorsExports.green(`scanning for dependencies...`));
43551
+ debug$8?.(colors$1.green(`scanning for dependencies...`));
43533
43552
  discover = discoverProjectDependencies(config);
43534
43553
  const deps = await discover.result;
43535
43554
  discover = undefined;
@@ -43681,7 +43700,7 @@ async function createDepsOptimizer(config, server) {
43681
43700
  }, 2 * debounceMs);
43682
43701
  }
43683
43702
  else {
43684
- debug$8(picocolorsExports.green(`✨ ${!isRerun
43703
+ debug$8(colors$1.green(`✨ ${!isRerun
43685
43704
  ? `dependencies optimized`
43686
43705
  : `optimized dependencies unchanged`}`));
43687
43706
  }
@@ -43693,7 +43712,7 @@ async function createDepsOptimizer(config, server) {
43693
43712
  // We don't resolve the processing promise, as they will be resolved
43694
43713
  // once a rerun is committed
43695
43714
  processingResult.cancel();
43696
- debug$8?.(picocolorsExports.green(`✨ delaying reload as new dependencies have been found...`));
43715
+ debug$8?.(colors$1.green(`✨ delaying reload as new dependencies have been found...`));
43697
43716
  }
43698
43717
  else {
43699
43718
  await commitProcessing();
@@ -43703,11 +43722,11 @@ async function createDepsOptimizer(config, server) {
43703
43722
  newDepsToLogHandle = undefined;
43704
43723
  logNewlyDiscoveredDeps();
43705
43724
  }
43706
- logger.info(picocolorsExports.green(`✨ optimized dependencies changed. reloading`), {
43725
+ logger.info(colors$1.green(`✨ optimized dependencies changed. reloading`), {
43707
43726
  timestamp: true,
43708
43727
  });
43709
43728
  if (needsInteropMismatch.length > 0) {
43710
- config.logger.warn(`Mixed ESM and CJS detected in ${picocolorsExports.yellow(needsInteropMismatch.join(', '))}, add ${needsInteropMismatch.length === 1 ? 'it' : 'them'} to optimizeDeps.needsInterop to speed up cold start`, {
43729
+ config.logger.warn(`Mixed ESM and CJS detected in ${colors$1.yellow(needsInteropMismatch.join(', '))}, add ${needsInteropMismatch.length === 1 ? 'it' : 'them'} to optimizeDeps.needsInterop to speed up cold start`, {
43711
43730
  timestamp: true,
43712
43731
  });
43713
43732
  }
@@ -43716,7 +43735,7 @@ async function createDepsOptimizer(config, server) {
43716
43735
  }
43717
43736
  }
43718
43737
  catch (e) {
43719
- logger.error(picocolorsExports.red(`error while updating dependencies:\n${e.stack}`), { timestamp: true, error: e });
43738
+ logger.error(colors$1.red(`error while updating dependencies:\n${e.stack}`), { timestamp: true, error: e });
43720
43739
  resolveEnqueuedProcessingPromises();
43721
43740
  // Reset missing deps, let the server rediscover the dependencies
43722
43741
  metadata.discovered = {};
@@ -43743,7 +43762,7 @@ async function createDepsOptimizer(config, server) {
43743
43762
  // optimizeDeps processing is finished
43744
43763
  const deps = Object.keys(metadata.discovered);
43745
43764
  const depsString = depsLogString(deps);
43746
- debug$8?.(picocolorsExports.green(`new dependencies found: ${depsString}`));
43765
+ debug$8?.(colors$1.green(`new dependencies found: ${depsString}`));
43747
43766
  runOptimizer();
43748
43767
  }
43749
43768
  function getDiscoveredBrowserHash(hash, deps, missing) {
@@ -43828,7 +43847,7 @@ async function createDepsOptimizer(config, server) {
43828
43847
  // On build time, a missing dep appearing after onCrawlEnd is an internal error
43829
43848
  // On dev, switch after this point to a simple debounce strategy
43830
43849
  crawlEndFinder = undefined;
43831
- debug$8?.(picocolorsExports.green(`✨ static imports crawl ended`));
43850
+ debug$8?.(colors$1.green(`✨ static imports crawl ended`));
43832
43851
  if (closed) {
43833
43852
  return;
43834
43853
  }
@@ -43842,7 +43861,7 @@ async function createDepsOptimizer(config, server) {
43842
43861
  currentlyProcessing = false;
43843
43862
  const scanDeps = Object.keys(result.metadata.optimized);
43844
43863
  if (scanDeps.length === 0 && crawlDeps.length === 0) {
43845
- debug$8?.(picocolorsExports.green(`✨ no dependencies found by the scanner or crawling static imports`));
43864
+ debug$8?.(colors$1.green(`✨ no dependencies found by the scanner or crawling static imports`));
43846
43865
  result.cancel();
43847
43866
  firstRunCalled = true;
43848
43867
  return;
@@ -43860,13 +43879,13 @@ async function createDepsOptimizer(config, server) {
43860
43879
  }
43861
43880
  }
43862
43881
  if (scannerMissedDeps) {
43863
- debug$8?.(picocolorsExports.yellow(`✨ new dependencies were found while crawling that weren't detected by the scanner`));
43882
+ debug$8?.(colors$1.yellow(`✨ new dependencies were found while crawling that weren't detected by the scanner`));
43864
43883
  }
43865
- debug$8?.(picocolorsExports.green(`✨ re-running optimizer`));
43884
+ debug$8?.(colors$1.green(`✨ re-running optimizer`));
43866
43885
  debouncedProcessing(0);
43867
43886
  }
43868
43887
  else {
43869
- debug$8?.(picocolorsExports.green(`✨ using post-scan optimizer result, the scanner found every used dependency`));
43888
+ debug$8?.(colors$1.green(`✨ using post-scan optimizer result, the scanner found every used dependency`));
43870
43889
  startNextDiscoveredBatch();
43871
43890
  runOptimizer(result);
43872
43891
  }
@@ -43874,7 +43893,7 @@ async function createDepsOptimizer(config, server) {
43874
43893
  else {
43875
43894
  currentlyProcessing = false;
43876
43895
  if (crawlDeps.length === 0) {
43877
- debug$8?.(picocolorsExports.green(`✨ no dependencies found while crawling the static imports`));
43896
+ debug$8?.(colors$1.green(`✨ no dependencies found while crawling the static imports`));
43878
43897
  firstRunCalled = true;
43879
43898
  }
43880
43899
  else {
@@ -44005,7 +44024,7 @@ function findInteropMismatches(discovered, optimized) {
44005
44024
  // This only happens when a discovered dependency has mixed ESM and CJS syntax
44006
44025
  // and it hasn't been manually added to optimizeDeps.needsInterop
44007
44026
  needsInteropMismatch.push(dep);
44008
- debug$8?.(picocolorsExports.cyan(`✨ needsInterop mismatch detected for ${dep}`));
44027
+ debug$8?.(colors$1.cyan(`✨ needsInterop mismatch detected for ${dep}`));
44009
44028
  }
44010
44029
  }
44011
44030
  }
@@ -44028,7 +44047,7 @@ async function optimizeDeps(config, force = config.optimizeDeps.force, asCommand
44028
44047
  }
44029
44048
  const deps = await discoverProjectDependencies(config).result;
44030
44049
  const depsString = depsLogString(Object.keys(deps));
44031
- log?.(picocolorsExports.green(`Optimizing dependencies:\n ${depsString}`));
44050
+ log?.(colors$1.green(`Optimizing dependencies:\n ${depsString}`));
44032
44051
  await addManuallyIncludedOptimizeDeps(deps, config, ssr);
44033
44052
  const depsInfo = toDiscoveredDependencies(config, deps, ssr);
44034
44053
  const result = await runOptimizeDeps(config, depsInfo).result;
@@ -44123,7 +44142,7 @@ function discoverProjectDependencies(config) {
44123
44142
  const missingIds = Object.keys(missing);
44124
44143
  if (missingIds.length) {
44125
44144
  throw new Error(`The following dependencies are imported but could not be resolved:\n\n ${missingIds
44126
- .map((id) => `${picocolorsExports.cyan(id)} ${picocolorsExports.white(picocolorsExports.dim(`(imported by ${missing[id]})`))}`)
44145
+ .map((id) => `${colors$1.cyan(id)} ${colors$1.white(colors$1.dim(`(imported by ${missing[id]})`))}`)
44127
44146
  .join(`\n `)}\n\nAre they installed?`);
44128
44147
  }
44129
44148
  return deps;
@@ -44146,7 +44165,7 @@ function toDiscoveredDependencies(config, deps, ssr, timestamp) {
44146
44165
  return discovered;
44147
44166
  }
44148
44167
  function depsLogString(qualifiedIds) {
44149
- return picocolorsExports.yellow(qualifiedIds.join(`, `));
44168
+ return colors$1.yellow(qualifiedIds.join(`, `));
44150
44169
  }
44151
44170
  /**
44152
44171
  * Internally, Vite uses this function to prepare a optimizeDeps run. When Vite starts, we can get
@@ -44431,7 +44450,7 @@ async function addManuallyIncludedOptimizeDeps(deps, config, ssr, extra = [], fi
44431
44450
  if (optimizeDepsInclude.length || extra.length) {
44432
44451
  const unableToOptimize = (id, msg) => {
44433
44452
  if (optimizeDepsInclude.includes(id)) {
44434
- logger.warn(`${msg}: ${picocolorsExports.cyan(id)}, present in '${ssr ? 'ssr.' : ''}optimizeDeps.include'`);
44453
+ logger.warn(`${msg}: ${colors$1.cyan(id)}, present in '${ssr ? 'ssr.' : ''}optimizeDeps.include'`);
44435
44454
  }
44436
44455
  };
44437
44456
  const resolve = createOptimizeDepsIncludeResolver(config, ssr);
@@ -45090,7 +45109,7 @@ function buildImportAnalysisPlugin(config) {
45090
45109
  // optimize info for them, but they don't need es interop. If the request isn't
45091
45110
  // a dynamic import, then it is an internal Vite error
45092
45111
  if (!file.match(optimizedDepDynamicRE)) {
45093
- config.logger.error(picocolorsExports.red(`Vite Error, ${url} optimized info should be defined`));
45112
+ config.logger.error(colors$1.red(`Vite Error, ${url} optimized info should be defined`));
45094
45113
  }
45095
45114
  }
45096
45115
  else if (needsInterop) {
@@ -45398,7 +45417,7 @@ function ssrManifestPlugin(config) {
45398
45417
  ? config.build.ssrManifest
45399
45418
  : 'ssr-manifest.json',
45400
45419
  type: 'asset',
45401
- source: jsonStableStringify(ssrManifest, { space: 2 }),
45420
+ source: jsonStableStringify$1(ssrManifest, { space: 2 }),
45402
45421
  });
45403
45422
  },
45404
45423
  };
@@ -45429,7 +45448,7 @@ function resolveChokidarOptions(config, options) {
45429
45448
  '**/.git/**',
45430
45449
  '**/node_modules/**',
45431
45450
  '**/test-results/**',
45432
- out.escapePath(config.cacheDir) + '/**',
45451
+ glob.escapePath(config.cacheDir) + '/**',
45433
45452
  ...(Array.isArray(ignored) ? ignored : [ignored]),
45434
45453
  ],
45435
45454
  ignoreInitial: true,
@@ -45587,6 +45606,8 @@ function stattag (stat) {
45587
45606
  return '"' + size + '-' + mtime + '"'
45588
45607
  }
45589
45608
 
45609
+ var getEtag = /*@__PURE__*/getDefaultExportFromCjs(etag_1);
45610
+
45590
45611
  const alias = {
45591
45612
  js: 'application/javascript',
45592
45613
  css: 'text/css',
@@ -45594,7 +45615,7 @@ const alias = {
45594
45615
  json: 'application/json',
45595
45616
  };
45596
45617
  function send$2(req, res, content, type, options) {
45597
- const { etag = etag_1(content, { weak: true }), cacheControl = 'no-cache', headers, map, } = options;
45618
+ const { etag = getEtag(content, { weak: true }), cacheControl = 'no-cache', headers, map, } = options;
45598
45619
  if (res.writableEnded) {
45599
45620
  return;
45600
45621
  }
@@ -45937,6 +45958,8 @@ function escapeHtml$1(string) {
45937
45958
  : html;
45938
45959
  }
45939
45960
 
45961
+ var escapeHtml$2 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
45962
+
45940
45963
  const knownJavascriptExtensionRE = /\.[tj]sx?$/;
45941
45964
  const sirvOptions = ({ headers, shouldServe, }) => {
45942
45965
  return {
@@ -46097,7 +46120,7 @@ function renderRestrictedErrorHTML(msg) {
46097
46120
  return html `
46098
46121
  <body>
46099
46122
  <h1>403 Restricted</h1>
46100
- <p>${escapeHtml_1(msg).replace(/\n/g, '<br/>')}</p>
46123
+ <p>${escapeHtml$2(msg).replace(/\n/g, '<br/>')}</p>
46101
46124
  <style>
46102
46125
  body {
46103
46126
  padding: 1em 2em;
@@ -46245,7 +46268,7 @@ async function build(inlineConfig = {}) {
46245
46268
  const options = config.build;
46246
46269
  const ssr = !!options.ssr;
46247
46270
  const libOptions = options.lib;
46248
- config.logger.info(picocolorsExports.cyan(`vite v${VERSION$1} ${picocolorsExports.green(`building ${ssr ? `SSR bundle ` : ``}for ${config.mode}...`)}`));
46271
+ config.logger.info(colors$1.cyan(`vite v${VERSION$1} ${colors$1.green(`building ${ssr ? `SSR bundle ` : ``}for ${config.mode}...`)}`));
46249
46272
  const resolve = (p) => path$o.resolve(config.root, p);
46250
46273
  const input = libOptions
46251
46274
  ? options.rollupOptions?.input ||
@@ -46295,12 +46318,12 @@ async function build(inlineConfig = {}) {
46295
46318
  },
46296
46319
  };
46297
46320
  const outputBuildError = (e) => {
46298
- let msg = picocolorsExports.red((e.plugin ? `[${e.plugin}] ` : '') + e.message);
46321
+ let msg = colors$1.red((e.plugin ? `[${e.plugin}] ` : '') + e.message);
46299
46322
  if (e.id) {
46300
- msg += `\nfile: ${picocolorsExports.cyan(e.id + (e.loc ? `:${e.loc.line}:${e.loc.column}` : ''))}`;
46323
+ msg += `\nfile: ${colors$1.cyan(e.id + (e.loc ? `:${e.loc.line}:${e.loc.column}` : ''))}`;
46301
46324
  }
46302
46325
  if (e.frame) {
46303
- msg += `\n` + picocolorsExports.yellow(e.frame);
46326
+ msg += `\n` + colors$1.yellow(e.frame);
46304
46327
  }
46305
46328
  config.logger.error(msg, { error: e });
46306
46329
  };
@@ -46364,7 +46387,7 @@ async function build(inlineConfig = {}) {
46364
46387
  const outDirs = normalizedOutputs.map(({ dir }) => resolve(dir));
46365
46388
  // watch file changes with rollup
46366
46389
  if (config.build.watch) {
46367
- config.logger.info(picocolorsExports.cyan(`\nwatching for file changes...`));
46390
+ config.logger.info(colors$1.cyan(`\nwatching for file changes...`));
46368
46391
  const resolvedChokidarOptions = resolveChokidarOptions(config, config.build.watch.chokidar);
46369
46392
  const { watch } = await import('rollup');
46370
46393
  const watcher = watch({
@@ -46377,14 +46400,14 @@ async function build(inlineConfig = {}) {
46377
46400
  });
46378
46401
  watcher.on('event', (event) => {
46379
46402
  if (event.code === 'BUNDLE_START') {
46380
- config.logger.info(picocolorsExports.cyan(`\nbuild started...`));
46403
+ config.logger.info(colors$1.cyan(`\nbuild started...`));
46381
46404
  if (options.write) {
46382
46405
  prepareOutDir(outDirs, options.emptyOutDir, config);
46383
46406
  }
46384
46407
  }
46385
46408
  else if (event.code === 'BUNDLE_END') {
46386
46409
  event.result.close();
46387
- config.logger.info(picocolorsExports.cyan(`built in ${event.duration}ms.`));
46410
+ config.logger.info(colors$1.cyan(`built in ${event.duration}ms.`));
46388
46411
  }
46389
46412
  else if (event.code === 'ERROR') {
46390
46413
  outputBuildError(event.error);
@@ -46421,7 +46444,7 @@ function prepareOutDir(outDirs, emptyOutDir, config) {
46421
46444
  if (fs$l.existsSync(outDir) &&
46422
46445
  !normalizePath$3(outDir).startsWith(config.root + '/')) {
46423
46446
  // warn if outDir is outside of root
46424
- config.logger.warn(picocolorsExports.yellow(`\n${picocolorsExports.bold(`(!)`)} outDir ${picocolorsExports.white(picocolorsExports.dim(outDir))} is not inside project root and will not be emptied.\n` +
46447
+ config.logger.warn(colors$1.yellow(`\n${colors$1.bold(`(!)`)} outDir ${colors$1.white(colors$1.dim(outDir))} is not inside project root and will not be emptied.\n` +
46425
46448
  `Use --emptyOutDir to override.\n`));
46426
46449
  outside = true;
46427
46450
  break;
@@ -46498,7 +46521,7 @@ function resolveBuildOutputs(outputs, libOptions, logger) {
46498
46521
  }
46499
46522
  // By this point, we know "outputs" is an Array.
46500
46523
  if (libOptions.formats) {
46501
- logger.warn(picocolorsExports.yellow('"build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format.'));
46524
+ logger.warn(colors$1.yellow('"build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format.'));
46502
46525
  }
46503
46526
  outputs.forEach((output) => {
46504
46527
  if (['umd', 'iife'].includes(output.format) && !output.name) {
@@ -46534,7 +46557,7 @@ function onRollupWarning(warning, warn, config) {
46534
46557
  return;
46535
46558
  }
46536
46559
  if (warning.code === 'PLUGIN_WARNING') {
46537
- config.logger.warn(`${picocolorsExports.bold(picocolorsExports.yellow(`[plugin:${warning.plugin}]`))} ${picocolorsExports.yellow(warning.message)}`);
46560
+ config.logger.warn(`${colors$1.bold(colors$1.yellow(`[plugin:${warning.plugin}]`))} ${colors$1.yellow(warning.message)}`);
46538
46561
  return;
46539
46562
  }
46540
46563
  warn(warning);
@@ -46778,23 +46801,11 @@ var build$1 = {
46778
46801
  toOutputFilePathWithoutRuntime: toOutputFilePathWithoutRuntime
46779
46802
  };
46780
46803
 
46781
- var srcExports = {};
46782
- var src = {
46783
- get exports(){ return srcExports; },
46784
- set exports(v){ srcExports = v; },
46785
- };
46804
+ var src = {exports: {}};
46786
46805
 
46787
- var browserExports = {};
46788
- var browser = {
46789
- get exports(){ return browserExports; },
46790
- set exports(v){ browserExports = v; },
46791
- };
46806
+ var browser = {exports: {}};
46792
46807
 
46793
- var debugExports = {};
46794
- var debug$6 = {
46795
- get exports(){ return debugExports; },
46796
- set exports(v){ debugExports = v; },
46797
- };
46808
+ var debug$6 = {exports: {}};
46798
46809
 
46799
46810
  /**
46800
46811
  * Helpers.
@@ -46960,7 +46971,7 @@ function requireMs () {
46960
46971
  var hasRequiredDebug;
46961
46972
 
46962
46973
  function requireDebug () {
46963
- if (hasRequiredDebug) return debugExports;
46974
+ if (hasRequiredDebug) return debug$6.exports;
46964
46975
  hasRequiredDebug = 1;
46965
46976
  (function (module, exports) {
46966
46977
  /**
@@ -47163,9 +47174,9 @@ function requireDebug () {
47163
47174
  function coerce(val) {
47164
47175
  if (val instanceof Error) return val.stack || val.message;
47165
47176
  return val;
47166
- }
47167
- } (debug$6, debugExports));
47168
- return debugExports;
47177
+ }
47178
+ } (debug$6, debug$6.exports));
47179
+ return debug$6.exports;
47169
47180
  }
47170
47181
 
47171
47182
  /**
@@ -47177,7 +47188,7 @@ function requireDebug () {
47177
47188
  var hasRequiredBrowser;
47178
47189
 
47179
47190
  function requireBrowser () {
47180
- if (hasRequiredBrowser) return browserExports;
47191
+ if (hasRequiredBrowser) return browser.exports;
47181
47192
  hasRequiredBrowser = 1;
47182
47193
  (function (module, exports) {
47183
47194
  exports = module.exports = requireDebug();
@@ -47358,16 +47369,12 @@ function requireBrowser () {
47358
47369
  try {
47359
47370
  return window.localStorage;
47360
47371
  } catch (e) {}
47361
- }
47362
- } (browser, browserExports));
47363
- return browserExports;
47372
+ }
47373
+ } (browser, browser.exports));
47374
+ return browser.exports;
47364
47375
  }
47365
47376
 
47366
- var nodeExports = {};
47367
- var node = {
47368
- get exports(){ return nodeExports; },
47369
- set exports(v){ nodeExports = v; },
47370
- };
47377
+ var node = {exports: {}};
47371
47378
 
47372
47379
  /**
47373
47380
  * Module dependencies.
@@ -47376,7 +47383,7 @@ var node = {
47376
47383
  var hasRequiredNode;
47377
47384
 
47378
47385
  function requireNode () {
47379
- if (hasRequiredNode) return nodeExports;
47386
+ if (hasRequiredNode) return node.exports;
47380
47387
  hasRequiredNode = 1;
47381
47388
  (function (module, exports) {
47382
47389
  var tty = require$$0$3;
@@ -47622,9 +47629,9 @@ function requireNode () {
47622
47629
  * Enable namespaces listed in `process.env.DEBUG` initially.
47623
47630
  */
47624
47631
 
47625
- exports.enable(load());
47626
- } (node, nodeExports));
47627
- return nodeExports;
47632
+ exports.enable(load());
47633
+ } (node, node.exports));
47634
+ return node.exports;
47628
47635
  }
47629
47636
 
47630
47637
  /**
@@ -47632,13 +47639,13 @@ function requireNode () {
47632
47639
  * treat as a browser.
47633
47640
  */
47634
47641
 
47635
- (function (module) {
47636
- if (typeof process !== 'undefined' && process.type === 'renderer') {
47637
- module.exports = requireBrowser();
47638
- } else {
47639
- module.exports = requireNode();
47640
- }
47641
- } (src));
47642
+ if (typeof process !== 'undefined' && process.type === 'renderer') {
47643
+ src.exports = requireBrowser();
47644
+ } else {
47645
+ src.exports = requireNode();
47646
+ }
47647
+
47648
+ var srcExports = src.exports;
47642
47649
 
47643
47650
  /*!
47644
47651
  * encodeurl
@@ -47699,11 +47706,7 @@ function encodeUrl$1 (url) {
47699
47706
  .replace(ENCODE_CHARS_REGEXP, encodeURI)
47700
47707
  }
47701
47708
 
47702
- var onFinishedExports = {};
47703
- var onFinished$2 = {
47704
- get exports(){ return onFinishedExports; },
47705
- set exports(v){ onFinishedExports = v; },
47706
- };
47709
+ var onFinished$2 = {exports: {}};
47707
47710
 
47708
47711
  /*!
47709
47712
  * ee-first
@@ -47812,7 +47815,7 @@ function listener(event, done) {
47812
47815
  */
47813
47816
 
47814
47817
  onFinished$2.exports = onFinished$1;
47815
- onFinishedExports.isFinished = isFinished$1;
47818
+ onFinished$2.exports.isFinished = isFinished$1;
47816
47819
 
47817
47820
  /**
47818
47821
  * Module dependencies.
@@ -47994,11 +47997,9 @@ function patchAssignSocket(res, callback) {
47994
47997
  };
47995
47998
  }
47996
47999
 
47997
- var parseurlExports = {};
47998
- var parseurl$1 = {
47999
- get exports(){ return parseurlExports; },
48000
- set exports(v){ parseurlExports = v; },
48001
- };
48000
+ var onFinishedExports = onFinished$2.exports;
48001
+
48002
+ var parseurl$1 = {exports: {}};
48002
48003
 
48003
48004
  /*!
48004
48005
  * parseurl
@@ -48022,7 +48023,7 @@ var Url = url$3.Url;
48022
48023
  */
48023
48024
 
48024
48025
  parseurl$1.exports = parseurl;
48025
- parseurlExports.original = originalurl;
48026
+ parseurl$1.exports.original = originalurl;
48026
48027
 
48027
48028
  /**
48028
48029
  * Parse the `req` url with memoization.
@@ -48155,6 +48156,8 @@ function fresh (url, parsedUrl) {
48155
48156
  parsedUrl._raw === url
48156
48157
  }
48157
48158
 
48159
+ var parseurlExports = parseurl$1.exports;
48160
+
48158
48161
  var require$$0$1 = {
48159
48162
  "100": "Continue",
48160
48163
  "101": "Switching Protocols",
@@ -48732,11 +48735,7 @@ function setHeaders (res, headers) {
48732
48735
  }
48733
48736
  }
48734
48737
 
48735
- var utilsMergeExports = {};
48736
- var utilsMerge = {
48737
- get exports(){ return utilsMergeExports; },
48738
- set exports(v){ utilsMergeExports = v; },
48739
- };
48738
+ var utilsMerge = {exports: {}};
48740
48739
 
48741
48740
  /**
48742
48741
  * Merge object b with object a.
@@ -48761,9 +48760,11 @@ var utilsMerge = {
48761
48760
  }
48762
48761
  }
48763
48762
  return a;
48764
- };
48763
+ };
48765
48764
  } (utilsMerge));
48766
48765
 
48766
+ var utilsMergeExports = utilsMerge.exports;
48767
+
48767
48768
  /*!
48768
48769
  * connect
48769
48770
  * Copyright(c) 2010 Sencha Inc.
@@ -49042,11 +49043,9 @@ function getProtohost(url) {
49042
49043
  : undefined;
49043
49044
  }
49044
49045
 
49045
- var libExports$1 = {};
49046
- var lib$1 = {
49047
- get exports(){ return libExports$1; },
49048
- set exports(v){ libExports$1 = v; },
49049
- };
49046
+ var connect$1 = /*@__PURE__*/getDefaultExportFromCjs(connect);
49047
+
49048
+ var lib$1 = {exports: {}};
49050
49049
 
49051
49050
  /*
49052
49051
  object-assign
@@ -49137,11 +49136,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
49137
49136
  return to;
49138
49137
  };
49139
49138
 
49140
- var varyExports = {};
49141
- var vary$1 = {
49142
- get exports(){ return varyExports; },
49143
- set exports(v){ varyExports = v; },
49144
- };
49139
+ var vary$1 = {exports: {}};
49145
49140
 
49146
49141
  /*!
49147
49142
  * vary
@@ -49154,7 +49149,7 @@ var vary$1 = {
49154
49149
  */
49155
49150
 
49156
49151
  vary$1.exports = vary;
49157
- varyExports.append = append;
49152
+ vary$1.exports.append = append;
49158
49153
 
49159
49154
  /**
49160
49155
  * RegExp to match field-name in RFC 7230 sec 3.2
@@ -49291,6 +49286,8 @@ function vary (res, field) {
49291
49286
  }
49292
49287
  }
49293
49288
 
49289
+ var varyExports = vary$1.exports;
49290
+
49294
49291
  (function () {
49295
49292
 
49296
49293
  var assign = objectAssign;
@@ -49528,13 +49525,16 @@ function vary (res, field) {
49528
49525
 
49529
49526
  }());
49530
49527
 
49528
+ var libExports$1 = lib$1.exports;
49529
+ var corsMiddleware = /*@__PURE__*/getDefaultExportFromCjs(libExports$1);
49530
+
49531
49531
  var chokidar = {};
49532
49532
 
49533
49533
  const fs$8 = require$$0__default;
49534
49534
  const { Readable } = require$$0$7;
49535
49535
  const sysPath$3 = require$$0$4;
49536
49536
  const { promisify: promisify$3 } = require$$0$6;
49537
- const picomatch$1 = picomatchExports;
49537
+ const picomatch$1 = picomatch$3;
49538
49538
 
49539
49539
  const readdir$1 = promisify$3(fs$8.readdir);
49540
49540
  const stat$3 = promisify$3(fs$8.stat);
@@ -49816,11 +49816,7 @@ readdirp$1.default = readdirp$1;
49816
49816
 
49817
49817
  var readdirp_1 = readdirp$1;
49818
49818
 
49819
- var anymatchExports = {};
49820
- var anymatch$2 = {
49821
- get exports(){ return anymatchExports; },
49822
- set exports(v){ anymatchExports = v; },
49823
- };
49819
+ var anymatch$2 = {exports: {}};
49824
49820
 
49825
49821
  /*!
49826
49822
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
@@ -49858,9 +49854,11 @@ var normalizePath$2 = function(path, stripTrailing) {
49858
49854
  return prefix + segs.join('/');
49859
49855
  };
49860
49856
 
49861
- Object.defineProperty(anymatchExports, "__esModule", { value: true });
49857
+ var anymatch_1 = anymatch$2.exports;
49858
+
49859
+ Object.defineProperty(anymatch_1, "__esModule", { value: true });
49862
49860
 
49863
- const picomatch = picomatchExports;
49861
+ const picomatch = picomatch$3;
49864
49862
  const normalizePath$1 = normalizePath$2;
49865
49863
 
49866
49864
  /**
@@ -49961,11 +49959,7 @@ const anymatch$1 = (matchers, testString, options = DEFAULT_OPTIONS) => {
49961
49959
  anymatch$1.default = anymatch$1;
49962
49960
  anymatch$2.exports = anymatch$1;
49963
49961
 
49964
- var binaryExtensionsExports = {};
49965
- var binaryExtensions$1 = {
49966
- get exports(){ return binaryExtensionsExports; },
49967
- set exports(v){ binaryExtensionsExports = v; },
49968
- };
49962
+ var anymatchExports = anymatch$2.exports;
49969
49963
 
49970
49964
  var require$$0 = [
49971
49965
  "3dm",
@@ -50228,12 +50222,10 @@ var require$$0 = [
50228
50222
  "zipx"
50229
50223
  ];
50230
50224
 
50231
- (function (module) {
50232
- module.exports = require$$0;
50233
- } (binaryExtensions$1));
50225
+ var binaryExtensions$1 = require$$0;
50234
50226
 
50235
50227
  const path$8 = require$$0$4;
50236
- const binaryExtensions = binaryExtensionsExports;
50228
+ const binaryExtensions = binaryExtensions$1;
50237
50229
 
50238
50230
  const extensions = new Set(binaryExtensions);
50239
50231
 
@@ -50305,7 +50297,7 @@ var constants$1 = {};
50305
50297
  exports.isWindows = platform === 'win32';
50306
50298
  exports.isMacos = platform === 'darwin';
50307
50299
  exports.isLinux = platform === 'linux';
50308
- exports.isIBMi = os.type() === 'OS400';
50300
+ exports.isIBMi = os.type() === 'OS400';
50309
50301
  } (constants$1));
50310
50302
 
50311
50303
  const fs$7 = require$$0__default;
@@ -50333,7 +50325,7 @@ const {
50333
50325
 
50334
50326
  const THROTTLE_MODE_WATCH = 'watch';
50335
50327
 
50336
- const open$1 = promisify$2(fs$7.open);
50328
+ const open$2 = promisify$2(fs$7.open);
50337
50329
  const stat$2 = promisify$2(fs$7.stat);
50338
50330
  const lstat$1 = promisify$2(fs$7.lstat);
50339
50331
  const close = promisify$2(fs$7.close);
@@ -50485,7 +50477,7 @@ const setFsWatchListener = (path, fullPath, options, handlers) => {
50485
50477
  // Workaround for https://github.com/joyent/node/issues/4337
50486
50478
  if (isWindows$2 && error.code === 'EPERM') {
50487
50479
  try {
50488
- const fd = await open$1(path, 'r');
50480
+ const fd = await open$2(path, 'r');
50489
50481
  await close(fd);
50490
50482
  broadcastErr(error);
50491
50483
  } catch (err) {}
@@ -50951,11 +50943,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
50951
50943
 
50952
50944
  var nodefsHandler = NodeFsHandler$1;
50953
50945
 
50954
- var fseventsHandlerExports = {};
50955
- var fseventsHandler = {
50956
- get exports(){ return fseventsHandlerExports; },
50957
- set exports(v){ fseventsHandlerExports = v; },
50958
- };
50946
+ var fseventsHandler = {exports: {}};
50959
50947
 
50960
50948
  const fs$6 = require$$0__default;
50961
50949
  const sysPath$1 = require$$0$4;
@@ -51479,7 +51467,9 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
51479
51467
  };
51480
51468
 
51481
51469
  fseventsHandler.exports = FsEventsHandler$1;
51482
- fseventsHandlerExports.canUse = canUse;
51470
+ fseventsHandler.exports.canUse = canUse;
51471
+
51472
+ var fseventsHandlerExports = fseventsHandler.exports;
51483
51473
 
51484
51474
  const { EventEmitter: EventEmitter$2 } = require$$0$5;
51485
51475
  const fs$5 = require$$0__default;
@@ -53088,6 +53078,8 @@ var launchEditorMiddleware = (specifiedEditor, srcRoot, onErrorCallback) => {
53088
53078
  }
53089
53079
  };
53090
53080
 
53081
+ var launchEditorMiddleware$1 = /*@__PURE__*/getDefaultExportFromCjs(launchEditorMiddleware);
53082
+
53091
53083
  async function resolveHttpServer({ proxy }, app, httpsOptions) {
53092
53084
  if (!httpsOptions) {
53093
53085
  const { createServer } = await import('node:http');
@@ -53161,7 +53153,7 @@ function setClientErrorHandler(server, logger) {
53161
53153
  let msg = '400 Bad Request';
53162
53154
  if (err.code === 'HPE_HEADER_OVERFLOW') {
53163
53155
  msg = '431 Request Header Fields Too Large';
53164
- logger.warn(picocolorsExports.yellow('Server responded with status code 431. ' +
53156
+ logger.warn(colors$1.yellow('Server responded with status code 431. ' +
53165
53157
  'See https://vitejs.dev/guide/troubleshooting.html#_431-request-header-fields-too-large.'));
53166
53158
  }
53167
53159
  if (err.code === 'ECONNRESET' || !socket.writable) {
@@ -53347,7 +53339,7 @@ async function loadAndTransform(id, url, server, options, timestamp) {
53347
53339
  if (transformResult == null ||
53348
53340
  (isObject$2(transformResult) && transformResult.code == null)) {
53349
53341
  // no transform applied, keep code as-is
53350
- debugTransform?.(timeFrom(transformStart) + picocolorsExports.dim(` [skipped] ${prettyUrl}`));
53342
+ debugTransform?.(timeFrom(transformStart) + colors$1.dim(` [skipped] ${prettyUrl}`));
53351
53343
  }
53352
53344
  else {
53353
53345
  debugTransform?.(`${timeFrom(transformStart)} ${prettyUrl}`);
@@ -53380,7 +53372,7 @@ async function loadAndTransform(id, url, server, options, timestamp) {
53380
53372
  : {
53381
53373
  code,
53382
53374
  map,
53383
- etag: etag_1(code, { weak: true }),
53375
+ etag: getEtag(code, { weak: true }),
53384
53376
  };
53385
53377
  // Only cache the result if the module wasn't invalidated while it was
53386
53378
  // being processed, so it is re-processed next time if it is stale
@@ -54357,7 +54349,7 @@ async function instantiateModule(url, server, context = { global }, urlStack = [
54357
54349
  if (e.stack && fixStacktrace) {
54358
54350
  ssrFixStacktrace(e, moduleGraph);
54359
54351
  }
54360
- server.config.logger.error(picocolorsExports.red(`Error when evaluating SSR module ${url}:` +
54352
+ server.config.logger.error(colors$1.red(`Error when evaluating SSR module ${url}:` +
54361
54353
  (errorData?.importee
54362
54354
  ? ` failed to import "${errorData.importee}"`
54363
54355
  : '') +
@@ -54427,10 +54419,10 @@ function bindShortcuts(server, opts) {
54427
54419
  }
54428
54420
  server._shortcutsOptions = opts;
54429
54421
  if (opts.print) {
54430
- server.config.logger.info(picocolorsExports.dim(picocolorsExports.green(' ➜')) +
54431
- picocolorsExports.dim(' press ') +
54432
- picocolorsExports.bold('h') +
54433
- picocolorsExports.dim(' to show help'));
54422
+ server.config.logger.info(colors$1.dim(colors$1.green(' ➜')) +
54423
+ colors$1.dim(' press ') +
54424
+ colors$1.bold('h') +
54425
+ colors$1.dim(' to show help'));
54434
54426
  }
54435
54427
  const shortcuts = (opts.customShortcuts ?? [])
54436
54428
  .filter(isDefined)
@@ -54447,10 +54439,10 @@ function bindShortcuts(server, opts) {
54447
54439
  if (input === 'h') {
54448
54440
  server.config.logger.info([
54449
54441
  '',
54450
- picocolorsExports.bold(' Shortcuts'),
54451
- ...shortcuts.map((shortcut) => picocolorsExports.dim(' press ') +
54452
- picocolorsExports.bold(shortcut.key) +
54453
- picocolorsExports.dim(` to ${shortcut.description}`)),
54442
+ colors$1.bold(' Shortcuts'),
54443
+ ...shortcuts.map((shortcut) => colors$1.dim(' press ') +
54444
+ colors$1.bold(shortcut.key) +
54445
+ colors$1.dim(` to ${shortcut.description}`)),
54454
54446
  ].join('\n'));
54455
54447
  }
54456
54448
  const shortcut = shortcuts.find((shortcut) => shortcut.key === input);
@@ -54505,11 +54497,7 @@ const BASE_SHORTCUTS = [
54505
54497
  },
54506
54498
  ];
54507
54499
 
54508
- var bufferUtilExports = {};
54509
- var bufferUtil$1 = {
54510
- get exports(){ return bufferUtilExports; },
54511
- set exports(v){ bufferUtilExports = v; },
54512
- };
54500
+ var bufferUtil$1 = {exports: {}};
54513
54501
 
54514
54502
  var constants = {
54515
54503
  BINARY_TYPES: ['nodebuffer', 'arraybuffer', 'fragments'],
@@ -54638,12 +54626,12 @@ if (!process.env.WS_NO_BUFFER_UTIL) {
54638
54626
  try {
54639
54627
  const bufferUtil = require('bufferutil');
54640
54628
 
54641
- bufferUtilExports.mask = function (source, mask, output, offset, length) {
54629
+ bufferUtil$1.exports.mask = function (source, mask, output, offset, length) {
54642
54630
  if (length < 48) _mask(source, mask, output, offset, length);
54643
54631
  else bufferUtil.mask(source, mask, output, offset, length);
54644
54632
  };
54645
54633
 
54646
- bufferUtilExports.unmask = function (buffer, mask) {
54634
+ bufferUtil$1.exports.unmask = function (buffer, mask) {
54647
54635
  if (buffer.length < 32) _unmask(buffer, mask);
54648
54636
  else bufferUtil.unmask(buffer, mask);
54649
54637
  };
@@ -54652,6 +54640,8 @@ if (!process.env.WS_NO_BUFFER_UTIL) {
54652
54640
  }
54653
54641
  }
54654
54642
 
54643
+ var bufferUtilExports = bufferUtil$1.exports;
54644
+
54655
54645
  const kDone = Symbol('kDone');
54656
54646
  const kRun = Symbol('kRun');
54657
54647
 
@@ -55219,11 +55209,7 @@ function inflateOnError(err) {
55219
55209
  this[kCallback](err);
55220
55210
  }
55221
55211
 
55222
- var validationExports = {};
55223
- var validation = {
55224
- get exports(){ return validationExports; },
55225
- set exports(v){ validationExports = v; },
55226
- };
55212
+ var validation = {exports: {}};
55227
55213
 
55228
55214
  const { isUtf8 } = require$$0$b;
55229
55215
 
@@ -55339,14 +55325,14 @@ validation.exports = {
55339
55325
  };
55340
55326
 
55341
55327
  if (isUtf8) {
55342
- validationExports.isValidUTF8 = function (buf) {
55328
+ validation.exports.isValidUTF8 = function (buf) {
55343
55329
  return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
55344
55330
  };
55345
55331
  } /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) {
55346
55332
  try {
55347
55333
  const isValidUTF8 = require('utf-8-validate');
55348
55334
 
55349
- validationExports.isValidUTF8 = function (buf) {
55335
+ validation.exports.isValidUTF8 = function (buf) {
55350
55336
  return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
55351
55337
  };
55352
55338
  } catch (e) {
@@ -55354,6 +55340,8 @@ if (isUtf8) {
55354
55340
  }
55355
55341
  }
55356
55342
 
55343
+ var validationExports = validation.exports;
55344
+
55357
55345
  const { Writable: Writable$1 } = require$$0$7;
55358
55346
 
55359
55347
  const PerMessageDeflate$3 = permessageDeflate;
@@ -58848,6 +58836,8 @@ function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
58848
58836
  }
58849
58837
  }
58850
58838
 
58839
+ var WebSocketServerRaw = /*@__PURE__*/getDefaultExportFromCjs(websocketServer);
58840
+
58851
58841
  const HMR_HEADER = 'vite-hmr';
58852
58842
  const wsServerEvents = [
58853
58843
  'connection',
@@ -58870,7 +58860,7 @@ function createWebSocketServer(server, config, httpsOptions) {
58870
58860
  const port = hmrPort || 24678;
58871
58861
  const host = (hmr && hmr.host) || undefined;
58872
58862
  if (wsServer) {
58873
- wss = new websocketServer({ noServer: true });
58863
+ wss = new WebSocketServerRaw({ noServer: true });
58874
58864
  wsServer.on('upgrade', (req, socket, head) => {
58875
58865
  if (req.headers['sec-websocket-protocol'] === HMR_HEADER) {
58876
58866
  wss.handleUpgrade(req, socket, head, (ws) => {
@@ -58901,7 +58891,7 @@ function createWebSocketServer(server, config, httpsOptions) {
58901
58891
  }
58902
58892
  // vite dev server in middleware mode
58903
58893
  // need to call ws listen manually
58904
- wss = new websocketServer({ server: wsHttpServer });
58894
+ wss = new WebSocketServerRaw({ server: wsHttpServer });
58905
58895
  }
58906
58896
  wss.on('connection', (socket) => {
58907
58897
  socket.on('message', (raw) => {
@@ -58921,7 +58911,7 @@ function createWebSocketServer(server, config, httpsOptions) {
58921
58911
  listeners.forEach((listener) => listener(parsed.data, client));
58922
58912
  });
58923
58913
  socket.on('error', (err) => {
58924
- config.logger.error(`${picocolorsExports.red(`ws error:`)}\n${err.stack}`, {
58914
+ config.logger.error(`${colors$1.red(`ws error:`)}\n${err.stack}`, {
58925
58915
  timestamp: true,
58926
58916
  error: err,
58927
58917
  });
@@ -58934,10 +58924,10 @@ function createWebSocketServer(server, config, httpsOptions) {
58934
58924
  });
58935
58925
  wss.on('error', (e) => {
58936
58926
  if (e.code === 'EADDRINUSE') {
58937
- config.logger.error(picocolorsExports.red(`WebSocket server error: Port is already in use`), { error: e });
58927
+ config.logger.error(colors$1.red(`WebSocket server error: Port is already in use`), { error: e });
58938
58928
  }
58939
58929
  else {
58940
- config.logger.error(picocolorsExports.red(`WebSocket server error:\n${e.stack || e.message}`), { error: e });
58930
+ config.logger.error(colors$1.red(`WebSocket server error:\n${e.stack || e.message}`), { error: e });
58941
58931
  }
58942
58932
  });
58943
58933
  // Provide a wrapper to the ws client so we can send messages in JSON format
@@ -59088,23 +59078,9 @@ function baseMiddleware({ config, }) {
59088
59078
  };
59089
59079
  }
59090
59080
 
59091
- var httpProxyExports$1 = {};
59092
- var httpProxy$3 = {
59093
- get exports(){ return httpProxyExports$1; },
59094
- set exports(v){ httpProxyExports$1 = v; },
59095
- };
59081
+ var httpProxy$3 = {exports: {}};
59096
59082
 
59097
- var httpProxyExports = {};
59098
- var httpProxy$2 = {
59099
- get exports(){ return httpProxyExports; },
59100
- set exports(v){ httpProxyExports = v; },
59101
- };
59102
-
59103
- var eventemitter3Exports = {};
59104
- var eventemitter3 = {
59105
- get exports(){ return eventemitter3Exports; },
59106
- set exports(v){ eventemitter3Exports = v; },
59107
- };
59083
+ var eventemitter3 = {exports: {}};
59108
59084
 
59109
59085
  (function (module) {
59110
59086
 
@@ -59441,9 +59417,11 @@ var eventemitter3 = {
59441
59417
  //
59442
59418
  {
59443
59419
  module.exports = EventEmitter;
59444
- }
59420
+ }
59445
59421
  } (eventemitter3));
59446
59422
 
59423
+ var eventemitter3Exports = eventemitter3.exports;
59424
+
59447
59425
  var common$3 = {};
59448
59426
 
59449
59427
  /**
@@ -59881,11 +59859,7 @@ var webOutgoing = { // <--
59881
59859
 
59882
59860
  };
59883
59861
 
59884
- var followRedirectsExports = {};
59885
- var followRedirects$1 = {
59886
- get exports(){ return followRedirectsExports; },
59887
- set exports(v){ followRedirectsExports = v; },
59888
- };
59862
+ var followRedirects$1 = {exports: {}};
59889
59863
 
59890
59864
  var debug$3;
59891
59865
 
@@ -60495,7 +60469,9 @@ function isSubdomain(subdomain, domain) {
60495
60469
 
60496
60470
  // Exports
60497
60471
  followRedirects$1.exports = wrap({ http: http$1, https: https$1 });
60498
- followRedirectsExports.wrap = wrap;
60472
+ followRedirects$1.exports.wrap = wrap;
60473
+
60474
+ var followRedirectsExports = followRedirects$1.exports;
60499
60475
 
60500
60476
  var httpNative = require$$1$1,
60501
60477
  httpsNative = require$$1$2,
@@ -61039,8 +61015,10 @@ var wsIncoming = {
61039
61015
  if(i === false) throw new Error('No such pass');
61040
61016
 
61041
61017
  passes.splice(i++, 0, callback);
61042
- };
61043
- } (httpProxy$2));
61018
+ };
61019
+ } (httpProxy$3));
61020
+
61021
+ var httpProxyExports = httpProxy$3.exports;
61044
61022
 
61045
61023
  // Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!)
61046
61024
  var ProxyServer = httpProxyExports.Server;
@@ -61106,7 +61084,7 @@ ProxyServer.createProxy = createProxyServer;
61106
61084
  /**
61107
61085
  * Export the proxy "Server" as the main export.
61108
61086
  */
61109
- var httpProxy$1 = ProxyServer;
61087
+ var httpProxy$2 = ProxyServer;
61110
61088
 
61111
61089
  /*!
61112
61090
  * Caron dimonio, con occhi di bragia
@@ -61120,11 +61098,9 @@ var httpProxy$1 = ProxyServer;
61120
61098
  * Dante - The Divine Comedy (Canto III)
61121
61099
  */
61122
61100
 
61123
- (function (module) {
61124
- module.exports = httpProxy$1;
61125
- } (httpProxy$3));
61101
+ var httpProxy = httpProxy$2;
61126
61102
 
61127
- var httpProxy = /*@__PURE__*/getDefaultExportFromCjs(httpProxyExports$1);
61103
+ var httpProxy$1 = /*@__PURE__*/getDefaultExportFromCjs(httpProxy);
61128
61104
 
61129
61105
  const debug$1 = createDebugger('vite:proxy');
61130
61106
  function proxyMiddleware(httpServer, options, config) {
@@ -61138,7 +61114,7 @@ function proxyMiddleware(httpServer, options, config) {
61138
61114
  if (typeof opts === 'string') {
61139
61115
  opts = { target: opts, changeOrigin: true };
61140
61116
  }
61141
- const proxy = httpProxy.createProxyServer(opts);
61117
+ const proxy = httpProxy$1.createProxyServer(opts);
61142
61118
  if (opts.configure) {
61143
61119
  opts.configure(proxy, opts);
61144
61120
  }
@@ -61146,7 +61122,7 @@ function proxyMiddleware(httpServer, options, config) {
61146
61122
  // When it is ws proxy, res is net.Socket
61147
61123
  const res = originalRes;
61148
61124
  if ('req' in res) {
61149
- config.logger.error(`${picocolorsExports.red(`http proxy error at ${originalRes.req.url}:`)}\n${err.stack}`, {
61125
+ config.logger.error(`${colors$1.red(`http proxy error at ${originalRes.req.url}:`)}\n${err.stack}`, {
61150
61126
  timestamp: true,
61151
61127
  error: err,
61152
61128
  });
@@ -61159,7 +61135,7 @@ function proxyMiddleware(httpServer, options, config) {
61159
61135
  }
61160
61136
  }
61161
61137
  else {
61162
- config.logger.error(`${picocolorsExports.red(`ws proxy error:`)}\n${err.stack}`, {
61138
+ config.logger.error(`${colors$1.red(`ws proxy error:`)}\n${err.stack}`, {
61163
61139
  timestamp: true,
61164
61140
  error: err,
61165
61141
  });
@@ -61225,11 +61201,7 @@ function doesProxyContextMatchUrl(context, url) {
61225
61201
  url.startsWith(context));
61226
61202
  }
61227
61203
 
61228
- var libExports = {};
61229
- var lib = {
61230
- get exports(){ return libExports; },
61231
- set exports(v){ libExports = v; },
61232
- };
61204
+ var lib = {exports: {}};
61233
61205
 
61234
61206
  (function (module, exports) {
61235
61207
 
@@ -61351,10 +61323,11 @@ var lib = {
61351
61323
  return console.log.bind(console);
61352
61324
  }
61353
61325
  return function(){};
61354
- }
61326
+ }
61355
61327
  } (lib));
61356
61328
 
61357
- var history = libExports;
61329
+ var libExports = lib.exports;
61330
+ var history = /*@__PURE__*/getDefaultExportFromCjs(libExports);
61358
61331
 
61359
61332
  function htmlFallbackMiddleware(root, spaFallback) {
61360
61333
  const historyHtmlFallbackMiddleware = history({
@@ -61458,14 +61431,14 @@ function transformMiddleware(server) {
61458
61431
  const rawUrl = removeImportQuery(url);
61459
61432
  warning =
61460
61433
  'Assets in public cannot be imported from JavaScript.\n' +
61461
- `Instead of ${picocolorsExports.cyan(rawUrl)}, put the file in the src directory, and use ${picocolorsExports.cyan(rawUrl.replace(publicPath, '/src/'))} instead.`;
61434
+ `Instead of ${colors$1.cyan(rawUrl)}, put the file in the src directory, and use ${colors$1.cyan(rawUrl.replace(publicPath, '/src/'))} instead.`;
61462
61435
  }
61463
61436
  else {
61464
61437
  warning =
61465
61438
  `files in the public directory are served at the root path.\n` +
61466
- `Instead of ${picocolorsExports.cyan(url)}, use ${picocolorsExports.cyan(url.replace(publicPath, '/'))}.`;
61439
+ `Instead of ${colors$1.cyan(url)}, use ${colors$1.cyan(url.replace(publicPath, '/'))}.`;
61467
61440
  }
61468
- logger.warn(picocolorsExports.yellow(warning));
61441
+ logger.warn(colors$1.yellow(warning));
61469
61442
  }
61470
61443
  }
61471
61444
  if (isJSRequest(url) ||
@@ -62049,11 +62022,7 @@ class ModuleGraph {
62049
62022
  }
62050
62023
  }
62051
62024
 
62052
- var isWslExports = {};
62053
- var isWsl$2 = {
62054
- get exports(){ return isWslExports; },
62055
- set exports(v){ isWslExports = v; },
62056
- };
62025
+ var isWsl$2 = {exports: {}};
62057
62026
 
62058
62027
  const fs$3 = require$$0__default;
62059
62028
 
@@ -62115,6 +62084,8 @@ if (process.env.__IS_WSL_TEST__) {
62115
62084
  isWsl$2.exports = isWsl$1();
62116
62085
  }
62117
62086
 
62087
+ var isWslExports = isWsl$2.exports;
62088
+
62118
62089
  var defineLazyProp = (object, propertyName, fn) => {
62119
62090
  const define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});
62120
62091
 
@@ -62469,11 +62440,9 @@ open.openApp = openApp;
62469
62440
 
62470
62441
  var open_1 = open;
62471
62442
 
62472
- var crossSpawnExports = {};
62473
- var crossSpawn = {
62474
- get exports(){ return crossSpawnExports; },
62475
- set exports(v){ crossSpawnExports = v; },
62476
- };
62443
+ var open$1 = /*@__PURE__*/getDefaultExportFromCjs(open_1);
62444
+
62445
+ var crossSpawn = {exports: {}};
62477
62446
 
62478
62447
  var windows;
62479
62448
  var hasRequiredWindows;
@@ -62759,11 +62728,7 @@ const whichSync = (cmd, opt) => {
62759
62728
  var which_1 = which$1;
62760
62729
  which$1.sync = whichSync;
62761
62730
 
62762
- var pathKeyExports = {};
62763
- var pathKey$1 = {
62764
- get exports(){ return pathKeyExports; },
62765
- set exports(v){ pathKeyExports = v; },
62766
- };
62731
+ var pathKey$1 = {exports: {}};
62767
62732
 
62768
62733
  const pathKey = (options = {}) => {
62769
62734
  const environment = options.env || process.env;
@@ -62778,7 +62743,9 @@ const pathKey = (options = {}) => {
62778
62743
 
62779
62744
  pathKey$1.exports = pathKey;
62780
62745
  // TODO: Remove this for the next major release
62781
- pathKeyExports.default = pathKey;
62746
+ pathKey$1.exports.default = pathKey;
62747
+
62748
+ var pathKeyExports = pathKey$1.exports;
62782
62749
 
62783
62750
  const path$1 = require$$0$4;
62784
62751
  const which = which_1;
@@ -63100,11 +63067,14 @@ function spawnSync(command, args, options) {
63100
63067
  }
63101
63068
 
63102
63069
  crossSpawn.exports = spawn;
63103
- crossSpawnExports.spawn = spawn;
63104
- crossSpawnExports.sync = spawnSync;
63070
+ crossSpawn.exports.spawn = spawn;
63071
+ crossSpawn.exports.sync = spawnSync;
63072
+
63073
+ crossSpawn.exports._parse = parse;
63074
+ crossSpawn.exports._enoent = enoent;
63105
63075
 
63106
- crossSpawnExports._parse = parse;
63107
- crossSpawnExports._enoent = enoent;
63076
+ var crossSpawnExports = crossSpawn.exports;
63077
+ var spawn$1 = /*@__PURE__*/getDefaultExportFromCjs(crossSpawnExports);
63108
63078
 
63109
63079
  /**
63110
63080
  * The following is modified based on source found in
@@ -63134,12 +63104,12 @@ function openBrowser(url, opt, logger) {
63134
63104
  }
63135
63105
  function executeNodeScript(scriptPath, url, logger) {
63136
63106
  const extraArgs = process.argv.slice(2);
63137
- const child = crossSpawnExports(process.execPath, [scriptPath, ...extraArgs, url], {
63107
+ const child = spawn$1(process.execPath, [scriptPath, ...extraArgs, url], {
63138
63108
  stdio: 'inherit',
63139
63109
  });
63140
63110
  child.on('close', (code) => {
63141
63111
  if (code !== 0) {
63142
- logger.error(picocolorsExports.red(`\nThe script specified as BROWSER environment variable failed.\n\n${picocolorsExports.cyan(scriptPath)} exited with code ${code}.`), { error: null });
63112
+ logger.error(colors$1.red(`\nThe script specified as BROWSER environment variable failed.\n\n${colors$1.cyan(scriptPath)} exited with code ${code}.`), { error: null });
63143
63113
  }
63144
63114
  });
63145
63115
  }
@@ -63193,7 +63163,7 @@ async function startBrowserProcess(browser, browserArgs, url) {
63193
63163
  const options = browser
63194
63164
  ? { app: { name: browser, arguments: browserArgs } }
63195
63165
  : {};
63196
- open_1(url, options).catch(() => { }); // Prevent `unhandledRejection` error.
63166
+ open$1(url, options).catch(() => { }); // Prevent `unhandledRejection` error.
63197
63167
  return true;
63198
63168
  }
63199
63169
  catch (err) {
@@ -63225,7 +63195,7 @@ async function _createServer(inlineConfig = {}, options) {
63225
63195
  disableGlobbing: true,
63226
63196
  ...serverConfig.watch,
63227
63197
  });
63228
- const middlewares = connect();
63198
+ const middlewares = connect$1();
63229
63199
  const httpServer = middlewareMode
63230
63200
  ? null
63231
63201
  : await resolveHttpServer(serverConfig, middlewares, httpsOptions);
@@ -63339,7 +63309,7 @@ async function _createServer(inlineConfig = {}, options) {
63339
63309
  _importGlobMap: new Map(),
63340
63310
  _forceOptimizeOnRestart: false,
63341
63311
  _pendingRequests: new Map(),
63342
- _fsDenyGlob: picomatch$3(config.server.fs.deny, { matchBase: true }),
63312
+ _fsDenyGlob: picomatch$4(config.server.fs.deny, { matchBase: true }),
63343
63313
  _shortcutsOptions: undefined,
63344
63314
  };
63345
63315
  server.transformIndexHtml = createDevHtmlTransformFn(server);
@@ -63386,8 +63356,8 @@ async function _createServer(inlineConfig = {}, options) {
63386
63356
  ws.on('vite:invalidate', async ({ path, message }) => {
63387
63357
  const mod = moduleGraph.urlToModuleMap.get(path);
63388
63358
  if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0) {
63389
- config.logger.info(picocolorsExports.yellow(`hmr invalidate `) +
63390
- picocolorsExports.dim(path) +
63359
+ config.logger.info(colors$1.yellow(`hmr invalidate `) +
63360
+ colors$1.dim(path) +
63391
63361
  (message ? ` ${message}` : ''), { timestamp: true });
63392
63362
  const file = getShortName(mod.file, config.root);
63393
63363
  updateModules(file, [...mod.importers], mod.lastHMRTimestamp, server, true);
@@ -63412,7 +63382,7 @@ async function _createServer(inlineConfig = {}, options) {
63412
63382
  // cors (enabled by default)
63413
63383
  const { cors } = serverConfig;
63414
63384
  if (cors !== false) {
63415
- middlewares.use(libExports$1(typeof cors === 'boolean' ? {} : cors));
63385
+ middlewares.use(corsMiddleware(typeof cors === 'boolean' ? {} : cors));
63416
63386
  }
63417
63387
  // proxy
63418
63388
  const { proxy } = serverConfig;
@@ -63424,7 +63394,7 @@ async function _createServer(inlineConfig = {}, options) {
63424
63394
  middlewares.use(baseMiddleware(server));
63425
63395
  }
63426
63396
  // open in editor support
63427
- middlewares.use('/__open-in-editor', launchEditorMiddleware());
63397
+ middlewares.use('/__open-in-editor', launchEditorMiddleware$1());
63428
63398
  // serve static files under /public
63429
63399
  // this applies before the transform middleware so that these files are served
63430
63400
  // as-is without transforms.
@@ -63576,7 +63546,7 @@ function resolveServerOptions(root, raw, logger) {
63576
63546
  };
63577
63547
  if (server.origin?.endsWith('/')) {
63578
63548
  server.origin = server.origin.slice(0, -1);
63579
- logger.warn(picocolorsExports.yellow(`${picocolorsExports.bold('(!)')} server.origin should not end with "/". Using "${server.origin}" instead.`));
63549
+ logger.warn(colors$1.yellow(`${colors$1.bold('(!)')} server.origin should not end with "/". Using "${server.origin}" instead.`));
63580
63550
  }
63581
63551
  return server;
63582
63552
  }
@@ -63792,7 +63762,7 @@ async function preview(inlineConfig = {}) {
63792
63762
  process.argv[2] === 'preview') {
63793
63763
  throw new Error(`The directory "${config.build.outDir}" does not exist. Did you build your project?`);
63794
63764
  }
63795
- const app = connect();
63765
+ const app = connect$1();
63796
63766
  const httpServer = await resolveHttpServer(config.preview, app, await resolveHttpsConfig(config.preview?.https));
63797
63767
  setClientErrorHandler(httpServer, config.logger);
63798
63768
  const options = config.preview;
@@ -63819,7 +63789,7 @@ async function preview(inlineConfig = {}) {
63819
63789
  // cors
63820
63790
  const { cors } = config.preview;
63821
63791
  if (cors !== false) {
63822
- app.use(libExports$1(typeof cors === 'boolean' ? {} : cors));
63792
+ app.use(corsMiddleware(typeof cors === 'boolean' ? {} : cors));
63823
63793
  }
63824
63794
  // proxy
63825
63795
  const { proxy } = config.preview;
@@ -63903,6 +63873,7 @@ function resolveSSROptions(ssr, preserveSymlinks, buildSsrCjsExternalHeuristics)
63903
63873
  }
63904
63874
 
63905
63875
  const debug = createDebugger('vite:config');
63876
+ const promisifiedRealpath = promisify$4(fs$l.realpath);
63906
63877
  /**
63907
63878
  * Type helper to make it easier to use vite.config.ts
63908
63879
  * accepts a direct {@link UserConfig} object, or a function that returns it.
@@ -64197,16 +64168,16 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
64197
64168
  ]);
64198
64169
  // validate config
64199
64170
  if (middlewareMode === 'ssr') {
64200
- logger.warn(picocolorsExports.yellow(`Setting server.middlewareMode to 'ssr' is deprecated, set server.middlewareMode to \`true\`${config.appType === 'custom' ? '' : ` and appType to 'custom'`} instead`));
64171
+ logger.warn(colors$1.yellow(`Setting server.middlewareMode to 'ssr' is deprecated, set server.middlewareMode to \`true\`${config.appType === 'custom' ? '' : ` and appType to 'custom'`} instead`));
64201
64172
  }
64202
64173
  if (middlewareMode === 'html') {
64203
- logger.warn(picocolorsExports.yellow(`Setting server.middlewareMode to 'html' is deprecated, set server.middlewareMode to \`true\` instead`));
64174
+ logger.warn(colors$1.yellow(`Setting server.middlewareMode to 'html' is deprecated, set server.middlewareMode to \`true\` instead`));
64204
64175
  }
64205
64176
  if (config.server?.force &&
64206
64177
  !isBuild &&
64207
64178
  config.optimizeDeps?.force === undefined) {
64208
64179
  resolved.optimizeDeps.force = true;
64209
- logger.warn(picocolorsExports.yellow(`server.force is deprecated, use optimizeDeps.force instead`));
64180
+ logger.warn(colors$1.yellow(`server.force is deprecated, use optimizeDeps.force instead`));
64210
64181
  }
64211
64182
  debug?.(`using resolved config: %O`, {
64212
64183
  ...resolved,
@@ -64217,7 +64188,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
64217
64188
  },
64218
64189
  });
64219
64190
  if (config.build?.terserOptions && config.build.minify !== 'terser') {
64220
- logger.warn(picocolorsExports.yellow(`build.terserOptions is specified but build.minify is not set to use Terser. ` +
64191
+ logger.warn(colors$1.yellow(`build.terserOptions is specified but build.minify is not set to use Terser. ` +
64221
64192
  `Note Vite now defaults to use esbuild for minification. If you still ` +
64222
64193
  `prefer Terser, set build.minify to "terser".`));
64223
64194
  }
@@ -64231,7 +64202,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
64231
64202
  const firstAssetFileNames = assetFileNamesList[0];
64232
64203
  const hasDifferentReference = assetFileNamesList.some((assetFileNames) => assetFileNames !== firstAssetFileNames);
64233
64204
  if (hasDifferentReference) {
64234
- resolved.logger.warn(picocolorsExports.yellow(`
64205
+ resolved.logger.warn(colors$1.yellow(`
64235
64206
  assetFileNames isn't equal for every build.rollupOptions.output. A single pattern across all outputs is supported by Vite.
64236
64207
  `));
64237
64208
  }
@@ -64245,7 +64216,7 @@ assetFileNames isn't equal for every build.rollupOptions.output. A single patter
64245
64216
  */
64246
64217
  function resolveBaseUrl(base = '/', isBuild, logger) {
64247
64218
  if (base[0] === '.') {
64248
- logger.warn(picocolorsExports.yellow(picocolorsExports.bold(`(!) invalid "base" option: ${base}. The value can only be an absolute ` +
64219
+ logger.warn(colors$1.yellow(colors$1.bold(`(!) invalid "base" option: ${base}. The value can only be an absolute ` +
64249
64220
  `URL, ./, or an empty string.`)));
64250
64221
  return '/';
64251
64222
  }
@@ -64253,7 +64224,7 @@ function resolveBaseUrl(base = '/', isBuild, logger) {
64253
64224
  const isExternal = isExternalUrl(base);
64254
64225
  // no leading slash warn
64255
64226
  if (!isExternal && base[0] !== '/') {
64256
- logger.warn(picocolorsExports.yellow(picocolorsExports.bold(`(!) "base" option should start with a slash.`)));
64227
+ logger.warn(colors$1.yellow(colors$1.bold(`(!) "base" option should start with a slash.`)));
64257
64228
  }
64258
64229
  // parse base when command is serve or base is not External URL
64259
64230
  if (!isBuild || !isExternal) {
@@ -64337,7 +64308,7 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
64337
64308
  };
64338
64309
  }
64339
64310
  catch (e) {
64340
- createLogger(logLevel).error(picocolorsExports.red(`failed to load config from ${resolvedPath}`), { error: e });
64311
+ createLogger(logLevel).error(colors$1.red(`failed to load config from ${resolvedPath}`), { error: e });
64341
64312
  throw e;
64342
64313
  }
64343
64314
  }
@@ -64449,7 +64420,11 @@ async function loadConfigFromBundledFile(fileName, bundledCode, isESM) {
64449
64420
  // for cjs, we can register a custom loader via `_require.extensions`
64450
64421
  else {
64451
64422
  const extension = path$o.extname(fileName);
64452
- const realFileName = await fsp.realpath(fileName);
64423
+ // We don't use fsp.realpath() here because it has the same behaviour as
64424
+ // fs.realpath.native. On some Windows systems, it returns uppercase volume
64425
+ // letters (e.g. "C:\") while the Node.js loader uses lowercase volume letters.
64426
+ // See https://github.com/vitejs/vite/issues/12923
64427
+ const realFileName = await promisifiedRealpath(fileName);
64453
64428
  const loaderExt = extension in _require.extensions ? extension : '.js';
64454
64429
  const defaultLoader = _require.extensions[loaderExt];
64455
64430
  _require.extensions[loaderExt] = (module, filename) => {
@@ -64492,4 +64467,4 @@ function isDepsOptimizerEnabled(config, ssr) {
64492
64467
  (command === 'serve' && disabled === 'dev'));
64493
64468
  }
64494
64469
 
64495
- export { loadEnv as A, resolveEnvPrefix as B, picocolorsExports as C, bindShortcuts as D, commonjsGlobal as E, index$1 as F, build$1 as G, index as H, preview$1 as I, preprocessCSS as a, build as b, createServer as c, resolvePackageData as d, buildErrorMessage as e, formatPostcssSourceMap as f, defineConfig as g, resolveConfig as h, isInNodeModules as i, resolveBaseUrl as j, getDepOptimizationConfig as k, loadConfigFromFile as l, isDepsOptimizerEnabled as m, normalizePath$3 as n, optimizeDeps as o, preview as p, mergeConfig as q, resolvePackageEntry as r, sortUserPlugins as s, transformWithEsbuild as t, mergeAlias as u, createFilter as v, send$2 as w, createLogger as x, searchForWorkspaceRoot as y, isFileServingAllowed as z };
64470
+ export { loadEnv as A, resolveEnvPrefix as B, colors$1 as C, bindShortcuts as D, getDefaultExportFromCjs as E, commonjsGlobal as F, index$1 as G, build$1 as H, index as I, preview$1 as J, preprocessCSS as a, build as b, createServer as c, resolvePackageData as d, buildErrorMessage as e, formatPostcssSourceMap as f, defineConfig as g, resolveConfig as h, isInNodeModules as i, resolveBaseUrl as j, getDepOptimizationConfig as k, loadConfigFromFile as l, isDepsOptimizerEnabled as m, normalizePath$3 as n, optimizeDeps as o, preview as p, mergeConfig as q, resolvePackageEntry as r, sortUserPlugins as s, transformWithEsbuild as t, mergeAlias as u, createFilter as v, send$2 as w, createLogger as x, searchForWorkspaceRoot as y, isFileServingAllowed as z };