@incajs/cli 0.0.7 → 0.0.9

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.
@@ -76,7 +76,7 @@ var w = function(e) {
76
76
  }, T = function(e) {
77
77
  let t = b(e).replace(/\/$/, "").split("/").slice(0, -1);
78
78
  return t.length === 1 && re.test(t[0]) && (t[0] += "/"), t.join("/") || (w(e) ? "/" : ".");
79
- }, E = function(e, t) {
79
+ }, ce = function(e, t) {
80
80
  let n = b(e).split("/"), r = "";
81
81
  for (let e = n.length - 1; e >= 0; e--) {
82
82
  let t = n[e];
@@ -86,7 +86,7 @@ var w = function(e) {
86
86
  }
87
87
  }
88
88
  return t && r.endsWith(t) ? r.slice(0, -t.length) : r;
89
- }, D = /* @__PURE__ */ "_http_agent._http_client._http_common._http_incoming._http_outgoing._http_server._stream_duplex._stream_passthrough._stream_readable._stream_transform._stream_wrap._stream_writable._tls_common._tls_wrap.assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.domain.events.fs.fs/promises.http.http2.https.inspector.inspector/promises.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.repl.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.trace_events.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib".split("."), ce = /^([A-Z][a-z\d]*)+$/, le = /* @__PURE__ */ new Set([
89
+ }, E = /* @__PURE__ */ "_http_agent._http_client._http_common._http_incoming._http_outgoing._http_server._stream_duplex._stream_passthrough._stream_readable._stream_transform._stream_wrap._stream_writable._tls_common._tls_wrap.assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.domain.events.fs.fs/promises.http.http2.https.inspector.inspector/promises.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.repl.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.trace_events.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib".split("."), le = /^([A-Z][a-z\d]*)+$/, ue = /* @__PURE__ */ new Set([
90
90
  "string",
91
91
  "function",
92
92
  "number",
@@ -96,8 +96,8 @@ var w = function(e) {
96
96
  "boolean",
97
97
  "bigint",
98
98
  "symbol"
99
- ]), O = /* @__PURE__ */ new Map();
100
- function k(e, t = "and") {
99
+ ]), D = /* @__PURE__ */ new Map();
100
+ function O(e, t = "and") {
101
101
  switch (e.length) {
102
102
  case 0: return "";
103
103
  case 1: return `${e[0]}`;
@@ -106,17 +106,17 @@ function k(e, t = "and") {
106
106
  default: return `${e.slice(0, -1).join(", ")}, ${t} ${e.at(-1)}`;
107
107
  }
108
108
  }
109
- function ue(e) {
109
+ function k(e) {
110
110
  let t = 0, n = /%[dfijoOs]/g;
111
111
  for (; n.exec(e) !== null;) t++;
112
112
  return t;
113
113
  }
114
114
  function A(e, t, n) {
115
- return O.set(e, t), de(n, e);
115
+ return D.set(e, t), de(n, e);
116
116
  }
117
117
  var j = Symbol("kIsNodeError");
118
118
  function de(e, t) {
119
- let n = O.get(t), r = typeof n == "string" ? ue(n) : -1;
119
+ let n = D.get(t), r = typeof n == "string" ? k(n) : -1;
120
120
  switch (r) {
121
121
  case 0: {
122
122
  class i extends e {
@@ -180,9 +180,9 @@ function de(e, t) {
180
180
  }
181
181
  }
182
182
  function fe(e, t, n) {
183
- let r = O.get(e);
183
+ let r = D.get(e);
184
184
  if (v.ok(r !== void 0, "expected `message` to be found"), typeof r == "function") return v.ok(r.length <= t.length, `Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`), Reflect.apply(r, n, t);
185
- let i = ue(r);
185
+ let i = k(r);
186
186
  return v.ok(i === t.length, `Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i}).`), t.length === 0 ? r : (t.unshift(r), Reflect.apply(f, null, t));
187
187
  }
188
188
  function pe(e) {
@@ -216,12 +216,12 @@ A("ERR_INVALID_ARG_TYPE", (e, t, n) => {
216
216
  }
217
217
  r += "must be ";
218
218
  let i = [], a = [], o = [];
219
- for (let e of t) v.ok(typeof e == "string", "All expected entries have to be of type string"), le.has(e) ? i.push(e.toLowerCase()) : ce.exec(e) === null ? (v.ok(e !== "object", "The value \"object\" should be written as \"Object\""), o.push(e)) : a.push(e);
219
+ for (let e of t) v.ok(typeof e == "string", "All expected entries have to be of type string"), ue.has(e) ? i.push(e.toLowerCase()) : le.exec(e) === null ? (v.ok(e !== "object", "The value \"object\" should be written as \"Object\""), o.push(e)) : a.push(e);
220
220
  if (a.length > 0) {
221
221
  let e = i.indexOf("object");
222
222
  e !== -1 && (i.splice(e, 1), a.push("Object"));
223
223
  }
224
- return i.length > 0 && (r += `${i.length > 1 ? "one of type" : "of type"} ${k(i, "or")}`, (a.length > 0 || o.length > 0) && (r += " or ")), a.length > 0 && (r += `an instance of ${k(a, "or")}`, o.length > 0 && (r += " or ")), o.length > 0 && (o.length > 1 ? r += `one of ${k(o, "or")}` : (o[0]?.toLowerCase() !== o[0] && (r += "an "), r += `${o[0]}`)), r += `. Received ${pe(n)}`, r;
224
+ return i.length > 0 && (r += `${i.length > 1 ? "one of type" : "of type"} ${O(i, "or")}`, (a.length > 0 || o.length > 0) && (r += " or ")), a.length > 0 && (r += `an instance of ${O(a, "or")}`, o.length > 0 && (r += " or ")), o.length > 0 && (o.length > 1 ? r += `one of ${O(o, "or")}` : (o[0]?.toLowerCase() !== o[0] && (r += "an "), r += `${o[0]}`)), r += `. Received ${pe(n)}`, r;
225
225
  }, TypeError);
226
226
  var M = A("ERR_INVALID_MODULE_SPECIFIER", (e, t, n) => `Invalid module "${e}" ${t}${n ? ` imported from ${n}` : ""}`, TypeError), N = A("ERR_INVALID_PACKAGE_CONFIG", (e, t, n) => `Invalid package config ${e}${t ? ` while importing ${t}` : ""}${n ? `. ${n}` : ""}`, Error), me = A("ERR_INVALID_PACKAGE_TARGET", (e, t, n, r = !1, i) => {
227
227
  let a = typeof n == "string" && !r && n.length > 0 && !n.startsWith("./");
@@ -230,14 +230,14 @@ var M = A("ERR_INVALID_MODULE_SPECIFIER", (e, t, n) => `Invalid module "${e}" ${
230
230
  return n && typeof n == "string" && (this.url = `${n}`), `Cannot find ${n ? "module" : "package"} '${e}' imported from ${t}`;
231
231
  }, Error), he = A("ERR_PACKAGE_IMPORT_NOT_DEFINED", (e, t, n) => `Package import specifier "${e}" is not defined${t ? ` in package ${t || ""}package.json` : ""} imported from ${n}`, TypeError), ge = A("ERR_PACKAGE_PATH_NOT_EXPORTED", (e, t, n) => t === "." ? `No "exports" main defined in ${e}package.json${n ? ` imported from ${n}` : ""}` : `Package subpath '${t}' is not defined by "exports" in ${e}package.json${n ? ` imported from ${n}` : ""}`, Error), _e = A("ERR_UNSUPPORTED_DIR_IMPORT", function(e, t, n = void 0) {
232
232
  return this.url = n, `Directory import '${e}' is not supported resolving ES modules imported from ${t}`;
233
- }, Error), F = A("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError), ve = A("ERR_UNKNOWN_FILE_EXTENSION", (e, t) => `Unknown file extension "${e}" for ${t}`, TypeError);
233
+ }, Error), ve = A("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError), ye = A("ERR_UNKNOWN_FILE_EXTENSION", (e, t) => `Unknown file extension "${e}" for ${t}`, TypeError);
234
234
  A("ERR_INVALID_ARG_VALUE", (e, t, n = "is invalid") => {
235
235
  let r = p(t);
236
236
  return r.length > 128 && (r = `${r.slice(0, 128)}...`), `The ${e.includes(".") ? "property" : "argument"} '${e}' ${n}. Received ${r}`;
237
237
  }, TypeError);
238
- var I = {}.hasOwnProperty, L = /* @__PURE__ */ new Map();
239
- function R(t, { base: n, specifier: i }) {
240
- let a = L.get(t);
238
+ var F = {}.hasOwnProperty, be = /* @__PURE__ */ new Map();
239
+ function xe(t, { base: n, specifier: i }) {
240
+ let a = be.get(t);
241
241
  if (a) return a;
242
242
  let o;
243
243
  try {
@@ -263,14 +263,14 @@ function R(t, { base: n, specifier: i }) {
263
263
  let r = new N(t, (n ? `"${i}" from ` : "") + h(n || i), e.message);
264
264
  throw r.cause = e, r;
265
265
  }
266
- s.exists = !0, I.call(e, "name") && typeof e.name == "string" && (s.name = e.name), I.call(e, "main") && typeof e.main == "string" && (s.main = e.main), I.call(e, "exports") && (s.exports = e.exports), I.call(e, "imports") && (s.imports = e.imports), I.call(e, "type") && (e.type === "commonjs" || e.type === "module") && (s.type = e.type);
266
+ s.exists = !0, F.call(e, "name") && typeof e.name == "string" && (s.name = e.name), F.call(e, "main") && typeof e.main == "string" && (s.main = e.main), F.call(e, "exports") && (s.exports = e.exports), F.call(e, "imports") && (s.imports = e.imports), F.call(e, "type") && (e.type === "commonjs" || e.type === "module") && (s.type = e.type);
267
267
  }
268
- return L.set(t, s), s;
268
+ return be.set(t, s), s;
269
269
  }
270
- function z(e) {
270
+ function I(e) {
271
271
  let t = new URL("package.json", e);
272
272
  for (; !t.pathname.endsWith("node_modules/package.json");) {
273
- let n = R(h(t), { specifier: e });
273
+ let n = xe(h(t), { specifier: e });
274
274
  if (n.exists) return n;
275
275
  let r = t;
276
276
  if (t = new URL("../package.json", t), t.pathname === r.pathname) break;
@@ -281,7 +281,7 @@ function z(e) {
281
281
  type: "none"
282
282
  };
283
283
  }
284
- var ye = {}.hasOwnProperty, be = {
284
+ var Se = {}.hasOwnProperty, Ce = {
285
285
  __proto__: null,
286
286
  ".json": "json",
287
287
  ".cjs": "commonjs",
@@ -290,74 +290,74 @@ var ye = {}.hasOwnProperty, be = {
290
290
  ".ts": "module",
291
291
  ".mts": "module",
292
292
  ".mjs": "module"
293
- }, xe = {
293
+ }, we = {
294
294
  __proto__: null,
295
- "data:": Ce,
296
- "file:": De,
295
+ "data:": Ee,
296
+ "file:": Ae,
297
297
  "node:": () => "builtin"
298
298
  };
299
- function Se(e) {
299
+ function Te(e) {
300
300
  return e && /^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i.test(e) ? "module" : e === "application/json" ? "json" : null;
301
301
  }
302
- function Ce(e) {
302
+ function Ee(e) {
303
303
  let { 1: t } = /^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(e.pathname) || [
304
304
  null,
305
305
  null,
306
306
  null
307
307
  ];
308
- return Se(t);
308
+ return Te(t);
309
309
  }
310
- var we = 46, Te = 47;
311
- function Ee(e) {
310
+ var De = 46, Oe = 47;
311
+ function ke(e) {
312
312
  let t = e.pathname;
313
313
  for (let e = t.length - 1; e > 0; e--) switch (t.charCodeAt(e)) {
314
- case Te: return "";
315
- case we: return t.charCodeAt(e - 1) === Te ? "" : t.slice(e);
314
+ case Oe: return "";
315
+ case De: return t.charCodeAt(e - 1) === Oe ? "" : t.slice(e);
316
316
  }
317
317
  return "";
318
318
  }
319
- function De(e, t, n) {
320
- let r = Ee(e);
319
+ function Ae(e, t, n) {
320
+ let r = ke(e);
321
321
  if (r === ".js") {
322
- let { type: t } = z(e);
322
+ let { type: t } = I(e);
323
323
  return t === "none" ? "commonjs" : t;
324
324
  }
325
325
  if (r === "") {
326
- let { type: t } = z(e);
326
+ let { type: t } = I(e);
327
327
  return t === "module" ? "module" : t === "none" ? "commonjs" : t;
328
328
  }
329
- let i = be[r];
329
+ let i = Ce[r];
330
330
  if (i) return i;
331
- if (!n) throw new ve(r, h(e));
331
+ if (!n) throw new ye(r, h(e));
332
332
  }
333
- function Oe(e, t) {
333
+ function je(e, t) {
334
334
  let n = e.protocol;
335
- return ye.call(xe, n) && xe[n](e, t, !0) || null;
335
+ return Se.call(we, n) && we[n](e, t, !0) || null;
336
336
  }
337
- var B = RegExp.prototype[Symbol.replace], ke = {}.hasOwnProperty, Ae = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i, je = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i, Me = /^\.|%|\\/, V = /\*/g, Ne = /%2f|%5c/i, Pe = /* @__PURE__ */ new Set(), Fe = /[/\\]{2}/;
338
- function Ie(e, t, n, r, i, a, o) {
337
+ var L = RegExp.prototype[Symbol.replace], Me = {}.hasOwnProperty, Ne = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i, Pe = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i, Fe = /^\.|%|\\/, R = /\*/g, Ie = /%2f|%5c/i, Le = /* @__PURE__ */ new Set(), Re = /[/\\]{2}/;
338
+ function z(e, t, n, r, i, a, o) {
339
339
  if (y.noDeprecation) return;
340
- let s = h(r), c = Fe.exec(o ? e : t) !== null;
340
+ let s = h(r), c = Re.exec(o ? e : t) !== null;
341
341
  y.emitWarning(`Use of deprecated ${c ? "double slash" : "leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t === n ? "" : `matched to "${n}" `}in the "${i ? "imports" : "exports"}" field module resolution of the package at ${s}${a ? ` imported from ${h(a)}` : ""}.`, "DeprecationWarning", "DEP0166");
342
342
  }
343
- function Le(t, n, r, i) {
344
- if (y.noDeprecation || Oe(t, { parentURL: r.href }) !== "module") return;
343
+ function B(t, n, r, i) {
344
+ if (y.noDeprecation || je(t, { parentURL: r.href }) !== "module") return;
345
345
  let a = h(t.href), o = h(new m(".", n)), s = h(r);
346
346
  i ? e.resolve(o, i) !== a && y.emitWarning(`Package ${o} has a "main" field set to "${i}", excluding the full filename and extension to the resolved file at "${a.slice(o.length)}", imported from ${s}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151") : y.emitWarning(`No "main" or "exports" field defined in the package.json for ${o} resolving the main entry point "${a.slice(o.length)}", imported from ${s}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
347
347
  }
348
- function H(e) {
348
+ function V(e) {
349
349
  try {
350
350
  return c(e);
351
351
  } catch {}
352
352
  }
353
- function U(e) {
353
+ function H(e) {
354
354
  let t = c(e, { throwIfNoEntry: !1 });
355
355
  return (t ? t.isFile() : void 0) ?? !1;
356
356
  }
357
- function Re(e, t, n) {
357
+ function ze(e, t, n) {
358
358
  let r;
359
359
  if (t.main !== void 0) {
360
- if (r = new m(t.main, e), U(r)) return r;
360
+ if (r = new m(t.main, e), H(r)) return r;
361
361
  let i = [
362
362
  `./${t.main}.js`,
363
363
  `./${t.main}.json`,
@@ -366,27 +366,27 @@ function Re(e, t, n) {
366
366
  `./${t.main}/index.json`,
367
367
  `./${t.main}/index.node`
368
368
  ], a = -1;
369
- for (; ++a < i.length && (r = new m(i[a], e), !U(r));) r = void 0;
370
- if (r) return Le(r, e, n, t.main), r;
369
+ for (; ++a < i.length && (r = new m(i[a], e), !H(r));) r = void 0;
370
+ if (r) return B(r, e, n, t.main), r;
371
371
  }
372
372
  let i = [
373
373
  "./index.js",
374
374
  "./index.json",
375
375
  "./index.node"
376
376
  ], a = -1;
377
- for (; ++a < i.length && (r = new m(i[a], e), !U(r));) r = void 0;
378
- if (r) return Le(r, e, n, t.main), r;
377
+ for (; ++a < i.length && (r = new m(i[a], e), !H(r));) r = void 0;
378
+ if (r) return B(r, e, n, t.main), r;
379
379
  throw new P(h(new m(".", e)), h(n));
380
380
  }
381
- function ze(t, n, r) {
382
- if (Ne.exec(t.pathname) !== null) throw new M(t.pathname, String.raw`must not include encoded "/" or "\" characters`, h(n));
381
+ function Be(t, n, r) {
382
+ if (Ie.exec(t.pathname) !== null) throw new M(t.pathname, String.raw`must not include encoded "/" or "\" characters`, h(n));
383
383
  let i;
384
384
  try {
385
385
  i = h(t);
386
386
  } catch (e) {
387
387
  throw Object.defineProperty(e, "input", { value: String(t) }), Object.defineProperty(e, "module", { value: String(n) }), e;
388
388
  }
389
- let a = H(i.endsWith("/") ? i.slice(-1) : i);
389
+ let a = V(i.endsWith("/") ? i.slice(-1) : i);
390
390
  if (a && a.isDirectory()) {
391
391
  let e = new _e(i, h(n));
392
392
  throw e.url = String(t), e;
@@ -401,53 +401,53 @@ function ze(t, n, r) {
401
401
  }
402
402
  return t;
403
403
  }
404
- function Be(e, t, n) {
404
+ function Ve(e, t, n) {
405
405
  return new he(e, t && h(new m(".", t)), h(n));
406
406
  }
407
- function W(e, t, n) {
407
+ function U(e, t, n) {
408
408
  return new ge(h(new m(".", t)), e, n && h(n));
409
409
  }
410
- function Ve(e, t, n, r, i) {
410
+ function He(e, t, n, r, i) {
411
411
  throw new M(e, `request is not a valid match in pattern "${t}" for the "${r ? "imports" : "exports"}" resolution of ${h(n)}`, i && h(i));
412
412
  }
413
- function G(e, t, n, r, i) {
413
+ function W(e, t, n, r, i) {
414
414
  return t = typeof t == "object" && t ? JSON.stringify(t, null, "") : `${t}`, new me(h(new m(".", n)), e, t, r, i && h(i));
415
415
  }
416
- function He(e, t, n, r, i, a, o, s, c) {
417
- if (t !== "" && !a && e.at(-1) !== "/") throw G(n, e, r, o, i);
416
+ function Ue(e, t, n, r, i, a, o, s, c) {
417
+ if (t !== "" && !a && e.at(-1) !== "/") throw W(n, e, r, o, i);
418
418
  if (!e.startsWith("./")) {
419
419
  if (o && !e.startsWith("../") && !e.startsWith("/")) {
420
420
  let n = !1;
421
421
  try {
422
422
  new m(e), n = !0;
423
423
  } catch {}
424
- if (!n) return Xe(a ? B.call(V, e, () => t) : e + t, r, c);
424
+ if (!n) return Ze(a ? L.call(R, e, () => t) : e + t, r, c);
425
425
  }
426
- throw G(n, e, r, o, i);
426
+ throw W(n, e, r, o, i);
427
427
  }
428
- if (Ae.exec(e.slice(2)) !== null) {
429
- if (je.exec(e.slice(2)) === null) {
428
+ if (Ne.exec(e.slice(2)) !== null) {
429
+ if (Pe.exec(e.slice(2)) === null) {
430
430
  if (!s) {
431
431
  let s = a ? n.replace("*", () => t) : n + t;
432
- Ie(a ? B.call(V, e, () => t) : e, s, n, r, o, i, !0);
432
+ z(a ? L.call(R, e, () => t) : e, s, n, r, o, i, !0);
433
433
  }
434
- } else throw G(n, e, r, o, i);
434
+ } else throw W(n, e, r, o, i);
435
435
  }
436
436
  let l = new m(e, r), u = l.pathname, d = new m(".", r).pathname;
437
- if (!u.startsWith(d)) throw G(n, e, r, o, i);
437
+ if (!u.startsWith(d)) throw W(n, e, r, o, i);
438
438
  if (t === "") return l;
439
- if (Ae.exec(t) !== null) {
439
+ if (Ne.exec(t) !== null) {
440
440
  let c = a ? n.replace("*", () => t) : n + t;
441
- je.exec(t) === null ? s || Ie(a ? B.call(V, e, () => t) : e, c, n, r, o, i, !1) : Ve(c, n, r, o, i);
441
+ Pe.exec(t) === null ? s || z(a ? L.call(R, e, () => t) : e, c, n, r, o, i, !1) : He(c, n, r, o, i);
442
442
  }
443
- return a ? new m(B.call(V, l.href, () => t)) : new m(t, l);
443
+ return a ? new m(L.call(R, l.href, () => t)) : new m(t, l);
444
444
  }
445
- function Ue(e) {
445
+ function We(e) {
446
446
  let t = Number(e);
447
447
  return `${t}` === e && t >= 0 && t < 4294967295;
448
448
  }
449
- function K(e, t, n, r, i, a, o, s, c) {
450
- if (typeof t == "string") return He(t, n, r, e, i, a, o, s, c);
449
+ function G(e, t, n, r, i, a, o, s, c) {
450
+ if (typeof t == "string") return Ue(t, n, r, e, i, a, o, s, c);
451
451
  if (Array.isArray(t)) {
452
452
  let l = t;
453
453
  if (l.length === 0) return null;
@@ -455,7 +455,7 @@ function K(e, t, n, r, i, a, o, s, c) {
455
455
  for (; ++d < l.length;) {
456
456
  let t = l[d], f;
457
457
  try {
458
- f = K(e, t, n, r, i, a, o, s, c);
458
+ f = G(e, t, n, r, i, a, o, s, c);
459
459
  } catch (e) {
460
460
  let t = e;
461
461
  if (u = t, t.code === "ERR_INVALID_PACKAGE_TARGET") continue;
@@ -476,12 +476,12 @@ function K(e, t, n, r, i, a, o, s, c) {
476
476
  let l = Object.getOwnPropertyNames(t), u = -1;
477
477
  for (; ++u < l.length;) {
478
478
  let t = l[u];
479
- if (Ue(t)) throw new N(h(e), h(i), "\"exports\" cannot contain numeric property keys.");
479
+ if (We(t)) throw new N(h(e), h(i), "\"exports\" cannot contain numeric property keys.");
480
480
  }
481
481
  for (u = -1; ++u < l.length;) {
482
482
  let d = l[u];
483
483
  if (d === "default" || c && c.has(d)) {
484
- let l = t[d], u = K(e, l, n, r, i, a, o, s, c);
484
+ let l = t[d], u = G(e, l, n, r, i, a, o, s, c);
485
485
  if (u === void 0) continue;
486
486
  return u;
487
487
  }
@@ -489,9 +489,9 @@ function K(e, t, n, r, i, a, o, s, c) {
489
489
  return;
490
490
  }
491
491
  if (t === null) return null;
492
- throw G(r, t, e, o, i);
492
+ throw W(r, t, e, o, i);
493
493
  }
494
- function We(e, t, n) {
494
+ function Ge(e, t, n) {
495
495
  if (typeof e == "string" || Array.isArray(e)) return !0;
496
496
  if (typeof e != "object" || !e) return !1;
497
497
  let r = Object.getOwnPropertyNames(e), i = !1, a = 0, o = -1;
@@ -502,47 +502,47 @@ function We(e, t, n) {
502
502
  }
503
503
  return i;
504
504
  }
505
- function Ge(e, t, n) {
505
+ function Ke(e, t, n) {
506
506
  if (y.noDeprecation) return;
507
507
  let r = h(t);
508
- Pe.has(r + "|" + e) || (Pe.add(r + "|" + e), y.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${n ? ` imported from ${h(n)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155"));
508
+ Le.has(r + "|" + e) || (Le.add(r + "|" + e), y.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${n ? ` imported from ${h(n)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155"));
509
509
  }
510
- function Ke(e, t, n, r, i) {
510
+ function qe(e, t, n, r, i) {
511
511
  let a = n.exports;
512
- if (We(a, e, r) && (a = { ".": a }), ke.call(a, t) && !t.includes("*") && !t.endsWith("/")) {
513
- let n = a[t], o = K(e, n, "", t, r, !1, !1, !1, i);
514
- if (o == null) throw W(t, e, r);
512
+ if (Ge(a, e, r) && (a = { ".": a }), Me.call(a, t) && !t.includes("*") && !t.endsWith("/")) {
513
+ let n = a[t], o = G(e, n, "", t, r, !1, !1, !1, i);
514
+ if (o == null) throw U(t, e, r);
515
515
  return o;
516
516
  }
517
517
  let o = "", s = "", c = Object.getOwnPropertyNames(a), l = -1;
518
518
  for (; ++l < c.length;) {
519
519
  let n = c[l], i = n.indexOf("*");
520
520
  if (i !== -1 && t.startsWith(n.slice(0, i))) {
521
- t.endsWith("/") && Ge(t, e, r);
521
+ t.endsWith("/") && Ke(t, e, r);
522
522
  let a = n.slice(i + 1);
523
- t.length >= n.length && t.endsWith(a) && qe(o, n) === 1 && n.lastIndexOf("*") === i && (o = n, s = t.slice(i, t.length - a.length));
523
+ t.length >= n.length && t.endsWith(a) && Je(o, n) === 1 && n.lastIndexOf("*") === i && (o = n, s = t.slice(i, t.length - a.length));
524
524
  }
525
525
  }
526
526
  if (o) {
527
- let n = a[o], c = K(e, n, s, o, r, !0, !1, t.endsWith("/"), i);
528
- if (c == null) throw W(t, e, r);
527
+ let n = a[o], c = G(e, n, s, o, r, !0, !1, t.endsWith("/"), i);
528
+ if (c == null) throw U(t, e, r);
529
529
  return c;
530
530
  }
531
- throw W(t, e, r);
531
+ throw U(t, e, r);
532
532
  }
533
- function qe(e, t) {
533
+ function Je(e, t) {
534
534
  let n = e.indexOf("*"), r = t.indexOf("*"), i = n === -1 ? e.length : n + 1, a = r === -1 ? t.length : r + 1;
535
535
  return i > a ? -1 : a > i || n === -1 ? 1 : r === -1 || e.length > t.length ? -1 : +(t.length > e.length);
536
536
  }
537
- function Je(e, t, n) {
537
+ function Ye(e, t, n) {
538
538
  if (e === "#" || e.endsWith("/")) throw new M(e, "is not a valid internal imports specifier name", h(t));
539
- let r, i = z(t);
539
+ let r, i = I(t);
540
540
  if (i.exists) {
541
541
  r = g(i.pjsonPath);
542
542
  let a = i.imports;
543
543
  if (a) {
544
- if (ke.call(a, e) && !e.includes("*")) {
545
- let i = K(r, a[e], "", e, t, !1, !0, !1, n);
544
+ if (Me.call(a, e) && !e.includes("*")) {
545
+ let i = G(r, a[e], "", e, t, !1, !0, !1, n);
546
546
  if (i != null) return i;
547
547
  } else {
548
548
  let i = "", o = "", s = Object.getOwnPropertyNames(a), c = -1;
@@ -550,80 +550,80 @@ function Je(e, t, n) {
550
550
  let t = s[c], n = t.indexOf("*");
551
551
  if (n !== -1 && e.startsWith(t.slice(0, n))) {
552
552
  let r = t.slice(n + 1);
553
- e.length >= t.length && e.endsWith(r) && qe(i, t) === 1 && t.lastIndexOf("*") === n && (i = t, o = e.slice(n, e.length - r.length));
553
+ e.length >= t.length && e.endsWith(r) && Je(i, t) === 1 && t.lastIndexOf("*") === n && (i = t, o = e.slice(n, e.length - r.length));
554
554
  }
555
555
  }
556
556
  if (i) {
557
- let e = a[i], s = K(r, e, o, i, t, !0, !0, !1, n);
557
+ let e = a[i], s = G(r, e, o, i, t, !0, !0, !1, n);
558
558
  if (s != null) return s;
559
559
  }
560
560
  }
561
561
  }
562
562
  }
563
- throw Be(e, r, t);
563
+ throw Ve(e, r, t);
564
564
  }
565
- function Ye(e, t) {
565
+ function Xe(e, t) {
566
566
  let n = e.indexOf("/"), r = !0, i = !1;
567
567
  e[0] === "@" && (i = !0, n === -1 || e.length === 0 ? r = !1 : n = e.indexOf("/", n + 1));
568
568
  let a = n === -1 ? e : e.slice(0, n);
569
- if (Me.exec(a) !== null && (r = !1), !r) throw new M(e, "is not a valid package name", h(t));
569
+ if (Fe.exec(a) !== null && (r = !1), !r) throw new M(e, "is not a valid package name", h(t));
570
570
  return {
571
571
  packageName: a,
572
572
  packageSubpath: "." + (n === -1 ? "" : e.slice(n)),
573
573
  isScoped: i
574
574
  };
575
575
  }
576
- function Xe(e, t, n) {
577
- if (D.includes(e)) return new m("node:" + e);
578
- let { packageName: r, packageSubpath: i, isScoped: a } = Ye(e, t), o = z(t);
579
- if (o.exists && o.name === r && o.exports !== void 0 && o.exports !== null) return Ke(g(o.pjsonPath), i, o, t, n);
576
+ function Ze(e, t, n) {
577
+ if (E.includes(e)) return new m("node:" + e);
578
+ let { packageName: r, packageSubpath: i, isScoped: a } = Xe(e, t), o = I(t);
579
+ if (o.exists && o.name === r && o.exports !== void 0 && o.exports !== null) return qe(g(o.pjsonPath), i, o, t, n);
580
580
  let s = new m("./node_modules/" + r + "/package.json", t), c = h(s), l;
581
581
  do {
582
- let o = H(c.slice(0, -13));
582
+ let o = V(c.slice(0, -13));
583
583
  if (!o || !o.isDirectory()) {
584
584
  l = c, s = new m((a ? "../../../../node_modules/" : "../../../node_modules/") + r + "/package.json", s), c = h(s);
585
585
  continue;
586
586
  }
587
- let u = R(c, {
587
+ let u = xe(c, {
588
588
  base: t,
589
589
  specifier: e
590
590
  });
591
- return u.exports !== void 0 && u.exports !== null ? Ke(s, i, u, t, n) : i === "." ? Re(s, u, t) : new m(i, s);
591
+ return u.exports !== void 0 && u.exports !== null ? qe(s, i, u, t, n) : i === "." ? ze(s, u, t) : new m(i, s);
592
592
  } while (c.length !== l.length);
593
593
  throw new P(r, h(t), !1);
594
594
  }
595
- function Ze(e) {
595
+ function Qe(e) {
596
596
  return !(e[0] !== "." || e.length !== 1 && e[1] !== "/" && (e[1] !== "." || e.length !== 2 && e[2] !== "/"));
597
597
  }
598
- function Qe(e) {
599
- return e === "" ? !1 : e[0] === "/" || Ze(e);
598
+ function $e(e) {
599
+ return e === "" ? !1 : e[0] === "/" || Qe(e);
600
600
  }
601
- function $e(e, t, n, r) {
601
+ function et(e, t, n, r) {
602
602
  let i = t.protocol, a = i === "data:", o;
603
- if (Qe(e)) try {
603
+ if ($e(e)) try {
604
604
  o = new m(e, t);
605
605
  } catch (n) {
606
- let r = new F(e, t);
606
+ let r = new ve(e, t);
607
607
  throw r.cause = n, r;
608
608
  }
609
- else if (i === "file:" && e[0] === "#") o = Je(e, t, n);
609
+ else if (i === "file:" && e[0] === "#") o = Ye(e, t, n);
610
610
  else try {
611
611
  o = new m(e);
612
612
  } catch (r) {
613
- if (a && !D.includes(e)) {
614
- let n = new F(e, t);
613
+ if (a && !E.includes(e)) {
614
+ let n = new ve(e, t);
615
615
  throw n.cause = r, n;
616
616
  }
617
- o = Xe(e, t, n);
617
+ o = Ze(e, t, n);
618
618
  }
619
- return v.ok(o !== void 0, "expected to be defined"), o.protocol === "file:" ? ze(o, t, r) : o;
619
+ return v.ok(o !== void 0, "expected to be defined"), o.protocol === "file:" ? Be(o, t, r) : o;
620
620
  }
621
- var et = /* #__PURE__ */ new Set(["node", "import"]), tt = "2:6:import4:node", nt = process.platform === "win32", rt = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
622
- function it(e, t) {
623
- let n = ht(e);
621
+ var tt = /* #__PURE__ */ new Set(["node", "import"]), nt = "2:6:import4:node", rt = process.platform === "win32", it = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
622
+ function at(e, t) {
623
+ let n = gt(e);
624
624
  if ("external" in n) return n.external;
625
625
  let r = n.specifier, i = n.url, o = n.absolutePath, c, l;
626
- if (t?.cache !== !1 && (c = ut(o || r, t), l = t?.cache && typeof t?.cache == "object" ? t.cache : rt), l) {
626
+ if (t?.cache !== !1 && (c = dt(o || r, t), l = t?.cache && typeof t?.cache == "object" ? t.cache : it), l) {
627
627
  let e = l.get(c);
628
628
  if (typeof e == "string") return e;
629
629
  if (e instanceof Error) {
@@ -637,41 +637,41 @@ function it(e, t) {
637
637
  } catch (e) {
638
638
  if (e?.code !== "ENOENT") throw l && l.set(c, e), e;
639
639
  }
640
- let u = t?.conditions ? new Set(t.conditions) : et, d = r || i.href, f = st(t?.from), p = t?.suffixes || [""], m = t?.extensions ? ["", ...t.extensions] : [""], h;
640
+ let u = t?.conditions ? new Set(t.conditions) : tt, d = r || i.href, f = ct(t?.from), p = t?.suffixes || [""], m = t?.extensions ? ["", ...t.extensions] : [""], h;
641
641
  for (let e of f) {
642
642
  for (let t of p) {
643
- let n = ft(d, t);
643
+ let n = pt(d, t);
644
644
  n === "." && (n += "/.");
645
- for (let t of m) if (h = ot(n + t, e, u), h) break;
645
+ for (let t of m) if (h = st(n + t, e, u), h) break;
646
646
  if (h) break;
647
647
  }
648
648
  if (h) break;
649
649
  }
650
650
  if (!h) {
651
- let n = /* @__PURE__ */ Error(`Cannot resolve module "${e}" (from: ${f.map((e) => lt(e)).join(", ")})`);
651
+ let n = /* @__PURE__ */ Error(`Cannot resolve module "${e}" (from: ${f.map((e) => ut(e)).join(", ")})`);
652
652
  if (n.code = "ERR_MODULE_NOT_FOUND", l && l.set(c, n), t?.try) return;
653
653
  throw n;
654
654
  }
655
655
  return l && l.set(c, h.href), h.href;
656
656
  }
657
- function at(e, t) {
658
- let n = it(e, t);
657
+ function ot(e, t) {
658
+ let n = at(e, t);
659
659
  if (!n || !n.startsWith("file://") && t?.try) return;
660
660
  let r = h(n);
661
- return nt ? pt(r) : r;
661
+ return rt ? mt(r) : r;
662
662
  }
663
- function ot(e, t, n) {
663
+ function st(e, t, n) {
664
664
  try {
665
- return $e(e, t, n);
665
+ return et(e, t, n);
666
666
  } catch {}
667
667
  }
668
- function st(e) {
669
- let t = (Array.isArray(e) ? e : [e]).flatMap((e) => ct(e));
668
+ function ct(e) {
669
+ let t = (Array.isArray(e) ? e : [e]).flatMap((e) => lt(e));
670
670
  return t.length === 0 ? [g("./")] : t;
671
671
  }
672
- function ct(e) {
672
+ function lt(e) {
673
673
  if (!e) return [];
674
- if (mt(e)) return [e];
674
+ if (ht(e)) return [e];
675
675
  if (typeof e != "string") return [];
676
676
  if (/^(?:node|data|http|https|file):/.test(e)) return new URL(e);
677
677
  try {
@@ -680,21 +680,21 @@ function ct(e) {
680
680
  return [g(e + "/"), g(e)];
681
681
  }
682
682
  }
683
- function lt(e) {
683
+ function ut(e) {
684
684
  try {
685
685
  return h(e);
686
686
  } catch {
687
687
  return e;
688
688
  }
689
689
  }
690
- function ut(e, t) {
690
+ function dt(e, t) {
691
691
  let n;
692
- return Array.isArray(t?.from) ? n = t.from : t?.from && (n = [t.from]), q([e]) + dt(t?.conditions) + q(t?.extensions) + q(n) + q(t?.suffixes);
692
+ return Array.isArray(t?.from) ? n = t.from : t?.from && (n = [t.from]), K([e]) + ft(t?.conditions) + K(t?.extensions) + K(n) + K(t?.suffixes);
693
693
  }
694
- function dt(e) {
695
- return e ? q([...new Set(e)].sort()) : tt;
694
+ function ft(e) {
695
+ return e ? K([...new Set(e)].sort()) : nt;
696
696
  }
697
- function q(e) {
697
+ function K(e) {
698
698
  if (!e) return "-";
699
699
  let t = `${e.length}:`;
700
700
  for (let n of e) {
@@ -703,16 +703,16 @@ function q(e) {
703
703
  }
704
704
  return t;
705
705
  }
706
- function ft(e, t) {
706
+ function pt(e, t) {
707
707
  return !e || !t || t === "/" ? e : (e.endsWith("/") ? e : e + "/") + (t.startsWith("/") ? t.slice(1) : t);
708
708
  }
709
- function pt(e) {
709
+ function mt(e) {
710
710
  return e.replace(/\\/g, "/").replace(/^[a-z]:\//, (e) => e.toUpperCase());
711
711
  }
712
- function mt(e) {
712
+ function ht(e) {
713
713
  return e instanceof URL || e?.constructor?.name === "URL";
714
714
  }
715
- function ht(e) {
715
+ function gt(e) {
716
716
  if (typeof e == "string") {
717
717
  if (e.startsWith("file:")) {
718
718
  let t = new URL(e);
@@ -724,9 +724,9 @@ function ht(e) {
724
724
  return t(e) ? {
725
725
  url: g(e),
726
726
  absolutePath: e
727
- } : /^(?:node|data|http|https):/.test(e) ? { external: e } : D.includes(e) && !e.includes(":") ? { external: `node:${e}` } : { specifier: e };
727
+ } : /^(?:node|data|http|https):/.test(e) ? { external: e } : E.includes(e) && !e.includes(":") ? { external: `node:${e}` } : { specifier: e };
728
728
  }
729
- if (mt(e)) return e.protocol === "file:" ? {
729
+ if (ht(e)) return e.protocol === "file:" ? {
730
730
  url: e,
731
731
  absolutePath: h(e)
732
732
  } : { external: e.href };
@@ -734,28 +734,28 @@ function ht(e) {
734
734
  }
735
735
  //#endregion
736
736
  //#region ../../node_modules/.pnpm/rc9@3.1.0/node_modules/rc9/dist/_chunks/libs/flat.mjs
737
- function gt(e) {
737
+ function _t(e) {
738
738
  return e && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
739
739
  }
740
- function _t(e) {
740
+ function vt(e) {
741
741
  return e;
742
742
  }
743
- function vt(e, t) {
743
+ function yt(e, t) {
744
744
  t ||= {};
745
- let n = t.delimiter || ".", r = t.maxDepth, i = t.transformKey || _t, a = {};
745
+ let n = t.delimiter || ".", r = t.maxDepth, i = t.transformKey || vt, a = {};
746
746
  function o(e, s, c) {
747
747
  c ||= 1, Object.keys(e).forEach(function(l) {
748
- let u = e[l], d = t.safe && Array.isArray(u), f = Object.prototype.toString.call(u), p = gt(u), m = f === "[object Object]" || f === "[object Array]", h = s ? s + n + i(l) : i(l);
748
+ let u = e[l], d = t.safe && Array.isArray(u), f = Object.prototype.toString.call(u), p = _t(u), m = f === "[object Object]" || f === "[object Array]", h = s ? s + n + i(l) : i(l);
749
749
  if (!d && !p && m && Object.keys(u).length && (!t.maxDepth || c < r)) return o(u, h, c + 1);
750
750
  a[h] = u;
751
751
  });
752
752
  }
753
753
  return o(e), a;
754
754
  }
755
- function yt(e, t) {
755
+ function bt(e, t) {
756
756
  t ||= {};
757
- let n = t.delimiter || ".", r = t.overwrite || !1, i = t.transformKey || _t, a = {};
758
- if (gt(e) || Object.prototype.toString.call(e) !== "[object Object]") return e;
757
+ let n = t.delimiter || ".", r = t.overwrite || !1, i = t.transformKey || vt, a = {};
758
+ if (_t(e) || Object.prototype.toString.call(e) !== "[object Object]") return e;
759
759
  function o(e) {
760
760
  let n = Number(e);
761
761
  return isNaN(n) || e.indexOf(".") !== -1 || t.object ? e : n;
@@ -773,7 +773,7 @@ function yt(e, t) {
773
773
  }
774
774
  return e = Object.keys(e).reduce(function(n, r) {
775
775
  let i = Object.prototype.toString.call(e[r]);
776
- return i !== "[object Object]" && i !== "[object Array]" || c(e[r]) ? (n[r] = e[r], n) : s(r, n, vt(e[r], t));
776
+ return i !== "[object Object]" && i !== "[object Array]" || c(e[r]) ? (n[r] = e[r], n) : s(r, n, yt(e[r], t));
777
777
  }, {}), Object.keys(e).forEach(function(s) {
778
778
  let c = s.split(n).map(i), l = o(c.shift()), u = o(c[0]), d = a;
779
779
  for (; u !== void 0;) {
@@ -782,23 +782,23 @@ function yt(e, t) {
782
782
  if (!r && !n && d[l] !== void 0) return;
783
783
  (r && !n || !r && d[l] == null) && (d[l] = typeof u == "number" && !t.object ? [] : {}), d = d[l], c.length > 0 && (l = o(c.shift()), u = o(c[0]));
784
784
  }
785
- d[l] = yt(e[s], t);
785
+ d[l] = bt(e[s], t);
786
786
  }), a;
787
787
  }
788
788
  //#endregion
789
789
  //#region ../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs
790
- var bt = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, xt = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, St = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
791
- function Ct(e, t) {
790
+ var xt = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, St = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, Ct = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
791
+ function wt(e, t) {
792
792
  if (e === "__proto__" || e === "constructor" && t && typeof t == "object" && "prototype" in t) {
793
- wt(e);
793
+ Tt(e);
794
794
  return;
795
795
  }
796
796
  return t;
797
797
  }
798
- function wt(e) {
798
+ function Tt(e) {
799
799
  console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`);
800
800
  }
801
- function Tt(e, t = {}) {
801
+ function Et(e, t = {}) {
802
802
  if (typeof e != "string") return e;
803
803
  if (e[0] === "\"" && e[e.length - 1] === "\"" && e.indexOf("\\") === -1) return e.slice(1, -1);
804
804
  let n = e.trim();
@@ -811,14 +811,14 @@ function Tt(e, t = {}) {
811
811
  case "infinity": return Infinity;
812
812
  case "-infinity": return -Infinity;
813
813
  }
814
- if (!St.test(e)) {
814
+ if (!Ct.test(e)) {
815
815
  if (t.strict) throw SyntaxError("[destr] Invalid JSON");
816
816
  return e;
817
817
  }
818
818
  try {
819
- if (bt.test(e) || xt.test(e)) {
819
+ if (xt.test(e) || St.test(e)) {
820
820
  if (t.strict) throw Error("[destr] Possible prototype pollution");
821
- return JSON.parse(e, Ct);
821
+ return JSON.parse(e, wt);
822
822
  }
823
823
  return JSON.parse(e);
824
824
  } catch (n) {
@@ -828,43 +828,43 @@ function Tt(e, t = {}) {
828
828
  }
829
829
  //#endregion
830
830
  //#region ../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs
831
- function J(e) {
831
+ function q(e) {
832
832
  if (typeof e != "object" || !e) return !1;
833
833
  let t = Object.getPrototypeOf(e);
834
834
  return t !== null && t !== Object.prototype && Object.getPrototypeOf(t) !== null || Symbol.iterator in e ? !1 : Symbol.toStringTag in e ? Object.prototype.toString.call(e) === "[object Module]" : !0;
835
835
  }
836
- function Y(e, t, n = ".", r) {
837
- if (!J(t)) return Y(e, {}, n, r);
836
+ function J(e, t, n = ".", r) {
837
+ if (!q(t)) return J(e, {}, n, r);
838
838
  let i = { ...t };
839
839
  for (let t of Object.keys(e)) {
840
840
  if (t === "__proto__" || t === "constructor") continue;
841
841
  let a = e[t];
842
- a != null && (r && r(i, t, a, n) || (i[t] = Array.isArray(a) && Array.isArray(i[t]) ? [...a, ...i[t]] : J(a) && J(i[t]) ? Y(a, i[t], (n ? `${n}.` : "") + t.toString(), r) : a));
842
+ a != null && (r && r(i, t, a, n) || (i[t] = Array.isArray(a) && Array.isArray(i[t]) ? [...a, ...i[t]] : q(a) && q(i[t]) ? J(a, i[t], (n ? `${n}.` : "") + t.toString(), r) : a));
843
843
  }
844
844
  return i;
845
845
  }
846
- function Et(e) {
847
- return (...t) => t.reduce((t, n) => Y(t, n, "", e), {});
846
+ function Dt(e) {
847
+ return (...t) => t.reduce((t, n) => J(t, n, "", e), {});
848
848
  }
849
- var X = Et(), Dt = /^\s*([^\s=]+)\s*=\s*(.*)?\s*$/, Ot = /\n|\r|\r\n/, kt = {
849
+ var Y = Dt(), Ot = /^\s*([^\s=]+)\s*=\s*(.*)?\s*$/, kt = /\n|\r|\r\n/, At = {
850
850
  name: ".conf",
851
851
  dir: process.cwd(),
852
852
  flat: !1
853
853
  };
854
- function At(e) {
854
+ function jt(e) {
855
855
  return typeof e == "string" && (e = { name: e }), {
856
- ...kt,
856
+ ...At,
857
857
  ...e
858
858
  };
859
859
  }
860
- function jt(e, t = {}) {
861
- let n = {}, r = e.split(Ot);
860
+ function Mt(e, t = {}) {
861
+ let n = {}, r = e.split(kt);
862
862
  for (let e of r) {
863
- let t = e.match(Dt);
863
+ let t = e.match(Ot);
864
864
  if (!t) continue;
865
865
  let r = t[1];
866
866
  if (!r || r === "__proto__" || r === "constructor") continue;
867
- let i = Tt((t[2] || "").trim());
867
+ let i = Et((t[2] || "").trim());
868
868
  if (r.endsWith("[]")) {
869
869
  let e = r.slice(0, Math.max(0, r.length - 2));
870
870
  n[e] = (n[e] || []).concat(i);
@@ -872,41 +872,42 @@ function jt(e, t = {}) {
872
872
  }
873
873
  n[r] = i;
874
874
  }
875
- return t.flat ? n : yt(n, { overwrite: !0 });
875
+ return t.flat ? n : bt(n, { overwrite: !0 });
876
876
  }
877
- function Mt(e, t) {
878
- return i(e) ? jt(o(e, "utf8"), t) : {};
877
+ function Nt(e, t) {
878
+ return i(e) ? Mt(o(e, "utf8"), t) : {};
879
879
  }
880
- function Z(e) {
881
- return e = At(e), Mt(n(e.dir, e.name), e);
880
+ function X(e) {
881
+ return e = jt(e), Nt(n(e.dir, e.name), e);
882
882
  }
883
- function Nt() {
883
+ function Pt() {
884
884
  return process.env.XDG_CONFIG_HOME || n(_(), ".config");
885
885
  }
886
- function Pt(e) {
887
- return e = At(e), e.dir = Nt(), Z(e);
886
+ function Ft(e) {
887
+ return e = jt(e), e.dir = Pt(), X(e);
888
888
  }
889
889
  //#endregion
890
- //#region ../../node_modules/.pnpm/c12@4.0.0-rc.1_magicast@0.5.4/node_modules/c12/dist/index.mjs
891
- async function Ft(e) {
892
- let t = e.env ?? process.env, n = await It({
890
+ //#region ../../node_modules/.pnpm/c12@4.0.0-rc.2_magicast@0.5.4/node_modules/c12/dist/index.mjs
891
+ async function It(e) {
892
+ let t = e.env ?? process.env, n = await Lt({
893
893
  cwd: e.cwd,
894
894
  fileName: e.fileName ?? ".env",
895
895
  env: t,
896
896
  interpolate: e.interpolate ?? !0,
897
- expandFileReferences: e.expandFileReferences ?? !1
898
- }), r = zt(t);
897
+ expandFileReferences: e.expandFileReferences ?? !1,
898
+ parse: e.parse
899
+ }), r = Wt(t);
899
900
  for (let e in n) e.startsWith("_") || (t[e] === void 0 || r.has(e)) && (t[e] = n[e]);
900
901
  return n;
901
902
  }
902
- async function It(e) {
903
- let t = Object.create(null), n = C(e.cwd || "."), r = e.fileName || ".env", i = typeof r == "string" ? [r] : r, a = zt(e.env || {});
903
+ async function Lt(e) {
904
+ let t = Object.create(null), n = C(e.cwd || "."), r = e.fileName || ".env", i = typeof r == "string" ? [r] : r, a = Wt(e.env || {});
904
905
  Object.assign(t, e.env);
905
- for (let e of i) {
906
- let r = C(n, e);
907
- if (!c(r, { throwIfNoEntry: !1 })?.isFile()) continue;
908
- let i = await Lt(r);
909
- for (let e in i) e in t && !a.has(e) || (t[e] = i[e], a.add(e));
906
+ for (let r of i) {
907
+ let i = C(n, r);
908
+ if (!c(i, { throwIfNoEntry: !1 })?.isFile()) continue;
909
+ let o = await Rt(i, e.parse);
910
+ for (let e in o) e in t && !a.has(e) || (t[e] = o[e], a.add(e));
910
911
  }
911
912
  if (e.expandFileReferences) {
912
913
  for (let e in t) if (e.endsWith("_FILE")) {
@@ -917,49 +918,117 @@ async function It(e) {
917
918
  }
918
919
  }
919
920
  }
920
- return e.interpolate && Rt(t), t;
921
+ return e.interpolate && zt(t), t;
921
922
  }
922
- var Q = d.parseEnv;
923
- async function Lt(e) {
924
- let t = o(e, "utf8");
925
- if (!Q) try {
923
+ var Z = d.parseEnv;
924
+ async function Rt(e, t) {
925
+ let n = o(e, "utf8");
926
+ if (t) return t(n);
927
+ if (!Z) try {
926
928
  let e = await import("./__vite-optional-peer-dep_dotenv_c12-CxKvRg9-.js");
927
- Q = (t) => e.parse(t);
929
+ Z = (t) => e.parse(t);
928
930
  } catch {
929
- throw Error("Failed to parse .env file: `node:util.parseEnv` is not available and `dotenv` package is not installed. Please upgrade your runtime or install `dotenv` as a dependency.");
931
+ throw Error("Failed to parse .env file: `node:util.parseEnv` is not available and `dotenv` package is not installed. Please upgrade your runtime, install `dotenv` as a dependency or provide a custom `parse` option.");
930
932
  }
931
- return Q(t);
933
+ return Z(n);
932
934
  }
933
- function Rt(e, t = {}, n = (e) => e) {
935
+ function zt(e, t = {}, n = (e) => e) {
934
936
  function r(n) {
935
937
  return t[n] === void 0 ? e[n] : t[n];
936
938
  }
937
939
  function i(e, t = []) {
938
- return typeof e == "string" ? n((e.match(/(.?\${?(?:[\w:]+)?}?)/g) || []).reduce((e, n) => {
939
- let a = /(.?)\${?([\w:]+)?}?/g.exec(n) || [], o = a[1], s, c;
940
- if (o === "\\") c = a[0] || "", s = c.replace(String.raw`\$`, "$");
941
- else {
942
- let e = a[2];
943
- if (c = (a[0] || "").slice(o.length), t.includes(e)) return console.warn(`Please avoid recursive environment variables ( loop: ${t.join(" > ")} > ${e} )`), "";
944
- s = r(e), s = i(s, [...t, e]);
940
+ if (typeof e != "string") return e;
941
+ let a = "", o = 0;
942
+ for (; o < e.length;) {
943
+ let n = e[o];
944
+ if (n === "\\" && e[o + 1] === "$") {
945
+ a += "$", o += 2;
946
+ continue;
947
+ }
948
+ let s = n === "$" ? Ht(e, o) : void 0;
949
+ if (!s) {
950
+ a += n, o++;
951
+ continue;
952
+ }
953
+ if (t.includes(s.key)) {
954
+ if (s.defaultValue !== void 0) {
955
+ a += i(s.defaultValue, t), o = s.end;
956
+ continue;
957
+ }
958
+ return console.warn(`Please avoid recursive environment variables ( loop: ${t.join(" > ")} > ${s.key} )`), "";
945
959
  }
946
- return s === void 0 ? e : e.replace(c, s);
947
- }, e)) : e;
960
+ let c = i(r(s.key), [...t, s.key]);
961
+ s.defaultValue !== void 0 && (c === void 0 || s.operator === ":-" && c === "") && (c = i(s.defaultValue, t)), a += c === void 0 ? e.slice(o, s.end) : c, o = s.end;
962
+ }
963
+ return n(a);
948
964
  }
949
965
  for (let t in e) e[t] = i(r(t));
950
966
  }
951
- function zt(e) {
967
+ var Bt = /\w+/y, Vt = /[\w:]+/y;
968
+ function Ht(e, t) {
969
+ let n = t + 1, r = e[n] === "{";
970
+ r && n++;
971
+ let i = r ? Vt : Bt;
972
+ i.lastIndex = n;
973
+ let a = i.exec(e);
974
+ if (!a) return;
975
+ let o = a[0];
976
+ if (n = i.lastIndex, !r) return {
977
+ key: o,
978
+ end: n
979
+ };
980
+ if (e[n] === "}") return {
981
+ key: o,
982
+ end: n + 1
983
+ };
984
+ if (e[n] === "-") {
985
+ let t = "-";
986
+ o.endsWith(":") && (o = o.slice(0, -1), t = ":-");
987
+ let r = o ? Ut(e, n + 1) : void 0;
988
+ return r ? {
989
+ key: o,
990
+ operator: t,
991
+ defaultValue: r.value,
992
+ end: r.end
993
+ } : void 0;
994
+ }
995
+ return {
996
+ key: o,
997
+ end: n
998
+ };
999
+ }
1000
+ function Ut(e, t) {
1001
+ let n = "", r = 1;
1002
+ for (let i = t; i < e.length; i++) {
1003
+ let t = e[i];
1004
+ if (t === "\\" && i + 1 < e.length) {
1005
+ let r = e[i + 1];
1006
+ n += r === "{" || r === "}" ? r : t + r, i++;
1007
+ continue;
1008
+ }
1009
+ if (t === "$" && e[i + 1] === "{") {
1010
+ r++, n += "${", i++;
1011
+ continue;
1012
+ }
1013
+ if (t === "{" && r++, t === "}" && (r--, r === 0)) return {
1014
+ value: n,
1015
+ end: i + 1
1016
+ };
1017
+ n += t;
1018
+ }
1019
+ }
1020
+ function Wt(e) {
952
1021
  let t = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();
953
1022
  return t.has(e) || t.set(e, /* @__PURE__ */ new Set()), t.get(e);
954
1023
  }
955
- var Bt = (e) => e?.replace(/\\/g, "/"), Vt = 0, Ht = {
1024
+ var Q = (e) => e?.replace(/\\/g, "/"), Gt = 0, Kt = {
956
1025
  ".json": () => JSON.parse,
957
1026
  ".yaml": () => import("./yaml-N2dF3WHm.js").then((e) => e.parseYAML),
958
1027
  ".yml": () => import("./yaml-N2dF3WHm.js").then((e) => e.parseYAML),
959
1028
  ".jsonc": () => import("./jsonc-BdzClvC8.js").then((e) => e.n).then((e) => (t) => e.parseJSONC(t, { allowTrailingComma: !0 })),
960
1029
  ".json5": () => import("./json5-feUuPtTt.js").then((e) => e.parseJSON5),
961
1030
  ".toml": () => import("./toml-BERh2MAo.js").then((e) => e.parseTOML)
962
- }, Ut = Object.freeze([
1031
+ }, qt = Object.freeze([
963
1032
  ".js",
964
1033
  ".ts",
965
1034
  ".mjs",
@@ -973,12 +1042,12 @@ var Bt = (e) => e?.replace(/\\/g, "/"), Vt = 0, Ht = {
973
1042
  ".yml",
974
1043
  ".toml"
975
1044
  ]);
976
- async function Wt(e) {
1045
+ async function Jt(e) {
977
1046
  e.cwd = C(process.cwd(), e.cwd || "."), e.name = e.name || "config", e.envName = e.envName ?? process.env.NODE_ENV, e.configFile = e.configFile ?? (e.name === "config" ? "config" : `${e.name}.config`), e.rcFile = e.rcFile ?? `.${e.name}rc`, e.extend !== !1 && (e.extend = {
978
1047
  extendKey: "extends",
979
1048
  ...e.extend
980
1049
  });
981
- let t = e.merger || X, n = {
1050
+ let t = e.merger || Y, n = {
982
1051
  config: {},
983
1052
  cwd: e.cwd,
984
1053
  configFile: C(e.cwd, e.configFile),
@@ -991,22 +1060,22 @@ async function Wt(e) {
991
1060
  packageJson: void 0,
992
1061
  defaultConfig: e.defaultConfig
993
1062
  };
994
- e.dotenv && await Ft({
1063
+ e.dotenv && await It({
995
1064
  cwd: e.cwd,
996
1065
  ...e.dotenv === !0 ? {} : e.dotenv
997
1066
  });
998
- let i = await Jt(".", e);
1067
+ let i = await Qt(".", e);
999
1068
  if (i.configFile && (r.main = i.config, n.configFile = i.configFile, n._configFile = i._configFile), i.meta && (n.meta = i.meta), e.rcFile) {
1000
1069
  let n = [];
1001
- if (n.push(Z({
1070
+ if (n.push(X({
1002
1071
  name: e.rcFile,
1003
1072
  dir: e.cwd
1004
1073
  })), e.globalRc) {
1005
- let { findWorkspaceDir: t } = await import("./dist-BvTGFq3F.js"), r = await t(e.cwd).catch(() => {});
1006
- r && n.push(Z({
1074
+ let { findWorkspaceDir: t } = await import("./dist-DAXzdDML.js"), r = await t(e.cwd).catch(() => {});
1075
+ r && n.push(X({
1007
1076
  name: e.rcFile,
1008
1077
  dir: r
1009
- })), n.push(Pt({ name: e.rcFile })), n.push(Z({
1078
+ })), n.push(Ft({ name: e.rcFile })), n.push(X({
1010
1079
  name: e.rcFile,
1011
1080
  dir: _()
1012
1081
  }));
@@ -1014,7 +1083,7 @@ async function Wt(e) {
1014
1083
  r.rc = t({}, ...n);
1015
1084
  }
1016
1085
  if (e.packageJson) {
1017
- let n = (Array.isArray(e.packageJson) ? e.packageJson : [typeof e.packageJson == "string" ? e.packageJson : e.name]).filter((e) => e && typeof e == "string"), { readPackageJSON: i } = await import("./dist-BvTGFq3F.js"), a = await i(e.cwd).catch(() => {});
1086
+ let n = (Array.isArray(e.packageJson) ? e.packageJson : [typeof e.packageJson == "string" ? e.packageJson : e.name]).filter((e) => e && typeof e == "string"), { readPackageJSON: i } = await import("./dist-DAXzdDML.js"), a = await i(e.cwd).catch(() => {});
1018
1087
  r.packageJson = t({}, ...n.map((e) => a?.[e]));
1019
1088
  }
1020
1089
  let a = {};
@@ -1025,7 +1094,7 @@ async function Wt(e) {
1025
1094
  rawConfigs: r
1026
1095
  }) : t);
1027
1096
  }
1028
- if (Array.isArray(a.main) ? n.config = a.main : (n.config = t(a.overrides, a.main, a.rc, a.packageJson, a.defaultConfig), e.extend && (await Gt(n.config, e), n.layers = n.config._layers, delete n.config._layers, n.config = t(n.config, ...n.layers.map((e) => e.config)))), n.layers = [...[
1097
+ if (Array.isArray(a.main) ? n.config = a.main : (n.config = t(a.overrides, a.main, a.rc, a.packageJson, a.defaultConfig), e.extend && (await Yt(n.config, e), n.layers = n.config._layers, delete n.config._layers, n.config = t(n.config, ...n.layers.map((e) => e.config)))), n.layers = [...[
1029
1098
  a.overrides && {
1030
1099
  config: a.overrides,
1031
1100
  configFile: void 0,
@@ -1046,9 +1115,9 @@ async function Wt(e) {
1046
1115
  }
1047
1116
  ].filter((e) => e && e.config), ...n.layers], e.defaults && (n.config = t(n.config, e.defaults)), e.omit$Keys) for (let e in n.config) e.startsWith("$") && delete n.config[e];
1048
1117
  if (e.configFileRequired && !n._configFile) throw Error(`Required config (${n.configFile}) cannot be resolved.`);
1049
- return n;
1118
+ return e.schema != null && (n.config = await $t(n.config, e.schema)), n;
1050
1119
  }
1051
- async function Gt(e, t) {
1120
+ async function Yt(e, t) {
1052
1121
  if (e._layers = e._layers || [], !t.extend) return;
1053
1122
  let n = t.extend.extendKey;
1054
1123
  typeof n == "string" && (n = [n]);
@@ -1060,37 +1129,37 @@ async function Gt(e, t) {
1060
1129
  console.warn(`Cannot extend config from \`${JSON.stringify(r)}\` in ${t.cwd}`);
1061
1130
  continue;
1062
1131
  }
1063
- let a = await Jt(n, t, i);
1132
+ let a = await Qt(n, t, i);
1064
1133
  if (!a.config) {
1065
1134
  console.warn(`Cannot extend config from \`${n}\` in ${t.cwd}`);
1066
1135
  continue;
1067
1136
  }
1068
- await Gt(a.config, {
1137
+ await Yt(a.config, {
1069
1138
  ...t,
1070
1139
  cwd: a.cwd
1071
1140
  }), e._layers.push(a), a.config._layers && (e._layers.push(...a.config._layers), delete a.config._layers);
1072
1141
  }
1073
1142
  }
1074
- var Kt = [
1143
+ var Xt = [
1075
1144
  "gh:",
1076
1145
  "github:",
1077
1146
  "gitlab:",
1078
1147
  "bitbucket:",
1079
1148
  "https://",
1080
1149
  "http://"
1081
- ], qt = /^(@[\da-z~-][\d._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*($|\/.*)/;
1082
- async function Jt(e, t, n = {}) {
1150
+ ], Zt = /^(@[\da-z~-][\d._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*($|\/.*)/;
1151
+ async function Qt(e, t, n = {}) {
1083
1152
  if (t.resolve) {
1084
1153
  let n = await t.resolve(e, t);
1085
1154
  if (n) return n;
1086
1155
  }
1087
- let r = t.merger || X, a = Object.keys(n.giget?.providers || {}).map((e) => `${e}:`), o = a.length > 0 ? [.../* @__PURE__ */ new Set([...a, ...Kt])] : Kt;
1156
+ let r = t.merger || Y, a = Object.keys(n.giget?.providers || {}).map((e) => `${e}:`), o = a.length > 0 ? [.../* @__PURE__ */ new Set([...a, ...Xt])] : Xt;
1088
1157
  if (t.giget !== !1 && o.some((t) => e.startsWith(t))) {
1089
1158
  let { downloadTemplate: r } = await import("./__vite-optional-peer-dep_giget_c12-BYcrHYBM.js").catch((t) => {
1090
1159
  throw Error(`Extending config from \`${e}\` requires \`giget\` peer dependency to be installed.\n\nInstall it with: \`npx nypm i giget\``, { cause: t });
1091
- }), { digest: a } = await import("./ohash-CHaRSTtv.js").then((e) => e.dist_exports), o = e.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + a(e).slice(0, 10).replace(/[-_]/g, ""), s, c = C(t.cwd, "node_modules"), l = T(t.cwd);
1092
- s = E(l) === ".c12" ? S(l, o) : i(c) ? S(c, ".c12", o) : process.env.XDG_CACHE_HOME ? C(process.env.XDG_CACHE_HOME, "c12", o) : C(_(), ".cache/c12", o);
1093
- let d = n.install ? X(n.install === !0 ? {} : n.install, { ignoreWorkspace: !0 }) : !1;
1160
+ }), { digest: a } = await import("./ohash-Cc4pJh84.js").then((e) => e.dist_exports), o = e.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + a(e).slice(0, 10).replace(/[-_]/g, ""), s, c = C(t.cwd, "node_modules"), l = T(t.cwd);
1161
+ s = ce(l) === ".c12" ? S(l, o) : i(c) ? S(c, ".c12", o) : process.env.XDG_CACHE_HOME ? C(process.env.XDG_CACHE_HOME, "c12", o) : C(_(), ".cache/c12", o);
1162
+ let d = n.install ? Y(n.install === !0 ? {} : n.install, { ignoreWorkspace: !0 }) : !1;
1094
1163
  i(s) && !d && await u(s, { recursive: !0 }), e = (await r(e, {
1095
1164
  dir: s,
1096
1165
  install: d,
@@ -1100,8 +1169,8 @@ async function Jt(e, t, n = {}) {
1100
1169
  ...n.giget
1101
1170
  })).dir;
1102
1171
  }
1103
- qt.test(e) && (e = $(e, t) || e);
1104
- let s = se(e), c = Yt(C(t.cwd, e)) ?? (!s || s === E(e)), d = C(t.cwd, c ? e : T(e));
1172
+ Zt.test(e) && (e = $(e, t) || e);
1173
+ let s = se(e), c = en(C(t.cwd, e)) ?? (!s || s === ce(e)), d = C(t.cwd, c ? e : T(e));
1105
1174
  c && (e = t.configFile);
1106
1175
  let f = {
1107
1176
  config: void 0,
@@ -1113,74 +1182,81 @@ async function Jt(e, t, n = {}) {
1113
1182
  if (f.configFile = $(C(d, e), t) || $(C(d, ".config", e.replace(/\.config$/, "")), t) || $(C(d, ".config", e), t) || e, !i(f.configFile)) return f;
1114
1183
  f._configFile = f.configFile;
1115
1184
  let p = se(f.configFile) || "";
1116
- if (p in Ht) f.config = (await Ht[p]())(await l(f.configFile, "utf8"));
1185
+ if (p in Kt) f.config = (await Kt[p]())(await l(f.configFile, "utf8"));
1117
1186
  else {
1118
1187
  let e = t.resolveModule || ((e) => e.default || e);
1119
1188
  if (t.import) f.config = e(await t.import(f.configFile));
1120
1189
  else {
1121
1190
  let n = g(f.configFile);
1122
- n.search = `_${++Vt}`, f.config = await import(n.href).then(e, async (n) => {
1191
+ n.search = `_${++Gt}`, f.config = await import(n.href).then(e, async (n) => {
1123
1192
  let { createJiti: r } = await import("./__vite-optional-peer-dep_jiti_c12-DZVJNj6v.js").catch(() => {
1124
1193
  throw Error(`Failed to load config file \`${f.configFile}\`: ${n?.message}. Hint install \`jiti\` for compatibility.`, { cause: n });
1125
1194
  }), i = r(S(t.cwd || ".", t.configFile || "/"), {
1126
1195
  interopDefault: !0,
1127
1196
  moduleCache: !1,
1128
- extensions: [...Ut],
1197
+ extensions: [...qt],
1129
1198
  ...t.jitiOptions
1130
1199
  });
1131
1200
  return t.import = (e) => i.import(e), e(await t.import(f.configFile));
1132
1201
  });
1133
1202
  }
1134
1203
  }
1135
- if (typeof f.config == "function" && (f.config = await f.config(t.context)), t.envName) {
1136
- let e = {
1137
- ...f.config["$" + t.envName],
1138
- ...f.config.$env?.[t.envName]
1139
- };
1140
- Object.keys(e).length > 0 && (f.config = r(e, f.config));
1204
+ typeof f.config == "function" && (f.config = await f.config(t.context)), f.config && typeof f.config == "object" && !Array.isArray(f.config) && !Object.isExtensible(f.config) && (f.config = { ...f.config });
1205
+ let m = (Array.isArray(t.envName) ? t.envName : [t.envName]).filter(Boolean).reverse().flatMap((e) => [f.config.$env?.[e], f.config["$" + e]]).filter((e) => e && Object.keys(e).length > 0);
1206
+ return m.length > 0 && (f.config = (t.envMerger || r)({}, ...m, f.config)), f.meta = Y(f.sourceOptions.meta, f.config.$meta), delete f.config.$meta, f.sourceOptions.overrides && (f.config = r(f.sourceOptions.overrides, f.config)), f.configFile = Q(f.configFile), f.source = Q(f.source), f;
1207
+ }
1208
+ async function $t(e, t) {
1209
+ if (typeof t?.["~standard"]?.validate != "function") throw TypeError("Invalid `schema` option: expected a Standard Schema (https://standardschema.dev).");
1210
+ let n = await t["~standard"].validate(e);
1211
+ if (n.issues) {
1212
+ let e = n.issues.map((e) => {
1213
+ let t = e.path?.map((e) => String(typeof e == "object" ? e.key : e)).join(".");
1214
+ return ` - ${t ? `${t}: ` : ""}${e.message}`;
1215
+ });
1216
+ throw Error(`Config validation failed (${t["~standard"].vendor}):\n${e.join("\n")}`, { cause: n.issues });
1141
1217
  }
1142
- return f.meta = X(f.sourceOptions.meta, f.config.$meta), delete f.config.$meta, f.sourceOptions.overrides && (f.config = r(f.sourceOptions.overrides, f.config)), f.configFile = Bt(f.configFile), f.source = Bt(f.source), f;
1218
+ return n.value;
1143
1219
  }
1144
1220
  function $(e, t) {
1145
- let n = at(e, {
1221
+ let n = ot(e, {
1146
1222
  try: !0,
1147
1223
  from: g(S(t.cwd || ".", t.configFile || "/")),
1148
1224
  suffixes: ["", "/index"],
1149
- extensions: Ut,
1225
+ extensions: qt,
1150
1226
  cache: !1
1151
1227
  });
1152
1228
  return n ? x(n) : void 0;
1153
1229
  }
1154
- function Yt(e) {
1230
+ function en(e) {
1155
1231
  try {
1156
1232
  return c(e).isDirectory();
1157
1233
  } catch {
1158
1234
  return null;
1159
1235
  }
1160
1236
  }
1161
- function Xt() {
1237
+ function tn() {
1162
1238
  return (e) => e;
1163
1239
  }
1164
1240
  //#endregion
1165
1241
  //#region src/config/defaults.mts
1166
- var Zt = {
1242
+ var nn = {
1167
1243
  outDir: "dist",
1168
1244
  version: "0.0.0"
1169
1245
  };
1170
- function Qt(e) {
1246
+ function rn(e) {
1171
1247
  let t = e.indexOf("/");
1172
1248
  return e.startsWith("@") && t !== -1 ? e.slice(t + 1) : e;
1173
1249
  }
1174
- var $t = "app";
1175
- function en(e) {
1250
+ var an = "app";
1251
+ function on(e) {
1176
1252
  let t = e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
1177
- return t === "" ? $t : t;
1253
+ return t === "" ? an : t;
1178
1254
  }
1179
- function tn(e) {
1180
- return e ? Qt(e) : void 0;
1255
+ function sn(e) {
1256
+ return e ? rn(e) : void 0;
1181
1257
  }
1182
- function nn(e) {
1183
- return `org.inca.${en(e)}`;
1258
+ function cn(e) {
1259
+ return `org.inca.${on(e)}`;
1184
1260
  }
1185
1261
  //#endregion
1186
- export { Xt as a, T as c, x as d, C as f, en as i, w as l, nn as n, Wt as o, tn as r, at as s, Zt as t, S as u };
1262
+ export { tn as a, T as c, x as d, C as f, on as i, w as l, cn as n, Jt as o, sn as r, ot as s, nn as t, S as u };