extra-react-hooks 0.2.1 → 0.3.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/README.md +28 -30
- package/dist/es2015/index.min.mjs +3 -3
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +1987 -1937
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +1988 -1936
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +1 -1
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +3 -3
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +1987 -1937
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +1988 -1936
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +1 -1
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/index.d.ts +2 -0
- package/lib/es2015/index.js +2 -0
- package/lib/es2015/index.js.map +1 -1
- package/lib/es2015/types.d.ts +3 -0
- package/lib/es2015/types.js +3 -0
- package/lib/es2015/types.js.map +1 -0
- package/lib/es2015/use-finite-state-machine.js +1 -1
- package/lib/es2015/use-finite-state-machine.js.map +1 -1
- package/lib/es2015/use-force-update.js +4 -1
- package/lib/es2015/use-force-update.js.map +1 -1
- package/lib/es2015/use-iife.d.ts +2 -0
- package/lib/es2015/use-iife.js +25 -0
- package/lib/es2015/use-iife.js.map +1 -0
- package/lib/es2015/use-increment.js +1 -1
- package/lib/es2015/use-increment.js.map +1 -1
- package/lib/es2015/use-is-first-render.js +4 -1
- package/lib/es2015/use-is-first-render.js.map +1 -1
- package/lib/es2015/use-is-mounted.js +7 -4
- package/lib/es2015/use-is-mounted.js.map +1 -1
- package/lib/es2015/use-multiple-selection.d.ts +8 -12
- package/lib/es2015/use-multiple-selection.js +45 -29
- package/lib/es2015/use-multiple-selection.js.map +1 -1
- package/lib/es2015/use-single-selection.d.ts +6 -13
- package/lib/es2015/use-single-selection.js +18 -15
- package/lib/es2015/use-single-selection.js.map +1 -1
- package/lib/es2015/use-state-cycle.d.ts +2 -1
- package/lib/es2015/use-state-cycle.js +3 -3
- package/lib/es2015/use-state-cycle.js.map +1 -1
- package/lib/es2015/use-step.d.ts +2 -1
- package/lib/es2015/use-step.js +1 -1
- package/lib/es2015/use-step.js.map +1 -1
- package/lib/es2015/use-toggle.d.ts +1 -4
- package/lib/es2015/use-toggle.js +1 -1
- package/lib/es2015/use-toggle.js.map +1 -1
- package/lib/es2015/use-unmount.d.ts +1 -0
- package/lib/es2015/use-unmount.js +9 -0
- package/lib/es2015/use-unmount.js.map +1 -0
- package/lib/es2018/index.d.ts +2 -0
- package/lib/es2018/index.js +2 -0
- package/lib/es2018/index.js.map +1 -1
- package/lib/es2018/types.d.ts +3 -0
- package/lib/es2018/types.js +3 -0
- package/lib/es2018/types.js.map +1 -0
- package/lib/es2018/use-finite-state-machine.js +1 -1
- package/lib/es2018/use-finite-state-machine.js.map +1 -1
- package/lib/es2018/use-force-update.js +4 -1
- package/lib/es2018/use-force-update.js.map +1 -1
- package/lib/es2018/use-iife.d.ts +2 -0
- package/lib/es2018/use-iife.js +25 -0
- package/lib/es2018/use-iife.js.map +1 -0
- package/lib/es2018/use-increment.js +1 -1
- package/lib/es2018/use-increment.js.map +1 -1
- package/lib/es2018/use-is-first-render.js +4 -1
- package/lib/es2018/use-is-first-render.js.map +1 -1
- package/lib/es2018/use-is-mounted.js +7 -4
- package/lib/es2018/use-is-mounted.js.map +1 -1
- package/lib/es2018/use-multiple-selection.d.ts +8 -12
- package/lib/es2018/use-multiple-selection.js +45 -29
- package/lib/es2018/use-multiple-selection.js.map +1 -1
- package/lib/es2018/use-single-selection.d.ts +6 -13
- package/lib/es2018/use-single-selection.js +18 -15
- package/lib/es2018/use-single-selection.js.map +1 -1
- package/lib/es2018/use-state-cycle.d.ts +2 -1
- package/lib/es2018/use-state-cycle.js +3 -3
- package/lib/es2018/use-state-cycle.js.map +1 -1
- package/lib/es2018/use-step.d.ts +2 -1
- package/lib/es2018/use-step.js +1 -1
- package/lib/es2018/use-step.js.map +1 -1
- package/lib/es2018/use-toggle.d.ts +1 -4
- package/lib/es2018/use-toggle.js +1 -1
- package/lib/es2018/use-toggle.js.map +1 -1
- package/lib/es2018/use-unmount.d.ts +1 -0
- package/lib/es2018/use-unmount.js +9 -0
- package/lib/es2018/use-unmount.js.map +1 -0
- package/package.json +2 -1
package/dist/es2015/index.mjs
CHANGED
|
@@ -2485,7 +2485,7 @@ function requireReact_development () {
|
|
|
2485
2485
|
|
|
2486
2486
|
function useIncrement(initialValue) {
|
|
2487
2487
|
const [value, setValue] = react.exports.useState(initialValue);
|
|
2488
|
-
return [value, increment, reset];
|
|
2488
|
+
return [value, react.exports.useCallback(increment, []), react.exports.useCallback(reset, [])];
|
|
2489
2489
|
function increment(step = 1) {
|
|
2490
2490
|
setValue(value => value + step);
|
|
2491
2491
|
}
|
|
@@ -2499,14 +2499,17 @@ function useMount(effect) {
|
|
|
2499
2499
|
}
|
|
2500
2500
|
|
|
2501
2501
|
function useIsMounted() {
|
|
2502
|
-
const
|
|
2502
|
+
const mounted = react.exports.useRef(false);
|
|
2503
2503
|
useMount(() => {
|
|
2504
|
-
|
|
2504
|
+
mounted.current = true;
|
|
2505
2505
|
return () => {
|
|
2506
|
-
|
|
2506
|
+
mounted.current = false;
|
|
2507
2507
|
};
|
|
2508
2508
|
});
|
|
2509
|
-
return ()
|
|
2509
|
+
return react.exports.useCallback(isMounted, []);
|
|
2510
|
+
function isMounted() {
|
|
2511
|
+
return mounted.current;
|
|
2512
|
+
}
|
|
2510
2513
|
}
|
|
2511
2514
|
|
|
2512
2515
|
var State;
|
|
@@ -2526,7 +2529,10 @@ function useIsFirstRender() {
|
|
|
2526
2529
|
break;
|
|
2527
2530
|
case State.NotFirst: break;
|
|
2528
2531
|
}
|
|
2529
|
-
return ()
|
|
2532
|
+
return react.exports.useCallback(isFirstRender, []);
|
|
2533
|
+
function isFirstRender() {
|
|
2534
|
+
return state.current === State.First;
|
|
2535
|
+
}
|
|
2530
2536
|
}
|
|
2531
2537
|
|
|
2532
2538
|
function useRenderCounter() {
|
|
@@ -2535,6 +2541,10 @@ function useRenderCounter() {
|
|
|
2535
2541
|
return counter.current;
|
|
2536
2542
|
}
|
|
2537
2543
|
|
|
2544
|
+
function useUnmount(effect) {
|
|
2545
|
+
react.exports.useEffect(() => effect, []);
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2538
2548
|
function useUpdateEffect(effect, deps) {
|
|
2539
2549
|
const isFirstRender = useIsFirstRender();
|
|
2540
2550
|
react.exports.useEffect(() => {
|
|
@@ -2546,6 +2556,71 @@ function useUpdateEffect(effect, deps) {
|
|
|
2546
2556
|
|
|
2547
2557
|
var es2018$9 = {};
|
|
2548
2558
|
|
|
2559
|
+
var customError = {};
|
|
2560
|
+
|
|
2561
|
+
var es2018$8 = {};
|
|
2562
|
+
|
|
2563
|
+
var middleware = {};
|
|
2564
|
+
|
|
2565
|
+
var chunkAsync = {};
|
|
2566
|
+
|
|
2567
|
+
var es2018$7 = {};
|
|
2568
|
+
|
|
2569
|
+
var go$1 = {};
|
|
2570
|
+
|
|
2571
|
+
go$1.go = void 0;
|
|
2572
|
+
function go(fn) {
|
|
2573
|
+
return fn();
|
|
2574
|
+
}
|
|
2575
|
+
go$1.go = go;
|
|
2576
|
+
|
|
2577
|
+
(function (exports) {
|
|
2578
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2579
|
+
if (k2 === undefined) k2 = k;
|
|
2580
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
2581
|
+
}) : (function(o, m, k, k2) {
|
|
2582
|
+
if (k2 === undefined) k2 = k;
|
|
2583
|
+
o[k2] = m[k];
|
|
2584
|
+
}));
|
|
2585
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
2586
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2587
|
+
};__exportStar(go$1, exports);
|
|
2588
|
+
|
|
2589
|
+
} (es2018$7));
|
|
2590
|
+
|
|
2591
|
+
var hasRequiredChunkAsync;
|
|
2592
|
+
|
|
2593
|
+
function requireChunkAsync () {
|
|
2594
|
+
if (hasRequiredChunkAsync) return chunkAsync;
|
|
2595
|
+
hasRequiredChunkAsync = 1;
|
|
2596
|
+
chunkAsync.chunkAsync = void 0;
|
|
2597
|
+
const go_1 = es2018$7;
|
|
2598
|
+
const errors_1 = requireEs2018();
|
|
2599
|
+
function chunkAsync$1(iterable, size) {
|
|
2600
|
+
(0, errors_1.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
2601
|
+
(0, errors_1.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
2602
|
+
return (0, go_1.go)(async function* () {
|
|
2603
|
+
let buffer = [];
|
|
2604
|
+
for await (const element of iterable) {
|
|
2605
|
+
buffer.push(element);
|
|
2606
|
+
if (buffer.length >= size) {
|
|
2607
|
+
yield buffer;
|
|
2608
|
+
buffer = [];
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
if (buffer.length)
|
|
2612
|
+
yield buffer;
|
|
2613
|
+
});
|
|
2614
|
+
}
|
|
2615
|
+
chunkAsync.chunkAsync = chunkAsync$1;
|
|
2616
|
+
|
|
2617
|
+
return chunkAsync;
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
var chunkByAsync$1 = {};
|
|
2621
|
+
|
|
2622
|
+
var es2018$6 = {};
|
|
2623
|
+
|
|
2549
2624
|
var array$2 = {};
|
|
2550
2625
|
|
|
2551
2626
|
array$2.isntEmptyArray = array$2.isEmptyArray = array$2.isntArray = array$2.isArray = void 0;
|
|
@@ -3109,18 +3184,6 @@ function isAbsoluteURL$2(str) {
|
|
|
3109
3184
|
}
|
|
3110
3185
|
url$2.isAbsoluteURL = isAbsoluteURL$2;
|
|
3111
3186
|
|
|
3112
|
-
var regexp = {};
|
|
3113
|
-
|
|
3114
|
-
regexp.isntRegExp = regexp.isRegExp = void 0;
|
|
3115
|
-
function isRegExp(val) {
|
|
3116
|
-
return val instanceof RegExp;
|
|
3117
|
-
}
|
|
3118
|
-
regexp.isRegExp = isRegExp;
|
|
3119
|
-
function isntRegExp(val) {
|
|
3120
|
-
return !isRegExp(val);
|
|
3121
|
-
}
|
|
3122
|
-
regexp.isntRegExp = isntRegExp;
|
|
3123
|
-
|
|
3124
3187
|
(function (exports) {
|
|
3125
3188
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3126
3189
|
if (k2 === undefined) k2 = k;
|
|
@@ -3154,58 +3217,84 @@ regexp.isntRegExp = isntRegExp;
|
|
|
3154
3217
|
__exportStar(string$2, exports);
|
|
3155
3218
|
__exportStar(_undefined$2, exports);
|
|
3156
3219
|
__exportStar(url$2, exports);
|
|
3157
|
-
__exportStar(regexp, exports);
|
|
3158
3220
|
|
|
3159
|
-
} (es2018$
|
|
3160
|
-
|
|
3161
|
-
var es2018$8 = {};
|
|
3162
|
-
|
|
3163
|
-
var customError = {};
|
|
3164
|
-
|
|
3165
|
-
var es2018$7 = {};
|
|
3166
|
-
|
|
3167
|
-
var middleware = {};
|
|
3168
|
-
|
|
3169
|
-
var chunkAsync = {};
|
|
3221
|
+
} (es2018$6));
|
|
3170
3222
|
|
|
3171
|
-
|
|
3223
|
+
chunkByAsync$1.chunkByAsync = void 0;
|
|
3224
|
+
const types_1$j = es2018$6;
|
|
3225
|
+
function chunkByAsync(iterable, predicate) {
|
|
3226
|
+
if ((0, types_1$j.isAsyncIterable)(iterable)) {
|
|
3227
|
+
return chunkByAsyncIterable(iterable);
|
|
3228
|
+
}
|
|
3229
|
+
else {
|
|
3230
|
+
return chunkByIterable(iterable);
|
|
3231
|
+
}
|
|
3232
|
+
async function* chunkByAsyncIterable(iterable) {
|
|
3233
|
+
let buffer = [];
|
|
3234
|
+
let index = 0;
|
|
3235
|
+
for await (const element of iterable) {
|
|
3236
|
+
buffer.push(element);
|
|
3237
|
+
if (await predicate(element, index)) {
|
|
3238
|
+
yield buffer;
|
|
3239
|
+
buffer = [];
|
|
3240
|
+
}
|
|
3241
|
+
index++;
|
|
3242
|
+
}
|
|
3243
|
+
if (buffer.length)
|
|
3244
|
+
yield buffer;
|
|
3245
|
+
}
|
|
3246
|
+
async function* chunkByIterable(iterable) {
|
|
3247
|
+
let buffer = [];
|
|
3248
|
+
let index = 0;
|
|
3249
|
+
for (const element of iterable) {
|
|
3250
|
+
buffer.push(element);
|
|
3251
|
+
if (await predicate(element, index)) {
|
|
3252
|
+
yield buffer;
|
|
3253
|
+
buffer = [];
|
|
3254
|
+
}
|
|
3255
|
+
index++;
|
|
3256
|
+
}
|
|
3257
|
+
if (buffer.length)
|
|
3258
|
+
yield buffer;
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
chunkByAsync$1.chunkByAsync = chunkByAsync;
|
|
3172
3262
|
|
|
3173
|
-
var
|
|
3263
|
+
var chunkBy$1 = {};
|
|
3174
3264
|
|
|
3175
|
-
|
|
3176
|
-
function
|
|
3177
|
-
|
|
3265
|
+
chunkBy$1.chunkBy = void 0;
|
|
3266
|
+
function* chunkBy(iterable, predicate) {
|
|
3267
|
+
let buffer = [];
|
|
3268
|
+
let index = 0;
|
|
3269
|
+
for (const element of iterable) {
|
|
3270
|
+
buffer.push(element);
|
|
3271
|
+
if (predicate(element, index)) {
|
|
3272
|
+
yield buffer;
|
|
3273
|
+
buffer = [];
|
|
3274
|
+
}
|
|
3275
|
+
index++;
|
|
3276
|
+
}
|
|
3277
|
+
if (buffer.length)
|
|
3278
|
+
yield buffer;
|
|
3178
3279
|
}
|
|
3179
|
-
|
|
3280
|
+
chunkBy$1.chunkBy = chunkBy;
|
|
3180
3281
|
|
|
3181
|
-
|
|
3182
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3183
|
-
if (k2 === undefined) k2 = k;
|
|
3184
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
3185
|
-
}) : (function(o, m, k, k2) {
|
|
3186
|
-
if (k2 === undefined) k2 = k;
|
|
3187
|
-
o[k2] = m[k];
|
|
3188
|
-
}));
|
|
3189
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
3190
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
3191
|
-
};__exportStar(go$1, exports);
|
|
3192
|
-
|
|
3193
|
-
} (es2018$6));
|
|
3282
|
+
var chunk = {};
|
|
3194
3283
|
|
|
3195
|
-
var
|
|
3284
|
+
var hasRequiredChunk;
|
|
3196
3285
|
|
|
3197
|
-
function
|
|
3198
|
-
if (
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
const go_1 = es2018$
|
|
3286
|
+
function requireChunk () {
|
|
3287
|
+
if (hasRequiredChunk) return chunk;
|
|
3288
|
+
hasRequiredChunk = 1;
|
|
3289
|
+
chunk.chunk = void 0;
|
|
3290
|
+
const go_1 = es2018$7;
|
|
3202
3291
|
const errors_1 = requireEs2018();
|
|
3203
|
-
function
|
|
3292
|
+
function chunk$1(iterable, size) {
|
|
3204
3293
|
(0, errors_1.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
3205
3294
|
(0, errors_1.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
3206
|
-
return (0, go_1.go)(
|
|
3295
|
+
return (0, go_1.go)(function* () {
|
|
3207
3296
|
let buffer = [];
|
|
3208
|
-
for
|
|
3297
|
+
for (const element of iterable) {
|
|
3209
3298
|
buffer.push(element);
|
|
3210
3299
|
if (buffer.length >= size) {
|
|
3211
3300
|
yield buffer;
|
|
@@ -3216,733 +3305,854 @@ chunkAsync.chunkAsync = void 0;
|
|
|
3216
3305
|
yield buffer;
|
|
3217
3306
|
});
|
|
3218
3307
|
}
|
|
3219
|
-
|
|
3308
|
+
chunk.chunk = chunk$1;
|
|
3220
3309
|
|
|
3221
|
-
return
|
|
3310
|
+
return chunk;
|
|
3222
3311
|
}
|
|
3223
3312
|
|
|
3224
|
-
var
|
|
3313
|
+
var concatAsync$1 = {};
|
|
3225
3314
|
|
|
3226
|
-
|
|
3315
|
+
concatAsync$1.concatAsync = void 0;
|
|
3316
|
+
const types_1$i = es2018$6;
|
|
3317
|
+
const go_1$1 = es2018$7;
|
|
3318
|
+
function concatAsync(iterable, ...otherIterables) {
|
|
3319
|
+
return (0, go_1$1.go)(async function* () {
|
|
3320
|
+
for (const iter of [iterable, ...otherIterables]) {
|
|
3321
|
+
if ((0, types_1$i.isAsyncIterable)(iter)) {
|
|
3322
|
+
for await (const element of iter) {
|
|
3323
|
+
yield element;
|
|
3324
|
+
}
|
|
3325
|
+
}
|
|
3326
|
+
else {
|
|
3327
|
+
for (const element of iter) {
|
|
3328
|
+
yield element;
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
});
|
|
3333
|
+
}
|
|
3334
|
+
concatAsync$1.concatAsync = concatAsync;
|
|
3227
3335
|
|
|
3228
|
-
var
|
|
3336
|
+
var concat$5 = {};
|
|
3229
3337
|
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
}
|
|
3238
|
-
array$1.isntArray = isntArray$1;
|
|
3239
|
-
function isEmptyArray$1(val) {
|
|
3240
|
-
return val.length === 0;
|
|
3241
|
-
}
|
|
3242
|
-
array$1.isEmptyArray = isEmptyArray$1;
|
|
3243
|
-
function isntEmptyArray$1(val) {
|
|
3244
|
-
return val.length !== 0;
|
|
3338
|
+
concat$5.concat = void 0;
|
|
3339
|
+
const go_1 = es2018$7;
|
|
3340
|
+
function concat$4(iterable, ...otherIterables) {
|
|
3341
|
+
return (0, go_1.go)(function* () {
|
|
3342
|
+
for (const iter of [iterable, ...otherIterables]) {
|
|
3343
|
+
yield* iter;
|
|
3344
|
+
}
|
|
3345
|
+
});
|
|
3245
3346
|
}
|
|
3246
|
-
|
|
3347
|
+
concat$5.concat = concat$4;
|
|
3247
3348
|
|
|
3248
|
-
var
|
|
3349
|
+
var dropAsync = {};
|
|
3249
3350
|
|
|
3250
|
-
var
|
|
3351
|
+
var utils = {};
|
|
3251
3352
|
|
|
3252
|
-
|
|
3253
|
-
function
|
|
3254
|
-
|
|
3353
|
+
utils.copyIterable = utils.copyAsyncIterable = void 0;
|
|
3354
|
+
async function* copyAsyncIterable(iterable) {
|
|
3355
|
+
for await (const element of iterable) {
|
|
3356
|
+
yield element;
|
|
3357
|
+
}
|
|
3255
3358
|
}
|
|
3256
|
-
|
|
3257
|
-
function
|
|
3258
|
-
|
|
3359
|
+
utils.copyAsyncIterable = copyAsyncIterable;
|
|
3360
|
+
function* copyIterable(iterable) {
|
|
3361
|
+
for (const element of iterable) {
|
|
3362
|
+
yield element;
|
|
3363
|
+
}
|
|
3259
3364
|
}
|
|
3260
|
-
|
|
3365
|
+
utils.copyIterable = copyIterable;
|
|
3261
3366
|
|
|
3262
|
-
var
|
|
3367
|
+
var hasRequiredDropAsync;
|
|
3263
3368
|
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3369
|
+
function requireDropAsync () {
|
|
3370
|
+
if (hasRequiredDropAsync) return dropAsync;
|
|
3371
|
+
hasRequiredDropAsync = 1;
|
|
3372
|
+
dropAsync.dropAsync = void 0;
|
|
3373
|
+
const go_1 = es2018$7;
|
|
3374
|
+
const utils_1 = utils;
|
|
3375
|
+
const errors_1 = requireEs2018();
|
|
3376
|
+
function dropAsync$1(iterable, count) {
|
|
3377
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3378
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3379
|
+
if (count === 0)
|
|
3380
|
+
return (0, utils_1.copyAsyncIterable)(iterable);
|
|
3381
|
+
return (0, go_1.go)(async function* () {
|
|
3382
|
+
var _a;
|
|
3383
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
3384
|
+
let done;
|
|
3385
|
+
try {
|
|
3386
|
+
let value;
|
|
3387
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
3388
|
+
if (count <= 0)
|
|
3389
|
+
break;
|
|
3390
|
+
count--;
|
|
3391
|
+
}
|
|
3392
|
+
while (!done) {
|
|
3393
|
+
yield value;
|
|
3394
|
+
({ value, done } = await iterator.next());
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3397
|
+
finally {
|
|
3398
|
+
if (!done)
|
|
3399
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
3400
|
+
}
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3403
|
+
dropAsync.dropAsync = dropAsync$1;
|
|
3404
|
+
|
|
3405
|
+
return dropAsync;
|
|
3271
3406
|
}
|
|
3272
|
-
_undefined$1.isntUndefined = isntUndefined$1;
|
|
3273
3407
|
|
|
3274
|
-
var
|
|
3408
|
+
var dropRightAsync = {};
|
|
3275
3409
|
|
|
3276
|
-
|
|
3277
|
-
function isFunction$3(val) {
|
|
3278
|
-
return typeof val === 'function';
|
|
3279
|
-
}
|
|
3280
|
-
_function$1.isFunction = isFunction$3;
|
|
3281
|
-
function isntFunction$1(val) {
|
|
3282
|
-
return !isFunction$3(val);
|
|
3283
|
-
}
|
|
3284
|
-
_function$1.isntFunction = isntFunction$1;
|
|
3410
|
+
var hasRequiredDropRightAsync;
|
|
3285
3411
|
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3412
|
+
function requireDropRightAsync () {
|
|
3413
|
+
if (hasRequiredDropRightAsync) return dropRightAsync;
|
|
3414
|
+
hasRequiredDropRightAsync = 1;
|
|
3415
|
+
dropRightAsync.dropRightAsync = void 0;
|
|
3416
|
+
const go_1 = es2018$7;
|
|
3417
|
+
const utils_1 = utils;
|
|
3418
|
+
const errors_1 = requireEs2018();
|
|
3419
|
+
function dropRightAsync$1(iterable, count) {
|
|
3420
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3421
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3422
|
+
if (count === 0)
|
|
3423
|
+
return (0, utils_1.copyAsyncIterable)(iterable);
|
|
3424
|
+
return (0, go_1.go)(async function* () {
|
|
3425
|
+
const arr = await toArrayAsync(iterable);
|
|
3426
|
+
const result = arr.slice(0, -count);
|
|
3427
|
+
for (const value of result) {
|
|
3428
|
+
yield value;
|
|
3429
|
+
}
|
|
3430
|
+
});
|
|
3431
|
+
}
|
|
3432
|
+
dropRightAsync.dropRightAsync = dropRightAsync$1;
|
|
3433
|
+
async function toArrayAsync(iterable) {
|
|
3434
|
+
const result = [];
|
|
3435
|
+
for await (const element of iterable) {
|
|
3436
|
+
result.push(element);
|
|
3437
|
+
}
|
|
3438
|
+
return result;
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
return dropRightAsync;
|
|
3298
3442
|
}
|
|
3299
|
-
asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
|
|
3300
3443
|
|
|
3301
|
-
var
|
|
3302
|
-
|
|
3303
|
-
bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
|
|
3304
|
-
function isBigInt$1(val) {
|
|
3305
|
-
return typeof val === 'bigint';
|
|
3306
|
-
}
|
|
3307
|
-
bigint$1.isBigInt = isBigInt$1;
|
|
3308
|
-
function isntBigInt$1(val) {
|
|
3309
|
-
return !isBigInt$1(val);
|
|
3310
|
-
}
|
|
3311
|
-
bigint$1.isntBigInt = isntBigInt$1;
|
|
3444
|
+
var dropRight = {};
|
|
3312
3445
|
|
|
3313
|
-
var
|
|
3446
|
+
var hasRequiredDropRight;
|
|
3314
3447
|
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3448
|
+
function requireDropRight () {
|
|
3449
|
+
if (hasRequiredDropRight) return dropRight;
|
|
3450
|
+
hasRequiredDropRight = 1;
|
|
3451
|
+
dropRight.dropRight = void 0;
|
|
3452
|
+
const go_1 = es2018$7;
|
|
3453
|
+
const utils_1 = utils;
|
|
3454
|
+
const errors_1 = requireEs2018();
|
|
3455
|
+
function dropRight$1(iterable, count) {
|
|
3456
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3457
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3458
|
+
if (count === 0)
|
|
3459
|
+
return (0, utils_1.copyIterable)(iterable);
|
|
3460
|
+
return (0, go_1.go)(function* () {
|
|
3461
|
+
const arr = Array.from(iterable);
|
|
3462
|
+
yield* arr.slice(0, -count);
|
|
3463
|
+
});
|
|
3464
|
+
}
|
|
3465
|
+
dropRight.dropRight = dropRight$1;
|
|
3466
|
+
|
|
3467
|
+
return dropRight;
|
|
3322
3468
|
}
|
|
3323
|
-
boolean$1.isntBoolean = isntBoolean$1;
|
|
3324
|
-
|
|
3325
|
-
var char$1 = {};
|
|
3326
|
-
|
|
3327
|
-
var string$1 = {};
|
|
3328
3469
|
|
|
3329
|
-
|
|
3330
|
-
function isString$1(val) {
|
|
3331
|
-
return typeof val === 'string';
|
|
3332
|
-
}
|
|
3333
|
-
string$1.isString = isString$1;
|
|
3334
|
-
function isntString$1(val) {
|
|
3335
|
-
return !isString$1(val);
|
|
3336
|
-
}
|
|
3337
|
-
string$1.isntString = isntString$1;
|
|
3470
|
+
var dropUntilAsync$1 = {};
|
|
3338
3471
|
|
|
3339
|
-
|
|
3340
|
-
const
|
|
3341
|
-
function
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3472
|
+
dropUntilAsync$1.dropUntilAsync = void 0;
|
|
3473
|
+
const types_1$h = es2018$6;
|
|
3474
|
+
function dropUntilAsync(iterable, predicate) {
|
|
3475
|
+
if ((0, types_1$h.isAsyncIterable)(iterable)) {
|
|
3476
|
+
return dropUntilAsyncIterable(iterable);
|
|
3477
|
+
}
|
|
3478
|
+
else {
|
|
3479
|
+
return dropUntilIterable(iterable);
|
|
3480
|
+
}
|
|
3481
|
+
async function* dropUntilAsyncIterable(iterable) {
|
|
3482
|
+
var _a;
|
|
3483
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
3484
|
+
let done;
|
|
3485
|
+
try {
|
|
3486
|
+
let index = 0;
|
|
3487
|
+
let value;
|
|
3488
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
3489
|
+
if (await predicate(value, index++))
|
|
3490
|
+
break;
|
|
3491
|
+
}
|
|
3492
|
+
while (!done) {
|
|
3493
|
+
yield value;
|
|
3494
|
+
({ value, done } = await iterator.next());
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
finally {
|
|
3498
|
+
if (!done)
|
|
3499
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
async function* dropUntilIterable(iterable) {
|
|
3503
|
+
var _a;
|
|
3504
|
+
const iterator = iterable[Symbol.iterator]();
|
|
3505
|
+
let done;
|
|
3506
|
+
try {
|
|
3507
|
+
let index = 0;
|
|
3508
|
+
let value;
|
|
3509
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
3510
|
+
if (await predicate(value, index++))
|
|
3511
|
+
break;
|
|
3512
|
+
}
|
|
3513
|
+
while (!done) {
|
|
3514
|
+
yield value;
|
|
3515
|
+
({ value, done } = iterator.next());
|
|
3516
|
+
}
|
|
3517
|
+
}
|
|
3518
|
+
finally {
|
|
3519
|
+
if (!done)
|
|
3520
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
3521
|
+
}
|
|
3522
|
+
}
|
|
3348
3523
|
}
|
|
3349
|
-
|
|
3524
|
+
dropUntilAsync$1.dropUntilAsync = dropUntilAsync;
|
|
3350
3525
|
|
|
3351
|
-
var
|
|
3526
|
+
var dropUntil$1 = {};
|
|
3352
3527
|
|
|
3353
|
-
|
|
3354
|
-
function
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3528
|
+
dropUntil$1.dropUntil = void 0;
|
|
3529
|
+
function* dropUntil(iterable, predicate) {
|
|
3530
|
+
var _a;
|
|
3531
|
+
const iterator = iterable[Symbol.iterator]();
|
|
3532
|
+
let done;
|
|
3533
|
+
try {
|
|
3534
|
+
let index = 0;
|
|
3535
|
+
let value;
|
|
3536
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
3537
|
+
if (predicate(value, index++))
|
|
3538
|
+
break;
|
|
3539
|
+
}
|
|
3540
|
+
while (!done) {
|
|
3541
|
+
yield value;
|
|
3542
|
+
({ value, done } = iterator.next());
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3545
|
+
finally {
|
|
3546
|
+
if (!done)
|
|
3547
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
3548
|
+
}
|
|
3360
3549
|
}
|
|
3361
|
-
|
|
3550
|
+
dropUntil$1.dropUntil = dropUntil;
|
|
3362
3551
|
|
|
3363
|
-
var
|
|
3552
|
+
var drop = {};
|
|
3364
3553
|
|
|
3365
|
-
|
|
3366
|
-
function inEnum$1(val, _enum) {
|
|
3367
|
-
return Object.values(_enum).includes(val);
|
|
3368
|
-
}
|
|
3369
|
-
_enum$1.inEnum = inEnum$1;
|
|
3554
|
+
var hasRequiredDrop;
|
|
3370
3555
|
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
function
|
|
3379
|
-
|
|
3556
|
+
function requireDrop () {
|
|
3557
|
+
if (hasRequiredDrop) return drop;
|
|
3558
|
+
hasRequiredDrop = 1;
|
|
3559
|
+
drop.drop = void 0;
|
|
3560
|
+
const go_1 = es2018$7;
|
|
3561
|
+
const utils_1 = utils;
|
|
3562
|
+
const errors_1 = requireEs2018();
|
|
3563
|
+
function drop$1(iterable, count) {
|
|
3564
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3565
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3566
|
+
if (count === 0)
|
|
3567
|
+
return (0, utils_1.copyIterable)(iterable);
|
|
3568
|
+
return (0, go_1.go)(function* () {
|
|
3569
|
+
var _a;
|
|
3570
|
+
const iterator = iterable[Symbol.iterator]();
|
|
3571
|
+
let done;
|
|
3572
|
+
try {
|
|
3573
|
+
let value;
|
|
3574
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
3575
|
+
if (count <= 0)
|
|
3576
|
+
break;
|
|
3577
|
+
count--;
|
|
3578
|
+
}
|
|
3579
|
+
while (!done) {
|
|
3580
|
+
yield value;
|
|
3581
|
+
({ value, done } = iterator.next());
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
finally {
|
|
3585
|
+
if (!done)
|
|
3586
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
3587
|
+
}
|
|
3588
|
+
});
|
|
3589
|
+
}
|
|
3590
|
+
drop.drop = drop$1;
|
|
3591
|
+
|
|
3592
|
+
return drop;
|
|
3380
3593
|
}
|
|
3381
|
-
error$1.isntError = isntError$1;
|
|
3382
3594
|
|
|
3383
|
-
var
|
|
3595
|
+
var filterAsync$1 = {};
|
|
3384
3596
|
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3597
|
+
filterAsync$1.filterAsync = void 0;
|
|
3598
|
+
const types_1$g = es2018$6;
|
|
3599
|
+
function filterAsync(iterable, predicate) {
|
|
3600
|
+
if ((0, types_1$g.isAsyncIterable)(iterable)) {
|
|
3601
|
+
return filterAsyncIterable(iterable);
|
|
3602
|
+
}
|
|
3603
|
+
else {
|
|
3604
|
+
return filterIterable(iterable);
|
|
3605
|
+
}
|
|
3606
|
+
async function* filterAsyncIterable(iterable) {
|
|
3607
|
+
let index = 0;
|
|
3608
|
+
for await (const element of iterable) {
|
|
3609
|
+
if (await predicate(element, index))
|
|
3610
|
+
yield element;
|
|
3611
|
+
index++;
|
|
3612
|
+
}
|
|
3613
|
+
}
|
|
3614
|
+
async function* filterIterable(iterable) {
|
|
3615
|
+
let index = 0;
|
|
3616
|
+
for (const element of iterable) {
|
|
3617
|
+
if (await predicate(element, index))
|
|
3618
|
+
yield element;
|
|
3619
|
+
index++;
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3392
3622
|
}
|
|
3393
|
-
|
|
3623
|
+
filterAsync$1.filterAsync = filterAsync;
|
|
3394
3624
|
|
|
3395
|
-
var
|
|
3625
|
+
var filter$3 = {};
|
|
3396
3626
|
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
const
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
}
|
|
3406
|
-
iterable$1.isIterable = isIterable$3;
|
|
3407
|
-
function isntIterable$1(val) {
|
|
3408
|
-
return !isIterable$3(val);
|
|
3627
|
+
filter$3.filter = void 0;
|
|
3628
|
+
function* filter$2(iterable, predicate) {
|
|
3629
|
+
let index = 0;
|
|
3630
|
+
for (const element of iterable) {
|
|
3631
|
+
if (predicate(element, index))
|
|
3632
|
+
yield element;
|
|
3633
|
+
index++;
|
|
3634
|
+
}
|
|
3409
3635
|
}
|
|
3410
|
-
|
|
3636
|
+
filter$3.filter = filter$2;
|
|
3411
3637
|
|
|
3412
|
-
var
|
|
3638
|
+
var flattenAsync = {};
|
|
3413
3639
|
|
|
3414
|
-
var
|
|
3640
|
+
var flattenDeepAsync = {};
|
|
3415
3641
|
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
}
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
}
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3642
|
+
var flattenByAsync$1 = {};
|
|
3643
|
+
|
|
3644
|
+
flattenByAsync$1.flattenByAsync = void 0;
|
|
3645
|
+
const types_1$f = es2018$6;
|
|
3646
|
+
function flattenByAsync(iterable, predicate) {
|
|
3647
|
+
if ((0, types_1$f.isAsyncIterable)(iterable)) {
|
|
3648
|
+
return flattenByAsyncIterable(iterable);
|
|
3649
|
+
}
|
|
3650
|
+
else {
|
|
3651
|
+
return flattenByIterable(iterable);
|
|
3652
|
+
}
|
|
3653
|
+
async function* flattenByAsyncIterable(iterable) {
|
|
3654
|
+
const level = 1;
|
|
3655
|
+
for await (const element of iterable) {
|
|
3656
|
+
if (isFiniteIterable$1(element) && await predicate(element, level)) {
|
|
3657
|
+
yield* flatten(element, level + 1);
|
|
3658
|
+
}
|
|
3659
|
+
else {
|
|
3660
|
+
yield element;
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
function flattenByIterable(iterable) {
|
|
3665
|
+
return flatten(iterable, 1);
|
|
3666
|
+
}
|
|
3667
|
+
async function* flatten(iterable, level) {
|
|
3668
|
+
for (const element of iterable) {
|
|
3669
|
+
if (isFiniteIterable$1(element) && await predicate(element, level)) {
|
|
3670
|
+
yield* flatten(element, level + 1);
|
|
3671
|
+
}
|
|
3672
|
+
else {
|
|
3673
|
+
yield element;
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3676
|
+
}
|
|
3439
3677
|
}
|
|
3440
|
-
|
|
3441
|
-
function
|
|
3442
|
-
return
|
|
3678
|
+
flattenByAsync$1.flattenByAsync = flattenByAsync;
|
|
3679
|
+
function isFiniteIterable$1(val) {
|
|
3680
|
+
return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
|
|
3443
3681
|
}
|
|
3444
|
-
number$1.isntNaN = isntNaN$1;
|
|
3445
3682
|
|
|
3446
|
-
var
|
|
3683
|
+
var hasRequiredFlattenDeepAsync;
|
|
3447
3684
|
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
return (0, isPlainObject_1$1.default)(val);
|
|
3685
|
+
function requireFlattenDeepAsync () {
|
|
3686
|
+
if (hasRequiredFlattenDeepAsync) return flattenDeepAsync;
|
|
3687
|
+
hasRequiredFlattenDeepAsync = 1;
|
|
3688
|
+
flattenDeepAsync.flattenDeepAsync = void 0;
|
|
3689
|
+
const flatten_by_async_1 = flattenByAsync$1;
|
|
3690
|
+
const errors_1 = requireEs2018();
|
|
3691
|
+
function flattenDeepAsync$1(iterable, depth = Infinity) {
|
|
3692
|
+
(0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
3693
|
+
(0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
3694
|
+
return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
|
|
3695
|
+
}
|
|
3696
|
+
flattenDeepAsync.flattenDeepAsync = flattenDeepAsync$1;
|
|
3697
|
+
|
|
3698
|
+
return flattenDeepAsync;
|
|
3463
3699
|
}
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3700
|
+
|
|
3701
|
+
var hasRequiredFlattenAsync;
|
|
3702
|
+
|
|
3703
|
+
function requireFlattenAsync () {
|
|
3704
|
+
if (hasRequiredFlattenAsync) return flattenAsync;
|
|
3705
|
+
hasRequiredFlattenAsync = 1;
|
|
3706
|
+
flattenAsync.flattenAsync = void 0;
|
|
3707
|
+
const flatten_deep_async_1 = requireFlattenDeepAsync();
|
|
3708
|
+
function flattenAsync$1(iterable) {
|
|
3709
|
+
return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
|
|
3710
|
+
}
|
|
3711
|
+
flattenAsync.flattenAsync = flattenAsync$1;
|
|
3712
|
+
|
|
3713
|
+
return flattenAsync;
|
|
3467
3714
|
}
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3715
|
+
|
|
3716
|
+
var flattenBy$1 = {};
|
|
3717
|
+
|
|
3718
|
+
flattenBy$1.flattenBy = void 0;
|
|
3719
|
+
const types_1$e = es2018$6;
|
|
3720
|
+
function flattenBy(iterable, predicate) {
|
|
3721
|
+
return flatten(iterable, 1);
|
|
3722
|
+
function* flatten(iterable, level) {
|
|
3723
|
+
for (const element of iterable) {
|
|
3724
|
+
if (isFiniteIterable(element) && predicate(element, level)) {
|
|
3725
|
+
yield* flatten(element, level + 1);
|
|
3726
|
+
}
|
|
3727
|
+
else {
|
|
3728
|
+
yield element;
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
}
|
|
3471
3732
|
}
|
|
3472
|
-
|
|
3473
|
-
function
|
|
3474
|
-
return
|
|
3733
|
+
flattenBy$1.flattenBy = flattenBy;
|
|
3734
|
+
function isFiniteIterable(val) {
|
|
3735
|
+
return (0, types_1$e.isIterable)(val) && (0, types_1$e.isntChar)(val);
|
|
3475
3736
|
}
|
|
3476
|
-
object$1.isntEmptyObject = isntEmptyObject$1;
|
|
3477
3737
|
|
|
3478
|
-
|
|
3479
|
-
const null_1$3 = _null$1;
|
|
3480
|
-
const boolean_1$1 = boolean$1;
|
|
3481
|
-
const string_1$2 = string$1;
|
|
3482
|
-
const number_1$1 = number$1;
|
|
3483
|
-
const array_1$1 = array$1;
|
|
3484
|
-
const object_1$3 = object$1;
|
|
3485
|
-
function isJson$1(val) {
|
|
3486
|
-
return (0, null_1$3.isNull)(val)
|
|
3487
|
-
|| (0, boolean_1$1.isBoolean)(val)
|
|
3488
|
-
|| (0, string_1$2.isString)(val)
|
|
3489
|
-
|| (0, number_1$1.isNumber)(val)
|
|
3490
|
-
|| ((0, array_1$1.isArray)(val) && val.every(isJson$1))
|
|
3491
|
-
|| ((0, object_1$3.isPlainObject)(val) && Object.values(val).every(isJson$1));
|
|
3492
|
-
}
|
|
3493
|
-
json$1.isJson = isJson$1;
|
|
3494
|
-
function isntJson$1(val) {
|
|
3495
|
-
return !isJson$1(val);
|
|
3496
|
-
}
|
|
3497
|
-
json$1.isntJson = isntJson$1;
|
|
3498
|
-
function isJsonable$1(val) {
|
|
3499
|
-
try {
|
|
3500
|
-
JSON.stringify(val);
|
|
3501
|
-
return true;
|
|
3502
|
-
}
|
|
3503
|
-
catch (_a) {
|
|
3504
|
-
return false;
|
|
3505
|
-
}
|
|
3506
|
-
}
|
|
3507
|
-
json$1.isJsonable = isJsonable$1;
|
|
3508
|
-
function isntJsonable$1(val) {
|
|
3509
|
-
return !isntJsonable$1();
|
|
3510
|
-
}
|
|
3511
|
-
json$1.isntJsonable = isntJsonable$1;
|
|
3738
|
+
var flattenDeep = {};
|
|
3512
3739
|
|
|
3513
|
-
var
|
|
3740
|
+
var hasRequiredFlattenDeep;
|
|
3514
3741
|
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
promise$1.isntPromiseLike = isntPromiseLike$1;
|
|
3530
|
-
function isPromiseLike$1(val) {
|
|
3531
|
-
return (0, object_1$2.isObject)(val)
|
|
3532
|
-
&& (0, function_1$3.isFunction)(val.then);
|
|
3742
|
+
function requireFlattenDeep () {
|
|
3743
|
+
if (hasRequiredFlattenDeep) return flattenDeep;
|
|
3744
|
+
hasRequiredFlattenDeep = 1;
|
|
3745
|
+
flattenDeep.flattenDeep = void 0;
|
|
3746
|
+
const flatten_by_1 = flattenBy$1;
|
|
3747
|
+
const errors_1 = requireEs2018();
|
|
3748
|
+
function flattenDeep$1(iterable, depth = Infinity) {
|
|
3749
|
+
(0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
3750
|
+
(0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
3751
|
+
return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
|
|
3752
|
+
}
|
|
3753
|
+
flattenDeep.flattenDeep = flattenDeep$1;
|
|
3754
|
+
|
|
3755
|
+
return flattenDeep;
|
|
3533
3756
|
}
|
|
3534
|
-
promise$1.isPromiseLike = isPromiseLike$1;
|
|
3535
3757
|
|
|
3536
|
-
var
|
|
3758
|
+
var flatten = {};
|
|
3537
3759
|
|
|
3538
|
-
|
|
3539
|
-
function isAbsoluteURL$1(str) {
|
|
3540
|
-
try {
|
|
3541
|
-
new URL(str);
|
|
3542
|
-
return true;
|
|
3543
|
-
}
|
|
3544
|
-
catch (_a) {
|
|
3545
|
-
return false;
|
|
3546
|
-
}
|
|
3547
|
-
}
|
|
3548
|
-
url$1.isAbsoluteURL = isAbsoluteURL$1;
|
|
3760
|
+
var hasRequiredFlatten;
|
|
3549
3761
|
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
if (k2 === undefined) k2 = k;
|
|
3560
|
-
o[k2] = m[k];
|
|
3561
|
-
}));
|
|
3562
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
3563
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
3564
|
-
};__exportStar(array$1, exports);
|
|
3565
|
-
__exportStar(asyncIterable$1, exports);
|
|
3566
|
-
__exportStar(bigint$1, exports);
|
|
3567
|
-
__exportStar(boolean$1, exports);
|
|
3568
|
-
__exportStar(char$1, exports);
|
|
3569
|
-
__exportStar(date$1, exports);
|
|
3570
|
-
__exportStar(_enum$1, exports);
|
|
3571
|
-
__exportStar(error$1, exports);
|
|
3572
|
-
__exportStar(falsy$1, exports);
|
|
3573
|
-
__exportStar(_function$1, exports);
|
|
3574
|
-
__exportStar(iterable$1, exports);
|
|
3575
|
-
__exportStar(json$1, exports);
|
|
3576
|
-
__exportStar(_null$1, exports);
|
|
3577
|
-
__exportStar(number$1, exports);
|
|
3578
|
-
__exportStar(object$1, exports);
|
|
3579
|
-
__exportStar(promise$1, exports);
|
|
3580
|
-
__exportStar(string$1, exports);
|
|
3581
|
-
__exportStar(_undefined$1, exports);
|
|
3582
|
-
__exportStar(url$1, exports);
|
|
3762
|
+
function requireFlatten () {
|
|
3763
|
+
if (hasRequiredFlatten) return flatten;
|
|
3764
|
+
hasRequiredFlatten = 1;
|
|
3765
|
+
flatten.flatten = void 0;
|
|
3766
|
+
const flatten_deep_1 = requireFlattenDeep();
|
|
3767
|
+
function flatten$1(iterable) {
|
|
3768
|
+
return (0, flatten_deep_1.flattenDeep)(iterable, 1);
|
|
3769
|
+
}
|
|
3770
|
+
flatten.flatten = flatten$1;
|
|
3583
3771
|
|
|
3584
|
-
|
|
3772
|
+
return flatten;
|
|
3773
|
+
}
|
|
3585
3774
|
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3775
|
+
var mapAsync$1 = {};
|
|
3776
|
+
|
|
3777
|
+
mapAsync$1.mapAsync = void 0;
|
|
3778
|
+
const types_1$d = es2018$6;
|
|
3779
|
+
function mapAsync(iterable, fn) {
|
|
3780
|
+
if ((0, types_1$d.isAsyncIterable)(iterable)) {
|
|
3781
|
+
return mapAsyncIterable(iterable);
|
|
3591
3782
|
}
|
|
3592
3783
|
else {
|
|
3593
|
-
return
|
|
3784
|
+
return mapIterable(iterable);
|
|
3594
3785
|
}
|
|
3595
|
-
async function*
|
|
3596
|
-
let buffer = [];
|
|
3786
|
+
async function* mapAsyncIterable(iterable) {
|
|
3597
3787
|
let index = 0;
|
|
3598
3788
|
for await (const element of iterable) {
|
|
3599
|
-
|
|
3600
|
-
if (await predicate(element, index)) {
|
|
3601
|
-
yield buffer;
|
|
3602
|
-
buffer = [];
|
|
3603
|
-
}
|
|
3789
|
+
yield await fn(element, index);
|
|
3604
3790
|
index++;
|
|
3605
3791
|
}
|
|
3606
|
-
if (buffer.length)
|
|
3607
|
-
yield buffer;
|
|
3608
3792
|
}
|
|
3609
|
-
async function*
|
|
3610
|
-
let buffer = [];
|
|
3793
|
+
async function* mapIterable(iterable) {
|
|
3611
3794
|
let index = 0;
|
|
3612
3795
|
for (const element of iterable) {
|
|
3613
|
-
|
|
3614
|
-
if (await predicate(element, index)) {
|
|
3615
|
-
yield buffer;
|
|
3616
|
-
buffer = [];
|
|
3617
|
-
}
|
|
3796
|
+
yield await fn(element, index);
|
|
3618
3797
|
index++;
|
|
3619
3798
|
}
|
|
3620
|
-
if (buffer.length)
|
|
3621
|
-
yield buffer;
|
|
3622
3799
|
}
|
|
3623
3800
|
}
|
|
3624
|
-
|
|
3801
|
+
mapAsync$1.mapAsync = mapAsync;
|
|
3625
3802
|
|
|
3626
|
-
var
|
|
3803
|
+
var map$3 = {};
|
|
3627
3804
|
|
|
3628
|
-
|
|
3629
|
-
function*
|
|
3630
|
-
let buffer = [];
|
|
3805
|
+
map$3.map = void 0;
|
|
3806
|
+
function* map$2(iterable, fn) {
|
|
3631
3807
|
let index = 0;
|
|
3632
3808
|
for (const element of iterable) {
|
|
3633
|
-
|
|
3634
|
-
if (predicate(element, index)) {
|
|
3635
|
-
yield buffer;
|
|
3636
|
-
buffer = [];
|
|
3637
|
-
}
|
|
3809
|
+
yield fn(element, index);
|
|
3638
3810
|
index++;
|
|
3639
3811
|
}
|
|
3640
|
-
if (buffer.length)
|
|
3641
|
-
yield buffer;
|
|
3642
3812
|
}
|
|
3643
|
-
|
|
3813
|
+
map$3.map = map$2;
|
|
3644
3814
|
|
|
3645
|
-
var
|
|
3815
|
+
var repeatAsync = {};
|
|
3646
3816
|
|
|
3647
|
-
var
|
|
3817
|
+
var hasRequiredRepeatAsync;
|
|
3648
3818
|
|
|
3649
|
-
function
|
|
3650
|
-
if (
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
const go_1 = es2018$
|
|
3819
|
+
function requireRepeatAsync () {
|
|
3820
|
+
if (hasRequiredRepeatAsync) return repeatAsync;
|
|
3821
|
+
hasRequiredRepeatAsync = 1;
|
|
3822
|
+
repeatAsync.repeatAsync = void 0;
|
|
3823
|
+
const go_1 = es2018$7;
|
|
3654
3824
|
const errors_1 = requireEs2018();
|
|
3655
|
-
function
|
|
3656
|
-
(0, errors_1.assert)(Number.isInteger(
|
|
3657
|
-
(0, errors_1.assert)(
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3825
|
+
function repeatAsync$1(iterable, times) {
|
|
3826
|
+
(0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
3827
|
+
(0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
3828
|
+
if (times === Infinity)
|
|
3829
|
+
warnInfiniteLoop();
|
|
3830
|
+
return (0, go_1.go)(async function* () {
|
|
3831
|
+
const cache = [];
|
|
3832
|
+
if (times > 0) {
|
|
3833
|
+
for await (const element of iterable) {
|
|
3834
|
+
yield element;
|
|
3835
|
+
cache.push(element);
|
|
3665
3836
|
}
|
|
3837
|
+
times--;
|
|
3838
|
+
}
|
|
3839
|
+
while (times > 0) {
|
|
3840
|
+
yield* cache;
|
|
3841
|
+
times--;
|
|
3666
3842
|
}
|
|
3667
|
-
if (buffer.length)
|
|
3668
|
-
yield buffer;
|
|
3669
3843
|
});
|
|
3670
3844
|
}
|
|
3671
|
-
|
|
3845
|
+
repeatAsync.repeatAsync = repeatAsync$1;
|
|
3846
|
+
function warnInfiniteLoop() {
|
|
3847
|
+
if (isProduction())
|
|
3848
|
+
return;
|
|
3849
|
+
console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
|
|
3850
|
+
}
|
|
3851
|
+
function isProduction() {
|
|
3852
|
+
return process.env.NODE_ENV === 'production';
|
|
3853
|
+
}
|
|
3672
3854
|
|
|
3673
|
-
return
|
|
3855
|
+
return repeatAsync;
|
|
3674
3856
|
}
|
|
3675
3857
|
|
|
3676
|
-
var
|
|
3677
|
-
|
|
3678
|
-
concatAsync$1.concatAsync = void 0;
|
|
3679
|
-
const types_1$i = es2018$5;
|
|
3680
|
-
const go_1$1 = es2018$6;
|
|
3681
|
-
function concatAsync(iterable, ...otherIterables) {
|
|
3682
|
-
return (0, go_1$1.go)(async function* () {
|
|
3683
|
-
for (const iter of [iterable, ...otherIterables]) {
|
|
3684
|
-
if ((0, types_1$i.isAsyncIterable)(iter)) {
|
|
3685
|
-
for await (const element of iter) {
|
|
3686
|
-
yield element;
|
|
3687
|
-
}
|
|
3688
|
-
}
|
|
3689
|
-
else {
|
|
3690
|
-
for (const element of iter) {
|
|
3691
|
-
yield element;
|
|
3692
|
-
}
|
|
3693
|
-
}
|
|
3694
|
-
}
|
|
3695
|
-
});
|
|
3696
|
-
}
|
|
3697
|
-
concatAsync$1.concatAsync = concatAsync;
|
|
3858
|
+
var repeat$2 = {};
|
|
3698
3859
|
|
|
3699
|
-
var
|
|
3860
|
+
var hasRequiredRepeat;
|
|
3700
3861
|
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
yield* iter;
|
|
3707
|
-
}
|
|
3708
|
-
});
|
|
3709
|
-
}
|
|
3710
|
-
concat$5.concat = concat$4;
|
|
3711
|
-
|
|
3712
|
-
var dropAsync = {};
|
|
3713
|
-
|
|
3714
|
-
var utils = {};
|
|
3715
|
-
|
|
3716
|
-
utils.copyIterable = utils.copyAsyncIterable = void 0;
|
|
3717
|
-
async function* copyAsyncIterable(iterable) {
|
|
3718
|
-
for await (const element of iterable) {
|
|
3719
|
-
yield element;
|
|
3720
|
-
}
|
|
3721
|
-
}
|
|
3722
|
-
utils.copyAsyncIterable = copyAsyncIterable;
|
|
3723
|
-
function* copyIterable(iterable) {
|
|
3724
|
-
for (const element of iterable) {
|
|
3725
|
-
yield element;
|
|
3726
|
-
}
|
|
3727
|
-
}
|
|
3728
|
-
utils.copyIterable = copyIterable;
|
|
3729
|
-
|
|
3730
|
-
var hasRequiredDropAsync;
|
|
3731
|
-
|
|
3732
|
-
function requireDropAsync () {
|
|
3733
|
-
if (hasRequiredDropAsync) return dropAsync;
|
|
3734
|
-
hasRequiredDropAsync = 1;
|
|
3735
|
-
dropAsync.dropAsync = void 0;
|
|
3736
|
-
const go_1 = es2018$6;
|
|
3737
|
-
const utils_1 = utils;
|
|
3862
|
+
function requireRepeat () {
|
|
3863
|
+
if (hasRequiredRepeat) return repeat$2;
|
|
3864
|
+
hasRequiredRepeat = 1;
|
|
3865
|
+
repeat$2.repeat = void 0;
|
|
3866
|
+
const go_1 = es2018$7;
|
|
3738
3867
|
const errors_1 = requireEs2018();
|
|
3739
|
-
function
|
|
3740
|
-
(0, errors_1.assert)(Number.isInteger(
|
|
3741
|
-
(0, errors_1.assert)(
|
|
3742
|
-
if (
|
|
3743
|
-
|
|
3744
|
-
return (0, go_1.go)(
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
while ({ value, done } = await iterator.next(), !done) {
|
|
3751
|
-
if (count <= 0)
|
|
3752
|
-
break;
|
|
3753
|
-
count--;
|
|
3754
|
-
}
|
|
3755
|
-
while (!done) {
|
|
3756
|
-
yield value;
|
|
3757
|
-
({ value, done } = await iterator.next());
|
|
3868
|
+
function repeat(iterable, times) {
|
|
3869
|
+
(0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
3870
|
+
(0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
3871
|
+
if (times === Infinity)
|
|
3872
|
+
warnInfiniteLoop();
|
|
3873
|
+
return (0, go_1.go)(function* () {
|
|
3874
|
+
const cache = [];
|
|
3875
|
+
if (times > 0) {
|
|
3876
|
+
for (const element of iterable) {
|
|
3877
|
+
yield element;
|
|
3878
|
+
cache.push(element);
|
|
3758
3879
|
}
|
|
3880
|
+
times--;
|
|
3759
3881
|
}
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3882
|
+
while (times > 0) {
|
|
3883
|
+
yield* cache;
|
|
3884
|
+
times--;
|
|
3763
3885
|
}
|
|
3764
3886
|
});
|
|
3765
3887
|
}
|
|
3766
|
-
|
|
3888
|
+
repeat$2.repeat = repeat;
|
|
3889
|
+
function warnInfiniteLoop() {
|
|
3890
|
+
if (isProduction())
|
|
3891
|
+
return;
|
|
3892
|
+
console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
|
|
3893
|
+
}
|
|
3894
|
+
function isProduction() {
|
|
3895
|
+
return process.env.NODE_ENV === 'production';
|
|
3896
|
+
}
|
|
3767
3897
|
|
|
3768
|
-
return
|
|
3898
|
+
return repeat$2;
|
|
3769
3899
|
}
|
|
3770
3900
|
|
|
3771
|
-
var
|
|
3901
|
+
var sliceAsync = {};
|
|
3772
3902
|
|
|
3773
|
-
var
|
|
3903
|
+
var hasRequiredSliceAsync;
|
|
3774
3904
|
|
|
3775
|
-
function
|
|
3776
|
-
if (
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
const go_1 = es2018$
|
|
3780
|
-
const utils_1 = utils;
|
|
3905
|
+
function requireSliceAsync () {
|
|
3906
|
+
if (hasRequiredSliceAsync) return sliceAsync;
|
|
3907
|
+
hasRequiredSliceAsync = 1;
|
|
3908
|
+
sliceAsync.sliceAsync = void 0;
|
|
3909
|
+
const go_1 = es2018$7;
|
|
3781
3910
|
const errors_1 = requireEs2018();
|
|
3782
|
-
function
|
|
3783
|
-
(0, errors_1.assert)(Number.isInteger(
|
|
3784
|
-
(0, errors_1.assert)(
|
|
3785
|
-
|
|
3786
|
-
|
|
3911
|
+
function sliceAsync$1(iterable, start, end = Infinity) {
|
|
3912
|
+
(0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
3913
|
+
(0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
3914
|
+
(0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
3915
|
+
(0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
3787
3916
|
return (0, go_1.go)(async function* () {
|
|
3788
|
-
|
|
3789
|
-
const
|
|
3790
|
-
|
|
3791
|
-
|
|
3917
|
+
let index = 0;
|
|
3918
|
+
for await (const element of iterable) {
|
|
3919
|
+
if (index >= end)
|
|
3920
|
+
break;
|
|
3921
|
+
if (index >= start)
|
|
3922
|
+
yield element;
|
|
3923
|
+
index++;
|
|
3792
3924
|
}
|
|
3793
3925
|
});
|
|
3794
3926
|
}
|
|
3795
|
-
|
|
3796
|
-
async function toArrayAsync(iterable) {
|
|
3797
|
-
const result = [];
|
|
3798
|
-
for await (const element of iterable) {
|
|
3799
|
-
result.push(element);
|
|
3800
|
-
}
|
|
3801
|
-
return result;
|
|
3802
|
-
}
|
|
3927
|
+
sliceAsync.sliceAsync = sliceAsync$1;
|
|
3803
3928
|
|
|
3804
|
-
return
|
|
3929
|
+
return sliceAsync;
|
|
3805
3930
|
}
|
|
3806
3931
|
|
|
3807
|
-
var
|
|
3932
|
+
var slice = {};
|
|
3808
3933
|
|
|
3809
|
-
var
|
|
3934
|
+
var hasRequiredSlice;
|
|
3810
3935
|
|
|
3811
|
-
function
|
|
3812
|
-
if (
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
const go_1 = es2018$
|
|
3816
|
-
const utils_1 = utils;
|
|
3936
|
+
function requireSlice () {
|
|
3937
|
+
if (hasRequiredSlice) return slice;
|
|
3938
|
+
hasRequiredSlice = 1;
|
|
3939
|
+
slice.slice = void 0;
|
|
3940
|
+
const go_1 = es2018$7;
|
|
3817
3941
|
const errors_1 = requireEs2018();
|
|
3818
|
-
function
|
|
3819
|
-
(0, errors_1.assert)(Number.isInteger(
|
|
3820
|
-
(0, errors_1.assert)(
|
|
3821
|
-
|
|
3822
|
-
|
|
3942
|
+
function slice$1(iterable, start, end = Infinity) {
|
|
3943
|
+
(0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
3944
|
+
(0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
3945
|
+
(0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
3946
|
+
(0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
3823
3947
|
return (0, go_1.go)(function* () {
|
|
3824
|
-
|
|
3825
|
-
|
|
3948
|
+
let index = 0;
|
|
3949
|
+
for (const element of iterable) {
|
|
3950
|
+
if (index >= end)
|
|
3951
|
+
break;
|
|
3952
|
+
if (index >= start)
|
|
3953
|
+
yield element;
|
|
3954
|
+
index++;
|
|
3955
|
+
}
|
|
3826
3956
|
});
|
|
3827
3957
|
}
|
|
3828
|
-
|
|
3958
|
+
slice.slice = slice$1;
|
|
3829
3959
|
|
|
3830
|
-
return
|
|
3960
|
+
return slice;
|
|
3831
3961
|
}
|
|
3832
3962
|
|
|
3833
|
-
var
|
|
3963
|
+
var splitAsync$1 = {};
|
|
3834
3964
|
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3965
|
+
splitAsync$1.splitAsync = void 0;
|
|
3966
|
+
async function* splitAsync(iterable, separator) {
|
|
3967
|
+
let buffer = [];
|
|
3968
|
+
for await (const element of iterable) {
|
|
3969
|
+
if (element === separator) {
|
|
3970
|
+
yield buffer;
|
|
3971
|
+
buffer = [];
|
|
3972
|
+
}
|
|
3973
|
+
else {
|
|
3974
|
+
buffer.push(element);
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3977
|
+
yield buffer;
|
|
3978
|
+
}
|
|
3979
|
+
splitAsync$1.splitAsync = splitAsync;
|
|
3980
|
+
|
|
3981
|
+
var splitByAsync$1 = {};
|
|
3982
|
+
|
|
3983
|
+
splitByAsync$1.splitByAsync = void 0;
|
|
3984
|
+
const types_1$c = es2018$6;
|
|
3985
|
+
function splitByAsync(iterable, predicate) {
|
|
3986
|
+
if ((0, types_1$c.isAsyncIterable)(iterable)) {
|
|
3987
|
+
return splitByAsyncIterable(iterable);
|
|
3840
3988
|
}
|
|
3841
3989
|
else {
|
|
3842
|
-
return
|
|
3990
|
+
return splitByIterable(iterable);
|
|
3843
3991
|
}
|
|
3844
|
-
async function*
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
while ({ value, done } = await iterator.next(), !done) {
|
|
3852
|
-
if (await predicate(value, index++))
|
|
3853
|
-
break;
|
|
3992
|
+
async function* splitByIterable(iterable) {
|
|
3993
|
+
let buffer = [];
|
|
3994
|
+
let index = 0;
|
|
3995
|
+
for (const element of iterable) {
|
|
3996
|
+
if (await predicate(element, index)) {
|
|
3997
|
+
yield buffer;
|
|
3998
|
+
buffer = [];
|
|
3854
3999
|
}
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
({ value, done } = await iterator.next());
|
|
4000
|
+
else {
|
|
4001
|
+
buffer.push(element);
|
|
3858
4002
|
}
|
|
4003
|
+
index++;
|
|
3859
4004
|
}
|
|
3860
|
-
|
|
3861
|
-
if (!done)
|
|
3862
|
-
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
3863
|
-
}
|
|
4005
|
+
yield buffer;
|
|
3864
4006
|
}
|
|
3865
|
-
async function*
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
3873
|
-
if (await predicate(value, index++))
|
|
3874
|
-
break;
|
|
4007
|
+
async function* splitByAsyncIterable(iterable) {
|
|
4008
|
+
let buffer = [];
|
|
4009
|
+
let index = 0;
|
|
4010
|
+
for await (const element of iterable) {
|
|
4011
|
+
if (await predicate(element, index)) {
|
|
4012
|
+
yield buffer;
|
|
4013
|
+
buffer = [];
|
|
3875
4014
|
}
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
({ value, done } = iterator.next());
|
|
4015
|
+
else {
|
|
4016
|
+
buffer.push(element);
|
|
3879
4017
|
}
|
|
4018
|
+
index++;
|
|
3880
4019
|
}
|
|
3881
|
-
|
|
3882
|
-
if (!done)
|
|
3883
|
-
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
3884
|
-
}
|
|
4020
|
+
yield buffer;
|
|
3885
4021
|
}
|
|
3886
4022
|
}
|
|
3887
|
-
|
|
4023
|
+
splitByAsync$1.splitByAsync = splitByAsync;
|
|
3888
4024
|
|
|
3889
|
-
var
|
|
4025
|
+
var splitBy$1 = {};
|
|
3890
4026
|
|
|
3891
|
-
|
|
3892
|
-
function*
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
3900
|
-
if (predicate(value, index++))
|
|
3901
|
-
break;
|
|
4027
|
+
splitBy$1.splitBy = void 0;
|
|
4028
|
+
function* splitBy(iterable, predicate) {
|
|
4029
|
+
let buffer = [];
|
|
4030
|
+
let index = 0;
|
|
4031
|
+
for (const element of iterable) {
|
|
4032
|
+
if (predicate(element, index)) {
|
|
4033
|
+
yield buffer;
|
|
4034
|
+
buffer = [];
|
|
3902
4035
|
}
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
({ value, done } = iterator.next());
|
|
4036
|
+
else {
|
|
4037
|
+
buffer.push(element);
|
|
3906
4038
|
}
|
|
4039
|
+
index++;
|
|
3907
4040
|
}
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
4041
|
+
yield buffer;
|
|
4042
|
+
}
|
|
4043
|
+
splitBy$1.splitBy = splitBy;
|
|
4044
|
+
|
|
4045
|
+
var split$1 = {};
|
|
4046
|
+
|
|
4047
|
+
split$1.split = void 0;
|
|
4048
|
+
function* split(iterable, separator) {
|
|
4049
|
+
let buffer = [];
|
|
4050
|
+
for (const element of iterable) {
|
|
4051
|
+
if (element === separator) {
|
|
4052
|
+
yield buffer;
|
|
4053
|
+
buffer = [];
|
|
4054
|
+
}
|
|
4055
|
+
else {
|
|
4056
|
+
buffer.push(element);
|
|
4057
|
+
}
|
|
3911
4058
|
}
|
|
4059
|
+
yield buffer;
|
|
3912
4060
|
}
|
|
3913
|
-
|
|
4061
|
+
split$1.split = split;
|
|
3914
4062
|
|
|
3915
|
-
var
|
|
4063
|
+
var takeAsync = {};
|
|
3916
4064
|
|
|
3917
|
-
var
|
|
4065
|
+
var hasRequiredTakeAsync;
|
|
3918
4066
|
|
|
3919
|
-
function
|
|
3920
|
-
if (
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
const go_1 = es2018$
|
|
3924
|
-
const utils_1 = utils;
|
|
4067
|
+
function requireTakeAsync () {
|
|
4068
|
+
if (hasRequiredTakeAsync) return takeAsync;
|
|
4069
|
+
hasRequiredTakeAsync = 1;
|
|
4070
|
+
takeAsync.takeAsync = void 0;
|
|
4071
|
+
const go_1 = es2018$7;
|
|
3925
4072
|
const errors_1 = requireEs2018();
|
|
3926
|
-
function
|
|
4073
|
+
function takeAsync$1(iterable, count) {
|
|
4074
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4075
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4076
|
+
return (0, go_1.go)(async function* () {
|
|
4077
|
+
if (count === 0)
|
|
4078
|
+
return;
|
|
4079
|
+
for await (const element of iterable) {
|
|
4080
|
+
yield element;
|
|
4081
|
+
count--;
|
|
4082
|
+
if (count === 0)
|
|
4083
|
+
break;
|
|
4084
|
+
}
|
|
4085
|
+
});
|
|
4086
|
+
}
|
|
4087
|
+
takeAsync.takeAsync = takeAsync$1;
|
|
4088
|
+
|
|
4089
|
+
return takeAsync;
|
|
4090
|
+
}
|
|
4091
|
+
|
|
4092
|
+
var takeRightAsync = {};
|
|
4093
|
+
|
|
4094
|
+
var hasRequiredTakeRightAsync;
|
|
4095
|
+
|
|
4096
|
+
function requireTakeRightAsync () {
|
|
4097
|
+
if (hasRequiredTakeRightAsync) return takeRightAsync;
|
|
4098
|
+
hasRequiredTakeRightAsync = 1;
|
|
4099
|
+
takeRightAsync.takeRightAsync = void 0;
|
|
4100
|
+
const go_1 = es2018$7;
|
|
4101
|
+
const errors_1 = requireEs2018();
|
|
4102
|
+
function takeRightAsync$1(iterable, count) {
|
|
4103
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4104
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4105
|
+
return (0, go_1.go)(async function* () {
|
|
4106
|
+
var _a;
|
|
4107
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
4108
|
+
let done;
|
|
4109
|
+
try {
|
|
4110
|
+
const buffer = [];
|
|
4111
|
+
let value;
|
|
4112
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
4113
|
+
buffer.push(value);
|
|
4114
|
+
if (buffer.length > count)
|
|
4115
|
+
buffer.shift();
|
|
4116
|
+
}
|
|
4117
|
+
yield* buffer;
|
|
4118
|
+
}
|
|
4119
|
+
finally {
|
|
4120
|
+
if (!done)
|
|
4121
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
4122
|
+
}
|
|
4123
|
+
});
|
|
4124
|
+
}
|
|
4125
|
+
takeRightAsync.takeRightAsync = takeRightAsync$1;
|
|
4126
|
+
|
|
4127
|
+
return takeRightAsync;
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
var takeRight = {};
|
|
4131
|
+
|
|
4132
|
+
var hasRequiredTakeRight;
|
|
4133
|
+
|
|
4134
|
+
function requireTakeRight () {
|
|
4135
|
+
if (hasRequiredTakeRight) return takeRight;
|
|
4136
|
+
hasRequiredTakeRight = 1;
|
|
4137
|
+
takeRight.takeRight = void 0;
|
|
4138
|
+
const go_1 = es2018$7;
|
|
4139
|
+
const errors_1 = requireEs2018();
|
|
4140
|
+
function takeRight$1(iterable, count) {
|
|
3927
4141
|
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3928
4142
|
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3929
|
-
if (count === 0)
|
|
3930
|
-
return (0, utils_1.copyIterable)(iterable);
|
|
3931
4143
|
return (0, go_1.go)(function* () {
|
|
3932
4144
|
var _a;
|
|
3933
4145
|
const iterator = iterable[Symbol.iterator]();
|
|
3934
4146
|
let done;
|
|
3935
4147
|
try {
|
|
4148
|
+
const buffer = [];
|
|
3936
4149
|
let value;
|
|
3937
4150
|
while ({ value, done } = iterator.next(), !done) {
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
}
|
|
3942
|
-
while (!done) {
|
|
3943
|
-
yield value;
|
|
3944
|
-
({ value, done } = iterator.next());
|
|
4151
|
+
buffer.push(value);
|
|
4152
|
+
if (buffer.length > count)
|
|
4153
|
+
buffer.shift();
|
|
3945
4154
|
}
|
|
4155
|
+
yield* buffer;
|
|
3946
4156
|
}
|
|
3947
4157
|
finally {
|
|
3948
4158
|
if (!done)
|
|
@@ -3950,1318 +4160,842 @@ drop.drop = void 0;
|
|
|
3950
4160
|
}
|
|
3951
4161
|
});
|
|
3952
4162
|
}
|
|
3953
|
-
|
|
4163
|
+
takeRight.takeRight = takeRight$1;
|
|
3954
4164
|
|
|
3955
|
-
return
|
|
4165
|
+
return takeRight;
|
|
3956
4166
|
}
|
|
3957
4167
|
|
|
3958
|
-
var
|
|
4168
|
+
var takeUntilAsync$1 = {};
|
|
3959
4169
|
|
|
3960
|
-
|
|
3961
|
-
const types_1$
|
|
3962
|
-
function
|
|
3963
|
-
if ((0, types_1$
|
|
3964
|
-
return
|
|
4170
|
+
takeUntilAsync$1.takeUntilAsync = void 0;
|
|
4171
|
+
const types_1$b = es2018$6;
|
|
4172
|
+
function takeUntilAsync(iterable, predicate) {
|
|
4173
|
+
if ((0, types_1$b.isAsyncIterable)(iterable)) {
|
|
4174
|
+
return takeUntilAsyncIterable(iterable);
|
|
3965
4175
|
}
|
|
3966
4176
|
else {
|
|
3967
|
-
return
|
|
4177
|
+
return takeUntilIterable(iterable);
|
|
3968
4178
|
}
|
|
3969
|
-
async function*
|
|
4179
|
+
async function* takeUntilAsyncIterable(iterable) {
|
|
3970
4180
|
let index = 0;
|
|
3971
4181
|
for await (const element of iterable) {
|
|
3972
4182
|
if (await predicate(element, index))
|
|
3973
|
-
|
|
4183
|
+
break;
|
|
4184
|
+
yield element;
|
|
3974
4185
|
index++;
|
|
3975
4186
|
}
|
|
3976
4187
|
}
|
|
3977
|
-
async function*
|
|
4188
|
+
async function* takeUntilIterable(iterable) {
|
|
3978
4189
|
let index = 0;
|
|
3979
4190
|
for (const element of iterable) {
|
|
3980
4191
|
if (await predicate(element, index))
|
|
3981
|
-
|
|
4192
|
+
break;
|
|
4193
|
+
yield element;
|
|
3982
4194
|
index++;
|
|
3983
4195
|
}
|
|
3984
4196
|
}
|
|
3985
4197
|
}
|
|
3986
|
-
|
|
4198
|
+
takeUntilAsync$1.takeUntilAsync = takeUntilAsync;
|
|
3987
4199
|
|
|
3988
|
-
var
|
|
4200
|
+
var takeUntil$3 = {};
|
|
3989
4201
|
|
|
3990
|
-
|
|
3991
|
-
function*
|
|
4202
|
+
takeUntil$3.takeUntil = void 0;
|
|
4203
|
+
function* takeUntil$2(iterable, predicate) {
|
|
3992
4204
|
let index = 0;
|
|
3993
4205
|
for (const element of iterable) {
|
|
3994
4206
|
if (predicate(element, index))
|
|
3995
|
-
|
|
4207
|
+
break;
|
|
4208
|
+
yield element;
|
|
3996
4209
|
index++;
|
|
3997
4210
|
}
|
|
3998
4211
|
}
|
|
3999
|
-
|
|
4212
|
+
takeUntil$3.takeUntil = takeUntil$2;
|
|
4000
4213
|
|
|
4001
|
-
var
|
|
4214
|
+
var take$2 = {};
|
|
4002
4215
|
|
|
4003
|
-
var
|
|
4216
|
+
var hasRequiredTake;
|
|
4004
4217
|
|
|
4005
|
-
|
|
4218
|
+
function requireTake () {
|
|
4219
|
+
if (hasRequiredTake) return take$2;
|
|
4220
|
+
hasRequiredTake = 1;
|
|
4221
|
+
take$2.take = void 0;
|
|
4222
|
+
const go_1 = es2018$7;
|
|
4223
|
+
const errors_1 = requireEs2018();
|
|
4224
|
+
function take(iterable, count) {
|
|
4225
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4226
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4227
|
+
return (0, go_1.go)(function* () {
|
|
4228
|
+
if (count === 0)
|
|
4229
|
+
return;
|
|
4230
|
+
for (const element of iterable) {
|
|
4231
|
+
yield element;
|
|
4232
|
+
count--;
|
|
4233
|
+
if (count === 0)
|
|
4234
|
+
break;
|
|
4235
|
+
}
|
|
4236
|
+
});
|
|
4237
|
+
}
|
|
4238
|
+
take$2.take = take;
|
|
4239
|
+
|
|
4240
|
+
return take$2;
|
|
4241
|
+
}
|
|
4006
4242
|
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4243
|
+
var tapAsync$1 = {};
|
|
4244
|
+
|
|
4245
|
+
tapAsync$1.tapAsync = void 0;
|
|
4246
|
+
const types_1$a = es2018$6;
|
|
4247
|
+
function tapAsync(iterable, fn) {
|
|
4248
|
+
if ((0, types_1$a.isAsyncIterable)(iterable)) {
|
|
4249
|
+
return tapAsyncIterable(iterable);
|
|
4012
4250
|
}
|
|
4013
4251
|
else {
|
|
4014
|
-
return
|
|
4252
|
+
return tapIterable(iterable);
|
|
4015
4253
|
}
|
|
4016
|
-
async function*
|
|
4017
|
-
|
|
4018
|
-
for
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
else {
|
|
4023
|
-
yield element;
|
|
4024
|
-
}
|
|
4254
|
+
async function* tapIterable(iterable) {
|
|
4255
|
+
let index = 0;
|
|
4256
|
+
for (const element of iterable) {
|
|
4257
|
+
await fn(element, index);
|
|
4258
|
+
yield element;
|
|
4259
|
+
index++;
|
|
4025
4260
|
}
|
|
4026
4261
|
}
|
|
4027
|
-
function
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
yield* flatten(element, level + 1);
|
|
4034
|
-
}
|
|
4035
|
-
else {
|
|
4036
|
-
yield element;
|
|
4037
|
-
}
|
|
4262
|
+
async function* tapAsyncIterable(iterable) {
|
|
4263
|
+
let index = 0;
|
|
4264
|
+
for await (const element of iterable) {
|
|
4265
|
+
await fn(element, index);
|
|
4266
|
+
yield element;
|
|
4267
|
+
index++;
|
|
4038
4268
|
}
|
|
4039
4269
|
}
|
|
4040
4270
|
}
|
|
4041
|
-
|
|
4042
|
-
function isFiniteIterable$1(val) {
|
|
4043
|
-
return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
|
|
4044
|
-
}
|
|
4271
|
+
tapAsync$1.tapAsync = tapAsync;
|
|
4045
4272
|
|
|
4046
|
-
var
|
|
4273
|
+
var tap$3 = {};
|
|
4047
4274
|
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
(0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
4057
|
-
return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
|
|
4058
|
-
}
|
|
4059
|
-
flattenDeepAsync.flattenDeepAsync = flattenDeepAsync$1;
|
|
4060
|
-
|
|
4061
|
-
return flattenDeepAsync;
|
|
4275
|
+
tap$3.tap = void 0;
|
|
4276
|
+
function* tap$2(iterable, fn) {
|
|
4277
|
+
let index = 0;
|
|
4278
|
+
for (const element of iterable) {
|
|
4279
|
+
fn(element, index);
|
|
4280
|
+
yield element;
|
|
4281
|
+
index++;
|
|
4282
|
+
}
|
|
4062
4283
|
}
|
|
4284
|
+
tap$3.tap = tap$2;
|
|
4063
4285
|
|
|
4064
|
-
var
|
|
4286
|
+
var toAsyncIterable$1 = {};
|
|
4065
4287
|
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
function flattenAsync$1(iterable) {
|
|
4072
|
-
return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
|
|
4073
|
-
}
|
|
4074
|
-
flattenAsync.flattenAsync = flattenAsync$1;
|
|
4075
|
-
|
|
4076
|
-
return flattenAsync;
|
|
4288
|
+
toAsyncIterable$1.toAsyncIterable = void 0;
|
|
4289
|
+
async function* toAsyncIterable(iterable) {
|
|
4290
|
+
for (const value of iterable) {
|
|
4291
|
+
yield value;
|
|
4292
|
+
}
|
|
4077
4293
|
}
|
|
4294
|
+
toAsyncIterable$1.toAsyncIterable = toAsyncIterable;
|
|
4078
4295
|
|
|
4079
|
-
var
|
|
4296
|
+
var transformAsync$1 = {};
|
|
4080
4297
|
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
return flatten(iterable, 1);
|
|
4085
|
-
function* flatten(iterable, level) {
|
|
4086
|
-
for (const element of iterable) {
|
|
4087
|
-
if (isFiniteIterable(element) && predicate(element, level)) {
|
|
4088
|
-
yield* flatten(element, level + 1);
|
|
4089
|
-
}
|
|
4090
|
-
else {
|
|
4091
|
-
yield element;
|
|
4092
|
-
}
|
|
4093
|
-
}
|
|
4094
|
-
}
|
|
4095
|
-
}
|
|
4096
|
-
flattenBy$1.flattenBy = flattenBy;
|
|
4097
|
-
function isFiniteIterable(val) {
|
|
4098
|
-
return (0, types_1$e.isIterable)(val) && (0, types_1$e.isntChar)(val);
|
|
4298
|
+
transformAsync$1.transformAsync = void 0;
|
|
4299
|
+
async function* transformAsync(iterable, transformer) {
|
|
4300
|
+
yield* transformer(iterable);
|
|
4099
4301
|
}
|
|
4302
|
+
transformAsync$1.transformAsync = transformAsync;
|
|
4100
4303
|
|
|
4101
|
-
var
|
|
4102
|
-
|
|
4103
|
-
var hasRequiredFlattenDeep;
|
|
4304
|
+
var transform$1 = {};
|
|
4104
4305
|
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
flattenDeep.flattenDeep = void 0;
|
|
4109
|
-
const flatten_by_1 = flattenBy$1;
|
|
4110
|
-
const errors_1 = requireEs2018();
|
|
4111
|
-
function flattenDeep$1(iterable, depth = Infinity) {
|
|
4112
|
-
(0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
4113
|
-
(0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
4114
|
-
return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
|
|
4115
|
-
}
|
|
4116
|
-
flattenDeep.flattenDeep = flattenDeep$1;
|
|
4117
|
-
|
|
4118
|
-
return flattenDeep;
|
|
4306
|
+
transform$1.transform = void 0;
|
|
4307
|
+
function* transform(iterable, transformer) {
|
|
4308
|
+
yield* transformer(iterable);
|
|
4119
4309
|
}
|
|
4310
|
+
transform$1.transform = transform;
|
|
4120
4311
|
|
|
4121
|
-
var
|
|
4122
|
-
|
|
4123
|
-
var hasRequiredFlatten;
|
|
4312
|
+
var uniqAsync$1 = {};
|
|
4124
4313
|
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
return flatten;
|
|
4314
|
+
uniqAsync$1.uniqAsync = void 0;
|
|
4315
|
+
async function* uniqAsync(iterable) {
|
|
4316
|
+
const bucket = new Set();
|
|
4317
|
+
for await (const element of iterable) {
|
|
4318
|
+
if (!bucket.has(element)) {
|
|
4319
|
+
yield element;
|
|
4320
|
+
bucket.add(element);
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4136
4323
|
}
|
|
4324
|
+
uniqAsync$1.uniqAsync = uniqAsync;
|
|
4137
4325
|
|
|
4138
|
-
var
|
|
4326
|
+
var uniqByAsync$1 = {};
|
|
4139
4327
|
|
|
4140
|
-
|
|
4141
|
-
const types_1$
|
|
4142
|
-
function
|
|
4143
|
-
if ((0, types_1$
|
|
4144
|
-
return
|
|
4328
|
+
uniqByAsync$1.uniqByAsync = void 0;
|
|
4329
|
+
const types_1$9 = es2018$6;
|
|
4330
|
+
function uniqByAsync(iterable, fn) {
|
|
4331
|
+
if ((0, types_1$9.isAsyncIterable)(iterable)) {
|
|
4332
|
+
return uniqByAsyncIterable(iterable);
|
|
4145
4333
|
}
|
|
4146
4334
|
else {
|
|
4147
|
-
return
|
|
4335
|
+
return uniqByIterable(iterable);
|
|
4148
4336
|
}
|
|
4149
|
-
async function*
|
|
4337
|
+
async function* uniqByAsyncIterable(iterable) {
|
|
4338
|
+
const bucket = new Set();
|
|
4150
4339
|
let index = 0;
|
|
4151
4340
|
for await (const element of iterable) {
|
|
4152
|
-
|
|
4341
|
+
const result = await fn(element, index);
|
|
4342
|
+
if (!bucket.has(result)) {
|
|
4343
|
+
yield element;
|
|
4344
|
+
bucket.add(result);
|
|
4345
|
+
}
|
|
4153
4346
|
index++;
|
|
4154
4347
|
}
|
|
4155
4348
|
}
|
|
4156
|
-
async function*
|
|
4349
|
+
async function* uniqByIterable(iterable) {
|
|
4350
|
+
const bucket = new Set();
|
|
4157
4351
|
let index = 0;
|
|
4158
4352
|
for (const element of iterable) {
|
|
4159
|
-
|
|
4353
|
+
const result = await fn(element, index);
|
|
4354
|
+
if (!bucket.has(result)) {
|
|
4355
|
+
yield element;
|
|
4356
|
+
bucket.add(result);
|
|
4357
|
+
}
|
|
4160
4358
|
index++;
|
|
4161
4359
|
}
|
|
4162
4360
|
}
|
|
4163
4361
|
}
|
|
4164
|
-
|
|
4362
|
+
uniqByAsync$1.uniqByAsync = uniqByAsync;
|
|
4165
4363
|
|
|
4166
|
-
var
|
|
4364
|
+
var uniqBy$1 = {};
|
|
4167
4365
|
|
|
4168
|
-
|
|
4169
|
-
function*
|
|
4366
|
+
uniqBy$1.uniqBy = void 0;
|
|
4367
|
+
function* uniqBy(iterable, fn) {
|
|
4368
|
+
const bucket = new Set();
|
|
4170
4369
|
let index = 0;
|
|
4171
4370
|
for (const element of iterable) {
|
|
4172
|
-
|
|
4371
|
+
const result = fn(element, index);
|
|
4372
|
+
if (!bucket.has(result)) {
|
|
4373
|
+
yield element;
|
|
4374
|
+
bucket.add(result);
|
|
4375
|
+
}
|
|
4173
4376
|
index++;
|
|
4174
4377
|
}
|
|
4175
4378
|
}
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
var repeatAsync = {};
|
|
4179
|
-
|
|
4180
|
-
var hasRequiredRepeatAsync;
|
|
4181
|
-
|
|
4182
|
-
function requireRepeatAsync () {
|
|
4183
|
-
if (hasRequiredRepeatAsync) return repeatAsync;
|
|
4184
|
-
hasRequiredRepeatAsync = 1;
|
|
4185
|
-
repeatAsync.repeatAsync = void 0;
|
|
4186
|
-
const go_1 = es2018$6;
|
|
4187
|
-
const errors_1 = requireEs2018();
|
|
4188
|
-
function repeatAsync$1(iterable, times) {
|
|
4189
|
-
(0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
4190
|
-
(0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
4191
|
-
if (times === Infinity)
|
|
4192
|
-
warnInfiniteLoop();
|
|
4193
|
-
return (0, go_1.go)(async function* () {
|
|
4194
|
-
const cache = [];
|
|
4195
|
-
if (times > 0) {
|
|
4196
|
-
for await (const element of iterable) {
|
|
4197
|
-
yield element;
|
|
4198
|
-
cache.push(element);
|
|
4199
|
-
}
|
|
4200
|
-
times--;
|
|
4201
|
-
}
|
|
4202
|
-
while (times > 0) {
|
|
4203
|
-
yield* cache;
|
|
4204
|
-
times--;
|
|
4205
|
-
}
|
|
4206
|
-
});
|
|
4207
|
-
}
|
|
4208
|
-
repeatAsync.repeatAsync = repeatAsync$1;
|
|
4209
|
-
function warnInfiniteLoop() {
|
|
4210
|
-
if (isProduction())
|
|
4211
|
-
return;
|
|
4212
|
-
console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
|
|
4213
|
-
}
|
|
4214
|
-
function isProduction() {
|
|
4215
|
-
return process.env.NODE_ENV === 'production';
|
|
4216
|
-
}
|
|
4217
|
-
|
|
4218
|
-
return repeatAsync;
|
|
4219
|
-
}
|
|
4220
|
-
|
|
4221
|
-
var repeat$2 = {};
|
|
4379
|
+
uniqBy$1.uniqBy = uniqBy;
|
|
4222
4380
|
|
|
4223
|
-
var
|
|
4381
|
+
var uniq$1 = {};
|
|
4224
4382
|
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
if (times === Infinity)
|
|
4235
|
-
warnInfiniteLoop();
|
|
4236
|
-
return (0, go_1.go)(function* () {
|
|
4237
|
-
const cache = [];
|
|
4238
|
-
if (times > 0) {
|
|
4239
|
-
for (const element of iterable) {
|
|
4240
|
-
yield element;
|
|
4241
|
-
cache.push(element);
|
|
4242
|
-
}
|
|
4243
|
-
times--;
|
|
4244
|
-
}
|
|
4245
|
-
while (times > 0) {
|
|
4246
|
-
yield* cache;
|
|
4247
|
-
times--;
|
|
4248
|
-
}
|
|
4249
|
-
});
|
|
4250
|
-
}
|
|
4251
|
-
repeat$2.repeat = repeat;
|
|
4252
|
-
function warnInfiniteLoop() {
|
|
4253
|
-
if (isProduction())
|
|
4254
|
-
return;
|
|
4255
|
-
console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
|
|
4256
|
-
}
|
|
4257
|
-
function isProduction() {
|
|
4258
|
-
return process.env.NODE_ENV === 'production';
|
|
4259
|
-
}
|
|
4260
|
-
|
|
4261
|
-
return repeat$2;
|
|
4383
|
+
uniq$1.uniq = void 0;
|
|
4384
|
+
function* uniq(iterable) {
|
|
4385
|
+
const bucket = new Set();
|
|
4386
|
+
for (const element of iterable) {
|
|
4387
|
+
if (!bucket.has(element)) {
|
|
4388
|
+
yield element;
|
|
4389
|
+
bucket.add(element);
|
|
4390
|
+
}
|
|
4391
|
+
}
|
|
4262
4392
|
}
|
|
4393
|
+
uniq$1.uniq = uniq;
|
|
4263
4394
|
|
|
4264
|
-
var
|
|
4265
|
-
|
|
4266
|
-
var hasRequiredSliceAsync;
|
|
4395
|
+
var zipAsync$1 = {};
|
|
4267
4396
|
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
(0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
4278
|
-
(0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
4279
|
-
return (0, go_1.go)(async function* () {
|
|
4280
|
-
let index = 0;
|
|
4281
|
-
for await (const element of iterable) {
|
|
4282
|
-
if (index >= end)
|
|
4283
|
-
break;
|
|
4284
|
-
if (index >= start)
|
|
4285
|
-
yield element;
|
|
4286
|
-
index++;
|
|
4287
|
-
}
|
|
4288
|
-
});
|
|
4289
|
-
}
|
|
4290
|
-
sliceAsync.sliceAsync = sliceAsync$1;
|
|
4291
|
-
|
|
4292
|
-
return sliceAsync;
|
|
4293
|
-
}
|
|
4294
|
-
|
|
4295
|
-
var slice = {};
|
|
4296
|
-
|
|
4297
|
-
var hasRequiredSlice;
|
|
4298
|
-
|
|
4299
|
-
function requireSlice () {
|
|
4300
|
-
if (hasRequiredSlice) return slice;
|
|
4301
|
-
hasRequiredSlice = 1;
|
|
4302
|
-
slice.slice = void 0;
|
|
4303
|
-
const go_1 = es2018$6;
|
|
4304
|
-
const errors_1 = requireEs2018();
|
|
4305
|
-
function slice$1(iterable, start, end = Infinity) {
|
|
4306
|
-
(0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
4307
|
-
(0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
4308
|
-
(0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
4309
|
-
(0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
4310
|
-
return (0, go_1.go)(function* () {
|
|
4311
|
-
let index = 0;
|
|
4312
|
-
for (const element of iterable) {
|
|
4313
|
-
if (index >= end)
|
|
4314
|
-
break;
|
|
4315
|
-
if (index >= start)
|
|
4316
|
-
yield element;
|
|
4317
|
-
index++;
|
|
4318
|
-
}
|
|
4319
|
-
});
|
|
4320
|
-
}
|
|
4321
|
-
slice.slice = slice$1;
|
|
4322
|
-
|
|
4323
|
-
return slice;
|
|
4397
|
+
zipAsync$1.zipAsync = void 0;
|
|
4398
|
+
const types_1$8 = es2018$6;
|
|
4399
|
+
var Kind;
|
|
4400
|
+
(function (Kind) {
|
|
4401
|
+
Kind[Kind["Sync"] = 0] = "Sync";
|
|
4402
|
+
Kind[Kind["Async"] = 1] = "Async";
|
|
4403
|
+
})(Kind || (Kind = {}));
|
|
4404
|
+
function zipAsync(iterable, ...otherIterables) {
|
|
4405
|
+
return zipWithSize$1(iterable, ...otherIterables);
|
|
4324
4406
|
}
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
if (element === separator) {
|
|
4333
|
-
yield buffer;
|
|
4334
|
-
buffer = [];
|
|
4407
|
+
zipAsync$1.zipAsync = zipAsync;
|
|
4408
|
+
async function* zipWithSize$1(...iterables) {
|
|
4409
|
+
var _a, _b, _c, _d;
|
|
4410
|
+
const length = iterables.length;
|
|
4411
|
+
const iterators = iterables.map(iterable => {
|
|
4412
|
+
if ((0, types_1$8.isAsyncIterable)(iterable)) {
|
|
4413
|
+
return [Kind.Async, iterable[Symbol.asyncIterator]()];
|
|
4335
4414
|
}
|
|
4336
4415
|
else {
|
|
4337
|
-
|
|
4416
|
+
return [Kind.Sync, iterable[Symbol.iterator]()];
|
|
4338
4417
|
}
|
|
4339
|
-
}
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
for (const element of iterable) {
|
|
4359
|
-
if (await predicate(element, index)) {
|
|
4360
|
-
yield buffer;
|
|
4361
|
-
buffer = [];
|
|
4362
|
-
}
|
|
4363
|
-
else {
|
|
4364
|
-
buffer.push(element);
|
|
4418
|
+
});
|
|
4419
|
+
const dones = iterators.map(() => false);
|
|
4420
|
+
try {
|
|
4421
|
+
while (true) {
|
|
4422
|
+
const result = new Array(length);
|
|
4423
|
+
for (let i = 0; i < length; i++) {
|
|
4424
|
+
const [kind, iterator] = iterators[i];
|
|
4425
|
+
let temp;
|
|
4426
|
+
if (kind === Kind.Async) {
|
|
4427
|
+
temp = await iterator.next();
|
|
4428
|
+
}
|
|
4429
|
+
else {
|
|
4430
|
+
temp = iterator.next();
|
|
4431
|
+
}
|
|
4432
|
+
if (temp.done) {
|
|
4433
|
+
dones[i] = true;
|
|
4434
|
+
return;
|
|
4435
|
+
}
|
|
4436
|
+
result[i] = temp.value;
|
|
4365
4437
|
}
|
|
4366
|
-
|
|
4438
|
+
yield result;
|
|
4367
4439
|
}
|
|
4368
|
-
yield buffer;
|
|
4369
4440
|
}
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
yield buffer;
|
|
4376
|
-
buffer = [];
|
|
4441
|
+
finally {
|
|
4442
|
+
const undoneIterators = iterators.filter((_, i) => !dones[i]);
|
|
4443
|
+
for (const [kind, iterator] of undoneIterators) {
|
|
4444
|
+
if (kind === Kind.Async) {
|
|
4445
|
+
await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
4377
4446
|
}
|
|
4378
4447
|
else {
|
|
4379
|
-
|
|
4448
|
+
(_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
4380
4449
|
}
|
|
4381
|
-
index++;
|
|
4382
4450
|
}
|
|
4383
|
-
yield buffer;
|
|
4384
4451
|
}
|
|
4385
4452
|
}
|
|
4386
|
-
splitByAsync$1.splitByAsync = splitByAsync;
|
|
4387
4453
|
|
|
4388
|
-
var
|
|
4454
|
+
var zip$5 = {};
|
|
4389
4455
|
|
|
4390
|
-
|
|
4391
|
-
function
|
|
4392
|
-
|
|
4393
|
-
let index = 0;
|
|
4394
|
-
for (const element of iterable) {
|
|
4395
|
-
if (predicate(element, index)) {
|
|
4396
|
-
yield buffer;
|
|
4397
|
-
buffer = [];
|
|
4398
|
-
}
|
|
4399
|
-
else {
|
|
4400
|
-
buffer.push(element);
|
|
4401
|
-
}
|
|
4402
|
-
index++;
|
|
4403
|
-
}
|
|
4404
|
-
yield buffer;
|
|
4456
|
+
zip$5.zip = void 0;
|
|
4457
|
+
function zip$4(iterable, ...otherIterables) {
|
|
4458
|
+
return zipWithSize(iterable, ...otherIterables);
|
|
4405
4459
|
}
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4460
|
+
zip$5.zip = zip$4;
|
|
4461
|
+
function* zipWithSize(...iterables) {
|
|
4462
|
+
const length = iterables.length;
|
|
4463
|
+
const iterators = iterables.map(iterable => iterable[Symbol.iterator]());
|
|
4464
|
+
const dones = iterators.map(() => false);
|
|
4465
|
+
try {
|
|
4466
|
+
while (true) {
|
|
4467
|
+
const result = new Array(length);
|
|
4468
|
+
for (let i = 0; i < length; i++) {
|
|
4469
|
+
const { value, done } = iterators[i].next();
|
|
4470
|
+
if (done) {
|
|
4471
|
+
dones[i] = true;
|
|
4472
|
+
return;
|
|
4473
|
+
}
|
|
4474
|
+
result[i] = value;
|
|
4475
|
+
}
|
|
4476
|
+
yield result;
|
|
4420
4477
|
}
|
|
4421
4478
|
}
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
var takeAsync = {};
|
|
4427
|
-
|
|
4428
|
-
var hasRequiredTakeAsync;
|
|
4429
|
-
|
|
4430
|
-
function requireTakeAsync () {
|
|
4431
|
-
if (hasRequiredTakeAsync) return takeAsync;
|
|
4432
|
-
hasRequiredTakeAsync = 1;
|
|
4433
|
-
takeAsync.takeAsync = void 0;
|
|
4434
|
-
const go_1 = es2018$6;
|
|
4435
|
-
const errors_1 = requireEs2018();
|
|
4436
|
-
function takeAsync$1(iterable, count) {
|
|
4437
|
-
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4438
|
-
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4439
|
-
return (0, go_1.go)(async function* () {
|
|
4440
|
-
if (count === 0)
|
|
4441
|
-
return;
|
|
4442
|
-
for await (const element of iterable) {
|
|
4443
|
-
yield element;
|
|
4444
|
-
count--;
|
|
4445
|
-
if (count === 0)
|
|
4446
|
-
break;
|
|
4447
|
-
}
|
|
4448
|
-
});
|
|
4449
|
-
}
|
|
4450
|
-
takeAsync.takeAsync = takeAsync$1;
|
|
4451
|
-
|
|
4452
|
-
return takeAsync;
|
|
4479
|
+
finally {
|
|
4480
|
+
const undoneIterators = iterators.filter((_, i) => !dones[i]);
|
|
4481
|
+
undoneIterators.forEach(x => { var _a; return (_a = x.return) === null || _a === void 0 ? void 0 : _a.call(x); });
|
|
4482
|
+
}
|
|
4453
4483
|
}
|
|
4454
4484
|
|
|
4455
|
-
var
|
|
4456
|
-
|
|
4457
|
-
var hasRequiredTakeRightAsync;
|
|
4485
|
+
var hasRequiredMiddleware;
|
|
4458
4486
|
|
|
4459
|
-
function
|
|
4460
|
-
if (
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4487
|
+
function requireMiddleware () {
|
|
4488
|
+
if (hasRequiredMiddleware) return middleware;
|
|
4489
|
+
hasRequiredMiddleware = 1;
|
|
4490
|
+
(function (exports) {
|
|
4491
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4492
|
+
if (k2 === undefined) k2 = k;
|
|
4493
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4494
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
4495
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
4496
|
+
}
|
|
4497
|
+
Object.defineProperty(o, k2, desc);
|
|
4498
|
+
}) : (function(o, m, k, k2) {
|
|
4499
|
+
if (k2 === undefined) k2 = k;
|
|
4500
|
+
o[k2] = m[k];
|
|
4501
|
+
}));
|
|
4502
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
4503
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4504
|
+
};__exportStar(requireChunkAsync(), exports);
|
|
4505
|
+
__exportStar(chunkByAsync$1, exports);
|
|
4506
|
+
__exportStar(chunkBy$1, exports);
|
|
4507
|
+
__exportStar(requireChunk(), exports);
|
|
4508
|
+
__exportStar(concatAsync$1, exports);
|
|
4509
|
+
__exportStar(concat$5, exports);
|
|
4510
|
+
__exportStar(requireDropAsync(), exports);
|
|
4511
|
+
__exportStar(requireDropRightAsync(), exports);
|
|
4512
|
+
__exportStar(requireDropRight(), exports);
|
|
4513
|
+
__exportStar(dropUntilAsync$1, exports);
|
|
4514
|
+
__exportStar(dropUntil$1, exports);
|
|
4515
|
+
__exportStar(requireDrop(), exports);
|
|
4516
|
+
__exportStar(filterAsync$1, exports);
|
|
4517
|
+
__exportStar(filter$3, exports);
|
|
4518
|
+
__exportStar(requireFlattenAsync(), exports);
|
|
4519
|
+
__exportStar(flattenByAsync$1, exports);
|
|
4520
|
+
__exportStar(flattenBy$1, exports);
|
|
4521
|
+
__exportStar(requireFlattenDeepAsync(), exports);
|
|
4522
|
+
__exportStar(requireFlattenDeep(), exports);
|
|
4523
|
+
__exportStar(requireFlatten(), exports);
|
|
4524
|
+
__exportStar(mapAsync$1, exports);
|
|
4525
|
+
__exportStar(map$3, exports);
|
|
4526
|
+
__exportStar(requireRepeatAsync(), exports);
|
|
4527
|
+
__exportStar(requireRepeat(), exports);
|
|
4528
|
+
__exportStar(requireSliceAsync(), exports);
|
|
4529
|
+
__exportStar(requireSlice(), exports);
|
|
4530
|
+
__exportStar(splitAsync$1, exports);
|
|
4531
|
+
__exportStar(splitByAsync$1, exports);
|
|
4532
|
+
__exportStar(splitBy$1, exports);
|
|
4533
|
+
__exportStar(split$1, exports);
|
|
4534
|
+
__exportStar(requireTakeAsync(), exports);
|
|
4535
|
+
__exportStar(requireTakeRightAsync(), exports);
|
|
4536
|
+
__exportStar(requireTakeRight(), exports);
|
|
4537
|
+
__exportStar(takeUntilAsync$1, exports);
|
|
4538
|
+
__exportStar(takeUntil$3, exports);
|
|
4539
|
+
__exportStar(requireTake(), exports);
|
|
4540
|
+
__exportStar(tapAsync$1, exports);
|
|
4541
|
+
__exportStar(tap$3, exports);
|
|
4542
|
+
__exportStar(toAsyncIterable$1, exports);
|
|
4543
|
+
__exportStar(transformAsync$1, exports);
|
|
4544
|
+
__exportStar(transform$1, exports);
|
|
4545
|
+
__exportStar(uniqAsync$1, exports);
|
|
4546
|
+
__exportStar(uniqByAsync$1, exports);
|
|
4547
|
+
__exportStar(uniqBy$1, exports);
|
|
4548
|
+
__exportStar(uniq$1, exports);
|
|
4549
|
+
__exportStar(zipAsync$1, exports);
|
|
4550
|
+
__exportStar(zip$5, exports);
|
|
4551
|
+
|
|
4552
|
+
} (middleware));
|
|
4553
|
+
return middleware;
|
|
4491
4554
|
}
|
|
4492
4555
|
|
|
4493
|
-
var
|
|
4556
|
+
var output = {};
|
|
4494
4557
|
|
|
4495
|
-
var
|
|
4558
|
+
var consume$1 = {};
|
|
4496
4559
|
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
takeRight.takeRight = void 0;
|
|
4501
|
-
const go_1 = es2018$6;
|
|
4502
|
-
const errors_1 = requireEs2018();
|
|
4503
|
-
function takeRight$1(iterable, count) {
|
|
4504
|
-
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4505
|
-
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4506
|
-
return (0, go_1.go)(function* () {
|
|
4507
|
-
var _a;
|
|
4508
|
-
const iterator = iterable[Symbol.iterator]();
|
|
4509
|
-
let done;
|
|
4510
|
-
try {
|
|
4511
|
-
const buffer = [];
|
|
4512
|
-
let value;
|
|
4513
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
4514
|
-
buffer.push(value);
|
|
4515
|
-
if (buffer.length > count)
|
|
4516
|
-
buffer.shift();
|
|
4517
|
-
}
|
|
4518
|
-
yield* buffer;
|
|
4519
|
-
}
|
|
4520
|
-
finally {
|
|
4521
|
-
if (!done)
|
|
4522
|
-
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
4523
|
-
}
|
|
4524
|
-
});
|
|
4525
|
-
}
|
|
4526
|
-
takeRight.takeRight = takeRight$1;
|
|
4527
|
-
|
|
4528
|
-
return takeRight;
|
|
4560
|
+
consume$1.consume = void 0;
|
|
4561
|
+
function consume(iterable, consumer) {
|
|
4562
|
+
return consumer(iterable);
|
|
4529
4563
|
}
|
|
4564
|
+
consume$1.consume = consume;
|
|
4530
4565
|
|
|
4531
|
-
var
|
|
4566
|
+
var eachAsync$1 = {};
|
|
4532
4567
|
|
|
4533
|
-
|
|
4534
|
-
const types_1$
|
|
4535
|
-
function
|
|
4536
|
-
if ((0, types_1$
|
|
4537
|
-
return
|
|
4568
|
+
eachAsync$1.eachAsync = void 0;
|
|
4569
|
+
const types_1$7 = es2018$6;
|
|
4570
|
+
function eachAsync(iterable, fn) {
|
|
4571
|
+
if ((0, types_1$7.isAsyncIterable)(iterable)) {
|
|
4572
|
+
return eachAsyncIterable(iterable);
|
|
4538
4573
|
}
|
|
4539
4574
|
else {
|
|
4540
|
-
return
|
|
4575
|
+
return eachIterable(iterable);
|
|
4541
4576
|
}
|
|
4542
|
-
async function
|
|
4577
|
+
async function eachAsyncIterable(iterable) {
|
|
4543
4578
|
let index = 0;
|
|
4544
4579
|
for await (const element of iterable) {
|
|
4545
|
-
|
|
4546
|
-
break;
|
|
4547
|
-
yield element;
|
|
4580
|
+
await fn(element, index);
|
|
4548
4581
|
index++;
|
|
4549
4582
|
}
|
|
4550
4583
|
}
|
|
4551
|
-
async function
|
|
4584
|
+
async function eachIterable(iterable) {
|
|
4552
4585
|
let index = 0;
|
|
4553
4586
|
for (const element of iterable) {
|
|
4554
|
-
|
|
4555
|
-
break;
|
|
4556
|
-
yield element;
|
|
4587
|
+
await fn(element, index);
|
|
4557
4588
|
index++;
|
|
4558
4589
|
}
|
|
4559
4590
|
}
|
|
4560
4591
|
}
|
|
4561
|
-
|
|
4592
|
+
eachAsync$1.eachAsync = eachAsync;
|
|
4562
4593
|
|
|
4563
|
-
var
|
|
4594
|
+
var each$1 = {};
|
|
4564
4595
|
|
|
4565
|
-
|
|
4566
|
-
function
|
|
4596
|
+
each$1.each = void 0;
|
|
4597
|
+
function each(iterable, fn) {
|
|
4567
4598
|
let index = 0;
|
|
4568
4599
|
for (const element of iterable) {
|
|
4569
|
-
|
|
4570
|
-
break;
|
|
4571
|
-
yield element;
|
|
4600
|
+
fn(element, index);
|
|
4572
4601
|
index++;
|
|
4573
4602
|
}
|
|
4574
4603
|
}
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
var take$2 = {};
|
|
4578
|
-
|
|
4579
|
-
var hasRequiredTake;
|
|
4580
|
-
|
|
4581
|
-
function requireTake () {
|
|
4582
|
-
if (hasRequiredTake) return take$2;
|
|
4583
|
-
hasRequiredTake = 1;
|
|
4584
|
-
take$2.take = void 0;
|
|
4585
|
-
const go_1 = es2018$6;
|
|
4586
|
-
const errors_1 = requireEs2018();
|
|
4587
|
-
function take(iterable, count) {
|
|
4588
|
-
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4589
|
-
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4590
|
-
return (0, go_1.go)(function* () {
|
|
4591
|
-
if (count === 0)
|
|
4592
|
-
return;
|
|
4593
|
-
for (const element of iterable) {
|
|
4594
|
-
yield element;
|
|
4595
|
-
count--;
|
|
4596
|
-
if (count === 0)
|
|
4597
|
-
break;
|
|
4598
|
-
}
|
|
4599
|
-
});
|
|
4600
|
-
}
|
|
4601
|
-
take$2.take = take;
|
|
4602
|
-
|
|
4603
|
-
return take$2;
|
|
4604
|
-
}
|
|
4604
|
+
each$1.each = each;
|
|
4605
4605
|
|
|
4606
|
-
var
|
|
4606
|
+
var everyAsync$1 = {};
|
|
4607
4607
|
|
|
4608
|
-
|
|
4609
|
-
const types_1$
|
|
4610
|
-
function
|
|
4611
|
-
if ((0, types_1$
|
|
4612
|
-
return
|
|
4608
|
+
everyAsync$1.everyAsync = void 0;
|
|
4609
|
+
const types_1$6 = es2018$6;
|
|
4610
|
+
function everyAsync(iterable, predicate) {
|
|
4611
|
+
if ((0, types_1$6.isAsyncIterable)(iterable)) {
|
|
4612
|
+
return everyAsyncIterable(iterable);
|
|
4613
4613
|
}
|
|
4614
4614
|
else {
|
|
4615
|
-
return
|
|
4615
|
+
return everyIterable(iterable);
|
|
4616
4616
|
}
|
|
4617
|
-
async function
|
|
4617
|
+
async function everyIterable(iterable) {
|
|
4618
4618
|
let index = 0;
|
|
4619
4619
|
for (const element of iterable) {
|
|
4620
|
-
await
|
|
4621
|
-
|
|
4620
|
+
if (!await predicate(element, index))
|
|
4621
|
+
return false;
|
|
4622
4622
|
index++;
|
|
4623
4623
|
}
|
|
4624
|
+
return true;
|
|
4624
4625
|
}
|
|
4625
|
-
async function
|
|
4626
|
+
async function everyAsyncIterable(iterable) {
|
|
4626
4627
|
let index = 0;
|
|
4627
4628
|
for await (const element of iterable) {
|
|
4628
|
-
await
|
|
4629
|
-
|
|
4629
|
+
if (!await predicate(element, index))
|
|
4630
|
+
return false;
|
|
4630
4631
|
index++;
|
|
4631
4632
|
}
|
|
4633
|
+
return true;
|
|
4632
4634
|
}
|
|
4633
4635
|
}
|
|
4634
|
-
|
|
4636
|
+
everyAsync$1.everyAsync = everyAsync;
|
|
4635
4637
|
|
|
4636
|
-
var
|
|
4638
|
+
var every$3 = {};
|
|
4637
4639
|
|
|
4638
|
-
|
|
4639
|
-
function
|
|
4640
|
+
every$3.every = void 0;
|
|
4641
|
+
function every$2(iterable, predicate) {
|
|
4640
4642
|
let index = 0;
|
|
4641
4643
|
for (const element of iterable) {
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
+
if (!predicate(element, index))
|
|
4645
|
+
return false;
|
|
4644
4646
|
index++;
|
|
4645
4647
|
}
|
|
4648
|
+
return true;
|
|
4646
4649
|
}
|
|
4647
|
-
|
|
4650
|
+
every$3.every = every$2;
|
|
4648
4651
|
|
|
4649
|
-
var
|
|
4652
|
+
var findAsync$1 = {};
|
|
4650
4653
|
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4654
|
+
findAsync$1.findAsync = void 0;
|
|
4655
|
+
const types_1$5 = es2018$6;
|
|
4656
|
+
function findAsync(iterable, predicate) {
|
|
4657
|
+
if ((0, types_1$5.isAsyncIterable)(iterable)) {
|
|
4658
|
+
return findAsyncIterable(iterable);
|
|
4659
|
+
}
|
|
4660
|
+
else {
|
|
4661
|
+
return findIterable(iterable);
|
|
4662
|
+
}
|
|
4663
|
+
async function findIterable(iterable) {
|
|
4664
|
+
let index = 0;
|
|
4665
|
+
for (const element of iterable) {
|
|
4666
|
+
if (await predicate(element, index))
|
|
4667
|
+
return element;
|
|
4668
|
+
index++;
|
|
4669
|
+
}
|
|
4670
|
+
return undefined;
|
|
4671
|
+
}
|
|
4672
|
+
async function findAsyncIterable(iterable) {
|
|
4673
|
+
let index = 0;
|
|
4674
|
+
for await (const element of iterable) {
|
|
4675
|
+
if (await predicate(element, index))
|
|
4676
|
+
return element;
|
|
4677
|
+
index++;
|
|
4678
|
+
}
|
|
4679
|
+
return undefined;
|
|
4655
4680
|
}
|
|
4656
4681
|
}
|
|
4657
|
-
|
|
4682
|
+
findAsync$1.findAsync = findAsync;
|
|
4658
4683
|
|
|
4659
|
-
var
|
|
4684
|
+
var find$3 = {};
|
|
4660
4685
|
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4686
|
+
find$3.find = void 0;
|
|
4687
|
+
function find$2(iterable, predicate) {
|
|
4688
|
+
let index = 0;
|
|
4689
|
+
for (const element of iterable) {
|
|
4690
|
+
if (predicate(element, index))
|
|
4691
|
+
return element;
|
|
4692
|
+
index++;
|
|
4693
|
+
}
|
|
4694
|
+
return undefined;
|
|
4664
4695
|
}
|
|
4665
|
-
|
|
4696
|
+
find$3.find = find$2;
|
|
4666
4697
|
|
|
4667
|
-
var
|
|
4698
|
+
var firstAsync$1 = {};
|
|
4668
4699
|
|
|
4669
|
-
|
|
4670
|
-
function
|
|
4671
|
-
|
|
4700
|
+
firstAsync$1.firstAsync = void 0;
|
|
4701
|
+
async function firstAsync(iterable) {
|
|
4702
|
+
for await (const element of iterable) {
|
|
4703
|
+
return element;
|
|
4704
|
+
}
|
|
4705
|
+
return undefined;
|
|
4672
4706
|
}
|
|
4673
|
-
|
|
4707
|
+
firstAsync$1.firstAsync = firstAsync;
|
|
4674
4708
|
|
|
4675
|
-
var
|
|
4709
|
+
var first$3 = {};
|
|
4676
4710
|
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
const
|
|
4680
|
-
|
|
4681
|
-
if (!bucket.has(element)) {
|
|
4682
|
-
yield element;
|
|
4683
|
-
bucket.add(element);
|
|
4684
|
-
}
|
|
4711
|
+
first$3.first = void 0;
|
|
4712
|
+
function first$2(iterable) {
|
|
4713
|
+
for (const element of iterable) {
|
|
4714
|
+
return element;
|
|
4685
4715
|
}
|
|
4716
|
+
return undefined;
|
|
4686
4717
|
}
|
|
4687
|
-
|
|
4718
|
+
first$3.first = first$2;
|
|
4688
4719
|
|
|
4689
|
-
var
|
|
4720
|
+
var includesAsync$1 = {};
|
|
4690
4721
|
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
}
|
|
4697
|
-
else {
|
|
4698
|
-
return uniqByIterable(iterable);
|
|
4699
|
-
}
|
|
4700
|
-
async function* uniqByAsyncIterable(iterable) {
|
|
4701
|
-
const bucket = new Set();
|
|
4702
|
-
let index = 0;
|
|
4703
|
-
for await (const element of iterable) {
|
|
4704
|
-
const result = await fn(element, index);
|
|
4705
|
-
if (!bucket.has(result)) {
|
|
4706
|
-
yield element;
|
|
4707
|
-
bucket.add(result);
|
|
4708
|
-
}
|
|
4709
|
-
index++;
|
|
4710
|
-
}
|
|
4711
|
-
}
|
|
4712
|
-
async function* uniqByIterable(iterable) {
|
|
4713
|
-
const bucket = new Set();
|
|
4714
|
-
let index = 0;
|
|
4715
|
-
for (const element of iterable) {
|
|
4716
|
-
const result = await fn(element, index);
|
|
4717
|
-
if (!bucket.has(result)) {
|
|
4718
|
-
yield element;
|
|
4719
|
-
bucket.add(result);
|
|
4720
|
-
}
|
|
4721
|
-
index++;
|
|
4722
|
-
}
|
|
4722
|
+
includesAsync$1.includesAsync = void 0;
|
|
4723
|
+
async function includesAsync(iterable, value) {
|
|
4724
|
+
for await (const element of iterable) {
|
|
4725
|
+
if (element === value)
|
|
4726
|
+
return true;
|
|
4723
4727
|
}
|
|
4728
|
+
return false;
|
|
4724
4729
|
}
|
|
4725
|
-
|
|
4730
|
+
includesAsync$1.includesAsync = includesAsync;
|
|
4726
4731
|
|
|
4727
|
-
var
|
|
4732
|
+
var includes$1 = {};
|
|
4728
4733
|
|
|
4729
|
-
|
|
4730
|
-
function
|
|
4731
|
-
const bucket = new Set();
|
|
4732
|
-
let index = 0;
|
|
4734
|
+
includes$1.includes = void 0;
|
|
4735
|
+
function includes(iterable, value) {
|
|
4733
4736
|
for (const element of iterable) {
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
yield element;
|
|
4737
|
-
bucket.add(result);
|
|
4738
|
-
}
|
|
4739
|
-
index++;
|
|
4737
|
+
if (element === value)
|
|
4738
|
+
return true;
|
|
4740
4739
|
}
|
|
4740
|
+
return false;
|
|
4741
4741
|
}
|
|
4742
|
-
|
|
4742
|
+
includes$1.includes = includes;
|
|
4743
4743
|
|
|
4744
|
-
var
|
|
4744
|
+
var matchAsync$1 = {};
|
|
4745
4745
|
|
|
4746
|
-
|
|
4747
|
-
function
|
|
4748
|
-
const
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4746
|
+
matchAsync$1.matchAsync = void 0;
|
|
4747
|
+
async function matchAsync(iterable, sequence) {
|
|
4748
|
+
const sequenceLength = sequence.length;
|
|
4749
|
+
let matchCount = 0;
|
|
4750
|
+
for await (const element of iterable) {
|
|
4751
|
+
if (element === sequence[matchCount])
|
|
4752
|
+
matchCount++;
|
|
4753
|
+
if (matchCount === sequenceLength)
|
|
4754
|
+
return true;
|
|
4754
4755
|
}
|
|
4756
|
+
return false;
|
|
4755
4757
|
}
|
|
4756
|
-
|
|
4758
|
+
matchAsync$1.matchAsync = matchAsync;
|
|
4757
4759
|
|
|
4758
|
-
var
|
|
4760
|
+
var match$1 = {};
|
|
4759
4761
|
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
}
|
|
4770
|
-
zipAsync$1.zipAsync = zipAsync;
|
|
4771
|
-
async function* zipWithSize$1(...iterables) {
|
|
4772
|
-
var _a, _b, _c, _d;
|
|
4773
|
-
const length = iterables.length;
|
|
4774
|
-
const iterators = iterables.map(iterable => {
|
|
4775
|
-
if ((0, types_1$8.isAsyncIterable)(iterable)) {
|
|
4776
|
-
return [Kind.Async, iterable[Symbol.asyncIterator]()];
|
|
4777
|
-
}
|
|
4778
|
-
else {
|
|
4779
|
-
return [Kind.Sync, iterable[Symbol.iterator]()];
|
|
4780
|
-
}
|
|
4781
|
-
});
|
|
4782
|
-
const dones = iterators.map(() => false);
|
|
4783
|
-
try {
|
|
4784
|
-
while (true) {
|
|
4785
|
-
const result = new Array(length);
|
|
4786
|
-
for (let i = 0; i < length; i++) {
|
|
4787
|
-
const [kind, iterator] = iterators[i];
|
|
4788
|
-
let temp;
|
|
4789
|
-
if (kind === Kind.Async) {
|
|
4790
|
-
temp = await iterator.next();
|
|
4791
|
-
}
|
|
4792
|
-
else {
|
|
4793
|
-
temp = iterator.next();
|
|
4794
|
-
}
|
|
4795
|
-
if (temp.done) {
|
|
4796
|
-
dones[i] = true;
|
|
4797
|
-
return;
|
|
4798
|
-
}
|
|
4799
|
-
result[i] = temp.value;
|
|
4800
|
-
}
|
|
4801
|
-
yield result;
|
|
4802
|
-
}
|
|
4803
|
-
}
|
|
4804
|
-
finally {
|
|
4805
|
-
const undoneIterators = iterators.filter((_, i) => !dones[i]);
|
|
4806
|
-
for (const [kind, iterator] of undoneIterators) {
|
|
4807
|
-
if (kind === Kind.Async) {
|
|
4808
|
-
await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
4809
|
-
}
|
|
4810
|
-
else {
|
|
4811
|
-
(_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
4812
|
-
}
|
|
4813
|
-
}
|
|
4762
|
+
match$1.match = void 0;
|
|
4763
|
+
function match(iterable, sequence) {
|
|
4764
|
+
const sequenceLength = sequence.length;
|
|
4765
|
+
let matchCount = 0;
|
|
4766
|
+
for (const element of iterable) {
|
|
4767
|
+
if (element === sequence[matchCount])
|
|
4768
|
+
matchCount++;
|
|
4769
|
+
if (matchCount === sequenceLength)
|
|
4770
|
+
return true;
|
|
4814
4771
|
}
|
|
4772
|
+
return false;
|
|
4815
4773
|
}
|
|
4774
|
+
match$1.match = match;
|
|
4816
4775
|
|
|
4817
|
-
var
|
|
4776
|
+
var reduceAsync$1 = {};
|
|
4818
4777
|
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4778
|
+
reduceAsync$1.reduceAsync = void 0;
|
|
4779
|
+
const types_1$4 = es2018$6;
|
|
4780
|
+
function reduceAsync(iterable, fn, initialValue) {
|
|
4781
|
+
if ((0, types_1$4.isUndefined)(initialValue)) {
|
|
4782
|
+
return reduceAsyncWithoutInitialValue(iterable, fn);
|
|
4783
|
+
}
|
|
4784
|
+
else {
|
|
4785
|
+
return reduceAsyncWithInitialValue(iterable, fn, initialValue);
|
|
4786
|
+
}
|
|
4822
4787
|
}
|
|
4823
|
-
|
|
4824
|
-
function
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
return;
|
|
4836
|
-
}
|
|
4837
|
-
result[i] = value;
|
|
4838
|
-
}
|
|
4839
|
-
yield result;
|
|
4788
|
+
reduceAsync$1.reduceAsync = reduceAsync;
|
|
4789
|
+
function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
|
|
4790
|
+
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
4791
|
+
return reduceAsyncIterable(iterable);
|
|
4792
|
+
}
|
|
4793
|
+
else {
|
|
4794
|
+
return reduceIterable(iterable);
|
|
4795
|
+
}
|
|
4796
|
+
async function reduceIterable(iterable) {
|
|
4797
|
+
let result = initialValue, index = 0;
|
|
4798
|
+
for (const currentValue of iterable) {
|
|
4799
|
+
result = await fn(result, currentValue, index++);
|
|
4840
4800
|
}
|
|
4801
|
+
return result;
|
|
4841
4802
|
}
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4803
|
+
async function reduceAsyncIterable(iterable) {
|
|
4804
|
+
let result = initialValue, index = 0;
|
|
4805
|
+
for await (const currentValue of iterable) {
|
|
4806
|
+
result = await fn(result, currentValue, index++);
|
|
4807
|
+
}
|
|
4808
|
+
return result;
|
|
4845
4809
|
}
|
|
4846
4810
|
}
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
function requireMiddleware () {
|
|
4851
|
-
if (hasRequiredMiddleware) return middleware;
|
|
4852
|
-
hasRequiredMiddleware = 1;
|
|
4853
|
-
(function (exports) {
|
|
4854
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4855
|
-
if (k2 === undefined) k2 = k;
|
|
4856
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4857
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
4858
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
4859
|
-
}
|
|
4860
|
-
Object.defineProperty(o, k2, desc);
|
|
4861
|
-
}) : (function(o, m, k, k2) {
|
|
4862
|
-
if (k2 === undefined) k2 = k;
|
|
4863
|
-
o[k2] = m[k];
|
|
4864
|
-
}));
|
|
4865
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
4866
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4867
|
-
};__exportStar(requireChunkAsync(), exports);
|
|
4868
|
-
__exportStar(chunkByAsync$1, exports);
|
|
4869
|
-
__exportStar(chunkBy$1, exports);
|
|
4870
|
-
__exportStar(requireChunk(), exports);
|
|
4871
|
-
__exportStar(concatAsync$1, exports);
|
|
4872
|
-
__exportStar(concat$5, exports);
|
|
4873
|
-
__exportStar(requireDropAsync(), exports);
|
|
4874
|
-
__exportStar(requireDropRightAsync(), exports);
|
|
4875
|
-
__exportStar(requireDropRight(), exports);
|
|
4876
|
-
__exportStar(dropUntilAsync$1, exports);
|
|
4877
|
-
__exportStar(dropUntil$1, exports);
|
|
4878
|
-
__exportStar(requireDrop(), exports);
|
|
4879
|
-
__exportStar(filterAsync$1, exports);
|
|
4880
|
-
__exportStar(filter$3, exports);
|
|
4881
|
-
__exportStar(requireFlattenAsync(), exports);
|
|
4882
|
-
__exportStar(flattenByAsync$1, exports);
|
|
4883
|
-
__exportStar(flattenBy$1, exports);
|
|
4884
|
-
__exportStar(requireFlattenDeepAsync(), exports);
|
|
4885
|
-
__exportStar(requireFlattenDeep(), exports);
|
|
4886
|
-
__exportStar(requireFlatten(), exports);
|
|
4887
|
-
__exportStar(mapAsync$1, exports);
|
|
4888
|
-
__exportStar(map$3, exports);
|
|
4889
|
-
__exportStar(requireRepeatAsync(), exports);
|
|
4890
|
-
__exportStar(requireRepeat(), exports);
|
|
4891
|
-
__exportStar(requireSliceAsync(), exports);
|
|
4892
|
-
__exportStar(requireSlice(), exports);
|
|
4893
|
-
__exportStar(splitAsync$1, exports);
|
|
4894
|
-
__exportStar(splitByAsync$1, exports);
|
|
4895
|
-
__exportStar(splitBy$1, exports);
|
|
4896
|
-
__exportStar(split$1, exports);
|
|
4897
|
-
__exportStar(requireTakeAsync(), exports);
|
|
4898
|
-
__exportStar(requireTakeRightAsync(), exports);
|
|
4899
|
-
__exportStar(requireTakeRight(), exports);
|
|
4900
|
-
__exportStar(takeUntilAsync$1, exports);
|
|
4901
|
-
__exportStar(takeUntil$3, exports);
|
|
4902
|
-
__exportStar(requireTake(), exports);
|
|
4903
|
-
__exportStar(tapAsync$1, exports);
|
|
4904
|
-
__exportStar(tap$3, exports);
|
|
4905
|
-
__exportStar(toAsyncIterable$1, exports);
|
|
4906
|
-
__exportStar(transformAsync$1, exports);
|
|
4907
|
-
__exportStar(transform$1, exports);
|
|
4908
|
-
__exportStar(uniqAsync$1, exports);
|
|
4909
|
-
__exportStar(uniqByAsync$1, exports);
|
|
4910
|
-
__exportStar(uniqBy$1, exports);
|
|
4911
|
-
__exportStar(uniq$1, exports);
|
|
4912
|
-
__exportStar(zipAsync$1, exports);
|
|
4913
|
-
__exportStar(zip$5, exports);
|
|
4914
|
-
|
|
4915
|
-
} (middleware));
|
|
4916
|
-
return middleware;
|
|
4917
|
-
}
|
|
4918
|
-
|
|
4919
|
-
var output = {};
|
|
4920
|
-
|
|
4921
|
-
var consume$1 = {};
|
|
4922
|
-
|
|
4923
|
-
consume$1.consume = void 0;
|
|
4924
|
-
function consume(iterable, consumer) {
|
|
4925
|
-
return consumer(iterable);
|
|
4926
|
-
}
|
|
4927
|
-
consume$1.consume = consume;
|
|
4928
|
-
|
|
4929
|
-
var eachAsync$1 = {};
|
|
4930
|
-
|
|
4931
|
-
eachAsync$1.eachAsync = void 0;
|
|
4932
|
-
const types_1$7 = es2018$5;
|
|
4933
|
-
function eachAsync(iterable, fn) {
|
|
4934
|
-
if ((0, types_1$7.isAsyncIterable)(iterable)) {
|
|
4935
|
-
return eachAsyncIterable(iterable);
|
|
4811
|
+
function reduceAsyncWithoutInitialValue(iterable, fn) {
|
|
4812
|
+
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
4813
|
+
return reduceAsyncIterable(iterable);
|
|
4936
4814
|
}
|
|
4937
4815
|
else {
|
|
4938
|
-
return
|
|
4816
|
+
return reduceIterable(iterable);
|
|
4939
4817
|
}
|
|
4940
|
-
async function
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4818
|
+
async function reduceAsyncIterable(iterable) {
|
|
4819
|
+
var _a;
|
|
4820
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
4821
|
+
let done;
|
|
4822
|
+
try {
|
|
4823
|
+
let result = await readInitialValue(iterator);
|
|
4824
|
+
let index = 1;
|
|
4825
|
+
let value;
|
|
4826
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
4827
|
+
result = await fn(result, value, index++);
|
|
4828
|
+
}
|
|
4829
|
+
return result;
|
|
4945
4830
|
}
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4831
|
+
finally {
|
|
4832
|
+
if (!done)
|
|
4833
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
4834
|
+
}
|
|
4835
|
+
async function readInitialValue(iterator) {
|
|
4836
|
+
const result = await iterator.next();
|
|
4837
|
+
if (result.done) {
|
|
4838
|
+
done = true;
|
|
4839
|
+
throw new Error('Reduce of empty iterable with no initial value');
|
|
4840
|
+
}
|
|
4841
|
+
return result.value;
|
|
4952
4842
|
}
|
|
4953
4843
|
}
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4844
|
+
async function reduceIterable(iterable) {
|
|
4845
|
+
var _a;
|
|
4846
|
+
const iterator = iterable[Symbol.iterator]();
|
|
4847
|
+
let done;
|
|
4848
|
+
try {
|
|
4849
|
+
let result = readInitialValue(iterator);
|
|
4850
|
+
let index = 1;
|
|
4851
|
+
let value;
|
|
4852
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
4853
|
+
result = await fn(result, value, index++);
|
|
4854
|
+
}
|
|
4855
|
+
return result;
|
|
4856
|
+
}
|
|
4857
|
+
finally {
|
|
4858
|
+
if (!done)
|
|
4859
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
4860
|
+
}
|
|
4861
|
+
function readInitialValue(iterator) {
|
|
4862
|
+
const result = iterator.next();
|
|
4863
|
+
if (result.done) {
|
|
4864
|
+
done = true;
|
|
4865
|
+
throw new Error('Reduce of empty iterable with no initial value');
|
|
4866
|
+
}
|
|
4867
|
+
return result.value;
|
|
4868
|
+
}
|
|
4965
4869
|
}
|
|
4966
4870
|
}
|
|
4967
|
-
each$1.each = each;
|
|
4968
4871
|
|
|
4969
|
-
var
|
|
4872
|
+
var reduce$3 = {};
|
|
4970
4873
|
|
|
4971
|
-
|
|
4972
|
-
const types_1$
|
|
4973
|
-
function
|
|
4974
|
-
if ((0, types_1$
|
|
4975
|
-
return
|
|
4874
|
+
reduce$3.reduce = void 0;
|
|
4875
|
+
const types_1$3 = es2018$6;
|
|
4876
|
+
function reduce$2(iterable, fn, initialValue) {
|
|
4877
|
+
if ((0, types_1$3.isUndefined)(initialValue)) {
|
|
4878
|
+
return reduceWithoutInitialValue(iterable, fn);
|
|
4976
4879
|
}
|
|
4977
4880
|
else {
|
|
4978
|
-
return
|
|
4881
|
+
return reduceWithInitialValue(iterable, fn, initialValue);
|
|
4979
4882
|
}
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
}
|
|
4987
|
-
return true;
|
|
4883
|
+
}
|
|
4884
|
+
reduce$3.reduce = reduce$2;
|
|
4885
|
+
function reduceWithInitialValue(iterable, fn, initialValue) {
|
|
4886
|
+
let result = initialValue, index = 0;
|
|
4887
|
+
for (const currentValue of iterable) {
|
|
4888
|
+
result = fn(result, currentValue, index++);
|
|
4988
4889
|
}
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4890
|
+
return result;
|
|
4891
|
+
}
|
|
4892
|
+
function reduceWithoutInitialValue(iterable, fn) {
|
|
4893
|
+
var _a;
|
|
4894
|
+
const iterator = iterable[Symbol.iterator]();
|
|
4895
|
+
let done;
|
|
4896
|
+
try {
|
|
4897
|
+
let result = readInitialValue(iterator);
|
|
4898
|
+
let index = 1;
|
|
4899
|
+
let value;
|
|
4900
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
4901
|
+
result = fn(result, value, index++);
|
|
4995
4902
|
}
|
|
4996
|
-
return
|
|
4903
|
+
return result;
|
|
4997
4904
|
}
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
index++;
|
|
4905
|
+
finally {
|
|
4906
|
+
if (!done)
|
|
4907
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
4908
|
+
}
|
|
4909
|
+
function readInitialValue(iterator) {
|
|
4910
|
+
const result = iterator.next();
|
|
4911
|
+
if (result.done) {
|
|
4912
|
+
done = true;
|
|
4913
|
+
throw new Error('Reduce of empty iterable with no initial value');
|
|
4914
|
+
}
|
|
4915
|
+
return result.value;
|
|
5010
4916
|
}
|
|
5011
|
-
return true;
|
|
5012
4917
|
}
|
|
5013
|
-
every$3.every = every$2;
|
|
5014
4918
|
|
|
5015
|
-
var
|
|
4919
|
+
var someAsync$1 = {};
|
|
5016
4920
|
|
|
5017
|
-
|
|
5018
|
-
const types_1$
|
|
5019
|
-
function
|
|
5020
|
-
if ((0, types_1$
|
|
5021
|
-
return
|
|
4921
|
+
someAsync$1.someAsync = void 0;
|
|
4922
|
+
const types_1$2 = es2018$6;
|
|
4923
|
+
function someAsync(iterable, predicate) {
|
|
4924
|
+
if ((0, types_1$2.isAsyncIterable)(iterable)) {
|
|
4925
|
+
return someAsyncIterable(iterable);
|
|
5022
4926
|
}
|
|
5023
4927
|
else {
|
|
5024
|
-
return
|
|
4928
|
+
return someIterable(iterable);
|
|
5025
4929
|
}
|
|
5026
|
-
async function
|
|
4930
|
+
async function someIterable(iterable) {
|
|
5027
4931
|
let index = 0;
|
|
5028
4932
|
for (const element of iterable) {
|
|
5029
4933
|
if (await predicate(element, index))
|
|
5030
|
-
return
|
|
4934
|
+
return true;
|
|
5031
4935
|
index++;
|
|
5032
4936
|
}
|
|
5033
|
-
return
|
|
4937
|
+
return false;
|
|
5034
4938
|
}
|
|
5035
|
-
async function
|
|
4939
|
+
async function someAsyncIterable(iterable) {
|
|
5036
4940
|
let index = 0;
|
|
5037
4941
|
for await (const element of iterable) {
|
|
5038
4942
|
if (await predicate(element, index))
|
|
5039
|
-
return
|
|
4943
|
+
return true;
|
|
5040
4944
|
index++;
|
|
5041
4945
|
}
|
|
5042
|
-
return
|
|
4946
|
+
return false;
|
|
5043
4947
|
}
|
|
5044
4948
|
}
|
|
5045
|
-
|
|
4949
|
+
someAsync$1.someAsync = someAsync;
|
|
5046
4950
|
|
|
5047
|
-
var
|
|
4951
|
+
var some$1 = {};
|
|
5048
4952
|
|
|
5049
|
-
|
|
5050
|
-
function
|
|
4953
|
+
some$1.some = void 0;
|
|
4954
|
+
function some(iterable, predicate) {
|
|
5051
4955
|
let index = 0;
|
|
5052
4956
|
for (const element of iterable) {
|
|
5053
4957
|
if (predicate(element, index))
|
|
5054
|
-
return element;
|
|
5055
|
-
index++;
|
|
5056
|
-
}
|
|
5057
|
-
return undefined;
|
|
5058
|
-
}
|
|
5059
|
-
find$3.find = find$2;
|
|
5060
|
-
|
|
5061
|
-
var firstAsync$1 = {};
|
|
5062
|
-
|
|
5063
|
-
firstAsync$1.firstAsync = void 0;
|
|
5064
|
-
async function firstAsync(iterable) {
|
|
5065
|
-
for await (const element of iterable) {
|
|
5066
|
-
return element;
|
|
5067
|
-
}
|
|
5068
|
-
return undefined;
|
|
5069
|
-
}
|
|
5070
|
-
firstAsync$1.firstAsync = firstAsync;
|
|
5071
|
-
|
|
5072
|
-
var first$3 = {};
|
|
5073
|
-
|
|
5074
|
-
first$3.first = void 0;
|
|
5075
|
-
function first$2(iterable) {
|
|
5076
|
-
for (const element of iterable) {
|
|
5077
|
-
return element;
|
|
5078
|
-
}
|
|
5079
|
-
return undefined;
|
|
5080
|
-
}
|
|
5081
|
-
first$3.first = first$2;
|
|
5082
|
-
|
|
5083
|
-
var includesAsync$1 = {};
|
|
5084
|
-
|
|
5085
|
-
includesAsync$1.includesAsync = void 0;
|
|
5086
|
-
async function includesAsync(iterable, value) {
|
|
5087
|
-
for await (const element of iterable) {
|
|
5088
|
-
if (element === value)
|
|
5089
|
-
return true;
|
|
5090
|
-
}
|
|
5091
|
-
return false;
|
|
5092
|
-
}
|
|
5093
|
-
includesAsync$1.includesAsync = includesAsync;
|
|
5094
|
-
|
|
5095
|
-
var includes$1 = {};
|
|
5096
|
-
|
|
5097
|
-
includes$1.includes = void 0;
|
|
5098
|
-
function includes(iterable, value) {
|
|
5099
|
-
for (const element of iterable) {
|
|
5100
|
-
if (element === value)
|
|
5101
|
-
return true;
|
|
5102
|
-
}
|
|
5103
|
-
return false;
|
|
5104
|
-
}
|
|
5105
|
-
includes$1.includes = includes;
|
|
5106
|
-
|
|
5107
|
-
var matchAsync$1 = {};
|
|
5108
|
-
|
|
5109
|
-
matchAsync$1.matchAsync = void 0;
|
|
5110
|
-
async function matchAsync(iterable, sequence) {
|
|
5111
|
-
const sequenceLength = sequence.length;
|
|
5112
|
-
let matchCount = 0;
|
|
5113
|
-
for await (const element of iterable) {
|
|
5114
|
-
if (element === sequence[matchCount])
|
|
5115
|
-
matchCount++;
|
|
5116
|
-
if (matchCount === sequenceLength)
|
|
5117
|
-
return true;
|
|
5118
|
-
}
|
|
5119
|
-
return false;
|
|
5120
|
-
}
|
|
5121
|
-
matchAsync$1.matchAsync = matchAsync;
|
|
5122
|
-
|
|
5123
|
-
var match$1 = {};
|
|
5124
|
-
|
|
5125
|
-
match$1.match = void 0;
|
|
5126
|
-
function match(iterable, sequence) {
|
|
5127
|
-
const sequenceLength = sequence.length;
|
|
5128
|
-
let matchCount = 0;
|
|
5129
|
-
for (const element of iterable) {
|
|
5130
|
-
if (element === sequence[matchCount])
|
|
5131
|
-
matchCount++;
|
|
5132
|
-
if (matchCount === sequenceLength)
|
|
5133
4958
|
return true;
|
|
4959
|
+
index++;
|
|
5134
4960
|
}
|
|
5135
4961
|
return false;
|
|
5136
4962
|
}
|
|
5137
|
-
|
|
4963
|
+
some$1.some = some;
|
|
5138
4964
|
|
|
5139
|
-
var
|
|
4965
|
+
var lastAsync$1 = {};
|
|
5140
4966
|
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
reduceAsync$1.reduceAsync = reduceAsync;
|
|
5152
|
-
function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
|
|
5153
|
-
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
5154
|
-
return reduceAsyncIterable(iterable);
|
|
5155
|
-
}
|
|
5156
|
-
else {
|
|
5157
|
-
return reduceIterable(iterable);
|
|
5158
|
-
}
|
|
5159
|
-
async function reduceIterable(iterable) {
|
|
5160
|
-
let result = initialValue, index = 0;
|
|
5161
|
-
for (const currentValue of iterable) {
|
|
5162
|
-
result = await fn(result, currentValue, index++);
|
|
5163
|
-
}
|
|
5164
|
-
return result;
|
|
5165
|
-
}
|
|
5166
|
-
async function reduceAsyncIterable(iterable) {
|
|
5167
|
-
let result = initialValue, index = 0;
|
|
5168
|
-
for await (const currentValue of iterable) {
|
|
5169
|
-
result = await fn(result, currentValue, index++);
|
|
4967
|
+
lastAsync$1.lastAsync = void 0;
|
|
4968
|
+
async function lastAsync(iterable) {
|
|
4969
|
+
var _a;
|
|
4970
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
4971
|
+
let done;
|
|
4972
|
+
try {
|
|
4973
|
+
let value;
|
|
4974
|
+
let result;
|
|
4975
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
4976
|
+
result = value;
|
|
5170
4977
|
}
|
|
5171
4978
|
return result;
|
|
5172
4979
|
}
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
return reduceAsyncIterable(iterable);
|
|
5177
|
-
}
|
|
5178
|
-
else {
|
|
5179
|
-
return reduceIterable(iterable);
|
|
5180
|
-
}
|
|
5181
|
-
async function reduceAsyncIterable(iterable) {
|
|
5182
|
-
var _a;
|
|
5183
|
-
const iterator = iterable[Symbol.asyncIterator]();
|
|
5184
|
-
let done;
|
|
5185
|
-
try {
|
|
5186
|
-
let result = await readInitialValue(iterator);
|
|
5187
|
-
let index = 1;
|
|
5188
|
-
let value;
|
|
5189
|
-
while ({ value, done } = await iterator.next(), !done) {
|
|
5190
|
-
result = await fn(result, value, index++);
|
|
5191
|
-
}
|
|
5192
|
-
return result;
|
|
5193
|
-
}
|
|
5194
|
-
finally {
|
|
5195
|
-
if (!done)
|
|
5196
|
-
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
5197
|
-
}
|
|
5198
|
-
async function readInitialValue(iterator) {
|
|
5199
|
-
const result = await iterator.next();
|
|
5200
|
-
if (result.done) {
|
|
5201
|
-
done = true;
|
|
5202
|
-
throw new Error('Reduce of empty iterable with no initial value');
|
|
5203
|
-
}
|
|
5204
|
-
return result.value;
|
|
5205
|
-
}
|
|
5206
|
-
}
|
|
5207
|
-
async function reduceIterable(iterable) {
|
|
5208
|
-
var _a;
|
|
5209
|
-
const iterator = iterable[Symbol.iterator]();
|
|
5210
|
-
let done;
|
|
5211
|
-
try {
|
|
5212
|
-
let result = readInitialValue(iterator);
|
|
5213
|
-
let index = 1;
|
|
5214
|
-
let value;
|
|
5215
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
5216
|
-
result = await fn(result, value, index++);
|
|
5217
|
-
}
|
|
5218
|
-
return result;
|
|
5219
|
-
}
|
|
5220
|
-
finally {
|
|
5221
|
-
if (!done)
|
|
5222
|
-
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
5223
|
-
}
|
|
5224
|
-
function readInitialValue(iterator) {
|
|
5225
|
-
const result = iterator.next();
|
|
5226
|
-
if (result.done) {
|
|
5227
|
-
done = true;
|
|
5228
|
-
throw new Error('Reduce of empty iterable with no initial value');
|
|
5229
|
-
}
|
|
5230
|
-
return result.value;
|
|
5231
|
-
}
|
|
4980
|
+
finally {
|
|
4981
|
+
if (!done)
|
|
4982
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
5232
4983
|
}
|
|
5233
4984
|
}
|
|
4985
|
+
lastAsync$1.lastAsync = lastAsync;
|
|
5234
4986
|
|
|
5235
|
-
var
|
|
4987
|
+
var last$4 = {};
|
|
5236
4988
|
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
function reduce$2(iterable, fn, initialValue) {
|
|
5240
|
-
if ((0, types_1$3.isUndefined)(initialValue)) {
|
|
5241
|
-
return reduceWithoutInitialValue(iterable, fn);
|
|
5242
|
-
}
|
|
5243
|
-
else {
|
|
5244
|
-
return reduceWithInitialValue(iterable, fn, initialValue);
|
|
5245
|
-
}
|
|
5246
|
-
}
|
|
5247
|
-
reduce$3.reduce = reduce$2;
|
|
5248
|
-
function reduceWithInitialValue(iterable, fn, initialValue) {
|
|
5249
|
-
let result = initialValue, index = 0;
|
|
5250
|
-
for (const currentValue of iterable) {
|
|
5251
|
-
result = fn(result, currentValue, index++);
|
|
5252
|
-
}
|
|
5253
|
-
return result;
|
|
5254
|
-
}
|
|
5255
|
-
function reduceWithoutInitialValue(iterable, fn) {
|
|
4989
|
+
last$4.last = void 0;
|
|
4990
|
+
function last$3(iterable) {
|
|
5256
4991
|
var _a;
|
|
5257
4992
|
const iterator = iterable[Symbol.iterator]();
|
|
5258
4993
|
let done;
|
|
5259
4994
|
try {
|
|
5260
|
-
let result = readInitialValue(iterator);
|
|
5261
|
-
let index = 1;
|
|
5262
4995
|
let value;
|
|
4996
|
+
let result;
|
|
5263
4997
|
while ({ value, done } = iterator.next(), !done) {
|
|
5264
|
-
result =
|
|
4998
|
+
result = value;
|
|
5265
4999
|
}
|
|
5266
5000
|
return result;
|
|
5267
5001
|
}
|
|
@@ -5269,177 +5003,486 @@ function reduceWithoutInitialValue(iterable, fn) {
|
|
|
5269
5003
|
if (!done)
|
|
5270
5004
|
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
5271
5005
|
}
|
|
5272
|
-
function readInitialValue(iterator) {
|
|
5273
|
-
const result = iterator.next();
|
|
5274
|
-
if (result.done) {
|
|
5275
|
-
done = true;
|
|
5276
|
-
throw new Error('Reduce of empty iterable with no initial value');
|
|
5277
|
-
}
|
|
5278
|
-
return result.value;
|
|
5279
|
-
}
|
|
5280
5006
|
}
|
|
5007
|
+
last$4.last = last$3;
|
|
5281
5008
|
|
|
5282
|
-
var
|
|
5009
|
+
var toArrayAsync$1 = {};
|
|
5283
5010
|
|
|
5284
|
-
|
|
5285
|
-
const
|
|
5286
|
-
function
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
}
|
|
5290
|
-
else {
|
|
5291
|
-
return someIterable(iterable);
|
|
5292
|
-
}
|
|
5293
|
-
async function someIterable(iterable) {
|
|
5294
|
-
let index = 0;
|
|
5295
|
-
for (const element of iterable) {
|
|
5296
|
-
if (await predicate(element, index))
|
|
5297
|
-
return true;
|
|
5298
|
-
index++;
|
|
5299
|
-
}
|
|
5300
|
-
return false;
|
|
5301
|
-
}
|
|
5302
|
-
async function someAsyncIterable(iterable) {
|
|
5303
|
-
let index = 0;
|
|
5011
|
+
toArrayAsync$1.toArrayAsync = void 0;
|
|
5012
|
+
const consume_1$3 = consume$1;
|
|
5013
|
+
function toArrayAsync(iterable) {
|
|
5014
|
+
return (0, consume_1$3.consume)(iterable, async (iterable) => {
|
|
5015
|
+
const result = [];
|
|
5304
5016
|
for await (const element of iterable) {
|
|
5305
|
-
|
|
5306
|
-
return true;
|
|
5307
|
-
index++;
|
|
5017
|
+
result.push(element);
|
|
5308
5018
|
}
|
|
5309
|
-
return
|
|
5310
|
-
}
|
|
5019
|
+
return result;
|
|
5020
|
+
});
|
|
5311
5021
|
}
|
|
5312
|
-
|
|
5022
|
+
toArrayAsync$1.toArrayAsync = toArrayAsync;
|
|
5313
5023
|
|
|
5314
|
-
var
|
|
5024
|
+
var toArray$3 = {};
|
|
5315
5025
|
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
if (predicate(element, index))
|
|
5321
|
-
return true;
|
|
5322
|
-
index++;
|
|
5323
|
-
}
|
|
5324
|
-
return false;
|
|
5026
|
+
toArray$3.toArray = void 0;
|
|
5027
|
+
const consume_1$2 = consume$1;
|
|
5028
|
+
function toArray$2(iterable) {
|
|
5029
|
+
return (0, consume_1$2.consume)(iterable, iterable => Array.from(iterable));
|
|
5325
5030
|
}
|
|
5326
|
-
|
|
5031
|
+
toArray$3.toArray = toArray$2;
|
|
5327
5032
|
|
|
5328
|
-
var
|
|
5033
|
+
var toSetAsync$1 = {};
|
|
5329
5034
|
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
let result;
|
|
5338
|
-
while ({ value, done } = await iterator.next(), !done) {
|
|
5339
|
-
result = value;
|
|
5035
|
+
toSetAsync$1.toSetAsync = void 0;
|
|
5036
|
+
const consume_1$1 = consume$1;
|
|
5037
|
+
function toSetAsync(iterable) {
|
|
5038
|
+
return (0, consume_1$1.consume)(iterable, async (iterable) => {
|
|
5039
|
+
const result = new Set();
|
|
5040
|
+
for await (const element of iterable) {
|
|
5041
|
+
result.add(element);
|
|
5340
5042
|
}
|
|
5341
5043
|
return result;
|
|
5044
|
+
});
|
|
5045
|
+
}
|
|
5046
|
+
toSetAsync$1.toSetAsync = toSetAsync;
|
|
5047
|
+
|
|
5048
|
+
var toSet$1 = {};
|
|
5049
|
+
|
|
5050
|
+
toSet$1.toSet = void 0;
|
|
5051
|
+
const consume_1 = consume$1;
|
|
5052
|
+
function toSet(iterable) {
|
|
5053
|
+
return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
|
|
5054
|
+
}
|
|
5055
|
+
toSet$1.toSet = toSet;
|
|
5056
|
+
|
|
5057
|
+
var count$3 = {};
|
|
5058
|
+
|
|
5059
|
+
count$3.count = void 0;
|
|
5060
|
+
function count$2(iterable) {
|
|
5061
|
+
let count = 0;
|
|
5062
|
+
for (const _ of iterable) {
|
|
5063
|
+
count++;
|
|
5342
5064
|
}
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5065
|
+
return count;
|
|
5066
|
+
}
|
|
5067
|
+
count$3.count = count$2;
|
|
5068
|
+
|
|
5069
|
+
var countAsync$1 = {};
|
|
5070
|
+
|
|
5071
|
+
countAsync$1.countAsync = void 0;
|
|
5072
|
+
async function countAsync(iterable) {
|
|
5073
|
+
let count = 0;
|
|
5074
|
+
for await (const _ of iterable) {
|
|
5075
|
+
count++;
|
|
5346
5076
|
}
|
|
5077
|
+
return count;
|
|
5078
|
+
}
|
|
5079
|
+
countAsync$1.countAsync = countAsync;
|
|
5080
|
+
|
|
5081
|
+
(function (exports) {
|
|
5082
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5083
|
+
if (k2 === undefined) k2 = k;
|
|
5084
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5085
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5086
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
5087
|
+
}
|
|
5088
|
+
Object.defineProperty(o, k2, desc);
|
|
5089
|
+
}) : (function(o, m, k, k2) {
|
|
5090
|
+
if (k2 === undefined) k2 = k;
|
|
5091
|
+
o[k2] = m[k];
|
|
5092
|
+
}));
|
|
5093
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
5094
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5095
|
+
};__exportStar(consume$1, exports);
|
|
5096
|
+
__exportStar(eachAsync$1, exports);
|
|
5097
|
+
__exportStar(each$1, exports);
|
|
5098
|
+
__exportStar(everyAsync$1, exports);
|
|
5099
|
+
__exportStar(every$3, exports);
|
|
5100
|
+
__exportStar(findAsync$1, exports);
|
|
5101
|
+
__exportStar(find$3, exports);
|
|
5102
|
+
__exportStar(firstAsync$1, exports);
|
|
5103
|
+
__exportStar(first$3, exports);
|
|
5104
|
+
__exportStar(includesAsync$1, exports);
|
|
5105
|
+
__exportStar(includes$1, exports);
|
|
5106
|
+
__exportStar(matchAsync$1, exports);
|
|
5107
|
+
__exportStar(match$1, exports);
|
|
5108
|
+
__exportStar(reduceAsync$1, exports);
|
|
5109
|
+
__exportStar(reduce$3, exports);
|
|
5110
|
+
__exportStar(someAsync$1, exports);
|
|
5111
|
+
__exportStar(some$1, exports);
|
|
5112
|
+
__exportStar(lastAsync$1, exports);
|
|
5113
|
+
__exportStar(last$4, exports);
|
|
5114
|
+
__exportStar(toArrayAsync$1, exports);
|
|
5115
|
+
__exportStar(toArray$3, exports);
|
|
5116
|
+
__exportStar(toSetAsync$1, exports);
|
|
5117
|
+
__exportStar(toSet$1, exports);
|
|
5118
|
+
__exportStar(count$3, exports);
|
|
5119
|
+
__exportStar(countAsync$1, exports);
|
|
5120
|
+
|
|
5121
|
+
} (output));
|
|
5122
|
+
|
|
5123
|
+
var hasRequiredEs2018$1;
|
|
5124
|
+
|
|
5125
|
+
function requireEs2018$1 () {
|
|
5126
|
+
if (hasRequiredEs2018$1) return es2018$8;
|
|
5127
|
+
hasRequiredEs2018$1 = 1;
|
|
5128
|
+
(function (exports) {
|
|
5129
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5130
|
+
if (k2 === undefined) k2 = k;
|
|
5131
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5132
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5133
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
5134
|
+
}
|
|
5135
|
+
Object.defineProperty(o, k2, desc);
|
|
5136
|
+
}) : (function(o, m, k, k2) {
|
|
5137
|
+
if (k2 === undefined) k2 = k;
|
|
5138
|
+
o[k2] = m[k];
|
|
5139
|
+
}));
|
|
5140
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
5141
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5142
|
+
};__exportStar(requireMiddleware(), exports);
|
|
5143
|
+
__exportStar(output, exports);
|
|
5144
|
+
|
|
5145
|
+
} (es2018$8));
|
|
5146
|
+
return es2018$8;
|
|
5147
|
+
}
|
|
5148
|
+
|
|
5149
|
+
var getErrorNames$1 = {};
|
|
5150
|
+
|
|
5151
|
+
var es2018$5 = {};
|
|
5152
|
+
|
|
5153
|
+
var array$1 = {};
|
|
5154
|
+
|
|
5155
|
+
array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
|
|
5156
|
+
function isArray$4(val) {
|
|
5157
|
+
return Array.isArray(val);
|
|
5158
|
+
}
|
|
5159
|
+
array$1.isArray = isArray$4;
|
|
5160
|
+
function isntArray$1(val) {
|
|
5161
|
+
return !isArray$4(val);
|
|
5162
|
+
}
|
|
5163
|
+
array$1.isntArray = isntArray$1;
|
|
5164
|
+
function isEmptyArray$1(val) {
|
|
5165
|
+
return val.length === 0;
|
|
5166
|
+
}
|
|
5167
|
+
array$1.isEmptyArray = isEmptyArray$1;
|
|
5168
|
+
function isntEmptyArray$1(val) {
|
|
5169
|
+
return val.length !== 0;
|
|
5170
|
+
}
|
|
5171
|
+
array$1.isntEmptyArray = isntEmptyArray$1;
|
|
5172
|
+
|
|
5173
|
+
var asyncIterable$1 = {};
|
|
5174
|
+
|
|
5175
|
+
var _null$1 = {};
|
|
5176
|
+
|
|
5177
|
+
_null$1.isntNull = _null$1.isNull = void 0;
|
|
5178
|
+
function isNull$1(val) {
|
|
5179
|
+
return val === null;
|
|
5180
|
+
}
|
|
5181
|
+
_null$1.isNull = isNull$1;
|
|
5182
|
+
function isntNull$1(val) {
|
|
5183
|
+
return !isNull$1(val);
|
|
5184
|
+
}
|
|
5185
|
+
_null$1.isntNull = isntNull$1;
|
|
5186
|
+
|
|
5187
|
+
var _undefined$1 = {};
|
|
5188
|
+
|
|
5189
|
+
_undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
|
|
5190
|
+
function isUndefined$1(val) {
|
|
5191
|
+
return val === undefined;
|
|
5192
|
+
}
|
|
5193
|
+
_undefined$1.isUndefined = isUndefined$1;
|
|
5194
|
+
function isntUndefined$1(val) {
|
|
5195
|
+
return !isUndefined$1(val);
|
|
5196
|
+
}
|
|
5197
|
+
_undefined$1.isntUndefined = isntUndefined$1;
|
|
5198
|
+
|
|
5199
|
+
var _function$1 = {};
|
|
5200
|
+
|
|
5201
|
+
_function$1.isntFunction = _function$1.isFunction = void 0;
|
|
5202
|
+
function isFunction$3(val) {
|
|
5203
|
+
return typeof val === 'function';
|
|
5204
|
+
}
|
|
5205
|
+
_function$1.isFunction = isFunction$3;
|
|
5206
|
+
function isntFunction$1(val) {
|
|
5207
|
+
return !isFunction$3(val);
|
|
5208
|
+
}
|
|
5209
|
+
_function$1.isntFunction = isntFunction$1;
|
|
5210
|
+
|
|
5211
|
+
asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
|
|
5212
|
+
const null_1$5 = _null$1;
|
|
5213
|
+
const undefined_1$3 = _undefined$1;
|
|
5214
|
+
const function_1$5 = _function$1;
|
|
5215
|
+
function isAsyncIterable$3(val) {
|
|
5216
|
+
return (0, null_1$5.isntNull)(val)
|
|
5217
|
+
&& (0, undefined_1$3.isntUndefined)(val)
|
|
5218
|
+
&& (0, function_1$5.isFunction)(val[Symbol.asyncIterator]);
|
|
5219
|
+
}
|
|
5220
|
+
asyncIterable$1.isAsyncIterable = isAsyncIterable$3;
|
|
5221
|
+
function isntAsyncIterable$1(val) {
|
|
5222
|
+
return !isAsyncIterable$3(val);
|
|
5223
|
+
}
|
|
5224
|
+
asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
|
|
5225
|
+
|
|
5226
|
+
var bigint$1 = {};
|
|
5227
|
+
|
|
5228
|
+
bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
|
|
5229
|
+
function isBigInt$1(val) {
|
|
5230
|
+
return typeof val === 'bigint';
|
|
5231
|
+
}
|
|
5232
|
+
bigint$1.isBigInt = isBigInt$1;
|
|
5233
|
+
function isntBigInt$1(val) {
|
|
5234
|
+
return !isBigInt$1(val);
|
|
5235
|
+
}
|
|
5236
|
+
bigint$1.isntBigInt = isntBigInt$1;
|
|
5237
|
+
|
|
5238
|
+
var boolean$1 = {};
|
|
5239
|
+
|
|
5240
|
+
boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
|
|
5241
|
+
function isBoolean$1(val) {
|
|
5242
|
+
return typeof val === 'boolean';
|
|
5243
|
+
}
|
|
5244
|
+
boolean$1.isBoolean = isBoolean$1;
|
|
5245
|
+
function isntBoolean$1(val) {
|
|
5246
|
+
return !isBoolean$1(val);
|
|
5247
|
+
}
|
|
5248
|
+
boolean$1.isntBoolean = isntBoolean$1;
|
|
5249
|
+
|
|
5250
|
+
var char$1 = {};
|
|
5251
|
+
|
|
5252
|
+
var string$1 = {};
|
|
5253
|
+
|
|
5254
|
+
string$1.isntString = string$1.isString = void 0;
|
|
5255
|
+
function isString$1(val) {
|
|
5256
|
+
return typeof val === 'string';
|
|
5257
|
+
}
|
|
5258
|
+
string$1.isString = isString$1;
|
|
5259
|
+
function isntString$1(val) {
|
|
5260
|
+
return !isString$1(val);
|
|
5261
|
+
}
|
|
5262
|
+
string$1.isntString = isntString$1;
|
|
5263
|
+
|
|
5264
|
+
char$1.isntChar = char$1.isChar = void 0;
|
|
5265
|
+
const string_1$3 = string$1;
|
|
5266
|
+
function isChar$1(val) {
|
|
5267
|
+
return (0, string_1$3.isString)(val)
|
|
5268
|
+
&& val.length === 1;
|
|
5269
|
+
}
|
|
5270
|
+
char$1.isChar = isChar$1;
|
|
5271
|
+
function isntChar$1(val) {
|
|
5272
|
+
return !isChar$1(val);
|
|
5273
|
+
}
|
|
5274
|
+
char$1.isntChar = isntChar$1;
|
|
5275
|
+
|
|
5276
|
+
var date$1 = {};
|
|
5277
|
+
|
|
5278
|
+
date$1.isntDate = date$1.isDate = void 0;
|
|
5279
|
+
function isDate$2(val) {
|
|
5280
|
+
return val instanceof Date;
|
|
5281
|
+
}
|
|
5282
|
+
date$1.isDate = isDate$2;
|
|
5283
|
+
function isntDate$1(val) {
|
|
5284
|
+
return !isDate$2(val);
|
|
5285
|
+
}
|
|
5286
|
+
date$1.isntDate = isntDate$1;
|
|
5287
|
+
|
|
5288
|
+
var _enum$1 = {};
|
|
5289
|
+
|
|
5290
|
+
_enum$1.inEnum = void 0;
|
|
5291
|
+
function inEnum$1(val, _enum) {
|
|
5292
|
+
return Object.values(_enum).includes(val);
|
|
5293
|
+
}
|
|
5294
|
+
_enum$1.inEnum = inEnum$1;
|
|
5295
|
+
|
|
5296
|
+
var error$1 = {};
|
|
5297
|
+
|
|
5298
|
+
error$1.isntError = error$1.isError = void 0;
|
|
5299
|
+
function isError$1(val) {
|
|
5300
|
+
return val instanceof Error;
|
|
5301
|
+
}
|
|
5302
|
+
error$1.isError = isError$1;
|
|
5303
|
+
function isntError$1(val) {
|
|
5304
|
+
return !isError$1(val);
|
|
5305
|
+
}
|
|
5306
|
+
error$1.isntError = isntError$1;
|
|
5307
|
+
|
|
5308
|
+
var falsy$1 = {};
|
|
5309
|
+
|
|
5310
|
+
falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
|
|
5311
|
+
function isFalsy$1(val) {
|
|
5312
|
+
return !val;
|
|
5313
|
+
}
|
|
5314
|
+
falsy$1.isFalsy = isFalsy$1;
|
|
5315
|
+
function isntFalsy$1(val) {
|
|
5316
|
+
return !isFalsy$1(val);
|
|
5317
|
+
}
|
|
5318
|
+
falsy$1.isntFalsy = isntFalsy$1;
|
|
5319
|
+
|
|
5320
|
+
var iterable$1 = {};
|
|
5321
|
+
|
|
5322
|
+
iterable$1.isntIterable = iterable$1.isIterable = void 0;
|
|
5323
|
+
const null_1$4 = _null$1;
|
|
5324
|
+
const undefined_1$2 = _undefined$1;
|
|
5325
|
+
const function_1$4 = _function$1;
|
|
5326
|
+
function isIterable$3(val) {
|
|
5327
|
+
return (0, null_1$4.isntNull)(val)
|
|
5328
|
+
&& (0, undefined_1$2.isntUndefined)(val)
|
|
5329
|
+
&& (0, function_1$4.isFunction)(val[Symbol.iterator]);
|
|
5330
|
+
}
|
|
5331
|
+
iterable$1.isIterable = isIterable$3;
|
|
5332
|
+
function isntIterable$1(val) {
|
|
5333
|
+
return !isIterable$3(val);
|
|
5334
|
+
}
|
|
5335
|
+
iterable$1.isntIterable = isntIterable$1;
|
|
5336
|
+
|
|
5337
|
+
var json$1 = {};
|
|
5338
|
+
|
|
5339
|
+
var number$1 = {};
|
|
5340
|
+
|
|
5341
|
+
number$1.isntNaN = number$1.isNaN = number$1.isNegativeInfinity = number$1.isPositiveInfinity = number$1.isFinite = number$1.isntNumber = number$1.isNumber = void 0;
|
|
5342
|
+
function isNumber$1(val) {
|
|
5343
|
+
return typeof val === 'number';
|
|
5344
|
+
}
|
|
5345
|
+
number$1.isNumber = isNumber$1;
|
|
5346
|
+
function isntNumber$1(val) {
|
|
5347
|
+
return !isNumber$1(val);
|
|
5348
|
+
}
|
|
5349
|
+
number$1.isntNumber = isntNumber$1;
|
|
5350
|
+
function isFinite$1(val) {
|
|
5351
|
+
return Number.isFinite(val);
|
|
5352
|
+
}
|
|
5353
|
+
number$1.isFinite = isFinite$1;
|
|
5354
|
+
function isPositiveInfinity$1(val) {
|
|
5355
|
+
return val === Infinity;
|
|
5356
|
+
}
|
|
5357
|
+
number$1.isPositiveInfinity = isPositiveInfinity$1;
|
|
5358
|
+
function isNegativeInfinity$1(val) {
|
|
5359
|
+
return val === -Infinity;
|
|
5360
|
+
}
|
|
5361
|
+
number$1.isNegativeInfinity = isNegativeInfinity$1;
|
|
5362
|
+
function isNaN$2(val) {
|
|
5363
|
+
return Number.isNaN(val);
|
|
5364
|
+
}
|
|
5365
|
+
number$1.isNaN = isNaN$2;
|
|
5366
|
+
function isntNaN$1(val) {
|
|
5367
|
+
return !isNaN$2(val);
|
|
5368
|
+
}
|
|
5369
|
+
number$1.isntNaN = isntNaN$1;
|
|
5370
|
+
|
|
5371
|
+
var object$1 = {};
|
|
5372
|
+
|
|
5373
|
+
var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
5374
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5375
|
+
};object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isntPlainObject = object$1.isPlainObject = object$1.isntObject = object$1.isObject = void 0;
|
|
5376
|
+
const isPlainObject_1$1 = __importDefault$1(isPlainObject_1$3);
|
|
5377
|
+
function isObject$1(val) {
|
|
5378
|
+
return val !== null
|
|
5379
|
+
&& typeof val === 'object';
|
|
5380
|
+
}
|
|
5381
|
+
object$1.isObject = isObject$1;
|
|
5382
|
+
function isntObject$1(val) {
|
|
5383
|
+
return !isObject$1(val);
|
|
5384
|
+
}
|
|
5385
|
+
object$1.isntObject = isntObject$1;
|
|
5386
|
+
function isPlainObject$1(val) {
|
|
5387
|
+
return (0, isPlainObject_1$1.default)(val);
|
|
5388
|
+
}
|
|
5389
|
+
object$1.isPlainObject = isPlainObject$1;
|
|
5390
|
+
function isntPlainObject$1(val) {
|
|
5391
|
+
return !isPlainObject$1(val);
|
|
5392
|
+
}
|
|
5393
|
+
object$1.isntPlainObject = isntPlainObject$1;
|
|
5394
|
+
function isEmptyObject$1(val) {
|
|
5395
|
+
return Object.keys(val).length === 0;
|
|
5396
|
+
}
|
|
5397
|
+
object$1.isEmptyObject = isEmptyObject$1;
|
|
5398
|
+
function isntEmptyObject$1(val) {
|
|
5399
|
+
return Object.keys(val).length !== 0;
|
|
5347
5400
|
}
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
var last$4 = {};
|
|
5401
|
+
object$1.isntEmptyObject = isntEmptyObject$1;
|
|
5351
5402
|
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5403
|
+
json$1.isntJsonable = json$1.isJsonable = json$1.isntJson = json$1.isJson = void 0;
|
|
5404
|
+
const null_1$3 = _null$1;
|
|
5405
|
+
const boolean_1$1 = boolean$1;
|
|
5406
|
+
const string_1$2 = string$1;
|
|
5407
|
+
const number_1$1 = number$1;
|
|
5408
|
+
const array_1$1 = array$1;
|
|
5409
|
+
const object_1$3 = object$1;
|
|
5410
|
+
function isJson$1(val) {
|
|
5411
|
+
return (0, null_1$3.isNull)(val)
|
|
5412
|
+
|| (0, boolean_1$1.isBoolean)(val)
|
|
5413
|
+
|| (0, string_1$2.isString)(val)
|
|
5414
|
+
|| (0, number_1$1.isNumber)(val)
|
|
5415
|
+
|| ((0, array_1$1.isArray)(val) && val.every(isJson$1))
|
|
5416
|
+
|| ((0, object_1$3.isPlainObject)(val) && Object.values(val).every(isJson$1));
|
|
5417
|
+
}
|
|
5418
|
+
json$1.isJson = isJson$1;
|
|
5419
|
+
function isntJson$1(val) {
|
|
5420
|
+
return !isJson$1(val);
|
|
5421
|
+
}
|
|
5422
|
+
json$1.isntJson = isntJson$1;
|
|
5423
|
+
function isJsonable$1(val) {
|
|
5357
5424
|
try {
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
5361
|
-
result = value;
|
|
5362
|
-
}
|
|
5363
|
-
return result;
|
|
5425
|
+
JSON.stringify(val);
|
|
5426
|
+
return true;
|
|
5364
5427
|
}
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
5428
|
+
catch (_a) {
|
|
5429
|
+
return false;
|
|
5368
5430
|
}
|
|
5369
5431
|
}
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
toArrayAsync$1.toArrayAsync = void 0;
|
|
5375
|
-
const consume_1$3 = consume$1;
|
|
5376
|
-
function toArrayAsync(iterable) {
|
|
5377
|
-
return (0, consume_1$3.consume)(iterable, async (iterable) => {
|
|
5378
|
-
const result = [];
|
|
5379
|
-
for await (const element of iterable) {
|
|
5380
|
-
result.push(element);
|
|
5381
|
-
}
|
|
5382
|
-
return result;
|
|
5383
|
-
});
|
|
5432
|
+
json$1.isJsonable = isJsonable$1;
|
|
5433
|
+
function isntJsonable$1(val) {
|
|
5434
|
+
return !isntJsonable$1();
|
|
5384
5435
|
}
|
|
5385
|
-
|
|
5436
|
+
json$1.isntJsonable = isntJsonable$1;
|
|
5386
5437
|
|
|
5387
|
-
var
|
|
5438
|
+
var promise$1 = {};
|
|
5388
5439
|
|
|
5389
|
-
|
|
5390
|
-
const
|
|
5391
|
-
|
|
5392
|
-
|
|
5440
|
+
promise$1.isPromiseLike = promise$1.isntPromiseLike = promise$1.isntPromise = promise$1.isPromise = void 0;
|
|
5441
|
+
const object_1$2 = object$1;
|
|
5442
|
+
const function_1$3 = _function$1;
|
|
5443
|
+
function isPromise$3(val) {
|
|
5444
|
+
return val instanceof Promise;
|
|
5393
5445
|
}
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
toSetAsync$1.toSetAsync = void 0;
|
|
5399
|
-
const consume_1$1 = consume$1;
|
|
5400
|
-
function toSetAsync(iterable) {
|
|
5401
|
-
return (0, consume_1$1.consume)(iterable, async (iterable) => {
|
|
5402
|
-
const result = new Set();
|
|
5403
|
-
for await (const element of iterable) {
|
|
5404
|
-
result.add(element);
|
|
5405
|
-
}
|
|
5406
|
-
return result;
|
|
5407
|
-
});
|
|
5446
|
+
promise$1.isPromise = isPromise$3;
|
|
5447
|
+
function isntPromise$1(val) {
|
|
5448
|
+
return !isPromise$3(val);
|
|
5408
5449
|
}
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
toSet$1.toSet = void 0;
|
|
5414
|
-
const consume_1 = consume$1;
|
|
5415
|
-
function toSet(iterable) {
|
|
5416
|
-
return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
|
|
5450
|
+
promise$1.isntPromise = isntPromise$1;
|
|
5451
|
+
function isntPromiseLike$1(val) {
|
|
5452
|
+
return !isPromiseLike$1(val);
|
|
5417
5453
|
}
|
|
5418
|
-
|
|
5454
|
+
promise$1.isntPromiseLike = isntPromiseLike$1;
|
|
5455
|
+
function isPromiseLike$1(val) {
|
|
5456
|
+
return (0, object_1$2.isObject)(val)
|
|
5457
|
+
&& (0, function_1$3.isFunction)(val.then);
|
|
5458
|
+
}
|
|
5459
|
+
promise$1.isPromiseLike = isPromiseLike$1;
|
|
5419
5460
|
|
|
5420
|
-
var
|
|
5461
|
+
var url$1 = {};
|
|
5421
5462
|
|
|
5422
|
-
|
|
5423
|
-
function
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5463
|
+
url$1.isAbsoluteURL = void 0;
|
|
5464
|
+
function isAbsoluteURL$1(str) {
|
|
5465
|
+
try {
|
|
5466
|
+
new URL(str);
|
|
5467
|
+
return true;
|
|
5468
|
+
}
|
|
5469
|
+
catch (_a) {
|
|
5470
|
+
return false;
|
|
5427
5471
|
}
|
|
5428
|
-
return count;
|
|
5429
5472
|
}
|
|
5430
|
-
|
|
5473
|
+
url$1.isAbsoluteURL = isAbsoluteURL$1;
|
|
5431
5474
|
|
|
5432
|
-
var
|
|
5475
|
+
var regexp = {};
|
|
5433
5476
|
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
for await (const _ of iterable) {
|
|
5438
|
-
count++;
|
|
5439
|
-
}
|
|
5440
|
-
return count;
|
|
5477
|
+
regexp.isntRegExp = regexp.isRegExp = void 0;
|
|
5478
|
+
function isRegExp(val) {
|
|
5479
|
+
return val instanceof RegExp;
|
|
5441
5480
|
}
|
|
5442
|
-
|
|
5481
|
+
regexp.isRegExp = isRegExp;
|
|
5482
|
+
function isntRegExp(val) {
|
|
5483
|
+
return !isRegExp(val);
|
|
5484
|
+
}
|
|
5485
|
+
regexp.isntRegExp = isntRegExp;
|
|
5443
5486
|
|
|
5444
5487
|
(function (exports) {
|
|
5445
5488
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -5455,61 +5498,28 @@ countAsync$1.countAsync = countAsync;
|
|
|
5455
5498
|
}));
|
|
5456
5499
|
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
5457
5500
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5458
|
-
};__exportStar(
|
|
5459
|
-
__exportStar(
|
|
5460
|
-
__exportStar(
|
|
5461
|
-
__exportStar(
|
|
5462
|
-
__exportStar(
|
|
5463
|
-
__exportStar(
|
|
5464
|
-
__exportStar(
|
|
5465
|
-
__exportStar(
|
|
5466
|
-
__exportStar(
|
|
5467
|
-
__exportStar(
|
|
5468
|
-
__exportStar(
|
|
5469
|
-
__exportStar(
|
|
5470
|
-
__exportStar(
|
|
5471
|
-
__exportStar(
|
|
5472
|
-
__exportStar(
|
|
5473
|
-
__exportStar(
|
|
5474
|
-
__exportStar(
|
|
5475
|
-
__exportStar(
|
|
5476
|
-
__exportStar(
|
|
5477
|
-
__exportStar(
|
|
5478
|
-
__exportStar(toArray$3, exports);
|
|
5479
|
-
__exportStar(toSetAsync$1, exports);
|
|
5480
|
-
__exportStar(toSet$1, exports);
|
|
5481
|
-
__exportStar(count$3, exports);
|
|
5482
|
-
__exportStar(countAsync$1, exports);
|
|
5501
|
+
};__exportStar(array$1, exports);
|
|
5502
|
+
__exportStar(asyncIterable$1, exports);
|
|
5503
|
+
__exportStar(bigint$1, exports);
|
|
5504
|
+
__exportStar(boolean$1, exports);
|
|
5505
|
+
__exportStar(char$1, exports);
|
|
5506
|
+
__exportStar(date$1, exports);
|
|
5507
|
+
__exportStar(_enum$1, exports);
|
|
5508
|
+
__exportStar(error$1, exports);
|
|
5509
|
+
__exportStar(falsy$1, exports);
|
|
5510
|
+
__exportStar(_function$1, exports);
|
|
5511
|
+
__exportStar(iterable$1, exports);
|
|
5512
|
+
__exportStar(json$1, exports);
|
|
5513
|
+
__exportStar(_null$1, exports);
|
|
5514
|
+
__exportStar(number$1, exports);
|
|
5515
|
+
__exportStar(object$1, exports);
|
|
5516
|
+
__exportStar(promise$1, exports);
|
|
5517
|
+
__exportStar(string$1, exports);
|
|
5518
|
+
__exportStar(_undefined$1, exports);
|
|
5519
|
+
__exportStar(url$1, exports);
|
|
5520
|
+
__exportStar(regexp, exports);
|
|
5483
5521
|
|
|
5484
|
-
} (
|
|
5485
|
-
|
|
5486
|
-
var hasRequiredEs2018$1;
|
|
5487
|
-
|
|
5488
|
-
function requireEs2018$1 () {
|
|
5489
|
-
if (hasRequiredEs2018$1) return es2018$7;
|
|
5490
|
-
hasRequiredEs2018$1 = 1;
|
|
5491
|
-
(function (exports) {
|
|
5492
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5493
|
-
if (k2 === undefined) k2 = k;
|
|
5494
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5495
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5496
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
5497
|
-
}
|
|
5498
|
-
Object.defineProperty(o, k2, desc);
|
|
5499
|
-
}) : (function(o, m, k, k2) {
|
|
5500
|
-
if (k2 === undefined) k2 = k;
|
|
5501
|
-
o[k2] = m[k];
|
|
5502
|
-
}));
|
|
5503
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
5504
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5505
|
-
};__exportStar(requireMiddleware(), exports);
|
|
5506
|
-
__exportStar(output, exports);
|
|
5507
|
-
|
|
5508
|
-
} (es2018$7));
|
|
5509
|
-
return es2018$7;
|
|
5510
|
-
}
|
|
5511
|
-
|
|
5512
|
-
var getErrorNames$1 = {};
|
|
5522
|
+
} (es2018$5));
|
|
5513
5523
|
|
|
5514
5524
|
var traverseErrorPrototypeChain$1 = {};
|
|
5515
5525
|
|
|
@@ -5525,7 +5535,7 @@ function* traverseErrorPrototypeChain(err) {
|
|
|
5525
5535
|
traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = traverseErrorPrototypeChain;
|
|
5526
5536
|
|
|
5527
5537
|
getErrorNames$1.getErrorNames = void 0;
|
|
5528
|
-
const types_1$1 = es2018$
|
|
5538
|
+
const types_1$1 = es2018$5;
|
|
5529
5539
|
const traverse_error_prototype_chain_1 = traverseErrorPrototypeChain$1;
|
|
5530
5540
|
function* getErrorNames(err) {
|
|
5531
5541
|
var _a;
|
|
@@ -5546,7 +5556,7 @@ getErrorNames$1.getErrorNames = getErrorNames;
|
|
|
5546
5556
|
var serializableError = {};
|
|
5547
5557
|
|
|
5548
5558
|
serializableError.isSerializableError = void 0;
|
|
5549
|
-
const types_1 = es2018$
|
|
5559
|
+
const types_1 = es2018$5;
|
|
5550
5560
|
function isSerializableError(val) {
|
|
5551
5561
|
return (0, types_1.isObject)(val)
|
|
5552
5562
|
&& (0, types_1.isString)(val.name)
|
|
@@ -5564,7 +5574,7 @@ function requireCustomError () {
|
|
|
5564
5574
|
customError.CustomError = void 0;
|
|
5565
5575
|
const iterable_operator_1 = requireEs2018$1();
|
|
5566
5576
|
const get_error_names_1 = getErrorNames$1;
|
|
5567
|
-
const types_1 = es2018$
|
|
5577
|
+
const types_1 = es2018$5;
|
|
5568
5578
|
const serializable_error_1 = serializableError;
|
|
5569
5579
|
class CustomError extends Error {
|
|
5570
5580
|
get name() {
|
|
@@ -5703,7 +5713,7 @@ assert.assert = void 0;
|
|
|
5703
5713
|
var hasRequiredEs2018;
|
|
5704
5714
|
|
|
5705
5715
|
function requireEs2018 () {
|
|
5706
|
-
if (hasRequiredEs2018) return es2018$
|
|
5716
|
+
if (hasRequiredEs2018) return es2018$9;
|
|
5707
5717
|
hasRequiredEs2018 = 1;
|
|
5708
5718
|
(function (exports) {
|
|
5709
5719
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -5728,69 +5738,106 @@ function requireEs2018 () {
|
|
|
5728
5738
|
__exportStar(getErrorNames$1, exports);
|
|
5729
5739
|
__exportStar(traverseErrorPrototypeChain$1, exports);
|
|
5730
5740
|
|
|
5731
|
-
} (es2018$
|
|
5732
|
-
return es2018$
|
|
5741
|
+
} (es2018$9));
|
|
5742
|
+
return es2018$9;
|
|
5733
5743
|
}
|
|
5734
5744
|
|
|
5735
5745
|
var es2018Exports$1 = requireEs2018();
|
|
5736
5746
|
|
|
5737
|
-
function
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5747
|
+
function useIIFE(iife, deps) {
|
|
5748
|
+
const oldDeps = react.exports.useRef([]);
|
|
5749
|
+
const isFirstRender = useIsFirstRender();
|
|
5750
|
+
if (isFirstRender()) {
|
|
5751
|
+
iife();
|
|
5752
|
+
}
|
|
5753
|
+
else {
|
|
5754
|
+
if (deps.length === oldDeps.current.length) {
|
|
5755
|
+
if (deps.some((x, i) => x !== oldDeps.current[i])) {
|
|
5756
|
+
iife();
|
|
5757
|
+
}
|
|
5758
|
+
}
|
|
5759
|
+
else {
|
|
5760
|
+
iife();
|
|
5761
|
+
}
|
|
5741
5762
|
}
|
|
5763
|
+
oldDeps.current = Array.from(deps);
|
|
5764
|
+
}
|
|
5765
|
+
|
|
5766
|
+
function useSingleSelection(options, defaultSelectedIndex) {
|
|
5767
|
+
useIIFE(() => {
|
|
5768
|
+
es2018Exports$1.assert(defaultSelectedIndex >= 0 && defaultSelectedIndex < options.length, 'The parameter defaultSelectedIndex must be in the range of 0 to values.length');
|
|
5769
|
+
}, [defaultSelectedIndex]);
|
|
5742
5770
|
const [selectedIndex, setSelectedIndex] = react.exports.useState(defaultSelectedIndex);
|
|
5743
|
-
return
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5771
|
+
return {
|
|
5772
|
+
selectedIndex,
|
|
5773
|
+
optionStates: react.exports.useMemo(createOptionStates, [options, selectedIndex]),
|
|
5774
|
+
select: react.exports.useCallback(select, [])
|
|
5775
|
+
};
|
|
5776
|
+
function createOptionStates() {
|
|
5777
|
+
return options.map((_, index) => ({
|
|
5778
|
+
selected: index === selectedIndex
|
|
5779
|
+
}));
|
|
5780
|
+
}
|
|
5781
|
+
function select(index) {
|
|
5782
|
+
setSelectedIndex(index);
|
|
5783
|
+
}
|
|
5752
5784
|
}
|
|
5753
5785
|
|
|
5754
5786
|
var es2018Exports = requireEs2018$1();
|
|
5755
5787
|
|
|
5756
|
-
function useMultipleSelection(
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5788
|
+
function useMultipleSelection(options, defaultSelectedIndexes = []) {
|
|
5789
|
+
useIIFE(() => {
|
|
5790
|
+
for (const index of defaultSelectedIndexes) {
|
|
5791
|
+
es2018Exports$1.assert(index >= 0 && index < options.length, 'The index of parameter defaultSelectedIndexes must be in the range of 0 to values.length');
|
|
5792
|
+
}
|
|
5793
|
+
}, [defaultSelectedIndexes]);
|
|
5761
5794
|
const [selectedIndexes, setSelectedIndexes] = react.exports.useState(new Set(defaultSelectedIndexes));
|
|
5762
|
-
return
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
const
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
}
|
|
5785
|
-
}
|
|
5795
|
+
return {
|
|
5796
|
+
selectedIndexes: react.exports.useMemo(() => es2018Exports.toArray(selectedIndexes), [selectedIndexes]),
|
|
5797
|
+
optionStates: react.exports.useMemo(createOptionStates, [options, selectedIndexes]),
|
|
5798
|
+
toggle: react.exports.useCallback(toggle, []),
|
|
5799
|
+
select: react.exports.useCallback(select, []),
|
|
5800
|
+
unselect: react.exports.useCallback(unselect, [])
|
|
5801
|
+
};
|
|
5802
|
+
function createOptionStates() {
|
|
5803
|
+
return options.map((_, index) => {
|
|
5804
|
+
const selected = isSelected(index);
|
|
5805
|
+
return { selected };
|
|
5806
|
+
});
|
|
5807
|
+
}
|
|
5808
|
+
function isSelected(index) {
|
|
5809
|
+
return selectedIndexes.has(index);
|
|
5810
|
+
}
|
|
5811
|
+
function toggle(index) {
|
|
5812
|
+
if (isSelected(index)) {
|
|
5813
|
+
unselect(index);
|
|
5814
|
+
}
|
|
5815
|
+
else {
|
|
5816
|
+
select(index);
|
|
5817
|
+
}
|
|
5818
|
+
}
|
|
5819
|
+
function select(index) {
|
|
5820
|
+
setSelectedIndexes(selectedIndexes => {
|
|
5821
|
+
const result = new Set(selectedIndexes);
|
|
5822
|
+
result.add(index);
|
|
5823
|
+
return result;
|
|
5824
|
+
});
|
|
5825
|
+
}
|
|
5826
|
+
function unselect(index) {
|
|
5827
|
+
setSelectedIndexes(selectedIndexes => {
|
|
5828
|
+
const result = new Set(selectedIndexes);
|
|
5829
|
+
result.delete(index);
|
|
5830
|
+
return result;
|
|
5831
|
+
});
|
|
5832
|
+
}
|
|
5786
5833
|
}
|
|
5787
5834
|
|
|
5788
|
-
function useStateCycle(
|
|
5835
|
+
function useStateCycle(orderedStates, initialStateIndex = 0) {
|
|
5789
5836
|
const [index, setIndex] = react.exports.useState(initialStateIndex);
|
|
5790
|
-
return [
|
|
5837
|
+
return [orderedStates[index], react.exports.useCallback(next, [orderedStates])];
|
|
5791
5838
|
function next() {
|
|
5792
5839
|
setIndex(index => {
|
|
5793
|
-
if (index + 1 <
|
|
5840
|
+
if (index + 1 < orderedStates.length) {
|
|
5794
5841
|
return index + 1;
|
|
5795
5842
|
}
|
|
5796
5843
|
else {
|
|
@@ -5802,7 +5849,7 @@ function useStateCycle(stateList, initialStateIndex = 0) {
|
|
|
5802
5849
|
|
|
5803
5850
|
function useToggle(initialState = false) {
|
|
5804
5851
|
const [state, setState] = react.exports.useState(initialState);
|
|
5805
|
-
return [state, toggle];
|
|
5852
|
+
return [state, react.exports.useCallback(toggle, [])];
|
|
5806
5853
|
function toggle() {
|
|
5807
5854
|
setState(state => !state);
|
|
5808
5855
|
}
|
|
@@ -5814,7 +5861,7 @@ function useResizeObserver(callback, refs) {
|
|
|
5814
5861
|
const observer = new ResizeObserver(callback);
|
|
5815
5862
|
refs
|
|
5816
5863
|
.map(x => x.current)
|
|
5817
|
-
.filter(es2018$
|
|
5864
|
+
.filter(es2018$5.isntNull)
|
|
5818
5865
|
.forEach(x => observer.observe(x));
|
|
5819
5866
|
return () => observer.disconnect();
|
|
5820
5867
|
}, deps);
|
|
@@ -5822,7 +5869,7 @@ function useResizeObserver(callback, refs) {
|
|
|
5822
5869
|
|
|
5823
5870
|
function useStep(steps, initialStepIndex = 0) {
|
|
5824
5871
|
const [index, setIndex] = react.exports.useState(initialStepIndex);
|
|
5825
|
-
return [steps[index], next, previous];
|
|
5872
|
+
return [steps[index], react.exports.useCallback(next, [steps]), react.exports.useCallback(previous, [])];
|
|
5826
5873
|
function next() {
|
|
5827
5874
|
setIndex(index => {
|
|
5828
5875
|
if (index === steps.length - 1) {
|
|
@@ -5847,7 +5894,10 @@ function useStep(steps, initialStepIndex = 0) {
|
|
|
5847
5894
|
|
|
5848
5895
|
function useForceUpdate() {
|
|
5849
5896
|
const [, setState] = react.exports.useState({});
|
|
5850
|
-
return (
|
|
5897
|
+
return react.exports.useCallback(forceUpdate, []);
|
|
5898
|
+
function forceUpdate() {
|
|
5899
|
+
setState({});
|
|
5900
|
+
}
|
|
5851
5901
|
}
|
|
5852
5902
|
|
|
5853
5903
|
var es2018$3 = {};
|
|
@@ -14411,7 +14461,7 @@ exports.BadEventError = exports.ObservableFiniteStateMachine = void 0;
|
|
|
14411
14461
|
|
|
14412
14462
|
function useFiniteStateMachine(schema, initialState) {
|
|
14413
14463
|
const forceUpdate = useForceUpdate();
|
|
14414
|
-
const fsm = react.exports.useMemo(() => new es2018$3.ObservableFiniteStateMachine(schema, initialState), [schema]);
|
|
14464
|
+
const fsm = react.exports.useMemo(() => new es2018$3.ObservableFiniteStateMachine(schema, initialState), [schema, initialState]);
|
|
14415
14465
|
react.exports.useEffect(() => {
|
|
14416
14466
|
const observable = fsm.observeStateChanges();
|
|
14417
14467
|
const subscription = observable.subscribe(() => forceUpdate());
|
|
@@ -14421,5 +14471,5 @@ function useFiniteStateMachine(schema, initialState) {
|
|
|
14421
14471
|
}
|
|
14422
14472
|
|
|
14423
14473
|
var ObservableFiniteStateMachine = es2018$3.ObservableFiniteStateMachine;
|
|
14424
|
-
export { ObservableFiniteStateMachine, useFiniteStateMachine, useForceUpdate, useIncrement, useIsFirstRender, useIsMounted, useMount, useMultipleSelection, useRenderCounter, useResizeObserver, useSingleSelection, useStateCycle, useStep, useToggle, useUpdateEffect };
|
|
14474
|
+
export { ObservableFiniteStateMachine, useFiniteStateMachine, useForceUpdate, useIIFE, useIncrement, useIsFirstRender, useIsMounted, useMount, useMultipleSelection, useRenderCounter, useResizeObserver, useSingleSelection, useStateCycle, useStep, useToggle, useUnmount, useUpdateEffect };
|
|
14425
14475
|
//# sourceMappingURL=index.mjs.map
|