woodenfish-bot 3.1.8 → 3.2.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.
Files changed (3) hide show
  1. package/es/index.js +715 -690
  2. package/lib/index.js +715 -690
  3. package/package.json +13 -13
package/lib/index.js CHANGED
@@ -367,8 +367,6 @@ function _asyncToGenerator(n) {
367
367
  };
368
368
  }
369
369
 
370
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
371
-
372
370
  function getDefaultExportFromCjs (x) {
373
371
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
374
372
  }
@@ -377,350 +375,369 @@ var regeneratorRuntime$1 = {exports: {}};
377
375
 
378
376
  var _typeof = {exports: {}};
379
377
 
380
- (function (module) {
381
- function _typeof(o) {
382
- "@babel/helpers - typeof";
378
+ var hasRequired_typeof;
379
+
380
+ function require_typeof () {
381
+ if (hasRequired_typeof) return _typeof.exports;
382
+ hasRequired_typeof = 1;
383
+ (function (module) {
384
+ function _typeof(o) {
385
+ "@babel/helpers - typeof";
386
+
387
+ return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
388
+ return typeof o;
389
+ } : function (o) {
390
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
391
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
392
+ }
393
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
394
+ } (_typeof));
395
+ return _typeof.exports;
396
+ }
383
397
 
384
- return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
385
- return typeof o;
386
- } : function (o) {
387
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
388
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
389
- }
390
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
391
- } (_typeof));
392
-
393
- var _typeofExports = _typeof.exports;
394
-
395
- (function (module) {
396
- var _typeof = _typeofExports["default"];
397
- function _regeneratorRuntime() {
398
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
399
- return e;
400
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
401
- var t,
402
- e = {},
403
- r = Object.prototype,
404
- n = r.hasOwnProperty,
405
- o = Object.defineProperty || function (t, e, r) {
406
- t[e] = r.value;
407
- },
408
- i = "function" == typeof Symbol ? Symbol : {},
409
- a = i.iterator || "@@iterator",
410
- c = i.asyncIterator || "@@asyncIterator",
411
- u = i.toStringTag || "@@toStringTag";
412
- function define(t, e, r) {
413
- return Object.defineProperty(t, e, {
414
- value: r,
415
- enumerable: !0,
416
- configurable: !0,
417
- writable: !0
418
- }), t[e];
419
- }
420
- try {
421
- define({}, "");
422
- } catch (t) {
423
- define = function define(t, e, r) {
424
- return t[e] = r;
425
- };
426
- }
427
- function wrap(t, e, r, n) {
428
- var i = e && e.prototype instanceof Generator ? e : Generator,
429
- a = Object.create(i.prototype),
430
- c = new Context(n || []);
431
- return o(a, "_invoke", {
432
- value: makeInvokeMethod(t, r, c)
433
- }), a;
434
- }
435
- function tryCatch(t, e, r) {
436
- try {
437
- return {
438
- type: "normal",
439
- arg: t.call(e, r)
440
- };
441
- } catch (t) {
442
- return {
443
- type: "throw",
444
- arg: t
445
- };
446
- }
447
- }
448
- e.wrap = wrap;
449
- var h = "suspendedStart",
450
- l = "suspendedYield",
451
- f = "executing",
452
- s = "completed",
453
- y = {};
454
- function Generator() {}
455
- function GeneratorFunction() {}
456
- function GeneratorFunctionPrototype() {}
457
- var p = {};
458
- define(p, a, function () {
459
- return this;
460
- });
461
- var d = Object.getPrototypeOf,
462
- v = d && d(d(values([])));
463
- v && v !== r && n.call(v, a) && (p = v);
464
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
465
- function defineIteratorMethods(t) {
466
- ["next", "throw", "return"].forEach(function (e) {
467
- define(t, e, function (t) {
468
- return this._invoke(e, t);
469
- });
470
- });
471
- }
472
- function AsyncIterator(t, e) {
473
- function invoke(r, o, i, a) {
474
- var c = tryCatch(t[r], t, o);
475
- if ("throw" !== c.type) {
476
- var u = c.arg,
477
- h = u.value;
478
- return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
479
- invoke("next", t, i, a);
480
- }, function (t) {
481
- invoke("throw", t, i, a);
482
- }) : e.resolve(h).then(function (t) {
483
- u.value = t, i(u);
484
- }, function (t) {
485
- return invoke("throw", t, i, a);
486
- });
487
- }
488
- a(c.arg);
489
- }
490
- var r;
491
- o(this, "_invoke", {
492
- value: function value(t, n) {
493
- function callInvokeWithMethodAndArg() {
494
- return new e(function (e, r) {
495
- invoke(t, n, e, r);
496
- });
497
- }
498
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
499
- }
500
- });
501
- }
502
- function makeInvokeMethod(e, r, n) {
503
- var o = h;
504
- return function (i, a) {
505
- if (o === f) throw Error("Generator is already running");
506
- if (o === s) {
507
- if ("throw" === i) throw a;
508
- return {
509
- value: t,
510
- done: !0
511
- };
512
- }
513
- for (n.method = i, n.arg = a;;) {
514
- var c = n.delegate;
515
- if (c) {
516
- var u = maybeInvokeDelegate(c, n);
517
- if (u) {
518
- if (u === y) continue;
519
- return u;
520
- }
521
- }
522
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
523
- if (o === h) throw o = s, n.arg;
524
- n.dispatchException(n.arg);
525
- } else "return" === n.method && n.abrupt("return", n.arg);
526
- o = f;
527
- var p = tryCatch(e, r, n);
528
- if ("normal" === p.type) {
529
- if (o = n.done ? s : l, p.arg === y) continue;
530
- return {
531
- value: p.arg,
532
- done: n.done
533
- };
534
- }
535
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
536
- }
537
- };
538
- }
539
- function maybeInvokeDelegate(e, r) {
540
- var n = r.method,
541
- o = e.iterator[n];
542
- if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
543
- var i = tryCatch(o, e.iterator, r.arg);
544
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
545
- var a = i.arg;
546
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
547
- }
548
- function pushTryEntry(t) {
549
- var e = {
550
- tryLoc: t[0]
551
- };
552
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
553
- }
554
- function resetTryEntry(t) {
555
- var e = t.completion || {};
556
- e.type = "normal", delete e.arg, t.completion = e;
557
- }
558
- function Context(t) {
559
- this.tryEntries = [{
560
- tryLoc: "root"
561
- }], t.forEach(pushTryEntry, this), this.reset(!0);
562
- }
563
- function values(e) {
564
- if (e || "" === e) {
565
- var r = e[a];
566
- if (r) return r.call(e);
567
- if ("function" == typeof e.next) return e;
568
- if (!isNaN(e.length)) {
569
- var o = -1,
570
- i = function next() {
571
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
572
- return next.value = t, next.done = !0, next;
573
- };
574
- return i.next = i;
575
- }
576
- }
577
- throw new TypeError(_typeof(e) + " is not iterable");
398
+ var hasRequiredRegeneratorRuntime;
399
+
400
+ function requireRegeneratorRuntime () {
401
+ if (hasRequiredRegeneratorRuntime) return regeneratorRuntime$1.exports;
402
+ hasRequiredRegeneratorRuntime = 1;
403
+ (function (module) {
404
+ var _typeof = require_typeof()["default"];
405
+ function _regeneratorRuntime() {
406
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
407
+ return e;
408
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
409
+ var t,
410
+ e = {},
411
+ r = Object.prototype,
412
+ n = r.hasOwnProperty,
413
+ o = Object.defineProperty || function (t, e, r) {
414
+ t[e] = r.value;
415
+ },
416
+ i = "function" == typeof Symbol ? Symbol : {},
417
+ a = i.iterator || "@@iterator",
418
+ c = i.asyncIterator || "@@asyncIterator",
419
+ u = i.toStringTag || "@@toStringTag";
420
+ function define(t, e, r) {
421
+ return Object.defineProperty(t, e, {
422
+ value: r,
423
+ enumerable: !0,
424
+ configurable: !0,
425
+ writable: !0
426
+ }), t[e];
427
+ }
428
+ try {
429
+ define({}, "");
430
+ } catch (t) {
431
+ define = function define(t, e, r) {
432
+ return t[e] = r;
433
+ };
434
+ }
435
+ function wrap(t, e, r, n) {
436
+ var i = e && e.prototype instanceof Generator ? e : Generator,
437
+ a = Object.create(i.prototype),
438
+ c = new Context(n || []);
439
+ return o(a, "_invoke", {
440
+ value: makeInvokeMethod(t, r, c)
441
+ }), a;
442
+ }
443
+ function tryCatch(t, e, r) {
444
+ try {
445
+ return {
446
+ type: "normal",
447
+ arg: t.call(e, r)
448
+ };
449
+ } catch (t) {
450
+ return {
451
+ type: "throw",
452
+ arg: t
453
+ };
454
+ }
455
+ }
456
+ e.wrap = wrap;
457
+ var h = "suspendedStart",
458
+ l = "suspendedYield",
459
+ f = "executing",
460
+ s = "completed",
461
+ y = {};
462
+ function Generator() {}
463
+ function GeneratorFunction() {}
464
+ function GeneratorFunctionPrototype() {}
465
+ var p = {};
466
+ define(p, a, function () {
467
+ return this;
468
+ });
469
+ var d = Object.getPrototypeOf,
470
+ v = d && d(d(values([])));
471
+ v && v !== r && n.call(v, a) && (p = v);
472
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
473
+ function defineIteratorMethods(t) {
474
+ ["next", "throw", "return"].forEach(function (e) {
475
+ define(t, e, function (t) {
476
+ return this._invoke(e, t);
477
+ });
478
+ });
479
+ }
480
+ function AsyncIterator(t, e) {
481
+ function invoke(r, o, i, a) {
482
+ var c = tryCatch(t[r], t, o);
483
+ if ("throw" !== c.type) {
484
+ var u = c.arg,
485
+ h = u.value;
486
+ return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
487
+ invoke("next", t, i, a);
488
+ }, function (t) {
489
+ invoke("throw", t, i, a);
490
+ }) : e.resolve(h).then(function (t) {
491
+ u.value = t, i(u);
492
+ }, function (t) {
493
+ return invoke("throw", t, i, a);
494
+ });
495
+ }
496
+ a(c.arg);
497
+ }
498
+ var r;
499
+ o(this, "_invoke", {
500
+ value: function value(t, n) {
501
+ function callInvokeWithMethodAndArg() {
502
+ return new e(function (e, r) {
503
+ invoke(t, n, e, r);
504
+ });
505
+ }
506
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
507
+ }
508
+ });
509
+ }
510
+ function makeInvokeMethod(e, r, n) {
511
+ var o = h;
512
+ return function (i, a) {
513
+ if (o === f) throw Error("Generator is already running");
514
+ if (o === s) {
515
+ if ("throw" === i) throw a;
516
+ return {
517
+ value: t,
518
+ done: !0
519
+ };
520
+ }
521
+ for (n.method = i, n.arg = a;;) {
522
+ var c = n.delegate;
523
+ if (c) {
524
+ var u = maybeInvokeDelegate(c, n);
525
+ if (u) {
526
+ if (u === y) continue;
527
+ return u;
528
+ }
529
+ }
530
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
531
+ if (o === h) throw o = s, n.arg;
532
+ n.dispatchException(n.arg);
533
+ } else "return" === n.method && n.abrupt("return", n.arg);
534
+ o = f;
535
+ var p = tryCatch(e, r, n);
536
+ if ("normal" === p.type) {
537
+ if (o = n.done ? s : l, p.arg === y) continue;
538
+ return {
539
+ value: p.arg,
540
+ done: n.done
541
+ };
542
+ }
543
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
544
+ }
545
+ };
546
+ }
547
+ function maybeInvokeDelegate(e, r) {
548
+ var n = r.method,
549
+ o = e.iterator[n];
550
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
551
+ var i = tryCatch(o, e.iterator, r.arg);
552
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
553
+ var a = i.arg;
554
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
555
+ }
556
+ function pushTryEntry(t) {
557
+ var e = {
558
+ tryLoc: t[0]
559
+ };
560
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
561
+ }
562
+ function resetTryEntry(t) {
563
+ var e = t.completion || {};
564
+ e.type = "normal", delete e.arg, t.completion = e;
565
+ }
566
+ function Context(t) {
567
+ this.tryEntries = [{
568
+ tryLoc: "root"
569
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
570
+ }
571
+ function values(e) {
572
+ if (e || "" === e) {
573
+ var r = e[a];
574
+ if (r) return r.call(e);
575
+ if ("function" == typeof e.next) return e;
576
+ if (!isNaN(e.length)) {
577
+ var o = -1,
578
+ i = function next() {
579
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
580
+ return next.value = t, next.done = !0, next;
581
+ };
582
+ return i.next = i;
583
+ }
584
+ }
585
+ throw new TypeError(_typeof(e) + " is not iterable");
586
+ }
587
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
588
+ value: GeneratorFunctionPrototype,
589
+ configurable: !0
590
+ }), o(GeneratorFunctionPrototype, "constructor", {
591
+ value: GeneratorFunction,
592
+ configurable: !0
593
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
594
+ var e = "function" == typeof t && t.constructor;
595
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
596
+ }, e.mark = function (t) {
597
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
598
+ }, e.awrap = function (t) {
599
+ return {
600
+ __await: t
601
+ };
602
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
603
+ return this;
604
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
605
+ void 0 === i && (i = Promise);
606
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
607
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
608
+ return t.done ? t.value : a.next();
609
+ });
610
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
611
+ return this;
612
+ }), define(g, "toString", function () {
613
+ return "[object Generator]";
614
+ }), e.keys = function (t) {
615
+ var e = Object(t),
616
+ r = [];
617
+ for (var n in e) r.push(n);
618
+ return r.reverse(), function next() {
619
+ for (; r.length;) {
620
+ var t = r.pop();
621
+ if (t in e) return next.value = t, next.done = !1, next;
622
+ }
623
+ return next.done = !0, next;
624
+ };
625
+ }, e.values = values, Context.prototype = {
626
+ constructor: Context,
627
+ reset: function reset(e) {
628
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
629
+ },
630
+ stop: function stop() {
631
+ this.done = !0;
632
+ var t = this.tryEntries[0].completion;
633
+ if ("throw" === t.type) throw t.arg;
634
+ return this.rval;
635
+ },
636
+ dispatchException: function dispatchException(e) {
637
+ if (this.done) throw e;
638
+ var r = this;
639
+ function handle(n, o) {
640
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
641
+ }
642
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
643
+ var i = this.tryEntries[o],
644
+ a = i.completion;
645
+ if ("root" === i.tryLoc) return handle("end");
646
+ if (i.tryLoc <= this.prev) {
647
+ var c = n.call(i, "catchLoc"),
648
+ u = n.call(i, "finallyLoc");
649
+ if (c && u) {
650
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
651
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
652
+ } else if (c) {
653
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
654
+ } else {
655
+ if (!u) throw Error("try statement without catch or finally");
656
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
657
+ }
658
+ }
659
+ }
660
+ },
661
+ abrupt: function abrupt(t, e) {
662
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
663
+ var o = this.tryEntries[r];
664
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
665
+ var i = o;
666
+ break;
667
+ }
668
+ }
669
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
670
+ var a = i ? i.completion : {};
671
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
672
+ },
673
+ complete: function complete(t, e) {
674
+ if ("throw" === t.type) throw t.arg;
675
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
676
+ },
677
+ finish: function finish(t) {
678
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
679
+ var r = this.tryEntries[e];
680
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
681
+ }
682
+ },
683
+ "catch": function _catch(t) {
684
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
685
+ var r = this.tryEntries[e];
686
+ if (r.tryLoc === t) {
687
+ var n = r.completion;
688
+ if ("throw" === n.type) {
689
+ var o = n.arg;
690
+ resetTryEntry(r);
691
+ }
692
+ return o;
693
+ }
694
+ }
695
+ throw Error("illegal catch attempt");
696
+ },
697
+ delegateYield: function delegateYield(e, r, n) {
698
+ return this.delegate = {
699
+ iterator: values(e),
700
+ resultName: r,
701
+ nextLoc: n
702
+ }, "next" === this.method && (this.arg = t), y;
703
+ }
704
+ }, e;
705
+ }
706
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
707
+ } (regeneratorRuntime$1));
708
+ return regeneratorRuntime$1.exports;
709
+ }
710
+
711
+ var regenerator;
712
+ var hasRequiredRegenerator;
713
+
714
+ function requireRegenerator () {
715
+ if (hasRequiredRegenerator) return regenerator;
716
+ hasRequiredRegenerator = 1;
717
+ // TODO(Babel 8): Remove this file.
718
+
719
+ var runtime = requireRegeneratorRuntime()();
720
+ regenerator = runtime;
721
+
722
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
723
+ try {
724
+ regeneratorRuntime = runtime;
725
+ } catch (accidentalStrictMode) {
726
+ if (typeof globalThis === "object") {
727
+ globalThis.regeneratorRuntime = runtime;
728
+ } else {
729
+ Function("r", "regeneratorRuntime = r")(runtime);
578
730
  }
579
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
580
- value: GeneratorFunctionPrototype,
581
- configurable: !0
582
- }), o(GeneratorFunctionPrototype, "constructor", {
583
- value: GeneratorFunction,
584
- configurable: !0
585
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
586
- var e = "function" == typeof t && t.constructor;
587
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
588
- }, e.mark = function (t) {
589
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
590
- }, e.awrap = function (t) {
591
- return {
592
- __await: t
593
- };
594
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
595
- return this;
596
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
597
- void 0 === i && (i = Promise);
598
- var a = new AsyncIterator(wrap(t, r, n, o), i);
599
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
600
- return t.done ? t.value : a.next();
601
- });
602
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
603
- return this;
604
- }), define(g, "toString", function () {
605
- return "[object Generator]";
606
- }), e.keys = function (t) {
607
- var e = Object(t),
608
- r = [];
609
- for (var n in e) r.push(n);
610
- return r.reverse(), function next() {
611
- for (; r.length;) {
612
- var t = r.pop();
613
- if (t in e) return next.value = t, next.done = !1, next;
614
- }
615
- return next.done = !0, next;
616
- };
617
- }, e.values = values, Context.prototype = {
618
- constructor: Context,
619
- reset: function reset(e) {
620
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
621
- },
622
- stop: function stop() {
623
- this.done = !0;
624
- var t = this.tryEntries[0].completion;
625
- if ("throw" === t.type) throw t.arg;
626
- return this.rval;
627
- },
628
- dispatchException: function dispatchException(e) {
629
- if (this.done) throw e;
630
- var r = this;
631
- function handle(n, o) {
632
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
633
- }
634
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
635
- var i = this.tryEntries[o],
636
- a = i.completion;
637
- if ("root" === i.tryLoc) return handle("end");
638
- if (i.tryLoc <= this.prev) {
639
- var c = n.call(i, "catchLoc"),
640
- u = n.call(i, "finallyLoc");
641
- if (c && u) {
642
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
643
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
644
- } else if (c) {
645
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
646
- } else {
647
- if (!u) throw Error("try statement without catch or finally");
648
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
649
- }
650
- }
651
- }
652
- },
653
- abrupt: function abrupt(t, e) {
654
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
655
- var o = this.tryEntries[r];
656
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
657
- var i = o;
658
- break;
659
- }
660
- }
661
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
662
- var a = i ? i.completion : {};
663
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
664
- },
665
- complete: function complete(t, e) {
666
- if ("throw" === t.type) throw t.arg;
667
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
668
- },
669
- finish: function finish(t) {
670
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
671
- var r = this.tryEntries[e];
672
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
673
- }
674
- },
675
- "catch": function _catch(t) {
676
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
677
- var r = this.tryEntries[e];
678
- if (r.tryLoc === t) {
679
- var n = r.completion;
680
- if ("throw" === n.type) {
681
- var o = n.arg;
682
- resetTryEntry(r);
683
- }
684
- return o;
685
- }
686
- }
687
- throw Error("illegal catch attempt");
688
- },
689
- delegateYield: function delegateYield(e, r, n) {
690
- return this.delegate = {
691
- iterator: values(e),
692
- resultName: r,
693
- nextLoc: n
694
- }, "next" === this.method && (this.arg = t), y;
695
- }
696
- }, e;
697
731
  }
