@voidzero-dev/vite-plus-core 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/rolldown/cli.mjs +6 -6
  2. package/dist/rolldown/config.d.mts +1 -1
  3. package/dist/rolldown/config.mjs +2 -2
  4. package/dist/rolldown/experimental-index.d.mts +5 -5
  5. package/dist/rolldown/experimental-index.mjs +11 -9
  6. package/dist/rolldown/filter-index.d.mts +1 -1
  7. package/dist/rolldown/index.d.mts +2 -2
  8. package/dist/rolldown/index.mjs +4 -4
  9. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  10. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  11. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  12. package/dist/rolldown/parse-ast-index.mjs +1 -1
  13. package/dist/rolldown/plugins-index.d.mts +3 -3
  14. package/dist/rolldown/plugins-index.mjs +2 -2
  15. package/dist/rolldown/shared/{binding-CVtkJvyl.d.mts → binding-Bvw14S3g.d.mts} +70 -1
  16. package/dist/rolldown/shared/{binding-CKyeQZen.mjs → binding-C__LJDBG.mjs} +29 -27
  17. package/dist/rolldown/shared/{bindingify-input-options-44iPAymO.mjs → bindingify-input-options-V9YvAjrr.mjs} +5 -5
  18. package/dist/rolldown/shared/{constructors-XaIbWpwJ.d.mts → constructors-CRumnw21.d.mts} +2 -2
  19. package/dist/rolldown/shared/{constructors-6Zc-JFd7.mjs → constructors-DklcHr18.mjs} +1 -1
  20. package/dist/rolldown/shared/{create-bundler-option-e1FU0w0P.mjs → create-bundler-option-DbV2ud0B.mjs} +5 -4
  21. package/dist/rolldown/shared/{define-config-DVsXPNaU.d.mts → define-config-DwTNhgWB.d.mts} +12 -6
  22. package/dist/rolldown/shared/{error-BzLGqhSQ.mjs → error-NcRuXAVN.mjs} +1 -1
  23. package/dist/rolldown/shared/{load-config-C6QXSnoS.mjs → load-config-Dd7jKGUy.mjs} +1 -1
  24. package/dist/rolldown/shared/{normalize-string-or-regex-DYjJ67tj.mjs → normalize-string-or-regex-CFtim40S.mjs} +1 -1
  25. package/dist/rolldown/shared/{parse-uDDyc1el.mjs → parse-rvxTD36n.mjs} +2 -2
  26. package/dist/rolldown/shared/{resolve-tsconfig-Bcd82vVT.mjs → resolve-tsconfig-D2vSIIkR.mjs} +2 -2
  27. package/dist/rolldown/shared/{rolldown-CCbQNGZt.mjs → rolldown-Bblizyw1.mjs} +4 -4
  28. package/dist/rolldown/shared/{transform-WmU_cI8e.d.mts → transform--WSMLt1x.d.mts} +1 -1
  29. package/dist/rolldown/shared/{watch-vuOCmvFs.mjs → watch-DPvOlccK.mjs} +4 -4
  30. package/dist/rolldown/utils-index.d.mts +3 -3
  31. package/dist/rolldown/utils-index.mjs +5 -5
  32. package/dist/tsdown/{build-D_enfyvD-Dg1eKRD4.js → build-D_enfyvD-tOzhITac.js} +1065 -13
  33. package/dist/tsdown/{debug-CKcBYQLP-C3NhYhrk.js → debug-CKcBYQLP-By_AQqN8.js} +3 -3
  34. package/dist/tsdown/{detect-DGhJGEqb-6CTf16BW.js → detect-DGhJGEqb-LL52mV6u.js} +1 -1
  35. package/dist/tsdown/{dist-DyXLnzyh.js → dist-BsS7BOcb.js} +5 -5
  36. package/dist/tsdown/index-types.d.ts +4 -4
  37. package/dist/tsdown/index.js +4 -4
  38. package/dist/tsdown/internal-DSmmwu4u.js +3 -0
  39. package/dist/tsdown/{main-DiierkER.js → main-Bcv7jU2b.js} +1 -1
  40. package/dist/tsdown/{resolver-cwLsPb2o-Dk4xdAGE.js → resolver-cwLsPb2o-Bb9SDBm6.js} +2 -2
  41. package/dist/tsdown/run.js +4 -4
  42. package/dist/tsdown/{src-drVPfX63.js → src-JVSpR8xt.js} +5 -5
  43. package/dist/tsdown/{target-Bab3CUeB-DQ0pKhCv.js → target-Bab3CUeB-8PBzMh3p.js} +3 -3
  44. package/dist/tsdown/{tsc-JnMl2z7d.js → tsc-B8FD48Oc.js} +3 -3
  45. package/dist/tsdown/tsdown-css.js +5 -5
  46. package/dist/tsdown/tsdown-exe.js +3 -3
  47. package/dist/vite/client/bundledDevClient.mjs +67 -17
  48. package/dist/vite/client/client.mjs +4 -4
  49. package/dist/vite/node/chunks/build.js +19 -19
  50. package/dist/vite/node/chunks/node.js +117 -83
  51. package/dist/vite/node/chunks/postcss-import.js +13 -16
  52. package/dist/vite/node/index.d.ts +58 -55
  53. package/dist/vite/node/module-runner.d.ts +13 -13
  54. package/dist/vite/node/module-runner.js +1 -2
  55. package/package.json +24 -24
  56. package/dist/tsdown/dist-CMKwGGNp.js +0 -1059
  57. package/dist/tsdown/internal-DKworeK4.js +0 -3
@@ -1,7 +1,6 @@
1
- import { A as __toESM, C as resolveComma, D as __commonJSMin, E as toArray, O as __exportAll$1, S as pkgExists, T as slash, _ as createConcurrencyExecutor, b as matchPattern, c as blue, d as green, g as yellow, h as underline, l as bold, n as x, r as createDebug, t as exec, u as dim, v as debounce, w as resolveRegex, x as noop, y as importWithError } from "./main-DiierkER.js";
2
- import { a as createSuppressWarnings, c as globalLogger, i as createLogger, l as prettyFormat, n as version, o as generateColor, r as LogLevels, s as getNameLabel } from "./debug-CKcBYQLP-C3NhYhrk.js";
3
- import { A as fsStat, D as fsCopy, E as formatBytes, M as stripExtname, O as fsExists, S as filename_js_to_dts, a as resolveTarget, d as satisfies, g as RE_JS, j as lowestCommonAncestor, k as fsRemove, m as RE_DTS, o as validateSea, p as RE_CSS, r as buildExe, s as coerce, u as parseRange, v as RE_NODE_MODULES$1 } from "./target-Bab3CUeB-DQ0pKhCv.js";
4
- import { n as ee } from "./dist-CMKwGGNp.js";
1
+ import { A as __toESM, C as resolveComma, D as __commonJSMin, E as toArray, O as __exportAll$1, S as pkgExists, T as slash, _ as createConcurrencyExecutor, b as matchPattern, c as blue, d as green, g as yellow, h as underline, l as bold, n as x$1, r as createDebug, t as exec, u as dim, v as debounce, w as resolveRegex, x as noop, y as importWithError } from "./main-Bcv7jU2b.js";
2
+ import { a as createSuppressWarnings, c as globalLogger, i as createLogger, l as prettyFormat, n as version, o as generateColor, r as LogLevels, s as getNameLabel } from "./debug-CKcBYQLP-By_AQqN8.js";
3
+ import { A as fsStat, D as fsCopy, E as formatBytes, M as stripExtname, O as fsExists, S as filename_js_to_dts, a as resolveTarget, d as satisfies, g as RE_JS, j as lowestCommonAncestor, k as fsRemove, m as RE_DTS, o as validateSea, p as RE_CSS, r as buildExe, s as coerce, u as parseRange, v as RE_NODE_MODULES$1 } from "./target-Bab3CUeB-8PBzMh3p.js";
5
4
  import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
6
5
  import process$1 from "node:process";
7
6
  import readline from "node:readline";
@@ -12,8 +11,9 @@ import { VERSION, build, watch } from "@voidzero-dev/vite-plus-core/rolldown";
12
11
  import { chmod, mkdtemp, readFile, readdir, writeFile } from "node:fs/promises";
