@unpackjs/core 4.7.1 → 4.7.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.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- let lastTrackTime, devServerPort, lastFileInfo, logger;
2
+ let runtimeProcessArgs, runtimeInfo, lastTrackTime, devServerPort, lastFileInfo, logger;
3
3
  import __rslib_shim_module__ from "node:module";
4
4
  let require = __rslib_shim_module__.createRequire(import.meta.url);
5
5
  import { fileURLToPath as __rspack_fileURLToPath, pathToFileURL } from "node:url";
6
- import node_path, { dirname as __rspack_dirname, join, sep } from "node:path";
6
+ import node_path, { dirname as __rspack_dirname, basename as external_node_path_basename, dirname as external_node_path_dirname, extname, isAbsolute, join, normalize, relative as external_node_path_relative, resolve as external_node_path_resolve, sep } from "node:path";
7
7
  import * as __rspack_external_child_process from "child_process";
8
8
  import * as __rspack_external_fs from "fs";
9
9
  import * as __rspack_external_os from "os";
@@ -11,22 +11,36 @@ import * as __rspack_external_path from "path";
11
11
  import * as __rspack_external_url from "url";
12
12
  import { __webpack_require__ } from "./rslib-runtime.js";
13
13
  import { Compilation, rspack } from "@rspack/core";
14
- import cac from "cac";
15
- import node_fs from "node:fs";
14
+ import node_fs, { stat as external_node_fs_stat, unwatchFile, watch as external_node_fs_watch, watchFile } from "node:fs";
16
15
  import node_readline from "node:readline";
17
16
  import { createHash } from "node:crypto";
18
- import node_os, { platform } from "node:os";
19
- import portfinder from "portfinder";
20
- import { glob as external_tinyglobby_glob, globSync } from "tinyglobby";
21
- import { format, promisify } from "node:util";
22
- import { TraceMap, originalPositionFor } from "@jridgewell/trace-mapping";
23
- import { parse } from "stacktrace-parser";
17
+ import node_os, { platform, type as external_node_os_type } from "node:os";
18
+ import { createRequire } from "module";
19
+ import { format as external_node_util_format, promisify } from "node:util";
24
20
  import node_zlib from "node:zlib";
25
- import magic_string from "magic-string";
26
- import { expand } from "dotenv-expand";
21
+ import node_net from "node:net";
27
22
  import { RspackDevServer } from "@rspack/dev-server";
28
23
  import { exec, spawn } from "node:child_process";
