@nebula.js/stardust 6.0.0-alpha.1 → 6.0.0-alpha.2

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v6.0.0-alpha.1
2
+ * @nebula.js/stardust v6.0.0-alpha.2
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -7829,7 +7829,7 @@
7829
7829
  };
7830
7830
  }
7831
7831
 
7832
- var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
7832
+ var identifierWithPointTracking$1 = function identifierWithPointTracking(begin, points, index) {
7833
7833
  var previous = 0;
7834
7834
  var character = 0;
7835
7835
 
@@ -7851,7 +7851,7 @@
7851
7851
  return slice(begin, position);
7852
7852
  };
7853
7853
 
7854
- var toRules = function toRules(parsed, points) {
7854
+ var toRules$1 = function toRules(parsed, points) {
7855
7855
  // pretend we've started with a comma
7856
7856
  var index = -1;
7857
7857
  var character = 44;
@@ -7868,7 +7868,7 @@
7868
7868
  points[index] = 1;
7869
7869
  }
7870
7870
 
7871
- parsed[index] += identifierWithPointTracking(position - 1, points, index);
7871
+ parsed[index] += identifierWithPointTracking$1(position - 1, points, index);
7872
7872
  break;
7873
7873
 
7874
7874
  case 2:
@@ -7894,13 +7894,13 @@
7894
7894
  return parsed;
7895
7895
  };
7896
7896
 
7897
- var getRules = function getRules(value, points) {
7898
- return dealloc(toRules(alloc(value), points));
7897
+ var getRules$1 = function getRules(value, points) {
7898
+ return dealloc(toRules$1(alloc(value), points));
7899
7899
  }; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
7900
7900
 
7901
7901
 
7902
- var fixedElements = /* #__PURE__ */new WeakMap();
7903
- var compat = function compat(element) {
7902
+ var fixedElements$1 = /* #__PURE__ */new WeakMap();
7903
+ var compat$1 = function compat(element) {
7904
7904
  if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
7905
7905
  // negative .length indicates that this rule has been already prefixed
7906
7906
  element.length < 1) {
@@ -7919,7 +7919,7 @@
7919
7919
 
7920
7920
  if (element.props.length === 1 && value.charCodeAt(0) !== 58
7921
7921
  /* colon */
7922
- && !fixedElements.get(parent)) {
7922
+ && !fixedElements$1.get(parent)) {
7923
7923
  return;
7924
7924
  } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
7925
7925
  // then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
@@ -7929,9 +7929,9 @@
7929
7929
  return;
7930
7930
  }
7931
7931
 
7932
- fixedElements.set(element, true);
7932
+ fixedElements$1.set(element, true);
7933
7933
  var points = [];
7934
- var rules = getRules(value, points);
7934
+ var rules = getRules$1(value, points);
7935
7935
  var parentRules = parent.props;
7936
7936
 
7937
7937
  for (var i = 0, k = 0; i < rules.length; i++) {
@@ -7940,7 +7940,7 @@
7940
7940
  }
7941
7941
  }
7942
7942
  };
7943
- var removeLabel = function removeLabel(element) {
7943
+ var removeLabel$1 = function removeLabel(element) {
7944
7944
  if (element.type === 'decl') {
7945
7945
  var value = element.value;
7946
7946
 
@@ -7956,7 +7956,7 @@
7956
7956
 
7957
7957
  /* eslint-disable no-fallthrough */
7958
7958
 
7959
- function prefix(value, length) {
7959
+ function prefix$1(value, length) {
7960
7960
  switch (hash$2(value, length)) {
7961
7961
  // color-adjust
7962
7962
  case 5103:
@@ -8084,7 +8084,7 @@
8084
8084
  // (s)tretch
8085
8085
 
8086
8086
  case 115:
8087
- return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
8087
+ return ~indexof(value, 'stretch') ? prefix$1(replace(value, 'stretch', 'fill-available'), length) + value : value;
8088
8088
  }
8089
8089
  break;
8090
8090
  // position: sticky
@@ -8129,10 +8129,10 @@
8129
8129
  return value;
8130
8130
  }
8131
8131
 
8132
- var prefixer = function prefixer(element, index, children, callback) {
8132
+ var prefixer$1 = function prefixer(element, index, children, callback) {
8133
8133
  if (element.length > -1) if (!element["return"]) switch (element.type) {
8134
8134
  case DECLARATION:
8135
- element["return"] = prefix(element.value, element.length);
8135
+ element["return"] = prefix$1(element.value, element.length);
8136
8136
  break;
8137
8137
 
8138
8138
  case KEYFRAMES:
@@ -8166,9 +8166,9 @@
8166
8166
  }
8167
8167
  };
8168
8168
 
8169
- var defaultStylisPlugins = [prefixer];
8169
+ var defaultStylisPlugins$1 = [prefixer$1];
8170
8170
 
8171
- var createCache = function createCache(options) {
8171
+ var createCache$1 = function createCache(options) {
8172
8172
  var key = options.key;
8173
8173
 
8174
8174
  if (key === 'css') {
@@ -8195,7 +8195,7 @@
8195
8195
  });
8196
8196
  }
8197
8197
 
8198
- var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
8198
+ var stylisPlugins = options.stylisPlugins || defaultStylisPlugins$1;
8199
8199
 
8200
8200
  var inserted = {};
8201
8201
  var container;
@@ -8218,7 +8218,7 @@
8218
8218
 
8219
8219
  var _insert;
8220
8220
 
8221
- var omnipresentPlugins = [compat, removeLabel];
8221
+ var omnipresentPlugins = [compat$1, removeLabel$1];
8222
8222
 
8223
8223
  {
8224
8224
  var currentSheet;
@@ -8800,7 +8800,7 @@
8800
8800
  // and we could have a special build just for that
8801
8801
  // but this is much easier and the native packages
8802
8802
  // might use a different theme context in the future anyway
8803
- typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
8803
+ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache$1({
8804
8804
  key: 'css'
8805
8805
  }) : null);
8806
8806
 
@@ -9007,7 +9007,7 @@
9007
9007
  }
9008
9008
 
9009
9009
  // eslint-disable-next-line no-undef
9010
- var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
9010
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
9011
9011
 
9012
9012
  var isPropValid = /* #__PURE__ */memoize$1(function (prop) {
9013
9013
  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
@@ -9185,6 +9185,467 @@
9185
9185
  styled$3[tagName] = styled$3(tagName);
9186
9186
  });
9187
9187
 
9188
+ var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
9189
+ var previous = 0;
9190
+ var character = 0;
9191
+
9192
+ while (true) {
9193
+ previous = character;
9194
+ character = peek(); // &\f
9195
+
9196
+ if (previous === 38 && character === 12) {
9197
+ points[index] = 1;
9198
+ }
9199
+
9200
+ if (token(character)) {
9201
+ break;
9202
+ }
9203
+
9204
+ next();
9205
+ }
9206
+
9207
+ return slice(begin, position);
9208
+ };
9209
+
9210
+ var toRules = function toRules(parsed, points) {
9211
+ // pretend we've started with a comma
9212
+ var index = -1;
9213
+ var character = 44;
9214
+
9215
+ do {
9216
+ switch (token(character)) {
9217
+ case 0:
9218
+ // &\f
9219
+ if (character === 38 && peek() === 12) {
9220
+ // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
9221
+ // stylis inserts \f after & to know when & where it should replace this sequence with the context selector
9222
+ // and when it should just concatenate the outer and inner selectors
9223
+ // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
9224
+ points[index] = 1;
9225
+ }
9226
+
9227
+ parsed[index] += identifierWithPointTracking(position - 1, points, index);
9228
+ break;
9229
+
9230
+ case 2:
9231
+ parsed[index] += delimit(character);
9232
+ break;
9233
+
9234
+ case 4:
9235
+ // comma
9236
+ if (character === 44) {
9237
+ // colon
9238
+ parsed[++index] = peek() === 58 ? '&\f' : '';
9239
+ points[index] = parsed[index].length;
9240
+ break;
9241
+ }
9242
+
9243
+ // fallthrough
9244
+
9245
+ default:
9246
+ parsed[index] += from(character);
9247
+ }
9248
+ } while (character = next());
9249
+
9250
+ return parsed;
9251
+ };
9252
+
9253
+ var getRules = function getRules(value, points) {
9254
+ return dealloc(toRules(alloc(value), points));
9255
+ }; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
9256
+
9257
+
9258
+ var fixedElements = /* #__PURE__ */new WeakMap();
9259
+ var compat = function compat(element) {
9260
+ if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
9261
+ // negative .length indicates that this rule has been already prefixed
9262
+ element.length < 1) {
9263
+ return;
9264
+ }
9265
+
9266
+ var value = element.value,
9267
+ parent = element.parent;
9268
+ var isImplicitRule = element.column === parent.column && element.line === parent.line;
9269
+
9270
+ while (parent.type !== 'rule') {
9271
+ parent = parent.parent;
9272
+ if (!parent) return;
9273
+ } // short-circuit for the simplest case
9274
+
9275
+
9276
+ if (element.props.length === 1 && value.charCodeAt(0) !== 58
9277
+ /* colon */
9278
+ && !fixedElements.get(parent)) {
9279
+ return;
9280
+ } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
9281
+ // then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
9282
+
9283
+
9284
+ if (isImplicitRule) {
9285
+ return;
9286
+ }
9287
+
9288
+ fixedElements.set(element, true);
9289
+ var points = [];
9290
+ var rules = getRules(value, points);
9291
+ var parentRules = parent.props;
9292
+
9293
+ for (var i = 0, k = 0; i < rules.length; i++) {
9294
+ for (var j = 0; j < parentRules.length; j++, k++) {
9295
+ element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
9296
+ }
9297
+ }
9298
+ };
9299
+ var removeLabel = function removeLabel(element) {
9300
+ if (element.type === 'decl') {
9301
+ var value = element.value;
9302
+
9303
+ if ( // charcode for l
9304
+ value.charCodeAt(0) === 108 && // charcode for b
9305
+ value.charCodeAt(2) === 98) {
9306
+ // this ignores label
9307
+ element["return"] = '';
9308
+ element.value = '';
9309
+ }
9310
+ }
9311
+ };
9312
+
9313
+ /* eslint-disable no-fallthrough */
9314
+
9315
+ function prefix(value, length) {
9316
+ switch (hash$2(value, length)) {
9317
+ // color-adjust
9318
+ case 5103:
9319
+ return WEBKIT + 'print-' + value + value;
9320
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
9321
+
9322
+ case 5737:
9323
+ case 4201:
9324
+ case 3177:
9325
+ case 3433:
9326
+ case 1641:
9327
+ case 4457:
9328
+ case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
9329
+
9330
+ case 5572:
9331
+ case 6356:
9332
+ case 5844:
9333
+ case 3191:
9334
+ case 6645:
9335
+ case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
9336
+
9337
+ case 6391:
9338
+ case 5879:
9339
+ case 5623:
9340
+ case 6135:
9341
+ case 4599:
9342
+ case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
9343
+
9344
+ case 4215:
9345
+ case 6389:
9346
+ case 5109:
9347
+ case 5365:
9348
+ case 5621:
9349
+ case 3829:
9350
+ return WEBKIT + value + value;
9351
+ // appearance, user-select, transform, hyphens, text-size-adjust
9352
+
9353
+ case 5349:
9354
+ case 4246:
9355
+ case 4810:
9356
+ case 6968:
9357
+ case 2756:
9358
+ return WEBKIT + value + MOZ + value + MS + value + value;
9359
+ // flex, flex-direction
9360
+
9361
+ case 6828:
9362
+ case 4268:
9363
+ return WEBKIT + value + MS + value + value;
9364
+ // order
9365
+
9366
+ case 6165:
9367
+ return WEBKIT + value + MS + 'flex-' + value + value;
9368
+ // align-items
9369
+
9370
+ case 5187:
9371
+ return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
9372
+ // align-self
9373
+
9374
+ case 5443:
9375
+ return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
9376
+ // align-content
9377
+
9378
+ case 4675:
9379
+ return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
9380
+ // flex-shrink
9381
+
9382
+ case 5548:
9383
+ return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
9384
+ // flex-basis
9385
+
9386
+ case 5292:
9387
+ return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
9388
+ // flex-grow
9389
+
9390
+ case 6060:
9391
+ return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
9392
+ // transition
9393
+
9394
+ case 4554:
9395
+ return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
9396
+ // cursor
9397
+
9398
+ case 6187:
9399
+ return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
9400
+ // background, background-image
9401
+
9402
+ case 5495:
9403
+ case 3959:
9404
+ return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
9405
+ // justify-content
9406
+
9407
+ case 4968:
9408
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
9409
+ // (margin|padding)-inline-(start|end)
9410
+
9411
+ case 4095:
9412
+ case 3583:
9413
+ case 4068:
9414
+ case 2532:
9415
+ return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
9416
+ // (min|max)?(width|height|inline-size|block-size)
9417
+
9418
+ case 8116:
9419
+ case 7059:
9420
+ case 5753:
9421
+ case 5535:
9422
+ case 5445:
9423
+ case 5701:
9424
+ case 4933:
9425
+ case 4677:
9426
+ case 5533:
9427
+ case 5789:
9428
+ case 5021:
9429
+ case 4765:
9430
+ // stretch, max-content, min-content, fill-available
9431
+ if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
9432
+ // (m)ax-content, (m)in-content
9433
+ case 109:
9434
+ // -
9435
+ if (charat(value, length + 4) !== 45) break;
9436
+ // (f)ill-available, (f)it-content
9437
+
9438
+ case 102:
9439
+ return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
9440
+ // (s)tretch
9441
+
9442
+ case 115:
9443
+ return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
9444
+ }
9445
+ break;
9446
+ // position: sticky
9447
+
9448
+ case 4949:
9449
+ // (s)ticky?
9450
+ if (charat(value, length + 1) !== 115) break;
9451
+ // display: (flex|inline-flex)
9452
+
9453
+ case 6444:
9454
+ switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
9455
+ // stic(k)y
9456
+ case 107:
9457
+ return replace(value, ':', ':' + WEBKIT) + value;
9458
+ // (inline-)?fl(e)x
9459
+
9460
+ case 101:
9461
+ return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
9462
+ }
9463
+
9464
+ break;
9465
+ // writing-mode
9466
+
9467
+ case 5936:
9468
+ switch (charat(value, length + 11)) {
9469
+ // vertical-l(r)
9470
+ case 114:
9471
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
9472
+ // vertical-r(l)
9473
+
9474
+ case 108:
9475
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
9476
+ // horizontal(-)tb
9477
+
9478
+ case 45:
9479
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
9480
+ }
9481
+
9482
+ return WEBKIT + value + MS + value + value;
9483
+ }
9484
+
9485
+ return value;
9486
+ }
9487
+
9488
+ var prefixer = function prefixer(element, index, children, callback) {
9489
+ if (element.length > -1) if (!element["return"]) switch (element.type) {
9490
+ case DECLARATION:
9491
+ element["return"] = prefix(element.value, element.length);
9492
+ break;
9493
+
9494
+ case KEYFRAMES:
9495
+ return serialize([copy(element, {
9496
+ value: replace(element.value, '@', '@' + WEBKIT)
9497
+ })], callback);
9498
+
9499
+ case RULESET:
9500
+ if (element.length) return combine(element.props, function (value) {
9501
+ switch (match(value, /(::plac\w+|:read-\w+)/)) {
9502
+ // :read-(only|write)
9503
+ case ':read-only':
9504
+ case ':read-write':
9505
+ return serialize([copy(element, {
9506
+ props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
9507
+ })], callback);
9508
+ // :placeholder
9509
+
9510
+ case '::placeholder':
9511
+ return serialize([copy(element, {
9512
+ props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
9513
+ }), copy(element, {
9514
+ props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
9515
+ }), copy(element, {
9516
+ props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
9517
+ })], callback);
9518
+ }
9519
+
9520
+ return '';
9521
+ });
9522
+ }
9523
+ };
9524
+
9525
+ var defaultStylisPlugins = [prefixer];
9526
+
9527
+ var createCache = function
9528
+ /*: EmotionCache */
9529
+ createCache(options
9530
+ /*: Options */
9531
+ ) {
9532
+ var key = options.key;
9533
+
9534
+ if (key === 'css') {
9535
+ var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
9536
+ // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
9537
+ // note this very very intentionally targets all style elements regardless of the key to ensure
9538
+ // that creating a cache works inside of render of a React component
9539
+
9540
+ Array.prototype.forEach.call(ssrStyles, function (node
9541
+ /*: HTMLStyleElement */
9542
+ ) {
9543
+ // we want to only move elements which have a space in the data-emotion attribute value
9544
+ // because that indicates that it is an Emotion 11 server-side rendered style elements
9545
+ // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
9546
+ // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
9547
+ // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
9548
+ // will not result in the Emotion 10 styles being destroyed
9549
+ var dataEmotionAttribute = node.getAttribute('data-emotion');
9550
+
9551
+ if (dataEmotionAttribute.indexOf(' ') === -1) {
9552
+ return;
9553
+ }
9554
+
9555
+ document.head.appendChild(node);
9556
+ node.setAttribute('data-s', '');
9557
+ });
9558
+ }
9559
+
9560
+ var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
9561
+
9562
+ var inserted = {};
9563
+ var container;
9564
+ /* : Node */
9565
+
9566
+ var nodesToHydrate = [];
9567
+
9568
+ {
9569
+ container = options.container || document.head;
9570
+ Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
9571
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
9572
+ document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node
9573
+ /*: HTMLStyleElement */
9574
+ ) {
9575
+ var attrib = node.getAttribute("data-emotion").split(' ');
9576
+
9577
+ for (var i = 1; i < attrib.length; i++) {
9578
+ inserted[attrib[i]] = true;
9579
+ }
9580
+
9581
+ nodesToHydrate.push(node);
9582
+ });
9583
+ }
9584
+
9585
+ var _insert;
9586
+ /*: (
9587
+ selector: string,
9588
+ serialized: SerializedStyles,
9589
+ sheet: StyleSheet,
9590
+ shouldCache: boolean
9591
+ ) => string | void */
9592
+
9593
+
9594
+ var omnipresentPlugins = [compat, removeLabel];
9595
+
9596
+ {
9597
+ var currentSheet;
9598
+ var finalizingPlugins = [stringify, rulesheet(function (rule) {
9599
+ currentSheet.insert(rule);
9600
+ })];
9601
+ var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
9602
+
9603
+ var stylis = function stylis(styles) {
9604
+ return serialize(compile(styles), serializer);
9605
+ };
9606
+
9607
+ _insert = function
9608
+ /*: void */
9609
+ insert(selector
9610
+ /*: string */
9611
+ , serialized
9612
+ /*: SerializedStyles */
9613
+ , sheet
9614
+ /*: StyleSheet */
9615
+ , shouldCache
9616
+ /*: boolean */
9617
+ ) {
9618
+ currentSheet = sheet;
9619
+
9620
+ stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
9621
+
9622
+ if (shouldCache) {
9623
+ cache.inserted[serialized.name] = true;
9624
+ }
9625
+ };
9626
+ }
9627
+
9628
+ var cache
9629
+ /*: EmotionCache */
9630
+ = {
9631
+ key: key,
9632
+ sheet: new StyleSheet({
9633
+ key: key,
9634
+ container: container,
9635
+ nonce: options.nonce,
9636
+ speedy: options.speedy,
9637
+ prepend: options.prepend,
9638
+ insertionPoint: options.insertionPoint
9639
+ }),
9640
+ nonce: options.nonce,
9641
+ inserted: inserted,
9642
+ registered: {},
9643
+ insert: _insert
9644
+ };
9645
+ cache.sheet.hydrate(nodesToHydrate);
9646
+ return cache;
9647
+ };
9648
+
9188
9649
  var jsxRuntime = {exports: {}};
