nitro-nightly 3.0.260311-beta → 3.0.260415-beta

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 (206) hide show
  1. package/dist/_build/common.mjs +625 -1602
  2. package/dist/_build/rolldown.mjs +0 -11
  3. package/dist/_build/rollup.mjs +0 -13
  4. package/dist/_build/vite.build.mjs +0 -2
  5. package/dist/_chunks/nitro.mjs +23 -216
  6. package/dist/_chunks/nitro2.mjs +0 -2
  7. package/dist/_chunks/nitro3.mjs +128 -121
  8. package/dist/_chunks/nitro4.mjs +127 -0
  9. package/dist/_chunks/utils.mjs +0 -7
  10. package/dist/_common.mjs +0 -2
  11. package/dist/_dev.d.mts +0 -3
  12. package/dist/_dev.mjs +0 -10
  13. package/dist/_libs/_.mjs +0 -1
  14. package/dist/_libs/_3.mjs +0 -1
  15. package/dist/_libs/_5.mjs +0 -1
  16. package/dist/_libs/_6.mjs +0 -2
  17. package/dist/_libs/_7.mjs +0 -3
  18. package/dist/_libs/c12+rc9.mjs +24 -22
  19. package/dist/_libs/c12+readdirp+chokidar.d.mts +0 -7
  20. package/dist/_libs/citty.mjs +134 -31
  21. package/dist/_libs/commondir+is-reference.mjs +2 -9
  22. package/dist/_libs/compatx.d.mts +0 -2
  23. package/dist/_libs/compatx.mjs +0 -2
  24. package/dist/_libs/esbuild.d.mts +0 -1
  25. package/dist/_libs/escape-string-regexp.mjs +0 -2
  26. package/dist/_libs/estree+pluginutils.d.mts +0 -5
  27. package/dist/_libs/estree-walker.mjs +3 -88
  28. package/dist/_libs/hasown+resolve+deepmerge.mjs +22 -85
  29. package/dist/_libs/httpxy.d.mts +9 -5
  30. package/dist/_libs/httpxy.mjs +284 -116
  31. package/dist/_libs/klona.mjs +0 -2
  32. package/dist/_libs/magic-string.d.mts +0 -2
  33. package/dist/_libs/mlly.d.mts +0 -2
  34. package/dist/_libs/nypm+tinyexec.mjs +111 -134
  35. package/dist/_libs/perfect-debounce.mjs +0 -20
  36. package/dist/_libs/pkg-types.d.mts +0 -3
  37. package/dist/_libs/plugin-alias.mjs +0 -2
  38. package/dist/_libs/plugin-inject.mjs +0 -2
  39. package/dist/_libs/plugin-json.mjs +0 -2
  40. package/dist/_libs/pluginutils.mjs +0 -26
  41. package/dist/_libs/readdirp+chokidar.mjs +0 -173
  42. package/dist/_libs/remapping.mjs +0 -2
  43. package/dist/_libs/resolve-uri+gen-mapping.mjs +0 -32
  44. package/dist/_libs/rou3.d.mts +0 -4
  45. package/dist/_libs/rou3.mjs +0 -29
  46. package/dist/_libs/std-env.d.mts +0 -2
  47. package/dist/_libs/tsconfck.mjs +0 -294
  48. package/dist/_libs/ultrahtml.mjs +0 -2
  49. package/dist/_libs/unimport+unplugin.mjs +1 -44
  50. package/dist/_libs/unplugin+unimport.d.mts +0 -7
  51. package/dist/_libs/unwasm.d.mts +0 -3
  52. package/dist/_presets.mjs +210 -80
  53. package/dist/builder.d.mts +1 -22
  54. package/dist/builder.mjs +0 -11
  55. package/dist/cli/_chunks/build.mjs +0 -2
  56. package/dist/cli/_chunks/common.mjs +0 -2
  57. package/dist/cli/_chunks/deploy.mjs +0 -3
  58. package/dist/cli/_chunks/dev.mjs +0 -5
  59. package/dist/cli/_chunks/docs.mjs +1 -3
  60. package/dist/cli/_chunks/list.mjs +0 -2
  61. package/dist/cli/_chunks/prepare.mjs +0 -2
  62. package/dist/cli/_chunks/preview.mjs +1 -4
  63. package/dist/cli/_chunks/run.mjs +0 -2
  64. package/dist/cli/_chunks/task.mjs +0 -2
  65. package/dist/cli/index.mjs +0 -2
  66. package/{skills/nitro/docs/docs/quick-start.md → dist/docs/0.docs/1.quick-start.md} +4 -4
  67. package/{skills/nitro/docs/docs/lifecycle.md → dist/docs/0.docs/10.lifecycle.md} +4 -4
  68. package/dist/docs/0.docs/11.openapi.md +291 -0
  69. package/{skills/nitro/docs/docs/plugins.md → dist/docs/0.docs/12.plugins.md} +2 -2
  70. package/{skills/nitro/docs/docs/tasks.md → dist/docs/0.docs/13.tasks.md} +6 -6
  71. package/dist/docs/0.docs/14.websocket.md +386 -0
  72. package/{skills/nitro/docs/docs/migration.md → dist/docs/0.docs/15.migration.md} +2 -4
  73. package/{skills/nitro/docs/docs/renderer.md → dist/docs/0.docs/2.renderer.md} +8 -8
  74. package/{skills/nitro/docs/docs/routing.md → dist/docs/0.docs/3.routing.md} +34 -34
  75. package/{skills/nitro/docs/docs/server-entry.md → dist/docs/0.docs/4.server-entry.md} +6 -6
  76. package/{skills/nitro/docs/docs/cache.md → dist/docs/0.docs/5.cache.md} +12 -12
  77. package/{skills/nitro/docs/docs/storage.md → dist/docs/0.docs/6.storage.md} +6 -6
  78. package/{skills/nitro/docs/docs/assets.md → dist/docs/0.docs/7.assets.md} +8 -8
  79. package/{skills/nitro/docs/docs/configuration.md → dist/docs/0.docs/8.configuration.md} +16 -16
  80. package/{skills/nitro/docs/docs/database.md → dist/docs/0.docs/9.database.md} +6 -6
  81. package/{skills/nitro/docs/deploy → dist/docs/1.deploy/0.index}/index.md +3 -3
  82. package/{skills/nitro/docs/deploy/providers/aws.md → dist/docs/1.deploy/2.providers/1.aws.md} +4 -4
  83. package/{skills/nitro/docs/deploy/providers/iis.md → dist/docs/1.deploy/2.providers/15.iis.md} +2 -2
  84. package/{skills/nitro/docs/deploy/providers/aws-amplify.md → dist/docs/1.deploy/2.providers/2.aws-amplify.md} +2 -2
  85. package/{skills/nitro/docs/deploy/providers/vercel.md → dist/docs/1.deploy/2.providers/21.vercel.md} +98 -7
  86. package/{skills/nitro/docs/deploy/providers/zephyr.md → dist/docs/1.deploy/2.providers/23.zephyr.md} +2 -2
  87. package/{skills/nitro/docs/deploy/providers/cloudflare.md → dist/docs/1.deploy/2.providers/5.cloudflare.md} +9 -15
  88. package/dist/docs/1.deploy/2.providers/8.edgeone.md +20 -0
  89. package/{skills/nitro/docs/config → dist/docs/2.config/0.index}/index.md +165 -91
  90. package/{skills/nitro/docs/examples/hono.md → dist/docs/3.examples/10.hono.md} +1 -1
  91. package/{skills/nitro/docs/examples/import-alias.md → dist/docs/3.examples/11.import-alias.md} +1 -4
  92. package/{skills/nitro/docs/examples/mono-jsx.md → dist/docs/3.examples/13.mono-jsx.md} +2 -2
  93. package/{skills/nitro/docs/examples/plugins.md → dist/docs/3.examples/15.plugins.md} +4 -4
  94. package/{skills/nitro/docs/examples/shiki.md → dist/docs/3.examples/19.shiki.md} +1 -1
  95. package/{skills/nitro/docs/examples/auto-imports.md → dist/docs/3.examples/2.auto-imports.md} +0 -1
  96. package/{skills/nitro/docs/examples/vite-nitro-plugin.md → dist/docs/3.examples/21.vite-nitro-plugin.md} +1 -1
  97. package/{skills/nitro/docs/examples/vite-rsc.md → dist/docs/3.examples/22.vite-rsc.md} +4 -4
  98. package/{skills/nitro/docs/examples/vite-ssr-html.md → dist/docs/3.examples/23.vite-ssr-html.md} +3 -3
  99. package/{skills/nitro/docs/examples/vite-ssr-preact.md → dist/docs/3.examples/24.vite-ssr-preact.md} +6 -6
  100. package/{skills/nitro/docs/examples/vite-ssr-react.md → dist/docs/3.examples/25.vite-ssr-react.md} +3 -3
  101. package/{skills/nitro/docs/examples/vite-ssr-solid.md → dist/docs/3.examples/26.vite-ssr-solid.md} +3 -3
  102. package/{skills/nitro/docs/examples/vite-ssr-tsr-react.md → dist/docs/3.examples/27.vite-ssr-tsr-react.md} +6 -6
  103. package/{skills/nitro/docs/examples/vite-ssr-tss-react.md → dist/docs/3.examples/28.vite-ssr-tss-react.md} +11 -11
  104. package/{skills/nitro/docs/examples/vite-ssr-vue-router.md → dist/docs/3.examples/29.vite-ssr-vue-router.md} +6 -5
  105. package/{skills/nitro/docs/examples/vite-trpc.md → dist/docs/3.examples/30.vite-trpc.md} +3 -3
  106. package/{skills/nitro/docs/examples/elysia.md → dist/docs/3.examples/6.elysia.md} +1 -1
  107. package/{skills/nitro/docs/examples/fastify.md → dist/docs/3.examples/8.fastify.md} +1 -1
  108. package/dist/docs/README.md +86 -0
  109. package/dist/node_modules/@speed-highlight/core/dist/index.js +4 -4
  110. package/dist/node_modules/@speed-highlight/core/dist/terminal.js +2 -2
  111. package/dist/node_modules/@speed-highlight/core/package.json +1 -1
  112. package/dist/node_modules/cookie-es/dist/index.mjs +299 -250
  113. package/dist/node_modules/cookie-es/package.json +26 -23
  114. package/dist/node_modules/defu/dist/defu.mjs +2 -2
  115. package/dist/node_modules/defu/package.json +33 -28
  116. package/dist/node_modules/rendu/dist/_chunks/libs/cookie-es.mjs +151 -0
  117. package/dist/node_modules/rendu/dist/index.mjs +5 -112
  118. package/dist/node_modules/rendu/package.json +25 -24
  119. package/dist/node_modules/youch/package.json +2 -2
  120. package/dist/presets/_nitro/runtime/nitro-dev.mjs +3 -1
  121. package/dist/presets/_nitro/runtime/service-worker.mjs +1 -1
  122. package/dist/presets/aws-lambda/runtime/_utils.mjs +6 -6
  123. package/dist/presets/azure/runtime/_utils.mjs +5 -5
  124. package/dist/presets/azure/runtime/azure-swa.mjs +5 -5
  125. package/dist/presets/bun/runtime/bun.mjs +5 -3
  126. package/dist/presets/cloudflare/runtime/_module-handler.mjs +1 -1
  127. package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +4 -4
  128. package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +3 -3
  129. package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +2 -2
  130. package/dist/presets/cloudflare/runtime/plugin.dev.mjs +10 -21
  131. package/dist/presets/deno/runtime/deno-deploy.mjs +4 -4
  132. package/dist/presets/deno/runtime/deno-server.mjs +5 -3
  133. package/dist/presets/edgeone/runtime/edgeone.mjs +10 -0
  134. package/dist/presets/netlify/runtime/netlify-edge.mjs +2 -2
  135. package/dist/presets/node/runtime/node-cluster.mjs +2 -2
  136. package/dist/presets/node/runtime/node-middleware.mjs +1 -1
  137. package/dist/presets/node/runtime/node-server.mjs +5 -3
  138. package/dist/presets/stormkit/runtime/stormkit.mjs +1 -1
  139. package/dist/presets/vercel/runtime/cron-handler.mjs +1 -1
  140. package/dist/presets/vercel/runtime/queue-handler.mjs +21 -0
  141. package/dist/presets/vercel/runtime/vercel.node.mjs +3 -3
  142. package/dist/presets/vercel/runtime/vercel.web.mjs +1 -1
  143. package/dist/presets/winterjs/runtime/winterjs.mjs +10 -10
  144. package/dist/runtime/internal/app.mjs +12 -11
  145. package/dist/runtime/internal/context.mjs +1 -9
  146. package/dist/runtime/internal/error/dev.mjs +10 -10
  147. package/dist/runtime/internal/route-rules.d.mts +3 -1
  148. package/dist/runtime/internal/route-rules.mjs +9 -7
  149. package/dist/runtime/internal/routes/dev-tasks.mjs +13 -12
  150. package/dist/runtime/internal/routes/openapi.mjs +2 -2
  151. package/dist/runtime/internal/routes/scalar.mjs +3 -3
  152. package/dist/runtime/internal/routes/swagger.mjs +7 -4
  153. package/dist/runtime/internal/runtime-config.mjs +2 -2
  154. package/dist/runtime/internal/task.mjs +5 -5
  155. package/dist/runtime/meta.d.mts +1 -0
  156. package/dist/runtime/meta.mjs +1 -0
  157. package/dist/runtime/nitro.mjs +3 -3
  158. package/dist/runtime/virtual/renderer-template.mjs +1 -1
  159. package/dist/runtime/virtual/tracing.d.mts +5 -0
  160. package/dist/runtime/virtual/tracing.mjs +1 -0
  161. package/dist/types/index.d.mts +155 -86
  162. package/dist/vite.d.mts +0 -5
  163. package/dist/vite.mjs +57 -28
  164. package/lib/tsconfig.json +3 -5
  165. package/package.json +55 -53
  166. package/skills/nitro/SKILL.md +0 -10
  167. package/skills/nitro/docs/TOC.md +0 -83
  168. package/skills/nitro/docs/_navigation.json +0 -679
  169. /package/{skills/nitro/docs/docs → dist/docs/0.docs/0.index}/index.md +0 -0
  170. /package/{skills/nitro/docs/docs/nightly.md → dist/docs/0.docs/16.nightly.md} +0 -0
  171. /package/{skills/nitro/docs/deploy/runtimes/node.md → dist/docs/1.deploy/1.runtimes/0.node.md} +0 -0
  172. /package/{skills/nitro/docs/deploy/runtimes/bun.md → dist/docs/1.deploy/1.runtimes/1.bun.md} +0 -0
  173. /package/{skills/nitro/docs/deploy/runtimes/deno.md → dist/docs/1.deploy/1.runtimes/2.deno.md} +0 -0
  174. /package/{skills/nitro/docs/deploy/providers/alwaysdata.md → dist/docs/1.deploy/2.providers/0.alwaysdata.md} +0 -0
  175. /package/{skills/nitro/docs/deploy/providers/flightcontrol.md → dist/docs/1.deploy/2.providers/10.flightcontrol.md} +0 -0
  176. /package/{skills/nitro/docs/deploy/providers/genezio.md → dist/docs/1.deploy/2.providers/11.genezio.md} +0 -0
  177. /package/{skills/nitro/docs/deploy/providers/github-pages.md → dist/docs/1.deploy/2.providers/12.github-pages.md} +0 -0
  178. /package/{skills/nitro/docs/deploy/providers/gitlab-pages.md → dist/docs/1.deploy/2.providers/13.gitlab-pages.md} +0 -0
  179. /package/{skills/nitro/docs/deploy/providers/heroku.md → dist/docs/1.deploy/2.providers/14.heroku.md} +0 -0
  180. /package/{skills/nitro/docs/deploy/providers/koyeb.md → dist/docs/1.deploy/2.providers/16.koyeb.md} +0 -0
  181. /package/{skills/nitro/docs/deploy/providers/netlify.md → dist/docs/1.deploy/2.providers/17.netlify.md} +0 -0
  182. /package/{skills/nitro/docs/deploy/providers/platform-sh.md → dist/docs/1.deploy/2.providers/18.platform-sh.md} +0 -0
  183. /package/{skills/nitro/docs/deploy/providers/render.md → dist/docs/1.deploy/2.providers/19.render.md} +0 -0
  184. /package/{skills/nitro/docs/deploy/providers/stormkit.md → dist/docs/1.deploy/2.providers/20.stormkit.md} +0 -0
  185. /package/{skills/nitro/docs/deploy/providers/zeabur.md → dist/docs/1.deploy/2.providers/22.zeabur.md} +0 -0
  186. /package/{skills/nitro/docs/deploy/providers/zerops.md → dist/docs/1.deploy/2.providers/24.zerops.md} +0 -0
  187. /package/{skills/nitro/docs/deploy/providers/azure.md → dist/docs/1.deploy/2.providers/3.azure.md} +0 -0
  188. /package/{skills/nitro/docs/deploy/providers/cleavr.md → dist/docs/1.deploy/2.providers/4.cleavr.md} +0 -0
  189. /package/{skills/nitro/docs/deploy/providers/deno-deploy.md → dist/docs/1.deploy/2.providers/6.deno-deploy.md} +0 -0
  190. /package/{skills/nitro/docs/deploy/providers/digitalocean.md → dist/docs/1.deploy/2.providers/7.digitalocean.md} +0 -0
  191. /package/{skills/nitro/docs/deploy/providers/firebase.md → dist/docs/1.deploy/2.providers/9.firebase.md} +0 -0
  192. /package/{skills/nitro/docs/examples → dist/docs/3.examples/0.index}/index.md +0 -0
  193. /package/{skills/nitro/docs/examples/api-routes.md → dist/docs/3.examples/1.api-routes.md} +0 -0
  194. /package/{skills/nitro/docs/examples/middleware.md → dist/docs/3.examples/12.middleware.md} +0 -0
  195. /package/{skills/nitro/docs/examples/nano-jsx.md → dist/docs/3.examples/14.nano-jsx.md} +0 -0
  196. /package/{skills/nitro/docs/examples/renderer.md → dist/docs/3.examples/16.renderer.md} +0 -0
  197. /package/{skills/nitro/docs/examples/runtime-config.md → dist/docs/3.examples/17.runtime-config.md} +0 -0
  198. /package/{skills/nitro/docs/examples/server-fetch.md → dist/docs/3.examples/18.server-fetch.md} +0 -0
  199. /package/{skills/nitro/docs/examples/virtual-routes.md → dist/docs/3.examples/20.virtual-routes.md} +0 -0
  200. /package/{skills/nitro/docs/examples/cached-handler.md → dist/docs/3.examples/3.cached-handler.md} +0 -0
  201. /package/{skills/nitro/docs/examples/websocket.md → dist/docs/3.examples/31.websocket.md} +0 -0
  202. /package/{skills/nitro/docs/examples/custom-error-handler.md → dist/docs/3.examples/4.custom-error-handler.md} +0 -0
  203. /package/{skills/nitro/docs/examples/database.md → dist/docs/3.examples/5.database.md} +0 -0
  204. /package/{skills/nitro/docs/examples/express.md → dist/docs/3.examples/7.express.md} +0 -0
  205. /package/{skills/nitro/docs/examples/hello-world.md → dist/docs/3.examples/9.hello-world.md} +0 -0
  206. /package/{skills/nitro → dist}/docs/index.md +0 -0
@@ -1,6 +1,7 @@
1
1
  import { i as __toESM$1, n as __exportAll, r as __require$1, t as __commonJSMin } from "../_common.mjs";
2
2
  import { builtinModules, createRequire } from "node:module";
3
3
  import consola from "consola";
4
+ import { pkgDir, runtimeDependencies, runtimeDir, version } from "nitro/meta";
4
5
  import fs, { accessSync, constants, existsSync, lstatSync, promises, readFileSync, realpathSync, statSync } from "node:fs";
5
6
  import { format, inspect } from "node:util";
6
7
  import fsp, { mkdir, readFile, stat as stat$1, writeFile } from "node:fs/promises";
@@ -11,13 +12,12 @@ import assert from "node:assert";
11
12
  import process$1 from "node:process";
12
13
  import v8 from "node:v8";
13
14
  import { defu } from "defu";
14
- import { pkgDir, runtimeDependencies, runtimeDir, version } from "nitro/meta";
15
15
  import { joinURL, withTrailingSlash } from "ufo";
16
16
  import { createRequire as createRequire$1 } from "module";
17
17
  import { colors } from "consola/utils";
18
- import * as nativeFs$1 from "fs";
19
- import nativeFs from "fs";
20
- import path$1, { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative as relative$1, resolve as resolve$1, sep as sep$1, win32 as win32$1 } from "path";
18
+ import * as nativeFs from "fs";
19
+ import { readdir as readdir$1, readdirSync, realpath as realpath$1, realpathSync as realpathSync$1, stat as stat$2, statSync as statSync$1 } from "fs";
20
+ import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize as normalize$1, posix, relative as relative$1, resolve as resolve$1, sep as sep$1, win32 as win32$1 } from "path";
21
21
  import { fileURLToPath as fileURLToPath$1 } from "url";
22
22
  import { hash } from "ohash";
23
23
  import zlib from "node:zlib";
@@ -27,7 +27,7 @@ import { connectors } from "db0";
27
27
  import { RENDER_CONTEXT_KEYS, compileTemplateToString, hasTemplateSyntax } from "rendu";
28
28
  import { builtinDrivers, normalizeKey } from "unstorage";
29
29
  import { createHash } from "node:crypto";
30
- //#region node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
30
+ import { FullTracePackages, NodeNativePackages, NonBundleablePackages } from "nf3/db";
31
31
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
32
32
  function normalizeWindowsPath(input = "") {
33
33
  if (!input) return input;
@@ -189,8 +189,6 @@ const parse$1 = function(p) {
189
189
  };
190
190
  };
191
191
  globalThis.process?.platform;