29
- import chokidar from "chokidar";
24
+ import { EventEmitter } from "node:events";
25
+ import { lstat, open as promises_open, readdir, realpath as promises_realpath, stat as promises_stat } from "node:fs/promises";
26
+ import { Readable } from "node:stream";
27
+ function toArr(any) {
28
+ return null == any ? [] : Array.isArray(any) ? any : [
29
+ any
30
+ ];
31
+ }
32
+ function removeBrackets(v) {
33
+ return v.replace(/[<[].+/, "").trim();
34
+ }
35
+ function findLongest(arr) {
36
+ return arr.sort((a, b)=>a.length > b.length ? -1 : 1)[0];
37
+ }
38
+ function padRight(str, length) {
39
+ return str.length >= length ? str : `${str}${" ".repeat(length - str.length)}`;
40
+ }
41
+ function camelcaseOptionName(name) {
42
+ return name.split(".").map((v, i)=>0 === i ? v.replaceAll(/([a-z])-([a-z])/g, (_, p1, p2)=>p1 + p2.toUpperCase()) : v).join(".");
43
+ }
30
44
  __webpack_require__.add({
31
45
  "../../node_modules/.pnpm/clone-deep@4.0.1/node_modules/clone-deep/index.js" (module, __unused_rspack_exports, __webpack_require__) {
32
46
  let clone = __webpack_require__("../../node_modules/.pnpm/shallow-clone@3.0.1/node_modules/shallow-clone/index.js"), typeOf = __webpack_require__("../../node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js"), isPlainObject = __webpack_require__("../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js");
@@ -51,6 +65,36 @@ __webpack_require__.add({
51
65
  }
52
66
  };
53
67
  },
68
+ "../../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js" (module) {
69
+ function _resolveEscapeSequences(value) {
70
+ return value.replace(/\\\$/g, '$');
71
+ }
72
+ module.exports.expand = function(options) {
73
+ let runningParsed = {}, processEnv = process.env;
74
+ for(let key in options && null != options.processEnv && (processEnv = options.processEnv), options.parsed){
75
+ let value = options.parsed[key];
76
+ value = processEnv[key] && processEnv[key] !== value ? processEnv[key] : function(value, processEnv, runningParsed) {
77
+ let match, env = {
78
+ ...runningParsed,
79
+ ...processEnv
80
+ }, regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g, result = value, seen = new Set();
81
+ for(; null !== (match = regex.exec(result));){
82
+ let defaultValue, value;
83
+ seen.add(result);
84
+ let [template, bracedExpression, unbracedExpression] = match, expression = bracedExpression || unbracedExpression, opRegex = /(:\+|\+|:-|-)/, opMatch = expression.match(opRegex), splitter = opMatch ? opMatch[0] : null, r = expression.split(splitter), key = r.shift();
85
+ if ([
86
+ ':+',
87
+ '+'
88
+ ].includes(splitter) ? (defaultValue = env[key] ? r.join(splitter) : '', value = null) : (defaultValue = r.join(splitter), value = env[key]), (result = value ? seen.has(value) ? result.replace(template, defaultValue) : result.replace(template, value) : result.replace(template, defaultValue)) === runningParsed[key]) break;
89
+ regex.lastIndex = 0;
90
+ }
91
+ return result;
92
+ }(value, processEnv, runningParsed), options.parsed[key] = _resolveEscapeSequences(value), runningParsed[key] = _resolveEscapeSequences(value);
93
+ }
94
+ for(let processKey in options.parsed)processEnv[processKey] = options.parsed[processKey];
95
+ return options;
96
+ };
97
+ },
54
98
  "../../node_modules/.pnpm/flat@5.0.2/node_modules/flat/index.js" (module) {
55
99
  function isBuffer(obj) {
56
100
  return obj && obj.constructor && 'function' == typeof obj.constructor.isBuffer && obj.constructor.isBuffer(obj);
@@ -558,6 +602,945 @@ __webpack_require__.add({
558
602
  };
559
603
  module.exports = createColors(), module.exports.createColors = createColors;
560
604
  },
605
+ "../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
606
+ let pico = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js");
607
+ function picomatch(glob, options, returnState = !1) {
608
+ return options && (null === options.windows || void 0 === options.windows) && (options = {
609
+ ...options,
610
+ windows: utils.isWindows()
611
+ }), pico(glob, options, returnState);
612
+ }
613
+ Object.assign(picomatch, pico), module.exports = picomatch;
614
+ },
615
+ "../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js" (module) {
616
+ let WIN_NO_SLASH = "[^\\\\/]", QMARK = '[^/]', END_ANCHOR = "(?:\\/|$)", START_ANCHOR = "(?:^|\\/)", DOTS_SLASH = `\\.{1,2}${END_ANCHOR}`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!\\.{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, STAR = `${QMARK}*?`, POSIX_CHARS = {
617
+ DOT_LITERAL: '\\.',
618
+ PLUS_LITERAL: '\\+',
619
+ QMARK_LITERAL: '\\?',
620
+ SLASH_LITERAL: '\\/',
621
+ ONE_CHAR: '(?=.)',
622
+ QMARK,
623
+ END_ANCHOR,
624
+ DOTS_SLASH,
625
+ NO_DOT: "(?!\\.)",
626
+ NO_DOTS,
627
+ NO_DOT_SLASH,
628
+ NO_DOTS_SLASH,
629
+ QMARK_NO_DOT: "[^.\\/]",
630
+ STAR,
631
+ START_ANCHOR,
632
+ SEP: '/'
633
+ }, WINDOWS_CHARS = {
634
+ ...POSIX_CHARS,
635
+ SLASH_LITERAL: "[\\\\/]",
636
+ QMARK: WIN_NO_SLASH,
637
+ STAR: `${WIN_NO_SLASH}*?`,
638
+ DOTS_SLASH: "\\.{1,2}(?:[\\\\/]|$)",
639
+ NO_DOT: "(?!\\.)",
640
+ NO_DOTS: "(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",
641
+ NO_DOT_SLASH: "(?!\\.{0,1}(?:[\\\\/]|$))",
642
+ NO_DOTS_SLASH: "(?!\\.{1,2}(?:[\\\\/]|$))",
643
+ QMARK_NO_DOT: "[^.\\\\/]",
644
+ START_ANCHOR: "(?:^|[\\\\/])",
645
+ END_ANCHOR: "(?:[\\\\/]|$)",
646
+ SEP: '\\'
647
+ };
648
+ module.exports = {
649
+ MAX_LENGTH: 65536,
650
+ POSIX_REGEX_SOURCE: {
651
+ alnum: 'a-zA-Z0-9',
652
+ alpha: 'a-zA-Z',
653
+ ascii: '\\x00-\\x7F',
654
+ blank: ' \\t',
655
+ cntrl: '\\x00-\\x1F\\x7F',
656
+ digit: '0-9',
657
+ graph: '\\x21-\\x7E',
658
+ lower: 'a-z',
659
+ print: '\\x20-\\x7E ',
660
+ punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
661
+ space: ' \\t\\r\\n\\v\\f',
662
+ upper: 'A-Z',
663
+ word: 'A-Za-z0-9_',
664
+ xdigit: 'A-Fa-f0-9'
665
+ },
666
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
667
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
668
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
669
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
670
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
671
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
672
+ REPLACEMENTS: {
673
+ __proto__: null,
674
+ '***': '*',
675
+ '**/**': '**',
676
+ '**/**/**': '**'
677
+ },
678
+ CHAR_0: 48,
679
+ CHAR_9: 57,
680
+ CHAR_UPPERCASE_A: 65,
681
+ CHAR_LOWERCASE_A: 97,
682
+ CHAR_UPPERCASE_Z: 90,
683
+ CHAR_LOWERCASE_Z: 122,
684
+ CHAR_LEFT_PARENTHESES: 40,
685
+ CHAR_RIGHT_PARENTHESES: 41,
686
+ CHAR_ASTERISK: 42,
687
+ CHAR_AMPERSAND: 38,
688
+ CHAR_AT: 64,
689
+ CHAR_BACKWARD_SLASH: 92,
690
+ CHAR_CARRIAGE_RETURN: 13,
691
+ CHAR_CIRCUMFLEX_ACCENT: 94,
692
+ CHAR_COLON: 58,
693
+ CHAR_COMMA: 44,
694
+ CHAR_DOT: 46,
695
+ CHAR_DOUBLE_QUOTE: 34,
696
+ CHAR_EQUAL: 61,
697
+ CHAR_EXCLAMATION_MARK: 33,
698
+ CHAR_FORM_FEED: 12,
699
+ CHAR_FORWARD_SLASH: 47,
700
+ CHAR_GRAVE_ACCENT: 96,
701
+ CHAR_HASH: 35,
702
+ CHAR_HYPHEN_MINUS: 45,
703
+ CHAR_LEFT_ANGLE_BRACKET: 60,
704
+ CHAR_LEFT_CURLY_BRACE: 123,
705
+ CHAR_LEFT_SQUARE_BRACKET: 91,
706
+ CHAR_LINE_FEED: 10,
707
+ CHAR_NO_BREAK_SPACE: 160,
708
+ CHAR_PERCENT: 37,
709
+ CHAR_PLUS: 43,
710
+ CHAR_QUESTION_MARK: 63,
711
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
712
+ CHAR_RIGHT_CURLY_BRACE: 125,
713
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
714
+ CHAR_SEMICOLON: 59,
715
+ CHAR_SINGLE_QUOTE: 39,
716
+ CHAR_SPACE: 32,
717
+ CHAR_TAB: 9,
718
+ CHAR_UNDERSCORE: 95,
719
+ CHAR_VERTICAL_LINE: 124,
720
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
721
+ extglobChars: (chars)=>({
722
+ '!': {
723
+ type: 'negate',
724
+ open: '(?:(?!(?:',
725
+ close: `))${chars.STAR})`
726
+ },
727
+ '?': {
728
+ type: 'qmark',
729
+ open: '(?:',
730
+ close: ')?'
731
+ },
732
+ '+': {
733
+ type: 'plus',
734
+ open: '(?:',
735
+ close: ')+'
736
+ },
737
+ '*': {
738
+ type: 'star',
739
+ open: '(?:',
740
+ close: ')*'
741
+ },
742
+ '@': {
743
+ type: 'at',
744
+ open: '(?:',
745
+ close: ')'
746
+ }
747
+ }),
748
+ globChars: (win32)=>!0 === win32 ? WINDOWS_CHARS : POSIX_CHARS
749
+ };
750
+ },
751
+ "../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
752
+ let constants = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js"), { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants, expandRange = (args, options)=>{
753
+ if ('function' == typeof options.expandRange) return options.expandRange(...args, options);
754
+ args.sort();
755
+ let value = `[${args.join('-')}]`;
756
+ try {
757
+ new RegExp(value);
758
+ } catch (ex) {
759
+ return args.map((v)=>utils.escapeRegex(v)).join('..');
760
+ }
761
+ return value;
762
+ }, syntaxError = (type, char)=>`Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`, parse = (input, options)=>{
763
+ let value;
764
+ if ('string' != typeof input) throw TypeError('Expected a string');
765
+ input = REPLACEMENTS[input] || input;
766
+ let opts = {
767
+ ...options
768
+ }, max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
769
+ if (len > max) throw SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
770
+ let bos = {
771
+ type: 'bos',
772
+ value: '',
773
+ output: opts.prepend || ''
774
+ }, tokens = [
775
+ bos
776
+ ], capture = opts.capture ? '' : '?:', PLATFORM_CHARS = constants.globChars(opts.windows), EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS), { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS, globstar = (opts)=>`(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, nodot = opts.dot ? '' : NO_DOT, qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT, star = !0 === opts.bash ? globstar(opts) : STAR;
777
+ opts.capture && (star = `(${star})`), 'boolean' == typeof opts.noext && (opts.noextglob = opts.noext);
778
+ let state = {
779
+ input,
780
+ index: -1,
781
+ start: 0,
782
+ dot: !0 === opts.dot,
783
+ consumed: '',
784
+ output: '',
785
+ prefix: '',
786
+ backtrack: !1,
787
+ negated: !1,
788
+ brackets: 0,
789
+ braces: 0,
790
+ parens: 0,
791
+ quotes: 0,
792
+ globstar: !1,
793
+ tokens
794
+ };
795
+ len = (input = utils.removePrefix(input, state)).length;
796
+ let extglobs = [], braces = [], stack = [], prev = bos, eos = ()=>state.index === len - 1, peek = state.peek = (n = 1)=>input[state.index + n], advance = state.advance = ()=>input[++state.index] || '', remaining = ()=>input.slice(state.index + 1), consume = (value = '', num = 0)=>{
797
+ state.consumed += value, state.index += num;
798
+ }, append = (token)=>{
799
+ state.output += null != token.output ? token.output : token.value, consume(token.value);
800
+ }, negate = ()=>{
801
+ let count = 1;
802
+ for(; '!' === peek() && ('(' !== peek(2) || '?' === peek(3));)advance(), state.start++, count++;
803
+ return count % 2 != 0 && (state.negated = !0, state.start++, !0);
804
+ }, increment = (type)=>{
805
+ state[type]++, stack.push(type);
806
+ }, decrement = (type)=>{
807
+ state[type]--, stack.pop();
808
+ }, push = (tok)=>{
809
+ if ('globstar' === prev.type) {
810
+ let isBrace = state.braces > 0 && ('comma' === tok.type || 'brace' === tok.type), isExtglob = !0 === tok.extglob || extglobs.length && ('pipe' === tok.type || 'paren' === tok.type);
811
+ 'slash' === tok.type || 'paren' === tok.type || isBrace || isExtglob || (state.output = state.output.slice(0, -prev.output.length), prev.type = 'star', prev.value = '*', prev.output = star, state.output += prev.output);
812
+ }
813
+ if (extglobs.length && 'paren' !== tok.type && (extglobs[extglobs.length - 1].inner += tok.value), (tok.value || tok.output) && append(tok), prev && 'text' === prev.type && 'text' === tok.type) {
814
+ prev.output = (prev.output || prev.value) + tok.value, prev.value += tok.value;
815
+ return;
816
+ }
817
+ tok.prev = prev, tokens.push(tok), prev = tok;
818
+ }, extglobOpen = (type, value)=>{
819
+ let token = {
820
+ ...EXTGLOB_CHARS[value],
821
+ conditions: 1,
822
+ inner: ''
823
+ };
824
+ token.prev = prev, token.parens = state.parens, token.output = state.output;
825
+ let output = (opts.capture ? '(' : '') + token.open;
826
+ increment('parens'), push({
827
+ type,
828
+ value,
829
+ output: state.output ? '' : ONE_CHAR
830
+ }), push({
831
+ type: 'paren',
832
+ extglob: !0,
833
+ value: advance(),
834
+ output
835
+ }), extglobs.push(token);
836
+ }, extglobClose = (token)=>{
837
+ let rest, output = token.close + (opts.capture ? ')' : '');
838
+ if ('negate' === token.type) {
839
+ let extglobStar = star;
840
+ if (token.inner && token.inner.length > 1 && token.inner.includes('/') && (extglobStar = globstar(opts)), (extglobStar !== star || eos() || /^\)+$/.test(remaining())) && (output = token.close = `)$))${extglobStar}`), token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
841
+ let expression = parse(rest, {
842
+ ...options,
843
+ fastpaths: !1
844
+ }).output;
845
+ output = token.close = `)${expression})${extglobStar})`;
846
+ }
847
+ 'bos' === token.prev.type && (state.negatedExtglob = !0);
848
+ }
849
+ push({
850
+ type: 'paren',
851
+ extglob: !0,
852
+ value,
853
+ output
854
+ }), decrement('parens');
855
+ };
856
+ if (!1 !== opts.fastpaths && !/(^[*!]|[/()[\]{}"])/.test(input)) {
857
+ let backslashes = !1, output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index)=>'\\' === first ? (backslashes = !0, m) : '?' === first ? esc ? esc + first + (rest ? QMARK.repeat(rest.length) : '') : 0 === index ? qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '') : QMARK.repeat(chars.length) : '.' === first ? DOT_LITERAL.repeat(chars.length) : '*' === first ? esc ? esc + first + (rest ? star : '') : star : esc ? m : `\\${m}`);
858
+ return (!0 === backslashes && (output = !0 === opts.unescape ? output.replace(/\\/g, '') : output.replace(/\\+/g, (m)=>m.length % 2 == 0 ? '\\\\' : m ? '\\' : '')), output === input && !0 === opts.contains) ? state.output = input : state.output = utils.wrapOutput(output, state, options), state;
859
+ }
860
+ for(; !eos();){
861
+ if ('\u0000' === (value = advance())) continue;
862
+ if ('\\' === value) {
863
+ let next = peek();
864
+ if ('/' === next && !0 !== opts.bash || '.' === next || ';' === next) continue;
865
+ if (!next) {
866
+ push({
867
+ type: 'text',
868
+ value: value += '\\'
869
+ });
870
+ continue;
871
+ }
872
+ let match = /^\\+/.exec(remaining()), slashes = 0;
873
+ if (match && match[0].length > 2 && (slashes = match[0].length, state.index += slashes, slashes % 2 != 0 && (value += '\\')), !0 === opts.unescape ? value = advance() : value += advance(), 0 === state.brackets) {
874
+ push({
875
+ type: 'text',
876
+ value
877
+ });
878
+ continue;
879
+ }
880
+ }
881
+ if (state.brackets > 0 && (']' !== value || '[' === prev.value || '[^' === prev.value)) {
882
+ if (!1 !== opts.posix && ':' === value) {
883
+ let inner = prev.value.slice(1);
884
+ if (inner.includes('[') && (prev.posix = !0, inner.includes(':'))) {
885
+ let idx = prev.value.lastIndexOf('['), pre = prev.value.slice(0, idx), posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)];
886
+ if (posix) {
887
+ prev.value = pre + posix, state.backtrack = !0, advance(), bos.output || 1 !== tokens.indexOf(prev) || (bos.output = ONE_CHAR);
888
+ continue;
889
+ }
890
+ }
891
+ }
892
+ ('[' === value && ':' !== peek() || '-' === value && ']' === peek()) && (value = `\\${value}`), ']' === value && ('[' === prev.value || '[^' === prev.value) && (value = `\\${value}`), !0 === opts.posix && '!' === value && '[' === prev.value && (value = '^'), prev.value += value, append({
893
+ value
894
+ });
895
+ continue;
896
+ }
897
+ if (1 === state.quotes && '"' !== value) {
898
+ value = utils.escapeRegex(value), prev.value += value, append({
899
+ value
900
+ });
901
+ continue;
902
+ }
903
+ if ('"' === value) {
904
+ state.quotes = +(1 !== state.quotes), !0 === opts.keepQuotes && push({
905
+ type: 'text',
906
+ value
907
+ });
908
+ continue;
909
+ }
910
+ if ('(' === value) {
911
+ increment('parens'), push({
912
+ type: 'paren',
913
+ value
914
+ });
915
+ continue;
916
+ }
917
+ if (')' === value) {
918
+ if (0 === state.parens && !0 === opts.strictBrackets) throw SyntaxError(syntaxError('opening', '('));
919
+ let extglob = extglobs[extglobs.length - 1];
920
+ if (extglob && state.parens === extglob.parens + 1) {
921
+ extglobClose(extglobs.pop());
922
+ continue;
923
+ }
924
+ push({
925
+ type: 'paren',
926
+ value,
927
+ output: state.parens ? ')' : '\\)'
928
+ }), decrement('parens');
929
+ continue;
930
+ }
931
+ if ('[' === value) {
932
+ if (!0 !== opts.nobracket && remaining().includes(']')) increment('brackets');
933
+ else {
934
+ if (!0 !== opts.nobracket && !0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ']'));
935
+ value = `\\${value}`;
936
+ }
937
+ push({
938
+ type: 'bracket',
939
+ value
940
+ });
941
+ continue;
942
+ }
943
+ if (']' === value) {
944
+ if (!0 === opts.nobracket || prev && 'bracket' === prev.type && 1 === prev.value.length) {
945
+ push({
946
+ type: 'text',
947
+ value,
948
+ output: `\\${value}`
949
+ });
950
+ continue;
951
+ }
952
+ if (0 === state.brackets) {
953
+ if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('opening', '['));
954
+ push({
955
+ type: 'text',
956
+ value,
957
+ output: `\\${value}`
958
+ });
959
+ continue;
960
+ }
961
+ decrement('brackets');
962
+ let prevValue = prev.value.slice(1);
963
+ if (!0 === prev.posix || '^' !== prevValue[0] || prevValue.includes('/') || (value = `/${value}`), prev.value += value, append({
964
+ value
965
+ }), !1 === opts.literalBrackets || utils.hasRegexChars(prevValue)) continue;
966
+ let escaped = utils.escapeRegex(prev.value);
967
+ if (state.output = state.output.slice(0, -prev.value.length), !0 === opts.literalBrackets) {
968
+ state.output += escaped, prev.value = escaped;
969
+ continue;
970
+ }
971
+ prev.value = `(${capture}${escaped}|${prev.value})`, state.output += prev.value;
972
+ continue;
973
+ }
974
+ if ('{' === value && !0 !== opts.nobrace) {
975
+ increment('braces');
976
+ let open = {
977
+ type: 'brace',
978
+ value,
979
+ output: '(',
980
+ outputIndex: state.output.length,
981
+ tokensIndex: state.tokens.length
982
+ };
983
+ braces.push(open), push(open);
984
+ continue;
985
+ }
986
+ if ('}' === value) {
987
+ let brace = braces[braces.length - 1];
988
+ if (!0 === opts.nobrace || !brace) {
989
+ push({
990
+ type: 'text',
991
+ value,
992
+ output: value
993
+ });
994
+ continue;
995
+ }
996
+ let output = ')';
997
+ if (!0 === brace.dots) {
998
+ let arr = tokens.slice(), range = [];
999
+ for(let i = arr.length - 1; i >= 0 && (tokens.pop(), 'brace' !== arr[i].type); i--)'dots' !== arr[i].type && range.unshift(arr[i].value);
1000
+ output = expandRange(range, opts), state.backtrack = !0;
1001
+ }
1002
+ if (!0 !== brace.comma && !0 !== brace.dots) {
1003
+ let out = state.output.slice(0, brace.outputIndex), toks = state.tokens.slice(brace.tokensIndex);
1004
+ for (let t of (brace.value = brace.output = '\\{', value = output = '\\}', state.output = out, toks))state.output += t.output || t.value;
1005
+ }
1006
+ push({
1007
+ type: 'brace',
1008
+ value,
1009
+ output
1010
+ }), decrement('braces'), braces.pop();
1011
+ continue;
1012
+ }
1013
+ if ('|' === value) {
1014
+ extglobs.length > 0 && extglobs[extglobs.length - 1].conditions++, push({
1015
+ type: 'text',
1016
+ value
1017
+ });
1018
+ continue;
1019
+ }
1020
+ if (',' === value) {
1021
+ let output = value, brace = braces[braces.length - 1];
1022
+ brace && 'braces' === stack[stack.length - 1] && (brace.comma = !0, output = '|'), push({
1023
+ type: 'comma',
1024
+ value,
1025
+ output
1026
+ });
1027
+ continue;
1028
+ }
1029
+ if ('/' === value) {
1030
+ if ('dot' === prev.type && state.index === state.start + 1) {
1031
+ state.start = state.index + 1, state.consumed = '', state.output = '', tokens.pop(), prev = bos;
1032
+ continue;
1033
+ }
1034
+ push({
1035
+ type: 'slash',
1036
+ value,
1037
+ output: SLASH_LITERAL
1038
+ });
1039
+ continue;
1040
+ }
1041
+ if ('.' === value) {
1042
+ if (state.braces > 0 && 'dot' === prev.type) {
1043
+ '.' === prev.value && (prev.output = DOT_LITERAL);
1044
+ let brace = braces[braces.length - 1];
1045
+ prev.type = 'dots', prev.output += value, prev.value += value, brace.dots = !0;
1046
+ continue;
1047
+ }
1048
+ if (state.braces + state.parens === 0 && 'bos' !== prev.type && 'slash' !== prev.type) {
1049
+ push({
1050
+ type: 'text',
1051
+ value,
1052
+ output: DOT_LITERAL
1053
+ });
1054
+ continue;
1055
+ }
1056
+ push({
1057
+ type: 'dot',
1058
+ value,
1059
+ output: DOT_LITERAL
1060
+ });
1061
+ continue;
1062
+ }
1063
+ if ('?' === value) {
1064
+ if (!(prev && '(' === prev.value) && !0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
1065
+ extglobOpen('qmark', value);
1066
+ continue;
1067
+ }
1068
+ if (prev && 'paren' === prev.type) {
1069
+ let next = peek(), output = value;
1070
+ ('(' !== prev.value || /[!=<:]/.test(next)) && ('<' !== next || /<([!=]|\w+>)/.test(remaining())) || (output = `\\${value}`), push({
1071
+ type: 'text',
1072
+ value,
1073
+ output
1074
+ });
1075
+ continue;
1076
+ }
1077
+ if (!0 !== opts.dot && ('slash' === prev.type || 'bos' === prev.type)) {
1078
+ push({
1079
+ type: 'qmark',
1080
+ value,
1081
+ output: QMARK_NO_DOT
1082
+ });
1083
+ continue;
1084
+ }
1085
+ push({
1086
+ type: 'qmark',
1087
+ value,
1088
+ output: QMARK
1089
+ });
1090
+ continue;
1091
+ }
1092
+ if ('!' === value) {
1093
+ if (!0 !== opts.noextglob && '(' === peek() && ('?' !== peek(2) || !/[!=<:]/.test(peek(3)))) {
1094
+ extglobOpen('negate', value);
1095
+ continue;
1096
+ }
1097
+ if (!0 !== opts.nonegate && 0 === state.index) {
1098
+ negate();
1099
+ continue;
1100
+ }
1101
+ }
1102
+ if ('+' === value) {
1103
+ if (!0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
1104
+ extglobOpen('plus', value);
1105
+ continue;
1106
+ }
1107
+ if (prev && '(' === prev.value || !1 === opts.regex) {
1108
+ push({
1109
+ type: 'plus',
1110
+ value,
1111
+ output: PLUS_LITERAL
1112
+ });
1113
+ continue;
1114
+ }
1115
+ if (prev && ('bracket' === prev.type || 'paren' === prev.type || 'brace' === prev.type) || state.parens > 0) {
1116
+ push({
1117
+ type: 'plus',
1118
+ value
1119
+ });
1120
+ continue;
1121
+ }
1122
+ push({
1123
+ type: 'plus',
1124
+ value: PLUS_LITERAL
1125
+ });
1126
+ continue;
1127
+ }
1128
+ if ('@' === value) {
1129
+ if (!0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
1130
+ push({
1131
+ type: 'at',
1132
+ extglob: !0,
1133
+ value,
1134
+ output: ''
1135
+ });
1136
+ continue;
1137
+ }
1138
+ push({
1139
+ type: 'text',
1140
+ value
1141
+ });
1142
+ continue;
1143
+ }
1144
+ if ('*' !== value) {
1145
+ ('$' === value || '^' === value) && (value = `\\${value}`);
1146
+ let match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
1147
+ match && (value += match[0], state.index += match[0].length), push({
1148
+ type: 'text',
1149
+ value
1150
+ });
1151
+ continue;
1152
+ }
1153
+ if (prev && ('globstar' === prev.type || !0 === prev.star)) {
1154
+ prev.type = 'star', prev.star = !0, prev.value += value, prev.output = star, state.backtrack = !0, state.globstar = !0, consume(value);
1155
+ continue;
1156
+ }
1157
+ let rest = remaining();
1158
+ if (!0 !== opts.noextglob && /^\([^?]/.test(rest)) {
1159
+ extglobOpen('star', value);
1160
+ continue;
1161
+ }
1162
+ if ('star' === prev.type) {
1163
+ if (!0 === opts.noglobstar) {
1164
+ consume(value);
1165
+ continue;
1166
+ }
1167
+ let prior = prev.prev, before = prior.prev, isStart = 'slash' === prior.type || 'bos' === prior.type, afterStar = before && ('star' === before.type || 'globstar' === before.type);
1168
+ if (!0 === opts.bash && (!isStart || rest[0] && '/' !== rest[0])) {
1169
+ push({
1170
+ type: 'star',
1171
+ value,
1172
+ output: ''
1173
+ });
1174
+ continue;
1175
+ }
1176
+ let isBrace = state.braces > 0 && ('comma' === prior.type || 'brace' === prior.type), isExtglob = extglobs.length && ('pipe' === prior.type || 'paren' === prior.type);
1177
+ if (!isStart && 'paren' !== prior.type && !isBrace && !isExtglob) {
1178
+ push({
1179
+ type: 'star',
1180
+ value,
1181
+ output: ''
1182
+ });
1183
+ continue;
1184
+ }
1185
+ for(; '/**' === rest.slice(0, 3);){
1186
+ let after = input[state.index + 4];
1187
+ if (after && '/' !== after) break;
1188
+ rest = rest.slice(3), consume('/**', 3);
1189
+ }
1190
+ if ('bos' === prior.type && eos()) {
1191
+ prev.type = 'globstar', prev.value += value, prev.output = globstar(opts), state.output = prev.output, state.globstar = !0, consume(value);
1192
+ continue;
1193
+ }
1194
+ if ('slash' === prior.type && 'bos' !== prior.prev.type && !afterStar && eos()) {
1195
+ state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = 'globstar', prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'), prev.value += value, state.globstar = !0, state.output += prior.output + prev.output, consume(value);
1196
+ continue;
1197
+ }
1198
+ if ('slash' === prior.type && 'bos' !== prior.prev.type && '/' === rest[0]) {
1199
+ let end = void 0 !== rest[1] ? '|$' : '';
1200
+ state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = 'globstar', prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`, prev.value += value, state.output += prior.output + prev.output, state.globstar = !0, consume(value + advance()), push({
1201
+ type: 'slash',
1202
+ value: '/',
1203
+ output: ''
1204
+ });
1205
+ continue;
1206
+ }
1207
+ if ('bos' === prior.type && '/' === rest[0]) {
1208
+ prev.type = 'globstar', prev.value += value, prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`, state.output = prev.output, state.globstar = !0, consume(value + advance()), push({
1209
+ type: 'slash',
1210
+ value: '/',
1211
+ output: ''
1212
+ });
1213
+ continue;
1214
+ }
1215
+ state.output = state.output.slice(0, -prev.output.length), prev.type = 'globstar', prev.output = globstar(opts), prev.value += value, state.output += prev.output, state.globstar = !0, consume(value);
1216
+ continue;
1217
+ }
1218
+ let token = {
1219
+ type: 'star',
1220
+ value,
1221
+ output: star
1222
+ };
1223
+ if (!0 === opts.bash) {
1224
+ token.output = '.*?', ('bos' === prev.type || 'slash' === prev.type) && (token.output = nodot + token.output), push(token);
1225
+ continue;
1226
+ }
1227
+ if (prev && ('bracket' === prev.type || 'paren' === prev.type) && !0 === opts.regex) {
1228
+ token.output = value, push(token);
1229
+ continue;
1230
+ }
1231
+ (state.index === state.start || 'slash' === prev.type || 'dot' === prev.type) && ('dot' === prev.type ? (state.output += NO_DOT_SLASH, prev.output += NO_DOT_SLASH) : !0 === opts.dot ? (state.output += NO_DOTS_SLASH, prev.output += NO_DOTS_SLASH) : (state.output += nodot, prev.output += nodot), '*' !== peek() && (state.output += ONE_CHAR, prev.output += ONE_CHAR)), push(token);
1232
+ }
1233
+ for(; state.brackets > 0;){
1234
+ if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ']'));
1235
+ state.output = utils.escapeLast(state.output, '['), decrement('brackets');
1236
+ }
1237
+ for(; state.parens > 0;){
1238
+ if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ')'));
1239
+ state.output = utils.escapeLast(state.output, '('), decrement('parens');
1240
+ }
1241
+ for(; state.braces > 0;){
1242
+ if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', '}'));
1243
+ state.output = utils.escapeLast(state.output, '{'), decrement('braces');
1244
+ }
1245
+ if (!0 !== opts.strictSlashes && ('star' === prev.type || 'bracket' === prev.type) && push({
1246
+ type: 'maybe_slash',
1247
+ value: '',
1248
+ output: `${SLASH_LITERAL}?`
1249
+ }), !0 === state.backtrack) for (let token of (state.output = '', state.tokens))state.output += null != token.output ? token.output : token.value, token.suffix && (state.output += token.suffix);
1250
+ return state;
1251
+ };
1252
+ parse.fastpaths = (input, options)=>{
1253
+ let opts = {
1254
+ ...options
1255
+ }, max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
1256
+ if (len > max) throw SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1257
+ input = REPLACEMENTS[input] || input;
1258
+ let { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(opts.windows), nodot = opts.dot ? NO_DOTS : NO_DOT, slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT, capture = opts.capture ? '' : '?:', star = !0 === opts.bash ? '.*?' : STAR;
1259
+ opts.capture && (star = `(${star})`);
1260
+ let globstar = (opts)=>!0 === opts.noglobstar ? star : `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, create = (str)=>{
1261
+ switch(str){
1262
+ case '*':
1263
+ return `${nodot}${ONE_CHAR}${star}`;
1264
+ case '.*':
1265
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
1266
+ case '*.*':
1267
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1268
+ case '*/*':
1269
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
1270
+ case '**':
1271
+ return nodot + globstar(opts);
1272
+ case '**/*':
1273
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
1274
+ case '**/*.*':
1275
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1276
+ case '**/.*':
1277
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
1278
+ default:
1279
+ {
1280
+ let match = /^(.*?)\.(\w+)$/.exec(str);
1281
+ if (!match) return;
1282
+ let source = create(match[1]);
1283
+ if (!source) return;
1284
+ return source + DOT_LITERAL + match[2];
1285
+ }
1286
+ }
1287
+ }, source = create(utils.removePrefix(input, {
1288
+ negated: !1,
1289
+ prefix: ''
1290
+ }));
1291
+ return source && !0 !== opts.strictSlashes && (source += `${SLASH_LITERAL}?`), source;
1292
+ }, module.exports = parse;
1293
+ },
1294
+ "../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js" (module, __unused_rspack_exports, __webpack_require__) {
1295
+ let scan = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js"), parse = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js"), constants = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js"), picomatch = (glob, options, returnState = !1)=>{
1296
+ if (Array.isArray(glob)) {
1297
+ let fns = glob.map((input)=>picomatch(input, options, returnState));
1298
+ return (str)=>{
1299
+ for (let isMatch of fns){
1300
+ let state = isMatch(str);
1301
+ if (state) return state;
1302
+ }
1303
+ return !1;
1304
+ };
1305
+ }
1306
+ let isState = glob && 'object' == typeof glob && !Array.isArray(glob) && glob.tokens && glob.input;
1307
+ if ('' === glob || 'string' != typeof glob && !isState) throw TypeError('Expected pattern to be a non-empty string');
1308
+ let opts = options || {}, posix = opts.windows, regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, !1, !0), state = regex.state;
1309
+ delete regex.state;
1310
+ let isIgnored = ()=>!1;
1311
+ if (opts.ignore) {
1312
+ let ignoreOpts = {
1313
+ ...options,
1314
+ ignore: null,
1315
+ onMatch: null,
1316
+ onResult: null
1317
+ };
1318
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
1319
+ }
1320
+ let matcher = (input, returnObject = !1)=>{
1321
+ let { isMatch, match, output } = picomatch.test(input, regex, options, {
1322
+ glob,
1323
+ posix
1324
+ }), result = {
1325
+ glob,
1326
+ state,
1327
+ regex,
1328
+ posix,
1329
+ input,
1330
+ output,
1331
+ match,
1332
+ isMatch
1333
+ };
1334
+ return ('function' == typeof opts.onResult && opts.onResult(result), !1 === isMatch) ? (result.isMatch = !1, !!returnObject && result) : isIgnored(input) ? ('function' == typeof opts.onIgnore && opts.onIgnore(result), result.isMatch = !1, !!returnObject && result) : ('function' == typeof opts.onMatch && opts.onMatch(result), !returnObject || result);
1335
+ };
1336
+ return returnState && (matcher.state = state), matcher;
1337
+ };
1338
+ picomatch.test = (input, regex, options, { glob, posix } = {})=>{
1339
+ if ('string' != typeof input) throw TypeError('Expected input to be a string');
1340
+ if ('' === input) return {
1341
+ isMatch: !1,
1342
+ output: ''
1343
+ };
1344
+ let opts = options || {}, format = opts.format || (posix ? utils.toPosixSlashes : null), match = input === glob, output = match && format ? format(input) : input;
1345
+ return !1 === match && (match = (output = format ? format(input) : input) === glob), (!1 === match || !0 === opts.capture) && (match = !0 === opts.matchBase || !0 === opts.basename ? picomatch.matchBase(input, regex, options, posix) : regex.exec(output)), {
1346
+ isMatch: !!match,
1347
+ match,
1348
+ output
1349
+ };
1350
+ }, picomatch.matchBase = (input, glob, options)=>(glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input)), picomatch.isMatch = (str, patterns, options)=>picomatch(patterns, options)(str), picomatch.parse = (pattern, options)=>Array.isArray(pattern) ? pattern.map((p)=>picomatch.parse(p, options)) : parse(pattern, {
1351
+ ...options,
1352
+ fastpaths: !1
1353
+ }), picomatch.scan = (input, options)=>scan(input, options), picomatch.compileRe = (state, options, returnOutput = !1, returnState = !1)=>{
1354
+ if (!0 === returnOutput) return state.output;
1355
+ let opts = options || {}, prepend = opts.contains ? '' : '^', append = opts.contains ? '' : '$', source = `${prepend}(?:${state.output})${append}`;
1356
+ state && !0 === state.negated && (source = `^(?!${source}).*$`);
1357
+ let regex = picomatch.toRegex(source, options);
1358
+ return !0 === returnState && (regex.state = state), regex;
1359
+ }, picomatch.makeRe = (input, options = {}, returnOutput = !1, returnState = !1)=>{
1360
+ if (!input || 'string' != typeof input) throw TypeError('Expected a non-empty string');
1361
+ let parsed = {
1362
+ negated: !1,
1363
+ fastpaths: !0
1364
+ };
1365
+ return !1 !== options.fastpaths && ('.' === input[0] || '*' === input[0]) && (parsed.output = parse.fastpaths(input, options)), parsed.output || (parsed = parse(input, options)), picomatch.compileRe(parsed, options, returnOutput, returnState);
1366
+ }, picomatch.toRegex = (source, options)=>{
1367
+ try {
1368
+ let opts = options || {};
1369
+ return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
1370
+ } catch (err) {
1371
+ if (options && !0 === options.debug) throw err;
1372
+ return /$^/;
1373
+ }
1374
+ }, picomatch.constants = constants, module.exports = picomatch;
1375
+ },
1376
+ "../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js" (module, __unused_rspack_exports, __webpack_require__) {
1377
+ let utils = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js"), { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js"), isPathSeparator = (code)=>code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH, depth = (token)=>{
1378
+ !0 !== token.isPrefix && (token.depth = token.isGlobstar ? 1 / 0 : 1);
1379
+ };
1380
+ module.exports = (input, options)=>{
1381
+ let prev, code, opts = options || {}, length = input.length - 1, scanToEnd = !0 === opts.parts || !0 === opts.scanToEnd, slashes = [], tokens = [], parts = [], str = input, index = -1, start = 0, lastIndex = 0, isBrace = !1, isBracket = !1, isGlob = !1, isExtglob = !1, isGlobstar = !1, braceEscaped = !1, backslashes = !1, negated = !1, negatedExtglob = !1, finished = !1, braces = 0, token = {
1382
+ value: '',
1383
+ depth: 0,
1384
+ isGlob: !1
1385
+ }, eos = ()=>index >= length, peek = ()=>str.charCodeAt(index + 1), advance = ()=>(prev = code, str.charCodeAt(++index));
1386
+ for(; index < length;){
1387
+ let next;
1388
+ if ((code = advance()) === CHAR_BACKWARD_SLASH) {
1389
+ backslashes = token.backslashes = !0, (code = advance()) === CHAR_LEFT_CURLY_BRACE && (braceEscaped = !0);
1390
+ continue;
1391
+ }
1392
+ if (!0 === braceEscaped || code === CHAR_LEFT_CURLY_BRACE) {
1393
+ for(braces++; !0 !== eos() && (code = advance());){
1394
+ if (code === CHAR_BACKWARD_SLASH) {
1395
+ backslashes = token.backslashes = !0, advance();
1396
+ continue;
1397
+ }
1398
+ if (code === CHAR_LEFT_CURLY_BRACE) {
1399
+ braces++;
1400
+ continue;
1401
+ }
1402
+ if (!0 !== braceEscaped && code === CHAR_DOT && (code = advance()) === CHAR_DOT || !0 !== braceEscaped && code === CHAR_COMMA) {
1403
+ if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
1404
+ break;
1405
+ }
1406
+ if (code === CHAR_RIGHT_CURLY_BRACE && 0 == --braces) {
1407
+ braceEscaped = !1, isBrace = token.isBrace = !0, finished = !0;
1408
+ break;
1409
+ }
1410
+ }
1411
+ if (!0 === scanToEnd) continue;
1412
+ break;
1413
+ }
1414
+ if (code === CHAR_FORWARD_SLASH) {
1415
+ if (slashes.push(index), tokens.push(token), token = {
1416
+ value: '',
1417
+ depth: 0,
1418
+ isGlob: !1
1419
+ }, !0 === finished) continue;
1420
+ if (prev === CHAR_DOT && index === start + 1) {
1421
+ start += 2;
1422
+ continue;
1423
+ }
1424
+ lastIndex = index + 1;
1425
+ continue;
1426
+ }
1427
+ if (!0 !== opts.noext && !0 == (code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) && peek() === CHAR_LEFT_PARENTHESES) {
1428
+ if (isGlob = token.isGlob = !0, isExtglob = token.isExtglob = !0, finished = !0, code === CHAR_EXCLAMATION_MARK && index === start && (negatedExtglob = !0), !0 === scanToEnd) {
1429
+ for(; !0 !== eos() && (code = advance());){
1430
+ if (code === CHAR_BACKWARD_SLASH) {
1431
+ backslashes = token.backslashes = !0, code = advance();
1432
+ continue;
1433
+ }
1434
+ if (code === CHAR_RIGHT_PARENTHESES) {
1435
+ isGlob = token.isGlob = !0, finished = !0;
1436
+ break;
1437
+ }
1438
+ }
1439
+ continue;
1440
+ }
1441
+ break;
1442
+ }
1443
+ if (code === CHAR_ASTERISK) {
1444
+ if (prev === CHAR_ASTERISK && (isGlobstar = token.isGlobstar = !0), isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
1445
+ break;
1446
+ }
1447
+ if (code === CHAR_QUESTION_MARK) {
1448
+ if (isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
1449
+ break;
1450
+ }
1451
+ if (code === CHAR_LEFT_SQUARE_BRACKET) {
1452
+ for(; !0 !== eos() && (next = advance());){
1453
+ if (next === CHAR_BACKWARD_SLASH) {
1454
+ backslashes = token.backslashes = !0, advance();
1455
+ continue;
1456
+ }
1457
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
1458
+ isBracket = token.isBracket = !0, isGlob = token.isGlob = !0, finished = !0;
1459
+ break;
1460
+ }
1461
+ }
1462
+ if (!0 === scanToEnd) continue;
1463
+ break;
1464
+ }
1465
+ if (!0 !== opts.nonegate && code === CHAR_EXCLAMATION_MARK && index === start) {
1466
+ negated = token.negated = !0, start++;
1467
+ continue;
1468
+ }
1469
+ if (!0 !== opts.noparen && code === CHAR_LEFT_PARENTHESES) {
1470
+ if (isGlob = token.isGlob = !0, !0 === scanToEnd) {
1471
+ for(; !0 !== eos() && (code = advance());){
1472
+ if (code === CHAR_LEFT_PARENTHESES) {
1473
+ backslashes = token.backslashes = !0, code = advance();
1474
+ continue;
1475
+ }
1476
+ if (code === CHAR_RIGHT_PARENTHESES) {
1477
+ finished = !0;
1478
+ break;
1479
+ }
1480
+ }
1481
+ continue;
1482
+ }
1483
+ break;
1484
+ }
1485
+ if (!0 === isGlob) {
1486
+ if (finished = !0, !0 === scanToEnd) continue;
1487
+ break;
1488
+ }
1489
+ }
1490
+ !0 === opts.noext && (isExtglob = !1, isGlob = !1);
1491
+ let base = str, prefix = '', glob = '';
1492
+ start > 0 && (prefix = str.slice(0, start), str = str.slice(start), lastIndex -= start), base && !0 === isGlob && lastIndex > 0 ? (base = str.slice(0, lastIndex), glob = str.slice(lastIndex)) : !0 === isGlob ? (base = '', glob = str) : base = str, base && '' !== base && '/' !== base && base !== str && isPathSeparator(base.charCodeAt(base.length - 1)) && (base = base.slice(0, -1)), !0 === opts.unescape && (glob && (glob = utils.removeBackslashes(glob)), base && !0 === backslashes && (base = utils.removeBackslashes(base)));
1493
+ let state = {
1494
+ prefix,
1495
+ input,
1496
+ start,
1497
+ base,
1498
+ glob,
1499
+ isBrace,
1500
+ isBracket,
1501
+ isGlob,
1502
+ isExtglob,
1503
+ isGlobstar,
1504
+ negated,
1505
+ negatedExtglob
1506
+ };
1507
+ if (!0 === opts.tokens && (state.maxDepth = 0, isPathSeparator(code) || tokens.push(token), state.tokens = tokens), !0 === opts.parts || !0 === opts.tokens) {
1508
+ let prevIndex;
1509
+ for(let idx = 0; idx < slashes.length; idx++){
1510
+ let n = prevIndex ? prevIndex + 1 : start, i = slashes[idx], value = input.slice(n, i);
1511
+ opts.tokens && (0 === idx && 0 !== start ? (tokens[idx].isPrefix = !0, tokens[idx].value = prefix) : tokens[idx].value = value, depth(tokens[idx]), state.maxDepth += tokens[idx].depth), (0 !== idx || '' !== value) && parts.push(value), prevIndex = i;
1512
+ }
1513
+ if (prevIndex && prevIndex + 1 < input.length) {
1514
+ let value = input.slice(prevIndex + 1);
1515
+ parts.push(value), opts.tokens && (tokens[tokens.length - 1].value = value, depth(tokens[tokens.length - 1]), state.maxDepth += tokens[tokens.length - 1].depth);
1516
+ }
1517
+ state.slashes = slashes, state.parts = parts;
1518
+ }
1519
+ return state;
1520
+ };
1521
+ },
1522
+ "../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js" (__unused_rspack_module, exports, __webpack_require__) {
1523
+ let { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js");
1524
+ exports.isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val), exports.hasRegexChars = (str)=>REGEX_SPECIAL_CHARS.test(str), exports.isRegexChar = (str)=>1 === str.length && exports.hasRegexChars(str), exports.escapeRegex = (str)=>str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'), exports.toPosixSlashes = (str)=>str.replace(REGEX_BACKSLASH, '/'), exports.isWindows = ()=>{
1525
+ if ("u" > typeof navigator && navigator.platform) {
1526
+ let platform = navigator.platform.toLowerCase();
1527
+ return 'win32' === platform || 'windows' === platform;
1528
+ }
1529
+ return "u" > typeof process && !!process.platform && 'win32' === process.platform;
1530
+ }, exports.removeBackslashes = (str)=>str.replace(REGEX_REMOVE_BACKSLASH, (match)=>'\\' === match ? '' : match), exports.escapeLast = (input, char, lastIdx)=>{
1531
+ let idx = input.lastIndexOf(char, lastIdx);
1532
+ return -1 === idx ? input : '\\' === input[idx - 1] ? exports.escapeLast(input, char, idx - 1) : `${input.slice(0, idx)}\\${input.slice(idx)}`;
1533
+ }, exports.removePrefix = (input, state = {})=>{
1534
+ let output = input;
1535
+ return output.startsWith('./') && (output = output.slice(2), state.prefix = './'), output;
1536
+ }, exports.wrapOutput = (input, state = {}, options = {})=>{
1537
+ let prepend = options.contains ? '' : '^', append = options.contains ? '' : '$', output = `${prepend}(?:${input})${append}`;
1538
+ return !0 === state.negated && (output = `(?:^(?!${output}).*$)`), output;
1539
+ }, exports.basename = (path, { windows } = {})=>{
1540
+ let segs = path.split(windows ? /[\\/]/ : '/'), last = segs[segs.length - 1];
1541
+ return '' === last ? segs[segs.length - 2] : last;
1542
+ };
1543
+ },
561
1544
  "../../node_modules/.pnpm/shallow-clone@3.0.1/node_modules/shallow-clone/index.js" (module, __unused_rspack_exports, __webpack_require__) {
562
1545
  let valueOf = Symbol.prototype.valueOf, typeOf = __webpack_require__("../../node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js");
563
1546
  module.exports = function(val, deep) {
@@ -1129,39 +2112,394 @@ __webpack_require__.add({
1129
2112
  module.exports = __rspack_external_url;
1130
2113
  }
1131
2114
  });
1132
- let isCI = !!process.env.CI, isTTY = !!process.stdout?.isTTY, noColor = !!process.env.NO_COLOR, forceColor = !!process.env.FORCE_COLOR, disableColor = !1;
1133
- disableColor = !!noColor || !forceColor && (isCI || !isTTY);
1134
- let ANSI_SGR_RE = /\x1b\[[0-9;]*m/g, ANSI_OPEN_RE = /\x1b\[([0-9;]+)m/g, COLOR_HEX = {
1135
- brand: '#B39AFF',
1136
- red: '#F38BA8',
1137
- green: '#A6E3A1',
1138
- yellow: '#F9E2AF',
1139
- blue: '#89B4FA',
1140
- magenta: '#EE90DB',
1141
- cyan: '#89DCEB',
1142
- gray: '#6C7086'
1143
- }, COLOR_HEX_TO_OPEN = Object.fromEntries(Object.values(COLOR_HEX).map((hex)=>[
1144
- hex,
1145
- ((hex)=>{
1146
- let r, g, b, value = (hex || '').trim().replace(/^#/, '');
1147
- if (/^[0-9a-fA-F]{3}$/.test(value)) r = Number.parseInt(value[0] + value[0], 16), g = Number.parseInt(value[1] + value[1], 16), b = Number.parseInt(value[2] + value[2], 16);
1148
- else {
1149
- if (!/^[0-9a-fA-F]{6}$/.test(value)) return '';
1150
- r = Number.parseInt(value.slice(0, 2), 16), g = Number.parseInt(value.slice(2, 4), 16), b = Number.parseInt(value.slice(4, 6), 16);
2115
+ var LogColor, CACError = class extends Error {
2116
+ constructor(message){
2117
+ super(message), this.name = "CACError", "function" != typeof Error.captureStackTrace && (this.stack = Error(message).stack);
2118
+ }
2119
+ }, Option = class {
2120
+ rawName;
2121
+ description;
2122
+ name;
2123
+ names;
2124
+ isBoolean;
2125
+ required;
2126
+ config;
2127
+ negated;
2128
+ constructor(rawName, description, config){
2129
+ this.rawName = rawName, this.description = description, this.config = Object.assign({}, config), rawName = rawName.replaceAll(".*", ""), this.negated = !1, this.names = removeBrackets(rawName).split(",").map((v)=>{
2130
+ let name = v.trim().replace(/^-{1,2}/, "");
2131
+ return name.startsWith("no-") && (this.negated = !0, name = name.replace(/^no-/, "")), camelcaseOptionName(name);
2132
+ }).sort((a, b)=>a.length > b.length ? 1 : -1), this.name = this.names.at(-1), this.negated && null == this.config.default && (this.config.default = !0), rawName.includes("<") ? this.required = !0 : rawName.includes("[") ? this.required = !1 : this.isBoolean = !0;
2133
+ }
2134
+ };
2135
+ if ("u" > typeof process) {
2136
+ let runtimeName;
2137
+ runtimeName = "u" > typeof Deno && "string" == typeof Deno.version?.deno ? "deno" : "u" > typeof Bun && "string" == typeof Bun.version ? "bun" : "node", runtimeInfo = `${process.platform}-${process.arch} ${runtimeName}-${process.version}`, runtimeProcessArgs = process.argv;
2138
+ } else runtimeInfo = "u" < typeof navigator ? "unknown" : `${navigator.platform} ${navigator.userAgent}`;
2139
+ var Command = class {
2140
+ rawName;
2141
+ description;
2142
+ config;
2143
+ cli;
2144
+ options;
2145
+ aliasNames;
2146
+ name;
2147
+ args;
2148
+ commandAction;
2149
+ usageText;
2150
+ versionNumber;
2151
+ examples;
2152
+ helpCallback;
2153
+ globalCommand;
2154
+ constructor(rawName, description, config = {}, cli){
2155
+ this.rawName = rawName, this.description = description, this.config = config, this.cli = cli, this.options = [], this.aliasNames = [], this.name = removeBrackets(rawName), this.args = function(v) {
2156
+ let angledMatch, squareMatch, ANGLED_BRACKET_RE_GLOBAL = /<([^>]+)>/g, SQUARE_BRACKET_RE_GLOBAL = /\[([^\]]+)\]/g, res = [], parse = (match)=>{
2157
+ let variadic = !1, value = match[1];
2158
+ return value.startsWith("...") && (value = value.slice(3), variadic = !0), {
2159
+ required: match[0].startsWith("<"),
2160
+ value,
2161
+ variadic
2162
+ };
2163
+ };
2164
+ for(; angledMatch = ANGLED_BRACKET_RE_GLOBAL.exec(v);)res.push(parse(angledMatch));
2165
+ for(; squareMatch = SQUARE_BRACKET_RE_GLOBAL.exec(v);)res.push(parse(squareMatch));
2166
+ return res;
2167
+ }(rawName), this.examples = [];
2168
+ }
2169
+ usage(text) {
2170
+ return this.usageText = text, this;
2171
+ }
2172
+ allowUnknownOptions() {
2173
+ return this.config.allowUnknownOptions = !0, this;
2174
+ }
2175
+ ignoreOptionDefaultValue() {
2176
+ return this.config.ignoreOptionDefaultValue = !0, this;
2177
+ }
2178
+ version(version, customFlags = "-v, --version") {
2179
+ return this.versionNumber = version, this.option(customFlags, "Display version number"), this;
2180
+ }
2181
+ example(example) {
2182
+ return this.examples.push(example), this;
2183
+ }
2184
+ option(rawName, description, config) {
2185
+ let option = new Option(rawName, description, config);
2186
+ return this.options.push(option), this;
2187
+ }
2188
+ alias(name) {
2189
+ return this.aliasNames.push(name), this;
2190
+ }
2191
+ action(callback) {
2192
+ return this.commandAction = callback, this;
2193
+ }
2194
+ isMatched(name) {
2195
+ return this.name === name || this.aliasNames.includes(name);
2196
+ }
2197
+ get isDefaultCommand() {
2198
+ return "" === this.name || this.aliasNames.includes("!");
2199
+ }
2200
+ get isGlobalCommand() {
2201
+ return this instanceof GlobalCommand;
2202
+ }
2203
+ hasOption(name) {
2204
+ return name = name.split(".")[0], this.options.find((option)=>option.names.includes(name));
2205
+ }
2206
+ outputHelp() {
2207
+ let { name, commands } = this.cli, { versionNumber, options: globalOptions, helpCallback } = this.cli.globalCommand, sections = [
2208
+ {
2209
+ body: `${name}${versionNumber ? `/${versionNumber}` : ""}`
1151
2210
  }
1152
- return `\x1b[38;2;${r};${g};${b}m`;
1153
- })(hex)
1154
- ])), hexColor = (hex)=>{
1155
- if (disableColor) return (input)=>String(input);
1156
- let open = COLOR_HEX_TO_OPEN[hex];
1157
- return open ? (input)=>`${open}${input}\x1b[39m` : (input)=>String(input);
1158
- }, ansi = (open, close)=>(input)=>disableColor ? String(input) : `${open}${input}${close}`, colors = {
1159
- brand: hexColor(COLOR_HEX.brand),
1160
- red: hexColor(COLOR_HEX.red),
1161
- green: hexColor(COLOR_HEX.green),
1162
- yellow: hexColor(COLOR_HEX.yellow),
1163
- blue: hexColor(COLOR_HEX.blue),
1164
- magenta: hexColor(COLOR_HEX.magenta),
2211
+ ];
2212
+ if (sections.push({
2213
+ title: "Usage",
2214
+ body: ` $ ${name} ${this.usageText || this.rawName}`
2215
+ }), (this.isGlobalCommand || this.isDefaultCommand) && commands.length > 0) {
2216
+ let longestCommandName = findLongest(commands.map((command)=>command.rawName));
2217
+ sections.push({
2218
+ title: "Commands",
2219
+ body: commands.map((command)=>` ${padRight(command.rawName, longestCommandName.length)} ${command.description}`).join("\n")
2220
+ }, {
2221
+ title: "For more info, run any command with the `--help` flag",
2222
+ body: commands.map((command)=>` $ ${name}${"" === command.name ? "" : ` ${command.name}`} --help`).join("\n")
2223
+ });
2224
+ }
2225
+ let options = this.isGlobalCommand ? globalOptions : [
2226
+ ...this.options,
2227
+ ...globalOptions || []
2228
+ ];
2229
+ if (this.isGlobalCommand || this.isDefaultCommand || (options = options.filter((option)=>"version" !== option.name)), options.length > 0) {
2230
+ let longestOptionName = findLongest(options.map((option)=>option.rawName));
2231
+ sections.push({
2232
+ title: "Options",
2233
+ body: options.map((option)=>` ${padRight(option.rawName, longestOptionName.length)} ${option.description} ${void 0 === option.config.default ? "" : `(default: ${option.config.default})`}`).join("\n")
2234
+ });
2235
+ }
2236
+ this.examples.length > 0 && sections.push({
2237
+ title: "Examples",
2238
+ body: this.examples.map((example)=>"function" == typeof example ? example(name) : example).join("\n")
2239
+ }), helpCallback && (sections = helpCallback(sections) || sections), console.info(sections.map((section)=>section.title ? `${section.title}:\n${section.body}` : section.body).join("\n\n"));
2240
+ }
2241
+ outputVersion() {
2242
+ let { name } = this.cli, { versionNumber } = this.cli.globalCommand;
2243
+ versionNumber && console.info(`${name}/${versionNumber} ${runtimeInfo}`);
2244
+ }
2245
+ checkRequiredArgs() {
2246
+ let minimalArgsCount = this.args.filter((arg)=>arg.required).length;
2247
+ if (this.cli.args.length < minimalArgsCount) throw new CACError(`missing required args for command \`${this.rawName}\``);
2248
+ }
2249
+ checkUnknownOptions() {
2250
+ let { options, globalCommand } = this.cli;
2251
+ if (!this.config.allowUnknownOptions) {
2252
+ for (let name of Object.keys(options))if ("--" !== name && !this.hasOption(name) && !globalCommand.hasOption(name)) throw new CACError(`Unknown option \`${name.length > 1 ? `--${name}` : `-${name}`}\``);
2253
+ }
2254
+ }
2255
+ checkOptionValue() {
2256
+ let { options: parsedOptions, globalCommand } = this.cli, options = [
2257
+ ...globalCommand.options,
2258
+ ...this.options
2259
+ ];
2260
+ for (let option of options){
2261
+ let value = parsedOptions[option.name.split(".")[0]];
2262
+ if (option.required) {
2263
+ let hasNegated = options.some((o)=>o.negated && o.names.includes(option.name));
2264
+ if (!0 === value || !1 === value && !hasNegated) throw new CACError(`option \`${option.rawName}\` value is missing`);
2265
+ }
2266
+ }
2267
+ }
2268
+ checkUnusedArgs() {
2269
+ let maximumArgsCount = this.args.some((arg)=>arg.variadic) ? 1 / 0 : this.args.length;
2270
+ if (maximumArgsCount < this.cli.args.length) throw new CACError(`Unused args: ${this.cli.args.slice(maximumArgsCount).map((arg)=>`\`${arg}\``).join(", ")}`);
2271
+ }
2272
+ }, GlobalCommand = class extends Command {
2273
+ constructor(cli){
2274
+ super("@@global@@", "", {}, cli);
2275
+ }
2276
+ }, CAC = class extends EventTarget {
2277
+ name;
2278
+ commands;
2279
+ globalCommand;
2280
+ matchedCommand;
2281
+ matchedCommandName;
2282
+ rawArgs;
2283
+ args;
2284
+ options;
2285
+ showHelpOnExit;
2286
+ showVersionOnExit;
2287
+ constructor(name = ""){
2288
+ super(), this.name = name, this.commands = [], this.rawArgs = [], this.args = [], this.options = {}, this.globalCommand = new GlobalCommand(this), this.globalCommand.usage("<command> [options]");
2289
+ }
2290
+ usage(text) {
2291
+ return this.globalCommand.usage(text), this;
2292
+ }
2293
+ command(rawName, description, config) {
2294
+ let command = new Command(rawName, description || "", config, this);
2295
+ return command.globalCommand = this.globalCommand, this.commands.push(command), command;
2296
+ }
2297
+ option(rawName, description, config) {
2298
+ return this.globalCommand.option(rawName, description, config), this;
2299
+ }
2300
+ help(callback) {
2301
+ return this.globalCommand.option("-h, --help", "Display this message"), this.globalCommand.helpCallback = callback, this.showHelpOnExit = !0, this;
2302
+ }
2303
+ version(version, customFlags = "-v, --version") {
2304
+ return this.globalCommand.version(version, customFlags), this.showVersionOnExit = !0, this;
2305
+ }
2306
+ example(example) {
2307
+ return this.globalCommand.example(example), this;
2308
+ }
2309
+ outputHelp() {
2310
+ this.matchedCommand ? this.matchedCommand.outputHelp() : this.globalCommand.outputHelp();
2311
+ }
2312
+ outputVersion() {
2313
+ this.globalCommand.outputVersion();
2314
+ }
2315
+ setParsedInfo({ args, options }, matchedCommand, matchedCommandName) {
2316
+ return this.args = args, this.options = options, matchedCommand && (this.matchedCommand = matchedCommand), matchedCommandName && (this.matchedCommandName = matchedCommandName), this;
2317
+ }
2318
+ unsetMatchedCommand() {
2319
+ this.matchedCommand = void 0, this.matchedCommandName = void 0;
2320
+ }
2321
+ parse(argv, { run = !0 } = {}) {
2322
+ var input;
2323
+ let m;
2324
+ if (!argv) {
2325
+ if (!runtimeProcessArgs) throw Error("No argv provided and runtime process argv is not available.");
2326
+ argv = runtimeProcessArgs;
2327
+ }
2328
+ this.rawArgs = argv, this.name || (this.name = argv[1] ? (input = argv[1], (m = /([^\\/]+)$/.exec(input)) ? m[1] : "") : "cli");
2329
+ let shouldParse = !0;
2330
+ for (let command of this.commands){
2331
+ let parsed = this.mri(argv.slice(2), command), commandName = parsed.args[0];
2332
+ if (command.isMatched(commandName)) {
2333
+ shouldParse = !1;
2334
+ let parsedInfo = {
2335
+ ...parsed,
2336
+ args: parsed.args.slice(1)
2337
+ };
2338
+ this.setParsedInfo(parsedInfo, command, commandName), this.dispatchEvent(new CustomEvent(`command:${commandName}`, {
2339
+ detail: command
2340
+ }));
2341
+ }
2342
+ }
2343
+ if (shouldParse) {
2344
+ for (let command of this.commands)if (command.isDefaultCommand) {
2345
+ shouldParse = !1;
2346
+ let parsed = this.mri(argv.slice(2), command);
2347
+ this.setParsedInfo(parsed, command), this.dispatchEvent(new CustomEvent("command:!", {
2348
+ detail: command
2349
+ }));
2350
+ }
2351
+ }
2352
+ if (shouldParse) {
2353
+ let parsed = this.mri(argv.slice(2));
2354
+ this.setParsedInfo(parsed);
2355
+ }
2356
+ this.options.help && this.showHelpOnExit && (this.outputHelp(), run = !1, this.unsetMatchedCommand()), this.options.version && this.showVersionOnExit && null == this.matchedCommandName && (this.outputVersion(), run = !1, this.unsetMatchedCommand());
2357
+ let parsedArgv = {
2358
+ args: this.args,
2359
+ options: this.options
2360
+ };
2361
+ return run && this.runMatchedCommand(), !this.matchedCommand && this.args[0] && this.dispatchEvent(new CustomEvent("command:*", {
2362
+ detail: this.args[0]
2363
+ })), parsedArgv;
2364
+ }
2365
+ mri(argv, command) {
2366
+ let cliOptions = [
2367
+ ...this.globalCommand.options,
2368
+ ...command ? command.options : []
2369
+ ], mriOptions = function(options) {
2370
+ let result = {
2371
+ alias: {},
2372
+ boolean: []
2373
+ };
2374
+ for (let [index, option] of options.entries())option.names.length > 1 && (result.alias[option.names[0]] = option.names.slice(1)), option.isBoolean && (option.negated && options.some((o, i)=>i !== index && o.names.some((name)=>option.names.includes(name)) && "boolean" == typeof o.required) || result.boolean.push(option.names[0]));
2375
+ return result;
2376
+ }(cliOptions), argsAfterDoubleDashes = [], doubleDashesIndex = argv.indexOf("--");
2377
+ -1 !== doubleDashesIndex && (argsAfterDoubleDashes = argv.slice(doubleDashesIndex + 1), argv = argv.slice(0, doubleDashesIndex));
2378
+ let parsed = function(args, opts) {
2379
+ opts = opts || {};
2380
+ var k, arr, arg, name, val, out = {
2381
+ _: []
2382
+ }, i = 0, j = 0, idx = 0, len = (args = args || []).length;
2383
+ let alibi = void 0 !== opts.alias, strict = void 0 !== opts.unknown, defaults = void 0 !== opts.default;
2384
+ if (opts.alias = opts.alias || {}, opts.string = toArr(opts.string), opts.boolean = toArr(opts.boolean), alibi) for(k in opts.alias)for(i = 0, arr = opts.alias[k] = toArr(opts.alias[k]); i < arr.length; i++)(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);
2385
+ for(i = opts.boolean.length; i-- > 0;)for(j = (arr = opts.alias[opts.boolean[i]] || []).length; j-- > 0;)opts.boolean.push(arr[j]);
2386
+ for(i = opts.string.length; i-- > 0;)for(j = (arr = opts.alias[opts.string[i]] || []).length; j-- > 0;)opts.string.push(arr[j]);
2387
+ if (defaults) {
2388
+ for(k in opts.default)if (name = typeof opts.default[k], arr = opts.alias[k] = opts.alias[k] || [], void 0 !== opts[name]) for(opts[name].push(k), i = 0; i < arr.length; i++)opts[name].push(arr[i]);
2389
+ }
2390
+ let keys = strict ? Object.keys(opts.alias) : [];
2391
+ for(i = 0; i < len; i++){
2392
+ if ("--" === (arg = args[i])) {
2393
+ out._ = out._.concat(args.slice(++i));
2394
+ break;
2395
+ }
2396
+ for(j = 0; j < arg.length && 45 === arg.charCodeAt(j); j++);
2397
+ if (0 === j) out._.push(arg);
2398
+ else if ("no-" === arg.substring(j, j + 3)) {
2399
+ if (name = arg.substring(j + 3), strict && !~keys.indexOf(name)) return opts.unknown(arg);
2400
+ out[name] = !1;
2401
+ } else {
2402
+ for(idx = j + 1; idx < arg.length && 61 !== arg.charCodeAt(idx); idx++);
2403
+ for(name = arg.substring(j, idx), val = arg.substring(++idx) || i + 1 === len || 45 === ("" + args[i + 1]).charCodeAt(0) || args[++i], arr = 2 === j ? [
2404
+ name
2405
+ ] : name, idx = 0; idx < arr.length; idx++){
2406
+ if (name = arr[idx], strict && !~keys.indexOf(name)) return opts.unknown("-".repeat(j) + name);
2407
+ !function(out, key, val, opts) {
2408
+ var x, old = out[key], nxt = ~opts.string.indexOf(key) ? null == val || !0 === val ? "" : String(val) : "boolean" == typeof val ? val : ~opts.boolean.indexOf(key) ? "false" !== val && ("true" === val || (out._.push(0 * (x = +val) == 0 ? x : val), !!val)) : 0 * (x = +val) == 0 ? x : val;
2409
+ out[key] = null == old ? nxt : Array.isArray(old) ? old.concat(nxt) : [
2410
+ old,
2411
+ nxt
2412
+ ];
2413
+ }(out, name, idx + 1 < arr.length || val, opts);
2414
+ }
2415
+ }
2416
+ }
2417
+ if (defaults) for(k in opts.default)void 0 === out[k] && (out[k] = opts.default[k]);
2418
+ if (alibi) for(k in out)for(arr = opts.alias[k] || []; arr.length > 0;)out[arr.shift()] = out[k];
2419
+ return out;
2420
+ }(argv, mriOptions), args = (parsed = Object.keys(parsed).reduce((res, name)=>({
2421
+ ...res,
2422
+ [camelcaseOptionName(name)]: parsed[name]
2423
+ }), {
2424
+ _: []
2425
+ }))._, options = {
2426
+ "--": argsAfterDoubleDashes
2427
+ }, ignoreDefault = command && command.config.ignoreOptionDefaultValue ? command.config.ignoreOptionDefaultValue : this.globalCommand.config.ignoreOptionDefaultValue, transforms = Object.create(null);
2428
+ for (let cliOption of cliOptions){
2429
+ if (!ignoreDefault && void 0 !== cliOption.config.default) for (let name of cliOption.names)options[name] = cliOption.config.default;
2430
+ Array.isArray(cliOption.config.type) && void 0 === transforms[cliOption.name] && (transforms[cliOption.name] = Object.create(null), transforms[cliOption.name].shouldTransform = !0, transforms[cliOption.name].transformFunction = cliOption.config.type[0]);
2431
+ }
2432
+ for (let key of Object.keys(parsed))if ("_" !== key) {
2433
+ !function(obj, keys, val) {
2434
+ let current = obj;
2435
+ for(let i = 0; i < keys.length; i++){
2436
+ let key = keys[i];
2437
+ if (i === keys.length - 1) {
2438
+ current[key] = val;
2439
+ return;
2440
+ }
2441
+ if (null == current[key]) {
2442
+ let nextKeyIsArrayIndex = +keys[i + 1] > -1;
2443
+ current[key] = nextKeyIsArrayIndex ? [] : {};
2444
+ }
2445
+ current = current[key];
2446
+ }
2447
+ }(options, key.split("."), parsed[key]);
2448
+ for (let key of Object.keys(transforms)){
2449
+ let transform = transforms[key];
2450
+ transform.shouldTransform && (options[key] = [
2451
+ options[key]
2452
+ ].flat(), "function" == typeof transform.transformFunction && (options[key] = options[key].map(transform.transformFunction)));
2453
+ }
2454
+ }
2455
+ return {
2456
+ args,
2457
+ options
2458
+ };
2459
+ }
2460
+ runMatchedCommand() {
2461
+ let { args, options, matchedCommand: command } = this;
2462
+ if (!command || !command.commandAction) return;
2463
+ command.checkUnknownOptions(), command.checkOptionValue(), command.checkRequiredArgs(), command.checkUnusedArgs();
2464
+ let actionArgs = [];
2465
+ return command.args.forEach((arg, index)=>{
2466
+ arg.variadic ? actionArgs.push(args.slice(index)) : actionArgs.push(args[index]);
2467
+ }), actionArgs.push(options), command.commandAction.apply(this, actionArgs);
2468
+ }
2469
+ };
2470
+ let isCI = !!process.env.CI, isTTY = !!process.stdout?.isTTY, noColor = !!process.env.NO_COLOR, forceColor = !!process.env.FORCE_COLOR, disableColor = !1;
2471
+ disableColor = !!noColor || !forceColor && (isCI || !isTTY);
2472
+ let ANSI_SGR_RE = /\x1b\[[0-9;]*m/g, ANSI_OPEN_RE = /\x1b\[([0-9;]+)m/g, COLOR_HEX = {
2473
+ brand: '#B39AFF',
2474
+ red: '#F38BA8',
2475
+ green: '#A6E3A1',
2476
+ yellow: '#F9E2AF',
2477
+ blue: '#89B4FA',
2478
+ magenta: '#EE90DB',
2479
+ cyan: '#89DCEB',
2480
+ gray: '#6C7086'
2481
+ }, COLOR_HEX_TO_OPEN = Object.fromEntries(Object.values(COLOR_HEX).map((hex)=>[
2482
+ hex,
2483
+ ((hex)=>{
2484
+ let r, g, b, value = (hex || '').trim().replace(/^#/, '');
2485
+ if (/^[0-9a-fA-F]{3}$/.test(value)) r = Number.parseInt(value[0] + value[0], 16), g = Number.parseInt(value[1] + value[1], 16), b = Number.parseInt(value[2] + value[2], 16);
2486
+ else {
2487
+ if (!/^[0-9a-fA-F]{6}$/.test(value)) return '';
2488
+ r = Number.parseInt(value.slice(0, 2), 16), g = Number.parseInt(value.slice(2, 4), 16), b = Number.parseInt(value.slice(4, 6), 16);
2489
+ }
2490
+ return `\x1b[38;2;${r};${g};${b}m`;
2491
+ })(hex)
2492
+ ])), hexColor = (hex)=>{
2493
+ if (disableColor) return (input)=>String(input);
2494
+ let open = COLOR_HEX_TO_OPEN[hex];
2495
+ return open ? (input)=>`${open}${input}\x1b[39m` : (input)=>String(input);
2496
+ }, ansi = (open, close)=>(input)=>disableColor ? String(input) : `${open}${input}${close}`, colors = {
2497
+ brand: hexColor(COLOR_HEX.brand),
2498
+ red: hexColor(COLOR_HEX.red),
2499
+ green: hexColor(COLOR_HEX.green),
2500
+ yellow: hexColor(COLOR_HEX.yellow),
2501
+ blue: hexColor(COLOR_HEX.blue),
2502
+ magenta: hexColor(COLOR_HEX.magenta),
1165
2503
  cyan: hexColor(COLOR_HEX.cyan),
1166
2504
  gray: hexColor(COLOR_HEX.gray),
1167
2505
  bold: ansi('\x1b[1m', '\x1b[22m'),
@@ -1195,7 +2533,7 @@ function convertBasicAnsiColors(input) {
1195
2533
  return `${styleSeq}${open}`;
1196
2534
  }) : '';
1197
2535
  }
1198
- var LogColor, logger_LogColor = ((LogColor = {}).error = "red", LogColor.warn = "yellow", LogColor.info = "cyan", LogColor.ready = "green", LogColor.event = "magenta", LogColor.wait = "blue", LogColor);
2536
+ var logger_LogColor = ((LogColor = {}).error = "red", LogColor.warn = "yellow", LogColor.info = "cyan", LogColor.ready = "green", LogColor.event = "magenta", LogColor.wait = "blue", LogColor);
1199
2537
  let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]', CSS_MODULES_EXPORTS_CONVENTION = 'camel-case', DEV_DEFAULT_FILENAME = {
1200
2538
  js: 'js/[name].js',
1201
2539
  jsAsync: 'js/async/[name].js',
@@ -1217,13 +2555,535 @@ let CSS_MODULES_LOCAL_IDENT_NAME = '[path][name]__[local]--[hash:5]', CSS_MODULE
1217
2555
  <body>
1218
2556
  <div id="${mountId}"></div>
1219
2557
  </body>
1220
- </html>`, JS_REGEX = /\.[jt]s$/, JSX_REGEX = /\.[jt]sx$/, SCRIPT_REGEX = /\.[jt]sx?$/, CSS_REGEX = /\.css$/i, LESS_REGEX = /\.less$/i, SASS_REGEX = /\.s[ac]ss$/i;
2558
+ </html>`, JS_REGEX = /\.[jt]s$/, JSX_REGEX = /\.[jt]sx$/, SCRIPT_REGEX = /\.[jt]sx?$/, CSS_REGEX = /\.css$/i, LESS_REGEX = /\.less$/i, SASS_REGEX = /\.s[ac]ss$/i, CSS_MODULES_RESOURCE_QUERY_REGEX = /[?&]module(?:[=&]|$)/, external_path_ = __webpack_require__("path"), external_fs_ = __webpack_require__("fs");
2559
+ var __require = createRequire(import.meta.url);
2560
+ let SLASHES_REGEX = /[\\/]/g;
2561
+ function convertSlashes(path, separator) {
2562
+ return path.replace(SLASHES_REGEX, separator);
2563
+ }
2564
+ let WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
2565
+ function normalizePath(path, options) {
2566
+ var path1;
2567
+ let normalized, { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options, pathNeedsCleaning = "win32" === process.platform && path.includes("/") || path.startsWith(".");
2568
+ return resolvePaths && (path = (0, external_path_.resolve)(path)), ((normalizePath$1 || pathNeedsCleaning) && (path1 = path, (normalized = (0, external_path_.normalize)(path1)).length > 1 && normalized[normalized.length - 1] === external_path_.sep && (normalized = normalized.substring(0, normalized.length - 1)), path = normalized), "." === path) ? "" : convertSlashes(path[path.length - 1] !== pathSeparator ? path + pathSeparator : path, pathSeparator);
2569
+ }
2570
+ function joinPathWithBasePath(filename, directoryPath) {
2571
+ return directoryPath + filename;
2572
+ }
2573
+ function joinPath(filename) {
2574
+ return filename;
2575
+ }
2576
+ let pushDirectory = (directoryPath, paths)=>{
2577
+ paths.push(directoryPath || ".");
2578
+ }, pushDirectoryFilter = (directoryPath, paths, filters)=>{
2579
+ let path = directoryPath || ".";
2580
+ filters.every((filter)=>filter(path, !0)) && paths.push(path);
2581
+ }, empty$2 = ()=>{}, pushFileFilterAndCount = (filename, _paths, counts, filters)=>{
2582
+ filters.every((filter)=>filter(filename, !1)) && counts.files++;
2583
+ }, pushFileFilter = (filename, paths, _counts, filters)=>{
2584
+ filters.every((filter)=>filter(filename, !1)) && paths.push(filename);
2585
+ }, pushFileCount = (_filename, _paths, counts, _filters)=>{
2586
+ counts.files++;
2587
+ }, pushFile = (filename, paths)=>{
2588
+ paths.push(filename);
2589
+ }, empty$1 = ()=>{}, getArray = (paths)=>paths, getArrayGroup = ()=>[
2590
+ ""
2591
+ ].slice(0, 0), groupFiles = (groups, directory, files)=>{
2592
+ groups.push({
2593
+ directory,
2594
+ files,
2595
+ dir: directory
2596
+ });
2597
+ }, empty = ()=>{}, resolveSymlinksAsync = function(path, state, callback$1) {
2598
+ let { queue, fs, options: { suppressErrors } } = state;
2599
+ queue.enqueue(), fs.realpath(path, (error, resolvedPath)=>{
2600
+ if (error) return queue.dequeue(suppressErrors ? null : error, state);
2601
+ fs.stat(resolvedPath, (error$1, stat)=>error$1 ? queue.dequeue(suppressErrors ? null : error$1, state) : stat.isDirectory() && isRecursive(path, resolvedPath, state) ? queue.dequeue(null, state) : void (callback$1(stat, resolvedPath), queue.dequeue(null, state)));
2602
+ });
2603
+ }, resolveSymlinks = function(path, state, callback$1) {
2604
+ let { queue, fs, options: { suppressErrors } } = state;
2605
+ queue.enqueue();
2606
+ try {
2607
+ let resolvedPath = fs.realpathSync(path), stat = fs.statSync(resolvedPath);
2608
+ if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return;
2609
+ callback$1(stat, resolvedPath);
2610
+ } catch (e) {
2611
+ if (!suppressErrors) throw e;
2612
+ }
2613
+ };
2614
+ function isRecursive(path, resolved, state) {
2615
+ if (state.options.useRealPaths) {
2616
+ var resolved1, state1;
2617
+ return resolved1 = resolved, (state1 = state).visited.includes(resolved1 + state1.options.pathSeparator);
2618
+ }
2619
+ let parent = (0, external_path_.dirname)(path), depth = 1;
2620
+ for(; parent !== state.root && depth < 2;){
2621
+ let resolvedPath = state.symlinks.get(parent);
2622
+ resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath)) ? depth++ : parent = (0, external_path_.dirname)(parent);
2623
+ }
2624
+ return state.symlinks.set(path, resolved), depth > 1;
2625
+ }
2626
+ let onlyCountsSync = (state)=>state.counts, groupsSync = (state)=>state.groups, defaultSync = (state)=>state.paths, limitFilesSync = (state)=>state.paths.slice(0, state.options.maxFiles), onlyCountsAsync = (state, error, callback$1)=>(report(error, callback$1, state.counts, state.options.suppressErrors), null), defaultAsync = (state, error, callback$1)=>(report(error, callback$1, state.paths, state.options.suppressErrors), null), limitFilesAsync = (state, error, callback$1)=>(report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors), null), groupsAsync = (state, error, callback$1)=>(report(error, callback$1, state.groups, state.options.suppressErrors), null);
2627
+ function report(error, callback$1, output, suppressErrors) {
2628
+ callback$1(error && !suppressErrors ? error : null, output);
2629
+ }
2630
+ let readdirOpts = {
2631
+ withFileTypes: !0
2632
+ }, walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1)=>{
2633
+ if (state.queue.enqueue(), currentDepth < 0) return state.queue.dequeue(null, state);
2634
+ let { fs } = state;
2635
+ state.visited.push(crawlPath), state.counts.directories++, fs.readdir(crawlPath || ".", readdirOpts, (error, entries = [])=>{
2636
+ callback$1(entries, directoryPath, currentDepth), state.queue.dequeue(state.options.suppressErrors ? null : error, state);
2637
+ });
2638
+ }, walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1)=>{
2639
+ let { fs } = state;
2640
+ if (currentDepth < 0) return;
2641
+ state.visited.push(crawlPath), state.counts.directories++;
2642
+ let entries = [];
2643
+ try {
2644
+ entries = fs.readdirSync(crawlPath || ".", readdirOpts);
2645
+ } catch (e) {
2646
+ if (!state.options.suppressErrors) throw e;
2647
+ }
2648
+ callback$1(entries, directoryPath, currentDepth);
2649
+ };
2650
+ var Queue = class {
2651
+ count = 0;
2652
+ constructor(onQueueEmpty){
2653
+ this.onQueueEmpty = onQueueEmpty;
2654
+ }
2655
+ enqueue() {
2656
+ return this.count++, this.count;
2657
+ }
2658
+ dequeue(error, output) {
2659
+ this.onQueueEmpty && (--this.count <= 0 || error) && (this.onQueueEmpty(error, output), error && (output.controller.abort(), this.onQueueEmpty = void 0));
2660
+ }
2661
+ }, Counter = class {
2662
+ _files = 0;
2663
+ _directories = 0;
2664
+ set files(num) {
2665
+ this._files = num;
2666
+ }
2667
+ get files() {
2668
+ return this._files;
2669
+ }
2670
+ set directories(num) {
2671
+ this._directories = num;
2672
+ }
2673
+ get directories() {
2674
+ return this._directories;
2675
+ }
2676
+ get dirs() {
2677
+ return this._directories;
2678
+ }
2679
+ }, Aborter = class {
2680
+ aborted = !1;
2681
+ abort() {
2682
+ this.aborted = !0;
2683
+ }
2684
+ }, Walker = class {
2685
+ root;
2686
+ isSynchronous;
2687
+ state;
2688
+ joinPath;
2689
+ pushDirectory;
2690
+ pushFile;
2691
+ getArray;
2692
+ groupFiles;
2693
+ resolveSymlink;
2694
+ walkDirectory;
2695
+ callbackInvoker;
2696
+ constructor(root, options, callback$1){
2697
+ var path, isSynchronous;
2698
+ this.isSynchronous = !callback$1, this.callbackInvoker = function(options, isSynchronous) {
2699
+ let { onlyCounts, group, maxFiles } = options;
2700
+ return onlyCounts ? isSynchronous ? onlyCountsSync : onlyCountsAsync : group ? isSynchronous ? groupsSync : groupsAsync : maxFiles ? isSynchronous ? limitFilesSync : limitFilesAsync : isSynchronous ? defaultSync : defaultAsync;
2701
+ }(options, this.isSynchronous), this.root = normalizePath(root, options), this.state = {
2702
+ root: "/" === (path = this.root) || WINDOWS_ROOT_DIR_REGEX.test(path) ? this.root : this.root.slice(0, -1),
2703
+ paths: [
2704
+ ""
2705
+ ].slice(0, 0),
2706
+ groups: [],
2707
+ counts: new Counter(),
2708
+ options,
2709
+ queue: new Queue((error, state)=>this.callbackInvoker(state, error, callback$1)),
2710
+ symlinks: new Map(),
2711
+ visited: [
2712
+ ""
2713
+ ].slice(0, 0),
2714
+ controller: new Aborter(),
2715
+ fs: options.fs || external_fs_
2716
+ }, this.joinPath = function(root, options) {
2717
+ let { relativePaths, includeBasePath } = options;
2718
+ return relativePaths && root ? function(filename, directoryPath) {
2719
+ return directoryPath.startsWith(root) ? directoryPath.slice(root.length) + filename : convertSlashes((0, external_path_.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
2720
+ } : includeBasePath ? joinPathWithBasePath : joinPath;
2721
+ }(this.root, options), this.pushDirectory = function(root, options) {
2722
+ let { includeDirs, filters, relativePaths } = options;
2723
+ if (!includeDirs) return empty$2;
2724
+ if (relativePaths) return filters && filters.length ? function(directoryPath, paths, filters) {
2725
+ let relativePath = directoryPath.substring(root.length) || ".";
2726
+ filters.every((filter)=>filter(relativePath, !0)) && paths.push(relativePath);
2727
+ } : function(directoryPath, paths) {
2728
+ paths.push(directoryPath.substring(root.length) || ".");
2729
+ };
2730
+ return filters && filters.length ? pushDirectoryFilter : pushDirectory;
2731
+ }(this.root, options), this.pushFile = function(options) {
2732
+ let { excludeFiles, filters, onlyCounts } = options;
2733
+ return excludeFiles ? empty$1 : filters && filters.length ? onlyCounts ? pushFileFilterAndCount : pushFileFilter : onlyCounts ? pushFileCount : pushFile;
2734
+ }(options), this.getArray = options.group ? getArrayGroup : getArray, this.groupFiles = options.group ? groupFiles : empty, this.resolveSymlink = (isSynchronous = this.isSynchronous, !options.resolveSymlinks || options.excludeSymlinks ? null : isSynchronous ? resolveSymlinks : resolveSymlinksAsync), this.walkDirectory = this.isSynchronous ? walkSync : walkAsync;
2735
+ }
2736
+ start() {
2737
+ return this.pushDirectory(this.root, this.state.paths, this.state.options.filters), this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk), this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
2738
+ }
2739
+ walk = (entries, directoryPath, depth)=>{
2740
+ let { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
2741
+ if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
2742
+ let files = this.getArray(this.state.paths);
2743
+ for(let i = 0; i < entries.length; ++i){
2744
+ let entry = entries[i];
2745
+ if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
2746
+ let filename = this.joinPath(entry.name, directoryPath);
2747
+ this.pushFile(filename, files, this.state.counts, filters);
2748
+ } else if (entry.isDirectory()) {
2749
+ let path = directoryPath + entry.name + this.state.options.pathSeparator;
2750
+ if (exclude && exclude(entry.name, path)) continue;
2751
+ this.pushDirectory(path, paths, filters), this.walkDirectory(this.state, path, path, depth - 1, this.walk);
2752
+ } else if (this.resolveSymlink && entry.isSymbolicLink()) {
2753
+ let path = directoryPath + entry.name;
2754
+ this.resolveSymlink(path, this.state, (stat, resolvedPath)=>{
2755
+ if (stat.isDirectory()) resolvedPath = normalizePath(resolvedPath, this.state.options), exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator) || this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
2756
+ else {
2757
+ resolvedPath = useRealPaths ? resolvedPath : path;
2758
+ let filename = (0, external_path_.basename)(resolvedPath), directoryPath$1 = normalizePath((0, external_path_.dirname)(resolvedPath), this.state.options);
2759
+ resolvedPath = this.joinPath(filename, directoryPath$1), this.pushFile(resolvedPath, files, this.state.counts, filters);
2760
+ }
2761
+ });
2762
+ }
2763
+ }
2764
+ this.groupFiles(this.state.groups, directoryPath, files);
2765
+ };
2766
+ };
2767
+ function dist_callback(root, options, callback$1) {
2768
+ new Walker(root, options, callback$1).start();
2769
+ }
2770
+ var APIBuilder = class {
2771
+ constructor(root, options){
2772
+ this.root = root, this.options = options;
2773
+ }
2774
+ withPromise() {
2775
+ var root, options;
2776
+ return root = this.root, options = this.options, new Promise((resolve$1, reject)=>{
2777
+ dist_callback(root, options, (err, output)=>{
2778
+ if (err) return reject(err);
2779
+ resolve$1(output);
2780
+ });
2781
+ });
2782
+ }
2783
+ withCallback(cb) {
2784
+ dist_callback(this.root, this.options, cb);
2785
+ }
2786
+ sync() {
2787
+ return new Walker(this.root, this.options).start();
2788
+ }
2789
+ };
2790
+ let pm = null;
2791
+ try {
2792
+ __require.resolve("picomatch"), pm = __require("picomatch");
2793
+ } catch {}
2794
+ var Builder = class {
2795
+ globCache = {};
2796
+ options = {
2797
+ maxDepth: 1 / 0,
2798
+ suppressErrors: !0,
2799
+ pathSeparator: external_path_.sep,
2800
+ filters: []
2801
+ };
2802
+ globFunction;
2803
+ constructor(options){
2804
+ this.options = {
2805
+ ...this.options,
2806
+ ...options
2807
+ }, this.globFunction = this.options.globFunction;
2808
+ }
2809
+ group() {
2810
+ return this.options.group = !0, this;
2811
+ }
2812
+ withPathSeparator(separator) {
2813
+ return this.options.pathSeparator = separator, this;
2814
+ }
2815
+ withBasePath() {
2816
+ return this.options.includeBasePath = !0, this;
2817
+ }
2818
+ withRelativePaths() {
2819
+ return this.options.relativePaths = !0, this;
2820
+ }
2821
+ withDirs() {
2822
+ return this.options.includeDirs = !0, this;
2823
+ }
2824
+ withMaxDepth(depth) {
2825
+ return this.options.maxDepth = depth, this;
2826
+ }
2827
+ withMaxFiles(limit) {
2828
+ return this.options.maxFiles = limit, this;
2829
+ }
2830
+ withFullPaths() {
2831
+ return this.options.resolvePaths = !0, this.options.includeBasePath = !0, this;
2832
+ }
2833
+ withErrors() {
2834
+ return this.options.suppressErrors = !1, this;
2835
+ }
2836
+ withSymlinks({ resolvePaths = !0 } = {}) {
2837
+ return this.options.resolveSymlinks = !0, this.options.useRealPaths = resolvePaths, this.withFullPaths();
2838
+ }
2839
+ withAbortSignal(signal) {
2840
+ return this.options.signal = signal, this;
2841
+ }
2842
+ normalize() {
2843
+ return this.options.normalizePath = !0, this;
2844
+ }
2845
+ filter(predicate) {
2846
+ return this.options.filters.push(predicate), this;
2847
+ }
2848
+ onlyDirs() {
2849
+ return this.options.excludeFiles = !0, this.options.includeDirs = !0, this;
2850
+ }
2851
+ exclude(predicate) {
2852
+ return this.options.exclude = predicate, this;
2853
+ }
2854
+ onlyCounts() {
2855
+ return this.options.onlyCounts = !0, this;
2856
+ }
2857
+ crawl(root) {
2858
+ return new APIBuilder(root || ".", this.options);
2859
+ }
2860
+ withGlobFunction(fn) {
2861
+ return this.globFunction = fn, this;
2862
+ }
2863
+ crawlWithOptions(root, options) {
2864
+ return this.options = {
2865
+ ...this.options,
2866
+ ...options
2867
+ }, new APIBuilder(root || ".", this.options);
2868
+ }
2869
+ glob(...patterns) {
2870
+ return this.globFunction ? this.globWithOptions(patterns) : this.globWithOptions(patterns, {
2871
+ dot: !0
2872
+ });
2873
+ }
2874
+ globWithOptions(patterns, ...options) {
2875
+ let globFn = this.globFunction || pm;
2876
+ if (!globFn) throw Error("Please specify a glob function to use glob matching.");
2877
+ var isMatch = this.globCache[patterns.join("\0")];
2878
+ return isMatch || (isMatch = globFn(patterns, ...options), this.globCache[patterns.join("\0")] = isMatch), this.options.filters.push((path)=>isMatch(path)), this;
2879
+ }
2880
+ };
2881
+ let external_url_ = __webpack_require__("url"), picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js"), isReadonlyArray = Array.isArray, isWin = "win32" === process.platform, ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/, WIN32_ROOT_DIR = /^[A-Z]:\/$/i, isRoot = isWin ? (p)=>WIN32_ROOT_DIR.test(p) : (p)=>"/" === p;
2882
+ function buildFormat(cwd, root, absolute) {
2883
+ if (cwd === root || root.startsWith(`${cwd}/`)) {
2884
+ if (absolute) {
2885
+ let start = isRoot(cwd) ? cwd.length : cwd.length + 1;
2886
+ return (p, isDir)=>p.slice(start, isDir ? -1 : void 0) || ".";
2887
+ }
2888
+ let prefix = root.slice(cwd.length + 1);
2889
+ return prefix ? (p, isDir)=>{
2890
+ if ("." === p) return prefix;
2891
+ let result = `${prefix}/${p}`;
2892
+ return isDir ? result.slice(0, -1) : result;
2893
+ } : (p, isDir)=>isDir && "." !== p ? p.slice(0, -1) : p;
2894
+ }
2895
+ return absolute ? (p)=>external_path_.posix.relative(cwd, p) || "." : (p)=>external_path_.posix.relative(cwd, `${root}/${p}`) || ".";
2896
+ }
2897
+ let splitPatternOptions = {
2898
+ parts: !0
2899
+ };
2900
+ function splitPattern(path$1) {
2901
+ var _result$parts;
2902
+ let result = picomatch.scan(path$1, splitPatternOptions);
2903
+ return (null == (_result$parts = result.parts) ? void 0 : _result$parts.length) ? result.parts : [
2904
+ path$1
2905
+ ];
2906
+ }
2907
+ let POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g, WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g, escapePath = isWin ? (path$1)=>path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&") : (path$1)=>path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
2908
+ function dist_log(...tasks) {
2909
+ console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`, ...tasks);
2910
+ }
2911
+ let PARENT_DIRECTORY = /^(\/?\.\.)+/, ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g, BACKSLASHES = /\\/g;
2912
+ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
2913
+ let result = pattern;
2914
+ pattern.endsWith("/") && (result = pattern.slice(0, -1)), !result.endsWith("*") && expandDirectories && (result += "/**");
2915
+ let escapedCwd = escapePath(cwd);
2916
+ result = external_path_.default.isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? external_path_.posix.relative(escapedCwd, result) : external_path_.posix.normalize(result);
2917
+ let parentDirectoryMatch = PARENT_DIRECTORY.exec(result), parts = splitPattern(result);
2918
+ if (null == parentDirectoryMatch ? void 0 : parentDirectoryMatch[0]) {
2919
+ let n = (parentDirectoryMatch[0].length + 1) / 3, i = 0, cwdParts = escapedCwd.split("/");
2920
+ for(; i < n && parts[i + n] === cwdParts[cwdParts.length + i - n];)result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".", i++;
2921
+ let potentialRoot = external_path_.posix.join(cwd, parentDirectoryMatch[0].slice(3 * i));
2922
+ !potentialRoot.startsWith(".") && props.root.length > potentialRoot.length && (props.root = potentialRoot, props.depthOffset = -n + i);
2923
+ }
2924
+ if (!isIgnore && props.depthOffset >= 0) {
2925
+ null != props.commonPath || (props.commonPath = parts);
2926
+ let newCommonPath = [], length = Math.min(props.commonPath.length, parts.length);
2927
+ for(let i = 0; i < length; i++){
2928
+ let part = parts[i];
2929
+ if ("**" === part && !parts[i + 1]) {
2930
+ newCommonPath.pop();
2931
+ break;
2932
+ }
2933
+ if (part !== props.commonPath[i] || function(pattern, options) {
2934
+ let scan = picomatch.scan(pattern);
2935
+ return scan.isGlob || scan.negated;
2936
+ }(part) || i === parts.length - 1) break;
2937
+ newCommonPath.push(part);
2938
+ }
2939
+ props.depthOffset = newCommonPath.length, props.commonPath = newCommonPath, props.root = newCommonPath.length > 0 ? external_path_.posix.join(cwd, ...newCommonPath) : cwd;
2940
+ }
2941
+ return result;
2942
+ }
2943
+ function formatPaths(paths, relative) {
2944
+ for(let i = paths.length - 1; i >= 0; i--){
2945
+ let path$1 = paths[i];
2946
+ paths[i] = relative(path$1);
2947
+ }
2948
+ return paths;
2949
+ }
2950
+ function getCrawler(patterns, inputOptions = {}) {
2951
+ var cwd;
2952
+ let options = process.env.TINYGLOBBY_DEBUG ? {
2953
+ ...inputOptions,
2954
+ debug: !0
2955
+ } : inputOptions, cwd1 = (cwd = options.cwd) ? cwd instanceof URL ? (0, external_url_.fileURLToPath)(cwd).replace(BACKSLASHES, "/") : external_path_.default.resolve(cwd).replace(BACKSLASHES, "/") : process.cwd().replace(BACKSLASHES, "/");
2956
+ if (options.debug && dist_log("globbing with:", {
2957
+ patterns,
2958
+ options,
2959
+ cwd: cwd1
2960
+ }), Array.isArray(patterns) && 0 === patterns.length) return [
2961
+ {
2962
+ sync: ()=>[],
2963
+ withPromise: async ()=>[]
2964
+ },
2965
+ !1
2966
+ ];
2967
+ let props = {
2968
+ root: cwd1,
2969
+ commonPath: null,
2970
+ depthOffset: 0
2971
+ }, processed = function({ patterns = [
2972
+ "**/*"
2973
+ ], ignore = [], expandDirectories = !0 }, cwd, props) {
2974
+ "string" == typeof patterns && (patterns = [
2975
+ patterns
2976
+ ]), "string" == typeof ignore && (ignore = [
2977
+ ignore
2978
+ ]);
2979
+ let matchPatterns = [], ignorePatterns = [];
2980
+ for (let pattern of ignore)pattern && ("!" !== pattern[0] || "(" === pattern[1]) && ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, !0));
2981
+ for (let pattern of patterns)pattern && ("!" !== pattern[0] || "(" === pattern[1] ? matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, !1)) : ("!" !== pattern[1] || "(" === pattern[2]) && ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, !0)));
2982
+ return {
2983
+ match: matchPatterns,
2984
+ ignore: ignorePatterns
2985
+ };
2986
+ }({
2987
+ ...options,
2988
+ patterns
2989
+ }, cwd1, props);
2990
+ options.debug && dist_log("internal processing patterns:", processed);
2991
+ let matchOptions = {
2992
+ dot: options.dot,
2993
+ nobrace: !1 === options.braceExpansion,
2994
+ nocase: !1 === options.caseSensitiveMatch,
2995
+ noextglob: !1 === options.extglob,
2996
+ noglobstar: !1 === options.globstar,
2997
+ posix: !0
2998
+ }, matcher = picomatch(processed.match, {
2999
+ ...matchOptions,
3000
+ ignore: processed.ignore
3001
+ }), ignore = picomatch(processed.ignore, matchOptions), partialMatcher = function(patterns, options = {}) {
3002
+ let patternsCount = patterns.length, patternsParts = Array(patternsCount), matchers = Array(patternsCount), globstarEnabled = !options.noglobstar;
3003
+ for(let i = 0; i < patternsCount; i++){
3004
+ let parts = splitPattern(patterns[i]);
3005
+ patternsParts[i] = parts;
3006
+ let partsCount = parts.length, partMatchers = Array(partsCount);
3007
+ for(let j = 0; j < partsCount; j++)partMatchers[j] = picomatch(parts[j], options);
3008
+ matchers[i] = partMatchers;
3009
+ }
3010
+ return (input)=>{
3011
+ let inputParts = input.split("/");
3012
+ if (".." === inputParts[0] && ONLY_PARENT_DIRECTORIES.test(input)) return !0;
3013
+ for(let i = 0; i < patterns.length; i++){
3014
+ let patternParts = patternsParts[i], matcher = matchers[i], inputPatternCount = inputParts.length, minParts = Math.min(inputPatternCount, patternParts.length), j = 0;
3015
+ for(; j < minParts;){
3016
+ let part = patternParts[j];
3017
+ if (part.includes("/")) return !0;
3018
+ if (!matcher[j](inputParts[j])) break;
3019
+ if (globstarEnabled && "**" === part) return !0;
3020
+ j++;
3021
+ }
3022
+ if (j === inputPatternCount) return !0;
3023
+ }
3024
+ return !1;
3025
+ };
3026
+ }(processed.match, matchOptions), format = buildFormat(cwd1, props.root, options.absolute), formatExclude = options.absolute ? format : buildFormat(cwd1, props.root, !0), fdirOptions = {
3027
+ filters: [
3028
+ options.debug ? (p, isDirectory)=>{
3029
+ let path$1 = format(p, isDirectory), matches = matcher(path$1);
3030
+ return matches && dist_log(`matched ${path$1}`), matches;
3031
+ } : (p, isDirectory)=>matcher(format(p, isDirectory))
3032
+ ],
3033
+ exclude: options.debug ? (_, p)=>{
3034
+ let relativePath = formatExclude(p, !0), skipped = "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
3035
+ return skipped ? dist_log(`skipped ${p}`) : dist_log(`crawling ${p}`), skipped;
3036
+ } : (_, p)=>{
3037
+ let relativePath = formatExclude(p, !0);
3038
+ return "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
3039
+ },
3040
+ fs: options.fs ? {
3041
+ readdir: options.fs.readdir || external_fs_.default.readdir,
3042
+ readdirSync: options.fs.readdirSync || external_fs_.default.readdirSync,
3043
+ realpath: options.fs.realpath || external_fs_.default.realpath,
3044
+ realpathSync: options.fs.realpathSync || external_fs_.default.realpathSync,
3045
+ stat: options.fs.stat || external_fs_.default.stat,
3046
+ statSync: options.fs.statSync || external_fs_.default.statSync
3047
+ } : void 0,
3048
+ pathSeparator: "/",
3049
+ relativePaths: !0,
3050
+ resolveSymlinks: !0,
3051
+ signal: options.signal
3052
+ };
3053
+ void 0 !== options.deep && (fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset)), options.absolute && (fdirOptions.relativePaths = !1, fdirOptions.resolvePaths = !0, fdirOptions.includeBasePath = !0), !1 === options.followSymbolicLinks && (fdirOptions.resolveSymlinks = !1, fdirOptions.excludeSymlinks = !0), options.onlyDirectories ? (fdirOptions.excludeFiles = !0, fdirOptions.includeDirs = !0) : !1 === options.onlyFiles && (fdirOptions.includeDirs = !0), props.root = props.root.replace(BACKSLASHES, "");
3054
+ let root = props.root;
3055
+ options.debug && dist_log("internal properties:", props);
3056
+ let relative = cwd1 !== root && !options.absolute && function(cwd, root) {
3057
+ if (root.startsWith(`${cwd}/`)) {
3058
+ let prefix = root.slice(cwd.length + 1);
3059
+ return (p)=>`${prefix}/${p}`;
3060
+ }
3061
+ return (p)=>{
3062
+ let result = external_path_.posix.relative(cwd, `${root}/${p}`);
3063
+ return p.endsWith("/") && "" !== result ? `${result}/` : result || ".";
3064
+ };
3065
+ }(cwd1, props.root);
3066
+ return [
3067
+ new Builder(fdirOptions).crawl(root),
3068
+ relative
3069
+ ];
3070
+ }
3071
+ async function dist_glob(patternsOrOptions, options) {
3072
+ if (patternsOrOptions && (null == options ? void 0 : options.patterns)) throw Error("Cannot pass patterns as both an argument and an option");
3073
+ let isModern = isReadonlyArray(patternsOrOptions) || "string" == typeof patternsOrOptions, opts = isModern ? options : patternsOrOptions, [crawler, relative] = getCrawler(isModern ? patternsOrOptions : patternsOrOptions.patterns, opts);
3074
+ return relative ? formatPaths(await crawler.withPromise(), relative) : crawler.withPromise();
3075
+ }
3076
+ function globSync(patternsOrOptions, options) {
3077
+ if (patternsOrOptions && (null == options ? void 0 : options.patterns)) throw Error("Cannot pass patterns as both an argument and an option");
3078
+ let isModern = isReadonlyArray(patternsOrOptions) || "string" == typeof patternsOrOptions, opts = isModern ? options : patternsOrOptions, [crawler, relative] = getCrawler(isModern ? patternsOrOptions : patternsOrOptions.patterns, opts);
3079
+ return relative ? formatPaths(crawler.sync(), relative) : crawler.sync();
3080
+ }
1221
3081
  var utils_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
