@voidzero-dev/vite-plus-test 0.0.0-0bfcc90f.20260209-0731

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 (318) hide show
  1. package/LICENSE.md +691 -0
  2. package/browser/context.d.ts +4 -0
  3. package/browser/context.js +20 -0
  4. package/config.d.ts +3 -0
  5. package/coverage.d.ts +1 -0
  6. package/dist/@vitest/browser/client/.vite/manifest.json +24 -0
  7. package/dist/@vitest/browser/client/__vitest__/assets/index-BUCFJtth.js +57 -0
  8. package/dist/@vitest/browser/client/__vitest__/assets/index-DlhE0rqZ.css +1 -0
  9. package/dist/@vitest/browser/client/__vitest__/bg.png +0 -0
  10. package/dist/@vitest/browser/client/__vitest__/favicon.ico +0 -0
  11. package/dist/@vitest/browser/client/__vitest__/favicon.svg +5 -0
  12. package/dist/@vitest/browser/client/__vitest__/index.html +32 -0
  13. package/dist/@vitest/browser/client/__vitest_browser__/orchestrator-S_3e_uzt.js +345 -0
  14. package/dist/@vitest/browser/client/__vitest_browser__/tester-k74mgIRa.js +2171 -0
  15. package/dist/@vitest/browser/client/__vitest_browser__/utils-uxqdqUz8.js +223 -0
  16. package/dist/@vitest/browser/client/error-catcher.js +82 -0
  17. package/dist/@vitest/browser/client/esm-client-injector.js +67 -0
  18. package/dist/@vitest/browser/client/favicon.svg +5 -0
  19. package/dist/@vitest/browser/client/orchestrator.html +35 -0
  20. package/dist/@vitest/browser/client/tester/tester.html +13 -0
  21. package/dist/@vitest/browser/client.js +456 -0
  22. package/dist/@vitest/browser/context.d.ts +792 -0
  23. package/dist/@vitest/browser/context.js +541 -0
  24. package/dist/@vitest/browser/expect-element.js +32 -0
  25. package/dist/@vitest/browser/index-D6m36C6U.js +11 -0
  26. package/dist/@vitest/browser/index.d.ts +73 -0
  27. package/dist/@vitest/browser/index.js +3513 -0
  28. package/dist/@vitest/browser/jest-dom.d.ts +724 -0
  29. package/dist/@vitest/browser/locators.d.ts +354 -0
  30. package/dist/@vitest/browser/locators.js +1 -0
  31. package/dist/@vitest/browser/matchers.d.ts +29 -0
  32. package/dist/@vitest/browser/shared/screenshotMatcher/types.d.ts +22 -0
  33. package/dist/@vitest/browser/state.js +280 -0
  34. package/dist/@vitest/browser/types.d.ts +69 -0
  35. package/dist/@vitest/browser-playwright/context.d.ts +1 -0
  36. package/dist/@vitest/browser-playwright/index.d.ts +106 -0
  37. package/dist/@vitest/browser-playwright/index.js +1111 -0
  38. package/dist/@vitest/browser-playwright/locators.js +114 -0
  39. package/dist/@vitest/browser-preview/context.d.ts +1 -0
  40. package/dist/@vitest/browser-preview/index.d.ts +19 -0
  41. package/dist/@vitest/browser-preview/index.js +148 -0
  42. package/dist/@vitest/browser-preview/locators.js +79 -0
  43. package/dist/@vitest/browser-webdriverio/context.d.ts +1 -0
  44. package/dist/@vitest/browser-webdriverio/index.d.ts +63 -0
  45. package/dist/@vitest/browser-webdriverio/index.js +600 -0
  46. package/dist/@vitest/browser-webdriverio/locators.js +163 -0
  47. package/dist/@vitest/expect/index.d.ts +807 -0
  48. package/dist/@vitest/expect/index.js +1875 -0
  49. package/dist/@vitest/mocker/auto-register.d.ts +2 -0
  50. package/dist/@vitest/mocker/auto-register.js +9 -0
  51. package/dist/@vitest/mocker/automock.d.ts +12 -0
  52. package/dist/@vitest/mocker/automock.js +1 -0
  53. package/dist/@vitest/mocker/browser.d.ts +53 -0
  54. package/dist/@vitest/mocker/browser.js +91 -0
  55. package/dist/@vitest/mocker/chunk-automock.js +354 -0
  56. package/dist/@vitest/mocker/chunk-interceptor-native.js +15 -0
  57. package/dist/@vitest/mocker/chunk-mocker.js +521 -0
  58. package/dist/@vitest/mocker/chunk-pathe.M-eThtNZ.js +174 -0
  59. package/dist/@vitest/mocker/chunk-registry.js +185 -0
  60. package/dist/@vitest/mocker/chunk-utils.js +16 -0
  61. package/dist/@vitest/mocker/index.d-C-sLYZi-.d.ts +25 -0
  62. package/dist/@vitest/mocker/index.d.ts +2 -0
  63. package/dist/@vitest/mocker/index.js +185 -0
  64. package/dist/@vitest/mocker/mocker.d-TnKRhz7N.d.ts +81 -0
  65. package/dist/@vitest/mocker/node.d.ts +800 -0
  66. package/dist/@vitest/mocker/node.js +966 -0
  67. package/dist/@vitest/mocker/redirect.d.ts +3 -0
  68. package/dist/@vitest/mocker/redirect.js +79 -0
  69. package/dist/@vitest/mocker/register.d.ts +9 -0
  70. package/dist/@vitest/mocker/register.js +41 -0
  71. package/dist/@vitest/mocker/types.d-B8CCKmHt.d.ts +107 -0
  72. package/dist/@vitest/pretty-format/index.d.ts +124 -0
  73. package/dist/@vitest/pretty-format/index.js +1022 -0
  74. package/dist/@vitest/runner/chunk-tasks.js +340 -0
  75. package/dist/@vitest/runner/index.d.ts +180 -0
  76. package/dist/@vitest/runner/index.js +2114 -0
  77. package/dist/@vitest/runner/tasks.d-C7UxawJ9.d.ts +834 -0
  78. package/dist/@vitest/runner/types.d.ts +183 -0
  79. package/dist/@vitest/runner/types.js +1 -0
  80. package/dist/@vitest/runner/utils.d.ts +45 -0
  81. package/dist/@vitest/runner/utils.js +5 -0
  82. package/dist/@vitest/snapshot/environment.d-DHdQ1Csl.d.ts +22 -0
  83. package/dist/@vitest/snapshot/environment.d.ts +16 -0
  84. package/dist/@vitest/snapshot/environment.js +40 -0
  85. package/dist/@vitest/snapshot/index.d.ts +130 -0
  86. package/dist/@vitest/snapshot/index.js +1437 -0
  87. package/dist/@vitest/snapshot/manager.d.ts +18 -0
  88. package/dist/@vitest/snapshot/manager.js +73 -0
  89. package/dist/@vitest/snapshot/rawSnapshot.d-lFsMJFUd.d.ts +61 -0
  90. package/dist/@vitest/spy/index.d.ts +384 -0
  91. package/dist/@vitest/spy/index.js +433 -0
  92. package/dist/@vitest/utils/chunk-_commonjsHelpers.js +5 -0
  93. package/dist/@vitest/utils/chunk-pathe.M-eThtNZ.js +156 -0
  94. package/dist/@vitest/utils/constants.d.ts +21 -0
  95. package/dist/@vitest/utils/constants.js +49 -0
  96. package/dist/@vitest/utils/diff.d.ts +93 -0
  97. package/dist/@vitest/utils/diff.js +2199 -0
  98. package/dist/@vitest/utils/display.d.ts +29 -0
  99. package/dist/@vitest/utils/display.js +742 -0
  100. package/dist/@vitest/utils/error.d.ts +7 -0
  101. package/dist/@vitest/utils/error.js +42 -0
  102. package/dist/@vitest/utils/helpers.d.ts +73 -0
  103. package/dist/@vitest/utils/helpers.js +295 -0
  104. package/dist/@vitest/utils/highlight.d.ts +9 -0
  105. package/dist/@vitest/utils/highlight.js +538 -0
  106. package/dist/@vitest/utils/index.d.ts +5 -0
  107. package/dist/@vitest/utils/index.js +1 -0
  108. package/dist/@vitest/utils/offset.d.ts +5 -0
  109. package/dist/@vitest/utils/offset.js +32 -0
  110. package/dist/@vitest/utils/resolver.d.ts +7 -0
  111. package/dist/@vitest/utils/resolver.js +71 -0
  112. package/dist/@vitest/utils/serialize.d.ts +3 -0
  113. package/dist/@vitest/utils/serialize.js +118 -0
  114. package/dist/@vitest/utils/source-map.d.ts +55 -0
  115. package/dist/@vitest/utils/source-map.js +478 -0
  116. package/dist/@vitest/utils/timers.d.ts +33 -0
  117. package/dist/@vitest/utils/timers.js +49 -0
  118. package/dist/@vitest/utils/types.d-BCElaP-c.d.ts +53 -0
  119. package/dist/@vitest/utils/types.d.ts +34 -0
  120. package/dist/@vitest/utils/types.js +1 -0
  121. package/dist/browser-compat.js +3 -0
  122. package/dist/browser.d.ts +46 -0
  123. package/dist/browser.js +20 -0
  124. package/dist/chunks/_commonjsHelpers.D26ty3Ew.js +6 -0
  125. package/dist/chunks/base.CJ0Y4ePK.js +165 -0
  126. package/dist/chunks/benchmark.B3N2zMcH.js +40 -0
  127. package/dist/chunks/benchmark.d.DAaHLpsq.d.ts +24 -0
  128. package/dist/chunks/browser.d.ChKACdzH.d.ts +59 -0
  129. package/dist/chunks/cac.DVeoLl0M.js +1409 -0
  130. package/dist/chunks/cli-api.B7PN_QUv.js +13672 -0
  131. package/dist/chunks/config.d.Cy95HiCx.d.ts +210 -0
  132. package/dist/chunks/console.Cf-YriPC.js +146 -0
  133. package/dist/chunks/constants.D_Q9UYh-.js +36 -0
  134. package/dist/chunks/coverage.AVPTjMgw.js +3292 -0
  135. package/dist/chunks/coverage.D_JHT54q.js +25 -0
  136. package/dist/chunks/coverage.d.BZtK59WP.d.ts +37 -0
  137. package/dist/chunks/creator.DAmOKTvJ.js +673 -0
  138. package/dist/chunks/date.Bq6ZW5rf.js +73 -0
  139. package/dist/chunks/defaults.BOqNVLsY.js +74 -0
  140. package/dist/chunks/env.D4Lgay0q.js +8 -0
  141. package/dist/chunks/environment.d.CrsxCzP1.d.ts +29 -0
  142. package/dist/chunks/evaluatedModules.Dg1zASAC.js +17 -0
  143. package/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts +7 -0
  144. package/dist/chunks/git.Bm2pzPAa.js +71 -0
  145. package/dist/chunks/global.d.B15mdLcR.d.ts +99 -0
  146. package/dist/chunks/globals.DOayXfHP.js +30 -0
  147. package/dist/chunks/index.6Qv1eEA6.js +109 -0
  148. package/dist/chunks/index.C5r1PdPD.js +231 -0
  149. package/dist/chunks/index.Chj8NDwU.js +206 -0
  150. package/dist/chunks/index.CyBMJtT7.js +727 -0
  151. package/dist/chunks/index.D3XRDfWc.js +213 -0
  152. package/dist/chunks/index.D4KonVSU.js +6343 -0
  153. package/dist/chunks/index.M8mOzt4Y.js +3839 -0
  154. package/dist/chunks/index.Z5E_ObnR.js +37 -0
  155. package/dist/chunks/init-forks._y3TW739.js +41 -0
  156. package/dist/chunks/init-threads.DBO2kn-p.js +18 -0
  157. package/dist/chunks/init.B6MLFIaN.js +334 -0
  158. package/dist/chunks/inspector.CvyFGlXm.js +53 -0
  159. package/dist/chunks/modules.BJuCwlRJ.js +36 -0
  160. package/dist/chunks/node.Ce0vMQM7.js +14 -0
  161. package/dist/chunks/plugin.d.CtqpEehP.d.ts +38 -0
  162. package/dist/chunks/reporters.d.CWXNI2jG.d.ts +3271 -0
  163. package/dist/chunks/rpc.BoxB0q7B.js +76 -0
  164. package/dist/chunks/rpc.d.RH3apGEf.d.ts +64 -0
  165. package/dist/chunks/setup-common.Cm-kSBVi.js +60 -0
  166. package/dist/chunks/startModuleRunner.DEj0jb3e.js +861 -0
  167. package/dist/chunks/suite.d.BJWk38HB.d.ts +10 -0
  168. package/dist/chunks/test.B8ej_ZHS.js +254 -0
  169. package/dist/chunks/traces.CCmnQaNT.js +217 -0
  170. package/dist/chunks/traces.d.402V_yFI.d.ts +18 -0
  171. package/dist/chunks/utils.DvEY5TfP.js +52 -0
  172. package/dist/chunks/vi.2VT5v0um.js +3919 -0
  173. package/dist/chunks/vm.D3epNOPZ.js +744 -0
  174. package/dist/chunks/worker.d.Dyxm8DEL.d.ts +255 -0
  175. package/dist/cli.js +28 -0
  176. package/dist/client/.vite/manifest.json +24 -0
  177. package/dist/client/__vitest__/assets/index-BUCFJtth.js +57 -0
  178. package/dist/client/__vitest__/assets/index-DlhE0rqZ.css +1 -0
  179. package/dist/client/__vitest__/bg.png +0 -0
  180. package/dist/client/__vitest__/favicon.ico +0 -0
  181. package/dist/client/__vitest__/favicon.svg +5 -0
  182. package/dist/client/__vitest__/index.html +32 -0
  183. package/dist/client/__vitest_browser__/orchestrator-S_3e_uzt.js +345 -0
  184. package/dist/client/__vitest_browser__/tester-k74mgIRa.js +2171 -0
  185. package/dist/client/__vitest_browser__/utils-uxqdqUz8.js +223 -0
  186. package/dist/client/error-catcher.js +82 -0
  187. package/dist/client/esm-client-injector.js +67 -0
  188. package/dist/client/favicon.svg +5 -0
  189. package/dist/client/orchestrator.html +35 -0
  190. package/dist/client/tester/tester.html +13 -0
  191. package/dist/client.js +456 -0
  192. package/dist/config.cjs +94 -0
  193. package/dist/config.d.ts +104 -0
  194. package/dist/config.js +15 -0
  195. package/dist/context.js +541 -0
  196. package/dist/coverage.d.ts +118 -0
  197. package/dist/coverage.js +23 -0
  198. package/dist/dummy.js +2 -0
  199. package/dist/environments.d.ts +22 -0
  200. package/dist/environments.js +3 -0
  201. package/dist/expect-element.js +27 -0
  202. package/dist/index-D6m36C6U.js +6 -0
  203. package/dist/index-node.js +7 -0
  204. package/dist/index.d.ts +510 -0
  205. package/dist/index.js +19 -0
  206. package/dist/locators.d.ts +354 -0
  207. package/dist/locators.js +1 -0
  208. package/dist/mocker.d.ts +1 -0
  209. package/dist/mocker.js +1 -0
  210. package/dist/module-evaluator.d.ts +124 -0
  211. package/dist/module-evaluator.js +343 -0
  212. package/dist/module-runner-stub.js +44 -0
  213. package/dist/module-runner.js +17 -0
  214. package/dist/node.d.ts +251 -0
  215. package/dist/node.js +98 -0
  216. package/dist/path.js +7 -0
  217. package/dist/plugins/browser-client.mjs +2 -0
  218. package/dist/plugins/browser-context.mjs +2 -0
  219. package/dist/plugins/browser-locators.mjs +2 -0
  220. package/dist/plugins/browser-playwright.mjs +2 -0
  221. package/dist/plugins/browser-preview.mjs +2 -0
  222. package/dist/plugins/browser-webdriverio.mjs +2 -0
  223. package/dist/plugins/browser.mjs +2 -0
  224. package/dist/plugins/expect.mjs +2 -0
  225. package/dist/plugins/mocker-automock.mjs +2 -0
  226. package/dist/plugins/mocker-browser.mjs +2 -0
  227. package/dist/plugins/mocker-node.mjs +2 -0
  228. package/dist/plugins/mocker-redirect.mjs +2 -0
  229. package/dist/plugins/mocker-register.mjs +2 -0
  230. package/dist/plugins/mocker.mjs +2 -0
  231. package/dist/plugins/pretty-format.mjs +2 -0
  232. package/dist/plugins/runner-types.mjs +2 -0
  233. package/dist/plugins/runner-utils.mjs +2 -0
  234. package/dist/plugins/runner.mjs +2 -0
  235. package/dist/plugins/snapshot-environment.mjs +2 -0
  236. package/dist/plugins/snapshot-manager.mjs +2 -0
  237. package/dist/plugins/snapshot.mjs +2 -0
  238. package/dist/plugins/spy.mjs +2 -0
  239. package/dist/plugins/utils-constants.mjs +2 -0
  240. package/dist/plugins/utils-diff.mjs +2 -0
  241. package/dist/plugins/utils-display.mjs +2 -0
  242. package/dist/plugins/utils-error.mjs +2 -0
  243. package/dist/plugins/utils-helpers.mjs +2 -0
  244. package/dist/plugins/utils-highlight.mjs +2 -0
  245. package/dist/plugins/utils-offset.mjs +2 -0
  246. package/dist/plugins/utils-resolver.mjs +2 -0
  247. package/dist/plugins/utils-serialize.mjs +2 -0
  248. package/dist/plugins/utils-source-map.mjs +2 -0
  249. package/dist/plugins/utils-timers.mjs +2 -0
  250. package/dist/plugins/utils.mjs +2 -0
  251. package/dist/reporters.d.ts +27 -0
  252. package/dist/reporters.js +24 -0
  253. package/dist/runners.d.ts +50 -0
  254. package/dist/runners.js +19 -0
  255. package/dist/shared/screenshotMatcher/types.d.ts +22 -0
  256. package/dist/snapshot.d.ts +9 -0
  257. package/dist/snapshot.js +4 -0
  258. package/dist/spy.js +1 -0
  259. package/dist/state.js +280 -0
  260. package/dist/suite.d.ts +5 -0
  261. package/dist/suite.js +6 -0
  262. package/dist/types.d.ts +69 -0
  263. package/dist/vendor/chai.d.mts +1 -0
  264. package/dist/vendor/chai.mjs +3577 -0
  265. package/dist/vendor/es-module-lexer.d.mts +193 -0
  266. package/dist/vendor/es-module-lexer.mjs +79 -0
  267. package/dist/vendor/estree-walker.d.mts +583 -0
  268. package/dist/vendor/estree-walker.mjs +339 -0
  269. package/dist/vendor/expect-type.d.mts +1574 -0
  270. package/dist/vendor/expect-type.mjs +214 -0
  271. package/dist/vendor/magic-string.d.mts +261 -0
  272. package/dist/vendor/magic-string.mjs +1700 -0
  273. package/dist/vendor/obug.d.mts +56 -0
  274. package/dist/vendor/obug.mjs +276 -0
  275. package/dist/vendor/pathe.d.mts +46 -0
  276. package/dist/vendor/pathe.mjs +496 -0
  277. package/dist/vendor/picomatch.d.mts +1 -0
  278. package/dist/vendor/picomatch.mjs +1855 -0
  279. package/dist/vendor/shared-3g9mwCWP.mjs +31 -0
  280. package/dist/vendor/std-env.d.mts +88 -0
  281. package/dist/vendor/std-env.mjs +159 -0
  282. package/dist/vendor/tinybench.d.mts +317 -0
  283. package/dist/vendor/tinybench.mjs +504 -0
  284. package/dist/vendor/tinyexec.d.mts +72 -0
  285. package/dist/vendor/tinyexec.mjs +637 -0
  286. package/dist/vendor/tinyglobby.d.mts +157 -0
  287. package/dist/vendor/tinyglobby.mjs +832 -0
  288. package/dist/vendor/tinyrainbow.d.mts +60 -0
  289. package/dist/vendor/tinyrainbow.mjs +93 -0
  290. package/dist/vendor/vitest_browser.mjs +2 -0
  291. package/dist/vendor/vitest_internal_browser.mjs +2 -0
  292. package/dist/vendor/vitest_runner.mjs +2 -0
  293. package/dist/vendor/vitest_runners.mjs +2 -0
  294. package/dist/worker.d.ts +32 -0
  295. package/dist/worker.js +48 -0
  296. package/dist/workers/forks.js +54 -0
  297. package/dist/workers/runVmTests.js +95 -0
  298. package/dist/workers/threads.js +55 -0
  299. package/dist/workers/vmForks.js +36 -0
  300. package/dist/workers/vmThreads.js +37 -0
  301. package/environments.d.ts +1 -0
  302. package/globals.d.ts +20 -0
  303. package/import-meta.d.ts +5 -0
  304. package/importMeta.d.ts +4 -0
  305. package/index.cjs +5 -0
  306. package/index.d.cts +1 -0
  307. package/jsdom.d.ts +6 -0
  308. package/mocker.d.ts +1 -0
  309. package/node.d.ts +1 -0
  310. package/optional-types.d.ts +7 -0
  311. package/package.json +335 -0
  312. package/reporters.d.ts +1 -0
  313. package/runners.d.ts +1 -0
  314. package/snapshot.d.ts +1 -0
  315. package/suite.d.ts +1 -0
  316. package/suppress-warnings.cjs +21 -0
  317. package/vitest.mjs +2 -0
  318. package/worker.d.ts +1 -0