9189
9650
 
9190
9651
  var reactJsxRuntime_production_min = {};
@@ -10686,7 +11147,7 @@
10686
11147
  };
10687
11148
  const ClassNameGenerator = createClassNameGenerator();
10688
11149
 
10689
- function r$1(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}
11150
+ function r$2(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$2(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx$1(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$2(e))&&(n&&(n+=" "),n+=t);return n}
10690
11151
 
10691
11152
  const _excluded$P = ["className", "component"];
10692
11153
  function createBox(options = {}) {
@@ -10710,7 +11171,7 @@
10710
11171
  return /*#__PURE__*/jsxRuntimeExports.jsx(BoxRoot, _extends$1({
10711
11172
  as: component,
10712
11173
  ref: ref,
10713
- className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
11174
+ className: clsx$1(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
10714
11175
  theme: themeId ? theme[themeId] || theme : theme
10715
11176
  }, other));
10716
11177
  });
@@ -11569,6 +12030,8 @@
11569
12030
  });
11570
12031
  }
11571
12032
 
12033
+ function r$1(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}
12034
+
11572
12035
  /**
11573
12036
  * Extracts event handlers from a given object.
11574
12037
  * A prop is considered an event handler if it is a function and its name starts with `on`.
@@ -12078,7 +12541,7 @@
12078
12541
  as: component,
12079
12542
  ownerState: ownerState,
12080
12543
  ref: ref,
12081
- className: clsx(classes.root, className)
12544
+ className: clsx$1(classes.root, className)
12082
12545
  }, other, {
12083
12546
  children: divider ? joinChildren(children, divider) : children
12084
12547
  }));
@@ -14207,14 +14670,14 @@
14207
14670
  timeout
14208
14671
  } = props;
14209
14672
  const [leaving, setLeaving] = reactExports.useState(false);
14210
- const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);
14673
+ const rippleClassName = clsx$1(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);
14211
14674
  const rippleStyles = {
14212
14675
  width: rippleSize,
14213
14676
  height: rippleSize,
14214
14677
  top: -(rippleSize / 2) + rippleY,
14215
14678
  left: -(rippleSize / 2) + rippleX
14216
14679
  };
14217
- const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);
14680
+ const childClassName = clsx$1(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);
14218
14681
  if (!inProp && !leaving) {
14219
14682
  setLeaving(true);
14220
14683
  }
@@ -14398,12 +14861,12 @@
14398
14861
  } = params;
14399
14862
  setRipples(oldRipples => [...oldRipples, /*#__PURE__*/jsxRuntimeExports.jsx(TouchRippleRipple, {
14400
14863
  classes: {
14401
- ripple: clsx(classes.ripple, touchRippleClasses.ripple),
14402
- rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible),
14403
- ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate),
14404
- child: clsx(classes.child, touchRippleClasses.child),
14405
- childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving),
14406
- childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate)
14864
+ ripple: clsx$1(classes.ripple, touchRippleClasses.ripple),
14865
+ rippleVisible: clsx$1(classes.rippleVisible, touchRippleClasses.rippleVisible),
14866
+ ripplePulsate: clsx$1(classes.ripplePulsate, touchRippleClasses.ripplePulsate),
14867
+ child: clsx$1(classes.child, touchRippleClasses.child),
14868
+ childLeaving: clsx$1(classes.childLeaving, touchRippleClasses.childLeaving),
14869
+ childPulsate: clsx$1(classes.childPulsate, touchRippleClasses.childPulsate)
14407
14870
  },
14408
14871
  timeout: DURATION,
14409
14872
  pulsate: pulsate,
@@ -14531,7 +14994,7 @@
14531
14994
  stop
14532
14995
  }), [pulsate, start, stop]);