13
12
  import { and, id, importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
14
13
  import * as nativeFs from "fs";
15
- import { readdir as readdir$1, readdirSync, realpath, realpathSync, stat as stat$1, statSync as statSync$1 } from "fs";
16
- import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative, resolve as resolve$1, sep } from "path";
14
+ import Ue, { readdir as readdir$1, readdirSync, realpath, realpathSync, stat as stat$1, statSync as statSync$1 } from "fs";
15
+ import Ie from "os";
16
+ import Se, { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative, resolve as resolve$1, sep } from "path";
17
17
  import { Visitor, parse as parse$1 } from "@voidzero-dev/vite-plus-core/rolldown/utils";
18
18
  import { tmpdir } from "node:os";
19
19
  import { fileURLToPath } from "url";
@@ -23,7 +23,1059 @@ import { AsyncLocalStorage } from "node:async_hooks";
23
23
  import { Buffer } from "node:buffer";
24
24
  import { brotliCompress, gzip } from "node:zlib";
25
25
  import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
26
- //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_8361ec2a4d03114085b1954a2fc42e35/node_modules/tsdown/dist/deps-B_uZzM4C.mjs
26
+ //#region ../../node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.mjs
27
+ const A = (r) => r !== null && typeof r == "object";
28
+ const a = (r, t) => Object.assign(/* @__PURE__ */ new Error(`[${r}]: ${t}`), { code: r });
29
+ const _$1 = "ERR_INVALID_PACKAGE_CONFIG";
30
+ const E = "ERR_INVALID_PACKAGE_TARGET";
31
+ const I$1 = "ERR_PACKAGE_PATH_NOT_EXPORTED";
32
+ const R$1 = /^\d+$/;
33
+ const O = /^(\.{1,2}|node_modules)$/i;
34
+ const w = /\/|\\/;
35
+ var h = ((r) => (r.Export = "exports", r.Import = "imports", r))(h || {});
36
+ const f = (r, t, e, o, c) => {
37
+ if (t == null) return [];
38
+ if (typeof t == "string") {
39
+ const [n, ...i] = t.split(w);
40
+ if (n === ".." || i.some((l) => O.test(l))) throw a(E, `Invalid "${r}" target "${t}" defined in the package config`);
41
+ return [c ? t.replace(/\*/g, c) : t];
42
+ }
43
+ if (Array.isArray(t)) return t.flatMap((n) => f(r, n, e, o, c));
44
+ if (A(t)) {
45
+ for (const n of Object.keys(t)) {
46
+ if (R$1.test(n)) throw a(_$1, "Cannot contain numeric property keys");
47
+ if (n === "default" || o.includes(n)) return f(r, t[n], e, o, c);
48
+ }
49
+ return [];
50
+ }
51
+ throw a(E, `Invalid "${r}" target "${t}"`);
52
+ };
53
+ const s = "*";
54
+ const m = (r, t) => {
55
+ const e = r.indexOf(s), o = t.indexOf(s);
56
+ return e === o ? t.length > r.length : o > e;
57
+ };
58
+ function d(r, t) {
59
+ if (!t.includes(s) && r.hasOwnProperty(t)) return [t];
60
+ let e, o;
61
+ for (const c of Object.keys(r)) if (c.includes(s)) {
62
+ const [n, i, l] = c.split(s);
63
+ if (l === void 0 && t.startsWith(n) && t.endsWith(i)) {
64
+ const g = t.slice(n.length, -i.length || void 0);
65
+ g && (!e || m(e, c)) && (e = c, o = g);
66
+ }
67
+ }
68
+ return [e, o];
69
+ }
70
+ const p = (r) => Object.keys(r).reduce((t, e) => {
71
+ const o = e === "" || e[0] !== ".";
72
+ if (t === void 0 || t === o) return o;
73
+ throw a(_$1, "\"exports\" cannot contain some keys starting with \".\" and some not");
74
+ }, void 0);
75
+ const u = /^\w+:/;
76
+ const v = (r, t, e) => {
77
+ if (!r) throw new Error("\"exports\" is required");
78
+ t = t === "" ? "." : `./${t}`, (typeof r == "string" || Array.isArray(r) || A(r) && p(r)) && (r = { ".": r });
79
+ const [o, c] = d(r, t), n = f(h.Export, r[o], t, e, c);
80
+ if (n.length === 0) throw a(I$1, t === "." ? "No \"exports\" main defined" : `Package subpath '${t}' is not defined by "exports"`);
81
+ for (const i of n) if (!i.startsWith("./") && !u.test(i)) throw a(E, `Invalid "exports" target "${i}" defined in the package config`);
82
+ return n;
83
+ };
84
+ //#endregion
85
+ //#region ../../node_modules/.pnpm/get-tsconfig@5.0.0-beta.5/node_modules/get-tsconfig/dist/index.mjs
86
+ var Le = Object.defineProperty;
87
+ var i = (e, n) => Le(e, "name", {
88
+ value: n,
89
+ configurable: !0
90
+ });
91
+ function x(e) {
92
+ return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
93
+ }
94
+ i(x, "slash");
95
+ const _e = i((e, n) => {
96
+ const s = `readFileSync:${n}`;
97
+ let t = e?.get(s);
98
+ return t === void 0 && (t = re.readFileSync(n, "utf8"), e?.set(s, t)), t;
99
+ }, "readFile");
100
+ const F = i((e, n) => {
101
+ const s = `tryStat:${n}`;
102
+ let t = e?.get(s);
103
+ if (t === void 0) {
104
+ try {
105
+ t = re.statSync(n);
106
+ } catch {
107
+ t = null;
108
+ }
109
+ e?.set(s, t);
110
+ }
111
+ return t ?? void 0;
112
+ }, "tryStat");
113
+ const R = i((e, n, s) => {
114
+ for (;;) {
115
+ const t = path.posix.join(e, n);
116
+ if (F(s, t)) return t;
117
+ const o = path.dirname(e);
118
+ if (o === e) return;
119
+ e = o;
120
+ }
121
+ }, "findUp");
122
+ function Ne(e, n = !1) {
123
+ const s = e.length;
124
+ let t = 0, o = "", r = 0, l = 16, g = 0, m = 0, k = 0, w = 0, u = 0;
125
+ function A(f, y) {
126
+ let j = 0, v = 0;
127
+ for (; j < f;) {
128
+ let d = e.charCodeAt(t);
129
+ if (d >= 48 && d <= 57) v = v * 16 + d - 48;
130
+ else if (d >= 65 && d <= 70) v = v * 16 + d - 65 + 10;
131
+ else if (d >= 97 && d <= 102) v = v * 16 + d - 97 + 10;
132
+ else break;
133
+ t++, j++;
134
+ }
135
+ return j < f && (v = -1), v;
136
+ }
137
+ i(A, "scanHexDigits");
138
+ function O(f) {
139
+ t = f, o = "", r = 0, l = 16, u = 0;
140
+ }
141
+ i(O, "setPosition");
142
+ function h() {
143
+ let f = t;
144
+ if (e.charCodeAt(t) === 48) t++;
145
+ else for (t++; t < e.length && S(e.charCodeAt(t));) t++;
146
+ if (t < e.length && e.charCodeAt(t) === 46) if (t++, t < e.length && S(e.charCodeAt(t))) for (t++; t < e.length && S(e.charCodeAt(t));) t++;
147
+ else return u = 3, e.substring(f, t);
148
+ let y = t;
149
+ if (t < e.length && (e.charCodeAt(t) === 69 || e.charCodeAt(t) === 101)) if (t++, (t < e.length && e.charCodeAt(t) === 43 || e.charCodeAt(t) === 45) && t++, t < e.length && S(e.charCodeAt(t))) {
150
+ for (t++; t < e.length && S(e.charCodeAt(t));) t++;
151
+ y = t;
152
+ } else u = 3;
153
+ return e.substring(f, y);
154
+ }
155
+ i(h, "scanNumber");
156
+ function D() {
157
+ let f = "", y = t;
158
+ for (;;) {
159
+ if (t >= s) {
160
+ f += e.substring(y, t), u = 2;
161
+ break;
162
+ }
163
+ const j = e.charCodeAt(t);
164
+ if (j === 34) {
165
+ f += e.substring(y, t), t++;
166
+ break;
167
+ }
168
+ if (j === 92) {
169
+ if (f += e.substring(y, t), t++, t >= s) {
170
+ u = 2;
171
+ break;
172
+ }
173
+ switch (e.charCodeAt(t++)) {
174
+ case 34:
175
+ f += "\"";
176
+ break;
177
+ case 92:
178
+ f += "\\";
179
+ break;
180
+ case 47:
181
+ f += "/";
182
+ break;
183
+ case 98:
184
+ f += "\b";
185
+ break;
186
+ case 102:
187
+ f += "\f";
188
+ break;
189
+ case 110:
190
+ f += `
191
+ `;
192
+ break;
193
+ case 114:
194
+ f += "\r";
195
+ break;
196
+ case 116:
197
+ f += " ";
198
+ break;
199
+ case 117:
200
+ const d = A(4);
201
+ d >= 0 ? f += String.fromCharCode(d) : u = 4;
202
+ break;
203
+ default: u = 5;
204
+ }
205
+ y = t;
206
+ continue;
207
+ }
208
+ if (j >= 0 && j <= 31) if (P(j)) {
209
+ f += e.substring(y, t), u = 2;
210
+ break;
211
+ } else u = 6;
212
+ t++;
213
+ }
214
+ return f;
215
+ }
216
+ i(D, "scanString");
217
+ function c() {
218
+ if (o = "", u = 0, r = t, m = g, w = k, t >= s) return r = s, l = 17;
219
+ let f = e.charCodeAt(t);
220
+ if (X(f)) {
221
+ do
222
+ t++, o += String.fromCharCode(f), f = e.charCodeAt(t);
223
+ while (X(f));
224
+ return l = 15;
225
+ }
226
+ if (P(f)) return t++, o += String.fromCharCode(f), f === 13 && e.charCodeAt(t) === 10 && (t++, o += `
227
+ `), g++, k = t, l = 14;
228
+ switch (f) {
229
+ case 123: return t++, l = 1;
230
+ case 125: return t++, l = 2;
231
+ case 91: return t++, l = 3;
232
+ case 93: return t++, l = 4;
233
+ case 58: return t++, l = 6;
234
+ case 44: return t++, l = 5;
235
+ case 34: return t++, o = D(), l = 10;
236
+ case 47:
237
+ const y = t - 1;
238
+ if (e.charCodeAt(t + 1) === 47) {
239
+ for (t += 2; t < s && !P(e.charCodeAt(t));) t++;
240
+ return o = e.substring(y, t), l = 12;
241
+ }
242
+ if (e.charCodeAt(t + 1) === 42) {
243
+ t += 2;
244
+ const j = s - 1;
245
+ let v = !1;
246
+ for (; t < j;) {
247
+ const d = e.charCodeAt(t);
248
+ if (d === 42 && e.charCodeAt(t + 1) === 47) {
249
+ t += 2, v = !0;
250
+ break;
251
+ }
252
+ t++, P(d) && (d === 13 && e.charCodeAt(t) === 10 && t++, g++, k = t);
253
+ }
254
+ return v || (t++, u = 1), o = e.substring(y, t), l = 13;
255
+ }
256
+ return o += String.fromCharCode(f), t++, l = 16;
257
+ case 45: if (o += String.fromCharCode(f), t++, t === s || !S(e.charCodeAt(t))) return l = 16;
258
+ case 48:
259
+ case 49:
260
+ case 50:
261
+ case 51:
262
+ case 52:
263
+ case 53:
264
+ case 54:
265
+ case 55:
266
+ case 56:
267
+ case 57: return o += h(), l = 11;
268
+ default:
269
+ for (; t < s && p(f);) t++, f = e.charCodeAt(t);
270
+ if (r !== t) {
271
+ switch (o = e.substring(r, t), o) {
272
+ case "true": return l = 8;
273
+ case "false": return l = 9;
274
+ case "null": return l = 7;
275
+ }
276
+ return l = 16;
277
+ }
278
+ return o += String.fromCharCode(f), t++, l = 16;
279
+ }
280
+ }
281
+ i(c, "scanNext");
282
+ function p(f) {
283
+ if (X(f) || P(f)) return !1;
284
+ switch (f) {
285
+ case 125:
286
+ case 93:
287
+ case 123:
288
+ case 91:
289
+ case 34:
290
+ case 58:
291
+ case 44:
292
+ case 47: return !1;
293
+ }
294
+ return !0;
295
+ }
296
+ i(p, "isUnknownContentCharacter");
297
+ function b() {
298
+ let f;
299
+ do
300
+ f = c();
301
+ while (f >= 12 && f <= 15);
302
+ return f;
303
+ }
304
+ return i(b, "scanNextNonTrivia"), {
305
+ setPosition: O,
306
+ getPosition: i(() => t, "getPosition"),
307
+ scan: n ? b : c,
308
+ getToken: i(() => l, "getToken"),
309
+ getTokenValue: i(() => o, "getTokenValue"),
310
+ getTokenOffset: i(() => r, "getTokenOffset"),
311
+ getTokenLength: i(() => t - r, "getTokenLength"),
312
+ getTokenStartLine: i(() => m, "getTokenStartLine"),
313
+ getTokenStartCharacter: i(() => r - w, "getTokenStartCharacter"),
314
+ getTokenError: i(() => u, "getTokenError")
315
+ };
316
+ }
317
+ i(Ne, "createScanner");
318
+ function X(e) {
319
+ return e === 32 || e === 9;
320
+ }
321
+ i(X, "isWhiteSpace");
322
+ function P(e) {
323
+ return e === 10 || e === 13;
324
+ }
325
+ i(P, "isLineBreak");
326
+ function S(e) {
327
+ return e >= 48 && e <= 57;
328
+ }
329
+ i(S, "isDigit");
330
+ var ce;
331
+ (function(e) {
332
+ e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.space = 32] = "space", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.asterisk = 42] = "asterisk", e[e.backslash = 92] = "backslash", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.plus = 43] = "plus", e[e.slash = 47] = "slash", e[e.formFeed = 12] = "formFeed", e[e.tab = 9] = "tab";
333
+ })(ce || (ce = {})), new Array(20).fill(0).map((e, n) => " ".repeat(n));
334
+ const _ = 200;
335
+ new Array(_).fill(0).map((e, n) => `
336
+ ` + " ".repeat(n)), new Array(_).fill(0).map((e, n) => "\r" + " ".repeat(n)), new Array(_).fill(0).map((e, n) => `\r
337
+ ` + " ".repeat(n)), new Array(_).fill(0).map((e, n) => `
338
+ ` + " ".repeat(n)), new Array(_).fill(0).map((e, n) => "\r" + " ".repeat(n)), new Array(_).fill(0).map((e, n) => `\r
339
+ ` + " ".repeat(n));
340
+ var W;
341
+ (function(e) {
342
+ e.DEFAULT = { allowTrailingComma: !1 };
343
+ })(W || (W = {}));
344
+ function Re(e, n = [], s = W.DEFAULT) {
345
+ let t = null, o = [];
346
+ const r = [];
347
+ function l(m) {
348
+ Array.isArray(o) ? o.push(m) : t !== null && (o[t] = m);
349
+ }
350
+ return i(l, "onValue"), Pe(e, {
351
+ onObjectBegin: i(() => {
352
+ const m = {};
353
+ l(m), r.push(o), o = m, t = null;
354
+ }, "onObjectBegin"),
355
+ onObjectProperty: i((m) => {
356
+ t = m;
357
+ }, "onObjectProperty"),
358
+ onObjectEnd: i(() => {
359
+ o = r.pop();
360
+ }, "onObjectEnd"),
361
+ onArrayBegin: i(() => {
362
+ const m = [];
363
+ l(m), r.push(o), o = m, t = null;
364
+ }, "onArrayBegin"),
365
+ onArrayEnd: i(() => {
366
+ o = r.pop();
367
+ }, "onArrayEnd"),
368
+ onLiteralValue: l,
369
+ onError: i((m, k, w) => {
370
+ n.push({
371
+ error: m,
372
+ offset: k,
373
+ length: w
374
+ });
375
+ }, "onError")
376
+ }, s), o[0];
377
+ }
378
+ i(Re, "parse$1");
379
+ function Pe(e, n, s = W.DEFAULT) {
380
+ const t = Ne(e, !1), o = [];
381
+ let r = 0;
382
+ function l(T) {
383
+ return T ? () => r === 0 && T(t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter()) : () => !0;
384
+ }
385
+ i(l, "toNoArgVisit");
386
+ function g(T) {
387
+ return T ? (E) => r === 0 && T(E, t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter()) : () => !0;
388
+ }
389
+ i(g, "toOneArgVisit");
390
+ function m(T) {
391
+ return T ? (E) => r === 0 && T(E, t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter(), () => o.slice()) : () => !0;
392
+ }
393
+ i(m, "toOneArgVisitWithPath");
394
+ function k(T) {
395
+ return T ? () => {
396
+ r > 0 ? r++ : T(t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter(), () => o.slice()) === !1 && (r = 1);
397
+ } : () => !0;
398
+ }
399
+ i(k, "toBeginVisit");
400
+ function w(T) {
401
+ return T ? () => {
402
+ r > 0 && r--, r === 0 && T(t.getTokenOffset(), t.getTokenLength(), t.getTokenStartLine(), t.getTokenStartCharacter());
403
+ } : () => !0;
404
+ }
405
+ i(w, "toEndVisit");
406
+ const u = k(n.onObjectBegin), A = m(n.onObjectProperty), O = w(n.onObjectEnd), h = k(n.onArrayBegin), D = w(n.onArrayEnd), c = m(n.onLiteralValue), p = g(n.onSeparator), b = l(n.onComment), f = g(n.onError), y = s && s.disallowComments, j = s && s.allowTrailingComma;
407
+ function v() {
408
+ for (;;) {
409
+ const T = t.scan();
410
+ switch (t.getTokenError()) {
411
+ case 4:
412
+ d(14);
413
+ break;
414
+ case 5:
415
+ d(15);
416
+ break;
417
+ case 3:
418
+ d(13);
419
+ break;
420
+ case 1:
421
+ y || d(11);
422
+ break;
423
+ case 2:
424
+ d(12);
425
+ break;
426
+ case 6: d(16);
427
+ }
428
+ switch (T) {
429
+ case 12:
430
+ case 13:
431
+ y ? d(10) : b();
432
+ break;
433
+ case 16:
434
+ d(1);
435
+ break;
436
+ case 15:
437
+ case 14: break;
438
+ default: return T;
439
+ }
440
+ }
441
+ }
442
+ i(v, "scanNext");
443
+ function d(T, E = [], ie = []) {
444
+ if (f(T), E.length + ie.length > 0) {
445
+ let V = t.getToken();
446
+ for (; V !== 17;) {
447
+ if (E.indexOf(V) !== -1) {
448
+ v();
449
+ break;
450
+ } else if (ie.indexOf(V) !== -1) break;
451
+ V = v();
452
+ }
453
+ }
454
+ }
455
+ i(d, "handleError");
456
+ function L(T) {
457
+ const E = t.getTokenValue();
458
+ return T ? c(E) : (A(E), o.push(E)), v(), !0;
459
+ }
460
+ i(L, "parseString");
461
+ function B() {
462
+ switch (t.getToken()) {
463
+ case 11:
464
+ const T = t.getTokenValue();
465
+ let E = Number(T);
466
+ isNaN(E) && (d(2), E = 0), c(E);
467
+ break;
468
+ case 7:
469
+ c(null);
470
+ break;
471
+ case 8:
472
+ c(!0);
473
+ break;
474
+ case 9:
475
+ c(!1);
476
+ break;
477
+ default: return !1;
478
+ }
479
+ return v(), !0;
480
+ }
481
+ i(B, "parseLiteral");
482
+ function $() {
483
+ return t.getToken() !== 10 ? (d(3, [], [2, 5]), !1) : (L(!1), t.getToken() === 6 ? (p(":"), v(), H() || d(4, [], [2, 5])) : d(5, [], [2, 5]), o.pop(), !0);
484
+ }
485
+ i($, "parseProperty");
486
+ function N() {
487
+ u(), v();
488
+ let T = !1;
489
+ for (; t.getToken() !== 2 && t.getToken() !== 17;) {
490
+ if (t.getToken() === 5) {
491
+ if (T || d(4, [], []), p(","), v(), t.getToken() === 2 && j) break;
492
+ } else T && d(6, [], []);
493
+ $() || d(4, [], [2, 5]), T = !0;
494
+ }
495
+ return O(), t.getToken() !== 2 ? d(7, [2], []) : v(), !0;
496
+ }
497
+ i(N, "parseObject");
498
+ function $e() {
499
+ h(), v();
500
+ let T = !0, E = !1;
501
+ for (; t.getToken() !== 4 && t.getToken() !== 17;) {
502
+ if (t.getToken() === 5) {
503
+ if (E || d(4, [], []), p(","), v(), t.getToken() === 4 && j) break;
504
+ } else E && d(6, [], []);
505
+ T ? (o.push(0), T = !1) : o[o.length - 1]++, H() || d(4, [], [4, 5]), E = !0;
506
+ }
507
+ return D(), T || o.pop(), t.getToken() !== 4 ? d(8, [4], []) : v(), !0;
508
+ }
509
+ i($e, "parseArray");
510
+ function H() {
511
+ switch (t.getToken()) {
512
+ case 3: return $e();
513
+ case 1: return N();
514
+ case 10: return L(!0);
515
+ default: return B();
516
+ }
517
+ }
518
+ return i(H, "parseValue"), v(), t.getToken() === 17 ? s.allowEmptyContent ? !0 : (d(4, [], []), !1) : H() ? (t.getToken() !== 17 && d(9, [], []), !0) : (d(4, [], []), !1);
519
+ }
520
+ i(Pe, "visit");
521
+ var fe;
522
+ (function(e) {
523
+ e[e.None = 0] = "None", e[e.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 4] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 6] = "InvalidCharacter";
524
+ })(fe || (fe = {}));
525
+ var ue;
526
+ (function(e) {
527
+ e[e.OpenBraceToken = 1] = "OpenBraceToken", e[e.CloseBraceToken = 2] = "CloseBraceToken", e[e.OpenBracketToken = 3] = "OpenBracketToken", e[e.CloseBracketToken = 4] = "CloseBracketToken", e[e.CommaToken = 5] = "CommaToken", e[e.ColonToken = 6] = "ColonToken", e[e.NullKeyword = 7] = "NullKeyword", e[e.TrueKeyword = 8] = "TrueKeyword", e[e.FalseKeyword = 9] = "FalseKeyword", e[e.StringLiteral = 10] = "StringLiteral", e[e.NumericLiteral = 11] = "NumericLiteral", e[e.LineCommentTrivia = 12] = "LineCommentTrivia", e[e.BlockCommentTrivia = 13] = "BlockCommentTrivia", e[e.LineBreakTrivia = 14] = "LineBreakTrivia", e[e.Trivia = 15] = "Trivia", e[e.Unknown = 16] = "Unknown", e[e.EOF = 17] = "EOF";
528
+ })(ue || (ue = {}));
529
+ const Ve = Re;
530
+ var ae;
531
+ (function(e) {
532
+ e[e.InvalidSymbol = 1] = "InvalidSymbol", e[e.InvalidNumberFormat = 2] = "InvalidNumberFormat", e[e.PropertyNameExpected = 3] = "PropertyNameExpected", e[e.ValueExpected = 4] = "ValueExpected", e[e.ColonExpected = 5] = "ColonExpected", e[e.CommaExpected = 6] = "CommaExpected", e[e.CloseBraceExpected = 7] = "CloseBraceExpected", e[e.CloseBracketExpected = 8] = "CloseBracketExpected", e[e.EndOfFileExpected = 9] = "EndOfFileExpected", e[e.InvalidCommentToken = 10] = "InvalidCommentToken", e[e.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 14] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 16] = "InvalidCharacter";
533
+ })(ae || (ae = {}));
534
+ const Y = i((e, n) => Ve(_e(n, e)), "readJsonc");
535
+ const pe = i(() => {
536
+ const { findPnpApi: e } = module$1;
537
+ return e && e(process.cwd());
538
+ }, "getPnpApi");
539
+ const We = "detectTypeScriptVersion:";
540
+ const Me = i((e, n) => {
541
+ const s = `${We}${e}`, t = n?.get(s);
542
+ if (t !== void 0) return t ?? void 0;
543
+ let o;
544
+ const r = pe();
545
+ if (r) try {
546
+ o = r.resolveRequest("typescript/package.json", e) ?? void 0;
547
+ } catch {}
548
+ o ??= R(path.resolve(e), path.join("node_modules", "typescript", "package.json"), n);
549
+ let l;
550
+ if (o) try {
551
+ const g = Y(o, n);
552
+ typeof g?.version == "string" && (l = g.version);
553
+ } catch {}
554
+ return n?.set(s, l ?? null), l;
555
+ }, "detectTypeScriptVersion");
556
+ const I = "package.json";
557
+ const M = "tsconfig.json";
558
+ const Je = i((e, n, s) => {
559
+ const t = module$1.createRequire(path.join(s, "tsconfig.json"));
560
+ if (e !== n) try {
561
+ return t.resolve(e);
562
+ } catch {}
563
+ try {
564
+ return t.resolve(n);
565
+ } catch {}
566
+ try {
567
+ return t.resolve(`${n}/${I}`);
568
+ } catch {}
569
+ }, "resolvePackageEntryWithNode");
570
+ const Z = i((e, n, s, t) => {
571
+ const o = `resolveFromPackageJsonPath:${e}:${n}:${s}`;
572
+ if (t?.has(o)) return t.get(o) || !1;
573
+ const r = Y(e, t);
574
+ if (!r) return;
575
+ let l = n || M;
576
+ if (!s && r.exports) try {
577
+ const [g] = v(r.exports, n, ["require", "types"]);
578
+ l = g;
579
+ } catch {
580
+ return t?.set(o, ""), !1;
581
+ }
582
+ else !n && r.tsconfig && (l = r.tsconfig);
583
+ return l = path.join(e, "..", l), t?.set(o, l), l;
584
+ }, "resolveFromPackageJsonPath");
585
+ const ze = i((e, n, s) => {
586
+ const t = `resolveExtendsPath:${e}:${n}`;
587
+ if (s?.has(t)) return s.get(t) || void 0;
588
+ const o = Ge(e, n, s);
589
+ return s?.set(t, o || ""), o;
590
+ }, "resolveExtendsPath");
591
+ const Ge = i((e, n, s) => {
592
+ let t = e;
593
+ if (e === ".." && (t = path.join(t, M)), e[0] === "." && (t = path.resolve(n, t)), path.isAbsolute(t)) {
594
+ const c = F(s, t);
595
+ if (c) {
596
+ if (c.isFile()) return t;
597
+ } else if (!t.endsWith(".json")) {
598
+ const p = `${t}.json`;
599
+ if (F(s, p)) return p;
600
+ }
601
+ return;
602
+ }
603
+ const [o, ...r] = e.split("/"), l = o[0] === "@" ? `${o}/${r.shift()}` : o, g = r.join("/"), m = pe();
604
+ if (m) {
605
+ const { resolveRequest: c } = m;
606
+ try {
607
+ if (l === e) {
608
+ const p = c(path.join(l, I), n);
609
+ if (p) {
610
+ const b = Z(p, g, !1, s);
611
+ if (b && F(s, b)) return b;
612
+ }
613
+ } else {
614
+ let p;
615
+ try {
616
+ p = c(e, n, { extensions: [".json"] });
617
+ } catch {
618
+ p = c(path.join(e, M), n);
619
+ }
620
+ if (p) return p;
621
+ }
622
+ } catch {}
623
+ }
624
+ const k = Je(e, l, n);
625
+ let w;
626
+ if (k) {
627
+ if (path.basename(k) !== I && k.endsWith(".json")) return k;
628
+ w = path.basename(k) === I ? k : R(path.dirname(k), I, s);
629
+ }
630
+ const u = w && path.dirname(w) || R(path.resolve(n), path.join("node_modules", l), s);
631
+ if (!u || !F(s, u)?.isDirectory()) return;
632
+ const A = path.join(u, I);
633
+ if (F(s, A)) {
634
+ const c = Z(A, g, !1, s);
635
+ if (c === !1) return;
636
+ if (c && F(s, c)?.isFile()) return c;
637
+ }
638
+ const O = path.join(u, g), h = O.endsWith(".json");
639
+ if (!h) {
640
+ const c = `${O}.json`;
641
+ if (F(s, c)) return c;
642
+ }
643
+ const D = F(s, O);
644
+ if (D) {
645
+ if (D.isDirectory()) {
646
+ const c = path.join(O, I);
647
+ if (F(s, c)) {
648
+ const b = Z(c, "", !0, s);
649
+ if (b && F(s, b)) return b;
650
+ }
651
+ const p = path.join(O, M);
652
+ if (F(s, p)) return p;
653
+ } else if (h) return O;
654
+ }
655
+ }, "resolveExtendsPathUncached");
656
+ const q = Symbol("implicitBaseUrl");
657
+ const U = "${configDir}";
658
+ const K = /^\.{1,2}(\/.*)?$/;
659
+ const J = i((e) => {
660
+ const n = x(e);
661
+ return K.test(n) ? n : `./${n}`;
662
+ }, "normalizeRelativePath");
663
+ const Qe = i((e) => {
664
+ const n = { ...e };
665
+ if (n.strict) for (const t of [
666
+ "noImplicitAny",
667
+ "noImplicitThis",
668
+ "strictNullChecks",
669
+ "strictFunctionTypes",
670
+ "strictBindCallApply",
671
+ "strictPropertyInitialization",
672
+ "strictBuiltinIteratorReturn",
673
+ "alwaysStrict",
674
+ "useUnknownInCatchVariables"
675
+ ]) n[t] === void 0 && (n[t] = !0);
676
+ if (n.composite && (n.declaration ??= !0, n.incremental ??= !0), n.target) {
677
+ let s = n.target.toLowerCase();
678
+ s === "es2015" && (s = "es6"), n.target = s, s === "esnext" && (n.module ??= "es6", n.useDefineForClassFields ??= !0), (s === "es6" || s === "es2016" || s === "es2017" || s === "es2018" || s === "es2019" || s === "es2020" || s === "es2021" || s === "es2022" || s === "es2023" || s === "es2024" || s === "es2025") && (n.module ??= "es6"), (s === "es2022" || s === "es2023" || s === "es2024" || s === "es2025") && (n.useDefineForClassFields ??= !0);
679
+ }
680
+ if (n.module) {
681
+ let s = n.module.toLowerCase();
682
+ if (s === "es2015" && (s = "es6"), n.module = s, (s === "es6" || s === "es2020" || s === "es2022" || s === "esnext" || s === "none" || s === "system" || s === "umd" || s === "amd") && (n.moduleResolution ??= "classic"), s === "system" && (n.allowSyntheticDefaultImports ??= !0), (s === "node16" || s === "node18" || s === "node20" || s === "nodenext" || s === "preserve") && (n.esModuleInterop ??= !0, n.allowSyntheticDefaultImports ??= !0), (s === "node16" || s === "node18" || s === "node20" || s === "nodenext") && (n.moduleDetection ??= "force"), (s === "node16" || s === "node18") && (n.target ??= "es2022", n.moduleResolution ??= "node16"), s === "node20" && (n.target ??= "es2023", n.moduleResolution ??= "node16", n.resolveJsonModule ??= !0), s === "nodenext" && (n.target ??= "esnext", n.moduleResolution ??= "nodenext", n.resolveJsonModule ??= !0), s === "node16" || s === "node18" || s === "node20" || s === "nodenext") {
683
+ const t = n.target;
684
+ (t === "es3" || t === "es2022" || t === "es2023" || t === "es2024" || t === "esnext") && (n.useDefineForClassFields ??= !0);
685
+ }
686
+ s === "preserve" && (n.moduleResolution ??= "bundler");
687
+ }
688
+ if (n.moduleResolution) {
689
+ let s = n.moduleResolution.toLowerCase();
690
+ s === "node" && (s = "node10"), n.moduleResolution = s, (s === "node16" || s === "nodenext" || s === "bundler") && (n.resolvePackageJsonExports ??= !0, n.resolvePackageJsonImports ??= !0), s === "bundler" && (n.allowSyntheticDefaultImports ??= !0, n.resolveJsonModule ??= !0);
691
+ }
692
+ for (const s of [
693
+ "jsx",
694
+ "moduleDetection",
695
+ "importsNotUsedAsValues",
696
+ "newLine"
697
+ ]) n[s] && (n[s] = n[s].toLowerCase());
698
+ return n.esModuleInterop && (n.allowSyntheticDefaultImports ??= !0), n.verbatimModuleSyntax && (n.isolatedModules ??= !0, n.preserveConstEnums ??= !0), n.isolatedModules && (n.preserveConstEnums ??= !0), n.rewriteRelativeImportExtensions && (n.allowImportingTsExtensions ??= !0), n.lib && (n.lib = n.lib.map((s) => s.toLowerCase())), n.checkJs && (n.allowJs ??= !0), n;
699
+ }, "normalizeCompilerOptions");
700
+ const He = i((e, n) => {
701
+ !n.has("target") && !Xe(e.module) && (e.target = "es3");
702
+ }, "applyV4Defaults");
703
+ const Xe = i((e) => e === "node16" || e === "node18" || e === "node20" || e === "nodenext", "moduleDictatesTarget$1");
704
+ const Ye = i((e, n) => {
705
+ !n.has("target") && !Ze(e.module) && (e.target = "es5");
706
+ }, "applyV5Defaults");
707
+ const Ze = i((e) => e === "node16" || e === "node18" || e === "node20" || e === "nodenext", "moduleDictatesTarget");
708
+ const qe = i((e, n) => {
709
+ n.has("strict") || (e.strict = !0), n.has("target") || (e.target = "es2025"), n.has("module") || (e.module = "es2022"), n.has("moduleResolution") || (e.moduleResolution = "bundler"), n.has("rootDir") || (e.rootDir = "."), n.has("types") || (e.types = []), n.has("noUncheckedSideEffectImports") || (e.noUncheckedSideEffectImports = !0), n.has("libReplacement") || (e.libReplacement = !1);
710
+ }, "applyV6Defaults");
711
+ const Ke = [
712
+ [4, He],
713
+ [5, Ye],
714
+ [6, qe]
715
+ ];
716
+ const Ce = i((e) => {
717
+ const n = /^v?(\d+)/.exec(e);
718
+ return n ? Number(n[1]) : void 0;
719
+ }, "parseMajor");
720
+ const et = i((e, n) => {
721
+ const s = Ce(n);
722
+ if (s === void 0) return;
723
+ const t = new Set(Object.keys(e));
724
+ for (const [o, r] of Ke) o <= s && r(e, t);
725
+ }, "applyVersionDefaults");
726
+ const C = i((e, n) => J(path.relative(e, n)), "pathRelative");
727
+ const me = [
728
+ "files",
729
+ "include",
730
+ "exclude"
731
+ ];
732
+ const ge = i((e, n, s) => {
733
+ const t = path.join(n, s);
734
+ return x(path.relative(e, t)) || "./";
735
+ }, "resolveAndRelativize");
736
+ const tt = i((e, n, s) => {
737
+ const t = path.relative(e, n);
738
+ if (!t) return s;
739
+ return x(`${t}/${s.startsWith("./") ? s.slice(2) : s}`);
740
+ }, "prefixPattern");
741
+ const de = ["outDir", "declarationDir"];
742
+ const z = i((e, n) => {
743
+ if (e.startsWith(U)) return x(path.join(n, e.slice(12)));
744
+ }, "interpolateConfigDir");
745
+ const nt = [
746
+ "outDir",
747
+ "declarationDir",
748
+ "outFile",
749
+ "rootDir",
750
+ "baseUrl",
751
+ "tsBuildInfoFile"
752
+ ];
753
+ const ke = i((e, n = {}) => {
754
+ if (e.length === 0) throw new Error("Chain must not be empty");
755
+ const { typescriptVersion: s } = n, t = new Map(e.map((u) => [u.path, u])), o = /* @__PURE__ */ new Map(), r = i((u) => {
756
+ const A = o.get(u);
757
+ if (A) return A;
758
+ const O = t.get(u);
759
+ if (!O) throw new Error(`Config not found in chain: ${u}`);
760
+ const h = O.config, D = path.dirname(u);
761
+ let c = {
762
+ ...h,
763
+ ...h.compilerOptions && { compilerOptions: { ...h.compilerOptions } },
764
+ ...h.watchOptions && { watchOptions: { ...h.watchOptions } }
765
+ };
766
+ if (delete c.extends, c.compilerOptions?.paths && !c.compilerOptions.baseUrl && (c.compilerOptions[q] = D), h.extends) {
767
+ const p = Array.isArray(h.extends) ? h.extends : [h.extends];
768
+ for (const b of p.toReversed()) {
769
+ const f = r(b), y = path.dirname(b), { references: j, ...v } = f;
770
+ if (v.compilerOptions) {
771
+ const L = { ...v.compilerOptions };
772
+ for (const B of [
773
+ "baseUrl",
774
+ "outDir",
775
+ "declarationDir",
776
+ "rootDir"
777
+ ]) {
778
+ const $ = L[B];
779
+ $ && !$.startsWith(U) && (L[B] = ge(D, y, $));
780
+ }
781
+ for (const B of ["rootDirs", "typeRoots"]) {
782
+ const $ = L[B];
783
+ $ && (L[B] = $.map((N) => N.startsWith(U) ? N : ge(D, y, N)));
784
+ }
785
+ v.compilerOptions = L;
786
+ }
787
+ for (const L of me) {
788
+ const B = v[L];
789
+ B && (v[L] = B.map(($) => $.startsWith(U) ? $ : tt(D, y, $)));
790
+ }
791
+ const d = {
792
+ ...v,
793
+ ...c,
794
+ compilerOptions: {
795
+ ...v.compilerOptions,
796
+ ...c.compilerOptions
797
+ }
798
+ };
799
+ v.watchOptions && (d.watchOptions = {
800
+ ...v.watchOptions,
801
+ ...c.watchOptions
802
+ }), c = d;
803
+ }
804
+ }
805
+ if (c.compilerOptions) {
806
+ const { compilerOptions: p } = c;
807
+ for (const f of ["baseUrl", "rootDir"]) {
808
+ const y = p[f];
809
+ if (y && !y.startsWith(U)) {
810
+ const j = path.resolve(D, y);
811
+ p[f] = C(D, j);
812
+ }
813
+ }
814
+ for (const f of de) {
815
+ let y = p[f];
816
+ y && (Array.isArray(c.exclude) || (c.exclude = de.map((j) => p[j]).filter(Boolean)), y.startsWith(U) || (y = J(y)), p[f] = y);
817
+ }
818
+ } else c.compilerOptions = {};
819
+ if (c.include && (c.include = c.include.map(x)), c.files && (c.files = c.files.map((p) => p.startsWith(U) ? p : J(p))), c.watchOptions) {
820
+ const { watchOptions: p } = c;
821
+ for (const b of ["excludeDirectories", "excludeFiles"]) p[b] && (p[b] = p[b].map((f) => x(path.resolve(D, f))));
822
+ for (const b of [
823
+ "watchFile",
824
+ "watchDirectory",
825
+ "fallbackPolling"
826
+ ]) if (p[b]) {
827
+ const f = p;
828
+ f[b] = p[b].toLowerCase();
829
+ }
830
+ }
831
+ return o.set(u, c), c;
832
+ }, "resolveEntry"), l = e[0], g = r(l.path), m = path.dirname(l.path), k = {
833
+ ...g,
834
+ compilerOptions: g.compilerOptions ? { ...g.compilerOptions } : {}
835
+ }, { compilerOptions: w } = k;
836
+ if (w) {
837
+ for (const u of nt) {
838
+ const A = w[u];
839
+ if (A) {
840
+ const O = z(A, m);
841
+ w[u] = O ? C(m, O) : A;
842
+ }
843
+ }
844
+ for (const u of ["rootDirs", "typeRoots"]) {
845
+ const A = w[u];
846
+ A && (w[u] = A.map((O) => {
847
+ const h = z(O, m);
848
+ return h ? C(m, h) : J(O);
849
+ }));
850
+ }
851
+ if (w.paths) {
852
+ const u = {};
853
+ for (const [A, O] of Object.entries(w.paths)) u[A] = O.map((h) => z(h, m) ?? h);
854
+ w.paths = u;
855
+ }
856
+ s && et(w, s), k.compilerOptions = Qe(w);
857
+ }
858
+ for (const u of me) {
859
+ const A = k[u];
860
+ A && (k[u] = A.map((O) => z(O, m) ?? O));
861
+ }
862
+ return {
863
+ path: l.path,
864
+ config: k,
865
+ sources: e.map((u) => u.path)
866
+ };
867
+ }, "resolveExtendsChain");
868
+ const we = i((e, n = {}) => {
869
+ const { cache: s = /* @__PURE__ */ new Map() } = n, t = path.resolve(e), o = [], r = /* @__PURE__ */ new Set(), l = i((g, m) => {
870
+ const k = x(g);
871
+ if (r.has(k)) return;
872
+ r.add(k);
873
+ let w;
874
+ try {
875
+ w = Y(g, s) || {};
876
+ } catch {
877
+ throw new Error(`Cannot resolve tsconfig at path: ${g}`);
878
+ }
879
+ if (typeof w != "object") throw new SyntaxError(`Failed to parse tsconfig at: ${g}`);
880
+ const u = path.dirname(g);
881
+ if (w.extends) {
882
+ const A = Array.isArray(w.extends), h = (A ? w.extends : [w.extends]).map((c) => {
883
+ const p = ze(c, u, s);
884
+ if (!p) throw new Error(`File '${c}' not found.`);
885
+ const b = x(p);
886
+ if (m.has(b) || b === k) throw new Error(`Circularity detected while resolving configuration: ${b}`);
887
+ return b;
888
+ });
889
+ w.extends = A ? h : h[0], o.push({
890
+ path: k,
891
+ config: w
892
+ });
893
+ const D = new Set(m);
894
+ D.add(k);
895
+ for (const c of [...h].reverse()) l(c, D);
896
+ } else o.push({
897
+ path: k,
898
+ config: w
899
+ });
900
+ }, "collect");
901
+ return l(t, /* @__PURE__ */ new Set()), o;
902
+ }, "getExtendsChain");
903
+ const ee = i((e, n = {}) => {
904
+ const { cache: s = /* @__PURE__ */ new Map(), typescriptVersion: t = "auto" } = n, o = we(e, { cache: s });
905
+ let r;
906
+ return t === "auto" ? r = Me(path.dirname(o[0].path), s) : t !== !1 && (r = t), ke(o, { typescriptVersion: r });
907
+ }, "readTsconfig");
908
+ var st = Object.defineProperty;
909
+ var G = i((e, n) => st(e, "name", {
910
+ value: n,
911
+ configurable: !0
912
+ }), "s");
913
+ const ve = G((e) => {
914
+ let n = "";
915
+ for (let s = 0; s < e.length; s += 1) {
916
+ const t = e[s], o = t.toUpperCase();
917
+ n += t === o ? t.toLowerCase() : o;
918
+ }
919
+ return n;
920
+ }, "invertCase"), te = /* @__PURE__ */ new Map(), be = G((e, n) => {
921
+ const s = Se.join(e, `.is-fs-case-sensitive-test-${process.pid}`);
922
+ try {
923
+ return n.writeFileSync(s, ""), !n.existsSync(ve(s));
924
+ } finally {
925
+ try {
926
+ n.unlinkSync(s);
927
+ } catch {}
928
+ }
929
+ }, "checkDirectoryCaseWithWrite"), ot = G((e, n, s) => {
930
+ try {
931
+ return be(e, s);
932
+ } catch (t) {
933
+ if (n === void 0) return be(Ie.tmpdir(), s);
934
+ throw t;
935
+ }
936
+ }, "checkDirectoryCaseWithFallback"), it = G((e, n = Ue, s = !0) => {
937
+ const t = e ?? process.cwd();
938
+ if (s && te.has(t)) return te.get(t);
939
+ let o;
940
+ const r = ve(t);
941
+ return r !== t && n.existsSync(t) ? o = !n.existsSync(r) : o = ot(t, e, n), s && te.set(t, o), o;
942
+ }, "isFsCaseSensitive"), { join: ye } = path.posix, ne = {
943
+ ts: [
944
+ ".ts",
945
+ ".tsx",
946
+ ".d.ts"
947
+ ],
948
+ cts: [".cts", ".d.cts"],
949
+ mts: [".mts", ".d.mts"]
950
+ }, rt = i((e) => {
951
+ const n = [...ne.ts], s = [...ne.cts], t = [...ne.mts];
952
+ return e?.allowJs && (n.push(".js", ".jsx"), s.push(".cjs"), t.push(".mjs")), [
953
+ ...n,
954
+ ...s,
955
+ ...t
956
+ ];
957
+ }, "getSupportedExtensions"), lt = i((e) => {
958
+ const n = [];
959
+ if (!e) return n;
960
+ const { outDir: s, declarationDir: t } = e;
961
+ return s && n.push(s), t && n.push(t), n;
962
+ }, "getDefaultExcludeSpec"), Te = i((e) => e.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), "escapeForRegexp"), se = `(?!(${[
963
+ "node_modules",
964
+ "bower_components",
965
+ "jspm_packages"
966
+ ].join("|")})(/|$))`, ft = /(?:^|\/)[^.*?]+$/, he = "**/*", Q = "[^/]", oe = "[^./]", Oe = process.platform === "win32", ut = i(({ config: e, path: n }, s) => {
967
+ if ("extends" in e) throw new Error("tsconfig#extends must be resolved. Use getTsconfig or readTsconfig to resolve it.");
968
+ if (!path.isAbsolute(n)) throw new Error("The tsconfig path must be absolute");
969
+ Oe && (n = x(n));
970
+ const t = path.dirname(n), { files: o, include: r, exclude: l, compilerOptions: g } = e, m = i((c) => path.isAbsolute(c) ? c : ye(t, c), "resolvePattern"), k = o ? new Set(o.map(m)) : void 0, w = rt(g), u = s ? "" : "i", O = (l || lt(g)).map((c) => {
971
+ const p = m(c), b = Te(p).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${Q}*`).replaceAll(String.raw`\?`, Q);
972
+ return new RegExp(`^${b}($|/)`, u);
973
+ }), h = o || r ? r : [he];
974
+ return {
975
+ filesSet: k,
976
+ extensions: w,
977
+ excludePatterns: O,
978
+ includePatterns: h ? h.map((c) => {
979
+ let p = m(c);
980
+ ft.test(p) && (p = ye(p, he));
981
+ const b = Te(p).replaceAll(String.raw`/\*\*`, `(/${se}${oe}${Q}*)*?`).replaceAll(/(\/)?\\\*/g, (f, y) => {
982
+ const j = String.raw`(${oe}|(\.(?!min\.js$))?)*`;
983
+ return y ? `/${se}${oe}${j}` : j;
984
+ }).replaceAll(/(\/)?\\\?/g, (f, y) => {
985
+ const j = Q;
986
+ return y ? `/${se}${j}` : j;
987
+ });
988
+ return new RegExp(`^${b}$`, u);
989
+ }) : void 0
990
+ };
991
+ }, "compilePatterns"), Ae = /* @__PURE__ */ new WeakMap(), je = i((e, n) => {
992
+ if (!path.isAbsolute(n)) return !1;
993
+ Oe && (n = x(n));
994
+ let s = Ae.get(e);
995
+ s || (s = ut(e, it()), Ae.set(e, s));
996
+ const { filesSet: t, extensions: o, excludePatterns: r, includePatterns: l } = s;
997
+ return t?.has(n) ? !0 : !o.some((g) => n.endsWith(g)) || r.some((g) => g.test(n)) ? !1 : !!(l && l.some((g) => g.test(n)));
998
+ }, "isFileIncluded"), De = i((e, n, s, t) => {
999
+ const o = path.resolve(e);
1000
+ let r = x(e);
1001
+ for (;;) {
1002
+ const l = R(r, n, s);
1003
+ if (!l) return;
1004
+ const g = path.resolve(l), m = ee(g, {
1005
+ cache: s,
1006
+ typescriptVersion: t
1007
+ });
1008
+ if (je(m, o)) return m;
1009
+ const k = path.dirname(l), w = path.dirname(k);
1010
+ if (w === k) return;
1011
+ r = w;
1012
+ }
1013
+ }, "findConfigApplicable"), Ee = i((e = process.cwd(), n = {}) => {
1014
+ const { configName: s = "tsconfig.json", cache: t = /* @__PURE__ */ new Map(), includes: o = !1 } = n;
1015
+ if (!o) {
1016
+ const r = path.resolve(e);
1017
+ return path.basename(r) === s && F(t, r)?.isFile() ? x(r) : R(x(e), s, t);
1018
+ }
1019
+ return De(e, s, t, !1)?.path;
1020
+ }, "findTsconfig"), at = i((e = process.cwd(), n = {}) => {
1021
+ const { configName: s = "tsconfig.json", cache: t = /* @__PURE__ */ new Map(), includes: o = !1, typescriptVersion: r = "auto" } = n;
1022
+ if (!o) {
1023
+ const l = Ee(e, {
1024
+ configName: s,
1025
+ cache: t
1026
+ });
1027
+ return l ? ee(l, {
1028
+ cache: t,
1029
+ typescriptVersion: r
1030
+ }) : void 0;
1031
+ }
1032
+ return De(e, s, t, r);
1033
+ }, "getTsconfig"), pt = /\*/g, xe = i((e, n) => {
1034
+ const s = e.match(pt);
1035
+ if (s && s.length > 1) throw new Error(n);
1036
+ }, "assertStarCount"), mt = i((e) => {
1037
+ if (e.includes("*")) {
1038
+ const [n, s] = e.split("*");
1039
+ return {
1040
+ prefix: n,
1041
+ suffix: s
1042
+ };
1043
+ }
1044
+ return e;
1045
+ }, "parsePattern"), gt = i(({ prefix: e, suffix: n }, s) => s.startsWith(e) && s.endsWith(n), "isPatternMatch"), dt = i((e, n, s) => Object.entries(e).map(([t, o]) => (xe(t, `Pattern '${t}' can have at most one '*' character.`), {
1046
+ pattern: mt(t),
1047
+ substitutions: o.map((r) => {
1048
+ if (xe(r, `Substitution '${r}' in pattern '${t}' can have at most one '*' character.`), !n && !K.test(r) && !path.isAbsolute(r)) throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");
1049
+ return path.resolve(s, r);
1050
+ })
1051
+ })), "parsePaths"), kt = i((e) => {
1052
+ const { compilerOptions: n } = e.config;
1053
+ if (!n) return null;
1054
+ const { baseUrl: s, paths: t } = n;
1055
+ if (!s && !t) return null;
1056
+ const o = q in n && n[q], r = path.resolve(path.dirname(e.path), s || o || "."), l = t ? dt(t, s, r) : [], g = /* @__PURE__ */ new Map(), m = [];
1057
+ for (const k of l) typeof k.pattern == "string" ? g.set(k.pattern, k.substitutions) : m.push(k);
1058
+ return {
1059
+ exactEntries: g,
1060
+ patternEntries: m,
1061
+ resolvedBaseUrl: r,
1062
+ baseUrl: s
1063
+ };
1064
+ }, "compilePaths"), Fe = /* @__PURE__ */ new WeakMap();
1065
+ i((e, n) => {
1066
+ let s = Fe.get(e);
1067
+ if (s === void 0 && (s = kt(e), Fe.set(e, s)), !s) return [];
1068
+ if (K.test(n)) return [];
1069
+ const { exactEntries: t, patternEntries: o, resolvedBaseUrl: r, baseUrl: l } = s, g = t.get(n);
1070
+ if (g) return g.map(x);
1071
+ let m, k = -1;
1072
+ for (const u of o) gt(u.pattern, n) && u.pattern.prefix.length > k && (k = u.pattern.prefix.length, m = u);
1073
+ if (!m) return l ? [x(path.join(r, n))] : [];
1074
+ const w = n.slice(m.pattern.prefix.length, n.length - m.pattern.suffix.length);
1075
+ return m.substitutions.map((u) => x(u.replace("*", w)));
1076
+ }, "resolvePathAlias");
1077
+ //#endregion
1078
+ //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_4084c24f9f44f250d2b604ebc16f10f3/node_modules/tsdown/dist/deps-B_uZzM4C.mjs
27
1079
  const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
28
1080
  const shimsInject = {
29
1081
  __dirname: [shimFile, "__dirname"],
@@ -4187,7 +5239,7 @@ function filterConfig(filter, configCwd, name) {
4187
5239
  return toArray(filter).some((value) => name && name === value || cwd === value);
4188
5240
  }
4189
5241
  //#endregion
4190
- //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_8361ec2a4d03114085b1954a2fc42e35/node_modules/tsdown/dist/watch-DOMHXvCH.mjs
5242
+ //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_4084c24f9f44f250d2b604ebc16f10f3/node_modules/tsdown/dist/watch-DOMHXvCH.mjs
4191
5243
  async function copy(options) {
4192
5244
  if (!options.copy) return;
4193
5245
  const resolved = await resolveCopyEntries(options);
@@ -4567,7 +5619,7 @@ var Hookable = class {
4567
5619
  }
4568
5620
  };
4569
5621
  //#endregion
4570
- //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_8361ec2a4d03114085b1954a2fc42e35/node_modules/tsdown/dist/build-D_enfyvD.mjs
5622
+ //#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_4084c24f9f44f250d2b604ebc16f10f3/node_modules/tsdown/dist/build-D_enfyvD.mjs
4571
5623
  var build_D_enfyvD_exports = /* @__PURE__ */ __exportAll$1({
4572
5624
  n: () => buildWithConfigs,
4573
5625
  r: () => build_exports,
@@ -4882,7 +5934,7 @@ async function bundleDone(bundleByPkg, bundle) {
4882
5934
  async function packTarball(packageJsonPath) {
4883
5935
  const pkgDir = path.dirname(packageJsonPath);
4884
5936
  const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
4885
- const { detect } = await import("./detect-DGhJGEqb-6CTf16BW.js");
5937
+ const { detect } = await import("./detect-DGhJGEqb-LL52mV6u.js");
4886
5938
  try {
4887
5939
  const detected = await detect({ cwd: pkgDir });
4888
5940
  debug$1("Detected package manager: %o", detected);
@@ -4953,7 +6005,7 @@ async function pack(dir, pm, destination, ignoreScripts) {
4953
6005
  args.push("--ignore-scripts");
4954
6006
  break;
4955
6007
  }
4956
- const output = await x(command, args, {
6008
+ const output = await x$1(command, args, {
4957
6009
  nodePath: false,
4958
6010
  nodeOptions: { cwd: dir }
4959
6011
  });
@@ -5027,7 +6079,7 @@ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, i
5027
6079
  if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
5028
6080
  if (config.pkg || config.deps.skipNodeModulesBundle || config.deps.neverBundle === true || config.deps.dts.neverBundle === true) plugins.push(DepsPlugin(config, bundle));
5029
6081
  if (dts) {
5030
- const { dts: dtsPlugin } = await import("./dist-DyXLnzyh.js");
6082
+ const { dts: dtsPlugin } = await import("./dist-BsS7BOcb.js");
5031
6083
  const { cjsReexport: _, ...dtsPluginOptions } = dts;
5032
6084
  const options = {
5033
6085
  tsconfig,
@@ -5410,4 +6462,4 @@ async function buildSingle(config, configDeps, isDualFormat, clean, restart, don
5410
6462
  }
5411
6463
  }
5412
6464
  //#endregion
5413
- export { resolveUserConfig as a, mergeConfig as i, buildWithConfigs as n, build_D_enfyvD_exports as r, build$1 as t };
6465
+ export { resolveUserConfig as a, mergeConfig as i, buildWithConfigs as n, at as o, build_D_enfyvD_exports as r, ee as s, build$1 as t };