698
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
699
- } (regeneratorRuntime$1));
700
-
701
- var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
702
-
703
- // TODO(Babel 8): Remove this file.
704
-
705
- var runtime = regeneratorRuntimeExports();
706
- var regenerator = runtime;
707
-
708
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
709
- try {
710
- regeneratorRuntime = runtime;
711
- } catch (accidentalStrictMode) {
712
- if (typeof globalThis === "object") {
713
- globalThis.regeneratorRuntime = runtime;
714
- } else {
715
- Function("r", "regeneratorRuntime = r")(runtime);
716
- }
732
+ return regenerator;
717
733
  }
718
734
 
719
- var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
735
+ var regeneratorExports = requireRegenerator();
736
+ var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regeneratorExports);
720
737
 
721
- var version = "3.1.8";
738
+ var version = "3.2.0";
722
739
 
723
- var loglevel = {exports: {}};
740
+ var loglevel$1 = {exports: {}};
724
741
 
725
742
  /*
726
743
  * loglevel - https://github.com/pimterry/loglevel
@@ -728,358 +745,366 @@ var loglevel = {exports: {}};
728
745
  * Copyright (c) 2013 Tim Perry
729
746
  * Licensed under the MIT license.
730
747
  */
748
+ var loglevel = loglevel$1.exports;
749
+
750
+ var hasRequiredLoglevel;
751
+
752
+ function requireLoglevel () {
753
+ if (hasRequiredLoglevel) return loglevel$1.exports;
754
+ hasRequiredLoglevel = 1;
755
+ (function (module) {
756
+ (function (root, definition) {
757
+ if (module.exports) {
758
+ module.exports = definition();
759
+ } else {
760
+ root.log = definition();
761
+ }
762
+ }(loglevel, function () {
763
+
764
+ // Slightly dubious tricks to cut down minimized file size
765
+ var noop = function() {};
766
+ var undefinedType = "undefined";
767
+ var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
768
+ /Trident\/|MSIE /.test(window.navigator.userAgent)
769
+ );
770
+
771
+ var logMethods = [
772
+ "trace",
773
+ "debug",
774
+ "info",
775
+ "warn",
776
+ "error"
777
+ ];
778
+
779
+ var _loggersByName = {};
780
+ var defaultLogger = null;
781
+
782
+ // Cross-browser bind equivalent that works at least back to IE6
783
+ function bindMethod(obj, methodName) {
784
+ var method = obj[methodName];
785
+ if (typeof method.bind === 'function') {
786
+ return method.bind(obj);
787
+ } else {
788
+ try {
789
+ return Function.prototype.bind.call(method, obj);
790
+ } catch (e) {
791
+ // Missing bind shim or IE8 + Modernizr, fallback to wrapping
792
+ return function() {
793
+ return Function.prototype.apply.apply(method, [obj, arguments]);
794
+ };
795
+ }
796
+ }
797
+ }
798
+
799
+ // Trace() doesn't print the message in IE, so for that case we need to wrap it
800
+ function traceForIE() {
801
+ if (console.log) {
802
+ if (console.log.apply) {
803
+ console.log.apply(console, arguments);
804
+ } else {
805
+ // In old IE, native console methods themselves don't have apply().
806
+ Function.prototype.apply.apply(console.log, [console, arguments]);
807
+ }
808
+ }
809
+ if (console.trace) console.trace();
810
+ }
811
+
812
+ // Build the best logging method possible for this env
813
+ // Wherever possible we want to bind, not wrap, to preserve stack traces
814
+ function realMethod(methodName) {
815
+ if (methodName === 'debug') {
816
+ methodName = 'log';
817
+ }
818
+
819
+ if (typeof console === undefinedType) {
820
+ return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
821
+ } else if (methodName === 'trace' && isIE) {
822
+ return traceForIE;
823
+ } else if (console[methodName] !== undefined) {
824
+ return bindMethod(console, methodName);
825
+ } else if (console.log !== undefined) {
826
+ return bindMethod(console, 'log');
827
+ } else {
828
+ return noop;
829
+ }
830
+ }
831
+
832
+ // These private functions always need `this` to be set properly
833
+
834
+ function replaceLoggingMethods() {
835
+ /*jshint validthis:true */
836
+ var level = this.getLevel();
837
+
838
+ // Replace the actual methods.
839
+ for (var i = 0; i < logMethods.length; i++) {
840
+ var methodName = logMethods[i];
841
+ this[methodName] = (i < level) ?
842
+ noop :
843
+ this.methodFactory(methodName, level, this.name);
844
+ }
845
+
846
+ // Define log.log as an alias for log.debug
847
+ this.log = this.debug;
848
+
849
+ // Return any important warnings.
850
+ if (typeof console === undefinedType && level < this.levels.SILENT) {
851
+ return "No console available for logging";
852
+ }
853
+ }
854
+
855
+ // In old IE versions, the console isn't present until you first open it.
856
+ // We build realMethod() replacements here that regenerate logging methods
857
+ function enableLoggingWhenConsoleArrives(methodName) {
858
+ return function () {
859
+ if (typeof console !== undefinedType) {
860
+ replaceLoggingMethods.call(this);
861
+ this[methodName].apply(this, arguments);
862
+ }
863
+ };
864
+ }
865
+
866
+ // By default, we use closely bound real methods wherever possible, and
867
+ // otherwise we wait for a console to appear, and then try again.
868
+ function defaultMethodFactory(methodName, _level, _loggerName) {
869
+ /*jshint validthis:true */
870
+ return realMethod(methodName) ||
871
+ enableLoggingWhenConsoleArrives.apply(this, arguments);
872
+ }
873
+
874
+ function Logger(name, factory) {
875
+ // Private instance variables.
876
+ var self = this;
877
+ /**
878
+ * The level inherited from a parent logger (or a global default). We
879
+ * cache this here rather than delegating to the parent so that it stays
880
+ * in sync with the actual logging methods that we have installed (the
881
+ * parent could change levels but we might not have rebuilt the loggers
882
+ * in this child yet).
883
+ * @type {number}
884
+ */
885
+ var inheritedLevel;
886
+ /**
887
+ * The default level for this logger, if any. If set, this overrides
888
+ * `inheritedLevel`.
889
+ * @type {number|null}
890
+ */
891
+ var defaultLevel;
892
+ /**
893
+ * A user-specific level for this logger. If set, this overrides
894
+ * `defaultLevel`.
895
+ * @type {number|null}
896
+ */
897
+ var userLevel;
898
+
899
+ var storageKey = "loglevel";
900
+ if (typeof name === "string") {
901
+ storageKey += ":" + name;
902
+ } else if (typeof name === "symbol") {
903
+ storageKey = undefined;
904
+ }
905
+
906
+ function persistLevelIfPossible(levelNum) {
907
+ var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
908
+
909
+ if (typeof window === undefinedType || !storageKey) return;
910
+
911
+ // Use localStorage if available
912
+ try {
913
+ window.localStorage[storageKey] = levelName;
914
+ return;
915
+ } catch (ignore) {}
916
+
917
+ // Use session cookie as fallback
918
+ try {
919
+ window.document.cookie =
920
+ encodeURIComponent(storageKey) + "=" + levelName + ";";
921
+ } catch (ignore) {}
922
+ }
923
+
924
+ function getPersistedLevel() {
925
+ var storedLevel;
926
+
927
+ if (typeof window === undefinedType || !storageKey) return;
928
+
929
+ try {
930
+ storedLevel = window.localStorage[storageKey];
931
+ } catch (ignore) {}
932
+
933
+ // Fallback to cookies if local storage gives us nothing
934
+ if (typeof storedLevel === undefinedType) {
935
+ try {
936
+ var cookie = window.document.cookie;
937
+ var cookieName = encodeURIComponent(storageKey);
938
+ var location = cookie.indexOf(cookieName + "=");
939
+ if (location !== -1) {
940
+ storedLevel = /^([^;]+)/.exec(
941
+ cookie.slice(location + cookieName.length + 1)
942
+ )[1];
943
+ }
944
+ } catch (ignore) {}
945
+ }
946
+
947
+ // If the stored level is not valid, treat it as if nothing was stored.
948
+ if (self.levels[storedLevel] === undefined) {
949
+ storedLevel = undefined;
950
+ }
951
+
952
+ return storedLevel;
953
+ }
954
+
955
+ function clearPersistedLevel() {
956
+ if (typeof window === undefinedType || !storageKey) return;
957
+
958
+ // Use localStorage if available
959
+ try {
960
+ window.localStorage.removeItem(storageKey);
961
+ } catch (ignore) {}
962
+
963
+ // Use session cookie as fallback
964
+ try {
965
+ window.document.cookie =
966
+ encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
967
+ } catch (ignore) {}
968
+ }
969
+
970
+ function normalizeLevel(input) {
971
+ var level = input;
972
+ if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
973
+ level = self.levels[level.toUpperCase()];
974
+ }
975
+ if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
976
+ return level;
977
+ } else {
978
+ throw new TypeError("log.setLevel() called with invalid level: " + input);
979
+ }
980
+ }
981
+
982
+ /*
983
+ *
984
+ * Public logger API - see https://github.com/pimterry/loglevel for details
985
+ *
986
+ */
987
+
988
+ self.name = name;
989
+
990
+ self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
991
+ "ERROR": 4, "SILENT": 5};
992
+
993
+ self.methodFactory = factory || defaultMethodFactory;
994
+
995
+ self.getLevel = function () {
996
+ if (userLevel != null) {
997
+ return userLevel;
998
+ } else if (defaultLevel != null) {
999
+ return defaultLevel;
1000
+ } else {
1001
+ return inheritedLevel;
1002
+ }
1003
+ };
1004
+
1005
+ self.setLevel = function (level, persist) {
1006
+ userLevel = normalizeLevel(level);
1007
+ if (persist !== false) { // defaults to true
1008
+ persistLevelIfPossible(userLevel);
1009
+ }
1010
+
1011
+ // NOTE: in v2, this should call rebuild(), which updates children.
1012
+ return replaceLoggingMethods.call(self);
1013
+ };
1014
+
1015
+ self.setDefaultLevel = function (level) {
1016
+ defaultLevel = normalizeLevel(level);
1017
+ if (!getPersistedLevel()) {
1018
+ self.setLevel(level, false);
1019
+ }
1020
+ };
1021
+
1022
+ self.resetLevel = function () {
1023
+ userLevel = null;
1024
+ clearPersistedLevel();
1025
+ replaceLoggingMethods.call(self);
1026
+ };
1027
+
1028
+ self.enableAll = function(persist) {
1029
+ self.setLevel(self.levels.TRACE, persist);
1030
+ };
1031
+
1032
+ self.disableAll = function(persist) {
1033
+ self.setLevel(self.levels.SILENT, persist);
1034
+ };
1035
+
1036
+ self.rebuild = function () {
1037
+ if (defaultLogger !== self) {
1038
+ inheritedLevel = normalizeLevel(defaultLogger.getLevel());
1039
+ }
1040
+ replaceLoggingMethods.call(self);
1041
+
1042
+ if (defaultLogger === self) {
1043
+ for (var childName in _loggersByName) {
1044
+ _loggersByName[childName].rebuild();
1045
+ }
1046
+ }
1047
+ };
1048
+
1049
+ // Initialize all the internal levels.
1050
+ inheritedLevel = normalizeLevel(
1051
+ defaultLogger ? defaultLogger.getLevel() : "WARN"
1052
+ );
1053
+ var initialLevel = getPersistedLevel();
1054
+ if (initialLevel != null) {
1055
+ userLevel = normalizeLevel(initialLevel);
1056
+ }
1057
+ replaceLoggingMethods.call(self);
1058
+ }
1059
+
1060
+ /*
1061
+ *
1062
+ * Top-level API
1063
+ *
1064
+ */
1065
+
1066
+ defaultLogger = new Logger();
1067
+
1068
+ defaultLogger.getLogger = function getLogger(name) {
1069
+ if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
1070
+ throw new TypeError("You must supply a name when creating a logger.");
1071
+ }
1072
+
1073
+ var logger = _loggersByName[name];
1074
+ if (!logger) {
1075
+ logger = _loggersByName[name] = new Logger(
1076
+ name,
1077
+ defaultLogger.methodFactory
1078
+ );
1079
+ }
1080
+ return logger;
1081
+ };
1082
+
1083
+ // Grab the current global log variable in case of overwrite
1084
+ var _log = (typeof window !== undefinedType) ? window.log : undefined;
1085
+ defaultLogger.noConflict = function() {
1086
+ if (typeof window !== undefinedType &&
1087
+ window.log === defaultLogger) {
1088
+ window.log = _log;
1089
+ }
1090
+
1091
+ return defaultLogger;
1092
+ };
1093
+
1094
+ defaultLogger.getLoggers = function getLoggers() {
1095
+ return _loggersByName;
1096
+ };
1097
+
1098
+ // ES6 default export, for compatibility
1099
+ defaultLogger['default'] = defaultLogger;
1100
+
1101
+ return defaultLogger;
1102
+ }));
1103
+ } (loglevel$1));
1104
+ return loglevel$1.exports;
1105
+ }
731
1106
 
