varsnap 1.8.3 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/varsnap.js CHANGED
@@ -1,142 +1,857 @@
1
1
  /*
2
- * Varsnap.js v1.8.3
2
+ * Varsnap.js v1.8.4
3
3
  */
4
4
  (function(exports) {
5
- !function(e) {
6
- if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else {
7
- ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).varsnap = e();
5
+ !function(t) {
6
+ if ("object" == typeof exports && "undefined" != typeof module) module.exports = t(); else if ("function" == typeof define && define.amd) define([], t); else {
7
+ ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).varsnap = t();
8
8
  }
9
9
  }(function() {
10
- var e = function(e, t) {
10
+ var t, e, r, n = (t = function(t, r) {
11
+ (function(t) {
12
+ (function() {
13
+ "use strict";
14
+ function t(t) {
15
+ if (t > 2147483647) throw new RangeError('The value "' + t + '" is invalid for option "size"');
16
+ var e = new Uint8Array(t);
17
+ return e.__proto__ = n.prototype, e;
18
+ }
19
+ function n(t, e, r) {
20
+ if ("number" == typeof t) {
21
+ if ("string" == typeof e) throw new TypeError('The "string" argument must be of type string. Received type number');
22
+ return s(t);
23
+ }
24
+ return o(t, e, r);
25
+ }
26
+ function o(e, r, o) {
27
+ if ("string" == typeof e) return function(e, r) {
28
+ if ("string" == typeof r && "" !== r || (r = "utf8"),
29
+ !n.isEncoding(r)) throw new TypeError("Unknown encoding: " + r);
30
+ var o = 0 | f(e, r), i = t(o), s = i.write(e, r);
31
+ return s !== o && (i = i.slice(0, s)), i;
32
+ }(e, r);
33
+ if (ArrayBuffer.isView(e)) return a(e);
34
+ if (null == e) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
35
+ if (L(e, ArrayBuffer) || e && L(e.buffer, ArrayBuffer)) return function(t, e, r) {
36
+ if (e < 0 || t.byteLength < e) throw new RangeError('"offset" is outside of buffer bounds');
37
+ if (t.byteLength < e + (r || 0)) throw new RangeError('"length" is outside of buffer bounds');
38
+ var o;
39
+ return (o = void 0 === e && void 0 === r ? new Uint8Array(t) : void 0 === r ? new Uint8Array(t, e) : new Uint8Array(t, e, r)).__proto__ = n.prototype,
40
+ o;
41
+ }(e, r, o);
42
+ if ("number" == typeof e) throw new TypeError('The "value" argument must not be of type number. Received type number');
43
+ var i = e.valueOf && e.valueOf();
44
+ if (null != i && i !== e) return n.from(i, r, o);
45
+ var s = function(e) {
46
+ if (n.isBuffer(e)) {
47
+ var r = 0 | u(e.length), o = t(r);
48
+ return 0 === o.length || e.copy(o, 0, 0, r), o;
49
+ }
50
+ return void 0 !== e.length ? "number" != typeof e.length || I(e.length) ? t(0) : a(e) : "Buffer" === e.type && Array.isArray(e.data) ? a(e.data) : void 0;
51
+ }(e);
52
+ if (s) return s;
53
+ if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e[Symbol.toPrimitive]) return n.from(e[Symbol.toPrimitive]("string"), r, o);
54
+ throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
55
+ }
56
+ function i(t) {
57
+ if ("number" != typeof t) throw new TypeError('"size" argument must be of type number');
58
+ if (t < 0) throw new RangeError('The value "' + t + '" is invalid for option "size"');
59
+ }
60
+ function s(e) {
61
+ return i(e), t(e < 0 ? 0 : 0 | u(e));
62
+ }
63
+ function a(e) {
64
+ for (var r = e.length < 0 ? 0 : 0 | u(e.length), n = t(r), o = 0; o < r; o += 1) n[o] = 255 & e[o];
65
+ return n;
66
+ }
67
+ function u(t) {
68
+ if (t >= 2147483647) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + 2147483647..toString(16) + " bytes");
69
+ return 0 | t;
70
+ }
71
+ function f(t, e) {
72
+ if (n.isBuffer(t)) return t.length;
73
+ if (ArrayBuffer.isView(t) || L(t, ArrayBuffer)) return t.byteLength;
74
+ if ("string" != typeof t) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof t);
75
+ var r = t.length, o = arguments.length > 2 && !0 === arguments[2];
76
+ if (!o && 0 === r) return 0;
77
+ for (var i = !1; ;) switch (e) {
78
+ case "ascii":
79
+ case "latin1":
80
+ case "binary":
81
+ return r;
82
+
83
+ case "utf8":
84
+ case "utf-8":
85
+ return x(t).length;
86
+
87
+ case "ucs2":
88
+ case "ucs-2":
89
+ case "utf16le":
90
+ case "utf-16le":
91
+ return 2 * r;
92
+
93
+ case "hex":
94
+ return r >>> 1;
95
+
96
+ case "base64":
97
+ return P(t).length;
98
+
99
+ default:
100
+ if (i) return o ? -1 : x(t).length;
101
+ e = ("" + e).toLowerCase(), i = !0;
102
+ }
103
+ }
104
+ function c(t, e, r) {
105
+ var n = t[e];
106
+ t[e] = t[r], t[r] = n;
107
+ }
108
+ function l(t, e, r, o, i) {
109
+ if (0 === t.length) return -1;
110
+ if ("string" == typeof r ? (o = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648),
111
+ I(r = +r) && (r = i ? 0 : t.length - 1), r < 0 && (r = t.length + r),
112
+ r >= t.length) {
113
+ if (i) return -1;
114
+ r = t.length - 1;
115
+ } else if (r < 0) {
116
+ if (!i) return -1;
117
+ r = 0;
118
+ }
119
+ if ("string" == typeof e && (e = n.from(e, o)), n.isBuffer(e)) return 0 === e.length ? -1 : h(t, e, r, o, i);
120
+ if ("number" == typeof e) return e &= 255, "function" == typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(t, e, r) : Uint8Array.prototype.lastIndexOf.call(t, e, r) : h(t, [ e ], r, o, i);
121
+ throw new TypeError("val must be string, number or Buffer");
122
+ }
123
+ function h(t, e, r, n, o) {
124
+ var i, s = 1, a = t.length, u = e.length;
125
+ if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
126
+ if (t.length < 2 || e.length < 2) return -1;
127
+ s = 2, a /= 2, u /= 2, r /= 2;
128
+ }
129
+ function f(t, e) {
130
+ return 1 === s ? t[e] : t.readUInt16BE(e * s);
131
+ }
132
+ if (o) {
133
+ var c = -1;
134
+ for (i = r; i < a; i++) if (f(t, i) === f(e, -1 === c ? 0 : i - c)) {
135
+ if (-1 === c && (c = i), i - c + 1 === u) return c * s;
136
+ } else -1 !== c && (i -= i - c), c = -1;
137
+ } else for (r + u > a && (r = a - u), i = r; i >= 0; i--) {
138
+ for (var l = !0, h = 0; h < u; h++) if (f(t, i + h) !== f(e, h)) {
139
+ l = !1;
140
+ break;
141
+ }
142
+ if (l) return i;
143
+ }
144
+ return -1;
145
+ }
146
+ function p(t, e, r, n) {
147
+ r = Number(r) || 0;
148
+ var o = t.length - r;
149
+ n ? (n = Number(n)) > o && (n = o) : n = o;
150
+ var i = e.length;
151
+ n > i / 2 && (n = i / 2);
152
+ for (var s = 0; s < n; ++s) {
153
+ var a = parseInt(e.substr(2 * s, 2), 16);
154
+ if (I(a)) return s;
155
+ t[r + s] = a;
156
+ }
157
+ return s;
158
+ }
159
+ function d(t, e, r, n) {
160
+ return N(x(e, t.length - r), t, r, n);
161
+ }
162
+ function g(t, e, r, n) {
163
+ return N(function(t) {
164
+ for (var e = [], r = 0; r < t.length; ++r) e.push(255 & t.charCodeAt(r));
165
+ return e;
166
+ }(e), t, r, n);
167
+ }
168
+ function y(t, e, r, n) {
169
+ return g(t, e, r, n);
170
+ }
171
+ function v(t, e, r, n) {
172
+ return N(P(e), t, r, n);
173
+ }
174
+ function m(t, e, r, n) {
175
+ return N(function(t, e) {
176
+ for (var r, n, o, i = [], s = 0; s < t.length && !((e -= 2) < 0); ++s) n = (r = t.charCodeAt(s)) >> 8,
177
+ o = r % 256, i.push(o), i.push(n);
178
+ return i;
179
+ }(e, t.length - r), t, r, n);
180
+ }
181
+ function w(t, e, r) {
182
+ return 0 === e && r === t.length ? j.fromByteArray(t) : j.fromByteArray(t.slice(e, r));
183
+ }
184
+ function b(t, e, r) {
185
+ r = Math.min(t.length, r);
186
+ for (var n = [], o = e; o < r; ) {
187
+ var i, s, a, u, f = t[o], c = null, l = f > 239 ? 4 : f > 223 ? 3 : f > 191 ? 2 : 1;
188
+ if (o + l <= r) switch (l) {
189
+ case 1:
190
+ f < 128 && (c = f);
191
+ break;
192
+
193
+ case 2:
194
+ 128 == (192 & (i = t[o + 1])) && (u = (31 & f) << 6 | 63 & i) > 127 && (c = u);
195
+ break;
196
+
197
+ case 3:
198
+ i = t[o + 1], s = t[o + 2], 128 == (192 & i) && 128 == (192 & s) && (u = (15 & f) << 12 | (63 & i) << 6 | 63 & s) > 2047 && (u < 55296 || u > 57343) && (c = u);
199
+ break;
200
+
201
+ case 4:
202
+ i = t[o + 1], s = t[o + 2], a = t[o + 3], 128 == (192 & i) && 128 == (192 & s) && 128 == (192 & a) && (u = (15 & f) << 18 | (63 & i) << 12 | (63 & s) << 6 | 63 & a) > 65535 && u < 1114112 && (c = u);
203
+ }
204
+ null === c ? (c = 65533, l = 1) : c > 65535 && (c -= 65536,
205
+ n.push(c >>> 10 & 1023 | 55296), c = 56320 | 1023 & c),
206
+ n.push(c), o += l;
207
+ }
208
+ return function(t) {
209
+ var e = t.length;
210
+ if (e <= E) return String.fromCharCode.apply(String, t);
211
+ for (var r = "", n = 0; n < e; ) r += String.fromCharCode.apply(String, t.slice(n, n += E));
212
+ return r;
213
+ }(n);
214
+ }
215
+ r.Buffer = n, r.INSPECT_MAX_BYTES = 50, n.TYPED_ARRAY_SUPPORT = function() {
216
+ try {
217
+ var t = new Uint8Array(1);
218
+ return t.__proto__ = {
219
+ __proto__: Uint8Array.prototype,
220
+ foo: function() {
221
+ return 42;
222
+ }
223
+ }, 42 === t.foo();
224
+ } catch (e) {
225
+ return !1;
226
+ }
227
+ }(), n.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),
228
+ Object.defineProperty(n.prototype, "parent", {
229
+ enumerable: !0,
230
+ get: function() {
231
+ if (n.isBuffer(this)) return this.buffer;
232
+ }
233
+ }), Object.defineProperty(n.prototype, "offset", {
234
+ enumerable: !0,
235
+ get: function() {
236
+ if (n.isBuffer(this)) return this.byteOffset;
237
+ }
238
+ }), "undefined" != typeof Symbol && null != Symbol.species && n[Symbol.species] === n && Object.defineProperty(n, Symbol.species, {
239
+ value: null,
240
+ configurable: !0,
241
+ enumerable: !1,
242
+ writable: !1
243
+ }), n.poolSize = 8192, n.from = function(t, e, r) {
244
+ return o(t, e, r);
245
+ }, n.prototype.__proto__ = Uint8Array.prototype, n.__proto__ = Uint8Array,
246
+ n.alloc = function(e, r, n) {
247
+ return function(e, r, n) {
248
+ return i(e), e <= 0 ? t(e) : void 0 !== r ? "string" == typeof n ? t(e).fill(r, n) : t(e).fill(r) : t(e);
249
+ }(e, r, n);
250
+ }, n.allocUnsafe = function(t) {
251
+ return s(t);
252
+ }, n.allocUnsafeSlow = function(t) {
253
+ return s(t);
254
+ }, n.isBuffer = function(t) {
255
+ return null != t && !0 === t._isBuffer && t !== n.prototype;
256
+ }, n.compare = function(t, e) {
257
+ if (L(t, Uint8Array) && (t = n.from(t, t.offset, t.byteLength)),
258
+ L(e, Uint8Array) && (e = n.from(e, e.offset, e.byteLength)),
259
+ !n.isBuffer(t) || !n.isBuffer(e)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
260
+ if (t === e) return 0;
261
+ for (var r = t.length, o = e.length, i = 0, s = Math.min(r, o); i < s; ++i) if (t[i] !== e[i]) {
262
+ r = t[i], o = e[i];
263
+ break;
264
+ }
265
+ return r < o ? -1 : o < r ? 1 : 0;
266
+ }, n.isEncoding = function(t) {
267
+ switch (String(t).toLowerCase()) {
268
+ case "hex":
269
+ case "utf8":
270
+ case "utf-8":
271
+ case "ascii":
272
+ case "latin1":
273
+ case "binary":
274
+ case "base64":
275
+ case "ucs2":
276
+ case "ucs-2":
277
+ case "utf16le":
278
+ case "utf-16le":
279
+ return !0;
280
+
281
+ default:
282
+ return !1;
283
+ }
284
+ }, n.concat = function(t, e) {
285
+ if (!Array.isArray(t)) throw new TypeError('"list" argument must be an Array of Buffers');
286
+ if (0 === t.length) return n.alloc(0);
287
+ var r;
288
+ if (void 0 === e) for (e = 0, r = 0; r < t.length; ++r) e += t[r].length;
289
+ var o = n.allocUnsafe(e), i = 0;
290
+ for (r = 0; r < t.length; ++r) {
291
+ var s = t[r];
292
+ if (L(s, Uint8Array) && (s = n.from(s)), !n.isBuffer(s)) throw new TypeError('"list" argument must be an Array of Buffers');
293
+ s.copy(o, i), i += s.length;
294
+ }
295
+ return o;
296
+ }, n.byteLength = f, n.prototype._isBuffer = !0, n.prototype.swap16 = function() {
297
+ var t = this.length;
298
+ if (t % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
299
+ for (var e = 0; e < t; e += 2) c(this, e, e + 1);
300
+ return this;
301
+ }, n.prototype.swap32 = function() {
302
+ var t = this.length;
303
+ if (t % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
304
+ for (var e = 0; e < t; e += 4) c(this, e, e + 3), c(this, e + 1, e + 2);
305
+ return this;
306
+ }, n.prototype.swap64 = function() {
307
+ var t = this.length;
308
+ if (t % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
309
+ for (var e = 0; e < t; e += 8) c(this, e, e + 7), c(this, e + 1, e + 6),
310
+ c(this, e + 2, e + 5), c(this, e + 3, e + 4);
311
+ return this;
312
+ }, n.prototype.toString = function() {
313
+ var t = this.length;
314
+ return 0 === t ? "" : 0 === arguments.length ? b(this, 0, t) : function(t, e, r) {
315
+ var n = !1;
316
+ if ((void 0 === e || e < 0) && (e = 0), e > this.length) return "";
317
+ if ((void 0 === r || r > this.length) && (r = this.length),
318
+ r <= 0) return "";
319
+ if ((r >>>= 0) <= (e >>>= 0)) return "";
320
+ for (t || (t = "utf8"); ;) switch (t) {
321
+ case "hex":
322
+ return S(this, e, r);
323
+
324
+ case "utf8":
325
+ case "utf-8":
326
+ return b(this, e, r);
327
+
328
+ case "ascii":
329
+ return A(this, e, r);
330
+
331
+ case "latin1":
332
+ case "binary":
333
+ return T(this, e, r);
334
+
335
+ case "base64":
336
+ return w(this, e, r);
337
+
338
+ case "ucs2":
339
+ case "ucs-2":
340
+ case "utf16le":
341
+ case "utf-16le":
342
+ return _(this, e, r);
343
+
344
+ default:
345
+ if (n) throw new TypeError("Unknown encoding: " + t);
346
+ t = (t + "").toLowerCase(), n = !0;
347
+ }
348
+ }.apply(this, arguments);
349
+ }, n.prototype.toLocaleString = n.prototype.toString, n.prototype.equals = function(t) {
350
+ if (!n.isBuffer(t)) throw new TypeError("Argument must be a Buffer");
351
+ return this === t || 0 === n.compare(this, t);
352
+ }, n.prototype.inspect = function() {
353
+ var t = "", e = r.INSPECT_MAX_BYTES;
354
+ return t = this.toString("hex", 0, e).replace(/(.{2})/g, "$1 ").trim(),
355
+ this.length > e && (t += " ... "), "<Buffer " + t + ">";
356
+ }, n.prototype.compare = function(t, e, r, o, i) {
357
+ if (L(t, Uint8Array) && (t = n.from(t, t.offset, t.byteLength)),
358
+ !n.isBuffer(t)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t);
359
+ if (void 0 === e && (e = 0), void 0 === r && (r = t ? t.length : 0),
360
+ void 0 === o && (o = 0), void 0 === i && (i = this.length),
361
+ e < 0 || r > t.length || o < 0 || i > this.length) throw new RangeError("out of range index");
362
+ if (o >= i && e >= r) return 0;
363
+ if (o >= i) return -1;
364
+ if (e >= r) return 1;
365
+ if (this === t) return 0;
366
+ for (var s = (i >>>= 0) - (o >>>= 0), a = (r >>>= 0) - (e >>>= 0), u = Math.min(s, a), f = this.slice(o, i), c = t.slice(e, r), l = 0; l < u; ++l) if (f[l] !== c[l]) {
367
+ s = f[l], a = c[l];
368
+ break;
369
+ }
370
+ return s < a ? -1 : a < s ? 1 : 0;
371
+ }, n.prototype.includes = function(t, e, r) {
372
+ return -1 !== this.indexOf(t, e, r);
373
+ }, n.prototype.indexOf = function(t, e, r) {
374
+ return l(this, t, e, r, !0);
375
+ }, n.prototype.lastIndexOf = function(t, e, r) {
376
+ return l(this, t, e, r, !1);
377
+ }, n.prototype.write = function(t, e, r, n) {
378
+ if (void 0 === e) n = "utf8", r = this.length, e = 0; else if (void 0 === r && "string" == typeof e) n = e,
379
+ r = this.length, e = 0; else {
380
+ if (!isFinite(e)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
381
+ e >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r,
382
+ r = void 0);
383
+ }
384
+ var o = this.length - e;
385
+ if ((void 0 === r || r > o) && (r = o), t.length > 0 && (r < 0 || e < 0) || e > this.length) throw new RangeError("Attempt to write outside buffer bounds");
386
+ n || (n = "utf8");
387
+ for (var i = !1; ;) switch (n) {
388
+ case "hex":
389
+ return p(this, t, e, r);
390
+
391
+ case "utf8":
392
+ case "utf-8":
393
+ return d(this, t, e, r);
394
+
395
+ case "ascii":
396
+ return g(this, t, e, r);
397
+
398
+ case "latin1":
399
+ case "binary":
400
+ return y(this, t, e, r);
401
+
402
+ case "base64":
403
+ return v(this, t, e, r);
404
+
405
+ case "ucs2":
406
+ case "ucs-2":
407
+ case "utf16le":
408
+ case "utf-16le":
409
+ return m(this, t, e, r);
410
+
411
+ default:
412
+ if (i) throw new TypeError("Unknown encoding: " + n);
413
+ n = ("" + n).toLowerCase(), i = !0;
414
+ }
415
+ }, n.prototype.toJSON = function() {
416
+ return {
417
+ type: "Buffer",
418
+ data: Array.prototype.slice.call(this._arr || this, 0)
419
+ };
420
+ };
421
+ var E = 4096;
422
+ function A(t, e, r) {
423
+ var n = "";
424
+ r = Math.min(t.length, r);
425
+ for (var o = e; o < r; ++o) n += String.fromCharCode(127 & t[o]);
426
+ return n;
427
+ }
428
+ function T(t, e, r) {
429
+ var n = "";
430
+ r = Math.min(t.length, r);
431
+ for (var o = e; o < r; ++o) n += String.fromCharCode(t[o]);
432
+ return n;
433
+ }
434
+ function S(t, e, r) {
435
+ var n, o = t.length;
436
+ (!e || e < 0) && (e = 0), (!r || r < 0 || r > o) && (r = o);
437
+ for (var i = "", s = e; s < r; ++s) i += (n = t[s]) < 16 ? "0" + n.toString(16) : n.toString(16);
438
+ return i;
439
+ }
440
+ function _(t, e, r) {
441
+ for (var n = t.slice(e, r), o = "", i = 0; i < n.length; i += 2) o += String.fromCharCode(n[i] + 256 * n[i + 1]);
442
+ return o;
443
+ }
444
+ function R(t, e, r) {
445
+ if (t % 1 != 0 || t < 0) throw new RangeError("offset is not uint");
446
+ if (t + e > r) throw new RangeError("Trying to access beyond buffer length");
447
+ }
448
+ function O(t, e, r, o, i, s) {
449
+ if (!n.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
450
+ if (e > i || e < s) throw new RangeError('"value" argument is out of bounds');
451
+ if (r + o > t.length) throw new RangeError("Index out of range");
452
+ }
453
+ function C(t, e, r, n, o, i) {
454
+ if (r + n > t.length) throw new RangeError("Index out of range");
455
+ if (r < 0) throw new RangeError("Index out of range");
456
+ }
457
+ function B(t, e, r, n, o) {
458
+ return e = +e, r >>>= 0, o || C(t, 0, r, 4), q.write(t, e, r, n, 23, 4),
459
+ r + 4;
460
+ }
461
+ function U(t, e, r, n, o) {
462
+ return e = +e, r >>>= 0, o || C(t, 0, r, 8), q.write(t, e, r, n, 52, 8),
463
+ r + 8;
464
+ }
465
+ n.prototype.slice = function(t, e) {
466
+ var r = this.length;
467
+ (t = ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r),
468
+ (e = void 0 === e ? r : ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r),
469
+ e < t && (e = t);
470
+ var o = this.subarray(t, e);
471
+ return o.__proto__ = n.prototype, o;
472
+ }, n.prototype.readUIntLE = function(t, e, r) {
473
+ t >>>= 0, e >>>= 0, r || R(t, e, this.length);
474
+ for (var n = this[t], o = 1, i = 0; ++i < e && (o *= 256); ) n += this[t + i] * o;
475
+ return n;
476
+ }, n.prototype.readUIntBE = function(t, e, r) {
477
+ t >>>= 0, e >>>= 0, r || R(t, e, this.length);
478
+ for (var n = this[t + --e], o = 1; e > 0 && (o *= 256); ) n += this[t + --e] * o;
479
+ return n;
480
+ }, n.prototype.readUInt8 = function(t, e) {
481
+ return t >>>= 0, e || R(t, 1, this.length), this[t];
482
+ }, n.prototype.readUInt16LE = function(t, e) {
483
+ return t >>>= 0, e || R(t, 2, this.length), this[t] | this[t + 1] << 8;
484
+ }, n.prototype.readUInt16BE = function(t, e) {
485
+ return t >>>= 0, e || R(t, 2, this.length), this[t] << 8 | this[t + 1];
486
+ }, n.prototype.readUInt32LE = function(t, e) {
487
+ return t >>>= 0, e || R(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3];
488
+ }, n.prototype.readUInt32BE = function(t, e) {
489
+ return t >>>= 0, e || R(t, 4, this.length), 16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
490
+ }, n.prototype.readIntLE = function(t, e, r) {
491
+ t >>>= 0, e >>>= 0, r || R(t, e, this.length);
492
+ for (var n = this[t], o = 1, i = 0; ++i < e && (o *= 256); ) n += this[t + i] * o;
493
+ return n >= (o *= 128) && (n -= Math.pow(2, 8 * e)), n;
494
+ }, n.prototype.readIntBE = function(t, e, r) {
495
+ t >>>= 0, e >>>= 0, r || R(t, e, this.length);
496
+ for (var n = e, o = 1, i = this[t + --n]; n > 0 && (o *= 256); ) i += this[t + --n] * o;
497
+ return i >= (o *= 128) && (i -= Math.pow(2, 8 * e)), i;
498
+ }, n.prototype.readInt8 = function(t, e) {
499
+ return t >>>= 0, e || R(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t];
500
+ }, n.prototype.readInt16LE = function(t, e) {
501
+ t >>>= 0, e || R(t, 2, this.length);
502
+ var r = this[t] | this[t + 1] << 8;
503
+ return 32768 & r ? 4294901760 | r : r;
504
+ }, n.prototype.readInt16BE = function(t, e) {
505
+ t >>>= 0, e || R(t, 2, this.length);
506
+ var r = this[t + 1] | this[t] << 8;
507
+ return 32768 & r ? 4294901760 | r : r;
508
+ }, n.prototype.readInt32LE = function(t, e) {
509
+ return t >>>= 0, e || R(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
510
+ }, n.prototype.readInt32BE = function(t, e) {
511
+ return t >>>= 0, e || R(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
512
+ }, n.prototype.readFloatLE = function(t, e) {
513
+ return t >>>= 0, e || R(t, 4, this.length), q.read(this, t, !0, 23, 4);
514
+ }, n.prototype.readFloatBE = function(t, e) {
515
+ return t >>>= 0, e || R(t, 4, this.length), q.read(this, t, !1, 23, 4);
516
+ }, n.prototype.readDoubleLE = function(t, e) {
517
+ return t >>>= 0, e || R(t, 8, this.length), q.read(this, t, !0, 52, 8);
518
+ }, n.prototype.readDoubleBE = function(t, e) {
519
+ return t >>>= 0, e || R(t, 8, this.length), q.read(this, t, !1, 52, 8);
520
+ }, n.prototype.writeUIntLE = function(t, e, r, n) {
521
+ t = +t, e >>>= 0, r >>>= 0, n || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0);
522
+ var o = 1, i = 0;
523
+ for (this[e] = 255 & t; ++i < r && (o *= 256); ) this[e + i] = t / o & 255;
524
+ return e + r;
525
+ }, n.prototype.writeUIntBE = function(t, e, r, n) {
526
+ t = +t, e >>>= 0, r >>>= 0, n || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0);
527
+ var o = r - 1, i = 1;
528
+ for (this[e + o] = 255 & t; --o >= 0 && (i *= 256); ) this[e + o] = t / i & 255;
529
+ return e + r;
530
+ }, n.prototype.writeUInt8 = function(t, e, r) {
531
+ return t = +t, e >>>= 0, r || O(this, t, e, 1, 255, 0),
532
+ this[e] = 255 & t, e + 1;
533
+ }, n.prototype.writeUInt16LE = function(t, e, r) {
534
+ return t = +t, e >>>= 0, r || O(this, t, e, 2, 65535, 0),
535
+ this[e] = 255 & t, this[e + 1] = t >>> 8, e + 2;
536
+ }, n.prototype.writeUInt16BE = function(t, e, r) {
537
+ return t = +t, e >>>= 0, r || O(this, t, e, 2, 65535, 0),
538
+ this[e] = t >>> 8, this[e + 1] = 255 & t, e + 2;
539
+ }, n.prototype.writeUInt32LE = function(t, e, r) {
540
+ return t = +t, e >>>= 0, r || O(this, t, e, 4, 4294967295, 0),
541
+ this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8,
542
+ this[e] = 255 & t, e + 4;
543
+ }, n.prototype.writeUInt32BE = function(t, e, r) {
544
+ return t = +t, e >>>= 0, r || O(this, t, e, 4, 4294967295, 0),
545
+ this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8,
546
+ this[e + 3] = 255 & t, e + 4;
547
+ }, n.prototype.writeIntLE = function(t, e, r, n) {
548
+ if (t = +t, e >>>= 0, !n) {
549
+ var o = Math.pow(2, 8 * r - 1);
550
+ O(this, t, e, r, o - 1, -o);
551
+ }
552
+ var i = 0, s = 1, a = 0;
553
+ for (this[e] = 255 & t; ++i < r && (s *= 256); ) t < 0 && 0 === a && 0 !== this[e + i - 1] && (a = 1),
554
+ this[e + i] = (t / s >> 0) - a & 255;
555
+ return e + r;
556
+ }, n.prototype.writeIntBE = function(t, e, r, n) {
557
+ if (t = +t, e >>>= 0, !n) {
558
+ var o = Math.pow(2, 8 * r - 1);
559
+ O(this, t, e, r, o - 1, -o);
560
+ }
561
+ var i = r - 1, s = 1, a = 0;
562
+ for (this[e + i] = 255 & t; --i >= 0 && (s *= 256); ) t < 0 && 0 === a && 0 !== this[e + i + 1] && (a = 1),
563
+ this[e + i] = (t / s >> 0) - a & 255;
564
+ return e + r;
565
+ }, n.prototype.writeInt8 = function(t, e, r) {
566
+ return t = +t, e >>>= 0, r || O(this, t, e, 1, 127, -128),
567
+ t < 0 && (t = 255 + t + 1), this[e] = 255 & t, e + 1;
568
+ }, n.prototype.writeInt16LE = function(t, e, r) {
569
+ return t = +t, e >>>= 0, r || O(this, t, e, 2, 32767, -32768),
570
+ this[e] = 255 & t, this[e + 1] = t >>> 8, e + 2;
571
+ }, n.prototype.writeInt16BE = function(t, e, r) {
572
+ return t = +t, e >>>= 0, r || O(this, t, e, 2, 32767, -32768),
573
+ this[e] = t >>> 8, this[e + 1] = 255 & t, e + 2;
574
+ }, n.prototype.writeInt32LE = function(t, e, r) {
575
+ return t = +t, e >>>= 0, r || O(this, t, e, 4, 2147483647, -2147483648),
576
+ this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16,
577
+ this[e + 3] = t >>> 24, e + 4;
578
+ }, n.prototype.writeInt32BE = function(t, e, r) {
579
+ return t = +t, e >>>= 0, r || O(this, t, e, 4, 2147483647, -2147483648),
580
+ t < 0 && (t = 4294967295 + t + 1), this[e] = t >>> 24, this[e + 1] = t >>> 16,
581
+ this[e + 2] = t >>> 8, this[e + 3] = 255 & t, e + 4;
582
+ }, n.prototype.writeFloatLE = function(t, e, r) {
583
+ return B(this, t, e, !0, r);
584
+ }, n.prototype.writeFloatBE = function(t, e, r) {
585
+ return B(this, t, e, !1, r);
586
+ }, n.prototype.writeDoubleLE = function(t, e, r) {
587
+ return U(this, t, e, !0, r);
588
+ }, n.prototype.writeDoubleBE = function(t, e, r) {
589
+ return U(this, t, e, !1, r);
590
+ }, n.prototype.copy = function(t, e, r, o) {
591
+ if (!n.isBuffer(t)) throw new TypeError("argument should be a Buffer");
592
+ if (r || (r = 0), o || 0 === o || (o = this.length), e >= t.length && (e = t.length),
593
+ e || (e = 0), o > 0 && o < r && (o = r), o === r) return 0;
594
+ if (0 === t.length || 0 === this.length) return 0;
595
+ if (e < 0) throw new RangeError("targetStart out of bounds");
596
+ if (r < 0 || r >= this.length) throw new RangeError("Index out of range");
597
+ if (o < 0) throw new RangeError("sourceEnd out of bounds");
598
+ o > this.length && (o = this.length), t.length - e < o - r && (o = t.length - e + r);
599
+ var i = o - r;
600
+ if (this === t && "function" == typeof Uint8Array.prototype.copyWithin) this.copyWithin(e, r, o); else if (this === t && r < e && e < o) for (var s = i - 1; s >= 0; --s) t[s + e] = this[s + r]; else Uint8Array.prototype.set.call(t, this.subarray(r, o), e);
601
+ return i;
602
+ }, n.prototype.fill = function(t, e, r, o) {
603
+ if ("string" == typeof t) {
604
+ if ("string" == typeof e ? (o = e, e = 0, r = this.length) : "string" == typeof r && (o = r,
605
+ r = this.length), void 0 !== o && "string" != typeof o) throw new TypeError("encoding must be a string");
606
+ if ("string" == typeof o && !n.isEncoding(o)) throw new TypeError("Unknown encoding: " + o);
607
+ if (1 === t.length) {
608
+ var i = t.charCodeAt(0);
609
+ ("utf8" === o && i < 128 || "latin1" === o) && (t = i);
610
+ }
611
+ } else "number" == typeof t && (t &= 255);
612
+ if (e < 0 || this.length < e || this.length < r) throw new RangeError("Out of range index");
613
+ if (r <= e) return this;
614
+ var s;
615
+ if (e >>>= 0, r = void 0 === r ? this.length : r >>> 0,
616
+ t || (t = 0), "number" == typeof t) for (s = e; s < r; ++s) this[s] = t; else {
617
+ var a = n.isBuffer(t) ? t : n.from(t, o), u = a.length;
618
+ if (0 === u) throw new TypeError('The value "' + t + '" is invalid for argument "value"');
619
+ for (s = 0; s < r - e; ++s) this[s + e] = a[s % u];
620
+ }
621
+ return this;
622
+ };
623
+ var k = /[^+/0-9A-Za-z-_]/g;
624
+ function x(t, e) {
625
+ var r;
626
+ e = e || 1 / 0;
627
+ for (var n = t.length, o = null, i = [], s = 0; s < n; ++s) {
628
+ if ((r = t.charCodeAt(s)) > 55295 && r < 57344) {
629
+ if (!o) {
630
+ if (r > 56319) {
631
+ (e -= 3) > -1 && i.push(239, 191, 189);
632
+ continue;
633
+ }
634
+ if (s + 1 === n) {
635
+ (e -= 3) > -1 && i.push(239, 191, 189);
636
+ continue;
637
+ }
638
+ o = r;
639
+ continue;
640
+ }
641
+ if (r < 56320) {
642
+ (e -= 3) > -1 && i.push(239, 191, 189), o = r;
643
+ continue;
644
+ }
645
+ r = 65536 + (o - 55296 << 10 | r - 56320);
646
+ } else o && (e -= 3) > -1 && i.push(239, 191, 189);
647
+ if (o = null, r < 128) {
648
+ if ((e -= 1) < 0) break;
649
+ i.push(r);
650
+ } else if (r < 2048) {
651
+ if ((e -= 2) < 0) break;
652
+ i.push(r >> 6 | 192, 63 & r | 128);
653
+ } else if (r < 65536) {
654
+ if ((e -= 3) < 0) break;
655
+ i.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128);
656
+ } else {
657
+ if (!(r < 1114112)) throw new Error("Invalid code point");
658
+ if ((e -= 4) < 0) break;
659
+ i.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128);
660
+ }
661
+ }
662
+ return i;
663
+ }
664
+ function P(t) {
665
+ return j.toByteArray(function(t) {
666
+ if ((t = (t = t.split("=")[0]).trim().replace(k, "")).length < 2) return "";
667
+ for (;t.length % 4 != 0; ) t += "=";
668
+ return t;
669
+ }(t));
670
+ }
671
+ function N(t, e, r, n) {
672
+ for (var o = 0; o < n && !(o + r >= e.length || o >= t.length); ++o) e[o + r] = t[o];
673
+ return o;
674
+ }
675
+ function L(t, e) {
676
+ return t instanceof e || null != t && null != t.constructor && null != t.constructor.name && t.constructor.name === e.name;
677
+ }
678
+ function I(t) {
679
+ return t != t;
680
+ }
681
+ }).call(this);
682
+ }).call(this, n({}).Buffer);
683
+ }, function(r) {
684
+ return e || t(e = {
685
+ exports: {},
686
+ parent: r
687
+ }, e.exports), e.exports;
688
+ }), o = function(t, e) {
11
689
  return function() {
12
- for (var n = new Array(arguments.length), r = 0; r < n.length; r++) n[r] = arguments[r];
13
- return e.apply(t, n);
690
+ for (var r = new Array(arguments.length), n = 0; n < r.length; n++) r[n] = arguments[n];
691
+ return t.apply(e, r);
692
+ };
693
+ }, i = Object.prototype.toString, s = (r = Object.create(null), function(t) {
694
+ var e = i.call(t);
695
+ return r[e] || (r[e] = e.slice(8, -1).toLowerCase());
696
+ });
697
+ function a(t) {
698
+ return t = t.toLowerCase(), function(e) {
699
+ return s(e) === t;
14
700
  };
15
- }, t = Object.prototype.toString;
16
- function n(e) {
17
- return Array.isArray(e);
18
701
  }
19
- function r(e) {
20
- return void 0 === e;
702
+ function u(t) {
703
+ return Array.isArray(t);
21
704
  }
22
- function o(e) {
23
- return "[object ArrayBuffer]" === t.call(e);
705
+ function f(t) {
706
+ return void 0 === t;
24
707
  }
25
- function i(e) {
26
- return null !== e && "object" == typeof e;
708
+ var c = a("ArrayBuffer");
709
+ function l(t) {
710
+ return null !== t && "object" == typeof t;
27
711
  }
28
- function a(e) {
29
- if ("[object Object]" !== t.call(e)) return !1;
30
- var n = Object.getPrototypeOf(e);
31
- return null === n || n === Object.prototype;
712
+ function h(t) {
713
+ if ("object" !== s(t)) return !1;
714
+ var e = Object.getPrototypeOf(t);
715
+ return null === e || e === Object.prototype;
32
716
  }
33
- function s(e, t) {
34
- if (null != e) if ("object" != typeof e && (e = [ e ]), n(e)) for (var r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && t.call(null, e[i], i, e);
717
+ var p = a("Date"), d = a("File"), g = a("Blob"), y = a("FileList");
718
+ function v(t) {
719
+ return "[object Function]" === i.call(t);
35
720
  }
36
- var u = {
37
- isArray: n,
38
- isArrayBuffer: o,
39
- isBuffer: function(e) {
40
- return null !== e && !r(e) && null !== e.constructor && !r(e.constructor) && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e);
41
- },
42
- isFormData: function(e) {
43
- return "[object FormData]" === t.call(e);
44
- },
45
- isArrayBufferView: function(e) {
46
- return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && o(e.buffer);
47
- },
48
- isString: function(e) {
49
- return "string" == typeof e;
50
- },
51
- isNumber: function(e) {
52
- return "number" == typeof e;
721
+ var m = a("URLSearchParams");
722
+ function w(t, e) {
723
+ if (null != t) if ("object" != typeof t && (t = [ t ]), u(t)) for (var r = 0, n = t.length; r < n; r++) e.call(null, t[r], r, t); else for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.call(null, t[o], o, t);
724
+ }
725
+ var b, E = (b = "undefined" != typeof Uint8Array && Object.getPrototypeOf(Uint8Array),
726
+ function(t) {
727
+ return b && t instanceof b;
728
+ }), A = {
729
+ isArray: u,
730
+ isArrayBuffer: c,
731
+ isBuffer: function(t) {
732
+ return null !== t && !f(t) && null !== t.constructor && !f(t.constructor) && "function" == typeof t.constructor.isBuffer && t.constructor.isBuffer(t);
53
733
  },
54
- isObject: i,
55
- isPlainObject: a,
56
- isUndefined: r,
57
- isDate: function(e) {
58
- return "[object Date]" === t.call(e);
734
+ isFormData: function(t) {
735
+ return t && ("function" == typeof FormData && t instanceof FormData || "[object FormData]" === i.call(t) || v(t.toString) && "[object FormData]" === t.toString());
59
736
  },
60
- isFile: function(e) {
61
- return "[object File]" === t.call(e);
737
+ isArrayBufferView: function(t) {
738
+ return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && c(t.buffer);
62
739
  },
63
- isBlob: function(e) {
64
- return "[object Blob]" === t.call(e);
740
+ isString: function(t) {
741
+ return "string" == typeof t;
65
742
  },
66
- isStream: function(e) {
67
- return i(e) && function(e) {
68
- return "[object Function]" === t.call(e);
69
- }(e.pipe);
743
+ isNumber: function(t) {
744
+ return "number" == typeof t;
70
745
  },
71
- isURLSearchParams: function(e) {
72
- return "[object URLSearchParams]" === t.call(e);
746
+ isObject: l,
747
+ isPlainObject: h,
748
+ isUndefined: f,
749
+ isDate: p,
750
+ isFile: d,
751
+ isBlob: g,
752
+ isStream: function(t) {
753
+ return l(t) && v(t.pipe);
73
754
  },
755
+ isURLSearchParams: m,
74
756
  isStandardBrowserEnv: function() {
75
757
  return ("undefined" == typeof navigator || "ReactNative" !== navigator.product && "NativeScript" !== navigator.product && "NS" !== navigator.product) && "undefined" != typeof window && "undefined" != typeof document;
76
758
  },
77
- forEach: s,
78
- merge: function e() {
79
- var t = {};
80
- function r(r, o) {
81
- a(t[o]) && a(r) ? t[o] = e(t[o], r) : a(r) ? t[o] = e({}, r) : n(r) ? t[o] = r.slice() : t[o] = r;
759
+ forEach: w,
760
+ merge: function t() {
761
+ var e = {};
762
+ function r(r, n) {
763
+ h(e[n]) && h(r) ? e[n] = t(e[n], r) : h(r) ? e[n] = t({}, r) : u(r) ? e[n] = r.slice() : e[n] = r;
82
764
  }
83
- for (var o = 0, i = arguments.length; o < i; o++) s(arguments[o], r);
84
- return t;
765
+ for (var n = 0, o = arguments.length; n < o; n++) w(arguments[n], r);
766
+ return e;
85
767
  },
86
- extend: function(t, n, r) {
87
- return s(n, function(n, o) {
88
- t[o] = r && "function" == typeof n ? e(n, r) : n;
768
+ extend: function(t, e, r) {
769
+ return w(e, function(e, n) {
770
+ t[n] = r && "function" == typeof e ? o(e, r) : e;
89
771
  }), t;
90
772
  },
91
- trim: function(e) {
92
- return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
93
- }
773
+ trim: function(t) {
774
+ return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
775
+ },
776
+ inherits: function(t, e, r, n) {
777
+ t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t,
778
+ r && Object.assign(t.prototype, r);
779
+ },
780
+ toFlatObject: function(t, e, r) {
781
+ var n, o, i, s = {};
782
+ e = e || {};
783
+ do {
784
+ for (o = (n = Object.getOwnPropertyNames(t)).length; o-- > 0; ) s[i = n[o]] || (e[i] = t[i],
785
+ s[i] = !0);
786
+ t = Object.getPrototypeOf(t);
787
+ } while (t && (!r || r(t, e)) && t !== Object.prototype);
788
+ return e;
789
+ },
790
+ endsWith: function(t, e, r) {
791
+ t = String(t), (void 0 === r || r > t.length) && (r = t.length),
792
+ r -= e.length;
793
+ var n = t.indexOf(e, r);
794
+ return -1 !== n && n === r;
795
+ },
796
+ toArray: function(t) {
797
+ if (!t) return null;
798
+ var e = t.length;
799
+ if (f(e)) return null;
800
+ for (var r = new Array(e); e-- > 0; ) r[e] = t[e];
801
+ return r;
802
+ },
803
+ isTypedArray: E,
804
+ isFileList: y
94
805
  };
95
- function c(e) {
96
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
806
+ function T(t) {
807
+ return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
97
808
  }
98
- var f = function(e, t, n) {
99
- if (!t) return e;
100
- var r;
101
- if (n) r = n(t); else if (u.isURLSearchParams(t)) r = t.toString(); else {
809
+ var S = function(t, e, r) {
810
+ if (!e) return t;
811
+ var n;
812
+ if (r) n = r(e); else if (A.isURLSearchParams(e)) n = e.toString(); else {
102
813
  var o = [];
103
- u.forEach(t, function(e, t) {
104
- null != e && (u.isArray(e) ? t += "[]" : e = [ e ], u.forEach(e, function(e) {
105
- u.isDate(e) ? e = e.toISOString() : u.isObject(e) && (e = JSON.stringify(e)),
106
- o.push(c(t) + "=" + c(e));
814
+ A.forEach(e, function(t, e) {
815
+ null != t && (A.isArray(t) ? e += "[]" : t = [ t ], A.forEach(t, function(t) {
816
+ A.isDate(t) ? t = t.toISOString() : A.isObject(t) && (t = JSON.stringify(t)),
817
+ o.push(T(e) + "=" + T(t));
107
818
  }));
108
- }), r = o.join("&");
819
+ }), n = o.join("&");
109
820
  }
110
- if (r) {
111
- var i = e.indexOf("#");
112
- -1 !== i && (e = e.slice(0, i)), e += (-1 === e.indexOf("?") ? "?" : "&") + r;
821
+ if (n) {
822
+ var i = t.indexOf("#");
823
+ -1 !== i && (t = t.slice(0, i)), t += (-1 === t.indexOf("?") ? "?" : "&") + n;
113
824
  }
114
- return e;
115
- }, l = {};
116
- function p() {
825
+ return t;
826
+ }, _ = {};
827
+ function R() {
117
828
  this.handlers = [];
118
829
  }
119
- p.prototype.use = function(e, t, n) {
830
+ R.prototype.use = function(t, e, r) {
120
831
  return this.handlers.push({
121
- fulfilled: e,
122
- rejected: t,
123
- synchronous: !!n && n.synchronous,
124
- runWhen: n ? n.runWhen : null
832
+ fulfilled: t,
833
+ rejected: e,
834
+ synchronous: !!r && r.synchronous,
835
+ runWhen: r ? r.runWhen : null
125
836
  }), this.handlers.length - 1;
126
- }, p.prototype.eject = function(e) {
127
- this.handlers[e] && (this.handlers[e] = null);
128
- }, p.prototype.forEach = function(e) {
129
- u.forEach(this.handlers, function(t) {
130
- null !== t && e(t);
837
+ }, R.prototype.eject = function(t) {
838
+ this.handlers[t] && (this.handlers[t] = null);
839
+ }, R.prototype.forEach = function(t) {
840
+ A.forEach(this.handlers, function(e) {
841
+ null !== e && t(e);
131
842
  });
132
- }, l = p;
133
- var d = function(e, t) {
134
- u.forEach(e, function(n, r) {
135
- r !== t && r.toUpperCase() === t.toUpperCase() && (e[t] = n, delete e[r]);
843
+ }, _ = R;
844
+ var O = function(t, e) {
845
+ A.forEach(t, function(r, n) {
846
+ n !== e && n.toUpperCase() === e.toUpperCase() && (t[e] = r, delete t[n]);
136
847
  });
137
- }, h = function(e, t, n, r, o) {
138
- return e.config = t, n && (e.code = n), e.request = r, e.response = o,
139
- e.isAxiosError = !0, e.toJSON = function() {
848
+ }, C = {};
849
+ function B(t, e, r, n, o) {
850
+ Error.call(this), this.message = t, this.name = "AxiosError", e && (this.code = e),
851
+ r && (this.config = r), n && (this.request = n), o && (this.response = o);
852
+ }
853
+ A.inherits(B, Error, {
854
+ toJSON: function() {
140
855
  return {
141
856
  message: this.message,
142
857
  name: this.name,
@@ -150,27 +865,121 @@
150
865
  code: this.code,
151
866
  status: this.response && this.response.status ? this.response.status : null
152
867
  };
153
- }, e;
154
- }, g = {
868
+ }
869
+ });
870
+ var U = B.prototype, k = {};
871
+ [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED" ].forEach(function(t) {
872
+ k[t] = {
873
+ value: t
874
+ };
875
+ }), Object.defineProperties(B, k), Object.defineProperty(U, "isAxiosError", {
876
+ value: !0
877
+ }), B.from = function(t, e, r, n, o, i) {
878
+ var s = Object.create(U);
879
+ return A.toFlatObject(t, s, function(t) {
880
+ return t !== Error.prototype;
881
+ }), B.call(s, t.message, e, r, n, o), s.name = t.name, i && Object.assign(s, i),
882
+ s;
883
+ }, C = B;
884
+ for (var x = {
155
885
  silentJSONParsing: !0,
156
886
  forcedJSONParsing: !0,
157
887
  clarifyTimeoutError: !1
158
- }, m = function(e, t, n, r, o) {
159
- var i = new Error(e);
160
- return h(i, t, n, r, o);
161
- }, v = u.isStandardBrowserEnv() ? {
162
- write: function(e, t, n, r, o, i) {
163
- var a = [];
164
- a.push(e + "=" + encodeURIComponent(t)), u.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()),
165
- u.isString(r) && a.push("path=" + r), u.isString(o) && a.push("domain=" + o),
166
- !0 === i && a.push("secure"), document.cookie = a.join("; ");
888
+ }, j = {
889
+ toByteArray: function(t) {
890
+ var e, r, n = F(t), o = n[0], i = n[1], s = new L(function(t, e, r) {
891
+ return 3 * (e + r) / 4 - r;
892
+ }(0, o, i)), a = 0, u = i > 0 ? o - 4 : o;
893
+ for (r = 0; r < u; r += 4) e = N[t.charCodeAt(r)] << 18 | N[t.charCodeAt(r + 1)] << 12 | N[t.charCodeAt(r + 2)] << 6 | N[t.charCodeAt(r + 3)],
894
+ s[a++] = e >> 16 & 255, s[a++] = e >> 8 & 255, s[a++] = 255 & e;
895
+ return 2 === i && (e = N[t.charCodeAt(r)] << 2 | N[t.charCodeAt(r + 1)] >> 4,
896
+ s[a++] = 255 & e), 1 === i && (e = N[t.charCodeAt(r)] << 10 | N[t.charCodeAt(r + 1)] << 4 | N[t.charCodeAt(r + 2)] >> 2,
897
+ s[a++] = e >> 8 & 255, s[a++] = 255 & e), s;
167
898
  },
168
- read: function(e) {
169
- var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
170
- return t ? decodeURIComponent(t[3]) : null;
899
+ fromByteArray: function(t) {
900
+ for (var e, r = t.length, n = r % 3, o = [], i = 0, s = r - n; i < s; i += 16383) o.push(z(t, i, i + 16383 > s ? s : i + 16383));
901
+ return 1 === n ? (e = t[r - 1], o.push(P[e >> 2] + P[e << 4 & 63] + "==")) : 2 === n && (e = (t[r - 2] << 8) + t[r - 1],
902
+ o.push(P[e >> 10] + P[e >> 4 & 63] + P[e << 2 & 63] + "=")), o.join("");
903
+ }
904
+ }, P = [], N = [], L = "undefined" != typeof Uint8Array ? Uint8Array : Array, I = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", D = 0, M = I.length; D < M; ++D) P[D] = I[D],
905
+ N[I.charCodeAt(D)] = D;
906
+ function F(t) {
907
+ var e = t.length;
908
+ if (e % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
909
+ var r = t.indexOf("=");
910
+ return -1 === r && (r = e), [ r, r === e ? 0 : 4 - r % 4 ];
911
+ }
912
+ function z(t, e, r) {
913
+ for (var n, o, i = [], s = e; s < r; s += 3) n = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (255 & t[s + 2]),
914
+ i.push(P[(o = n) >> 18 & 63] + P[o >> 12 & 63] + P[o >> 6 & 63] + P[63 & o]);
915
+ return i.join("");
916
+ }
917
+ N["-".charCodeAt(0)] = 62, N["_".charCodeAt(0)] = 63;
918
+ var q = {
919
+ read: function(t, e, r, n, o) {
920
+ var i, s, a = 8 * o - n - 1, u = (1 << a) - 1, f = u >> 1, c = -7, l = r ? o - 1 : 0, h = r ? -1 : 1, p = t[e + l];
921
+ for (l += h, i = p & (1 << -c) - 1, p >>= -c, c += a; c > 0; i = 256 * i + t[e + l],
922
+ l += h, c -= 8);
923
+ for (s = i & (1 << -c) - 1, i >>= -c, c += n; c > 0; s = 256 * s + t[e + l],
924
+ l += h, c -= 8);
925
+ if (0 === i) i = 1 - f; else {
926
+ if (i === u) return s ? NaN : 1 / 0 * (p ? -1 : 1);
927
+ s += Math.pow(2, n), i -= f;
928
+ }
929
+ return (p ? -1 : 1) * s * Math.pow(2, i - n);
171
930
  },
172
- remove: function(e) {
173
- this.write(e, "", Date.now() - 864e5);
931
+ write: function(t, e, r, n, o, i) {
932
+ var s, a, u, f = 8 * i - o - 1, c = (1 << f) - 1, l = c >> 1, h = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : i - 1, d = n ? 1 : -1, g = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0;
933
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (a = isNaN(e) ? 1 : 0,
934
+ s = c) : (s = Math.floor(Math.log(e) / Math.LN2), e * (u = Math.pow(2, -s)) < 1 && (s--,
935
+ u *= 2), (e += s + l >= 1 ? h / u : h * Math.pow(2, 1 - l)) * u >= 2 && (s++,
936
+ u /= 2), s + l >= c ? (a = 0, s = c) : s + l >= 1 ? (a = (e * u - 1) * Math.pow(2, o),
937
+ s += l) : (a = e * Math.pow(2, l - 1) * Math.pow(2, o), s = 0)); o >= 8; t[r + p] = 255 & a,
938
+ p += d, a /= 256, o -= 8);
939
+ for (s = s << o | a, f += o; f > 0; t[r + p] = 255 & s, p += d,
940
+ s /= 256, f -= 8);
941
+ t[r + p - d] |= 128 * g;
942
+ }
943
+ }, V = {};
944
+ (function(t) {
945
+ (function() {
946
+ "use strict";
947
+ V = function(e, r) {
948
+ r = r || new FormData();
949
+ var n = [];
950
+ function o(e) {
951
+ return null === e ? "" : A.isDate(e) ? e.toISOString() : A.isArrayBuffer(e) || A.isTypedArray(e) ? "function" == typeof Blob ? new Blob([ e ]) : t.from(e) : e;
952
+ }
953
+ return function t(e, i) {
954
+ if (A.isPlainObject(e) || A.isArray(e)) {
955
+ if (-1 !== n.indexOf(e)) throw Error("Circular reference detected in " + i);
956
+ n.push(e), A.forEach(e, function(e, n) {
957
+ if (!A.isUndefined(e)) {
958
+ var s, a = i ? i + "." + n : n;
959
+ if (e && !i && "object" == typeof e) if (A.endsWith(n, "{}")) e = JSON.stringify(e); else if (A.endsWith(n, "[]") && (s = A.toArray(e))) return void s.forEach(function(t) {
960
+ !A.isUndefined(t) && r.append(a, o(t));
961
+ });
962
+ t(e, a);
963
+ }
964
+ }), n.pop();
965
+ } else r.append(i, o(e));
966
+ }(e), r;
967
+ };
968
+ }).call(this);
969
+ }).call(this, n({}).Buffer);
970
+ var J = A.isStandardBrowserEnv() ? {
971
+ write: function(t, e, r, n, o, i) {
972
+ var s = [];
973
+ s.push(t + "=" + encodeURIComponent(e)), A.isNumber(r) && s.push("expires=" + new Date(r).toGMTString()),
974
+ A.isString(n) && s.push("path=" + n), A.isString(o) && s.push("domain=" + o),
975
+ !0 === i && s.push("secure"), document.cookie = s.join("; ");
976
+ },
977
+ read: function(t) {
978
+ var e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
979
+ return e ? decodeURIComponent(e[3]) : null;
980
+ },
981
+ remove: function(t) {
982
+ this.write(t, "", Date.now() - 864e5);
174
983
  }
175
984
  } : {
176
985
  write: function() {},
@@ -178,233 +987,250 @@
178
987
  return null;
179
988
  },
180
989
  remove: function() {}
181
- }, y = [ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ], b = u.isStandardBrowserEnv() ? function() {
182
- var e, t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
183
- function r(e) {
184
- var r = e;
185
- return t && (n.setAttribute("href", r), r = n.href), n.setAttribute("href", r),
990
+ }, W = function(t, e) {
991
+ return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(t, e) {
992
+ return e ? t.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : t;
993
+ }(t, e) : e;
994
+ }, H = [ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ], Y = A.isStandardBrowserEnv() ? function() {
995
+ var t, e = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
996
+ function n(t) {
997
+ var n = t;
998
+ return e && (r.setAttribute("href", n), n = r.href), r.setAttribute("href", n),
186
999
  {
187
- href: n.href,
188
- protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
189
- host: n.host,
190
- search: n.search ? n.search.replace(/^\?/, "") : "",
191
- hash: n.hash ? n.hash.replace(/^#/, "") : "",
192
- hostname: n.hostname,
193
- port: n.port,
194
- pathname: "/" === n.pathname.charAt(0) ? n.pathname : "/" + n.pathname
1000
+ href: r.href,
1001
+ protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
1002
+ host: r.host,
1003
+ search: r.search ? r.search.replace(/^\?/, "") : "",
1004
+ hash: r.hash ? r.hash.replace(/^#/, "") : "",
1005
+ hostname: r.hostname,
1006
+ port: r.port,
1007
+ pathname: "/" === r.pathname.charAt(0) ? r.pathname : "/" + r.pathname
195
1008
  };
196
1009
  }
197
- return e = r(window.location.href), function(t) {
198
- var n = u.isString(t) ? r(t) : t;
199
- return n.protocol === e.protocol && n.host === e.host;
1010
+ return t = n(window.location.href), function(e) {
1011
+ var r = A.isString(e) ? n(e) : e;
1012
+ return r.protocol === t.protocol && r.host === t.host;
200
1013
  };
201
1014
  }() : function() {
202
1015
  return !0;
203
- }, w = {};
204
- function S(e) {
205
- this.message = e;
1016
+ }, X = {};
1017
+ function $(t) {
1018
+ C.call(this, null == t ? "canceled" : t, C.ERR_CANCELED), this.name = "CanceledError";
206
1019
  }
207
- S.prototype.toString = function() {
208
- return "Cancel" + (this.message ? ": " + this.message : "");
209
- }, S.prototype.__CANCEL__ = !0, w = S;
210
- var T, k, E, C = function(e) {
211
- return new Promise(function(t, n) {
212
- var r, o = e.data, i = e.headers, a = e.responseType;
213
- function s() {
214
- e.cancelToken && e.cancelToken.unsubscribe(r), e.signal && e.signal.removeEventListener("abort", r);
1020
+ A.inherits($, C, {
1021
+ __CANCEL__: !0
1022
+ }), X = $;
1023
+ var G, K, Q, Z = function(t) {
1024
+ return new Promise(function(e, r) {
1025
+ var n, o = t.data, i = t.headers, s = t.responseType;
1026
+ function a() {
1027
+ t.cancelToken && t.cancelToken.unsubscribe(n), t.signal && t.signal.removeEventListener("abort", n);
215
1028
  }
216
- u.isFormData(o) && delete i["Content-Type"];
217
- var c = new XMLHttpRequest();
218
- if (e.auth) {
219
- var l = e.auth.username || "", p = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
220
- i.Authorization = "Basic " + btoa(l + ":" + p);
1029
+ A.isFormData(o) && A.isStandardBrowserEnv() && delete i["Content-Type"];
1030
+ var u = new XMLHttpRequest();
1031
+ if (t.auth) {
1032
+ var f = t.auth.username || "", c = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : "";
1033
+ i.Authorization = "Basic " + btoa(f + ":" + c);
221
1034
  }
222
- var d, h, S = (d = e.baseURL, h = e.url, d && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(h) ? function(e, t) {
223
- return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
224
- }(d, h) : h);
225
- function T() {
226
- if (c) {
227
- var r = "getAllResponseHeaders" in c ? (o = c.getAllResponseHeaders(),
228
- p = {}, o ? (u.forEach(o.split("\n"), function(e) {
229
- if (l = e.indexOf(":"), i = u.trim(e.substr(0, l)).toLowerCase(),
230
- f = u.trim(e.substr(l + 1)), i) {
231
- if (p[i] && y.indexOf(i) >= 0) return;
232
- p[i] = "set-cookie" === i ? (p[i] ? p[i] : []).concat([ f ]) : p[i] ? p[i] + ", " + f : f;
233
- }
234
- }), p) : p) : null;
235
- (function(e, t, n) {
236
- var r = n.config.validateStatus;
237
- n.status && r && !r(n.status) ? t(m("Request failed with status code " + n.status, n.config, null, n.request, n)) : e(n);
238
- })(function(e) {
239
- t(e), s();
240
- }, function(e) {
241
- n(e), s();
1035
+ var l = W(t.baseURL, t.url);
1036
+ function h() {
1037
+ if (u) {
1038
+ var n = "getAllResponseHeaders" in u ? function(t) {
1039
+ var e, r, n, o = {};
1040
+ return t ? (A.forEach(t.split("\n"), function(t) {
1041
+ if (n = t.indexOf(":"), e = A.trim(t.substr(0, n)).toLowerCase(),
1042
+ r = A.trim(t.substr(n + 1)), e) {
1043
+ if (o[e] && H.indexOf(e) >= 0) return;
1044
+ o[e] = "set-cookie" === e ? (o[e] ? o[e] : []).concat([ r ]) : o[e] ? o[e] + ", " + r : r;
1045
+ }
1046
+ }), o) : o;
1047
+ }(u.getAllResponseHeaders()) : null;
1048
+ (function(t, e, r) {
1049
+ var n = r.config.validateStatus;
1050
+ r.status && n && !n(r.status) ? e(new C("Request failed with status code " + r.status, [ C.ERR_BAD_REQUEST, C.ERR_BAD_RESPONSE ][Math.floor(r.status / 100) - 4], r.config, r.request, r)) : t(r);
1051
+ })(function(t) {
1052
+ e(t), a();
1053
+ }, function(t) {
1054
+ r(t), a();
242
1055
  }, {
243
- data: a && "text" !== a && "json" !== a ? c.response : c.responseText,
244
- status: c.status,
245
- statusText: c.statusText,
246
- headers: r,
247
- config: e,
248
- request: c
249
- }), c = null;
1056
+ data: s && "text" !== s && "json" !== s ? u.response : u.responseText,
1057
+ status: u.status,
1058
+ statusText: u.statusText,
1059
+ headers: n,
1060
+ config: t,
1061
+ request: u
1062
+ }), u = null;
250
1063
  }
251
- var o, i, f, l, p;
252
1064
  }
253
- if (c.open(e.method.toUpperCase(), f(S, e.params, e.paramsSerializer), !0),
254
- c.timeout = e.timeout, "onloadend" in c ? c.onloadend = T : c.onreadystatechange = function() {
255
- c && 4 === c.readyState && (0 !== c.status || c.responseURL && 0 === c.responseURL.indexOf("file:")) && setTimeout(T);
256
- }, c.onabort = function() {
257
- c && (n(m("Request aborted", e, "ECONNABORTED", c)), c = null);
258
- }, c.onerror = function() {
259
- n(m("Network Error", e, null, c)), c = null;
260
- }, c.ontimeout = function() {
261
- var t = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded", r = e.transitional || g;
262
- e.timeoutErrorMessage && (t = e.timeoutErrorMessage), n(m(t, e, r.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", c)),
263
- c = null;
264
- }, u.isStandardBrowserEnv()) {
265
- var k = (e.withCredentials || b(S)) && e.xsrfCookieName ? v.read(e.xsrfCookieName) : void 0;
266
- k && (i[e.xsrfHeaderName] = k);
1065
+ if (u.open(t.method.toUpperCase(), S(l, t.params, t.paramsSerializer), !0),
1066
+ u.timeout = t.timeout, "onloadend" in u ? u.onloadend = h : u.onreadystatechange = function() {
1067
+ u && 4 === u.readyState && (0 !== u.status || u.responseURL && 0 === u.responseURL.indexOf("file:")) && setTimeout(h);
1068
+ }, u.onabort = function() {
1069
+ u && (r(new C("Request aborted", C.ECONNABORTED, t, u)), u = null);
1070
+ }, u.onerror = function() {
1071
+ r(new C("Network Error", C.ERR_NETWORK, t, u, u)), u = null;
1072
+ }, u.ontimeout = function() {
1073
+ var e = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded", n = t.transitional || x;
1074
+ t.timeoutErrorMessage && (e = t.timeoutErrorMessage), r(new C(e, n.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED, t, u)),
1075
+ u = null;
1076
+ }, A.isStandardBrowserEnv()) {
1077
+ var p = (t.withCredentials || Y(l)) && t.xsrfCookieName ? J.read(t.xsrfCookieName) : void 0;
1078
+ p && (i[t.xsrfHeaderName] = p);
267
1079
  }
268
- "setRequestHeader" in c && u.forEach(i, function(e, t) {
269
- void 0 === o && "content-type" === t.toLowerCase() ? delete i[t] : c.setRequestHeader(t, e);
270
- }), u.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials),
271
- a && "json" !== a && (c.responseType = e.responseType), "function" == typeof e.onDownloadProgress && c.addEventListener("progress", e.onDownloadProgress),
272
- "function" == typeof e.onUploadProgress && c.upload && c.upload.addEventListener("progress", e.onUploadProgress),
273
- (e.cancelToken || e.signal) && (r = function(e) {
274
- c && (n(!e || e && e.type ? new w("canceled") : e), c.abort(),
275
- c = null);
276
- }, e.cancelToken && e.cancelToken.subscribe(r), e.signal && (e.signal.aborted ? r() : e.signal.addEventListener("abort", r))),
277
- o || (o = null), c.send(o);
1080
+ "setRequestHeader" in u && A.forEach(i, function(t, e) {
1081
+ void 0 === o && "content-type" === e.toLowerCase() ? delete i[e] : u.setRequestHeader(e, t);
1082
+ }), A.isUndefined(t.withCredentials) || (u.withCredentials = !!t.withCredentials),
1083
+ s && "json" !== s && (u.responseType = t.responseType), "function" == typeof t.onDownloadProgress && u.addEventListener("progress", t.onDownloadProgress),
1084
+ "function" == typeof t.onUploadProgress && u.upload && u.upload.addEventListener("progress", t.onUploadProgress),
1085
+ (t.cancelToken || t.signal) && (n = function(t) {
1086
+ u && (r(!t || t && t.type ? new X() : t), u.abort(), u = null);
1087
+ }, t.cancelToken && t.cancelToken.subscribe(n), t.signal && (t.signal.aborted ? n() : t.signal.addEventListener("abort", n))),
1088
+ o || (o = null);
1089
+ var d, g = (d = /^([-+\w]{1,25})(:?\/\/|:)/.exec(l)) && d[1] || "";
1090
+ g && -1 === [ "http", "https", "file" ].indexOf(g) ? r(new C("Unsupported protocol " + g + ":", C.ERR_BAD_REQUEST, t)) : u.send(o);
278
1091
  });
279
- }, j = T = {};
280
- function O() {
1092
+ }, tt = G = {};
1093
+ function et() {
281
1094
  throw new Error("setTimeout has not been defined");
282
1095
  }
283
- function _() {
1096
+ function rt() {
284
1097
  throw new Error("clearTimeout has not been defined");
285
1098
  }
286
- function x(e) {
287
- if (k === setTimeout) return setTimeout(e, 0);
288
- if ((k === O || !k) && setTimeout) return k = setTimeout, setTimeout(e, 0);
1099
+ function nt(t) {
1100
+ if (K === setTimeout) return setTimeout(t, 0);
1101
+ if ((K === et || !K) && setTimeout) return K = setTimeout, setTimeout(t, 0);
289
1102
  try {
290
- return k(e, 0);
291
- } catch (t) {
1103
+ return K(t, 0);
1104
+ } catch (e) {
292
1105
  try {
293
- return k.call(null, e, 0);
294
- } catch (t) {
295
- return k.call(this, e, 0);
1106
+ return K.call(null, t, 0);
1107
+ } catch (e) {
1108
+ return K.call(this, t, 0);
296
1109
  }
297
1110
  }
298
1111
  }
299
1112
  !function() {
300
1113
  try {
301
- k = "function" == typeof setTimeout ? setTimeout : O;
1114
+ K = "function" == typeof setTimeout ? setTimeout : et;
302
1115
  } catch (e) {
303
- k = O;
1116
+ K = et;
304
1117
  }
305
1118
  try {
306
- E = "function" == typeof clearTimeout ? clearTimeout : _;
1119
+ Q = "function" == typeof clearTimeout ? clearTimeout : rt;
307
1120
  } catch (e) {
308
- E = _;
1121
+ Q = rt;
309
1122
  }
310
1123
  }();
311
- var P, A = [], N = !1, R = -1;
312
- function U() {
313
- N && P && (N = !1, P.length ? A = P.concat(A) : R = -1, A.length && L());
1124
+ var ot, it = [], st = !1, at = -1;
1125
+ function ut() {
1126
+ st && ot && (st = !1, ot.length ? it = ot.concat(it) : at = -1, it.length && ft());
314
1127
  }
315
- function L() {
316
- if (!N) {
317
- var e = x(U);
318
- N = !0;
319
- for (var t = A.length; t; ) {
320
- for (P = A, A = []; ++R < t; ) P && P[R].run();
321
- R = -1, t = A.length;
1128
+ function ft() {
1129
+ if (!st) {
1130
+ var t = nt(ut);
1131
+ st = !0;
1132
+ for (var r = it.length; r; ) {
1133
+ for (ot = it, it = []; ++at < r; ) ot && ot[at].run();
1134
+ at = -1, r = it.length;
322
1135
  }
323
- P = null, N = !1, function(e) {
324
- if (E === clearTimeout) return clearTimeout(e);
325
- if ((E === _ || !E) && clearTimeout) return E = clearTimeout,
326
- clearTimeout(e);
1136
+ ot = null, st = !1, function(t) {
1137
+ if (Q === clearTimeout) return clearTimeout(t);
1138
+ if ((Q === rt || !Q) && clearTimeout) return Q = clearTimeout,
1139
+ clearTimeout(t);
327
1140
  try {
328
- E(e);
329
- } catch (t) {
1141
+ Q(t);
1142
+ } catch (e) {
330
1143
  try {
331
- return E.call(null, e);
332
- } catch (t) {
333
- return E.call(this, e);
1144
+ return Q.call(null, t);
1145
+ } catch (e) {
1146
+ return Q.call(this, t);
334
1147
  }
335
1148
  }
336
- }(e);
1149
+ }(t);
337
1150
  }
338
1151
  }
339
- function B(e, t) {
340
- this.fun = e, this.array = t;
1152
+ function ct(t, e) {
1153
+ this.fun = t, this.array = e;
341
1154
  }
342
- function q() {}
343
- j.nextTick = function(e) {
344
- var t = new Array(arguments.length - 1);
345
- if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
346
- A.push(new B(e, t)), 1 !== A.length || N || x(L);
347
- }, B.prototype.run = function() {
1155
+ function lt() {}
1156
+ tt.nextTick = function(t) {
1157
+ var e = new Array(arguments.length - 1);
1158
+ if (arguments.length > 1) for (var r = 1; r < arguments.length; r++) e[r - 1] = arguments[r];
1159
+ it.push(new ct(t, e)), 1 !== it.length || st || nt(ft);
1160
+ }, ct.prototype.run = function() {
348
1161
  this.fun.apply(null, this.array);
349
- }, j.title = "browser", j.browser = !0, j.env = {}, j.argv = [], j.version = "",
350
- j.versions = {}, j.on = q, j.addListener = q, j.once = q, j.off = q, j.removeListener = q,
351
- j.removeAllListeners = q, j.emit = q, j.prependListener = q, j.prependOnceListener = q,
352
- j.listeners = function(e) {
1162
+ }, tt.title = "browser", tt.browser = !0, tt.env = {}, tt.argv = [], tt.version = "",
1163
+ tt.versions = {}, tt.on = lt, tt.addListener = lt, tt.once = lt, tt.off = lt,
1164
+ tt.removeListener = lt, tt.removeAllListeners = lt, tt.emit = lt, tt.prependListener = lt,
1165
+ tt.prependOnceListener = lt, tt.listeners = function(t) {
353
1166
  return [];
354
- }, j.binding = function(e) {
1167
+ }, tt.binding = function(t) {
355
1168
  throw new Error("process.binding is not supported");
356
- }, j.cwd = function() {
1169
+ }, tt.cwd = function() {
357
1170
  return "/";
358
- }, j.chdir = function(e) {
1171
+ }, tt.chdir = function(t) {
359
1172
  throw new Error("process.chdir is not supported");
360
- }, j.umask = function() {
1173
+ }, tt.umask = function() {
361
1174
  return 0;
362
1175
  };
363
- var z = {};
364
- (function(e) {
1176
+ var ht = {};
1177
+ (function(t) {
365
1178
  (function() {
366
1179
  "use strict";
367
- var t = {
1180
+ var r = {
368
1181
  "Content-Type": "application/x-www-form-urlencoded"
369
1182
  };
370
- function n(e, t) {
371
- !u.isUndefined(e) && u.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t);
1183
+ function n(t, e) {
1184
+ !A.isUndefined(t) && A.isUndefined(t["Content-Type"]) && (t["Content-Type"] = e);
372
1185
  }
373
- var r, o = {
374
- transitional: g,
375
- adapter: (("undefined" != typeof XMLHttpRequest || void 0 !== e && "[object process]" === Object.prototype.toString.call(e)) && (r = C),
376
- r),
377
- transformRequest: [ function(e, t) {
378
- return d(t, "Accept"), d(t, "Content-Type"), u.isFormData(e) || u.isArrayBuffer(e) || u.isBuffer(e) || u.isStream(e) || u.isFile(e) || u.isBlob(e) ? e : u.isArrayBufferView(e) ? e.buffer : u.isURLSearchParams(e) ? (n(t, "application/x-www-form-urlencoded;charset=utf-8"),
379
- e.toString()) : u.isObject(e) || t && "application/json" === t["Content-Type"] ? (n(t, "application/json"),
380
- function(e, t, n) {
381
- if (u.isString(e)) try {
382
- return (0, JSON.parse)(e), u.trim(e);
383
- } catch (r) {
384
- if ("SyntaxError" !== r.name) throw r;
1186
+ var o, i = {
1187
+ transitional: x,
1188
+ adapter: (("undefined" != typeof XMLHttpRequest || void 0 !== t && "[object process]" === Object.prototype.toString.call(t)) && (o = Z),
1189
+ o),
1190
+ transformRequest: [ function(t, r) {
1191
+ if (O(r, "Accept"), O(r, "Content-Type"), A.isFormData(t) || A.isArrayBuffer(t) || A.isBuffer(t) || A.isStream(t) || A.isFile(t) || A.isBlob(t)) return t;
1192
+ if (A.isArrayBufferView(t)) return t.buffer;
1193
+ if (A.isURLSearchParams(t)) return n(r, "application/x-www-form-urlencoded;charset=utf-8"),
1194
+ t.toString();
1195
+ var o, i = A.isObject(t), s = r && r["Content-Type"];
1196
+ if ((o = A.isFileList(t)) || i && "multipart/form-data" === s) {
1197
+ var a = this.env && this.env.FormData;
1198
+ return V(o ? {
1199
+ "files[]": t
1200
+ } : t, a && new a());
1201
+ }
1202
+ return i || "application/json" === s ? (n(r, "application/json"),
1203
+ function(t, r, n) {
1204
+ if (A.isString(t)) try {
1205
+ return (0, JSON.parse)(t), A.trim(t);
1206
+ } catch (e) {
1207
+ if ("SyntaxError" !== e.name) throw e;
385
1208
  }
386
- return (0, JSON.stringify)(e);
387
- }(e)) : e;
1209
+ return (0, JSON.stringify)(t);
1210
+ }(t)) : t;
388
1211
  } ],
389
- transformResponse: [ function(e) {
390
- var t = this.transitional || o.transitional, n = t && t.silentJSONParsing, r = t && t.forcedJSONParsing, i = !n && "json" === this.responseType;
391
- if (i || r && u.isString(e) && e.length) try {
392
- return JSON.parse(e);
393
- } catch (a) {
394
- if (i) {
395
- if ("SyntaxError" === a.name) throw h(a, this, "E_JSON_PARSE");
396
- throw a;
1212
+ transformResponse: [ function(t) {
1213
+ var r = this.transitional || i.transitional, n = r && r.silentJSONParsing, o = r && r.forcedJSONParsing, s = !n && "json" === this.responseType;
1214
+ if (s || o && A.isString(t) && t.length) try {
1215
+ return JSON.parse(t);
1216
+ } catch (e) {
1217
+ if (s) {
1218
+ if ("SyntaxError" === e.name) throw C.from(e, C.ERR_BAD_RESPONSE, this, null, this.response);
1219
+ throw e;
397
1220
  }
398
1221
  }
399
- return e;
1222
+ return t;
400
1223
  } ],
401
1224
  timeout: 0,
402
1225
  xsrfCookieName: "XSRF-TOKEN",
403
1226
  xsrfHeaderName: "X-XSRF-TOKEN",
404
1227
  maxContentLength: -1,
405
1228
  maxBodyLength: -1,
406
- validateStatus: function(e) {
407
- return e >= 200 && e < 300;
1229
+ env: {
1230
+ FormData: null
1231
+ },
1232
+ validateStatus: function(t) {
1233
+ return t >= 200 && t < 300;
408
1234
  },
409
1235
  headers: {
410
1236
  common: {
@@ -412,325 +1238,335 @@
412
1238
  }
413
1239
  }
414
1240
  };
415
- u.forEach([ "delete", "get", "head" ], function(e) {
416
- o.headers[e] = {};
417
- }), u.forEach([ "post", "put", "patch" ], function(e) {
418
- o.headers[e] = u.merge(t);
419
- }), z = o;
1241
+ A.forEach([ "delete", "get", "head" ], function(t) {
1242
+ i.headers[t] = {};
1243
+ }), A.forEach([ "post", "put", "patch" ], function(t) {
1244
+ i.headers[t] = A.merge(r);
1245
+ }), ht = i;
420
1246
  }).call(this);
421
- }).call(this, T);
422
- var D = function(e, t, n) {
423
- var r = this || z;
424
- return u.forEach(n, function(n) {
425
- e = n.call(r, e, t);
426
- }), e;
427
- }, J = function(e) {
428
- return !(!e || !e.__CANCEL__);
1247
+ }).call(this, G);
1248
+ var pt = function(t, e, r) {
1249
+ var n = this || ht;
1250
+ return A.forEach(r, function(r) {
1251
+ t = r.call(n, t, e);
1252
+ }), t;
1253
+ }, dt = function(t) {
1254
+ return !(!t || !t.__CANCEL__);
429
1255
  };
430
- function F(e) {
431
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new w("canceled");
1256
+ function gt(t) {
1257
+ if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new X();
432
1258
  }
433
- var I, V = function(e) {
434
- return F(e), e.headers = e.headers || {}, e.data = D.call(e, e.data, e.headers, e.transformRequest),
435
- e.headers = u.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers),
436
- u.forEach([ "delete", "get", "head", "post", "put", "patch", "common" ], function(t) {
437
- delete e.headers[t];
438
- }), (e.adapter || z.adapter)(e).then(function(t) {
439
- return F(e), t.data = D.call(e, t.data, t.headers, e.transformResponse),
440
- t;
441
- }, function(t) {
442
- return J(t) || (F(e), t && t.response && (t.response.data = D.call(e, t.response.data, t.response.headers, e.transformResponse))),
443
- Promise.reject(t);
1259
+ var yt, vt = function(t) {
1260
+ return gt(t), t.headers = t.headers || {}, t.data = pt.call(t, t.data, t.headers, t.transformRequest),
1261
+ t.headers = A.merge(t.headers.common || {}, t.headers[t.method] || {}, t.headers),
1262
+ A.forEach([ "delete", "get", "head", "post", "put", "patch", "common" ], function(e) {
1263
+ delete t.headers[e];
1264
+ }), (t.adapter || ht.adapter)(t).then(function(e) {
1265
+ return gt(t), e.data = pt.call(t, e.data, e.headers, t.transformResponse),
1266
+ e;
1267
+ }, function(e) {
1268
+ return dt(e) || (gt(t), e && e.response && (e.response.data = pt.call(t, e.response.data, e.response.headers, t.transformResponse))),
1269
+ Promise.reject(e);
444
1270
  });
445
- }, H = function(e, t) {
446
- t = t || {};
447
- var n = {};
448
- function r(e, t) {
449
- return u.isPlainObject(e) && u.isPlainObject(t) ? u.merge(e, t) : u.isPlainObject(t) ? u.merge({}, t) : u.isArray(t) ? t.slice() : t;
1271
+ }, mt = function(t, e) {
1272
+ e = e || {};
1273
+ var r = {};
1274
+ function n(t, e) {
1275
+ return A.isPlainObject(t) && A.isPlainObject(e) ? A.merge(t, e) : A.isPlainObject(e) ? A.merge({}, e) : A.isArray(e) ? e.slice() : e;
450
1276
  }
451
- function o(n) {
452
- return u.isUndefined(t[n]) ? u.isUndefined(e[n]) ? void 0 : r(void 0, e[n]) : r(e[n], t[n]);
1277
+ function o(r) {
1278
+ return A.isUndefined(e[r]) ? A.isUndefined(t[r]) ? void 0 : n(void 0, t[r]) : n(t[r], e[r]);
453
1279
  }
454
- function i(e) {
455
- if (!u.isUndefined(t[e])) return r(void 0, t[e]);
1280
+ function i(t) {
1281
+ if (!A.isUndefined(e[t])) return n(void 0, e[t]);
456
1282
  }
457
- function a(n) {
458
- return u.isUndefined(t[n]) ? u.isUndefined(e[n]) ? void 0 : r(void 0, e[n]) : r(void 0, t[n]);
1283
+ function s(r) {
1284
+ return A.isUndefined(e[r]) ? A.isUndefined(t[r]) ? void 0 : n(void 0, t[r]) : n(void 0, e[r]);
459
1285
  }
460
- function s(n) {
461
- return n in t ? r(e[n], t[n]) : n in e ? r(void 0, e[n]) : void 0;
1286
+ function a(r) {
1287
+ return r in e ? n(t[r], e[r]) : r in t ? n(void 0, t[r]) : void 0;
462
1288
  }
463
- var c = {
1289
+ var u = {
464
1290
  url: i,
465
1291
  method: i,
466
1292
  data: i,
467
- baseURL: a,
468
- transformRequest: a,
469
- transformResponse: a,
470
- paramsSerializer: a,
471
- timeout: a,
472
- timeoutMessage: a,
473
- withCredentials: a,
474
- adapter: a,
475
- responseType: a,
476
- xsrfCookieName: a,
477
- xsrfHeaderName: a,
478
- onUploadProgress: a,
479
- onDownloadProgress: a,
480
- decompress: a,
481
- maxContentLength: a,
482
- maxBodyLength: a,
483
- transport: a,
484
- httpAgent: a,
485
- httpsAgent: a,
486
- cancelToken: a,
487
- socketPath: a,
488
- responseEncoding: a,
489
- validateStatus: s
1293
+ baseURL: s,
1294
+ transformRequest: s,
1295
+ transformResponse: s,
1296
+ paramsSerializer: s,
1297
+ timeout: s,
1298
+ timeoutMessage: s,
1299
+ withCredentials: s,
1300
+ adapter: s,
1301
+ responseType: s,
1302
+ xsrfCookieName: s,
1303
+ xsrfHeaderName: s,
1304
+ onUploadProgress: s,
1305
+ onDownloadProgress: s,
1306
+ decompress: s,
1307
+ maxContentLength: s,
1308
+ maxBodyLength: s,
1309
+ beforeRedirect: s,
1310
+ transport: s,
1311
+ httpAgent: s,
1312
+ httpsAgent: s,
1313
+ cancelToken: s,
1314
+ socketPath: s,
1315
+ responseEncoding: s,
1316
+ validateStatus: a
490
1317
  };
491
- return u.forEach(Object.keys(e).concat(Object.keys(t)), function(e) {
492
- var t = c[e] || o, r = t(e);
493
- u.isUndefined(r) && t !== s || (n[e] = r);
494
- }), n;
495
- }, M = "0.26.1", $ = M, G = {};
496
- [ "object", "boolean", "number", "function", "string", "symbol" ].forEach(function(e, t) {
497
- G[e] = function(n) {
498
- return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1318
+ return A.forEach(Object.keys(t).concat(Object.keys(e)), function(t) {
1319
+ var e = u[t] || o, n = e(t);
1320
+ A.isUndefined(n) && e !== a || (r[t] = n);
1321
+ }), r;
1322
+ }, wt = "0.27.2", bt = wt, Et = {};
1323
+ [ "object", "boolean", "number", "function", "string", "symbol" ].forEach(function(t, e) {
1324
+ Et[t] = function(r) {
1325
+ return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
499
1326
  };
500
1327
  });
501
- var X = {};
502
- G.transitional = function(e, t, n) {
503
- function r(e, t) {
504
- return "[Axios v" + $ + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
1328
+ var At = {};
1329
+ Et.transitional = function(t, e, r) {
1330
+ function n(t, e) {
1331
+ return "[Axios v" + bt + "] Transitional option '" + t + "'" + e + (r ? ". " + r : "");
505
1332
  }
506
- return function(n, o, i) {
507
- if (!1 === e) throw new Error(r(o, " has been removed" + (t ? " in " + t : "")));
508
- return t && !X[o] && (X[o] = !0, console.warn(r(o, " has been deprecated since v" + t + " and will be removed in the near future"))),
509
- !e || e(n, o, i);
1333
+ return function(r, o, i) {
1334
+ if (!1 === t) throw new C(n(o, " has been removed" + (e ? " in " + e : "")), C.ERR_DEPRECATED);
1335
+ return e && !At[o] && (At[o] = !0, console.warn(n(o, " has been deprecated since v" + e + " and will be removed in the near future"))),
1336
+ !t || t(r, o, i);
510
1337
  };
511
1338
  };
512
- var W = {}, K = (I = {
513
- assertOptions: function(e, t, n) {
514
- if ("object" != typeof e) throw new TypeError("options must be an object");
515
- for (var r = Object.keys(e), o = r.length; o-- > 0; ) {
516
- var i = r[o], a = t[i];
517
- if (a) {
518
- var s = e[i], u = void 0 === s || a(s, i, e);
519
- if (!0 !== u) throw new TypeError("option " + i + " must be " + u);
520
- } else if (!0 !== n) throw Error("Unknown option " + i);
1339
+ var Tt = {}, St = (yt = {
1340
+ assertOptions: function(t, e, r) {
1341
+ if ("object" != typeof t) throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
1342
+ for (var n = Object.keys(t), o = n.length; o-- > 0; ) {
1343
+ var i = n[o], s = e[i];
1344
+ if (s) {
1345
+ var a = t[i], u = void 0 === a || s(a, i, t);
1346
+ if (!0 !== u) throw new C("option " + i + " must be " + u, C.ERR_BAD_OPTION_VALUE);
1347
+ } else if (!0 !== r) throw new C("Unknown option " + i, C.ERR_BAD_OPTION);
521
1348
  }
522
1349
  },
523
- validators: G
1350
+ validators: Et
524
1351
  }).validators;
525
- function Y(e) {
526
- this.defaults = e, this.interceptors = {
527
- request: new l(),
528
- response: new l()
1352
+ function _t(t) {
1353
+ this.defaults = t, this.interceptors = {
1354
+ request: new _(),
1355
+ response: new _()
529
1356
  };
530
1357
  }
531
- Y.prototype.request = function(e, t) {
532
- "string" == typeof e ? (t = t || {}).url = e : t = e || {}, (t = H(this.defaults, t)).method ? t.method = t.method.toLowerCase() : this.defaults.method ? t.method = this.defaults.method.toLowerCase() : t.method = "get";
533
- var n = t.transitional;
534
- void 0 !== n && I.assertOptions(n, {
535
- silentJSONParsing: K.transitional(K.boolean),
536
- forcedJSONParsing: K.transitional(K.boolean),
537
- clarifyTimeoutError: K.transitional(K.boolean)
1358
+ _t.prototype.request = function(t, e) {
1359
+ "string" == typeof t ? (e = e || {}).url = t : e = t || {}, (e = mt(this.defaults, e)).method ? e.method = e.method.toLowerCase() : this.defaults.method ? e.method = this.defaults.method.toLowerCase() : e.method = "get";
1360
+ var r = e.transitional;
1361
+ void 0 !== r && yt.assertOptions(r, {
1362
+ silentJSONParsing: St.transitional(St.boolean),
1363
+ forcedJSONParsing: St.transitional(St.boolean),
1364
+ clarifyTimeoutError: St.transitional(St.boolean)
538
1365
  }, !1);
539
- var r = [], o = !0;
540
- this.interceptors.request.forEach(function(e) {
541
- "function" == typeof e.runWhen && !1 === e.runWhen(t) || (o = o && e.synchronous,
542
- r.unshift(e.fulfilled, e.rejected));
1366
+ var n = [], o = !0;
1367
+ this.interceptors.request.forEach(function(t) {
1368
+ "function" == typeof t.runWhen && !1 === t.runWhen(e) || (o = o && t.synchronous,
1369
+ n.unshift(t.fulfilled, t.rejected));
543
1370
  });
544
- var i, a = [];
545
- if (this.interceptors.response.forEach(function(e) {
546
- a.push(e.fulfilled, e.rejected);
1371
+ var i, s = [];
1372
+ if (this.interceptors.response.forEach(function(t) {
1373
+ s.push(t.fulfilled, t.rejected);
547
1374
  }), !o) {
548
- var s = [ V, void 0 ];
549
- for (Array.prototype.unshift.apply(s, r), s = s.concat(a), i = Promise.resolve(t); s.length; ) i = i.then(s.shift(), s.shift());
1375
+ var a = [ vt, void 0 ];
1376
+ for (Array.prototype.unshift.apply(a, n), a = a.concat(s), i = Promise.resolve(e); a.length; ) i = i.then(a.shift(), a.shift());
550
1377
  return i;
551
1378
  }
552
- for (var u = t; r.length; ) {
553
- var c = r.shift(), f = r.shift();
1379
+ for (var u = e; n.length; ) {
1380
+ var f = n.shift(), c = n.shift();
554
1381
  try {
555
- u = c(u);
1382
+ u = f(u);
556
1383
  } catch (l) {
557
- f(l);
1384
+ c(l);
558
1385
  break;
559
1386
  }
560
1387
  }
561
1388
  try {
562
- i = V(u);
1389
+ i = vt(u);
563
1390
  } catch (l) {
564
1391
  return Promise.reject(l);
565
1392
  }
566
- for (;a.length; ) i = i.then(a.shift(), a.shift());
1393
+ for (;s.length; ) i = i.then(s.shift(), s.shift());
567
1394
  return i;
568
- }, Y.prototype.getUri = function(e) {
569
- return e = H(this.defaults, e), f(e.url, e.params, e.paramsSerializer).replace(/^\?/, "");
570
- }, u.forEach([ "delete", "get", "head", "options" ], function(e) {
571
- Y.prototype[e] = function(t, n) {
572
- return this.request(H(n || {}, {
573
- method: e,
574
- url: t,
575
- data: (n || {}).data
1395
+ }, _t.prototype.getUri = function(t) {
1396
+ t = mt(this.defaults, t);
1397
+ var e = W(t.baseURL, t.url);
1398
+ return S(e, t.params, t.paramsSerializer);
1399
+ }, A.forEach([ "delete", "get", "head", "options" ], function(t) {
1400
+ _t.prototype[t] = function(e, r) {
1401
+ return this.request(mt(r || {}, {
1402
+ method: t,
1403
+ url: e,
1404
+ data: (r || {}).data
576
1405
  }));
577
1406
  };
578
- }), u.forEach([ "post", "put", "patch" ], function(e) {
579
- Y.prototype[e] = function(t, n, r) {
580
- return this.request(H(r || {}, {
581
- method: e,
582
- url: t,
583
- data: n
584
- }));
585
- };
586
- }), W = Y;
587
- var Q;
588
- function Z(e) {
589
- if ("function" != typeof e) throw new TypeError("executor must be a function.");
590
- var t;
591
- this.promise = new Promise(function(e) {
592
- t = e;
1407
+ }), A.forEach([ "post", "put", "patch" ], function(t) {
1408
+ function e(e) {
1409
+ return function(r, n, o) {
1410
+ return this.request(mt(o || {}, {
1411
+ method: t,
1412
+ headers: e ? {
1413
+ "Content-Type": "multipart/form-data"
1414
+ } : {},
1415
+ url: r,
1416
+ data: n
1417
+ }));
1418
+ };
1419
+ }
1420
+ _t.prototype[t] = e(), _t.prototype[t + "Form"] = e(!0);
1421
+ }), Tt = _t;
1422
+ var Rt;
1423
+ function Ot(t) {
1424
+ if ("function" != typeof t) throw new TypeError("executor must be a function.");
1425
+ var e;
1426
+ this.promise = new Promise(function(t) {
1427
+ e = t;
593
1428
  });
594
- var n = this;
595
- this.promise.then(function(e) {
596
- if (n._listeners) {
597
- var t, r = n._listeners.length;
598
- for (t = 0; t < r; t++) n._listeners[t](e);
599
- n._listeners = null;
1429
+ var r = this;
1430
+ this.promise.then(function(t) {
1431
+ if (r._listeners) {
1432
+ var e, n = r._listeners.length;
1433
+ for (e = 0; e < n; e++) r._listeners[e](t);
1434
+ r._listeners = null;
600
1435
  }
601
- }), this.promise.then = function(e) {
602
- var t, r = new Promise(function(e) {
603
- n.subscribe(e), t = e;
604
- }).then(e);
605
- return r.cancel = function() {
606
- n.unsubscribe(t);
607
- }, r;
608
- }, e(function(e) {
609
- n.reason || (n.reason = new w(e), t(n.reason));
1436
+ }), this.promise.then = function(t) {
1437
+ var e, n = new Promise(function(t) {
1438
+ r.subscribe(t), e = t;
1439
+ }).then(t);
1440
+ return n.cancel = function() {
1441
+ r.unsubscribe(e);
1442
+ }, n;
1443
+ }, t(function(t) {
1444
+ r.reason || (r.reason = new X(t), e(r.reason));
610
1445
  });
611
1446
  }
612
- Z.prototype.throwIfRequested = function() {
1447
+ Ot.prototype.throwIfRequested = function() {
613
1448
  if (this.reason) throw this.reason;
614
- }, Z.prototype.subscribe = function(e) {
615
- this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [ e ];
616
- }, Z.prototype.unsubscribe = function(e) {
1449
+ }, Ot.prototype.subscribe = function(t) {
1450
+ this.reason ? t(this.reason) : this._listeners ? this._listeners.push(t) : this._listeners = [ t ];
1451
+ }, Ot.prototype.unsubscribe = function(t) {
617
1452
  if (this._listeners) {
618
- var t = this._listeners.indexOf(e);
619
- -1 !== t && this._listeners.splice(t, 1);
1453
+ var e = this._listeners.indexOf(t);
1454
+ -1 !== e && this._listeners.splice(e, 1);
620
1455
  }
621
- }, Z.source = function() {
622
- var e;
1456
+ }, Ot.source = function() {
1457
+ var t;
623
1458
  return {
624
- token: new Z(function(t) {
625
- e = t;
1459
+ token: new Ot(function(e) {
1460
+ t = e;
626
1461
  }),
627
- cancel: e
1462
+ cancel: t
628
1463
  };
629
- }, Q = Z;
630
- var ee = {}, te = function t(n) {
631
- var r = new W(n), o = e(W.prototype.request, r);
632
- return u.extend(o, W.prototype, r), u.extend(o, r), o.create = function(e) {
633
- return t(H(n, e));
634
- }, o;
635
- }(z);
636
- te.Axios = W, te.Cancel = w, te.CancelToken = Q, te.isCancel = J, te.VERSION = M,
637
- te.all = function(e) {
638
- return Promise.all(e);
639
- }, te.spread = function(e) {
640
- return function(t) {
641
- return e.apply(null, t);
1464
+ }, Rt = Ot;
1465
+ var Ct = {}, Bt = function t(e) {
1466
+ var r = new Tt(e), n = o(Tt.prototype.request, r);
1467
+ return A.extend(n, Tt.prototype, r), A.extend(n, r), n.create = function(r) {
1468
+ return t(mt(e, r));
1469
+ }, n;
1470
+ }(ht);
1471
+ Bt.Axios = Tt, Bt.CanceledError = X, Bt.CancelToken = Rt, Bt.isCancel = dt,
1472
+ Bt.VERSION = wt, Bt.toFormData = V, Bt.AxiosError = C, Bt.Cancel = Bt.CanceledError,
1473
+ Bt.all = function(t) {
1474
+ return Promise.all(t);
1475
+ }, Bt.spread = function(t) {
1476
+ return function(e) {
1477
+ return t.apply(null, e);
642
1478
  };
643
- }, te.isAxiosError = function(e) {
644
- return u.isObject(e) && !0 === e.isAxiosError;
645
- }, (ee = te).default = te;
646
- var ne = ee, re = {}, oe = {};
647
- return function(e) {
1479
+ }, Bt.isAxiosError = function(t) {
1480
+ return A.isObject(t) && !0 === t.isAxiosError;
1481
+ }, (Ct = Bt).default = Bt;
1482
+ var Ut = Ct, kt = {}, xt = {};
1483
+ return function(t) {
648
1484
  (function() {
649
1485
  "use strict";
650
- function t(e, t) {
651
- var r = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
652
- if (!r) {
653
- if (Array.isArray(e) || (r = n(e)) || t && e && "number" == typeof e.length) {
654
- r && (e = r);
1486
+ function e(t, e) {
1487
+ var n = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
1488
+ if (!n) {
1489
+ if (Array.isArray(t) || (n = r(t)) || e && t && "number" == typeof t.length) {
1490
+ n && (t = n);
655
1491
  var o = 0, i = function() {};
656
1492
  return {
657
1493
  s: i,
658
1494
  n: function() {
659
- return o >= e.length ? {
1495
+ return o >= t.length ? {
660
1496
  done: !0
661
1497
  } : {
662
1498
  done: !1,
663
- value: e[o++]
1499
+ value: t[o++]
664
1500
  };
665
1501
  },
666
- e: function(e) {
667
- throw e;
1502
+ e: function(t) {
1503
+ throw t;
668
1504
  },
669
1505
  f: i
670
1506
  };
671
1507
  }
672
1508
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
673
1509
  }
674
- var a, s = !0, u = !1;
1510
+ var s, a = !0, u = !1;
675
1511
  return {
676
1512
  s: function() {
677
- r = r.call(e);
1513
+ n = n.call(t);
678
1514
  },
679
1515
  n: function() {
680
- var e = r.next();
681
- return s = e.done, e;
1516
+ var t = n.next();
1517
+ return a = t.done, t;
682
1518
  },
683
- e: function(e) {
684
- u = !0, a = e;
1519
+ e: function(t) {
1520
+ u = !0, s = t;
685
1521
  },
686
1522
  f: function() {
687
1523
  try {
688
- s || null == r.return || r.return();
1524
+ a || null == n.return || n.return();
689
1525
  } finally {
690
- if (u) throw a;
1526
+ if (u) throw s;
691
1527
  }
692
1528
  }
693
1529
  };
694
1530
  }
695
- function n(e, t) {
696
- if (e) {
697
- if ("string" == typeof e) return r(e, t);
698
- var n = Object.prototype.toString.call(e).slice(8, -1);
699
- return "Object" === n && e.constructor && (n = e.constructor.name),
700
- "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(e, t) : void 0;
1531
+ function r(t, e) {
1532
+ if (t) {
1533
+ if ("string" == typeof t) return n(t, e);
1534
+ var r = Object.prototype.toString.call(t).slice(8, -1);
1535
+ return "Object" === r && t.constructor && (r = t.constructor.name),
1536
+ "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? n(t, e) : void 0;
701
1537
  }
702
1538
  }
703
- function r(e, t) {
704
- (null == t || t > e.length) && (t = e.length);
705
- for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
706
- return r;
1539
+ function n(t, e) {
1540
+ (null == e || e > t.length) && (e = t.length);
1541
+ for (var r = 0, n = new Array(e); r < e; r++) n[r] = t[r];
1542
+ return n;
707
1543
  }
708
- function o(e) {
709
- return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
710
- return typeof e;
711
- } : function(e) {
712
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
713
- })(e);
1544
+ function o(t) {
1545
+ return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1546
+ return typeof t;
1547
+ } : function(t) {
1548
+ return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1549
+ })(t);
714
1550
  }
715
- function i(e, t) {
716
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
1551
+ function i(t, e) {
1552
+ if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
717
1553
  }
718
- function a(e, t) {
719
- for (var n = 0; n < t.length; n++) {
720
- var r = t[n];
721
- r.enumerable = r.enumerable || !1, r.configurable = !0,
722
- "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1554
+ function s(t, e) {
1555
+ for (var r = 0; r < e.length; r++) {
1556
+ var n = e[r];
1557
+ n.enumerable = n.enumerable || !1, n.configurable = !0,
1558
+ "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
723
1559
  }
724
1560
  }
725
- function s(e, t, n) {
726
- return t && a(e.prototype, t), n && a(e, n), Object.defineProperty(e, "prototype", {
1561
+ function a(t, e, r) {
1562
+ return e && s(t.prototype, e), r && s(t, r), Object.defineProperty(t, "prototype", {
727
1563
  writable: !1
728
- }), e;
1564
+ }), t;
729
1565
  }
730
- Object.defineProperty(oe, "__esModule", {
1566
+ Object.defineProperty(xt, "__esModule", {
731
1567
  value: !0
732
- }), oe.varsnap = oe.clientName = oe.version = void 0;
733
- oe.version = "1.8.3", oe.clientName = "javascript." + oe.version;
1568
+ }), xt.varsnap = xt.clientName = xt.version = void 0;
1569
+ xt.version = "1.8.4", xt.clientName = "javascript." + xt.version;
734
1570
  var u = {
735
1571
  varsnap: !0,
736
1572
  env: "development",
@@ -738,162 +1574,162 @@
738
1574
  producerToken: "",
739
1575
  consumerToken: "",
740
1576
  logger: console
741
- }, c = [], f = [], l = function() {
742
- function t() {
743
- i(this, t);
1577
+ }, f = [], c = [], l = function() {
1578
+ function e() {
1579
+ i(this, e);
744
1580
  }
745
- return s(t, null, [ {
1581
+ return a(e, null, [ {
746
1582
  key: "getConfig",
747
- value: function(e, t) {
748
- if (!e) return "";
749
- var n = e[t];
750
- return n ? n = n.toString().toLowerCase() : "";
1583
+ value: function(t, e) {
1584
+ if (!t) return "";
1585
+ var r = t[e];
1586
+ return r ? r = r.toString().toLowerCase() : "";
751
1587
  }
752
1588
  }, {
753
1589
  key: "setConfig",
754
- value: function(e, t, n) {
755
- return "varsnap" === t && ("string" == typeof n && (n = "true" === n),
756
- e[t] = n), "env" !== t && "producerToken" !== t && "consumerToken" !== t && "branch" !== t || (e[t] = n),
757
- "logger" === t && (e[t] = n), e;
1590
+ value: function(t, e, r) {
1591
+ return "varsnap" === e && ("string" == typeof r && (r = "true" === r),
1592
+ t[e] = r), "env" !== e && "producerToken" !== e && "consumerToken" !== e && "branch" !== e || (t[e] = r),
1593
+ "logger" === e && (t[e] = r), t;
758
1594
  }
759
1595
  }, {
760
1596
  key: "getSignature",
761
- value: function(e, t) {
762
- var n = "";
763
- return n = "" !== t && void 0 !== t ? t : (n = (n = e.toString().split("{")[0]).replace(/^\s+|\s+$/g, "")).replace(/,\s+/g, ","),
764
- "javascript." + oe.version + "." + n;
1597
+ value: function(t, e) {
1598
+ var r = "";
1599
+ return r = "" !== e && void 0 !== e ? e : (r = (r = t.toString().split("{")[0]).replace(/^\s+|\s+$/g, "")).replace(/,\s+/g, ","),
1600
+ "javascript." + xt.version + "." + r;
765
1601
  }
766
1602
  }, {
767
1603
  key: "ajax",
768
- value: function(e, n) {
769
- var r = {
1604
+ value: function(t, r) {
1605
+ var n = {
770
1606
  method: "POST",
771
- url: e,
1607
+ url: t,
772
1608
  headers: {
773
1609
  "Content-Type": "application/x-www-form-urlencoded"
774
1610
  },
775
- data: new URLSearchParams(n).toString(),
1611
+ data: new URLSearchParams(r).toString(),
776
1612
  responseType: "json"
777
1613
  };
778
- return t.isNode() && r.headers && (r.headers["User-Agent"] = "varsnap.js"),
779
- (0, ne.default)(r).then(function(e) {
780
- return e.data;
781
- }).catch(function(e) {
782
- return e;
1614
+ return e.isNode() && n.headers && (n.headers["User-Agent"] = "varsnap.js"),
1615
+ (0, Ut.default)(n).then(function(t) {
1616
+ return t.data;
1617
+ }).catch(function(t) {
1618
+ return t;
783
1619
  });
784
1620
  }
785
1621
  }, {
786
1622
  key: "debug",
787
- value: function(e, t) {
788
- e.logger && e.logger.debug(t);
1623
+ value: function(t, e) {
1624
+ t.logger && t.logger.debug(e);
789
1625
  }
790
1626
  }, {
791
1627
  key: "log",
792
- value: function(e, t) {
793
- e.logger && e.logger.log(t);
1628
+ value: function(t, e) {
1629
+ t.logger && t.logger.log(e);
794
1630
  }
795
1631
  }, {
796
1632
  key: "error",
797
- value: function(e, t) {
798
- e.logger && e.logger.error(t);
1633
+ value: function(t, e) {
1634
+ t.logger && t.logger.error(e);
799
1635
  }
800
1636
  }, {
801
1637
  key: "resetProducers",
802
1638
  value: function() {
803
- c = [];
1639
+ f = [];
804
1640
  }
805
1641
  }, {
806
1642
  key: "resetConsumers",
807
1643
  value: function() {
808
- f = [];
1644
+ c = [];
809
1645
  }
810
1646
  }, {
811
1647
  key: "getProducers",
812
1648
  value: function() {
813
- return c;
1649
+ return f;
814
1650
  }
815
1651
  }, {
816
1652
  key: "getConsumers",
817
1653
  value: function() {
818
- return f;
1654
+ return c;
819
1655
  }
820
1656
  }, {
821
1657
  key: "limitString",
822
- value: function(e) {
823
- var t = String(e);
824
- return t.length <= 30 ? t : t.substring(0, 30 - "...".length) + "...";
1658
+ value: function(t) {
1659
+ var e = String(t);
1660
+ return e.length <= 30 ? e : e.substring(0, 30 - "...".length) + "...";
825
1661
  }
826
1662
  }, {
827
1663
  key: "isNode",
828
1664
  value: function() {
829
- return "object" === (void 0 === e ? "undefined" : o(e)) && "undefined" == typeof window;
1665
+ return "object" === (void 0 === t ? "undefined" : o(t)) && "undefined" == typeof window;
830
1666
  }
831
1667
  }, {
832
1668
  key: "getBranch",
833
- value: function(e) {
834
- var n = t.getConfig(e, "branch");
835
- return n ? new Promise(function(e) {
836
- return e(n);
837
- }) : t.isNode() ? new Promise(function(e) {
838
- (0, re.exec)("git rev-parse --abbrev-ref HEAD", function(t, n) {
839
- return e(n.trim());
1669
+ value: function(t) {
1670
+ var r = e.getConfig(t, "branch");
1671
+ return r ? new Promise(function(t) {
1672
+ return t(r);
1673
+ }) : e.isNode() ? new Promise(function(t) {
1674
+ (0, kt.exec)("git rev-parse --abbrev-ref HEAD", function(e, r) {
1675
+ return t(r.trim());
840
1676
  });
841
- }) : new Promise(function(e) {
842
- return e("");
1677
+ }) : new Promise(function(t) {
1678
+ return t("");
843
1679
  });
844
1680
  }
845
- } ]), t;
846
- }(), p = function() {
847
- function e(t, n, r) {
848
- i(this, e), this.targetFunc = t, this.signature = n, this.config = r;
1681
+ } ]), e;
1682
+ }(), h = function() {
1683
+ function t(e, r, n) {
1684
+ i(this, t), this.targetFunc = e, this.signature = r, this.config = n;
849
1685
  }
850
- return s(e, [ {
1686
+ return a(t, [ {
851
1687
  key: "isEnabled",
852
1688
  value: function() {
853
1689
  return !!this.config.varsnap && "production" === l.getConfig(this.config, "env") && !!l.getConfig(this.config, "producerToken");
854
1690
  }
855
1691
  }, {
856
1692
  key: "produce",
857
- value: function(t, n) {
858
- var r = this;
1693
+ value: function(e, r) {
1694
+ var n = this;
859
1695
  return this.isEnabled() ? (l.debug(this.config, "Sending call to Varsnap"),
860
- Promise.resolve(n).then(function(n) {
1696
+ Promise.resolve(r).then(function(r) {
861
1697
  var o = {
862
- producer_token: l.getConfig(r.config, "producerToken"),
863
- signature: r.signature,
864
- inputs: e.serialize(t),
865
- prod_outputs: e.serialize(n)
1698
+ producer_token: l.getConfig(n.config, "producerToken"),
1699
+ signature: n.signature,
1700
+ inputs: t.serialize(e),
1701
+ prod_outputs: t.serialize(r)
866
1702
  };
867
1703
  return l.ajax("https://www.varsnap.com/api/snap/produce/", o).then(function() {
868
1704
  return !0;
869
- }).catch(function(e) {
870
- if (e.response) {
871
- if (429 === e.response.status) return l.error(r.config, "Cannot produce to Varsnap; Signature at rate limit"),
1705
+ }).catch(function(t) {
1706
+ if (t.response) {
1707
+ if (429 === t.response.status) return l.error(n.config, "Cannot produce to Varsnap; Signature at rate limit"),
872
1708
  !0;
873
- 404 === e.response.status ? l.error(r.config, "Cannot produce to Varsnap; check your producer token") : l.error(r.config, e.response.statusText);
1709
+ 404 === t.response.status ? l.error(n.config, "Cannot produce to Varsnap; check your producer token") : l.error(n.config, t.response.statusText);
874
1710
  }
875
1711
  return !1;
876
1712
  });
877
- })) : new Promise(function(e) {
878
- return e(!1);
1713
+ })) : new Promise(function(t) {
1714
+ return t(!1);
879
1715
  });
880
1716
  }
881
1717
  } ], [ {
882
1718
  key: "serialize",
883
- value: function(e) {
884
- return JSON.stringify(e);
1719
+ value: function(t) {
1720
+ return JSON.stringify(t);
885
1721
  }
886
1722
  }, {
887
1723
  key: "serialize_formatted",
888
- value: function(e) {
889
- return JSON.stringify(e, null, 2);
1724
+ value: function(t) {
1725
+ return JSON.stringify(t, null, 2);
890
1726
  }
891
- } ]), e;
892
- }(), d = function() {
893
- function e(t, n, r) {
894
- i(this, e), this.targetFunc = t, this.signature = n, this.config = r;
1727
+ } ]), t;
1728
+ }(), p = function() {
1729
+ function t(e, r, n) {
1730
+ i(this, t), this.targetFunc = e, this.signature = r, this.config = n;
895
1731
  }
896
- return s(e, [ {
1732
+ return a(t, [ {
897
1733
  key: "isEnabled",
898
1734
  value: function() {
899
1735
  return !!this.config.varsnap && "development" === l.getConfig(this.config, "env") && !!l.getConfig(this.config, "consumerToken");
@@ -902,172 +1738,174 @@
902
1738
  key: "consume",
903
1739
  value: function(o) {
904
1740
  var i = this;
905
- if (!this.isEnabled()) return new Promise(function(e) {
1741
+ if (!this.isEnabled()) return new Promise(function(t) {
906
1742
  return l.error(i.config, "Varsnap not enabled for testing"),
907
- e(!1);
1743
+ t(!1);
908
1744
  });
909
- var a = {
1745
+ var s = {
910
1746
  consumer_token: l.getConfig(this.config, "consumerToken"),
911
1747
  signature: this.signature
912
1748
  };
913
- return l.ajax("https://www.varsnap.com/api/snap/consume/", a).then(function(s) {
914
- var u = s;
915
- if (!u || "ok" !== u.status) return [ new Promise(function(e) {
1749
+ return l.ajax("https://www.varsnap.com/api/snap/consume/", s).then(function(a) {
1750
+ var u = a;
1751
+ if (!u || "ok" !== u.status) return [ new Promise(function(t) {
916
1752
  return l.error(i.config, "Received error from Varsnap: " + u.status),
917
- e(!1);
1753
+ t(!1);
918
1754
  }) ];
919
- 0 === u.results.length && l.log(i.config, "No snaps found for signature: " + a.signature);
920
- var c, f = [], d = t(u.results);
1755
+ 0 === u.results.length && l.log(i.config, "No snaps found for signature: " + s.signature);
1756
+ var f, c = [], p = e(u.results);
921
1757
  try {
922
- var h = function() {
923
- var t, a = c.value, s = e.deserialize(a.inputs), u = e.deserialize(a.prod_outputs), l = void 0;
1758
+ var d = function() {
1759
+ var e, s = f.value, a = t.deserialize(s.inputs), u = t.deserialize(s.prod_outputs), l = void 0;
924
1760
  try {
925
- l = i.targetFunc.apply(i, function(e) {
926
- if (Array.isArray(e)) return r(e);
927
- }(t = s) || function(e) {
928
- if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
929
- }(t) || n(t) || function() {
1761
+ l = i.targetFunc.apply(i, function(t) {
1762
+ if (Array.isArray(t)) return n(t);
1763
+ }(e = a) || function(t) {
1764
+ if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1765
+ }(e) || r(e) || function() {
930
1766
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
931
1767
  }());
932
- } catch (h) {
933
- l = h;
1768
+ } catch (d) {
1769
+ l = d;
934
1770
  }
935
- var d = Promise.resolve(l).then(function(e) {
936
- var t = p.serialize(u) === p.serialize(e);
937
- return i.reportCentral(o, a, u, e, t).then(function(n) {
938
- i.reportLog(a.id, s, u, e, t, n);
939
- }), t;
1771
+ var p = Promise.resolve(l).then(function(t) {
1772
+ var e = h.serialize(u) === h.serialize(t);
1773
+ return i.reportCentral(o, s, u, t, e).then(function(r) {
1774
+ i.reportLog(s.id, a, u, t, e, r);
1775
+ }), e;
940
1776
  });
941
- f.push(d);
1777
+ c.push(p);
942
1778
  };
943
- for (d.s(); !(c = d.n()).done; ) h();
1779
+ for (p.s(); !(f = p.n()).done; ) d();
944
1780
  } catch (g) {
945
- d.e(g);
1781
+ p.e(g);
946
1782
  } finally {
947
- d.f();
1783
+ p.f();
948
1784
  }
949
- return i.reportTrialGroup(o), f;
950
- }).then(function(e) {
951
- return Promise.all(e).then(function(e) {
952
- return e.every(function(e) {
953
- return e;
1785
+ return c;
1786
+ }).then(function(t) {
1787
+ return Promise.all(t).then(function(t) {
1788
+ return t.every(function(t) {
1789
+ return t;
954
1790
  });
955
1791
  });
956
- }).catch(function(e) {
957
- return l.error(i.config, "Cannot contact Varsnap: " + e),
1792
+ }).catch(function(t) {
1793
+ return l.error(i.config, "Cannot contact Varsnap: " + t),
958
1794
  !1;
959
1795
  });
960
1796
  }
961
1797
  }, {
962
1798
  key: "reportCentral",
963
- value: function(e, t, n, r, o) {
964
- var i = this, a = {
965
- trial_group_id: e.trial_group_id,
1799
+ value: function(t, e, r, n, o) {
1800
+ var i = this, s = {
1801
+ trial_group_id: t.trial_group_id,
966
1802
  consumer_token: l.getConfig(this.config, "consumerToken"),
967
- snap_id: t.id,
968
- test_outputs: p.serialize(r),
1803
+ snap_id: e.id,
1804
+ test_outputs: h.serialize(n),
969
1805
  matches: o.toString(),
970
- snap_outputs_formatted: p.serialize_formatted(n),
971
- test_outputs_formatted: p.serialize_formatted(r)
1806
+ snap_outputs_formatted: h.serialize_formatted(r),
1807
+ test_outputs_formatted: h.serialize_formatted(n)
972
1808
  };
973
- return l.ajax("https://www.varsnap.com/api/trial/produce/", a).then(function(e) {
974
- var t = e;
975
- return !(!t || "ok" !== t.status) && t.trial_url;
976
- }).catch(function(e) {
977
- return l.error(i.config, "Cannot upload test results to Varsnap: " + e),
1809
+ return l.ajax("https://www.varsnap.com/api/trial/produce/", s).then(function(t) {
1810
+ var e = t;
1811
+ return !(!e || "ok" !== e.status) && e.trial_url;
1812
+ }).catch(function(t) {
1813
+ return l.error(i.config, "Cannot upload test results to Varsnap: " + t),
978
1814
  !1;
979
1815
  });
980
1816
  }
981
1817
  }, {
982
1818
  key: "reportLog",
983
- value: function(e, t, n, r, o, i) {
984
- l.log(this.config, ""), l.log(this.config, "Testing with Varsnap uuid: " + e),
985
- l.log(this.config, "Signature: " + this.signature),
986
- l.log(this.config, "Function input args: " + l.limitString(t)),
987
- l.log(this.config, "Production function outputs: " + l.limitString(n)),
988
- l.log(this.config, "Your function outputs: " + l.limitString(r)),
989
- l.log(this.config, "Matching outputs: " + o);
990
- var a = "Cannot upload trial";
991
- i && (a = String(i)), l.log(this.config, "Trial URL: " + a);
1819
+ value: function(t, e, r, n, o, i) {
1820
+ if (!o) {
1821
+ l.log(this.config, ""), l.log(this.config, "Testing with Varsnap uuid: " + t),
1822
+ l.log(this.config, "Signature: " + this.signature),
1823
+ l.log(this.config, "Function input args: " + l.limitString(e)),
1824
+ l.log(this.config, "Production function outputs: " + l.limitString(r)),
1825
+ l.log(this.config, "Your function outputs: " + l.limitString(n)),
1826
+ l.log(this.config, "Matching outputs: " + o);
1827
+ var s = "Cannot upload trial";
1828
+ i && (s = String(i)), l.log(this.config, "Trial URL: " + s);
1829
+ }
992
1830
  }
993
1831
  }, {
994
1832
  key: "reportTrialGroup",
995
- value: function(e) {
996
- l.log(this.config, "Trial Group: " + e.trial_group_url);
1833
+ value: function(t) {
1834
+ l.log(this.config, "Trial Group: " + t.trial_group_url);
997
1835
  }
998
1836
  } ], [ {
999
1837
  key: "deserialize",
1000
- value: function(e) {
1001
- if ("" !== e) return JSON.parse(e);
1838
+ value: function(t) {
1839
+ if ("" !== t) return JSON.parse(t);
1002
1840
  }
1003
- } ]), e;
1841
+ } ]), t;
1004
1842
  }();
1005
- function h(e, t) {
1006
- void 0 === t && (t = "");
1007
- var n = l.getSignature(e, t), r = new p(e, n, h._config), o = new d(e, n, h._config), i = function() {
1008
- for (var t, n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
1843
+ function d(t, e) {
1844
+ void 0 === e && (e = "");
1845
+ var r = l.getSignature(t, e), n = new h(t, r, d._config), o = new p(t, r, d._config), i = function() {
1846
+ for (var e, r = arguments.length, o = new Array(r), i = 0; i < r; i++) o[i] = arguments[i];
1009
1847
  try {
1010
- t = e.apply(void 0, o);
1011
- } catch (a) {
1012
- throw r.produce(o, a), a;
1848
+ e = t.apply(void 0, o);
1849
+ } catch (s) {
1850
+ throw n.produce(o, s), s;
1013
1851
  }
1014
- return r.produce(o, t), t;
1852
+ return n.produce(o, e), e;
1015
1853
  };
1016
- return i.producer = r, i.consumer = o, i.signature = n, c.push(r),
1017
- f.push(o), i;
1854
+ return i.producer = n, i.consumer = o, i.signature = r, f.push(n),
1855
+ c.push(o), i;
1018
1856
  }
1019
1857
  function g() {
1020
- var e, n = l.getConsumers();
1021
- return 0 === n.length ? Promise.resolve(!0) : (e = n[0].config,
1022
- l.getBranch(e).then(function(t) {
1858
+ var t, r = l.getConsumers();
1859
+ return 0 === r.length ? Promise.resolve(!0) : (t = r[0].config,
1860
+ l.getBranch(t).then(function(e) {
1023
1861
  return {
1024
- branch: t,
1025
- consumer_token: l.getConfig(e, "consumerToken"),
1026
- client: oe.clientName
1862
+ branch: e,
1863
+ consumer_token: l.getConfig(t, "consumerToken"),
1864
+ client: xt.clientName
1027
1865
  };
1028
- }).then(function(e) {
1029
- var t = e;
1030
- return l.ajax("https://www.varsnap.com/api/trial_group/", t);
1031
- }).then(function(e) {
1032
- return e;
1033
- }).catch(function(t) {
1034
- var n;
1035
- return n = t && t.response && t.response.data && t.response.data.error ? t.response.data.error : t.toString(),
1036
- l.error(e, "Cannot generate a new Trial Group: " + n), {
1866
+ }).then(function(t) {
1867
+ var e = t;
1868
+ return l.ajax("https://www.varsnap.com/api/trial_group/", e);
1869
+ }).then(function(t) {
1870
+ return t;
1871
+ }).catch(function(e) {
1872
+ var r;
1873
+ return r = e && e.response && e.response.data ? e.response.data.error : e.toString(),
1874
+ l.error(t, "Cannot generate a new Trial Group: " + r), {
1037
1875
  status: "not ok",
1038
1876
  project_id: "",
1039
1877
  trial_group_id: "",
1040
1878
  trial_group_url: ""
1041
1879
  };
1042
- })).then(function(e) {
1043
- var r, o = [], i = t(n);
1880
+ })).then(function(t) {
1881
+ var n, o = [], i = e(r);
1044
1882
  try {
1045
- for (i.s(); !(r = i.n()).done; ) {
1046
- var a = r.value.consume(e);
1047
- o.push(a);
1883
+ for (i.s(); !(n = i.n()).done; ) {
1884
+ var s = n.value.consume(t);
1885
+ o.push(s);
1048
1886
  }
1049
- } catch (s) {
1050
- i.e(s);
1887
+ } catch (a) {
1888
+ i.e(a);
1051
1889
  } finally {
1052
1890
  i.f();
1053
1891
  }
1054
- return Promise.all(o);
1055
- }).then(function(e) {
1056
- return e.every(function(e) {
1057
- return e;
1892
+ return r.length > 0 && r[0].reportTrialGroup(t), Promise.all(o);
1893
+ }).then(function(t) {
1894
+ return t.every(function(t) {
1895
+ return t;
1058
1896
  });
1059
1897
  });
1060
1898
  }
1061
- oe.varsnap = h, h._config = u, h.updateConfig = function(e) {
1062
- for (var t = h._config, n = 0, r = Object.keys(h._config); n < r.length; n++) {
1063
- var o = r[n];
1064
- Object.prototype.hasOwnProperty.call(e, o) && (t = l.setConfig(t, o, e[o]));
1899
+ xt.varsnap = d, d._config = u, d.updateConfig = function(t) {
1900
+ for (var e = d._config, r = 0, n = Object.keys(d._config); r < n.length; r++) {
1901
+ var o = n[r];
1902
+ Object.prototype.hasOwnProperty.call(t, o) && (e = l.setConfig(e, o, t[o]));
1065
1903
  }
1066
- h._config = t;
1067
- }, h.reset = function() {
1904
+ d._config = e;
1905
+ }, d.reset = function() {
1068
1906
  l.resetConsumers(), l.resetProducers();
1069
- }, h.version = oe.version, h.runTests = g;
1907
+ }, d.version = xt.version, d.runTests = g;
1070
1908
  }).call(this);
1071
- }.call(this, T), oe.varsnap;
1909
+ }.call(this, G), xt.varsnap;
1072
1910
  });
1073
1911
  })(typeof Varsnap == "undefined" ? Varsnap = {} : Varsnap);