@digipair/skill-keycloak 0.21.1 → 0.21.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.cjs.js +121 -911
  2. package/index.esm.js +121 -911
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -10218,7 +10218,7 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10218
10218
 
10219
10219
  /**
10220
10220
  * @private
10221
- */ function _instanceof$h(left, right) {
10221
+ */ function _instanceof$g(left, right) {
10222
10222
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
10223
10223
  return !!right[Symbol.hasInstance](left);
10224
10224
  } else {
@@ -10228,7 +10228,7 @@ var InvalidZone = /*#__PURE__*/ function(Zone) {
10228
10228
  function normalizeZone(input, defaultZone) {
10229
10229
  if (isUndefined(input) || input === null) {
10230
10230
  return defaultZone;
10231
- } else if (_instanceof$h(input, Zone)) {
10231
+ } else if (_instanceof$g(input, Zone)) {
10232
10232
  return input;
10233
10233
  } else if (isString$4(input)) {
10234
10234
  var lowered = input.toLowerCase();
@@ -12202,7 +12202,7 @@ function _define_property$4(obj, key, value) {
12202
12202
  }
12203
12203
  return obj;
12204
12204
  }
12205
- function _instanceof$g(left, right) {
12205
+ function _instanceof$f(left, right) {
12206
12206
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
12207
12207
  return !!right[Symbol.hasInstance](left);
12208
12208
  } else {
@@ -13338,7 +13338,7 @@ var Duration = /*#__PURE__*/ function() {
13338
13338
  if (!reason) {
13339
13339
  throw new InvalidArgumentError("need to specify a reason the Duration is invalid");
13340
13340
  }
13341
- var invalid = _instanceof$g(reason, Invalid) ? reason : new Invalid(reason, explanation);
13341
+ var invalid = _instanceof$f(reason, Invalid) ? reason : new Invalid(reason, explanation);
13342
13342
  if (Settings.throwOnInvalid) {
13343
13343
  throw new InvalidDurationError(invalid);
13344
13344
  } else {
@@ -13421,7 +13421,7 @@ function _create_class$b(Constructor, protoProps, staticProps) {
13421
13421
  if (staticProps) _defineProperties$b(Constructor, staticProps);
13422
13422
  return Constructor;
13423
13423
  }
13424
- function _instanceof$f(left, right) {
13424
+ function _instanceof$e(left, right) {
13425
13425
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
13426
13426
  return !!right[Symbol.hasInstance](left);
13427
13427
  } else {
@@ -13973,7 +13973,7 @@ var Interval = /*#__PURE__*/ function() {
13973
13973
  if (!reason) {
13974
13974
  throw new InvalidArgumentError("need to specify a reason the Interval is invalid");
13975
13975
  }
13976
- var invalid = _instanceof$f(reason, Invalid) ? reason : new Invalid(reason, explanation);
13976
+ var invalid = _instanceof$e(reason, Invalid) ? reason : new Invalid(reason, explanation);
13977
13977
  if (Settings.throwOnInvalid) {
13978
13978
  throw new InvalidIntervalError(invalid);
13979
13979
  } else {
@@ -15368,7 +15368,7 @@ function _define_property$2(obj, key, value) {
15368
15368
  }
15369
15369
  return obj;
15370
15370
  }
15371
- function _instanceof$e(left, right) {
15371
+ function _instanceof$d(left, right) {
15372
15372
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
15373
15373
  return !!right[Symbol.hasInstance](left);
15374
15374
  } else {
@@ -17555,7 +17555,7 @@ var DateTime = /*#__PURE__*/ function() {
17555
17555
  if (!reason) {
17556
17556
  throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");
17557
17557
  }
17558
- var invalid = _instanceof$e(reason, Invalid) ? reason : new Invalid(reason, explanation);
17558
+ var invalid = _instanceof$d(reason, Invalid) ? reason : new Invalid(reason, explanation);
17559
17559
  if (Settings.throwOnInvalid) {
17560
17560
  throw new InvalidDateTimeError(invalid);
17561
17561
  } else {
@@ -17940,7 +17940,7 @@ function _inherits$2(subClass, superClass) {
17940
17940
  });
17941
17941
  if (superClass) _set_prototype_of$2(subClass, superClass);
17942
17942
  }
17943
- function _instanceof$d(left, right) {
17943
+ function _instanceof$c(left, right) {
17944
17944
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17945
17945
  return !!right[Symbol.hasInstance](left);
17946
17946
  } else {
@@ -18869,14 +18869,14 @@ function resolveNode(node, pos, side, overlays) {
18869
18869
  var _a;
18870
18870
  // Move up to a node that actually holds the position, if possible
18871
18871
  while(node.from == node.to || (side < 1 ? node.from >= pos : node.from > pos) || (side > -1 ? node.to <= pos : node.to < pos)){
18872
- var parent = !overlays && _instanceof$d(node, TreeNode) && node.index < 0 ? null : node.parent;
18872
+ var parent = !overlays && _instanceof$c(node, TreeNode) && node.index < 0 ? null : node.parent;
18873
18873
  if (!parent) return node;
18874
18874
  node = parent;
18875
18875
  }
18876
18876
  var mode = overlays ? 0 : IterMode.IgnoreOverlays;
18877
18877
  // Must go up out of overlays when those do not overlap with pos
18878
18878
  if (overlays) for(var scan = node, parent1 = scan.parent; parent1; scan = parent1, parent1 = scan.parent){
18879
- if (_instanceof$d(scan, TreeNode) && scan.index < 0 && ((_a = parent1.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from) node = parent1;
18879
+ if (_instanceof$c(scan, TreeNode) && scan.index < 0 && ((_a = parent1.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from) node = parent1;
18880
18880
  }
18881
18881
  for(;;){
18882
18882
  var inner = node.enter(pos, side, mode);
@@ -19004,7 +19004,7 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
19004
19004
  for(var _parent__tree = parent._tree, children = _parent__tree.children, positions = _parent__tree.positions, e = dir > 0 ? children.length : -1; i != e; i += dir){
19005
19005
  var next = children[i], start = positions[i] + parent.from;
19006
19006
  if (!checkSide(side, pos, start, start + next.length)) continue;
19007
- if (_instanceof$d(next, TreeBuffer)) {
19007
+ if (_instanceof$c(next, TreeBuffer)) {
19008
19008
  if (mode & IterMode.ExcludeBuffers) continue;
19009
19009
  var index = next.findChild(0, next.buffer.length, dir, pos - start, side);
19010
19010
  if (index > -1) return new BufferNode(new BufferContext(parent, next, i, start), null, index);
@@ -19303,7 +19303,7 @@ function iterStack(heads) {
19303
19303
  pick = i;
19304
19304
  }
19305
19305
  }
19306
- var next = _instanceof$d(picked, TreeNode) && picked.index < 0 ? null : picked.parent;
19306
+ var next = _instanceof$c(picked, TreeNode) && picked.index < 0 ? null : picked.parent;
19307
19307
  var newHeads = heads.slice();
19308
19308
  if (next) newHeads[pick] = next;
19309
19309
  else newHeads.splice(pick, 1);
@@ -19327,7 +19327,7 @@ var StackIterator = /*#__PURE__*/ function() {
19327
19327
  }();
19328
19328
  function stackIterator(tree, pos, side) {
19329
19329
  var inner = tree.resolveInner(pos, side), layers = null;
19330
- for(var scan = _instanceof$d(inner, TreeNode) ? inner : inner.context.parent; scan; scan = scan.parent){
19330
+ for(var scan = _instanceof$c(inner, TreeNode) ? inner : inner.context.parent; scan; scan = scan.parent){
19331
19331
  if (scan.index < 0) {
19332
19332
  var parent = scan.parent;
19333
19333
  (layers || (layers = [
@@ -19365,7 +19365,7 @@ allows you to move to adjacent nodes.
19365
19365
  @internal
19366
19366
  */ this.index = 0;
19367
19367
  this.bufferNode = null;
19368
- if (_instanceof$d(node, TreeNode)) {
19368
+ if (_instanceof$c(node, TreeNode)) {
19369
19369
  this.yieldNode(node);
19370
19370
  } else {
19371
19371
  this._tree = node.context.parent;
@@ -19412,7 +19412,7 @@ allows you to move to adjacent nodes.
19412
19412
  */ key: "yield",
19413
19413
  value: function _yield(node) {
19414
19414
  if (!node) return false;
19415
- if (_instanceof$d(node, TreeNode)) {
19415
+ if (_instanceof$c(node, TreeNode)) {
19416
19416
  this.buffer = null;
19417
19417
  return this.yieldNode(node);
19418
19418
  }
@@ -19553,7 +19553,7 @@ allows you to move to adjacent nodes.
19553
19553
  for(; parent; ref2 = parent, index = ref2.index, parent = ref2._parent, ref2){
19554
19554
  if (index > -1) for(var i1 = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i1 != e; i1 += dir){
19555
19555
  var child = parent._tree.children[i1];
19556
- if (this.mode & IterMode.IncludeAnonymous || _instanceof$d(child, TreeBuffer) || !child.type.isAnonymous || hasChild(child)) return false;
19556
+ if (this.mode & IterMode.IncludeAnonymous || _instanceof$c(child, TreeBuffer) || !child.type.isAnonymous || hasChild(child)) return false;
19557
19557
  }
19558
19558
  }
19559
19559
  return true;
@@ -19696,7 +19696,7 @@ allows you to move to adjacent nodes.
19696
19696
  }();
19697
19697
  function hasChild(tree) {
19698
19698
  return tree.children.some(function(ch) {
19699
- return _instanceof$d(ch, TreeBuffer) || !ch.type.isAnonymous || hasChild(ch);
19699
+ return _instanceof$c(ch, TreeBuffer) || !ch.type.isAnonymous || hasChild(ch);
19700
19700
  });
19701
19701
  }
19702
19702
  function buildTree(data) {
@@ -19799,7 +19799,7 @@ function buildTree(data) {
19799
19799
  function makeBalanced(type) {
19800
19800
  return function(children, positions, length) {
19801
19801
  var lookAhead = 0, lastI = children.length - 1, last, lookAheadProp;
19802
- if (lastI >= 0 && _instanceof$d(last = children[lastI], Tree)) {
19802
+ if (lastI >= 0 && _instanceof$c(last = children[lastI], Tree)) {
19803
19803
  if (!lastI && last.type == type && last.length == length) return last;
19804
19804
  if (lookAheadProp = last.prop(NodeProp.lookAhead)) lookAhead = positions[lastI] + last.length + lookAheadProp;
19805
19805
  }
@@ -19921,7 +19921,7 @@ function buildTree(data) {
19921
19921
  }
19922
19922
  var nodeSizeCache = new WeakMap;
19923
19923
  function nodeSize(balanceType, node) {
19924
- if (!balanceType.isAnonymous || _instanceof$d(node, TreeBuffer) || node.type != balanceType) return 1;
19924
+ if (!balanceType.isAnonymous || _instanceof$c(node, TreeBuffer) || node.type != balanceType) return 1;
19925
19925
  var size = nodeSizeCache.get(node);
19926
19926
  if (size == null) {
19927
19927
  size = 1;
@@ -19929,7 +19929,7 @@ function nodeSize(balanceType, node) {
19929
19929
  try {
19930
19930
  for(var _iterator = node.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
19931
19931
  var child = _step.value;
19932
- if (child.type != balanceType || !_instanceof$d(child, Tree)) {
19932
+ if (child.type != balanceType || !_instanceof$c(child, Tree)) {
19933
19933
  size = 1;
19934
19934
  break;
19935
19935
  }
@@ -20128,7 +20128,7 @@ function _inherits$1(subClass, superClass) {
20128
20128
  });
20129
20129
  if (superClass) _set_prototype_of$1(subClass, superClass);
20130
20130
  }
20131
- function _instanceof$c(left, right) {
20131
+ function _instanceof$b(left, right) {
20132
20132
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
20133
20133
  return !!right[Symbol.hasInstance](left);
20134
20134
  } else {
@@ -20327,6 +20327,7 @@ about the parse state.
20327
20327
  var _a;
20328
20328
  var depth = action >> 19 /* Action.ReduceDepthShift */ , type = action & 65535 /* Action.ValueMask */ ;
20329
20329
  var parser = this.p.parser;
20330
+ if (this.reducePos < this.pos - 25 /* Lookahead.Margin */ ) this.setLookAhead(this.pos);
20330
20331
  var dPrec = parser.dynamicPrecedence(type);
20331
20332
  if (dPrec) this.score += dPrec;
20332
20333
  if (depth == 0) {
@@ -21279,7 +21280,7 @@ function cutAt(tree, pos, side) {
21279
21280
  cursor.moveTo(pos);
21280
21281
  for(;;){
21281
21282
  if (!(side < 0 ? cursor.childBefore(pos) : cursor.childAfter(pos))) for(;;){
21282
- if ((side < 0 ? cursor.to < pos : cursor.from > pos) && !cursor.type.isError) return side < 0 ? Math.max(0, Math.min(cursor.to - 1, pos - 25 /* Safety.Margin */ )) : Math.min(tree.length, Math.max(cursor.from + 1, pos + 25 /* Safety.Margin */ ));
21283
+ if ((side < 0 ? cursor.to < pos : cursor.from > pos) && !cursor.type.isError) return side < 0 ? Math.max(0, Math.min(cursor.to - 1, pos - 25 /* Lookahead.Margin */ )) : Math.min(tree.length, Math.max(cursor.from + 1, pos + 25 /* Lookahead.Margin */ ));
21283
21284
  if (side < 0 ? cursor.prevSibling() : cursor.nextSibling()) break;
21284
21285
  if (!cursor.parent()) return side < 0 ? 0 : tree.length;
21285
21286
  }
@@ -21347,7 +21348,7 @@ var FragmentCursor = /*#__PURE__*/ function() {
21347
21348
  this.nextStart = start;
21348
21349
  return null;
21349
21350
  }
21350
- if (_instanceof$c(next, Tree)) {
21351
+ if (_instanceof$b(next, Tree)) {
21351
21352
  if (start == pos) {
21352
21353
  if (start < this.safeFrom) return null;
21353
21354
  var end = start + next.length;
@@ -21402,7 +21403,7 @@ var TokenCache = /*#__PURE__*/ function() {
21402
21403
  token.mask = mask;
21403
21404
  token.context = context;
21404
21405
  }
21405
- if (token.lookAhead > token.end + 25 /* Safety.Margin */ ) lookAhead = Math.max(token.lookAhead, lookAhead);
21406
+ if (token.lookAhead > token.end + 25 /* Lookahead.Margin */ ) lookAhead = Math.max(token.lookAhead, lookAhead);
21406
21407
  if (token.value != 0 /* Term.Err */ ) {
21407
21408
  var startIndex = actionIndex;
21408
21409
  if (token.extended > -1) actionIndex = this.addActions(stack, token.extended, token.end, actionIndex);
@@ -21650,9 +21651,9 @@ var Parse = /*#__PURE__*/ function() {
21650
21651
  if (verbose) console.log(base + this.stackID(stack) + " (via reuse of ".concat(parser.getName(cached.type.id), ")"));
21651
21652
  return true;
21652
21653
  }
21653
- if (!_instanceof$c(cached, Tree) || cached.children.length == 0 || cached.positions[0] > 0) break;
21654
+ if (!_instanceof$b(cached, Tree) || cached.children.length == 0 || cached.positions[0] > 0) break;
21654
21655
  var inner = cached.children[0];
21655
- if (_instanceof$c(inner, Tree) && cached.positions[0] == 0) cached = inner;
21656
+ if (_instanceof$b(inner, Tree) && cached.positions[0] == 0) cached = inner;
21656
21657
  else break;
21657
21658
  }
21658
21659
  }
@@ -23226,7 +23227,7 @@ function _define_property$1(obj, key, value) {
23226
23227
  }
23227
23228
  return obj;
23228
23229
  }
23229
- function _instanceof$b(left, right) {
23230
+ function _instanceof$a(left, right) {
23230
23231
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
23231
23232
  return !!right[Symbol.hasInstance](left);
23232
23233
  } else {
@@ -23493,14 +23494,14 @@ function indent(str, spaces) {
23493
23494
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23494
23495
  // match is required
23495
23496
  if (!match) {
23496
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23497
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23497
23498
  v: nextMatch1
23498
23499
  };
23499
23500
  }
23500
23501
  var token = match.token, offset = match.offset;
23501
23502
  i1 += offset;
23502
23503
  if (token === " ") {
23503
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23504
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23504
23505
  }
23505
23506
  tokens1 = _to_consumable_array$3(tokens1).concat([
23506
23507
  token
@@ -23519,7 +23520,7 @@ function indent(str, spaces) {
23519
23520
  if (contextKeys.some(function(el) {
23520
23521
  return el.startsWith(name);
23521
23522
  })) {
23522
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23523
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23523
23524
  }
23524
23525
  if (dateTimeIdentifiers.some(function(el) {
23525
23526
  return el === name;
@@ -23538,9 +23539,9 @@ function indent(str, spaces) {
23538
23539
  if (dateTimeIdentifiers.some(function(el) {
23539
23540
  return el.startsWith(name);
23540
23541
  })) {
23541
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23542
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23542
23543
  }
23543
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23544
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23544
23545
  v: nextMatch1
23545
23546
  };
23546
23547
  };
@@ -23703,7 +23704,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23703
23704
  * @param {any} value
23704
23705
  * @returns {Boolean}
23705
23706
  */ function isAtomic(value) {
23706
- return !value || _instanceof$b(value, this) || _instanceof$b(value, ValueProducer) || typeof value !== "object";
23707
+ return !value || _instanceof$a(value, this) || _instanceof$a(value, ValueProducer) || typeof value !== "object";
23707
23708
  }
23708
23709
  },
23709
23710
  {
@@ -23722,7 +23723,7 @@ var dateTimeIdentifiers = Object.keys(dateTimeLiterals);
23722
23723
  if (!context || typeof context !== "object") {
23723
23724
  return {};
23724
23725
  }
23725
- if (_instanceof$b(context, _this)) {
23726
+ if (_instanceof$a(context, _this)) {
23726
23727
  return context.value;
23727
23728
  }
23728
23729
  return _object_spread({}, context);
@@ -23841,7 +23842,7 @@ var Variables = /*#__PURE__*/ function() {
23841
23842
  return undefined;
23842
23843
  }
23843
23844
  var val = this.context.get(contextKey);
23844
- if (_instanceof$b(val, ValueProducer)) {
23845
+ if (_instanceof$a(val, ValueProducer)) {
23845
23846
  return val.get(this);
23846
23847
  } else {
23847
23848
  return val;
@@ -24343,6 +24344,7 @@ var parser = LRParser.deserialize({
24343
24344
  },
24344
24345
  dynamicPrecedences: {
24345
24346
  "31": -1,
24347
+ "67": 1,
24346
24348
  "71": -1,
24347
24349
  "73": -1
24348
24350
  },
@@ -24442,7 +24444,7 @@ function _inherits(subClass, superClass) {
24442
24444
  });
24443
24445
  if (superClass) _set_prototype_of(subClass, superClass);
24444
24446
  }
24445
- function _instanceof$a(left, right) {
24447
+ function _instanceof$9(left, right) {
24446
24448
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
24447
24449
  return !!right[Symbol.hasInstance](left);
24448
24450
  } else {
@@ -24615,10 +24617,10 @@ function getType(e) {
24615
24617
  }
24616
24618
  return "date time";
24617
24619
  }
24618
- if (_instanceof$a(e, Range$c)) {
24620
+ if (_instanceof$9(e, Range$c)) {
24619
24621
  return "range";
24620
24622
  }
24621
- if (_instanceof$a(e, FunctionWrapper)) {
24623
+ if (_instanceof$9(e, FunctionWrapper)) {
24622
24624
  return "function";
24623
24625
  }
24624
24626
  return "literal";
@@ -25880,13 +25882,13 @@ function createArgsValidator(argDefinitions) {
25880
25882
  * @param {Range|number} a
25881
25883
  * @param {Range|number} b
25882
25884
  */ function before$1(a, b) {
25883
- if (_instanceof$a(a, Range$c) && _instanceof$a(b, Range$c)) {
25885
+ if (_instanceof$9(a, Range$c) && _instanceof$9(b, Range$c)) {
25884
25886
  return a.end < b.start || (!a["end included"] || !b["start included"]) && a.end == b.start;
25885
25887
  }
25886
- if (_instanceof$a(a, Range$c)) {
25888
+ if (_instanceof$9(a, Range$c)) {
25887
25889
  return a.end < b || !a["end included"] && a.end === b;
25888
25890
  }
25889
- if (_instanceof$a(b, Range$c)) {
25891
+ if (_instanceof$9(b, Range$c)) {
25890
25892
  return b.start > a || !b["start included"] && b.start === a;
25891
25893
  }
25892
25894
  return a < b;
@@ -26552,7 +26554,7 @@ function evalNode(node, input, args) {
26552
26554
  return tag(function(context) {
26553
26555
  var a = args[0](context);
26554
26556
  var b = args[3](context);
26555
- return _instanceof$a(a, b);
26557
+ return _instanceof$9(a, b);
26556
26558
  }, Test("boolean"));
26557
26559
  case "every":
26558
26560
  return tag(function(context) {
@@ -26829,7 +26831,7 @@ function evalNode(node, input, args) {
26829
26831
  if (typeof result === "function") {
26830
26832
  result = result(el);
26831
26833
  }
26832
- if (_instanceof$a(result, Range$c)) {
26834
+ if (_instanceof$9(result, Range$c)) {
26833
26835
  result = result.includes(el);
26834
26836
  }
26835
26837
  if (result === true) {
@@ -26931,7 +26933,7 @@ function compareValue(test, value) {
26931
26933
  if (typeof test === "function") {
26932
26934
  return test(value);
26933
26935
  }
26934
- if (_instanceof$a(test, Range$c)) {
26936
+ if (_instanceof$9(test, Range$c)) {
26935
26937
  return test.includes(value);
26936
26938
  }
26937
26939
  return equals(test, value);
@@ -27232,10 +27234,10 @@ function Test(type) {
27232
27234
  if (!fn) {
27233
27235
  return null;
27234
27236
  }
27235
- if (_instanceof$a(fn, FunctionWrapper)) {
27237
+ if (_instanceof$9(fn, FunctionWrapper)) {
27236
27238
  return fn;
27237
27239
  }
27238
- if (_instanceof$a(fn, Range$c)) {
27240
+ if (_instanceof$9(fn, Range$c)) {
27239
27241
  return new FunctionWrapper(function(value) {
27240
27242
  return fn.includes(value);
27241
27243
  }, [
@@ -27344,7 +27346,9 @@ const applyTemplate = (value, context)=>{
27344
27346
  result = template(context);
27345
27347
  if (result.startsWith('EVALUATE:')) {
27346
27348
  const path = result.replace(/^EVALUATE:/, '');
27347
- result = evaluate(path, context);
27349
+ result = evaluate(path, _extends({}, context, {
27350
+ getTime: (time)=>new Date(time).getTime()
27351
+ }));
27348
27352
  }
27349
27353
  } else if (typeof value === 'object' && Array.isArray(value)) {
27350
27354
  result = value.map((item)=>isPinsSettings(item) ? item : applyTemplate(item, context));
@@ -28730,7 +28734,7 @@ function _create_class$3(Constructor, protoProps, staticProps) {
28730
28734
  if (staticProps) _defineProperties$3(Constructor, staticProps);
28731
28735
  return Constructor;
28732
28736
  }
28733
- function _instanceof$9(left, right) {
28737
+ function _instanceof$8(left, right) {
28734
28738
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
28735
28739
  return !!right[Symbol.hasInstance](left);
28736
28740
  } else {
@@ -28750,7 +28754,7 @@ var SemVer$f = /*#__PURE__*/ function() {
28750
28754
  function SemVer(version, options) {
28751
28755
  _class_call_check$3(this, SemVer);
28752
28756
  options = parseOptions$2(options);
28753
- if (_instanceof$9(version, SemVer)) {
28757
+ if (_instanceof$8(version, SemVer)) {
28754
28758
  if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
28755
28759
  return version;
28756
28760
  } else {
@@ -28824,7 +28828,7 @@ var SemVer$f = /*#__PURE__*/ function() {
28824
28828
  key: "compare",
28825
28829
  value: function compare(other) {
28826
28830
  debug$2("SemVer.compare", this.version, this.options, other);
28827
- if (!_instanceof$9(other, SemVer)) {
28831
+ if (!_instanceof$8(other, SemVer)) {
28828
28832
  if (typeof other === "string" && other === this.version) {
28829
28833
  return 0;
28830
28834
  }
@@ -28839,7 +28843,7 @@ var SemVer$f = /*#__PURE__*/ function() {
28839
28843
  {
28840
28844
  key: "compareMain",
28841
28845
  value: function compareMain(other) {
28842
- if (!_instanceof$9(other, SemVer)) {
28846
+ if (!_instanceof$8(other, SemVer)) {
28843
28847
  other = new SemVer(other, this.options);
28844
28848
  }
28845
28849
  return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
@@ -28848,7 +28852,7 @@ var SemVer$f = /*#__PURE__*/ function() {
28848
28852
  {
28849
28853
  key: "comparePre",
28850
28854
  value: function comparePre(other) {
28851
- if (!_instanceof$9(other, SemVer)) {
28855
+ if (!_instanceof$8(other, SemVer)) {
28852
28856
  other = new SemVer(other, this.options);
28853
28857
  }
28854
28858
  // NOT having a prerelease is > having one
@@ -28881,14 +28885,14 @@ var SemVer$f = /*#__PURE__*/ function() {
28881
28885
  {
28882
28886
  key: "compareBuild",
28883
28887
  value: function compareBuild(other) {
28884
- if (!_instanceof$9(other, SemVer)) {
28888
+ if (!_instanceof$8(other, SemVer)) {
28885
28889
  other = new SemVer(other, this.options);
28886
28890
  }
28887
28891
  var i = 0;
28888
28892
  do {
28889
28893
  var a = this.build[i];
28890
28894
  var b = other.build[i];
28891
- debug$2("prerelease compare", i, a, b);
28895
+ debug$2("build compare", i, a, b);
28892
28896
  if (a === undefined && b === undefined) {
28893
28897
  return 0;
28894
28898
  } else if (b === undefined) {
@@ -29036,7 +29040,7 @@ var SemVer$f = /*#__PURE__*/ function() {
29036
29040
  }();
29037
29041
  var semver$4 = SemVer$f;
29038
29042
 
29039
- function _instanceof$8(left, right) {
29043
+ function _instanceof$7(left, right) {
29040
29044
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
29041
29045
  return !!right[Symbol.hasInstance](left);
29042
29046
  } else {
@@ -29046,7 +29050,7 @@ function _instanceof$8(left, right) {
29046
29050
  var SemVer$e = semver$4;
29047
29051
  var parse$6 = function(version, options) {
29048
29052
  var throwErrors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
29049
- if (_instanceof$8(version, SemVer$e)) {
29053
+ if (_instanceof$7(version, SemVer$e)) {
29050
29054
  return version;
29051
29055
  }
29052
29056
  try {
@@ -29074,7 +29078,7 @@ var clean$1 = function(version, options) {
29074
29078
  };
29075
29079
  var clean_1 = clean$1;
29076
29080
 
29077
- function _instanceof$7(left, right) {
29081
+ function _instanceof$6(left, right) {
29078
29082
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
29079
29083
  return !!right[Symbol.hasInstance](left);
29080
29084
  } else {
@@ -29089,7 +29093,7 @@ var inc$1 = function(version, release, options, identifier, identifierBase) {
29089
29093
  options = undefined;
29090
29094
  }
29091
29095
  try {
29092
- return new SemVer$d(_instanceof$7(version, SemVer$d) ? version.version : version, options).inc(release, identifier, identifierBase).version;
29096
+ return new SemVer$d(_instanceof$6(version, SemVer$d) ? version.version : version, options).inc(release, identifier, identifierBase).version;
29093
29097
  } catch (er) {
29094
29098
  return null;
29095
29099
  }
@@ -29294,7 +29298,7 @@ var cmp$2 = function(a, op, b, loose) {
29294
29298
  };
29295
29299
  var cmp_1 = cmp$2;
29296
29300
 
29297
- function _instanceof$6(left, right) {
29301
+ function _instanceof$5(left, right) {
29298
29302
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
29299
29303
  return !!right[Symbol.hasInstance](left);
29300
29304
  } else {
@@ -29305,7 +29309,7 @@ var SemVer$7 = semver$4;
29305
29309
  var parse$1 = parse_1;
29306
29310
  var _require$4 = re$4.exports, re$2 = _require$4.safeRe, t$2 = _require$4.t;
29307
29311
  var coerce$1 = function(version, options) {
29308
- if (_instanceof$6(version, SemVer$7)) {
29312
+ if (_instanceof$5(version, SemVer$7)) {
29309
29313
  return version;
29310
29314
  }
29311
29315
  if (typeof version === "number") {
@@ -29351,511 +29355,6 @@ var coerce$1 = function(version, options) {
29351
29355
  };
29352
29356
  var coerce_1 = coerce$1;
29353
29357
 
29354
- function _ts_generator(thisArg, body) {
29355
- var f, y, t, g, _ = {
29356
- label: 0,
29357
- sent: function() {
29358
- if (t[0] & 1) throw t[1];
29359
- return t[1];
29360
- },
29361
- trys: [],
29362
- ops: []
29363
- };
29364
- return g = {
29365
- next: verb(0),
29366
- "throw": verb(1),
29367
- "return": verb(2)
29368
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
29369
- return this;
29370
- }), g;
29371
- function verb(n) {
29372
- return function(v) {
29373
- return step([
29374
- n,
29375
- v
29376
- ]);
29377
- };
29378
- }
29379
- function step(op) {
29380
- if (f) throw new TypeError("Generator is already executing.");
29381
- while(_)try {
29382
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29383
- if (y = 0, t) op = [
29384
- op[0] & 2,
29385
- t.value
29386
- ];
29387
- switch(op[0]){
29388
- case 0:
29389
- case 1:
29390
- t = op;
29391
- break;
29392
- case 4:
29393
- _.label++;
29394
- return {
29395
- value: op[1],
29396
- done: false
29397
- };
29398
- case 5:
29399
- _.label++;
29400
- y = op[1];
29401
- op = [
29402
- 0
29403
- ];
29404
- continue;
29405
- case 7:
29406
- op = _.ops.pop();
29407
- _.trys.pop();
29408
- continue;
29409
- default:
29410
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
29411
- _ = 0;
29412
- continue;
29413
- }
29414
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
29415
- _.label = op[1];
29416
- break;
29417
- }
29418
- if (op[0] === 6 && _.label < t[1]) {
29419
- _.label = t[1];
29420
- t = op;
29421
- break;
29422
- }
29423
- if (t && _.label < t[2]) {
29424
- _.label = t[2];
29425
- _.ops.push(op);
29426
- break;
29427
- }
29428
- if (t[2]) _.ops.pop();
29429
- _.trys.pop();
29430
- continue;
29431
- }
29432
- op = body.call(thisArg, _);
29433
- } catch (e) {
29434
- op = [
29435
- 6,
29436
- e
29437
- ];
29438
- y = 0;
29439
- } finally{
29440
- f = t = 0;
29441
- }
29442
- if (op[0] & 5) throw op[1];
29443
- return {
29444
- value: op[0] ? op[1] : void 0,
29445
- done: true
29446
- };
29447
- }
29448
- }
29449
- var iterator = function(Yallist) {
29450
- Yallist.prototype[Symbol.iterator] = function() {
29451
- var walker;
29452
- return _ts_generator(this, function(_state) {
29453
- switch(_state.label){
29454
- case 0:
29455
- walker = this.head;
29456
- _state.label = 1;
29457
- case 1:
29458
- if (!walker) return [
29459
- 3,
29460
- 4
29461
- ];
29462
- return [
29463
- 4,
29464
- walker.value
29465
- ];
29466
- case 2:
29467
- _state.sent();
29468
- _state.label = 3;
29469
- case 3:
29470
- walker = walker.next;
29471
- return [
29472
- 3,
29473
- 1
29474
- ];
29475
- case 4:
29476
- return [
29477
- 2
29478
- ];
29479
- }
29480
- });
29481
- };
29482
- };
29483
-
29484
- function _instanceof$5(left, right) {
29485
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
29486
- return !!right[Symbol.hasInstance](left);
29487
- } else {
29488
- return left instanceof right;
29489
- }
29490
- }
29491
- var yallist = Yallist$1;
29492
- Yallist$1.Node = Node;
29493
- Yallist$1.create = Yallist$1;
29494
- function Yallist$1(list) {
29495
- var self = this;
29496
- if (!_instanceof$5(self, Yallist$1)) {
29497
- self = new Yallist$1();
29498
- }
29499
- self.tail = null;
29500
- self.head = null;
29501
- self.length = 0;
29502
- if (list && typeof list.forEach === "function") {
29503
- list.forEach(function(item) {
29504
- self.push(item);
29505
- });
29506
- } else if (arguments.length > 0) {
29507
- for(var i = 0, l = arguments.length; i < l; i++){
29508
- self.push(arguments[i]);
29509
- }
29510
- }
29511
- return self;
29512
- }
29513
- Yallist$1.prototype.removeNode = function(node) {
29514
- if (node.list !== this) {
29515
- throw new Error("removing node which does not belong to this list");
29516
- }
29517
- var next = node.next;
29518
- var prev = node.prev;
29519
- if (next) {
29520
- next.prev = prev;
29521
- }
29522
- if (prev) {
29523
- prev.next = next;
29524
- }
29525
- if (node === this.head) {
29526
- this.head = next;
29527
- }
29528
- if (node === this.tail) {
29529
- this.tail = prev;
29530
- }
29531
- node.list.length--;
29532
- node.next = null;
29533
- node.prev = null;
29534
- node.list = null;
29535
- return next;
29536
- };
29537
- Yallist$1.prototype.unshiftNode = function(node) {
29538
- if (node === this.head) {
29539
- return;
29540
- }
29541
- if (node.list) {
29542
- node.list.removeNode(node);
29543
- }
29544
- var head = this.head;
29545
- node.list = this;
29546
- node.next = head;
29547
- if (head) {
29548
- head.prev = node;
29549
- }
29550
- this.head = node;
29551
- if (!this.tail) {
29552
- this.tail = node;
29553
- }
29554
- this.length++;
29555
- };
29556
- Yallist$1.prototype.pushNode = function(node) {
29557
- if (node === this.tail) {
29558
- return;
29559
- }
29560
- if (node.list) {
29561
- node.list.removeNode(node);
29562
- }
29563
- var tail = this.tail;
29564
- node.list = this;
29565
- node.prev = tail;
29566
- if (tail) {
29567
- tail.next = node;
29568
- }
29569
- this.tail = node;
29570
- if (!this.head) {
29571
- this.head = node;
29572
- }
29573
- this.length++;
29574
- };
29575
- Yallist$1.prototype.push = function() {
29576
- for(var i = 0, l = arguments.length; i < l; i++){
29577
- push(this, arguments[i]);
29578
- }
29579
- return this.length;
29580
- };
29581
- Yallist$1.prototype.unshift = function() {
29582
- for(var i = 0, l = arguments.length; i < l; i++){
29583
- unshift(this, arguments[i]);
29584
- }
29585
- return this.length;
29586
- };
29587
- Yallist$1.prototype.pop = function() {
29588
- if (!this.tail) {
29589
- return undefined;
29590
- }
29591
- var res = this.tail.value;
29592
- this.tail = this.tail.prev;
29593
- if (this.tail) {
29594
- this.tail.next = null;
29595
- } else {
29596
- this.head = null;
29597
- }
29598
- this.length--;
29599
- return res;
29600
- };
29601
- Yallist$1.prototype.shift = function() {
29602
- if (!this.head) {
29603
- return undefined;
29604
- }
29605
- var res = this.head.value;
29606
- this.head = this.head.next;
29607
- if (this.head) {
29608
- this.head.prev = null;
29609
- } else {
29610
- this.tail = null;
29611
- }
29612
- this.length--;
29613
- return res;
29614
- };
29615
- Yallist$1.prototype.forEach = function(fn, thisp) {
29616
- thisp = thisp || this;
29617
- for(var walker = this.head, i = 0; walker !== null; i++){
29618
- fn.call(thisp, walker.value, i, this);
29619
- walker = walker.next;
29620
- }
29621
- };
29622
- Yallist$1.prototype.forEachReverse = function(fn, thisp) {
29623
- thisp = thisp || this;
29624
- for(var walker = this.tail, i = this.length - 1; walker !== null; i--){
29625
- fn.call(thisp, walker.value, i, this);
29626
- walker = walker.prev;
29627
- }
29628
- };
29629
- Yallist$1.prototype.get = function(n) {
29630
- for(var i = 0, walker = this.head; walker !== null && i < n; i++){
29631
- // abort out of the list early if we hit a cycle
29632
- walker = walker.next;
29633
- }
29634
- if (i === n && walker !== null) {
29635
- return walker.value;
29636
- }
29637
- };
29638
- Yallist$1.prototype.getReverse = function(n) {
29639
- for(var i = 0, walker = this.tail; walker !== null && i < n; i++){
29640
- // abort out of the list early if we hit a cycle
29641
- walker = walker.prev;
29642
- }
29643
- if (i === n && walker !== null) {
29644
- return walker.value;
29645
- }
29646
- };
29647
- Yallist$1.prototype.map = function(fn, thisp) {
29648
- thisp = thisp || this;
29649
- var res = new Yallist$1();
29650
- for(var walker = this.head; walker !== null;){
29651
- res.push(fn.call(thisp, walker.value, this));
29652
- walker = walker.next;
29653
- }
29654
- return res;
29655
- };
29656
- Yallist$1.prototype.mapReverse = function(fn, thisp) {
29657
- thisp = thisp || this;
29658
- var res = new Yallist$1();
29659
- for(var walker = this.tail; walker !== null;){
29660
- res.push(fn.call(thisp, walker.value, this));
29661
- walker = walker.prev;
29662
- }
29663
- return res;
29664
- };
29665
- Yallist$1.prototype.reduce = function(fn, initial) {
29666
- var acc;
29667
- var walker = this.head;
29668
- if (arguments.length > 1) {
29669
- acc = initial;
29670
- } else if (this.head) {
29671
- walker = this.head.next;
29672
- acc = this.head.value;
29673
- } else {
29674
- throw new TypeError("Reduce of empty list with no initial value");
29675
- }
29676
- for(var i = 0; walker !== null; i++){
29677
- acc = fn(acc, walker.value, i);
29678
- walker = walker.next;
29679
- }
29680
- return acc;
29681
- };
29682
- Yallist$1.prototype.reduceReverse = function(fn, initial) {
29683
- var acc;
29684
- var walker = this.tail;
29685
- if (arguments.length > 1) {
29686
- acc = initial;
29687
- } else if (this.tail) {
29688
- walker = this.tail.prev;
29689
- acc = this.tail.value;
29690
- } else {
29691
- throw new TypeError("Reduce of empty list with no initial value");
29692
- }
29693
- for(var i = this.length - 1; walker !== null; i--){
29694
- acc = fn(acc, walker.value, i);
29695
- walker = walker.prev;
29696
- }
29697
- return acc;
29698
- };
29699
- Yallist$1.prototype.toArray = function() {
29700
- var arr = new Array(this.length);
29701
- for(var i = 0, walker = this.head; walker !== null; i++){
29702
- arr[i] = walker.value;
29703
- walker = walker.next;
29704
- }
29705
- return arr;
29706
- };
29707
- Yallist$1.prototype.toArrayReverse = function() {
29708
- var arr = new Array(this.length);
29709
- for(var i = 0, walker = this.tail; walker !== null; i++){
29710
- arr[i] = walker.value;
29711
- walker = walker.prev;
29712
- }
29713
- return arr;
29714
- };
29715
- Yallist$1.prototype.slice = function(from, to) {
29716
- to = to || this.length;
29717
- if (to < 0) {
29718
- to += this.length;
29719
- }
29720
- from = from || 0;
29721
- if (from < 0) {
29722
- from += this.length;
29723
- }
29724
- var ret = new Yallist$1();
29725
- if (to < from || to < 0) {
29726
- return ret;
29727
- }
29728
- if (from < 0) {
29729
- from = 0;
29730
- }
29731
- if (to > this.length) {
29732
- to = this.length;
29733
- }
29734
- for(var i = 0, walker = this.head; walker !== null && i < from; i++){
29735
- walker = walker.next;
29736
- }
29737
- for(; walker !== null && i < to; i++, walker = walker.next){
29738
- ret.push(walker.value);
29739
- }
29740
- return ret;
29741
- };
29742
- Yallist$1.prototype.sliceReverse = function(from, to) {
29743
- to = to || this.length;
29744
- if (to < 0) {
29745
- to += this.length;
29746
- }
29747
- from = from || 0;
29748
- if (from < 0) {
29749
- from += this.length;
29750
- }
29751
- var ret = new Yallist$1();
29752
- if (to < from || to < 0) {
29753
- return ret;
29754
- }
29755
- if (from < 0) {
29756
- from = 0;
29757
- }
29758
- if (to > this.length) {
29759
- to = this.length;
29760
- }
29761
- for(var i = this.length, walker = this.tail; walker !== null && i > to; i--){
29762
- walker = walker.prev;
29763
- }
29764
- for(; walker !== null && i > from; i--, walker = walker.prev){
29765
- ret.push(walker.value);
29766
- }
29767
- return ret;
29768
- };
29769
- Yallist$1.prototype.splice = function(start, deleteCount) {
29770
- for(var _len = arguments.length, nodes = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
29771
- nodes[_key - 2] = arguments[_key];
29772
- }
29773
- if (start > this.length) {
29774
- start = this.length - 1;
29775
- }
29776
- if (start < 0) {
29777
- start = this.length + start;
29778
- }
29779
- for(var i = 0, walker = this.head; walker !== null && i < start; i++){
29780
- walker = walker.next;
29781
- }
29782
- var ret = [];
29783
- for(var i = 0; walker && i < deleteCount; i++){
29784
- ret.push(walker.value);
29785
- walker = this.removeNode(walker);
29786
- }
29787
- if (walker === null) {
29788
- walker = this.tail;
29789
- }
29790
- if (walker !== this.head && walker !== this.tail) {
29791
- walker = walker.prev;
29792
- }
29793
- for(var i = 0; i < nodes.length; i++){
29794
- walker = insert(this, walker, nodes[i]);
29795
- }
29796
- return ret;
29797
- };
29798
- Yallist$1.prototype.reverse = function() {
29799
- var head = this.head;
29800
- var tail = this.tail;
29801
- for(var walker = head; walker !== null; walker = walker.prev){
29802
- var p = walker.prev;
29803
- walker.prev = walker.next;
29804
- walker.next = p;
29805
- }
29806
- this.head = tail;
29807
- this.tail = head;
29808
- return this;
29809
- };
29810
- function insert(self, node, value) {
29811
- var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self);
29812
- if (inserted.next === null) {
29813
- self.tail = inserted;
29814
- }
29815
- if (inserted.prev === null) {
29816
- self.head = inserted;
29817
- }
29818
- self.length++;
29819
- return inserted;
29820
- }
29821
- function push(self, item) {
29822
- self.tail = new Node(item, self.tail, null, self);
29823
- if (!self.head) {
29824
- self.head = self.tail;
29825
- }
29826
- self.length++;
29827
- }
29828
- function unshift(self, item) {
29829
- self.head = new Node(item, null, self.head, self);
29830
- if (!self.tail) {
29831
- self.tail = self.head;
29832
- }
29833
- self.length++;
29834
- }
29835
- function Node(value, prev, next, list) {
29836
- if (!_instanceof$5(this, Node)) {
29837
- return new Node(value, prev, next, list);
29838
- }
29839
- this.list = list;
29840
- this.value = value;
29841
- if (prev) {
29842
- prev.next = this;
29843
- this.prev = prev;
29844
- } else {
29845
- this.prev = null;
29846
- }
29847
- if (next) {
29848
- next.prev = this;
29849
- this.next = next;
29850
- } else {
29851
- this.next = null;
29852
- }
29853
- }
29854
- try {
29855
- // add if support for Symbol.iterator is present
29856
- iterator(Yallist$1);
29857
- } catch (er) {}
29858
-
29859
29358
  function _class_call_check$2(instance, Constructor) {
29860
29359
  if (!(instance instanceof Constructor)) {
29861
29360
  throw new TypeError("Cannot call a class as a function");
@@ -29875,361 +29374,53 @@ function _create_class$2(Constructor, protoProps, staticProps) {
29875
29374
  if (staticProps) _defineProperties$2(Constructor, staticProps);
29876
29375
  return Constructor;
29877
29376
  }
29878
- // A linked list to keep track of recently-used-ness
29879
- var Yallist = yallist;
29880
- var MAX = Symbol("max");
29881
- var LENGTH = Symbol("length");
29882
- var LENGTH_CALCULATOR = Symbol("lengthCalculator");
29883
- var ALLOW_STALE = Symbol("allowStale");
29884
- var MAX_AGE = Symbol("maxAge");
29885
- var DISPOSE = Symbol("dispose");
29886
- var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
29887
- var LRU_LIST = Symbol("lruList");
29888
- var CACHE = Symbol("cache");
29889
- var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
29890
- var naiveLength = function() {
29891
- return 1;
29892
- };
29893
- // lruList is a yallist where the head is the youngest
29894
- // item, and the tail is the oldest. the list contains the Hit
29895
- // objects as the entries.
29896
- // Each Hit object has a reference to its Yallist.Node. This
29897
- // never changes.
29898
- //
29899
- // cache is a Map (or PseudoMap) that matches the keys to
29900
- // the Yallist.Node object.
29901
29377
  var LRUCache = /*#__PURE__*/ function() {
29902
- function LRUCache(options) {
29378
+ function LRUCache() {
29903
29379
  _class_call_check$2(this, LRUCache);
29904
- if (typeof options === "number") options = {
29905
- max: options
29906
- };
29907
- if (!options) options = {};
29908
- if (options.max && (typeof options.max !== "number" || options.max < 0)) throw new TypeError("max must be a non-negative number");
29909
- // Kind of weird to have a default max of Infinity, but oh well.
29910
- this[MAX] = options.max || Infinity;
29911
- var lc = options.length || naiveLength;
29912
- this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
29913
- this[ALLOW_STALE] = options.stale || false;
29914
- if (options.maxAge && typeof options.maxAge !== "number") throw new TypeError("maxAge must be a number");
29915
- this[MAX_AGE] = options.maxAge || 0;
29916
- this[DISPOSE] = options.dispose;
29917
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
29918
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
29919
- this.reset();
29380
+ this.max = 1000;
29381
+ this.map = new Map();
29920
29382
  }
29921
29383
  _create_class$2(LRUCache, [
29922
29384
  {
29923
- key: "max",
29924
- get: function get() {
29925
- return this[MAX];
29926
- },
29927
- set: // resize the cache when the max changes.
29928
- function set(mL) {
29929
- if (typeof mL !== "number" || mL < 0) throw new TypeError("max must be a non-negative number");
29930
- this[MAX] = mL || Infinity;
29931
- trim(this);
29932
- }
29933
- },
29934
- {
29935
- key: "allowStale",
29936
- get: function get() {
29937
- return this[ALLOW_STALE];
29938
- },
29939
- set: function set(allowStale) {
29940
- this[ALLOW_STALE] = !!allowStale;
29941
- }
29942
- },
29943
- {
29944
- key: "maxAge",
29945
- get: function get() {
29946
- return this[MAX_AGE];
29947
- },
29948
- set: function set(mA) {
29949
- if (typeof mA !== "number") throw new TypeError("maxAge must be a non-negative number");
29950
- this[MAX_AGE] = mA;
29951
- trim(this);
29952
- }
29953
- },
29954
- {
29955
- key: "lengthCalculator",
29956
- get: function get() {
29957
- return this[LENGTH_CALCULATOR];
29958
- },
29959
- set: // resize the cache when the lengthCalculator changes.
29960
- function set(lC) {
29961
- var _this = this;
29962
- if (typeof lC !== "function") lC = naiveLength;
29963
- if (lC !== this[LENGTH_CALCULATOR]) {
29964
- this[LENGTH_CALCULATOR] = lC;
29965
- this[LENGTH] = 0;
29966
- this[LRU_LIST].forEach(function(hit) {
29967
- hit.length = _this[LENGTH_CALCULATOR](hit.value, hit.key);
29968
- _this[LENGTH] += hit.length;
29969
- });
29970
- }
29971
- trim(this);
29972
- }
29973
- },
29974
- {
29975
- key: "length",
29976
- get: function get() {
29977
- return this[LENGTH];
29978
- }
29979
- },
29980
- {
29981
- key: "itemCount",
29982
- get: function get() {
29983
- return this[LRU_LIST].length;
29984
- }
29985
- },
29986
- {
29987
- key: "rforEach",
29988
- value: function rforEach(fn, thisp) {
29989
- thisp = thisp || this;
29990
- for(var walker = this[LRU_LIST].tail; walker !== null;){
29991
- var prev = walker.prev;
29992
- forEachStep(this, fn, walker, thisp);
29993
- walker = prev;
29994
- }
29995
- }
29996
- },
29997
- {
29998
- key: "forEach",
29999
- value: function forEach(fn, thisp) {
30000
- thisp = thisp || this;
30001
- for(var walker = this[LRU_LIST].head; walker !== null;){
30002
- var next = walker.next;
30003
- forEachStep(this, fn, walker, thisp);
30004
- walker = next;
30005
- }
30006
- }
30007
- },
30008
- {
30009
- key: "keys",
30010
- value: function keys() {
30011
- return this[LRU_LIST].toArray().map(function(k) {
30012
- return k.key;
30013
- });
30014
- }
30015
- },
30016
- {
30017
- key: "values",
30018
- value: function values() {
30019
- return this[LRU_LIST].toArray().map(function(k) {
30020
- return k.value;
30021
- });
30022
- }
30023
- },
30024
- {
30025
- key: "reset",
30026
- value: function reset() {
30027
- var _this = this;
30028
- if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
30029
- this[LRU_LIST].forEach(function(hit) {
30030
- return _this[DISPOSE](hit.key, hit.value);
30031
- });
29385
+ key: "get",
29386
+ value: function get(key) {
29387
+ var value = this.map.get(key);
29388
+ if (value === undefined) {
29389
+ return undefined;
29390
+ } else {
29391
+ // Remove the key from the map and add it to the end
29392
+ this.map.delete(key);
29393
+ this.map.set(key, value);
29394
+ return value;
30032
29395
  }
30033
- this[CACHE] = new Map() // hash of items by key
30034
- ;
30035
- this[LRU_LIST] = new Yallist() // list of items in order of use recency
30036
- ;
30037
- this[LENGTH] = 0 // length of items in the list
30038
- ;
30039
- }
30040
- },
30041
- {
30042
- key: "dump",
30043
- value: function dump() {
30044
- var _this = this;
30045
- return this[LRU_LIST].map(function(hit) {
30046
- return isStale(_this, hit) ? false : {
30047
- k: hit.key,
30048
- v: hit.value,
30049
- e: hit.now + (hit.maxAge || 0)
30050
- };
30051
- }).toArray().filter(function(h) {
30052
- return h;
30053
- });
30054
29396
  }
30055
29397
  },
30056
29398
  {
30057
- key: "dumpLru",
30058
- value: function dumpLru() {
30059
- return this[LRU_LIST];
29399
+ key: "delete",
29400
+ value: function _delete(key) {
29401
+ return this.map.delete(key);
30060
29402
  }
30061
29403
  },
30062
29404
  {
30063
29405
  key: "set",
30064
- value: function set(key, value, maxAge) {
30065
- maxAge = maxAge || this[MAX_AGE];
30066
- if (maxAge && typeof maxAge !== "number") throw new TypeError("maxAge must be a number");
30067
- var now = maxAge ? Date.now() : 0;
30068
- var len = this[LENGTH_CALCULATOR](value, key);
30069
- if (this[CACHE].has(key)) {
30070
- if (len > this[MAX]) {
30071
- del(this, this[CACHE].get(key));
30072
- return false;
30073
- }
30074
- var node = this[CACHE].get(key);
30075
- var item = node.value;
30076
- // dispose of the old one before overwriting
30077
- // split out into 2 ifs for better coverage tracking
30078
- if (this[DISPOSE]) {
30079
- if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value);
30080
- }
30081
- item.now = now;
30082
- item.maxAge = maxAge;
30083
- item.value = value;
30084
- this[LENGTH] += len - item.length;
30085
- item.length = len;
30086
- this.get(key);
30087
- trim(this);
30088
- return true;
30089
- }
30090
- var hit = new Entry(key, value, len, now, maxAge);
30091
- // oversized objects fall out of cache automatically.
30092
- if (hit.length > this[MAX]) {
30093
- if (this[DISPOSE]) this[DISPOSE](key, value);
30094
- return false;
30095
- }
30096
- this[LENGTH] += hit.length;
30097
- this[LRU_LIST].unshift(hit);
30098
- this[CACHE].set(key, this[LRU_LIST].head);
30099
- trim(this);
30100
- return true;
30101
- }
30102
- },
30103
- {
30104
- key: "has",
30105
- value: function has(key) {
30106
- if (!this[CACHE].has(key)) return false;
30107
- var hit = this[CACHE].get(key).value;
30108
- return !isStale(this, hit);
30109
- }
30110
- },
30111
- {
30112
- key: "get",
30113
- value: function get1(key) {
30114
- return get(this, key, true);
30115
- }
30116
- },
30117
- {
30118
- key: "peek",
30119
- value: function peek(key) {
30120
- return get(this, key, false);
30121
- }
30122
- },
30123
- {
30124
- key: "pop",
30125
- value: function pop() {
30126
- var node = this[LRU_LIST].tail;
30127
- if (!node) return null;
30128
- del(this, node);
30129
- return node.value;
30130
- }
30131
- },
30132
- {
30133
- key: "del",
30134
- value: function del1(key) {
30135
- del(this, this[CACHE].get(key));
30136
- }
30137
- },
30138
- {
30139
- key: "load",
30140
- value: function load(arr) {
30141
- // reset the cache
30142
- this.reset();
30143
- var now = Date.now();
30144
- // A previous serialized cache has the most recent items first
30145
- for(var l = arr.length - 1; l >= 0; l--){
30146
- var hit = arr[l];
30147
- var expiresAt = hit.e || 0;
30148
- if (expiresAt === 0) // the item was created without expiration in a non aged cache
30149
- this.set(hit.k, hit.v);
30150
- else {
30151
- var maxAge = expiresAt - now;
30152
- // dont add already expired items
30153
- if (maxAge > 0) {
30154
- this.set(hit.k, hit.v, maxAge);
30155
- }
29406
+ value: function set(key, value) {
29407
+ var deleted = this.delete(key);
29408
+ if (!deleted && value !== undefined) {
29409
+ // If cache is full, delete the least recently used item
29410
+ if (this.map.size >= this.max) {
29411
+ var firstKey = this.map.keys().next().value;
29412
+ this.delete(firstKey);
30156
29413
  }
29414
+ this.map.set(key, value);
30157
29415
  }
30158
- }
30159
- },
30160
- {
30161
- key: "prune",
30162
- value: function prune() {
30163
- var _this = this;
30164
- this[CACHE].forEach(function(value, key) {
30165
- return get(_this, key, false);
30166
- });
29416
+ return this;
30167
29417
  }
30168
29418
  }
30169
29419
  ]);
30170
29420
  return LRUCache;
30171
29421
  }();
30172
- var get = function(self, key, doUse) {
30173
- var node = self[CACHE].get(key);
30174
- if (node) {
30175
- var hit = node.value;
30176
- if (isStale(self, hit)) {
30177
- del(self, node);
30178
- if (!self[ALLOW_STALE]) return undefined;
30179
- } else {
30180
- if (doUse) {
30181
- if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now();
30182
- self[LRU_LIST].unshiftNode(node);
30183
- }
30184
- }
30185
- return hit.value;
30186
- }
30187
- };
30188
- var isStale = function(self, hit) {
30189
- if (!hit || !hit.maxAge && !self[MAX_AGE]) return false;
30190
- var diff = Date.now() - hit.now;
30191
- return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
30192
- };
30193
- var trim = function(self) {
30194
- if (self[LENGTH] > self[MAX]) {
30195
- for(var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;){
30196
- // We know that we're about to delete this one, and also
30197
- // what the next least recently used key will be, so just
30198
- // go ahead and set it now.
30199
- var prev = walker.prev;
30200
- del(self, walker);
30201
- walker = prev;
30202
- }
30203
- }
30204
- };
30205
- var del = function(self, node) {
30206
- if (node) {
30207
- var hit = node.value;
30208
- if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value);
30209
- self[LENGTH] -= hit.length;
30210
- self[CACHE].delete(hit.key);
30211
- self[LRU_LIST].removeNode(node);
30212
- }
30213
- };
30214
- var Entry = function Entry(key, value, length, now, maxAge) {
30215
- _class_call_check$2(this, Entry);
30216
- this.key = key;
30217
- this.value = value;
30218
- this.length = length;
30219
- this.now = now;
30220
- this.maxAge = maxAge || 0;
30221
- };
30222
- var forEachStep = function(self, fn, node, thisp) {
30223
- var hit = node.value;
30224
- if (isStale(self, hit)) {
30225
- del(self, node);
30226
- if (!self[ALLOW_STALE]) hit = undefined;
30227
- }
30228
- if (hit) fn.call(thisp, hit.value, hit.key, self);
30229
- };
30230
- var lruCache = LRUCache;
29422
+ var lrucache = LRUCache;
30231
29423
 
30232
- // hoisted class for cyclic dependency
30233
29424
  function _array_like_to_array$1(arr, len) {
30234
29425
  if (len == null || len > arr.length) len = arr.length;
30235
29426
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -30281,6 +29472,8 @@ function _unsupported_iterable_to_array$1(o, minLen) {
30281
29472
  if (n === "Map" || n === "Set") return Array.from(n);
30282
29473
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
30283
29474
  }
29475
+ var SPACE_CHARACTERS = /\s+/g;
29476
+ // hoisted class for cyclic dependency
30284
29477
  var Range$b = /*#__PURE__*/ function() {
30285
29478
  function Range(range, options) {
30286
29479
  var _this = this;
@@ -30301,7 +29494,7 @@ var Range$b = /*#__PURE__*/ function() {
30301
29494
  range
30302
29495
  ]
30303
29496
  ];
30304
- this.format();
29497
+ this.formatted = undefined;
30305
29498
  return this;
30306
29499
  }
30307
29500
  this.options = options;
@@ -30310,7 +29503,7 @@ var Range$b = /*#__PURE__*/ function() {
30310
29503
  // First reduce all whitespace as much as possible so we do not have to rely
30311
29504
  // on potentially slow regexes like \s*. This is then stored and used for
30312
29505
  // future error messages as well.
30313
- this.raw = range.trim().split(/\s+/).join(" ");
29506
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
30314
29507
  // First, split on ||
30315
29508
  this.set = this.raw.split("||")// map the range to a 2d array of comparators
30316
29509
  .map(function(r) {
@@ -30364,15 +29557,33 @@ var Range$b = /*#__PURE__*/ function() {
30364
29557
  }
30365
29558
  }
30366
29559
  }
30367
- this.format();
29560
+ this.formatted = undefined;
30368
29561
  }
30369
29562
  _create_class$1(Range, [
29563
+ {
29564
+ key: "range",
29565
+ get: function get() {
29566
+ if (this.formatted === undefined) {
29567
+ this.formatted = "";
29568
+ for(var i = 0; i < this.set.length; i++){
29569
+ if (i > 0) {
29570
+ this.formatted += "||";
29571
+ }
29572
+ var comps = this.set[i];
29573
+ for(var k = 0; k < comps.length; k++){
29574
+ if (k > 0) {
29575
+ this.formatted += " ";
29576
+ }
29577
+ this.formatted += comps[k].toString().trim();
29578
+ }
29579
+ }
29580
+ }
29581
+ return this.formatted;
29582
+ }
29583
+ },
30370
29584
  {
30371
29585
  key: "format",
30372
29586
  value: function format() {
30373
- this.range = this.set.map(function(comps) {
30374
- return comps.join(" ").trim();
30375
- }).join("||").trim();
30376
29587
  return this.range;
30377
29588
  }
30378
29589
  },
@@ -30507,10 +29718,8 @@ var Range$b = /*#__PURE__*/ function() {
30507
29718
  return Range;
30508
29719
  }();
30509
29720
  var range = Range$b;
30510
- var LRU = lruCache;
30511
- var cache = new LRU({
30512
- max: 1000
30513
- });
29721
+ var LRU = lrucache;
29722
+ var cache = new LRU();
30514
29723
  var parseOptions$1 = parseOptions_1;
30515
29724
  var Comparator$4 = comparator;
30516
29725
  var debug$1 = debug_1;
@@ -30734,8 +29943,9 @@ var replaceGTE0 = function(comp, options) {
30734
29943
  // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
30735
29944
  // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
30736
29945
  // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
29946
+ // TODO build?
30737
29947
  var hyphenReplace = function(incPr) {
30738
- return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
29948
+ return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) {
30739
29949
  if (isX(fM)) {
30740
29950
  from = "";
30741
29951
  } else if (isX(fm)) {