@@ -0,0 +1,1855 @@
1
+ import { t as __commonJSMin } from "./shared-3g9mwCWP.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
4
+ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
+ const WIN_SLASH = "\\\\/";
6
+ const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
7
+ /**
8
+ * Posix glob regex
9
+ */
10
+ const DOT_LITERAL = "\\.";
11
+ const PLUS_LITERAL = "\\+";
12
+ const QMARK_LITERAL = "\\?";
13
+ const SLASH_LITERAL = "\\/";
14
+ const ONE_CHAR = "(?=.)";
15
+ const QMARK = "[^/]";
16
+ const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
17
+ const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
18
+ const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
19
+ const NO_DOT = `(?!${DOT_LITERAL})`;
20
+ const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
21
+ const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
22
+ const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
23
+ const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
24
+ const STAR = `${QMARK}*?`;
25
+ const SEP = "/";
26
+ const POSIX_CHARS = {
27
+ DOT_LITERAL,
28
+ PLUS_LITERAL,
29
+ QMARK_LITERAL,
30
+ SLASH_LITERAL,
31
+ ONE_CHAR,
32
+ QMARK,
33
+ END_ANCHOR,
34
+ DOTS_SLASH,
35
+ NO_DOT,
36
+ NO_DOTS,
37
+ NO_DOT_SLASH,
38
+ NO_DOTS_SLASH,
39
+ QMARK_NO_DOT,
40
+ STAR,
41
+ START_ANCHOR,
42
+ SEP
43
+ };
44
+ /**
45
+ * Windows glob regex
46
+ */
47
+ const WINDOWS_CHARS = {
48
+ ...POSIX_CHARS,
49
+ SLASH_LITERAL: `[${WIN_SLASH}]`,
50
+ QMARK: WIN_NO_SLASH,
51
+ STAR: `${WIN_NO_SLASH}*?`,
52
+ DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
53
+ NO_DOT: `(?!${DOT_LITERAL})`,
54
+ NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
55
+ NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
56
+ NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
57
+ QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
58
+ START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
59
+ END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
60
+ SEP: "\\"
61
+ };
62
+ /**
63
+ * POSIX Bracket Regex
64
+ */
65
+ const POSIX_REGEX_SOURCE = {
66
+ alnum: "a-zA-Z0-9",
67
+ alpha: "a-zA-Z",
68
+ ascii: "\\x00-\\x7F",
69
+ blank: " \\t",
70
+ cntrl: "\\x00-\\x1F\\x7F",
71
+ digit: "0-9",
72
+ graph: "\\x21-\\x7E",
73
+ lower: "a-z",
74
+ print: "\\x20-\\x7E ",
75
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
76
+ space: " \\t\\r\\n\\v\\f",
77
+ upper: "A-Z",
78
+ word: "A-Za-z0-9_",
79
+ xdigit: "A-Fa-f0-9"
80
+ };
81
+ module.exports = {
82
+ MAX_LENGTH: 1024 * 64,
83
+ POSIX_REGEX_SOURCE,
84
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
85
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
86
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
87
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
88
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
89
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
90
+ REPLACEMENTS: {
91
+ __proto__: null,
92
+ "***": "*",
93
+ "**/**": "**",
94
+ "**/**/**": "**"
95
+ },
96
+ CHAR_0: 48,
97
+ CHAR_9: 57,
98
+ CHAR_UPPERCASE_A: 65,
99
+ CHAR_LOWERCASE_A: 97,
100
+ CHAR_UPPERCASE_Z: 90,
101
+ CHAR_LOWERCASE_Z: 122,
102
+ CHAR_LEFT_PARENTHESES: 40,
103
+ CHAR_RIGHT_PARENTHESES: 41,
104
+ CHAR_ASTERISK: 42,
105
+ CHAR_AMPERSAND: 38,
106
+ CHAR_AT: 64,
107
+ CHAR_BACKWARD_SLASH: 92,
108
+ CHAR_CARRIAGE_RETURN: 13,
109
+ CHAR_CIRCUMFLEX_ACCENT: 94,
110
+ CHAR_COLON: 58,
111
+ CHAR_COMMA: 44,
112
+ CHAR_DOT: 46,
113
+ CHAR_DOUBLE_QUOTE: 34,
114
+ CHAR_EQUAL: 61,
115
+ CHAR_EXCLAMATION_MARK: 33,
116
+ CHAR_FORM_FEED: 12,
117
+ CHAR_FORWARD_SLASH: 47,
118
+ CHAR_GRAVE_ACCENT: 96,
119
+ CHAR_HASH: 35,
120
+ CHAR_HYPHEN_MINUS: 45,
121
+ CHAR_LEFT_ANGLE_BRACKET: 60,
122
+ CHAR_LEFT_CURLY_BRACE: 123,
123
+ CHAR_LEFT_SQUARE_BRACKET: 91,
124
+ CHAR_LINE_FEED: 10,
125
+ CHAR_NO_BREAK_SPACE: 160,
126
+ CHAR_PERCENT: 37,
127
+ CHAR_PLUS: 43,
128
+ CHAR_QUESTION_MARK: 63,
129
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
130
+ CHAR_RIGHT_CURLY_BRACE: 125,
131
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
132
+ CHAR_SEMICOLON: 59,
133
+ CHAR_SINGLE_QUOTE: 39,
134
+ CHAR_SPACE: 32,
135
+ CHAR_TAB: 9,
136
+ CHAR_UNDERSCORE: 95,
137
+ CHAR_VERTICAL_LINE: 124,
138
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
139
+ extglobChars(chars) {
140
+ return {
141
+ "!": {
142
+ type: "negate",
143
+ open: "(?:(?!(?:",
144
+ close: `))${chars.STAR})`
145
+ },
146
+ "?": {
147
+ type: "qmark",
148
+ open: "(?:",
149
+ close: ")?"
150
+ },
151
+ "+": {
152
+ type: "plus",
153
+ open: "(?:",
154
+ close: ")+"
155
+ },
156
+ "*": {
157
+ type: "star",
158
+ open: "(?:",
159
+ close: ")*"
160
+ },
161
+ "@": {
162
+ type: "at",
163
+ open: "(?:",
164
+ close: ")"
165
+ }
166
+ };
167
+ },
168
+ globChars(win32) {
169
+ return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
170
+ }
171
+ };
172
+ }));
173
+
174
+ //#endregion
175
+ //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
176
+ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
177
+ const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
178
+ exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
179
+ exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
180
+ exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
181
+ exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
182
+ exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
183
+ exports.isWindows = () => {
184
+ if (typeof navigator !== "undefined" && navigator.platform) {
185
+ const platform = navigator.platform.toLowerCase();
186
+ return platform === "win32" || platform === "windows";
187
+ }
188
+ if (typeof process !== "undefined" && process.platform) {
189
+ return process.platform === "win32";
190
+ }
191
+ return false;
192
+ };
193
+ exports.removeBackslashes = (str) => {
194
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
195
+ return match === "\\" ? "" : match;
196
+ });
197
+ };
198
+ exports.escapeLast = (input, char, lastIdx) => {
199
+ const idx = input.lastIndexOf(char, lastIdx);
200
+ if (idx === -1) return input;
201
+ if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
202
+ return `${input.slice(0, idx)}\\${input.slice(idx)}`;
203
+ };
204
+ exports.removePrefix = (input, state = {}) => {
205
+ let output = input;
206
+ if (output.startsWith("./")) {
207
+ output = output.slice(2);
208
+ state.prefix = "./";
209
+ }
210
+ return output;
211
+ };
212
+ exports.wrapOutput = (input, state = {}, options = {}) => {
213
+ const prepend = options.contains ? "" : "^";
214
+ const append = options.contains ? "" : "$";
215
+ let output = `${prepend}(?:${input})${append}`;
216
+ if (state.negated === true) {
217
+ output = `(?:^(?!${output}).*$)`;
218
+ }
219
+ return output;
220
+ };
221
+ exports.basename = (path, { windows } = {}) => {
222
+ const segs = path.split(windows ? /[\\/]/ : "/");
223
+ const last = segs[segs.length - 1];
224
+ if (last === "") {
225
+ return segs[segs.length - 2];
226
+ }
227
+ return last;
228
+ };
229
+ }));
230
+
231
+ //#endregion
232
+ //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
233
+ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
234
+ const utils = require_utils();
235
+ 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();
236
+ const isPathSeparator = (code) => {
237
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
238
+ };
239
+ const depth = (token) => {
240
+ if (token.isPrefix !== true) {
241
+ token.depth = token.isGlobstar ? Infinity : 1;
242
+ }
243
+ };
244
+ /**
245
+ * Quickly scans a glob pattern and returns an object with a handful of
246
+ * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
247
+ * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
248
+ * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
249
+ *
250
+ * ```js
251
+ * const pm = require('picomatch');
252
+ * console.log(pm.scan('foo/bar/*.js'));
253
+ * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
254
+ * ```
255
+ * @param {String} `str`
256
+ * @param {Object} `options`
257
+ * @return {Object} Returns an object with tokens and regex source string.
258
+ * @api public
259
+ */
260
+ const scan = (input, options) => {
261
+ const opts = options || {};
262
+ const length = input.length - 1;
263
+ const scanToEnd = opts.parts === true || opts.scanToEnd === true;
264
+ const slashes = [];
265
+ const tokens = [];
266
+ const parts = [];
267
+ let str = input;
268
+ let index = -1;
269
+ let start = 0;
270
+ let lastIndex = 0;
271
+ let isBrace = false;
272
+ let isBracket = false;
273
+ let isGlob = false;
274
+ let isExtglob = false;
275
+ let isGlobstar = false;
276
+ let braceEscaped = false;
277
+ let backslashes = false;
278
+ let negated = false;
279
+ let negatedExtglob = false;
280
+ let finished = false;
281
+ let braces = 0;
282
+ let prev;
283
+ let code;
284
+ let token = {
285
+ value: "",
286
+ depth: 0,
287
+ isGlob: false
288
+ };
289
+ const eos = () => index >= length;
290
+ const peek = () => str.charCodeAt(index + 1);
291
+ const advance = () => {
292
+ prev = code;
293
+ return str.charCodeAt(++index);
294
+ };
295
+ while (index < length) {
296
+ code = advance();
297
+ let next;
298
+ if (code === CHAR_BACKWARD_SLASH) {
299
+ backslashes = token.backslashes = true;
300
+ code = advance();
301
+ if (code === CHAR_LEFT_CURLY_BRACE) {
302
+ braceEscaped = true;
303
+ }
304
+ continue;
305
+ }
306
+ if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
307
+ braces++;
308
+ while (eos() !== true && (code = advance())) {
309
+ if (code === CHAR_BACKWARD_SLASH) {
310
+ backslashes = token.backslashes = true;
311
+ advance();
312
+ continue;
313
+ }
314
+ if (code === CHAR_LEFT_CURLY_BRACE) {
315
+ braces++;
316
+ continue;
317
+ }
318
+ if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
319
+ isBrace = token.isBrace = true;
320
+ isGlob = token.isGlob = true;
321
+ finished = true;
322
+ if (scanToEnd === true) {
323
+ continue;
324
+ }
325
+ break;
326
+ }
327
+ if (braceEscaped !== true && code === CHAR_COMMA) {
328
+ isBrace = token.isBrace = true;
329
+ isGlob = token.isGlob = true;
330
+ finished = true;
331
+ if (scanToEnd === true) {
332
+ continue;
333
+ }
334
+ break;
335
+ }
336
+ if (code === CHAR_RIGHT_CURLY_BRACE) {
337
+ braces--;
338
+ if (braces === 0) {
339
+ braceEscaped = false;
340
+ isBrace = token.isBrace = true;
341
+ finished = true;
342
+ break;
343
+ }
344
+ }
345
+ }
346
+ if (scanToEnd === true) {
347
+ continue;
348
+ }
349
+ break;
350
+ }
351
+ if (code === CHAR_FORWARD_SLASH) {
352
+ slashes.push(index);
353
+ tokens.push(token);
354
+ token = {
355
+ value: "",
356
+ depth: 0,
357
+ isGlob: false
358
+ };
359
+ if (finished === true) continue;
360
+ if (prev === CHAR_DOT && index === start + 1) {
361
+ start += 2;
362
+ continue;
363
+ }
364
+ lastIndex = index + 1;
365
+ continue;
366
+ }
367
+ if (opts.noext !== true) {
368
+ const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
369
+ if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
370
+ isGlob = token.isGlob = true;
371
+ isExtglob = token.isExtglob = true;
372
+ finished = true;
373
+ if (code === CHAR_EXCLAMATION_MARK && index === start) {
374
+ negatedExtglob = true;
375
+ }
376
+ if (scanToEnd === true) {
377
+ while (eos() !== true && (code = advance())) {
378
+ if (code === CHAR_BACKWARD_SLASH) {
379
+ backslashes = token.backslashes = true;
380
+ code = advance();
381
+ continue;
382
+ }
383
+ if (code === CHAR_RIGHT_PARENTHESES) {
384
+ isGlob = token.isGlob = true;
385
+ finished = true;
386
+ break;
387
+ }
388
+ }
389
+ continue;
390
+ }
391
+ break;
392
+ }
393
+ }
394
+ if (code === CHAR_ASTERISK) {
395
+ if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
396
+ isGlob = token.isGlob = true;
397
+ finished = true;
398
+ if (scanToEnd === true) {
399
+ continue;
400
+ }
401
+ break;
402
+ }
403
+ if (code === CHAR_QUESTION_MARK) {
404
+ isGlob = token.isGlob = true;
405
+ finished = true;
406
+ if (scanToEnd === true) {
407
+ continue;
408
+ }
409
+ break;
410
+ }
411
+ if (code === CHAR_LEFT_SQUARE_BRACKET) {
412
+ while (eos() !== true && (next = advance())) {
413
+ if (next === CHAR_BACKWARD_SLASH) {
414
+ backslashes = token.backslashes = true;
415
+ advance();
416
+ continue;
417
+ }
418
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
419
+ isBracket = token.isBracket = true;
420
+ isGlob = token.isGlob = true;
421
+ finished = true;
422
+ break;
423
+ }
424
+ }
425
+ if (scanToEnd === true) {
426
+ continue;
427
+ }
428
+ break;
429
+ }
430
+ if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
431
+ negated = token.negated = true;
432
+ start++;
433
+ continue;
434
+ }
435
+ if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
436
+ isGlob = token.isGlob = true;
437
+ if (scanToEnd === true) {
438
+ while (eos() !== true && (code = advance())) {
439
+ if (code === CHAR_LEFT_PARENTHESES) {
440
+ backslashes = token.backslashes = true;
441
+ code = advance();
442
+ continue;
443
+ }
444
+ if (code === CHAR_RIGHT_PARENTHESES) {
445
+ finished = true;
446
+ break;
447
+ }
448
+ }
449
+ continue;
450
+ }
451
+ break;
452
+ }
453
+ if (isGlob === true) {
454
+ finished = true;
455
+ if (scanToEnd === true) {
456
+ continue;
457
+ }
458
+ break;
459
+ }
460
+ }
461
+ if (opts.noext === true) {
462
+ isExtglob = false;
463
+ isGlob = false;
464
+ }
465
+ let base = str;
466
+ let prefix = "";
467
+ let glob = "";
468
+ if (start > 0) {
469
+ prefix = str.slice(0, start);
470
+ str = str.slice(start);
471
+ lastIndex -= start;
472
+ }
473
+ if (base && isGlob === true && lastIndex > 0) {
474
+ base = str.slice(0, lastIndex);
475
+ glob = str.slice(lastIndex);
476
+ } else if (isGlob === true) {
477
+ base = "";
478
+ glob = str;
479
+ } else {
480
+ base = str;
481
+ }
482
+ if (base && base !== "" && base !== "/" && base !== str) {
483
+ if (isPathSeparator(base.charCodeAt(base.length - 1))) {
484
+ base = base.slice(0, -1);
485
+ }
486
+ }
487
+ if (opts.unescape === true) {
488
+ if (glob) glob = utils.removeBackslashes(glob);
489
+ if (base && backslashes === true) {
490
+ base = utils.removeBackslashes(base);
491
+ }
492
+ }
493
+ const state = {
494
+ prefix,
495
+ input,
496
+ start,
497
+ base,
498
+ glob,
499
+ isBrace,
500
+ isBracket,
501
+ isGlob,
502
+ isExtglob,
503
+ isGlobstar,
504
+ negated,
505
+ negatedExtglob
506
+ };
507
+ if (opts.tokens === true) {
508
+ state.maxDepth = 0;
509
+ if (!isPathSeparator(code)) {
510
+ tokens.push(token);
511
+ }
512
+ state.tokens = tokens;
513
+ }
514
+ if (opts.parts === true || opts.tokens === true) {
515
+ let prevIndex;
516
+ for (let idx = 0; idx < slashes.length; idx++) {
517
+ const n = prevIndex ? prevIndex + 1 : start;
518
+ const i = slashes[idx];
519
+ const value = input.slice(n, i);
520
+ if (opts.tokens) {
521
+ if (idx === 0 && start !== 0) {
522
+ tokens[idx].isPrefix = true;
523
+ tokens[idx].value = prefix;
524
+ } else {
525
+ tokens[idx].value = value;
526
+ }
527
+ depth(tokens[idx]);
528
+ state.maxDepth += tokens[idx].depth;
529
+ }
530
+ if (idx !== 0 || value !== "") {
531
+ parts.push(value);
532
+ }
533
+ prevIndex = i;
534
+ }
535
+ if (prevIndex && prevIndex + 1 < input.length) {
536
+ const value = input.slice(prevIndex + 1);
537
+ parts.push(value);
538
+ if (opts.tokens) {
539
+ tokens[tokens.length - 1].value = value;
540
+ depth(tokens[tokens.length - 1]);
541
+ state.maxDepth += tokens[tokens.length - 1].depth;
542
+ }
543
+ }
544
+ state.slashes = slashes;
545
+ state.parts = parts;
546
+ }
547
+ return state;
548
+ };
549
+ module.exports = scan;
550
+ }));
551
+
552
+ //#endregion
553
+ //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
554
+ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
555
+ const constants = require_constants();
556
+ const utils = require_utils();
557
+ /**
558
+ * Constants
559
+ */
560
+ const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
561
+ /**
562
+ * Helpers
563
+ */
564
+ const expandRange = (args, options) => {
565
+ if (typeof options.expandRange === "function") {
566
+ return options.expandRange(...args, options);
567
+ }
568
+ args.sort();
569
+ const value = `[${args.join("-")}]`;
570
+ try {
571
+ new RegExp(value);
572
+ } catch (ex) {
573
+ return args.map((v) => utils.escapeRegex(v)).join("..");
574
+ }
575
+ return value;
576
+ };
577
+ /**
578
+ * Create the message for a syntax error
579
+ */
580
+ const syntaxError = (type, char) => {
581
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
582
+ };
583
+ /**
584
+ * Parse the given input string.
585
+ * @param {String} input
586
+ * @param {Object} options
587
+ * @return {Object}
588
+ */
589
+ const parse = (input, options) => {
590
+ if (typeof input !== "string") {
591
+ throw new TypeError("Expected a string");
592
+ }
593
+ input = REPLACEMENTS[input] || input;
594
+ const opts = { ...options };
595
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
596
+ let len = input.length;
597
+ if (len > max) {
598
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
599
+ }
600
+ const bos = {
601
+ type: "bos",
602
+ value: "",
603
+ output: opts.prepend || ""
604
+ };
605
+ const tokens = [bos];
606
+ const capture = opts.capture ? "" : "?:";
607
+ const PLATFORM_CHARS = constants.globChars(opts.windows);
608
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
609
+ const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS;
610
+ const globstar = (opts) => {
611
+ return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
612
+ };
613
+ const nodot = opts.dot ? "" : NO_DOT;
614
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
615
+ let star = opts.bash === true ? globstar(opts) : STAR;
616
+ if (opts.capture) {
617
+ star = `(${star})`;
618
+ }
619
+ if (typeof opts.noext === "boolean") {
620
+ opts.noextglob = opts.noext;
621
+ }
622
+ const state = {
623
+ input,
624
+ index: -1,
625
+ start: 0,
626
+ dot: opts.dot === true,
627
+ consumed: "",
628
+ output: "",
629
+ prefix: "",
630
+ backtrack: false,
631
+ negated: false,
632
+ brackets: 0,
633
+ braces: 0,
634
+ parens: 0,
635
+ quotes: 0,
636
+ globstar: false,
637
+ tokens
638
+ };
639
+ input = utils.removePrefix(input, state);
640
+ len = input.length;
641
+ const extglobs = [];
642
+ const braces = [];
643
+ const stack = [];
644
+ let prev = bos;
645
+ let value;
646
+ /**
647
+ * Tokenizing helpers
648
+ */
649
+ const eos = () => state.index === len - 1;
650
+ const peek = state.peek = (n = 1) => input[state.index + n];
651
+ const advance = state.advance = () => input[++state.index] || "";
652
+ const remaining = () => input.slice(state.index + 1);
653
+ const consume = (value = "", num = 0) => {
654
+ state.consumed += value;
655
+ state.index += num;
656
+ };
657
+ const append = (token) => {
658
+ state.output += token.output != null ? token.output : token.value;
659
+ consume(token.value);
660
+ };
661
+ const negate = () => {
662
+ let count = 1;
663
+ while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
664
+ advance();
665
+ state.start++;
666
+ count++;
667
+ }
668
+ if (count % 2 === 0) {
669
+ return false;
670
+ }
671
+ state.negated = true;
672
+ state.start++;
673
+ return true;
674
+ };
675
+ const increment = (type) => {
676
+ state[type]++;
677
+ stack.push(type);
678
+ };
679
+ const decrement = (type) => {
680
+ state[type]--;
681
+ stack.pop();
682
+ };
683
+ /**
684
+ * Push tokens onto the tokens array. This helper speeds up
685
+ * tokenizing by 1) helping us avoid backtracking as much as possible,
686
+ * and 2) helping us avoid creating extra tokens when consecutive
687
+ * characters are plain text. This improves performance and simplifies
688
+ * lookbehinds.
689
+ */
690
+ const push = (tok) => {
691
+ if (prev.type === "globstar") {
692
+ const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
693
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
694
+ if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
695
+ state.output = state.output.slice(0, -prev.output.length);
696
+ prev.type = "star";
697
+ prev.value = "*";
698
+ prev.output = star;
699
+ state.output += prev.output;
700
+ }
701
+ }
702
+ if (extglobs.length && tok.type !== "paren") {
703
+ extglobs[extglobs.length - 1].inner += tok.value;
704
+ }
705
+ if (tok.value || tok.output) append(tok);
706
+ if (prev && prev.type === "text" && tok.type === "text") {
707
+ prev.output = (prev.output || prev.value) + tok.value;
708
+ prev.value += tok.value;
709
+ return;
710
+ }
711
+ tok.prev = prev;
712
+ tokens.push(tok);
713
+ prev = tok;
714
+ };
715
+ const extglobOpen = (type, value) => {
716
+ const token = {
717
+ ...EXTGLOB_CHARS[value],
718
+ conditions: 1,
719
+ inner: ""
720
+ };
721
+ token.prev = prev;
722
+ token.parens = state.parens;
723
+ token.output = state.output;
724
+ const output = (opts.capture ? "(" : "") + token.open;
725
+ increment("parens");
726
+ push({
727
+ type,
728
+ value,
729
+ output: state.output ? "" : ONE_CHAR
730
+ });
731
+ push({
732
+ type: "paren",
733
+ extglob: true,
734
+ value: advance(),
735
+ output
736
+ });
737
+ extglobs.push(token);
738
+ };
739
+ const extglobClose = (token) => {
740
+ let output = token.close + (opts.capture ? ")" : "");
741
+ let rest;
742
+ if (token.type === "negate") {
743
+ let extglobStar = star;
744
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
745
+ extglobStar = globstar(opts);
746
+ }
747
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
748
+ output = token.close = `)$))${extglobStar}`;
749
+ }
750
+ if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
751
+ const expression = parse(rest, {
752
+ ...options,
753
+ fastpaths: false
754
+ }).output;
755
+ output = token.close = `)${expression})${extglobStar})`;
756
+ }
757
+ if (token.prev.type === "bos") {
758
+ state.negatedExtglob = true;
759
+ }
760
+ }
761
+ push({
762
+ type: "paren",
763
+ extglob: true,
764
+ value,
765
+ output
766
+ });
767
+ decrement("parens");
768
+ };
769
+ /**
770
+ * Fast paths
771
+ */
772
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
773
+ let backslashes = false;
774
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
775
+ if (first === "\\") {
776
+ backslashes = true;
777
+ return m;
778
+ }
779
+ if (first === "?") {
780
+ if (esc) {
781
+ return esc + first + (rest ? QMARK.repeat(rest.length) : "");
782
+ }
783
+ if (index === 0) {
784
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
785
+ }
786
+ return QMARK.repeat(chars.length);
787
+ }
788
+ if (first === ".") {
789
+ return DOT_LITERAL.repeat(chars.length);
790
+ }
791
+ if (first === "*") {
792
+ if (esc) {
793
+ return esc + first + (rest ? star : "");
794
+ }
795
+ return star;
796
+ }
797
+ return esc ? m : `\\${m}`;
798
+ });
799
+ if (backslashes === true) {
800
+ if (opts.unescape === true) {
801
+ output = output.replace(/\\/g, "");
802
+ } else {
803
+ output = output.replace(/\\+/g, (m) => {
804
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
805
+ });
806
+ }
807
+ }
808
+ if (output === input && opts.contains === true) {
809
+ state.output = input;
810
+ return state;
811
+ }
812
+ state.output = utils.wrapOutput(output, state, options);
813
+ return state;
814
+ }
815
+ /**
816
+ * Tokenize input until we reach end-of-string
817
+ */
818
+ while (!eos()) {
819
+ value = advance();
820
+ if (value === "\0") {
821
+ continue;
822
+ }
823
+ /**
824
+ * Escaped characters
825
+ */
826
+ if (value === "\\") {
827
+ const next = peek();
828
+ if (next === "/" && opts.bash !== true) {
829
+ continue;
830
+ }
831
+ if (next === "." || next === ";") {
832
+ continue;
833
+ }
834
+ if (!next) {
835
+ value += "\\";
836
+ push({
837
+ type: "text",
838
+ value
839
+ });
840
+ continue;
841
+ }
842
+ const match = /^\\+/.exec(remaining());
843
+ let slashes = 0;
844
+ if (match && match[0].length > 2) {
845
+ slashes = match[0].length;
846
+ state.index += slashes;
847
+ if (slashes % 2 !== 0) {
848
+ value += "\\";
849
+ }
850
+ }
851
+ if (opts.unescape === true) {
852
+ value = advance();
853
+ } else {
854
+ value += advance();
855
+ }
856
+ if (state.brackets === 0) {
857
+ push({
858
+ type: "text",
859
+ value
860
+ });
861
+ continue;
862
+ }
863
+ }
864
+ /**
865
+ * If we're inside a regex character class, continue
866
+ * until we reach the closing bracket.
867
+ */
868
+ if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
869
+ if (opts.posix !== false && value === ":") {
870
+ const inner = prev.value.slice(1);
871
+ if (inner.includes("[")) {
872
+ prev.posix = true;
873
+ if (inner.includes(":")) {
874
+ const idx = prev.value.lastIndexOf("[");
875
+ const pre = prev.value.slice(0, idx);
876
+ const rest = prev.value.slice(idx + 2);
877
+ const posix = POSIX_REGEX_SOURCE[rest];
878
+ if (posix) {
879
+ prev.value = pre + posix;
880
+ state.backtrack = true;
881
+ advance();
882
+ if (!bos.output && tokens.indexOf(prev) === 1) {
883
+ bos.output = ONE_CHAR;
884
+ }
885
+ continue;
886
+ }
887
+ }
888
+ }
889
+ }
890
+ if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
891
+ value = `\\${value}`;
892
+ }
893
+ if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
894
+ value = `\\${value}`;
895
+ }
896
+ if (opts.posix === true && value === "!" && prev.value === "[") {
897
+ value = "^";
898
+ }
899
+ prev.value += value;
900
+ append({ value });
901
+ continue;
902
+ }
903
+ /**
904
+ * If we're inside a quoted string, continue
905
+ * until we reach the closing double quote.
906
+ */
907
+ if (state.quotes === 1 && value !== "\"") {
908
+ value = utils.escapeRegex(value);
909
+ prev.value += value;
910
+ append({ value });
911
+ continue;
912
+ }
913
+ /**
914
+ * Double quotes
915
+ */
916
+ if (value === "\"") {
917
+ state.quotes = state.quotes === 1 ? 0 : 1;
918
+ if (opts.keepQuotes === true) {
919
+ push({
920
+ type: "text",
921
+ value
922
+ });
923
+ }
924
+ continue;
925
+ }
926
+ /**
927
+ * Parentheses
928
+ */
929
+ if (value === "(") {
930
+ increment("parens");
931
+ push({
932
+ type: "paren",
933
+ value
934
+ });
935
+ continue;
936
+ }
937
+ if (value === ")") {
938
+ if (state.parens === 0 && opts.strictBrackets === true) {
939
+ throw new SyntaxError(syntaxError("opening", "("));
940
+ }
941
+ const extglob = extglobs[extglobs.length - 1];
942
+ if (extglob && state.parens === extglob.parens + 1) {
943
+ extglobClose(extglobs.pop());
944
+ continue;
945
+ }
946
+ push({
947
+ type: "paren",
948
+ value,
949
+ output: state.parens ? ")" : "\\)"
950
+ });
951
+ decrement("parens");
952
+ continue;
953
+ }
954
+ /**
955
+ * Square brackets
956
+ */
957
+ if (value === "[") {
958
+ if (opts.nobracket === true || !remaining().includes("]")) {
959
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
960
+ throw new SyntaxError(syntaxError("closing", "]"));
961
+ }
962
+ value = `\\${value}`;
963
+ } else {
964
+ increment("brackets");
965
+ }
966
+ push({
967
+ type: "bracket",
968
+ value
969
+ });
970
+ continue;
971
+ }
972
+ if (value === "]") {
973
+ if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
974
+ push({
975
+ type: "text",
976
+ value,
977
+ output: `\\${value}`
978
+ });
979
+ continue;
980
+ }
981
+ if (state.brackets === 0) {
982
+ if (opts.strictBrackets === true) {
983
+ throw new SyntaxError(syntaxError("opening", "["));
984
+ }
985
+ push({
986
+ type: "text",
987
+ value,
988
+ output: `\\${value}`
989
+ });
990
+ continue;
991
+ }
992
+ decrement("brackets");
993
+ const prevValue = prev.value.slice(1);
994
+ if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
995
+ value = `/${value}`;
996
+ }
997
+ prev.value += value;
998
+ append({ value });
999
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
1000
+ continue;
1001
+ }
1002
+ const escaped = utils.escapeRegex(prev.value);
1003
+ state.output = state.output.slice(0, -prev.value.length);
1004
+ if (opts.literalBrackets === true) {
1005
+ state.output += escaped;
1006
+ prev.value = escaped;
1007
+ continue;
1008
+ }
1009
+ prev.value = `(${capture}${escaped}|${prev.value})`;
1010
+ state.output += prev.value;
1011
+ continue;
1012
+ }
1013
+ /**
1014
+ * Braces
1015
+ */
1016
+ if (value === "{" && opts.nobrace !== true) {
1017
+ increment("braces");
1018
+ const open = {
1019
+ type: "brace",
1020
+ value,
1021
+ output: "(",
1022
+ outputIndex: state.output.length,
1023
+ tokensIndex: state.tokens.length
1024
+ };
1025
+ braces.push(open);
1026
+ push(open);
1027
+ continue;
1028
+ }
1029
+ if (value === "}") {
1030
+ const brace = braces[braces.length - 1];
1031
+ if (opts.nobrace === true || !brace) {
1032
+ push({
1033
+ type: "text",
1034
+ value,
1035
+ output: value
1036
+ });
1037
+ continue;
1038
+ }
1039
+ let output = ")";
1040
+ if (brace.dots === true) {
1041
+ const arr = tokens.slice();
1042
+ const range = [];
1043
+ for (let i = arr.length - 1; i >= 0; i--) {
1044
+ tokens.pop();
1045
+ if (arr[i].type === "brace") {
1046
+ break;
1047
+ }
1048
+ if (arr[i].type !== "dots") {
1049
+ range.unshift(arr[i].value);
1050
+ }
1051
+ }
1052
+ output = expandRange(range, opts);
1053
+ state.backtrack = true;
1054
+ }
1055
+ if (brace.comma !== true && brace.dots !== true) {
1056
+ const out = state.output.slice(0, brace.outputIndex);
1057
+ const toks = state.tokens.slice(brace.tokensIndex);
1058
+ brace.value = brace.output = "\\{";
1059
+ value = output = "\\}";
1060
+ state.output = out;
1061
+ for (const t of toks) {
1062
+ state.output += t.output || t.value;
1063
+ }
1064
+ }
1065
+ push({
1066
+ type: "brace",
1067
+ value,
1068
+ output
1069
+ });
1070
+ decrement("braces");
1071
+ braces.pop();
1072
+ continue;
1073
+ }
1074
+ /**
1075
+ * Pipes
1076
+ */
1077
+ if (value === "|") {
1078
+ if (extglobs.length > 0) {
1079
+ extglobs[extglobs.length - 1].conditions++;
1080
+ }
1081
+ push({
1082
+ type: "text",
1083
+ value
1084
+ });
1085
+ continue;
1086
+ }
1087
+ /**
1088
+ * Commas
1089
+ */
1090
+ if (value === ",") {
1091
+ let output = value;
1092
+ const brace = braces[braces.length - 1];
1093
+ if (brace && stack[stack.length - 1] === "braces") {
1094
+ brace.comma = true;
1095
+ output = "|";
1096
+ }
1097
+ push({
1098
+ type: "comma",
1099
+ value,
1100
+ output
1101
+ });
1102
+ continue;
1103
+ }
1104
+ /**
1105
+ * Slashes
1106
+ */
1107
+ if (value === "/") {
1108
+ if (prev.type === "dot" && state.index === state.start + 1) {
1109
+ state.start = state.index + 1;
1110
+ state.consumed = "";
1111
+ state.output = "";
1112
+ tokens.pop();
1113
+ prev = bos;
1114
+ continue;
1115
+ }
1116
+ push({
1117
+ type: "slash",
1118
+ value,
1119
+ output: SLASH_LITERAL
1120
+ });
1121
+ continue;
1122
+ }
1123
+ /**
1124
+ * Dots
1125
+ */
1126
+ if (value === ".") {
1127
+ if (state.braces > 0 && prev.type === "dot") {
1128
+ if (prev.value === ".") prev.output = DOT_LITERAL;
1129
+ const brace = braces[braces.length - 1];
1130
+ prev.type = "dots";
1131
+ prev.output += value;
1132
+ prev.value += value;
1133
+ brace.dots = true;
1134
+ continue;
1135
+ }
1136
+ if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
1137
+ push({
1138
+ type: "text",
1139
+ value,
1140
+ output: DOT_LITERAL
1141
+ });
1142
+ continue;
1143
+ }
1144
+ push({
1145
+ type: "dot",
1146
+ value,
1147
+ output: DOT_LITERAL
1148
+ });
1149
+ continue;
1150
+ }
1151
+ /**
1152
+ * Question marks
1153
+ */
1154
+ if (value === "?") {
1155
+ const isGroup = prev && prev.value === "(";
1156
+ if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1157
+ extglobOpen("qmark", value);
1158
+ continue;
1159
+ }
1160
+ if (prev && prev.type === "paren") {
1161
+ const next = peek();
1162
+ let output = value;
1163
+ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
1164
+ output = `\\${value}`;
1165
+ }
1166
+ push({
1167
+ type: "text",
1168
+ value,
1169
+ output
1170
+ });
1171
+ continue;
1172
+ }
1173
+ if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
1174
+ push({
1175
+ type: "qmark",
1176
+ value,
1177
+ output: QMARK_NO_DOT
1178
+ });
1179
+ continue;
1180
+ }
1181
+ push({
1182
+ type: "qmark",
1183
+ value,
1184
+ output: QMARK
1185
+ });
1186
+ continue;
1187
+ }
1188
+ /**
1189
+ * Exclamation
1190
+ */
1191
+ if (value === "!") {
1192
+ if (opts.noextglob !== true && peek() === "(") {
1193
+ if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
1194
+ extglobOpen("negate", value);
1195
+ continue;
1196
+ }
1197
+ }
1198
+ if (opts.nonegate !== true && state.index === 0) {
1199
+ negate();
1200
+ continue;
1201
+ }
1202
+ }
1203
+ /**
1204
+ * Plus
1205
+ */
1206
+ if (value === "+") {
1207
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1208
+ extglobOpen("plus", value);
1209
+ continue;
1210
+ }
1211
+ if (prev && prev.value === "(" || opts.regex === false) {
1212
+ push({
1213
+ type: "plus",
1214
+ value,
1215
+ output: PLUS_LITERAL
1216
+ });
1217
+ continue;
1218
+ }
1219
+ if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
1220
+ push({
1221
+ type: "plus",
1222
+ value
1223
+ });
1224
+ continue;
1225
+ }
1226
+ push({
1227
+ type: "plus",
1228
+ value: PLUS_LITERAL
1229
+ });
1230
+ continue;
1231
+ }
1232
+ /**
1233
+ * Plain text
1234
+ */
1235
+ if (value === "@") {
1236
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1237
+ push({
1238
+ type: "at",
1239
+ extglob: true,
1240
+ value,
1241
+ output: ""
1242
+ });
1243
+ continue;
1244
+ }
1245
+ push({
1246
+ type: "text",
1247
+ value
1248
+ });
1249
+ continue;
1250
+ }
1251
+ /**
1252
+ * Plain text
1253
+ */
1254
+ if (value !== "*") {
1255
+ if (value === "$" || value === "^") {
1256
+ value = `\\${value}`;
1257
+ }
1258
+ const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
1259
+ if (match) {
1260
+ value += match[0];
1261
+ state.index += match[0].length;
1262
+ }
1263
+ push({
1264
+ type: "text",
1265
+ value
1266
+ });
1267
+ continue;
1268
+ }
1269
+ /**
1270
+ * Stars
1271
+ */
1272
+ if (prev && (prev.type === "globstar" || prev.star === true)) {
1273
+ prev.type = "star";
1274
+ prev.star = true;
1275
+ prev.value += value;
1276
+ prev.output = star;
1277
+ state.backtrack = true;
1278
+ state.globstar = true;
1279
+ consume(value);
1280
+ continue;
1281
+ }
1282
+ let rest = remaining();
1283
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
1284
+ extglobOpen("star", value);
1285
+ continue;
1286
+ }
1287
+ if (prev.type === "star") {
1288
+ if (opts.noglobstar === true) {
1289
+ consume(value);
1290
+ continue;
1291
+ }
1292
+ const prior = prev.prev;
1293
+ const before = prior.prev;
1294
+ const isStart = prior.type === "slash" || prior.type === "bos";
1295
+ const afterStar = before && (before.type === "star" || before.type === "globstar");
1296
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
1297
+ push({
1298
+ type: "star",
1299
+ value,
1300
+ output: ""
1301
+ });
1302
+ continue;
1303
+ }
1304
+ const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
1305
+ const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
1306
+ if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
1307
+ push({
1308
+ type: "star",
1309
+ value,
1310
+ output: ""
1311
+ });
1312
+ continue;
1313
+ }
1314
+ while (rest.slice(0, 3) === "/**") {
1315
+ const after = input[state.index + 4];
1316
+ if (after && after !== "/") {
1317
+ break;
1318
+ }
1319
+ rest = rest.slice(3);
1320
+ consume("/**", 3);
1321
+ }
1322
+ if (prior.type === "bos" && eos()) {
1323
+ prev.type = "globstar";
1324
+ prev.value += value;
1325
+ prev.output = globstar(opts);
1326
+ state.output = prev.output;
1327
+ state.globstar = true;
1328
+ consume(value);
1329
+ continue;
1330
+ }
1331
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
1332
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
1333
+ prior.output = `(?:${prior.output}`;
1334
+ prev.type = "globstar";
1335
+ prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
1336
+ prev.value += value;
1337
+ state.globstar = true;
1338
+ state.output += prior.output + prev.output;
1339
+ consume(value);
1340
+ continue;
1341
+ }
1342
+ if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
1343
+ const end = rest[1] !== void 0 ? "|$" : "";
1344
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
1345
+ prior.output = `(?:${prior.output}`;
1346
+ prev.type = "globstar";
1347
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
1348
+ prev.value += value;
1349
+ state.output += prior.output + prev.output;
1350
+ state.globstar = true;
1351
+ consume(value + advance());
1352
+ push({
1353
+ type: "slash",
1354
+ value: "/",
1355
+ output: ""
1356
+ });
1357
+ continue;
1358
+ }
1359
+ if (prior.type === "bos" && rest[0] === "/") {
1360
+ prev.type = "globstar";
1361
+ prev.value += value;
1362
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
1363
+ state.output = prev.output;
1364
+ state.globstar = true;
1365
+ consume(value + advance());
1366
+ push({
1367
+ type: "slash",
1368
+ value: "/",
1369
+ output: ""
1370
+ });
1371
+ continue;
1372
+ }
1373
+ state.output = state.output.slice(0, -prev.output.length);
1374
+ prev.type = "globstar";
1375
+ prev.output = globstar(opts);
1376
+ prev.value += value;
1377
+ state.output += prev.output;
1378
+ state.globstar = true;
1379
+ consume(value);
1380
+ continue;
1381
+ }
1382
+ const token = {
1383
+ type: "star",
1384
+ value,
1385
+ output: star
1386
+ };
1387
+ if (opts.bash === true) {
1388
+ token.output = ".*?";
1389
+ if (prev.type === "bos" || prev.type === "slash") {
1390
+ token.output = nodot + token.output;
1391
+ }
1392
+ push(token);
1393
+ continue;
1394
+ }
1395
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
1396
+ token.output = value;
1397
+ push(token);
1398
+ continue;
1399
+ }
1400
+ if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
1401
+ if (prev.type === "dot") {
1402
+ state.output += NO_DOT_SLASH;
1403
+ prev.output += NO_DOT_SLASH;
1404
+ } else if (opts.dot === true) {
1405
+ state.output += NO_DOTS_SLASH;
1406
+ prev.output += NO_DOTS_SLASH;
1407
+ } else {
1408
+ state.output += nodot;
1409
+ prev.output += nodot;
1410
+ }
1411
+ if (peek() !== "*") {
1412
+ state.output += ONE_CHAR;
1413
+ prev.output += ONE_CHAR;
1414
+ }
1415
+ }
1416
+ push(token);
1417
+ }
1418
+ while (state.brackets > 0) {
1419
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
1420
+ state.output = utils.escapeLast(state.output, "[");
1421
+ decrement("brackets");
1422
+ }
1423
+ while (state.parens > 0) {
1424
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
1425
+ state.output = utils.escapeLast(state.output, "(");
1426
+ decrement("parens");
1427
+ }
1428
+ while (state.braces > 0) {
1429
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
1430
+ state.output = utils.escapeLast(state.output, "{");
1431
+ decrement("braces");
1432
+ }
1433
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
1434
+ push({
1435
+ type: "maybe_slash",
1436
+ value: "",
1437
+ output: `${SLASH_LITERAL}?`
1438
+ });
1439
+ }
1440
+ if (state.backtrack === true) {
1441
+ state.output = "";
1442
+ for (const token of state.tokens) {
1443
+ state.output += token.output != null ? token.output : token.value;
1444
+ if (token.suffix) {
1445
+ state.output += token.suffix;
1446
+ }
1447
+ }
1448
+ }
1449
+ return state;
1450
+ };
1451
+ /**
1452
+ * Fast paths for creating regular expressions for common glob patterns.
1453
+ * This can significantly speed up processing and has very little downside
1454
+ * impact when none of the fast paths match.
1455
+ */
1456
+ parse.fastpaths = (input, options) => {
1457
+ const opts = { ...options };
1458
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1459
+ const len = input.length;
1460
+ if (len > max) {
1461
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1462
+ }
1463
+ input = REPLACEMENTS[input] || input;
1464
+ const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(opts.windows);
1465
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
1466
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
1467
+ const capture = opts.capture ? "" : "?:";
1468
+ const state = {
1469
+ negated: false,
1470
+ prefix: ""
1471
+ };
1472
+ let star = opts.bash === true ? ".*?" : STAR;
1473
+ if (opts.capture) {
1474
+ star = `(${star})`;
1475
+ }
1476
+ const globstar = (opts) => {
1477
+ if (opts.noglobstar === true) return star;
1478
+ return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1479
+ };
1480
+ const create = (str) => {
1481
+ switch (str) {
1482
+ case "*": return `${nodot}${ONE_CHAR}${star}`;
1483
+ case ".*": return `${DOT_LITERAL}${ONE_CHAR}${star}`;
1484
+ case "*.*": return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1485
+ case "*/*": return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
1486
+ case "**": return nodot + globstar(opts);
1487
+ case "**/*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
1488
+ case "**/*.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
1489
+ case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
1490
+ default: {
1491
+ const match = /^(.*?)\.(\w+)$/.exec(str);
1492
+ if (!match) return;
1493
+ const source = create(match[1]);
1494
+ if (!source) return;
1495
+ return source + DOT_LITERAL + match[2];
1496
+ }
1497
+ }
1498
+ };
1499
+ const output = utils.removePrefix(input, state);
1500
+ let source = create(output);
1501
+ if (source && opts.strictSlashes !== true) {
1502
+ source += `${SLASH_LITERAL}?`;
1503
+ }
1504
+ return source;
1505
+ };
1506
+ module.exports = parse;
1507
+ }));
1508
+
1509
+ //#endregion
1510
+ //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js
1511
+ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1512
+ const scan = require_scan();
1513
+ const parse = require_parse();
1514
+ const utils = require_utils();
1515
+ const constants = require_constants();
1516
+ const isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
1517
+ /**
1518
+ * Creates a matcher function from one or more glob patterns. The
1519
+ * returned function takes a string to match as its first argument,
1520
+ * and returns true if the string is a match. The returned matcher
1521
+ * function also takes a boolean as the second argument that, when true,
1522
+ * returns an object with additional information.
1523
+ *
1524
+ * ```js
1525
+ * const picomatch = require('picomatch');
1526
+ * // picomatch(glob[, options]);
1527
+ *
1528
+ * const isMatch = picomatch('*.!(*a)');
1529
+ * console.log(isMatch('a.a')); //=> false
1530
+ * console.log(isMatch('a.b')); //=> true
1531
+ * ```
1532
+ * @name picomatch
1533
+ * @param {String|Array} `globs` One or more glob patterns.
1534
+ * @param {Object=} `options`
1535
+ * @return {Function=} Returns a matcher function.
1536
+ * @api public
1537
+ */
1538
+ const picomatch = (glob, options, returnState = false) => {
1539
+ if (Array.isArray(glob)) {
1540
+ const fns = glob.map((input) => picomatch(input, options, returnState));
1541
+ const arrayMatcher = (str) => {
1542
+ for (const isMatch of fns) {
1543
+ const state = isMatch(str);
1544
+ if (state) return state;
1545
+ }
1546
+ return false;
1547
+ };
1548
+ return arrayMatcher;
1549
+ }
1550
+ const isState = isObject(glob) && glob.tokens && glob.input;
1551
+ if (glob === "" || typeof glob !== "string" && !isState) {
1552
+ throw new TypeError("Expected pattern to be a non-empty string");
1553
+ }
1554
+ const opts = options || {};
1555
+ const posix = opts.windows;
1556
+ const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
1557
+ const state = regex.state;
1558
+ delete regex.state;
1559
+ let isIgnored = () => false;
1560
+ if (opts.ignore) {
1561
+ const ignoreOpts = {
1562
+ ...options,
1563
+ ignore: null,
1564
+ onMatch: null,
1565
+ onResult: null
1566
+ };
1567
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
1568
+ }
1569
+ const matcher = (input, returnObject = false) => {
1570
+ const { isMatch, match, output } = picomatch.test(input, regex, options, {
1571
+ glob,
1572
+ posix
1573
+ });
1574
+ const result = {
1575
+ glob,
1576
+ state,
1577
+ regex,
1578
+ posix,
1579
+ input,
1580
+ output,
1581
+ match,
1582
+ isMatch
1583
+ };
1584
+ if (typeof opts.onResult === "function") {
1585
+ opts.onResult(result);
1586
+ }
1587
+ if (isMatch === false) {
1588
+ result.isMatch = false;
1589
+ return returnObject ? result : false;
1590
+ }
1591
+ if (isIgnored(input)) {
1592
+ if (typeof opts.onIgnore === "function") {
1593
+ opts.onIgnore(result);
1594
+ }
1595
+ result.isMatch = false;
1596
+ return returnObject ? result : false;
1597
+ }
1598
+ if (typeof opts.onMatch === "function") {
1599
+ opts.onMatch(result);
1600
+ }
1601
+ return returnObject ? result : true;
1602
+ };
1603
+ if (returnState) {
1604
+ matcher.state = state;
1605
+ }
1606
+ return matcher;
1607
+ };
1608
+ /**
1609
+ * Test `input` with the given `regex`. This is used by the main
1610
+ * `picomatch()` function to test the input string.
1611
+ *
1612
+ * ```js
1613
+ * const picomatch = require('picomatch');
1614
+ * // picomatch.test(input, regex[, options]);
1615
+ *
1616
+ * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
1617
+ * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
1618
+ * ```
1619
+ * @param {String} `input` String to test.
1620
+ * @param {RegExp} `regex`
1621
+ * @return {Object} Returns an object with matching info.
1622
+ * @api public
1623
+ */
1624
+ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
1625
+ if (typeof input !== "string") {
1626
+ throw new TypeError("Expected input to be a string");
1627
+ }
1628
+ if (input === "") {
1629
+ return {
1630
+ isMatch: false,
1631
+ output: ""
1632
+ };
1633
+ }
1634
+ const opts = options || {};
1635
+ const format = opts.format || (posix ? utils.toPosixSlashes : null);
1636
+ let match = input === glob;
1637
+ let output = match && format ? format(input) : input;
1638
+ if (match === false) {
1639
+ output = format ? format(input) : input;
1640
+ match = output === glob;
1641
+ }
1642
+ if (match === false || opts.capture === true) {
1643
+ if (opts.matchBase === true || opts.basename === true) {
1644
+ match = picomatch.matchBase(input, regex, options, posix);
1645
+ } else {
1646
+ match = regex.exec(output);
1647
+ }
1648
+ }
1649
+ return {
1650
+ isMatch: Boolean(match),
1651
+ match,
1652
+ output
1653
+ };
1654
+ };
1655
+ /**
1656
+ * Match the basename of a filepath.
1657
+ *
1658
+ * ```js
1659
+ * const picomatch = require('picomatch');
1660
+ * // picomatch.matchBase(input, glob[, options]);
1661
+ * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
1662
+ * ```
1663
+ * @param {String} `input` String to test.
1664
+ * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
1665
+ * @return {Boolean}
1666
+ * @api public
1667
+ */
1668
+ picomatch.matchBase = (input, glob, options) => {
1669
+ const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
1670
+ return regex.test(utils.basename(input));
1671
+ };
1672
+ /**
1673
+ * Returns true if **any** of the given glob `patterns` match the specified `string`.
1674
+ *
1675
+ * ```js
1676
+ * const picomatch = require('picomatch');
1677
+ * // picomatch.isMatch(string, patterns[, options]);
1678
+ *
1679
+ * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
1680
+ * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
1681
+ * ```
1682
+ * @param {String|Array} str The string to test.
1683
+ * @param {String|Array} patterns One or more glob patterns to use for matching.
1684
+ * @param {Object} [options] See available [options](#options).
1685
+ * @return {Boolean} Returns true if any patterns match `str`
1686
+ * @api public
1687
+ */
1688
+ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
1689
+ /**
1690
+ * Parse a glob pattern to create the source string for a regular
1691
+ * expression.
1692
+ *
1693
+ * ```js
1694
+ * const picomatch = require('picomatch');
1695
+ * const result = picomatch.parse(pattern[, options]);
1696
+ * ```
1697
+ * @param {String} `pattern`
1698
+ * @param {Object} `options`
1699
+ * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
1700
+ * @api public
1701
+ */
1702
+ picomatch.parse = (pattern, options) => {
1703
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
1704
+ return parse(pattern, {
1705
+ ...options,
1706
+ fastpaths: false
1707
+ });
1708
+ };
1709
+ /**
1710
+ * Scan a glob pattern to separate the pattern into segments.
1711
+ *
1712
+ * ```js
1713
+ * const picomatch = require('picomatch');
1714
+ * // picomatch.scan(input[, options]);
1715
+ *
1716
+ * const result = picomatch.scan('!./foo/*.js');
1717
+ * console.log(result);
1718
+ * { prefix: '!./',
1719
+ * input: '!./foo/*.js',
1720
+ * start: 3,
1721
+ * base: 'foo',
1722
+ * glob: '*.js',
1723
+ * isBrace: false,
1724
+ * isBracket: false,
1725
+ * isGlob: true,
1726
+ * isExtglob: false,
1727
+ * isGlobstar: false,
1728
+ * negated: true }
1729
+ * ```
1730
+ * @param {String} `input` Glob pattern to scan.
1731
+ * @param {Object} `options`
1732
+ * @return {Object} Returns an object with
1733
+ * @api public
1734
+ */
1735
+ picomatch.scan = (input, options) => scan(input, options);
1736
+ /**
1737
+ * Compile a regular expression from the `state` object returned by the
1738
+ * [parse()](#parse) method.
1739
+ *
1740
+ * @param {Object} `state`
1741
+ * @param {Object} `options`
1742
+ * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
1743
+ * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
1744
+ * @return {RegExp}
1745
+ * @api public
1746
+ */
1747
+ picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
1748
+ if (returnOutput === true) {
1749
+ return state.output;
1750
+ }
1751
+ const opts = options || {};
1752
+ const prepend = opts.contains ? "" : "^";
1753
+ const append = opts.contains ? "" : "$";
1754
+ let source = `${prepend}(?:${state.output})${append}`;
1755
+ if (state && state.negated === true) {
1756
+ source = `^(?!${source}).*$`;
1757
+ }
1758
+ const regex = picomatch.toRegex(source, options);
1759
+ if (returnState === true) {
1760
+ regex.state = state;
1761
+ }
1762
+ return regex;
1763
+ };
1764
+ /**
1765
+ * Create a regular expression from a parsed glob pattern.
1766
+ *
1767
+ * ```js
1768
+ * const picomatch = require('picomatch');
1769
+ * const state = picomatch.parse('*.js');
1770
+ * // picomatch.compileRe(state[, options]);
1771
+ *
1772
+ * console.log(picomatch.compileRe(state));
1773
+ * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
1774
+ * ```
1775
+ * @param {String} `state` The object returned from the `.parse` method.
1776
+ * @param {Object} `options`
1777
+ * @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.
1778
+ * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
1779
+ * @return {RegExp} Returns a regex created from the given pattern.
1780
+ * @api public
1781
+ */
1782
+ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
1783
+ if (!input || typeof input !== "string") {
1784
+ throw new TypeError("Expected a non-empty string");
1785
+ }
1786
+ let parsed = {
1787
+ negated: false,
1788
+ fastpaths: true
1789
+ };
1790
+ if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
1791
+ parsed.output = parse.fastpaths(input, options);
1792
+ }
1793
+ if (!parsed.output) {
1794
+ parsed = parse(input, options);
1795
+ }
1796
+ return picomatch.compileRe(parsed, options, returnOutput, returnState);
1797
+ };
1798
+ /**
1799
+ * Create a regular expression from the given regex source string.
1800
+ *
1801
+ * ```js
1802
+ * const picomatch = require('picomatch');
1803
+ * // picomatch.toRegex(source[, options]);
1804
+ *
1805
+ * const { output } = picomatch.parse('*.js');
1806
+ * console.log(picomatch.toRegex(output));
1807
+ * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
1808
+ * ```
1809
+ * @param {String} `source` Regular expression source string.
1810
+ * @param {Object} `options`
1811
+ * @return {RegExp}
1812
+ * @api public
1813
+ */
1814
+ picomatch.toRegex = (source, options) => {
1815
+ try {
1816
+ const opts = options || {};
1817
+ return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
1818
+ } catch (err) {
1819
+ if (options && options.debug === true) throw err;
1820
+ return /$^/;
1821
+ }
1822
+ };
1823
+ /**
1824
+ * Picomatch constants.
1825
+ * @return {Object}
1826
+ */
1827
+ picomatch.constants = constants;
1828
+ /**
1829
+ * Expose "picomatch"
1830
+ */
1831
+ module.exports = picomatch;
1832
+ }));
1833
+
1834
+ //#endregion
1835
+ //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js
1836
+ var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1837
+ const pico = require_picomatch$1();
1838
+ const utils = require_utils();
1839
+ function picomatch(glob, options, returnState = false) {
1840
+ if (options && (options.windows === null || options.windows === undefined)) {
1841
+ options = {
1842
+ ...options,
1843
+ windows: utils.isWindows()
1844
+ };
1845
+ }
1846
+ return pico(glob, options, returnState);
1847
+ }
1848
+ Object.assign(picomatch, pico);
1849
+ module.exports = picomatch;
1850
+ }));
1851
+
1852
+ //#endregion
1853
+ export default require_picomatch();
1854
+
1855
+ export { require_picomatch as t };