vite-plugin-storybook-nextjs 1.1.2--canary.31.ce898c2.0 → 2.0.0--canary.33.a61ad85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/index.cjs +1961 -44
  2. package/dist/index.js +1958 -41
  3. package/dist/mocks/storybook.global.cjs +1945 -29
  4. package/dist/mocks/storybook.global.d.cts +1 -2
  5. package/dist/mocks/storybook.global.d.ts +1 -2
  6. package/dist/mocks/storybook.global.js +1944 -27
  7. package/dist/plugins/next-image/alias/next-image.d.cts +17 -17
  8. package/dist/plugins/next-image/alias/next-image.d.ts +17 -17
  9. package/dist/plugins/next-mocks/alias/cache/index.cjs +8 -2
  10. package/dist/plugins/next-mocks/alias/cache/index.d.cts +5 -1
  11. package/dist/plugins/next-mocks/alias/cache/index.d.ts +5 -1
  12. package/dist/plugins/next-mocks/alias/cache/index.js +2 -2
  13. package/dist/plugins/next-mocks/alias/headers/cookies.cjs +8 -8
  14. package/dist/plugins/next-mocks/alias/headers/cookies.js +7 -7
  15. package/dist/plugins/next-mocks/alias/headers/headers.cjs +1 -1
  16. package/dist/plugins/next-mocks/alias/headers/headers.js +1 -1
  17. package/dist/plugins/next-mocks/alias/headers/index.cjs +12 -8
  18. package/dist/plugins/next-mocks/alias/headers/index.d.cts +3 -2
  19. package/dist/plugins/next-mocks/alias/headers/index.d.ts +3 -2
  20. package/dist/plugins/next-mocks/alias/headers/index.js +8 -7
  21. package/dist/plugins/next-mocks/alias/navigation/index.cjs +1 -1
  22. package/dist/plugins/next-mocks/alias/navigation/index.d.cts +1 -1
  23. package/dist/plugins/next-mocks/alias/navigation/index.d.ts +1 -1
  24. package/dist/plugins/next-mocks/alias/navigation/index.js +1 -1
  25. package/dist/plugins/next-mocks/alias/router/index.cjs +1 -1
  26. package/dist/plugins/next-mocks/alias/router/index.d.cts +3 -4
  27. package/dist/plugins/next-mocks/alias/router/index.d.ts +3 -4
  28. package/dist/plugins/next-mocks/alias/router/index.js +1 -1
  29. package/dist/plugins/next-mocks/compatibility/draft-mode.compat.cjs +10 -0
  30. package/dist/plugins/next-mocks/compatibility/draft-mode.compat.d.cts +1 -0
  31. package/dist/plugins/next-mocks/compatibility/draft-mode.compat.d.ts +1 -0
  32. package/dist/plugins/next-mocks/compatibility/draft-mode.compat.js +1 -0
  33. package/package.json +13 -12
package/dist/index.cjs CHANGED
@@ -59,7 +59,1879 @@ var nextServerConfig__default = /*#__PURE__*/_interopDefault(nextServerConfig);
59
59
  var MagicString__default = /*#__PURE__*/_interopDefault(MagicString);
60
60
  var imageSizeOf__default = /*#__PURE__*/_interopDefault(imageSizeOf);
61
61
 
