@rsbuild/core 0.7.7 → 0.7.8

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.
@@ -0,0 +1,2585 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
3
+
4
+ /***/ 483:
5
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
6
+
7
+ const ANY = Symbol('SemVer ANY')
8
+ // hoisted class for cyclic dependency
9
+ class Comparator {
10
+ static get ANY () {
11
+ return ANY
12
+ }
13
+
14
+ constructor (comp, options) {
15
+ options = parseOptions(options)
16
+
17
+ if (comp instanceof Comparator) {
18
+ if (comp.loose === !!options.loose) {
19
+ return comp
20
+ } else {
21
+ comp = comp.value
22
+ }
23
+ }
24
+
25
+ comp = comp.trim().split(/\s+/).join(' ')
26
+ debug('comparator', comp, options)
27
+ this.options = options
28
+ this.loose = !!options.loose
29
+ this.parse(comp)
30
+
31
+ if (this.semver === ANY) {
32
+ this.value = ''
33
+ } else {
34
+ this.value = this.operator + this.semver.version
35
+ }
36
+
37
+ debug('comp', this)
38
+ }
39
+
40
+ parse (comp) {
41
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
42
+ const m = comp.match(r)
43
+
44
+ if (!m) {
45
+ throw new TypeError(`Invalid comparator: ${comp}`)
46
+ }
47
+
48
+ this.operator = m[1] !== undefined ? m[1] : ''
49
+ if (this.operator === '=') {
50
+ this.operator = ''
51
+ }
52
+
53
+ // if it literally is just '>' or '' then allow anything.
54
+ if (!m[2]) {
55
+ this.semver = ANY
56
+ } else {
57
+ this.semver = new SemVer(m[2], this.options.loose)
58
+ }
59
+ }
60
+
61
+ toString () {
62
+ return this.value
63
+ }
64
+
65
+ test (version) {
66
+ debug('Comparator.test', version, this.options.loose)
67
+
68
+ if (this.semver === ANY || version === ANY) {
69
+ return true
70
+ }
71
+
72
+ if (typeof version === 'string') {
73
+ try {
74
+ version = new SemVer(version, this.options)
75
+ } catch (er) {
76
+ return false
77
+ }
78
+ }
79
+
80
+ return cmp(version, this.operator, this.semver, this.options)
81
+ }
82
+
83
+ intersects (comp, options) {
84
+ if (!(comp instanceof Comparator)) {
85
+ throw new TypeError('a Comparator is required')
86
+ }
87
+
88
+ if (this.operator === '') {
89
+ if (this.value === '') {
90
+ return true
91
+ }
92
+ return new Range(comp.value, options).test(this.value)
93
+ } else if (comp.operator === '') {
94
+ if (comp.value === '') {
95
+ return true
96
+ }
97
+ return new Range(this.value, options).test(comp.semver)
98
+ }
99
+
100
+ options = parseOptions(options)
101
+
102
+ // Special cases where nothing can possibly be lower
103
+ if (options.includePrerelease &&
104
+ (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
105
+ return false
106
+ }
107
+ if (!options.includePrerelease &&
108
+ (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
109
+ return false
110
+ }
111
+
112
+ // Same direction increasing (> or >=)
113
+ if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
114
+ return true
115
+ }
116
+ // Same direction decreasing (< or <=)
117
+ if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
118
+ return true
119
+ }
120
+ // same SemVer and both sides are inclusive (<= or >=)
121
+ if (
122
+ (this.semver.version === comp.semver.version) &&
123
+ this.operator.includes('=') && comp.operator.includes('=')) {
124
+ return true
125
+ }
126
+ // opposite directions less than
127
+ if (cmp(this.semver, '<', comp.semver, options) &&
128
+ this.operator.startsWith('>') && comp.operator.startsWith('<')) {
129
+ return true
130
+ }
131
+ // opposite directions greater than
132
+ if (cmp(this.semver, '>', comp.semver, options) &&
133
+ this.operator.startsWith('<') && comp.operator.startsWith('>')) {
134
+ return true
135
+ }
136
+ return false
137
+ }
138
+ }
139
+
140
+ module.exports = Comparator
141
+
142
+ const parseOptions = __nccwpck_require__(923)
143
+ const { safeRe: re, t } = __nccwpck_require__(990)
144
+ const cmp = __nccwpck_require__(214)
145
+ const debug = __nccwpck_require__(743)
146
+ const SemVer = __nccwpck_require__(260)
147
+ const Range = __nccwpck_require__(966)
148
+
149
+
150
+ /***/ }),
151
+
152
+ /***/ 966:
153
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
154
+
155
+ // hoisted class for cyclic dependency
156
+ class Range {
157
+ constructor (range, options) {
158
+ options = parseOptions(options)
159
+
160
+ if (range instanceof Range) {
161
+ if (
162
+ range.loose === !!options.loose &&
163
+ range.includePrerelease === !!options.includePrerelease
164
+ ) {
165
+ return range
166
+ } else {
167
+ return new Range(range.raw, options)
168
+ }
169
+ }
170
+
171
+ if (range instanceof Comparator) {
172
+ // just put it in the set and return
173
+ this.raw = range.value
174
+ this.set = [[range]]
175
+ this.format()
176
+ return this
177
+ }
178
+
179
+ this.options = options
180
+ this.loose = !!options.loose
181
+ this.includePrerelease = !!options.includePrerelease
182
+
183
+ // First reduce all whitespace as much as possible so we do not have to rely
184
+ // on potentially slow regexes like \s*. This is then stored and used for
185
+ // future error messages as well.
186
+ this.raw = range
187
+ .trim()
188
+ .split(/\s+/)
189
+ .join(' ')
190
+
191
+ // First, split on ||
192
+ this.set = this.raw
193
+ .split('||')
194
+ // map the range to a 2d array of comparators
195
+ .map(r => this.parseRange(r.trim()))
196
+ // throw out any comparator lists that are empty
197
+ // this generally means that it was not a valid range, which is allowed
198
+ // in loose mode, but will still throw if the WHOLE range is invalid.
199
+ .filter(c => c.length)
200
+
201
+ if (!this.set.length) {
202
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
203
+ }
204
+
205
+ // if we have any that are not the null set, throw out null sets.
206
+ if (this.set.length > 1) {
207
+ // keep the first one, in case they're all null sets
208
+ const first = this.set[0]
209
+ this.set = this.set.filter(c => !isNullSet(c[0]))
210
+ if (this.set.length === 0) {
211
+ this.set = [first]
212
+ } else if (this.set.length > 1) {
213
+ // if we have any that are *, then the range is just *
214
+ for (const c of this.set) {
215
+ if (c.length === 1 && isAny(c[0])) {
216
+ this.set = [c]
217
+ break
218
+ }
219
+ }
220
+ }
221
+ }
222
+
223
+ this.format()
224
+ }
225
+
226
+ format () {
227
+ this.range = this.set
228
+ .map((comps) => comps.join(' ').trim())
229
+ .join('||')
230
+ .trim()
231
+ return this.range
232
+ }
233
+
234
+ toString () {
235
+ return this.range
236
+ }
237
+
238
+ parseRange (range) {
239
+ // memoize range parsing for performance.
240
+ // this is a very hot path, and fully deterministic.
241
+ const memoOpts =
242
+ (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
243
+ (this.options.loose && FLAG_LOOSE)
244
+ const memoKey = memoOpts + ':' + range
245
+ const cached = cache.get(memoKey)
246
+ if (cached) {
247
+ return cached
248
+ }
249
+
250
+ const loose = this.options.loose
251
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
252
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
253
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
254
+ debug('hyphen replace', range)
255
+
256
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
257
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
258
+ debug('comparator trim', range)
259
+
260
+ // `~ 1.2.3` => `~1.2.3`
261
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
262
+ debug('tilde trim', range)
263
+
264
+ // `^ 1.2.3` => `^1.2.3`
265
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
266
+ debug('caret trim', range)
267
+
268
+ // At this point, the range is completely trimmed and
269
+ // ready to be split into comparators.
270
+
271
+ let rangeList = range
272
+ .split(' ')
273
+ .map(comp => parseComparator(comp, this.options))
274
+ .join(' ')
275
+ .split(/\s+/)
276
+ // >=0.0.0 is equivalent to *
277
+ .map(comp => replaceGTE0(comp, this.options))
278
+
279
+ if (loose) {
280
+ // in loose mode, throw out any that are not valid comparators
281
+ rangeList = rangeList.filter(comp => {
282
+ debug('loose invalid filter', comp, this.options)
283
+ return !!comp.match(re[t.COMPARATORLOOSE])
284
+ })
285
+ }
286
+ debug('range list', rangeList)
287
+
288
+ // if any comparators are the null set, then replace with JUST null set
289
+ // if more than one comparator, remove any * comparators
290
+ // also, don't include the same comparator more than once
291
+ const rangeMap = new Map()
292
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options))
293
+ for (const comp of comparators) {
294
+ if (isNullSet(comp)) {
295
+ return [comp]
296
+ }
297
+ rangeMap.set(comp.value, comp)
298
+ }
299
+ if (rangeMap.size > 1 && rangeMap.has('')) {
300
+ rangeMap.delete('')
301
+ }
302
+
303
+ const result = [...rangeMap.values()]
304
+ cache.set(memoKey, result)
305
+ return result
306
+ }
307
+
308
+ intersects (range, options) {
309
+ if (!(range instanceof Range)) {
310
+ throw new TypeError('a Range is required')
311
+ }
312
+
313
+ return this.set.some((thisComparators) => {
314
+ return (
315
+ isSatisfiable(thisComparators, options) &&
316
+ range.set.some((rangeComparators) => {
317
+ return (
318
+ isSatisfiable(rangeComparators, options) &&
319
+ thisComparators.every((thisComparator) => {
320
+ return rangeComparators.every((rangeComparator) => {
321
+ return thisComparator.intersects(rangeComparator, options)
322
+ })
323
+ })
324
+ )
325
+ })
326
+ )
327
+ })
328
+ }
329
+
330
+ // if ANY of the sets match ALL of its comparators, then pass
331
+ test (version) {
332
+ if (!version) {
333
+ return false
334
+ }
335
+
336
+ if (typeof version === 'string') {
337
+ try {
338
+ version = new SemVer(version, this.options)
339
+ } catch (er) {
340
+ return false
341
+ }
342
+ }
343
+
344
+ for (let i = 0; i < this.set.length; i++) {
345
+ if (testSet(this.set[i], version, this.options)) {
346
+ return true
347
+ }
348
+ }
349
+ return false
350
+ }
351
+ }
352
+
353
+ module.exports = Range
354
+
355
+ const LRU = __nccwpck_require__(349)
356
+ const cache = new LRU()
357
+
358
+ const parseOptions = __nccwpck_require__(923)
359
+ const Comparator = __nccwpck_require__(483)
360
+ const debug = __nccwpck_require__(743)
361
+ const SemVer = __nccwpck_require__(260)
362
+ const {
363
+ safeRe: re,
364
+ t,
365
+ comparatorTrimReplace,
366
+ tildeTrimReplace,
367
+ caretTrimReplace,
368
+ } = __nccwpck_require__(990)
369
+ const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(387)
370
+
371
+ const isNullSet = c => c.value === '<0.0.0-0'
372
+ const isAny = c => c.value === ''
373
+
374
+ // take a set of comparators and determine whether there
375
+ // exists a version which can satisfy it
376
+ const isSatisfiable = (comparators, options) => {
377
+ let result = true
378
+ const remainingComparators = comparators.slice()
379
+ let testComparator = remainingComparators.pop()
380
+
381
+ while (result && remainingComparators.length) {
382
+ result = remainingComparators.every((otherComparator) => {
383
+ return testComparator.intersects(otherComparator, options)
384
+ })
385
+
386
+ testComparator = remainingComparators.pop()
387
+ }
388
+
389
+ return result
390
+ }
391
+
392
+ // comprised of xranges, tildes, stars, and gtlt's at this point.
393
+ // already replaced the hyphen ranges
394
+ // turn into a set of JUST comparators.
395
+ const parseComparator = (comp, options) => {
396
+ debug('comp', comp, options)
397
+ comp = replaceCarets(comp, options)
398
+ debug('caret', comp)
399
+ comp = replaceTildes(comp, options)
400
+ debug('tildes', comp)
401
+ comp = replaceXRanges(comp, options)
402
+ debug('xrange', comp)
403
+ comp = replaceStars(comp, options)
404
+ debug('stars', comp)
405
+ return comp
406
+ }
407
+
408
+ const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
409
+
410
+ // ~, ~> --> * (any, kinda silly)
411
+ // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
412
+ // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
413
+ // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
414
+ // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
415
+ // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
416
+ // ~0.0.1 --> >=0.0.1 <0.1.0-0
417
+ const replaceTildes = (comp, options) => {
418
+ return comp
419
+ .trim()
420
+ .split(/\s+/)
421
+ .map((c) => replaceTilde(c, options))
422
+ .join(' ')
423
+ }
424
+
425
+ const replaceTilde = (comp, options) => {
426
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
427
+ return comp.replace(r, (_, M, m, p, pr) => {
428
+ debug('tilde', comp, _, M, m, p, pr)
429
+ let ret
430
+
431
+ if (isX(M)) {
432
+ ret = ''
433
+ } else if (isX(m)) {
434
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
435
+ } else if (isX(p)) {
436
+ // ~1.2 == >=1.2.0 <1.3.0-0
437
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
438
+ } else if (pr) {
439
+ debug('replaceTilde pr', pr)
440
+ ret = `>=${M}.${m}.${p}-${pr
441
+ } <${M}.${+m + 1}.0-0`
442
+ } else {
443
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
444
+ ret = `>=${M}.${m}.${p
445
+ } <${M}.${+m + 1}.0-0`
446
+ }
447
+
448
+ debug('tilde return', ret)
449
+ return ret
450
+ })
451
+ }
452
+
453
+ // ^ --> * (any, kinda silly)
454
+ // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
455
+ // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
456
+ // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
457
+ // ^1.2.3 --> >=1.2.3 <2.0.0-0
458
+ // ^1.2.0 --> >=1.2.0 <2.0.0-0
459
+ // ^0.0.1 --> >=0.0.1 <0.0.2-0
460
+ // ^0.1.0 --> >=0.1.0 <0.2.0-0
461
+ const replaceCarets = (comp, options) => {
462
+ return comp
463
+ .trim()
464
+ .split(/\s+/)
465
+ .map((c) => replaceCaret(c, options))
466
+ .join(' ')
467
+ }
468
+
469
+ const replaceCaret = (comp, options) => {
470
+ debug('caret', comp, options)
471
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
472
+ const z = options.includePrerelease ? '-0' : ''
473
+ return comp.replace(r, (_, M, m, p, pr) => {
474
+ debug('caret', comp, _, M, m, p, pr)
475
+ let ret
476
+
477
+ if (isX(M)) {
478
+ ret = ''
479
+ } else if (isX(m)) {
480
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
481
+ } else if (isX(p)) {
482
+ if (M === '0') {
483
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
484
+ } else {
485
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
486
+ }
487
+ } else if (pr) {
488
+ debug('replaceCaret pr', pr)
489
+ if (M === '0') {
490
+ if (m === '0') {
491
+ ret = `>=${M}.${m}.${p}-${pr
492
+ } <${M}.${m}.${+p + 1}-0`
493
+ } else {
494
+ ret = `>=${M}.${m}.${p}-${pr
495
+ } <${M}.${+m + 1}.0-0`
496
+ }
497
+ } else {
498
+ ret = `>=${M}.${m}.${p}-${pr
499
+ } <${+M + 1}.0.0-0`
500
+ }
501
+ } else {
502
+ debug('no pr')
503
+ if (M === '0') {
504
+ if (m === '0') {
505
+ ret = `>=${M}.${m}.${p
506
+ }${z} <${M}.${m}.${+p + 1}-0`
507
+ } else {
508
+ ret = `>=${M}.${m}.${p
509
+ }${z} <${M}.${+m + 1}.0-0`
510
+ }
511
+ } else {
512
+ ret = `>=${M}.${m}.${p
513
+ } <${+M + 1}.0.0-0`
514
+ }
515
+ }
516
+
517
+ debug('caret return', ret)
518
+ return ret
519
+ })
520
+ }
521
+
522
+ const replaceXRanges = (comp, options) => {
523
+ debug('replaceXRanges', comp, options)
524
+ return comp
525
+ .split(/\s+/)
526
+ .map((c) => replaceXRange(c, options))
527
+ .join(' ')
528
+ }
529
+
530
+ const replaceXRange = (comp, options) => {
531
+ comp = comp.trim()
532
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
533
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
534
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
535
+ const xM = isX(M)
536
+ const xm = xM || isX(m)
537
+ const xp = xm || isX(p)
538
+ const anyX = xp
539
+
540
+ if (gtlt === '=' && anyX) {
541
+ gtlt = ''
542
+ }
543
+
544
+ // if we're including prereleases in the match, then we need
545
+ // to fix this to -0, the lowest possible prerelease value
546
+ pr = options.includePrerelease ? '-0' : ''
547
+
548
+ if (xM) {
549
+ if (gtlt === '>' || gtlt === '<') {
550
+ // nothing is allowed
551
+ ret = '<0.0.0-0'
552
+ } else {
553
+ // nothing is forbidden
554
+ ret = '*'
555
+ }
556
+ } else if (gtlt && anyX) {
557
+ // we know patch is an x, because we have any x at all.
558
+ // replace X with 0
559
+ if (xm) {
560
+ m = 0
561
+ }
562
+ p = 0
563
+
564
+ if (gtlt === '>') {
565
+ // >1 => >=2.0.0
566
+ // >1.2 => >=1.3.0
567
+ gtlt = '>='
568
+ if (xm) {
569
+ M = +M + 1
570
+ m = 0
571
+ p = 0
572
+ } else {
573
+ m = +m + 1
574
+ p = 0
575
+ }
576
+ } else if (gtlt === '<=') {
577
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
578
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
579
+ gtlt = '<'
580
+ if (xm) {
581
+ M = +M + 1
582
+ } else {
583
+ m = +m + 1
584
+ }
585
+ }
586
+
587
+ if (gtlt === '<') {
588
+ pr = '-0'
589
+ }
590
+
591
+ ret = `${gtlt + M}.${m}.${p}${pr}`
592
+ } else if (xm) {
593
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
594
+ } else if (xp) {
595
+ ret = `>=${M}.${m}.0${pr
596
+ } <${M}.${+m + 1}.0-0`
597
+ }
598
+
599
+ debug('xRange return', ret)
600
+
601
+ return ret
602
+ })
603
+ }
604
+
605
+ // Because * is AND-ed with everything else in the comparator,
606
+ // and '' means "any version", just remove the *s entirely.
607
+ const replaceStars = (comp, options) => {
608
+ debug('replaceStars', comp, options)
609
+ // Looseness is ignored here. star is always as loose as it gets!
610
+ return comp
611
+ .trim()
612
+ .replace(re[t.STAR], '')
613
+ }
614
+
615
+ const replaceGTE0 = (comp, options) => {
616
+ debug('replaceGTE0', comp, options)
617
+ return comp
618
+ .trim()
619
+ .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
620
+ }
621
+
622
+ // This function is passed to string.replace(re[t.HYPHENRANGE])
623
+ // M, m, patch, prerelease, build
624
+ // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
625
+ // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
626
+ // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
627
+ // TODO build?
628
+ const hyphenReplace = incPr => ($0,
629
+ from, fM, fm, fp, fpr, fb,
630
+ to, tM, tm, tp, tpr) => {
631
+ if (isX(fM)) {
632
+ from = ''
633
+ } else if (isX(fm)) {
634
+ from = `>=${fM}.0.0${incPr ? '-0' : ''}`
635
+ } else if (isX(fp)) {
636
+ from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
637
+ } else if (fpr) {
638
+ from = `>=${from}`
639
+ } else {
640
+ from = `>=${from}${incPr ? '-0' : ''}`
641
+ }
642
+
643
+ if (isX(tM)) {
644
+ to = ''
645
+ } else if (isX(tm)) {
646
+ to = `<${+tM + 1}.0.0-0`
647
+ } else if (isX(tp)) {
648
+ to = `<${tM}.${+tm + 1}.0-0`
649
+ } else if (tpr) {
650
+ to = `<=${tM}.${tm}.${tp}-${tpr}`
651
+ } else if (incPr) {
652
+ to = `<${tM}.${tm}.${+tp + 1}-0`
653
+ } else {
654
+ to = `<=${to}`
655
+ }
656
+
657
+ return `${from} ${to}`.trim()
658
+ }
659
+
660
+ const testSet = (set, version, options) => {
661
+ for (let i = 0; i < set.length; i++) {
662
+ if (!set[i].test(version)) {
663
+ return false
664
+ }
665
+ }
666
+
667
+ if (version.prerelease.length && !options.includePrerelease) {
668
+ // Find the set of versions that are allowed to have prereleases
669
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
670
+ // That should allow `1.2.3-pr.2` to pass.
671
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
672
+ // even though it's within the range set by the comparators.
673
+ for (let i = 0; i < set.length; i++) {
674
+ debug(set[i].semver)
675
+ if (set[i].semver === Comparator.ANY) {
676
+ continue
677
+ }
678
+
679
+ if (set[i].semver.prerelease.length > 0) {
680
+ const allowed = set[i].semver
681
+ if (allowed.major === version.major &&
682
+ allowed.minor === version.minor &&
683
+ allowed.patch === version.patch) {
684
+ return true
685
+ }
686
+ }
687
+ }
688
+
689
+ // Version has a -pre, but it's not one of the ones we like.
690
+ return false
691
+ }
692
+
693
+ return true
694
+ }
695
+
696
+
697
+ /***/ }),
698
+
699
+ /***/ 260:
700
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
701
+
702
+ const debug = __nccwpck_require__(743)
703
+ const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(387)
704
+ const { safeRe: re, t } = __nccwpck_require__(990)
705
+
706
+ const parseOptions = __nccwpck_require__(923)
707
+ const { compareIdentifiers } = __nccwpck_require__(957)
708
+ class SemVer {
709
+ constructor (version, options) {
710
+ options = parseOptions(options)
711
+
712
+ if (version instanceof SemVer) {
713
+ if (version.loose === !!options.loose &&
714
+ version.includePrerelease === !!options.includePrerelease) {
715
+ return version
716
+ } else {
717
+ version = version.version
718
+ }
719
+ } else if (typeof version !== 'string') {
720
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
721
+ }
722
+
723
+ if (version.length > MAX_LENGTH) {
724
+ throw new TypeError(
725
+ `version is longer than ${MAX_LENGTH} characters`
726
+ )
727
+ }
728
+
729
+ debug('SemVer', version, options)
730
+ this.options = options
731
+ this.loose = !!options.loose
732
+ // this isn't actually relevant for versions, but keep it so that we
733
+ // don't run into trouble passing this.options around.
734
+ this.includePrerelease = !!options.includePrerelease
735
+
736
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
737
+
738
+ if (!m) {
739
+ throw new TypeError(`Invalid Version: ${version}`)
740
+ }
741
+
742
+ this.raw = version
743
+
744
+ // these are actually numbers
745
+ this.major = +m[1]
746
+ this.minor = +m[2]
747
+ this.patch = +m[3]
748
+
749
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
750
+ throw new TypeError('Invalid major version')
751
+ }
752
+
753
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
754
+ throw new TypeError('Invalid minor version')
755
+ }
756
+
757
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
758
+ throw new TypeError('Invalid patch version')
759
+ }
760
+
761
+ // numberify any prerelease numeric ids
762
+ if (!m[4]) {
763
+ this.prerelease = []
764
+ } else {
765
+ this.prerelease = m[4].split('.').map((id) => {
766
+ if (/^[0-9]+$/.test(id)) {
767
+ const num = +id
768
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
769
+ return num
770
+ }
771
+ }
772
+ return id
773
+ })
774
+ }
775
+
776
+ this.build = m[5] ? m[5].split('.') : []
777
+ this.format()
778
+ }
779
+
780
+ format () {
781
+ this.version = `${this.major}.${this.minor}.${this.patch}`
782
+ if (this.prerelease.length) {
783
+ this.version += `-${this.prerelease.join('.')}`
784
+ }
785
+ return this.version
786
+ }
787
+
788
+ toString () {
789
+ return this.version
790
+ }
791
+
792
+ compare (other) {
793
+ debug('SemVer.compare', this.version, this.options, other)
794
+ if (!(other instanceof SemVer)) {
795
+ if (typeof other === 'string' && other === this.version) {
796
+ return 0
797
+ }
798
+ other = new SemVer(other, this.options)
799
+ }
800
+
801
+ if (other.version === this.version) {
802
+ return 0
803
+ }
804
+
805
+ return this.compareMain(other) || this.comparePre(other)
806
+ }
807
+
808
+ compareMain (other) {
809
+ if (!(other instanceof SemVer)) {
810
+ other = new SemVer(other, this.options)
811
+ }
812
+
813
+ return (
814
+ compareIdentifiers(this.major, other.major) ||
815
+ compareIdentifiers(this.minor, other.minor) ||
816
+ compareIdentifiers(this.patch, other.patch)
817
+ )
818
+ }
819
+
820
+ comparePre (other) {
821
+ if (!(other instanceof SemVer)) {
822
+ other = new SemVer(other, this.options)
823
+ }
824
+
825
+ // NOT having a prerelease is > having one
826
+ if (this.prerelease.length && !other.prerelease.length) {
827
+ return -1
828
+ } else if (!this.prerelease.length && other.prerelease.length) {
829
+ return 1
830
+ } else if (!this.prerelease.length && !other.prerelease.length) {
831
+ return 0
832
+ }
833
+
834
+ let i = 0
835
+ do {
836
+ const a = this.prerelease[i]
837
+ const b = other.prerelease[i]
838
+ debug('prerelease compare', i, a, b)
839
+ if (a === undefined && b === undefined) {
840
+ return 0
841
+ } else if (b === undefined) {
842
+ return 1
843
+ } else if (a === undefined) {
844
+ return -1
845
+ } else if (a === b) {
846
+ continue
847
+ } else {
848
+ return compareIdentifiers(a, b)
849
+ }
850
+ } while (++i)
851
+ }
852
+
853
+ compareBuild (other) {
854
+ if (!(other instanceof SemVer)) {
855
+ other = new SemVer(other, this.options)
856
+ }
857
+
858
+ let i = 0
859
+ do {
860
+ const a = this.build[i]
861
+ const b = other.build[i]
862
+ debug('build compare', i, a, b)
863
+ if (a === undefined && b === undefined) {
864
+ return 0
865
+ } else if (b === undefined) {
866
+ return 1
867
+ } else if (a === undefined) {
868
+ return -1
869
+ } else if (a === b) {
870
+ continue
871
+ } else {
872
+ return compareIdentifiers(a, b)
873
+ }
874
+ } while (++i)
875
+ }
876
+
877
+ // preminor will bump the version up to the next minor release, and immediately
878
+ // down to pre-release. premajor and prepatch work the same way.
879
+ inc (release, identifier, identifierBase) {
880
+ switch (release) {
881
+ case 'premajor':
882
+ this.prerelease.length = 0
883
+ this.patch = 0
884
+ this.minor = 0
885
+ this.major++
886
+ this.inc('pre', identifier, identifierBase)
887
+ break
888
+ case 'preminor':
889
+ this.prerelease.length = 0
890
+ this.patch = 0
891
+ this.minor++
892
+ this.inc('pre', identifier, identifierBase)
893
+ break
894
+ case 'prepatch':
895
+ // If this is already a prerelease, it will bump to the next version
896
+ // drop any prereleases that might already exist, since they are not
897
+ // relevant at this point.
898
+ this.prerelease.length = 0
899
+ this.inc('patch', identifier, identifierBase)
900
+ this.inc('pre', identifier, identifierBase)
901
+ break
902
+ // If the input is a non-prerelease version, this acts the same as
903
+ // prepatch.
904
+ case 'prerelease':
905
+ if (this.prerelease.length === 0) {
906
+ this.inc('patch', identifier, identifierBase)
907
+ }
908
+ this.inc('pre', identifier, identifierBase)
909
+ break
910
+
911
+ case 'major':
912
+ // If this is a pre-major version, bump up to the same major version.
913
+ // Otherwise increment major.
914
+ // 1.0.0-5 bumps to 1.0.0
915
+ // 1.1.0 bumps to 2.0.0
916
+ if (
917
+ this.minor !== 0 ||
918
+ this.patch !== 0 ||
919
+ this.prerelease.length === 0
920
+ ) {
921
+ this.major++
922
+ }
923
+ this.minor = 0
924
+ this.patch = 0
925
+ this.prerelease = []
926
+ break
927
+ case 'minor':
928
+ // If this is a pre-minor version, bump up to the same minor version.
929
+ // Otherwise increment minor.
930
+ // 1.2.0-5 bumps to 1.2.0
931
+ // 1.2.1 bumps to 1.3.0
932
+ if (this.patch !== 0 || this.prerelease.length === 0) {
933
+ this.minor++
934
+ }
935
+ this.patch = 0
936
+ this.prerelease = []
937
+ break
938
+ case 'patch':
939
+ // If this is not a pre-release version, it will increment the patch.
940
+ // If it is a pre-release it will bump up to the same patch version.
941
+ // 1.2.0-5 patches to 1.2.0
942
+ // 1.2.0 patches to 1.2.1
943
+ if (this.prerelease.length === 0) {
944
+ this.patch++
945
+ }
946
+ this.prerelease = []
947
+ break
948
+ // This probably shouldn't be used publicly.
949
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
950
+ case 'pre': {
951
+ const base = Number(identifierBase) ? 1 : 0
952
+
953
+ if (!identifier && identifierBase === false) {
954
+ throw new Error('invalid increment argument: identifier is empty')
955
+ }
956
+
957
+ if (this.prerelease.length === 0) {
958
+ this.prerelease = [base]
959
+ } else {
960
+ let i = this.prerelease.length
961
+ while (--i >= 0) {
962
+ if (typeof this.prerelease[i] === 'number') {
963
+ this.prerelease[i]++
964
+ i = -2
965
+ }
966
+ }
967
+ if (i === -1) {
968
+ // didn't increment anything
969
+ if (identifier === this.prerelease.join('.') && identifierBase === false) {
970
+ throw new Error('invalid increment argument: identifier already exists')
971
+ }
972
+ this.prerelease.push(base)
973
+ }
974
+ }
975
+ if (identifier) {
976
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
977
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
978
+ let prerelease = [identifier, base]
979
+ if (identifierBase === false) {
980
+ prerelease = [identifier]
981
+ }
982
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
983
+ if (isNaN(this.prerelease[1])) {
984
+ this.prerelease = prerelease
985
+ }
986
+ } else {
987
+ this.prerelease = prerelease
988
+ }
989
+ }
990
+ break
991
+ }
992
+ default:
993
+ throw new Error(`invalid increment argument: ${release}`)
994
+ }
995
+ this.raw = this.format()
996
+ if (this.build.length) {
997
+ this.raw += `+${this.build.join('.')}`
998
+ }
999
+ return this
1000
+ }
1001
+ }
1002
+
1003
+ module.exports = SemVer
1004
+
1005
+
1006
+ /***/ }),
1007
+
1008
+ /***/ 854:
1009
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1010
+
1011
+ const parse = __nccwpck_require__(903)
1012
+ const clean = (version, options) => {
1013
+ const s = parse(version.trim().replace(/^[=v]+/, ''), options)
1014
+ return s ? s.version : null
1015
+ }
1016
+ module.exports = clean
1017
+
1018
+
1019
+ /***/ }),
1020
+
1021
+ /***/ 214:
1022
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1023
+
1024
+ const eq = __nccwpck_require__(538)
1025
+ const neq = __nccwpck_require__(821)
1026
+ const gt = __nccwpck_require__(572)
1027
+ const gte = __nccwpck_require__(639)
1028
+ const lt = __nccwpck_require__(155)
1029
+ const lte = __nccwpck_require__(983)
1030
+
1031
+ const cmp = (a, op, b, loose) => {
1032
+ switch (op) {
1033
+ case '===':
1034
+ if (typeof a === 'object') {
1035
+ a = a.version
1036
+ }
1037
+ if (typeof b === 'object') {
1038
+ b = b.version
1039
+ }
1040
+ return a === b
1041
+
1042
+ case '!==':
1043
+ if (typeof a === 'object') {
1044
+ a = a.version
1045
+ }
1046
+ if (typeof b === 'object') {
1047
+ b = b.version
1048
+ }
1049
+ return a !== b
1050
+
1051
+ case '':
1052
+ case '=':
1053
+ case '==':
1054
+ return eq(a, b, loose)
1055
+
1056
+ case '!=':
1057
+ return neq(a, b, loose)
1058
+
1059
+ case '>':
1060
+ return gt(a, b, loose)
1061
+
1062
+ case '>=':
1063
+ return gte(a, b, loose)
1064
+
1065
+ case '<':
1066
+ return lt(a, b, loose)
1067
+
1068
+ case '<=':
1069
+ return lte(a, b, loose)
1070
+
1071
+ default:
1072
+ throw new TypeError(`Invalid operator: ${op}`)
1073
+ }
1074
+ }
1075
+ module.exports = cmp
1076
+
1077
+
1078
+ /***/ }),
1079
+
1080
+ /***/ 922:
1081
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1082
+
1083
+ const SemVer = __nccwpck_require__(260)
1084
+ const parse = __nccwpck_require__(903)
1085
+ const { safeRe: re, t } = __nccwpck_require__(990)
1086
+
1087
+ const coerce = (version, options) => {
1088
+ if (version instanceof SemVer) {
1089
+ return version
1090
+ }
1091
+
1092
+ if (typeof version === 'number') {
1093
+ version = String(version)
1094
+ }
1095
+
1096
+ if (typeof version !== 'string') {
1097
+ return null
1098
+ }
1099
+
1100
+ options = options || {}
1101
+
1102
+ let match = null
1103
+ if (!options.rtl) {
1104
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
1105
+ } else {
1106
+ // Find the right-most coercible string that does not share
1107
+ // a terminus with a more left-ward coercible string.
1108
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
1109
+ // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
1110
+ //
1111
+ // Walk through the string checking with a /g regexp
1112
+ // Manually set the index so as to pick up overlapping matches.
1113
+ // Stop when we get a match that ends at the string end, since no
1114
+ // coercible string can be more right-ward without the same terminus.
1115
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
1116
+ let next
1117
+ while ((next = coerceRtlRegex.exec(version)) &&
1118
+ (!match || match.index + match[0].length !== version.length)
1119
+ ) {
1120
+ if (!match ||
1121
+ next.index + next[0].length !== match.index + match[0].length) {
1122
+ match = next
1123
+ }
1124
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
1125
+ }
1126
+ // leave it in a clean state
1127
+ coerceRtlRegex.lastIndex = -1
1128
+ }
1129
+
1130
+ if (match === null) {
1131
+ return null
1132
+ }
1133
+
1134
+ const major = match[2]
1135
+ const minor = match[3] || '0'
1136
+ const patch = match[4] || '0'
1137
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
1138
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
1139
+
1140
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
1141
+ }
1142
+ module.exports = coerce
1143
+
1144
+
1145
+ /***/ }),
1146
+
1147
+ /***/ 230:
1148
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1149
+
1150
+ const SemVer = __nccwpck_require__(260)
1151
+ const compareBuild = (a, b, loose) => {
1152
+ const versionA = new SemVer(a, loose)
1153
+ const versionB = new SemVer(b, loose)
1154
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
1155
+ }
1156
+ module.exports = compareBuild
1157
+
1158
+
1159
+ /***/ }),
1160
+
1161
+ /***/ 55:
1162
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1163
+
1164
+ const compare = __nccwpck_require__(755)
1165
+ const compareLoose = (a, b) => compare(a, b, true)
1166
+ module.exports = compareLoose
1167
+
1168
+
1169
+ /***/ }),
1170
+
1171
+ /***/ 755:
1172
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1173
+
1174
+ const SemVer = __nccwpck_require__(260)
1175
+ const compare = (a, b, loose) =>
1176
+ new SemVer(a, loose).compare(new SemVer(b, loose))
1177
+
1178
+ module.exports = compare
1179
+
1180
+
1181
+ /***/ }),
1182
+
1183
+ /***/ 833:
1184
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1185
+
1186
+ const parse = __nccwpck_require__(903)
1187
+
1188
+ const diff = (version1, version2) => {
1189
+ const v1 = parse(version1, null, true)
1190
+ const v2 = parse(version2, null, true)
1191
+ const comparison = v1.compare(v2)
1192
+
1193
+ if (comparison === 0) {
1194
+ return null
1195
+ }
1196
+
1197
+ const v1Higher = comparison > 0
1198
+ const highVersion = v1Higher ? v1 : v2
1199
+ const lowVersion = v1Higher ? v2 : v1
1200
+ const highHasPre = !!highVersion.prerelease.length
1201
+ const lowHasPre = !!lowVersion.prerelease.length
1202
+
1203
+ if (lowHasPre && !highHasPre) {
1204
+ // Going from prerelease -> no prerelease requires some special casing
1205
+
1206
+ // If the low version has only a major, then it will always be a major
1207
+ // Some examples:
1208
+ // 1.0.0-1 -> 1.0.0
1209
+ // 1.0.0-1 -> 1.1.1
1210
+ // 1.0.0-1 -> 2.0.0
1211
+ if (!lowVersion.patch && !lowVersion.minor) {
1212
+ return 'major'
1213
+ }
1214
+
1215
+ // Otherwise it can be determined by checking the high version
1216
+
1217
+ if (highVersion.patch) {
1218
+ // anything higher than a patch bump would result in the wrong version
1219
+ return 'patch'
1220
+ }
1221
+
1222
+ if (highVersion.minor) {
1223
+ // anything higher than a minor bump would result in the wrong version
1224
+ return 'minor'
1225
+ }
1226
+
1227
+ // bumping major/minor/patch all have same result
1228
+ return 'major'
1229
+ }
1230
+
1231
+ // add the `pre` prefix if we are going to a prerelease version
1232
+ const prefix = highHasPre ? 'pre' : ''
1233
+
1234
+ if (v1.major !== v2.major) {
1235
+ return prefix + 'major'
1236
+ }
1237
+
1238
+ if (v1.minor !== v2.minor) {
1239
+ return prefix + 'minor'
1240
+ }
1241
+
1242
+ if (v1.patch !== v2.patch) {
1243
+ return prefix + 'patch'
1244
+ }
1245
+
1246
+ // high and low are preleases
1247
+ return 'prerelease'
1248
+ }
1249
+
1250
+ module.exports = diff
1251
+
1252
+
1253
+ /***/ }),
1254
+
1255
+ /***/ 538:
1256
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1257
+
1258
+ const compare = __nccwpck_require__(755)
1259
+ const eq = (a, b, loose) => compare(a, b, loose) === 0
1260
+ module.exports = eq
1261
+
1262
+
1263
+ /***/ }),
1264
+
1265
+ /***/ 572:
1266
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1267
+
1268
+ const compare = __nccwpck_require__(755)
1269
+ const gt = (a, b, loose) => compare(a, b, loose) > 0
1270
+ module.exports = gt
1271
+
1272
+
1273
+ /***/ }),
1274
+
1275
+ /***/ 639:
1276
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1277
+
1278
+ const compare = __nccwpck_require__(755)
1279
+ const gte = (a, b, loose) => compare(a, b, loose) >= 0
1280
+ module.exports = gte
1281
+
1282
+
1283
+ /***/ }),
1284
+
1285
+ /***/ 207:
1286
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1287
+
1288
+ const SemVer = __nccwpck_require__(260)
1289
+
1290
+ const inc = (version, release, options, identifier, identifierBase) => {
1291
+ if (typeof (options) === 'string') {
1292
+ identifierBase = identifier
1293
+ identifier = options
1294
+ options = undefined
1295
+ }
1296
+
1297
+ try {
1298
+ return new SemVer(
1299
+ version instanceof SemVer ? version.version : version,
1300
+ options
1301
+ ).inc(release, identifier, identifierBase).version
1302
+ } catch (er) {
1303
+ return null
1304
+ }
1305
+ }
1306
+ module.exports = inc
1307
+
1308
+
1309
+ /***/ }),
1310
+
1311
+ /***/ 155:
1312
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1313
+
1314
+ const compare = __nccwpck_require__(755)
1315
+ const lt = (a, b, loose) => compare(a, b, loose) < 0
1316
+ module.exports = lt
1317
+
1318
+
1319
+ /***/ }),
1320
+
1321
+ /***/ 983:
1322
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1323
+
1324
+ const compare = __nccwpck_require__(755)
1325
+ const lte = (a, b, loose) => compare(a, b, loose) <= 0
1326
+ module.exports = lte
1327
+
1328
+
1329
+ /***/ }),
1330
+
1331
+ /***/ 474:
1332
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1333
+
1334
+ const SemVer = __nccwpck_require__(260)
1335
+ const major = (a, loose) => new SemVer(a, loose).major
1336
+ module.exports = major
1337
+
1338
+
1339
+ /***/ }),
1340
+
1341
+ /***/ 561:
1342
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1343
+
1344
+ const SemVer = __nccwpck_require__(260)
1345
+ const minor = (a, loose) => new SemVer(a, loose).minor
1346
+ module.exports = minor
1347
+
1348
+
1349
+ /***/ }),
1350
+
1351
+ /***/ 821:
1352
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1353
+
1354
+ const compare = __nccwpck_require__(755)
1355
+ const neq = (a, b, loose) => compare(a, b, loose) !== 0
1356
+ module.exports = neq
1357
+
1358
+
1359
+ /***/ }),
1360
+
1361
+ /***/ 903:
1362
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1363
+
1364
+ const SemVer = __nccwpck_require__(260)
1365
+ const parse = (version, options, throwErrors = false) => {
1366
+ if (version instanceof SemVer) {
1367
+ return version
1368
+ }
1369
+ try {
1370
+ return new SemVer(version, options)
1371
+ } catch (er) {
1372
+ if (!throwErrors) {
1373
+ return null
1374
+ }
1375
+ throw er
1376
+ }
1377
+ }
1378
+
1379
+ module.exports = parse
1380
+
1381
+
1382
+ /***/ }),
1383
+
1384
+ /***/ 133:
1385
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1386
+
1387
+ const SemVer = __nccwpck_require__(260)
1388
+ const patch = (a, loose) => new SemVer(a, loose).patch
1389
+ module.exports = patch
1390
+
1391
+
1392
+ /***/ }),
1393
+
1394
+ /***/ 711:
1395
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1396
+
1397
+ const parse = __nccwpck_require__(903)
1398
+ const prerelease = (version, options) => {
1399
+ const parsed = parse(version, options)
1400
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
1401
+ }
1402
+ module.exports = prerelease
1403
+
1404
+
1405
+ /***/ }),
1406
+
1407
+ /***/ 311:
1408
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1409
+
1410
+ const compare = __nccwpck_require__(755)
1411
+ const rcompare = (a, b, loose) => compare(b, a, loose)
1412
+ module.exports = rcompare
1413
+
1414
+
1415
+ /***/ }),
1416
+
1417
+ /***/ 455:
1418
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1419
+
1420
+ const compareBuild = __nccwpck_require__(230)
1421
+ const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
1422
+ module.exports = rsort
1423
+
1424
+
1425
+ /***/ }),
1426
+
1427
+ /***/ 161:
1428
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1429
+
1430
+ const Range = __nccwpck_require__(966)
1431
+ const satisfies = (version, range, options) => {
1432
+ try {
1433
+ range = new Range(range, options)
1434
+ } catch (er) {
1435
+ return false
1436
+ }
1437
+ return range.test(version)
1438
+ }
1439
+ module.exports = satisfies
1440
+
1441
+
1442
+ /***/ }),
1443
+
1444
+ /***/ 185:
1445
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1446
+
1447
+ const compareBuild = __nccwpck_require__(230)
1448
+ const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
1449
+ module.exports = sort
1450
+
1451
+
1452
+ /***/ }),
1453
+
1454
+ /***/ 278:
1455
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1456
+
1457
+ const parse = __nccwpck_require__(903)
1458
+ const valid = (version, options) => {
1459
+ const v = parse(version, options)
1460
+ return v ? v.version : null
1461
+ }
1462
+ module.exports = valid
1463
+
1464
+
1465
+ /***/ }),
1466
+
1467
+ /***/ 482:
1468
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1469
+
1470
+ // just pre-load all the stuff that index.js lazily exports
1471
+ const internalRe = __nccwpck_require__(990)
1472
+ const constants = __nccwpck_require__(387)
1473
+ const SemVer = __nccwpck_require__(260)
1474
+ const identifiers = __nccwpck_require__(957)
1475
+ const parse = __nccwpck_require__(903)
1476
+ const valid = __nccwpck_require__(278)
1477
+ const clean = __nccwpck_require__(854)
1478
+ const inc = __nccwpck_require__(207)
1479
+ const diff = __nccwpck_require__(833)
1480
+ const major = __nccwpck_require__(474)
1481
+ const minor = __nccwpck_require__(561)
1482
+ const patch = __nccwpck_require__(133)
1483
+ const prerelease = __nccwpck_require__(711)
1484
+ const compare = __nccwpck_require__(755)
1485
+ const rcompare = __nccwpck_require__(311)
1486
+ const compareLoose = __nccwpck_require__(55)
1487
+ const compareBuild = __nccwpck_require__(230)
1488
+ const sort = __nccwpck_require__(185)
1489
+ const rsort = __nccwpck_require__(455)
1490
+ const gt = __nccwpck_require__(572)
1491
+ const lt = __nccwpck_require__(155)
1492
+ const eq = __nccwpck_require__(538)
1493
+ const neq = __nccwpck_require__(821)
1494
+ const gte = __nccwpck_require__(639)
1495
+ const lte = __nccwpck_require__(983)
1496
+ const cmp = __nccwpck_require__(214)
1497
+ const coerce = __nccwpck_require__(922)
1498
+ const Comparator = __nccwpck_require__(483)
1499
+ const Range = __nccwpck_require__(966)
1500
+ const satisfies = __nccwpck_require__(161)
1501
+ const toComparators = __nccwpck_require__(832)
1502
+ const maxSatisfying = __nccwpck_require__(523)
1503
+ const minSatisfying = __nccwpck_require__(894)
1504
+ const minVersion = __nccwpck_require__(63)
1505
+ const validRange = __nccwpck_require__(576)
1506
+ const outside = __nccwpck_require__(586)
1507
+ const gtr = __nccwpck_require__(54)
1508
+ const ltr = __nccwpck_require__(73)
1509
+ const intersects = __nccwpck_require__(874)
1510
+ const simplifyRange = __nccwpck_require__(119)
1511
+ const subset = __nccwpck_require__(86)
1512
+ module.exports = {
1513
+ parse,
1514
+ valid,
1515
+ clean,
1516
+ inc,
1517
+ diff,
1518
+ major,
1519
+ minor,
1520
+ patch,
1521
+ prerelease,
1522
+ compare,
1523
+ rcompare,
1524
+ compareLoose,
1525
+ compareBuild,
1526
+ sort,
1527
+ rsort,
1528
+ gt,
1529
+ lt,
1530
+ eq,
1531
+ neq,
1532
+ gte,
1533
+ lte,
1534
+ cmp,
1535
+ coerce,
1536
+ Comparator,
1537
+ Range,
1538
+ satisfies,
1539
+ toComparators,
1540
+ maxSatisfying,
1541
+ minSatisfying,
1542
+ minVersion,
1543
+ validRange,
1544
+ outside,
1545
+ gtr,
1546
+ ltr,
1547
+ intersects,
1548
+ simplifyRange,
1549
+ subset,
1550
+ SemVer,
1551
+ re: internalRe.re,
1552
+ src: internalRe.src,
1553
+ tokens: internalRe.t,
1554
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
1555
+ RELEASE_TYPES: constants.RELEASE_TYPES,
1556
+ compareIdentifiers: identifiers.compareIdentifiers,
1557
+ rcompareIdentifiers: identifiers.rcompareIdentifiers,
1558
+ }
1559
+
1560
+
1561
+ /***/ }),
1562
+
1563
+ /***/ 387:
1564
+ /***/ ((module) => {
1565
+
1566
+ // Note: this is the semver.org version of the spec that it implements
1567
+ // Not necessarily the package version of this code.
1568
+ const SEMVER_SPEC_VERSION = '2.0.0'
1569
+
1570
+ const MAX_LENGTH = 256
1571
+ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
1572
+ /* istanbul ignore next */ 9007199254740991
1573
+
1574
+ // Max safe segment length for coercion.
1575
+ const MAX_SAFE_COMPONENT_LENGTH = 16
1576
+
1577
+ // Max safe length for a build identifier. The max length minus 6 characters for
1578
+ // the shortest version with a build 0.0.0+BUILD.
1579
+ const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
1580
+
1581
+ const RELEASE_TYPES = [
1582
+ 'major',
1583
+ 'premajor',
1584
+ 'minor',
1585
+ 'preminor',
1586
+ 'patch',
1587
+ 'prepatch',
1588
+ 'prerelease',
1589
+ ]
1590
+
1591
+ module.exports = {
1592
+ MAX_LENGTH,
1593
+ MAX_SAFE_COMPONENT_LENGTH,
1594
+ MAX_SAFE_BUILD_LENGTH,
1595
+ MAX_SAFE_INTEGER,
1596
+ RELEASE_TYPES,
1597
+ SEMVER_SPEC_VERSION,
1598
+ FLAG_INCLUDE_PRERELEASE: 0b001,
1599
+ FLAG_LOOSE: 0b010,
1600
+ }
1601
+
1602
+
1603
+ /***/ }),
1604
+
1605
+ /***/ 743:
1606
+ /***/ ((module) => {
1607
+
1608
+ const debug = (
1609
+ typeof process === 'object' &&
1610
+ process.env &&
1611
+ process.env.NODE_DEBUG &&
1612
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)
1613
+ ) ? (...args) => console.error('SEMVER', ...args)
1614
+ : () => {}
1615
+
1616
+ module.exports = debug
1617
+
1618
+
1619
+ /***/ }),
1620
+
1621
+ /***/ 957:
1622
+ /***/ ((module) => {
1623
+
1624
+ const numeric = /^[0-9]+$/
1625
+ const compareIdentifiers = (a, b) => {
1626
+ const anum = numeric.test(a)
1627
+ const bnum = numeric.test(b)
1628
+
1629
+ if (anum && bnum) {
1630
+ a = +a
1631
+ b = +b
1632
+ }
1633
+
1634
+ return a === b ? 0
1635
+ : (anum && !bnum) ? -1
1636
+ : (bnum && !anum) ? 1
1637
+ : a < b ? -1
1638
+ : 1
1639
+ }
1640
+
1641
+ const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
1642
+
1643
+ module.exports = {
1644
+ compareIdentifiers,
1645
+ rcompareIdentifiers,
1646
+ }
1647
+
1648
+
1649
+ /***/ }),
1650
+
1651
+ /***/ 349:
1652
+ /***/ ((module) => {
1653
+
1654
+ class LRUCache {
1655
+ constructor () {
1656
+ this.max = 1000
1657
+ this.map = new Map()
1658
+ }
1659
+
1660
+ get (key) {
1661
+ const value = this.map.get(key)
1662
+ if (value === undefined) {
1663
+ return undefined
1664
+ } else {
1665
+ // Remove the key from the map and add it to the end
1666
+ this.map.delete(key)
1667
+ this.map.set(key, value)
1668
+ return value
1669
+ }
1670
+ }
1671
+
1672
+ delete (key) {
1673
+ return this.map.delete(key)
1674
+ }
1675
+
1676
+ set (key, value) {
1677
+ const deleted = this.delete(key)
1678
+
1679
+ if (!deleted && value !== undefined) {
1680
+ // If cache is full, delete the least recently used item
1681
+ if (this.map.size >= this.max) {
1682
+ const firstKey = this.map.keys().next().value
1683
+ this.delete(firstKey)
1684
+ }
1685
+
1686
+ this.map.set(key, value)
1687
+ }
1688
+
1689
+ return this
1690
+ }
1691
+ }
1692
+
1693
+ module.exports = LRUCache
1694
+
1695
+
1696
+ /***/ }),
1697
+
1698
+ /***/ 923:
1699
+ /***/ ((module) => {
1700
+
1701
+ // parse out just the options we care about
1702
+ const looseOption = Object.freeze({ loose: true })
1703
+ const emptyOpts = Object.freeze({ })
1704
+ const parseOptions = options => {
1705
+ if (!options) {
1706
+ return emptyOpts
1707
+ }
1708
+
1709
+ if (typeof options !== 'object') {
1710
+ return looseOption
1711
+ }
1712
+
1713
+ return options
1714
+ }
1715
+ module.exports = parseOptions
1716
+
1717
+
1718
+ /***/ }),
1719
+
1720
+ /***/ 990:
1721
+ /***/ ((module, exports, __nccwpck_require__) => {
1722
+
1723
+ const {
1724
+ MAX_SAFE_COMPONENT_LENGTH,
1725
+ MAX_SAFE_BUILD_LENGTH,
1726
+ MAX_LENGTH,
1727
+ } = __nccwpck_require__(387)
1728
+ const debug = __nccwpck_require__(743)
1729
+ exports = module.exports = {}
1730
+
1731
+ // The actual regexps go on exports.re
1732
+ const re = exports.re = []
1733
+ const safeRe = exports.safeRe = []
1734
+ const src = exports.src = []
1735
+ const t = exports.t = {}
1736
+ let R = 0
1737
+
1738
+ const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
1739
+
1740
+ // Replace some greedy regex tokens to prevent regex dos issues. These regex are
1741
+ // used internally via the safeRe object since all inputs in this library get
1742
+ // normalized first to trim and collapse all extra whitespace. The original
1743
+ // regexes are exported for userland consumption and lower level usage. A
1744
+ // future breaking change could export the safer regex only with a note that
1745
+ // all input should have extra whitespace removed.
1746
+ const safeRegexReplacements = [
1747
+ ['\\s', 1],
1748
+ ['\\d', MAX_LENGTH],
1749
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
1750
+ ]
1751
+
1752
+ const makeSafeRegex = (value) => {
1753
+ for (const [token, max] of safeRegexReplacements) {
1754
+ value = value
1755
+ .split(`${token}*`).join(`${token}{0,${max}}`)
1756
+ .split(`${token}+`).join(`${token}{1,${max}}`)
1757
+ }
1758
+ return value
1759
+ }
1760
+
1761
+ const createToken = (name, value, isGlobal) => {
1762
+ const safe = makeSafeRegex(value)
1763
+ const index = R++
1764
+ debug(name, index, value)
1765
+ t[name] = index
1766
+ src[index] = value
1767
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
1768
+ safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
1769
+ }
1770
+
1771
+ // The following Regular Expressions can be used for tokenizing,
1772
+ // validating, and parsing SemVer version strings.
1773
+
1774
+ // ## Numeric Identifier
1775
+ // A single `0`, or a non-zero digit followed by zero or more digits.
1776
+
1777
+ createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
1778
+ createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
1779
+
1780
+ // ## Non-numeric Identifier
1781
+ // Zero or more digits, followed by a letter or hyphen, and then zero or
1782
+ // more letters, digits, or hyphens.
1783
+
1784
+ createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
1785
+
1786
+ // ## Main Version
1787
+ // Three dot-separated numeric identifiers.
1788
+
1789
+ createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
1790
+ `(${src[t.NUMERICIDENTIFIER]})\\.` +
1791
+ `(${src[t.NUMERICIDENTIFIER]})`)
1792
+
1793
+ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
1794
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
1795
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})`)
1796
+
1797
+ // ## Pre-release Version Identifier
1798
+ // A numeric identifier, or a non-numeric identifier.
1799
+
1800
+ createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
1801
+ }|${src[t.NONNUMERICIDENTIFIER]})`)
1802
+
1803
+ createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
1804
+ }|${src[t.NONNUMERICIDENTIFIER]})`)
1805
+
1806
+ // ## Pre-release Version
1807
+ // Hyphen, followed by one or more dot-separated pre-release version
1808
+ // identifiers.
1809
+
1810
+ createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
1811
+ }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
1812
+
1813
+ createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
1814
+ }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
1815
+
1816
+ // ## Build Metadata Identifier
1817
+ // Any combination of digits, letters, or hyphens.
1818
+
1819
+ createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
1820
+
1821
+ // ## Build Metadata
1822
+ // Plus sign, followed by one or more period-separated build metadata
1823
+ // identifiers.
1824
+
1825
+ createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
1826
+ }(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
1827
+
1828
+ // ## Full Version String
1829
+ // A main version, followed optionally by a pre-release version and
1830
+ // build metadata.
1831
+
1832
+ // Note that the only major, minor, patch, and pre-release sections of
1833
+ // the version string are capturing groups. The build metadata is not a
1834
+ // capturing group, because it should not ever be used in version
1835
+ // comparison.
1836
+
1837
+ createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
1838
+ }${src[t.PRERELEASE]}?${
1839
+ src[t.BUILD]}?`)
1840
+
1841
+ createToken('FULL', `^${src[t.FULLPLAIN]}$`)
1842
+
1843
+ // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
1844
+ // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
1845
+ // common in the npm registry.
1846
+ createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
1847
+ }${src[t.PRERELEASELOOSE]}?${
1848
+ src[t.BUILD]}?`)
1849
+
1850
+ createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
1851
+
1852
+ createToken('GTLT', '((?:<|>)?=?)')
1853
+
1854
+ // Something like "2.*" or "1.2.x".
1855
+ // Note that "x.x" is a valid xRange identifer, meaning "any version"
1856
+ // Only the first item is strictly required.
1857
+ createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
1858
+ createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
1859
+
1860
+ createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
1861
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
1862
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
1863
+ `(?:${src[t.PRERELEASE]})?${
1864
+ src[t.BUILD]}?` +
1865
+ `)?)?`)
1866
+
1867
+ createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
1868
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
1869
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
1870
+ `(?:${src[t.PRERELEASELOOSE]})?${
1871
+ src[t.BUILD]}?` +
1872
+ `)?)?`)
1873
+
1874
+ createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
1875
+ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
1876
+
1877
+ // Coercion.
1878
+ // Extract anything that could conceivably be a part of a valid semver
1879
+ createToken('COERCEPLAIN', `${'(^|[^\\d])' +
1880
+ '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
1881
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
1882
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
1883
+ createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
1884
+ createToken('COERCEFULL', src[t.COERCEPLAIN] +
1885
+ `(?:${src[t.PRERELEASE]})?` +
1886
+ `(?:${src[t.BUILD]})?` +
1887
+ `(?:$|[^\\d])`)
1888
+ createToken('COERCERTL', src[t.COERCE], true)
1889
+ createToken('COERCERTLFULL', src[t.COERCEFULL], true)
1890
+
1891
+ // Tilde ranges.
1892
+ // Meaning is "reasonably at or greater than"
1893
+ createToken('LONETILDE', '(?:~>?)')
1894
+
1895
+ createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
1896
+ exports.tildeTrimReplace = '$1~'
1897
+
1898
+ createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
1899
+ createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
1900
+
1901
+ // Caret ranges.
1902
+ // Meaning is "at least and backwards compatible with"
1903
+ createToken('LONECARET', '(?:\\^)')
1904
+
1905
+ createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
1906
+ exports.caretTrimReplace = '$1^'
1907
+
1908
+ createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
1909
+ createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
1910
+
1911
+ // A simple gt/lt/eq thing, or just "" to indicate "any version"
1912
+ createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
1913
+ createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
1914
+
1915
+ // An expression to strip any whitespace between the gtlt and the thing
1916
+ // it modifies, so that `> 1.2.3` ==> `>1.2.3`
1917
+ createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
1918
+ }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
1919
+ exports.comparatorTrimReplace = '$1$2$3'
1920
+
1921
+ // Something like `1.2.3 - 1.2.4`
1922
+ // Note that these all use the loose form, because they'll be
1923
+ // checked against either the strict or loose comparator form
1924
+ // later.
1925
+ createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
1926
+ `\\s+-\\s+` +
1927
+ `(${src[t.XRANGEPLAIN]})` +
1928
+ `\\s*$`)
1929
+
1930
+ createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
1931
+ `\\s+-\\s+` +
1932
+ `(${src[t.XRANGEPLAINLOOSE]})` +
1933
+ `\\s*$`)
1934
+
1935
+ // Star ranges basically just allow anything at all.
1936
+ createToken('STAR', '(<|>)?=?\\s*\\*')
1937
+ // >=0.0.0 is like a star
1938
+ createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
1939
+ createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
1940
+
1941
+
1942
+ /***/ }),
1943
+
1944
+ /***/ 54:
1945
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1946
+
1947
+ // Determine if version is greater than all the versions possible in the range.
1948
+ const outside = __nccwpck_require__(586)
1949
+ const gtr = (version, range, options) => outside(version, range, '>', options)
1950
+ module.exports = gtr
1951
+
1952
+
1953
+ /***/ }),
1954
+
1955
+ /***/ 874:
1956
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1957
+
1958
+ const Range = __nccwpck_require__(966)
1959
+ const intersects = (r1, r2, options) => {
1960
+ r1 = new Range(r1, options)
1961
+ r2 = new Range(r2, options)
1962
+ return r1.intersects(r2, options)
1963
+ }
1964
+ module.exports = intersects
1965
+
1966
+
1967
+ /***/ }),
1968
+
1969
+ /***/ 73:
1970
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1971
+
1972
+ const outside = __nccwpck_require__(586)
1973
+ // Determine if version is less than all the versions possible in the range
1974
+ const ltr = (version, range, options) => outside(version, range, '<', options)
1975
+ module.exports = ltr
1976
+
1977
+
1978
+ /***/ }),
1979
+
1980
+ /***/ 523:
1981
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1982
+
1983
+ const SemVer = __nccwpck_require__(260)
1984
+ const Range = __nccwpck_require__(966)
1985
+
1986
+ const maxSatisfying = (versions, range, options) => {
1987
+ let max = null
1988
+ let maxSV = null
1989
+ let rangeObj = null
1990
+ try {
1991
+ rangeObj = new Range(range, options)
1992
+ } catch (er) {
1993
+ return null
1994
+ }
1995
+ versions.forEach((v) => {
1996
+ if (rangeObj.test(v)) {
1997
+ // satisfies(v, range, options)
1998
+ if (!max || maxSV.compare(v) === -1) {
1999
+ // compare(max, v, true)
2000
+ max = v
2001
+ maxSV = new SemVer(max, options)
2002
+ }
2003
+ }
2004
+ })
2005
+ return max
2006
+ }
2007
+ module.exports = maxSatisfying
2008
+
2009
+
2010
+ /***/ }),
2011
+
2012
+ /***/ 894:
2013
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2014
+
2015
+ const SemVer = __nccwpck_require__(260)
2016
+ const Range = __nccwpck_require__(966)
2017
+ const minSatisfying = (versions, range, options) => {
2018
+ let min = null
2019
+ let minSV = null
2020
+ let rangeObj = null
2021
+ try {
2022
+ rangeObj = new Range(range, options)
2023
+ } catch (er) {
2024
+ return null
2025
+ }
2026
+ versions.forEach((v) => {
2027
+ if (rangeObj.test(v)) {
2028
+ // satisfies(v, range, options)
2029
+ if (!min || minSV.compare(v) === 1) {
2030
+ // compare(min, v, true)
2031
+ min = v
2032
+ minSV = new SemVer(min, options)
2033
+ }
2034
+ }
2035
+ })
2036
+ return min
2037
+ }
2038
+ module.exports = minSatisfying
2039
+
2040
+
2041
+ /***/ }),
2042
+
2043
+ /***/ 63:
2044
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2045
+
2046
+ const SemVer = __nccwpck_require__(260)
2047
+ const Range = __nccwpck_require__(966)
2048
+ const gt = __nccwpck_require__(572)
2049
+
2050
+ const minVersion = (range, loose) => {
2051
+ range = new Range(range, loose)
2052
+
2053
+ let minver = new SemVer('0.0.0')
2054
+ if (range.test(minver)) {
2055
+ return minver
2056
+ }
2057
+
2058
+ minver = new SemVer('0.0.0-0')
2059
+ if (range.test(minver)) {
2060
+ return minver
2061
+ }
2062
+
2063
+ minver = null
2064
+ for (let i = 0; i < range.set.length; ++i) {
2065
+ const comparators = range.set[i]
2066
+
2067
+ let setMin = null
2068
+ comparators.forEach((comparator) => {
2069
+ // Clone to avoid manipulating the comparator's semver object.
2070
+ const compver = new SemVer(comparator.semver.version)
2071
+ switch (comparator.operator) {
2072
+ case '>':
2073
+ if (compver.prerelease.length === 0) {
2074
+ compver.patch++
2075
+ } else {
2076
+ compver.prerelease.push(0)
2077
+ }
2078
+ compver.raw = compver.format()
2079
+ /* fallthrough */
2080
+ case '':
2081
+ case '>=':
2082
+ if (!setMin || gt(compver, setMin)) {
2083
+ setMin = compver
2084
+ }
2085
+ break
2086
+ case '<':
2087
+ case '<=':
2088
+ /* Ignore maximum versions */
2089
+ break
2090
+ /* istanbul ignore next */
2091
+ default:
2092
+ throw new Error(`Unexpected operation: ${comparator.operator}`)
2093
+ }
2094
+ })
2095
+ if (setMin && (!minver || gt(minver, setMin))) {
2096
+ minver = setMin
2097
+ }
2098
+ }
2099
+
2100
+ if (minver && range.test(minver)) {
2101
+ return minver
2102
+ }
2103
+
2104
+ return null
2105
+ }
2106
+ module.exports = minVersion
2107
+
2108
+
2109
+ /***/ }),
2110
+
2111
+ /***/ 586:
2112
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2113
+
2114
+ const SemVer = __nccwpck_require__(260)
2115
+ const Comparator = __nccwpck_require__(483)
2116
+ const { ANY } = Comparator
2117
+ const Range = __nccwpck_require__(966)
2118
+ const satisfies = __nccwpck_require__(161)
2119
+ const gt = __nccwpck_require__(572)
2120
+ const lt = __nccwpck_require__(155)
2121
+ const lte = __nccwpck_require__(983)
2122
+ const gte = __nccwpck_require__(639)
2123
+
2124
+ const outside = (version, range, hilo, options) => {
2125
+ version = new SemVer(version, options)
2126
+ range = new Range(range, options)
2127
+
2128
+ let gtfn, ltefn, ltfn, comp, ecomp
2129
+ switch (hilo) {
2130
+ case '>':
2131
+ gtfn = gt
2132
+ ltefn = lte
2133
+ ltfn = lt
2134
+ comp = '>'
2135
+ ecomp = '>='
2136
+ break
2137
+ case '<':
2138
+ gtfn = lt
2139
+ ltefn = gte
2140
+ ltfn = gt
2141
+ comp = '<'
2142
+ ecomp = '<='
2143
+ break
2144
+ default:
2145
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
2146
+ }
2147
+
2148
+ // If it satisfies the range it is not outside
2149
+ if (satisfies(version, range, options)) {
2150
+ return false
2151
+ }
2152
+
2153
+ // From now on, variable terms are as if we're in "gtr" mode.
2154
+ // but note that everything is flipped for the "ltr" function.
2155
+
2156
+ for (let i = 0; i < range.set.length; ++i) {
2157
+ const comparators = range.set[i]
2158
+
2159
+ let high = null
2160
+ let low = null
2161
+
2162
+ comparators.forEach((comparator) => {
2163
+ if (comparator.semver === ANY) {
2164
+ comparator = new Comparator('>=0.0.0')
2165
+ }
2166
+ high = high || comparator
2167
+ low = low || comparator
2168
+ if (gtfn(comparator.semver, high.semver, options)) {
2169
+ high = comparator
2170
+ } else if (ltfn(comparator.semver, low.semver, options)) {
2171
+ low = comparator
2172
+ }
2173
+ })
2174
+
2175
+ // If the edge version comparator has a operator then our version
2176
+ // isn't outside it
2177
+ if (high.operator === comp || high.operator === ecomp) {
2178
+ return false
2179
+ }
2180
+
2181
+ // If the lowest version comparator has an operator and our version
2182
+ // is less than it then it isn't higher than the range
2183
+ if ((!low.operator || low.operator === comp) &&
2184
+ ltefn(version, low.semver)) {
2185
+ return false
2186
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
2187
+ return false
2188
+ }
2189
+ }
2190
+ return true
2191
+ }
2192
+
2193
+ module.exports = outside
2194
+
2195
+
2196
+ /***/ }),
2197
+
2198
+ /***/ 119:
2199
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2200
+
2201
+ // given a set of versions and a range, create a "simplified" range
2202
+ // that includes the same versions that the original range does
2203
+ // If the original range is shorter than the simplified one, return that.
2204
+ const satisfies = __nccwpck_require__(161)
2205
+ const compare = __nccwpck_require__(755)
2206
+ module.exports = (versions, range, options) => {
2207
+ const set = []
2208
+ let first = null
2209
+ let prev = null
2210
+ const v = versions.sort((a, b) => compare(a, b, options))
2211
+ for (const version of v) {
2212
+ const included = satisfies(version, range, options)
2213
+ if (included) {
2214
+ prev = version
2215
+ if (!first) {
2216
+ first = version
2217
+ }
2218
+ } else {
2219
+ if (prev) {
2220
+ set.push([first, prev])
2221
+ }
2222
+ prev = null
2223
+ first = null
2224
+ }
2225
+ }
2226
+ if (first) {
2227
+ set.push([first, null])
2228
+ }
2229
+
2230
+ const ranges = []
2231
+ for (const [min, max] of set) {
2232
+ if (min === max) {
2233
+ ranges.push(min)
2234
+ } else if (!max && min === v[0]) {
2235
+ ranges.push('*')
2236
+ } else if (!max) {
2237
+ ranges.push(`>=${min}`)
2238
+ } else if (min === v[0]) {
2239
+ ranges.push(`<=${max}`)
2240
+ } else {
2241
+ ranges.push(`${min} - ${max}`)
2242
+ }
2243
+ }
2244
+ const simplified = ranges.join(' || ')
2245
+ const original = typeof range.raw === 'string' ? range.raw : String(range)
2246
+ return simplified.length < original.length ? simplified : range
2247
+ }
2248
+
2249
+
2250
+ /***/ }),
2251
+
2252
+ /***/ 86:
2253
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2254
+
2255
+ const Range = __nccwpck_require__(966)
2256
+ const Comparator = __nccwpck_require__(483)
2257
+ const { ANY } = Comparator
2258
+ const satisfies = __nccwpck_require__(161)
2259
+ const compare = __nccwpck_require__(755)
2260
+
2261
+ // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
2262
+ // - Every simple range `r1, r2, ...` is a null set, OR
2263
+ // - Every simple range `r1, r2, ...` which is not a null set is a subset of
2264
+ // some `R1, R2, ...`
2265
+ //
2266
+ // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
2267
+ // - If c is only the ANY comparator
2268
+ // - If C is only the ANY comparator, return true
2269
+ // - Else if in prerelease mode, return false
2270
+ // - else replace c with `[>=0.0.0]`
2271
+ // - If C is only the ANY comparator
2272
+ // - if in prerelease mode, return true
2273
+ // - else replace C with `[>=0.0.0]`
2274
+ // - Let EQ be the set of = comparators in c
2275
+ // - If EQ is more than one, return true (null set)
2276
+ // - Let GT be the highest > or >= comparator in c
2277
+ // - Let LT be the lowest < or <= comparator in c
2278
+ // - If GT and LT, and GT.semver > LT.semver, return true (null set)
2279
+ // - If any C is a = range, and GT or LT are set, return false
2280
+ // - If EQ
2281
+ // - If GT, and EQ does not satisfy GT, return true (null set)
2282
+ // - If LT, and EQ does not satisfy LT, return true (null set)
2283
+ // - If EQ satisfies every C, return true
2284
+ // - Else return false
2285
+ // - If GT
2286
+ // - If GT.semver is lower than any > or >= comp in C, return false
2287
+ // - If GT is >=, and GT.semver does not satisfy every C, return false
2288
+ // - If GT.semver has a prerelease, and not in prerelease mode
2289
+ // - If no C has a prerelease and the GT.semver tuple, return false
2290
+ // - If LT
2291
+ // - If LT.semver is greater than any < or <= comp in C, return false
2292
+ // - If LT is <=, and LT.semver does not satisfy every C, return false
2293
+ // - If GT.semver has a prerelease, and not in prerelease mode
2294
+ // - If no C has a prerelease and the LT.semver tuple, return false
2295
+ // - Else return true
2296
+
2297
+ const subset = (sub, dom, options = {}) => {
2298
+ if (sub === dom) {
2299
+ return true
2300
+ }
2301
+
2302
+ sub = new Range(sub, options)
2303
+ dom = new Range(dom, options)
2304
+ let sawNonNull = false
2305
+
2306
+ OUTER: for (const simpleSub of sub.set) {
2307
+ for (const simpleDom of dom.set) {
2308
+ const isSub = simpleSubset(simpleSub, simpleDom, options)
2309
+ sawNonNull = sawNonNull || isSub !== null
2310
+ if (isSub) {
2311
+ continue OUTER
2312
+ }
2313
+ }
2314
+ // the null set is a subset of everything, but null simple ranges in
2315
+ // a complex range should be ignored. so if we saw a non-null range,
2316
+ // then we know this isn't a subset, but if EVERY simple range was null,
2317
+ // then it is a subset.
2318
+ if (sawNonNull) {
2319
+ return false
2320
+ }
2321
+ }
2322
+ return true
2323
+ }
2324
+
2325
+ const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
2326
+ const minimumVersion = [new Comparator('>=0.0.0')]
2327
+
2328
+ const simpleSubset = (sub, dom, options) => {
2329
+ if (sub === dom) {
2330
+ return true
2331
+ }
2332
+
2333
+ if (sub.length === 1 && sub[0].semver === ANY) {
2334
+ if (dom.length === 1 && dom[0].semver === ANY) {
2335
+ return true
2336
+ } else if (options.includePrerelease) {
2337
+ sub = minimumVersionWithPreRelease
2338
+ } else {
2339
+ sub = minimumVersion
2340
+ }
2341
+ }
2342
+
2343
+ if (dom.length === 1 && dom[0].semver === ANY) {
2344
+ if (options.includePrerelease) {
2345
+ return true
2346
+ } else {
2347
+ dom = minimumVersion
2348
+ }
2349
+ }
2350
+
2351
+ const eqSet = new Set()
2352
+ let gt, lt
2353
+ for (const c of sub) {
2354
+ if (c.operator === '>' || c.operator === '>=') {
2355
+ gt = higherGT(gt, c, options)
2356
+ } else if (c.operator === '<' || c.operator === '<=') {
2357
+ lt = lowerLT(lt, c, options)
2358
+ } else {
2359
+ eqSet.add(c.semver)
2360
+ }
2361
+ }
2362
+
2363
+ if (eqSet.size > 1) {
2364
+ return null
2365
+ }
2366
+
2367
+ let gtltComp
2368
+ if (gt && lt) {
2369
+ gtltComp = compare(gt.semver, lt.semver, options)
2370
+ if (gtltComp > 0) {
2371
+ return null
2372
+ } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
2373
+ return null
2374
+ }
2375
+ }
2376
+
2377
+ // will iterate one or zero times
2378
+ for (const eq of eqSet) {
2379
+ if (gt && !satisfies(eq, String(gt), options)) {
2380
+ return null
2381
+ }
2382
+
2383
+ if (lt && !satisfies(eq, String(lt), options)) {
2384
+ return null
2385
+ }
2386
+
2387
+ for (const c of dom) {
2388
+ if (!satisfies(eq, String(c), options)) {
2389
+ return false
2390
+ }
2391
+ }
2392
+
2393
+ return true
2394
+ }
2395
+
2396
+ let higher, lower
2397
+ let hasDomLT, hasDomGT
2398
+ // if the subset has a prerelease, we need a comparator in the superset
2399
+ // with the same tuple and a prerelease, or it's not a subset
2400
+ let needDomLTPre = lt &&
2401
+ !options.includePrerelease &&
2402
+ lt.semver.prerelease.length ? lt.semver : false
2403
+ let needDomGTPre = gt &&
2404
+ !options.includePrerelease &&
2405
+ gt.semver.prerelease.length ? gt.semver : false
2406
+ // exception: <1.2.3-0 is the same as <1.2.3
2407
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
2408
+ lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
2409
+ needDomLTPre = false
2410
+ }
2411
+
2412
+ for (const c of dom) {
2413
+ hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
2414
+ hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
2415
+ if (gt) {
2416
+ if (needDomGTPre) {
2417
+ if (c.semver.prerelease && c.semver.prerelease.length &&
2418
+ c.semver.major === needDomGTPre.major &&
2419
+ c.semver.minor === needDomGTPre.minor &&
2420
+ c.semver.patch === needDomGTPre.patch) {
2421
+ needDomGTPre = false
2422
+ }
2423
+ }
2424
+ if (c.operator === '>' || c.operator === '>=') {
2425
+ higher = higherGT(gt, c, options)
2426
+ if (higher === c && higher !== gt) {
2427
+ return false
2428
+ }
2429
+ } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
2430
+ return false
2431
+ }
2432
+ }
2433
+ if (lt) {
2434
+ if (needDomLTPre) {
2435
+ if (c.semver.prerelease && c.semver.prerelease.length &&
2436
+ c.semver.major === needDomLTPre.major &&
2437
+ c.semver.minor === needDomLTPre.minor &&
2438
+ c.semver.patch === needDomLTPre.patch) {
2439
+ needDomLTPre = false
2440
+ }
2441
+ }
2442
+ if (c.operator === '<' || c.operator === '<=') {
2443
+ lower = lowerLT(lt, c, options)
2444
+ if (lower === c && lower !== lt) {
2445
+ return false
2446
+ }
2447
+ } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
2448
+ return false
2449
+ }
2450
+ }
2451
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
2452
+ return false
2453
+ }
2454
+ }
2455
+
2456
+ // if there was a < or >, and nothing in the dom, then must be false
2457
+ // UNLESS it was limited by another range in the other direction.
2458
+ // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
2459
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
2460
+ return false
2461
+ }
2462
+
2463
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
2464
+ return false
2465
+ }
2466
+
2467
+ // we needed a prerelease range in a specific tuple, but didn't get one
2468
+ // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
2469
+ // because it includes prereleases in the 1.2.3 tuple
2470
+ if (needDomGTPre || needDomLTPre) {
2471
+ return false
2472
+ }
2473
+
2474
+ return true
2475
+ }
2476
+
2477
+ // >=1.2.3 is lower than >1.2.3
2478
+ const higherGT = (a, b, options) => {
2479
+ if (!a) {
2480
+ return b
2481
+ }
2482
+ const comp = compare(a.semver, b.semver, options)
2483
+ return comp > 0 ? a
2484
+ : comp < 0 ? b
2485
+ : b.operator === '>' && a.operator === '>=' ? b
2486
+ : a
2487
+ }
2488
+
2489
+ // <=1.2.3 is higher than <1.2.3
2490
+ const lowerLT = (a, b, options) => {
2491
+ if (!a) {
2492
+ return b
2493
+ }
2494
+ const comp = compare(a.semver, b.semver, options)
2495
+ return comp < 0 ? a
2496
+ : comp > 0 ? b
2497
+ : b.operator === '<' && a.operator === '<=' ? b
2498
+ : a
2499
+ }
2500
+
2501
+ module.exports = subset
2502
+
2503
+
2504
+ /***/ }),
2505
+
2506
+ /***/ 832:
2507
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2508
+
2509
+ const Range = __nccwpck_require__(966)
2510
+
2511
+ // Mostly just for testing and legacy API reasons
2512
+ const toComparators = (range, options) =>
2513
+ new Range(range, options).set
2514
+ .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
2515
+
2516
+ module.exports = toComparators
2517
+
2518
+
2519
+ /***/ }),
2520
+
2521
+ /***/ 576:
2522
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2523
+
2524
+ const Range = __nccwpck_require__(966)
2525
+ const validRange = (range, options) => {
2526
+ try {
2527
+ // Return '*' instead of '' so that truthiness works.
2528
+ // This will throw if it's invalid anyway
2529
+ return new Range(range, options).range || '*'
2530
+ } catch (er) {
2531
+ return null
2532
+ }
2533
+ }
2534
+ module.exports = validRange
2535
+
2536
+
2537
+ /***/ })
2538
+
2539
+ /******/ });
2540
+ /************************************************************************/
2541
+ /******/ // The module cache
2542
+ /******/ var __webpack_module_cache__ = {};
2543
+ /******/
2544
+ /******/ // The require function
2545
+ /******/ function __nccwpck_require__(moduleId) {
2546
+ /******/ // Check if module is in cache
2547
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
2548
+ /******/ if (cachedModule !== undefined) {
2549
+ /******/ return cachedModule.exports;
2550
+ /******/ }
2551
+ /******/ // Create a new module (and put it into the cache)
2552
+ /******/ var module = __webpack_module_cache__[moduleId] = {
2553
+ /******/ // no module.id needed
2554
+ /******/ // no module.loaded needed
2555
+ /******/ exports: {}
2556
+ /******/ };
2557
+ /******/
2558
+ /******/ // Execute the module function
2559
+ /******/ var threw = true;
2560
+ /******/ try {
2561
+ /******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
2562
+ /******/ threw = false;
2563
+ /******/ } finally {
2564
+ /******/ if(threw) delete __webpack_module_cache__[moduleId];
2565
+ /******/ }
2566
+ /******/
2567
+ /******/ // Return the exports of the module
2568
+ /******/ return module.exports;
2569
+ /******/ }
2570
+ /******/
2571
+ /************************************************************************/
2572
+ /******/ /* webpack/runtime/compat */
2573
+ /******/
2574
+ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
2575
+ /******/
2576
+ /************************************************************************/
2577
+ /******/
2578
+ /******/ // startup
2579
+ /******/ // Load entry module and return exports
2580
+ /******/ // This entry module is referenced by other modules so it can't be inlined
2581
+ /******/ var __webpack_exports__ = __nccwpck_require__(482);
2582
+ /******/ module.exports = __webpack_exports__;
2583
+ /******/
2584
+ /******/ })()
2585
+ ;