Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ! function t(e, n, r) {
- function i(s, a) {
- if (!n[s]) {
- if (!e[s]) {
- var u = "function" == typeof require && require;
- if (!a && u) return u(s, !0);
- if (o) return o(s, !0);
- var c = new Error("Cannot find module '" + s + "'");
- throw c.code = "MODULE_NOT_FOUND", c
- }
- var l = n[s] = {
- exports: {}
- };
- e[s][0].call(l.exports, function(t) {
- var n = e[s][1][t];
- return i(n ? n : t)
- }, l, l.exports, t, e, n, r)
- }
- return n[s].exports
- }
- for (var o = "function" == typeof require && require, s = 0; s < r.length; s++) i(r[s]);
- return i
- }({
- 1: [function(t, e, n) {
- "use strict";
- function r() {
- for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = 0, n = t.length; n > e; ++e) u[e] = t[e], c[t.charCodeAt(e)] = e;
- c["-".charCodeAt(0)] = 62, c["_".charCodeAt(0)] = 63
- }
- function i(t) {
- var e, n, r, i, o, s, a = t.length;
- if (a % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
- o = "=" === t[a - 2] ? 2 : "=" === t[a - 1] ? 1 : 0, s = new l(3 * a / 4 - o), r = o > 0 ? a - 4 : a;
- var u = 0;
- for (e = 0, n = 0; r > e; e += 4, n += 3) i = c[t.charCodeAt(e)] << 18 | c[t.charCodeAt(e + 1)] << 12 | c[t.charCodeAt(e + 2)] << 6 | c[t.charCodeAt(e + 3)], s[u++] = i >> 16 & 255, s[u++] = i >> 8 & 255, s[u++] = 255 & i;
- return 2 === o ? (i = c[t.charCodeAt(e)] << 2 | c[t.charCodeAt(e + 1)] >> 4, s[u++] = 255 & i) : 1 === o && (i = c[t.charCodeAt(e)] << 10 | c[t.charCodeAt(e + 1)] << 4 | c[t.charCodeAt(e + 2)] >> 2, s[u++] = i >> 8 & 255, s[u++] = 255 & i), s
- }
- function o(t) {
- return u[t >> 18 & 63] + u[t >> 12 & 63] + u[t >> 6 & 63] + u[63 & t]
- }
- function s(t, e, n) {
- for (var r, i = [], s = e; n > s; s += 3) r = (t[s] << 16) + (t[s + 1] << 8) + t[s + 2], i.push(o(r));
- return i.join("")
- }
- function a(t) {
- for (var e, n = t.length, r = n % 3, i = "", o = [], a = 16383, c = 0, l = n - r; l > c; c += a) o.push(s(t, c, c + a > l ? l : c + a));
- return 1 === r ? (e = t[n - 1], i += u[e >> 2], i += u[e << 4 & 63], i += "==") : 2 === r && (e = (t[n - 2] << 8) + t[n - 1], i += u[e >> 10], i += u[e >> 4 & 63], i += u[e << 2 & 63], i += "="), o.push(i), o.join("")
- }
- n.toByteArray = i, n.fromByteArray = a;
- var u = [],
- c = [],
- l = "undefined" != typeof Uint8Array ? Uint8Array : Array;
- r()
- }, {}],
- 2: [function(t, e, n) {
- (function(t, r) {
- ! function(t) {
- if ("object" == typeof n && "undefined" != typeof e) e.exports = t();
- else if ("function" == typeof define && define.amd) define([], t);
- else {
- var i;
- "undefined" != typeof window ? i = window : "undefined" != typeof r ? i = r : "undefined" != typeof self && (i = self), i.Promise = t()
- }
- }(function() {
- var e, n, i;
- return function o(t, e, n) {
- function r(s, a) {
- if (!e[s]) {
- if (!t[s]) {
- var u = "function" == typeof _dereq_ && _dereq_;
- if (!a && u) return u(s, !0);
- if (i) return i(s, !0);
- var c = new Error("Cannot find module '" + s + "'");
- throw c.code = "MODULE_NOT_FOUND", c
- }
- var l = e[s] = {
- exports: {}
- };
- t[s][0].call(l.exports, function(e) {
- var n = t[s][1][e];
- return r(n ? n : e)
- }, l, l.exports, o, t, e, n)
- }
- return e[s].exports
- }
- for (var i = "function" == typeof _dereq_ && _dereq_, s = 0; s < n.length; s++) r(n[s]);
- return r
- }({
- 1: [function(t, e) {
- "use strict";
- e.exports = function(t) {
- function e(t) {
- var e = new n(t),
- r = e.promise();
- return e.setHowMany(1), e.setUnwrap(), e.init(), r
- }
- var n = t._SomePromiseArray;
- t.any = function(t) {
- return e(t)
- }, t.prototype.any = function() {
- return e(this)
- }
- }
- }, {}],
- 2: [function(e, n) {
- "use strict";
- function r() {
- this._customScheduler = !1, this._isTickUsed = !1, this._lateQueue = new l(16), this._normalQueue = new l(16), this._haveDrainedQueues = !1, this._trampolineEnabled = !0;
- var t = this;
- this.drainQueues = function() {
- t._drainQueues()
- }, this._schedule = c
- }
- function i(t, e, n) {
- this._lateQueue.push(t, e, n), this._queueTick()
- }
- function o(t, e, n) {
- this._normalQueue.push(t, e, n), this._queueTick()
- }
- function s(t) {
- this._normalQueue._pushOne(t), this._queueTick()
- }
- var a;
- try {
- throw new Error
- } catch (u) {
- a = u
- }
- var c = e("./schedule"),
- l = e("./queue"),
- f = e("./util");
- r.prototype.setScheduler = function(t) {
- var e = this._schedule;
- return this._schedule = t, this._customScheduler = !0, e
- }, r.prototype.hasCustomScheduler = function() {
- return this._customScheduler
- }, r.prototype.enableTrampoline = function() {
- this._trampolineEnabled = !0
- }, r.prototype.disableTrampolineIfNecessary = function() {
- f.hasDevTools && (this._trampolineEnabled = !1)
- }, r.prototype.haveItemsQueued = function() {
- return this._isTickUsed || this._haveDrainedQueues
- }, r.prototype.fatalError = function(e, n) {
- n ? (t.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) + "\n"), t.exit(2)) : this.throwLater(e)
- }, r.prototype.throwLater = function(t, e) {
- if (1 === arguments.length && (e = t, t = function() {
- throw e
- }), "undefined" != typeof setTimeout) setTimeout(function() {
- t(e)
- }, 0);
- else try {
- this._schedule(function() {
- t(e)
- })
- } catch (n) {
- throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")
- }
- }, f.hasDevTools ? (r.prototype.invokeLater = function(t, e, n) {
- this._trampolineEnabled ? i.call(this, t, e, n) : this._schedule(function() {
- setTimeout(function() {
- t.call(e, n)
- }, 100)
- })
- }, r.prototype.invoke = function(t, e, n) {
- this._trampolineEnabled ? o.call(this, t, e, n) : this._schedule(function() {
- t.call(e, n)
- })
- }, r.prototype.settlePromises = function(t) {
- this._trampolineEnabled ? s.call(this, t) : this._schedule(function() {
- t._settlePromises()
- })
- }) : (r.prototype.invokeLater = i, r.prototype.invoke = o, r.prototype.settlePromises = s), r.prototype.invokeFirst = function(t, e, n) {
- this._normalQueue.unshift(t, e, n), this._queueTick()
- }, r.prototype._drainQueue = function(t) {
- for (; t.length() > 0;) {
- var e = t.shift();
- if ("function" == typeof e) {
- var n = t.shift(),
- r = t.shift();
- e.call(n, r)
- } else e._settlePromises()
- }
- }, r.prototype._drainQueues = function() {
- this._drainQueue(this._normalQueue), this._reset(), this._haveDrainedQueues = !0, this._drainQueue(this._lateQueue)
- }, r.prototype._queueTick = function() {
- this._isTickUsed || (this._isTickUsed = !0, this._schedule(this.drainQueues))
- }, r.prototype._reset = function() {
- this._isTickUsed = !1
- }, n.exports = r, n.exports.firstLineError = a
- }, {
- "./queue": 26,
- "./schedule": 29,
- "./util": 36
- }],
- 3: [function(t, e) {
- "use strict";
- e.exports = function(t, e, n, r) {
- var i = !1,
- o = function(t, e) {
- this._reject(e)
- },
- s = function(t, e) {
- e.promiseRejectionQueued = !0, e.bindingPromise._then(o, o, null, this, t)
- },
- a = function(t, e) {
- 0 === (50397184 & this._bitField) && this._resolveCallback(e.target)
- },
- u = function(t, e) {
- e.promiseRejectionQueued || this._reject(t)
- };
- t.prototype.bind = function(o) {
- i || (i = !0, t.prototype._propagateFrom = r.propagateFromFunction(), t.prototype._boundValue = r.boundValueFunction());
- var c = n(o),
- l = new t(e);
- l._propagateFrom(this, 1);
- var f = this._target();
- if (l._setBoundTo(c), c instanceof t) {
- var h = {
- promiseRejectionQueued: !1,
- promise: l,
- target: f,
- bindingPromise: c
- };
- f._then(e, s, void 0, l, h), c._then(a, u, void 0, l, h), l._setOnCancel(c)
- } else l._resolveCallback(f);
- return l
- }, t.prototype._setBoundTo = function(t) {
- void 0 !== t ? (this._bitField = 2097152 | this._bitField, this._boundTo = t) : this._bitField = -2097153 & this._bitField
- }, t.prototype._isBound = function() {
- return 2097152 === (2097152 & this._bitField)
- }, t.bind = function(e, n) {
- return t.resolve(n).bind(e)
- }
- }
- }, {}],
- 4: [function(t, e) {
- "use strict";
- function n() {
- try {
- Promise === i && (Promise = r)
- } catch (t) {}
- return i
- }
- var r;
- "undefined" != typeof Promise && (r = Promise);
- var i = t("./promise")();
- i.noConflict = n, e.exports = i
- }, {
- "./promise": 22
- }],
- 5: [function(t, e) {
- "use strict";
- var n = Object.create;
- if (n) {
- var r = n(null),
- i = n(null);
- r[" size"] = i[" size"] = 0
- }
- e.exports = function(e) {
- function n(t, n) {
- var r;
- if (null != t && (r = t[n]), "function" != typeof r) {
- var i = "Object " + a.classString(t) + " has no method '" + a.toString(n) + "'";
- throw new e.TypeError(i)
- }
- return r
- }
- function r(t) {
- var e = this.pop(),
- r = n(t, e);
- return r.apply(t, this)
- }
- function i(t) {
- return t[this]
- }
- function o(t) {
- var e = +this;
- return 0 > e && (e = Math.max(0, e + t.length)), t[e]
- } {
- var s, a = t("./util"),
- u = a.canEvaluate;
- a.isIdentifier
- }
- e.prototype.call = function(t) {
- var e = [].slice.call(arguments, 1);
- return e.push(t), this._then(r, void 0, void 0, e, void 0)
- }, e.prototype.get = function(t) {
- var e, n = "number" == typeof t;
- if (n) e = o;
- else if (u) {
- var r = s(t);
- e = null !== r ? r : i
- } else e = i;
- return this._then(e, void 0, void 0, t, void 0)
- }
- }
- }, {
- "./util": 36
- }],
- 6: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i) {
- var o = t("./util"),
- s = o.tryCatch,
- a = o.errorObj,
- u = e._async;
- e.prototype["break"] = e.prototype.cancel = function() {
- if (!i.cancellation()) return this._warn("cancellation is disabled");
- for (var t = this, e = t; t._isCancellable();) {
- if (!t._cancelBy(e)) {
- e._isFollowing() ? e._followee().cancel() : e._cancelBranched();
- break
- }
- var n = t._cancellationParent;
- if (null == n || !n._isCancellable()) {
- t._isFollowing() ? t._followee().cancel() : t._cancelBranched();
- break
- }
- t._isFollowing() && t._followee().cancel(), t._setWillBeCancelled(), e = t, t = n
- }
- }, e.prototype._branchHasCancelled = function() {
- this._branchesRemainingToCancel--
- }, e.prototype._enoughBranchesHaveCancelled = function() {
- return void 0 === this._branchesRemainingToCancel || this._branchesRemainingToCancel <= 0
- }, e.prototype._cancelBy = function(t) {
- return t === this ? (this._branchesRemainingToCancel = 0, this._invokeOnCancel(), !0) : (this._branchHasCancelled(), this._enoughBranchesHaveCancelled() ? (this._invokeOnCancel(), !0) : !1)
- }, e.prototype._cancelBranched = function() {
- this._enoughBranchesHaveCancelled() && this._cancel()
- }, e.prototype._cancel = function() {
- this._isCancellable() && (this._setCancelled(), u.invoke(this._cancelPromises, this, void 0))
- }, e.prototype._cancelPromises = function() {
- this._length() > 0 && this._settlePromises()
- }, e.prototype._unsetOnCancel = function() {
- this._onCancelField = void 0
- }, e.prototype._isCancellable = function() {
- return this.isPending() && !this._isCancelled()
- }, e.prototype.isCancellable = function() {
- return this.isPending() && !this.isCancelled()
- }, e.prototype._doInvokeOnCancel = function(t, e) {
- if (o.isArray(t))
- for (var n = 0; n < t.length; ++n) this._doInvokeOnCancel(t[n], e);
- else if (void 0 !== t)
- if ("function" == typeof t) {
- if (!e) {
- var r = s(t).call(this._boundValue());
- r === a && (this._attachExtraTrace(r.e), u.throwLater(r.e))
- }
- } else t._resultCancelled(this)
- }, e.prototype._invokeOnCancel = function() {
- var t = this._onCancel();
- this._unsetOnCancel(), u.invoke(this._doInvokeOnCancel, this, t)
- }, e.prototype._invokeInternalOnCancel = function() {
- this._isCancellable() && (this._doInvokeOnCancel(this._onCancel(), !0), this._unsetOnCancel())
- }, e.prototype._resultCancelled = function() {
- this.cancel()
- }
- }
- }, {
- "./util": 36
- }],
- 7: [function(t, e) {
- "use strict";
- e.exports = function(e) {
- function n(t, n, a) {
- return function(u) {
- var c = a._boundValue();
- t: for (var l = 0; l < t.length; ++l) {
- var f = t[l];
- if (f === Error || null != f && f.prototype instanceof Error) {
- if (u instanceof f) return o(n).call(c, u)
- } else if ("function" == typeof f) {
- var h = o(f).call(c, u);
- if (h === s) return h;
- if (h) return o(n).call(c, u)
- } else if (r.isObject(u)) {
- for (var p = i(f), d = 0; d < p.length; ++d) {
- var _ = p[d];
- if (f[_] != u[_]) continue t
- }
- return o(n).call(c, u)
- }
- }
- return e
- }
- }
- var r = t("./util"),
- i = t("./es5").keys,
- o = r.tryCatch,
- s = r.errorObj;
- return n
- }
- }, {
- "./es5": 13,
- "./util": 36
- }],
- 8: [function(t, e) {
- "use strict";
- e.exports = function(t) {
- function e() {
- this._trace = new e.CapturedTrace(r())
- }
- function n() {
- return i ? new e : void 0
- }
- function r() {
- var t = o.length - 1;
- return t >= 0 ? o[t] : void 0
- }
- var i = !1,
- o = [];
- return t.prototype._promiseCreated = function() {}, t.prototype._pushContext = function() {}, t.prototype._popContext = function() {
- return null
- }, t._peekContext = t.prototype._peekContext = function() {}, e.prototype._pushContext = function() {
- void 0 !== this._trace && (this._trace._promiseCreated = null, o.push(this._trace))
- }, e.prototype._popContext = function() {
- if (void 0 !== this._trace) {
- var t = o.pop(),
- e = t._promiseCreated;
- return t._promiseCreated = null, e
- }
- return null
- }, e.CapturedTrace = null, e.create = n, e.deactivateLongStackTraces = function() {}, e.activateLongStackTraces = function() {
- var n = t.prototype._pushContext,
- o = t.prototype._popContext,
- s = t._peekContext,
- a = t.prototype._peekContext,
- u = t.prototype._promiseCreated;
- e.deactivateLongStackTraces = function() {
- t.prototype._pushContext = n, t.prototype._popContext = o, t._peekContext = s, t.prototype._peekContext = a, t.prototype._promiseCreated = u, i = !1
- }, i = !0, t.prototype._pushContext = e.prototype._pushContext, t.prototype._popContext = e.prototype._popContext, t._peekContext = t.prototype._peekContext = r, t.prototype._promiseCreated = function() {
- var t = this._peekContext();
- t && null == t._promiseCreated && (t._promiseCreated = this)
- }
- }, e
- }
- }, {}],
- 9: [function(e, n) {
- "use strict";
- n.exports = function(n, r) {
- function i(t, e) {
- return {
- promise: e
- }
- }
- function o() {
- return !1
- }
- function s(t, e, n) {
- var r = this;
- try {
- t(e, n, function(t) {
- if ("function" != typeof t) throw new TypeError("onCancel must be a function, got: " + M.toString(t));
- r._attachCancellationCallback(t)
- })
- } catch (i) {
- return i
- }
- }
- function a(t) {
- if (!this._isCancellable()) return this;
- var e = this._onCancel();
- void 0 !== e ? M.isArray(e) ? e.push(t) : this._setOnCancel([e, t]) : this._setOnCancel(t)
- }
- function u() {
- return this._onCancelField
- }
- function c(t) {
- this._onCancelField = t
- }
- function l() {
- this._cancellationParent = void 0, this._onCancelField = void 0
- }
- function f(t, e) {
- if (0 !== (1 & e)) {
- this._cancellationParent = t;
- var n = t._branchesRemainingToCancel;
- void 0 === n && (n = 0), t._branchesRemainingToCancel = n + 1
- }
- 0 !== (2 & e) && t._isBound() && this._setBoundTo(t._boundTo)
- }
- function h(t, e) {
- 0 !== (2 & e) && t._isBound() && this._setBoundTo(t._boundTo)
- }
- function p() {
- var t = this._boundTo;
- return void 0 !== t && t instanceof n ? t.isFulfilled() ? t.value() : void 0 : t
- }
- function d() {
- this._trace = new S(this._peekContext())
- }
- function _(t, e) {
- if (N(t)) {
- var n = this._trace;
- if (void 0 !== n && e && (n = n._parent), void 0 !== n) n.attachExtraTrace(t);
- else if (!t.__stackCleaned__) {
- var r = k(t);
- M.notEnumerableProp(t, "stack", r.message + "\n" + r.stack.join("\n")), M.notEnumerableProp(t, "__stackCleaned__", !0)
- }
- }
- }
- function v(t, e, n, r, i) {
- if (void 0 === t && null !== e && X) {
- if (void 0 !== i && i._returnedNonUndefined()) return;
- if (0 === (65535 & r._bitField)) return;
- n && (n += " ");
- var o = "",
- s = "";
- if (e._trace) {
- for (var a = e._trace.stack.split("\n"), u = E(a), c = u.length - 1; c >= 0; --c) {
- var l = u[c];
- if (!H.test(l)) {
- var f = l.match(Y);
- f && (o = "at " + f[1] + ":" + f[2] + ":" + f[3] + " ");
- break
- }
- }
- if (u.length > 0)
- for (var h = u[0], c = 0; c < a.length; ++c)
- if (a[c] === h) {
- c > 0 && (s = "\n" + a[c - 1]);
- break
- }
- }
- var p = "a promise was created in a " + n + "handler " + o + "but was not returned from it, see http://goo.gl/rRqMUw" + s;
- r._warn(p, !0, e)
- }
- }
- function y(t, e) {
- var n = t + " is deprecated and will be removed in a future version.";
- return e && (n += " Use " + e + " instead."), g(n)
- }
- function g(t, e, r) {
- if (st.warnings) {
- var i, o = new L(t);
- if (e) r._attachExtraTrace(o);
- else if (st.longStackTraces && (i = n._peekContext())) i.attachExtraTrace(o);
- else {
- var s = k(o);
- o.stack = s.message + "\n" + s.stack.join("\n")
- }
- et("warning", o) || x(o, "", !0)
- }
- }
- function m(t, e) {
- for (var n = 0; n < e.length - 1; ++n) e[n].push("From previous event:"), e[n] = e[n].join("\n");
- return n < e.length && (e[n] = e[n].join("\n")), t + "\n" + e.join("\n")
- }
- function b(t) {
- for (var e = 0; e < t.length; ++e)(0 === t[e].length || e + 1 < t.length && t[e][0] === t[e + 1][0]) && (t.splice(e, 1), e--)
- }
- function w(t) {
- for (var e = t[0], n = 1; n < t.length; ++n) {
- for (var r = t[n], i = e.length - 1, o = e[i], s = -1, a = r.length - 1; a >= 0; --a)
- if (r[a] === o) {
- s = a;
- break
- }
- for (var a = s; a >= 0; --a) {
- var u = r[a];
- if (e[i] !== u) break;
- e.pop(), i--
- }
- e = r
- }
- }
- function E(t) {
- for (var e = [], n = 0; n < t.length; ++n) {
- var r = t[n],
- i = " (No stack trace)" === r || z.test(r),
- o = i && rt(r);
- i && !o && (q && " " !== r.charAt(0) && (r = " " + r), e.push(r))
- }
- return e
- }
- function C(t) {
- for (var e = t.stack.replace(/\s+$/g, "").split("\n"), n = 0; n < e.length; ++n) {
- var r = e[n];
- if (" (No stack trace)" === r || z.test(r)) break
- }
- return n > 0 && (e = e.slice(n)), e
- }
- function k(t) {
- var e = t.stack,
- n = t.toString();
- return e = "string" == typeof e && e.length > 0 ? C(t) : [" (No stack trace)"], {
- message: n,
- stack: E(e)
- }
- }
- function x(t, e, n) {
- if ("undefined" != typeof console) {
- var r;
- if (M.isObject(t)) {
- var i = t.stack;
- r = e + $(i, t)
- } else r = e + String(t);
- "function" == typeof D ? D(r, n) : ("function" == typeof console.log || "object" == typeof console.log) && console.log(r)
- }
- }
- function T(t, e, n, r) {
- var i = !1;
- try {
- "function" == typeof e && (i = !0, "rejectionHandled" === t ? e(r) : e(n, r))
- } catch (o) {
- I.throwLater(o)
- }
- "unhandledRejection" === t ? et(t, n, r) || i || x(n, "Unhandled rejection ") : et(t, r)
- }
- function j(t) {
- var e;
- if ("function" == typeof t) e = "[function " + (t.name || "anonymous") + "]";
- else {
- e = t && "function" == typeof t.toString ? t.toString() : M.toString(t);
- var n = /\[object [a-zA-Z0-9$_]+\]/;
- if (n.test(e)) try {
- var r = JSON.stringify(t);
- e = r
- } catch (i) {}
- 0 === e.length && (e = "(empty array)")
- }
- return "(<" + A(e) + ">, no stack trace)"
- }
- function A(t) {
- var e = 41;
- return t.length < e ? t : t.substr(0, e - 3) + "..."
- }
- function P() {
- return "function" == typeof ot
- }
- function R(t) {
- var e = t.match(it);
- return e ? {
- fileName: e[1],
- line: parseInt(e[2], 10)
- } : void 0
- }
- function F(t, e) {
- if (P()) {
- for (var n, r, i = t.stack.split("\n"), o = e.stack.split("\n"), s = -1, a = -1, u = 0; u < i.length; ++u) {
- var c = R(i[u]);
- if (c) {
- n = c.fileName, s = c.line;
- break
- }
- }
- for (var u = 0; u < o.length; ++u) {
- var c = R(o[u]);
- if (c) {
- r = c.fileName, a = c.line;
- break
- }
- }
- 0 > s || 0 > a || !n || !r || n !== r || s >= a || (rt = function(t) {
- if (V.test(t)) return !0;
- var e = R(t);
- return e && e.fileName === n && s <= e.line && e.line <= a ? !0 : !1
- })
- }
- }
- function S(t) {
- this._parent = t, this._promisesCreated = 0;
- var e = this._length = 1 + (void 0 === t ? 0 : t._length);
- ot(this, S), e > 32 && this.uncycle()
- }
- var O, B, D, U = n._getDomain,
- I = n._async,
- L = e("./errors").Warning,
- M = e("./util"),
- N = M.canAttachTrace,
- V = /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,
- H = /\((?:timers\.js):\d+:\d+\)/,
- Y = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,
- z = null,
- $ = null,
- q = !1,
- Q = !(0 == M.env("BLUEBIRD_DEBUG")),
- W = !(0 == M.env("BLUEBIRD_WARNINGS") || !Q && !M.env("BLUEBIRD_WARNINGS")),
- G = !(0 == M.env("BLUEBIRD_LONG_STACK_TRACES") || !Q && !M.env("BLUEBIRD_LONG_STACK_TRACES")),
- X = 0 != M.env("BLUEBIRD_W_FORGOTTEN_RETURN") && (W || !!M.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
- n.prototype.suppressUnhandledRejections = function() {
- var t = this._target();
- t._bitField = -1048577 & t._bitField | 524288
- }, n.prototype._ensurePossibleRejectionHandled = function() {
- 0 === (524288 & this._bitField) && (this._setRejectionIsUnhandled(), I.invokeLater(this._notifyUnhandledRejection, this, void 0))
- }, n.prototype._notifyUnhandledRejectionIsHandled = function() {
- T("rejectionHandled", O, void 0, this)
- }, n.prototype._setReturnedNonUndefined = function() {
- this._bitField = 268435456 | this._bitField
- }, n.prototype._returnedNonUndefined = function() {
- return 0 !== (268435456 & this._bitField)
- }, n.prototype._notifyUnhandledRejection = function() {
- if (this._isRejectionUnhandled()) {
- var t = this._settledValue();
- this._setUnhandledRejectionIsNotified(), T("unhandledRejection", B, t, this)
- }
- }, n.prototype._setUnhandledRejectionIsNotified = function() {
- this._bitField = 262144 | this._bitField
- }, n.prototype._unsetUnhandledRejectionIsNotified = function() {
- this._bitField = -262145 & this._bitField
- }, n.prototype._isUnhandledRejectionNotified = function() {
- return (262144 & this._bitField) > 0
- }, n.prototype._setRejectionIsUnhandled = function() {
- this._bitField = 1048576 | this._bitField
- }, n.prototype._unsetRejectionIsUnhandled = function() {
- this._bitField = -1048577 & this._bitField, this._isUnhandledRejectionNotified() && (this._unsetUnhandledRejectionIsNotified(), this._notifyUnhandledRejectionIsHandled())
- }, n.prototype._isRejectionUnhandled = function() {
- return (1048576 & this._bitField) > 0
- }, n.prototype._warn = function(t, e, n) {
- return g(t, e, n || this)
- }, n.onPossiblyUnhandledRejection = function(t) {
- var e = U();
- B = "function" == typeof t ? null === e ? t : M.domainBind(e, t) : void 0
- }, n.onUnhandledRejectionHandled = function(t) {
- var e = U();
- O = "function" == typeof t ? null === e ? t : M.domainBind(e, t) : void 0
- };
- var Z = function() {};
- n.longStackTraces = function() {
- if (I.haveItemsQueued() && !st.longStackTraces) throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");
- if (!st.longStackTraces && P()) {
- var t = n.prototype._captureStackTrace,
- e = n.prototype._attachExtraTrace;
- st.longStackTraces = !0, Z = function() {
- if (I.haveItemsQueued() && !st.longStackTraces) throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");
- n.prototype._captureStackTrace = t, n.prototype._attachExtraTrace = e, r.deactivateLongStackTraces(), I.enableTrampoline(), st.longStackTraces = !1
- }, n.prototype._captureStackTrace = d, n.prototype._attachExtraTrace = _, r.activateLongStackTraces(), I.disableTrampolineIfNecessary()
- }
- }, n.hasLongStackTraces = function() {
- return st.longStackTraces && P()
- };
- var K = function() {
- try {
- if ("function" == typeof CustomEvent) {
- var t = new CustomEvent("CustomEvent");
- return M.global.dispatchEvent(t),
- function(t, e) {
- var n = new CustomEvent(t.toLowerCase(), {
- detail: e,
- cancelable: !0
- });
- return !M.global.dispatchEvent(n)
- }
- }
- if ("function" == typeof Event) {
- var t = new Event("CustomEvent");
- return M.global.dispatchEvent(t),
- function(t, e) {
- var n = new Event(t.toLowerCase(), {
- cancelable: !0
- });
- return n.detail = e, !M.global.dispatchEvent(n)
- }
- }
- var t = document.createEvent("CustomEvent");
- return t.initCustomEvent("testingtheevent", !1, !0, {}), M.global.dispatchEvent(t),
- function(t, e) {
- var n = document.createEvent("CustomEvent");
- return n.initCustomEvent(t.toLowerCase(), !1, !0, e), !M.global.dispatchEvent(n)
- }
- } catch (e) {}
- return function() {
- return !1
- }
- }(),
- J = function() {
- return M.isNode ? function() {
- return t.emit.apply(t, arguments)
- } : M.global ? function(t) {
- var e = "on" + t.toLowerCase(),
- n = M.global[e];
- return n ? (n.apply(M.global, [].slice.call(arguments, 1)), !0) : !1
- } : function() {
- return !1
- }
- }(),
- tt = {
- promiseCreated: i,
- promiseFulfilled: i,
- promiseRejected: i,
- promiseResolved: i,
- promiseCancelled: i,
- promiseChained: function(t, e, n) {
- return {
- promise: e,
- child: n
- }
- },
- warning: function(t, e) {
- return {
- warning: e
- }
- },
- unhandledRejection: function(t, e, n) {
- return {
- reason: e,
- promise: n
- }
- },
- rejectionHandled: i
- },
- et = function(t) {
- var e = !1;
- try {
- e = J.apply(null, arguments)
- } catch (n) {
- I.throwLater(n), e = !0
- }
- var r = !1;
- try {
- r = K(t, tt[t].apply(null, arguments))
- } catch (n) {
- I.throwLater(n), r = !0
- }
- return r || e
- };
- n.config = function(t) {
- if (t = Object(t), "longStackTraces" in t && (t.longStackTraces ? n.longStackTraces() : !t.longStackTraces && n.hasLongStackTraces() && Z()), "warnings" in t) {
- var e = t.warnings;
- st.warnings = !!e, X = st.warnings, M.isObject(e) && "wForgottenReturn" in e && (X = !!e.wForgottenReturn)
- }
- if ("cancellation" in t && t.cancellation && !st.cancellation) {
- if (I.haveItemsQueued()) throw new Error("cannot enable cancellation after promises are in use");
- n.prototype._clearCancellationData = l, n.prototype._propagateFrom = f, n.prototype._onCancel = u, n.prototype._setOnCancel = c, n.prototype._attachCancellationCallback = a, n.prototype._execute = s, nt = f, st.cancellation = !0
- }
- "monitoring" in t && (t.monitoring && !st.monitoring ? (st.monitoring = !0, n.prototype._fireEvent = et) : !t.monitoring && st.monitoring && (st.monitoring = !1, n.prototype._fireEvent = o))
- }, n.prototype._fireEvent = o, n.prototype._execute = function(t, e, n) {
- try {
- t(e, n)
- } catch (r) {
- return r
- }
- }, n.prototype._onCancel = function() {}, n.prototype._setOnCancel = function() {}, n.prototype._attachCancellationCallback = function() {}, n.prototype._captureStackTrace = function() {}, n.prototype._attachExtraTrace = function() {}, n.prototype._clearCancellationData = function() {}, n.prototype._propagateFrom = function() {};
- var nt = h,
- rt = function() {
- return !1
- },
- it = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
- M.inherits(S, Error), r.CapturedTrace = S, S.prototype.uncycle = function() {
- var t = this._length;
- if (!(2 > t)) {
- for (var e = [], n = {}, r = 0, i = this; void 0 !== i; ++r) e.push(i), i = i._parent;
- t = this._length = r;
- for (var r = t - 1; r >= 0; --r) {
- var o = e[r].stack;
- void 0 === n[o] && (n[o] = r)
- }
- for (var r = 0; t > r; ++r) {
- var s = e[r].stack,
- a = n[s];
- if (void 0 !== a && a !== r) {
- a > 0 && (e[a - 1]._parent = void 0, e[a - 1]._length = 1), e[r]._parent = void 0, e[r]._length = 1;
- var u = r > 0 ? e[r - 1] : this;
- t - 1 > a ? (u._parent = e[a + 1], u._parent.uncycle(), u._length = u._parent._length + 1) : (u._parent = void 0, u._length = 1);
- for (var c = u._length + 1, l = r - 2; l >= 0; --l) e[l]._length = c, c++;
- return
- }
- }
- }
- }, S.prototype.attachExtraTrace = function(t) {
- if (!t.__stackCleaned__) {
- this.uncycle();
- for (var e = k(t), n = e.message, r = [e.stack], i = this; void 0 !== i;) r.push(E(i.stack.split("\n"))), i = i._parent;
- w(r), b(r), M.notEnumerableProp(t, "stack", m(n, r)), M.notEnumerableProp(t, "__stackCleaned__", !0)
- }
- };
- var ot = function() {
- var t = /^\s*at\s*/,
- e = function(t, e) {
- return "string" == typeof t ? t : void 0 !== e.name && void 0 !== e.message ? e.toString() : j(e)
- };
- if ("number" == typeof Error.stackTraceLimit && "function" == typeof Error.captureStackTrace) {
- Error.stackTraceLimit += 6, z = t, $ = e;
- var n = Error.captureStackTrace;
- return rt = function(t) {
- return V.test(t)
- },
- function(t, e) {
- Error.stackTraceLimit += 6, n(t, e), Error.stackTraceLimit -= 6
- }
- }
- var r = new Error;
- if ("string" == typeof r.stack && r.stack.split("\n")[0].indexOf("stackDetection@") >= 0) return z = /@/, $ = e, q = !0,
- function(t) {
- t.stack = (new Error).stack
- };
- var i;
- try {
- throw new Error
- } catch (o) {
- i = "stack" in o
- }
- return "stack" in r || !i || "number" != typeof Error.stackTraceLimit ? ($ = function(t, e) {
- return "string" == typeof t ? t : "object" != typeof e && "function" != typeof e || void 0 === e.name || void 0 === e.message ? j(e) : e.toString()
- }, null) : (z = t, $ = e, function(t) {
- Error.stackTraceLimit += 6;
- try {
- throw new Error
- } catch (e) {
- t.stack = e.stack
- }
- Error.stackTraceLimit -= 6
- })
- }([]);
- "undefined" != typeof console && "undefined" != typeof console.warn && (D = function(t) {
- console.warn(t)
- }, M.isNode && t.stderr.isTTY ? D = function(t, e) {
- var n = e ? "[33m" : "[31m";
- console.warn(n + t + "[0m\n")
- } : M.isNode || "string" != typeof(new Error).stack || (D = function(t, e) {
- console.warn("%c" + t, e ? "color: darkorange" : "color: red")
- }));
- var st = {
- warnings: W,
- longStackTraces: !1,
- cancellation: !1,
- monitoring: !1
- };
- return G && n.longStackTraces(), {
- longStackTraces: function() {
- return st.longStackTraces
- },
- warnings: function() {
- return st.warnings
- },
- cancellation: function() {
- return st.cancellation
- },
- monitoring: function() {
- return st.monitoring
- },
- propagateFromFunction: function() {
- return nt
- },
- boundValueFunction: function() {
- return p
- },
- checkForgottenReturns: v,
- setBounds: F,
- warn: g,
- deprecated: y,
- CapturedTrace: S,
- fireDomEvent: K,
- fireGlobalEvent: J
- }
- }
- }, {
- "./errors": 12,
- "./util": 36
- }],
- 10: [function(t, e) {
- "use strict";
- e.exports = function(t) {
- function e() {
- return this.value
- }
- function n() {
- throw this.reason
- }
- t.prototype["return"] = t.prototype.thenReturn = function(n) {
- return n instanceof t && n.suppressUnhandledRejections(), this._then(e, void 0, void 0, {
- value: n
- }, void 0)
- }, t.prototype["throw"] = t.prototype.thenThrow = function(t) {
- return this._then(n, void 0, void 0, {
- reason: t
- }, void 0)
- }, t.prototype.catchThrow = function(t) {
- if (arguments.length <= 1) return this._then(void 0, n, void 0, {
- reason: t
- }, void 0);
- var e = arguments[1],
- r = function() {
- throw e
- };
- return this.caught(t, r)
- }, t.prototype.catchReturn = function(n) {
- if (arguments.length <= 1) return n instanceof t && n.suppressUnhandledRejections(), this._then(void 0, e, void 0, {
- value: n
- }, void 0);
- var r = arguments[1];
- r instanceof t && r.suppressUnhandledRejections();
- var i = function() {
- return r
- };
- return this.caught(n, i)
- }
- }
- }, {}],
- 11: [function(t, e) {
- "use strict";
- e.exports = function(t, e) {
- function n() {
- return o(this)
- }
- function r(t, n) {
- return i(t, n, e, e)
- }
- var i = t.reduce,
- o = t.all;
- t.prototype.each = function(t) {
- return i(this, t, e, 0)._then(n, void 0, void 0, this, void 0)
- }, t.prototype.mapSeries = function(t) {
- return i(this, t, e, e)
- }, t.each = function(t, r) {
- return i(t, r, e, 0)._then(n, void 0, void 0, t, void 0)
- }, t.mapSeries = r
- }
- }, {}],
- 12: [function(t, e) {
- "use strict";
- function n(t, e) {
- function n(r) {
- return this instanceof n ? (l(this, "message", "string" == typeof r ? r : e), l(this, "name", t), void(Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : Error.call(this))) : new n(r)
- }
- return c(n, Error), n
- }
- function r(t) {
- return this instanceof r ? (l(this, "name", "OperationalError"), l(this, "message", t), this.cause = t, this.isOperational = !0, void(t instanceof Error ? (l(this, "message", t.message), l(this, "stack", t.stack)) : Error.captureStackTrace && Error.captureStackTrace(this, this.constructor))) : new r(t)
- }
- var i, o, s = t("./es5"),
- a = s.freeze,
- u = t("./util"),
- c = u.inherits,
- l = u.notEnumerableProp,
- f = n("Warning", "warning"),
- h = n("CancellationError", "cancellation error"),
- p = n("TimeoutError", "timeout error"),
- d = n("AggregateError", "aggregate error");
- try {
- i = TypeError, o = RangeError
- } catch (_) {
- i = n("TypeError", "type error"), o = n("RangeError", "range error")
- }
- for (var v = "join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "), y = 0; y < v.length; ++y) "function" == typeof Array.prototype[v[y]] && (d.prototype[v[y]] = Array.prototype[v[y]]);
- s.defineProperty(d.prototype, "length", {
- value: 0,
- configurable: !1,
- writable: !0,
- enumerable: !0
- }), d.prototype.isOperational = !0;
- var g = 0;
- d.prototype.toString = function() {
- var t = Array(4 * g + 1).join(" "),
- e = "\n" + t + "AggregateError of:\n";
- g++, t = Array(4 * g + 1).join(" ");
- for (var n = 0; n < this.length; ++n) {
- for (var r = this[n] === this ? "[Circular AggregateError]" : this[n] + "", i = r.split("\n"), o = 0; o < i.length; ++o) i[o] = t + i[o];
- r = i.join("\n"), e += r + "\n"
- }
- return g--, e
- }, c(r, Error);
- var m = Error.__BluebirdErrorTypes__;
- m || (m = a({
- CancellationError: h,
- TimeoutError: p,
- OperationalError: r,
- RejectionError: r,
- AggregateError: d
- }), s.defineProperty(Error, "__BluebirdErrorTypes__", {
- value: m,
- writable: !1,
- enumerable: !1,
- configurable: !1
- })), e.exports = {
- Error: Error,
- TypeError: i,
- RangeError: o,
- CancellationError: m.CancellationError,
- OperationalError: m.OperationalError,
- TimeoutError: m.TimeoutError,
- AggregateError: m.AggregateError,
- Warning: f
- }
- }, {
- "./es5": 13,
- "./util": 36
- }],
- 13: [function(t, e) {
- var n = function() {
- "use strict";
- return void 0 === this
- }();
- if (n) e.exports = {
- freeze: Object.freeze,
- defineProperty: Object.defineProperty,
- getDescriptor: Object.getOwnPropertyDescriptor,
- keys: Object.keys,
- names: Object.getOwnPropertyNames,
- getPrototypeOf: Object.getPrototypeOf,
- isArray: Array.isArray,
- isES5: n,
- propertyIsWritable: function(t, e) {
- var n = Object.getOwnPropertyDescriptor(t, e);
- return !(n && !n.writable && !n.set)
- }
- };
- else {
- var r = {}.hasOwnProperty,
- i = {}.toString,
- o = {}.constructor.prototype,
- s = function(t) {
- var e = [];
- for (var n in t) r.call(t, n) && e.push(n);
- return e
- },
- a = function(t, e) {
- return {
- value: t[e]
- }
- },
- u = function(t, e, n) {
- return t[e] = n.value, t
- },
- c = function(t) {
- return t
- },
- l = function(t) {
- try {
- return Object(t).constructor.prototype
- } catch (e) {
- return o
- }
- },
- f = function(t) {
- try {
- return "[object Array]" === i.call(t)
- } catch (e) {
- return !1
- }
- };
- e.exports = {
- isArray: f,
- keys: s,
- names: s,
- defineProperty: u,
- getDescriptor: a,
- freeze: c,
- getPrototypeOf: l,
- isES5: n,
- propertyIsWritable: function() {
- return !0
- }
- }
- }
- }, {}],
- 14: [function(t, e) {
- "use strict";
- e.exports = function(t, e) {
- var n = t.map;
- t.prototype.filter = function(t, r) {
- return n(this, t, r, e)
- }, t.filter = function(t, r, i) {
- return n(t, r, i, e)
- }
- }
- }, {}],
- 15: [function(t, e) {
- "use strict";
- e.exports = function(e, n) {
- function r(t, e, n) {
- this.promise = t, this.type = e, this.handler = n, this.called = !1, this.cancelPromise = null
- }
- function i(t) {
- this.finallyHandler = t
- }
- function o(t, e) {
- return null != t.cancelPromise ? (arguments.length > 1 ? t.cancelPromise._reject(e) : t.cancelPromise._cancel(), t.cancelPromise = null, !0) : !1
- }
- function s() {
- return u.call(this, this.promise._target()._settledValue())
- }
- function a(t) {
- return o(this, t) ? void 0 : (f.e = t, f)
- }
- function u(t) {
- var r = this.promise,
- u = this.handler;
- if (!this.called) {
- this.called = !0;
- var c = this.isFinallyHandler() ? u.call(r._boundValue()) : u.call(r._boundValue(), t);
- if (void 0 !== c) {
- r._setReturnedNonUndefined();
- var h = n(c, r);
- if (h instanceof e) {
- if (null != this.cancelPromise) {
- if (h._isCancelled()) {
- var p = new l("late cancellation observer");
- return r._attachExtraTrace(p), f.e = p, f
- }
- h.isPending() && h._attachCancellationCallback(new i(this))
- }
- return h._then(s, a, void 0, this, void 0)
- }
- }
- }
- return r.isRejected() ? (o(this), f.e = t, f) : (o(this), t)
- }
- var c = t("./util"),
- l = e.CancellationError,
- f = c.errorObj;
- return r.prototype.isFinallyHandler = function() {
- return 0 === this.type
- }, i.prototype._resultCancelled = function() {
- o(this.finallyHandler)
- }, e.prototype._passThrough = function(t, e, n, i) {
- return "function" != typeof t ? this.then() : this._then(n, i, void 0, new r(this, e, t), void 0)
- }, e.prototype.lastly = e.prototype["finally"] = function(t) {
- return this._passThrough(t, 0, u, u)
- }, e.prototype.tap = function(t) {
- return this._passThrough(t, 1, u)
- }, r
- }
- }, {
- "./util": 36
- }],
- 16: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i, o, s) {
- function a(t, n, r) {
- for (var o = 0; o < n.length; ++o) {
- r._pushContext();
- var s = p(n[o])(t);
- if (r._popContext(), s === h) {
- r._pushContext();
- var a = e.reject(h.e);
- return r._popContext(), a
- }
- var u = i(s, r);
- if (u instanceof e) return u
- }
- return null
- }
- function u(t, n, i, o) {
- if (s.cancellation()) {
- var a = new e(r),
- u = this._finallyPromise = new e(r);
- this._promise = a.lastly(function() {
- return u
- }), a._captureStackTrace(), a._setOnCancel(this)
- } else {
- var c = this._promise = new e(r);
- c._captureStackTrace()
- }
- this._stack = o, this._generatorFunction = t, this._receiver = n, this._generator = void 0, this._yieldHandlers = "function" == typeof i ? [i].concat(d) : d, this._yieldedPromise = null, this._cancellationPhase = !1
- }
- var c = t("./errors"),
- l = c.TypeError,
- f = t("./util"),
- h = f.errorObj,
- p = f.tryCatch,
- d = [];
- f.inherits(u, o), u.prototype._isResolved = function() {
- return null === this._promise
- }, u.prototype._cleanup = function() {
- this._promise = this._generator = null, s.cancellation() && null !== this._finallyPromise && (this._finallyPromise._fulfill(), this._finallyPromise = null)
- }, u.prototype._promiseCancelled = function() {
- if (!this._isResolved()) {
- var t, n = "undefined" != typeof this._generator["return"];
- if (n) this._promise._pushContext(), t = p(this._generator["return"]).call(this._generator, void 0), this._promise._popContext();
- else {
- var r = new e.CancellationError("generator .return() sentinel");
- e.coroutine.returnSentinel = r, this._promise._attachExtraTrace(r), this._promise._pushContext(), t = p(this._generator["throw"]).call(this._generator, r), this._promise._popContext()
- }
- this._cancellationPhase = !0, this._yieldedPromise = null, this._continue(t)
- }
- }, u.prototype._promiseFulfilled = function(t) {
- this._yieldedPromise = null, this._promise._pushContext();
- var e = p(this._generator.next).call(this._generator, t);
- this._promise._popContext(), this._continue(e)
- }, u.prototype._promiseRejected = function(t) {
- this._yieldedPromise = null, this._promise._attachExtraTrace(t),
- this._promise._pushContext();
- var e = p(this._generator["throw"]).call(this._generator, t);
- this._promise._popContext(), this._continue(e)
- }, u.prototype._resultCancelled = function() {
- if (this._yieldedPromise instanceof e) {
- var t = this._yieldedPromise;
- this._yieldedPromise = null, t.cancel()
- }
- }, u.prototype.promise = function() {
- return this._promise
- }, u.prototype._run = function() {
- this._generator = this._generatorFunction.call(this._receiver), this._receiver = this._generatorFunction = void 0, this._promiseFulfilled(void 0)
- }, u.prototype._continue = function(t) {
- var n = this._promise;
- if (t === h) return this._cleanup(), this._cancellationPhase ? n.cancel() : n._rejectCallback(t.e, !1);
- var r = t.value;
- if (t.done === !0) return this._cleanup(), this._cancellationPhase ? n.cancel() : n._resolveCallback(r);
- var o = i(r, this._promise);
- if (!(o instanceof e) && (o = a(o, this._yieldHandlers, this._promise), null === o)) return void this._promiseRejected(new l("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s", r) + "From coroutine:\n" + this._stack.split("\n").slice(1, -7).join("\n")));
- o = o._target();
- var s = o._bitField;
- 0 === (50397184 & s) ? (this._yieldedPromise = o, o._proxy(this, null)) : 0 !== (33554432 & s) ? e._async.invoke(this._promiseFulfilled, this, o._value()) : 0 !== (16777216 & s) ? e._async.invoke(this._promiseRejected, this, o._reason()) : this._promiseCancelled()
- }, e.coroutine = function(t, e) {
- if ("function" != typeof t) throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");
- var n = Object(e).yieldHandler,
- r = u,
- i = (new Error).stack;
- return function() {
- var e = t.apply(this, arguments),
- o = new r(void 0, void 0, n, i),
- s = o.promise();
- return o._generator = e, o._promiseFulfilled(void 0), s
- }
- }, e.coroutine.addYieldHandler = function(t) {
- if ("function" != typeof t) throw new l("expecting a function but got " + f.classString(t));
- d.push(t)
- }, e.spawn = function(t) {
- if (s.deprecated("Promise.spawn()", "Promise.coroutine()"), "function" != typeof t) return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");
- var r = new u(t, this),
- i = r.promise();
- return r._run(e.spawn), i
- }
- }
- }, {
- "./errors": 12,
- "./util": 36
- }],
- 17: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i, o, s) {
- {
- var a = t("./util");
- a.canEvaluate, a.tryCatch, a.errorObj
- }
- e.join = function() {
- var t, e = arguments.length - 1;
- if (e > 0 && "function" == typeof arguments[e]) {
- t = arguments[e];
- var r
- }
- var i = [].slice.call(arguments);
- t && i.pop();
- var r = new n(i).promise();
- return void 0 !== t ? r.spread(t) : r
- }
- }
- }, {
- "./util": 36
- }],
- 18: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i, o, s) {
- function a(t, e, n, r) {
- this.constructor$(t), this._promise._captureStackTrace();
- var i = c();
- this._callback = null === i ? e : l.domainBind(i, e), this._preservedValues = r === o ? new Array(this.length()) : null, this._limit = n, this._inFlight = 0, this._queue = [], p.invoke(this._asyncInit, this, void 0)
- }
- function u(t, n, i, o) {
- if ("function" != typeof n) return r("expecting a function but got " + l.classString(n));
- var s = 0;
- if (void 0 !== i) {
- if ("object" != typeof i || null === i) return e.reject(new TypeError("options argument must be an object but it is " + l.classString(i)));
- if ("number" != typeof i.concurrency) return e.reject(new TypeError("'concurrency' must be a number but it is " + l.classString(i.concurrency)));
- s = i.concurrency
- }
- return s = "number" == typeof s && isFinite(s) && s >= 1 ? s : 0, new a(t, n, s, o).promise()
- }
- var c = e._getDomain,
- l = t("./util"),
- f = l.tryCatch,
- h = l.errorObj,
- p = e._async;
- l.inherits(a, n), a.prototype._asyncInit = function() {
- this._init$(void 0, -2)
- }, a.prototype._init = function() {}, a.prototype._promiseFulfilled = function(t, n) {
- var r = this._values,
- o = this.length(),
- a = this._preservedValues,
- u = this._limit;
- if (0 > n) {
- if (n = -1 * n - 1, r[n] = t, u >= 1 && (this._inFlight--, this._drainQueue(), this._isResolved())) return !0
- } else {
- if (u >= 1 && this._inFlight >= u) return r[n] = t, this._queue.push(n), !1;
- null !== a && (a[n] = t);
- var c = this._promise,
- l = this._callback,
- p = c._boundValue();
- c._pushContext();
- var d = f(l).call(p, t, n, o),
- _ = c._popContext();
- if (s.checkForgottenReturns(d, _, null !== a ? "Promise.filter" : "Promise.map", c), d === h) return this._reject(d.e), !0;
- var v = i(d, this._promise);
- if (v instanceof e) {
- v = v._target();
- var y = v._bitField;
- if (0 === (50397184 & y)) return u >= 1 && this._inFlight++, r[n] = v, v._proxy(this, -1 * (n + 1)), !1;
- if (0 === (33554432 & y)) return 0 !== (16777216 & y) ? (this._reject(v._reason()), !0) : (this._cancel(), !0);
- d = v._value()
- }
- r[n] = d
- }
- var g = ++this._totalResolved;
- return g >= o ? (null !== a ? this._filter(r, a) : this._resolve(r), !0) : !1
- }, a.prototype._drainQueue = function() {
- for (var t = this._queue, e = this._limit, n = this._values; t.length > 0 && this._inFlight < e;) {
- if (this._isResolved()) return;
- var r = t.pop();
- this._promiseFulfilled(n[r], r)
- }
- }, a.prototype._filter = function(t, e) {
- for (var n = e.length, r = new Array(n), i = 0, o = 0; n > o; ++o) t[o] && (r[i++] = e[o]);
- r.length = i, this._resolve(r)
- }, a.prototype.preservedValues = function() {
- return this._preservedValues
- }, e.prototype.map = function(t, e) {
- return u(this, t, e, null)
- }, e.map = function(t, e, n, r) {
- return u(t, e, n, r)
- }
- }
- }, {
- "./util": 36
- }],
- 19: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i, o) {
- var s = t("./util"),
- a = s.tryCatch;
- e.method = function(t) {
- if ("function" != typeof t) throw new e.TypeError("expecting a function but got " + s.classString(t));
- return function() {
- var r = new e(n);
- r._captureStackTrace(), r._pushContext();
- var i = a(t).apply(this, arguments),
- s = r._popContext();
- return o.checkForgottenReturns(i, s, "Promise.method", r), r._resolveFromSyncValue(i), r
- }
- }, e.attempt = e["try"] = function(t) {
- if ("function" != typeof t) return i("expecting a function but got " + s.classString(t));
- var r = new e(n);
- r._captureStackTrace(), r._pushContext();
- var u;
- if (arguments.length > 1) {
- o.deprecated("calling Promise.try with more than 1 argument");
- var c = arguments[1],
- l = arguments[2];
- u = s.isArray(c) ? a(t).apply(l, c) : a(t).call(l, c)
- } else u = a(t)();
- var f = r._popContext();
- return o.checkForgottenReturns(u, f, "Promise.try", r), r._resolveFromSyncValue(u), r
- }, e.prototype._resolveFromSyncValue = function(t) {
- t === s.errorObj ? this._rejectCallback(t.e, !1) : this._resolveCallback(t, !0)
- }
- }
- }, {
- "./util": 36
- }],
- 20: [function(t, e) {
- "use strict";
- function n(t) {
- return t instanceof Error && c.getPrototypeOf(t) === Error.prototype
- }
- function r(t) {
- var e;
- if (n(t)) {
- e = new u(t), e.name = t.name, e.message = t.message, e.stack = t.stack;
- for (var r = c.keys(t), i = 0; i < r.length; ++i) {
- var s = r[i];
- l.test(s) || (e[s] = t[s])
- }
- return e
- }
- return o.markAsOriginatingFromRejection(t), t
- }
- function i(t, e) {
- return function(n, i) {
- if (null !== t) {
- if (n) {
- var o = r(s(n));
- t._attachExtraTrace(o), t._reject(o)
- } else if (e) {
- var a = [].slice.call(arguments, 1);
- t._fulfill(a)
- } else t._fulfill(i);
- t = null
- }
- }
- }
- var o = t("./util"),
- s = o.maybeWrapAsError,
- a = t("./errors"),
- u = a.OperationalError,
- c = t("./es5"),
- l = /^(?:name|message|stack|cause)$/;
- e.exports = i
- }, {
- "./errors": 12,
- "./es5": 13,
- "./util": 36
- }],
- 21: [function(t, e) {
- "use strict";
- e.exports = function(e) {
- function n(t, e) {
- var n = this;
- if (!o.isArray(t)) return r.call(n, t, e);
- var i = a(e).apply(n._boundValue(), [null].concat(t));
- i === u && s.throwLater(i.e)
- }
- function r(t, e) {
- var n = this,
- r = n._boundValue(),
- i = void 0 === t ? a(e).call(r, null) : a(e).call(r, null, t);
- i === u && s.throwLater(i.e)
- }
- function i(t, e) {
- var n = this;
- if (!t) {
- var r = new Error(t + "");
- r.cause = t, t = r
- }
- var i = a(e).call(n._boundValue(), t);
- i === u && s.throwLater(i.e)
- }
- var o = t("./util"),
- s = e._async,
- a = o.tryCatch,
- u = o.errorObj;
- e.prototype.asCallback = e.prototype.nodeify = function(t, e) {
- if ("function" == typeof t) {
- var o = r;
- void 0 !== e && Object(e).spread && (o = n), this._then(o, i, void 0, this, t)
- }
- return this
- }
- }
- }, {
- "./util": 36
- }],
- 22: [function(e, n) {
- "use strict";
- n.exports = function() {
- function r() {}
- function i(t, e) {
- if ("function" != typeof e) throw new m("expecting a function but got " + d.classString(e));
- if (t.constructor !== o) throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")
- }
- function o(t) {
- this._bitField = 0, this._fulfillmentHandler0 = void 0, this._rejectionHandler0 = void 0, this._promise0 = void 0, this._receiver0 = void 0, t !== w && (i(this, t), this._resolveFromExecutor(t)), this._promiseCreated(), this._fireEvent("promiseCreated", this)
- }
- function s(t) {
- this.promise._resolveCallback(t)
- }
- function a(t) {
- this.promise._rejectCallback(t, !1)
- }
- function u(t) {
- var e = new o(w);
- e._fulfillmentHandler0 = t, e._rejectionHandler0 = t, e._promise0 = t, e._receiver0 = t
- }
- var c, l = function() {
- return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")
- },
- f = function() {
- return new o.PromiseInspection(this._target())
- },
- h = function(t) {
- return o.reject(new m(t))
- },
- p = {},
- d = e("./util");
- c = d.isNode ? function() {
- var e = t.domain;
- return void 0 === e && (e = null), e
- } : function() {
- return null
- }, d.notEnumerableProp(o, "_getDomain", c);
- var _ = e("./es5"),
- v = e("./async"),
- y = new v;
- _.defineProperty(o, "_async", {
- value: y
- });
- var g = e("./errors"),
- m = o.TypeError = g.TypeError;
- o.RangeError = g.RangeError;
- var b = o.CancellationError = g.CancellationError;
- o.TimeoutError = g.TimeoutError, o.OperationalError = g.OperationalError, o.RejectionError = g.OperationalError, o.AggregateError = g.AggregateError;
- var w = function() {},
- E = {},
- C = {},
- k = e("./thenables")(o, w),
- x = e("./promise_array")(o, w, k, h, r),
- T = e("./context")(o),
- j = T.create,
- A = e("./debuggability")(o, T),
- P = (A.CapturedTrace, e("./finally")(o, k)),
- R = e("./catch_filter")(C),
- F = e("./nodeback"),
- S = d.errorObj,
- O = d.tryCatch;
- return o.prototype.toString = function() {
- return "[object Promise]"
- }, o.prototype.caught = o.prototype["catch"] = function(t) {
- var e = arguments.length;
- if (e > 1) {
- var n, r = new Array(e - 1),
- i = 0;
- for (n = 0; e - 1 > n; ++n) {
- var o = arguments[n];
- if (!d.isObject(o)) return h("expecting an object but got A catch statement predicate " + d.classString(o));
- r[i++] = o
- }
- return r.length = i, t = arguments[n], this.then(void 0, R(r, t, this))
- }
- return this.then(void 0, t)
- }, o.prototype.reflect = function() {
- return this._then(f, f, void 0, this, void 0)
- }, o.prototype.then = function(t, e) {
- if (A.warnings() && arguments.length > 0 && "function" != typeof t && "function" != typeof e) {
- var n = ".then() only accepts functions but was passed: " + d.classString(t);
- arguments.length > 1 && (n += ", " + d.classString(e)), this._warn(n)
- }
- return this._then(t, e, void 0, void 0, void 0)
- }, o.prototype.done = function(t, e) {
- var n = this._then(t, e, void 0, void 0, void 0);
- n._setIsFinal()
- }, o.prototype.spread = function(t) {
- return "function" != typeof t ? h("expecting a function but got " + d.classString(t)) : this.all()._then(t, void 0, void 0, E, void 0)
- }, o.prototype.toJSON = function() {
- var t = {
- isFulfilled: !1,
- isRejected: !1,
- fulfillmentValue: void 0,
- rejectionReason: void 0
- };
- return this.isFulfilled() ? (t.fulfillmentValue = this.value(), t.isFulfilled = !0) : this.isRejected() && (t.rejectionReason = this.reason(), t.isRejected = !0), t
- }, o.prototype.all = function() {
- return arguments.length > 0 && this._warn(".all() was passed arguments but it does not take any"), new x(this).promise()
- }, o.prototype.error = function(t) {
- return this.caught(d.originatesFromRejection, t)
- }, o.getNewLibraryCopy = n.exports, o.is = function(t) {
- return t instanceof o
- }, o.fromNode = o.fromCallback = function(t) {
- var e = new o(w);
- e._captureStackTrace();
- var n = arguments.length > 1 ? !!Object(arguments[1]).multiArgs : !1,
- r = O(t)(F(e, n));
- return r === S && e._rejectCallback(r.e, !0), e._isFateSealed() || e._setAsyncGuaranteed(), e
- }, o.all = function(t) {
- return new x(t).promise()
- }, o.cast = function(t) {
- var e = k(t);
- return e instanceof o || (e = new o(w), e._captureStackTrace(), e._setFulfilled(), e._rejectionHandler0 = t), e
- }, o.resolve = o.fulfilled = o.cast, o.reject = o.rejected = function(t) {
- var e = new o(w);
- return e._captureStackTrace(), e._rejectCallback(t, !0), e
- }, o.setScheduler = function(t) {
- if ("function" != typeof t) throw new m("expecting a function but got " + d.classString(t));
- return y.setScheduler(t)
- }, o.prototype._then = function(t, e, n, r, i) {
- var s = void 0 !== i,
- a = s ? i : new o(w),
- u = this._target(),
- l = u._bitField;
- s || (a._propagateFrom(this, 3), a._captureStackTrace(), void 0 === r && 0 !== (2097152 & this._bitField) && (r = 0 !== (50397184 & l) ? this._boundValue() : u === this ? void 0 : this._boundTo), this._fireEvent("promiseChained", this, a));
- var f = c();
- if (0 !== (50397184 & l)) {
- var h, p, _ = u._settlePromiseCtx;
- 0 !== (33554432 & l) ? (p = u._rejectionHandler0, h = t) : 0 !== (16777216 & l) ? (p = u._fulfillmentHandler0, h = e, u._unsetRejectionIsUnhandled()) : (_ = u._settlePromiseLateCancellationObserver, p = new b("late cancellation observer"), u._attachExtraTrace(p), h = e), y.invoke(_, u, {
- handler: null === f ? h : "function" == typeof h && d.domainBind(f, h),
- promise: a,
- receiver: r,
- value: p
- })
- } else u._addCallbacks(t, e, a, r, f);
- return a
- }, o.prototype._length = function() {
- return 65535 & this._bitField
- }, o.prototype._isFateSealed = function() {
- return 0 !== (117506048 & this._bitField)
- }, o.prototype._isFollowing = function() {
- return 67108864 === (67108864 & this._bitField)
- }, o.prototype._setLength = function(t) {
- this._bitField = -65536 & this._bitField | 65535 & t
- }, o.prototype._setFulfilled = function() {
- this._bitField = 33554432 | this._bitField, this._fireEvent("promiseFulfilled", this)
- }, o.prototype._setRejected = function() {
- this._bitField = 16777216 | this._bitField, this._fireEvent("promiseRejected", this)
- }, o.prototype._setFollowing = function() {
- this._bitField = 67108864 | this._bitField, this._fireEvent("promiseResolved", this)
- }, o.prototype._setIsFinal = function() {
- this._bitField = 4194304 | this._bitField
- }, o.prototype._isFinal = function() {
- return (4194304 & this._bitField) > 0
- }, o.prototype._unsetCancelled = function() {
- this._bitField = -65537 & this._bitField
- }, o.prototype._setCancelled = function() {
- this._bitField = 65536 | this._bitField, this._fireEvent("promiseCancelled", this)
- }, o.prototype._setWillBeCancelled = function() {
- this._bitField = 8388608 | this._bitField
- }, o.prototype._setAsyncGuaranteed = function() {
- y.hasCustomScheduler() || (this._bitField = 134217728 | this._bitField)
- }, o.prototype._receiverAt = function(t) {
- var e = 0 === t ? this._receiver0 : this[4 * t - 4 + 3];
- return e === p ? void 0 : void 0 === e && this._isBound() ? this._boundValue() : e
- }, o.prototype._promiseAt = function(t) {
- return this[4 * t - 4 + 2]
- }, o.prototype._fulfillmentHandlerAt = function(t) {
- return this[4 * t - 4 + 0]
- }, o.prototype._rejectionHandlerAt = function(t) {
- return this[4 * t - 4 + 1]
- }, o.prototype._boundValue = function() {}, o.prototype._migrateCallback0 = function(t) {
- var e = (t._bitField, t._fulfillmentHandler0),
- n = t._rejectionHandler0,
- r = t._promise0,
- i = t._receiverAt(0);
- void 0 === i && (i = p), this._addCallbacks(e, n, r, i, null)
- }, o.prototype._migrateCallbackAt = function(t, e) {
- var n = t._fulfillmentHandlerAt(e),
- r = t._rejectionHandlerAt(e),
- i = t._promiseAt(e),
- o = t._receiverAt(e);
- void 0 === o && (o = p), this._addCallbacks(n, r, i, o, null)
- }, o.prototype._addCallbacks = function(t, e, n, r, i) {
- var o = this._length();
- if (o >= 65531 && (o = 0, this._setLength(0)), 0 === o) this._promise0 = n, this._receiver0 = r, "function" == typeof t && (this._fulfillmentHandler0 = null === i ? t : d.domainBind(i, t)), "function" == typeof e && (this._rejectionHandler0 = null === i ? e : d.domainBind(i, e));
- else {
- var s = 4 * o - 4;
- this[s + 2] = n, this[s + 3] = r, "function" == typeof t && (this[s + 0] = null === i ? t : d.domainBind(i, t)), "function" == typeof e && (this[s + 1] = null === i ? e : d.domainBind(i, e))
- }
- return this._setLength(o + 1), o
- }, o.prototype._proxy = function(t, e) {
- this._addCallbacks(void 0, void 0, e, t, null)
- }, o.prototype._resolveCallback = function(t, e) {
- if (0 === (117506048 & this._bitField)) {
- if (t === this) return this._rejectCallback(l(), !1);
- var n = k(t, this);
- if (!(n instanceof o)) return this._fulfill(t);
- e && this._propagateFrom(n, 2);
- var r = n._target();
- if (r === this) return void this._reject(l());
- var i = r._bitField;
- if (0 === (50397184 & i)) {
- var s = this._length();
- s > 0 && r._migrateCallback0(this);
- for (var a = 1; s > a; ++a) r._migrateCallbackAt(this, a);
- this._setFollowing(), this._setLength(0), this._setFollowee(r)
- } else if (0 !== (33554432 & i)) this._fulfill(r._value());
- else if (0 !== (16777216 & i)) this._reject(r._reason());
- else {
- var u = new b("late cancellation observer");
- r._attachExtraTrace(u), this._reject(u)
- }
- }
- }, o.prototype._rejectCallback = function(t, e, n) {
- var r = d.ensureErrorObject(t),
- i = r === t;
- if (!i && !n && A.warnings()) {
- var o = "a promise was rejected with a non-error: " + d.classString(t);
- this._warn(o, !0)
- }
- this._attachExtraTrace(r, e ? i : !1), this._reject(t)
- }, o.prototype._resolveFromExecutor = function(t) {
- var e = this;
- this._captureStackTrace(), this._pushContext();
- var n = !0,
- r = this._execute(t, function(t) {
- e._resolveCallback(t)
- }, function(t) {
- e._rejectCallback(t, n)
- });
- n = !1, this._popContext(), void 0 !== r && e._rejectCallback(r, !0)
- }, o.prototype._settlePromiseFromHandler = function(t, e, n, r) {
- var i = r._bitField;
- if (0 === (65536 & i)) {
- r._pushContext();
- var o;
- e === E ? n && "number" == typeof n.length ? o = O(t).apply(this._boundValue(), n) : (o = S, o.e = new m("cannot .spread() a non-array: " + d.classString(n))) : o = O(t).call(e, n);
- var s = r._popContext();
- i = r._bitField, 0 === (65536 & i) && (o === C ? r._reject(n) : o === S ? r._rejectCallback(o.e, !1) : (A.checkForgottenReturns(o, s, "", r, this), r._resolveCallback(o)))
- }
- }, o.prototype._target = function() {
- for (var t = this; t._isFollowing();) t = t._followee();
- return t
- }, o.prototype._followee = function() {
- return this._rejectionHandler0
- }, o.prototype._setFollowee = function(t) {
- this._rejectionHandler0 = t
- }, o.prototype._settlePromise = function(t, e, n, i) {
- var s = t instanceof o,
- a = this._bitField,
- u = 0 !== (134217728 & a);
- 0 !== (65536 & a) ? (s && t._invokeInternalOnCancel(), n instanceof P && n.isFinallyHandler() ? (n.cancelPromise = t, O(e).call(n, i) === S && t._reject(S.e)) : e === f ? t._fulfill(f.call(n)) : n instanceof r ? n._promiseCancelled(t) : s || t instanceof x ? t._cancel() : n.cancel()) : "function" == typeof e ? s ? (u && t._setAsyncGuaranteed(), this._settlePromiseFromHandler(e, n, i, t)) : e.call(n, i, t) : n instanceof r ? n._isResolved() || (0 !== (33554432 & a) ? n._promiseFulfilled(i, t) : n._promiseRejected(i, t)) : s && (u && t._setAsyncGuaranteed(), 0 !== (33554432 & a) ? t._fulfill(i) : t._reject(i))
- }, o.prototype._settlePromiseLateCancellationObserver = function(t) {
- var e = t.handler,
- n = t.promise,
- r = t.receiver,
- i = t.value;
- "function" == typeof e ? n instanceof o ? this._settlePromiseFromHandler(e, r, i, n) : e.call(r, i, n) : n instanceof o && n._reject(i)
- }, o.prototype._settlePromiseCtx = function(t) {
- this._settlePromise(t.promise, t.handler, t.receiver, t.value)
- }, o.prototype._settlePromise0 = function(t, e) {
- var n = this._promise0,
- r = this._receiverAt(0);
- this._promise0 = void 0, this._receiver0 = void 0, this._settlePromise(n, t, r, e)
- }, o.prototype._clearCallbackDataAtIndex = function(t) {
- var e = 4 * t - 4;
- this[e + 2] = this[e + 3] = this[e + 0] = this[e + 1] = void 0
- }, o.prototype._fulfill = function(t) {
- var e = this._bitField;
- if (!((117506048 & e) >>> 16)) {
- if (t === this) {
- var n = l();
- return this._attachExtraTrace(n), this._reject(n)
- }
- this._setFulfilled(), this._rejectionHandler0 = t, (65535 & e) > 0 && (0 !== (134217728 & e) ? this._settlePromises() : y.settlePromises(this))
- }
- }, o.prototype._reject = function(t) {
- var e = this._bitField;
- if (!((117506048 & e) >>> 16)) return this._setRejected(), this._fulfillmentHandler0 = t, this._isFinal() ? y.fatalError(t, d.isNode) : void((65535 & e) > 0 ? y.settlePromises(this) : this._ensurePossibleRejectionHandled())
- }, o.prototype._fulfillPromises = function(t, e) {
- for (var n = 1; t > n; n++) {
- var r = this._fulfillmentHandlerAt(n),
- i = this._promiseAt(n),
- o = this._receiverAt(n);
- this._clearCallbackDataAtIndex(n), this._settlePromise(i, r, o, e)
- }
- }, o.prototype._rejectPromises = function(t, e) {
- for (var n = 1; t > n; n++) {
- var r = this._rejectionHandlerAt(n),
- i = this._promiseAt(n),
- o = this._receiverAt(n);
- this._clearCallbackDataAtIndex(n), this._settlePromise(i, r, o, e)
- }
- }, o.prototype._settlePromises = function() {
- var t = this._bitField,
- e = 65535 & t;
- if (e > 0) {
- if (0 !== (16842752 & t)) {
- var n = this._fulfillmentHandler0;
- this._settlePromise0(this._rejectionHandler0, n, t), this._rejectPromises(e, n)
- } else {
- var r = this._rejectionHandler0;
- this._settlePromise0(this._fulfillmentHandler0, r, t), this._fulfillPromises(e, r)
- }
- this._setLength(0)
- }
- this._clearCancellationData()
- }, o.prototype._settledValue = function() {
- var t = this._bitField;
- return 0 !== (33554432 & t) ? this._rejectionHandler0 : 0 !== (16777216 & t) ? this._fulfillmentHandler0 : void 0
- }, o.defer = o.pending = function() {
- A.deprecated("Promise.defer", "new Promise");
- var t = new o(w);
- return {
- promise: t,
- resolve: s,
- reject: a
- }
- }, d.notEnumerableProp(o, "_makeSelfResolutionError", l), e("./method")(o, w, k, h, A), e("./bind")(o, w, k, A), e("./cancel")(o, x, h, A), e("./direct_resolve")(o), e("./synchronous_inspection")(o), e("./join")(o, x, k, w, y, c), o.Promise = o, o.version = "3.4.6", e("./map.js")(o, x, h, k, w, A), e("./call_get.js")(o), e("./using.js")(o, h, k, j, w, A), e("./timers.js")(o, w, A), e("./generators.js")(o, h, w, k, r, A), e("./nodeify.js")(o), e("./promisify.js")(o, w), e("./props.js")(o, x, k, h), e("./race.js")(o, w, k, h), e("./reduce.js")(o, x, h, k, w, A), e("./settle.js")(o, x, A), e("./some.js")(o, x, h), e("./filter.js")(o, w), e("./each.js")(o, w), e("./any.js")(o), d.toFastProperties(o), d.toFastProperties(o.prototype), u({
- a: 1
- }), u({
- b: 2
- }), u({
- c: 3
- }), u(1), u(function() {}), u(void 0), u(!1), u(new o(w)), A.setBounds(v.firstLineError, d.lastLineError), o
- }
- }, {
- "./any.js": 1,
- "./async": 2,
- "./bind": 3,
- "./call_get.js": 5,
- "./cancel": 6,
- "./catch_filter": 7,
- "./context": 8,
- "./debuggability": 9,
- "./direct_resolve": 10,
- "./each.js": 11,
- "./errors": 12,
- "./es5": 13,
- "./filter.js": 14,
- "./finally": 15,
- "./generators.js": 16,
- "./join": 17,
- "./map.js": 18,
- "./method": 19,
- "./nodeback": 20,
- "./nodeify.js": 21,
- "./promise_array": 23,
- "./promisify.js": 24,
- "./props.js": 25,
- "./race.js": 27,
- "./reduce.js": 28,
- "./settle.js": 30,
- "./some.js": 31,
- "./synchronous_inspection": 32,
- "./thenables": 33,
- "./timers.js": 34,
- "./using.js": 35,
- "./util": 36
- }],
- 23: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i, o) {
- function s(t) {
- switch (t) {
- case -2:
- return [];
- case -3:
- return {}
- }
- }
- function a(t) {
- var r = this._promise = new e(n);
- t instanceof e && r._propagateFrom(t, 3), r._setOnCancel(this), this._values = t, this._length = 0, this._totalResolved = 0, this._init(void 0, -2)
- } {
- var u = t("./util");
- u.isArray
- }
- return u.inherits(a, o), a.prototype.length = function() {
- return this._length
- }, a.prototype.promise = function() {
- return this._promise
- }, a.prototype._init = function c(t, n) {
- var o = r(this._values, this._promise);
- if (o instanceof e) {
- o = o._target();
- var a = o._bitField;
- if (this._values = o, 0 === (50397184 & a)) return this._promise._setAsyncGuaranteed(), o._then(c, this._reject, void 0, this, n);
- if (0 === (33554432 & a)) return 0 !== (16777216 & a) ? this._reject(o._reason()) : this._cancel();
- o = o._value()
- }
- if (o = u.asArray(o), null === o) {
- var l = i("expecting an array or an iterable object but got " + u.classString(o)).reason();
- return void this._promise._rejectCallback(l, !1)
- }
- return 0 === o.length ? void(-5 === n ? this._resolveEmptyArray() : this._resolve(s(n))) : void this._iterate(o)
- }, a.prototype._iterate = function(t) {
- var n = this.getActualLength(t.length);
- this._length = n, this._values = this.shouldCopyValues() ? new Array(n) : this._values;
- for (var i = this._promise, o = !1, s = null, a = 0; n > a; ++a) {
- var u = r(t[a], i);
- u instanceof e ? (u = u._target(), s = u._bitField) : s = null, o ? null !== s && u.suppressUnhandledRejections() : null !== s ? 0 === (50397184 & s) ? (u._proxy(this, a), this._values[a] = u) : o = 0 !== (33554432 & s) ? this._promiseFulfilled(u._value(), a) : 0 !== (16777216 & s) ? this._promiseRejected(u._reason(), a) : this._promiseCancelled(a) : o = this._promiseFulfilled(u, a)
- }
- o || i._setAsyncGuaranteed()
- }, a.prototype._isResolved = function() {
- return null === this._values
- }, a.prototype._resolve = function(t) {
- this._values = null, this._promise._fulfill(t)
- }, a.prototype._cancel = function() {
- !this._isResolved() && this._promise._isCancellable() && (this._values = null, this._promise._cancel())
- }, a.prototype._reject = function(t) {
- this._values = null, this._promise._rejectCallback(t, !1)
- }, a.prototype._promiseFulfilled = function(t, e) {
- this._values[e] = t;
- var n = ++this._totalResolved;
- return n >= this._length ? (this._resolve(this._values), !0) : !1
- }, a.prototype._promiseCancelled = function() {
- return this._cancel(), !0
- }, a.prototype._promiseRejected = function(t) {
- return this._totalResolved++, this._reject(t), !0
- }, a.prototype._resultCancelled = function() {
- if (!this._isResolved()) {
- var t = this._values;
- if (this._cancel(), t instanceof e) t.cancel();
- else
- for (var n = 0; n < t.length; ++n) t[n] instanceof e && t[n].cancel()
- }
- }, a.prototype.shouldCopyValues = function() {
- return !0
- }, a.prototype.getActualLength = function(t) {
- return t
- }, a
- }
- }, {
- "./util": 36
- }],
- 24: [function(t, e) {
- "use strict";
- e.exports = function(e, n) {
- function r(t) {
- return !E.test(t)
- }
- function i(t) {
- try {
- return t.__isPromisified__ === !0
- } catch (e) {
- return !1
- }
- }
- function o(t, e, n) {
- var r = p.getDataPropertyOrDefault(t, e + n, b);
- return r ? i(r) : !1
- }
- function s(t, e, n) {
- for (var r = 0; r < t.length; r += 2) {
- var i = t[r];
- if (n.test(i))
- for (var o = i.replace(n, ""), s = 0; s < t.length; s += 2)
- if (t[s] === o) throw new g("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s", e))
- }
- }
- function a(t, e, n, r) {
- for (var a = p.inheritedDataKeys(t), u = [], c = 0; c < a.length; ++c) {
- var l = a[c],
- f = t[l],
- h = r === C ? !0 : C(l, f, t);
- "function" != typeof f || i(f) || o(t, l, e) || !r(l, f, t, h) || u.push(l, f)
- }
- return s(u, e, n), u
- }
- function u(t, r, i, o, s, a) {
- function u() {
- var i = r;
- r === h && (i = this);
- var o = new e(n);
- o._captureStackTrace();
- var s = "string" == typeof l && this !== c ? this[l] : t,
- u = d(o, a);
- try {
- s.apply(i, _(arguments, u))
- } catch (f) {
- o._rejectCallback(v(f), !0, !0)
- }
- return o._isFateSealed() || o._setAsyncGuaranteed(), o
- }
- var c = function() {
- return this
- }(),
- l = t;
- return "string" == typeof l && (t = o), p.notEnumerableProp(u, "__isPromisified__", !0), u
- }
- function c(t, e, n, r, i) {
- for (var o = new RegExp(k(e) + "$"), s = a(t, e, o, n), u = 0, c = s.length; c > u; u += 2) {
- var l = s[u],
- f = s[u + 1],
- d = l + e;
- if (r === x) t[d] = x(l, h, l, f, e, i);
- else {
- var _ = r(f, function() {
- return x(l, h, l, f, e, i)
- });
- p.notEnumerableProp(_, "__isPromisified__", !0), t[d] = _
- }
- }
- return p.toFastProperties(t), t
- }
- function l(t, e, n) {
- return x(t, e, void 0, t, null, n)
- }
- var f, h = {},
- p = t("./util"),
- d = t("./nodeback"),
- _ = p.withAppended,
- v = p.maybeWrapAsError,
- y = p.canEvaluate,
- g = t("./errors").TypeError,
- m = "Async",
- b = {
- __isPromisified__: !0
- },
- w = ["arity", "length", "name", "arguments", "caller", "callee", "prototype", "__isPromisified__"],
- E = new RegExp("^(?:" + w.join("|") + ")$"),
- C = function(t) {
- return p.isIdentifier(t) && "_" !== t.charAt(0) && "constructor" !== t
- },
- k = function(t) {
- return t.replace(/([$])/, "\\$")
- },
- x = y ? f : u;
- e.promisify = function(t, e) {
- if ("function" != typeof t) throw new g("expecting a function but got " + p.classString(t));
- if (i(t)) return t;
- e = Object(e);
- var n = void 0 === e.context ? h : e.context,
- o = !!e.multiArgs,
- s = l(t, n, o);
- return p.copyDescriptors(t, s, r), s
- }, e.promisifyAll = function(t, e) {
- if ("function" != typeof t && "object" != typeof t) throw new g("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");
- e = Object(e);
- var n = !!e.multiArgs,
- r = e.suffix;
- "string" != typeof r && (r = m);
- var i = e.filter;
- "function" != typeof i && (i = C);
- var o = e.promisifier;
- if ("function" != typeof o && (o = x), !p.isIdentifier(r)) throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");
- for (var s = p.inheritedDataKeys(t), a = 0; a < s.length; ++a) {
- var u = t[s[a]];
- "constructor" !== s[a] && p.isClass(u) && (c(u.prototype, r, i, o, n), c(u, r, i, o, n))
- }
- return c(t, r, i, o, n)
- }
- }
- }, {
- "./errors": 12,
- "./nodeback": 20,
- "./util": 36
- }],
- 25: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i) {
- function o(t) {
- var e, n = !1;
- if (void 0 !== a && t instanceof a) e = f(t), n = !0;
- else {
- var r = l.keys(t),
- i = r.length;
- e = new Array(2 * i);
- for (var o = 0; i > o; ++o) {
- var s = r[o];
- e[o] = t[s], e[o + i] = s
- }
- }
- this.constructor$(e), this._isMap = n, this._init$(void 0, -3)
- }
- function s(t) {
- var n, s = r(t);
- return c(s) ? (n = s instanceof e ? s._then(e.props, void 0, void 0, void 0, void 0) : new o(s).promise(), s instanceof e && n._propagateFrom(s, 2), n) : i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")
- }
- var a, u = t("./util"),
- c = u.isObject,
- l = t("./es5");
- "function" == typeof Map && (a = Map);
- var f = function() {
- function t(t, r) {
- this[e] = t, this[e + n] = r, e++
- }
- var e = 0,
- n = 0;
- return function(r) {
- n = r.size, e = 0;
- var i = new Array(2 * r.size);
- return r.forEach(t, i), i
- }
- }(),
- h = function(t) {
- for (var e = new a, n = t.length / 2 | 0, r = 0; n > r; ++r) {
- var i = t[n + r],
- o = t[r];
- e.set(i, o)
- }
- return e
- };
- u.inherits(o, n), o.prototype._init = function() {}, o.prototype._promiseFulfilled = function(t, e) {
- this._values[e] = t;
- var n = ++this._totalResolved;
- if (n >= this._length) {
- var r;
- if (this._isMap) r = h(this._values);
- else {
- r = {};
- for (var i = this.length(), o = 0, s = this.length(); s > o; ++o) r[this._values[o + i]] = this._values[o]
- }
- return this._resolve(r), !0
- }
- return !1
- }, o.prototype.shouldCopyValues = function() {
- return !1
- }, o.prototype.getActualLength = function(t) {
- return t >> 1
- }, e.prototype.props = function() {
- return s(this)
- }, e.props = function(t) {
- return s(t)
- }
- }
- }, {
- "./es5": 13,
- "./util": 36
- }],
- 26: [function(t, e) {
- "use strict";
- function n(t, e, n, r, i) {
- for (var o = 0; i > o; ++o) n[o + r] = t[o + e], t[o + e] = void 0
- }
- function r(t) {
- this._capacity = t, this._length = 0, this._front = 0
- }
- r.prototype._willBeOverCapacity = function(t) {
- return this._capacity < t
- }, r.prototype._pushOne = function(t) {
- var e = this.length();
- this._checkCapacity(e + 1);
- var n = this._front + e & this._capacity - 1;
- this[n] = t, this._length = e + 1
- }, r.prototype._unshiftOne = function(t) {
- var e = this._capacity;
- this._checkCapacity(this.length() + 1);
- var n = this._front,
- r = (n - 1 & e - 1 ^ e) - e;
- this[r] = t, this._front = r, this._length = this.length() + 1
- }, r.prototype.unshift = function(t, e, n) {
- this._unshiftOne(n), this._unshiftOne(e), this._unshiftOne(t)
- }, r.prototype.push = function(t, e, n) {
- var r = this.length() + 3;
- if (this._willBeOverCapacity(r)) return this._pushOne(t), this._pushOne(e), void this._pushOne(n);
- var i = this._front + r - 3;
- this._checkCapacity(r);
- var o = this._capacity - 1;
- this[i + 0 & o] = t, this[i + 1 & o] = e, this[i + 2 & o] = n, this._length = r
- }, r.prototype.shift = function() {
- var t = this._front,
- e = this[t];
- return this[t] = void 0, this._front = t + 1 & this._capacity - 1, this._length--, e
- }, r.prototype.length = function() {
- return this._length
- }, r.prototype._checkCapacity = function(t) {
- this._capacity < t && this._resizeTo(this._capacity << 1)
- }, r.prototype._resizeTo = function(t) {
- var e = this._capacity;
- this._capacity = t;
- var r = this._front,
- i = this._length,
- o = r + i & e - 1;
- n(this, 0, this, e, o)
- }, e.exports = r
- }, {}],
- 27: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i) {
- function o(t, o) {
- var u = r(t);
- if (u instanceof e) return a(u);
- if (t = s.asArray(t), null === t) return i("expecting an array or an iterable object but got " + s.classString(t));
- var c = new e(n);
- void 0 !== o && c._propagateFrom(o, 3);
- for (var l = c._fulfill, f = c._reject, h = 0, p = t.length; p > h; ++h) {
- var d = t[h];
- (void 0 !== d || h in t) && e.cast(d)._then(l, f, void 0, c, null)
- }
- return c
- }
- var s = t("./util"),
- a = function(t) {
- return t.then(function(e) {
- return o(e, t)
- })
- };
- e.race = function(t) {
- return o(t, void 0)
- }, e.prototype.race = function() {
- return o(this, void 0)
- }
- }
- }, {
- "./util": 36
- }],
- 28: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i, o, s) {
- function a(t, n, r, i) {
- this.constructor$(t);
- var s = h();
- this._fn = null === s ? n : p.domainBind(s, n), void 0 !== r && (r = e.resolve(r), r._attachCancellationCallback(this)), this._initialValue = r, this._currentCancellable = null, this._eachValues = i === o ? Array(this._length) : 0 === i ? null : void 0, this._promise._captureStackTrace(), this._init$(void 0, -5)
- }
- function u(t, e) {
- this.isFulfilled() ? e._resolve(t) : e._reject(t)
- }
- function c(t, e, n, i) {
- if ("function" != typeof e) return r("expecting a function but got " + p.classString(e));
- var o = new a(t, e, n, i);
- return o.promise()
- }
- function l(t) {
- this.accum = t, this.array._gotAccum(t);
- var n = i(this.value, this.array._promise);
- return n instanceof e ? (this.array._currentCancellable = n, n._then(f, void 0, void 0, this, void 0)) : f.call(this, n)
- }
- function f(t) {
- var n = this.array,
- r = n._promise,
- i = d(n._fn);
- r._pushContext();
- var o;
- o = void 0 !== n._eachValues ? i.call(r._boundValue(), t, this.index, this.length) : i.call(r._boundValue(), this.accum, t, this.index, this.length), o instanceof e && (n._currentCancellable = o);
- var a = r._popContext();
- return s.checkForgottenReturns(o, a, void 0 !== n._eachValues ? "Promise.each" : "Promise.reduce", r), o
- }
- var h = e._getDomain,
- p = t("./util"),
- d = p.tryCatch;
- p.inherits(a, n), a.prototype._gotAccum = function(t) {
- void 0 !== this._eachValues && null !== this._eachValues && t !== o && this._eachValues.push(t)
- }, a.prototype._eachComplete = function(t) {
- return null !== this._eachValues && this._eachValues.push(t), this._eachValues
- }, a.prototype._init = function() {}, a.prototype._resolveEmptyArray = function() {
- this._resolve(void 0 !== this._eachValues ? this._eachValues : this._initialValue)
- }, a.prototype.shouldCopyValues = function() {
- return !1
- }, a.prototype._resolve = function(t) {
- this._promise._resolveCallback(t), this._values = null
- }, a.prototype._resultCancelled = function(t) {
- return t === this._initialValue ? this._cancel() : void(this._isResolved() || (this._resultCancelled$(), this._currentCancellable instanceof e && this._currentCancellable.cancel(), this._initialValue instanceof e && this._initialValue.cancel()))
- }, a.prototype._iterate = function(t) {
- this._values = t;
- var n, r, i = t.length;
- if (void 0 !== this._initialValue ? (n = this._initialValue, r = 0) : (n = e.resolve(t[0]), r = 1), this._currentCancellable = n, !n.isRejected())
- for (; i > r; ++r) {
- var o = {
- accum: null,
- value: t[r],
- index: r,
- length: i,
- array: this
- };
- n = n._then(l, void 0, void 0, o, void 0)
- }
- void 0 !== this._eachValues && (n = n._then(this._eachComplete, void 0, void 0, this, void 0)), n._then(u, u, void 0, n, this)
- }, e.prototype.reduce = function(t, e) {
- return c(this, t, e, null)
- }, e.reduce = function(t, e, n, r) {
- return c(t, e, n, r)
- }
- }
- }, {
- "./util": 36
- }],
- 29: [function(e, n) {
- "use strict";
- var i, o = e("./util"),
- s = function() {
- throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")
- },
- a = o.getNativePromise();
- if (o.isNode && "undefined" == typeof MutationObserver) {
- var u = r.setImmediate,
- c = t.nextTick;
- i = o.isRecentNode ? function(t) {
- u.call(r, t)
- } : function(e) {
- c.call(t, e)
- }
- } else if ("function" == typeof a && "function" == typeof a.resolve) {
- var l = a.resolve();
- i = function(t) {
- l.then(t)
- }
- } else i = "undefined" == typeof MutationObserver || "undefined" != typeof window && window.navigator && (window.navigator.standalone || window.cordova) ? "undefined" != typeof setImmediate ? function(t) {
- setImmediate(t)
- } : "undefined" != typeof setTimeout ? function(t) {
- setTimeout(t, 0)
- } : s : function() {
- var t = document.createElement("div"),
- e = {
- attributes: !0
- },
- n = !1,
- r = document.createElement("div"),
- i = new MutationObserver(function() {
- t.classList.toggle("foo"), n = !1
- });
- i.observe(r, e);
- var o = function() {
- n || (n = !0, r.classList.toggle("foo"))
- };
- return function(n) {
- var r = new MutationObserver(function() {
- r.disconnect(), n()
- });
- r.observe(t, e), o()
- }
- }();
- n.exports = i
- }, {
- "./util": 36
- }],
- 30: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r) {
- function i(t) {
- this.constructor$(t)
- }
- var o = e.PromiseInspection,
- s = t("./util");
- s.inherits(i, n), i.prototype._promiseResolved = function(t, e) {
- this._values[t] = e;
- var n = ++this._totalResolved;
- return n >= this._length ? (this._resolve(this._values), !0) : !1
- }, i.prototype._promiseFulfilled = function(t, e) {
- var n = new o;
- return n._bitField = 33554432, n._settledValueField = t, this._promiseResolved(e, n)
- }, i.prototype._promiseRejected = function(t, e) {
- var n = new o;
- return n._bitField = 16777216, n._settledValueField = t, this._promiseResolved(e, n)
- }, e.settle = function(t) {
- return r.deprecated(".settle()", ".reflect()"), new i(t).promise()
- }, e.prototype.settle = function() {
- return e.settle(this)
- }
- }
- }, {
- "./util": 36
- }],
- 31: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r) {
- function i(t) {
- this.constructor$(t), this._howMany = 0, this._unwrap = !1, this._initialized = !1
- }
- function o(t, e) {
- if ((0 | e) !== e || 0 > e) return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");
- var n = new i(t),
- o = n.promise();
- return n.setHowMany(e), n.init(), o
- }
- var s = t("./util"),
- a = t("./errors").RangeError,
- u = t("./errors").AggregateError,
- c = s.isArray,
- l = {};
- s.inherits(i, n), i.prototype._init = function() {
- if (this._initialized) {
- if (0 === this._howMany) return void this._resolve([]);
- this._init$(void 0, -5);
- var t = c(this._values);
- !this._isResolved() && t && this._howMany > this._canPossiblyFulfill() && this._reject(this._getRangeError(this.length()))
- }
- }, i.prototype.init = function() {
- this._initialized = !0, this._init()
- }, i.prototype.setUnwrap = function() {
- this._unwrap = !0
- }, i.prototype.howMany = function() {
- return this._howMany
- }, i.prototype.setHowMany = function(t) {
- this._howMany = t
- }, i.prototype._promiseFulfilled = function(t) {
- return this._addFulfilled(t), this._fulfilled() === this.howMany() ? (this._values.length = this.howMany(), this._resolve(1 === this.howMany() && this._unwrap ? this._values[0] : this._values), !0) : !1
- }, i.prototype._promiseRejected = function(t) {
- return this._addRejected(t), this._checkOutcome()
- }, i.prototype._promiseCancelled = function() {
- return this._values instanceof e || null == this._values ? this._cancel() : (this._addRejected(l), this._checkOutcome())
- }, i.prototype._checkOutcome = function() {
- if (this.howMany() > this._canPossiblyFulfill()) {
- for (var t = new u, e = this.length(); e < this._values.length; ++e) this._values[e] !== l && t.push(this._values[e]);
- return t.length > 0 ? this._reject(t) : this._cancel(), !0
- }
- return !1
- }, i.prototype._fulfilled = function() {
- return this._totalResolved
- }, i.prototype._rejected = function() {
- return this._values.length - this.length()
- }, i.prototype._addRejected = function(t) {
- this._values.push(t)
- }, i.prototype._addFulfilled = function(t) {
- this._values[this._totalResolved++] = t
- }, i.prototype._canPossiblyFulfill = function() {
- return this.length() - this._rejected()
- }, i.prototype._getRangeError = function(t) {
- var e = "Input array must contain at least " + this._howMany + " items but contains only " + t + " items";
- return new a(e)
- }, i.prototype._resolveEmptyArray = function() {
- this._reject(this._getRangeError(0))
- }, e.some = function(t, e) {
- return o(t, e)
- }, e.prototype.some = function(t) {
- return o(this, t)
- }, e._SomePromiseArray = i
- }
- }, {
- "./errors": 12,
- "./util": 36
- }],
- 32: [function(t, e) {
- "use strict";
- e.exports = function(t) {
- function e(t) {
- void 0 !== t ? (t = t._target(), this._bitField = t._bitField, this._settledValueField = t._isFateSealed() ? t._settledValue() : void 0) : (this._bitField = 0, this._settledValueField = void 0)
- }
- e.prototype._settledValue = function() {
- return this._settledValueField
- };
- var n = e.prototype.value = function() {
- if (!this.isFulfilled()) throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");
- return this._settledValue()
- },
- r = e.prototype.error = e.prototype.reason = function() {
- if (!this.isRejected()) throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");
- return this._settledValue()
- },
- i = e.prototype.isFulfilled = function() {
- return 0 !== (33554432 & this._bitField)
- },
- o = e.prototype.isRejected = function() {
- return 0 !== (16777216 & this._bitField)
- },
- s = e.prototype.isPending = function() {
- return 0 === (50397184 & this._bitField)
- },
- a = e.prototype.isResolved = function() {
- return 0 !== (50331648 & this._bitField)
- };
- e.prototype.isCancelled = function() {
- return 0 !== (8454144 & this._bitField)
- }, t.prototype.__isCancelled = function() {
- return 65536 === (65536 & this._bitField)
- }, t.prototype._isCancelled = function() {
- return this._target().__isCancelled()
- }, t.prototype.isCancelled = function() {
- return 0 !== (8454144 & this._target()._bitField)
- }, t.prototype.isPending = function() {
- return s.call(this._target())
- }, t.prototype.isRejected = function() {
- return o.call(this._target())
- }, t.prototype.isFulfilled = function() {
- return i.call(this._target())
- }, t.prototype.isResolved = function() {
- return a.call(this._target())
- }, t.prototype.value = function() {
- return n.call(this._target())
- }, t.prototype.reason = function() {
- var t = this._target();
- return t._unsetRejectionIsUnhandled(), r.call(t)
- }, t.prototype._value = function() {
- return this._settledValue()
- }, t.prototype._reason = function() {
- return this._unsetRejectionIsUnhandled(), this._settledValue()
- }, t.PromiseInspection = e
- }
- }, {}],
- 33: [function(t, e) {
- "use strict";
- e.exports = function(e, n) {
- function r(t, r) {
- if (l(t)) {
- if (t instanceof e) return t;
- var i = o(t);
- if (i === c) {
- r && r._pushContext();
- var u = e.reject(i.e);
- return r && r._popContext(), u
- }
- if ("function" == typeof i) {
- if (s(t)) {
- var u = new e(n);
- return t._then(u._fulfill, u._reject, void 0, u, null), u
- }
- return a(t, i, r)
- }
- }
- return t
- }
- function i(t) {
- return t.then
- }
- function o(t) {
- try {
- return i(t)
- } catch (e) {
- return c.e = e, c
- }
- }
- function s(t) {
- try {
- return f.call(t, "_promise0")
- } catch (e) {
- return !1
- }
- }
- function a(t, r, i) {
- function o(t) {
- a && (a._resolveCallback(t), a = null)
- }
- function s(t) {
- a && (a._rejectCallback(t, f, !0), a = null)
- }
- var a = new e(n),
- l = a;
- i && i._pushContext(), a._captureStackTrace(), i && i._popContext();
- var f = !0,
- h = u.tryCatch(r).call(t, o, s);
- return f = !1, a && h === c && (a._rejectCallback(h.e, !0, !0), a = null), l
- }
- var u = t("./util"),
- c = u.errorObj,
- l = u.isObject,
- f = {}.hasOwnProperty;
- return r
- }
- }, {
- "./util": 36
- }],
- 34: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r) {
- function i(t) {
- this.handle = t
- }
- function o(t) {
- return clearTimeout(this.handle), t
- }
- function s(t) {
- throw clearTimeout(this.handle), t
- }
- var a = t("./util"),
- u = e.TimeoutError;
- i.prototype._resultCancelled = function() {
- clearTimeout(this.handle)
- };
- var c = function(t) {
- return l(+this).thenReturn(t)
- },
- l = e.delay = function(t, o) {
- var s, a;
- return void 0 !== o ? (s = e.resolve(o)._then(c, null, null, t, void 0), r.cancellation() && o instanceof e && s._setOnCancel(o)) : (s = new e(n), a = setTimeout(function() {
- s._fulfill()
- }, +t), r.cancellation() && s._setOnCancel(new i(a)), s._captureStackTrace()), s._setAsyncGuaranteed(), s
- };
- e.prototype.delay = function(t) {
- return l(t, this)
- };
- var f = function(t, e, n) {
- var r;
- r = "string" != typeof e ? e instanceof Error ? e : new u("operation timed out") : new u(e), a.markAsOriginatingFromRejection(r), t._attachExtraTrace(r), t._reject(r), null != n && n.cancel()
- };
- e.prototype.timeout = function(t, e) {
- t = +t;
- var n, a, u = new i(setTimeout(function() {
- n.isPending() && f(n, e, a)
- }, t));
- return r.cancellation() ? (a = this.then(), n = a._then(o, s, void 0, u, void 0), n._setOnCancel(u)) : n = this._then(o, s, void 0, u, void 0), n
- }
- }
- }, {
- "./util": 36
- }],
- 35: [function(t, e) {
- "use strict";
- e.exports = function(e, n, r, i, o, s) {
- function a(t) {
- setTimeout(function() {
- throw t
- }, 0)
- }
- function u(t) {
- var e = r(t);
- return e !== t && "function" == typeof t._isDisposable && "function" == typeof t._getDisposer && t._isDisposable() && e._setDisposable(t._getDisposer()), e
- }
- function c(t, n) {
- function i() {
- if (s >= c) return l._fulfill();
- var o = u(t[s++]);
- if (o instanceof e && o._isDisposable()) {
- try {
- o = r(o._getDisposer().tryDispose(n), t.promise)
- } catch (f) {
- return a(f)
- }
- if (o instanceof e) return o._then(i, a, null, null, null)
- }
- i()
- }
- var s = 0,
- c = t.length,
- l = new e(o);
- return i(), l
- }
- function l(t, e, n) {
- this._data = t, this._promise = e, this._context = n
- }
- function f(t, e, n) {
- this.constructor$(t, e, n)
- }
- function h(t) {
- return l.isDisposer(t) ? (this.resources[this.index]._setDisposable(t), t.promise()) : t
- }
- function p(t) {
- this.length = t, this.promise = null, this[t - 1] = null
- }
- var d = t("./util"),
- _ = t("./errors").TypeError,
- v = t("./util").inherits,
- y = d.errorObj,
- g = d.tryCatch,
- m = {};
- l.prototype.data = function() {
- return this._data
- }, l.prototype.promise = function() {
- return this._promise
- }, l.prototype.resource = function() {
- return this.promise().isFulfilled() ? this.promise().value() : m
- }, l.prototype.tryDispose = function(t) {
- var e = this.resource(),
- n = this._context;
- void 0 !== n && n._pushContext();
- var r = e !== m ? this.doDispose(e, t) : null;
- return void 0 !== n && n._popContext(), this._promise._unsetDisposable(), this._data = null, r
- }, l.isDisposer = function(t) {
- return null != t && "function" == typeof t.resource && "function" == typeof t.tryDispose
- }, v(f, l), f.prototype.doDispose = function(t, e) {
- var n = this.data();
- return n.call(t, t, e)
- }, p.prototype._resultCancelled = function() {
- for (var t = this.length, n = 0; t > n; ++n) {
- var r = this[n];
- r instanceof e && r.cancel()
- }
- }, e.using = function() {
- var t = arguments.length;
- if (2 > t) return n("you must pass at least 2 arguments to Promise.using");
- var i = arguments[t - 1];
- if ("function" != typeof i) return n("expecting a function but got " + d.classString(i));
- var o, a = !0;
- 2 === t && Array.isArray(arguments[0]) ? (o = arguments[0], t = o.length, a = !1) : (o = arguments, t--);
- for (var u = new p(t), f = 0; t > f; ++f) {
- var _ = o[f];
- if (l.isDisposer(_)) {
- var v = _;
- _ = _.promise(), _._setDisposable(v)
- } else {
- var m = r(_);
- m instanceof e && (_ = m._then(h, null, null, {
- resources: u,
- index: f
- }, void 0))
- }
- u[f] = _
- }
- for (var b = new Array(u.length), f = 0; f < b.length; ++f) b[f] = e.resolve(u[f]).reflect();
- var w = e.all(b).then(function(t) {
- for (var e = 0; e < t.length; ++e) {
- var n = t[e];
- if (n.isRejected()) return y.e = n.error(), y;
- if (!n.isFulfilled()) return void w.cancel();
- t[e] = n.value()
- }
- E._pushContext(), i = g(i);
- var r = a ? i.apply(void 0, t) : i(t),
- o = E._popContext();
- return s.checkForgottenReturns(r, o, "Promise.using", E), r
- }),
- E = w.lastly(function() {
- var t = new e.PromiseInspection(w);
- return c(u, t)
- });
- return u.promise = E, E._setOnCancel(u), E
- }, e.prototype._setDisposable = function(t) {
- this._bitField = 131072 | this._bitField, this._disposer = t
- }, e.prototype._isDisposable = function() {
- return (131072 & this._bitField) > 0
- }, e.prototype._getDisposer = function() {
- return this._disposer
- }, e.prototype._unsetDisposable = function() {
- this._bitField = -131073 & this._bitField, this._disposer = void 0
- }, e.prototype.disposer = function(t) {
- if ("function" == typeof t) return new f(t, this, i());
- throw new _
- }
- }
- }, {
- "./errors": 12,
- "./util": 36
- }],
- 36: [function(e, n, i) {
- "use strict";
- function o() {
- try {
- var t = F;
- return F = null, t.apply(this, arguments)
- } catch (e) {
- return R.e = e, R
- }
- }
- function s(t) {
- return F = t, o
- }
- function a(t) {
- return null == t || t === !0 || t === !1 || "string" == typeof t || "number" == typeof t
- }
- function u(t) {
- return "function" == typeof t || "object" == typeof t && null !== t
- }
- function c(t) {
- return a(t) ? new Error(g(t)) : t
- }
- function l(t, e) {
- var n, r = t.length,
- i = new Array(r + 1);
- for (n = 0; r > n; ++n) i[n] = t[n];
- return i[n] = e, i
- }
- function f(t, e, n) {
- if (!A.isES5) return {}.hasOwnProperty.call(t, e) ? t[e] : void 0;
- var r = Object.getOwnPropertyDescriptor(t, e);
- return null != r ? null == r.get && null == r.set ? r.value : n : void 0
- }
- function h(t, e, n) {
- if (a(t)) return t;
- var r = {
- value: n,
- configurable: !0,
- enumerable: !1,
- writable: !0
- };
- return A.defineProperty(t, e, r), t
- }
- function p(t) {
- throw t
- }
- function d(t) {
- try {
- if ("function" == typeof t) {
- var e = A.names(t.prototype),
- n = A.isES5 && e.length > 1,
- r = e.length > 0 && !(1 === e.length && "constructor" === e[0]),
- i = D.test(t + "") && A.names(t).length > 0;
- if (n || r || i) return !0
- }
- return !1
- } catch (o) {
- return !1
- }
- }
- function _(t) {
- function e() {}
- e.prototype = t;
- for (var n = 8; n--;) new e;
- return t
- }
- function v(t) {
- return U.test(t)
- }
- function y(t, e, n) {
- for (var r = new Array(t), i = 0; t > i; ++i) r[i] = e + i + n;
- return r
- }
- function g(t) {
- try {
- return t + ""
- } catch (e) {
- return "[no string representation]"
- }
- }
- function m(t) {
- return null !== t && "object" == typeof t && "string" == typeof t.message && "string" == typeof t.name
- }
- function b(t) {
- try {
- h(t, "isOperational", !0)
- } catch (e) {}
- }
- function w(t) {
- return null == t ? !1 : t instanceof Error.__BluebirdErrorTypes__.OperationalError || t.isOperational === !0
- }
- function E(t) {
- return m(t) && A.propertyIsWritable(t, "stack")
- }
- function C(t) {
- return {}.toString.call(t)
- }
- function k(t, e, n) {
- for (var r = A.names(t), i = 0; i < r.length; ++i) {
- var o = r[i];
- if (n(o)) try {
- A.defineProperty(e, o, A.getDescriptor(t, o))
- } catch (s) {}
- }
- }
- function x(e, n) {
- return N ? t.env[e] : n
- }
- function T() {
- if ("function" == typeof Promise) try {
- var t = new Promise(function() {});
- if ("[object Promise]" === {}.toString.call(t)) return Promise
- } catch (e) {}
- }
- function j(t, e) {
- return t.bind(e)
- }
- var A = e("./es5"),
- P = "undefined" == typeof navigator,
- R = {
- e: {}
- },
- F, S = "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof r ? r : void 0 !== this ? this : null,
- O = function(t, e) {
- function n() {
- this.constructor = t, this.constructor$ = e;
- for (var n in e.prototype) r.call(e.prototype, n) && "$" !== n.charAt(n.length - 1) && (this[n + "$"] = e.prototype[n])
- }
- var r = {}.hasOwnProperty;
- return n.prototype = e.prototype, t.prototype = new n, t.prototype
- },
- B = function() {
- var t = [Array.prototype, Object.prototype, Function.prototype],
- e = function(e) {
- for (var n = 0; n < t.length; ++n)
- if (t[n] === e) return !0;
- return !1
- };
- if (A.isES5) {
- var n = Object.getOwnPropertyNames;
- return function(t) {
- for (var r = [], i = Object.create(null); null != t && !e(t);) {
- var o;
- try {
- o = n(t)
- } catch (s) {
- return r
- }
- for (var a = 0; a < o.length; ++a) {
- var u = o[a];
- if (!i[u]) {
- i[u] = !0;
- var c = Object.getOwnPropertyDescriptor(t, u);
- null != c && null == c.get && null == c.set && r.push(u)
- }
- }
- t = A.getPrototypeOf(t)
- }
- return r
- }
- }
- var r = {}.hasOwnProperty;
- return function(n) {
- if (e(n)) return [];
- var i = [];
- t: for (var o in n)
- if (r.call(n, o)) i.push(o);
- else {
- for (var s = 0; s < t.length; ++s)
- if (r.call(t[s], o)) continue t;
- i.push(o)
- }
- return i
- }
- }(),
- D = /this\s*\.\s*\S+\s*=/,
- U = /^[a-z$_][a-z$_0-9]*$/i,
- I = function() {
- return "stack" in new Error ? function(t) {
- return E(t) ? t : new Error(g(t))
- } : function(t) {
- if (E(t)) return t;
- try {
- throw new Error(g(t))
- } catch (e) {
- return e
- }
- }
- }(),
- L = function(t) {
- return A.isArray(t) ? t : null
- };
- if ("undefined" != typeof Symbol && Symbol.iterator) {
- var M = "function" == typeof Array.from ? function(t) {
- return Array.from(t)
- } : function(t) {
- for (var e, n = [], r = t[Symbol.iterator](); !(e = r.next()).done;) n.push(e.value);
- return n
- };
- L = function(t) {
- return A.isArray(t) ? t : null != t && "function" == typeof t[Symbol.iterator] ? M(t) : null
- }
- }
- var N = "undefined" != typeof t && "[object process]" === C(t).toLowerCase(),
- V = {
- isClass: d,
- isIdentifier: v,
- inheritedDataKeys: B,
- getDataPropertyOrDefault: f,
- thrower: p,
- isArray: A.isArray,
- asArray: L,
- notEnumerableProp: h,
- isPrimitive: a,
- isObject: u,
- isError: m,
- canEvaluate: P,
- errorObj: R,
- tryCatch: s,
- inherits: O,
- withAppended: l,
- maybeWrapAsError: c,
- toFastProperties: _,
- filledRange: y,
- toString: g,
- canAttachTrace: E,
- ensureErrorObject: I,
- originatesFromRejection: w,
- markAsOriginatingFromRejection: b,
- classString: C,
- copyDescriptors: k,
- hasDevTools: "undefined" != typeof chrome && chrome && "function" == typeof chrome.loadTimes,
- isNode: N,
- env: x,
- global: S,
- getNativePromise: T,
- domainBind: j
- };
- V.isRecentNode = V.isNode && function() {
- var e = t.versions.node.split(".").map(Number);
- return 0 === e[0] && e[1] > 10 || e[0] > 0
- }(), V.isNode && V.toFastProperties(t);
- try {
- throw new Error
- } catch (H) {
- V.lastLineError = H
- }
- n.exports = V
- }, {
- "./es5": 13
- }]
- }, {}, [4])(4)
- }), "undefined" != typeof window && null !== window ? window.P = window.Promise : "undefined" != typeof self && null !== self && (self.P = self.Promise)
- }).call(this, t("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
- }, {
- _process: 11
- }],
- 3: [function(t, e) {
- ! function(t, n) {
- "undefined" != typeof e && e.exports ? e.exports = n() : "function" == typeof define && define.amd ? define(t, n) : this[t] = n()
- }("bowser", function() {
- function t(t) {
- function e(e) {
- var n = t.match(e);
- return n && n.length > 1 && n[1] || ""
- }
- function n(e) {
- var n = t.match(e);
- return n && n.length > 1 && n[2] || ""
- }
- var r, i = e(/(ipod|iphone|ipad)/i).toLowerCase(),
- o = /like android/i.test(t),
- a = !o && /android/i.test(t),
- u = /nexus\s*[0-6]\s*/i.test(t),
- c = !u && /nexus\s*[0-9]+/i.test(t),
- l = /CrOS/.test(t),
- f = /silk/i.test(t),
- h = /sailfish/i.test(t),
- p = /tizen/i.test(t),
- d = /(web|hpw)os/i.test(t),
- _ = /windows phone/i.test(t),
- v = (/SamsungBrowser/i.test(t), !_ && /windows/i.test(t)),
- y = !i && !f && /macintosh/i.test(t),
- g = !a && !h && !p && !d && /linux/i.test(t),
- m = e(/edge\/(\d+(\.\d+)?)/i),
- b = e(/version\/(\d+(\.\d+)?)/i),
- w = /tablet/i.test(t),
- E = !w && /[^-]mobi/i.test(t),
- C = /xbox/i.test(t);
- /opera|opr|opios/i.test(t) ? r = {
- name: "Opera",
- opera: s,
- version: b || e(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)
- } : /SamsungBrowser/i.test(t) ? r = {
- name: "Samsung Internet for Android",
- samsungBrowser: s,
- version: b || e(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)
- } : /coast/i.test(t) ? r = {
- name: "Opera Coast",
- coast: s,
- version: b || e(/(?:coast)[\s\/](\d+(\.\d+)?)/i)
- } : /yabrowser/i.test(t) ? r = {
- name: "Yandex Browser",
- yandexbrowser: s,
- version: b || e(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)
- } : /ucbrowser/i.test(t) ? r = {
- name: "UC Browser",
- ucbrowser: s,
- version: e(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)
- } : /mxios/i.test(t) ? r = {
- name: "Maxthon",
- maxthon: s,
- version: e(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)
- } : /epiphany/i.test(t) ? r = {
- name: "Epiphany",
- epiphany: s,
- version: e(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)
- } : /puffin/i.test(t) ? r = {
- name: "Puffin",
- puffin: s,
- version: e(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)
- } : /sleipnir/i.test(t) ? r = {
- name: "Sleipnir",
- sleipnir: s,
- version: e(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)
- } : /k-meleon/i.test(t) ? r = {
- name: "K-Meleon",
- kMeleon: s,
- version: e(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)
- } : _ ? (r = {
- name: "Windows Phone",
- windowsphone: s
- }, m ? (r.msedge = s, r.version = m) : (r.msie = s, r.version = e(/iemobile\/(\d+(\.\d+)?)/i))) : /msie|trident/i.test(t) ? r = {
- name: "Internet Explorer",
- msie: s,
- version: e(/(?:msie |rv:)(\d+(\.\d+)?)/i)
- } : l ? r = {
- name: "Chrome",
- chromeos: s,
- chromeBook: s,
- chrome: s,
- version: e(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
- } : /chrome.+? edge/i.test(t) ? r = {
- name: "Microsoft Edge",
- msedge: s,
- version: m
- } : /vivaldi/i.test(t) ? r = {
- name: "Vivaldi",
- vivaldi: s,
- version: e(/vivaldi\/(\d+(\.\d+)?)/i) || b
- } : h ? r = {
- name: "Sailfish",
- sailfish: s,
- version: e(/sailfish\s?browser\/(\d+(\.\d+)?)/i)
- } : /seamonkey\//i.test(t) ? r = {
- name: "SeaMonkey",
- seamonkey: s,
- version: e(/seamonkey\/(\d+(\.\d+)?)/i)
- } : /firefox|iceweasel|fxios/i.test(t) ? (r = {
- name: "Firefox",
- firefox: s,
- version: e(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)
- }, /\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t) && (r.firefoxos = s)) : f ? r = {
- name: "Amazon Silk",
- silk: s,
- version: e(/silk\/(\d+(\.\d+)?)/i)
- } : /phantom/i.test(t) ? r = {
- name: "PhantomJS",
- phantom: s,
- version: e(/phantomjs\/(\d+(\.\d+)?)/i)
- } : /slimerjs/i.test(t) ? r = {
- name: "SlimerJS",
- slimer: s,
- version: e(/slimerjs\/(\d+(\.\d+)?)/i)
- } : /blackberry|\bbb\d+/i.test(t) || /rim\stablet/i.test(t) ? r = {
- name: "BlackBerry",
- blackberry: s,
- version: b || e(/blackberry[\d]+\/(\d+(\.\d+)?)/i)
- } : d ? (r = {
- name: "WebOS",
- webos: s,
- version: b || e(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)
- }, /touchpad\//i.test(t) && (r.touchpad = s)) : /bada/i.test(t) ? r = {
- name: "Bada",
- bada: s,
- version: e(/dolfin\/(\d+(\.\d+)?)/i)
- } : p ? r = {
- name: "Tizen",
- tizen: s,
- version: e(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || b
- } : /qupzilla/i.test(t) ? r = {
- name: "QupZilla",
- qupzilla: s,
- version: e(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || b
- } : /chromium/i.test(t) ? r = {
- name: "Chromium",
- chromium: s,
- version: e(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || b
- } : /chrome|crios|crmo/i.test(t) ? r = {
- name: "Chrome",
- chrome: s,
- version: e(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
- } : a ? r = {
- name: "Android",
- version: b
- } : /safari|applewebkit/i.test(t) ? (r = {
- name: "Safari",
- safari: s
- }, b && (r.version = b)) : i ? (r = {
- name: "iphone" == i ? "iPhone" : "ipad" == i ? "iPad" : "iPod"
- }, b && (r.version = b)) : r = /googlebot/i.test(t) ? {
- name: "Googlebot",
- googlebot: s,
- version: e(/googlebot\/(\d+(\.\d+))/i) || b
- } : {
- name: e(/^(.*)\/(.*) /),
- version: n(/^(.*)\/(.*) /)
- }, !r.msedge && /(apple)?webkit/i.test(t) ? (/(apple)?webkit\/537\.36/i.test(t) ? (r.name = r.name || "Blink", r.blink = s) : (r.name = r.name || "Webkit", r.webkit = s), !r.version && b && (r.version = b)) : !r.opera && /gecko\//i.test(t) && (r.name = r.name || "Gecko", r.gecko = s, r.version = r.version || e(/gecko\/(\d+(\.\d+)?)/i)), r.msedge || !a && !r.silk ? i ? (r[i] = s, r.ios = s) : y ? r.mac = s : C ? r.xbox = s : v ? r.windows = s : g && (r.linux = s) : r.android = s;
- var k = "";
- r.windowsphone ? k = e(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i) : i ? (k = e(/os (\d+([_\s]\d+)*) like mac os x/i), k = k.replace(/[_\s]/g, ".")) : a ? k = e(/android[ \/-](\d+(\.\d+)*)/i) : r.webos ? k = e(/(?:web|hpw)os\/(\d+(\.\d+)*)/i) : r.blackberry ? k = e(/rim\stablet\sos\s(\d+(\.\d+)*)/i) : r.bada ? k = e(/bada\/(\d+(\.\d+)*)/i) : r.tizen && (k = e(/tizen[\/\s](\d+(\.\d+)*)/i)), k && (r.osversion = k);
- var x = k.split(".")[0];
- return w || c || "ipad" == i || a && (3 == x || x >= 4 && !E) || r.silk ? r.tablet = s : (E || "iphone" == i || "ipod" == i || a || u || r.blackberry || r.webos || r.bada) && (r.mobile = s), r.msedge || r.msie && r.version >= 10 || r.yandexbrowser && r.version >= 15 || r.vivaldi && r.version >= 1 || r.chrome && r.version >= 20 || r.samsungBrowser && r.version >= 4 || r.firefox && r.version >= 20 || r.safari && r.version >= 6 || r.opera && r.version >= 10 || r.ios && r.osversion && r.osversion.split(".")[0] >= 6 || r.blackberry && r.version >= 10.1 || r.chromium && r.version >= 20 ? r.a = s : r.msie && r.version < 10 || r.chrome && r.version < 20 || r.firefox && r.version < 20 || r.safari && r.version < 6 || r.opera && r.version < 10 || r.ios && r.osversion && r.osversion.split(".")[0] < 6 || r.chromium && r.version < 20 ? r.c = s : r.x = s, r
- }
- function e(t) {
- return t.split(".").length
- }
- function n(t, e) {
- var n, r = [];
- if (Array.prototype.map) return Array.prototype.map.call(t, e);
- for (n = 0; n < t.length; n++) r.push(e(t[n]));
- return r
- }
- function r(t) {
- for (var r = Math.max(e(t[0]), e(t[1])), i = n(t, function(t) {
- var i = r - e(t);
- return t += new Array(i + 1).join(".0"), n(t.split("."), function(t) {
- return new Array(20 - t.length).join("0") + t
- }).reverse()
- }); --r >= 0;) {
- if (i[0][r] > i[1][r]) return 1;
- if (i[0][r] !== i[1][r]) return -1;
- if (0 === r) return 0
- }
- }
- function i(e, n, i) {
- var o = a;
- "string" == typeof n && (i = n, n = void 0), void 0 === n && (n = !1), i && (o = t(i));
- var s = "" + o.version;
- for (var u in e)
- if (e.hasOwnProperty(u) && o[u]) return r([s, e[u]]) < 0;
- return n
- }
- function o(t, e, n) {
- return !i(t, e, n)
- }
- var s = !0,
- a = t("undefined" != typeof navigator ? navigator.userAgent || "" : "");
- return a.test = function(t) {
- for (var e = 0; e < t.length; ++e) {
- var n = t[e];
- if ("string" == typeof n && n in a) return !0
- }
- return !1
- }, a.isUnsupportedBrowser = i, a.compareVersions = r, a.check = o, a._detect = t, a
- })
- }, {}],
- 4: [function(t, e, n) {
- (function(e) {
- "use strict";
- function r() {
- try {
- var t = new Uint8Array(1);
- return t.__proto__ = {
- __proto__: Uint8Array.prototype,
- foo: function() {
- return 42
- }
- }, 42 === t.foo() && "function" == typeof t.subarray && 0 === t.subarray(1, 1).byteLength
- } catch (e) {
- return !1
- }
- }
- function i() {
- return s.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
- }
- function o(t, e) {
- if (i() < e) throw new RangeError("Invalid typed array length");
- return s.TYPED_ARRAY_SUPPORT ? (t = new Uint8Array(e), t.__proto__ = s.prototype) : (null === t && (t = new s(e)), t.length = e), t
- }
- function s(t, e, n) {
- if (!(s.TYPED_ARRAY_SUPPORT || this instanceof s)) return new s(t, e, n);
- if ("number" == typeof t) {
- if ("string" == typeof e) throw new Error("If encoding is specified then the first argument must be a string");
- return l(this, t)
- }
- return a(this, t, e, n)
- }
- function a(t, e, n, r) {
- if ("number" == typeof e) throw new TypeError('"value" argument must not be a number');
- return "undefined" != typeof ArrayBuffer && e instanceof ArrayBuffer ? p(t, e, n, r) : "string" == typeof e ? f(t, e, n) : d(t, e)
- }
- function u(t) {
- if ("number" != typeof t) throw new TypeError('"size" argument must be a number');
- if (0 > t) throw new RangeError('"size" argument must not be negative')
- }
- function c(t, e, n, r) {
- return u(e), 0 >= e ? o(t, e) : void 0 !== n ? "string" == typeof r ? o(t, e).fill(n, r) : o(t, e).fill(n) : o(t, e)
- }
- function l(t, e) {
- if (u(e), t = o(t, 0 > e ? 0 : 0 | _(e)), !s.TYPED_ARRAY_SUPPORT)
- for (var n = 0; e > n; ++n) t[n] = 0;
- return t
- }
- function f(t, e, n) {
- if (("string" != typeof n || "" === n) && (n = "utf8"), !s.isEncoding(n)) throw new TypeError('"encoding" must be a valid string encoding');
- var r = 0 | y(e, n);
- t = o(t, r);
- var i = t.write(e, n);
- return i !== r && (t = t.slice(0, i)), t
- }
- function h(t, e) {
- var n = e.length < 0 ? 0 : 0 | _(e.length);
- t = o(t, n);
- for (var r = 0; n > r; r += 1) t[r] = 255 & e[r];
- return t
- }
- function p(t, e, n, r) {
- if (e.byteLength, 0 > n || e.byteLength < n) throw new RangeError("'offset' is out of bounds");
- if (e.byteLength < n + (r || 0)) throw new RangeError("'length' is out of bounds");
- return e = void 0 === n && void 0 === r ? new Uint8Array(e) : void 0 === r ? new Uint8Array(e, n) : new Uint8Array(e, n, r), s.TYPED_ARRAY_SUPPORT ? (t = e, t.__proto__ = s.prototype) : t = h(t, e), t
- }
- function d(t, e) {
- if (s.isBuffer(e)) {
- var n = 0 | _(e.length);
- return t = o(t, n), 0 === t.length ? t : (e.copy(t, 0, 0, n), t)
- }
- if (e) {
- if ("undefined" != typeof ArrayBuffer && e.buffer instanceof ArrayBuffer || "length" in e) return "number" != typeof e.length || X(e.length) ? o(t, 0) : h(t, e);
- if ("Buffer" === e.type && J(e.data)) return h(t, e.data)
- }
- throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")
- }
- function _(t) {
- if (t >= i()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + i().toString(16) + " bytes");
- return 0 | t
- }
- function v(t) {
- return +t != t && (t = 0), s.alloc(+t)
- }
- function y(t, e) {
- if (s.isBuffer(t)) return t.length;
- if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(t) || t instanceof ArrayBuffer)) return t.byteLength;
- "string" != typeof t && (t = "" + t);
- var n = t.length;
- if (0 === n) return 0;
- for (var r = !1;;) switch (e) {
- case "ascii":
- case "latin1":
- case "binary":
- return n;
- case "utf8":
- case "utf-8":
- case void 0:
- return $(t).length;
- case "ucs2":
- case "ucs-2":
- case "utf16le":
- case "utf-16le":
- return 2 * n;
- case "hex":
- return n >>> 1;
- case "base64":
- return W(t).length;
- default:
- if (r) return $(t).length;
- e = ("" + e).toLowerCase(), r = !0
- }
- }
- function g(t, e, n) {
- var r = !1;
- if ((void 0 === e || 0 > e) && (e = 0), e > this.length) return "";
- if ((void 0 === n || n > this.length) && (n = this.length), 0 >= n) return "";
- if (n >>>= 0, e >>>= 0, e >= n) return "";
- for (t || (t = "utf8");;) switch (t) {
- case "hex":
- return O(this, e, n);
- case "utf8":
- case "utf-8":
- return P(this, e, n);
- case "ascii":
- return F(this, e, n);
- case "latin1":
- case "binary":
- return S(this, e, n);
- case "base64":
- return A(this, e, n);
- case "ucs2":
- case "ucs-2":
- case "utf16le":
- case "utf-16le":
- return B(this, e, n);
- default:
- if (r) throw new TypeError("Unknown encoding: " + t);
- t = (t + "").toLowerCase(), r = !0
- }
- }
- function m(t, e, n) {
- var r = t[e];
- t[e] = t[n], t[n] = r
- }
- function b(t, e, n, r, i) {
- if (0 === t.length) return -1;
- if ("string" == typeof n ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : -2147483648 > n && (n = -2147483648), n = +n, isNaN(n) && (n = i ? 0 : t.length - 1), 0 > n && (n = t.length + n), n >= t.length) {
- if (i) return -1;
- n = t.length - 1
- } else if (0 > n) {
- if (!i) return -1;
- n = 0
- }
- if ("string" == typeof e && (e = s.from(e, r)), s.isBuffer(e)) return 0 === e.length ? -1 : w(t, e, n, r, i);
- if ("number" == typeof e) return e = 255 & e, s.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(t, e, n) : Uint8Array.prototype.lastIndexOf.call(t, e, n) : w(t, [e], n, r, i);
- throw new TypeError("val must be string, number or Buffer")
- }
- function w(t, e, n, r, i) {
- function o(t, e) {
- return 1 === s ? t[e] : t.readUInt16BE(e * s)
- }
- var s = 1,
- a = t.length,
- u = e.length;
- if (void 0 !== r && (r = String(r).toLowerCase(), "ucs2" === r || "ucs-2" === r || "utf16le" === r || "utf-16le" === r)) {
- if (t.length < 2 || e.length < 2) return -1;
- s = 2, a /= 2, u /= 2, n /= 2
- }
- var c;
- if (i) {
- var l = -1;
- for (c = n; a > c; c++)
- if (o(t, c) === o(e, -1 === l ? 0 : c - l)) {
- if (-1 === l && (l = c), c - l + 1 === u) return l * s
- } else -1 !== l && (c -= c - l), l = -1
- } else
- for (n + u > a && (n = a - u), c = n; c >= 0; c--) {
- for (var f = !0, h = 0; u > h; h++)
- if (o(t, c + h) !== o(e, h)) {
- f = !1;
- break
- }
- if (f) return c
- }
- return -1
- }
- function E(t, e, n, r) {
- n = Number(n) || 0;
- var i = t.length - n;
- r ? (r = Number(r), r > i && (r = i)) : r = i;
- var o = e.length;
- if (o % 2 !== 0) throw new TypeError("Invalid hex string");
- r > o / 2 && (r = o / 2);
- for (var s = 0; r > s; ++s) {
- var a = parseInt(e.substr(2 * s, 2), 16);
- if (isNaN(a)) return s;
- t[n + s] = a
- }
- return s
- }
- function C(t, e, n, r) {
- return G($(e, t.length - n), t, n, r)
- }
- function k(t, e, n, r) {
- return G(q(e), t, n, r)
- }
- function x(t, e, n, r) {
- return k(t, e, n, r)
- }
- function T(t, e, n, r) {
- return G(W(e), t, n, r)
- }
- function j(t, e, n, r) {
- return G(Q(e, t.length - n), t, n, r)
- }
- function A(t, e, n) {
- return Z.fromByteArray(0 === e && n === t.length ? t : t.slice(e, n))
- }
- function P(t, e, n) {
- n = Math.min(t.length, n);
- for (var r = [], i = e; n > i;) {
- var o = t[i],
- s = null,
- a = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
- if (n >= i + a) {
- var u, c, l, f;
- switch (a) {
- case 1:
- 128 > o && (s = o);
- break;
- case 2:
- u = t[i + 1], 128 === (192 & u) && (f = (31 & o) << 6 | 63 & u, f > 127 && (s = f));
- break;
- case 3:
- u = t[i + 1], c = t[i + 2], 128 === (192 & u) && 128 === (192 & c) && (f = (15 & o) << 12 | (63 & u) << 6 | 63 & c, f > 2047 && (55296 > f || f > 57343) && (s = f));
- break;
- case 4:
- u = t[i + 1], c = t[i + 2], l = t[i + 3], 128 === (192 & u) && 128 === (192 & c) && 128 === (192 & l) && (f = (15 & o) << 18 | (63 & u) << 12 | (63 & c) << 6 | 63 & l, f > 65535 && 1114112 > f && (s = f))
- }
- }
- null === s ? (s = 65533, a = 1) : s > 65535 && (s -= 65536, r.push(s >>> 10 & 1023 | 55296), s = 56320 | 1023 & s), r.push(s), i += a
- }
- return R(r)
- }
- function R(t) {
- var e = t.length;
- if (tt >= e) return String.fromCharCode.apply(String, t);
- for (var n = "", r = 0; e > r;) n += String.fromCharCode.apply(String, t.slice(r, r += tt));
- return n
- }
- function F(t, e, n) {
- var r = "";
- n = Math.min(t.length, n);
- for (var i = e; n > i; ++i) r += String.fromCharCode(127 & t[i]);
- return r
- }
- function S(t, e, n) {
- var r = "";
- n = Math.min(t.length, n);
- for (var i = e; n > i; ++i) r += String.fromCharCode(t[i]);
- return r
- }
- function O(t, e, n) {
- var r = t.length;
- (!e || 0 > e) && (e = 0), (!n || 0 > n || n > r) && (n = r);
- for (var i = "", o = e; n > o; ++o) i += z(t[o]);
- return i
- }
- function B(t, e, n) {
- for (var r = t.slice(e, n), i = "", o = 0; o < r.length; o += 2) i += String.fromCharCode(r[o] + 256 * r[o + 1]);
- return i
- }
- function D(t, e, n) {
- if (t % 1 !== 0 || 0 > t) throw new RangeError("offset is not uint");
- if (t + e > n) throw new RangeError("Trying to access beyond buffer length")
- }
- function U(t, e, n, r, i, o) {
- if (!s.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
- if (e > i || o > e) throw new RangeError('"value" argument is out of bounds');
- if (n + r > t.length) throw new RangeError("Index out of range")
- }
- function I(t, e, n, r) {
- 0 > e && (e = 65535 + e + 1);
- for (var i = 0, o = Math.min(t.length - n, 2); o > i; ++i) t[n + i] = (e & 255 << 8 * (r ? i : 1 - i)) >>> 8 * (r ? i : 1 - i)
- }
- function L(t, e, n, r) {
- 0 > e && (e = 4294967295 + e + 1);
- for (var i = 0, o = Math.min(t.length - n, 4); o > i; ++i) t[n + i] = e >>> 8 * (r ? i : 3 - i) & 255
- }
- function M(t, e, n, r) {
- if (n + r > t.length) throw new RangeError("Index out of range");
- if (0 > n) throw new RangeError("Index out of range")
- }
- function N(t, e, n, r, i) {
- return i || M(t, e, n, 4, 3.4028234663852886e38, -3.4028234663852886e38), K.write(t, e, n, r, 23, 4), n + 4
- }
- function V(t, e, n, r, i) {
- return i || M(t, e, n, 8, 1.7976931348623157e308, -1.7976931348623157e308), K.write(t, e, n, r, 52, 8), n + 8
- }
- function H(t) {
- if (t = Y(t).replace(et, ""), t.length < 2) return "";
- for (; t.length % 4 !== 0;) t += "=";
- return t
- }
- function Y(t) {
- return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "")
- }
- function z(t) {
- return 16 > t ? "0" + t.toString(16) : t.toString(16)
- }
- function $(t, e) {
- e = e || 1 / 0;
- for (var n, r = t.length, i = null, o = [], s = 0; r > s; ++s) {
- if (n = t.charCodeAt(s), n > 55295 && 57344 > n) {
- if (!i) {
- if (n > 56319) {
- (e -= 3) > -1 && o.push(239, 191, 189);
- continue
- }
- if (s + 1 === r) {
- (e -= 3) > -1 && o.push(239, 191, 189);
- continue
- }
- i = n;
- continue
- }
- if (56320 > n) {
- (e -= 3) > -1 && o.push(239, 191, 189), i = n;
- continue
- }
- n = (i - 55296 << 10 | n - 56320) + 65536
- } else i && (e -= 3) > -1 && o.push(239, 191, 189);
- if (i = null, 128 > n) {
- if ((e -= 1) < 0) break;
- o.push(n)
- } else if (2048 > n) {
- if ((e -= 2) < 0) break;
- o.push(n >> 6 | 192, 63 & n | 128)
- } else if (65536 > n) {
- if ((e -= 3) < 0) break;
- o.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
- } else {
- if (!(1114112 > n)) throw new Error("Invalid code point");
- if ((e -= 4) < 0) break;
- o.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
- }
- }
- return o
- }
- function q(t) {
- for (var e = [], n = 0; n < t.length; ++n) e.push(255 & t.charCodeAt(n));
- return e
- }
- function Q(t, e) {
- for (var n, r, i, o = [], s = 0; s < t.length && !((e -= 2) < 0); ++s) n = t.charCodeAt(s), r = n >> 8, i = n % 256, o.push(i), o.push(r);
- return o
- }
- function W(t) {
- return Z.toByteArray(H(t))
- }
- function G(t, e, n, r) {
- for (var i = 0; r > i && !(i + n >= e.length || i >= t.length); ++i) e[i + n] = t[i];
- return i
- }
- function X(t) {
- return t !== t
- }
- var Z = t("base64-js"),
- K = t("ieee754"),
- J = t("isarray");
- n.Buffer = s, n.SlowBuffer = v, n.INSPECT_MAX_BYTES = 50, s.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ? e.TYPED_ARRAY_SUPPORT : r(), n.kMaxLength = i(), s.poolSize = 8192, s._augment = function(t) {
- return t.__proto__ = s.prototype, t
- }, s.from = function(t, e, n) {
- return a(null, t, e, n)
- }, s.TYPED_ARRAY_SUPPORT && (s.prototype.__proto__ = Uint8Array.prototype, s.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && s[Symbol.species] === s && Object.defineProperty(s, Symbol.species, {
- value: null,
- configurable: !0
- })), s.alloc = function(t, e, n) {
- return c(null, t, e, n)
- }, s.allocUnsafe = function(t) {
- return l(null, t)
- }, s.allocUnsafeSlow = function(t) {
- return l(null, t)
- }, s.isBuffer = function(t) {
- return !(null == t || !t._isBuffer)
- }, s.compare = function(t, e) {
- if (!s.isBuffer(t) || !s.isBuffer(e)) throw new TypeError("Arguments must be Buffers");
- if (t === e) return 0;
- for (var n = t.length, r = e.length, i = 0, o = Math.min(n, r); o > i; ++i)
- if (t[i] !== e[i]) {
- n = t[i], r = e[i];
- break
- }
- return r > n ? -1 : n > r ? 1 : 0
- }, s.isEncoding = function(t) {
- switch (String(t).toLowerCase()) {
- case "hex":
- case "utf8":
- case "utf-8":
- case "ascii":
- case "latin1":
- case "binary":
- case "base64":
- case "ucs2":
- case "ucs-2":
- case "utf16le":
- case "utf-16le":
- return !0;
- default:
- return !1
- }
- }, s.concat = function(t, e) {
- if (!J(t)) throw new TypeError('"list" argument must be an Array of Buffers');
- if (0 === t.length) return s.alloc(0);
- var n;
- if (void 0 === e)
- for (e = 0, n = 0; n < t.length; ++n) e += t[n].length;
- var r = s.allocUnsafe(e),
- i = 0;
- for (n = 0; n < t.length; ++n) {
- var o = t[n];
- if (!s.isBuffer(o)) throw new TypeError('"list" argument must be an Array of Buffers');
- o.copy(r, i), i += o.length
- }
- return r
- }, s.byteLength = y, s.prototype._isBuffer = !0, s.prototype.swap16 = function() {
- var t = this.length;
- if (t % 2 !== 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
- for (var e = 0; t > e; e += 2) m(this, e, e + 1);
- return this
- }, s.prototype.swap32 = function() {
- var t = this.length;
- if (t % 4 !== 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
- for (var e = 0; t > e; e += 4) m(this, e, e + 3), m(this, e + 1, e + 2);
- return this
- }, s.prototype.swap64 = function() {
- var t = this.length;
- if (t % 8 !== 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
- for (var e = 0; t > e; e += 8) m(this, e, e + 7), m(this, e + 1, e + 6), m(this, e + 2, e + 5), m(this, e + 3, e + 4);
- return this
- }, s.prototype.toString = function() {
- var t = 0 | this.length;
- return 0 === t ? "" : 0 === arguments.length ? P(this, 0, t) : g.apply(this, arguments)
- }, s.prototype.equals = function(t) {
- if (!s.isBuffer(t)) throw new TypeError("Argument must be a Buffer");
- return this === t ? !0 : 0 === s.compare(this, t)
- }, s.prototype.inspect = function() {
- var t = "",
- e = n.INSPECT_MAX_BYTES;
- return this.length > 0 && (t = this.toString("hex", 0, e).match(/.{2}/g).join(" "), this.length > e && (t += " ... ")), "<Buffer " + t + ">"
- }, s.prototype.compare = function(t, e, n, r, i) {
- if (!s.isBuffer(t)) throw new TypeError("Argument must be a Buffer");
- if (void 0 === e && (e = 0), void 0 === n && (n = t ? t.length : 0), void 0 === r && (r = 0), void 0 === i && (i = this.length), 0 > e || n > t.length || 0 > r || i > this.length) throw new RangeError("out of range index");
- if (r >= i && e >= n) return 0;
- if (r >= i) return -1;
- if (e >= n) return 1;
- if (e >>>= 0, n >>>= 0, r >>>= 0, i >>>= 0, this === t) return 0;
- for (var o = i - r, a = n - e, u = Math.min(o, a), c = this.slice(r, i), l = t.slice(e, n), f = 0; u > f; ++f)
- if (c[f] !== l[f]) {
- o = c[f], a = l[f];
- break
- }
- return a > o ? -1 : o > a ? 1 : 0
- }, s.prototype.includes = function(t, e, n) {
- return -1 !== this.indexOf(t, e, n)
- }, s.prototype.indexOf = function(t, e, n) {
- return b(this, t, e, n, !0)
- }, s.prototype.lastIndexOf = function(t, e, n) {
- return b(this, t, e, n, !1)
- }, s.prototype.write = function(t, e, n, r) {
- if (void 0 === e) r = "utf8", n = this.length, e = 0;
- else if (void 0 === n && "string" == typeof e) r = e, n = this.length, e = 0;
- else {
- if (!isFinite(e)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
- e = 0 | e, isFinite(n) ? (n = 0 | n, void 0 === r && (r = "utf8")) : (r = n, n = void 0)
- }
- var i = this.length - e;
- if ((void 0 === n || n > i) && (n = i), t.length > 0 && (0 > n || 0 > e) || e > this.length) throw new RangeError("Attempt to write outside buffer bounds");
- r || (r = "utf8");
- for (var o = !1;;) switch (r) {
- case "hex":
- return E(this, t, e, n);
- case "utf8":
- case "utf-8":
- return C(this, t, e, n);
- case "ascii":
- return k(this, t, e, n);
- case "latin1":
- case "binary":
- return x(this, t, e, n);
- case "base64":
- return T(this, t, e, n);
- case "ucs2":
- case "ucs-2":
- case "utf16le":
- case "utf-16le":
- return j(this, t, e, n);
- default:
- if (o) throw new TypeError("Unknown encoding: " + r);
- r = ("" + r).toLowerCase(), o = !0
- }
- }, s.prototype.toJSON = function() {
- return {
- type: "Buffer",
- data: Array.prototype.slice.call(this._arr || this, 0)
- }
- };
- var tt = 4096;
- s.prototype.slice = function(t, e) {
- var n = this.length;
- t = ~~t, e = void 0 === e ? n : ~~e, 0 > t ? (t += n, 0 > t && (t = 0)) : t > n && (t = n), 0 > e ? (e += n, 0 > e && (e = 0)) : e > n && (e = n), t > e && (e = t);
- var r;
- if (s.TYPED_ARRAY_SUPPORT) r = this.subarray(t, e), r.__proto__ = s.prototype;
- else {
- var i = e - t;
- r = new s(i, void 0);
- for (var o = 0; i > o; ++o) r[o] = this[o + t]
- }
- return r
- }, s.prototype.readUIntLE = function(t, e, n) {
- t = 0 | t, e = 0 | e, n || D(t, e, this.length);
- for (var r = this[t], i = 1, o = 0; ++o < e && (i *= 256);) r += this[t + o] * i;
- return r
- }, s.prototype.readUIntBE = function(t, e, n) {
- t = 0 | t, e = 0 | e, n || D(t, e, this.length);
- for (var r = this[t + --e], i = 1; e > 0 && (i *= 256);) r += this[t + --e] * i;
- return r
- }, s.prototype.readUInt8 = function(t, e) {
- return e || D(t, 1, this.length), this[t]
- }, s.prototype.readUInt16LE = function(t, e) {
- return e || D(t, 2, this.length), this[t] | this[t + 1] << 8
- }, s.prototype.readUInt16BE = function(t, e) {
- return e || D(t, 2, this.length), this[t] << 8 | this[t + 1]
- }, s.prototype.readUInt32LE = function(t, e) {
- return e || D(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3]
- }, s.prototype.readUInt32BE = function(t, e) {
- return e || D(t, 4, this.length), 16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3])
- }, s.prototype.readIntLE = function(t, e, n) {
- t = 0 | t, e = 0 | e, n || D(t, e, this.length);
- for (var r = this[t], i = 1, o = 0; ++o < e && (i *= 256);) r += this[t + o] * i;
- return i *= 128, r >= i && (r -= Math.pow(2, 8 * e)), r
- }, s.prototype.readIntBE = function(t, e, n) {
- t = 0 | t, e = 0 | e, n || D(t, e, this.length);
- for (var r = e, i = 1, o = this[t + --r]; r > 0 && (i *= 256);) o += this[t + --r] * i;
- return i *= 128, o >= i && (o -= Math.pow(2, 8 * e)), o
- }, s.prototype.readInt8 = function(t, e) {
- return e || D(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t]
- }, s.prototype.readInt16LE = function(t, e) {
- e || D(t, 2, this.length);
- var n = this[t] | this[t + 1] << 8;
- return 32768 & n ? 4294901760 | n : n
- }, s.prototype.readInt16BE = function(t, e) {
- e || D(t, 2, this.length);
- var n = this[t + 1] | this[t] << 8;
- return 32768 & n ? 4294901760 | n : n
- }, s.prototype.readInt32LE = function(t, e) {
- return e || D(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24
- }, s.prototype.readInt32BE = function(t, e) {
- return e || D(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]
- }, s.prototype.readFloatLE = function(t, e) {
- return e || D(t, 4, this.length), K.read(this, t, !0, 23, 4)
- }, s.prototype.readFloatBE = function(t, e) {
- return e || D(t, 4, this.length), K.read(this, t, !1, 23, 4)
- }, s.prototype.readDoubleLE = function(t, e) {
- return e || D(t, 8, this.length), K.read(this, t, !0, 52, 8)
- }, s.prototype.readDoubleBE = function(t, e) {
- return e || D(t, 8, this.length), K.read(this, t, !1, 52, 8)
- }, s.prototype.writeUIntLE = function(t, e, n, r) {
- if (t = +t, e = 0 | e, n = 0 | n, !r) {
- var i = Math.pow(2, 8 * n) - 1;
- U(this, t, e, n, i, 0)
- }
- var o = 1,
- s = 0;
- for (this[e] = 255 & t; ++s < n && (o *= 256);) this[e + s] = t / o & 255;
- return e + n
- }, s.prototype.writeUIntBE = function(t, e, n, r) {
- if (t = +t, e = 0 | e, n = 0 | n, !r) {
- var i = Math.pow(2, 8 * n) - 1;
- U(this, t, e, n, i, 0)
- }
- var o = n - 1,
- s = 1;
- for (this[e + o] = 255 & t; --o >= 0 && (s *= 256);) this[e + o] = t / s & 255;
- return e + n
- }, s.prototype.writeUInt8 = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 1, 255, 0), s.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), this[e] = 255 & t, e + 1
- }, s.prototype.writeUInt16LE = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 2, 65535, 0), s.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : I(this, t, e, !0), e + 2
- }, s.prototype.writeUInt16BE = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 2, 65535, 0), s.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : I(this, t, e, !1), e + 2
- }, s.prototype.writeUInt32LE = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 4, 4294967295, 0), s.TYPED_ARRAY_SUPPORT ? (this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = 255 & t) : L(this, t, e, !0), e + 4
- }, s.prototype.writeUInt32BE = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 4, 4294967295, 0), s.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : L(this, t, e, !1), e + 4
- }, s.prototype.writeIntLE = function(t, e, n, r) {
- if (t = +t, e = 0 | e, !r) {
- var i = Math.pow(2, 8 * n - 1);
- U(this, t, e, n, i - 1, -i)
- }
- var o = 0,
- s = 1,
- a = 0;
- for (this[e] = 255 & t; ++o < n && (s *= 256);) 0 > t && 0 === a && 0 !== this[e + o - 1] && (a = 1), this[e + o] = (t / s >> 0) - a & 255;
- return e + n
- }, s.prototype.writeIntBE = function(t, e, n, r) {
- if (t = +t, e = 0 | e, !r) {
- var i = Math.pow(2, 8 * n - 1);
- U(this, t, e, n, i - 1, -i)
- }
- var o = n - 1,
- s = 1,
- a = 0;
- for (this[e + o] = 255 & t; --o >= 0 && (s *= 256);) 0 > t && 0 === a && 0 !== this[e + o + 1] && (a = 1), this[e + o] = (t / s >> 0) - a & 255;
- return e + n
- }, s.prototype.writeInt8 = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 1, 127, -128), s.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), 0 > t && (t = 255 + t + 1), this[e] = 255 & t, e + 1
- }, s.prototype.writeInt16LE = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 2, 32767, -32768), s.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : I(this, t, e, !0), e + 2
- }, s.prototype.writeInt16BE = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 2, 32767, -32768), s.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : I(this, t, e, !1), e + 2
- }, s.prototype.writeInt32LE = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 4, 2147483647, -2147483648), s.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24) : L(this, t, e, !0), e + 4
- }, s.prototype.writeInt32BE = function(t, e, n) {
- return t = +t, e = 0 | e, n || U(this, t, e, 4, 2147483647, -2147483648), 0 > t && (t = 4294967295 + t + 1), s.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : L(this, t, e, !1), e + 4
- }, s.prototype.writeFloatLE = function(t, e, n) {
- return N(this, t, e, !0, n)
- }, s.prototype.writeFloatBE = function(t, e, n) {
- return N(this, t, e, !1, n)
- }, s.prototype.writeDoubleLE = function(t, e, n) {
- return V(this, t, e, !0, n)
- }, s.prototype.writeDoubleBE = function(t, e, n) {
- return V(this, t, e, !1, n)
- }, s.prototype.copy = function(t, e, n, r) {
- if (n || (n = 0), r || 0 === r || (r = this.length), e >= t.length && (e = t.length), e || (e = 0), r > 0 && n > r && (r = n), r === n) return 0;
- if (0 === t.length || 0 === this.length) return 0;
- if (0 > e) throw new RangeError("targetStart out of bounds");
- if (0 > n || n >= this.length) throw new RangeError("sourceStart out of bounds");
- if (0 > r) throw new RangeError("sourceEnd out of bounds");
- r > this.length && (r = this.length), t.length - e < r - n && (r = t.length - e + n);
- var i, o = r - n;
- if (this === t && e > n && r > e)
- for (i = o - 1; i >= 0; --i) t[i + e] = this[i + n];
- else if (1e3 > o || !s.TYPED_ARRAY_SUPPORT)
- for (i = 0; o > i; ++i) t[i + e] = this[i + n];
- else Uint8Array.prototype.set.call(t, this.subarray(n, n + o), e);
- return o
- }, s.prototype.fill = function(t, e, n, r) {
- if ("string" == typeof t) {
- if ("string" == typeof e ? (r = e, e = 0, n = this.length) : "string" == typeof n && (r = n, n = this.length), 1 === t.length) {
- var i = t.charCodeAt(0);
- 256 > i && (t = i)
- }
- if (void 0 !== r && "string" != typeof r) throw new TypeError("encoding must be a string");
- if ("string" == typeof r && !s.isEncoding(r)) throw new TypeError("Unknown encoding: " + r)
- } else "number" == typeof t && (t = 255 & t);
- if (0 > e || this.length < e || this.length < n) throw new RangeError("Out of range index");
- if (e >= n) return this;
- e >>>= 0, n = void 0 === n ? this.length : n >>> 0, t || (t = 0);
- var o;
- if ("number" == typeof t)
- for (o = e; n > o; ++o) this[o] = t;
- else {
- var a = s.isBuffer(t) ? t : $(new s(t, r).toString()),
- u = a.length;
- for (o = 0; n - e > o; ++o) this[o + e] = a[o % u]
- }
- return this
- };
- var et = /[^+\/0-9A-Za-z-_]/g
- }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
- }, {
- "base64-js": 1,
- ieee754: 8,
- isarray: 9
- }],
- 5: [function(t, e) {
- var n = t("date-now");
- e.exports = function(t, e, r) {
- function i() {
- var l = n() - u;
- e > l && l > 0 ? o = setTimeout(i, e - l) : (o = null, r || (c = t.apply(a, s), o || (a = s = null)))
- }
- var o, s, a, u, c;
- return null == e && (e = 100),
- function() {
- a = this, s = arguments, u = n();
- var l = r && !o;
- return o || (o = setTimeout(i, e)), l && (c = t.apply(a, s), a = s = null), c
- }
- }
- }, {
- "date-now": 6
- }],
- 6: [function(t, e) {
- function n() {
- return (new Date).getTime()
- }
- e.exports = Date.now || n
- }, {}],
- 7: [function(t, e, n) {
- ! function(t, r) {
- "object" == typeof n ? e.exports = r() : "function" == typeof define && define.amd ? define([], r) : t.Draggable = r()
- }(this, function() {
- "use strict";
- function t(t, e) {
- var n = this,
- r = l.bind(n.start, n),
- i = l.bind(n.drag, n),
- s = l.bind(n.stop, n);
- if (!o(t)) throw new TypeError("Draggable expects argument 0 to be an Element");
- l.assign(n, {
- element: t,
- handlers: {
- start: {
- mousedown: r,
- touchstart: r
- },
- move: {
- mousemove: i,
- mouseup: s,
- touchmove: i,
- touchend: s
- }
- },
- options: l.assign({}, u, e)
- }), n.initialize()
- }
- function e(t) {
- return parseInt(t, 10)
- }
- function n(t) {
- return "currentStyle" in t ? t.currentStyle : getComputedStyle(t)
- }
- function r(t) {
- return t instanceof Array
- }
- function i(t) {
- return void 0 !== t && null !== t
- }
- function o(t) {
- return t instanceof Element || t instanceof HTMLDocument
- }
- function s(t) {
- return t instanceof Function
- }
- function a() {}
- var u = {
- grid: 0,
- filterTarget: null,
- limit: {
- x: null,
- y: null
- },
- threshold: 0,
- setCursor: !1,
- setPosition: !0,
- smoothDrag: !0,
- useGPU: !0,
- onDrag: a,
- onDragStart: a,
- onDragEnd: a
- },
- c = {
- transform: function() {
- for (var t = " -o- -ms- -moz- -webkit-".split(" "), e = document.body.style, n = t.length; n--;) {
- var r = t[n] + "transform";
- if (r in e) return r
- }
- }()
- },
- l = {
- assign: function() {
- for (var t = arguments[0], e = arguments.length, n = 1; e > n; n++) {
- var r = arguments[n];
- for (var i in r) t[i] = r[i]
- }
- return t
- },
- bind: function(t, e) {
- return function() {
- t.apply(e, arguments)
- }
- },
- on: function(t, e, n) {
- if (e && n) l.addEvent(t, e, n);
- else if (e)
- for (var r in e) l.addEvent(t, r, e[r])
- },
- off: function(t, e, n) {
- if (e && n) l.removeEvent(t, e, n);
- else if (e)
- for (var r in e) l.removeEvent(t, r, e[r])
- },
- limit: function(t, e) {
- return r(e) ? (e = [+e[0], +e[1]], t < e[0] ? t = e[0] : t > e[1] && (t = e[1])) : t = +e, t
- },
- addEvent: "attachEvent" in Element.prototype ? function(t, e, n) {
- t.attachEvent("on" + e, n)
- } : function(t, e, n) {
- t.addEventListener(e, n, !1)
- },
- removeEvent: "attachEvent" in Element.prototype ? function(t, e, n) {
- t.detachEvent("on" + e, n)
- } : function(t, e, n) {
- t.removeEventListener(e, n)
- }
- };
- return l.assign(t.prototype, {
- setOption: function(t, e) {
- var n = this;
- return n.options[t] = e, n.initialize(), n
- },
- get: function() {
- var t = this.dragEvent;
- return {
- x: t.x,
- y: t.y
- }
- },
- set: function(t, e) {
- var n = this,
- r = n.dragEvent;
- return r.original = {
- x: r.x,
- y: r.y
- }, n.move(t, e), n
- },
- dragEvent: {
- started: !1,
- x: 0,
- y: 0
- },
- initialize: function() {
- var t, e = this,
- r = e.element,
- i = r.style,
- o = n(r),
- s = e.options,
- a = c.transform,
- u = e._dimensions = {
- height: r.offsetHeight,
- left: r.offsetLeft,
- top: r.offsetTop,
- width: r.offsetWidth
- };
- s.useGPU && a && (t = o[a], "none" === t && (t = ""), i[a] = t + " translate3d(0,0,0)"), s.setPosition && (i.display = "block", i.left = u.left + "px", i.top = u.top + "px", i.bottom = i.right = "auto", i.margin = 0, i.position = "absolute"), s.setCursor && (i.cursor = "move"), e.setLimit(s.limit), l.assign(e.dragEvent, {
- x: u.left,
- y: u.top
- }), l.on(e.element, e.handlers.start)
- },
- start: function(t) {
- var e = this,
- n = e.getCursor(t),
- r = e.element;
- e.useTarget(t.target || t.srcElement) && (t.preventDefault ? t.preventDefault() : t.returnValue = !1, e.dragEvent.oldZindex = r.style.zIndex, r.style.zIndex = 1e4, e.setCursor(n), e.setPosition(), e.setZoom(), l.on(document, e.handlers.move))
- },
- drag: function(t) {
- var e = this,
- n = e.dragEvent,
- r = e.element,
- i = e._cursor,
- o = e._dimensions,
- s = e.options,
- a = o.zoom,
- u = e.getCursor(t),
- c = s.threshold,
- l = (u.x - i.x) / a + o.left,
- f = (u.y - i.y) / a + o.top;
- !n.started && c && Math.abs(i.x - u.x) < c && Math.abs(i.y - u.y) < c || (n.original || (n.original = {
- x: l,
- y: f
- }), n.started || (s.onDragStart(r, l, f, t), n.started = !0), e.move(l, f) && s.onDrag(r, n.x, n.y, t))
- },
- move: function(t, e) {
- var n = this,
- r = n.dragEvent,
- i = n.options,
- o = i.grid,
- s = n.element.style,
- a = n.limit(t, e, r.original.x, r.original.y);
- return !i.smoothDrag && o && (a = n.round(a, o)), a.x !== r.x || a.y !== r.y ? (r.x = a.x, r.y = a.y, s.left = a.x + "px", s.top = a.y + "px", !0) : !1
- },
- stop: function(t) {
- var e, n = this,
- r = n.dragEvent,
- i = n.element,
- o = n.options,
- s = o.grid;
- l.off(document, n.handlers.move), i.style.zIndex = r.oldZindex, o.smoothDrag && s && (e = n.round({
- x: r.x,
- y: r.y
- }, s), n.move(e.x, e.y), l.assign(n.dragEvent, e)), n.dragEvent.started && o.onDragEnd(i, r.x, r.y, t), n.reset()
- },
- reset: function() {
- this.dragEvent.started = !1
- },
- round: function(t) {
- var e = this.options.grid;
- return {
- x: e * Math.round(t.x / e),
- y: e * Math.round(t.y / e)
- }
- },
- getCursor: function(t) {
- return {
- x: (t.targetTouches ? t.targetTouches[0] : t).clientX,
- y: (t.targetTouches ? t.targetTouches[0] : t).clientY
- }
- },
- setCursor: function(t) {
- this._cursor = t
- },
- setLimit: function(t) {
- var e = this,
- n = function(t, e) {
- return {
- x: t,
- y: e
- }
- };
- if (s(t)) e.limit = t;
- else if (o(t)) {
- var r = e._dimensions,
- a = t.scrollHeight - r.height,
- u = t.scrollWidth - r.width;
- e.limit = function(t, e) {
- return {
- x: l.limit(t, [0, u]),
- y: l.limit(e, [0, a])
- }
- }
- } else if (t) {
- var c = {
- x: i(t.x),
- y: i(t.y)
- };
- e.limit = c.x || c.y ? function(e, n) {
- return {
- x: c.x ? l.limit(e, t.x) : e,
- y: c.y ? l.limit(n, t.y) : n
- }
- } : n
- } else e.limit = n
- },
- setPosition: function() {
- var t = this,
- n = t.element,
- r = n.style;
- l.assign(t._dimensions, {
- left: e(r.left) || n.offsetLeft,
- top: e(r.top) || n.offsetTop
- })
- },
- setZoom: function() {
- for (var t = this, e = t.element, r = 1; e = e.offsetParent;) {
- var i = n(e).zoom;
- if (i && "normal" !== i) {
- r = i;
- break
- }
- }
- t._dimensions.zoom = r
- },
- useTarget: function(t) {
- var e = this.options.filterTarget;
- return e instanceof Function ? e(t) : !0
- },
- destroy: function() {
- l.off(this.element, this.handlers.start), l.off(document, this.handlers.move)
- }
- }), t
- })
- }, {}],
- 8: [function(t, e, n) {
- n.read = function(t, e, n, r, i) {
- var o, s, a = 8 * i - r - 1,
- u = (1 << a) - 1,
- c = u >> 1,
- l = -7,
- f = n ? i - 1 : 0,
- h = n ? -1 : 1,
- p = t[e + f];
- for (f += h, o = p & (1 << -l) - 1, p >>= -l, l += a; l > 0; o = 256 * o + t[e + f], f += h, l -= 8);
- for (s = o & (1 << -l) - 1, o >>= -l, l += r; l > 0; s = 256 * s + t[e + f], f += h, l -= 8);
- if (0 === o) o = 1 - c;
- else {
- if (o === u) return s ? 0 / 0 : (p ? -1 : 1) * (1 / 0);
- s += Math.pow(2, r), o -= c
- }
- return (p ? -1 : 1) * s * Math.pow(2, o - r)
- }, n.write = function(t, e, n, r, i, o) {
- var s, a, u, c = 8 * o - i - 1,
- l = (1 << c) - 1,
- f = l >> 1,
- h = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
- p = r ? 0 : o - 1,
- d = r ? 1 : -1,
- _ = 0 > e || 0 === e && 0 > 1 / e ? 1 : 0;
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (a = isNaN(e) ? 1 : 0, s = l) : (s = Math.floor(Math.log(e) / Math.LN2), e * (u = Math.pow(2, -s)) < 1 && (s--, u *= 2), e += s + f >= 1 ? h / u : h * Math.pow(2, 1 - f), e * u >= 2 && (s++, u /= 2), s + f >= l ? (a = 0, s = l) : s + f >= 1 ? (a = (e * u - 1) * Math.pow(2, i), s += f) : (a = e * Math.pow(2, f - 1) * Math.pow(2, i), s = 0)); i >= 8; t[n + p] = 255 & a, p += d, a /= 256, i -= 8);
- for (s = s << i | a, c += i; c > 0; t[n + p] = 255 & s, p += d, s /= 256, c -= 8);
- t[n + p - d] |= 128 * _
- }
- }, {}],
- 9: [function(t, e) {
- var n = {}.toString;
- e.exports = Array.isArray || function(t) {
- return "[object Array]" == n.call(t)
- }
- }, {}],
- 10: [function(t, e) {
- ! function(n) {
- "use strict";
- var r, i = n.Base64,
- o = "2.1.9";
- if ("undefined" != typeof e && e.exports) try {
- r = t("buffer").Buffer
- } catch (s) {}
- var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
- u = function(t) {
- for (var e = {}, n = 0, r = t.length; r > n; n++) e[t.charAt(n)] = n;
- return e
- }(a),
- c = String.fromCharCode,
- l = function(t) {
- if (t.length < 2) {
- var e = t.charCodeAt(0);
- return 128 > e ? t : 2048 > e ? c(192 | e >>> 6) + c(128 | 63 & e) : c(224 | e >>> 12 & 15) + c(128 | e >>> 6 & 63) + c(128 | 63 & e)
- }
- var e = 65536 + 1024 * (t.charCodeAt(0) - 55296) + (t.charCodeAt(1) - 56320);
- return c(240 | e >>> 18 & 7) + c(128 | e >>> 12 & 63) + c(128 | e >>> 6 & 63) + c(128 | 63 & e)
- },
- f = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,
- h = function(t) {
- return t.replace(f, l)
- },
- p = function(t) {
- var e = [0, 2, 1][t.length % 3],
- n = t.charCodeAt(0) << 16 | (t.length > 1 ? t.charCodeAt(1) : 0) << 8 | (t.length > 2 ? t.charCodeAt(2) : 0),
- r = [a.charAt(n >>> 18), a.charAt(n >>> 12 & 63), e >= 2 ? "=" : a.charAt(n >>> 6 & 63), e >= 1 ? "=" : a.charAt(63 & n)];
- return r.join("")
- },
- d = n.btoa ? function(t) {
- return n.btoa(t)
- } : function(t) {
- return t.replace(/[\s\S]{1,3}/g, p)
- },
- _ = r ? function(t) {
- return (t.constructor === r.constructor ? t : new r(t)).toString("base64")
- } : function(t) {
- return d(h(t))
- },
- v = function(t, e) {
- return e ? _(String(t)).replace(/[+\/]/g, function(t) {
- return "+" == t ? "-" : "_"
- }).replace(/=/g, "") : _(String(t))
- },
- y = function(t) {
- return v(t, !0)
- },
- g = new RegExp(["[À-ß][-¿]", "[à-ï][-¿]{2}", "[ð-÷][-¿]{3}"].join("|"), "g"),
- m = function(t) {
- switch (t.length) {
- case 4:
- var e = (7 & t.charCodeAt(0)) << 18 | (63 & t.charCodeAt(1)) << 12 | (63 & t.charCodeAt(2)) << 6 | 63 & t.charCodeAt(3),
- n = e - 65536;
- return c((n >>> 10) + 55296) + c((1023 & n) + 56320);
- case 3:
- return c((15 & t.charCodeAt(0)) << 12 | (63 & t.charCodeAt(1)) << 6 | 63 & t.charCodeAt(2));
- default:
- return c((31 & t.charCodeAt(0)) << 6 | 63 & t.charCodeAt(1))
- }
- },
- b = function(t) {
- return t.replace(g, m)
- },
- w = function(t) {
- var e = t.length,
- n = e % 4,
- r = (e > 0 ? u[t.charAt(0)] << 18 : 0) | (e > 1 ? u[t.charAt(1)] << 12 : 0) | (e > 2 ? u[t.charAt(2)] << 6 : 0) | (e > 3 ? u[t.charAt(3)] : 0),
- i = [c(r >>> 16), c(r >>> 8 & 255), c(255 & r)];
- return i.length -= [0, 0, 2, 1][n], i.join("")
- },
- E = n.atob ? function(t) {
- return n.atob(t)
- } : function(t) {
- return t.replace(/[\s\S]{1,4}/g, w)
- },
- C = r ? function(t) {
- return (t.constructor === r.constructor ? t : new r(t, "base64")).toString()
- } : function(t) {
- return b(E(t))
- },
- k = function(t) {
- return C(String(t).replace(/[-_]/g, function(t) {
- return "-" == t ? "+" : "/"
- }).replace(/[^A-Za-z0-9\+\/]/g, ""))
- },
- x = function() {
- var t = n.Base64;
- return n.Base64 = i, t
- };
- if (n.Base64 = {
- VERSION: o,
- atob: E,
- btoa: d,
- fromBase64: k,
- toBase64: v,
- utob: h,
- encode: v,
- encodeURI: y,
- btou: b,
- decode: k,
- noConflict: x
- }, "function" == typeof Object.defineProperty) {
- var T = function(t) {
- return {
- value: t,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- };
- n.Base64.extendString = function() {
- Object.defineProperty(String.prototype, "fromBase64", T(function() {
- return k(this)
- })), Object.defineProperty(String.prototype, "toBase64", T(function(t) {
- return v(this, t)
- })), Object.defineProperty(String.prototype, "toBase64URI", T(function() {
- return v(this, !0)
- }))
- }
- }
- n.Meteor && (Base64 = n.Base64)
- }(this)
- }, {
- buffer: 4
- }],
- 11: [function(t, e) {
- function n() {
- throw new Error("setTimeout has not been defined")
- }
- function r() {
- throw new Error("clearTimeout has not been defined")
- }
- function i(t) {
- if (l === setTimeout) return setTimeout(t, 0);
- if ((l === n || !l) && setTimeout) return l = setTimeout, setTimeout(t, 0);
- try {
- return l(t, 0)
- } catch (e) {
- try {
- return l.call(null, t, 0)
- } catch (e) {
- return l.call(this, t, 0)
- }
- }
- }
- function o(t) {
- if (f === clearTimeout) return clearTimeout(t);
- if ((f === r || !f) && clearTimeout) return f = clearTimeout, clearTimeout(t);
- try {
- return f(t)
- } catch (e) {
- try {
- return f.call(null, t)
- } catch (e) {
- return f.call(this, t)
- }
- }
- }
- function s() {
- _ && p && (_ = !1, p.length ? d = p.concat(d) : v = -1, d.length && a())
- }
- function a() {
- if (!_) {
- var t = i(s);
- _ = !0;
- for (var e = d.length; e;) {
- for (p = d, d = []; ++v < e;) p && p[v].run();
- v = -1, e = d.length
- }
- p = null, _ = !1, o(t)
- }
- }
- function u(t, e) {
- this.fun = t, this.array = e
- }
- function c() {}
- var l, f, h = e.exports = {};
- ! function() {
- try {
- l = "function" == typeof setTimeout ? setTimeout : n
- } catch (t) {
- l = n
- }
- try {
- f = "function" == typeof clearTimeout ? clearTimeout : r
- } catch (t) {
- f = r
- }
- }();
- var p, d = [],
- _ = !1,
- v = -1;
- h.nextTick = function(t) {
- var e = new Array(arguments.length - 1);
- if (arguments.length > 1)
- for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
- d.push(new u(t, e)), 1 !== d.length || _ || i(a)
- }, u.prototype.run = function() {
- this.fun.apply(null, this.array)
- }, h.title = "browser", h.browser = !0, h.env = {}, h.argv = [], h.version = "", h.versions = {}, h.on = c, h.addListener = c, h.once = c, h.off = c, h.removeListener = c, h.removeAllListeners = c, h.emit = c, h.binding = function() {
- throw new Error("process.binding is not supported")
- }, h.cwd = function() {
- return "/"
- }, h.chdir = function() {
- throw new Error("process.chdir is not supported")
- }, h.umask = function() {
- return 0
- }
- }, {}],
- 12: [function(t) {
- "use strict";
- function e(t) {
- return t && "object" === ("undefined" == typeof t ? "undefined" : h(t)) && "default" in t ? t["default"] : t
- }
- function n(t) {
- return new p(function(e) {
- return setTimeout(e, t)
- })
- }
- function r(t) {
- function e(e, r, i) {
- var o = 6e3,
- s = 2e3,
- a = 12e3;
- return e.length <= 2 && (o = 3e4, s = 15e3, a = 6e4), p.resolve().then(function() {
- return e.reduce(function(u, c, l) {
- return u.then(function() {
- return new p(function(t) {
- var e = i[0];
- e.onload = function() {
- e.onload = null, t()
- }, e.src = c
- })
- }).then(function() {
- return p.all([m(r, o), g(i, o)])
- }).then(function() {
- return n(a)
- }).then(function() {
- return l < e.length - 1 ? p.all([g(r, s), m(i, s)]) : void t()
- })
- }, p.resolve())
- })
- }
- function r() {
- a = !1, s || (u && u.cancel(), s = !0, k.hide(), w.show(), C.hide(), u = e(["img/bill-compact-hands.png", "img/bill-compact-cart.png", "img/bill-compact-cart-elem.png", "img/bill-compact-shamash.png", "img/bill-compact-ruins.png", "img/bill-compact-pterodactyl.png", "img/bill-compact-goat.png"], w, C))
- }
- function i() {
- s = !1, a || (u && u.cancel(), a = !0, x.hide(), b.show(), E.hide(), u = e(["img/bill-dragon.png", "img/bill-lady.png"], b, E))
- }
- function o() {
- var t = window.innerWidth < 960 && window.innerHeight > 468;
- t ? r() : i()
- }
- var s = !1,
- a = !1,
- u = void 0;
- o(), window.addEventListener("resize", d(o, 200))
- }
- function i(t, e) {
- return new p(function(n) {
- function r() {
- ++i, i === e && (t.removeEventListener("ended", r), n())
- }
- var i = 0;
- t.addEventListener("ended", r)
- })
- }
- function o(t) {
- function e() {
- t.currentTime = 0;
- try {
- t.play()["catch"](function() {})
- } catch (e) {}
- }
- return t.addEventListener("ended", e),
- function() {
- t.removeEventListener("ended", e)
- }
- }
- function s() {
- return new p(function(t) {
- return T ? t() : (window.onYouTubeIframeAPIReady = function() {
- T = !0, t()
- }, void $.getScript("https://www.youtube.com/iframe_api"))
- })
- }
- function a(t) {
- var e = window.innerHeight,
- n = 1.6 * window.innerHeight;
- n > window.innerWidth && (n = window.innerWidth, e = .9 * window.innerWidth), t.height = e + 45, t.width = n
- }
- function u(t, e) {
- return s().then(function() {
- var n = document.createElement("div");
- n.id = "video";
- var r = document.createElement("div");
- return r.id = "player", n.appendChild(r), document.body.appendChild(n), new p(function(r) {
- var i;
- new YT.Player("player", {
- videoId: t,
- playerVars: {
- autoplay: e ? 1 : 0,
- controls: 0,
- rel: 0,
- modestbranding: 1
- },
- events: {
- onReady: function(t) {
- var r = document.getElementById("player"),
- i = function() {
- return a(r)
- };
- i();
- var o = d(i, 200);
- window.addEventListener("resize", o), n.className = "visible", setTimeout(function() {
- return e && t.target.playVideo()
- }, 2e3)
- },
- onStateChange: function(t) {
- t.data == YT.PlayerState.ENDED && (n.className = "", setTimeout(function() {
- window.removeEventListener("resize", i), n.parentNode.removeChild(n), r()
- }, 2e3))
- }
- }
- })
- })
- })
- }
- function c() {
- var t = $('<div id="' + R("ZWF0ZXItZWdn") + '">' + R("SEUgSEFTIFRPTEQgWU9V") + "</div>");
- t.hide(), $("body").append(t), t.fadeIn(2e3, function() {
- setTimeout(function() {
- return t.fadeOut(1e3)
- }, 3e3)
- })
- }
- function l(t, e) {
- var n = $("#bill img:visible");
- L = n.height() / 350;
- var r = n.offset();
- M(e, r.top) ? N(t, r.left) ? z.topLeft = !0 : V(t, r.left + n.width()) && (z.topRight = !0) : H(e, r.top + n.height()) && (N(t, r.left) ? z.bottomLeft = !0 : V(t, r.left + n.width()) && (z.bottomRight = !0));
- var i = Object.keys(z);
- 4 === i.length && i.every(function(t) {
- return z[t]
- }) ? (r.right = r.left + n.width(), r.bottom = r.top + n.height(), Y(t, e, r) && (q || (q = !0, c()))) : 2 === i.length && i.every(function(t) {
- return z[t]
- }) && console.log("Perhaps you will hear.")
- }
- var f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
- return typeof t
- } : function(t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol ? "symbol" : typeof t
- },
- h = "function" == typeof Symbol && "symbol" === f(Symbol.iterator) ? function(t) {
- return "undefined" == typeof t ? "undefined" : f(t)
- } : function(t) {
- return t && "function" == typeof Symbol && t.constructor === Symbol ? "symbol" : "undefined" == typeof t ? "undefined" : f(t)
- },
- p = e(t("bluebird")),
- d = e(t("debounce")),
- _ = e(t("bowser")),
- v = e(t("draggable")),
- y = t("js-base64");
- p.config({
- cancellation: !0
- });
- var g = function(t, e) {
- return new p(function(n) {
- return t.fadeIn(e, n)
- })
- },
- m = function(t, e) {
- return new p(function(n) {
- return t.fadeOut(e, n)
- })
- },
- b = ($("#bill img.original"), $("#bill img.original.desktop")),
- w = $("#bill img.original.mobile"),
- E = ($("#bill img.alternate"), $("#bill img.alternate.desktop")),
- C = $("#bill img.alternate.mobile"),
- k = $("#bill img.desktop"),
- x = $("#bill img.mobile"),
- T = !1,
- j = 1473894e3,
- A = Math.max(1, j - (new Date).getTime() / 1e3),
- P = function() {
- var t = $(".clock-builder-output"),
- e = new FlipClock(t, A, {
- clockFace: "DailyCounter",
- countdown: !0,
- callbacks: {
- stop: function() {
- window.location.reload(!0)
- }
- }
- });
- return e.$elem = t, e
- },
- R = y.Base64.decode,
- F = "RkPU5RkRRo4",
- S = "audio/vide.mp3",
- O = !_.mobile && !_.tablet,
- B = 1e4,
- D = P(),
- U = document.createElement("audio");
- U.setAttribute("autoplay", !0);
- var I = (o(U), function() {
- return U.pause(), D.$elem.fadeOut(), u(F, O).then(function() {
- D.$elem.fadeIn(), U.play()
- })
- });
- i(U, 1).then(function() {
- U.pause(), O && I()
- });
- var L = $("#bill img:visible").height() / 350,
- M = function(t, e) {
- return t > e + 35 * L && e + 130 * L > t
- },
- N = function(t, e) {
- return t > e + 30 * L && e + 70 * L > t
- },
- V = function(t, e) {
- return (e - 90) * L > t && t > e - 120 * L
- },
- H = function(t, e) {
- return e - 35 * L > t && t > e - 130 * L
- },
- Y = function(t, e, n) {
- return e > n.top + 160 * L && e < n.bottom - 130 * L && t > n.left + 75 * L && t < (n.right - 135) * L
- },
- z = {},
- q = !1;
- n(B).then(function() {
- O || $(U).one("canplay", function() {
- var t = $('<button class="audio-button"><img src="img/audio-button.png"></button>'),
- e = !1;
- $("body").append(t), new v(t[0], {
- limit: document.body,
- threshold: 15,
- onDragStart: function() {
- return e = !0
- },
- onDragEnd: function(t, n, r) {
- e = !1, l(n, r)
- }
- }), t.on("touchend", function() {
- e || (U.paused ? U.play() : U.pause())
- })
- }), U.src = S, r(function() {
- O || n(75e3).then(I)
- })
- }), console.log("%c You're welcome.", "color: #990000; font-size: 40px; font-weight: bold;")
- }, {
- bluebird: 2,
- bowser: 3,
- debounce: 5,
- draggable: 7,
- "js-base64": 10
- }]
- }, {}, [12]);
Add Comment
Please, Sign In to add comment