62
- // src/index.ts
62
+ var __create = Object.create;
63
+ var __defProp = Object.defineProperty;
64
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
65
+ var __getOwnPropNames = Object.getOwnPropertyNames;
66
+ var __getProtoOf = Object.getPrototypeOf;
67
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
68
+ var __commonJS = (cb, mod) => function __require() {
69
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
70
+ };
71
+ var __copyProps = (to, from, except, desc) => {
72
+ if (from && typeof from === "object" || typeof from === "function") {
73
+ for (let key of __getOwnPropNames(from))
74
+ if (!__hasOwnProp.call(to, key) && key !== except)
75
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
76
+ }
77
+ return to;
78
+ };
79
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
80
+ // If the importer is in node compatibility mode or this is not an ESM
81
+ // file that has been converted to a CommonJS file using a Babel-
82
+ // compatible transform (i.e. "__esModule" has not been set), then set
83
+ // "default" to the CommonJS "module.exports" for node compatibility.
84
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
85
+ mod
86
+ ));
87
+
88
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js
89
+ var require_constants = __commonJS({
90
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js"(exports, module) {
91
+ var SEMVER_SPEC_VERSION = "2.0.0";
92
+ var MAX_LENGTH = 256;
93
+ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
94
+ 9007199254740991;
95
+ var MAX_SAFE_COMPONENT_LENGTH = 16;
96
+ var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
97
+ var RELEASE_TYPES = [
98
+ "major",
99
+ "premajor",
100
+ "minor",
101
+ "preminor",
102
+ "patch",
103
+ "prepatch",
104
+ "prerelease"
105
+ ];
106
+ module.exports = {
107
+ MAX_LENGTH,
108
+ MAX_SAFE_COMPONENT_LENGTH,
109
+ MAX_SAFE_BUILD_LENGTH,
110
+ MAX_SAFE_INTEGER,
111
+ RELEASE_TYPES,
112
+ SEMVER_SPEC_VERSION,
113
+ FLAG_INCLUDE_PRERELEASE: 1,
114
+ FLAG_LOOSE: 2
115
+ };
116
+ }
117
+ });
118
+
119
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js
120
+ var require_debug = __commonJS({
121
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js"(exports, module) {
122
+ var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
123
+ };
124
+ module.exports = debug;
125
+ }
126
+ });
127
+
128
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js
129
+ var require_re = __commonJS({
130
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js"(exports, module) {
131
+ var {
132
+ MAX_SAFE_COMPONENT_LENGTH,
133
+ MAX_SAFE_BUILD_LENGTH,
134
+ MAX_LENGTH
135
+ } = require_constants();
136
+ var debug = require_debug();
137
+ exports = module.exports = {};
138
+ var re = exports.re = [];
139
+ var safeRe = exports.safeRe = [];
140
+ var src = exports.src = [];
141
+ var t = exports.t = {};
142
+ var R = 0;
143
+ var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
144
+ var safeRegexReplacements = [
145
+ ["\\s", 1],
146
+ ["\\d", MAX_LENGTH],
147
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
148
+ ];
149
+ var makeSafeRegex = (value) => {
150
+ for (const [token, max] of safeRegexReplacements) {
151
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
152
+ }
153
+ return value;
154
+ };
155
+ var createToken = (name, value, isGlobal) => {
156
+ const safe = makeSafeRegex(value);
157
+ const index = R++;
158
+ debug(name, index, value);
159
+ t[name] = index;
160
+ src[index] = value;
161
+ re[index] = new RegExp(value, isGlobal ? "g" : void 0);
162
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
163
+ };
164
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
165
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
166
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
167
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
168
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
169
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
170
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
171
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
172
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
173
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
174
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
175
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
176
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
177
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
178
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
179
+ createToken("GTLT", "((?:<|>)?=?)");
180
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
181
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
182
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
183
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
184
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
185
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
186
+ createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
187
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
188
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
189
+ createToken("COERCERTL", src[t.COERCE], true);
190
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
191
+ createToken("LONETILDE", "(?:~>?)");
192
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
193
+ exports.tildeTrimReplace = "$1~";
194
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
195
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
196
+ createToken("LONECARET", "(?:\\^)");
197
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
198
+ exports.caretTrimReplace = "$1^";
199
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
200
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
201
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
202
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
203
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
204
+ exports.comparatorTrimReplace = "$1$2$3";
205
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
206
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
207
+ createToken("STAR", "(<|>)?=?\\s*\\*");
208
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
209
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
210
+ }
211
+ });
212
+
213
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js
214
+ var require_parse_options = __commonJS({
215
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js"(exports, module) {
216
+ var looseOption = Object.freeze({ loose: true });
217
+ var emptyOpts = Object.freeze({});
218
+ var parseOptions = (options) => {
219
+ if (!options) {
220
+ return emptyOpts;
221
+ }
222
+ if (typeof options !== "object") {
223
+ return looseOption;
224
+ }
225
+ return options;
226
+ };
227
+ module.exports = parseOptions;
228
+ }
229
+ });
230
+
231
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js
232
+ var require_identifiers = __commonJS({
233
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js"(exports, module) {
234
+ var numeric = /^[0-9]+$/;
235
+ var compareIdentifiers = (a, b) => {
236
+ const anum = numeric.test(a);
237
+ const bnum = numeric.test(b);
238
+ if (anum && bnum) {
239
+ a = +a;
240
+ b = +b;
241
+ }
242
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
243
+ };
244
+ var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
245
+ module.exports = {
246
+ compareIdentifiers,
247
+ rcompareIdentifiers
248
+ };
249
+ }
250
+ });
251
+
252
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js
253
+ var require_semver = __commonJS({
254
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js"(exports, module) {
255
+ var debug = require_debug();
256
+ var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
257
+ var { safeRe: re, t } = require_re();
258
+ var parseOptions = require_parse_options();
259
+ var { compareIdentifiers } = require_identifiers();
260
+ var SemVer = class _SemVer {
261
+ constructor(version, options) {
262
+ options = parseOptions(options);
263
+ if (version instanceof _SemVer) {
264
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
265
+ return version;
266
+ } else {
267
+ version = version.version;
268
+ }
269
+ } else if (typeof version !== "string") {
270
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
271
+ }
272
+ if (version.length > MAX_LENGTH) {
273
+ throw new TypeError(
274
+ `version is longer than ${MAX_LENGTH} characters`
275
+ );
276
+ }
277
+ debug("SemVer", version, options);
278
+ this.options = options;
279
+ this.loose = !!options.loose;
280
+ this.includePrerelease = !!options.includePrerelease;
281
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
282
+ if (!m) {
283
+ throw new TypeError(`Invalid Version: ${version}`);
284
+ }
285
+ this.raw = version;
286
+ this.major = +m[1];
287
+ this.minor = +m[2];
288
+ this.patch = +m[3];
289
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
290
+ throw new TypeError("Invalid major version");
291
+ }
292
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
293
+ throw new TypeError("Invalid minor version");
294
+ }
295
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
296
+ throw new TypeError("Invalid patch version");
297
+ }
298
+ if (!m[4]) {
299
+ this.prerelease = [];
300
+ } else {
301
+ this.prerelease = m[4].split(".").map((id) => {
302
+ if (/^[0-9]+$/.test(id)) {
303
+ const num = +id;
304
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
305
+ return num;
306
+ }
307
+ }
308
+ return id;
309
+ });
310
+ }
311
+ this.build = m[5] ? m[5].split(".") : [];
312
+ this.format();
313
+ }
314
+ format() {
315
+ this.version = `${this.major}.${this.minor}.${this.patch}`;
316
+ if (this.prerelease.length) {
317
+ this.version += `-${this.prerelease.join(".")}`;
318
+ }
319
+ return this.version;
320
+ }
321
+ toString() {
322
+ return this.version;
323
+ }
324
+ compare(other) {
325
+ debug("SemVer.compare", this.version, this.options, other);
326
+ if (!(other instanceof _SemVer)) {
327
+ if (typeof other === "string" && other === this.version) {
328
+ return 0;
329
+ }
330
+ other = new _SemVer(other, this.options);
331
+ }
332
+ if (other.version === this.version) {
333
+ return 0;
334
+ }
335
+ return this.compareMain(other) || this.comparePre(other);
336
+ }
337
+ compareMain(other) {
338
+ if (!(other instanceof _SemVer)) {
339
+ other = new _SemVer(other, this.options);
340
+ }
341
+ return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
342
+ }
343
+ comparePre(other) {
344
+ if (!(other instanceof _SemVer)) {
345
+ other = new _SemVer(other, this.options);
346
+ }
347
+ if (this.prerelease.length && !other.prerelease.length) {
348
+ return -1;
349
+ } else if (!this.prerelease.length && other.prerelease.length) {
350
+ return 1;
351
+ } else if (!this.prerelease.length && !other.prerelease.length) {
352
+ return 0;
353
+ }
354
+ let i = 0;
355
+ do {
356
+ const a = this.prerelease[i];
357
+ const b = other.prerelease[i];
358
+ debug("prerelease compare", i, a, b);
359
+ if (a === void 0 && b === void 0) {
360
+ return 0;
361
+ } else if (b === void 0) {
362
+ return 1;
363
+ } else if (a === void 0) {
364
+ return -1;
365
+ } else if (a === b) {
366
+ continue;
367
+ } else {
368
+ return compareIdentifiers(a, b);
369
+ }
370
+ } while (++i);
371
+ }
372
+ compareBuild(other) {
373
+ if (!(other instanceof _SemVer)) {
374
+ other = new _SemVer(other, this.options);
375
+ }
376
+ let i = 0;
377
+ do {
378
+ const a = this.build[i];
379
+ const b = other.build[i];
380
+ debug("build compare", i, a, b);
381
+ if (a === void 0 && b === void 0) {
382
+ return 0;
383
+ } else if (b === void 0) {
384
+ return 1;
385
+ } else if (a === void 0) {
386
+ return -1;
387
+ } else if (a === b) {
388
+ continue;
389
+ } else {
390
+ return compareIdentifiers(a, b);
391
+ }
392
+ } while (++i);
393
+ }
394
+ // preminor will bump the version up to the next minor release, and immediately
395
+ // down to pre-release. premajor and prepatch work the same way.
396
+ inc(release, identifier, identifierBase) {
397
+ switch (release) {
398
+ case "premajor":
399
+ this.prerelease.length = 0;
400
+ this.patch = 0;
401
+ this.minor = 0;
402
+ this.major++;
403
+ this.inc("pre", identifier, identifierBase);
404
+ break;
405
+ case "preminor":
406
+ this.prerelease.length = 0;
407
+ this.patch = 0;
408
+ this.minor++;
409
+ this.inc("pre", identifier, identifierBase);
410
+ break;
411
+ case "prepatch":
412
+ this.prerelease.length = 0;
413
+ this.inc("patch", identifier, identifierBase);
414
+ this.inc("pre", identifier, identifierBase);
415
+ break;
416
+ // If the input is a non-prerelease version, this acts the same as
417
+ // prepatch.
418
+ case "prerelease":
419
+ if (this.prerelease.length === 0) {
420
+ this.inc("patch", identifier, identifierBase);
421
+ }
422
+ this.inc("pre", identifier, identifierBase);
423
+ break;
424
+ case "major":
425
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
426
+ this.major++;
427
+ }
428
+ this.minor = 0;
429
+ this.patch = 0;
430
+ this.prerelease = [];
431
+ break;
432
+ case "minor":
433
+ if (this.patch !== 0 || this.prerelease.length === 0) {
434
+ this.minor++;
435
+ }
436
+ this.patch = 0;
437
+ this.prerelease = [];
438
+ break;
439
+ case "patch":
440
+ if (this.prerelease.length === 0) {
441
+ this.patch++;
442
+ }
443
+ this.prerelease = [];
444
+ break;
445
+ // This probably shouldn't be used publicly.
446
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
447
+ case "pre": {
448
+ const base = Number(identifierBase) ? 1 : 0;
449
+ if (!identifier && identifierBase === false) {
450
+ throw new Error("invalid increment argument: identifier is empty");
451
+ }
452
+ if (this.prerelease.length === 0) {
453
+ this.prerelease = [base];
454
+ } else {
455
+ let i = this.prerelease.length;
456
+ while (--i >= 0) {
457
+ if (typeof this.prerelease[i] === "number") {
458
+ this.prerelease[i]++;
459
+ i = -2;
460
+ }
461
+ }
462
+ if (i === -1) {
463
+ if (identifier === this.prerelease.join(".") && identifierBase === false) {
464
+ throw new Error("invalid increment argument: identifier already exists");
465
+ }
466
+ this.prerelease.push(base);
467
+ }
468
+ }
469
+ if (identifier) {
470
+ let prerelease = [identifier, base];
471
+ if (identifierBase === false) {
472
+ prerelease = [identifier];
473
+ }
474
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
475
+ if (isNaN(this.prerelease[1])) {
476
+ this.prerelease = prerelease;
477
+ }
478
+ } else {
479
+ this.prerelease = prerelease;
480
+ }
481
+ }
482
+ break;
483
+ }
484
+ default:
485
+ throw new Error(`invalid increment argument: ${release}`);
486
+ }
487
+ this.raw = this.format();
488
+ if (this.build.length) {
489
+ this.raw += `+${this.build.join(".")}`;
490
+ }
491
+ return this;
492
+ }
493
+ };
494
+ module.exports = SemVer;
495
+ }
496
+ });
497
+
498
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js
499
+ var require_parse = __commonJS({
500
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js"(exports, module) {
501
+ var SemVer = require_semver();
502
+ var parse = (version, options, throwErrors = false) => {
503
+ if (version instanceof SemVer) {
504
+ return version;
505
+ }
506
+ try {
507
+ return new SemVer(version, options);
508
+ } catch (er) {
509
+ if (!throwErrors) {
510
+ return null;
511
+ }
512
+ throw er;
513
+ }
514
+ };
515
+ module.exports = parse;
516
+ }
517
+ });
518
+
519
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js
520
+ var require_valid = __commonJS({
521
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js"(exports, module) {
522
+ var parse = require_parse();
523
+ var valid = (version, options) => {
524
+ const v = parse(version, options);
525
+ return v ? v.version : null;
526
+ };
527
+ module.exports = valid;
528
+ }
529
+ });
530
+
531
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js
532
+ var require_clean = __commonJS({
533
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js"(exports, module) {
534
+ var parse = require_parse();
535
+ var clean = (version, options) => {
536
+ const s = parse(version.trim().replace(/^[=v]+/, ""), options);
537
+ return s ? s.version : null;
538
+ };
539
+ module.exports = clean;
540
+ }
541
+ });
542
+
543
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/inc.js
544
+ var require_inc = __commonJS({
545
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/inc.js"(exports, module) {
546
+ var SemVer = require_semver();
547
+ var inc = (version, release, options, identifier, identifierBase) => {
548
+ if (typeof options === "string") {
549
+ identifierBase = identifier;
550
+ identifier = options;
551
+ options = void 0;
552
+ }
553
+ try {
554
+ return new SemVer(
555
+ version instanceof SemVer ? version.version : version,
556
+ options
557
+ ).inc(release, identifier, identifierBase).version;
558
+ } catch (er) {
559
+ return null;
560
+ }
561
+ };
562
+ module.exports = inc;
563
+ }
564
+ });
565
+
566
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/diff.js
567
+ var require_diff = __commonJS({
568
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/diff.js"(exports, module) {
569
+ var parse = require_parse();
570
+ var diff = (version1, version2) => {
571
+ const v1 = parse(version1, null, true);
572
+ const v2 = parse(version2, null, true);
573
+ const comparison = v1.compare(v2);
574
+ if (comparison === 0) {
575
+ return null;
576
+ }
577
+ const v1Higher = comparison > 0;
578
+ const highVersion = v1Higher ? v1 : v2;
579
+ const lowVersion = v1Higher ? v2 : v1;
580
+ const highHasPre = !!highVersion.prerelease.length;
581
+ const lowHasPre = !!lowVersion.prerelease.length;
582
+ if (lowHasPre && !highHasPre) {
583
+ if (!lowVersion.patch && !lowVersion.minor) {
584
+ return "major";
585
+ }
586
+ if (highVersion.patch) {
587
+ return "patch";
588
+ }
589
+ if (highVersion.minor) {
590
+ return "minor";
591
+ }
592
+ return "major";
593
+ }
594
+ const prefix = highHasPre ? "pre" : "";
595
+ if (v1.major !== v2.major) {
596
+ return prefix + "major";
597
+ }
598
+ if (v1.minor !== v2.minor) {
599
+ return prefix + "minor";
600
+ }
601
+ if (v1.patch !== v2.patch) {
602
+ return prefix + "patch";
603
+ }
604
+ return "prerelease";
605
+ };
606
+ module.exports = diff;
607
+ }
608
+ });
609
+
610
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/major.js
611
+ var require_major = __commonJS({
612
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/major.js"(exports, module) {
613
+ var SemVer = require_semver();
614
+ var major = (a, loose) => new SemVer(a, loose).major;
615
+ module.exports = major;
616
+ }
617
+ });
618
+
619
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/minor.js
620
+ var require_minor = __commonJS({
621
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/minor.js"(exports, module) {
622
+ var SemVer = require_semver();
623
+ var minor = (a, loose) => new SemVer(a, loose).minor;
624
+ module.exports = minor;
625
+ }
626
+ });
627
+
628
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/patch.js
629
+ var require_patch = __commonJS({
630
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/patch.js"(exports, module) {
631
+ var SemVer = require_semver();
632
+ var patch = (a, loose) => new SemVer(a, loose).patch;
633
+ module.exports = patch;
634
+ }
635
+ });
636
+
637
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/prerelease.js
638
+ var require_prerelease = __commonJS({
639
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/prerelease.js"(exports, module) {
640
+ var parse = require_parse();
641
+ var prerelease = (version, options) => {
642
+ const parsed = parse(version, options);
643
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
644
+ };
645
+ module.exports = prerelease;
646
+ }
647
+ });
648
+
649
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare.js
650
+ var require_compare = __commonJS({
651
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare.js"(exports, module) {
652
+ var SemVer = require_semver();
653
+ var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
654
+ module.exports = compare;
655
+ }
656
+ });
657
+
658
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rcompare.js
659
+ var require_rcompare = __commonJS({
660
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rcompare.js"(exports, module) {
661
+ var compare = require_compare();
662
+ var rcompare = (a, b, loose) => compare(b, a, loose);
663
+ module.exports = rcompare;
664
+ }
665
+ });
666
+
667
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-loose.js
668
+ var require_compare_loose = __commonJS({
669
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-loose.js"(exports, module) {
670
+ var compare = require_compare();
671
+ var compareLoose = (a, b) => compare(a, b, true);
672
+ module.exports = compareLoose;
673
+ }
674
+ });
675
+
676
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-build.js
677
+ var require_compare_build = __commonJS({
678
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-build.js"(exports, module) {
679
+ var SemVer = require_semver();
680
+ var compareBuild = (a, b, loose) => {
681
+ const versionA = new SemVer(a, loose);
682
+ const versionB = new SemVer(b, loose);
683
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
684
+ };
685
+ module.exports = compareBuild;
686
+ }
687
+ });
688
+
689
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/sort.js
690
+ var require_sort = __commonJS({
691
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/sort.js"(exports, module) {
692
+ var compareBuild = require_compare_build();
693
+ var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
694
+ module.exports = sort;
695
+ }
696
+ });
697
+
698
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rsort.js
699
+ var require_rsort = __commonJS({
700
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rsort.js"(exports, module) {
701
+ var compareBuild = require_compare_build();
702
+ var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
703
+ module.exports = rsort;
704
+ }
705
+ });
706
+
707
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gt.js
708
+ var require_gt = __commonJS({
709
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gt.js"(exports, module) {
710
+ var compare = require_compare();
711
+ var gt = (a, b, loose) => compare(a, b, loose) > 0;
712
+ module.exports = gt;
713
+ }
714
+ });
715
+
716
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lt.js
717
+ var require_lt = __commonJS({
718
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lt.js"(exports, module) {
719
+ var compare = require_compare();
720
+ var lt = (a, b, loose) => compare(a, b, loose) < 0;
721
+ module.exports = lt;
722
+ }
723
+ });
724
+
725
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/eq.js
726
+ var require_eq = __commonJS({
727
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/eq.js"(exports, module) {
728
+ var compare = require_compare();
729
+ var eq = (a, b, loose) => compare(a, b, loose) === 0;
730
+ module.exports = eq;
731
+ }
732
+ });
733
+
734
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/neq.js
735
+ var require_neq = __commonJS({
736
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/neq.js"(exports, module) {
737
+ var compare = require_compare();
738
+ var neq = (a, b, loose) => compare(a, b, loose) !== 0;
739
+ module.exports = neq;
740
+ }
741
+ });
742
+
743
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gte.js
744
+ var require_gte = __commonJS({
745
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gte.js"(exports, module) {
746
+ var compare = require_compare();
747
+ var gte = (a, b, loose) => compare(a, b, loose) >= 0;
748
+ module.exports = gte;
749
+ }
750
+ });
751
+
752
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lte.js
753
+ var require_lte = __commonJS({
754
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lte.js"(exports, module) {
755
+ var compare = require_compare();
756
+ var lte = (a, b, loose) => compare(a, b, loose) <= 0;
757
+ module.exports = lte;
758
+ }
759
+ });
760
+
761
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/cmp.js
762
+ var require_cmp = __commonJS({
763
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/cmp.js"(exports, module) {
764
+ var eq = require_eq();
765
+ var neq = require_neq();
766
+ var gt = require_gt();
767
+ var gte = require_gte();
768
+ var lt = require_lt();
769
+ var lte = require_lte();
770
+ var cmp = (a, op, b, loose) => {
771
+ switch (op) {
772
+ case "===":
773
+ if (typeof a === "object") {
774
+ a = a.version;
775
+ }
776
+ if (typeof b === "object") {
777
+ b = b.version;
778
+ }
779
+ return a === b;
780
+ case "!==":
781
+ if (typeof a === "object") {
782
+ a = a.version;
783
+ }
784
+ if (typeof b === "object") {
785
+ b = b.version;
786
+ }
787
+ return a !== b;
788
+ case "":
789
+ case "=":
790
+ case "==":
791
+ return eq(a, b, loose);
792
+ case "!=":
793
+ return neq(a, b, loose);
794
+ case ">":
795
+ return gt(a, b, loose);
796
+ case ">=":
797
+ return gte(a, b, loose);
798
+ case "<":
799
+ return lt(a, b, loose);
800
+ case "<=":
801
+ return lte(a, b, loose);
802
+ default:
803
+ throw new TypeError(`Invalid operator: ${op}`);
804
+ }
805
+ };
806
+ module.exports = cmp;
807
+ }
808
+ });
809
+
810
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/coerce.js
811
+ var require_coerce = __commonJS({
812
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/coerce.js"(exports, module) {
813
+ var SemVer = require_semver();
814
+ var parse = require_parse();
815
+ var { safeRe: re, t } = require_re();
816
+ var coerce = (version, options) => {
817
+ if (version instanceof SemVer) {
818
+ return version;
819
+ }
820
+ if (typeof version === "number") {
821
+ version = String(version);
822
+ }
823
+ if (typeof version !== "string") {
824
+ return null;
825
+ }
826
+ options = options || {};
827
+ let match = null;
828
+ if (!options.rtl) {
829
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
830
+ } else {
831
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
832
+ let next;
833
+ while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
834
+ if (!match || next.index + next[0].length !== match.index + match[0].length) {
835
+ match = next;
836
+ }
837
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
838
+ }
839
+ coerceRtlRegex.lastIndex = -1;
840
+ }
841
+ if (match === null) {
842
+ return null;
843
+ }
844
+ const major = match[2];
845
+ const minor = match[3] || "0";
846
+ const patch = match[4] || "0";
847
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
848
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
849
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
850
+ };
851
+ module.exports = coerce;
852
+ }
853
+ });
854
+
855
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/lrucache.js
856
+ var require_lrucache = __commonJS({
857
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/lrucache.js"(exports, module) {
858
+ var LRUCache = class {
859
+ constructor() {
860
+ this.max = 1e3;
861
+ this.map = /* @__PURE__ */ new Map();
862
+ }
863
+ get(key) {
864
+ const value = this.map.get(key);
865
+ if (value === void 0) {
866
+ return void 0;
867
+ } else {
868
+ this.map.delete(key);
869
+ this.map.set(key, value);
870
+ return value;
871
+ }
872
+ }
873
+ delete(key) {
874
+ return this.map.delete(key);
875
+ }
876
+ set(key, value) {
877
+ const deleted = this.delete(key);
878
+ if (!deleted && value !== void 0) {
879
+ if (this.map.size >= this.max) {
880
+ const firstKey = this.map.keys().next().value;
881
+ this.delete(firstKey);
882
+ }
883
+ this.map.set(key, value);
884
+ }
885
+ return this;
886
+ }
887
+ };
888
+ module.exports = LRUCache;
889
+ }
890
+ });
891
+
892
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/range.js
893
+ var require_range = __commonJS({
894
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/range.js"(exports, module) {
895
+ var SPACE_CHARACTERS = /\s+/g;
896
+ var Range = class _Range {
897
+ constructor(range, options) {
898
+ options = parseOptions(options);
899
+ if (range instanceof _Range) {
900
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
901
+ return range;
902
+ } else {
903
+ return new _Range(range.raw, options);
904
+ }
905
+ }
906
+ if (range instanceof Comparator) {
907
+ this.raw = range.value;
908
+ this.set = [[range]];
909
+ this.formatted = void 0;
910
+ return this;
911
+ }
912
+ this.options = options;
913
+ this.loose = !!options.loose;
914
+ this.includePrerelease = !!options.includePrerelease;
915
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
916
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
917
+ if (!this.set.length) {
918
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
919
+ }
920
+ if (this.set.length > 1) {
921
+ const first = this.set[0];
922
+ this.set = this.set.filter((c) => !isNullSet(c[0]));
923
+ if (this.set.length === 0) {
924
+ this.set = [first];
925
+ } else if (this.set.length > 1) {
926
+ for (const c of this.set) {
927
+ if (c.length === 1 && isAny(c[0])) {
928
+ this.set = [c];
929
+ break;
930
+ }
931
+ }
932
+ }
933
+ }
934
+ this.formatted = void 0;
935
+ }
936
+ get range() {
937
+ if (this.formatted === void 0) {
938
+ this.formatted = "";
939
+ for (let i = 0; i < this.set.length; i++) {
940
+ if (i > 0) {
941
+ this.formatted += "||";
942
+ }
943
+ const comps = this.set[i];
944
+ for (let k = 0; k < comps.length; k++) {
945
+ if (k > 0) {
946
+ this.formatted += " ";
947
+ }
948
+ this.formatted += comps[k].toString().trim();
949
+ }
950
+ }
951
+ }
952
+ return this.formatted;
953
+ }
954
+ format() {
955
+ return this.range;
956
+ }
957
+ toString() {
958
+ return this.range;
959
+ }
960
+ parseRange(range) {
961
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
962
+ const memoKey = memoOpts + ":" + range;
963
+ const cached = cache.get(memoKey);
964
+ if (cached) {
965
+ return cached;
966
+ }
967
+ const loose = this.options.loose;
968
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
969
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
970
+ debug("hyphen replace", range);
971
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
972
+ debug("comparator trim", range);
973
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
974
+ debug("tilde trim", range);
975
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
976
+ debug("caret trim", range);
977
+ let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
978
+ if (loose) {
979
+ rangeList = rangeList.filter((comp) => {
980
+ debug("loose invalid filter", comp, this.options);
981
+ return !!comp.match(re[t.COMPARATORLOOSE]);
982
+ });
983
+ }
984
+ debug("range list", rangeList);
985
+ const rangeMap = /* @__PURE__ */ new Map();
986
+ const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
987
+ for (const comp of comparators) {
988
+ if (isNullSet(comp)) {
989
+ return [comp];
990
+ }
991
+ rangeMap.set(comp.value, comp);
992
+ }
993
+ if (rangeMap.size > 1 && rangeMap.has("")) {
994
+ rangeMap.delete("");
995
+ }
996
+ const result = [...rangeMap.values()];
997
+ cache.set(memoKey, result);
998
+ return result;
999
+ }
1000
+ intersects(range, options) {
1001
+ if (!(range instanceof _Range)) {
1002
+ throw new TypeError("a Range is required");
1003
+ }
1004
+ return this.set.some((thisComparators) => {
1005
+ return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
1006
+ return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
1007
+ return rangeComparators.every((rangeComparator) => {
1008
+ return thisComparator.intersects(rangeComparator, options);
1009
+ });
1010
+ });
1011
+ });
1012
+ });
1013
+ }
1014
+ // if ANY of the sets match ALL of its comparators, then pass
1015
+ test(version) {
1016
+ if (!version) {
1017
+ return false;
1018
+ }
1019
+ if (typeof version === "string") {
1020
+ try {
1021
+ version = new SemVer(version, this.options);
1022
+ } catch (er) {
1023
+ return false;
1024
+ }
1025
+ }
1026
+ for (let i = 0; i < this.set.length; i++) {
1027
+ if (testSet(this.set[i], version, this.options)) {
1028
+ return true;
1029
+ }
1030
+ }
1031
+ return false;
1032
+ }
1033
+ };
1034
+ module.exports = Range;
1035
+ var LRU = require_lrucache();
1036
+ var cache = new LRU();
1037
+ var parseOptions = require_parse_options();
1038
+ var Comparator = require_comparator();
1039
+ var debug = require_debug();
1040
+ var SemVer = require_semver();
1041
+ var {
1042
+ safeRe: re,
1043
+ t,
1044
+ comparatorTrimReplace,
1045
+ tildeTrimReplace,
1046
+ caretTrimReplace
1047
+ } = require_re();
1048
+ var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
1049
+ var isNullSet = (c) => c.value === "<0.0.0-0";
1050
+ var isAny = (c) => c.value === "";
1051
+ var isSatisfiable = (comparators, options) => {
1052
+ let result = true;
1053
+ const remainingComparators = comparators.slice();
1054
+ let testComparator = remainingComparators.pop();
1055
+ while (result && remainingComparators.length) {
1056
+ result = remainingComparators.every((otherComparator) => {
1057
+ return testComparator.intersects(otherComparator, options);
1058
+ });
1059
+ testComparator = remainingComparators.pop();
1060
+ }
1061
+ return result;
1062
+ };
1063
+ var parseComparator = (comp, options) => {
1064
+ debug("comp", comp, options);
1065
+ comp = replaceCarets(comp, options);
1066
+ debug("caret", comp);
1067
+ comp = replaceTildes(comp, options);
1068
+ debug("tildes", comp);
1069
+ comp = replaceXRanges(comp, options);
1070
+ debug("xrange", comp);
1071
+ comp = replaceStars(comp, options);
1072
+ debug("stars", comp);
1073
+ return comp;
1074
+ };
1075
+ var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
1076
+ var replaceTildes = (comp, options) => {
1077
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
1078
+ };
1079
+ var replaceTilde = (comp, options) => {
1080
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
1081
+ return comp.replace(r, (_, M, m, p, pr) => {
1082
+ debug("tilde", comp, _, M, m, p, pr);
1083
+ let ret;
1084
+ if (isX(M)) {
1085
+ ret = "";
1086
+ } else if (isX(m)) {
1087
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
1088
+ } else if (isX(p)) {
1089
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
1090
+ } else if (pr) {
1091
+ debug("replaceTilde pr", pr);
1092
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
1093
+ } else {
1094
+ ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
1095
+ }
1096
+ debug("tilde return", ret);
1097
+ return ret;
1098
+ });
1099
+ };
1100
+ var replaceCarets = (comp, options) => {
1101
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
1102
+ };
1103
+ var replaceCaret = (comp, options) => {
1104
+ debug("caret", comp, options);
1105
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
1106
+ const z = options.includePrerelease ? "-0" : "";
1107
+ return comp.replace(r, (_, M, m, p, pr) => {
1108
+ debug("caret", comp, _, M, m, p, pr);
1109
+ let ret;
1110
+ if (isX(M)) {
1111
+ ret = "";
1112
+ } else if (isX(m)) {
1113
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
1114
+ } else if (isX(p)) {
1115
+ if (M === "0") {
1116
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
1117
+ } else {
1118
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
1119
+ }
1120
+ } else if (pr) {
1121
+ debug("replaceCaret pr", pr);
1122
+ if (M === "0") {
1123
+ if (m === "0") {
1124
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
1125
+ } else {
1126
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
1127
+ }
1128
+ } else {
1129
+ ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
1130
+ }
1131
+ } else {
1132
+ debug("no pr");
1133
+ if (M === "0") {
1134
+ if (m === "0") {
1135
+ ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
1136
+ } else {
1137
+ ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
1138
+ }
1139
+ } else {
1140
+ ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
1141
+ }
1142
+ }
1143
+ debug("caret return", ret);
1144
+ return ret;
1145
+ });
1146
+ };
1147
+ var replaceXRanges = (comp, options) => {
1148
+ debug("replaceXRanges", comp, options);
1149
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
1150
+ };
1151
+ var replaceXRange = (comp, options) => {
1152
+ comp = comp.trim();
1153
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
1154
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
1155
+ debug("xRange", comp, ret, gtlt, M, m, p, pr);
1156
+ const xM = isX(M);
1157
+ const xm = xM || isX(m);
1158
+ const xp = xm || isX(p);
1159
+ const anyX = xp;
1160
+ if (gtlt === "=" && anyX) {
1161
+ gtlt = "";
1162
+ }
1163
+ pr = options.includePrerelease ? "-0" : "";
1164
+ if (xM) {
1165
+ if (gtlt === ">" || gtlt === "<") {
1166
+ ret = "<0.0.0-0";
1167
+ } else {
1168
+ ret = "*";
1169
+ }
1170
+ } else if (gtlt && anyX) {
1171
+ if (xm) {
1172
+ m = 0;
1173
+ }
1174
+ p = 0;
1175
+ if (gtlt === ">") {
1176
+ gtlt = ">=";
1177
+ if (xm) {
1178
+ M = +M + 1;
1179
+ m = 0;
1180
+ p = 0;
1181
+ } else {
1182
+ m = +m + 1;
1183
+ p = 0;
1184
+ }
1185
+ } else if (gtlt === "<=") {
1186
+ gtlt = "<";
1187
+ if (xm) {
1188
+ M = +M + 1;
1189
+ } else {
1190
+ m = +m + 1;
1191
+ }
1192
+ }
1193
+ if (gtlt === "<") {
1194
+ pr = "-0";
1195
+ }
1196
+ ret = `${gtlt + M}.${m}.${p}${pr}`;
1197
+ } else if (xm) {
1198
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
1199
+ } else if (xp) {
1200
+ ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
1201
+ }
1202
+ debug("xRange return", ret);
1203
+ return ret;
1204
+ });
1205
+ };
1206
+ var replaceStars = (comp, options) => {
1207
+ debug("replaceStars", comp, options);
1208
+ return comp.trim().replace(re[t.STAR], "");
1209
+ };
1210
+ var replaceGTE0 = (comp, options) => {
1211
+ debug("replaceGTE0", comp, options);
1212
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
1213
+ };
1214
+ var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
1215
+ if (isX(fM)) {
1216
+ from = "";
1217
+ } else if (isX(fm)) {
1218
+ from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
1219
+ } else if (isX(fp)) {
1220
+ from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
1221
+ } else if (fpr) {
1222
+ from = `>=${from}`;
1223
+ } else {
1224
+ from = `>=${from}${incPr ? "-0" : ""}`;
1225
+ }
1226
+ if (isX(tM)) {
1227
+ to = "";
1228
+ } else if (isX(tm)) {
1229
+ to = `<${+tM + 1}.0.0-0`;
1230
+ } else if (isX(tp)) {
1231
+ to = `<${tM}.${+tm + 1}.0-0`;
1232
+ } else if (tpr) {
1233
+ to = `<=${tM}.${tm}.${tp}-${tpr}`;
1234
+ } else if (incPr) {
1235
+ to = `<${tM}.${tm}.${+tp + 1}-0`;
1236
+ } else {
1237
+ to = `<=${to}`;
1238
+ }
1239
+ return `${from} ${to}`.trim();
1240
+ };
1241
+ var testSet = (set, version, options) => {
1242
+ for (let i = 0; i < set.length; i++) {
1243
+ if (!set[i].test(version)) {
1244
+ return false;
1245
+ }
1246
+ }
1247
+ if (version.prerelease.length && !options.includePrerelease) {
1248
+ for (let i = 0; i < set.length; i++) {
1249
+ debug(set[i].semver);
1250
+ if (set[i].semver === Comparator.ANY) {
1251
+ continue;
1252
+ }
1253
+ if (set[i].semver.prerelease.length > 0) {
1254
+ const allowed = set[i].semver;
1255
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
1256
+ return true;
1257
+ }
1258
+ }
1259
+ }
1260
+ return false;
1261
+ }
1262
+ return true;
1263
+ };
1264
+ }
1265
+ });
1266
+
1267
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/comparator.js
1268
+ var require_comparator = __commonJS({
1269
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/comparator.js"(exports, module) {
1270
+ var ANY = Symbol("SemVer ANY");
1271
+ var Comparator = class _Comparator {
1272
+ static get ANY() {
1273
+ return ANY;
1274
+ }
1275
+ constructor(comp, options) {
1276
+ options = parseOptions(options);
1277
+ if (comp instanceof _Comparator) {
1278
+ if (comp.loose === !!options.loose) {
1279
+ return comp;
1280
+ } else {
1281
+ comp = comp.value;
1282
+ }
1283
+ }
1284
+ comp = comp.trim().split(/\s+/).join(" ");
1285
+ debug("comparator", comp, options);
1286
+ this.options = options;
1287
+ this.loose = !!options.loose;
1288
+ this.parse(comp);
1289
+ if (this.semver === ANY) {
1290
+ this.value = "";
1291
+ } else {
1292
+ this.value = this.operator + this.semver.version;
1293
+ }
1294
+ debug("comp", this);
1295
+ }
1296
+ parse(comp) {
1297
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
1298
+ const m = comp.match(r);
1299
+ if (!m) {
1300
+ throw new TypeError(`Invalid comparator: ${comp}`);
1301
+ }
1302
+ this.operator = m[1] !== void 0 ? m[1] : "";
1303
+ if (this.operator === "=") {
1304
+ this.operator = "";
1305
+ }
1306
+ if (!m[2]) {
1307
+ this.semver = ANY;
1308
+ } else {
1309
+ this.semver = new SemVer(m[2], this.options.loose);
1310
+ }
1311
+ }
1312
+ toString() {
1313
+ return this.value;
1314
+ }
1315
+ test(version) {
1316
+ debug("Comparator.test", version, this.options.loose);
1317
+ if (this.semver === ANY || version === ANY) {
1318
+ return true;
1319
+ }
1320
+ if (typeof version === "string") {
1321
+ try {
1322
+ version = new SemVer(version, this.options);
1323
+ } catch (er) {
1324
+ return false;
1325
+ }
1326
+ }
1327
+ return cmp(version, this.operator, this.semver, this.options);
1328
+ }
1329
+ intersects(comp, options) {
1330
+ if (!(comp instanceof _Comparator)) {
1331
+ throw new TypeError("a Comparator is required");
1332
+ }
1333
+ if (this.operator === "") {
1334
+ if (this.value === "") {
1335
+ return true;
1336
+ }
1337
+ return new Range(comp.value, options).test(this.value);
1338
+ } else if (comp.operator === "") {
1339
+ if (comp.value === "") {
1340
+ return true;
1341
+ }
1342
+ return new Range(this.value, options).test(comp.semver);
1343
+ }
1344
+ options = parseOptions(options);
1345
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
1346
+ return false;
1347
+ }
1348
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
1349
+ return false;
1350
+ }
1351
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
1352
+ return true;
1353
+ }
1354
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
1355
+ return true;
1356
+ }
1357
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
1358
+ return true;
1359
+ }
1360
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
1361
+ return true;
1362
+ }
1363
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
1364
+ return true;
1365
+ }
1366
+ return false;
1367
+ }
1368
+ };
1369
+ module.exports = Comparator;
1370
+ var parseOptions = require_parse_options();
1371
+ var { safeRe: re, t } = require_re();
1372
+ var cmp = require_cmp();
1373
+ var debug = require_debug();
1374
+ var SemVer = require_semver();
1375
+ var Range = require_range();
1376
+ }
1377
+ });
1378
+
1379
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/satisfies.js
1380
+ var require_satisfies = __commonJS({
1381
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/satisfies.js"(exports, module) {
1382
+ var Range = require_range();
1383
+ var satisfies = (version, range, options) => {
1384
+ try {
1385
+ range = new Range(range, options);
1386
+ } catch (er) {
1387
+ return false;
1388
+ }
1389
+ return range.test(version);
1390
+ };
1391
+ module.exports = satisfies;
1392
+ }
1393
+ });
1394
+
1395
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/to-comparators.js
1396
+ var require_to_comparators = __commonJS({
1397
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/to-comparators.js"(exports, module) {
1398
+ var Range = require_range();
1399
+ var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
1400
+ module.exports = toComparators;
1401
+ }
1402
+ });
1403
+
1404
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/max-satisfying.js
1405
+ var require_max_satisfying = __commonJS({
1406
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
1407
+ var SemVer = require_semver();
1408
+ var Range = require_range();
1409
+ var maxSatisfying = (versions, range, options) => {
1410
+ let max = null;
1411
+ let maxSV = null;
1412
+ let rangeObj = null;
1413
+ try {
1414
+ rangeObj = new Range(range, options);
1415
+ } catch (er) {
1416
+ return null;
1417
+ }
1418
+ versions.forEach((v) => {
1419
+ if (rangeObj.test(v)) {
1420
+ if (!max || maxSV.compare(v) === -1) {
1421
+ max = v;
1422
+ maxSV = new SemVer(max, options);
1423
+ }
1424
+ }
1425
+ });
1426
+ return max;
1427
+ };
1428
+ module.exports = maxSatisfying;
1429
+ }
1430
+ });
1431
+
1432
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-satisfying.js
1433
+ var require_min_satisfying = __commonJS({
1434
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
1435
+ var SemVer = require_semver();
1436
+ var Range = require_range();
1437
+ var minSatisfying = (versions, range, options) => {
1438
+ let min = null;
1439
+ let minSV = null;
1440
+ let rangeObj = null;
1441
+ try {
1442
+ rangeObj = new Range(range, options);
1443
+ } catch (er) {
1444
+ return null;
1445
+ }
1446
+ versions.forEach((v) => {
1447
+ if (rangeObj.test(v)) {
1448
+ if (!min || minSV.compare(v) === 1) {
1449
+ min = v;
1450
+ minSV = new SemVer(min, options);
1451
+ }
1452
+ }
1453
+ });
1454
+ return min;
1455
+ };
1456
+ module.exports = minSatisfying;
1457
+ }
1458
+ });
1459
+
1460
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-version.js
1461
+ var require_min_version = __commonJS({
1462
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-version.js"(exports, module) {
1463
+ var SemVer = require_semver();
1464
+ var Range = require_range();
1465
+ var gt = require_gt();
1466
+ var minVersion = (range, loose) => {
1467
+ range = new Range(range, loose);
1468
+ let minver = new SemVer("0.0.0");
1469
+ if (range.test(minver)) {
1470
+ return minver;
1471
+ }
1472
+ minver = new SemVer("0.0.0-0");
1473
+ if (range.test(minver)) {
1474
+ return minver;
1475
+ }
1476
+ minver = null;
1477
+ for (let i = 0; i < range.set.length; ++i) {
1478
+ const comparators = range.set[i];
1479
+ let setMin = null;
1480
+ comparators.forEach((comparator) => {
1481
+ const compver = new SemVer(comparator.semver.version);
1482
+ switch (comparator.operator) {
1483
+ case ">":
1484
+ if (compver.prerelease.length === 0) {
1485
+ compver.patch++;
1486
+ } else {
1487
+ compver.prerelease.push(0);
1488
+ }
1489
+ compver.raw = compver.format();
1490
+ /* fallthrough */
1491
+ case "":
1492
+ case ">=":
1493
+ if (!setMin || gt(compver, setMin)) {
1494
+ setMin = compver;
1495
+ }
1496
+ break;
1497
+ case "<":
1498
+ case "<=":
1499
+ break;
1500
+ /* istanbul ignore next */
1501
+ default:
1502
+ throw new Error(`Unexpected operation: ${comparator.operator}`);
1503
+ }
1504
+ });
1505
+ if (setMin && (!minver || gt(minver, setMin))) {
1506
+ minver = setMin;
1507
+ }
1508
+ }
1509
+ if (minver && range.test(minver)) {
1510
+ return minver;
1511
+ }
1512
+ return null;
1513
+ };
1514
+ module.exports = minVersion;
1515
+ }
1516
+ });
1517
+
1518
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/valid.js
1519
+ var require_valid2 = __commonJS({
1520
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/valid.js"(exports, module) {
1521
+ var Range = require_range();
1522
+ var validRange = (range, options) => {
1523
+ try {
1524
+ return new Range(range, options).range || "*";
1525
+ } catch (er) {
1526
+ return null;
1527
+ }
1528
+ };
1529
+ module.exports = validRange;
1530
+ }
1531
+ });
1532
+
1533
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/outside.js
1534
+ var require_outside = __commonJS({
1535
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/outside.js"(exports, module) {
1536
+ var SemVer = require_semver();
1537
+ var Comparator = require_comparator();
1538
+ var { ANY } = Comparator;
1539
+ var Range = require_range();
1540
+ var satisfies = require_satisfies();
1541
+ var gt = require_gt();
1542
+ var lt = require_lt();
1543
+ var lte = require_lte();
1544
+ var gte = require_gte();
1545
+ var outside = (version, range, hilo, options) => {
1546
+ version = new SemVer(version, options);
1547
+ range = new Range(range, options);
1548
+ let gtfn, ltefn, ltfn, comp, ecomp;
1549
+ switch (hilo) {
1550
+ case ">":
1551
+ gtfn = gt;
1552
+ ltefn = lte;
1553
+ ltfn = lt;
1554
+ comp = ">";
1555
+ ecomp = ">=";
1556
+ break;
1557
+ case "<":
1558
+ gtfn = lt;
1559
+ ltefn = gte;
1560
+ ltfn = gt;
1561
+ comp = "<";
1562
+ ecomp = "<=";
1563
+ break;
1564
+ default:
1565
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
1566
+ }
1567
+ if (satisfies(version, range, options)) {
1568
+ return false;
1569
+ }
1570
+ for (let i = 0; i < range.set.length; ++i) {
1571
+ const comparators = range.set[i];
1572
+ let high = null;
1573
+ let low = null;
1574
+ comparators.forEach((comparator) => {
1575
+ if (comparator.semver === ANY) {
1576
+ comparator = new Comparator(">=0.0.0");
1577
+ }
1578
+ high = high || comparator;
1579
+ low = low || comparator;
1580
+ if (gtfn(comparator.semver, high.semver, options)) {
1581
+ high = comparator;
1582
+ } else if (ltfn(comparator.semver, low.semver, options)) {
1583
+ low = comparator;
1584
+ }
1585
+ });
1586
+ if (high.operator === comp || high.operator === ecomp) {
1587
+ return false;
1588
+ }
1589
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
1590
+ return false;
1591
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
1592
+ return false;
1593
+ }
1594
+ }
1595
+ return true;
1596
+ };
1597
+ module.exports = outside;
1598
+ }
1599
+ });
1600
+
1601
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/gtr.js
1602
+ var require_gtr = __commonJS({
1603
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/gtr.js"(exports, module) {
1604
+ var outside = require_outside();
1605
+ var gtr = (version, range, options) => outside(version, range, ">", options);
1606
+ module.exports = gtr;
1607
+ }
1608
+ });
1609
+
1610
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/ltr.js
1611
+ var require_ltr = __commonJS({
1612
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/ltr.js"(exports, module) {
1613
+ var outside = require_outside();
1614
+ var ltr = (version, range, options) => outside(version, range, "<", options);
1615
+ module.exports = ltr;
1616
+ }
1617
+ });
1618
+
1619
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/intersects.js
1620
+ var require_intersects = __commonJS({
1621
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/intersects.js"(exports, module) {
1622
+ var Range = require_range();
1623
+ var intersects = (r1, r2, options) => {
1624
+ r1 = new Range(r1, options);
1625
+ r2 = new Range(r2, options);
1626
+ return r1.intersects(r2, options);
1627
+ };
1628
+ module.exports = intersects;
1629
+ }
1630
+ });
1631
+
1632
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/simplify.js
1633
+ var require_simplify = __commonJS({
1634
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/simplify.js"(exports, module) {
1635
+ var satisfies = require_satisfies();
1636
+ var compare = require_compare();
1637
+ module.exports = (versions, range, options) => {
1638
+ const set = [];
1639
+ let first = null;
1640
+ let prev = null;
1641
+ const v = versions.sort((a, b) => compare(a, b, options));
1642
+ for (const version of v) {
1643
+ const included2 = satisfies(version, range, options);
1644
+ if (included2) {
1645
+ prev = version;
1646
+ if (!first) {
1647
+ first = version;
1648
+ }
1649
+ } else {
1650
+ if (prev) {
1651
+ set.push([first, prev]);
1652
+ }
1653
+ prev = null;
1654
+ first = null;
1655
+ }
1656
+ }
1657
+ if (first) {
1658
+ set.push([first, null]);
1659
+ }
1660
+ const ranges = [];
1661
+ for (const [min, max] of set) {
1662
+ if (min === max) {
1663
+ ranges.push(min);
1664
+ } else if (!max && min === v[0]) {
1665
+ ranges.push("*");
1666
+ } else if (!max) {
1667
+ ranges.push(`>=${min}`);
1668
+ } else if (min === v[0]) {
1669
+ ranges.push(`<=${max}`);
1670
+ } else {
1671
+ ranges.push(`${min} - ${max}`);
1672
+ }
1673
+ }
1674
+ const simplified = ranges.join(" || ");
1675
+ const original = typeof range.raw === "string" ? range.raw : String(range);
1676
+ return simplified.length < original.length ? simplified : range;
1677
+ };
1678
+ }
1679
+ });
1680
+
1681
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/subset.js
1682
+ var require_subset = __commonJS({
1683
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/subset.js"(exports, module) {
1684
+ var Range = require_range();
1685
+ var Comparator = require_comparator();
1686
+ var { ANY } = Comparator;
1687
+ var satisfies = require_satisfies();
1688
+ var compare = require_compare();
1689
+ var subset = (sub, dom, options = {}) => {
1690
+ if (sub === dom) {
1691
+ return true;
1692
+ }
1693
+ sub = new Range(sub, options);
1694
+ dom = new Range(dom, options);
1695
+ let sawNonNull = false;
1696
+ OUTER: for (const simpleSub of sub.set) {
1697
+ for (const simpleDom of dom.set) {
1698
+ const isSub = simpleSubset(simpleSub, simpleDom, options);
1699
+ sawNonNull = sawNonNull || isSub !== null;
1700
+ if (isSub) {
1701
+ continue OUTER;
1702
+ }
1703
+ }
1704
+ if (sawNonNull) {
1705
+ return false;
1706
+ }
1707
+ }
1708
+ return true;
1709
+ };
1710
+ var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
1711
+ var minimumVersion = [new Comparator(">=0.0.0")];
1712
+ var simpleSubset = (sub, dom, options) => {
1713
+ if (sub === dom) {
1714
+ return true;
1715
+ }
1716
+ if (sub.length === 1 && sub[0].semver === ANY) {
1717
+ if (dom.length === 1 && dom[0].semver === ANY) {
1718
+ return true;
1719
+ } else if (options.includePrerelease) {
1720
+ sub = minimumVersionWithPreRelease;
1721
+ } else {
1722
+ sub = minimumVersion;
1723
+ }
1724
+ }
1725
+ if (dom.length === 1 && dom[0].semver === ANY) {
1726
+ if (options.includePrerelease) {
1727
+ return true;
1728
+ } else {
1729
+ dom = minimumVersion;
1730
+ }
1731
+ }
1732
+ const eqSet = /* @__PURE__ */ new Set();
1733
+ let gt, lt;
1734
+ for (const c of sub) {
1735
+ if (c.operator === ">" || c.operator === ">=") {
1736
+ gt = higherGT(gt, c, options);
1737
+ } else if (c.operator === "<" || c.operator === "<=") {
1738
+ lt = lowerLT(lt, c, options);
1739
+ } else {
1740
+ eqSet.add(c.semver);
1741
+ }
1742
+ }
1743
+ if (eqSet.size > 1) {
1744
+ return null;
1745
+ }
1746
+ let gtltComp;
1747
+ if (gt && lt) {
1748
+ gtltComp = compare(gt.semver, lt.semver, options);
1749
+ if (gtltComp > 0) {
1750
+ return null;
1751
+ } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
1752
+ return null;
1753
+ }
1754
+ }
1755
+ for (const eq of eqSet) {
1756
+ if (gt && !satisfies(eq, String(gt), options)) {
1757
+ return null;
1758
+ }
1759
+ if (lt && !satisfies(eq, String(lt), options)) {
1760
+ return null;
1761
+ }
1762
+ for (const c of dom) {
1763
+ if (!satisfies(eq, String(c), options)) {
1764
+ return false;
1765
+ }
1766
+ }
1767
+ return true;
1768
+ }
1769
+ let higher, lower;
1770
+ let hasDomLT, hasDomGT;
1771
+ let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
1772
+ let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
1773
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
1774
+ needDomLTPre = false;
1775
+ }
1776
+ for (const c of dom) {
1777
+ hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
1778
+ hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
1779
+ if (gt) {
1780
+ if (needDomGTPre) {
1781
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
1782
+ needDomGTPre = false;
1783
+ }
1784
+ }
1785
+ if (c.operator === ">" || c.operator === ">=") {
1786
+ higher = higherGT(gt, c, options);
1787
+ if (higher === c && higher !== gt) {
1788
+ return false;
1789
+ }
1790
+ } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
1791
+ return false;
1792
+ }
1793
+ }
1794
+ if (lt) {
1795
+ if (needDomLTPre) {
1796
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
1797
+ needDomLTPre = false;
1798
+ }
1799
+ }
1800
+ if (c.operator === "<" || c.operator === "<=") {
1801
+ lower = lowerLT(lt, c, options);
1802
+ if (lower === c && lower !== lt) {
1803
+ return false;
1804
+ }
1805
+ } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
1806
+ return false;
1807
+ }
1808
+ }
1809
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
1810
+ return false;
1811
+ }
1812
+ }
1813
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
1814
+ return false;
1815
+ }
1816
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
1817
+ return false;
1818
+ }
1819
+ if (needDomGTPre || needDomLTPre) {
1820
+ return false;
1821
+ }
1822
+ return true;
1823
+ };
1824
+ var higherGT = (a, b, options) => {
1825
+ if (!a) {
1826
+ return b;
1827
+ }
1828
+ const comp = compare(a.semver, b.semver, options);
1829
+ return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
1830
+ };
1831
+ var lowerLT = (a, b, options) => {
1832
+ if (!a) {
1833
+ return b;
1834
+ }
1835
+ const comp = compare(a.semver, b.semver, options);
1836
+ return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
1837
+ };
1838
+ module.exports = subset;
1839
+ }
1840
+ });
1841
+
1842
+ // node_modules/.pnpm/semver@7.6.3/node_modules/semver/index.js
1843
+ var require_semver2 = __commonJS({
1844
+ "node_modules/.pnpm/semver@7.6.3/node_modules/semver/index.js"(exports, module) {
1845
+ var internalRe = require_re();
1846
+ var constants = require_constants();
1847
+ var SemVer = require_semver();
1848
+ var identifiers = require_identifiers();
1849
+ var parse = require_parse();
1850
+ var valid = require_valid();
1851
+ var clean = require_clean();
1852
+ var inc = require_inc();
1853
+ var diff = require_diff();
1854
+ var major = require_major();
1855
+ var minor = require_minor();
1856
+ var patch = require_patch();
1857
+ var prerelease = require_prerelease();
1858
+ var compare = require_compare();
1859
+ var rcompare = require_rcompare();
1860
+ var compareLoose = require_compare_loose();
1861
+ var compareBuild = require_compare_build();
1862
+ var sort = require_sort();
1863
+ var rsort = require_rsort();
1864
+ var gt = require_gt();
1865
+ var lt = require_lt();
1866
+ var eq = require_eq();
1867
+ var neq = require_neq();
1868
+ var gte = require_gte();
1869
+ var lte = require_lte();
1870
+ var cmp = require_cmp();
1871
+ var coerce = require_coerce();
1872
+ var Comparator = require_comparator();
1873
+ var Range = require_range();
1874
+ var satisfies = require_satisfies();
1875
+ var toComparators = require_to_comparators();
1876
+ var maxSatisfying = require_max_satisfying();
1877
+ var minSatisfying = require_min_satisfying();
1878
+ var minVersion = require_min_version();
1879
+ var validRange = require_valid2();
1880
+ var outside = require_outside();
1881
+ var gtr = require_gtr();
1882
+ var ltr = require_ltr();
1883
+ var intersects = require_intersects();
1884
+ var simplifyRange = require_simplify();
1885
+ var subset = require_subset();
1886
+ module.exports = {
1887
+ parse,
1888
+ valid,
1889
+ clean,
1890
+ inc,
1891
+ diff,
1892
+ major,
1893
+ minor,
1894
+ patch,
1895
+ prerelease,
1896
+ compare,
1897
+ rcompare,
1898
+ compareLoose,
1899
+ compareBuild,
1900
+ sort,
1901
+ rsort,
1902
+ gt,
1903
+ lt,
1904
+ eq,
1905
+ neq,
1906
+ gte,
1907
+ lte,
1908
+ cmp,
1909
+ coerce,
1910
+ Comparator,
1911
+ Range,
1912
+ satisfies,
1913
+ toComparators,
1914
+ maxSatisfying,
1915
+ minSatisfying,
1916
+ minVersion,
1917
+ validRange,
1918
+ outside,
1919
+ gtr,
1920
+ ltr,
1921
+ intersects,
1922
+ simplifyRange,
1923
+ subset,
1924
+ SemVer,
1925
+ re: internalRe.re,
1926
+ src: internalRe.src,
1927
+ tokens: internalRe.t,
1928
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
1929
+ RELEASE_TYPES: constants.RELEASE_TYPES,
1930
+ compareIdentifiers: identifiers.compareIdentifiers,
1931
+ rcompareIdentifiers: identifiers.rcompareIdentifiers
1932
+ };
1933
+ }
1934
+ });
63
1935
  var nextDistPath = /(next[\\/]dist[\\/]shared[\\/]lib)|(next[\\/]dist[\\/]client)|(next[\\/]dist[\\/]pages)/;
