camunda-bpmn-js 5.17.0 → 5.18.0
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/dist/base-modeler.development.js +359 -371
- package/dist/base-modeler.production.min.js +4 -4
- package/dist/camunda-cloud-modeler.development.js +783 -880
- package/dist/camunda-cloud-modeler.production.min.js +6 -6
- package/dist/camunda-platform-modeler.development.js +458 -470
- package/dist/camunda-platform-modeler.production.min.js +4 -4
- package/index.js +1 -0
- package/package.json +3 -4
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
* @return {T[]}
|
|
172
172
|
*/
|
|
173
173
|
|
|
174
|
-
const nativeToString$
|
|
174
|
+
const nativeToString$i = Object.prototype.toString;
|
|
175
175
|
const nativeHasOwnProperty$h = Object.prototype.hasOwnProperty;
|
|
176
176
|
|
|
177
177
|
function isUndefined$i(obj) {
|
|
@@ -187,15 +187,15 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
function isArray$i(obj) {
|
|
190
|
-
return nativeToString$
|
|
190
|
+
return nativeToString$i.call(obj) === '[object Array]';
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
function isObject$7(obj) {
|
|
194
|
-
return nativeToString$
|
|
194
|
+
return nativeToString$i.call(obj) === '[object Object]';
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
function isNumber$5(obj) {
|
|
198
|
-
return nativeToString$
|
|
198
|
+
return nativeToString$i.call(obj) === '[object Number]';
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
/**
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
* @return {boolean}
|
|
205
205
|
*/
|
|
206
206
|
function isFunction$b(obj) {
|
|
207
|
-
const tag = nativeToString$
|
|
207
|
+
const tag = nativeToString$i.call(obj);
|
|
208
208
|
|
|
209
209
|
return (
|
|
210
210
|
tag === '[object Function]' ||
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
function isString$7(obj) {
|
|
219
|
-
return nativeToString$
|
|
219
|
+
return nativeToString$i.call(obj) === '[object String]';
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
/**
|
|
@@ -698,7 +698,7 @@
|
|
|
698
698
|
* @return {T[]}
|
|
699
699
|
*/
|
|
700
700
|
|
|
701
|
-
const nativeToString$
|
|
701
|
+
const nativeToString$h = Object.prototype.toString;
|
|
702
702
|
const nativeHasOwnProperty$g = Object.prototype.hasOwnProperty;
|
|
703
703
|
|
|
704
704
|
function isUndefined$h(obj) {
|
|
@@ -706,7 +706,7 @@
|
|
|
706
706
|
}
|
|
707
707
|
|
|
708
708
|
function isArray$h(obj) {
|
|
709
|
-
return nativeToString$
|
|
709
|
+
return nativeToString$h.call(obj) === '[object Array]';
|
|
710
710
|
}
|
|
711
711
|
|
|
712
712
|
/**
|
|
@@ -2417,7 +2417,7 @@
|
|
|
2417
2417
|
return Array.prototype.concat.apply([], arr);
|
|
2418
2418
|
}
|
|
2419
2419
|
|
|
2420
|
-
const nativeToString$
|
|
2420
|
+
const nativeToString$g = Object.prototype.toString;
|
|
2421
2421
|
const nativeHasOwnProperty$f = Object.prototype.hasOwnProperty;
|
|
2422
2422
|
|
|
2423
2423
|
function isUndefined$g(obj) {
|
|
@@ -2433,15 +2433,15 @@
|
|
|
2433
2433
|
}
|
|
2434
2434
|
|
|
2435
2435
|
function isArray$f(obj) {
|
|
2436
|
-
return nativeToString$
|
|
2436
|
+
return nativeToString$g.call(obj) === '[object Array]';
|
|
2437
2437
|
}
|
|
2438
2438
|
|
|
2439
2439
|
function isObject$6(obj) {
|
|
2440
|
-
return nativeToString$
|
|
2440
|
+
return nativeToString$g.call(obj) === '[object Object]';
|
|
2441
2441
|
}
|
|
2442
2442
|
|
|
2443
2443
|
function isNumber$4(obj) {
|
|
2444
|
-
return nativeToString$
|
|
2444
|
+
return nativeToString$g.call(obj) === '[object Number]';
|
|
2445
2445
|
}
|
|
2446
2446
|
|
|
2447
2447
|
/**
|
|
@@ -2450,7 +2450,7 @@
|
|
|
2450
2450
|
* @return {boolean}
|
|
2451
2451
|
*/
|
|
2452
2452
|
function isFunction$a(obj) {
|
|
2453
|
-
const tag = nativeToString$
|
|
2453
|
+
const tag = nativeToString$g.call(obj);
|
|
2454
2454
|
|
|
2455
2455
|
return (
|
|
2456
2456
|
tag === '[object Function]' ||
|
|
@@ -2462,7 +2462,7 @@
|
|
|
2462
2462
|
}
|
|
2463
2463
|
|
|
2464
2464
|
function isString$6(obj) {
|
|
2465
|
-
return nativeToString$
|
|
2465
|
+
return nativeToString$g.call(obj) === '[object String]';
|
|
2466
2466
|
}
|
|
2467
2467
|
|
|
2468
2468
|
|
|
@@ -3835,7 +3835,7 @@
|
|
|
3835
3835
|
* @return {T[]}
|
|
3836
3836
|
*/
|
|
3837
3837
|
|
|
3838
|
-
const nativeToString$
|
|
3838
|
+
const nativeToString$f = Object.prototype.toString;
|
|
3839
3839
|
const nativeHasOwnProperty$e = Object.prototype.hasOwnProperty;
|
|
3840
3840
|
|
|
3841
3841
|
function isUndefined$f(obj) {
|
|
@@ -3843,7 +3843,7 @@
|
|
|
3843
3843
|
}
|
|
3844
3844
|
|
|
3845
3845
|
function isArray$e(obj) {
|
|
3846
|
-
return nativeToString$
|
|
3846
|
+
return nativeToString$f.call(obj) === '[object Array]';
|
|
3847
3847
|
}
|
|
3848
3848
|
|
|
3849
3849
|
/**
|
|
@@ -9603,10 +9603,10 @@
|
|
|
9603
9603
|
* @return {T[]}
|
|
9604
9604
|
*/
|
|
9605
9605
|
|
|
9606
|
-
const nativeToString$
|
|
9606
|
+
const nativeToString$e = Object.prototype.toString;
|
|
9607
9607
|
|
|
9608
9608
|
function isString$5(obj) {
|
|
9609
|
-
return nativeToString$
|
|
9609
|
+
return nativeToString$e.call(obj) === '[object String]';
|
|
9610
9610
|
}
|
|
9611
9611
|
|
|
9612
9612
|
/**
|
|
@@ -9631,7 +9631,7 @@
|
|
|
9631
9631
|
* @return {T[]}
|
|
9632
9632
|
*/
|
|
9633
9633
|
|
|
9634
|
-
const nativeToString$
|
|
9634
|
+
const nativeToString$d = Object.prototype.toString;
|
|
9635
9635
|
const nativeHasOwnProperty$d = Object.prototype.hasOwnProperty;
|
|
9636
9636
|
|
|
9637
9637
|
function isUndefined$e(obj) {
|
|
@@ -9647,15 +9647,15 @@
|
|
|
9647
9647
|
}
|
|
9648
9648
|
|
|
9649
9649
|
function isArray$c(obj) {
|
|
9650
|
-
return nativeToString$
|
|
9650
|
+
return nativeToString$d.call(obj) === '[object Array]';
|
|
9651
9651
|
}
|
|
9652
9652
|
|
|
9653
9653
|
function isObject$5(obj) {
|
|
9654
|
-
return nativeToString$
|
|
9654
|
+
return nativeToString$d.call(obj) === '[object Object]';
|
|
9655
9655
|
}
|
|
9656
9656
|
|
|
9657
9657
|
function isString$4(obj) {
|
|
9658
|
-
return nativeToString$
|
|
9658
|
+
return nativeToString$d.call(obj) === '[object String]';
|
|
9659
9659
|
}
|
|
9660
9660
|
|
|
9661
9661
|
/**
|
|
@@ -10824,7 +10824,7 @@
|
|
|
10824
10824
|
* @return {T[]}
|
|
10825
10825
|
*/
|
|
10826
10826
|
|
|
10827
|
-
const nativeToString$
|
|
10827
|
+
const nativeToString$c = Object.prototype.toString;
|
|
10828
10828
|
const nativeHasOwnProperty$c = Object.prototype.hasOwnProperty;
|
|
10829
10829
|
|
|
10830
10830
|
function isUndefined$c(obj) {
|
|
@@ -10836,7 +10836,7 @@
|
|
|
10836
10836
|
}
|
|
10837
10837
|
|
|
10838
10838
|
function isArray$b(obj) {
|
|
10839
|
-
return nativeToString$
|
|
10839
|
+
return nativeToString$c.call(obj) === '[object Array]';
|
|
10840
10840
|
}
|
|
10841
10841
|
|
|
10842
10842
|
/**
|
|
@@ -10845,7 +10845,7 @@
|
|
|
10845
10845
|
* @return {boolean}
|
|
10846
10846
|
*/
|
|
10847
10847
|
function isFunction$9(obj) {
|
|
10848
|
-
const tag = nativeToString$
|
|
10848
|
+
const tag = nativeToString$c.call(obj);
|
|
10849
10849
|
|
|
10850
10850
|
return (
|
|
10851
10851
|
tag === '[object Function]' ||
|
|
@@ -10857,7 +10857,7 @@
|
|
|
10857
10857
|
}
|
|
10858
10858
|
|
|
10859
10859
|
function isString$3(obj) {
|
|
10860
|
-
return nativeToString$
|
|
10860
|
+
return nativeToString$c.call(obj) === '[object String]';
|
|
10861
10861
|
}
|
|
10862
10862
|
|
|
10863
10863
|
/**
|
|
@@ -56375,7 +56375,7 @@
|
|
|
56375
56375
|
* @return {T[]}
|
|
56376
56376
|
*/
|
|
56377
56377
|
|
|
56378
|
-
const nativeToString$
|
|
56378
|
+
const nativeToString$b = Object.prototype.toString;
|
|
56379
56379
|
const nativeHasOwnProperty$b = Object.prototype.hasOwnProperty;
|
|
56380
56380
|
|
|
56381
56381
|
function isUndefined$b(obj) {
|
|
@@ -56387,7 +56387,7 @@
|
|
|
56387
56387
|
}
|
|
56388
56388
|
|
|
56389
56389
|
function isArray$a(obj) {
|
|
56390
|
-
return nativeToString$
|
|
56390
|
+
return nativeToString$b.call(obj) === '[object Array]';
|
|
56391
56391
|
}
|
|
56392
56392
|
|
|
56393
56393
|
/**
|
|
@@ -56396,7 +56396,7 @@
|
|
|
56396
56396
|
* @return {boolean}
|
|
56397
56397
|
*/
|
|
56398
56398
|
function isFunction$8(obj) {
|
|
56399
|
-
const tag = nativeToString$
|
|
56399
|
+
const tag = nativeToString$b.call(obj);
|
|
56400
56400
|
|
|
56401
56401
|
return (
|
|
56402
56402
|
tag === '[object Function]' ||
|
|
@@ -68903,7 +68903,7 @@
|
|
|
68903
68903
|
* @return {T[]}
|
|
68904
68904
|
*/
|
|
68905
68905
|
|
|
68906
|
-
const nativeToString$
|
|
68906
|
+
const nativeToString$a = Object.prototype.toString;
|
|
68907
68907
|
const nativeHasOwnProperty$a = Object.prototype.hasOwnProperty;
|
|
68908
68908
|
|
|
68909
68909
|
function isUndefined$a(obj) {
|
|
@@ -68915,15 +68915,15 @@
|
|
|
68915
68915
|
}
|
|
68916
68916
|
|
|
68917
68917
|
function isArray$9(obj) {
|
|
68918
|
-
return nativeToString$
|
|
68918
|
+
return nativeToString$a.call(obj) === '[object Array]';
|
|
68919
68919
|
}
|
|
68920
68920
|
|
|
68921
68921
|
function isObject$4(obj) {
|
|
68922
|
-
return nativeToString$
|
|
68922
|
+
return nativeToString$a.call(obj) === '[object Object]';
|
|
68923
68923
|
}
|
|
68924
68924
|
|
|
68925
68925
|
function isNumber$3(obj) {
|
|
68926
|
-
return nativeToString$
|
|
68926
|
+
return nativeToString$a.call(obj) === '[object Number]';
|
|
68927
68927
|
}
|
|
68928
68928
|
|
|
68929
68929
|
/**
|
|
@@ -70722,11 +70722,431 @@
|
|
|
70722
70722
|
*
|
|
70723
70723
|
* @return {T[]}
|
|
70724
70724
|
*/
|
|
70725
|
+
function flatten$2(arr) {
|
|
70726
|
+
return Array.prototype.concat.apply([], arr);
|
|
70727
|
+
}
|
|
70725
70728
|
|
|
70726
|
-
const nativeToString$
|
|
70729
|
+
const nativeToString$9 = Object.prototype.toString;
|
|
70730
|
+
const nativeHasOwnProperty$9 = Object.prototype.hasOwnProperty;
|
|
70731
|
+
|
|
70732
|
+
function isUndefined$9(obj) {
|
|
70733
|
+
return obj === undefined;
|
|
70734
|
+
}
|
|
70735
|
+
|
|
70736
|
+
function isDefined$3(obj) {
|
|
70737
|
+
return obj !== undefined;
|
|
70738
|
+
}
|
|
70739
|
+
|
|
70740
|
+
function isNil$9(obj) {
|
|
70741
|
+
return obj == null;
|
|
70742
|
+
}
|
|
70743
|
+
|
|
70744
|
+
function isArray$8(obj) {
|
|
70745
|
+
return nativeToString$9.call(obj) === '[object Array]';
|
|
70746
|
+
}
|
|
70727
70747
|
|
|
70728
70748
|
function isNumber$2(obj) {
|
|
70729
|
-
return nativeToString$
|
|
70749
|
+
return nativeToString$9.call(obj) === '[object Number]';
|
|
70750
|
+
}
|
|
70751
|
+
|
|
70752
|
+
/**
|
|
70753
|
+
* @param {any} obj
|
|
70754
|
+
*
|
|
70755
|
+
* @return {boolean}
|
|
70756
|
+
*/
|
|
70757
|
+
function isFunction$7(obj) {
|
|
70758
|
+
const tag = nativeToString$9.call(obj);
|
|
70759
|
+
|
|
70760
|
+
return (
|
|
70761
|
+
tag === '[object Function]' ||
|
|
70762
|
+
tag === '[object AsyncFunction]' ||
|
|
70763
|
+
tag === '[object GeneratorFunction]' ||
|
|
70764
|
+
tag === '[object AsyncGeneratorFunction]' ||
|
|
70765
|
+
tag === '[object Proxy]'
|
|
70766
|
+
);
|
|
70767
|
+
}
|
|
70768
|
+
|
|
70769
|
+
|
|
70770
|
+
/**
|
|
70771
|
+
* Ensure collection is an array.
|
|
70772
|
+
*
|
|
70773
|
+
* @param {Object} obj
|
|
70774
|
+
*/
|
|
70775
|
+
function ensureArray$1(obj) {
|
|
70776
|
+
|
|
70777
|
+
if (isArray$8(obj)) {
|
|
70778
|
+
return;
|
|
70779
|
+
}
|
|
70780
|
+
|
|
70781
|
+
throw new Error('must supply array');
|
|
70782
|
+
}
|
|
70783
|
+
|
|
70784
|
+
/**
|
|
70785
|
+
* Return true, if target owns a property with the given key.
|
|
70786
|
+
*
|
|
70787
|
+
* @param {Object} target
|
|
70788
|
+
* @param {String} key
|
|
70789
|
+
*
|
|
70790
|
+
* @return {Boolean}
|
|
70791
|
+
*/
|
|
70792
|
+
function has$9(target, key) {
|
|
70793
|
+
return !isNil$9(target) && nativeHasOwnProperty$9.call(target, key);
|
|
70794
|
+
}
|
|
70795
|
+
|
|
70796
|
+
/**
|
|
70797
|
+
* @template T
|
|
70798
|
+
* @typedef { (
|
|
70799
|
+
* ((e: T) => boolean) |
|
|
70800
|
+
* ((e: T, idx: number) => boolean) |
|
|
70801
|
+
* ((e: T, key: string) => boolean) |
|
|
70802
|
+
* string |
|
|
70803
|
+
* number
|
|
70804
|
+
* ) } Matcher
|
|
70805
|
+
*/
|
|
70806
|
+
|
|
70807
|
+
/**
|
|
70808
|
+
* @template T
|
|
70809
|
+
* @template U
|
|
70810
|
+
*
|
|
70811
|
+
* @typedef { (
|
|
70812
|
+
* ((e: T) => U) | string | number
|
|
70813
|
+
* ) } Extractor
|
|
70814
|
+
*/
|
|
70815
|
+
|
|
70816
|
+
|
|
70817
|
+
/**
|
|
70818
|
+
* @template T
|
|
70819
|
+
* @typedef { (val: T, key: any) => boolean } MatchFn
|
|
70820
|
+
*/
|
|
70821
|
+
|
|
70822
|
+
/**
|
|
70823
|
+
* @template T
|
|
70824
|
+
* @typedef { T[] } ArrayCollection
|
|
70825
|
+
*/
|
|
70826
|
+
|
|
70827
|
+
/**
|
|
70828
|
+
* @template T
|
|
70829
|
+
* @typedef { { [key: string]: T } } StringKeyValueCollection
|
|
70830
|
+
*/
|
|
70831
|
+
|
|
70832
|
+
/**
|
|
70833
|
+
* @template T
|
|
70834
|
+
* @typedef { { [key: number]: T } } NumberKeyValueCollection
|
|
70835
|
+
*/
|
|
70836
|
+
|
|
70837
|
+
/**
|
|
70838
|
+
* @template T
|
|
70839
|
+
* @typedef { StringKeyValueCollection<T> | NumberKeyValueCollection<T> } KeyValueCollection
|
|
70840
|
+
*/
|
|
70841
|
+
|
|
70842
|
+
/**
|
|
70843
|
+
* @template T
|
|
70844
|
+
* @typedef { KeyValueCollection<T> | ArrayCollection<T> } Collection
|
|
70845
|
+
*/
|
|
70846
|
+
|
|
70847
|
+
/**
|
|
70848
|
+
* Find element in collection.
|
|
70849
|
+
*
|
|
70850
|
+
* @template T
|
|
70851
|
+
* @param {Collection<T>} collection
|
|
70852
|
+
* @param {Matcher<T>} matcher
|
|
70853
|
+
*
|
|
70854
|
+
* @return {Object}
|
|
70855
|
+
*/
|
|
70856
|
+
function find$5(collection, matcher) {
|
|
70857
|
+
|
|
70858
|
+
const matchFn = toMatcher$6(matcher);
|
|
70859
|
+
|
|
70860
|
+
let match;
|
|
70861
|
+
|
|
70862
|
+
forEach$8(collection, function(val, key) {
|
|
70863
|
+
if (matchFn(val, key)) {
|
|
70864
|
+
match = val;
|
|
70865
|
+
|
|
70866
|
+
return false;
|
|
70867
|
+
}
|
|
70868
|
+
});
|
|
70869
|
+
|
|
70870
|
+
return match;
|
|
70871
|
+
|
|
70872
|
+
}
|
|
70873
|
+
|
|
70874
|
+
|
|
70875
|
+
/**
|
|
70876
|
+
* Find element index in collection.
|
|
70877
|
+
*
|
|
70878
|
+
* @template T
|
|
70879
|
+
* @param {Collection<T>} collection
|
|
70880
|
+
* @param {Matcher<T>} matcher
|
|
70881
|
+
*
|
|
70882
|
+
* @return {number | string | undefined}
|
|
70883
|
+
*/
|
|
70884
|
+
function findIndex$3(collection, matcher) {
|
|
70885
|
+
|
|
70886
|
+
const matchFn = toMatcher$6(matcher);
|
|
70887
|
+
|
|
70888
|
+
let idx = isArray$8(collection) ? -1 : undefined;
|
|
70889
|
+
|
|
70890
|
+
forEach$8(collection, function(val, key) {
|
|
70891
|
+
if (matchFn(val, key)) {
|
|
70892
|
+
idx = key;
|
|
70893
|
+
|
|
70894
|
+
return false;
|
|
70895
|
+
}
|
|
70896
|
+
});
|
|
70897
|
+
|
|
70898
|
+
return idx;
|
|
70899
|
+
}
|
|
70900
|
+
|
|
70901
|
+
|
|
70902
|
+
/**
|
|
70903
|
+
* Filter elements in collection.
|
|
70904
|
+
*
|
|
70905
|
+
* @template T
|
|
70906
|
+
* @param {Collection<T>} collection
|
|
70907
|
+
* @param {Matcher<T>} matcher
|
|
70908
|
+
*
|
|
70909
|
+
* @return {T[]} result
|
|
70910
|
+
*/
|
|
70911
|
+
function filter$4(collection, matcher) {
|
|
70912
|
+
|
|
70913
|
+
const matchFn = toMatcher$6(matcher);
|
|
70914
|
+
|
|
70915
|
+
let result = [];
|
|
70916
|
+
|
|
70917
|
+
forEach$8(collection, function(val, key) {
|
|
70918
|
+
if (matchFn(val, key)) {
|
|
70919
|
+
result.push(val);
|
|
70920
|
+
}
|
|
70921
|
+
});
|
|
70922
|
+
|
|
70923
|
+
return result;
|
|
70924
|
+
}
|
|
70925
|
+
|
|
70926
|
+
|
|
70927
|
+
/**
|
|
70928
|
+
* Iterate over collection; returning something
|
|
70929
|
+
* (non-undefined) will stop iteration.
|
|
70930
|
+
*
|
|
70931
|
+
* @template T
|
|
70932
|
+
* @param {Collection<T>} collection
|
|
70933
|
+
* @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator
|
|
70934
|
+
*
|
|
70935
|
+
* @return {T} return result that stopped the iteration
|
|
70936
|
+
*/
|
|
70937
|
+
function forEach$8(collection, iterator) {
|
|
70938
|
+
|
|
70939
|
+
let val,
|
|
70940
|
+
result;
|
|
70941
|
+
|
|
70942
|
+
if (isUndefined$9(collection)) {
|
|
70943
|
+
return;
|
|
70944
|
+
}
|
|
70945
|
+
|
|
70946
|
+
const convertKey = isArray$8(collection) ? toNum$8 : identity$8;
|
|
70947
|
+
|
|
70948
|
+
for (let key in collection) {
|
|
70949
|
+
|
|
70950
|
+
if (has$9(collection, key)) {
|
|
70951
|
+
val = collection[key];
|
|
70952
|
+
|
|
70953
|
+
result = iterator(val, convertKey(key));
|
|
70954
|
+
|
|
70955
|
+
if (result === false) {
|
|
70956
|
+
return val;
|
|
70957
|
+
}
|
|
70958
|
+
}
|
|
70959
|
+
}
|
|
70960
|
+
}
|
|
70961
|
+
|
|
70962
|
+
/**
|
|
70963
|
+
* Return collection without element.
|
|
70964
|
+
*
|
|
70965
|
+
* @template T
|
|
70966
|
+
* @param {ArrayCollection<T>} arr
|
|
70967
|
+
* @param {Matcher<T>} matcher
|
|
70968
|
+
*
|
|
70969
|
+
* @return {T[]}
|
|
70970
|
+
*/
|
|
70971
|
+
function without$1(arr, matcher) {
|
|
70972
|
+
|
|
70973
|
+
if (isUndefined$9(arr)) {
|
|
70974
|
+
return [];
|
|
70975
|
+
}
|
|
70976
|
+
|
|
70977
|
+
ensureArray$1(arr);
|
|
70978
|
+
|
|
70979
|
+
const matchFn = toMatcher$6(matcher);
|
|
70980
|
+
|
|
70981
|
+
return arr.filter(function(el, idx) {
|
|
70982
|
+
return !matchFn(el, idx);
|
|
70983
|
+
});
|
|
70984
|
+
|
|
70985
|
+
}
|
|
70986
|
+
|
|
70987
|
+
|
|
70988
|
+
/**
|
|
70989
|
+
* Reduce collection, returning a single result.
|
|
70990
|
+
*
|
|
70991
|
+
* @template T
|
|
70992
|
+
* @template V
|
|
70993
|
+
*
|
|
70994
|
+
* @param {Collection<T>} collection
|
|
70995
|
+
* @param {(result: V, entry: T, index: any) => V} iterator
|
|
70996
|
+
* @param {V} result
|
|
70997
|
+
*
|
|
70998
|
+
* @return {V} result returned from last iterator
|
|
70999
|
+
*/
|
|
71000
|
+
function reduce$3(collection, iterator, result) {
|
|
71001
|
+
|
|
71002
|
+
forEach$8(collection, function(value, idx) {
|
|
71003
|
+
result = iterator(result, value, idx);
|
|
71004
|
+
});
|
|
71005
|
+
|
|
71006
|
+
return result;
|
|
71007
|
+
}
|
|
71008
|
+
|
|
71009
|
+
|
|
71010
|
+
/**
|
|
71011
|
+
* Transform a collection into another collection
|
|
71012
|
+
* by piping each member through the given fn.
|
|
71013
|
+
*
|
|
71014
|
+
* @param {Object|Array} collection
|
|
71015
|
+
* @param {Function} fn
|
|
71016
|
+
*
|
|
71017
|
+
* @return {Array} transformed collection
|
|
71018
|
+
*/
|
|
71019
|
+
function map$3(collection, fn) {
|
|
71020
|
+
|
|
71021
|
+
let result = [];
|
|
71022
|
+
|
|
71023
|
+
forEach$8(collection, function(val, key) {
|
|
71024
|
+
result.push(fn(val, key));
|
|
71025
|
+
});
|
|
71026
|
+
|
|
71027
|
+
return result;
|
|
71028
|
+
}
|
|
71029
|
+
|
|
71030
|
+
|
|
71031
|
+
/**
|
|
71032
|
+
* Get the collections keys.
|
|
71033
|
+
*
|
|
71034
|
+
* @param {Object|Array} collection
|
|
71035
|
+
*
|
|
71036
|
+
* @return {Array}
|
|
71037
|
+
*/
|
|
71038
|
+
function keys$1(collection) {
|
|
71039
|
+
return collection && Object.keys(collection) || [];
|
|
71040
|
+
}
|
|
71041
|
+
|
|
71042
|
+
|
|
71043
|
+
/**
|
|
71044
|
+
* Group collection members by attribute.
|
|
71045
|
+
*
|
|
71046
|
+
* @param {Object|Array} collection
|
|
71047
|
+
* @param {Extractor} extractor
|
|
71048
|
+
*
|
|
71049
|
+
* @return {Object} map with { attrValue => [ a, b, c ] }
|
|
71050
|
+
*/
|
|
71051
|
+
function groupBy$1(collection, extractor, grouped = {}) {
|
|
71052
|
+
|
|
71053
|
+
extractor = toExtractor$1(extractor);
|
|
71054
|
+
|
|
71055
|
+
forEach$8(collection, function(val) {
|
|
71056
|
+
let discriminator = extractor(val) || '_';
|
|
71057
|
+
|
|
71058
|
+
let group = grouped[discriminator];
|
|
71059
|
+
|
|
71060
|
+
if (!group) {
|
|
71061
|
+
group = grouped[discriminator] = [];
|
|
71062
|
+
}
|
|
71063
|
+
|
|
71064
|
+
group.push(val);
|
|
71065
|
+
});
|
|
71066
|
+
|
|
71067
|
+
return grouped;
|
|
71068
|
+
}
|
|
71069
|
+
|
|
71070
|
+
|
|
71071
|
+
|
|
71072
|
+
/**
|
|
71073
|
+
* Sort collection by criteria.
|
|
71074
|
+
*
|
|
71075
|
+
* @template T
|
|
71076
|
+
*
|
|
71077
|
+
* @param {Collection<T>} collection
|
|
71078
|
+
* @param {Extractor<T, number | string>} extractor
|
|
71079
|
+
*
|
|
71080
|
+
* @return {Array}
|
|
71081
|
+
*/
|
|
71082
|
+
function sortBy(collection, extractor) {
|
|
71083
|
+
|
|
71084
|
+
extractor = toExtractor$1(extractor);
|
|
71085
|
+
|
|
71086
|
+
let sorted = [];
|
|
71087
|
+
|
|
71088
|
+
forEach$8(collection, function(value, key) {
|
|
71089
|
+
let disc = extractor(value, key);
|
|
71090
|
+
|
|
71091
|
+
let entry = {
|
|
71092
|
+
d: disc,
|
|
71093
|
+
v: value
|
|
71094
|
+
};
|
|
71095
|
+
|
|
71096
|
+
for (var idx = 0; idx < sorted.length; idx++) {
|
|
71097
|
+
let { d } = sorted[idx];
|
|
71098
|
+
|
|
71099
|
+
if (disc < d) {
|
|
71100
|
+
sorted.splice(idx, 0, entry);
|
|
71101
|
+
return;
|
|
71102
|
+
}
|
|
71103
|
+
}
|
|
71104
|
+
|
|
71105
|
+
// not inserted, append (!)
|
|
71106
|
+
sorted.push(entry);
|
|
71107
|
+
});
|
|
71108
|
+
|
|
71109
|
+
return map$3(sorted, (e) => e.v);
|
|
71110
|
+
}
|
|
71111
|
+
|
|
71112
|
+
|
|
71113
|
+
/**
|
|
71114
|
+
* @param {string | ((e: any) => any) } extractor
|
|
71115
|
+
*
|
|
71116
|
+
* @return { (e: any) => any }
|
|
71117
|
+
*/
|
|
71118
|
+
function toExtractor$1(extractor) {
|
|
71119
|
+
|
|
71120
|
+
/**
|
|
71121
|
+
* @satisfies { (e: any) => any }
|
|
71122
|
+
*/
|
|
71123
|
+
return isFunction$7(extractor) ? extractor : (e) => {
|
|
71124
|
+
|
|
71125
|
+
// @ts-ignore: just works
|
|
71126
|
+
return e[extractor];
|
|
71127
|
+
};
|
|
71128
|
+
}
|
|
71129
|
+
|
|
71130
|
+
|
|
71131
|
+
/**
|
|
71132
|
+
* @template T
|
|
71133
|
+
* @param {Matcher<T>} matcher
|
|
71134
|
+
*
|
|
71135
|
+
* @return {MatchFn<T>}
|
|
71136
|
+
*/
|
|
71137
|
+
function toMatcher$6(matcher) {
|
|
71138
|
+
return isFunction$7(matcher) ? matcher : (e) => {
|
|
71139
|
+
return e === matcher;
|
|
71140
|
+
};
|
|
71141
|
+
}
|
|
71142
|
+
|
|
71143
|
+
|
|
71144
|
+
function identity$8(arg) {
|
|
71145
|
+
return arg;
|
|
71146
|
+
}
|
|
71147
|
+
|
|
71148
|
+
function toNum$8(arg) {
|
|
71149
|
+
return Number(arg);
|
|
70730
71150
|
}
|
|
70731
71151
|
|
|
70732
71152
|
/**
|
|
@@ -71015,14 +71435,14 @@
|
|
|
71015
71435
|
* @return {T[]}
|
|
71016
71436
|
*/
|
|
71017
71437
|
|
|
71018
|
-
const nativeToString$
|
|
71438
|
+
const nativeToString$8 = Object.prototype.toString;
|
|
71019
71439
|
|
|
71020
71440
|
function isObject$3(obj) {
|
|
71021
|
-
return nativeToString$
|
|
71441
|
+
return nativeToString$8.call(obj) === '[object Object]';
|
|
71022
71442
|
}
|
|
71023
71443
|
|
|
71024
71444
|
function isString$2(obj) {
|
|
71025
|
-
return nativeToString$
|
|
71445
|
+
return nativeToString$8.call(obj) === '[object String]';
|
|
71026
71446
|
}
|
|
71027
71447
|
|
|
71028
71448
|
/**
|
|
@@ -71173,438 +71593,6 @@
|
|
|
71173
71593
|
|
|
71174
71594
|
var t$1,r,u$1,i$2,o$1=0,f$1=[],c=[],e$2=l$2.__b,a$1=l$2.__r,v=l$2.diffed,l$1=l$2.__c,m=l$2.unmount;function d(t,u){l$2.__h&&l$2.__h(r,t,o$1||u),o$1=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function h(n){return o$1=1,s(B$1,n)}function s(n,u,i){var o=d(t$1++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B$1(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return true;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=false;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=true);}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=true;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r.shouldComponentUpdate=f;}return o.__N||o.__}function p$1(u,i){var o=d(t$1++,3);!l$2.__s&&z$1(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function y(u,i){var o=d(t$1++,4);!l$2.__s&&z$1(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o));}function _(n){return o$1=5,F$1(function(){return {current:n}},[])}function A$1(n,t,r){o$1=6,y(function(){return "function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n));}function F$1(n,r){var u=d(t$1++,7);return z$1(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T$1(n,t){return o$1=8,F$1(function(){return n},t)}function q$1(n){var u=r.context[n.__c],i=d(t$1++,9);return i.c=n,u?(null==i.__&&(i.__=true,u.sub(r)),u.props.value):n.__}function x$1(t,r){l$2.useDebugValue&&l$2.useDebugValue(r?r(t):t);}function V$1(){var n=d(t$1++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__="P"+i[0]+"-"+i[1]++;}return n.__}function b(){for(var t;t=f$1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k$1),t.__H.__h.forEach(w$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l$2.__e(r,t.__v);}}l$2.__b=function(n){r=null,e$2&&e$2(n);},l$2.__r=function(n){a$1&&a$1(n),t$1=0;var i=(r=n.__c).__H;i&&(u$1===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k$1),i.__h.forEach(w$1),i.__h=[],t$1=0)),u$1=r;},l$2.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f$1.push(o)&&i$2===l$2.requestAnimationFrame||((i$2=l$2.requestAnimationFrame)||j$1)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u$1=r=null;},l$2.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k$1),t.__h=t.__h.filter(function(n){return !n.__||w$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$2.__e(u,t.__v);}}),l$1&&l$1(t,r);},l$2.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k$1(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$2.__e(r,u.__v));};var g$1="function"==typeof requestAnimationFrame;function j$1(n){var t,r=function(){clearTimeout(u),g$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g$1&&(t=requestAnimationFrame(r));}function k$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w$1(n){var t=r;n.__c=n.__(),r=t;}function z$1(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B$1(n,t){return "function"==typeof t?t(n):t}
|
|
71175
71595
|
|
|
71176
|
-
/**
|
|
71177
|
-
* Flatten array, one level deep.
|
|
71178
|
-
*
|
|
71179
|
-
* @template T
|
|
71180
|
-
*
|
|
71181
|
-
* @param {T[][] | T[] | null} [arr]
|
|
71182
|
-
*
|
|
71183
|
-
* @return {T[]}
|
|
71184
|
-
*/
|
|
71185
|
-
function flatten$2(arr) {
|
|
71186
|
-
return Array.prototype.concat.apply([], arr);
|
|
71187
|
-
}
|
|
71188
|
-
|
|
71189
|
-
const nativeToString$8 = Object.prototype.toString;
|
|
71190
|
-
const nativeHasOwnProperty$9 = Object.prototype.hasOwnProperty;
|
|
71191
|
-
|
|
71192
|
-
function isUndefined$9(obj) {
|
|
71193
|
-
return obj === undefined;
|
|
71194
|
-
}
|
|
71195
|
-
|
|
71196
|
-
function isDefined$3(obj) {
|
|
71197
|
-
return obj !== undefined;
|
|
71198
|
-
}
|
|
71199
|
-
|
|
71200
|
-
function isNil$9(obj) {
|
|
71201
|
-
return obj == null;
|
|
71202
|
-
}
|
|
71203
|
-
|
|
71204
|
-
function isArray$8(obj) {
|
|
71205
|
-
return nativeToString$8.call(obj) === '[object Array]';
|
|
71206
|
-
}
|
|
71207
|
-
|
|
71208
|
-
/**
|
|
71209
|
-
* @param {any} obj
|
|
71210
|
-
*
|
|
71211
|
-
* @return {boolean}
|
|
71212
|
-
*/
|
|
71213
|
-
function isFunction$7(obj) {
|
|
71214
|
-
const tag = nativeToString$8.call(obj);
|
|
71215
|
-
|
|
71216
|
-
return (
|
|
71217
|
-
tag === '[object Function]' ||
|
|
71218
|
-
tag === '[object AsyncFunction]' ||
|
|
71219
|
-
tag === '[object GeneratorFunction]' ||
|
|
71220
|
-
tag === '[object AsyncGeneratorFunction]' ||
|
|
71221
|
-
tag === '[object Proxy]'
|
|
71222
|
-
);
|
|
71223
|
-
}
|
|
71224
|
-
|
|
71225
|
-
|
|
71226
|
-
/**
|
|
71227
|
-
* Ensure collection is an array.
|
|
71228
|
-
*
|
|
71229
|
-
* @param {Object} obj
|
|
71230
|
-
*/
|
|
71231
|
-
function ensureArray$1(obj) {
|
|
71232
|
-
|
|
71233
|
-
if (isArray$8(obj)) {
|
|
71234
|
-
return;
|
|
71235
|
-
}
|
|
71236
|
-
|
|
71237
|
-
throw new Error('must supply array');
|
|
71238
|
-
}
|
|
71239
|
-
|
|
71240
|
-
/**
|
|
71241
|
-
* Return true, if target owns a property with the given key.
|
|
71242
|
-
*
|
|
71243
|
-
* @param {Object} target
|
|
71244
|
-
* @param {String} key
|
|
71245
|
-
*
|
|
71246
|
-
* @return {Boolean}
|
|
71247
|
-
*/
|
|
71248
|
-
function has$9(target, key) {
|
|
71249
|
-
return !isNil$9(target) && nativeHasOwnProperty$9.call(target, key);
|
|
71250
|
-
}
|
|
71251
|
-
|
|
71252
|
-
/**
|
|
71253
|
-
* @template T
|
|
71254
|
-
* @typedef { (
|
|
71255
|
-
* ((e: T) => boolean) |
|
|
71256
|
-
* ((e: T, idx: number) => boolean) |
|
|
71257
|
-
* ((e: T, key: string) => boolean) |
|
|
71258
|
-
* string |
|
|
71259
|
-
* number
|
|
71260
|
-
* ) } Matcher
|
|
71261
|
-
*/
|
|
71262
|
-
|
|
71263
|
-
/**
|
|
71264
|
-
* @template T
|
|
71265
|
-
* @template U
|
|
71266
|
-
*
|
|
71267
|
-
* @typedef { (
|
|
71268
|
-
* ((e: T) => U) | string | number
|
|
71269
|
-
* ) } Extractor
|
|
71270
|
-
*/
|
|
71271
|
-
|
|
71272
|
-
|
|
71273
|
-
/**
|
|
71274
|
-
* @template T
|
|
71275
|
-
* @typedef { (val: T, key: any) => boolean } MatchFn
|
|
71276
|
-
*/
|
|
71277
|
-
|
|
71278
|
-
/**
|
|
71279
|
-
* @template T
|
|
71280
|
-
* @typedef { T[] } ArrayCollection
|
|
71281
|
-
*/
|
|
71282
|
-
|
|
71283
|
-
/**
|
|
71284
|
-
* @template T
|
|
71285
|
-
* @typedef { { [key: string]: T } } StringKeyValueCollection
|
|
71286
|
-
*/
|
|
71287
|
-
|
|
71288
|
-
/**
|
|
71289
|
-
* @template T
|
|
71290
|
-
* @typedef { { [key: number]: T } } NumberKeyValueCollection
|
|
71291
|
-
*/
|
|
71292
|
-
|
|
71293
|
-
/**
|
|
71294
|
-
* @template T
|
|
71295
|
-
* @typedef { StringKeyValueCollection<T> | NumberKeyValueCollection<T> } KeyValueCollection
|
|
71296
|
-
*/
|
|
71297
|
-
|
|
71298
|
-
/**
|
|
71299
|
-
* @template T
|
|
71300
|
-
* @typedef { KeyValueCollection<T> | ArrayCollection<T> } Collection
|
|
71301
|
-
*/
|
|
71302
|
-
|
|
71303
|
-
/**
|
|
71304
|
-
* Find element in collection.
|
|
71305
|
-
*
|
|
71306
|
-
* @template T
|
|
71307
|
-
* @param {Collection<T>} collection
|
|
71308
|
-
* @param {Matcher<T>} matcher
|
|
71309
|
-
*
|
|
71310
|
-
* @return {Object}
|
|
71311
|
-
*/
|
|
71312
|
-
function find$5(collection, matcher) {
|
|
71313
|
-
|
|
71314
|
-
const matchFn = toMatcher$6(matcher);
|
|
71315
|
-
|
|
71316
|
-
let match;
|
|
71317
|
-
|
|
71318
|
-
forEach$8(collection, function(val, key) {
|
|
71319
|
-
if (matchFn(val, key)) {
|
|
71320
|
-
match = val;
|
|
71321
|
-
|
|
71322
|
-
return false;
|
|
71323
|
-
}
|
|
71324
|
-
});
|
|
71325
|
-
|
|
71326
|
-
return match;
|
|
71327
|
-
|
|
71328
|
-
}
|
|
71329
|
-
|
|
71330
|
-
|
|
71331
|
-
/**
|
|
71332
|
-
* Find element index in collection.
|
|
71333
|
-
*
|
|
71334
|
-
* @template T
|
|
71335
|
-
* @param {Collection<T>} collection
|
|
71336
|
-
* @param {Matcher<T>} matcher
|
|
71337
|
-
*
|
|
71338
|
-
* @return {number | string | undefined}
|
|
71339
|
-
*/
|
|
71340
|
-
function findIndex$3(collection, matcher) {
|
|
71341
|
-
|
|
71342
|
-
const matchFn = toMatcher$6(matcher);
|
|
71343
|
-
|
|
71344
|
-
let idx = isArray$8(collection) ? -1 : undefined;
|
|
71345
|
-
|
|
71346
|
-
forEach$8(collection, function(val, key) {
|
|
71347
|
-
if (matchFn(val, key)) {
|
|
71348
|
-
idx = key;
|
|
71349
|
-
|
|
71350
|
-
return false;
|
|
71351
|
-
}
|
|
71352
|
-
});
|
|
71353
|
-
|
|
71354
|
-
return idx;
|
|
71355
|
-
}
|
|
71356
|
-
|
|
71357
|
-
|
|
71358
|
-
/**
|
|
71359
|
-
* Filter elements in collection.
|
|
71360
|
-
*
|
|
71361
|
-
* @template T
|
|
71362
|
-
* @param {Collection<T>} collection
|
|
71363
|
-
* @param {Matcher<T>} matcher
|
|
71364
|
-
*
|
|
71365
|
-
* @return {T[]} result
|
|
71366
|
-
*/
|
|
71367
|
-
function filter$4(collection, matcher) {
|
|
71368
|
-
|
|
71369
|
-
const matchFn = toMatcher$6(matcher);
|
|
71370
|
-
|
|
71371
|
-
let result = [];
|
|
71372
|
-
|
|
71373
|
-
forEach$8(collection, function(val, key) {
|
|
71374
|
-
if (matchFn(val, key)) {
|
|
71375
|
-
result.push(val);
|
|
71376
|
-
}
|
|
71377
|
-
});
|
|
71378
|
-
|
|
71379
|
-
return result;
|
|
71380
|
-
}
|
|
71381
|
-
|
|
71382
|
-
|
|
71383
|
-
/**
|
|
71384
|
-
* Iterate over collection; returning something
|
|
71385
|
-
* (non-undefined) will stop iteration.
|
|
71386
|
-
*
|
|
71387
|
-
* @template T
|
|
71388
|
-
* @param {Collection<T>} collection
|
|
71389
|
-
* @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator
|
|
71390
|
-
*
|
|
71391
|
-
* @return {T} return result that stopped the iteration
|
|
71392
|
-
*/
|
|
71393
|
-
function forEach$8(collection, iterator) {
|
|
71394
|
-
|
|
71395
|
-
let val,
|
|
71396
|
-
result;
|
|
71397
|
-
|
|
71398
|
-
if (isUndefined$9(collection)) {
|
|
71399
|
-
return;
|
|
71400
|
-
}
|
|
71401
|
-
|
|
71402
|
-
const convertKey = isArray$8(collection) ? toNum$8 : identity$8;
|
|
71403
|
-
|
|
71404
|
-
for (let key in collection) {
|
|
71405
|
-
|
|
71406
|
-
if (has$9(collection, key)) {
|
|
71407
|
-
val = collection[key];
|
|
71408
|
-
|
|
71409
|
-
result = iterator(val, convertKey(key));
|
|
71410
|
-
|
|
71411
|
-
if (result === false) {
|
|
71412
|
-
return val;
|
|
71413
|
-
}
|
|
71414
|
-
}
|
|
71415
|
-
}
|
|
71416
|
-
}
|
|
71417
|
-
|
|
71418
|
-
/**
|
|
71419
|
-
* Return collection without element.
|
|
71420
|
-
*
|
|
71421
|
-
* @template T
|
|
71422
|
-
* @param {ArrayCollection<T>} arr
|
|
71423
|
-
* @param {Matcher<T>} matcher
|
|
71424
|
-
*
|
|
71425
|
-
* @return {T[]}
|
|
71426
|
-
*/
|
|
71427
|
-
function without$1(arr, matcher) {
|
|
71428
|
-
|
|
71429
|
-
if (isUndefined$9(arr)) {
|
|
71430
|
-
return [];
|
|
71431
|
-
}
|
|
71432
|
-
|
|
71433
|
-
ensureArray$1(arr);
|
|
71434
|
-
|
|
71435
|
-
const matchFn = toMatcher$6(matcher);
|
|
71436
|
-
|
|
71437
|
-
return arr.filter(function(el, idx) {
|
|
71438
|
-
return !matchFn(el, idx);
|
|
71439
|
-
});
|
|
71440
|
-
|
|
71441
|
-
}
|
|
71442
|
-
|
|
71443
|
-
|
|
71444
|
-
/**
|
|
71445
|
-
* Reduce collection, returning a single result.
|
|
71446
|
-
*
|
|
71447
|
-
* @template T
|
|
71448
|
-
* @template V
|
|
71449
|
-
*
|
|
71450
|
-
* @param {Collection<T>} collection
|
|
71451
|
-
* @param {(result: V, entry: T, index: any) => V} iterator
|
|
71452
|
-
* @param {V} result
|
|
71453
|
-
*
|
|
71454
|
-
* @return {V} result returned from last iterator
|
|
71455
|
-
*/
|
|
71456
|
-
function reduce$3(collection, iterator, result) {
|
|
71457
|
-
|
|
71458
|
-
forEach$8(collection, function(value, idx) {
|
|
71459
|
-
result = iterator(result, value, idx);
|
|
71460
|
-
});
|
|
71461
|
-
|
|
71462
|
-
return result;
|
|
71463
|
-
}
|
|
71464
|
-
|
|
71465
|
-
|
|
71466
|
-
/**
|
|
71467
|
-
* Transform a collection into another collection
|
|
71468
|
-
* by piping each member through the given fn.
|
|
71469
|
-
*
|
|
71470
|
-
* @param {Object|Array} collection
|
|
71471
|
-
* @param {Function} fn
|
|
71472
|
-
*
|
|
71473
|
-
* @return {Array} transformed collection
|
|
71474
|
-
*/
|
|
71475
|
-
function map$3(collection, fn) {
|
|
71476
|
-
|
|
71477
|
-
let result = [];
|
|
71478
|
-
|
|
71479
|
-
forEach$8(collection, function(val, key) {
|
|
71480
|
-
result.push(fn(val, key));
|
|
71481
|
-
});
|
|
71482
|
-
|
|
71483
|
-
return result;
|
|
71484
|
-
}
|
|
71485
|
-
|
|
71486
|
-
|
|
71487
|
-
/**
|
|
71488
|
-
* Get the collections keys.
|
|
71489
|
-
*
|
|
71490
|
-
* @param {Object|Array} collection
|
|
71491
|
-
*
|
|
71492
|
-
* @return {Array}
|
|
71493
|
-
*/
|
|
71494
|
-
function keys$1(collection) {
|
|
71495
|
-
return collection && Object.keys(collection) || [];
|
|
71496
|
-
}
|
|
71497
|
-
|
|
71498
|
-
|
|
71499
|
-
/**
|
|
71500
|
-
* Group collection members by attribute.
|
|
71501
|
-
*
|
|
71502
|
-
* @param {Object|Array} collection
|
|
71503
|
-
* @param {Extractor} extractor
|
|
71504
|
-
*
|
|
71505
|
-
* @return {Object} map with { attrValue => [ a, b, c ] }
|
|
71506
|
-
*/
|
|
71507
|
-
function groupBy$1(collection, extractor, grouped = {}) {
|
|
71508
|
-
|
|
71509
|
-
extractor = toExtractor$1(extractor);
|
|
71510
|
-
|
|
71511
|
-
forEach$8(collection, function(val) {
|
|
71512
|
-
let discriminator = extractor(val) || '_';
|
|
71513
|
-
|
|
71514
|
-
let group = grouped[discriminator];
|
|
71515
|
-
|
|
71516
|
-
if (!group) {
|
|
71517
|
-
group = grouped[discriminator] = [];
|
|
71518
|
-
}
|
|
71519
|
-
|
|
71520
|
-
group.push(val);
|
|
71521
|
-
});
|
|
71522
|
-
|
|
71523
|
-
return grouped;
|
|
71524
|
-
}
|
|
71525
|
-
|
|
71526
|
-
|
|
71527
|
-
|
|
71528
|
-
/**
|
|
71529
|
-
* Sort collection by criteria.
|
|
71530
|
-
*
|
|
71531
|
-
* @template T
|
|
71532
|
-
*
|
|
71533
|
-
* @param {Collection<T>} collection
|
|
71534
|
-
* @param {Extractor<T, number | string>} extractor
|
|
71535
|
-
*
|
|
71536
|
-
* @return {Array}
|
|
71537
|
-
*/
|
|
71538
|
-
function sortBy(collection, extractor) {
|
|
71539
|
-
|
|
71540
|
-
extractor = toExtractor$1(extractor);
|
|
71541
|
-
|
|
71542
|
-
let sorted = [];
|
|
71543
|
-
|
|
71544
|
-
forEach$8(collection, function(value, key) {
|
|
71545
|
-
let disc = extractor(value, key);
|
|
71546
|
-
|
|
71547
|
-
let entry = {
|
|
71548
|
-
d: disc,
|
|
71549
|
-
v: value
|
|
71550
|
-
};
|
|
71551
|
-
|
|
71552
|
-
for (var idx = 0; idx < sorted.length; idx++) {
|
|
71553
|
-
let { d } = sorted[idx];
|
|
71554
|
-
|
|
71555
|
-
if (disc < d) {
|
|
71556
|
-
sorted.splice(idx, 0, entry);
|
|
71557
|
-
return;
|
|
71558
|
-
}
|
|
71559
|
-
}
|
|
71560
|
-
|
|
71561
|
-
// not inserted, append (!)
|
|
71562
|
-
sorted.push(entry);
|
|
71563
|
-
});
|
|
71564
|
-
|
|
71565
|
-
return map$3(sorted, (e) => e.v);
|
|
71566
|
-
}
|
|
71567
|
-
|
|
71568
|
-
|
|
71569
|
-
/**
|
|
71570
|
-
* @param {string | ((e: any) => any) } extractor
|
|
71571
|
-
*
|
|
71572
|
-
* @return { (e: any) => any }
|
|
71573
|
-
*/
|
|
71574
|
-
function toExtractor$1(extractor) {
|
|
71575
|
-
|
|
71576
|
-
/**
|
|
71577
|
-
* @satisfies { (e: any) => any }
|
|
71578
|
-
*/
|
|
71579
|
-
return isFunction$7(extractor) ? extractor : (e) => {
|
|
71580
|
-
|
|
71581
|
-
// @ts-ignore: just works
|
|
71582
|
-
return e[extractor];
|
|
71583
|
-
};
|
|
71584
|
-
}
|
|
71585
|
-
|
|
71586
|
-
|
|
71587
|
-
/**
|
|
71588
|
-
* @template T
|
|
71589
|
-
* @param {Matcher<T>} matcher
|
|
71590
|
-
*
|
|
71591
|
-
* @return {MatchFn<T>}
|
|
71592
|
-
*/
|
|
71593
|
-
function toMatcher$6(matcher) {
|
|
71594
|
-
return isFunction$7(matcher) ? matcher : (e) => {
|
|
71595
|
-
return e === matcher;
|
|
71596
|
-
};
|
|
71597
|
-
}
|
|
71598
|
-
|
|
71599
|
-
|
|
71600
|
-
function identity$8(arg) {
|
|
71601
|
-
return arg;
|
|
71602
|
-
}
|
|
71603
|
-
|
|
71604
|
-
function toNum$8(arg) {
|
|
71605
|
-
return Number(arg);
|
|
71606
|
-
}
|
|
71607
|
-
|
|
71608
71596
|
/**
|
|
71609
71597
|
* Flatten array, one level deep.
|
|
71610
71598
|
*
|