vite 7.1.1 → 7.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

@@ -1,6 +1,6 @@
1
- import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
2
- import { __commonJS, __toDynamicImportESM, __toESM } from "./dep-Drtntmtt.js";
3
- import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts } from "./dep-BDCsDwBr.js";
1
+ import { __commonJS, __require, __toDynamicImportESM, __toESM } from "./dep-lCKrEJQm.js";
2
+ import { LogLevels, createLogger, printServerUrls, require_picocolors } from "./dep-D5MCzjWT.js";
3
+ import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts } from "./dep-CcFMbzqu.js";
4
4
  import { builtinModules, createRequire } from "node:module";
5
5
  import { parseAst, parseAstAsync } from "rollup/parseAst";
6
6
  import * as fs$1 from "node:fs";
@@ -36,75 +36,6 @@ import { ESModulesEvaluator, ModuleRunner, createNodeImportMeta } from "vite/mod
36
36
  import zlib from "zlib";
37
37
  import * as qs from "node:querystring";
38
38
 
39
- //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
40
- var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
41
- let p = process || {}, argv = p.argv || [], env$1 = p.env || {};
42
- let isColorSupported = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
43
- let formatter = (open$2, close$1, replace = open$2) => (input) => {
44
- let string = "" + input, index = string.indexOf(close$1, open$2.length);
45
- return ~index ? open$2 + replaceClose(string, close$1, replace, index) + close$1 : open$2 + string + close$1;
46
- };
47
- let replaceClose = (string, close$1, replace, index) => {
48
- let result = "", cursor = 0;
49
- do {
50
- result += string.substring(cursor, index) + replace;
51
- cursor = index + close$1.length;
52
- index = string.indexOf(close$1, cursor);
53
- } while (~index);
54
- return result + string.substring(cursor);
55
- };
56
- let createColors = (enabled$1 = isColorSupported) => {
57
- let f$1 = enabled$1 ? formatter : () => String;
58
- return {
59
- isColorSupported: enabled$1,
60
- reset: f$1("\x1B[0m", "\x1B[0m"),
61
- bold: f$1("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
62
- dim: f$1("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
63
- italic: f$1("\x1B[3m", "\x1B[23m"),
64
- underline: f$1("\x1B[4m", "\x1B[24m"),
65
- inverse: f$1("\x1B[7m", "\x1B[27m"),
66
- hidden: f$1("\x1B[8m", "\x1B[28m"),
67
- strikethrough: f$1("\x1B[9m", "\x1B[29m"),
68
- black: f$1("\x1B[30m", "\x1B[39m"),
69
- red: f$1("\x1B[31m", "\x1B[39m"),
70
- green: f$1("\x1B[32m", "\x1B[39m"),
71
- yellow: f$1("\x1B[33m", "\x1B[39m"),
72
- blue: f$1("\x1B[34m", "\x1B[39m"),
73
- magenta: f$1("\x1B[35m", "\x1B[39m"),
74
- cyan: f$1("\x1B[36m", "\x1B[39m"),
75
- white: f$1("\x1B[37m", "\x1B[39m"),
76
- gray: f$1("\x1B[90m", "\x1B[39m"),
77
- bgBlack: f$1("\x1B[40m", "\x1B[49m"),
78
- bgRed: f$1("\x1B[41m", "\x1B[49m"),
79
- bgGreen: f$1("\x1B[42m", "\x1B[49m"),
80
- bgYellow: f$1("\x1B[43m", "\x1B[49m"),
81
- bgBlue: f$1("\x1B[44m", "\x1B[49m"),
82
- bgMagenta: f$1("\x1B[45m", "\x1B[49m"),
83
- bgCyan: f$1("\x1B[46m", "\x1B[49m"),
84
- bgWhite: f$1("\x1B[47m", "\x1B[49m"),
85
- blackBright: f$1("\x1B[90m", "\x1B[39m"),
86
- redBright: f$1("\x1B[91m", "\x1B[39m"),
87
- greenBright: f$1("\x1B[92m", "\x1B[39m"),
88
- yellowBright: f$1("\x1B[93m", "\x1B[39m"),
89
- blueBright: f$1("\x1B[94m", "\x1B[39m"),
90
- magentaBright: f$1("\x1B[95m", "\x1B[39m"),
91
- cyanBright: f$1("\x1B[96m", "\x1B[39m"),
92
- whiteBright: f$1("\x1B[97m", "\x1B[39m"),
93
- bgBlackBright: f$1("\x1B[100m", "\x1B[49m"),
94
- bgRedBright: f$1("\x1B[101m", "\x1B[49m"),
95
- bgGreenBright: f$1("\x1B[102m", "\x1B[49m"),
96
- bgYellowBright: f$1("\x1B[103m", "\x1B[49m"),
97
- bgBlueBright: f$1("\x1B[104m", "\x1B[49m"),
98
- bgMagentaBright: f$1("\x1B[105m", "\x1B[49m"),
99
- bgCyanBright: f$1("\x1B[106m", "\x1B[49m"),
100
- bgWhiteBright: f$1("\x1B[107m", "\x1B[49m")
101
- };
102
- };
103
- module.exports = createColors();
104
- module.exports.createColors = createColors;
105
- }) });
106
-
107
- //#endregion
108
39
  //#region src/shared/constants.ts
109
40
  /**
110
41
  * Prefix for resolved Ids that are not valid browser import specifiers
@@ -145,8 +76,8 @@ function unwrapId(id) {
145
76
  return id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, "\0") : id;
146
77
  }
147
78
  const windowsSlashRE = /\\/g;
148
- function slash(p$1) {
149
- return p$1.replace(windowsSlashRE, "/");
79
+ function slash(p) {
80
+ return p.replace(windowsSlashRE, "/");
150
81
  }
151
82
  const postfixRE = /[?#].*$/;
152
83
  function cleanUrl(url$3) {
@@ -512,7 +443,7 @@ function resolve$3(input, base) {
512
443
  }
513
444
 
514
445
  //#endregion
515
- //#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.29/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
446
+ //#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.30/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
516
447
  function stripFilename(path$13) {
517
448
  if (!path$13) return "";
518
449
  const index = path$13.lastIndexOf("/");
@@ -632,22 +563,22 @@ var TraceMap = class {
632
563
  this._bySourceMemos = void 0;
633
564
  }
634
565
  };
635
- function cast$2(map$1) {
566
+ function cast$1(map$1) {
636
567
  return map$1;
637
568
  }
638
569
  function encodedMappings(map$1) {
639
570
  var _a, _b;
640
- return (_b = (_a = cast$2(map$1))._encoded) != null ? _b : _a._encoded = encode$1(cast$2(map$1)._decoded);
571
+ return (_b = (_a = cast$1(map$1))._encoded) != null ? _b : _a._encoded = encode$1(cast$1(map$1)._decoded);
641
572
  }
642
573
  function decodedMappings(map$1) {
643
574
  var _a;
644
- return (_a = cast$2(map$1))._decoded || (_a._decoded = decode(cast$2(map$1)._encoded));
575
+ return (_a = cast$1(map$1))._decoded || (_a._decoded = decode(cast$1(map$1)._encoded));
645
576
  }
646
577
  function traceSegment(map$1, line, column) {
647
578
  const decoded = decodedMappings(map$1);
648
579
  if (line >= decoded.length) return null;
649
580
  const segments = decoded[line];
650
- const index = traceSegmentInternal(segments, cast$2(map$1)._decodedMemo, line, column, GREATEST_LOWER_BOUND);
581
+ const index = traceSegmentInternal(segments, cast$1(map$1)._decodedMemo, line, column, GREATEST_LOWER_BOUND);
651
582
  return index === -1 ? null : segments[index];
652
583
  }
653
584
  function originalPositionFor(map$1, needle) {
@@ -658,7 +589,7 @@ function originalPositionFor(map$1, needle) {
658
589
  const decoded = decodedMappings(map$1);
659
590
  if (line >= decoded.length) return OMapping(null, null, null, null);
660
591
  const segments = decoded[line];
661
- const index = traceSegmentInternal(segments, cast$2(map$1)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
592
+ const index = traceSegmentInternal(segments, cast$1(map$1)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
662
593
  if (index === -1) return OMapping(null, null, null, null);
663
594
  const segment = segments[index];
664
595
  if (segment.length === 1) return OMapping(null, null, null, null);
@@ -700,52 +631,30 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
700
631
  }
701
632
 
702
633
  //#endregion
703
- //#region ../../node_modules/.pnpm/@jridgewell+set-array@1.2.1/node_modules/@jridgewell/set-array/dist/set-array.mjs
704
- /**
705
- * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
706
- * index of the `key` in the backing array.
707
- *
708
- * This is designed to allow synchronizing a second array with the contents of the backing array,
709
- * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
710
- * and there are never duplicates.
711
- */
634
+ //#region ../../node_modules/.pnpm/@jridgewell+gen-mapping@0.3.12/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
712
635
  var SetArray = class {
713
636
  constructor() {
714
637
  this._indexes = { __proto__: null };
715
638
  this.array = [];
716
639
  }
717
640
  };