14533
14996
  return /*#__PURE__*/jsxRuntimeExports.jsx(TouchRippleRoot, _extends$1({
14534
- className: clsx(touchRippleClasses.root, classes.root, className),
14997
+ className: clsx$1(touchRippleClasses.root, classes.root, className),
14535
14998
  ref: container
14536
14999
  }, other, {
14537
15000
  children: /*#__PURE__*/jsxRuntimeExports.jsx(TransitionGroup, {
@@ -14810,7 +15273,7 @@
14810
15273
  const classes = useUtilityClasses$r(ownerState);
14811
15274
  return /*#__PURE__*/jsxRuntimeExports.jsxs(ButtonBaseRoot, _extends$1({
14812
15275
  as: ComponentProp,
14813
- className: clsx(classes.root, className),
15276
+ className: clsx$1(classes.root, className),
14814
15277
  ownerState: ownerState,
14815
15278
  onBlur: handleBlur,
14816
15279
  onClick: onClick,
@@ -15107,11 +15570,11 @@
15107
15570
  const positionClassName = buttonGroupButtonContextPositionClassName || '';
15108
15571
  return /*#__PURE__*/jsxRuntimeExports.jsxs(ButtonRoot, _extends$1({
15109
15572
  ownerState: ownerState,
15110
- className: clsx(contextProps.className, classes.root, className, positionClassName),
15573
+ className: clsx$1(contextProps.className, classes.root, className, positionClassName),
15111
15574
  component: component,
15112
15575
  disabled: disabled,
15113
15576
  focusRipple: !disableFocusRipple,
15114
- focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
15577
+ focusVisibleClassName: clsx$1(classes.focusVisible, focusVisibleClassName),
15115
15578
  ref: ref,
15116
15579
  type: type
15117
15580
  }, other, {
@@ -15449,7 +15912,7 @@
15449
15912
  return cache$1[key];
15450
15913
  }
15451
15914
 
15452
- const NEBULA_VERSION_HASH = "3b94";
15915
+ const NEBULA_VERSION_HASH = "3efc";
15453
15916
  ClassNameGenerator.configure(componentName => {
15454
15917
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
15455
15918
  });
@@ -15693,7 +16156,7 @@
15693
16156
  const appRef = React.createRef();
15694
16157
  const element = document.createElement('div');
15695
16158
  element.style.display = 'none';
15696
- element.setAttribute('data-nebulajs-version', "6.0.0-alpha.1");
16159
+ element.setAttribute('data-nebulajs-version', "6.0.0-alpha.2");
15697
16160
  element.setAttribute('data-app-id', app.id);
15698
16161
  document.body.appendChild(element);
15699
16162
  if (context) {
@@ -15868,7 +16331,7 @@
15868
16331
  const classes = useUtilityClasses$p(ownerState);
15869
16332
  return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$1({
15870
16333
  as: component,
15871
- className: clsx(classes.root, className),
16334
+ className: clsx$1(classes.root, className),
15872
16335
  focusable: "false",
15873
16336
  color: htmlColor,
15874
16337
  "aria-hidden": titleAccess ? undefined : true,
@@ -16012,7 +16475,7 @@
16012
16475
  return /*#__PURE__*/jsxRuntimeExports.jsx(PaperRoot, _extends$1({
16013
16476
  as: component,
16014
16477
  ownerState: ownerState,
16015
- className: clsx(classes.root, className),
16478
+ className: clsx$1(classes.root, className),
16016
16479
  ref: ref
16017
16480
  }, other));
16018
16481
  });
@@ -16133,7 +16596,7 @@
16133
16596
  });
16134
16597
  const classes = useUtilityClasses$n(ownerState);
16135
16598
  return /*#__PURE__*/jsxRuntimeExports.jsx(IconButtonRoot, _extends$1({
16136
- className: clsx(classes.root, className),
16599
+ className: clsx$1(classes.root, className),
16137
16600
  centerRipple: true,
16138
16601
  focusRipple: !disableFocusRipple,
16139
16602
  disabled: disabled,
@@ -16254,7 +16717,7 @@
16254
16717
  as: Component,
16255
16718
  ref: ref,
16256
16719
  ownerState: ownerState,
16257
- className: clsx(classes.root, className)
16720
+ className: clsx$1(classes.root, className)
16258
16721
  }, other));
16259
16722
  });
16260
16723
 
@@ -19086,7 +19549,7 @@
19086
19549
  ref: ref,
19087
19550
  onClick: handleClick
19088
19551
  }, other, {
19089
- className: clsx(classes.root, rootProps.className, className, readOnly && 'MuiInputBase-readOnly'),
19552
+ className: clsx$1(classes.root, rootProps.className, className, readOnly && 'MuiInputBase-readOnly'),
19090
19553
  children: [startAdornment, /*#__PURE__*/jsxRuntimeExports.jsx(FormControlContext.Provider, {
19091
19554
  value: null,
19092
19555
  children: /*#__PURE__*/jsxRuntimeExports.jsx(Input, _extends$1({
@@ -19113,7 +19576,7 @@
19113
19576
  ownerState: _extends$1({}, ownerState, inputProps.ownerState)
19114
19577
  }, {
19115
19578
  ref: handleInputRef,
19116
- className: clsx(classes.input, inputProps.className, readOnly && 'MuiInputBase-readOnly'),
19579
+ className: clsx$1(classes.input, inputProps.className, readOnly && 'MuiInputBase-readOnly'),
19117
19580
  onBlur: handleBlur,
19118
19581
  onChange: handleChange,
19119
19582
  onFocus: handleFocus
@@ -19322,7 +19785,7 @@
19322
19785
  "aria-hidden": true
19323
19786
  }, rootSlotProps, {
19324
19787
  as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,
19325
- className: clsx(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),
19788
+ className: clsx$1(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),
19326
19789
  ownerState: _extends$1({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),
19327
19790
  classes: classes,
19328
19791
  ref: ref,
@@ -19659,13 +20122,13 @@
19659
20122
  as: component
19660
20123
  },
19661
20124
  ownerState,
19662
- className: clsx(rootSlotProps == null ? void 0 : rootSlotProps.className, classes.root, className)
20125
+ className: clsx$1(rootSlotProps == null ? void 0 : rootSlotProps.className, classes.root, className)
19663
20126
  });
19664
20127
  const badgeProps = useSlotProps({
19665
20128
  elementType: BadgeSlot,
19666
20129
  externalSlotProps: badgeSlotProps,
19667
20130
  ownerState,
19668
- className: clsx(classes.badge, badgeSlotProps == null ? void 0 : badgeSlotProps.className)
20131
+ className: clsx$1(classes.badge, badgeSlotProps == null ? void 0 : badgeSlotProps.className)
19669
20132
  });
19670
20133
  return /*#__PURE__*/jsxRuntimeExports.jsxs(RootSlot, _extends$1({}, rootProps, {
19671
20134
  children: [children, /*#__PURE__*/jsxRuntimeExports.jsx(BadgeSlot, _extends$1({}, badgeProps, {
@@ -19810,7 +20273,7 @@
19810
20273
  const classes = useUtilityClasses$h(ownerState);
19811
20274
  return /*#__PURE__*/jsxRuntimeExports.jsxs(SwitchBaseRoot, _extends$1({
19812
20275
  component: "span",
19813
- className: clsx(classes.root, className),
20276
+ className: clsx$1(classes.root, className),
19814
20277
  centerRipple: true,
19815
20278
  focusRipple: !disableFocusRipple,
19816
20279
  disabled: disabled,
@@ -19945,7 +20408,7 @@
19945
20408
  }),
19946
20409
  ownerState: ownerState,
19947
20410
  ref: ref,
19948
- className: clsx(classes.root, className)
20411
+ className: clsx$1(classes.root, className)
19949
20412
  }, other, {
19950
20413
  classes: classes
19951
20414
  }));
@@ -20101,7 +20564,7 @@
20101
20564
  rootStyle.transform = 'rotate(-90deg)';
20102
20565
  }
20103
20566
  return /*#__PURE__*/jsxRuntimeExports.jsx(CircularProgressRoot, _extends$1({
20104
- className: clsx(classes.root, className),
20567
+ className: clsx$1(classes.root, className),
20105
20568
  style: _extends$1({
20106
20569
  width: size,
20107
20570
  height: size
@@ -20939,7 +21402,7 @@
20939
21402
  as: component
20940
21403
  },
20941
21404
  ownerState,
20942
- className: clsx(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))
21405
+ className: clsx$1(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))
20943
21406
  });
20944
21407
  const backdropProps = useSlotProps({
20945
21408
  elementType: BackdropSlot,
@@ -20957,7 +21420,7 @@
20957
21420
  }
20958
21421
  }));
20959
21422
  },
20960
- className: clsx(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop),
21423
+ className: clsx$1(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop),
20961
21424
  ownerState
20962
21425
  });
20963
21426
  if (!keepMounted && !open && (!hasTransition || exited)) {
@@ -21145,7 +21608,7 @@
21145
21608
  const classes = useUtilityClasses$d(ownerState);
21146
21609
  return /*#__PURE__*/jsxRuntimeExports.jsx(DividerRoot, _extends$1({
21147
21610
  as: component,
21148
- className: clsx(classes.root, className),
21611
+ className: clsx$1(classes.root, className),
21149
21612
  role: role,
21150
21613
  ref: ref,
21151
21614
  ownerState: ownerState
@@ -21306,12 +21769,12 @@
21306
21769
  label = /*#__PURE__*/jsxRuntimeExports.jsx(Typography, _extends$1({
21307
21770
  component: "span"
21308
21771
  }, typographySlotProps, {
21309
- className: clsx(classes.label, typographySlotProps == null ? void 0 : typographySlotProps.className),
21772
+ className: clsx$1(classes.label, typographySlotProps == null ? void 0 : typographySlotProps.className),
21310
21773
  children: label
21311
21774
  }));
21312
21775
  }
21313
21776
  return /*#__PURE__*/jsxRuntimeExports.jsxs(FormControlLabelRoot, _extends$1({
21314
- className: clsx(classes.root, className),
21777
+ className: clsx$1(classes.root, className),
21315
21778
  ownerState: ownerState,
21316
21779
  ref: ref
21317
21780
  }, other, {
@@ -21742,7 +22205,7 @@
21742
22205
  value: columns,
21743
22206
  children: /*#__PURE__*/jsxRuntimeExports.jsx(GridRoot, _extends$1({
21744
22207
  ownerState: ownerState,
21745
- className: clsx(classes.root, className),
22208
+ className: clsx$1(classes.root, className),
21746
22209
  as: component,
21747
22210
  ref: ref
21748
22211
  }, otherFiltered))
@@ -21999,7 +22462,7 @@
21999
22462
  const classes = useUtilityClasses$a(ownerState);
22000
22463
  return /*#__PURE__*/jsxRuntimeExports.jsx(IconRoot, _extends$1({
22001
22464
  as: Component,
22002
- className: clsx(baseClassName,
22465
+ className: clsx$1(baseClassName,
22003
22466
  // Prevent the translation of the text content.
22004
22467
  // The font relies on the exact text content to render the icon.
22005
22468
  'notranslate', classes.root, className),
@@ -22101,7 +22564,7 @@
22101
22564
  children: /*#__PURE__*/jsxRuntimeExports.jsx(InputAdornmentRoot, _extends$1({
22102
22565
  as: component,
22103
22566
  ownerState: ownerState,
22104
- className: clsx(classes.root, className),
22567
+ className: clsx$1(classes.root, className),
22105
22568
  ref: ref
22106
22569
  }, other, {
22107
22570
  children: typeof children === 'string' && !disableTypography ? /*#__PURE__*/jsxRuntimeExports.jsx(Typography, {
@@ -22189,7 +22652,7 @@
22189
22652
  value: context,
22190
22653
  children: /*#__PURE__*/jsxRuntimeExports.jsxs(ListRoot, _extends$1({
22191
22654
  as: component,
22192
- className: clsx(classes.root, className),
22655
+ className: clsx$1(classes.root, className),
22193
22656
  ref: ref,
22194
22657
  ownerState: ownerState
22195
22658
  }, other, {
@@ -22259,7 +22722,7 @@
22259
22722
  });
22260
22723
  const classes = useUtilityClasses$7(ownerState);
22261
22724
  return /*#__PURE__*/jsxRuntimeExports.jsx(ListItemSecondaryActionRoot, _extends$1({
22262
- className: clsx(classes.root, className),
22725
+ className: clsx$1(classes.root, className),
22263
22726
  ownerState: ownerState,
22264
22727
  ref: ref
22265
22728
  }, other));
@@ -22445,13 +22908,13 @@
22445
22908
  const Root = slots.root || components.Root || ListItemRoot;
22446
22909
  const rootProps = slotProps.root || componentsProps.root || {};
22447
22910
  const componentProps = _extends$1({
22448
- className: clsx(classes.root, rootProps.className, className),
22911
+ className: clsx$1(classes.root, rootProps.className, className),
22449
22912
  disabled
22450
22913
  }, other);
22451
22914
  let Component = componentProp || 'li';
22452
22915
  if (button) {
22453
22916
  componentProps.component = componentProp || 'div';
22454
- componentProps.focusVisibleClassName = clsx(listItemClasses.focusVisible, focusVisibleClassName);
22917
+ componentProps.focusVisibleClassName = clsx$1(listItemClasses.focusVisible, focusVisibleClassName);
22455
22918
  Component = ButtonBase;
22456
22919
  }
22457
22920
 
@@ -22472,7 +22935,7 @@
22472
22935
  value: childContext,
22473
22936
  children: /*#__PURE__*/jsxRuntimeExports.jsxs(ListItemContainer, _extends$1({
22474
22937
  as: ContainerComponent,
22475
- className: clsx(classes.container, ContainerClassName),
22938
+ className: clsx$1(classes.container, ContainerClassName),
22476
22939
  ref: handleRef,
22477
22940
  ownerState: ownerState
22478
22941
  }, ContainerProps, {
@@ -22555,7 +23018,7 @@
22555
23018
  });
22556
23019
  const classes = useUtilityClasses$5(ownerState);
22557
23020
  return /*#__PURE__*/jsxRuntimeExports.jsx(ListItemIconRoot, _extends$1({
22558
- className: clsx(classes.root, className),
23021
+ className: clsx$1(classes.root, className),
22559
23022
  ownerState: ownerState,
22560
23023
  ref: ref
22561
23024
  }, other));
@@ -23066,7 +23529,7 @@
23066
23529
  ref: handlePaperRef
23067
23530
  },
23068
23531
  ownerState,
23069
- className: clsx(classes.paper, externalPaperSlotProps == null ? void 0 : externalPaperSlotProps.className)
23532
+ className: clsx$1(classes.paper, externalPaperSlotProps == null ? void 0 : externalPaperSlotProps.className)
23070
23533
  });
23071
23534
  const _useSlotProps = useSlotProps({
23072
23535
  elementType: RootSlot,
@@ -23083,7 +23546,7 @@
23083
23546
  open
23084
23547
  },
23085
23548
  ownerState,
23086
- className: clsx(classes.root, className)
23549
+ className: clsx$1(classes.root, className)
23087
23550
  }),
23088
23551
  {
23089
23552
  slotProps: rootSlotPropsProp
@@ -23266,8 +23729,8 @@
23266
23729
  role: role,
23267
23730
  tabIndex: tabIndex,
23268
23731
  component: component,
23269
- focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
23270
- className: clsx(classes.root, className)
23732
+ focusVisibleClassName: clsx$1(classes.focusVisible, focusVisibleClassName),
23733
+ className: clsx$1(classes.root, className)
23271
23734
  }, other, {
23272
23735
  ownerState: ownerState,
23273
23736
  classes: classes
@@ -23733,7 +24196,7 @@
23733
24196
  checked: checked,
23734
24197
  onChange: onChange,
23735
24198
  ref: ref,
23736
- className: clsx(classes.root, className)
24199
+ className: clsx$1(classes.root, className)
23737
24200
  }, other));
23738
24201
  });
23739
24202
 
@@ -24160,7 +24623,7 @@
24160
24623
  nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;
24161
24624
  }
24162
24625
  const childrenProps = _extends$1({}, nameOrDescProps, other, children.props, {
24163
- className: clsx(other.className, children.props.className),
24626
+ className: clsx$1(other.className, children.props.className),
24164
24627
  onTouchStart: detectTouchStart,
24165
24628
  ref: handleRef
24166
24629
  }, followCursor ? {
@@ -24218,14 +24681,14 @@
24218
24681
  const TooltipComponent = (_ref4 = (_slots$tooltip = slots.tooltip) != null ? _slots$tooltip : components.Tooltip) != null ? _ref4 : TooltipTooltip;
24219
24682
  const ArrowComponent = (_ref5 = (_slots$arrow = slots.arrow) != null ? _slots$arrow : components.Arrow) != null ? _ref5 : TooltipArrow;
24220
24683
  const popperProps = appendOwnerState(PopperComponent, _extends$1({}, PopperProps, (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper, {
24221
- className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref6 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref6.className)
24684
+ className: clsx$1(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref6 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref6.className)
24222
24685
  }), ownerState);
24223
24686
  const transitionProps = appendOwnerState(TransitionComponent, _extends$1({}, TransitionProps, (_slotProps$transition = slotProps.transition) != null ? _slotProps$transition : componentsProps.transition), ownerState);
24224
24687
  const tooltipProps = appendOwnerState(TooltipComponent, _extends$1({}, (_slotProps$tooltip = slotProps.tooltip) != null ? _slotProps$tooltip : componentsProps.tooltip, {
24225
- className: clsx(classes.tooltip, (_ref7 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref7.className)
24688
+ className: clsx$1(classes.tooltip, (_ref7 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref7.className)
24226
24689
  }), ownerState);
24227
24690
  const tooltipArrowProps = appendOwnerState(ArrowComponent, _extends$1({}, (_slotProps$arrow = slotProps.arrow) != null ? _slotProps$arrow : componentsProps.arrow, {
24228
- className: clsx(classes.arrow, (_ref8 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref8.className)
24691
+ className: clsx$1(classes.arrow, (_ref8 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref8.className)
24229
24692
  }), ownerState);
24230
24693
  return /*#__PURE__*/jsxRuntimeExports.jsxs(reactExports.Fragment, {
24231
24694
  children: [/*#__PURE__*/reactExports.cloneElement(children, childrenProps), /*#__PURE__*/jsxRuntimeExports.jsx(PopperComponent, _extends$1({
@@ -42440,1625 +42903,1357 @@
42440
42903
 
42441
42904
  var lrucache;
42442
42905
  var hasRequiredLrucache;
42443
-
42444
- function requireLrucache () {
42445
- if (hasRequiredLrucache) return lrucache;
42446
- hasRequiredLrucache = 1;
42447
-
42448
- class LRUCache {
42449
- constructor () {
42450
- this.max = 1000;
42451
- this.map = new Map();
42452
- }
42453
-
42454
- get (key) {
42455
- const value = this.map.get(key);
42456
- if (value === undefined) {
42457
- return undefined
42458
- } else {
42459
- // Remove the key from the map and add it to the end
42460
- this.map.delete(key);
42461
- this.map.set(key, value);
42462
- return value
42463
- }
42464
- }
42465
-
42466
- delete (key) {
42467
- return this.map.delete(key)
42468
- }
42469
-
42470
- set (key, value) {
42471
- const deleted = this.delete(key);
42472
-
42473
- if (!deleted && value !== undefined) {
42474
- // If cache is full, delete the least recently used item
42475
- if (this.map.size >= this.max) {
42476
- const firstKey = this.map.keys().next().value;
42477
- this.delete(firstKey);
42478
- }
42479
-
42480
- this.map.set(key, value);
42481
- }
42482
-
42483
- return this
42484
- }
42485
- }
42486
-
42487
- lrucache = LRUCache;
42488
- return lrucache;
42906
+ function requireLrucache() {
42907
+ if (hasRequiredLrucache) return lrucache;
42908
+ hasRequiredLrucache = 1;
42909
+ class LRUCache {
42910
+ constructor() {
42911
+ this.max = 1000;
42912
+ this.map = new Map();
42913
+ }
42914
+ get(key) {
42915
+ const value = this.map.get(key);
42916
+ if (value === undefined) {
42917
+ return undefined;
42918
+ } else {
42919
+ // Remove the key from the map and add it to the end
42920
+ this.map.delete(key);
42921
+ this.map.set(key, value);
42922
+ return value;
42923
+ }
42924
+ }
42925
+ delete(key) {
42926
+ return this.map.delete(key);
42927
+ }
42928
+ set(key, value) {
42929
+ const deleted = this.delete(key);
42930
+ if (!deleted && value !== undefined) {
42931
+ // If cache is full, delete the least recently used item
42932
+ if (this.map.size >= this.max) {
42933
+ const firstKey = this.map.keys().next().value;
42934
+ this.delete(firstKey);
42935
+ }
42936
+ this.map.set(key, value);
42937
+ }
42938
+ return this;
42939
+ }
42940
+ }
42941
+ lrucache = LRUCache;
42942
+ return lrucache;
42489
42943
  }
42490
42944
 
42491
42945
  var parseOptions_1;
42492
42946
  var hasRequiredParseOptions;
42947
+ function requireParseOptions() {
42948
+ if (hasRequiredParseOptions) return parseOptions_1;
42949
+ hasRequiredParseOptions = 1;
42493
42950
 
42494
- function requireParseOptions () {
42495
- if (hasRequiredParseOptions) return parseOptions_1;
42496
- hasRequiredParseOptions = 1;
42497
-
42498
- // parse out just the options we care about
42499
- const looseOption = Object.freeze({ loose: true });
42500
- const emptyOpts = Object.freeze({ });
42501
- const parseOptions = options => {
42502
- if (!options) {
42503
- return emptyOpts
42504
- }
42505
-
42506
- if (typeof options !== 'object') {
42507
- return looseOption
42508
- }
42509
-
42510
- return options
42511
- };
42512
- parseOptions_1 = parseOptions;
42513
- return parseOptions_1;
42951
+ // parse out just the options we care about
42952
+ const looseOption = Object.freeze({
42953
+ loose: true
42954
+ });
42955
+ const emptyOpts = Object.freeze({});
42956
+ const parseOptions = options => {
42957
+ if (!options) {
42958
+ return emptyOpts;
42959
+ }
42960
+ if (typeof options !== 'object') {
42961
+ return looseOption;
42962
+ }
42963
+ return options;
42964
+ };
42965
+ parseOptions_1 = parseOptions;
42966
+ return parseOptions_1;
42514
42967
  }
42515
42968
 
42516
42969
  var re = {exports: {}};
42517
42970
 
42518
42971
  var constants;
42519
42972
  var hasRequiredConstants;
42520
-
42521
- function requireConstants () {
42522
- if (hasRequiredConstants) return constants;
42523
- hasRequiredConstants = 1;
42524
-
42525
- // Note: this is the semver.org version of the spec that it implements
42526
- // Not necessarily the package version of this code.
42527
- const SEMVER_SPEC_VERSION = '2.0.0';
42528
-
42529
- const MAX_LENGTH = 256;
42530
- const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
42531
- /* istanbul ignore next */ 9007199254740991;
42532
-
42533
- // Max safe segment length for coercion.
42534
- const MAX_SAFE_COMPONENT_LENGTH = 16;
42535
-
42536
- // Max safe length for a build identifier. The max length minus 6 characters for
42537
- // the shortest version with a build 0.0.0+BUILD.
42538
- const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
42539
-
42540
- const RELEASE_TYPES = [
42541
- 'major',
42542
- 'premajor',
42543
- 'minor',
42544
- 'preminor',
42545
- 'patch',
42546
- 'prepatch',
42547
- 'prerelease',
42548
- ];
42549
-
42550
- constants = {
42551
- MAX_LENGTH,
42552
- MAX_SAFE_COMPONENT_LENGTH,
42553
- MAX_SAFE_BUILD_LENGTH,
42554
- MAX_SAFE_INTEGER,
42555
- RELEASE_TYPES,
42556
- SEMVER_SPEC_VERSION,
42557
- FLAG_INCLUDE_PRERELEASE: 0b001,
42558
- FLAG_LOOSE: 0b010,
42559
- };
42560
- return constants;
42973
+ function requireConstants() {
42974
+ if (hasRequiredConstants) return constants;
42975
+ hasRequiredConstants = 1;
42976
+
42977
+ // Note: this is the semver.org version of the spec that it implements
42978
+ // Not necessarily the package version of this code.
42979
+ const SEMVER_SPEC_VERSION = '2.0.0';
42980
+ const MAX_LENGTH = 256;
42981
+ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */9007199254740991;
42982
+
42983
+ // Max safe segment length for coercion.
42984
+ const MAX_SAFE_COMPONENT_LENGTH = 16;
42985
+
42986
+ // Max safe length for a build identifier. The max length minus 6 characters for
42987
+ // the shortest version with a build 0.0.0+BUILD.
42988
+ const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
42989
+ const RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];
42990
+ constants = {
42991
+ MAX_LENGTH,
42992
+ MAX_SAFE_COMPONENT_LENGTH,
42993
+ MAX_SAFE_BUILD_LENGTH,
42994
+ MAX_SAFE_INTEGER,
42995
+ RELEASE_TYPES,
42996
+ SEMVER_SPEC_VERSION,
42997
+ FLAG_INCLUDE_PRERELEASE: 0b001,
42998
+ FLAG_LOOSE: 0b010
42999
+ };
43000
+ return constants;
42561
43001
  }
42562
43002
 
42563
43003
  var debug_1;
42564
43004
  var hasRequiredDebug;
42565
-
42566
- function requireDebug () {
42567
- if (hasRequiredDebug) return debug_1;
42568
- hasRequiredDebug = 1;
42569
-
42570
- const debug = (
42571
- typeof process === 'object' &&
42572
- process.env &&
42573
- process.env.NODE_DEBUG &&
42574
- /\bsemver\b/i.test(process.env.NODE_DEBUG)
42575
- ) ? (...args) => console.error('SEMVER', ...args)
42576
- : () => {};
42577
-
42578
- debug_1 = debug;
42579
- return debug_1;
43005
+ function requireDebug() {
43006
+ if (hasRequiredDebug) return debug_1;
43007
+ hasRequiredDebug = 1;
43008
+ const debug = typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? function () {
43009
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
43010
+ args[_key] = arguments[_key];
43011
+ }
43012
+ return console.error('SEMVER', ...args);
43013
+ } : () => {};
43014
+ debug_1 = debug;
43015
+ return debug_1;
42580
43016
  }
42581
43017
 
42582
43018
  var hasRequiredRe;
43019
+ function requireRe() {
43020
+ if (hasRequiredRe) return re.exports;
43021
+ hasRequiredRe = 1;
43022
+ (function (module, exports) {
42583
43023
 
42584
- function requireRe () {
42585
- if (hasRequiredRe) return re.exports;
42586
- hasRequiredRe = 1;
42587
- (function (module, exports) {
42588
-
42589
- const {
42590
- MAX_SAFE_COMPONENT_LENGTH,
42591
- MAX_SAFE_BUILD_LENGTH,
42592
- MAX_LENGTH,
42593
- } = requireConstants();
42594
- const debug = requireDebug();
42595
- exports = module.exports = {};
42596
-
42597
- // The actual regexps go on exports.re
42598
- const re = exports.re = [];
42599
- const safeRe = exports.safeRe = [];
42600
- const src = exports.src = [];
42601
- const safeSrc = exports.safeSrc = [];
42602
- const t = exports.t = {};
42603
- let R = 0;
42604
-
42605
- const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
42606
-
42607
- // Replace some greedy regex tokens to prevent regex dos issues. These regex are
42608
- // used internally via the safeRe object since all inputs in this library get
42609
- // normalized first to trim and collapse all extra whitespace. The original
42610
- // regexes are exported for userland consumption and lower level usage. A
42611
- // future breaking change could export the safer regex only with a note that
42612
- // all input should have extra whitespace removed.
42613
- const safeRegexReplacements = [
42614
- ['\\s', 1],
42615
- ['\\d', MAX_LENGTH],
42616
- [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
42617
- ];
42618
-
42619
- const makeSafeRegex = (value) => {
42620
- for (const [token, max] of safeRegexReplacements) {
42621
- value = value
42622
- .split(`${token}*`).join(`${token}{0,${max}}`)
42623
- .split(`${token}+`).join(`${token}{1,${max}}`);
42624
- }
42625
- return value
42626
- };
42627
-
42628
- const createToken = (name, value, isGlobal) => {
42629
- const safe = makeSafeRegex(value);
42630
- const index = R++;
42631
- debug(name, index, value);
42632
- t[name] = index;
42633
- src[index] = value;
42634
- safeSrc[index] = safe;
42635
- re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
42636
- safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
42637
- };
42638
-
42639
- // The following Regular Expressions can be used for tokenizing,
42640
- // validating, and parsing SemVer version strings.
42641
-
42642
- // ## Numeric Identifier
42643
- // A single `0`, or a non-zero digit followed by zero or more digits.
42644
-
42645
- createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
42646
- createToken('NUMERICIDENTIFIERLOOSE', '\\d+');
42647
-
42648
- // ## Non-numeric Identifier
42649
- // Zero or more digits, followed by a letter or hyphen, and then zero or
42650
- // more letters, digits, or hyphens.
42651
-
42652
- createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
42653
-
42654
- // ## Main Version
42655
- // Three dot-separated numeric identifiers.
42656
-
42657
- createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
42658
- `(${src[t.NUMERICIDENTIFIER]})\\.` +
42659
- `(${src[t.NUMERICIDENTIFIER]})`);
42660
-
42661
- createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
42662
- `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
42663
- `(${src[t.NUMERICIDENTIFIERLOOSE]})`);
42664
-
42665
- // ## Pre-release Version Identifier
42666
- // A numeric identifier, or a non-numeric identifier.
42667
- // Non-numberic identifiers include numberic identifiers but can be longer.
42668
- // Therefore non-numberic identifiers must go first.
42669
-
42670
- createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
42671
- }|${src[t.NUMERICIDENTIFIER]})`);
42672
-
42673
- createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
42674
- }|${src[t.NUMERICIDENTIFIERLOOSE]})`);
42675
-
42676
- // ## Pre-release Version
42677
- // Hyphen, followed by one or more dot-separated pre-release version
42678
- // identifiers.
42679
-
42680
- createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
42681
- }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
42682
-
42683
- createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
42684
- }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
42685
-
42686
- // ## Build Metadata Identifier
42687
- // Any combination of digits, letters, or hyphens.
42688
-
42689
- createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`);
42690
-
42691
- // ## Build Metadata
42692
- // Plus sign, followed by one or more period-separated build metadata
42693
- // identifiers.
43024
+ const {
43025
+ MAX_SAFE_COMPONENT_LENGTH,
43026
+ MAX_SAFE_BUILD_LENGTH,
43027
+ MAX_LENGTH
43028
+ } = requireConstants();
43029
+ const debug = requireDebug();
43030
+ exports = module.exports = {};
43031
+
43032
+ // The actual regexps go on exports.re
43033
+ const re = exports.re = [];
43034
+ const safeRe = exports.safeRe = [];
43035
+ const src = exports.src = [];
43036
+ const safeSrc = exports.safeSrc = [];
43037
+ const t = exports.t = {};
43038
+ let R = 0;
43039
+ const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
43040
+
43041
+ // Replace some greedy regex tokens to prevent regex dos issues. These regex are
43042
+ // used internally via the safeRe object since all inputs in this library get
43043
+ // normalized first to trim and collapse all extra whitespace. The original
43044
+ // regexes are exported for userland consumption and lower level usage. A
43045
+ // future breaking change could export the safer regex only with a note that
43046
+ // all input should have extra whitespace removed.
43047
+ const safeRegexReplacements = [['\\s', 1], ['\\d', MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]];
43048
+ const makeSafeRegex = value => {
43049
+ for (const [token, max] of safeRegexReplacements) {
43050
+ value = value.split("".concat(token, "*")).join("".concat(token, "{0,").concat(max, "}")).split("".concat(token, "+")).join("".concat(token, "{1,").concat(max, "}"));
43051
+ }
43052
+ return value;
43053
+ };
43054
+ const createToken = (name, value, isGlobal) => {
43055
+ const safe = makeSafeRegex(value);
43056
+ const index = R++;
43057
+ debug(name, index, value);
43058
+ t[name] = index;
43059
+ src[index] = value;
43060
+ safeSrc[index] = safe;
43061
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
43062
+ safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
43063
+ };
42694
43064
 
42695
- createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
42696
- }(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
42697
-
42698
- // ## Full Version String
42699
- // A main version, followed optionally by a pre-release version and
42700
- // build metadata.
42701
-
42702
- // Note that the only major, minor, patch, and pre-release sections of
42703
- // the version string are capturing groups. The build metadata is not a
42704
- // capturing group, because it should not ever be used in version
42705
- // comparison.
42706
-
42707
- createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
42708
- }${src[t.PRERELEASE]}?${
42709
- src[t.BUILD]}?`);
42710
-
42711
- createToken('FULL', `^${src[t.FULLPLAIN]}$`);
42712
-
42713
- // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
42714
- // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
42715
- // common in the npm registry.
42716
- createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
42717
- }${src[t.PRERELEASELOOSE]}?${
42718
- src[t.BUILD]}?`);
42719
-
42720
- createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`);
42721
-
42722
- createToken('GTLT', '((?:<|>)?=?)');
42723
-
42724
- // Something like "2.*" or "1.2.x".
42725
- // Note that "x.x" is a valid xRange identifer, meaning "any version"
42726
- // Only the first item is strictly required.
42727
- createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
42728
- createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
42729
-
42730
- createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
42731
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
42732
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
42733
- `(?:${src[t.PRERELEASE]})?${
42734
- src[t.BUILD]}?` +
42735
- `)?)?`);
42736
-
42737
- createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
42738
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
42739
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
42740
- `(?:${src[t.PRERELEASELOOSE]})?${
42741
- src[t.BUILD]}?` +
42742
- `)?)?`);
42743
-
42744
- createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
42745
- createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
42746
-
42747
- // Coercion.
42748
- // Extract anything that could conceivably be a part of a valid semver
42749
- createToken('COERCEPLAIN', `${'(^|[^\\d])' +
42750
- '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
42751
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
42752
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
42753
- createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
42754
- createToken('COERCEFULL', src[t.COERCEPLAIN] +
42755
- `(?:${src[t.PRERELEASE]})?` +
42756
- `(?:${src[t.BUILD]})?` +
42757
- `(?:$|[^\\d])`);
42758
- createToken('COERCERTL', src[t.COERCE], true);
42759
- createToken('COERCERTLFULL', src[t.COERCEFULL], true);
42760
-
42761
- // Tilde ranges.
42762
- // Meaning is "reasonably at or greater than"
42763
- createToken('LONETILDE', '(?:~>?)');
42764
-
42765
- createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true);
42766
- exports.tildeTrimReplace = '$1~';
42767
-
42768
- createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
42769
- createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
42770
-
42771
- // Caret ranges.
42772
- // Meaning is "at least and backwards compatible with"
42773
- createToken('LONECARET', '(?:\\^)');
42774
-
42775
- createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true);
42776
- exports.caretTrimReplace = '$1^';
42777
-
42778
- createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
42779
- createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
42780
-
42781
- // A simple gt/lt/eq thing, or just "" to indicate "any version"
42782
- createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
42783
- createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
42784
-
42785
- // An expression to strip any whitespace between the gtlt and the thing
42786
- // it modifies, so that `> 1.2.3` ==> `>1.2.3`
42787
- createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
42788
- }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
42789
- exports.comparatorTrimReplace = '$1$2$3';
42790
-
42791
- // Something like `1.2.3 - 1.2.4`
42792
- // Note that these all use the loose form, because they'll be
42793
- // checked against either the strict or loose comparator form
42794
- // later.
42795
- createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
42796
- `\\s+-\\s+` +
42797
- `(${src[t.XRANGEPLAIN]})` +
42798
- `\\s*$`);
42799
-
42800
- createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
42801
- `\\s+-\\s+` +
42802
- `(${src[t.XRANGEPLAINLOOSE]})` +
42803
- `\\s*$`);
42804
-
42805
- // Star ranges basically just allow anything at all.
42806
- createToken('STAR', '(<|>)?=?\\s*\\*');
42807
- // >=0.0.0 is like a star
42808
- createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$');
42809
- createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$');
42810
- } (re, re.exports));
42811
- return re.exports;
43065
+ // The following Regular Expressions can be used for tokenizing,
43066
+ // validating, and parsing SemVer version strings.
43067
+
43068
+ // ## Numeric Identifier
43069
+ // A single `0`, or a non-zero digit followed by zero or more digits.
43070
+
43071
+ createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
43072
+ createToken('NUMERICIDENTIFIERLOOSE', '\\d+');
43073
+
43074
+ // ## Non-numeric Identifier
43075
+ // Zero or more digits, followed by a letter or hyphen, and then zero or
43076
+ // more letters, digits, or hyphens.
43077
+
43078
+ createToken('NONNUMERICIDENTIFIER', "\\d*[a-zA-Z-]".concat(LETTERDASHNUMBER, "*"));
43079
+
43080
+ // ## Main Version
43081
+ // Three dot-separated numeric identifiers.
43082
+
43083
+ createToken('MAINVERSION', "(".concat(src[t.NUMERICIDENTIFIER], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIER], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIER], ")"));
43084
+ createToken('MAINVERSIONLOOSE', "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")"));
43085
+
43086
+ // ## Pre-release Version Identifier
43087
+ // A numeric identifier, or a non-numeric identifier.
43088
+ // Non-numberic identifiers include numberic identifiers but can be longer.
43089
+ // Therefore non-numberic identifiers must go first.
43090
+
43091
+ createToken('PRERELEASEIDENTIFIER', "(?:".concat(src[t.NONNUMERICIDENTIFIER], "|").concat(src[t.NUMERICIDENTIFIER], ")"));
43092
+ createToken('PRERELEASEIDENTIFIERLOOSE', "(?:".concat(src[t.NONNUMERICIDENTIFIER], "|").concat(src[t.NUMERICIDENTIFIERLOOSE], ")"));
43093
+
43094
+ // ## Pre-release Version
43095
+ // Hyphen, followed by one or more dot-separated pre-release version
43096
+ // identifiers.
43097
+
43098
+ createToken('PRERELEASE', "(?:-(".concat(src[t.PRERELEASEIDENTIFIER], "(?:\\.").concat(src[t.PRERELEASEIDENTIFIER], ")*))"));
43099
+ createToken('PRERELEASELOOSE', "(?:-?(".concat(src[t.PRERELEASEIDENTIFIERLOOSE], "(?:\\.").concat(src[t.PRERELEASEIDENTIFIERLOOSE], ")*))"));
43100
+
43101
+ // ## Build Metadata Identifier
43102
+ // Any combination of digits, letters, or hyphens.
43103
+
43104
+ createToken('BUILDIDENTIFIER', "".concat(LETTERDASHNUMBER, "+"));
43105
+
43106
+ // ## Build Metadata
43107
+ // Plus sign, followed by one or more period-separated build metadata
43108
+ // identifiers.
43109
+
43110
+ createToken('BUILD', "(?:\\+(".concat(src[t.BUILDIDENTIFIER], "(?:\\.").concat(src[t.BUILDIDENTIFIER], ")*))"));
43111
+
43112
+ // ## Full Version String
43113
+ // A main version, followed optionally by a pre-release version and
43114
+ // build metadata.
43115
+
43116
+ // Note that the only major, minor, patch, and pre-release sections of
43117
+ // the version string are capturing groups. The build metadata is not a
43118
+ // capturing group, because it should not ever be used in version
43119
+ // comparison.
43120
+
43121
+ createToken('FULLPLAIN', "v?".concat(src[t.MAINVERSION]).concat(src[t.PRERELEASE], "?").concat(src[t.BUILD], "?"));
43122
+ createToken('FULL', "^".concat(src[t.FULLPLAIN], "$"));
43123
+
43124
+ // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
43125
+ // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
43126
+ // common in the npm registry.
43127
+ createToken('LOOSEPLAIN', "[v=\\s]*".concat(src[t.MAINVERSIONLOOSE]).concat(src[t.PRERELEASELOOSE], "?").concat(src[t.BUILD], "?"));
43128
+ createToken('LOOSE', "^".concat(src[t.LOOSEPLAIN], "$"));
43129
+ createToken('GTLT', '((?:<|>)?=?)');
43130
+
43131
+ // Something like "2.*" or "1.2.x".
43132
+ // Note that "x.x" is a valid xRange identifer, meaning "any version"
43133
+ // Only the first item is strictly required.
43134
+ createToken('XRANGEIDENTIFIERLOOSE', "".concat(src[t.NUMERICIDENTIFIERLOOSE], "|x|X|\\*"));
43135
+ createToken('XRANGEIDENTIFIER', "".concat(src[t.NUMERICIDENTIFIER], "|x|X|\\*"));
43136
+ createToken('XRANGEPLAIN', "[v=\\s]*(".concat(src[t.XRANGEIDENTIFIER], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIER], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIER], ")") + "(?:".concat(src[t.PRERELEASE], ")?").concat(src[t.BUILD], "?") + ")?)?");
43137
+ createToken('XRANGEPLAINLOOSE', "[v=\\s]*(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:".concat(src[t.PRERELEASELOOSE], ")?").concat(src[t.BUILD], "?") + ")?)?");
43138
+ createToken('XRANGE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAIN], "$"));
43139
+ createToken('XRANGELOOSE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAINLOOSE], "$"));
43140
+
43141
+ // Coercion.
43142
+ // Extract anything that could conceivably be a part of a valid semver
43143
+ createToken('COERCEPLAIN', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?"));
43144
+ createToken('COERCE', "".concat(src[t.COERCEPLAIN], "(?:$|[^\\d])"));
43145
+ createToken('COERCEFULL', src[t.COERCEPLAIN] + "(?:".concat(src[t.PRERELEASE], ")?") + "(?:".concat(src[t.BUILD], ")?") + "(?:$|[^\\d])");
43146
+ createToken('COERCERTL', src[t.COERCE], true);
43147
+ createToken('COERCERTLFULL', src[t.COERCEFULL], true);
43148
+
43149
+ // Tilde ranges.
43150
+ // Meaning is "reasonably at or greater than"
43151
+ createToken('LONETILDE', '(?:~>?)');
43152
+ createToken('TILDETRIM', "(\\s*)".concat(src[t.LONETILDE], "\\s+"), true);
43153
+ exports.tildeTrimReplace = '$1~';
43154
+ createToken('TILDE', "^".concat(src[t.LONETILDE]).concat(src[t.XRANGEPLAIN], "$"));
43155
+ createToken('TILDELOOSE', "^".concat(src[t.LONETILDE]).concat(src[t.XRANGEPLAINLOOSE], "$"));
43156
+
43157
+ // Caret ranges.
43158
+ // Meaning is "at least and backwards compatible with"
43159
+ createToken('LONECARET', '(?:\\^)');
43160
+ createToken('CARETTRIM', "(\\s*)".concat(src[t.LONECARET], "\\s+"), true);
43161
+ exports.caretTrimReplace = '$1^';
43162
+ createToken('CARET', "^".concat(src[t.LONECARET]).concat(src[t.XRANGEPLAIN], "$"));
43163
+ createToken('CARETLOOSE', "^".concat(src[t.LONECARET]).concat(src[t.XRANGEPLAINLOOSE], "$"));
43164
+
43165
+ // A simple gt/lt/eq thing, or just "" to indicate "any version"
43166
+ createToken('COMPARATORLOOSE', "^".concat(src[t.GTLT], "\\s*(").concat(src[t.LOOSEPLAIN], ")$|^$"));
43167
+ createToken('COMPARATOR', "^".concat(src[t.GTLT], "\\s*(").concat(src[t.FULLPLAIN], ")$|^$"));
43168
+
43169
+ // An expression to strip any whitespace between the gtlt and the thing
43170
+ // it modifies, so that `> 1.2.3` ==> `>1.2.3`
43171
+ createToken('COMPARATORTRIM', "(\\s*)".concat(src[t.GTLT], "\\s*(").concat(src[t.LOOSEPLAIN], "|").concat(src[t.XRANGEPLAIN], ")"), true);
43172
+ exports.comparatorTrimReplace = '$1$2$3';
43173
+
43174
+ // Something like `1.2.3 - 1.2.4`
43175
+ // Note that these all use the loose form, because they'll be
43176
+ // checked against either the strict or loose comparator form
43177
+ // later.
43178
+ createToken('HYPHENRANGE', "^\\s*(".concat(src[t.XRANGEPLAIN], ")") + "\\s+-\\s+" + "(".concat(src[t.XRANGEPLAIN], ")") + "\\s*$");
43179
+ createToken('HYPHENRANGELOOSE', "^\\s*(".concat(src[t.XRANGEPLAINLOOSE], ")") + "\\s+-\\s+" + "(".concat(src[t.XRANGEPLAINLOOSE], ")") + "\\s*$");
43180
+
43181
+ // Star ranges basically just allow anything at all.
43182
+ createToken('STAR', '(<|>)?=?\\s*\\*');
43183
+ // >=0.0.0 is like a star
43184
+ createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$');
43185
+ createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$');
43186
+ })(re, re.exports);
43187
+ return re.exports;
42812
43188
  }
42813
43189
 
42814
43190
  var identifiers;
42815
43191
  var hasRequiredIdentifiers;
42816
-
42817
- function requireIdentifiers () {
42818
- if (hasRequiredIdentifiers) return identifiers;
42819
- hasRequiredIdentifiers = 1;
42820
-
42821
- const numeric = /^[0-9]+$/;
42822
- const compareIdentifiers = (a, b) => {
42823
- const anum = numeric.test(a);
42824
- const bnum = numeric.test(b);
42825
-
42826
- if (anum && bnum) {
42827
- a = +a;
42828
- b = +b;
42829
- }
42830
-
42831
- return a === b ? 0
42832
- : (anum && !bnum) ? -1
42833
- : (bnum && !anum) ? 1
42834
- : a < b ? -1
42835
- : 1
42836
- };
42837
-
42838
- const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
42839
-
42840
- identifiers = {
42841
- compareIdentifiers,
42842
- rcompareIdentifiers,
42843
- };
42844
- return identifiers;
43192
+ function requireIdentifiers() {
43193
+ if (hasRequiredIdentifiers) return identifiers;
43194
+ hasRequiredIdentifiers = 1;
43195
+ const numeric = /^[0-9]+$/;
43196
+ const compareIdentifiers = (a, b) => {
43197
+ const anum = numeric.test(a);
43198
+ const bnum = numeric.test(b);
43199
+ if (anum && bnum) {
43200
+ a = +a;
43201
+ b = +b;
43202
+ }
43203
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
43204
+ };
43205
+ const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
43206
+ identifiers = {
43207
+ compareIdentifiers,
43208
+ rcompareIdentifiers
43209
+ };
43210
+ return identifiers;
42845
43211
  }
42846
43212
 
42847
43213
  var semver;
42848
43214
  var hasRequiredSemver;
43215
+ function requireSemver() {
43216
+ if (hasRequiredSemver) return semver;
43217
+ hasRequiredSemver = 1;
43218
+ const debug = requireDebug();
43219
+ const {
43220
+ MAX_LENGTH,
43221
+ MAX_SAFE_INTEGER
43222
+ } = requireConstants();
43223
+ const {
43224
+ safeRe: re,
43225
+ t
43226
+ } = requireRe();
43227
+ const parseOptions = requireParseOptions();
43228
+ const {
43229
+ compareIdentifiers
43230
+ } = requireIdentifiers();
43231
+ class SemVer {
43232
+ constructor(version, options) {
43233
+ options = parseOptions(options);
43234
+ if (version instanceof SemVer) {
43235
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
43236
+ return version;
43237
+ } else {
43238
+ version = version.version;
43239
+ }
43240
+ } else if (typeof version !== 'string') {
43241
+ throw new TypeError("Invalid version. Must be a string. Got type \"".concat(typeof version, "\"."));
43242
+ }
43243
+ if (version.length > MAX_LENGTH) {
43244
+ throw new TypeError("version is longer than ".concat(MAX_LENGTH, " characters"));
43245
+ }
43246
+ debug('SemVer', version, options);
43247
+ this.options = options;
43248
+ this.loose = !!options.loose;
43249
+ // this isn't actually relevant for versions, but keep it so that we
43250
+ // don't run into trouble passing this.options around.
43251
+ this.includePrerelease = !!options.includePrerelease;
43252
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
43253
+ if (!m) {
43254
+ throw new TypeError("Invalid Version: ".concat(version));
43255
+ }
43256
+ this.raw = version;
42849
43257
 
42850
- function requireSemver () {
42851
- if (hasRequiredSemver) return semver;
42852
- hasRequiredSemver = 1;
42853
-
42854
- const debug = requireDebug();
42855
- const { MAX_LENGTH, MAX_SAFE_INTEGER } = requireConstants();
42856
- const { safeRe: re, t } = requireRe();
42857
-
42858
- const parseOptions = requireParseOptions();
42859
- const { compareIdentifiers } = requireIdentifiers();
42860
- class SemVer {
42861
- constructor (version, options) {
42862
- options = parseOptions(options);
42863
-
42864
- if (version instanceof SemVer) {
42865
- if (version.loose === !!options.loose &&
42866
- version.includePrerelease === !!options.includePrerelease) {
42867
- return version
42868
- } else {
42869
- version = version.version;
42870
- }
42871
- } else if (typeof version !== 'string') {
42872
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
42873
- }
42874
-
42875
- if (version.length > MAX_LENGTH) {
42876
- throw new TypeError(
42877
- `version is longer than ${MAX_LENGTH} characters`
42878
- )
42879
- }
42880
-
42881
- debug('SemVer', version, options);
42882
- this.options = options;
42883
- this.loose = !!options.loose;
42884
- // this isn't actually relevant for versions, but keep it so that we
42885
- // don't run into trouble passing this.options around.
42886
- this.includePrerelease = !!options.includePrerelease;
42887
-
42888
- const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
42889
-
42890
- if (!m) {
42891
- throw new TypeError(`Invalid Version: ${version}`)
42892
- }
42893
-
42894
- this.raw = version;
42895
-
42896
- // these are actually numbers
42897
- this.major = +m[1];
42898
- this.minor = +m[2];
42899
- this.patch = +m[3];
42900
-
42901
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
42902
- throw new TypeError('Invalid major version')
42903
- }
42904
-
42905
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
42906
- throw new TypeError('Invalid minor version')
42907
- }
42908
-
42909
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
42910
- throw new TypeError('Invalid patch version')
42911
- }
42912
-
42913
- // numberify any prerelease numeric ids
42914
- if (!m[4]) {
42915
- this.prerelease = [];
42916
- } else {
42917
- this.prerelease = m[4].split('.').map((id) => {
42918
- if (/^[0-9]+$/.test(id)) {
42919
- const num = +id;
42920
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
42921
- return num
42922
- }
42923
- }
42924
- return id
42925
- });
42926
- }
42927
-
42928
- this.build = m[5] ? m[5].split('.') : [];
42929
- this.format();
42930
- }
42931
-
42932
- format () {
42933
- this.version = `${this.major}.${this.minor}.${this.patch}`;
42934
- if (this.prerelease.length) {
42935
- this.version += `-${this.prerelease.join('.')}`;
42936
- }
42937
- return this.version
42938
- }
42939
-
42940
- toString () {
42941
- return this.version
42942
- }
42943
-
42944
- compare (other) {
42945
- debug('SemVer.compare', this.version, this.options, other);
42946
- if (!(other instanceof SemVer)) {
42947
- if (typeof other === 'string' && other === this.version) {
42948
- return 0
42949
- }
42950
- other = new SemVer(other, this.options);
42951
- }
42952
-
42953
- if (other.version === this.version) {
42954
- return 0
42955
- }
42956
-
42957
- return this.compareMain(other) || this.comparePre(other)
42958
- }
42959
-
42960
- compareMain (other) {
42961
- if (!(other instanceof SemVer)) {
42962
- other = new SemVer(other, this.options);
42963
- }
42964
-
42965
- return (
42966
- compareIdentifiers(this.major, other.major) ||
42967
- compareIdentifiers(this.minor, other.minor) ||
42968
- compareIdentifiers(this.patch, other.patch)
42969
- )
42970
- }
42971
-
42972
- comparePre (other) {
42973
- if (!(other instanceof SemVer)) {
42974
- other = new SemVer(other, this.options);
42975
- }
42976
-
42977
- // NOT having a prerelease is > having one
42978
- if (this.prerelease.length && !other.prerelease.length) {
42979
- return -1
42980
- } else if (!this.prerelease.length && other.prerelease.length) {
42981
- return 1
42982
- } else if (!this.prerelease.length && !other.prerelease.length) {
42983
- return 0
42984
- }
42985
-
42986
- let i = 0;
42987
- do {
42988
- const a = this.prerelease[i];
42989
- const b = other.prerelease[i];
42990
- debug('prerelease compare', i, a, b);
42991
- if (a === undefined && b === undefined) {
42992
- return 0
42993
- } else if (b === undefined) {
42994
- return 1
42995
- } else if (a === undefined) {
42996
- return -1
42997
- } else if (a === b) {
42998
- continue
42999
- } else {
43000
- return compareIdentifiers(a, b)
43001
- }
43002
- } while (++i)
43003
- }
43004
-
43005
- compareBuild (other) {
43006
- if (!(other instanceof SemVer)) {
43007
- other = new SemVer(other, this.options);
43008
- }
43009
-
43010
- let i = 0;
43011
- do {
43012
- const a = this.build[i];
43013
- const b = other.build[i];
43014
- debug('build compare', i, a, b);
43015
- if (a === undefined && b === undefined) {
43016
- return 0
43017
- } else if (b === undefined) {
43018
- return 1
43019
- } else if (a === undefined) {
43020
- return -1
43021
- } else if (a === b) {
43022
- continue
43023
- } else {
43024
- return compareIdentifiers(a, b)
43025
- }
43026
- } while (++i)
43027
- }
43258
+ // these are actually numbers
43259
+ this.major = +m[1];
43260
+ this.minor = +m[2];
43261
+ this.patch = +m[3];
43262
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
43263
+ throw new TypeError('Invalid major version');
43264
+ }
43265
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
43266
+ throw new TypeError('Invalid minor version');
43267
+ }
43268
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
43269
+ throw new TypeError('Invalid patch version');
43270
+ }
43028
43271
 
43029
- // preminor will bump the version up to the next minor release, and immediately
43030
- // down to pre-release. premajor and prepatch work the same way.
43031
- inc (release, identifier, identifierBase) {
43032
- if (release.startsWith('pre')) {
43033
- if (!identifier && identifierBase === false) {
43034
- throw new Error('invalid increment argument: identifier is empty')
43035
- }
43036
- // Avoid an invalid semver results
43037
- if (identifier) {
43038
- const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
43039
- if (!match || match[1] !== identifier) {
43040
- throw new Error(`invalid identifier: ${identifier}`)
43041
- }
43042
- }
43043
- }
43272
+ // numberify any prerelease numeric ids
43273
+ if (!m[4]) {
43274
+ this.prerelease = [];
43275
+ } else {
43276
+ this.prerelease = m[4].split('.').map(id => {
43277
+ if (/^[0-9]+$/.test(id)) {
43278
+ const num = +id;
43279
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
43280
+ return num;
43281
+ }
43282
+ }
43283
+ return id;
43284
+ });
43285
+ }
43286
+ this.build = m[5] ? m[5].split('.') : [];
43287
+ this.format();
43288
+ }
43289
+ format() {
43290
+ this.version = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
43291
+ if (this.prerelease.length) {
43292
+ this.version += "-".concat(this.prerelease.join('.'));
43293
+ }
43294
+ return this.version;
43295
+ }
43296
+ toString() {
43297
+ return this.version;
43298
+ }
43299
+ compare(other) {
43300
+ debug('SemVer.compare', this.version, this.options, other);
43301
+ if (!(other instanceof SemVer)) {
43302
+ if (typeof other === 'string' && other === this.version) {
43303
+ return 0;
43304
+ }
43305
+ other = new SemVer(other, this.options);
43306
+ }
43307
+ if (other.version === this.version) {
43308
+ return 0;
43309
+ }
43310
+ return this.compareMain(other) || this.comparePre(other);
43311
+ }
43312
+ compareMain(other) {
43313
+ if (!(other instanceof SemVer)) {
43314
+ other = new SemVer(other, this.options);
43315
+ }
43316
+ return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
43317
+ }
43318
+ comparePre(other) {
43319
+ if (!(other instanceof SemVer)) {
43320
+ other = new SemVer(other, this.options);
43321
+ }
43044
43322
 
43045
- switch (release) {
43046
- case 'premajor':
43047
- this.prerelease.length = 0;
43048
- this.patch = 0;
43049
- this.minor = 0;
43050
- this.major++;
43051
- this.inc('pre', identifier, identifierBase);
43052
- break
43053
- case 'preminor':
43054
- this.prerelease.length = 0;
43055
- this.patch = 0;
43056
- this.minor++;
43057
- this.inc('pre', identifier, identifierBase);
43058
- break
43059
- case 'prepatch':
43060
- // If this is already a prerelease, it will bump to the next version
43061
- // drop any prereleases that might already exist, since they are not
43062
- // relevant at this point.
43063
- this.prerelease.length = 0;
43064
- this.inc('patch', identifier, identifierBase);
43065
- this.inc('pre', identifier, identifierBase);
43066
- break
43067
- // If the input is a non-prerelease version, this acts the same as
43068
- // prepatch.
43069
- case 'prerelease':
43070
- if (this.prerelease.length === 0) {
43071
- this.inc('patch', identifier, identifierBase);
43072
- }
43073
- this.inc('pre', identifier, identifierBase);
43074
- break
43075
- case 'release':
43076
- if (this.prerelease.length === 0) {
43077
- throw new Error(`version ${this.raw} is not a prerelease`)
43078
- }
43079
- this.prerelease.length = 0;
43080
- break
43081
-
43082
- case 'major':
43083
- // If this is a pre-major version, bump up to the same major version.
43084
- // Otherwise increment major.
43085
- // 1.0.0-5 bumps to 1.0.0
43086
- // 1.1.0 bumps to 2.0.0
43087
- if (
43088
- this.minor !== 0 ||
43089
- this.patch !== 0 ||
43090
- this.prerelease.length === 0
43091
- ) {
43092
- this.major++;
43093
- }
43094
- this.minor = 0;
43095
- this.patch = 0;
43096
- this.prerelease = [];
43097
- break
43098
- case 'minor':
43099
- // If this is a pre-minor version, bump up to the same minor version.
43100
- // Otherwise increment minor.
43101
- // 1.2.0-5 bumps to 1.2.0
43102
- // 1.2.1 bumps to 1.3.0
43103
- if (this.patch !== 0 || this.prerelease.length === 0) {
43104
- this.minor++;
43105
- }
43106
- this.patch = 0;
43107
- this.prerelease = [];
43108
- break
43109
- case 'patch':
43110
- // If this is not a pre-release version, it will increment the patch.
43111
- // If it is a pre-release it will bump up to the same patch version.
43112
- // 1.2.0-5 patches to 1.2.0
43113
- // 1.2.0 patches to 1.2.1
43114
- if (this.prerelease.length === 0) {
43115
- this.patch++;
43116
- }
43117
- this.prerelease = [];
43118
- break
43119
- // This probably shouldn't be used publicly.
43120
- // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
43121
- case 'pre': {
43122
- const base = Number(identifierBase) ? 1 : 0;
43123
-
43124
- if (this.prerelease.length === 0) {
43125
- this.prerelease = [base];
43126
- } else {
43127
- let i = this.prerelease.length;
43128
- while (--i >= 0) {
43129
- if (typeof this.prerelease[i] === 'number') {
43130
- this.prerelease[i]++;
43131
- i = -2;
43132
- }
43133
- }
43134
- if (i === -1) {
43135
- // didn't increment anything
43136
- if (identifier === this.prerelease.join('.') && identifierBase === false) {
43137
- throw new Error('invalid increment argument: identifier already exists')
43138
- }
43139
- this.prerelease.push(base);
43140
- }
43141
- }
43142
- if (identifier) {
43143
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
43144
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
43145
- let prerelease = [identifier, base];
43146
- if (identifierBase === false) {
43147
- prerelease = [identifier];
43148
- }
43149
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
43150
- if (isNaN(this.prerelease[1])) {
43151
- this.prerelease = prerelease;
43152
- }
43153
- } else {
43154
- this.prerelease = prerelease;
43155
- }
43156
- }
43157
- break
43158
- }
43159
- default:
43160
- throw new Error(`invalid increment argument: ${release}`)
43161
- }
43162
- this.raw = this.format();
43163
- if (this.build.length) {
43164
- this.raw += `+${this.build.join('.')}`;
43165
- }
43166
- return this
43167
- }
43168
- }
43323
+ // NOT having a prerelease is > having one
43324
+ if (this.prerelease.length && !other.prerelease.length) {
43325
+ return -1;
43326
+ } else if (!this.prerelease.length && other.prerelease.length) {
43327
+ return 1;
43328
+ } else if (!this.prerelease.length && !other.prerelease.length) {
43329
+ return 0;
43330
+ }
43331
+ let i = 0;
43332
+ do {
43333
+ const a = this.prerelease[i];
43334
+ const b = other.prerelease[i];
43335
+ debug('prerelease compare', i, a, b);
43336
+ if (a === undefined && b === undefined) {
43337
+ return 0;
43338
+ } else if (b === undefined) {
43339
+ return 1;
43340
+ } else if (a === undefined) {
43341
+ return -1;
43342
+ } else if (a === b) {
43343
+ continue;
43344
+ } else {
43345
+ return compareIdentifiers(a, b);
43346
+ }
43347
+ } while (++i);
43348
+ }
43349
+ compareBuild(other) {
43350
+ if (!(other instanceof SemVer)) {
43351
+ other = new SemVer(other, this.options);
43352
+ }
43353
+ let i = 0;
43354
+ do {
43355
+ const a = this.build[i];
43356
+ const b = other.build[i];
43357
+ debug('build compare', i, a, b);
43358
+ if (a === undefined && b === undefined) {
43359
+ return 0;
43360
+ } else if (b === undefined) {
43361
+ return 1;
43362
+ } else if (a === undefined) {
43363
+ return -1;
43364
+ } else if (a === b) {
43365
+ continue;
43366
+ } else {
43367
+ return compareIdentifiers(a, b);
43368
+ }
43369
+ } while (++i);
43370
+ }
43169
43371
 
43170
- semver = SemVer;
43171
- return semver;
43372
+ // preminor will bump the version up to the next minor release, and immediately
43373
+ // down to pre-release. premajor and prepatch work the same way.
43374
+ inc(release, identifier, identifierBase) {
43375
+ if (release.startsWith('pre')) {
43376
+ if (!identifier && identifierBase === false) {
43377
+ throw new Error('invalid increment argument: identifier is empty');
43378
+ }
43379
+ // Avoid an invalid semver results
43380
+ if (identifier) {
43381
+ const match = "-".concat(identifier).match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
43382
+ if (!match || match[1] !== identifier) {
43383
+ throw new Error("invalid identifier: ".concat(identifier));
43384
+ }
43385
+ }
43386
+ }
43387
+ switch (release) {
43388
+ case 'premajor':
43389
+ this.prerelease.length = 0;
43390
+ this.patch = 0;
43391
+ this.minor = 0;
43392
+ this.major++;
43393
+ this.inc('pre', identifier, identifierBase);
43394
+ break;
43395
+ case 'preminor':
43396
+ this.prerelease.length = 0;
43397
+ this.patch = 0;
43398
+ this.minor++;
43399
+ this.inc('pre', identifier, identifierBase);
43400
+ break;
43401
+ case 'prepatch':
43402
+ // If this is already a prerelease, it will bump to the next version
43403
+ // drop any prereleases that might already exist, since they are not
43404
+ // relevant at this point.
43405
+ this.prerelease.length = 0;
43406
+ this.inc('patch', identifier, identifierBase);
43407
+ this.inc('pre', identifier, identifierBase);
43408
+ break;
43409
+ // If the input is a non-prerelease version, this acts the same as
43410
+ // prepatch.
43411
+ case 'prerelease':
43412
+ if (this.prerelease.length === 0) {
43413
+ this.inc('patch', identifier, identifierBase);
43414
+ }
43415
+ this.inc('pre', identifier, identifierBase);
43416
+ break;
43417
+ case 'release':
43418
+ if (this.prerelease.length === 0) {
43419
+ throw new Error("version ".concat(this.raw, " is not a prerelease"));
43420
+ }
43421
+ this.prerelease.length = 0;
43422
+ break;
43423
+ case 'major':
43424
+ // If this is a pre-major version, bump up to the same major version.
43425
+ // Otherwise increment major.
43426
+ // 1.0.0-5 bumps to 1.0.0
43427
+ // 1.1.0 bumps to 2.0.0
43428
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
43429
+ this.major++;
43430
+ }
43431
+ this.minor = 0;
43432
+ this.patch = 0;
43433
+ this.prerelease = [];
43434
+ break;
43435
+ case 'minor':
43436
+ // If this is a pre-minor version, bump up to the same minor version.
43437
+ // Otherwise increment minor.
43438
+ // 1.2.0-5 bumps to 1.2.0
43439
+ // 1.2.1 bumps to 1.3.0
43440
+ if (this.patch !== 0 || this.prerelease.length === 0) {
43441
+ this.minor++;
43442
+ }
43443
+ this.patch = 0;
43444
+ this.prerelease = [];
43445
+ break;
43446
+ case 'patch':
43447
+ // If this is not a pre-release version, it will increment the patch.
43448
+ // If it is a pre-release it will bump up to the same patch version.
43449
+ // 1.2.0-5 patches to 1.2.0
43450
+ // 1.2.0 patches to 1.2.1
43451
+ if (this.prerelease.length === 0) {
43452
+ this.patch++;
43453
+ }
43454
+ this.prerelease = [];
43455
+ break;
43456
+ // This probably shouldn't be used publicly.
43457
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
43458
+ case 'pre':
43459
+ {
43460
+ const base = Number(identifierBase) ? 1 : 0;
43461
+ if (this.prerelease.length === 0) {
43462
+ this.prerelease = [base];
43463
+ } else {
43464
+ let i = this.prerelease.length;
43465
+ while (--i >= 0) {
43466
+ if (typeof this.prerelease[i] === 'number') {
43467
+ this.prerelease[i]++;
43468
+ i = -2;
43469
+ }
43470
+ }
43471
+ if (i === -1) {
43472
+ // didn't increment anything
43473
+ if (identifier === this.prerelease.join('.') && identifierBase === false) {
43474
+ throw new Error('invalid increment argument: identifier already exists');
43475
+ }
43476
+ this.prerelease.push(base);
43477
+ }
43478
+ }
43479
+ if (identifier) {
43480
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
43481
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
43482
+ let prerelease = [identifier, base];
43483
+ if (identifierBase === false) {
43484
+ prerelease = [identifier];
43485
+ }
43486
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
43487
+ if (isNaN(this.prerelease[1])) {
43488
+ this.prerelease = prerelease;
43489
+ }
43490
+ } else {
43491
+ this.prerelease = prerelease;
43492
+ }
43493
+ }
43494
+ break;
43495
+ }
43496
+ default:
43497
+ throw new Error("invalid increment argument: ".concat(release));
43498
+ }
43499
+ this.raw = this.format();
43500
+ if (this.build.length) {
43501
+ this.raw += "+".concat(this.build.join('.'));
43502
+ }
43503
+ return this;
43504
+ }
43505
+ }
43506
+ semver = SemVer;
43507
+ return semver;
43172
43508
  }
43173
43509
 
43174
43510
  var compare_1;
43175
43511
  var hasRequiredCompare;
43176
-
43177
- function requireCompare () {
43178
- if (hasRequiredCompare) return compare_1;
43179
- hasRequiredCompare = 1;
43180
-
43181
- const SemVer = requireSemver();
43182
- const compare = (a, b, loose) =>
43183
- new SemVer(a, loose).compare(new SemVer(b, loose));
43184
-
43185
- compare_1 = compare;
43186
- return compare_1;
43512
+ function requireCompare() {
43513
+ if (hasRequiredCompare) return compare_1;
43514
+ hasRequiredCompare = 1;
43515
+ const SemVer = requireSemver();
43516
+ const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
43517
+ compare_1 = compare;
43518
+ return compare_1;
43187
43519
  }
43188
43520
 
43189
43521
  var eq_1;
43190
43522
  var hasRequiredEq;
43191
-
43192
- function requireEq () {
43193
- if (hasRequiredEq) return eq_1;
43194
- hasRequiredEq = 1;
43195
-
43196
- const compare = requireCompare();
43197
- const eq = (a, b, loose) => compare(a, b, loose) === 0;
43198
- eq_1 = eq;
43199
- return eq_1;
43523
+ function requireEq() {
43524
+ if (hasRequiredEq) return eq_1;
43525
+ hasRequiredEq = 1;
43526
+ const compare = requireCompare();
43527
+ const eq = (a, b, loose) => compare(a, b, loose) === 0;
43528
+ eq_1 = eq;
43529
+ return eq_1;
43200
43530
  }
43201
43531
 
43202
43532
  var neq_1;
43203
43533
  var hasRequiredNeq;
43204
-
43205
- function requireNeq () {
43206
- if (hasRequiredNeq) return neq_1;
43207
- hasRequiredNeq = 1;
43208
-
43209
- const compare = requireCompare();
43210
- const neq = (a, b, loose) => compare(a, b, loose) !== 0;
43211
- neq_1 = neq;
43212
- return neq_1;
43534
+ function requireNeq() {
43535
+ if (hasRequiredNeq) return neq_1;
43536
+ hasRequiredNeq = 1;
43537
+ const compare = requireCompare();
43538
+ const neq = (a, b, loose) => compare(a, b, loose) !== 0;
43539
+ neq_1 = neq;
43540
+ return neq_1;
43213
43541
  }
43214
43542
 
43215
43543
  var gt_1;
43216
43544
  var hasRequiredGt;
43217
-
43218
- function requireGt () {
43219
- if (hasRequiredGt) return gt_1;
43220
- hasRequiredGt = 1;
43221
-
43222
- const compare = requireCompare();
43223
- const gt = (a, b, loose) => compare(a, b, loose) > 0;
43224
- gt_1 = gt;
43225
- return gt_1;
43545
+ function requireGt() {
43546
+ if (hasRequiredGt) return gt_1;
43547
+ hasRequiredGt = 1;
43548
+ const compare = requireCompare();
43549
+ const gt = (a, b, loose) => compare(a, b, loose) > 0;
43550
+ gt_1 = gt;
43551
+ return gt_1;
43226
43552
  }
43227
43553
 
43228
43554
  var gte_1;
43229
43555
  var hasRequiredGte;
43230
-
43231
- function requireGte () {
43232
- if (hasRequiredGte) return gte_1;
43233
- hasRequiredGte = 1;
43234
-
43235
- const compare = requireCompare();
43236
- const gte = (a, b, loose) => compare(a, b, loose) >= 0;
43237
- gte_1 = gte;
43238
- return gte_1;
43556
+ function requireGte() {
43557
+ if (hasRequiredGte) return gte_1;
43558
+ hasRequiredGte = 1;
43559
+ const compare = requireCompare();
43560
+ const gte = (a, b, loose) => compare(a, b, loose) >= 0;
43561
+ gte_1 = gte;
43562
+ return gte_1;
43239
43563
  }
43240
43564
 
43241
43565
  var lt_1;
43242
43566
  var hasRequiredLt;
43243
-
43244
- function requireLt () {
43245
- if (hasRequiredLt) return lt_1;
43246
- hasRequiredLt = 1;
43247
-
43248
- const compare = requireCompare();
43249
- const lt = (a, b, loose) => compare(a, b, loose) < 0;
43250
- lt_1 = lt;
43251
- return lt_1;
43567
+ function requireLt() {
43568
+ if (hasRequiredLt) return lt_1;
43569
+ hasRequiredLt = 1;
43570
+ const compare = requireCompare();
43571
+ const lt = (a, b, loose) => compare(a, b, loose) < 0;
43572
+ lt_1 = lt;
43573
+ return lt_1;
43252
43574
  }
43253
43575
 
43254
43576
  var lte_1;
43255
43577
  var hasRequiredLte;
43256
-
43257
- function requireLte () {
43258
- if (hasRequiredLte) return lte_1;
43259
- hasRequiredLte = 1;
43260
-
43261
- const compare = requireCompare();
43262
- const lte = (a, b, loose) => compare(a, b, loose) <= 0;
43263
- lte_1 = lte;
43264
- return lte_1;
43578
+ function requireLte() {
43579
+ if (hasRequiredLte) return lte_1;
43580
+ hasRequiredLte = 1;
43581
+ const compare = requireCompare();
43582
+ const lte = (a, b, loose) => compare(a, b, loose) <= 0;
43583
+ lte_1 = lte;
43584
+ return lte_1;
43265
43585
  }
43266
43586
 
43267
43587
  var cmp_1;
43268
43588
  var hasRequiredCmp;
43269
-
43270
- function requireCmp () {
43271
- if (hasRequiredCmp) return cmp_1;
43272
- hasRequiredCmp = 1;
43273
-
43274
- const eq = requireEq();
43275
- const neq = requireNeq();
43276
- const gt = requireGt();
43277
- const gte = requireGte();
43278
- const lt = requireLt();
43279
- const lte = requireLte();
43280
-
43281
- const cmp = (a, op, b, loose) => {
43282
- switch (op) {
43283
- case '===':
43284
- if (typeof a === 'object') {
43285
- a = a.version;
43286
- }
43287
- if (typeof b === 'object') {
43288
- b = b.version;
43289
- }
43290
- return a === b
43291
-
43292
- case '!==':
43293
- if (typeof a === 'object') {
43294
- a = a.version;
43295
- }
43296
- if (typeof b === 'object') {
43297
- b = b.version;
43298
- }
43299
- return a !== b
43300
-
43301
- case '':
43302
- case '=':
43303
- case '==':
43304
- return eq(a, b, loose)
43305
-
43306
- case '!=':
43307
- return neq(a, b, loose)
43308
-
43309
- case '>':
43310
- return gt(a, b, loose)
43311
-
43312
- case '>=':
43313
- return gte(a, b, loose)
43314
-
43315
- case '<':
43316
- return lt(a, b, loose)
43317
-
43318
- case '<=':
43319
- return lte(a, b, loose)
43320
-
43321
- default:
43322
- throw new TypeError(`Invalid operator: ${op}`)
43323
- }
43324
- };
43325
- cmp_1 = cmp;
43326
- return cmp_1;
43589
+ function requireCmp() {
43590
+ if (hasRequiredCmp) return cmp_1;
43591
+ hasRequiredCmp = 1;
43592
+ const eq = requireEq();
43593
+ const neq = requireNeq();
43594
+ const gt = requireGt();
43595
+ const gte = requireGte();
43596
+ const lt = requireLt();
43597
+ const lte = requireLte();
43598
+ const cmp = (a, op, b, loose) => {
43599
+ switch (op) {
43600
+ case '===':
43601
+ if (typeof a === 'object') {
43602
+ a = a.version;
43603
+ }
43604
+ if (typeof b === 'object') {
43605
+ b = b.version;
43606
+ }
43607
+ return a === b;
43608
+ case '!==':
43609
+ if (typeof a === 'object') {
43610
+ a = a.version;
43611
+ }
43612
+ if (typeof b === 'object') {
43613
+ b = b.version;
43614
+ }
43615
+ return a !== b;
43616
+ case '':
43617
+ case '=':
43618
+ case '==':
43619
+ return eq(a, b, loose);
43620
+ case '!=':
43621
+ return neq(a, b, loose);
43622
+ case '>':
43623
+ return gt(a, b, loose);
43624
+ case '>=':
43625
+ return gte(a, b, loose);
43626
+ case '<':
43627
+ return lt(a, b, loose);
43628
+ case '<=':
43629
+ return lte(a, b, loose);
43630
+ default:
43631
+ throw new TypeError("Invalid operator: ".concat(op));
43632
+ }
43633
+ };
43634
+ cmp_1 = cmp;
43635
+ return cmp_1;
43327
43636
  }
43328
43637
 
43329
43638
  var comparator;
43330
43639
  var hasRequiredComparator;
43640
+ function requireComparator() {
43641
+ if (hasRequiredComparator) return comparator;
43642
+ hasRequiredComparator = 1;
43643
+ const ANY = Symbol('SemVer ANY');
43644
+ // hoisted class for cyclic dependency
43645
+ class Comparator {
43646
+ static get ANY() {
43647
+ return ANY;
43648
+ }
43649
+ constructor(comp, options) {
43650
+ options = parseOptions(options);
43651
+ if (comp instanceof Comparator) {
43652
+ if (comp.loose === !!options.loose) {
43653
+ return comp;
43654
+ } else {
43655
+ comp = comp.value;
43656
+ }
43657
+ }
43658
+ comp = comp.trim().split(/\s+/).join(' ');
43659
+ debug('comparator', comp, options);
43660
+ this.options = options;
43661
+ this.loose = !!options.loose;
43662
+ this.parse(comp);
43663
+ if (this.semver === ANY) {
43664
+ this.value = '';
43665
+ } else {
43666
+ this.value = this.operator + this.semver.version;
43667
+ }
43668
+ debug('comp', this);
43669
+ }
43670
+ parse(comp) {
43671
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
43672
+ const m = comp.match(r);
43673
+ if (!m) {
43674
+ throw new TypeError("Invalid comparator: ".concat(comp));
43675
+ }
43676
+ this.operator = m[1] !== undefined ? m[1] : '';
43677
+ if (this.operator === '=') {
43678
+ this.operator = '';
43679
+ }
43331
43680
 
43332
- function requireComparator () {
43333
- if (hasRequiredComparator) return comparator;
43334
- hasRequiredComparator = 1;
43335
-
43336
- const ANY = Symbol('SemVer ANY');
43337
- // hoisted class for cyclic dependency
43338
- class Comparator {
43339
- static get ANY () {
43340
- return ANY
43341
- }
43342
-
43343
- constructor (comp, options) {
43344
- options = parseOptions(options);
43345
-
43346
- if (comp instanceof Comparator) {
43347
- if (comp.loose === !!options.loose) {
43348
- return comp
43349
- } else {
43350
- comp = comp.value;
43351
- }
43352
- }
43353
-
43354
- comp = comp.trim().split(/\s+/).join(' ');
43355
- debug('comparator', comp, options);
43356
- this.options = options;
43357
- this.loose = !!options.loose;
43358
- this.parse(comp);
43359
-
43360
- if (this.semver === ANY) {
43361
- this.value = '';
43362
- } else {
43363
- this.value = this.operator + this.semver.version;
43364
- }
43365
-
43366
- debug('comp', this);
43367
- }
43368
-
43369
- parse (comp) {
43370
- const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
43371
- const m = comp.match(r);
43372
-
43373
- if (!m) {
43374
- throw new TypeError(`Invalid comparator: ${comp}`)
43375
- }
43376
-
43377
- this.operator = m[1] !== undefined ? m[1] : '';
43378
- if (this.operator === '=') {
43379
- this.operator = '';
43380
- }
43381
-
43382
- // if it literally is just '>' or '' then allow anything.
43383
- if (!m[2]) {
43384
- this.semver = ANY;
43385
- } else {
43386
- this.semver = new SemVer(m[2], this.options.loose);
43387
- }
43388
- }
43389
-
43390
- toString () {
43391
- return this.value
43392
- }
43393
-
43394
- test (version) {
43395
- debug('Comparator.test', version, this.options.loose);
43396
-
43397
- if (this.semver === ANY || version === ANY) {
43398
- return true
43399
- }
43400
-
43401
- if (typeof version === 'string') {
43402
- try {
43403
- version = new SemVer(version, this.options);
43404
- } catch (er) {
43405
- return false
43406
- }
43407
- }
43408
-
43409
- return cmp(version, this.operator, this.semver, this.options)
43410
- }
43411
-
43412
- intersects (comp, options) {
43413
- if (!(comp instanceof Comparator)) {
43414
- throw new TypeError('a Comparator is required')
43415
- }
43416
-
43417
- if (this.operator === '') {
43418
- if (this.value === '') {
43419
- return true
43420
- }
43421
- return new Range(comp.value, options).test(this.value)
43422
- } else if (comp.operator === '') {
43423
- if (comp.value === '') {
43424
- return true
43425
- }
43426
- return new Range(this.value, options).test(comp.semver)
43427
- }
43428
-
43429
- options = parseOptions(options);
43430
-
43431
- // Special cases where nothing can possibly be lower
43432
- if (options.includePrerelease &&
43433
- (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
43434
- return false
43435
- }
43436
- if (!options.includePrerelease &&
43437
- (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
43438
- return false
43439
- }
43440
-
43441
- // Same direction increasing (> or >=)
43442
- if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
43443
- return true
43444
- }
43445
- // Same direction decreasing (< or <=)
43446
- if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
43447
- return true
43448
- }
43449
- // same SemVer and both sides are inclusive (<= or >=)
43450
- if (
43451
- (this.semver.version === comp.semver.version) &&
43452
- this.operator.includes('=') && comp.operator.includes('=')) {
43453
- return true
43454
- }
43455
- // opposite directions less than
43456
- if (cmp(this.semver, '<', comp.semver, options) &&
43457
- this.operator.startsWith('>') && comp.operator.startsWith('<')) {
43458
- return true
43459
- }
43460
- // opposite directions greater than
43461
- if (cmp(this.semver, '>', comp.semver, options) &&
43462
- this.operator.startsWith('<') && comp.operator.startsWith('>')) {
43463
- return true
43464
- }
43465
- return false
43466
- }
43467
- }
43681
+ // if it literally is just '>' or '' then allow anything.
43682
+ if (!m[2]) {
43683
+ this.semver = ANY;
43684
+ } else {
43685
+ this.semver = new SemVer(m[2], this.options.loose);
43686
+ }
43687
+ }
43688
+ toString() {
43689
+ return this.value;
43690
+ }
43691
+ test(version) {
43692
+ debug('Comparator.test', version, this.options.loose);
43693
+ if (this.semver === ANY || version === ANY) {
43694
+ return true;
43695
+ }
43696
+ if (typeof version === 'string') {
43697
+ try {
43698
+ version = new SemVer(version, this.options);
43699
+ } catch (er) {
43700
+ return false;
43701
+ }
43702
+ }
43703
+ return cmp(version, this.operator, this.semver, this.options);
43704
+ }
43705
+ intersects(comp, options) {
43706
+ if (!(comp instanceof Comparator)) {
43707
+ throw new TypeError('a Comparator is required');
43708
+ }
43709
+ if (this.operator === '') {
43710
+ if (this.value === '') {
43711
+ return true;
43712
+ }
43713
+ return new Range(comp.value, options).test(this.value);
43714
+ } else if (comp.operator === '') {
43715
+ if (comp.value === '') {
43716
+ return true;
43717
+ }
43718
+ return new Range(this.value, options).test(comp.semver);
43719
+ }
43720
+ options = parseOptions(options);
43468
43721
 
43469
- comparator = Comparator;
43722
+ // Special cases where nothing can possibly be lower
43723
+ if (options.includePrerelease && (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
43724
+ return false;
43725
+ }
43726
+ if (!options.includePrerelease && (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
43727
+ return false;
43728
+ }
43470
43729
 
43471
- const parseOptions = requireParseOptions();
43472
- const { safeRe: re, t } = requireRe();
43473
- const cmp = requireCmp();
43474
- const debug = requireDebug();
43475
- const SemVer = requireSemver();
43476
- const Range = requireRange();
43477
- return comparator;
43730
+ // Same direction increasing (> or >=)
43731
+ if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
43732
+ return true;
43733
+ }
43734
+ // Same direction decreasing (< or <=)
43735
+ if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
43736
+ return true;
43737
+ }
43738
+ // same SemVer and both sides are inclusive (<= or >=)
43739
+ if (this.semver.version === comp.semver.version && this.operator.includes('=') && comp.operator.includes('=')) {
43740
+ return true;
43741
+ }
43742
+ // opposite directions less than
43743
+ if (cmp(this.semver, '<', comp.semver, options) && this.operator.startsWith('>') && comp.operator.startsWith('<')) {
43744
+ return true;
43745
+ }
43746
+ // opposite directions greater than
43747
+ if (cmp(this.semver, '>', comp.semver, options) && this.operator.startsWith('<') && comp.operator.startsWith('>')) {
43748
+ return true;
43749
+ }
43750
+ return false;
43751
+ }
43752
+ }
43753
+ comparator = Comparator;
43754
+ const parseOptions = requireParseOptions();
43755
+ const {
43756
+ safeRe: re,
43757
+ t
43758
+ } = requireRe();
43759
+ const cmp = requireCmp();
43760
+ const debug = requireDebug();
43761
+ const SemVer = requireSemver();
43762
+ const Range = requireRange();
43763
+ return comparator;
43478
43764
  }
43479
43765
 
43480
43766
  var range;
43481
43767
  var hasRequiredRange;
43768
+ function requireRange() {
43769
+ if (hasRequiredRange) return range;
43770
+ hasRequiredRange = 1;
43771
+ const SPACE_CHARACTERS = /\s+/g;
43772
+
43773
+ // hoisted class for cyclic dependency
43774
+ class Range {
43775
+ constructor(range, options) {
43776
+ options = parseOptions(options);
43777
+ if (range instanceof Range) {
43778
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
43779
+ return range;
43780
+ } else {
43781
+ return new Range(range.raw, options);
43782
+ }
43783
+ }
43784
+ if (range instanceof Comparator) {
43785
+ // just put it in the set and return
43786
+ this.raw = range.value;
43787
+ this.set = [[range]];
43788
+ this.formatted = undefined;
43789
+ return this;
43790
+ }
43791
+ this.options = options;
43792
+ this.loose = !!options.loose;
43793
+ this.includePrerelease = !!options.includePrerelease;
43794
+
43795
+ // First reduce all whitespace as much as possible so we do not have to rely
43796
+ // on potentially slow regexes like \s*. This is then stored and used for
43797
+ // future error messages as well.
43798
+ this.raw = range.trim().replace(SPACE_CHARACTERS, ' ');
43799
+
43800
+ // First, split on ||
43801
+ this.set = this.raw.split('||')
43802
+ // map the range to a 2d array of comparators
43803
+ .map(r => this.parseRange(r.trim()))
43804
+ // throw out any comparator lists that are empty
43805
+ // this generally means that it was not a valid range, which is allowed
43806
+ // in loose mode, but will still throw if the WHOLE range is invalid.
43807
+ .filter(c => c.length);
43808
+ if (!this.set.length) {
43809
+ throw new TypeError("Invalid SemVer Range: ".concat(this.raw));
43810
+ }
43811
+
43812
+ // if we have any that are not the null set, throw out null sets.
43813
+ if (this.set.length > 1) {
43814
+ // keep the first one, in case they're all null sets
43815
+ const first = this.set[0];
43816
+ this.set = this.set.filter(c => !isNullSet(c[0]));
43817
+ if (this.set.length === 0) {
43818
+ this.set = [first];
43819
+ } else if (this.set.length > 1) {
43820
+ // if we have any that are *, then the range is just *
43821
+ for (const c of this.set) {
43822
+ if (c.length === 1 && isAny(c[0])) {
43823
+ this.set = [c];
43824
+ break;
43825
+ }
43826
+ }
43827
+ }
43828
+ }
43829
+ this.formatted = undefined;
43830
+ }
43831
+ get range() {
43832
+ if (this.formatted === undefined) {
43833
+ this.formatted = '';
43834
+ for (let i = 0; i < this.set.length; i++) {
43835
+ if (i > 0) {
43836
+ this.formatted += '||';
43837
+ }
43838
+ const comps = this.set[i];
43839
+ for (let k = 0; k < comps.length; k++) {
43840
+ if (k > 0) {
43841
+ this.formatted += ' ';
43842
+ }
43843
+ this.formatted += comps[k].toString().trim();
43844
+ }
43845
+ }
43846
+ }
43847
+ return this.formatted;
43848
+ }
43849
+ format() {
43850
+ return this.range;
43851
+ }
43852
+ toString() {
43853
+ return this.range;
43854
+ }
43855
+ parseRange(range) {
43856
+ // memoize range parsing for performance.
43857
+ // this is a very hot path, and fully deterministic.
43858
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
43859
+ const memoKey = memoOpts + ':' + range;
43860
+ const cached = cache.get(memoKey);
43861
+ if (cached) {
43862
+ return cached;
43863
+ }
43864
+ const loose = this.options.loose;
43865
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
43866
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
43867
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
43868
+ debug('hyphen replace', range);
43869
+
43870
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
43871
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
43872
+ debug('comparator trim', range);
43873
+
43874
+ // `~ 1.2.3` => `~1.2.3`
43875
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
43876
+ debug('tilde trim', range);
43877
+
43878
+ // `^ 1.2.3` => `^1.2.3`
43879
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
43880
+ debug('caret trim', range);
43881
+
43882
+ // At this point, the range is completely trimmed and
43883
+ // ready to be split into comparators.
43884
+
43885
+ let rangeList = range.split(' ').map(comp => parseComparator(comp, this.options)).join(' ').split(/\s+/)
43886
+ // >=0.0.0 is equivalent to *
43887
+ .map(comp => replaceGTE0(comp, this.options));
43888
+ if (loose) {
43889
+ // in loose mode, throw out any that are not valid comparators
43890
+ rangeList = rangeList.filter(comp => {
43891
+ debug('loose invalid filter', comp, this.options);
43892
+ return !!comp.match(re[t.COMPARATORLOOSE]);
43893
+ });
43894
+ }
43895
+ debug('range list', rangeList);
43482
43896
 
43483
- function requireRange () {
43484
- if (hasRequiredRange) return range;
43485
- hasRequiredRange = 1;
43486
-
43487
- const SPACE_CHARACTERS = /\s+/g;
43488
-
43489
- // hoisted class for cyclic dependency
43490
- class Range {
43491
- constructor (range, options) {
43492
- options = parseOptions(options);
43493
-
43494
- if (range instanceof Range) {
43495
- if (
43496
- range.loose === !!options.loose &&
43497
- range.includePrerelease === !!options.includePrerelease
43498
- ) {
43499
- return range
43500
- } else {
43501
- return new Range(range.raw, options)
43502
- }
43503
- }
43504
-
43505
- if (range instanceof Comparator) {
43506
- // just put it in the set and return
43507
- this.raw = range.value;
43508
- this.set = [[range]];
43509
- this.formatted = undefined;
43510
- return this
43511
- }
43512
-
43513
- this.options = options;
43514
- this.loose = !!options.loose;
43515
- this.includePrerelease = !!options.includePrerelease;
43516
-
43517
- // First reduce all whitespace as much as possible so we do not have to rely
43518
- // on potentially slow regexes like \s*. This is then stored and used for
43519
- // future error messages as well.
43520
- this.raw = range.trim().replace(SPACE_CHARACTERS, ' ');
43521
-
43522
- // First, split on ||
43523
- this.set = this.raw
43524
- .split('||')
43525
- // map the range to a 2d array of comparators
43526
- .map(r => this.parseRange(r.trim()))
43527
- // throw out any comparator lists that are empty
43528
- // this generally means that it was not a valid range, which is allowed
43529
- // in loose mode, but will still throw if the WHOLE range is invalid.
43530
- .filter(c => c.length);
43531
-
43532
- if (!this.set.length) {
43533
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
43534
- }
43535
-
43536
- // if we have any that are not the null set, throw out null sets.
43537
- if (this.set.length > 1) {
43538
- // keep the first one, in case they're all null sets
43539
- const first = this.set[0];
43540
- this.set = this.set.filter(c => !isNullSet(c[0]));
43541
- if (this.set.length === 0) {
43542
- this.set = [first];
43543
- } else if (this.set.length > 1) {
43544
- // if we have any that are *, then the range is just *
43545
- for (const c of this.set) {
43546
- if (c.length === 1 && isAny(c[0])) {
43547
- this.set = [c];
43548
- break
43549
- }
43550
- }
43551
- }
43552
- }
43553
-
43554
- this.formatted = undefined;
43555
- }
43556
-
43557
- get range () {
43558
- if (this.formatted === undefined) {
43559
- this.formatted = '';
43560
- for (let i = 0; i < this.set.length; i++) {
43561
- if (i > 0) {
43562
- this.formatted += '||';
43563
- }
43564
- const comps = this.set[i];
43565
- for (let k = 0; k < comps.length; k++) {
43566
- if (k > 0) {
43567
- this.formatted += ' ';
43568
- }
43569
- this.formatted += comps[k].toString().trim();
43570
- }
43571
- }
43572
- }
43573
- return this.formatted
43574
- }
43575
-
43576
- format () {
43577
- return this.range
43578
- }
43579
-
43580
- toString () {
43581
- return this.range
43582
- }
43583
-
43584
- parseRange (range) {
43585
- // memoize range parsing for performance.
43586
- // this is a very hot path, and fully deterministic.
43587
- const memoOpts =
43588
- (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
43589
- (this.options.loose && FLAG_LOOSE);
43590
- const memoKey = memoOpts + ':' + range;
43591
- const cached = cache.get(memoKey);
43592
- if (cached) {
43593
- return cached
43594
- }
43595
-
43596
- const loose = this.options.loose;
43597
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
43598
- const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
43599
- range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
43600
- debug('hyphen replace', range);
43601
-
43602
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
43603
- range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
43604
- debug('comparator trim', range);
43605
-
43606
- // `~ 1.2.3` => `~1.2.3`
43607
- range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
43608
- debug('tilde trim', range);
43609
-
43610
- // `^ 1.2.3` => `^1.2.3`
43611
- range = range.replace(re[t.CARETTRIM], caretTrimReplace);
43612
- debug('caret trim', range);
43613
-
43614
- // At this point, the range is completely trimmed and
43615
- // ready to be split into comparators.
43616
-
43617
- let rangeList = range
43618
- .split(' ')
43619
- .map(comp => parseComparator(comp, this.options))
43620
- .join(' ')
43621
- .split(/\s+/)
43622
- // >=0.0.0 is equivalent to *
43623
- .map(comp => replaceGTE0(comp, this.options));
43624
-
43625
- if (loose) {
43626
- // in loose mode, throw out any that are not valid comparators
43627
- rangeList = rangeList.filter(comp => {
43628
- debug('loose invalid filter', comp, this.options);
43629
- return !!comp.match(re[t.COMPARATORLOOSE])
43630
- });
43631
- }
43632
- debug('range list', rangeList);
43633
-
43634
- // if any comparators are the null set, then replace with JUST null set
43635
- // if more than one comparator, remove any * comparators
43636
- // also, don't include the same comparator more than once
43637
- const rangeMap = new Map();
43638
- const comparators = rangeList.map(comp => new Comparator(comp, this.options));
43639
- for (const comp of comparators) {
43640
- if (isNullSet(comp)) {
43641
- return [comp]
43642
- }
43643
- rangeMap.set(comp.value, comp);
43644
- }
43645
- if (rangeMap.size > 1 && rangeMap.has('')) {
43646
- rangeMap.delete('');
43647
- }
43648
-
43649
- const result = [...rangeMap.values()];
43650
- cache.set(memoKey, result);
43651
- return result
43652
- }
43653
-
43654
- intersects (range, options) {
43655
- if (!(range instanceof Range)) {
43656
- throw new TypeError('a Range is required')
43657
- }
43658
-
43659
- return this.set.some((thisComparators) => {
43660
- return (
43661
- isSatisfiable(thisComparators, options) &&
43662
- range.set.some((rangeComparators) => {
43663
- return (
43664
- isSatisfiable(rangeComparators, options) &&
43665
- thisComparators.every((thisComparator) => {
43666
- return rangeComparators.every((rangeComparator) => {
43667
- return thisComparator.intersects(rangeComparator, options)
43668
- })
43669
- })
43670
- )
43671
- })
43672
- )
43673
- })
43674
- }
43675
-
43676
- // if ANY of the sets match ALL of its comparators, then pass
43677
- test (version) {
43678
- if (!version) {
43679
- return false
43680
- }
43681
-
43682
- if (typeof version === 'string') {
43683
- try {
43684
- version = new SemVer(version, this.options);
43685
- } catch (er) {
43686
- return false
43687
- }
43688
- }
43689
-
43690
- for (let i = 0; i < this.set.length; i++) {
43691
- if (testSet(this.set[i], version, this.options)) {
43692
- return true
43693
- }
43694
- }
43695
- return false
43696
- }
43697
- }
43698
-
43699
- range = Range;
43700
-
43701
- const LRU = requireLrucache();
43702
- const cache = new LRU();
43703
-
43704
- const parseOptions = requireParseOptions();
43705
- const Comparator = requireComparator();
43706
- const debug = requireDebug();
43707
- const SemVer = requireSemver();
43708
- const {
43709
- safeRe: re,
43710
- t,
43711
- comparatorTrimReplace,
43712
- tildeTrimReplace,
43713
- caretTrimReplace,
43714
- } = requireRe();
43715
- const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants();
43716
-
43717
- const isNullSet = c => c.value === '<0.0.0-0';
43718
- const isAny = c => c.value === '';
43719
-
43720
- // take a set of comparators and determine whether there
43721
- // exists a version which can satisfy it
43722
- const isSatisfiable = (comparators, options) => {
43723
- let result = true;
43724
- const remainingComparators = comparators.slice();
43725
- let testComparator = remainingComparators.pop();
43726
-
43727
- while (result && remainingComparators.length) {
43728
- result = remainingComparators.every((otherComparator) => {
43729
- return testComparator.intersects(otherComparator, options)
43730
- });
43731
-
43732
- testComparator = remainingComparators.pop();
43733
- }
43734
-
43735
- return result
43736
- };
43737
-
43738
- // comprised of xranges, tildes, stars, and gtlt's at this point.
43739
- // already replaced the hyphen ranges
43740
- // turn into a set of JUST comparators.
43741
- const parseComparator = (comp, options) => {
43742
- debug('comp', comp, options);
43743
- comp = replaceCarets(comp, options);
43744
- debug('caret', comp);
43745
- comp = replaceTildes(comp, options);
43746
- debug('tildes', comp);
43747
- comp = replaceXRanges(comp, options);
43748
- debug('xrange', comp);
43749
- comp = replaceStars(comp, options);
43750
- debug('stars', comp);
43751
- return comp
43752
- };
43753
-
43754
- const isX = id => !id || id.toLowerCase() === 'x' || id === '*';
43755
-
43756
- // ~, ~> --> * (any, kinda silly)
43757
- // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
43758
- // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
43759
- // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
43760
- // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
43761
- // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
43762
- // ~0.0.1 --> >=0.0.1 <0.1.0-0
43763
- const replaceTildes = (comp, options) => {
43764
- return comp
43765
- .trim()
43766
- .split(/\s+/)
43767
- .map((c) => replaceTilde(c, options))
43768
- .join(' ')
43769
- };
43770
-
43771
- const replaceTilde = (comp, options) => {
43772
- const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
43773
- return comp.replace(r, (_, M, m, p, pr) => {
43774
- debug('tilde', comp, _, M, m, p, pr);
43775
- let ret;
43776
-
43777
- if (isX(M)) {
43778
- ret = '';
43779
- } else if (isX(m)) {
43780
- ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
43781
- } else if (isX(p)) {
43782
- // ~1.2 == >=1.2.0 <1.3.0-0
43783
- ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
43784
- } else if (pr) {
43785
- debug('replaceTilde pr', pr);
43786
- ret = `>=${M}.${m}.${p}-${pr
43787
- } <${M}.${+m + 1}.0-0`;
43788
- } else {
43789
- // ~1.2.3 == >=1.2.3 <1.3.0-0
43790
- ret = `>=${M}.${m}.${p
43791
- } <${M}.${+m + 1}.0-0`;
43792
- }
43793
-
43794
- debug('tilde return', ret);
43795
- return ret
43796
- })
43797
- };
43798
-
43799
- // ^ --> * (any, kinda silly)
43800
- // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
43801
- // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
43802
- // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
43803
- // ^1.2.3 --> >=1.2.3 <2.0.0-0
43804
- // ^1.2.0 --> >=1.2.0 <2.0.0-0
43805
- // ^0.0.1 --> >=0.0.1 <0.0.2-0
43806
- // ^0.1.0 --> >=0.1.0 <0.2.0-0
43807
- const replaceCarets = (comp, options) => {
43808
- return comp
43809
- .trim()
43810
- .split(/\s+/)
43811
- .map((c) => replaceCaret(c, options))
43812
- .join(' ')
43813
- };
43814
-
43815
- const replaceCaret = (comp, options) => {
43816
- debug('caret', comp, options);
43817
- const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
43818
- const z = options.includePrerelease ? '-0' : '';
43819
- return comp.replace(r, (_, M, m, p, pr) => {
43820
- debug('caret', comp, _, M, m, p, pr);
43821
- let ret;
43822
-
43823
- if (isX(M)) {
43824
- ret = '';
43825
- } else if (isX(m)) {
43826
- ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
43827
- } else if (isX(p)) {
43828
- if (M === '0') {
43829
- ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
43830
- } else {
43831
- ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
43832
- }
43833
- } else if (pr) {
43834
- debug('replaceCaret pr', pr);
43835
- if (M === '0') {
43836
- if (m === '0') {
43837
- ret = `>=${M}.${m}.${p}-${pr
43838
- } <${M}.${m}.${+p + 1}-0`;
43839
- } else {
43840
- ret = `>=${M}.${m}.${p}-${pr
43841
- } <${M}.${+m + 1}.0-0`;
43842
- }
43843
- } else {
43844
- ret = `>=${M}.${m}.${p}-${pr
43845
- } <${+M + 1}.0.0-0`;
43846
- }
43847
- } else {
43848
- debug('no pr');
43849
- if (M === '0') {
43850
- if (m === '0') {
43851
- ret = `>=${M}.${m}.${p
43852
- }${z} <${M}.${m}.${+p + 1}-0`;
43853
- } else {
43854
- ret = `>=${M}.${m}.${p
43855
- }${z} <${M}.${+m + 1}.0-0`;
43856
- }
43857
- } else {
43858
- ret = `>=${M}.${m}.${p
43859
- } <${+M + 1}.0.0-0`;
43860
- }
43861
- }
43862
-
43863
- debug('caret return', ret);
43864
- return ret
43865
- })
43866
- };
43867
-
43868
- const replaceXRanges = (comp, options) => {
43869
- debug('replaceXRanges', comp, options);
43870
- return comp
43871
- .split(/\s+/)
43872
- .map((c) => replaceXRange(c, options))
43873
- .join(' ')
43874
- };
43875
-
43876
- const replaceXRange = (comp, options) => {
43877
- comp = comp.trim();
43878
- const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
43879
- return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
43880
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
43881
- const xM = isX(M);
43882
- const xm = xM || isX(m);
43883
- const xp = xm || isX(p);
43884
- const anyX = xp;
43885
-
43886
- if (gtlt === '=' && anyX) {
43887
- gtlt = '';
43888
- }
43889
-
43890
- // if we're including prereleases in the match, then we need
43891
- // to fix this to -0, the lowest possible prerelease value
43892
- pr = options.includePrerelease ? '-0' : '';
43893
-
43894
- if (xM) {
43895
- if (gtlt === '>' || gtlt === '<') {
43896
- // nothing is allowed
43897
- ret = '<0.0.0-0';
43898
- } else {
43899
- // nothing is forbidden
43900
- ret = '*';
43901
- }
43902
- } else if (gtlt && anyX) {
43903
- // we know patch is an x, because we have any x at all.
43904
- // replace X with 0
43905
- if (xm) {
43906
- m = 0;
43907
- }
43908
- p = 0;
43909
-
43910
- if (gtlt === '>') {
43911
- // >1 => >=2.0.0
43912
- // >1.2 => >=1.3.0
43913
- gtlt = '>=';
43914
- if (xm) {
43915
- M = +M + 1;
43916
- m = 0;
43917
- p = 0;
43918
- } else {
43919
- m = +m + 1;
43920
- p = 0;
43921
- }
43922
- } else if (gtlt === '<=') {
43923
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
43924
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
43925
- gtlt = '<';
43926
- if (xm) {
43927
- M = +M + 1;
43928
- } else {
43929
- m = +m + 1;
43930
- }
43931
- }
43932
-
43933
- if (gtlt === '<') {
43934
- pr = '-0';
43935
- }
43936
-
43937
- ret = `${gtlt + M}.${m}.${p}${pr}`;
43938
- } else if (xm) {
43939
- ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
43940
- } else if (xp) {
43941
- ret = `>=${M}.${m}.0${pr
43942
- } <${M}.${+m + 1}.0-0`;
43943
- }
43944
-
43945
- debug('xRange return', ret);
43946
-
43947
- return ret
43948
- })
43949
- };
43950
-
43951
- // Because * is AND-ed with everything else in the comparator,
43952
- // and '' means "any version", just remove the *s entirely.
43953
- const replaceStars = (comp, options) => {
43954
- debug('replaceStars', comp, options);
43955
- // Looseness is ignored here. star is always as loose as it gets!
43956
- return comp
43957
- .trim()
43958
- .replace(re[t.STAR], '')
43959
- };
43960
-
43961
- const replaceGTE0 = (comp, options) => {
43962
- debug('replaceGTE0', comp, options);
43963
- return comp
43964
- .trim()
43965
- .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
43966
- };
43967
-
43968
- // This function is passed to string.replace(re[t.HYPHENRANGE])
43969
- // M, m, patch, prerelease, build
43970
- // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
43971
- // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
43972
- // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
43973
- // TODO build?
43974
- const hyphenReplace = incPr => ($0,
43975
- from, fM, fm, fp, fpr, fb,
43976
- to, tM, tm, tp, tpr) => {
43977
- if (isX(fM)) {
43978
- from = '';
43979
- } else if (isX(fm)) {
43980
- from = `>=${fM}.0.0${incPr ? '-0' : ''}`;
43981
- } else if (isX(fp)) {
43982
- from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`;
43983
- } else if (fpr) {
43984
- from = `>=${from}`;
43985
- } else {
43986
- from = `>=${from}${incPr ? '-0' : ''}`;
43987
- }
43988
-
43989
- if (isX(tM)) {
43990
- to = '';
43991
- } else if (isX(tm)) {
43992
- to = `<${+tM + 1}.0.0-0`;
43993
- } else if (isX(tp)) {
43994
- to = `<${tM}.${+tm + 1}.0-0`;
43995
- } else if (tpr) {
43996
- to = `<=${tM}.${tm}.${tp}-${tpr}`;
43997
- } else if (incPr) {
43998
- to = `<${tM}.${tm}.${+tp + 1}-0`;
43999
- } else {
44000
- to = `<=${to}`;
44001
- }
44002
-
44003
- return `${from} ${to}`.trim()
44004
- };
43897
+ // if any comparators are the null set, then replace with JUST null set
43898
+ // if more than one comparator, remove any * comparators
43899
+ // also, don't include the same comparator more than once
43900
+ const rangeMap = new Map();
43901
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options));
43902
+ for (const comp of comparators) {
43903
+ if (isNullSet(comp)) {
43904
+ return [comp];
43905
+ }
43906
+ rangeMap.set(comp.value, comp);
43907
+ }
43908
+ if (rangeMap.size > 1 && rangeMap.has('')) {
43909
+ rangeMap.delete('');
43910
+ }
43911
+ const result = [...rangeMap.values()];
43912
+ cache.set(memoKey, result);
43913
+ return result;
43914
+ }
43915
+ intersects(range, options) {
43916
+ if (!(range instanceof Range)) {
43917
+ throw new TypeError('a Range is required');
43918
+ }
43919
+ return this.set.some(thisComparators => {
43920
+ return isSatisfiable(thisComparators, options) && range.set.some(rangeComparators => {
43921
+ return isSatisfiable(rangeComparators, options) && thisComparators.every(thisComparator => {
43922
+ return rangeComparators.every(rangeComparator => {
43923
+ return thisComparator.intersects(rangeComparator, options);
43924
+ });
43925
+ });
43926
+ });
43927
+ });
43928
+ }
44005
43929
 
44006
- const testSet = (set, version, options) => {
44007
- for (let i = 0; i < set.length; i++) {
44008
- if (!set[i].test(version)) {
44009
- return false
44010
- }
44011
- }
43930
+ // if ANY of the sets match ALL of its comparators, then pass
43931
+ test(version) {
43932
+ if (!version) {
43933
+ return false;
43934
+ }
43935
+ if (typeof version === 'string') {
43936
+ try {
43937
+ version = new SemVer(version, this.options);
43938
+ } catch (er) {
43939
+ return false;
43940
+ }
43941
+ }
43942
+ for (let i = 0; i < this.set.length; i++) {
43943
+ if (testSet(this.set[i], version, this.options)) {
43944
+ return true;
43945
+ }
43946
+ }
43947
+ return false;
43948
+ }
43949
+ }
43950
+ range = Range;
43951
+ const LRU = requireLrucache();
43952
+ const cache = new LRU();
43953
+ const parseOptions = requireParseOptions();
43954
+ const Comparator = requireComparator();
43955
+ const debug = requireDebug();
43956
+ const SemVer = requireSemver();
43957
+ const {
43958
+ safeRe: re,
43959
+ t,
43960
+ comparatorTrimReplace,
43961
+ tildeTrimReplace,
43962
+ caretTrimReplace
43963
+ } = requireRe();
43964
+ const {
43965
+ FLAG_INCLUDE_PRERELEASE,
43966
+ FLAG_LOOSE
43967
+ } = requireConstants();
43968
+ const isNullSet = c => c.value === '<0.0.0-0';
43969
+ const isAny = c => c.value === '';
43970
+
43971
+ // take a set of comparators and determine whether there
43972
+ // exists a version which can satisfy it
43973
+ const isSatisfiable = (comparators, options) => {
43974
+ let result = true;
43975
+ const remainingComparators = comparators.slice();
43976
+ let testComparator = remainingComparators.pop();
43977
+ while (result && remainingComparators.length) {
43978
+ result = remainingComparators.every(otherComparator => {
43979
+ return testComparator.intersects(otherComparator, options);
43980
+ });
43981
+ testComparator = remainingComparators.pop();
43982
+ }
43983
+ return result;
43984
+ };
44012
43985
 
44013
- if (version.prerelease.length && !options.includePrerelease) {
44014
- // Find the set of versions that are allowed to have prereleases
44015
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
44016
- // That should allow `1.2.3-pr.2` to pass.
44017
- // However, `1.2.4-alpha.notready` should NOT be allowed,
44018
- // even though it's within the range set by the comparators.
44019
- for (let i = 0; i < set.length; i++) {
44020
- debug(set[i].semver);
44021
- if (set[i].semver === Comparator.ANY) {
44022
- continue
44023
- }
43986
+ // comprised of xranges, tildes, stars, and gtlt's at this point.
43987
+ // already replaced the hyphen ranges
43988
+ // turn into a set of JUST comparators.
43989
+ const parseComparator = (comp, options) => {
43990
+ debug('comp', comp, options);
43991
+ comp = replaceCarets(comp, options);
43992
+ debug('caret', comp);
43993
+ comp = replaceTildes(comp, options);
43994
+ debug('tildes', comp);
43995
+ comp = replaceXRanges(comp, options);
43996
+ debug('xrange', comp);
43997
+ comp = replaceStars(comp, options);
43998
+ debug('stars', comp);
43999
+ return comp;
44000
+ };
44001
+ const isX = id => !id || id.toLowerCase() === 'x' || id === '*';
44002
+
44003
+ // ~, ~> --> * (any, kinda silly)
44004
+ // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
44005
+ // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
44006
+ // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
44007
+ // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
44008
+ // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
44009
+ // ~0.0.1 --> >=0.0.1 <0.1.0-0
44010
+ const replaceTildes = (comp, options) => {
44011
+ return comp.trim().split(/\s+/).map(c => replaceTilde(c, options)).join(' ');
44012
+ };
44013
+ const replaceTilde = (comp, options) => {
44014
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
44015
+ return comp.replace(r, (_, M, m, p, pr) => {
44016
+ debug('tilde', comp, _, M, m, p, pr);
44017
+ let ret;
44018
+ if (isX(M)) {
44019
+ ret = '';
44020
+ } else if (isX(m)) {
44021
+ ret = ">=".concat(M, ".0.0 <").concat(+M + 1, ".0.0-0");
44022
+ } else if (isX(p)) {
44023
+ // ~1.2 == >=1.2.0 <1.3.0-0
44024
+ ret = ">=".concat(M, ".").concat(m, ".0 <").concat(M, ".").concat(+m + 1, ".0-0");
44025
+ } else if (pr) {
44026
+ debug('replaceTilde pr', pr);
44027
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, "-").concat(pr, " <").concat(M, ".").concat(+m + 1, ".0-0");
44028
+ } else {
44029
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
44030
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(M, ".").concat(+m + 1, ".0-0");
44031
+ }
44032
+ debug('tilde return', ret);
44033
+ return ret;
44034
+ });
44035
+ };
44024
44036
 
44025
- if (set[i].semver.prerelease.length > 0) {
44026
- const allowed = set[i].semver;
44027
- if (allowed.major === version.major &&
44028
- allowed.minor === version.minor &&
44029
- allowed.patch === version.patch) {
44030
- return true
44031
- }
44032
- }
44033
- }
44037
+ // ^ --> * (any, kinda silly)
44038
+ // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
44039
+ // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
44040
+ // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
44041
+ // ^1.2.3 --> >=1.2.3 <2.0.0-0
44042
+ // ^1.2.0 --> >=1.2.0 <2.0.0-0
44043
+ // ^0.0.1 --> >=0.0.1 <0.0.2-0
44044
+ // ^0.1.0 --> >=0.1.0 <0.2.0-0
44045
+ const replaceCarets = (comp, options) => {
44046
+ return comp.trim().split(/\s+/).map(c => replaceCaret(c, options)).join(' ');
44047
+ };
44048
+ const replaceCaret = (comp, options) => {
44049
+ debug('caret', comp, options);
44050
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
44051
+ const z = options.includePrerelease ? '-0' : '';
44052
+ return comp.replace(r, (_, M, m, p, pr) => {
44053
+ debug('caret', comp, _, M, m, p, pr);
44054
+ let ret;
44055
+ if (isX(M)) {
44056
+ ret = '';
44057
+ } else if (isX(m)) {
44058
+ ret = ">=".concat(M, ".0.0").concat(z, " <").concat(+M + 1, ".0.0-0");
44059
+ } else if (isX(p)) {
44060
+ if (M === '0') {
44061
+ ret = ">=".concat(M, ".").concat(m, ".0").concat(z, " <").concat(M, ".").concat(+m + 1, ".0-0");
44062
+ } else {
44063
+ ret = ">=".concat(M, ".").concat(m, ".0").concat(z, " <").concat(+M + 1, ".0.0-0");
44064
+ }
44065
+ } else if (pr) {
44066
+ debug('replaceCaret pr', pr);
44067
+ if (M === '0') {
44068
+ if (m === '0') {
44069
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, "-").concat(pr, " <").concat(M, ".").concat(m, ".").concat(+p + 1, "-0");
44070
+ } else {
44071
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, "-").concat(pr, " <").concat(M, ".").concat(+m + 1, ".0-0");
44072
+ }
44073
+ } else {
44074
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, "-").concat(pr, " <").concat(+M + 1, ".0.0-0");
44075
+ }
44076
+ } else {
44077
+ debug('no pr');
44078
+ if (M === '0') {
44079
+ if (m === '0') {
44080
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p).concat(z, " <").concat(M, ".").concat(m, ".").concat(+p + 1, "-0");
44081
+ } else {
44082
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p).concat(z, " <").concat(M, ".").concat(+m + 1, ".0-0");
44083
+ }
44084
+ } else {
44085
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(+M + 1, ".0.0-0");
44086
+ }
44087
+ }
44088
+ debug('caret return', ret);
44089
+ return ret;
44090
+ });
44091
+ };
44092
+ const replaceXRanges = (comp, options) => {
44093
+ debug('replaceXRanges', comp, options);
44094
+ return comp.split(/\s+/).map(c => replaceXRange(c, options)).join(' ');
44095
+ };
44096
+ const replaceXRange = (comp, options) => {
44097
+ comp = comp.trim();
44098
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
44099
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
44100
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
44101
+ const xM = isX(M);
44102
+ const xm = xM || isX(m);
44103
+ const xp = xm || isX(p);
44104
+ const anyX = xp;
44105
+ if (gtlt === '=' && anyX) {
44106
+ gtlt = '';
44107
+ }
44108
+
44109
+ // if we're including prereleases in the match, then we need
44110
+ // to fix this to -0, the lowest possible prerelease value
44111
+ pr = options.includePrerelease ? '-0' : '';
44112
+ if (xM) {
44113
+ if (gtlt === '>' || gtlt === '<') {
44114
+ // nothing is allowed
44115
+ ret = '<0.0.0-0';
44116
+ } else {
44117
+ // nothing is forbidden
44118
+ ret = '*';
44119
+ }
44120
+ } else if (gtlt && anyX) {
44121
+ // we know patch is an x, because we have any x at all.
44122
+ // replace X with 0
44123
+ if (xm) {
44124
+ m = 0;
44125
+ }
44126
+ p = 0;
44127
+ if (gtlt === '>') {
44128
+ // >1 => >=2.0.0
44129
+ // >1.2 => >=1.3.0
44130
+ gtlt = '>=';
44131
+ if (xm) {
44132
+ M = +M + 1;
44133
+ m = 0;
44134
+ p = 0;
44135
+ } else {
44136
+ m = +m + 1;
44137
+ p = 0;
44138
+ }
44139
+ } else if (gtlt === '<=') {
44140
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
44141
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
44142
+ gtlt = '<';
44143
+ if (xm) {
44144
+ M = +M + 1;
44145
+ } else {
44146
+ m = +m + 1;
44147
+ }
44148
+ }
44149
+ if (gtlt === '<') {
44150
+ pr = '-0';
44151
+ }
44152
+ ret = "".concat(gtlt + M, ".").concat(m, ".").concat(p).concat(pr);
44153
+ } else if (xm) {
44154
+ ret = ">=".concat(M, ".0.0").concat(pr, " <").concat(+M + 1, ".0.0-0");
44155
+ } else if (xp) {
44156
+ ret = ">=".concat(M, ".").concat(m, ".0").concat(pr, " <").concat(M, ".").concat(+m + 1, ".0-0");
44157
+ }
44158
+ debug('xRange return', ret);
44159
+ return ret;
44160
+ });
44161
+ };
44034
44162
 
44035
- // Version has a -pre, but it's not one of the ones we like.
44036
- return false
44037
- }
44163
+ // Because * is AND-ed with everything else in the comparator,
44164
+ // and '' means "any version", just remove the *s entirely.
44165
+ const replaceStars = (comp, options) => {
44166
+ debug('replaceStars', comp, options);
44167
+ // Looseness is ignored here. star is always as loose as it gets!
44168
+ return comp.trim().replace(re[t.STAR], '');
44169
+ };
44170
+ const replaceGTE0 = (comp, options) => {
44171
+ debug('replaceGTE0', comp, options);
44172
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '');
44173
+ };
44174
+
44175
+ // This function is passed to string.replace(re[t.HYPHENRANGE])
44176
+ // M, m, patch, prerelease, build
44177
+ // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
44178
+ // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
44179
+ // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
44180
+ // TODO build?
44181
+ const hyphenReplace = incPr => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
44182
+ if (isX(fM)) {
44183
+ from = '';
44184
+ } else if (isX(fm)) {
44185
+ from = ">=".concat(fM, ".0.0").concat(incPr ? '-0' : '');
44186
+ } else if (isX(fp)) {
44187
+ from = ">=".concat(fM, ".").concat(fm, ".0").concat(incPr ? '-0' : '');
44188
+ } else if (fpr) {
44189
+ from = ">=".concat(from);
44190
+ } else {
44191
+ from = ">=".concat(from).concat(incPr ? '-0' : '');
44192
+ }
44193
+ if (isX(tM)) {
44194
+ to = '';
44195
+ } else if (isX(tm)) {
44196
+ to = "<".concat(+tM + 1, ".0.0-0");
44197
+ } else if (isX(tp)) {
44198
+ to = "<".concat(tM, ".").concat(+tm + 1, ".0-0");
44199
+ } else if (tpr) {
44200
+ to = "<=".concat(tM, ".").concat(tm, ".").concat(tp, "-").concat(tpr);
44201
+ } else if (incPr) {
44202
+ to = "<".concat(tM, ".").concat(tm, ".").concat(+tp + 1, "-0");
44203
+ } else {
44204
+ to = "<=".concat(to);
44205
+ }
44206
+ return "".concat(from, " ").concat(to).trim();
44207
+ };
44208
+ const testSet = (set, version, options) => {
44209
+ for (let i = 0; i < set.length; i++) {
44210
+ if (!set[i].test(version)) {
44211
+ return false;
44212
+ }
44213
+ }
44214
+ if (version.prerelease.length && !options.includePrerelease) {
44215
+ // Find the set of versions that are allowed to have prereleases
44216
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
44217
+ // That should allow `1.2.3-pr.2` to pass.
44218
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
44219
+ // even though it's within the range set by the comparators.
44220
+ for (let i = 0; i < set.length; i++) {
44221
+ debug(set[i].semver);
44222
+ if (set[i].semver === Comparator.ANY) {
44223
+ continue;
44224
+ }
44225
+ if (set[i].semver.prerelease.length > 0) {
44226
+ const allowed = set[i].semver;
44227
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
44228
+ return true;
44229
+ }
44230
+ }
44231
+ }
44038
44232
 
44039
- return true
44040
- };
44041
- return range;
44233
+ // Version has a -pre, but it's not one of the ones we like.
44234
+ return false;
44235
+ }
44236
+ return true;
44237
+ };
44238
+ return range;
44042
44239
  }
44043
44240
 
44044
44241
  var satisfies_1;
44045
44242
  var hasRequiredSatisfies;
44046
-
44047
- function requireSatisfies () {
44048
- if (hasRequiredSatisfies) return satisfies_1;
44049
- hasRequiredSatisfies = 1;
44050
-
44051
- const Range = requireRange();
44052
- const satisfies = (version, range, options) => {
44053
- try {
44054
- range = new Range(range, options);
44055
- } catch (er) {
44056
- return false
44057
- }
44058
- return range.test(version)
44059
- };
44060
- satisfies_1 = satisfies;
44061
- return satisfies_1;
44243
+ function requireSatisfies() {
44244
+ if (hasRequiredSatisfies) return satisfies_1;
44245
+ hasRequiredSatisfies = 1;
44246
+ const Range = requireRange();
44247
+ const satisfies = (version, range, options) => {
44248
+ try {
44249
+ range = new Range(range, options);
44250
+ } catch (er) {
44251
+ return false;
44252
+ }
44253
+ return range.test(version);
44254
+ };
44255
+ satisfies_1 = satisfies;
44256
+ return satisfies_1;
44062
44257
  }
44063
44258
 
44064
44259
  var satisfiesExports = requireSatisfies();