64
1936
  var { loadEnvConfig } = nextEnv__namespace.default || nextEnv__namespace;
65
1937
  async function loadEnvironmentConfig(dir, dev) {
@@ -490,7 +2362,7 @@ function getEmotionOptions(emotionConfig, development) {
490
2362
  }
491
2363
 
492
2364
  // src/utils/swc/options.ts
493
- var require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
2365
+ var require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
494
2366
  var regeneratorRuntimePath = require2.resolve(
495
2367
  "next/dist/compiled/regenerator-runtime"
496
2368
  );
@@ -790,7 +2662,7 @@ var isVitestEnv = process.env.VITEST === "true";
790
2662
  function getExecutionEnvironment(config) {
791
2663
  return isVitestEnv && config.test?.browser?.enabled !== true ? "node" : "browser";
792
2664
  }
793
- var require3 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
2665
+ var require3 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
794
2666
  var getEntryPoint = (subPath, env) => require3.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
795
2667
  var getAlias = (env) => ({
796
2668
  "sb-original/default-loader": getEntryPoint("image-default-loader", env),
@@ -804,7 +2676,7 @@ var virtualImage = "virtual:next-image";
804
2676
  var virtualNextImage = "virtual:next/image";
805
2677
  var virtualNextLegacyImage = "virtual:next/legacy/image";
806
2678
  var sharp;
807
- var require4 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
2679
+ var require4 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
808
2680
  try {
809
2681
  sharp = require4("sharp");
810
2682
  if (sharp && sharp.concurrency() > 1) {
@@ -906,42 +2778,87 @@ function vitePluginNextImage(nextConfigResolver) {
906
2778
  }
907
2779
  };
908
2780
  }
909
- var require5 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
910
- var getEntryPoint2 = (subPath, env) => require5.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
2781
+
2782
+ // src/plugins/next-mocks/compatibility/compatibility-map.ts
2783
+ var import_semver = __toESM(require_semver2());
2784
+ var require5 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
2785
+ var getNextjsVersion = () => require5(scopedResolve("next/package.json")).version;
2786
+ var scopedResolve = (id) => {
2787
+ let scopedModulePath;
2788
+ try {
2789
+ scopedModulePath = require5.resolve(id, { paths: [path2.resolve()] });
2790
+ } catch (e) {
2791
+ scopedModulePath = require5.resolve(id);
2792
+ }
2793
+ const idWithNativePathSep = id.replace(/\//g, path2.sep);
2794
+ if (scopedModulePath.endsWith(idWithNativePathSep)) {
2795
+ return scopedModulePath;
2796
+ }
2797
+ const moduleFolderStrPosition = scopedModulePath.lastIndexOf(idWithNativePathSep);
2798
+ const beginningOfMainScriptPath = moduleFolderStrPosition + id.length;
2799
+ return scopedModulePath.substring(0, beginningOfMainScriptPath);
2800
+ };
2801
+
2802
+ // src/plugins/next-mocks/compatibility/compatibility-map.ts
2803
+ var require6 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
2804
+ var getEntryPoint2 = (subPath, env) => require6.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
2805
+ var mapping = (env) => ({
2806
+ "<15.0.0": {
2807
+ "next/dist/server/request/headers": "next/dist/client/components/headers",
2808
+ // this path only exists from Next 15 onwards
2809
+ "next/dist/server/request/draft-mode": getEntryPoint2(
2810
+ "draft-mode.compat",
2811
+ env
2812
+ )
2813
+ }
2814
+ });
2815
+ var getCompatibilityAliases = (env) => {
2816
+ const version = getNextjsVersion();
2817
+ const result = {};
2818
+ const compatMap = mapping(env);
2819
+ Object.keys(compatMap).forEach((key) => {
2820
+ if (import_semver.default.intersects(version, key)) {
2821
+ Object.assign(result, compatMap[key]);
2822
+ }
2823
+ });
2824
+ return result;
2825
+ };
2826
+
2827
+ // src/plugins/next-mocks/plugin.ts
2828
+ var require7 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
2829
+ var getEntryPoint3 = (subPath, env) => require7.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
911
2830
  var getAlias2 = (env) => ({
912
- "next/headers": getEntryPoint2("headers", env),
913
- "@storybook/nextjs/headers.mock": getEntryPoint2("headers", env),
914
- "@storybook/nextjs-vite/headers.mock": getEntryPoint2("headers", env),
915
- "@storybook/experimental-nextjs-vite/headers.mock": getEntryPoint2(
2831
+ "next/headers": getEntryPoint3("headers", env),
2832
+ "@storybook/nextjs/headers.mock": getEntryPoint3("headers", env),
2833
+ "@storybook/nextjs-vite/headers.mock": getEntryPoint3("headers", env),
2834
+ "@storybook/experimental-nextjs-vite/headers.mock": getEntryPoint3(
916
2835
  "headers",
917
2836
  env
918
2837
  ),
919
- "next/navigation": getEntryPoint2("navigation", env),
920
- "@storybook/nextjs/navigation.mock": getEntryPoint2("navigation", env),
921
- "@storybook/nextjs-vite/navigation.mock": getEntryPoint2("navigation", env),
922
- "@storybook/experimental-nextjs-vite/navigation.mock": getEntryPoint2(
2838
+ "next/navigation": getEntryPoint3("navigation", env),
2839
+ "@storybook/nextjs/navigation.mock": getEntryPoint3("navigation", env),
2840
+ "@storybook/nextjs-vite/navigation.mock": getEntryPoint3("navigation", env),
2841
+ "@storybook/experimental-nextjs-vite/navigation.mock": getEntryPoint3(
923
2842
  "navigation",
924
2843
  env
925
2844
  ),
926
- "next/router": getEntryPoint2("router", env),
927
- "@storybook/nextjs/router.mock": getEntryPoint2("router", env),
928
- "@storybook/nextjs-vite/router.mock": getEntryPoint2("router", env),
929
- "@storybook/experimental-nextjs-vite/router.mock": getEntryPoint2(
2845
+ "next/router": getEntryPoint3("router", env),
2846
+ "@storybook/nextjs/router.mock": getEntryPoint3("router", env),
2847
+ "@storybook/nextjs-vite/router.mock": getEntryPoint3("router", env),
2848
+ "@storybook/experimental-nextjs-vite/router.mock": getEntryPoint3(
930
2849
  "router",
931
2850
  env
932
2851
  ),
933
- "next/cache": getEntryPoint2("cache", env),
934
- "@storybook/nextjs/cache.mock": getEntryPoint2("cache", env),
935
- "@storybook/nextjs-vite/cache.mock": getEntryPoint2("cache", env),
936
- "@storybook/experimental-nextjs-vite/cache.mock": getEntryPoint2("cache", env),
937
- "server-only": getEntryPoint2("server-only", env),
938
- "@opentelemetry/api": require5.resolve(
2852
+ "next/cache": getEntryPoint3("cache", env),
2853
+ "@storybook/nextjs/cache.mock": getEntryPoint3("cache", env),
2854
+ "@storybook/nextjs-vite/cache.mock": getEntryPoint3("cache", env),
2855
+ "@storybook/experimental-nextjs-vite/cache.mock": getEntryPoint3("cache", env),
2856
+ "server-only": getEntryPoint3("server-only", env),
2857
+ "@opentelemetry/api": require7.resolve(
939
2858
  "next/dist/compiled/@opentelemetry/api"
940
2859
  ),
941
- "styled-jsx/style.js": path2.resolve("styled-jsx/style"),
942
- "styled-jsx/style": require5.resolve("styled-jsx/style"),
943
- "styled-jsx": path2__default.default.dirname(require5.resolve("styled-jsx/package.json")),
944
- "next/dynamic": getEntryPoint2("dynamic", env)
2860
+ "next/dynamic": getEntryPoint3("dynamic", env),
2861
+ ...getCompatibilityAliases(env)
945
2862
  });
946
2863
  var vitePluginNextMocks = () => ({
947
2864
  name: "vite-plugin-next-mocks",
@@ -956,7 +2873,7 @@ var vitePluginNextMocks = () => ({
956
2873
  });
957
2874
 
958
2875
  // src/index.ts
959
- var require6 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
2876
+ var require8 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
960
2877
  var loadConfig = (
961
2878
  // biome-ignore lint/suspicious/noExplicitAny: CJS support
962
2879
  nextServerConfig__default.default.default || nextServerConfig__default.default
@@ -978,33 +2895,33 @@ function VitePlugin({ dir = process.cwd() } = {}) {
978
2895
  alias: [
979
2896
  {
980
2897
  find: /^react$/,
981
- replacement: require6.resolve("next/dist/compiled/react")
2898
+ replacement: require8.resolve("next/dist/compiled/react")
982
2899
  },
983
2900
  {
984
2901
  find: /^react-dom$/,
985
- replacement: require6.resolve("next/dist/compiled/react-dom")
2902
+ replacement: require8.resolve("next/dist/compiled/react-dom")
986
2903
  },
987
2904
  {
988
2905
  find: /^react-dom\/server$/,
989
- replacement: require6.resolve(
2906
+ replacement: require8.resolve(
990
2907
  "next/dist/compiled/react-dom/server.browser.js"
991
2908
  )
992
2909
  },
993
2910
  {
994
2911
  find: /^react-dom\/test-utils$/,
995
- replacement: require6.resolve(
2912
+ replacement: require8.resolve(
996
2913
  "next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js"
997
2914
  )
998
2915
  },
999
2916
  {
1000
2917
  find: /^react-dom\/client$/,
1001
- replacement: require6.resolve(
2918
+ replacement: require8.resolve(
1002
2919
  "next/dist/compiled/react-dom/client.js"
1003
2920
  )
1004
2921
  },
1005
2922
  {
1006
2923
  find: /^react-dom\/cjs\/react-dom\.development\.js$/,
1007
- replacement: require6.resolve(
2924
+ replacement: require8.resolve(
1008
2925
  "next/dist/compiled/react-dom/cjs/react-dom.development.js"
1009
2926
  )
1010
2927
  }
@@ -1024,26 +2941,26 @@ function VitePlugin({ dir = process.cwd() } = {}) {
1024
2941
  },
1025
2942
  test: {
1026
2943
  alias: {
1027
- "react/jsx-dev-runtime": require6.resolve(
2944
+ "react/jsx-dev-runtime": require8.resolve(
1028
2945
  "next/dist/compiled/react/jsx-dev-runtime.js"
1029
2946
  ),
1030
- "react/jsx-runtime": require6.resolve(
2947
+ "react/jsx-runtime": require8.resolve(
1031
2948
  "next/dist/compiled/react/jsx-runtime.js"
1032
2949
  ),
1033
- react: require6.resolve("next/dist/compiled/react"),
1034
- "react-dom/server": require6.resolve(
2950
+ react: require8.resolve("next/dist/compiled/react"),
2951
+ "react-dom/server": require8.resolve(
1035
2952
  executionEnvironment === "node" ? "next/dist/compiled/react-dom/server.js" : "next/dist/compiled/react-dom/server.browser.js"
1036
2953
  ),
1037
- "react-dom/test-utils": require6.resolve(
2954
+ "react-dom/test-utils": require8.resolve(
1038
2955
  "next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js"
1039
2956
  ),
1040
- "react-dom/cjs/react-dom.development.js": require6.resolve(
2957
+ "react-dom/cjs/react-dom.development.js": require8.resolve(
1041
2958
  "next/dist/compiled/react-dom/cjs/react-dom.development.js"
1042
2959
  ),
1043
- "react-dom/client": require6.resolve(
2960
+ "react-dom/client": require8.resolve(
1044
2961
  "next/dist/compiled/react-dom/client.js"
1045
2962
  ),
1046
- "react-dom": require6.resolve("next/dist/compiled/react-dom")
2963
+ "react-dom": require8.resolve("next/dist/compiled/react-dom")
1047
2964
  }
1048
2965
  }
1049
2966
  };
@@ -1051,7 +2968,7 @@ function VitePlugin({ dir = process.cwd() } = {}) {
1051
2968
  configResolved(config) {
1052
2969
  if (isVitestEnv && !config.test?.browser?.enabled) {
1053
2970
  config.test.setupFiles = [
1054
- require6.resolve("./mocks/storybook.global.js"),
2971
+ require8.resolve("./mocks/storybook.global.js"),
1055
2972
  ...config.test?.setupFiles ?? []
1056
2973
  ];
1057
2974
  }