@blackglory/structures 0.2.7 → 0.3.2

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.
Files changed (37) hide show
  1. package/README.md +41 -0
  2. package/dist/es2015/index.min.mjs +1 -1
  3. package/dist/es2015/index.min.mjs.map +1 -1
  4. package/dist/es2015/index.mjs +1532 -310
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +1534 -309
  7. package/dist/es2015/index.umd.js.map +1 -1
  8. package/dist/es2015/index.umd.min.js +1 -1
  9. package/dist/es2015/index.umd.min.js.map +1 -1
  10. package/dist/es2018/index.min.mjs +1 -1
  11. package/dist/es2018/index.min.mjs.map +1 -1
  12. package/dist/es2018/index.mjs +1532 -310
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +1534 -309
  15. package/dist/es2018/index.umd.js.map +1 -1
  16. package/dist/es2018/index.umd.min.js +1 -1
  17. package/dist/es2018/index.umd.min.js.map +1 -1
  18. package/lib/es2015/finite-state-machine.d.ts +13 -0
  19. package/lib/es2015/finite-state-machine.js +46 -0
  20. package/lib/es2015/finite-state-machine.js.map +1 -0
  21. package/lib/es2015/index.d.ts +2 -0
  22. package/lib/es2015/index.js +2 -0
  23. package/lib/es2015/index.js.map +1 -1
  24. package/lib/es2015/observable-finite-state-machine.d.ts +13 -0
  25. package/lib/es2015/observable-finite-state-machine.js +28 -0
  26. package/lib/es2015/observable-finite-state-machine.js.map +1 -0
  27. package/lib/es2018/finite-state-machine.d.ts +13 -0
  28. package/lib/es2018/finite-state-machine.js +46 -0
  29. package/lib/es2018/finite-state-machine.js.map +1 -0
  30. package/lib/es2018/index.d.ts +2 -0
  31. package/lib/es2018/index.js +2 -0
  32. package/lib/es2018/index.js.map +1 -1
  33. package/lib/es2018/observable-finite-state-machine.d.ts +13 -0
  34. package/lib/es2018/observable-finite-state-machine.js +28 -0
  35. package/lib/es2018/observable-finite-state-machine.js.map +1 -0
  36. package/package.json +20 -17
  37. package/CHANGELOG.md +0 -148
@@ -18,6 +18,61 @@
18
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+
23
+ var extendStatics = function(d, b) {
24
+ extendStatics = Object.setPrototypeOf ||
25
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
27
+ return extendStatics(d, b);
28
+ };
29
+
30
+ function __extends(d, b) {
31
+ if (typeof b !== "function" && b !== null)
32
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33
+ extendStatics(d, b);
34
+ function __() { this.constructor = d; }
35
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
+ }
37
+
38
+ function __values(o) {
39
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
40
+ if (m) return m.call(o);
41
+ if (o && typeof o.length === "number") return {
42
+ next: function () {
43
+ if (o && i >= o.length) o = void 0;
44
+ return { value: o && o[i++], done: !o };
45
+ }
46
+ };
47
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
48
+ }
49
+
50
+ function __read(o, n) {
51
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
52
+ if (!m) return o;
53
+ var i = m.call(o), r, ar = [], e;
54
+ try {
55
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
56
+ }
57
+ catch (error) { e = { error: error }; }
58
+ finally {
59
+ try {
60
+ if (r && !r.done && (m = i["return"])) m.call(i);
61
+ }
62
+ finally { if (e) throw e.error; }
63
+ }
64
+ return ar;
65
+ }
66
+
67
+ function __spreadArray(to, from, pack) {
68
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
69
+ if (ar || !(i in from)) {
70
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
71
+ ar[i] = from[i];
72
+ }
73
+ }
74
+ return to.concat(ar || Array.prototype.slice.call(from));
75
+ }
21
76
 
22
77
  function __classPrivateFieldGet(receiver, state, kind, f) {
23
78
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
@@ -184,7 +239,7 @@
184
239
 
185
240
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
186
241
 
187
- var es2018$5 = {};
242
+ var es2018$6 = {};
188
243
 
189
244
  var customError = {};
190
245
 
@@ -262,15 +317,15 @@
262
317
  __exportStar(refute$1, exports);
263
318
  __exportStar(assert$1, exports);
264
319
 
265
- }(es2018$5));
320
+ }(es2018$6));
266
321
 
267
- var es2018$4 = {};
322
+ var es2018$5 = {};
268
323
 
269
324
  var middleware = {};
270
325
 
271
326
  var chunkAsync$1 = {};
272
327
 
273
- var es2018$3 = {};
328
+ var es2018$4 = {};
274
329
 
275
330
  var go$1 = {};
276
331
 
@@ -292,11 +347,11 @@
292
347
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
293
348
  };__exportStar(go$1, exports);
294
349
 
295
- }(es2018$3));
350
+ }(es2018$4));
296
351
 
297
352
  chunkAsync$1.chunkAsync = void 0;
