@zenwave360/dsl 1.9.0-next.0 → 1.10.0-next.11.1

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.
@@ -48,6 +48,12 @@ if (typeof Math.clz32 === 'undefined') {
48
48
  };
49
49
  }(Math.log, Math.LN2);
50
50
  }
51
+ if (typeof String.prototype.startsWith === 'undefined') {
52
+ Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
53
+ position = position || 0;
54
+ return this.lastIndexOf(searchString, position) === position;
55
+ }});
56
+ }
51
57
  if (typeof String.prototype.endsWith === 'undefined') {
52
58
  Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
53
59
  var subjectString = this.toString();
@@ -59,12 +65,6 @@ if (typeof String.prototype.endsWith === 'undefined') {
59
65
  return lastIndex !== -1 && lastIndex === position;
60
66
  }});
61
67
  }
62
- if (typeof String.prototype.startsWith === 'undefined') {
63
- Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
64
- position = position || 0;
65
- return this.lastIndexOf(searchString, position) === position;
66
- }});
67
- }
68
68
  //endregion
69
69
  //region block: imports
70
70
  var imul_0 = Math.imul;
@@ -269,6 +269,16 @@ function joinToString(_this__u8e3s4, separator, prefix, postfix, limit, truncate
269
269
  transform = transform === VOID ? null : transform;
270
270
  return joinTo(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();
271
271
  }
272
+ function toSet(_this__u8e3s4) {
273
+ switch (_this__u8e3s4.length) {
274
+ case 0:
275
+ return emptySet();
276
+ case 1:
277
+ return setOf(_this__u8e3s4[0]);
278
+ default:
279
+ return toCollection(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.length)));
280
+ }
281
+ }
272
282
  function indexOf(_this__u8e3s4, element) {
273
283
  if (element == null) {
274
284
  var inductionVariable = 0;
@@ -297,6 +307,9 @@ function indexOf(_this__u8e3s4, element) {
297
307
  }
298
308
  return -1;
299
309
  }
310
+ function filterNotNull(_this__u8e3s4) {
311
+ return filterNotNullTo(_this__u8e3s4, ArrayList_init_$Create$());
312
+ }
300
313
  function get_lastIndex(_this__u8e3s4) {
301
314
  return _this__u8e3s4.length - 1 | 0;
302
315
  }
@@ -339,6 +352,18 @@ function toCollection(_this__u8e3s4, destination) {
339
352
  }
340
353
  return destination;
341
354
  }