1222
3082
  let getNodeEnv = ()=>process.env.NODE_ENV, setNodeEnv = (env)=>{
1223
3083
  process.env.NODE_ENV = env;
1224
3084
  }, setDevServer = (isDevServer)=>{
1225
3085
  process.env.DEV_SERVER = isDevServer ? 'true' : 'false';
1226
- }, isDev = ()=>'development' === getNodeEnv(), utils_isDevServer = ()=>'true' === process.env.DEV_SERVER, utils_isProd = ()=>'production' === getNodeEnv(), isWin = ()=>'win32' === process.platform, isString = (str)=>'string' == typeof str, isBoolean = (bool)=>'boolean' == typeof bool, isUndefined = (obj)=>void 0 === obj, isFunction = (func)=>'function' == typeof func, isObject = (obj)=>null !== obj && 'object' == typeof obj, isPlainObject = (obj)=>isObject(obj) && '[object Object]' === Object.prototype.toString.call(obj), isRegExp = (obj)=>'[object RegExp]' === Object.prototype.toString.call(obj), prettyTime = (seconds)=>{
3086
+ }, isDev = ()=>'development' === getNodeEnv(), utils_isDevServer = ()=>'true' === process.env.DEV_SERVER, utils_isProd = ()=>'production' === getNodeEnv(), utils_isWin = ()=>'win32' === process.platform, utils_isString = (str)=>'string' == typeof str, isBoolean = (bool)=>'boolean' == typeof bool, isUndefined = (obj)=>void 0 === obj, isFunction = (func)=>'function' == typeof func, isObject = (obj)=>null !== obj && 'object' == typeof obj, isPlainObject = (obj)=>isObject(obj) && '[object Object]' === Object.prototype.toString.call(obj), isRegExp = (obj)=>'[object RegExp]' === Object.prototype.toString.call(obj), prettyTime = (seconds)=>{
1227
3087
  let toFixed = (num, len)=>{
1228
3088
  let factor = 10 ** len;
1229
3089
  return Math.floor(num * factor) / factor;
@@ -1237,20 +3097,14 @@ let getNodeEnv = ()=>process.env.NODE_ENV, setNodeEnv = (env)=>{
1237
3097
  }
1238
3098
  let lastKey = pathArray.at(-1);
1239
3099
  return void 0 === current[lastKey] && (current[lastKey] = defaultValue), current[lastKey];
1240
- }, set = (target, pathArray, value)=>{
3100
+ }, utils_set = (target, pathArray, value)=>{
1241
3101
  let current = target;
1242
3102
  for(let i = 0; i < pathArray.length - 1; i++){
1243
3103
  let currKey = pathArray[i];
1244
3104
  current[currKey] && 'object' == typeof current[currKey] || (current[currKey] = 'string' == typeof pathArray[i + 1] ? {} : []), current = current[currKey];
1245
3105
  }
1246
3106
  current[pathArray.at(-1)] = value;
1247
- }, getPort = (startPort = 45678)=>new Promise((resolve)=>{
1248
- portfinder.getPort({
1249
- port: startPort
1250
- }, (_, port)=>{
1251
- resolve(port);
1252
- });
1253
- }), normalizePublicPath = (base)=>{
3107
+ }, normalizePublicPath = (base)=>{
1254
3108
  if (!base) return '/';
1255
3109
  let normalized = base;
1256
3110
  return normalized.startsWith('/') || (normalized = `/${normalized}`), normalized.endsWith('/') || (normalized = `${normalized}/`), normalized;
@@ -1550,7 +3404,7 @@ async function loadConfig({ cliOptions, command }) {
1550
3404
  if (void 0 === (configExport = await configExport(params))) throw Error('unpack config function must return a config object.');
1551
3405
  }
1552
3406
  let applyOption = (path, value)=>{
1553
- void 0 !== value && set(configExport, path, value);
3407
+ void 0 !== value && utils_set(configExport, path, value);
1554
3408
  };
1555
3409
  return applyOption([
1556
3410
  'server',
@@ -1606,14 +3460,7 @@ function isEmptyDir(path) {
1606
3460
  let findExists = (files)=>{
1607
3461
  for (let file of files)if (isFileSync(file)) return file;
1608
3462
  return !1;
1609
- };
1610
- async function pathExists(path) {
1611
- return node_fs.promises.access(path).then(()=>!0).catch(()=>!1);
1612
- }
1613
- async function isFileExists(file) {
1614
- return node_fs.promises.access(file, node_fs.constants.F_OK).then(()=>!0).catch(()=>!1);
1615
- }
1616
- let removeDir = (dir)=>{
3463
+ }, removeDir = (dir)=>{
1617
3464
  node_fs.rmSync(dir, {
1618
3465
  recursive: !0,
1619
3466
  force: !0
@@ -1645,7 +3492,225 @@ let removeDir = (dir)=>{
1645
3492
  '.less',
1646
3493
  '.scss',
1647
3494
  '.sass'
1648
- ], BROWSER_LOGS_ENDPOINT = '/__browser_logs__', SOURCE_REGEX = /\.(js|jsx|mjs|cjs|ts|tsx|mts|cts|vue|svelte)$/, gzip = promisify(node_zlib.gzip), numberFormatter = new Intl.NumberFormat('en', {
3495
+ ];
3496
+ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
3497
+ for(let i = 0; i < chars.length; i++){
3498
+ let c = chars.charCodeAt(i);
3499
+ intToChar[i] = c, charToInt[c] = i;
3500
+ }
3501
+ function decodeInteger(reader, relative) {
3502
+ let value = 0, shift = 0, integer = 0;
3503
+ do value |= (31 & (integer = charToInt[reader.next()])) << shift, shift += 5;
3504
+ while (32 & integer);
3505
+ let shouldNegate = 1 & value;
3506
+ return value >>>= 1, shouldNegate && (value = -2147483648 | -value), relative + value;
3507
+ }
3508
+ function encodeInteger(builder, num, relative) {
3509
+ let delta = num - relative;
3510
+ delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
3511
+ do {
3512
+ let clamped = 31 & delta;
3513
+ (delta >>>= 5) > 0 && (clamped |= 32), builder.write(intToChar[clamped]);
3514
+ }while (delta > 0);
3515
+ return num;
3516
+ }
3517
+ function hasMoreVlq(reader, max) {
3518
+ return !(reader.pos >= max) && 44 !== reader.peek();
3519
+ }
3520
+ var td = "u" > typeof TextDecoder ? new TextDecoder() : "u" > typeof Buffer ? {
3521
+ decode: (buf)=>Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString()
3522
+ } : {
3523
+ decode (buf) {
3524
+ let out = "";
3525
+ for(let i = 0; i < buf.length; i++)out += String.fromCharCode(buf[i]);
3526
+ return out;
3527
+ }
3528
+ }, StringWriter = class {
3529
+ constructor(){
3530
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(16384);
3531
+ }
3532
+ write(v) {
3533
+ let { buffer } = this;
3534
+ buffer[this.pos++] = v, 16384 === this.pos && (this.out += td.decode(buffer), this.pos = 0);
3535
+ }
3536
+ flush() {
3537
+ let { buffer, out, pos } = this;
3538
+ return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
3539
+ }
3540
+ }, StringReader = class {
3541
+ constructor(buffer){
3542
+ this.pos = 0, this.buffer = buffer;
3543
+ }
3544
+ next() {
3545
+ return this.buffer.charCodeAt(this.pos++);
3546
+ }
3547
+ peek() {
3548
+ return this.buffer.charCodeAt(this.pos);
3549
+ }
3550
+ indexOf(char) {
3551
+ let { buffer, pos } = this, idx = buffer.indexOf(char, pos);
3552
+ return -1 === idx ? buffer.length : idx;
3553
+ }
3554
+ };
3555
+ function sortComparator(a, b) {
3556
+ return a[0] - b[0];
3557
+ }
3558
+ let schemeRegex = /^[\w+.-]+:\/\//, urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/, fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
3559
+ function isAbsolutePath(input) {
3560
+ return input.startsWith('/');
3561
+ }
3562
+ function isRelative(input) {
3563
+ return /^[.?#]/.test(input);
3564
+ }
3565
+ function parseAbsoluteUrl(input) {
3566
+ let match = urlRegex.exec(input);
3567
+ return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
3568
+ }
3569
+ function makeUrl(scheme, user, host, port, path, query, hash) {
3570
+ return {
3571
+ scheme,
3572
+ user,
3573
+ host,
3574
+ port,
3575
+ path,
3576
+ query,
3577
+ hash,
3578
+ type: 7
3579
+ };
3580
+ }
3581
+ function parseUrl(input) {
3582
+ if (input.startsWith('//')) {
3583
+ let url = parseAbsoluteUrl('http:' + input);
3584
+ return url.scheme = '', url.type = 6, url;
3585
+ }
3586
+ if (isAbsolutePath(input)) {
3587
+ let url = parseAbsoluteUrl('http://foo.com' + input);
3588
+ return url.scheme = '', url.host = '', url.type = 5, url;
3589
+ }
3590
+ if (input.startsWith('file:')) {
3591
+ let match, path;
3592
+ return path = (match = fileRegex.exec(input))[2], makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
3593
+ }
3594
+ if (schemeRegex.test(input)) return parseAbsoluteUrl(input);
3595
+ let url = parseAbsoluteUrl('http://foo.com/' + input);
3596
+ return url.scheme = '', url.host = '', url.type = input ? input.startsWith('?') ? 3 : input.startsWith('#') ? 2 : 4 : 1, url;
3597
+ }
3598
+ function resolve_uri_normalizePath(url, type) {
3599
+ let rel = type <= 4, pieces = url.path.split('/'), pointer = 1, positive = 0, addTrailingSlash = !1;
3600
+ for(let i = 1; i < pieces.length; i++){
3601
+ let piece = pieces[i];
3602
+ if (!piece) {
3603
+ addTrailingSlash = !0;
3604
+ continue;
3605
+ }
3606
+ if (addTrailingSlash = !1, '.' !== piece) {
3607
+ if ('..' === piece) {
3608
+ positive ? (addTrailingSlash = !0, positive--, pointer--) : rel && (pieces[pointer++] = piece);
3609
+ continue;
3610
+ }
3611
+ pieces[pointer++] = piece, positive++;
3612
+ }
3613
+ }
3614
+ let path = '';
3615
+ for(let i = 1; i < pointer; i++)path += '/' + pieces[i];
3616
+ path && (!addTrailingSlash || path.endsWith('/..')) || (path += '/'), url.path = path;
3617
+ }
3618
+ function nextUnsortedSegmentLine(mappings, start) {
3619
+ for(let i = start; i < mappings.length; i++)if (!function(line) {
3620
+ for(let j = 1; j < line.length; j++)if (line[j][0] < line[j - 1][0]) return !1;
3621
+ return !0;
3622
+ }(mappings[i])) return i;
3623
+ return mappings.length;
3624
+ }
3625
+ function trace_mapping_sortComparator(a, b) {
3626
+ return a[0] - b[0];
3627
+ }
3628
+ var found = !1, TraceMap = class {
3629
+ constructor(map, mapUrl){
3630
+ var map1;
3631
+ let from, prefix, isString = "string" == typeof map;
3632
+ if (!isString && map._decodedMemo) return map;
3633
+ let parsed = "string" == typeof (map1 = map) ? JSON.parse(map1) : map1, { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
3634
+ this.version = version, this.file = file, this.names = names || [], this.sourceRoot = sourceRoot, this.sources = sources, this.sourcesContent = sourcesContent, this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
3635
+ let resolve = (from = function(path) {
3636
+ if (!path) return "";
3637
+ let index = path.lastIndexOf("/");
3638
+ return path.slice(0, index + 1);
3639
+ }(mapUrl), prefix = sourceRoot ? sourceRoot + "/" : "", (source)=>(function(input, base) {
3640
+ if (!input && !base) return '';
3641
+ let url = parseUrl(input), inputType = url.type;
3642
+ if (base && 7 !== inputType) {
3643
+ let baseUrl = parseUrl(base), baseType = baseUrl.type;
3644
+ switch(inputType){
3645
+ case 1:
3646
+ url.hash = baseUrl.hash;
3647
+ case 2:
3648
+ url.query = baseUrl.query;
3649
+ case 3:
3650
+ case 4:
3651
+ resolve_uri_normalizePath(baseUrl, baseUrl.type), '/' === url.path ? url.path = baseUrl.path : url.path = function(path) {
3652
+ if (path.endsWith('/..')) return path;
3653
+ let index = path.lastIndexOf('/');
3654
+ return path.slice(0, index + 1);
3655
+ }(baseUrl.path) + url.path;
3656
+ case 5:
3657
+ url.user = baseUrl.user, url.host = baseUrl.host, url.port = baseUrl.port;
3658
+ case 6:
3659
+ url.scheme = baseUrl.scheme;
3660
+ }
3661
+ baseType > inputType && (inputType = baseType);
3662
+ }
3663
+ resolve_uri_normalizePath(url, inputType);
3664
+ let queryHash = url.query + url.hash;
3665
+ switch(inputType){
3666
+ case 2:
3667
+ case 3:
3668
+ return queryHash;
3669
+ case 4:
3670
+ {
3671
+ let path = url.path.slice(1);
3672
+ if (!path) return queryHash || '.';
3673
+ if (isRelative(base || input) && !isRelative(path)) return './' + path + queryHash;
3674
+ return path + queryHash;
3675
+ }
3676
+ case 5:
3677
+ return url.path + queryHash;
3678
+ default:
3679
+ return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
3680
+ }
3681
+ })(prefix + (source || ""), from));
3682
+ this.resolvedSources = sources.map(resolve);
3683
+ let { mappings } = parsed;
3684
+ if ("string" == typeof mappings) this._encoded = mappings, this._decoded = void 0;
3685
+ else if (Array.isArray(mappings)) this._encoded = void 0, this._decoded = function(mappings, owned) {
3686
+ let unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
3687
+ if (unsortedIndex === mappings.length) return mappings;
3688
+ owned || (mappings = mappings.slice());
3689
+ for(let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)){
3690
+ var line;
3691
+ mappings[i] = (line = mappings[i], owned || (line = line.slice()), line.sort(trace_mapping_sortComparator));
3692
+ }
3693
+ return mappings;
3694
+ }(mappings, isString);
3695
+ else if (parsed.sections) throw Error("TraceMap passed sectioned source map, please use FlattenMap export instead");
3696
+ else throw Error(`invalid source map: ${JSON.stringify(parsed)}`);
3697
+ this._decodedMemo = {
3698
+ lastKey: -1,
3699
+ lastNeedle: -1,
3700
+ lastIndex: -1
3701
+ }, this._bySources = void 0, this._bySourceMemos = void 0;
3702
+ }
3703
+ };
3704
+ function OMapping(source, line, column, name) {
3705
+ return {
3706
+ source,
3707
+ line,
3708
+ column,
3709
+ name
3710
+ };
3711
+ }
3712
+ var UNKNOWN_FUNCTION = '<unknown>', chromeRe = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, chromeEvalRe = /\((\S*)(?::(\d+))(?::(\d+))\)/, winjsRe = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i, geckoRe = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i, geckoEvalRe = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, javaScriptCoreRe = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i, nodeRe = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;
3713
+ let BROWSER_LOGS_ENDPOINT = '/__browser_logs__', SOURCE_REGEX = /\.(js|jsx|mjs|cjs|ts|tsx|mts|cts|vue|svelte)$/, gzip = promisify(node_zlib.gzip), numberFormatter = new Intl.NumberFormat('en', {
1649
3714
  maximumFractionDigits: 2,
1650
3715
  minimumFractionDigits: 2
1651
3716
  }), displaySize = (bytes)=>`${numberFormatter.format(bytes / 1000)} kB`;
@@ -1717,56 +3782,674 @@ let COMPRESSIBLE_REGEX = /\.(?:js|css|html|json|svg|txt|xml|xhtml|wasm|manifest|
1717
3782
  let publicBase = `/${rel}`.replace(/\/{2,}/g, '/').replace(/\/$/, ''), rest = trimmed.slice(key.length);
1718
3783
  return `${publicBase}${rest}`.replace(/\/{2,}/g, '/');
1719
3784
  }
1720
- let normalized = trimmed.replace(/\\/g, '/'), firstChar = normalized[0];
1721
- if ('@' === firstChar || '~' === firstChar || '#' === firstChar) {
1722
- let slashIndex = normalized.indexOf('/'), aliasKey = normalized.slice(0, slashIndex);
1723
- aliasEntries.map(([rawKey])=>rawKey.endsWith('/') ? rawKey.slice(0, -1) : rawKey).filter(Boolean).includes(aliasKey) || warnedMissingAliasKeys.has(aliasKey) || (warnedMissingAliasKeys.add(aliasKey), logger_logger.warn(`Unrecognized alias "${aliasKey}" in glob pattern: "${trimmed}", please ensure it is defined in "resolve.alias".`));
3785
+ let normalized = trimmed.replace(/\\/g, '/'), firstChar = normalized[0];
3786
+ if ('@' === firstChar || '~' === firstChar || '#' === firstChar) {
3787
+ let slashIndex = normalized.indexOf('/'), aliasKey = normalized.slice(0, slashIndex);
3788
+ aliasEntries.map(([rawKey])=>rawKey.endsWith('/') ? rawKey.slice(0, -1) : rawKey).filter(Boolean).includes(aliasKey) || warnedMissingAliasKeys.has(aliasKey) || (warnedMissingAliasKeys.add(aliasKey), logger_logger.warn(`Unrecognized alias "${aliasKey}" in glob pattern: "${trimmed}", please ensure it is defined in "resolve.alias".`));
3789
+ }
3790
+ return trimmed;
3791
+ }, SPECIAL_NO_ENTRY_DEPS = [
3792
+ '@iconify-icons/material-symbols'
3793
+ ], FRAMEWORKS = [
3794
+ 'react',
3795
+ 'react-dom',
3796
+ 'react-router-dom',
3797
+ 'vue',
3798
+ 'vue-router'
3799
+ ], getExternalLibraryName = (pkgName)=>{
3800
+ let externalAlias = {
3801
+ 'react-dom': 'ReactDOM',
3802
+ 'react-router-dom': 'ReactRouterDOM'
3803
+ };
3804
+ return externalAlias[pkgName] ? externalAlias[pkgName] : pkgName.replace(/^@/, '').split(/[/\-.]/).filter(Boolean).map((part)=>part.charAt(0).toUpperCase() + part.slice(1)).join('');
3805
+ }, getExternalValue = (pkgName)=>`window ${getExternalLibraryName(pkgName)}`, MODULE_PATH_REGEX = /.*[\\/]node_modules[\\/](?!\.pnpm[\\/])(?:(@[^\\/]+)[\\/])?([^\\/]+)/, normalizeSvg = (content)=>content.replace(/<\?xml[\s\S]*?\?>/gi, '').replace(/<!DOCTYPE[\s\S]*?>/gi, '').replace(/<!--[\s\S]*?-->/g, '').trim(), extractSvgContent = (content)=>{
3806
+ let match = content.match(/<svg\b([^>]*)>/i), viewBoxMatch = match?.[1]?.match(/viewBox\s*=\s*["']([^"']+)["']/i);
3807
+ return {
3808
+ inner: content.replace(/^[\s\S]*?<svg\b[^>]*>/i, '').replace(/<\/svg>[\s\S]*$/i, '').trim(),
3809
+ viewBox: viewBoxMatch?.[1]
3810
+ };
3811
+ }, readSvgFiles = (dir, collected = [])=>{
3812
+ if (!node_fs.existsSync(dir)) return collected;
3813
+ for (let entry of node_fs.readdirSync(dir, {
3814
+ withFileTypes: !0
3815
+ })){
3816
+ let fullPath = node_path.join(dir, entry.name);
3817
+ entry.isDirectory() ? readSvgFiles(fullPath, collected) : entry.isFile() && entry.name.toLowerCase().endsWith('.svg') && collected.push(fullPath);
3818
+ }
3819
+ return collected;
3820
+ }, toSymbolId = (filePath, iconDir, symbolId)=>{
3821
+ let relative = node_path.relative(iconDir, filePath), parsed = node_path.parse(relative), dir = parsed.dir.split(node_path.sep).filter(Boolean).join('-'), name = parsed.name;
3822
+ if ('function' == typeof symbolId) return symbolId(name, filePath);
3823
+ let id = (symbolId || 'icon-[dir]-[name]').replace(/\[name\]/g, name).replace(/\[dir\]/g, dir);
3824
+ return id.replace(/--+/g, '-').replace(/^-+|-+$/g, '');
3825
+ }, BROWSERSLIST_CONFIG_FILES = [
3826
+ '.browserslistrc',
3827
+ '.browserslistrc.json',
3828
+ '.browserslistrc.yaml',
3829
+ '.browserslistrc.yml',
3830
+ 'browserslist',
3831
+ 'browserslist.config.js',
3832
+ 'browserslist.config.cjs',
3833
+ 'browserslist.config.mjs'
3834
+ ];
3835
+ class BitSet {
3836
+ constructor(arg){
3837
+ this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
3838
+ }
3839
+ add(n) {
3840
+ this.bits[n >> 5] |= 1 << (31 & n);
3841
+ }
3842
+ has(n) {
3843
+ return !!(this.bits[n >> 5] & 1 << (31 & n));
3844
+ }
3845
+ }
3846
+ class Chunk {
3847
+ constructor(start, end, content){
3848
+ this.start = start, this.end = end, this.original = content, this.intro = '', this.outro = '', this.content = content, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
3849
+ }
3850
+ appendLeft(content) {
3851
+ this.outro += content;
3852
+ }
3853
+ appendRight(content) {
3854
+ this.intro = this.intro + content;
3855
+ }
3856
+ clone() {
3857
+ let chunk = new Chunk(this.start, this.end, this.original);
3858
+ return chunk.intro = this.intro, chunk.outro = this.outro, chunk.content = this.content, chunk.storeName = this.storeName, chunk.edited = this.edited, chunk;
3859
+ }
3860
+ contains(index) {
3861
+ return this.start < index && index < this.end;
3862
+ }
3863
+ eachNext(fn) {
3864
+ let chunk = this;
3865
+ for(; chunk;)fn(chunk), chunk = chunk.next;
3866
+ }
3867
+ eachPrevious(fn) {
3868
+ let chunk = this;
3869
+ for(; chunk;)fn(chunk), chunk = chunk.previous;
3870
+ }
3871
+ edit(content, storeName, contentOnly) {
3872
+ return this.content = content, contentOnly || (this.intro = '', this.outro = ''), this.storeName = storeName, this.edited = !0, this;
3873
+ }
3874
+ prependLeft(content) {
3875
+ this.outro = content + this.outro;
3876
+ }
3877
+ prependRight(content) {
3878
+ this.intro = content + this.intro;
3879
+ }
3880
+ reset() {
3881
+ this.intro = '', this.outro = '', this.edited && (this.content = this.original, this.storeName = !1, this.edited = !1);
3882
+ }
3883
+ split(index) {
3884
+ let sliceIndex = index - this.start, originalBefore = this.original.slice(0, sliceIndex), originalAfter = this.original.slice(sliceIndex);
3885
+ this.original = originalBefore;
3886
+ let newChunk = new Chunk(index, this.end, originalAfter);
3887
+ return newChunk.outro = this.outro, this.outro = '', this.end = index, this.edited ? (newChunk.edit('', !1), this.content = '') : this.content = originalBefore, newChunk.next = this.next, newChunk.next && (newChunk.next.previous = newChunk), newChunk.previous = this, this.next = newChunk, newChunk;
3888
+ }
3889
+ toString() {
3890
+ return this.intro + this.content + this.outro;
3891
+ }
3892
+ trimEnd(rx) {
3893
+ if (this.outro = this.outro.replace(rx, ''), this.outro.length) return !0;
3894
+ let trimmed = this.content.replace(rx, '');
3895
+ return trimmed.length ? (trimmed !== this.content && (this.split(this.start + trimmed.length).edit('', void 0, !0), this.edited && this.edit(trimmed, this.storeName, !0)), !0) : (this.edit('', void 0, !0), this.intro = this.intro.replace(rx, ''), !!this.intro.length || void 0);
3896
+ }
3897
+ trimStart(rx) {
3898
+ if (this.intro = this.intro.replace(rx, ''), this.intro.length) return !0;
3899
+ let trimmed = this.content.replace(rx, '');
3900
+ if (trimmed.length) {
3901
+ if (trimmed !== this.content) {
3902
+ let newChunk = this.split(this.end - trimmed.length);
3903
+ this.edited && newChunk.edit(trimmed, this.storeName, !0), this.edit('', void 0, !0);
3904
+ }
3905
+ return !0;
3906
+ }
3907
+ if (this.edit('', void 0, !0), this.outro = this.outro.replace(rx, ''), this.outro.length) return !0;
3908
+ }
3909
+ }
3910
+ let btoa = "u" > typeof globalThis && 'function' == typeof globalThis.btoa ? (str)=>globalThis.btoa(unescape(encodeURIComponent(str))) : 'function' == typeof Buffer ? (str)=>Buffer.from(str, 'utf-8').toString('base64') : ()=>{
3911
+ throw Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
3912
+ };
3913
+ class SourceMap {
3914
+ constructor(properties){
3915
+ this.version = 3, this.file = properties.file, this.sources = properties.sources, this.sourcesContent = properties.sourcesContent, this.names = properties.names, this.mappings = function(decoded) {
3916
+ let writer = new StringWriter(), sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;
3917
+ for(let i = 0; i < decoded.length; i++){
3918
+ let line = decoded[i];
3919
+ if (i > 0 && writer.write(59), 0 === line.length) continue;
3920
+ let genColumn = 0;
3921
+ for(let j = 0; j < line.length; j++){
3922
+ let segment = line[j];
3923
+ j > 0 && writer.write(44), genColumn = encodeInteger(writer, segment[0], genColumn), 1 !== segment.length && (sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex), sourceLine = encodeInteger(writer, segment[2], sourceLine), sourceColumn = encodeInteger(writer, segment[3], sourceColumn), 4 !== segment.length && (namesIndex = encodeInteger(writer, segment[4], namesIndex)));
3924
+ }
3925
+ }
3926
+ return writer.flush();
3927
+ }(properties.mappings), void 0 !== properties.x_google_ignoreList && (this.x_google_ignoreList = properties.x_google_ignoreList), void 0 !== properties.debugId && (this.debugId = properties.debugId);
3928
+ }
3929
+ toString() {
3930
+ return JSON.stringify(this);
3931
+ }
3932
+ toUrl() {
3933
+ return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());
3934
+ }
3935
+ }
3936
+ let magic_string_es_toString = Object.prototype.toString;
3937
+ function getLocator(source) {
3938
+ let originalLines = source.split('\n'), lineOffsets = [];
3939
+ for(let i = 0, pos = 0; i < originalLines.length; i++)lineOffsets.push(pos), pos += originalLines[i].length + 1;
3940
+ return function(index) {
3941
+ let i = 0, j = lineOffsets.length;
3942
+ for(; i < j;){
3943
+ let m = i + j >> 1;
3944
+ index < lineOffsets[m] ? j = m : i = m + 1;
3945
+ }
3946
+ let line = i - 1, column = index - lineOffsets[line];
3947
+ return {
3948
+ line,
3949
+ column
3950
+ };
3951
+ };
3952
+ }
3953
+ let wordRegex = /\w/;
3954
+ class Mappings {
3955
+ constructor(hires){
3956
+ this.hires = hires, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
3957
+ }
3958
+ addEdit(sourceIndex, content, loc, nameIndex) {
3959
+ if (content.length) {
3960
+ let contentLengthMinusOne = content.length - 1, contentLineEnd = content.indexOf('\n', 0), previousContentLineEnd = -1;
3961
+ for(; contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd;){
3962
+ let segment = [
3963
+ this.generatedCodeColumn,
3964
+ sourceIndex,
3965
+ loc.line,
3966
+ loc.column
3967
+ ];
3968
+ nameIndex >= 0 && segment.push(nameIndex), this.rawSegments.push(segment), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, previousContentLineEnd = contentLineEnd, contentLineEnd = content.indexOf('\n', contentLineEnd + 1);
3969
+ }
3970
+ let segment = [
3971
+ this.generatedCodeColumn,
3972
+ sourceIndex,
3973
+ loc.line,
3974
+ loc.column
3975
+ ];
3976
+ nameIndex >= 0 && segment.push(nameIndex), this.rawSegments.push(segment), this.advance(content.slice(previousContentLineEnd + 1));
3977
+ } else this.pending && (this.rawSegments.push(this.pending), this.advance(content));
3978
+ this.pending = null;
3979
+ }
3980
+ addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
3981
+ let originalCharIndex = chunk.start, first = !0, charInHiresBoundary = !1;
3982
+ for(; originalCharIndex < chunk.end;){
3983
+ if ('\n' === original[originalCharIndex]) loc.line += 1, loc.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, first = !0, charInHiresBoundary = !1;
3984
+ else {
3985
+ if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
3986
+ let segment = [
3987
+ this.generatedCodeColumn,
3988
+ sourceIndex,
3989
+ loc.line,
3990
+ loc.column
3991
+ ];
3992
+ 'boundary' === this.hires ? wordRegex.test(original[originalCharIndex]) ? charInHiresBoundary || (this.rawSegments.push(segment), charInHiresBoundary = !0) : (this.rawSegments.push(segment), charInHiresBoundary = !1) : this.rawSegments.push(segment);
3993
+ }
3994
+ loc.column += 1, this.generatedCodeColumn += 1, first = !1;
3995
+ }
3996
+ originalCharIndex += 1;
3997
+ }
3998
+ this.pending = null;
3999
+ }
4000
+ advance(str) {
4001
+ if (!str) return;
4002
+ let lines = str.split('\n');
4003
+ if (lines.length > 1) {
4004
+ for(let i = 0; i < lines.length - 1; i++)this.generatedCodeLine++, this.raw[this.generatedCodeLine] = this.rawSegments = [];
4005
+ this.generatedCodeColumn = 0;
4006
+ }
4007
+ this.generatedCodeColumn += lines[lines.length - 1].length;
4008
+ }
4009
+ }
4010
+ let warned = {
4011
+ insertLeft: !1,
4012
+ insertRight: !1,
4013
+ storeName: !1
4014
+ };
4015
+ class MagicString {
4016
+ constructor(string, options = {}){
4017
+ let chunk = new Chunk(0, string.length, string);
4018
+ Object.defineProperties(this, {
4019
+ original: {
4020
+ writable: !0,
4021
+ value: string
4022
+ },
4023
+ outro: {
4024
+ writable: !0,
4025
+ value: ''
4026
+ },
4027
+ intro: {
4028
+ writable: !0,
4029
+ value: ''
4030
+ },
4031
+ firstChunk: {
4032
+ writable: !0,
4033
+ value: chunk
4034
+ },
4035
+ lastChunk: {
4036
+ writable: !0,
4037
+ value: chunk
4038
+ },
4039
+ lastSearchedChunk: {
4040
+ writable: !0,
4041
+ value: chunk
4042
+ },
4043
+ byStart: {
4044
+ writable: !0,
4045
+ value: {}
4046
+ },
4047
+ byEnd: {
4048
+ writable: !0,
4049
+ value: {}
4050
+ },
4051
+ filename: {
4052
+ writable: !0,
4053
+ value: options.filename
4054
+ },
4055
+ indentExclusionRanges: {
4056
+ writable: !0,
4057
+ value: options.indentExclusionRanges
4058
+ },
4059
+ sourcemapLocations: {
4060
+ writable: !0,
4061
+ value: new BitSet()
4062
+ },
4063
+ storedNames: {
4064
+ writable: !0,
4065
+ value: {}
4066
+ },
4067
+ indentStr: {
4068
+ writable: !0,
4069
+ value: void 0
4070
+ },
4071
+ ignoreList: {
4072
+ writable: !0,
4073
+ value: options.ignoreList
4074
+ },
4075
+ offset: {
4076
+ writable: !0,
4077
+ value: options.offset || 0
4078
+ }
4079
+ }), this.byStart[0] = chunk, this.byEnd[string.length] = chunk;
4080
+ }
4081
+ addSourcemapLocation(char) {
4082
+ this.sourcemapLocations.add(char);
4083
+ }
4084
+ append(content) {
4085
+ if ('string' != typeof content) throw TypeError('outro content must be a string');
4086
+ return this.outro += content, this;
4087
+ }
4088
+ appendLeft(index, content) {
4089
+ if (index += this.offset, 'string' != typeof content) throw TypeError('inserted content must be a string');
4090
+ this._split(index);
4091
+ let chunk = this.byEnd[index];
4092
+ return chunk ? chunk.appendLeft(content) : this.intro += content, this;
4093
+ }
4094
+ appendRight(index, content) {
4095
+ if (index += this.offset, 'string' != typeof content) throw TypeError('inserted content must be a string');
4096
+ this._split(index);
4097
+ let chunk = this.byStart[index];
4098
+ return chunk ? chunk.appendRight(content) : this.outro += content, this;
4099
+ }
4100
+ clone() {
4101
+ let cloned = new MagicString(this.original, {
4102
+ filename: this.filename,
4103
+ offset: this.offset
4104
+ }), originalChunk = this.firstChunk, clonedChunk = cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone();
4105
+ for(; originalChunk;){
4106
+ cloned.byStart[clonedChunk.start] = clonedChunk, cloned.byEnd[clonedChunk.end] = clonedChunk;
4107
+ let nextOriginalChunk = originalChunk.next, nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
4108
+ nextClonedChunk && (clonedChunk.next = nextClonedChunk, nextClonedChunk.previous = clonedChunk, clonedChunk = nextClonedChunk), originalChunk = nextOriginalChunk;
4109
+ }
4110
+ return cloned.lastChunk = clonedChunk, this.indentExclusionRanges && (cloned.indentExclusionRanges = this.indentExclusionRanges.slice()), cloned.sourcemapLocations = new BitSet(this.sourcemapLocations), cloned.intro = this.intro, cloned.outro = this.outro, cloned;
4111
+ }
4112
+ generateDecodedMap(options) {
4113
+ options = options || {};
4114
+ let names = Object.keys(this.storedNames), mappings = new Mappings(options.hires), locate = getLocator(this.original);
4115
+ return this.intro && mappings.advance(this.intro), this.firstChunk.eachNext((chunk)=>{
4116
+ let loc = locate(chunk.start);
4117
+ chunk.intro.length && mappings.advance(chunk.intro), chunk.edited ? mappings.addEdit(0, chunk.content, loc, chunk.storeName ? names.indexOf(chunk.original) : -1) : mappings.addUneditedChunk(0, chunk, this.original, loc, this.sourcemapLocations), chunk.outro.length && mappings.advance(chunk.outro);
4118
+ }), this.outro && mappings.advance(this.outro), {
4119
+ file: options.file ? options.file.split(/[/\\]/).pop() : void 0,
4120
+ sources: [
4121
+ options.source ? function(from, to) {
4122
+ let fromParts = from.split(/[/\\]/), toParts = to.split(/[/\\]/);
4123
+ for(fromParts.pop(); fromParts[0] === toParts[0];)fromParts.shift(), toParts.shift();
4124
+ if (fromParts.length) {
4125
+ let i = fromParts.length;
4126
+ for(; i--;)fromParts[i] = '..';
4127
+ }
4128
+ return fromParts.concat(toParts).join('/');
4129
+ }(options.file || '', options.source) : options.file || ''
4130
+ ],
4131
+ sourcesContent: options.includeContent ? [
4132
+ this.original
4133
+ ] : void 0,
4134
+ names,
4135
+ mappings: mappings.raw,
4136
+ x_google_ignoreList: this.ignoreList ? [
4137
+ 0
4138
+ ] : void 0
4139
+ };
4140
+ }
4141
+ generateMap(options) {
4142
+ return new SourceMap(this.generateDecodedMap(options));
4143
+ }
4144
+ _ensureindentStr() {
4145
+ let lines, tabbed, spaced;
4146
+ void 0 === this.indentStr && (this.indentStr = (tabbed = (lines = this.original.split('\n')).filter((line)=>/^\t+/.test(line)), spaced = lines.filter((line)=>/^ {2,}/.test(line)), 0 === tabbed.length && 0 === spaced.length ? null : tabbed.length >= spaced.length ? '\t' : Array(spaced.reduce((previous, current)=>Math.min(/^ +/.exec(current)[0].length, previous), 1 / 0) + 1).join(' ')));
4147
+ }
4148
+ _getRawIndentString() {
4149
+ return this._ensureindentStr(), this.indentStr;
4150
+ }
4151
+ getIndentString() {
4152
+ return this._ensureindentStr(), null === this.indentStr ? '\t' : this.indentStr;
4153
+ }
4154
+ indent(indentStr, options) {
4155
+ var thing;
4156
+ let pattern = /^[^\r\n]/gm;
4157
+ if (thing = indentStr, '[object Object]' === magic_string_es_toString.call(thing) && (options = indentStr, indentStr = void 0), void 0 === indentStr && (this._ensureindentStr(), indentStr = this.indentStr || '\t'), '' === indentStr) return this;
4158
+ let isExcluded = {};
4159
+ (options = options || {}).exclude && ('number' == typeof options.exclude[0] ? [
4160
+ options.exclude
4161
+ ] : options.exclude).forEach((exclusion)=>{
4162
+ for(let i = exclusion[0]; i < exclusion[1]; i += 1)isExcluded[i] = !0;
4163
+ });
4164
+ let shouldIndentNextCharacter = !1 !== options.indentStart, replacer = (match)=>shouldIndentNextCharacter ? `${indentStr}${match}` : (shouldIndentNextCharacter = !0, match);
4165
+ this.intro = this.intro.replace(pattern, replacer);
4166
+ let charIndex = 0, chunk = this.firstChunk;
4167
+ for(; chunk;){
4168
+ let end = chunk.end;
4169
+ if (chunk.edited) !isExcluded[charIndex] && (chunk.content = chunk.content.replace(pattern, replacer), chunk.content.length && (shouldIndentNextCharacter = '\n' === chunk.content[chunk.content.length - 1]));
4170
+ else for(charIndex = chunk.start; charIndex < end;){
4171
+ if (!isExcluded[charIndex]) {
4172
+ let char = this.original[charIndex];
4173
+ '\n' === char ? shouldIndentNextCharacter = !0 : '\r' !== char && shouldIndentNextCharacter && (shouldIndentNextCharacter = !1, charIndex === chunk.start ? chunk.prependRight(indentStr) : (this._splitChunk(chunk, charIndex), (chunk = chunk.next).prependRight(indentStr)));
4174
+ }
4175
+ charIndex += 1;
4176
+ }
4177
+ charIndex = chunk.end, chunk = chunk.next;
4178
+ }
4179
+ return this.outro = this.outro.replace(pattern, replacer), this;
4180
+ }
4181
+ insert() {
4182
+ throw Error('magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)');
4183
+ }
4184
+ insertLeft(index, content) {
4185
+ return warned.insertLeft || (console.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'), warned.insertLeft = !0), this.appendLeft(index, content);
4186
+ }
4187
+ insertRight(index, content) {
4188
+ return warned.insertRight || (console.warn('magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'), warned.insertRight = !0), this.prependRight(index, content);
4189
+ }
4190
+ move(start, end, index) {
4191
+ if (start += this.offset, end += this.offset, (index += this.offset) >= start && index <= end) throw Error('Cannot move a selection inside itself');
4192
+ this._split(start), this._split(end), this._split(index);
4193
+ let first = this.byStart[start], last = this.byEnd[end], oldLeft = first.previous, oldRight = last.next, newRight = this.byStart[index];
4194
+ if (!newRight && last === this.lastChunk) return this;
4195
+ let newLeft = newRight ? newRight.previous : this.lastChunk;
4196
+ return oldLeft && (oldLeft.next = oldRight), oldRight && (oldRight.previous = oldLeft), newLeft && (newLeft.next = first), newRight && (newRight.previous = last), first.previous || (this.firstChunk = last.next), last.next || (this.lastChunk = first.previous, this.lastChunk.next = null), first.previous = newLeft, last.next = newRight || null, newLeft || (this.firstChunk = first), newRight || (this.lastChunk = last), this;
4197
+ }
4198
+ overwrite(start, end, content, options) {
4199
+ return options = options || {}, this.update(start, end, content, {
4200
+ ...options,
4201
+ overwrite: !options.contentOnly
4202
+ });
4203
+ }
4204
+ update(start, end, content, options) {
4205
+ if (start += this.offset, end += this.offset, 'string' != typeof content) throw TypeError('replacement content must be a string');
4206
+ if (0 !== this.original.length) {
4207
+ for(; start < 0;)start += this.original.length;
4208
+ for(; end < 0;)end += this.original.length;
4209
+ }
4210
+ if (end > this.original.length) throw Error('end is out of bounds');
4211
+ if (start === end) throw Error('Cannot overwrite a zero-length range – use appendLeft or prependRight instead');
4212
+ this._split(start), this._split(end), !0 === options && (warned.storeName || (console.warn('The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'), warned.storeName = !0), options = {
4213
+ storeName: !0
4214
+ });
4215
+ let storeName = void 0 !== options && options.storeName, overwrite = void 0 !== options && options.overwrite;
4216
+ if (storeName) {
4217
+ let original = this.original.slice(start, end);
4218
+ Object.defineProperty(this.storedNames, original, {
4219
+ writable: !0,
4220
+ value: !0,
4221
+ enumerable: !0
4222
+ });
4223
+ }
4224
+ let first = this.byStart[start], last = this.byEnd[end];
4225
+ if (first) {
4226
+ let chunk = first;
4227
+ for(; chunk !== last;){
4228
+ if (chunk.next !== this.byStart[chunk.end]) throw Error('Cannot overwrite across a split point');
4229
+ (chunk = chunk.next).edit('', !1);
4230
+ }
4231
+ first.edit(content, storeName, !overwrite);
4232
+ } else {
4233
+ let newChunk = new Chunk(start, end, '').edit(content, storeName);
4234
+ last.next = newChunk, newChunk.previous = last;
4235
+ }
4236
+ return this;
4237
+ }
4238
+ prepend(content) {
4239
+ if ('string' != typeof content) throw TypeError('outro content must be a string');
4240
+ return this.intro = content + this.intro, this;
4241
+ }
4242
+ prependLeft(index, content) {
4243
+ if (index += this.offset, 'string' != typeof content) throw TypeError('inserted content must be a string');
4244
+ this._split(index);
4245
+ let chunk = this.byEnd[index];
4246
+ return chunk ? chunk.prependLeft(content) : this.intro = content + this.intro, this;
4247
+ }
4248
+ prependRight(index, content) {
4249
+ if (index += this.offset, 'string' != typeof content) throw TypeError('inserted content must be a string');
4250
+ this._split(index);
4251
+ let chunk = this.byStart[index];
4252
+ return chunk ? chunk.prependRight(content) : this.outro = content + this.outro, this;
4253
+ }
4254
+ remove(start, end) {
4255
+ if (start += this.offset, end += this.offset, 0 !== this.original.length) {
4256
+ for(; start < 0;)start += this.original.length;
4257
+ for(; end < 0;)end += this.original.length;
4258
+ }
4259
+ if (start === end) return this;
4260
+ if (start < 0 || end > this.original.length) throw Error('Character is out of bounds');
4261
+ if (start > end) throw Error('end must be greater than start');
4262
+ this._split(start), this._split(end);
4263
+ let chunk = this.byStart[start];
4264
+ for(; chunk;)chunk.intro = '', chunk.outro = '', chunk.edit(''), chunk = end > chunk.end ? this.byStart[chunk.end] : null;
4265
+ return this;
4266
+ }
4267
+ reset(start, end) {
4268
+ if (start += this.offset, end += this.offset, 0 !== this.original.length) {
4269
+ for(; start < 0;)start += this.original.length;
4270
+ for(; end < 0;)end += this.original.length;
4271
+ }
4272
+ if (start === end) return this;
4273
+ if (start < 0 || end > this.original.length) throw Error('Character is out of bounds');
4274
+ if (start > end) throw Error('end must be greater than start');
4275
+ this._split(start), this._split(end);
4276
+ let chunk = this.byStart[start];
4277
+ for(; chunk;)chunk.reset(), chunk = end > chunk.end ? this.byStart[chunk.end] : null;
4278
+ return this;
4279
+ }
4280
+ lastChar() {
4281
+ if (this.outro.length) return this.outro[this.outro.length - 1];
4282
+ let chunk = this.lastChunk;
4283
+ do {
4284
+ if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];
4285
+ if (chunk.content.length) return chunk.content[chunk.content.length - 1];
4286
+ if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];
4287
+ }while (chunk = chunk.previous);
4288
+ return this.intro.length ? this.intro[this.intro.length - 1] : '';
1724
4289
  }
1725
- return trimmed;
1726
- }, SPECIAL_NO_ENTRY_DEPS = [
1727
- '@iconify-icons/material-symbols'
1728
- ], FRAMEWORKS = [
1729
- 'react',
1730
- 'react-dom',
1731
- 'react-router-dom',
1732
- 'vue',
1733
- 'vue-router'
1734
- ], getExternalLibraryName = (pkgName)=>{
1735
- let externalAlias = {
1736
- 'react-dom': 'ReactDOM',
1737
- 'react-router-dom': 'ReactRouterDOM'
1738
- };
1739
- return externalAlias[pkgName] ? externalAlias[pkgName] : pkgName.replace(/^@/, '').split(/[/\-.]/).filter(Boolean).map((part)=>part.charAt(0).toUpperCase() + part.slice(1)).join('');
1740
- }, getExternalValue = (pkgName)=>`window ${getExternalLibraryName(pkgName)}`, MODULE_PATH_REGEX = /.*[\\/]node_modules[\\/](?!\.pnpm[\\/])(?:(@[^\\/]+)[\\/])?([^\\/]+)/, normalizeSvg = (content)=>content.replace(/<\?xml[\s\S]*?\?>/gi, '').replace(/<!DOCTYPE[\s\S]*?>/gi, '').replace(/<!--[\s\S]*?-->/g, '').trim(), extractSvgContent = (content)=>{
1741
- let match = content.match(/<svg\b([^>]*)>/i), viewBoxMatch = match?.[1]?.match(/viewBox\s*=\s*["']([^"']+)["']/i);
1742
- return {
1743
- inner: content.replace(/^[\s\S]*?<svg\b[^>]*>/i, '').replace(/<\/svg>[\s\S]*$/i, '').trim(),
1744
- viewBox: viewBoxMatch?.[1]
1745
- };
1746
- }, readSvgFiles = (dir, collected = [])=>{
1747
- if (!node_fs.existsSync(dir)) return collected;
1748
- for (let entry of node_fs.readdirSync(dir, {
1749
- withFileTypes: !0
1750
- })){
1751
- let fullPath = node_path.join(dir, entry.name);
1752
- entry.isDirectory() ? readSvgFiles(fullPath, collected) : entry.isFile() && entry.name.toLowerCase().endsWith('.svg') && collected.push(fullPath);
4290
+ lastLine() {
4291
+ let lineIndex = this.outro.lastIndexOf('\n');
4292
+ if (-1 !== lineIndex) return this.outro.substr(lineIndex + 1);
4293
+ let lineStr = this.outro, chunk = this.lastChunk;
4294
+ do {
4295
+ if (chunk.outro.length > 0) {
4296
+ if (-1 !== (lineIndex = chunk.outro.lastIndexOf('\n'))) return chunk.outro.substr(lineIndex + 1) + lineStr;
4297
+ lineStr = chunk.outro + lineStr;
4298
+ }
4299
+ if (chunk.content.length > 0) {
4300
+ if (-1 !== (lineIndex = chunk.content.lastIndexOf('\n'))) return chunk.content.substr(lineIndex + 1) + lineStr;
4301
+ lineStr = chunk.content + lineStr;
4302
+ }
4303
+ if (chunk.intro.length > 0) {
4304
+ if (-1 !== (lineIndex = chunk.intro.lastIndexOf('\n'))) return chunk.intro.substr(lineIndex + 1) + lineStr;
4305
+ lineStr = chunk.intro + lineStr;
4306
+ }
4307
+ }while (chunk = chunk.previous);
4308
+ return -1 !== (lineIndex = this.intro.lastIndexOf('\n')) ? this.intro.substr(lineIndex + 1) + lineStr : this.intro + lineStr;
1753
4309
  }
1754
- return collected;
1755
- }, toSymbolId = (filePath, iconDir, symbolId)=>{
1756
- let relative = node_path.relative(iconDir, filePath), parsed = node_path.parse(relative), dir = parsed.dir.split(node_path.sep).filter(Boolean).join('-'), name = parsed.name;
1757
- if ('function' == typeof symbolId) return symbolId(name, filePath);
1758
- let id = (symbolId || 'icon-[dir]-[name]').replace(/\[name\]/g, name).replace(/\[dir\]/g, dir);
1759
- return id.replace(/--+/g, '-').replace(/^-+|-+$/g, '');
1760
- }, BROWSERSLIST_CONFIG_FILES = [
1761
- '.browserslistrc',
1762
- '.browserslistrc.json',
1763
- '.browserslistrc.yaml',
1764
- '.browserslistrc.yml',
1765
- 'browserslist',
1766
- 'browserslist.config.js',
1767
- 'browserslist.config.cjs',
1768
- 'browserslist.config.mjs'
1769
- ], dist = __webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/index.js");
4310
+ slice(start = 0, end = this.original.length - this.offset) {
4311
+ if (start += this.offset, end += this.offset, 0 !== this.original.length) {
4312
+ for(; start < 0;)start += this.original.length;
4313
+ for(; end < 0;)end += this.original.length;
4314
+ }
4315
+ let result = '', chunk = this.firstChunk;
4316
+ for(; chunk && (chunk.start > start || chunk.end <= start);){
4317
+ if (chunk.start < end && chunk.end >= end) return result;
4318
+ chunk = chunk.next;
4319
+ }
4320
+ if (chunk && chunk.edited && chunk.start !== start) throw Error(`Cannot use replaced character ${start} as slice start anchor.`);
4321
+ let startChunk = chunk;
4322
+ for(; chunk;){
4323
+ chunk.intro && (startChunk !== chunk || chunk.start === start) && (result += chunk.intro);
4324
+ let containsEnd = chunk.start < end && chunk.end >= end;
4325
+ if (containsEnd && chunk.edited && chunk.end !== end) throw Error(`Cannot use replaced character ${end} as slice end anchor.`);
4326
+ let sliceStart = startChunk === chunk ? start - chunk.start : 0, sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
4327
+ if (result += chunk.content.slice(sliceStart, sliceEnd), chunk.outro && (!containsEnd || chunk.end === end) && (result += chunk.outro), containsEnd) break;
4328
+ chunk = chunk.next;
4329
+ }
4330
+ return result;
4331
+ }
4332
+ snip(start, end) {
4333
+ let clone = this.clone();
4334
+ return clone.remove(0, start), clone.remove(end, clone.original.length), clone;
4335
+ }
4336
+ _split(index) {
4337
+ if (this.byStart[index] || this.byEnd[index]) return;
4338
+ let chunk = this.lastSearchedChunk, previousChunk = chunk, searchForward = index > chunk.end;
4339
+ for(; chunk;){
4340
+ if (chunk.contains(index)) return this._splitChunk(chunk, index);
4341
+ if ((chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]) === previousChunk) return;
4342
+ previousChunk = chunk;
4343
+ }
4344
+ }
4345
+ _splitChunk(chunk, index) {
4346
+ if (chunk.edited && chunk.content.length) {
4347
+ let loc = getLocator(this.original)(index);
4348
+ throw Error(`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`);
4349
+ }
4350
+ let newChunk = chunk.split(index);
4351
+ return this.byEnd[index] = chunk, this.byStart[index] = newChunk, this.byEnd[newChunk.end] = newChunk, chunk === this.lastChunk && (this.lastChunk = newChunk), this.lastSearchedChunk = chunk, !0;
4352
+ }
4353
+ toString() {
4354
+ let str = this.intro, chunk = this.firstChunk;
4355
+ for(; chunk;)str += chunk.toString(), chunk = chunk.next;
4356
+ return str + this.outro;
4357
+ }
4358
+ isEmpty() {
4359
+ let chunk = this.firstChunk;
4360
+ do if (chunk.intro.length && chunk.intro.trim() || chunk.content.length && chunk.content.trim() || chunk.outro.length && chunk.outro.trim()) return !1;
4361
+ while (chunk = chunk.next);
4362
+ return !0;
4363
+ }
4364
+ length() {
4365
+ let chunk = this.firstChunk, length = 0;
4366
+ do length += chunk.intro.length + chunk.content.length + chunk.outro.length;
4367
+ while (chunk = chunk.next);
4368
+ return length;
4369
+ }
4370
+ trimLines() {
4371
+ return this.trim('[\\r\\n]');
4372
+ }
4373
+ trim(charType) {
4374
+ return this.trimStart(charType).trimEnd(charType);
4375
+ }
4376
+ trimEndAborted(charType) {
4377
+ let rx = RegExp((charType || '\\s') + '+$');
4378
+ if (this.outro = this.outro.replace(rx, ''), this.outro.length) return !0;
4379
+ let chunk = this.lastChunk;
4380
+ do {
4381
+ let end = chunk.end, aborted = chunk.trimEnd(rx);
4382
+ if (chunk.end !== end && (this.lastChunk === chunk && (this.lastChunk = chunk.next), this.byEnd[chunk.end] = chunk, this.byStart[chunk.next.start] = chunk.next, this.byEnd[chunk.next.end] = chunk.next), aborted) return !0;
4383
+ chunk = chunk.previous;
4384
+ }while (chunk);
4385
+ return !1;
4386
+ }
4387
+ trimEnd(charType) {
4388
+ return this.trimEndAborted(charType), this;
4389
+ }
4390
+ trimStartAborted(charType) {
4391
+ let rx = RegExp('^' + (charType || '\\s') + '+');
4392
+ if (this.intro = this.intro.replace(rx, ''), this.intro.length) return !0;
4393
+ let chunk = this.firstChunk;
4394
+ do {
4395
+ let end = chunk.end, aborted = chunk.trimStart(rx);
4396
+ if (chunk.end !== end && (chunk === this.lastChunk && (this.lastChunk = chunk.next), this.byEnd[chunk.end] = chunk, this.byStart[chunk.next.start] = chunk.next, this.byEnd[chunk.next.end] = chunk.next), aborted) return !0;
4397
+ chunk = chunk.next;
4398
+ }while (chunk);
4399
+ return !1;
4400
+ }
4401
+ trimStart(charType) {
4402
+ return this.trimStartAborted(charType), this;
4403
+ }
4404
+ hasChanged() {
4405
+ return this.original !== this.toString();
4406
+ }
4407
+ _replaceRegexp(searchValue, replacement) {
4408
+ function getReplacement(match, str) {
4409
+ return 'string' == typeof replacement ? replacement.replace(/\$(\$|&|\d+)/g, (_, i)=>'$' === i ? '$' : '&' === i ? match[0] : +i < match.length ? match[+i] : `$${i}`) : replacement(...match, match.index, str, match.groups);
4410
+ }
4411
+ if (searchValue.global) (function(re, str) {
4412
+ let match, matches = [];
4413
+ for(; match = re.exec(str);)matches.push(match);
4414
+ return matches;
4415
+ })(searchValue, this.original).forEach((match)=>{
4416
+ if (null != match.index) {
4417
+ let replacement = getReplacement(match, this.original);
4418
+ replacement !== match[0] && this.overwrite(match.index, match.index + match[0].length, replacement);
4419
+ }
4420
+ });
4421
+ else {
4422
+ let match = this.original.match(searchValue);
4423
+ if (match && null != match.index) {
4424
+ let replacement = getReplacement(match, this.original);
4425
+ replacement !== match[0] && this.overwrite(match.index, match.index + match[0].length, replacement);
4426
+ }
4427
+ }
4428
+ return this;
4429
+ }
4430
+ _replaceString(string, replacement) {
4431
+ let { original } = this, index = original.indexOf(string);
4432
+ return -1 !== index && ('function' == typeof replacement && (replacement = replacement(string, index, original)), string !== replacement && this.overwrite(index, index + string.length, replacement)), this;
4433
+ }
4434
+ replace(searchValue, replacement) {
4435
+ return 'string' == typeof searchValue ? this._replaceString(searchValue, replacement) : this._replaceRegexp(searchValue, replacement);
4436
+ }
4437
+ _replaceAllString(string, replacement) {
4438
+ let { original } = this, stringLength = string.length;
4439
+ for(let index = original.indexOf(string); -1 !== index; index = original.indexOf(string, index + stringLength)){
4440
+ let previous = original.slice(index, index + stringLength), _replacement = replacement;
4441
+ 'function' == typeof replacement && (_replacement = replacement(previous, index, original)), previous !== _replacement && this.overwrite(index, index + stringLength, _replacement);
4442
+ }
4443
+ return this;
4444
+ }
4445
+ replaceAll(searchValue, replacement) {
4446
+ if ('string' == typeof searchValue) return this._replaceAllString(searchValue, replacement);
4447
+ if (!searchValue.global) throw TypeError('MagicString.prototype.replaceAll called with a non-global RegExp argument');
4448
+ return this._replaceRegexp(searchValue, replacement);
4449
+ }
4450
+ }
4451
+ Object.prototype.hasOwnProperty;
4452
+ let dist = __webpack_require__("../../node_modules/.pnpm/webpack-merge@6.0.1/node_modules/webpack-merge/dist/index.js");
1770
4453
  var dist_default = __webpack_require__.n(dist), dist_default_0 = dist_default();
1771
4454
  let UNOCSS_CONFIG_FILES = [
1772
4455
  'unocss.config.mjs',
@@ -1781,7 +4464,45 @@ let UNOCSS_CONFIG_FILES = [
1781
4464
  if (!view) return (css)=>css;
1782
4465
  let prefix = {};
1783
4466
  return view.trim().replace(/(\\*)\\(["'`\\])/g, (_, bs, char)=>(prefix[char] = bs.replace(/\\\\/g, '\\'), '')), (css)=>css.replace(/["'`\\]/g, (v)=>(prefix[v] || '') + v);
1784
- }, DOTENV_LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm, TRANSFORM_TIMING_STORE = Symbol.for('unpack:transformTimingMap'), PLUGIN_CONTEXT_STORE = Symbol.for('unpack:pluginContextStore'), globalScope = globalThis;
4467
+ }, main_0 = __webpack_require__("../../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js"), DOTENV_LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm, checkPortOnHost = (port, host)=>new Promise((resolve, reject)=>{
4468
+ let server = node_net.createServer();
4469
+ server.unref(), server.once('error', (error)=>{
4470
+ 'EADDRINUSE' === error.code ? resolve('occupied') : 'EAFNOSUPPORT' === error.code || 'EADDRNOTAVAIL' === error.code ? resolve('unsupported') : reject(error);
4471
+ }), server.listen(null === host ? {
4472
+ port,
4473
+ exclusive: !0
4474
+ } : {
4475
+ port,
4476
+ host,
4477
+ exclusive: !0
4478
+ }, ()=>{
4479
+ server.close(()=>{
4480
+ resolve('available');
4481
+ });
4482
+ });
4483
+ }), getPortAvailability = async (port, hosts)=>{
4484
+ let hasSupportedHost = !1;
4485
+ for (let currentHost of hosts){
4486
+ let result = await checkPortOnHost(port, currentHost);
4487
+ if ('occupied' === result) return !1;
4488
+ 'available' === result && (hasSupportedHost = !0);
4489
+ }
4490
+ return hasSupportedHost;
4491
+ }, getPort = async (startPort = 45678)=>{
4492
+ let normalizedStartPort = Math.max(0, Math.min(65535, Math.floor(startPort))), hosts = (()=>{
4493
+ let hosts = [
4494
+ '0.0.0.0'
4495
+ ];
4496
+ try {
4497
+ let interfaces = node_os.networkInterfaces();
4498
+ for (let interfaceName of Object.keys(interfaces))for (let info of interfaces[interfaceName] || [])hosts.push(info.address);
4499
+ } catch {}
4500
+ return hosts.push(null), Array.from(new Set(hosts));
4501
+ })();
4502
+ for(let port = normalizedStartPort; port <= 65535; port++)if (await getPortAvailability(port, hosts)) return port;
4503
+ for(let port = 0; port < normalizedStartPort; port++)if (await getPortAvailability(port, hosts)) return port;
4504
+ throw Error('No available port found');
4505
+ }, TRANSFORM_TIMING_STORE = Symbol.for('unpack:transformTimingMap'), PLUGIN_CONTEXT_STORE = Symbol.for('unpack:pluginContextStore'), globalScope = globalThis;
1785
4506
  globalScope[TRANSFORM_TIMING_STORE] ??= new WeakMap(), globalScope[PLUGIN_CONTEXT_STORE] ??= new WeakMap();
1786
4507
  let flattenUnpackPlugins = ()=>getCurrentUnpackConfig().plugins?.flat(1 / 0) || [];
1787
4508
  function getNormalizedPluginsByHook(hook) {
@@ -1873,47 +4594,9 @@ function applyPluginsByHookSync(hook, runner) {
1873
4594
  }
1874
4595
  }
1875
4596
  }
1876
- async function getBuildDependencies(root) {
1877
- let rootPackageJson = node_path.join(root, 'package.json'), browserslistConfig = node_path.join(root, '.browserslistrc'), tsconfigPath = node_path.join(root, 'tsconfig.json'), buildDependencies = {};
1878
- await isFileExists(rootPackageJson) && (buildDependencies.packageJson = [
1879
- rootPackageJson
1880
- ]), await isFileExists(browserslistConfig) && (buildDependencies.browserslistrc = [
1881
- browserslistConfig
1882
- ]), await isFileExists(tsconfigPath) && (buildDependencies.tsconfig = [
1883
- tsconfigPath
1884
- ]);
1885
- let unpackConfigPath = resolveConfigPath(root);
1886
- unpackConfigPath && (buildDependencies.unpackConfig = [
1887
- unpackConfigPath
1888
- ]);
1889
- let tailwindConfig = findExists([
1890
- 'ts',
1891
- 'js',
1892
- 'cjs',
1893
- 'mjs'
1894
- ].map((ext)=>node_path.join(root, `tailwind.config.${ext}`)));
1895
- return tailwindConfig && (buildDependencies.tailwindcss = [
1896
- tailwindConfig
1897
- ]), buildDependencies;
1898
- }
1899
- async function applyCacheConfig({ config, unpackConfig, envFilePaths }) {
1900
- let cacheConfig = isPlainObject(unpackConfig.performance.cache) ? unpackConfig.performance.cache : {}, buildDependencies = await getBuildDependencies(unpackConfig.root);
1901
- buildDependencies.userBuildDependencies = cacheConfig.buildDependencies || [], buildDependencies.envFilePaths = envFilePaths;
1902
- let cacheDirectory = node_path.resolve(unpackConfig.root, cacheConfig.cacheDirectory || `${unpackConfig._context.cachePath}/cache`, utils_isDevServer() ? 'dev' : 'build');
1903
- return dist_default()(config, {
1904
- cache: {
1905
- type: 'persistent',
1906
- buildDependencies: Object.values(buildDependencies).flat(),
1907
- storage: {
1908
- type: 'filesystem',
1909
- directory: cacheDirectory
1910
- }
1911
- }
1912
- });
1913
- }
1914
4597
  async function getEntry(root, customEntry) {
1915
4598
  let entry;
1916
- if (entry = customEntry ? node_path.resolve(root, customEntry) : (await external_tinyglobby_glob('(index|main).{js,ts,jsx,tsx}', {
4599
+ if (entry = customEntry ? node_path.resolve(root, customEntry) : (await dist_glob('(index|main).{js,ts,jsx,tsx}', {
1917
4600
  cwd: node_path.join(root, 'src'),
1918
4601
  absolute: !0
1919
4602
  }))[0], !node_fs.existsSync(entry)) throw Error('could not find entry file');
@@ -1950,29 +4633,10 @@ let getOutputFilename = ({ type, hash, async })=>{
1950
4633
  },
1951
4634
  implementation: getUserDepPath(unpackConfig.root, 'less'),
1952
4635
  sourceMap: unpackConfig.css?.sourceMap
1953
- }, unpackConfig.css?.lessLoader || {})
4636
+ }, unpackConfig.css?.lessLoader || {}),
4637
+ parallel: !0
1954
4638
  });
1955
- var css_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
1956
- async function applyHtmlConfig({ config, unpackConfig }) {
1957
- let htmlConfig = unpackConfig.html || {}, { template, templateContent } = getHtmlTemplateOrContent(htmlConfig.template, unpackConfig.root), templateParameters = {
1958
- mountId: htmlConfig.mountId,
1959
- title: isFunction(htmlConfig.title) ? htmlConfig.title({
1960
- entryName: 'index'
1961
- }) : htmlConfig.title || '',
1962
- headTag: htmlConfig.headTag || '',
1963
- ...htmlConfig.templateParameters
1964
- };
1965
- return config.plugins.push(new rspack.HtmlRspackPlugin({
1966
- template,
1967
- templateContent,
1968
- templateParameters,
1969
- minify: !1,
1970
- chunks: [
1971
- 'main'
1972
- ]
1973
- })), config;
1974
- }
1975
- var nativeCss_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
4639
+ var css_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url)), nativeCss_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
1976
4640
  let { RawSource: RawSource, SourceMapSource: SourceMapSource } = rspack.sources, isJsFile = /\.[cm]?js(\?.*)?$/i, jsMinify_PLUGIN_NAME = 'JsMinifyPlugin';
1977
4641
  class JsMinifyPlugin {
1978
4642
  minifyOptions;
@@ -1984,7 +4648,7 @@ class JsMinifyPlugin {
1984
4648
  apply(compiler) {
1985
4649
  let meta = JSON.stringify({
1986
4650
  name: jsMinify_PLUGIN_NAME,
1987
- version: "4.7.1",
4651
+ version: "4.7.3",
1988
4652
  options: this.minifyOptions
1989
4653
  });
1990
4654
  compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
@@ -2238,7 +4902,7 @@ async function getRspackConfig(originalUnpackConfig) {
2238
4902
  }
2239
4903
  return obj;
2240
4904
  }(node_fs.readFileSync(envPath)));
2241
- parsed.NODE_ENV && (processEnv.NODE_ENV = parsed.NODE_ENV), expand({
4905
+ parsed.NODE_ENV && (processEnv.NODE_ENV = parsed.NODE_ENV), (0, main_0.expand)({
2242
4906
  parsed,
2243
4907
  processEnv
2244
4908
  });
@@ -2411,13 +5075,13 @@ async function getRspackConfig(originalUnpackConfig) {
2411
5075
  type: 'css',
2412
5076
  hash: unpackConfig.build?.filenameHash,
2413
5077
  async: !0
2414
- }), set(config, [
5078
+ }), utils_set(config, [
2415
5079
  'module',
2416
5080
  'parser',
2417
5081
  'css/module'
2418
5082
  ], {
2419
5083
  namedExports: !1
2420
- }), set(config, [
5084
+ }), utils_set(config, [
2421
5085
  'module',
2422
5086
  'generator',
2423
5087
  'css/module'
@@ -2431,7 +5095,7 @@ async function getRspackConfig(originalUnpackConfig) {
2431
5095
  test,
2432
5096
  oneOf: [
2433
5097
  (({ use })=>({
2434
- resourceQuery: /[?&]module(?:[=&]|$)/,
5098
+ resourceQuery: CSS_MODULES_RESOURCE_QUERY_REGEX,
2435
5099
  use: [
2436
5100
  isDev() && {
2437
5101
  loader: node_path.resolve(nativeCss_dirname, './typedCssModulesLoader.js')
@@ -2482,7 +5146,7 @@ async function getRspackConfig(originalUnpackConfig) {
2482
5146
  options: {
2483
5147
  importLoaders,
2484
5148
  modules: {
2485
- auto: (_, resourceQuery)=>resourceQuery?.includes('module'),
5149
+ auto: (_, resourceQuery)=>!!resourceQuery && CSS_MODULES_RESOURCE_QUERY_REGEX.test(resourceQuery),
2486
5150
  localIdentName: CSS_MODULES_LOCAL_IDENT_NAME,
2487
5151
  exportLocalsConvention: CSS_MODULES_EXPORTS_CONVENTION,
2488
5152
  namedExport: !1
@@ -2535,10 +5199,58 @@ async function getRspackConfig(originalUnpackConfig) {
2535
5199
  }({
2536
5200
  config,
2537
5201
  unpackConfig
2538
- }), unpackConfig.mpa || (config = await applyHtmlConfig({
5202
+ }), unpackConfig.mpa || (config = function({ config, unpackConfig }) {
5203
+ let htmlConfig = unpackConfig.html || {}, { template, templateContent } = getHtmlTemplateOrContent(htmlConfig.template, unpackConfig.root), templateParameters = {
5204
+ mountId: htmlConfig.mountId,
5205
+ title: isFunction(htmlConfig.title) ? htmlConfig.title({
5206
+ entryName: 'index'
5207
+ }) : htmlConfig.title || '',
5208
+ headTag: htmlConfig.headTag || '',
5209
+ ...htmlConfig.templateParameters
5210
+ };
5211
+ return config.plugins.push(new rspack.HtmlRspackPlugin({
5212
+ template,
5213
+ templateContent,
5214
+ templateParameters,
5215
+ minify: !1,
5216
+ chunks: [
5217
+ 'main'
5218
+ ]
5219
+ })), config;
5220
+ }({
2539
5221
  config,
2540
5222
  unpackConfig
2541
- })), unpackConfig.performance?.cache && (config = await applyCacheConfig({
5223
+ })), unpackConfig.performance?.cache && (config = function({ config, unpackConfig, envFilePaths }) {
5224
+ var root;
5225
+ let rootPackageJson, browserslistConfig, tsconfigPath, buildDependencies, unpackConfigPath, tailwindConfig, cacheConfig = isPlainObject(unpackConfig.performance.cache) ? unpackConfig.performance.cache : {}, buildDependencies1 = (root = unpackConfig.root, rootPackageJson = node_path.join(root, 'package.json'), browserslistConfig = node_path.join(root, '.browserslistrc'), tsconfigPath = node_path.join(root, 'tsconfig.json'), buildDependencies = {}, node_fs.existsSync(rootPackageJson) && (buildDependencies.packageJson = [
5226
+ rootPackageJson
5227
+ ]), node_fs.existsSync(browserslistConfig) && (buildDependencies.browserslistrc = [
5228
+ browserslistConfig
5229
+ ]), node_fs.existsSync(tsconfigPath) && (buildDependencies.tsconfig = [
5230
+ tsconfigPath
5231
+ ]), (unpackConfigPath = resolveConfigPath(root)) && (buildDependencies.unpackConfig = [
5232
+ unpackConfigPath
5233
+ ]), (tailwindConfig = findExists([
5234
+ 'ts',
5235
+ 'js',
5236
+ 'cjs',
5237
+ 'mjs'
5238
+ ].map((ext)=>node_path.join(root, `tailwind.config.${ext}`)))) && (buildDependencies.tailwindcss = [
5239
+ tailwindConfig
5240
+ ]), buildDependencies);
5241
+ buildDependencies1.userBuildDependencies = cacheConfig.buildDependencies || [], buildDependencies1.envFilePaths = envFilePaths;
5242
+ let cacheDirectory = node_path.resolve(unpackConfig.root, cacheConfig.cacheDirectory || `${unpackConfig._context.cachePath}/cache`, utils_isDevServer() ? 'dev' : 'build');
5243
+ return dist_default()(config, {
5244
+ cache: {
5245
+ type: 'persistent',
5246
+ buildDependencies: Object.values(buildDependencies1).flat(),
5247
+ storage: {
5248
+ type: 'filesystem',
5249
+ directory: cacheDirectory
5250
+ }
5251
+ }
5252
+ });
5253
+ }({
2542
5254
  config,
2543
5255
  unpackConfig,
2544
5256
  envFilePaths
@@ -2670,12 +5382,12 @@ async function unpackDev(originalConfig) {
2670
5382
  ...middlewares
2671
5383
  ]);
2672
5384
  let server = new RspackDevServer(devServerOptions, compiler);
2673
- await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v4.7.1`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - getUnpackStartTime()))} ${colors.dim('ms')}\n`), printServerUrls({
5385
+ await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v4.7.3`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - getUnpackStartTime()))} ${colors.dim('ms')}\n`), printServerUrls({
2674
5386
  port,
2675
5387
  host: unpackConfig.server.host,
2676
5388
  base: unpackConfig.base
2677
5389
  }), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
2678
- let open = unpackConfig.server?.open, url = isString(open) ? open : `http://localhost:${port}${devPublicPath}`;
5390
+ let open = unpackConfig.server?.open, url = utils_isString(open) ? open : `http://localhost:${port}${devPublicPath}`;
2679
5391
  return open && openBrowser(url), {
2680
5392
  port,
2681
5393
  url
@@ -2684,7 +5396,7 @@ async function unpackDev(originalConfig) {
2684
5396
  function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'unpack' }) {
2685
5397
  let _context = {
2686
5398
  callerName,
2687
- version: "4.7.1",
5399
+ version: "4.7.3",
2688
5400
  cachePath: 'node_modules/.unpack'
2689
5401
  }, resolveConfig = (mode)=>{
2690
5402
  let rootPath, outputPath, basePath, cachedTraceMap, fs, isValidMethodName, parseFrame, formatOriginalLocation, formatFullStack, resolveErrorLocationAndStack, root, alias, shouldTransformDeepImport, preJsAssets, jsAssets, cssAssets, bundledDepsCachePath, deepImportPkgPattern, deepImportRegex, plugin, tsconfigPath, root1, uno, generated, configOrPath, defaults, VIRTUAL_UNO_CSS_ID, rootDir, isMpa, unoConfig, configFilePath, unpackConfigPath, tokens, requestedLayers, tasks, unocssCacheDir, tokensCachePath, layersCachePath, timeCachePath, configHashCachePath, generatedCachePath, bundlerCacheDir, cachedTokensSize, cachedLayersSize, isCompiling, resolveUnocssConfig, flushTasks, getVirtualModuleContent, hash, restoreSkipCode, applyUnoTransformers, options, rootPath1, registerCode, namesCode, defaultConfig = {
@@ -2714,7 +5426,6 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2714
5426
  performance: {
2715
5427
  printFileSize: !0
2716
5428
  },
2717
- typeCheck: !0,
2718
5429
  envPrefix: [
2719
5430
  'PUBLIC_',
2720
5431
  'VITE_'
@@ -2752,7 +5463,64 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2752
5463
  if (!sourceMapContent) return;
2753
5464
  tracer = new TraceMap(sourceMapContent), cachedTraceMap.set(sourceMapPath, tracer);
2754
5465
  }
2755
- let originalPosition = originalPositionFor(tracer, {
5466
+ let originalPosition = function(map, needle) {
5467
+ var map1, segments, memo, line, column, bias;
5468
+ let index, { line: line1, column: column1, bias: bias1 } = needle;
5469
+ if (--line1 < 0) throw Error("`line` must be greater than 0 (lines start at line 1)");
5470
+ if (column1 < 0) throw Error("`column` must be greater than or equal to 0 (columns start at column 0)");
5471
+ let decoded = (map1 = map)._decoded || (map1._decoded = function(mappings) {
5472
+ let { length } = mappings, reader = new StringReader(mappings), decoded = [], genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;
5473
+ do {
5474
+ let semi = reader.indexOf(";"), line = [], sorted = !0, lastCol = 0;
5475
+ for(genColumn = 0; reader.pos < semi;){
5476
+ let seg;
5477
+ (genColumn = decodeInteger(reader, genColumn)) < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), seg = hasMoreVlq(reader, semi) ? [
5478
+ genColumn,
5479
+ sourcesIndex,
5480
+ sourceLine,
5481
+ sourceColumn,
5482
+ namesIndex = decodeInteger(reader, namesIndex)
5483
+ ] : [
5484
+ genColumn,
5485
+ sourcesIndex,
5486
+ sourceLine,
5487
+ sourceColumn
5488
+ ]) : seg = [
5489
+ genColumn
5490
+ ], line.push(seg), reader.pos++;
5491
+ }
5492
+ sorted || line.sort(sortComparator), decoded.push(line), reader.pos = semi + 1;
5493
+ }while (reader.pos <= length);
5494
+ return decoded;
5495
+ }(map1._encoded));
5496
+ if (line1 >= decoded.length) return OMapping(null, null, null, null);
5497
+ let segments1 = decoded[line1], index1 = (segments = segments1, memo = map._decodedMemo, line = line1, column = column1, bias = bias1 || 1, index = function(haystack, needle, state, key) {
5498
+ let { lastKey, lastNeedle, lastIndex } = state, low = 0, high = haystack.length - 1;
5499
+ if (key === lastKey) {
5500
+ if (needle === lastNeedle) return found = -1 !== lastIndex && haystack[lastIndex][0] === needle, lastIndex;
5501
+ needle >= lastNeedle ? low = -1 === lastIndex ? 0 : lastIndex : high = lastIndex;
5502
+ }
5503
+ return state.lastKey = key, state.lastNeedle = needle, state.lastIndex = function(haystack, needle, low, high) {
5504
+ for(; low <= high;){
5505
+ let mid = low + (high - low >> 1), cmp = haystack[mid][0] - needle;
5506
+ if (0 === cmp) return found = !0, mid;
5507
+ cmp < 0 ? low = mid + 1 : high = mid - 1;
5508
+ }
5509
+ return found = !1, low - 1;
5510
+ }(haystack, needle, low, high);
5511
+ }(segments, column, memo, line), (found ? index = (-1 === bias ? function(haystack, needle, index) {
5512
+ for(let i = index + 1; i < haystack.length && haystack[i][0] === needle; index = i++);
5513
+ return index;
5514
+ } : function(haystack, needle, index) {
5515
+ for(let i = index - 1; i >= 0 && haystack[i][0] === needle; index = i--);
5516
+ return index;
5517
+ })(segments, column, index) : -1 === bias && index++, -1 === index || index === segments.length) ? -1 : index);
5518
+ if (-1 === index1) return OMapping(null, null, null, null);
5519
+ let segment = segments1[index1];
5520
+ if (1 === segment.length) return OMapping(null, null, null, null);
5521
+ let { names, resolvedSources } = map;
5522
+ return OMapping(resolvedSources[segment[1]], segment[2] + 1, segment[3], 5 === segment.length ? names[segment[4]] : null);
5523
+ }(tracer, {
2756
5524
  line: lineNumber,
2757
5525
  column: column
2758
5526
  });
@@ -2815,7 +5583,52 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2815
5583
  locationSuffix: '',
2816
5584
  stackString: ''
2817
5585
  };
2818
- let parsedFrames = parse(item.stack), userFrame = parsedFrames.find((frame)=>frame.file && null !== frame.lineNumber && null !== frame.column && SOURCE_REGEX.test(frame.file));
5586
+ let parsedFrames = item.stack.split('\n').reduce(function(stack, line) {
5587
+ var line1, parts, line2, parts1, line3, parts2, parseResult = function(line) {
5588
+ var parts = chromeRe.exec(line);
5589
+ if (!parts) return null;
5590
+ var isNative = parts[2] && 0 === parts[2].indexOf('native'), isEval = parts[2] && 0 === parts[2].indexOf('eval'), submatch = chromeEvalRe.exec(parts[2]);
5591
+ return isEval && null != submatch && (parts[2] = submatch[1], parts[3] = submatch[2], parts[4] = submatch[3]), {
5592
+ file: isNative ? null : parts[2],
5593
+ methodName: parts[1] || UNKNOWN_FUNCTION,
5594
+ arguments: isNative ? [
5595
+ parts[2]
5596
+ ] : [],
5597
+ lineNumber: parts[3] ? +parts[3] : null,
5598
+ column: parts[4] ? +parts[4] : null
5599
+ };
5600
+ }(line) || (line1 = line, (parts = winjsRe.exec(line1)) ? {
5601
+ file: parts[2],
5602
+ methodName: parts[1] || UNKNOWN_FUNCTION,
5603
+ arguments: [],
5604
+ lineNumber: +parts[3],
5605
+ column: parts[4] ? +parts[4] : null
5606
+ } : null) || function(line) {
5607
+ var parts = geckoRe.exec(line);
5608
+ if (!parts) return null;
5609
+ var isEval = parts[3] && parts[3].indexOf(' > eval') > -1, submatch = geckoEvalRe.exec(parts[3]);
5610
+ return isEval && null != submatch && (parts[3] = submatch[1], parts[4] = submatch[2], parts[5] = null), {
5611
+ file: parts[3],
5612
+ methodName: parts[1] || UNKNOWN_FUNCTION,
5613
+ arguments: parts[2] ? parts[2].split(',') : [],
5614
+ lineNumber: parts[4] ? +parts[4] : null,
5615
+ column: parts[5] ? +parts[5] : null
5616
+ };
5617
+ }(line) || (line2 = line, (parts1 = nodeRe.exec(line2)) ? {
5618
+ file: parts1[2],
5619
+ methodName: parts1[1] || UNKNOWN_FUNCTION,
5620
+ arguments: [],
5621
+ lineNumber: +parts1[3],
5622
+ column: parts1[4] ? +parts1[4] : null
5623
+ } : null) || (line3 = line, (parts2 = javaScriptCoreRe.exec(line3)) ? {
5624
+ file: parts2[3],
5625
+ methodName: parts2[1] || UNKNOWN_FUNCTION,
5626
+ arguments: [],
5627
+ lineNumber: +parts2[4],
5628
+ column: parts2[5] ? +parts2[5] : null
5629
+ } : null);
5630
+ return parseResult && stack.push(parseResult), stack;
5631
+ }, []), userFrame = parsedFrames.find((frame)=>frame.file && null !== frame.lineNumber && null !== frame.column && SOURCE_REGEX.test(frame.file));
2819
5632
  if (userFrame) {
2820
5633
  let parsedUserFrame = await parseFrame(userFrame), loc = parsedUserFrame ? formatOriginalLocation(parsedUserFrame.originalPosition) : null;
2821
5634
  if (loc) return {
@@ -2972,15 +5785,15 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
2972
5785
  cleanedTemplate += `%${next}`, i++;
2973
5786
  }
2974
5787
  return [
2975
- format(cleanedTemplate, ...rest)
5788
+ external_node_util_format(cleanedTemplate, ...rest)
2976
5789
  ];
2977
5790
  })(formattedArgs), prefix = colors.dim(`[browser ${time}]`);
2978
5791
  switch(level){
2979
5792
  case 'error':
2980
- console.log(colors.red(`${prefix} ${format(...outputArgs)}`));
5793
+ console.log(colors.red(`${prefix} ${external_node_util_format(...outputArgs)}`));
2981
5794
  break;
2982
5795
  case 'warn':
2983
- console.log(colors.yellow(`${prefix} ${format(...outputArgs)}`));
5796
+ console.log(colors.yellow(`${prefix} ${external_node_util_format(...outputArgs)}`));
2984
5797
  break;
2985
5798
  case 'debug':
2986
5799
  console.log(prefix, ...outputArgs);
@@ -3104,15 +5917,15 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
3104
5917
  let entry = ((packageJson)=>{
3105
5918
  if (packageJson.module) return packageJson.module;
3106
5919
  if (packageJson.exports) {
3107
- if (isString(packageJson.exports)) return packageJson.exports;
5920
+ if (utils_isString(packageJson.exports)) return packageJson.exports;
3108
5921
  let defaultExport = packageJson.exports['.'];
3109
5922
  if (defaultExport) {
3110
- if (isString(defaultExport)) return defaultExport;
3111
- if (isString(defaultExport.import)) return defaultExport.import;
3112
- if (isString(defaultExport.browser)) return defaultExport.browser;
3113
- if (isString(defaultExport.default)) return defaultExport.default;
5923
+ if (utils_isString(defaultExport)) return defaultExport;
5924
+ if (utils_isString(defaultExport.import)) return defaultExport.import;
5925
+ if (utils_isString(defaultExport.browser)) return defaultExport.browser;
5926
+ if (utils_isString(defaultExport.default)) return defaultExport.default;
3114
5927
  }
3115
- if (isString(packageJson.exports.default)) return packageJson.exports.default;
5928
+ if (utils_isString(packageJson.exports.default)) return packageJson.exports.default;
3116
5929
  }
3117
5930
  if (packageJson.main) return packageJson.main;
3118
5931
  })(depPackageJson);
@@ -3357,7 +6170,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
3357
6170
  }),
3358
6171
  {
3359
6172
  name: 'unpack:type-check',
3360
- apply: (config, { command })=>(tsconfigPath = node_path.resolve(config.root, 'tsconfig.json'), node_fs.existsSync(tsconfigPath) && 'dev' === command && config.typeCheck),
6173
+ apply: (config, { command })=>(tsconfigPath = node_path.resolve(config.root, 'tsconfig.json'), config.typeCheck && 'dev' === command && node_fs.existsSync(tsconfigPath)),
3361
6174
  async rspackConfig (config, { unpackConfig }) {
3362
6175
  let { TsCheckerRspackPlugin } = await import("ts-checker-rspack-plugin");
3363
6176
  return config.plugins.push(new TsCheckerRspackPlugin({
@@ -3517,7 +6330,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
3517
6330
  LAYER_MARK_ALL
3518
6331
  ]), tasks = [], unocssCacheDir = '', tokensCachePath = '', layersCachePath = '', timeCachePath = '', configHashCachePath = '', generatedCachePath = '', bundlerCacheDir = '', cachedTokensSize = 0, cachedLayersSize = 0, isCompiling = !0, resolveUnocssConfig = async ()=>{
3519
6332
  let configFromOption = {};
3520
- isPlainObject(configOrPath) ? configFromOption = configOrPath : isString(configOrPath) && (configFilePath = node_path.isAbsolute(configOrPath) ? configOrPath : node_path.resolve(rootDir, configOrPath)), configFilePath = ((root, customConfig)=>{
6333
+ isPlainObject(configOrPath) ? configFromOption = configOrPath : utils_isString(configOrPath) && (configFilePath = node_path.isAbsolute(configOrPath) ? configOrPath : node_path.resolve(rootDir, configOrPath)), configFilePath = ((root, customConfig)=>{
3521
6334
  if (customConfig) {
3522
6335
  let absPath = node_path.isAbsolute(customConfig) ? customConfig : node_path.resolve(root, customConfig);
3523
6336
  if (node_fs.existsSync(absPath)) return absPath;
@@ -3549,7 +6362,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
3549
6362
  if (original.includes('@unocss-ignore')) return null;
3550
6363
  let transformers = (uno.config.transformers || []).filter((i)=>(i.enforce || 'default') === enforce);
3551
6364
  if (!transformers.length) return null;
3552
- let skipMap = new Map(), code = original, s = new magic_string(((code, map, rules, keyFlag)=>{
6365
+ let skipMap = new Map(), code = original, s = new MagicString(((code, map, rules, keyFlag)=>{
3553
6366
  let next = code;
3554
6367
  for (let item of Array.from(next.matchAll(rules)))if (null != item) {
3555
6368
  let matched = item[0], withHashKey = `${keyFlag}${hash(matched)}`;
@@ -3561,7 +6374,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
3561
6374
  uno,
3562
6375
  tokens,
3563
6376
  invalidate: ()=>{}
3564
- }), s.hasChanged() && (s = new magic_string(code = restoreSkipCode(s.toString(), skipMap))));
6377
+ }), s.hasChanged() && (s = new MagicString(code = restoreSkipCode(s.toString(), skipMap))));
3565
6378
  return code !== original ? code : null;
3566
6379
  }, {
3567
6380
  name: 'unpack:unocss',
@@ -3763,7 +6576,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
3763
6576
  let mode = watch ? 'development' : 'production';
3764
6577
  setNodeEnv(mode);
3765
6578
  let config = resolveConfig(mode);
3766
- console.log(colors.brand(`${callerName} v4.7.1`), colors.cyan(`building for ${mode}...`)), await unpackBuild(config);
6579
+ console.log(colors.brand(`${callerName} v4.7.3`), colors.cyan(`building for ${mode}...`)), await unpackBuild(config);
3767
6580
  },
3768
6581
  dev: async ()=>{
3769
6582
  setUnpackStartTime(performance.now());
@@ -3778,14 +6591,1041 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
3778
6591
  }
3779
6592
  };
3780
6593
  }
3781
- let GLOB_REGEX = /[*?{}[\]()!@+|]/;
6594
+ let EntryTypes_FILE_TYPE = 'files', EntryTypes_DIR_TYPE = 'directories', EntryTypes_FILE_DIR_TYPE = 'files_directories', defaultOptions = {
6595
+ root: '.',
6596
+ fileFilter: (_entryInfo)=>!0,
6597
+ directoryFilter: (_entryInfo)=>!0,
6598
+ type: EntryTypes_FILE_TYPE,
6599
+ lstat: !1,
6600
+ depth: 2147483648,
6601
+ alwaysStat: !1,
6602
+ highWaterMark: 4096
6603
+ };
6604
+ Object.freeze(defaultOptions);
6605
+ let RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR', NORMAL_FLOW_ERRORS = new Set([
6606
+ 'ENOENT',
6607
+ 'EPERM',
6608
+ 'EACCES',
6609
+ 'ELOOP',
6610
+ RECURSIVE_ERROR_CODE
6611
+ ]), ALL_TYPES = [
6612
+ EntryTypes_DIR_TYPE,
6613
+ 'all',
6614
+ EntryTypes_FILE_DIR_TYPE,
6615
+ EntryTypes_FILE_TYPE
6616
+ ], DIR_TYPES = new Set([
6617
+ EntryTypes_DIR_TYPE,
6618
+ 'all',
6619
+ EntryTypes_FILE_DIR_TYPE
6620
+ ]), FILE_TYPES = new Set([
6621
+ 'all',
6622
+ EntryTypes_FILE_DIR_TYPE,
6623
+ EntryTypes_FILE_TYPE
6624
+ ]), wantBigintFsStats = 'win32' === process.platform, emptyFn = (_entryInfo)=>!0, normalizeFilter = (filter)=>{
6625
+ if (void 0 === filter) return emptyFn;
6626
+ if ('function' == typeof filter) return filter;
6627
+ if ('string' == typeof filter) {
6628
+ let fl = filter.trim();
6629
+ return (entry)=>entry.basename === fl;
6630
+ }
6631
+ if (Array.isArray(filter)) {
6632
+ let trItems = filter.map((item)=>item.trim());
6633
+ return (entry)=>trItems.some((f)=>entry.basename === f);
6634
+ }
6635
+ return emptyFn;
6636
+ };
6637
+ class ReaddirpStream extends Readable {
6638
+ parents;
6639
+ reading;
6640
+ parent;
6641
+ _stat;
6642
+ _maxDepth;
6643
+ _wantsDir;
6644
+ _wantsFile;
6645
+ _wantsEverything;
6646
+ _root;
6647
+ _isDirent;
6648
+ _statsProp;
6649
+ _rdOptions;
6650
+ _fileFilter;
6651
+ _directoryFilter;
6652
+ constructor(options = {}){
6653
+ super({
6654
+ objectMode: !0,
6655
+ autoDestroy: !0,
6656
+ highWaterMark: options.highWaterMark
6657
+ });
6658
+ let opts = {
6659
+ ...defaultOptions,
6660
+ ...options
6661
+ }, { root, type } = opts;
6662
+ this._fileFilter = normalizeFilter(opts.fileFilter), this._directoryFilter = normalizeFilter(opts.directoryFilter);
6663
+ let statMethod = opts.lstat ? lstat : promises_stat;
6664
+ wantBigintFsStats ? this._stat = (path)=>statMethod(path, {
6665
+ bigint: !0
6666
+ }) : this._stat = statMethod, this._maxDepth = null != opts.depth && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth, this._wantsDir = !!type && DIR_TYPES.has(type), this._wantsFile = !!type && FILE_TYPES.has(type), this._wantsEverything = 'all' === type, this._root = external_node_path_resolve(root), this._isDirent = !opts.alwaysStat, this._statsProp = this._isDirent ? 'dirent' : 'stats', this._rdOptions = {
6667
+ encoding: 'utf8',
6668
+ withFileTypes: this._isDirent
6669
+ }, this.parents = [
6670
+ this._exploreDir(root, 1)
6671
+ ], this.reading = !1, this.parent = void 0;
6672
+ }
6673
+ async _read(batch) {
6674
+ if (!this.reading) {
6675
+ this.reading = !0;
6676
+ try {
6677
+ for(; !this.destroyed && batch > 0;){
6678
+ let par = this.parent, fil = par && par.files;
6679
+ if (fil && fil.length > 0) {
6680
+ let { path, depth } = par, slice = fil.splice(0, batch).map((dirent)=>this._formatEntry(dirent, path));
6681
+ for (let entry of (await Promise.all(slice))){
6682
+ if (!entry) continue;
6683
+ if (this.destroyed) return;
6684
+ let entryType = await this._getEntryType(entry);
6685
+ 'directory' === entryType && this._directoryFilter(entry) ? (depth <= this._maxDepth && this.parents.push(this._exploreDir(entry.fullPath, depth + 1)), this._wantsDir && (this.push(entry), batch--)) : ('file' === entryType || this._includeAsFile(entry)) && this._fileFilter(entry) && this._wantsFile && (this.push(entry), batch--);
6686
+ }
6687
+ } else {
6688
+ let parent = this.parents.pop();
6689
+ if (!parent) {
6690
+ this.push(null);
6691
+ break;
6692
+ }
6693
+ if (this.parent = await parent, this.destroyed) return;
6694
+ }
6695
+ }
6696
+ } catch (error) {
6697
+ this.destroy(error);
6698
+ } finally{
6699
+ this.reading = !1;
6700
+ }
6701
+ }
6702
+ }
6703
+ async _exploreDir(path, depth) {
6704
+ let files;
6705
+ try {
6706
+ files = await readdir(path, this._rdOptions);
6707
+ } catch (error) {
6708
+ this._onError(error);
6709
+ }
6710
+ return {
6711
+ files,
6712
+ depth,
6713
+ path
6714
+ };
6715
+ }
6716
+ async _formatEntry(dirent, path) {
6717
+ let entry, basename = this._isDirent ? dirent.name : dirent;
6718
+ try {
6719
+ let fullPath = external_node_path_resolve(join(path, basename));
6720
+ (entry = {
6721
+ path: external_node_path_relative(this._root, fullPath),
6722
+ fullPath,
6723
+ basename
6724
+ })[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
6725
+ } catch (err) {
6726
+ this._onError(err);
6727
+ return;
6728
+ }
6729
+ return entry;
6730
+ }
6731
+ _onError(err) {
6732
+ NORMAL_FLOW_ERRORS.has(err.code) && !this.destroyed ? this.emit('warn', err) : this.destroy(err);
6733
+ }
6734
+ async _getEntryType(entry) {
6735
+ if (!entry && this._statsProp in entry) return '';
6736
+ let stats = entry[this._statsProp];
6737
+ if (stats.isFile()) return 'file';
6738
+ if (stats.isDirectory()) return 'directory';
6739
+ if (stats && stats.isSymbolicLink()) {
6740
+ let full = entry.fullPath;
6741
+ try {
6742
+ let entryRealPath = await promises_realpath(full), entryRealPathStats = await lstat(entryRealPath);
6743
+ if (entryRealPathStats.isFile()) return 'file';
6744
+ if (entryRealPathStats.isDirectory()) {
6745
+ let len = entryRealPath.length;
6746
+ if (full.startsWith(entryRealPath) && full.substr(len, 1) === sep) {
6747
+ let recursiveError = Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
6748
+ return recursiveError.code = RECURSIVE_ERROR_CODE, this._onError(recursiveError);
6749
+ }
6750
+ return 'directory';
6751
+ }
6752
+ } catch (error) {
6753
+ return this._onError(error), '';
6754
+ }
6755
+ }
6756
+ }
6757
+ _includeAsFile(entry) {
6758
+ let stats = entry && entry[this._statsProp];
6759
+ return stats && this._wantsEverything && !stats.isDirectory();
6760
+ }
6761
+ }
6762
+ let EMPTY_FN = ()=>{}, pl = process.platform, isWindows = 'win32' === pl, isMacos = 'darwin' === pl, isLinux = 'linux' === pl, isFreeBSD = 'freebsd' === pl, isIBMi = 'OS400' === external_node_os_type(), EVENTS_ALL = 'all', EVENTS_READY = 'ready', EVENTS_ADD = 'add', EVENTS_CHANGE = 'change', EVENTS_ADD_DIR = 'addDir', EVENTS_UNLINK = 'unlink', EVENTS_UNLINK_DIR = 'unlinkDir', EVENTS_RAW = 'raw', EVENTS_ERROR = 'error', statMethods = {
6763
+ lstat: lstat,
6764
+ stat: promises_stat
6765
+ }, KEY_LISTENERS = 'listeners', KEY_ERR = 'errHandlers', KEY_RAW = 'rawEmitters', HANDLER_KEYS = [
6766
+ KEY_LISTENERS,
6767
+ KEY_ERR,
6768
+ KEY_RAW
6769
+ ], binaryExtensions = new Set([
6770
+ '3dm',
6771
+ '3ds',
6772
+ '3g2',
6773
+ '3gp',
6774
+ '7z',
6775
+ 'a',
6776
+ 'aac',
6777
+ 'adp',
6778
+ 'afdesign',
6779
+ 'afphoto',
6780
+ 'afpub',
6781
+ 'ai',
6782
+ 'aif',
6783
+ 'aiff',
6784
+ 'alz',
6785
+ 'ape',
6786
+ 'apk',
6787
+ 'appimage',
6788
+ 'ar',
6789
+ 'arj',
6790
+ 'asf',
6791
+ 'au',
6792
+ 'avi',
6793
+ 'bak',
6794
+ 'baml',
6795
+ 'bh',
6796
+ 'bin',
6797
+ 'bk',
6798
+ 'bmp',
6799
+ 'btif',
6800
+ 'bz2',
6801
+ 'bzip2',
6802
+ 'cab',
6803
+ 'caf',
6804
+ 'cgm',
6805
+ 'class',
6806
+ 'cmx',
6807
+ 'cpio',
6808
+ 'cr2',
6809
+ 'cur',
6810
+ 'dat',
6811
+ 'dcm',
6812
+ 'deb',
6813
+ 'dex',
6814
+ 'djvu',
6815
+ 'dll',
6816
+ 'dmg',
6817
+ 'dng',
6818
+ 'doc',
6819
+ 'docm',
6820
+ 'docx',
6821
+ 'dot',
6822
+ 'dotm',
6823
+ 'dra',
6824
+ 'DS_Store',
6825
+ 'dsk',
6826
+ 'dts',
6827
+ 'dtshd',
6828
+ 'dvb',
6829
+ 'dwg',
6830
+ 'dxf',
6831
+ 'ecelp4800',
6832
+ 'ecelp7470',
6833
+ 'ecelp9600',
6834
+ 'egg',
6835
+ 'eol',
6836
+ 'eot',
6837
+ 'epub',
6838
+ 'exe',
6839
+ 'f4v',
6840
+ 'fbs',
6841
+ 'fh',
6842
+ 'fla',
6843
+ 'flac',
6844
+ 'flatpak',
6845
+ 'fli',
6846
+ 'flv',
6847
+ 'fpx',
6848
+ 'fst',
6849
+ 'fvt',
6850
+ 'g3',
6851
+ 'gh',
6852
+ 'gif',
6853
+ 'graffle',
6854
+ 'gz',
6855
+ 'gzip',
6856
+ 'h261',
6857
+ 'h263',
6858
+ 'h264',
6859
+ 'icns',
6860
+ 'ico',
6861
+ 'ief',
6862
+ 'img',
6863
+ 'ipa',
6864
+ 'iso',
6865
+ 'jar',
6866
+ 'jpeg',
6867
+ 'jpg',
6868
+ 'jpgv',
6869
+ 'jpm',
6870
+ 'jxr',
6871
+ 'key',
6872
+ 'ktx',
6873
+ 'lha',
6874
+ 'lib',
6875
+ 'lvp',
6876
+ 'lz',
6877
+ 'lzh',
6878
+ 'lzma',
6879
+ 'lzo',
6880
+ 'm3u',
6881
+ 'm4a',
6882
+ 'm4v',
6883
+ 'mar',
6884
+ 'mdi',
6885
+ 'mht',
6886
+ 'mid',
6887
+ 'midi',
6888
+ 'mj2',
6889
+ 'mka',
6890
+ 'mkv',
6891
+ 'mmr',
6892
+ 'mng',
6893
+ 'mobi',
6894
+ 'mov',
6895
+ 'movie',
6896
+ 'mp3',
6897
+ 'mp4',
6898
+ 'mp4a',
6899
+ 'mpeg',
6900
+ 'mpg',
6901
+ 'mpga',
6902
+ 'mxu',
6903
+ 'nef',
6904
+ 'npx',
6905
+ 'numbers',
6906
+ 'nupkg',
6907
+ 'o',
6908
+ 'odp',
6909
+ 'ods',
6910
+ 'odt',
6911
+ 'oga',
6912
+ 'ogg',
6913
+ 'ogv',
6914
+ 'otf',
6915
+ 'ott',
6916
+ 'pages',
6917
+ 'pbm',
6918
+ 'pcx',
6919
+ 'pdb',
6920
+ 'pdf',
6921
+ 'pea',
6922
+ 'pgm',
6923
+ 'pic',
6924
+ 'png',
6925
+ 'pnm',
6926
+ 'pot',
6927
+ 'potm',
6928
+ 'potx',
6929
+ 'ppa',
6930
+ 'ppam',
6931
+ 'ppm',
6932
+ 'pps',
6933
+ 'ppsm',
6934
+ 'ppsx',
6935
+ 'ppt',
6936
+ 'pptm',
6937
+ 'pptx',
6938
+ 'psd',
6939
+ 'pya',
6940
+ 'pyc',
6941
+ 'pyo',
6942
+ 'pyv',
6943
+ 'qt',
6944
+ 'rar',
6945
+ 'ras',
6946
+ 'raw',
6947
+ 'resources',
6948
+ 'rgb',
6949
+ 'rip',
6950
+ 'rlc',
6951
+ 'rmf',
6952
+ 'rmvb',
6953
+ 'rpm',
6954
+ 'rtf',
6955
+ 'rz',
6956
+ 's3m',
6957
+ 's7z',
6958
+ 'scpt',
6959
+ 'sgi',
6960
+ 'shar',
6961
+ 'snap',
6962
+ 'sil',
6963
+ 'sketch',
6964
+ 'slk',
6965
+ 'smv',
6966
+ 'snk',
6967
+ 'so',
6968
+ 'stl',
6969
+ 'suo',
6970
+ 'sub',
6971
+ 'swf',
6972
+ 'tar',
6973
+ 'tbz',
6974
+ 'tbz2',
6975
+ 'tga',
6976
+ 'tgz',
6977
+ 'thmx',
6978
+ 'tif',
6979
+ 'tiff',
6980
+ 'tlz',
6981
+ 'ttc',
6982
+ 'ttf',
6983
+ 'txz',
6984
+ 'udf',
6985
+ 'uvh',
6986
+ 'uvi',
6987
+ 'uvm',
6988
+ 'uvp',
6989
+ 'uvs',
6990
+ 'uvu',
6991
+ 'viv',
6992
+ 'vob',
6993
+ 'war',
6994
+ 'wav',
6995
+ 'wax',
6996
+ 'wbmp',
6997
+ 'wdp',
6998
+ 'weba',
6999
+ 'webm',
7000
+ 'webp',
7001
+ 'whl',
7002
+ 'wim',
7003
+ 'wm',
7004
+ 'wma',
7005
+ 'wmv',
7006
+ 'wmx',
7007
+ 'woff',
7008
+ 'woff2',
7009
+ 'wrm',
7010
+ 'wvx',
7011
+ 'xbm',
7012
+ 'xif',
7013
+ 'xla',
7014
+ 'xlam',
7015
+ 'xls',
7016
+ 'xlsb',
7017
+ 'xlsm',
7018
+ 'xlsx',
7019
+ 'xlt',
7020
+ 'xltm',
7021
+ 'xltx',
7022
+ 'xm',
7023
+ 'xmind',
7024
+ 'xpi',
7025
+ 'xpm',
7026
+ 'xwd',
7027
+ 'xz',
7028
+ 'z',
7029
+ 'zip',
7030
+ 'zipx'
7031
+ ]), foreach = (val, fn)=>{
7032
+ val instanceof Set ? val.forEach(fn) : fn(val);
7033
+ }, addAndConvert = (main, prop, item)=>{
7034
+ let container = main[prop];
7035
+ container instanceof Set || (main[prop] = container = new Set([
7036
+ container
7037
+ ])), container.add(item);
7038
+ }, delFromSet = (main, prop, item)=>{
7039
+ let container = main[prop];
7040
+ container instanceof Set ? container.delete(item) : container === item && delete main[prop];
7041
+ }, isEmptySet = (val)=>val instanceof Set ? 0 === val.size : !val, FsWatchInstances = new Map();
7042
+ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
7043
+ try {
7044
+ return external_node_fs_watch(path, {
7045
+ persistent: options.persistent
7046
+ }, (rawEvent, evPath)=>{
7047
+ listener(path), emitRaw(rawEvent, evPath, {
7048
+ watchedPath: path
7049
+ }), evPath && path !== evPath && fsWatchBroadcast(external_node_path_resolve(path, evPath), KEY_LISTENERS, join(path, evPath));
7050
+ });
7051
+ } catch (error) {
7052
+ errHandler(error);
7053
+ return;
7054
+ }
7055
+ }
7056
+ let fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3)=>{
7057
+ let cont = FsWatchInstances.get(fullPath);
7058
+ cont && foreach(cont[listenerType], (listener)=>{
7059
+ listener(val1, val2, val3);
7060
+ });
7061
+ }, FsWatchFileInstances = new Map();
7062
+ class NodeFsHandler {
7063
+ fsw;
7064
+ _boundHandleError;
7065
+ constructor(fsW){
7066
+ this.fsw = fsW, this._boundHandleError = (error)=>fsW._handleError(error);
7067
+ }
7068
+ _watchWithNodeFs(path, listener) {
7069
+ let closer, opts = this.fsw.options, directory = external_node_path_dirname(path), basename = external_node_path_basename(path);
7070
+ this.fsw._getWatchedDir(directory).add(basename);
7071
+ let absolutePath = external_node_path_resolve(path), options = {
7072
+ persistent: opts.persistent
7073
+ };
7074
+ if (listener || (listener = EMPTY_FN), opts.usePolling) options.interval = opts.interval !== opts.binaryInterval && binaryExtensions.has(extname(basename).slice(1).toLowerCase()) ? opts.binaryInterval : opts.interval, closer = ((path, fullPath, options, handlers)=>{
7075
+ let { listener, rawEmitter } = handlers, cont = FsWatchFileInstances.get(fullPath), copts = cont && cont.options;
7076
+ return copts && (copts.persistent < options.persistent || copts.interval > options.interval) && (unwatchFile(fullPath), cont = void 0), cont ? (addAndConvert(cont, KEY_LISTENERS, listener), addAndConvert(cont, KEY_RAW, rawEmitter)) : (cont = {
7077
+ listeners: listener,
7078
+ rawEmitters: rawEmitter,
7079
+ options,
7080
+ watcher: watchFile(fullPath, options, (curr, prev)=>{
7081
+ foreach(cont.rawEmitters, (rawEmitter)=>{
7082
+ rawEmitter(EVENTS_CHANGE, fullPath, {
7083
+ curr,
7084
+ prev
7085
+ });
7086
+ });
7087
+ let currmtime = curr.mtimeMs;
7088
+ (curr.size !== prev.size || currmtime > prev.mtimeMs || 0 === currmtime) && foreach(cont.listeners, (listener)=>listener(path, curr));
7089
+ })
7090
+ }, FsWatchFileInstances.set(fullPath, cont)), ()=>{
7091
+ delFromSet(cont, KEY_LISTENERS, listener), delFromSet(cont, KEY_RAW, rawEmitter), isEmptySet(cont.listeners) && (FsWatchFileInstances.delete(fullPath), unwatchFile(fullPath), cont.options = cont.watcher = void 0, Object.freeze(cont));
7092
+ };
7093
+ })(path, absolutePath, options, {
7094
+ listener,
7095
+ rawEmitter: this.fsw._emitRaw
7096
+ });
7097
+ else closer = ((path, fullPath, options, handlers)=>{
7098
+ let watcher, { listener, errHandler, rawEmitter } = handlers, cont = FsWatchInstances.get(fullPath);
7099
+ if (!options.persistent) {
7100
+ if (!(watcher = createFsWatchInstance(path, options, listener, errHandler, rawEmitter))) return;
7101
+ return watcher.close.bind(watcher);
7102
+ }
7103
+ if (cont) addAndConvert(cont, KEY_LISTENERS, listener), addAndConvert(cont, KEY_ERR, errHandler), addAndConvert(cont, KEY_RAW, rawEmitter);
7104
+ else {
7105
+ if (!(watcher = createFsWatchInstance(path, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW)))) return;
7106
+ watcher.on(EVENTS_ERROR, async (error)=>{
7107
+ let broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
7108
+ if (cont && (cont.watcherUnusable = !0), isWindows && 'EPERM' === error.code) try {
7109
+ let fd = await promises_open(path, 'r');
7110
+ await fd.close(), broadcastErr(error);
7111
+ } catch (err) {}
7112
+ else broadcastErr(error);
7113
+ }), cont = {
7114
+ listeners: listener,
7115
+ errHandlers: errHandler,
7116
+ rawEmitters: rawEmitter,
7117
+ watcher
7118
+ }, FsWatchInstances.set(fullPath, cont);
7119
+ }
7120
+ return ()=>{
7121
+ if (delFromSet(cont, KEY_LISTENERS, listener), delFromSet(cont, KEY_ERR, errHandler), delFromSet(cont, KEY_RAW, rawEmitter), isEmptySet(cont.listeners)) {
7122
+ let cont1;
7123
+ cont.watcher.close(), FsWatchInstances.delete(fullPath), HANDLER_KEYS.forEach((cont1 = cont, (key)=>{
7124
+ let set = cont1[key];
7125
+ set instanceof Set ? set.clear() : delete cont1[key];
7126
+ })), cont.watcher = void 0, Object.freeze(cont);
7127
+ }
7128
+ };
7129
+ })(path, absolutePath, options, {
7130
+ listener,
7131
+ errHandler: this._boundHandleError,
7132
+ rawEmitter: this.fsw._emitRaw
7133
+ });
7134
+ return closer;
7135
+ }
7136
+ _handleFile(file, stats, initialAdd) {
7137
+ if (this.fsw.closed) return;
7138
+ let dirname = external_node_path_dirname(file), basename = external_node_path_basename(file), parent = this.fsw._getWatchedDir(dirname), prevStats = stats;
7139
+ if (parent.has(basename)) return;
7140
+ let listener = async (path, newStats)=>{
7141
+ if (this.fsw._throttle('watch', file, 5)) if (newStats && 0 !== newStats.mtimeMs) {
7142
+ if (parent.has(basename)) {
7143
+ let at = newStats.atimeMs, mt = newStats.mtimeMs;
7144
+ (!at || at <= mt || mt !== prevStats.mtimeMs) && this.fsw._emit(EVENTS_CHANGE, file, newStats), prevStats = newStats;
7145
+ }
7146
+ } else try {
7147
+ let newStats = await promises_stat(file);
7148
+ if (this.fsw.closed) return;
7149
+ let at = newStats.atimeMs, mt = newStats.mtimeMs;
7150
+ if ((!at || at <= mt || mt !== prevStats.mtimeMs) && this.fsw._emit(EVENTS_CHANGE, file, newStats), (isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats.ino) {
7151
+ this.fsw._closeFile(path), prevStats = newStats;
7152
+ let closer = this._watchWithNodeFs(file, listener);
7153
+ closer && this.fsw._addPathCloser(path, closer);
7154
+ } else prevStats = newStats;
7155
+ } catch (error) {
7156
+ this.fsw._remove(dirname, basename);
7157
+ }
7158
+ }, closer = this._watchWithNodeFs(file, listener);
7159
+ if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
7160
+ if (!this.fsw._throttle(EVENTS_ADD, file, 0)) return;
7161
+ this.fsw._emit(EVENTS_ADD, file, stats);
7162
+ }
7163
+ return closer;
7164
+ }
7165
+ async _handleSymlink(entry, directory, path, item) {
7166
+ if (this.fsw.closed) return;
7167
+ let full = entry.fullPath, dir = this.fsw._getWatchedDir(directory);
7168
+ if (!this.fsw.options.followSymlinks) {
7169
+ let linkPath;
7170
+ this.fsw._incrReadyCount();
7171
+ try {
7172
+ linkPath = await promises_realpath(path);
7173
+ } catch (e) {
7174
+ return this.fsw._emitReady(), !0;
7175
+ }
7176
+ if (this.fsw.closed) return;
7177
+ return dir.has(item) ? this.fsw._symlinkPaths.get(full) !== linkPath && (this.fsw._symlinkPaths.set(full, linkPath), this.fsw._emit(EVENTS_CHANGE, path, entry.stats)) : (dir.add(item), this.fsw._symlinkPaths.set(full, linkPath), this.fsw._emit(EVENTS_ADD, path, entry.stats)), this.fsw._emitReady(), !0;
7178
+ }
7179
+ if (this.fsw._symlinkPaths.has(full)) return !0;
7180
+ this.fsw._symlinkPaths.set(full, !0);
7181
+ }
7182
+ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
7183
+ directory = join(directory, '');
7184
+ let throttleKey = target ? `${directory}:${target}` : directory;
7185
+ if (!(throttler = this.fsw._throttle('readdir', throttleKey, 1000))) return;
7186
+ let previous = this.fsw._getWatchedDir(wh.path), current = new Set(), stream = this.fsw._readdirp(directory, {
7187
+ fileFilter: (entry)=>wh.filterPath(entry),
7188
+ directoryFilter: (entry)=>wh.filterDir(entry)
7189
+ });
7190
+ if (stream) return stream.on('data', async (entry)=>{
7191
+ if (this.fsw.closed) {
7192
+ stream = void 0;
7193
+ return;
7194
+ }
7195
+ let item = entry.path, path = join(directory, item);
7196
+ if (current.add(item), !(entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item))) {
7197
+ if (this.fsw.closed) {
7198
+ stream = void 0;
7199
+ return;
7200
+ }
7201
+ item !== target && (target || previous.has(item)) || (this.fsw._incrReadyCount(), path = join(dir, external_node_path_relative(dir, path)), this._addToNodeFs(path, initialAdd, wh, depth + 1));
7202
+ }
7203
+ }).on(EVENTS_ERROR, this._boundHandleError), new Promise((resolve, reject)=>{
7204
+ if (!stream) return reject();
7205
+ stream.once('end', ()=>{
7206
+ if (this.fsw.closed) {
7207
+ stream = void 0;
7208
+ return;
7209
+ }
7210
+ let wasThrottled = !!throttler && throttler.clear();
7211
+ resolve(void 0), previous.getChildren().filter((item)=>item !== directory && !current.has(item)).forEach((item)=>{
7212
+ this.fsw._remove(directory, item);
7213
+ }), stream = void 0, wasThrottled && this._handleRead(directory, !1, wh, target, dir, depth, throttler);
7214
+ });
7215
+ });
7216
+ }
7217
+ async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
7218
+ let throttler, closer, parentDir = this.fsw._getWatchedDir(external_node_path_dirname(dir)), tracked = parentDir.has(external_node_path_basename(dir));
7219
+ initialAdd && this.fsw.options.ignoreInitial || target || tracked || this.fsw._emit(EVENTS_ADD_DIR, dir, stats), parentDir.add(external_node_path_basename(dir)), this.fsw._getWatchedDir(dir);
7220
+ let oDepth = this.fsw.options.depth;
7221
+ if ((null == oDepth || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) {
7222
+ if (!target && (await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler), this.fsw.closed)) return;
7223
+ closer = this._watchWithNodeFs(dir, (dirPath, stats)=>{
7224
+ stats && 0 === stats.mtimeMs || this._handleRead(dirPath, !1, wh, target, dir, depth, throttler);
7225
+ });
7226
+ }
7227
+ return closer;
7228
+ }
7229
+ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
7230
+ let ready = this.fsw._emitReady;
7231
+ if (this.fsw._isIgnored(path) || this.fsw.closed) return ready(), !1;
7232
+ let wh = this.fsw._getWatchHelpers(path);
7233
+ priorWh && (wh.filterPath = (entry)=>priorWh.filterPath(entry), wh.filterDir = (entry)=>priorWh.filterDir(entry));
7234
+ try {
7235
+ let closer, stats = await statMethods[wh.statMethod](wh.watchPath);
7236
+ if (this.fsw.closed) return;
7237
+ if (this.fsw._isIgnored(wh.watchPath, stats)) return ready(), !1;
7238
+ let follow = this.fsw.options.followSymlinks;
7239
+ if (stats.isDirectory()) {
7240
+ let absPath = external_node_path_resolve(path), targetPath = follow ? await promises_realpath(path) : path;
7241
+ if (this.fsw.closed || (closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath), this.fsw.closed)) return;
7242
+ absPath !== targetPath && void 0 !== targetPath && this.fsw._symlinkPaths.set(absPath, targetPath);
7243
+ } else if (stats.isSymbolicLink()) {
7244
+ let targetPath = follow ? await promises_realpath(path) : path;
7245
+ if (this.fsw.closed) return;
7246
+ let parent = external_node_path_dirname(wh.watchPath);
7247
+ if (this.fsw._getWatchedDir(parent).add(wh.watchPath), this.fsw._emit(EVENTS_ADD, wh.watchPath, stats), closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath), this.fsw.closed) return;
7248
+ void 0 !== targetPath && this.fsw._symlinkPaths.set(external_node_path_resolve(path), targetPath);
7249
+ } else closer = this._handleFile(wh.watchPath, stats, initialAdd);
7250
+ return ready(), closer && this.fsw._addPathCloser(path, closer), !1;
7251
+ } catch (error) {
7252
+ if (this.fsw._handleError(error)) return ready(), path;
7253
+ }
7254
+ }
7255
+ }
7256
+ let BACK_SLASH_RE = /\\/g, DOUBLE_SLASH_RE = /\/\//g, DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/, REPLACER_RE = /^\.[/\\]/;
7257
+ function arrify(item) {
7258
+ return Array.isArray(item) ? item : [
7259
+ item
7260
+ ];
7261
+ }
7262
+ let isMatcherObject = (matcher)=>'object' == typeof matcher && null !== matcher && !(matcher instanceof RegExp);
7263
+ function chokidar_matchPatterns(patterns, testString, stats) {
7264
+ let path = function(path) {
7265
+ if ('string' != typeof path) throw Error('string expected');
7266
+ path = (path = normalize(path)).replace(/\\/g, '/');
7267
+ let prepend = !1;
7268
+ return path.startsWith('//') && (prepend = !0), path = path.replace(DOUBLE_SLASH_RE, '/'), prepend && (path = '/' + path), path;
7269
+ }(testString);
7270
+ for(let index = 0; index < patterns.length; index++)if ((0, patterns[index])(path, stats)) return !0;
7271
+ return !1;
7272
+ }
7273
+ let unifyPaths = (paths_)=>{
7274
+ let paths = arrify(paths_).flat();
7275
+ if (!paths.every((p)=>'string' == typeof p)) throw TypeError(`Non-string provided as watch path: ${paths}`);
7276
+ return paths.map(normalizePathToUnix);
7277
+ }, toUnix = (string)=>{
7278
+ let str = string.replace(BACK_SLASH_RE, '/'), prepend = !1;
7279
+ return str.startsWith('//') && (prepend = !0), str = str.replace(DOUBLE_SLASH_RE, '/'), prepend && (str = '/' + str), str;
7280
+ }, normalizePathToUnix = (path)=>toUnix(normalize(toUnix(path))), normalizeIgnored = (cwd = '')=>(path)=>'string' == typeof path ? normalizePathToUnix(isAbsolute(path) ? path : join(cwd, path)) : path, EMPTY_SET = Object.freeze(new Set());
7281
+ class DirEntry {
7282
+ path;
7283
+ _removeWatcher;
7284
+ items;
7285
+ constructor(dir, removeWatcher){
7286
+ this.path = dir, this._removeWatcher = removeWatcher, this.items = new Set();
7287
+ }
7288
+ add(item) {
7289
+ let { items } = this;
7290
+ items && '.' !== item && '..' !== item && items.add(item);
7291
+ }
7292
+ async remove(item) {
7293
+ let { items } = this;
7294
+ if (!items || (items.delete(item), items.size > 0)) return;
7295
+ let dir = this.path;
7296
+ try {
7297
+ await readdir(dir);
7298
+ } catch (err) {
7299
+ this._removeWatcher && this._removeWatcher(external_node_path_dirname(dir), external_node_path_basename(dir));
7300
+ }
7301
+ }
7302
+ has(item) {
7303
+ let { items } = this;
7304
+ if (items) return items.has(item);
7305
+ }
7306
+ getChildren() {
7307
+ let { items } = this;
7308
+ return items ? [
7309
+ ...items.values()
7310
+ ] : [];
7311
+ }
7312
+ dispose() {
7313
+ this.items.clear(), this.path = '', this._removeWatcher = EMPTY_FN, this.items = EMPTY_SET, Object.freeze(this);
7314
+ }
7315
+ }
7316
+ class WatchHelper {
7317
+ fsw;
7318
+ path;
7319
+ watchPath;
7320
+ fullWatchPath;
7321
+ dirParts;
7322
+ followSymlinks;
7323
+ statMethod;
7324
+ constructor(path, follow, fsw){
7325
+ this.fsw = fsw;
7326
+ let watchPath = path;
7327
+ this.path = path = path.replace(REPLACER_RE, ''), this.watchPath = watchPath, this.fullWatchPath = external_node_path_resolve(watchPath), this.dirParts = [], this.dirParts.forEach((parts)=>{
7328
+ parts.length > 1 && parts.pop();
7329
+ }), this.followSymlinks = follow, this.statMethod = follow ? 'stat' : 'lstat';
7330
+ }
7331
+ entryPath(entry) {
7332
+ return join(this.watchPath, external_node_path_relative(this.watchPath, entry.fullPath));
7333
+ }
7334
+ filterPath(entry) {
7335
+ let { stats } = entry;
7336
+ if (stats && stats.isSymbolicLink()) return this.filterDir(entry);
7337
+ let resolvedPath = this.entryPath(entry);
7338
+ return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
7339
+ }
7340
+ filterDir(entry) {
7341
+ return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
7342
+ }
7343
+ }
7344
+ class FSWatcher extends EventEmitter {
7345
+ closed;
7346
+ options;
7347
+ _closers;
7348
+ _ignoredPaths;
7349
+ _throttled;
7350
+ _streams;
7351
+ _symlinkPaths;
7352
+ _watched;
7353
+ _pendingWrites;
7354
+ _pendingUnlinks;
7355
+ _readyCount;
7356
+ _emitReady;
7357
+ _closePromise;
7358
+ _userIgnored;
7359
+ _readyEmitted;
7360
+ _emitRaw;
7361
+ _boundRemove;
7362
+ _nodeFsHandler;
7363
+ constructor(_opts = {}){
7364
+ super(), this.closed = !1, this._closers = new Map(), this._ignoredPaths = new Set(), this._throttled = new Map(), this._streams = new Set(), this._symlinkPaths = new Map(), this._watched = new Map(), this._pendingWrites = new Map(), this._pendingUnlinks = new Map(), this._readyCount = 0, this._readyEmitted = !1;
7365
+ let awf = _opts.awaitWriteFinish, DEF_AWF = {
7366
+ stabilityThreshold: 2000,
7367
+ pollInterval: 100
7368
+ }, opts = {
7369
+ persistent: !0,
7370
+ ignoreInitial: !1,
7371
+ ignorePermissionErrors: !1,
7372
+ interval: 100,
7373
+ binaryInterval: 300,
7374
+ followSymlinks: !0,
7375
+ usePolling: !1,
7376
+ atomic: !0,
7377
+ ..._opts,
7378
+ ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]),
7379
+ awaitWriteFinish: !0 === awf ? DEF_AWF : 'object' == typeof awf && {
7380
+ ...DEF_AWF,
7381
+ ...awf
7382
+ }
7383
+ };
7384
+ isIBMi && (opts.usePolling = !0), void 0 === opts.atomic && (opts.atomic = !opts.usePolling);
7385
+ let envPoll = process.env.CHOKIDAR_USEPOLLING;
7386
+ if (void 0 !== envPoll) {
7387
+ let envLower = envPoll.toLowerCase();
7388
+ 'false' === envLower || '0' === envLower ? opts.usePolling = !1 : 'true' === envLower || '1' === envLower ? opts.usePolling = !0 : opts.usePolling = !!envLower;
7389
+ }
7390
+ let envInterval = process.env.CHOKIDAR_INTERVAL;
7391
+ envInterval && (opts.interval = Number.parseInt(envInterval, 10));
7392
+ let readyCalls = 0;
7393
+ this._emitReady = ()=>{
7394
+ ++readyCalls >= this._readyCount && (this._emitReady = EMPTY_FN, this._readyEmitted = !0, process.nextTick(()=>this.emit(EVENTS_READY)));
7395
+ }, this._emitRaw = (...args)=>this.emit(EVENTS_RAW, ...args), this._boundRemove = this._remove.bind(this), this.options = opts, this._nodeFsHandler = new NodeFsHandler(this), Object.freeze(opts);
7396
+ }
7397
+ _addIgnoredPath(matcher) {
7398
+ if (isMatcherObject(matcher)) {
7399
+ for (let ignored of this._ignoredPaths)if (isMatcherObject(ignored) && ignored.path === matcher.path && ignored.recursive === matcher.recursive) return;
7400
+ }
7401
+ this._ignoredPaths.add(matcher);
7402
+ }
7403
+ _removeIgnoredPath(matcher) {
7404
+ if (this._ignoredPaths.delete(matcher), 'string' == typeof matcher) for (let ignored of this._ignoredPaths)isMatcherObject(ignored) && ignored.path === matcher && this._ignoredPaths.delete(ignored);
7405
+ }
7406
+ add(paths_, _origAdd, _internal) {
7407
+ let { cwd } = this.options;
7408
+ this.closed = !1, this._closePromise = void 0;
7409
+ let paths = unifyPaths(paths_);
7410
+ return cwd && (paths = paths.map((path)=>isAbsolute(path) ? path : join(cwd, path))), paths.forEach((path)=>{
7411
+ this._removeIgnoredPath(path);
7412
+ }), this._userIgnored = void 0, this._readyCount || (this._readyCount = 0), this._readyCount += paths.length, Promise.all(paths.map(async (path)=>{
7413
+ let res = await this._nodeFsHandler._addToNodeFs(path, !_internal, void 0, 0, _origAdd);
7414
+ return res && this._emitReady(), res;
7415
+ })).then((results)=>{
7416
+ this.closed || results.forEach((item)=>{
7417
+ item && this.add(external_node_path_dirname(item), external_node_path_basename(_origAdd || item));
7418
+ });
7419
+ }), this;
7420
+ }
7421
+ unwatch(paths_) {
7422
+ if (this.closed) return this;
7423
+ let paths = unifyPaths(paths_), { cwd } = this.options;
7424
+ return paths.forEach((path)=>{
7425
+ isAbsolute(path) || this._closers.has(path) || (cwd && (path = join(cwd, path)), path = external_node_path_resolve(path)), this._closePath(path), this._addIgnoredPath(path), this._watched.has(path) && this._addIgnoredPath({
7426
+ path,
7427
+ recursive: !0
7428
+ }), this._userIgnored = void 0;
7429
+ }), this;
7430
+ }
7431
+ close() {
7432
+ if (this._closePromise) return this._closePromise;
7433
+ this.closed = !0, this.removeAllListeners();
7434
+ let closers = [];
7435
+ return this._closers.forEach((closerList)=>closerList.forEach((closer)=>{
7436
+ let promise = closer();
7437
+ promise instanceof Promise && closers.push(promise);
7438
+ })), this._streams.forEach((stream)=>stream.destroy()), this._userIgnored = void 0, this._readyCount = 0, this._readyEmitted = !1, this._watched.forEach((dirent)=>dirent.dispose()), this._closers.clear(), this._watched.clear(), this._streams.clear(), this._symlinkPaths.clear(), this._throttled.clear(), this._closePromise = closers.length ? Promise.all(closers).then(()=>void 0) : Promise.resolve(), this._closePromise;
7439
+ }
7440
+ getWatched() {
7441
+ let watchList = {};
7442
+ return this._watched.forEach((entry, dir)=>{
7443
+ watchList[(this.options.cwd ? external_node_path_relative(this.options.cwd, dir) : dir) || '.'] = entry.getChildren().sort();
7444
+ }), watchList;
7445
+ }
7446
+ emitWithAll(event, args) {
7447
+ this.emit(event, ...args), event !== EVENTS_ERROR && this.emit(EVENTS_ALL, event, ...args);
7448
+ }
7449
+ async _emit(event, path, stats) {
7450
+ let pw;
7451
+ if (this.closed) return;
7452
+ let opts = this.options;
7453
+ isWindows && (path = normalize(path)), opts.cwd && (path = external_node_path_relative(opts.cwd, path));
7454
+ let args = [
7455
+ path
7456
+ ];
7457
+ null != stats && args.push(stats);
7458
+ let awf = opts.awaitWriteFinish;
7459
+ if (awf && (pw = this._pendingWrites.get(path))) return pw.lastChange = new Date(), this;
7460
+ if (opts.atomic) {
7461
+ if (event === EVENTS_UNLINK) return this._pendingUnlinks.set(path, [
7462
+ event,
7463
+ ...args
7464
+ ]), setTimeout(()=>{
7465
+ this._pendingUnlinks.forEach((entry, path)=>{
7466
+ this.emit(...entry), this.emit(EVENTS_ALL, ...entry), this._pendingUnlinks.delete(path);
7467
+ });
7468
+ }, 'number' == typeof opts.atomic ? opts.atomic : 100), this;
7469
+ event === EVENTS_ADD && this._pendingUnlinks.has(path) && (event = EVENTS_CHANGE, this._pendingUnlinks.delete(path));
7470
+ }
7471
+ if (awf && (event === EVENTS_ADD || event === EVENTS_CHANGE) && this._readyEmitted) {
7472
+ let awfEmit = (err, stats)=>{
7473
+ err ? (event = EVENTS_ERROR, args[0] = err, this.emitWithAll(event, args)) : stats && (args.length > 1 ? args[1] = stats : args.push(stats), this.emitWithAll(event, args));
7474
+ };
7475
+ return this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit), this;
7476
+ }
7477
+ if (event === EVENTS_CHANGE && !this._throttle(EVENTS_CHANGE, path, 50)) return this;
7478
+ if (opts.alwaysStat && void 0 === stats && (event === EVENTS_ADD || event === EVENTS_ADD_DIR || event === EVENTS_CHANGE)) {
7479
+ let stats, fullPath = opts.cwd ? join(opts.cwd, path) : path;
7480
+ try {
7481
+ stats = await promises_stat(fullPath);
7482
+ } catch (err) {}
7483
+ if (!stats || this.closed) return;
7484
+ args.push(stats);
7485
+ }
7486
+ return this.emitWithAll(event, args), this;
7487
+ }
7488
+ _handleError(error) {
7489
+ let code = error && error.code;
7490
+ return error && 'ENOENT' !== code && 'ENOTDIR' !== code && (!this.options.ignorePermissionErrors || 'EPERM' !== code && 'EACCES' !== code) && this.emit(EVENTS_ERROR, error), error || this.closed;
7491
+ }
7492
+ _throttle(actionType, path, timeout) {
7493
+ let timeoutObject;
7494
+ this._throttled.has(actionType) || this._throttled.set(actionType, new Map());
7495
+ let action = this._throttled.get(actionType);
7496
+ if (!action) throw Error('invalid throttle');
7497
+ let actionPath = action.get(path);
7498
+ if (actionPath) return actionPath.count++, !1;
7499
+ let clear = ()=>{
7500
+ let item = action.get(path), count = item ? item.count : 0;
7501
+ return action.delete(path), clearTimeout(timeoutObject), item && clearTimeout(item.timeoutObject), count;
7502
+ }, thr = {
7503
+ timeoutObject: timeoutObject = setTimeout(clear, timeout),
7504
+ clear,
7505
+ count: 0
7506
+ };
7507
+ return action.set(path, thr), thr;
7508
+ }
7509
+ _incrReadyCount() {
7510
+ return this._readyCount++;
7511
+ }
7512
+ _awaitWriteFinish(path, threshold, event, awfEmit) {
7513
+ let timeoutHandler, awf = this.options.awaitWriteFinish;
7514
+ if ('object' != typeof awf) return;
7515
+ let pollInterval = awf.pollInterval, fullPath = path;
7516
+ this.options.cwd && !isAbsolute(path) && (fullPath = join(this.options.cwd, path));
7517
+ let now = new Date(), writes = this._pendingWrites;
7518
+ writes.has(path) || (writes.set(path, {
7519
+ lastChange: now,
7520
+ cancelWait: ()=>(writes.delete(path), clearTimeout(timeoutHandler), event)
7521
+ }), timeoutHandler = setTimeout(function awaitWriteFinishFn(prevStat) {
7522
+ external_node_fs_stat(fullPath, (err, curStat)=>{
7523
+ if (err || !writes.has(path)) {
7524
+ err && 'ENOENT' !== err.code && awfEmit(err);
7525
+ return;
7526
+ }
7527
+ let now = Number(new Date());
7528
+ prevStat && curStat.size !== prevStat.size && (writes.get(path).lastChange = now), now - writes.get(path).lastChange >= threshold ? (writes.delete(path), awfEmit(void 0, curStat)) : timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
7529
+ });
7530
+ }, pollInterval));
7531
+ }
7532
+ _isIgnored(path, stats) {
7533
+ if (this.options.atomic && DOT_RE.test(path)) return !0;
7534
+ if (!this._userIgnored) {
7535
+ let { cwd } = this.options, ignored = (this.options.ignored || []).map(normalizeIgnored(cwd)), list = [
7536
+ ...[
7537
+ ...this._ignoredPaths
7538
+ ].map(normalizeIgnored(cwd)),
7539
+ ...ignored
7540
+ ];
7541
+ this._userIgnored = function(matchers, testString) {
7542
+ if (null == matchers) throw TypeError('anymatch: specify first argument');
7543
+ let patterns = arrify(matchers).map((matcher)=>'function' == typeof matcher ? matcher : 'string' == typeof matcher ? (string)=>matcher === string : matcher instanceof RegExp ? (string)=>matcher.test(string) : 'object' == typeof matcher && null !== matcher ? (string)=>{
7544
+ if (matcher.path === string) return !0;
7545
+ if (matcher.recursive) {
7546
+ let relative = external_node_path_relative(matcher.path, string);
7547
+ return !!relative && !relative.startsWith('..') && !isAbsolute(relative);
7548
+ }
7549
+ return !1;
7550
+ } : ()=>!1);
7551
+ return null == testString ? (testString, stats)=>chokidar_matchPatterns(patterns, testString, stats) : chokidar_matchPatterns(patterns, testString);
7552
+ }(list, void 0);
7553
+ }
7554
+ return this._userIgnored(path, stats);
7555
+ }
7556
+ _isntIgnored(path, stat) {
7557
+ return !this._isIgnored(path, stat);
7558
+ }
7559
+ _getWatchHelpers(path) {
7560
+ return new WatchHelper(path, this.options.followSymlinks, this);
7561
+ }
7562
+ _getWatchedDir(directory) {
7563
+ let dir = external_node_path_resolve(directory);
7564
+ return this._watched.has(dir) || this._watched.set(dir, new DirEntry(dir, this._boundRemove)), this._watched.get(dir);
7565
+ }
7566
+ _hasReadPermissions(stats) {
7567
+ return !!this.options.ignorePermissionErrors || !!(256 & Number(stats.mode));
7568
+ }
7569
+ _remove(directory, item, isDirectory) {
7570
+ let path = join(directory, item), fullPath = external_node_path_resolve(path);
7571
+ if (isDirectory = null != isDirectory ? isDirectory : this._watched.has(path) || this._watched.has(fullPath), !this._throttle('remove', path, 100)) return;
7572
+ isDirectory || 1 !== this._watched.size || this.add(directory, item, !0), this._getWatchedDir(path).getChildren().forEach((nested)=>this._remove(path, nested));
7573
+ let parent = this._getWatchedDir(directory), wasTracked = parent.has(item);
7574
+ parent.remove(item), this._symlinkPaths.has(fullPath) && this._symlinkPaths.delete(fullPath);
7575
+ let relPath = path;
7576
+ if (this.options.cwd && (relPath = external_node_path_relative(this.options.cwd, path)), this.options.awaitWriteFinish && this._pendingWrites.has(relPath) && this._pendingWrites.get(relPath).cancelWait() === EVENTS_ADD) return;
7577
+ this._watched.delete(path), this._watched.delete(fullPath);
7578
+ let eventName = isDirectory ? EVENTS_UNLINK_DIR : EVENTS_UNLINK;
7579
+ wasTracked && !this._isIgnored(path) && this._emit(eventName, path), this._closePath(path);
7580
+ }
7581
+ _closePath(path) {
7582
+ this._closeFile(path);
7583
+ let dir = external_node_path_dirname(path);
7584
+ this._getWatchedDir(dir).remove(external_node_path_basename(path));
7585
+ }
7586
+ _closeFile(path) {
7587
+ let closers = this._closers.get(path);
7588
+ closers && (closers.forEach((closer)=>closer()), this._closers.delete(path));
7589
+ }
7590
+ _addPathCloser(path, closer) {
7591
+ if (!closer) return;
7592
+ let list = this._closers.get(path);
7593
+ list || (list = [], this._closers.set(path, list)), list.push(closer);
7594
+ }
7595
+ _readdirp(root, opts) {
7596
+ if (this.closed) return;
7597
+ let stream = function(root, options = {}) {
7598
+ let type = options.entryType || options.type;
7599
+ if ('both' === type && (type = EntryTypes_FILE_DIR_TYPE), type && (options.type = type), root) {
7600
+ if ('string' != typeof root) throw TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');
7601
+ else if (type && !ALL_TYPES.includes(type)) throw Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
7602
+ } else throw Error('readdirp: root argument is required. Usage: readdirp(root, options)');
7603
+ return options.root = root, new ReaddirpStream(options);
7604
+ }(root, {
7605
+ type: EVENTS_ALL,
7606
+ alwaysStat: !0,
7607
+ lstat: !0,
7608
+ ...opts,
7609
+ depth: 0
7610
+ });
7611
+ return this._streams.add(stream), stream.once('close', ()=>{
7612
+ stream = void 0;
7613
+ }), stream.once('end', ()=>{
7614
+ stream && (this._streams.delete(stream), stream = void 0);
7615
+ }), stream;
7616
+ }
7617
+ }
7618
+ let chokidar_watch = function(paths, options = {}) {
7619
+ let watcher = new FSWatcher(options);
7620
+ return watcher.add(paths), watcher;
7621
+ }, GLOB_REGEX = /[*?{}[\]()!@+|]/;
3782
7622
  async function createChokidar(pathOrGlobs, root = process.cwd(), options) {
3783
7623
  let watchFiles = new Set(), globPatterns = pathOrGlobs.filter((pathOrGlob)=>!!GLOB_REGEX.test(pathOrGlob) || (watchFiles.add(pathOrGlob), !1));
3784
- if (globPatterns.length) for (let file of (await external_tinyglobby_glob(globPatterns, {
7624
+ if (globPatterns.length) for (let file of (await dist_glob(globPatterns, {
3785
7625
  cwd: root,
3786
7626
  absolute: !0
3787
7627
  })))watchFiles.add(file);
3788
- return chokidar.watch(Array.from(watchFiles), {
7628
+ return chokidar_watch(Array.from(watchFiles), {
3789
7629
  ignoreInitial: !0,
3790
7630
  ignorePermissionErrors: !0,
3791
7631
  ...options
@@ -3878,7 +7718,7 @@ async function setupUnpack(cliOptions, command) {
3878
7718
  };
3879
7719
  }
3880
7720
  function runCLI() {
3881
- let cli = cac('unpack');
7721
+ let cli = ((name = "")=>new CAC(name))('unpack');
3882
7722
  cli.option('-c, --config <file>', 'Use specified config file').option('-r, --root <dir>', 'Specify root directory').option('-d, --debug', 'Show debug logs');
3883
7723
  let devCommand = cli.command('', 'Start dev server').alias('dev'), buildCommand = cli.command('build', 'Build for production'), cleanCommand = cli.command('clean', 'Clean cache directory');
3884
7724
  buildCommand.option('-w, --watch', 'Rebuilds when modules have changed on disk').option('--analyze', 'Analyze the size of output files').action(withErrorHandling(async (options)=>{
@@ -3917,8 +7757,8 @@ function runCLI() {
3917
7757
  logger_logger.clear(), logger_logger.info(`${node_path.basename(file)} changed, restarting server...`), await watcher.close(), await cleanUpBeforeRestart(), startServer(options);
3918
7758
  });
3919
7759
  });
3920
- devCommand.option('-o, --open [url]', 'Open browser on startup').option('--port <port>', 'Specify port').option('--host', 'Expose hostname').action(startServer), cli.help(), cli.version("4.7.1"), cli.parse();
7760
+ devCommand.option('-o, --open [url]', 'Open browser on startup').option('--port <port>', 'Specify port').option('--host', 'Expose hostname').action(startServer), cli.help(), cli.version("4.7.3"), cli.parse();
3921
7761
  }
3922
7762
  let launch_editor = __webpack_require__("../../node_modules/.pnpm/launch-editor@2.13.1/node_modules/launch-editor/index.js");
3923
7763
  var launch_editor_default_0 = __webpack_require__.n(launch_editor)(), src_CSS_MODULES_NAMED_EXPORT = !1;
3924
- export { ALL_INTERFACES_IPV4, CSS_MODULES_EXPORTS_CONVENTION, CSS_MODULES_LOCAL_IDENT_NAME, CSS_REGEX, DEV_DEFAULT_FILENAME, JSX_REGEX, JS_REGEX, LESS_REGEX, LOCALHOST, NODE_MODULES_REGEX, PROD_DEFAULT_FILENAME, SASS_REGEX, SCRIPT_REGEX, TEMPLATE_CONTENT, addRestartCleaner, applyHtmlTagDescriptors, cleanUpBeforeRestart, clearLine, colors, convertBasicAnsiColors, createChokidar, createUnpack, debounce, defineConfig, dist_default_0 as mergeConfig, emptyDir, ensureDir, esVersionToBrowserslist, external_tinyglobby_glob as glob, findExists, getAddressUrls, getCompiledPkgPath, getCurrentUnpackConfig, getDevServerPort, getFilesContentHash, getHtmlTemplateOrContent, getIpv4Interfaces, getNodeEnv, getOrSetDefault, getPathInJs, getPort, getTime, getUnpackStartTime, getUserDepPath, getUserDepVersion, globSync, isBoolean, isDebug, isDev, isEmptyDir, isFileExists, isFileSync, isFunction, isNodeVersionAtLeast, isObject, isPlainObject, isRegExp, isString, isUndefined, isWin, launch_editor_default_0 as launchEditor, loadConfig, loadConfigFromFile, logUpdate, logger_LogColor as LogColor, logger_logger as logger, normalizePublicPath, openBrowser, pLimit, pathExists, pathToExportIdentifier, prettyTime, printServerUrls, removeDir, renderHtmlTagDescriptor, resolveConfigPath, rspack, runCLI, set, setCurrentUnpackConfig, setDevServer, setDevServerPort, setNodeEnv, setUnpackStartTime, src_CSS_MODULES_NAMED_EXPORT as CSS_MODULES_NAMED_EXPORT, trackPerformance, utils_isDevServer as isDevServer, utils_isProd as isProd };
7764
+ export { ALL_INTERFACES_IPV4, CSS_MODULES_EXPORTS_CONVENTION, CSS_MODULES_LOCAL_IDENT_NAME, CSS_MODULES_RESOURCE_QUERY_REGEX, CSS_REGEX, DEV_DEFAULT_FILENAME, JSX_REGEX, JS_REGEX, LESS_REGEX, LOCALHOST, NODE_MODULES_REGEX, PROD_DEFAULT_FILENAME, SASS_REGEX, SCRIPT_REGEX, TEMPLATE_CONTENT, addRestartCleaner, applyHtmlTagDescriptors, cleanUpBeforeRestart, clearLine, colors, convertBasicAnsiColors, createChokidar, createUnpack, debounce, defineConfig, dist_default_0 as mergeConfig, dist_glob as glob, emptyDir, ensureDir, esVersionToBrowserslist, findExists, getAddressUrls, getCompiledPkgPath, getCurrentUnpackConfig, getDevServerPort, getFilesContentHash, getHtmlTemplateOrContent, getIpv4Interfaces, getNodeEnv, getOrSetDefault, getPathInJs, getPort, getTime, getUnpackStartTime, getUserDepPath, getUserDepVersion, globSync, isBoolean, isDebug, isDev, isEmptyDir, isFileSync, isFunction, isNodeVersionAtLeast, isObject, isPlainObject, isRegExp, isUndefined, launch_editor_default_0 as launchEditor, loadConfig, loadConfigFromFile, logUpdate, logger_LogColor as LogColor, logger_logger as logger, normalizePublicPath, openBrowser, pLimit, pathToExportIdentifier, prettyTime, printServerUrls, removeDir, renderHtmlTagDescriptor, resolveConfigPath, rspack, runCLI, setCurrentUnpackConfig, setDevServer, setDevServerPort, setNodeEnv, setUnpackStartTime, src_CSS_MODULES_NAMED_EXPORT as CSS_MODULES_NAMED_EXPORT, trackPerformance, utils_isDevServer as isDevServer, utils_isProd as isProd, utils_isString as isString, utils_isWin as isWin, utils_set as set };