298
- const go_1$f = es2018$3;
299
- const errors_1$f = es2018$5;
353
+ const go_1$f = es2018$4;
354
+ const errors_1$f = es2018$6;
300
355
  function chunkAsync(iterable, size) {
301
356
  (0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
302
357
  (0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
@@ -317,297 +372,297 @@
317
372
 
318
373
  var chunkByAsync$1 = {};
319
374
 
320
- var es2018$2 = {};
375
+ var es2018$3 = {};
321
376
 
322
- var array = {};
377
+ var array$1 = {};
323
378
 
324
- array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
325
- function isArray(val) {
379
+ array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
380
+ function isArray$1(val) {
326
381
  return Array.isArray(val);
327
382
  }
328
- array.isArray = isArray;
329
- function isntArray(val) {
330
- return !isArray(val);
383
+ array$1.isArray = isArray$1;
384
+ function isntArray$1(val) {
385
+ return !isArray$1(val);
331
386
  }
332
- array.isntArray = isntArray;
333
- function isEmptyArray(val) {
387
+ array$1.isntArray = isntArray$1;
388
+ function isEmptyArray$1(val) {
334
389
  return val.length === 0;
335
390
  }
336
- array.isEmptyArray = isEmptyArray;
337
- function isntEmptyArray(val) {
391
+ array$1.isEmptyArray = isEmptyArray$1;
392
+ function isntEmptyArray$1(val) {
338
393
  return val.length !== 0;
339
394
  }
340
- array.isntEmptyArray = isntEmptyArray;
395
+ array$1.isntEmptyArray = isntEmptyArray$1;
341
396
 
342
- var asyncIterable = {};
397
+ var asyncIterable$1 = {};
343
398
 
344
- var _null = {};
399
+ var _null$1 = {};
345
400
 
346
- _null.isntNull = _null.isNull = void 0;
347
- function isNull(val) {
401
+ _null$1.isntNull = _null$1.isNull = void 0;
402
+ function isNull$1(val) {
348
403
  return val === null;
349
404
  }
350
- _null.isNull = isNull;
351
- function isntNull(val) {
352
- return !isNull(val);
405
+ _null$1.isNull = isNull$1;
406
+ function isntNull$1(val) {
407
+ return !isNull$1(val);
353
408
  }
354
- _null.isntNull = isntNull;
409
+ _null$1.isntNull = isntNull$1;
355
410
 
356
- var _undefined = {};
411
+ var _undefined$1 = {};
357
412
 
358
- _undefined.isntUndefined = _undefined.isUndefined = void 0;
359
- function isUndefined(val) {
413
+ _undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
414
+ function isUndefined$1(val) {
360
415
  return val === undefined;
361
416
  }
362
- _undefined.isUndefined = isUndefined;
363
- function isntUndefined(val) {
364
- return !isUndefined(val);
417
+ _undefined$1.isUndefined = isUndefined$1;
418
+ function isntUndefined$1(val) {
419
+ return !isUndefined$1(val);
365
420
  }
366
- _undefined.isntUndefined = isntUndefined;
421
+ _undefined$1.isntUndefined = isntUndefined$1;
367
422
 
368
- asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
369
- const null_1$1 = _null;
370
- const undefined_1$2 = _undefined;
371
- function isAsyncIterable(val) {
372
- return (0, null_1$1.isntNull)(val)
373
- && (0, undefined_1$2.isntUndefined)(val)
423
+ asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
424
+ const null_1$3 = _null$1;
425
+ const undefined_1$5 = _undefined$1;
426
+ function isAsyncIterable$1(val) {
427
+ return (0, null_1$3.isntNull)(val)
428
+ && (0, undefined_1$5.isntUndefined)(val)
374
429
  && typeof val[Symbol.asyncIterator] === 'function';
375
430
  }
376
- asyncIterable.isAsyncIterable = isAsyncIterable;
377
- function isntAsyncIterable(val) {
378
- return !isAsyncIterable(val);
431
+ asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
432
+ function isntAsyncIterable$1(val) {
433
+ return !isAsyncIterable$1(val);
379
434
  }
380
- asyncIterable.isntAsyncIterable = isntAsyncIterable;
435
+ asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
381
436
 
382
- var bigint = {};
437
+ var bigint$1 = {};
383
438
 
384
- bigint.isntBigInt = bigint.isBigInt = void 0;
385
- function isBigInt(val) {
439
+ bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
440
+ function isBigInt$1(val) {
386
441
  return typeof val === 'bigint';
387
442
  }
388
- bigint.isBigInt = isBigInt;
389
- function isntBigInt(val) {
390
- return !isBigInt(val);
443
+ bigint$1.isBigInt = isBigInt$1;
444
+ function isntBigInt$1(val) {
445
+ return !isBigInt$1(val);
391
446
  }
392
- bigint.isntBigInt = isntBigInt;
447
+ bigint$1.isntBigInt = isntBigInt$1;
393
448
 
394
- var boolean = {};
449
+ var boolean$1 = {};
395
450
 
396
- boolean.isntBoolean = boolean.isBoolean = void 0;
397
- function isBoolean(val) {
451
+ boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
452
+ function isBoolean$1(val) {
398
453
  return typeof val === 'boolean';
399
454
  }
400
- boolean.isBoolean = isBoolean;
401
- function isntBoolean(val) {
402
- return !isBoolean(val);
455
+ boolean$1.isBoolean = isBoolean$1;
456
+ function isntBoolean$1(val) {
457
+ return !isBoolean$1(val);
403
458
  }
404
- boolean.isntBoolean = isntBoolean;
459
+ boolean$1.isntBoolean = isntBoolean$1;
405
460
 
406
- var char = {};
461
+ var char$1 = {};
407
462
 
408
- var string = {};
463
+ var string$1 = {};
409
464
 
410
- string.isntString = string.isString = void 0;
411
- function isString(val) {
465
+ string$1.isntString = string$1.isString = void 0;
466
+ function isString$1(val) {
412
467
  return typeof val === 'string';
413
468
  }
414
- string.isString = isString;
415
- function isntString(val) {
416
- return !isString(val);
469
+ string$1.isString = isString$1;
470
+ function isntString$1(val) {
471
+ return !isString$1(val);
417
472
  }
418
- string.isntString = isntString;
473
+ string$1.isntString = isntString$1;
419
474
 
420
- char.isntChar = char.isChar = void 0;
421
- const string_1$1 = string;
422
- function isChar(val) {
423
- return (0, string_1$1.isString)(val)
475
+ char$1.isntChar = char$1.isChar = void 0;
476
+ const string_1$3 = string$1;
477
+ function isChar$1(val) {
478
+ return (0, string_1$3.isString)(val)
424
479
  && val.length === 1;
425
480
  }
426
- char.isChar = isChar;
427
- function isntChar(val) {
428
- return !isChar(val);
481
+ char$1.isChar = isChar$1;
482
+ function isntChar$1(val) {
483
+ return !isChar$1(val);
429
484
  }
430
- char.isntChar = isntChar;
485
+ char$1.isntChar = isntChar$1;
431
486
 
432
- var date = {};
487
+ var date$1 = {};
433
488
 
434
- date.isntDate = date.isDate = void 0;
435
- function isDate(val) {
489
+ date$1.isntDate = date$1.isDate = void 0;
490
+ function isDate$1(val) {
436
491
  return val instanceof Date;
437
492
  }
438
- date.isDate = isDate;
439
- function isntDate(val) {
440
- return !isDate(val);
493
+ date$1.isDate = isDate$1;
494
+ function isntDate$1(val) {
495
+ return !isDate$1(val);
441
496
  }
442
- date.isntDate = isntDate;
497
+ date$1.isntDate = isntDate$1;
443
498
 
444
- var _enum = {};
499
+ var _enum$1 = {};
445
500
 
446
- _enum.inEnum = void 0;
447
- function inEnum(val, _enum) {
501
+ _enum$1.inEnum = void 0;
502
+ function inEnum$1(val, _enum) {
448
503
  return Object.values(_enum).includes(val);
449
504
  }
450
- _enum.inEnum = inEnum;
505
+ _enum$1.inEnum = inEnum$1;
451
506
 
452
- var error = {};
507
+ var error$1 = {};
453
508
 
454
- error.isntError = error.isError = void 0;
455
- function isError(val) {
509
+ error$1.isntError = error$1.isError = void 0;
510
+ function isError$1(val) {
456
511
  return val instanceof Error;
457
512
  }
458
- error.isError = isError;
459
- function isntError(val) {
460
- return !isError(val);
513
+ error$1.isError = isError$1;
514
+ function isntError$1(val) {
515
+ return !isError$1(val);
461
516
  }
462
- error.isntError = isntError;
517
+ error$1.isntError = isntError$1;
463
518
 
464
- var falsy = {};
519
+ var falsy$1 = {};
465
520
 
466
- falsy.isntFalsy = falsy.isFalsy = void 0;
467
- function isFalsy(val) {
521
+ falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
522
+ function isFalsy$1(val) {
468
523
  return !val;
469
524
  }
470
- falsy.isFalsy = isFalsy;
471
- function isntFalsy(val) {
472
- return !isFalsy(val);
525
+ falsy$1.isFalsy = isFalsy$1;
526
+ function isntFalsy$1(val) {
527
+ return !isFalsy$1(val);
473
528
  }
474
- falsy.isntFalsy = isntFalsy;
529
+ falsy$1.isntFalsy = isntFalsy$1;
475
530
 
476
- var _function = {};
531
+ var _function$1 = {};
477
532
 
478
- _function.isntFunction = _function.isFunction = void 0;
479
- function isFunction(val) {
533
+ _function$1.isntFunction = _function$1.isFunction = void 0;
534
+ function isFunction$2(val) {
480
535
  return typeof val === 'function';
481
536
  }
482
- _function.isFunction = isFunction;
483
- function isntFunction(val) {
484
- return !isFunction(val);
537
+ _function$1.isFunction = isFunction$2;
538
+ function isntFunction$1(val) {
539
+ return !isFunction$2(val);
485
540
  }
486
- _function.isntFunction = isntFunction;
541
+ _function$1.isntFunction = isntFunction$1;
487
542
 
488
- var iterable = {};
543
+ var iterable$1 = {};
489
544
 
490
- iterable.isntIterable = iterable.isIterable = void 0;
491
- const null_1 = _null;
492
- const undefined_1$1 = _undefined;
493
- function isIterable(val) {
494
- return (0, null_1.isntNull)(val)
495
- && (0, undefined_1$1.isntUndefined)(val)
545
+ iterable$1.isntIterable = iterable$1.isIterable = void 0;
546
+ const null_1$2 = _null$1;
547
+ const undefined_1$4 = _undefined$1;
548
+ function isIterable$1(val) {
549
+ return (0, null_1$2.isntNull)(val)
550
+ && (0, undefined_1$4.isntUndefined)(val)
496
551
  && typeof val[Symbol.iterator] === 'function';
497
552
  }
498
- iterable.isIterable = isIterable;
499
- function isntIterable(val) {
500
- return !isIterable(val);
553
+ iterable$1.isIterable = isIterable$1;
554
+ function isntIterable$1(val) {
555
+ return !isIterable$1(val);
501
556
  }
502
- iterable.isntIterable = isntIterable;
557
+ iterable$1.isntIterable = isntIterable$1;
503
558
 
504
- var jsonRpc = {};
559
+ var jsonRpc$1 = {};
505
560
 
506
- var object = {};
561
+ var object$1 = {};
507
562
 
508
- object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
509
- function isObject(val) {
563
+ object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isRecord = object$1.isntObject = object$1.isObject = void 0;
564
+ function isObject$1(val) {
510
565
  return val !== null && typeof val === 'object';
511
566
  }
512
- object.isObject = isObject;
513
- function isntObject(val) {
514
- return !isObject(val);
567
+ object$1.isObject = isObject$1;
568
+ function isntObject$1(val) {
569
+ return !isObject$1(val);
515
570
  }
516
- object.isntObject = isntObject;
571
+ object$1.isntObject = isntObject$1;
517
572
  function isRecord(val) {
518
- return isObject(val);
573
+ return isObject$1(val);
519
574
  }
520
- object.isRecord = isRecord;
521
- function isEmptyObject(val) {
575
+ object$1.isRecord = isRecord;
576
+ function isEmptyObject$1(val) {
522
577
  return Object.keys(val).length === 0;
523
578
  }
524
- object.isEmptyObject = isEmptyObject;
525
- function isntEmptyObject(val) {
579
+ object$1.isEmptyObject = isEmptyObject$1;
580
+ function isntEmptyObject$1(val) {
526
581
  return Object.keys(val).length !== 0;
527
582
  }
528
- object.isntEmptyObject = isntEmptyObject;
583
+ object$1.isntEmptyObject = isntEmptyObject$1;
529
584
 
530
- var number = {};
585
+ var number$1 = {};
531
586
 
532
- number.isntNumber = number.isNumber = void 0;
533
- function isNumber(val) {
587
+ number$1.isntNumber = number$1.isNumber = void 0;
588
+ function isNumber$1(val) {
534
589
  return typeof val === 'number';
535
590
  }
536
- number.isNumber = isNumber;
537
- function isntNumber(val) {
538
- return !isNumber(val);
539
- }
540
- number.isntNumber = isntNumber;
541
-
542
- jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
543
- const array_1 = array;
544
- const object_1 = object;
545
- const string_1 = string;
546
- const number_1 = number;
547
- const undefined_1 = _undefined;
548
- function isJsonRpcId(val) {
549
- return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
550
- }
551
- function isJsonRpcParams(val) {
552
- return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
553
- }
554
- function isJsonRpcNotification(val) {
555
- return (0, object_1.isRecord)(val)
556
- && (0, string_1.isString)(val.jsonrpc)
557
- && (0, string_1.isString)(val.method)
558
- && (0, undefined_1.isUndefined)(val.id)
559
- && isJsonRpcParams(val.params);
560
- }
561
- jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
562
- function isntJsonRpcNotification(val) {
563
- return !isJsonRpcNotification(val);
564
- }
565
- jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
566
- function isJsonRpcRequest(val) {
567
- return (0, object_1.isRecord)(val)
568
- && (0, string_1.isString)(val.jsonrpc)
569
- && (0, string_1.isString)(val.method)
570
- && isJsonRpcId(val.id)
571
- && isJsonRpcParams(val.params);
572
- }
573
- jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
574
- function isntJsonRpcRequest(val) {
575
- return !isJsonRpcRequest(val);
576
- }
577
- jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
578
- function isJsonRpcSuccess(val) {
579
- return (0, object_1.isRecord)(val)
580
- && (0, string_1.isString)(val.jsonrpc)
581
- && (0, string_1.isString)(val.id)
582
- && (0, undefined_1.isntUndefined)(val.result);
583
- }
584
- jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
585
- function isntJsonRpcSuccess(val) {
586
- return !isJsonRpcSuccess(val);
587
- }
588
- jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
589
- function isJsonRpcError(val) {
590
- return (0, object_1.isRecord)(val)
591
- && (0, string_1.isString)(val.jsonrpc)
592
- && isJsonRpcId(val.id)
593
- && isJsonRpcErrorObject(val.error);
594
- }
595
- jsonRpc.isJsonRpcError = isJsonRpcError;
596
- function isntJsonRpcError(val) {
597
- return !isJsonRpcError(val);
598
- }
599
- jsonRpc.isntJsonRpcError = isntJsonRpcError;
600
- function isJsonRpcErrorObject(val) {
601
- return (0, object_1.isRecord)(val)
602
- && (0, number_1.isNumber)(val.code)
603
- && (0, string_1.isString)(val.message)
604
- && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
605
- }
606
-
607
- var json = {};
608
-
609
- json.isntJson = json.isJson = void 0;
610
- function isJson(val) {
591
+ number$1.isNumber = isNumber$1;
592
+ function isntNumber$1(val) {
593
+ return !isNumber$1(val);
594
+ }
595
+ number$1.isntNumber = isntNumber$1;
596
+
597
+ jsonRpc$1.isntJsonRpcError = jsonRpc$1.isJsonRpcError = jsonRpc$1.isntJsonRpcSuccess = jsonRpc$1.isJsonRpcSuccess = jsonRpc$1.isntJsonRpcRequest = jsonRpc$1.isJsonRpcRequest = jsonRpc$1.isntJsonRpcNotification = jsonRpc$1.isJsonRpcNotification = void 0;
598
+ const array_1$1 = array$1;
599
+ const object_1$1 = object$1;
600
+ const string_1$2 = string$1;
601
+ const number_1$1 = number$1;
602
+ const undefined_1$3 = _undefined$1;
603
+ function isJsonRpcId$1(val) {
604
+ return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
605
+ }
606
+ function isJsonRpcParams$1(val) {
607
+ return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
608
+ }
609
+ function isJsonRpcNotification$1(val) {
610
+ return (0, object_1$1.isRecord)(val)
611
+ && (0, string_1$2.isString)(val.jsonrpc)
612
+ && (0, string_1$2.isString)(val.method)
613
+ && (0, undefined_1$3.isUndefined)(val.id)
614
+ && isJsonRpcParams$1(val.params);
615
+ }
616
+ jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
617
+ function isntJsonRpcNotification$1(val) {
618
+ return !isJsonRpcNotification$1(val);
619
+ }
620
+ jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
621
+ function isJsonRpcRequest$1(val) {
622
+ return (0, object_1$1.isRecord)(val)
623
+ && (0, string_1$2.isString)(val.jsonrpc)
624
+ && (0, string_1$2.isString)(val.method)
625
+ && isJsonRpcId$1(val.id)
626
+ && isJsonRpcParams$1(val.params);
627
+ }
628
+ jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
629
+ function isntJsonRpcRequest$1(val) {
630
+ return !isJsonRpcRequest$1(val);
631
+ }
632
+ jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
633
+ function isJsonRpcSuccess$1(val) {
634
+ return (0, object_1$1.isRecord)(val)
635
+ && (0, string_1$2.isString)(val.jsonrpc)
636
+ && (0, string_1$2.isString)(val.id)
637
+ && (0, undefined_1$3.isntUndefined)(val.result);
638
+ }
639
+ jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
640
+ function isntJsonRpcSuccess$1(val) {
641
+ return !isJsonRpcSuccess$1(val);
642
+ }
643
+ jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
644
+ function isJsonRpcError$1(val) {
645
+ return (0, object_1$1.isRecord)(val)
646
+ && (0, string_1$2.isString)(val.jsonrpc)
647
+ && isJsonRpcId$1(val.id)
648
+ && isJsonRpcErrorObject$1(val.error);
649
+ }
650
+ jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
651
+ function isntJsonRpcError$1(val) {
652
+ return !isJsonRpcError$1(val);
653
+ }
654
+ jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
655
+ function isJsonRpcErrorObject$1(val) {
656
+ return (0, object_1$1.isRecord)(val)
657
+ && (0, number_1$1.isNumber)(val.code)
658
+ && (0, string_1$2.isString)(val.message)
659
+ && ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
660
+ }
661
+
662
+ var json$1 = {};
663
+
664
+ json$1.isntJson = json$1.isJson = void 0;
665
+ function isJson$1(val) {
611
666
  try {
612
667
  JSON.stringify(val);
613
668
  return true;
@@ -616,16 +671,16 @@
616
671
  return false;
617
672
  }
618
673
  }
619
- json.isJson = isJson;
620
- function isntJson(val) {
621
- return !isntJson();
674
+ json$1.isJson = isJson$1;
675
+ function isntJson$1(val) {
676
+ return !isntJson$1();
622
677
  }
623
- json.isntJson = isntJson;
678
+ json$1.isntJson = isntJson$1;
624
679
 
625
- var url = {};
680
+ var url$1 = {};
626
681
 
627
- url.isAbsoluteURL = void 0;
628
- function isAbsoluteURL(str) {
682
+ url$1.isAbsoluteURL = void 0;
683
+ function isAbsoluteURL$1(str) {
629
684
  try {
630
685
  new URL(str);
631
686
  return true;
@@ -634,7 +689,7 @@
634
689
  return false;
635
690
  }
636
691
  }
637
- url.isAbsoluteURL = isAbsoluteURL;
692
+ url$1.isAbsoluteURL = isAbsoluteURL$1;
638
693
 
639
694
  (function (exports) {
640
695
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -646,30 +701,30 @@
646
701
  }));
647
702
  var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
648
703
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
649
- };__exportStar(array, exports);
650
- __exportStar(asyncIterable, exports);
651
- __exportStar(bigint, exports);
652
- __exportStar(boolean, exports);
653
- __exportStar(char, exports);
654
- __exportStar(date, exports);
655
- __exportStar(_enum, exports);
656
- __exportStar(error, exports);
657
- __exportStar(falsy, exports);
658
- __exportStar(_function, exports);
659
- __exportStar(iterable, exports);
660
- __exportStar(jsonRpc, exports);
661
- __exportStar(json, exports);
662
- __exportStar(_null, exports);
663
- __exportStar(number, exports);
664
- __exportStar(object, exports);
665
- __exportStar(string, exports);
666
- __exportStar(_undefined, exports);
667
- __exportStar(url, exports);
704
+ };__exportStar(array$1, exports);
705
+ __exportStar(asyncIterable$1, exports);
706
+ __exportStar(bigint$1, exports);
707
+ __exportStar(boolean$1, exports);
708
+ __exportStar(char$1, exports);
709
+ __exportStar(date$1, exports);
710
+ __exportStar(_enum$1, exports);
711
+ __exportStar(error$1, exports);
712
+ __exportStar(falsy$1, exports);
713
+ __exportStar(_function$1, exports);
714
+ __exportStar(iterable$1, exports);
715
+ __exportStar(jsonRpc$1, exports);
716
+ __exportStar(json$1, exports);
717
+ __exportStar(_null$1, exports);
718
+ __exportStar(number$1, exports);
719
+ __exportStar(object$1, exports);
720
+ __exportStar(string$1, exports);
721
+ __exportStar(_undefined$1, exports);
722
+ __exportStar(url$1, exports);
668
723
 
669
- }(es2018$2));
724
+ }(es2018$3));
670
725
 
671
726
  chunkByAsync$1.chunkByAsync = void 0;
672
- const types_1$h = es2018$2;
727
+ const types_1$h = es2018$3;
673
728
  function chunkByAsync(iterable, predicate) {
674
729
  if ((0, types_1$h.isAsyncIterable)(iterable)) {
675
730
  return chunkByAsyncIterable(iterable);
@@ -730,8 +785,8 @@
730
785
  var chunk$1 = {};
731
786
 
732
787
  chunk$1.chunk = void 0;
733
- const go_1$e = es2018$3;
734
- const errors_1$e = es2018$5;
788
+ const go_1$e = es2018$4;
789
+ const errors_1$e = es2018$6;
735
790
  function chunk(iterable, size) {
736
791
  (0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
737
792
  (0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
@@ -753,8 +808,8 @@
753
808
  var concatAsync$1 = {};
754
809
 
755
810
  concatAsync$1.concatAsync = void 0;
756
- const types_1$g = es2018$2;
757
- const go_1$d = es2018$3;
811
+ const types_1$g = es2018$3;
812
+ const go_1$d = es2018$4;
758
813
  function concatAsync(iterable, ...otherIterables) {
759
814
  return (0, go_1$d.go)(async function* () {
760
815
  for (const iter of [iterable, ...otherIterables]) {
@@ -776,7 +831,7 @@
776
831
  var concat$1 = {};
777
832
 
778
833
  concat$1.concat = void 0;
779
- const go_1$c = es2018$3;
834
+ const go_1$c = es2018$4;
780
835
  function concat(iterable, ...otherIterables) {
781
836
  return (0, go_1$c.go)(function* () {
782
837
  for (const iter of [iterable, ...otherIterables]) {
@@ -805,9 +860,9 @@
805
860
  utils.copyIterable = copyIterable;
806
861
 
807
862
  dropAsync$1.dropAsync = void 0;
808
- const go_1$b = es2018$3;
863
+ const go_1$b = es2018$4;
809
864
  const utils_1$3 = utils;
810
- const errors_1$d = es2018$5;
865
+ const errors_1$d = es2018$6;
811
866
  function dropAsync(iterable, count) {
812
867
  (0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
813
868
  (0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -840,9 +895,9 @@
840
895
  var dropRightAsync$1 = {};
841
896
 
842
897
  dropRightAsync$1.dropRightAsync = void 0;
843
- const go_1$a = es2018$3;
898
+ const go_1$a = es2018$4;
844
899
  const utils_1$2 = utils;
845
- const errors_1$c = es2018$5;
900
+ const errors_1$c = es2018$6;
846
901
  function dropRightAsync(iterable, count) {
847
902
  (0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
848
903
  (0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -868,9 +923,9 @@
868
923
  var dropRight$1 = {};
869
924
 
870
925
  dropRight$1.dropRight = void 0;
871
- const go_1$9 = es2018$3;
926
+ const go_1$9 = es2018$4;
872
927
  const utils_1$1 = utils;
873
- const errors_1$b = es2018$5;
928
+ const errors_1$b = es2018$6;
874
929
  function dropRight(iterable, count) {
875
930
  (0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
876
931
  (0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -886,7 +941,7 @@
886
941
  var dropUntilAsync$1 = {};
887
942
 
888
943
  dropUntilAsync$1.dropUntilAsync = void 0;
889
- const types_1$f = es2018$2;
944
+ const types_1$f = es2018$3;
890
945
  function dropUntilAsync(iterable, predicate) {
891
946
  if ((0, types_1$f.isAsyncIterable)(iterable)) {
892
947
  return dropUntilAsyncIterable(iterable);
@@ -968,9 +1023,9 @@
968
1023
  var drop$1 = {};
969
1024
 
970
1025
  drop$1.drop = void 0;
971
- const go_1$8 = es2018$3;
1026
+ const go_1$8 = es2018$4;
972
1027
  const utils_1 = utils;
973
- const errors_1$a = es2018$5;
1028
+ const errors_1$a = es2018$6;
974
1029
  function drop(iterable, count) {
975
1030
  (0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
976
1031
  (0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1003,7 +1058,7 @@
1003
1058
  var filterAsync$1 = {};
1004
1059
 
1005
1060
  filterAsync$1.filterAsync = void 0;
1006
- const types_1$e = es2018$2;
1061
+ const types_1$e = es2018$3;
1007
1062
  function filterAsync(iterable, predicate) {
1008
1063
  if ((0, types_1$e.isAsyncIterable)(iterable)) {
1009
1064
  return filterAsyncIterable(iterable);
@@ -1050,7 +1105,7 @@
1050
1105
  var flattenByAsync$1 = {};
1051
1106
 
1052
1107
  flattenByAsync$1.flattenByAsync = void 0;
1053
- const types_1$d = es2018$2;
1108
+ const types_1$d = es2018$3;
1054
1109
  function flattenByAsync(iterable, predicate) {
1055
1110
  if ((0, types_1$d.isAsyncIterable)(iterable)) {
1056
1111
  return flattenByAsyncIterable(iterable);
@@ -1090,7 +1145,7 @@
1090
1145
 
1091
1146
  flattenDeepAsync$1.flattenDeepAsync = void 0;
1092
1147
  const flatten_by_async_1 = flattenByAsync$1;
1093
- const errors_1$9 = es2018$5;
1148
+ const errors_1$9 = es2018$6;
1094
1149
  function flattenDeepAsync(iterable, depth = Infinity) {
1095
1150
  (0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1096
1151
  (0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
@@ -1108,7 +1163,7 @@
1108
1163
  var flattenBy$1 = {};
1109
1164
 
1110
1165
  flattenBy$1.flattenBy = void 0;
1111
- const types_1$c = es2018$2;
1166
+ const types_1$c = es2018$3;
1112
1167
  function flattenBy(iterable, predicate) {
1113
1168
  return flatten(iterable, 1);
1114
1169
  function* flatten(iterable, level) {
@@ -1131,7 +1186,7 @@
1131
1186
 
1132
1187
  flattenDeep$1.flattenDeep = void 0;
1133
1188
  const flatten_by_1 = flattenBy$1;
1134
- const errors_1$8 = es2018$5;
1189
+ const errors_1$8 = es2018$6;
1135
1190
  function flattenDeep(iterable, depth = Infinity) {
1136
1191
  (0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1137
1192
  (0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
@@ -1151,7 +1206,7 @@
1151
1206
  var mapAsync$1 = {};
1152
1207
 
1153
1208
  mapAsync$1.mapAsync = void 0;
1154
- const types_1$b = es2018$2;
1209
+ const types_1$b = es2018$3;
1155
1210
  function mapAsync(iterable, fn) {
1156
1211
  if ((0, types_1$b.isAsyncIterable)(iterable)) {
1157
1212
  return mapAsyncIterable(iterable);
@@ -1191,8 +1246,8 @@
1191
1246
  var repeatAsync$1 = {};
1192
1247
 
1193
1248
  repeatAsync$1.repeatAsync = void 0;
1194
- const go_1$7 = es2018$3;
1195
- const errors_1$7 = es2018$5;
1249
+ const go_1$7 = es2018$4;
1250
+ const errors_1$7 = es2018$6;
1196
1251
  function repeatAsync(iterable, times) {
1197
1252
  (0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1198
1253
  (0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
@@ -1226,8 +1281,8 @@
1226
1281
  var repeat$1 = {};
1227
1282
 
1228
1283
  repeat$1.repeat = void 0;
1229
- const go_1$6 = es2018$3;
1230
- const errors_1$6 = es2018$5;
1284
+ const go_1$6 = es2018$4;
1285
+ const errors_1$6 = es2018$6;
1231
1286
  function repeat(iterable, times) {
1232
1287
  (0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1233
1288
  (0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
@@ -1261,8 +1316,8 @@
1261
1316
  var sliceAsync$1 = {};
1262
1317
 
1263
1318
  sliceAsync$1.sliceAsync = void 0;
1264
- const go_1$5 = es2018$3;
1265
- const errors_1$5 = es2018$5;
1319
+ const go_1$5 = es2018$4;
1320
+ const errors_1$5 = es2018$6;
1266
1321
  function sliceAsync(iterable, start, end = Infinity) {
1267
1322
  (0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1268
1323
  (0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
@@ -1284,8 +1339,8 @@
1284
1339
  var slice$1 = {};
1285
1340
 
1286
1341
  slice$1.slice = void 0;
1287
- const go_1$4 = es2018$3;
1288
- const errors_1$4 = es2018$5;
1342
+ const go_1$4 = es2018$4;
1343
+ const errors_1$4 = es2018$6;
1289
1344
  function slice(iterable, start, end = Infinity) {
1290
1345
  (0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1291
1346
  (0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
@@ -1325,7 +1380,7 @@
1325
1380
  var splitByAsync$1 = {};
1326
1381
 
1327
1382
  splitByAsync$1.splitByAsync = void 0;
1328
- const types_1$a = es2018$2;
1383
+ const types_1$a = es2018$3;
1329
1384
  function splitByAsync(iterable, predicate) {
1330
1385
  if ((0, types_1$a.isAsyncIterable)(iterable)) {
1331
1386
  return splitByAsyncIterable(iterable);
@@ -1407,8 +1462,8 @@
1407
1462
  var takeAsync$1 = {};
1408
1463
 
1409
1464
  takeAsync$1.takeAsync = void 0;
1410
- const go_1$3 = es2018$3;
1411
- const errors_1$3 = es2018$5;
1465
+ const go_1$3 = es2018$4;
1466
+ const errors_1$3 = es2018$6;
1412
1467
  function takeAsync(iterable, count) {
1413
1468
  (0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1414
1469
  (0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1428,8 +1483,8 @@
1428
1483
  var takeRightAsync$1 = {};
1429
1484
 
1430
1485
  takeRightAsync$1.takeRightAsync = void 0;
1431
- const go_1$2 = es2018$3;
1432
- const errors_1$2 = es2018$5;
1486
+ const go_1$2 = es2018$4;
1487
+ const errors_1$2 = es2018$6;
1433
1488
  function takeRightAsync(iterable, count) {
1434
1489
  (0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1435
1490
  (0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1458,8 +1513,8 @@
1458
1513
  var takeRight$1 = {};
1459
1514
 
1460
1515
  takeRight$1.takeRight = void 0;
1461
- const go_1$1 = es2018$3;
1462
- const errors_1$1 = es2018$5;
1516
+ const go_1$1 = es2018$4;
1517
+ const errors_1$1 = es2018$6;
1463
1518
  function takeRight(iterable, count) {
1464
1519
  (0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1465
1520
  (0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1488,7 +1543,7 @@
1488
1543
  var takeUntilAsync$1 = {};
1489
1544
 
1490
1545
  takeUntilAsync$1.takeUntilAsync = void 0;
1491
- const types_1$9 = es2018$2;
1546
+ const types_1$9 = es2018$3;
1492
1547
  function takeUntilAsync(iterable, predicate) {
1493
1548
  if ((0, types_1$9.isAsyncIterable)(iterable)) {
1494
1549
  return takeUntilAsyncIterable(iterable);
@@ -1534,8 +1589,8 @@
1534
1589
  var take$1 = {};
1535
1590
 
1536
1591
  take$1.take = void 0;
1537
- const go_1 = es2018$3;
1538
- const errors_1 = es2018$5;
1592
+ const go_1 = es2018$4;
1593
+ const errors_1 = es2018$6;
1539
1594
  function take(iterable, count) {
1540
1595
  (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1541
1596
  (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1555,7 +1610,7 @@
1555
1610
  var tapAsync$1 = {};
1556
1611
 
1557
1612
  tapAsync$1.tapAsync = void 0;
1558
- const types_1$8 = es2018$2;
1613
+ const types_1$8 = es2018$3;
1559
1614
  function tapAsync(iterable, fn) {
1560
1615
  if ((0, types_1$8.isAsyncIterable)(iterable)) {
1561
1616
  return tapAsyncIterable(iterable);
@@ -1638,7 +1693,7 @@
1638
1693
  var uniqByAsync$1 = {};
1639
1694
 
1640
1695
  uniqByAsync$1.uniqByAsync = void 0;
1641
- const types_1$7 = es2018$2;
1696
+ const types_1$7 = es2018$3;
1642
1697
  function uniqByAsync(iterable, fn) {
1643
1698
  if ((0, types_1$7.isAsyncIterable)(iterable)) {
1644
1699
  return uniqByAsyncIterable(iterable);
@@ -1707,7 +1762,7 @@
1707
1762
  var zipAsync$1 = {};
1708
1763
 
1709
1764
  zipAsync$1.zipAsync = void 0;
1710
- const types_1$6 = es2018$2;
1765
+ const types_1$6 = es2018$3;
1711
1766
  var Kind;
1712
1767
  (function (Kind) {
1713
1768
  Kind[Kind["Sync"] = 0] = "Sync";
@@ -1867,7 +1922,7 @@
1867
1922
  var eachAsync$1 = {};
1868
1923
 
1869
1924
  eachAsync$1.eachAsync = void 0;
1870
- const types_1$5 = es2018$2;
1925
+ const types_1$5 = es2018$3;
1871
1926
  function eachAsync(iterable, fn) {
1872
1927
  if ((0, types_1$5.isAsyncIterable)(iterable)) {
1873
1928
  return eachAsyncIterable(iterable);
@@ -1907,7 +1962,7 @@
1907
1962
  var everyAsync$1 = {};
1908
1963
 
1909
1964
  everyAsync$1.everyAsync = void 0;
1910
- const types_1$4 = es2018$2;
1965
+ const types_1$4 = es2018$3;
1911
1966
  function everyAsync(iterable, predicate) {
1912
1967
  if ((0, types_1$4.isAsyncIterable)(iterable)) {
1913
1968
  return everyAsyncIterable(iterable);
@@ -1953,7 +2008,7 @@
1953
2008
  var findAsync$1 = {};
1954
2009
 
1955
2010
  findAsync$1.findAsync = void 0;
1956
- const types_1$3 = es2018$2;
2011
+ const types_1$3 = es2018$3;
1957
2012
  function findAsync(iterable, predicate) {
1958
2013
  if ((0, types_1$3.isAsyncIterable)(iterable)) {
1959
2014
  return findAsyncIterable(iterable);
@@ -2077,7 +2132,7 @@
2077
2132
  var reduceAsync$1 = {};
2078
2133
 
2079
2134
  reduceAsync$1.reduceAsync = void 0;
2080
- const types_1$2 = es2018$2;
2135
+ const types_1$2 = es2018$3;
2081
2136
  function reduceAsync(iterable, fn, initialValue) {
2082
2137
  if ((0, types_1$2.isUndefined)(initialValue)) {
2083
2138
  return reduceAsyncWithoutInitialValue(iterable, fn);
@@ -2173,7 +2228,7 @@
2173
2228
  var reduce$1 = {};
2174
2229
 
2175
2230
  reduce$1.reduce = void 0;
2176
- const types_1$1 = es2018$2;
2231
+ const types_1$1 = es2018$3;
2177
2232
  function reduce(iterable, fn, initialValue) {
2178
2233
  if ((0, types_1$1.isUndefined)(initialValue)) {
2179
2234
  return reduceWithoutInitialValue(iterable, fn);
@@ -2220,7 +2275,7 @@
2220
2275
  var someAsync$1 = {};
2221
2276
 
2222
2277
  someAsync$1.someAsync = void 0;
2223
- const types_1 = es2018$2;
2278
+ const types_1 = es2018$3;
2224
2279
  function someAsync(iterable, predicate) {
2225
2280
  if ((0, types_1.isAsyncIterable)(iterable)) {
2226
2281
  return someAsyncIterable(iterable);
@@ -2404,15 +2459,15 @@
2404
2459
  };__exportStar(middleware, exports);
2405
2460
  __exportStar(output, exports);
2406
2461
 
2407
- }(es2018$4));
2462
+ }(es2018$5));
2408
2463
 
2409
2464
  var _LRUMap_limit, _LRUMap_map;
2410
2465
  class LRUMap {
2411
2466
  constructor(limit) {
2412
2467
  _LRUMap_limit.set(this, void 0);
2413
2468
  _LRUMap_map.set(this, new Map());
2414
- es2018$5.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
2415
- es2018$5.assert(limit > 0, 'The parameter limit must be a positive value');
2469
+ es2018$6.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
2470
+ es2018$6.assert(limit > 0, 'The parameter limit must be a positive value');
2416
2471
  __classPrivateFieldSet(this, _LRUMap_limit, limit, "f");
2417
2472
  }
2418
2473
  get [(_LRUMap_limit = new WeakMap(), _LRUMap_map = new WeakMap(), Symbol.toStringTag)]() {
@@ -2460,15 +2515,15 @@
2460
2515
  * Return the earliest key inserted in the Map
2461
2516
  */
2462
2517
  getColdestKey() {
2463
- return es2018$4.first(__classPrivateFieldGet(this, _LRUMap_map, "f").keys());
2518
+ return es2018$5.first(__classPrivateFieldGet(this, _LRUMap_map, "f").keys());
2464
2519
  }
2465
2520
  }
2466
2521
 
2467
- var es2018$1 = {};
2522
+ var es2018$2 = {};
2468
2523
 
2469
2524
  var exponentialBackoff = {};
2470
2525
 
2471
- var es2018 = {};
2526
+ var es2018$1 = {};
2472
2527
 
2473
2528
  var random$1 = {};
2474
2529
 
@@ -2512,10 +2567,10 @@
2512
2567
  __exportStar(randomInt$1, exports);
2513
2568
  __exportStar(randomIntInclusive$1, exports);
2514
2569
 
2515
- }(es2018));
2570
+ }(es2018$1));
2516
2571
 
2517
2572
  exponentialBackoff.calculateExponentialBackoffTimeout = void 0;
2518
- const extra_rand_1 = es2018;
2573
+ const extra_rand_1 = es2018$1;
2519
2574
  function calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout = Infinity, factor = 2, jitter = true }) {
2520
2575
  const timeout = Math.min(factor ** retries * baseTimeout, maxTimeout);
2521
2576
  if (jitter) {
@@ -2527,19 +2582,19 @@
2527
2582
  }
2528
2583
  exponentialBackoff.calculateExponentialBackoffTimeout = calculateExponentialBackoffTimeout;
2529
2584
 
2530
- var setTimeout$1 = {};
2585
+ var setTimeout$2 = {};
2531
2586
 
2532
- setTimeout$1.setTimeout = void 0;
2533
- function setTimeout(timeout, cb) {
2587
+ setTimeout$2.setTimeout = void 0;
2588
+ function setTimeout$1(timeout, cb) {
2534
2589
  const timer = globalThis.setTimeout(cb, timeout);
2535
2590
  return () => clearTimeout(timer);
2536
2591
  }
2537
- setTimeout$1.setTimeout = setTimeout;
2592
+ setTimeout$2.setTimeout = setTimeout$1;
2538
2593
 
2539
2594
  var setSchedule$1 = {};
2540
2595
 
2541
2596
  setSchedule$1.setSchedule = void 0;
2542
- const set_timeout_1$3 = setTimeout$1;
2597
+ const set_timeout_1$3 = setTimeout$2;
2543
2598
  function setSchedule(timestamp, cb) {
2544
2599
  const timeout = timestamp - Date.now();
2545
2600
  return (0, set_timeout_1$3.setTimeout)(timeout, cb);
@@ -2558,7 +2613,7 @@
2558
2613
  var setImmediate$1 = {};
2559
2614
 
2560
2615
  setImmediate$1.setImmediate = void 0;
2561
- const set_timeout_1$2 = setTimeout$1;
2616
+ const set_timeout_1$2 = setTimeout$2;
2562
2617
  function setImmediate(cb) {
2563
2618
  if (globalThis.setImmediate) {
2564
2619
  const timer = globalThis.setImmediate(cb);
@@ -2573,7 +2628,7 @@
2573
2628
  var setTimeoutLoop$1 = {};
2574
2629
 
2575
2630
  setTimeoutLoop$1.setTimeoutLoop = void 0;
2576
- const set_timeout_1$1 = setTimeout$1;
2631
+ const set_timeout_1$1 = setTimeout$2;
2577
2632
  function setTimeoutLoop(timeout, cb) {
2578
2633
  let isCancelled = false;
2579
2634
  let cancel = (0, set_timeout_1$1.setTimeout)(timeout, loop);
@@ -2593,7 +2648,7 @@
2593
2648
  var setDynamicTimeoutLoop$1 = {};
2594
2649
 
2595
2650
  setDynamicTimeoutLoop$1.setDynamicTimeoutLoop = void 0;
2596
- const set_timeout_1 = setTimeout$1;
2651
+ const set_timeout_1 = setTimeout$2;
2597
2652
  function setDynamicTimeoutLoop(timeout, cb) {
2598
2653
  let isCancelled = false;
2599
2654
  let cancel = (0, set_timeout_1.setTimeout)(timeout, loop);
@@ -2623,14 +2678,14 @@
2623
2678
  var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2624
2679
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2625
2680
  };__exportStar(exponentialBackoff, exports);
2626
- __exportStar(setTimeout$1, exports);
2681
+ __exportStar(setTimeout$2, exports);
2627
2682
  __exportStar(setSchedule$1, exports);
2628
2683
  __exportStar(setInterval$1, exports);
2629
2684
  __exportStar(setImmediate$1, exports);
2630
2685
  __exportStar(setTimeoutLoop$1, exports);
2631
2686
  __exportStar(setDynamicTimeoutLoop$1, exports);
2632
2687
 
2633
- }(es2018$1));
2688
+ }(es2018$2));
2634
2689
 
2635
2690
  var _ExpirableMap_map, _ExpirableMap_cancelClearTimeout;
2636
2691
  class ExpirableMap {
@@ -2720,7 +2775,7 @@
2720
2775
  if (this.itemMetadataSortedByExpirationTime.length > 0) {
2721
2776
  const item = this.itemMetadataSortedByExpirationTime[0];
2722
2777
  if (Number.isFinite(item.expirationTime)) {
2723
- const cancel = es2018$1.setSchedule(item.expirationTime, () => {
2778
+ const cancel = es2018$2.setSchedule(item.expirationTime, () => {
2724
2779
  this.clearExpiredItems(Date.now());
2725
2780
  this.rescheduleClearTimeout();
2726
2781
  });
@@ -2746,8 +2801,8 @@
2746
2801
  * 按过期时间升序排列所有项目的元数据
2747
2802
  */
2748
2803
  this.itemMetadataSortedByExpirationTime = [];
2749
- es2018$5.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
2750
- es2018$5.assert(limit > 0, 'The parameter limit must be a positive value');
2804
+ es2018$6.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
2805
+ es2018$6.assert(limit > 0, 'The parameter limit must be a positive value');
2751
2806
  __classPrivateFieldSet(this, _TLRUMap_limit, limit, "f");
2752
2807
  }
2753
2808
  get [(_TLRUMap_limit = new WeakMap(), _TLRUMap_map = new WeakMap(), _TLRUMap_cancelClearTimeout = new WeakMap(), Symbol.toStringTag)]() {
@@ -2851,7 +2906,7 @@
2851
2906
  if (this.itemMetadataSortedByExpirationTime.length > 0) {
2852
2907
  const item = this.itemMetadataSortedByExpirationTime[0];
2853
2908
  if (Number.isFinite(item.expirationTime)) {
2854
- const cancel = es2018$1.setSchedule(item.expirationTime, () => {
2909
+ const cancel = es2018$2.setSchedule(item.expirationTime, () => {
2855
2910
  this.clearExpiredItems(Date.now());
2856
2911
  this.rescheduleClearTimeout();
2857
2912
  });
@@ -2866,7 +2921,7 @@
2866
2921
  * Return the earliest key inserted in the Map
2867
2922
  */
2868
2923
  getColdestKey() {
2869
- return es2018$4.first(__classPrivateFieldGet(this, _TLRUMap_map, "f").keys());
2924
+ return es2018$5.first(__classPrivateFieldGet(this, _TLRUMap_map, "f").keys());
2870
2925
  }
2871
2926
  }
2872
2927
 
@@ -2934,7 +2989,7 @@
2934
2989
  delete node.value;
2935
2990
  // 如果节点没有后缀, 则代表这是末端节点, 往前删除其前缀
2936
2991
  if (node.children.size === 0) {
2937
- for (const [part, parentNode] of es2018$4.toArray(es2018$4.zip(key, parentNodes)).reverse()) {
2992
+ for (const [part, parentNode] of es2018$5.toArray(es2018$5.zip(key, parentNodes)).reverse()) {
2938
2993
  parentNode.children.delete(part);
2939
2994
  if (parentNode.children.size !== 0)
2940
2995
  break;
@@ -2944,12 +2999,1182 @@
2944
2999
  }
2945
3000
  }
2946
3001
 
3002
+ var _FiniteStateMachine_state;
3003
+ class FiniteStateMachine {
3004
+ constructor(schema, initialState) {
3005
+ this.schema = schema;
3006
+ _FiniteStateMachine_state.set(this, void 0);
3007
+ __classPrivateFieldSet(this, _FiniteStateMachine_state, initialState, "f");
3008
+ }
3009
+ get state() {
3010
+ return __classPrivateFieldGet(this, _FiniteStateMachine_state, "f");
3011
+ }
3012
+ matches(state) {
3013
+ return __classPrivateFieldGet(this, _FiniteStateMachine_state, "f") === state;
3014
+ }
3015
+ /**
3016
+ * @throws {BadEventError}
3017
+ */
3018
+ send(event) {
3019
+ if (event in this.schema[this.state]) {
3020
+ __classPrivateFieldSet(this, _FiniteStateMachine_state, this.schema[this.state][event], "f");
3021
+ }
3022
+ else {
3023
+ throw new BadEventError(this.state, event);
3024
+ }
3025
+ }
3026
+ }
3027
+ _FiniteStateMachine_state = new WeakMap();
3028
+ class BadEventError extends es2018$6.CustomError {
3029
+ constructor(state, event) {
3030
+ super(`State ${state} cannot react to event ${event}`);
3031
+ }
3032
+ }
3033
+
3034
+ function isFunction$1(value) {
3035
+ return typeof value === 'function';
3036
+ }
3037
+
3038
+ function createErrorClass(createImpl) {
3039
+ var _super = function (instance) {
3040
+ Error.call(instance);
3041
+ instance.stack = new Error().stack;
3042
+ };
3043
+ var ctorFunc = createImpl(_super);
3044
+ ctorFunc.prototype = Object.create(Error.prototype);
3045
+ ctorFunc.prototype.constructor = ctorFunc;
3046
+ return ctorFunc;
3047
+ }
3048
+
3049
+ var UnsubscriptionError = createErrorClass(function (_super) {
3050
+ return function UnsubscriptionErrorImpl(errors) {
3051
+ _super(this);
3052
+ this.message = errors
3053
+ ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
3054
+ : '';
3055
+ this.name = 'UnsubscriptionError';
3056
+ this.errors = errors;
3057
+ };
3058
+ });
3059
+
3060
+ function arrRemove(arr, item) {
3061
+ if (arr) {
3062
+ var index = arr.indexOf(item);
3063
+ 0 <= index && arr.splice(index, 1);
3064
+ }
3065
+ }
3066
+
3067
+ var Subscription = (function () {
3068
+ function Subscription(initialTeardown) {
3069
+ this.initialTeardown = initialTeardown;
3070
+ this.closed = false;
3071
+ this._parentage = null;
3072
+ this._teardowns = null;
3073
+ }
3074
+ Subscription.prototype.unsubscribe = function () {
3075
+ var e_1, _a, e_2, _b;
3076
+ var errors;
3077
+ if (!this.closed) {
3078
+ this.closed = true;
3079
+ var _parentage = this._parentage;
3080
+ if (_parentage) {
3081
+ this._parentage = null;
3082
+ if (Array.isArray(_parentage)) {
3083
+ try {
3084
+ for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
3085
+ var parent_1 = _parentage_1_1.value;
3086
+ parent_1.remove(this);
3087
+ }
3088
+ }
3089
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3090
+ finally {
3091
+ try {
3092
+ if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
3093
+ }
3094
+ finally { if (e_1) throw e_1.error; }
3095
+ }
3096
+ }
3097
+ else {
3098
+ _parentage.remove(this);
3099
+ }
3100
+ }
3101
+ var initialTeardown = this.initialTeardown;
3102
+ if (isFunction$1(initialTeardown)) {
3103
+ try {
3104
+ initialTeardown();
3105
+ }
3106
+ catch (e) {
3107
+ errors = e instanceof UnsubscriptionError ? e.errors : [e];
3108
+ }
3109
+ }
3110
+ var _teardowns = this._teardowns;
3111
+ if (_teardowns) {
3112
+ this._teardowns = null;
3113
+ try {
3114
+ for (var _teardowns_1 = __values(_teardowns), _teardowns_1_1 = _teardowns_1.next(); !_teardowns_1_1.done; _teardowns_1_1 = _teardowns_1.next()) {
3115
+ var teardown_1 = _teardowns_1_1.value;
3116
+ try {
3117
+ execTeardown(teardown_1);
3118
+ }
3119
+ catch (err) {
3120
+ errors = errors !== null && errors !== void 0 ? errors : [];
3121
+ if (err instanceof UnsubscriptionError) {
3122
+ errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
3123
+ }
3124
+ else {
3125
+ errors.push(err);
3126
+ }
3127
+ }
3128
+ }
3129
+ }
3130
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
3131
+ finally {
3132
+ try {
3133
+ if (_teardowns_1_1 && !_teardowns_1_1.done && (_b = _teardowns_1.return)) _b.call(_teardowns_1);
3134
+ }
3135
+ finally { if (e_2) throw e_2.error; }
3136
+ }
3137
+ }
3138
+ if (errors) {
3139
+ throw new UnsubscriptionError(errors);
3140
+ }
3141
+ }
3142
+ };
3143
+ Subscription.prototype.add = function (teardown) {
3144
+ var _a;
3145
+ if (teardown && teardown !== this) {
3146
+ if (this.closed) {
3147
+ execTeardown(teardown);
3148
+ }
3149
+ else {
3150
+ if (teardown instanceof Subscription) {
3151
+ if (teardown.closed || teardown._hasParent(this)) {
3152
+ return;
3153
+ }
3154
+ teardown._addParent(this);
3155
+ }
3156
+ (this._teardowns = (_a = this._teardowns) !== null && _a !== void 0 ? _a : []).push(teardown);
3157
+ }
3158
+ }
3159
+ };
3160
+ Subscription.prototype._hasParent = function (parent) {
3161
+ var _parentage = this._parentage;
3162
+ return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
3163
+ };
3164
+ Subscription.prototype._addParent = function (parent) {
3165
+ var _parentage = this._parentage;
3166
+ this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
3167
+ };
3168
+ Subscription.prototype._removeParent = function (parent) {
3169
+ var _parentage = this._parentage;
3170
+ if (_parentage === parent) {
3171
+ this._parentage = null;
3172
+ }
3173
+ else if (Array.isArray(_parentage)) {
3174
+ arrRemove(_parentage, parent);
3175
+ }
3176
+ };
3177
+ Subscription.prototype.remove = function (teardown) {
3178
+ var _teardowns = this._teardowns;
3179
+ _teardowns && arrRemove(_teardowns, teardown);
3180
+ if (teardown instanceof Subscription) {
3181
+ teardown._removeParent(this);
3182
+ }
3183
+ };
3184
+ Subscription.EMPTY = (function () {
3185
+ var empty = new Subscription();
3186
+ empty.closed = true;
3187
+ return empty;
3188
+ })();
3189
+ return Subscription;
3190
+ }());
3191
+ var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
3192
+ function isSubscription(value) {
3193
+ return (value instanceof Subscription ||
3194
+ (value && 'closed' in value && isFunction$1(value.remove) && isFunction$1(value.add) && isFunction$1(value.unsubscribe)));
3195
+ }
3196
+ function execTeardown(teardown) {
3197
+ if (isFunction$1(teardown)) {
3198
+ teardown();
3199
+ }
3200
+ else {
3201
+ teardown.unsubscribe();
3202
+ }
3203
+ }
3204
+
3205
+ var config = {
3206
+ onUnhandledError: null,
3207
+ onStoppedNotification: null,
3208
+ Promise: undefined,
3209
+ useDeprecatedSynchronousErrorHandling: false,
3210
+ useDeprecatedNextContext: false,
3211
+ };
3212
+
3213
+ var timeoutProvider = {
3214
+ setTimeout: function () {
3215
+ var args = [];
3216
+ for (var _i = 0; _i < arguments.length; _i++) {
3217
+ args[_i] = arguments[_i];
3218
+ }
3219
+ var delegate = timeoutProvider.delegate;
3220
+ return ((delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) || setTimeout).apply(void 0, __spreadArray([], __read(args)));
3221
+ },
3222
+ clearTimeout: function (handle) {
3223
+ var delegate = timeoutProvider.delegate;
3224
+ return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
3225
+ },
3226
+ delegate: undefined,
3227
+ };
3228
+
3229
+ function reportUnhandledError(err) {
3230
+ timeoutProvider.setTimeout(function () {
3231
+ {
3232
+ throw err;
3233
+ }
3234
+ });
3235
+ }
3236
+
3237
+ function noop() { }
3238
+
3239
+ var context = null;
3240
+ function errorContext(cb) {
3241
+ if (config.useDeprecatedSynchronousErrorHandling) {
3242
+ var isRoot = !context;
3243
+ if (isRoot) {
3244
+ context = { errorThrown: false, error: null };
3245
+ }
3246
+ cb();
3247
+ if (isRoot) {
3248
+ var _a = context, errorThrown = _a.errorThrown, error = _a.error;
3249
+ context = null;
3250
+ if (errorThrown) {
3251
+ throw error;
3252
+ }
3253
+ }
3254
+ }
3255
+ else {
3256
+ cb();
3257
+ }
3258
+ }
3259
+
3260
+ var Subscriber = (function (_super) {
3261
+ __extends(Subscriber, _super);
3262
+ function Subscriber(destination) {
3263
+ var _this = _super.call(this) || this;
3264
+ _this.isStopped = false;
3265
+ if (destination) {
3266
+ _this.destination = destination;
3267
+ if (isSubscription(destination)) {
3268
+ destination.add(_this);
3269
+ }
3270
+ }
3271
+ else {
3272
+ _this.destination = EMPTY_OBSERVER;
3273
+ }
3274
+ return _this;
3275
+ }
3276
+ Subscriber.create = function (next, error, complete) {
3277
+ return new SafeSubscriber(next, error, complete);
3278
+ };
3279
+ Subscriber.prototype.next = function (value) {
3280
+ if (this.isStopped) ;
3281
+ else {
3282
+ this._next(value);
3283
+ }
3284
+ };
3285
+ Subscriber.prototype.error = function (err) {
3286
+ if (this.isStopped) ;
3287
+ else {
3288
+ this.isStopped = true;
3289
+ this._error(err);
3290
+ }
3291
+ };
3292
+ Subscriber.prototype.complete = function () {
3293
+ if (this.isStopped) ;
3294
+ else {
3295
+ this.isStopped = true;
3296
+ this._complete();
3297
+ }
3298
+ };
3299
+ Subscriber.prototype.unsubscribe = function () {
3300
+ if (!this.closed) {
3301
+ this.isStopped = true;
3302
+ _super.prototype.unsubscribe.call(this);
3303
+ this.destination = null;
3304
+ }
3305
+ };
3306
+ Subscriber.prototype._next = function (value) {
3307
+ this.destination.next(value);
3308
+ };
3309
+ Subscriber.prototype._error = function (err) {
3310
+ try {
3311
+ this.destination.error(err);
3312
+ }
3313
+ finally {
3314
+ this.unsubscribe();
3315
+ }
3316
+ };
3317
+ Subscriber.prototype._complete = function () {
3318
+ try {
3319
+ this.destination.complete();
3320
+ }
3321
+ finally {
3322
+ this.unsubscribe();
3323
+ }
3324
+ };
3325
+ return Subscriber;
3326
+ }(Subscription));
3327
+ var SafeSubscriber = (function (_super) {
3328
+ __extends(SafeSubscriber, _super);
3329
+ function SafeSubscriber(observerOrNext, error, complete) {
3330
+ var _this = _super.call(this) || this;
3331
+ var next;
3332
+ if (isFunction$1(observerOrNext)) {
3333
+ next = observerOrNext;
3334
+ }
3335
+ else if (observerOrNext) {
3336
+ (next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete);
3337
+ var context_1;
3338
+ if (_this && config.useDeprecatedNextContext) {
3339
+ context_1 = Object.create(observerOrNext);
3340
+ context_1.unsubscribe = function () { return _this.unsubscribe(); };
3341
+ }
3342
+ else {
3343
+ context_1 = observerOrNext;
3344
+ }
3345
+ next = next === null || next === void 0 ? void 0 : next.bind(context_1);
3346
+ error = error === null || error === void 0 ? void 0 : error.bind(context_1);
3347
+ complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1);
3348
+ }
3349
+ _this.destination = {
3350
+ next: next ? wrapForErrorHandling(next) : noop,
3351
+ error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler),
3352
+ complete: complete ? wrapForErrorHandling(complete) : noop,
3353
+ };
3354
+ return _this;
3355
+ }
3356
+ return SafeSubscriber;
3357
+ }(Subscriber));
3358
+ function wrapForErrorHandling(handler, instance) {
3359
+ return function () {
3360
+ var args = [];
3361
+ for (var _i = 0; _i < arguments.length; _i++) {
3362
+ args[_i] = arguments[_i];
3363
+ }
3364
+ try {
3365
+ handler.apply(void 0, __spreadArray([], __read(args)));
3366
+ }
3367
+ catch (err) {
3368
+ {
3369
+ reportUnhandledError(err);
3370
+ }
3371
+ }
3372
+ };
3373
+ }
3374
+ function defaultErrorHandler(err) {
3375
+ throw err;
3376
+ }
3377
+ var EMPTY_OBSERVER = {
3378
+ closed: true,
3379
+ next: noop,
3380
+ error: defaultErrorHandler,
3381
+ complete: noop,
3382
+ };
3383
+
3384
+ var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();
3385
+
3386
+ function identity(x) {
3387
+ return x;
3388
+ }
3389
+
3390
+ function pipeFromArray(fns) {
3391
+ if (fns.length === 0) {
3392
+ return identity;
3393
+ }
3394
+ if (fns.length === 1) {
3395
+ return fns[0];
3396
+ }
3397
+ return function piped(input) {
3398
+ return fns.reduce(function (prev, fn) { return fn(prev); }, input);
3399
+ };
3400
+ }
3401
+
3402
+ var Observable = (function () {
3403
+ function Observable(subscribe) {
3404
+ if (subscribe) {
3405
+ this._subscribe = subscribe;
3406
+ }
3407
+ }
3408
+ Observable.prototype.lift = function (operator) {
3409
+ var observable = new Observable();
3410
+ observable.source = this;
3411
+ observable.operator = operator;
3412
+ return observable;
3413
+ };
3414
+ Observable.prototype.subscribe = function (observerOrNext, error, complete) {
3415
+ var _this = this;
3416
+ var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
3417
+ errorContext(function () {
3418
+ var _a = _this, operator = _a.operator, source = _a.source;
3419
+ subscriber.add(operator
3420
+ ?
3421
+ operator.call(subscriber, source)
3422
+ : source
3423
+ ?
3424
+ _this._subscribe(subscriber)
3425
+ :
3426
+ _this._trySubscribe(subscriber));
3427
+ });
3428
+ return subscriber;
3429
+ };
3430
+ Observable.prototype._trySubscribe = function (sink) {
3431
+ try {
3432
+ return this._subscribe(sink);
3433
+ }
3434
+ catch (err) {
3435
+ sink.error(err);
3436
+ }
3437
+ };
3438
+ Observable.prototype.forEach = function (next, promiseCtor) {
3439
+ var _this = this;
3440
+ promiseCtor = getPromiseCtor(promiseCtor);
3441
+ return new promiseCtor(function (resolve, reject) {
3442
+ var subscriber = new SafeSubscriber({
3443
+ next: function (value) {
3444
+ try {
3445
+ next(value);
3446
+ }
3447
+ catch (err) {
3448
+ reject(err);
3449
+ subscriber.unsubscribe();
3450
+ }
3451
+ },
3452
+ error: reject,
3453
+ complete: resolve,
3454
+ });
3455
+ _this.subscribe(subscriber);
3456
+ });
3457
+ };
3458
+ Observable.prototype._subscribe = function (subscriber) {
3459
+ var _a;
3460
+ return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
3461
+ };
3462
+ Observable.prototype[observable] = function () {
3463
+ return this;
3464
+ };
3465
+ Observable.prototype.pipe = function () {
3466
+ var operations = [];
3467
+ for (var _i = 0; _i < arguments.length; _i++) {
3468
+ operations[_i] = arguments[_i];
3469
+ }
3470
+ return pipeFromArray(operations)(this);
3471
+ };
3472
+ Observable.prototype.toPromise = function (promiseCtor) {
3473
+ var _this = this;
3474
+ promiseCtor = getPromiseCtor(promiseCtor);
3475
+ return new promiseCtor(function (resolve, reject) {
3476
+ var value;
3477
+ _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });
3478
+ });
3479
+ };
3480
+ Observable.create = function (subscribe) {
3481
+ return new Observable(subscribe);
3482
+ };
3483
+ return Observable;
3484
+ }());
3485
+ function getPromiseCtor(promiseCtor) {
3486
+ var _a;
3487
+ return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
3488
+ }
3489
+ function isObserver(value) {
3490
+ return value && isFunction$1(value.next) && isFunction$1(value.error) && isFunction$1(value.complete);
3491
+ }
3492
+ function isSubscriber(value) {
3493
+ return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
3494
+ }
3495
+
3496
+ var ObjectUnsubscribedError = createErrorClass(function (_super) {
3497
+ return function ObjectUnsubscribedErrorImpl() {
3498
+ _super(this);
3499
+ this.name = 'ObjectUnsubscribedError';
3500
+ this.message = 'object unsubscribed';
3501
+ };
3502
+ });
3503
+
3504
+ var Subject = (function (_super) {
3505
+ __extends(Subject, _super);
3506
+ function Subject() {
3507
+ var _this = _super.call(this) || this;
3508
+ _this.closed = false;
3509
+ _this.observers = [];
3510
+ _this.isStopped = false;
3511
+ _this.hasError = false;
3512
+ _this.thrownError = null;
3513
+ return _this;
3514
+ }
3515
+ Subject.prototype.lift = function (operator) {
3516
+ var subject = new AnonymousSubject(this, this);
3517
+ subject.operator = operator;
3518
+ return subject;
3519
+ };
3520
+ Subject.prototype._throwIfClosed = function () {
3521
+ if (this.closed) {
3522
+ throw new ObjectUnsubscribedError();
3523
+ }
3524
+ };
3525
+ Subject.prototype.next = function (value) {
3526
+ var _this = this;
3527
+ errorContext(function () {
3528
+ var e_1, _a;
3529
+ _this._throwIfClosed();
3530
+ if (!_this.isStopped) {
3531
+ var copy = _this.observers.slice();
3532
+ try {
3533
+ for (var copy_1 = __values(copy), copy_1_1 = copy_1.next(); !copy_1_1.done; copy_1_1 = copy_1.next()) {
3534
+ var observer = copy_1_1.value;
3535
+ observer.next(value);
3536
+ }
3537
+ }
3538
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3539
+ finally {
3540
+ try {
3541
+ if (copy_1_1 && !copy_1_1.done && (_a = copy_1.return)) _a.call(copy_1);
3542
+ }
3543
+ finally { if (e_1) throw e_1.error; }
3544
+ }
3545
+ }
3546
+ });
3547
+ };
3548
+ Subject.prototype.error = function (err) {
3549
+ var _this = this;
3550
+ errorContext(function () {
3551
+ _this._throwIfClosed();
3552
+ if (!_this.isStopped) {
3553
+ _this.hasError = _this.isStopped = true;
3554
+ _this.thrownError = err;
3555
+ var observers = _this.observers;
3556
+ while (observers.length) {
3557
+ observers.shift().error(err);
3558
+ }
3559
+ }
3560
+ });
3561
+ };
3562
+ Subject.prototype.complete = function () {
3563
+ var _this = this;
3564
+ errorContext(function () {
3565
+ _this._throwIfClosed();
3566
+ if (!_this.isStopped) {
3567
+ _this.isStopped = true;
3568
+ var observers = _this.observers;
3569
+ while (observers.length) {
3570
+ observers.shift().complete();
3571
+ }
3572
+ }
3573
+ });
3574
+ };
3575
+ Subject.prototype.unsubscribe = function () {
3576
+ this.isStopped = this.closed = true;
3577
+ this.observers = null;
3578
+ };
3579
+ Object.defineProperty(Subject.prototype, "observed", {
3580
+ get: function () {
3581
+ var _a;
3582
+ return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
3583
+ },
3584
+ enumerable: false,
3585
+ configurable: true
3586
+ });
3587
+ Subject.prototype._trySubscribe = function (subscriber) {
3588
+ this._throwIfClosed();
3589
+ return _super.prototype._trySubscribe.call(this, subscriber);
3590
+ };
3591
+ Subject.prototype._subscribe = function (subscriber) {
3592
+ this._throwIfClosed();
3593
+ this._checkFinalizedStatuses(subscriber);
3594
+ return this._innerSubscribe(subscriber);
3595
+ };
3596
+ Subject.prototype._innerSubscribe = function (subscriber) {
3597
+ var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
3598
+ return hasError || isStopped
3599
+ ? EMPTY_SUBSCRIPTION
3600
+ : (observers.push(subscriber), new Subscription(function () { return arrRemove(observers, subscriber); }));
3601
+ };
3602
+ Subject.prototype._checkFinalizedStatuses = function (subscriber) {
3603
+ var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
3604
+ if (hasError) {
3605
+ subscriber.error(thrownError);
3606
+ }
3607
+ else if (isStopped) {
3608
+ subscriber.complete();
3609
+ }
3610
+ };
3611
+ Subject.prototype.asObservable = function () {
3612
+ var observable = new Observable();
3613
+ observable.source = this;
3614
+ return observable;
3615
+ };
3616
+ Subject.create = function (destination, source) {
3617
+ return new AnonymousSubject(destination, source);
3618
+ };
3619
+ return Subject;
3620
+ }(Observable));
3621
+ var AnonymousSubject = (function (_super) {
3622
+ __extends(AnonymousSubject, _super);
3623
+ function AnonymousSubject(destination, source) {
3624
+ var _this = _super.call(this) || this;
3625
+ _this.destination = destination;
3626
+ _this.source = source;
3627
+ return _this;
3628
+ }
3629
+ AnonymousSubject.prototype.next = function (value) {
3630
+ var _a, _b;
3631
+ (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
3632
+ };
3633
+ AnonymousSubject.prototype.error = function (err) {
3634
+ var _a, _b;
3635
+ (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
3636
+ };
3637
+ AnonymousSubject.prototype.complete = function () {
3638
+ var _a, _b;
3639
+ (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
3640
+ };
3641
+ AnonymousSubject.prototype._subscribe = function (subscriber) {
3642
+ var _a, _b;
3643
+ return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
3644
+ };
3645
+ return AnonymousSubject;
3646
+ }(Subject));
3647
+
3648
+ var es2018 = {};
3649
+
3650
+ var array = {};
3651
+
3652
+ array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
3653
+ function isArray(val) {
3654
+ return Array.isArray(val);
3655
+ }
3656
+ array.isArray = isArray;
3657
+ function isntArray(val) {
3658
+ return !isArray(val);
3659
+ }
3660
+ array.isntArray = isntArray;
3661
+ function isEmptyArray(val) {
3662
+ return val.length === 0;
3663
+ }
3664
+ array.isEmptyArray = isEmptyArray;
3665
+ function isntEmptyArray(val) {
3666
+ return val.length !== 0;
3667
+ }
3668
+ array.isntEmptyArray = isntEmptyArray;
3669
+
3670
+ var asyncIterable = {};
3671
+
3672
+ var _null = {};
3673
+
3674
+ _null.isntNull = _null.isNull = void 0;
3675
+ function isNull(val) {
3676
+ return val === null;
3677
+ }
3678
+ _null.isNull = isNull;
3679
+ function isntNull(val) {
3680
+ return !isNull(val);
3681
+ }
3682
+ _null.isntNull = isntNull;
3683
+
3684
+ var _undefined = {};
3685
+
3686
+ _undefined.isntUndefined = _undefined.isUndefined = void 0;
3687
+ function isUndefined(val) {
3688
+ return val === undefined;
3689
+ }
3690
+ _undefined.isUndefined = isUndefined;
3691
+ function isntUndefined(val) {
3692
+ return !isUndefined(val);
3693
+ }
3694
+ _undefined.isntUndefined = isntUndefined;
3695
+
3696
+ asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
3697
+ const null_1$1 = _null;
3698
+ const undefined_1$2 = _undefined;
3699
+ function isAsyncIterable(val) {
3700
+ return (0, null_1$1.isntNull)(val)
3701
+ && (0, undefined_1$2.isntUndefined)(val)
3702
+ && typeof val[Symbol.asyncIterator] === 'function';
3703
+ }
3704
+ asyncIterable.isAsyncIterable = isAsyncIterable;
3705
+ function isntAsyncIterable(val) {
3706
+ return !isAsyncIterable(val);
3707
+ }
3708
+ asyncIterable.isntAsyncIterable = isntAsyncIterable;
3709
+
3710
+ var bigint = {};
3711
+
3712
+ bigint.isntBigInt = bigint.isBigInt = void 0;
3713
+ function isBigInt(val) {
3714
+ return typeof val === 'bigint';
3715
+ }
3716
+ bigint.isBigInt = isBigInt;
3717
+ function isntBigInt(val) {
3718
+ return !isBigInt(val);
3719
+ }
3720
+ bigint.isntBigInt = isntBigInt;
3721
+
3722
+ var boolean = {};
3723
+
3724
+ boolean.isntBoolean = boolean.isBoolean = void 0;
3725
+ function isBoolean(val) {
3726
+ return typeof val === 'boolean';
3727
+ }
3728
+ boolean.isBoolean = isBoolean;
3729
+ function isntBoolean(val) {
3730
+ return !isBoolean(val);
3731
+ }
3732
+ boolean.isntBoolean = isntBoolean;
3733
+
3734
+ var char = {};
3735
+
3736
+ var string = {};
3737
+
3738
+ string.isntString = string.isString = void 0;
3739
+ function isString(val) {
3740
+ return typeof val === 'string';
3741
+ }
3742
+ string.isString = isString;
3743
+ function isntString(val) {
3744
+ return !isString(val);
3745
+ }
3746
+ string.isntString = isntString;
3747
+
3748
+ char.isntChar = char.isChar = void 0;
3749
+ const string_1$1 = string;
3750
+ function isChar(val) {
3751
+ return (0, string_1$1.isString)(val)
3752
+ && val.length === 1;
3753
+ }
3754
+ char.isChar = isChar;
3755
+ function isntChar(val) {
3756
+ return !isChar(val);
3757
+ }
3758
+ char.isntChar = isntChar;
3759
+
3760
+ var date = {};
3761
+
3762
+ date.isntDate = date.isDate = void 0;
3763
+ function isDate(val) {
3764
+ return val instanceof Date;
3765
+ }
3766
+ date.isDate = isDate;
3767
+ function isntDate(val) {
3768
+ return !isDate(val);
3769
+ }
3770
+ date.isntDate = isntDate;
3771
+
3772
+ var _enum = {};
3773
+
3774
+ _enum.inEnum = void 0;
3775
+ function inEnum(val, _enum) {
3776
+ return Object.values(_enum).includes(val);
3777
+ }
3778
+ _enum.inEnum = inEnum;
3779
+
3780
+ var error = {};
3781
+
3782
+ error.isntError = error.isError = void 0;
3783
+ function isError(val) {
3784
+ return val instanceof Error;
3785
+ }
3786
+ error.isError = isError;
3787
+ function isntError(val) {
3788
+ return !isError(val);
3789
+ }
3790
+ error.isntError = isntError;
3791
+
3792
+ var falsy = {};
3793
+
3794
+ falsy.isntFalsy = falsy.isFalsy = void 0;
3795
+ function isFalsy(val) {
3796
+ return !val;
3797
+ }
3798
+ falsy.isFalsy = isFalsy;
3799
+ function isntFalsy(val) {
3800
+ return !isFalsy(val);
3801
+ }
3802
+ falsy.isntFalsy = isntFalsy;
3803
+
3804
+ var _function = {};
3805
+
3806
+ _function.isntFunction = _function.isFunction = void 0;
3807
+ function isFunction(val) {
3808
+ return typeof val === 'function';
3809
+ }
3810
+ _function.isFunction = isFunction;
3811
+ function isntFunction(val) {
3812
+ return !isFunction(val);
3813
+ }
3814
+ _function.isntFunction = isntFunction;
3815
+
3816
+ var iterable = {};
3817
+
3818
+ iterable.isntIterable = iterable.isIterable = void 0;
3819
+ const null_1 = _null;
3820
+ const undefined_1$1 = _undefined;
3821
+ function isIterable(val) {
3822
+ return (0, null_1.isntNull)(val)
3823
+ && (0, undefined_1$1.isntUndefined)(val)
3824
+ && typeof val[Symbol.iterator] === 'function';
3825
+ }
3826
+ iterable.isIterable = isIterable;
3827
+ function isntIterable(val) {
3828
+ return !isIterable(val);
3829
+ }
3830
+ iterable.isntIterable = isntIterable;
3831
+
3832
+ var jsonRpc = {};
3833
+
3834
+ var object = {};
3835
+
3836
+ /**
3837
+ * lodash (Custom Build) <https://lodash.com/>
3838
+ * Build: `lodash modularize exports="npm" -o ./`
3839
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
3840
+ * Released under MIT license <https://lodash.com/license>
3841
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
3842
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3843
+ */
3844
+
3845
+ /** `Object#toString` result references. */
3846
+ var objectTag = '[object Object]';
3847
+
3848
+ /**
3849
+ * Checks if `value` is a host object in IE < 9.
3850
+ *
3851
+ * @private
3852
+ * @param {*} value The value to check.
3853
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
3854
+ */
3855
+ function isHostObject(value) {
3856
+ // Many host objects are `Object` objects that can coerce to strings
3857
+ // despite having improperly defined `toString` methods.
3858
+ var result = false;
3859
+ if (value != null && typeof value.toString != 'function') {
3860
+ try {
3861
+ result = !!(value + '');
3862
+ } catch (e) {}
3863
+ }
3864
+ return result;
3865
+ }
3866
+
3867
+ /**
3868
+ * Creates a unary function that invokes `func` with its argument transformed.
3869
+ *
3870
+ * @private
3871
+ * @param {Function} func The function to wrap.
3872
+ * @param {Function} transform The argument transform.
3873
+ * @returns {Function} Returns the new function.
3874
+ */
3875
+ function overArg(func, transform) {
3876
+ return function(arg) {
3877
+ return func(transform(arg));
3878
+ };
3879
+ }
3880
+
3881
+ /** Used for built-in method references. */
3882
+ var funcProto = Function.prototype,
3883
+ objectProto = Object.prototype;
3884
+
3885
+ /** Used to resolve the decompiled source of functions. */
3886
+ var funcToString = funcProto.toString;
3887
+
3888
+ /** Used to check objects for own properties. */
3889
+ var hasOwnProperty = objectProto.hasOwnProperty;
3890
+
3891
+ /** Used to infer the `Object` constructor. */
3892
+ var objectCtorString = funcToString.call(Object);
3893
+
3894
+ /**
3895
+ * Used to resolve the
3896
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3897
+ * of values.
3898
+ */
3899
+ var objectToString = objectProto.toString;
3900
+
3901
+ /** Built-in value references. */
3902
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
3903
+
3904
+ /**
3905
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3906
+ * and has a `typeof` result of "object".
3907
+ *
3908
+ * @static
3909
+ * @memberOf _
3910
+ * @since 4.0.0
3911
+ * @category Lang
3912
+ * @param {*} value The value to check.
3913
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
3914
+ * @example
3915
+ *
3916
+ * _.isObjectLike({});
3917
+ * // => true
3918
+ *
3919
+ * _.isObjectLike([1, 2, 3]);
3920
+ * // => true
3921
+ *
3922
+ * _.isObjectLike(_.noop);
3923
+ * // => false
3924
+ *
3925
+ * _.isObjectLike(null);
3926
+ * // => false
3927
+ */
3928
+ function isObjectLike(value) {
3929
+ return !!value && typeof value == 'object';
3930
+ }
3931
+
3932
+ /**
3933
+ * Checks if `value` is a plain object, that is, an object created by the
3934
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
3935
+ *
3936
+ * @static
3937
+ * @memberOf _
3938
+ * @since 0.8.0
3939
+ * @category Lang
3940
+ * @param {*} value The value to check.
3941
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
3942
+ * @example
3943
+ *
3944
+ * function Foo() {
3945
+ * this.a = 1;
3946
+ * }
3947
+ *
3948
+ * _.isPlainObject(new Foo);
3949
+ * // => false
3950
+ *
3951
+ * _.isPlainObject([1, 2, 3]);
3952
+ * // => false
3953
+ *
3954
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
3955
+ * // => true
3956
+ *
3957
+ * _.isPlainObject(Object.create(null));
3958
+ * // => true
3959
+ */
3960
+ function isPlainObject$1(value) {
3961
+ if (!isObjectLike(value) ||
3962
+ objectToString.call(value) != objectTag || isHostObject(value)) {
3963
+ return false;
3964
+ }
3965
+ var proto = getPrototype(value);
3966
+ if (proto === null) {
3967
+ return true;
3968
+ }
3969
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
3970
+ return (typeof Ctor == 'function' &&
3971
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
3972
+ }
3973
+
3974
+ var lodash_isplainobject = isPlainObject$1;
3975
+
3976
+ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
3977
+ return (mod && mod.__esModule) ? mod : { "default": mod };
3978
+ };object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
3979
+ const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
3980
+ function isObject(val) {
3981
+ return val !== null
3982
+ && typeof val === 'object';
3983
+ }
3984
+ object.isObject = isObject;
3985
+ function isntObject(val) {
3986
+ return !isObject(val);
3987
+ }
3988
+ object.isntObject = isntObject;
3989
+ function isPlainObject(val) {
3990
+ return (0, lodash_isplainobject_1.default)(val);
3991
+ }
3992
+ object.isPlainObject = isPlainObject;
3993
+ function isntPlainObject(val) {
3994
+ return !isPlainObject(val);
3995
+ }
3996
+ object.isntPlainObject = isntPlainObject;
3997
+ function isEmptyObject(val) {
3998
+ return Object.keys(val).length === 0;
3999
+ }
4000
+ object.isEmptyObject = isEmptyObject;
4001
+ function isntEmptyObject(val) {
4002
+ return Object.keys(val).length !== 0;
4003
+ }
4004
+ object.isntEmptyObject = isntEmptyObject;
4005
+
4006
+ var number = {};
4007
+
4008
+ number.isntNumber = number.isNumber = void 0;
4009
+ function isNumber(val) {
4010
+ return typeof val === 'number';
4011
+ }
4012
+ number.isNumber = isNumber;
4013
+ function isntNumber(val) {
4014
+ return !isNumber(val);
4015
+ }
4016
+ number.isntNumber = isntNumber;
4017
+
4018
+ jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
4019
+ const array_1 = array;
4020
+ const object_1 = object;
4021
+ const string_1 = string;
4022
+ const number_1 = number;
4023
+ const undefined_1 = _undefined;
4024
+ function isJsonRpcId(val) {
4025
+ return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
4026
+ }
4027
+ function isJsonRpcParams(val) {
4028
+ return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
4029
+ }
4030
+ function isJsonRpcNotification(val) {
4031
+ return (0, object_1.isPlainObject)(val)
4032
+ && (0, string_1.isString)(val.jsonrpc)
4033
+ && (0, string_1.isString)(val.method)
4034
+ && (0, undefined_1.isUndefined)(val.id)
4035
+ && isJsonRpcParams(val.params);
4036
+ }
4037
+ jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
4038
+ function isntJsonRpcNotification(val) {
4039
+ return !isJsonRpcNotification(val);
4040
+ }
4041
+ jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
4042
+ function isJsonRpcRequest(val) {
4043
+ return (0, object_1.isPlainObject)(val)
4044
+ && (0, string_1.isString)(val.jsonrpc)
4045
+ && (0, string_1.isString)(val.method)
4046
+ && isJsonRpcId(val.id)
4047
+ && isJsonRpcParams(val.params);
4048
+ }
4049
+ jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
4050
+ function isntJsonRpcRequest(val) {
4051
+ return !isJsonRpcRequest(val);
4052
+ }
4053
+ jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
4054
+ function isJsonRpcSuccess(val) {
4055
+ return (0, object_1.isPlainObject)(val)
4056
+ && (0, string_1.isString)(val.jsonrpc)
4057
+ && (0, string_1.isString)(val.id)
4058
+ && 'result' in val;
4059
+ }
4060
+ jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
4061
+ function isntJsonRpcSuccess(val) {
4062
+ return !isJsonRpcSuccess(val);
4063
+ }
4064
+ jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
4065
+ function isJsonRpcError(val) {
4066
+ return (0, object_1.isPlainObject)(val)
4067
+ && (0, string_1.isString)(val.jsonrpc)
4068
+ && isJsonRpcId(val.id)
4069
+ && isJsonRpcErrorObject(val.error);
4070
+ }
4071
+ jsonRpc.isJsonRpcError = isJsonRpcError;
4072
+ function isntJsonRpcError(val) {
4073
+ return !isJsonRpcError(val);
4074
+ }
4075
+ jsonRpc.isntJsonRpcError = isntJsonRpcError;
4076
+ function isJsonRpcErrorObject(val) {
4077
+ return (0, object_1.isPlainObject)(val)
4078
+ && (0, number_1.isNumber)(val.code)
4079
+ && (0, string_1.isString)(val.message)
4080
+ && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
4081
+ }
4082
+
4083
+ var json = {};
4084
+
4085
+ json.isntJson = json.isJson = void 0;
4086
+ function isJson(val) {
4087
+ try {
4088
+ JSON.stringify(val);
4089
+ return true;
4090
+ }
4091
+ catch (_a) {
4092
+ return false;
4093
+ }
4094
+ }
4095
+ json.isJson = isJson;
4096
+ function isntJson(val) {
4097
+ return !isntJson();
4098
+ }
4099
+ json.isntJson = isntJson;
4100
+
4101
+ var url = {};
4102
+
4103
+ url.isAbsoluteURL = void 0;
4104
+ function isAbsoluteURL(str) {
4105
+ try {
4106
+ new URL(str);
4107
+ return true;
4108
+ }
4109
+ catch (_a) {
4110
+ return false;
4111
+ }
4112
+ }
4113
+ url.isAbsoluteURL = isAbsoluteURL;
4114
+
4115
+ (function (exports) {
4116
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4117
+ if (k2 === undefined) k2 = k;
4118
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4119
+ }) : (function(o, m, k, k2) {
4120
+ if (k2 === undefined) k2 = k;
4121
+ o[k2] = m[k];
4122
+ }));
4123
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
4124
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
4125
+ };__exportStar(array, exports);
4126
+ __exportStar(asyncIterable, exports);
4127
+ __exportStar(bigint, exports);
4128
+ __exportStar(boolean, exports);
4129
+ __exportStar(char, exports);
4130
+ __exportStar(date, exports);
4131
+ __exportStar(_enum, exports);
4132
+ __exportStar(error, exports);
4133
+ __exportStar(falsy, exports);
4134
+ __exportStar(_function, exports);
4135
+ __exportStar(iterable, exports);
4136
+ __exportStar(jsonRpc, exports);
4137
+ __exportStar(json, exports);
4138
+ __exportStar(_null, exports);
4139
+ __exportStar(number, exports);
4140
+ __exportStar(object, exports);
4141
+ __exportStar(string, exports);
4142
+ __exportStar(_undefined, exports);
4143
+ __exportStar(url, exports);
4144
+
4145
+ }(es2018));
4146
+
4147
+ class ObservableFiniteStateMachine extends FiniteStateMachine {
4148
+ constructor() {
4149
+ super(...arguments);
4150
+ this.stateChanges = new Subject();
4151
+ }
4152
+ observeStateChanges() {
4153
+ return this.stateChanges;
4154
+ }
4155
+ /**
4156
+ * @throws {BadEventError}
4157
+ */
4158
+ send(event) {
4159
+ const oldState = this.state;
4160
+ super.send(event);
4161
+ const newState = this.state;
4162
+ this.stateChanges.next({ event, oldState, newState });
4163
+ if (es2018.isEmptyObject(this.schema[newState])) {
4164
+ this.stateChanges.complete();
4165
+ }
4166
+ }
4167
+ }
4168
+
4169
+ exports.BadEventError = BadEventError;
2947
4170
  exports.Box = Box;
2948
4171
  exports.Emitter = Emitter;
2949
4172
  exports.ExpirableMap = ExpirableMap;
4173
+ exports.FiniteStateMachine = FiniteStateMachine;
2950
4174
  exports.HashMap = HashMap;
2951
4175
  exports.HashSet = HashSet;
2952
4176
  exports.LRUMap = LRUMap;
4177
+ exports.ObservableFiniteStateMachine = ObservableFiniteStateMachine;
2953
4178
  exports.Queue = Queue;
2954
4179
  exports.TLRUMap = TLRUMap;
2955
4180
  exports.TrieMap = TrieMap;