rango-sdk-basic 0.1.48 → 0.1.49

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.
@@ -8,345 +8,340 @@ var uuid = _interopDefault(require('uuid-random'));
8
8
  var ethRpcErrors = require('eth-rpc-errors');
9
9
  var axios = _interopDefault(require('axios'));
10
10
 
11
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
12
+ try {
13
+ var i = n[a](c),
14
+ u = i.value;
15
+ } catch (n) {
16
+ return void e(n);
17
+ }
18
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
19
+ }
20
+ function _asyncToGenerator(n) {
21
+ return function () {
22
+ var t = this,
23
+ e = arguments;
24
+ return new Promise(function (r, o) {
25
+ var a = n.apply(t, e);
26
+ function _next(n) {
27
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
28
+ }
29
+ function _throw(n) {
30
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
31
+ }
32
+ _next(void 0);
33
+ });
34
+ };
35
+ }
36
+ function _extends() {
37
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
38
+ for (var e = 1; e < arguments.length; e++) {
39
+ var t = arguments[e];
40
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
41
+ }
42
+ return n;
43
+ }, _extends.apply(null, arguments);
44
+ }
11
45
  function _regeneratorRuntime() {
12
46
  _regeneratorRuntime = function () {
13
- return exports;
47
+ return e;
14
48
  };
15
- var exports = {},
16
- Op = Object.prototype,
17
- hasOwn = Op.hasOwnProperty,
18
- defineProperty = Object.defineProperty || function (obj, key, desc) {
19
- obj[key] = desc.value;
49
+ var t,
50
+ e = {},
51
+ r = Object.prototype,
52
+ n = r.hasOwnProperty,
53
+ o = Object.defineProperty || function (t, e, r) {
54
+ t[e] = r.value;
20
55
  },
21
- $Symbol = "function" == typeof Symbol ? Symbol : {},
22
- iteratorSymbol = $Symbol.iterator || "@@iterator",
23
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
24
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
25
- function define(obj, key, value) {
26
- return Object.defineProperty(obj, key, {
27
- value: value,
56
+ i = "function" == typeof Symbol ? Symbol : {},
57
+ a = i.iterator || "@@iterator",
58
+ c = i.asyncIterator || "@@asyncIterator",
59
+ u = i.toStringTag || "@@toStringTag";
60
+ function define(t, e, r) {
61
+ return Object.defineProperty(t, e, {
62
+ value: r,
28
63
  enumerable: !0,
29
64
  configurable: !0,
30
65
  writable: !0
31
- }), obj[key];
66
+ }), t[e];
32
67
  }
33
68
  try {
34
69
  define({}, "");
35
- } catch (err) {
36
- define = function (obj, key, value) {
37
- return obj[key] = value;
70
+ } catch (t) {
71
+ define = function (t, e, r) {
72
+ return t[e] = r;
38
73
  };
39
74
  }
40
- function wrap(innerFn, outerFn, self, tryLocsList) {
41
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
42
- generator = Object.create(protoGenerator.prototype),
43
- context = new Context(tryLocsList || []);
44
- return defineProperty(generator, "_invoke", {
45
- value: makeInvokeMethod(innerFn, self, context)
46
- }), generator;
75
+ function wrap(t, e, r, n) {
76
+ var i = e && e.prototype instanceof Generator ? e : Generator,
77
+ a = Object.create(i.prototype),
78
+ c = new Context(n || []);
79
+ return o(a, "_invoke", {
80
+ value: makeInvokeMethod(t, r, c)
81
+ }), a;
47
82
  }
48
- function tryCatch(fn, obj, arg) {
83
+ function tryCatch(t, e, r) {
49
84
  try {
50
85
  return {
51
86
  type: "normal",
52
- arg: fn.call(obj, arg)
87
+ arg: t.call(e, r)
53
88
  };
54
- } catch (err) {
89
+ } catch (t) {
55
90
  return {
56
91
  type: "throw",
57
- arg: err
92
+ arg: t
58
93
  };
59
94
  }
60
95
  }
61
- exports.wrap = wrap;
62
- var ContinueSentinel = {};
96
+ e.wrap = wrap;
97
+ var h = "suspendedStart",
98
+ l = "suspendedYield",
99
+ f = "executing",
100
+ s = "completed",
101
+ y = {};
63
102
  function Generator() {}
64
103
  function GeneratorFunction() {}
65
104
  function GeneratorFunctionPrototype() {}
66
- var IteratorPrototype = {};
67
- define(IteratorPrototype, iteratorSymbol, function () {
105
+ var p = {};
106
+ define(p, a, function () {
68
107
  return this;
69
108
  });
70
- var getProto = Object.getPrototypeOf,
71
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
72
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
73
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
74
- function defineIteratorMethods(prototype) {
75
- ["next", "throw", "return"].forEach(function (method) {
76
- define(prototype, method, function (arg) {
77
- return this._invoke(method, arg);
109
+ var d = Object.getPrototypeOf,
110
+ v = d && d(d(values([])));
111
+ v && v !== r && n.call(v, a) && (p = v);
112
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
113
+ function defineIteratorMethods(t) {
114
+ ["next", "throw", "return"].forEach(function (e) {
115
+ define(t, e, function (t) {
116
+ return this._invoke(e, t);
78
117
  });
79
118
  });
80
119
  }
81
- function AsyncIterator(generator, PromiseImpl) {
82
- function invoke(method, arg, resolve, reject) {
83
- var record = tryCatch(generator[method], generator, arg);
84
- if ("throw" !== record.type) {
85
- var result = record.arg,
86
- value = result.value;
87
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
88
- invoke("next", value, resolve, reject);
89
- }, function (err) {
90
- invoke("throw", err, resolve, reject);
91
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
92
- result.value = unwrapped, resolve(result);
93
- }, function (error) {
94
- return invoke("throw", error, resolve, reject);
120
+ function AsyncIterator(t, e) {
121
+ function invoke(r, o, i, a) {
122
+ var c = tryCatch(t[r], t, o);
123
+ if ("throw" !== c.type) {
124
+ var u = c.arg,
125
+ h = u.value;
126
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
127
+ invoke("next", t, i, a);
128
+ }, function (t) {
129
+ invoke("throw", t, i, a);
130
+ }) : e.resolve(h).then(function (t) {
131
+ u.value = t, i(u);
132
+ }, function (t) {
133
+ return invoke("throw", t, i, a);
95
134
  });
96
135
  }
97
- reject(record.arg);
136
+ a(c.arg);
98
137
  }
99
- var previousPromise;
100
- defineProperty(this, "_invoke", {
101
- value: function (method, arg) {
138
+ var r;
139
+ o(this, "_invoke", {
140
+ value: function (t, n) {
102
141
  function callInvokeWithMethodAndArg() {
103
- return new PromiseImpl(function (resolve, reject) {
104
- invoke(method, arg, resolve, reject);
142
+ return new e(function (e, r) {
143
+ invoke(t, n, e, r);
105
144
  });
106
145
  }
107
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
146
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
108
147
  }
109
148
  });
110
149
  }
111
- function makeInvokeMethod(innerFn, self, context) {
112
- var state = "suspendedStart";
113
- return function (method, arg) {
114
- if ("executing" === state) throw new Error("Generator is already running");
115
- if ("completed" === state) {
116
- if ("throw" === method) throw arg;
150
+ function makeInvokeMethod(e, r, n) {
151
+ var o = h;
152
+ return function (i, a) {
153
+ if (o === f) throw Error("Generator is already running");
154
+ if (o === s) {
155
+ if ("throw" === i) throw a;
117
156
  return {
118
- value: void 0,
157
+ value: t,
119
158
  done: !0
120
159
  };
121
160
  }
122
- for (context.method = method, context.arg = arg;;) {
123
- var delegate = context.delegate;
124
- if (delegate) {
125
- var delegateResult = maybeInvokeDelegate(delegate, context);
126
- if (delegateResult) {
127
- if (delegateResult === ContinueSentinel) continue;
128
- return delegateResult;
161
+ for (n.method = i, n.arg = a;;) {
162
+ var c = n.delegate;
163
+ if (c) {
164
+ var u = maybeInvokeDelegate(c, n);
165
+ if (u) {
166
+ if (u === y) continue;
167
+ return u;
129
168
  }
130
169
  }
131
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
132
- if ("suspendedStart" === state) throw state = "completed", context.arg;
133
- context.dispatchException(context.arg);
134
- } else "return" === context.method && context.abrupt("return", context.arg);
135
- state = "executing";
136
- var record = tryCatch(innerFn, self, context);
137
- if ("normal" === record.type) {
138
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
170
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
171
+ if (o === h) throw o = s, n.arg;
172
+ n.dispatchException(n.arg);
173
+ } else "return" === n.method && n.abrupt("return", n.arg);
174
+ o = f;
175
+ var p = tryCatch(e, r, n);
176
+ if ("normal" === p.type) {
177
+ if (o = n.done ? s : l, p.arg === y) continue;
139
178
  return {
140
- value: record.arg,
141
- done: context.done
179
+ value: p.arg,
180
+ done: n.done
142
181
  };
143
182
  }
144
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
183
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
145
184
  }
146
185
  };
147
186
  }
148
- function maybeInvokeDelegate(delegate, context) {
149
- var methodName = context.method,
150
- method = delegate.iterator[methodName];
151
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
152
- var record = tryCatch(method, delegate.iterator, context.arg);
153
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
154
- var info = record.arg;
155
- 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);
187
+ function maybeInvokeDelegate(e, r) {
188
+ var n = r.method,
189
+ o = e.iterator[n];
190
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
191
+ var i = tryCatch(o, e.iterator, r.arg);
192
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
193
+ var a = i.arg;
194
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
156
195
  }
157
- function pushTryEntry(locs) {
158
- var entry = {
159
- tryLoc: locs[0]
196
+ function pushTryEntry(t) {
197
+ var e = {
198
+ tryLoc: t[0]
160
199
  };
161
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
200
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
162
201
  }
163
- function resetTryEntry(entry) {
164
- var record = entry.completion || {};
165
- record.type = "normal", delete record.arg, entry.completion = record;
202
+ function resetTryEntry(t) {
203
+ var e = t.completion || {};
204
+ e.type = "normal", delete e.arg, t.completion = e;
166
205
  }
167
- function Context(tryLocsList) {
206
+ function Context(t) {
168
207
  this.tryEntries = [{
169
208
  tryLoc: "root"
170
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
209
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
171
210
  }
172
- function values(iterable) {
173
- if (iterable || "" === iterable) {
174
- var iteratorMethod = iterable[iteratorSymbol];
175
- if (iteratorMethod) return iteratorMethod.call(iterable);
176
- if ("function" == typeof iterable.next) return iterable;
177
- if (!isNaN(iterable.length)) {
178
- var i = -1,
179
- next = function next() {
180
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
181
- return next.value = undefined, next.done = !0, next;
211
+ function values(e) {
212
+ if (e || "" === e) {
213
+ var r = e[a];
214
+ if (r) return r.call(e);
215
+ if ("function" == typeof e.next) return e;
216
+ if (!isNaN(e.length)) {
217
+ var o = -1,
218
+ i = function next() {
219
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
220
+ return next.value = t, next.done = !0, next;
182
221
  };
183
- return next.next = next;
222
+ return i.next = i;
184
223
  }
185
224
  }
186
- throw new TypeError(typeof iterable + " is not iterable");
225
+ throw new TypeError(typeof e + " is not iterable");
187
226
  }
188
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
227
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
189
228
  value: GeneratorFunctionPrototype,
190
229
  configurable: !0
191
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
230
+ }), o(GeneratorFunctionPrototype, "constructor", {
192
231
  value: GeneratorFunction,
193
232
  configurable: !0
194
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
195
- var ctor = "function" == typeof genFun && genFun.constructor;
196
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
197
- }, exports.mark = function (genFun) {
198
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
199
- }, exports.awrap = function (arg) {
233
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
234
+ var e = "function" == typeof t && t.constructor;
235
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
236
+ }, e.mark = function (t) {
237
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
238
+ }, e.awrap = function (t) {
200
239
  return {
201
- __await: arg
240
+ __await: t
202
241
  };
203
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
242
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
204
243
  return this;
205
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
206
- void 0 === PromiseImpl && (PromiseImpl = Promise);
207
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
208
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
209
- return result.done ? result.value : iter.next();
244
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
245
+ void 0 === i && (i = Promise);
246
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
247
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
248
+ return t.done ? t.value : a.next();
210
249
  });
211
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
250
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
212
251
  return this;
213
- }), define(Gp, "toString", function () {
252
+ }), define(g, "toString", function () {
214
253
  return "[object Generator]";
215
- }), exports.keys = function (val) {
216
- var object = Object(val),
217
- keys = [];
218
- for (var key in object) keys.push(key);
219
- return keys.reverse(), function next() {
220
- for (; keys.length;) {
221
- var key = keys.pop();
222
- if (key in object) return next.value = key, next.done = !1, next;
254
+ }), e.keys = function (t) {
255
+ var e = Object(t),
256
+ r = [];
257
+ for (var n in e) r.push(n);
258
+ return r.reverse(), function next() {
259
+ for (; r.length;) {
260
+ var t = r.pop();
261
+ if (t in e) return next.value = t, next.done = !1, next;
223
262
  }
224
263
  return next.done = !0, next;
225
264
  };
226
- }, exports.values = values, Context.prototype = {
265
+ }, e.values = values, Context.prototype = {
227
266
  constructor: Context,
228
- reset: function (skipTempReset) {
229
- 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) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
267
+ reset: function (e) {
268
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
230
269
  },
231
270
  stop: function () {
232
271
  this.done = !0;
233
- var rootRecord = this.tryEntries[0].completion;
234
- if ("throw" === rootRecord.type) throw rootRecord.arg;
272
+ var t = this.tryEntries[0].completion;
273
+ if ("throw" === t.type) throw t.arg;
235
274
  return this.rval;
236
275
  },
237
- dispatchException: function (exception) {
238
- if (this.done) throw exception;
239
- var context = this;
240
- function handle(loc, caught) {
241
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
276
+ dispatchException: function (e) {
277
+ if (this.done) throw e;
278
+ var r = this;
279
+ function handle(n, o) {
280
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
242
281
  }
243
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
244
- var entry = this.tryEntries[i],
245
- record = entry.completion;
246
- if ("root" === entry.tryLoc) return handle("end");
247
- if (entry.tryLoc <= this.prev) {
248
- var hasCatch = hasOwn.call(entry, "catchLoc"),
249
- hasFinally = hasOwn.call(entry, "finallyLoc");
250
- if (hasCatch && hasFinally) {
251
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
252
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
253
- } else if (hasCatch) {
254
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
282
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
283
+ var i = this.tryEntries[o],
284
+ a = i.completion;
285
+ if ("root" === i.tryLoc) return handle("end");
286
+ if (i.tryLoc <= this.prev) {
287
+ var c = n.call(i, "catchLoc"),
288
+ u = n.call(i, "finallyLoc");
289
+ if (c && u) {
290
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
291
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
292
+ } else if (c) {
293
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
255
294
  } else {
256
- if (!hasFinally) throw new Error("try statement without catch or finally");
257
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
295
+ if (!u) throw Error("try statement without catch or finally");
296
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
258
297
  }
259
298
  }
260
299
  }
261
300
  },
262
- abrupt: function (type, arg) {
263
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
264
- var entry = this.tryEntries[i];
265
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
266
- var finallyEntry = entry;
301
+ abrupt: function (t, e) {
302
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
303
+ var o = this.tryEntries[r];
304
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
305
+ var i = o;
267
306
  break;
268
307
  }
269
308
  }
270
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
271
- var record = finallyEntry ? finallyEntry.completion : {};
272
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
309
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
310
+ var a = i ? i.completion : {};
311
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
273
312
  },
274
- complete: function (record, afterLoc) {
275
- if ("throw" === record.type) throw record.arg;
276
- 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;
313
+ complete: function (t, e) {
314
+ if ("throw" === t.type) throw t.arg;
315
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
277
316
  },
278
- finish: function (finallyLoc) {
279
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
280
- var entry = this.tryEntries[i];
281
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
317
+ finish: function (t) {
318
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
319
+ var r = this.tryEntries[e];
320
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
282
321
  }
283
322
  },
284
- catch: function (tryLoc) {
285
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
286
- var entry = this.tryEntries[i];
287
- if (entry.tryLoc === tryLoc) {
288
- var record = entry.completion;
289
- if ("throw" === record.type) {
290
- var thrown = record.arg;
291
- resetTryEntry(entry);
323
+ catch: function (t) {
324
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
325
+ var r = this.tryEntries[e];
326
+ if (r.tryLoc === t) {
327
+ var n = r.completion;
328
+ if ("throw" === n.type) {
329
+ var o = n.arg;
330
+ resetTryEntry(r);
292
331
  }
293
- return thrown;
332
+ return o;
294
333
  }
295
334
  }
296
- throw new Error("illegal catch attempt");
335
+ throw Error("illegal catch attempt");
297
336
  },
298
- delegateYield: function (iterable, resultName, nextLoc) {
337
+ delegateYield: function (e, r, n) {
299
338
  return this.delegate = {
300
- iterator: values(iterable),
301
- resultName: resultName,
302
- nextLoc: nextLoc
303
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
339
+ iterator: values(e),
340
+ resultName: r,
341
+ nextLoc: n
342
+ }, "next" === this.method && (this.arg = t), y;
304
343
  }
305
- }, exports;
306
- }
307
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
308
- try {
309
- var info = gen[key](arg);
310
- var value = info.value;
311
- } catch (error) {
312
- reject(error);
313
- return;
314
- }
315
- if (info.done) {
316
- resolve(value);
317
- } else {
318
- Promise.resolve(value).then(_next, _throw);
319
- }
320
- }
321
- function _asyncToGenerator(fn) {
322
- return function () {
323
- var self = this,
324
- args = arguments;
325
- return new Promise(function (resolve, reject) {
326
- var gen = fn.apply(self, args);
327
- function _next(value) {
328
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
329
- }
330
- function _throw(err) {
331
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
332
- }
333
- _next(undefined);
334
- });
335
- };
336
- }
337
- function _extends() {
338
- _extends = Object.assign ? Object.assign.bind() : function (target) {
339
- for (var i = 1; i < arguments.length; i++) {
340
- var source = arguments[i];
341
- for (var key in source) {
342
- if (Object.prototype.hasOwnProperty.call(source, key)) {
343
- target[key] = source[key];
344
- }
345
- }
346
- }
347
- return target;
348
- };
349
- return _extends.apply(this, arguments);
344
+ }, e;
350
345
  }
351
346
 
352
347
  function assetToString(asset) {