355
+ function filterNotNullTo(_this__u8e3s4, destination) {
356
+ var inductionVariable = 0;
357
+ var last = _this__u8e3s4.length;
358
+ while (inductionVariable < last) {
359
+ var element = _this__u8e3s4[inductionVariable];
360
+ inductionVariable = inductionVariable + 1 | 0;
361
+ if (!(element == null)) {
362
+ destination.f(element);
363
+ }
364
+ }
365
+ return destination;
366
+ }
342
367
  function single(_this__u8e3s4) {
343
368
  var tmp;
344
369
  switch (_this__u8e3s4.length) {
@@ -439,7 +464,7 @@ function asSequence(_this__u8e3s4) {
439
464
  function toMutableList(_this__u8e3s4) {
440
465
  return ArrayList_init_$Create$_1(_this__u8e3s4);
441
466
  }
442
- function toSet(_this__u8e3s4) {
467
+ function toSet_0(_this__u8e3s4) {
443
468
  if (isInterface(_this__u8e3s4, Collection)) {
444
469
  var tmp;
445
470
  switch (_this__u8e3s4.j()) {
@@ -2211,6 +2236,9 @@ function decodeVarLenBase64(base64, fromBase64, resultLength) {
2211
2236
  }
2212
2237
  return result;
2213
2238
  }
2239
+ function isDigitImpl(_this__u8e3s4) {
2240
+ return digitToIntImpl(_this__u8e3s4) >= 0;
2241
+ }
2214
2242
  function digitToIntImpl(_this__u8e3s4) {
2215
2243
  // Inline function 'kotlin.code' call
2216
2244
  var ch = Char__toInt_impl_vasixd(_this__u8e3s4);
@@ -4946,6 +4974,15 @@ function uppercaseChar(_this__u8e3s4) {
4946
4974
  function isHighSurrogate(_this__u8e3s4) {
4947
4975
  return _Char___init__impl__6a9atx(55296) <= _this__u8e3s4 ? _this__u8e3s4 <= _Char___init__impl__6a9atx(56319) : false;
4948
4976
  }
4977
+ function isDigit(_this__u8e3s4) {
4978
+ if (_Char___init__impl__6a9atx(48) <= _this__u8e3s4 ? _this__u8e3s4 <= _Char___init__impl__6a9atx(57) : false) {
4979
+ return true;
4980
+ }
4981
+ if (Char__compareTo_impl_ypi4mb(_this__u8e3s4, _Char___init__impl__6a9atx(128)) < 0) {
4982
+ return false;
4983
+ }
4984
+ return isDigitImpl(_this__u8e3s4);
4985
+ }
4949
4986
  function isLetter(_this__u8e3s4) {
4950
4987
  if ((_Char___init__impl__6a9atx(97) <= _this__u8e3s4 ? _this__u8e3s4 <= _Char___init__impl__6a9atx(122) : false) || (_Char___init__impl__6a9atx(65) <= _this__u8e3s4 ? _this__u8e3s4 <= _Char___init__impl__6a9atx(90) : false)) {
4951
4988
  return true;
@@ -5059,7 +5096,7 @@ function Regex$replace$lambda($replacement) {
5059
5096
  function Regex(pattern, options) {
5060
5097
  Companion_getInstance_4();
5061
5098
  this.a9_1 = pattern;
5062
- this.b9_1 = toSet(options);
5099
+ this.b9_1 = toSet_0(options);
5063
5100
  this.c9_1 = new RegExp(pattern, toFlags(options, 'gu'));
5064
5101
  this.d9_1 = null;
5065
5102
  this.e9_1 = null;
@@ -5545,6 +5582,31 @@ function replace_0(_this__u8e3s4, oldChar, newChar, ignoreCase) {
5545
5582
  // Inline function 'kotlin.js.asDynamic' call
5546
5583
  return _this__u8e3s4.replace(tmp2, replacement);
5547
5584
  }
5585
+ function equals_0(_this__u8e3s4, other, ignoreCase) {
5586
+ ignoreCase = ignoreCase === VOID ? false : ignoreCase;
5587
+ if (_this__u8e3s4 == null)
5588
+ return other == null;
5589
+ if (other == null)
5590
+ return false;
5591
+ if (!ignoreCase)
5592
+ return _this__u8e3s4 == other;
5593
+ if (!(_this__u8e3s4.length === other.length))
5594
+ return false;
5595
+ var inductionVariable = 0;
5596
+ var last = _this__u8e3s4.length;
5597
+ if (inductionVariable < last)
5598
+ do {
5599
+ var index = inductionVariable;
5600
+ inductionVariable = inductionVariable + 1 | 0;
5601
+ var thisChar = charCodeAt(_this__u8e3s4, index);
5602
+ var otherChar = charCodeAt(other, index);
5603
+ if (!equals_1(thisChar, otherChar, ignoreCase)) {
5604
+ return false;
5605
+ }
5606
+ }
5607
+ while (inductionVariable < last);
5608
+ return true;
5609
+ }
5548
5610
  function regionMatches(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase) {
5549
5611
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
5550
5612
  return regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase);
@@ -6697,6 +6759,12 @@ function emptyList() {
6697
6759
  function get_indices(_this__u8e3s4) {
6698
6760
  return numberRangeToNumber(0, _this__u8e3s4.j() - 1 | 0);
6699
6761
  }
6762
+ function listOfNotNull(element) {
6763
+ return !(element == null) ? listOf(element) : emptyList();
6764
+ }
6765
+ function listOfNotNull_0(elements) {
6766
+ return filterNotNull(elements);
6767
+ }
6700
6768
  function EmptyList() {
6701
6769
  EmptyList_instance = this;
6702
6770
  this.kb_1 = new Long(-1478467534, -1720727600);
@@ -7100,6 +7168,9 @@ var EmptySequence_instance;
7100
7168
  function EmptySequence_getInstance() {
7101
7169
  return EmptySequence_instance;
7102
7170
  }
7171
+ function setOf_0(elements) {
7172
+ return toSet(elements);
7173
+ }
7103
7174
  function emptySet() {
7104
7175
  return EmptySet_getInstance();
7105
7176
  }
@@ -7360,7 +7431,7 @@ function appendElement(_this__u8e3s4, element, transform) {
7360
7431
  }
7361
7432
  }
7362
7433
  }
7363
- function equals_0(_this__u8e3s4, other, ignoreCase) {
7434
+ function equals_1(_this__u8e3s4, other, ignoreCase) {
7364
7435
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
7365
7436
  if (_this__u8e3s4 === other)
7366
7437
  return true;
@@ -8106,6 +8177,11 @@ function removeSurrounding(_this__u8e3s4, prefix, suffix) {
8106
8177
  }
8107
8178
  return _this__u8e3s4;
8108
8179
  }
8180
+ function substringBeforeLast(_this__u8e3s4, delimiter, missingDelimiterValue) {
8181
+ missingDelimiterValue = missingDelimiterValue === VOID ? _this__u8e3s4 : missingDelimiterValue;
8182
+ var index = lastIndexOf(_this__u8e3s4, delimiter);
8183
+ return index === -1 ? missingDelimiterValue : substring(_this__u8e3s4, 0, index);
8184
+ }
8109
8185
  function split(_this__u8e3s4, delimiters, ignoreCase, limit) {
8110
8186
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
8111
8187
  limit = limit === VOID ? 0 : limit;
@@ -8292,7 +8368,7 @@ function indexOfAny(_this__u8e3s4, chars, startIndex, ignoreCase) {
8292
8368
  while (inductionVariable_0 < last_0) {
8293
8369
  var element = chars[inductionVariable_0];
8294
8370
  inductionVariable_0 = inductionVariable_0 + 1 | 0;
8295
- if (equals_0(element, charAtIndex, ignoreCase)) {
8371
+ if (equals_1(element, charAtIndex, ignoreCase)) {
8296
8372
  tmp$ret$4 = true;
8297
8373
  break $l$block;
8298
8374
  }
@@ -8345,6 +8421,29 @@ function endsWith_0(_this__u8e3s4, suffix, ignoreCase) {
8345
8421
  return regionMatchesImpl(_this__u8e3s4, charSequenceLength(_this__u8e3s4) - charSequenceLength(suffix) | 0, suffix, 0, charSequenceLength(suffix), ignoreCase);
8346
8422
  }
8347
8423
  }
8424
+ function lastIndexOf(_this__u8e3s4, char, startIndex, ignoreCase) {
8425
+ startIndex = startIndex === VOID ? get_lastIndex_1(_this__u8e3s4) : startIndex;
8426
+ ignoreCase = ignoreCase === VOID ? false : ignoreCase;
8427
+ var tmp;
8428
+ var tmp_0;
8429
+ if (ignoreCase) {
8430
+ tmp_0 = true;
8431
+ } else {
8432
+ tmp_0 = !(typeof _this__u8e3s4 === 'string');
8433
+ }
8434
+ if (tmp_0) {
8435
+ // Inline function 'kotlin.charArrayOf' call
8436
+ var tmp$ret$0 = charArrayOf([char]);
8437
+ tmp = lastIndexOfAny(_this__u8e3s4, tmp$ret$0, startIndex, ignoreCase);
8438
+ } else {
8439
+ // Inline function 'kotlin.text.nativeLastIndexOf' call
8440
+ // Inline function 'kotlin.text.nativeLastIndexOf' call
8441
+ var str = toString(char);
8442
+ // Inline function 'kotlin.js.asDynamic' call
8443
+ tmp = _this__u8e3s4.lastIndexOf(str, startIndex);
8444
+ }
8445
+ return tmp;
8446
+ }
8348
8447
  function rangesDelimitedBy(_this__u8e3s4, delimiters, startIndex, ignoreCase, limit) {
8349
8448
  startIndex = startIndex === VOID ? 0 : startIndex;
8350
8449
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
@@ -8419,7 +8518,7 @@ function regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length
8419
8518
  do {
8420
8519
  var index = inductionVariable;
8421
8520
  inductionVariable = inductionVariable + 1 | 0;
8422
- if (!equals_0(charSequenceGet(_this__u8e3s4, thisOffset + index | 0), charSequenceGet(other, otherOffset + index | 0), ignoreCase))
8521
+ if (!equals_1(charSequenceGet(_this__u8e3s4, thisOffset + index | 0), charSequenceGet(other, otherOffset + index | 0), ignoreCase))
8423
8522
  return false;
8424
8523
  }
8425
8524
  while (inductionVariable < length);
@@ -8505,10 +8604,54 @@ function DelimitedRangesSequence(input, startIndex, limit, getNextMatch) {
8505
8604
  protoOf(DelimitedRangesSequence).g = function () {
8506
8605
  return new DelimitedRangesSequence$iterator$1(this);
8507
8606
  };
8607
+ function lastIndexOfAny(_this__u8e3s4, chars, startIndex, ignoreCase) {
8608
+ startIndex = startIndex === VOID ? get_lastIndex_1(_this__u8e3s4) : startIndex;
8609
+ ignoreCase = ignoreCase === VOID ? false : ignoreCase;
8610
+ var tmp;
8611
+ if (!ignoreCase && chars.length === 1) {
8612
+ tmp = typeof _this__u8e3s4 === 'string';
8613
+ } else {
8614
+ tmp = false;
8615
+ }
8616
+ if (tmp) {
8617
+ var char = single(chars);
8618
+ // Inline function 'kotlin.text.nativeLastIndexOf' call
8619
+ // Inline function 'kotlin.text.nativeLastIndexOf' call
8620
+ var str = toString(char);
8621
+ // Inline function 'kotlin.js.asDynamic' call
8622
+ return _this__u8e3s4.lastIndexOf(str, startIndex);
8623
+ }
8624
+ var inductionVariable = coerceAtMost(startIndex, get_lastIndex_1(_this__u8e3s4));
8625
+ if (0 <= inductionVariable)
8626
+ do {
8627
+ var index = inductionVariable;
8628
+ inductionVariable = inductionVariable + -1 | 0;
8629
+ var charAtIndex = charSequenceGet(_this__u8e3s4, index);
8630
+ var tmp$ret$4;
8631
+ $l$block: {
8632
+ // Inline function 'kotlin.collections.any' call
8633
+ var inductionVariable_0 = 0;
8634
+ var last = chars.length;
8635
+ while (inductionVariable_0 < last) {
8636
+ var element = chars[inductionVariable_0];
8637
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
8638
+ if (equals_1(element, charAtIndex, ignoreCase)) {
8639
+ tmp$ret$4 = true;
8640
+ break $l$block;
8641
+ }
8642
+ }
8643
+ tmp$ret$4 = false;
8644
+ }
8645
+ if (tmp$ret$4)
8646
+ return index;
8647
+ }
8648
+ while (0 <= inductionVariable);
8649
+ return -1;
8650
+ }
8508
8651
  function findAnyOf(_this__u8e3s4, strings, startIndex, ignoreCase, last) {
8509
8652
  if (!ignoreCase && strings.j() === 1) {
8510
8653
  var string = single_1(strings);
8511
- var index = !last ? indexOf_1(_this__u8e3s4, string, startIndex) : lastIndexOf(_this__u8e3s4, string, startIndex);
8654
+ var index = !last ? indexOf_1(_this__u8e3s4, string, startIndex) : lastIndexOf_0(_this__u8e3s4, string, startIndex);
8512
8655
  return index < 0 ? null : to(index, string);
8513
8656
  }
8514
8657
  var indices = !last ? numberRangeToNumber(coerceAtLeast(startIndex, 0), charSequenceLength(_this__u8e3s4)) : downTo(coerceAtMost(startIndex, get_lastIndex_1(_this__u8e3s4)), 0);
@@ -8567,7 +8710,7 @@ function findAnyOf(_this__u8e3s4, strings, startIndex, ignoreCase, last) {
8567
8710
  }
8568
8711
  return null;
8569
8712
  }
8570
- function lastIndexOf(_this__u8e3s4, string, startIndex, ignoreCase) {
8713
+ function lastIndexOf_0(_this__u8e3s4, string, startIndex, ignoreCase) {
8571
8714
  startIndex = startIndex === VOID ? get_lastIndex_1(_this__u8e3s4) : startIndex;
8572
8715
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
8573
8716
  var tmp;
@@ -8792,6 +8935,8 @@ export {
8792
8935
  joinToString_1 as joinToString1cxrrlmo0chqs,
8793
8936
  joinToString as joinToStringxqcavsxcmh4q,
8794
8937
  get_lastIndex as get_lastIndexx0qsydpfv3mu,
8938
+ listOfNotNull as listOfNotNull1v4ggfackvuny,
8939
+ listOfNotNull_0 as listOfNotNull2woi2boe01ub4,
8795
8940
  listOf as listOfvhqybd2zx248,
8796
8941
  listOf_0 as listOf1jh22dvmctj1r,
8797
8942
  mapCapacity as mapCapacity1h45rc3eh9p2l,
@@ -8801,16 +8946,20 @@ export {
8801
8946
  minOrNull as minOrNull1g8m0136x75mg,
8802
8947
  mutableMapOf as mutableMapOfk2y3zt1azl40,
8803
8948
  plus as plus310ted5e4i90h,
8949
+ setOf_0 as setOf45ia9pnfhe90,
8804
8950
  sortWith as sortWith4fnm6b3vw03s,
8805
8951
  sorted as sorted354mfsiv4s7x5,
8806
8952
  toList as toList3jhuyej2anx2q,
8807
8953
  toMutableMap as toMutableMapr5f3w62lv8sk,
8954
+ toSet_0 as toSet2orjxp16sotqu,
8808
8955
  compareValues as compareValues1n2ayl87ihzfk,
8809
8956
  enumEntries as enumEntries20mr21zbe3az4,
8810
8957
  println as println2shhhgwwt4c61,
8811
8958
  bitwiseAnd as bitwiseAnd2g7wmsfd45l12,
8959
+ compare as compare2uud5j30pw5xc,
8812
8960
  equalsLong as equalsLong28bsrfhwvd686,
8813
8961
  shiftLeft as shiftLeft1ck77p6vapyra,
8962
+ toNumber as toNumberlmbpvqo27r53,
8814
8963
  FunctionAdapter as FunctionAdapter3lcrrz3moet5b,
8815
8964
  arrayIterator as arrayIterator3lgwvgteckzhv,
8816
8965
  captureStack as captureStack1fzi4aczwc4hg,
@@ -8840,7 +8989,10 @@ export {
8840
8989
  contains_1 as contains3ue2qo8xhmpf1,
8841
8990
  dropLast as dropLastlqc2oyv04br0,
8842
8991
  endsWith as endsWith3cq61xxngobwh,
8992
+ equals_0 as equals2v6cggk171b6e,
8843
8993
  indexOf_0 as indexOf1xbs558u7wr52,
8994
+ isBlank as isBlank1dvkhjjvox3p0,
8995
+ isDigit as isDigit3mimrri4wkzop,
8844
8996
  isHighSurrogate as isHighSurrogate11jfjw70ar0zf,
8845
8997
  isUpperCase as isUpperCase16ivdixranflt,
8846
8998
  removePrefix as removePrefix279df90bhrqqg,
@@ -8850,6 +9002,7 @@ export {
8850
9002
  replace_0 as replaceqbix900hl8kl,
8851
9003
  split as split2bvyvnrlcifjv,
8852
9004
  startsWith as startsWith26w8qjqapeeq6,
9005
+ substringBeforeLast as substringBeforeLastqh7oeuvefdek,
8853
9006
  substring_0 as substring3saq8ornu0luv,
8854
9007
  substring as substringiqarkczpya5m,
8855
9008
  toBoolean as toBoolean2azvnq2ukl7b3,