192
- //#endregion
193
- //#region node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs
194
192
  const nodeBuiltins = [
195
193
  "_http_agent",
196
194
  "_http_client",
@@ -277,23 +275,9 @@ const kTypes$1 = new Set([
277
275
  const messages$1 = /* @__PURE__ */ new Map();
278
276
  const nodeInternalPrefix$1 = "__node_internal_";
279
277
  let userStackTraceLimit$1;
280
- /**
281
- * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
282
- * We cannot use Intl.ListFormat because it's not available in
283
- * --without-intl builds.
284
- *
285
- * @param {Array<string>} array
286
- * An array of strings.
287
- * @param {string} [type]
288
- * The list type to be inserted before the last element.
289
- * @returns {string}
290
- */
291
278
  function formatList$1(array, type = "and") {
292
279
  return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
293
280
  }
294
- /**
295
- * Utility function for registering the error codes.
296
- */
297
281
  function createError$1(sym, value, constructor) {
298
282
  messages$1.set(sym, value);
299
283
  return makeNodeErrorWithCode$1(constructor, sym);
@@ -334,9 +318,6 @@ function isErrorStackTraceLimitWritable$1() {
334
318
  if (desc === void 0) return Object.isExtensible(Error);
335
319
  return own$1$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
336
320
  }
337
- /**
338
- * This function removes unnecessary frames from Node.js core errors.
339
- */
340
321
  function hideStackFrames$1(wrappedFunction) {
341
322
  const hidden = nodeInternalPrefix$1 + wrappedFunction.name;
342
323
  Object.defineProperty(wrappedFunction, "name", { value: hidden });
@@ -367,9 +348,6 @@ function getMessage$1(key, parameters, self) {
367
348
  parameters.unshift(message);
368
349
  return Reflect.apply(format, null, parameters);
369
350
  }
370
- /**
371
- * Determine the specific type of a value for type-mismatch errors.
372
- */
373
351
  function determineSpecificType$1(value) {
374
352
  if (value === null || value === void 0) return String(value);
375
353
  if (typeof value === "function" && value.name) return `function ${value.name}`;
@@ -425,18 +403,9 @@ createError$1("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
425
403
  message += `. Received ${determineSpecificType$1(actual)}`;
426
404
  return message;
427
405
  }, TypeError);
428
- const ERR_INVALID_MODULE_SPECIFIER$1 = createError$1(
429
- "ERR_INVALID_MODULE_SPECIFIER",
430
- /**
431
- * @param {string} request
432
- * @param {string} reason
433
- * @param {string} [base]
434
- */
435
- (request, reason, base) => {
436
- return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
437
- },
438
- TypeError
439
- );
406
+ const ERR_INVALID_MODULE_SPECIFIER$1 = createError$1("ERR_INVALID_MODULE_SPECIFIER", (request, reason, base) => {
407
+ return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
408
+ }, TypeError);
440
409
  const ERR_INVALID_PACKAGE_CONFIG$2 = createError$1("ERR_INVALID_PACKAGE_CONFIG", (path$1, base, message) => {
441
410
  return `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
442
411
  }, Error);
@@ -455,19 +424,10 @@ createError$1("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supp
455
424
  const ERR_PACKAGE_IMPORT_NOT_DEFINED$1 = createError$1("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => {
456
425
  return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`;
457
426
  }, TypeError);
458
- const ERR_PACKAGE_PATH_NOT_EXPORTED$1 = createError$1(
459
- "ERR_PACKAGE_PATH_NOT_EXPORTED",
460
- /**
461
- * @param {string} packagePath
462
- * @param {string} subpath
463
- * @param {string} [base]
464
- */
465
- (packagePath, subpath, base) => {
466
- if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
467
- return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
468
- },
469
- Error
470
- );
427
+ const ERR_PACKAGE_PATH_NOT_EXPORTED$1 = createError$1("ERR_PACKAGE_PATH_NOT_EXPORTED", (packagePath, subpath, base) => {
428
+ if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
429
+ return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
430
+ }, Error);
471
431
  const ERR_UNSUPPORTED_DIR_IMPORT$1 = createError$1("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
472
432
  const ERR_UNSUPPORTED_RESOLVE_REQUEST$1 = createError$1("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError);
473
433
  const ERR_UNKNOWN_FILE_EXTENSION$1 = createError$1("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1) => {
@@ -564,14 +524,6 @@ function getDataProtocolModuleFormat$1(parsed) {
564
524
  ];
565
525
  return mimeToFormat$1(mime);
566
526
  }
567
- /**
568
- * Returns the file extension from a URL.
569
- *
570
- * Should give similar result to
571
- * `require('node:path').extname(require('node:url').fileURLToPath(url))`
572
- * when used with a `file:` URL.
573
- *
574
- */
575
527
  function extname$3(url) {
576
528
  const pathname = url.pathname;
577
529
  let index = pathname.length;
@@ -633,14 +585,6 @@ function tryStatSync$1(path$1) {
633
585
  return statSync(path$1);
634
586
  } catch {}
635
587
  }
636
- /**
637
- * Legacy CommonJS main resolution:
638
- * 1. let M = pkg_url + (json main field)
639
- * 2. TRY(M, M.js, M.json, M.node)
640
- * 3. TRY(M/index.js, M/index.json, M/index.node)
641
- * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
642
- * 5. NOT_FOUND
643
- */
644
588
  function fileExists$1(url) {
645
589
  const stats = statSync(url, { throwIfNoEntry: false });
646
590
  const isFile = stats ? stats.isFile() : void 0;
@@ -921,10 +865,6 @@ function packageImportsResolve$1(name, base, conditions) {
921
865
  }
922
866
  throw importNotDefined$1(name, packageJsonUrl, base);
923
867
  }
924
- /**
925
- * @param {string} specifier
926
- * @param {URL} base
927
- */
928
868
  function parsePackageName$1(specifier, base) {
929
869
  let separatorIndex = specifier.indexOf("/");
930
870
  let validPackageName = true;
@@ -981,21 +921,6 @@ function shouldBeTreatedAsRelativeOrAbsolutePath$1(specifier) {
981
921
  if (specifier[0] === "/") return true;
982
922
  return isRelativeSpecifier$1(specifier);
983
923
  }
984
- /**
985
- * The “Resolver Algorithm Specification” as detailed in the Node docs (which is
986
- * sync and slightly lower-level than `resolve`).
987
- *
988
- * @param {string} specifier
989
- * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
990
- * @param {URL} base
991
- * Full URL (to a file) that `specifier` is resolved relative from.
992
- * @param {Set<string>} [conditions]
993
- * Conditions.
994
- * @param {boolean} [preserveSymlinks]
995
- * Keep symlinks instead of resolving them.
996
- * @returns {URL}
997
- * A URL object to the found thing.
998
- */
999
924
  function moduleResolve$1(specifier, base, conditions, preserveSymlinks) {
1000
925
  const protocol = base.protocol;
1001
926
  const isData = protocol === "data:";
@@ -1025,13 +950,6 @@ function moduleResolve$1(specifier, base, conditions, preserveSymlinks) {
1025
950
  const DEFAULT_CONDITIONS_SET$2 = /* @__PURE__ */ new Set(["node", "import"]);
1026
951
  const isWindows = process.platform === "win32";
1027
952
  const globalCache = globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map();
1028
- /**
1029
- * Synchronously resolves a module url based on the options provided.
1030
- *
1031
- * @param {string} input - The identifier or path of the module to resolve.
1032
- * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
1033
- * @returns {string} The resolved URL as a string.
1034
- */
1035
953
  function resolveModuleURL(input, options) {
1036
954
  const parsedInput = _parseInput(input);
1037
955
  if ("external" in parsedInput) return parsedInput.external;
@@ -1096,15 +1014,6 @@ function resolveModuleURL(input, options) {
1096
1014
  if (cacheObj) cacheObj.set(cacheKey, resolved.href);
1097
1015
  return resolved.href;
1098
1016
  }
1099
- /**
1100
- * Synchronously resolves a module then converts it to a file path
1101
- *
1102
- * (throws error if reolved path is not file:// scheme)
1103
- *
1104
- * @param {string} id - The identifier or path of the module to resolve.
1105
- * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
1106
- * @returns {string} The resolved URL as a string.
1107
- */
1108
1017
  function resolveModulePath(id, options) {
1109
1018
  const resolved = resolveModuleURL(id, options);
1110
1019
  if (!resolved) return;
@@ -1186,8 +1095,6 @@ function _parseInput(input) {
1186
1095
  }
1187
1096
  throw new TypeError("id must be a `string` or `URL`");
1188
1097
  }
1189
- //#endregion
1190
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs
1191
1098
  var e$6 = Object.create, t$10 = Object.defineProperty, n$10 = Object.getOwnPropertyDescriptor, r$10 = Object.getOwnPropertyNames, i$11 = Object.getPrototypeOf, a$9 = Object.prototype.hasOwnProperty, o$7 = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s$6 = (e, i, o, s) => {
1192
1099
  if (i && typeof i == `object` || typeof i == `function`) for (var c = r$10(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a$9.call(e, d) && d !== o && t$10(e, d, {
1193
1100
  get: ((e) => i[e]).bind(null, d),
@@ -1198,8 +1105,6 @@ var e$6 = Object.create, t$10 = Object.defineProperty, n$10 = Object.getOwnPrope
1198
1105
  value: n,
1199
1106
  enumerable: !0
1200
1107
  }) : a, n));
1201
- //#endregion
1202
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs
1203
1108
  var t$9 = o$7(((e, t) => {
1204
1109
  t.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/, t.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/, t.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
1205
1110
  })), n$9 = o$7(((e, n) => {
@@ -1954,8 +1859,6 @@ var t$9 = o$7(((e, t) => {
1954
1859
  }
1955
1860
  };
1956
1861
  }));
1957
- //#endregion
1958
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/detect-indent.mjs
1959
1862
  const e$5 = /^(?:( )+|\t+)/, t$8 = `space`;
1960
1863
  function n$8(e, n, r) {
1961
1864
  return e && n === t$8 && r === 1;
@@ -2011,8 +1914,6 @@ function c$3(e) {
2011
1914
  indent: l
2012
1915
  };
2013
1916
  }
2014
- //#endregion
2015
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs
2016
1917
  const t$7 = Symbol.for(`__confbox_fmt__`), n$7 = /^(\s+)/, r$7 = /(\s+)$/;
2017
1918
  function i$8(e, t = {}) {
2018
1919
  return {
@@ -2048,16 +1949,12 @@ function o$5(n, r) {
2048
1949
  }
2049
1950
  };
2050
1951
  }
2051
- //#endregion
2052
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs
2053
1952
  var json5_exports = /* @__PURE__ */ __exportAll({ parseJSON5: () => s$4 }), a$6 = c$4(r$9(), 1);
2054
1953
  c$4(i$10(), 1);
2055
1954
  function s$4(e, n) {
2056
1955
  let r = (0, a$6.default)(e, n?.reviver);
2057
1956
  return a$7(e, r, n), r;
2058
1957
  }
2059
- //#endregion
2060
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs
2061
1958
  function e$4(e, i = !1) {
2062
1959
  let a = e.length, o = 0, s = ``, c = 0, l = 16, u = 0, d = 0, f = 0, p = 0, m = 0;
2063
1960
  function h(t, n) {
@@ -2441,22 +2338,15 @@ var h$7;
2441
2338
  (function(e) {
2442
2339
  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`;
2443
2340
  })(h$7 ||= {});
2444
- //#endregion
2445
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs
2446
2341
  function n$5(t, n) {
2447
2342
  let r = JSON.parse(t, n?.reviver);
2448
2343
  return a$7(t, r, n), r;
2449
2344
  }
2450
- //#endregion
2451
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs
2452
2345
  var jsonc_exports = /* @__PURE__ */ __exportAll({ parseJSONC: () => r$5 });
2453
2346
  function r$5(n, r) {
2454
2347
  let i = m$5(n, r?.errors, r);
2455
2348
  return a$7(n, i, r), i;
2456
2349
  }
2457
- //#endregion
2458
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs
2459
- /*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
2460
2350
  function e$3(e) {
2461
2351
  return e == null;
2462
2352
  }
@@ -3511,8 +3401,6 @@ function Pn$1(e, t) {
3511
3401
  var Fn$1 = { dump: Pn$1 }, In$1 = Ft.load;
3512
3402
  Ft.loadAll;
3513
3403
  var Ln$1 = Fn$1.dump;
3514
- //#endregion
3515
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs
3516
3404
  var yaml_exports = /* @__PURE__ */ __exportAll({
3517
3405
  parseYAML: () => i$5,
3518
3406
  stringifyYAML: () => a$3
@@ -3528,35 +3416,6 @@ function a$3(e, n) {
3528
3416
  });
3529
3417
  return i.whitespace.start + a.trim() + i.whitespace.end;
3530
3418
  }
3531
- //#endregion
3532
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs
3533
- /*!
3534
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3535
- * SPDX-License-Identifier: BSD-3-Clause
3536
- *
3537
- * Redistribution and use in source and binary forms, with or without
3538
- * modification, are permitted provided that the following conditions are met:
3539
- *
3540
- * 1. Redistributions of source code must retain the above copyright notice, this
3541
- * list of conditions and the following disclaimer.
3542
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3543
- * this list of conditions and the following disclaimer in the
3544
- * documentation and/or other materials provided with the distribution.
3545
- * 3. Neither the name of the copyright holder nor the names of its contributors
3546
- * may be used to endorse or promote products derived from this software without
3547
- * specific prior written permission.
3548
- *
3549
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3550
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3551
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3552
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3553
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3554
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3555
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3556
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3557
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3558
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3559
- */
3560
3419
  function e$2(e, t) {
3561
3420
  let n = e.slice(0, t).split(/\r\n|\n|\r/g);
3562
3421
  return [n.length, n.pop().length + 1];
@@ -3580,33 +3439,6 @@ var n$3 = class extends Error {
3580
3439
  super(`Invalid TOML document: ${n}\n\n${o}`, r), this.line = i, this.column = a, this.codeblock = o;
3581
3440
  }
3582
3441
  };
3583
- /*!
3584
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3585
- * SPDX-License-Identifier: BSD-3-Clause
3586
- *
3587
- * Redistribution and use in source and binary forms, with or without
3588
- * modification, are permitted provided that the following conditions are met:
3589
- *
3590
- * 1. Redistributions of source code must retain the above copyright notice, this
3591
- * list of conditions and the following disclaimer.
3592
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3593
- * this list of conditions and the following disclaimer in the
3594
- * documentation and/or other materials provided with the distribution.
3595
- * 3. Neither the name of the copyright holder nor the names of its contributors
3596
- * may be used to endorse or promote products derived from this software without
3597
- * specific prior written permission.
3598
- *
3599
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3600
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3601
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3602
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3603
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3604
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3605
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3606
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3607
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3608
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3609
- */
3610
3442
  function r$3(e, t) {
3611
3443
  let n = 0;
3612
3444
  for (; e[t - ++n] === `\\`;);
@@ -3661,33 +3493,6 @@ function c$1(e, t) {
3661
3493
  while (t > -1 && n !== `'` && r$3(e, t));
3662
3494
  return t > -1 && (t += i.length, i.length > 1 && (e[t] === n && t++, e[t] === n && t++)), t;
3663
3495
  }
3664
- /*!
3665
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3666
- * SPDX-License-Identifier: BSD-3-Clause
3667
- *
3668
- * Redistribution and use in source and binary forms, with or without
3669
- * modification, are permitted provided that the following conditions are met:
3670
- *
3671
- * 1. Redistributions of source code must retain the above copyright notice, this
3672
- * list of conditions and the following disclaimer.
3673
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3674
- * this list of conditions and the following disclaimer in the
3675
- * documentation and/or other materials provided with the distribution.
3676
- * 3. Neither the name of the copyright holder nor the names of its contributors
3677
- * may be used to endorse or promote products derived from this software without
3678
- * specific prior written permission.
3679
- *
3680
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3681
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3682
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3683
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3684
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3685
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3686
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3687
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3688
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3689
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3690
- */
3691
3496
  let l$2 = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
3692
3497
  var u$2 = class e extends Date {
3693
3498
  #e = !1;
@@ -3742,33 +3547,6 @@ var u$2 = class e extends Date {
3742
3547
  return n.#e = !1, n.#n = null, n;
3743
3548
  }
3744
3549
  };
3745
- /*!
3746
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3747
- * SPDX-License-Identifier: BSD-3-Clause
3748
- *
3749
- * Redistribution and use in source and binary forms, with or without
3750
- * modification, are permitted provided that the following conditions are met:
3751
- *
3752
- * 1. Redistributions of source code must retain the above copyright notice, this
3753
- * list of conditions and the following disclaimer.
3754
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3755
- * this list of conditions and the following disclaimer in the
3756
- * documentation and/or other materials provided with the distribution.
3757
- * 3. Neither the name of the copyright holder nor the names of its contributors
3758
- * may be used to endorse or promote products derived from this software without
3759
- * specific prior written permission.
3760
- *
3761
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3762
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3763
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3764
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3765
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3766
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3767
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3768
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3769
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3770
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3771
- */
3772
3550
  let d$1 = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, f$2 = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/, p$1 = /^[+-]?0[0-9_]/, m$3 = /^[0-9a-f]{2,8}$/i, h$5 = {
3773
3551
  b: `\b`,
3774
3552
  t: ` `,
@@ -3866,33 +3644,6 @@ function _$3(e, t, r, i) {
3866
3644
  });
3867
3645
  return o;
3868
3646
  }
3869
- /*!
3870
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3871
- * SPDX-License-Identifier: BSD-3-Clause
3872
- *
3873
- * Redistribution and use in source and binary forms, with or without
3874
- * modification, are permitted provided that the following conditions are met:
3875
- *
3876
- * 1. Redistributions of source code must retain the above copyright notice, this
3877
- * list of conditions and the following disclaimer.
3878
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3879
- * this list of conditions and the following disclaimer in the
3880
- * documentation and/or other materials provided with the distribution.
3881
- * 3. Neither the name of the copyright holder nor the names of its contributors
3882
- * may be used to endorse or promote products derived from this software without
3883
- * specific prior written permission.
3884
- *
3885
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3886
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3887
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3888
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3889
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3890
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3891
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3892
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3893
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3894
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3895
- */
3896
3647
  function v$3(e, t, n) {
3897
3648
  let r = e.slice(t, n), i = r.indexOf(`#`);
3898
3649
  return i > -1 && (a$2(e, i), r = r.slice(0, i)), [r.trimEnd(), i];
@@ -3936,33 +3687,6 @@ function y$3(e, t, r, i, a) {
3936
3687
  });
3937
3688
  return r && d[1] > -1 && (u = o$1(e, t + d[1]), u += +(e[u] === `,`)), [_$3(d[0], e, t, a), u];
3938
3689
  }
3939
- /*!
3940
- * Copyright (c) Squirrel Chat et al., All rights reserved.
3941
- * SPDX-License-Identifier: BSD-3-Clause
3942
- *
3943
- * Redistribution and use in source and binary forms, with or without
3944
- * modification, are permitted provided that the following conditions are met:
3945
- *
3946
- * 1. Redistributions of source code must retain the above copyright notice, this
3947
- * list of conditions and the following disclaimer.
3948
- * 2. Redistributions in binary form must reproduce the above copyright notice,
3949
- * this list of conditions and the following disclaimer in the
3950
- * documentation and/or other materials provided with the distribution.
3951
- * 3. Neither the name of the copyright holder nor the names of its contributors
3952
- * may be used to endorse or promote products derived from this software without
3953
- * specific prior written permission.
3954
- *
3955
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3956
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3957
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3958
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3959
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3960
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3961
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3962
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3963
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3964
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3965
- */
3966
3690
  let b$3 = /^[a-zA-Z0-9-_]+[ \t]*$/;
3967
3691
  function x$3(e, t, r = `=`) {
3968
3692
  let a = t - 1, s = [], l = e.indexOf(r, t);
@@ -4061,33 +3785,6 @@ function C$2(e, t, r, i) {
4061
3785
  });
4062
3786
  return [o, t];
4063
3787
  }
4064
- /*!
4065
- * Copyright (c) Squirrel Chat et al., All rights reserved.
4066
- * SPDX-License-Identifier: BSD-3-Clause
4067
- *
4068
- * Redistribution and use in source and binary forms, with or without
4069
- * modification, are permitted provided that the following conditions are met:
4070
- *
4071
- * 1. Redistributions of source code must retain the above copyright notice, this
4072
- * list of conditions and the following disclaimer.
4073
- * 2. Redistributions in binary form must reproduce the above copyright notice,
4074
- * this list of conditions and the following disclaimer in the
4075
- * documentation and/or other materials provided with the distribution.
4076
- * 3. Neither the name of the copyright holder nor the names of its contributors
4077
- * may be used to endorse or promote products derived from this software without
4078
- * specific prior written permission.
4079
- *
4080
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
4081
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4082
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4083
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
4084
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4085
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4086
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4087
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
4088
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4089
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4090
- */
4091
3788
  function w$3(e, t, n, r) {
4092
3789
  let i = t, a = n, o, s = !1, c;
4093
3790
  for (let t = 0; t < e.length; t++) {
@@ -4164,15 +3861,11 @@ function T$3(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
4164
3861
  }
4165
3862
  return i;
4166
3863
  }
4167
- //#endregion
4168
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs
4169
3864
  var toml_exports = /* @__PURE__ */ __exportAll({ parseTOML: () => i$3 });
4170
3865
  function i$3(t) {
4171
3866
  let r = T$3(t);
4172
3867
  return a$7(t, r, { preserveIndentation: !1 }), r;
4173
3868
  }
4174
- //#endregion
4175
- //#region node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/ini.mjs
4176
3869
  var t$2 = o$7(((e, t) => {
4177
3870
  let { hasOwnProperty: n } = Object.prototype, r = (e, t = {}) => {
4178
3871
  typeof t == `string` && (t = { section: t }), t.align = t.align === !0, t.newline = t.newline === !0, t.sort = t.sort === !0, t.whitespace = t.whitespace === !0 || t.align === !0, t.platform = t.platform || typeof process < `u` && process.platform, t.bracketedArray = t.bracketedArray !== !1;
@@ -4269,8 +3962,6 @@ var t$2 = o$7(((e, t) => {
4269
3962
  function n$2(e, n) {
4270
3963
  return (0, t$2.parse)(e, n);
4271
3964
  }
4272
- //#endregion
4273
- //#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs
4274
3965
  var dist_exports$1 = /* @__PURE__ */ __exportAll({
4275
3966
  findFile: () => findFile$1,
4276
3967
  findNearestFile: () => findNearestFile$1,
@@ -4407,8 +4098,6 @@ async function readGitConfig(dir, opts) {
4407
4098
  function parseGitConfig(ini) {
4408
4099
  return n$2(ini.replaceAll(/^\[(\w+) "(.+)"\]$/gm, "[$1.$2]"));
4409
4100
  }
4410
- //#endregion
4411
- //#region node_modules/.pnpm/std-env@4.0.0/node_modules/std-env/dist/index.mjs
4412
4101
  const e$1 = globalThis.process?.env || Object.create(null), t$1 = globalThis.process || { env: e$1 }, n$1 = t$1 !== void 0 && t$1.env && t$1.env.NODE_ENV || void 0, r$2 = [
4413
4102
  [`claude`, [`CLAUDECODE`, `CLAUDE_CODE`]],
4414
4103
  [`replit`, [`REPL_ID`]],
@@ -4573,8 +4262,6 @@ function I$2() {
4573
4262
  if (e) return { name: e[1] };
4574
4263
  }
4575
4264
  const R$1 = I$2()?.name || ``;
4576
- //#endregion
4577
- //#region node_modules/.pnpm/dot-prop@10.1.0/node_modules/dot-prop/index.js
4578
4265
  const isObject$2 = (value) => {
4579
4266
  const type = typeof value;
4580
4267
  return value !== null && (type === "object" || type === "function");
@@ -4709,8 +4396,6 @@ function getProperty(object, path, value) {
4709
4396
  }
4710
4397
  return object === void 0 ? value : object;
4711
4398
  }
4712
- //#endregion
4713
- //#region src/utils/fs.ts
4714
4399
  function prettyPath(p, highlight = true) {
4715
4400
  p = relative$2(process.cwd(), p);
4716
4401
  return highlight ? colors.cyan(p) : p;
@@ -4741,8 +4426,6 @@ async function isDirectory(path) {
4741
4426
  return false;
4742
4427
  }
4743
4428
  }
4744
- //#endregion
4745
- //#region node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.3/node_modules/fdir/dist/index.mjs
4746
4429
  var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
4747
4430
  function cleanPath(path) {
4748
4431
  let normalized = normalize$1(path);
@@ -4960,11 +4643,6 @@ const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) =>
4960
4643
  function build$8(isSynchronous) {
4961
4644
  return isSynchronous ? walkSync : walkAsync;
4962
4645
  }
4963
- /**
4964
- * This is a custom stateless queue to track concurrent async fs calls.
4965
- * It increments a counter whenever a call is queued and decrements it
4966
- * as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
4967
- */
4968
4646
  var Queue = class {
4969
4647
  count = 0;
4970
4648
  constructor(onQueueEmpty) {
@@ -4999,18 +4677,10 @@ var Counter = class {
4999
4677
  get directories() {
5000
4678
  return this._directories;
5001
4679
  }
5002
- /**
5003
- * @deprecated use `directories` instead
5004
- */
5005
- /* c8 ignore next 3 */
5006
4680
  get dirs() {
5007
4681
  return this._directories;
5008
4682
  }
5009
4683
  };
5010
- /**
5011
- * AbortController is not supported on Node 14 so we use this until we can drop
5012
- * support for Node 14.
5013
- */
5014
4684
  var Aborter = class {
5015
4685
  aborted = false;
5016
4686
  abort() {
@@ -5043,7 +4713,7 @@ var Walker = class {
5043
4713
  symlinks: /* @__PURE__ */ new Map(),
5044
4714
  visited: [""].slice(0, 0),
5045
4715
  controller: new Aborter(),
5046
- fs: options.fs || nativeFs$1
4716
+ fs: options.fs || nativeFs
5047
4717
  };
5048
4718
  this.joinPath = build$7(this.root, options);
5049
4719
  this.pushDirectory = build$6(this.root, options);
@@ -5122,7 +4792,6 @@ var APIBuilder = class {
5122
4792
  }
5123
4793
  };
5124
4794
  let pm$2 = null;
5125
- /* c8 ignore next 6 */
5126
4795
  try {
5127
4796
  __require.resolve("picomatch");
5128
4797
  pm$2 = __require("picomatch");
@@ -5217,14 +4886,6 @@ var Builder = class {
5217
4886
  this.globFunction = fn;
5218
4887
  return this;
5219
4888
  }
5220
- /**
5221
- * @deprecated Pass options using the constructor instead:
5222
- * ```ts
5223
- * new fdir(options).crawl("/path/to/root");
5224
- * ```
5225
- * This method will be removed in v7.0
5226
- */
5227
- /* c8 ignore next 4 */
5228
4889
  crawlWithOptions(root, options) {
5229
4890
  this.options = {
5230
4891
  ...this.options,
@@ -5238,7 +4899,6 @@ var Builder = class {
5238
4899
  }
5239
4900
  globWithOptions(patterns, ...options) {
5240
4901
  const globFn = this.globFunction || pm$2;
5241
- /* c8 ignore next 5 */
5242
4902
  if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
5243
4903
  var isMatch = this.globCache[patterns.join("\0")];
5244
4904
  if (!isMatch) {
@@ -5249,14 +4909,10 @@ var Builder = class {
5249
4909
  return this;
5250
4910
  }
5251
4911
  };
5252
- //#endregion
5253
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
5254
4912
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5255
4913
  const WIN_SLASH = "\\\\/";
5256
4914
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
5257
- /**
5258
- * Posix glob regex
5259
- */
4915
+ const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
5260
4916
  const DOT_LITERAL = "\\.";
5261
4917
  const PLUS_LITERAL = "\\+";
5262
4918
  const QMARK_LITERAL = "\\?";
@@ -5284,9 +4940,6 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5284
4940
  START_ANCHOR,
5285
4941
  SEP: "/"
5286
4942
  };
5287
- /**
5288
- * Windows glob regex
5289
- */
5290
4943
  const WINDOWS_CHARS = {
5291
4944
  ...POSIX_CHARS,
5292
4945
  SLASH_LITERAL: `[${WIN_SLASH}]`,
@@ -5303,8 +4956,10 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5303
4956
  SEP: "\\"
5304
4957
  };
5305
4958
  module.exports = {
4959
+ DEFAULT_MAX_EXTGLOB_RECURSION,
5306
4960
  MAX_LENGTH: 1024 * 64,
5307
4961
  POSIX_REGEX_SOURCE: {
4962
+ __proto__: null,
5308
4963
  alnum: "a-zA-Z0-9",
5309
4964
  alpha: "a-zA-Z",
5310
4965
  ascii: "\\x00-\\x7F",
@@ -5409,8 +5064,6 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5409
5064
  }
5410
5065
  };
5411
5066
  }));
5412
- //#endregion
5413
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
5414
5067
  var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5415
5068
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
5416
5069
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -5457,8 +5110,6 @@ var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5457
5110
  return last;
5458
5111
  };
5459
5112
  }));
5460
- //#endregion
5461
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
5462
5113
  var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5463
5114
  const utils = require_utils$1();
5464
5115
  const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
@@ -5468,22 +5119,6 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5468
5119
  const depth = (token) => {
5469
5120
  if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1;
5470
5121
  };
5471
- /**
5472
- * Quickly scans a glob pattern and returns an object with a handful of
5473
- * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
5474
- * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
5475
- * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
5476
- *
5477
- * ```js
5478
- * const pm = require('picomatch');
5479
- * console.log(pm.scan('foo/bar/*.js'));
5480
- * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
5481
- * ```
5482
- * @param {String} `str`
5483
- * @param {Object} `options`
5484
- * @return {Object} Returns an object with tokens and regex source string.
5485
- * @api public
5486
- */
5487
5122
  const scan = (input, options) => {
5488
5123
  const opts = options || {};
5489
5124
  const length = input.length - 1;
@@ -5744,18 +5379,10 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5744
5379
  };
5745
5380
  module.exports = scan;
5746
5381
  }));
5747
- //#endregion
5748
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
5749
5382
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5750
5383
  const constants = require_constants();
5751
5384
  const utils = require_utils$1();
5752
- /**
5753
- * Constants
5754
- */
5755
5385
  const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
5756
- /**
5757
- * Helpers
5758
- */
5759
5386
  const expandRange = (args, options) => {
5760
5387
  if (typeof options.expandRange === "function") return options.expandRange(...args, options);
5761
5388
  args.sort();
@@ -5767,18 +5394,180 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5767
5394
  }
5768
5395
  return value;
5769
5396
  };
5770
- /**
5771
- * Create the message for a syntax error
5772
- */
5773
5397
  const syntaxError = (type, char) => {
5774
5398
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
5775
5399
  };
5776
- /**
5777
- * Parse the given input string.
5778
- * @param {String} input
5779
- * @param {Object} options
5780
- * @return {Object}
5781
- */
5400
+ const splitTopLevel = (input) => {
5401
+ const parts = [];
5402
+ let bracket = 0;
5403
+ let paren = 0;
5404
+ let quote = 0;
5405
+ let value = "";
5406
+ let escaped = false;
5407
+ for (const ch of input) {
5408
+ if (escaped === true) {
5409
+ value += ch;
5410
+ escaped = false;
5411
+ continue;
5412
+ }
5413
+ if (ch === "\\") {
5414
+ value += ch;
5415
+ escaped = true;
5416
+ continue;
5417
+ }
5418
+ if (ch === "\"") {
5419
+ quote = quote === 1 ? 0 : 1;
5420
+ value += ch;
5421
+ continue;
5422
+ }
5423
+ if (quote === 0) {
5424
+ if (ch === "[") bracket++;
5425
+ else if (ch === "]" && bracket > 0) bracket--;
5426
+ else if (bracket === 0) {
5427
+ if (ch === "(") paren++;
5428
+ else if (ch === ")" && paren > 0) paren--;
5429
+ else if (ch === "|" && paren === 0) {
5430
+ parts.push(value);
5431
+ value = "";
5432
+ continue;
5433
+ }
5434
+ }
5435
+ }
5436
+ value += ch;
5437
+ }
5438
+ parts.push(value);
5439
+ return parts;
5440
+ };
5441
+ const isPlainBranch = (branch) => {
5442
+ let escaped = false;
5443
+ for (const ch of branch) {
5444
+ if (escaped === true) {
5445
+ escaped = false;
5446
+ continue;
5447
+ }
5448
+ if (ch === "\\") {
5449
+ escaped = true;
5450
+ continue;
5451
+ }
5452
+ if (/[?*+@!()[\]{}]/.test(ch)) return false;
5453
+ }
5454
+ return true;
5455
+ };
5456
+ const normalizeSimpleBranch = (branch) => {
5457
+ let value = branch.trim();
5458
+ let changed = true;
5459
+ while (changed === true) {
5460
+ changed = false;
5461
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
5462
+ value = value.slice(2, -1);
5463
+ changed = true;
5464
+ }
5465
+ }
5466
+ if (!isPlainBranch(value)) return;
5467
+ return value.replace(/\\(.)/g, "$1");
5468
+ };
5469
+ const hasRepeatedCharPrefixOverlap = (branches) => {
5470
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
5471
+ for (let i = 0; i < values.length; i++) for (let j = i + 1; j < values.length; j++) {
5472
+ const a = values[i];
5473
+ const b = values[j];
5474
+ const char = a[0];
5475
+ if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) continue;
5476
+ if (a === b || a.startsWith(b) || b.startsWith(a)) return true;
5477
+ }
5478
+ return false;
5479
+ };
5480
+ const parseRepeatedExtglob = (pattern, requireEnd = true) => {
5481
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") return;
5482
+ let bracket = 0;
5483
+ let paren = 0;
5484
+ let quote = 0;
5485
+ let escaped = false;
5486
+ for (let i = 1; i < pattern.length; i++) {
5487
+ const ch = pattern[i];
5488
+ if (escaped === true) {
5489
+ escaped = false;
5490
+ continue;
5491
+ }
5492
+ if (ch === "\\") {
5493
+ escaped = true;
5494
+ continue;
5495
+ }
5496
+ if (ch === "\"") {
5497
+ quote = quote === 1 ? 0 : 1;
5498
+ continue;
5499
+ }
5500
+ if (quote === 1) continue;
5501
+ if (ch === "[") {
5502
+ bracket++;
5503
+ continue;
5504
+ }
5505
+ if (ch === "]" && bracket > 0) {
5506
+ bracket--;
5507
+ continue;
5508
+ }
5509
+ if (bracket > 0) continue;
5510
+ if (ch === "(") {
5511
+ paren++;
5512
+ continue;
5513
+ }
5514
+ if (ch === ")") {
5515
+ paren--;
5516
+ if (paren === 0) {
5517
+ if (requireEnd === true && i !== pattern.length - 1) return;
5518
+ return {
5519
+ type: pattern[0],
5520
+ body: pattern.slice(2, i),
5521
+ end: i
5522
+ };
5523
+ }
5524
+ }
5525
+ }
5526
+ };
5527
+ const getStarExtglobSequenceOutput = (pattern) => {
5528
+ let index = 0;
5529
+ const chars = [];
5530
+ while (index < pattern.length) {
5531
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
5532
+ if (!match || match.type !== "*") return;
5533
+ const branches = splitTopLevel(match.body).map((branch) => branch.trim());
5534
+ if (branches.length !== 1) return;
5535
+ const branch = normalizeSimpleBranch(branches[0]);
5536
+ if (!branch || branch.length !== 1) return;
5537
+ chars.push(branch);
5538
+ index += match.end + 1;
5539
+ }
5540
+ if (chars.length < 1) return;
5541
+ return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
5542
+ };
5543
+ const repeatedExtglobRecursion = (pattern) => {
5544
+ let depth = 0;
5545
+ let value = pattern.trim();
5546
+ let match = parseRepeatedExtglob(value);
5547
+ while (match) {
5548
+ depth++;
5549
+ value = match.body.trim();
5550
+ match = parseRepeatedExtglob(value);
5551
+ }
5552
+ return depth;
5553
+ };
5554
+ const analyzeRepeatedExtglob = (body, options) => {
5555
+ if (options.maxExtglobRecursion === false) return { risky: false };
5556
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
5557
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
5558
+ if (branches.length > 1) {
5559
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
5560
+ }
5561
+ for (const branch of branches) {
5562
+ const safeOutput = getStarExtglobSequenceOutput(branch);
5563
+ if (safeOutput) return {
5564
+ risky: true,
5565
+ safeOutput
5566
+ };
5567
+ if (repeatedExtglobRecursion(branch) > max) return { risky: true };
5568
+ }
5569
+ return { risky: false };
5570
+ };
5782
5571
  const parse = (input, options) => {
5783
5572
  if (typeof input !== "string") throw new TypeError("Expected a string");
5784
5573
  input = REPLACEMENTS[input] || input;
@@ -5828,9 +5617,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5828
5617
  const stack = [];
5829
5618
  let prev = bos;
5830
5619
  let value;
5831
- /**
5832
- * Tokenizing helpers
5833
- */
5834
5620
  const eos = () => state.index === len - 1;
5835
5621
  const peek = state.peek = (n = 1) => input[state.index + n];
5836
5622
  const advance = state.advance = () => input[++state.index] || "";
@@ -5863,13 +5649,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5863
5649
  state[type]--;
5864
5650
  stack.pop();
5865
5651
  };
5866
- /**
5867
- * Push tokens onto the tokens array. This helper speeds up
5868
- * tokenizing by 1) helping us avoid backtracking as much as possible,
5869
- * and 2) helping us avoid creating extra tokens when consecutive
5870
- * characters are plain text. This improves performance and simplifies
5871
- * lookbehinds.
5872
- */
5873
5652
  const push = (tok) => {
5874
5653
  if (prev.type === "globstar") {
5875
5654
  const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
@@ -5902,6 +5681,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5902
5681
  token.prev = prev;
5903
5682
  token.parens = state.parens;
5904
5683
  token.output = state.output;
5684
+ token.startIndex = state.index;
5685
+ token.tokensIndex = tokens.length;
5905
5686
  const output = (opts.capture ? "(" : "") + token.open;
5906
5687
  increment("parens");
5907
5688
  push({
@@ -5918,6 +5699,30 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5918
5699
  extglobs.push(token);
5919
5700
  };
5920
5701
  const extglobClose = (token) => {
5702
+ const literal = input.slice(token.startIndex, state.index + 1);
5703
+ const analysis = analyzeRepeatedExtglob(input.slice(token.startIndex + 2, state.index), opts);
5704
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
5705
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
5706
+ const open = tokens[token.tokensIndex];
5707
+ open.type = "text";
5708
+ open.value = literal;
5709
+ open.output = safeOutput || utils.escapeRegex(literal);
5710
+ for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
5711
+ tokens[i].value = "";
5712
+ tokens[i].output = "";
5713
+ delete tokens[i].suffix;
5714
+ }
5715
+ state.output = token.output + open.output;
5716
+ state.backtrack = true;
5717
+ push({
5718
+ type: "paren",
5719
+ extglob: true,
5720
+ value,
5721
+ output: ""
5722
+ });
5723
+ decrement("parens");
5724
+ return;
5725
+ }
5921
5726
  let output = token.close + (opts.capture ? ")" : "");
5922
5727
  let rest;
5923
5728
  if (token.type === "negate") {
@@ -5938,9 +5743,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5938
5743
  });
5939
5744
  decrement("parens");
5940
5745
  };
5941
- /**
5942
- * Fast paths
5943
- */
5944
5746
  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
5945
5747
  let backslashes = false;
5946
5748
  let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
@@ -5971,15 +5773,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5971
5773
  state.output = utils.wrapOutput(output, state, options);
5972
5774
  return state;
5973
5775
  }
5974
- /**
5975
- * Tokenize input until we reach end-of-string
5976
- */
5977
5776
  while (!eos()) {
5978
5777
  value = advance();
5979
5778
  if (value === "\0") continue;
5980
- /**
5981
- * Escaped characters
5982
- */
5983
5779
  if (value === "\\") {
5984
5780
  const next = peek();
5985
5781
  if (next === "/" && opts.bash !== true) continue;
@@ -6009,10 +5805,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6009
5805
  continue;
6010
5806
  }
6011
5807
  }
6012
- /**
6013
- * If we're inside a regex character class, continue
6014
- * until we reach the closing bracket.
6015
- */
6016
5808
  if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
6017
5809
  if (opts.posix !== false && value === ":") {
6018
5810
  const inner = prev.value.slice(1);
@@ -6039,19 +5831,12 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6039
5831
  append({ value });
6040
5832
  continue;
6041
5833
  }
6042
- /**
6043
- * If we're inside a quoted string, continue
6044
- * until we reach the closing double quote.
6045
- */
6046
5834
  if (state.quotes === 1 && value !== "\"") {
6047
5835
  value = utils.escapeRegex(value);
6048
5836
  prev.value += value;
6049
5837
  append({ value });
6050
5838
  continue;
6051
5839
  }
6052
- /**
6053
- * Double quotes
6054
- */
6055
5840
  if (value === "\"") {
6056
5841
  state.quotes = state.quotes === 1 ? 0 : 1;
6057
5842
  if (opts.keepQuotes === true) push({
@@ -6060,9 +5845,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6060
5845
  });
6061
5846
  continue;
6062
5847
  }
6063
- /**
6064
- * Parentheses
6065
- */
6066
5848
  if (value === "(") {
6067
5849
  increment("parens");
6068
5850
  push({
@@ -6086,9 +5868,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6086
5868
  decrement("parens");
6087
5869
  continue;
6088
5870
  }
6089
- /**
6090
- * Square brackets
6091
- */
6092
5871
  if (value === "[") {
6093
5872
  if (opts.nobracket === true || !remaining().includes("]")) {
6094
5873
  if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
@@ -6135,9 +5914,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6135
5914
  state.output += prev.value;
6136
5915
  continue;
6137
5916
  }
6138
- /**
6139
- * Braces
6140
- */
6141
5917
  if (value === "{" && opts.nobrace !== true) {
6142
5918
  increment("braces");
6143
5919
  const open = {
@@ -6190,9 +5966,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6190
5966
  braces.pop();
6191
5967
  continue;
6192
5968
  }
6193
- /**
6194
- * Pipes
6195
- */
6196
5969
  if (value === "|") {
6197
5970
  if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++;
6198
5971
  push({
@@ -6201,9 +5974,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6201
5974
  });
6202
5975
  continue;
6203
5976
  }
6204
- /**
6205
- * Commas
6206
- */
6207
5977
  if (value === ",") {
6208
5978
  let output = value;
6209
5979
  const brace = braces[braces.length - 1];
@@ -6218,9 +5988,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6218
5988
  });
6219
5989
  continue;
6220
5990
  }
6221
- /**
6222
- * Slashes
6223
- */
6224
5991
  if (value === "/") {
6225
5992
  if (prev.type === "dot" && state.index === state.start + 1) {
6226
5993
  state.start = state.index + 1;
@@ -6237,9 +6004,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6237
6004
  });
6238
6005
  continue;
6239
6006
  }
6240
- /**
6241
- * Dots
6242
- */
6243
6007
  if (value === ".") {
6244
6008
  if (state.braces > 0 && prev.type === "dot") {
6245
6009
  if (prev.value === ".") prev.output = DOT_LITERAL;
@@ -6265,9 +6029,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6265
6029
  });
6266
6030
  continue;
6267
6031
  }
6268
- /**
6269
- * Question marks
6270
- */
6271
6032
  if (value === "?") {
6272
6033
  if (!(prev && prev.value === "(") && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6273
6034
  extglobOpen("qmark", value);
@@ -6299,9 +6060,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6299
6060
  });
6300
6061
  continue;
6301
6062
  }
6302
- /**
6303
- * Exclamation
6304
- */
6305
6063
  if (value === "!") {
6306
6064
  if (opts.noextglob !== true && peek() === "(") {
6307
6065
  if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
@@ -6314,9 +6072,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6314
6072
  continue;
6315
6073
  }
6316
6074
  }
6317
- /**
6318
- * Plus
6319
- */
6320
6075
  if (value === "+") {
6321
6076
  if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6322
6077
  extglobOpen("plus", value);
@@ -6343,9 +6098,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6343
6098
  });
6344
6099
  continue;
6345
6100
  }
6346
- /**
6347
- * Plain text
6348
- */
6349
6101
  if (value === "@") {
6350
6102
  if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6351
6103
  push({
@@ -6362,9 +6114,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6362
6114
  });
6363
6115
  continue;
6364
6116
  }
6365
- /**
6366
- * Plain text
6367
- */
6368
6117
  if (value !== "*") {
6369
6118
  if (value === "$" || value === "^") value = `\\${value}`;
6370
6119
  const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
@@ -6378,9 +6127,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6378
6127
  });
6379
6128
  continue;
6380
6129
  }
6381
- /**
6382
- * Stars
6383
- */
6384
6130
  if (prev && (prev.type === "globstar" || prev.star === true)) {
6385
6131
  prev.type = "star";
6386
6132
  prev.star = true;
@@ -6552,11 +6298,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6552
6298
  }
6553
6299
  return state;
6554
6300
  };
6555
- /**
6556
- * Fast paths for creating regular expressions for common glob patterns.
6557
- * This can significantly speed up processing and has very little downside
6558
- * impact when none of the fast paths match.
6559
- */
6560
6301
  parse.fastpaths = (input, options) => {
6561
6302
  const opts = { ...options };
6562
6303
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
@@ -6602,35 +6343,12 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6602
6343
  };
6603
6344
  module.exports = parse;
6604
6345
  }));
6605
- //#endregion
6606
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js
6607
6346
  var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6608
6347
  const scan = require_scan();
6609
6348
  const parse = require_parse();
6610
6349
  const utils = require_utils$1();
6611
6350
  const constants = require_constants();
6612
6351
  const isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
6613
- /**
6614
- * Creates a matcher function from one or more glob patterns. The
6615
- * returned function takes a string to match as its first argument,
6616
- * and returns true if the string is a match. The returned matcher
6617
- * function also takes a boolean as the second argument that, when true,
6618
- * returns an object with additional information.
6619
- *
6620
- * ```js
6621
- * const picomatch = require('picomatch');
6622
- * // picomatch(glob[, options]);
6623
- *
6624
- * const isMatch = picomatch('*.!(*a)');
6625
- * console.log(isMatch('a.a')); //=> false
6626
- * console.log(isMatch('a.b')); //=> true
6627
- * ```
6628
- * @name picomatch
6629
- * @param {String|Array} `globs` One or more glob patterns.
6630
- * @param {Object=} `options`
6631
- * @return {Function=} Returns a matcher function.
6632
- * @api public
6633
- */
6634
6352
  const picomatch = (glob, options, returnState = false) => {
6635
6353
  if (Array.isArray(glob)) {
6636
6354
  const fns = glob.map((input) => picomatch(input, options, returnState));
@@ -6691,22 +6409,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6691
6409
  if (returnState) matcher.state = state;
6692
6410
  return matcher;
6693
6411
  };
6694
- /**
6695
- * Test `input` with the given `regex`. This is used by the main
6696
- * `picomatch()` function to test the input string.
6697
- *
6698
- * ```js
6699
- * const picomatch = require('picomatch');
6700
- * // picomatch.test(input, regex[, options]);
6701
- *
6702
- * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
6703
- * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
6704
- * ```
6705
- * @param {String} `input` String to test.
6706
- * @param {RegExp} `regex`
6707
- * @return {Object} Returns an object with matching info.
6708
- * @api public
6709
- */
6710
6412
  picomatch.test = (input, regex, options, { glob, posix } = {}) => {
6711
6413
  if (typeof input !== "string") throw new TypeError("Expected input to be a string");
6712
6414
  if (input === "") return {
@@ -6729,52 +6431,10 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6729
6431
  output
6730
6432
  };
6731
6433
  };
6732
- /**
6733
- * Match the basename of a filepath.
6734
- *
6735
- * ```js
6736
- * const picomatch = require('picomatch');
6737
- * // picomatch.matchBase(input, glob[, options]);
6738
- * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
6739
- * ```
6740
- * @param {String} `input` String to test.
6741
- * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
6742
- * @return {Boolean}
6743
- * @api public
6744
- */
6745
6434
  picomatch.matchBase = (input, glob, options) => {
6746
6435
  return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
6747
6436
  };
6748
- /**
6749
- * Returns true if **any** of the given glob `patterns` match the specified `string`.
6750
- *
6751
- * ```js
6752
- * const picomatch = require('picomatch');
6753
- * // picomatch.isMatch(string, patterns[, options]);
6754
- *
6755
- * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
6756
- * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
6757
- * ```
6758
- * @param {String|Array} str The string to test.
6759
- * @param {String|Array} patterns One or more glob patterns to use for matching.
6760
- * @param {Object} [options] See available [options](#options).
6761
- * @return {Boolean} Returns true if any patterns match `str`
6762
- * @api public
6763
- */
6764
6437
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
6765
- /**
6766
- * Parse a glob pattern to create the source string for a regular
6767
- * expression.
6768
- *
6769
- * ```js
6770
- * const picomatch = require('picomatch');
6771
- * const result = picomatch.parse(pattern[, options]);
6772
- * ```
6773
- * @param {String} `pattern`
6774
- * @param {Object} `options`
6775
- * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
6776
- * @api public
6777
- */
6778
6438
  picomatch.parse = (pattern, options) => {
6779
6439
  if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
6780
6440
  return parse(pattern, {
@@ -6782,44 +6442,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6782
6442
  fastpaths: false
6783
6443
  });
6784
6444
  };
6785
- /**
6786
- * Scan a glob pattern to separate the pattern into segments.
6787
- *
6788
- * ```js
6789
- * const picomatch = require('picomatch');
6790
- * // picomatch.scan(input[, options]);
6791
- *
6792
- * const result = picomatch.scan('!./foo/*.js');
6793
- * console.log(result);
6794
- * { prefix: '!./',
6795
- * input: '!./foo/*.js',
6796
- * start: 3,
6797
- * base: 'foo',
6798
- * glob: '*.js',
6799
- * isBrace: false,
6800
- * isBracket: false,
6801
- * isGlob: true,
6802
- * isExtglob: false,
6803
- * isGlobstar: false,
6804
- * negated: true }
6805
- * ```
6806
- * @param {String} `input` Glob pattern to scan.
6807
- * @param {Object} `options`
6808
- * @return {Object} Returns an object with
6809
- * @api public
6810
- */
6811
6445
  picomatch.scan = (input, options) => scan(input, options);
6812
- /**
6813
- * Compile a regular expression from the `state` object returned by the
6814
- * [parse()](#parse) method.
6815
- *
6816
- * @param {Object} `state`
6817
- * @param {Object} `options`
6818
- * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
6819
- * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
6820
- * @return {RegExp}
6821
- * @api public
6822
- */
6823
6446
  picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
6824
6447
  if (returnOutput === true) return state.output;
6825
6448
  const opts = options || {};
@@ -6831,24 +6454,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6831
6454
  if (returnState === true) regex.state = state;
6832
6455
  return regex;
6833
6456
  };
6834
- /**
6835
- * Create a regular expression from a parsed glob pattern.
6836
- *
6837
- * ```js
6838
- * const picomatch = require('picomatch');
6839
- * const state = picomatch.parse('*.js');
6840
- * // picomatch.compileRe(state[, options]);
6841
- *
6842
- * console.log(picomatch.compileRe(state));
6843
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
6844
- * ```
6845
- * @param {String} `state` The object returned from the `.parse` method.
6846
- * @param {Object} `options`
6847
- * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
6848
- * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
6849
- * @return {RegExp} Returns a regex created from the given pattern.
6850
- * @api public
6851
- */
6852
6457
  picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
6853
6458
  if (!input || typeof input !== "string") throw new TypeError("Expected a non-empty string");
6854
6459
  let parsed = {
@@ -6859,22 +6464,6 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6859
6464
  if (!parsed.output) parsed = parse(input, options);
6860
6465
  return picomatch.compileRe(parsed, options, returnOutput, returnState);
6861
6466
  };
6862
- /**
6863
- * Create a regular expression from the given regex source string.
6864
- *
6865
- * ```js
6866
- * const picomatch = require('picomatch');
6867
- * // picomatch.toRegex(source[, options]);
6868
- *
6869
- * const { output } = picomatch.parse('*.js');
6870
- * console.log(picomatch.toRegex(output));
6871
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
6872
- * ```
6873
- * @param {String} `source` Regular expression source string.
6874
- * @param {Object} `options`
6875
- * @return {RegExp}
6876
- * @api public
6877
- */
6878
6467
  picomatch.toRegex = (source, options) => {
6879
6468
  try {
6880
6469
  const opts = options || {};
@@ -6884,18 +6473,9 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6884
6473
  return /$^/;
6885
6474
  }
6886
6475
  };
6887
- /**
6888
- * Picomatch constants.
6889
- * @return {Object}
6890
- */
6891
6476
  picomatch.constants = constants;
6892
- /**
6893
- * Expose "picomatch"
6894
- */
6895
6477
  module.exports = picomatch;
6896
6478
  }));
6897
- //#endregion
6898
- //#region node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js
6899
6479
  var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6900
6480
  const pico = require_picomatch$1();
6901
6481
  const utils = require_utils$1();
@@ -6909,39 +6489,38 @@ var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6909
6489
  Object.assign(picomatch, pico);
6910
6490
  module.exports = picomatch;
6911
6491
  }));
6912
- //#endregion
6913
- //#region node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs
6914
6492
  var import_picomatch = /* @__PURE__ */ __toESM$1(require_picomatch(), 1);
6915
6493
  const isReadonlyArray = Array.isArray;
6494
+ const BACKSLASHES = /\\/g;
6916
6495
  const isWin = process.platform === "win32";
6917
6496
  const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
6918
6497
  function getPartialMatcher(patterns, options = {}) {
6919
6498
  const patternsCount = patterns.length;
6920
6499
  const patternsParts = Array(patternsCount);
6921
6500
  const matchers = Array(patternsCount);
6922
- const globstarEnabled = !options.noglobstar;
6923
- for (let i = 0; i < patternsCount; i++) {
6501
+ let i, j;
6502
+ for (i = 0; i < patternsCount; i++) {
6924
6503
  const parts = splitPattern(patterns[i]);
6925
6504
  patternsParts[i] = parts;
6926
6505
  const partsCount = parts.length;
6927
6506
  const partMatchers = Array(partsCount);
6928
- for (let j = 0; j < partsCount; j++) partMatchers[j] = (0, import_picomatch.default)(parts[j], options);
6507
+ for (j = 0; j < partsCount; j++) partMatchers[j] = (0, import_picomatch.default)(parts[j], options);
6929
6508
  matchers[i] = partMatchers;
6930
6509
  }
6931
6510
  return (input) => {
6932
6511
  const inputParts = input.split("/");
6933
6512
  if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
6934
- for (let i = 0; i < patterns.length; i++) {
6513
+ for (i = 0; i < patternsCount; i++) {
6935
6514
  const patternParts = patternsParts[i];
6936
6515
  const matcher = matchers[i];
6937
6516
  const inputPatternCount = inputParts.length;
6938
6517
  const minParts = Math.min(inputPatternCount, patternParts.length);
6939
- let j = 0;
6518
+ j = 0;
6940
6519
  while (j < minParts) {
6941
6520
  const part = patternParts[j];
6942
6521
  if (part.includes("/")) return true;
6943
6522
  if (!matcher[j](inputParts[j])) break;
6944
- if (globstarEnabled && part === "**") return true;
6523
+ if (!options.noglobstar && part === "**") return true;
6945
6524
  j++;
6946
6525
  }
6947
6526
  if (j === inputPatternCount) return true;
@@ -6949,13 +6528,12 @@ function getPartialMatcher(patterns, options = {}) {
6949
6528
  return false;
6950
6529
  };
6951
6530
  }
6952
- /* node:coverage ignore next 2 */
6953
6531
  const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
6954
6532
  const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
6955
6533
  function buildFormat(cwd, root, absolute) {
6956
6534
  if (cwd === root || root.startsWith(`${cwd}/`)) {
6957
6535
  if (absolute) {
6958
- const start = isRoot(cwd) ? cwd.length : cwd.length + 1;
6536
+ const start = cwd.length + +!isRoot(cwd);
6959
6537
  return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
6960
6538
  }
6961
6539
  const prefix = root.slice(cwd.length + 1);
@@ -6976,38 +6554,20 @@ function buildRelative(cwd, root) {
6976
6554
  }
6977
6555
  return (p) => {
6978
6556
  const result = posix.relative(cwd, `${root}/${p}`);
6979
- if (p.endsWith("/") && result !== "") return `${result}/`;
6980
- return result || ".";
6557
+ return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
6981
6558
  };
6982
6559
  }
6983
6560
  const splitPatternOptions = { parts: true };
6984
- function splitPattern(path$1) {
6561
+ function splitPattern(path) {
6985
6562
  var _result$parts;
6986
- const result = import_picomatch.default.scan(path$1, splitPatternOptions);
6987
- return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
6563
+ const result = import_picomatch.default.scan(path, splitPatternOptions);
6564
+ return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
6988
6565
  }
6989
6566
  const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
6990
6567
  const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
6991
- const escapePosixPath = (path$1) => path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
6992
- const escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
6993
- /**
6994
- * Escapes a path's special characters depending on the platform.
6995
- * @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
6996
- */
6997
- /* node:coverage ignore next */
6568
+ const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
6569
+ const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
6998
6570
  const escapePath = isWin ? escapeWin32Path : escapePosixPath;
6999
- /**
7000
- * Checks if a pattern has dynamic parts.
7001
- *
7002
- * Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
7003
- *
7004
- * - Doesn't necessarily return `false` on patterns that include `\`.
7005
- * - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
7006
- * - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
7007
- * - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
7008
- *
7009
- * @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
7010
- */
7011
6571
  function isDynamicPattern(pattern, options) {
7012
6572
  if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
7013
6573
  const scan = import_picomatch.default.scan(pattern);
@@ -7016,28 +6576,31 @@ function isDynamicPattern(pattern, options) {
7016
6576
  function log(...tasks) {
7017
6577
  console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
7018
6578
  }
6579
+ function ensureStringArray(value) {
6580
+ return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
6581
+ }
7019
6582
  const PARENT_DIRECTORY = /^(\/?\.\.)+/;
7020
6583
  const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
7021
- const BACKSLASHES = /\\/g;
7022
- function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
6584
+ function normalizePattern(pattern, opts, props, isIgnore) {
6585
+ var _PARENT_DIRECTORY$exe;
6586
+ const cwd = opts.cwd;
7023
6587
  let result = pattern;
7024
- if (pattern.endsWith("/")) result = pattern.slice(0, -1);
7025
- if (!result.endsWith("*") && expandDirectories) result += "/**";
6588
+ if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
6589
+ if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
7026
6590
  const escapedCwd = escapePath(cwd);
7027
- if (path$1.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result);
7028
- else result = posix.normalize(result);
7029
- const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
6591
+ result = isAbsolute$1(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
6592
+ const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
7030
6593
  const parts = splitPattern(result);
7031
- if (parentDirectoryMatch === null || parentDirectoryMatch === void 0 ? void 0 : parentDirectoryMatch[0]) {
7032
- const n = (parentDirectoryMatch[0].length + 1) / 3;
6594
+ if (parentDir) {
6595
+ const n = (parentDir.length + 1) / 3;
7033
6596
  let i = 0;
7034
6597
  const cwdParts = escapedCwd.split("/");
7035
6598
  while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
7036
6599
  result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
7037
6600
  i++;
7038
6601
  }
7039
- const potentialRoot = posix.join(cwd, parentDirectoryMatch[0].slice(i * 3));
7040
- if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) {
6602
+ const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
6603
+ if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
7041
6604
  props.root = potentialRoot;
7042
6605
  props.depthOffset = -n + i;
7043
6606
  }
@@ -7053,7 +6616,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
7053
6616
  newCommonPath.pop();
7054
6617
  break;
7055
6618
  }
7056
- if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break;
6619
+ if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
7057
6620
  newCommonPath.push(part);
7058
6621
  }
7059
6622
  props.depthOffset = newCommonPath.length;
@@ -7062,138 +6625,127 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
7062
6625
  }
7063
6626
  return result;
7064
6627
  }
7065
- function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories = true }, cwd, props) {
7066
- if (typeof patterns === "string") patterns = [patterns];
7067
- if (typeof ignore === "string") ignore = [ignore];
6628
+ function processPatterns(options, patterns, props) {
7068
6629
  const matchPatterns = [];
7069
6630
  const ignorePatterns = [];
7070
- for (const pattern of ignore) {
6631
+ for (const pattern of options.ignore) {
7071
6632
  if (!pattern) continue;
7072
- if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true));
6633
+ if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
7073
6634
  }
7074
6635
  for (const pattern of patterns) {
7075
6636
  if (!pattern) continue;
7076
- if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false));
7077
- else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true));
6637
+ if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
6638
+ else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
7078
6639
  }
7079
6640
  return {
7080
6641
  match: matchPatterns,
7081
6642
  ignore: ignorePatterns
7082
6643
  };
7083
6644
  }
7084
- function formatPaths(paths, relative) {
7085
- for (let i = paths.length - 1; i >= 0; i--) {
7086
- const path$1 = paths[i];
7087
- paths[i] = relative(path$1);
7088
- }
7089
- return paths;
7090
- }
7091
- function normalizeCwd(cwd) {
7092
- if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
7093
- if (cwd instanceof URL) return fileURLToPath$1(cwd).replace(BACKSLASHES, "/");
7094
- return path$1.resolve(cwd).replace(BACKSLASHES, "/");
7095
- }
7096
- function getCrawler(patterns, inputOptions = {}) {
7097
- const options = process.env.TINYGLOBBY_DEBUG ? {
7098
- ...inputOptions,
7099
- debug: true
7100
- } : inputOptions;
7101
- const cwd = normalizeCwd(options.cwd);
7102
- if (options.debug) log("globbing with:", {
7103
- patterns,
7104
- options,
7105
- cwd
7106
- });
7107
- if (Array.isArray(patterns) && patterns.length === 0) return [{
7108
- sync: () => [],
7109
- withPromise: async () => []
7110
- }, false];
6645
+ function buildCrawler(options, patterns) {
6646
+ const cwd = options.cwd;
7111
6647
  const props = {
7112
6648
  root: cwd,
7113
- commonPath: null,
7114
6649
  depthOffset: 0
7115
6650
  };
7116
- const processed = processPatterns({
7117
- ...options,
7118
- patterns
7119
- }, cwd, props);
6651
+ const processed = processPatterns(options, patterns, props);
7120
6652
  if (options.debug) log("internal processing patterns:", processed);
6653
+ const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
6654
+ const root = props.root.replace(BACKSLASHES, "");
7121
6655
  const matchOptions = {
7122
- dot: options.dot,
6656
+ dot,
7123
6657
  nobrace: options.braceExpansion === false,
7124
- nocase: options.caseSensitiveMatch === false,
6658
+ nocase: !caseSensitiveMatch,
7125
6659
  noextglob: options.extglob === false,
7126
6660
  noglobstar: options.globstar === false,
7127
6661
  posix: true
7128
6662
  };
7129
- const matcher = (0, import_picomatch.default)(processed.match, {
7130
- ...matchOptions,
7131
- ignore: processed.ignore
7132
- });
6663
+ const matcher = (0, import_picomatch.default)(processed.match, matchOptions);
7133
6664
  const ignore = (0, import_picomatch.default)(processed.ignore, matchOptions);
7134
6665
  const partialMatcher = getPartialMatcher(processed.match, matchOptions);
7135
- const format = buildFormat(cwd, props.root, options.absolute);
7136
- const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true);
7137
- const fdirOptions = {
7138
- filters: [options.debug ? (p, isDirectory) => {
7139
- const path$1 = format(p, isDirectory);
7140
- const matches = matcher(path$1);
7141
- if (matches) log(`matched ${path$1}`);
6666
+ const format = buildFormat(cwd, root, absolute);
6667
+ const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
6668
+ const excludePredicate = (_, p) => {
6669
+ const relativePath = excludeFormatter(p, true);
6670
+ return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
6671
+ };
6672
+ let maxDepth;
6673
+ if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
6674
+ const crawler = new Builder({
6675
+ filters: [debug ? (p, isDirectory) => {
6676
+ const path = format(p, isDirectory);
6677
+ const matches = matcher(path) && !ignore(path);
6678
+ if (matches) log(`matched ${path}`);
7142
6679
  return matches;
7143
- } : (p, isDirectory) => matcher(format(p, isDirectory))],
7144
- exclude: options.debug ? (_, p) => {
7145
- const relativePath = formatExclude(p, true);
7146
- const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
7147
- if (skipped) log(`skipped ${p}`);
7148
- else log(`crawling ${p}`);
6680
+ } : (p, isDirectory) => {
6681
+ const path = format(p, isDirectory);
6682
+ return matcher(path) && !ignore(path);
6683
+ }],
6684
+ exclude: debug ? (_, p) => {
6685
+ const skipped = excludePredicate(_, p);
6686
+ log(`${skipped ? "skipped" : "crawling"} ${p}`);
7149
6687
  return skipped;
7150
- } : (_, p) => {
7151
- const relativePath = formatExclude(p, true);
7152
- return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
7153
- },
7154
- fs: options.fs ? {
7155
- readdir: options.fs.readdir || nativeFs.readdir,
7156
- readdirSync: options.fs.readdirSync || nativeFs.readdirSync,
7157
- realpath: options.fs.realpath || nativeFs.realpath,
7158
- realpathSync: options.fs.realpathSync || nativeFs.realpathSync,
7159
- stat: options.fs.stat || nativeFs.stat,
7160
- statSync: options.fs.statSync || nativeFs.statSync
7161
- } : void 0,
6688
+ } : excludePredicate,
6689
+ fs: options.fs,
7162
6690
  pathSeparator: "/",
7163
- relativePaths: true,
7164
- resolveSymlinks: true,
6691
+ relativePaths: !absolute,
6692
+ resolvePaths: absolute,
6693
+ includeBasePath: absolute,
6694
+ resolveSymlinks: followSymbolicLinks,
6695
+ excludeSymlinks: !followSymbolicLinks,
6696
+ excludeFiles: onlyDirectories,
6697
+ includeDirs: onlyDirectories || !options.onlyFiles,
6698
+ maxDepth,
7165
6699
  signal: options.signal
6700
+ }).crawl(root);
6701
+ if (options.debug) log("internal properties:", {
6702
+ ...props,
6703
+ root
6704
+ });
6705
+ return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
6706
+ }
6707
+ function formatPaths(paths, mapper) {
6708
+ if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
6709
+ return paths;
6710
+ }
6711
+ const defaultOptions$1 = {
6712
+ caseSensitiveMatch: true,
6713
+ cwd: process.cwd(),
6714
+ debug: !!process.env.TINYGLOBBY_DEBUG,
6715
+ expandDirectories: true,
6716
+ followSymbolicLinks: true,
6717
+ onlyFiles: true
6718
+ };
6719
+ function getOptions$1(options) {
6720
+ const opts = {
6721
+ ...defaultOptions$1,
6722
+ ...options
7166
6723
  };
7167
- if (options.deep !== void 0) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset);
7168
- if (options.absolute) {
7169
- fdirOptions.relativePaths = false;
7170
- fdirOptions.resolvePaths = true;
7171
- fdirOptions.includeBasePath = true;
7172
- }
7173
- if (options.followSymbolicLinks === false) {
7174
- fdirOptions.resolveSymlinks = false;
7175
- fdirOptions.excludeSymlinks = true;
7176
- }
7177
- if (options.onlyDirectories) {
7178
- fdirOptions.excludeFiles = true;
7179
- fdirOptions.includeDirs = true;
7180
- } else if (options.onlyFiles === false) fdirOptions.includeDirs = true;
7181
- props.root = props.root.replace(BACKSLASHES, "");
7182
- const root = props.root;
7183
- if (options.debug) log("internal properties:", props);
7184
- const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
7185
- return [new Builder(fdirOptions).crawl(root), relative];
7186
- }
7187
- async function glob(patternsOrOptions, options) {
7188
- if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
7189
- const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
7190
- const opts = isModern ? options : patternsOrOptions;
7191
- const [crawler, relative] = getCrawler(isModern ? patternsOrOptions : patternsOrOptions.patterns, opts);
7192
- if (!relative) return crawler.withPromise();
7193
- return formatPaths(await crawler.withPromise(), relative);
7194
- }
7195
- //#endregion
7196
- //#region src/build/build.ts
6724
+ opts.cwd = (opts.cwd instanceof URL ? fileURLToPath$1(opts.cwd) : resolve$1(opts.cwd)).replace(BACKSLASHES, "/");
6725
+ opts.ignore = ensureStringArray(opts.ignore);
6726
+ opts.fs && (opts.fs = {
6727
+ readdir: opts.fs.readdir || readdir$1,
6728
+ readdirSync: opts.fs.readdirSync || readdirSync,
6729
+ realpath: opts.fs.realpath || realpath$1,
6730
+ realpathSync: opts.fs.realpathSync || realpathSync$1,
6731
+ stat: opts.fs.stat || stat$2,
6732
+ statSync: opts.fs.statSync || statSync$1
6733
+ });
6734
+ if (opts.debug) log("globbing with options:", opts);
6735
+ return opts;
6736
+ }
6737
+ function getCrawler(globInput, inputOptions = {}) {
6738
+ var _ref;
6739
+ if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
6740
+ const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
6741
+ const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
6742
+ const options = getOptions$1(isModern ? inputOptions : globInput);
6743
+ return patterns.length > 0 ? buildCrawler(options, patterns) : [];
6744
+ }
6745
+ async function glob(globInput, options) {
6746
+ const [crawler, relative] = getCrawler(globInput, options);
6747
+ return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
6748
+ }
7197
6749
  async function build(nitro) {
7198
6750
  switch (nitro.options.builder) {
7199
6751
  case "rollup": {
@@ -7211,8 +6763,6 @@ async function build(nitro) {
7211
6763
  default: throw new Error(`Unknown builder: ${nitro.options.builder}`);
7212
6764
  }
7213
6765
  }
7214
- //#endregion
7215
- //#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/other.js
7216
6766
  const types$3 = {
7217
6767
  "application/prs.cww": ["cww"],
7218
6768
  "application/prs.xsf+xml": ["xsf"],
@@ -8049,8 +7599,6 @@ const types$3 = {
8049
7599
  "x-conference/x-cooltalk": ["ice"]
8050
7600
  };
8051
7601
  Object.freeze(types$3);
8052
- //#endregion
8053
- //#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/standard.js
8054
7602
  const types$2 = {
8055
7603
  "application/andrew-inset": ["ez"],
8056
7604
  "application/appinstaller": ["appinstaller"],
@@ -8522,8 +8070,6 @@ const types$2 = {
8522
8070
  "video/webm": ["webm"]
8523
8071
  };
8524
8072
  Object.freeze(types$2);
8525
- //#endregion
8526
- //#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/Mime.js
8527
8073
  var __classPrivateFieldGet = function(receiver, state, kind, f) {
8528
8074
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
8529
8075
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
@@ -8591,11 +8137,7 @@ var Mime = class {
8591
8137
  }
8592
8138
  };
8593
8139
  _Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
8594
- //#endregion
8595
- //#region node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/index.js
8596
8140
  var src_default = new Mime(types$2, types$3)._freeze();
8597
- //#endregion
8598
- //#region src/utils/compress.ts
8599
8141
  const EncodingMap = {
8600
8142
  gzip: ".gz",
8601
8143
  br: ".br",
@@ -8705,8 +8247,6 @@ const COMPRESSIBLE_MIMES_RE = new Set([
8705
8247
  function isCompressibleMime(mimeType) {
8706
8248
  return COMPRESSIBLE_MIMES_RE.has(mimeType);
8707
8249
  }
8708
- //#endregion
8709
- //#region src/build/assets.ts
8710
8250
  const NEGATION_RE = /^(!?)(.*)$/;
8711
8251
  const PARENT_DIR_GLOB_RE = /!?\.\.\//;
8712
8252
  async function scanUnprefixedPublicAssets(nitro) {
@@ -8750,8 +8290,6 @@ function getIncludePatterns(nitro, assetDir, ignorePatterns = nitro.options.igno
8750
8290
  return (negation ? "" : "!") + (pattern.startsWith("*") ? pattern : relative$2(assetDir, resolve$3(nitro.options.rootDir, pattern)));
8751
8291
  })].filter((p) => !PARENT_DIR_GLOB_RE.test(p));
8752
8292
  }
8753
- //#endregion
8754
- //#region src/build/prepare.ts
8755
8293
  async function prepare(nitro) {
8756
8294
  await prepareDir(nitro.options.output.dir);
8757
8295
  if (!nitro.options.noPublicDir) await prepareDir(nitro.options.output.publicDir);
@@ -8764,8 +8302,6 @@ async function prepareDir(dir) {
8764
8302
  });
8765
8303
  await fsp.mkdir(dir, { recursive: true });
8766
8304
  }
8767
- //#endregion
8768
- //#region node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs
8769
8305
  var astralIdentifierCodes = [
8770
8306
  509,
8771
8307
  0,
@@ -12273,23 +11809,21 @@ var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
12273
11809
  var ecma11BinaryProperties = ecma10BinaryProperties;
12274
11810
  var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
12275
11811
  var ecma13BinaryProperties = ecma12BinaryProperties;
12276
- var ecma14BinaryProperties = ecma13BinaryProperties;
12277
11812
  var unicodeBinaryProperties = {
12278
11813
  9: ecma9BinaryProperties,
12279
11814
  10: ecma10BinaryProperties,
12280
11815
  11: ecma11BinaryProperties,
12281
11816
  12: ecma12BinaryProperties,
12282
11817
  13: ecma13BinaryProperties,
12283
- 14: ecma14BinaryProperties
11818
+ 14: ecma13BinaryProperties
12284
11819
  };
12285
- var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji";
12286
11820
  var unicodeBinaryPropertiesOfStrings = {
12287
11821
  9: "",
12288
11822
  10: "",
12289
11823
  11: "",
12290
11824
  12: "",
12291
11825
  13: "",
12292
- 14: ecma14BinaryPropertiesOfStrings
11826
+ 14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
12293
11827
  };
12294
11828
  var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
12295
11829
  var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
@@ -12297,14 +11831,13 @@ var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Han
12297
11831
  var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
12298
11832
  var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
12299
11833
  var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
12300
- var ecma14ScriptValues = ecma13ScriptValues + " " + scriptValuesAddedInUnicode;
12301
11834
  var unicodeScriptValues = {
12302
11835
  9: ecma9ScriptValues,
12303
11836
  10: ecma10ScriptValues,
12304
11837
  11: ecma11ScriptValues,
12305
11838
  12: ecma12ScriptValues,
12306
11839
  13: ecma13ScriptValues,
12307
- 14: ecma14ScriptValues
11840
+ 14: ecma13ScriptValues + " " + scriptValuesAddedInUnicode
12308
11841
  };
12309
11842
  var data = {};
12310
11843
  function buildUnicodeData(ecmaVersion) {
@@ -12434,12 +11967,6 @@ RegExpValidationState.prototype.eatChars = function eatChars(chs, forceU) {
12434
11967
  this.pos = pos;
12435
11968
  return true;
12436
11969
  };
12437
- /**
12438
- * Validate the flags part of a given RegExpLiteral.
12439
- *
12440
- * @param {RegExpValidationState} state The state to validate RegExp.
12441
- * @returns {void}
12442
- */
12443
11970
  pp$1.validateRegExpFlags = function(state) {
12444
11971
  var validFlags = state.validFlags;
12445
11972
  var flags = state.flags;
@@ -12458,12 +11985,6 @@ function hasProp(obj) {
12458
11985
  for (var _ in obj) return true;
12459
11986
  return false;
12460
11987
  }
12461
- /**
12462
- * Validate the pattern part of a given RegExpLiteral.
12463
- *
12464
- * @param {RegExpValidationState} state The state to validate RegExp.
12465
- * @returns {void}
12466
- */
12467
11988
  pp$1.validateRegExpPattern = function(state) {
12468
11989
  this.regexp_pattern(state);
12469
11990
  if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
@@ -13852,8 +13373,6 @@ function parse(input, options) {
13852
13373
  function tokenizer(input, options) {
13853
13374
  return Parser.tokenizer(input, options);
13854
13375
  }
13855
- //#endregion
13856
- //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.9388d834.mjs
13857
13376
  const m$1 = Symbol.for("__confbox_fmt__"), k$2 = /^(\s+)/, v$1 = /(\s+)$/;
13858
13377
  function x$1(e, t = {}) {
13859
13378
  return {
@@ -13872,8 +13391,6 @@ function N$2(e, t, n) {
13872
13391
  value: x$1(e, n)
13873
13392
  });
13874
13393
  }
13875
- //#endregion
13876
- //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/json5.mjs
13877
13394
  function X$1(D) {
13878
13395
  return D && D.__esModule && Object.prototype.hasOwnProperty.call(D, "default") ? D.default : D;
13879
13396
  }
@@ -14632,8 +14149,6 @@ var Bu = function(C, E, n) {
14632
14149
  }
14633
14150
  };
14634
14151
  X$1(Bu);
14635
- //#endregion
14636
- //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.f9f03f05.mjs
14637
14152
  function $$1(n, l = !1) {
14638
14153
  const g = n.length;
14639
14154
  let e = 0, u = "", p = 0, k = 16, A = 0, o = 0, O = 0, B = 0, b = 0;
@@ -15032,9 +14547,7 @@ function h$2(n, l) {
15032
14547
  const g = K$1(n, l?.errors, l);
15033
14548
  return N$2(n, g, l), g;
15034
14549
  }
15035
- //#endregion
15036
- //#region node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/yaml.mjs
15037
- /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ function oe(e) {
14550
+ function oe(e) {
15038
14551
  return typeof e > "u" || e === null;
15039
14552
  }
15040
14553
  function We(e) {
@@ -16089,8 +15602,6 @@ function dr(e, n) {
16089
15602
  var xr = { dump: dr };
16090
15603
  Ni.load;
16091
15604
  xr.dump;
16092
- //#endregion
16093
- //#region node_modules/.pnpm/pkg-types@1.3.1/node_modules/pkg-types/dist/index.mjs
16094
15605
  const defaultFindOptions = {
16095
15606
  startingFrom: ".",
16096
15607
  rootPattern: /^node_modules$/,
@@ -16147,8 +15658,6 @@ async function resolvePackageJSON(id = process.cwd(), options = {}) {
16147
15658
  ...options
16148
15659
  });
16149
15660
  }
16150
- //#endregion
16151
- //#region node_modules/.pnpm/mlly@1.8.1/node_modules/mlly/dist/index.mjs
16152
15661
  const BUILTIN_MODULES = new Set(builtinModules);
16153
15662
  function normalizeSlash(path) {
16154
15663
  return path.replace(/\\/g, "/");
@@ -16174,16 +15683,6 @@ function getImportNames(cleanedImports) {
16174
15683
  defaultImport: topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || void 0
16175
15684
  };
16176
15685
  }
16177
- /**
16178
- * @typedef ErrnoExceptionFields
16179
- * @property {number | undefined} [errnode]
16180
- * @property {string | undefined} [code]
16181
- * @property {string | undefined} [path]
16182
- * @property {string | undefined} [syscall]
16183
- * @property {string | undefined} [url]
16184
- *
16185
- * @typedef {Error & ErrnoExceptionFields} ErrnoException
16186
- */
16187
15686
  const own$1 = {}.hasOwnProperty;
16188
15687
  const classRegExp = /^([A-Z][a-z\d]*)+$/;
16189
15688
  const kTypes = new Set([
@@ -16198,211 +15697,97 @@ const kTypes = new Set([
16198
15697
  "symbol"
16199
15698
  ]);
16200
15699
  const codes = {};
16201
- /**
16202
- * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
16203
- * We cannot use Intl.ListFormat because it's not available in
16204
- * --without-intl builds.
16205
- *
16206
- * @param {Array<string>} array
16207
- * An array of strings.
16208
- * @param {string} [type]
16209
- * The list type to be inserted before the last element.
16210
- * @returns {string}
16211
- */
16212
15700
  function formatList(array, type = "and") {
16213
15701
  return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array[array.length - 1]}`;
16214
15702
  }
16215
- /** @type {Map<string, MessageFunction | string>} */
16216
15703
  const messages = /* @__PURE__ */ new Map();
16217
15704
  const nodeInternalPrefix = "__node_internal_";
16218
- /** @type {number} */
16219
15705
  let userStackTraceLimit;
16220
- codes.ERR_INVALID_ARG_TYPE = createError(
16221
- "ERR_INVALID_ARG_TYPE",
16222
- /**
16223
- * @param {string} name
16224
- * @param {Array<string> | string} expected
16225
- * @param {unknown} actual
16226
- */
16227
- (name, expected, actual) => {
16228
- assert.ok(typeof name === "string", "'name' must be a string");
16229
- if (!Array.isArray(expected)) expected = [expected];
16230
- let message = "The ";
16231
- if (name.endsWith(" argument")) message += `${name} `;
16232
- else {
16233
- const type = name.includes(".") ? "property" : "argument";
16234
- message += `"${name}" ${type} `;
16235
- }
16236
- message += "must be ";
16237
- /** @type {Array<string>} */
16238
- const types = [];
16239
- /** @type {Array<string>} */
16240
- const instances = [];
16241
- /** @type {Array<string>} */
16242
- const other = [];
16243
- for (const value of expected) {
16244
- assert.ok(typeof value === "string", "All expected entries have to be of type string");
16245
- if (kTypes.has(value)) types.push(value.toLowerCase());
16246
- else if (classRegExp.exec(value) === null) {
16247
- assert.ok(value !== "object", "The value \"object\" should be written as \"Object\"");
16248
- other.push(value);
16249
- } else instances.push(value);
16250
- }
16251
- if (instances.length > 0) {
16252
- const pos = types.indexOf("object");
16253
- if (pos !== -1) {
16254
- types.slice(pos, 1);
16255
- instances.push("Object");
16256
- }
16257
- }
16258
- if (types.length > 0) {
16259
- message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`;
16260
- if (instances.length > 0 || other.length > 0) message += " or ";
16261
- }
16262
- if (instances.length > 0) {
16263
- message += `an instance of ${formatList(instances, "or")}`;
16264
- if (other.length > 0) message += " or ";
16265
- }
16266
- if (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, "or")}`;
16267
- else {
16268
- if (other[0].toLowerCase() !== other[0]) message += "an ";
16269
- message += `${other[0]}`;
15706
+ codes.ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
15707
+ assert.ok(typeof name === "string", "'name' must be a string");
15708
+ if (!Array.isArray(expected)) expected = [expected];
15709
+ let message = "The ";
15710
+ if (name.endsWith(" argument")) message += `${name} `;
15711
+ else {
15712
+ const type = name.includes(".") ? "property" : "argument";
15713
+ message += `"${name}" ${type} `;
15714
+ }
15715
+ message += "must be ";
15716
+ const types = [];
15717
+ const instances = [];
15718
+ const other = [];
15719
+ for (const value of expected) {
15720
+ assert.ok(typeof value === "string", "All expected entries have to be of type string");
15721
+ if (kTypes.has(value)) types.push(value.toLowerCase());
15722
+ else if (classRegExp.exec(value) === null) {
15723
+ assert.ok(value !== "object", "The value \"object\" should be written as \"Object\"");
15724
+ other.push(value);
15725
+ } else instances.push(value);
15726
+ }
15727
+ if (instances.length > 0) {
15728
+ const pos = types.indexOf("object");
15729
+ if (pos !== -1) {
15730
+ types.slice(pos, 1);
15731
+ instances.push("Object");
16270
15732
  }
16271
- message += `. Received ${determineSpecificType(actual)}`;
16272
- return message;
16273
- },
16274
- TypeError
16275
- );
16276
- codes.ERR_INVALID_MODULE_SPECIFIER = createError(
16277
- "ERR_INVALID_MODULE_SPECIFIER",
16278
- /**
16279
- * @param {string} request
16280
- * @param {string} reason
16281
- * @param {string} [base]
16282
- */
16283
- (request, reason, base = void 0) => {
16284
- return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
16285
- },
16286
- TypeError
16287
- );
16288
- codes.ERR_INVALID_PACKAGE_CONFIG = createError(
16289
- "ERR_INVALID_PACKAGE_CONFIG",
16290
- /**
16291
- * @param {string} path
16292
- * @param {string} [base]
16293
- * @param {string} [message]
16294
- */
16295
- (path, base, message) => {
16296
- return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
16297
- },
16298
- Error
16299
- );
16300
- codes.ERR_INVALID_PACKAGE_TARGET = createError(
16301
- "ERR_INVALID_PACKAGE_TARGET",
16302
- /**
16303
- * @param {string} packagePath
16304
- * @param {string} key
16305
- * @param {unknown} target
16306
- * @param {boolean} [isImport=false]
16307
- * @param {string} [base]
16308
- */
16309
- (packagePath, key, target, isImport = false, base = void 0) => {
16310
- const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
16311
- if (key === ".") {
16312
- assert.ok(isImport === false);
16313
- return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
16314
- }
16315
- return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
16316
- },
16317
- Error
16318
- );
16319
- codes.ERR_MODULE_NOT_FOUND = createError(
16320
- "ERR_MODULE_NOT_FOUND",
16321
- /**
16322
- * @param {string} path
16323
- * @param {string} base
16324
- * @param {boolean} [exactUrl]
16325
- */
16326
- (path, base, exactUrl = false) => {
16327
- return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
16328
- },
16329
- Error
16330
- );
15733
+ }
15734
+ if (types.length > 0) {
15735
+ message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`;
15736
+ if (instances.length > 0 || other.length > 0) message += " or ";
15737
+ }
15738
+ if (instances.length > 0) {
15739
+ message += `an instance of ${formatList(instances, "or")}`;
15740
+ if (other.length > 0) message += " or ";
15741
+ }
15742
+ if (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, "or")}`;
15743
+ else {
15744
+ if (other[0].toLowerCase() !== other[0]) message += "an ";
15745
+ message += `${other[0]}`;
15746
+ }
15747
+ message += `. Received ${determineSpecificType(actual)}`;
15748
+ return message;
15749
+ }, TypeError);
15750
+ codes.ERR_INVALID_MODULE_SPECIFIER = createError("ERR_INVALID_MODULE_SPECIFIER", (request, reason, base = void 0) => {
15751
+ return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
15752
+ }, TypeError);
15753
+ codes.ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path, base, message) => {
15754
+ return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
15755
+ }, Error);
15756
+ codes.ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = false, base = void 0) => {
15757
+ const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
15758
+ if (key === ".") {
15759
+ assert.ok(isImport === false);
15760
+ return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
15761
+ }
15762
+ return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
15763
+ }, Error);
15764
+ codes.ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path, base, exactUrl = false) => {
15765
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
15766
+ }, Error);
16331
15767
  codes.ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error);
16332
- codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(
16333
- "ERR_PACKAGE_IMPORT_NOT_DEFINED",
16334
- /**
16335
- * @param {string} specifier
16336
- * @param {string} packagePath
16337
- * @param {string} base
16338
- */
16339
- (specifier, packagePath, base) => {
16340
- return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`;
16341
- },
16342
- TypeError
16343
- );
16344
- codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
16345
- "ERR_PACKAGE_PATH_NOT_EXPORTED",
16346
- /**
16347
- * @param {string} packagePath
16348
- * @param {string} subpath
16349
- * @param {string} [base]
16350
- */
16351
- (packagePath, subpath, base = void 0) => {
16352
- if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
16353
- return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
16354
- },
16355
- Error
16356
- );
15768
+ codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => {
15769
+ return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`;
15770
+ }, TypeError);
15771
+ codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError("ERR_PACKAGE_PATH_NOT_EXPORTED", (packagePath, subpath, base = void 0) => {
15772
+ if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
15773
+ return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
15774
+ }, Error);
16357
15775
  codes.ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
16358
15776
  codes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError);
16359
- codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
16360
- "ERR_UNKNOWN_FILE_EXTENSION",
16361
- /**
16362
- * @param {string} extension
16363
- * @param {string} path
16364
- */
16365
- (extension, path) => {
16366
- return `Unknown file extension "${extension}" for ${path}`;
16367
- },
16368
- TypeError
16369
- );
16370
- codes.ERR_INVALID_ARG_VALUE = createError(
16371
- "ERR_INVALID_ARG_VALUE",
16372
- /**
16373
- * @param {string} name
16374
- * @param {unknown} value
16375
- * @param {string} [reason='is invalid']
16376
- */
16377
- (name, value, reason = "is invalid") => {
16378
- let inspected = inspect(value);
16379
- if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
16380
- return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
16381
- },
16382
- TypeError
16383
- );
16384
- /**
16385
- * Utility function for registering the error codes. Only used here. Exported
16386
- * *only* to allow for testing.
16387
- * @param {string} sym
16388
- * @param {MessageFunction | string} value
16389
- * @param {ErrorConstructor} constructor
16390
- * @returns {new (...parameters: Array<any>) => Error}
16391
- */
15777
+ codes.ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path) => {
15778
+ return `Unknown file extension "${extension}" for ${path}`;
15779
+ }, TypeError);
15780
+ codes.ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
15781
+ let inspected = inspect(value);
15782
+ if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`;
15783
+ return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
15784
+ }, TypeError);
16392
15785
  function createError(sym, value, constructor) {
16393
15786
  messages.set(sym, value);
16394
15787
  return makeNodeErrorWithCode(constructor, sym);
16395
15788
  }
16396
- /**
16397
- * @param {ErrorConstructor} Base
16398
- * @param {string} key
16399
- * @returns {ErrorConstructor}
16400
- */
16401
15789
  function makeNodeErrorWithCode(Base, key) {
16402
15790
  return NodeError;
16403
- /**
16404
- * @param {Array<unknown>} parameters
16405
- */
16406
15791
  function NodeError(...parameters) {
16407
15792
  const limit = Error.stackTraceLimit;
16408
15793
  if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
@@ -16430,9 +15815,6 @@ function makeNodeErrorWithCode(Base, key) {
16430
15815
  return error;
16431
15816
  }
16432
15817
  }
16433
- /**
16434
- * @returns {boolean}
16435
- */
16436
15818
  function isErrorStackTraceLimitWritable() {
16437
15819
  try {
16438
15820
  if (v8.startupSnapshot.isBuildingSnapshot()) return false;
@@ -16441,39 +15823,21 @@ function isErrorStackTraceLimitWritable() {
16441
15823
  if (desc === void 0) return Object.isExtensible(Error);
16442
15824
  return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
16443
15825
  }
16444
- /**
16445
- * This function removes unnecessary frames from Node.js core errors.
16446
- * @template {(...parameters: unknown[]) => unknown} T
16447
- * @param {T} wrappedFunction
16448
- * @returns {T}
16449
- */
16450
15826
  function hideStackFrames(wrappedFunction) {
16451
15827
  const hidden = nodeInternalPrefix + wrappedFunction.name;
16452
15828
  Object.defineProperty(wrappedFunction, "name", { value: hidden });
16453
15829
  return wrappedFunction;
16454
15830
  }
16455
- const captureLargerStackTrace = hideStackFrames(
16456
- /**
16457
- * @param {Error} error
16458
- * @returns {Error}
16459
- */
16460
- function(error) {
16461
- const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
16462
- if (stackTraceLimitIsWritable) {
16463
- userStackTraceLimit = Error.stackTraceLimit;
16464
- Error.stackTraceLimit = Number.POSITIVE_INFINITY;
16465
- }
16466
- Error.captureStackTrace(error);
16467
- if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
16468
- return error;
15831
+ const captureLargerStackTrace = hideStackFrames(function(error) {
15832
+ const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
15833
+ if (stackTraceLimitIsWritable) {
15834
+ userStackTraceLimit = Error.stackTraceLimit;
15835
+ Error.stackTraceLimit = Number.POSITIVE_INFINITY;
16469
15836
  }
16470
- );
16471
- /**
16472
- * @param {string} key
16473
- * @param {Array<unknown>} parameters
16474
- * @param {Error} self
16475
- * @returns {string}
16476
- */
15837
+ Error.captureStackTrace(error);
15838
+ if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
15839
+ return error;
15840
+ });
16477
15841
  function getMessage(key, parameters, self) {
16478
15842
  const message = messages.get(key);
16479
15843
  assert.ok(message !== void 0, "expected `message` to be found");
@@ -16489,11 +15853,6 @@ function getMessage(key, parameters, self) {
16489
15853
  parameters.unshift(message);
16490
15854
  return Reflect.apply(format, null, parameters);
16491
15855
  }
16492
- /**
16493
- * Determine the specific type of a value for type-mismatch errors.
16494
- * @param {unknown} value
16495
- * @returns {string}
16496
- */
16497
15856
  function determineSpecificType(value) {
16498
15857
  if (value === null || value === void 0) return String(value);
16499
15858
  if (typeof value === "function" && value.name) return `function ${value.name}`;
@@ -16507,17 +15866,10 @@ function determineSpecificType(value) {
16507
15866
  }
16508
15867
  const hasOwnProperty$1 = {}.hasOwnProperty;
16509
15868
  const { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
16510
- /** @type {Map<string, PackageConfig>} */
16511
15869
  const cache = /* @__PURE__ */ new Map();
16512
- /**
16513
- * @param {string} jsonPath
16514
- * @param {{specifier: URL | string, base?: URL}} options
16515
- * @returns {PackageConfig}
16516
- */
16517
15870
  function read(jsonPath, { base, specifier }) {
16518
15871
  const existing = cache.get(jsonPath);
16519
15872
  if (existing) return existing;
16520
- /** @type {string | undefined} */
16521
15873
  let string;
16522
15874
  try {
16523
15875
  string = fs.readFileSync(path.toNamespacedPath(jsonPath), "utf8");
@@ -16525,7 +15877,6 @@ function read(jsonPath, { base, specifier }) {
16525
15877
  const exception = error;
16526
15878
  if (exception.code !== "ENOENT") throw exception;
16527
15879
  }
16528
- /** @type {PackageConfig} */
16529
15880
  const result = {
16530
15881
  exists: false,
16531
15882
  pjsonPath: jsonPath,
@@ -16536,7 +15887,6 @@ function read(jsonPath, { base, specifier }) {
16536
15887
  imports: void 0
16537
15888
  };
16538
15889
  if (string !== void 0) {
16539
- /** @type {Record<string, unknown>} */
16540
15890
  let parsed;
16541
15891
  try {
16542
15892
  parsed = JSON.parse(string);
@@ -16556,10 +15906,6 @@ function read(jsonPath, { base, specifier }) {
16556
15906
  cache.set(jsonPath, result);
16557
15907
  return result;
16558
15908
  }
16559
- /**
16560
- * @param {URL | string} resolved
16561
- * @returns {PackageConfig}
16562
- */
16563
15909
  function getPackageScopeConfig(resolved) {
16564
15910
  let packageJSONUrl = new URL("package.json", resolved);
16565
15911
  while (true) {
@@ -16576,17 +15922,11 @@ function getPackageScopeConfig(resolved) {
16576
15922
  type: "none"
16577
15923
  };
16578
15924
  }
16579
- /**
16580
- * Returns the package type for a given URL.
16581
- * @param {URL} url - The URL to get the package type for.
16582
- * @returns {PackageType}
16583
- */
16584
15925
  function getPackageType(url) {
16585
15926
  return getPackageScopeConfig(url).type;
16586
15927
  }
16587
15928
  const { ERR_UNKNOWN_FILE_EXTENSION } = codes;
16588
15929
  const hasOwnProperty = {}.hasOwnProperty;
16589
- /** @type {Record<string, string>} */
16590
15930
  const extensionFormatMap = {
16591
15931
  __proto__: null,
16592
15932
  ".cjs": "commonjs",
@@ -16594,25 +15934,11 @@ const extensionFormatMap = {
16594
15934
  ".json": "json",
16595
15935
  ".mjs": "module"
16596
15936
  };
16597
- /**
16598
- * @param {string | null} mime
16599
- * @returns {string | null}
16600
- */
16601
15937
  function mimeToFormat(mime) {
16602
15938
  if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) return "module";
16603
15939
  if (mime === "application/json") return "json";
16604
15940
  return null;
16605
15941
  }
16606
- /**
16607
- * @callback ProtocolHandler
16608
- * @param {URL} parsed
16609
- * @param {{parentURL: string, source?: Buffer}} context
16610
- * @param {boolean} ignoreErrors
16611
- * @returns {string | null | void}
16612
- */
16613
- /**
16614
- * @type {Record<string, ProtocolHandler>}
16615
- */
16616
15942
  const protocolHandlers = {
16617
15943
  __proto__: null,
16618
15944
  "data:": getDataProtocolModuleFormat,
@@ -16623,9 +15949,6 @@ const protocolHandlers = {
16623
15949
  return "builtin";
16624
15950
  }
16625
15951
  };
16626
- /**
16627
- * @param {URL} parsed
16628
- */
16629
15952
  function getDataProtocolModuleFormat(parsed) {
16630
15953
  const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [
16631
15954
  null,
@@ -16634,16 +15957,6 @@ function getDataProtocolModuleFormat(parsed) {
16634
15957
  ];
16635
15958
  return mimeToFormat(mime);
16636
15959
  }
16637
- /**
16638
- * Returns the file extension from a URL.
16639
- *
16640
- * Should give similar result to
16641
- * `require('node:path').extname(require('node:url').fileURLToPath(url))`
16642
- * when used with a `file:` URL.
16643
- *
16644
- * @param {URL} url
16645
- * @returns {string}
16646
- */
16647
15960
  function extname$2(url) {
16648
15961
  const pathname = url.pathname;
16649
15962
  let index = pathname.length;
@@ -16654,9 +15967,6 @@ function extname$2(url) {
16654
15967
  }
16655
15968
  return "";
16656
15969
  }
16657
- /**
16658
- * @type {ProtocolHandler}
16659
- */
16660
15970
  function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
16661
15971
  const value = extname$2(url);
16662
15972
  if (value === ".js") {
@@ -16675,11 +15985,6 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
16675
15985
  throw new ERR_UNKNOWN_FILE_EXTENSION(value, fileURLToPath(url));
16676
15986
  }
16677
15987
  function getHttpProtocolModuleFormat() {}
16678
- /**
16679
- * @param {URL} url
16680
- * @param {{parentURL: string}} context
16681
- * @returns {string | null}
16682
- */
16683
15988
  function defaultGetFormatWithoutErrors(url, context) {
16684
15989
  const protocol = url.protocol;
16685
15990
  if (!hasOwnProperty.call(protocolHandlers, protocol)) return null;
@@ -16687,16 +15992,9 @@ function defaultGetFormatWithoutErrors(url, context) {
16687
15992
  }
16688
15993
  const DEFAULT_CONDITIONS = Object.freeze(["node", "import"]);
16689
15994
  const DEFAULT_CONDITIONS_SET$1 = new Set(DEFAULT_CONDITIONS);
16690
- /**
16691
- * Returns the default conditions for ES module loading, as a Set.
16692
- */
16693
15995
  function getDefaultConditionsSet() {
16694
15996
  return DEFAULT_CONDITIONS_SET$1;
16695
15997
  }
16696
- /**
16697
- * @param {Array<string>} [conditions]
16698
- * @returns {Set<string>}
16699
- */
16700
15998
  function getConditionsSet(conditions) {
16701
15999
  return getDefaultConditionsSet();
16702
16000
  }
@@ -16708,32 +16006,14 @@ const deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o
16708
16006
  const invalidPackageNameRegEx = /^\.|%|\\/;
16709
16007
  const patternRegEx = /\*/g;
16710
16008
  const encodedSeparatorRegEx = /%2f|%5c/i;
16711
- /** @type {Set<string>} */
16712
16009
  const emittedPackageWarnings = /* @__PURE__ */ new Set();
16713
16010
  const doubleSlashRegEx = /[/\\]{2}/;
16714
- /**
16715
- *
16716
- * @param {string} target
16717
- * @param {string} request
16718
- * @param {string} match
16719
- * @param {URL} packageJsonUrl
16720
- * @param {boolean} internal
16721
- * @param {URL} base
16722
- * @param {boolean} isTarget
16723
- */
16724
16011
  function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {
16725
16012
  if (process$1.noDeprecation) return;
16726
16013
  const pjsonPath = fileURLToPath(packageJsonUrl);
16727
16014
  const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
16728
16015
  process$1.emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}.`, "DeprecationWarning", "DEP0166");
16729
16016
  }
16730
- /**
16731
- * @param {URL} url
16732
- * @param {URL} packageJsonUrl
16733
- * @param {URL} base
16734
- * @param {string} [main]
16735
- * @returns {void}
16736
- */
16737
16017
  function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
16738
16018
  if (process$1.noDeprecation) return;
16739
16019
  if (defaultGetFormatWithoutErrors(url, { parentURL: base.href }) !== "module") return;
@@ -16743,39 +16023,17 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
16743
16023
  if (!main) process$1.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
16744
16024
  else if (path.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
16745
16025
  }
16746
- /**
16747
- * @param {string} path
16748
- * @returns {Stats | undefined}
16749
- */
16750
16026
  function tryStatSync(path) {
16751
16027
  try {
16752
16028
  return statSync(path);
16753
16029
  } catch {}
16754
16030
  }
16755
- /**
16756
- * Legacy CommonJS main resolution:
16757
- * 1. let M = pkg_url + (json main field)
16758
- * 2. TRY(M, M.js, M.json, M.node)
16759
- * 3. TRY(M/index.js, M/index.json, M/index.node)
16760
- * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
16761
- * 5. NOT_FOUND
16762
- *
16763
- * @param {URL} url
16764
- * @returns {boolean}
16765
- */
16766
16031
  function fileExists(url) {
16767
16032
  const stats = statSync(url, { throwIfNoEntry: false });
16768
16033
  const isFile = stats ? stats.isFile() : void 0;
16769
16034
  return isFile === null || isFile === void 0 ? false : isFile;
16770
16035
  }
16771
- /**
16772
- * @param {URL} packageJsonUrl
16773
- * @param {PackageConfig} packageConfig
16774
- * @param {URL} base
16775
- * @returns {URL}
16776
- */
16777
16036
  function legacyMainResolve(packageJsonUrl, packageConfig, base) {
16778
- /** @type {URL | undefined} */
16779
16037
  let guess;
16780
16038
  if (packageConfig.main !== void 0) {
16781
16039
  guess = new URL(packageConfig.main, packageJsonUrl);
@@ -16816,15 +16074,8 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
16816
16074
  }
16817
16075
  throw new ERR_MODULE_NOT_FOUND(fileURLToPath(new URL(".", packageJsonUrl)), fileURLToPath(base));
16818
16076
  }
16819
- /**
16820
- * @param {URL} resolved
16821
- * @param {URL} base
16822
- * @param {boolean} [preserveSymlinks]
16823
- * @returns {URL}
16824
- */
16825
16077
  function finalizeResolution(resolved, base, preserveSymlinks) {
16826
16078
  if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, "must not include encoded \"/\" or \"\\\" characters", fileURLToPath(base));
16827
- /** @type {string} */
16828
16079
  let filePath;
16829
16080
  try {
16830
16081
  filePath = fileURLToPath(resolved);
@@ -16854,59 +16105,19 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
16854
16105
  }
16855
16106
  return resolved;
16856
16107
  }
16857
- /**
16858
- * @param {string} specifier
16859
- * @param {URL | undefined} packageJsonUrl
16860
- * @param {URL} base
16861
- * @returns {Error}
16862
- */
16863
16108
  function importNotDefined(specifier, packageJsonUrl, base) {
16864
16109
  return new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && fileURLToPath(new URL(".", packageJsonUrl)), fileURLToPath(base));
16865
16110
  }
16866
- /**
16867
- * @param {string} subpath
16868
- * @param {URL} packageJsonUrl
16869
- * @param {URL} base
16870
- * @returns {Error}
16871
- */
16872
16111
  function exportsNotFound(subpath, packageJsonUrl, base) {
16873
16112
  return new ERR_PACKAGE_PATH_NOT_EXPORTED(fileURLToPath(new URL(".", packageJsonUrl)), subpath, base && fileURLToPath(base));
16874
16113
  }
16875
- /**
16876
- * @param {string} request
16877
- * @param {string} match
16878
- * @param {URL} packageJsonUrl
16879
- * @param {boolean} internal
16880
- * @param {URL} [base]
16881
- * @returns {never}
16882
- */
16883
16114
  function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {
16884
16115
  throw new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base));
16885
16116
  }
16886
- /**
16887
- * @param {string} subpath
16888
- * @param {unknown} target
16889
- * @param {URL} packageJsonUrl
16890
- * @param {boolean} internal
16891
- * @param {URL} [base]
16892
- * @returns {Error}
16893
- */
16894
16117
  function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {
16895
16118
  target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
16896
16119
  return new ERR_INVALID_PACKAGE_TARGET(fileURLToPath(new URL(".", packageJsonUrl)), subpath, target, internal, base && fileURLToPath(base));
16897
16120
  }
16898
- /**
16899
- * @param {string} target
16900
- * @param {string} subpath
16901
- * @param {string} match
16902
- * @param {URL} packageJsonUrl
16903
- * @param {URL} base
16904
- * @param {boolean} pattern
16905
- * @param {boolean} internal
16906
- * @param {boolean} isPathMap
16907
- * @param {Set<string> | undefined} conditions
16908
- * @returns {URL}
16909
- */
16910
16121
  function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) {
16911
16122
  if (subpath !== "" && !pattern && target[target.length - 1] !== "/") throw invalidPackageTarget(match, target, packageJsonUrl, internal, base);
16912
16123
  if (!target.startsWith("./")) {
@@ -16940,39 +16151,20 @@ function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base
16940
16151
  if (pattern) return new URL(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath));
16941
16152
  return new URL(subpath, resolved);
16942
16153
  }
16943
- /**
16944
- * @param {string} key
16945
- * @returns {boolean}
16946
- */
16947
16154
  function isArrayIndex(key) {
16948
16155
  const keyNumber = Number(key);
16949
16156
  if (`${keyNumber}` !== key) return false;
16950
16157
  return keyNumber >= 0 && keyNumber < 4294967295;
16951
16158
  }
16952
- /**
16953
- * @param {URL} packageJsonUrl
16954
- * @param {unknown} target
16955
- * @param {string} subpath
16956
- * @param {string} packageSubpath
16957
- * @param {URL} base
16958
- * @param {boolean} pattern
16959
- * @param {boolean} internal
16960
- * @param {boolean} isPathMap
16961
- * @param {Set<string> | undefined} conditions
16962
- * @returns {URL | null}
16963
- */
16964
16159
  function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) {
16965
16160
  if (typeof target === "string") return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions);
16966
16161
  if (Array.isArray(target)) {
16967
- /** @type {Array<unknown>} */
16968
16162
  const targetList = target;
16969
16163
  if (targetList.length === 0) return null;
16970
- /** @type {ErrnoException | null | undefined} */
16971
16164
  let lastException;
16972
16165
  let i = -1;
16973
16166
  while (++i < targetList.length) {
16974
16167
  const targetItem = targetList[i];
16975
- /** @type {URL | null} */
16976
16168
  let resolveResult;
16977
16169
  try {
16978
16170
  resolveResult = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions);
@@ -17014,12 +16206,6 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
17014
16206
  if (target === null) return null;
17015
16207
  throw invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base);
17016
16208
  }
17017
- /**
17018
- * @param {unknown} exports
17019
- * @param {URL} packageJsonUrl
17020
- * @param {URL} base
17021
- * @returns {boolean}
17022
- */
17023
16209
  function isConditionalExportsMainSugar(exports$1, packageJsonUrl, base) {
17024
16210
  if (typeof exports$1 === "string" || Array.isArray(exports$1)) return true;
17025
16211
  if (typeof exports$1 !== "object" || exports$1 === null) return false;
@@ -17035,11 +16221,6 @@ function isConditionalExportsMainSugar(exports$1, packageJsonUrl, base) {
17035
16221
  }
17036
16222
  return isConditionalSugar;
17037
16223
  }
17038
- /**
17039
- * @param {string} match
17040
- * @param {URL} pjsonUrl
17041
- * @param {URL} base
17042
- */
17043
16224
  function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
17044
16225
  if (process$1.noDeprecation) return;
17045
16226
  const pjsonPath = fileURLToPath(pjsonUrl);
@@ -17047,14 +16228,6 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
17047
16228
  emittedPackageWarnings.add(pjsonPath + "|" + match);
17048
16229
  process$1.emitWarning(`Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155");
17049
16230
  }
17050
- /**
17051
- * @param {URL} packageJsonUrl
17052
- * @param {string} packageSubpath
17053
- * @param {Record<string, unknown>} packageConfig
17054
- * @param {URL} base
17055
- * @param {Set<string> | undefined} conditions
17056
- * @returns {URL}
17057
- */
17058
16231
  function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {
17059
16232
  let exports$1 = packageConfig.exports;
17060
16233
  if (isConditionalExportsMainSugar(exports$1, packageJsonUrl, base)) exports$1 = { ".": exports$1 };
@@ -17088,10 +16261,6 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
17088
16261
  }
17089
16262
  throw exportsNotFound(packageSubpath, packageJsonUrl, base);
17090
16263
  }
17091
- /**
17092
- * @param {string} a
17093
- * @param {string} b
17094
- */
17095
16264
  function patternKeyCompare(a, b) {
17096
16265
  const aPatternIndex = a.indexOf("*");
17097
16266
  const bPatternIndex = b.indexOf("*");
@@ -17105,15 +16274,8 @@ function patternKeyCompare(a, b) {
17105
16274
  if (b.length > a.length) return 1;
17106
16275
  return 0;
17107
16276
  }
17108
- /**
17109
- * @param {string} name
17110
- * @param {URL} base
17111
- * @param {Set<string>} [conditions]
17112
- * @returns {URL}
17113
- */
17114
16277
  function packageImportsResolve(name, base, conditions) {
17115
16278
  if (name === "#" || name.startsWith("#/") || name.endsWith("/")) throw new ERR_INVALID_MODULE_SPECIFIER(name, "is not a valid internal imports specifier name", fileURLToPath(base));
17116
- /** @type {URL | undefined} */
17117
16279
  let packageJsonUrl;
17118
16280
  const packageConfig = getPackageScopeConfig(base);
17119
16281
  if (packageConfig.exists) {
@@ -17147,10 +16309,6 @@ function packageImportsResolve(name, base, conditions) {
17147
16309
  }
17148
16310
  throw importNotDefined(name, packageJsonUrl, base);
17149
16311
  }
17150
- /**
17151
- * @param {string} specifier
17152
- * @param {URL} base
17153
- */
17154
16312
  function parsePackageName(specifier, base) {
17155
16313
  let separatorIndex = specifier.indexOf("/");
17156
16314
  let validPackageName = true;
@@ -17169,24 +16327,16 @@ function parsePackageName(specifier, base) {
17169
16327
  isScoped
17170
16328
  };
17171
16329
  }
17172
- /**
17173
- * @param {string} specifier
17174
- * @param {URL} base
17175
- * @param {Set<string> | undefined} conditions
17176
- * @returns {URL}
17177
- */
17178
16330
  function packageResolve(specifier, base, conditions) {
17179
16331
  if (builtinModules.includes(specifier)) return new URL("node:" + specifier);
17180
16332
  const { packageName, packageSubpath, isScoped } = parsePackageName(specifier, base);
17181
16333
  const packageConfig = getPackageScopeConfig(base);
17182
- /* c8 ignore next 16 */
17183
16334
  if (packageConfig.exists) {
17184
16335
  const packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);
17185
16336
  if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions);
17186
16337
  }
17187
16338
  let packageJsonUrl = new URL("./node_modules/" + packageName + "/package.json", base);
17188
16339
  let packageJsonPath = fileURLToPath(packageJsonUrl);
17189
- /** @type {string} */
17190
16340
  let lastPath;
17191
16341
  do {
17192
16342
  const stat = tryStatSync(packageJsonPath.slice(0, -13));
@@ -17206,10 +16356,6 @@ function packageResolve(specifier, base, conditions) {
17206
16356
  } while (packageJsonPath.length !== lastPath.length);
17207
16357
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false);
17208
16358
  }
17209
- /**
17210
- * @param {string} specifier
17211
- * @returns {boolean}
17212
- */
17213
16359
  function isRelativeSpecifier(specifier) {
17214
16360
  if (specifier[0] === ".") {
17215
16361
  if (specifier.length === 1 || specifier[1] === "/") return true;
@@ -17217,35 +16363,15 @@ function isRelativeSpecifier(specifier) {
17217
16363
  }
17218
16364
  return false;
17219
16365
  }
17220
- /**
17221
- * @param {string} specifier
17222
- * @returns {boolean}
17223
- */
17224
16366
  function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
17225
16367
  if (specifier === "") return false;
17226
16368
  if (specifier[0] === "/") return true;
17227
16369
  return isRelativeSpecifier(specifier);
17228
16370
  }
17229
- /**
17230
- * The “Resolver Algorithm Specification” as detailed in the Node docs (which is
17231
- * sync and slightly lower-level than `resolve`).
17232
- *
17233
- * @param {string} specifier
17234
- * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
17235
- * @param {URL} base
17236
- * Full URL (to a file) that `specifier` is resolved relative from.
17237
- * @param {Set<string>} [conditions]
17238
- * Conditions.
17239
- * @param {boolean} [preserveSymlinks]
17240
- * Keep symlinks instead of resolving them.
17241
- * @returns {URL}
17242
- * A URL object to the found thing.
17243
- */
17244
16371
  function moduleResolve(specifier, base, conditions, preserveSymlinks) {
17245
16372
  if (conditions === void 0) conditions = getConditionsSet();
17246
16373
  const protocol = base.protocol;
17247
16374
  const isRemote = protocol === "data:" || protocol === "http:" || protocol === "https:";
17248
- /** @type {URL | undefined} */
17249
16375
  let resolved;
17250
16376
  if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) try {
17251
16377
  resolved = new URL(specifier, base);
@@ -17463,7 +16589,11 @@ function _extractExtraNames(extraNamesStr) {
17463
16589
  angleDepth++;
17464
16590
  continue;
17465
16591
  }
17466
- if (inTypeAnnotation && char === ">" && angleDepth > 0) {
16592
+ if (!inTypeAnnotation && char === "<" && depth === 0 && i > 0 && _isIdentifierBeforeAngleBracket(extraNamesStr, i)) {
16593
+ angleDepth++;
16594
+ continue;
16595
+ }
16596
+ if (char === ">" && angleDepth > 0 && extraNamesStr[i - 1] !== "=") {
17467
16597
  angleDepth--;
17468
16598
  continue;
17469
16599
  }
@@ -17584,6 +16714,12 @@ function _getLocations(code, label) {
17584
16714
  });
17585
16715
  return locations;
17586
16716
  }
16717
+ function _isIdentifierBeforeAngleBracket(str, i) {
16718
+ let j = i - 1;
16719
+ while (j >= 0 && /[A-Za-z0-9_$]/.test(str[j])) j--;
16720
+ const wordStart = j + 1;
16721
+ return wordStart < i && /[A-Za-z_$]/.test(str[wordStart]);
16722
+ }
17587
16723
  const ESM_RE = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m;
17588
16724
  const CJS_RE = /(?:[\s;]|^)(?:module\.exports\b|exports\.\w|require\s*\(|global\.\w)/m;
17589
16725
  const COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
@@ -17605,8 +16741,6 @@ function detectSyntax(code, opts = {}) {
17605
16741
  isMixed: hasESM && hasCJS
17606
16742
  };
17607
16743
  }
17608
- //#endregion
17609
- //#region node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/utils.mjs
17610
16744
  const pathSeparators = /* @__PURE__ */ new Set([
17611
16745
  "/",
17612
16746
  "\\",
@@ -17642,8 +16776,6 @@ function hasTrailingSlash(path = "/") {
17642
16776
  const lastChar = path[path.length - 1];
17643
16777
  return lastChar === "/" || lastChar === "\\";
17644
16778
  }
17645
- //#endregion
17646
- //#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.Br_uXjZG.mjs
17647
16779
  function getType(val) {
17648
16780
  const type = typeof val;
17649
16781
  if (type === "undefined" || val === null) return;
@@ -17687,8 +16819,6 @@ function normalizeTypes(val) {
17687
16819
  if (arr.length === 0 || arr.includes("any")) return;
17688
16820
  return arr.length > 1 ? arr : arr[0];
17689
16821
  }
17690
- //#endregion
17691
- //#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.BTwOq8Jl.mjs
17692
16822
  async function resolveSchema(obj, defaults, options = {}) {
17693
16823
  return await _resolveSchema(obj, "", {
17694
16824
  root: obj,
@@ -17754,8 +16884,6 @@ function normalizeSchema(schema, options) {
17754
16884
  schema.default = Object.fromEntries(propsWithDefaults);
17755
16885
  }
17756
16886
  }
17757
- //#endregion
17758
- //#region node_modules/.pnpm/knitwork@1.3.0/node_modules/knitwork/dist/index.mjs
17759
16887
  function genString(input, options = {}) {
17760
16888
  const str = JSON.stringify(input);
17761
16889
  if (!options.singleQuotes) return str;
@@ -17876,8 +17004,6 @@ function genRawValue(value, indent = "", options = {}) {
17876
17004
  if (options.preserveTypes && typeof value !== "function") return JSON.stringify(value);
17877
17005
  return value.toString();
17878
17006
  }
17879
- //#endregion
17880
- //#region node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/index.mjs
17881
17007
  const GenerateTypesDefaults = {
17882
17008
  interfaceName: "Untyped",
17883
17009
  addExport: true,
@@ -18028,8 +17154,6 @@ function isRequired(schema, key, opts) {
18028
17154
  if (Array.isArray(schema.required) && schema.required.includes(key)) return true;
18029
17155
  return !opts.partial;
18030
17156
  }
18031
- //#endregion
18032
- //#region node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
18033
17157
  var comma = ",".charCodeAt(0);
18034
17158
  var semicolon = ";".charCodeAt(0);
18035
17159
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -18193,8 +17317,6 @@ function encode(decoded) {
18193
17317
  }
18194
17318
  return writer.flush();
18195
17319
  }
18196
- //#endregion
18197
- //#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs
18198
17320
  var BitSet = class BitSet {
18199
17321
  constructor(arg) {
18200
17322
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
@@ -19128,8 +18250,6 @@ var MagicString = class MagicString {
19128
18250
  return this._replaceRegexp(searchValue, replacement);
19129
18251
  }
19130
18252
  };
19131
- //#endregion
19132
- //#region node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.mjs
19133
18253
  var import_js_tokens = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exports, module) => {
19134
18254
  var HashbangComment, Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
19135
18255
  Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
@@ -19549,31 +18669,34 @@ function stripLiteral(code, options) {
19549
18669
  for (const token of (0, import_js_tokens.default)(code, { jsx: false })) result += stripLiteralFromToken(token, _options.fillChar, _options.filter);
19550
18670
  return result;
19551
18671
  }
19552
- //#endregion
19553
- //#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/shared/unimport.CWY7iHFZ.mjs
19554
- const excludeRE = [
18672
+ const RE_EXCLUDE = [
19555
18673
  /\b(import|export)\b([\w$*{},\s]+?)\bfrom\s*["']/g,
19556
18674
  /\bfunction\s*([\w$]+)\s*\(/g,
19557
18675
  /\bclass\s*([\w$]+)\s*\{/g,
19558
- /\b(?:const|let|var)\s+?(\[.*?\]|\{.*?\}|.+?)\s*?[=;\n]/gs
18676
+ /\b(?:const|let|var)\s+?(\[.*?\]|\{.*?\}|.+?)\s*?(?:[=;\n]|\bof\b|\bin\b)/gs
19559
18677
  ];
19560
- const importAsRE = /^.*\sas\s+/;
19561
- const separatorRE = /[,[\]{}\n]|\b(?:import|export)\b/g;
19562
- const matchRE = /(^|\.\.\.|(?:\bcase|\?)\s+|[^\w$/)]|\bextends\s+)([\w$]+)\s*(?=[.()[\]}:;?+\-*&|`<>,\n]|\b(?:instanceof|in)\b|$|(?<=extends\s+\w+)\s+\{)/g;
19563
- const regexRE = /\/\S*?(?<!\\)(?<!\[[^\]]*)\/[gimsuy]*/g;
18678
+ const RE_IMPORT_AS = /^.*\sas\s+/;
18679
+ const RE_SEPARATOR = /[,[\]{}\n]|\b(?:import|export)\b/g;
18680
+ const RE_MATCH = /(^|\.\.\.|(?:\bcase|\?)\s+|[^\w$/)]|\bextends\s+)([\w$]+)\s*(?=[.()[\]}:;?+\-*&|`<>,\n]|\b(?:instanceof|in)\b|$|(?<=extends\s+\w+)\s+\{)/g;
18681
+ const RE_REGEX = /\/\S*?(?<!\\)(?<!\[[^\]]*)\/[gimsuy]*/g;
19564
18682
  function stripCommentsAndStrings(code, options) {
19565
- return stripLiteral(code, options).replace(regexRE, "new RegExp(\"\")");
18683
+ return stripLiteral(code, options).replace(RE_REGEX, "new RegExp(\"\")");
19566
18684
  }
19567
18685
  function defineUnimportPreset(preset) {
19568
18686
  return preset;
19569
18687
  }
19570
- const identifierRE = /^[A-Z_$][\w$]*$/i;
19571
- const safePropertyName = /^[a-z$_][\w$]*$/i;
18688
+ const RE_IDENTIFIER = /^[A-Z_$][\w$]*$/i;
18689
+ const RE_SAFE_PROPERTY_NAME = /^[a-z$_][\w$]*$/i;
18690
+ const RE_FILE_EXT$1 = /\.[a-z]+$/i;
18691
+ const RE_RELATIVE_PATH = /^[./]/;
18692
+ const RE_DTS_EXT$1 = /\.d\.([cm]?)ts$/i;
18693
+ const RE_SHEBANG = /^#!.+/;
18694
+ const RE_IMPORT_BRACE = /^\s*import\s*\{/;
19572
18695
  function stringifyWith(withValues) {
19573
18696
  let withDefs = "";
19574
18697
  for (let entries = Object.entries(withValues), l = entries.length, i = 0; i < l; i++) {
19575
18698
  const [prop, value] = entries[i];
19576
- withDefs += safePropertyName.test(prop) ? prop : JSON.stringify(prop);
18699
+ withDefs += RE_SAFE_PROPERTY_NAME.test(prop) ? prop : JSON.stringify(prop);
19577
18700
  withDefs += `: ${JSON.stringify(String(value))}`;
19578
18701
  if (i + 1 !== l) withDefs += ", ";
19579
18702
  }
@@ -19627,37 +18750,61 @@ function stringifyImports(imports, isCJS = false) {
19627
18750
  return entries;
19628
18751
  }).join("\n");
19629
18752
  }
18753
+ function encodeImportName(name) {
18754
+ return `\uFFFF${name}\uFFFE`;
18755
+ }
19630
18756
  function dedupeImports(imports, warn) {
19631
- const map = /* @__PURE__ */ new Map();
19632
- const indexToRemove = /* @__PURE__ */ new Set();
19633
- imports.filter((i) => !i.disabled).forEach((i, idx) => {
19634
- if (i.declarationType === "enum" || i.declarationType === "const enum" || i.declarationType === "class") return;
19635
- const name = i.as ?? i.name;
19636
- if (!map.has(name)) {
19637
- map.set(name, idx);
19638
- return;
18757
+ const deduped = /* @__PURE__ */ new Map();
18758
+ for (let idx = imports.length - 1; idx >= 0; idx--) {
18759
+ const currImp = imports[idx];
18760
+ if (currImp.disabled || currImp.declarationType === "enum" || currImp.declarationType === "const enum" || currImp.declarationType === "class") {
18761
+ deduped.set(idx, currImp);
18762
+ continue;
19639
18763
  }
19640
- const other = imports[map.get(name)];
19641
- if (other.from === i.from) {
19642
- indexToRemove.add(idx);
19643
- return;
18764
+ const name = String(currImp.as ?? currImp.name);
18765
+ const prevImp = deduped.get(name);
18766
+ if (!prevImp) {
18767
+ deduped.set(name, currImp);
18768
+ continue;
19644
18769
  }
19645
- const diff = (other.priority || 1) - (i.priority || 1);
19646
- if (diff === 0) warn(`Duplicated imports "${name}", the one from "${other.from}" has been ignored and "${i.from}" is used`);
19647
- if (diff <= 0) {
19648
- indexToRemove.add(map.get(name));
19649
- map.set(name, idx);
19650
- } else indexToRemove.add(idx);
19651
- });
19652
- return imports.filter((_, idx) => !indexToRemove.has(idx));
18770
+ if (currImp.type || prevImp.type ? (currImp.typeFrom || currImp.from) === (prevImp.typeFrom || prevImp.from) : currImp.from === prevImp.from) {
18771
+ if (Boolean(currImp.type) === Boolean(prevImp.type)) {
18772
+ if ((currImp.priority || 1) > (prevImp.priority || 1)) {
18773
+ deduped.delete(name);
18774
+ deduped.set(name, currImp);
18775
+ }
18776
+ } else {
18777
+ const altName2 = encodeImportName(name);
18778
+ const prevImpComplement2 = deduped.get(altName2);
18779
+ if (!prevImpComplement2) deduped.set(altName2, currImp);
18780
+ else if ((currImp.priority || 1) > (prevImpComplement2.priority || 1)) {
18781
+ deduped.delete(altName2);
18782
+ deduped.set(altName2, currImp);
18783
+ }
18784
+ }
18785
+ continue;
18786
+ }
18787
+ const altName = encodeImportName(name);
18788
+ const prevImpComplement = deduped.get(altName);
18789
+ const priorityDiff = (currImp.priority || 1) - Math.max(prevImp.priority || 1, prevImpComplement?.priority || 1);
18790
+ if (priorityDiff > 0) {
18791
+ deduped.delete(name);
18792
+ deduped.delete(altName);
18793
+ deduped.set(name, currImp);
18794
+ } else if (priorityDiff === 0) warn(`Duplicated imports "${name}", the one from "${currImp.from}" has been ignored and "${prevImp.from}" is used`);
18795
+ }
18796
+ let i = deduped.size;
18797
+ const dedupedImports = new Array(i);
18798
+ for (const imp of deduped.values()) dedupedImports[--i] = imp;
18799
+ return dedupedImports;
19653
18800
  }
19654
18801
  function toExports(imports, fileDir, includeType = false, options = {}) {
19655
18802
  const map = toImportModuleMap(imports, includeType, options);
19656
18803
  return Object.entries(map).flatMap(([name, imports2]) => {
19657
- if (isFilePath(name)) name = name.replace(/\.[a-z]+$/i, "");
18804
+ if (isFilePath(name)) name = name.replace(RE_FILE_EXT$1, "");
19658
18805
  if (fileDir && isAbsolute$2(name)) {
19659
18806
  name = relative$2(fileDir, name);
19660
- if (!name.match(/^[./]/)) name = `./${name}`;
18807
+ if (!RE_RELATIVE_PATH.test(name)) name = `./${name}`;
19661
18808
  }
19662
18809
  const entries = [];
19663
18810
  const filtered = Array.from(imports2).filter((i) => {
@@ -19672,7 +18819,7 @@ function toExports(imports, fileDir, includeType = false, options = {}) {
19672
18819
  }).join("\n");
19673
18820
  }
19674
18821
  function stripFileExtension(path) {
19675
- return path.replace(/\.[a-z]+$/i, "");
18822
+ return path.replace(RE_FILE_EXT$1, "");
19676
18823
  }
19677
18824
  function toTypeDeclarationItems(imports, options) {
19678
18825
  return imports.map((i) => {
@@ -19680,7 +18827,7 @@ function toTypeDeclarationItems(imports, options) {
19680
18827
  let typeDef = "";
19681
18828
  if (i.with) typeDef += `import('${from}', { with: ${stringifyWith(i.with)} })`;
19682
18829
  else typeDef += `import('${from}')`;
19683
- if (i.name !== "*" && i.name !== "=") typeDef += identifierRE.test(i.name) ? `.${i.name}` : `['${i.name}']`;
18830
+ if (i.name !== "*" && i.name !== "=") typeDef += RE_IDENTIFIER.test(i.name) ? `.${i.name}` : `['${i.name}']`;
19684
18831
  return `const ${i.as}: typeof ${typeDef}`;
19685
18832
  }).sort();
19686
18833
  }
@@ -19720,7 +18867,7 @@ function toTypeReExports(imports, options) {
19720
18867
  return `// for type re-export
19721
18868
  declare global {
19722
18869
  ${Array.from(importsMap).flatMap(([from, module]) => {
19723
- from = from.replace(/\.d\.([cm]?)ts$/i, ".$1js");
18870
+ from = from.replace(RE_DTS_EXT$1, ".$1js");
19724
18871
  const { starTypeImport, typeImports } = module;
19725
18872
  const strings = [];
19726
18873
  if (typeImports.size) {
@@ -19763,7 +18910,7 @@ function addImportToCode(code, imports, isCJS = false, mergeExisting = false, in
19763
18910
  return _staticImports;
19764
18911
  }
19765
18912
  function hasShebang() {
19766
- return /^#!.+/.test(s.original);
18913
+ return RE_SHEBANG.test(s.original);
19767
18914
  }
19768
18915
  if (mergeExisting && !isCJS) {
19769
18916
  const existingImports = findStaticImportsLazy();
@@ -19776,7 +18923,7 @@ function addImportToCode(code, imports, isCJS = false, mergeExisting = false, in
19776
18923
  });
19777
18924
  for (const [target, items] of map.entries()) {
19778
18925
  const strings = items.map((i) => `${stringifyImportAlias(i)}, `);
19779
- const importLength = target.code.match(/^\s*import\s*\{/)?.[0]?.length;
18926
+ const importLength = target.code.match(RE_IMPORT_BRACE)?.[0]?.length;
19780
18927
  if (importLength) s.appendLeft(target.start + importLength, ` ${strings.join("").trim()}`);
19781
18928
  }
19782
18929
  } else newImports = imports;
@@ -19808,7 +18955,7 @@ function normalizeImports(imports) {
19808
18955
  function isFilePath(path) {
19809
18956
  return path.startsWith(".") || isAbsolute$2(path) || path.includes("://");
19810
18957
  }
19811
- const contextRE$1 = /\b_ctx\.([$\w]+)\b/g;
18958
+ const RE_CONTEXT$1 = /\b_ctx\.([$\w]+)\b/g;
19812
18959
  const UNREF_KEY = "__unimport_unref_";
19813
18960
  const VUE_TEMPLATE_NAME = "unimport:vue-template";
19814
18961
  function vueTemplateAddon() {
@@ -19816,7 +18963,7 @@ function vueTemplateAddon() {
19816
18963
  name: VUE_TEMPLATE_NAME,
19817
18964
  async transform(s, id) {
19818
18965
  if (!s.original.includes("_ctx.") || s.original.includes(UNREF_KEY)) return s;
19819
- const matches = Array.from(s.original.matchAll(contextRE$1));
18966
+ const matches = Array.from(s.original.matchAll(RE_CONTEXT$1));
19820
18967
  const imports = await this.getImports();
19821
18968
  let targets = [];
19822
18969
  for (const match of matches) {
@@ -19827,7 +18974,7 @@ function vueTemplateAddon() {
19827
18974
  const end = start + match[0].length;
19828
18975
  const tempName = `__unimport_${name}`;
19829
18976
  s.overwrite(start, end, `(${JSON.stringify(name)} in _ctx ? _ctx.${name} : ${UNREF_KEY}(${tempName}))`);
19830
- if (!targets.find((i) => i.as === tempName)) targets.push({
18977
+ if (!targets.some((i) => i.as === tempName)) targets.push({
19831
18978
  ...item,
19832
18979
  as: tempName
19833
18980
  });
@@ -19868,9 +19015,10 @@ ${(await this.getImports()).map((i) => {
19868
19015
  };
19869
19016
  return self;
19870
19017
  }
19871
- const contextRE = /resolveDirective as _resolveDirective/;
19872
- const contextText = `${contextRE.source}, `;
19873
- const directiveRE = /(?:var|const) (\w+) = _resolveDirective\("([\w.-]+)"\);?\s*/g;
19018
+ const RE_BACKSLASH = /\\/g;
19019
+ const RE_CONTEXT = /resolveDirective as _resolveDirective/;
19020
+ const contextText = `${RE_CONTEXT.source}, `;
19021
+ const RE_DIRECTIVE = /(?:var|const) (\w+) = _resolveDirective\("([\w.-]+)"\);?\s*/g;
19874
19022
  const VUE_DIRECTIVES_NAME = "unimport:vue-directives";
19875
19023
  function vueDirectivesAddon(options = {}) {
19876
19024
  function isDirective(importEntry) {
@@ -19886,8 +19034,8 @@ function vueDirectivesAddon(options = {}) {
19886
19034
  const self = {
19887
19035
  name: VUE_DIRECTIVES_NAME,
19888
19036
  async transform(s, id) {
19889
- if (!s.original.match(contextRE)) return s;
19890
- const matches = Array.from(s.original.matchAll(directiveRE)).sort((a, b) => b.index - a.index);
19037
+ if (!RE_CONTEXT.test(s.original)) return s;
19038
+ const matches = Array.from(s.original.matchAll(RE_DIRECTIVE)).sort((a, b) => b.index - a.index);
19891
19039
  if (!matches.length) return s;
19892
19040
  let targets = [];
19893
19041
  for await (const [begin, end, importEntry] of findDirectives(isDirective, matches, this.getImports())) {
@@ -19895,7 +19043,7 @@ function vueDirectivesAddon(options = {}) {
19895
19043
  targets.push(importEntry);
19896
19044
  }
19897
19045
  if (!targets.length) return s;
19898
- if (!s.toString().match(directiveRE)) s.replace(contextText, "");
19046
+ if (!RE_DIRECTIVE.test(s.toString())) s.replace(contextText, "");
19899
19047
  for (const addon of this.addons) {
19900
19048
  if (addon === self) continue;
19901
19049
  targets = await addon.injectImportsResolved?.call(this, targets, s, id) ?? targets;
@@ -19939,7 +19087,7 @@ function resolvePath(cwd, path) {
19939
19087
  return path[0] === "." ? resolve$3(cwd, path) : path;
19940
19088
  }
19941
19089
  function normalizePath$1(cwd, path) {
19942
- return resolvePath(cwd, path).replace(/\\/g, "/");
19090
+ return resolvePath(cwd, path).replace(RE_BACKSLASH, "/");
19943
19091
  }
19944
19092
  async function* findDirectives(isDirective, regexArray, importsPromise) {
19945
19093
  const imports = (await importsPromise).filter(isDirective);
@@ -19991,8 +19139,6 @@ function* findDirective(imports, symbol, [begin, end, importName]) {
19991
19139
  }
19992
19140
  }
19993
19141
  }
19994
- //#endregion
19995
- //#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/index.mjs
19996
19142
  const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
19997
19143
  var QuansyncError = class extends Error {
19998
19144
  constructor(message = "Unexpected promise in sync context") {
@@ -20075,11 +19221,7 @@ quansync$1({
20075
19221
  async: () => Promise.resolve(true),
20076
19222
  sync: () => false
20077
19223
  });
20078
- //#endregion
20079
- //#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/macro.mjs
20080
19224
  const quansync = quansync$1;
20081
- //#endregion
20082
- //#region node_modules/.pnpm/local-pkg@1.1.2/node_modules/local-pkg/dist/index.mjs
20083
19225
  const toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
20084
19226
  async function findUp$1(name, { cwd = process$1.cwd(), type = "file", stopAt } = {}) {
20085
19227
  let directory = path.resolve(toPath(cwd) ?? "");
@@ -20190,9 +19332,7 @@ quansync(function* (name, cwd) {
20190
19332
  const pkg = (yield loadPackageJSON(cwd)) || {};
20191
19333
  return name in (pkg.dependencies || {}) || name in (pkg.devDependencies || {});
20192
19334
  }).sync;
20193
- //#endregion
20194
- //#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/shared/unimport.Cyews8CQ.mjs
20195
- const version$1 = "6.0.1";
19335
+ const version$1 = "6.1.0";
20196
19336
  function configureAddons(opts) {
20197
19337
  const addons = [];
20198
19338
  if (Array.isArray(opts.addons)) addons.push(...opts.addons);
@@ -20225,7 +19365,7 @@ async function detectImportsRegex(code, ctx, options) {
20225
19365
  const occurrenceMap = /* @__PURE__ */ new Map();
20226
19366
  const map = await ctx.getImportMap();
20227
19367
  if (options?.autoImport !== false) {
20228
- Array.from(strippedCode.matchAll(matchRE)).forEach((i) => {
19368
+ Array.from(strippedCode.matchAll(RE_MATCH)).forEach((i) => {
20229
19369
  if (i[1] === ".") return null;
20230
19370
  const end = strippedCode[i.index + i[0].length];
20231
19371
  const before = strippedCode[i.index - 1];
@@ -20234,10 +19374,10 @@ async function detectImportsRegex(code, ctx, options) {
20234
19374
  const occurrence = i.index + i[1].length;
20235
19375
  if (occurrenceMap.get(name) || Number.POSITIVE_INFINITY > occurrence) occurrenceMap.set(name, occurrence);
20236
19376
  });
20237
- for (const regex of excludeRE) for (const match of strippedCode.matchAll(regex)) {
20238
- const segments = [...match[1]?.split(separatorRE) || [], ...match[2]?.split(separatorRE) || []];
19377
+ for (const regex of RE_EXCLUDE) for (const match of strippedCode.matchAll(regex)) {
19378
+ const segments = [...match[1]?.split(RE_SEPARATOR) || [], ...match[2]?.split(RE_SEPARATOR) || []];
20239
19379
  for (const segment of segments) {
20240
- const identifier = segment.replace(importAsRE, "").trim();
19380
+ const identifier = segment.replace(RE_IMPORT_AS, "").trim();
20241
19381
  occurrenceMap.delete(identifier);
20242
19382
  }
20243
19383
  }
@@ -20355,8 +19495,12 @@ const FileExtensionLookup = [
20355
19495
  "jsx"
20356
19496
  ];
20357
19497
  const FileLookupPatterns = `*.{${FileExtensionLookup.join(",")}}`;
19498
+ const RE_EXCLAMATION_PREFIX = /^!/;
19499
+ const RE_FILE_EXT = /\.\w+$/;
19500
+ const RE_NAME_SEPARATOR = /[-_.]/;
19501
+ const RE_DTS_EXT = /\.d\.[mc]?ts$/;
20358
19502
  function resolveGlobsExclude(glob2, cwd) {
20359
- return `${glob2.startsWith("!") ? "!" : ""}${resolve$3(cwd, glob2.replace(/^!/, ""))}`;
19503
+ return `${glob2.startsWith("!") ? "!" : ""}${resolve$3(cwd, glob2.replace(RE_EXCLAMATION_PREFIX, ""))}`;
20360
19504
  }
20361
19505
  function joinGlobFilePattern(glob2, filePattern) {
20362
19506
  return join$2(basename$2(glob2) === "*" ? dirname$2(glob2) : glob2, filePattern);
@@ -20369,7 +19513,7 @@ function normalizeScanDirs(dirs, options) {
20369
19513
  const isString = typeof dir === "string";
20370
19514
  const glob2 = resolveGlobsExclude(isString ? dir : dir.glob, cwd);
20371
19515
  const types = isString ? topLevelTypes : dir.types ?? topLevelTypes;
20372
- if (glob2.match(/\.\w+$/)) return {
19516
+ if (RE_FILE_EXT.test(glob2)) return {
20373
19517
  glob: glob2,
20374
19518
  types
20375
19519
  };
@@ -20412,7 +19556,7 @@ function dedupeDtsExports(exports) {
20412
19556
  return exports.filter((i) => {
20413
19557
  if (!i.type) return true;
20414
19558
  if (i.declarationType === "enum" || i.declarationType === "const enum" || i.declarationType === "class") return true;
20415
- return !exports.find((e) => e.as === i.as && e.name === i.name && !e.type);
19559
+ return !exports.some((e) => e.as === i.as && e.name === i.name && !e.type);
20416
19560
  });
20417
19561
  }
20418
19562
  async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Set()) {
@@ -20427,7 +19571,7 @@ async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Se
20427
19571
  if (exports.find((i) => i.type === "default")) {
20428
19572
  let name = parse$1(filepath).name;
20429
19573
  if (name === "index") name = parse$1(filepath.split("/").slice(0, -1).join("/")).name;
20430
- const as = /[-_.]/.test(name) ? camelCase(name) : name;
19574
+ const as = RE_NAME_SEPARATOR.test(name) ? camelCase(name) : name;
20431
19575
  imports.push({
20432
19576
  name: "default",
20433
19577
  as,
@@ -20492,7 +19636,7 @@ async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Se
20492
19636
  })) : nested);
20493
19637
  }
20494
19638
  }
20495
- if (filepath.match(/\.d\.[mc]?ts$/)) {
19639
+ if (filepath.match(RE_DTS_EXT)) {
20496
19640
  if (includeTypes) {
20497
19641
  await toImport(exports, { type: true });
20498
19642
  await toImport(findTypeExports(code), { type: true });
@@ -21291,27 +20435,13 @@ const vueuseCore = () => {
21291
20435
  }
21292
20436
  return _cache;
21293
20437
  };
21294
- const vueuseHead = defineUnimportPreset({
21295
- from: "@vueuse/head",
21296
- imports: ["useHead"]
21297
- });
21298
- const vuex = defineUnimportPreset({
21299
- from: "vuex",
21300
- imports: [
21301
- "createStore",
21302
- "createLogger",
21303
- "mapState",
21304
- "mapGetters",
21305
- "mapActions",
21306
- "mapMutations",
21307
- "createNamespacedHelpers",
21308
- "useStore"
21309
- ]
21310
- });
21311
20438
  const builtinPresets = {
21312
20439
  "@vue/composition-api": vueCompositionApi,
21313
20440
  "@vueuse/core": vueuseCore,
21314
- "@vueuse/head": vueuseHead,
20441
+ "@vueuse/head": defineUnimportPreset({
20442
+ from: "@vueuse/head",
20443
+ imports: ["useHead"]
20444
+ }),
21315
20445
  "pinia": pinia,
21316
20446
  "preact": preact,
21317
20447
  "quasar": quasar,
@@ -21332,7 +20462,19 @@ const builtinPresets = {
21332
20462
  "vue-router-composables": vueRouterComposables,
21333
20463
  "vue": vue,
21334
20464
  "vue/macros": vueMacros,
21335
- "vuex": vuex,
20465
+ "vuex": defineUnimportPreset({
20466
+ from: "vuex",
20467
+ imports: [
20468
+ "createStore",
20469
+ "createLogger",
20470
+ "mapState",
20471
+ "mapGetters",
20472
+ "mapActions",
20473
+ "mapMutations",
20474
+ "createNamespacedHelpers",
20475
+ "useStore"
20476
+ ]
20477
+ }),
21336
20478
  "vitest": vitest,
21337
20479
  "uni-app": uniApp,
21338
20480
  "solid-js": solid,
@@ -21455,14 +20597,18 @@ function createInternalContext(opts) {
21455
20597
  opts.commentsDisable = opts.commentsDisable ?? ["@unimport-disable", "@imports-disable"];
21456
20598
  opts.commentsDebug = opts.commentsDebug ?? ["@unimport-debug", "@imports-debug"];
21457
20599
  let metadata;
21458
- if (opts.collectMeta) metadata = {
21459
- injectionsUsageMap: /* @__PURE__ */ new Map(),
21460
- get injectionUsage() {
21461
- const stack = (/* @__PURE__ */ new Error()).stack;
21462
- console.warn("[unimport] `injectionUsage` is deprecated, use `injectionsUsageMap` instead", stack);
21463
- return Object.fromEntries(this.injectionsUsageMap);
21464
- }
21465
- };
20600
+ if (opts.collectMeta) {
20601
+ metadata = { injectionsUsageMap: /* @__PURE__ */ new Map() };
20602
+ Object.defineProperty(metadata, "injectionUsage", {
20603
+ enumerable: false,
20604
+ configurable: true,
20605
+ get() {
20606
+ const stack = (/* @__PURE__ */ new Error()).stack;
20607
+ console.warn("[unimport] `injectionUsage` is deprecated, use `injectionsUsageMap` instead", stack);
20608
+ return Object.fromEntries(this.injectionsUsageMap);
20609
+ }
20610
+ });
20611
+ }
21466
20612
  let resolvePromise;
21467
20613
  const ctx = {
21468
20614
  version: version$1,
@@ -21557,14 +20703,10 @@ async function resolveImports(ctx, imports, id) {
21557
20703
  };
21558
20704
  }))).filter(Boolean);
21559
20705
  }
21560
- //#endregion
21561
- //#region node_modules/.pnpm/unimport@6.0.1/node_modules/unimport/dist/index.mjs
21562
20706
  var dist_exports = /* @__PURE__ */ __exportAll({
21563
20707
  createUnimport: () => createUnimport,
21564
20708
  version: () => version$1
21565
20709
  });
21566
- //#endregion
21567
- //#region src/build/types.ts
21568
20710
  async function writeTypes(nitro) {
21569
20711
  const types = { routes: {} };
21570
20712
  const generatedTypesDir = resolve$3(nitro.options.rootDir, nitro.options.typescript.generatedTypesDir || "node_modules/.nitro/types");
@@ -21643,7 +20785,11 @@ async function writeTypes(nitro) {
21643
20785
  const config = [
21644
20786
  "// Generated by nitro",
21645
20787
  `declare module "nitro/types" {`,
21646
- nitro.options.typescript.generateRuntimeConfigTypes ? generateTypes(await resolveSchema(Object.fromEntries(Object.entries(nitro.options.runtimeConfig).filter(([key]) => !["app", "nitro"].includes(key)))), {
20788
+ nitro.options.typescript.generateRuntimeConfigTypes ? generateTypes(await resolveSchema(Object.fromEntries(Object.entries(nitro.options.runtimeConfig).filter(([key]) => ![
20789
+ "app",
20790
+ "nitro",
20791
+ "wrangler"
20792
+ ].includes(key)))), {
21647
20793
  interfaceName: "NitroRuntimeConfig",
21648
20794
  addExport: false,
21649
20795
  addDefaults: false,
@@ -21731,8 +20877,6 @@ function relativeWithDot(from, to) {
21731
20877
  const rel = relative$2(from, to);
21732
20878
  return RELATIVE_RE.test(rel) ? rel : "./" + rel;
21733
20879
  }
21734
- //#endregion
21735
- //#region src/presets/_types.gen.ts
21736
20880
  const presetsWithConfig = [
21737
20881
  "awsAmplify",
21738
20882
  "awsLambda",
@@ -21743,8 +20887,6 @@ const presetsWithConfig = [
21743
20887
  "vercel",
21744
20888
  "zephyr"
21745
20889
  ];
21746
- //#endregion
21747
- //#region src/build/info.ts
21748
20890
  const NITRO_WELLKNOWN_DIR = "node_modules/.nitro";
21749
20891
  async function getBuildInfo(root) {
21750
20892
  const outputDir = await findLastBuildDir(root);
@@ -21794,8 +20936,6 @@ async function writeDevBuildInfo(nitro, addr) {
21794
20936
  };
21795
20937
  await writeFile$1(buildInfoPath, JSON.stringify(buildInfo, null, 2));
21796
20938
  }
21797
- //#endregion
21798
- //#region src/utils/parallel.ts
21799
20939
  async function runParallel(inputs, cb, opts) {
21800
20940
  const errors = [];
21801
20941
  const tasks = /* @__PURE__ */ new Set();
@@ -21820,8 +20960,6 @@ async function runParallel(inputs, cb, opts) {
21820
20960
  await refillQueue();
21821
20961
  return { errors };
21822
20962
  }
21823
- //#endregion
21824
- //#region src/utils/regex.ts
21825
20963
  function escapeRegExp$1(string) {
21826
20964
  return string.replace(/[-\\^$*+?.()|[\]{}]/g, String.raw`\$&`);
21827
20965
  }
@@ -21836,8 +20974,6 @@ function toPathRegExp(input) {
21836
20974
  if (typeof input === "string") return new RegExp(pathRegExp(input));
21837
20975
  throw new TypeError("Expected a string or RegExp", { cause: input });
21838
20976
  }
21839
- //#endregion
21840
- //#region src/build/config.ts
21841
20977
  function baseBuildConfig(nitro) {
21842
20978
  const extensions = [
21843
20979
  ".ts",
@@ -21910,8 +21046,6 @@ function resolveAliases(_aliases) {
21910
21046
  }
21911
21047
  return aliases;
21912
21048
  }
21913
- //#endregion
21914
- //#region src/build/chunks.ts
21915
21049
  const virtualRe = /^(?:\0|#|virtual:)/;
21916
21050
  const NODE_MODULES_RE$1 = /node_modules[/\\](?!(?:nitro|nitro-nightly)[/\\])[^.]/;
21917
21051
  function libChunkName(id) {
@@ -21954,8 +21088,6 @@ function joinPkgNames(moduleIds) {
21954
21088
  function routeToFsPath(route) {
21955
21089
  return route.split("/").slice(1).map((s) => s.replace(/:(\w+)/g, "[$1]").replace(/\*+/g, "[...]").replace(/[^a-zA-Z0-9_.[\]]/g, "_")).join("/") || "index";
21956
21090
  }
21957
- //#endregion
21958
- //#region src/build/virtual/database.ts
21959
21091
  function database(nitro) {
21960
21092
  return {
21961
21093
  id: "#nitro/virtual/database",
@@ -21977,8 +21109,6 @@ export const connectionConfigs = {
21977
21109
  }
21978
21110
  };
21979
21111
  }
21980
- //#endregion
21981
- //#region src/build/virtual/error-handler.ts
21982
21112
  function errorHandler(nitro) {
21983
21113
  return {
21984
21114
  id: "#nitro/virtual/error-handler",
@@ -22010,8 +21140,6 @@ export default async function(error, event) {
22010
21140
  }
22011
21141
  };
22012
21142
  }
22013
- //#endregion
22014
- //#region src/build/virtual/feature-flags.ts
22015
21143
  function featureFlags(nitro) {
22016
21144
  return {
22017
21145
  id: "#nitro/virtual/feature-flags",
@@ -22028,8 +21156,6 @@ function featureFlags(nitro) {
22028
21156
  }
22029
21157
  };
22030
21158
  }
22031
- //#endregion
22032
- //#region src/build/virtual/plugins.ts
22033
21159
  function plugins(nitro) {
22034
21160
  return {
22035
21161
  id: "#nitro/virtual/plugins",
@@ -22045,8 +21171,6 @@ function plugins(nitro) {
22045
21171
  }
22046
21172
  };
22047
21173
  }
22048
- //#endregion
22049
- //#region src/build/virtual/polyfills.ts
22050
21174
  function polyfills(_nitro, polyfills) {
22051
21175
  return {
22052
21176
  id: "#nitro/virtual/polyfills",
@@ -22056,46 +21180,16 @@ function polyfills(_nitro, polyfills) {
22056
21180
  }
22057
21181
  };
22058
21182
  }
22059
- //#endregion
22060
- //#region src/build/virtual/public-assets.ts
22061
21183
  var import_etag = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exports, module) => {
22062
- /**
22063
- * Module exports.
22064
- * @public
22065
- */
22066
21184
  module.exports = etag;
22067
- /**
22068
- * Module dependencies.
22069
- * @private
22070
- */
22071
21185
  var crypto = __require$1("crypto");
22072
21186
  var Stats$1 = __require$1("fs").Stats;
22073
- /**
22074
- * Module variables.
22075
- * @private
22076
- */
22077
21187
  var toString = Object.prototype.toString;
22078
- /**
22079
- * Generate an entity tag.
22080
- *
22081
- * @param {Buffer|string} entity
22082
- * @return {string}
22083
- * @private
22084
- */
22085
21188
  function entitytag(entity) {
22086
21189
  if (entity.length === 0) return "\"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk\"";
22087
21190
  var hash = crypto.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27);
22088
21191
  return "\"" + (typeof entity === "string" ? Buffer.byteLength(entity, "utf8") : entity.length).toString(16) + "-" + hash + "\"";
22089
21192
  }
22090
- /**
22091
- * Create a simple ETag.
22092
- *
22093
- * @param {string|Buffer|Stats} entity
22094
- * @param {object} [options]
22095
- * @param {boolean} [options.weak]
22096
- * @return {String}
22097
- * @public
22098
- */
22099
21193
  function etag(entity, options) {
22100
21194
  if (entity == null) throw new TypeError("argument entity is required");
22101
21195
  var isStats = isstats(entity);
@@ -22104,24 +21198,10 @@ var import_etag = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exp
22104
21198
  var tag = isStats ? stattag(entity) : entitytag(entity);
22105
21199
  return weak ? "W/" + tag : tag;
22106
21200
  }
22107
- /**
22108
- * Determine if object is a Stats object.
22109
- *
22110
- * @param {object} obj
22111
- * @return {boolean}
22112
- * @api private
22113
- */
22114
21201
  function isstats(obj) {
22115
21202
  if (typeof Stats$1 === "function" && obj instanceof Stats$1) return true;
22116
21203
  return obj && typeof obj === "object" && "ctime" in obj && toString.call(obj.ctime) === "[object Date]" && "mtime" in obj && toString.call(obj.mtime) === "[object Date]" && "ino" in obj && typeof obj.ino === "number" && "size" in obj && typeof obj.size === "number";
22117
21204
  }
22118
- /**
22119
- * Generate a tag for a stat.
22120
- *
22121
- * @param {object} stat
22122
- * @return {string}
22123
- * @private
22124
- */
22125
21205
  function stattag(stat) {
22126
21206
  var mtime = stat.mtime.getTime().toString(16);
22127
21207
  return "\"" + stat.size.toString(16) + "-" + mtime + "\"";
@@ -22253,8 +21333,6 @@ export function readAsset (id) {
22253
21333
  }
22254
21334
  ];
22255
21335
  }
22256
- //#endregion
22257
- //#region src/build/virtual/renderer-template.ts
22258
21336
  function rendererTemplate(nitro) {
22259
21337
  return {
22260
21338
  id: "#nitro/virtual/renderer-template",
@@ -22286,17 +21364,15 @@ function rendererTemplate(nitro) {
22286
21364
  }
22287
21365
  };
22288
21366
  }
22289
- //#endregion
22290
- //#region src/build/virtual/routing-meta.ts
22291
21367
  function routingMeta(nitro) {
22292
21368
  return {
22293
21369
  id: "#nitro/virtual/routing-meta",
22294
21370
  template: () => {
22295
- const routeHandlers = uniqueBy$1(Object.values(nitro.routing.routes.routes).flatMap((h) => h.data), "_importHash");
21371
+ const handlers = Object.values(nitro.routing.routes.routes).flatMap((h) => h.data);
22296
21372
  return `
22297
- ${routeHandlers.map((h) => `import ${h._importHash}Meta from "${h.handler}?meta";`).join("\n")}
21373
+ ${uniqueBy$1(handlers, "_importHash").map((h) => `import ${h._importHash}Meta from "${h.handler}?meta";`).join("\n")}
22298
21374
  export const handlersMeta = [
22299
- ${routeHandlers.map((h) => `{ route: ${JSON.stringify(h.route)}, method: ${JSON.stringify(h.method?.toLowerCase())}, meta: ${h._importHash}Meta }`).join(",\n")}
21375
+ ${handlers.map((h) => `{ route: ${JSON.stringify(h.route)}, method: ${JSON.stringify(h.method?.toLowerCase())}, meta: ${h._importHash}Meta }`).join(",\n")}
22300
21376
  ];
22301
21377
  `.trim();
22302
21378
  }
@@ -22305,8 +21381,6 @@ export const handlersMeta = [
22305
21381
  function uniqueBy$1(arr, key) {
22306
21382
  return [...new Map(arr.map((item) => [item[key], item])).values()];
22307
21383
  }
22308
- //#endregion
22309
- //#region src/build/virtual/routing.ts
22310
21384
  const RuntimeRouteRules = [
22311
21385
  "headers",
22312
21386
  "redirect",
@@ -22388,8 +21462,6 @@ function serializeRouteRule(h) {
22388
21462
  ].filter(Boolean).join(",")}}`;
22389
21463
  }).join(",")}]`;
22390
21464
  }
22391
- //#endregion
22392
- //#region src/build/virtual/runtime-config.ts
22393
21465
  function runtimeConfig(nitro) {
22394
21466
  return {
22395
21467
  id: "#nitro/virtual/runtime-config",
@@ -22398,8 +21470,6 @@ function runtimeConfig(nitro) {
22398
21470
  }
22399
21471
  };
22400
21472
  }
22401
- //#endregion
22402
- //#region src/build/virtual/server-assets.ts
22403
21473
  function serverAssets(nitro) {
22404
21474
  return {
22405
21475
  id: "#nitro/virtual/server-assets",
@@ -22463,8 +21533,6 @@ export const assets = {
22463
21533
  }
22464
21534
  };
22465
21535
  }
22466
- //#endregion
22467
- //#region src/build/virtual/storage.ts
22468
21536
  function storage(nitro) {
22469
21537
  return {
22470
21538
  id: "#nitro/virtual/storage",
@@ -22498,8 +21566,6 @@ export function initStorage() {
22498
21566
  }
22499
21567
  };
22500
21568
  }
22501
- //#endregion
22502
- //#region src/build/virtual/tasks.ts
22503
21569
  function tasks(nitro) {
22504
21570
  return {
22505
21571
  id: "#nitro/virtual/tasks",
@@ -22531,8 +21597,28 @@ export const tasks = {
22531
21597
  }
22532
21598
  };
22533
21599
  }
22534
- //#endregion
22535
- //#region src/build/virtual/_all.ts
21600
+ function tracing(nitro) {
21601
+ return {
21602
+ id: "#nitro/virtual/tracing",
21603
+ template: () => {
21604
+ const { srvx, h3 } = nitro.options.tracingChannel || {};
21605
+ const imports = [];
21606
+ const setup = [];
21607
+ if (srvx) imports.push(`import { tracingPlugin as srvxTracing } from "srvx/tracing";`);
21608
+ if (h3) {
21609
+ imports.push(`import { tracingPlugin as h3Tracing } from "h3/tracing";`);
21610
+ setup.push(` h3Tracing()(nitroApp.h3);`);
21611
+ }
21612
+ return [
21613
+ ...imports,
21614
+ `export const tracingSrvxPlugins = [${srvx ? "srvxTracing()" : ""}];`,
21615
+ `export default function tracing(nitroApp) {`,
21616
+ ...setup,
21617
+ `};`
21618
+ ].join("\n");
21619
+ }
21620
+ };
21621
+ }
22536
21622
  function virtualTemplates(nitro, _polyfills) {
22537
21623
  const nitroTemplates = [
22538
21624
  database,
@@ -22547,7 +21633,8 @@ function virtualTemplates(nitro, _polyfills) {
22547
21633
  runtimeConfig,
22548
21634
  serverAssets,
22549
21635
  storage,
22550
- tasks
21636
+ tasks,
21637
+ tracing
22551
21638
  ].flatMap((t) => t(nitro, _polyfills));
22552
21639
  const customTemplates = Object.entries(nitro.options.virtual).map(([id, template]) => ({
22553
21640
  id,
@@ -22555,81 +21642,32 @@ function virtualTemplates(nitro, _polyfills) {
22555
21642
  }));
22556
21643
  return [...nitroTemplates, ...customTemplates];
22557
21644
  }
22558
- //#endregion
22559
- //#region node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/esm/estree-walker.js
22560
- /** @typedef { import('estree').BaseNode} BaseNode */
22561
- /** @typedef {{
22562
- skip: () => void;
22563
- remove: () => void;
22564
- replace: (node: BaseNode) => void;
22565
- }} WalkerContext */
22566
21645
  var WalkerBase = class {
22567
21646
  constructor() {
22568
- /** @type {boolean} */
22569
21647
  this.should_skip = false;
22570
- /** @type {boolean} */
22571
21648
  this.should_remove = false;
22572
- /** @type {BaseNode | null} */
22573
21649
  this.replacement = null;
22574
- /** @type {WalkerContext} */
22575
21650
  this.context = {
22576
21651
  skip: () => this.should_skip = true,
22577
21652
  remove: () => this.should_remove = true,
22578
21653
  replace: (node) => this.replacement = node
22579
21654
  };
22580
21655
  }
22581
- /**
22582
- *
22583
- * @param {any} parent
22584
- * @param {string} prop
22585
- * @param {number} index
22586
- * @param {BaseNode} node
22587
- */
22588
21656
  replace(parent, prop, index, node) {
22589
21657
  if (parent) if (index !== null) parent[prop][index] = node;
22590
21658
  else parent[prop] = node;
22591
21659
  }
22592
- /**
22593
- *
22594
- * @param {any} parent
22595
- * @param {string} prop
22596
- * @param {number} index
22597
- */
22598
21660
  remove(parent, prop, index) {
22599
21661
  if (parent) if (index !== null) parent[prop].splice(index, 1);
22600
21662
  else delete parent[prop];
22601
21663
  }
22602
21664
  };
22603
- /** @typedef { import('estree').BaseNode} BaseNode */
22604
- /** @typedef { import('./walker.js').WalkerContext} WalkerContext */
22605
- /** @typedef {(
22606
- * this: WalkerContext,
22607
- * node: BaseNode,
22608
- * parent: BaseNode,
22609
- * key: string,
22610
- * index: number
22611
- * ) => void} SyncHandler */
22612
21665
  var SyncWalker = class extends WalkerBase {
22613
- /**
22614
- *
22615
- * @param {SyncHandler} enter
22616
- * @param {SyncHandler} leave
22617
- */
22618
21666
  constructor(enter, leave) {
22619
21667
  super();
22620
- /** @type {SyncHandler} */
22621
21668
  this.enter = enter;
22622
- /** @type {SyncHandler} */
22623
21669
  this.leave = leave;
22624
21670
  }
22625
- /**
22626
- *
22627
- * @param {BaseNode} node
22628
- * @param {BaseNode} parent
22629
- * @param {string} [prop]
22630
- * @param {number} [index]
22631
- * @returns {BaseNode}
22632
- */
22633
21671
  visit(node, parent, prop, index) {
22634
21672
  if (node) {
22635
21673
  if (this.enter) {
@@ -22682,23 +21720,9 @@ var SyncWalker = class extends WalkerBase {
22682
21720
  return node;
22683
21721
  }
22684
21722
  };
22685
- /** @typedef { import('estree').BaseNode} BaseNode */
22686
- /** @typedef { import('./sync.js').SyncHandler} SyncHandler */
22687
- /** @typedef { import('./async.js').AsyncHandler} AsyncHandler */
22688
- /**
22689
- *
22690
- * @param {BaseNode} ast
22691
- * @param {{
22692
- * enter?: SyncHandler
22693
- * leave?: SyncHandler
22694
- * }} walker
22695
- * @returns {BaseNode}
22696
- */
22697
21723
  function walk(ast, { enter, leave }) {
22698
21724
  return new SyncWalker(enter, leave).visit(ast, null);
22699
21725
  }
22700
- //#endregion
22701
- //#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.59.0/node_modules/@rollup/pluginutils/dist/es/index.js
22702
21726
  const extractors = {
22703
21727
  ArrayPattern(names, param) {
22704
21728
  for (const element of param.elements) if (element) extractors[element.type](names, element);
@@ -22930,8 +21954,6 @@ const dataToEsm = function dataToEsm(data, options = {}) {
22930
21954
  const defaultExportCode = `export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
22931
21955
  return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`;
22932
21956
  };
22933
- //#endregion
22934
- //#region node_modules/.pnpm/@rollup+plugin-replace@6.0.3_rollup@4.59.0/node_modules/@rollup/plugin-replace/dist/es/index.js
22935
21957
  function escape(str) {
22936
21958
  return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
22937
21959
  }
@@ -23029,8 +22051,6 @@ function replace(options) {
23029
22051
  return options.sourceMap !== false && options.sourcemap !== false;
23030
22052
  }
23031
22053
  }
23032
- //#endregion
23033
- //#region node_modules/.pnpm/unwasm@0.5.3/node_modules/unwasm/dist/plugin/index.mjs
23034
22054
  var __create = Object.create;
23035
22055
  var __defProp = Object.defineProperty;
23036
22056
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -28625,7 +27645,6 @@ async function getWasmESMBinding(asset, opts) {
28625
27645
  const instantiateCode = opts.esmImport ? getESMImportInstantiate(asset, autoImports.code) : getBase64Instantiate(asset, autoImports.code);
28626
27646
  return opts.lazy !== true && autoImports.resolved ? getExports(asset, instantiateCode) : getLazyExports(asset, instantiateCode);
28627
27647
  }
28628
- /** Generate WebAssembly.Module binding for compatibility */
28629
27648
  function getWasmModuleBinding(asset, opts) {
28630
27649
  return opts.esmImport ? `
28631
27650
  const _mod = ${opts.lazy === true ? "" : `await`} import("${UNWASM_EXTERNAL_PREFIX}${asset.name}").then(r => r.default || r);
@@ -28637,7 +27656,6 @@ const _mod = new WebAssembly.Module(_data);
28637
27656
  export default _mod;
28638
27657
  `;
28639
27658
  }
28640
- /** Get the code to instantiate module with direct import */
28641
27659
  function getESMImportInstantiate(asset, importsCode) {
28642
27660
  return `
28643
27661
  ${importsCode}
@@ -28648,7 +27666,6 @@ return WebAssembly.instantiate(_mod, imports)
28648
27666
  }
28649
27667
  `;
28650
27668
  }
28651
- /** Get the code to instantiate module from inlined base64 data */
28652
27669
  function getBase64Instantiate(asset, importsCode) {
28653
27670
  return `
28654
27671
  import { base64ToUint8Array } from "${UMWASM_HELPERS_ID}";
@@ -28660,7 +27677,6 @@ function _instantiate(imports = _imports) {
28660
27677
  return WebAssembly.instantiate(_data, imports) }
28661
27678
  `;
28662
27679
  }
28663
- /** Get the exports code with top level await support */
28664
27680
  function getExports(asset, instantiateCode) {
28665
27681
  return `
28666
27682
  import { getExports } from "${UMWASM_HELPERS_ID}";
@@ -28676,7 +27692,6 @@ ${asset.exports.map((name) => `defaultExport["${name}"] = $exports.${name};`).jo
28676
27692
  export default defaultExport;
28677
27693
  `;
28678
27694
  }
28679
- /** Proxied exports when imports are needed or we can't have top-level await */
28680
27695
  function getLazyExports(asset, instantiateCode) {
28681
27696
  return `
28682
27697
  import { createLazyWasmModule } from "${UMWASM_HELPERS_ID}";
@@ -28914,11 +27929,9 @@ function unwasm(opts) {
28914
27929
  }
28915
27930
  };
28916
27931
  }
28917
- //#endregion
28918
- //#region src/build/plugins/route-meta.ts
28919
27932
  const PREFIX$1 = "\0nitro:route-meta:";
28920
27933
  async function routeMeta(nitro) {
28921
- const { transformSync } = await import("rolldown/experimental");
27934
+ const { transformSync } = await import("rolldown/utils");
28922
27935
  return {
28923
27936
  name: "nitro:route-meta",
28924
27937
  resolveId: {
@@ -28946,7 +27959,7 @@ async function routeMeta(nitro) {
28946
27959
  async handler(code, id) {
28947
27960
  let meta = null;
28948
27961
  try {
28949
- const transformRes = transformSync(id, code);
27962
+ const transformRes = transformSync(id, code, { tsconfig: false });
28950
27963
  if (transformRes.errors?.length > 0) {
28951
27964
  for (const error of transformRes.errors) this.warn(error);
28952
27965
  return {
@@ -28984,8 +27997,6 @@ function astToObject(node) {
28984
27997
  case "Literal": return node.value;
28985
27998
  }
28986
27999
  }
28987
- //#endregion
28988
- //#region src/build/plugins/server-main.ts
28989
28000
  function serverMain(nitro) {
28990
28001
  return {
28991
28002
  name: "nitro:server-main",
@@ -28997,8 +28008,6 @@ function serverMain(nitro) {
28997
28008
  }
28998
28009
  };
28999
28010
  }
29000
- //#endregion
29001
- //#region src/build/plugins/virtual.ts
29002
28011
  function virtual(input) {
29003
28012
  const modules = /* @__PURE__ */ new Map();
29004
28013
  for (const mod of input) {
@@ -29061,8 +28070,6 @@ function virtualDeps() {
29061
28070
  }
29062
28071
  };
29063
28072
  }
29064
- //#endregion
29065
- //#region src/build/plugins/sourcemap-min.ts
29066
28073
  function sourcemapMinify() {
29067
28074
  return {
29068
28075
  name: "nitro:sourcemap-minify",
@@ -29078,8 +28085,6 @@ function sourcemapMinify() {
29078
28085
  }
29079
28086
  };
29080
28087
  }
29081
- //#endregion
29082
- //#region src/build/plugins/raw.ts
29083
28088
  const HELPER_ID = "virtual:nitro-raw-helpers";
29084
28089
  const RESOLVED_PREFIX = "virtual:nitro:raw:";
29085
28090
  const PREFIX = "raw:";
@@ -29153,11 +28158,10 @@ function rawAssetMap(id) {
29153
28158
  mappings: ""
29154
28159
  };
29155
28160
  }
29156
- //#endregion
29157
- //#region src/build/plugins/externals.ts
29158
28161
  const PLUGIN_NAME = "nitro:externals";
29159
28162
  function externals(opts) {
29160
- const include = opts?.include ? opts.include.map((p) => toPathRegExp(p)) : void 0;
28163
+ const resolved = opts.trace ? resolveTraceDeps(opts.include) : void 0;
28164
+ const include = resolved?.includePattern ? [resolved.includePattern] : void 0;
29161
28165
  const exclude = [/^(?:[\0#~.]|[a-z0-9]{2,}:)|\?/, ...(opts?.exclude || []).map((p) => toPathRegExp(p))];
29162
28166
  const filter = (id) => {
29163
28167
  if (include && !include.some((r) => r.test(id))) return false;
@@ -29170,7 +28174,7 @@ function externals(opts) {
29170
28174
  conditions: opts.conditions
29171
28175
  });
29172
28176
  const tracedPaths = /* @__PURE__ */ new Set();
29173
- if (include && include.length === 0) return { name: PLUGIN_NAME };
28177
+ if (opts.trace && !resolved?.includePattern) return { name: PLUGIN_NAME };
29174
28178
  return {
29175
28179
  name: PLUGIN_NAME,
29176
28180
  resolveId: {
@@ -29223,22 +28227,27 @@ function externals(opts) {
29223
28227
  order: "post",
29224
28228
  async handler() {
29225
28229
  if (!opts.trace || tracedPaths.size === 0) return;
28230
+ const { hooks: userHooks, ...traceOpts } = opts.trace;
29226
28231
  const { traceNodeModules } = await import("nf3");
29227
28232
  const traceTime = Date.now();
29228
28233
  let traceFilesCount = 0;
29229
28234
  let tracedPkgsCount = 0;
29230
28235
  await traceNodeModules([...tracedPaths], {
29231
- ...opts.trace,
28236
+ ...traceOpts,
28237
+ fullTraceInclude: resolved?.fullTraceInclude,
29232
28238
  conditions: opts.conditions,
29233
28239
  rootDir: opts.rootDir,
29234
28240
  writePackageJson: true,
29235
28241
  hooks: {
29236
- tracedFiles(result) {
28242
+ ...userHooks,
28243
+ tracedFiles: async (result) => {
29237
28244
  traceFilesCount = Object.keys(result).length;
28245
+ await userHooks?.tracedFiles?.(result);
29238
28246
  },
29239
- tracedPackages: (pkgs) => {
28247
+ tracedPackages: async (pkgs) => {
29240
28248
  tracedPkgsCount = Object.keys(pkgs).length;
29241
28249
  consola.info(`Tracing dependencies:\n${Object.entries(pkgs).map(([name, versions]) => `- \`${name}\` (${Object.keys(versions.versions).join(", ")})`).join("\n")}`);
28250
+ await userHooks?.tracedPackages?.(pkgs);
29242
28251
  }
29243
28252
  }
29244
28253
  });
@@ -29248,6 +28257,27 @@ function externals(opts) {
29248
28257
  }
29249
28258
  };
29250
28259
  }
28260
+ function resolveTraceDeps(traceDeps, opts = {}) {
28261
+ const builtinPackages = opts.builtinPackages ?? [...NodeNativePackages, ...NonBundleablePackages];
28262
+ const builtinFullTrace = opts.builtinFullTrace ?? FullTracePackages;
28263
+ const negated = /* @__PURE__ */ new Set();
28264
+ const userTraceDeps = [];
28265
+ const userFullTrace = [];
28266
+ for (const d of traceDeps) if (typeof d !== "string") userTraceDeps.push(d);
28267
+ else if (d === "!" || d === "*" || d === "") throw new Error(`Invalid traceDeps selector: "${d}"`);
28268
+ else if (d.startsWith("!")) negated.add(d.slice(1));
28269
+ else if (d.endsWith("*")) {
28270
+ const name = d.slice(0, -1);
28271
+ userFullTrace.push(name);
28272
+ userTraceDeps.push(name);
28273
+ } else userTraceDeps.push(d);
28274
+ const tracePattern = [...new Set([...builtinPackages, ...userTraceDeps])].filter((d) => typeof d !== "string" || !negated.has(d)).map((d) => d instanceof RegExp ? d.source : escapeRegExp$1(d)).join("|");
28275
+ const fullTraceInclude = [...new Set([...builtinFullTrace, ...userFullTrace])].filter((d) => !negated.has(d));
28276
+ return {
28277
+ includePattern: tracePattern ? new RegExp(`(?:^|[/\\\\]node_modules[/\\\\])(?:${tracePattern})(?:[/\\\\]|$)`) : void 0,
28278
+ fullTraceInclude: fullTraceInclude.length > 0 ? fullTraceInclude : void 0
28279
+ };
28280
+ }
29251
28281
  const NODE_MODULES_RE = /^(?<dir>.+[\\/]node_modules[\\/])(?<name>[^@\\/]+|@[^\\/]+[\\/][^\\/]+)(?:[\\/](?<subpath>.+))?$/;
29252
28282
  const IMPORT_RE = /^(?!\.)(?<name>[^@/\\]+|@[^/\\]+[/\\][^/\\]+)(?:[/\\](?<subpath>.+))?$/;
29253
28283
  function toImport(id) {
@@ -29294,8 +28324,6 @@ function flattenExports(exports = {}, parentSubpath = "./") {
29294
28324
  return typeof value === "object" ? flattenExports(value, _subPath) : [];
29295
28325
  });
29296
28326
  }
29297
- //#endregion
29298
- //#region src/build/plugins.ts
29299
28327
  async function baseBuildPlugins(nitro, base) {
29300
28328
  const plugins = [];
29301
28329
  const virtualPlugin = virtual(virtualTemplates(nitro, [...base.env.polyfill]));
@@ -29315,27 +28343,22 @@ async function baseBuildPlugins(nitro, base) {
29315
28343
  }));
29316
28344
  if (nitro.options.node && nitro.options.noExternals !== true) {
29317
28345
  const isDevOrPrerender = nitro.options.dev || nitro.options.preset === "nitro-prerender";
29318
- const { NodeNativePackages, NonBundleablePackages } = await import("nf3/db");
29319
- const traceDeps = [...new Set([
29320
- ...NodeNativePackages,
29321
- ...NonBundleablePackages,
29322
- ...nitro.options.traceDeps || []
29323
- ])];
29324
28346
  plugins.push(externals({
29325
28347
  rootDir: nitro.options.rootDir,
29326
28348
  conditions: nitro.options.exportConditions,
28349
+ include: nitro.options.traceDeps || [],
29327
28350
  exclude: [...base.noExternal],
29328
- include: isDevOrPrerender ? void 0 : [new RegExp(`^(?:${traceDeps.join("|")})|[/\\\\]node_modules[/\\\\](?:${traceDeps.join("|")})(?:[/\\\\])`)],
29329
- trace: isDevOrPrerender ? false : { outDir: nitro.options.output.serverDir }
28351
+ trace: isDevOrPrerender ? false : {
28352
+ ...nitro.options.traceOpts,
28353
+ outDir: nitro.options.output.serverDir
28354
+ }
29330
28355
  }));
29331
28356
  }
29332
28357
  if (nitro.options.sourcemap && !nitro.options.dev && nitro.options.experimental.sourcemapMinify !== false) plugins.push(sourcemapMinify());
29333
28358
  return plugins;
29334
28359
  }
29335
- //#endregion
29336
- //#region src/build/plugins/oxc.ts
29337
28360
  async function oxc(options) {
29338
- const { minifySync, transformSync } = await import("rolldown/experimental");
28361
+ const { minifySync, transformSync } = await import("rolldown/utils");
29339
28362
  return {
29340
28363
  name: "nitro:oxc",
29341
28364
  transform: {
@@ -29343,6 +28366,7 @@ async function oxc(options) {
29343
28366
  handler(code, id) {
29344
28367
  const res = transformSync(id, code, {
29345
28368
  sourcemap: options.sourcemap,
28369
+ tsconfig: false,
29346
28370
  ...options.transform
29347
28371
  });
29348
28372
  if (res.errors?.length > 0) this.error(res.errors.join("\n"));
@@ -29357,5 +28381,4 @@ async function oxc(options) {
29357
28381
  }
29358
28382
  };
29359
28383
  }
29360
- //#endregion
29361
28384
  export { jsonc_exports as $, src_default as A, f$1 as B, decode as C, copyPublicAssets as D, prepare as E, prettyPath as F, findNearestFile$1 as G, v$2 as H, resolveNitroPath as I, readPackageJSON$1 as J, findWorkspaceDir as K, writeFile$1 as L, glob as M, require_picomatch as N, scanUnprefixedPublicAssets as O, Builder as P, yaml_exports as Q, R$1 as R, MagicString as S, parse as T, dist_exports$1 as U, m$2 as V, findFile$1 as W, toml_exports as X, i$3 as Y, a$3 as Z, writeTypes as _, dataToEsm as a, dirname$2 as at, getMagicString as b, walk as c, join$2 as ct, libChunkName as d, resolve$3 as dt, r$5 as et, baseBuildConfig as f, writeDevBuildInfo as g, writeBuildInfo as h, createFilter as i, basename$2 as it, build as j, compressPublicAssets as k, NODE_MODULES_RE$1 as l, normalize$2 as lt, getBuildInfo as m, baseBuildPlugins as n, resolveModulePath as nt, extractAssignedNames as o, extname$4 as ot, runParallel as p, readGitConfig as q, attachScopes as r, resolveModuleURL as rt, makeLegalIdentifier as s, isAbsolute$2 as st, oxc as t, json5_exports as tt, getChunkName as u, relative$2 as ut, dist_exports as v, encode as w, stripLiteral as x, createUnimport as y, _$2 as z };