@teselagen/sequence-utils 0.1.12 → 0.1.14
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.
- package/addGapsToSeqReads.test.d.ts +1 -0
- package/adjustBpsToReplaceOrInsert.test.d.ts +1 -0
- package/aminoAcidToDnaRna.test.d.ts +1 -0
- package/annotateSingleSeq.test.d.ts +1 -0
- package/autoAnnotate.test.d.ts +1 -0
- package/bioData.d.ts +192 -192
- package/calculateNebTa.test.d.ts +1 -0
- package/calculateNebTm.test.d.ts +1 -0
- package/calculatePercentGC.test.d.ts +1 -0
- package/calculateTm.test.d.ts +1 -0
- package/computeDigestFragments.test.d.ts +1 -0
- package/condensePairwiseAlignmentDifferences.test.d.ts +1 -0
- package/convertAACaretPositionOrRangeToDna.test.d.ts +1 -0
- package/convertDnaCaretPositionOrRangeToAA.test.d.ts +1 -0
- package/cutSequenceByRestrictionEnzyme.test.d.ts +1 -0
- package/deleteSequenceDataAtRange.test.d.ts +1 -0
- package/diffUtils.test.d.ts +1 -0
- package/doesEnzymeChopOutsideOfRecognitionSite.test.d.ts +1 -0
- package/featureTypesAndColors.test.d.ts +1 -0
- package/filterAminoAcidSequenceString.test.d.ts +1 -0
- package/filterSequenceString.test.d.ts +1 -0
- package/findNearestRangeOfSequenceOverlapToPosition.test.d.ts +1 -0
- package/findSequenceMatches.test.d.ts +1 -0
- package/generateSequenceData.test.d.ts +1 -0
- package/getAllInsertionsInSeqReads.test.d.ts +1 -0
- package/getAminoAcidDataForEachBaseOfDna.test.d.ts +1 -0
- package/getAminoAcidStringFromSequenceString.test.d.ts +1 -0
- package/getDigestFragmentsForRestrictionEnzymes.test.d.ts +1 -0
- package/getInsertBetweenVals.test.d.ts +1 -0
- package/getLeftAndRightOfSequenceInRangeGivenPosition.test.d.ts +1 -0
- package/getMassofAaString.test.d.ts +1 -0
- package/getOrfsFromSequence.test.d.ts +1 -0
- package/getOverlapBetweenTwoSequences.d.ts +1 -1
- package/getOverlapBetweenTwoSequences.test.d.ts +1 -0
- package/getPossiblePartsFromSequenceAndEnzymes.test.d.ts +1 -0
- package/getReverseAminoAcidStringFromSequenceString.test.d.ts +1 -0
- package/getReverseComplementAnnotation.test.d.ts +1 -0
- package/getReverseComplementSequenceAndAnnotations.test.d.ts +1 -0
- package/getReverseComplementSequenceString.test.d.ts +1 -0
- package/getReverseSequenceString.test.d.ts +1 -0
- package/getSequenceDataBetweenRange.test.d.ts +1 -0
- package/getVirtualDigest.test.d.ts +1 -0
- package/guessIfSequenceIsDnaAndNotProtein.test.d.ts +1 -0
- package/index.d.ts +7 -7
- package/index.js +774 -696
- package/index.mjs +774 -696
- package/index.test.d.ts +1 -0
- package/index.umd.js +775 -697
- package/insertGapsIntoRefSeq.test.d.ts +1 -0
- package/insertSequenceDataAtPosition.test.d.ts +1 -0
- package/insertSequenceDataAtPositionOrRange.test.d.ts +1 -0
- package/mapAnnotationsToRows.test.d.ts +1 -0
- package/package.json +3 -3
- package/prepareCircularViewData.test.d.ts +1 -0
- package/prepareRowData.test.d.ts +1 -0
- package/rotateBpsToPosition.test.d.ts +1 -0
- package/rotateSequenceDataToPosition.test.d.ts +1 -0
- package/tidyUpSequenceData.test.d.ts +1 -0
package/index.mjs
CHANGED
|
@@ -392,18 +392,18 @@ lodash.exports;
|
|
|
392
392
|
}
|
|
393
393
|
__name(apply, "apply");
|
|
394
394
|
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|
395
|
-
var
|
|
396
|
-
while (++
|
|
397
|
-
var value = array[
|
|
395
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
396
|
+
while (++index < length) {
|
|
397
|
+
var value = array[index];
|
|
398
398
|
setter(accumulator, value, iteratee(value), array);
|
|
399
399
|
}
|
|
400
400
|
return accumulator;
|
|
401
401
|
}
|
|
402
402
|
__name(arrayAggregator, "arrayAggregator");
|
|
403
403
|
function arrayEach(array, iteratee) {
|
|
404
|
-
var
|
|
405
|
-
while (++
|
|
406
|
-
if (iteratee(array[
|
|
404
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
405
|
+
while (++index < length) {
|
|
406
|
+
if (iteratee(array[index], index, array) === false) {
|
|
407
407
|
break;
|
|
408
408
|
}
|
|
409
409
|
}
|
|
@@ -421,9 +421,9 @@ lodash.exports;
|
|
|
421
421
|
}
|
|
422
422
|
__name(arrayEachRight, "arrayEachRight");
|
|
423
423
|
function arrayEvery(array, predicate) {
|
|
424
|
-
var
|
|
425
|
-
while (++
|
|
426
|
-
if (!predicate(array[
|
|
424
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
425
|
+
while (++index < length) {
|
|
426
|
+
if (!predicate(array[index], index, array)) {
|
|
427
427
|
return false;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
@@ -431,10 +431,10 @@ lodash.exports;
|
|
|
431
431
|
}
|
|
432
432
|
__name(arrayEvery, "arrayEvery");
|
|
433
433
|
function arrayFilter(array, predicate) {
|
|
434
|
-
var
|
|
435
|
-
while (++
|
|
436
|
-
var value = array[
|
|
437
|
-
if (predicate(value,
|
|
434
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
435
|
+
while (++index < length) {
|
|
436
|
+
var value = array[index];
|
|
437
|
+
if (predicate(value, index, array)) {
|
|
438
438
|
result[resIndex++] = value;
|
|
439
439
|
}
|
|
440
440
|
}
|
|
@@ -447,9 +447,9 @@ lodash.exports;
|
|
|
447
447
|
}
|
|
448
448
|
__name(arrayIncludes, "arrayIncludes");
|
|
449
449
|
function arrayIncludesWith(array, value, comparator) {
|
|
450
|
-
var
|
|
451
|
-
while (++
|
|
452
|
-
if (comparator(value, array[
|
|
450
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
451
|
+
while (++index < length) {
|
|
452
|
+
if (comparator(value, array[index])) {
|
|
453
453
|
return true;
|
|
454
454
|
}
|
|
455
455
|
}
|
|
@@ -457,28 +457,28 @@ lodash.exports;
|
|
|
457
457
|
}
|
|
458
458
|
__name(arrayIncludesWith, "arrayIncludesWith");
|
|
459
459
|
function arrayMap(array, iteratee) {
|
|
460
|
-
var
|
|
461
|
-
while (++
|
|
462
|
-
result[
|
|
460
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
461
|
+
while (++index < length) {
|
|
462
|
+
result[index] = iteratee(array[index], index, array);
|
|
463
463
|
}
|
|
464
464
|
return result;
|
|
465
465
|
}
|
|
466
466
|
__name(arrayMap, "arrayMap");
|
|
467
467
|
function arrayPush(array, values) {
|
|
468
|
-
var
|
|
469
|
-
while (++
|
|
470
|
-
array[offset +
|
|
468
|
+
var index = -1, length = values.length, offset = array.length;
|
|
469
|
+
while (++index < length) {
|
|
470
|
+
array[offset + index] = values[index];
|
|
471
471
|
}
|
|
472
472
|
return array;
|
|
473
473
|
}
|
|
474
474
|
__name(arrayPush, "arrayPush");
|
|
475
475
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
476
|
-
var
|
|
476
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
477
477
|
if (initAccum && length) {
|
|
478
|
-
accumulator = array[++
|
|
478
|
+
accumulator = array[++index];
|
|
479
479
|
}
|
|
480
|
-
while (++
|
|
481
|
-
accumulator = iteratee(accumulator, array[
|
|
480
|
+
while (++index < length) {
|
|
481
|
+
accumulator = iteratee(accumulator, array[index], index, array);
|
|
482
482
|
}
|
|
483
483
|
return accumulator;
|
|
484
484
|
}
|
|
@@ -495,9 +495,9 @@ lodash.exports;
|
|
|
495
495
|
}
|
|
496
496
|
__name(arrayReduceRight, "arrayReduceRight");
|
|
497
497
|
function arraySome(array, predicate) {
|
|
498
|
-
var
|
|
499
|
-
while (++
|
|
500
|
-
if (predicate(array[
|
|
498
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
499
|
+
while (++index < length) {
|
|
500
|
+
if (predicate(array[index], index, array)) {
|
|
501
501
|
return true;
|
|
502
502
|
}
|
|
503
503
|
}
|
|
@@ -525,10 +525,10 @@ lodash.exports;
|
|
|
525
525
|
}
|
|
526
526
|
__name(baseFindKey, "baseFindKey");
|
|
527
527
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
528
|
-
var length = array.length,
|
|
529
|
-
while (fromRight ?
|
|
530
|
-
if (predicate(array[
|
|
531
|
-
return
|
|
528
|
+
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
529
|
+
while (fromRight ? index-- : ++index < length) {
|
|
530
|
+
if (predicate(array[index], index, array)) {
|
|
531
|
+
return index;
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
return -1;
|
|
@@ -539,10 +539,10 @@ lodash.exports;
|
|
|
539
539
|
}
|
|
540
540
|
__name(baseIndexOf, "baseIndexOf");
|
|
541
541
|
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|
542
|
-
var
|
|
543
|
-
while (++
|
|
544
|
-
if (comparator(array[
|
|
545
|
-
return
|
|
542
|
+
var index = fromIndex - 1, length = array.length;
|
|
543
|
+
while (++index < length) {
|
|
544
|
+
if (comparator(array[index], value)) {
|
|
545
|
+
return index;
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
return -1;
|
|
@@ -570,8 +570,8 @@ lodash.exports;
|
|
|
570
570
|
}
|
|
571
571
|
__name(basePropertyOf, "basePropertyOf");
|
|
572
572
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
573
|
-
eachFunc(collection, function(value,
|
|
574
|
-
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value,
|
|
573
|
+
eachFunc(collection, function(value, index, collection2) {
|
|
574
|
+
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2);
|
|
575
575
|
});
|
|
576
576
|
return accumulator;
|
|
577
577
|
}
|
|
@@ -586,9 +586,9 @@ lodash.exports;
|
|
|
586
586
|
}
|
|
587
587
|
__name(baseSortBy, "baseSortBy");
|
|
588
588
|
function baseSum(array, iteratee) {
|
|
589
|
-
var result,
|
|
590
|
-
while (++
|
|
591
|
-
var current = iteratee(array[
|
|
589
|
+
var result, index = -1, length = array.length;
|
|
590
|
+
while (++index < length) {
|
|
591
|
+
var current = iteratee(array[index]);
|
|
592
592
|
if (current !== undefined$1) {
|
|
593
593
|
result = result === undefined$1 ? current : result + current;
|
|
594
594
|
}
|
|
@@ -597,9 +597,9 @@ lodash.exports;
|
|
|
597
597
|
}
|
|
598
598
|
__name(baseSum, "baseSum");
|
|
599
599
|
function baseTimes(n, iteratee) {
|
|
600
|
-
var
|
|
601
|
-
while (++
|
|
602
|
-
result[
|
|
600
|
+
var index = -1, result = Array(n);
|
|
601
|
+
while (++index < n) {
|
|
602
|
+
result[index] = iteratee(index);
|
|
603
603
|
}
|
|
604
604
|
return result;
|
|
605
605
|
}
|
|
@@ -631,17 +631,17 @@ lodash.exports;
|
|
|
631
631
|
}
|
|
632
632
|
__name(cacheHas, "cacheHas");
|
|
633
633
|
function charsStartIndex(strSymbols, chrSymbols) {
|
|
634
|
-
var
|
|
635
|
-
while (++
|
|
634
|
+
var index = -1, length = strSymbols.length;
|
|
635
|
+
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
636
636
|
}
|
|
637
|
-
return
|
|
637
|
+
return index;
|
|
638
638
|
}
|
|
639
639
|
__name(charsStartIndex, "charsStartIndex");
|
|
640
640
|
function charsEndIndex(strSymbols, chrSymbols) {
|
|
641
|
-
var
|
|
642
|
-
while (
|
|
641
|
+
var index = strSymbols.length;
|
|
642
|
+
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
643
643
|
}
|
|
644
|
-
return
|
|
644
|
+
return index;
|
|
645
645
|
}
|
|
646
646
|
__name(charsEndIndex, "charsEndIndex");
|
|
647
647
|
function countHolders(array, placeholder) {
|
|
@@ -681,9 +681,9 @@ lodash.exports;
|
|
|
681
681
|
}
|
|
682
682
|
__name(iteratorToArray, "iteratorToArray");
|
|
683
683
|
function mapToArray(map) {
|
|
684
|
-
var
|
|
684
|
+
var index = -1, result = Array(map.size);
|
|
685
685
|
map.forEach(function(value, key) {
|
|
686
|
-
result[++
|
|
686
|
+
result[++index] = [key, value];
|
|
687
687
|
});
|
|
688
688
|
return result;
|
|
689
689
|
}
|
|
@@ -695,51 +695,51 @@ lodash.exports;
|
|
|
695
695
|
}
|
|
696
696
|
__name(overArg, "overArg");
|
|
697
697
|
function replaceHolders(array, placeholder) {
|
|
698
|
-
var
|
|
699
|
-
while (++
|
|
700
|
-
var value = array[
|
|
698
|
+
var index = -1, length = array.length, resIndex = 0, result = [];
|
|
699
|
+
while (++index < length) {
|
|
700
|
+
var value = array[index];
|
|
701
701
|
if (value === placeholder || value === PLACEHOLDER) {
|
|
702
|
-
array[
|
|
703
|
-
result[resIndex++] =
|
|
702
|
+
array[index] = PLACEHOLDER;
|
|
703
|
+
result[resIndex++] = index;
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
return result;
|
|
707
707
|
}
|
|
708
708
|
__name(replaceHolders, "replaceHolders");
|
|
709
709
|
function setToArray(set) {
|
|
710
|
-
var
|
|
710
|
+
var index = -1, result = Array(set.size);
|
|
711
711
|
set.forEach(function(value) {
|
|
712
|
-
result[++
|
|
712
|
+
result[++index] = value;
|
|
713
713
|
});
|
|
714
714
|
return result;
|
|
715
715
|
}
|
|
716
716
|
__name(setToArray, "setToArray");
|
|
717
717
|
function setToPairs(set) {
|
|
718
|
-
var
|
|
718
|
+
var index = -1, result = Array(set.size);
|
|
719
719
|
set.forEach(function(value) {
|
|
720
|
-
result[++
|
|
720
|
+
result[++index] = [value, value];
|
|
721
721
|
});
|
|
722
722
|
return result;
|
|
723
723
|
}
|
|
724
724
|
__name(setToPairs, "setToPairs");
|
|
725
725
|
function strictIndexOf(array, value, fromIndex) {
|
|
726
|
-
var
|
|
727
|
-
while (++
|
|
728
|
-
if (array[
|
|
729
|
-
return
|
|
726
|
+
var index = fromIndex - 1, length = array.length;
|
|
727
|
+
while (++index < length) {
|
|
728
|
+
if (array[index] === value) {
|
|
729
|
+
return index;
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
return -1;
|
|
733
733
|
}
|
|
734
734
|
__name(strictIndexOf, "strictIndexOf");
|
|
735
735
|
function strictLastIndexOf(array, value, fromIndex) {
|
|
736
|
-
var
|
|
737
|
-
while (
|
|
738
|
-
if (array[
|
|
739
|
-
return
|
|
736
|
+
var index = fromIndex + 1;
|
|
737
|
+
while (index--) {
|
|
738
|
+
if (array[index] === value) {
|
|
739
|
+
return index;
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
|
-
return
|
|
742
|
+
return index;
|
|
743
743
|
}
|
|
744
744
|
__name(strictLastIndexOf, "strictLastIndexOf");
|
|
745
745
|
function stringSize(string) {
|
|
@@ -751,10 +751,10 @@ lodash.exports;
|
|
|
751
751
|
}
|
|
752
752
|
__name(stringToArray, "stringToArray");
|
|
753
753
|
function trimmedEndIndex(string) {
|
|
754
|
-
var
|
|
755
|
-
while (
|
|
754
|
+
var index = string.length;
|
|
755
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
756
756
|
}
|
|
757
|
-
return
|
|
757
|
+
return index;
|
|
758
758
|
}
|
|
759
759
|
__name(trimmedEndIndex, "trimmedEndIndex");
|
|
760
760
|
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
|
@@ -931,15 +931,15 @@ lodash.exports;
|
|
|
931
931
|
}
|
|
932
932
|
__name(lazyReverse, "lazyReverse");
|
|
933
933
|
function lazyValue() {
|
|
934
|
-
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start,
|
|
934
|
+
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
|
|
935
935
|
if (!isArr || !isRight && arrLength == length && takeCount == length) {
|
|
936
936
|
return baseWrapperValue(array, this.__actions__);
|
|
937
937
|
}
|
|
938
938
|
var result2 = [];
|
|
939
939
|
outer:
|
|
940
940
|
while (length-- && resIndex < takeCount) {
|
|
941
|
-
|
|
942
|
-
var iterIndex = -1, value = array[
|
|
941
|
+
index += dir;
|
|
942
|
+
var iterIndex = -1, value = array[index];
|
|
943
943
|
while (++iterIndex < iterLength) {
|
|
944
944
|
var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
|
|
945
945
|
if (type == LAZY_MAP_FLAG) {
|
|
@@ -960,10 +960,10 @@ lodash.exports;
|
|
|
960
960
|
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
|
961
961
|
LazyWrapper.prototype.constructor = LazyWrapper;
|
|
962
962
|
function Hash(entries) {
|
|
963
|
-
var
|
|
963
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
964
964
|
this.clear();
|
|
965
|
-
while (++
|
|
966
|
-
var entry = entries[
|
|
965
|
+
while (++index < length) {
|
|
966
|
+
var entry = entries[index];
|
|
967
967
|
this.set(entry[0], entry[1]);
|
|
968
968
|
}
|
|
969
969
|
}
|
|
@@ -1006,10 +1006,10 @@ lodash.exports;
|
|
|
1006
1006
|
Hash.prototype.has = hashHas;
|
|
1007
1007
|
Hash.prototype.set = hashSet;
|
|
1008
1008
|
function ListCache(entries) {
|
|
1009
|
-
var
|
|
1009
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1010
1010
|
this.clear();
|
|
1011
|
-
while (++
|
|
1012
|
-
var entry = entries[
|
|
1011
|
+
while (++index < length) {
|
|
1012
|
+
var entry = entries[index];
|
|
1013
1013
|
this.set(entry[0], entry[1]);
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
@@ -1020,23 +1020,23 @@ lodash.exports;
|
|
|
1020
1020
|
}
|
|
1021
1021
|
__name(listCacheClear, "listCacheClear");
|
|
1022
1022
|
function listCacheDelete(key) {
|
|
1023
|
-
var data = this.__data__,
|
|
1024
|
-
if (
|
|
1023
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1024
|
+
if (index < 0) {
|
|
1025
1025
|
return false;
|
|
1026
1026
|
}
|
|
1027
1027
|
var lastIndex = data.length - 1;
|
|
1028
|
-
if (
|
|
1028
|
+
if (index == lastIndex) {
|
|
1029
1029
|
data.pop();
|
|
1030
1030
|
} else {
|
|
1031
|
-
splice.call(data,
|
|
1031
|
+
splice.call(data, index, 1);
|
|
1032
1032
|
}
|
|
1033
1033
|
--this.size;
|
|
1034
1034
|
return true;
|
|
1035
1035
|
}
|
|
1036
1036
|
__name(listCacheDelete, "listCacheDelete");
|
|
1037
1037
|
function listCacheGet(key) {
|
|
1038
|
-
var data = this.__data__,
|
|
1039
|
-
return
|
|
1038
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1039
|
+
return index < 0 ? undefined$1 : data[index][1];
|
|
1040
1040
|
}
|
|
1041
1041
|
__name(listCacheGet, "listCacheGet");
|
|
1042
1042
|
function listCacheHas(key) {
|
|
@@ -1044,12 +1044,12 @@ lodash.exports;
|
|
|
1044
1044
|
}
|
|
1045
1045
|
__name(listCacheHas, "listCacheHas");
|
|
1046
1046
|
function listCacheSet(key, value) {
|
|
1047
|
-
var data = this.__data__,
|
|
1048
|
-
if (
|
|
1047
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1048
|
+
if (index < 0) {
|
|
1049
1049
|
++this.size;
|
|
1050
1050
|
data.push([key, value]);
|
|
1051
1051
|
} else {
|
|
1052
|
-
data[
|
|
1052
|
+
data[index][1] = value;
|
|
1053
1053
|
}
|
|
1054
1054
|
return this;
|
|
1055
1055
|
}
|
|
@@ -1060,10 +1060,10 @@ lodash.exports;
|
|
|
1060
1060
|
ListCache.prototype.has = listCacheHas;
|
|
1061
1061
|
ListCache.prototype.set = listCacheSet;
|
|
1062
1062
|
function MapCache(entries) {
|
|
1063
|
-
var
|
|
1063
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1064
1064
|
this.clear();
|
|
1065
|
-
while (++
|
|
1066
|
-
var entry = entries[
|
|
1065
|
+
while (++index < length) {
|
|
1066
|
+
var entry = entries[index];
|
|
1067
1067
|
this.set(entry[0], entry[1]);
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
@@ -1104,10 +1104,10 @@ lodash.exports;
|
|
|
1104
1104
|
MapCache.prototype.has = mapCacheHas;
|
|
1105
1105
|
MapCache.prototype.set = mapCacheSet;
|
|
1106
1106
|
function SetCache(values2) {
|
|
1107
|
-
var
|
|
1107
|
+
var index = -1, length = values2 == null ? 0 : values2.length;
|
|
1108
1108
|
this.__data__ = new MapCache();
|
|
1109
|
-
while (++
|
|
1110
|
-
this.add(values2[
|
|
1109
|
+
while (++index < length) {
|
|
1110
|
+
this.add(values2[index]);
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
1113
|
__name(SetCache, "SetCache");
|
|
@@ -1168,7 +1168,7 @@ lodash.exports;
|
|
|
1168
1168
|
Stack.prototype.has = stackHas;
|
|
1169
1169
|
Stack.prototype.set = stackSet;
|
|
1170
1170
|
function arrayLikeKeys(value, inherited) {
|
|
1171
|
-
var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg &&
|
|
1171
|
+
var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length;
|
|
1172
1172
|
for (var key in value) {
|
|
1173
1173
|
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1174
1174
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
@@ -1246,9 +1246,9 @@ lodash.exports;
|
|
|
1246
1246
|
}
|
|
1247
1247
|
__name(baseAssignValue, "baseAssignValue");
|
|
1248
1248
|
function baseAt(object, paths) {
|
|
1249
|
-
var
|
|
1250
|
-
while (++
|
|
1251
|
-
result2[
|
|
1249
|
+
var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
|
|
1250
|
+
while (++index < length) {
|
|
1251
|
+
result2[index] = skip ? undefined$1 : get4(object, paths[index]);
|
|
1252
1252
|
}
|
|
1253
1253
|
return result2;
|
|
1254
1254
|
}
|
|
@@ -1284,7 +1284,7 @@ lodash.exports;
|
|
|
1284
1284
|
}
|
|
1285
1285
|
} else {
|
|
1286
1286
|
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
1287
|
-
if (
|
|
1287
|
+
if (isBuffer(value)) {
|
|
1288
1288
|
return cloneBuffer(value, isDeep);
|
|
1289
1289
|
}
|
|
1290
1290
|
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
@@ -1358,7 +1358,7 @@ lodash.exports;
|
|
|
1358
1358
|
}
|
|
1359
1359
|
__name(baseDelay, "baseDelay");
|
|
1360
1360
|
function baseDifference(array, values2, iteratee2, comparator) {
|
|
1361
|
-
var
|
|
1361
|
+
var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
|
|
1362
1362
|
if (!length) {
|
|
1363
1363
|
return result2;
|
|
1364
1364
|
}
|
|
@@ -1374,8 +1374,8 @@ lodash.exports;
|
|
|
1374
1374
|
values2 = new SetCache(values2);
|
|
1375
1375
|
}
|
|
1376
1376
|
outer:
|
|
1377
|
-
while (++
|
|
1378
|
-
var value = array[
|
|
1377
|
+
while (++index < length) {
|
|
1378
|
+
var value = array[index], computed = iteratee2 == null ? value : iteratee2(value);
|
|
1379
1379
|
value = comparator || value !== 0 ? value : 0;
|
|
1380
1380
|
if (isCommon && computed === computed) {
|
|
1381
1381
|
var valuesIndex = valuesLength;
|
|
@@ -1396,17 +1396,17 @@ lodash.exports;
|
|
|
1396
1396
|
var baseEachRight = createBaseEach(baseForOwnRight, true);
|
|
1397
1397
|
function baseEvery(collection, predicate) {
|
|
1398
1398
|
var result2 = true;
|
|
1399
|
-
baseEach(collection, function(value,
|
|
1400
|
-
result2 = !!predicate(value,
|
|
1399
|
+
baseEach(collection, function(value, index, collection2) {
|
|
1400
|
+
result2 = !!predicate(value, index, collection2);
|
|
1401
1401
|
return result2;
|
|
1402
1402
|
});
|
|
1403
1403
|
return result2;
|
|
1404
1404
|
}
|
|
1405
1405
|
__name(baseEvery, "baseEvery");
|
|
1406
1406
|
function baseExtremum(array, iteratee2, comparator) {
|
|
1407
|
-
var
|
|
1408
|
-
while (++
|
|
1409
|
-
var value = array[
|
|
1407
|
+
var index = -1, length = array.length;
|
|
1408
|
+
while (++index < length) {
|
|
1409
|
+
var value = array[index], current = iteratee2(value);
|
|
1410
1410
|
if (current != null && (computed === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed))) {
|
|
1411
1411
|
var computed = current, result2 = value;
|
|
1412
1412
|
}
|
|
@@ -1433,8 +1433,8 @@ lodash.exports;
|
|
|
1433
1433
|
__name(baseFill, "baseFill");
|
|
1434
1434
|
function baseFilter(collection, predicate) {
|
|
1435
1435
|
var result2 = [];
|
|
1436
|
-
baseEach(collection, function(value,
|
|
1437
|
-
if (predicate(value,
|
|
1436
|
+
baseEach(collection, function(value, index, collection2) {
|
|
1437
|
+
if (predicate(value, index, collection2)) {
|
|
1438
1438
|
result2.push(value);
|
|
1439
1439
|
}
|
|
1440
1440
|
});
|
|
@@ -1442,11 +1442,11 @@ lodash.exports;
|
|
|
1442
1442
|
}
|
|
1443
1443
|
__name(baseFilter, "baseFilter");
|
|
1444
1444
|
function baseFlatten(array, depth, predicate, isStrict, result2) {
|
|
1445
|
-
var
|
|
1445
|
+
var index = -1, length = array.length;
|
|
1446
1446
|
predicate || (predicate = isFlattenable);
|
|
1447
1447
|
result2 || (result2 = []);
|
|
1448
|
-
while (++
|
|
1449
|
-
var value = array[
|
|
1448
|
+
while (++index < length) {
|
|
1449
|
+
var value = array[index];
|
|
1450
1450
|
if (depth > 0 && predicate(value)) {
|
|
1451
1451
|
if (depth > 1) {
|
|
1452
1452
|
baseFlatten(value, depth - 1, predicate, isStrict, result2);
|
|
@@ -1478,11 +1478,11 @@ lodash.exports;
|
|
|
1478
1478
|
__name(baseFunctions, "baseFunctions");
|
|
1479
1479
|
function baseGet(object, path) {
|
|
1480
1480
|
path = castPath(path, object);
|
|
1481
|
-
var
|
|
1482
|
-
while (object != null &&
|
|
1483
|
-
object = object[toKey(path[
|
|
1481
|
+
var index = 0, length = path.length;
|
|
1482
|
+
while (object != null && index < length) {
|
|
1483
|
+
object = object[toKey(path[index++])];
|
|
1484
1484
|
}
|
|
1485
|
-
return
|
|
1485
|
+
return index && index == length ? object : undefined$1;
|
|
1486
1486
|
}
|
|
1487
1487
|
__name(baseGet, "baseGet");
|
|
1488
1488
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
@@ -1524,10 +1524,10 @@ lodash.exports;
|
|
|
1524
1524
|
caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined$1;
|
|
1525
1525
|
}
|
|
1526
1526
|
array = arrays[0];
|
|
1527
|
-
var
|
|
1527
|
+
var index = -1, seen = caches[0];
|
|
1528
1528
|
outer:
|
|
1529
|
-
while (++
|
|
1530
|
-
var value = array[
|
|
1529
|
+
while (++index < length && result2.length < maxLength) {
|
|
1530
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1531
1531
|
value = comparator || value !== 0 ? value : 0;
|
|
1532
1532
|
if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
|
|
1533
1533
|
othIndex = othLength;
|
|
@@ -1587,8 +1587,8 @@ lodash.exports;
|
|
|
1587
1587
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1588
1588
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1589
1589
|
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1590
|
-
if (isSameTag &&
|
|
1591
|
-
if (!
|
|
1590
|
+
if (isSameTag && isBuffer(object)) {
|
|
1591
|
+
if (!isBuffer(other)) {
|
|
1592
1592
|
return false;
|
|
1593
1593
|
}
|
|
1594
1594
|
objIsArr = true;
|
|
@@ -1618,19 +1618,19 @@ lodash.exports;
|
|
|
1618
1618
|
}
|
|
1619
1619
|
__name(baseIsMap, "baseIsMap");
|
|
1620
1620
|
function baseIsMatch(object, source2, matchData, customizer) {
|
|
1621
|
-
var
|
|
1621
|
+
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
1622
1622
|
if (object == null) {
|
|
1623
1623
|
return !length;
|
|
1624
1624
|
}
|
|
1625
1625
|
object = Object2(object);
|
|
1626
|
-
while (
|
|
1627
|
-
var data = matchData[
|
|
1626
|
+
while (index--) {
|
|
1627
|
+
var data = matchData[index];
|
|
1628
1628
|
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
1629
1629
|
return false;
|
|
1630
1630
|
}
|
|
1631
1631
|
}
|
|
1632
|
-
while (++
|
|
1633
|
-
data = matchData[
|
|
1632
|
+
while (++index < length) {
|
|
1633
|
+
data = matchData[index];
|
|
1634
1634
|
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1635
1635
|
if (noCustomizer && data[2]) {
|
|
1636
1636
|
if (objValue === undefined$1 && !(key in object)) {
|
|
@@ -1713,9 +1713,9 @@ lodash.exports;
|
|
|
1713
1713
|
}
|
|
1714
1714
|
__name(baseLt, "baseLt");
|
|
1715
1715
|
function baseMap(collection, iteratee2) {
|
|
1716
|
-
var
|
|
1716
|
+
var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
1717
1717
|
baseEach(collection, function(value, key, collection2) {
|
|
1718
|
-
result2[++
|
|
1718
|
+
result2[++index] = iteratee2(value, key, collection2);
|
|
1719
1719
|
});
|
|
1720
1720
|
return result2;
|
|
1721
1721
|
}
|
|
@@ -1767,7 +1767,7 @@ lodash.exports;
|
|
|
1767
1767
|
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source2, stack) : undefined$1;
|
|
1768
1768
|
var isCommon = newValue === undefined$1;
|
|
1769
1769
|
if (isCommon) {
|
|
1770
|
-
var isArr = isArray2(srcValue), isBuff = !isArr &&
|
|
1770
|
+
var isArr = isArray2(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
1771
1771
|
newValue = srcValue;
|
|
1772
1772
|
if (isArr || isBuff || isTyped) {
|
|
1773
1773
|
if (isArray2(objValue)) {
|
|
@@ -1824,13 +1824,13 @@ lodash.exports;
|
|
|
1824
1824
|
} else {
|
|
1825
1825
|
iteratees = [identity];
|
|
1826
1826
|
}
|
|
1827
|
-
var
|
|
1827
|
+
var index = -1;
|
|
1828
1828
|
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
|
1829
1829
|
var result2 = baseMap(collection, function(value, key, collection2) {
|
|
1830
1830
|
var criteria = arrayMap(iteratees, function(iteratee2) {
|
|
1831
1831
|
return iteratee2(value);
|
|
1832
1832
|
});
|
|
1833
|
-
return { "criteria": criteria, "index": ++
|
|
1833
|
+
return { "criteria": criteria, "index": ++index, "value": value };
|
|
1834
1834
|
});
|
|
1835
1835
|
return baseSortBy(result2, function(object, other) {
|
|
1836
1836
|
return compareMultiple(object, other, orders);
|
|
@@ -1844,9 +1844,9 @@ lodash.exports;
|
|
|
1844
1844
|
}
|
|
1845
1845
|
__name(basePick, "basePick");
|
|
1846
1846
|
function basePickBy(object, paths, predicate) {
|
|
1847
|
-
var
|
|
1848
|
-
while (++
|
|
1849
|
-
var path = paths[
|
|
1847
|
+
var index = -1, length = paths.length, result2 = {};
|
|
1848
|
+
while (++index < length) {
|
|
1849
|
+
var path = paths[index], value = baseGet(object, path);
|
|
1850
1850
|
if (predicate(value, path)) {
|
|
1851
1851
|
baseSet(result2, castPath(path, object), value);
|
|
1852
1852
|
}
|
|
@@ -1861,15 +1861,15 @@ lodash.exports;
|
|
|
1861
1861
|
}
|
|
1862
1862
|
__name(basePropertyDeep, "basePropertyDeep");
|
|
1863
1863
|
function basePullAll(array, values2, iteratee2, comparator) {
|
|
1864
|
-
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf,
|
|
1864
|
+
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array;
|
|
1865
1865
|
if (array === values2) {
|
|
1866
1866
|
values2 = copyArray(values2);
|
|
1867
1867
|
}
|
|
1868
1868
|
if (iteratee2) {
|
|
1869
1869
|
seen = arrayMap(array, baseUnary(iteratee2));
|
|
1870
1870
|
}
|
|
1871
|
-
while (++
|
|
1872
|
-
var fromIndex = 0, value = values2[
|
|
1871
|
+
while (++index < length) {
|
|
1872
|
+
var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1873
1873
|
while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
|
|
1874
1874
|
if (seen !== array) {
|
|
1875
1875
|
splice.call(seen, fromIndex, 1);
|
|
@@ -1883,13 +1883,13 @@ lodash.exports;
|
|
|
1883
1883
|
function basePullAt(array, indexes) {
|
|
1884
1884
|
var length = array ? indexes.length : 0, lastIndex = length - 1;
|
|
1885
1885
|
while (length--) {
|
|
1886
|
-
var
|
|
1887
|
-
if (length == lastIndex ||
|
|
1888
|
-
var previous =
|
|
1889
|
-
if (isIndex(
|
|
1890
|
-
splice.call(array,
|
|
1886
|
+
var index = indexes[length];
|
|
1887
|
+
if (length == lastIndex || index !== previous) {
|
|
1888
|
+
var previous = index;
|
|
1889
|
+
if (isIndex(index)) {
|
|
1890
|
+
splice.call(array, index, 1);
|
|
1891
1891
|
} else {
|
|
1892
|
-
baseUnset(array,
|
|
1892
|
+
baseUnset(array, index);
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
}
|
|
@@ -1901,9 +1901,9 @@ lodash.exports;
|
|
|
1901
1901
|
}
|
|
1902
1902
|
__name(baseRandom, "baseRandom");
|
|
1903
1903
|
function baseRange(start, end, step, fromRight) {
|
|
1904
|
-
var
|
|
1904
|
+
var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
|
|
1905
1905
|
while (length--) {
|
|
1906
|
-
result2[fromRight ? length : ++
|
|
1906
|
+
result2[fromRight ? length : ++index] = start;
|
|
1907
1907
|
start += step;
|
|
1908
1908
|
}
|
|
1909
1909
|
return result2;
|
|
@@ -1944,17 +1944,17 @@ lodash.exports;
|
|
|
1944
1944
|
return object;
|
|
1945
1945
|
}
|
|
1946
1946
|
path = castPath(path, object);
|
|
1947
|
-
var
|
|
1948
|
-
while (nested != null && ++
|
|
1949
|
-
var key = toKey(path[
|
|
1947
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
1948
|
+
while (nested != null && ++index < length) {
|
|
1949
|
+
var key = toKey(path[index]), newValue = value;
|
|
1950
1950
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1951
1951
|
return object;
|
|
1952
1952
|
}
|
|
1953
|
-
if (
|
|
1953
|
+
if (index != lastIndex) {
|
|
1954
1954
|
var objValue = nested[key];
|
|
1955
1955
|
newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
|
|
1956
1956
|
if (newValue === undefined$1) {
|
|
1957
|
-
newValue = isObject(objValue) ? objValue : isIndex(path[
|
|
1957
|
+
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
1958
1958
|
}
|
|
1959
1959
|
}
|
|
1960
1960
|
assignValue(nested, key, newValue);
|
|
@@ -1980,7 +1980,7 @@ lodash.exports;
|
|
|
1980
1980
|
}
|
|
1981
1981
|
__name(baseShuffle, "baseShuffle");
|
|
1982
1982
|
function baseSlice(array, start, end) {
|
|
1983
|
-
var
|
|
1983
|
+
var index = -1, length = array.length;
|
|
1984
1984
|
if (start < 0) {
|
|
1985
1985
|
start = -start > length ? 0 : length + start;
|
|
1986
1986
|
}
|
|
@@ -1991,16 +1991,16 @@ lodash.exports;
|
|
|
1991
1991
|
length = start > end ? 0 : end - start >>> 0;
|
|
1992
1992
|
start >>>= 0;
|
|
1993
1993
|
var result2 = Array2(length);
|
|
1994
|
-
while (++
|
|
1995
|
-
result2[
|
|
1994
|
+
while (++index < length) {
|
|
1995
|
+
result2[index] = array[index + start];
|
|
1996
1996
|
}
|
|
1997
1997
|
return result2;
|
|
1998
1998
|
}
|
|
1999
1999
|
__name(baseSlice, "baseSlice");
|
|
2000
2000
|
function baseSome(collection, predicate) {
|
|
2001
2001
|
var result2;
|
|
2002
|
-
baseEach(collection, function(value,
|
|
2003
|
-
result2 = predicate(value,
|
|
2002
|
+
baseEach(collection, function(value, index, collection2) {
|
|
2003
|
+
result2 = predicate(value, index, collection2);
|
|
2004
2004
|
return !result2;
|
|
2005
2005
|
});
|
|
2006
2006
|
return !!result2;
|
|
@@ -2054,10 +2054,10 @@ lodash.exports;
|
|
|
2054
2054
|
}
|
|
2055
2055
|
__name(baseSortedIndexBy, "baseSortedIndexBy");
|
|
2056
2056
|
function baseSortedUniq(array, iteratee2) {
|
|
2057
|
-
var
|
|
2058
|
-
while (++
|
|
2059
|
-
var value = array[
|
|
2060
|
-
if (!
|
|
2057
|
+
var index = -1, length = array.length, resIndex = 0, result2 = [];
|
|
2058
|
+
while (++index < length) {
|
|
2059
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
2060
|
+
if (!index || !eq(computed, seen)) {
|
|
2061
2061
|
var seen = computed;
|
|
2062
2062
|
result2[resIndex++] = value === 0 ? 0 : value;
|
|
2063
2063
|
}
|
|
@@ -2090,7 +2090,7 @@ lodash.exports;
|
|
|
2090
2090
|
}
|
|
2091
2091
|
__name(baseToString, "baseToString");
|
|
2092
2092
|
function baseUniq(array, iteratee2, comparator) {
|
|
2093
|
-
var
|
|
2093
|
+
var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
|
|
2094
2094
|
if (comparator) {
|
|
2095
2095
|
isCommon = false;
|
|
2096
2096
|
includes2 = arrayIncludesWith;
|
|
@@ -2106,8 +2106,8 @@ lodash.exports;
|
|
|
2106
2106
|
seen = iteratee2 ? [] : result2;
|
|
2107
2107
|
}
|
|
2108
2108
|
outer:
|
|
2109
|
-
while (++
|
|
2110
|
-
var value = array[
|
|
2109
|
+
while (++index < length) {
|
|
2110
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
2111
2111
|
value = comparator || value !== 0 ? value : 0;
|
|
2112
2112
|
if (isCommon && computed === computed) {
|
|
2113
2113
|
var seenIndex = seen.length;
|
|
@@ -2141,10 +2141,10 @@ lodash.exports;
|
|
|
2141
2141
|
}
|
|
2142
2142
|
__name(baseUpdate, "baseUpdate");
|
|
2143
2143
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
2144
|
-
var length = array.length,
|
|
2145
|
-
while ((fromRight ?
|
|
2144
|
+
var length = array.length, index = fromRight ? length : -1;
|
|
2145
|
+
while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
|
|
2146
2146
|
}
|
|
2147
|
-
return isDrop ? baseSlice(array, fromRight ? 0 :
|
|
2147
|
+
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
|
|
2148
2148
|
}
|
|
2149
2149
|
__name(baseWhile, "baseWhile");
|
|
2150
2150
|
function baseWrapperValue(value, actions) {
|
|
@@ -2162,12 +2162,12 @@ lodash.exports;
|
|
|
2162
2162
|
if (length < 2) {
|
|
2163
2163
|
return length ? baseUniq(arrays[0]) : [];
|
|
2164
2164
|
}
|
|
2165
|
-
var
|
|
2166
|
-
while (++
|
|
2167
|
-
var array = arrays[
|
|
2165
|
+
var index = -1, result2 = Array2(length);
|
|
2166
|
+
while (++index < length) {
|
|
2167
|
+
var array = arrays[index], othIndex = -1;
|
|
2168
2168
|
while (++othIndex < length) {
|
|
2169
|
-
if (othIndex !=
|
|
2170
|
-
result2[
|
|
2169
|
+
if (othIndex != index) {
|
|
2170
|
+
result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator);
|
|
2171
2171
|
}
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
@@ -2175,10 +2175,10 @@ lodash.exports;
|
|
|
2175
2175
|
}
|
|
2176
2176
|
__name(baseXor, "baseXor");
|
|
2177
2177
|
function baseZipObject(props, values2, assignFunc) {
|
|
2178
|
-
var
|
|
2179
|
-
while (++
|
|
2180
|
-
var value =
|
|
2181
|
-
assignFunc(result2, props[
|
|
2178
|
+
var index = -1, length = props.length, valsLength = values2.length, result2 = {};
|
|
2179
|
+
while (++index < length) {
|
|
2180
|
+
var value = index < valsLength ? values2[index] : undefined$1;
|
|
2181
|
+
assignFunc(result2, props[index], value);
|
|
2182
2182
|
}
|
|
2183
2183
|
return result2;
|
|
2184
2184
|
}
|
|
@@ -2208,12 +2208,12 @@ lodash.exports;
|
|
|
2208
2208
|
var clearTimeout = ctxClearTimeout || function(id) {
|
|
2209
2209
|
return root.clearTimeout(id);
|
|
2210
2210
|
};
|
|
2211
|
-
function cloneBuffer(
|
|
2211
|
+
function cloneBuffer(buffer, isDeep) {
|
|
2212
2212
|
if (isDeep) {
|
|
2213
|
-
return
|
|
2213
|
+
return buffer.slice();
|
|
2214
2214
|
}
|
|
2215
|
-
var length =
|
|
2216
|
-
|
|
2215
|
+
var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
2216
|
+
buffer.copy(result2);
|
|
2217
2217
|
return result2;
|
|
2218
2218
|
}
|
|
2219
2219
|
__name(cloneBuffer, "cloneBuffer");
|
|
@@ -2224,8 +2224,8 @@ lodash.exports;
|
|
|
2224
2224
|
}
|
|
2225
2225
|
__name(cloneArrayBuffer, "cloneArrayBuffer");
|
|
2226
2226
|
function cloneDataView(dataView, isDeep) {
|
|
2227
|
-
var
|
|
2228
|
-
return new dataView.constructor(
|
|
2227
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
2228
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
2229
2229
|
}
|
|
2230
2230
|
__name(cloneDataView, "cloneDataView");
|
|
2231
2231
|
function cloneRegExp2(regexp) {
|
|
@@ -2239,8 +2239,8 @@ lodash.exports;
|
|
|
2239
2239
|
}
|
|
2240
2240
|
__name(cloneSymbol, "cloneSymbol");
|
|
2241
2241
|
function cloneTypedArray(typedArray, isDeep) {
|
|
2242
|
-
var
|
|
2243
|
-
return new typedArray.constructor(
|
|
2242
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
2243
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
2244
2244
|
}
|
|
2245
2245
|
__name(cloneTypedArray, "cloneTypedArray");
|
|
2246
2246
|
function compareAscending(value, other) {
|
|
@@ -2258,14 +2258,14 @@ lodash.exports;
|
|
|
2258
2258
|
}
|
|
2259
2259
|
__name(compareAscending, "compareAscending");
|
|
2260
2260
|
function compareMultiple(object, other, orders) {
|
|
2261
|
-
var
|
|
2262
|
-
while (++
|
|
2263
|
-
var result2 = compareAscending(objCriteria[
|
|
2261
|
+
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
2262
|
+
while (++index < length) {
|
|
2263
|
+
var result2 = compareAscending(objCriteria[index], othCriteria[index]);
|
|
2264
2264
|
if (result2) {
|
|
2265
|
-
if (
|
|
2265
|
+
if (index >= ordersLength) {
|
|
2266
2266
|
return result2;
|
|
2267
2267
|
}
|
|
2268
|
-
var order = orders[
|
|
2268
|
+
var order = orders[index];
|
|
2269
2269
|
return result2 * (order == "desc" ? -1 : 1);
|
|
2270
2270
|
}
|
|
2271
2271
|
}
|
|
@@ -2306,10 +2306,10 @@ lodash.exports;
|
|
|
2306
2306
|
}
|
|
2307
2307
|
__name(composeArgsRight, "composeArgsRight");
|
|
2308
2308
|
function copyArray(source2, array) {
|
|
2309
|
-
var
|
|
2309
|
+
var index = -1, length = source2.length;
|
|
2310
2310
|
array || (array = Array2(length));
|
|
2311
|
-
while (++
|
|
2312
|
-
array[
|
|
2311
|
+
while (++index < length) {
|
|
2312
|
+
array[index] = source2[index];
|
|
2313
2313
|
}
|
|
2314
2314
|
return array;
|
|
2315
2315
|
}
|
|
@@ -2317,9 +2317,9 @@ lodash.exports;
|
|
|
2317
2317
|
function copyObject(source2, props, object, customizer) {
|
|
2318
2318
|
var isNew = !object;
|
|
2319
2319
|
object || (object = {});
|
|
2320
|
-
var
|
|
2321
|
-
while (++
|
|
2322
|
-
var key = props[
|
|
2320
|
+
var index = -1, length = props.length;
|
|
2321
|
+
while (++index < length) {
|
|
2322
|
+
var key = props[index];
|
|
2323
2323
|
var newValue = customizer ? customizer(object[key], source2[key], key, object, source2) : undefined$1;
|
|
2324
2324
|
if (newValue === undefined$1) {
|
|
2325
2325
|
newValue = source2[key];
|
|
@@ -2350,17 +2350,17 @@ lodash.exports;
|
|
|
2350
2350
|
__name(createAggregator, "createAggregator");
|
|
2351
2351
|
function createAssigner(assigner) {
|
|
2352
2352
|
return baseRest(function(object, sources) {
|
|
2353
|
-
var
|
|
2353
|
+
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1;
|
|
2354
2354
|
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1;
|
|
2355
2355
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
2356
2356
|
customizer = length < 3 ? undefined$1 : customizer;
|
|
2357
2357
|
length = 1;
|
|
2358
2358
|
}
|
|
2359
2359
|
object = Object2(object);
|
|
2360
|
-
while (++
|
|
2361
|
-
var source2 = sources[
|
|
2360
|
+
while (++index < length) {
|
|
2361
|
+
var source2 = sources[index];
|
|
2362
2362
|
if (source2) {
|
|
2363
|
-
assigner(object, source2,
|
|
2363
|
+
assigner(object, source2, index, customizer);
|
|
2364
2364
|
}
|
|
2365
2365
|
}
|
|
2366
2366
|
return object;
|
|
@@ -2375,9 +2375,9 @@ lodash.exports;
|
|
|
2375
2375
|
if (!isArrayLike(collection)) {
|
|
2376
2376
|
return eachFunc(collection, iteratee2);
|
|
2377
2377
|
}
|
|
2378
|
-
var length = collection.length,
|
|
2379
|
-
while (fromRight ?
|
|
2380
|
-
if (iteratee2(iterable[
|
|
2378
|
+
var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection);
|
|
2379
|
+
while (fromRight ? index-- : ++index < length) {
|
|
2380
|
+
if (iteratee2(iterable[index], index, iterable) === false) {
|
|
2381
2381
|
break;
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
@@ -2387,9 +2387,9 @@ lodash.exports;
|
|
|
2387
2387
|
__name(createBaseEach, "createBaseEach");
|
|
2388
2388
|
function createBaseFor(fromRight) {
|
|
2389
2389
|
return function(object, iteratee2, keysFunc) {
|
|
2390
|
-
var
|
|
2390
|
+
var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
|
|
2391
2391
|
while (length--) {
|
|
2392
|
-
var key = props[fromRight ? length : ++
|
|
2392
|
+
var key = props[fromRight ? length : ++index];
|
|
2393
2393
|
if (iteratee2(iterable[key], key, iterable) === false) {
|
|
2394
2394
|
break;
|
|
2395
2395
|
}
|
|
@@ -2453,9 +2453,9 @@ lodash.exports;
|
|
|
2453
2453
|
function createCurry(func, bitmask, arity) {
|
|
2454
2454
|
var Ctor = createCtor(func);
|
|
2455
2455
|
function wrapper() {
|
|
2456
|
-
var length = arguments.length, args = Array2(length),
|
|
2457
|
-
while (
|
|
2458
|
-
args[
|
|
2456
|
+
var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper);
|
|
2457
|
+
while (index--) {
|
|
2458
|
+
args[index] = arguments[index];
|
|
2459
2459
|
}
|
|
2460
2460
|
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
|
|
2461
2461
|
length -= holders.length;
|
|
@@ -2490,19 +2490,19 @@ lodash.exports;
|
|
|
2490
2490
|
return iteratee2(iterable[key], key, iterable);
|
|
2491
2491
|
}, "predicate");
|
|
2492
2492
|
}
|
|
2493
|
-
var
|
|
2494
|
-
return
|
|
2493
|
+
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
2494
|
+
return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined$1;
|
|
2495
2495
|
};
|
|
2496
2496
|
}
|
|
2497
2497
|
__name(createFind, "createFind");
|
|
2498
2498
|
function createFlow(fromRight) {
|
|
2499
2499
|
return flatRest(function(funcs) {
|
|
2500
|
-
var length = funcs.length,
|
|
2500
|
+
var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
|
|
2501
2501
|
if (fromRight) {
|
|
2502
2502
|
funcs.reverse();
|
|
2503
2503
|
}
|
|
2504
|
-
while (
|
|
2505
|
-
var func = funcs[
|
|
2504
|
+
while (index--) {
|
|
2505
|
+
var func = funcs[index];
|
|
2506
2506
|
if (typeof func != "function") {
|
|
2507
2507
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
2508
2508
|
}
|
|
@@ -2510,9 +2510,9 @@ lodash.exports;
|
|
|
2510
2510
|
var wrapper = new LodashWrapper([], true);
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
|
-
|
|
2514
|
-
while (++
|
|
2515
|
-
func = funcs[
|
|
2513
|
+
index = wrapper ? index : length;
|
|
2514
|
+
while (++index < length) {
|
|
2515
|
+
func = funcs[index];
|
|
2516
2516
|
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
|
|
2517
2517
|
if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
|
|
2518
2518
|
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
|
@@ -2525,9 +2525,9 @@ lodash.exports;
|
|
|
2525
2525
|
if (wrapper && args.length == 1 && isArray2(value)) {
|
|
2526
2526
|
return wrapper.plant(value).value();
|
|
2527
2527
|
}
|
|
2528
|
-
var
|
|
2529
|
-
while (++
|
|
2530
|
-
result2 = funcs[
|
|
2528
|
+
var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value;
|
|
2529
|
+
while (++index2 < length) {
|
|
2530
|
+
result2 = funcs[index2].call(this, result2);
|
|
2531
2531
|
}
|
|
2532
2532
|
return result2;
|
|
2533
2533
|
};
|
|
@@ -2537,9 +2537,9 @@ lodash.exports;
|
|
|
2537
2537
|
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
|
|
2538
2538
|
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined$1 : createCtor(func);
|
|
2539
2539
|
function wrapper() {
|
|
2540
|
-
var length = arguments.length, args = Array2(length),
|
|
2541
|
-
while (
|
|
2542
|
-
args[
|
|
2540
|
+
var length = arguments.length, args = Array2(length), index = length;
|
|
2541
|
+
while (index--) {
|
|
2542
|
+
args[index] = arguments[index];
|
|
2543
2543
|
}
|
|
2544
2544
|
if (isCurried) {
|
|
2545
2545
|
var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
|
|
@@ -2824,13 +2824,13 @@ lodash.exports;
|
|
|
2824
2824
|
if (arrStacked && othStacked) {
|
|
2825
2825
|
return arrStacked == other && othStacked == array;
|
|
2826
2826
|
}
|
|
2827
|
-
var
|
|
2827
|
+
var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1;
|
|
2828
2828
|
stack.set(array, other);
|
|
2829
2829
|
stack.set(other, array);
|
|
2830
|
-
while (++
|
|
2831
|
-
var arrValue = array[
|
|
2830
|
+
while (++index < arrLength) {
|
|
2831
|
+
var arrValue = array[index], othValue = other[index];
|
|
2832
2832
|
if (customizer) {
|
|
2833
|
-
var compared = isPartial ? customizer(othValue, arrValue,
|
|
2833
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
2834
2834
|
}
|
|
2835
2835
|
if (compared !== undefined$1) {
|
|
2836
2836
|
if (compared) {
|
|
@@ -2910,9 +2910,9 @@ lodash.exports;
|
|
|
2910
2910
|
if (objLength != othLength && !isPartial) {
|
|
2911
2911
|
return false;
|
|
2912
2912
|
}
|
|
2913
|
-
var
|
|
2914
|
-
while (
|
|
2915
|
-
var key = objProps[
|
|
2913
|
+
var index = objLength;
|
|
2914
|
+
while (index--) {
|
|
2915
|
+
var key = objProps[index];
|
|
2916
2916
|
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
2917
2917
|
return false;
|
|
2918
2918
|
}
|
|
@@ -2926,8 +2926,8 @@ lodash.exports;
|
|
|
2926
2926
|
stack.set(object, other);
|
|
2927
2927
|
stack.set(other, object);
|
|
2928
2928
|
var skipCtor = isPartial;
|
|
2929
|
-
while (++
|
|
2930
|
-
key = objProps[
|
|
2929
|
+
while (++index < objLength) {
|
|
2930
|
+
key = objProps[index];
|
|
2931
2931
|
var objValue = object[key], othValue = other[key];
|
|
2932
2932
|
if (customizer) {
|
|
2933
2933
|
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
@@ -3062,9 +3062,9 @@ lodash.exports;
|
|
|
3062
3062
|
}, "getTag");
|
|
3063
3063
|
}
|
|
3064
3064
|
function getView(start, end, transforms) {
|
|
3065
|
-
var
|
|
3066
|
-
while (++
|
|
3067
|
-
var data = transforms[
|
|
3065
|
+
var index = -1, length = transforms.length;
|
|
3066
|
+
while (++index < length) {
|
|
3067
|
+
var data = transforms[index], size2 = data.size;
|
|
3068
3068
|
switch (data.type) {
|
|
3069
3069
|
case "drop":
|
|
3070
3070
|
start += size2;
|
|
@@ -3090,15 +3090,15 @@ lodash.exports;
|
|
|
3090
3090
|
__name(getWrapDetails, "getWrapDetails");
|
|
3091
3091
|
function hasPath(object, path, hasFunc) {
|
|
3092
3092
|
path = castPath(path, object);
|
|
3093
|
-
var
|
|
3094
|
-
while (++
|
|
3095
|
-
var key = toKey(path[
|
|
3093
|
+
var index = -1, length = path.length, result2 = false;
|
|
3094
|
+
while (++index < length) {
|
|
3095
|
+
var key = toKey(path[index]);
|
|
3096
3096
|
if (!(result2 = object != null && hasFunc(object, key))) {
|
|
3097
3097
|
break;
|
|
3098
3098
|
}
|
|
3099
3099
|
object = object[key];
|
|
3100
3100
|
}
|
|
3101
|
-
if (result2 || ++
|
|
3101
|
+
if (result2 || ++index != length) {
|
|
3102
3102
|
return result2;
|
|
3103
3103
|
}
|
|
3104
3104
|
length = object == null ? 0 : object.length;
|
|
@@ -3173,13 +3173,13 @@ lodash.exports;
|
|
|
3173
3173
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
3174
3174
|
}
|
|
3175
3175
|
__name(isIndex, "isIndex");
|
|
3176
|
-
function isIterateeCall(value,
|
|
3176
|
+
function isIterateeCall(value, index, object) {
|
|
3177
3177
|
if (!isObject(object)) {
|
|
3178
3178
|
return false;
|
|
3179
3179
|
}
|
|
3180
|
-
var type = typeof
|
|
3181
|
-
if (type == "number" ? isArrayLike(object) && isIndex(
|
|
3182
|
-
return eq(object[
|
|
3180
|
+
var type = typeof index;
|
|
3181
|
+
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
|
|
3182
|
+
return eq(object[index], value);
|
|
3183
3183
|
}
|
|
3184
3184
|
return false;
|
|
3185
3185
|
}
|
|
@@ -3300,14 +3300,14 @@ lodash.exports;
|
|
|
3300
3300
|
function overRest(func, start, transform2) {
|
|
3301
3301
|
start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0);
|
|
3302
3302
|
return function() {
|
|
3303
|
-
var args = arguments,
|
|
3304
|
-
while (++
|
|
3305
|
-
array[
|
|
3303
|
+
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
|
|
3304
|
+
while (++index < length) {
|
|
3305
|
+
array[index] = args[start + index];
|
|
3306
3306
|
}
|
|
3307
|
-
|
|
3307
|
+
index = -1;
|
|
3308
3308
|
var otherArgs = Array2(start + 1);
|
|
3309
|
-
while (++
|
|
3310
|
-
otherArgs[
|
|
3309
|
+
while (++index < start) {
|
|
3310
|
+
otherArgs[index] = args[index];
|
|
3311
3311
|
}
|
|
3312
3312
|
otherArgs[start] = transform2(array);
|
|
3313
3313
|
return apply(func, this, otherArgs);
|
|
@@ -3321,8 +3321,8 @@ lodash.exports;
|
|
|
3321
3321
|
function reorder(array, indexes) {
|
|
3322
3322
|
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
|
3323
3323
|
while (length--) {
|
|
3324
|
-
var
|
|
3325
|
-
array[length] = isIndex(
|
|
3324
|
+
var index = indexes[length];
|
|
3325
|
+
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined$1;
|
|
3326
3326
|
}
|
|
3327
3327
|
return array;
|
|
3328
3328
|
}
|
|
@@ -3364,12 +3364,12 @@ lodash.exports;
|
|
|
3364
3364
|
}
|
|
3365
3365
|
__name(shortOut, "shortOut");
|
|
3366
3366
|
function shuffleSelf(array, size2) {
|
|
3367
|
-
var
|
|
3367
|
+
var index = -1, length = array.length, lastIndex = length - 1;
|
|
3368
3368
|
size2 = size2 === undefined$1 ? length : size2;
|
|
3369
|
-
while (++
|
|
3370
|
-
var rand = baseRandom(
|
|
3371
|
-
array[rand] = array[
|
|
3372
|
-
array[
|
|
3369
|
+
while (++index < size2) {
|
|
3370
|
+
var rand = baseRandom(index, lastIndex), value = array[rand];
|
|
3371
|
+
array[rand] = array[index];
|
|
3372
|
+
array[index] = value;
|
|
3373
3373
|
}
|
|
3374
3374
|
array.length = size2;
|
|
3375
3375
|
return array;
|
|
@@ -3438,17 +3438,17 @@ lodash.exports;
|
|
|
3438
3438
|
if (!length || size2 < 1) {
|
|
3439
3439
|
return [];
|
|
3440
3440
|
}
|
|
3441
|
-
var
|
|
3442
|
-
while (
|
|
3443
|
-
result2[resIndex++] = baseSlice(array,
|
|
3441
|
+
var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
|
|
3442
|
+
while (index < length) {
|
|
3443
|
+
result2[resIndex++] = baseSlice(array, index, index += size2);
|
|
3444
3444
|
}
|
|
3445
3445
|
return result2;
|
|
3446
3446
|
}
|
|
3447
3447
|
__name(chunk, "chunk");
|
|
3448
3448
|
function compact(array) {
|
|
3449
|
-
var
|
|
3450
|
-
while (++
|
|
3451
|
-
var value = array[
|
|
3449
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
|
|
3450
|
+
while (++index < length) {
|
|
3451
|
+
var value = array[index];
|
|
3452
3452
|
if (value) {
|
|
3453
3453
|
result2[resIndex++] = value;
|
|
3454
3454
|
}
|
|
@@ -3461,9 +3461,9 @@ lodash.exports;
|
|
|
3461
3461
|
if (!length) {
|
|
3462
3462
|
return [];
|
|
3463
3463
|
}
|
|
3464
|
-
var args = Array2(length - 1), array = arguments[0],
|
|
3465
|
-
while (
|
|
3466
|
-
args[
|
|
3464
|
+
var args = Array2(length - 1), array = arguments[0], index = length;
|
|
3465
|
+
while (index--) {
|
|
3466
|
+
args[index - 1] = arguments[index];
|
|
3467
3467
|
}
|
|
3468
3468
|
return arrayPush(isArray2(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
|
3469
3469
|
}
|
|
@@ -3529,11 +3529,11 @@ lodash.exports;
|
|
|
3529
3529
|
if (!length) {
|
|
3530
3530
|
return -1;
|
|
3531
3531
|
}
|
|
3532
|
-
var
|
|
3533
|
-
if (
|
|
3534
|
-
|
|
3532
|
+
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
3533
|
+
if (index < 0) {
|
|
3534
|
+
index = nativeMax(length + index, 0);
|
|
3535
3535
|
}
|
|
3536
|
-
return baseFindIndex(array, getIteratee(predicate, 3),
|
|
3536
|
+
return baseFindIndex(array, getIteratee(predicate, 3), index);
|
|
3537
3537
|
}
|
|
3538
3538
|
__name(findIndex, "findIndex");
|
|
3539
3539
|
function findLastIndex(array, predicate, fromIndex) {
|
|
@@ -3541,12 +3541,12 @@ lodash.exports;
|
|
|
3541
3541
|
if (!length) {
|
|
3542
3542
|
return -1;
|
|
3543
3543
|
}
|
|
3544
|
-
var
|
|
3544
|
+
var index = length - 1;
|
|
3545
3545
|
if (fromIndex !== undefined$1) {
|
|
3546
|
-
|
|
3547
|
-
|
|
3546
|
+
index = toInteger(fromIndex);
|
|
3547
|
+
index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
3548
3548
|
}
|
|
3549
|
-
return baseFindIndex(array, getIteratee(predicate, 3),
|
|
3549
|
+
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
|
|
3550
3550
|
}
|
|
3551
3551
|
__name(findLastIndex, "findLastIndex");
|
|
3552
3552
|
function flatten(array) {
|
|
@@ -3569,9 +3569,9 @@ lodash.exports;
|
|
|
3569
3569
|
}
|
|
3570
3570
|
__name(flattenDepth, "flattenDepth");
|
|
3571
3571
|
function fromPairs(pairs) {
|
|
3572
|
-
var
|
|
3573
|
-
while (++
|
|
3574
|
-
var pair = pairs[
|
|
3572
|
+
var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
|
|
3573
|
+
while (++index < length) {
|
|
3574
|
+
var pair = pairs[index];
|
|
3575
3575
|
result2[pair[0]] = pair[1];
|
|
3576
3576
|
}
|
|
3577
3577
|
return result2;
|
|
@@ -3586,11 +3586,11 @@ lodash.exports;
|
|
|
3586
3586
|
if (!length) {
|
|
3587
3587
|
return -1;
|
|
3588
3588
|
}
|
|
3589
|
-
var
|
|
3590
|
-
if (
|
|
3591
|
-
|
|
3589
|
+
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
3590
|
+
if (index < 0) {
|
|
3591
|
+
index = nativeMax(length + index, 0);
|
|
3592
3592
|
}
|
|
3593
|
-
return baseIndexOf(array, value,
|
|
3593
|
+
return baseIndexOf(array, value, index);
|
|
3594
3594
|
}
|
|
3595
3595
|
__name(indexOf, "indexOf");
|
|
3596
3596
|
function initial(array) {
|
|
@@ -3633,12 +3633,12 @@ lodash.exports;
|
|
|
3633
3633
|
if (!length) {
|
|
3634
3634
|
return -1;
|
|
3635
3635
|
}
|
|
3636
|
-
var
|
|
3636
|
+
var index = length;
|
|
3637
3637
|
if (fromIndex !== undefined$1) {
|
|
3638
|
-
|
|
3639
|
-
|
|
3638
|
+
index = toInteger(fromIndex);
|
|
3639
|
+
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
3640
3640
|
}
|
|
3641
|
-
return value === value ? strictLastIndexOf(array, value,
|
|
3641
|
+
return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
|
|
3642
3642
|
}
|
|
3643
3643
|
__name(lastIndexOf, "lastIndexOf");
|
|
3644
3644
|
function nth(array, n) {
|
|
@@ -3660,8 +3660,8 @@ lodash.exports;
|
|
|
3660
3660
|
__name(pullAllWith, "pullAllWith");
|
|
3661
3661
|
var pullAt = flatRest(function(array, indexes) {
|
|
3662
3662
|
var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
|
|
3663
|
-
basePullAt(array, arrayMap(indexes, function(
|
|
3664
|
-
return isIndex(
|
|
3663
|
+
basePullAt(array, arrayMap(indexes, function(index) {
|
|
3664
|
+
return isIndex(index, length) ? +index : index;
|
|
3665
3665
|
}).sort(compareAscending));
|
|
3666
3666
|
return result2;
|
|
3667
3667
|
});
|
|
@@ -3670,13 +3670,13 @@ lodash.exports;
|
|
|
3670
3670
|
if (!(array && array.length)) {
|
|
3671
3671
|
return result2;
|
|
3672
3672
|
}
|
|
3673
|
-
var
|
|
3673
|
+
var index = -1, indexes = [], length = array.length;
|
|
3674
3674
|
predicate = getIteratee(predicate, 3);
|
|
3675
|
-
while (++
|
|
3676
|
-
var value = array[
|
|
3677
|
-
if (predicate(value,
|
|
3675
|
+
while (++index < length) {
|
|
3676
|
+
var value = array[index];
|
|
3677
|
+
if (predicate(value, index, array)) {
|
|
3678
3678
|
result2.push(value);
|
|
3679
|
-
indexes.push(
|
|
3679
|
+
indexes.push(index);
|
|
3680
3680
|
}
|
|
3681
3681
|
}
|
|
3682
3682
|
basePullAt(array, indexes);
|
|
@@ -3713,9 +3713,9 @@ lodash.exports;
|
|
|
3713
3713
|
function sortedIndexOf(array, value) {
|
|
3714
3714
|
var length = array == null ? 0 : array.length;
|
|
3715
3715
|
if (length) {
|
|
3716
|
-
var
|
|
3717
|
-
if (
|
|
3718
|
-
return
|
|
3716
|
+
var index = baseSortedIndex(array, value);
|
|
3717
|
+
if (index < length && eq(array[index], value)) {
|
|
3718
|
+
return index;
|
|
3719
3719
|
}
|
|
3720
3720
|
}
|
|
3721
3721
|
return -1;
|
|
@@ -3732,9 +3732,9 @@ lodash.exports;
|
|
|
3732
3732
|
function sortedLastIndexOf(array, value) {
|
|
3733
3733
|
var length = array == null ? 0 : array.length;
|
|
3734
3734
|
if (length) {
|
|
3735
|
-
var
|
|
3736
|
-
if (eq(array[
|
|
3737
|
-
return
|
|
3735
|
+
var index = baseSortedIndex(array, value, true) - 1;
|
|
3736
|
+
if (eq(array[index], value)) {
|
|
3737
|
+
return index;
|
|
3738
3738
|
}
|
|
3739
3739
|
}
|
|
3740
3740
|
return -1;
|
|
@@ -3818,8 +3818,8 @@ lodash.exports;
|
|
|
3818
3818
|
return true;
|
|
3819
3819
|
}
|
|
3820
3820
|
});
|
|
3821
|
-
return baseTimes(length, function(
|
|
3822
|
-
return arrayMap(array, baseProperty(
|
|
3821
|
+
return baseTimes(length, function(index) {
|
|
3822
|
+
return arrayMap(array, baseProperty(index));
|
|
3823
3823
|
});
|
|
3824
3824
|
}
|
|
3825
3825
|
__name(unzip, "unzip");
|
|
@@ -4026,9 +4026,9 @@ lodash.exports;
|
|
|
4026
4026
|
}
|
|
4027
4027
|
__name(includes, "includes");
|
|
4028
4028
|
var invokeMap = baseRest(function(collection, path, args) {
|
|
4029
|
-
var
|
|
4029
|
+
var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
4030
4030
|
baseEach(collection, function(value) {
|
|
4031
|
-
result2[++
|
|
4031
|
+
result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
|
4032
4032
|
});
|
|
4033
4033
|
return result2;
|
|
4034
4034
|
});
|
|
@@ -4089,11 +4089,11 @@ lodash.exports;
|
|
|
4089
4089
|
return func(collection, n);
|
|
4090
4090
|
}
|
|
4091
4091
|
__name(sampleSize, "sampleSize");
|
|
4092
|
-
function
|
|
4092
|
+
function shuffle2(collection) {
|
|
4093
4093
|
var func = isArray2(collection) ? arrayShuffle : baseShuffle;
|
|
4094
4094
|
return func(collection);
|
|
4095
4095
|
}
|
|
4096
|
-
__name(
|
|
4096
|
+
__name(shuffle2, "shuffle");
|
|
4097
4097
|
function size(collection) {
|
|
4098
4098
|
if (collection == null) {
|
|
4099
4099
|
return 0;
|
|
@@ -4343,9 +4343,9 @@ lodash.exports;
|
|
|
4343
4343
|
transforms = transforms.length == 1 && isArray2(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
|
4344
4344
|
var funcsLength = transforms.length;
|
|
4345
4345
|
return baseRest(function(args) {
|
|
4346
|
-
var
|
|
4347
|
-
while (++
|
|
4348
|
-
args[
|
|
4346
|
+
var index = -1, length = nativeMin(args.length, funcsLength);
|
|
4347
|
+
while (++index < length) {
|
|
4348
|
+
args[index] = transforms[index].call(this, args[index]);
|
|
4349
4349
|
}
|
|
4350
4350
|
return apply(func, this, args);
|
|
4351
4351
|
});
|
|
@@ -4464,7 +4464,7 @@ lodash.exports;
|
|
|
4464
4464
|
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
|
|
4465
4465
|
}
|
|
4466
4466
|
__name(isBoolean, "isBoolean");
|
|
4467
|
-
var
|
|
4467
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
4468
4468
|
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
|
4469
4469
|
function isElement(value) {
|
|
4470
4470
|
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
|
@@ -4474,7 +4474,7 @@ lodash.exports;
|
|
|
4474
4474
|
if (value == null) {
|
|
4475
4475
|
return true;
|
|
4476
4476
|
}
|
|
4477
|
-
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" ||
|
|
4477
|
+
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
4478
4478
|
return !value.length;
|
|
4479
4479
|
}
|
|
4480
4480
|
var tag = getTag(value);
|
|
@@ -4709,14 +4709,14 @@ lodash.exports;
|
|
|
4709
4709
|
__name(create, "create");
|
|
4710
4710
|
var defaults = baseRest(function(object, sources) {
|
|
4711
4711
|
object = Object2(object);
|
|
4712
|
-
var
|
|
4712
|
+
var index = -1;
|
|
4713
4713
|
var length = sources.length;
|
|
4714
4714
|
var guard = length > 2 ? sources[2] : undefined$1;
|
|
4715
4715
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
4716
4716
|
length = 1;
|
|
4717
4717
|
}
|
|
4718
|
-
while (++
|
|
4719
|
-
var source2 = sources[
|
|
4718
|
+
while (++index < length) {
|
|
4719
|
+
var source2 = sources[index];
|
|
4720
4720
|
var props = keysIn(source2);
|
|
4721
4721
|
var propsIndex = -1;
|
|
4722
4722
|
var propsLength = props.length;
|
|
@@ -4871,15 +4871,15 @@ lodash.exports;
|
|
|
4871
4871
|
__name(pickBy, "pickBy");
|
|
4872
4872
|
function result(object, path, defaultValue) {
|
|
4873
4873
|
path = castPath(path, object);
|
|
4874
|
-
var
|
|
4874
|
+
var index = -1, length = path.length;
|
|
4875
4875
|
if (!length) {
|
|
4876
4876
|
length = 1;
|
|
4877
4877
|
object = undefined$1;
|
|
4878
4878
|
}
|
|
4879
|
-
while (++
|
|
4880
|
-
var value = object == null ? undefined$1 : object[toKey(path[
|
|
4879
|
+
while (++index < length) {
|
|
4880
|
+
var value = object == null ? undefined$1 : object[toKey(path[index])];
|
|
4881
4881
|
if (value === undefined$1) {
|
|
4882
|
-
|
|
4882
|
+
index = length;
|
|
4883
4883
|
value = defaultValue;
|
|
4884
4884
|
}
|
|
4885
4885
|
object = isFunction(value) ? value.call(object) : value;
|
|
@@ -4899,7 +4899,7 @@ lodash.exports;
|
|
|
4899
4899
|
var toPairs = createToPairs(keys);
|
|
4900
4900
|
var toPairsIn = createToPairs(keysIn);
|
|
4901
4901
|
function transform(object, iteratee2, accumulator) {
|
|
4902
|
-
var isArr = isArray2(object), isArrLike = isArr ||
|
|
4902
|
+
var isArr = isArray2(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
|
4903
4903
|
iteratee2 = getIteratee(iteratee2, 4);
|
|
4904
4904
|
if (accumulator == null) {
|
|
4905
4905
|
var Ctor = object && object.constructor;
|
|
@@ -4911,8 +4911,8 @@ lodash.exports;
|
|
|
4911
4911
|
accumulator = {};
|
|
4912
4912
|
}
|
|
4913
4913
|
}
|
|
4914
|
-
(isArrLike ? arrayEach : baseForOwn)(object, function(value,
|
|
4915
|
-
return iteratee2(accumulator, value,
|
|
4914
|
+
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) {
|
|
4915
|
+
return iteratee2(accumulator, value, index, object2);
|
|
4916
4916
|
});
|
|
4917
4917
|
return accumulator;
|
|
4918
4918
|
}
|
|
@@ -4966,7 +4966,7 @@ lodash.exports;
|
|
|
4966
4966
|
return baseInRange(number, start, end);
|
|
4967
4967
|
}
|
|
4968
4968
|
__name(inRange, "inRange");
|
|
4969
|
-
function
|
|
4969
|
+
function random2(lower, upper, floating) {
|
|
4970
4970
|
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
|
|
4971
4971
|
upper = floating = undefined$1;
|
|
4972
4972
|
}
|
|
@@ -5002,10 +5002,10 @@ lodash.exports;
|
|
|
5002
5002
|
}
|
|
5003
5003
|
return baseRandom(lower, upper);
|
|
5004
5004
|
}
|
|
5005
|
-
__name(
|
|
5006
|
-
var camelCase = createCompounder(function(result2, word,
|
|
5005
|
+
__name(random2, "random");
|
|
5006
|
+
var camelCase = createCompounder(function(result2, word, index) {
|
|
5007
5007
|
word = word.toLowerCase();
|
|
5008
|
-
return result2 + (
|
|
5008
|
+
return result2 + (index ? capitalize(word) : word);
|
|
5009
5009
|
});
|
|
5010
5010
|
function capitalize(string) {
|
|
5011
5011
|
return upperFirst(toString(string).toLowerCase());
|
|
@@ -5036,11 +5036,11 @@ lodash.exports;
|
|
|
5036
5036
|
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
|
|
5037
5037
|
}
|
|
5038
5038
|
__name(escapeRegExp, "escapeRegExp");
|
|
5039
|
-
var kebabCase = createCompounder(function(result2, word,
|
|
5040
|
-
return result2 + (
|
|
5039
|
+
var kebabCase = createCompounder(function(result2, word, index) {
|
|
5040
|
+
return result2 + (index ? "-" : "") + word.toLowerCase();
|
|
5041
5041
|
});
|
|
5042
|
-
var lowerCase = createCompounder(function(result2, word,
|
|
5043
|
-
return result2 + (
|
|
5042
|
+
var lowerCase = createCompounder(function(result2, word, index) {
|
|
5043
|
+
return result2 + (index ? " " : "") + word.toLowerCase();
|
|
5044
5044
|
});
|
|
5045
5045
|
var lowerFirst = createCaseFirst("toLowerCase");
|
|
5046
5046
|
function pad(string, length, chars) {
|
|
@@ -5091,8 +5091,8 @@ lodash.exports;
|
|
|
5091
5091
|
return args.length < 3 ? string : string.replace(args[1], args[2]);
|
|
5092
5092
|
}
|
|
5093
5093
|
__name(replace, "replace");
|
|
5094
|
-
var snakeCase = createCompounder(function(result2, word,
|
|
5095
|
-
return result2 + (
|
|
5094
|
+
var snakeCase = createCompounder(function(result2, word, index) {
|
|
5095
|
+
return result2 + (index ? "_" : "") + word.toLowerCase();
|
|
5096
5096
|
});
|
|
5097
5097
|
function split(string, separator, limit) {
|
|
5098
5098
|
if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
|
|
@@ -5112,8 +5112,8 @@ lodash.exports;
|
|
|
5112
5112
|
return string.split(separator, limit);
|
|
5113
5113
|
}
|
|
5114
5114
|
__name(split, "split");
|
|
5115
|
-
var startCase = createCompounder(function(result2, word,
|
|
5116
|
-
return result2 + (
|
|
5115
|
+
var startCase = createCompounder(function(result2, word, index) {
|
|
5116
|
+
return result2 + (index ? " " : "") + upperFirst(word);
|
|
5117
5117
|
});
|
|
5118
5118
|
function startsWith(string, target, position) {
|
|
5119
5119
|
string = toString(string);
|
|
@@ -5130,7 +5130,7 @@ lodash.exports;
|
|
|
5130
5130
|
string = toString(string);
|
|
5131
5131
|
options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
|
5132
5132
|
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
|
|
5133
|
-
var isEscaping, isEvaluating,
|
|
5133
|
+
var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source2 = "__p += '";
|
|
5134
5134
|
var reDelimiters = RegExp2(
|
|
5135
5135
|
(options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
|
|
5136
5136
|
"g"
|
|
@@ -5138,7 +5138,7 @@ lodash.exports;
|
|
|
5138
5138
|
var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
|
|
5139
5139
|
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
|
5140
5140
|
interpolateValue || (interpolateValue = esTemplateValue);
|
|
5141
|
-
source2 += string.slice(
|
|
5141
|
+
source2 += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
|
|
5142
5142
|
if (escapeValue) {
|
|
5143
5143
|
isEscaping = true;
|
|
5144
5144
|
source2 += "' +\n__e(" + escapeValue + ") +\n'";
|
|
@@ -5150,7 +5150,7 @@ lodash.exports;
|
|
|
5150
5150
|
if (interpolateValue) {
|
|
5151
5151
|
source2 += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
|
|
5152
5152
|
}
|
|
5153
|
-
|
|
5153
|
+
index = offset + match.length;
|
|
5154
5154
|
return match;
|
|
5155
5155
|
});
|
|
5156
5156
|
source2 += "';\n";
|
|
@@ -5256,9 +5256,9 @@ lodash.exports;
|
|
|
5256
5256
|
result2 = result2.slice(0, newEnd === undefined$1 ? end : newEnd);
|
|
5257
5257
|
}
|
|
5258
5258
|
} else if (string.indexOf(baseToString(separator), end) != end) {
|
|
5259
|
-
var
|
|
5260
|
-
if (
|
|
5261
|
-
result2 = result2.slice(0,
|
|
5259
|
+
var index = result2.lastIndexOf(separator);
|
|
5260
|
+
if (index > -1) {
|
|
5261
|
+
result2 = result2.slice(0, index);
|
|
5262
5262
|
}
|
|
5263
5263
|
}
|
|
5264
5264
|
return result2 + omission;
|
|
@@ -5269,8 +5269,8 @@ lodash.exports;
|
|
|
5269
5269
|
return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
|
|
5270
5270
|
}
|
|
5271
5271
|
__name(unescape, "unescape");
|
|
5272
|
-
var upperCase = createCompounder(function(result2, word,
|
|
5273
|
-
return result2 + (
|
|
5272
|
+
var upperCase = createCompounder(function(result2, word, index) {
|
|
5273
|
+
return result2 + (index ? " " : "") + word.toUpperCase();
|
|
5274
5274
|
});
|
|
5275
5275
|
var upperFirst = createCaseFirst("toUpperCase");
|
|
5276
5276
|
function words(string, pattern, guard) {
|
|
@@ -5305,9 +5305,9 @@ lodash.exports;
|
|
|
5305
5305
|
return [toIteratee(pair[0]), pair[1]];
|
|
5306
5306
|
});
|
|
5307
5307
|
return baseRest(function(args) {
|
|
5308
|
-
var
|
|
5309
|
-
while (++
|
|
5310
|
-
var pair = pairs[
|
|
5308
|
+
var index = -1;
|
|
5309
|
+
while (++index < length) {
|
|
5310
|
+
var pair = pairs[index];
|
|
5311
5311
|
if (apply(pair[0], this, args)) {
|
|
5312
5312
|
return apply(pair[1], this, args);
|
|
5313
5313
|
}
|
|
@@ -5442,12 +5442,12 @@ lodash.exports;
|
|
|
5442
5442
|
if (n < 1 || n > MAX_SAFE_INTEGER) {
|
|
5443
5443
|
return [];
|
|
5444
5444
|
}
|
|
5445
|
-
var
|
|
5445
|
+
var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
|
|
5446
5446
|
iteratee2 = getIteratee(iteratee2);
|
|
5447
5447
|
n -= MAX_ARRAY_LENGTH;
|
|
5448
5448
|
var result2 = baseTimes(length, iteratee2);
|
|
5449
|
-
while (++
|
|
5450
|
-
iteratee2(
|
|
5449
|
+
while (++index < n) {
|
|
5450
|
+
iteratee2(index);
|
|
5451
5451
|
}
|
|
5452
5452
|
return result2;
|
|
5453
5453
|
}
|
|
@@ -5615,7 +5615,7 @@ lodash.exports;
|
|
|
5615
5615
|
lodash2.sampleSize = sampleSize;
|
|
5616
5616
|
lodash2.set = set;
|
|
5617
5617
|
lodash2.setWith = setWith;
|
|
5618
|
-
lodash2.shuffle =
|
|
5618
|
+
lodash2.shuffle = shuffle2;
|
|
5619
5619
|
lodash2.slice = slice;
|
|
5620
5620
|
lodash2.sortBy = sortBy;
|
|
5621
5621
|
lodash2.sortedUniq = sortedUniq;
|
|
@@ -5714,7 +5714,7 @@ lodash.exports;
|
|
|
5714
5714
|
lodash2.isArrayLike = isArrayLike;
|
|
5715
5715
|
lodash2.isArrayLikeObject = isArrayLikeObject;
|
|
5716
5716
|
lodash2.isBoolean = isBoolean;
|
|
5717
|
-
lodash2.isBuffer =
|
|
5717
|
+
lodash2.isBuffer = isBuffer;
|
|
5718
5718
|
lodash2.isDate = isDate;
|
|
5719
5719
|
lodash2.isElement = isElement;
|
|
5720
5720
|
lodash2.isEmpty = isEmpty;
|
|
@@ -5773,7 +5773,7 @@ lodash.exports;
|
|
|
5773
5773
|
lodash2.padEnd = padEnd;
|
|
5774
5774
|
lodash2.padStart = padStart;
|
|
5775
5775
|
lodash2.parseInt = parseInt2;
|
|
5776
|
-
lodash2.random =
|
|
5776
|
+
lodash2.random = random2;
|
|
5777
5777
|
lodash2.reduce = reduce;
|
|
5778
5778
|
lodash2.reduceRight = reduceRight;
|
|
5779
5779
|
lodash2.repeat = repeat;
|
|
@@ -5830,10 +5830,10 @@ lodash.exports;
|
|
|
5830
5830
|
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
|
5831
5831
|
lodash2[methodName].placeholder = lodash2;
|
|
5832
5832
|
});
|
|
5833
|
-
arrayEach(["drop", "take"], function(methodName,
|
|
5833
|
+
arrayEach(["drop", "take"], function(methodName, index) {
|
|
5834
5834
|
LazyWrapper.prototype[methodName] = function(n) {
|
|
5835
5835
|
n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0);
|
|
5836
|
-
var result2 = this.__filtered__ && !
|
|
5836
|
+
var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
|
|
5837
5837
|
if (result2.__filtered__) {
|
|
5838
5838
|
result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
|
|
5839
5839
|
} else {
|
|
@@ -5848,8 +5848,8 @@ lodash.exports;
|
|
|
5848
5848
|
return this.reverse()[methodName](n).reverse();
|
|
5849
5849
|
};
|
|
5850
5850
|
});
|
|
5851
|
-
arrayEach(["filter", "map", "takeWhile"], function(methodName,
|
|
5852
|
-
var type =
|
|
5851
|
+
arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
|
|
5852
|
+
var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
|
5853
5853
|
LazyWrapper.prototype[methodName] = function(iteratee2) {
|
|
5854
5854
|
var result2 = this.clone();
|
|
5855
5855
|
result2.__iteratees__.push({
|
|
@@ -5860,14 +5860,14 @@ lodash.exports;
|
|
|
5860
5860
|
return result2;
|
|
5861
5861
|
};
|
|
5862
5862
|
});
|
|
5863
|
-
arrayEach(["head", "last"], function(methodName,
|
|
5864
|
-
var takeName = "take" + (
|
|
5863
|
+
arrayEach(["head", "last"], function(methodName, index) {
|
|
5864
|
+
var takeName = "take" + (index ? "Right" : "");
|
|
5865
5865
|
LazyWrapper.prototype[methodName] = function() {
|
|
5866
5866
|
return this[takeName](1).value()[0];
|
|
5867
5867
|
};
|
|
5868
5868
|
});
|
|
5869
|
-
arrayEach(["initial", "tail"], function(methodName,
|
|
5870
|
-
var dropName = "drop" + (
|
|
5869
|
+
arrayEach(["initial", "tail"], function(methodName, index) {
|
|
5870
|
+
var dropName = "drop" + (index ? "" : "Right");
|
|
5871
5871
|
LazyWrapper.prototype[methodName] = function() {
|
|
5872
5872
|
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
|
5873
5873
|
};
|
|
@@ -6556,7 +6556,7 @@ function trimRangeByAnotherRange(rangeToBeTrimmed, trimmingRange, sequenceLength
|
|
|
6556
6556
|
rangeToBeTrimmed,
|
|
6557
6557
|
sequenceLength
|
|
6558
6558
|
);
|
|
6559
|
-
splitRangesToBeTrimmed.forEach(function(nonCircularRangeToBeTrimmed,
|
|
6559
|
+
splitRangesToBeTrimmed.forEach(function(nonCircularRangeToBeTrimmed, index) {
|
|
6560
6560
|
overlaps.forEach(function(overlap) {
|
|
6561
6561
|
if (nonCircularRangeToBeTrimmed) {
|
|
6562
6562
|
nonCircularRangeToBeTrimmed = trimNonCicularRangeByAnotherNonCircularRange(
|
|
@@ -6565,7 +6565,7 @@ function trimRangeByAnotherRange(rangeToBeTrimmed, trimmingRange, sequenceLength
|
|
|
6565
6565
|
);
|
|
6566
6566
|
}
|
|
6567
6567
|
});
|
|
6568
|
-
splitRangesToBeTrimmed[
|
|
6568
|
+
splitRangesToBeTrimmed[index] = nonCircularRangeToBeTrimmed;
|
|
6569
6569
|
});
|
|
6570
6570
|
const outputSplitRanges = splitRangesToBeTrimmed.filter(function(trimmedRange) {
|
|
6571
6571
|
if (trimmedRange) {
|
|
@@ -6720,12 +6720,12 @@ function provideInclusiveOptions(funToWrap) {
|
|
|
6720
6720
|
const args = Array.prototype.slice.call(arguments);
|
|
6721
6721
|
const options = args[args.length - 1];
|
|
6722
6722
|
if (options && (options.inclusive1BasedEnd || options.inclusive1BasedStart)) {
|
|
6723
|
-
args.forEach(function(arg,
|
|
6723
|
+
args.forEach(function(arg, index) {
|
|
6724
6724
|
if (arg && arg.start > -1 && options.inclusive1BasedStart) {
|
|
6725
|
-
args[
|
|
6725
|
+
args[index] = lodashExports.assign(arg, { start: arg.start - 1 });
|
|
6726
6726
|
}
|
|
6727
6727
|
if (arg && arg.end > -1 && options.inclusive1BasedEnd) {
|
|
6728
|
-
args[
|
|
6728
|
+
args[index] = lodashExports.assign(arg, { end: arg.end - 1 });
|
|
6729
6729
|
}
|
|
6730
6730
|
});
|
|
6731
6731
|
}
|
|
@@ -6755,7 +6755,7 @@ function getRangeLength$1(range, rangeMax) {
|
|
|
6755
6755
|
}
|
|
6756
6756
|
__name(getRangeLength$1, "getRangeLength$1");
|
|
6757
6757
|
function isRangeWithinRange(rangeToCheck, containingRange, maxLength) {
|
|
6758
|
-
|
|
6758
|
+
const ranges = trimRangeByAnotherRange(
|
|
6759
6759
|
rangeToCheck,
|
|
6760
6760
|
containingRange,
|
|
6761
6761
|
maxLength
|
|
@@ -6920,14 +6920,14 @@ function getShortestDistanceBetweenTwoPositions(position1, position2, sequenceLe
|
|
|
6920
6920
|
__name(getShortestDistanceBetweenTwoPositions, "getShortestDistanceBetweenTwoPositions");
|
|
6921
6921
|
function getYOffsetForPotentiallyCircularRange(range, YOffsetLevelsWithRanges, assignYOffsetToRange) {
|
|
6922
6922
|
let yOffset = [];
|
|
6923
|
-
const openYOffsetFound = YOffsetLevelsWithRanges.some(function(rangesAlreadyAddedToYOffset,
|
|
6923
|
+
const openYOffsetFound = YOffsetLevelsWithRanges.some(function(rangesAlreadyAddedToYOffset, index) {
|
|
6924
6924
|
const rangeBlocked = rangesAlreadyAddedToYOffset.some(function(comparisonRange) {
|
|
6925
6925
|
return checkIfPotentiallyCircularRangesOverlap(range, comparisonRange);
|
|
6926
6926
|
});
|
|
6927
6927
|
if (!rangeBlocked) {
|
|
6928
|
-
yOffset =
|
|
6928
|
+
yOffset = index;
|
|
6929
6929
|
if (assignYOffsetToRange)
|
|
6930
|
-
range.yOffset =
|
|
6930
|
+
range.yOffset = index;
|
|
6931
6931
|
rangesAlreadyAddedToYOffset.push(range);
|
|
6932
6932
|
return true;
|
|
6933
6933
|
}
|
|
@@ -7239,9 +7239,9 @@ function convertApELikeRegexToRegex(regString = "") {
|
|
|
7239
7239
|
let isGroupClosed = true;
|
|
7240
7240
|
let closingBraceHit;
|
|
7241
7241
|
const groups = [];
|
|
7242
|
-
for (let
|
|
7243
|
-
const char = newstr[
|
|
7244
|
-
const nextChar = newstr[
|
|
7242
|
+
for (let index = 0; index < newstr.length; index++) {
|
|
7243
|
+
const char = newstr[index];
|
|
7244
|
+
const nextChar = newstr[index + 1];
|
|
7245
7245
|
if (char === "[") {
|
|
7246
7246
|
isGroupClosed = false;
|
|
7247
7247
|
} else if (char === "]" || closingBraceHit) {
|
|
@@ -7419,151 +7419,232 @@ const getFeatureToColorMap = /* @__PURE__ */ __name(({ includeHidden } = {}) =>
|
|
|
7419
7419
|
const getFeatureTypes = /* @__PURE__ */ __name(({ includeHidden } = {}) => lodashExports.filter(getMergedFeatureMap(), (f) => includeHidden ? true : !f.isHidden).map(
|
|
7420
7420
|
(f) => f.name
|
|
7421
7421
|
), "getFeatureTypes");
|
|
7422
|
-
var
|
|
7423
|
-
var
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
return
|
|
7427
|
-
}, "isBuffer");
|
|
7428
|
-
function ObjectID(arg) {
|
|
7429
|
-
if (!(this instanceof ObjectID))
|
|
7430
|
-
return new ObjectID(arg);
|
|
7431
|
-
if (arg && (arg instanceof ObjectID || arg._bsontype === "ObjectID"))
|
|
7432
|
-
return arg;
|
|
7433
|
-
var buf;
|
|
7434
|
-
if (isBuffer(arg) || Array.isArray(arg) && arg.length === 12) {
|
|
7435
|
-
buf = Array.prototype.slice.call(arg);
|
|
7436
|
-
} else if (typeof arg === "string") {
|
|
7437
|
-
if (arg.length !== 12 && !ObjectID.isValid(arg))
|
|
7438
|
-
throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
|
|
7439
|
-
buf = buffer(arg);
|
|
7440
|
-
} else if (/number|undefined/.test(typeof arg)) {
|
|
7441
|
-
buf = buffer(generate(arg));
|
|
7442
|
-
}
|
|
7443
|
-
Object.defineProperty(this, "id", {
|
|
7444
|
-
enumerable: true,
|
|
7445
|
-
get: function() {
|
|
7446
|
-
return String.fromCharCode.apply(this, buf);
|
|
7447
|
-
}
|
|
7448
|
-
});
|
|
7449
|
-
Object.defineProperty(this, "str", {
|
|
7450
|
-
get: function() {
|
|
7451
|
-
return buf.map(hex.bind(this, 2)).join("");
|
|
7452
|
-
}
|
|
7453
|
-
});
|
|
7422
|
+
var lib = { exports: {} };
|
|
7423
|
+
var seed = 1;
|
|
7424
|
+
function getNextValue() {
|
|
7425
|
+
seed = (seed * 9301 + 49297) % 233280;
|
|
7426
|
+
return seed / 233280;
|
|
7454
7427
|
}
|
|
7455
|
-
__name(
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
ObjectID.createFromHexString = function(hexString) {
|
|
7464
|
-
if (!ObjectID.isValid(hexString))
|
|
7465
|
-
throw new Error("Invalid ObjectID hex string");
|
|
7466
|
-
return new ObjectID(hexString);
|
|
7467
|
-
};
|
|
7468
|
-
ObjectID.isValid = function(objectid2) {
|
|
7469
|
-
if (!objectid2 || typeof objectid2 !== "string" && (typeof objectid2 !== "object" || Array.isArray(objectid2) || typeof objectid2.toString !== "function"))
|
|
7470
|
-
return false;
|
|
7471
|
-
return /^[0-9A-F]{24}$/i.test(objectid2.toString());
|
|
7428
|
+
__name(getNextValue, "getNextValue");
|
|
7429
|
+
function setSeed$1(_seed_) {
|
|
7430
|
+
seed = _seed_;
|
|
7431
|
+
}
|
|
7432
|
+
__name(setSeed$1, "setSeed$1");
|
|
7433
|
+
var randomFromSeed$1 = {
|
|
7434
|
+
nextValue: getNextValue,
|
|
7435
|
+
seed: setSeed$1
|
|
7472
7436
|
};
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7437
|
+
var randomFromSeed = randomFromSeed$1;
|
|
7438
|
+
var ORIGINAL = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
|
|
7439
|
+
var alphabet$2;
|
|
7440
|
+
var previousSeed;
|
|
7441
|
+
var shuffled;
|
|
7442
|
+
function reset() {
|
|
7443
|
+
shuffled = false;
|
|
7444
|
+
}
|
|
7445
|
+
__name(reset, "reset");
|
|
7446
|
+
function setCharacters(_alphabet_) {
|
|
7447
|
+
if (!_alphabet_) {
|
|
7448
|
+
if (alphabet$2 !== ORIGINAL) {
|
|
7449
|
+
alphabet$2 = ORIGINAL;
|
|
7450
|
+
reset();
|
|
7483
7451
|
}
|
|
7484
|
-
|
|
7485
|
-
machineID = arg | 0;
|
|
7452
|
+
return;
|
|
7486
7453
|
}
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
ObjectID.getMachineID = function() {
|
|
7490
|
-
return MACHINE_ID;
|
|
7491
|
-
};
|
|
7492
|
-
ObjectID.prototype = {
|
|
7493
|
-
_bsontype: "ObjectID",
|
|
7494
|
-
constructor: ObjectID,
|
|
7495
|
-
/**
|
|
7496
|
-
* Return the ObjectID id as a 24 byte hex string representation
|
|
7497
|
-
*
|
|
7498
|
-
* @return {String} return the 24 byte hex string representation.
|
|
7499
|
-
* @api public
|
|
7500
|
-
*/
|
|
7501
|
-
toHexString: function() {
|
|
7502
|
-
return this.str;
|
|
7503
|
-
},
|
|
7504
|
-
/**
|
|
7505
|
-
* Compares the equality of this ObjectID with `otherID`.
|
|
7506
|
-
*
|
|
7507
|
-
* @param {Object} other ObjectID instance to compare against.
|
|
7508
|
-
* @return {Boolean} the result of comparing two ObjectID's
|
|
7509
|
-
* @api public
|
|
7510
|
-
*/
|
|
7511
|
-
equals: function(other) {
|
|
7512
|
-
return !!other && this.str === other.toString();
|
|
7513
|
-
},
|
|
7514
|
-
/**
|
|
7515
|
-
* Returns the generation date (accurate up to the second) that this ID was generated.
|
|
7516
|
-
*
|
|
7517
|
-
* @return {Date} the generation date
|
|
7518
|
-
* @api public
|
|
7519
|
-
*/
|
|
7520
|
-
getTimestamp: function() {
|
|
7521
|
-
return new Date(parseInt(this.str.substr(0, 8), 16) * 1e3);
|
|
7454
|
+
if (_alphabet_ === alphabet$2) {
|
|
7455
|
+
return;
|
|
7522
7456
|
}
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7457
|
+
if (_alphabet_.length !== ORIGINAL.length) {
|
|
7458
|
+
throw new Error("Custom alphabet for shortid must be " + ORIGINAL.length + " unique characters. You submitted " + _alphabet_.length + " characters: " + _alphabet_);
|
|
7459
|
+
}
|
|
7460
|
+
var unique = _alphabet_.split("").filter(function(item, ind, arr) {
|
|
7461
|
+
return ind !== arr.lastIndexOf(item);
|
|
7462
|
+
});
|
|
7463
|
+
if (unique.length) {
|
|
7464
|
+
throw new Error("Custom alphabet for shortid must be " + ORIGINAL.length + " unique characters. These characters were not unique: " + unique.join(", "));
|
|
7465
|
+
}
|
|
7466
|
+
alphabet$2 = _alphabet_;
|
|
7467
|
+
reset();
|
|
7526
7468
|
}
|
|
7527
|
-
__name(
|
|
7528
|
-
function
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
time = parseInt(time, 10) % 4294967295;
|
|
7532
|
-
return hex(8, time) + hex(6, MACHINE_ID) + hex(4, pid) + hex(6, next());
|
|
7469
|
+
__name(setCharacters, "setCharacters");
|
|
7470
|
+
function characters(_alphabet_) {
|
|
7471
|
+
setCharacters(_alphabet_);
|
|
7472
|
+
return alphabet$2;
|
|
7533
7473
|
}
|
|
7534
|
-
__name(
|
|
7535
|
-
function
|
|
7536
|
-
|
|
7537
|
-
|
|
7474
|
+
__name(characters, "characters");
|
|
7475
|
+
function setSeed(seed2) {
|
|
7476
|
+
randomFromSeed.seed(seed2);
|
|
7477
|
+
if (previousSeed !== seed2) {
|
|
7478
|
+
reset();
|
|
7479
|
+
previousSeed = seed2;
|
|
7480
|
+
}
|
|
7538
7481
|
}
|
|
7539
|
-
__name(
|
|
7540
|
-
function
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7482
|
+
__name(setSeed, "setSeed");
|
|
7483
|
+
function shuffle() {
|
|
7484
|
+
if (!alphabet$2) {
|
|
7485
|
+
setCharacters(ORIGINAL);
|
|
7486
|
+
}
|
|
7487
|
+
var sourceArray = alphabet$2.split("");
|
|
7488
|
+
var targetArray = [];
|
|
7489
|
+
var r = randomFromSeed.nextValue();
|
|
7490
|
+
var characterIndex;
|
|
7491
|
+
while (sourceArray.length > 0) {
|
|
7492
|
+
r = randomFromSeed.nextValue();
|
|
7493
|
+
characterIndex = Math.floor(r * sourceArray.length);
|
|
7494
|
+
targetArray.push(sourceArray.splice(characterIndex, 1)[0]);
|
|
7495
|
+
}
|
|
7496
|
+
return targetArray.join("");
|
|
7497
|
+
}
|
|
7498
|
+
__name(shuffle, "shuffle");
|
|
7499
|
+
function getShuffled() {
|
|
7500
|
+
if (shuffled) {
|
|
7501
|
+
return shuffled;
|
|
7502
|
+
}
|
|
7503
|
+
shuffled = shuffle();
|
|
7504
|
+
return shuffled;
|
|
7549
7505
|
}
|
|
7550
|
-
__name(
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
return
|
|
7506
|
+
__name(getShuffled, "getShuffled");
|
|
7507
|
+
function lookup(index) {
|
|
7508
|
+
var alphabetShuffled = getShuffled();
|
|
7509
|
+
return alphabetShuffled[index];
|
|
7510
|
+
}
|
|
7511
|
+
__name(lookup, "lookup");
|
|
7512
|
+
function get$2() {
|
|
7513
|
+
return alphabet$2 || ORIGINAL;
|
|
7514
|
+
}
|
|
7515
|
+
__name(get$2, "get$2");
|
|
7516
|
+
var alphabet_1 = {
|
|
7517
|
+
get: get$2,
|
|
7518
|
+
characters,
|
|
7519
|
+
seed: setSeed,
|
|
7520
|
+
lookup,
|
|
7521
|
+
shuffled: getShuffled
|
|
7554
7522
|
};
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7523
|
+
var crypto = typeof window === "object" && (window.crypto || window.msCrypto);
|
|
7524
|
+
var randomByte;
|
|
7525
|
+
if (!crypto || !crypto.getRandomValues) {
|
|
7526
|
+
randomByte = /* @__PURE__ */ __name(function(size) {
|
|
7527
|
+
var bytes = [];
|
|
7528
|
+
for (var i = 0; i < size; i++) {
|
|
7529
|
+
bytes.push(Math.floor(Math.random() * 256));
|
|
7530
|
+
}
|
|
7531
|
+
return bytes;
|
|
7532
|
+
}, "randomByte");
|
|
7533
|
+
} else {
|
|
7534
|
+
randomByte = /* @__PURE__ */ __name(function(size) {
|
|
7535
|
+
return crypto.getRandomValues(new Uint8Array(size));
|
|
7536
|
+
}, "randomByte");
|
|
7537
|
+
}
|
|
7538
|
+
var randomByteBrowser = randomByte;
|
|
7539
|
+
var format_browser = /* @__PURE__ */ __name(function(random2, alphabet2, size) {
|
|
7540
|
+
var mask = (2 << Math.log(alphabet2.length - 1) / Math.LN2) - 1;
|
|
7541
|
+
var step = -~(1.6 * mask * size / alphabet2.length);
|
|
7542
|
+
var id = "";
|
|
7543
|
+
while (true) {
|
|
7544
|
+
var bytes = random2(step);
|
|
7545
|
+
var i = step;
|
|
7546
|
+
while (i--) {
|
|
7547
|
+
id += alphabet2[bytes[i] & mask] || "";
|
|
7548
|
+
if (id.length === +size)
|
|
7549
|
+
return id;
|
|
7550
|
+
}
|
|
7551
|
+
}
|
|
7552
|
+
}, "format_browser");
|
|
7553
|
+
var alphabet$1 = alphabet_1;
|
|
7554
|
+
var random = randomByteBrowser;
|
|
7555
|
+
var format = format_browser;
|
|
7556
|
+
function generate$1(number) {
|
|
7557
|
+
var loopCounter = 0;
|
|
7558
|
+
var done;
|
|
7559
|
+
var str = "";
|
|
7560
|
+
while (!done) {
|
|
7561
|
+
str = str + format(random, alphabet$1.get(), 1);
|
|
7562
|
+
done = number < Math.pow(16, loopCounter + 1);
|
|
7563
|
+
loopCounter++;
|
|
7564
|
+
}
|
|
7565
|
+
return str;
|
|
7566
|
+
}
|
|
7567
|
+
__name(generate$1, "generate$1");
|
|
7568
|
+
var generate_1 = generate$1;
|
|
7569
|
+
var generate = generate_1;
|
|
7570
|
+
var REDUCE_TIME = 1567752802062;
|
|
7571
|
+
var version = 7;
|
|
7572
|
+
var counter;
|
|
7573
|
+
var previousSeconds;
|
|
7574
|
+
function build(clusterWorkerId) {
|
|
7575
|
+
var str = "";
|
|
7576
|
+
var seconds = Math.floor((Date.now() - REDUCE_TIME) * 1e-3);
|
|
7577
|
+
if (seconds === previousSeconds) {
|
|
7578
|
+
counter++;
|
|
7579
|
+
} else {
|
|
7580
|
+
counter = 0;
|
|
7581
|
+
previousSeconds = seconds;
|
|
7582
|
+
}
|
|
7583
|
+
str = str + generate(version);
|
|
7584
|
+
str = str + generate(clusterWorkerId);
|
|
7585
|
+
if (counter > 0) {
|
|
7586
|
+
str = str + generate(counter);
|
|
7587
|
+
}
|
|
7588
|
+
str = str + generate(seconds);
|
|
7589
|
+
return str;
|
|
7590
|
+
}
|
|
7591
|
+
__name(build, "build");
|
|
7592
|
+
var build_1 = build;
|
|
7593
|
+
var alphabet = alphabet_1;
|
|
7594
|
+
function isShortId(id) {
|
|
7595
|
+
if (!id || typeof id !== "string" || id.length < 6) {
|
|
7596
|
+
return false;
|
|
7597
|
+
}
|
|
7598
|
+
var nonAlphabetic = new RegExp("[^" + alphabet.get().replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&") + "]");
|
|
7599
|
+
return !nonAlphabetic.test(id);
|
|
7600
|
+
}
|
|
7601
|
+
__name(isShortId, "isShortId");
|
|
7602
|
+
var isValid = isShortId;
|
|
7603
|
+
(function(module) {
|
|
7604
|
+
var alphabet2 = alphabet_1;
|
|
7605
|
+
var build2 = build_1;
|
|
7606
|
+
var isValid$1 = isValid;
|
|
7607
|
+
var clusterWorkerId = 0;
|
|
7608
|
+
function seed2(seedValue) {
|
|
7609
|
+
alphabet2.seed(seedValue);
|
|
7610
|
+
return module.exports;
|
|
7611
|
+
}
|
|
7612
|
+
__name(seed2, "seed");
|
|
7613
|
+
function worker(workerId) {
|
|
7614
|
+
clusterWorkerId = workerId;
|
|
7615
|
+
return module.exports;
|
|
7616
|
+
}
|
|
7617
|
+
__name(worker, "worker");
|
|
7618
|
+
function characters2(newCharacters) {
|
|
7619
|
+
if (newCharacters !== void 0) {
|
|
7620
|
+
alphabet2.characters(newCharacters);
|
|
7621
|
+
}
|
|
7622
|
+
return alphabet2.shuffled();
|
|
7623
|
+
}
|
|
7624
|
+
__name(characters2, "characters");
|
|
7625
|
+
function generate2() {
|
|
7626
|
+
return build2(clusterWorkerId);
|
|
7627
|
+
}
|
|
7628
|
+
__name(generate2, "generate");
|
|
7629
|
+
module.exports = generate2;
|
|
7630
|
+
module.exports.generate = generate2;
|
|
7631
|
+
module.exports.seed = seed2;
|
|
7632
|
+
module.exports.worker = worker;
|
|
7633
|
+
module.exports.characters = characters2;
|
|
7634
|
+
module.exports.isValid = isValid$1;
|
|
7635
|
+
})(lib);
|
|
7636
|
+
var libExports = lib.exports;
|
|
7637
|
+
var shortid = libExports;
|
|
7638
|
+
const shortid$1 = /* @__PURE__ */ getDefaultExportFromCjs(shortid);
|
|
7558
7639
|
function cutSequenceByRestrictionEnzyme(pSequence, circular, restrictionEnzyme) {
|
|
7559
7640
|
if (restrictionEnzyme.forwardRegex.length === 0 || restrictionEnzyme.reverseRegex.length === 0) {
|
|
7560
|
-
|
|
7641
|
+
const returnArray = [];
|
|
7561
7642
|
returnArray.error = "Cannot cut sequence. Enzyme restriction site must be at least 1 bp long.";
|
|
7562
7643
|
return returnArray;
|
|
7563
7644
|
}
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7645
|
+
const forwardRegExpPattern = new RegExp(restrictionEnzyme.forwardRegex, "ig");
|
|
7646
|
+
const sequence = pSequence;
|
|
7647
|
+
const cutsitesForward = cutSequence(
|
|
7567
7648
|
forwardRegExpPattern,
|
|
7568
7649
|
restrictionEnzyme,
|
|
7569
7650
|
sequence,
|
|
@@ -7571,7 +7652,7 @@ function cutSequenceByRestrictionEnzyme(pSequence, circular, restrictionEnzyme)
|
|
|
7571
7652
|
);
|
|
7572
7653
|
let cutsitesReverse = [];
|
|
7573
7654
|
if (restrictionEnzyme.forwardRegex !== restrictionEnzyme.reverseRegex) {
|
|
7574
|
-
|
|
7655
|
+
const revSequence = getReverseComplementSequenceString(sequence);
|
|
7575
7656
|
cutsitesReverse = cutSequence(
|
|
7576
7657
|
forwardRegExpPattern,
|
|
7577
7658
|
restrictionEnzyme,
|
|
@@ -7639,20 +7720,20 @@ function cutSequenceByRestrictionEnzyme(pSequence, circular, restrictionEnzyme)
|
|
|
7639
7720
|
}
|
|
7640
7721
|
__name(cutSequenceByRestrictionEnzyme, "cutSequenceByRestrictionEnzyme");
|
|
7641
7722
|
function cutSequence(forwardRegExpPattern, restrictionEnzyme, sequence, circular) {
|
|
7642
|
-
|
|
7723
|
+
const restrictionCutSites = [];
|
|
7643
7724
|
let restrictionCutSite;
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7725
|
+
const recognitionSiteLength = restrictionEnzyme.site.length;
|
|
7726
|
+
const originalSequence = sequence;
|
|
7727
|
+
const originalSequenceLength = sequence.length;
|
|
7647
7728
|
if (circular) {
|
|
7648
7729
|
sequence += sequence;
|
|
7649
7730
|
}
|
|
7650
|
-
|
|
7731
|
+
const currentSequenceLength = sequence.length;
|
|
7651
7732
|
let matchIndex = sequence.search(forwardRegExpPattern);
|
|
7652
7733
|
let startIndex = 0;
|
|
7653
7734
|
let subSequence = sequence;
|
|
7654
7735
|
while (matchIndex !== -1) {
|
|
7655
|
-
|
|
7736
|
+
const recognitionSiteRange = {};
|
|
7656
7737
|
let start;
|
|
7657
7738
|
let end;
|
|
7658
7739
|
let upstreamTopSnip = null;
|
|
@@ -7760,9 +7841,9 @@ function cutSequence(forwardRegExpPattern, restrictionEnzyme, sequence, circular
|
|
|
7760
7841
|
)
|
|
7761
7842
|
};
|
|
7762
7843
|
}
|
|
7763
|
-
|
|
7844
|
+
const overhangBps = getSequenceWithinRange(cutRange, originalSequence);
|
|
7764
7845
|
restrictionCutSite = {
|
|
7765
|
-
id:
|
|
7846
|
+
id: shortid$1(),
|
|
7766
7847
|
start,
|
|
7767
7848
|
end,
|
|
7768
7849
|
topSnipPosition,
|
|
@@ -7820,7 +7901,7 @@ function computeDigestFragments({
|
|
|
7820
7901
|
});
|
|
7821
7902
|
if (!circular && cutsites.length) {
|
|
7822
7903
|
sortedCutsites.push({
|
|
7823
|
-
id: "seqTerm_" +
|
|
7904
|
+
id: "seqTerm_" + shortid$1(),
|
|
7824
7905
|
start: 0,
|
|
7825
7906
|
end: 0,
|
|
7826
7907
|
overhangBps: "",
|
|
@@ -7841,19 +7922,19 @@ function computeDigestFragments({
|
|
|
7841
7922
|
}
|
|
7842
7923
|
});
|
|
7843
7924
|
}
|
|
7844
|
-
sortedCutsites.forEach((cutsite1,
|
|
7925
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
7845
7926
|
if (computePartialDigest && !computePartialDigestDisabled) {
|
|
7846
|
-
sortedCutsites.forEach((cs,
|
|
7847
|
-
if (
|
|
7927
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
7928
|
+
if (index2 === index + 1 || index2 === 0) {
|
|
7848
7929
|
return;
|
|
7849
7930
|
}
|
|
7850
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
7931
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
7851
7932
|
});
|
|
7852
7933
|
}
|
|
7853
7934
|
if (!computeDigestDisabled) {
|
|
7854
7935
|
pairs.push([
|
|
7855
7936
|
cutsite1,
|
|
7856
|
-
sortedCutsites[
|
|
7937
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
7857
7938
|
]);
|
|
7858
7939
|
}
|
|
7859
7940
|
});
|
|
@@ -8332,11 +8413,11 @@ var diffMatchPatch = { exports: {} };
|
|
|
8332
8413
|
}
|
|
8333
8414
|
var dmp2 = this;
|
|
8334
8415
|
function diff_halfMatchI_(longtext2, shorttext2, i) {
|
|
8335
|
-
var
|
|
8416
|
+
var seed2 = longtext2.substring(i, i + Math.floor(longtext2.length / 4));
|
|
8336
8417
|
var j = -1;
|
|
8337
8418
|
var best_common = "";
|
|
8338
8419
|
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
|
|
8339
|
-
while ((j = shorttext2.indexOf(
|
|
8420
|
+
while ((j = shorttext2.indexOf(seed2, j + 1)) != -1) {
|
|
8340
8421
|
var prefixLength = dmp2.diff_commonPrefix(
|
|
8341
8422
|
longtext2.substring(i),
|
|
8342
8423
|
shorttext2.substring(j)
|
|
@@ -10540,30 +10621,30 @@ var browser = {
|
|
|
10540
10621
|
stderr: false
|
|
10541
10622
|
};
|
|
10542
10623
|
const stringReplaceAll$1 = /* @__PURE__ */ __name((string, substring, replacer) => {
|
|
10543
|
-
let
|
|
10544
|
-
if (
|
|
10624
|
+
let index = string.indexOf(substring);
|
|
10625
|
+
if (index === -1) {
|
|
10545
10626
|
return string;
|
|
10546
10627
|
}
|
|
10547
10628
|
const substringLength = substring.length;
|
|
10548
10629
|
let endIndex = 0;
|
|
10549
10630
|
let returnValue = "";
|
|
10550
10631
|
do {
|
|
10551
|
-
returnValue += string.substr(endIndex,
|
|
10552
|
-
endIndex =
|
|
10553
|
-
|
|
10554
|
-
} while (
|
|
10632
|
+
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
10633
|
+
endIndex = index + substringLength;
|
|
10634
|
+
index = string.indexOf(substring, endIndex);
|
|
10635
|
+
} while (index !== -1);
|
|
10555
10636
|
returnValue += string.substr(endIndex);
|
|
10556
10637
|
return returnValue;
|
|
10557
10638
|
}, "stringReplaceAll$1");
|
|
10558
|
-
const stringEncaseCRLFWithFirstIndex$1 = /* @__PURE__ */ __name((string, prefix, postfix,
|
|
10639
|
+
const stringEncaseCRLFWithFirstIndex$1 = /* @__PURE__ */ __name((string, prefix, postfix, index) => {
|
|
10559
10640
|
let endIndex = 0;
|
|
10560
10641
|
let returnValue = "";
|
|
10561
10642
|
do {
|
|
10562
|
-
const gotCR = string[
|
|
10563
|
-
returnValue += string.substr(endIndex, (gotCR ?
|
|
10564
|
-
endIndex =
|
|
10565
|
-
|
|
10566
|
-
} while (
|
|
10643
|
+
const gotCR = string[index - 1] === "\r";
|
|
10644
|
+
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
10645
|
+
endIndex = index + 1;
|
|
10646
|
+
index = string.indexOf("\n", endIndex);
|
|
10647
|
+
} while (index !== -1);
|
|
10567
10648
|
returnValue += string.substr(endIndex);
|
|
10568
10649
|
return returnValue;
|
|
10569
10650
|
}, "stringEncaseCRLFWithFirstIndex$1");
|
|
@@ -10974,7 +11055,7 @@ var Processor = function() {
|
|
|
10974
11055
|
}, "pipe")
|
|
10975
11056
|
}, {
|
|
10976
11057
|
key: "process",
|
|
10977
|
-
value: /* @__PURE__ */ __name(function
|
|
11058
|
+
value: /* @__PURE__ */ __name(function process(input, pipe) {
|
|
10978
11059
|
var context = input;
|
|
10979
11060
|
context.options = this.options();
|
|
10980
11061
|
var nextPipe = pipe || input.pipe || "default";
|
|
@@ -11013,15 +11094,15 @@ var Pipe = function() {
|
|
|
11013
11094
|
__name(Pipe2, "Pipe");
|
|
11014
11095
|
createClass(Pipe2, [{
|
|
11015
11096
|
key: "process",
|
|
11016
|
-
value: /* @__PURE__ */ __name(function
|
|
11097
|
+
value: /* @__PURE__ */ __name(function process(input) {
|
|
11017
11098
|
if (!this.processor) {
|
|
11018
11099
|
throw new Error("add this pipe to a processor before using it");
|
|
11019
11100
|
}
|
|
11020
11101
|
var debug = this.debug;
|
|
11021
11102
|
var length = this.filters.length;
|
|
11022
11103
|
var context = input;
|
|
11023
|
-
for (var
|
|
11024
|
-
var filter = this.filters[
|
|
11104
|
+
for (var index = 0; index < length; index++) {
|
|
11105
|
+
var filter = this.filters[index];
|
|
11025
11106
|
if (debug) {
|
|
11026
11107
|
this.log("filter: " + filter.filterName);
|
|
11027
11108
|
}
|
|
@@ -11060,10 +11141,10 @@ var Pipe = function() {
|
|
|
11060
11141
|
if (!filterName) {
|
|
11061
11142
|
throw new Error("a filter name is required");
|
|
11062
11143
|
}
|
|
11063
|
-
for (var
|
|
11064
|
-
var filter = this.filters[
|
|
11144
|
+
for (var index = 0; index < this.filters.length; index++) {
|
|
11145
|
+
var filter = this.filters[index];
|
|
11065
11146
|
if (filter.filterName === filterName) {
|
|
11066
|
-
return
|
|
11147
|
+
return index;
|
|
11067
11148
|
}
|
|
11068
11149
|
}
|
|
11069
11150
|
throw new Error("filter not found: " + filterName);
|
|
@@ -11078,44 +11159,44 @@ var Pipe = function() {
|
|
|
11078
11159
|
}, {
|
|
11079
11160
|
key: "after",
|
|
11080
11161
|
value: /* @__PURE__ */ __name(function after(filterName) {
|
|
11081
|
-
var
|
|
11162
|
+
var index = this.indexOf(filterName);
|
|
11082
11163
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11083
11164
|
if (!params.length) {
|
|
11084
11165
|
throw new Error("a filter is required");
|
|
11085
11166
|
}
|
|
11086
|
-
params.unshift(
|
|
11167
|
+
params.unshift(index + 1, 0);
|
|
11087
11168
|
Array.prototype.splice.apply(this.filters, params);
|
|
11088
11169
|
return this;
|
|
11089
11170
|
}, "after")
|
|
11090
11171
|
}, {
|
|
11091
11172
|
key: "before",
|
|
11092
11173
|
value: /* @__PURE__ */ __name(function before(filterName) {
|
|
11093
|
-
var
|
|
11174
|
+
var index = this.indexOf(filterName);
|
|
11094
11175
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11095
11176
|
if (!params.length) {
|
|
11096
11177
|
throw new Error("a filter is required");
|
|
11097
11178
|
}
|
|
11098
|
-
params.unshift(
|
|
11179
|
+
params.unshift(index, 0);
|
|
11099
11180
|
Array.prototype.splice.apply(this.filters, params);
|
|
11100
11181
|
return this;
|
|
11101
11182
|
}, "before")
|
|
11102
11183
|
}, {
|
|
11103
11184
|
key: "replace",
|
|
11104
11185
|
value: /* @__PURE__ */ __name(function replace(filterName) {
|
|
11105
|
-
var
|
|
11186
|
+
var index = this.indexOf(filterName);
|
|
11106
11187
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11107
11188
|
if (!params.length) {
|
|
11108
11189
|
throw new Error("a filter is required");
|
|
11109
11190
|
}
|
|
11110
|
-
params.unshift(
|
|
11191
|
+
params.unshift(index, 1);
|
|
11111
11192
|
Array.prototype.splice.apply(this.filters, params);
|
|
11112
11193
|
return this;
|
|
11113
11194
|
}, "replace")
|
|
11114
11195
|
}, {
|
|
11115
11196
|
key: "remove",
|
|
11116
11197
|
value: /* @__PURE__ */ __name(function remove(filterName) {
|
|
11117
|
-
var
|
|
11118
|
-
this.filters.splice(
|
|
11198
|
+
var index = this.indexOf(filterName);
|
|
11199
|
+
this.filters.splice(index, 1);
|
|
11119
11200
|
return this;
|
|
11120
11201
|
}, "remove")
|
|
11121
11202
|
}, {
|
|
@@ -11168,11 +11249,11 @@ var Context = function() {
|
|
|
11168
11249
|
}, "exit")
|
|
11169
11250
|
}, {
|
|
11170
11251
|
key: "switchTo",
|
|
11171
|
-
value: /* @__PURE__ */ __name(function switchTo(
|
|
11172
|
-
if (typeof
|
|
11173
|
-
this.nextPipe =
|
|
11252
|
+
value: /* @__PURE__ */ __name(function switchTo(next, pipe) {
|
|
11253
|
+
if (typeof next === "string" || next instanceof Pipe) {
|
|
11254
|
+
this.nextPipe = next;
|
|
11174
11255
|
} else {
|
|
11175
|
-
this.next =
|
|
11256
|
+
this.next = next;
|
|
11176
11257
|
if (pipe) {
|
|
11177
11258
|
this.nextPipe = pipe;
|
|
11178
11259
|
}
|
|
@@ -11397,8 +11478,8 @@ function collectChildrenDiffFilter(context) {
|
|
|
11397
11478
|
var length = context.children.length;
|
|
11398
11479
|
var child = void 0;
|
|
11399
11480
|
var result = context.result;
|
|
11400
|
-
for (var
|
|
11401
|
-
child = context.children[
|
|
11481
|
+
for (var index = 0; index < length; index++) {
|
|
11482
|
+
child = context.children[index];
|
|
11402
11483
|
if (typeof child.result === "undefined") {
|
|
11403
11484
|
continue;
|
|
11404
11485
|
}
|
|
@@ -11474,8 +11555,8 @@ var collectChildrenPatchFilter = /* @__PURE__ */ __name(function collectChildren
|
|
|
11474
11555
|
}
|
|
11475
11556
|
var length = context.children.length;
|
|
11476
11557
|
var child = void 0;
|
|
11477
|
-
for (var
|
|
11478
|
-
child = context.children[
|
|
11558
|
+
for (var index = 0; index < length; index++) {
|
|
11559
|
+
child = context.children[index];
|
|
11479
11560
|
if (Object.prototype.hasOwnProperty.call(context.left, child.childName) && child.result === void 0) {
|
|
11480
11561
|
delete context.left[child.childName];
|
|
11481
11562
|
} else if (context.left[child.childName] !== child.result) {
|
|
@@ -11511,8 +11592,8 @@ function collectChildrenReverseFilter(context) {
|
|
|
11511
11592
|
var length = context.children.length;
|
|
11512
11593
|
var child = void 0;
|
|
11513
11594
|
var delta = {};
|
|
11514
|
-
for (var
|
|
11515
|
-
child = context.children[
|
|
11595
|
+
for (var index = 0; index < length; index++) {
|
|
11596
|
+
child = context.children[index];
|
|
11516
11597
|
if (delta[child.childName] !== child.result) {
|
|
11517
11598
|
delta[child.childName] = child.result;
|
|
11518
11599
|
}
|
|
@@ -11666,9 +11747,9 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11666
11747
|
};
|
|
11667
11748
|
var commonHead = 0;
|
|
11668
11749
|
var commonTail = 0;
|
|
11669
|
-
var
|
|
11750
|
+
var index = void 0;
|
|
11670
11751
|
var index1 = void 0;
|
|
11671
|
-
var
|
|
11752
|
+
var index2 = void 0;
|
|
11672
11753
|
var array1 = context.left;
|
|
11673
11754
|
var array2 = context.right;
|
|
11674
11755
|
var len1 = array1.length;
|
|
@@ -11678,16 +11759,16 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11678
11759
|
matchContext.matchByPosition = !arraysHaveMatchByRef(array1, array2, len1, len2);
|
|
11679
11760
|
}
|
|
11680
11761
|
while (commonHead < len1 && commonHead < len2 && matchItems(array1, array2, commonHead, commonHead, matchContext)) {
|
|
11681
|
-
|
|
11682
|
-
child = new DiffContext(context.left[
|
|
11683
|
-
context.push(child,
|
|
11762
|
+
index = commonHead;
|
|
11763
|
+
child = new DiffContext(context.left[index], context.right[index]);
|
|
11764
|
+
context.push(child, index);
|
|
11684
11765
|
commonHead++;
|
|
11685
11766
|
}
|
|
11686
11767
|
while (commonTail + commonHead < len1 && commonTail + commonHead < len2 && matchItems(array1, array2, len1 - 1 - commonTail, len2 - 1 - commonTail, matchContext)) {
|
|
11687
11768
|
index1 = len1 - 1 - commonTail;
|
|
11688
|
-
|
|
11689
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11690
|
-
context.push(child,
|
|
11769
|
+
index2 = len2 - 1 - commonTail;
|
|
11770
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11771
|
+
context.push(child, index2);
|
|
11691
11772
|
commonTail++;
|
|
11692
11773
|
}
|
|
11693
11774
|
var result = void 0;
|
|
@@ -11699,8 +11780,8 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11699
11780
|
result = result || {
|
|
11700
11781
|
_t: "a"
|
|
11701
11782
|
};
|
|
11702
|
-
for (
|
|
11703
|
-
result[
|
|
11783
|
+
for (index = commonHead; index < len2 - commonTail; index++) {
|
|
11784
|
+
result[index] = [array2[index]];
|
|
11704
11785
|
}
|
|
11705
11786
|
context.setResult(result).exit();
|
|
11706
11787
|
return;
|
|
@@ -11709,8 +11790,8 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11709
11790
|
result = result || {
|
|
11710
11791
|
_t: "a"
|
|
11711
11792
|
};
|
|
11712
|
-
for (
|
|
11713
|
-
result["_" +
|
|
11793
|
+
for (index = commonHead; index < len1 - commonTail; index++) {
|
|
11794
|
+
result["_" + index] = [array1[index], 0, 0];
|
|
11714
11795
|
}
|
|
11715
11796
|
context.setResult(result).exit();
|
|
11716
11797
|
return;
|
|
@@ -11724,10 +11805,10 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11724
11805
|
result = result || {
|
|
11725
11806
|
_t: "a"
|
|
11726
11807
|
};
|
|
11727
|
-
for (
|
|
11728
|
-
if (arrayIndexOf(seq.indices1,
|
|
11729
|
-
result["_" +
|
|
11730
|
-
removedItems.push(
|
|
11808
|
+
for (index = commonHead; index < len1 - commonTail; index++) {
|
|
11809
|
+
if (arrayIndexOf(seq.indices1, index - commonHead) < 0) {
|
|
11810
|
+
result["_" + index] = [array1[index], 0, 0];
|
|
11811
|
+
removedItems.push(index);
|
|
11731
11812
|
}
|
|
11732
11813
|
}
|
|
11733
11814
|
var detectMove = true;
|
|
@@ -11739,21 +11820,21 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11739
11820
|
includeValueOnMove = true;
|
|
11740
11821
|
}
|
|
11741
11822
|
var removedItemsLength = removedItems.length;
|
|
11742
|
-
for (
|
|
11743
|
-
var indexOnArray2 = arrayIndexOf(seq.indices2,
|
|
11823
|
+
for (index = commonHead; index < len2 - commonTail; index++) {
|
|
11824
|
+
var indexOnArray2 = arrayIndexOf(seq.indices2, index - commonHead);
|
|
11744
11825
|
if (indexOnArray2 < 0) {
|
|
11745
11826
|
var isMove = false;
|
|
11746
11827
|
if (detectMove && removedItemsLength > 0) {
|
|
11747
11828
|
for (var removeItemIndex1 = 0; removeItemIndex1 < removedItemsLength; removeItemIndex1++) {
|
|
11748
11829
|
index1 = removedItems[removeItemIndex1];
|
|
11749
|
-
if (matchItems(trimmed1, trimmed2, index1 - commonHead,
|
|
11750
|
-
result["_" + index1].splice(1, 2,
|
|
11830
|
+
if (matchItems(trimmed1, trimmed2, index1 - commonHead, index - commonHead, matchContext)) {
|
|
11831
|
+
result["_" + index1].splice(1, 2, index, ARRAY_MOVE);
|
|
11751
11832
|
if (!includeValueOnMove) {
|
|
11752
11833
|
result["_" + index1][0] = "";
|
|
11753
11834
|
}
|
|
11754
|
-
|
|
11755
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11756
|
-
context.push(child,
|
|
11835
|
+
index2 = index;
|
|
11836
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11837
|
+
context.push(child, index2);
|
|
11757
11838
|
removedItems.splice(removeItemIndex1, 1);
|
|
11758
11839
|
isMove = true;
|
|
11759
11840
|
break;
|
|
@@ -11761,13 +11842,13 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11761
11842
|
}
|
|
11762
11843
|
}
|
|
11763
11844
|
if (!isMove) {
|
|
11764
|
-
result[
|
|
11845
|
+
result[index] = [array2[index]];
|
|
11765
11846
|
}
|
|
11766
11847
|
} else {
|
|
11767
11848
|
index1 = seq.indices1[indexOnArray2] + commonHead;
|
|
11768
|
-
|
|
11769
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11770
|
-
context.push(child,
|
|
11849
|
+
index2 = seq.indices2[indexOnArray2] + commonHead;
|
|
11850
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11851
|
+
context.push(child, index2);
|
|
11771
11852
|
}
|
|
11772
11853
|
}
|
|
11773
11854
|
context.setResult(result).exit();
|
|
@@ -11790,39 +11871,39 @@ var patchFilter$2 = /* @__PURE__ */ __name(function nestedPatchFilter2(context)
|
|
|
11790
11871
|
if (context.delta._t !== "a") {
|
|
11791
11872
|
return;
|
|
11792
11873
|
}
|
|
11793
|
-
var
|
|
11874
|
+
var index = void 0;
|
|
11794
11875
|
var index1 = void 0;
|
|
11795
11876
|
var delta = context.delta;
|
|
11796
11877
|
var array = context.left;
|
|
11797
11878
|
var toRemove = [];
|
|
11798
11879
|
var toInsert = [];
|
|
11799
11880
|
var toModify = [];
|
|
11800
|
-
for (
|
|
11801
|
-
if (
|
|
11802
|
-
if (
|
|
11803
|
-
if (delta[
|
|
11804
|
-
toRemove.push(parseInt(
|
|
11881
|
+
for (index in delta) {
|
|
11882
|
+
if (index !== "_t") {
|
|
11883
|
+
if (index[0] === "_") {
|
|
11884
|
+
if (delta[index][2] === 0 || delta[index][2] === ARRAY_MOVE) {
|
|
11885
|
+
toRemove.push(parseInt(index.slice(1), 10));
|
|
11805
11886
|
} else {
|
|
11806
|
-
throw new Error("only removal or move can be applied at original array indices," + (" invalid diff type: " + delta[
|
|
11887
|
+
throw new Error("only removal or move can be applied at original array indices," + (" invalid diff type: " + delta[index][2]));
|
|
11807
11888
|
}
|
|
11808
11889
|
} else {
|
|
11809
|
-
if (delta[
|
|
11890
|
+
if (delta[index].length === 1) {
|
|
11810
11891
|
toInsert.push({
|
|
11811
|
-
index: parseInt(
|
|
11812
|
-
value: delta[
|
|
11892
|
+
index: parseInt(index, 10),
|
|
11893
|
+
value: delta[index][0]
|
|
11813
11894
|
});
|
|
11814
11895
|
} else {
|
|
11815
11896
|
toModify.push({
|
|
11816
|
-
index: parseInt(
|
|
11817
|
-
delta: delta[
|
|
11897
|
+
index: parseInt(index, 10),
|
|
11898
|
+
delta: delta[index]
|
|
11818
11899
|
});
|
|
11819
11900
|
}
|
|
11820
11901
|
}
|
|
11821
11902
|
}
|
|
11822
11903
|
}
|
|
11823
11904
|
toRemove = toRemove.sort(compare.numerically);
|
|
11824
|
-
for (
|
|
11825
|
-
index1 = toRemove[
|
|
11905
|
+
for (index = toRemove.length - 1; index >= 0; index--) {
|
|
11906
|
+
index1 = toRemove[index];
|
|
11826
11907
|
var indexDiff = delta["_" + index1];
|
|
11827
11908
|
var removedValue = array.splice(index1, 1)[0];
|
|
11828
11909
|
if (indexDiff[2] === ARRAY_MOVE) {
|
|
@@ -11834,15 +11915,15 @@ var patchFilter$2 = /* @__PURE__ */ __name(function nestedPatchFilter2(context)
|
|
|
11834
11915
|
}
|
|
11835
11916
|
toInsert = toInsert.sort(compare.numericallyBy("index"));
|
|
11836
11917
|
var toInsertLength = toInsert.length;
|
|
11837
|
-
for (
|
|
11838
|
-
var insertion = toInsert[
|
|
11918
|
+
for (index = 0; index < toInsertLength; index++) {
|
|
11919
|
+
var insertion = toInsert[index];
|
|
11839
11920
|
array.splice(insertion.index, 0, insertion.value);
|
|
11840
11921
|
}
|
|
11841
11922
|
var toModifyLength = toModify.length;
|
|
11842
11923
|
var child = void 0;
|
|
11843
11924
|
if (toModifyLength > 0) {
|
|
11844
|
-
for (
|
|
11845
|
-
var modification = toModify[
|
|
11925
|
+
for (index = 0; index < toModifyLength; index++) {
|
|
11926
|
+
var modification = toModify[index];
|
|
11846
11927
|
child = new PatchContext(context.left[modification.index], modification.delta);
|
|
11847
11928
|
context.push(child, modification.index);
|
|
11848
11929
|
}
|
|
@@ -11863,8 +11944,8 @@ var collectChildrenPatchFilter$1 = /* @__PURE__ */ __name(function collectChildr
|
|
|
11863
11944
|
}
|
|
11864
11945
|
var length = context.children.length;
|
|
11865
11946
|
var child = void 0;
|
|
11866
|
-
for (var
|
|
11867
|
-
child = context.children[
|
|
11947
|
+
for (var index = 0; index < length; index++) {
|
|
11948
|
+
child = context.children[index];
|
|
11868
11949
|
context.left[child.childName] = child.result;
|
|
11869
11950
|
}
|
|
11870
11951
|
context.setResult(context.left).exit();
|
|
@@ -11893,20 +11974,20 @@ var reverseFilter$2 = /* @__PURE__ */ __name(function arraysReverseFilter(contex
|
|
|
11893
11974
|
context.exit();
|
|
11894
11975
|
}, "arraysReverseFilter");
|
|
11895
11976
|
reverseFilter$2.filterName = "arrays";
|
|
11896
|
-
var reverseArrayDeltaIndex = /* @__PURE__ */ __name(function reverseArrayDeltaIndex2(delta,
|
|
11897
|
-
if (typeof
|
|
11898
|
-
return parseInt(
|
|
11977
|
+
var reverseArrayDeltaIndex = /* @__PURE__ */ __name(function reverseArrayDeltaIndex2(delta, index, itemDelta) {
|
|
11978
|
+
if (typeof index === "string" && index[0] === "_") {
|
|
11979
|
+
return parseInt(index.substr(1), 10);
|
|
11899
11980
|
} else if (isArray$2(itemDelta) && itemDelta[2] === 0) {
|
|
11900
|
-
return "_" +
|
|
11981
|
+
return "_" + index;
|
|
11901
11982
|
}
|
|
11902
|
-
var reverseIndex = +
|
|
11983
|
+
var reverseIndex = +index;
|
|
11903
11984
|
for (var deltaIndex in delta) {
|
|
11904
11985
|
var deltaItem = delta[deltaIndex];
|
|
11905
11986
|
if (isArray$2(deltaItem)) {
|
|
11906
11987
|
if (deltaItem[2] === ARRAY_MOVE) {
|
|
11907
11988
|
var moveFromIndex = parseInt(deltaIndex.substr(1), 10);
|
|
11908
11989
|
var moveToIndex = deltaItem[1];
|
|
11909
|
-
if (moveToIndex === +
|
|
11990
|
+
if (moveToIndex === +index) {
|
|
11910
11991
|
return moveFromIndex;
|
|
11911
11992
|
}
|
|
11912
11993
|
if (moveFromIndex <= reverseIndex && moveToIndex > reverseIndex) {
|
|
@@ -11938,8 +12019,8 @@ function collectChildrenReverseFilter$1(context) {
|
|
|
11938
12019
|
var delta = {
|
|
11939
12020
|
_t: "a"
|
|
11940
12021
|
};
|
|
11941
|
-
for (var
|
|
11942
|
-
child = context.children[
|
|
12022
|
+
for (var index = 0; index < length; index++) {
|
|
12023
|
+
child = context.children[index];
|
|
11943
12024
|
var name = child.newName;
|
|
11944
12025
|
if (typeof name === "undefined") {
|
|
11945
12026
|
name = reverseArrayDeltaIndex(context.delta, child.childName, child.result);
|
|
@@ -12163,7 +12244,7 @@ var BaseFormatter = function() {
|
|
|
12163
12244
|
__name(BaseFormatter2, "BaseFormatter");
|
|
12164
12245
|
createClass(BaseFormatter2, [{
|
|
12165
12246
|
key: "format",
|
|
12166
|
-
value: /* @__PURE__ */ __name(function
|
|
12247
|
+
value: /* @__PURE__ */ __name(function format2(delta, left) {
|
|
12167
12248
|
var context = {};
|
|
12168
12249
|
this.prepareContext(context);
|
|
12169
12250
|
this.recurse(context, delta, left);
|
|
@@ -12191,9 +12272,9 @@ var BaseFormatter = function() {
|
|
|
12191
12272
|
}, {
|
|
12192
12273
|
key: "finalize",
|
|
12193
12274
|
value: /* @__PURE__ */ __name(function finalize(_ref) {
|
|
12194
|
-
var
|
|
12195
|
-
if (isArray$3(
|
|
12196
|
-
return
|
|
12275
|
+
var buffer = _ref.buffer;
|
|
12276
|
+
if (isArray$3(buffer)) {
|
|
12277
|
+
return buffer.join("");
|
|
12197
12278
|
}
|
|
12198
12279
|
}, "finalize")
|
|
12199
12280
|
}, {
|
|
@@ -12272,13 +12353,13 @@ var BaseFormatter = function() {
|
|
|
12272
12353
|
} else {
|
|
12273
12354
|
keys.sort();
|
|
12274
12355
|
}
|
|
12275
|
-
for (var
|
|
12276
|
-
var key = keys[
|
|
12356
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
|
12357
|
+
var key = keys[index];
|
|
12277
12358
|
if (arrayKeys && key === "_t") {
|
|
12278
12359
|
continue;
|
|
12279
12360
|
}
|
|
12280
12361
|
var leftKey = arrayKeys ? typeof key === "number" ? key : parseInt(trimUnderscore(key), 10) : key;
|
|
12281
|
-
var isLast =
|
|
12362
|
+
var isLast = index === length - 1;
|
|
12282
12363
|
fn(key, leftKey, moveDestinations[leftKey], isLast);
|
|
12283
12364
|
}
|
|
12284
12365
|
}, "forEachDeltaKey")
|
|
@@ -12820,7 +12901,7 @@ var OPERATIONS = {
|
|
|
12820
12901
|
}, "format_textdiff")
|
|
12821
12902
|
}, {
|
|
12822
12903
|
key: "format",
|
|
12823
|
-
value: /* @__PURE__ */ __name(function
|
|
12904
|
+
value: /* @__PURE__ */ __name(function format2(delta, left) {
|
|
12824
12905
|
var context = {};
|
|
12825
12906
|
this.prepareContext(context);
|
|
12826
12907
|
this.recurse(context, delta, left);
|
|
@@ -13407,7 +13488,7 @@ function getAminoAcidFromSequenceTriplet(sequenceString) {
|
|
|
13407
13488
|
if (sequenceString.length !== 3) {
|
|
13408
13489
|
throw new Error("must pass a string of length 3");
|
|
13409
13490
|
}
|
|
13410
|
-
|
|
13491
|
+
const aa = threeLetterSequenceStringToAminoAcidMap[sequenceString];
|
|
13411
13492
|
if (aa) {
|
|
13412
13493
|
return aa;
|
|
13413
13494
|
}
|
|
@@ -13419,7 +13500,7 @@ function getAminoAcidFromSequenceTriplet(sequenceString) {
|
|
|
13419
13500
|
}
|
|
13420
13501
|
__name(getAminoAcidFromSequenceTriplet, "getAminoAcidFromSequenceTriplet");
|
|
13421
13502
|
function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optionalSubrangeRange, isProteinSequence) {
|
|
13422
|
-
|
|
13503
|
+
const originalSequenceStringLength = isProteinSequence ? originalSequenceString.length * 3 : originalSequenceString.length;
|
|
13423
13504
|
let sequenceString = originalSequenceString;
|
|
13424
13505
|
let startOffset = 0;
|
|
13425
13506
|
if (optionalSubrangeRange) {
|
|
@@ -13429,8 +13510,8 @@ function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optio
|
|
|
13429
13510
|
);
|
|
13430
13511
|
startOffset = optionalSubrangeRange.start;
|
|
13431
13512
|
}
|
|
13432
|
-
|
|
13433
|
-
|
|
13513
|
+
const sequenceStringLength = isProteinSequence ? sequenceString.length * 3 : sequenceString.length;
|
|
13514
|
+
const aminoAcidDataForEachBaseOfDNA = [];
|
|
13434
13515
|
let codonRange;
|
|
13435
13516
|
let revCompGapLength = 0;
|
|
13436
13517
|
let aminoAcidIndex = 0;
|
|
@@ -13460,12 +13541,12 @@ function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optio
|
|
|
13460
13541
|
aminoAcidIndex--;
|
|
13461
13542
|
}
|
|
13462
13543
|
}
|
|
13463
|
-
for (let
|
|
13544
|
+
for (let index = 2 + revCompGapLength; index < sequenceStringLength; index += 3) {
|
|
13464
13545
|
let aminoAcid;
|
|
13465
13546
|
if (isProteinSequence) {
|
|
13466
|
-
aminoAcid = proteinAlphabet[sequenceString[(
|
|
13547
|
+
aminoAcid = proteinAlphabet[sequenceString[(index - 2) / 3].toUpperCase()];
|
|
13467
13548
|
} else {
|
|
13468
|
-
let triplet = sequenceString.slice(
|
|
13549
|
+
let triplet = sequenceString.slice(index - 2, index + 1);
|
|
13469
13550
|
if (!forward) {
|
|
13470
13551
|
triplet = getReverseComplementSequenceString(triplet);
|
|
13471
13552
|
}
|
|
@@ -13473,8 +13554,8 @@ function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optio
|
|
|
13473
13554
|
}
|
|
13474
13555
|
codonRange = translateRange(
|
|
13475
13556
|
{
|
|
13476
|
-
start:
|
|
13477
|
-
end:
|
|
13557
|
+
start: index - 2,
|
|
13558
|
+
end: index
|
|
13478
13559
|
},
|
|
13479
13560
|
startOffset,
|
|
13480
13561
|
originalSequenceStringLength
|
|
@@ -13512,7 +13593,7 @@ function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optio
|
|
|
13512
13593
|
aminoAcidIndex--;
|
|
13513
13594
|
}
|
|
13514
13595
|
}
|
|
13515
|
-
|
|
13596
|
+
const lengthOfEndBpsNotCoveredByAminoAcids = sequenceStringLength - aminoAcidDataForEachBaseOfDNA.length;
|
|
13516
13597
|
codonRange = translateRange(
|
|
13517
13598
|
{
|
|
13518
13599
|
start: sequenceStringLength - lengthOfEndBpsNotCoveredByAminoAcids,
|
|
@@ -13602,10 +13683,10 @@ function tidyUpAnnotation(_annotation, {
|
|
|
13602
13683
|
annotation.name = "Untitled annotation";
|
|
13603
13684
|
}
|
|
13604
13685
|
if (provideNewIdsForAnnotations) {
|
|
13605
|
-
annotation.id =
|
|
13686
|
+
annotation.id = shortid$1();
|
|
13606
13687
|
}
|
|
13607
13688
|
if (!annotation.id && annotation.id !== 0 && !doNotProvideIdsForAnnotations) {
|
|
13608
|
-
annotation.id =
|
|
13689
|
+
annotation.id = shortid$1();
|
|
13609
13690
|
messages.push(
|
|
13610
13691
|
"Unable to detect valid ID for annotation, setting ID to " + annotation.id
|
|
13611
13692
|
);
|
|
@@ -13834,7 +13915,7 @@ function tidyUpSequenceData(pSeqData, options = {}) {
|
|
|
13834
13915
|
if (item.id || item.id === 0) {
|
|
13835
13916
|
itemId = item.id;
|
|
13836
13917
|
} else {
|
|
13837
|
-
itemId =
|
|
13918
|
+
itemId = shortid$1();
|
|
13838
13919
|
if (!doNotProvideIdsForAnnotations) {
|
|
13839
13920
|
item.id = itemId;
|
|
13840
13921
|
}
|
|
@@ -13897,7 +13978,7 @@ const reverseSeqDiff = /* @__PURE__ */ __name((diff2) => {
|
|
|
13897
13978
|
return reverse(diff2);
|
|
13898
13979
|
}, "reverseSeqDiff");
|
|
13899
13980
|
function getAllInsertionsInSeqReads(seqReads) {
|
|
13900
|
-
|
|
13981
|
+
const allInsertionsInSeqReads = [];
|
|
13901
13982
|
seqReads.forEach((seqRead) => {
|
|
13902
13983
|
const splitSeqRead = seqRead.cigar.match(/([0-9]*[MDI])/g);
|
|
13903
13984
|
for (let componentI = 0; componentI < splitSeqRead.length; componentI++) {
|
|
@@ -13914,7 +13995,7 @@ function getAllInsertionsInSeqReads(seqReads) {
|
|
|
13914
13995
|
bpPosOfInsertion += previousComponentNumber;
|
|
13915
13996
|
}
|
|
13916
13997
|
}
|
|
13917
|
-
|
|
13998
|
+
const insertionInfo = {
|
|
13918
13999
|
// keeping bpPos 1-based
|
|
13919
14000
|
bpPos: bpPosOfInsertion,
|
|
13920
14001
|
number: numberOfInsertions
|
|
@@ -13923,7 +14004,7 @@ function getAllInsertionsInSeqReads(seqReads) {
|
|
|
13923
14004
|
}
|
|
13924
14005
|
}
|
|
13925
14006
|
});
|
|
13926
|
-
|
|
14007
|
+
const sortedInsertions = allInsertionsInSeqReads.sort((a, b) => {
|
|
13927
14008
|
return a.bpPos - b.bpPos;
|
|
13928
14009
|
});
|
|
13929
14010
|
for (let i = 0; i < sortedInsertions.length - 1; i++) {
|
|
@@ -14017,16 +14098,16 @@ function getVirtualDigest({
|
|
|
14017
14098
|
const sortedCutsites = cutsites.sort((a, b) => {
|
|
14018
14099
|
return a.topSnipPosition - b.topSnipPosition;
|
|
14019
14100
|
});
|
|
14020
|
-
sortedCutsites.forEach((cutsite1,
|
|
14101
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
14021
14102
|
if (computePartialDigest && !computePartialDigestDisabled) {
|
|
14022
|
-
sortedCutsites.forEach((cs,
|
|
14023
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
14103
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
14104
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
14024
14105
|
});
|
|
14025
14106
|
}
|
|
14026
14107
|
if (!computeDigestDisabled) {
|
|
14027
14108
|
pairs.push([
|
|
14028
14109
|
cutsite1,
|
|
14029
|
-
sortedCutsites[
|
|
14110
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
14030
14111
|
]);
|
|
14031
14112
|
}
|
|
14032
14113
|
});
|
|
@@ -14115,7 +14196,7 @@ function isEnzymeType2S(e) {
|
|
|
14115
14196
|
}
|
|
14116
14197
|
__name(isEnzymeType2S, "isEnzymeType2S");
|
|
14117
14198
|
function insertGapsIntoRefSeq(refSeq, seqReads) {
|
|
14118
|
-
|
|
14199
|
+
const refSeqWithGaps = refSeq.split("");
|
|
14119
14200
|
const allInsertionsInSeqReads = getAllInsertionsInSeqReads(seqReads);
|
|
14120
14201
|
for (let i = 0; i < allInsertionsInSeqReads.length; i++) {
|
|
14121
14202
|
const bpPosOfInsertion = allInsertionsInSeqReads[i].bpPos;
|
|
@@ -14132,8 +14213,8 @@ function insertGapsIntoRefSeq(refSeq, seqReads) {
|
|
|
14132
14213
|
return refSeqWithGaps.join("");
|
|
14133
14214
|
}
|
|
14134
14215
|
__name(insertGapsIntoRefSeq, "insertGapsIntoRefSeq");
|
|
14135
|
-
var spliceString = /* @__PURE__ */ __name(function spliceSlice(str,
|
|
14136
|
-
return str.slice(0,
|
|
14216
|
+
var spliceString = /* @__PURE__ */ __name(function spliceSlice(str, index, count, add) {
|
|
14217
|
+
return str.slice(0, index) + (add || "") + str.slice(index + count);
|
|
14137
14218
|
}, "spliceSlice");
|
|
14138
14219
|
const spliceString$1 = /* @__PURE__ */ getDefaultExportFromCjs(spliceString);
|
|
14139
14220
|
function adjustBpsToReplaceOrInsert(bpString, insertString = "", caretPositionOrRange) {
|
|
@@ -14146,7 +14227,7 @@ function adjustBpsToReplaceOrInsert(bpString, insertString = "", caretPositionOr
|
|
|
14146
14227
|
invertRange(caretPositionOrRange, bpString.length)
|
|
14147
14228
|
);
|
|
14148
14229
|
stringToReturn = "";
|
|
14149
|
-
ranges.forEach((range,
|
|
14230
|
+
ranges.forEach((range, index) => {
|
|
14150
14231
|
stringToReturn += getSequenceWithinRange(range, bpString);
|
|
14151
14232
|
if (ranges.length === 1) {
|
|
14152
14233
|
if (isPositionWithinRange(0, range, bpString.length, true, true)) {
|
|
@@ -14155,7 +14236,7 @@ function adjustBpsToReplaceOrInsert(bpString, insertString = "", caretPositionOr
|
|
|
14155
14236
|
stringToReturn = insertString + stringToReturn;
|
|
14156
14237
|
}
|
|
14157
14238
|
} else {
|
|
14158
|
-
if (
|
|
14239
|
+
if (index === 0)
|
|
14159
14240
|
stringToReturn += insertString;
|
|
14160
14241
|
}
|
|
14161
14242
|
});
|
|
@@ -14504,7 +14585,7 @@ function insertSequenceDataAtPositionOrRange(_sequenceDataToInsert, _existingSeq
|
|
|
14504
14585
|
_sequenceDataToInsert,
|
|
14505
14586
|
options
|
|
14506
14587
|
);
|
|
14507
|
-
|
|
14588
|
+
const newSequenceData = lodashExports.cloneDeep(existingSequenceData);
|
|
14508
14589
|
const insertLength = sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
|
|
14509
14590
|
let caretPosition = caretPositionOrRange;
|
|
14510
14591
|
const isInsertSameLengthAsSelection = sequenceDataToInsert.sequence.length === getRangeLength(caretPositionOrRange, existingSequenceData.sequence.length);
|
|
@@ -14646,9 +14727,9 @@ function insertIntoChromatogram({
|
|
|
14646
14727
|
if (justBaseCalls) {
|
|
14647
14728
|
return chromatogramData;
|
|
14648
14729
|
}
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
for (let
|
|
14730
|
+
const baseTracesToInsert = [];
|
|
14731
|
+
const qualNumsToInsert = [];
|
|
14732
|
+
for (let index = 0; index < seqToInsert.length; index++) {
|
|
14652
14733
|
qualNumsToInsert.push(0);
|
|
14653
14734
|
const toPush = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
14654
14735
|
baseTracesToInsert.push({
|
|
@@ -22326,7 +22407,7 @@ function generateAnnotation(start, end, maxLength) {
|
|
|
22326
22407
|
return __spreadProps(__spreadValues({}, range), {
|
|
22327
22408
|
name: getRandomInt(0, 1e5).toString(),
|
|
22328
22409
|
type: "misc_feature",
|
|
22329
|
-
id:
|
|
22410
|
+
id: shortid$1(),
|
|
22330
22411
|
forward: Math.random() > 0.5,
|
|
22331
22412
|
notes: {}
|
|
22332
22413
|
});
|
|
@@ -22392,7 +22473,7 @@ function findNearestRangeOfSequenceOverlapToPosition(sequenceToSearch, overlapSe
|
|
|
22392
22473
|
}
|
|
22393
22474
|
const regex = new RegExp(overlapSequence, "ig");
|
|
22394
22475
|
let result;
|
|
22395
|
-
let
|
|
22476
|
+
let index;
|
|
22396
22477
|
let distance = Infinity;
|
|
22397
22478
|
while (result = regex.exec(sequenceToSearch + (isLinear ? "" : sequenceToSearch))) {
|
|
22398
22479
|
if (result.index > sequenceToSearch.length)
|
|
@@ -22402,13 +22483,13 @@ function findNearestRangeOfSequenceOverlapToPosition(sequenceToSearch, overlapSe
|
|
|
22402
22483
|
if (newDistance > distance) {
|
|
22403
22484
|
break;
|
|
22404
22485
|
}
|
|
22405
|
-
|
|
22486
|
+
index = result.index;
|
|
22406
22487
|
distance = newDistance;
|
|
22407
22488
|
}
|
|
22408
22489
|
return normalizeRange(
|
|
22409
22490
|
{
|
|
22410
|
-
start:
|
|
22411
|
-
end:
|
|
22491
|
+
start: index,
|
|
22492
|
+
end: index + overlapSequence.length - 1
|
|
22412
22493
|
},
|
|
22413
22494
|
sequenceToSearch.length
|
|
22414
22495
|
);
|
|
@@ -22451,13 +22532,13 @@ function getOrfsFromSequence(options) {
|
|
|
22451
22532
|
forward,
|
|
22452
22533
|
annotationTypePlural: "orfs",
|
|
22453
22534
|
isOrf: true,
|
|
22454
|
-
id:
|
|
22535
|
+
id: shortid$1()
|
|
22455
22536
|
});
|
|
22456
22537
|
}
|
|
22457
22538
|
}
|
|
22458
22539
|
}
|
|
22459
22540
|
const orfEnds = {};
|
|
22460
|
-
orfRanges.forEach((orf,
|
|
22541
|
+
orfRanges.forEach((orf, index) => {
|
|
22461
22542
|
const indexOfAlreadyExistingOrf = orfEnds[orf.end];
|
|
22462
22543
|
if (typeof indexOfAlreadyExistingOrf !== "undefined") {
|
|
22463
22544
|
let internalOrf = orf;
|
|
@@ -22465,7 +22546,7 @@ function getOrfsFromSequence(options) {
|
|
|
22465
22546
|
if (containingOrf.length < internalOrf.length) {
|
|
22466
22547
|
internalOrf = orfRanges[indexOfAlreadyExistingOrf];
|
|
22467
22548
|
containingOrf = orf;
|
|
22468
|
-
orfEnds[orf.end] =
|
|
22549
|
+
orfEnds[orf.end] = index;
|
|
22469
22550
|
}
|
|
22470
22551
|
const internalStartCodonIndex = forward ? internalOrf.start : originalSequenceLength - internalOrf.start - 1;
|
|
22471
22552
|
containingOrf.internalStartCodonIndices = [
|
|
@@ -22475,7 +22556,7 @@ function getOrfsFromSequence(options) {
|
|
|
22475
22556
|
];
|
|
22476
22557
|
internalOrf.remove = true;
|
|
22477
22558
|
} else {
|
|
22478
|
-
orfEnds[orf.end] =
|
|
22559
|
+
orfEnds[orf.end] = index;
|
|
22479
22560
|
if (!forward) {
|
|
22480
22561
|
const endHolder = orf.end;
|
|
22481
22562
|
orf.end = originalSequenceLength - orf.start - 1;
|
|
@@ -22510,14 +22591,13 @@ function findOrfsInPlasmid(sequence, circular, minimumOrfSize, useAdditionalOrfS
|
|
|
22510
22591
|
return forwardOrfs.concat(reverseOrfs);
|
|
22511
22592
|
}
|
|
22512
22593
|
__name(findOrfsInPlasmid, "findOrfsInPlasmid");
|
|
22513
|
-
|
|
22514
|
-
|
|
22515
|
-
if (typeof str !== "string") {
|
|
22594
|
+
function escapeStringRegexp(string) {
|
|
22595
|
+
if (typeof string !== "string") {
|
|
22516
22596
|
throw new TypeError("Expected a string");
|
|
22517
22597
|
}
|
|
22518
|
-
return
|
|
22519
|
-
}
|
|
22520
|
-
|
|
22598
|
+
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
22599
|
+
}
|
|
22600
|
+
__name(escapeStringRegexp, "escapeStringRegexp");
|
|
22521
22601
|
function getAminoAcidStringFromSequenceString(sequenceString) {
|
|
22522
22602
|
const aminoAcidsPerBase = getAminoAcidDataForEachBaseOfDna(
|
|
22523
22603
|
sequenceString,
|
|
@@ -22540,8 +22620,7 @@ function findSequenceMatches(sequence, searchString, options = {}) {
|
|
|
22540
22620
|
const { searchReverseStrand } = options;
|
|
22541
22621
|
if (searchReverseStrand) {
|
|
22542
22622
|
const sequenceLength = sequence.length;
|
|
22543
|
-
|
|
22544
|
-
reverseSeq = getReverseComplementSequenceString(sequence);
|
|
22623
|
+
const reverseSeq = getReverseComplementSequenceString(sequence);
|
|
22545
22624
|
const reverseMatches = findSequenceMatchesTopStrand(
|
|
22546
22625
|
reverseSeq,
|
|
22547
22626
|
searchString,
|
|
@@ -22568,7 +22647,7 @@ function findSequenceMatchesTopStrand(sequence, searchString, options = {}) {
|
|
|
22568
22647
|
isProteinSequence,
|
|
22569
22648
|
isProteinSearch
|
|
22570
22649
|
} = options;
|
|
22571
|
-
let searchStringToUse = escapeStringRegexp
|
|
22650
|
+
let searchStringToUse = escapeStringRegexp(searchString);
|
|
22572
22651
|
if (isAmbiguous) {
|
|
22573
22652
|
if (isProteinSearch || isProteinSequence) {
|
|
22574
22653
|
searchStringToUse = convertAmbiguousStringToRegex(
|
|
@@ -22606,7 +22685,7 @@ function findSequenceMatchesTopStrand(sequence, searchString, options = {}) {
|
|
|
22606
22685
|
}
|
|
22607
22686
|
];
|
|
22608
22687
|
}
|
|
22609
|
-
|
|
22688
|
+
const ranges = [];
|
|
22610
22689
|
sequencesToCheck.forEach(({ seqToCheck, offset }) => {
|
|
22611
22690
|
const reg = new RegExp(searchStringToUse, "ig");
|
|
22612
22691
|
let match;
|
|
@@ -22851,7 +22930,7 @@ function getInsertBetweenVals(caretPosition, selectionLayer, sequenceLength) {
|
|
|
22851
22930
|
}
|
|
22852
22931
|
__name(getInsertBetweenVals, "getInsertBetweenVals");
|
|
22853
22932
|
function getLeftAndRightOfSequenceInRangeGivenPosition(range, position, sequence) {
|
|
22854
|
-
|
|
22933
|
+
const result = {
|
|
22855
22934
|
leftHandSide: "",
|
|
22856
22935
|
rightHandSide: ""
|
|
22857
22936
|
};
|
|
@@ -22877,15 +22956,15 @@ function getLeftAndRightOfSequenceInRangeGivenPosition(range, position, sequence
|
|
|
22877
22956
|
return result;
|
|
22878
22957
|
}
|
|
22879
22958
|
__name(getLeftAndRightOfSequenceInRangeGivenPosition, "getLeftAndRightOfSequenceInRangeGivenPosition");
|
|
22880
|
-
function getOverlapBetweenTwoSequences(sequenceToFind, sequenceToSearchIn
|
|
22959
|
+
function getOverlapBetweenTwoSequences(sequenceToFind, sequenceToSearchIn) {
|
|
22881
22960
|
sequenceToSearchIn = sequenceToSearchIn.toLowerCase();
|
|
22882
22961
|
sequenceToFind = sequenceToFind.toLowerCase();
|
|
22883
22962
|
const lengthenedSeqToSearch = sequenceToSearchIn + sequenceToSearchIn;
|
|
22884
|
-
const
|
|
22885
|
-
if (
|
|
22963
|
+
const index = lengthenedSeqToSearch.indexOf(sequenceToFind);
|
|
22964
|
+
if (index > -1) {
|
|
22886
22965
|
return {
|
|
22887
|
-
start:
|
|
22888
|
-
end: modulatePositionByRange(
|
|
22966
|
+
start: index,
|
|
22967
|
+
end: modulatePositionByRange(index + sequenceToFind.length - 1, {
|
|
22889
22968
|
start: 0,
|
|
22890
22969
|
end: sequenceToSearchIn.length - 1
|
|
22891
22970
|
})
|
|
@@ -22897,15 +22976,15 @@ function getOverlapBetweenTwoSequences(sequenceToFind, sequenceToSearchIn, optio
|
|
|
22897
22976
|
__name(getOverlapBetweenTwoSequences, "getOverlapBetweenTwoSequences");
|
|
22898
22977
|
function getPossiblePartsFromSequenceAndEnzyme(seqData, restrictionEnzymes) {
|
|
22899
22978
|
restrictionEnzymes = restrictionEnzymes.length ? restrictionEnzymes : [restrictionEnzymes];
|
|
22900
|
-
|
|
22901
|
-
|
|
22902
|
-
|
|
22979
|
+
const bps = seqData.sequence;
|
|
22980
|
+
const seqLen = bps.length;
|
|
22981
|
+
const circular = seqData.circular;
|
|
22903
22982
|
let cutsites = [];
|
|
22904
22983
|
restrictionEnzymes.forEach((enzyme) => {
|
|
22905
|
-
|
|
22984
|
+
const newCutsites = cutSequenceByRestrictionEnzyme(bps, circular, enzyme);
|
|
22906
22985
|
cutsites = cutsites.concat(newCutsites);
|
|
22907
22986
|
});
|
|
22908
|
-
|
|
22987
|
+
const parts = [];
|
|
22909
22988
|
if (cutsites.length < 1) {
|
|
22910
22989
|
return parts;
|
|
22911
22990
|
} else if (cutsites.length === 1) {
|
|
@@ -22918,16 +22997,16 @@ function getPossiblePartsFromSequenceAndEnzyme(seqData, restrictionEnzymes) {
|
|
|
22918
22997
|
);
|
|
22919
22998
|
return parts;
|
|
22920
22999
|
} else {
|
|
22921
|
-
|
|
23000
|
+
const pairs = pairwise(cutsites);
|
|
22922
23001
|
pairs.forEach((pair) => {
|
|
22923
|
-
|
|
22924
|
-
|
|
22925
|
-
|
|
23002
|
+
const cut1 = pair[0];
|
|
23003
|
+
const cut2 = pair[1];
|
|
23004
|
+
const part1 = getPartBetweenEnzymesWithInclusiveOverhangs(
|
|
22926
23005
|
cut1,
|
|
22927
23006
|
cut2,
|
|
22928
23007
|
seqLen
|
|
22929
23008
|
);
|
|
22930
|
-
|
|
23009
|
+
const part2 = getPartBetweenEnzymesWithInclusiveOverhangs(
|
|
22931
23010
|
cut2,
|
|
22932
23011
|
cut1,
|
|
22933
23012
|
seqLen
|
|
@@ -22944,10 +23023,10 @@ function getPossiblePartsFromSequenceAndEnzyme(seqData, restrictionEnzymes) {
|
|
|
22944
23023
|
}
|
|
22945
23024
|
__name(getPossiblePartsFromSequenceAndEnzyme, "getPossiblePartsFromSequenceAndEnzyme");
|
|
22946
23025
|
function getPartBetweenEnzymesWithInclusiveOverhangs(cut1, cut2, seqLen) {
|
|
22947
|
-
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
|
|
23026
|
+
const firstCutOffset = getEnzymeRelativeOffset(cut1.restrictionEnzyme);
|
|
23027
|
+
const secondCutOffset = getEnzymeRelativeOffset(cut2.restrictionEnzyme);
|
|
23028
|
+
const start = cut1.topSnipBeforeBottom ? cut1.topSnipPosition : cut1.bottomSnipPosition;
|
|
23029
|
+
const end = normalizePositionByRangeLength(
|
|
22951
23030
|
(cut2.topSnipBeforeBottom ? cut2.bottomSnipPosition : cut2.topSnipPosition) - 1,
|
|
22952
23031
|
seqLen
|
|
22953
23032
|
);
|
|
@@ -22979,7 +23058,7 @@ function pairwise(list) {
|
|
|
22979
23058
|
if (list.length < 2) {
|
|
22980
23059
|
return [];
|
|
22981
23060
|
}
|
|
22982
|
-
|
|
23061
|
+
const first = list[0], rest = list.slice(1), pairs = rest.map((x) => {
|
|
22983
23062
|
return [first, x];
|
|
22984
23063
|
});
|
|
22985
23064
|
return pairs.concat(pairwise(rest));
|
|
@@ -23063,8 +23142,8 @@ function guessIfSequenceIsDnaAndNotProtein(seq, options = {}) {
|
|
|
23063
23142
|
let count = 0;
|
|
23064
23143
|
if (!seq || !seq.length)
|
|
23065
23144
|
return true;
|
|
23066
|
-
for (let
|
|
23067
|
-
const letter = seq[
|
|
23145
|
+
for (let index = 0; index < seq.length; index++) {
|
|
23146
|
+
const letter = seq[index];
|
|
23068
23147
|
if (dnaLetterMap[letter.toUpperCase()]) {
|
|
23069
23148
|
count = count + 1;
|
|
23070
23149
|
}
|
|
@@ -23135,7 +23214,6 @@ function mapAnnotationsToRows(annotations, sequenceLength, bpsPerRow, { splitFor
|
|
|
23135
23214
|
}
|
|
23136
23215
|
__name(mapAnnotationsToRows, "mapAnnotationsToRows");
|
|
23137
23216
|
function mapAnnotationToRows({
|
|
23138
|
-
wrappedAnnotations,
|
|
23139
23217
|
annotation,
|
|
23140
23218
|
sequenceLength,
|
|
23141
23219
|
bpsPerRow,
|
|
@@ -23149,7 +23227,7 @@ function mapAnnotationToRows({
|
|
|
23149
23227
|
location || annotation,
|
|
23150
23228
|
sequenceLength
|
|
23151
23229
|
);
|
|
23152
|
-
ranges.forEach((range,
|
|
23230
|
+
ranges.forEach((range, index) => {
|
|
23153
23231
|
const startingRow = Math.floor(range.start / bpsPerRow);
|
|
23154
23232
|
const endingRow = Math.floor(range.end / bpsPerRow);
|
|
23155
23233
|
for (let rowNumber = startingRow; rowNumber <= endingRow; rowNumber++) {
|
|
@@ -23179,7 +23257,7 @@ function mapAnnotationToRows({
|
|
|
23179
23257
|
}
|
|
23180
23258
|
});
|
|
23181
23259
|
} else {
|
|
23182
|
-
if (
|
|
23260
|
+
if (index > 0 && //second half of an annotation range
|
|
23183
23261
|
annotationsForRow.length && //there are already annotations within the row
|
|
23184
23262
|
annotationsForRow[annotationsForRow.length - 1].annotation === annotation) {
|
|
23185
23263
|
yOffset = annotationsForRow[annotationsForRow.length - 1].yOffset;
|
|
@@ -23255,7 +23333,7 @@ function prepareRowData(sequenceData, bpsPerRow) {
|
|
|
23255
23333
|
}
|
|
23256
23334
|
__name(prepareRowData, "prepareRowData");
|
|
23257
23335
|
function condensePairwiseAlignmentDifferences(referenceSeq, alignedSeq) {
|
|
23258
|
-
|
|
23336
|
+
const overviewMinimapTrack = [];
|
|
23259
23337
|
const referenceSeqSplit = referenceSeq.toLowerCase().split("");
|
|
23260
23338
|
const alignedSeqSplit = alignedSeq.toLowerCase().split("");
|
|
23261
23339
|
const seqLength = alignedSeq.length;
|
|
@@ -23435,7 +23513,7 @@ function addGapsToSeqReads(refSeq, seqReads) {
|
|
|
23435
23513
|
return a.bpPos - b.bpPos;
|
|
23436
23514
|
});
|
|
23437
23515
|
otherInsertions = otherInsertions.filter(
|
|
23438
|
-
(object,
|
|
23516
|
+
(object, index) => index === otherInsertions.findIndex(
|
|
23439
23517
|
(obj) => JSON.stringify(obj) === JSON.stringify(object)
|
|
23440
23518
|
)
|
|
23441
23519
|
);
|
|
@@ -23754,21 +23832,21 @@ function getDigestFragmentsForCutsites(sequenceLength, circular, cutsites, opts
|
|
|
23754
23832
|
}
|
|
23755
23833
|
];
|
|
23756
23834
|
}
|
|
23757
|
-
sortedCutsites.forEach((cutsite1,
|
|
23758
|
-
if (!circular && !sortedCutsites[
|
|
23835
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
23836
|
+
if (!circular && !sortedCutsites[index + 1]) {
|
|
23759
23837
|
return;
|
|
23760
23838
|
}
|
|
23761
23839
|
if (opts.computePartialDigests) {
|
|
23762
|
-
sortedCutsites.forEach((cs,
|
|
23763
|
-
if (
|
|
23840
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
23841
|
+
if (index2 === index + 1 || index2 === 0) {
|
|
23764
23842
|
return;
|
|
23765
23843
|
}
|
|
23766
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
23844
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
23767
23845
|
});
|
|
23768
23846
|
}
|
|
23769
23847
|
pairs.push([
|
|
23770
23848
|
cutsite1,
|
|
23771
|
-
sortedCutsites[
|
|
23849
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
23772
23850
|
]);
|
|
23773
23851
|
});
|
|
23774
23852
|
pairs.forEach(([cut1, cut2]) => {
|