@depay/widgets 6.30.0 → 6.30.1

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.
@@ -66,763 +66,377 @@ function createCommonjsModule$4(fn) {
66
66
  return fn(module, module.exports), module.exports;
67
67
  }
68
68
 
69
- /**
70
- * Copyright (c) 2014-present, Facebook, Inc.
71
- *
72
- * This source code is licensed under the MIT license found in the
73
- * LICENSE file in the root directory of this source tree.
74
- */
69
+ var _typeof_1 = createCommonjsModule$4(function (module) {
70
+ function _typeof(obj) {
71
+ "@babel/helpers - typeof";
72
+
73
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
74
+ return typeof obj;
75
+ } : function (obj) {
76
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
77
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
78
+ }
79
+
80
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
81
+ });
75
82
 
76
- var runtime_1 = createCommonjsModule$4(function (module) {
77
- var runtime = (function (exports) {
83
+ var regeneratorRuntime = createCommonjsModule$4(function (module) {
84
+ var _typeof = _typeof_1["default"];
78
85
 
79
- var Op = Object.prototype;
80
- var hasOwn = Op.hasOwnProperty;
81
- var undefined$1; // More compressible than void 0.
82
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
83
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
84
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
85
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
86
+ function _regeneratorRuntime() {
87
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
88
+
89
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
90
+ return exports;
91
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
92
+ var exports = {},
93
+ Op = Object.prototype,
94
+ hasOwn = Op.hasOwnProperty,
95
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
96
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
97
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
98
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
86
99
 
87
100
  function define(obj, key, value) {
88
- Object.defineProperty(obj, key, {
101
+ return Object.defineProperty(obj, key, {
89
102
  value: value,
90
- enumerable: true,
91
- configurable: true,
92
- writable: true
93
- });
94
- return obj[key];
103
+ enumerable: !0,
104
+ configurable: !0,
105
+ writable: !0
106
+ }), obj[key];
95
107
  }
108
+
96
109
  try {
97
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
98
110
  define({}, "");
99
111
  } catch (err) {
100
- define = function(obj, key, value) {
112
+ define = function define(obj, key, value) {
101
113
  return obj[key] = value;
102
114
  };
103
115
  }
104
116
 
105
117
  function wrap(innerFn, outerFn, self, tryLocsList) {
106
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
107
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
108
- var generator = Object.create(protoGenerator.prototype);
109
- var context = new Context(tryLocsList || []);
118
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
119
+ generator = Object.create(protoGenerator.prototype),
120
+ context = new Context(tryLocsList || []);
121
+ return generator._invoke = function (innerFn, self, context) {
122
+ var state = "suspendedStart";
123
+ return function (method, arg) {
124
+ if ("executing" === state) throw new Error("Generator is already running");
125
+
126
+ if ("completed" === state) {
127
+ if ("throw" === method) throw arg;
128
+ return doneResult();
129
+ }
130
+
131
+ for (context.method = method, context.arg = arg;;) {
132
+ var delegate = context.delegate;
133
+
134
+ if (delegate) {
135
+ var delegateResult = maybeInvokeDelegate(delegate, context);
136
+
137
+ if (delegateResult) {
138
+ if (delegateResult === ContinueSentinel) continue;
139
+ return delegateResult;
140
+ }
141
+ }
110
142
 
111
- // The ._invoke method unifies the implementations of the .next,
112
- // .throw, and .return methods.
113
- generator._invoke = makeInvokeMethod(innerFn, self, context);
143
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
144
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
145
+ context.dispatchException(context.arg);
146
+ } else "return" === context.method && context.abrupt("return", context.arg);
147
+ state = "executing";
148
+ var record = tryCatch(innerFn, self, context);
114
149
 
115
- return generator;
150
+ if ("normal" === record.type) {
151
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
152
+ return {
153
+ value: record.arg,
154
+ done: context.done
155
+ };
156
+ }
157
+
158
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
159
+ }
160
+ };
161
+ }(innerFn, self, context), generator;
116
162
  }
117
- exports.wrap = wrap;
118
163
 
119
- // Try/catch helper to minimize deoptimizations. Returns a completion
120
- // record like context.tryEntries[i].completion. This interface could
121
- // have been (and was previously) designed to take a closure to be
122
- // invoked without arguments, but in all the cases we care about we
123
- // already have an existing method we want to call, so there's no need
124
- // to create a new function object. We can even get away with assuming
125
- // the method takes exactly one argument, since that happens to be true
126
- // in every case, so we don't have to touch the arguments object. The
127
- // only additional allocation required is the completion record, which
128
- // has a stable shape and so hopefully should be cheap to allocate.
129
164
  function tryCatch(fn, obj, arg) {
130
165
  try {
131
- return { type: "normal", arg: fn.call(obj, arg) };
166
+ return {
167
+ type: "normal",
168
+ arg: fn.call(obj, arg)
169
+ };
132
170
  } catch (err) {
133
- return { type: "throw", arg: err };
171
+ return {
172
+ type: "throw",
173
+ arg: err
174
+ };
134
175
  }
135
176
  }
136
177
 
137
- var GenStateSuspendedStart = "suspendedStart";
138
- var GenStateSuspendedYield = "suspendedYield";
139
- var GenStateExecuting = "executing";
140
- var GenStateCompleted = "completed";
141
-
142
- // Returning this object from the innerFn has the same effect as
143
- // breaking out of the dispatch switch statement.
178
+ exports.wrap = wrap;
144
179
  var ContinueSentinel = {};
145
180
 
146
- // Dummy constructor functions that we use as the .constructor and
147
- // .constructor.prototype properties for functions that return Generator
148
- // objects. For full spec compliance, you may wish to configure your
149
- // minifier not to mangle the names of these two functions.
150
181
  function Generator() {}
182
+
151
183
  function GeneratorFunction() {}
184
+
152
185
  function GeneratorFunctionPrototype() {}
153
186
 
154
- // This is a polyfill for %IteratorPrototype% for environments that
155
- // don't natively support it.
156
187
  var IteratorPrototype = {};
157
188
  define(IteratorPrototype, iteratorSymbol, function () {
158
189
  return this;
159
190
  });
191
+ var getProto = Object.getPrototypeOf,
192
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
193
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
194
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
160
195
 
161
- var getProto = Object.getPrototypeOf;
162
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
163
- if (NativeIteratorPrototype &&
164
- NativeIteratorPrototype !== Op &&
165
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
166
- // This environment has a native %IteratorPrototype%; use it instead
167
- // of the polyfill.
168
- IteratorPrototype = NativeIteratorPrototype;
169
- }
170
-
171
- var Gp = GeneratorFunctionPrototype.prototype =
172
- Generator.prototype = Object.create(IteratorPrototype);
173
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
174
- define(Gp, "constructor", GeneratorFunctionPrototype);
175
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
176
- GeneratorFunction.displayName = define(
177
- GeneratorFunctionPrototype,
178
- toStringTagSymbol,
179
- "GeneratorFunction"
180
- );
181
-
182
- // Helper for defining the .next, .throw, and .return methods of the
183
- // Iterator interface in terms of a single ._invoke method.
184
196
  function defineIteratorMethods(prototype) {
185
- ["next", "throw", "return"].forEach(function(method) {
186
- define(prototype, method, function(arg) {
197
+ ["next", "throw", "return"].forEach(function (method) {
198
+ define(prototype, method, function (arg) {
187
199
  return this._invoke(method, arg);
188
200
  });
189
201
  });
190
202
  }
191
203
 
192
- exports.isGeneratorFunction = function(genFun) {
193
- var ctor = typeof genFun === "function" && genFun.constructor;
194
- return ctor
195
- ? ctor === GeneratorFunction ||
196
- // For the native GeneratorFunction constructor, the best we can
197
- // do is to check its .name property.
198
- (ctor.displayName || ctor.name) === "GeneratorFunction"
199
- : false;
200
- };
201
-
202
- exports.mark = function(genFun) {
203
- if (Object.setPrototypeOf) {
204
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
205
- } else {
206
- genFun.__proto__ = GeneratorFunctionPrototype;
207
- define(genFun, toStringTagSymbol, "GeneratorFunction");
208
- }
209
- genFun.prototype = Object.create(Gp);
210
- return genFun;
211
- };
212
-
213
- // Within the body of any async function, `await x` is transformed to
214
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
215
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
216
- // meant to be awaited.
217
- exports.awrap = function(arg) {
218
- return { __await: arg };
219
- };
220
-
221
204
  function AsyncIterator(generator, PromiseImpl) {
222
205
  function invoke(method, arg, resolve, reject) {
223
206
  var record = tryCatch(generator[method], generator, arg);
224
- if (record.type === "throw") {
225
- reject(record.arg);
226
- } else {
227
- var result = record.arg;
228
- var value = result.value;
229
- if (value &&
230
- typeof value === "object" &&
231
- hasOwn.call(value, "__await")) {
232
- return PromiseImpl.resolve(value.__await).then(function(value) {
233
- invoke("next", value, resolve, reject);
234
- }, function(err) {
235
- invoke("throw", err, resolve, reject);
236
- });
237
- }
238
207
 
239
- return PromiseImpl.resolve(value).then(function(unwrapped) {
240
- // When a yielded Promise is resolved, its final value becomes
241
- // the .value of the Promise<{value,done}> result for the
242
- // current iteration.
243
- result.value = unwrapped;
244
- resolve(result);
245
- }, function(error) {
246
- // If a rejected Promise was yielded, throw the rejection back
247
- // into the async generator function so it can be handled there.
208
+ if ("throw" !== record.type) {
209
+ var result = record.arg,
210
+ value = result.value;
211
+ return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
212
+ invoke("next", value, resolve, reject);
213
+ }, function (err) {
214
+ invoke("throw", err, resolve, reject);
215
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
216
+ result.value = unwrapped, resolve(result);
217
+ }, function (error) {
248
218
  return invoke("throw", error, resolve, reject);
249
219
  });
250
220
  }
221
+
222
+ reject(record.arg);
251
223
  }
252
224
 
253
225
  var previousPromise;
254
226
 
255
- function enqueue(method, arg) {
227
+ this._invoke = function (method, arg) {
256
228
  function callInvokeWithMethodAndArg() {
257
- return new PromiseImpl(function(resolve, reject) {
229
+ return new PromiseImpl(function (resolve, reject) {
258
230
  invoke(method, arg, resolve, reject);
259
231
  });
260
232
  }
261
233
 
262
- return previousPromise =
263
- // If enqueue has been called before, then we want to wait until
264
- // all previous Promises have been resolved before calling invoke,
265
- // so that results are always delivered in the correct order. If
266
- // enqueue has not been called before, then it is important to
267
- // call invoke immediately, without waiting on a callback to fire,
268
- // so that the async generator function has the opportunity to do
269
- // any necessary setup in a predictable way. This predictability
270
- // is why the Promise constructor synchronously invokes its
271
- // executor callback, and why async functions synchronously
272
- // execute code before the first await. Since we implement simple
273
- // async functions in terms of async generators, it is especially
274
- // important to get this right, even though it requires care.
275
- previousPromise ? previousPromise.then(
276
- callInvokeWithMethodAndArg,
277
- // Avoid propagating failures to Promises returned by later
278
- // invocations of the iterator.
279
- callInvokeWithMethodAndArg
280
- ) : callInvokeWithMethodAndArg();
281
- }
282
-
283
- // Define the unified helper method that is used to implement .next,
284
- // .throw, and .return (see defineIteratorMethods).
285
- this._invoke = enqueue;
286
- }
287
-
288
- defineIteratorMethods(AsyncIterator.prototype);
289
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
290
- return this;
291
- });
292
- exports.AsyncIterator = AsyncIterator;
293
-
294
- // Note that simple async functions are implemented on top of
295
- // AsyncIterator objects; they just return a Promise for the value of
296
- // the final result produced by the iterator.
297
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
298
- if (PromiseImpl === void 0) PromiseImpl = Promise;
299
-
300
- var iter = new AsyncIterator(
301
- wrap(innerFn, outerFn, self, tryLocsList),
302
- PromiseImpl
303
- );
304
-
305
- return exports.isGeneratorFunction(outerFn)
306
- ? iter // If outerFn is a generator, return the full iterator.
307
- : iter.next().then(function(result) {
308
- return result.done ? result.value : iter.next();
309
- });
310
- };
311
-
312
- function makeInvokeMethod(innerFn, self, context) {
313
- var state = GenStateSuspendedStart;
314
-
315
- return function invoke(method, arg) {
316
- if (state === GenStateExecuting) {
317
- throw new Error("Generator is already running");
318
- }
319
-
320
- if (state === GenStateCompleted) {
321
- if (method === "throw") {
322
- throw arg;
323
- }
324
-
325
- // Be forgiving, per 25.3.3.3.3 of the spec:
326
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
327
- return doneResult();
328
- }
329
-
330
- context.method = method;
331
- context.arg = arg;
332
-
333
- while (true) {
334
- var delegate = context.delegate;
335
- if (delegate) {
336
- var delegateResult = maybeInvokeDelegate(delegate, context);
337
- if (delegateResult) {
338
- if (delegateResult === ContinueSentinel) continue;
339
- return delegateResult;
340
- }
341
- }
342
-
343
- if (context.method === "next") {
344
- // Setting context._sent for legacy support of Babel's
345
- // function.sent implementation.
346
- context.sent = context._sent = context.arg;
347
-
348
- } else if (context.method === "throw") {
349
- if (state === GenStateSuspendedStart) {
350
- state = GenStateCompleted;
351
- throw context.arg;
352
- }
353
-
354
- context.dispatchException(context.arg);
355
-
356
- } else if (context.method === "return") {
357
- context.abrupt("return", context.arg);
358
- }
359
-
360
- state = GenStateExecuting;
361
-
362
- var record = tryCatch(innerFn, self, context);
363
- if (record.type === "normal") {
364
- // If an exception is thrown from innerFn, we leave state ===
365
- // GenStateExecuting and loop back for another invocation.
366
- state = context.done
367
- ? GenStateCompleted
368
- : GenStateSuspendedYield;
369
-
370
- if (record.arg === ContinueSentinel) {
371
- continue;
372
- }
373
-
374
- return {
375
- value: record.arg,
376
- done: context.done
377
- };
378
-
379
- } else if (record.type === "throw") {
380
- state = GenStateCompleted;
381
- // Dispatch the exception by looping back around to the
382
- // context.dispatchException(context.arg) call above.
383
- context.method = "throw";
384
- context.arg = record.arg;
385
- }
386
- }
234
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
387
235
  };
388
236
  }
389
237
 
390
- // Call delegate.iterator[context.method](context.arg) and handle the
391
- // result, either by returning a { value, done } result from the
392
- // delegate iterator, or by modifying context.method and context.arg,
393
- // setting context.delegate to null, and returning the ContinueSentinel.
394
238
  function maybeInvokeDelegate(delegate, context) {
395
239
  var method = delegate.iterator[context.method];
396
- if (method === undefined$1) {
397
- // A .throw or .return when the delegate iterator has no .throw
398
- // method always terminates the yield* loop.
399
- context.delegate = null;
400
-
401
- if (context.method === "throw") {
402
- // Note: ["return"] must be used for ES3 parsing compatibility.
403
- if (delegate.iterator["return"]) {
404
- // If the delegate iterator has a return method, give it a
405
- // chance to clean up.
406
- context.method = "return";
407
- context.arg = undefined$1;
408
- maybeInvokeDelegate(delegate, context);
409
-
410
- if (context.method === "throw") {
411
- // If maybeInvokeDelegate(context) changed context.method from
412
- // "return" to "throw", let that override the TypeError below.
413
- return ContinueSentinel;
414
- }
415
- }
416
240
 
417
- context.method = "throw";
418
- context.arg = new TypeError(
419
- "The iterator does not provide a 'throw' method");
241
+ if (undefined === method) {
242
+ if (context.delegate = null, "throw" === context.method) {
243
+ if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
244
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
420
245
  }
421
246
 
422
247
  return ContinueSentinel;
423
248
  }
424
249
 
425
250
  var record = tryCatch(method, delegate.iterator, context.arg);
426
-
427
- if (record.type === "throw") {
428
- context.method = "throw";
429
- context.arg = record.arg;
430
- context.delegate = null;
431
- return ContinueSentinel;
432
- }
433
-
251
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
434
252
  var info = record.arg;
435
-
436
- if (! info) {
437
- context.method = "throw";
438
- context.arg = new TypeError("iterator result is not an object");
439
- context.delegate = null;
440
- return ContinueSentinel;
441
- }
442
-
443
- if (info.done) {
444
- // Assign the result of the finished delegate to the temporary
445
- // variable specified by delegate.resultName (see delegateYield).
446
- context[delegate.resultName] = info.value;
447
-
448
- // Resume execution at the desired location (see delegateYield).
449
- context.next = delegate.nextLoc;
450
-
451
- // If context.method was "throw" but the delegate handled the
452
- // exception, let the outer generator proceed normally. If
453
- // context.method was "next", forget context.arg since it has been
454
- // "consumed" by the delegate iterator. If context.method was
455
- // "return", allow the original .return call to continue in the
456
- // outer generator.
457
- if (context.method !== "return") {
458
- context.method = "next";
459
- context.arg = undefined$1;
460
- }
461
-
462
- } else {
463
- // Re-yield the result returned by the delegate method.
464
- return info;
465
- }
466
-
467
- // The delegate iterator is finished, so forget it and continue with
468
- // the outer generator.
469
- context.delegate = null;
470
- return ContinueSentinel;
253
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
471
254
  }
472
255
 
473
- // Define Generator.prototype.{next,throw,return} in terms of the
474
- // unified ._invoke helper method.
475
- defineIteratorMethods(Gp);
476
-
477
- define(Gp, toStringTagSymbol, "Generator");
478
-
479
- // A Generator should always return itself as the iterator object when the
480
- // @@iterator function is called on it. Some browsers' implementations of the
481
- // iterator prototype chain incorrectly implement this, causing the Generator
482
- // object to not be returned from this call. This ensures that doesn't happen.
483
- // See https://github.com/facebook/regenerator/issues/274 for more details.
484
- define(Gp, iteratorSymbol, function() {
485
- return this;
486
- });
487
-
488
- define(Gp, "toString", function() {
489
- return "[object Generator]";
490
- });
491
-
492
256
  function pushTryEntry(locs) {
493
- var entry = { tryLoc: locs[0] };
494
-
495
- if (1 in locs) {
496
- entry.catchLoc = locs[1];
497
- }
498
-
499
- if (2 in locs) {
500
- entry.finallyLoc = locs[2];
501
- entry.afterLoc = locs[3];
502
- }
503
-
504
- this.tryEntries.push(entry);
257
+ var entry = {
258
+ tryLoc: locs[0]
259
+ };
260
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
505
261
  }
506
262
 
507
263
  function resetTryEntry(entry) {
508
264
  var record = entry.completion || {};
509
- record.type = "normal";
510
- delete record.arg;
511
- entry.completion = record;
265
+ record.type = "normal", delete record.arg, entry.completion = record;
512
266
  }
513
267
 
514
268
  function Context(tryLocsList) {
515
- // The root entry object (effectively a try statement without a catch
516
- // or a finally block) gives us a place to store values thrown from
517
- // locations where there is no enclosing try statement.
518
- this.tryEntries = [{ tryLoc: "root" }];
519
- tryLocsList.forEach(pushTryEntry, this);
520
- this.reset(true);
269
+ this.tryEntries = [{
270
+ tryLoc: "root"
271
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
521
272
  }
522
273
 
523
- exports.keys = function(object) {
524
- var keys = [];
525
- for (var key in object) {
526
- keys.push(key);
527
- }
528
- keys.reverse();
529
-
530
- // Rather than returning an object with a next method, we keep
531
- // things simple and return the next function itself.
532
- return function next() {
533
- while (keys.length) {
534
- var key = keys.pop();
535
- if (key in object) {
536
- next.value = key;
537
- next.done = false;
538
- return next;
539
- }
540
- }
541
-
542
- // To avoid creating an additional object, we just hang the .value
543
- // and .done properties off the next function object itself. This
544
- // also ensures that the minifier will not anonymize the function.
545
- next.done = true;
546
- return next;
547
- };
548
- };
549
-
550
274
  function values(iterable) {
551
275
  if (iterable) {
552
276
  var iteratorMethod = iterable[iteratorSymbol];
553
- if (iteratorMethod) {
554
- return iteratorMethod.call(iterable);
555
- }
556
-
557
- if (typeof iterable.next === "function") {
558
- return iterable;
559
- }
277
+ if (iteratorMethod) return iteratorMethod.call(iterable);
278
+ if ("function" == typeof iterable.next) return iterable;
560
279
 
561
280
  if (!isNaN(iterable.length)) {
562
- var i = -1, next = function next() {
563
- while (++i < iterable.length) {
564
- if (hasOwn.call(iterable, i)) {
565
- next.value = iterable[i];
566
- next.done = false;
567
- return next;
568
- }
281
+ var i = -1,
282
+ next = function next() {
283
+ for (; ++i < iterable.length;) {
284
+ if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
569
285
  }
570
286
 
571
- next.value = undefined$1;
572
- next.done = true;
573
-
574
- return next;
287
+ return next.value = undefined, next.done = !0, next;
575
288
  };
576
289
 
577
290
  return next.next = next;
578
291
  }
579
292
  }
580
293
 
581
- // Return an iterator with no values.
582
- return { next: doneResult };
294
+ return {
295
+ next: doneResult
296
+ };
583
297
  }
584
- exports.values = values;
585
298
 
586
299
  function doneResult() {
587
- return { value: undefined$1, done: true };
300
+ return {
301
+ value: undefined,
302
+ done: !0
303
+ };
588
304
  }
589
305
 
590
- Context.prototype = {
591
- constructor: Context,
592
-
593
- reset: function(skipTempReset) {
594
- this.prev = 0;
595
- this.next = 0;
596
- // Resetting context._sent for legacy support of Babel's
597
- // function.sent implementation.
598
- this.sent = this._sent = undefined$1;
599
- this.done = false;
600
- this.delegate = null;
601
-
602
- this.method = "next";
603
- this.arg = undefined$1;
604
-
605
- this.tryEntries.forEach(resetTryEntry);
606
-
607
- if (!skipTempReset) {
608
- for (var name in this) {
609
- // Not sure about the optimal order of these conditions:
610
- if (name.charAt(0) === "t" &&
611
- hasOwn.call(this, name) &&
612
- !isNaN(+name.slice(1))) {
613
- this[name] = undefined$1;
614
- }
615
- }
616
- }
617
- },
306
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
307
+ var ctor = "function" == typeof genFun && genFun.constructor;
308
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
309
+ }, exports.mark = function (genFun) {
310
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
311
+ }, exports.awrap = function (arg) {
312
+ return {
313
+ __await: arg
314
+ };
315
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
316
+ return this;
317
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
318
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
319
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
320
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
321
+ return result.done ? result.value : iter.next();
322
+ });
323
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
324
+ return this;
325
+ }), define(Gp, "toString", function () {
326
+ return "[object Generator]";
327
+ }), exports.keys = function (object) {
328
+ var keys = [];
618
329
 
619
- stop: function() {
620
- this.done = true;
330
+ for (var key in object) {
331
+ keys.push(key);
332
+ }
621
333
 
622
- var rootEntry = this.tryEntries[0];
623
- var rootRecord = rootEntry.completion;
624
- if (rootRecord.type === "throw") {
625
- throw rootRecord.arg;
334
+ return keys.reverse(), function next() {
335
+ for (; keys.length;) {
336
+ var key = keys.pop();
337
+ if (key in object) return next.value = key, next.done = !1, next;
626
338
  }
627
339
 
340
+ return next.done = !0, next;
341
+ };
342
+ }, exports.values = values, Context.prototype = {
343
+ constructor: Context,
344
+ reset: function reset(skipTempReset) {
345
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
346
+ "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
347
+ }
348
+ },
349
+ stop: function stop() {
350
+ this.done = !0;
351
+ var rootRecord = this.tryEntries[0].completion;
352
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
628
353
  return this.rval;
629
354
  },
630
-
631
- dispatchException: function(exception) {
632
- if (this.done) {
633
- throw exception;
634
- }
635
-
355
+ dispatchException: function dispatchException(exception) {
356
+ if (this.done) throw exception;
636
357
  var context = this;
637
- function handle(loc, caught) {
638
- record.type = "throw";
639
- record.arg = exception;
640
- context.next = loc;
641
-
642
- if (caught) {
643
- // If the dispatched exception was caught by a catch block,
644
- // then let that catch block handle the exception normally.
645
- context.method = "next";
646
- context.arg = undefined$1;
647
- }
648
358
 
649
- return !! caught;
359
+ function handle(loc, caught) {
360
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
650
361
  }
651
362
 
652
363
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
653
- var entry = this.tryEntries[i];
654
- var record = entry.completion;
655
-
656
- if (entry.tryLoc === "root") {
657
- // Exception thrown outside of any try block that could handle
658
- // it, so set the completion value of the entire function to
659
- // throw the exception.
660
- return handle("end");
661
- }
364
+ var entry = this.tryEntries[i],
365
+ record = entry.completion;
366
+ if ("root" === entry.tryLoc) return handle("end");
662
367
 
663
368
  if (entry.tryLoc <= this.prev) {
664
- var hasCatch = hasOwn.call(entry, "catchLoc");
665
- var hasFinally = hasOwn.call(entry, "finallyLoc");
369
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
370
+ hasFinally = hasOwn.call(entry, "finallyLoc");
666
371
 
667
372
  if (hasCatch && hasFinally) {
668
- if (this.prev < entry.catchLoc) {
669
- return handle(entry.catchLoc, true);
670
- } else if (this.prev < entry.finallyLoc) {
671
- return handle(entry.finallyLoc);
672
- }
673
-
373
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
374
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
674
375
  } else if (hasCatch) {
675
- if (this.prev < entry.catchLoc) {
676
- return handle(entry.catchLoc, true);
677
- }
678
-
679
- } else if (hasFinally) {
680
- if (this.prev < entry.finallyLoc) {
681
- return handle(entry.finallyLoc);
682
- }
683
-
376
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
684
377
  } else {
685
- throw new Error("try statement without catch or finally");
378
+ if (!hasFinally) throw new Error("try statement without catch or finally");
379
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
686
380
  }
687
381
  }
688
382
  }
689
383
  },
690
-
691
- abrupt: function(type, arg) {
384
+ abrupt: function abrupt(type, arg) {
692
385
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
693
386
  var entry = this.tryEntries[i];
694
- if (entry.tryLoc <= this.prev &&
695
- hasOwn.call(entry, "finallyLoc") &&
696
- this.prev < entry.finallyLoc) {
387
+
388
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
697
389
  var finallyEntry = entry;
698
390
  break;
699
391
  }
700
392
  }
701
393
 
702
- if (finallyEntry &&
703
- (type === "break" ||
704
- type === "continue") &&
705
- finallyEntry.tryLoc <= arg &&
706
- arg <= finallyEntry.finallyLoc) {
707
- // Ignore the finally entry if control is not jumping to a
708
- // location outside the try/catch block.
709
- finallyEntry = null;
710
- }
711
-
394
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
712
395
  var record = finallyEntry ? finallyEntry.completion : {};
713
- record.type = type;
714
- record.arg = arg;
715
-
716
- if (finallyEntry) {
717
- this.method = "next";
718
- this.next = finallyEntry.finallyLoc;
719
- return ContinueSentinel;
720
- }
721
-
722
- return this.complete(record);
396
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
723
397
  },
724
-
725
- complete: function(record, afterLoc) {
726
- if (record.type === "throw") {
727
- throw record.arg;
728
- }
729
-
730
- if (record.type === "break" ||
731
- record.type === "continue") {
732
- this.next = record.arg;
733
- } else if (record.type === "return") {
734
- this.rval = this.arg = record.arg;
735
- this.method = "return";
736
- this.next = "end";
737
- } else if (record.type === "normal" && afterLoc) {
738
- this.next = afterLoc;
739
- }
740
-
741
- return ContinueSentinel;
398
+ complete: function complete(record, afterLoc) {
399
+ if ("throw" === record.type) throw record.arg;
400
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
742
401
  },
743
-
744
- finish: function(finallyLoc) {
402
+ finish: function finish(finallyLoc) {
745
403
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
746
404
  var entry = this.tryEntries[i];
747
- if (entry.finallyLoc === finallyLoc) {
748
- this.complete(entry.completion, entry.afterLoc);
749
- resetTryEntry(entry);
750
- return ContinueSentinel;
751
- }
405
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
752
406
  }
753
407
  },
754
-
755
- "catch": function(tryLoc) {
408
+ "catch": function _catch(tryLoc) {
756
409
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
757
410
  var entry = this.tryEntries[i];
411
+
758
412
  if (entry.tryLoc === tryLoc) {
759
413
  var record = entry.completion;
760
- if (record.type === "throw") {
414
+
415
+ if ("throw" === record.type) {
761
416
  var thrown = record.arg;
762
417
  resetTryEntry(entry);
763
418
  }
419
+
764
420
  return thrown;
765
421
  }
766
422
  }
767
423
 
768
- // The context.catch method must only be called with a location
769
- // argument that corresponds to a known catch block.
770
424
  throw new Error("illegal catch attempt");
771
425
  },
772
-
773
- delegateYield: function(iterable, resultName, nextLoc) {
774
- this.delegate = {
426
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
427
+ return this.delegate = {
775
428
  iterator: values(iterable),
776
429
  resultName: resultName,
777
430
  nextLoc: nextLoc
778
- };
779
-
780
- if (this.method === "next") {
781
- // Deliberately forget the last sent value so that we don't
782
- // accidentally pass it on to the delegate.
783
- this.arg = undefined$1;
784
- }
785
-
786
- return ContinueSentinel;
431
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
787
432
  }
788
- };
789
-
790
- // Regardless of whether this script is executing as a CommonJS module
791
- // or not, return the runtime object so that we can declare the variable
792
- // regeneratorRuntime in the outer scope, which allows this module to be
793
- // injected easily by `bin/regenerator --include-runtime script.js`.
794
- return exports;
795
-
796
- }(
797
- // If this script is executing as a CommonJS module, use module.exports
798
- // as the regeneratorRuntime namespace. Otherwise create a new empty
799
- // object. Either way, the resulting object will be used to initialize
800
- // the regeneratorRuntime variable at the top of this file.
801
- module.exports
802
- ));
803
-
804
- try {
805
- regeneratorRuntime = runtime;
806
- } catch (accidentalStrictMode) {
807
- // This module should not be running in strict mode, so the above
808
- // assignment should always work unless something is misconfigured. Just
809
- // in case runtime.js accidentally runs in strict mode, in modern engines
810
- // we can explicitly access globalThis. In older engines we can escape
811
- // strict mode using a global Function call. This could conceivably fail
812
- // if a Content Security Policy forbids using Function, but in that case
813
- // the proper solution is to fix the accidental strict mode problem. If
814
- // you've misconfigured your bundler to force strict mode and applied a
815
- // CSP to forbid Function, and you're not willing to fix either of those
816
- // problems, please detail your unique predicament in a GitHub issue.
817
- if (typeof globalThis === "object") {
818
- globalThis.regeneratorRuntime = runtime;
819
- } else {
820
- Function("r", "regeneratorRuntime = r")(runtime);
821
- }
433
+ }, exports;
822
434
  }
435
+
436
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
823
437
  });
824
438
 
825
- var regenerator = runtime_1;
439
+ var regenerator = regeneratorRuntime();
826
440
 
827
441
  function _arrayWithHoles(arr) {
828
442
  if (Array.isArray(arr)) return arr;
@@ -10792,9 +10406,6 @@ class Logger$4 {
10792
10406
  this.throwArgumentError(message, name, value);
10793
10407
  }
10794
10408
  checkNormalize(message) {
10795
- if (message == null) {
10796
- message = "platform missing String.prototype.normalize";
10797
- }
10798
10409
  if (_normalizeError$4) {
10799
10410
  this.throwError("platform missing String.prototype.normalize", Logger$4.errors.UNSUPPORTED_OPERATION, {
10800
10411
  operation: "String.prototype.normalize", form: _normalizeError$4
@@ -14116,7 +13727,7 @@ function replaceFunc$2(reason, offset, bytes, output, badCodepoint) {
14116
13727
  // Put the replacement character into the output
14117
13728
  output.push(0xfffd);
14118
13729
  // Otherwise, process as if ignoring errors
14119
- return ignoreFunc$2(reason, offset, bytes, output, badCodepoint);
13730
+ return ignoreFunc$2(reason, offset, bytes);
14120
13731
  }
14121
13732
  // Common error handing strategies
14122
13733
  const Utf8ErrorFuncs$2 = Object.freeze({
@@ -31235,8 +30846,12 @@ const getContractArguments = ({ contract, method, params })=>{
31235
30846
  };
31236
30847
 
31237
30848
  var estimate$1 = async ({ provider, from, to, value, method, api, params }) => {
31238
- let contract = new Contract$1(to, api, provider);
31239
- return contract.estimateGas[method](...getContractArguments({ contract, method, params }), { from, value })
30849
+ if(typeof api == "undefined"){
30850
+ return provider.estimateGas({ from, to, value })
30851
+ } else {
30852
+ let contract = new Contract$1(to, api, provider);
30853
+ return contract.estimateGas[method](...getContractArguments({ contract, method, params }), { from, value })
30854
+ }
31240
30855
  };
31241
30856
 
31242
30857
  var estimateBsc = async ({ from, to, value, method, api, params }) => {
@@ -31648,7 +31263,7 @@ var r=function(t,e){return (r=Object.setPrototypeOf||{__proto__:[]}instanceof Ar
31648
31263
  * @author Feross Aboukhadijeh <http://feross.org>
31649
31264
  * @license MIT
31650
31265
  */
31651
- var r=n(123),i=n(124),o=n(125);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return "undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=d(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|f(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return "number"!=typeof e.length||(r=e.length)!=r?a(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=a(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function d(t,e){var n=e.length<0?0:0|f(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0;}}function b(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return "";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return "";if((n>>>=0)<=(e>>>=0))return "";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return M(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return R(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0;}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r;}function m(t,e,n,r,i){if(0===t.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return -1;n=t.length-1;}else if(n<0){if(!i)return -1;n=0;}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,n/=2;}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else -1!==l&&(o-=o-l),l=-1;}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var h=!0,d=0;d<u;d++)if(c(t,o+d)!==c(e,d)){h=!1;break}if(h)return o}return -1}function v(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a;}return s}function w(t,e,n,r){return W(F(e,t.length-n),t,n,r)}function _(t,e,n,r){return W(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return _(t,e,n,r)}function E(t,e,n,r){return W(U(e),t,n,r)}function x(t,e,n,r){return W(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function M(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u);}null===l?(l=65533,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h;}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return !1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return !(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return !0;default:return !1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length;}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?M(this,0,t):b.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return -1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(r,i),l=t.slice(e,n),h=0;h<a;++h)if(c[h]!==l[h]){o=c[h],s=l[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return -1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else {if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0);}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0;}},u.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function R(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function A(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=H(t[o]);return i}function I(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i);}function N(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255;}function P(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,o){return o||P(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function D(t,e,n,r,o){return o||P(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else {var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t];}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||T(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||T(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i);}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i);}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i);}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else "number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else {var s=u.isBuffer(t)?t:F(new u(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a];}return this};var B=/[^+\/0-9A-Za-z-_]/g;function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320);}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n);}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128);}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128);}else {if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128);}}return o}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return "";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(57));},function(t,e,n){function r(){return "function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return i}));var i=r();},function(t,e,n){function r(){}n.d(e,"a",(function(){return r}));},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){return "function"==typeof Symbol&&Symbol.observable||"@@observable"}();},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){function r(t){return "function"==typeof t}n.d(e,"a",(function(){return r}));},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return l}));var r=n(0),i=n(9),o=n(12),s=n(2);function a(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(a((function(n,r){return Object(o.a)(t(n,r)).pipe(Object(i.a)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new u(t,n))})}var u=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e;}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent))},t}(),c=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t);},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n);}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e);},e.prototype._innerSub=function(t){var e=new s.a(this),n=this.destination;n.add(e);var r=Object(s.c)(t,e);r!==e&&n.add(r);},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe();},e.prototype.notifyNext=function(t){this.destination.next(t);},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete();},e}(s.b),l=a;},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(3),i=n(78),o=n(55);function s(t,e){return e?Object(o.a)(t,e):new r.a(Object(i.a)(t))}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(0),i=n(62),o=function(t){function e(n,r){void 0===r&&(r=i.a.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.a(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else {var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.a);},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(0),i=n(5),o=n(4),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.a(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0);},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e);},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this);},e}(i.a);},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(0),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.a(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e);},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null));},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t);}catch(t){n=!0,r=!!t&&t||new Error(t);}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null;},e}(function(t){function e(e,n){return t.call(this)||this}return r.a(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(4).a));},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(7);function i(t){return !Object(r.a)(t)&&t-parseFloat(t)+1>=0}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(37),i=n(72);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(i.a)()(r.a.apply(void 0,t))}},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(78),i=n(35),o=n(20),s=n(22),a=n(79),u=n(80),c=n(53),l=function(t){if(t&&"function"==typeof t[s.a])return l=t,function(t){var e=l[s.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(a.a)(t))return Object(r.a)(t);if(Object(u.a)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete());}),(function(e){return t.error(e)})).then(null,i.a),t};if(t&&"function"==typeof t[o.a])return e=t,function(t){for(var n=e[o.a]();;){var r=void 0;try{r=n.next();}catch(e){return t.error(e),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return "function"==typeof n.return&&t.add((function(){n.return&&n.return();})),t};var e,n,l,h=Object(c.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+h+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};},function(t,e,n){function r(t){setTimeout((function(){throw t}),0);}n.d(e,"a",(function(){return r}));},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o;}catch(t){n=o;}try{r="function"==typeof clearTimeout?clearTimeout:s;}catch(t){r=s;}}();var u,c=[],l=!1,h=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&f());}function f(){if(!l){var t=a(d);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length;}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t);}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t);}}function p(t,e){this.fun=t,this.array=e;}function b(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||a(f);},p.prototype.run=function(){this.fun.apply(null,this.array);},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=b,i.addListener=b,i.once=b,i.off=b,i.removeListener=b,i.removeAllListeners=b,i.emit=b,i.prependListener=b,i.prependOnceListener=b,i.listeners=function(t){return []},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return "/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0};},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(10),i=n(28),o=n(55);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(r.a)(n)?(t.pop(),Object(o.a)(t,n)):Object(i.a)(t)}},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getFavicon=e.range=e.isBigNumber=e.ensureParsedJSONObject=e.ensureBN=e.ensureRegExpString=e.ensureIntNumber=e.ensureBuffer=e.ensureAddressString=e.ensureEvenLengthHexString=e.ensureHexString=e.isHexString=e.prepend0x=e.strip0x=e.has0xPrefix=e.hexStringFromIntNumber=e.intNumberFromHexString=e.bigIntStringFromBN=e.hexStringFromBuffer=e.hexStringToUint8Array=e.uint8ArrayToHex=e.randomBytesHex=void 0;const i=r(n(65)),o=n(89),s=/^[0-9]*$/,a=/^[a-f0-9]*$/;function u(t){return [...t].map(t=>t.toString(16).padStart(2,"0")).join("")}function c(t){return t.startsWith("0x")||t.startsWith("0X")}function l(t){return c(t)?t.slice(2):t}function h(t){return c(t)?"0x"+t.slice(2):"0x"+t}function d(t){if("string"!=typeof t)return !1;const e=l(t).toLowerCase();return a.test(e)}function f(t,e=!1){if("string"==typeof t){const n=l(t).toLowerCase();if(a.test(n))return (0, o.HexString)(e?"0x"+n:n)}throw new Error(`"${String(t)}" is not a hexadecimal string`)}function p(t,e=!1){let n=f(t,!1);return n.length%2==1&&(n=(0, o.HexString)("0"+n)),e?(0, o.HexString)("0x"+n):n}function b(t){if("number"==typeof t&&Number.isInteger(t))return (0, o.IntNumber)(t);if("string"==typeof t){if(s.test(t))return (0, o.IntNumber)(Number(t));if(d(t))return (0, o.IntNumber)(new i.default(p(t,!1),16).toNumber())}throw new Error("Not an integer: "+String(t))}function g(t){if(null==t||"function"!=typeof t.constructor)return !1;const{constructor:e}=t;return "function"==typeof e.config&&"number"==typeof e.EUCLID}e.randomBytesHex=function(t){return u(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=u,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map(t=>parseInt(t,16)))},e.hexStringFromBuffer=function(t,e=!1){const n=t.toString("hex");return (0, o.HexString)(e?"0x"+n:n)},e.bigIntStringFromBN=function(t){return (0, o.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return (0, o.IntNumber)(new i.default(p(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return (0, o.HexString)("0x"+new i.default(t).toString(16))},e.has0xPrefix=c,e.strip0x=l,e.prepend0x=h,e.isHexString=d,e.ensureHexString=f,e.ensureEvenLengthHexString=p,e.ensureAddressString=function(t){if("string"==typeof t){const e=l(t).toLowerCase();if(d(e)&&40===e.length)return (0, o.AddressString)(h(e))}throw new Error("Invalid Ethereum address: "+String(t))},e.ensureBuffer=function(e){if(t.isBuffer(e))return e;if("string"==typeof e){if(d(e)){const n=p(e,!1);return t.from(n,"hex")}return t.from(e,"utf8")}throw new Error("Not binary data: "+String(e))},e.ensureIntNumber=b,e.ensureRegExpString=function(t){if(t instanceof RegExp)return (0, o.RegExpString)(t.toString());throw new Error("Not a RegExp: "+String(t))},e.ensureBN=function(t){if(null!==t&&(i.default.isBN(t)||g(t)))return new i.default(t.toString(10),10);if("number"==typeof t)return new i.default(b(t));if("string"==typeof t){if(s.test(t))return new i.default(t,10);if(d(t))return new i.default(p(t,!1),16)}throw new Error("Not an integer: "+String(t))},e.ensureParsedJSONObject=function(t){if("string"==typeof t)return JSON.parse(t);if("object"==typeof t)return t;throw new Error("Not a JSON string or an object: "+String(t))},e.isBigNumber=g,e.range=function(t,e){return Array.from({length:e-t},(e,n)=>t+n)},e.getFavicon=function(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:n}=document.location,r=t?t.getAttribute("href"):null;return !r||r.startsWith("javascript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?e+r:`${e}//${n}${r}`};}).call(this,n(19).Buffer);},function(t,e,n){n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(15);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return 0===t.length?r.a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},function(t,e,n){n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}));var r=n(0),i=1,o=function(){return Promise.resolve()}(),s={};function a(t){return t in s&&(delete s[t],!0)}var u=function(t){var e=i++;return s[e]=!0,o.then((function(){return a(e)&&t()})),e},c=function(t){a(t);},l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=u(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(c(n),e.scheduled=void 0);},e}(n(31).a),h=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(29).a))(l),d=h;},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){return "function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}();},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){var r={};function i(t,e,n){n||(n=Error);var i=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return "string"==typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i;}function o(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return "of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,a;if("string"==typeof e&&(i="not ",e.substr(0,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return (void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))a="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else {var u=function(t,e,n){return "number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(o(e,"type"));}return a+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return "The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return "Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return "Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r;},function(t,e,n){(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(103),o=n(107);n(58)(c,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u]);}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)));}function l(){this._writableState.ended||e.nextTick(h,this);}function h(t){t.end();}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t);}});}).call(this,n(36));},function(t,e,n){n.r(e),n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return i.a})),n.d(e,"GroupedObservable",(function(){return o.a})),n.d(e,"observable",(function(){return s.a})),n.d(e,"Subject",(function(){return a.a})),n.d(e,"BehaviorSubject",(function(){return u.a})),n.d(e,"ReplaySubject",(function(){return c.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asap",(function(){return h.a})),n.d(e,"asapScheduler",(function(){return h.b})),n.d(e,"async",(function(){return d.a})),n.d(e,"asyncScheduler",(function(){return d.b})),n.d(e,"queue",(function(){return f.a})),n.d(e,"queueScheduler",(function(){return f.b})),n.d(e,"animationFrame",(function(){return v})),n.d(e,"animationFrameScheduler",(function(){return y})),n.d(e,"VirtualTimeScheduler",(function(){return w})),n.d(e,"VirtualAction",(function(){return _})),n.d(e,"Scheduler",(function(){return S.a})),n.d(e,"Subscription",(function(){return E.a})),n.d(e,"Subscriber",(function(){return x.a})),n.d(e,"Notification",(function(){return k.a})),n.d(e,"NotificationKind",(function(){return k.b})),n.d(e,"pipe",(function(){return M.a})),n.d(e,"noop",(function(){return C.a})),n.d(e,"identity",(function(){return R.a})),n.d(e,"isObservable",(function(){return A})),n.d(e,"ArgumentOutOfRangeError",(function(){return I.a})),n.d(e,"EmptyError",(function(){return O.a})),n.d(e,"ObjectUnsubscribedError",(function(){return T.a})),n.d(e,"UnsubscriptionError",(function(){return j.a})),n.d(e,"TimeoutError",(function(){return N.a})),n.d(e,"bindCallback",(function(){return H})),n.d(e,"bindNodeCallback",(function(){return W})),n.d(e,"combineLatest",(function(){return Y.b})),n.d(e,"concat",(function(){return J.a})),n.d(e,"defer",(function(){return G.a})),n.d(e,"empty",(function(){return K.b})),n.d(e,"forkJoin",(function(){return Q})),n.d(e,"from",(function(){return X.a})),n.d(e,"fromEvent",(function(){return et})),n.d(e,"fromEventPattern",(function(){return nt})),n.d(e,"generate",(function(){return rt})),n.d(e,"iif",(function(){return ot})),n.d(e,"interval",(function(){return at})),n.d(e,"merge",(function(){return ct.a})),n.d(e,"never",(function(){return ht})),n.d(e,"of",(function(){return dt.a})),n.d(e,"onErrorResumeNext",(function(){return ft})),n.d(e,"pairs",(function(){return pt})),n.d(e,"partition",(function(){return vt})),n.d(e,"race",(function(){return wt.a})),n.d(e,"range",(function(){return _t})),n.d(e,"throwError",(function(){return Et.a})),n.d(e,"timer",(function(){return xt.a})),n.d(e,"using",(function(){return kt})),n.d(e,"zip",(function(){return Mt.b})),n.d(e,"scheduled",(function(){return Ct.a})),n.d(e,"EMPTY",(function(){return K.a})),n.d(e,"NEVER",(function(){return lt})),n.d(e,"config",(function(){return Rt.a}));var r=n(3),i=n(68),o=n(66),s=n(22),a=n(5),u=n(69),c=n(47),l=n(30),h=n(40),d=n(6),f=n(61),p=n(0),b=n(31),g=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0);},e}(b.a),m=n(29),y=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(m.a))(g),v=y,w=function(t){function e(e,n){void 0===e&&(e=_),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return p.a(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(m.a),_=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return p.a(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0);},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(b.a),S=n(62),E=n(4),x=n(1),k=n(18),M=n(39),C=n(21),R=n(15);function A(t){return !!t&&(t instanceof r.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var I=n(24),O=n(26),T=n(23),j=n(42),N=n(71),P=n(9),L=n(54),D=n(7),B=n(10);function H(t,e,n){if(e){if(!Object(B.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return H(t,n).apply(void 0,r).pipe(Object(P.a)((function(t){return Object(D.a)(t)?e.apply(void 0,t):e(t)})))};n=e;}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o,s=this,a={context:s,subject:o,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var i={args:e,subscriber:r,params:a};return n.schedule(F,0,i)}if(!o){o=new l.a;try{t.apply(s,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete();}]));}catch(t){Object(L.a)(o)?o.error(t):console.warn(t);}}return o.subscribe(r)}))}}function F(t){var e=this,n=t.args,r=t.subscriber,i=t.params,o=i.callbackFunc,s=i.context,a=i.scheduler,u=i.subject;if(!u){u=i.subject=new l.a;try{o.apply(s,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(a.schedule(U,0,{value:r,subject:u}));}]));}catch(t){u.error(t);}}this.add(u.subscribe(r));}function U(t){var e=t.value,n=t.subject;n.next(e),n.complete();}function W(t,e,n){if(e){if(!Object(B.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return W(t,n).apply(void 0,r).pipe(Object(P.a)((function(t){return Object(D.a)(t)?e.apply(void 0,t):e(t)})))};n=e;}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var i=o.context,s=o.subject;if(n)return n.schedule(z,0,{params:o,subscriber:r,context:i});if(!s){s=o.subject=new l.a;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?s.error(n):(s.next(t.length<=1?t[0]:t),s.complete());}]));}catch(t){Object(L.a)(s)?s.error(t):console.warn(t);}}return s.subscribe(r)}))}}function z(t){var e=this,n=t.params,r=t.subscriber,i=t.context,o=n.callbackFunc,s=n.args,a=n.scheduler,u=n.subject;if(!u){u=n.subject=new l.a;try{o.apply(i,s.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(a.schedule(V,0,{err:r,subject:u}));else {var i=t.length<=1?t[0]:t;e.add(a.schedule(q,0,{value:i,subject:u}));}}]));}catch(t){this.add(a.schedule(V,0,{err:t,subject:u}));}}this.add(u.subscribe(r));}function q(t){var e=t.value,n=t.subject;n.next(e),n.complete();}function V(t){var e=t.err;t.subject.error(e);}var Y=n(49),J=n(33),G=n(51),K=n(11),$=n(53),X=n(12);function Q(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(D.a)(n))return Z(n,null);if(Object($.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return Z(r.map((function(t){return n[t]})),r)}}if("function"==typeof t[t.length-1]){var i=t.pop();return Z(t=1===t.length&&Object(D.a)(t[0])?t[0]:t,null).pipe(Object(P.a)((function(t){return i.apply(void 0,t)})))}return Z(t,null)}function Z(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var i=new Array(r),o=0,s=0,a=function(a){var u=Object(X.a)(t[a]),c=!1;n.add(u.subscribe({next:function(t){c||(c=!0,s++),i[a]=t;},error:function(t){return n.error(t)},complete:function(){++o!==r&&c||(s===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=i[n],t}),{}):i),n.complete());}}));},u=0;u<r;u++)a(u);else n.complete();}))}var tt=n(25);function et(t,e,n,i){return Object(tt.a)(n)&&(i=n,n=void 0),i?et(t,e,n).pipe(Object(P.a)((function(t){return Object(D.a)(t)?i.apply(void 0,t):i(t)}))):new r.a((function(r){!function t(e,n,r,i,o){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var a=e;e.addEventListener(n,r,o),s=function(){return a.removeEventListener(n,r,o)};}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var u=e;e.on(n,r),s=function(){return u.off(n,r)};}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,r),s=function(){return c.removeListener(n,r)};}else {if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,h=e.length;l<h;l++)t(e[l],n,r,i,o);}i.add(s);}(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t);}),r,n);}))}function nt(t,e,n){return n?nt(t,e).pipe(Object(P.a)((function(t){return Object(D.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(i);}catch(t){return void n.error(t)}if(Object(tt.a)(e))return function(){return e(i,r)}}))}function rt(t,e,n,i,o){var s,a;if(1==arguments.length){var u=t;a=u.initialState,e=u.condition,n=u.iterate,s=u.resultSelector||R.a,o=u.scheduler;}else void 0===i||Object(B.a)(i)?(a=t,s=R.a,o=i):(a=t,s=i);return new r.a((function(t){var r=a;if(o)return o.schedule(it,0,{subscriber:t,iterate:n,condition:e,resultSelector:s,state:r});for(;;){if(e){var i=void 0;try{i=e(r);}catch(e){return void t.error(e)}if(!i){t.complete();break}}var u=void 0;try{u=s(r);}catch(e){return void t.error(e)}if(t.next(u),t.closed)break;try{r=n(r);}catch(e){return void t.error(e)}}}))}function it(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state);}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state);}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state);}catch(t){return void e.error(t)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ot(t,e,n){return void 0===e&&(e=K.a),void 0===n&&(n=K.a),Object(G.a)((function(){return t()?e:n}))}var st=n(32);function at(t,e){return void 0===t&&(t=0),void 0===e&&(e=d.a),(!Object(st.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=d.a),new r.a((function(n){return n.add(e.schedule(ut,t,{subscriber:n,counter:0,period:t})),n}))}function ut(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r);}var ct=n(73),lt=new r.a(C.a);function ht(){return lt}var dt=n(37);function ft(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return K.a;var n=t[0],i=t.slice(1);return 1===t.length&&Object(D.a)(n)?ft.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(ft.apply(void 0,i).subscribe(t))};return Object(X.a)(n).subscribe({next:function(e){t.next(e);},error:e,complete:e})}))}function pt(t,e){return e?new r.a((function(n){var r=Object.keys(t),i=new E.a;return i.add(e.schedule(bt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:t})),i})):new r.a((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var i=n[r];t.hasOwnProperty(i)&&e.next([i,t[i]]);}e.complete();}))}function bt(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,o=t.obj;if(!r.closed)if(n<e.length){var s=e[n];r.next([s,o[s]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:o}));}else r.complete();}var gt=n(81),mt=n(34),yt=n(17);function vt(t,e,n){return [Object(yt.a)(e,n)(new r.a(Object(mt.a)(t))),Object(yt.a)(Object(gt.a)(e,n))(new r.a(Object(mt.a)(t)))]}var wt=n(74);function _t(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var i=0,o=t;if(n)return n.schedule(St,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function St(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)));}var Et=n(48),xt=n(75);function kt(t,e){return new r.a((function(n){var r,i;try{r=t();}catch(t){return void n.error(t)}try{i=e(r);}catch(t){return void n.error(t)}var o=(i?Object(X.a)(i):K.a).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe();}}))}var Mt=n(52),Ct=n(76),Rt=n(14);},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(0),i=n(1);function o(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t;}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new a(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else {var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe();}}else this.connection=null;},e}(i.a);},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(0),i=n(5),o=n(61),s=n(4),a=n(70),u=n(23),c=n(77),l=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift();}t.prototype.next.call(this,e);},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new h(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e);},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new u.a;if(this.isStopped||this.hasError?e=s.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),i&&t.add(t=new a.a(t,i)),n)for(var l=0;l<o&&!t.closed;l++)t.next(r[l]);else for(l=0;l<o&&!t.closed;l++)t.next(r[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return (this.scheduler||o.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.a),h=function(){return function(t,e){this.time=t,this.value=e;}}();},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(3);function i(t,e){return e?new r.a((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e);}},function(t,e,n){n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(0),i=n(10),o=n(7),s=n(16),a=n(13),u=n(28),c={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return Object(i.a)(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(o.a)(t[0])&&(t=t[0]),Object(u.a)(t,r).lift(new h(n))}var h=function(){function t(t){this.resultSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.a(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t);},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else {this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(a.a)(this,r,void 0,n));}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete();},e.prototype.notifyNext=function(t,e,n){var r=this.values,i=r[n],o=this.toRespond?i===c?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()));},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t);}catch(t){return void this.destination.error(t)}this.destination.next(e);},e}(s.a);},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(27),i=n(15);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.b)(i.a,t)}},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(3),i=n(12),o=n(11);function s(t){return new r.a((function(e){var n;try{n=t();}catch(t){return void e.error(t)}return (n?Object(i.a)(n):Object(o.b)()).subscribe(e)}))}},function(t,e,n){n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(0),i=n(28),o=n(7),s=n(1),a=n(20),u=n(2);function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return "function"==typeof n&&t.pop(),Object(i.a)(t,void 0).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:void 0,i}return r.a(e,t),e.prototype._next=function(t){var e=this.iterators;Object(o.a)(t)?e.push(new f(t)):"function"==typeof t[a.a]?e.push(new d(t[a.a]())):e.push(new p(this.destination,this,t));},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe());else this.active--;}}else this.destination.complete();},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete();},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return}var i=!1,o=[];for(r=0;r<e;r++){var s,a=(s=t[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value);}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete();},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t);}catch(t){return void this.destination.error(t)}this.destination.next(e);},e}(s.a),d=function(){function t(t){this.iterator=t,this.nextResult=t.next();}return t.prototype.hasValue=function(){return !0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length;}return t.prototype[a.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),p=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.a(e,t),e.prototype[a.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete();},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators();},e.prototype.subscribe=function(){return Object(u.c)(this.observable,new u.a(this))},e}(u.b);},function(t,e,n){function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return r}));},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(1);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return !1;t=i&&i instanceof r.a?i:null;}return !0}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(3),i=n(4);function o(t,e){return new r.a((function(n){var r=new i.a,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete();}))),r}))}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(14),i=n(35),o={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t);},complete:function(){}};},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")();}catch(t){"object"==typeof window&&(n=window);}t.exports=n;},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}));}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t;}};},function(t,e){function n(t){return t.sort((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e))}function r(t){return null==t?t:Number.parseInt(t,16)}function i(t){if(null==t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function o(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(...t){return n(t)[0]},maxBlockRef:function(...t){const e=n(t);return e[e.length-1]},sortBlockRefs:n,bnToHex:function(t){return "0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){if(null==t)return t;return i(r(t)+1)},intToHex:i,unsafeRandomBytes:function(t){let e="0x";for(let n=0;n<t;n++)e+=o(),e+=o();return e}};},function(t,e,n){n.r(e),n.d(e,"audit",(function(){return o})),n.d(e,"auditTime",(function(){return l})),n.d(e,"buffer",(function(){return h})),n.d(e,"bufferCount",(function(){return b})),n.d(e,"bufferTime",(function(){return w})),n.d(e,"bufferToggle",(function(){return I})),n.d(e,"bufferWhen",(function(){return j})),n.d(e,"catchError",(function(){return L})),n.d(e,"combineAll",(function(){return F})),n.d(e,"combineLatest",(function(){return z})),n.d(e,"concat",(function(){return V})),n.d(e,"concatAll",(function(){return Y.a})),n.d(e,"concatMap",(function(){return G})),n.d(e,"concatMapTo",(function(){return K})),n.d(e,"count",(function(){return $})),n.d(e,"debounce",(function(){return Z})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return st})),n.d(e,"delay",(function(){return ht})),n.d(e,"delayWhen",(function(){return gt})),n.d(e,"dematerialize",(function(){return _t})),n.d(e,"distinct",(function(){return xt})),n.d(e,"distinctUntilChanged",(function(){return Ct})),n.d(e,"distinctUntilKeyChanged",(function(){return It})),n.d(e,"elementAt",(function(){return Wt})),n.d(e,"endWith",(function(){return qt})),n.d(e,"every",(function(){return Vt})),n.d(e,"exhaust",(function(){return Gt})),n.d(e,"exhaustMap",(function(){return Qt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return Tt.a})),n.d(e,"finalize",(function(){return ie})),n.d(e,"find",(function(){return ae})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return de})),n.d(e,"groupBy",(function(){return fe.b})),n.d(e,"ignoreElements",(function(){return pe})),n.d(e,"isEmpty",(function(){return me})),n.d(e,"last",(function(){return Ee})),n.d(e,"map",(function(){return Xt.a})),n.d(e,"mapTo",(function(){return xe})),n.d(e,"materialize",(function(){return Ce})),n.d(e,"max",(function(){return Pe})),n.d(e,"merge",(function(){return De})),n.d(e,"mergeAll",(function(){return Be.a})),n.d(e,"mergeMap",(function(){return J.b})),n.d(e,"flatMap",(function(){return J.a})),n.d(e,"mergeMapTo",(function(){return He})),n.d(e,"mergeScan",(function(){return Fe})),n.d(e,"min",(function(){return ze})),n.d(e,"multicast",(function(){return Ve})),n.d(e,"observeOn",(function(){return Je.b})),n.d(e,"onErrorResumeNext",(function(){return Ge})),n.d(e,"pairwise",(function(){return Xe})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return sn})),n.d(e,"publishBehavior",(function(){return un})),n.d(e,"publishLast",(function(){return ln})),n.d(e,"publishReplay",(function(){return dn})),n.d(e,"race",(function(){return pn})),n.d(e,"reduce",(function(){return Ne})),n.d(e,"repeat",(function(){return bn})),n.d(e,"repeatWhen",(function(){return yn})),n.d(e,"retry",(function(){return _n})),n.d(e,"retryWhen",(function(){return xn})),n.d(e,"refCount",(function(){return Cn.a})),n.d(e,"sample",(function(){return Rn})),n.d(e,"sampleTime",(function(){return On})),n.d(e,"scan",(function(){return Ie})),n.d(e,"sequenceEqual",(function(){return Pn})),n.d(e,"share",(function(){return Fn})),n.d(e,"shareReplay",(function(){return Un})),n.d(e,"single",(function(){return Wn})),n.d(e,"skip",(function(){return Vn})),n.d(e,"skipLast",(function(){return Gn})),n.d(e,"skipUntil",(function(){return Xn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return ar})),n.d(e,"switchAll",(function(){return dr})),n.d(e,"switchMap",(function(){return cr})),n.d(e,"switchMapTo",(function(){return fr})),n.d(e,"take",(function(){return Ht})),n.d(e,"takeLast",(function(){return we})),n.d(e,"takeUntil",(function(){return pr})),n.d(e,"takeWhile",(function(){return mr})),n.d(e,"tap",(function(){return Sr})),n.d(e,"throttle",(function(){return Mr})),n.d(e,"throttleTime",(function(){return Ar})),n.d(e,"throwIfEmpty",(function(){return Nt})),n.d(e,"timeInterval",(function(){return Nr})),n.d(e,"timeout",(function(){return Ur})),n.d(e,"timeoutWith",(function(){return Dr})),n.d(e,"timestamp",(function(){return Wr})),n.d(e,"toArray",(function(){return Vr})),n.d(e,"window",(function(){return Yr})),n.d(e,"windowCount",(function(){return Kr})),n.d(e,"windowTime",(function(){return Qr})),n.d(e,"windowToggle",(function(){return oi})),n.d(e,"windowWhen",(function(){return ui})),n.d(e,"withLatestFrom",(function(){return hi})),n.d(e,"zip",(function(){return bi})),n.d(e,"zipAll",(function(){return gi}));var r=n(0),i=n(2);function o(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.durationSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t);}catch(t){return this.destination.error(t)}var n=Object(i.c)(e,new i.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n);}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t));},e.prototype.notifyNext=function(){this.clearThrottle();},e.prototype.notifyComplete=function(){this.clearThrottle();},e}(i.b),u=n(6),c=n(75);function l(t,e){return void 0===e&&(e=u.a),o((function(){return Object(c.a)(t,e)}))}function h(t){return function(e){return e.lift(new d(t))}}var d=function(){function t(t){this.closingNotifier=t;}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingNotifier))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(i.c)(n,new i.a(r))),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t);},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t);},e}(i.b),p=n(1);function b(t,e){return void 0===e&&(e=null),function(n){return n.lift(new g(t,e))}}var g=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?y:m;}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),m=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.a(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[]);},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this);},e}(p.a),y=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.a(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var s=r[o];s.push(t),s.length===e&&(r.splice(o,1),this.destination.next(s));}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r);}t.prototype._complete.call(this);},e}(p.a),v=n(10);function w(t){var e=arguments.length,n=u.a;Object(v.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new _(t,r,i,n))}}var _=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r;}return t.prototype.call=function(t,e){return e.subscribe(new E(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),S=function(){return function(){this.buffer=[];}}(),E=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var u={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=o.schedule(x,n,u));}else {var c={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(M,n,c)),s.add(o.schedule(k,r,l));}return s}return r.a(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o);}e&&this.onBufferFull(e);},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e);},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer);}t.prototype._complete.call(this);},e.prototype._unsubscribe=function(){this.contexts=null;},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(x,n,r));}},e.prototype.openContext=function(){var t=new S;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1);},e}(p.a);function x(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan));}function k(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(M,n,{subscriber:r,context:o})),this.schedule(t,e));}function M(t){var e=t.subscriber,n=t.context;e.closeContext(n);}var C=n(4),R=n(13),A=n(16);function I(t,e){return function(n){return n.lift(new O(t,e))}}var O=function(){function t(t,e){this.openings=t,this.closingSelector=e;}return t.prototype.call=function(t,e){return e.subscribe(new T(t,this.openings,this.closingSelector))},t}(),T=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add(Object(R.a)(i,n)),i}return r.a(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t);},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null;}this.contexts=null,t.prototype._error.call(this,e);},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null;}this.contexts=null,t.prototype._complete.call(this);},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e);},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context);},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e);}catch(t){this._error(t);}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe();}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new C.a,r={buffer:[],subscription:n};e.push(r);var i=Object(R.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i));},e}(A.a);function j(t){return function(e){return e.lift(new N(t))}}var N=function(){function t(t){this.closingSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new P(t,this.closingSelector))},t}(),P=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t);},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this);},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1;},e.prototype.notifyNext=function(){this.openBuffer();},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer();},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)();}catch(t){return this.error(t)}t=new C.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.c)(e,new i.a(this))),this.subscribing=!1;},e}(i.b);function L(t){return function(e){var n=new D(t),r=e.lift(n);return n.caught=r}}var D=function(){function t(t){this.selector=t;}return t.prototype.call=function(t,e){return e.subscribe(new B(t,this.selector,this.caught))},t}(),B=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught);}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var o=Object(i.c)(n,r);o!==r&&this.add(o);}},e}(i.b),H=n(49);function F(t){return function(e){return e.lift(new H.a(t))}}var U=n(7),W=n(12);function z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return "function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(U.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(W.a)([e].concat(t)),new H.a(n))}}var q=n(33);function V(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(q.a.apply(void 0,[e].concat(t)))}}var Y=n(72),J=n(27);function G(t,e){return Object(J.b)(t,e,1)}function K(t,e){return G((function(){return t}),e)}function $(t){return function(e){return e.lift(new X(t,e))}}var X=function(){function t(t,e){this.predicate=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new Q(t,this.predicate,this.source))},t}(),Q=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++;},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source);}catch(t){return void this.destination.error(t)}e&&this.count++;},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete();},e}(p.a);function Z(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e);}catch(t){this.destination.error(t);}},e.prototype._complete=function(){this.emitValue(),this.destination.complete();},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.c)(e,new i.a(this)))&&!n.closed&&this.add(this.durationSubscription=n);},e.prototype.notifyNext=function(){this.emitValue();},e.prototype.notifyComplete=function(){this.emitValue();},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e);}},e}(i.b);function nt(t,e){return void 0===e&&(e=u.a),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e;}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.dueTime,this.scheduler))},t}(),it=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.a(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ot,this.dueTime,this));},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete();},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t);}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null);},e}(p.a);function ot(t){t.debouncedNext();}function st(t){return void 0===t&&(t=null),function(e){return e.lift(new at(t))}}var at=function(){function t(t){this.defaultValue=t;}return t.prototype.call=function(t,e){return e.subscribe(new ut(t,this.defaultValue))},t}(),ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.a(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t);},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete();},e}(p.a);function ct(t){return t instanceof Date&&!isNaN(+t)}var lt=n(18);function ht(t,e){void 0===e&&(e=u.a);var n=ct(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new dt(n,e))}}var dt=function(){function t(t,e){this.delay=t,this.scheduler=e;}return t.prototype.call=function(t,e){return e.subscribe(new ft(t,this.delay,this.scheduler))},t}(),ft=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.a(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o);}else this.unsubscribe(),e.active=!1;},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}));},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new pt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e);}},e.prototype._next=function(t){this.scheduleNotification(lt.a.createNext(t));},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe();},e.prototype._complete=function(){this.scheduleNotification(lt.a.createComplete()),this.unsubscribe();},e}(p.a),pt=function(){return function(t,e){this.time=t,this.notification=e;}}(),bt=n(3);function gt(t,e){return e?function(n){return new vt(n,e).lift(new mt(t))}:function(e){return e.lift(new mt(t))}}var mt=function(){function t(t){this.delayDurationSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new yt(t,this.delayDurationSelector))},t}(),yt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete();},e.prototype.notifyError=function(t,e){this._error(t);},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete();},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t);}catch(t){this.destination.error(t);}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe();},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return -1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(R.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n));},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete();},e}(A.a),vt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.a(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new wt(t,this.source));},e}(bt.a),wt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.a(e,t),e.prototype._next=function(t){this.subscribeToSource();},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t);},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource();},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent));},e}(p.a);function _t(){return function(t){return t.lift(new St)}}var St=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Et(t))},t}(),Et=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){t.observe(this.destination);},e}(p.a);function xt(t,e){return function(n){return n.lift(new kt(t,e))}}var kt=function(){function t(t,e){this.keySelector=t,this.flushes=e;}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t,this.keySelector,this.flushes))},t}(),Mt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add(Object(i.c)(r,new i.a(o))),o}return r.a(e,t),e.prototype.notifyNext=function(){this.values.clear();},e.prototype.notifyError=function(t){this._error(t);},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t);},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t);}catch(t){return void n.error(t)}this._finalizeNext(e,t);},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e));},e}(i.b);function Ct(t,e){return function(n){return n.lift(new Rt(t,e))}}var Rt=function(){function t(t,e){this.compare=t,this.keySelector=e;}return t.prototype.call=function(t,e){return e.subscribe(new At(t,this.compare,this.keySelector))},t}(),At=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.a(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t;}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e);}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t));},e}(p.a);function It(t,e){return Ct((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var Ot=n(24),Tt=n(17),jt=n(26);function Nt(t){return void 0===t&&(t=Dt),function(e){return e.lift(new Pt(t))}}var Pt=function(){function t(t){this.errorFactory=t;}return t.prototype.call=function(t,e){return e.subscribe(new Lt(t,this.errorFactory))},t}(),Lt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t);},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory();}catch(e){t=e;}this.destination.error(t);},e}(p.a);function Dt(){return new jt.a}var Bt=n(11);function Ht(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new Ft(t))}}var Ft=function(){function t(t){if(this.total=t,this.total<0)throw new Ot.a}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.total))},t}(),Ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()));},e}(p.a);function Wt(t,e){if(t<0)throw new Ot.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(Tt.a)((function(e,n){return n===t})),Ht(1),n?st(e):Nt((function(){return new Ot.a})))}}var zt=n(37);function qt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(q.a)(e,zt.a.apply(void 0,t))}}function Vt(t,e){return function(n){return n.lift(new Yt(t,e,n))}}var Yt=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n;}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.predicate,this.thisArg,this.source))},t}(),Jt=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.a(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete();},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source);}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1);},e.prototype._complete=function(){this.notifyComplete(!0);},e}(p.a);function Gt(){return function(t){return t.lift(new Kt)}}var Kt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new $t(t))},t}(),$t=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.c)(t,new i.a(this))));},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete();},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete();},e}(i.b),Xt=n(9);function Qt(t,e){return e?function(n){return n.pipe(Qt((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Xt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Zt(t))}}var Zt=function(){function t(t){this.project=t;}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t);},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n);}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e);},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r);},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe();},e.prototype.notifyNext=function(t){this.destination.next(t);},e.prototype.notifyError=function(t){this.destination.error(t);},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete();},e}(i.b);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n;}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return r.a(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,i=t.index;e.subscribeToProjection(n,r,i);},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else {var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var i=(0,this.project)(t,r);if(this.scheduler){var o={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,o));}else this.subscribeToProjection(i,t,r);}catch(t){n.error(t);}}else this.buffer.push(t);}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(i.c)(t,new i.a(this)));},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe();},e.prototype.notifyNext=function(t){this._next(t);},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete();},e}(i.b);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t;}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.callback))},t}(),se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new C.a(n)),r}return r.a(e,t),e}(p.a);function ae(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ue(t,n,!1,e))}}var ue=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r;}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe();},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t);}catch(t){this.destination.error(t);}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0);},e}(p.a);function le(t,e){return function(n){return n.lift(new ue(t,n,!0,e))}}var he=n(15);function de(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(Tt.a)((function(e,n){return t(e,n,r)})):he.a,Ht(1),n?st(e):Nt((function(){return new jt.a})))}}var fe=n(66);function pe(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ge(t))},t}(),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype._next=function(t){},e}(p.a);function me(){return function(t){return t.lift(new ye)}}var ye=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete();},e.prototype._next=function(t){this.notifyComplete(!1);},e.prototype._complete=function(){this.notifyComplete(!0);},e}(p.a);function we(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new _e(t))}}var _e=function(){function t(t){if(this.total=t,this.total<0)throw new Ot.a}return t.prototype.call=function(t,e){return e.subscribe(new Se(t,this.total))},t}(),Se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t;},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o]);}t.complete();},e}(p.a);function Ee(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(Tt.a)((function(e,n){return t(e,n,r)})):he.a,we(1),n?st(e):Nt((function(){return new jt.a})))}}function xe(t){return function(e){return e.lift(new ke(t))}}var ke=function(){function t(t){this.value=t;}return t.prototype.call=function(t,e){return e.subscribe(new Me(t,this.value))},t}(),Me=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.a(e,t),e.prototype._next=function(t){this.destination.next(this.value);},e}(p.a);function Ce(){return function(t){return t.lift(new Re)}}var Re=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ae(t))},t}(),Ae=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t));},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete();},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete();},e}(p.a);function Ie(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Oe(t,e,n))}}var Oe=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n;}return t.prototype.call=function(t,e){return e.subscribe(new Te(t,this.accumulator,this.seed,this.hasSeed))},t}(),Te=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.a(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t;},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t);},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n);}catch(t){this.destination.error(t);}this.seed=e,this.destination.next(e);},e}(p.a),je=n(39);function Ne(t,e){return arguments.length>=2?function(n){return Object(je.a)(Ie(t,e),we(1),st(e))(n)}:function(e){return Object(je.a)(Ie((function(e,n,r){return t(e,n,r+1)})),we(1))(e)}}function Pe(t){return Ne("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Le=n(73);function De(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Le.a.apply(void 0,[e].concat(t)))}}var Be=n(50);function He(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Object(J.b)((function(){return t}),e,n):("number"==typeof e&&(n=e),Object(J.b)((function(){return t}),n))}function Fe(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Ue(t,e,n))}}var Ue=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n;}return t.prototype.call=function(t,e){return e.subscribe(new We(t,this.accumulator,this.seed,this.concurrent))},t}(),We=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e);}catch(t){return n.error(t)}this.active++,this._innerSub(r);}else this.buffer.push(t);},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r);},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe();},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t);},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete());},e}(i.b);function ze(t){return Ne("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var qe=n(68);function Ve(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Ye(r,e));var i=Object.create(n,qe.b);return i.source=n,i.subjectFactory=r,i}}var Ye=function(){function t(t,e){this.subjectFactory=t,this.selector=e;}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),Je=n(70);function Ge(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),function(e){return e.lift(new Ke(t))}}var Ke=function(){function t(t){this.nextSources=t;}return t.prototype.call=function(t,e){return e.subscribe(new $e(t,this.nextSources))},t}(),$e=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.a(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource();},e.prototype.notifyComplete=function(){this.subscribeToNextSource();},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe();},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe();},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r);}else this.destination.complete();},e}(i.b);function Xe(){return function(t){return t.lift(new Qe)}}var Qe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.a(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e);},e}(p.a),tn=n(81);function en(t,e){return function(n){return [Object(Tt.a)(t,e)(n),Object(Tt.a)(Object(tn.a)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Xt.a)(rn(t,n))(e)}}function rn(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=null!=r?r[t[i]]:void 0;if(void 0===o)return;r=o;}return r}}var on=n(5);function sn(t){return t?Ve((function(){return new on.a}),t):Ve(new on.a)}var an=n(69);function un(t){return function(e){return Ve(new an.a(t))(e)}}var cn=n(30);function ln(){return function(t){return Ve(new cn.a)(t)}}var hn=n(47);function dn(t,e,n,r){n&&"function"!=typeof n&&(r=n);var i="function"==typeof n?n:void 0,o=new hn.a(t,e,r);return function(t){return Ve((function(){return o}),i)(t)}}var fn=n(74);function pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),e.lift.call(fn.a.apply(void 0,[e].concat(t)))}}function bn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(Bt.b)():t<0?e.lift(new gn(-1,e)):e.lift(new gn(t-1,e))}}var gn=function(){function t(t,e){this.count=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.count,this.source))},t}(),mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.a(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle());}},e}(p.a);function yn(t){return function(e){return e.lift(new vn(t))}}var vn=function(){function t(t){this.notifier=t;}return t.prototype.call=function(t,e){return e.subscribe(new wn(t,this.notifier,e))},t}(),wn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.a(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this);},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0);}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0;},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new on.a;try{e=(0,this.notifier)(this.notifications);}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.c)(e,new i.a(this));},e}(i.b);function _n(t){return void 0===t&&(t=-1),function(e){return e.lift(new Sn(t,e))}}var Sn=function(){function t(t,e){this.count=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.count,this.source))},t}(),En=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle());}},e}(p.a);function xn(t){return function(e){return e.lift(new kn(t,e))}}var kn=function(){function t(t,e){this.notifier=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new Mn(t,this.notifier,this.source))},t}(),Mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else {n=new on.a;try{r=(0,this.notifier)(n);}catch(e){return t.prototype.error.call(this,e)}o=Object(i.c)(r,new i.a(this));}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e);}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0;},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this);},e}(i.b),Cn=n(46);function Rn(t){return function(e){return e.lift(new An(t))}}var An=function(){function t(t){this.notifier=t;}return t.prototype.call=function(t,e){var n=new In(t),r=e.subscribe(n);return r.add(Object(i.c)(this.notifier,new i.a(n))),r},t}(),In=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.a(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0;},e.prototype.notifyNext=function(){this.emitValue();},e.prototype.notifyComplete=function(){this.emitValue();},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value));},e}(i.b);function On(t,e){return void 0===e&&(e=u.a),function(n){return n.lift(new Tn(t,e))}}var Tn=function(){function t(t,e){this.period=t,this.scheduler=e;}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.period,this.scheduler))},t}(),jn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Nn,n,{subscriber:i,period:n})),i}return r.a(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0;},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue));},e}(p.a);function Nn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n);}function Pn(t,e){return function(n){return n.lift(new Ln(t,e))}}var Ln=function(){function t(t,e){this.compareTo=t,this.comparator=e;}return t.prototype.call=function(t,e){return e.subscribe(new Dn(t,this.compareTo,this.comparator))},t}(),Dn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Bn(e,i))),i}return r.a(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues());},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe();},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;try{o=n?n(r,i):r===i;}catch(t){this.destination.error(t);}o||this.emit(!1);}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete();},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues());},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0;},e}(p.a),Bn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.a(e,t),e.prototype._next=function(t){this.parent.nextB(t);},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe();},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe();},e}(p.a);function Hn(){return new on.a}function Fn(){return function(t){return Object(Cn.a)()(Ve(Hn)(t))}}function Un(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,a=t.refCount,u=t.scheduler,c=0,l=!1,h=!1;return function(t){var r;c++,!e||l?(l=!1,e=new hn.a(i,s,u),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t);},error:function(t){l=!0,e.error(t);},complete:function(){h=!0,n=void 0,e.complete();}}),h&&(n=void 0)):r=e.subscribe(this),this.add((function(){c--,r.unsubscribe(),r=void 0,n&&!h&&a&&0===c&&(n.unsubscribe(),n=void 0,e=void 0);}));}}(r))}}function Wn(t){return function(e){return e.lift(new zn(t,e))}}var zn=function(){function t(t,e){this.predicate=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new qn(t,this.predicate,this.source))},t}(),qn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.a(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t);},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t);},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t);}catch(t){this.destination.error(t);}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new jt.a);},e}(p.a);function Vn(t){return function(e){return e.lift(new Yn(t))}}var Yn=function(){function t(t){this.total=t;}return t.prototype.call=function(t,e){return e.subscribe(new Jn(t,this.total))},t}(),Jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t);},e}(p.a);function Gn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Ot.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.a(t)):e.subscribe(new $n(t,this._skipCount))},t}(),$n=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.a(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else {var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o);}},e}(p.a);function Xn(t){return function(e){return e.lift(new Qn(t))}}var Qn=function(){function t(t){this.notifier=t;}return t.prototype.call=function(t,e){return e.subscribe(new Zn(t,this.notifier))},t}(),Zn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new i.a(r);r.add(o),r.innerSubscription=o;var s=Object(i.c)(n,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return r.a(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e);},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe();},e.prototype.notifyComplete=function(){},e}(i.b);function tr(t){return function(e){return e.lift(new er(t))}}var er=function(){function t(t){this.predicate=t;}return t.prototype.call=function(t,e){return e.subscribe(new nr(t,this.predicate))},t}(),nr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t);},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e);}catch(t){this.destination.error(t);}},e}(p.a);function rr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(v.a)(n)?(t.pop(),function(e){return Object(q.a)(t,e,n)}):function(e){return Object(q.a)(t,e)}}var ir=n(40),or=n(32),sr=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=ir.a);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!Object(or.a)(n)||n<0)&&(i.delayTime=0),r&&"function"==typeof r.schedule||(i.scheduler=ir.a),i}return r.a(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=ir.a),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(bt.a);function ar(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ur(t,e))}}var ur=function(){function t(t,e){this.scheduler=t,this.delay=e;}return t.prototype.call=function(t,e){return new sr(e,this.delay,this.scheduler).subscribe(t)},t}();function cr(t,e){return "function"==typeof e?function(n){return n.pipe(cr((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Xt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new lr(t))}}var lr=function(){function t(t){this.project=t;}return t.prototype.call=function(t,e){return e.subscribe(new hr(t,this.project))},t}(),hr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n);}catch(t){return void this.destination.error(t)}this._innerSub(e);},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription);},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe();},e.prototype._unsubscribe=function(){this.innerSubscription=void 0;},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this);},e.prototype.notifyNext=function(t){this.destination.next(t);},e}(i.b);function dr(){return cr(he.a)}function fr(t,e){return e?cr((function(){return t}),e):cr((function(){return t}))}function pr(t){return function(e){return e.lift(new br(t))}}var br=function(){function t(t){this.notifier=t;}return t.prototype.call=function(t,e){var n=new gr(t),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),gr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.a(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete();},e.prototype.notifyComplete=function(){},e}(i.b);function mr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new yr(t,e))}}var yr=function(){function t(t,e){this.predicate=t,this.inclusive=e;}return t.prototype.call=function(t,e){return e.subscribe(new vr(t,this.predicate,this.inclusive))},t}(),vr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++);}catch(t){return void n.error(t)}this.nextOrComplete(t,e);},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete());},e}(p.a),wr=n(21),_r=n(25);function Sr(t,e,n){return function(r){return r.lift(new Er(t,e,n))}}var Er=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n;}return t.prototype.call=function(t,e){return e.subscribe(new xr(t,this.nextOrObserver,this.error,this.complete))},t}(),xr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=wr.a,o._tapError=wr.a,o._tapComplete=wr.a,o._tapError=r||wr.a,o._tapComplete=i||wr.a,Object(_r.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||wr.a,o._tapError=n.error||wr.a,o._tapComplete=n.complete||wr.a),o}return r.a(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t);}catch(t){return void this.destination.error(t)}this.destination.next(t);},e.prototype._error=function(t){try{this._tapError.call(this._context,t);}catch(t){return void this.destination.error(t)}this.destination.error(t);},e.prototype._complete=function(){try{this._tapComplete.call(this._context);}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(p.a),kr={leading:!0,trailing:!1};function Mr(t,e){return void 0===e&&(e=kr),function(n){return n.lift(new Cr(t,!!e.leading,!!e.trailing))}}var Cr=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n;}return t.prototype.call=function(t,e){return e.subscribe(new Rr(t,this.durationSelector,this.leading,this.trailing))},t}(),Rr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}return r.a(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t));},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0;},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(i.c)(e,new i.a(this)));},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send();},e.prototype.notifyNext=function(){this.throttlingDone();},e.prototype.notifyComplete=function(){this.throttlingDone();},e}(i.b);function Ar(t,e,n){return void 0===e&&(e=u.a),void 0===n&&(n=kr),function(r){return r.lift(new Ir(t,e,n.leading,n.trailing))}}var Ir=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r;}return t.prototype.call=function(t,e){return e.subscribe(new Or(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Or=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=i,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.a(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Tr,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0));},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete();},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null);},e}(p.a);function Tr(t){t.subscriber.clearThrottle();}var jr=n(51);function Nr(t){return void 0===t&&(t=u.a),function(e){return Object(jr.a)((function(){return e.pipe(Ie((function(e,n){var r=e.current;return {value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Object(Xt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Pr(r,e-n)})))}))}}var Pr=function(){return function(t,e){this.value=t,this.interval=e;}}(),Lr=n(71);function Dr(t,e,n){return void 0===n&&(n=u.a),function(r){var i=ct(t),o=i?+t-n.now():Math.abs(t);return r.lift(new Br(o,i,e,n))}}var Br=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r;}return t.prototype.call=function(t,e){return e.subscribe(new Hr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Hr=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=i,s.scheduler=o,s.scheduleTimeout(),s}return r.a(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(i.c)(e,new i.a(t)));},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this));},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e);},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null;},e}(i.b),Fr=n(48);function Ur(t,e){return void 0===e&&(e=u.a),Dr(t,Object(Fr.a)(new Lr.a),e)}function Wr(t){return void 0===t&&(t=u.a),Object(Xt.a)((function(e){return new zr(e,t.now())}))}var zr=function(){return function(t,e){this.value=t,this.timestamp=e;}}();function qr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Vr(){return Ne(qr,[])}function Yr(t){return function(e){return e.lift(new Jr(t))}}var Jr=function(){function t(t){this.windowBoundaries=t;}return t.prototype.call=function(t,e){var n=new Gr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.c)(this.windowBoundaries,new i.a(n))),r},t}(),Gr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new on.a,e.next(n.window),n}return r.a(e,t),e.prototype.notifyNext=function(){this.openWindow();},e.prototype.notifyError=function(t){this._error(t);},e.prototype.notifyComplete=function(){this._complete();},e.prototype._next=function(t){this.window.next(t);},e.prototype._error=function(t){this.window.error(t),this.destination.error(t);},e.prototype._complete=function(){this.window.complete(),this.destination.complete();},e.prototype._unsubscribe=function(){this.window=null;},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new on.a;e.next(n);},e}(i.b);function Kr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new $r(t,e))}}var $r=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e;}return t.prototype.call=function(t,e){return e.subscribe(new Xr(t,this.windowSize,this.startWindowEvery))},t}(),Xr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new on.a],i.count=0,e.next(i.windows[0]),i}return r.a(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(t);var a=this.count-r+1;if(a>=0&&a%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var u=new on.a;i.push(u),n.next(u);}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t);},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete();},e.prototype._unsubscribe=function(){this.count=0,this.windows=null;},e}(p.a);function Qr(t){var e=u.a,n=null,r=Number.POSITIVE_INFINITY;return Object(v.a)(arguments[3])&&(e=arguments[3]),Object(v.a)(arguments[2])?e=arguments[2]:Object(or.a)(arguments[2])&&(r=Number(arguments[2])),Object(v.a)(arguments[1])?e=arguments[1]:Object(or.a)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Zr(t,n,r,e))}}var Zr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r;}return t.prototype.call=function(t,e){return e.subscribe(new ei(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),ti=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.a(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e);},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(on.a),ei=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var u={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(ii,n,u)),s.add(o.schedule(ri,r,c));}else {var l={subscriber:s,window:a,windowTimeSpan:n};s.add(o.schedule(ni,n,l));}return s}return r.a(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i));}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t);},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete();}this.destination.complete();},e.prototype.openWindow=function(){var t=new ti;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1);},e}(p.a);function ni(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n);}function ri(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null},a={subscriber:n,window:o,context:s};s.subscription=r.schedule(ii,e,a),this.add(s.subscription),this.schedule(t,i);}function ii(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n);}function oi(t,e){return function(n){return n.lift(new si(t,e))}}var si=function(){function t(t,e){this.openings=t,this.closingSelector=e;}return t.prototype.call=function(t,e){return e.subscribe(new ai(t,this.openings,this.closingSelector))},t}(),ai=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=Object(R.a)(i,n,n)),i}return r.a(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t);},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(e),o.subscription.unsubscribe();}t.prototype._error.call(this,e);},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe();}t.prototype._complete.call(this);},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe();}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=void 0;try{o=(0,this.closingSelector)(e);}catch(t){return this.error(t)}var s=new on.a,a=new C.a,u={window:s,subscription:a};this.contexts.push(u);var c=Object(R.a)(this,o,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,a.add(c)),this.destination.next(s);}else this.closeWindow(this.contexts.indexOf(t));},e.prototype.notifyError=function(t){this.error(t);},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context));},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe();}},e}(A.a);function ui(t){return function(e){return e.lift(new ci(t))}}var ci=function(){function t(t){this.closingSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new li(t,this.closingSelector))},t}(),li=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i);},e.prototype.notifyError=function(t){this._error(t);},e.prototype.notifyComplete=function(t){this.openWindow(t);},e.prototype._next=function(t){this.window.next(t);},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification();},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification();},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe();},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new on.a;this.destination.next(r);try{n=(0,this.closingSelector)();}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=Object(R.a)(this,n));},e}(A.a);function hi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new di(r,n))}}var di=function(){function t(t,e){this.observables=t,this.project=e;}return t.prototype.call=function(t,e){return e.subscribe(new fi(t,this.observables,this.project))},t}(),fi=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(s=0;s<o;s++){var a=n[s];i.add(Object(R.a)(i,a,void 0,s));}return i}return r.a(e,t),e.prototype.notifyNext=function(t,e,n){this.values[n]=e;var r=this.toRespond;if(r.length>0){var i=r.indexOf(n);-1!==i&&r.splice(i,1);}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e);}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t);}catch(t){return void this.destination.error(t)}this.destination.next(e);},e}(A.a),pi=n(52);function bi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(pi.b.apply(void 0,[e].concat(t)))}}function gi(t){return function(e){return e.lift(new pi.a(t))}}},function(t,e,n){n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s}));var r=n(0),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(31).a),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e}(n(29).a))(i),s=o;},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n;}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}();},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});const r=n(64);function i(t,e,n){try{Reflect.apply(t,e,n);}catch(t){setTimeout(()=>{throw t});}}class o extends r.EventEmitter{emit(t,...e){let n="error"===t;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return !1;if(n){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const n=new Error("Unhandled error."+(t?` (${t.message})`:""));throw n.context=t,n}const o=r[t];if(void 0===o)return !1;if("function"==typeof o)i(o,this,e);else {const t=o.length,n=function(t){const e=t.length,n=new Array(e);for(let r=0;r<e;r+=1)n[r]=t[r];return n}(o);for(let r=0;r<t;r+=1)i(n[r],this,e);}return !0}}e.default=o;},function(t,e,n){var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this);}t.exports=a,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n);}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments));}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,n);}(t,i,{once:!0});}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function h(t,e,n,r){var i,o,s,a;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=l(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a);}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return [];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):g(i,i.length)}function b(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else {if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o);}));}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t;}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return !1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return !1;if("function"==typeof u)o(u,this,e);else {var c=u.length,l=g(u,c);for(n=0;n<c;++n)o(l[n],this,e);}return !0},a.prototype.addListener=function(t,e){return h(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return h(this,t,e,!0)},a.prototype.once=function(t,e){return c(e),this.on(t,f(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,f(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,i,o,s;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop();}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e);}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return "function"==typeof t.listenerCount?t.listenerCount(e):b.call(t,e)},a.prototype.listenerCount=b,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};},function(t,e,n){(function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t;}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"));}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(127).Buffer;}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function c(t,e,n,i){for(var o=0,s=0,a=Math.min(t.length,n),u=e;u<a;u++){var c=t.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&s<i,"Invalid character"),o+=s;}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red;}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)));},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n);},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip();},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,l=n;l<a;l+=r)u=c(t,l,l+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);}this._strip();},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red;},o.prototype._move=function(t){l(t,this);},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h;}catch(t){o.prototype.inspect=h;}else o.prototype.inspect=h;function h(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!==(o=a>>>24-i&16777215)||s!==this.length-1?d[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--);}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],l=p[t];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var b=h.modrn(l).toString(t);n=(h=h.idivn(l)).isZero()?b+n:d[c-b.length]+b+n;}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36");},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function b(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var c=1;c<r;c++){for(var l=u>>>26,h=67108863&u,d=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=d;f++){var p=c-f|0;l+=(s=(i=0|t.words[p])*(o=0|e.words[f])+h)/67108864|0,h=67108863&s;}n.words[c]=0|h,u=0|l;}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;t[n++]=255&s,n<t.length&&(t[n++]=s>>8&255),n<t.length&&(t[n++]=s>>16&255),6===o?(n<t.length&&(t[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2);}if(n<t.length)for(t[n++]=r;n<t.length;)t[n++]=0;},o.prototype._toArrayLikeBE=function(t,e){for(var n=t.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;t[n--]=255&s,n>=0&&(t[n--]=s>>8&255),n>=0&&(t[n--]=s>>16&255),6===o?(n>=0&&(t[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2);}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0;},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,c=0,l=0|s[0],h=8191&l,d=l>>>13,f=0|s[1],p=8191&f,b=f>>>13,g=0|s[2],m=8191&g,y=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],E=8191&S,x=S>>>13,k=0|s[5],M=8191&k,C=k>>>13,R=0|s[6],A=8191&R,I=R>>>13,O=0|s[7],T=8191&O,j=O>>>13,N=0|s[8],P=8191&N,L=N>>>13,D=0|s[9],B=8191&D,H=D>>>13,F=0|a[0],U=8191&F,W=F>>>13,z=0|a[1],q=8191&z,V=z>>>13,Y=0|a[2],J=8191&Y,G=Y>>>13,K=0|a[3],$=8191&K,X=K>>>13,Q=0|a[4],Z=8191&Q,tt=Q>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191&lt,dt=lt>>>13,ft=0|a[9],pt=8191&ft,bt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,W))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,W))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,W))+Math.imul(b,U)|0,o=Math.imul(b,W);var mt=(c+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(m,U),i=(i=Math.imul(m,W))+Math.imul(y,U)|0,o=Math.imul(y,W),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,V)|0;var yt=(c+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,W))+Math.imul(_,U)|0,o=Math.imul(_,W),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,G)|0;var vt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,W))+Math.imul(x,U)|0,o=Math.imul(x,W),r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(m,J)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0;var wt=(c+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,W))+Math.imul(C,U)|0,o=Math.imul(C,W),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(x,q)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,X)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,tt)|0;var _t=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(d,nt)|0))<<13)|0;c=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,W))+Math.imul(I,U)|0,o=Math.imul(I,W),r=r+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,r=r+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0;var St=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(T,U),i=(i=Math.imul(T,W))+Math.imul(j,U)|0,o=Math.imul(j,W),r=r+Math.imul(A,q)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,X)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(m,nt)|0,i=(i=i+Math.imul(m,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var Et=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(d,ut)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,W))+Math.imul(L,U)|0,o=Math.imul(L,W),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0;var xt=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,W))+Math.imul(H,U)|0,o=Math.imul(H,W),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,q),i=(i=Math.imul(B,V))+Math.imul(H,q)|0,o=Math.imul(H,V),r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,X)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(C,nt)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,dt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,dt)|0;var Mt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,G))+Math.imul(H,J)|0,o=Math.imul(H,G),r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,X)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0;var Ct=(c+(r=r+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,bt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,bt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,X))+Math.imul(H,$)|0,o=Math.imul(H,X),r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,r=r+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,dt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,dt)|0;var Rt=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,tt))+Math.imul(H,Z)|0,o=Math.imul(H,tt),r=r+Math.imul(P,nt)|0,i=(i=i+Math.imul(P,rt)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,r=r+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(M,ht)|0,i=(i=i+Math.imul(M,dt)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,dt)|0;var At=(c+(r=r+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,bt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,bt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(H,nt)|0,o=Math.imul(H,rt),r=r+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,r=r+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,dt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,dt)|0;var It=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,bt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,st))+Math.imul(H,ot)|0,o=Math.imul(H,st),r=r+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ct)|0,r=r+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,dt)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,dt)|0;var Ot=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,bt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,ct))+Math.imul(H,ut)|0,o=Math.imul(H,ct),r=r+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,dt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,dt)|0;var Tt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,bt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,ht),i=(i=Math.imul(B,dt))+Math.imul(H,ht)|0,o=Math.imul(H,dt);var jt=(c+(r=r+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,bt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,bt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Nt=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,bt))+Math.imul(H,pt)|0))<<13)|0;return c=((o=Math.imul(H,bt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=mt,u[2]=yt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Et,u[8]=xt,u[9]=kt,u[10]=Mt,u[11]=Ct,u[12]=Rt,u[13]=At,u[14]=It,u[15]=Ot,u[16]=Tt,u[17]=jt,u[18]=Nt,0!==c&&(u[19]=c,n.length++),n};function m(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863;}n.words[o]=a,r=s,s=i;}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(t,e,n){return m(t,e,n)}Math.imul||(g=b),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?b(this,t,e):n<1024?m(this,t,e):y(this,t,e)},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),y(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s;}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=t.words[r]>>>i&1;}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n;}s&&(this.words[e]=s,this.length++);}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i;}return this._strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=n;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s;}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a;}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return !(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i;}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o;}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!==(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0;}var l=r.clone()._ishlnsubmul(i,1,u);0===l.negative&&(r=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d);}return a&&a._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a;},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t;}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s));}return {a:a,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.isub(e),a.isub(s));}return (i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o;}else if(0===i||0===n.cmpn(1))break;e.isub(n);}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a;}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return -1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else {n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1;}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return -1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return -1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return -1===this.cmpn(t)},o.prototype.lt=function(t){return -1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function E(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function x(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function k(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e;}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null;}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength();}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e);},_.prototype.imulK=function(t){return t.imul(this.k)},i(S,_),S.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o;}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9;},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0);}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(E,_),i(x,_),i(k,_),k.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r;}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new E;else if("p192"===t)e=new x;else {if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k;}return w[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers");},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers");},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var b=f,g=0;0!==b.cmp(a);g++)b=b.redSqr();r(g<p);var m=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(m),h=m.redSqr(),f=f.redMul(h),p=g;}return d},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],l=u-1;l>=0;l--){var h=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===r&&0===l)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0;}u=26;}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)};}(t,this);}).call(this,n(126)(t));},function(t,e,n){n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return d}));var r=n(0),i=n(1),o=n(4),s=n(3),a=n(5);function u(t,e,n,r){return function(i){return i.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r;}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t);}catch(t){return void this.error(t)}this._group(t,e);},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t);}catch(t){this.error(t);}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new a.a,n.set(e,i);var o=new d(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new d(e,i));}catch(t){return void this.error(t)}this.add(s.subscribe(new h(e,i,this)));}}i.closed||i.next(r);},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t);})),e.clear()),this.destination.error(t);},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete();})),t.clear()),this.destination.complete();},e.prototype.removeGroup=function(t){this.groups.delete(t);},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this));},e}(i.a),h=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.a(e,t),e.prototype._next=function(t){this.complete();},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e);},e}(i.a),d=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.a(e,t),e.prototype._subscribe=function(t){var e=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new f(n)),e.add(r.subscribe(t)),e},e}(s.a),f=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.a(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe());},e}(o.a);},function(t,e,n){n.r(e),n.d(e,"useState",(function(){return b})),n.d(e,"useReducer",(function(){return g})),n.d(e,"useEffect",(function(){return m})),n.d(e,"useLayoutEffect",(function(){return y})),n.d(e,"useRef",(function(){return v})),n.d(e,"useImperativeHandle",(function(){return w})),n.d(e,"useMemo",(function(){return _})),n.d(e,"useCallback",(function(){return S})),n.d(e,"useContext",(function(){return E})),n.d(e,"useDebugValue",(function(){return x})),n.d(e,"useErrorBoundary",(function(){return k}));var r,i,o,s=n(8),a=0,u=[],c=s.options.__b,l=s.options.__r,h=s.options.diffed,d=s.options.__c,f=s.options.unmount;function p(t,e){s.options.__h&&s.options.__h(i,t,a||e),a=0;var n=i.__H||(i.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function b(t){return a=1,g(O,t)}function g(t,e,n){var o=p(r++,2);return o.t=t,o.__c||(o.__=[n?n(e):O(void 0,e),function(t){var e=o.t(o.__[0],t);o.__[0]!==e&&(o.__=[e,o.__[1]],o.__c.setState({}));}],o.__c=i),o.__}function m(t,e){var n=p(r++,3);!s.options.__s&&I(n.__H,e)&&(n.__=t,n.__H=e,i.__H.__h.push(n));}function y(t,e){var n=p(r++,4);!s.options.__s&&I(n.__H,e)&&(n.__=t,n.__H=e,i.__h.push(n));}function v(t){return a=5,_((function(){return {current:t}}),[])}function w(t,e,n){a=6,y((function(){"function"==typeof t?t(e()):t&&(t.current=e());}),null==n?n:n.concat(t));}function _(t,e){var n=p(r++,7);return I(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function S(t,e){return a=8,_((function(){return t}),e)}function E(t){var e=i.context[t.__c],n=p(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(i)),e.props.value):t.__}function x(t,e){s.options.useDebugValue&&s.options.useDebugValue(e?e(t):t);}function k(t){var e=p(r++,10),n=b();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t){e.__&&e.__(t),n[1](t);}),[n[0],function(){n[1](void 0);}]}function M(){for(var t;t=u.shift();)if(t.__P)try{t.__H.__h.forEach(R),t.__H.__h.forEach(A),t.__H.__h=[];}catch(e){t.__H.__h=[],s.options.__e(e,t.__v);}}s.options.__b=function(t){i=null,c&&c(t);},s.options.__r=function(t){l&&l(t),r=0;var e=(i=t.__c).__H;e&&(e.__h.forEach(R),e.__h.forEach(A),e.__h=[]);},s.options.diffed=function(t){h&&h(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&o===s.options.requestAnimationFrame||((o=s.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),C&&cancelAnimationFrame(e),setTimeout(t);},r=setTimeout(n,100);C&&(e=requestAnimationFrame(n));})(M)),i=null;},s.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(R),t.__h=t.__h.filter((function(t){return !t.__||A(t)}));}catch(n){e.some((function(t){t.__h&&(t.__h=[]);})),e=[],s.options.__e(n,t.__v);}})),d&&d(t,e);},s.options.unmount=function(t){f&&f(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{R(t);}catch(t){e=t;}})),e&&s.options.__e(e,n.__v));};var C="function"==typeof requestAnimationFrame;function R(t){var e=i,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),i=e;}function A(t){var e=i;t.__c=t.__(),i=e;}function I(t,e){return !t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function O(t,e){return "function"==typeof e?e(t):e}},function(t,e,n){n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(0),i=n(5),o=n(3),s=n(1),a=n(4),u=n(46),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.a(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new a.a).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=a.a.EMPTY)),t},e.prototype.refCount=function(){return Object(u.a)()(this)},e}(o.a),l=function(){var t=c.prototype;return {operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e);},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this);},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe();}},e}(i.b);s.a;},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(0),i=n(5),o=n(23),s=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.a(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e);},e}(i.a);},function(t,e,n){n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return u}));var r=n(0),i=n(1),o=n(18);function s(t,e){return void 0===e&&(e=0),function(n){return n.lift(new a(t,e))}}var a=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e;}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}(),u=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.a(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe();},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)));},e.prototype._next=function(t){this.scheduleMessage(o.a.createNext(t));},e.prototype._error=function(t){this.scheduleMessage(o.a.createError(t)),this.unsubscribe();},e.prototype._complete=function(){this.scheduleMessage(o.a.createComplete()),this.unsubscribe();},e}(i.a),c=function(){return function(t,e){this.notification=t,this.destination=e;}}();},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(50);function i(){return Object(r.a)(1)}},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(3),i=n(10),o=n(50),s=n(28);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,a=null,u=t[t.length-1];return Object(i.a)(u)?(a=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===a&&1===t.length&&t[0]instanceof r.a?t[0]:Object(o.a)(n)(Object(s.a)(t,a))}},function(t,e,n){n.d(e,"a",(function(){return u}));var r=n(0),i=n(7),o=n(28),s=n(16),a=n(13);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(i.a)(t[0]))return t[0];t=t[0];}return Object(o.a)(t,void 0).lift(new c)}var c=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.a(e,t),e.prototype._next=function(t){this.observables.push(t);},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else {for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=Object(a.a)(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i);}this.observables=null;}},e.prototype.notifyNext=function(t,e,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var i=this.subscriptions[r];i.unsubscribe(),this.remove(i);}this.subscriptions=null;}this.destination.next(e);},e}(s.a);},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(3),i=n(6),o=n(32),s=n(10);function a(t,e,n){void 0===t&&(t=0);var a=-1;return Object(o.a)(e)?a=Number(e)<1?1:Number(e):Object(s.a)(e)&&(n=e),Object(s.a)(n)||(n=i.a),new r.a((function(e){var r=Object(o.a)(t)?t:+t-n.now();return n.schedule(u,r,{index:0,period:a,subscriber:e})}))}function u(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n);}}},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(3),i=n(4),o=n(22);var s=n(55),a=n(20);var u=n(80),c=n(79);function l(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){var i=t[o.a]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})));},error:function(t){r.add(e.schedule((function(){return n.error(t)})));},complete:function(){r.add(e.schedule((function(){return n.complete()})));}}));}))),r}))}(t,e);if(Object(u.a)(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})));})));}),(function(t){r.add(e.schedule((function(){return n.error(t)})));}))}))),r}))}(t,e);if(Object(c.a)(t))return Object(s.a)(t,e);if(function(t){return t&&"function"==typeof t[a.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,o=new i.a;return o.add((function(){r&&"function"==typeof r.return&&r.return();})),o.add(e.schedule((function(){r=t[a.a](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done;}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule());}})));}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(0),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.a(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1);}}},e}(n(4).a);},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete();}};},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};},function(t,e,n){function r(t){return !!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return r}));},function(t,e,n){function r(t,e){function n(){return !n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,"a",(function(){return r}));},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const r=n(97),i=n(83);var o=n(97);Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return o.CoinbaseWalletSDK}});var s=n(83);Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return s.CoinbaseWalletProvider}}),e.default=r.CoinbaseWalletSDK,"undefined"!=typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider);},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;const i=r(n(63)),o=r(n(65)),s=n(84),a=n(87),u=n(88),c=n(100),l=n(38),h=r(n(131)),d=n(148),f=n(149),p=n(150);class b extends i.default{constructor(t){var e;super(),this._filterPolyfill=new d.FilterPolyfill(this),this._subscriptionManager=new p.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this._send=this.send.bind(this),this._sendAsync=this.sendAsync.bind(this),this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._jsonRpcUrlFromOpts=t.jsonRpcUrl,this._overrideIsMetaMask=t.overrideIsMetaMask,this._relayProvider=t.relayProvider,this._storage=t.storage,this._relayEventManager=t.relayEventManager,this._eventListener=t.eventListener,this.isCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this.supportsAddressSwitching=t.supportsAddressSwitching;const n=this.getChainId(),r=(0, l.prepend0x)(n.toString(16));this.emit("connect",{chainIdStr:r});const i=this._storage.getItem(c.LOCAL_STORAGE_ADDRESSES_KEY);if(i){const t=i.split(" ");""!==t[0]&&(this._addresses=t.map(t=>(0, l.ensureAddressString)(t)),this.emit("accountsChanged",t));}this._subscriptionManager.events.on("notification",t=>{this.emit("message",{type:t.method,data:t.params});}),this._addresses.length>0&&this.initializeRelay(),window.addEventListener("message",t=>{var e;if("walletLinkMessage"===t.data.type&&"defaultChainChanged"===t.data.data.action){const n=t.data.data.chainId,r=null!==(e=t.data.data.jsonRpcUrl)&&void 0!==e?e:this.jsonRpcUrl;this.updateProviderInfo(r,Number(n),!0);}});}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return (0, l.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return !0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return !0}isConnected(){return !0}get jsonRpcUrl(){var t;return null!==(t=this._storage.getItem("DefaultJsonRpcUrl"))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem("DefaultJsonRpcUrl",t);}get isChainOverridden(){return "true"===this._storage.getItem("HasChainOverriddenFromRelay")}set isChainOverridden(t){this._storage.setItem("HasChainOverriddenFromRelay",t.toString());}setProviderInfo(t,e){this.isChainOverridden||this.updateProviderInfo(t,this.getChainId(),!1);}updateProviderInfo(t,e,n){if("true"===this._storage.getItem("HasChainBeenSwitched")&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem("DefaultChainId",e.toString(10));!((0, l.ensureIntNumber)(e)!==r)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0);}async watchAsset(t,e,n,r,i,o){const s=await this.initializeRelay();return !!(await s.watchAsset(t,e,n,r,i,null==o?void 0:o.toString()).promise).result}async addEthereumChain(t,e,n,r,i,o){var s,a;if((0, l.ensureIntNumber)(t)===this.getChainId())return !1;const u=await this.initializeRelay(),c=u.inlineAddEthereumChain(t.toString());this._isAuthorized()||c||await u.requestEthereumAccounts().promise;const h=await u.addEthereumChain(t.toString(),e,i,n,r,o).promise;return !0===(null===(s=h.result)||void 0===s?void 0:s.isApproved)&&(this._storage.setItem("HasChainBeenSwitched","true"),this.updateProviderInfo(e[0],t,!1)),!0===(null===(a=h.result)||void 0===a?void 0:a.isApproved)}async switchEthereumChain(t){if((0, l.ensureIntNumber)(t)===this.getChainId())return;const e=await this.initializeRelay(),n=await e.switchEthereumChain(t.toString(10)).promise;if(n.errorCode)throw s.ethErrors.provider.custom({code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&(this._storage.setItem("HasChainBeenSwitched","true"),this.updateProviderInfo(r.rpcUrl,t,!1));}setAppInfo(t,e){this.initializeRelay().then(n=>n.setAppInfo(t,e));}async enable(){var t;return null===(t=this._eventListener)||void 0===t||t.onEvent(a.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0?[...this._addresses]:await this._send(f.JSONRPCMethod.eth_requestAccounts)}close(){this.initializeRelay().then(t=>t.resetAndReload());}send(t,e){if("string"==typeof t){const n={jsonrpc:"2.0",id:0,method:t,params:Array.isArray(e)?e:void 0!==e?[e]:[]};return this._sendRequestAsync(n).then(t=>t.result)}if("function"==typeof e){const n=t,r=e;return this._sendAsync(n,r)}if(Array.isArray(t)){return t.map(t=>this._sendRequest(t))}const n=t;return this._sendRequest(n)}sendAsync(t,e){if("function"!=typeof e)throw new Error("callback is required");if(Array.isArray(t)){const n=e;return void this._sendMultipleRequestsAsync(t).then(t=>n(null,t)).catch(t=>n(t,null))}const n=e;this._sendRequestAsync(t).then(t=>n(null,t)).catch(t=>n(t,null));}async request(t){if(!t||"object"!=typeof t||Array.isArray(t))throw s.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});const{method:e,params:n}=t;if("string"!=typeof e||0===e.length)throw s.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw s.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return (await this._sendRequestAsync({method:e,params:r,jsonrpc:"2.0",id:i})).result}async scanQRCode(t){const e=await this.initializeRelay(),n=await e.scanQRCode((0, l.ensureRegExpString)(t)).promise;if("string"!=typeof n.result)throw new Error("result was not a string");return n.result}async genericRequest(t,e){const n=await this.initializeRelay(),r=await n.genericRequest(t,e).promise;if("string"!=typeof r.result)throw new Error("result was not a string");return r.result}supportsSubscriptions(){return !1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return !0}_sendRequest(t){const e={jsonrpc:"2.0",id:t.id},{method:n}=t;if(e.result=this._handleSynchronousMethods(t),void 0===e.result)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return e}_setAddresses(t){if(!Array.isArray(t))throw new Error("addresses is not an array");const e=t.map(t=>(0, l.ensureAddressString)(t));JSON.stringify(e)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching||(this._addresses=e,this.emit("accountsChanged",this._addresses),this._storage.setItem(c.LOCAL_STORAGE_ADDRESSES_KEY,e.join(" "))));}_sendRequestAsync(t){return new Promise((e,n)=>{try{const r=this._handleSynchronousMethods(t);if(void 0!==r)return e({jsonrpc:"2.0",id:t.id,result:r});const i=this._handleAsynchronousFilterMethods(t);if(void 0!==i)return void i.then(n=>e(Object.assign(Object.assign({},n),{id:t.id}))).catch(t=>n(t));const o=this._handleSubscriptionMethods(t);if(void 0!==o)return void o.then(n=>e({jsonrpc:"2.0",id:t.id,result:n.result})).catch(t=>n(t))}catch(t){return n(t)}this._handleAsynchronousMethods(t).then(n=>n&&e(Object.assign(Object.assign({},n),{id:t.id}))).catch(t=>n(t));})}_sendMultipleRequestsAsync(t){return Promise.all(t.map(t=>this._sendRequestAsync(t)))}_handleSynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_accounts:return this._eth_accounts();case f.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case f.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case f.JSONRPCMethod.net_version:return this._net_version();case f.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case f.JSONRPCMethod.eth_sign:return this._eth_sign(n);case f.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case f.JSONRPCMethod.personal_sign:return this._personal_sign(n);case f.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case f.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case f.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case f.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case f.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case f.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case f.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case f.JSONRPCMethod.eth_signTypedData_v4:case f.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case f.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case f.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case f.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case f.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return (await this.initializeRelay()).makeEthereumJSONRPCRequest(t,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case f.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case f.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case f.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case f.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(t){switch(t.method){case f.JSONRPCMethod.eth_subscribe:case f.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const e=(0,l.ensureAddressString)(t);return this._addresses.map(t=>(0,l.ensureAddressString)(t)).includes(e)}catch(t){}return !1}_ensureKnownAddress(t){var e;if(!this._isKnownAddress(t))throw null===(e=this._eventListener)||void 0===e||e.onEvent(a.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const n=e.from?(0, l.ensureAddressString)(e.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(n);return {fromAddress:n,toAddress:e.to?(0, l.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0, l.ensureBN)(e.value):new o.default(0),data:e.data?(0, l.ensureBuffer)(e.data):t.alloc(0),nonce:null!=e.nonce?(0, l.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0, l.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0, l.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0, l.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0, l.ensureBN)(e.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw s.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw s.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(t,e,n,r){this._ensureKnownAddress(e);try{const i=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(t,e,n,r).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied message signature");throw t}}async _ethereumAddressFromSignedMessage(t,e,n){const r=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await r.ethereumAddressFromSignedMessage(t,e,n).promise).result}}_eth_accounts(){return [...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return (0, l.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem("DefaultChainId")||"1",e=parseInt(t,10);return (0, l.ensureIntNumber)(e)}async _eth_requestAccounts(){var t;if(null===(t=this._eventListener)||void 0===t||t.onEvent(a.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=await this.initializeRelay();e=await t.requestEthereumAccounts().promise;}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied account authorization");throw t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const e=(0, l.ensureAddressString)(t[0]),n=(0, l.ensureBuffer)(t[1]);return this._signEthereumMessage(n,e,!1)}_eth_ecRecover(t){const e=(0, l.ensureBuffer)(t[0]),n=(0, l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!1)}_personal_sign(t){this._requireAuthorization();const e=(0, l.ensureBuffer)(t[0]),n=(0, l.ensureAddressString)(t[1]);return this._signEthereumMessage(e,n,!0)}_personal_ecRecover(t){const e=(0, l.ensureBuffer)(t[0]),n=(0, l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!0)}async _eth_signTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await t.signEthereumTransaction(e).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_sendRawTransaction(t){const e=(0, l.ensureBuffer)(t[0]),n=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(e,this.getChainId()).promise).result}}async _eth_sendTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await t.signAndSubmitEthereumTransaction(e).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0, l.ensureParsedJSONObject)(t[0]),n=(0, l.ensureAddressString)(t[1]);this._ensureKnownAddress(n);const r=h.default.hashForSignTypedDataLegacy({data:e}),i=JSON.stringify(e,null,2);return this._signEthereumMessage(r,n,!1,i)}async _eth_signTypedData_v3(t){this._requireAuthorization();const e=(0, l.ensureAddressString)(t[0]),n=(0, l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v3({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _eth_signTypedData_v4(t){this._requireAuthorization();const e=(0, l.ensureAddressString)(t[0]),n=(0, l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _cbwallet_arbitrary(t){const e=t[0],n=t[1];if("string"!=typeof n)throw new Error("parameter must be a string");if("object"!=typeof e||null===e)throw new Error("parameter must be an object");return {jsonrpc:"2.0",id:0,result:await this.genericRequest(e,n)}}async _wallet_addEthereumChain(t){var e,n,r,i;const o=t[0];if(0===(null===(e=o.rpcUrls)||void 0===e?void 0:e.length))return {jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||""===o.chainName.trim())throw s.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!o.nativeCurrency)throw s.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const a=parseInt(o.chainId,16);return await this.addEthereumChain(a,null!==(n=o.rpcUrls)&&void 0!==n?n:[],null!==(r=o.blockExplorerUrls)&&void 0!==r?r:[],o.chainName,null!==(i=o.iconUrls)&&void 0!==i?i:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(t){const e=t[0];return await this.switchEthereumChain(parseInt(e.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(t){var e;const n=Array.isArray(t)?t[0]:t;if(0===(null===(e=n.type)||void 0===e?void 0:e.length))throw s.ethErrors.rpc.invalidParams({message:"type is a required field"});if("ERC20"!==n.type)throw s.ethErrors.rpc.invalidParams({message:`Asset of type '${n.type}' not supported`});if(!(null==n?void 0:n.options))throw s.ethErrors.rpc.invalidParams({message:"options is a required field"});if(!n.options.address)throw s.ethErrors.rpc.invalidParams({message:"option address is a required option"});const r=this.getChainId(),{address:i,symbol:o,image:a,decimals:u}=n.options;return {jsonrpc:"2.0",id:0,result:await this.watchAsset(n.type,i,o,u,a,r)}}_eth_uninstallFilter(t){const e=(0, l.ensureHexString)(t[0]);return this._filterPolyfill.uninstallFilter(e)}async _eth_newFilter(t){const e=t[0];return {jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(e)}}async _eth_newBlockFilter(){return {jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return {jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(t){const e=(0, l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(e)}_eth_getFilterLogs(t){const e=(0, l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterLogs(e)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(t=>(t.setAccountsCallback(t=>this._setAddresses(t)),t.setChainCallback((t,e)=>{this.updateProviderInfo(e,parseInt(t,10),!0);}),this._relay=t,t))}}e.CoinbaseWalletProvider=b;}).call(this,n(19).Buffer);},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(85);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(99);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(128);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=n(86);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}});},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(98);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n);}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}e.EthereumRpcError=i;function o(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n);}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.EVENTS={REQUEST_CHILD_ETHEREUM_ACCOUNTS_START:"walletlink_sdk.request_child_ethereum_accounts.start",REQUEST_CHILD_ETHEREUM_ACCOUNTS_RESPONSE:"walletlink_sdk.request_child_ethereum_accounts.response",STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const r=n(129),i=n(45),o=n(60),s=n(38);class a{constructor(t,e,n,i){this._storage=t,this._id=e||(0, s.randomBytesHex)(16),this._secret=n||(0, s.randomBytesHex)(32);const o=r.sha256.create();o.update(`${this._id}, ${this._secret} WalletLink`),this._key=o.hex(),this._linked=!!i;}static load(t){const e=t.getItem("session:id"),n=t.getItem("session:linked"),r=t.getItem("session:secret");return e&&r?new a(t,e,r,"1"===n):null}static get persistedSessionIdChange$(){return (0, i.fromEvent)(window,"storage").pipe((0, o.filter)(t=>"session:id"===t.key),(0, o.map)(t=>({oldValue:t.oldValue||null,newValue:t.newValue||null})))}static hash(t){return r.sha256.create().update(t).hex()}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked();}save(){return this._storage.setItem("session:id",this._id),this._storage.setItem("session:secret",this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem("session:linked",this._linked?"1":"0");}}e.Session=a;},function(t,e,n){function r(){return t=>t}Object.defineProperty(e,"__esModule",{value:!0}),e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=r,e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t;},function(t,e,n){var r=n(43).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r);}}}(o||i);var s=n.readable||!1!==n.readable&&e.readable,a=n.writable||!1!==n.writable&&e.writable,u=function(){e.writable||l();},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e);},h=e._readableState&&e._readableState.endEmitted,d=function(){s=!1,h=!0,a||o.call(e);},f=function(t){o.call(e,t);},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new r),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new r),o.call(e,t)):void 0},b=function(){e.req.on("finish",l);};return !function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?b():e.on("request",b)),e.on("end",d),e.on("finish",l),!1!==n.error&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",b),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",d),e.removeListener("error",f),e.removeListener("close",p);}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(98);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n);}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}e.EthereumRpcError=i;function o(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n);}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};},function(t,e,n){const r=n(63).default;t.exports=class extends r{constructor(){super(),this.updates=[];}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach(t=>this.emit("update",t));}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}};},function(t,e){function n(t){return null==t?t:Number.parseInt(t,16)}function r(t){if(null==t)return t;return "0x"+t.toString(16)}t.exports=async function({provider:t,fromBlock:e,toBlock:i}){e||(e=i);const o=n(e),s=n(i),a=Array(s-o+1).fill().map((t,e)=>o+e).map(r);return await Promise.all(a.map(e=>function(t,e,n){return new Promise((r,i)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:n},(t,e)=>{if(t)return i(t);r(e.result);});})}(t,"eth_getBlockByNumber",[e,!1])))};},function(t,e,n){function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}n.r(e),e.default=function(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(i&&(i+=" "),i+=e);return i};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.RelayMessageType=void 0,function(t){t.SESSION_ID_REQUEST="SESSION_ID_REQUEST",t.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",t.LINKED="LINKED",t.UNLINKED="UNLINKED",t.WEB3_REQUEST="WEB3_REQUEST",t.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",t.WEB3_RESPONSE="WEB3_RESPONSE";}(e.RelayMessageType||(e.RelayMessageType={}));},function(t,e,n){(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;const r=n(122),i=n(83),o=n(173),s=n(189),a=n(200),u=n(38),c=t.env.LINK_API_URL||"https://www.walletlink.org",l=t.env.SDK_VERSION||n(201).version||"unknown";class h{constructor(t){var e;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const n=t.linkAPIUrl||c;let i;i=t.uiConstructor?t.uiConstructor:t=>new o.WalletSDKUI(t),void 0===t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this._eventListener=t.eventListener;const u=new URL(n),d=`${u.protocol}//${u.host}`;this._storage=new r.ScopedLocalStorage("-walletlink:"+d),this._storage.setItem("version",h.VERSION),this.walletExtension||(this._relayEventManager=new a.WalletSDKRelayEventManager,this._relay=new s.WalletSDKRelay({linkAPIUrl:n,version:l,darkMode:!!t.darkMode,uiConstructor:i,storage:this._storage,relayEventManager:this._relayEventManager,eventListener:this._eventListener}),this.setAppInfo(t.appName,t.appLogoUrl),this._relay.attachUI());}makeWeb3Provider(t="",e=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(t,e),n;const r=this._relay;if(!r||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return t||r.setConnectDisabled(!0),new i.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(r),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,eventListener:this._eventListener,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet})}setAppInfo(t,e){var n;this._appName=t||"DApp",this._appLogoUrl=e||(0, u.getFavicon)();const r=this.walletExtension;r?this.isCipherProvider(r)||r.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl);}disconnect(){var t;const e=this.walletExtension;e?e.close():null===(t=this._relay)||void 0===t||t.resetAndReload();}get walletExtension(){var t;return null!==(t=window.coinbaseWalletExtension)&&void 0!==t?t:window.walletLinkExtension}isCipherProvider(t){return "boolean"==typeof t.isCipher&&t.isCipher}}e.CoinbaseWalletSDK=h,h.VERSION=l;}).call(this,n(36));},function(t,e){t.exports=o,o.default=o,o.stable=u,o.stableStringify=u;var n=[],r=[];function i(){return {depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(t,e,o,a){var u;void 0===a&&(a=i()),function t(e,n,r,i,o,a,u){var c;if(a+=1,"object"==typeof e&&null!==e){for(c=0;c<i.length;c++)if(i[c]===e)return void s("[Circular]",e,n,o);if(void 0!==u.depthLimit&&a>u.depthLimit)return void s("[...]",e,n,o);if(void 0!==u.edgesLimit&&r+1>u.edgesLimit)return void s("[...]",e,n,o);if(i.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,c,i,e,a,u);else {var l=Object.keys(e);for(c=0;c<l.length;c++){var h=l[c];t(e[h],h,c,i,e,a,u);}}i.pop();}}(t,"",0,[],void 0,0,a);try{u=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,c(e),o);}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var l=n.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2];}}return u}function s(t,e,i,o){var s=Object.getOwnPropertyDescriptor(o,i);void 0!==s.get?s.configurable?(Object.defineProperty(o,i,{value:t}),n.push([o,i,e,s])):r.push([e,i,t]):(o[i]=t,n.push([o,i,e]));}function a(t,e){return t<e?-1:t>e?1:0}function u(t,e,o,u){void 0===u&&(u=i());var l,h=function t(e,r,i,o,u,c,l){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<o.length;h++)if(o[h]===e)return void s("[Circular]",e,r,u);try{if("function"==typeof e.toJSON)return}catch(t){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void s("[...]",e,r,u);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void s("[...]",e,r,u);if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)t(e[h],h,h,o,e,c,l);else {var d={},f=Object.keys(e).sort(a);for(h=0;h<f.length;h++){var p=f[h];t(e[p],p,h,o,e,c,l),d[p]=e[p];}if(void 0===u)return d;n.push([u,r,e]),u[r]=d;}o.pop();}}(t,"",0,[],void 0,0,u)||t;try{l=0===r.length?JSON.stringify(h,e,o):JSON.stringify(h,c(e),o);}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var d=n.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2];}}return l}function c(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var i=0;i<r.length;i++){var o=r[i];if(o[1]===e&&o[0]===n){n=o[2],r.splice(i,1);break}}return t.call(this,e,n)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(86),i=n(85),o=r.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return !1;const e=t.toString();return !!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=a,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=s,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=a(c.code),c.data={originalError:l(t)});}else {c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)};}const d=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&d&&"string"==typeof d&&(c.stack=d),c};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;const r=n(84);e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion";e.WalletSDKRelayAbstract=class{async makeEthereumJSONRPCRequest(t,e){if(!e)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(e,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>{if(!t)throw r.ethErrors.rpc.parse({});const e=t,{error:n}=e;if(n)throw (0, r.serializeError)(n);return e})}};},function(t,e,n){(function(e){const r=n(132),i=n(65);function o(t){return e.allocUnsafe(t).fill(0)}function s(t,e,n){const r=o(e);return t=a(t),n?t.length<e?(t.copy(r),r):t.slice(0,e):t.length<e?(t.copy(r,e-t.length),r):t.slice(-e)}function a(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"==typeof t)t=u(t)?e.from((n=c(t)).length%2?"0"+n:n,"hex"):e.from(t);else if("number"==typeof t)t=intToBuffer(t);else if(null==t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else {if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray());}var n;return t}function u(t){return "string"==typeof t&&t.match(/^0x[0-9A-Fa-f]*$/)}function c(t){return "string"==typeof t&&t.startsWith("0x")?t.slice(2):t}t.exports={zeros:o,setLength:s,setLengthRight:function(t,e){return s(t,e,!0)},isHexString:u,stripHexPrefix:c,toBuffer:a,bufferToHex:function(t){return "0x"+(t=a(t)).toString("hex")},keccak:function(t,e){return t=a(t),e||(e=256),r("keccak"+e).update(t).digest()}};}).call(this,n(19).Buffer);},function(t,e,n){(e=t.exports=n(103)).Stream=e,e.Readable=e,e.Writable=n(107),e.Duplex=n(44),e.Transform=n(109),e.PassThrough=n(142),e.finished=n(90),e.pipeline=n(143);},function(t,e,n){(function(e,r){var i;t.exports=k,k.ReadableState=x;n(64).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=n(104),a=n(19).Buffer,u=e.Uint8Array||function(){};var c,l=n(135);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,d,f,p=n(136),b=n(105),g=n(106).getHighWaterMark,m=n(43).codes,y=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(58)(k,s);var S=b.errorOrDestroy,E=["error","close","destroy","pause","resume"];function x(t,e,r){i=i||n(44),t=t||{},"boolean"!=typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=n(108).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding);}function k(t){if(i=i||n(44),!(this instanceof k))return new k(t);var e=this instanceof i;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this);}function M(t,e,n,r,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length);}e.ended=!0,e.sync?A(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)));}(t,s);else if(i||(o=function(t,e){var n;r=e,a.isBuffer(r)||r instanceof u||"string"==typeof e||void 0===e||t.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],e));var r;return n}(s,e)),o)S(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),r)s.endEmitted?S(t,new _):C(t,s,e,!0);else if(s.ended)S(t,new v);else {if(s.destroyed)return !1;s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?C(t,s,e,!1):O(t,s)):C(t,s,e,!1);}else r||(s.reading=!1,O(t,s));return !s.ended&&(s.length<s.highWaterMark||0===s.length)}function C(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&A(t)),O(t,e);}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t);}}),k.prototype.destroy=b.destroy,k.prototype._undestroy=b.undestroy,k.prototype._destroy=function(t,e){e(t);},k.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=a.from(t,e),e=""),n=!0),M(this,t,e,!1,n)},k.prototype.unshift=function(t){return M(this,t,null,!0,!1)},k.prototype.isPaused=function(){return !1===this._readableState.flowing},k.prototype.setEncoding=function(t){h||(h=n(108).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(I,t));}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t);}function O(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(T,t,e));}function T(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var n=e.length;if(c("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1;}function j(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume();}function N(t){c("readable nexttick read 0"),t.read(0);}function P(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0);}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function D(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n;}function B(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(H,e,t));}function H(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy();}}function F(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return -1}k.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):A(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(n,e))),null===(r=t>0?D(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(t){S(this,new w("_read()"));},k.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:g;function a(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",b),t.removeListener("drain",l),t.removeListener("error",f),t.removeListener("unpipe",a),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",d),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l());}function u(){c("onend"),t.end();}i.endEmitted?r.nextTick(s):n.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t));}}(n);t.on("drain",l);var h=!1;function d(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause());}function f(e){c("onerror",e),g(),t.removeListener("error",f),0===o(t,"error")&&S(t,e);}function p(){t.removeListener("finish",b),g();}function b(){c("onfinish"),t.removeListener("close",p),g();}function g(){c("unpipe"),n.unpipe(t);}return n.on("data",d),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n);}(t,"error",f),t.once("close",p),t.once("finish",b),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},k.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return -1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},k.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e),i=this._readableState;return "data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?A(this):i.reading||r.nextTick(N,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return "readable"===t&&r.nextTick(j,this),n},k.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return "readable"!==t&&void 0!==t||r.nextTick(j,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(P,t,e));}(this,t)),t.paused=!1,this},k.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t);}e.push(null);})),t.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()));})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<E.length;o++)t.on(E[o],this.emit.bind(this,E[o]));return this._read=function(e){c("wrapped _read",e),r&&(r=!1,t.resume());},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(140)),d(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t);}}),k._fromList=D,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(t,e){return void 0===f&&(f=n(141)),f(k,t,e)});}).call(this,n(57),n(36));},function(t,e,n){t.exports=n(64).EventEmitter;},function(t,e,n){(function(e){function n(t,e){i(t,e),r(t);}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function i(t,e){t.emit("error",e);}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(r,s):(s._writableState.errorEmitted=!0,e.nextTick(n,s,t)):e.nextTick(n,s,t):o?(e.nextTick(r,s),o(t)):e.nextTick(r,s);})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);},errorOrDestroy:function(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e);}};}).call(this,n(36));},function(t,e,n){var r=n(43).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}};},function(t,e,n){(function(e,r){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next;}e.corkedRequestsFree.next=t;}(e,t);};}var o;t.exports=k,k.WritableState=x;var s={deprecate:n(138)},a=n(104),u=n(19).Buffer,c=e.Uint8Array||function(){};var l,h=n(105),d=n(106).getHighWaterMark,f=n(43).codes,p=f.ERR_INVALID_ARG_TYPE,b=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,S=h.errorOrDestroy;function E(){}function x(t,e,s){o=o||n(44),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0;}(n),e)!function(t,e,n,i,o){--e.pendingcb,n?(r.nextTick(o,i),r.nextTick(O,t,e),t._writableState.errorEmitted=!0,S(t,i)):(o(i),t._writableState.errorEmitted=!0,S(t,i),O(t,e));}(t,n,i,e,o);else {var s=A(n)||t.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||R(t,n),i?r.nextTick(C,t,n,s,o):C(t,n,s,o);}}(e,t);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this);}function k(t){var e=this instanceof(o=o||n(44));if(!e&&!l.call(k,this))return new k(t);this._writableState=new x(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this);}function M(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1;}function C(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));}(t,e),e.pendingcb--,r(),O(t,e);}function R(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),s=e.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,M(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0;}else {for(;n;){var c=n.chunk,l=n.encoding,h=n.callback;if(M(t,e,!1,e.objectMode?1:c.length,c,l,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null);}e.bufferedRequest=n,e.bufferProcessing=!1;}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(n){e.pendingcb--,n&&S(t,n),e.prefinished=!0,t.emit("prefinish"),O(t,e);}));}function O(t,e){var n=A(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(I,t,e)));}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy();}return n}n(58)(k,a),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(t){return !!l.call(this,t)||this===k&&(t&&t._writableState instanceof x)}})):l=function(t){return t instanceof this},k.prototype.pipe=function(){S(this,new m);},k.prototype.write=function(t,e,n){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof n&&(n=E),o.ending?function(t,e){var n=new w;S(t,n),r.nextTick(e,n);}(this,n):(a||function(t,e,n,i){var o;return null===n?o=new v:"string"==typeof n||e.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(S(t,o),r.nextTick(i,o),!1)}(this,o,t,n))&&(o.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s);}var a=e.objectMode?1:r.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1;}else M(t,e,!1,a,r,i,o);return c}(this,o,a,t,e,n)),s},k.prototype.cork=function(){this._writableState.corked++;},k.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t));},k.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,n){n(new b("_write()"));},k.prototype._writev=null,k.prototype.end=function(t,e,n){var i=this._writableState;return "function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,O(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1;}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t);}}),k.prototype.destroy=h.destroy,k.prototype._undestroy=h.undestroy,k.prototype._destroy=function(t,e){e(t);};}).call(this,n(57),n(36));},function(t,e,n){var r=n(139).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return "utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0;}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e);}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return "";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return "";n=this.lastNeed,this.lastNeed=0;}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};},function(t,e,n){t.exports=l;var r=n(43).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(44);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h);}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(e,n){d(t,e,n);}));}function d(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}n(58)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,n){n(new i("_transform()"));},l.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform));},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t);}));};},function(t,e,n){const r=(t,e)=>function(){const n=e.promiseModule,r=new Array(arguments.length);for(let t=0;t<arguments.length;t++)r[t]=arguments[t];return new n((n,i)=>{e.errorFirst?r.push((function(t,r){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),i(e)):n(e);}else t?i(t):n(r);})):r.push((function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];n(t);}else n(t);})),t.apply(this,r);})};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const n=t=>{const n=e=>"string"==typeof e?t===e:e.test(t);return e.include?e.include.some(n):!e.exclude.some(n)};let i;i="function"==typeof t?function(){return e.excludeMain?t.apply(this,arguments):r(t,e).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const o in t){const s=t[o];i[o]="function"==typeof s&&n(o)?r(s,e):s;}return i};},function(t,e,n){const r=n(153),i=n(154)();function o(t){this.currentProvider=t;}function s(t){return function(){const e=this;var n=[].slice.call(arguments),r=n.pop();e.sendAsync({method:t,params:n},r);}}function a(t,e){return function(){const n=this;var r=[].slice.call(arguments),i=r.pop();r.length<t&&r.push("latest"),n.sendAsync({method:e,params:r},i);}}t.exports=o,o.prototype.getBalance=a(2,"eth_getBalance"),o.prototype.getCode=a(2,"eth_getCode"),o.prototype.getTransactionCount=a(2,"eth_getTransactionCount"),o.prototype.getStorageAt=a(3,"eth_getStorageAt"),o.prototype.call=a(2,"eth_call"),o.prototype.protocolVersion=s("eth_protocolVersion"),o.prototype.syncing=s("eth_syncing"),o.prototype.coinbase=s("eth_coinbase"),o.prototype.mining=s("eth_mining"),o.prototype.hashrate=s("eth_hashrate"),o.prototype.gasPrice=s("eth_gasPrice"),o.prototype.accounts=s("eth_accounts"),o.prototype.blockNumber=s("eth_blockNumber"),o.prototype.getBlockTransactionCountByHash=s("eth_getBlockTransactionCountByHash"),o.prototype.getBlockTransactionCountByNumber=s("eth_getBlockTransactionCountByNumber"),o.prototype.getUncleCountByBlockHash=s("eth_getUncleCountByBlockHash"),o.prototype.getUncleCountByBlockNumber=s("eth_getUncleCountByBlockNumber"),o.prototype.sign=s("eth_sign"),o.prototype.sendTransaction=s("eth_sendTransaction"),o.prototype.sendRawTransaction=s("eth_sendRawTransaction"),o.prototype.estimateGas=s("eth_estimateGas"),o.prototype.getBlockByHash=s("eth_getBlockByHash"),o.prototype.getBlockByNumber=s("eth_getBlockByNumber"),o.prototype.getTransactionByHash=s("eth_getTransactionByHash"),o.prototype.getTransactionByBlockHashAndIndex=s("eth_getTransactionByBlockHashAndIndex"),o.prototype.getTransactionByBlockNumberAndIndex=s("eth_getTransactionByBlockNumberAndIndex"),o.prototype.getTransactionReceipt=s("eth_getTransactionReceipt"),o.prototype.getUncleByBlockHashAndIndex=s("eth_getUncleByBlockHashAndIndex"),o.prototype.getUncleByBlockNumberAndIndex=s("eth_getUncleByBlockNumberAndIndex"),o.prototype.getCompilers=s("eth_getCompilers"),o.prototype.compileLLL=s("eth_compileLLL"),o.prototype.compileSolidity=s("eth_compileSolidity"),o.prototype.compileSerpent=s("eth_compileSerpent"),o.prototype.newFilter=s("eth_newFilter"),o.prototype.newBlockFilter=s("eth_newBlockFilter"),o.prototype.newPendingTransactionFilter=s("eth_newPendingTransactionFilter"),o.prototype.uninstallFilter=s("eth_uninstallFilter"),o.prototype.getFilterChanges=s("eth_getFilterChanges"),o.prototype.getFilterLogs=s("eth_getFilterLogs"),o.prototype.getLogs=s("eth_getLogs"),o.prototype.getWork=s("eth_getWork"),o.prototype.submitWork=s("eth_submitWork"),o.prototype.submitHashrate=s("eth_submitHashrate"),o.prototype.sendAsync=function(t,e){var n;this.currentProvider.sendAsync((n=t,r({id:i(),jsonrpc:"2.0",params:[]},n)),(function(t,n){if(!t&&n.error&&(t=new Error("EthQuery - RPC Error - "+n.error.message)),t)return e(t);e(null,n.result);}));};},function(t,e,n){t.exports=n(160);},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}});}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n];}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n);};Object.defineProperty(e,"__esModule",{value:!0}),i(n(161),e),i(n(162),e),i(n(163),e),i(n(114),e),i(n(115),e),i(n(166),e);},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;let r=Math.floor(4294967295*Math.random());e.getUniqueId=function(){return r=(r+1)%4294967295,r};},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;const i=r(n(63)),o=n(164);class s extends i.default{constructor(){super(),this._middleware=[];}push(t){this._middleware.push(t);}handle(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,n,r)=>{try{const[i,o,a]=await s._runAllMiddleware(t,e,this._middleware);return o?(await s._runReturnHandlers(a),r(i)):n(async t=>{try{await s._runReturnHandlers(a);}catch(e){return t(e)}return t()})}catch(t){return r(t)}}}async _handleBatch(t,e){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,n):n}catch(t){if(e)return e(t);throw t}}_promiseHandle(t){return new Promise(e=>{this._handle(t,(t,n)=>{e(n);});})}async _handle(t,e){if(!t||Array.isArray(t)||"object"!=typeof t){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return e(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!=typeof t.method){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return e(n,{id:t.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},t),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r);}catch(t){i=t;}return i&&(delete r.result,r.error||(r.error=o.serializeError(i))),e(i,r)}async _processRequest(t,e){const[n,r,i]=await s._runAllMiddleware(t,e,this._middleware);if(s._checkForCompletion(t,e,r),await s._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,e,n){const r=[];let i=null,o=!1;for(const a of n)if([i,o]=await s._runMiddleware(t,e,a,r),o)break;return [i,o,r.reverse()]}static _runMiddleware(t,e,n,r){return new Promise(i=>{const s=t=>{const n=t||e.error;n&&(e.error=o.serializeError(n)),i([n,!0]);},u=n=>{e.error?s(e.error):(n&&("function"!=typeof n&&s(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${a(t)}`,{request:t})),r.push(n)),i([null,!1]));};try{n(t,e,u,s);}catch(t){s(t);}})}static async _runReturnHandlers(t){for(const e of t)await new Promise((t,n)=>{e(e=>e?n(e):t());});}static _checkForCompletion(t,e,n){if(!("result"in e)&&!("error"in e))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n"+a(t),{request:t});if(!n)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n"+a(t),{request:t})}}function a(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=s;},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(92),i=n(91),o=r.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return !1;const e=t.toString();return !!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=a,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=s,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=a(c.code),c.data={originalError:l(t)});}else {c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)};}const d=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&d&&"string"==typeof d&&(c.stack=d),c};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.0.5";},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const i=n(8),o=n(67),s=r(n(177));e.QRCode=e=>{const[n,r]=(0, o.useState)("");return (0, o.useEffect)(()=>{var n,i;const o=new s.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=e.width)&&void 0!==n?n:256,height:null!==(i=e.height)&&void 0!==i?i:256,padding:0,image:e.image}),a=t.from(o.svg(),"utf8").toString("base64");r("data:image/svg+xml;base64,"+a);}),n?(0, i.h)("img",{src:n,alt:"QR Code"}):null};}).call(this,n(19).Buffer);},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;const i=n(8),o=r(n(178));e.Spinner=t=>{var e;const n=null!==(e=t.size)&&void 0!==e?e:64,r=t.color||"#000";return (0, i.h)("div",{class:"-cbwsdk-spinner"},(0, i.h)("style",null,o.default),(0, i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0, i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:r}})))};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3Method=void 0,function(t){t.requestEthereumAccounts="requestEthereumAccounts",t.signEthereumMessage="signEthereumMessage",t.signEthereumTransaction="signEthereumTransaction",t.submitEthereumTransaction="submitEthereumTransaction",t.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",t.scanQRCode="scanQRCode",t.generic="generic",t.childRequestEthereumAccounts="childRequestEthereumAccounts",t.addEthereumChain="addEthereumChain",t.switchEthereumChain="switchEthereumChain",t.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",t.watchAsset="watchAsset";}(e.Web3Method||(e.Web3Method={}));},function(t,e,n){n.r(e);var r=n(82);n.d(e,"CoinbaseWalletProvider",(function(){return r.CoinbaseWalletProvider})),n.d(e,"CoinbaseWalletSDK",(function(){return r.CoinbaseWalletSDK}));},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0;e.ScopedLocalStorage=class{constructor(t){this.scope=t;}setItem(t,e){localStorage.setItem(this.scopedKey(t),e);}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t));}clear(){const t=this.scopedKey(""),e=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);"string"==typeof r&&r.startsWith(t)&&e.push(r);}e.forEach(t=>localStorage.removeItem(t));}scopedKey(t){return `${this.scope}:${t}`}};},function(t,e,n){e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),s=r[0],a=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),l=0,h=a>0?s-4:s;for(n=0;n<h;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[l++]=255&e);1===a&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(l(t,s,s+16383>a?a:s+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return -1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;},function(t,e){
31266
+ var r=n(123),i=n(124),o=n(125);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return "undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=d(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|f(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return "number"!=typeof e.length||(r=e.length)!=r?a(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=a(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function d(t,e){var n=e.length<0?0:0|f(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0;}}function b(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return "";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return "";if((n>>>=0)<=(e>>>=0))return "";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return M(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return R(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0;}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r;}function m(t,e,n,r,i){if(0===t.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return -1;n=t.length-1;}else if(n<0){if(!i)return -1;n=0;}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,n/=2;}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else -1!==l&&(o-=o-l),l=-1;}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var h=!0,d=0;d<u;d++)if(c(t,o+d)!==c(e,d)){h=!1;break}if(h)return o}return -1}function v(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a;}return s}function w(t,e,n,r){return W(F(e,t.length-n),t,n,r)}function _(t,e,n,r){return W(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return _(t,e,n,r)}function E(t,e,n,r){return W(U(e),t,n,r)}function x(t,e,n,r){return W(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function M(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u);}null===l?(l=65533,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h;}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return !1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return !(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return !0;default:return !1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length;}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?M(this,0,t):b.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return -1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(r,i),l=t.slice(e,n),h=0;h<a;++h)if(c[h]!==l[h]){o=c[h],s=l[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return -1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else {if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0);}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0;}},u.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function R(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function A(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=H(t[o]);return i}function I(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i);}function N(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255;}function P(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,o){return o||P(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function D(t,e,n,r,o){return o||P(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else {var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t];}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||T(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||T(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i);}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);T(this,t,e,n,i-1,-i);}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i);}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else "number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else {var s=u.isBuffer(t)?t:F(new u(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a];}return this};var B=/[^+\/0-9A-Za-z-_]/g;function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320);}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n);}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128);}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128);}else {if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128);}}return o}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return "";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(57));},function(t,e,n){function r(){return "function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return i}));var i=r();},function(t,e,n){function r(){}n.d(e,"a",(function(){return r}));},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){return "function"==typeof Symbol&&Symbol.observable||"@@observable"}();},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){function r(t){return "function"==typeof t}n.d(e,"a",(function(){return r}));},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return l}));var r=n(0),i=n(9),o=n(12),s=n(2);function a(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(a((function(n,r){return Object(o.a)(t(n,r)).pipe(Object(i.a)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new u(t,n))})}var u=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e;}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent))},t}(),c=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t);},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n);}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e);},e.prototype._innerSub=function(t){var e=new s.a(this),n=this.destination;n.add(e);var r=Object(s.c)(t,e);r!==e&&n.add(r);},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe();},e.prototype.notifyNext=function(t){this.destination.next(t);},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete();},e}(s.b),l=a;},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(3),i=n(78),o=n(55);function s(t,e){return e?Object(o.a)(t,e):new r.a(Object(i.a)(t))}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(0),i=n(62),o=function(t){function e(n,r){void 0===r&&(r=i.a.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.a(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else {var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.a);},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(0),i=n(5),o=n(4),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.a(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0);},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e);},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this);},e}(i.a);},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(0),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.a(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e);},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null));},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t);}catch(t){n=!0,r=!!t&&t||new Error(t);}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null;},e}(function(t){function e(e,n){return t.call(this)||this}return r.a(e,t),e.prototype.schedule=function(t,e){return this},e}(n(4).a));},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(7);function i(t){return !Object(r.a)(t)&&t-parseFloat(t)+1>=0}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(37),i=n(72);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(i.a)()(r.a.apply(void 0,t))}},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(78),i=n(35),o=n(20),s=n(22),a=n(79),u=n(80),c=n(53),l=function(t){if(t&&"function"==typeof t[s.a])return l=t,function(t){var e=l[s.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(a.a)(t))return Object(r.a)(t);if(Object(u.a)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete());}),(function(e){return t.error(e)})).then(null,i.a),t};if(t&&"function"==typeof t[o.a])return e=t,function(t){for(var n=e[o.a]();;){var r=void 0;try{r=n.next();}catch(e){return t.error(e),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return "function"==typeof n.return&&t.add((function(){n.return&&n.return();})),t};var e,n,l,h=Object(c.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+h+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};},function(t,e,n){function r(t){setTimeout((function(){throw t}),0);}n.d(e,"a",(function(){return r}));},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o;}catch(t){n=o;}try{r="function"==typeof clearTimeout?clearTimeout:s;}catch(t){r=s;}}();var u,c=[],l=!1,h=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&f());}function f(){if(!l){var t=a(d);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length;}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t);}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t);}}function p(t,e){this.fun=t,this.array=e;}function b(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||a(f);},p.prototype.run=function(){this.fun.apply(null,this.array);},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=b,i.addListener=b,i.once=b,i.off=b,i.removeListener=b,i.removeAllListeners=b,i.emit=b,i.prependListener=b,i.prependOnceListener=b,i.listeners=function(t){return []},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return "/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0};},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(10),i=n(28),o=n(55);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(r.a)(n)?(t.pop(),Object(o.a)(t,n)):Object(i.a)(t)}},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getFavicon=e.range=e.isBigNumber=e.ensureParsedJSONObject=e.ensureBN=e.ensureRegExpString=e.ensureIntNumber=e.ensureBuffer=e.ensureAddressString=e.ensureEvenLengthHexString=e.ensureHexString=e.isHexString=e.prepend0x=e.strip0x=e.has0xPrefix=e.hexStringFromIntNumber=e.intNumberFromHexString=e.bigIntStringFromBN=e.hexStringFromBuffer=e.hexStringToUint8Array=e.uint8ArrayToHex=e.randomBytesHex=void 0;const i=r(n(65)),o=n(89),s=/^[0-9]*$/,a=/^[a-f0-9]*$/;function u(t){return [...t].map(t=>t.toString(16).padStart(2,"0")).join("")}function c(t){return t.startsWith("0x")||t.startsWith("0X")}function l(t){return c(t)?t.slice(2):t}function h(t){return c(t)?"0x"+t.slice(2):"0x"+t}function d(t){if("string"!=typeof t)return !1;const e=l(t).toLowerCase();return a.test(e)}function f(t,e=!1){if("string"==typeof t){const n=l(t).toLowerCase();if(a.test(n))return (0, o.HexString)(e?"0x"+n:n)}throw new Error(`"${String(t)}" is not a hexadecimal string`)}function p(t,e=!1){let n=f(t,!1);return n.length%2==1&&(n=(0, o.HexString)("0"+n)),e?(0, o.HexString)("0x"+n):n}function b(t){if("number"==typeof t&&Number.isInteger(t))return (0, o.IntNumber)(t);if("string"==typeof t){if(s.test(t))return (0, o.IntNumber)(Number(t));if(d(t))return (0, o.IntNumber)(new i.default(p(t,!1),16).toNumber())}throw new Error("Not an integer: "+String(t))}function g(t){if(null==t||"function"!=typeof t.constructor)return !1;const{constructor:e}=t;return "function"==typeof e.config&&"number"==typeof e.EUCLID}e.randomBytesHex=function(t){return u(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=u,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map(t=>parseInt(t,16)))},e.hexStringFromBuffer=function(t,e=!1){const n=t.toString("hex");return (0, o.HexString)(e?"0x"+n:n)},e.bigIntStringFromBN=function(t){return (0, o.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return (0, o.IntNumber)(new i.default(p(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return (0, o.HexString)("0x"+new i.default(t).toString(16))},e.has0xPrefix=c,e.strip0x=l,e.prepend0x=h,e.isHexString=d,e.ensureHexString=f,e.ensureEvenLengthHexString=p,e.ensureAddressString=function(t){if("string"==typeof t){const e=l(t).toLowerCase();if(d(e)&&40===e.length)return (0, o.AddressString)(h(e))}throw new Error("Invalid Ethereum address: "+String(t))},e.ensureBuffer=function(e){if(t.isBuffer(e))return e;if("string"==typeof e){if(d(e)){const n=p(e,!1);return t.from(n,"hex")}return t.from(e,"utf8")}throw new Error("Not binary data: "+String(e))},e.ensureIntNumber=b,e.ensureRegExpString=function(t){if(t instanceof RegExp)return (0, o.RegExpString)(t.toString());throw new Error("Not a RegExp: "+String(t))},e.ensureBN=function(t){if(null!==t&&(i.default.isBN(t)||g(t)))return new i.default(t.toString(10),10);if("number"==typeof t)return new i.default(b(t));if("string"==typeof t){if(s.test(t))return new i.default(t,10);if(d(t))return new i.default(p(t,!1),16)}throw new Error("Not an integer: "+String(t))},e.ensureParsedJSONObject=function(t){if("string"==typeof t)return JSON.parse(t);if("object"==typeof t)return t;throw new Error("Not a JSON string or an object: "+String(t))},e.isBigNumber=g,e.range=function(t,e){return Array.from({length:e-t},(e,n)=>t+n)},e.getFavicon=function(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:n}=document.location,r=t?t.getAttribute("href"):null;return !r||r.startsWith("javascript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?e+r:`${e}//${n}${r}`};}).call(this,n(19).Buffer);},function(t,e,n){n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n(15);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return 0===t.length?r.a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},function(t,e,n){n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}));var r=n(0),i=1,o=function(){return Promise.resolve()}(),s={};function a(t){return t in s&&(delete s[t],!0)}var u=function(t){var e=i++;return s[e]=!0,o.then((function(){return a(e)&&t()})),e},c=function(t){a(t);},l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=u(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(c(n),e.scheduled=void 0);},e}(n(31).a),h=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(29).a))(l),d=h;},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){return "function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}();},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){var r={};function i(t,e,n){n||(n=Error);var i=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return "string"==typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i;}function o(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return "of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,a;if("string"==typeof e&&(i="not ",e.substr(0,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return (void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))a="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else {var u=function(t,e,n){return "number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(o(e,"type"));}return a+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return "The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return "Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return "Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r;},function(t,e,n){(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(103),o=n(107);n(58)(c,i);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u]);}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)));}function l(){this._writableState.ended||e.nextTick(h,this);}function h(t){t.end();}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t);}});}).call(this,n(36));},function(t,e,n){n.r(e),n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return i.a})),n.d(e,"GroupedObservable",(function(){return o.a})),n.d(e,"observable",(function(){return s.a})),n.d(e,"Subject",(function(){return a.a})),n.d(e,"BehaviorSubject",(function(){return u.a})),n.d(e,"ReplaySubject",(function(){return c.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asap",(function(){return h.a})),n.d(e,"asapScheduler",(function(){return h.b})),n.d(e,"async",(function(){return d.a})),n.d(e,"asyncScheduler",(function(){return d.b})),n.d(e,"queue",(function(){return f.a})),n.d(e,"queueScheduler",(function(){return f.b})),n.d(e,"animationFrame",(function(){return v})),n.d(e,"animationFrameScheduler",(function(){return y})),n.d(e,"VirtualTimeScheduler",(function(){return w})),n.d(e,"VirtualAction",(function(){return _})),n.d(e,"Scheduler",(function(){return S.a})),n.d(e,"Subscription",(function(){return E.a})),n.d(e,"Subscriber",(function(){return x.a})),n.d(e,"Notification",(function(){return k.a})),n.d(e,"NotificationKind",(function(){return k.b})),n.d(e,"pipe",(function(){return M.a})),n.d(e,"noop",(function(){return C.a})),n.d(e,"identity",(function(){return R.a})),n.d(e,"isObservable",(function(){return A})),n.d(e,"ArgumentOutOfRangeError",(function(){return I.a})),n.d(e,"EmptyError",(function(){return O.a})),n.d(e,"ObjectUnsubscribedError",(function(){return T.a})),n.d(e,"UnsubscriptionError",(function(){return j.a})),n.d(e,"TimeoutError",(function(){return N.a})),n.d(e,"bindCallback",(function(){return H})),n.d(e,"bindNodeCallback",(function(){return W})),n.d(e,"combineLatest",(function(){return Y.b})),n.d(e,"concat",(function(){return J.a})),n.d(e,"defer",(function(){return G.a})),n.d(e,"empty",(function(){return K.b})),n.d(e,"forkJoin",(function(){return Q})),n.d(e,"from",(function(){return X.a})),n.d(e,"fromEvent",(function(){return et})),n.d(e,"fromEventPattern",(function(){return nt})),n.d(e,"generate",(function(){return rt})),n.d(e,"iif",(function(){return ot})),n.d(e,"interval",(function(){return at})),n.d(e,"merge",(function(){return ct.a})),n.d(e,"never",(function(){return ht})),n.d(e,"of",(function(){return dt.a})),n.d(e,"onErrorResumeNext",(function(){return ft})),n.d(e,"pairs",(function(){return pt})),n.d(e,"partition",(function(){return vt})),n.d(e,"race",(function(){return wt.a})),n.d(e,"range",(function(){return _t})),n.d(e,"throwError",(function(){return Et.a})),n.d(e,"timer",(function(){return xt.a})),n.d(e,"using",(function(){return kt})),n.d(e,"zip",(function(){return Mt.b})),n.d(e,"scheduled",(function(){return Ct.a})),n.d(e,"EMPTY",(function(){return K.a})),n.d(e,"NEVER",(function(){return lt})),n.d(e,"config",(function(){return Rt.a}));var r=n(3),i=n(68),o=n(66),s=n(22),a=n(5),u=n(69),c=n(47),l=n(30),h=n(40),d=n(6),f=n(61),p=n(0),b=n(31),g=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0);},e}(b.a),m=n(29),y=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(m.a))(g),v=y,w=function(t){function e(e,n){void 0===e&&(e=_),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return p.a(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(m.a),_=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return p.a(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(b.a),S=n(62),E=n(4),x=n(1),k=n(18),M=n(39),C=n(21),R=n(15);function A(t){return !!t&&(t instanceof r.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var I=n(24),O=n(26),T=n(23),j=n(42),N=n(71),P=n(9),L=n(54),D=n(7),B=n(10);function H(t,e,n){if(e){if(!Object(B.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return H(t,n).apply(void 0,r).pipe(Object(P.a)((function(t){return Object(D.a)(t)?e.apply(void 0,t):e(t)})))};n=e;}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o,s=this,a={context:s,subject:o,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var i={args:e,subscriber:r,params:a};return n.schedule(F,0,i)}if(!o){o=new l.a;try{t.apply(s,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete();}]));}catch(t){Object(L.a)(o)?o.error(t):console.warn(t);}}return o.subscribe(r)}))}}function F(t){var e=this,n=t.args,r=t.subscriber,i=t.params,o=i.callbackFunc,s=i.context,a=i.scheduler,u=i.subject;if(!u){u=i.subject=new l.a;try{o.apply(s,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(a.schedule(U,0,{value:r,subject:u}));}]));}catch(t){u.error(t);}}this.add(u.subscribe(r));}function U(t){var e=t.value,n=t.subject;n.next(e),n.complete();}function W(t,e,n){if(e){if(!Object(B.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return W(t,n).apply(void 0,r).pipe(Object(P.a)((function(t){return Object(D.a)(t)?e.apply(void 0,t):e(t)})))};n=e;}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var i=o.context,s=o.subject;if(n)return n.schedule(z,0,{params:o,subscriber:r,context:i});if(!s){s=o.subject=new l.a;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?s.error(n):(s.next(t.length<=1?t[0]:t),s.complete());}]));}catch(t){Object(L.a)(s)?s.error(t):console.warn(t);}}return s.subscribe(r)}))}}function z(t){var e=this,n=t.params,r=t.subscriber,i=t.context,o=n.callbackFunc,s=n.args,a=n.scheduler,u=n.subject;if(!u){u=n.subject=new l.a;try{o.apply(i,s.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(a.schedule(V,0,{err:r,subject:u}));else {var i=t.length<=1?t[0]:t;e.add(a.schedule(q,0,{value:i,subject:u}));}}]));}catch(t){this.add(a.schedule(V,0,{err:t,subject:u}));}}this.add(u.subscribe(r));}function q(t){var e=t.value,n=t.subject;n.next(e),n.complete();}function V(t){var e=t.err;t.subject.error(e);}var Y=n(49),J=n(33),G=n(51),K=n(11),$=n(53),X=n(12);function Q(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(D.a)(n))return Z(n,null);if(Object($.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return Z(r.map((function(t){return n[t]})),r)}}if("function"==typeof t[t.length-1]){var i=t.pop();return Z(t=1===t.length&&Object(D.a)(t[0])?t[0]:t,null).pipe(Object(P.a)((function(t){return i.apply(void 0,t)})))}return Z(t,null)}function Z(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var i=new Array(r),o=0,s=0,a=function(a){var u=Object(X.a)(t[a]),c=!1;n.add(u.subscribe({next:function(t){c||(c=!0,s++),i[a]=t;},error:function(t){return n.error(t)},complete:function(){++o!==r&&c||(s===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=i[n],t}),{}):i),n.complete());}}));},u=0;u<r;u++)a(u);else n.complete();}))}var tt=n(25);function et(t,e,n,i){return Object(tt.a)(n)&&(i=n,n=void 0),i?et(t,e,n).pipe(Object(P.a)((function(t){return Object(D.a)(t)?i.apply(void 0,t):i(t)}))):new r.a((function(r){!function t(e,n,r,i,o){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var a=e;e.addEventListener(n,r,o),s=function(){return a.removeEventListener(n,r,o)};}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var u=e;e.on(n,r),s=function(){return u.off(n,r)};}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,r),s=function(){return c.removeListener(n,r)};}else {if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,h=e.length;l<h;l++)t(e[l],n,r,i,o);}i.add(s);}(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t);}),r,n);}))}function nt(t,e,n){return n?nt(t,e).pipe(Object(P.a)((function(t){return Object(D.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(i);}catch(t){return void n.error(t)}if(Object(tt.a)(e))return function(){return e(i,r)}}))}function rt(t,e,n,i,o){var s,a;if(1==arguments.length){var u=t;a=u.initialState,e=u.condition,n=u.iterate,s=u.resultSelector||R.a,o=u.scheduler;}else void 0===i||Object(B.a)(i)?(a=t,s=R.a,o=i):(a=t,s=i);return new r.a((function(t){var r=a;if(o)return o.schedule(it,0,{subscriber:t,iterate:n,condition:e,resultSelector:s,state:r});for(;;){if(e){var i=void 0;try{i=e(r);}catch(e){return void t.error(e)}if(!i){t.complete();break}}var u=void 0;try{u=s(r);}catch(e){return void t.error(e)}if(t.next(u),t.closed)break;try{r=n(r);}catch(e){return void t.error(e)}}}))}function it(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state);}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state);}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state);}catch(t){return void e.error(t)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ot(t,e,n){return void 0===e&&(e=K.a),void 0===n&&(n=K.a),Object(G.a)((function(){return t()?e:n}))}var st=n(32);function at(t,e){return void 0===t&&(t=0),void 0===e&&(e=d.a),(!Object(st.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=d.a),new r.a((function(n){return n.add(e.schedule(ut,t,{subscriber:n,counter:0,period:t})),n}))}function ut(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r);}var ct=n(73),lt=new r.a(C.a);function ht(){return lt}var dt=n(37);function ft(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return K.a;var n=t[0],i=t.slice(1);return 1===t.length&&Object(D.a)(n)?ft.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(ft.apply(void 0,i).subscribe(t))};return Object(X.a)(n).subscribe({next:function(e){t.next(e);},error:e,complete:e})}))}function pt(t,e){return e?new r.a((function(n){var r=Object.keys(t),i=new E.a;return i.add(e.schedule(bt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:t})),i})):new r.a((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var i=n[r];t.hasOwnProperty(i)&&e.next([i,t[i]]);}e.complete();}))}function bt(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,o=t.obj;if(!r.closed)if(n<e.length){var s=e[n];r.next([s,o[s]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:o}));}else r.complete();}var gt=n(81),mt=n(34),yt=n(17);function vt(t,e,n){return [Object(yt.a)(e,n)(new r.a(Object(mt.a)(t))),Object(yt.a)(Object(gt.a)(e,n))(new r.a(Object(mt.a)(t)))]}var wt=n(74);function _t(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var i=0,o=t;if(n)return n.schedule(St,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function St(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)));}var Et=n(48),xt=n(75);function kt(t,e){return new r.a((function(n){var r,i;try{r=t();}catch(t){return void n.error(t)}try{i=e(r);}catch(t){return void n.error(t)}var o=(i?Object(X.a)(i):K.a).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe();}}))}var Mt=n(52),Ct=n(76),Rt=n(14);},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(0),i=n(1);function o(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t;}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new a(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else {var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe();}}else this.connection=null;},e}(i.a);},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(0),i=n(5),o=n(61),s=n(4),a=n(70),u=n(23),c=n(77),l=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift();}t.prototype.next.call(this,e);},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new h(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e);},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new u.a;if(this.isStopped||this.hasError?e=s.a.EMPTY:(this.observers.push(t),e=new c.a(this,t)),i&&t.add(t=new a.a(t,i)),n)for(var l=0;l<o&&!t.closed;l++)t.next(r[l]);else for(l=0;l<o&&!t.closed;l++)t.next(r[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return (this.scheduler||o.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.a),h=function(){return function(t,e){this.time=t,this.value=e;}}();},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(3);function i(t,e){return e?new r.a((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e);}},function(t,e,n){n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(0),i=n(10),o=n(7),s=n(16),a=n(13),u=n(28),c={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return Object(i.a)(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(o.a)(t[0])&&(t=t[0]),Object(u.a)(t,r).lift(new h(n))}var h=function(){function t(t){this.resultSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.a(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t);},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else {this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(a.a)(this,r,void 0,n));}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete();},e.prototype.notifyNext=function(t,e,n){var r=this.values,i=r[n],o=this.toRespond?i===c?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()));},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t);}catch(t){return void this.destination.error(t)}this.destination.next(e);},e}(s.a);},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(27),i=n(15);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.b)(i.a,t)}},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(3),i=n(12),o=n(11);function s(t){return new r.a((function(e){var n;try{n=t();}catch(t){return void e.error(t)}return (n?Object(i.a)(n):Object(o.b)()).subscribe(e)}))}},function(t,e,n){n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(0),i=n(28),o=n(7),s=n(1),a=n(20),u=n(2);function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return "function"==typeof n&&t.pop(),Object(i.a)(t,void 0).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:void 0,i}return r.a(e,t),e.prototype._next=function(t){var e=this.iterators;Object(o.a)(t)?e.push(new f(t)):"function"==typeof t[a.a]?e.push(new d(t[a.a]())):e.push(new p(this.destination,this,t));},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe());else this.active--;}}else this.destination.complete();},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete();},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return}var i=!1,o=[];for(r=0;r<e;r++){var s,a=(s=t[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value);}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete();},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t);}catch(t){return void this.destination.error(t)}this.destination.next(e);},e}(s.a),d=function(){function t(t){this.iterator=t,this.nextResult=t.next();}return t.prototype.hasValue=function(){return !0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length;}return t.prototype[a.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),p=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.a(e,t),e.prototype[a.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete();},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators();},e.prototype.subscribe=function(){return Object(u.c)(this.observable,new u.a(this))},e}(u.b);},function(t,e,n){function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return r}));},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(1);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return !1;t=i&&i instanceof r.a?i:null;}return !0}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(3),i=n(4);function o(t,e){return new r.a((function(n){var r=new i.a,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete();}))),r}))}},function(t,e,n){n.d(e,"a",(function(){return o}));var r=n(14),i=n(35),o={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t);},complete:function(){}};},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")();}catch(t){"object"==typeof window&&(n=window);}t.exports=n;},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}));}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t;}};},function(t,e){function n(t){return t.sort((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e))}function r(t){return null==t?t:Number.parseInt(t,16)}function i(t){if(null==t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function o(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(...t){return n(t)[0]},maxBlockRef:function(...t){const e=n(t);return e[e.length-1]},sortBlockRefs:n,bnToHex:function(t){return "0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){if(null==t)return t;return i(r(t)+1)},intToHex:i,unsafeRandomBytes:function(t){let e="0x";for(let n=0;n<t;n++)e+=o(),e+=o();return e}};},function(t,e,n){n.r(e),n.d(e,"audit",(function(){return o})),n.d(e,"auditTime",(function(){return l})),n.d(e,"buffer",(function(){return h})),n.d(e,"bufferCount",(function(){return b})),n.d(e,"bufferTime",(function(){return w})),n.d(e,"bufferToggle",(function(){return I})),n.d(e,"bufferWhen",(function(){return j})),n.d(e,"catchError",(function(){return L})),n.d(e,"combineAll",(function(){return F})),n.d(e,"combineLatest",(function(){return z})),n.d(e,"concat",(function(){return V})),n.d(e,"concatAll",(function(){return Y.a})),n.d(e,"concatMap",(function(){return G})),n.d(e,"concatMapTo",(function(){return K})),n.d(e,"count",(function(){return $})),n.d(e,"debounce",(function(){return Z})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return st})),n.d(e,"delay",(function(){return ht})),n.d(e,"delayWhen",(function(){return gt})),n.d(e,"dematerialize",(function(){return _t})),n.d(e,"distinct",(function(){return xt})),n.d(e,"distinctUntilChanged",(function(){return Ct})),n.d(e,"distinctUntilKeyChanged",(function(){return It})),n.d(e,"elementAt",(function(){return Wt})),n.d(e,"endWith",(function(){return qt})),n.d(e,"every",(function(){return Vt})),n.d(e,"exhaust",(function(){return Gt})),n.d(e,"exhaustMap",(function(){return Qt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return Tt.a})),n.d(e,"finalize",(function(){return ie})),n.d(e,"find",(function(){return ae})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return de})),n.d(e,"groupBy",(function(){return fe.b})),n.d(e,"ignoreElements",(function(){return pe})),n.d(e,"isEmpty",(function(){return me})),n.d(e,"last",(function(){return Ee})),n.d(e,"map",(function(){return Xt.a})),n.d(e,"mapTo",(function(){return xe})),n.d(e,"materialize",(function(){return Ce})),n.d(e,"max",(function(){return Pe})),n.d(e,"merge",(function(){return De})),n.d(e,"mergeAll",(function(){return Be.a})),n.d(e,"mergeMap",(function(){return J.b})),n.d(e,"flatMap",(function(){return J.a})),n.d(e,"mergeMapTo",(function(){return He})),n.d(e,"mergeScan",(function(){return Fe})),n.d(e,"min",(function(){return ze})),n.d(e,"multicast",(function(){return Ve})),n.d(e,"observeOn",(function(){return Je.b})),n.d(e,"onErrorResumeNext",(function(){return Ge})),n.d(e,"pairwise",(function(){return Xe})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return sn})),n.d(e,"publishBehavior",(function(){return un})),n.d(e,"publishLast",(function(){return ln})),n.d(e,"publishReplay",(function(){return dn})),n.d(e,"race",(function(){return pn})),n.d(e,"reduce",(function(){return Ne})),n.d(e,"repeat",(function(){return bn})),n.d(e,"repeatWhen",(function(){return yn})),n.d(e,"retry",(function(){return _n})),n.d(e,"retryWhen",(function(){return xn})),n.d(e,"refCount",(function(){return Cn.a})),n.d(e,"sample",(function(){return Rn})),n.d(e,"sampleTime",(function(){return On})),n.d(e,"scan",(function(){return Ie})),n.d(e,"sequenceEqual",(function(){return Pn})),n.d(e,"share",(function(){return Fn})),n.d(e,"shareReplay",(function(){return Un})),n.d(e,"single",(function(){return Wn})),n.d(e,"skip",(function(){return Vn})),n.d(e,"skipLast",(function(){return Gn})),n.d(e,"skipUntil",(function(){return Xn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return ar})),n.d(e,"switchAll",(function(){return dr})),n.d(e,"switchMap",(function(){return cr})),n.d(e,"switchMapTo",(function(){return fr})),n.d(e,"take",(function(){return Ht})),n.d(e,"takeLast",(function(){return we})),n.d(e,"takeUntil",(function(){return pr})),n.d(e,"takeWhile",(function(){return mr})),n.d(e,"tap",(function(){return Sr})),n.d(e,"throttle",(function(){return Mr})),n.d(e,"throttleTime",(function(){return Ar})),n.d(e,"throwIfEmpty",(function(){return Nt})),n.d(e,"timeInterval",(function(){return Nr})),n.d(e,"timeout",(function(){return Ur})),n.d(e,"timeoutWith",(function(){return Dr})),n.d(e,"timestamp",(function(){return Wr})),n.d(e,"toArray",(function(){return Vr})),n.d(e,"window",(function(){return Yr})),n.d(e,"windowCount",(function(){return Kr})),n.d(e,"windowTime",(function(){return Qr})),n.d(e,"windowToggle",(function(){return oi})),n.d(e,"windowWhen",(function(){return ui})),n.d(e,"withLatestFrom",(function(){return hi})),n.d(e,"zip",(function(){return bi})),n.d(e,"zipAll",(function(){return gi}));var r=n(0),i=n(2);function o(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.durationSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t);}catch(t){return this.destination.error(t)}var n=Object(i.c)(e,new i.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n);}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t));},e.prototype.notifyNext=function(){this.clearThrottle();},e.prototype.notifyComplete=function(){this.clearThrottle();},e}(i.b),u=n(6),c=n(75);function l(t,e){return void 0===e&&(e=u.a),o((function(){return Object(c.a)(t,e)}))}function h(t){return function(e){return e.lift(new d(t))}}var d=function(){function t(t){this.closingNotifier=t;}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingNotifier))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(i.c)(n,new i.a(r))),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t);},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t);},e}(i.b),p=n(1);function b(t,e){return void 0===e&&(e=null),function(n){return n.lift(new g(t,e))}}var g=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?y:m;}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),m=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.a(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[]);},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this);},e}(p.a),y=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.a(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var s=r[o];s.push(t),s.length===e&&(r.splice(o,1),this.destination.next(s));}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r);}t.prototype._complete.call(this);},e}(p.a),v=n(10);function w(t){var e=arguments.length,n=u.a;Object(v.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new _(t,r,i,n))}}var _=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r;}return t.prototype.call=function(t,e){return e.subscribe(new E(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),S=function(){return function(){this.buffer=[];}}(),E=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var u={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=o.schedule(x,n,u));}else {var c={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(M,n,c)),s.add(o.schedule(k,r,l));}return s}return r.a(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o);}e&&this.onBufferFull(e);},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e);},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer);}t.prototype._complete.call(this);},e.prototype._unsubscribe=function(){this.contexts=null;},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(x,n,r));}},e.prototype.openContext=function(){var t=new S;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1);},e}(p.a);function x(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan));}function k(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(M,n,{subscriber:r,context:o})),this.schedule(t,e));}function M(t){var e=t.subscriber,n=t.context;e.closeContext(n);}var C=n(4),R=n(13),A=n(16);function I(t,e){return function(n){return n.lift(new O(t,e))}}var O=function(){function t(t,e){this.openings=t,this.closingSelector=e;}return t.prototype.call=function(t,e){return e.subscribe(new T(t,this.openings,this.closingSelector))},t}(),T=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add(Object(R.a)(i,n)),i}return r.a(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t);},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null;}this.contexts=null,t.prototype._error.call(this,e);},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null;}this.contexts=null,t.prototype._complete.call(this);},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e);},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context);},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e);}catch(t){this._error(t);}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe();}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new C.a,r={buffer:[],subscription:n};e.push(r);var i=Object(R.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i));},e}(A.a);function j(t){return function(e){return e.lift(new N(t))}}var N=function(){function t(t){this.closingSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new P(t,this.closingSelector))},t}(),P=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.a(e,t),e.prototype._next=function(t){this.buffer.push(t);},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this);},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1;},e.prototype.notifyNext=function(){this.openBuffer();},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer();},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)();}catch(t){return this.error(t)}t=new C.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.c)(e,new i.a(this))),this.subscribing=!1;},e}(i.b);function L(t){return function(e){var n=new D(t),r=e.lift(n);return n.caught=r}}var D=function(){function t(t){this.selector=t;}return t.prototype.call=function(t,e){return e.subscribe(new B(t,this.selector,this.caught))},t}(),B=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught);}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var o=Object(i.c)(n,r);o!==r&&this.add(o);}},e}(i.b),H=n(49);function F(t){return function(e){return e.lift(new H.a(t))}}var U=n(7),W=n(12);function z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return "function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(U.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(W.a)([e].concat(t)),new H.a(n))}}var q=n(33);function V(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(q.a.apply(void 0,[e].concat(t)))}}var Y=n(72),J=n(27);function G(t,e){return Object(J.b)(t,e,1)}function K(t,e){return G((function(){return t}),e)}function $(t){return function(e){return e.lift(new X(t,e))}}var X=function(){function t(t,e){this.predicate=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new Q(t,this.predicate,this.source))},t}(),Q=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++;},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source);}catch(t){return void this.destination.error(t)}e&&this.count++;},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete();},e}(p.a);function Z(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e);}catch(t){this.destination.error(t);}},e.prototype._complete=function(){this.emitValue(),this.destination.complete();},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.c)(e,new i.a(this)))&&!n.closed&&this.add(this.durationSubscription=n);},e.prototype.notifyNext=function(){this.emitValue();},e.prototype.notifyComplete=function(){this.emitValue();},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e);}},e}(i.b);function nt(t,e){return void 0===e&&(e=u.a),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e;}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.dueTime,this.scheduler))},t}(),it=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.a(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ot,this.dueTime,this));},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete();},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t);}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null);},e}(p.a);function ot(t){t.debouncedNext();}function st(t){return void 0===t&&(t=null),function(e){return e.lift(new at(t))}}var at=function(){function t(t){this.defaultValue=t;}return t.prototype.call=function(t,e){return e.subscribe(new ut(t,this.defaultValue))},t}(),ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.a(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t);},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete();},e}(p.a);function ct(t){return t instanceof Date&&!isNaN(+t)}var lt=n(18);function ht(t,e){void 0===e&&(e=u.a);var n=ct(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new dt(n,e))}}var dt=function(){function t(t,e){this.delay=t,this.scheduler=e;}return t.prototype.call=function(t,e){return e.subscribe(new ft(t,this.delay,this.scheduler))},t}(),ft=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.a(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o);}else this.unsubscribe(),e.active=!1;},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}));},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new pt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e);}},e.prototype._next=function(t){this.scheduleNotification(lt.a.createNext(t));},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe();},e.prototype._complete=function(){this.scheduleNotification(lt.a.createComplete()),this.unsubscribe();},e}(p.a),pt=function(){return function(t,e){this.time=t,this.notification=e;}}(),bt=n(3);function gt(t,e){return e?function(n){return new vt(n,e).lift(new mt(t))}:function(e){return e.lift(new mt(t))}}var mt=function(){function t(t){this.delayDurationSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new yt(t,this.delayDurationSelector))},t}(),yt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete();},e.prototype.notifyError=function(t,e){this._error(t);},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete();},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t);}catch(t){this.destination.error(t);}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe();},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return -1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=Object(R.a)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n));},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete();},e}(A.a),vt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.a(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new wt(t,this.source));},e}(bt.a),wt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.a(e,t),e.prototype._next=function(t){this.subscribeToSource();},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t);},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource();},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent));},e}(p.a);function _t(){return function(t){return t.lift(new St)}}var St=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Et(t))},t}(),Et=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){t.observe(this.destination);},e}(p.a);function xt(t,e){return function(n){return n.lift(new kt(t,e))}}var kt=function(){function t(t,e){this.keySelector=t,this.flushes=e;}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t,this.keySelector,this.flushes))},t}(),Mt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add(Object(i.c)(r,new i.a(o))),o}return r.a(e,t),e.prototype.notifyNext=function(){this.values.clear();},e.prototype.notifyError=function(t){this._error(t);},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t);},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t);}catch(t){return void n.error(t)}this._finalizeNext(e,t);},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e));},e}(i.b);function Ct(t,e){return function(n){return n.lift(new Rt(t,e))}}var Rt=function(){function t(t,e){this.compare=t,this.keySelector=e;}return t.prototype.call=function(t,e){return e.subscribe(new At(t,this.compare,this.keySelector))},t}(),At=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.a(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t;}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e);}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t));},e}(p.a);function It(t,e){return Ct((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var Ot=n(24),Tt=n(17),jt=n(26);function Nt(t){return void 0===t&&(t=Dt),function(e){return e.lift(new Pt(t))}}var Pt=function(){function t(t){this.errorFactory=t;}return t.prototype.call=function(t,e){return e.subscribe(new Lt(t,this.errorFactory))},t}(),Lt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.a(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t);},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory();}catch(e){t=e;}this.destination.error(t);},e}(p.a);function Dt(){return new jt.a}var Bt=n(11);function Ht(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new Ft(t))}}var Ft=function(){function t(t){if(this.total=t,this.total<0)throw new Ot.a}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.total))},t}(),Ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()));},e}(p.a);function Wt(t,e){if(t<0)throw new Ot.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(Tt.a)((function(e,n){return n===t})),Ht(1),n?st(e):Nt((function(){return new Ot.a})))}}var zt=n(37);function qt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(q.a)(e,zt.a.apply(void 0,t))}}function Vt(t,e){return function(n){return n.lift(new Yt(t,e,n))}}var Yt=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n;}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t,this.predicate,this.thisArg,this.source))},t}(),Jt=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.a(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete();},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source);}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1);},e.prototype._complete=function(){this.notifyComplete(!0);},e}(p.a);function Gt(){return function(t){return t.lift(new Kt)}}var Kt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new $t(t))},t}(),$t=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.c)(t,new i.a(this))));},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete();},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete();},e}(i.b),Xt=n(9);function Qt(t,e){return e?function(n){return n.pipe(Qt((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Xt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Zt(t))}}var Zt=function(){function t(t){this.project=t;}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t);},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n);}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e);},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r);},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe();},e.prototype.notifyNext=function(t){this.destination.next(t);},e.prototype.notifyError=function(t){this.destination.error(t);},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete();},e}(i.b);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n;}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return r.a(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,i=t.index;e.subscribeToProjection(n,r,i);},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else {var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var i=(0,this.project)(t,r);if(this.scheduler){var o={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,o));}else this.subscribeToProjection(i,t,r);}catch(t){n.error(t);}}else this.buffer.push(t);}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(i.c)(t,new i.a(this)));},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe();},e.prototype.notifyNext=function(t){this._next(t);},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete();},e}(i.b);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t;}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.callback))},t}(),se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new C.a(n)),r}return r.a(e,t),e}(p.a);function ae(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ue(t,n,!1,e))}}var ue=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r;}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe();},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t);}catch(t){this.destination.error(t);}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0);},e}(p.a);function le(t,e){return function(n){return n.lift(new ue(t,n,!0,e))}}var he=n(15);function de(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(Tt.a)((function(e,n){return t(e,n,r)})):he.a,Ht(1),n?st(e):Nt((function(){return new jt.a})))}}var fe=n(66);function pe(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ge(t))},t}(),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype._next=function(t){},e}(p.a);function me(){return function(t){return t.lift(new ye)}}var ye=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete();},e.prototype._next=function(t){this.notifyComplete(!1);},e.prototype._complete=function(){this.notifyComplete(!0);},e}(p.a);function we(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new _e(t))}}var _e=function(){function t(t){if(this.total=t,this.total<0)throw new Ot.a}return t.prototype.call=function(t,e){return e.subscribe(new Se(t,this.total))},t}(),Se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t;},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o]);}t.complete();},e}(p.a);function Ee(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(Tt.a)((function(e,n){return t(e,n,r)})):he.a,we(1),n?st(e):Nt((function(){return new jt.a})))}}function xe(t){return function(e){return e.lift(new ke(t))}}var ke=function(){function t(t){this.value=t;}return t.prototype.call=function(t,e){return e.subscribe(new Me(t,this.value))},t}(),Me=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.a(e,t),e.prototype._next=function(t){this.destination.next(this.value);},e}(p.a);function Ce(){return function(t){return t.lift(new Re)}}var Re=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ae(t))},t}(),Ae=function(t){function e(e){return t.call(this,e)||this}return r.a(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t));},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete();},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete();},e}(p.a);function Ie(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Oe(t,e,n))}}var Oe=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n;}return t.prototype.call=function(t,e){return e.subscribe(new Te(t,this.accumulator,this.seed,this.hasSeed))},t}(),Te=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.a(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t;},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t);},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n);}catch(t){this.destination.error(t);}this.seed=e,this.destination.next(e);},e}(p.a),je=n(39);function Ne(t,e){return arguments.length>=2?function(n){return Object(je.a)(Ie(t,e),we(1),st(e))(n)}:function(e){return Object(je.a)(Ie((function(e,n,r){return t(e,n,r+1)})),we(1))(e)}}function Pe(t){return Ne("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Le=n(73);function De(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Le.a.apply(void 0,[e].concat(t)))}}var Be=n(50);function He(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Object(J.b)((function(){return t}),e,n):("number"==typeof e&&(n=e),Object(J.b)((function(){return t}),n))}function Fe(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Ue(t,e,n))}}var Ue=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n;}return t.prototype.call=function(t,e){return e.subscribe(new We(t,this.accumulator,this.seed,this.concurrent))},t}(),We=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.a(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e);}catch(t){return n.error(t)}this.active++,this._innerSub(r);}else this.buffer.push(t);},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r);},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe();},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t);},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete());},e}(i.b);function ze(t){return Ne("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var qe=n(68);function Ve(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Ye(r,e));var i=Object.create(n,qe.b);return i.source=n,i.subjectFactory=r,i}}var Ye=function(){function t(t,e){this.subjectFactory=t,this.selector=e;}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),Je=n(70);function Ge(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),function(e){return e.lift(new Ke(t))}}var Ke=function(){function t(t){this.nextSources=t;}return t.prototype.call=function(t,e){return e.subscribe(new $e(t,this.nextSources))},t}(),$e=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.a(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource();},e.prototype.notifyComplete=function(){this.subscribeToNextSource();},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe();},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe();},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r);}else this.destination.complete();},e}(i.b);function Xe(){return function(t){return t.lift(new Qe)}}var Qe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.a(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e);},e}(p.a),tn=n(81);function en(t,e){return function(n){return [Object(Tt.a)(t,e)(n),Object(Tt.a)(Object(tn.a)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Xt.a)(rn(t,n))(e)}}function rn(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=null!=r?r[t[i]]:void 0;if(void 0===o)return;r=o;}return r}}var on=n(5);function sn(t){return t?Ve((function(){return new on.a}),t):Ve(new on.a)}var an=n(69);function un(t){return function(e){return Ve(new an.a(t))(e)}}var cn=n(30);function ln(){return function(t){return Ve(new cn.a)(t)}}var hn=n(47);function dn(t,e,n,r){n&&"function"!=typeof n&&(r=n);var i="function"==typeof n?n:void 0,o=new hn.a(t,e,r);return function(t){return Ve((function(){return o}),i)(t)}}var fn=n(74);function pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),e.lift.call(fn.a.apply(void 0,[e].concat(t)))}}function bn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(Bt.b)():t<0?e.lift(new gn(-1,e)):e.lift(new gn(t-1,e))}}var gn=function(){function t(t,e){this.count=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.count,this.source))},t}(),mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.a(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle());}},e}(p.a);function yn(t){return function(e){return e.lift(new vn(t))}}var vn=function(){function t(t){this.notifier=t;}return t.prototype.call=function(t,e){return e.subscribe(new wn(t,this.notifier,e))},t}(),wn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.a(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this);},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0);}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0;},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new on.a;try{e=(0,this.notifier)(this.notifications);}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.c)(e,new i.a(this));},e}(i.b);function _n(t){return void 0===t&&(t=-1),function(e){return e.lift(new Sn(t,e))}}var Sn=function(){function t(t,e){this.count=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.count,this.source))},t}(),En=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle());}},e}(p.a);function xn(t){return function(e){return e.lift(new kn(t,e))}}var kn=function(){function t(t,e){this.notifier=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new Mn(t,this.notifier,this.source))},t}(),Mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else {n=new on.a;try{r=(0,this.notifier)(n);}catch(e){return t.prototype.error.call(this,e)}o=Object(i.c)(r,new i.a(this));}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e);}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0;},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this);},e}(i.b),Cn=n(46);function Rn(t){return function(e){return e.lift(new An(t))}}var An=function(){function t(t){this.notifier=t;}return t.prototype.call=function(t,e){var n=new In(t),r=e.subscribe(n);return r.add(Object(i.c)(this.notifier,new i.a(n))),r},t}(),In=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.a(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0;},e.prototype.notifyNext=function(){this.emitValue();},e.prototype.notifyComplete=function(){this.emitValue();},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value));},e}(i.b);function On(t,e){return void 0===e&&(e=u.a),function(n){return n.lift(new Tn(t,e))}}var Tn=function(){function t(t,e){this.period=t,this.scheduler=e;}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.period,this.scheduler))},t}(),jn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Nn,n,{subscriber:i,period:n})),i}return r.a(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0;},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue));},e}(p.a);function Nn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n);}function Pn(t,e){return function(n){return n.lift(new Ln(t,e))}}var Ln=function(){function t(t,e){this.compareTo=t,this.comparator=e;}return t.prototype.call=function(t,e){return e.subscribe(new Dn(t,this.compareTo,this.comparator))},t}(),Dn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Bn(e,i))),i}return r.a(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues());},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe();},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;try{o=n?n(r,i):r===i;}catch(t){this.destination.error(t);}o||this.emit(!1);}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete();},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues());},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0;},e}(p.a),Bn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.a(e,t),e.prototype._next=function(t){this.parent.nextB(t);},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe();},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe();},e}(p.a);function Hn(){return new on.a}function Fn(){return function(t){return Object(Cn.a)()(Ve(Hn)(t))}}function Un(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,a=t.refCount,u=t.scheduler,c=0,l=!1,h=!1;return function(t){var r;c++,!e||l?(l=!1,e=new hn.a(i,s,u),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t);},error:function(t){l=!0,e.error(t);},complete:function(){h=!0,n=void 0,e.complete();}}),h&&(n=void 0)):r=e.subscribe(this),this.add((function(){c--,r.unsubscribe(),r=void 0,n&&!h&&a&&0===c&&(n.unsubscribe(),n=void 0,e=void 0);}));}}(r))}}function Wn(t){return function(e){return e.lift(new zn(t,e))}}var zn=function(){function t(t,e){this.predicate=t,this.source=e;}return t.prototype.call=function(t,e){return e.subscribe(new qn(t,this.predicate,this.source))},t}(),qn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.a(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t);},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t);},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t);}catch(t){this.destination.error(t);}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new jt.a);},e}(p.a);function Vn(t){return function(e){return e.lift(new Yn(t))}}var Yn=function(){function t(t){this.total=t;}return t.prototype.call=function(t,e){return e.subscribe(new Jn(t,this.total))},t}(),Jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t);},e}(p.a);function Gn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Ot.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.a(t)):e.subscribe(new $n(t,this._skipCount))},t}(),$n=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.a(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else {var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o);}},e}(p.a);function Xn(t){return function(e){return e.lift(new Qn(t))}}var Qn=function(){function t(t){this.notifier=t;}return t.prototype.call=function(t,e){return e.subscribe(new Zn(t,this.notifier))},t}(),Zn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new i.a(r);r.add(o),r.innerSubscription=o;var s=Object(i.c)(n,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return r.a(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e);},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe();},e.prototype.notifyComplete=function(){},e}(i.b);function tr(t){return function(e){return e.lift(new er(t))}}var er=function(){function t(t){this.predicate=t;}return t.prototype.call=function(t,e){return e.subscribe(new nr(t,this.predicate))},t}(),nr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t);},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e);}catch(t){this.destination.error(t);}},e}(p.a);function rr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(v.a)(n)?(t.pop(),function(e){return Object(q.a)(t,e,n)}):function(e){return Object(q.a)(t,e)}}var ir=n(40),or=n(32),sr=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=ir.a);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!Object(or.a)(n)||n<0)&&(i.delayTime=0),r&&"function"==typeof r.schedule||(i.scheduler=ir.a),i}return r.a(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=ir.a),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(bt.a);function ar(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ur(t,e))}}var ur=function(){function t(t,e){this.scheduler=t,this.delay=e;}return t.prototype.call=function(t,e){return new sr(e,this.delay,this.scheduler).subscribe(t)},t}();function cr(t,e){return "function"==typeof e?function(n){return n.pipe(cr((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Xt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new lr(t))}}var lr=function(){function t(t){this.project=t;}return t.prototype.call=function(t,e){return e.subscribe(new hr(t,this.project))},t}(),hr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n);}catch(t){return void this.destination.error(t)}this._innerSub(e);},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription);},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe();},e.prototype._unsubscribe=function(){this.innerSubscription=void 0;},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this);},e.prototype.notifyNext=function(t){this.destination.next(t);},e}(i.b);function dr(){return cr(he.a)}function fr(t,e){return e?cr((function(){return t}),e):cr((function(){return t}))}function pr(t){return function(e){return e.lift(new br(t))}}var br=function(){function t(t){this.notifier=t;}return t.prototype.call=function(t,e){var n=new gr(t),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),gr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.a(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete();},e.prototype.notifyComplete=function(){},e}(i.b);function mr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new yr(t,e))}}var yr=function(){function t(t,e){this.predicate=t,this.inclusive=e;}return t.prototype.call=function(t,e){return e.subscribe(new vr(t,this.predicate,this.inclusive))},t}(),vr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++);}catch(t){return void n.error(t)}this.nextOrComplete(t,e);},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete());},e}(p.a),wr=n(21),_r=n(25);function Sr(t,e,n){return function(r){return r.lift(new Er(t,e,n))}}var Er=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n;}return t.prototype.call=function(t,e){return e.subscribe(new xr(t,this.nextOrObserver,this.error,this.complete))},t}(),xr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=wr.a,o._tapError=wr.a,o._tapComplete=wr.a,o._tapError=r||wr.a,o._tapComplete=i||wr.a,Object(_r.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||wr.a,o._tapError=n.error||wr.a,o._tapComplete=n.complete||wr.a),o}return r.a(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t);}catch(t){return void this.destination.error(t)}this.destination.next(t);},e.prototype._error=function(t){try{this._tapError.call(this._context,t);}catch(t){return void this.destination.error(t)}this.destination.error(t);},e.prototype._complete=function(){try{this._tapComplete.call(this._context);}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(p.a),kr={leading:!0,trailing:!1};function Mr(t,e){return void 0===e&&(e=kr),function(n){return n.lift(new Cr(t,!!e.leading,!!e.trailing))}}var Cr=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n;}return t.prototype.call=function(t,e){return e.subscribe(new Rr(t,this.durationSelector,this.leading,this.trailing))},t}(),Rr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}return r.a(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t));},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0;},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(i.c)(e,new i.a(this)));},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send();},e.prototype.notifyNext=function(){this.throttlingDone();},e.prototype.notifyComplete=function(){this.throttlingDone();},e}(i.b);function Ar(t,e,n){return void 0===e&&(e=u.a),void 0===n&&(n=kr),function(r){return r.lift(new Ir(t,e,n.leading,n.trailing))}}var Ir=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r;}return t.prototype.call=function(t,e){return e.subscribe(new Or(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Or=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=i,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.a(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Tr,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0));},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete();},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null);},e}(p.a);function Tr(t){t.subscriber.clearThrottle();}var jr=n(51);function Nr(t){return void 0===t&&(t=u.a),function(e){return Object(jr.a)((function(){return e.pipe(Ie((function(e,n){var r=e.current;return {value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Object(Xt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Pr(r,e-n)})))}))}}var Pr=function(){return function(t,e){this.value=t,this.interval=e;}}(),Lr=n(71);function Dr(t,e,n){return void 0===n&&(n=u.a),function(r){var i=ct(t),o=i?+t-n.now():Math.abs(t);return r.lift(new Br(o,i,e,n))}}var Br=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r;}return t.prototype.call=function(t,e){return e.subscribe(new Hr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Hr=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=i,s.scheduler=o,s.scheduleTimeout(),s}return r.a(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(i.c)(e,new i.a(t)));},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this));},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e);},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null;},e}(i.b),Fr=n(48);function Ur(t,e){return void 0===e&&(e=u.a),Dr(t,Object(Fr.a)(new Lr.a),e)}function Wr(t){return void 0===t&&(t=u.a),Object(Xt.a)((function(e){return new zr(e,t.now())}))}var zr=function(){return function(t,e){this.value=t,this.timestamp=e;}}();function qr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Vr(){return Ne(qr,[])}function Yr(t){return function(e){return e.lift(new Jr(t))}}var Jr=function(){function t(t){this.windowBoundaries=t;}return t.prototype.call=function(t,e){var n=new Gr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.c)(this.windowBoundaries,new i.a(n))),r},t}(),Gr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new on.a,e.next(n.window),n}return r.a(e,t),e.prototype.notifyNext=function(){this.openWindow();},e.prototype.notifyError=function(t){this._error(t);},e.prototype.notifyComplete=function(){this._complete();},e.prototype._next=function(t){this.window.next(t);},e.prototype._error=function(t){this.window.error(t),this.destination.error(t);},e.prototype._complete=function(){this.window.complete(),this.destination.complete();},e.prototype._unsubscribe=function(){this.window=null;},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new on.a;e.next(n);},e}(i.b);function Kr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new $r(t,e))}}var $r=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e;}return t.prototype.call=function(t,e){return e.subscribe(new Xr(t,this.windowSize,this.startWindowEvery))},t}(),Xr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new on.a],i.count=0,e.next(i.windows[0]),i}return r.a(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(t);var a=this.count-r+1;if(a>=0&&a%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var u=new on.a;i.push(u),n.next(u);}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t);},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete();},e.prototype._unsubscribe=function(){this.count=0,this.windows=null;},e}(p.a);function Qr(t){var e=u.a,n=null,r=Number.POSITIVE_INFINITY;return Object(v.a)(arguments[3])&&(e=arguments[3]),Object(v.a)(arguments[2])?e=arguments[2]:Object(or.a)(arguments[2])&&(r=Number(arguments[2])),Object(v.a)(arguments[1])?e=arguments[1]:Object(or.a)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Zr(t,n,r,e))}}var Zr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r;}return t.prototype.call=function(t,e){return e.subscribe(new ei(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),ti=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.a(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e);},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(on.a),ei=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var u={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(ii,n,u)),s.add(o.schedule(ri,r,c));}else {var l={subscriber:s,window:a,windowTimeSpan:n};s.add(o.schedule(ni,n,l));}return s}return r.a(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i));}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t);},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete();}this.destination.complete();},e.prototype.openWindow=function(){var t=new ti;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1);},e}(p.a);function ni(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n);}function ri(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null},a={subscriber:n,window:o,context:s};s.subscription=r.schedule(ii,e,a),this.add(s.subscription),this.schedule(t,i);}function ii(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n);}function oi(t,e){return function(n){return n.lift(new si(t,e))}}var si=function(){function t(t,e){this.openings=t,this.closingSelector=e;}return t.prototype.call=function(t,e){return e.subscribe(new ai(t,this.openings,this.closingSelector))},t}(),ai=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=Object(R.a)(i,n,n)),i}return r.a(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t);},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(e),o.subscription.unsubscribe();}t.prototype._error.call(this,e);},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe();}t.prototype._complete.call(this);},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe();}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=void 0;try{o=(0,this.closingSelector)(e);}catch(t){return this.error(t)}var s=new on.a,a=new C.a,u={window:s,subscription:a};this.contexts.push(u);var c=Object(R.a)(this,o,u);c.closed?this.closeWindow(this.contexts.length-1):(c.context=u,a.add(c)),this.destination.next(s);}else this.closeWindow(this.contexts.indexOf(t));},e.prototype.notifyError=function(t){this.error(t);},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context));},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe();}},e}(A.a);function ui(t){return function(e){return e.lift(new ci(t))}}var ci=function(){function t(t){this.closingSelector=t;}return t.prototype.call=function(t,e){return e.subscribe(new li(t,this.closingSelector))},t}(),li=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i);},e.prototype.notifyError=function(t){this._error(t);},e.prototype.notifyComplete=function(t){this.openWindow(t);},e.prototype._next=function(t){this.window.next(t);},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification();},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification();},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe();},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new on.a;this.destination.next(r);try{n=(0,this.closingSelector)();}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=Object(R.a)(this,n));},e}(A.a);function hi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new di(r,n))}}var di=function(){function t(t,e){this.observables=t,this.project=e;}return t.prototype.call=function(t,e){return e.subscribe(new fi(t,this.observables,this.project))},t}(),fi=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(s=0;s<o;s++){var a=n[s];i.add(Object(R.a)(i,a,void 0,s));}return i}return r.a(e,t),e.prototype.notifyNext=function(t,e,n){this.values[n]=e;var r=this.toRespond;if(r.length>0){var i=r.indexOf(n);-1!==i&&r.splice(i,1);}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e);}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t);}catch(t){return void this.destination.error(t)}this.destination.next(e);},e}(A.a),pi=n(52);function bi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(pi.b.apply(void 0,[e].concat(t)))}}function gi(t){return function(e){return e.lift(new pi.a(t))}}},function(t,e,n){n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s}));var r=n(0),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.a(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(31).a),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e}(n(29).a))(i),s=o;},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n;}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}();},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});const r=n(64);function i(t,e,n){try{Reflect.apply(t,e,n);}catch(t){setTimeout(()=>{throw t});}}class o extends r.EventEmitter{emit(t,...e){let n="error"===t;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return !1;if(n){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const n=new Error("Unhandled error."+(t?` (${t.message})`:""));throw n.context=t,n}const o=r[t];if(void 0===o)return !1;if("function"==typeof o)i(o,this,e);else {const t=o.length,n=function(t){const e=t.length,n=new Array(e);for(let r=0;r<e;r+=1)n[r]=t[r];return n}(o);for(let r=0;r<t;r+=1)i(n[r],this,e);}return !0}}e.default=o;},function(t,e,n){var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this);}t.exports=a,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n);}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments));}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,n);}(t,i,{once:!0});}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function h(t,e,n,r){var i,o,s,a;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=l(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a);}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return [];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):g(i,i.length)}function b(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else {if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o);}));}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t;}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return !1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return !1;if("function"==typeof u)o(u,this,e);else {var c=u.length,l=g(u,c);for(n=0;n<c;++n)o(l[n],this,e);}return !0},a.prototype.addListener=function(t,e){return h(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return h(this,t,e,!0)},a.prototype.once=function(t,e){return c(e),this.on(t,f(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,f(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,i,o,s;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop();}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e);}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return "function"==typeof t.listenerCount?t.listenerCount(e):b.call(t,e)},a.prototype.listenerCount=b,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};},function(t,e,n){(function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t;}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"));}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(127).Buffer;}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function c(t,e,n,i){for(var o=0,s=0,a=Math.min(t.length,n),u=e;u<a;u++){var c=t.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&s<i,"Invalid character"),o+=s;}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red;}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)));},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n);},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip();},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,l=n;l<a;l+=r)u=c(t,l,l+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(t,l,t.length,e),l=0;l<s;l++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);}this._strip();},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red;},o.prototype._move=function(t){l(t,this);},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h;}catch(t){o.prototype.inspect=h;}else o.prototype.inspect=h;function h(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!==(o=a>>>24-i&16777215)||s!==this.length-1?d[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--);}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],l=p[t];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var b=h.modrn(l).toString(t);n=(h=h.idivn(l)).isZero()?b+n:d[c-b.length]+b+n;}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36");},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function b(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var c=1;c<r;c++){for(var l=u>>>26,h=67108863&u,d=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=d;f++){var p=c-f|0;l+=(s=(i=0|t.words[p])*(o=0|e.words[f])+h)/67108864|0,h=67108863&s;}n.words[c]=0|h,u=0|l;}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;t[n++]=255&s,n<t.length&&(t[n++]=s>>8&255),n<t.length&&(t[n++]=s>>16&255),6===o?(n<t.length&&(t[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2);}if(n<t.length)for(t[n++]=r;n<t.length;)t[n++]=0;},o.prototype._toArrayLikeBE=function(t,e){for(var n=t.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;t[n--]=255&s,n>=0&&(t[n--]=s>>8&255),n>=0&&(t[n--]=s>>16&255),6===o?(n>=0&&(t[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2);}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0;},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,c=0,l=0|s[0],h=8191&l,d=l>>>13,f=0|s[1],p=8191&f,b=f>>>13,g=0|s[2],m=8191&g,y=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],E=8191&S,x=S>>>13,k=0|s[5],M=8191&k,C=k>>>13,R=0|s[6],A=8191&R,I=R>>>13,O=0|s[7],T=8191&O,j=O>>>13,N=0|s[8],P=8191&N,L=N>>>13,D=0|s[9],B=8191&D,H=D>>>13,F=0|a[0],U=8191&F,W=F>>>13,z=0|a[1],q=8191&z,V=z>>>13,Y=0|a[2],J=8191&Y,G=Y>>>13,K=0|a[3],$=8191&K,X=K>>>13,Q=0|a[4],Z=8191&Q,tt=Q>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191&lt,dt=lt>>>13,ft=0|a[9],pt=8191&ft,bt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,W))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,W))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,W))+Math.imul(b,U)|0,o=Math.imul(b,W);var mt=(c+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(m,U),i=(i=Math.imul(m,W))+Math.imul(y,U)|0,o=Math.imul(y,W),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,V)|0;var yt=(c+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,W))+Math.imul(_,U)|0,o=Math.imul(_,W),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,G)|0;var vt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,W))+Math.imul(x,U)|0,o=Math.imul(x,W),r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(m,J)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0;var wt=(c+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,W))+Math.imul(C,U)|0,o=Math.imul(C,W),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(x,q)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,X)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,tt)|0;var _t=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(d,nt)|0))<<13)|0;c=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,W))+Math.imul(I,U)|0,o=Math.imul(I,W),r=r+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,r=r+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0;var St=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(T,U),i=(i=Math.imul(T,W))+Math.imul(j,U)|0,o=Math.imul(j,W),r=r+Math.imul(A,q)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,X)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(m,nt)|0,i=(i=i+Math.imul(m,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var Et=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(d,ut)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,W))+Math.imul(L,U)|0,o=Math.imul(L,W),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ct)|0;var xt=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,W))+Math.imul(H,U)|0,o=Math.imul(H,W),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(m,ut)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var kt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,q),i=(i=Math.imul(B,V))+Math.imul(H,q)|0,o=Math.imul(H,V),r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,X)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(C,nt)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(m,ht)|0,i=(i=i+Math.imul(m,dt)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,dt)|0;var Mt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;c=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,G))+Math.imul(H,J)|0,o=Math.imul(H,G),r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,X)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0;var Ct=(c+(r=r+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,bt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,bt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,X))+Math.imul(H,$)|0,o=Math.imul(H,X),r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,r=r+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,dt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,dt)|0;var Rt=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,tt))+Math.imul(H,Z)|0,o=Math.imul(H,tt),r=r+Math.imul(P,nt)|0,i=(i=i+Math.imul(P,rt)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,r=r+Math.imul(A,ut)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(M,ht)|0,i=(i=i+Math.imul(M,dt)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,dt)|0;var At=(c+(r=r+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,bt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,bt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(H,nt)|0,o=Math.imul(H,rt),r=r+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,r=r+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,dt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,dt)|0;var It=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,bt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,st))+Math.imul(H,ot)|0,o=Math.imul(H,st),r=r+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ct)|0,r=r+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,dt)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,dt)|0;var Ot=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,bt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,ct))+Math.imul(H,ut)|0,o=Math.imul(H,ct),r=r+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,dt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,dt)|0;var Tt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,bt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,ht),i=(i=Math.imul(B,dt))+Math.imul(H,ht)|0,o=Math.imul(H,dt);var jt=(c+(r=r+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,bt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,bt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Nt=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,bt))+Math.imul(H,pt)|0))<<13)|0;return c=((o=Math.imul(H,bt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=mt,u[2]=yt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Et,u[8]=xt,u[9]=kt,u[10]=Mt,u[11]=Ct,u[12]=Rt,u[13]=At,u[14]=It,u[15]=Ot,u[16]=Tt,u[17]=jt,u[18]=Nt,0!==c&&(u[19]=c,n.length++),n};function m(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l=o-c,h=(0|t.words[l])*(0|e.words[c]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863;}n.words[o]=a,r=s,s=i;}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(t,e,n){return m(t,e,n)}Math.imul||(g=b),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?b(this,t,e):n<1024?m(this,t,e):y(this,t,e)},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),y(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s;}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=t.words[r]>>>i&1;}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n;}s&&(this.words[e]=s,this.length++);}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i;}return this._strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=n;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s;}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a;}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return !(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i;}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o;}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!==(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0;}var l=r.clone()._ishlnsubmul(i,1,u);0===l.negative&&(r=l,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d);}return a&&a._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a;},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t;}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s));}return {a:a,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.isub(e),a.isub(s));}return (i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o;}else if(0===i||0===n.cmpn(1))break;e.isub(n);}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a;}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return -1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else {n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1;}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return -1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return -1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return -1===this.cmpn(t)},o.prototype.lt=function(t){return -1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function E(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function x(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function k(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e;}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null;}function C(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength();}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e);},_.prototype.imulK=function(t){return t.imul(this.k)},i(S,_),S.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o;}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9;},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0);}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(E,_),i(x,_),i(k,_),k.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r;}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new E;else if("p192"===t)e=new x;else {if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k;}return w[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers");},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers");},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var b=f,g=0;0!==b.cmp(a);g++)b=b.redSqr();r(g<p);var m=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(m),h=m.redSqr(),f=f.redMul(h),p=g;}return d},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],l=u-1;l>=0;l--){var h=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===r&&0===l)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0;}u=26;}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new C(t)},i(C,M),C.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},C.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)};}(t,this);}).call(this,n(126)(t));},function(t,e,n){n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return d}));var r=n(0),i=n(1),o=n(4),s=n(3),a=n(5);function u(t,e,n,r){return function(i){return i.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r;}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t);}catch(t){return void this.error(t)}this._group(t,e);},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t);}catch(t){this.error(t);}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new a.a,n.set(e,i);var o=new d(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new d(e,i));}catch(t){return void this.error(t)}this.add(s.subscribe(new h(e,i,this)));}}i.closed||i.next(r);},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t);})),e.clear()),this.destination.error(t);},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete();})),t.clear()),this.destination.complete();},e.prototype.removeGroup=function(t){this.groups.delete(t);},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this));},e}(i.a),h=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.a(e,t),e.prototype._next=function(t){this.complete();},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e);},e}(i.a),d=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.a(e,t),e.prototype._subscribe=function(t){var e=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new f(n)),e.add(r.subscribe(t)),e},e}(s.a),f=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.a(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe());},e}(o.a);},function(t,e,n){n.r(e),n.d(e,"useState",(function(){return b})),n.d(e,"useReducer",(function(){return g})),n.d(e,"useEffect",(function(){return m})),n.d(e,"useLayoutEffect",(function(){return y})),n.d(e,"useRef",(function(){return v})),n.d(e,"useImperativeHandle",(function(){return w})),n.d(e,"useMemo",(function(){return _})),n.d(e,"useCallback",(function(){return S})),n.d(e,"useContext",(function(){return E})),n.d(e,"useDebugValue",(function(){return x})),n.d(e,"useErrorBoundary",(function(){return k}));var r,i,o,s=n(8),a=0,u=[],c=s.options.__b,l=s.options.__r,h=s.options.diffed,d=s.options.__c,f=s.options.unmount;function p(t,e){s.options.__h&&s.options.__h(i,t,a||e),a=0;var n=i.__H||(i.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function b(t){return a=1,g(O,t)}function g(t,e,n){var o=p(r++,2);return o.t=t,o.__c||(o.__=[n?n(e):O(void 0,e),function(t){var e=o.t(o.__[0],t);o.__[0]!==e&&(o.__=[e,o.__[1]],o.__c.setState({}));}],o.__c=i),o.__}function m(t,e){var n=p(r++,3);!s.options.__s&&I(n.__H,e)&&(n.__=t,n.__H=e,i.__H.__h.push(n));}function y(t,e){var n=p(r++,4);!s.options.__s&&I(n.__H,e)&&(n.__=t,n.__H=e,i.__h.push(n));}function v(t){return a=5,_((function(){return {current:t}}),[])}function w(t,e,n){a=6,y((function(){"function"==typeof t?t(e()):t&&(t.current=e());}),null==n?n:n.concat(t));}function _(t,e){var n=p(r++,7);return I(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function S(t,e){return a=8,_((function(){return t}),e)}function E(t){var e=i.context[t.__c],n=p(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(i)),e.props.value):t.__}function x(t,e){s.options.useDebugValue&&s.options.useDebugValue(e?e(t):t);}function k(t){var e=p(r++,10),n=b();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t){e.__&&e.__(t),n[1](t);}),[n[0],function(){n[1](void 0);}]}function M(){for(var t;t=u.shift();)if(t.__P)try{t.__H.__h.forEach(R),t.__H.__h.forEach(A),t.__H.__h=[];}catch(e){t.__H.__h=[],s.options.__e(e,t.__v);}}s.options.__b=function(t){i=null,c&&c(t);},s.options.__r=function(t){l&&l(t),r=0;var e=(i=t.__c).__H;e&&(e.__h.forEach(R),e.__h.forEach(A),e.__h=[]);},s.options.diffed=function(t){h&&h(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&o===s.options.requestAnimationFrame||((o=s.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),C&&cancelAnimationFrame(e),setTimeout(t);},r=setTimeout(n,100);C&&(e=requestAnimationFrame(n));})(M)),i=null;},s.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(R),t.__h=t.__h.filter((function(t){return !t.__||A(t)}));}catch(n){e.some((function(t){t.__h&&(t.__h=[]);})),e=[],s.options.__e(n,t.__v);}})),d&&d(t,e);},s.options.unmount=function(t){f&&f(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{R(t);}catch(t){e=t;}})),e&&s.options.__e(e,n.__v));};var C="function"==typeof requestAnimationFrame;function R(t){var e=i,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),i=e;}function A(t){var e=i;t.__c=t.__(),i=e;}function I(t,e){return !t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function O(t,e){return "function"==typeof e?e(t):e}},function(t,e,n){n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l}));var r=n(0),i=n(5),o=n(3),s=n(1),a=n(4),u=n(46),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.a(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new a.a).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=a.a.EMPTY)),t},e.prototype.refCount=function(){return Object(u.a)()(this)},e}(o.a),l=function(){var t=c.prototype;return {operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e);},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this);},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe();}},e}(i.b);s.a;},function(t,e,n){n.d(e,"a",(function(){return s}));var r=n(0),i=n(5),o=n(23),s=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.a(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e);},e}(i.a);},function(t,e,n){n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return u}));var r=n(0),i=n(1),o=n(18);function s(t,e){return void 0===e&&(e=0),function(n){return n.lift(new a(t,e))}}var a=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e;}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}(),u=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.a(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe();},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)));},e.prototype._next=function(t){this.scheduleMessage(o.a.createNext(t));},e.prototype._error=function(t){this.scheduleMessage(o.a.createError(t)),this.unsubscribe();},e.prototype._complete=function(){this.scheduleMessage(o.a.createComplete()),this.unsubscribe();},e}(i.a),c=function(){return function(t,e){this.notification=t,this.destination=e;}}();},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}();},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(50);function i(){return Object(r.a)(1)}},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(3),i=n(10),o=n(50),s=n(28);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,a=null,u=t[t.length-1];return Object(i.a)(u)?(a=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===a&&1===t.length&&t[0]instanceof r.a?t[0]:Object(o.a)(n)(Object(s.a)(t,a))}},function(t,e,n){n.d(e,"a",(function(){return u}));var r=n(0),i=n(7),o=n(28),s=n(16),a=n(13);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(i.a)(t[0]))return t[0];t=t[0];}return Object(o.a)(t,void 0).lift(new c)}var c=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.a(e,t),e.prototype._next=function(t){this.observables.push(t);},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else {for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=Object(a.a)(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i);}this.observables=null;}},e.prototype.notifyNext=function(t,e,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var i=this.subscriptions[r];i.unsubscribe(),this.remove(i);}this.subscriptions=null;}this.destination.next(e);},e}(s.a);},function(t,e,n){n.d(e,"a",(function(){return a}));var r=n(3),i=n(6),o=n(32),s=n(10);function a(t,e,n){void 0===t&&(t=0);var a=-1;return Object(o.a)(e)?a=Number(e)<1?1:Number(e):Object(s.a)(e)&&(n=e),Object(s.a)(n)||(n=i.a),new r.a((function(e){var r=Object(o.a)(t)?t:+t-n.now();return n.schedule(u,r,{index:0,period:a,subscriber:e})}))}function u(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n);}}},function(t,e,n){n.d(e,"a",(function(){return l}));var r=n(3),i=n(4),o=n(22);var s=n(55),a=n(20);var u=n(80),c=n(79);function l(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){var i=t[o.a]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})));},error:function(t){r.add(e.schedule((function(){return n.error(t)})));},complete:function(){r.add(e.schedule((function(){return n.complete()})));}}));}))),r}))}(t,e);if(Object(u.a)(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})));})));}),(function(t){r.add(e.schedule((function(){return n.error(t)})));}))}))),r}))}(t,e);if(Object(c.a)(t))return Object(s.a)(t,e);if(function(t){return t&&"function"==typeof t[a.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,o=new i.a;return o.add((function(){r&&"function"==typeof r.return&&r.return();})),o.add(e.schedule((function(){r=t[a.a](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done;}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule());}})));}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},function(t,e,n){n.d(e,"a",(function(){return i}));var r=n(0),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.a(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1);}}},e}(n(4).a);},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete();}};},function(t,e,n){n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};},function(t,e,n){function r(t){return !!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return r}));},function(t,e,n){function r(t,e){function n(){return !n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,"a",(function(){return r}));},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const r=n(97),i=n(83);var o=n(97);Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return o.CoinbaseWalletSDK}});var s=n(83);Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return s.CoinbaseWalletProvider}}),e.default=r.CoinbaseWalletSDK,"undefined"!=typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider);},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;const i=r(n(63)),o=r(n(65)),s=n(84),a=n(87),u=n(88),c=n(100),l=n(38),h=r(n(131)),d=n(148),f=n(149),p=n(150);class b extends i.default{constructor(t){var e;super(),this._filterPolyfill=new d.FilterPolyfill(this),this._subscriptionManager=new p.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this._send=this.send.bind(this),this._sendAsync=this.sendAsync.bind(this),this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._jsonRpcUrlFromOpts=t.jsonRpcUrl,this._overrideIsMetaMask=t.overrideIsMetaMask,this._relayProvider=t.relayProvider,this._storage=t.storage,this._relayEventManager=t.relayEventManager,this._eventListener=t.eventListener,this.isCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this.supportsAddressSwitching=t.supportsAddressSwitching;const n=this.getChainId(),r=(0, l.prepend0x)(n.toString(16));this.emit("connect",{chainIdStr:r});const i=this._storage.getItem(c.LOCAL_STORAGE_ADDRESSES_KEY);if(i){const t=i.split(" ");""!==t[0]&&(this._addresses=t.map(t=>(0, l.ensureAddressString)(t)),this.emit("accountsChanged",t));}this._subscriptionManager.events.on("notification",t=>{this.emit("message",{type:t.method,data:t.params});}),this._addresses.length>0&&this.initializeRelay(),window.addEventListener("message",t=>{var e;if("walletLinkMessage"===t.data.type&&"defaultChainChanged"===t.data.data.action){const n=t.data.data.chainId,r=null!==(e=t.data.data.jsonRpcUrl)&&void 0!==e?e:this.jsonRpcUrl;this.updateProviderInfo(r,Number(n),!0);}});}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return (0, l.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return !0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return !0}isConnected(){return !0}get jsonRpcUrl(){var t;return null!==(t=this._storage.getItem("DefaultJsonRpcUrl"))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem("DefaultJsonRpcUrl",t);}get isChainOverridden(){return "true"===this._storage.getItem("HasChainOverriddenFromRelay")}set isChainOverridden(t){this._storage.setItem("HasChainOverriddenFromRelay",t.toString());}setProviderInfo(t,e){this.isChainOverridden||this.updateProviderInfo(t,this.getChainId(),!1);}updateProviderInfo(t,e,n){if("true"===this._storage.getItem("HasChainBeenSwitched")&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem("DefaultChainId",e.toString(10));!((0, l.ensureIntNumber)(e)!==r)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0);}async watchAsset(t,e,n,r,i,o){const s=await this.initializeRelay();return !!(await s.watchAsset(t,e,n,r,i,null==o?void 0:o.toString()).promise).result}async addEthereumChain(t,e,n,r,i,o){var s,a;if((0, l.ensureIntNumber)(t)===this.getChainId())return !1;const u=await this.initializeRelay(),c=u.inlineAddEthereumChain(t.toString());this._isAuthorized()||c||await u.requestEthereumAccounts().promise;const h=await u.addEthereumChain(t.toString(),e,i,n,r,o).promise;return !0===(null===(s=h.result)||void 0===s?void 0:s.isApproved)&&(this._storage.setItem("HasChainBeenSwitched","true"),this.updateProviderInfo(e[0],t,!1)),!0===(null===(a=h.result)||void 0===a?void 0:a.isApproved)}async switchEthereumChain(t){if((0, l.ensureIntNumber)(t)===this.getChainId())return;const e=await this.initializeRelay(),n=await e.switchEthereumChain(t.toString(10)).promise;if(n.errorCode)throw s.ethErrors.provider.custom({code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&(this._storage.setItem("HasChainBeenSwitched","true"),this.updateProviderInfo(r.rpcUrl,t,!1));}setAppInfo(t,e){this.initializeRelay().then(n=>n.setAppInfo(t,e));}async enable(){var t;return null===(t=this._eventListener)||void 0===t||t.onEvent(a.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0?[...this._addresses]:await this._send(f.JSONRPCMethod.eth_requestAccounts)}close(){this.initializeRelay().then(t=>t.resetAndReload());}send(t,e){if("string"==typeof t){const n={jsonrpc:"2.0",id:0,method:t,params:Array.isArray(e)?e:void 0!==e?[e]:[]};return this._sendRequestAsync(n).then(t=>t.result)}if("function"==typeof e){const n=t,r=e;return this._sendAsync(n,r)}if(Array.isArray(t)){return t.map(t=>this._sendRequest(t))}const n=t;return this._sendRequest(n)}sendAsync(t,e){if("function"!=typeof e)throw new Error("callback is required");if(Array.isArray(t)){const n=e;return void this._sendMultipleRequestsAsync(t).then(t=>n(null,t)).catch(t=>n(t,null))}const n=e;this._sendRequestAsync(t).then(t=>n(null,t)).catch(t=>n(t,null));}async request(t){if(!t||"object"!=typeof t||Array.isArray(t))throw s.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});const{method:e,params:n}=t;if("string"!=typeof e||0===e.length)throw s.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw s.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return (await this._sendRequestAsync({method:e,params:r,jsonrpc:"2.0",id:i})).result}async scanQRCode(t){const e=await this.initializeRelay(),n=await e.scanQRCode((0, l.ensureRegExpString)(t)).promise;if("string"!=typeof n.result)throw new Error("result was not a string");return n.result}async genericRequest(t,e){const n=await this.initializeRelay(),r=await n.genericRequest(t,e).promise;if("string"!=typeof r.result)throw new Error("result was not a string");return r.result}supportsSubscriptions(){return !1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return !0}_sendRequest(t){const e={jsonrpc:"2.0",id:t.id},{method:n}=t;if(e.result=this._handleSynchronousMethods(t),void 0===e.result)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return e}_setAddresses(t){if(!Array.isArray(t))throw new Error("addresses is not an array");const e=t.map(t=>(0, l.ensureAddressString)(t));JSON.stringify(e)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching||(this._addresses=e,this.emit("accountsChanged",this._addresses),this._storage.setItem(c.LOCAL_STORAGE_ADDRESSES_KEY,e.join(" "))));}_sendRequestAsync(t){return new Promise((e,n)=>{try{const r=this._handleSynchronousMethods(t);if(void 0!==r)return e({jsonrpc:"2.0",id:t.id,result:r});const i=this._handleAsynchronousFilterMethods(t);if(void 0!==i)return void i.then(n=>e(Object.assign(Object.assign({},n),{id:t.id}))).catch(t=>n(t));const o=this._handleSubscriptionMethods(t);if(void 0!==o)return void o.then(n=>e({jsonrpc:"2.0",id:t.id,result:n.result})).catch(t=>n(t))}catch(t){return n(t)}this._handleAsynchronousMethods(t).then(n=>n&&e(Object.assign(Object.assign({},n),{id:t.id}))).catch(t=>n(t));})}_sendMultipleRequestsAsync(t){return Promise.all(t.map(t=>this._sendRequestAsync(t)))}_handleSynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_accounts:return this._eth_accounts();case f.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case f.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case f.JSONRPCMethod.net_version:return this._net_version();case f.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case f.JSONRPCMethod.eth_sign:return this._eth_sign(n);case f.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case f.JSONRPCMethod.personal_sign:return this._personal_sign(n);case f.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case f.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case f.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case f.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case f.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case f.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case f.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case f.JSONRPCMethod.eth_signTypedData_v4:case f.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case f.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case f.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case f.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case f.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return (await this.initializeRelay()).makeEthereumJSONRPCRequest(t,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case f.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case f.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case f.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case f.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(t){switch(t.method){case f.JSONRPCMethod.eth_subscribe:case f.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const e=(0,l.ensureAddressString)(t);return this._addresses.map(t=>(0,l.ensureAddressString)(t)).includes(e)}catch(t){}return !1}_ensureKnownAddress(t){var e;if(!this._isKnownAddress(t))throw null===(e=this._eventListener)||void 0===e||e.onEvent(a.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const n=e.from?(0, l.ensureAddressString)(e.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(n);return {fromAddress:n,toAddress:e.to?(0, l.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0, l.ensureBN)(e.value):new o.default(0),data:e.data?(0, l.ensureBuffer)(e.data):t.alloc(0),nonce:null!=e.nonce?(0, l.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0, l.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0, l.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0, l.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0, l.ensureBN)(e.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw s.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw s.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(t,e,n,r){this._ensureKnownAddress(e);try{const i=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(t,e,n,r).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied message signature");throw t}}async _ethereumAddressFromSignedMessage(t,e,n){const r=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await r.ethereumAddressFromSignedMessage(t,e,n).promise).result}}_eth_accounts(){return [...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return (0, l.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem("DefaultChainId")||"1",e=parseInt(t,10);return (0, l.ensureIntNumber)(e)}async _eth_requestAccounts(){var t;if(null===(t=this._eventListener)||void 0===t||t.onEvent(a.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?u.Session.hash(this._relay.session.id):null}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=await this.initializeRelay();e=await t.requestEthereumAccounts().promise;}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied account authorization");throw t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const e=(0, l.ensureAddressString)(t[0]),n=(0, l.ensureBuffer)(t[1]);return this._signEthereumMessage(n,e,!1)}_eth_ecRecover(t){const e=(0, l.ensureBuffer)(t[0]),n=(0, l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!1)}_personal_sign(t){this._requireAuthorization();const e=(0, l.ensureBuffer)(t[0]),n=(0, l.ensureAddressString)(t[1]);return this._signEthereumMessage(e,n,!0)}_personal_ecRecover(t){const e=(0, l.ensureBuffer)(t[0]),n=(0, l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!0)}async _eth_signTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await t.signEthereumTransaction(e).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_sendRawTransaction(t){const e=(0, l.ensureBuffer)(t[0]),n=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(e,this.getChainId()).promise).result}}async _eth_sendTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return {jsonrpc:"2.0",id:0,result:(await t.signAndSubmitEthereumTransaction(e).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw s.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0, l.ensureParsedJSONObject)(t[0]),n=(0, l.ensureAddressString)(t[1]);this._ensureKnownAddress(n);const r=h.default.hashForSignTypedDataLegacy({data:e}),i=JSON.stringify(e,null,2);return this._signEthereumMessage(r,n,!1,i)}async _eth_signTypedData_v3(t){this._requireAuthorization();const e=(0, l.ensureAddressString)(t[0]),n=(0, l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v3({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _eth_signTypedData_v4(t){this._requireAuthorization();const e=(0, l.ensureAddressString)(t[0]),n=(0, l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _cbwallet_arbitrary(t){const e=t[0],n=t[1];if("string"!=typeof n)throw new Error("parameter must be a string");if("object"!=typeof e||null===e)throw new Error("parameter must be an object");return {jsonrpc:"2.0",id:0,result:await this.genericRequest(e,n)}}async _wallet_addEthereumChain(t){var e,n,r,i;const o=t[0];if(0===(null===(e=o.rpcUrls)||void 0===e?void 0:e.length))return {jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||""===o.chainName.trim())throw s.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!o.nativeCurrency)throw s.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const a=parseInt(o.chainId,16);return await this.addEthereumChain(a,null!==(n=o.rpcUrls)&&void 0!==n?n:[],null!==(r=o.blockExplorerUrls)&&void 0!==r?r:[],o.chainName,null!==(i=o.iconUrls)&&void 0!==i?i:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(t){const e=t[0];return await this.switchEthereumChain(parseInt(e.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(t){var e;const n=Array.isArray(t)?t[0]:t;if(0===(null===(e=n.type)||void 0===e?void 0:e.length))throw s.ethErrors.rpc.invalidParams({message:"type is a required field"});if("ERC20"!==n.type)throw s.ethErrors.rpc.invalidParams({message:`Asset of type '${n.type}' not supported`});if(!(null==n?void 0:n.options))throw s.ethErrors.rpc.invalidParams({message:"options is a required field"});if(!n.options.address)throw s.ethErrors.rpc.invalidParams({message:"option address is a required option"});const r=this.getChainId(),{address:i,symbol:o,image:a,decimals:u}=n.options;return {jsonrpc:"2.0",id:0,result:await this.watchAsset(n.type,i,o,u,a,r)}}_eth_uninstallFilter(t){const e=(0, l.ensureHexString)(t[0]);return this._filterPolyfill.uninstallFilter(e)}async _eth_newFilter(t){const e=t[0];return {jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(e)}}async _eth_newBlockFilter(){return {jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return {jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(t){const e=(0, l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(e)}_eth_getFilterLogs(t){const e=(0, l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterLogs(e)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(t=>(t.setAccountsCallback(t=>this._setAddresses(t)),t.setChainCallback((t,e)=>{this.updateProviderInfo(e,parseInt(t,10),!0);}),this._relay=t,t))}}e.CoinbaseWalletProvider=b;}).call(this,n(19).Buffer);},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(85);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(99);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(128);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=n(86);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}});},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(98);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n);}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}e.EthereumRpcError=i;function o(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n);}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.EVENTS={REQUEST_CHILD_ETHEREUM_ACCOUNTS_START:"walletlink_sdk.request_child_ethereum_accounts.start",REQUEST_CHILD_ETHEREUM_ACCOUNTS_RESPONSE:"walletlink_sdk.request_child_ethereum_accounts.response",STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const r=n(129),i=n(45),o=n(60),s=n(38);class a{constructor(t,e,n,i){this._storage=t,this._id=e||(0, s.randomBytesHex)(16),this._secret=n||(0, s.randomBytesHex)(32);const o=r.sha256.create();o.update(`${this._id}, ${this._secret} WalletLink`),this._key=o.hex(),this._linked=!!i;}static load(t){const e=t.getItem("session:id"),n=t.getItem("session:linked"),r=t.getItem("session:secret");return e&&r?new a(t,e,r,"1"===n):null}static get persistedSessionIdChange$(){return (0, i.fromEvent)(window,"storage").pipe((0, o.filter)(t=>"session:id"===t.key),(0, o.map)(t=>({oldValue:t.oldValue||null,newValue:t.newValue||null})))}static hash(t){return r.sha256.create().update(t).hex()}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked();}save(){return this._storage.setItem("session:id",this._id),this._storage.setItem("session:secret",this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem("session:linked",this._linked?"1":"0");}}e.Session=a;},function(t,e,n){function r(){return t=>t}Object.defineProperty(e,"__esModule",{value:!0}),e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=r,e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t;},function(t,e,n){var r=n(43).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r);}}}(o||i);var s=n.readable||!1!==n.readable&&e.readable,a=n.writable||!1!==n.writable&&e.writable,u=function(){e.writable||l();},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e);},h=e._readableState&&e._readableState.endEmitted,d=function(){s=!1,h=!0,a||o.call(e);},f=function(t){o.call(e,t);},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new r),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new r),o.call(e,t)):void 0},b=function(){e.req.on("finish",l);};return !function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?b():e.on("request",b)),e.on("end",d),e.on("finish",l),!1!==n.error&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",b),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",d),e.removeListener("error",f),e.removeListener("close",p);}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(98);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n);}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}e.EthereumRpcError=i;function o(t,e){if("[Circular]"!==e)return e}e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n);}};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};},function(t,e,n){const r=n(63).default;t.exports=class extends r{constructor(){super(),this.updates=[];}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach(t=>this.emit("update",t));}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}};},function(t,e){function n(t){return null==t?t:Number.parseInt(t,16)}function r(t){if(null==t)return t;return "0x"+t.toString(16)}t.exports=async function({provider:t,fromBlock:e,toBlock:i}){e||(e=i);const o=n(e),s=n(i),a=Array(s-o+1).fill().map((t,e)=>o+e).map(r);return await Promise.all(a.map(e=>function(t,e,n){return new Promise((r,i)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:n},(t,e)=>{if(t)return i(t);r(e.result);});})}(t,"eth_getBlockByNumber",[e,!1])))};},function(t,e,n){function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}n.r(e),e.default=function(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(i&&(i+=" "),i+=e);return i};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.RelayMessageType=void 0,function(t){t.SESSION_ID_REQUEST="SESSION_ID_REQUEST",t.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",t.LINKED="LINKED",t.UNLINKED="UNLINKED",t.WEB3_REQUEST="WEB3_REQUEST",t.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",t.WEB3_RESPONSE="WEB3_RESPONSE";}(e.RelayMessageType||(e.RelayMessageType={}));},function(t,e,n){(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;const r=n(122),i=n(83),o=n(173),s=n(189),a=n(200),u=n(38),c=t.env.LINK_API_URL||"https://www.walletlink.org",l=t.env.SDK_VERSION||n(201).version||"unknown";class h{constructor(t){var e;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const n=t.linkAPIUrl||c;let i;i=t.uiConstructor?t.uiConstructor:t=>new o.WalletSDKUI(t),void 0===t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this._eventListener=t.eventListener;const u=new URL(n),d=`${u.protocol}//${u.host}`;this._storage=new r.ScopedLocalStorage("-walletlink:"+d),this._storage.setItem("version",h.VERSION),this.walletExtension||(this._relayEventManager=new a.WalletSDKRelayEventManager,this._relay=new s.WalletSDKRelay({linkAPIUrl:n,version:l,darkMode:!!t.darkMode,uiConstructor:i,storage:this._storage,relayEventManager:this._relayEventManager,eventListener:this._eventListener}),this.setAppInfo(t.appName,t.appLogoUrl),this._relay.attachUI());}makeWeb3Provider(t="",e=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(t,e),n;const r=this._relay;if(!r||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return t||r.setConnectDisabled(!0),new i.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(r),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,eventListener:this._eventListener,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet})}setAppInfo(t,e){var n;this._appName=t||"DApp",this._appLogoUrl=e||(0, u.getFavicon)();const r=this.walletExtension;r?this.isCipherProvider(r)||r.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl);}disconnect(){var t;const e=this.walletExtension;e?e.close():null===(t=this._relay)||void 0===t||t.resetAndReload();}get walletExtension(){var t;return null!==(t=window.coinbaseWalletExtension)&&void 0!==t?t:window.walletLinkExtension}isCipherProvider(t){return "boolean"==typeof t.isCipher&&t.isCipher}}e.CoinbaseWalletSDK=h,h.VERSION=l;}).call(this,n(36));},function(t,e){t.exports=o,o.default=o,o.stable=u,o.stableStringify=u;var n=[],r=[];function i(){return {depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(t,e,o,a){var u;void 0===a&&(a=i()),function t(e,n,r,i,o,a,u){var c;if(a+=1,"object"==typeof e&&null!==e){for(c=0;c<i.length;c++)if(i[c]===e)return void s("[Circular]",e,n,o);if(void 0!==u.depthLimit&&a>u.depthLimit)return void s("[...]",e,n,o);if(void 0!==u.edgesLimit&&r+1>u.edgesLimit)return void s("[...]",e,n,o);if(i.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,c,i,e,a,u);else {var l=Object.keys(e);for(c=0;c<l.length;c++){var h=l[c];t(e[h],h,c,i,e,a,u);}}i.pop();}}(t,"",0,[],void 0,0,a);try{u=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,c(e),o);}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var l=n.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2];}}return u}function s(t,e,i,o){var s=Object.getOwnPropertyDescriptor(o,i);void 0!==s.get?s.configurable?(Object.defineProperty(o,i,{value:t}),n.push([o,i,e,s])):r.push([e,i,t]):(o[i]=t,n.push([o,i,e]));}function a(t,e){return t<e?-1:t>e?1:0}function u(t,e,o,u){void 0===u&&(u=i());var l,h=function t(e,r,i,o,u,c,l){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<o.length;h++)if(o[h]===e)return void s("[Circular]",e,r,u);try{if("function"==typeof e.toJSON)return}catch(t){return}if(void 0!==l.depthLimit&&c>l.depthLimit)return void s("[...]",e,r,u);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void s("[...]",e,r,u);if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)t(e[h],h,h,o,e,c,l);else {var d={},f=Object.keys(e).sort(a);for(h=0;h<f.length;h++){var p=f[h];t(e[p],p,h,o,e,c,l),d[p]=e[p];}if(void 0===u)return d;n.push([u,r,e]),u[r]=d;}o.pop();}}(t,"",0,[],void 0,0,u)||t;try{l=0===r.length?JSON.stringify(h,e,o):JSON.stringify(h,c(e),o);}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var d=n.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2];}}return l}function c(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var i=0;i<r.length;i++){var o=r[i];if(o[1]===e&&o[0]===n){n=o[2],r.splice(i,1);break}}return t.call(this,e,n)}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(86),i=n(85),o=r.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return !1;const e=t.toString();return !!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=a,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=s,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=a(c.code),c.data={originalError:l(t)});}else {c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)};}const d=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&d&&"string"==typeof d&&(c.stack=d),c};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;const r=n(84);e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion";e.WalletSDKRelayAbstract=class{async makeEthereumJSONRPCRequest(t,e){if(!e)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(e,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>{if(!t)throw r.ethErrors.rpc.parse({});const e=t,{error:n}=e;if(n)throw (0, r.serializeError)(n);return e})}};},function(t,e,n){(function(e){const r=n(132),i=n(65);function o(t){return e.allocUnsafe(t).fill(0)}function s(t,e,n){const r=o(e);return t=a(t),n?t.length<e?(t.copy(r),r):t.slice(0,e):t.length<e?(t.copy(r,e-t.length),r):t.slice(-e)}function a(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"==typeof t)t=u(t)?e.from((n=c(t)).length%2?"0"+n:n,"hex"):e.from(t);else if("number"==typeof t)t=intToBuffer(t);else if(null==t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else {if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray());}var n;return t}function u(t){return "string"==typeof t&&t.match(/^0x[0-9A-Fa-f]*$/)}function c(t){return "string"==typeof t&&t.startsWith("0x")?t.slice(2):t}t.exports={zeros:o,setLength:s,setLengthRight:function(t,e){return s(t,e,!0)},isHexString:u,stripHexPrefix:c,toBuffer:a,bufferToHex:function(t){return "0x"+(t=a(t)).toString("hex")},keccak:function(t,e){return t=a(t),e||(e=256),r("keccak"+e).update(t).digest()}};}).call(this,n(19).Buffer);},function(t,e,n){(e=t.exports=n(103)).Stream=e,e.Readable=e,e.Writable=n(107),e.Duplex=n(44),e.Transform=n(109),e.PassThrough=n(142),e.finished=n(90),e.pipeline=n(143);},function(t,e,n){(function(e,r){var i;t.exports=k,k.ReadableState=x;n(64).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=n(104),a=n(19).Buffer,u=e.Uint8Array||function(){};var c,l=n(135);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,d,f,p=n(136),b=n(105),g=n(106).getHighWaterMark,m=n(43).codes,y=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(58)(k,s);var S=b.errorOrDestroy,E=["error","close","destroy","pause","resume"];function x(t,e,r){i=i||n(44),t=t||{},"boolean"!=typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=n(108).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding);}function k(t){if(i=i||n(44),!(this instanceof k))return new k(t);var e=this instanceof i;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this);}function M(t,e,n,r,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length);}e.ended=!0,e.sync?A(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)));}(t,s);else if(i||(o=function(t,e){var n;r=e,a.isBuffer(r)||r instanceof u||"string"==typeof e||void 0===e||t.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],e));var r;return n}(s,e)),o)S(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),r)s.endEmitted?S(t,new _):C(t,s,e,!0);else if(s.ended)S(t,new v);else {if(s.destroyed)return !1;s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?C(t,s,e,!1):O(t,s)):C(t,s,e,!1);}else r||(s.reading=!1,O(t,s));return !s.ended&&(s.length<s.highWaterMark||0===s.length)}function C(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&A(t)),O(t,e);}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t);}}),k.prototype.destroy=b.destroy,k.prototype._undestroy=b.undestroy,k.prototype._destroy=function(t,e){e(t);},k.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=a.from(t,e),e=""),n=!0),M(this,t,e,!1,n)},k.prototype.unshift=function(t){return M(this,t,null,!0,!1)},k.prototype.isPaused=function(){return !1===this._readableState.flowing},k.prototype.setEncoding=function(t){h||(h=n(108).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(I,t));}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t);}function O(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(T,t,e));}function T(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var n=e.length;if(c("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1;}function j(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume();}function N(t){c("readable nexttick read 0"),t.read(0);}function P(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0);}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function D(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n;}function B(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(H,e,t));}function H(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy();}}function F(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return -1}k.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):A(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(n,e))),null===(r=t>0?D(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(t){S(this,new w("_read()"));},k.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:g;function a(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",b),t.removeListener("drain",l),t.removeListener("error",f),t.removeListener("unpipe",a),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",d),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l());}function u(){c("onend"),t.end();}i.endEmitted?r.nextTick(s):n.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t));}}(n);t.on("drain",l);var h=!1;function d(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause());}function f(e){c("onerror",e),g(),t.removeListener("error",f),0===o(t,"error")&&S(t,e);}function p(){t.removeListener("finish",b),g();}function b(){c("onfinish"),t.removeListener("close",p),g();}function g(){c("unpipe"),n.unpipe(t);}return n.on("data",d),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n);}(t,"error",f),t.once("close",p),t.once("finish",b),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},k.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return -1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},k.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e),i=this._readableState;return "data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?A(this):i.reading||r.nextTick(N,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return "readable"===t&&r.nextTick(j,this),n},k.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return "readable"!==t&&void 0!==t||r.nextTick(j,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(P,t,e));}(this,t)),t.paused=!1,this},k.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t);}e.push(null);})),t.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()));})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<E.length;o++)t.on(E[o],this.emit.bind(this,E[o]));return this._read=function(e){c("wrapped _read",e),r&&(r=!1,t.resume());},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(140)),d(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t);}}),k._fromList=D,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(t,e){return void 0===f&&(f=n(141)),f(k,t,e)});}).call(this,n(57),n(36));},function(t,e,n){t.exports=n(64).EventEmitter;},function(t,e,n){(function(e){function n(t,e){i(t,e),r(t);}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function i(t,e){t.emit("error",e);}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(r,s):(s._writableState.errorEmitted=!0,e.nextTick(n,s,t)):e.nextTick(n,s,t):o?(e.nextTick(r,s),o(t)):e.nextTick(r,s);})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);},errorOrDestroy:function(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e);}};}).call(this,n(36));},function(t,e,n){var r=n(43).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}};},function(t,e,n){(function(e,r){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next;}e.corkedRequestsFree.next=t;}(e,t);};}var o;t.exports=k,k.WritableState=x;var s={deprecate:n(138)},a=n(104),u=n(19).Buffer,c=e.Uint8Array||function(){};var l,h=n(105),d=n(106).getHighWaterMark,f=n(43).codes,p=f.ERR_INVALID_ARG_TYPE,b=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,S=h.errorOrDestroy;function E(){}function x(t,e,s){o=o||n(44),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0;}(n),e)!function(t,e,n,i,o){--e.pendingcb,n?(r.nextTick(o,i),r.nextTick(O,t,e),t._writableState.errorEmitted=!0,S(t,i)):(o(i),t._writableState.errorEmitted=!0,S(t,i),O(t,e));}(t,n,i,e,o);else {var s=A(n)||t.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||R(t,n),i?r.nextTick(C,t,n,s,o):C(t,n,s,o);}}(e,t);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this);}function k(t){var e=this instanceof(o=o||n(44));if(!e&&!l.call(k,this))return new k(t);this._writableState=new x(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this);}function M(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1;}function C(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));}(t,e),e.pendingcb--,r(),O(t,e);}function R(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),s=e.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,M(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0;}else {for(;n;){var c=n.chunk,l=n.encoding,h=n.callback;if(M(t,e,!1,e.objectMode?1:c.length,c,l,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null);}e.bufferedRequest=n,e.bufferProcessing=!1;}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(n){e.pendingcb--,n&&S(t,n),e.prefinished=!0,t.emit("prefinish"),O(t,e);}));}function O(t,e){var n=A(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(I,t,e)));}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy();}return n}n(58)(k,a),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(t){return !!l.call(this,t)||this===k&&(t&&t._writableState instanceof x)}})):l=function(t){return t instanceof this},k.prototype.pipe=function(){S(this,new m);},k.prototype.write=function(t,e,n){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof n&&(n=E),o.ending?function(t,e){var n=new w;S(t,n),r.nextTick(e,n);}(this,n):(a||function(t,e,n,i){var o;return null===n?o=new v:"string"==typeof n||e.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(S(t,o),r.nextTick(i,o),!1)}(this,o,t,n))&&(o.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s);}var a=e.objectMode?1:r.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1;}else M(t,e,!1,a,r,i,o);return c}(this,o,a,t,e,n)),s},k.prototype.cork=function(){this._writableState.corked++;},k.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t));},k.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,n){n(new b("_write()"));},k.prototype._writev=null,k.prototype.end=function(t,e,n){var i=this._writableState;return "function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,O(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1;}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t);}}),k.prototype.destroy=h.destroy,k.prototype._undestroy=h.undestroy,k.prototype._destroy=function(t,e){e(t);};}).call(this,n(57),n(36));},function(t,e,n){var r=n(139).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return "utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0;}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e);}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return "";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return "";n=this.lastNeed,this.lastNeed=0;}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};},function(t,e,n){t.exports=l;var r=n(43).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(44);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h);}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(e,n){d(t,e,n);}));}function d(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}n(58)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,n){n(new i("_transform()"));},l.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform));},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t);}));};},function(t,e,n){const r=(t,e)=>function(){const n=e.promiseModule,r=new Array(arguments.length);for(let t=0;t<arguments.length;t++)r[t]=arguments[t];return new n((n,i)=>{e.errorFirst?r.push((function(t,r){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),i(e)):n(e);}else t?i(t):n(r);})):r.push((function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];n(t);}else n(t);})),t.apply(this,r);})};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const n=t=>{const n=e=>"string"==typeof e?t===e:e.test(t);return e.include?e.include.some(n):!e.exclude.some(n)};let i;i="function"==typeof t?function(){return e.excludeMain?t.apply(this,arguments):r(t,e).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const o in t){const s=t[o];i[o]="function"==typeof s&&n(o)?r(s,e):s;}return i};},function(t,e,n){const r=n(153),i=n(154)();function o(t){this.currentProvider=t;}function s(t){return function(){const e=this;var n=[].slice.call(arguments),r=n.pop();e.sendAsync({method:t,params:n},r);}}function a(t,e){return function(){const n=this;var r=[].slice.call(arguments),i=r.pop();r.length<t&&r.push("latest"),n.sendAsync({method:e,params:r},i);}}t.exports=o,o.prototype.getBalance=a(2,"eth_getBalance"),o.prototype.getCode=a(2,"eth_getCode"),o.prototype.getTransactionCount=a(2,"eth_getTransactionCount"),o.prototype.getStorageAt=a(3,"eth_getStorageAt"),o.prototype.call=a(2,"eth_call"),o.prototype.protocolVersion=s("eth_protocolVersion"),o.prototype.syncing=s("eth_syncing"),o.prototype.coinbase=s("eth_coinbase"),o.prototype.mining=s("eth_mining"),o.prototype.hashrate=s("eth_hashrate"),o.prototype.gasPrice=s("eth_gasPrice"),o.prototype.accounts=s("eth_accounts"),o.prototype.blockNumber=s("eth_blockNumber"),o.prototype.getBlockTransactionCountByHash=s("eth_getBlockTransactionCountByHash"),o.prototype.getBlockTransactionCountByNumber=s("eth_getBlockTransactionCountByNumber"),o.prototype.getUncleCountByBlockHash=s("eth_getUncleCountByBlockHash"),o.prototype.getUncleCountByBlockNumber=s("eth_getUncleCountByBlockNumber"),o.prototype.sign=s("eth_sign"),o.prototype.sendTransaction=s("eth_sendTransaction"),o.prototype.sendRawTransaction=s("eth_sendRawTransaction"),o.prototype.estimateGas=s("eth_estimateGas"),o.prototype.getBlockByHash=s("eth_getBlockByHash"),o.prototype.getBlockByNumber=s("eth_getBlockByNumber"),o.prototype.getTransactionByHash=s("eth_getTransactionByHash"),o.prototype.getTransactionByBlockHashAndIndex=s("eth_getTransactionByBlockHashAndIndex"),o.prototype.getTransactionByBlockNumberAndIndex=s("eth_getTransactionByBlockNumberAndIndex"),o.prototype.getTransactionReceipt=s("eth_getTransactionReceipt"),o.prototype.getUncleByBlockHashAndIndex=s("eth_getUncleByBlockHashAndIndex"),o.prototype.getUncleByBlockNumberAndIndex=s("eth_getUncleByBlockNumberAndIndex"),o.prototype.getCompilers=s("eth_getCompilers"),o.prototype.compileLLL=s("eth_compileLLL"),o.prototype.compileSolidity=s("eth_compileSolidity"),o.prototype.compileSerpent=s("eth_compileSerpent"),o.prototype.newFilter=s("eth_newFilter"),o.prototype.newBlockFilter=s("eth_newBlockFilter"),o.prototype.newPendingTransactionFilter=s("eth_newPendingTransactionFilter"),o.prototype.uninstallFilter=s("eth_uninstallFilter"),o.prototype.getFilterChanges=s("eth_getFilterChanges"),o.prototype.getFilterLogs=s("eth_getFilterLogs"),o.prototype.getLogs=s("eth_getLogs"),o.prototype.getWork=s("eth_getWork"),o.prototype.submitWork=s("eth_submitWork"),o.prototype.submitHashrate=s("eth_submitHashrate"),o.prototype.sendAsync=function(t,e){var n;this.currentProvider.sendAsync((n=t,r({id:i(),jsonrpc:"2.0",params:[]},n)),(function(t,n){if(!t&&n.error&&(t=new Error("EthQuery - RPC Error - "+n.error.message)),t)return e(t);e(null,n.result);}));};},function(t,e,n){t.exports=n(160);},function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}});}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n];}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n);};Object.defineProperty(e,"__esModule",{value:!0}),i(n(161),e),i(n(162),e),i(n(163),e),i(n(114),e),i(n(115),e),i(n(166),e);},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;let r=Math.floor(4294967295*Math.random());e.getUniqueId=function(){return r=(r+1)%4294967295,r};},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;const i=r(n(63)),o=n(164);class s extends i.default{constructor(){super(),this._middleware=[];}push(t){this._middleware.push(t);}handle(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,n,r)=>{try{const[i,o,a]=await s._runAllMiddleware(t,e,this._middleware);return o?(await s._runReturnHandlers(a),r(i)):n(async t=>{try{await s._runReturnHandlers(a);}catch(e){return t(e)}return t()})}catch(t){return r(t)}}}async _handleBatch(t,e){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,n):n}catch(t){if(e)return e(t);throw t}}_promiseHandle(t){return new Promise(e=>{this._handle(t,(t,n)=>{e(n);});})}async _handle(t,e){if(!t||Array.isArray(t)||"object"!=typeof t){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return e(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!=typeof t.method){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return e(n,{id:t.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},t),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r);}catch(t){i=t;}return i&&(delete r.result,r.error||(r.error=o.serializeError(i))),e(i,r)}async _processRequest(t,e){const[n,r,i]=await s._runAllMiddleware(t,e,this._middleware);if(s._checkForCompletion(t,e,r),await s._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,e,n){const r=[];let i=null,o=!1;for(const a of n)if([i,o]=await s._runMiddleware(t,e,a,r),o)break;return [i,o,r.reverse()]}static _runMiddleware(t,e,n,r){return new Promise(i=>{const s=t=>{const n=t||e.error;n&&(e.error=o.serializeError(n)),i([n,!0]);},u=n=>{e.error?s(e.error):(n&&("function"!=typeof n&&s(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${a(t)}`,{request:t})),r.push(n)),i([null,!1]));};try{n(t,e,u,s);}catch(t){s(t);}})}static async _runReturnHandlers(t){for(const e of t)await new Promise((t,n)=>{e(e=>e?n(e):t());});}static _checkForCompletion(t,e,n){if(!("result"in e)&&!("error"in e))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n"+a(t),{request:t});if(!n)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n"+a(t),{request:t})}}function a(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=s;},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(92),i=n(91),o=r.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return !1;const e=t.toString();return !!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=a,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=s,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=a(c.code),c.data={originalError:l(t)});}else {c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)};}const d=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&d&&"string"==typeof d&&(c.stack=d),c};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.0.5";},function(t,e,n){(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const i=n(8),o=n(67),s=r(n(177));e.QRCode=e=>{const[n,r]=(0, o.useState)("");return (0, o.useEffect)(()=>{var n,i;const o=new s.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=e.width)&&void 0!==n?n:256,height:null!==(i=e.height)&&void 0!==i?i:256,padding:0,image:e.image}),a=t.from(o.svg(),"utf8").toString("base64");r("data:image/svg+xml;base64,"+a);}),n?(0, i.h)("img",{src:n,alt:"QR Code"}):null};}).call(this,n(19).Buffer);},function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;const i=n(8),o=r(n(178));e.Spinner=t=>{var e;const n=null!==(e=t.size)&&void 0!==e?e:64,r=t.color||"#000";return (0, i.h)("div",{class:"-cbwsdk-spinner"},(0, i.h)("style",null,o.default),(0, i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0, i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:r}})))};},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Web3Method=void 0,function(t){t.requestEthereumAccounts="requestEthereumAccounts",t.signEthereumMessage="signEthereumMessage",t.signEthereumTransaction="signEthereumTransaction",t.submitEthereumTransaction="submitEthereumTransaction",t.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",t.scanQRCode="scanQRCode",t.generic="generic",t.childRequestEthereumAccounts="childRequestEthereumAccounts",t.addEthereumChain="addEthereumChain",t.switchEthereumChain="switchEthereumChain",t.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",t.watchAsset="watchAsset";}(e.Web3Method||(e.Web3Method={}));},function(t,e,n){n.r(e);var r=n(82);n.d(e,"CoinbaseWalletProvider",(function(){return r.CoinbaseWalletProvider})),n.d(e,"CoinbaseWalletSDK",(function(){return r.CoinbaseWalletSDK}));},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0;e.ScopedLocalStorage=class{constructor(t){this.scope=t;}setItem(t,e){localStorage.setItem(this.scopedKey(t),e);}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t));}clear(){const t=this.scopedKey(""),e=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);"string"==typeof r&&r.startsWith(t)&&e.push(r);}e.forEach(t=>localStorage.removeItem(t));}scopedKey(t){return `${this.scope}:${t}`}};},function(t,e,n){e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),s=r[0],a=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),l=0,h=a>0?s-4:s;for(n=0;n<h;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[l++]=255&e);1===a&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(l(t,s,s+16383>a?a:s+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return -1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;},function(t,e){
31652
31267
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
31653
31268
  e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,h=n?i-1:0,d=n?-1:1,f=t[e+h];for(h+=d,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=d,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+h],h+=d,l-=8);if(0===o)o=1-c;else {if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=c;}return (f?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+f]=255&s,f+=p,s/=256,c-=8);t[n+f-p]|=128*b;};},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return "[object Array]"==n.call(t)};},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t};},function(t,e){},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(85),i=n(99),o=n(86);function s(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function a(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return [t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return [e||void 0,n]}}return []}e.ethErrors={rpc:{parse:t=>s(o.errorCodes.rpc.parse,t),invalidRequest:t=>s(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>s(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>s(o.errorCodes.rpc.methodNotFound,t),internal:t=>s(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(e,t)},invalidInput:t=>s(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>s(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>s(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>s(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>s(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>s(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>a(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>a(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>a(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>a(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>a(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}};},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;
31654
31269
  /**
@@ -50305,12 +49920,12 @@ const submitContractInteraction$1 = async ({ transaction, wallet })=>{
50305
49920
  })
50306
49921
  };
50307
49922
 
50308
- const submitSimpleTransfer$1 = ({ transaction, wallet })=>{
49923
+ const submitSimpleTransfer$1 = async ({ transaction, wallet })=>{
50309
49924
  return wallet.connector.sendTransaction({
50310
49925
  from: transaction.from,
50311
49926
  to: transaction.to,
50312
49927
  value: _optionalChain$1$2([transaction, 'access', _4 => _4.value, 'optionalAccess', _5 => _5.toString, 'call', _6 => _6()]),
50313
- gas: CONSTANTS$3[transaction.blockchain].TRANSFER_GAS
49928
+ gas: (await estimate(transaction)).toString()
50314
49929
  })
50315
49930
  };
50316
49931