732
- (function (module) {
733
- (function (root, definition) {
734
- if (module.exports) {
735
- module.exports = definition();
736
- } else {
737
- root.log = definition();
738
- }
739
- }(commonjsGlobal, function () {
740
-
741
- // Slightly dubious tricks to cut down minimized file size
742
- var noop = function() {};
743
- var undefinedType = "undefined";
744
- var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
745
- /Trident\/|MSIE /.test(window.navigator.userAgent)
746
- );
747
-
748
- var logMethods = [
749
- "trace",
750
- "debug",
751
- "info",
752
- "warn",
753
- "error"
754
- ];
755
-
756
- var _loggersByName = {};
757
- var defaultLogger = null;
758
-
759
- // Cross-browser bind equivalent that works at least back to IE6
760
- function bindMethod(obj, methodName) {
761
- var method = obj[methodName];
762
- if (typeof method.bind === 'function') {
763
- return method.bind(obj);
764
- } else {
765
- try {
766
- return Function.prototype.bind.call(method, obj);
767
- } catch (e) {
768
- // Missing bind shim or IE8 + Modernizr, fallback to wrapping
769
- return function() {
770
- return Function.prototype.apply.apply(method, [obj, arguments]);
771
- };
772
- }
773
- }
774
- }
775
-
776
- // Trace() doesn't print the message in IE, so for that case we need to wrap it
777
- function traceForIE() {
778
- if (console.log) {
779
- if (console.log.apply) {
780
- console.log.apply(console, arguments);
781
- } else {
782
- // In old IE, native console methods themselves don't have apply().
783
- Function.prototype.apply.apply(console.log, [console, arguments]);
784
- }
785
- }
786
- if (console.trace) console.trace();
787
- }
788
-
789
- // Build the best logging method possible for this env
790
- // Wherever possible we want to bind, not wrap, to preserve stack traces
791
- function realMethod(methodName) {
792
- if (methodName === 'debug') {
793
- methodName = 'log';
794
- }
795
-
796
- if (typeof console === undefinedType) {
797
- return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
798
- } else if (methodName === 'trace' && isIE) {
799
- return traceForIE;
800
- } else if (console[methodName] !== undefined) {
801
- return bindMethod(console, methodName);
802
- } else if (console.log !== undefined) {
803
- return bindMethod(console, 'log');
804
- } else {
805
- return noop;
806
- }
807
- }
808
-
809
- // These private functions always need `this` to be set properly
810
-
811
- function replaceLoggingMethods() {
812
- /*jshint validthis:true */
813
- var level = this.getLevel();
814
-
815
- // Replace the actual methods.
816
- for (var i = 0; i < logMethods.length; i++) {
817
- var methodName = logMethods[i];
818
- this[methodName] = (i < level) ?
819
- noop :
820
- this.methodFactory(methodName, level, this.name);
821
- }
822
-
823
- // Define log.log as an alias for log.debug
824
- this.log = this.debug;
825
-
826
- // Return any important warnings.
827
- if (typeof console === undefinedType && level < this.levels.SILENT) {
828
- return "No console available for logging";
829
- }
830
- }
831
-
832
- // In old IE versions, the console isn't present until you first open it.
833
- // We build realMethod() replacements here that regenerate logging methods
834
- function enableLoggingWhenConsoleArrives(methodName) {
835
- return function () {
836
- if (typeof console !== undefinedType) {
837
- replaceLoggingMethods.call(this);
838
- this[methodName].apply(this, arguments);
839
- }
840
- };
841
- }
842
-
843
- // By default, we use closely bound real methods wherever possible, and
844
- // otherwise we wait for a console to appear, and then try again.
845
- function defaultMethodFactory(methodName, _level, _loggerName) {
846
- /*jshint validthis:true */
847
- return realMethod(methodName) ||
848
- enableLoggingWhenConsoleArrives.apply(this, arguments);
849
- }
850
-
851
- function Logger(name, factory) {
852
- // Private instance variables.
853
- var self = this;
854
- /**
855
- * The level inherited from a parent logger (or a global default). We
856
- * cache this here rather than delegating to the parent so that it stays
857
- * in sync with the actual logging methods that we have installed (the
858
- * parent could change levels but we might not have rebuilt the loggers
859
- * in this child yet).
860
- * @type {number}
861
- */
862
- var inheritedLevel;
863
- /**
864
- * The default level for this logger, if any. If set, this overrides
865
- * `inheritedLevel`.
866
- * @type {number|null}
867
- */
868
- var defaultLevel;
869
- /**
870
- * A user-specific level for this logger. If set, this overrides
871
- * `defaultLevel`.
872
- * @type {number|null}
873
- */
874
- var userLevel;
875
-
876
- var storageKey = "loglevel";
877
- if (typeof name === "string") {
878
- storageKey += ":" + name;
879
- } else if (typeof name === "symbol") {
880
- storageKey = undefined;
881
- }
882
-
883
- function persistLevelIfPossible(levelNum) {
884
- var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
885
-
886
- if (typeof window === undefinedType || !storageKey) return;
887
-
888
- // Use localStorage if available
889
- try {
890
- window.localStorage[storageKey] = levelName;
891
- return;
892
- } catch (ignore) {}
893
-
894
- // Use session cookie as fallback
895
- try {
896
- window.document.cookie =
897
- encodeURIComponent(storageKey) + "=" + levelName + ";";
898
- } catch (ignore) {}
899
- }
900
-
901
- function getPersistedLevel() {
902
- var storedLevel;
903
-
904
- if (typeof window === undefinedType || !storageKey) return;
905
-
906
- try {
907
- storedLevel = window.localStorage[storageKey];
908
- } catch (ignore) {}
909
-
910
- // Fallback to cookies if local storage gives us nothing
911
- if (typeof storedLevel === undefinedType) {
912
- try {
913
- var cookie = window.document.cookie;
914
- var cookieName = encodeURIComponent(storageKey);
915
- var location = cookie.indexOf(cookieName + "=");
916
- if (location !== -1) {
917
- storedLevel = /^([^;]+)/.exec(
918
- cookie.slice(location + cookieName.length + 1)
919
- )[1];
920
- }
921
- } catch (ignore) {}
922
- }
923
-
924
- // If the stored level is not valid, treat it as if nothing was stored.
925
- if (self.levels[storedLevel] === undefined) {
926
- storedLevel = undefined;
927
- }
928
-
929
- return storedLevel;
930
- }
931
-
932
- function clearPersistedLevel() {
933
- if (typeof window === undefinedType || !storageKey) return;
934
-
935
- // Use localStorage if available
936
- try {
937
- window.localStorage.removeItem(storageKey);
938
- } catch (ignore) {}
939
-
940
- // Use session cookie as fallback
941
- try {
942
- window.document.cookie =
943
- encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
944
- } catch (ignore) {}
945
- }
946
-
947
- function normalizeLevel(input) {
948
- var level = input;
949
- if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
950
- level = self.levels[level.toUpperCase()];
951
- }
952
- if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
953
- return level;
954
- } else {
955
- throw new TypeError("log.setLevel() called with invalid level: " + input);
956
- }
957
- }
958
-
959
- /*
960
- *
961
- * Public logger API - see https://github.com/pimterry/loglevel for details
962
- *
963
- */
964
-
965
- self.name = name;
966
-
967
- self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
968
- "ERROR": 4, "SILENT": 5};
969
-
970
- self.methodFactory = factory || defaultMethodFactory;
971
-
972
- self.getLevel = function () {
973
- if (userLevel != null) {
974
- return userLevel;
975
- } else if (defaultLevel != null) {
976
- return defaultLevel;
977
- } else {
978
- return inheritedLevel;
979
- }
980
- };
981
-
982
- self.setLevel = function (level, persist) {
983
- userLevel = normalizeLevel(level);
984
- if (persist !== false) { // defaults to true
985
- persistLevelIfPossible(userLevel);
986
- }
987
-
988
- // NOTE: in v2, this should call rebuild(), which updates children.
989
- return replaceLoggingMethods.call(self);
990
- };
991
-
992
- self.setDefaultLevel = function (level) {
993
- defaultLevel = normalizeLevel(level);
994
- if (!getPersistedLevel()) {
995
- self.setLevel(level, false);
996
- }
997
- };
998
-
999
- self.resetLevel = function () {
1000
- userLevel = null;
1001
- clearPersistedLevel();
1002
- replaceLoggingMethods.call(self);
1003
- };
1004
-
1005
- self.enableAll = function(persist) {
1006
- self.setLevel(self.levels.TRACE, persist);
1007
- };
1008
-
1009
- self.disableAll = function(persist) {
1010
- self.setLevel(self.levels.SILENT, persist);
1011
- };
1012
-
1013
- self.rebuild = function () {
1014
- if (defaultLogger !== self) {
1015
- inheritedLevel = normalizeLevel(defaultLogger.getLevel());
1016
- }
1017
- replaceLoggingMethods.call(self);
1018
-
1019
- if (defaultLogger === self) {
1020
- for (var childName in _loggersByName) {
1021
- _loggersByName[childName].rebuild();
1022
- }
1023
- }
1024
- };
1025
-
1026
- // Initialize all the internal levels.
1027
- inheritedLevel = normalizeLevel(
1028
- defaultLogger ? defaultLogger.getLevel() : "WARN"
1029
- );
1030
- var initialLevel = getPersistedLevel();
1031
- if (initialLevel != null) {
1032
- userLevel = normalizeLevel(initialLevel);
1033
- }
1034
- replaceLoggingMethods.call(self);
1035
- }
1036
-
1037
- /*
1038
- *
1039
- * Top-level API
1040
- *
1041
- */
1042
-
1043
- defaultLogger = new Logger();
1044
-
1045
- defaultLogger.getLogger = function getLogger(name) {
1046
- if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
1047
- throw new TypeError("You must supply a name when creating a logger.");
1048
- }
1049
-
1050
- var logger = _loggersByName[name];
1051
- if (!logger) {
1052
- logger = _loggersByName[name] = new Logger(
1053
- name,
1054
- defaultLogger.methodFactory
1055
- );
1056
- }
1057
- return logger;
1058
- };
1059
-
1060
- // Grab the current global log variable in case of overwrite
1061
- var _log = (typeof window !== undefinedType) ? window.log : undefined;
1062
- defaultLogger.noConflict = function() {
1063
- if (typeof window !== undefinedType &&
1064
- window.log === defaultLogger) {
1065
- window.log = _log;
1066
- }
1067
-
1068
- return defaultLogger;
1069
- };
1070
-
1071
- defaultLogger.getLoggers = function getLoggers() {
1072
- return _loggersByName;
1073
- };
1074
-
1075
- // ES6 default export, for compatibility
1076
- defaultLogger['default'] = defaultLogger;
1077
-
1078
- return defaultLogger;
1079
- }));
1080
- } (loglevel));
1081
-
1082
- var loglevelExports = loglevel.exports;
1107
+ var loglevelExports = requireLoglevel();
1083
1108
  var log = /*@__PURE__*/getDefaultExportFromCjs(loglevelExports);
1084
1109
 
1085
1110
  log.setLevel('info');