718
- /**
719
- * Typescript doesn't allow friend access to private fields, so this just casts the set into a type
720
- * with public access modifiers.
721
- */
722
- function cast$1(set) {
641
+ function cast(set) {
723
642
  return set;
724
643
  }
725
- /**
726
- * Gets the index associated with `key` in the backing array, if it is already present.
727
- */
728
644
  function get$2(setarr, key) {
729
- return cast$1(setarr)._indexes[key];
645
+ return cast(setarr)._indexes[key];
730
646
  }
731
- /**
732
- * Puts `key` into the backing array, if it is not already present. Returns
733
- * the index of the `key` in the backing array.
734
- */
735
647
  function put(setarr, key) {
736
648
  const index = get$2(setarr, key);
737
649
  if (index !== void 0) return index;
738
- const { array, _indexes: indexes } = cast$1(setarr);
650
+ const { array, _indexes: indexes } = cast(setarr);
739
651
  const length = array.push(key);
740
652
  return indexes[key] = length - 1;
741
653
  }
742
- /**
743
- * Removes the key, if it exists in the set.
744
- */
745
654
  function remove(setarr, key) {
746
655
  const index = get$2(setarr, key);
747
656
  if (index === void 0) return;
748
- const { array, _indexes: indexes } = cast$1(setarr);
657
+ const { array, _indexes: indexes } = cast(setarr);
749
658
  for (let i$1 = index + 1; i$1 < array.length; i$1++) {
750
659
  const k = array[i$1];
751
660
  array[i$1 - 1] = k;
@@ -754,18 +663,12 @@ function remove(setarr, key) {
754
663
  indexes[key] = void 0;
755
664
  array.pop();
756
665
  }
757
-
758
- //#endregion
759
- //#region ../../node_modules/.pnpm/@jridgewell+gen-mapping@0.3.8/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
760
- const COLUMN = 0;
761
- const SOURCES_INDEX = 1;
762
- const SOURCE_LINE = 2;
763
- const SOURCE_COLUMN = 3;
764
- const NAMES_INDEX = 4;
765
- const NO_NAME = -1;
766
- /**
767
- * Provides the state to generate a sourcemap.
768
- */
666
+ var COLUMN = 0;
667
+ var SOURCES_INDEX = 1;
668
+ var SOURCE_LINE = 2;
669
+ var SOURCE_COLUMN = 3;
670
+ var NAMES_INDEX = 4;
671
+ var NO_NAME = -1;
769
672
  var GenMapping = class {
770
673
  constructor({ file, sourceRoot } = {}) {
771
674
  this._names = new SetArray();
@@ -777,42 +680,26 @@ var GenMapping = class {
777
680
  this._ignoreList = new SetArray();
778
681
  }
779
682
  };
780
- /**
781
- * Typescript doesn't allow friend access to private fields, so this just casts the map into a type
782
- * with public access modifiers.
783
- */
784
- function cast(map$1) {
683
+ function cast2(map$1) {
785
684
  return map$1;
786
685
  }
787
- /**
788
- * Same as `addSegment`, but will only add the segment if it generates useful information in the
789
- * resulting map. This only works correctly if segments are added **in order**, meaning you should
790
- * not add a segment with a lower generated line/column than one that came before.
791
- */
792
- const maybeAddSegment = (map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
686
+ var maybeAddSegment = (map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
793
687
  return addSegmentInternal(true, map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content);
794
688
  };
795
- /**
796
- * Adds/removes the content of the source file to the source map.
797
- */
798
689
  function setSourceContent(map$1, source, content) {
799
- const { _sources: sources, _sourcesContent: sourcesContent } = cast(map$1);
690
+ const { _sources: sources, _sourcesContent: sourcesContent } = cast2(map$1);
800
691
  const index = put(sources, source);
801
692
  sourcesContent[index] = content;
802
693
  }
803
694
  function setIgnore(map$1, source, ignore = true) {
804
- const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map$1);
695
+ const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast2(map$1);
805
696
  const index = put(sources, source);
806
697
  if (index === sourcesContent.length) sourcesContent[index] = null;
807
698
  if (ignore) put(ignoreList, index);
808
699
  else remove(ignoreList, index);
809
700
  }
810
- /**
811
- * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
812
- * a sourcemap, or to JSON.stringify.
813
- */
814
701
  function toDecodedMap(map$1) {
815
- const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList } = cast(map$1);
702
+ const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList } = cast2(map$1);
816
703
  removeEmptyFinalLines(mappings);
817
704
  return {
818
705
  version: 3,
@@ -825,25 +712,23 @@ function toDecodedMap(map$1) {
825
712
  ignoreList: ignoreList.array
826
713
  };
827
714
  }
828
- /**
829
- * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
830
- * a sourcemap, or to JSON.stringify.
831
- */
832
715
  function toEncodedMap(map$1) {
833
716
  const decoded = toDecodedMap(map$1);
834
- return Object.assign(Object.assign({}, decoded), { mappings: encode$1(decoded.mappings) });
717
+ return Object.assign({}, decoded, { mappings: encode$1(decoded.mappings) });
835
718
  }
836
719
  function addSegmentInternal(skipable, map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
837
- const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast(map$1);
838
- const line = getLine(mappings, genLine);
720
+ const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast2(map$1);
721
+ const line = getIndex(mappings, genLine);
839
722
  const index = getColumnIndex(line, genColumn);
840
723
  if (!source) {
841
724
  if (skipable && skipSourceless(line, index)) return;
842
725
  return insert(line, index, [genColumn]);
843
726
  }
727
+ assert$2(sourceLine);
728
+ assert$2(sourceColumn);
844
729
  const sourcesIndex = put(sources, source);
845
730
  const namesIndex = name ? put(names, name) : NO_NAME;
846
- if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null;
731
+ if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
847
732
  if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return;
848
733
  return insert(line, index, name ? [
849
734
  genColumn,
@@ -858,9 +743,10 @@ function addSegmentInternal(skipable, map$1, genLine, genColumn, source, sourceL
858
743
  sourceColumn
859
744
  ]);
860
745
  }
861
- function getLine(mappings, index) {
862
- for (let i$1 = mappings.length; i$1 <= index; i$1++) mappings[i$1] = [];
863
- return mappings[index];
746
+ function assert$2(_val) {}
747
+ function getIndex(arr, index) {
748
+ for (let i$1 = arr.length; i$1 <= index; i$1++) arr[i$1] = [];
749
+ return arr[index];
864
750
  }
865
751
  function getColumnIndex(line, genColumn) {
866
752
  let index = line.length;
@@ -893,9 +779,9 @@ function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIn
893
779
  }
894
780
 
895
781
  //#endregion
896
- //#region ../../node_modules/.pnpm/@ampproject+remapping@2.3.0/node_modules/@ampproject/remapping/dist/remapping.mjs
897
- const SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
898
- const EMPTY_SOURCES = [];
782
+ //#region ../../node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.mjs
783
+ var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
784
+ var EMPTY_SOURCES = [];
899
785
  function SegmentObject(source, line, column, name, content, ignore) {
900
786
  return {
901
787
  source,
@@ -915,24 +801,12 @@ function Source(map$1, sources, source, content, ignore) {
915
801
  ignore
916
802
  };
917
803
  }
918
- /**
919
- * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes
920
- * (which may themselves be SourceMapTrees).
921
- */
922
804
  function MapSource(map$1, sources) {
923
805
  return Source(map$1, sources, "", null, false);
924
806
  }
925
- /**
926
- * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
927
- * segment tracing ends at the `OriginalSource`.
928
- */
929
807
  function OriginalSource(source, content, ignore) {
930
808
  return Source(null, EMPTY_SOURCES, source, content, ignore);
931
809
  }
932
- /**
933
- * traceMappings is only called on the root level SourceMapTree, and begins the process of
934
- * resolving each mapping in terms of the original source files.
935
- */
936
810
  function traceMappings(tree) {
937
811
  const gen = new GenMapping({ file: tree.map.file });
938
812
  const { sources: rootSources, map: map$1 } = tree;
@@ -945,8 +819,8 @@ function traceMappings(tree) {
945
819
  const genCol = segment[0];
946
820
  let traced = SOURCELESS_MAPPING;
947
821
  if (segment.length !== 1) {
948
- const source$1 = rootSources[segment[1]];
949
- traced = originalPositionFor$1(source$1, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : "");
822
+ const source2 = rootSources[segment[1]];
823
+ traced = originalPositionFor$1(source2, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : "");
950
824
  if (traced == null) continue;
951
825
  }
952
826
  const { column, line, name, content, source, ignore } = traced;
@@ -957,10 +831,6 @@ function traceMappings(tree) {
957
831
  }
958
832
  return gen;
959
833
  }
960
- /**
961
- * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own
962
- * child SourceMapTrees, until we find the original source map.
963
- */
964
834
  function originalPositionFor$1(source, line, column, name) {
965
835
  if (!source.map) return SegmentObject(source.source, line, column, name, source.content, source.ignore);
966
836
  const segment = traceSegment(source.map, line, column);
@@ -972,21 +842,11 @@ function asArray(value$1) {
972
842
  if (Array.isArray(value$1)) return value$1;
973
843
  return [value$1];
974
844
  }
975
- /**
976
- * Recursively builds a tree structure out of sourcemap files, with each node
977
- * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of
978
- * `OriginalSource`s and `SourceMapTree`s.
979
- *
980
- * Every sourcemap is composed of a collection of source files and mappings
981
- * into locations of those source files. When we generate a `SourceMapTree` for
982
- * the sourcemap, we attempt to load each source file's own sourcemap. If it
983
- * does not have an associated sourcemap, it is considered an original,
984
- * unmodified source file.
985
- */
986
845
  function buildSourceMapTree(input, loader$1) {
987
846
  const maps = asArray(input).map((m$2) => new TraceMap(m$2, ""));
988
847
  const map$1 = maps.pop();
989
- for (let i$1 = 0; i$1 < maps.length; i$1++) if (maps[i$1].sources.length > 1) throw new Error(`Transformation map ${i$1} must have exactly one source file.\nDid you specify these with the most recent transformation maps first?`);
848
+ for (let i$1 = 0; i$1 < maps.length; i$1++) if (maps[i$1].sources.length > 1) throw new Error(`Transformation map ${i$1} must have exactly one source file.
849
+ Did you specify these with the most recent transformation maps first?`);
990
850
  let tree = build$2(map$1, loader$1, "", 0);
991
851
  for (let i$1 = maps.length - 1; i$1 >= 0; i$1--) tree = MapSource(maps[i$1], [tree]);
992
852
  return tree;
@@ -1011,10 +871,6 @@ function build$2(map$1, loader$1, importer, importerDepth) {
1011
871
  });
1012
872
  return MapSource(map$1, children);
1013
873
  }
1014
- /**
1015
- * A SourceMap v3 compatible sourcemap, which only includes fields that were
1016
- * provided to it.
1017
- */
1018
874
  var SourceMap$1 = class {
1019
875
  constructor(map$1, options$1) {
1020
876
  const out = options$1.decodedMappings ? toDecodedMap(map$1) : toEncodedMap(map$1);
@@ -1031,21 +887,6 @@ var SourceMap$1 = class {
1031
887
  return JSON.stringify(this);
1032
888
  }
1033
889
  };
1034
- /**
1035
- * Traces through all the mappings in the root sourcemap, through the sources
1036
- * (and their sourcemaps), all the way back to the original source location.
1037
- *
1038
- * `loader` will be called every time we encounter a source file. If it returns
1039
- * a sourcemap, we will recurse into that sourcemap to continue the trace. If
1040
- * it returns a falsey value, that source file is treated as an original,
1041
- * unmodified source file.
1042
- *
1043
- * Pass `excludeContent` to exclude any self-containing source file content
1044
- * from the output sourcemap.
1045
- *
1046
- * Pass `decodedMappings` to receive a SourceMap with decoded (instead of
1047
- * VLQ encoded) mappings.
1048
- */
1049
890
  function remapping(input, loader$1, options$1) {
1050
891
  const opts = typeof options$1 === "object" ? options$1 : {
1051
892
  excludeContent: !!options$1,
@@ -1182,7 +1023,7 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
1182
1023
  * This is the common logic for both the Node.js and web browser
1183
1024
  * implementations of `debug()`.
1184
1025
  */
1185
- function setup(env$2) {
1026
+ function setup(env$1) {
1186
1027
  createDebug$1.debug = createDebug$1;
1187
1028
  createDebug$1.default = createDebug$1;
1188
1029
  createDebug$1.coerce = coerce$1;
@@ -1191,8 +1032,8 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
1191
1032
  createDebug$1.enabled = enabled$1;
1192
1033
  createDebug$1.humanize = require_ms$1();
1193
1034
  createDebug$1.destroy = destroy$1;
1194
- Object.keys(env$2).forEach((key) => {
1195
- createDebug$1[key] = env$2[key];
1035
+ Object.keys(env$1).forEach((key) => {
1036
+ createDebug$1[key] = env$1[key];
1196
1037
  });
1197
1038
  /**
1198
1039
  * The currently active debug mode names, and names to skip.
@@ -1247,10 +1088,10 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
1247
1088
  args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format$3) => {
1248
1089
  if (match === "%%") return "%";
1249
1090
  index++;
1250
- const formatter$1 = createDebug$1.formatters[format$3];
1251
- if (typeof formatter$1 === "function") {
1091
+ const formatter = createDebug$1.formatters[format$3];
1092
+ if (typeof formatter === "function") {
1252
1093
  const val = args[index];
1253
- match = formatter$1.call(self$1, val);
1094
+ match = formatter.call(self$1, val);
1254
1095
  args.splice(index, 1);
1255
1096
  index--;
1256
1097
  }
@@ -1386,8 +1227,8 @@ var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debu
1386
1227
  /**
1387
1228
  * Module dependencies.
1388
1229
  */
1389
- const tty$1 = require("tty");
1390
- const util$2 = require("util");
1230
+ const tty$1 = __require("tty");
1231
+ const util$2 = __require("util");
1391
1232
  /**
1392
1233
  * This is the Node.js implementation of `debug()`.
1393
1234
  */
@@ -1410,7 +1251,7 @@ var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debu
1410
1251
  1
1411
1252
  ];
1412
1253
  try {
1413
- const supportsColor = require("supports-color");
1254
+ const supportsColor = __require("supports-color");
1414
1255
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
1415
1256
  20,
1416
1257
  21,
@@ -2190,7 +2031,7 @@ function traverseBetweenDirs(longerDir, shorterDir, cb) {
2190
2031
 
2191
2032
  //#endregion
2192
2033
  //#region src/node/utils.ts
2193
- var import_picocolors$34 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
2034
+ var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
2194
2035
  var import_node = /* @__PURE__ */ __toESM(require_node$1(), 1);
2195
2036
  const createFilter = createFilter$2;
2196
2037
  const replaceSlashOrColonRE = /[/:]/g;
@@ -2209,7 +2050,6 @@ const limitFlattenIdLength = (id, limit = FLATTEN_ID_MAX_FILE_LENGTH) => {
2209
2050
  };
2210
2051
  const normalizeId = (id) => id.replace(replaceNestedIdRE, " > ");
2211
2052
  const NODE_BUILTIN_NAMESPACE = "node:";
2212
- const NPM_BUILTIN_NAMESPACE = "npm:";
2213
2053
  const BUN_BUILTIN_NAMESPACE = "bun:";
2214
2054
  const nodeBuiltins = builtinModules.filter((id) => !id.includes(":"));
2215
2055
  const isBuiltinCache = /* @__PURE__ */ new WeakMap();
@@ -2229,7 +2069,6 @@ function createIsBuiltin(builtins$1) {
2229
2069
  const nodeLikeBuiltins = [
2230
2070
  ...nodeBuiltins,
2231
2071
  /* @__PURE__ */ new RegExp(`^${NODE_BUILTIN_NAMESPACE}`),
2232
- /* @__PURE__ */ new RegExp(`^${NPM_BUILTIN_NAMESPACE}`),
2233
2072
  /* @__PURE__ */ new RegExp(`^${BUN_BUILTIN_NAMESPACE}`)
2234
2073
  ];
2235
2074
  function isNodeLikeBuiltin(id) {
@@ -2378,9 +2217,9 @@ async function asyncReplace(input, re, replacer) {
2378
2217
  function timeFrom(start, subtract = 0) {
2379
2218
  const time = performance$1.now() - start - subtract;
2380
2219
  const timeString = (time.toFixed(2) + `ms`).padEnd(5, " ");
2381
- if (time < 10) return import_picocolors$34.default.green(timeString);
2382
- else if (time < 50) return import_picocolors$34.default.yellow(timeString);
2383
- else return import_picocolors$34.default.red(timeString);
2220
+ if (time < 10) return import_picocolors$33.default.green(timeString);
2221
+ else if (time < 50) return import_picocolors$33.default.yellow(timeString);
2222
+ else return import_picocolors$33.default.red(timeString);
2384
2223
  }
2385
2224
  /**
2386
2225
  * pretty url for logging.
@@ -2390,8 +2229,8 @@ function prettifyUrl(url$3, root) {
2390
2229
  const isAbsoluteFile = url$3.startsWith(root);
2391
2230
  if (isAbsoluteFile || url$3.startsWith(FS_PREFIX)) {
2392
2231
  const file = path.posix.relative(root, isAbsoluteFile ? url$3 : fsPathFromId(url$3));
2393
- return import_picocolors$34.default.dim(file);
2394
- } else return import_picocolors$34.default.dim(url$3);
2232
+ return import_picocolors$33.default.dim(file);
2233
+ } else return import_picocolors$33.default.dim(url$3);
2395
2234
  }
2396
2235
  function isObject(value$1) {
2397
2236
  return Object.prototype.toString.call(value$1) === "[object Object]";
@@ -2448,6 +2287,8 @@ function numberToPos(source, offset$1) {
2448
2287
  column: lines[lines.length - 1].length
2449
2288
  };
2450
2289
  }
2290
+ const MAX_DISPLAY_LEN = 120;
2291
+ const ELLIPSIS = "...";
2451
2292
  function generateCodeFrame(source, start = 0, end) {
2452
2293
  start = Math.max(posToNumber(source, start), 0);
2453
2294
  end = Math.min(end !== void 0 ? posToNumber(source, end) : start, source.length);
@@ -2462,16 +2303,35 @@ function generateCodeFrame(source, start = 0, end) {
2462
2303
  for (let j = i$1 - range; j <= i$1 + range || end > count; j++) {
2463
2304
  if (j < 0 || j >= lines.length) continue;
2464
2305
  const line = j + 1;
2465
- res.push(`${line}${" ".repeat(lineNumberWidth - String(line).length)}| ${lines[j]}`);
2466
2306
  const lineLength = lines[j].length;
2307
+ const pad$2 = Math.max(start - (count - lineLength), 0);
2308
+ const underlineLength = Math.max(1, end > count ? lineLength - pad$2 : end - start);
2309
+ let displayLine = lines[j];
2310
+ let underlinePad = pad$2;
2311
+ if (lineLength > MAX_DISPLAY_LEN) {
2312
+ let startIdx = 0;
2313
+ if (j === i$1) {
2314
+ if (underlineLength > MAX_DISPLAY_LEN) startIdx = pad$2;
2315
+ else {
2316
+ const center = pad$2 + Math.floor(underlineLength / 2);
2317
+ startIdx = Math.max(0, center - Math.floor(MAX_DISPLAY_LEN / 2));
2318
+ }
2319
+ underlinePad = Math.max(0, pad$2 - startIdx) + (startIdx > 0 ? 3 : 0);
2320
+ }
2321
+ const prefix = startIdx > 0 ? ELLIPSIS : "";
2322
+ const suffix = lineLength - startIdx > MAX_DISPLAY_LEN ? ELLIPSIS : "";
2323
+ const sliceLen = MAX_DISPLAY_LEN - prefix.length - suffix.length;
2324
+ displayLine = prefix + displayLine.slice(startIdx, startIdx + sliceLen) + suffix;
2325
+ }
2326
+ res.push(`${line}${" ".repeat(lineNumberWidth - String(line).length)}| ${displayLine}`);
2467
2327
  if (j === i$1) {
2468
- const pad$2 = Math.max(start - (count - lineLength), 0);
2469
- const length = Math.max(1, end > count ? lineLength - pad$2 : end - start);
2470
- res.push(`${" ".repeat(lineNumberWidth)}| ` + " ".repeat(pad$2) + "^".repeat(length));
2328
+ const underline = "^".repeat(Math.min(underlineLength, MAX_DISPLAY_LEN));
2329
+ res.push(`${" ".repeat(lineNumberWidth)}| ` + " ".repeat(underlinePad) + underline);
2471
2330
  } else if (j > i$1) {
2472
2331
  if (end > count) {
2473
2332
  const length = Math.max(Math.min(end - count, lineLength), 1);
2474
- res.push(`${" ".repeat(lineNumberWidth)}| ` + "^".repeat(length));
2333
+ const underline = "^".repeat(Math.min(length, MAX_DISPLAY_LEN));
2334
+ res.push(`${" ".repeat(lineNumberWidth)}| ` + underline);
2475
2335
  }
2476
2336
  count += lineLength + 1;
2477
2337
  }
@@ -2939,9 +2799,9 @@ const windowsDrivePathPrefixRE = /^[A-Za-z]:[/\\]/;
2939
2799
  * path.isAbsolute also returns true for drive relative paths on windows (e.g. /something)
2940
2800
  * this function returns false for them but true for absolute paths (e.g. C:/something)
2941
2801
  */
2942
- const isNonDriveRelativeAbsolutePath = (p$1) => {
2943
- if (!isWindows) return p$1[0] === "/";
2944
- return windowsDrivePathPrefixRE.test(p$1);
2802
+ const isNonDriveRelativeAbsolutePath = (p) => {
2803
+ if (!isWindows) return p[0] === "/";
2804
+ return windowsDrivePathPrefixRE.test(p);
2945
2805
  };
2946
2806
  /**
2947
2807
  * Determine if a file is being requested with the correct case, to ensure
@@ -3132,7 +2992,7 @@ function perEnvironmentPlugin(name, applyToEnvironment) {
3132
2992
  //#endregion
3133
2993
  //#region ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
3134
2994
  var require_commondir = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js": ((exports, module) => {
3135
- var path$12 = require("path");
2995
+ var path$12 = __require("path");
3136
2996
  module.exports = function(basedir, relfiles) {
3137
2997
  if (relfiles) var files = relfiles.map(function(r$2) {
3138
2998
  return path$12.resolve(basedir, r$2);
@@ -4717,7 +4577,7 @@ function getDefinePropertyCallName(node, targetName) {
4717
4577
  if (target.type !== "MemberExpression" || target.object.name !== targetNames[0] || target.property.name !== targetNames[1]) return;
4718
4578
  }
4719
4579
  if (value$1.type !== "ObjectExpression" || !value$1.properties) return;
4720
- const valueProperty = value$1.properties.find((p$1) => p$1.key && p$1.key.name === "value");
4580
+ const valueProperty = value$1.properties.find((p) => p.key && p.key.name === "value");
4721
4581
  if (!valueProperty || !valueProperty.value) return;
4722
4582
  return {
4723
4583
  key: key.value,
@@ -5367,105 +5227,6 @@ function perEnvironmentState(initial) {
5367
5227
  };
5368
5228
  }
5369
5229
 
5370
- //#endregion
5371
- //#region src/node/logger.ts
5372
- var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
5373
- const LogLevels = {
5374
- silent: 0,
5375
- error: 1,
5376
- warn: 2,
5377
- info: 3
5378
- };
5379
- let lastType;
5380
- let lastMsg;
5381
- let sameCount = 0;
5382
- function clearScreen() {
5383
- const repeatCount = process.stdout.rows - 2;
5384
- const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
5385
- console.log(blank);
5386
- readline.cursorTo(process.stdout, 0, 0);
5387
- readline.clearScreenDown(process.stdout);
5388
- }
5389
- let timeFormatter;
5390
- function getTimeFormatter() {
5391
- timeFormatter ??= new Intl.DateTimeFormat(void 0, {
5392
- hour: "numeric",
5393
- minute: "numeric",
5394
- second: "numeric"
5395
- });
5396
- return timeFormatter;
5397
- }
5398
- function createLogger(level = "info", options$1 = {}) {
5399
- if (options$1.customLogger) return options$1.customLogger;
5400
- const loggedErrors = /* @__PURE__ */ new WeakSet();
5401
- const { prefix = "[vite]", allowClearScreen = true, console: console$1 = globalThis.console } = options$1;
5402
- const thresh = LogLevels[level];
5403
- const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI;
5404
- const clear = canClearScreen ? clearScreen : () => {};
5405
- function format$3(type, msg, options$2 = {}) {
5406
- if (options$2.timestamp) {
5407
- let tag = "";
5408
- if (type === "info") tag = import_picocolors$33.default.cyan(import_picocolors$33.default.bold(prefix));
5409
- else if (type === "warn") tag = import_picocolors$33.default.yellow(import_picocolors$33.default.bold(prefix));
5410
- else tag = import_picocolors$33.default.red(import_picocolors$33.default.bold(prefix));
5411
- const environment = options$2.environment ? options$2.environment + " " : "";
5412
- return `${import_picocolors$33.default.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${environment}${msg}`;
5413
- } else return msg;
5414
- }
5415
- function output(type, msg, options$2 = {}) {
5416
- if (thresh >= LogLevels[type]) {
5417
- const method = type === "info" ? "log" : type;
5418
- if (options$2.error) loggedErrors.add(options$2.error);
5419
- if (canClearScreen) if (type === lastType && msg === lastMsg) {
5420
- sameCount++;
5421
- clear();
5422
- console$1[method](format$3(type, msg, options$2), import_picocolors$33.default.yellow(`(x${sameCount + 1})`));
5423
- } else {
5424
- sameCount = 0;
5425
- lastMsg = msg;
5426
- lastType = type;
5427
- if (options$2.clear) clear();
5428
- console$1[method](format$3(type, msg, options$2));
5429
- }
5430
- else console$1[method](format$3(type, msg, options$2));
5431
- }
5432
- }
5433
- const warnedMessages = /* @__PURE__ */ new Set();
5434
- const logger = {
5435
- hasWarned: false,
5436
- info(msg, opts) {
5437
- output("info", msg, opts);
5438
- },
5439
- warn(msg, opts) {
5440
- logger.hasWarned = true;
5441
- output("warn", msg, opts);
5442
- },
5443
- warnOnce(msg, opts) {
5444
- if (warnedMessages.has(msg)) return;
5445
- logger.hasWarned = true;
5446
- output("warn", msg, opts);
5447
- warnedMessages.add(msg);
5448
- },
5449
- error(msg, opts) {
5450
- logger.hasWarned = true;
5451
- output("error", msg, opts);
5452
- },
5453
- clearScreen(type) {
5454
- if (thresh >= LogLevels[type]) clear();
5455
- },
5456
- hasErrorLogged(error$1) {
5457
- return loggedErrors.has(error$1);
5458
- }
5459
- };
5460
- return logger;
5461
- }
5462
- function printServerUrls(urls, optionsHost, info) {
5463
- const colorUrl = (url$3) => import_picocolors$33.default.cyan(url$3.replace(/:(\d+)\//, (_, port) => `:${import_picocolors$33.default.bold(port)}/`));
5464
- for (const url$3 of urls.local) info(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Local")}: ${colorUrl(url$3)}`);
5465
- for (const url$3 of urls.network) info(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Network")}: ${colorUrl(url$3)}`);
5466
- if (urls.network.length === 0 && optionsHost === void 0) info(import_picocolors$33.default.dim(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Network")}: use `) + import_picocolors$33.default.bold("--host") + import_picocolors$33.default.dim(" to expose"));
5467
- }
5468
-
5469
5230
  //#endregion
5470
5231
  //#region src/node/plugins/reporter.ts
5471
5232
  var import_picocolors$32 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
@@ -5673,7 +5434,7 @@ function throttle(fn) {
5673
5434
  }
5674
5435
 
5675
5436
  //#endregion
5676
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/util.js
5437
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.2/node_modules/tsconfck/src/util.js
5677
5438
  const POSIX_SEP_RE = new RegExp("\\" + path.posix.sep, "g");
5678
5439
  const NATIVE_SEP_RE = new RegExp("\\" + path.sep, "g");
5679
5440
  /** @type {Map<string,RegExp>}*/
@@ -5905,7 +5666,7 @@ function replaceTokens(result) {
5905
5666
  }
5906
5667
 
5907
5668
  //#endregion
5908
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/find.js
5669
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.2/node_modules/tsconfck/src/find.js
5909
5670
  /**
5910
5671
  * find the closest tsconfig.json file
5911
5672
  *
@@ -5964,7 +5725,7 @@ function findUp(dir, { resolve: resolve$4, reject, promise }, options$1) {
5964
5725
  }
5965
5726
 
5966
5727
  //#endregion
5967
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/find-all.js
5728
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.2/node_modules/tsconfck/src/find-all.js
5968
5729
  /**
5969
5730
  * @typedef WalkState
5970
5731
  * @interface
@@ -5977,7 +5738,7 @@ function findUp(dir, { resolve: resolve$4, reject, promise }, options$1) {
5977
5738
  const sep$2 = path.sep;
5978
5739
 
5979
5740
  //#endregion
5980
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/to-json.js
5741
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.2/node_modules/tsconfck/src/to-json.js
5981
5742
  /**
5982
5743
  * convert content of tsconfig.json to regular json
5983
5744
  *
@@ -6107,7 +5868,7 @@ function stripBom(string) {
6107
5868
  }
6108
5869
 
6109
5870
  //#endregion
6110
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/parse.js
5871
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.2/node_modules/tsconfck/src/parse.js
6111
5872
  const not_found_result = {
6112
5873
  tsconfigFile: null,
6113
5874
  tsconfig: {}
@@ -6399,7 +6160,7 @@ function isJSConfig(configFileName) {
6399
6160
  }
6400
6161
 
6401
6162
  //#endregion
6402
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/parse-native.js
6163
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.2/node_modules/tsconfck/src/parse-native.js
6403
6164
  /** @typedef TSDiagnosticError {
6404
6165
  code: number;
6405
6166
  category: number;
@@ -6408,7 +6169,7 @@ start?: number;
6408
6169
  } TSDiagnosticError */
6409
6170
 
6410
6171
  //#endregion
6411
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/cache.js
6172
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.2/node_modules/tsconfck/src/cache.js
6412
6173
  /** @template T */
6413
6174
  var TSConfckCache = class {
6414
6175
  /**
@@ -7117,8 +6878,15 @@ const loadTerserPath = (root) => {
7117
6878
  function terserPlugin(config$2) {
7118
6879
  const { maxWorkers,...terserOptions } = config$2.build.terserOptions;
7119
6880
  const makeWorker = () => new WorkerWithFallback(() => async (terserPath$1, code, options$1) => {
7120
- const terser = require(terserPath$1);
7121
- return terser.minify(code, options$1);
6881
+ const terser = (await import(terserPath$1)).default;
6882
+ try {
6883
+ return await terser.minify(code, options$1);
6884
+ } catch (e$1) {
6885
+ throw {
6886
+ stack: e$1.stack,
6887
+ ...e$1
6888
+ };
6889
+ }
7122
6890
  }, {
7123
6891
  shouldUseFake(_terserPath, _code, options$1) {
7124
6892
  return !!(typeof options$1.mangle === "object" && (options$1.mangle.nth_identifier?.get || typeof options$1.mangle.properties === "object" && options$1.mangle.properties.nth_identifier?.get) || typeof options$1.format?.comments === "function" || typeof options$1.output?.comments === "function");
@@ -7131,22 +6899,32 @@ function terserPlugin(config$2) {
7131
6899
  applyToEnvironment(environment) {
7132
6900
  return !!environment.config.build.minify;
7133
6901
  },
7134
- async renderChunk(code, _chunk, outputOptions) {
6902
+ async renderChunk(code, chunk, outputOptions) {
7135
6903
  if (config$2.build.minify !== "terser" && !outputOptions.__vite_force_terser__) return null;
7136
6904
  if (config$2.build.lib && outputOptions.format === "es") return null;
7137
6905
  worker ||= makeWorker();
7138
- const terserPath$1 = loadTerserPath(config$2.root);
7139
- const res = await worker.run(terserPath$1, code, {
7140
- safari10: true,
7141
- ...terserOptions,
7142
- sourceMap: !!outputOptions.sourcemap,
7143
- module: outputOptions.format.startsWith("es"),
7144
- toplevel: outputOptions.format === "cjs"
7145
- });
7146
- return {
7147
- code: res.code,
7148
- map: res.map
7149
- };
6906
+ const terserPath$1 = pathToFileURL(loadTerserPath(config$2.root)).href;
6907
+ try {
6908
+ const res = await worker.run(terserPath$1, code, {
6909
+ safari10: true,
6910
+ ...terserOptions,
6911
+ sourceMap: !!outputOptions.sourcemap,
6912
+ module: outputOptions.format.startsWith("es"),
6913
+ toplevel: outputOptions.format === "cjs"
6914
+ });
6915
+ return {
6916
+ code: res.code,
6917
+ map: res.map
6918
+ };
6919
+ } catch (e$1) {
6920
+ if (e$1.line !== void 0 && e$1.col !== void 0) e$1.loc = {
6921
+ file: chunk.fileName,
6922
+ line: e$1.line,
6923
+ column: e$1.col
6924
+ };
6925
+ if (e$1.pos !== void 0) e$1.frame = generateCodeFrame(code, e$1.pos);
6926
+ throw e$1;
6927
+ }
7150
6928
  },
7151
6929
  closeBundle() {
7152
6930
  worker?.stop();
@@ -8238,7 +8016,7 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
8238
8016
  }) });
8239
8017
 
8240
8018
  //#endregion
8241
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.31/node_modules/@rolldown/pluginutils/dist/index.js
8019
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.32/node_modules/@rolldown/pluginutils/dist/index.js
8242
8020
  /**
8243
8021
  * Constructs a RegExp that matches the exact string specified.
8244
8022
  *
@@ -8367,10 +8145,10 @@ function createConvertSourceMapReadMap(originalFileName) {
8367
8145
  //#endregion
8368
8146
  //#region ../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js
8369
8147
  var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js": ((exports, module) => {
8370
- const path$11 = require("path");
8371
- const fs$11 = require("fs");
8372
- const os$4 = require("os");
8373
- const url$2 = require("url");
8148
+ const path$11 = __require("path");
8149
+ const fs$11 = __require("fs");
8150
+ const os$4 = __require("os");
8151
+ const url$2 = __require("url");
8374
8152
  const fsReadFileAsync = fs$11.promises.readFile;
8375
8153
  /** @type {(name: string, sync: boolean) => string[]} */
8376
8154
  function getDefaultSearchPlaces(name, sync$3) {
@@ -8399,12 +8177,12 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8399
8177
  * but it should be '/' actually.
8400
8178
  * And on Windows, this will never happen. ('C:\build' -> 'C:')
8401
8179
  */
8402
- function parentDir(p$1) {
8403
- return path$11.dirname(p$1) || path$11.sep;
8180
+ function parentDir(p) {
8181
+ return path$11.dirname(p) || path$11.sep;
8404
8182
  }
8405
8183
  /** @type {import('./index').LoaderSync} */
8406
8184
  const jsonLoader = (_, content) => JSON.parse(content);
8407
- const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
8185
+ const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
8408
8186
  /** @type {import('./index').LoadersSync} */
8409
8187
  const defaultLoadersSync = Object.freeze({
8410
8188
  ".js": requireFunc,
@@ -8508,7 +8286,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8508
8286
  if (cache$1) {
8509
8287
  const r$2 = searchCache.get(dir);
8510
8288
  if (r$2 !== void 0) {
8511
- for (const p$1 of visited) searchCache.set(p$1, r$2);
8289
+ for (const p of visited) searchCache.set(p, r$2);
8512
8290
  return r$2;
8513
8291
  }
8514
8292
  visited.add(dir);
@@ -8549,7 +8327,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8549
8327
  dir = parentDir(dir);
8550
8328
  }
8551
8329
  const transformed = result.filepath === "" && result.config === null ? transform$2(null) : transform$2(result);
8552
- if (cache$1) for (const p$1 of visited) searchCache.set(p$1, transformed);
8330
+ if (cache$1) for (const p of visited) searchCache.set(p, transformed);
8553
8331
  return transformed;
8554
8332
  },
8555
8333
  async load(filepath) {
@@ -8620,7 +8398,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8620
8398
  if (cache$1) {
8621
8399
  const r$2 = searchCache.get(dir);
8622
8400
  if (r$2 !== void 0) {
8623
- for (const p$1 of visited) searchCache.set(p$1, r$2);
8401
+ for (const p of visited) searchCache.set(p, r$2);
8624
8402
  return r$2;
8625
8403
  }
8626
8404
  visited.add(dir);
@@ -8661,7 +8439,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8661
8439
  dir = parentDir(dir);
8662
8440
  }
8663
8441
  const transformed = result.filepath === "" && result.config === null ? transform$2(null) : transform$2(result);
8664
- if (cache$1) for (const p$1 of visited) searchCache.set(p$1, transformed);
8442
+ if (cache$1) for (const p of visited) searchCache.set(p, transformed);
8665
8443
  return transformed;
8666
8444
  },
8667
8445
  load(filepath) {
@@ -8714,10 +8492,10 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8714
8492
  }) });
8715
8493
 
8716
8494
  //#endregion
8717
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/req.js
8718
- var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/req.js": ((exports, module) => {
8719
- const { createRequire: createRequire$2 } = require("node:module");
8720
- const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = require("node:url");
8495
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/req.js
8496
+ var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/req.js": ((exports, module) => {
8497
+ const { createRequire: createRequire$2 } = __require("node:module");
8498
+ const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url");
8721
8499
  const TS_EXT_RE = /\.[mc]?ts$/;
8722
8500
  let tsx;
8723
8501
  let jiti;
@@ -8757,8 +8535,8 @@ var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss
8757
8535
  }) });
8758
8536
 
8759
8537
  //#endregion
8760
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/options.js
8761
- var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/options.js": ((exports, module) => {
8538
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/options.js
8539
+ var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/options.js": ((exports, module) => {
8762
8540
  const req$2 = require_req();
8763
8541
  /**
8764
8542
  * Load Options
@@ -8792,8 +8570,8 @@ var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
8792
8570
  }) });
8793
8571
 
8794
8572
  //#endregion
8795
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/plugins.js
8796
- var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/plugins.js": ((exports, module) => {
8573
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js
8574
+ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js": ((exports, module) => {
8797
8575
  const req$1 = require_req();
8798
8576
  /**
8799
8577
  * Plugin Loader
@@ -8847,9 +8625,9 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
8847
8625
  }) });
8848
8626
 
8849
8627
  //#endregion
8850
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/index.js
8851
- var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/index.js": ((exports, module) => {
8852
- const { resolve: resolve$2 } = require("node:path");
8628
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/index.js
8629
+ var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/index.js": ((exports, module) => {
8630
+ const { resolve: resolve$2 } = __require("node:path");
8853
8631
  const config$1 = require_src$1();
8854
8632
  const loadOptions = require_options();
8855
8633
  const loadPlugins = require_plugins();
@@ -10621,7 +10399,7 @@ async function toAbsoluteGlob(glob$1, root, importer, resolveId, base) {
10621
10399
  }
10622
10400
  root = globSafePath(root);
10623
10401
  let dir;
10624
- if (base) if (base.startsWith("/")) dir = posix.join(root, base);
10402
+ if (base) if (base[0] === "/") dir = posix.join(root, base);
10625
10403
  else dir = posix.resolve(importer ? globSafePath(dirname$2(importer)) : root, base);
10626
10404
  else dir = importer ? globSafePath(dirname$2(importer)) : root;
10627
10405
  if (glob$1[0] === "/") return pre + posix.join(root, glob$1.slice(1));
@@ -10772,12 +10550,12 @@ async function computeEntries(environment) {
10772
10550
  const buildInput = environment.config.build.rollupOptions.input;
10773
10551
  if (explicitEntryPatterns) entries = await globEntries(explicitEntryPatterns, environment);
10774
10552
  else if (buildInput) {
10775
- const resolvePath = async (p$1) => {
10776
- const id = (await environment.pluginContainer.resolveId(p$1, path.join(process.cwd(), "*"), {
10553
+ const resolvePath = async (p) => {
10554
+ const id = (await environment.pluginContainer.resolveId(p, path.join(process.cwd(), "*"), {
10777
10555
  isEntry: true,
10778
10556
  scan: true
10779
10557
  }))?.id;
10780
- if (id === void 0) throw new Error(`failed to resolve rollupOptions.input value: ${JSON.stringify(p$1)}.`);
10558
+ if (id === void 0) throw new Error(`failed to resolve rollupOptions.input value: ${JSON.stringify(p)}.`);
10781
10559
  return id;
10782
10560
  };
10783
10561
  if (typeof buildInput === "string") entries = [await resolvePath(buildInput)];
@@ -10911,10 +10689,10 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10911
10689
  namespace: "html"
10912
10690
  };
10913
10691
  });
10914
- const htmlTypeOnLoadCallback = async ({ path: p$1 }) => {
10915
- let raw = await fsp.readFile(p$1, "utf-8");
10692
+ const htmlTypeOnLoadCallback = async ({ path: p }) => {
10693
+ let raw = await fsp.readFile(p, "utf-8");
10916
10694
  raw = raw.replace(commentRE$1, "<!---->");
10917
- const isHtml = p$1.endsWith(".html");
10695
+ const isHtml = p.endsWith(".html");
10918
10696
  let js = "";
10919
10697
  let scriptId = 0;
10920
10698
  const matches$2 = raw.matchAll(scriptRE);
@@ -10927,29 +10705,29 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10927
10705
  if (type && !(type.includes("javascript") || type.includes("ecmascript") || type === "module")) continue;
10928
10706
  let loader$1 = "js";
10929
10707
  if (lang === "ts" || lang === "tsx" || lang === "jsx") loader$1 = lang;
10930
- else if (p$1.endsWith(".astro")) loader$1 = "ts";
10708
+ else if (p.endsWith(".astro")) loader$1 = "ts";
10931
10709
  const srcMatch = srcRE.exec(openTag);
10932
10710
  if (srcMatch) {
10933
10711
  const src = srcMatch[1] || srcMatch[2] || srcMatch[3];
10934
10712
  js += `import ${JSON.stringify(src)}\n`;
10935
10713
  } else if (content.trim()) {
10936
10714
  const contents = content + (loader$1.startsWith("ts") ? extractImportPaths(content) : "");
10937
- const key = `${p$1}?id=${scriptId++}`;
10715
+ const key = `${p}?id=${scriptId++}`;
10938
10716
  if (contents.includes("import.meta.glob")) scripts[key] = {
10939
10717
  loader: "js",
10940
- contents: await doTransformGlobImport(contents, p$1, loader$1),
10941
- resolveDir: normalizePath(path.dirname(p$1)),
10718
+ contents: await doTransformGlobImport(contents, p, loader$1),
10719
+ resolveDir: normalizePath(path.dirname(p)),
10942
10720
  pluginData: { htmlType: { loader: loader$1 } }
10943
10721
  };
10944
10722
  else scripts[key] = {
10945
10723
  loader: loader$1,
10946
10724
  contents,
10947
- resolveDir: normalizePath(path.dirname(p$1)),
10725
+ resolveDir: normalizePath(path.dirname(p)),
10948
10726
  pluginData: { htmlType: { loader: loader$1 } }
10949
10727
  };
10950
10728
  const virtualModulePath = JSON.stringify(virtualModulePrefix + key);
10951
10729
  let addedImport = false;
10952
- if (p$1.endsWith(".svelte")) {
10730
+ if (p.endsWith(".svelte")) {
10953
10731
  let isModule = svelteModuleRE.test(openTag);
10954
10732
  if (!isModule) {
10955
10733
  const contextMatch = svelteScriptModuleRE.exec(openTag);
@@ -10964,7 +10742,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10964
10742
  if (!addedImport) js += `export * from ${virtualModulePath}\n`;
10965
10743
  }
10966
10744
  }
10967
- if (!p$1.endsWith(".vue") || !js.includes("export default")) js += "\nexport default {}";
10745
+ if (!p.endsWith(".vue") || !js.includes("export default")) js += "\nexport default {}";
10968
10746
  return {
10969
10747
  loader: "js",
10970
10748
  contents: js
@@ -11129,7 +10907,7 @@ function expandGlobIds(id, config$2) {
11129
10907
  }).filter(Boolean));
11130
10908
  } else possibleExportPaths.push(key.slice(2));
11131
10909
  const isMatch$1 = picomatch(pattern);
11132
- const matched = possibleExportPaths.filter((p$1) => isMatch$1(p$1)).map((match) => path.posix.join(pkgName, match));
10910
+ const matched = possibleExportPaths.filter((p) => isMatch$1(p)).map((match) => path.posix.join(pkgName, match));
11133
10911
  matched.unshift(pkgName);
11134
10912
  return matched;
11135
10913
  } else {
@@ -11714,13 +11492,13 @@ function getConfigHash(environment) {
11714
11492
  root: config$2.root,
11715
11493
  resolve: config$2.resolve,
11716
11494
  assetsInclude: config$2.assetsInclude,
11717
- plugins: config$2.plugins.map((p$1) => p$1.name),
11495
+ plugins: config$2.plugins.map((p) => p.name),
11718
11496
  optimizeDeps: {
11719
11497
  include: optimizeDeps$1.include ? unique(optimizeDeps$1.include).sort() : void 0,
11720
11498
  exclude: optimizeDeps$1.exclude ? unique(optimizeDeps$1.exclude).sort() : void 0,
11721
11499
  esbuildOptions: {
11722
11500
  ...optimizeDeps$1.esbuildOptions,
11723
- plugins: optimizeDeps$1.esbuildOptions?.plugins?.map((p$1) => p$1.name)
11501
+ plugins: optimizeDeps$1.esbuildOptions?.plugins?.map((p) => p.name)
11724
11502
  }
11725
11503
  }
11726
11504
  }, (_, value$1) => {
@@ -12402,7 +12180,7 @@ function optimizedDepsPlugin() {
12402
12180
  if (depsOptimizer?.isOptimizedDepFile(id)) {
12403
12181
  const metadata = depsOptimizer.metadata;
12404
12182
  const file = cleanUrl(id);
12405
- const versionMatch = DEP_VERSION_RE.exec(file);
12183
+ const versionMatch = DEP_VERSION_RE.exec(id);
12406
12184
  const browserHash = versionMatch ? versionMatch[1].split("=")[1] : void 0;
12407
12185
  const info = optimizedDepInfoFromFile(metadata, file);
12408
12186
  if (info) {
@@ -12422,8 +12200,7 @@ function optimizedDepsPlugin() {
12422
12200
  try {
12423
12201
  return await fsp.readFile(file, "utf-8");
12424
12202
  } catch {
12425
- const newMetadata = depsOptimizer.metadata;
12426
- if (optimizedDepInfoFromFile(newMetadata, file)) throwOutdatedRequest(id);
12203
+ if (browserHash) throwOutdatedRequest(id);
12427
12204
  throwFileNotFoundInOptimizedDep(id);
12428
12205
  }
12429
12206
  }
@@ -12512,10 +12289,10 @@ var require_package = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dot
12512
12289
  //#endregion
12513
12290
  //#region ../../node_modules/.pnpm/dotenv@17.2.1/node_modules/dotenv/lib/main.js
12514
12291
  var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@17.2.1/node_modules/dotenv/lib/main.js": ((exports, module) => {
12515
- const fs$10 = require("fs");
12516
- const path$10 = require("path");
12517
- const os$3 = require("os");
12518
- const crypto$2 = require("crypto");
12292
+ const fs$10 = __require("fs");
12293
+ const path$10 = __require("path");
12294
+ const os$3 = __require("os");
12295
+ const crypto$2 = __require("crypto");
12519
12296
  const packageJson = require_package();
12520
12297
  const version = packageJson.version;
12521
12298
  const TIPS = [
@@ -12794,7 +12571,7 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
12794
12571
  return value$1.replace(/\\\$/g, "$");
12795
12572
  }
12796
12573
  function expandValue(value$1, processEnv, runningParsed) {
12797
- const env$2 = {
12574
+ const env$1 = {
12798
12575
  ...runningParsed,
12799
12576
  ...processEnv
12800
12577
  };
@@ -12814,11 +12591,11 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
12814
12591
  let value$2;
12815
12592
  const key = r$2.shift();
12816
12593
  if ([":+", "+"].includes(splitter)) {
12817
- defaultValue = env$2[key] ? r$2.join(splitter) : "";
12594
+ defaultValue = env$1[key] ? r$2.join(splitter) : "";
12818
12595
  value$2 = null;
12819
12596
  } else {
12820
12597
  defaultValue = r$2.join(splitter);
12821
- value$2 = env$2[key];
12598
+ value$2 = env$1[key];
12822
12599
  }
12823
12600
  if (value$2) if (seen$1.has(value$2)) result = result.replace(template, defaultValue);
12824
12601
  else result = result.replace(template, value$2);
@@ -12862,7 +12639,7 @@ function loadEnv(mode, envDir, prefixes = "VITE_") {
12862
12639
  const getTime = () => `${(performance.now() - start).toFixed(2)}ms`;
12863
12640
  if (mode === "local") throw new Error("\"local\" cannot be used as a mode name because it conflicts with the .local postfix for .env files.");
12864
12641
  prefixes = arraify(prefixes);
12865
- const env$2 = {};
12642
+ const env$1 = {};
12866
12643
  const envFiles = getEnvFilesForMode(mode, envDir);
12867
12644
  debug$10?.(`loading env files: %O`, envFiles);
12868
12645
  const parsed = Object.fromEntries(envFiles.flatMap((filePath) => {
@@ -12878,10 +12655,10 @@ function loadEnv(mode, envDir, prefixes = "VITE_") {
12878
12655
  parsed,
12879
12656
  processEnv
12880
12657
  });
12881
- for (const [key, value$1] of Object.entries(parsed)) if (prefixes.some((prefix) => key.startsWith(prefix))) env$2[key] = value$1;
12882
- for (const key in process.env) if (prefixes.some((prefix) => key.startsWith(prefix))) env$2[key] = process.env[key];
12883
- debug$10?.(`using resolved env: %O`, env$2);
12884
- return env$2;
12658
+ for (const [key, value$1] of Object.entries(parsed)) if (prefixes.some((prefix) => key.startsWith(prefix))) env$1[key] = value$1;
12659
+ for (const key in process.env) if (prefixes.some((prefix) => key.startsWith(prefix))) env$1[key] = process.env[key];
12660
+ debug$10?.(`using resolved env: %O`, env$1);
12661
+ return env$1;
12885
12662
  }
12886
12663
  function resolveEnvPrefix({ envPrefix = "VITE_" }) {
12887
12664
  envPrefix = arraify(envPrefix);
@@ -13203,10 +12980,10 @@ var require_debug$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/deb
13203
12980
  args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format$3) {
13204
12981
  if (match === "%%") return match;
13205
12982
  index++;
13206
- var formatter$1 = exports.formatters[format$3];
13207
- if ("function" === typeof formatter$1) {
12983
+ var formatter = exports.formatters[format$3];
12984
+ if ("function" === typeof formatter) {
13208
12985
  var val = args[index];
13209
- match = formatter$1.call(self$1, val);
12986
+ match = formatter.call(self$1, val);
13210
12987
  args.splice(index, 1);
13211
12988
  index--;
13212
12989
  }
@@ -13283,8 +13060,8 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
13283
13060
  /**
13284
13061
  * Module dependencies.
13285
13062
  */
13286
- var tty = require("tty");
13287
- var util$1 = require("util");
13063
+ var tty = __require("tty");
13064
+ var util$1 = __require("util");
13288
13065
  /**
13289
13066
  * This is the Node.js implementation of `debug()`.
13290
13067
  *
@@ -13414,13 +13191,13 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
13414
13191
  if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
13415
13192
  break;
13416
13193
  case "FILE":
13417
- var fs$12 = require("fs");
13194
+ var fs$12 = __require("fs");
13418
13195
  stream$3 = new fs$12.SyncWriteStream(fd$1, { autoClose: false });
13419
13196
  stream$3._type = "fs";
13420
13197
  break;
13421
13198
  case "PIPE":
13422
13199
  case "TCP":
13423
- var net$2 = require("net");
13200
+ var net$2 = __require("net");
13424
13201
  stream$3 = new net$2.Socket({
13425
13202
  fd: fd$1,
13426
13203
  readable: false,
@@ -13768,7 +13545,7 @@ var require_parseurl = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pa
13768
13545
  * Module dependencies.
13769
13546
  * @private
13770
13547
  */
13771
- var url$1 = require("url");
13548
+ var url$1 = __require("url");
13772
13549
  var parse$10 = url$1.parse;
13773
13550
  var Url = url$1.Url;
13774
13551
  /**
@@ -14103,7 +13880,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
14103
13880
  */
14104
13881
  function finalhandler$1(req$4, res, options$1) {
14105
13882
  var opts = options$1 || {};
14106
- var env$2 = opts.env || process.env.NODE_ENV || "development";
13883
+ var env$1 = opts.env || process.env.NODE_ENV || "development";
14107
13884
  var onerror = opts.onerror;
14108
13885
  return function(err$2) {
14109
13886
  var headers;
@@ -14117,7 +13894,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
14117
13894
  status$1 = getErrorStatusCode(err$2);
14118
13895
  if (status$1 === void 0) status$1 = getResponseStatusCode(res);
14119
13896
  else headers = getErrorHeaders(err$2);
14120
- msg = getErrorMessage(err$2, status$1, env$2);
13897
+ msg = getErrorMessage(err$2, status$1, env$1);
14121
13898
  } else {
14122
13899
  status$1 = 404;
14123
13900
  msg = "Cannot " + req$4.method + " " + encodeUrl(getResourceName(req$4));
@@ -14158,9 +13935,9 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
14158
13935
  * @return {string}
14159
13936
  * @private
14160
13937
  */
14161
- function getErrorMessage(err$2, status$1, env$2) {
13938
+ function getErrorMessage(err$2, status$1, env$1) {
14162
13939
  var msg;
14163
- if (env$2 !== "production") {
13940
+ if (env$1 !== "production") {
14164
13941
  msg = err$2.stack;
14165
13942
  if (!msg && typeof err$2.toString === "function") msg = err$2.toString();
14166
13943
  }
@@ -14299,9 +14076,9 @@ var require_connect = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/con
14299
14076
  * @private
14300
14077
  */
14301
14078
  var debug$8 = require_node()("connect:dispatcher");
14302
- var EventEmitter$4 = require("events").EventEmitter;
14079
+ var EventEmitter$4 = __require("events").EventEmitter;
14303
14080
  var finalhandler = require_finalhandler();
14304
- var http$6 = require("http");
14081
+ var http$6 = __require("http");
14305
14082
  var merge = require_utils_merge();
14306
14083
  var parseUrl$1 = require_parseurl();
14307
14084
  /**
@@ -14798,11 +14575,11 @@ var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@
14798
14575
  //#endregion
14799
14576
  //#region ../../node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js
14800
14577
  var require_readdirp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js": ((exports, module) => {
14801
- const fs$9 = require("fs");
14802
- const { Readable: Readable$1 } = require("stream");
14803
- const sysPath$3 = require("path");
14804
- const { promisify: promisify$4 } = require("util");
14805
- const picomatch$2 = require("picomatch");
14578
+ const fs$9 = __require("fs");
14579
+ const { Readable: Readable$1 } = __require("stream");
14580
+ const sysPath$3 = __require("path");
14581
+ const { promisify: promisify$4 } = __require("util");
14582
+ const picomatch$2 = __require("picomatch");
14806
14583
  const readdir$1 = promisify$4(fs$9.readdir);
14807
14584
  const stat$3 = promisify$4(fs$9.stat);
14808
14585
  const lstat$2 = promisify$4(fs$9.lstat);
@@ -15082,7 +14859,7 @@ var require_normalize_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
15082
14859
  //#region ../../node_modules/.pnpm/anymatch@3.1.3/node_modules/anymatch/index.js
15083
14860
  var require_anymatch = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/anymatch@3.1.3/node_modules/anymatch/index.js": ((exports, module) => {
15084
14861
  Object.defineProperty(exports, "__esModule", { value: true });
15085
- const picomatch$1 = require("picomatch");
14862
+ const picomatch$1 = __require("picomatch");
15086
14863
  const normalizePath$2 = require_normalize_path();
15087
14864
  /**
15088
14865
  * @typedef {(testString: string) => boolean} AnymatchFn
@@ -15274,8 +15051,8 @@ var require_is_glob = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/is-
15274
15051
  //#region ../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js
15275
15052
  var require_glob_parent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js": ((exports, module) => {
15276
15053
  var isGlob$1 = require_is_glob();
15277
- var pathPosixDirname = require("path").posix.dirname;
15278
- var isWin32 = require("os").platform() === "win32";
15054
+ var pathPosixDirname = __require("path").posix.dirname;
15055
+ var isWin32 = __require("os").platform() === "win32";
15279
15056
  var slash$1 = "/";
15280
15057
  var backslash = /\\/g;
15281
15058
  var enclosure = /[\{\[].*[\}\]]$/;
@@ -15625,7 +15402,7 @@ var require_to_regex_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
15625
15402
  //#endregion
15626
15403
  //#region ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js
15627
15404
  var require_fill_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js": ((exports, module) => {
15628
- const util = require("util");
15405
+ const util = __require("util");
15629
15406
  const toRegexRange = require_to_regex_range();
15630
15407
  const isObject$1 = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
15631
15408
  const transform$1 = (toNumber) => {
@@ -15848,11 +15625,11 @@ var require_expand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/brac
15848
15625
  const rangeLimit = options$1.rangeLimit === void 0 ? 1e3 : options$1.rangeLimit;
15849
15626
  const walk$3 = (node, parent = {}) => {
15850
15627
  node.queue = [];
15851
- let p$1 = parent;
15628
+ let p = parent;
15852
15629
  let q = parent.queue;
15853
- while (p$1.type !== "brace" && p$1.type !== "root" && p$1.parent) {
15854
- p$1 = p$1.parent;
15855
- q = p$1.queue;
15630
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
15631
+ p = p.parent;
15632
+ q = p.queue;
15856
15633
  }
15857
15634
  if (node.invalid || node.dollar) {
15858
15635
  q.push(append(q.pop(), stringify$2(node, options$1)));
@@ -16649,7 +16426,7 @@ var require_binary_extensions = /* @__PURE__ */ __commonJS({ "../../node_modules
16649
16426
  //#endregion
16650
16427
  //#region ../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js
16651
16428
  var require_is_binary_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js": ((exports, module) => {
16652
- const path$9 = require("path");
16429
+ const path$9 = __require("path");
16653
16430
  const binaryExtensions = require_binary_extensions();
16654
16431
  const extensions = new Set(binaryExtensions);
16655
16432
  module.exports = (filePath) => extensions.has(path$9.extname(filePath).slice(1).toLowerCase());
@@ -16658,9 +16435,9 @@ var require_is_binary_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
16658
16435
  //#endregion
16659
16436
  //#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/constants.js
16660
16437
  var require_constants$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/constants.js": ((exports) => {
16661
- const { sep: sep$1 } = require("path");
16438
+ const { sep: sep$1 } = __require("path");
16662
16439
  const { platform: platform$1 } = process;
16663
- const os$2 = require("os");
16440
+ const os$2 = __require("os");
16664
16441
  exports.EV_ALL = "all";
16665
16442
  exports.EV_READY = "ready";
16666
16443
  exports.EV_ADD = "add";
@@ -16723,9 +16500,9 @@ var require_constants$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
16723
16500
  //#endregion
16724
16501
  //#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/nodefs-handler.js
16725
16502
  var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/nodefs-handler.js": ((exports, module) => {
16726
- const fs$8 = require("fs");
16727
- const sysPath$2 = require("path");
16728
- const { promisify: promisify$3 } = require("util");
16503
+ const fs$8 = __require("fs");
16504
+ const sysPath$2 = __require("path");
16505
+ const { promisify: promisify$3 } = __require("util");
16729
16506
  const isBinaryPath = require_is_binary_path();
16730
16507
  const { isWindows: isWindows$3, isLinux, EMPTY_FN: EMPTY_FN$2, EMPTY_STR: EMPTY_STR$1, KEY_LISTENERS, KEY_ERR, KEY_RAW, HANDLER_KEYS, EV_CHANGE: EV_CHANGE$2, EV_ADD: EV_ADD$2, EV_ADD_DIR: EV_ADD_DIR$2, EV_ERROR: EV_ERROR$2, STR_DATA: STR_DATA$1, STR_END: STR_END$2, BRACE_START: BRACE_START$1, STAR } = require_constants$2();
16731
16508
  const THROTTLE_MODE_WATCH = "watch";
@@ -17187,12 +16964,12 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
17187
16964
  //#endregion
17188
16965
  //#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/fsevents-handler.js
17189
16966
  var require_fsevents_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/fsevents-handler.js": ((exports, module) => {
17190
- const fs$7 = require("fs");
17191
- const sysPath$1 = require("path");
17192
- const { promisify: promisify$2 } = require("util");
16967
+ const fs$7 = __require("fs");
16968
+ const sysPath$1 = __require("path");
16969
+ const { promisify: promisify$2 } = __require("util");
17193
16970
  let fsevents;
17194
16971
  try {
17195
- fsevents = require("fsevents");
16972
+ fsevents = __require("fsevents");
17196
16973
  } catch (error$1) {
17197
16974
  if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error$1);
17198
16975
  }
@@ -17526,10 +17303,10 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/
17526
17303
  //#endregion
17527
17304
  //#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/index.js
17528
17305
  var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/index.js": ((exports) => {
17529
- const { EventEmitter: EventEmitter$3 } = require("events");
17530
- const fs$6 = require("fs");
17531
- const sysPath = require("path");
17532
- const { promisify: promisify$1 } = require("util");
17306
+ const { EventEmitter: EventEmitter$3 } = __require("events");
17307
+ const fs$6 = __require("fs");
17308
+ const sysPath = __require("path");
17309
+ const { promisify: promisify$1 } = __require("util");
17533
17310
  const readdirp = require_readdirp();
17534
17311
  const anymatch = require_anymatch().default;
17535
17312
  const globParent = require_glob_parent();
@@ -17572,7 +17349,7 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
17572
17349
  * @type {Array<String>}
17573
17350
  */
17574
17351
  const paths = flatten(arrify(paths_));
17575
- if (!paths.every((p$1) => typeof p$1 === STRING_TYPE)) throw new TypeError(`Non-string provided as watch path: ${paths}`);
17352
+ if (!paths.every((p) => typeof p === STRING_TYPE)) throw new TypeError(`Non-string provided as watch path: ${paths}`);
17576
17353
  return paths.map(normalizePathToUnix);
17577
17354
  };
17578
17355
  const toUnix = (string) => {
@@ -18273,21 +18050,21 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
18273
18050
  r$2.lastIndex = origIndex;
18274
18051
  return matches$2;
18275
18052
  }
18276
- function getVar(env$2, pre, key) {
18277
- var r$2 = typeof env$2 === "function" ? env$2(key) : env$2[key];
18053
+ function getVar(env$1, pre, key) {
18054
+ var r$2 = typeof env$1 === "function" ? env$1(key) : env$1[key];
18278
18055
  if (typeof r$2 === "undefined" && key != "") r$2 = "";
18279
18056
  else if (typeof r$2 === "undefined") r$2 = "$";
18280
18057
  if (typeof r$2 === "object") return pre + TOKEN + JSON.stringify(r$2) + TOKEN;
18281
18058
  return pre + r$2;
18282
18059
  }
18283
- function parseInternal(string, env$2, opts) {
18060
+ function parseInternal(string, env$1, opts) {
18284
18061
  if (!opts) opts = {};
18285
18062
  var BS = opts.escape || "\\";
18286
18063
  var BAREWORD = "(\\" + BS + "['\"" + META + "]|[^\\s'\"" + META + "])+";
18287
18064
  var chunker = new RegExp(["(" + CONTROL + ")", "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+"].join("|"), "g");
18288
18065
  var matches$2 = matchAll(string, chunker);
18289
18066
  if (matches$2.length === 0) return [];
18290
- if (!env$2) env$2 = {};
18067
+ if (!env$1) env$1 = {};
18291
18068
  var commented = false;
18292
18069
  return matches$2.map(function(match) {
18293
18070
  var s$2 = match[0];
@@ -18324,7 +18101,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
18324
18101
  i$1 += varend.index - 1;
18325
18102
  }
18326
18103
  }
18327
- return getVar(env$2, "", varname);
18104
+ return getVar(env$1, "", varname);
18328
18105
  }
18329
18106
  for (i$1 = 0; i$1 < s$2.length; i$1++) {
18330
18107
  var c = s$2.charAt(i$1);
@@ -18361,9 +18138,9 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
18361
18138
  return typeof arg === "undefined" ? prev : prev.concat(arg);
18362
18139
  }, []);
18363
18140
  }
18364
- module.exports = function parse$17(s$2, env$2, opts) {
18365
- var mapped = parseInternal(s$2, env$2, opts);
18366
- if (typeof env$2 !== "function") return mapped;
18141
+ module.exports = function parse$17(s$2, env$1, opts) {
18142
+ var mapped = parseInternal(s$2, env$1, opts);
18143
+ if (typeof env$1 !== "function") return mapped;
18367
18144
  return mapped.reduce(function(acc, s$3) {
18368
18145
  if (typeof s$3 === "object") return acc.concat(s$3);
18369
18146
  var xs = s$3.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
@@ -18484,9 +18261,9 @@ var require_windows$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/l
18484
18261
  //#endregion
18485
18262
  //#region ../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/guess.js
18486
18263
  var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/guess.js": ((exports, module) => {
18487
- const path$8 = require("path");
18264
+ const path$8 = __require("path");
18488
18265
  const shellQuote = require_shell_quote();
18489
- const childProcess$2 = require("child_process");
18266
+ const childProcess$2 = __require("child_process");
18490
18267
  const COMMON_EDITORS_MACOS = require_macos();
18491
18268
  const COMMON_EDITORS_LINUX = require_linux();
18492
18269
  const COMMON_EDITORS_WIN = require_windows$1();
@@ -18547,7 +18324,7 @@ var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
18547
18324
  //#endregion
18548
18325
  //#region ../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/get-args.js
18549
18326
  var require_get_args = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/get-args.js": ((exports, module) => {
18550
- const path$7 = require("path");
18327
+ const path$7 = __require("path");
18551
18328
  module.exports = function getArgumentsForPosition$1(editor, fileName, lineNumber, columnNumber = 1) {
18552
18329
  const editorBasename = path$7.basename(editor).replace(/\.(exe|cmd|bat)$/i, "");
18553
18330
  switch (editorBasename) {
@@ -18636,11 +18413,11 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
18636
18413
  *
18637
18414
  * Modified by Yuxi Evan You
18638
18415
  */
18639
- const fs$5 = require("fs");
18640
- const os$1 = require("os");
18641
- const path$6 = require("path");
18416
+ const fs$5 = __require("fs");
18417
+ const os$1 = __require("os");
18418
+ const path$6 = __require("path");
18642
18419
  const colors$22 = require_picocolors();
18643
- const childProcess$1 = require("child_process");
18420
+ const childProcess$1 = __require("child_process");
18644
18421
  const guessEditor = require_guess();
18645
18422
  const getArgumentsForPosition = require_get_args();
18646
18423
  function wrapErrorCallback(cb) {
@@ -18665,7 +18442,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
18665
18442
  }
18666
18443
  const positionRE = /:(\d+)(:(\d+))?$/;
18667
18444
  function parseFile(file) {
18668
- if (file.startsWith("file://")) file = require("url").fileURLToPath(file);
18445
+ if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
18669
18446
  const fileName = file.replace(positionRE, "");
18670
18447
  const match = file.match(positionRE);
18671
18448
  const lineNumber = match && match[1];
@@ -18729,7 +18506,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
18729
18506
  //#endregion
18730
18507
  //#region ../../node_modules/.pnpm/launch-editor-middleware@2.11.1/node_modules/launch-editor-middleware/index.js
18731
18508
  var require_launch_editor_middleware = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor-middleware@2.11.1/node_modules/launch-editor-middleware/index.js": ((exports, module) => {
18732
- const path$5 = require("path");
18509
+ const path$5 = __require("path");
18733
18510
  const launch = require_launch_editor();
18734
18511
  module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
18735
18512
  if (typeof specifiedEditor === "function") {
@@ -19442,18 +19219,18 @@ function walk$1(root, { onIdentifier, onImportMeta, onDynamicImport, onStatement
19442
19219
  function isInScope(name, parents) {
19443
19220
  return parents.some((node) => scopeMap.get(node)?.has(name));
19444
19221
  }
19445
- function handlePattern(p$1, parentScope) {
19446
- if (p$1.type === "Identifier") setScope(parentScope, p$1.name);
19447
- else if (p$1.type === "RestElement") handlePattern(p$1.argument, parentScope);
19448
- else if (p$1.type === "ObjectPattern") p$1.properties.forEach((property) => {
19222
+ function handlePattern(p, parentScope) {
19223
+ if (p.type === "Identifier") setScope(parentScope, p.name);
19224
+ else if (p.type === "RestElement") handlePattern(p.argument, parentScope);
19225
+ else if (p.type === "ObjectPattern") p.properties.forEach((property) => {
19449
19226
  if (property.type === "RestElement") setScope(parentScope, property.argument.name);
19450
19227
  else handlePattern(property.value, parentScope);
19451
19228
  });
19452
- else if (p$1.type === "ArrayPattern") p$1.elements.forEach((element) => {
19229
+ else if (p.type === "ArrayPattern") p.elements.forEach((element) => {
19453
19230
  if (element) handlePattern(element, parentScope);
19454
19231
  });
19455
- else if (p$1.type === "AssignmentPattern") handlePattern(p$1.left, parentScope);
19456
- else setScope(parentScope, p$1.name);
19232
+ else if (p.type === "AssignmentPattern") handlePattern(p.left, parentScope);
19233
+ else setScope(parentScope, p.name);
19457
19234
  }
19458
19235
  walk(root, {
19459
19236
  enter(node, parent) {
@@ -19472,12 +19249,12 @@ function walk$1(root, { onIdentifier, onImportMeta, onDynamicImport, onStatement
19472
19249
  if (parentScope) setScope(parentScope, node.id.name);
19473
19250
  }
19474
19251
  if (node.type === "FunctionExpression" && node.id) setScope(node, node.id.name);
19475
- node.params.forEach((p$1) => {
19476
- if (p$1.type === "ObjectPattern" || p$1.type === "ArrayPattern") {
19477
- handlePattern(p$1, node);
19252
+ node.params.forEach((p) => {
19253
+ if (p.type === "ObjectPattern" || p.type === "ArrayPattern") {
19254
+ handlePattern(p, node);
19478
19255
  return;
19479
19256
  }
19480
- walk(p$1.type === "AssignmentPattern" ? p$1.left : p$1, { enter(child, parent$1) {
19257
+ walk(p.type === "AssignmentPattern" ? p.left : p, { enter(child, parent$1) {
19481
19258
  if (parent$1?.type === "AssignmentPattern" && parent$1.right === child) return this.skip();
19482
19259
  if (child.type !== "Identifier") return;
19483
19260
  if (isStaticPropertyKey(child, parent$1)) return;
@@ -19977,15 +19754,15 @@ var open_default = open;
19977
19754
  var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js": ((exports, module) => {
19978
19755
  module.exports = isexe$3;
19979
19756
  isexe$3.sync = sync$2;
19980
- var fs$4 = require("fs");
19757
+ var fs$4 = __require("fs");
19981
19758
  function checkPathExt(path$13, options$1) {
19982
19759
  var pathext = options$1.pathExt !== void 0 ? options$1.pathExt : process.env.PATHEXT;
19983
19760
  if (!pathext) return true;
19984
19761
  pathext = pathext.split(";");
19985
19762
  if (pathext.indexOf("") !== -1) return true;
19986
19763
  for (var i$1 = 0; i$1 < pathext.length; i$1++) {
19987
- var p$1 = pathext[i$1].toLowerCase();
19988
- if (p$1 && path$13.substr(-p$1.length).toLowerCase() === p$1) return true;
19764
+ var p = pathext[i$1].toLowerCase();
19765
+ if (p && path$13.substr(-p.length).toLowerCase() === p) return true;
19989
19766
  }
19990
19767
  return false;
19991
19768
  }
@@ -20008,7 +19785,7 @@ var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ise
20008
19785
  var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js": ((exports, module) => {
20009
19786
  module.exports = isexe$2;
20010
19787
  isexe$2.sync = sync$1;
20011
- var fs$3 = require("fs");
19788
+ var fs$3 = __require("fs");
20012
19789
  function isexe$2(path$13, options$1, cb) {
20013
19790
  fs$3.stat(path$13, function(er, stat$4) {
20014
19791
  cb(er, er ? false : checkStat(stat$4, options$1));
@@ -20038,7 +19815,7 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
20038
19815
  //#endregion
20039
19816
  //#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
20040
19817
  var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js": ((exports, module) => {
20041
- require("fs");
19818
+ __require("fs");
20042
19819
  var core;
20043
19820
  if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
20044
19821
  else core = require_mode();
@@ -20082,7 +19859,7 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
20082
19859
  //#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
20083
19860
  var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js": ((exports, module) => {
20084
19861
  const isWindows$1 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
20085
- const path$4 = require("path");
19862
+ const path$4 = __require("path");
20086
19863
  const COLON = isWindows$1 ? ";" : ":";
20087
19864
  const isexe = require_isexe();
20088
19865
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -20113,16 +19890,16 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
20113
19890
  const ppRaw = pathEnv[i$1];
20114
19891
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
20115
19892
  const pCmd = path$4.join(pathPart, cmd);
20116
- const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
20117
- resolve$4(subStep(p$1, i$1, 0));
19893
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
19894
+ resolve$4(subStep(p, i$1, 0));
20118
19895
  });
20119
- const subStep = (p$1, i$1, ii) => new Promise((resolve$4, reject) => {
19896
+ const subStep = (p, i$1, ii) => new Promise((resolve$4, reject) => {
20120
19897
  if (ii === pathExt.length) return resolve$4(step(i$1 + 1));
20121
19898
  const ext = pathExt[ii];
20122
- isexe(p$1 + ext, { pathExt: pathExtExe }, (er, is) => {
20123
- if (!er && is) if (opt.all) found$1.push(p$1 + ext);
20124
- else return resolve$4(p$1 + ext);
20125
- return resolve$4(subStep(p$1, i$1, ii + 1));
19899
+ isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
19900
+ if (!er && is) if (opt.all) found$1.push(p + ext);
19901
+ else return resolve$4(p + ext);
19902
+ return resolve$4(subStep(p, i$1, ii + 1));
20126
19903
  });
20127
19904
  });
20128
19905
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -20135,9 +19912,9 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
20135
19912
  const ppRaw = pathEnv[i$1];
20136
19913
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
20137
19914
  const pCmd = path$4.join(pathPart, cmd);
20138
- const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
19915
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
20139
19916
  for (let j = 0; j < pathExt.length; j++) {
20140
- const cur = p$1 + pathExt[j];
19917
+ const cur = p + pathExt[j];
20141
19918
  try {
20142
19919
  const is = isexe.sync(cur, { pathExt: pathExtExe });
20143
19920
  if (is) if (opt.all) found$1.push(cur);
@@ -20169,11 +19946,11 @@ var require_path_key = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pa
20169
19946
  //#endregion
20170
19947
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
20171
19948
  var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js": ((exports, module) => {
20172
- const path$3 = require("path");
19949
+ const path$3 = __require("path");
20173
19950
  const which = require_which();
20174
19951
  const getPathKey = require_path_key();
20175
19952
  function resolveCommandAttempt(parsed, withoutPathExt) {
20176
- const env$2 = parsed.options.env || process.env;
19953
+ const env$1 = parsed.options.env || process.env;
20177
19954
  const cwd = process.cwd();
20178
19955
  const hasCustomCwd = parsed.options.cwd != null;
20179
19956
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -20183,7 +19960,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
20183
19960
  let resolved;
20184
19961
  try {
20185
19962
  resolved = which.sync(parsed.command, {
20186
- path: env$2[getPathKey({ env: env$2 })],
19963
+ path: env$1[getPathKey({ env: env$1 })],
20187
19964
  pathExt: withoutPathExt ? path$3.delimiter : void 0
20188
19965
  });
20189
19966
  } catch (e$1) {} finally {
@@ -20242,7 +20019,7 @@ var require_shebang_command = /* @__PURE__ */ __commonJS({ "../../node_modules/.
20242
20019
  //#endregion
20243
20020
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
20244
20021
  var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js": ((exports, module) => {
20245
- const fs$2 = require("fs");
20022
+ const fs$2 = __require("fs");
20246
20023
  const shebangCommand = require_shebang_command();
20247
20024
  function readShebang$1(command) {
20248
20025
  const size = 150;
@@ -20261,7 +20038,7 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
20261
20038
  //#endregion
20262
20039
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
20263
20040
  var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
20264
- const path$2 = require("path");
20041
+ const path$2 = __require("path");
20265
20042
  const resolveCommand = require_resolveCommand();
20266
20043
  const escape$1 = require_escape();
20267
20044
  const readShebang = require_readShebang();
@@ -20364,7 +20141,7 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
20364
20141
  //#endregion
20365
20142
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
20366
20143
  var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js": ((exports, module) => {
20367
- const cp = require("child_process");
20144
+ const cp = __require("child_process");
20368
20145
  const parse$5 = require_parse();
20369
20146
  const enoent = require_enoent();
20370
20147
  function spawn$1(command, args, options$1) {
@@ -20727,7 +20504,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
20727
20504
  };
20728
20505
  /* istanbul ignore else */
20729
20506
  if (!process.env.WS_NO_BUFFER_UTIL) try {
20730
- const bufferUtil$1 = require("bufferutil");
20507
+ const bufferUtil$1 = __require("bufferutil");
20731
20508
  module.exports.mask = function(source, mask, output, offset$1, length) {
20732
20509
  if (length < 48) _mask(source, mask, output, offset$1, length);
20733
20510
  else bufferUtil$1.mask(source, mask, output, offset$1, length);
@@ -20794,7 +20571,7 @@ var require_limiter = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@
20794
20571
  //#endregion
20795
20572
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js
20796
20573
  var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js": ((exports, module) => {
20797
- const zlib$1 = require("zlib");
20574
+ const zlib$1 = __require("zlib");
20798
20575
  const bufferUtil = require_buffer_util();
20799
20576
  const Limiter = require_limiter();
20800
20577
  const { kStatusCode: kStatusCode$2 } = require_constants$1();
@@ -21131,7 +20908,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
21131
20908
  //#endregion
21132
20909
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js
21133
20910
  var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js": ((exports, module) => {
21134
- const { isUtf8 } = require("buffer");
20911
+ const { isUtf8 } = __require("buffer");
21135
20912
  const { hasBlob } = require_constants$1();
21136
20913
  const tokenChars$2 = [
21137
20914
  0,
@@ -21318,7 +21095,7 @@ var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
21318
21095
  return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
21319
21096
  };
21320
21097
  else if (!process.env.WS_NO_UTF_8_VALIDATE) try {
21321
- const isValidUTF8$1 = require("utf-8-validate");
21098
+ const isValidUTF8$1 = __require("utf-8-validate");
21322
21099
  module.exports.isValidUTF8 = function(buf) {
21323
21100
  return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8$1(buf);
21324
21101
  };
@@ -21328,7 +21105,7 @@ var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
21328
21105
  //#endregion
21329
21106
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js
21330
21107
  var require_receiver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js": ((exports, module) => {
21331
- const { Writable: Writable$1 } = require("stream");
21108
+ const { Writable: Writable$1 } = __require("stream");
21332
21109
  const PerMessageDeflate$3 = require_permessage_deflate();
21333
21110
  const { BINARY_TYPES: BINARY_TYPES$1, EMPTY_BUFFER: EMPTY_BUFFER$2, kStatusCode: kStatusCode$1, kWebSocket: kWebSocket$3 } = require_constants$1();
21334
21111
  const { concat, toArrayBuffer, unmask } = require_buffer_util();
@@ -21794,8 +21571,8 @@ var require_receiver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws
21794
21571
  //#endregion
21795
21572
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js
21796
21573
  var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js": ((exports, module) => {
21797
- const { Duplex: Duplex$3 } = require("stream");
21798
- const { randomFillSync } = require("crypto");
21574
+ const { Duplex: Duplex$3 } = __require("stream");
21575
+ const { randomFillSync } = __require("crypto");
21799
21576
  const PerMessageDeflate$2 = require_permessage_deflate();
21800
21577
  const { EMPTY_BUFFER: EMPTY_BUFFER$1, kWebSocket: kWebSocket$2, NOOP: NOOP$2 } = require_constants$1();
21801
21578
  const { isBlob: isBlob$1, isValidStatusCode } = require_validation();
@@ -22655,14 +22432,14 @@ var require_extension = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
22655
22432
  //#endregion
22656
22433
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js
22657
22434
  var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js": ((exports, module) => {
22658
- const EventEmitter$2 = require("events");
22659
- const https$4 = require("https");
22660
- const http$5 = require("http");
22661
- const net$1 = require("net");
22662
- const tls = require("tls");
22663
- const { randomBytes, createHash: createHash$1 } = require("crypto");
22664
- const { Duplex: Duplex$2, Readable } = require("stream");
22665
- const { URL: URL$3 } = require("url");
22435
+ const EventEmitter$2 = __require("events");
22436
+ const https$4 = __require("https");
22437
+ const http$5 = __require("http");
22438
+ const net$1 = __require("net");
22439
+ const tls = __require("tls");
22440
+ const { randomBytes, createHash: createHash$1 } = __require("crypto");
22441
+ const { Duplex: Duplex$2, Readable } = __require("stream");
22442
+ const { URL: URL$3 } = __require("url");
22666
22443
  const PerMessageDeflate$1 = require_permessage_deflate();
22667
22444
  const Receiver$1 = require_receiver();
22668
22445
  const Sender$1 = require_sender();
@@ -23629,7 +23406,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
23629
23406
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js
23630
23407
  var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js": ((exports, module) => {
23631
23408
  require_websocket();
23632
- const { Duplex: Duplex$1 } = require("stream");
23409
+ const { Duplex: Duplex$1 } = __require("stream");
23633
23410
  /**
23634
23411
  * Emits the `'close'` event on a stream.
23635
23412
  *
@@ -23785,10 +23562,10 @@ var require_subprotocol = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
23785
23562
  //#endregion
23786
23563
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js
23787
23564
  var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js": ((exports, module) => {
23788
- const EventEmitter$1 = require("events");
23789
- const http$4 = require("http");
23790
- const { Duplex } = require("stream");
23791
- const { createHash } = require("crypto");
23565
+ const EventEmitter$1 = __require("events");
23566
+ const http$4 = __require("http");
23567
+ const { Duplex } = __require("stream");
23568
+ const { createHash } = __require("crypto");
23792
23569
  const extension = require_extension();
23793
23570
  const PerMessageDeflate = require_permessage_deflate();
23794
23571
  const subprotocol = require_subprotocol();
@@ -24512,7 +24289,7 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
24512
24289
  exports.urlJoin = urlJoin;
24513
24290
  exports.rewriteCookieProperty = rewriteCookieProperty;
24514
24291
  exports.toURL = toURL;
24515
- const tls_1 = require("tls");
24292
+ const tls_1 = __require("tls");
24516
24293
  const upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i;
24517
24294
  exports.isSSL = /^https|wss/;
24518
24295
  const HEADER_BLACKLIST = "trailer";
@@ -24765,12 +24542,12 @@ var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follo
24765
24542
  //#endregion
24766
24543
  //#region ../../node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.1/node_modules/follow-redirects/index.js
24767
24544
  var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.1/node_modules/follow-redirects/index.js": ((exports, module) => {
24768
- var url = require("url");
24545
+ var url = __require("url");
24769
24546
  var URL$2 = url.URL;
24770
- var http$3 = require("http");
24771
- var https$3 = require("https");
24772
- var Writable = require("stream").Writable;
24773
- var assert$1 = require("assert");
24547
+ var http$3 = __require("http");
24548
+ var https$3 = __require("https");
24549
+ var Writable = __require("stream").Writable;
24550
+ var assert$1 = __require("assert");
24774
24551
  var debug$6 = require_debug();
24775
24552
  // istanbul ignore next
24776
24553
  (function detectUnsupportedEnvironment() {
@@ -25245,8 +25022,8 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
25245
25022
  exports.timeout = timeout;
25246
25023
  exports.XHeaders = XHeaders$1;
25247
25024
  exports.stream = stream$1;
25248
- const http$2 = __importStar$2(require("http"));
25249
- const https$2 = __importStar$2(require("https"));
25025
+ const http$2 = __importStar$2(__require("http"));
25026
+ const https$2 = __importStar$2(__require("https"));
25250
25027
  const web_outgoing_1 = require_web_outgoing();
25251
25028
  const common$1 = __importStar$2(require_common());
25252
25029
  const followRedirects = __importStar$2(require_follow_redirects());
@@ -25394,8 +25171,8 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
25394
25171
  exports.checkMethodAndHeader = checkMethodAndHeader;
25395
25172
  exports.XHeaders = XHeaders;
25396
25173
  exports.stream = stream;
25397
- const http$1 = __importStar$1(require("http"));
25398
- const https$1 = __importStar$1(require("https"));
25174
+ const http$1 = __importStar$1(__require("http"));
25175
+ const https$1 = __importStar$1(__require("https"));
25399
25176
  const common = __importStar$1(require_common());
25400
25177
  const debug_1$1 = __importDefault$1(require_node$1());
25401
25178
  const log$1 = (0, debug_1$1.default)("http-proxy-3:ws-incoming");
@@ -25449,7 +25226,7 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
25449
25226
  const proxySockets = [];
25450
25227
  socketCounter({ add: socket });
25451
25228
  const cleanUpProxySockets = () => {
25452
- for (const p$1 of proxySockets) p$1.end();
25229
+ for (const p of proxySockets) p.end();
25453
25230
  };
25454
25231
  socket.on("close", () => {
25455
25232
  socketCounter({ rm: socket });
@@ -25557,11 +25334,11 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
25557
25334
  };
25558
25335
  Object.defineProperty(exports, "__esModule", { value: true });
25559
25336
  exports.ProxyServer = void 0;
25560
- const http = __importStar(require("http"));
25561
- const https = __importStar(require("https"));
25337
+ const http = __importStar(__require("http"));
25338
+ const https = __importStar(__require("https"));
25562
25339
  const web_incoming_1 = require_web_incoming();
25563
25340
  const ws_incoming_1$1 = require_ws_incoming();
25564
- const events_1 = require("events");
25341
+ const events_1 = __require("events");
25565
25342
  const debug_1 = __importDefault(require_node$1());
25566
25343
  const common_1 = require_common();
25567
25344
  const log = (0, debug_1.default)("http-proxy-3");
@@ -25930,8 +25707,8 @@ var require_etag = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/etag@1
25930
25707
  * Module dependencies.
25931
25708
  * @private
25932
25709
  */
25933
- var crypto$1 = require("crypto");
25934
- var Stats = require("fs").Stats;
25710
+ var crypto$1 = __require("crypto");
25711
+ var Stats = __require("fs").Stats;
25935
25712
  /**
25936
25713
  * Module variables.
25937
25714
  * @private
@@ -26834,7 +26611,7 @@ function traverseNodes(node, visitor) {
26834
26611
  if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
26835
26612
  }
26836
26613
  async function traverseHtml(html, filePath, warn, visitor) {
26837
- const { parse: parse$17 } = await import("./dep-V5uAjiuB.js");
26614
+ const { parse: parse$17 } = await import("./dep-UEPspf5j.js");
26838
26615
  const warnings = {};
26839
26616
  const ast = parse$17(html, {
26840
26617
  scriptingEnabled: false,
@@ -26852,16 +26629,16 @@ function getScriptInfo(node) {
26852
26629
  let isModule = false;
26853
26630
  let isAsync = false;
26854
26631
  let isIgnored = false;
26855
- for (const p$1 of node.attrs) {
26856
- if (p$1.prefix !== void 0) continue;
26857
- if (p$1.name === "src") {
26632
+ for (const p of node.attrs) {
26633
+ if (p.prefix !== void 0) continue;
26634
+ if (p.name === "src") {
26858
26635
  if (!src) {
26859
- src = p$1;
26636
+ src = p;
26860
26637
  srcSourceCodeLocation = node.sourceCodeLocation?.attrs["src"];
26861
26638
  }
26862
- } else if (p$1.name === "type" && p$1.value === "module") isModule = true;
26863
- else if (p$1.name === "async") isAsync = true;
26864
- else if (p$1.name === "vite-ignore") isIgnored = true;
26639
+ } else if (p.name === "type" && p.value === "module") isModule = true;
26640
+ else if (p.name === "async") isAsync = true;
26641
+ else if (p.name === "vite-ignore") isIgnored = true;
26865
26642
  }
26866
26643
  return {
26867
26644
  src,
@@ -26911,7 +26688,7 @@ function handleParseError(parserError, html, filePath, warnings) {
26911
26688
  case "unexpected-question-mark-instead-of-tag-name": return;
26912
26689
  }
26913
26690
  const parseError = formatParseError(parserError, filePath, html);
26914
- warnings[parseError.code] ??= `Unable to parse HTML; ${parseError.message}\n at ${parseError.loc.file}:${parseError.loc.line}:${parseError.loc.column}\n${parseError.frame.length > 300 ? "[this code frame is omitted as the content was too long] " : parseError.frame}`;
26691
+ warnings[parseError.code] ??= `Unable to parse HTML; ${parseError.message}\n at ${parseError.loc.file}:${parseError.loc.line}:${parseError.loc.column}\n` + parseError.frame;
26915
26692
  }
26916
26693
  /**
26917
26694
  * Compiles index.html into an entry js module
@@ -27319,20 +27096,20 @@ function injectCspNonceMetaTagHook(config$2) {
27319
27096
  function htmlEnvHook(config$2) {
27320
27097
  const pattern = /%(\S+?)%/g;
27321
27098
  const envPrefix = resolveEnvPrefix({ envPrefix: config$2.envPrefix });
27322
- const env$2 = { ...config$2.env };
27099
+ const env$1 = { ...config$2.env };
27323
27100
  for (const key in config$2.define) if (key.startsWith(`import.meta.env.`)) {
27324
27101
  const val = config$2.define[key];
27325
27102
  if (typeof val === "string") try {
27326
27103
  const parsed = JSON.parse(val);
27327
- env$2[key.slice(16)] = typeof parsed === "string" ? parsed : val;
27104
+ env$1[key.slice(16)] = typeof parsed === "string" ? parsed : val;
27328
27105
  } catch {
27329
- env$2[key.slice(16)] = val;
27106
+ env$1[key.slice(16)] = val;
27330
27107
  }
27331
- else env$2[key.slice(16)] = JSON.stringify(val);
27108
+ else env$1[key.slice(16)] = JSON.stringify(val);
27332
27109
  }
27333
27110
  return (html, ctx) => {
27334
27111
  return html.replace(pattern, (text, key) => {
27335
- if (key in env$2) return env$2[key];
27112
+ if (key in env$1) return env$1[key];
27336
27113
  else {
27337
27114
  if (envPrefix.some((prefix) => key.startsWith(prefix))) {
27338
27115
  const relativeHtml = normalizePath(path.relative(config$2.root, ctx.filename));
@@ -27613,7 +27390,7 @@ function transformMiddleware(server) {
27613
27390
  }
27614
27391
  }
27615
27392
  const result = await environment.transformRequest(url$3, { allowId(id) {
27616
- return id.startsWith("\0") || !isServerAccessDeniedForTransform(server.config, id);
27393
+ return id[0] === "\0" || !isServerAccessDeniedForTransform(server.config, id);
27617
27394
  } });
27618
27395
  if (result) {
27619
27396
  const depsOptimizer = environment.depsOptimizer;
@@ -28508,8 +28285,8 @@ async function _createServer(inlineConfig = {}, options$1) {
28508
28285
  warnFutureDeprecation(config$2, "removeServerPluginContainer");
28509
28286
  return pluginContainer;
28510
28287
  },
28511
- set pluginContainer(p$1) {
28512
- pluginContainer = p$1;
28288
+ set pluginContainer(p) {
28289
+ pluginContainer = p;
28513
28290
  },
28514
28291
  get moduleGraph() {
28515
28292
  warnFutureDeprecation(config$2, "removeServerModuleGraph");
@@ -29639,7 +29416,7 @@ async function bundleWorkerEntry(config$2, id) {
29639
29416
  const bundle = await rollup({
29640
29417
  ...rollupOptions,
29641
29418
  input,
29642
- plugins: workerEnvironment.plugins.map((p$1) => injectEnvironmentToHooks(workerEnvironment, p$1)),
29419
+ plugins: workerEnvironment.plugins.map((p) => injectEnvironmentToHooks(workerEnvironment, p)),
29643
29420
  onLog(level, log$4) {
29644
29421
  onRollupLog(level, log$4, workerEnvironment);
29645
29422
  },
@@ -30044,13 +29821,13 @@ function importAnalysisPlugin(config$2) {
30044
29821
  const userDefineEnv = {};
30045
29822
  for (const key in config$2.env) importMetaEnvKeys[key] = JSON.stringify(config$2.env[key]);
30046
29823
  for (const key in config$2.define) if (key.startsWith("import.meta.env.")) userDefineEnv[key.slice(16)] = config$2.define[key];
30047
- const env$2 = `import.meta.env = ${serializeDefine({
29824
+ const env$1 = `import.meta.env = ${serializeDefine({
30048
29825
  ...importMetaEnvKeys,
30049
29826
  SSR: "__vite_ssr__",
30050
29827
  ...userDefineEnv
30051
29828
  })};`;
30052
- _ssrEnv = env$2.replace("__vite_ssr__", "true");
30053
- _env = env$2.replace("__vite_ssr__", "false");
29829
+ _ssrEnv = env$1.replace("__vite_ssr__", "true");
29830
+ _env = env$1.replace("__vite_ssr__", "false");
30054
29831
  }
30055
29832
  return ssr ? _ssrEnv : _env;
30056
29833
  }
@@ -30114,16 +29891,7 @@ function importAnalysisPlugin(config$2) {
30114
29891
  return this.error(`Failed to resolve import "${url$3}" from "${normalizePath(path.relative(process.cwd(), importerFile))}". Does the file exist?`, pos);
30115
29892
  }
30116
29893
  if (isExternalUrl(resolved.id)) return [resolved.id, resolved.id];
30117
- const isRelative$1 = url$3[0] === ".";
30118
- const isSelfImport = !isRelative$1 && cleanUrl(url$3) === cleanUrl(importer);
30119
29894
  url$3 = normalizeResolvedIdToUrl(environment, url$3, resolved);
30120
- if (environment.config.consumer === "client") {
30121
- if (isExplicitImportRequired(url$3)) url$3 = injectQuery(url$3, "import");
30122
- else if ((isRelative$1 || isSelfImport) && !DEP_VERSION_RE.test(url$3)) {
30123
- const versionMatch = DEP_VERSION_RE.exec(importer);
30124
- if (versionMatch) url$3 = injectQuery(url$3, versionMatch[1]);
30125
- }
30126
- }
30127
29895
  try {
30128
29896
  const depModule = await moduleGraph._ensureEntryFromUrl(unwrapId(url$3), canSkipImportAnalysis(url$3) || forceSkipImportAnalysis, resolved);
30129
29897
  if (environment.config.consumer === "client" && depModule.lastHMRTimestamp > 0) url$3 = injectQuery(url$3, `t=${depModule.lastHMRTimestamp}`);
@@ -30131,6 +29899,15 @@ function importAnalysisPlugin(config$2) {
30131
29899
  e$1.pos = pos;
30132
29900
  throw e$1;
30133
29901
  }
29902
+ if (environment.config.consumer === "client") {
29903
+ const isRelative$1 = url$3[0] === ".";
29904
+ const isSelfImport = !isRelative$1 && cleanUrl(url$3) === cleanUrl(importer);
29905
+ if (isExplicitImportRequired(url$3)) url$3 = injectQuery(url$3, "import");
29906
+ else if ((isRelative$1 || isSelfImport) && !DEP_VERSION_RE.test(url$3)) {
29907
+ const versionMatch = DEP_VERSION_RE.exec(importer);
29908
+ if (versionMatch) url$3 = injectQuery(url$3, versionMatch[1]);
29909
+ }
29910
+ }
30134
29911
  if (!ssr) url$3 = joinUrlSegments(base, url$3);
30135
29912
  return [url$3, resolved.id];
30136
29913
  };
@@ -30684,7 +30461,7 @@ function assetImportMetaUrlPlugin(config$2) {
30684
30461
  transform: {
30685
30462
  filter: {
30686
30463
  id: { exclude: [exactRegex(preloadHelperId), exactRegex(CLIENT_ENTRY)] },
30687
- code: /new\s+URL.+import\.meta\.url/
30464
+ code: /new\s+URL.+import\.meta\.url/s
30688
30465
  },
30689
30466
  async handler(code, id) {
30690
30467
  let s$2;
@@ -30705,7 +30482,7 @@ function assetImportMetaUrlPlugin(config$2) {
30705
30482
  const templateLiteral = ast.body[0].expression;
30706
30483
  if (templateLiteral.expressions.length) {
30707
30484
  const pattern = buildGlobPattern(templateLiteral);
30708
- if (pattern.startsWith("*")) continue;
30485
+ if (pattern[0] === "*") continue;
30709
30486
  const globOptions = {
30710
30487
  eager: true,
30711
30488
  import: "default",
@@ -31027,8 +30804,8 @@ function normalizeFilter(filter$1) {
31027
30804
  function createIdFilter(filter$1, cwd = process.cwd()) {
31028
30805
  if (!filter$1) return;
31029
30806
  const { exclude, include } = normalizeFilter(filter$1);
31030
- const excludeFilter = exclude?.map((p$1) => patternToIdFilter(p$1, cwd));
31031
- const includeFilter = include?.map((p$1) => patternToIdFilter(p$1, cwd));
30807
+ const excludeFilter = exclude?.map((p) => patternToIdFilter(p, cwd));
30808
+ const includeFilter = include?.map((p) => patternToIdFilter(p, cwd));
31032
30809
  return createFilter$1(excludeFilter, includeFilter);
31033
30810
  }
31034
30811
  function createCodeFilter(filter$1) {
@@ -31056,7 +30833,7 @@ function createFilterForTransform(idFilter, codeFilter, cwd) {
31056
30833
  async function resolvePlugins(config$2, prePlugins, normalPlugins, postPlugins) {
31057
30834
  const isBuild = config$2.command === "build";
31058
30835
  const isWorker = config$2.isWorker;
31059
- const buildPlugins = isBuild ? await (await import("./dep-B6kJvLFS.js")).resolveBuildPlugins(config$2) : {
30836
+ const buildPlugins = isBuild ? await (await import("./dep-TDFDwW_9.js")).resolveBuildPlugins(config$2) : {
31060
30837
  pre: [],
31061
30838
  post: []
31062
30839
  };
@@ -31117,7 +30894,7 @@ function createPluginHookUtils(plugins$1) {
31117
30894
  }
31118
30895
  function getSortedPluginHooks(hookName) {
31119
30896
  const plugins$2 = getSortedPlugins(hookName);
31120
- return plugins$2.map((p$1) => getHookHandler(p$1[hookName])).filter(Boolean);
30897
+ return plugins$2.map((p) => getHookHandler(p[hookName])).filter(Boolean);
31121
30898
  }
31122
30899
  return {
31123
30900
  getSortedPlugins,
@@ -32026,7 +31803,12 @@ function cssPlugin(config$2) {
32026
31803
  let resolved = await resolveUrl$1(id$1, importer);
32027
31804
  if (resolved) {
32028
31805
  if (fragment) resolved += "#" + fragment;
32029
- return [await fileToUrl$1(this, resolved), resolved];
31806
+ let url$4 = await fileToUrl$1(this, resolved);
31807
+ if (!url$4.startsWith("data:") && this.environment.mode === "dev") {
31808
+ const mod = [...this.environment.moduleGraph.getModulesByFile(resolved) ?? []].find((mod$1) => mod$1.type === "asset");
31809
+ if (mod?.lastHMRTimestamp) url$4 = injectQuery(url$4, `t=${mod.lastHMRTimestamp}`);
31810
+ }
31811
+ return [url$4, resolved];
32030
31812
  }
32031
31813
  if (config$2.command === "build") {
32032
31814
  const isExternal$1 = config$2.build.rollupOptions.external ? resolveUserExternal(config$2.build.rollupOptions.external, decodedUrl, id$1, false) : false;
@@ -32150,10 +31932,10 @@ function cssPostPlugin(config$2) {
32150
31932
  },
32151
31933
  async renderChunk(code, chunk, opts, meta) {
32152
31934
  let chunkCSS;
32153
- const renderedModules = new Proxy({}, { get(_target, p$1) {
31935
+ const renderedModules = new Proxy({}, { get(_target, p) {
32154
31936
  for (const name in meta.chunks) {
32155
31937
  const modules = meta.chunks[name].modules;
32156
- const module$1 = modules[p$1];
31938
+ const module$1 = modules[p];
32157
31939
  if (module$1) return module$1;
32158
31940
  }
32159
31941
  } });
@@ -32656,8 +32438,8 @@ function createCachedImport(imp) {
32656
32438
  return cached;
32657
32439
  };
32658
32440
  }
32659
- const importPostcssImport = createCachedImport(() => import("./dep-G9cgWHwY.js").then(__toDynamicImportESM(1)));
32660
- const importPostcssModules = createCachedImport(() => import("./dep-BeJ5EQ78.js").then(__toDynamicImportESM(1)));
32441
+ const importPostcssImport = createCachedImport(() => import("./dep-C9NktISv.js").then(__toDynamicImportESM(1)));
32442
+ const importPostcssModules = createCachedImport(() => import("./dep-XdVlHtXy.js").then(__toDynamicImportESM(1)));
32661
32443
  const importPostcss = createCachedImport(() => import("postcss"));
32662
32444
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
32663
32445
  let alwaysFakeWorkerWorkerControllerCache;
@@ -32751,7 +32533,7 @@ const UrlRewritePostcssPlugin = (opts) => {
32751
32533
  if (isCssUrl || isCssImageSet) {
32752
32534
  const replacerForDeclaration = async (rawUrl) => {
32753
32535
  const [newUrl, resolvedId] = await opts.resolver(rawUrl, importer);
32754
- if (newUrl.startsWith("data:") && resolvedId) opts.deps.add(resolvedId);
32536
+ if (resolvedId) opts.deps.add(resolvedId);
32755
32537
  return newUrl;
32756
32538
  };
32757
32539
  if (isCssUrl && isCssImageSet) promises$2.push(rewriteCssUrls(declaration.value, replacerForDeclaration).then((url$3) => rewriteCssImageSet(url$3, replacerForDeclaration)).then((url$3) => {
@@ -33122,9 +32904,8 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
33122
32904
  contents: "contents" in result ? result.contents : void 0
33123
32905
  };
33124
32906
  };
33125
- const worker = new WorkerWithFallback(() => {
33126
- const fsp$1 = require("node:fs/promises");
33127
- const path$13 = require("node:path");
32907
+ const worker = new WorkerWithFallback(async () => {
32908
+ const [fsp$1, path$13] = await Promise.all([import("node:fs/promises"), import("node:path")]);
33128
32909
  let ViteLessManager;
33129
32910
  const createViteLessPlugin = (less, rootFile) => {
33130
32911
  const { FileManager } = less;
@@ -33140,13 +32921,13 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
33140
32921
  supportsSync() {
33141
32922
  return false;
33142
32923
  }
33143
- async loadFile(filename, dir, opts, env$2) {
32924
+ async loadFile(filename, dir, opts, env$1) {
33144
32925
  const result = await viteLessResolve(filename, dir, this.rootFile, opts.mime);
33145
32926
  if (result) return {
33146
32927
  filename: path$13.resolve(result.resolved),
33147
32928
  contents: result.contents ?? await fsp$1.readFile(result.resolved, "utf-8")
33148
32929
  };
33149
- else return super.loadFile(filename, dir, opts, env$2);
32930
+ else return super.loadFile(filename, dir, opts, env$1);
33150
32931
  }
33151
32932
  };
33152
32933
  return {
@@ -33161,7 +32942,7 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
33161
32942
  };
33162
32943
  };
33163
32944
  return async (lessPath, content, options$1) => {
33164
- const nodeLess = require(lessPath);
32945
+ const nodeLess = (await import(lessPath)).default;
33165
32946
  const viteResolverPlugin = createViteLessPlugin(nodeLess, options$1.filename);
33166
32947
  const result = await nodeLess.render(content, {
33167
32948
  paths: ["node_modules"],
@@ -33190,7 +32971,7 @@ const lessProcessor = (maxWorkers) => {
33190
32971
  worker?.stop();
33191
32972
  },
33192
32973
  async process(environment, source, root, options$1, resolvers) {
33193
- const lessPath = loadPreprocessorPath(PreprocessLang.less, root);
32974
+ const lessPath = pathToFileURL(loadPreprocessorPath(PreprocessLang.less, root)).href;
33194
32975
  worker ??= makeLessWorker(environment, resolvers, maxWorkers);
33195
32976
  const { content, map: additionalMap } = await getSource(source, options$1.filename, options$1.additionalData, options$1.enableSourcemap);
33196
32977
  let result;
@@ -33228,7 +33009,7 @@ const lessProcessor = (maxWorkers) => {
33228
33009
  const makeStylWorker = (maxWorkers) => {
33229
33010
  const worker = new WorkerWithFallback(() => {
33230
33011
  return async (stylusPath, content, root, options$1) => {
33231
- const nodeStylus = require(stylusPath);
33012
+ const nodeStylus = (await import(stylusPath)).default;
33232
33013
  const ref = nodeStylus(content, {
33233
33014
  paths: ["node_modules"],
33234
33015
  ...options$1
@@ -33260,7 +33041,7 @@ const stylProcessor = (maxWorkers) => {
33260
33041
  worker?.stop();
33261
33042
  },
33262
33043
  async process(_environment, source, root, options$1, _resolvers) {
33263
- const stylusPath = loadPreprocessorPath(PreprocessLang.stylus, root);
33044
+ const stylusPath = pathToFileURL(loadPreprocessorPath(PreprocessLang.stylus, root)).href;
33264
33045
  worker ??= makeStylWorker(maxWorkers);
33265
33046
  const { content, map: additionalMap } = await getSource(source, options$1.filename, options$1.additionalData, options$1.enableSourcemap, "\n");
33266
33047
  const importsDeps = (options$1.imports ?? []).map((dep) => path.resolve(dep));
@@ -33292,7 +33073,7 @@ const stylProcessor = (maxWorkers) => {
33292
33073
  function formatStylusSourceMap(mapBefore, root) {
33293
33074
  if (!mapBefore) return void 0;
33294
33075
  const map$1 = { ...mapBefore };
33295
- const resolveFromRoot = (p$1) => normalizePath(path.resolve(root, p$1));
33076
+ const resolveFromRoot = (p) => normalizePath(path.resolve(root, p));
33296
33077
  if (map$1.file) map$1.file = resolveFromRoot(map$1.file);
33297
33078
  map$1.sources = map$1.sources.map(resolveFromRoot);
33298
33079
  return map$1;
@@ -33452,7 +33233,7 @@ async function compileLightningCSS(environment, id, src, deps, workerController,
33452
33233
  if (skipUrlReplacer(dep.url)) replaceUrl = dep.url;
33453
33234
  else if (urlResolver) {
33454
33235
  const [newUrl, resolvedId] = await urlResolver(dep.url, dep.loc.filePath.replace(NULL_BYTE_PLACEHOLDER, "\0"));
33455
- if (newUrl.startsWith("data:") && resolvedId) deps.add(resolvedId);
33236
+ if (resolvedId) deps.add(resolvedId);
33456
33237
  replaceUrl = newUrl;
33457
33238
  } else replaceUrl = dep.url;
33458
33239
  css = css.replace(dep.placeholder, () => replaceUrl.replaceAll("\"", "\\\""));
@@ -33640,7 +33421,7 @@ function preload(baseModule, deps, importerUrl) {
33640
33421
  const cspNonceMeta = document.querySelector("meta[property=csp-nonce]");
33641
33422
  const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute("nonce");
33642
33423
  function allSettled(promises$2) {
33643
- return Promise.all(promises$2.map((p$1) => Promise.resolve(p$1).then((value$1) => ({
33424
+ return Promise.all(promises$2.map((p) => Promise.resolve(p).then((value$1) => ({
33644
33425
  status: "fulfilled",
33645
33426
  value: value$1
33646
33427
  }), (reason) => ({
@@ -34261,7 +34042,7 @@ function resolveRollupOptions(environment) {
34261
34042
  const libOptions = options$1.lib;
34262
34043
  const { logger } = environment;
34263
34044
  const ssr = environment.config.consumer === "server";
34264
- const resolve$4 = (p$1) => path.resolve(root, p$1);
34045
+ const resolve$4 = (p) => path.resolve(root, p);
34265
34046
  const input = libOptions ? options$1.rollupOptions.input || (typeof libOptions.entry === "string" ? resolve$4(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve$4) : Object.fromEntries(Object.entries(libOptions.entry).map(([alias$2, file]) => [alias$2, resolve$4(file)]))) : typeof options$1.ssr === "string" ? resolve$4(options$1.ssr) : options$1.rollupOptions.input || resolve$4("index.html");
34266
34047
  if (ssr && typeof input === "string" && input.endsWith(".html")) throw new Error("rollupOptions.input should not be an html file when building for SSR. Please specify a dedicated SSR entry.");
34267
34048
  if (options$1.cssCodeSplit === false) {
@@ -34269,7 +34050,7 @@ function resolveRollupOptions(environment) {
34269
34050
  if (inputs.some((input$1) => input$1.endsWith(".css"))) throw new Error(`When "build.cssCodeSplit: false" is set, "rollupOptions.input" should not include CSS files.`);
34270
34051
  }
34271
34052
  const outDir = resolve$4(options$1.outDir);
34272
- const plugins$1 = environment.plugins.map((p$1) => injectEnvironmentToHooks(environment, p$1));
34053
+ const plugins$1 = environment.plugins.map((p) => injectEnvironmentToHooks(environment, p));
34273
34054
  const rollupOptions = {
34274
34055
  preserveEntrySignatures: ssr ? "allow-extension" : libOptions ? "strict" : false,
34275
34056
  cache: options$1.watch ? void 0 : false,
@@ -34707,8 +34488,8 @@ async function createBuilder(inlineConfig = {}, useLegacyBuilder = false) {
34707
34488
  watchMode: false
34708
34489
  }, config$2.logger);
34709
34490
  let configBuilderBuildAppCalled = false;
34710
- for (const p$1 of config$2.getSortedPlugins("buildApp")) {
34711
- const hook = p$1.buildApp;
34491
+ for (const p of config$2.getSortedPlugins("buildApp")) {
34492
+ const hook = p.buildApp;
34712
34493
  if (!configBuilderBuildAppCalled && typeof hook === "object" && hook.order === "post") {
34713
34494
  configBuilderBuildAppCalled = true;
34714
34495
  await configBuilder.buildApp(builder);
@@ -35819,10 +35600,10 @@ function build_default$1({ threshold = 1024, level = -1, brotli = false, gzip: g
35819
35600
  compress.on("data", (chunk) => write.call(res, chunk) || compress.pause());
35820
35601
  on.call(res, "drain", () => compress.resume());
35821
35602
  compress.on("end", () => end.call(res));
35822
- listeners.forEach((p$1) => compress.on.apply(compress, p$1));
35603
+ listeners.forEach((p) => compress.on.apply(compress, p));
35823
35604
  } else {
35824
35605
  pendingListeners = null;
35825
- listeners.forEach((p$1) => on.apply(res, p$1));
35606
+ listeners.forEach((p) => on.apply(res, p));
35826
35607
  }
35827
35608
  writeHead.call(res, pendingStatus || res.statusCode);
35828
35609
  }
@@ -36247,14 +36028,14 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36247
36028
  }
36248
36029
  mode = inlineConfig.mode || config$2.mode || mode;
36249
36030
  configEnv.mode = mode;
36250
- const filterPlugin = (p$1) => {
36251
- if (!p$1) return false;
36252
- else if (!p$1.apply) return true;
36253
- else if (typeof p$1.apply === "function") return p$1.apply({
36031
+ const filterPlugin = (p) => {
36032
+ if (!p) return false;
36033
+ else if (!p.apply) return true;
36034
+ else if (typeof p.apply === "function") return p.apply({
36254
36035
  ...config$2,
36255
36036
  mode
36256
36037
  }, configEnv);
36257
- else return p$1.apply === command;
36038
+ else return p.apply === command;
36258
36039
  };
36259
36040
  const rawPlugins = (await asyncFlatten(config$2.plugins || [])).filter(filterPlugin);
36260
36041
  const [prePlugins, normalPlugins, postPlugins] = sortUserPlugins(rawPlugins);
@@ -36508,7 +36289,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36508
36289
  if (resolved.environments.ssr) resolved.environments.ssr.build.emitAssets = resolved.build.ssrEmitAssets || resolved.build.emitAssets;
36509
36290
  debug?.(`using resolved config: %O`, {
36510
36291
  ...resolved,
36511
- plugins: resolved.plugins.map((p$1) => p$1.name),
36292
+ plugins: resolved.plugins.map((p) => p.name),
36512
36293
  worker: {
36513
36294
  ...resolved.worker,
36514
36295
  plugins: `() => plugins`
@@ -36563,10 +36344,10 @@ function sortUserPlugins(plugins$1) {
36563
36344
  const prePlugins = [];
36564
36345
  const postPlugins = [];
36565
36346
  const normalPlugins = [];
36566
- if (plugins$1) plugins$1.flat().forEach((p$1) => {
36567
- if (p$1.enforce === "pre") prePlugins.push(p$1);
36568
- else if (p$1.enforce === "post") postPlugins.push(p$1);
36569
- else normalPlugins.push(p$1);
36347
+ if (plugins$1) plugins$1.flat().forEach((p) => {
36348
+ if (p.enforce === "pre") prePlugins.push(p);
36349
+ else if (p.enforce === "post") postPlugins.push(p);
36350
+ else normalPlugins.push(p);
36570
36351
  });
36571
36352
  return [
36572
36353
  prePlugins,
@@ -36646,7 +36427,7 @@ async function bundleConfigFile(fileName, isESM) {
36646
36427
  format: isESM ? "esm" : "cjs",
36647
36428
  mainFields: ["main"],
36648
36429
  sourcemap: "inline",
36649
- sourceRoot: path.dirname(fileName) + path.sep,
36430
+ sourceRoot: pathToFileURL(path.dirname(fileName)).href + "/",
36650
36431
  metafile: true,
36651
36432
  define: {
36652
36433
  __dirname: dirnameVarName,
@@ -36682,7 +36463,7 @@ async function bundleConfigFile(fileName, isESM) {
36682
36463
  };
36683
36464
  build$3.onResolve({ filter: /^[^.#].*/ }, async ({ path: id, importer, kind }) => {
36684
36465
  if (kind === "entry-point" || path.isAbsolute(id) || isNodeBuiltin(id)) return;
36685
- if (isNodeLikeBuiltin(id)) return { external: true };
36466
+ if (isNodeLikeBuiltin(id) || id.startsWith("npm:")) return { external: true };
36686
36467
  const isImport = isESM || kind === "dynamic-import";
36687
36468
  let idFsPath;
36688
36469
  try {
@@ -36767,8 +36548,8 @@ async function runConfigHook(config$2, plugins$1, configEnv) {
36767
36548
  customLogger: config$2.customLogger
36768
36549
  });
36769
36550
  const context = new BasicMinimalPluginContext(basePluginContextMeta, tempLogger);
36770
- for (const p$1 of getSortedPluginsByHook("config", plugins$1)) {
36771
- const hook = p$1.config;
36551
+ for (const p of getSortedPluginsByHook("config", plugins$1)) {
36552
+ const hook = p.config;
36772
36553
  const handler = getHookHandler(hook);
36773
36554
  const res = await handler.call(context, conf, configEnv);
36774
36555
  if (res && res !== conf) conf = mergeConfig(conf, res);
@@ -36778,8 +36559,8 @@ async function runConfigHook(config$2, plugins$1, configEnv) {
36778
36559
  async function runConfigEnvironmentHook(environments, plugins$1, logger, configEnv, isSsrTargetWebworkerSet) {
36779
36560
  const context = new BasicMinimalPluginContext(basePluginContextMeta, logger);
36780
36561
  const environmentNames = Object.keys(environments);
36781
- for (const p$1 of getSortedPluginsByHook("configEnvironment", plugins$1)) {
36782
- const hook = p$1.configEnvironment;
36562
+ for (const p of getSortedPluginsByHook("configEnvironment", plugins$1)) {
36563
+ const hook = p.configEnvironment;
36783
36564
  const handler = getHookHandler(hook);
36784
36565
  for (const name of environmentNames) {
36785
36566
  const res = await handler.call(context, name, environments[name], {
@@ -36812,4 +36593,4 @@ function optimizeDepsDisabledBackwardCompatibility(resolved, optimizeDeps$1, opt
36812
36593
  }
36813
36594
 
36814
36595
  //#endregion
36815
- export { BuildEnvironment, DevEnvironment, _createServer, addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, build$1 as build, buildEnvironmentOptionsDefaults, buildErrorMessage, builderOptionsDefaults, cleanupDepsCacheStaleDirs, createBuilder, createFilter, createIdResolver, createIsOptimizedDepFile, createIsOptimizedDepUrl, createLogger, createRunnableDevEnvironment, createServer$2 as createServer, createServerCloseFn, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, createToImportMetaURLBasedRelativeRuntime, defineConfig, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, fetchModule, formatPostcssSourceMap, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, injectEnvironmentToHooks, isCSSRequest, isDepOptimizationDisabled, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadCachedDepOptimizationMetadata, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, onRollupLog, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, require_picocolors, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveConfig, resolveEnvPrefix, resolveLibFilename, resolvePreviewOptions, resolveServerOptions, resolveUserExternal, restartServerWithUrls, rollupVersion, runOptimizeDeps, runnerImport, searchForWorkspaceRoot, send, serverConfigDefaults, sortUserPlugins, ssrTransform, toDiscoveredDependencies, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime, transformWithEsbuild };
36596
+ export { BuildEnvironment, DevEnvironment, _createServer, addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, build$1 as build, buildEnvironmentOptionsDefaults, buildErrorMessage, builderOptionsDefaults, cleanupDepsCacheStaleDirs, configDefaults, createBuilder, createFilter, createIdResolver, createIsOptimizedDepFile, createIsOptimizedDepUrl, createRunnableDevEnvironment, createServer$2 as createServer, createServerCloseFn, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, createToImportMetaURLBasedRelativeRuntime, defineConfig, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, fetchModule, formatPostcssSourceMap, getDefaultEnvironmentOptions, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, injectEnvironmentToHooks, isCSSRequest, isDepOptimizationDisabled, isFileLoadingAllowed, isFileServingAllowed, isResolvedConfig, isRunnableDevEnvironment, loadCachedDepOptimizationMetadata, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, onRollupLog, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveBaseUrl, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveConfig, resolveDevEnvironmentOptions, resolveEnvPrefix, resolveLibFilename, resolvePreviewOptions, resolveServerOptions, resolveUserExternal, restartServerWithUrls, rollupVersion, runOptimizeDeps, runnerImport, searchForWorkspaceRoot, send, serverConfigDefaults, sortUserPlugins, ssrTransform, toDiscoveredDependencies, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime, transformWithEsbuild };