Created
April 23, 2020 12:19
-
-
Save jefftangx/07bbb2dbe260b483fffed746bdd2d717 to your computer and use it in GitHub Desktop.
https://roamresearch.com/#/app/ego/page/V81KJmS5L references these files
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var $jscomp = {}; | |
| var shadow$provide = {}; | |
| if (typeof Math.imul == "undefined" || Math.imul(0xffffffff, 5) == 0) { | |
| Math.imul = function (a, b) { | |
| var ah = (a >>> 16) & 0xffff; | |
| var al = a & 0xffff; | |
| var bh = (b >>> 16) & 0xffff; | |
| var bl = b & 0xffff; | |
| // the shift by 0 fixes the sign on the high part | |
| // the final |0 converts the unsigned value into a signed value | |
| return (al * bl + (((ah * bl + al * bh) << 16) >>> 0)) | 0; | |
| }; | |
| } | |
| var shadow$modules = { | |
| uris: { | |
| "route-app": ["/js/compiled/route-app.js"], | |
| "route-secret-invite": ["/js/compiled/route-secret-invite.js"], | |
| "app-katex": ["/js/compiled/app-katex.js"], | |
| "app-date-time": ["/js/compiled/app-date-time.js"], | |
| "app-graph": ["/js/compiled/app-graph.js"], | |
| "app-chart": ["/js/compiled/app-chart.js"], | |
| "app-export": ["/js/compiled/app-export.js"], | |
| "app-emoji": ["/js/compiled/app-emoji.js"], | |
| "app-codemirror": ["/js/compiled/app-codemirror.js"], | |
| main: [], | |
| "app-document": ["/js/compiled/app-document.js"], | |
| }, | |
| infos: { | |
| "route-app": ["main"], | |
| "route-secret-invite": ["main"], | |
| "app-katex": ["route-app"], | |
| "app-date-time": ["route-app"], | |
| "app-graph": ["route-app"], | |
| "app-chart": ["route-app"], | |
| "app-export": ["route-app"], | |
| "app-emoji": ["route-app"], | |
| "app-codemirror": ["route-app"], | |
| main: null, | |
| "app-document": ["route-app", "app-katex"], | |
| }, | |
| }; | |
| var $jscomp = $jscomp || {}; | |
| $jscomp.scope = {}; | |
| $jscomp.arrayIteratorImpl = function (m) { | |
| var f = 0; | |
| return function () { | |
| return f < m.length ? { done: !1, value: m[f++] } : { done: !0 }; | |
| }; | |
| }; | |
| $jscomp.arrayIterator = function (m) { | |
| return { next: $jscomp.arrayIteratorImpl(m) }; | |
| }; | |
| $jscomp.makeIterator = function (m) { | |
| var f = "undefined" != typeof Symbol && Symbol.iterator && m[Symbol.iterator]; | |
| return f ? f.call(m) : $jscomp.arrayIterator(m); | |
| }; | |
| $jscomp.arrayFromIterator = function (m) { | |
| for (var f, r = []; !(f = m.next()).done; ) r.push(f.value); | |
| return r; | |
| }; | |
| $jscomp.arrayFromIterable = function (m) { | |
| return m instanceof Array | |
| ? m | |
| : $jscomp.arrayFromIterator($jscomp.makeIterator(m)); | |
| }; | |
| $jscomp.ASSUME_ES5 = !1; | |
| $jscomp.ASSUME_NO_NATIVE_MAP = !1; | |
| $jscomp.ASSUME_NO_NATIVE_SET = !1; | |
| $jscomp.SIMPLE_FROUND_POLYFILL = !1; | |
| $jscomp.objectCreate = | |
| $jscomp.ASSUME_ES5 || "function" == typeof Object.create | |
| ? Object.create | |
| : function (m) { | |
| var f = function () {}; | |
| f.prototype = m; | |
| return new f(); | |
| }; | |
| $jscomp.underscoreProtoCanBeSet = function () { | |
| var m = { a: !0 }, | |
| f = {}; | |
| try { | |
| return (f.__proto__ = m), f.a; | |
| } catch (r) {} | |
| return !1; | |
| }; | |
| $jscomp.setPrototypeOf = | |
| "function" == typeof Object.setPrototypeOf | |
| ? Object.setPrototypeOf | |
| : $jscomp.underscoreProtoCanBeSet() | |
| ? function (m, f) { | |
| m.__proto__ = f; | |
| if (m.__proto__ !== f) throw new TypeError(m + " is not extensible"); | |
| return m; | |
| } | |
| : null; | |
| $jscomp.inherits = function (m, f) { | |
| m.prototype = $jscomp.objectCreate(f.prototype); | |
| m.prototype.constructor = m; | |
| if ($jscomp.setPrototypeOf) { | |
| var r = $jscomp.setPrototypeOf; | |
| r(m, f); | |
| } else | |
| for (r in f) | |
| if ("prototype" != r) | |
| if (Object.defineProperties) { | |
| var d = Object.getOwnPropertyDescriptor(f, r); | |
| d && Object.defineProperty(m, r, d); | |
| } else m[r] = f[r]; | |
| m.superClass_ = f.prototype; | |
| }; | |
| shadow$provide[0] = function (m, f, r, d) { | |
| var b = Object.getOwnPropertySymbols, | |
| t = Object.prototype.hasOwnProperty, | |
| q = Object.prototype.propertyIsEnumerable; | |
| r.exports = (function () { | |
| try { | |
| if (!Object.assign) return !1; | |
| var b = new String("abc"); | |
| b[5] = "de"; | |
| if ("5" === Object.getOwnPropertyNames(b)[0]) return !1; | |
| var d = {}; | |
| for (b = 0; 10 > b; b++) d["_" + String.fromCharCode(b)] = b; | |
| if ( | |
| "0123456789" !== | |
| Object.getOwnPropertyNames(d) | |
| .map(function (a) { | |
| return d[a]; | |
| }) | |
| .join("") | |
| ) | |
| return !1; | |
| var a = {}; | |
| "abcdefghijklmnopqrst".split("").forEach(function (b) { | |
| a[b] = b; | |
| }); | |
| return "abcdefghijklmnopqrst" !== | |
| Object.keys(Object.assign({}, a)).join("") | |
| ? !1 | |
| : !0; | |
| } catch (k) { | |
| return !1; | |
| } | |
| })() | |
| ? Object.assign | |
| : function (d, u) { | |
| if (null === d || void 0 === d) | |
| throw new TypeError( | |
| "Object.assign cannot be called with null or undefined" | |
| ); | |
| var a = Object(d); | |
| for (var h, n = 1; n < arguments.length; n++) { | |
| var c = Object(arguments[n]); | |
| for (var e in c) t.call(c, e) && (a[e] = c[e]); | |
| if (b) { | |
| h = b(c); | |
| for (var l = 0; l < h.length; l++) | |
| q.call(c, h[l]) && (a[h[l]] = c[h[l]]); | |
| } | |
| } | |
| return a; | |
| }; | |
| }; | |
| shadow$provide[1] = function (m, f, r, d) { | |
| function b(a, b, g, c, e, d, l, h) { | |
| if (!a) { | |
| a = void 0; | |
| if (void 0 === b) | |
| a = Error( | |
| "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings." | |
| ); | |
| else { | |
| var k = [g, c, e, d, l, h], | |
| n = 0; | |
| a = Error( | |
| b.replace(/%s/g, function () { | |
| return k[n++]; | |
| }) | |
| ); | |
| a.name = "Invariant Violation"; | |
| } | |
| a.framesToPop = 1; | |
| throw a; | |
| } | |
| } | |
| function t(a) { | |
| for ( | |
| var g = arguments.length - 1, | |
| c = "https://reactjs.org/docs/error-decoder.html?invariant\x3d" + a, | |
| e = 0; | |
| e < g; | |
| e++ | |
| ) | |
| c += "\x26args[]\x3d" + encodeURIComponent(arguments[e + 1]); | |
| b( | |
| !1, | |
| "Minified React error #" + | |
| a + | |
| "; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ", | |
| c | |
| ); | |
| } | |
| function q(a, b, g) { | |
| this.props = a; | |
| this.context = b; | |
| this.refs = L; | |
| this.updater = g || J; | |
| } | |
| function h() {} | |
| function u(a, b, g) { | |
| this.props = a; | |
| this.context = b; | |
| this.refs = L; | |
| this.updater = g || J; | |
| } | |
| function a(a, b, g) { | |
| var c = void 0, | |
| e = {}, | |
| d = null, | |
| l = null; | |
| if (null != b) | |
| for (c in (void 0 !== b.ref && (l = b.ref), | |
| void 0 !== b.key && (d = "" + b.key), | |
| b)) | |
| V.call(b, c) && !U.hasOwnProperty(c) && (e[c] = b[c]); | |
| var h = arguments.length - 2; | |
| if (1 === h) e.children = g; | |
| else if (1 < h) { | |
| for (var k = Array(h), n = 0; n < h; n++) k[n] = arguments[n + 2]; | |
| e.children = k; | |
| } | |
| if (a && a.defaultProps) | |
| for (c in ((h = a.defaultProps), h)) void 0 === e[c] && (e[c] = h[c]); | |
| return { | |
| $$typeof: G, | |
| type: a, | |
| key: d, | |
| ref: l, | |
| props: e, | |
| _owner: B.current, | |
| }; | |
| } | |
| function k(a, b) { | |
| return { | |
| $$typeof: G, | |
| type: a.type, | |
| key: b, | |
| ref: a.ref, | |
| props: a.props, | |
| _owner: a._owner, | |
| }; | |
| } | |
| function n(a) { | |
| return "object" === typeof a && null !== a && a.$$typeof === G; | |
| } | |
| function c(a) { | |
| var b = { "\x3d": "\x3d0", ":": "\x3d2" }; | |
| return ( | |
| "$" + | |
| ("" + a).replace(/[=:]/g, function (a) { | |
| return b[a]; | |
| }) | |
| ); | |
| } | |
| function e(a, b, c, g) { | |
| if (ca.length) { | |
| var e = ca.pop(); | |
| e.result = a; | |
| e.keyPrefix = b; | |
| e.func = c; | |
| e.context = g; | |
| e.count = 0; | |
| return e; | |
| } | |
| return { result: a, keyPrefix: b, func: c, context: g, count: 0 }; | |
| } | |
| function l(a) { | |
| a.result = null; | |
| a.keyPrefix = null; | |
| a.func = null; | |
| a.context = null; | |
| a.count = 0; | |
| 10 > ca.length && ca.push(a); | |
| } | |
| function g(a, b, c, e) { | |
| var d = typeof a; | |
| if ("undefined" === d || "boolean" === d) a = null; | |
| var l = !1; | |
| if (null === a) l = !0; | |
| else | |
| switch (d) { | |
| case "string": | |
| case "number": | |
| l = !0; | |
| break; | |
| case "object": | |
| switch (a.$$typeof) { | |
| case G: | |
| case O: | |
| l = !0; | |
| } | |
| } | |
| if (l) return c(e, a, "" === b ? "." + y(a, 0) : b), 1; | |
| l = 0; | |
| b = "" === b ? "." : b + ":"; | |
| if (Array.isArray(a)) | |
| for (var h = 0; h < a.length; h++) { | |
| d = a[h]; | |
| var k = b + y(d, h); | |
| l += g(d, k, c, e); | |
| } | |
| else if ( | |
| (null === a || "object" !== typeof a | |
| ? (k = null) | |
| : ((k = (P && a[P]) || a["@@iterator"]), | |
| (k = "function" === typeof k ? k : null)), | |
| "function" === typeof k) | |
| ) | |
| for (a = k.call(a), h = 0; !(d = a.next()).done; ) | |
| (d = d.value), (k = b + y(d, h++)), (l += g(d, k, c, e)); | |
| else | |
| "object" === d && | |
| ((c = "" + a), | |
| t( | |
| "31", | |
| "[object Object]" === c | |
| ? "object with keys {" + Object.keys(a).join(", ") + "}" | |
| : c, | |
| "" | |
| )); | |
| return l; | |
| } | |
| function w(a, b, c) { | |
| return null == a ? 0 : g(a, "", b, c); | |
| } | |
| function y(a, b) { | |
| return "object" === typeof a && null !== a && null != a.key | |
| ? c(a.key) | |
| : b.toString(36); | |
| } | |
| function x(a, b) { | |
| a.func.call(a.context, b, a.count++); | |
| } | |
| function v(a, b, c) { | |
| var e = a.result, | |
| g = a.keyPrefix; | |
| a = a.func.call(a.context, b, a.count++); | |
| Array.isArray(a) | |
| ? I(a, e, c, function (a) { | |
| return a; | |
| }) | |
| : null != a && | |
| (n(a) && | |
| (a = k( | |
| a, | |
| g + | |
| (!a.key || (b && b.key === a.key) | |
| ? "" | |
| : ("" + a.key).replace(Y, "$\x26/") + "/") + | |
| c | |
| )), | |
| e.push(a)); | |
| } | |
| function I(a, b, c, g, d) { | |
| var h = ""; | |
| null != c && (h = ("" + c).replace(Y, "$\x26/") + "/"); | |
| b = e(b, h, g, d); | |
| w(a, v, b); | |
| l(b); | |
| } | |
| function H() { | |
| var a = N.current; | |
| null === a ? t("307") : void 0; | |
| return a; | |
| } | |
| var C = f(0), | |
| E = "function" === typeof Symbol && Symbol.for, | |
| G = E ? Symbol.for("react.element") : 60103, | |
| O = E ? Symbol.for("react.portal") : 60106; | |
| m = E ? Symbol.for("react.fragment") : 60107; | |
| f = E ? Symbol.for("react.strict_mode") : 60108; | |
| d = E ? Symbol.for("react.profiler") : 60114; | |
| var A = E ? Symbol.for("react.provider") : 60109, | |
| z = E ? Symbol.for("react.context") : 60110, | |
| K = E ? Symbol.for("react.concurrent_mode") : 60111, | |
| D = E ? Symbol.for("react.forward_ref") : 60112, | |
| Q = E ? Symbol.for("react.suspense") : 60113, | |
| M = E ? Symbol.for("react.memo") : 60115, | |
| F = E ? Symbol.for("react.lazy") : 60116, | |
| P = "function" === typeof Symbol && Symbol.iterator, | |
| J = { | |
| isMounted: function () { | |
| return !1; | |
| }, | |
| enqueueForceUpdate: function () {}, | |
| enqueueReplaceState: function () {}, | |
| enqueueSetState: function () {}, | |
| }, | |
| L = {}; | |
| q.prototype.isReactComponent = {}; | |
| q.prototype.setState = function (a, b) { | |
| "object" !== typeof a && "function" !== typeof a && null != a | |
| ? t("85") | |
| : void 0; | |
| this.updater.enqueueSetState(this, a, b, "setState"); | |
| }; | |
| q.prototype.forceUpdate = function (a) { | |
| this.updater.enqueueForceUpdate(this, a, "forceUpdate"); | |
| }; | |
| h.prototype = q.prototype; | |
| E = u.prototype = new h(); | |
| E.constructor = u; | |
| C(E, q.prototype); | |
| E.isPureReactComponent = !0; | |
| var N = { current: null }, | |
| B = { current: null }, | |
| V = Object.prototype.hasOwnProperty, | |
| U = { key: !0, ref: !0, __self: !0, __source: !0 }, | |
| Y = /\/+/g, | |
| ca = []; | |
| m = { | |
| Children: { | |
| map: function (a, b, c) { | |
| if (null == a) return a; | |
| var e = []; | |
| I(a, e, null, b, c); | |
| return e; | |
| }, | |
| forEach: function (a, b, c) { | |
| if (null == a) return a; | |
| b = e(null, null, b, c); | |
| w(a, x, b); | |
| l(b); | |
| }, | |
| count: function (a) { | |
| return w( | |
| a, | |
| function () { | |
| return null; | |
| }, | |
| null | |
| ); | |
| }, | |
| toArray: function (a) { | |
| var b = []; | |
| I(a, b, null, function (a) { | |
| return a; | |
| }); | |
| return b; | |
| }, | |
| only: function (a) { | |
| n(a) ? void 0 : t("143"); | |
| return a; | |
| }, | |
| }, | |
| createRef: function () { | |
| return { current: null }; | |
| }, | |
| Component: q, | |
| PureComponent: u, | |
| createContext: function (a, b) { | |
| void 0 === b && (b = null); | |
| a = { | |
| $$typeof: z, | |
| _calculateChangedBits: b, | |
| _currentValue: a, | |
| _currentValue2: a, | |
| _threadCount: 0, | |
| Provider: null, | |
| Consumer: null, | |
| }; | |
| a.Provider = { $$typeof: A, _context: a }; | |
| return (a.Consumer = a); | |
| }, | |
| forwardRef: function (a) { | |
| return { $$typeof: D, render: a }; | |
| }, | |
| lazy: function (a) { | |
| return { $$typeof: F, _ctor: a, _status: -1, _result: null }; | |
| }, | |
| memo: function (a, b) { | |
| return { $$typeof: M, type: a, compare: void 0 === b ? null : b }; | |
| }, | |
| useCallback: function (a, b) { | |
| return H().useCallback(a, b); | |
| }, | |
| useContext: function (a, b) { | |
| return H().useContext(a, b); | |
| }, | |
| useEffect: function (a, b) { | |
| return H().useEffect(a, b); | |
| }, | |
| useImperativeHandle: function (a, b, c) { | |
| return H().useImperativeHandle(a, b, c); | |
| }, | |
| useDebugValue: function () {}, | |
| useLayoutEffect: function (a, b) { | |
| return H().useLayoutEffect(a, b); | |
| }, | |
| useMemo: function (a, b) { | |
| return H().useMemo(a, b); | |
| }, | |
| useReducer: function (a, b, c) { | |
| return H().useReducer(a, b, c); | |
| }, | |
| useRef: function (a) { | |
| return H().useRef(a); | |
| }, | |
| useState: function (a) { | |
| return H().useState(a); | |
| }, | |
| Fragment: m, | |
| StrictMode: f, | |
| Suspense: Q, | |
| createElement: a, | |
| cloneElement: function (a, b, c) { | |
| null === a || void 0 === a ? t("267", a) : void 0; | |
| var e = void 0, | |
| g = C({}, a.props), | |
| d = a.key, | |
| l = a.ref, | |
| h = a._owner; | |
| if (null != b) { | |
| void 0 !== b.ref && ((l = b.ref), (h = B.current)); | |
| void 0 !== b.key && (d = "" + b.key); | |
| var k = void 0; | |
| a.type && a.type.defaultProps && (k = a.type.defaultProps); | |
| for (e in b) | |
| V.call(b, e) && | |
| !U.hasOwnProperty(e) && | |
| (g[e] = void 0 === b[e] && void 0 !== k ? k[e] : b[e]); | |
| } | |
| e = arguments.length - 2; | |
| if (1 === e) g.children = c; | |
| else if (1 < e) { | |
| k = Array(e); | |
| for (var n = 0; n < e; n++) k[n] = arguments[n + 2]; | |
| g.children = k; | |
| } | |
| return { $$typeof: G, type: a.type, key: d, ref: l, props: g, _owner: h }; | |
| }, | |
| createFactory: function (b) { | |
| var c = a.bind(null, b); | |
| c.type = b; | |
| return c; | |
| }, | |
| isValidElement: n, | |
| version: "16.8.3", | |
| unstable_ConcurrentMode: K, | |
| unstable_Profiler: d, | |
| __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { | |
| ReactCurrentDispatcher: N, | |
| ReactCurrentOwner: B, | |
| assign: C, | |
| }, | |
| }; | |
| m = ((f = { default: m }), m) || f; | |
| r.exports = m.default || m; | |
| }; | |
| shadow$provide[2] = function (m, f, r, d) { | |
| r.exports = function (b, d, q, h, u, a, k, n) { | |
| if (!b) { | |
| if (void 0 === d) | |
| b = Error( | |
| "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings." | |
| ); | |
| else { | |
| var c = [q, h, u, a, k, n], | |
| e = 0; | |
| b = Error( | |
| d.replace(/%s/g, function () { | |
| return c[e++]; | |
| }) | |
| ); | |
| b.name = "Invariant Violation"; | |
| } | |
| b.framesToPop = 1; | |
| throw b; | |
| } | |
| }; | |
| }; | |
| shadow$provide[3] = function (m, f, r, d) { | |
| function b(b) { | |
| return function () { | |
| return b; | |
| }; | |
| } | |
| m = function () {}; | |
| m.thatReturns = b; | |
| m.thatReturnsFalse = b(!1); | |
| m.thatReturnsTrue = b(!0); | |
| m.thatReturnsNull = b(null); | |
| m.thatReturnsThis = function () { | |
| return this; | |
| }; | |
| m.thatReturnsArgument = function (b) { | |
| return b; | |
| }; | |
| r.exports = m; | |
| }; | |
| shadow$provide[5] = function (m, f, r, d) { | |
| r.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; | |
| }; | |
| shadow$provide[8] = function (m, f, r, d) { | |
| r.exports = f(1); | |
| }; | |
| shadow$provide[9] = function (m, f, r, d) { | |
| function b() { | |
| if (!l) { | |
| var b = a.expirationTime; | |
| g ? O() : (g = !0); | |
| G(h, b); | |
| } | |
| } | |
| function t() { | |
| var c = a, | |
| g = a.next; | |
| if (a === g) a = null; | |
| else { | |
| var d = a.previous; | |
| a = d.next = g; | |
| g.previous = d; | |
| } | |
| c.next = c.previous = null; | |
| d = c.callback; | |
| g = c.expirationTime; | |
| c = c.priorityLevel; | |
| var l = n, | |
| h = e; | |
| n = c; | |
| e = g; | |
| try { | |
| var k = d(); | |
| } finally { | |
| (n = l), (e = h); | |
| } | |
| if ("function" === typeof k) | |
| if ( | |
| ((k = { | |
| callback: k, | |
| priorityLevel: c, | |
| expirationTime: g, | |
| next: null, | |
| previous: null, | |
| }), | |
| null === a) | |
| ) | |
| a = k.next = k.previous = k; | |
| else { | |
| d = null; | |
| c = a; | |
| do { | |
| if (c.expirationTime >= g) { | |
| d = c; | |
| break; | |
| } | |
| c = c.next; | |
| } while (c !== a); | |
| null === d ? (d = a) : d === a && ((a = k), b()); | |
| g = d.previous; | |
| g.next = d.previous = k; | |
| k.next = d; | |
| k.previous = g; | |
| } | |
| } | |
| function q() { | |
| if (-1 === c && null !== a && 1 === a.priorityLevel) { | |
| l = !0; | |
| try { | |
| do t(); | |
| while (null !== a && 1 === a.priorityLevel); | |
| } finally { | |
| (l = !1), null !== a ? b() : (g = !1); | |
| } | |
| } | |
| } | |
| function h(c) { | |
| l = !0; | |
| var e = k; | |
| k = c; | |
| try { | |
| if (c) | |
| for (; null !== a; ) { | |
| var h = d.unstable_now(); | |
| if (a.expirationTime <= h) { | |
| do t(); | |
| while (null !== a && a.expirationTime <= h); | |
| } else break; | |
| } | |
| else if (null !== a) { | |
| do t(); | |
| while (null !== a && !A()); | |
| } | |
| } finally { | |
| (l = !1), (k = e), null !== a ? b() : (g = !1), q(); | |
| } | |
| } | |
| function u(a) { | |
| H = v(function (b) { | |
| x(C); | |
| a(b); | |
| }); | |
| C = y(function () { | |
| I(H); | |
| a(d.unstable_now()); | |
| }, 100); | |
| } | |
| Object.defineProperty(d, "__esModule", { value: !0 }); | |
| var a = null, | |
| k = !1, | |
| n = 3, | |
| c = -1, | |
| e = -1, | |
| l = !1, | |
| g = !1, | |
| w = Date, | |
| y = "function" === typeof setTimeout ? setTimeout : void 0, | |
| x = "function" === typeof clearTimeout ? clearTimeout : void 0, | |
| v = | |
| "function" === typeof requestAnimationFrame | |
| ? requestAnimationFrame | |
| : void 0, | |
| I = | |
| "function" === typeof cancelAnimationFrame | |
| ? cancelAnimationFrame | |
| : void 0, | |
| H, | |
| C; | |
| if ( | |
| "object" === typeof performance && | |
| "function" === typeof performance.now | |
| ) { | |
| var E = performance; | |
| d.unstable_now = function () { | |
| return E.now(); | |
| }; | |
| } else | |
| d.unstable_now = function () { | |
| return w.now(); | |
| }; | |
| f = null; | |
| "undefined" !== typeof window | |
| ? (f = window) | |
| : "undefined" !== typeof m && (f = m); | |
| if (f && f._schedMock) { | |
| m = f._schedMock; | |
| var G = m[0]; | |
| var O = m[1]; | |
| var A = m[2]; | |
| d.unstable_now = m[3]; | |
| } else if ( | |
| "undefined" === typeof window || | |
| "function" !== typeof MessageChannel | |
| ) { | |
| var z = null, | |
| K = function (a) { | |
| if (null !== z) | |
| try { | |
| z(a); | |
| } finally { | |
| z = null; | |
| } | |
| }; | |
| G = function (a) { | |
| null !== z ? setTimeout(G, 0, a) : ((z = a), setTimeout(K, 0, !1)); | |
| }; | |
| O = function () { | |
| z = null; | |
| }; | |
| A = function () { | |
| return !1; | |
| }; | |
| } else { | |
| "undefined" !== typeof console && | |
| ("function" !== typeof v && | |
| console.error( | |
| "This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills" | |
| ), | |
| "function" !== typeof I && | |
| console.error( | |
| "This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills" | |
| )); | |
| var D = null, | |
| Q = !1, | |
| M = -1, | |
| F = !1, | |
| P = !1, | |
| J = 0, | |
| L = 33, | |
| N = 33; | |
| A = function () { | |
| return J <= d.unstable_now(); | |
| }; | |
| m = new MessageChannel(); | |
| var B = m.port2; | |
| m.port1.onmessage = function () { | |
| Q = !1; | |
| var a = D, | |
| b = M; | |
| D = null; | |
| M = -1; | |
| var c = d.unstable_now(), | |
| e = !1; | |
| if (0 >= J - c) | |
| if (-1 !== b && b <= c) e = !0; | |
| else { | |
| F || ((F = !0), u(V)); | |
| D = a; | |
| M = b; | |
| return; | |
| } | |
| if (null !== a) { | |
| P = !0; | |
| try { | |
| a(e); | |
| } finally { | |
| P = !1; | |
| } | |
| } | |
| }; | |
| var V = function (a) { | |
| if (null !== D) { | |
| u(V); | |
| var b = a - J + N; | |
| b < N && L < N ? (8 > b && (b = 8), (N = b < L ? L : b)) : (L = b); | |
| J = a + N; | |
| Q || ((Q = !0), B.postMessage(void 0)); | |
| } else F = !1; | |
| }; | |
| G = function (a, b) { | |
| D = a; | |
| M = b; | |
| P || 0 > b ? B.postMessage(void 0) : F || ((F = !0), u(V)); | |
| }; | |
| O = function () { | |
| D = null; | |
| Q = !1; | |
| M = -1; | |
| }; | |
| } | |
| d.unstable_ImmediatePriority = 1; | |
| d.unstable_UserBlockingPriority = 2; | |
| d.unstable_NormalPriority = 3; | |
| d.unstable_IdlePriority = 5; | |
| d.unstable_LowPriority = 4; | |
| d.unstable_runWithPriority = function (a, b) { | |
| switch (a) { | |
| case 1: | |
| case 2: | |
| case 3: | |
| case 4: | |
| case 5: | |
| break; | |
| default: | |
| a = 3; | |
| } | |
| var e = n, | |
| g = c; | |
| n = a; | |
| c = d.unstable_now(); | |
| try { | |
| return b(); | |
| } finally { | |
| (n = e), (c = g), q(); | |
| } | |
| }; | |
| d.unstable_next = function (a) { | |
| switch (n) { | |
| case 1: | |
| case 2: | |
| case 3: | |
| var b = 3; | |
| break; | |
| default: | |
| b = n; | |
| } | |
| var e = n, | |
| g = c; | |
| n = b; | |
| c = d.unstable_now(); | |
| try { | |
| return a(); | |
| } finally { | |
| (n = e), (c = g), q(); | |
| } | |
| }; | |
| d.unstable_scheduleCallback = function (e, g) { | |
| var l = -1 !== c ? c : d.unstable_now(); | |
| if ("object" === typeof g && null !== g && "number" === typeof g.timeout) | |
| g = l + g.timeout; | |
| else | |
| switch (n) { | |
| case 1: | |
| g = l + -1; | |
| break; | |
| case 2: | |
| g = l + 250; | |
| break; | |
| case 5: | |
| g = l + 1073741823; | |
| break; | |
| case 4: | |
| g = l + 1e4; | |
| break; | |
| default: | |
| g = l + 5e3; | |
| } | |
| e = { | |
| callback: e, | |
| priorityLevel: n, | |
| expirationTime: g, | |
| next: null, | |
| previous: null, | |
| }; | |
| if (null === a) (a = e.next = e.previous = e), b(); | |
| else { | |
| l = null; | |
| var h = a; | |
| do { | |
| if (h.expirationTime > g) { | |
| l = h; | |
| break; | |
| } | |
| h = h.next; | |
| } while (h !== a); | |
| null === l ? (l = a) : l === a && ((a = e), b()); | |
| g = l.previous; | |
| g.next = l.previous = e; | |
| e.next = l; | |
| e.previous = g; | |
| } | |
| return e; | |
| }; | |
| d.unstable_cancelCallback = function (b) { | |
| var c = b.next; | |
| if (null !== c) { | |
| if (c === b) a = null; | |
| else { | |
| b === a && (a = c); | |
| var e = b.previous; | |
| e.next = c; | |
| c.previous = e; | |
| } | |
| b.next = b.previous = null; | |
| } | |
| }; | |
| d.unstable_wrapCallback = function (a) { | |
| var b = n; | |
| return function () { | |
| var e = n, | |
| g = c; | |
| n = b; | |
| c = d.unstable_now(); | |
| try { | |
| return a.apply(this, arguments); | |
| } finally { | |
| (n = e), (c = g), q(); | |
| } | |
| }; | |
| }; | |
| d.unstable_getCurrentPriorityLevel = function () { | |
| return n; | |
| }; | |
| d.unstable_shouldYield = function () { | |
| return !k && ((null !== a && a.expirationTime < e) || A()); | |
| }; | |
| d.unstable_continueExecution = function () { | |
| null !== a && b(); | |
| }; | |
| d.unstable_pauseExecution = function () {}; | |
| d.unstable_getFirstCallbackNode = function () { | |
| return a; | |
| }; | |
| }; | |
| shadow$provide[11] = function (m, f, r, d) { | |
| r.exports = f(9); | |
| }; | |
| shadow$provide[12] = function (m, f, r, d) { | |
| function b(a, b, p, c, e, g, d, l) { | |
| if (!a) { | |
| a = void 0; | |
| if (void 0 === b) | |
| a = Error( | |
| "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings." | |
| ); | |
| else { | |
| var h = [p, c, e, g, d, l], | |
| k = 0; | |
| a = Error( | |
| b.replace(/%s/g, function () { | |
| return h[k++]; | |
| }) | |
| ); | |
| a.name = "Invariant Violation"; | |
| } | |
| a.framesToPop = 1; | |
| throw a; | |
| } | |
| } | |
| function t(a) { | |
| for ( | |
| var p = arguments.length - 1, | |
| c = "https://reactjs.org/docs/error-decoder.html?invariant\x3d" + a, | |
| e = 0; | |
| e < p; | |
| e++ | |
| ) | |
| c += "\x26args[]\x3d" + encodeURIComponent(arguments[e + 1]); | |
| b( | |
| !1, | |
| "Minified React error #" + | |
| a + | |
| "; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ", | |
| c | |
| ); | |
| } | |
| function q(a, b, p, c, e, g, d, l, h) { | |
| var k = Array.prototype.slice.call(arguments, 3); | |
| try { | |
| b.apply(p, k); | |
| } catch (Ci) { | |
| this.onError(Ci); | |
| } | |
| } | |
| function h(a, b, p, c, e, g, d, l, h) { | |
| Cf = !1; | |
| mf = null; | |
| q.apply(Dh, arguments); | |
| } | |
| function u(a, b, p, c, e, g, d, l, k) { | |
| h.apply(this, arguments); | |
| if (Cf) { | |
| if (Cf) { | |
| var n = mf; | |
| Cf = !1; | |
| mf = null; | |
| } else t("198"), (n = void 0); | |
| Ie || ((Ie = !0), (bg = n)); | |
| } | |
| } | |
| function a() { | |
| if (Gg) | |
| for (var a in cg) { | |
| var b = cg[a], | |
| p = Gg.indexOf(a); | |
| -1 < p ? void 0 : t("96", a); | |
| if (!dg[p]) { | |
| b.extractEvents ? void 0 : t("97", a); | |
| dg[p] = b; | |
| p = b.eventTypes; | |
| for (var c in p) { | |
| var e = void 0, | |
| g = p[c], | |
| d = b, | |
| l = c; | |
| Ug.hasOwnProperty(l) ? t("99", l) : void 0; | |
| Ug[l] = g; | |
| var h = g.phasedRegistrationNames; | |
| if (h) { | |
| for (e in h) h.hasOwnProperty(e) && k(h[e], d, l); | |
| e = !0; | |
| } else | |
| g.registrationName | |
| ? (k(g.registrationName, d, l), (e = !0)) | |
| : (e = !1); | |
| e ? void 0 : t("98", c, a); | |
| } | |
| } | |
| } | |
| } | |
| function k(a, b, p) { | |
| nf[a] ? t("100", a) : void 0; | |
| nf[a] = b; | |
| eg[a] = b.eventTypes[p].dependencies; | |
| } | |
| function n(a, b, p) { | |
| var c = a.type || "unknown-event"; | |
| a.currentTarget = qi(p); | |
| u(c, b, void 0, a); | |
| a.currentTarget = null; | |
| } | |
| function c(a, b) { | |
| null == b ? t("30") : void 0; | |
| if (null == a) return b; | |
| if (Array.isArray(a)) { | |
| if (Array.isArray(b)) return a.push.apply(a, b), a; | |
| a.push(b); | |
| return a; | |
| } | |
| return Array.isArray(b) ? [a].concat(b) : [a, b]; | |
| } | |
| function e(a, b, p) { | |
| Array.isArray(a) ? a.forEach(b, p) : a && b.call(p, a); | |
| } | |
| function l(a) { | |
| if (a) { | |
| var b = a._dispatchListeners, | |
| p = a._dispatchInstances; | |
| if (Array.isArray(b)) | |
| for (var c = 0; c < b.length && !a.isPropagationStopped(); c++) | |
| n(a, b[c], p[c]); | |
| else b && n(a, b, p); | |
| a._dispatchListeners = null; | |
| a._dispatchInstances = null; | |
| a.isPersistent() || a.constructor.release(a); | |
| } | |
| } | |
| function g(a, b) { | |
| var p = a.stateNode; | |
| if (!p) return null; | |
| var c = tg(p); | |
| if (!c) return null; | |
| p = c[b]; | |
| a: switch (b) { | |
| case "onClick": | |
| case "onClickCapture": | |
| case "onDoubleClick": | |
| case "onDoubleClickCapture": | |
| case "onMouseDown": | |
| case "onMouseDownCapture": | |
| case "onMouseMove": | |
| case "onMouseMoveCapture": | |
| case "onMouseUp": | |
| case "onMouseUpCapture": | |
| (c = !c.disabled) || | |
| ((a = a.type), | |
| (c = !( | |
| "button" === a || | |
| "input" === a || | |
| "select" === a || | |
| "textarea" === a | |
| ))); | |
| a = !c; | |
| break a; | |
| default: | |
| a = !1; | |
| } | |
| if (a) return null; | |
| p && "function" !== typeof p ? t("231", b, typeof p) : void 0; | |
| return p; | |
| } | |
| function w(a) { | |
| null !== a && (xe = c(xe, a)); | |
| a = xe; | |
| xe = null; | |
| if (a && (e(a, l), xe ? t("95") : void 0, Ie)) | |
| throw ((a = bg), (Ie = !1), (bg = null), a); | |
| } | |
| function y(a) { | |
| if (a[Je]) return a[Je]; | |
| for (; !a[Je]; ) | |
| if (a.parentNode) a = a.parentNode; | |
| else return null; | |
| a = a[Je]; | |
| return 5 === a.tag || 6 === a.tag ? a : null; | |
| } | |
| function x(a) { | |
| a = a[Je]; | |
| return !a || (5 !== a.tag && 6 !== a.tag) ? null : a; | |
| } | |
| function v(a) { | |
| if (5 === a.tag || 6 === a.tag) return a.stateNode; | |
| t("33"); | |
| } | |
| function I(a) { | |
| return a[Eh] || null; | |
| } | |
| function H(a) { | |
| do a = a.return; | |
| while (a && 5 !== a.tag); | |
| return a ? a : null; | |
| } | |
| function C(a, b, p) { | |
| if ((b = g(a, p.dispatchConfig.phasedRegistrationNames[b]))) | |
| (p._dispatchListeners = c(p._dispatchListeners, b)), | |
| (p._dispatchInstances = c(p._dispatchInstances, a)); | |
| } | |
| function E(a) { | |
| if (a && a.dispatchConfig.phasedRegistrationNames) { | |
| for (var b = a._targetInst, p = []; b; ) p.push(b), (b = H(b)); | |
| for (b = p.length; 0 < b--; ) C(p[b], "captured", a); | |
| for (b = 0; b < p.length; b++) C(p[b], "bubbled", a); | |
| } | |
| } | |
| function G(a, b, p) { | |
| a && | |
| p && | |
| p.dispatchConfig.registrationName && | |
| (b = g(a, p.dispatchConfig.registrationName)) && | |
| ((p._dispatchListeners = c(p._dispatchListeners, b)), | |
| (p._dispatchInstances = c(p._dispatchInstances, a))); | |
| } | |
| function O(a) { | |
| a && a.dispatchConfig.registrationName && G(a._targetInst, null, a); | |
| } | |
| function A(a) { | |
| e(a, E); | |
| } | |
| function z(a, b) { | |
| var p = {}; | |
| p[a.toLowerCase()] = b.toLowerCase(); | |
| p["Webkit" + a] = "webkit" + b; | |
| p["Moz" + a] = "moz" + b; | |
| return p; | |
| } | |
| function K(a) { | |
| if (nh[a]) return nh[a]; | |
| if (!ug[a]) return a; | |
| var b = ug[a], | |
| p; | |
| for (p in b) if (b.hasOwnProperty(p) && p in oh) return (nh[a] = b[p]); | |
| return a; | |
| } | |
| function D() { | |
| if (pc) return pc; | |
| var a, | |
| b = ph, | |
| p = b.length, | |
| c, | |
| e = "value" in $e ? $e.value : $e.textContent, | |
| g = e.length; | |
| for (a = 0; a < p && b[a] === e[a]; a++); | |
| var d = p - a; | |
| for (c = 1; c <= d && b[p - c] === e[g - c]; c++); | |
| return (pc = e.slice(a, 1 < c ? 1 - c : void 0)); | |
| } | |
| function Q() { | |
| return !0; | |
| } | |
| function M() { | |
| return !1; | |
| } | |
| function F(a, b, p, c) { | |
| this.dispatchConfig = a; | |
| this._targetInst = b; | |
| this.nativeEvent = p; | |
| a = this.constructor.Interface; | |
| for (var e in a) | |
| a.hasOwnProperty(e) && | |
| ((b = a[e]) | |
| ? (this[e] = b(p)) | |
| : "target" === e | |
| ? (this.target = c) | |
| : (this[e] = p[e])); | |
| this.isDefaultPrevented = ( | |
| null != p.defaultPrevented ? p.defaultPrevented : !1 === p.returnValue | |
| ) | |
| ? Q | |
| : M; | |
| this.isPropagationStopped = M; | |
| return this; | |
| } | |
| function P(a, b, p, c) { | |
| if (this.eventPool.length) { | |
| var e = this.eventPool.pop(); | |
| this.call(e, a, b, p, c); | |
| return e; | |
| } | |
| return new this(a, b, p, c); | |
| } | |
| function J(a) { | |
| a instanceof this ? void 0 : t("279"); | |
| a.destructor(); | |
| 10 > this.eventPool.length && this.eventPool.push(a); | |
| } | |
| function L(a) { | |
| a.eventPool = []; | |
| a.getPooled = P; | |
| a.release = J; | |
| } | |
| function N(a, b) { | |
| switch (a) { | |
| case "keyup": | |
| return -1 !== Fh.indexOf(b.keyCode); | |
| case "keydown": | |
| return 229 !== b.keyCode; | |
| case "keypress": | |
| case "mousedown": | |
| case "blur": | |
| return !0; | |
| default: | |
| return !1; | |
| } | |
| } | |
| function B(a) { | |
| a = a.detail; | |
| return "object" === typeof a && "data" in a ? a.data : null; | |
| } | |
| function V(a, b) { | |
| switch (a) { | |
| case "compositionend": | |
| return B(b); | |
| case "keypress": | |
| if (32 !== b.which) return null; | |
| Gh = !0; | |
| return Sf; | |
| case "textInput": | |
| return (a = b.data), a === Sf && Gh ? null : a; | |
| default: | |
| return null; | |
| } | |
| } | |
| function U(a, b) { | |
| if (vg) | |
| return "compositionend" === a || (!qh && N(a, b)) | |
| ? ((a = D()), (pc = ph = $e = null), (vg = !1), a) | |
| : null; | |
| switch (a) { | |
| case "paste": | |
| return null; | |
| case "keypress": | |
| if (!(b.ctrlKey || b.altKey || b.metaKey) || (b.ctrlKey && b.altKey)) { | |
| if (b.char && 1 < b.char.length) return b.char; | |
| if (b.which) return String.fromCharCode(b.which); | |
| } | |
| return null; | |
| case "compositionend": | |
| return Wd && "ko" !== b.locale ? null : b.data; | |
| default: | |
| return null; | |
| } | |
| } | |
| function Y(a) { | |
| if ((a = Vg(a))) { | |
| "function" !== typeof mc ? t("280") : void 0; | |
| var b = tg(a.stateNode); | |
| mc(a.stateNode, a.type, b); | |
| } | |
| } | |
| function ca(a) { | |
| Wg ? (qc ? qc.push(a) : (qc = [a])) : (Wg = a); | |
| } | |
| function ra() { | |
| if (Wg) { | |
| var a = Wg, | |
| b = qc; | |
| qc = Wg = null; | |
| Y(a); | |
| if (b) for (a = 0; a < b.length; a++) Y(b[a]); | |
| } | |
| } | |
| function ia(a, b) { | |
| return a(b); | |
| } | |
| function Ca(a, b, p) { | |
| return a(b, p); | |
| } | |
| function fa() {} | |
| function Ga(a, b) { | |
| if (wg) return a(b); | |
| wg = !0; | |
| try { | |
| return ia(a, b); | |
| } finally { | |
| if (((wg = !1), null !== Wg || null !== qc)) fa(), ra(); | |
| } | |
| } | |
| function ja(a) { | |
| var b = a && a.nodeName && a.nodeName.toLowerCase(); | |
| return "input" === b ? !!Xd[a.type] : "textarea" === b ? !0 : !1; | |
| } | |
| function ka(a) { | |
| a = a.target || a.srcElement || window; | |
| a.correspondingUseElement && (a = a.correspondingUseElement); | |
| return 3 === a.nodeType ? a.parentNode : a; | |
| } | |
| function Z(a) { | |
| if (!Yd) return !1; | |
| a = "on" + a; | |
| var b = a in document; | |
| b || | |
| ((b = document.createElement("div")), | |
| b.setAttribute(a, "return;"), | |
| (b = "function" === typeof b[a])); | |
| return b; | |
| } | |
| function Fa(a) { | |
| var b = a.type; | |
| return ( | |
| (a = a.nodeName) && | |
| "input" === a.toLowerCase() && | |
| ("checkbox" === b || "radio" === b) | |
| ); | |
| } | |
| function qa(a) { | |
| var b = Fa(a) ? "checked" : "value", | |
| p = Object.getOwnPropertyDescriptor(a.constructor.prototype, b), | |
| c = "" + a[b]; | |
| if ( | |
| !a.hasOwnProperty(b) && | |
| "undefined" !== typeof p && | |
| "function" === typeof p.get && | |
| "function" === typeof p.set | |
| ) { | |
| var e = p.get, | |
| g = p.set; | |
| Object.defineProperty(a, b, { | |
| configurable: !0, | |
| get: function () { | |
| return e.call(this); | |
| }, | |
| set: function (a) { | |
| c = "" + a; | |
| g.call(this, a); | |
| }, | |
| }); | |
| Object.defineProperty(a, b, { enumerable: p.enumerable }); | |
| return { | |
| getValue: function () { | |
| return c; | |
| }, | |
| setValue: function (a) { | |
| c = "" + a; | |
| }, | |
| stopTracking: function () { | |
| a._valueTracker = null; | |
| delete a[b]; | |
| }, | |
| }; | |
| } | |
| } | |
| function ea(a) { | |
| a._valueTracker || (a._valueTracker = qa(a)); | |
| } | |
| function za(a) { | |
| if (!a) return !1; | |
| var b = a._valueTracker; | |
| if (!b) return !0; | |
| var p = b.getValue(), | |
| c = ""; | |
| a && (c = Fa(a) ? (a.checked ? "true" : "false") : a.value); | |
| a = c; | |
| return a !== p ? (b.setValue(a), !0) : !1; | |
| } | |
| function La(a) { | |
| if (null === a || "object" !== typeof a) return null; | |
| a = (Tf && a[Tf]) || a["@@iterator"]; | |
| return "function" === typeof a ? a : null; | |
| } | |
| function pa(a) { | |
| if (null == a) return null; | |
| if ("function" === typeof a) return a.displayName || a.name || null; | |
| if ("string" === typeof a) return a; | |
| switch (a) { | |
| case Pc: | |
| return "ConcurrentMode"; | |
| case Ra: | |
| return "Fragment"; | |
| case ye: | |
| return "Portal"; | |
| case kd: | |
| return "Profiler"; | |
| case Bc: | |
| return "StrictMode"; | |
| case Uf: | |
| return "Suspense"; | |
| } | |
| if ("object" === typeof a) | |
| switch (a.$$typeof) { | |
| case Fd: | |
| return "Context.Consumer"; | |
| case Hh: | |
| return "Context.Provider"; | |
| case Qd: | |
| var b = a.render; | |
| b = b.displayName || b.name || ""; | |
| return ( | |
| a.displayName || ("" !== b ? "ForwardRef(" + b + ")" : "ForwardRef") | |
| ); | |
| case xg: | |
| return pa(a.type); | |
| case of: | |
| if ((a = 1 === a._status ? a._result : null)) return pa(a); | |
| } | |
| return null; | |
| } | |
| function Aa(a) { | |
| var b = ""; | |
| do { | |
| a: switch (a.tag) { | |
| case 3: | |
| case 4: | |
| case 6: | |
| case 7: | |
| case 10: | |
| case 9: | |
| var p = ""; | |
| break a; | |
| default: | |
| var c = a._debugOwner, | |
| e = a._debugSource, | |
| g = pa(a.type); | |
| p = null; | |
| c && (p = pa(c.type)); | |
| c = g; | |
| g = ""; | |
| e | |
| ? (g = | |
| " (at " + e.fileName.replace(af, "") + ":" + e.lineNumber + ")") | |
| : p && (g = " (created by " + p + ")"); | |
| p = "\n in " + (c || "Unknown") + g; | |
| } | |
| b += p; | |
| a = a.return; | |
| } while (a); | |
| return b; | |
| } | |
| function Ka(a) { | |
| if (Zd.call(Zh, a)) return !0; | |
| if (Zd.call(Ih, a)) return !1; | |
| if (Xg.test(a)) return (Zh[a] = !0); | |
| Ih[a] = !0; | |
| return !1; | |
| } | |
| function Ia(a, b, p, c) { | |
| if (null !== p && 0 === p.type) return !1; | |
| switch (typeof b) { | |
| case "function": | |
| case "symbol": | |
| return !0; | |
| case "boolean": | |
| if (c) return !1; | |
| if (null !== p) return !p.acceptsBooleans; | |
| a = a.toLowerCase().slice(0, 5); | |
| return "data-" !== a && "aria-" !== a; | |
| default: | |
| return !1; | |
| } | |
| } | |
| function bb(a, b, p, c) { | |
| if (null === b || "undefined" === typeof b || Ia(a, b, p, c)) return !0; | |
| if (c) return !1; | |
| if (null !== p) | |
| switch (p.type) { | |
| case 3: | |
| return !b; | |
| case 4: | |
| return !1 === b; | |
| case 5: | |
| return isNaN(b); | |
| case 6: | |
| return isNaN(b) || 1 > b; | |
| } | |
| return !1; | |
| } | |
| function aa(a, b, p, c, e) { | |
| this.acceptsBooleans = 2 === b || 3 === b || 4 === b; | |
| this.attributeName = c; | |
| this.attributeNamespace = e; | |
| this.mustUseProperty = p; | |
| this.propertyName = a; | |
| this.type = b; | |
| } | |
| function X(a) { | |
| return a[1].toUpperCase(); | |
| } | |
| function va(a, b, p, c) { | |
| var e = $c.hasOwnProperty(b) ? $c[b] : null; | |
| (null !== e | |
| ? 0 === e.type | |
| : c | |
| ? 0 | |
| : 2 < b.length && | |
| ("o" === b[0] || "O" === b[0]) && | |
| ("n" === b[1] || "N" === b[1])) || | |
| (bb(b, p, e, c) && (p = null), | |
| c || null === e | |
| ? Ka(b) && | |
| (null === p ? a.removeAttribute(b) : a.setAttribute(b, "" + p)) | |
| : e.mustUseProperty | |
| ? (a[e.propertyName] = null === p ? (3 === e.type ? !1 : "") : p) | |
| : ((b = e.attributeName), | |
| (c = e.attributeNamespace), | |
| null === p | |
| ? a.removeAttribute(b) | |
| : ((e = e.type), | |
| (p = 3 === e || (4 === e && !0 === p) ? "" : "" + p), | |
| c ? a.setAttributeNS(c, b, p) : a.setAttribute(b, p)))); | |
| } | |
| function la(a) { | |
| switch (typeof a) { | |
| case "boolean": | |
| case "number": | |
| case "object": | |
| case "string": | |
| case "undefined": | |
| return a; | |
| default: | |
| return ""; | |
| } | |
| } | |
| function fb(a, b) { | |
| var p = b.checked; | |
| return Jd({}, b, { | |
| defaultChecked: void 0, | |
| defaultValue: void 0, | |
| value: void 0, | |
| checked: null != p ? p : a._wrapperState.initialChecked, | |
| }); | |
| } | |
| function cc(a, b) { | |
| var p = null == b.defaultValue ? "" : b.defaultValue, | |
| c = null != b.checked ? b.checked : b.defaultChecked; | |
| p = la(null != b.value ? b.value : p); | |
| a._wrapperState = { | |
| initialChecked: c, | |
| initialValue: p, | |
| controlled: | |
| "checkbox" === b.type || "radio" === b.type | |
| ? null != b.checked | |
| : null != b.value, | |
| }; | |
| } | |
| function ha(a, b) { | |
| b = b.checked; | |
| null != b && va(a, "checked", b, !1); | |
| } | |
| function ya(a, b) { | |
| ha(a, b); | |
| var p = la(b.value), | |
| c = b.type; | |
| if (null != p) | |
| if ("number" === c) { | |
| if ((0 === p && "" === a.value) || a.value != p) a.value = "" + p; | |
| } else a.value !== "" + p && (a.value = "" + p); | |
| else if ("submit" === c || "reset" === c) { | |
| a.removeAttribute("value"); | |
| return; | |
| } | |
| b.hasOwnProperty("value") | |
| ? Da(a, b.type, p) | |
| : b.hasOwnProperty("defaultValue") && Da(a, b.type, la(b.defaultValue)); | |
| null == b.checked && | |
| null != b.defaultChecked && | |
| (a.defaultChecked = !!b.defaultChecked); | |
| } | |
| function jb(a, b, p) { | |
| if (b.hasOwnProperty("value") || b.hasOwnProperty("defaultValue")) { | |
| var c = b.type; | |
| if ( | |
| !( | |
| ("submit" !== c && "reset" !== c) || | |
| (void 0 !== b.value && null !== b.value) | |
| ) | |
| ) | |
| return; | |
| b = "" + a._wrapperState.initialValue; | |
| p || b === a.value || (a.value = b); | |
| a.defaultValue = b; | |
| } | |
| p = a.name; | |
| "" !== p && (a.name = ""); | |
| a.defaultChecked = !a.defaultChecked; | |
| a.defaultChecked = !!a._wrapperState.initialChecked; | |
| "" !== p && (a.name = p); | |
| } | |
| function Da(a, b, p) { | |
| if ("number" !== b || a.ownerDocument.activeElement !== a) | |
| null == p | |
| ? (a.defaultValue = "" + a._wrapperState.initialValue) | |
| : a.defaultValue !== "" + p && (a.defaultValue = "" + p); | |
| } | |
| function na(a, b, p) { | |
| a = F.getPooled(Jh.change, a, b, p); | |
| a.type = "change"; | |
| ca(p); | |
| A(a); | |
| return a; | |
| } | |
| function Va(a) { | |
| w(a); | |
| } | |
| function ua(a) { | |
| var b = v(a); | |
| if (za(b)) return a; | |
| } | |
| function wa(a, b) { | |
| if ("change" === a) return b; | |
| } | |
| function ma() { | |
| pf && (pf.detachEvent("onpropertychange", lb), (Vf = pf = null)); | |
| } | |
| function lb(a) { | |
| "value" === a.propertyName && ua(Vf) && ((a = na(Vf, a, ka(a))), Ga(Va, a)); | |
| } | |
| function tb(a, b, p) { | |
| "focus" === a | |
| ? (ma(), (pf = b), (Vf = p), pf.attachEvent("onpropertychange", lb)) | |
| : "blur" === a && ma(); | |
| } | |
| function Ja(a) { | |
| if ("selectionchange" === a || "keyup" === a || "keydown" === a) | |
| return ua(Vf); | |
| } | |
| function cb(a, b) { | |
| if ("click" === a) return ua(b); | |
| } | |
| function Xa(a, b) { | |
| if ("input" === a || "change" === a) return ua(b); | |
| } | |
| function qb(a) { | |
| var b = this.nativeEvent; | |
| return b.getModifierState | |
| ? b.getModifierState(a) | |
| : (a = Ke[a]) | |
| ? !!b[a] | |
| : !1; | |
| } | |
| function ta() { | |
| return qb; | |
| } | |
| function Ya(a, b) { | |
| return (a === b && (0 !== a || 1 / a === 1 / b)) || (a !== a && b !== b); | |
| } | |
| function Ta(a, b) { | |
| if (Ya(a, b)) return !0; | |
| if ( | |
| "object" !== typeof a || | |
| null === a || | |
| "object" !== typeof b || | |
| null === b | |
| ) | |
| return !1; | |
| var p = Object.keys(a), | |
| c = Object.keys(b); | |
| if (p.length !== c.length) return !1; | |
| for (c = 0; c < p.length; c++) | |
| if (!gb.call(b, p[c]) || !Ya(a[p[c]], b[p[c]])) return !1; | |
| return !0; | |
| } | |
| function kb(a) { | |
| var b = a; | |
| if (a.alternate) for (; b.return; ) b = b.return; | |
| else { | |
| if (0 !== (b.effectTag & 2)) return 1; | |
| for (; b.return; ) | |
| if (((b = b.return), 0 !== (b.effectTag & 2))) return 1; | |
| } | |
| return 3 === b.tag ? 2 : 3; | |
| } | |
| function rb(a) { | |
| 2 !== kb(a) ? t("188") : void 0; | |
| } | |
| function Wb(a) { | |
| var b = a.alternate; | |
| if (!b) return (b = kb(a)), 3 === b ? t("188") : void 0, 1 === b ? null : a; | |
| for (var p = a, c = b; ; ) { | |
| var e = p.return, | |
| g = e ? e.alternate : null; | |
| if (!e || !g) break; | |
| if (e.child === g.child) { | |
| for (var d = e.child; d; ) { | |
| if (d === p) return rb(e), a; | |
| if (d === c) return rb(e), b; | |
| d = d.sibling; | |
| } | |
| t("188"); | |
| } | |
| if (p.return !== c.return) (p = e), (c = g); | |
| else { | |
| d = !1; | |
| for (var l = e.child; l; ) { | |
| if (l === p) { | |
| d = !0; | |
| p = e; | |
| c = g; | |
| break; | |
| } | |
| if (l === c) { | |
| d = !0; | |
| c = e; | |
| p = g; | |
| break; | |
| } | |
| l = l.sibling; | |
| } | |
| if (!d) { | |
| for (l = g.child; l; ) { | |
| if (l === p) { | |
| d = !0; | |
| p = g; | |
| c = e; | |
| break; | |
| } | |
| if (l === c) { | |
| d = !0; | |
| c = g; | |
| p = e; | |
| break; | |
| } | |
| l = l.sibling; | |
| } | |
| d ? void 0 : t("189"); | |
| } | |
| } | |
| p.alternate !== c ? t("190") : void 0; | |
| } | |
| 3 !== p.tag ? t("188") : void 0; | |
| return p.stateNode.current === p ? a : b; | |
| } | |
| function Yb(a) { | |
| a = Wb(a); | |
| if (!a) return null; | |
| for (var b = a; ; ) { | |
| if (5 === b.tag || 6 === b.tag) return b; | |
| if (b.child) (b.child.return = b), (b = b.child); | |
| else { | |
| if (b === a) break; | |
| for (; !b.sibling; ) { | |
| if (!b.return || b.return === a) return null; | |
| b = b.return; | |
| } | |
| b.sibling.return = b.return; | |
| b = b.sibling; | |
| } | |
| } | |
| return null; | |
| } | |
| function Ea(a) { | |
| var b = a.keyCode; | |
| "charCode" in a | |
| ? ((a = a.charCode), 0 === a && 13 === b && (a = 13)) | |
| : (a = b); | |
| 10 === a && (a = 13); | |
| return 32 <= a || 13 === a ? a : 0; | |
| } | |
| function Na(a, b) { | |
| var p = a[0]; | |
| a = a[1]; | |
| var c = "on" + (a[0].toUpperCase() + a.slice(1)); | |
| b = { | |
| phasedRegistrationNames: { bubbled: c, captured: c + "Capture" }, | |
| dependencies: [p], | |
| isInteractive: b, | |
| }; | |
| Hg[a] = b; | |
| $d[p] = b; | |
| } | |
| function xd(a) { | |
| var b = a.targetInst, | |
| p = b; | |
| do { | |
| if (!p) { | |
| a.ancestors.push(p); | |
| break; | |
| } | |
| var e; | |
| for (e = p; e.return; ) e = e.return; | |
| e = 3 !== e.tag ? null : e.stateNode.containerInfo; | |
| if (!e) break; | |
| a.ancestors.push(p); | |
| p = y(e); | |
| } while (p); | |
| for (p = 0; p < a.ancestors.length; p++) { | |
| b = a.ancestors[p]; | |
| var g = ka(a.nativeEvent); | |
| e = a.topLevelType; | |
| for (var d = a.nativeEvent, l = null, h = 0; h < dg.length; h++) { | |
| var k = dg[h]; | |
| k && (k = k.extractEvents(e, b, d, g)) && (l = c(l, k)); | |
| } | |
| w(l); | |
| } | |
| } | |
| function vb(a, b) { | |
| if (!b) return null; | |
| var p = (Ig(a) ? Lc : nb).bind(null, a); | |
| b.addEventListener(a, p, !1); | |
| } | |
| function Zb(a, b) { | |
| if (!b) return null; | |
| var p = (Ig(a) ? Lc : nb).bind(null, a); | |
| b.addEventListener(a, p, !0); | |
| } | |
| function Lc(a, b) { | |
| Ca(nb, a, b); | |
| } | |
| function nb(a, b) { | |
| if (Df) { | |
| var p = ka(b); | |
| p = y(p); | |
| null === p || "number" !== typeof p.tag || 2 === kb(p) || (p = null); | |
| if (Gc.length) { | |
| var c = Gc.pop(); | |
| c.topLevelType = a; | |
| c.nativeEvent = b; | |
| c.targetInst = p; | |
| a = c; | |
| } else | |
| a = { topLevelType: a, nativeEvent: b, targetInst: p, ancestors: [] }; | |
| try { | |
| Ga(xd, a); | |
| } finally { | |
| (a.topLevelType = null), | |
| (a.nativeEvent = null), | |
| (a.targetInst = null), | |
| (a.ancestors.length = 0), | |
| 10 > Gc.length && Gc.push(a); | |
| } | |
| } | |
| } | |
| function Sa(a) { | |
| Object.prototype.hasOwnProperty.call(a, Le) || | |
| ((a[Le] = yg++), (yd[a[Le]] = {})); | |
| return yd[a[Le]]; | |
| } | |
| function $b(a) { | |
| a = a || ("undefined" !== typeof document ? document : void 0); | |
| if ("undefined" === typeof a) return null; | |
| try { | |
| return a.activeElement || a.body; | |
| } catch (Oi) { | |
| return a.body; | |
| } | |
| } | |
| function Ha(a) { | |
| for (; a && a.firstChild; ) a = a.firstChild; | |
| return a; | |
| } | |
| function kc(a, b) { | |
| var p = Ha(a); | |
| a = 0; | |
| for (var c; p; ) { | |
| if (3 === p.nodeType) { | |
| c = a + p.textContent.length; | |
| if (a <= b && c >= b) return { node: p, offset: b - a }; | |
| a = c; | |
| } | |
| a: { | |
| for (; p; ) { | |
| if (p.nextSibling) { | |
| p = p.nextSibling; | |
| break a; | |
| } | |
| p = p.parentNode; | |
| } | |
| p = void 0; | |
| } | |
| p = Ha(p); | |
| } | |
| } | |
| function Hc(a, b) { | |
| return a && b | |
| ? a === b | |
| ? !0 | |
| : a && 3 === a.nodeType | |
| ? !1 | |
| : b && 3 === b.nodeType | |
| ? Hc(a, b.parentNode) | |
| : "contains" in a | |
| ? a.contains(b) | |
| : a.compareDocumentPosition | |
| ? !!(a.compareDocumentPosition(b) & 16) | |
| : !1 | |
| : !1; | |
| } | |
| function xc() { | |
| for (var a = window, b = $b(); b instanceof a.HTMLIFrameElement; ) { | |
| try { | |
| a = b.contentDocument.defaultView; | |
| } catch (oi) { | |
| break; | |
| } | |
| b = $b(a.document); | |
| } | |
| return b; | |
| } | |
| function rc(a) { | |
| var b = a && a.nodeName && a.nodeName.toLowerCase(); | |
| return ( | |
| b && | |
| (("input" === b && | |
| ("text" === a.type || | |
| "search" === a.type || | |
| "tel" === a.type || | |
| "url" === a.type || | |
| "password" === a.type)) || | |
| "textarea" === b || | |
| "true" === a.contentEditable) | |
| ); | |
| } | |
| function yb() { | |
| var a = xc(); | |
| if (rc(a)) { | |
| if ("selectionStart" in a) | |
| var b = { start: a.selectionStart, end: a.selectionEnd }; | |
| else | |
| a: { | |
| b = ((b = a.ownerDocument) && b.defaultView) || window; | |
| var p = b.getSelection && b.getSelection(); | |
| if (p && 0 !== p.rangeCount) { | |
| b = p.anchorNode; | |
| var c = p.anchorOffset, | |
| e = p.focusNode; | |
| p = p.focusOffset; | |
| try { | |
| b.nodeType, e.nodeType; | |
| } catch (rj) { | |
| b = null; | |
| break a; | |
| } | |
| var g = 0, | |
| d = -1, | |
| l = -1, | |
| h = 0, | |
| k = 0, | |
| n = a, | |
| v = null; | |
| b: for (;;) { | |
| for (var x; ; ) { | |
| n !== b || (0 !== c && 3 !== n.nodeType) || (d = g + c); | |
| n !== e || (0 !== p && 3 !== n.nodeType) || (l = g + p); | |
| 3 === n.nodeType && (g += n.nodeValue.length); | |
| if (null === (x = n.firstChild)) break; | |
| v = n; | |
| n = x; | |
| } | |
| for (;;) { | |
| if (n === a) break b; | |
| v === b && ++h === c && (d = g); | |
| v === e && ++k === p && (l = g); | |
| if (null !== (x = n.nextSibling)) break; | |
| n = v; | |
| v = n.parentNode; | |
| } | |
| n = x; | |
| } | |
| b = -1 === d || -1 === l ? null : { start: d, end: l }; | |
| } else b = null; | |
| } | |
| b = b || { start: 0, end: 0 }; | |
| } else b = null; | |
| return { focusedElem: a, selectionRange: b }; | |
| } | |
| function Gb(a) { | |
| var b = xc(), | |
| p = a.focusedElem, | |
| c = a.selectionRange; | |
| if ( | |
| b !== p && | |
| p && | |
| p.ownerDocument && | |
| Hc(p.ownerDocument.documentElement, p) | |
| ) { | |
| if (null !== c && rc(p)) | |
| if ( | |
| ((b = c.start), | |
| (a = c.end), | |
| void 0 === a && (a = b), | |
| "selectionStart" in p) | |
| ) | |
| (p.selectionStart = b), | |
| (p.selectionEnd = Math.min(a, p.value.length)); | |
| else if ( | |
| ((a = ((b = p.ownerDocument || document) && b.defaultView) || window), | |
| a.getSelection) | |
| ) { | |
| a = a.getSelection(); | |
| var e = p.textContent.length, | |
| g = Math.min(c.start, e); | |
| c = void 0 === c.end ? g : Math.min(c.end, e); | |
| !a.extend && g > c && ((e = c), (c = g), (g = e)); | |
| e = kc(p, g); | |
| var d = kc(p, c); | |
| e && | |
| d && | |
| (1 !== a.rangeCount || | |
| a.anchorNode !== e.node || | |
| a.anchorOffset !== e.offset || | |
| a.focusNode !== d.node || | |
| a.focusOffset !== d.offset) && | |
| ((b = b.createRange()), | |
| b.setStart(e.node, e.offset), | |
| a.removeAllRanges(), | |
| g > c | |
| ? (a.addRange(b), a.extend(d.node, d.offset)) | |
| : (b.setEnd(d.node, d.offset), a.addRange(b))); | |
| } | |
| b = []; | |
| for (a = p; (a = a.parentNode); ) | |
| 1 === a.nodeType && | |
| b.push({ element: a, left: a.scrollLeft, top: a.scrollTop }); | |
| "function" === typeof p.focus && p.focus(); | |
| for (p = 0; p < b.length; p++) | |
| (a = b[p]), | |
| (a.element.scrollLeft = a.left), | |
| (a.element.scrollTop = a.top); | |
| } | |
| } | |
| function dc(a, b) { | |
| var p = | |
| b.window === b ? b.document : 9 === b.nodeType ? b : b.ownerDocument; | |
| if (Kh || null == ge || ge !== $b(p)) return null; | |
| p = ge; | |
| "selectionStart" in p && rc(p) | |
| ? (p = { start: p.selectionStart, end: p.selectionEnd }) | |
| : ((p = ( | |
| (p.ownerDocument && p.ownerDocument.defaultView) || | |
| window | |
| ).getSelection()), | |
| (p = { | |
| anchorNode: p.anchorNode, | |
| anchorOffset: p.anchorOffset, | |
| focusNode: p.focusNode, | |
| focusOffset: p.focusOffset, | |
| })); | |
| return fg && Ta(fg, p) | |
| ? null | |
| : ((fg = p), | |
| (a = F.getPooled(gg.select, Ef, a, b)), | |
| (a.type = "select"), | |
| (a.target = ge), | |
| A(a), | |
| a); | |
| } | |
| function oa(a) { | |
| var b = ""; | |
| ze.Children.forEach(a, function (a) { | |
| null != a && (b += a); | |
| }); | |
| return b; | |
| } | |
| function wb(a, b) { | |
| a = Jd({ children: void 0 }, b); | |
| if ((b = oa(b.children))) a.children = b; | |
| return a; | |
| } | |
| function Cc(a, b, p, c) { | |
| a = a.options; | |
| if (b) { | |
| b = {}; | |
| for (var e = 0; e < p.length; e++) b["$" + p[e]] = !0; | |
| for (p = 0; p < a.length; p++) | |
| (e = b.hasOwnProperty("$" + a[p].value)), | |
| a[p].selected !== e && (a[p].selected = e), | |
| e && c && (a[p].defaultSelected = !0); | |
| } else { | |
| p = "" + la(p); | |
| b = null; | |
| for (e = 0; e < a.length; e++) { | |
| if (a[e].value === p) { | |
| a[e].selected = !0; | |
| c && (a[e].defaultSelected = !0); | |
| return; | |
| } | |
| null !== b || a[e].disabled || (b = a[e]); | |
| } | |
| null !== b && (b.selected = !0); | |
| } | |
| } | |
| function zd(a, b) { | |
| null != b.dangerouslySetInnerHTML ? t("91") : void 0; | |
| return Jd({}, b, { | |
| value: void 0, | |
| defaultValue: void 0, | |
| children: "" + a._wrapperState.initialValue, | |
| }); | |
| } | |
| function ba(a, b) { | |
| var p = b.value; | |
| null == p && | |
| ((p = b.defaultValue), | |
| (b = b.children), | |
| null != b && | |
| (null != p ? t("92") : void 0, | |
| Array.isArray(b) && (1 >= b.length ? void 0 : t("93"), (b = b[0])), | |
| (p = b)), | |
| null == p && (p = "")); | |
| a._wrapperState = { initialValue: la(p) }; | |
| } | |
| function $a(a, b) { | |
| var p = la(b.value), | |
| c = la(b.defaultValue); | |
| null != p && | |
| ((p = "" + p), | |
| p !== a.value && (a.value = p), | |
| null == b.defaultValue && a.defaultValue !== p && (a.defaultValue = p)); | |
| null != c && (a.defaultValue = "" + c); | |
| } | |
| function Pb(a) { | |
| var b = a.textContent; | |
| b === a._wrapperState.initialValue && (a.value = b); | |
| } | |
| function xb(a) { | |
| switch (a) { | |
| case "svg": | |
| return "http://www.w3.org/2000/svg"; | |
| case "math": | |
| return "http://www.w3.org/1998/Math/MathML"; | |
| default: | |
| return "http://www.w3.org/1999/xhtml"; | |
| } | |
| } | |
| function hb(a, b) { | |
| return null == a || "http://www.w3.org/1999/xhtml" === a | |
| ? xb(b) | |
| : "http://www.w3.org/2000/svg" === a && "foreignObject" === b | |
| ? "http://www.w3.org/1999/xhtml" | |
| : a; | |
| } | |
| function Tb(a, b) { | |
| if (b) { | |
| var p = a.firstChild; | |
| if (p && p === a.lastChild && 3 === p.nodeType) { | |
| p.nodeValue = b; | |
| return; | |
| } | |
| } | |
| a.textContent = b; | |
| } | |
| function Ad(a, b, p) { | |
| return null == b || "boolean" === typeof b || "" === b | |
| ? "" | |
| : p || "number" !== typeof b || 0 === b || (Rd.hasOwnProperty(a) && Rd[a]) | |
| ? ("" + b).trim() | |
| : b + "px"; | |
| } | |
| function ib(a, b) { | |
| a = a.style; | |
| for (var p in b) | |
| if (b.hasOwnProperty(p)) { | |
| var c = 0 === p.indexOf("--"), | |
| e = Ad(p, b[p], c); | |
| "float" === p && (p = "cssFloat"); | |
| c ? a.setProperty(p, e) : (a[p] = e); | |
| } | |
| } | |
| function Nb(a, b) { | |
| b && | |
| (Wf[a] && | |
| (null != b.children || null != b.dangerouslySetInnerHTML | |
| ? t("137", a, "") | |
| : void 0), | |
| null != b.dangerouslySetInnerHTML && | |
| (null != b.children ? t("60") : void 0, | |
| "object" === typeof b.dangerouslySetInnerHTML && | |
| "__html" in b.dangerouslySetInnerHTML | |
| ? void 0 | |
| : t("61")), | |
| null != b.style && "object" !== typeof b.style ? t("62", "") : void 0); | |
| } | |
| function Hb(a, b) { | |
| if (-1 === a.indexOf("-")) return "string" === typeof b.is; | |
| switch (a) { | |
| case "annotation-xml": | |
| case "color-profile": | |
| case "font-face": | |
| case "font-face-src": | |
| case "font-face-uri": | |
| case "font-face-format": | |
| case "font-face-name": | |
| case "missing-glyph": | |
| return !1; | |
| default: | |
| return !0; | |
| } | |
| } | |
| function nc(a, b) { | |
| a = 9 === a.nodeType || 11 === a.nodeType ? a : a.ownerDocument; | |
| var p = Sa(a); | |
| b = eg[b]; | |
| for (var c = 0; c < b.length; c++) { | |
| var e = b[c]; | |
| if (!p.hasOwnProperty(e) || !p[e]) { | |
| switch (e) { | |
| case "scroll": | |
| Zb("scroll", a); | |
| break; | |
| case "focus": | |
| case "blur": | |
| Zb("focus", a); | |
| Zb("blur", a); | |
| p.blur = !0; | |
| p.focus = !0; | |
| break; | |
| case "cancel": | |
| case "close": | |
| Z(e) && Zb(e, a); | |
| break; | |
| case "invalid": | |
| case "submit": | |
| case "reset": | |
| break; | |
| default: | |
| -1 === Jg.indexOf(e) && vb(e, a); | |
| } | |
| p[e] = !0; | |
| } | |
| } | |
| } | |
| function ad() {} | |
| function Xb(a, b) { | |
| switch (a) { | |
| case "button": | |
| case "input": | |
| case "select": | |
| case "textarea": | |
| return !!b.autoFocus; | |
| } | |
| return !1; | |
| } | |
| function Ic(a, b) { | |
| return ( | |
| "textarea" === a || | |
| "option" === a || | |
| "noscript" === a || | |
| "string" === typeof b.children || | |
| "number" === typeof b.children || | |
| ("object" === typeof b.dangerouslySetInnerHTML && | |
| null !== b.dangerouslySetInnerHTML && | |
| null != b.dangerouslySetInnerHTML.__html) | |
| ); | |
| } | |
| function Mc(a, b, p, c, e) { | |
| a[Eh] = e; | |
| "input" === p && "radio" === e.type && null != e.name && ha(a, e); | |
| Hb(p, c); | |
| c = Hb(p, e); | |
| for (var g = 0; g < b.length; g += 2) { | |
| var d = b[g], | |
| l = b[g + 1]; | |
| "style" === d | |
| ? ib(a, l) | |
| : "dangerouslySetInnerHTML" === d | |
| ? he(a, l) | |
| : "children" === d | |
| ? Tb(a, l) | |
| : va(a, d, l, c); | |
| } | |
| switch (p) { | |
| case "input": | |
| ya(a, e); | |
| break; | |
| case "textarea": | |
| $a(a, e); | |
| break; | |
| case "select": | |
| (b = a._wrapperState.wasMultiple), | |
| (a._wrapperState.wasMultiple = !!e.multiple), | |
| (p = e.value), | |
| null != p | |
| ? Cc(a, !!e.multiple, p, !1) | |
| : b !== !!e.multiple && | |
| (null != e.defaultValue | |
| ? Cc(a, !!e.multiple, e.defaultValue, !0) | |
| : Cc(a, !!e.multiple, e.multiple ? [] : "", !1)); | |
| } | |
| } | |
| function Ub(a) { | |
| for (a = a.nextSibling; a && 1 !== a.nodeType && 3 !== a.nodeType; ) | |
| a = a.nextSibling; | |
| return a; | |
| } | |
| function ld(a) { | |
| for (a = a.firstChild; a && 1 !== a.nodeType && 3 !== a.nodeType; ) | |
| a = a.nextSibling; | |
| return a; | |
| } | |
| function Db(a) { | |
| 0 > Me || ((a.current = rh[Me]), (rh[Me] = null), Me--); | |
| } | |
| function sb(a, b) { | |
| Me++; | |
| rh[Me] = a.current; | |
| a.current = b; | |
| } | |
| function ac(a, b) { | |
| var p = a.type.contextTypes; | |
| if (!p) return Ne; | |
| var c = a.stateNode; | |
| if (c && c.__reactInternalMemoizedUnmaskedChildContext === b) | |
| return c.__reactInternalMemoizedMaskedChildContext; | |
| var e = {}, | |
| g; | |
| for (g in p) e[g] = b[g]; | |
| c && | |
| ((a = a.stateNode), | |
| (a.__reactInternalMemoizedUnmaskedChildContext = b), | |
| (a.__reactInternalMemoizedMaskedChildContext = e)); | |
| return e; | |
| } | |
| function Ib(a) { | |
| a = a.childContextTypes; | |
| return null !== a && void 0 !== a; | |
| } | |
| function ob(a) { | |
| Db(Bd, a); | |
| Db(Kd, a); | |
| } | |
| function Qb(a) { | |
| Db(Bd, a); | |
| Db(Kd, a); | |
| } | |
| function Cd(a, b, p) { | |
| Kd.current !== Ne ? t("168") : void 0; | |
| sb(Kd, b, a); | |
| sb(Bd, p, a); | |
| } | |
| function Ae(a, b, p) { | |
| var c = a.stateNode; | |
| a = b.childContextTypes; | |
| if ("function" !== typeof c.getChildContext) return p; | |
| c = c.getChildContext(); | |
| for (var e in c) e in a ? void 0 : t("108", pa(b) || "Unknown", e); | |
| return Jd({}, p, c); | |
| } | |
| function xa(a) { | |
| var b = a.stateNode; | |
| b = (b && b.__reactInternalMemoizedMergedChildContext) || Ne; | |
| Ld = Kd.current; | |
| sb(Kd, b, a); | |
| sb(Bd, Bd.current, a); | |
| return !0; | |
| } | |
| function ec(a, b, p) { | |
| var c = a.stateNode; | |
| c ? void 0 : t("169"); | |
| p | |
| ? ((b = Ae(a, b, Ld)), | |
| (c.__reactInternalMemoizedMergedChildContext = b), | |
| Db(Bd, a), | |
| Db(Kd, a), | |
| sb(Kd, b, a)) | |
| : Db(Bd, a); | |
| sb(Bd, p, a); | |
| } | |
| function ab(a) { | |
| return function (b) { | |
| try { | |
| return a(b); | |
| } catch (oi) {} | |
| }; | |
| } | |
| function Pa(a) { | |
| if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; | |
| var b = __REACT_DEVTOOLS_GLOBAL_HOOK__; | |
| if (b.isDisabled || !b.supportsFiber) return !0; | |
| try { | |
| var p = b.inject(a); | |
| Yg = ab(function (a) { | |
| return b.onCommitFiberRoot(p, a); | |
| }); | |
| ri = ab(function (a) { | |
| return b.onCommitFiberUnmount(p, a); | |
| }); | |
| } catch (pi) {} | |
| return !0; | |
| } | |
| function Eb(a, b, p, c) { | |
| this.tag = a; | |
| this.key = p; | |
| this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null; | |
| this.index = 0; | |
| this.ref = null; | |
| this.pendingProps = b; | |
| this.contextDependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null; | |
| this.mode = c; | |
| this.effectTag = 0; | |
| this.lastEffect = this.firstEffect = this.nextEffect = null; | |
| this.childExpirationTime = this.expirationTime = 0; | |
| this.alternate = null; | |
| } | |
| function Ua(a, b, p, c) { | |
| return new Eb(a, b, p, c); | |
| } | |
| function Ob(a) { | |
| a = a.prototype; | |
| return !(!a || !a.isReactComponent); | |
| } | |
| function Qa(a) { | |
| if ("function" === typeof a) return Ob(a) ? 1 : 0; | |
| if (void 0 !== a && null !== a) { | |
| a = a.$$typeof; | |
| if (a === Qd) return 11; | |
| if (a === xg) return 14; | |
| } | |
| return 2; | |
| } | |
| function mb(a, b) { | |
| var p = a.alternate; | |
| null === p | |
| ? ((p = Ua(a.tag, b, a.key, a.mode)), | |
| (p.elementType = a.elementType), | |
| (p.type = a.type), | |
| (p.stateNode = a.stateNode), | |
| (p.alternate = a), | |
| (a.alternate = p)) | |
| : ((p.pendingProps = b), | |
| (p.effectTag = 0), | |
| (p.nextEffect = null), | |
| (p.firstEffect = null), | |
| (p.lastEffect = null)); | |
| p.childExpirationTime = a.childExpirationTime; | |
| p.expirationTime = a.expirationTime; | |
| p.child = a.child; | |
| p.memoizedProps = a.memoizedProps; | |
| p.memoizedState = a.memoizedState; | |
| p.updateQueue = a.updateQueue; | |
| p.contextDependencies = a.contextDependencies; | |
| p.sibling = a.sibling; | |
| p.index = a.index; | |
| p.ref = a.ref; | |
| return p; | |
| } | |
| function Dc(a, b, p, c, e, g) { | |
| var d = 2; | |
| c = a; | |
| if ("function" === typeof a) Ob(a) && (d = 1); | |
| else if ("string" === typeof a) d = 5; | |
| else | |
| a: switch (a) { | |
| case Ra: | |
| return Vb(p.children, e, g, b); | |
| case Pc: | |
| return Ma(p, e | 3, g, b); | |
| case Bc: | |
| return Ma(p, e | 2, g, b); | |
| case kd: | |
| return ( | |
| (a = Ua(12, p, b, e | 4)), | |
| (a.elementType = kd), | |
| (a.type = kd), | |
| (a.expirationTime = g), | |
| a | |
| ); | |
| case Uf: | |
| return ( | |
| (a = Ua(13, p, b, e)), | |
| (a.elementType = Uf), | |
| (a.type = Uf), | |
| (a.expirationTime = g), | |
| a | |
| ); | |
| default: | |
| if ("object" === typeof a && null !== a) | |
| switch (a.$$typeof) { | |
| case Hh: | |
| d = 10; | |
| break a; | |
| case Fd: | |
| d = 9; | |
| break a; | |
| case Qd: | |
| d = 11; | |
| break a; | |
| case xg: | |
| d = 14; | |
| break a; | |
| case of: | |
| d = 16; | |
| c = null; | |
| break a; | |
| } | |
| t("130", null == a ? a : typeof a, ""); | |
| } | |
| b = Ua(d, p, b, e); | |
| b.elementType = a; | |
| b.type = c; | |
| b.expirationTime = g; | |
| return b; | |
| } | |
| function Vb(a, b, p, c) { | |
| a = Ua(7, a, c, b); | |
| a.expirationTime = p; | |
| return a; | |
| } | |
| function Ma(a, b, p, c) { | |
| a = Ua(8, a, c, b); | |
| b = 0 === (b & 1) ? Bc : Pc; | |
| a.elementType = b; | |
| a.type = b; | |
| a.expirationTime = p; | |
| return a; | |
| } | |
| function ud(a, b, p) { | |
| a = Ua(6, a, null, b); | |
| a.expirationTime = p; | |
| return a; | |
| } | |
| function Nc(a, b, p) { | |
| b = Ua(4, null !== a.children ? a.children : [], a.key, b); | |
| b.expirationTime = p; | |
| b.stateNode = { | |
| containerInfo: a.containerInfo, | |
| pendingChildren: null, | |
| implementation: a.implementation, | |
| }; | |
| return b; | |
| } | |
| function Jb(a, b) { | |
| a.didError = !1; | |
| var p = a.earliestPendingTime; | |
| 0 === p | |
| ? (a.earliestPendingTime = a.latestPendingTime = b) | |
| : p < b | |
| ? (a.earliestPendingTime = b) | |
| : a.latestPendingTime > b && (a.latestPendingTime = b); | |
| Fb(b, a); | |
| } | |
| function md(a, b) { | |
| a.didError = !1; | |
| if (0 === b) | |
| (a.earliestPendingTime = 0), | |
| (a.latestPendingTime = 0), | |
| (a.earliestSuspendedTime = 0), | |
| (a.latestSuspendedTime = 0), | |
| (a.latestPingedTime = 0); | |
| else { | |
| b < a.latestPingedTime && (a.latestPingedTime = 0); | |
| var p = a.latestPendingTime; | |
| 0 !== p && | |
| (p > b | |
| ? (a.earliestPendingTime = a.latestPendingTime = 0) | |
| : a.earliestPendingTime > b && | |
| (a.earliestPendingTime = a.latestPendingTime)); | |
| p = a.earliestSuspendedTime; | |
| 0 === p | |
| ? Jb(a, b) | |
| : b < a.latestSuspendedTime | |
| ? ((a.earliestSuspendedTime = 0), | |
| (a.latestSuspendedTime = 0), | |
| (a.latestPingedTime = 0), | |
| Jb(a, b)) | |
| : b > p && Jb(a, b); | |
| } | |
| Fb(0, a); | |
| } | |
| function Ba(a, b) { | |
| a.didError = !1; | |
| a.latestPingedTime >= b && (a.latestPingedTime = 0); | |
| var p = a.earliestPendingTime, | |
| c = a.latestPendingTime; | |
| p === b | |
| ? (a.earliestPendingTime = c === b ? (a.latestPendingTime = 0) : c) | |
| : c === b && (a.latestPendingTime = p); | |
| p = a.earliestSuspendedTime; | |
| c = a.latestSuspendedTime; | |
| 0 === p | |
| ? (a.earliestSuspendedTime = a.latestSuspendedTime = b) | |
| : p < b | |
| ? (a.earliestSuspendedTime = b) | |
| : c > b && (a.latestSuspendedTime = b); | |
| Fb(b, a); | |
| } | |
| function Cb(a, b) { | |
| var p = a.earliestPendingTime; | |
| a = a.earliestSuspendedTime; | |
| p > b && (b = p); | |
| a > b && (b = a); | |
| return b; | |
| } | |
| function Fb(a, b) { | |
| var p = b.earliestSuspendedTime, | |
| c = b.latestSuspendedTime, | |
| e = b.earliestPendingTime, | |
| g = b.latestPingedTime; | |
| e = 0 !== e ? e : g; | |
| 0 === e && (0 === a || c < a) && (e = c); | |
| a = e; | |
| 0 !== a && p > a && (a = p); | |
| b.nextExpirationTimeToWorkOn = e; | |
| b.expirationTime = a; | |
| } | |
| function eb(a, b) { | |
| if (a && a.defaultProps) { | |
| b = Jd({}, b); | |
| a = a.defaultProps; | |
| for (var p in a) void 0 === b[p] && (b[p] = a[p]); | |
| } | |
| return b; | |
| } | |
| function ub(a) { | |
| var b = a._result; | |
| switch (a._status) { | |
| case 1: | |
| return b; | |
| case 2: | |
| throw b; | |
| case 0: | |
| throw b; | |
| default: | |
| a._status = 0; | |
| b = a._ctor; | |
| b = b(); | |
| b.then( | |
| function (b) { | |
| 0 === a._status && | |
| ((b = b.default), (a._status = 1), (a._result = b)); | |
| }, | |
| function (b) { | |
| 0 === a._status && ((a._status = 2), (a._result = b)); | |
| } | |
| ); | |
| switch (a._status) { | |
| case 1: | |
| return a._result; | |
| case 2: | |
| throw a._result; | |
| } | |
| a._result = b; | |
| throw b; | |
| } | |
| } | |
| function Za(a, b, p, c) { | |
| b = a.memoizedState; | |
| p = p(c, b); | |
| p = null === p || void 0 === p ? b : Jd({}, b, p); | |
| a.memoizedState = p; | |
| c = a.updateQueue; | |
| null !== c && 0 === a.expirationTime && (c.baseState = p); | |
| } | |
| function Ec(a, b, p, c, e, g, d) { | |
| a = a.stateNode; | |
| return "function" === typeof a.shouldComponentUpdate | |
| ? a.shouldComponentUpdate(c, g, d) | |
| : b.prototype && b.prototype.isPureReactComponent | |
| ? !Ta(p, c) || !Ta(e, g) | |
| : !0; | |
| } | |
| function zb(a, b, p) { | |
| var c = !1, | |
| e = Ne, | |
| g = b.contextType; | |
| "object" === typeof g && null !== g | |
| ? (g = Sd(g)) | |
| : ((e = Ib(b) ? Ld : Kd.current), | |
| (c = b.contextTypes), | |
| (g = (c = null !== c && void 0 !== c) ? ac(a, e) : Ne)); | |
| b = new b(p, g); | |
| a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null; | |
| b.updater = Zg; | |
| a.stateNode = b; | |
| b._reactInternalFiber = a; | |
| c && | |
| ((a = a.stateNode), | |
| (a.__reactInternalMemoizedUnmaskedChildContext = e), | |
| (a.__reactInternalMemoizedMaskedChildContext = g)); | |
| return b; | |
| } | |
| function bd(a, b, p, c) { | |
| a = b.state; | |
| "function" === typeof b.componentWillReceiveProps && | |
| b.componentWillReceiveProps(p, c); | |
| "function" === typeof b.UNSAFE_componentWillReceiveProps && | |
| b.UNSAFE_componentWillReceiveProps(p, c); | |
| b.state !== a && Zg.enqueueReplaceState(b, b.state, null); | |
| } | |
| function vc(a, b, p, c) { | |
| var e = a.stateNode; | |
| e.props = p; | |
| e.state = a.memoizedState; | |
| e.refs = $h; | |
| var g = b.contextType; | |
| "object" === typeof g && null !== g | |
| ? (e.context = Sd(g)) | |
| : ((g = Ib(b) ? Ld : Kd.current), (e.context = ac(a, g))); | |
| g = a.updateQueue; | |
| null !== g && (cd(a, g, p, e, c), (e.state = a.memoizedState)); | |
| g = b.getDerivedStateFromProps; | |
| "function" === typeof g && (Za(a, b, g, p), (e.state = a.memoizedState)); | |
| "function" === typeof b.getDerivedStateFromProps || | |
| "function" === typeof e.getSnapshotBeforeUpdate || | |
| ("function" !== typeof e.UNSAFE_componentWillMount && | |
| "function" !== typeof e.componentWillMount) || | |
| ((b = e.state), | |
| "function" === typeof e.componentWillMount && e.componentWillMount(), | |
| "function" === typeof e.UNSAFE_componentWillMount && | |
| e.UNSAFE_componentWillMount(), | |
| b !== e.state && Zg.enqueueReplaceState(e, e.state, null), | |
| (g = a.updateQueue), | |
| null !== g && (cd(a, g, p, e, c), (e.state = a.memoizedState))); | |
| "function" === typeof e.componentDidMount && (a.effectTag |= 4); | |
| } | |
| function Wa(a, b, p) { | |
| a = p.ref; | |
| if (null !== a && "function" !== typeof a && "object" !== typeof a) { | |
| if (p._owner) { | |
| p = p._owner; | |
| var c = void 0; | |
| p && (1 !== p.tag ? t("309") : void 0, (c = p.stateNode)); | |
| c ? void 0 : t("147", a); | |
| var e = "" + a; | |
| if ( | |
| null !== b && | |
| null !== b.ref && | |
| "function" === typeof b.ref && | |
| b.ref._stringRef === e | |
| ) | |
| return b.ref; | |
| b = function (a) { | |
| var b = c.refs; | |
| b === $h && (b = c.refs = {}); | |
| null === a ? delete b[e] : (b[e] = a); | |
| }; | |
| b._stringRef = e; | |
| return b; | |
| } | |
| "string" !== typeof a ? t("284") : void 0; | |
| p._owner ? void 0 : t("290", a); | |
| } | |
| return a; | |
| } | |
| function lc(a, b) { | |
| "textarea" !== a.type && | |
| t( | |
| "31", | |
| "[object Object]" === Object.prototype.toString.call(b) | |
| ? "object with keys {" + Object.keys(b).join(", ") + "}" | |
| : b, | |
| "" | |
| ); | |
| } | |
| function ie(a) { | |
| function b(b, p) { | |
| if (a) { | |
| var c = b.lastEffect; | |
| null !== c | |
| ? ((c.nextEffect = p), (b.lastEffect = p)) | |
| : (b.firstEffect = b.lastEffect = p); | |
| p.nextEffect = null; | |
| p.effectTag = 8; | |
| } | |
| } | |
| function p(p, c) { | |
| if (!a) return null; | |
| for (; null !== c; ) b(p, c), (c = c.sibling); | |
| return null; | |
| } | |
| function c(a, b) { | |
| for (a = new Map(); null !== b; ) | |
| null !== b.key ? a.set(b.key, b) : a.set(b.index, b), (b = b.sibling); | |
| return a; | |
| } | |
| function e(a, b, p) { | |
| a = mb(a, b, p); | |
| a.index = 0; | |
| a.sibling = null; | |
| return a; | |
| } | |
| function g(b, p, c) { | |
| b.index = c; | |
| if (!a) return p; | |
| c = b.alternate; | |
| if (null !== c) return (c = c.index), c < p ? ((b.effectTag = 2), p) : c; | |
| b.effectTag = 2; | |
| return p; | |
| } | |
| function d(b) { | |
| a && null === b.alternate && (b.effectTag = 2); | |
| return b; | |
| } | |
| function l(a, b, p, c) { | |
| if (null === b || 6 !== b.tag) | |
| return (b = ud(p, a.mode, c)), (b.return = a), b; | |
| b = e(b, p, c); | |
| b.return = a; | |
| return b; | |
| } | |
| function h(a, b, p, c) { | |
| if (null !== b && b.elementType === p.type) | |
| return (c = e(b, p.props, c)), (c.ref = Wa(a, b, p)), (c.return = a), c; | |
| c = Dc(p.type, p.key, p.props, null, a.mode, c); | |
| c.ref = Wa(a, b, p); | |
| c.return = a; | |
| return c; | |
| } | |
| function k(a, b, p, c) { | |
| if ( | |
| null === b || | |
| 4 !== b.tag || | |
| b.stateNode.containerInfo !== p.containerInfo || | |
| b.stateNode.implementation !== p.implementation | |
| ) | |
| return (b = Nc(p, a.mode, c)), (b.return = a), b; | |
| b = e(b, p.children || [], c); | |
| b.return = a; | |
| return b; | |
| } | |
| function n(a, b, p, c, g) { | |
| if (null === b || 7 !== b.tag) | |
| return (b = Vb(p, a.mode, c, g)), (b.return = a), b; | |
| b = e(b, p, c); | |
| b.return = a; | |
| return b; | |
| } | |
| function v(a, b, p) { | |
| if ("string" === typeof b || "number" === typeof b) | |
| return (b = ud("" + b, a.mode, p)), (b.return = a), b; | |
| if ("object" === typeof b && null !== b) { | |
| switch (b.$$typeof) { | |
| case hg: | |
| return ( | |
| (p = Dc(b.type, b.key, b.props, null, a.mode, p)), | |
| (p.ref = Wa(a, null, b)), | |
| (p.return = a), | |
| p | |
| ); | |
| case ye: | |
| return (b = Nc(b, a.mode, p)), (b.return = a), b; | |
| } | |
| if (Be(b) || La(b)) | |
| return (b = Vb(b, a.mode, p, null)), (b.return = a), b; | |
| lc(a, b); | |
| } | |
| return null; | |
| } | |
| function x(a, b, p, c) { | |
| var e = null !== b ? b.key : null; | |
| if ("string" === typeof p || "number" === typeof p) | |
| return null !== e ? null : l(a, b, "" + p, c); | |
| if ("object" === typeof p && null !== p) { | |
| switch (p.$$typeof) { | |
| case hg: | |
| return p.key === e | |
| ? p.type === Ra | |
| ? n(a, b, p.props.children, c, e) | |
| : h(a, b, p, c) | |
| : null; | |
| case ye: | |
| return p.key === e ? k(a, b, p, c) : null; | |
| } | |
| if (Be(p) || La(p)) return null !== e ? null : n(a, b, p, c, null); | |
| lc(a, p); | |
| } | |
| return null; | |
| } | |
| function w(a, b, p, c, e) { | |
| if ("string" === typeof c || "number" === typeof c) | |
| return (a = a.get(p) || null), l(b, a, "" + c, e); | |
| if ("object" === typeof c && null !== c) { | |
| switch (c.$$typeof) { | |
| case hg: | |
| return ( | |
| (a = a.get(null === c.key ? p : c.key) || null), | |
| c.type === Ra | |
| ? n(b, a, c.props.children, e, c.key) | |
| : h(b, a, c, e) | |
| ); | |
| case ye: | |
| return ( | |
| (a = a.get(null === c.key ? p : c.key) || null), k(b, a, c, e) | |
| ); | |
| } | |
| if (Be(c) || La(c)) return (a = a.get(p) || null), n(b, a, c, e, null); | |
| lc(b, c); | |
| } | |
| return null; | |
| } | |
| function S(e, d, l, h) { | |
| for ( | |
| var k = null, n = null, S = d, q = (d = 0), u = null; | |
| null !== S && q < l.length; | |
| q++ | |
| ) { | |
| S.index > q ? ((u = S), (S = null)) : (u = S.sibling); | |
| var f = x(e, S, l[q], h); | |
| if (null === f) { | |
| null === S && (S = u); | |
| break; | |
| } | |
| a && S && null === f.alternate && b(e, S); | |
| d = g(f, d, q); | |
| null === n ? (k = f) : (n.sibling = f); | |
| n = f; | |
| S = u; | |
| } | |
| if (q === l.length) return p(e, S), k; | |
| if (null === S) { | |
| for (; q < l.length; q++) | |
| if ((S = v(e, l[q], h))) | |
| (d = g(S, d, q)), null === n ? (k = S) : (n.sibling = S), (n = S); | |
| return k; | |
| } | |
| for (S = c(e, S); q < l.length; q++) | |
| if ((u = w(S, e, q, l[q], h))) | |
| a && null !== u.alternate && S.delete(null === u.key ? q : u.key), | |
| (d = g(u, d, q)), | |
| null === n ? (k = u) : (n.sibling = u), | |
| (n = u); | |
| a && | |
| S.forEach(function (a) { | |
| return b(e, a); | |
| }); | |
| return k; | |
| } | |
| function q(e, d, l, h) { | |
| var k = La(l); | |
| "function" !== typeof k ? t("150") : void 0; | |
| l = k.call(l); | |
| null == l ? t("151") : void 0; | |
| for ( | |
| var n = (k = null), S = d, q = (d = 0), u = null, f = l.next(); | |
| null !== S && !f.done; | |
| q++, f = l.next() | |
| ) { | |
| S.index > q ? ((u = S), (S = null)) : (u = S.sibling); | |
| var y = x(e, S, f.value, h); | |
| if (null === y) { | |
| S || (S = u); | |
| break; | |
| } | |
| a && S && null === y.alternate && b(e, S); | |
| d = g(y, d, q); | |
| null === n ? (k = y) : (n.sibling = y); | |
| n = y; | |
| S = u; | |
| } | |
| if (f.done) return p(e, S), k; | |
| if (null === S) { | |
| for (; !f.done; q++, f = l.next()) | |
| (f = v(e, f.value, h)), | |
| null !== f && | |
| ((d = g(f, d, q)), | |
| null === n ? (k = f) : (n.sibling = f), | |
| (n = f)); | |
| return k; | |
| } | |
| for (S = c(e, S); !f.done; q++, f = l.next()) | |
| (f = w(S, e, q, f.value, h)), | |
| null !== f && | |
| (a && null !== f.alternate && S.delete(null === f.key ? q : f.key), | |
| (d = g(f, d, q)), | |
| null === n ? (k = f) : (n.sibling = f), | |
| (n = f)); | |
| a && | |
| S.forEach(function (a) { | |
| return b(e, a); | |
| }); | |
| return k; | |
| } | |
| return function (a, c, g, l) { | |
| var h = | |
| "object" === typeof g && null !== g && g.type === Ra && null === g.key; | |
| h && (g = g.props.children); | |
| var k = "object" === typeof g && null !== g; | |
| if (k) | |
| switch (g.$$typeof) { | |
| case hg: | |
| a: { | |
| k = g.key; | |
| for (h = c; null !== h; ) { | |
| if (h.key === k) | |
| if (7 === h.tag ? g.type === Ra : h.elementType === g.type) { | |
| p(a, h.sibling); | |
| c = e(h, g.type === Ra ? g.props.children : g.props, l); | |
| c.ref = Wa(a, h, g); | |
| c.return = a; | |
| a = c; | |
| break a; | |
| } else { | |
| p(a, h); | |
| break; | |
| } | |
| else b(a, h); | |
| h = h.sibling; | |
| } | |
| g.type === Ra | |
| ? ((c = Vb(g.props.children, a.mode, l, g.key)), | |
| (c.return = a), | |
| (a = c)) | |
| : ((l = Dc(g.type, g.key, g.props, null, a.mode, l)), | |
| (l.ref = Wa(a, c, g)), | |
| (l.return = a), | |
| (a = l)); | |
| } | |
| return d(a); | |
| case ye: | |
| a: { | |
| for (h = g.key; null !== c; ) { | |
| if (c.key === h) | |
| if ( | |
| 4 === c.tag && | |
| c.stateNode.containerInfo === g.containerInfo && | |
| c.stateNode.implementation === g.implementation | |
| ) { | |
| p(a, c.sibling); | |
| c = e(c, g.children || [], l); | |
| c.return = a; | |
| a = c; | |
| break a; | |
| } else { | |
| p(a, c); | |
| break; | |
| } | |
| else b(a, c); | |
| c = c.sibling; | |
| } | |
| c = Nc(g, a.mode, l); | |
| c.return = a; | |
| a = c; | |
| } | |
| return d(a); | |
| } | |
| if ("string" === typeof g || "number" === typeof g) | |
| return ( | |
| (g = "" + g), | |
| null !== c && 6 === c.tag | |
| ? (p(a, c.sibling), (c = e(c, g, l)), (c.return = a), (a = c)) | |
| : (p(a, c), (c = ud(g, a.mode, l)), (c.return = a), (a = c)), | |
| d(a) | |
| ); | |
| if (Be(g)) return S(a, c, g, l); | |
| if (La(g)) return q(a, c, g, l); | |
| k && lc(a, g); | |
| if ("undefined" === typeof g && !h) | |
| switch (a.tag) { | |
| case 1: | |
| case 0: | |
| (l = a.type), t("152", l.displayName || l.name || "Component"); | |
| } | |
| return p(a, c); | |
| }; | |
| } | |
| function yc(a) { | |
| a === Xf ? t("174") : void 0; | |
| return a; | |
| } | |
| function fc(a, b) { | |
| sb(dd, b, a); | |
| sb(Ff, a, a); | |
| sb(db, Xf, a); | |
| var p = b.nodeType; | |
| switch (p) { | |
| case 9: | |
| case 11: | |
| b = (b = b.documentElement) ? b.namespaceURI : hb(null, ""); | |
| break; | |
| default: | |
| (p = 8 === p ? b.parentNode : b), | |
| (b = p.namespaceURI || null), | |
| (p = p.tagName), | |
| (b = hb(b, p)); | |
| } | |
| Db(db, a); | |
| sb(db, b, a); | |
| } | |
| function Kb(a) { | |
| Db(db, a); | |
| Db(Ff, a); | |
| Db(dd, a); | |
| } | |
| function Rb(a) { | |
| yc(dd.current); | |
| var b = yc(db.current), | |
| p = hb(b, a.type); | |
| b !== p && (sb(Ff, a, a), sb(db, p, a)); | |
| } | |
| function wc(a) { | |
| Ff.current === a && (Db(db, a), Db(Ff, a)); | |
| } | |
| function ed() { | |
| t("307"); | |
| } | |
| function Gd(a, b) { | |
| if (null === b) return !1; | |
| for (var p = 0; p < b.length && p < a.length; p++) | |
| if (!Ya(a[p], b[p])) return !1; | |
| return !0; | |
| } | |
| function nd(a, b, p, c, e, g) { | |
| si = g; | |
| $g = b; | |
| ig = null !== a ? a.memoizedState : null; | |
| Di.current = null === ig ? Qj : ti; | |
| b = p(c, e); | |
| if (ui) { | |
| do | |
| (ui = !1), | |
| (Lh += 1), | |
| (ig = null !== a ? a.memoizedState : null), | |
| (Mh = sh), | |
| (Kg = Yf = Ce = null), | |
| (Di.current = ti), | |
| (b = p(c, e)); | |
| while (ui); | |
| th = null; | |
| Lh = 0; | |
| } | |
| Di.current = ej; | |
| a = $g; | |
| a.memoizedState = sh; | |
| a.expirationTime = bi; | |
| a.updateQueue = Kg; | |
| a.effectTag |= Ei; | |
| a = null !== Ce && null !== Ce.next; | |
| si = 0; | |
| Mh = Yf = sh = ig = Ce = $g = null; | |
| bi = 0; | |
| Kg = null; | |
| Ei = 0; | |
| a ? t("300") : void 0; | |
| return b; | |
| } | |
| function zc() { | |
| Di.current = ej; | |
| si = 0; | |
| Mh = Yf = sh = ig = Ce = $g = null; | |
| bi = 0; | |
| Kg = null; | |
| Ei = 0; | |
| ui = !1; | |
| th = null; | |
| Lh = 0; | |
| } | |
| function Sb() { | |
| var a = { | |
| memoizedState: null, | |
| baseState: null, | |
| queue: null, | |
| baseUpdate: null, | |
| next: null, | |
| }; | |
| null === Yf ? (sh = Yf = a) : (Yf = Yf.next = a); | |
| return Yf; | |
| } | |
| function Fc() { | |
| if (null !== Mh) | |
| (Yf = Mh), (Mh = Yf.next), (Ce = ig), (ig = null !== Ce ? Ce.next : null); | |
| else { | |
| null === ig ? t("310") : void 0; | |
| Ce = ig; | |
| var a = { | |
| memoizedState: Ce.memoizedState, | |
| baseState: Ce.baseState, | |
| queue: Ce.queue, | |
| baseUpdate: Ce.baseUpdate, | |
| next: null, | |
| }; | |
| Yf = null === Yf ? (sh = a) : (Yf.next = a); | |
| ig = Ce.next; | |
| } | |
| return Yf; | |
| } | |
| function Qc(a, b) { | |
| return "function" === typeof b ? b(a) : b; | |
| } | |
| function Lb(a) { | |
| var b = Fc(), | |
| p = b.queue; | |
| null === p ? t("311") : void 0; | |
| if (0 < Lh) { | |
| var c = p.dispatch; | |
| if (null !== th) { | |
| var e = th.get(p); | |
| if (void 0 !== e) { | |
| th.delete(p); | |
| var g = b.memoizedState; | |
| do (g = a(g, e.action)), (e = e.next); | |
| while (null !== e); | |
| Ya(g, b.memoizedState) || (ah = !0); | |
| b.memoizedState = g; | |
| b.baseUpdate === p.last && (b.baseState = g); | |
| p.eagerReducer = a; | |
| p.eagerState = g; | |
| return [g, c]; | |
| } | |
| } | |
| return [b.memoizedState, c]; | |
| } | |
| c = p.last; | |
| var d = b.baseUpdate; | |
| g = b.baseState; | |
| null !== d | |
| ? (null !== c && (c.next = null), (c = d.next)) | |
| : (c = null !== c ? c.next : null); | |
| if (null !== c) { | |
| var l = (e = null), | |
| h = c, | |
| k = !1; | |
| do { | |
| var n = h.expirationTime; | |
| n < si | |
| ? (k || ((k = !0), (l = d), (e = g)), n > bi && (bi = n)) | |
| : (g = h.eagerReducer === a ? h.eagerState : a(g, h.action)); | |
| d = h; | |
| h = h.next; | |
| } while (null !== h && h !== c); | |
| k || ((l = d), (e = g)); | |
| Ya(g, b.memoizedState) || (ah = !0); | |
| b.memoizedState = g; | |
| b.baseUpdate = l; | |
| b.baseState = e; | |
| p.eagerReducer = a; | |
| p.eagerState = g; | |
| } | |
| return [b.memoizedState, p.dispatch]; | |
| } | |
| function Ac(a, b, p, c) { | |
| a = { tag: a, create: b, destroy: p, deps: c, next: null }; | |
| null === Kg | |
| ? ((Kg = { lastEffect: null }), (Kg.lastEffect = a.next = a)) | |
| : ((b = Kg.lastEffect), | |
| null === b | |
| ? (Kg.lastEffect = a.next = a) | |
| : ((p = b.next), (b.next = a), (a.next = p), (Kg.lastEffect = a))); | |
| return a; | |
| } | |
| function Dd(a, b, p, c) { | |
| var e = Sb(); | |
| Ei |= a; | |
| e.memoizedState = Ac(b, p, void 0, void 0 === c ? null : c); | |
| } | |
| function Rc(a, b, p, c) { | |
| var e = Fc(); | |
| c = void 0 === c ? null : c; | |
| var g = void 0; | |
| if (null !== Ce) { | |
| var d = Ce.memoizedState; | |
| g = d.destroy; | |
| if (null !== c && Gd(c, d.deps)) { | |
| Ac(bc, p, g, c); | |
| return; | |
| } | |
| } | |
| Ei |= a; | |
| e.memoizedState = Ac(b, p, g, c); | |
| } | |
| function Hd(a, b) { | |
| if ("function" === typeof b) | |
| return ( | |
| (a = a()), | |
| b(a), | |
| function () { | |
| b(null); | |
| } | |
| ); | |
| if (null !== b && void 0 !== b) | |
| return ( | |
| (a = a()), | |
| (b.current = a), | |
| function () { | |
| b.current = null; | |
| } | |
| ); | |
| } | |
| function vd() {} | |
| function Xc(a, b, p) { | |
| 25 > Lh ? void 0 : t("301"); | |
| var c = a.alternate; | |
| if (a === $g || (null !== c && c === $g)) | |
| if ( | |
| ((ui = !0), | |
| (a = { | |
| expirationTime: si, | |
| action: p, | |
| eagerReducer: null, | |
| eagerState: null, | |
| next: null, | |
| }), | |
| null === th && (th = new Map()), | |
| (p = th.get(b)), | |
| void 0 === p) | |
| ) | |
| th.set(b, a); | |
| else { | |
| for (b = p; null !== b.next; ) b = b.next; | |
| b.next = a; | |
| } | |
| else { | |
| Jc(); | |
| var e = Td(); | |
| e = Tc(e, a); | |
| var g = { | |
| expirationTime: e, | |
| action: p, | |
| eagerReducer: null, | |
| eagerState: null, | |
| next: null, | |
| }, | |
| d = b.last; | |
| if (null === d) g.next = g; | |
| else { | |
| var l = d.next; | |
| null !== l && (g.next = l); | |
| d.next = g; | |
| } | |
| b.last = g; | |
| if ( | |
| 0 === a.expirationTime && | |
| (null === c || 0 === c.expirationTime) && | |
| ((c = b.eagerReducer), null !== c) | |
| ) | |
| try { | |
| var h = b.eagerState, | |
| k = c(h, p); | |
| g.eagerReducer = c; | |
| g.eagerState = k; | |
| if (Ya(k, h)) return; | |
| } catch (Ci) { | |
| } finally { | |
| } | |
| Gf(a, e); | |
| } | |
| } | |
| function ae(a, b) { | |
| var p = Ua(5, null, null, 0); | |
| p.elementType = "DELETED"; | |
| p.type = "DELETED"; | |
| p.stateNode = b; | |
| p.return = a; | |
| p.effectTag = 8; | |
| null !== a.lastEffect | |
| ? ((a.lastEffect.nextEffect = p), (a.lastEffect = p)) | |
| : (a.firstEffect = a.lastEffect = p); | |
| } | |
| function fd(a, b) { | |
| switch (a.tag) { | |
| case 5: | |
| var p = a.type; | |
| b = | |
| 1 !== b.nodeType || p.toLowerCase() !== b.nodeName.toLowerCase() | |
| ? null | |
| : b; | |
| return null !== b ? ((a.stateNode = b), !0) : !1; | |
| case 6: | |
| return ( | |
| (b = "" === a.pendingProps || 3 !== b.nodeType ? null : b), | |
| null !== b ? ((a.stateNode = b), !0) : !1 | |
| ); | |
| case 13: | |
| return !1; | |
| default: | |
| return !1; | |
| } | |
| } | |
| function Id(a) { | |
| if (jg) { | |
| var b = bh; | |
| if (b) { | |
| var p = b; | |
| if (!fd(a, b)) { | |
| b = Ub(p); | |
| if (!b || !fd(a, b)) { | |
| a.effectTag |= 2; | |
| jg = !1; | |
| Ud = a; | |
| return; | |
| } | |
| ae(Ud, p); | |
| } | |
| Ud = a; | |
| bh = ld(b); | |
| } else (a.effectTag |= 2), (jg = !1), (Ud = a); | |
| } | |
| } | |
| function je(a) { | |
| for ( | |
| a = a.return; | |
| null !== a && 5 !== a.tag && 3 !== a.tag && 18 !== a.tag; | |
| ) | |
| a = a.return; | |
| Ud = a; | |
| } | |
| function Oc(a) { | |
| if (a !== Ud) return !1; | |
| if (!jg) return je(a), (jg = !0), !1; | |
| var b = a.type; | |
| if ( | |
| 5 !== a.tag || | |
| ("head" !== b && "body" !== b && !Ic(b, a.memoizedProps)) | |
| ) | |
| for (b = bh; b; ) ae(a, b), (b = Ub(b)); | |
| je(a); | |
| bh = Ud ? Ub(a.stateNode) : null; | |
| return !0; | |
| } | |
| function Kc(a, b, p, c) { | |
| b.child = null === a ? Hf(b, null, p, c) : Oe(b, a.child, p, c); | |
| } | |
| function gd(a, b, p, c, e) { | |
| p = p.render; | |
| var g = b.ref; | |
| De(b, e); | |
| c = nd(a, b, p, c, g, e); | |
| if (null !== a && !ah) | |
| return ( | |
| (b.updateQueue = a.updateQueue), | |
| (b.effectTag &= -517), | |
| a.expirationTime <= e && (a.expirationTime = 0), | |
| be(a, b, e) | |
| ); | |
| b.effectTag |= 1; | |
| Kc(a, b, c, e); | |
| return b.child; | |
| } | |
| function Mb(a, b, p, c, e, g) { | |
| if (null === a) { | |
| var d = p.type; | |
| if ( | |
| "function" === typeof d && | |
| !Ob(d) && | |
| void 0 === d.defaultProps && | |
| null === p.compare && | |
| void 0 === p.defaultProps | |
| ) | |
| return (b.tag = 15), (b.type = d), gc(a, b, d, c, e, g); | |
| a = Dc(p.type, null, c, null, b.mode, g); | |
| a.ref = b.ref; | |
| a.return = b; | |
| return (b.child = a); | |
| } | |
| d = a.child; | |
| if ( | |
| e < g && | |
| ((e = d.memoizedProps), | |
| (p = p.compare), | |
| (p = null !== p ? p : Ta), | |
| p(e, c) && a.ref === b.ref) | |
| ) | |
| return be(a, b, g); | |
| b.effectTag |= 1; | |
| a = mb(d, c, g); | |
| a.ref = b.ref; | |
| a.return = b; | |
| return (b.child = a); | |
| } | |
| function gc(a, b, p, c, e, g) { | |
| return null !== a && | |
| Ta(a.memoizedProps, c) && | |
| a.ref === b.ref && | |
| ((ah = !1), e < g) | |
| ? be(a, b, g) | |
| : Oa(a, b, p, c, g); | |
| } | |
| function Bb(a, b) { | |
| var p = b.ref; | |
| if ((null === a && null !== p) || (null !== a && a.ref !== p)) | |
| b.effectTag |= 128; | |
| } | |
| function Oa(a, b, p, c, e) { | |
| var g = Ib(p) ? Ld : Kd.current; | |
| g = ac(b, g); | |
| De(b, e); | |
| p = nd(a, b, p, c, g, e); | |
| if (null !== a && !ah) | |
| return ( | |
| (b.updateQueue = a.updateQueue), | |
| (b.effectTag &= -517), | |
| a.expirationTime <= e && (a.expirationTime = 0), | |
| be(a, b, e) | |
| ); | |
| b.effectTag |= 1; | |
| Kc(a, b, p, e); | |
| return b.child; | |
| } | |
| function wd(a, b, p, c, e) { | |
| if (Ib(p)) { | |
| var g = !0; | |
| xa(b); | |
| } else g = !1; | |
| De(b, e); | |
| if (null === b.stateNode) | |
| null !== a && | |
| ((a.alternate = null), (b.alternate = null), (b.effectTag |= 2)), | |
| zb(b, p, c, e), | |
| vc(b, p, c, e), | |
| (c = !0); | |
| else if (null === a) { | |
| var d = b.stateNode, | |
| l = b.memoizedProps; | |
| d.props = l; | |
| var h = d.context, | |
| k = p.contextType; | |
| "object" === typeof k && null !== k | |
| ? (k = Sd(k)) | |
| : ((k = Ib(p) ? Ld : Kd.current), (k = ac(b, k))); | |
| var n = p.getDerivedStateFromProps, | |
| v = | |
| "function" === typeof n || | |
| "function" === typeof d.getSnapshotBeforeUpdate; | |
| v || | |
| ("function" !== typeof d.UNSAFE_componentWillReceiveProps && | |
| "function" !== typeof d.componentWillReceiveProps) || | |
| ((l !== c || h !== k) && bd(b, d, c, k)); | |
| uh = !1; | |
| var S = b.memoizedState; | |
| h = d.state = S; | |
| var x = b.updateQueue; | |
| null !== x && (cd(b, x, c, d, e), (h = b.memoizedState)); | |
| l !== c || S !== h || Bd.current || uh | |
| ? ("function" === typeof n && (Za(b, p, n, c), (h = b.memoizedState)), | |
| (l = uh || Ec(b, p, l, c, S, h, k)) | |
| ? (v || | |
| ("function" !== typeof d.UNSAFE_componentWillMount && | |
| "function" !== typeof d.componentWillMount) || | |
| ("function" === typeof d.componentWillMount && | |
| d.componentWillMount(), | |
| "function" === typeof d.UNSAFE_componentWillMount && | |
| d.UNSAFE_componentWillMount()), | |
| "function" === typeof d.componentDidMount && (b.effectTag |= 4)) | |
| : ("function" === typeof d.componentDidMount && (b.effectTag |= 4), | |
| (b.memoizedProps = c), | |
| (b.memoizedState = h)), | |
| (d.props = c), | |
| (d.state = h), | |
| (d.context = k), | |
| (c = l)) | |
| : ("function" === typeof d.componentDidMount && (b.effectTag |= 4), | |
| (c = !1)); | |
| } else | |
| (d = b.stateNode), | |
| (l = b.memoizedProps), | |
| (d.props = b.type === b.elementType ? l : eb(b.type, l)), | |
| (h = d.context), | |
| (k = p.contextType), | |
| "object" === typeof k && null !== k | |
| ? (k = Sd(k)) | |
| : ((k = Ib(p) ? Ld : Kd.current), (k = ac(b, k))), | |
| (n = p.getDerivedStateFromProps), | |
| (v = | |
| "function" === typeof n || | |
| "function" === typeof d.getSnapshotBeforeUpdate) || | |
| ("function" !== typeof d.UNSAFE_componentWillReceiveProps && | |
| "function" !== typeof d.componentWillReceiveProps) || | |
| ((l !== c || h !== k) && bd(b, d, c, k)), | |
| (uh = !1), | |
| (h = b.memoizedState), | |
| (S = d.state = h), | |
| (x = b.updateQueue), | |
| null !== x && (cd(b, x, c, d, e), (S = b.memoizedState)), | |
| l !== c || h !== S || Bd.current || uh | |
| ? ("function" === typeof n && (Za(b, p, n, c), (S = b.memoizedState)), | |
| (n = uh || Ec(b, p, l, c, h, S, k)) | |
| ? (v || | |
| ("function" !== typeof d.UNSAFE_componentWillUpdate && | |
| "function" !== typeof d.componentWillUpdate) || | |
| ("function" === typeof d.componentWillUpdate && | |
| d.componentWillUpdate(c, S, k), | |
| "function" === typeof d.UNSAFE_componentWillUpdate && | |
| d.UNSAFE_componentWillUpdate(c, S, k)), | |
| "function" === typeof d.componentDidUpdate && | |
| (b.effectTag |= 4), | |
| "function" === typeof d.getSnapshotBeforeUpdate && | |
| (b.effectTag |= 256)) | |
| : ("function" !== typeof d.componentDidUpdate || | |
| (l === a.memoizedProps && h === a.memoizedState) || | |
| (b.effectTag |= 4), | |
| "function" !== typeof d.getSnapshotBeforeUpdate || | |
| (l === a.memoizedProps && h === a.memoizedState) || | |
| (b.effectTag |= 256), | |
| (b.memoizedProps = c), | |
| (b.memoizedState = S)), | |
| (d.props = c), | |
| (d.state = S), | |
| (d.context = k), | |
| (c = n)) | |
| : ("function" !== typeof d.componentDidUpdate || | |
| (l === a.memoizedProps && h === a.memoizedState) || | |
| (b.effectTag |= 4), | |
| "function" !== typeof d.getSnapshotBeforeUpdate || | |
| (l === a.memoizedProps && h === a.memoizedState) || | |
| (b.effectTag |= 256), | |
| (c = !1)); | |
| return od(a, b, p, c, g, e); | |
| } | |
| function od(a, b, p, c, e, g) { | |
| Bb(a, b); | |
| var d = 0 !== (b.effectTag & 64); | |
| if (!c && !d) return e && ec(b, p, !1), be(a, b, g); | |
| c = b.stateNode; | |
| fj.current = b; | |
| var l = | |
| d && "function" !== typeof p.getDerivedStateFromError ? null : c.render(); | |
| b.effectTag |= 1; | |
| null !== a && d | |
| ? ((b.child = Oe(b, a.child, null, g)), (b.child = Oe(b, null, l, g))) | |
| : Kc(a, b, l, g); | |
| b.memoizedState = c.state; | |
| e && ec(b, p, !0); | |
| return b.child; | |
| } | |
| function If(a) { | |
| var b = a.stateNode; | |
| b.pendingContext | |
| ? Cd(a, b.pendingContext, b.pendingContext !== b.context) | |
| : b.context && Cd(a, b.context, !1); | |
| fc(a, b.containerInfo); | |
| } | |
| function ne(a, b, p) { | |
| var c = b.mode, | |
| e = b.pendingProps, | |
| g = b.memoizedState; | |
| if (0 === (b.effectTag & 64)) { | |
| g = null; | |
| var d = !1; | |
| } else | |
| (g = { timedOutAt: null !== g ? g.timedOutAt : 0 }), | |
| (d = !0), | |
| (b.effectTag &= -65); | |
| if (null === a) | |
| if (d) { | |
| var l = e.fallback; | |
| a = Vb(null, c, 0, null); | |
| 0 === (b.mode & 1) && | |
| (a.child = null !== b.memoizedState ? b.child.child : b.child); | |
| c = Vb(l, c, p, null); | |
| a.sibling = c; | |
| p = a; | |
| p.return = c.return = b; | |
| } else p = c = Hf(b, null, e.children, p); | |
| else | |
| null !== a.memoizedState | |
| ? ((c = a.child), | |
| (l = c.sibling), | |
| d | |
| ? ((p = e.fallback), | |
| (e = mb(c, c.pendingProps, 0)), | |
| 0 === (b.mode & 1) && | |
| ((d = null !== b.memoizedState ? b.child.child : b.child), | |
| d !== c.child && (e.child = d)), | |
| (c = e.sibling = mb(l, p, l.expirationTime)), | |
| (p = e), | |
| (e.childExpirationTime = 0), | |
| (p.return = c.return = b)) | |
| : (p = c = Oe(b, c.child, e.children, p))) | |
| : ((l = a.child), | |
| d | |
| ? ((d = e.fallback), | |
| (e = Vb(null, c, 0, null)), | |
| (e.child = l), | |
| 0 === (b.mode & 1) && | |
| (e.child = null !== b.memoizedState ? b.child.child : b.child), | |
| (c = e.sibling = Vb(d, c, p, null)), | |
| (c.effectTag |= 2), | |
| (p = e), | |
| (e.childExpirationTime = 0), | |
| (p.return = c.return = b)) | |
| : (c = p = Oe(b, l, e.children, p))), | |
| (b.stateNode = a.stateNode); | |
| b.memoizedState = g; | |
| b.child = p; | |
| return c; | |
| } | |
| function be(a, b, p) { | |
| null !== a && (b.contextDependencies = a.contextDependencies); | |
| if (b.childExpirationTime < p) return null; | |
| null !== a && b.child !== a.child ? t("153") : void 0; | |
| if (null !== b.child) { | |
| a = b.child; | |
| p = mb(a, a.pendingProps, a.expirationTime); | |
| b.child = p; | |
| for (p.return = b; null !== a.sibling; ) | |
| (a = a.sibling), | |
| (p = p.sibling = mb(a, a.pendingProps, a.expirationTime)), | |
| (p.return = b); | |
| p.sibling = null; | |
| } | |
| return b.child; | |
| } | |
| function bf(a, b, p) { | |
| var c = b.expirationTime; | |
| if (null !== a) | |
| if (a.memoizedProps !== b.pendingProps || Bd.current) ah = !0; | |
| else { | |
| if (c < p) { | |
| ah = !1; | |
| switch (b.tag) { | |
| case 3: | |
| If(b); | |
| bh = Ud = null; | |
| jg = !1; | |
| break; | |
| case 5: | |
| Rb(b); | |
| break; | |
| case 1: | |
| Ib(b.type) && xa(b); | |
| break; | |
| case 4: | |
| fc(b, b.stateNode.containerInfo); | |
| break; | |
| case 10: | |
| da(b, b.memoizedProps.value); | |
| break; | |
| case 13: | |
| if (null !== b.memoizedState) { | |
| c = b.child.childExpirationTime; | |
| if (0 !== c && c >= p) return ne(a, b, p); | |
| b = be(a, b, p); | |
| return null !== b ? b.sibling : null; | |
| } | |
| } | |
| return be(a, b, p); | |
| } | |
| } | |
| else ah = !1; | |
| b.expirationTime = 0; | |
| switch (b.tag) { | |
| case 2: | |
| c = b.elementType; | |
| null !== a && | |
| ((a.alternate = null), (b.alternate = null), (b.effectTag |= 2)); | |
| a = b.pendingProps; | |
| var e = ac(b, Kd.current); | |
| De(b, p); | |
| e = nd(null, b, c, a, e, p); | |
| b.effectTag |= 1; | |
| if ( | |
| "object" === typeof e && | |
| null !== e && | |
| "function" === typeof e.render && | |
| void 0 === e.$$typeof | |
| ) { | |
| b.tag = 1; | |
| zc(); | |
| if (Ib(c)) { | |
| var g = !0; | |
| xa(b); | |
| } else g = !1; | |
| b.memoizedState = | |
| null !== e.state && void 0 !== e.state ? e.state : null; | |
| var d = c.getDerivedStateFromProps; | |
| "function" === typeof d && Za(b, c, d, a); | |
| e.updater = Zg; | |
| b.stateNode = e; | |
| e._reactInternalFiber = b; | |
| vc(b, c, a, p); | |
| b = od(null, b, c, !0, g, p); | |
| } else (b.tag = 0), Kc(null, b, e, p), (b = b.child); | |
| return b; | |
| case 16: | |
| e = b.elementType; | |
| null !== a && | |
| ((a.alternate = null), (b.alternate = null), (b.effectTag |= 2)); | |
| g = b.pendingProps; | |
| a = ub(e); | |
| b.type = a; | |
| e = b.tag = Qa(a); | |
| g = eb(a, g); | |
| d = void 0; | |
| switch (e) { | |
| case 0: | |
| d = Oa(null, b, a, g, p); | |
| break; | |
| case 1: | |
| d = wd(null, b, a, g, p); | |
| break; | |
| case 11: | |
| d = gd(null, b, a, g, p); | |
| break; | |
| case 14: | |
| d = Mb(null, b, a, eb(a.type, g), c, p); | |
| break; | |
| default: | |
| t("306", a, ""); | |
| } | |
| return d; | |
| case 0: | |
| return ( | |
| (c = b.type), | |
| (e = b.pendingProps), | |
| (e = b.elementType === c ? e : eb(c, e)), | |
| Oa(a, b, c, e, p) | |
| ); | |
| case 1: | |
| return ( | |
| (c = b.type), | |
| (e = b.pendingProps), | |
| (e = b.elementType === c ? e : eb(c, e)), | |
| wd(a, b, c, e, p) | |
| ); | |
| case 3: | |
| If(b); | |
| c = b.updateQueue; | |
| null === c ? t("282") : void 0; | |
| e = b.memoizedState; | |
| e = null !== e ? e.element : null; | |
| cd(b, c, b.pendingProps, null, p); | |
| c = b.memoizedState.element; | |
| if (c === e) (bh = Ud = null), (jg = !1), (b = be(a, b, p)); | |
| else { | |
| e = b.stateNode; | |
| if ((e = (null === a || null === a.child) && e.hydrate)) | |
| (bh = ld(b.stateNode.containerInfo)), (Ud = b), (e = jg = !0); | |
| e | |
| ? ((b.effectTag |= 2), (b.child = Hf(b, null, c, p))) | |
| : (Kc(a, b, c, p), (bh = Ud = null), (jg = !1)); | |
| b = b.child; | |
| } | |
| return b; | |
| case 5: | |
| return ( | |
| Rb(b), | |
| null === a && Id(b), | |
| (c = b.type), | |
| (e = b.pendingProps), | |
| (g = null !== a ? a.memoizedProps : null), | |
| (d = e.children), | |
| Ic(c, e) ? (d = null) : null !== g && Ic(c, g) && (b.effectTag |= 16), | |
| Bb(a, b), | |
| 1 !== p && b.mode & 1 && e.hidden | |
| ? ((b.expirationTime = b.childExpirationTime = 1), (b = null)) | |
| : (Kc(a, b, d, p), (b = b.child)), | |
| b | |
| ); | |
| case 6: | |
| return null === a && Id(b), null; | |
| case 13: | |
| return ne(a, b, p); | |
| case 4: | |
| return ( | |
| fc(b, b.stateNode.containerInfo), | |
| (c = b.pendingProps), | |
| null === a ? (b.child = Oe(b, null, c, p)) : Kc(a, b, c, p), | |
| b.child | |
| ); | |
| case 11: | |
| return ( | |
| (c = b.type), | |
| (e = b.pendingProps), | |
| (e = b.elementType === c ? e : eb(c, e)), | |
| gd(a, b, c, e, p) | |
| ); | |
| case 7: | |
| return Kc(a, b, b.pendingProps, p), b.child; | |
| case 8: | |
| return Kc(a, b, b.pendingProps.children, p), b.child; | |
| case 12: | |
| return Kc(a, b, b.pendingProps.children, p), b.child; | |
| case 10: | |
| a: { | |
| c = b.type._context; | |
| e = b.pendingProps; | |
| d = b.memoizedProps; | |
| g = e.value; | |
| da(b, g); | |
| if (null !== d) { | |
| var l = d.value; | |
| g = Ya(l, g) | |
| ? 0 | |
| : ("function" === typeof c._calculateChangedBits | |
| ? c._calculateChangedBits(l, g) | |
| : 1073741823) | 0; | |
| if (0 === g) { | |
| if (d.children === e.children && !Bd.current) { | |
| b = be(a, b, p); | |
| break a; | |
| } | |
| } else | |
| for (l = b.child, null !== l && (l.return = b); null !== l; ) { | |
| var h = l.contextDependencies; | |
| if (null !== h) { | |
| d = l.child; | |
| for (var k = h.first; null !== k; ) { | |
| if (k.context === c && 0 !== (k.observedBits & g)) { | |
| 1 === l.tag && ((k = oe(p)), (k.tag = Nh), ce(l, k)); | |
| l.expirationTime < p && (l.expirationTime = p); | |
| k = l.alternate; | |
| null !== k && | |
| k.expirationTime < p && | |
| (k.expirationTime = p); | |
| k = p; | |
| for (var n = l.return; null !== n; ) { | |
| var v = n.alternate; | |
| if (n.childExpirationTime < k) | |
| (n.childExpirationTime = k), | |
| null !== v && | |
| v.childExpirationTime < k && | |
| (v.childExpirationTime = k); | |
| else if (null !== v && v.childExpirationTime < k) | |
| v.childExpirationTime = k; | |
| else break; | |
| n = n.return; | |
| } | |
| h.expirationTime < p && (h.expirationTime = p); | |
| break; | |
| } | |
| k = k.next; | |
| } | |
| } else | |
| d = | |
| 10 === l.tag | |
| ? l.type === b.type | |
| ? null | |
| : l.child | |
| : l.child; | |
| if (null !== d) d.return = l; | |
| else | |
| for (d = l; null !== d; ) { | |
| if (d === b) { | |
| d = null; | |
| break; | |
| } | |
| l = d.sibling; | |
| if (null !== l) { | |
| l.return = d.return; | |
| d = l; | |
| break; | |
| } | |
| d = d.return; | |
| } | |
| l = d; | |
| } | |
| } | |
| Kc(a, b, e.children, p); | |
| b = b.child; | |
| } | |
| return b; | |
| case 9: | |
| return ( | |
| (e = b.type), | |
| (g = b.pendingProps), | |
| (c = g.children), | |
| De(b, p), | |
| (e = Sd(e, g.unstable_observedBits)), | |
| (c = c(e)), | |
| (b.effectTag |= 1), | |
| Kc(a, b, c, p), | |
| b.child | |
| ); | |
| case 14: | |
| return ( | |
| (e = b.type), | |
| (g = eb(e, b.pendingProps)), | |
| (g = eb(e.type, g)), | |
| Mb(a, b, e, g, c, p) | |
| ); | |
| case 15: | |
| return gc(a, b, b.type, b.pendingProps, c, p); | |
| case 17: | |
| return ( | |
| (c = b.type), | |
| (e = b.pendingProps), | |
| (e = b.elementType === c ? e : eb(c, e)), | |
| null !== a && | |
| ((a.alternate = null), (b.alternate = null), (b.effectTag |= 2)), | |
| (b.tag = 1), | |
| Ib(c) ? ((a = !0), xa(b)) : (a = !1), | |
| De(b, p), | |
| zb(b, c, e, p), | |
| vc(b, c, e, p), | |
| od(null, b, c, !0, a, p) | |
| ); | |
| } | |
| t("156"); | |
| } | |
| function da(a, b) { | |
| var p = a.type._context; | |
| sb(gj, p._currentValue, a); | |
| p._currentValue = b; | |
| } | |
| function Pe(a) { | |
| var b = gj.current; | |
| Db(gj, a); | |
| a.type._context._currentValue = b; | |
| } | |
| function De(a, b) { | |
| vi = a; | |
| ci = vh = null; | |
| var p = a.contextDependencies; | |
| null !== p && p.expirationTime >= b && (ah = !0); | |
| a.contextDependencies = null; | |
| } | |
| function Sd(a, b) { | |
| if (ci !== a && !1 !== b && 0 !== b) { | |
| if ("number" !== typeof b || 1073741823 === b) (ci = a), (b = 1073741823); | |
| b = { context: a, observedBits: b, next: null }; | |
| null === vh | |
| ? (null === vi ? t("308") : void 0, | |
| (vh = b), | |
| (vi.contextDependencies = { first: b, expirationTime: 0 })) | |
| : (vh = vh.next = b); | |
| } | |
| return a._currentValue; | |
| } | |
| function cf(a) { | |
| return { | |
| baseState: a, | |
| firstUpdate: null, | |
| lastUpdate: null, | |
| firstCapturedUpdate: null, | |
| lastCapturedUpdate: null, | |
| firstEffect: null, | |
| lastEffect: null, | |
| firstCapturedEffect: null, | |
| lastCapturedEffect: null, | |
| }; | |
| } | |
| function pe(a) { | |
| return { | |
| baseState: a.baseState, | |
| firstUpdate: a.firstUpdate, | |
| lastUpdate: a.lastUpdate, | |
| firstCapturedUpdate: null, | |
| lastCapturedUpdate: null, | |
| firstEffect: null, | |
| lastEffect: null, | |
| firstCapturedEffect: null, | |
| lastCapturedEffect: null, | |
| }; | |
| } | |
| function oe(a) { | |
| return { | |
| expirationTime: a, | |
| tag: tj, | |
| payload: null, | |
| callback: null, | |
| next: null, | |
| nextEffect: null, | |
| }; | |
| } | |
| function Jf(a, b) { | |
| null === a.lastUpdate | |
| ? (a.firstUpdate = a.lastUpdate = b) | |
| : ((a.lastUpdate.next = b), (a.lastUpdate = b)); | |
| } | |
| function ce(a, b) { | |
| var p = a.alternate; | |
| if (null === p) { | |
| var c = a.updateQueue, | |
| e = null; | |
| null === c && (c = a.updateQueue = cf(a.memoizedState)); | |
| } else | |
| (c = a.updateQueue), | |
| (e = p.updateQueue), | |
| null === c | |
| ? null === e | |
| ? ((c = a.updateQueue = cf(a.memoizedState)), | |
| (e = p.updateQueue = cf(p.memoizedState))) | |
| : (c = a.updateQueue = pe(e)) | |
| : null === e && (e = p.updateQueue = pe(c)); | |
| null === e || c === e | |
| ? Jf(c, b) | |
| : null === c.lastUpdate || null === e.lastUpdate | |
| ? (Jf(c, b), Jf(e, b)) | |
| : (Jf(c, b), (e.lastUpdate = b)); | |
| } | |
| function df(a, b) { | |
| var p = a.updateQueue; | |
| p = null === p ? (a.updateQueue = cf(a.memoizedState)) : hd(a, p); | |
| null === p.lastCapturedUpdate | |
| ? (p.firstCapturedUpdate = p.lastCapturedUpdate = b) | |
| : ((p.lastCapturedUpdate.next = b), (p.lastCapturedUpdate = b)); | |
| } | |
| function hd(a, b) { | |
| var p = a.alternate; | |
| null !== p && b === p.updateQueue && (b = a.updateQueue = pe(b)); | |
| return b; | |
| } | |
| function Yc(a, b, p, c, e, g) { | |
| switch (p.tag) { | |
| case Oh: | |
| return (a = p.payload), "function" === typeof a ? a.call(g, c, e) : a; | |
| case Qi: | |
| a.effectTag = (a.effectTag & -2049) | 64; | |
| case tj: | |
| a = p.payload; | |
| e = "function" === typeof a ? a.call(g, c, e) : a; | |
| if (null === e || void 0 === e) break; | |
| return Jd({}, c, e); | |
| case Nh: | |
| uh = !0; | |
| } | |
| return c; | |
| } | |
| function cd(a, b, p, c, e) { | |
| uh = !1; | |
| b = hd(a, b); | |
| for ( | |
| var g = b.baseState, d = null, l = 0, h = b.firstUpdate, k = g; | |
| null !== h; | |
| ) { | |
| var n = h.expirationTime; | |
| n < e | |
| ? (null === d && ((d = h), (g = k)), l < n && (l = n)) | |
| : ((k = Yc(a, b, h, k, p, c)), | |
| null !== h.callback && | |
| ((a.effectTag |= 32), | |
| (h.nextEffect = null), | |
| null === b.lastEffect | |
| ? (b.firstEffect = b.lastEffect = h) | |
| : ((b.lastEffect.nextEffect = h), (b.lastEffect = h)))); | |
| h = h.next; | |
| } | |
| n = null; | |
| for (h = b.firstCapturedUpdate; null !== h; ) { | |
| var v = h.expirationTime; | |
| v < e | |
| ? (null === n && ((n = h), null === d && (g = k)), l < v && (l = v)) | |
| : ((k = Yc(a, b, h, k, p, c)), | |
| null !== h.callback && | |
| ((a.effectTag |= 32), | |
| (h.nextEffect = null), | |
| null === b.lastCapturedEffect | |
| ? (b.firstCapturedEffect = b.lastCapturedEffect = h) | |
| : ((b.lastCapturedEffect.nextEffect = h), | |
| (b.lastCapturedEffect = h)))); | |
| h = h.next; | |
| } | |
| null === d && (b.lastUpdate = null); | |
| null === n ? (b.lastCapturedUpdate = null) : (a.effectTag |= 32); | |
| null === d && null === n && (g = k); | |
| b.baseState = g; | |
| b.firstUpdate = d; | |
| b.firstCapturedUpdate = n; | |
| a.expirationTime = l; | |
| a.memoizedState = k; | |
| } | |
| function R(a, b, p) { | |
| null !== b.firstCapturedUpdate && | |
| (null !== b.lastUpdate && | |
| ((b.lastUpdate.next = b.firstCapturedUpdate), | |
| (b.lastUpdate = b.lastCapturedUpdate)), | |
| (b.firstCapturedUpdate = b.lastCapturedUpdate = null)); | |
| Ee(b.firstEffect, p); | |
| b.firstEffect = b.lastEffect = null; | |
| Ee(b.firstCapturedEffect, p); | |
| b.firstCapturedEffect = b.lastCapturedEffect = null; | |
| } | |
| function Ee(a, b) { | |
| for (; null !== a; ) { | |
| var p = a.callback; | |
| if (null !== p) { | |
| a.callback = null; | |
| var c = b; | |
| "function" !== typeof p ? t("191", p) : void 0; | |
| p.call(c); | |
| } | |
| a = a.nextEffect; | |
| } | |
| } | |
| function qe(a, b) { | |
| return { value: a, source: b, stack: Aa(b) }; | |
| } | |
| function Fe(a, b) { | |
| var p = b.source, | |
| c = b.stack; | |
| null === c && null !== p && (c = Aa(p)); | |
| null !== p && pa(p.type); | |
| b = b.value; | |
| null !== a && 1 === a.tag && pa(a.type); | |
| try { | |
| console.error(b); | |
| } catch (Ij) { | |
| setTimeout(function () { | |
| throw Ij; | |
| }); | |
| } | |
| } | |
| function pd(a) { | |
| var b = a.ref; | |
| if (null !== b) | |
| if ("function" === typeof b) | |
| try { | |
| b(null); | |
| } catch (oi) { | |
| de(a, oi); | |
| } | |
| else b.current = null; | |
| } | |
| function Ge(a, b, p) { | |
| p = p.updateQueue; | |
| p = null !== p ? p.lastEffect : null; | |
| if (null !== p) { | |
| var c = (p = p.next); | |
| do { | |
| if ((c.tag & a) !== bc) { | |
| var e = c.destroy; | |
| c.destroy = void 0; | |
| void 0 !== e && e(); | |
| } | |
| (c.tag & b) !== bc && ((e = c.create), (c.destroy = e())); | |
| c = c.next; | |
| } while (c !== p); | |
| } | |
| } | |
| function He(a, b) { | |
| for (var p = a; ; ) { | |
| if (5 === p.tag) { | |
| var c = p.stateNode; | |
| if (b) c.style.display = "none"; | |
| else { | |
| c = p.stateNode; | |
| var e = p.memoizedProps.style; | |
| e = | |
| void 0 !== e && null !== e && e.hasOwnProperty("display") | |
| ? e.display | |
| : null; | |
| c.style.display = Ad("display", e); | |
| } | |
| } else if (6 === p.tag) p.stateNode.nodeValue = b ? "" : p.memoizedProps; | |
| else if (13 === p.tag && null !== p.memoizedState) { | |
| c = p.child.sibling; | |
| c.return = p; | |
| p = c; | |
| continue; | |
| } else if (null !== p.child) { | |
| p.child.return = p; | |
| p = p.child; | |
| continue; | |
| } | |
| if (p === a) break; | |
| for (; null === p.sibling; ) { | |
| if (null === p.return || p.return === a) return; | |
| p = p.return; | |
| } | |
| p.sibling.return = p.return; | |
| p = p.sibling; | |
| } | |
| } | |
| function ke(a) { | |
| "function" === typeof ri && ri(a); | |
| switch (a.tag) { | |
| case 0: | |
| case 11: | |
| case 14: | |
| case 15: | |
| var b = a.updateQueue; | |
| if (null !== b && ((b = b.lastEffect), null !== b)) { | |
| var p = (b = b.next); | |
| do { | |
| var c = p.destroy; | |
| if (void 0 !== c) { | |
| var e = a; | |
| try { | |
| c(); | |
| } catch (Ed) { | |
| de(e, Ed); | |
| } | |
| } | |
| p = p.next; | |
| } while (p !== b); | |
| } | |
| break; | |
| case 1: | |
| pd(a); | |
| b = a.stateNode; | |
| if ("function" === typeof b.componentWillUnmount) | |
| try { | |
| (b.props = a.memoizedProps), | |
| (b.state = a.memoizedState), | |
| b.componentWillUnmount(); | |
| } catch (Ed) { | |
| de(a, Ed); | |
| } | |
| break; | |
| case 5: | |
| pd(a); | |
| break; | |
| case 4: | |
| Zf(a); | |
| } | |
| } | |
| function rf(a) { | |
| return 5 === a.tag || 3 === a.tag || 4 === a.tag; | |
| } | |
| function ef(a) { | |
| a: { | |
| for (var b = a.return; null !== b; ) { | |
| if (rf(b)) { | |
| var p = b; | |
| break a; | |
| } | |
| b = b.return; | |
| } | |
| t("160"); | |
| p = void 0; | |
| } | |
| var c = (b = void 0); | |
| switch (p.tag) { | |
| case 5: | |
| b = p.stateNode; | |
| c = !1; | |
| break; | |
| case 3: | |
| b = p.stateNode.containerInfo; | |
| c = !0; | |
| break; | |
| case 4: | |
| b = p.stateNode.containerInfo; | |
| c = !0; | |
| break; | |
| default: | |
| t("161"); | |
| } | |
| p.effectTag & 16 && (Tb(b, ""), (p.effectTag &= -17)); | |
| p = a; | |
| a: b: for (;;) { | |
| for (; null === p.sibling; ) { | |
| if (null === p.return || rf(p.return)) { | |
| p = null; | |
| break a; | |
| } | |
| p = p.return; | |
| } | |
| p.sibling.return = p.return; | |
| for (p = p.sibling; 5 !== p.tag && 6 !== p.tag && 18 !== p.tag; ) { | |
| if (p.effectTag & 2) continue b; | |
| if (null === p.child || 4 === p.tag) continue b; | |
| else (p.child.return = p), (p = p.child); | |
| } | |
| if (!(p.effectTag & 2)) { | |
| p = p.stateNode; | |
| break a; | |
| } | |
| } | |
| for (var e = a; ; ) { | |
| if (5 === e.tag || 6 === e.tag) | |
| if (p) | |
| if (c) { | |
| var g = b, | |
| d = e.stateNode, | |
| l = p; | |
| 8 === g.nodeType | |
| ? g.parentNode.insertBefore(d, l) | |
| : g.insertBefore(d, l); | |
| } else b.insertBefore(e.stateNode, p); | |
| else | |
| c | |
| ? ((d = b), | |
| (l = e.stateNode), | |
| 8 === d.nodeType | |
| ? ((g = d.parentNode), g.insertBefore(l, d)) | |
| : ((g = d), g.appendChild(l)), | |
| (d = d._reactRootContainer), | |
| (null !== d && void 0 !== d) || | |
| null !== g.onclick || | |
| (g.onclick = ad)) | |
| : b.appendChild(e.stateNode); | |
| else if (4 !== e.tag && null !== e.child) { | |
| e.child.return = e; | |
| e = e.child; | |
| continue; | |
| } | |
| if (e === a) break; | |
| for (; null === e.sibling; ) { | |
| if (null === e.return || e.return === a) return; | |
| e = e.return; | |
| } | |
| e.sibling.return = e.return; | |
| e = e.sibling; | |
| } | |
| } | |
| function Zf(a) { | |
| for (var b = a, p = !1, c = void 0, e = void 0; ; ) { | |
| if (!p) { | |
| p = b.return; | |
| a: for (;;) { | |
| null === p ? t("160") : void 0; | |
| switch (p.tag) { | |
| case 5: | |
| c = p.stateNode; | |
| e = !1; | |
| break a; | |
| case 3: | |
| c = p.stateNode.containerInfo; | |
| e = !0; | |
| break a; | |
| case 4: | |
| c = p.stateNode.containerInfo; | |
| e = !0; | |
| break a; | |
| } | |
| p = p.return; | |
| } | |
| p = !0; | |
| } | |
| if (5 === b.tag || 6 === b.tag) { | |
| var g = b, | |
| d = g; | |
| a: for (;;) | |
| if ((ke(d), null !== d.child && 4 !== d.tag)) | |
| (d.child.return = d), (d = d.child); | |
| else { | |
| if (d === g) break; | |
| for (; null === d.sibling; ) { | |
| if (null === d.return || d.return === g) break a; | |
| d = d.return; | |
| } | |
| d.sibling.return = d.return; | |
| d = d.sibling; | |
| } | |
| e | |
| ? ((g = c), | |
| (d = b.stateNode), | |
| 8 === g.nodeType ? g.parentNode.removeChild(d) : g.removeChild(d)) | |
| : c.removeChild(b.stateNode); | |
| } else if (4 === b.tag) { | |
| if (null !== b.child) { | |
| c = b.stateNode.containerInfo; | |
| e = !0; | |
| b.child.return = b; | |
| b = b.child; | |
| continue; | |
| } | |
| } else if ((ke(b), null !== b.child)) { | |
| b.child.return = b; | |
| b = b.child; | |
| continue; | |
| } | |
| if (b === a) break; | |
| for (; null === b.sibling; ) { | |
| if (null === b.return || b.return === a) return; | |
| b = b.return; | |
| 4 === b.tag && (p = !1); | |
| } | |
| b.sibling.return = b.return; | |
| b = b.sibling; | |
| } | |
| } | |
| function le(a, b) { | |
| switch (b.tag) { | |
| case 0: | |
| case 11: | |
| case 14: | |
| case 15: | |
| Ge(di, Ph, b); | |
| break; | |
| case 1: | |
| break; | |
| case 5: | |
| var p = b.stateNode; | |
| if (null != p) { | |
| var c = b.memoizedProps; | |
| a = null !== a ? a.memoizedProps : c; | |
| var e = b.type, | |
| g = b.updateQueue; | |
| b.updateQueue = null; | |
| null !== g && Mc(p, g, e, a, c, b); | |
| } | |
| break; | |
| case 6: | |
| null === b.stateNode ? t("162") : void 0; | |
| b.stateNode.nodeValue = b.memoizedProps; | |
| break; | |
| case 3: | |
| break; | |
| case 12: | |
| break; | |
| case 13: | |
| p = b.memoizedState; | |
| c = void 0; | |
| a = b; | |
| null === p | |
| ? (c = !1) | |
| : ((c = !0), | |
| (a = b.child), | |
| 0 === p.timedOutAt && (p.timedOutAt = Td())); | |
| null !== a && He(a, c); | |
| p = b.updateQueue; | |
| if (null !== p) { | |
| b.updateQueue = null; | |
| var d = b.stateNode; | |
| null === d && (d = b.stateNode = new Qh()); | |
| p.forEach(function (a) { | |
| var p = Lg.bind(null, b, a); | |
| d.has(a) || (d.add(a), a.then(p, p)); | |
| }); | |
| } | |
| break; | |
| case 17: | |
| break; | |
| default: | |
| t("163"); | |
| } | |
| } | |
| function id(a, b, p) { | |
| p = oe(p); | |
| p.tag = Qi; | |
| p.payload = { element: null }; | |
| var c = b.value; | |
| p.callback = function () { | |
| ee(c); | |
| Fe(a, b); | |
| }; | |
| return p; | |
| } | |
| function sf(a, b, p) { | |
| p = oe(p); | |
| p.tag = Qi; | |
| var c = a.type.getDerivedStateFromError; | |
| if ("function" === typeof c) { | |
| var e = b.value; | |
| p.payload = function () { | |
| return c(e); | |
| }; | |
| } | |
| var g = a.stateNode; | |
| null !== g && | |
| "function" === typeof g.componentDidCatch && | |
| (p.callback = function () { | |
| "function" !== typeof c && | |
| (null === Rh ? (Rh = new Set([this])) : Rh.add(this)); | |
| var p = b.value, | |
| e = b.stack; | |
| Fe(a, b); | |
| this.componentDidCatch(p, { componentStack: null !== e ? e : "" }); | |
| }); | |
| return p; | |
| } | |
| function zg(a) { | |
| switch (a.tag) { | |
| case 1: | |
| Ib(a.type) && ob(a); | |
| var b = a.effectTag; | |
| return b & 2048 ? ((a.effectTag = (b & -2049) | 64), a) : null; | |
| case 3: | |
| return ( | |
| Kb(a), | |
| Qb(a), | |
| (b = a.effectTag), | |
| 0 !== (b & 64) ? t("285") : void 0, | |
| (a.effectTag = (b & -2049) | 64), | |
| a | |
| ); | |
| case 5: | |
| return wc(a), null; | |
| case 13: | |
| return ( | |
| (b = a.effectTag), | |
| b & 2048 ? ((a.effectTag = (b & -2049) | 64), a) : null | |
| ); | |
| case 18: | |
| return null; | |
| case 4: | |
| return Kb(a), null; | |
| case 10: | |
| return Pe(a), null; | |
| default: | |
| return null; | |
| } | |
| } | |
| function Sc() { | |
| if (null !== Md) | |
| for (var a = Md.return; null !== a; ) { | |
| var b = a; | |
| switch (b.tag) { | |
| case 1: | |
| var p = b.type.childContextTypes; | |
| null !== p && void 0 !== p && ob(b); | |
| break; | |
| case 3: | |
| Kb(b); | |
| Qb(b); | |
| break; | |
| case 5: | |
| wc(b); | |
| break; | |
| case 4: | |
| Kb(b); | |
| break; | |
| case 10: | |
| Pe(b); | |
| } | |
| a = a.return; | |
| } | |
| kg = null; | |
| Kf = 0; | |
| Sh = -1; | |
| Ri = !1; | |
| Md = null; | |
| } | |
| function Vd() { | |
| for (; null !== Ab; ) { | |
| var a = Ab.effectTag; | |
| a & 16 && Tb(Ab.stateNode, ""); | |
| if (a & 128) { | |
| var b = Ab.alternate; | |
| null !== b && | |
| ((b = b.ref), | |
| null !== b && | |
| ("function" === typeof b ? b(null) : (b.current = null))); | |
| } | |
| switch (a & 14) { | |
| case 2: | |
| ef(Ab); | |
| Ab.effectTag &= -3; | |
| break; | |
| case 6: | |
| ef(Ab); | |
| Ab.effectTag &= -3; | |
| le(Ab.alternate, Ab); | |
| break; | |
| case 4: | |
| le(Ab.alternate, Ab); | |
| break; | |
| case 8: | |
| (a = Ab), | |
| Zf(a), | |
| (a.return = null), | |
| (a.child = null), | |
| (a.memoizedState = null), | |
| (a.updateQueue = null), | |
| (a = a.alternate), | |
| null !== a && | |
| ((a.return = null), | |
| (a.child = null), | |
| (a.memoizedState = null), | |
| (a.updateQueue = null)); | |
| } | |
| Ab = Ab.nextEffect; | |
| } | |
| } | |
| function Qe() { | |
| for (; null !== Ab; ) { | |
| if (Ab.effectTag & 256) | |
| a: { | |
| var a = Ab.alternate, | |
| b = Ab; | |
| switch (b.tag) { | |
| case 0: | |
| case 11: | |
| case 15: | |
| Ge(qd, bc, b); | |
| break a; | |
| case 1: | |
| if (b.effectTag & 256 && null !== a) { | |
| var p = a.memoizedProps, | |
| c = a.memoizedState; | |
| a = b.stateNode; | |
| b = a.getSnapshotBeforeUpdate( | |
| b.elementType === b.type ? p : eb(b.type, p), | |
| c | |
| ); | |
| a.__reactInternalSnapshotBeforeUpdate = b; | |
| } | |
| break a; | |
| case 3: | |
| case 5: | |
| case 6: | |
| case 4: | |
| case 17: | |
| break a; | |
| default: | |
| t("163"); | |
| } | |
| } | |
| Ab = Ab.nextEffect; | |
| } | |
| } | |
| function tf(a, b) { | |
| for (; null !== Ab; ) { | |
| var c = Ab.effectTag; | |
| if (c & 36) { | |
| var e = Ab.alternate, | |
| g = Ab, | |
| d = b; | |
| switch (g.tag) { | |
| case 0: | |
| case 11: | |
| case 15: | |
| Ge(p, S, g); | |
| break; | |
| case 1: | |
| var l = g.stateNode; | |
| if (g.effectTag & 4) | |
| if (null === e) l.componentDidMount(); | |
| else { | |
| var h = | |
| g.elementType === g.type | |
| ? e.memoizedProps | |
| : eb(g.type, e.memoizedProps); | |
| l.componentDidUpdate( | |
| h, | |
| e.memoizedState, | |
| l.__reactInternalSnapshotBeforeUpdate | |
| ); | |
| } | |
| e = g.updateQueue; | |
| null !== e && R(g, e, l, d); | |
| break; | |
| case 3: | |
| e = g.updateQueue; | |
| if (null !== e) { | |
| l = null; | |
| if (null !== g.child) | |
| switch (g.child.tag) { | |
| case 5: | |
| l = g.child.stateNode; | |
| break; | |
| case 1: | |
| l = g.child.stateNode; | |
| } | |
| R(g, e, l, d); | |
| } | |
| break; | |
| case 5: | |
| d = g.stateNode; | |
| null === e && | |
| g.effectTag & 4 && | |
| Xb(g.type, g.memoizedProps) && | |
| d.focus(); | |
| break; | |
| case 6: | |
| break; | |
| case 4: | |
| break; | |
| case 12: | |
| break; | |
| case 13: | |
| break; | |
| case 17: | |
| break; | |
| default: | |
| t("163"); | |
| } | |
| } | |
| c & 128 && | |
| ((g = Ab.ref), | |
| null !== g && | |
| ((d = Ab.stateNode), | |
| "function" === typeof g ? g(d) : (g.current = d))); | |
| c & 512 && (hj = a); | |
| Ab = Ab.nextEffect; | |
| } | |
| } | |
| function Lf(a, b) { | |
| Si = Fi = hj = null; | |
| var p = Re; | |
| Re = !0; | |
| do { | |
| if (b.effectTag & 512) { | |
| var c = !1, | |
| e = void 0; | |
| try { | |
| var g = b; | |
| Ge(rd, bc, g); | |
| Ge(bc, Se, g); | |
| } catch (Bi) { | |
| (c = !0), (e = Bi); | |
| } | |
| c && de(b, e); | |
| } | |
| b = b.nextEffect; | |
| } while (null !== b); | |
| Re = p; | |
| p = a.expirationTime; | |
| 0 !== p && Ag(a, p); | |
| ff || Re || hc(1073741823, !1); | |
| } | |
| function Jc() { | |
| null !== Fi && Th(Fi); | |
| null !== Si && Si(); | |
| } | |
| function Te(a, b) { | |
| re = Uh = !0; | |
| a.current === b ? t("177") : void 0; | |
| var p = a.pendingCommitExpirationTime; | |
| 0 === p ? t("261") : void 0; | |
| a.pendingCommitExpirationTime = 0; | |
| var c = b.expirationTime, | |
| e = b.childExpirationTime; | |
| md(a, e > c ? e : c); | |
| Vh.current = null; | |
| c = void 0; | |
| 1 < b.effectTag | |
| ? null !== b.lastEffect | |
| ? ((b.lastEffect.nextEffect = b), (c = b.firstEffect)) | |
| : (c = b) | |
| : (c = b.firstEffect); | |
| ch = Df; | |
| Mf = yb(); | |
| Df = !1; | |
| for (Ab = c; null !== Ab; ) { | |
| e = !1; | |
| var g = void 0; | |
| try { | |
| Qe(); | |
| } catch (Tg) { | |
| (e = !0), (g = Tg); | |
| } | |
| e && | |
| (null === Ab ? t("178") : void 0, | |
| de(Ab, g), | |
| null !== Ab && (Ab = Ab.nextEffect)); | |
| } | |
| for (Ab = c; null !== Ab; ) { | |
| e = !1; | |
| g = void 0; | |
| try { | |
| Vd(); | |
| } catch (Tg) { | |
| (e = !0), (g = Tg); | |
| } | |
| e && | |
| (null === Ab ? t("178") : void 0, | |
| de(Ab, g), | |
| null !== Ab && (Ab = Ab.nextEffect)); | |
| } | |
| Gb(Mf); | |
| Mf = null; | |
| Df = !!ch; | |
| ch = null; | |
| a.current = b; | |
| for (Ab = c; null !== Ab; ) { | |
| e = !1; | |
| g = void 0; | |
| try { | |
| tf(a, p); | |
| } catch (Tg) { | |
| (e = !0), (g = Tg); | |
| } | |
| e && | |
| (null === Ab ? t("178") : void 0, | |
| de(Ab, g), | |
| null !== Ab && (Ab = Ab.nextEffect)); | |
| } | |
| if (null !== c && null !== hj) { | |
| var d = Lf.bind(null, a, c); | |
| Fi = jd.unstable_runWithPriority(jd.unstable_NormalPriority, function () { | |
| return se(d); | |
| }); | |
| Si = d; | |
| } | |
| Uh = re = !1; | |
| "function" === typeof Yg && Yg(b.stateNode); | |
| p = b.expirationTime; | |
| b = b.childExpirationTime; | |
| b = b > p ? b : p; | |
| 0 === b && (Rh = null); | |
| oc(a, b); | |
| } | |
| function Nf(a) { | |
| for (;;) { | |
| var b = a.alternate, | |
| p = a.return, | |
| c = a.sibling; | |
| if (0 === (a.effectTag & 1024)) { | |
| Md = a; | |
| a: { | |
| var e = b; | |
| b = a; | |
| var g = Kf, | |
| d = b.pendingProps; | |
| switch (b.tag) { | |
| case 2: | |
| break; | |
| case 16: | |
| break; | |
| case 15: | |
| case 0: | |
| break; | |
| case 1: | |
| Ib(b.type) && ob(b); | |
| break; | |
| case 3: | |
| Kb(b); | |
| Qb(b); | |
| d = b.stateNode; | |
| d.pendingContext && | |
| ((d.context = d.pendingContext), (d.pendingContext = null)); | |
| if (null === e || null === e.child) Oc(b), (b.effectTag &= -3); | |
| Gi(b); | |
| break; | |
| case 5: | |
| wc(b); | |
| var l = yc(dd.current); | |
| g = b.type; | |
| if (null !== e && null != b.stateNode) | |
| Ti(e, b, g, d, l), e.ref !== b.ref && (b.effectTag |= 128); | |
| else if (d) { | |
| var h = yc(db.current); | |
| if (Oc(b)) { | |
| d = b; | |
| e = d.stateNode; | |
| var k = d.type, | |
| n = d.memoizedProps, | |
| v = l; | |
| e[Je] = d; | |
| e[Eh] = n; | |
| g = void 0; | |
| l = k; | |
| switch (l) { | |
| case "iframe": | |
| case "object": | |
| vb("load", e); | |
| break; | |
| case "video": | |
| case "audio": | |
| for (k = 0; k < Jg.length; k++) vb(Jg[k], e); | |
| break; | |
| case "source": | |
| vb("error", e); | |
| break; | |
| case "img": | |
| case "image": | |
| case "link": | |
| vb("error", e); | |
| vb("load", e); | |
| break; | |
| case "form": | |
| vb("reset", e); | |
| vb("submit", e); | |
| break; | |
| case "details": | |
| vb("toggle", e); | |
| break; | |
| case "input": | |
| cc(e, n); | |
| vb("invalid", e); | |
| nc(v, "onChange"); | |
| break; | |
| case "select": | |
| e._wrapperState = { wasMultiple: !!n.multiple }; | |
| vb("invalid", e); | |
| nc(v, "onChange"); | |
| break; | |
| case "textarea": | |
| ba(e, n), vb("invalid", e), nc(v, "onChange"); | |
| } | |
| Nb(l, n); | |
| k = null; | |
| for (g in n) | |
| n.hasOwnProperty(g) && | |
| ((h = n[g]), | |
| "children" === g | |
| ? "string" === typeof h | |
| ? e.textContent !== h && (k = ["children", h]) | |
| : "number" === typeof h && | |
| e.textContent !== "" + h && | |
| (k = ["children", "" + h]) | |
| : nf.hasOwnProperty(g) && null != h && nc(v, g)); | |
| switch (l) { | |
| case "input": | |
| ea(e); | |
| jb(e, n, !0); | |
| break; | |
| case "textarea": | |
| ea(e); | |
| Pb(e, n); | |
| break; | |
| case "select": | |
| case "option": | |
| break; | |
| default: | |
| "function" === typeof n.onClick && (e.onclick = ad); | |
| } | |
| g = k; | |
| d.updateQueue = g; | |
| if ((d = null !== g ? !0 : !1)) b.effectTag |= 4; | |
| } else { | |
| n = b; | |
| e = g; | |
| v = d; | |
| k = 9 === l.nodeType ? l : l.ownerDocument; | |
| h === lg.html && (h = xb(e)); | |
| h === lg.html | |
| ? "script" === e | |
| ? ((e = k.createElement("div")), | |
| (e.innerHTML = "\x3cscript\x3e\x3c/script\x3e"), | |
| (k = e.removeChild(e.firstChild))) | |
| : "string" === typeof v.is | |
| ? (k = k.createElement(e, { is: v.is })) | |
| : ((k = k.createElement(e)), | |
| "select" === e && v.multiple && (k.multiple = !0)) | |
| : (k = k.createElementNS(h, e)); | |
| e = k; | |
| e[Je] = n; | |
| e[Eh] = d; | |
| Ui(e, b, !1, !1); | |
| v = e; | |
| k = g; | |
| n = d; | |
| var S = l, | |
| x = Hb(k, n); | |
| switch (k) { | |
| case "iframe": | |
| case "object": | |
| vb("load", v); | |
| l = n; | |
| break; | |
| case "video": | |
| case "audio": | |
| for (l = 0; l < Jg.length; l++) vb(Jg[l], v); | |
| l = n; | |
| break; | |
| case "source": | |
| vb("error", v); | |
| l = n; | |
| break; | |
| case "img": | |
| case "image": | |
| case "link": | |
| vb("error", v); | |
| vb("load", v); | |
| l = n; | |
| break; | |
| case "form": | |
| vb("reset", v); | |
| vb("submit", v); | |
| l = n; | |
| break; | |
| case "details": | |
| vb("toggle", v); | |
| l = n; | |
| break; | |
| case "input": | |
| cc(v, n); | |
| l = fb(v, n); | |
| vb("invalid", v); | |
| nc(S, "onChange"); | |
| break; | |
| case "option": | |
| l = wb(v, n); | |
| break; | |
| case "select": | |
| v._wrapperState = { wasMultiple: !!n.multiple }; | |
| l = Jd({}, n, { value: void 0 }); | |
| vb("invalid", v); | |
| nc(S, "onChange"); | |
| break; | |
| case "textarea": | |
| ba(v, n); | |
| l = zd(v, n); | |
| vb("invalid", v); | |
| nc(S, "onChange"); | |
| break; | |
| default: | |
| l = n; | |
| } | |
| Nb(k, l); | |
| h = void 0; | |
| var q = k, | |
| f = v, | |
| w = l; | |
| for (h in w) | |
| if (w.hasOwnProperty(h)) { | |
| var u = w[h]; | |
| "style" === h | |
| ? ib(f, u) | |
| : "dangerouslySetInnerHTML" === h | |
| ? ((u = u ? u.__html : void 0), null != u && he(f, u)) | |
| : "children" === h | |
| ? "string" === typeof u | |
| ? ("textarea" !== q || "" !== u) && Tb(f, u) | |
| : "number" === typeof u && Tb(f, "" + u) | |
| : "suppressContentEditableWarning" !== h && | |
| "suppressHydrationWarning" !== h && | |
| "autoFocus" !== h && | |
| (nf.hasOwnProperty(h) | |
| ? null != u && nc(S, h) | |
| : null != u && va(f, h, u, x)); | |
| } | |
| switch (k) { | |
| case "input": | |
| ea(v); | |
| jb(v, n, !1); | |
| break; | |
| case "textarea": | |
| ea(v); | |
| Pb(v, n); | |
| break; | |
| case "option": | |
| null != n.value && | |
| v.setAttribute("value", "" + la(n.value)); | |
| break; | |
| case "select": | |
| l = v; | |
| l.multiple = !!n.multiple; | |
| v = n.value; | |
| null != v | |
| ? Cc(l, !!n.multiple, v, !1) | |
| : null != n.defaultValue && | |
| Cc(l, !!n.multiple, n.defaultValue, !0); | |
| break; | |
| default: | |
| "function" === typeof l.onClick && (v.onclick = ad); | |
| } | |
| Xb(g, d) && (b.effectTag |= 4); | |
| b.stateNode = e; | |
| } | |
| null !== b.ref && (b.effectTag |= 128); | |
| } else null === b.stateNode ? t("166") : void 0; | |
| break; | |
| case 6: | |
| e && null != b.stateNode | |
| ? ij(e, b, e.memoizedProps, d) | |
| : ("string" !== typeof d && | |
| (null === b.stateNode ? t("166") : void 0), | |
| (e = yc(dd.current)), | |
| yc(db.current), | |
| Oc(b) | |
| ? ((d = b), | |
| (g = d.stateNode), | |
| (e = d.memoizedProps), | |
| (g[Je] = d), | |
| g.nodeValue !== e && (b.effectTag |= 4)) | |
| : ((g = b), | |
| (d = (9 === e.nodeType | |
| ? e | |
| : e.ownerDocument | |
| ).createTextNode(d)), | |
| (d[Je] = b), | |
| (g.stateNode = d))); | |
| break; | |
| case 11: | |
| break; | |
| case 13: | |
| d = b.memoizedState; | |
| if (0 !== (b.effectTag & 64)) { | |
| b.expirationTime = g; | |
| Md = b; | |
| break a; | |
| } | |
| d = null !== d; | |
| g = null !== e && null !== e.memoizedState; | |
| null !== e && | |
| !d && | |
| g && | |
| ((e = e.child.sibling), | |
| null !== e && | |
| ((l = b.firstEffect), | |
| null !== l | |
| ? ((b.firstEffect = e), (e.nextEffect = l)) | |
| : ((b.firstEffect = b.lastEffect = e), | |
| (e.nextEffect = null)), | |
| (e.effectTag = 8))); | |
| if (d || g) b.effectTag |= 4; | |
| break; | |
| case 7: | |
| break; | |
| case 8: | |
| break; | |
| case 12: | |
| break; | |
| case 4: | |
| Kb(b); | |
| Gi(b); | |
| break; | |
| case 10: | |
| Pe(b); | |
| break; | |
| case 9: | |
| break; | |
| case 14: | |
| break; | |
| case 17: | |
| Ib(b.type) && ob(b); | |
| break; | |
| case 18: | |
| break; | |
| default: | |
| t("156"); | |
| } | |
| Md = null; | |
| } | |
| b = a; | |
| if (1 === Kf || 1 !== b.childExpirationTime) { | |
| d = 0; | |
| for (g = b.child; null !== g; ) | |
| (e = g.expirationTime), | |
| (l = g.childExpirationTime), | |
| e > d && (d = e), | |
| l > d && (d = l), | |
| (g = g.sibling); | |
| b.childExpirationTime = d; | |
| } | |
| if (null !== Md) return Md; | |
| null !== p && | |
| 0 === (p.effectTag & 1024) && | |
| (null === p.firstEffect && (p.firstEffect = a.firstEffect), | |
| null !== a.lastEffect && | |
| (null !== p.lastEffect && (p.lastEffect.nextEffect = a.firstEffect), | |
| (p.lastEffect = a.lastEffect)), | |
| 1 < a.effectTag && | |
| (null !== p.lastEffect | |
| ? (p.lastEffect.nextEffect = a) | |
| : (p.firstEffect = a), | |
| (p.lastEffect = a))); | |
| } else { | |
| a = zg(a, Kf); | |
| if (null !== a) return (a.effectTag &= 1023), a; | |
| null !== p && | |
| ((p.firstEffect = p.lastEffect = null), (p.effectTag |= 1024)); | |
| } | |
| if (null !== c) return c; | |
| if (null !== p) a = p; | |
| else break; | |
| } | |
| return null; | |
| } | |
| function Uc(a) { | |
| var b = bf(a.alternate, a, Kf); | |
| a.memoizedProps = a.pendingProps; | |
| null === b && (b = Nf(a)); | |
| Vh.current = null; | |
| return b; | |
| } | |
| function uf(a, b) { | |
| Uh ? t("243") : void 0; | |
| Jc(); | |
| Uh = !0; | |
| var p = Hi.current; | |
| Hi.current = ej; | |
| var c = a.nextExpirationTimeToWorkOn; | |
| if (c !== Kf || a !== kg || null === Md) | |
| Sc(), | |
| (kg = a), | |
| (Kf = c), | |
| (Md = mb(kg.current, null, Kf)), | |
| (a.pendingCommitExpirationTime = 0); | |
| var e = !1; | |
| do { | |
| try { | |
| if (b) for (; null !== Md && !vf(); ) Md = Uc(Md); | |
| else for (; null !== Md; ) Md = Uc(Md); | |
| } catch (dj) { | |
| if (((ci = vh = vi = null), zc(), null === Md)) (e = !0), ee(dj); | |
| else { | |
| null === Md ? t("271") : void 0; | |
| var g = Md, | |
| d = g.return; | |
| if (null === d) (e = !0), ee(dj); | |
| else { | |
| a: { | |
| var l = a, | |
| h = d, | |
| k = g, | |
| n = dj; | |
| d = Kf; | |
| k.effectTag |= 1024; | |
| k.firstEffect = k.lastEffect = null; | |
| if ( | |
| null !== n && | |
| "object" === typeof n && | |
| "function" === typeof n.then | |
| ) { | |
| var v = n; | |
| n = h; | |
| var S = -1, | |
| x = -1; | |
| do { | |
| if (13 === n.tag) { | |
| var u = n.alternate; | |
| if (null !== u && ((u = u.memoizedState), null !== u)) { | |
| x = 10 * (1073741822 - u.timedOutAt); | |
| break; | |
| } | |
| u = n.pendingProps.maxDuration; | |
| if ("number" === typeof u) | |
| if (0 >= u) S = 0; | |
| else if (-1 === S || u < S) S = u; | |
| } | |
| n = n.return; | |
| } while (null !== n); | |
| n = h; | |
| do { | |
| if ((u = 13 === n.tag)) | |
| u = | |
| void 0 === n.memoizedProps.fallback | |
| ? !1 | |
| : null === n.memoizedState; | |
| if (u) { | |
| h = n.updateQueue; | |
| null === h | |
| ? ((h = new Set()), h.add(v), (n.updateQueue = h)) | |
| : h.add(v); | |
| if (0 === (n.mode & 1)) { | |
| n.effectTag |= 64; | |
| k.effectTag &= -1957; | |
| 1 === k.tag && | |
| (null === k.alternate | |
| ? (k.tag = 17) | |
| : ((d = oe(1073741823)), (d.tag = Nh), ce(k, d))); | |
| k.expirationTime = 1073741823; | |
| break a; | |
| } | |
| k = l; | |
| h = d; | |
| var f = k.pingCache; | |
| null === f | |
| ? ((f = k.pingCache = new Vi()), | |
| (u = new Set()), | |
| f.set(v, u)) | |
| : ((u = f.get(v)), | |
| void 0 === u && ((u = new Set()), f.set(v, u))); | |
| u.has(h) || | |
| (u.add(h), (k = te.bind(null, k, v, h)), v.then(k, k)); | |
| -1 === S | |
| ? (l = 1073741823) | |
| : (-1 === x && (x = 10 * (1073741822 - Cb(l, d)) - 5e3), | |
| (l = x + S)); | |
| 0 <= l && Sh < l && (Sh = l); | |
| n.effectTag |= 2048; | |
| n.expirationTime = d; | |
| break a; | |
| } | |
| n = n.return; | |
| } while (null !== n); | |
| n = Error( | |
| (pa(k.type) || "A React component") + | |
| " suspended while rendering, but no fallback UI was specified.\n\nAdd a \x3cSuspense fallback\x3d...\x3e component higher in the tree to provide a loading indicator or placeholder to display." + | |
| Aa(k) | |
| ); | |
| } | |
| Ri = !0; | |
| n = qe(n, k); | |
| l = h; | |
| do { | |
| switch (l.tag) { | |
| case 3: | |
| l.effectTag |= 2048; | |
| l.expirationTime = d; | |
| d = id(l, n, d); | |
| df(l, d); | |
| break a; | |
| case 1: | |
| if ( | |
| ((S = n), | |
| (x = l.type), | |
| (k = l.stateNode), | |
| 0 === (l.effectTag & 64) && | |
| ("function" === typeof x.getDerivedStateFromError || | |
| (null !== k && | |
| "function" === typeof k.componentDidCatch && | |
| (null === Rh || !Rh.has(k))))) | |
| ) { | |
| l.effectTag |= 2048; | |
| l.expirationTime = d; | |
| d = sf(l, S, d); | |
| df(l, d); | |
| break a; | |
| } | |
| } | |
| l = l.return; | |
| } while (null !== l); | |
| } | |
| Md = Nf(g); | |
| continue; | |
| } | |
| } | |
| } | |
| break; | |
| } while (1); | |
| Uh = !1; | |
| Hi.current = p; | |
| ci = vh = vi = null; | |
| zc(); | |
| if (e) (kg = null), (a.finishedWork = null); | |
| else if (null !== Md) a.finishedWork = null; | |
| else { | |
| p = a.current.alternate; | |
| null === p ? t("281") : void 0; | |
| kg = null; | |
| if (Ri) { | |
| e = a.latestPendingTime; | |
| g = a.latestSuspendedTime; | |
| d = a.latestPingedTime; | |
| if ((0 !== e && e < c) || (0 !== g && g < c) || (0 !== d && d < c)) { | |
| Ba(a, c); | |
| Ue(a, p, c, a.expirationTime, -1); | |
| return; | |
| } | |
| if (!a.didError && b) { | |
| a.didError = !0; | |
| c = a.nextExpirationTimeToWorkOn = c; | |
| b = a.expirationTime = 1073741823; | |
| Ue(a, p, c, b, -1); | |
| return; | |
| } | |
| } | |
| b && -1 !== Sh | |
| ? (Ba(a, c), | |
| (b = 10 * (1073741822 - Cb(a, c))), | |
| b < Sh && (Sh = b), | |
| (b = 10 * (1073741822 - Td())), | |
| (b = Sh - b), | |
| Ue(a, p, c, a.expirationTime, 0 > b ? 0 : b)) | |
| : ((a.pendingCommitExpirationTime = c), (a.finishedWork = p)); | |
| } | |
| } | |
| function de(a, b) { | |
| for (var p = a.return; null !== p; ) { | |
| switch (p.tag) { | |
| case 1: | |
| var c = p.stateNode; | |
| if ( | |
| "function" === typeof p.type.getDerivedStateFromError || | |
| ("function" === typeof c.componentDidCatch && | |
| (null === Rh || !Rh.has(c))) | |
| ) { | |
| a = qe(b, a); | |
| a = sf(p, a, 1073741823); | |
| ce(p, a); | |
| Gf(p, 1073741823); | |
| return; | |
| } | |
| break; | |
| case 3: | |
| a = qe(b, a); | |
| a = id(p, a, 1073741823); | |
| ce(p, a); | |
| Gf(p, 1073741823); | |
| return; | |
| } | |
| p = p.return; | |
| } | |
| 3 === a.tag && | |
| ((p = qe(b, a)), (p = id(a, p, 1073741823)), ce(a, p), Gf(a, 1073741823)); | |
| } | |
| function Tc(a, b) { | |
| var p = jd.unstable_getCurrentPriorityLevel(), | |
| c = void 0; | |
| if (0 === (b.mode & 1)) c = 1073741823; | |
| else if (Uh && !re) c = Kf; | |
| else { | |
| switch (p) { | |
| case jd.unstable_ImmediatePriority: | |
| c = 1073741823; | |
| break; | |
| case jd.unstable_UserBlockingPriority: | |
| c = 1073741822 - 10 * ((((1073741822 - a + 15) / 10) | 0) + 1); | |
| break; | |
| case jd.unstable_NormalPriority: | |
| c = 1073741822 - 25 * ((((1073741822 - a + 500) / 25) | 0) + 1); | |
| break; | |
| case jd.unstable_LowPriority: | |
| case jd.unstable_IdlePriority: | |
| c = 1; | |
| break; | |
| default: | |
| t("313"); | |
| } | |
| null !== kg && c === Kf && --c; | |
| } | |
| p === jd.unstable_UserBlockingPriority && (0 === wh || c < wh) && (wh = c); | |
| return c; | |
| } | |
| function te(a, b, p) { | |
| var c = a.pingCache; | |
| null !== c && c.delete(b); | |
| if (null !== kg && Kf === p) kg = null; | |
| else if ( | |
| ((b = a.earliestSuspendedTime), | |
| (c = a.latestSuspendedTime), | |
| 0 !== b && p <= b && p >= c) | |
| ) { | |
| a.didError = !1; | |
| b = a.latestPingedTime; | |
| if (0 === b || b > p) a.latestPingedTime = p; | |
| Fb(p, a); | |
| p = a.expirationTime; | |
| 0 !== p && Ag(a, p); | |
| } | |
| } | |
| function Lg(a, b) { | |
| var p = a.stateNode; | |
| null !== p && p.delete(b); | |
| b = Td(); | |
| b = Tc(b, a); | |
| a = Nd(a, b); | |
| null !== a && (Jb(a, b), (b = a.expirationTime), 0 !== b && Ag(a, b)); | |
| } | |
| function Nd(a, b) { | |
| a.expirationTime < b && (a.expirationTime = b); | |
| var p = a.alternate; | |
| null !== p && p.expirationTime < b && (p.expirationTime = b); | |
| var c = a.return, | |
| e = null; | |
| if (null === c && 3 === a.tag) e = a.stateNode; | |
| else | |
| for (; null !== c; ) { | |
| p = c.alternate; | |
| c.childExpirationTime < b && (c.childExpirationTime = b); | |
| null !== p && p.childExpirationTime < b && (p.childExpirationTime = b); | |
| if (null === c.return && 3 === c.tag) { | |
| e = c.stateNode; | |
| break; | |
| } | |
| c = c.return; | |
| } | |
| return e; | |
| } | |
| function Gf(a, b) { | |
| a = Nd(a, b); | |
| null !== a && | |
| (!Uh && 0 !== Kf && b > Kf && Sc(), | |
| Jb(a, b), | |
| (Uh && !re && kg === a) || Ag(a, a.expirationTime), | |
| Ii > jj && ((Ii = 0), t("185"))); | |
| } | |
| function sd(a, b, p, c, e) { | |
| return jd.unstable_runWithPriority( | |
| jd.unstable_ImmediatePriority, | |
| function () { | |
| return a(b, p, c, e); | |
| } | |
| ); | |
| } | |
| function ic() { | |
| Mg = 1073741822 - (((jd.unstable_now() - Wi) / 10) | 0); | |
| } | |
| function Ng(a, b) { | |
| if (0 !== Xi) { | |
| if (b < Xi) return; | |
| null !== wi && jd.unstable_cancelCallback(wi); | |
| } | |
| Xi = b; | |
| a = jd.unstable_now() - Wi; | |
| wi = jd.unstable_scheduleCallback(wf, { | |
| timeout: 10 * (1073741822 - b) - a, | |
| }); | |
| } | |
| function Ue(a, b, p, c, e) { | |
| a.expirationTime = c; | |
| 0 !== e || vf() | |
| ? 0 < e && (a.timeoutHandle = $f(Og.bind(null, a, b, p), e)) | |
| : ((a.pendingCommitExpirationTime = p), (a.finishedWork = b)); | |
| } | |
| function Og(a, b, p) { | |
| a.pendingCommitExpirationTime = p; | |
| a.finishedWork = b; | |
| ic(); | |
| xi = Mg; | |
| Vc(a, p); | |
| } | |
| function oc(a, b) { | |
| a.expirationTime = b; | |
| a.finishedWork = null; | |
| } | |
| function Td() { | |
| if (Re) return xi; | |
| gf(); | |
| if (0 === Od || 1 === Od) ic(), (xi = Mg); | |
| return xi; | |
| } | |
| function Ag(a, b) { | |
| null === a.nextScheduledRoot | |
| ? ((a.expirationTime = b), | |
| null === Of | |
| ? ((dh = Of = a), (a.nextScheduledRoot = a)) | |
| : ((Of = Of.nextScheduledRoot = a), (Of.nextScheduledRoot = dh))) | |
| : b > a.expirationTime && (a.expirationTime = b); | |
| Re || | |
| (ff | |
| ? xh && ((eh = a), (Od = 1073741823), xf(a, 1073741823, !1)) | |
| : 1073741823 === b | |
| ? hc(1073741823, !1) | |
| : Ng(a, b)); | |
| } | |
| function gf() { | |
| var a = 0, | |
| b = null; | |
| if (null !== Of) | |
| for (var p = Of, c = dh; null !== c; ) { | |
| var e = c.expirationTime; | |
| if (0 === e) { | |
| null === p || null === Of ? t("244") : void 0; | |
| if (c === c.nextScheduledRoot) { | |
| dh = Of = c.nextScheduledRoot = null; | |
| break; | |
| } else if (c === dh) | |
| (dh = e = c.nextScheduledRoot), | |
| (Of.nextScheduledRoot = e), | |
| (c.nextScheduledRoot = null); | |
| else if (c === Of) { | |
| Of = p; | |
| Of.nextScheduledRoot = dh; | |
| c.nextScheduledRoot = null; | |
| break; | |
| } else | |
| (p.nextScheduledRoot = c.nextScheduledRoot), | |
| (c.nextScheduledRoot = null); | |
| c = p.nextScheduledRoot; | |
| } else { | |
| e > a && ((a = e), (b = c)); | |
| if (c === Of) break; | |
| if (1073741823 === a) break; | |
| p = c; | |
| c = c.nextScheduledRoot; | |
| } | |
| } | |
| eh = b; | |
| Od = a; | |
| } | |
| function vf() { | |
| return Ji ? !0 : jd.unstable_shouldYield() ? (Ji = !0) : !1; | |
| } | |
| function wf() { | |
| try { | |
| if (!vf() && null !== dh) { | |
| ic(); | |
| var a = dh; | |
| do { | |
| var b = a.expirationTime; | |
| 0 !== b && Mg <= b && (a.nextExpirationTimeToWorkOn = Mg); | |
| a = a.nextScheduledRoot; | |
| } while (a !== dh); | |
| } | |
| hc(0, !0); | |
| } finally { | |
| Ji = !1; | |
| } | |
| } | |
| function hc(a, b) { | |
| gf(); | |
| if (b) | |
| for ( | |
| ic(), xi = Mg; | |
| null !== eh && 0 !== Od && a <= Od && !(Ji && Mg > Od); | |
| ) | |
| xf(eh, Od, Mg > Od), gf(), ic(), (xi = Mg); | |
| else for (; null !== eh && 0 !== Od && a <= Od; ) xf(eh, Od, !1), gf(); | |
| b && ((Xi = 0), (wi = null)); | |
| 0 !== Od && Ng(eh, Od); | |
| Ii = 0; | |
| Yi = null; | |
| if (null !== yf) | |
| for (a = yf, yf = null, b = 0; b < a.length; b++) { | |
| var p = a[b]; | |
| try { | |
| p._onComplete(); | |
| } catch (pi) { | |
| ei || ((ei = !0), (Ki = pi)); | |
| } | |
| } | |
| if (ei) throw ((a = Ki), (Ki = null), (ei = !1), a); | |
| } | |
| function Vc(a, b) { | |
| Re ? t("253") : void 0; | |
| eh = a; | |
| Od = b; | |
| xf(a, b, !1); | |
| hc(1073741823, !1); | |
| } | |
| function xf(a, b, p) { | |
| Re ? t("245") : void 0; | |
| Re = !0; | |
| if (p) { | |
| var c = a.finishedWork; | |
| null !== c | |
| ? Ve(a, c, b) | |
| : ((a.finishedWork = null), | |
| (c = a.timeoutHandle), | |
| -1 !== c && ((a.timeoutHandle = -1), sc(c)), | |
| uf(a, p), | |
| (c = a.finishedWork), | |
| null !== c && (vf() ? (a.finishedWork = c) : Ve(a, c, b))); | |
| } else | |
| (c = a.finishedWork), | |
| null !== c | |
| ? Ve(a, c, b) | |
| : ((a.finishedWork = null), | |
| (c = a.timeoutHandle), | |
| -1 !== c && ((a.timeoutHandle = -1), sc(c)), | |
| uf(a, p), | |
| (c = a.finishedWork), | |
| null !== c && Ve(a, c, b)); | |
| Re = !1; | |
| } | |
| function Ve(a, b, p) { | |
| var c = a.firstBatch; | |
| null !== c && | |
| c._expirationTime >= p && | |
| (null === yf ? (yf = [c]) : yf.push(c), c._defer) | |
| ? ((a.finishedWork = b), (a.expirationTime = 0)) | |
| : ((a.finishedWork = null), | |
| a === Yi ? Ii++ : ((Yi = a), (Ii = 0)), | |
| jd.unstable_runWithPriority(jd.unstable_ImmediatePriority, function () { | |
| Te(a, b); | |
| })); | |
| } | |
| function ee(a) { | |
| null === eh ? t("246") : void 0; | |
| eh.expirationTime = 0; | |
| ei || ((ei = !0), (Ki = a)); | |
| } | |
| function Pd(a, b) { | |
| var p = ff; | |
| ff = !0; | |
| try { | |
| return a(b); | |
| } finally { | |
| (ff = p) || Re || hc(1073741823, !1); | |
| } | |
| } | |
| function zf(a, b) { | |
| if (ff && !xh) { | |
| xh = !0; | |
| try { | |
| return a(b); | |
| } finally { | |
| xh = !1; | |
| } | |
| } | |
| return a(b); | |
| } | |
| function Wh(a, b, p) { | |
| ff || Re || 0 === wh || (hc(wh, !1), (wh = 0)); | |
| var c = ff; | |
| ff = !0; | |
| try { | |
| return jd.unstable_runWithPriority( | |
| jd.unstable_UserBlockingPriority, | |
| function () { | |
| return a(b, p); | |
| } | |
| ); | |
| } finally { | |
| (ff = c) || Re || hc(1073741823, !1); | |
| } | |
| } | |
| function hf(a, b, p, c, e) { | |
| var g = b.current; | |
| a: if (p) { | |
| p = p._reactInternalFiber; | |
| b: { | |
| 2 === kb(p) && 1 === p.tag ? void 0 : t("170"); | |
| var d = p; | |
| do { | |
| switch (d.tag) { | |
| case 3: | |
| d = d.stateNode.context; | |
| break b; | |
| case 1: | |
| if (Ib(d.type)) { | |
| d = d.stateNode.__reactInternalMemoizedMergedChildContext; | |
| break b; | |
| } | |
| } | |
| d = d.return; | |
| } while (null !== d); | |
| t("171"); | |
| d = void 0; | |
| } | |
| if (1 === p.tag) { | |
| var l = p.type; | |
| if (Ib(l)) { | |
| p = Ae(p, l, d); | |
| break a; | |
| } | |
| } | |
| p = d; | |
| } else p = Ne; | |
| null === b.context ? (b.context = p) : (b.pendingContext = p); | |
| b = e; | |
| e = oe(c); | |
| e.payload = { element: a }; | |
| b = void 0 === b ? null : b; | |
| null !== b && (e.callback = b); | |
| Jc(); | |
| ce(g, e); | |
| Gf(g, c); | |
| return c; | |
| } | |
| function Pg(a, b, p, c) { | |
| var e = b.current, | |
| g = Td(); | |
| e = Tc(g, e); | |
| return hf(a, b, p, e, c); | |
| } | |
| function Bg(a) { | |
| a = a.current; | |
| if (!a.child) return null; | |
| switch (a.child.tag) { | |
| case 5: | |
| return a.child.stateNode; | |
| default: | |
| return a.child.stateNode; | |
| } | |
| } | |
| function fi(a, b, p) { | |
| var c = | |
| 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null; | |
| return { | |
| $$typeof: ye, | |
| key: null == c ? null : "" + c, | |
| children: a, | |
| containerInfo: b, | |
| implementation: p, | |
| }; | |
| } | |
| function Cg(a) { | |
| var b = 1073741822 - 25 * ((((1073741822 - Td() + 500) / 25) | 0) + 1); | |
| b >= kj && (b = kj - 1); | |
| this._expirationTime = kj = b; | |
| this._root = a; | |
| this._callbacks = this._next = null; | |
| this._hasChildren = this._didComplete = !1; | |
| this._children = null; | |
| this._defer = !0; | |
| } | |
| function fe() { | |
| this._callbacks = null; | |
| this._didCommit = !1; | |
| this._onCommit = this._onCommit.bind(this); | |
| } | |
| function me(a, b, p) { | |
| b = Ua(3, null, null, b ? 3 : 0); | |
| a = { | |
| current: b, | |
| containerInfo: a, | |
| pendingChildren: null, | |
| pingCache: null, | |
| earliestPendingTime: 0, | |
| latestPendingTime: 0, | |
| earliestSuspendedTime: 0, | |
| latestSuspendedTime: 0, | |
| latestPingedTime: 0, | |
| didError: !1, | |
| pendingCommitExpirationTime: 0, | |
| finishedWork: null, | |
| timeoutHandle: -1, | |
| context: null, | |
| pendingContext: null, | |
| hydrate: p, | |
| nextExpirationTimeToWorkOn: 0, | |
| expirationTime: 0, | |
| firstBatch: null, | |
| nextScheduledRoot: null, | |
| }; | |
| this._internalRoot = b.stateNode = a; | |
| } | |
| function We(a) { | |
| return !( | |
| !a || | |
| (1 !== a.nodeType && | |
| 9 !== a.nodeType && | |
| 11 !== a.nodeType && | |
| (8 !== a.nodeType || " react-mount-point-unstable " !== a.nodeValue)) | |
| ); | |
| } | |
| function jf(a, b) { | |
| b || | |
| ((b = a ? (9 === a.nodeType ? a.documentElement : a.firstChild) : null), | |
| (b = !(!b || 1 !== b.nodeType || !b.hasAttribute("data-reactroot")))); | |
| if (!b) for (var p; (p = a.lastChild); ) a.removeChild(p); | |
| return new me(a, !1, b); | |
| } | |
| function ue(a, b, p, c, e) { | |
| var g = p._reactRootContainer; | |
| if (g) { | |
| if ("function" === typeof e) { | |
| var d = e; | |
| e = function () { | |
| var a = Bg(g._internalRoot); | |
| d.call(a); | |
| }; | |
| } | |
| null != a ? g.legacy_renderSubtreeIntoContainer(a, b, e) : g.render(b, e); | |
| } else { | |
| g = p._reactRootContainer = jf(p, c); | |
| if ("function" === typeof e) { | |
| var l = e; | |
| e = function () { | |
| var a = Bg(g._internalRoot); | |
| l.call(a); | |
| }; | |
| } | |
| zf(function () { | |
| null != a | |
| ? g.legacy_renderSubtreeIntoContainer(a, b, e) | |
| : g.render(b, e); | |
| }); | |
| } | |
| return Bg(g._internalRoot); | |
| } | |
| function ve(a, b) { | |
| var p = | |
| 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; | |
| We(b) ? void 0 : t("200"); | |
| return fi(a, b, null, p); | |
| } | |
| var ze = f(8), | |
| Jd = f(0), | |
| jd = f(11); | |
| ze ? void 0 : t("227"); | |
| var Cf = !1, | |
| mf = null, | |
| Ie = !1, | |
| bg = null, | |
| Dh = { | |
| onError: function (a) { | |
| Cf = !0; | |
| mf = a; | |
| }, | |
| }, | |
| Gg = null, | |
| cg = {}, | |
| dg = [], | |
| Ug = {}, | |
| nf = {}, | |
| eg = {}, | |
| tg = null, | |
| Vg = null, | |
| qi = null, | |
| xe = null, | |
| ag = { | |
| injectEventPluginOrder: function (b) { | |
| Gg ? t("101") : void 0; | |
| Gg = Array.prototype.slice.call(b); | |
| a(); | |
| }, | |
| injectEventPluginsByName: function (b) { | |
| var p = !1, | |
| c; | |
| for (c in b) | |
| if (b.hasOwnProperty(c)) { | |
| var e = b[c]; | |
| (cg.hasOwnProperty(c) && cg[c] === e) || | |
| (cg[c] ? t("102", c) : void 0, (cg[c] = e), (p = !0)); | |
| } | |
| p && a(); | |
| }, | |
| }, | |
| Dg = Math.random().toString(36).slice(2), | |
| Je = "__reactInternalInstance$" + Dg, | |
| Eh = "__reactEventHandlers$" + Dg, | |
| Yd = !( | |
| "undefined" === typeof window || | |
| !window.document || | |
| !window.document.createElement | |
| ), | |
| ug = { | |
| animationend: z("Animation", "AnimationEnd"), | |
| animationiteration: z("Animation", "AnimationIteration"), | |
| animationstart: z("Animation", "AnimationStart"), | |
| transitionend: z("Transition", "TransitionEnd"), | |
| }, | |
| nh = {}, | |
| oh = {}; | |
| Yd && | |
| ((oh = document.createElement("div").style), | |
| "AnimationEvent" in window || | |
| (delete ug.animationend.animation, | |
| delete ug.animationiteration.animation, | |
| delete ug.animationstart.animation), | |
| "TransitionEvent" in window || delete ug.transitionend.transition); | |
| var Qg = K("animationend"), | |
| fh = K("animationiteration"), | |
| yh = K("animationstart"), | |
| jc = K("transitionend"), | |
| Jg = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split( | |
| " " | |
| ), | |
| $e = null, | |
| ph = null, | |
| pc = null; | |
| Jd(F.prototype, { | |
| preventDefault: function () { | |
| this.defaultPrevented = !0; | |
| var a = this.nativeEvent; | |
| a && | |
| (a.preventDefault | |
| ? a.preventDefault() | |
| : "unknown" !== typeof a.returnValue && (a.returnValue = !1), | |
| (this.isDefaultPrevented = Q)); | |
| }, | |
| stopPropagation: function () { | |
| var a = this.nativeEvent; | |
| a && | |
| (a.stopPropagation | |
| ? a.stopPropagation() | |
| : "unknown" !== typeof a.cancelBubble && (a.cancelBubble = !0), | |
| (this.isPropagationStopped = Q)); | |
| }, | |
| persist: function () { | |
| this.isPersistent = Q; | |
| }, | |
| isPersistent: M, | |
| destructor: function () { | |
| var a = this.constructor.Interface, | |
| b; | |
| for (b in a) this[b] = null; | |
| this.nativeEvent = this._targetInst = this.dispatchConfig = null; | |
| this.isPropagationStopped = this.isDefaultPrevented = M; | |
| this._dispatchInstances = this._dispatchListeners = null; | |
| }, | |
| }); | |
| F.Interface = { | |
| type: null, | |
| target: null, | |
| currentTarget: function () { | |
| return null; | |
| }, | |
| eventPhase: null, | |
| bubbles: null, | |
| cancelable: null, | |
| timeStamp: function (a) { | |
| return a.timeStamp || Date.now(); | |
| }, | |
| defaultPrevented: null, | |
| isTrusted: null, | |
| }; | |
| F.extend = function (a) { | |
| function b() {} | |
| function p() { | |
| return c.apply(this, arguments); | |
| } | |
| var c = this; | |
| b.prototype = c.prototype; | |
| var e = new b(); | |
| Jd(e, p.prototype); | |
| p.prototype = e; | |
| p.prototype.constructor = p; | |
| p.Interface = Jd({}, c.Interface, a); | |
| p.extend = c.extend; | |
| L(p); | |
| return p; | |
| }; | |
| L(F); | |
| var Wc = F.extend({ data: null }), | |
| Pf = F.extend({ data: null }), | |
| Fh = [9, 13, 27, 32], | |
| qh = Yd && "CompositionEvent" in window, | |
| gh = null; | |
| Yd && "documentMode" in document && (gh = document.documentMode); | |
| var mg = Yd && "TextEvent" in window && !gh, | |
| Wd = Yd && (!qh || (gh && 8 < gh && 11 >= gh)), | |
| Sf = String.fromCharCode(32), | |
| kf = { | |
| beforeInput: { | |
| phasedRegistrationNames: { | |
| bubbled: "onBeforeInput", | |
| captured: "onBeforeInputCapture", | |
| }, | |
| dependencies: ["compositionend", "keypress", "textInput", "paste"], | |
| }, | |
| compositionEnd: { | |
| phasedRegistrationNames: { | |
| bubbled: "onCompositionEnd", | |
| captured: "onCompositionEndCapture", | |
| }, | |
| dependencies: "blur compositionend keydown keypress keyup mousedown".split( | |
| " " | |
| ), | |
| }, | |
| compositionStart: { | |
| phasedRegistrationNames: { | |
| bubbled: "onCompositionStart", | |
| captured: "onCompositionStartCapture", | |
| }, | |
| dependencies: "blur compositionstart keydown keypress keyup mousedown".split( | |
| " " | |
| ), | |
| }, | |
| compositionUpdate: { | |
| phasedRegistrationNames: { | |
| bubbled: "onCompositionUpdate", | |
| captured: "onCompositionUpdateCapture", | |
| }, | |
| dependencies: "blur compositionupdate keydown keypress keyup mousedown".split( | |
| " " | |
| ), | |
| }, | |
| }, | |
| Gh = !1, | |
| vg = !1, | |
| Zc = { | |
| eventTypes: kf, | |
| extractEvents: function (a, b, p, c) { | |
| var e = void 0, | |
| g = void 0; | |
| if (qh) | |
| a: { | |
| switch (a) { | |
| case "compositionstart": | |
| e = kf.compositionStart; | |
| break a; | |
| case "compositionend": | |
| e = kf.compositionEnd; | |
| break a; | |
| case "compositionupdate": | |
| e = kf.compositionUpdate; | |
| break a; | |
| } | |
| e = void 0; | |
| } | |
| else | |
| vg | |
| ? N(a, p) && (e = kf.compositionEnd) | |
| : "keydown" === a && 229 === p.keyCode && (e = kf.compositionStart); | |
| e | |
| ? (Wd && | |
| "ko" !== p.locale && | |
| (vg || e !== kf.compositionStart | |
| ? e === kf.compositionEnd && vg && (g = D()) | |
| : (($e = c), | |
| (ph = "value" in $e ? $e.value : $e.textContent), | |
| (vg = !0))), | |
| (e = Wc.getPooled(e, b, p, c)), | |
| g ? (e.data = g) : ((g = B(p)), null !== g && (e.data = g)), | |
| A(e), | |
| (g = e)) | |
| : (g = null); | |
| (a = mg ? V(a, p) : U(a, p)) | |
| ? ((b = Pf.getPooled(kf.beforeInput, b, p, c)), (b.data = a), A(b)) | |
| : (b = null); | |
| return null === g ? b : null === b ? g : [g, b]; | |
| }, | |
| }, | |
| mc = null, | |
| Wg = null, | |
| qc = null, | |
| wg = !1, | |
| Xd = { | |
| color: !0, | |
| date: !0, | |
| datetime: !0, | |
| "datetime-local": !0, | |
| email: !0, | |
| month: !0, | |
| number: !0, | |
| password: !0, | |
| range: !0, | |
| search: !0, | |
| tel: !0, | |
| text: !0, | |
| time: !0, | |
| url: !0, | |
| week: !0, | |
| }, | |
| ng = ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| ng.hasOwnProperty("ReactCurrentDispatcher") || | |
| (ng.ReactCurrentDispatcher = { current: null }); | |
| var af = /^(.*)[\\\/]/, | |
| we = "function" === typeof Symbol && Symbol.for, | |
| hg = we ? Symbol.for("react.element") : 60103, | |
| ye = we ? Symbol.for("react.portal") : 60106, | |
| Ra = we ? Symbol.for("react.fragment") : 60107, | |
| Bc = we ? Symbol.for("react.strict_mode") : 60108, | |
| kd = we ? Symbol.for("react.profiler") : 60114, | |
| Hh = we ? Symbol.for("react.provider") : 60109, | |
| Fd = we ? Symbol.for("react.context") : 60110, | |
| Pc = we ? Symbol.for("react.concurrent_mode") : 60111, | |
| Qd = we ? Symbol.for("react.forward_ref") : 60112, | |
| Uf = we ? Symbol.for("react.suspense") : 60113, | |
| xg = we ? Symbol.for("react.memo") : 60115, | |
| of = we ? Symbol.for("react.lazy") : 60116, | |
| Tf = "function" === typeof Symbol && Symbol.iterator, | |
| Xg = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, | |
| Zd = Object.prototype.hasOwnProperty, | |
| Ih = {}, | |
| Zh = {}, | |
| $c = {}; | |
| "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style" | |
| .split(" ") | |
| .forEach(function (a) { | |
| $c[a] = new aa(a, 0, !1, a, null); | |
| }); | |
| [ | |
| ["acceptCharset", "accept-charset"], | |
| ["className", "class"], | |
| ["htmlFor", "for"], | |
| ["httpEquiv", "http-equiv"], | |
| ].forEach(function (a) { | |
| var b = a[0]; | |
| $c[b] = new aa(b, 1, !1, a[1], null); | |
| }); | |
| ["contentEditable", "draggable", "spellCheck", "value"].forEach(function (a) { | |
| $c[a] = new aa(a, 2, !1, a.toLowerCase(), null); | |
| }); | |
| [ | |
| "autoReverse", | |
| "externalResourcesRequired", | |
| "focusable", | |
| "preserveAlpha", | |
| ].forEach(function (a) { | |
| $c[a] = new aa(a, 2, !1, a, null); | |
| }); | |
| "allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope" | |
| .split(" ") | |
| .forEach(function (a) { | |
| $c[a] = new aa(a, 3, !1, a.toLowerCase(), null); | |
| }); | |
| ["checked", "multiple", "muted", "selected"].forEach(function (a) { | |
| $c[a] = new aa(a, 3, !0, a, null); | |
| }); | |
| ["capture", "download"].forEach(function (a) { | |
| $c[a] = new aa(a, 4, !1, a, null); | |
| }); | |
| ["cols", "rows", "size", "span"].forEach(function (a) { | |
| $c[a] = new aa(a, 6, !1, a, null); | |
| }); | |
| ["rowSpan", "start"].forEach(function (a) { | |
| $c[a] = new aa(a, 5, !1, a.toLowerCase(), null); | |
| }); | |
| var zh = /[\-:]([a-z])/g; | |
| "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height" | |
| .split(" ") | |
| .forEach(function (a) { | |
| var b = a.replace(zh, X); | |
| $c[b] = new aa(b, 1, !1, a, null); | |
| }); | |
| "xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type" | |
| .split(" ") | |
| .forEach(function (a) { | |
| var b = a.replace(zh, X); | |
| $c[b] = new aa(b, 1, !1, a, "http://www.w3.org/1999/xlink"); | |
| }); | |
| ["xml:base", "xml:lang", "xml:space"].forEach(function (a) { | |
| var b = a.replace(zh, X); | |
| $c[b] = new aa(b, 1, !1, a, "http://www.w3.org/XML/1998/namespace"); | |
| }); | |
| ["tabIndex", "crossOrigin"].forEach(function (a) { | |
| $c[a] = new aa(a, 1, !1, a.toLowerCase(), null); | |
| }); | |
| var Jh = { | |
| change: { | |
| phasedRegistrationNames: { | |
| bubbled: "onChange", | |
| captured: "onChangeCapture", | |
| }, | |
| dependencies: "blur change click focus input keydown keyup selectionchange".split( | |
| " " | |
| ), | |
| }, | |
| }, | |
| pf = null, | |
| Vf = null, | |
| Rg = !1; | |
| Yd && | |
| (Rg = Z("input") && (!document.documentMode || 9 < document.documentMode)); | |
| var og = { | |
| eventTypes: Jh, | |
| _isInputEventSupported: Rg, | |
| extractEvents: function (a, b, p, c) { | |
| var e = b ? v(b) : window, | |
| g = void 0, | |
| d = void 0, | |
| l = e.nodeName && e.nodeName.toLowerCase(); | |
| "select" === l || ("input" === l && "file" === e.type) | |
| ? (g = wa) | |
| : ja(e) | |
| ? Rg | |
| ? (g = Xa) | |
| : ((g = Ja), (d = tb)) | |
| : (l = e.nodeName) && | |
| "input" === l.toLowerCase() && | |
| ("checkbox" === e.type || "radio" === e.type) && | |
| (g = cb); | |
| if (g && (g = g(a, b))) return na(g, p, c); | |
| d && d(a, e, b); | |
| "blur" === a && | |
| (a = e._wrapperState) && | |
| a.controlled && | |
| "number" === e.type && | |
| Da(e, "number", e.value); | |
| }, | |
| }, | |
| pg = F.extend({ view: null, detail: null }), | |
| Ke = { | |
| Alt: "altKey", | |
| Control: "ctrlKey", | |
| Meta: "metaKey", | |
| Shift: "shiftKey", | |
| }, | |
| Ah = 0, | |
| qg = 0, | |
| hh = !1, | |
| yi = !1, | |
| ih = pg.extend({ | |
| screenX: null, | |
| screenY: null, | |
| clientX: null, | |
| clientY: null, | |
| pageX: null, | |
| pageY: null, | |
| ctrlKey: null, | |
| shiftKey: null, | |
| altKey: null, | |
| metaKey: null, | |
| getModifierState: ta, | |
| button: null, | |
| buttons: null, | |
| relatedTarget: function (a) { | |
| return ( | |
| a.relatedTarget || | |
| (a.fromElement === a.srcElement ? a.toElement : a.fromElement) | |
| ); | |
| }, | |
| movementX: function (a) { | |
| if ("movementX" in a) return a.movementX; | |
| var b = Ah; | |
| Ah = a.screenX; | |
| return hh | |
| ? "mousemove" === a.type | |
| ? a.screenX - b | |
| : 0 | |
| : ((hh = !0), 0); | |
| }, | |
| movementY: function (a) { | |
| if ("movementY" in a) return a.movementY; | |
| var b = qg; | |
| qg = a.screenY; | |
| return yi | |
| ? "mousemove" === a.type | |
| ? a.screenY - b | |
| : 0 | |
| : ((yi = !0), 0); | |
| }, | |
| }), | |
| rg = ih.extend({ | |
| pointerId: null, | |
| width: null, | |
| height: null, | |
| pressure: null, | |
| tangentialPressure: null, | |
| tiltX: null, | |
| tiltY: null, | |
| twist: null, | |
| pointerType: null, | |
| isPrimary: null, | |
| }), | |
| jh = { | |
| mouseEnter: { | |
| registrationName: "onMouseEnter", | |
| dependencies: ["mouseout", "mouseover"], | |
| }, | |
| mouseLeave: { | |
| registrationName: "onMouseLeave", | |
| dependencies: ["mouseout", "mouseover"], | |
| }, | |
| pointerEnter: { | |
| registrationName: "onPointerEnter", | |
| dependencies: ["pointerout", "pointerover"], | |
| }, | |
| pointerLeave: { | |
| registrationName: "onPointerLeave", | |
| dependencies: ["pointerout", "pointerover"], | |
| }, | |
| }, | |
| sg = { | |
| eventTypes: jh, | |
| extractEvents: function (a, b, p, c) { | |
| var e = "mouseover" === a || "pointerover" === a, | |
| g = "mouseout" === a || "pointerout" === a; | |
| if ((e && (p.relatedTarget || p.fromElement)) || (!g && !e)) | |
| return null; | |
| e = | |
| c.window === c | |
| ? c | |
| : (e = c.ownerDocument) | |
| ? e.defaultView || e.parentWindow | |
| : window; | |
| g | |
| ? ((g = b), (b = (b = p.relatedTarget || p.toElement) ? y(b) : null)) | |
| : (g = null); | |
| if (g === b) return null; | |
| var d = void 0, | |
| l = void 0, | |
| h = void 0, | |
| k = void 0; | |
| if ("mouseout" === a || "mouseover" === a) | |
| (d = ih), (l = jh.mouseLeave), (h = jh.mouseEnter), (k = "mouse"); | |
| else if ("pointerout" === a || "pointerover" === a) | |
| (d = rg), | |
| (l = jh.pointerLeave), | |
| (h = jh.pointerEnter), | |
| (k = "pointer"); | |
| var n = null == g ? e : v(g); | |
| e = null == b ? e : v(b); | |
| a = d.getPooled(l, g, p, c); | |
| a.type = k + "leave"; | |
| a.target = n; | |
| a.relatedTarget = e; | |
| p = d.getPooled(h, b, p, c); | |
| p.type = k + "enter"; | |
| p.target = e; | |
| p.relatedTarget = n; | |
| c = b; | |
| if (g && c) | |
| a: { | |
| b = g; | |
| e = c; | |
| k = 0; | |
| for (d = b; d; d = H(d)) k++; | |
| d = 0; | |
| for (h = e; h; h = H(h)) d++; | |
| for (; 0 < k - d; ) (b = H(b)), k--; | |
| for (; 0 < d - k; ) (e = H(e)), d--; | |
| for (; k--; ) { | |
| if (b === e || b === e.alternate) break a; | |
| b = H(b); | |
| e = H(e); | |
| } | |
| b = null; | |
| } | |
| else b = null; | |
| e = b; | |
| for (b = []; g && g !== e; ) { | |
| k = g.alternate; | |
| if (null !== k && k === e) break; | |
| b.push(g); | |
| g = H(g); | |
| } | |
| for (g = []; c && c !== e; ) { | |
| k = c.alternate; | |
| if (null !== k && k === e) break; | |
| g.push(c); | |
| c = H(c); | |
| } | |
| for (c = 0; c < b.length; c++) G(b[c], "bubbled", a); | |
| for (c = g.length; 0 < c--; ) G(g[c], "captured", p); | |
| return [a, p]; | |
| }, | |
| }, | |
| gb = Object.prototype.hasOwnProperty, | |
| Xe = F.extend({ | |
| animationName: null, | |
| elapsedTime: null, | |
| pseudoElement: null, | |
| }), | |
| kh = F.extend({ | |
| clipboardData: function (a) { | |
| return "clipboardData" in a ? a.clipboardData : window.clipboardData; | |
| }, | |
| }), | |
| Bh = pg.extend({ relatedTarget: null }), | |
| Xh = { | |
| Esc: "Escape", | |
| Spacebar: " ", | |
| Left: "ArrowLeft", | |
| Up: "ArrowUp", | |
| Right: "ArrowRight", | |
| Down: "ArrowDown", | |
| Del: "Delete", | |
| Win: "OS", | |
| Menu: "ContextMenu", | |
| Apps: "ContextMenu", | |
| Scroll: "ScrollLock", | |
| MozPrintableKey: "Unidentified", | |
| }, | |
| gi = { | |
| 8: "Backspace", | |
| 9: "Tab", | |
| 12: "Clear", | |
| 13: "Enter", | |
| 16: "Shift", | |
| 17: "Control", | |
| 18: "Alt", | |
| 19: "Pause", | |
| 20: "CapsLock", | |
| 27: "Escape", | |
| 32: " ", | |
| 33: "PageUp", | |
| 34: "PageDown", | |
| 35: "End", | |
| 36: "Home", | |
| 37: "ArrowLeft", | |
| 38: "ArrowUp", | |
| 39: "ArrowRight", | |
| 40: "ArrowDown", | |
| 45: "Insert", | |
| 46: "Delete", | |
| 112: "F1", | |
| 113: "F2", | |
| 114: "F3", | |
| 115: "F4", | |
| 116: "F5", | |
| 117: "F6", | |
| 118: "F7", | |
| 119: "F8", | |
| 120: "F9", | |
| 121: "F10", | |
| 122: "F11", | |
| 123: "F12", | |
| 144: "NumLock", | |
| 145: "ScrollLock", | |
| 224: "Meta", | |
| }, | |
| hi = pg.extend({ | |
| key: function (a) { | |
| if (a.key) { | |
| var b = Xh[a.key] || a.key; | |
| if ("Unidentified" !== b) return b; | |
| } | |
| return "keypress" === a.type | |
| ? ((a = Ea(a)), 13 === a ? "Enter" : String.fromCharCode(a)) | |
| : "keydown" === a.type || "keyup" === a.type | |
| ? gi[a.keyCode] || "Unidentified" | |
| : ""; | |
| }, | |
| location: null, | |
| ctrlKey: null, | |
| shiftKey: null, | |
| altKey: null, | |
| metaKey: null, | |
| repeat: null, | |
| locale: null, | |
| getModifierState: ta, | |
| charCode: function (a) { | |
| return "keypress" === a.type ? Ea(a) : 0; | |
| }, | |
| keyCode: function (a) { | |
| return "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0; | |
| }, | |
| which: function (a) { | |
| return "keypress" === a.type | |
| ? Ea(a) | |
| : "keydown" === a.type || "keyup" === a.type | |
| ? a.keyCode | |
| : 0; | |
| }, | |
| }), | |
| Eg = ih.extend({ dataTransfer: null }), | |
| Sg = pg.extend({ | |
| touches: null, | |
| targetTouches: null, | |
| changedTouches: null, | |
| altKey: null, | |
| metaKey: null, | |
| ctrlKey: null, | |
| shiftKey: null, | |
| getModifierState: ta, | |
| }), | |
| Af = F.extend({ | |
| propertyName: null, | |
| elapsedTime: null, | |
| pseudoElement: null, | |
| }), | |
| Fg = ih.extend({ | |
| deltaX: function (a) { | |
| return "deltaX" in a | |
| ? a.deltaX | |
| : "wheelDeltaX" in a | |
| ? -a.wheelDeltaX | |
| : 0; | |
| }, | |
| deltaY: function (a) { | |
| return "deltaY" in a | |
| ? a.deltaY | |
| : "wheelDeltaY" in a | |
| ? -a.wheelDeltaY | |
| : "wheelDelta" in a | |
| ? -a.wheelDelta | |
| : 0; | |
| }, | |
| deltaZ: null, | |
| deltaMode: null, | |
| }), | |
| td = [ | |
| ["abort", "abort"], | |
| [Qg, "animationEnd"], | |
| [fh, "animationIteration"], | |
| [yh, "animationStart"], | |
| ["canplay", "canPlay"], | |
| ["canplaythrough", "canPlayThrough"], | |
| ["drag", "drag"], | |
| ["dragenter", "dragEnter"], | |
| ["dragexit", "dragExit"], | |
| ["dragleave", "dragLeave"], | |
| ["dragover", "dragOver"], | |
| ["durationchange", "durationChange"], | |
| ["emptied", "emptied"], | |
| ["encrypted", "encrypted"], | |
| ["ended", "ended"], | |
| ["error", "error"], | |
| ["gotpointercapture", "gotPointerCapture"], | |
| ["load", "load"], | |
| ["loadeddata", "loadedData"], | |
| ["loadedmetadata", "loadedMetadata"], | |
| ["loadstart", "loadStart"], | |
| ["lostpointercapture", "lostPointerCapture"], | |
| ["mousemove", "mouseMove"], | |
| ["mouseout", "mouseOut"], | |
| ["mouseover", "mouseOver"], | |
| ["playing", "playing"], | |
| ["pointermove", "pointerMove"], | |
| ["pointerout", "pointerOut"], | |
| ["pointerover", "pointerOver"], | |
| ["progress", "progress"], | |
| ["scroll", "scroll"], | |
| ["seeking", "seeking"], | |
| ["stalled", "stalled"], | |
| ["suspend", "suspend"], | |
| ["timeupdate", "timeUpdate"], | |
| ["toggle", "toggle"], | |
| ["touchmove", "touchMove"], | |
| [jc, "transitionEnd"], | |
| ["waiting", "waiting"], | |
| ["wheel", "wheel"], | |
| ], | |
| Hg = {}, | |
| $d = {}; | |
| [ | |
| ["blur", "blur"], | |
| ["cancel", "cancel"], | |
| ["click", "click"], | |
| ["close", "close"], | |
| ["contextmenu", "contextMenu"], | |
| ["copy", "copy"], | |
| ["cut", "cut"], | |
| ["auxclick", "auxClick"], | |
| ["dblclick", "doubleClick"], | |
| ["dragend", "dragEnd"], | |
| ["dragstart", "dragStart"], | |
| ["drop", "drop"], | |
| ["focus", "focus"], | |
| ["input", "input"], | |
| ["invalid", "invalid"], | |
| ["keydown", "keyDown"], | |
| ["keypress", "keyPress"], | |
| ["keyup", "keyUp"], | |
| ["mousedown", "mouseDown"], | |
| ["mouseup", "mouseUp"], | |
| ["paste", "paste"], | |
| ["pause", "pause"], | |
| ["play", "play"], | |
| ["pointercancel", "pointerCancel"], | |
| ["pointerdown", "pointerDown"], | |
| ["pointerup", "pointerUp"], | |
| ["ratechange", "rateChange"], | |
| ["reset", "reset"], | |
| ["seeked", "seeked"], | |
| ["submit", "submit"], | |
| ["touchcancel", "touchCancel"], | |
| ["touchend", "touchEnd"], | |
| ["touchstart", "touchStart"], | |
| ["volumechange", "volumeChange"], | |
| ].forEach(function (a) { | |
| Na(a, !0); | |
| }); | |
| td.forEach(function (a) { | |
| Na(a, !1); | |
| }); | |
| var ii = { | |
| eventTypes: Hg, | |
| isInteractiveTopLevelEventType: function (a) { | |
| a = $d[a]; | |
| return void 0 !== a && !0 === a.isInteractive; | |
| }, | |
| extractEvents: function (a, b, p, c) { | |
| var e = $d[a]; | |
| if (!e) return null; | |
| switch (a) { | |
| case "keypress": | |
| if (0 === Ea(p)) return null; | |
| case "keydown": | |
| case "keyup": | |
| a = hi; | |
| break; | |
| case "blur": | |
| case "focus": | |
| a = Bh; | |
| break; | |
| case "click": | |
| if (2 === p.button) return null; | |
| case "auxclick": | |
| case "dblclick": | |
| case "mousedown": | |
| case "mousemove": | |
| case "mouseup": | |
| case "mouseout": | |
| case "mouseover": | |
| case "contextmenu": | |
| a = ih; | |
| break; | |
| case "drag": | |
| case "dragend": | |
| case "dragenter": | |
| case "dragexit": | |
| case "dragleave": | |
| case "dragover": | |
| case "dragstart": | |
| case "drop": | |
| a = Eg; | |
| break; | |
| case "touchcancel": | |
| case "touchend": | |
| case "touchmove": | |
| case "touchstart": | |
| a = Sg; | |
| break; | |
| case Qg: | |
| case fh: | |
| case yh: | |
| a = Xe; | |
| break; | |
| case jc: | |
| a = Af; | |
| break; | |
| case "scroll": | |
| a = pg; | |
| break; | |
| case "wheel": | |
| a = Fg; | |
| break; | |
| case "copy": | |
| case "cut": | |
| case "paste": | |
| a = kh; | |
| break; | |
| case "gotpointercapture": | |
| case "lostpointercapture": | |
| case "pointercancel": | |
| case "pointerdown": | |
| case "pointermove": | |
| case "pointerout": | |
| case "pointerover": | |
| case "pointerup": | |
| a = rg; | |
| break; | |
| default: | |
| a = F; | |
| } | |
| b = a.getPooled(e, b, p, c); | |
| A(b); | |
| return b; | |
| }, | |
| }, | |
| Ig = ii.isInteractiveTopLevelEventType, | |
| Gc = [], | |
| Df = !0, | |
| yd = {}, | |
| yg = 0, | |
| Le = "_reactListenersID" + ("" + Math.random()).slice(2), | |
| lh = Yd && "documentMode" in document && 11 >= document.documentMode, | |
| gg = { | |
| select: { | |
| phasedRegistrationNames: { | |
| bubbled: "onSelect", | |
| captured: "onSelectCapture", | |
| }, | |
| dependencies: "blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split( | |
| " " | |
| ), | |
| }, | |
| }, | |
| ge = null, | |
| Ef = null, | |
| fg = null, | |
| Kh = !1, | |
| Li = { | |
| eventTypes: gg, | |
| extractEvents: function (a, b, p, c) { | |
| var e = | |
| c.window === c | |
| ? c.document | |
| : 9 === c.nodeType | |
| ? c | |
| : c.ownerDocument, | |
| g; | |
| if (!(g = !e)) { | |
| a: { | |
| e = Sa(e); | |
| g = eg.onSelect; | |
| for (var d = 0; d < g.length; d++) { | |
| var l = g[d]; | |
| if (!e.hasOwnProperty(l) || !e[l]) { | |
| e = !1; | |
| break a; | |
| } | |
| } | |
| e = !0; | |
| } | |
| g = !e; | |
| } | |
| if (g) return null; | |
| e = b ? v(b) : window; | |
| switch (a) { | |
| case "focus": | |
| if (ja(e) || "true" === e.contentEditable) | |
| (ge = e), (Ef = b), (fg = null); | |
| break; | |
| case "blur": | |
| fg = Ef = ge = null; | |
| break; | |
| case "mousedown": | |
| Kh = !0; | |
| break; | |
| case "contextmenu": | |
| case "mouseup": | |
| case "dragend": | |
| return (Kh = !1), dc(p, c); | |
| case "selectionchange": | |
| if (lh) break; | |
| case "keydown": | |
| case "keyup": | |
| return dc(p, c); | |
| } | |
| return null; | |
| }, | |
| }; | |
| ag.injectEventPluginOrder( | |
| "ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split( | |
| " " | |
| ) | |
| ); | |
| tg = I; | |
| Vg = x; | |
| qi = v; | |
| ag.injectEventPluginsByName({ | |
| SimpleEventPlugin: ii, | |
| EnterLeaveEventPlugin: sg, | |
| ChangeEventPlugin: og, | |
| SelectEventPlugin: Li, | |
| BeforeInputEventPlugin: Zc, | |
| }); | |
| var lg = { | |
| html: "http://www.w3.org/1999/xhtml", | |
| mathml: "http://www.w3.org/1998/Math/MathML", | |
| svg: "http://www.w3.org/2000/svg", | |
| }, | |
| Qf = void 0, | |
| he = (function (a) { | |
| return "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction | |
| ? function (b, p, c, e) { | |
| MSApp.execUnsafeLocalFunction(function () { | |
| return a(b, p, c, e); | |
| }); | |
| } | |
| : a; | |
| })(function (a, b) { | |
| if (a.namespaceURI !== lg.svg || "innerHTML" in a) a.innerHTML = b; | |
| else { | |
| Qf = Qf || document.createElement("div"); | |
| Qf.innerHTML = "\x3csvg\x3e" + b + "\x3c/svg\x3e"; | |
| for (b = Qf.firstChild; a.firstChild; ) a.removeChild(a.firstChild); | |
| for (; b.firstChild; ) a.appendChild(b.firstChild); | |
| } | |
| }), | |
| Rd = { | |
| animationIterationCount: !0, | |
| borderImageOutset: !0, | |
| borderImageSlice: !0, | |
| borderImageWidth: !0, | |
| boxFlex: !0, | |
| boxFlexGroup: !0, | |
| boxOrdinalGroup: !0, | |
| columnCount: !0, | |
| columns: !0, | |
| flex: !0, | |
| flexGrow: !0, | |
| flexPositive: !0, | |
| flexShrink: !0, | |
| flexNegative: !0, | |
| flexOrder: !0, | |
| gridArea: !0, | |
| gridRow: !0, | |
| gridRowEnd: !0, | |
| gridRowSpan: !0, | |
| gridRowStart: !0, | |
| gridColumn: !0, | |
| gridColumnEnd: !0, | |
| gridColumnSpan: !0, | |
| gridColumnStart: !0, | |
| fontWeight: !0, | |
| lineClamp: !0, | |
| lineHeight: !0, | |
| opacity: !0, | |
| order: !0, | |
| orphans: !0, | |
| tabSize: !0, | |
| widows: !0, | |
| zIndex: !0, | |
| zoom: !0, | |
| fillOpacity: !0, | |
| floodOpacity: !0, | |
| stopOpacity: !0, | |
| strokeDasharray: !0, | |
| strokeDashoffset: !0, | |
| strokeMiterlimit: !0, | |
| strokeOpacity: !0, | |
| strokeWidth: !0, | |
| }, | |
| tc = ["Webkit", "ms", "Moz", "O"]; | |
| Object.keys(Rd).forEach(function (a) { | |
| tc.forEach(function (b) { | |
| b = b + a.charAt(0).toUpperCase() + a.substring(1); | |
| Rd[b] = Rd[a]; | |
| }); | |
| }); | |
| var Wf = Jd( | |
| { menuitem: !0 }, | |
| { | |
| area: !0, | |
| base: !0, | |
| br: !0, | |
| col: !0, | |
| embed: !0, | |
| hr: !0, | |
| img: !0, | |
| input: !0, | |
| keygen: !0, | |
| link: !0, | |
| meta: !0, | |
| param: !0, | |
| source: !0, | |
| track: !0, | |
| wbr: !0, | |
| } | |
| ), | |
| ch = null, | |
| Mf = null, | |
| $f = "function" === typeof setTimeout ? setTimeout : void 0, | |
| sc = "function" === typeof clearTimeout ? clearTimeout : void 0, | |
| se = jd.unstable_scheduleCallback, | |
| Th = jd.unstable_cancelCallback; | |
| new Set(); | |
| var rh = [], | |
| Me = -1, | |
| Ne = {}, | |
| Kd = { current: Ne }, | |
| Bd = { current: !1 }, | |
| Ld = Ne, | |
| Yg = null, | |
| ri = null, | |
| $h = new ze.Component().refs, | |
| Zg = { | |
| isMounted: function (a) { | |
| return (a = a._reactInternalFiber) ? 2 === kb(a) : !1; | |
| }, | |
| enqueueSetState: function (a, b, p) { | |
| a = a._reactInternalFiber; | |
| var c = Td(); | |
| c = Tc(c, a); | |
| var e = oe(c); | |
| e.payload = b; | |
| void 0 !== p && null !== p && (e.callback = p); | |
| Jc(); | |
| ce(a, e); | |
| Gf(a, c); | |
| }, | |
| enqueueReplaceState: function (a, b, p) { | |
| a = a._reactInternalFiber; | |
| var c = Td(); | |
| c = Tc(c, a); | |
| var e = oe(c); | |
| e.tag = Oh; | |
| e.payload = b; | |
| void 0 !== p && null !== p && (e.callback = p); | |
| Jc(); | |
| ce(a, e); | |
| Gf(a, c); | |
| }, | |
| enqueueForceUpdate: function (a, b) { | |
| a = a._reactInternalFiber; | |
| var p = Td(); | |
| p = Tc(p, a); | |
| var c = oe(p); | |
| c.tag = Nh; | |
| void 0 !== b && null !== b && (c.callback = b); | |
| Jc(); | |
| ce(a, c); | |
| Gf(a, p); | |
| }, | |
| }, | |
| Be = Array.isArray, | |
| Oe = ie(!0), | |
| Hf = ie(!1), | |
| Xf = {}, | |
| db = { current: Xf }, | |
| Ff = { current: Xf }, | |
| dd = { current: Xf }, | |
| bc = 0, | |
| qd = 2, | |
| di = 4, | |
| Ph = 8, | |
| p = 16, | |
| S = 32, | |
| Se = 64, | |
| rd = 128, | |
| Di = ng.ReactCurrentDispatcher, | |
| si = 0, | |
| $g = null, | |
| Ce = null, | |
| ig = null, | |
| sh = null, | |
| Yf = null, | |
| Mh = null, | |
| bi = 0, | |
| Kg = null, | |
| Ei = 0, | |
| ui = !1, | |
| th = null, | |
| Lh = 0, | |
| ej = { | |
| readContext: Sd, | |
| useCallback: ed, | |
| useContext: ed, | |
| useEffect: ed, | |
| useImperativeHandle: ed, | |
| useLayoutEffect: ed, | |
| useMemo: ed, | |
| useReducer: ed, | |
| useRef: ed, | |
| useState: ed, | |
| useDebugValue: ed, | |
| }, | |
| Qj = { | |
| readContext: Sd, | |
| useCallback: function (a, b) { | |
| Sb().memoizedState = [a, void 0 === b ? null : b]; | |
| return a; | |
| }, | |
| useContext: Sd, | |
| useEffect: function (a, b) { | |
| return Dd(516, rd | Se, a, b); | |
| }, | |
| useImperativeHandle: function (a, b, p) { | |
| p = null !== p && void 0 !== p ? p.concat([a]) : null; | |
| return Dd(4, di | S, Hd.bind(null, b, a), p); | |
| }, | |
| useLayoutEffect: function (a, b) { | |
| return Dd(4, di | S, a, b); | |
| }, | |
| useMemo: function (a, b) { | |
| var p = Sb(); | |
| b = void 0 === b ? null : b; | |
| a = a(); | |
| p.memoizedState = [a, b]; | |
| return a; | |
| }, | |
| useReducer: function (a, b, p) { | |
| var c = Sb(); | |
| b = void 0 !== p ? p(b) : b; | |
| c.memoizedState = c.baseState = b; | |
| a = c.queue = { | |
| last: null, | |
| dispatch: null, | |
| eagerReducer: a, | |
| eagerState: b, | |
| }; | |
| a = a.dispatch = Xc.bind(null, $g, a); | |
| return [c.memoizedState, a]; | |
| }, | |
| useRef: function (a) { | |
| var b = Sb(); | |
| a = { current: a }; | |
| return (b.memoizedState = a); | |
| }, | |
| useState: function (a) { | |
| var b = Sb(); | |
| "function" === typeof a && (a = a()); | |
| b.memoizedState = b.baseState = a; | |
| a = b.queue = { | |
| last: null, | |
| dispatch: null, | |
| eagerReducer: Qc, | |
| eagerState: a, | |
| }; | |
| a = a.dispatch = Xc.bind(null, $g, a); | |
| return [b.memoizedState, a]; | |
| }, | |
| useDebugValue: vd, | |
| }, | |
| ti = { | |
| readContext: Sd, | |
| useCallback: function (a, b) { | |
| var p = Fc(); | |
| b = void 0 === b ? null : b; | |
| var c = p.memoizedState; | |
| if (null !== c && null !== b && Gd(b, c[1])) return c[0]; | |
| p.memoizedState = [a, b]; | |
| return a; | |
| }, | |
| useContext: Sd, | |
| useEffect: function (a, b) { | |
| return Rc(516, rd | Se, a, b); | |
| }, | |
| useImperativeHandle: function (a, b, p) { | |
| p = null !== p && void 0 !== p ? p.concat([a]) : null; | |
| return Rc(4, di | S, Hd.bind(null, b, a), p); | |
| }, | |
| useLayoutEffect: function (a, b) { | |
| return Rc(4, di | S, a, b); | |
| }, | |
| useMemo: function (a, b) { | |
| var p = Fc(); | |
| b = void 0 === b ? null : b; | |
| var c = p.memoizedState; | |
| if (null !== c && null !== b && Gd(b, c[1])) return c[0]; | |
| a = a(); | |
| p.memoizedState = [a, b]; | |
| return a; | |
| }, | |
| useReducer: Lb, | |
| useRef: function () { | |
| return Fc().memoizedState; | |
| }, | |
| useState: function (a) { | |
| return Lb(Qc, a); | |
| }, | |
| useDebugValue: vd, | |
| }, | |
| Ud = null, | |
| bh = null, | |
| jg = !1, | |
| fj = ng.ReactCurrentOwner, | |
| ah = !1, | |
| gj = { current: null }, | |
| vi = null, | |
| vh = null, | |
| ci = null, | |
| tj = 0, | |
| Oh = 1, | |
| Nh = 2, | |
| Qi = 3, | |
| uh = !1, | |
| Ui = void 0, | |
| Gi = void 0, | |
| Ti = void 0, | |
| ij = void 0; | |
| Ui = function (a, b) { | |
| for (var p = b.child; null !== p; ) { | |
| if (5 === p.tag || 6 === p.tag) a.appendChild(p.stateNode); | |
| else if (4 !== p.tag && null !== p.child) { | |
| p.child.return = p; | |
| p = p.child; | |
| continue; | |
| } | |
| if (p === b) break; | |
| for (; null === p.sibling; ) { | |
| if (null === p.return || p.return === b) return; | |
| p = p.return; | |
| } | |
| p.sibling.return = p.return; | |
| p = p.sibling; | |
| } | |
| }; | |
| Gi = function () {}; | |
| Ti = function (a, b, p, c, e) { | |
| var g = a.memoizedProps; | |
| if (g !== c) { | |
| var d = b.stateNode; | |
| yc(db.current); | |
| a = null; | |
| switch (p) { | |
| case "input": | |
| g = fb(d, g); | |
| c = fb(d, c); | |
| a = []; | |
| break; | |
| case "option": | |
| g = wb(d, g); | |
| c = wb(d, c); | |
| a = []; | |
| break; | |
| case "select": | |
| g = Jd({}, g, { value: void 0 }); | |
| c = Jd({}, c, { value: void 0 }); | |
| a = []; | |
| break; | |
| case "textarea": | |
| g = zd(d, g); | |
| c = zd(d, c); | |
| a = []; | |
| break; | |
| default: | |
| "function" !== typeof g.onClick && | |
| "function" === typeof c.onClick && | |
| (d.onclick = ad); | |
| } | |
| Nb(p, c); | |
| d = p = void 0; | |
| var l = null; | |
| for (p in g) | |
| if (!c.hasOwnProperty(p) && g.hasOwnProperty(p) && null != g[p]) | |
| if ("style" === p) { | |
| var h = g[p]; | |
| for (d in h) h.hasOwnProperty(d) && (l || (l = {}), (l[d] = "")); | |
| } else | |
| "dangerouslySetInnerHTML" !== p && | |
| "children" !== p && | |
| "suppressContentEditableWarning" !== p && | |
| "suppressHydrationWarning" !== p && | |
| "autoFocus" !== p && | |
| (nf.hasOwnProperty(p) | |
| ? a || (a = []) | |
| : (a = a || []).push(p, null)); | |
| for (p in c) { | |
| var k = c[p]; | |
| h = null != g ? g[p] : void 0; | |
| if (c.hasOwnProperty(p) && k !== h && (null != k || null != h)) | |
| if ("style" === p) | |
| if (h) { | |
| for (d in h) | |
| !h.hasOwnProperty(d) || | |
| (k && k.hasOwnProperty(d)) || | |
| (l || (l = {}), (l[d] = "")); | |
| for (d in k) | |
| k.hasOwnProperty(d) && | |
| h[d] !== k[d] && | |
| (l || (l = {}), (l[d] = k[d])); | |
| } else l || (a || (a = []), a.push(p, l)), (l = k); | |
| else | |
| "dangerouslySetInnerHTML" === p | |
| ? ((k = k ? k.__html : void 0), | |
| (h = h ? h.__html : void 0), | |
| null != k && h !== k && (a = a || []).push(p, "" + k)) | |
| : "children" === p | |
| ? h === k || | |
| ("string" !== typeof k && "number" !== typeof k) || | |
| (a = a || []).push(p, "" + k) | |
| : "suppressContentEditableWarning" !== p && | |
| "suppressHydrationWarning" !== p && | |
| (nf.hasOwnProperty(p) | |
| ? (null != k && nc(e, p), a || h === k || (a = [])) | |
| : (a = a || []).push(p, k)); | |
| } | |
| l && (a = a || []).push("style", l); | |
| if ((b.updateQueue = a)) b.effectTag |= 4; | |
| } | |
| }; | |
| ij = function (a, b, p, c) { | |
| p !== c && (b.effectTag |= 4); | |
| }; | |
| var Qh = "function" === typeof WeakSet ? WeakSet : Set, | |
| Vi = "function" === typeof WeakMap ? WeakMap : Map, | |
| Hi = ng.ReactCurrentDispatcher, | |
| Vh = ng.ReactCurrentOwner, | |
| kj = 1073741822, | |
| Uh = !1, | |
| Md = null, | |
| kg = null, | |
| Kf = 0, | |
| Sh = -1, | |
| Ri = !1, | |
| Ab = null, | |
| re = !1, | |
| hj = null, | |
| Fi = null, | |
| Si = null, | |
| Rh = null, | |
| dh = null, | |
| Of = null, | |
| Xi = 0, | |
| wi = void 0, | |
| Re = !1, | |
| eh = null, | |
| Od = 0, | |
| wh = 0, | |
| ei = !1, | |
| Ki = null, | |
| ff = !1, | |
| xh = !1, | |
| yf = null, | |
| Wi = jd.unstable_now(), | |
| Mg = 1073741822 - ((Wi / 10) | 0), | |
| xi = Mg, | |
| jj = 50, | |
| Ii = 0, | |
| Yi = null, | |
| Ji = !1; | |
| mc = function (a, b, p) { | |
| switch (b) { | |
| case "input": | |
| ya(a, p); | |
| b = p.name; | |
| if ("radio" === p.type && null != b) { | |
| for (p = a; p.parentNode; ) p = p.parentNode; | |
| p = p.querySelectorAll( | |
| "input[name\x3d" + JSON.stringify("" + b) + '][type\x3d"radio"]' | |
| ); | |
| for (b = 0; b < p.length; b++) { | |
| var c = p[b]; | |
| if (c !== a && c.form === a.form) { | |
| var e = I(c); | |
| e ? void 0 : t("90"); | |
| za(c); | |
| ya(c, e); | |
| } | |
| } | |
| } | |
| break; | |
| case "textarea": | |
| $a(a, p); | |
| break; | |
| case "select": | |
| (b = p.value), null != b && Cc(a, !!p.multiple, b, !1); | |
| } | |
| }; | |
| Cg.prototype.render = function (a) { | |
| this._defer ? void 0 : t("250"); | |
| this._hasChildren = !0; | |
| this._children = a; | |
| var b = this._root._internalRoot, | |
| p = this._expirationTime, | |
| c = new fe(); | |
| hf(a, b, null, p, c._onCommit); | |
| return c; | |
| }; | |
| Cg.prototype.then = function (a) { | |
| if (this._didComplete) a(); | |
| else { | |
| var b = this._callbacks; | |
| null === b && (b = this._callbacks = []); | |
| b.push(a); | |
| } | |
| }; | |
| Cg.prototype.commit = function () { | |
| var a = this._root._internalRoot, | |
| b = a.firstBatch; | |
| this._defer && null !== b ? void 0 : t("251"); | |
| if (this._hasChildren) { | |
| var p = this._expirationTime; | |
| if (b !== this) { | |
| this._hasChildren && | |
| ((p = this._expirationTime = b._expirationTime), | |
| this.render(this._children)); | |
| for (var c = null, e = b; e !== this; ) (c = e), (e = e._next); | |
| null === c ? t("251") : void 0; | |
| c._next = e._next; | |
| this._next = b; | |
| a.firstBatch = this; | |
| } | |
| this._defer = !1; | |
| Vc(a, p); | |
| b = this._next; | |
| this._next = null; | |
| b = a.firstBatch = b; | |
| null !== b && b._hasChildren && b.render(b._children); | |
| } else (this._next = null), (this._defer = !1); | |
| }; | |
| Cg.prototype._onComplete = function () { | |
| if (!this._didComplete) { | |
| this._didComplete = !0; | |
| var a = this._callbacks; | |
| if (null !== a) for (var b = 0; b < a.length; b++) (0, a[b])(); | |
| } | |
| }; | |
| fe.prototype.then = function (a) { | |
| if (this._didCommit) a(); | |
| else { | |
| var b = this._callbacks; | |
| null === b && (b = this._callbacks = []); | |
| b.push(a); | |
| } | |
| }; | |
| fe.prototype._onCommit = function () { | |
| if (!this._didCommit) { | |
| this._didCommit = !0; | |
| var a = this._callbacks; | |
| if (null !== a) | |
| for (var b = 0; b < a.length; b++) { | |
| var p = a[b]; | |
| "function" !== typeof p ? t("191", p) : void 0; | |
| p(); | |
| } | |
| } | |
| }; | |
| me.prototype.render = function (a, b) { | |
| var p = this._internalRoot, | |
| c = new fe(); | |
| b = void 0 === b ? null : b; | |
| null !== b && c.then(b); | |
| Pg(a, p, null, c._onCommit); | |
| return c; | |
| }; | |
| me.prototype.unmount = function (a) { | |
| var b = this._internalRoot, | |
| p = new fe(); | |
| a = void 0 === a ? null : a; | |
| null !== a && p.then(a); | |
| Pg(null, b, null, p._onCommit); | |
| return p; | |
| }; | |
| me.prototype.legacy_renderSubtreeIntoContainer = function (a, b, p) { | |
| var c = this._internalRoot, | |
| e = new fe(); | |
| p = void 0 === p ? null : p; | |
| null !== p && e.then(p); | |
| Pg(b, c, a, e._onCommit); | |
| return e; | |
| }; | |
| me.prototype.createBatch = function () { | |
| var a = new Cg(this), | |
| b = a._expirationTime, | |
| p = this._internalRoot, | |
| c = p.firstBatch; | |
| if (null === c) (p.firstBatch = a), (a._next = null); | |
| else { | |
| for (p = null; null !== c && c._expirationTime >= b; ) | |
| (p = c), (c = c._next); | |
| a._next = c; | |
| null !== p && (p._next = a); | |
| } | |
| return a; | |
| }; | |
| ia = Pd; | |
| Ca = Wh; | |
| fa = function () { | |
| Re || 0 === wh || (hc(wh, !1), (wh = 0)); | |
| }; | |
| var ji = { | |
| createPortal: ve, | |
| findDOMNode: function (a) { | |
| if (null == a) return null; | |
| if (1 === a.nodeType) return a; | |
| var b = a._reactInternalFiber; | |
| void 0 === b && | |
| ("function" === typeof a.render ? t("188") : t("268", Object.keys(a))); | |
| a = Yb(b); | |
| return (a = null === a ? null : a.stateNode); | |
| }, | |
| hydrate: function (a, b, p) { | |
| We(b) ? void 0 : t("200"); | |
| return ue(null, a, b, !0, p); | |
| }, | |
| render: function (a, b, p) { | |
| We(b) ? void 0 : t("200"); | |
| return ue(null, a, b, !1, p); | |
| }, | |
| unstable_renderSubtreeIntoContainer: function (a, b, p, c) { | |
| We(p) ? void 0 : t("200"); | |
| null == a || void 0 === a._reactInternalFiber ? t("38") : void 0; | |
| return ue(a, b, p, !1, c); | |
| }, | |
| unmountComponentAtNode: function (a) { | |
| We(a) ? void 0 : t("40"); | |
| return a._reactRootContainer | |
| ? (zf(function () { | |
| ue(null, null, a, !1, function () { | |
| a._reactRootContainer = null; | |
| }); | |
| }), | |
| !0) | |
| : !1; | |
| }, | |
| unstable_createPortal: function () { | |
| return ve.apply(void 0, arguments); | |
| }, | |
| unstable_batchedUpdates: Pd, | |
| unstable_interactiveUpdates: Wh, | |
| flushSync: function (a, b) { | |
| Re ? t("187") : void 0; | |
| var p = ff; | |
| ff = !0; | |
| try { | |
| return sd(a, b); | |
| } finally { | |
| (ff = p), hc(1073741823, !1); | |
| } | |
| }, | |
| unstable_createRoot: function (a, b) { | |
| We(a) ? void 0 : t("299", "unstable_createRoot"); | |
| return new me(a, !0, null != b && !0 === b.hydrate); | |
| }, | |
| unstable_flushControlled: function (a) { | |
| var b = ff; | |
| ff = !0; | |
| try { | |
| sd(a); | |
| } finally { | |
| (ff = b) || Re || hc(1073741823, !1); | |
| } | |
| }, | |
| __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: { | |
| Events: [ | |
| x, | |
| v, | |
| I, | |
| ag.injectEventPluginsByName, | |
| Ug, | |
| A, | |
| function (a) { | |
| e(a, O); | |
| }, | |
| ca, | |
| ra, | |
| nb, | |
| w, | |
| ], | |
| }, | |
| }; | |
| (function (a) { | |
| var b = a.findFiberByHostInstance; | |
| return Pa( | |
| Jd({}, a, { | |
| overrideProps: null, | |
| currentDispatcherRef: ng.ReactCurrentDispatcher, | |
| findHostInstanceByFiber: function (a) { | |
| a = Yb(a); | |
| return null === a ? null : a.stateNode; | |
| }, | |
| findFiberByHostInstance: function (a) { | |
| return b ? b(a) : null; | |
| }, | |
| }) | |
| ); | |
| })({ | |
| findFiberByHostInstance: y, | |
| bundleType: 0, | |
| version: "16.8.3", | |
| rendererPackageName: "react-dom", | |
| }); | |
| var uj = { default: ji }, | |
| vj = (uj && ji) || uj; | |
| r.exports = vj.default || vj; | |
| }; | |
| shadow$provide[17] = function (m, f, r, d) { | |
| function b() { | |
| if ( | |
| "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && | |
| "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE | |
| ) | |
| try { | |
| __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b); | |
| } catch (t) { | |
| console.error(t); | |
| } | |
| } | |
| b(); | |
| r.exports = f(12); | |
| }; | |
| shadow$provide[18] = function (m, f, r, d) { | |
| (function () { | |
| function b(b, a, k) { | |
| if (!f) | |
| throw Error( | |
| "textarea-caret-position#getCaretCoordinates should only be called in a browser" | |
| ); | |
| if ((k = (k && k.debug) || !1)) { | |
| var n = document.querySelector( | |
| "#input-textarea-caret-position-mirror-div" | |
| ); | |
| n && n.parentNode.removeChild(n); | |
| } | |
| n = document.createElement("div"); | |
| n.id = "input-textarea-caret-position-mirror-div"; | |
| document.body.appendChild(n); | |
| var c = n.style, | |
| e = window.getComputedStyle ? getComputedStyle(b) : b.currentStyle; | |
| c.whiteSpace = "pre-wrap"; | |
| "INPUT" !== b.nodeName && (c.wordWrap = "break-word"); | |
| c.position = "absolute"; | |
| k || (c.visibility = "hidden"); | |
| d.forEach(function (a) { | |
| c[a] = e[a]; | |
| }); | |
| h | |
| ? b.scrollHeight > parseInt(e.height) && (c.overflowY = "scroll") | |
| : (c.overflow = "hidden"); | |
| n.textContent = b.value.substring(0, a); | |
| "INPUT" === b.nodeName && | |
| (n.textContent = n.textContent.replace(/\s/g, " ")); | |
| var l = document.createElement("span"); | |
| l.textContent = b.value.substring(a) || "."; | |
| n.appendChild(l); | |
| b = { | |
| top: l.offsetTop + parseInt(e.borderTopWidth), | |
| left: l.offsetLeft + parseInt(e.borderLeftWidth), | |
| }; | |
| k ? (l.style.backgroundColor = "#aaa") : document.body.removeChild(n); | |
| return b; | |
| } | |
| var d = "direction boxSizing width height overflowX overflowY borderTopWidth borderRightWidth borderBottomWidth borderLeftWidth borderStyle paddingTop paddingRight paddingBottom paddingLeft fontStyle fontVariant fontWeight fontStretch fontSize fontSizeAdjust lineHeight fontFamily textAlign textTransform textIndent textDecoration letterSpacing wordSpacing tabSize MozTabSize".split( | |
| " " | |
| ), | |
| f = "undefined" !== typeof window, | |
| h = f && null != window.mozInnerScreenX; | |
| "undefined" != typeof r && "undefined" != typeof r.exports | |
| ? (r.exports = b) | |
| : f && (window.getCaretCoordinates = b); | |
| })(); | |
| }; | |
| shadow$provide[19] = function (m, f, r, d) { | |
| (function () { | |
| function b(b, d) { | |
| var h = getComputedStyle(b), | |
| a = "absolute" === h.position; | |
| d = d ? /(auto|scroll|hidden)/ : /(auto|scroll)/; | |
| if ("fixed" === h.position) return document.body; | |
| for (; (b = b.parentElement); ) | |
| if ( | |
| ((h = getComputedStyle(b)), | |
| (!a || "static" !== h.position) && | |
| d.test(h.overflow + h.overflowY + h.overflowX)) | |
| ) | |
| return b; | |
| return document.body; | |
| } | |
| var d = "undefined" !== typeof window; | |
| "undefined" != typeof r && "undefined" != typeof r.exports | |
| ? (r.exports = b) | |
| : d && (window.getScrollParent = b); | |
| })(); | |
| }; | |
| shadow$provide[20] = function (m, f, r, d) { | |
| r.exports = function () { | |
| if (!window) return !1; | |
| if ( | |
| "ontouchstart" in window || | |
| (window.DocumentTouch && document instanceof DocumentTouch) | |
| ) | |
| return !0; | |
| var b = [ | |
| "(", | |
| " -webkit- -moz- -o- -ms- ".split(" ").join("touch-enabled),("), | |
| "heartz)", | |
| ].join(""); | |
| return window.matchMedia(b).matches; | |
| }; | |
| }; | |
| shadow$provide[21] = function (m, f, r, d) { | |
| var b = self.crypto || self.msCrypto; | |
| r.exports = function (d) { | |
| d = d || 21; | |
| for (var f = "", h = b.getRandomValues(new Uint8Array(d)); 0 < d--; ) | |
| f += "Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz-"[ | |
| h[d] & 63 | |
| ]; | |
| return f; | |
| }; | |
| }; | |
| shadow$provide[22] = function (m, f, r, d) { | |
| var b, t, q, h, u, a, k, n, c, e, l, g, w, y, x, v, I, H, C, E; | |
| (function (a) { | |
| function b(a, b) { | |
| a !== c && | |
| ("function" === typeof Object.create | |
| ? Object.defineProperty(a, "__esModule", { value: !0 }) | |
| : (a.__esModule = !0)); | |
| return function (c, e) { | |
| return (a[c] = b ? b(c, e) : e); | |
| }; | |
| } | |
| var c = | |
| "object" === typeof m | |
| ? m | |
| : "object" === typeof self | |
| ? self | |
| : "object" === typeof this | |
| ? this | |
| : {}; | |
| "function" === typeof define && define.amd | |
| ? define("tslib", ["exports"], function (e) { | |
| a(b(c, b(e))); | |
| }) | |
| : "object" === typeof r && "object" === typeof r.exports | |
| ? a(b(c, b(r.exports))) | |
| : a(b(c)); | |
| })(function (d) { | |
| var f = | |
| Object.setPrototypeOf || | |
| ({ __proto__: [] } instanceof Array && | |
| function (a, b) { | |
| a.__proto__ = b; | |
| }) || | |
| function (a, b) { | |
| for (var c in b) b.hasOwnProperty(c) && (a[c] = b[c]); | |
| }; | |
| b = function (a, b) { | |
| function c() { | |
| this.constructor = a; | |
| } | |
| f(a, b); | |
| a.prototype = | |
| null === b ? Object.create(b) : ((c.prototype = b.prototype), new c()); | |
| }; | |
| t = | |
| Object.assign || | |
| function (a) { | |
| for (var b, c = 1, e = arguments.length; c < e; c++) { | |
| b = arguments[c]; | |
| for (var g in b) | |
| Object.prototype.hasOwnProperty.call(b, g) && (a[g] = b[g]); | |
| } | |
| return a; | |
| }; | |
| q = function (a, b) { | |
| var c = {}, | |
| e; | |
| for (e in a) | |
| Object.prototype.hasOwnProperty.call(a, e) && | |
| 0 > b.indexOf(e) && | |
| (c[e] = a[e]); | |
| if (null != a && "function" === typeof Object.getOwnPropertySymbols) { | |
| var g = 0; | |
| for (e = Object.getOwnPropertySymbols(a); g < e.length; g++) | |
| 0 > b.indexOf(e[g]) && | |
| Object.prototype.propertyIsEnumerable.call(a, e[g]) && | |
| (c[e[g]] = a[e[g]]); | |
| } | |
| return c; | |
| }; | |
| h = function (a, b, c, e) { | |
| var g = arguments.length, | |
| d = | |
| 3 > g | |
| ? b | |
| : null === e | |
| ? (e = Object.getOwnPropertyDescriptor(b, c)) | |
| : e, | |
| l; | |
| if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) | |
| d = Reflect.decorate(a, b, c, e); | |
| else | |
| for (var h = a.length - 1; 0 <= h; h--) | |
| if ((l = a[h])) | |
| d = (3 > g ? l(d) : 3 < g ? l(b, c, d) : l(b, c)) || d; | |
| return 3 < g && d && Object.defineProperty(b, c, d), d; | |
| }; | |
| u = function (a, b) { | |
| return function (c, e) { | |
| b(c, e, a); | |
| }; | |
| }; | |
| a = function (a, b) { | |
| if ("object" === typeof Reflect && "function" === typeof Reflect.metadata) | |
| return Reflect.metadata(a, b); | |
| }; | |
| k = function (a, b, c, e) { | |
| return new (c || (c = Promise))(function (g, d) { | |
| function l(a) { | |
| try { | |
| k(e.next(a)); | |
| } catch (N) { | |
| d(N); | |
| } | |
| } | |
| function h(a) { | |
| try { | |
| k(e["throw"](a)); | |
| } catch (N) { | |
| d(N); | |
| } | |
| } | |
| function k(a) { | |
| a.done | |
| ? g(a.value) | |
| : new c(function (b) { | |
| b(a.value); | |
| }).then(l, h); | |
| } | |
| k((e = e.apply(a, b || [])).next()); | |
| }); | |
| }; | |
| n = function (a, b) { | |
| function c(a) { | |
| return function (b) { | |
| return e([a, b]); | |
| }; | |
| } | |
| function e(c) { | |
| if (d) throw new TypeError("Generator is already executing."); | |
| for (; g; ) | |
| try { | |
| if ( | |
| ((d = 1), | |
| l && | |
| (h = | |
| c[0] & 2 | |
| ? l["return"] | |
| : c[0] | |
| ? l["throw"] || ((h = l["return"]) && h.call(l), 0) | |
| : l.next) && | |
| !(h = h.call(l, c[1])).done) | |
| ) | |
| return h; | |
| if (((l = 0), h)) c = [c[0] & 2, h.value]; | |
| switch (c[0]) { | |
| case 0: | |
| case 1: | |
| h = c; | |
| break; | |
| case 4: | |
| return g.label++, { value: c[1], done: !1 }; | |
| case 5: | |
| g.label++; | |
| l = c[1]; | |
| c = [0]; | |
| continue; | |
| case 7: | |
| c = g.ops.pop(); | |
| g.trys.pop(); | |
| continue; | |
| default: | |
| if ( | |
| !((h = g.trys), (h = 0 < h.length && h[h.length - 1])) && | |
| (6 === c[0] || 2 === c[0]) | |
| ) { | |
| g = 0; | |
| continue; | |
| } | |
| if (3 === c[0] && (!h || (c[1] > h[0] && c[1] < h[3]))) | |
| g.label = c[1]; | |
| else if (6 === c[0] && g.label < h[1]) | |
| (g.label = h[1]), (h = c); | |
| else if (h && g.label < h[2]) (g.label = h[2]), g.ops.push(c); | |
| else { | |
| h[2] && g.ops.pop(); | |
| g.trys.pop(); | |
| continue; | |
| } | |
| } | |
| c = b.call(a, g); | |
| } catch (N) { | |
| (c = [6, N]), (l = 0); | |
| } finally { | |
| d = h = 0; | |
| } | |
| if (c[0] & 5) throw c[1]; | |
| return { value: c[0] ? c[1] : void 0, done: !0 }; | |
| } | |
| var g = { | |
| label: 0, | |
| sent: function () { | |
| if (h[0] & 1) throw h[1]; | |
| return h[1]; | |
| }, | |
| trys: [], | |
| ops: [], | |
| }, | |
| d, | |
| l, | |
| h, | |
| k; | |
| return ( | |
| (k = { next: c(0), throw: c(1), return: c(2) }), | |
| "function" === typeof Symbol && | |
| (k[Symbol.iterator] = function () { | |
| return this; | |
| }), | |
| k | |
| ); | |
| }; | |
| c = function (a, b) { | |
| for (var c in a) b.hasOwnProperty(c) || (b[c] = a[c]); | |
| }; | |
| e = function (a) { | |
| var b = "function" === typeof Symbol && a[Symbol.iterator], | |
| c = 0; | |
| return b | |
| ? b.call(a) | |
| : { | |
| next: function () { | |
| a && c >= a.length && (a = void 0); | |
| return { value: a && a[c++], done: !a }; | |
| }, | |
| }; | |
| }; | |
| l = function (a, b) { | |
| var c = "function" === typeof Symbol && a[Symbol.iterator]; | |
| if (!c) return a; | |
| a = c.call(a); | |
| var e, | |
| g = []; | |
| try { | |
| for (; (void 0 === b || 0 < b--) && !(e = a.next()).done; ) | |
| g.push(e.value); | |
| } catch (F) { | |
| var d = { error: F }; | |
| } finally { | |
| try { | |
| e && !e.done && (c = a["return"]) && c.call(a); | |
| } finally { | |
| if (d) throw d.error; | |
| } | |
| } | |
| return g; | |
| }; | |
| g = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) | |
| a = a.concat(l(arguments[b])); | |
| return a; | |
| }; | |
| w = function () { | |
| for (var a = 0, b = 0, c = arguments.length; b < c; b++) | |
| a += arguments[b].length; | |
| a = Array(a); | |
| var e = 0; | |
| for (b = 0; b < c; b++) | |
| for (var g = arguments[b], d = 0, l = g.length; d < l; d++, e++) | |
| a[e] = g[d]; | |
| return a; | |
| }; | |
| y = function (a) { | |
| return this instanceof y ? ((this.v = a), this) : new y(a); | |
| }; | |
| x = function (a, b, c) { | |
| function e(a) { | |
| k[a] && | |
| (n[a] = function (b) { | |
| return new Promise(function (c, e) { | |
| 1 < v.push([a, b, c, e]) || g(a, b); | |
| }); | |
| }); | |
| } | |
| function g(a, b) { | |
| try { | |
| var c = k[a](b); | |
| c.value instanceof y | |
| ? Promise.resolve(c.value.v).then(d, l) | |
| : h(v[0][2], c); | |
| } catch (Y) { | |
| h(v[0][3], Y); | |
| } | |
| } | |
| function d(a) { | |
| g("next", a); | |
| } | |
| function l(a) { | |
| g("throw", a); | |
| } | |
| function h(a, b) { | |
| (a(b), v.shift(), v.length) && g(v[0][0], v[0][1]); | |
| } | |
| if (!Symbol.asyncIterator) | |
| throw new TypeError("Symbol.asyncIterator is not defined."); | |
| var k = c.apply(a, b || []), | |
| n, | |
| v = []; | |
| return ( | |
| (n = {}), | |
| e("next"), | |
| e("throw"), | |
| e("return"), | |
| (n[Symbol.asyncIterator] = function () { | |
| return this; | |
| }), | |
| n | |
| ); | |
| }; | |
| v = function (a) { | |
| function b(b, g) { | |
| c[b] = a[b] | |
| ? function (c) { | |
| return (e = !e) | |
| ? { value: y(a[b](c)), done: "return" === b } | |
| : g | |
| ? g(c) | |
| : c; | |
| } | |
| : g; | |
| } | |
| var c, e; | |
| return ( | |
| (c = {}), | |
| b("next"), | |
| b("throw", function (a) { | |
| throw a; | |
| }), | |
| b("return"), | |
| (c[Symbol.iterator] = function () { | |
| return this; | |
| }), | |
| c | |
| ); | |
| }; | |
| I = function (a) { | |
| function b(b) { | |
| d[b] = | |
| a[b] && | |
| function (e) { | |
| return new Promise(function (g, d) { | |
| e = a[b](e); | |
| c(g, d, e.done, e.value); | |
| }); | |
| }; | |
| } | |
| function c(a, b, c, e) { | |
| Promise.resolve(e).then(function (b) { | |
| a({ value: b, done: c }); | |
| }, b); | |
| } | |
| if (!Symbol.asyncIterator) | |
| throw new TypeError("Symbol.asyncIterator is not defined."); | |
| var g = a[Symbol.asyncIterator], | |
| d; | |
| return g | |
| ? g.call(a) | |
| : ((a = "function" === typeof e ? e(a) : a[Symbol.iterator]()), | |
| (d = {}), | |
| b("next"), | |
| b("throw"), | |
| b("return"), | |
| (d[Symbol.asyncIterator] = function () { | |
| return this; | |
| }), | |
| d); | |
| }; | |
| H = function (a, b) { | |
| Object.defineProperty | |
| ? Object.defineProperty(a, "raw", { value: b }) | |
| : (a.raw = b); | |
| return a; | |
| }; | |
| C = function (a) { | |
| if (a && a.__esModule) return a; | |
| var b = {}; | |
| if (null != a) | |
| for (var c in a) Object.hasOwnProperty.call(a, c) && (b[c] = a[c]); | |
| b["default"] = a; | |
| return b; | |
| }; | |
| E = function (a) { | |
| return a && a.__esModule ? a : { default: a }; | |
| }; | |
| d("__extends", b); | |
| d("__assign", t); | |
| d("__rest", q); | |
| d("__decorate", h); | |
| d("__param", u); | |
| d("__metadata", a); | |
| d("__awaiter", k); | |
| d("__generator", n); | |
| d("__exportStar", c); | |
| d("__values", e); | |
| d("__read", l); | |
| d("__spread", g); | |
| d("__spreadArrays", w); | |
| d("__await", y); | |
| d("__asyncGenerator", x); | |
| d("__asyncDelegator", v); | |
| d("__asyncValues", I); | |
| d("__makeTemplateObject", H); | |
| d("__importStar", C); | |
| d("__importDefault", E); | |
| }); | |
| }; | |
| shadow$provide[23] = function (m, f, r, d) { | |
| function b(a, c) { | |
| if (!(c instanceof Object)) return c; | |
| switch (c.constructor) { | |
| case Date: | |
| return new Date(c.getTime()); | |
| case Object: | |
| void 0 === a && (a = {}); | |
| break; | |
| case Array: | |
| a = []; | |
| break; | |
| default: | |
| return c; | |
| } | |
| for (var e in c) c.hasOwnProperty(e) && (a[e] = b(a[e], c[e])); | |
| return a; | |
| } | |
| function t() { | |
| return "undefined" !== typeof navigator && | |
| "string" === typeof navigator.userAgent | |
| ? navigator.userAgent | |
| : ""; | |
| } | |
| function q(a, b) { | |
| return a.replace(I, function (a, c) { | |
| a = b[c]; | |
| return null != a ? a.toString() : "\x3c" + c + "?\x3e"; | |
| }); | |
| } | |
| function h(a) { | |
| return JSON.parse(a); | |
| } | |
| function u(a, b) { | |
| if ("object" !== typeof a || null === a) return !1; | |
| for (var c = 0; c < b.length; c++) { | |
| var e = b[c]; | |
| if (e in a && "function" === typeof a[e]) return !0; | |
| } | |
| return !1; | |
| } | |
| function a() {} | |
| function k(a, b, c) { | |
| switch (b) { | |
| case 1: | |
| b = c ? "first" : "First"; | |
| break; | |
| case 2: | |
| b = c ? "second" : "Second"; | |
| break; | |
| case 3: | |
| b = c ? "third" : "Third"; | |
| break; | |
| case 4: | |
| b = c ? "fourth" : "Fourth"; | |
| break; | |
| default: | |
| throw Error( | |
| "errorPrefix called with argumentNumber \x3e 4. Need to update it?" | |
| ); | |
| } | |
| return a + " failed: " + (b + " argument "); | |
| } | |
| Object.defineProperty(d, "__esModule", { value: !0 }); | |
| var n = f(22), | |
| c = { NODE_CLIENT: !1, NODE_ADMIN: !1, SDK_VERSION: "${JSCORE_VERSION}" }, | |
| e = function (a, b) { | |
| if (!a) throw l(b); | |
| }, | |
| l = function (a) { | |
| return Error( | |
| "Firebase Database (" + c.SDK_VERSION + ") INTERNAL ASSERT FAILED: " + a | |
| ); | |
| }, | |
| g = function (a) { | |
| for (var b = [], c = 0, e = 0; e < a.length; e++) { | |
| var g = a.charCodeAt(e); | |
| 128 > g | |
| ? (b[c++] = g) | |
| : (2048 > g | |
| ? (b[c++] = (g >> 6) | 192) | |
| : (55296 === (g & 64512) && | |
| e + 1 < a.length && | |
| 56320 === (a.charCodeAt(e + 1) & 64512) | |
| ? ((g = | |
| 65536 + ((g & 1023) << 10) + (a.charCodeAt(++e) & 1023)), | |
| (b[c++] = (g >> 18) | 240), | |
| (b[c++] = ((g >> 12) & 63) | 128)) | |
| : (b[c++] = (g >> 12) | 224), | |
| (b[c++] = ((g >> 6) & 63) | 128)), | |
| (b[c++] = (g & 63) | 128)); | |
| } | |
| return b; | |
| }, | |
| w = { | |
| byteToCharMap_: null, | |
| charToByteMap_: null, | |
| byteToCharMapWebSafe_: null, | |
| charToByteMapWebSafe_: null, | |
| ENCODED_VALS_BASE: | |
| "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", | |
| get ENCODED_VALS() { | |
| return this.ENCODED_VALS_BASE + "+/\x3d"; | |
| }, | |
| get ENCODED_VALS_WEBSAFE() { | |
| return this.ENCODED_VALS_BASE + "-_."; | |
| }, | |
| HAS_NATIVE_SUPPORT: "function" === typeof atob, | |
| encodeByteArray: function (a, b) { | |
| if (!Array.isArray(a)) | |
| throw Error("encodeByteArray takes an array as a parameter"); | |
| this.init_(); | |
| b = b ? this.byteToCharMapWebSafe_ : this.byteToCharMap_; | |
| for (var c = [], e = 0; e < a.length; e += 3) { | |
| var g = a[e], | |
| d = e + 1 < a.length, | |
| l = d ? a[e + 1] : 0, | |
| h = e + 2 < a.length, | |
| k = h ? a[e + 2] : 0, | |
| n = g >> 2; | |
| g = ((g & 3) << 4) | (l >> 4); | |
| l = ((l & 15) << 2) | (k >> 6); | |
| k &= 63; | |
| h || ((k = 64), d || (l = 64)); | |
| c.push(b[n], b[g], b[l], b[k]); | |
| } | |
| return c.join(""); | |
| }, | |
| encodeString: function (a, b) { | |
| return this.HAS_NATIVE_SUPPORT && !b | |
| ? btoa(a) | |
| : this.encodeByteArray(g(a), b); | |
| }, | |
| decodeString: function (a, b) { | |
| if (this.HAS_NATIVE_SUPPORT && !b) return atob(a); | |
| a = this.decodeStringToByteArray(a, b); | |
| b = []; | |
| for (var c = 0, e = 0; c < a.length; ) { | |
| var g = a[c++]; | |
| if (128 > g) b[e++] = String.fromCharCode(g); | |
| else if (191 < g && 224 > g) { | |
| var d = a[c++]; | |
| b[e++] = String.fromCharCode(((g & 31) << 6) | (d & 63)); | |
| } else if (239 < g && 365 > g) { | |
| d = a[c++]; | |
| var l = a[c++], | |
| h = a[c++]; | |
| g = | |
| (((g & 7) << 18) | | |
| ((d & 63) << 12) | | |
| ((l & 63) << 6) | | |
| (h & 63)) - | |
| 65536; | |
| b[e++] = String.fromCharCode(55296 + (g >> 10)); | |
| b[e++] = String.fromCharCode(56320 + (g & 1023)); | |
| } else | |
| (d = a[c++]), | |
| (l = a[c++]), | |
| (b[e++] = String.fromCharCode( | |
| ((g & 15) << 12) | ((d & 63) << 6) | (l & 63) | |
| )); | |
| } | |
| return b.join(""); | |
| }, | |
| decodeStringToByteArray: function (a, b) { | |
| this.init_(); | |
| b = b ? this.charToByteMapWebSafe_ : this.charToByteMap_; | |
| for (var c = [], e = 0; e < a.length; ) { | |
| var g = b[a.charAt(e++)], | |
| d = e < a.length ? b[a.charAt(e)] : 0; | |
| ++e; | |
| var l = e < a.length ? b[a.charAt(e)] : 64; | |
| ++e; | |
| var h = e < a.length ? b[a.charAt(e)] : 64; | |
| ++e; | |
| if (null == g || null == d || null == l || null == h) throw Error(); | |
| c.push((g << 2) | (d >> 4)); | |
| 64 !== l && | |
| (c.push(((d << 4) & 240) | (l >> 2)), | |
| 64 !== h && c.push(((l << 6) & 192) | h)); | |
| } | |
| return c; | |
| }, | |
| init_: function () { | |
| if (!this.byteToCharMap_) { | |
| this.byteToCharMap_ = {}; | |
| this.charToByteMap_ = {}; | |
| this.byteToCharMapWebSafe_ = {}; | |
| this.charToByteMapWebSafe_ = {}; | |
| for (var a = 0; a < this.ENCODED_VALS.length; a++) | |
| (this.byteToCharMap_[a] = this.ENCODED_VALS.charAt(a)), | |
| (this.charToByteMap_[this.byteToCharMap_[a]] = a), | |
| (this.byteToCharMapWebSafe_[a] = this.ENCODED_VALS_WEBSAFE.charAt( | |
| a | |
| )), | |
| (this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[a]] = a), | |
| a >= this.ENCODED_VALS_BASE.length && | |
| ((this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(a)] = a), | |
| (this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(a)] = a)); | |
| } | |
| }, | |
| }, | |
| y = function (a) { | |
| try { | |
| return w.decodeString(a, !0); | |
| } catch (G) { | |
| console.error("base64Decode failed: ", G); | |
| } | |
| return null; | |
| }; | |
| f = (function () { | |
| function a() { | |
| var a = this; | |
| this.reject = function () {}; | |
| this.resolve = function () {}; | |
| this.promise = new Promise(function (b, c) { | |
| a.resolve = b; | |
| a.reject = c; | |
| }); | |
| } | |
| a.prototype.wrapCallback = function (a) { | |
| var b = this; | |
| return function (c, e) { | |
| c ? b.reject(c) : b.resolve(e); | |
| "function" === typeof a && | |
| (b.promise.catch(function () {}), 1 === a.length ? a(c) : a(c, e)); | |
| }; | |
| }; | |
| return a; | |
| })(); | |
| var x = (function (a) { | |
| function b(c, e) { | |
| e = a.call(this, e) || this; | |
| e.code = c; | |
| e.name = "FirebaseError"; | |
| Object.setPrototypeOf(e, b.prototype); | |
| Error.captureStackTrace && | |
| Error.captureStackTrace(e, v.prototype.create); | |
| return e; | |
| } | |
| n.__extends(b, a); | |
| return b; | |
| })(Error), | |
| v = (function () { | |
| function a(a, b, c) { | |
| this.service = a; | |
| this.serviceName = b; | |
| this.errors = c; | |
| } | |
| a.prototype.create = function (a) { | |
| for (var b = [], c = 1; c < arguments.length; c++) | |
| b[c - 1] = arguments[c]; | |
| b = b[0] || {}; | |
| c = this.service + "/" + a; | |
| var e = this.errors[a]; | |
| e = e ? q(e, b) : "Error"; | |
| c = new x(c, this.serviceName + ": " + e + " (" + c + ")."); | |
| e = 0; | |
| for (var g = Object.keys(b); e < g.length; e++) { | |
| var d = g[e]; | |
| "_" !== d.slice(-1) && | |
| (d in c && | |
| console.warn( | |
| 'Overwriting FirebaseError base field "' + | |
| d + | |
| '" can cause unexpected behavior.' | |
| ), | |
| (c[d] = b[d])); | |
| } | |
| return c; | |
| }; | |
| return a; | |
| })(), | |
| I = /\{\$([^}]+)}/g, | |
| H = function (a) { | |
| var b = {}, | |
| c = {}, | |
| e = {}, | |
| g = ""; | |
| try { | |
| var d = a.split("."); | |
| b = h(y(d[0]) || ""); | |
| c = h(y(d[1]) || ""); | |
| g = d[2]; | |
| e = c.d || {}; | |
| delete c.d; | |
| } catch (D) {} | |
| return { header: b, claims: c, data: e, signature: g }; | |
| }; | |
| r = (function () { | |
| function a() { | |
| this.chain_ = []; | |
| this.buf_ = []; | |
| this.W_ = []; | |
| this.pad_ = []; | |
| this.total_ = this.inbuf_ = 0; | |
| this.blockSize = 64; | |
| this.pad_[0] = 128; | |
| for (var a = 1; a < this.blockSize; ++a) this.pad_[a] = 0; | |
| this.reset(); | |
| } | |
| a.prototype.reset = function () { | |
| this.chain_[0] = 1732584193; | |
| this.chain_[1] = 4023233417; | |
| this.chain_[2] = 2562383102; | |
| this.chain_[3] = 271733878; | |
| this.chain_[4] = 3285377520; | |
| this.total_ = this.inbuf_ = 0; | |
| }; | |
| a.prototype.compress_ = function (a, b) { | |
| b || (b = 0); | |
| var c = this.W_; | |
| if ("string" === typeof a) | |
| for (var e = 0; 16 > e; e++) | |
| (c[e] = | |
| (a.charCodeAt(b) << 24) | | |
| (a.charCodeAt(b + 1) << 16) | | |
| (a.charCodeAt(b + 2) << 8) | | |
| a.charCodeAt(b + 3)), | |
| (b += 4); | |
| else | |
| for (e = 0; 16 > e; e++) | |
| (c[e] = (a[b] << 24) | (a[b + 1] << 16) | (a[b + 2] << 8) | a[b + 3]), | |
| (b += 4); | |
| for (e = 16; 80 > e; e++) { | |
| var g = c[e - 3] ^ c[e - 8] ^ c[e - 14] ^ c[e - 16]; | |
| c[e] = ((g << 1) | (g >>> 31)) & 4294967295; | |
| } | |
| a = this.chain_[0]; | |
| b = this.chain_[1]; | |
| var d = this.chain_[2], | |
| l = this.chain_[3], | |
| h = this.chain_[4]; | |
| for (e = 0; 80 > e; e++) { | |
| if (40 > e) | |
| if (20 > e) { | |
| g = l ^ (b & (d ^ l)); | |
| var k = 1518500249; | |
| } else (g = b ^ d ^ l), (k = 1859775393); | |
| else | |
| 60 > e | |
| ? ((g = (b & d) | (l & (b | d))), (k = 2400959708)) | |
| : ((g = b ^ d ^ l), (k = 3395469782)); | |
| g = (((a << 5) | (a >>> 27)) + g + h + k + c[e]) & 4294967295; | |
| h = l; | |
| l = d; | |
| d = ((b << 30) | (b >>> 2)) & 4294967295; | |
| b = a; | |
| a = g; | |
| } | |
| this.chain_[0] = (this.chain_[0] + a) & 4294967295; | |
| this.chain_[1] = (this.chain_[1] + b) & 4294967295; | |
| this.chain_[2] = (this.chain_[2] + d) & 4294967295; | |
| this.chain_[3] = (this.chain_[3] + l) & 4294967295; | |
| this.chain_[4] = (this.chain_[4] + h) & 4294967295; | |
| }; | |
| a.prototype.update = function (a, b) { | |
| if (null != a) { | |
| void 0 === b && (b = a.length); | |
| for ( | |
| var c = b - this.blockSize, e = 0, g = this.buf_, d = this.inbuf_; | |
| e < b; | |
| ) { | |
| if (0 === d) | |
| for (; e <= c; ) this.compress_(a, e), (e += this.blockSize); | |
| if ("string" === typeof a) | |
| for (; e < b; ) { | |
| if (((g[d] = a.charCodeAt(e)), ++d, ++e, d === this.blockSize)) { | |
| this.compress_(g); | |
| d = 0; | |
| break; | |
| } | |
| } | |
| else | |
| for (; e < b; ) | |
| if (((g[d] = a[e]), ++d, ++e, d === this.blockSize)) { | |
| this.compress_(g); | |
| d = 0; | |
| break; | |
| } | |
| } | |
| this.inbuf_ = d; | |
| this.total_ += b; | |
| } | |
| }; | |
| a.prototype.digest = function () { | |
| var a = [], | |
| b = 8 * this.total_; | |
| 56 > this.inbuf_ | |
| ? this.update(this.pad_, 56 - this.inbuf_) | |
| : this.update(this.pad_, this.blockSize - (this.inbuf_ - 56)); | |
| for (var c = this.blockSize - 1; 56 <= c; c--) | |
| (this.buf_[c] = b & 255), (b /= 256); | |
| this.compress_(this.buf_); | |
| for (c = b = 0; 5 > c; c++) | |
| for (var e = 24; 0 <= e; e -= 8) | |
| (a[b] = (this.chain_[c] >> e) & 255), ++b; | |
| return a; | |
| }; | |
| return a; | |
| })(); | |
| var C = (function () { | |
| function b(a, b) { | |
| var c = this; | |
| this.observers = []; | |
| this.unsubscribes = []; | |
| this.observerCount = 0; | |
| this.task = Promise.resolve(); | |
| this.finalized = !1; | |
| this.onNoObservers = b; | |
| this.task | |
| .then(function () { | |
| a(c); | |
| }) | |
| .catch(function (a) { | |
| c.error(a); | |
| }); | |
| } | |
| b.prototype.next = function (a) { | |
| this.forEachObserver(function (b) { | |
| b.next(a); | |
| }); | |
| }; | |
| b.prototype.error = function (a) { | |
| this.forEachObserver(function (b) { | |
| b.error(a); | |
| }); | |
| this.close(a); | |
| }; | |
| b.prototype.complete = function () { | |
| this.forEachObserver(function (a) { | |
| a.complete(); | |
| }); | |
| this.close(); | |
| }; | |
| b.prototype.subscribe = function (b, c, e) { | |
| var g = this; | |
| if (void 0 === b && void 0 === c && void 0 === e) | |
| throw Error("Missing Observer."); | |
| var d = u(b, ["next", "error", "complete"]) | |
| ? b | |
| : { next: b, error: c, complete: e }; | |
| void 0 === d.next && (d.next = a); | |
| void 0 === d.error && (d.error = a); | |
| void 0 === d.complete && (d.complete = a); | |
| b = this.unsubscribeOne.bind(this, this.observers.length); | |
| this.finalized && | |
| this.task.then(function () { | |
| try { | |
| g.finalError ? d.error(g.finalError) : d.complete(); | |
| } catch (D) {} | |
| }); | |
| this.observers.push(d); | |
| return b; | |
| }; | |
| b.prototype.unsubscribeOne = function (a) { | |
| if ( | |
| void 0 !== this.observers && | |
| void 0 !== this.observers[a] && | |
| (delete this.observers[a], | |
| --this.observerCount, | |
| 0 === this.observerCount && void 0 !== this.onNoObservers) | |
| ) | |
| this.onNoObservers(this); | |
| }; | |
| b.prototype.forEachObserver = function (a) { | |
| if (!this.finalized) | |
| for (var b = 0; b < this.observers.length; b++) this.sendOne(b, a); | |
| }; | |
| b.prototype.sendOne = function (a, b) { | |
| var c = this; | |
| this.task.then(function () { | |
| if (void 0 !== c.observers && void 0 !== c.observers[a]) | |
| try { | |
| b(c.observers[a]); | |
| } catch (z) { | |
| "undefined" !== typeof console && console.error && console.error(z); | |
| } | |
| }); | |
| }; | |
| b.prototype.close = function (a) { | |
| var b = this; | |
| this.finalized || | |
| ((this.finalized = !0), | |
| void 0 !== a && (this.finalError = a), | |
| this.task.then(function () { | |
| b.observers = void 0; | |
| b.onNoObservers = void 0; | |
| })); | |
| }; | |
| return b; | |
| })(); | |
| d.CONSTANTS = c; | |
| d.Deferred = f; | |
| d.ErrorFactory = v; | |
| d.FirebaseError = x; | |
| d.Sha1 = r; | |
| d.assert = e; | |
| d.assertionError = l; | |
| d.async = function (a, b) { | |
| return function () { | |
| for (var c = [], e = 0; e < arguments.length; e++) c[e] = arguments[e]; | |
| Promise.resolve(!0) | |
| .then(function () { | |
| a.apply(void 0, c); | |
| }) | |
| .catch(function (a) { | |
| b && b(a); | |
| }); | |
| }; | |
| }; | |
| d.base64 = w; | |
| d.base64Decode = y; | |
| d.base64Encode = function (a) { | |
| a = g(a); | |
| return w.encodeByteArray(a, !0); | |
| }; | |
| d.contains = function (a, b) { | |
| return Object.prototype.hasOwnProperty.call(a, b); | |
| }; | |
| d.createSubscribe = function (a, b) { | |
| a = new C(a, b); | |
| return a.subscribe.bind(a); | |
| }; | |
| d.decode = H; | |
| d.deepCopy = function (a) { | |
| return b(void 0, a); | |
| }; | |
| d.deepExtend = b; | |
| d.errorPrefix = k; | |
| d.getUA = t; | |
| d.isAdmin = function (a) { | |
| a = H(a).claims; | |
| return "object" === typeof a && !0 === a.admin; | |
| }; | |
| d.isBrowser = function () { | |
| return "object" === typeof self && self.self === self; | |
| }; | |
| d.isBrowserExtension = function () { | |
| var a = | |
| "object" === typeof chrome | |
| ? chrome.runtime | |
| : "object" === typeof browser | |
| ? browser.runtime | |
| : void 0; | |
| return "object" === typeof a && void 0 !== a.id; | |
| }; | |
| d.isElectron = function () { | |
| return 0 <= t().indexOf("Electron/"); | |
| }; | |
| d.isEmpty = function (a) { | |
| for (var b in a) if (Object.prototype.hasOwnProperty.call(a, b)) return !1; | |
| return !0; | |
| }; | |
| d.isIE = function () { | |
| var a = t(); | |
| return 0 <= a.indexOf("MSIE ") || 0 <= a.indexOf("Trident/"); | |
| }; | |
| d.isMobileCordova = function () { | |
| return ( | |
| "undefined" !== typeof window && | |
| !!(window.cordova || window.phonegap || window.PhoneGap) && | |
| /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(t()) | |
| ); | |
| }; | |
| d.isNode = function () { | |
| try { | |
| return "[object process]" === Object.prototype.toString.call(m.process); | |
| } catch (E) { | |
| return !1; | |
| } | |
| }; | |
| d.isNodeSdk = function () { | |
| return !0 === c.NODE_CLIENT || !0 === c.NODE_ADMIN; | |
| }; | |
| d.isReactNative = function () { | |
| return "object" === typeof navigator && "ReactNative" === navigator.product; | |
| }; | |
| d.isUWP = function () { | |
| return 0 <= t().indexOf("MSAppHost/"); | |
| }; | |
| d.isValidFormat = function (a) { | |
| a = H(a).claims; | |
| return !!a && "object" === typeof a && a.hasOwnProperty("iat"); | |
| }; | |
| d.isValidTimestamp = function (a) { | |
| a = H(a).claims; | |
| var b = Math.floor(new Date().getTime() / 1e3), | |
| c = 0, | |
| e = 0; | |
| "object" === typeof a && | |
| (a.hasOwnProperty("nbf") | |
| ? (c = a.nbf) | |
| : a.hasOwnProperty("iat") && (c = a.iat), | |
| (e = a.hasOwnProperty("exp") ? a.exp : c + 86400)); | |
| return !!b && !!c && !!e && b >= c && b <= e; | |
| }; | |
| d.issuedAtTime = function (a) { | |
| a = H(a).claims; | |
| return "object" === typeof a && a.hasOwnProperty("iat") ? a.iat : null; | |
| }; | |
| d.jsonEval = h; | |
| d.map = function (a, b, c) { | |
| var e = {}, | |
| g; | |
| for (g in a) | |
| Object.prototype.hasOwnProperty.call(a, g) && | |
| (e[g] = b.call(c, a[g], g, a)); | |
| return e; | |
| }; | |
| d.querystring = function (a) { | |
| var b = [], | |
| c = function (a, c) { | |
| Array.isArray(c) | |
| ? c.forEach(function (c) { | |
| b.push(encodeURIComponent(a) + "\x3d" + encodeURIComponent(c)); | |
| }) | |
| : b.push(encodeURIComponent(a) + "\x3d" + encodeURIComponent(c)); | |
| }, | |
| e = 0; | |
| for (a = Object.entries(a); e < a.length; e++) { | |
| var g = a[e]; | |
| c(g[0], g[1]); | |
| } | |
| return b.length ? "\x26" + b.join("\x26") : ""; | |
| }; | |
| d.querystringDecode = function (a) { | |
| var b = {}; | |
| a.replace(/^\?/, "") | |
| .split("\x26") | |
| .forEach(function (a) { | |
| a && ((a = a.split("\x3d")), (b[a[0]] = a[1])); | |
| }); | |
| return b; | |
| }; | |
| d.safeGet = function (a, b) { | |
| if (Object.prototype.hasOwnProperty.call(a, b)) return a[b]; | |
| }; | |
| d.stringLength = function (a) { | |
| for (var b = 0, c = 0; c < a.length; c++) { | |
| var e = a.charCodeAt(c); | |
| 128 > e | |
| ? b++ | |
| : 2048 > e | |
| ? (b += 2) | |
| : 55296 <= e && 56319 >= e | |
| ? ((b += 4), c++) | |
| : (b += 3); | |
| } | |
| return b; | |
| }; | |
| d.stringToByteArray = function (a) { | |
| for (var b = [], c = 0, g = 0; g < a.length; g++) { | |
| var d = a.charCodeAt(g); | |
| if (55296 <= d && 56319 >= d) { | |
| d -= 55296; | |
| g++; | |
| e(g < a.length, "Surrogate pair missing trail surrogate."); | |
| var l = a.charCodeAt(g) - 56320; | |
| d = 65536 + (d << 10) + l; | |
| } | |
| 128 > d | |
| ? (b[c++] = d) | |
| : (2048 > d | |
| ? (b[c++] = (d >> 6) | 192) | |
| : (65536 > d | |
| ? (b[c++] = (d >> 12) | 224) | |
| : ((b[c++] = (d >> 18) | 240), | |
| (b[c++] = ((d >> 12) & 63) | 128)), | |
| (b[c++] = ((d >> 6) & 63) | 128)), | |
| (b[c++] = (d & 63) | 128)); | |
| } | |
| return b; | |
| }; | |
| d.stringify = function (a) { | |
| return JSON.stringify(a); | |
| }; | |
| d.validateArgCount = function (a, b, c, e) { | |
| var g; | |
| e < b | |
| ? (g = "at least " + b) | |
| : e > c && (g = 0 === c ? "none" : "no more than " + c); | |
| if (g) | |
| throw Error( | |
| a + | |
| " failed: Was called with " + | |
| e + | |
| (1 === e ? " argument." : " arguments.") + | |
| " Expects " + | |
| g + | |
| "." | |
| ); | |
| }; | |
| d.validateCallback = function (a, b, c, e) { | |
| if ((!e || c) && "function" !== typeof c) | |
| throw Error(k(a, b, e) + "must be a valid function."); | |
| }; | |
| d.validateContextObject = function (a, b, c, e) { | |
| if (!e || c) | |
| if ("object" !== typeof c || null === c) | |
| throw Error(k(a, b, e) + "must be a valid context object."); | |
| }; | |
| d.validateNamespace = function (a, b, c, e) { | |
| if ((!e || c) && "string" !== typeof c) | |
| throw Error(k(a, b, e) + "must be a valid firebase namespace."); | |
| }; | |
| }; | |
| shadow$provide[24] = function (m, f, r, d) { | |
| Object.defineProperty(d, "__esModule", { value: !0 }); | |
| var b = f(22), | |
| t = f(23); | |
| m = (function () { | |
| function b(b, a, d) { | |
| this.name = b; | |
| this.instanceFactory = a; | |
| this.type = d; | |
| this.multipleInstances = !1; | |
| this.serviceProps = {}; | |
| this.instantiationMode = "LAZY"; | |
| } | |
| b.prototype.setInstantiationMode = function (b) { | |
| this.instantiationMode = b; | |
| return this; | |
| }; | |
| b.prototype.setMultipleInstances = function (b) { | |
| this.multipleInstances = b; | |
| return this; | |
| }; | |
| b.prototype.setServiceProps = function (b) { | |
| this.serviceProps = b; | |
| return this; | |
| }; | |
| return b; | |
| })(); | |
| var q = (function () { | |
| function d(b, a) { | |
| this.name = b; | |
| this.container = a; | |
| this.component = null; | |
| this.instances = new Map(); | |
| this.instancesDeferred = new Map(); | |
| } | |
| d.prototype.get = function (b) { | |
| void 0 === b && (b = "[DEFAULT]"); | |
| b = this.normalizeInstanceIdentifier(b); | |
| if (!this.instancesDeferred.has(b)) { | |
| var a = new t.Deferred(); | |
| this.instancesDeferred.set(b, a); | |
| try { | |
| var d = this.getOrInitializeService(b); | |
| d && a.resolve(d); | |
| } catch (n) {} | |
| } | |
| return this.instancesDeferred.get(b).promise; | |
| }; | |
| d.prototype.getImmediate = function (d) { | |
| var a = b.__assign({ identifier: "[DEFAULT]", optional: !1 }, d); | |
| d = a.optional; | |
| a = this.normalizeInstanceIdentifier(a.identifier); | |
| try { | |
| var h = this.getOrInitializeService(a); | |
| if (!h) { | |
| if (d) return null; | |
| throw Error("Service " + this.name + " is not available"); | |
| } | |
| return h; | |
| } catch (n) { | |
| if (d) return null; | |
| throw n; | |
| } | |
| }; | |
| d.prototype.getComponent = function () { | |
| return this.component; | |
| }; | |
| d.prototype.setComponent = function (d) { | |
| var a; | |
| if (d.name !== this.name) | |
| throw Error( | |
| "Mismatching Component " + d.name + " for Provider " + this.name + "." | |
| ); | |
| if (this.component) | |
| throw Error( | |
| "Component for " + this.name + " has already been provided" | |
| ); | |
| this.component = d; | |
| if ("EAGER" === d.instantiationMode) | |
| try { | |
| this.getOrInitializeService("[DEFAULT]"); | |
| } catch (y) {} | |
| try { | |
| for ( | |
| var h = b.__values(this.instancesDeferred.entries()), n = h.next(); | |
| !n.done; | |
| n = h.next() | |
| ) { | |
| var c = b.__read(n.value, 2), | |
| e = c[1], | |
| l = this.normalizeInstanceIdentifier(c[0]); | |
| try { | |
| var g = this.getOrInitializeService(l); | |
| e.resolve(g); | |
| } catch (y) {} | |
| } | |
| } catch (y) { | |
| var f = { error: y }; | |
| } finally { | |
| try { | |
| n && !n.done && (a = h.return) && a.call(h); | |
| } finally { | |
| if (f) throw f.error; | |
| } | |
| } | |
| }; | |
| d.prototype.clearInstance = function (b) { | |
| void 0 === b && (b = "[DEFAULT]"); | |
| this.instancesDeferred.delete(b); | |
| this.instances.delete(b); | |
| }; | |
| d.prototype.delete = function () { | |
| return b.__awaiter(this, void 0, void 0, function () { | |
| var d; | |
| return b.__generator(this, function (a) { | |
| switch (a.label) { | |
| case 0: | |
| return ( | |
| (d = Array.from(this.instances.values())), | |
| [ | |
| 4, | |
| Promise.all( | |
| d | |
| .filter(function (a) { | |
| return "INTERNAL" in a; | |
| }) | |
| .map(function (a) { | |
| return a.INTERNAL.delete(); | |
| }) | |
| ), | |
| ] | |
| ); | |
| case 1: | |
| return a.sent(), [2]; | |
| } | |
| }); | |
| }); | |
| }; | |
| d.prototype.isComponentSet = function () { | |
| return null != this.component; | |
| }; | |
| d.prototype.getOrInitializeService = function (b) { | |
| var a = this.instances.get(b); | |
| !a && | |
| this.component && | |
| ((a = this.component.instanceFactory( | |
| this.container, | |
| "[DEFAULT]" === b ? void 0 : b | |
| )), | |
| this.instances.set(b, a)); | |
| return a || null; | |
| }; | |
| d.prototype.normalizeInstanceIdentifier = function (b) { | |
| return this.component | |
| ? this.component.multipleInstances | |
| ? b | |
| : "[DEFAULT]" | |
| : b; | |
| }; | |
| return d; | |
| })(); | |
| f = (function () { | |
| function b(b) { | |
| this.name = b; | |
| this.providers = new Map(); | |
| } | |
| b.prototype.addComponent = function (b) { | |
| var a = this.getProvider(b.name); | |
| if (a.isComponentSet()) | |
| throw Error( | |
| "Component " + | |
| b.name + | |
| " has already been registered with " + | |
| this.name | |
| ); | |
| a.setComponent(b); | |
| }; | |
| b.prototype.addOrOverwriteComponent = function (b) { | |
| this.getProvider(b.name).isComponentSet() && | |
| this.providers.delete(b.name); | |
| this.addComponent(b); | |
| }; | |
| b.prototype.getProvider = function (b) { | |
| if (this.providers.has(b)) return this.providers.get(b); | |
| var a = new q(b, this); | |
| this.providers.set(b, a); | |
| return a; | |
| }; | |
| b.prototype.getProviders = function () { | |
| return Array.from(this.providers.values()); | |
| }; | |
| return b; | |
| })(); | |
| d.Component = m; | |
| d.ComponentContainer = f; | |
| d.Provider = q; | |
| }; | |
| shadow$provide[25] = function (m, f, r, d) { | |
| function b() { | |
| for (var b = 0, a = 0, d = arguments.length; a < d; a++) | |
| b += arguments[a].length; | |
| b = Array(b); | |
| var h = 0; | |
| for (a = 0; a < d; a++) | |
| for (var c = arguments[a], e = 0, l = c.length; e < l; e++, h++) | |
| b[h] = c[e]; | |
| return b; | |
| } | |
| Object.defineProperty(d, "__esModule", { value: !0 }); | |
| var t = []; | |
| (function (b) { | |
| b[(b.DEBUG = 0)] = "DEBUG"; | |
| b[(b.VERBOSE = 1)] = "VERBOSE"; | |
| b[(b.INFO = 2)] = "INFO"; | |
| b[(b.WARN = 3)] = "WARN"; | |
| b[(b.ERROR = 4)] = "ERROR"; | |
| b[(b.SILENT = 5)] = "SILENT"; | |
| })(d.LogLevel || (d.LogLevel = {})); | |
| var q = d.LogLevel.INFO, | |
| h = function (h, a) { | |
| for (var k = [], n = 2; n < arguments.length; n++) | |
| k[n - 2] = arguments[n]; | |
| if (!(a < h.logLevel)) | |
| switch (((n = new Date().toISOString()), a)) { | |
| case d.LogLevel.DEBUG: | |
| console.log.apply(console, b(["[" + n + "] " + h.name + ":"], k)); | |
| break; | |
| case d.LogLevel.VERBOSE: | |
| console.log.apply(console, b(["[" + n + "] " + h.name + ":"], k)); | |
| break; | |
| case d.LogLevel.INFO: | |
| console.info.apply(console, b(["[" + n + "] " + h.name + ":"], k)); | |
| break; | |
| case d.LogLevel.WARN: | |
| console.warn.apply(console, b(["[" + n + "] " + h.name + ":"], k)); | |
| break; | |
| case d.LogLevel.ERROR: | |
| console.error.apply( | |
| console, | |
| b(["[" + n + "] " + h.name + ":"], k) | |
| ); | |
| break; | |
| default: | |
| throw Error( | |
| "Attempted to log a message with an invalid logType (value: " + | |
| a + | |
| ")" | |
| ); | |
| } | |
| }; | |
| m = (function () { | |
| function f(a) { | |
| this.name = a; | |
| this._logLevel = q; | |
| this._logHandler = h; | |
| t.push(this); | |
| } | |
| Object.defineProperty(f.prototype, "logLevel", { | |
| get: function () { | |
| return this._logLevel; | |
| }, | |
| set: function (a) { | |
| if (!(a in d.LogLevel)) | |
| throw new TypeError("Invalid value assigned to `logLevel`"); | |
| this._logLevel = a; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(f.prototype, "logHandler", { | |
| get: function () { | |
| return this._logHandler; | |
| }, | |
| set: function (a) { | |
| if ("function" !== typeof a) | |
| throw new TypeError( | |
| "Value assigned to `logHandler` must be a function" | |
| ); | |
| this._logHandler = a; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| f.prototype.debug = function () { | |
| for (var a = [], h = 0; h < arguments.length; h++) a[h] = arguments[h]; | |
| this._logHandler.apply(this, b([this, d.LogLevel.DEBUG], a)); | |
| }; | |
| f.prototype.log = function () { | |
| for (var a = [], h = 0; h < arguments.length; h++) a[h] = arguments[h]; | |
| this._logHandler.apply(this, b([this, d.LogLevel.VERBOSE], a)); | |
| }; | |
| f.prototype.info = function () { | |
| for (var a = [], h = 0; h < arguments.length; h++) a[h] = arguments[h]; | |
| this._logHandler.apply(this, b([this, d.LogLevel.INFO], a)); | |
| }; | |
| f.prototype.warn = function () { | |
| for (var a = [], h = 0; h < arguments.length; h++) a[h] = arguments[h]; | |
| this._logHandler.apply(this, b([this, d.LogLevel.WARN], a)); | |
| }; | |
| f.prototype.error = function () { | |
| for (var a = [], h = 0; h < arguments.length; h++) a[h] = arguments[h]; | |
| this._logHandler.apply(this, b([this, d.LogLevel.ERROR], a)); | |
| }; | |
| return f; | |
| })(); | |
| d.Logger = m; | |
| d.setLogLevel = function (b) { | |
| t.forEach(function (a) { | |
| a.logLevel = b; | |
| }); | |
| }; | |
| }; | |
| shadow$provide[26] = function (m, f, r, d) { | |
| function b(a) { | |
| function b(a) { | |
| a = a || "[DEFAULT]"; | |
| if (!h.contains(d, a)) throw k.create("no-app", { appName: a }); | |
| return d[a]; | |
| } | |
| function g(c) { | |
| var g, | |
| v = c.name; | |
| if (l.has(v)) | |
| return ( | |
| e.debug( | |
| "There were multiple attempts to register component " + v + "." | |
| ), | |
| "PUBLIC" === c.type ? n[v] : null | |
| ); | |
| l.set(v, c); | |
| if ("PUBLIC" === c.type) { | |
| var f = function (a) { | |
| void 0 === a && (a = b()); | |
| if ("function" !== typeof a[v]) | |
| throw k.create("invalid-app-argument", { appName: v }); | |
| return a[v](); | |
| }; | |
| void 0 !== c.serviceProps && h.deepExtend(f, c.serviceProps); | |
| n[v] = f; | |
| a.prototype[v] = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) | |
| a[b] = arguments[b]; | |
| return this._getService | |
| .bind(this, v) | |
| .apply(this, c.multipleInstances ? a : []); | |
| }; | |
| } | |
| try { | |
| for ( | |
| var x = q.__values(Object.keys(d)), w = x.next(); | |
| !w.done; | |
| w = x.next() | |
| ) | |
| d[w.value]._addComponent(c); | |
| } catch (Q) { | |
| var u = { error: Q }; | |
| } finally { | |
| try { | |
| w && !w.done && (g = x.return) && g.call(x); | |
| } finally { | |
| if (u) throw u.error; | |
| } | |
| } | |
| return "PUBLIC" === c.type ? n[v] : null; | |
| } | |
| var d = {}, | |
| l = new Map(), | |
| n = { | |
| __esModule: !0, | |
| initializeApp: function (b, c) { | |
| void 0 === c && (c = {}); | |
| if ("object" !== typeof c || null === c) c = { name: c }; | |
| var e = c; | |
| void 0 === e.name && (e.name = "[DEFAULT]"); | |
| c = e.name; | |
| if ("string" !== typeof c || !c) | |
| throw k.create("bad-app-name", { appName: String(c) }); | |
| if (h.contains(d, c)) throw k.create("duplicate-app", { appName: c }); | |
| b = new a(b, e, n); | |
| return (d[c] = b); | |
| }, | |
| app: b, | |
| registerVersion: function (a, b, d) { | |
| var l, | |
| h = ((l = c[a]), null !== l && void 0 !== l ? l : a); | |
| d && (h += "-" + d); | |
| a = h.match(/\s|\//); | |
| d = b.match(/\s|\//); | |
| a || d | |
| ? ((l = [ | |
| 'Unable to register library "' + | |
| h + | |
| '" with version "' + | |
| b + | |
| '":', | |
| ]), | |
| a && | |
| l.push( | |
| 'library name "' + | |
| h + | |
| '" contains illegal characters (whitespace or "/")' | |
| ), | |
| a && d && l.push("and"), | |
| d && | |
| l.push( | |
| 'version name "' + | |
| b + | |
| '" contains illegal characters (whitespace or "/")' | |
| ), | |
| e.warn(l.join(" "))) | |
| : g( | |
| new u.Component( | |
| h + "-version", | |
| function () { | |
| return { library: h, version: b }; | |
| }, | |
| "VERSION" | |
| ) | |
| ); | |
| }, | |
| apps: null, | |
| SDK_VERSION: "7.7.0", | |
| INTERNAL: { | |
| registerComponent: g, | |
| removeApp: function (a) { | |
| delete d[a]; | |
| }, | |
| components: l, | |
| useAsService: function (a, b) { | |
| return "serverAuth" === b ? null : b; | |
| }, | |
| }, | |
| }; | |
| n["default"] = n; | |
| Object.defineProperty(n, "apps", { | |
| get: function () { | |
| return Object.keys(d).map(function (a) { | |
| return d[a]; | |
| }); | |
| }, | |
| }); | |
| b.App = a; | |
| return n; | |
| } | |
| function t() { | |
| var a = b(l); | |
| a.INTERNAL = q.__assign(q.__assign({}, a.INTERNAL), { | |
| createFirebaseNamespace: t, | |
| extendNamespace: function (b) { | |
| h.deepExtend(a, b); | |
| }, | |
| createSubscribe: h.createSubscribe, | |
| ErrorFactory: h.ErrorFactory, | |
| deepExtend: h.deepExtend, | |
| }); | |
| return a; | |
| } | |
| Object.defineProperty(d, "__esModule", { value: !0 }); | |
| var q = f(22), | |
| h = f(23), | |
| u = f(24); | |
| m = f(25); | |
| var a; | |
| f = | |
| ((a = {}), | |
| (a["no-app"] = | |
| "No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"), | |
| (a["bad-app-name"] = "Illegal App name: '{$appName}"), | |
| (a["duplicate-app"] = "Firebase App named '{$appName}' already exists"), | |
| (a["app-deleted"] = "Firebase App named '{$appName}' already deleted"), | |
| (a["invalid-app-argument"] = | |
| "firebase.{$appName}() takes either no argument or a Firebase App instance."), | |
| a); | |
| var k = new h.ErrorFactory("app", "Firebase", f), | |
| n, | |
| c = | |
| ((n = {}), | |
| (n["@firebase/app"] = "fire-core"), | |
| (n["@firebase/analytics"] = "fire-analytics"), | |
| (n["@firebase/auth"] = "fire-auth"), | |
| (n["@firebase/database"] = "fire-rtdb"), | |
| (n["@firebase/functions"] = "fire-fn"), | |
| (n["@firebase/installations"] = "fire-iid"), | |
| (n["@firebase/messaging"] = "fire-fcm"), | |
| (n["@firebase/performance"] = "fire-perf"), | |
| (n["@firebase/remote-config"] = "fire-rc"), | |
| (n["@firebase/storage"] = "fire-gcs"), | |
| (n["@firebase/firestore"] = "fire-fst"), | |
| (n["fire-js"] = "fire-js"), | |
| (n["firebase-wrapper"] = "fire-js-all"), | |
| n), | |
| e = new m.Logger("@firebase/app"), | |
| l = (function () { | |
| function a(a, b, c) { | |
| var e, | |
| g = this; | |
| this.firebase_ = c; | |
| this.isDeleted_ = !1; | |
| this.name_ = b.name; | |
| this.automaticDataCollectionEnabled_ = | |
| b.automaticDataCollectionEnabled || !1; | |
| this.options_ = h.deepCopy(a); | |
| this.container = new u.ComponentContainer(b.name); | |
| this._addComponent( | |
| new u.Component( | |
| "app", | |
| function () { | |
| return g; | |
| }, | |
| "PUBLIC" | |
| ) | |
| ); | |
| try { | |
| for ( | |
| var d = q.__values(this.firebase_.INTERNAL.components.values()), | |
| l = d.next(); | |
| !l.done; | |
| l = d.next() | |
| ) | |
| this._addComponent(l.value); | |
| } catch (A) { | |
| var k = { error: A }; | |
| } finally { | |
| try { | |
| l && !l.done && (e = d.return) && e.call(d); | |
| } finally { | |
| if (k) throw k.error; | |
| } | |
| } | |
| } | |
| Object.defineProperty(a.prototype, "automaticDataCollectionEnabled", { | |
| get: function () { | |
| this.checkDestroyed_(); | |
| return this.automaticDataCollectionEnabled_; | |
| }, | |
| set: function (a) { | |
| this.checkDestroyed_(); | |
| this.automaticDataCollectionEnabled_ = a; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "name", { | |
| get: function () { | |
| this.checkDestroyed_(); | |
| return this.name_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "options", { | |
| get: function () { | |
| this.checkDestroyed_(); | |
| return this.options_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.delete = function () { | |
| var a = this; | |
| return new Promise(function (b) { | |
| a.checkDestroyed_(); | |
| b(); | |
| }) | |
| .then(function () { | |
| a.firebase_.INTERNAL.removeApp(a.name_); | |
| return Promise.all( | |
| a.container.getProviders().map(function (a) { | |
| return a.delete(); | |
| }) | |
| ); | |
| }) | |
| .then(function () { | |
| a.isDeleted_ = !0; | |
| }); | |
| }; | |
| a.prototype._getService = function (a, b) { | |
| void 0 === b && (b = "[DEFAULT]"); | |
| this.checkDestroyed_(); | |
| return this.container.getProvider(a).getImmediate({ identifier: b }); | |
| }; | |
| a.prototype._removeServiceInstance = function (a, b) { | |
| void 0 === b && (b = "[DEFAULT]"); | |
| this.container.getProvider(a).clearInstance(b); | |
| }; | |
| a.prototype._addComponent = function (a) { | |
| try { | |
| this.container.addComponent(a); | |
| } catch (v) { | |
| e.debug( | |
| "Component " + | |
| a.name + | |
| " failed to register with FirebaseApp " + | |
| this.name, | |
| v | |
| ); | |
| } | |
| }; | |
| a.prototype._addOrOverwriteComponent = function (a) { | |
| this.container.addOrOverwriteComponent(a); | |
| }; | |
| a.prototype.checkDestroyed_ = function () { | |
| if (this.isDeleted_) | |
| throw k.create("app-deleted", { appName: this.name_ }); | |
| }; | |
| return a; | |
| })(); | |
| (l.prototype.name && l.prototype.options) || | |
| l.prototype.delete || | |
| console.log("dc"); | |
| a = t(); | |
| var g = (function () { | |
| function a(a) { | |
| this.container = a; | |
| } | |
| a.prototype.getPlatformInfoString = function () { | |
| return this.container | |
| .getProviders() | |
| .map(function (a) { | |
| var b; | |
| return "VERSION" === | |
| (null === (b = a.getComponent()) || void 0 === b ? void 0 : b.type) | |
| ? ((a = a.getImmediate()), a.library + "/" + a.version) | |
| : null; | |
| }) | |
| .filter(function (a) { | |
| return a; | |
| }) | |
| .join(" "); | |
| }; | |
| return a; | |
| })(); | |
| h.isBrowser() && | |
| void 0 !== self.firebase && | |
| (e.warn( | |
| "\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n " | |
| ), | |
| (n = self.firebase.SDK_VERSION) && | |
| 0 <= n.indexOf("LITE") && | |
| e.warn( | |
| "\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n " | |
| )); | |
| var w = a.initializeApp; | |
| a.initializeApp = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) a[b] = arguments[b]; | |
| h.isNode() && | |
| e.warn( | |
| '\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/rollup-plugin-node-resolve\n ' | |
| ); | |
| return w.apply(void 0, a); | |
| }; | |
| (function (a, b) { | |
| a.INTERNAL.registerComponent( | |
| new u.Component( | |
| "platform-logger", | |
| function (a) { | |
| return new g(a); | |
| }, | |
| "PRIVATE" | |
| ) | |
| ); | |
| a.registerVersion("@firebase/app", "0.5.2", b); | |
| a.registerVersion("fire-js", ""); | |
| })(a); | |
| d.default = a; | |
| d.firebase = a; | |
| }; | |
| shadow$provide[27] = function (m, f, r, d) { | |
| m = (m = f(26)) && "object" === typeof m && "default" in m ? m["default"] : m; | |
| m.registerVersion("firebase", "7.7.0", "app"); | |
| r.exports = m; | |
| }; | |
| shadow$provide[28] = function (m, f, r, d) { | |
| (function () { | |
| function b(a) { | |
| var b = 0; | |
| return function () { | |
| return b < a.length ? { done: !1, value: a[b++] } : { done: !0 }; | |
| }; | |
| } | |
| function d(a) { | |
| var p = | |
| "undefined" != typeof Symbol && Symbol.iterator && a[Symbol.iterator]; | |
| return p ? p.call(a) : { next: b(a) }; | |
| } | |
| function q(a) { | |
| return "string" == typeof a; | |
| } | |
| function h(a) { | |
| return "boolean" == typeof a; | |
| } | |
| function u() {} | |
| function a(a) { | |
| var b = typeof a; | |
| if ("object" == b) | |
| if (a) { | |
| if (a instanceof Array) return "array"; | |
| if (a instanceof Object) return b; | |
| var p = Object.prototype.toString.call(a); | |
| if ("[object Window]" == p) return "object"; | |
| if ( | |
| "[object Array]" == p || | |
| ("number" == typeof a.length && | |
| "undefined" != typeof a.splice && | |
| "undefined" != typeof a.propertyIsEnumerable && | |
| !a.propertyIsEnumerable("splice")) | |
| ) | |
| return "array"; | |
| if ( | |
| "[object Function]" == p || | |
| ("undefined" != typeof a.call && | |
| "undefined" != typeof a.propertyIsEnumerable && | |
| !a.propertyIsEnumerable("call")) | |
| ) | |
| return "function"; | |
| } else return "null"; | |
| else if ("function" == b && "undefined" == typeof a.call) return "object"; | |
| return b; | |
| } | |
| function k(a) { | |
| return null === a; | |
| } | |
| function n(b) { | |
| return "array" == a(b); | |
| } | |
| function c(b) { | |
| var p = a(b); | |
| return "array" == p || ("object" == p && "number" == typeof b.length); | |
| } | |
| function e(b) { | |
| return "function" == a(b); | |
| } | |
| function l(a) { | |
| var b = typeof a; | |
| return ("object" == b && null != a) || "function" == b; | |
| } | |
| function g(a, b, p) { | |
| return a.call.apply(a.bind, arguments); | |
| } | |
| function w(a, b, p) { | |
| if (!a) throw Error(); | |
| if (2 < arguments.length) { | |
| var c = Array.prototype.slice.call(arguments, 2); | |
| return function () { | |
| var p = Array.prototype.slice.call(arguments); | |
| Array.prototype.unshift.apply(p, c); | |
| return a.apply(b, p); | |
| }; | |
| } | |
| return function () { | |
| return a.apply(b, arguments); | |
| }; | |
| } | |
| function y(a, b, p) { | |
| Function.prototype.bind && | |
| -1 != Function.prototype.bind.toString().indexOf("native code") | |
| ? (y = g) | |
| : (y = w); | |
| return y.apply(null, arguments); | |
| } | |
| function x(a, b) { | |
| var p = Array.prototype.slice.call(arguments, 1); | |
| return function () { | |
| var b = p.slice(); | |
| b.push.apply(b, arguments); | |
| return a.apply(this, b); | |
| }; | |
| } | |
| function v(a, b) { | |
| function p() {} | |
| p.prototype = b.prototype; | |
| a.qb = b.prototype; | |
| a.prototype = new p(); | |
| a.prototype.constructor = a; | |
| a.gd = function (a, p, c) { | |
| for ( | |
| var e = Array(arguments.length - 2), g = 2; | |
| g < arguments.length; | |
| g++ | |
| ) | |
| e[g - 2] = arguments[g]; | |
| return b.prototype[p].apply(a, e); | |
| }; | |
| } | |
| function I(a) { | |
| if (!a) return !1; | |
| try { | |
| return !!a.$goog_Thenable; | |
| } catch (Rf) { | |
| return !1; | |
| } | |
| } | |
| function H(a) { | |
| if (Error.captureStackTrace) Error.captureStackTrace(this, H); | |
| else { | |
| var b = Error().stack; | |
| b && (this.stack = b); | |
| } | |
| a && (this.message = String(a)); | |
| } | |
| function C(a, b) { | |
| a = a.split("%s"); | |
| for (var p = "", c = a.length - 1, e = 0; e < c; e++) | |
| p += a[e] + (e < b.length ? b[e] : "%s"); | |
| H.call(this, p + a[c]); | |
| } | |
| function E(a, b) { | |
| throw new C( | |
| "Failure" + (a ? ": " + a : ""), | |
| Array.prototype.slice.call(arguments, 1) | |
| ); | |
| } | |
| function G(a, b) { | |
| this.c = a; | |
| this.f = b; | |
| this.b = 0; | |
| this.a = null; | |
| } | |
| function O(a, b) { | |
| a.f(b); | |
| 100 > a.b && (a.b++, (b.next = a.a), (a.a = b)); | |
| } | |
| function A() { | |
| this.b = this.a = null; | |
| } | |
| function z() { | |
| var a = Dk, | |
| b = null; | |
| a.a && | |
| ((b = a.a), (a.a = a.a.next), a.a || (a.b = null), (b.next = null)); | |
| return b; | |
| } | |
| function r() { | |
| this.next = this.b = this.a = null; | |
| } | |
| function D(a, b) { | |
| a: { | |
| try { | |
| var p = a && a.ownerDocument, | |
| c = p && (p.defaultView || p.parentWindow); | |
| c = c || sa; | |
| if (c.Element && c.Location) { | |
| p = c; | |
| break a; | |
| } | |
| } catch ($i) {} | |
| p = null; | |
| } | |
| if ( | |
| p && | |
| "undefined" != typeof p[b] && | |
| (!a || | |
| (!(a instanceof p[b]) && | |
| (a instanceof p.Location || a instanceof p.Element))) | |
| ) { | |
| if (l(a)) | |
| try { | |
| var e = | |
| a.constructor.displayName || | |
| a.constructor.name || | |
| Object.prototype.toString.call(a); | |
| } catch ($i) { | |
| e = "\x3cobject could not be stringified\x3e"; | |
| } | |
| else e = void 0 === a ? "undefined" : null === a ? "null" : typeof a; | |
| E( | |
| "Argument is not a %s (or a non-Element, non-Location mock); got: %s", | |
| b, | |
| e | |
| ); | |
| } | |
| } | |
| function Q(a, b) { | |
| for (var p = q(a) ? a.split("") : a, c = a.length - 1; 0 <= c; --c) | |
| c in p && b.call(void 0, p[c], c, a); | |
| } | |
| function M(a) { | |
| a: { | |
| for ( | |
| var b = Gg, p = a.length, c = q(a) ? a.split("") : a, e = 0; | |
| e < p; | |
| e++ | |
| ) | |
| if (e in c && b.call(void 0, c[e], e, a)) { | |
| b = e; | |
| break a; | |
| } | |
| b = -1; | |
| } | |
| return 0 > b ? null : q(a) ? a.charAt(b) : a[b]; | |
| } | |
| function F(a, b) { | |
| return 0 <= Ek(a, b); | |
| } | |
| function P(a, b) { | |
| b = Ek(a, b); | |
| var p; | |
| (p = 0 <= b) && Array.prototype.splice.call(a, b, 1); | |
| return p; | |
| } | |
| function J(a, b) { | |
| var p = 0; | |
| Q(a, function (c, e) { | |
| b.call(void 0, c, e, a) && | |
| 1 == Array.prototype.splice.call(a, e, 1).length && | |
| p++; | |
| }); | |
| } | |
| function L(a) { | |
| return Array.prototype.concat.apply([], arguments); | |
| } | |
| function N(a) { | |
| var b = a.length; | |
| if (0 < b) { | |
| for (var p = Array(b), c = 0; c < b; c++) p[c] = a[c]; | |
| return p; | |
| } | |
| return []; | |
| } | |
| function B(a, b) { | |
| for (var p in a) b.call(void 0, a[p], p, a); | |
| } | |
| function V(a) { | |
| for (var b in a) return !1; | |
| return !0; | |
| } | |
| function U(a) { | |
| var b = {}, | |
| p; | |
| for (p in a) b[p] = a[p]; | |
| return b; | |
| } | |
| function Y(a, b) { | |
| for (var p, c, e = 1; e < arguments.length; e++) { | |
| c = arguments[e]; | |
| for (p in c) a[p] = c[p]; | |
| for (var g = 0; g < Fk.length; g++) | |
| (p = Fk[g]), | |
| Object.prototype.hasOwnProperty.call(c, p) && (a[p] = c[p]); | |
| } | |
| } | |
| function ca(a, b) { | |
| this.a = (a === mj && b) || ""; | |
| this.b = Gk; | |
| } | |
| function ra(a) { | |
| if (a instanceof ca && a.constructor === ca && a.b === Gk) return a.a; | |
| E("expected object of type Const, got '" + a + "'"); | |
| return "type_error:Const"; | |
| } | |
| function ia() { | |
| this.a = ""; | |
| this.b = Hk; | |
| } | |
| function Ca(b) { | |
| if (b instanceof ia && b.constructor === ia && b.b === Hk) return b.a; | |
| E( | |
| "expected object of type TrustedResourceUrl, got '" + | |
| b + | |
| "' of type " + | |
| a(b) | |
| ); | |
| return "type_error:TrustedResourceUrl"; | |
| } | |
| function fa(a, b) { | |
| var p = ra(a); | |
| if (!Ol.test(p)) throw Error("Invalid TrustedResourceUrl format: " + p); | |
| a = p.replace(Pl, function (a, c) { | |
| if (!Object.prototype.hasOwnProperty.call(b, c)) | |
| throw Error( | |
| 'Found marker, "' + | |
| c + | |
| '", in format string, "' + | |
| p + | |
| '", but no valid label mapping found in args: ' + | |
| JSON.stringify(b) | |
| ); | |
| a = b[c]; | |
| return a instanceof ca ? ra(a) : encodeURIComponent(String(a)); | |
| }); | |
| return Ga(a); | |
| } | |
| function Ga(a) { | |
| var b = new ia(); | |
| b.a = a; | |
| return b; | |
| } | |
| function ja(a, b) { | |
| return -1 != a.indexOf(b); | |
| } | |
| function ka(a, b) { | |
| return a < b ? -1 : a > b ? 1 : 0; | |
| } | |
| function Z() { | |
| this.a = ""; | |
| this.b = Ik; | |
| } | |
| function Fa(b) { | |
| if (b instanceof Z && b.constructor === Z && b.b === Ik) return b.a; | |
| E("expected object of type SafeUrl, got '" + b + "' of type " + a(b)); | |
| return "type_error:SafeUrl"; | |
| } | |
| function qa(a) { | |
| if (a instanceof Z) return a; | |
| a = "object" == typeof a && a.qa ? a.pa() : String(a); | |
| Jk.test(a) || (a = "about:invalid#zClosurez"); | |
| return ea(a); | |
| } | |
| function ea(a) { | |
| var b = new Z(); | |
| b.a = a; | |
| return b; | |
| } | |
| function za(a) { | |
| return ja(nj, a); | |
| } | |
| function La() { | |
| this.a = ""; | |
| this.b = Kk; | |
| } | |
| function pa(b) { | |
| if (b instanceof La && b.constructor === La && b.b === Kk) return b.a; | |
| E("expected object of type SafeHtml, got '" + b + "' of type " + a(b)); | |
| return "type_error:SafeHtml"; | |
| } | |
| function Aa(a) { | |
| var b = new La(); | |
| b.a = a; | |
| return b; | |
| } | |
| function Ka(a) { | |
| var b = Ga(ra(Ql)); | |
| D(a, "HTMLIFrameElement"); | |
| a.src = Ca(b).toString(); | |
| } | |
| function Ia(a, b) { | |
| D(a, "HTMLScriptElement"); | |
| a.src = Ca(b); | |
| null === Rj && | |
| ((b = sa.document), | |
| (Rj = | |
| (b = b.querySelector && b.querySelector("script[nonce]")) && | |
| (b = b.nonce || b.getAttribute("nonce")) && | |
| Rl.test(b) | |
| ? b | |
| : "")); | |
| (b = Rj) && a.setAttribute("nonce", b); | |
| } | |
| function bb(a, b) { | |
| for ( | |
| var p = a.split("%s"), | |
| c = "", | |
| e = Array.prototype.slice.call(arguments, 1); | |
| e.length && 1 < p.length; | |
| ) | |
| c += p.shift() + e.shift(); | |
| return c + p.join("%s"); | |
| } | |
| function aa(a) { | |
| Sl.test(a) && | |
| (-1 != a.indexOf("\x26") && (a = a.replace(Tl, "\x26amp;")), | |
| -1 != a.indexOf("\x3c") && (a = a.replace(Ul, "\x26lt;")), | |
| -1 != a.indexOf("\x3e") && (a = a.replace(Vl, "\x26gt;")), | |
| -1 != a.indexOf('"') && (a = a.replace(Wl, "\x26quot;")), | |
| -1 != a.indexOf("'") && (a = a.replace(Xl, "\x26#39;")), | |
| -1 != a.indexOf("\x00") && (a = a.replace(Yl, "\x26#0;"))); | |
| return a; | |
| } | |
| function X(a) { | |
| sa.setTimeout(function () { | |
| throw a; | |
| }, 0); | |
| } | |
| function va() { | |
| var a = sa.MessageChannel; | |
| "undefined" === typeof a && | |
| "undefined" !== typeof window && | |
| window.postMessage && | |
| window.addEventListener && | |
| !za("Presto") && | |
| (a = function () { | |
| var a = document.createElement("IFRAME"); | |
| a.style.display = "none"; | |
| Ka(a); | |
| document.documentElement.appendChild(a); | |
| var b = a.contentWindow; | |
| a = b.document; | |
| a.open(); | |
| a.write(pa(Zl)); | |
| a.close(); | |
| var p = "callImmediate" + Math.random(), | |
| c = | |
| "file:" == b.location.protocol | |
| ? "*" | |
| : b.location.protocol + "//" + b.location.host; | |
| a = y(function (a) { | |
| if (("*" == c || a.origin == c) && a.data == p) | |
| this.port1.onmessage(); | |
| }, this); | |
| b.addEventListener("message", a, !1); | |
| this.port1 = {}; | |
| this.port2 = { | |
| postMessage: function () { | |
| b.postMessage(p, c); | |
| }, | |
| }; | |
| }); | |
| if ("undefined" !== typeof a && !za("Trident") && !za("MSIE")) { | |
| var b = new a(), | |
| p = {}, | |
| c = p; | |
| b.port1.onmessage = function () { | |
| if (void 0 !== p.next) { | |
| p = p.next; | |
| var a = p.yb; | |
| p.yb = null; | |
| a(); | |
| } | |
| }; | |
| return function (a) { | |
| c.next = { yb: a }; | |
| c = c.next; | |
| b.port2.postMessage(0); | |
| }; | |
| } | |
| return "undefined" !== typeof document && | |
| "onreadystatechange" in document.createElement("SCRIPT") | |
| ? function (a) { | |
| var b = document.createElement("SCRIPT"); | |
| b.onreadystatechange = function () { | |
| b.onreadystatechange = null; | |
| b.parentNode.removeChild(b); | |
| b = null; | |
| a(); | |
| a = null; | |
| }; | |
| document.documentElement.appendChild(b); | |
| } | |
| : function (a) { | |
| sa.setTimeout(a, 0); | |
| }; | |
| } | |
| function la(a, b) { | |
| wj || fb(); | |
| Sj || (wj(), (Sj = !0)); | |
| Dk.add(a, b); | |
| } | |
| function fb() { | |
| if (sa.Promise && sa.Promise.resolve) { | |
| var a = sa.Promise.resolve(void 0); | |
| wj = function () { | |
| a.then(cc); | |
| }; | |
| } else | |
| wj = function () { | |
| var a = cc; | |
| !e(sa.setImmediate) || | |
| (sa.Window && | |
| sa.Window.prototype && | |
| !za("Edge") && | |
| sa.Window.prototype.setImmediate == sa.setImmediate) | |
| ? (Tj || (Tj = va()), Tj(a)) | |
| : sa.setImmediate(a); | |
| }; | |
| } | |
| function cc() { | |
| for (var a; (a = z()); ) { | |
| try { | |
| a.a.call(a.b); | |
| } catch (Rf) { | |
| X(Rf); | |
| } | |
| O(Lk, a); | |
| } | |
| Sj = !1; | |
| } | |
| function ha(a, b) { | |
| this.a = Mi; | |
| this.i = void 0; | |
| this.f = this.b = this.c = null; | |
| this.g = this.h = !1; | |
| if (a != u) | |
| try { | |
| var p = this; | |
| a.call( | |
| b, | |
| function (a) { | |
| Ja(p, oj, a); | |
| }, | |
| function (a) { | |
| if (!(a instanceof kb)) | |
| try { | |
| if (a instanceof Error) throw a; | |
| throw Error("Promise rejected."); | |
| } catch (Zi) {} | |
| Ja(p, ni, a); | |
| } | |
| ); | |
| } catch (ki) { | |
| Ja(this, ni, ki); | |
| } | |
| } | |
| function ya() { | |
| this.next = this.f = this.b = this.g = this.a = null; | |
| this.c = !1; | |
| } | |
| function jb(a, b, p) { | |
| var c = Mk.get(); | |
| c.g = a; | |
| c.b = b; | |
| c.f = p; | |
| return c; | |
| } | |
| function Da(a) { | |
| if (a instanceof ha) return a; | |
| var b = new ha(u); | |
| Ja(b, oj, a); | |
| return b; | |
| } | |
| function na(a) { | |
| return new ha(function (b, p) { | |
| p(a); | |
| }); | |
| } | |
| function Va(a, b, p) { | |
| cb(a, b, p, null) || la(x(b, a)); | |
| } | |
| function ua(a) { | |
| return new ha(function (b, p) { | |
| var c = a.length, | |
| e = []; | |
| if (c) | |
| for ( | |
| var g = function (a, p) { | |
| c--; | |
| e[a] = p; | |
| 0 == c && b(e); | |
| }, | |
| d = function (a) { | |
| p(a); | |
| }, | |
| l = 0, | |
| h; | |
| l < a.length; | |
| l++ | |
| ) | |
| (h = a[l]), Va(h, x(g, l), d); | |
| else b(e); | |
| }); | |
| } | |
| function wa(a) { | |
| return new ha(function (b) { | |
| var p = a.length, | |
| c = []; | |
| if (p) | |
| for ( | |
| var e = function (a, e, g) { | |
| p--; | |
| c[a] = e ? { Gb: !0, value: g } : { Gb: !1, reason: g }; | |
| 0 == p && b(c); | |
| }, | |
| g = 0, | |
| d; | |
| g < a.length; | |
| g++ | |
| ) | |
| (d = a[g]), Va(d, x(e, g, !0), x(e, g, !1)); | |
| else b(c); | |
| }); | |
| } | |
| function ma(a, b) { | |
| if (a.a == Mi) | |
| if (a.c) { | |
| var p = a.c; | |
| if (p.b) { | |
| for ( | |
| var c = 0, e = null, g = null, d = p.b; | |
| d && (d.c || (c++, d.a == a && (e = d), !(e && 1 < c))); | |
| d = d.next | |
| ) | |
| e || (g = d); | |
| e && | |
| (p.a == Mi && 1 == c | |
| ? ma(p, b) | |
| : (g | |
| ? ((c = g), | |
| c.next == p.f && (p.f = c), | |
| (c.next = c.next.next)) | |
| : qb(p), | |
| ta(p, e, ni, b))); | |
| } | |
| a.c = null; | |
| } else Ja(a, ni, b); | |
| } | |
| function lb(a, b) { | |
| a.b || (a.a != oj && a.a != ni) || a.h || ((a.h = !0), la(a.Zb, a)); | |
| a.f ? (a.f.next = b) : (a.b = b); | |
| a.f = b; | |
| } | |
| function tb(a, b, p, c) { | |
| var e = jb(null, null, null); | |
| e.a = new ha(function (a, g) { | |
| e.g = b | |
| ? function (p) { | |
| try { | |
| var e = b.call(c, p); | |
| a(e); | |
| } catch (zi) { | |
| g(zi); | |
| } | |
| } | |
| : a; | |
| e.b = p | |
| ? function (b) { | |
| try { | |
| var e = p.call(c, b); | |
| void 0 === e && b instanceof kb ? g(b) : a(e); | |
| } catch (zi) { | |
| g(zi); | |
| } | |
| } | |
| : g; | |
| }); | |
| e.a.c = a; | |
| lb(a, e); | |
| return e.a; | |
| } | |
| function Ja(a, b, p) { | |
| a.a == Mi && | |
| (a === p && | |
| ((b = ni), (p = new TypeError("Promise cannot resolve to itself"))), | |
| (a.a = 1), | |
| cb(p, a.Oc, a.Pc, a) || | |
| ((a.i = p), | |
| (a.a = b), | |
| (a.c = null), | |
| a.h || ((a.h = !0), la(a.Zb, a)), | |
| b != ni || p instanceof kb || Ta(a, p))); | |
| } | |
| function cb(a, b, p, c) { | |
| if (a instanceof ha) return lb(a, jb(b || u, p || null, c)), !0; | |
| if (I(a)) return a.then(b, p, c), !0; | |
| if (l(a)) | |
| try { | |
| var g = a.then; | |
| if (e(g)) return Xa(a, g, b, p, c), !0; | |
| } catch ($i) { | |
| return p.call(c, $i), !0; | |
| } | |
| return !1; | |
| } | |
| function Xa(a, b, p, c, e) { | |
| function g(a) { | |
| l || ((l = !0), c.call(e, a)); | |
| } | |
| function d(a) { | |
| l || ((l = !0), p.call(e, a)); | |
| } | |
| var l = !1; | |
| try { | |
| b.call(a, d, g); | |
| } catch (mi) { | |
| g(mi); | |
| } | |
| } | |
| function qb(a) { | |
| var b = null; | |
| a.b && ((b = a.b), (a.b = b.next), (b.next = null)); | |
| a.b || (a.f = null); | |
| return b; | |
| } | |
| function ta(a, b, p, c) { | |
| if (p == ni && b.b && !b.c) for (; a && a.g; a = a.c) a.g = !1; | |
| if (b.a) (b.a.c = null), Ya(b, p, c); | |
| else | |
| try { | |
| b.c ? b.g.call(b.f) : Ya(b, p, c); | |
| } catch (Zi) { | |
| Nk.call(null, Zi); | |
| } | |
| O(Mk, b); | |
| } | |
| function Ya(a, b, p) { | |
| b == oj ? a.g.call(a.f, p) : a.b && a.b.call(a.f, p); | |
| } | |
| function Ta(a, b) { | |
| a.g = !0; | |
| la(function () { | |
| a.g && Nk.call(null, b); | |
| }); | |
| } | |
| function kb(a) { | |
| H.call(this, a); | |
| } | |
| function rb() { | |
| 0 != Uj && (Ok[this[xj] || (this[xj] = ++Pk)] = this); | |
| this.va = this.va; | |
| this.la = this.la; | |
| } | |
| function Wb(a) { | |
| if (!a.va && ((a.va = !0), a.za(), 0 != Uj)) { | |
| var b = a[xj] || (a[xj] = ++Pk); | |
| if (0 != Uj && a.la && 0 < a.la.length) | |
| throw Error( | |
| a + | |
| " did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method." | |
| ); | |
| delete Ok[b]; | |
| } | |
| } | |
| function Yb(a) { | |
| Yb[" "](a); | |
| return a; | |
| } | |
| function Ea(a, b) { | |
| var p = $l; | |
| return Object.prototype.hasOwnProperty.call(p, a) ? p[a] : (p[a] = b(a)); | |
| } | |
| function Na() { | |
| var a = sa.document; | |
| return a ? a.documentMode : void 0; | |
| } | |
| function xd(a) { | |
| return Ea(a, function () { | |
| for ( | |
| var b = 0, | |
| p = Qk(String(Rk)).split("."), | |
| c = Qk(String(a)).split("."), | |
| e = Math.max(p.length, c.length), | |
| g = 0; | |
| 0 == b && g < e; | |
| g++ | |
| ) { | |
| var d = p[g] || "", | |
| l = c[g] || ""; | |
| do { | |
| d = /(\d*)(\D*)(.*)/.exec(d) || ["", "", "", ""]; | |
| l = /(\d*)(\D*)(.*)/.exec(l) || ["", "", "", ""]; | |
| if (0 == d[0].length && 0 == l[0].length) break; | |
| b = | |
| ka( | |
| 0 == d[1].length ? 0 : parseInt(d[1], 10), | |
| 0 == l[1].length ? 0 : parseInt(l[1], 10) | |
| ) || | |
| ka(0 == d[2].length, 0 == l[2].length) || | |
| ka(d[2], l[2]); | |
| d = d[3]; | |
| l = l[3]; | |
| } while (0 == b); | |
| } | |
| return 0 <= b; | |
| }); | |
| } | |
| function vb(a, b) { | |
| this.type = a; | |
| this.b = this.target = b; | |
| this.Mb = !0; | |
| } | |
| function Zb(a, b) { | |
| vb.call(this, a ? a.type : ""); | |
| this.relatedTarget = this.b = this.target = null; | |
| this.button = this.screenY = this.screenX = this.clientY = this.clientX = 0; | |
| this.key = ""; | |
| this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1; | |
| this.pointerId = 0; | |
| this.pointerType = ""; | |
| this.a = null; | |
| if (a) { | |
| var p = (this.type = a.type), | |
| c = | |
| a.changedTouches && a.changedTouches.length | |
| ? a.changedTouches[0] | |
| : null; | |
| this.target = a.target || a.srcElement; | |
| this.b = b; | |
| if ((b = a.relatedTarget)) { | |
| if (Sk) { | |
| a: { | |
| try { | |
| Yb(b.nodeName); | |
| p = !0; | |
| break a; | |
| } catch (Zi) {} | |
| p = !1; | |
| } | |
| p || (b = null); | |
| } | |
| } else | |
| "mouseover" == p | |
| ? (b = a.fromElement) | |
| : "mouseout" == p && (b = a.toElement); | |
| this.relatedTarget = b; | |
| c | |
| ? ((this.clientX = void 0 !== c.clientX ? c.clientX : c.pageX), | |
| (this.clientY = void 0 !== c.clientY ? c.clientY : c.pageY), | |
| (this.screenX = c.screenX || 0), | |
| (this.screenY = c.screenY || 0)) | |
| : ((this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX), | |
| (this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY), | |
| (this.screenX = a.screenX || 0), | |
| (this.screenY = a.screenY || 0)); | |
| this.button = a.button; | |
| this.key = a.key || ""; | |
| this.ctrlKey = a.ctrlKey; | |
| this.altKey = a.altKey; | |
| this.shiftKey = a.shiftKey; | |
| this.metaKey = a.metaKey; | |
| this.pointerId = a.pointerId || 0; | |
| this.pointerType = q(a.pointerType) | |
| ? a.pointerType | |
| : am[a.pointerType] || ""; | |
| this.a = a; | |
| a.defaultPrevented && this.preventDefault(); | |
| } | |
| } | |
| function Lc(a, b, p, c, e) { | |
| this.listener = a; | |
| this.proxy = null; | |
| this.src = b; | |
| this.type = p; | |
| this.capture = !!c; | |
| this.Pa = e; | |
| this.key = ++bm; | |
| this.ta = this.Ka = !1; | |
| } | |
| function nb(a) { | |
| a.ta = !0; | |
| a.listener = null; | |
| a.proxy = null; | |
| a.src = null; | |
| a.Pa = null; | |
| } | |
| function Sa(a) { | |
| this.src = a; | |
| this.a = {}; | |
| this.b = 0; | |
| } | |
| function $b(a, b) { | |
| var p = b.type; | |
| p in a.a && | |
| P(a.a[p], b) && | |
| (nb(b), 0 == a.a[p].length && (delete a.a[p], a.b--)); | |
| } | |
| function Ha(a, b, p, c) { | |
| for (var e = 0; e < a.length; ++e) { | |
| var g = a[e]; | |
| if (!g.ta && g.listener == b && g.capture == !!p && g.Pa == c) return e; | |
| } | |
| return -1; | |
| } | |
| function kc(a, b, p, c, e) { | |
| if (c && c.once) rc(a, b, p, c, e); | |
| else if (n(b)) for (var g = 0; g < b.length; g++) kc(a, b[g], p, c, e); | |
| else | |
| (p = ba(p)), | |
| a && a[pj] | |
| ? Pb(a, b, p, l(c) ? !!c.capture : !!c, e) | |
| : Hc(a, b, p, !1, c, e); | |
| } | |
| function Hc(a, b, p, c, e, g) { | |
| if (!b) throw Error("Invalid event type"); | |
| var d = l(e) ? !!e.capture : !!e, | |
| h = zd(a); | |
| h || (a[Vj] = h = new Sa(a)); | |
| p = h.add(b, p, c, d, g); | |
| if (!p.proxy) { | |
| c = xc(); | |
| p.proxy = c; | |
| c.src = a; | |
| c.listener = p; | |
| if (a.addEventListener) | |
| cm || (e = d), | |
| void 0 === e && (e = !1), | |
| a.addEventListener(b.toString(), c, e); | |
| else if (a.attachEvent) a.attachEvent(dc(b.toString()), c); | |
| else if (a.addListener && a.removeListener) a.addListener(c); | |
| else throw Error("addEventListener and attachEvent are unavailable."); | |
| Tk++; | |
| } | |
| } | |
| function xc() { | |
| var a = Cc, | |
| b = Uk | |
| ? function (p) { | |
| return a.call(b.src, b.listener, p); | |
| } | |
| : function (p) { | |
| p = a.call(b.src, b.listener, p); | |
| if (!p) return p; | |
| }; | |
| return b; | |
| } | |
| function rc(a, b, p, c, e) { | |
| if (n(b)) for (var g = 0; g < b.length; g++) rc(a, b[g], p, c, e); | |
| else | |
| (p = ba(p)), | |
| a && a[pj] | |
| ? xb(a, b, p, l(c) ? !!c.capture : !!c, e) | |
| : Hc(a, b, p, !0, c, e); | |
| } | |
| function yb(a, b, p, c, e) { | |
| if (n(b)) for (var g = 0; g < b.length; g++) yb(a, b[g], p, c, e); | |
| else | |
| ((c = l(c) ? !!c.capture : !!c), (p = ba(p)), a && a[pj]) | |
| ? ((a = a.u), | |
| (b = String(b).toString()), | |
| b in a.a && | |
| ((g = a.a[b]), | |
| (p = Ha(g, p, c, e)), | |
| -1 < p && | |
| (nb(g[p]), | |
| Array.prototype.splice.call(g, p, 1), | |
| 0 == g.length && (delete a.a[b], a.b--)))) | |
| : a && | |
| (a = zd(a)) && | |
| ((b = a.a[b.toString()]), | |
| (a = -1), | |
| b && (a = Ha(b, p, c, e)), | |
| (p = -1 < a ? b[a] : null) && Gb(p)); | |
| } | |
| function Gb(a) { | |
| if ("number" != typeof a && a && !a.ta) { | |
| var b = a.src; | |
| if (b && b[pj]) $b(b.u, a); | |
| else { | |
| var p = a.type, | |
| c = a.proxy; | |
| b.removeEventListener | |
| ? b.removeEventListener(p, c, a.capture) | |
| : b.detachEvent | |
| ? b.detachEvent(dc(p), c) | |
| : b.addListener && b.removeListener && b.removeListener(c); | |
| Tk--; | |
| (p = zd(b)) | |
| ? ($b(p, a), 0 == p.b && ((p.src = null), (b[Vj] = null))) | |
| : nb(a); | |
| } | |
| } | |
| } | |
| function dc(a) { | |
| return a in Wj ? Wj[a] : (Wj[a] = "on" + a); | |
| } | |
| function oa(a, b, p, c) { | |
| var e = !0; | |
| if ((a = zd(a))) | |
| if ((b = a.a[b.toString()])) | |
| for (b = b.concat(), a = 0; a < b.length; a++) { | |
| var g = b[a]; | |
| g && | |
| g.capture == p && | |
| !g.ta && | |
| ((g = wb(g, c)), (e = e && !1 !== g)); | |
| } | |
| return e; | |
| } | |
| function wb(a, b) { | |
| var p = a.listener, | |
| c = a.Pa || a.src; | |
| a.Ka && Gb(a); | |
| return p.call(c, b); | |
| } | |
| function Cc(a, b) { | |
| if (a.ta) return !0; | |
| if (!Uk) { | |
| if (!b) | |
| a: { | |
| b = ["window", "event"]; | |
| for (var p = sa, c = 0; c < b.length; c++) | |
| if (((p = p[b[c]]), null == p)) { | |
| b = null; | |
| break a; | |
| } | |
| b = p; | |
| } | |
| c = b; | |
| b = new Zb(c, this); | |
| p = !0; | |
| if (!(0 > c.keyCode || void 0 != c.returnValue)) { | |
| a: { | |
| var e = !1; | |
| if (0 == c.keyCode) | |
| try { | |
| c.keyCode = -1; | |
| break a; | |
| } catch (li) { | |
| e = !0; | |
| } | |
| if (e || void 0 == c.returnValue) c.returnValue = !0; | |
| } | |
| c = []; | |
| for (e = b.b; e; e = e.parentNode) c.push(e); | |
| a = a.type; | |
| for (e = c.length - 1; 0 <= e; e--) { | |
| b.b = c[e]; | |
| var g = oa(c[e], a, !0, b); | |
| p = p && g; | |
| } | |
| for (e = 0; e < c.length; e++) | |
| (b.b = c[e]), (g = oa(c[e], a, !1, b)), (p = p && g); | |
| } | |
| return p; | |
| } | |
| return wb(a, new Zb(b, this)); | |
| } | |
| function zd(a) { | |
| a = a[Vj]; | |
| return a instanceof Sa ? a : null; | |
| } | |
| function ba(a) { | |
| if (e(a)) return a; | |
| a[Xj] || | |
| (a[Xj] = function (b) { | |
| return a.handleEvent(b); | |
| }); | |
| return a[Xj]; | |
| } | |
| function $a() { | |
| rb.call(this); | |
| this.u = new Sa(this); | |
| this.Sb = this; | |
| this.Xa = null; | |
| } | |
| function Pb(a, b, p, c, e) { | |
| a.u.add(String(b), p, !1, c, e); | |
| } | |
| function xb(a, b, p, c, e) { | |
| a.u.add(String(b), p, !0, c, e); | |
| } | |
| function hb(a, b, p, c) { | |
| b = a.u.a[String(b)]; | |
| if (!b) return !0; | |
| b = b.concat(); | |
| for (var e = !0, g = 0; g < b.length; ++g) { | |
| var d = b[g]; | |
| if (d && !d.ta && d.capture == p) { | |
| var l = d.listener, | |
| h = d.Pa || d.src; | |
| d.Ka && $b(a.u, d); | |
| e = !1 !== l.call(h, c) && e; | |
| } | |
| } | |
| return e && 0 != c.Mb; | |
| } | |
| function Tb(a, b, p) { | |
| if (e(a)) p && (a = y(a, p)); | |
| else if (a && "function" == typeof a.handleEvent) a = y(a.handleEvent, a); | |
| else throw Error("Invalid listener argument"); | |
| return 2147483647 < Number(b) ? -1 : sa.setTimeout(a, b || 0); | |
| } | |
| function Ad(a) { | |
| var b = null; | |
| return new ha(function (p, c) { | |
| b = Tb(function () { | |
| p(void 0); | |
| }, a); | |
| -1 == b && c(Error("Failed to schedule timer.")); | |
| }).s(function (a) { | |
| sa.clearTimeout(b); | |
| throw a; | |
| }); | |
| } | |
| function ib(a) { | |
| if (a.U && "function" == typeof a.U) return a.U(); | |
| if (q(a)) return a.split(""); | |
| if (c(a)) { | |
| for (var b = [], p = a.length, e = 0; e < p; e++) b.push(a[e]); | |
| return b; | |
| } | |
| b = []; | |
| p = 0; | |
| for (e in a) b[p++] = a[e]; | |
| return b; | |
| } | |
| function Nb(a) { | |
| if (a.X && "function" == typeof a.X) return a.X(); | |
| if (!a.U || "function" != typeof a.U) { | |
| if (c(a) || q(a)) { | |
| var b = []; | |
| a = a.length; | |
| for (var p = 0; p < a; p++) b.push(p); | |
| return b; | |
| } | |
| b = []; | |
| p = 0; | |
| for (var e in a) b[p++] = e; | |
| return b; | |
| } | |
| } | |
| function Hb(a, b) { | |
| if (a.forEach && "function" == typeof a.forEach) a.forEach(b, void 0); | |
| else if (c(a) || q(a)) Ye(a, b, void 0); | |
| else | |
| for (var p = Nb(a), e = ib(a), g = e.length, d = 0; d < g; d++) | |
| b.call(void 0, e[d], p && p[d], a); | |
| } | |
| function nc(a, b) { | |
| this.b = {}; | |
| this.a = []; | |
| this.c = 0; | |
| var p = arguments.length; | |
| if (1 < p) { | |
| if (p % 2) throw Error("Uneven number of arguments"); | |
| for (var c = 0; c < p; c += 2) this.set(arguments[c], arguments[c + 1]); | |
| } else if (a) | |
| if (a instanceof nc) | |
| for (p = a.X(), c = 0; c < p.length; c++) this.set(p[c], a.get(p[c])); | |
| else for (c in a) this.set(c, a[c]); | |
| } | |
| function ad(a) { | |
| if (a.c != a.a.length) { | |
| for (var b = 0, p = 0; b < a.a.length; ) { | |
| var c = a.a[b]; | |
| Xb(a.b, c) && (a.a[p++] = c); | |
| b++; | |
| } | |
| a.a.length = p; | |
| } | |
| if (a.c != a.a.length) { | |
| var e = {}; | |
| for (p = b = 0; b < a.a.length; ) | |
| (c = a.a[b]), Xb(e, c) || ((a.a[p++] = c), (e[c] = 1)), b++; | |
| a.a.length = p; | |
| } | |
| } | |
| function Xb(a, b) { | |
| return Object.prototype.hasOwnProperty.call(a, b); | |
| } | |
| function Ic(a, b) { | |
| if (a) { | |
| a = a.split("\x26"); | |
| for (var p = 0; p < a.length; p++) { | |
| var c = a[p].indexOf("\x3d"), | |
| e = null; | |
| if (0 <= c) { | |
| var g = a[p].substring(0, c); | |
| e = a[p].substring(c + 1); | |
| } else g = a[p]; | |
| b(g, e ? decodeURIComponent(e.replace(/\+/g, " ")) : ""); | |
| } | |
| } | |
| } | |
| function Mc(a, b) { | |
| this.b = this.i = this.f = ""; | |
| this.l = null; | |
| this.g = this.c = ""; | |
| this.h = !1; | |
| var p; | |
| a instanceof Mc | |
| ? ((this.h = void 0 !== b ? b : a.h), | |
| Ub(this, a.f), | |
| (this.i = a.i), | |
| (this.b = a.b), | |
| ld(this, a.l), | |
| (this.c = a.c), | |
| Db(this, Ob(a.a)), | |
| (this.g = a.g)) | |
| : a && (p = String(a).match(Vk)) | |
| ? ((this.h = !!b), | |
| Ub(this, p[1] || "", !0), | |
| (this.i = Qb(p[2] || "")), | |
| (this.b = Qb(p[3] || "", !0)), | |
| ld(this, p[4]), | |
| (this.c = Qb(p[5] || "", !0)), | |
| Db(this, p[6] || "", !0), | |
| (this.g = Qb(p[7] || ""))) | |
| : ((this.h = !!b), (this.a = new xa(null, this.h))); | |
| } | |
| function Ub(a, b, p) { | |
| a.f = p ? Qb(b, !0) : b; | |
| a.f && (a.f = a.f.replace(/:$/, "")); | |
| } | |
| function ld(a, b) { | |
| if (b) { | |
| b = Number(b); | |
| if (isNaN(b) || 0 > b) throw Error("Bad port number " + b); | |
| a.l = b; | |
| } else a.l = null; | |
| } | |
| function Db(a, b, p) { | |
| b instanceof xa | |
| ? ((a.a = b), mb(a.a, a.h)) | |
| : (p || (b = Cd(b, dm)), (a.a = new xa(b, a.h))); | |
| } | |
| function sb(a, b, p) { | |
| a.a.set(b, p); | |
| } | |
| function ac(a, b) { | |
| return a.a.get(b); | |
| } | |
| function Ib(a) { | |
| return a instanceof Mc ? new Mc(a) : new Mc(a, void 0); | |
| } | |
| function ob(a, b) { | |
| var p = new Mc(null, void 0); | |
| Ub(p, "https"); | |
| a && (p.b = a); | |
| b && (p.c = b); | |
| return p; | |
| } | |
| function Qb(a, b) { | |
| return a | |
| ? b | |
| ? decodeURI(a.replace(/%25/g, "%2525")) | |
| : decodeURIComponent(a) | |
| : ""; | |
| } | |
| function Cd(a, b, p) { | |
| return q(a) | |
| ? ((a = encodeURI(a).replace(b, Ae)), | |
| p && (a = a.replace(/%25([0-9a-fA-F]{2})/g, "%$1")), | |
| a) | |
| : null; | |
| } | |
| function Ae(a) { | |
| a = a.charCodeAt(0); | |
| return "%" + ((a >> 4) & 15).toString(16) + (a & 15).toString(16); | |
| } | |
| function xa(a, b) { | |
| this.b = this.a = null; | |
| this.c = a || null; | |
| this.f = !!b; | |
| } | |
| function ec(a) { | |
| a.a || | |
| ((a.a = new nc()), | |
| (a.b = 0), | |
| a.c && | |
| Ic(a.c, function (b, p) { | |
| a.add(decodeURIComponent(b.replace(/\+/g, " ")), p); | |
| })); | |
| } | |
| function ab(a) { | |
| var b = Nb(a); | |
| if ("undefined" == typeof b) throw Error("Keys are undefined"); | |
| var p = new xa(null, void 0); | |
| a = ib(a); | |
| for (var c = 0; c < b.length; c++) { | |
| var e = b[c], | |
| g = a[c]; | |
| n(g) ? Ua(p, e, g) : p.add(e, g); | |
| } | |
| return p; | |
| } | |
| function Pa(a, b) { | |
| ec(a); | |
| b = Qa(a, b); | |
| Xb(a.a.b, b) && | |
| ((a.c = null), | |
| (a.b -= a.a.get(b).length), | |
| (a = a.a), | |
| Xb(a.b, b) && (delete a.b[b], a.c--, a.a.length > 2 * a.c && ad(a))); | |
| } | |
| function Eb(a, b) { | |
| ec(a); | |
| b = Qa(a, b); | |
| return Xb(a.a.b, b); | |
| } | |
| function Ua(a, b, p) { | |
| Pa(a, b); | |
| 0 < p.length && | |
| ((a.c = null), a.a.set(Qa(a, b), N(p)), (a.b += p.length)); | |
| } | |
| function Ob(a) { | |
| var b = new xa(); | |
| b.c = a.c; | |
| a.a && ((b.a = new nc(a.a)), (b.b = a.b)); | |
| return b; | |
| } | |
| function Qa(a, b) { | |
| b = String(b); | |
| a.f && (b = b.toLowerCase()); | |
| return b; | |
| } | |
| function mb(a, b) { | |
| b && | |
| !a.f && | |
| (ec(a), | |
| (a.c = null), | |
| a.a.forEach(function (a, b) { | |
| var p = b.toLowerCase(); | |
| b != p && (Pa(this, b), Ua(this, p, a)); | |
| }, a)); | |
| a.f = b; | |
| } | |
| function Dc(a) { | |
| var b = document; | |
| return q(a) ? b.getElementById(a) : a; | |
| } | |
| function Vb(a, b) { | |
| B(b, function (b, p) { | |
| b && "object" == typeof b && b.qa && (b = b.pa()); | |
| "style" == p | |
| ? (a.style.cssText = b) | |
| : "class" == p | |
| ? (a.className = b) | |
| : "for" == p | |
| ? (a.htmlFor = b) | |
| : Wk.hasOwnProperty(p) | |
| ? a.setAttribute(Wk[p], b) | |
| : 0 == p.lastIndexOf("aria-", 0) || 0 == p.lastIndexOf("data-", 0) | |
| ? a.setAttribute(p, b) | |
| : (a[p] = b); | |
| }); | |
| } | |
| function Ma(a, b, p) { | |
| var c = arguments, | |
| e = document, | |
| g = String(c[0]), | |
| d = c[1]; | |
| if (!em && d && (d.name || d.type)) { | |
| g = ["\x3c", g]; | |
| d.name && g.push(' name\x3d"', aa(d.name), '"'); | |
| if (d.type) { | |
| g.push(' type\x3d"', aa(d.type), '"'); | |
| var l = {}; | |
| Y(l, d); | |
| delete l.type; | |
| d = l; | |
| } | |
| g.push("\x3e"); | |
| g = g.join(""); | |
| } | |
| g = e.createElement(g); | |
| d && | |
| (q(d) | |
| ? (g.className = d) | |
| : n(d) | |
| ? (g.className = d.join(" ")) | |
| : Vb(g, d)); | |
| 2 < c.length && ud(e, g, c); | |
| return g; | |
| } | |
| function ud(a, b, p) { | |
| function e(p) { | |
| p && b.appendChild(q(p) ? a.createTextNode(p) : p); | |
| } | |
| for (var g = 2; g < p.length; g++) { | |
| var d = p[g]; | |
| !c(d) || (l(d) && 0 < d.nodeType) ? e(d) : Ye(Nc(d) ? N(d) : d, e); | |
| } | |
| } | |
| function Nc(a) { | |
| if (a && "number" == typeof a.length) { | |
| if (l(a)) | |
| return "function" == typeof a.item || "string" == typeof a.item; | |
| if (e(a)) return "function" == typeof a.item; | |
| } | |
| return !1; | |
| } | |
| function Jb(a) { | |
| var b = []; | |
| Ba(new md(), a, b); | |
| return b.join(""); | |
| } | |
| function md() {} | |
| function Ba(a, b, p) { | |
| if (null == b) p.push("null"); | |
| else { | |
| if ("object" == typeof b) { | |
| if (n(b)) { | |
| var c = b; | |
| b = c.length; | |
| p.push("["); | |
| for (var e = "", g = 0; g < b; g++) | |
| p.push(e), Ba(a, c[g], p), (e = ","); | |
| p.push("]"); | |
| return; | |
| } | |
| if ( | |
| b instanceof String || | |
| b instanceof Number || | |
| b instanceof Boolean | |
| ) | |
| b = b.valueOf(); | |
| else { | |
| p.push("{"); | |
| e = ""; | |
| for (c in b) | |
| Object.prototype.hasOwnProperty.call(b, c) && | |
| ((g = b[c]), | |
| "function" != typeof g && | |
| (p.push(e), Cb(c, p), p.push(":"), Ba(a, g, p), (e = ","))); | |
| p.push("}"); | |
| return; | |
| } | |
| } | |
| switch (typeof b) { | |
| case "string": | |
| Cb(b, p); | |
| break; | |
| case "number": | |
| p.push(isFinite(b) && !isNaN(b) ? String(b) : "null"); | |
| break; | |
| case "boolean": | |
| p.push(String(b)); | |
| break; | |
| case "function": | |
| p.push("null"); | |
| break; | |
| default: | |
| throw Error("Unknown type: " + typeof b); | |
| } | |
| } | |
| } | |
| function Cb(a, b) { | |
| b.push( | |
| '"', | |
| a.replace(fm, function (a) { | |
| var b = Xk[a]; | |
| b || | |
| ((b = "\\u" + (a.charCodeAt(0) | 65536).toString(16).substr(1)), | |
| (Xk[a] = b)); | |
| return b; | |
| }), | |
| '"' | |
| ); | |
| } | |
| function Fb() { | |
| var a = zc(); | |
| return (Ch && !!Ai && 11 == Ai) || /Edge\/\d+/.test(a); | |
| } | |
| function eb() { | |
| return ( | |
| (sa.window && sa.window.location.href) || | |
| (self && self.location && self.location.href) || | |
| "" | |
| ); | |
| } | |
| function ub(a, b) { | |
| b = b || sa.window; | |
| var p = "about:blank"; | |
| a && (p = Fa(qa(a)).toString()); | |
| b.location.href = p; | |
| } | |
| function Za(a, b) { | |
| var p = [], | |
| c; | |
| for (c in a) | |
| c in b | |
| ? typeof a[c] != typeof b[c] | |
| ? p.push(c) | |
| : "object" == typeof a[c] && null != a[c] && null != b[c] | |
| ? 0 < Za(a[c], b[c]).length && p.push(c) | |
| : a[c] !== b[c] && p.push(c) | |
| : p.push(c); | |
| for (c in b) c in a || p.push(c); | |
| return p; | |
| } | |
| function Ec() { | |
| var a = zc(); | |
| return (a = | |
| Gd(a) != Yk | |
| ? null | |
| : (a = a.match(/\sChrome\/(\d+)/i)) && 2 == a.length | |
| ? parseInt(a[1], 10) | |
| : null) && 30 > a | |
| ? !1 | |
| : !Ch || !Ai || 9 < Ai; | |
| } | |
| function zb(a) { | |
| a = (a || zc()).toLowerCase(); | |
| return a.match(/android/) || | |
| a.match(/webos/) || | |
| a.match(/iphone|ipad|ipod/) || | |
| a.match(/blackberry/) || | |
| a.match(/windows phone/) || | |
| a.match(/iemobile/) | |
| ? !0 | |
| : !1; | |
| } | |
| function bd(a) { | |
| a = a || sa.window; | |
| try { | |
| a.close(); | |
| } catch (Rf) {} | |
| } | |
| function vc(a, b, p) { | |
| var c = Math.floor(1e9 * Math.random()).toString(); | |
| b = b || 500; | |
| p = p || 600; | |
| var e = (window.screen.availHeight - p) / 2, | |
| g = (window.screen.availWidth - b) / 2; | |
| b = { | |
| width: b, | |
| height: p, | |
| top: 0 < e ? e : 0, | |
| left: 0 < g ? g : 0, | |
| location: !0, | |
| resizable: !0, | |
| statusbar: !0, | |
| toolbar: !1, | |
| }; | |
| p = zc().toLowerCase(); | |
| c && ((b.target = c), ja(p, "crios/") && (b.target = "_blank")); | |
| Gd(zc()) == Yj && ((a = a || "http://localhost"), (b.scrollbars = !0)); | |
| p = a || ""; | |
| (a = b) || (a = {}); | |
| c = window; | |
| b = | |
| p instanceof Z | |
| ? p | |
| : qa("undefined" != typeof p.href ? p.href : String(p)); | |
| p = a.target || p.target; | |
| e = []; | |
| for (d in a) | |
| switch (d) { | |
| case "width": | |
| case "height": | |
| case "top": | |
| case "left": | |
| e.push(d + "\x3d" + a[d]); | |
| break; | |
| case "target": | |
| case "noopener": | |
| case "noreferrer": | |
| break; | |
| default: | |
| e.push(d + "\x3d" + (a[d] ? 1 : 0)); | |
| } | |
| var d = e.join(","); | |
| ((za("iPhone") && !za("iPod") && !za("iPad")) || | |
| za("iPad") || | |
| za("iPod")) && | |
| c.navigator && | |
| c.navigator.standalone && | |
| p && | |
| "_self" != p | |
| ? ((d = c.document.createElement("A")), | |
| D(d, "HTMLAnchorElement"), | |
| b instanceof Z || | |
| b instanceof Z || | |
| ((b = "object" == typeof b && b.qa ? b.pa() : String(b)), | |
| Jk.test(b) || (b = "about:invalid#zClosurez"), | |
| (b = ea(b))), | |
| (d.href = Fa(b)), | |
| d.setAttribute("target", p), | |
| a.noreferrer && d.setAttribute("rel", "noreferrer"), | |
| (a = document.createEvent("MouseEvent")), | |
| a.initMouseEvent("click", !0, !0, c, 1), | |
| d.dispatchEvent(a), | |
| (d = {})) | |
| : a.noreferrer | |
| ? ((d = c.open("", p, d)), | |
| (a = Fa(b).toString()), | |
| d && | |
| (gm && ja(a, ";") && (a = "'" + a.replace(/'/g, "%27") + "'"), | |
| (d.opener = null), | |
| (a = Aa( | |
| '\x3cmeta name\x3d"referrer" content\x3d"no-referrer"\x3e\x3cmeta http-equiv\x3d"refresh" content\x3d"0; url\x3d' + | |
| aa(a) + | |
| '"\x3e' | |
| )), | |
| d.document.write(pa(a)), | |
| d.document.close())) | |
| : (d = c.open(Fa(b).toString(), p, d)) && | |
| a.noopener && | |
| (d.opener = null); | |
| if (d) | |
| try { | |
| d.focus(); | |
| } catch (aj) {} | |
| return d; | |
| } | |
| function Wa(a) { | |
| return new ha(function (b) { | |
| function p() { | |
| Ad(2e3).then(function () { | |
| if (!a || a.closed) b(); | |
| else return p(); | |
| }); | |
| } | |
| return p(); | |
| }); | |
| } | |
| function lc() { | |
| var a = null; | |
| return new ha(function (b) { | |
| "complete" == sa.document.readyState | |
| ? b() | |
| : ((a = function () { | |
| b(); | |
| }), | |
| rc(window, "load", a)); | |
| }).s(function (b) { | |
| yb(window, "load", a); | |
| throw b; | |
| }); | |
| } | |
| function ie() { | |
| return yc(void 0) | |
| ? lc().then(function () { | |
| return new ha(function (a, b) { | |
| var p = sa.document, | |
| c = setTimeout(function () { | |
| b(Error("Cordova framework is not ready.")); | |
| }, 1e3); | |
| p.addEventListener( | |
| "deviceready", | |
| function () { | |
| clearTimeout(c); | |
| a(); | |
| }, | |
| !1 | |
| ); | |
| }); | |
| }) | |
| : na(Error("Cordova must run in an Android or iOS file scheme.")); | |
| } | |
| function yc(a) { | |
| a = a || zc(); | |
| return !( | |
| ("file:" !== Ac() && "ionic:" !== Ac()) || | |
| !a.toLowerCase().match(/iphone|ipad|ipod|android/) | |
| ); | |
| } | |
| function fc() { | |
| var a = sa.window; | |
| try { | |
| return !(!a || a == a.top); | |
| } catch (Rf) { | |
| return !1; | |
| } | |
| } | |
| function Kb() { | |
| return ( | |
| "undefined" !== typeof sa.WorkerGlobalScope && | |
| "function" === typeof sa.importScripts | |
| ); | |
| } | |
| function Rb() { | |
| return uc.INTERNAL.hasOwnProperty("reactNative") | |
| ? "ReactNative" | |
| : uc.INTERNAL.hasOwnProperty("node") | |
| ? "Node" | |
| : Kb() | |
| ? "Worker" | |
| : "Browser"; | |
| } | |
| function wc() { | |
| var a = Rb(); | |
| return "ReactNative" === a || "Node" === a; | |
| } | |
| function ed() { | |
| for (var a = 50, b = []; 0 < a; ) | |
| b.push( | |
| "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt( | |
| Math.floor(62 * Math.random()) | |
| ) | |
| ), | |
| a--; | |
| return b.join(""); | |
| } | |
| function Gd(a) { | |
| var b = a.toLowerCase(); | |
| if (ja(b, "opera/") || ja(b, "opr/") || ja(b, "opios/")) return "Opera"; | |
| if (ja(b, "iemobile")) return "IEMobile"; | |
| if (ja(b, "msie") || ja(b, "trident/")) return "IE"; | |
| if (ja(b, "edge/")) return "Edge"; | |
| if (ja(b, "firefox/")) return Yj; | |
| if (ja(b, "silk/")) return "Silk"; | |
| if (ja(b, "blackberry")) return "Blackberry"; | |
| if (ja(b, "webos")) return "Webos"; | |
| if ( | |
| !ja(b, "safari/") || | |
| ja(b, "chrome/") || | |
| ja(b, "crios/") || | |
| ja(b, "android") | |
| ) | |
| if ((!ja(b, "chrome/") && !ja(b, "crios/")) || ja(b, "edge/")) { | |
| if (ja(b, "android")) return "Android"; | |
| if ((a = a.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/)) && 2 == a.length) | |
| return a[1]; | |
| } else return Yk; | |
| else return "Safari"; | |
| return "Other"; | |
| } | |
| function nd(a, b) { | |
| b = b || []; | |
| var p = [], | |
| c = {}, | |
| e; | |
| for (e in Zk) c[Zk[e]] = !0; | |
| for (e = 0; e < b.length; e++) | |
| "undefined" !== typeof c[b[e]] && (delete c[b[e]], p.push(b[e])); | |
| p.sort(); | |
| b = p; | |
| b.length || (b = ["FirebaseCore-web"]); | |
| p = Rb(); | |
| "Browser" === p | |
| ? ((c = zc()), (p = Gd(c))) | |
| : "Worker" === p && ((c = zc()), (p = Gd(c) + "-" + p)); | |
| return p + "/JsCore/" + a + "/" + b.join(","); | |
| } | |
| function zc() { | |
| return (sa.navigator && sa.navigator.userAgent) || ""; | |
| } | |
| function Sb(a, b) { | |
| a = a.split("."); | |
| b = b || sa; | |
| for (var p = 0; p < a.length && "object" == typeof b && null != b; p++) | |
| b = b[a[p]]; | |
| p != a.length && (b = void 0); | |
| return b; | |
| } | |
| function Fc() { | |
| try { | |
| var a = sa.localStorage, | |
| b = Xc(); | |
| if (a) | |
| return a.setItem(b, "1"), a.removeItem(b), Fb() ? !!sa.indexedDB : !0; | |
| } catch (lj) { | |
| return Kb() && !!sa.indexedDB; | |
| } | |
| return !1; | |
| } | |
| function Qc() { | |
| return ( | |
| (Lb() || "chrome-extension:" === Ac() || yc()) && !wc() && Fc() && !Kb() | |
| ); | |
| } | |
| function Lb() { | |
| return "http:" === Ac() || "https:" === Ac(); | |
| } | |
| function Ac() { | |
| return (sa.location && sa.location.protocol) || null; | |
| } | |
| function Dd(a) { | |
| a = a || zc(); | |
| return zb(a) || Gd(a) == Yj ? !1 : !0; | |
| } | |
| function Rc(a) { | |
| return "undefined" === typeof a ? null : Jb(a); | |
| } | |
| function Hd(a) { | |
| var b = {}, | |
| p; | |
| for (p in a) | |
| a.hasOwnProperty(p) && | |
| null !== a[p] && | |
| void 0 !== a[p] && | |
| (b[p] = a[p]); | |
| return b; | |
| } | |
| function vd(a) { | |
| if (null !== a) return JSON.parse(a); | |
| } | |
| function Xc(a) { | |
| return a ? a : Math.floor(1e9 * Math.random()).toString(); | |
| } | |
| function ae(a) { | |
| a = a || zc(); | |
| return "Safari" == Gd(a) || a.toLowerCase().match(/iphone|ipad|ipod/) | |
| ? !1 | |
| : !0; | |
| } | |
| function fd() { | |
| var a = sa.___jsl; | |
| if (a && a.H) | |
| for (var b in a.H) | |
| if ( | |
| ((a.H[b].r = a.H[b].r || []), | |
| (a.H[b].L = a.H[b].L || []), | |
| (a.H[b].r = a.H[b].L.concat()), | |
| a.CP) | |
| ) | |
| for (var p = 0; p < a.CP.length; p++) a.CP[p] = null; | |
| } | |
| function Id(a, b) { | |
| if (a > b) throw Error("Short delay should be less than long delay!"); | |
| this.a = a; | |
| this.c = b; | |
| a = zc(); | |
| b = Rb(); | |
| this.b = zb(a) || "ReactNative" === b; | |
| } | |
| function je() { | |
| var a = sa.document; | |
| return a && "undefined" !== typeof a.visibilityState | |
| ? "visible" == a.visibilityState | |
| : !0; | |
| } | |
| function Oc() { | |
| var a = sa.document, | |
| b = null; | |
| return je() || !a | |
| ? Da() | |
| : new ha(function (p) { | |
| b = function () { | |
| je() && (a.removeEventListener("visibilitychange", b, !1), p()); | |
| }; | |
| a.addEventListener("visibilitychange", b, !1); | |
| }).s(function (p) { | |
| a.removeEventListener("visibilitychange", b, !1); | |
| throw p; | |
| }); | |
| } | |
| function Kc(a) { | |
| try { | |
| var b = new Date(parseInt(a, 10)); | |
| if (!isNaN(b.getTime()) && !/[^0-9]/.test(a)) return b.toUTCString(); | |
| } catch (lj) {} | |
| return null; | |
| } | |
| function gd() { | |
| return !(!Sb("fireauth.oauthhelper", sa) && !Sb("fireauth.iframe", sa)); | |
| } | |
| function Mb() { | |
| var a = sa.navigator; | |
| return (a && a.serviceWorker && a.serviceWorker.controller) || null; | |
| } | |
| function gc() { | |
| var a = sa.navigator; | |
| return a && a.serviceWorker | |
| ? Da() | |
| .then(function () { | |
| return a.serviceWorker.ready; | |
| }) | |
| .then(function (a) { | |
| return a.active || null; | |
| }) | |
| .s(function () { | |
| return null; | |
| }) | |
| : Da(null); | |
| } | |
| function Bb(a) { | |
| $k[a] || | |
| (($k[a] = !0), | |
| "undefined" !== typeof console && | |
| "function" === typeof console.warn && | |
| console.warn(a)); | |
| } | |
| function Oa(a, b, p) { | |
| al | |
| ? Object.defineProperty(a, b, { | |
| configurable: !0, | |
| enumerable: !0, | |
| value: p, | |
| }) | |
| : (a[b] = p); | |
| } | |
| function wd(a, b) { | |
| if (b) for (var p in b) b.hasOwnProperty(p) && Oa(a, p, b[p]); | |
| } | |
| function od(a) { | |
| var b = {}; | |
| wd(b, a); | |
| return b; | |
| } | |
| function If(a) { | |
| var b = {}, | |
| p; | |
| for (p in a) a.hasOwnProperty(p) && (b[p] = a[p]); | |
| return b; | |
| } | |
| function ne(a, b) { | |
| if (!b || !b.length) return !0; | |
| if (!a) return !1; | |
| for (var p = 0; p < b.length; p++) { | |
| var c = a[b[p]]; | |
| if (void 0 === c || null === c || "" === c) return !1; | |
| } | |
| return !0; | |
| } | |
| function be(a) { | |
| var b = a; | |
| if ("object" == typeof a && null != a) { | |
| b = "length" in a ? [] : {}; | |
| for (var p in a) Oa(b, p, be(a[p])); | |
| } | |
| return b; | |
| } | |
| function bf(a) { | |
| var b = {}, | |
| p = a[hm], | |
| c = a[im]; | |
| a = a[jm]; | |
| if (!a || (a != yj && !p)) throw Error("Invalid provider user info!"); | |
| b[km] = c || null; | |
| b[lm] = p || null; | |
| Oa(this, mm, a); | |
| Oa(this, nm, be(b)); | |
| } | |
| function da(a, b) { | |
| this.code = qj + a; | |
| this.message = b || om[a] || ""; | |
| } | |
| function Pe(a) { | |
| var b = a && a.code; | |
| return b ? new da(b.substring(qj.length), a.message) : null; | |
| } | |
| function De(a) { | |
| a = Ib(a); | |
| var b = ac(a, bl) || null, | |
| p = ac(a, cl) || null, | |
| c = ac(a, dl) || null; | |
| c = c ? pm[c] || null : null; | |
| if (!b || !p || !c) | |
| throw new da( | |
| "argument-error", | |
| bl + | |
| ", " + | |
| cl + | |
| "and " + | |
| dl + | |
| " are required in a valid action code URL." | |
| ); | |
| wd(this, { | |
| apiKey: b, | |
| operation: c, | |
| code: p, | |
| continueUrl: ac(a, qm) || null, | |
| languageCode: ac(a, rm) || null, | |
| tenantId: ac(a, sm) || null, | |
| }); | |
| } | |
| function Sd(a) { | |
| try { | |
| return new De(a); | |
| } catch (Rf) { | |
| return null; | |
| } | |
| } | |
| function cf(a) { | |
| var b = a[tm]; | |
| if ("undefined" === typeof b) throw new da("missing-continue-uri"); | |
| if ("string" !== typeof b || ("string" === typeof b && !b.length)) | |
| throw new da("invalid-continue-uri"); | |
| this.h = b; | |
| this.b = this.a = null; | |
| this.g = !1; | |
| var p = a[el]; | |
| if (p && "object" === typeof p) { | |
| b = p[fl]; | |
| var c = p[gl]; | |
| p = p[hl]; | |
| if ("string" === typeof b && b.length) { | |
| this.a = b; | |
| if ("undefined" !== typeof c && "boolean" !== typeof c) | |
| throw new da( | |
| "argument-error", | |
| gl + " property must be a boolean when specified." | |
| ); | |
| this.g = !!c; | |
| if ( | |
| "undefined" !== typeof p && | |
| ("string" !== typeof p || ("string" === typeof p && !p.length)) | |
| ) | |
| throw new da( | |
| "argument-error", | |
| hl + " property must be a non empty string when specified." | |
| ); | |
| this.b = p || null; | |
| } else { | |
| if ("undefined" !== typeof b) | |
| throw new da( | |
| "argument-error", | |
| fl + " property must be a non empty string when specified." | |
| ); | |
| if ("undefined" !== typeof c || "undefined" !== typeof p) | |
| throw new da("missing-android-pkg-name"); | |
| } | |
| } else if ("undefined" !== typeof p) | |
| throw new da( | |
| "argument-error", | |
| el + " property must be a non null object when specified." | |
| ); | |
| this.f = null; | |
| if ((b = a[il]) && "object" === typeof b) | |
| if (((b = b[jl]), "string" === typeof b && b.length)) this.f = b; | |
| else { | |
| if ("undefined" !== typeof b) | |
| throw new da( | |
| "argument-error", | |
| jl + " property must be a non empty string when specified." | |
| ); | |
| } | |
| else if ("undefined" !== typeof b) | |
| throw new da( | |
| "argument-error", | |
| il + " property must be a non null object when specified." | |
| ); | |
| b = a[Zj]; | |
| if ("undefined" !== typeof b && "boolean" !== typeof b) | |
| throw new da( | |
| "argument-error", | |
| Zj + " property must be a boolean when specified." | |
| ); | |
| this.c = !!b; | |
| a = a[kl]; | |
| if ( | |
| "undefined" !== typeof a && | |
| ("string" !== typeof a || ("string" === typeof a && !a.length)) | |
| ) | |
| throw new da( | |
| "argument-error", | |
| kl + " property must be a non empty string when specified." | |
| ); | |
| this.i = a || null; | |
| } | |
| function pe(a) { | |
| var b = {}; | |
| b.continueUrl = a.h; | |
| b.canHandleCodeInApp = a.c; | |
| if ((b.androidPackageName = a.a)) | |
| (b.androidMinimumVersion = a.b), (b.androidInstallApp = a.g); | |
| b.iOSBundleId = a.f; | |
| b.dynamicLinkDomain = a.i; | |
| for (var p in b) null === b[p] && delete b[p]; | |
| return b; | |
| } | |
| function oe(a) { | |
| return ak(a, function (a) { | |
| a = a.toString(16); | |
| return 1 < a.length ? a : "0" + a; | |
| }).join(""); | |
| } | |
| function Jf(a) { | |
| var b = ""; | |
| ce(a, function (a) { | |
| b += String.fromCharCode(a); | |
| }); | |
| return b; | |
| } | |
| function ce(a, b) { | |
| function p(b) { | |
| for (; c < a.length; ) { | |
| var p = a.charAt(c++), | |
| e = zj[p]; | |
| if (null != e) return e; | |
| if (!/^[\s\xa0]*$/.test(p)) | |
| throw Error("Unknown base64 encoding at char: " + p); | |
| } | |
| return b; | |
| } | |
| df(); | |
| for (var c = 0; ; ) { | |
| var e = p(-1), | |
| g = p(0), | |
| d = p(64), | |
| l = p(64); | |
| if (64 === l && -1 === e) break; | |
| b((e << 2) | (g >> 4)); | |
| 64 != d && | |
| (b(((g << 4) & 240) | (d >> 2)), 64 != l && b(((d << 6) & 192) | l)); | |
| } | |
| } | |
| function df() { | |
| if (!Aj) { | |
| Aj = {}; | |
| zj = {}; | |
| for (var a = 0; 65 > a; a++) | |
| (Aj[ | |
| a | |
| ] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt( | |
| a | |
| )), | |
| (zj[Aj[a]] = a), | |
| 62 <= a && | |
| (zj[ | |
| "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt( | |
| a | |
| ) | |
| ] = a); | |
| } | |
| } | |
| function hd(a) { | |
| this.f = a.sub; | |
| Yh(); | |
| this.a = | |
| a.provider_id || (a.firebase && a.firebase.sign_in_provider) || null; | |
| this.c = (a.firebase && a.firebase.tenant) || null; | |
| this.b = !!a.is_anonymous || "anonymous" == this.a; | |
| } | |
| function Yc(a) { | |
| return (a = cd(a)) && a.sub && a.iss && a.aud && a.exp ? new hd(a) : null; | |
| } | |
| function cd(a) { | |
| if (!a) return null; | |
| a = a.split("."); | |
| if (3 != a.length) return null; | |
| a = a[1]; | |
| for (var b = (4 - (a.length % 4)) % 4, p = 0; p < b; p++) a += "."; | |
| try { | |
| return JSON.parse(Jf(a)); | |
| } catch (ki) {} | |
| return null; | |
| } | |
| function R(a) { | |
| for (var b in bk) | |
| if (bk[b].id === a) | |
| return ( | |
| (a = bk[b]), { firebaseEndpoint: a.cb, secureTokenEndpoint: a.ib } | |
| ); | |
| return null; | |
| } | |
| function Ee(a) { | |
| for (var b in ck) if (ck[b].Fa == a) return ck[b]; | |
| return null; | |
| } | |
| function qe(a) { | |
| var b = {}; | |
| b["facebook.com"] = Ge; | |
| b["google.com"] = ke; | |
| b["github.com"] = He; | |
| b["twitter.com"] = rf; | |
| var p = a && a[ll]; | |
| try { | |
| if (p) return b[p] ? new b[p](a) : new pd(a); | |
| if ("undefined" !== typeof a[dk]) return new Fe(a); | |
| } catch (ki) {} | |
| return null; | |
| } | |
| function Fe(a) { | |
| var b = a[ll]; | |
| if (!b && a[dk]) { | |
| var p = Yc(a[dk]); | |
| p && p.a && (b = p.a); | |
| } | |
| if (!b) throw Error("Invalid additional user info!"); | |
| if ("anonymous" == b || "custom" == b) b = null; | |
| p = !1; | |
| "undefined" !== typeof a.isNewUser | |
| ? (p = !!a.isNewUser) | |
| : "identitytoolkit#SignupNewUserResponse" === a.kind && (p = !0); | |
| Oa(this, "providerId", b); | |
| Oa(this, "isNewUser", p); | |
| } | |
| function pd(a) { | |
| Fe.call(this, a); | |
| a = vd(a.rawUserInfo || "{}"); | |
| Oa(this, "profile", be(a || {})); | |
| } | |
| function Ge(a) { | |
| pd.call(this, a); | |
| if ("facebook.com" != this.providerId) | |
| throw Error("Invalid provider ID!"); | |
| } | |
| function He(a) { | |
| pd.call(this, a); | |
| if ("github.com" != this.providerId) throw Error("Invalid provider ID!"); | |
| Oa(this, "username", (this.profile && this.profile.login) || null); | |
| } | |
| function ke(a) { | |
| pd.call(this, a); | |
| if ("google.com" != this.providerId) throw Error("Invalid provider ID!"); | |
| } | |
| function rf(a) { | |
| pd.call(this, a); | |
| if ("twitter.com" != this.providerId) throw Error("Invalid provider ID!"); | |
| Oa(this, "username", a.screenName || null); | |
| } | |
| function ef(a) { | |
| var b = Ib(a), | |
| p = ac(b, "link"), | |
| c = ac(Ib(p), "link"); | |
| b = ac(b, "deep_link_id"); | |
| return ac(Ib(b), "link") || b || c || p || a; | |
| } | |
| function Zf() {} | |
| function le(a, b) { | |
| return a | |
| .then(function (a) { | |
| if (a[mh]) { | |
| var p = Yc(a[mh]); | |
| if (!p || b != p.f) throw new da("user-mismatch"); | |
| return a; | |
| } | |
| throw new da("user-mismatch"); | |
| }) | |
| .s(function (a) { | |
| throw a && a.code && a.code == qj + "user-not-found" | |
| ? new da("user-mismatch") | |
| : a; | |
| }); | |
| } | |
| function id(a, b) { | |
| if (b) this.a = b; | |
| else throw new da("internal-error", "failed to construct a credential"); | |
| Oa(this, "providerId", a); | |
| Oa(this, "signInMethod", a); | |
| } | |
| function sf(a) { | |
| return { pendingToken: a.a, requestUri: "http://localhost" }; | |
| } | |
| function zg(a) { | |
| if ( | |
| a && | |
| a.providerId && | |
| a.signInMethod && | |
| 0 == a.providerId.indexOf("saml.") && | |
| a.pendingToken | |
| ) | |
| try { | |
| return new id(a.providerId, a.pendingToken); | |
| } catch (Rf) {} | |
| return null; | |
| } | |
| function Sc(a, b, p) { | |
| this.a = null; | |
| if (b.idToken || b.accessToken) | |
| b.idToken && Oa(this, "idToken", b.idToken), | |
| b.accessToken && Oa(this, "accessToken", b.accessToken), | |
| b.nonce && !b.pendingToken && Oa(this, "nonce", b.nonce), | |
| b.pendingToken && (this.a = b.pendingToken); | |
| else if (b.oauthToken && b.oauthTokenSecret) | |
| Oa(this, "accessToken", b.oauthToken), | |
| Oa(this, "secret", b.oauthTokenSecret); | |
| else throw new da("internal-error", "failed to construct a credential"); | |
| Oa(this, "providerId", a); | |
| Oa(this, "signInMethod", p); | |
| } | |
| function Vd(a) { | |
| var b = {}; | |
| a.idToken && (b.id_token = a.idToken); | |
| a.accessToken && (b.access_token = a.accessToken); | |
| a.secret && (b.oauth_token_secret = a.secret); | |
| b.providerId = a.providerId; | |
| a.nonce && !a.a && (b.nonce = a.nonce); | |
| b = { postBody: ab(b).toString(), requestUri: "http://localhost" }; | |
| a.a && (delete b.postBody, (b.pendingToken = a.a)); | |
| return b; | |
| } | |
| function Qe(a) { | |
| if (a && a.providerId && a.signInMethod) { | |
| var b = { | |
| idToken: a.oauthIdToken, | |
| accessToken: a.oauthTokenSecret ? null : a.oauthAccessToken, | |
| oauthTokenSecret: a.oauthTokenSecret, | |
| oauthToken: a.oauthTokenSecret && a.oauthAccessToken, | |
| nonce: a.nonce, | |
| pendingToken: a.pendingToken, | |
| }; | |
| try { | |
| return new Sc(a.providerId, b, a.signInMethod); | |
| } catch (lj) {} | |
| } | |
| return null; | |
| } | |
| function tf(a, b) { | |
| this.Fc = b || []; | |
| wd(this, { providerId: a, isOAuthProvider: !0 }); | |
| this.zb = {}; | |
| this.eb = (Ee(a) || {}).Ea || null; | |
| this.bb = null; | |
| } | |
| function Lf(a) { | |
| if ("string" !== typeof a || 0 != a.indexOf("saml.")) | |
| throw new da( | |
| "argument-error", | |
| 'SAML provider IDs must be prefixed with "saml."' | |
| ); | |
| tf.call(this, a, []); | |
| } | |
| function Jc(a) { | |
| tf.call(this, a, Bj); | |
| this.a = []; | |
| } | |
| function Te() { | |
| Jc.call(this, "facebook.com"); | |
| } | |
| function Nf(a) { | |
| if (!a) | |
| throw new da( | |
| "argument-error", | |
| "credential failed: expected 1 argument (the OAuth access token)." | |
| ); | |
| var b = a; | |
| l(a) && (b = a.accessToken); | |
| return new Te().credential({ accessToken: b }); | |
| } | |
| function Uc() { | |
| Jc.call(this, "github.com"); | |
| } | |
| function uf(a) { | |
| if (!a) | |
| throw new da( | |
| "argument-error", | |
| "credential failed: expected 1 argument (the OAuth access token)." | |
| ); | |
| var b = a; | |
| l(a) && (b = a.accessToken); | |
| return new Uc().credential({ accessToken: b }); | |
| } | |
| function de() { | |
| Jc.call(this, "google.com"); | |
| this.ya("profile"); | |
| } | |
| function Tc(a, b) { | |
| var p = a; | |
| l(a) && ((p = a.idToken), (b = a.accessToken)); | |
| return new de().credential({ idToken: p, accessToken: b }); | |
| } | |
| function te() { | |
| tf.call(this, "twitter.com", ml); | |
| } | |
| function Lg(a, b) { | |
| var p = a; | |
| l(p) || (p = { oauthToken: a, oauthTokenSecret: b }); | |
| if (!p.oauthToken || !p.oauthTokenSecret) | |
| throw new da( | |
| "argument-error", | |
| "credential failed: expected 2 arguments (the OAuth access token and secret)." | |
| ); | |
| return new Sc("twitter.com", p, "twitter.com"); | |
| } | |
| function Nd(a, b, p) { | |
| this.a = a; | |
| this.c = b; | |
| Oa(this, "providerId", "password"); | |
| Oa( | |
| this, | |
| "signInMethod", | |
| p === sd.EMAIL_LINK_SIGN_IN_METHOD | |
| ? sd.EMAIL_LINK_SIGN_IN_METHOD | |
| : sd.EMAIL_PASSWORD_SIGN_IN_METHOD | |
| ); | |
| } | |
| function Gf(a) { | |
| return a && a.email && a.password | |
| ? new Nd(a.email, a.password, a.signInMethod) | |
| : null; | |
| } | |
| function sd() { | |
| wd(this, { providerId: "password", isOAuthProvider: !1 }); | |
| } | |
| function ic(a, b) { | |
| b = Ng(b); | |
| if (!b) throw new da("argument-error", "Invalid email link!"); | |
| return new Nd(a, b.code, sd.EMAIL_LINK_SIGN_IN_METHOD); | |
| } | |
| function Ng(a) { | |
| a = ef(a); | |
| return (a = Sd(a)) && a.operation === yj ? a : null; | |
| } | |
| function Ue(a) { | |
| if (!((a.Va && a.Ua) || (a.Ha && a.ba))) throw new da("internal-error"); | |
| this.a = a; | |
| Oa(this, "providerId", "phone"); | |
| Oa(this, "signInMethod", "phone"); | |
| } | |
| function Og(a) { | |
| if ( | |
| a && | |
| "phone" === a.providerId && | |
| ((a.verificationId && a.verificationCode) || | |
| (a.temporaryProof && a.phoneNumber)) | |
| ) { | |
| var b = {}; | |
| Ye( | |
| [ | |
| "verificationId", | |
| "verificationCode", | |
| "temporaryProof", | |
| "phoneNumber", | |
| ], | |
| function (p) { | |
| a[p] && (b[p] = a[p]); | |
| } | |
| ); | |
| return new Ue(b); | |
| } | |
| return null; | |
| } | |
| function oc(a) { | |
| return a.a.Ha && a.a.ba | |
| ? { temporaryProof: a.a.Ha, phoneNumber: a.a.ba } | |
| : { sessionInfo: a.a.Va, code: a.a.Ua }; | |
| } | |
| function Td(a) { | |
| try { | |
| this.a = a || uc.auth(); | |
| } catch (Rf) { | |
| throw new da( | |
| "argument-error", | |
| "Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp()." | |
| ); | |
| } | |
| wd(this, { providerId: "phone", isOAuthProvider: !1 }); | |
| } | |
| function Ag(a, b) { | |
| if (!a) throw new da("missing-verification-id"); | |
| if (!b) throw new da("missing-verification-code"); | |
| return new Ue({ Va: a, Ua: b }); | |
| } | |
| function gf(a) { | |
| if (a.temporaryProof && a.phoneNumber) | |
| return new Ue({ Ha: a.temporaryProof, ba: a.phoneNumber }); | |
| var b = a && a.providerId; | |
| if (!b || "password" === b) return null; | |
| var p = a && a.oauthAccessToken, | |
| c = a && a.oauthTokenSecret, | |
| e = a && a.nonce, | |
| g = a && a.oauthIdToken, | |
| d = a && a.pendingToken; | |
| try { | |
| switch (b) { | |
| case "google.com": | |
| return Tc(g, p); | |
| case "facebook.com": | |
| return Nf(p); | |
| case "github.com": | |
| return uf(p); | |
| case "twitter.com": | |
| return Lg(p, c); | |
| default: | |
| return p || c || g || d | |
| ? d | |
| ? 0 == b.indexOf("saml.") | |
| ? new id(b, d) | |
| : new Sc( | |
| b, | |
| { | |
| pendingToken: d, | |
| idToken: a.oauthIdToken, | |
| accessToken: a.oauthAccessToken, | |
| }, | |
| b | |
| ) | |
| : new Jc(b).credential({ | |
| idToken: g, | |
| accessToken: p, | |
| rawNonce: e, | |
| }) | |
| : null; | |
| } | |
| } catch (aj) { | |
| return null; | |
| } | |
| } | |
| function vf(a) { | |
| if (!a.isOAuthProvider) throw new da("invalid-oauth-provider"); | |
| } | |
| function wf(a, b, p, c, e, g, d) { | |
| this.c = a; | |
| this.b = b || null; | |
| this.g = p || null; | |
| this.f = c || null; | |
| this.i = g || null; | |
| this.h = d || null; | |
| this.a = e || null; | |
| if (this.g || this.a) { | |
| if (this.g && this.a) throw new da("invalid-auth-event"); | |
| if (this.g && !this.f) throw new da("invalid-auth-event"); | |
| } else throw new da("invalid-auth-event"); | |
| } | |
| function hc(a) { | |
| a = a || {}; | |
| return a.type | |
| ? new wf( | |
| a.type, | |
| a.eventId, | |
| a.urlResponse, | |
| a.sessionId, | |
| a.error && Pe(a.error), | |
| a.postBody, | |
| a.tenantId | |
| ) | |
| : null; | |
| } | |
| function Vc() { | |
| this.b = null; | |
| this.a = []; | |
| } | |
| function xf(a) { | |
| var b = ek; | |
| b.a.push(a); | |
| b.b || | |
| ((b.b = function (a) { | |
| for (var p = 0; p < b.a.length; p++) b.a[p](a); | |
| }), | |
| (a = Sb("universalLinks.subscribe", sa)), | |
| "function" === typeof a && a(null, b.b)); | |
| } | |
| function Ve(a) { | |
| var b = "unauthorized-domain", | |
| p = void 0, | |
| c = Ib(a); | |
| a = c.b; | |
| c = c.f; | |
| "chrome-extension" == c | |
| ? (p = bb( | |
| "This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -\x3e Auth section -\x3e Sign in method tab.", | |
| a | |
| )) | |
| : "http" == c || "https" == c | |
| ? (p = bb( | |
| "This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -\x3e Auth section -\x3e Sign in method tab.", | |
| a | |
| )) | |
| : (b = "operation-not-supported-in-this-environment"); | |
| da.call(this, b, p); | |
| } | |
| function ee(a, b, p) { | |
| da.call(this, a, p); | |
| a = b || {}; | |
| a.Ab && Oa(this, "email", a.Ab); | |
| a.ba && Oa(this, "phoneNumber", a.ba); | |
| a.credential && Oa(this, "credential", a.credential); | |
| a.Qb && Oa(this, "tenantId", a.Qb); | |
| } | |
| function Pd(a) { | |
| if (a.code) { | |
| var b = a.code || ""; | |
| 0 == b.indexOf(qj) && (b = b.substring(qj.length)); | |
| var p = { credential: gf(a), Qb: a.tenantId }; | |
| if (a.email) p.Ab = a.email; | |
| else if (a.phoneNumber) p.ba = a.phoneNumber; | |
| else if (!p.credential) return new da(b, a.message || void 0); | |
| return new ee(b, p, a.message); | |
| } | |
| return null; | |
| } | |
| function zf() {} | |
| function Wh(a) { | |
| return a.c || (a.c = a.b()); | |
| } | |
| function hf() {} | |
| function Pg(a) { | |
| if ( | |
| !a.f && | |
| "undefined" == typeof XMLHttpRequest && | |
| "undefined" != typeof ActiveXObject | |
| ) { | |
| for ( | |
| var b = [ | |
| "MSXML2.XMLHTTP.6.0", | |
| "MSXML2.XMLHTTP.3.0", | |
| "MSXML2.XMLHTTP", | |
| "Microsoft.XMLHTTP", | |
| ], | |
| p = 0; | |
| p < b.length; | |
| p++ | |
| ) { | |
| var c = b[p]; | |
| try { | |
| return new ActiveXObject(c), (a.f = c); | |
| } catch (Zi) {} | |
| } | |
| throw Error( | |
| "Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed" | |
| ); | |
| } | |
| return a.f; | |
| } | |
| function Bg() {} | |
| function fi() { | |
| this.a = new XDomainRequest(); | |
| this.readyState = 0; | |
| this.onreadystatechange = null; | |
| this.responseType = this.responseText = this.response = ""; | |
| this.status = -1; | |
| this.statusText = ""; | |
| this.a.onload = y(this.fc, this); | |
| this.a.onerror = y(this.Ib, this); | |
| this.a.onprogress = y(this.gc, this); | |
| this.a.ontimeout = y(this.kc, this); | |
| } | |
| function Cg(a, b) { | |
| a.readyState = b; | |
| if (a.onreadystatechange) a.onreadystatechange(); | |
| } | |
| function fe(a, b, p) { | |
| this.reset(a, b, p, void 0, void 0); | |
| } | |
| function me(a) { | |
| this.f = a; | |
| this.b = this.c = this.a = null; | |
| } | |
| function We(a, b) { | |
| this.name = a; | |
| this.value = b; | |
| } | |
| function jf(a) { | |
| if (a.c) return a.c; | |
| if (a.a) return jf(a.a); | |
| E("Root logger has no level set."); | |
| return null; | |
| } | |
| function ue(a) { | |
| Cj || ((Cj = new me("")), (fk[""] = Cj), (Cj.c = um)); | |
| var b; | |
| if (!(b = fk[a])) { | |
| b = new me(a); | |
| var p = a.lastIndexOf("."), | |
| c = a.substr(p + 1); | |
| p = ue(a.substr(0, p)); | |
| p.b || (p.b = {}); | |
| p.b[c] = b; | |
| b.a = p; | |
| fk[a] = b; | |
| } | |
| return b; | |
| } | |
| function ve(a, b) { | |
| a && a.log(vm, b, void 0); | |
| } | |
| function ze(a) { | |
| this.f = a; | |
| } | |
| function Jd(a) { | |
| $a.call(this); | |
| this.o = a; | |
| this.readyState = gk; | |
| this.status = 0; | |
| this.responseType = this.responseText = this.response = this.statusText = | |
| ""; | |
| this.onreadystatechange = null; | |
| this.i = new Headers(); | |
| this.b = null; | |
| this.m = "GET"; | |
| this.g = ""; | |
| this.a = !1; | |
| this.h = ue("goog.net.FetchXmlHttp"); | |
| this.l = this.c = this.f = null; | |
| } | |
| function jd(a) { | |
| a.c.read().then(a.ec.bind(a)).catch(a.Oa.bind(a)); | |
| } | |
| function Cf(a, b) { | |
| b && a.f && ((a.status = a.f.status), (a.statusText = a.f.statusText)); | |
| a.readyState = 4; | |
| a.f = null; | |
| a.c = null; | |
| a.l = null; | |
| mf(a); | |
| } | |
| function mf(a) { | |
| a.onreadystatechange && a.onreadystatechange.call(a); | |
| } | |
| function Ie(a) { | |
| $a.call(this); | |
| this.headers = new nc(); | |
| this.B = a || null; | |
| this.c = !1; | |
| this.w = this.a = null; | |
| this.h = this.O = this.l = ""; | |
| this.f = this.J = this.i = this.I = !1; | |
| this.g = 0; | |
| this.o = null; | |
| this.m = nl; | |
| this.v = this.P = !1; | |
| } | |
| function bg(a, b, p, c, e) { | |
| if (a.a) | |
| throw Error( | |
| "[goog.net.XhrIo] Object is active with another request\x3d" + | |
| a.l + | |
| "; newUri\x3d" + | |
| b | |
| ); | |
| p = p ? p.toUpperCase() : "GET"; | |
| a.l = b; | |
| a.h = ""; | |
| a.O = p; | |
| a.I = !1; | |
| a.c = !0; | |
| a.a = a.B ? a.B.a() : ol.a(); | |
| a.w = a.B ? Wh(a.B) : Wh(ol); | |
| a.a.onreadystatechange = y(a.Lb, a); | |
| try { | |
| ve(a.b, xe(a, "Opening Xhr")), | |
| (a.J = !0), | |
| a.a.open(p, String(b), !0), | |
| (a.J = !1); | |
| } catch (li) { | |
| ve(a.b, xe(a, "Error opening Xhr: " + li.message)); | |
| cg(a, li); | |
| return; | |
| } | |
| b = c || ""; | |
| var g = new nc(a.headers); | |
| e && | |
| Hb(e, function (a, b) { | |
| g.set(b, a); | |
| }); | |
| e = M(g.X()); | |
| c = sa.FormData && b instanceof sa.FormData; | |
| !F(wm, p) || | |
| e || | |
| c || | |
| g.set( | |
| "Content-Type", | |
| "application/x-www-form-urlencoded;charset\x3dutf-8" | |
| ); | |
| g.forEach(function (a, b) { | |
| this.a.setRequestHeader(b, a); | |
| }, a); | |
| a.m && (a.a.responseType = a.m); | |
| "withCredentials" in a.a && | |
| a.a.withCredentials !== a.P && | |
| (a.a.withCredentials = a.P); | |
| try { | |
| eg(a), | |
| 0 < a.g && | |
| ((a.v = Dh(a.a)), | |
| ve( | |
| a.b, | |
| xe(a, "Will abort after " + a.g + "ms if incomplete, xhr2 " + a.v) | |
| ), | |
| a.v | |
| ? ((a.a.timeout = a.g), (a.a.ontimeout = y(a.Ia, a))) | |
| : (a.o = Tb(a.Ia, a.g, a))), | |
| ve(a.b, xe(a, "Sending request")), | |
| (a.i = !0), | |
| a.a.send(b), | |
| (a.i = !1); | |
| } catch (li) { | |
| ve(a.b, xe(a, "Send error: " + li.message)), cg(a, li); | |
| } | |
| } | |
| function Dh(a) { | |
| return ( | |
| Ch && xd(9) && "number" == typeof a.timeout && void 0 !== a.ontimeout | |
| ); | |
| } | |
| function Gg(a) { | |
| return "content-type" == a.toLowerCase(); | |
| } | |
| function cg(a, b) { | |
| a.c = !1; | |
| a.a && ((a.f = !0), a.a.abort(), (a.f = !1)); | |
| a.h = b; | |
| dg(a); | |
| nf(a); | |
| } | |
| function dg(a) { | |
| a.I || | |
| ((a.I = !0), a.dispatchEvent("complete"), a.dispatchEvent("error")); | |
| } | |
| function Ug(a) { | |
| if (a.c && "undefined" != typeof hk) | |
| if (a.w[1] && 4 == tg(a) && 2 == Vg(a)) | |
| ve(a.b, xe(a, "Local request error detected and ignored")); | |
| else if (a.i && 4 == tg(a)) Tb(a.Lb, 0, a); | |
| else if ((a.dispatchEvent("readystatechange"), 4 == tg(a))) { | |
| ve(a.b, xe(a, "Request complete")); | |
| a.c = !1; | |
| try { | |
| var b = Vg(a); | |
| a: switch (b) { | |
| case 200: | |
| case 201: | |
| case 202: | |
| case 204: | |
| case 206: | |
| case 304: | |
| case 1223: | |
| var p = !0; | |
| break a; | |
| default: | |
| p = !1; | |
| } | |
| var c; | |
| if (!(c = p)) { | |
| var e; | |
| if ((e = 0 === b)) { | |
| var g = String(a.l).match(Vk)[1] || null; | |
| if (!g && sa.self && sa.self.location) { | |
| var d = sa.self.location.protocol; | |
| g = d.substr(0, d.length - 1); | |
| } | |
| e = !xm.test(g ? g.toLowerCase() : ""); | |
| } | |
| c = e; | |
| } | |
| if (c) a.dispatchEvent("complete"), a.dispatchEvent("success"); | |
| else { | |
| try { | |
| var l = 2 < tg(a) ? a.a.statusText : ""; | |
| } catch (mi) { | |
| ve(a.b, "Can not get status: " + mi.message), (l = ""); | |
| } | |
| a.h = l + " [" + Vg(a) + "]"; | |
| dg(a); | |
| } | |
| } finally { | |
| nf(a); | |
| } | |
| } | |
| } | |
| function nf(a, b) { | |
| if (a.a) { | |
| eg(a); | |
| var p = a.a, | |
| c = a.w[0] ? u : null; | |
| a.a = null; | |
| a.w = null; | |
| b || a.dispatchEvent("ready"); | |
| try { | |
| p.onreadystatechange = c; | |
| } catch (Zi) { | |
| (a = a.b) && | |
| a.log( | |
| pl, | |
| "Problem encountered resetting onreadystatechange: " + Zi.message, | |
| void 0 | |
| ); | |
| } | |
| } | |
| } | |
| function eg(a) { | |
| a.a && a.v && (a.a.ontimeout = null); | |
| a.o && (sa.clearTimeout(a.o), (a.o = null)); | |
| } | |
| function tg(a) { | |
| return a.a ? a.a.readyState : 0; | |
| } | |
| function Vg(a) { | |
| try { | |
| return 2 < tg(a) ? a.a.status : -1; | |
| } catch (Rf) { | |
| return -1; | |
| } | |
| } | |
| function qi(a) { | |
| try { | |
| return a.a ? a.a.responseText : ""; | |
| } catch (Rf) { | |
| return ve(a.b, "Can not get responseText: " + Rf.message), ""; | |
| } | |
| } | |
| function xe(a, b) { | |
| return b + " [" + a.O + " " + a.l + " " + Vg(a) + "]"; | |
| } | |
| function ag(a) { | |
| var b = Jg; | |
| this.g = []; | |
| this.v = b; | |
| this.o = a || null; | |
| this.f = this.a = !1; | |
| this.c = void 0; | |
| this.u = this.w = this.i = !1; | |
| this.h = 0; | |
| this.b = null; | |
| this.l = 0; | |
| } | |
| function Dg(a, b, p) { | |
| a.a = !0; | |
| a.c = p; | |
| a.f = !b; | |
| nh(a); | |
| } | |
| function Je(a) { | |
| if (a.a) { | |
| if (!a.u) throw new oh(a); | |
| a.u = !1; | |
| } | |
| } | |
| function Eh(a, b) { | |
| Yd(a, null, b, void 0); | |
| } | |
| function Yd(a, b, p, c) { | |
| a.g.push([b, p, c]); | |
| a.a && nh(a); | |
| } | |
| function ug(a) { | |
| return ym(a.g, function (a) { | |
| return e(a[1]); | |
| }); | |
| } | |
| function nh(a) { | |
| if (a.h && a.a && ug(a)) { | |
| var b = a.h, | |
| p = Dj[b]; | |
| p && (sa.clearTimeout(p.a), delete Dj[b]); | |
| a.h = 0; | |
| } | |
| a.b && (a.b.l--, delete a.b); | |
| b = a.c; | |
| for (var c = (p = !1); a.g.length && !a.i; ) { | |
| var e = a.g.shift(), | |
| g = e[0], | |
| d = e[1]; | |
| e = e[2]; | |
| if ((g = a.f ? d : g)) | |
| try { | |
| var l = g.call(e || a.o, b); | |
| void 0 !== l && | |
| ((a.f = a.f && (l == b || l instanceof Error)), (a.c = b = l)); | |
| if ( | |
| I(b) || | |
| ("function" === typeof sa.Promise && b instanceof sa.Promise) | |
| ) | |
| (c = !0), (a.i = !0); | |
| } catch (mi) { | |
| (b = mi), (a.f = !0), ug(a) || (p = !0); | |
| } | |
| } | |
| a.c = b; | |
| c && | |
| ((l = y(a.m, a, !0)), | |
| (c = y(a.m, a, !1)), | |
| b instanceof ag ? (Yd(b, l, c), (b.w = !0)) : b.then(l, c)); | |
| p && ((b = new fh(b)), (Dj[b.a] = b), (a.h = b.a)); | |
| } | |
| function oh() { | |
| H.call(this); | |
| } | |
| function Qg() { | |
| H.call(this); | |
| } | |
| function fh(a) { | |
| this.a = sa.setTimeout(y(this.c, this), 0); | |
| this.b = a; | |
| } | |
| function yh(a) { | |
| var b = {}, | |
| p = b.document || document, | |
| c = Ca(a).toString(), | |
| e = document.createElement("SCRIPT"), | |
| g = { Nb: e, Ia: void 0 }, | |
| d = new ag(g), | |
| l = null, | |
| h = null != b.timeout ? b.timeout : 5e3; | |
| 0 < h && | |
| ((l = window.setTimeout(function () { | |
| $e(e, !0); | |
| var a = new ph(zm, "Timeout reached for loading script " + c); | |
| Je(d); | |
| Dg(d, !1, a); | |
| }, h)), | |
| (g.Ia = l)); | |
| e.onload = e.onreadystatechange = function () { | |
| (e.readyState && | |
| "loaded" != e.readyState && | |
| "complete" != e.readyState) || | |
| ($e(e, b.hd || !1, l), Je(d), Dg(d, !0, null)); | |
| }; | |
| e.onerror = function () { | |
| $e(e, !0, l); | |
| var a = new ph(Am, "Error while loading script " + c); | |
| Je(d); | |
| Dg(d, !1, a); | |
| }; | |
| g = b.attributes || {}; | |
| Y(g, { type: "text/javascript", charset: "UTF-8" }); | |
| Vb(e, g); | |
| Ia(e, a); | |
| jc(p).appendChild(e); | |
| return d; | |
| } | |
| function jc(a) { | |
| var b; | |
| return (b = (a || document).getElementsByTagName("HEAD")) && 0 != b.length | |
| ? b[0] | |
| : a.documentElement; | |
| } | |
| function Jg() { | |
| if (this && this.Nb) { | |
| var a = this.Nb; | |
| a && "SCRIPT" == a.tagName && $e(a, !0, this.Ia); | |
| } | |
| } | |
| function $e(a, b, p) { | |
| null != p && sa.clearTimeout(p); | |
| a.onload = u; | |
| a.onerror = u; | |
| a.onreadystatechange = u; | |
| b && | |
| window.setTimeout(function () { | |
| a && a.parentNode && a.parentNode.removeChild(a); | |
| }, 0); | |
| } | |
| function ph(a, b) { | |
| var p = "Jsloader error (code #" + a + ")"; | |
| b && (p += ": " + b); | |
| H.call(this, p); | |
| this.code = a; | |
| } | |
| function pc(a) { | |
| this.f = a; | |
| } | |
| function Wc(a, b, p) { | |
| this.c = a; | |
| a = b || {}; | |
| this.l = | |
| a.secureTokenEndpoint || "https://securetoken.googleapis.com/v1/token"; | |
| this.u = a.secureTokenTimeout || Bm; | |
| this.g = U(a.secureTokenHeaders || Cm); | |
| this.h = | |
| a.firebaseEndpoint || | |
| "https://www.googleapis.com/identitytoolkit/v3/relyingparty/"; | |
| this.i = a.firebaseTimeout || Dm; | |
| this.a = U(a.firebaseHeaders || Em); | |
| p && ((this.a["X-Client-Version"] = p), (this.g["X-Client-Version"] = p)); | |
| p = "Node" == Rb(); | |
| p = | |
| sa.XMLHttpRequest || | |
| (p && uc.INTERNAL.node && uc.INTERNAL.node.XMLHttpRequest); | |
| if (!p && !Kb()) | |
| throw new da( | |
| "internal-error", | |
| "The XMLHttpRequest compatibility library was not found." | |
| ); | |
| this.f = void 0; | |
| Kb() | |
| ? (this.f = new ze(self)) | |
| : wc() | |
| ? (this.f = new pc(p)) | |
| : (this.f = new Bg()); | |
| this.b = null; | |
| } | |
| function Pf(a, b) { | |
| b ? (a.a["X-Firebase-Locale"] = b) : delete a.a["X-Firebase-Locale"]; | |
| } | |
| function Fh(a, b) { | |
| b | |
| ? ((a.a["X-Client-Version"] = b), (a.g["X-Client-Version"] = b)) | |
| : (delete a.a["X-Client-Version"], delete a.g["X-Client-Version"]); | |
| } | |
| function qh(a, b, p, c, e, g, d) { | |
| Ec() || Kb() | |
| ? (a = y(a.o, a)) | |
| : (ik || | |
| (ik = new ha(function (a, b) { | |
| gh(a, b); | |
| })), | |
| (a = y(a.m, a))); | |
| a(b, p, c, e, g, d); | |
| } | |
| function gh(a, b) { | |
| if (((window.gapi || {}).client || {}).request) a(); | |
| else { | |
| sa[ql] = function () { | |
| ((window.gapi || {}).client || {}).request | |
| ? a() | |
| : b(Error("CORS_UNSUPPORTED")); | |
| }; | |
| var p = fa(Fm, { onload: ql }); | |
| Eh(yh(p), function () { | |
| b(Error("CORS_UNSUPPORTED")); | |
| }); | |
| } | |
| } | |
| function mg(a, b) { | |
| return new ha(function (p, c) { | |
| ("refresh_token" == b.grant_type && b.refresh_token) || | |
| ("authorization_code" == b.grant_type && b.code) | |
| ? qh( | |
| a, | |
| a.l + "?key\x3d" + encodeURIComponent(a.c), | |
| function (a) { | |
| a | |
| ? a.error | |
| ? c(kd(a)) | |
| : a.access_token && a.refresh_token | |
| ? p(a) | |
| : c(new da("internal-error")) | |
| : c(new da("network-request-failed")); | |
| }, | |
| "POST", | |
| ab(b).toString(), | |
| a.g, | |
| a.u.get() | |
| ) | |
| : c(new da("internal-error")); | |
| }); | |
| } | |
| function Wd(a, b, p, c, e, g) { | |
| var d = Ib(a.h + b); | |
| sb(d, "key", a.c); | |
| g && sb(d, "cb", Yh().toString()); | |
| var l = "GET" == p; | |
| if (l) for (var h in c) c.hasOwnProperty(h) && sb(d, h, c[h]); | |
| return new ha(function (b, g) { | |
| qh( | |
| a, | |
| d.toString(), | |
| function (a) { | |
| a | |
| ? a.error | |
| ? g(kd(a, e || {})) | |
| : b(a) | |
| : g(new da("network-request-failed")); | |
| }, | |
| p, | |
| l ? void 0 : Jb(Hd(c)), | |
| a.a, | |
| a.i.get() | |
| ); | |
| }); | |
| } | |
| function Sf(a) { | |
| a = a.email; | |
| if (!q(a) || !Gm.test(a)) throw new da("invalid-email"); | |
| } | |
| function kf(a) { | |
| "email" in a && Sf(a); | |
| } | |
| function Gh(a, b) { | |
| return Ra(a, Hm, { | |
| identifier: b, | |
| continueUri: Lb() ? eb() : "http://localhost", | |
| }).then(function (a) { | |
| return a.signinMethods || []; | |
| }); | |
| } | |
| function vg(a) { | |
| return Ra(a, Im, {}).then(function (a) { | |
| return a.authorizedDomains || []; | |
| }); | |
| } | |
| function Zc(a) { | |
| if (!a[mh]) throw new da("internal-error"); | |
| } | |
| function mc(a) { | |
| if (a.phoneNumber || a.temporaryProof) { | |
| if (!a.phoneNumber || !a.temporaryProof) throw new da("internal-error"); | |
| } else { | |
| if (!a.sessionInfo) throw new da("missing-verification-id"); | |
| if (!a.code) throw new da("missing-verification-code"); | |
| } | |
| } | |
| function Wg(a, b) { | |
| return Ra(a, Jm, b); | |
| } | |
| function qc(a, b, p) { | |
| return Ra(a, Km, { idToken: b, deleteProvider: p }); | |
| } | |
| function wg(a) { | |
| if (!a.requestUri || (!a.sessionId && !a.postBody && !a.pendingToken)) | |
| throw new da("internal-error"); | |
| } | |
| function Xd(a, b) { | |
| b.oauthIdToken && | |
| b.providerId && | |
| 0 == b.providerId.indexOf("oidc.") && | |
| !b.pendingToken && | |
| (a.sessionId | |
| ? (b.nonce = a.sessionId) | |
| : a.postBody && | |
| ((a = new xa(a.postBody)), | |
| Eb(a, "nonce") && (b.nonce = a.get("nonce")))); | |
| return b; | |
| } | |
| function ng(a) { | |
| var b = null; | |
| a.needConfirmation | |
| ? ((a.code = "account-exists-with-different-credential"), (b = Pd(a))) | |
| : "FEDERATED_USER_ID_ALREADY_LINKED" == a.errorMessage | |
| ? ((a.code = "credential-already-in-use"), (b = Pd(a))) | |
| : "EMAIL_EXISTS" == a.errorMessage | |
| ? ((a.code = "email-already-in-use"), (b = Pd(a))) | |
| : a.errorMessage && (b = Bc(a.errorMessage)); | |
| if (b) throw b; | |
| if (!a[mh]) throw new da("internal-error"); | |
| } | |
| function af(a, b) { | |
| b.returnIdpCredential = !0; | |
| return Ra(a, Lm, b); | |
| } | |
| function we(a, b) { | |
| b.returnIdpCredential = !0; | |
| return Ra(a, Mm, b); | |
| } | |
| function hg(a, b) { | |
| b.returnIdpCredential = !0; | |
| b.autoCreate = !1; | |
| return Ra(a, Nm, b); | |
| } | |
| function ye(a) { | |
| if (!a.oobCode) throw new da("invalid-action-code"); | |
| } | |
| function Ra(a, b, p) { | |
| if (!ne(p, b.V)) return na(new da("internal-error")); | |
| var c = b.Kb || "POST", | |
| e; | |
| return Da(p) | |
| .then(b.D) | |
| .then(function () { | |
| b.T && (p.returnSecureToken = !0); | |
| b.F && a.b && "undefined" === typeof p.tenantId && (p.tenantId = a.b); | |
| return Wd(a, b.endpoint, c, p, b.Yb, b.wb || !1); | |
| }) | |
| .then(function (a) { | |
| e = a; | |
| return b.Ra ? b.Ra(p, e) : e; | |
| }) | |
| .then(b.K) | |
| .then(function () { | |
| if (!b.fa) return e; | |
| if (!(b.fa in e)) throw new da("internal-error"); | |
| return e[b.fa]; | |
| }); | |
| } | |
| function Bc(a) { | |
| return kd({ error: { errors: [{ message: a }], code: 400, message: a } }); | |
| } | |
| function kd(a, b) { | |
| var p = | |
| ((a.error && a.error.errors && a.error.errors[0]) || {}).reason || "", | |
| c = { | |
| keyInvalid: "invalid-api-key", | |
| ipRefererBlocked: "app-not-authorized", | |
| }; | |
| if ((p = c[p] ? new da(c[p]) : null)) return p; | |
| p = (a.error && a.error.message) || ""; | |
| c = { | |
| INVALID_CUSTOM_TOKEN: "invalid-custom-token", | |
| CREDENTIAL_MISMATCH: "custom-token-mismatch", | |
| MISSING_CUSTOM_TOKEN: "internal-error", | |
| INVALID_IDENTIFIER: "invalid-email", | |
| MISSING_CONTINUE_URI: "internal-error", | |
| INVALID_EMAIL: "invalid-email", | |
| INVALID_PASSWORD: "wrong-password", | |
| USER_DISABLED: "user-disabled", | |
| MISSING_PASSWORD: "internal-error", | |
| EMAIL_EXISTS: "email-already-in-use", | |
| PASSWORD_LOGIN_DISABLED: "operation-not-allowed", | |
| INVALID_IDP_RESPONSE: "invalid-credential", | |
| INVALID_PENDING_TOKEN: "invalid-credential", | |
| FEDERATED_USER_ID_ALREADY_LINKED: "credential-already-in-use", | |
| MISSING_OR_INVALID_NONCE: "missing-or-invalid-nonce", | |
| INVALID_MESSAGE_PAYLOAD: "invalid-message-payload", | |
| INVALID_RECIPIENT_EMAIL: "invalid-recipient-email", | |
| INVALID_SENDER: "invalid-sender", | |
| EMAIL_NOT_FOUND: "user-not-found", | |
| RESET_PASSWORD_EXCEED_LIMIT: "too-many-requests", | |
| EXPIRED_OOB_CODE: "expired-action-code", | |
| INVALID_OOB_CODE: "invalid-action-code", | |
| MISSING_OOB_CODE: "internal-error", | |
| INVALID_PROVIDER_ID: "invalid-provider-id", | |
| CREDENTIAL_TOO_OLD_LOGIN_AGAIN: "requires-recent-login", | |
| INVALID_ID_TOKEN: "invalid-user-token", | |
| TOKEN_EXPIRED: "user-token-expired", | |
| USER_NOT_FOUND: "user-token-expired", | |
| CORS_UNSUPPORTED: "cors-unsupported", | |
| DYNAMIC_LINK_NOT_ACTIVATED: "dynamic-link-not-activated", | |
| INVALID_APP_ID: "invalid-app-id", | |
| TOO_MANY_ATTEMPTS_TRY_LATER: "too-many-requests", | |
| WEAK_PASSWORD: "weak-password", | |
| OPERATION_NOT_ALLOWED: "operation-not-allowed", | |
| USER_CANCELLED: "user-cancelled", | |
| CAPTCHA_CHECK_FAILED: "captcha-check-failed", | |
| INVALID_APP_CREDENTIAL: "invalid-app-credential", | |
| INVALID_CODE: "invalid-verification-code", | |
| INVALID_PHONE_NUMBER: "invalid-phone-number", | |
| INVALID_SESSION_INFO: "invalid-verification-id", | |
| INVALID_TEMPORARY_PROOF: "invalid-credential", | |
| MISSING_APP_CREDENTIAL: "missing-app-credential", | |
| MISSING_CODE: "missing-verification-code", | |
| MISSING_PHONE_NUMBER: "missing-phone-number", | |
| MISSING_SESSION_INFO: "missing-verification-id", | |
| QUOTA_EXCEEDED: "quota-exceeded", | |
| SESSION_EXPIRED: "code-expired", | |
| REJECTED_CREDENTIAL: "rejected-credential", | |
| INVALID_CONTINUE_URI: "invalid-continue-uri", | |
| MISSING_ANDROID_PACKAGE_NAME: "missing-android-pkg-name", | |
| MISSING_IOS_BUNDLE_ID: "missing-ios-bundle-id", | |
| UNAUTHORIZED_DOMAIN: "unauthorized-continue-uri", | |
| INVALID_DYNAMIC_LINK_DOMAIN: "invalid-dynamic-link-domain", | |
| INVALID_OAUTH_CLIENT_ID: "invalid-oauth-client-id", | |
| INVALID_CERT_HASH: "invalid-cert-hash", | |
| UNSUPPORTED_TENANT_OPERATION: "unsupported-tenant-operation", | |
| INVALID_TENANT_ID: "invalid-tenant-id", | |
| TENANT_ID_MISMATCH: "tenant-id-mismatch", | |
| ADMIN_ONLY_OPERATION: "admin-restricted-operation", | |
| }; | |
| Y(c, b || {}); | |
| b = | |
| (b = p.match(/^[^\s]+\s*:\s*([\s\S]*)$/)) && 1 < b.length | |
| ? b[1] | |
| : void 0; | |
| for (var e in c) if (0 === p.indexOf(e)) return new da(c[e], b); | |
| !b && a && (b = Rc(a)); | |
| return new da("internal-error", b); | |
| } | |
| function Hh(a) { | |
| this.b = a; | |
| this.a = null; | |
| this.gb = Fd(this); | |
| } | |
| function Fd(a) { | |
| return Uf().then(function () { | |
| return new ha(function (b, p) { | |
| Sb("gapi.iframes.getContext")().open( | |
| { | |
| where: document.body, | |
| url: a.b, | |
| messageHandlersFilter: Sb( | |
| "gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER" | |
| ), | |
| attributes: { | |
| style: { | |
| position: "absolute", | |
| top: "-100px", | |
| width: "1px", | |
| height: "1px", | |
| }, | |
| }, | |
| dontclear: !0, | |
| }, | |
| function (c) { | |
| function e() { | |
| clearTimeout(g); | |
| b(); | |
| } | |
| a.a = c; | |
| a.a.restyle({ setHideOnLeave: !1 }); | |
| var g = setTimeout(function () { | |
| p(Error("Network Error")); | |
| }, Om.get()); | |
| c.ping(e).then(e, function () { | |
| p(Error("Network Error")); | |
| }); | |
| } | |
| ); | |
| }); | |
| }); | |
| } | |
| function Pc(a, b) { | |
| return a.gb.then(function () { | |
| return new ha(function (p) { | |
| a.a.send( | |
| b.type, | |
| b, | |
| p, | |
| Sb("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER") | |
| ); | |
| }); | |
| }); | |
| } | |
| function Qd(a, b) { | |
| a.gb.then(function () { | |
| a.a.register( | |
| "authEvent", | |
| b, | |
| Sb("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER") | |
| ); | |
| }); | |
| } | |
| function Uf() { | |
| return Ej | |
| ? Ej | |
| : (Ej = new ha(function (a, b) { | |
| function p() { | |
| fd(); | |
| Sb("gapi.load")("gapi.iframes", { | |
| callback: a, | |
| ontimeout: function () { | |
| fd(); | |
| b(Error("Network Error")); | |
| }, | |
| timeout: Pm.get(), | |
| }); | |
| } | |
| if (Sb("gapi.iframes.Iframe")) a(); | |
| else if (Sb("gapi.load")) p(); | |
| else { | |
| var c = | |
| "__iframefcb" + Math.floor(1e6 * Math.random()).toString(); | |
| sa[c] = function () { | |
| Sb("gapi.load") ? p() : b(Error("Network Error")); | |
| }; | |
| c = fa(Qm, { onload: c }); | |
| Da(yh(c)).s(function () { | |
| b(Error("Network Error")); | |
| }); | |
| } | |
| }).s(function (a) { | |
| Ej = null; | |
| throw a; | |
| })); | |
| } | |
| function xg(a, b, p) { | |
| this.i = a; | |
| this.g = b; | |
| this.h = p; | |
| this.f = null; | |
| this.a = ob(this.i, "/__/auth/iframe"); | |
| sb(this.a, "apiKey", this.g); | |
| sb(this.a, "appName", this.h); | |
| this.b = null; | |
| this.c = []; | |
| } | |
| function of(a, b, p, c, e) { | |
| this.o = a; | |
| this.m = b; | |
| this.c = p; | |
| this.u = c; | |
| this.i = this.g = this.l = null; | |
| this.a = e; | |
| this.h = this.f = null; | |
| } | |
| function Tf(a) { | |
| try { | |
| return uc.app(a).auth().Ca(); | |
| } catch (Rf) { | |
| return []; | |
| } | |
| } | |
| function Xg(a, b, p, c, e) { | |
| this.u = a; | |
| this.f = b; | |
| this.b = p; | |
| this.c = c || null; | |
| this.h = e || null; | |
| this.m = this.o = this.v = null; | |
| this.g = []; | |
| this.l = this.a = null; | |
| } | |
| function Zd(a) { | |
| var b = eb(); | |
| return vg(a).then(function (a) { | |
| a: { | |
| var p = Ib(b), | |
| c = p.f; | |
| p = p.b; | |
| for (var e = 0; e < a.length; e++) { | |
| var g = a[e], | |
| d = p, | |
| l = c; | |
| 0 == g.indexOf("chrome-extension://") | |
| ? (d = Ib(g).b == d && "chrome-extension" == l) | |
| : "http" != l && "https" != l | |
| ? (d = !1) | |
| : Rm.test(g) | |
| ? (d = d == g) | |
| : ((g = g.split(".").join("\\.")), | |
| (d = new RegExp("^(.+\\." + g + "|" + g + ")$", "i").test(d))); | |
| if (d) { | |
| a = !0; | |
| break a; | |
| } | |
| } | |
| a = !1; | |
| } | |
| if (!a) throw new Ve(eb()); | |
| }); | |
| } | |
| function Ih(a) { | |
| if (a.l) return a.l; | |
| a.l = lc().then(function () { | |
| if (!a.o) { | |
| var b = a.c, | |
| p = a.h, | |
| c = Tf(a.b), | |
| e = new xg(a.u, a.f, a.b); | |
| e.f = b; | |
| e.b = p; | |
| e.c = N(c || []); | |
| a.o = e.toString(); | |
| } | |
| a.i = new Hh(a.o); | |
| zh(a); | |
| }); | |
| return a.l; | |
| } | |
| function Zh(a) { | |
| a.m || | |
| ((a.v = a.c ? nd(a.c, Tf(a.b)) : null), | |
| (a.m = new Wc(a.f, R(a.h), a.v))); | |
| return a.m; | |
| } | |
| function $c(a, b, p, c, e, g, d, l, h, k, n) { | |
| a = new of(a, b, p, c, e); | |
| a.l = g; | |
| a.g = d; | |
| a.i = l; | |
| a.b = U(h || null); | |
| a.f = k; | |
| return a.nb(n).toString(); | |
| } | |
| function zh(a) { | |
| if (!a.i) throw Error("IfcHandler must be initialized!"); | |
| Qd(a.i, function (b) { | |
| var p = {}; | |
| if (b && b.authEvent) { | |
| var c = !1; | |
| b = hc(b.authEvent); | |
| for (p = 0; p < a.g.length; p++) c = a.g[p](b) || c; | |
| p = {}; | |
| p.status = c ? "ACK" : "ERROR"; | |
| return Da(p); | |
| } | |
| p.status = "ERROR"; | |
| return Da(p); | |
| }); | |
| } | |
| function Jh(a) { | |
| var b = { type: "webStorageSupport" }; | |
| return Ih(a) | |
| .then(function () { | |
| return Pc(a.i, b); | |
| }) | |
| .then(function (a) { | |
| if (a && a.length && "undefined" !== typeof a[0].webStorageSupport) | |
| return a[0].webStorageSupport; | |
| throw Error(); | |
| }); | |
| } | |
| function pf(a) { | |
| this.a = | |
| a || (uc.INTERNAL.reactNative && uc.INTERNAL.reactNative.AsyncStorage); | |
| if (!this.a) | |
| throw new da( | |
| "internal-error", | |
| "The React Native compatibility library was not found." | |
| ); | |
| this.type = "asyncStorage"; | |
| } | |
| function Vf(a) { | |
| this.b = a; | |
| this.a = {}; | |
| this.f = y(this.c, this); | |
| } | |
| function Rg() { | |
| var a = Kb() ? self : null; | |
| Ye(rl, function (p) { | |
| p.b == a && (b = p); | |
| }); | |
| if (!b) { | |
| var b = new Vf(a); | |
| rl.push(b); | |
| } | |
| return b; | |
| } | |
| function og(a, b, p) { | |
| V(a.a) && a.b.addEventListener("message", a.f); | |
| "undefined" === typeof a.a[b] && (a.a[b] = []); | |
| a.a[b].push(p); | |
| } | |
| function pg(a) { | |
| this.a = a; | |
| } | |
| function Ke(a) { | |
| this.c = a; | |
| this.b = !1; | |
| this.a = []; | |
| } | |
| function Ah(a, b, p, c) { | |
| var e, | |
| g = p || {}, | |
| d, | |
| l, | |
| h, | |
| k = null; | |
| if (a.b) return na(Error("connection_unavailable")); | |
| var n = c ? 800 : 50, | |
| v = "undefined" !== typeof MessageChannel ? new MessageChannel() : null; | |
| return new ha(function (p, c) { | |
| v | |
| ? ((e = Math.floor(Math.random() * Math.pow(10, 20)).toString()), | |
| v.port1.start(), | |
| (l = setTimeout(function () { | |
| c(Error("unsupported_event")); | |
| }, n)), | |
| (d = function (a) { | |
| a.data.eventId === e && | |
| ("ack" === a.data.status | |
| ? (clearTimeout(l), | |
| (h = setTimeout(function () { | |
| c(Error("timeout")); | |
| }, 3e3))) | |
| : "done" === a.data.status | |
| ? (clearTimeout(h), | |
| "undefined" !== typeof a.data.response | |
| ? p(a.data.response) | |
| : c(Error("unknown_error"))) | |
| : (clearTimeout(l), | |
| clearTimeout(h), | |
| c(Error("invalid_response")))); | |
| }), | |
| (k = { messageChannel: v, onMessage: d }), | |
| a.a.push(k), | |
| v.port1.addEventListener("message", d), | |
| a.c.postMessage({ eventType: b, eventId: e, data: g }, [v.port2])) | |
| : c(Error("connection_unavailable")); | |
| }) | |
| .then(function (b) { | |
| qg(a, k); | |
| return b; | |
| }) | |
| .s(function (b) { | |
| qg(a, k); | |
| throw b; | |
| }); | |
| } | |
| function qg(a, b) { | |
| if (b) { | |
| var p = b.messageChannel, | |
| c = b.onMessage; | |
| p && (p.port1.removeEventListener("message", c), p.port1.close()); | |
| J(a.a, function (a) { | |
| return a == b; | |
| }); | |
| } | |
| } | |
| function hh() { | |
| if (!jh()) throw new da("web-storage-unsupported"); | |
| this.c = {}; | |
| this.a = []; | |
| this.b = 0; | |
| this.u = sa.indexedDB; | |
| this.type = "indexedDB"; | |
| this.g = this.l = this.f = this.i = null; | |
| this.o = !1; | |
| this.h = null; | |
| var a = this; | |
| Kb() && self | |
| ? ((this.l = Rg()), | |
| og(this.l, "keyChanged", function (b, p) { | |
| return Bh(a).then(function (b) { | |
| 0 < b.length && | |
| Ye(a.a, function (a) { | |
| a(b); | |
| }); | |
| return { keyProcessed: F(b, p.key) }; | |
| }); | |
| }), | |
| og(this.l, "ping", function () { | |
| return Da(["keyChanged"]); | |
| })) | |
| : gc().then(function (b) { | |
| if ((a.h = b)) | |
| (a.g = new Ke(new pg(b))), | |
| Ah(a.g, "ping", null, !0) | |
| .then(function (b) { | |
| b[0].fulfilled && F(b[0].value, "keyChanged") && (a.o = !0); | |
| }) | |
| .s(function () {}); | |
| }); | |
| } | |
| function yi(a) { | |
| return new ha(function (b, p) { | |
| var c = a.u.deleteDatabase("firebaseLocalStorageDb"); | |
| c.onsuccess = function () { | |
| b(); | |
| }; | |
| c.onerror = function (a) { | |
| p(Error(a.target.error)); | |
| }; | |
| }); | |
| } | |
| function ih(a) { | |
| return new ha(function (b, p) { | |
| var c = a.u.open("firebaseLocalStorageDb", 1); | |
| c.onerror = function (a) { | |
| try { | |
| a.preventDefault(); | |
| } catch ($i) {} | |
| p(Error(a.target.error)); | |
| }; | |
| c.onupgradeneeded = function (a) { | |
| a = a.target.result; | |
| try { | |
| a.createObjectStore("firebaseLocalStorage", { | |
| keyPath: "fbase_key", | |
| }); | |
| } catch ($i) { | |
| p($i); | |
| } | |
| }; | |
| c.onsuccess = function (c) { | |
| c = c.target.result; | |
| c.objectStoreNames.contains("firebaseLocalStorage") | |
| ? b(c) | |
| : yi(a) | |
| .then(function () { | |
| return ih(a); | |
| }) | |
| .then(function (a) { | |
| b(a); | |
| }) | |
| .s(function (a) { | |
| p(a); | |
| }); | |
| }; | |
| }); | |
| } | |
| function rg(a) { | |
| a.m || (a.m = ih(a)); | |
| return a.m; | |
| } | |
| function jh() { | |
| try { | |
| return !!sa.indexedDB; | |
| } catch (Nl) { | |
| return !1; | |
| } | |
| } | |
| function sg(a) { | |
| return a.objectStore("firebaseLocalStorage"); | |
| } | |
| function gb(a, b) { | |
| return a.transaction( | |
| ["firebaseLocalStorage"], | |
| b ? "readwrite" : "readonly" | |
| ); | |
| } | |
| function Xe(a) { | |
| return new ha(function (b, p) { | |
| a.onsuccess = function (a) { | |
| a && a.target ? b(a.target.result) : b(); | |
| }; | |
| a.onerror = function (a) { | |
| p(a.target.error); | |
| }; | |
| }); | |
| } | |
| function kh(a, b) { | |
| return a.g && a.h && Mb() === a.h | |
| ? Ah(a.g, "keyChanged", { key: b }, a.o) | |
| .then(function () {}) | |
| .s(function () {}) | |
| : Da(); | |
| } | |
| function Bh(a) { | |
| return rg(a) | |
| .then(function (a) { | |
| var b = sg(gb(a, !1)); | |
| return b.getAll | |
| ? Xe(b.getAll()) | |
| : new ha(function (a, p) { | |
| var c = [], | |
| e = b.openCursor(); | |
| e.onsuccess = function (b) { | |
| (b = b.target.result) | |
| ? (c.push(b.value), b["continue"]()) | |
| : a(c); | |
| }; | |
| e.onerror = function (a) { | |
| p(a.target.error); | |
| }; | |
| }); | |
| }) | |
| .then(function (b) { | |
| var p = {}, | |
| c = []; | |
| if (0 == a.b) { | |
| for (c = 0; c < b.length; c++) p[b[c].fbase_key] = b[c].value; | |
| c = Za(a.c, p); | |
| a.c = p; | |
| } | |
| return c; | |
| }); | |
| } | |
| function Xh(a) { | |
| function b() { | |
| a.f = setTimeout(function () { | |
| a.i = Bh(a) | |
| .then(function (b) { | |
| 0 < b.length && | |
| Ye(a.a, function (a) { | |
| a(b); | |
| }); | |
| }) | |
| .then(function () { | |
| b(); | |
| }) | |
| .s(function (a) { | |
| "STOP_EVENT" != a.message && b(); | |
| }); | |
| }, 800); | |
| } | |
| gi(a); | |
| b(); | |
| } | |
| function gi(a) { | |
| a.i && a.i.cancel("STOP_EVENT"); | |
| a.f && (clearTimeout(a.f), (a.f = null)); | |
| } | |
| function hi(a) { | |
| var b = this, | |
| p = null; | |
| this.a = []; | |
| this.type = "indexedDB"; | |
| this.c = a; | |
| this.b = Da() | |
| .then(function () { | |
| if (jh()) { | |
| var a = Xc(), | |
| c = "__sak" + a; | |
| jk || (jk = new hh()); | |
| p = jk; | |
| return p | |
| .set(c, a) | |
| .then(function () { | |
| return p.get(c); | |
| }) | |
| .then(function (b) { | |
| if (b !== a) throw Error("indexedDB not supported!"); | |
| return p.S(c); | |
| }) | |
| .then(function () { | |
| return p; | |
| }) | |
| .s(function () { | |
| return b.c; | |
| }); | |
| } | |
| return b.c; | |
| }) | |
| .then(function (a) { | |
| b.type = a.type; | |
| a.$(function (a) { | |
| Ye(b.a, function (b) { | |
| b(a); | |
| }); | |
| }); | |
| return a; | |
| }); | |
| } | |
| function Eg() { | |
| this.a = {}; | |
| this.type = "inMemory"; | |
| } | |
| function Sg() { | |
| if (!Fg()) { | |
| if ("Node" == Rb()) | |
| throw new da( | |
| "internal-error", | |
| "The LocalStorage compatibility library was not found." | |
| ); | |
| throw new da("web-storage-unsupported"); | |
| } | |
| this.a = Af() || uc.INTERNAL.node.localStorage; | |
| this.type = "localStorage"; | |
| } | |
| function Af() { | |
| try { | |
| var a = sa.localStorage, | |
| b = Xc(); | |
| a && (a.setItem(b, "1"), a.removeItem(b)); | |
| return a; | |
| } catch (lj) { | |
| return null; | |
| } | |
| } | |
| function Fg() { | |
| var a = "Node" == Rb(); | |
| a = Af() || (a && uc.INTERNAL.node && uc.INTERNAL.node.localStorage); | |
| if (!a) return !1; | |
| try { | |
| return a.setItem("__sak", "1"), a.removeItem("__sak"), !0; | |
| } catch (Rf) { | |
| return !1; | |
| } | |
| } | |
| function td() { | |
| this.type = "nullStorage"; | |
| } | |
| function Hg() { | |
| if (!ii()) { | |
| if ("Node" == Rb()) | |
| throw new da( | |
| "internal-error", | |
| "The SessionStorage compatibility library was not found." | |
| ); | |
| throw new da("web-storage-unsupported"); | |
| } | |
| this.a = $d() || uc.INTERNAL.node.sessionStorage; | |
| this.type = "sessionStorage"; | |
| } | |
| function $d() { | |
| try { | |
| var a = sa.sessionStorage, | |
| b = Xc(); | |
| a && (a.setItem(b, "1"), a.removeItem(b)); | |
| return a; | |
| } catch (lj) { | |
| return null; | |
| } | |
| } | |
| function ii() { | |
| var a = "Node" == Rb(); | |
| a = $d() || (a && uc.INTERNAL.node && uc.INTERNAL.node.sessionStorage); | |
| if (!a) return !1; | |
| try { | |
| return a.setItem("__sak", "1"), a.removeItem("__sak"), !0; | |
| } catch (Rf) { | |
| return !1; | |
| } | |
| } | |
| function Ig() { | |
| var a = {}; | |
| a.Browser = Sm; | |
| a.Node = Tm; | |
| a.ReactNative = Um; | |
| a.Worker = Vm; | |
| this.a = a[Rb()]; | |
| } | |
| function Gc(a) { | |
| var b = new da("invalid-persistence-type"), | |
| p = new da("unsupported-persistence-type"); | |
| a: { | |
| for (c in bj) | |
| if (bj[c] == a) { | |
| var c = !0; | |
| break a; | |
| } | |
| c = !1; | |
| } | |
| if (!c || "string" !== typeof a) throw b; | |
| switch (Rb()) { | |
| case "ReactNative": | |
| if ("session" === a) throw p; | |
| break; | |
| case "Node": | |
| if ("none" !== a) throw p; | |
| break; | |
| default: | |
| if (!Fc() && "none" !== a) throw p; | |
| } | |
| } | |
| function Df() { | |
| var a = !ae(zc()) && fc() ? !0 : !1, | |
| b = Dd(), | |
| p = Fc(); | |
| this.m = a; | |
| this.h = b; | |
| this.l = p; | |
| this.a = {}; | |
| kk || (kk = new Ig()); | |
| a = kk; | |
| try { | |
| this.g = | |
| (!Fb() && gd()) || !sa.indexedDB | |
| ? new a.a.C() | |
| : new hi(Kb() ? new Eg() : new a.a.C()); | |
| } catch (ki) { | |
| (this.g = new Eg()), (this.h = !0); | |
| } | |
| try { | |
| this.i = new a.a.Ta(); | |
| } catch (ki) { | |
| this.i = new Eg(); | |
| } | |
| this.u = new Eg(); | |
| this.f = y(this.Pb, this); | |
| this.b = {}; | |
| } | |
| function yd() { | |
| lk || (lk = new Df()); | |
| return lk; | |
| } | |
| function yg(a, b) { | |
| switch (b) { | |
| case "session": | |
| return a.i; | |
| case "none": | |
| return a.u; | |
| default: | |
| return a.g; | |
| } | |
| } | |
| function Le(a, b) { | |
| return "firebase:" + a.name + (b ? ":" + b : ""); | |
| } | |
| function lh(a, b, p) { | |
| var c = Le(b, p), | |
| e = yg(a, b.C); | |
| return a.get(b, p).then(function (g) { | |
| var d = null; | |
| try { | |
| d = vd(sa.localStorage.getItem(c)); | |
| } catch (aj) {} | |
| if (d && !g) return sa.localStorage.removeItem(c), a.set(b, d, p); | |
| d && g && "localStorage" != e.type && sa.localStorage.removeItem(c); | |
| }); | |
| } | |
| function gg(a, b, p) { | |
| p = Le(b, p); | |
| "local" == b.C && (a.b[p] = null); | |
| return yg(a, b.C).S(p); | |
| } | |
| function ge(a) { | |
| Ef(a); | |
| a.c = setInterval(function () { | |
| for (var b in a.a) { | |
| var p = sa.localStorage.getItem(b), | |
| c = a.b[b]; | |
| p != c && | |
| ((a.b[b] = p), | |
| (p = new Zb({ | |
| type: "storage", | |
| key: b, | |
| target: window, | |
| oldValue: c, | |
| newValue: p, | |
| a: !0, | |
| })), | |
| a.Pb(p)); | |
| } | |
| }, 1e3); | |
| } | |
| function Ef(a) { | |
| a.c && (clearInterval(a.c), (a.c = null)); | |
| } | |
| function fg(a) { | |
| this.a = a; | |
| this.b = yd(); | |
| } | |
| function Kh(a) { | |
| return a.b.get(mk, a.a).then(function (a) { | |
| return hc(a); | |
| }); | |
| } | |
| function Li() { | |
| this.a = yd(); | |
| } | |
| function lg(a, b) { | |
| this.b = sl; | |
| this.f = sa.Uint8Array ? new Uint8Array(this.b) : Array(this.b); | |
| this.g = this.c = 0; | |
| this.a = []; | |
| this.i = a; | |
| this.h = b; | |
| this.l = sa.Int32Array ? new Int32Array(64) : Array(64); | |
| void 0 !== Fj || (sa.Int32Array ? (Fj = new Int32Array(tl)) : (Fj = tl)); | |
| this.reset(); | |
| } | |
| function Qf(a) { | |
| for (var b = a.f, p = a.l, c = 0, e = 0; e < b.length; ) | |
| (p[c++] = (b[e] << 24) | (b[e + 1] << 16) | (b[e + 2] << 8) | b[e + 3]), | |
| (e = 4 * c); | |
| for (b = 16; 64 > b; b++) { | |
| e = p[b - 15] | 0; | |
| c = p[b - 2] | 0; | |
| var g = | |
| ((p[b - 16] | 0) + | |
| (((e >>> 7) | (e << 25)) ^ | |
| ((e >>> 18) | (e << 14)) ^ | |
| (e >>> 3))) | | |
| 0, | |
| d = | |
| ((p[b - 7] | 0) + | |
| (((c >>> 17) | (c << 15)) ^ | |
| ((c >>> 19) | (c << 13)) ^ | |
| (c >>> 10))) | | |
| 0; | |
| p[b] = (g + d) | 0; | |
| } | |
| c = a.a[0] | 0; | |
| e = a.a[1] | 0; | |
| var l = a.a[2] | 0, | |
| h = a.a[3] | 0, | |
| k = a.a[4] | 0, | |
| n = a.a[5] | 0, | |
| v = a.a[6] | 0; | |
| g = a.a[7] | 0; | |
| for (b = 0; 64 > b; b++) { | |
| var S = | |
| ((((c >>> 2) | (c << 30)) ^ | |
| ((c >>> 13) | (c << 19)) ^ | |
| ((c >>> 22) | (c << 10))) + | |
| ((c & e) ^ (c & l) ^ (e & l))) | | |
| 0; | |
| d = (k & n) ^ (~k & v); | |
| g = | |
| (g + | |
| (((k >>> 6) | (k << 26)) ^ | |
| ((k >>> 11) | (k << 21)) ^ | |
| ((k >>> 25) | (k << 7)))) | | |
| 0; | |
| d = (d + (Fj[b] | 0)) | 0; | |
| d = (g + ((d + (p[b] | 0)) | 0)) | 0; | |
| g = v; | |
| v = n; | |
| n = k; | |
| k = (h + d) | 0; | |
| h = l; | |
| l = e; | |
| e = c; | |
| c = (d + S) | 0; | |
| } | |
| a.a[0] = (a.a[0] + c) | 0; | |
| a.a[1] = (a.a[1] + e) | 0; | |
| a.a[2] = (a.a[2] + l) | 0; | |
| a.a[3] = (a.a[3] + h) | 0; | |
| a.a[4] = (a.a[4] + k) | 0; | |
| a.a[5] = (a.a[5] + n) | 0; | |
| a.a[6] = (a.a[6] + v) | 0; | |
| a.a[7] = (a.a[7] + g) | 0; | |
| } | |
| function he(a, b, p) { | |
| void 0 === p && (p = b.length); | |
| var e = 0, | |
| g = a.c; | |
| if (q(b)) | |
| for (; e < p; ) | |
| (a.f[g++] = b.charCodeAt(e++)), g == a.b && (Qf(a), (g = 0)); | |
| else if (c(b)) | |
| for (; e < p; ) { | |
| var d = b[e++]; | |
| if (!("number" == typeof d && 0 <= d && 255 >= d && d == (d | 0))) | |
| throw Error("message must be a byte array"); | |
| a.f[g++] = d; | |
| g == a.b && (Qf(a), (g = 0)); | |
| } | |
| else throw Error("message must be string or array"); | |
| a.c = g; | |
| a.g += p; | |
| } | |
| function Rd() { | |
| lg.call(this, 8, Wm); | |
| } | |
| function tc(a, b, p, c, e) { | |
| this.u = a; | |
| this.i = b; | |
| this.l = p; | |
| this.m = c || null; | |
| this.o = e || null; | |
| this.h = b + ":" + p; | |
| this.v = new Li(); | |
| this.g = new fg(this.h); | |
| this.f = null; | |
| this.b = []; | |
| this.a = this.c = null; | |
| } | |
| function Wf(a) { | |
| return new da("invalid-cordova-configuration", a); | |
| } | |
| function ch() { | |
| for (var a = 20, b = []; 0 < a; ) | |
| b.push( | |
| "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt( | |
| Math.floor(62 * Math.random()) | |
| ) | |
| ), | |
| a--; | |
| return b.join(""); | |
| } | |
| function Mf(a) { | |
| var b = new Rd(); | |
| he(b, a); | |
| a = []; | |
| var p = 8 * b.g; | |
| 56 > b.c ? he(b, ul, 56 - b.c) : he(b, ul, b.b - (b.c - 56)); | |
| for (var c = 63; 56 <= c; c--) (b.f[c] = p & 255), (p /= 256); | |
| Qf(b); | |
| for (c = p = 0; c < b.i; c++) | |
| for (var e = 24; 0 <= e; e -= 8) a[p++] = (b.a[c] >> e) & 255; | |
| return oe(a); | |
| } | |
| function $f(a, b, p, c, e) { | |
| var g = ch(), | |
| d = new wf(b, c, null, g, new da("no-auth-event"), null, e), | |
| l = Sb("BuildInfo.packageName", sa); | |
| if ("string" !== typeof l) throw new da("invalid-cordova-configuration"); | |
| var h = Sb("BuildInfo.displayName", sa), | |
| k = {}; | |
| if ( | |
| zc() | |
| .toLowerCase() | |
| .match(/iphone|ipad|ipod/) | |
| ) | |
| k.ibi = l; | |
| else if ( | |
| zc() | |
| .toLowerCase() | |
| .match(/android/) | |
| ) | |
| k.apn = l; | |
| else return na(new da("operation-not-supported-in-this-environment")); | |
| h && (k.appDisplayName = h); | |
| g = Mf(g); | |
| k.sessionId = g; | |
| var n = $c(a.u, a.i, a.l, b, p, null, c, a.m, k, a.o, e); | |
| return a | |
| .ia() | |
| .then(function () { | |
| var b = a.h; | |
| return a.v.a.set(mk, d.A(), b); | |
| }) | |
| .then(function () { | |
| var b = Sb("cordova.plugins.browsertab.isAvailable", sa); | |
| if ("function" !== typeof b) | |
| throw new da("invalid-cordova-configuration"); | |
| var p = null; | |
| b(function (b) { | |
| if (b) { | |
| p = Sb("cordova.plugins.browsertab.openUrl", sa); | |
| if ("function" !== typeof p) | |
| throw new da("invalid-cordova-configuration"); | |
| p(n); | |
| } else { | |
| p = Sb("cordova.InAppBrowser.open", sa); | |
| if ("function" !== typeof p) | |
| throw new da("invalid-cordova-configuration"); | |
| b = zc(); | |
| a.a = p( | |
| n, | |
| b.match(/(iPad|iPhone|iPod).*OS 7_\d/i) || | |
| b.match(/(iPad|iPhone|iPod).*OS 8_\d/i) | |
| ? "_blank" | |
| : "_system", | |
| "location\x3dyes" | |
| ); | |
| } | |
| }); | |
| }); | |
| } | |
| function sc(a, b) { | |
| for (var p = 0; p < a.b.length; p++) | |
| try { | |
| a.b[p](b); | |
| } catch (ki) {} | |
| } | |
| function se(a) { | |
| a.f || | |
| (a.f = a.ia().then(function () { | |
| return new ha(function (b) { | |
| function p(c) { | |
| b(c); | |
| a.Na(p); | |
| return !1; | |
| } | |
| a.Aa(p); | |
| rh(a); | |
| }); | |
| })); | |
| return a.f; | |
| } | |
| function Th(a) { | |
| var b = null; | |
| return Kh(a.g) | |
| .then(function (p) { | |
| b = p; | |
| p = a.g; | |
| return gg(p.b, mk, p.a); | |
| }) | |
| .then(function () { | |
| return b; | |
| }); | |
| } | |
| function rh(a) { | |
| function b(b) { | |
| c = !0; | |
| e && e.cancel(); | |
| Th(a).then(function (c) { | |
| var e = p; | |
| if (c && b && b.url) { | |
| var g = null; | |
| e = ef(b.url); | |
| -1 != e.indexOf("/__/auth/callback") && | |
| ((g = Ib(e)), | |
| (g = vd(ac(g, "firebaseError") || null)), | |
| (g = (g = "object" === typeof g ? Pe(g) : null) | |
| ? new wf(c.c, c.b, null, null, g, null, c.R()) | |
| : new wf(c.c, c.b, e, c.f, null, null, c.R()))); | |
| e = g || p; | |
| } | |
| sc(a, e); | |
| }); | |
| } | |
| var p = new wf("unknown", null, null, null, new da("no-auth-event")), | |
| c = !1, | |
| e = Ad(500).then(function () { | |
| return Th(a).then(function () { | |
| c || sc(a, p); | |
| }); | |
| }), | |
| g = sa.handleOpenURL; | |
| sa.handleOpenURL = function (a) { | |
| 0 == | |
| a | |
| .toLowerCase() | |
| .indexOf(Sb("BuildInfo.packageName", sa).toLowerCase() + "://") && | |
| b({ url: a }); | |
| if ("function" === typeof g) | |
| try { | |
| g(a); | |
| } catch (aj) { | |
| console.error(aj); | |
| } | |
| }; | |
| ek || (ek = new Vc()); | |
| xf(b); | |
| } | |
| function Me(a) { | |
| this.a = a; | |
| this.b = yd(); | |
| } | |
| function Ne(a) { | |
| return a.b.set(nk, "pending", a.a); | |
| } | |
| function Kd(a) { | |
| return gg(a.b, nk, a.a); | |
| } | |
| function Bd(a) { | |
| return a.b.get(nk, a.a).then(function (a) { | |
| return "pending" == a; | |
| }); | |
| } | |
| function Ld(a, b, p) { | |
| this.i = {}; | |
| this.v = 0; | |
| this.B = a; | |
| this.u = b; | |
| this.m = p; | |
| this.h = []; | |
| this.f = !1; | |
| this.l = y(this.o, this); | |
| this.b = new dd(); | |
| this.w = new rd(); | |
| this.g = new Me(this.u + ":" + this.m); | |
| this.c = {}; | |
| this.c.unknown = this.b; | |
| this.c.signInViaRedirect = this.b; | |
| this.c.linkViaRedirect = this.b; | |
| this.c.reauthViaRedirect = this.b; | |
| this.c.signInViaPopup = this.w; | |
| this.c.linkViaPopup = this.w; | |
| this.c.reauthViaPopup = this.w; | |
| this.a = Yg(this.B, this.u, this.m, Gj); | |
| } | |
| function Yg(a, b, p, c) { | |
| var e = uc.SDK_VERSION || null; | |
| return yc() ? new tc(a, b, p, e, c) : new Xg(a, b, p, e, c); | |
| } | |
| function ri(a) { | |
| a.f || ((a.f = !0), a.a.Aa(a.l)); | |
| var b = a.a; | |
| return a.a.ia().s(function (p) { | |
| a.a == b && a.reset(); | |
| throw p; | |
| }); | |
| } | |
| function $h(a) { | |
| a.a.Ob() && | |
| ri(a).s(function (b) { | |
| var p = new wf( | |
| "unknown", | |
| null, | |
| null, | |
| null, | |
| new da("operation-not-supported-in-this-environment") | |
| ); | |
| Hf(b) && a.o(p); | |
| }); | |
| a.a.Jb() || bc(a.b); | |
| } | |
| function Zg(a, b) { | |
| F(a.h, b) || a.h.push(b); | |
| a.f || | |
| Bd(a.g) | |
| .then(function (b) { | |
| b | |
| ? Kd(a.g).then(function () { | |
| ri(a).s(function (b) { | |
| var p = new wf( | |
| "unknown", | |
| null, | |
| null, | |
| null, | |
| new da("operation-not-supported-in-this-environment") | |
| ); | |
| Hf(b) && a.o(p); | |
| }); | |
| }) | |
| : $h(a); | |
| }) | |
| .s(function () { | |
| $h(a); | |
| }); | |
| } | |
| function Be(a, b) { | |
| J(a.h, function (a) { | |
| return a == b; | |
| }); | |
| } | |
| function Oe(a, b, p, c, e, g, d) { | |
| return a.a.Db( | |
| b, | |
| p, | |
| c, | |
| function () { | |
| a.f || ((a.f = !0), a.a.Aa(a.l)); | |
| }, | |
| function () { | |
| a.reset(); | |
| }, | |
| e, | |
| g, | |
| d | |
| ); | |
| } | |
| function Hf(a) { | |
| return a && "auth/cordova-not-ready" == a.code ? !0 : !1; | |
| } | |
| function Xf(a, b, p, c, e) { | |
| var g; | |
| return Ne(a.g).then(function () { | |
| return a.a | |
| .Eb(b, p, c, e) | |
| .s(function (b) { | |
| if (Hf(b)) | |
| throw new da("operation-not-supported-in-this-environment"); | |
| g = b; | |
| return Kd(a.g).then(function () { | |
| throw g; | |
| }); | |
| }) | |
| .then(function () { | |
| return a.a.Rb() | |
| ? new ha(function () {}) | |
| : Kd(a.g) | |
| .then(function () { | |
| return a.oa(); | |
| }) | |
| .then(function () {}) | |
| .s(function () {}); | |
| }); | |
| }); | |
| } | |
| function db(a, b, p, c, e) { | |
| return a.a.Fb( | |
| c, | |
| function (a) { | |
| b.ja(p, null, a, e); | |
| }, | |
| Xm.get() | |
| ); | |
| } | |
| function Ff(a, b, p) { | |
| var c = b + ":" + p; | |
| ok[c] || (ok[c] = new Ld(a, b, p)); | |
| return ok[c]; | |
| } | |
| function dd() { | |
| this.b = null; | |
| this.f = []; | |
| this.c = []; | |
| this.a = null; | |
| this.i = this.g = !1; | |
| } | |
| function bc(a) { | |
| a.g || ((a.g = !0), S(a, !1, null, null)); | |
| } | |
| function qd(a) { | |
| a.g && !a.i && S(a, !1, null, null); | |
| } | |
| function di(a, b, p) { | |
| p = p.Ba(b.c, b.b); | |
| var c = b.g, | |
| e = b.f, | |
| g = b.i, | |
| d = b.R(), | |
| l = !!b.c.match(/Redirect$/); | |
| p(c, e, d, g) | |
| .then(function (b) { | |
| S(a, l, b, null); | |
| }) | |
| .s(function (b) { | |
| S(a, l, null, b); | |
| }); | |
| } | |
| function Ph(a, b) { | |
| a.b = function () { | |
| return na(b); | |
| }; | |
| if (a.c.length) for (var p = 0; p < a.c.length; p++) a.c[p](b); | |
| } | |
| function p(a, b) { | |
| a.b = function () { | |
| return Da(b); | |
| }; | |
| if (a.f.length) for (var p = 0; p < a.f.length; p++) a.f[p](b); | |
| } | |
| function S(a, b, c, e) { | |
| b ? (e ? Ph(a, e) : p(a, c)) : p(a, { user: null }); | |
| a.f = []; | |
| a.c = []; | |
| } | |
| function Se(a) { | |
| var b = new da("timeout"); | |
| a.a && a.a.cancel(); | |
| a.a = Ad(Ym.get()).then(function () { | |
| a.b || ((a.g = !0), S(a, !0, null, b)); | |
| }); | |
| } | |
| function rd() {} | |
| function Di(a, b) { | |
| var p = a.b, | |
| c = a.c; | |
| b.Ba(c, p)(a.g, a.f, a.R(), a.i) | |
| .then(function (a) { | |
| b.ja(c, a, null, p); | |
| }) | |
| .s(function (a) { | |
| b.ja(c, null, a, p); | |
| }); | |
| } | |
| function si() { | |
| this.vb = !1; | |
| Object.defineProperty(this, "appVerificationDisabled", { | |
| get: function () { | |
| return this.vb; | |
| }, | |
| set: function (a) { | |
| this.vb = a; | |
| }, | |
| enumerable: !1, | |
| }); | |
| } | |
| function $g(a, b) { | |
| this.a = b; | |
| Oa(this, "verificationId", a); | |
| } | |
| function Ce(a, b, p, c) { | |
| return new Td(a).Wa(b, p).then(function (a) { | |
| return new $g(a, c); | |
| }); | |
| } | |
| function ig(a) { | |
| var b = cd(a); | |
| if (!(b && b.exp && b.auth_time && b.iat)) | |
| throw new da( | |
| "internal-error", | |
| "An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation." | |
| ); | |
| wd(this, { | |
| token: a, | |
| expirationTime: Kc(1e3 * b.exp), | |
| authTime: Kc(1e3 * b.auth_time), | |
| issuedAtTime: Kc(1e3 * b.iat), | |
| signInProvider: | |
| b.firebase && b.firebase.sign_in_provider | |
| ? b.firebase.sign_in_provider | |
| : null, | |
| claims: b, | |
| }); | |
| } | |
| function sh(a, b, p) { | |
| this.h = a; | |
| this.i = b; | |
| this.g = p; | |
| this.c = 3e4; | |
| this.f = 96e4; | |
| this.b = null; | |
| this.a = this.c; | |
| if (this.f < this.c) | |
| throw Error("Proactive refresh lower bound greater than upper bound!"); | |
| } | |
| function Yf(a, b) { | |
| if (b) return (a.a = a.c), a.g(); | |
| b = a.a; | |
| a.a *= 2; | |
| a.a > a.f && (a.a = a.f); | |
| return b; | |
| } | |
| function Mh(a, b) { | |
| a.stop(); | |
| a.b = Ad(Yf(a, b)) | |
| .then(function () { | |
| return Oc(); | |
| }) | |
| .then(function () { | |
| return a.h(); | |
| }) | |
| .then(function () { | |
| Mh(a, !0); | |
| }) | |
| .s(function (b) { | |
| a.i(b) && Mh(a, !1); | |
| }); | |
| } | |
| function bi(a) { | |
| this.f = a; | |
| this.b = this.a = null; | |
| this.c = 0; | |
| } | |
| function Kg(a, b) { | |
| var p = b[mh], | |
| c = b.refreshToken; | |
| b = ui(b.expiresIn); | |
| a.b = p; | |
| a.c = b; | |
| a.a = c; | |
| } | |
| function Ei(a, b) { | |
| a.b = b.b; | |
| a.a = b.a; | |
| a.c = b.c; | |
| } | |
| function ui(a) { | |
| return Yh() + 1e3 * parseInt(a, 10); | |
| } | |
| function th(a, b) { | |
| return mg(a.f, b) | |
| .then(function (b) { | |
| a.b = b.access_token; | |
| a.c = ui(b.expires_in); | |
| a.a = b.refresh_token; | |
| return { accessToken: a.b, expirationTime: a.c, refreshToken: a.a }; | |
| }) | |
| .s(function (b) { | |
| "auth/user-token-expired" == b.code && (a.a = null); | |
| throw b; | |
| }); | |
| } | |
| function Lh(a, b) { | |
| this.a = a || null; | |
| this.b = b || null; | |
| wd(this, { lastSignInTime: Kc(b || null), creationTime: Kc(a || null) }); | |
| } | |
| function ej(a) { | |
| return new Lh(a.a, a.b); | |
| } | |
| function Qj(a, b, p, c, e, g) { | |
| wd(this, { | |
| uid: a, | |
| displayName: c || null, | |
| photoURL: e || null, | |
| email: p || null, | |
| phoneNumber: g || null, | |
| providerId: b, | |
| }); | |
| } | |
| function ti(a, b) { | |
| vb.call(this, a); | |
| for (var p in b) this[p] = b[p]; | |
| } | |
| function Ud(a, b, p) { | |
| this.I = []; | |
| this.l = a.apiKey; | |
| this.m = a.appName; | |
| this.o = a.authDomain || null; | |
| a = uc.SDK_VERSION ? nd(uc.SDK_VERSION) : null; | |
| this.a = new Wc(this.l, R(Gj), a); | |
| this.b = new bi(this.a); | |
| ci(this, b[mh]); | |
| Kg(this.b, b); | |
| Oa(this, "refreshToken", this.b.a); | |
| Qi(this, p || {}); | |
| $a.call(this); | |
| this.J = !1; | |
| this.o && Qc() && (this.i = Ff(this.o, this.l, this.m)); | |
| this.O = []; | |
| this.h = null; | |
| this.w = gj(this); | |
| this.W = y(this.Ja, this); | |
| var c = this; | |
| this.ga = null; | |
| this.xa = function (a) { | |
| c.ua(a.g); | |
| }; | |
| this.Z = null; | |
| this.P = []; | |
| this.wa = function (a) { | |
| jg(c, a.c); | |
| }; | |
| this.Y = null; | |
| } | |
| function bh(a, b) { | |
| a.Z && yb(a.Z, "languageCodeChanged", a.xa); | |
| (a.Z = b) && kc(b, "languageCodeChanged", a.xa); | |
| } | |
| function jg(a, b) { | |
| a.P = b; | |
| Fh(a.a, uc.SDK_VERSION ? nd(uc.SDK_VERSION, a.P) : null); | |
| } | |
| function fj(a, b) { | |
| a.Y && yb(a.Y, "frameworkChanged", a.wa); | |
| (a.Y = b) && kc(b, "frameworkChanged", a.wa); | |
| } | |
| function ah(a) { | |
| try { | |
| return uc.app(a.m).auth(); | |
| } catch (Rf) { | |
| throw new da( | |
| "internal-error", | |
| "No firebase.auth.Auth instance is available for the Firebase App '" + | |
| a.m + | |
| "'!" | |
| ); | |
| } | |
| } | |
| function gj(a) { | |
| return new sh( | |
| function () { | |
| return a.G(!0); | |
| }, | |
| function (a) { | |
| return a && "auth/network-request-failed" == a.code ? !0 : !1; | |
| }, | |
| function () { | |
| var b = a.b.c - Yh() - 3e5; | |
| return 0 < b ? b : 0; | |
| } | |
| ); | |
| } | |
| function vi(a) { | |
| a.B || | |
| a.w.b || | |
| (a.w.start(), yb(a, "tokenChanged", a.W), kc(a, "tokenChanged", a.W)); | |
| } | |
| function vh(a) { | |
| yb(a, "tokenChanged", a.W); | |
| a.w.stop(); | |
| } | |
| function ci(a, b) { | |
| a.ma = b; | |
| Oa(a, "_lat", b); | |
| } | |
| function tj(a, b) { | |
| J(a.O, function (a) { | |
| return a == b; | |
| }); | |
| } | |
| function Oh(a) { | |
| for (var b = [], p = 0; p < a.O.length; p++) b.push(a.O[p](a)); | |
| return wa(b).then(function () { | |
| return a; | |
| }); | |
| } | |
| function Nh(a) { | |
| a.i && !a.J && ((a.J = !0), Zg(a.i, a)); | |
| } | |
| function Qi(a, b) { | |
| wd(a, { | |
| uid: b.uid, | |
| displayName: b.displayName || null, | |
| photoURL: b.photoURL || null, | |
| email: b.email || null, | |
| emailVerified: b.emailVerified || !1, | |
| phoneNumber: b.phoneNumber || null, | |
| isAnonymous: b.isAnonymous || !1, | |
| tenantId: b.tenantId || null, | |
| metadata: new Lh(b.createdAt, b.lastLoginAt), | |
| providerData: [], | |
| }); | |
| a.a.b = a.tenantId; | |
| } | |
| function uh() {} | |
| function Ui(a) { | |
| return Da().then(function () { | |
| if (a.B) throw new da("app-deleted"); | |
| }); | |
| } | |
| function Gi(a) { | |
| return ak(a.providerData, function (a) { | |
| return a.providerId; | |
| }); | |
| } | |
| function Ti(a, b) { | |
| b && (ij(a, b.providerId), a.providerData.push(b)); | |
| } | |
| function ij(a, b) { | |
| J(a.providerData, function (a) { | |
| return a.providerId == b; | |
| }); | |
| } | |
| function Qh(a, b, p) { | |
| ("uid" != b || p) && a.hasOwnProperty(b) && Oa(a, b, p); | |
| } | |
| function Vi(a, b) { | |
| a != b && | |
| (wd(a, { | |
| uid: b.uid, | |
| displayName: b.displayName, | |
| photoURL: b.photoURL, | |
| email: b.email, | |
| emailVerified: b.emailVerified, | |
| phoneNumber: b.phoneNumber, | |
| isAnonymous: b.isAnonymous, | |
| tenantId: b.tenantId, | |
| providerData: [], | |
| }), | |
| b.metadata | |
| ? Oa(a, "metadata", ej(b.metadata)) | |
| : Oa(a, "metadata", new Lh()), | |
| Ye(b.providerData, function (b) { | |
| Ti(a, b); | |
| }), | |
| Ei(a.b, b.b), | |
| Oa(a, "refreshToken", a.b.a)); | |
| } | |
| function Hi(a) { | |
| return a.G().then(function (b) { | |
| var p = a.isAnonymous; | |
| return kj(a, b).then(function () { | |
| p || Qh(a, "isAnonymous", !1); | |
| return b; | |
| }); | |
| }); | |
| } | |
| function Vh(a, b) { | |
| b[mh] && | |
| a.ma != b[mh] && | |
| (Kg(a.b, b), | |
| a.dispatchEvent(new ti("tokenChanged")), | |
| ci(a, b[mh]), | |
| Qh(a, "refreshToken", a.b.a)); | |
| } | |
| function kj(a, b) { | |
| return Ra(a.a, Zm, { idToken: b }).then(y(a.zc, a)); | |
| } | |
| function Uh(a) { | |
| return (a = a.providerUserInfo) && a.length | |
| ? ak(a, function (a) { | |
| return new Qj( | |
| a.rawId, | |
| a.providerId, | |
| a.email, | |
| a.displayName, | |
| a.photoUrl, | |
| a.phoneNumber | |
| ); | |
| }) | |
| : []; | |
| } | |
| function Md(a, b) { | |
| return Hi(a).then(function () { | |
| if (F(Gi(a), b)) | |
| return Oh(a).then(function () { | |
| throw new da("provider-already-linked"); | |
| }); | |
| }); | |
| } | |
| function kg(a, b, p) { | |
| var c = gf(b); | |
| b = qe(b); | |
| return od({ | |
| user: a, | |
| credential: c, | |
| additionalUserInfo: b, | |
| operationType: p, | |
| }); | |
| } | |
| function Kf(a, b) { | |
| Vh(a, b); | |
| return a.reload().then(function () { | |
| return a; | |
| }); | |
| } | |
| function Sh(a, b, p, c, e) { | |
| if (!Qc()) | |
| return na(new da("operation-not-supported-in-this-environment")); | |
| if (a.h && !e) return na(a.h); | |
| var g = Ee(p.providerId), | |
| d = Xc(a.uid + ":::"), | |
| l = null; | |
| (!Dd() || fc()) && | |
| a.o && | |
| p.isOAuthProvider && | |
| (l = $c( | |
| a.o, | |
| a.l, | |
| a.m, | |
| b, | |
| p, | |
| null, | |
| d, | |
| uc.SDK_VERSION || null, | |
| null, | |
| null, | |
| a.tenantId | |
| )); | |
| var h = vc(l, g && g.sa, g && g.ra); | |
| c = c() | |
| .then(function () { | |
| Ab(a); | |
| if (!e) return a.G().then(function () {}); | |
| }) | |
| .then(function () { | |
| return Oe(a.i, h, b, p, d, !!l, a.tenantId); | |
| }) | |
| .then(function () { | |
| return new ha(function (p, c) { | |
| a.ja(b, null, new da("cancelled-popup-request"), a.g || null); | |
| a.f = p; | |
| a.v = c; | |
| a.g = d; | |
| a.c = db(a.i, a, b, h, d); | |
| }); | |
| }) | |
| .then(function (a) { | |
| h && bd(h); | |
| return a ? od(a) : null; | |
| }) | |
| .s(function (a) { | |
| h && bd(h); | |
| throw a; | |
| }); | |
| return re(a, c, e); | |
| } | |
| function Ri(a, b, p, c, e) { | |
| if (!Qc()) | |
| return na(new da("operation-not-supported-in-this-environment")); | |
| if (a.h && !e) return na(a.h); | |
| var g = null, | |
| d = Xc(a.uid + ":::"); | |
| c = c() | |
| .then(function () { | |
| Ab(a); | |
| if (!e) return a.G().then(function () {}); | |
| }) | |
| .then(function () { | |
| a.ca = d; | |
| return Oh(a); | |
| }) | |
| .then(function (b) { | |
| a.da && ((b = a.da), (b = b.b.set(pk, a.A(), b.a))); | |
| return b; | |
| }) | |
| .then(function () { | |
| return Xf(a.i, b, p, d, a.tenantId); | |
| }) | |
| .s(function (b) { | |
| g = b; | |
| if (a.da) return Of(a.da); | |
| throw g; | |
| }) | |
| .then(function () { | |
| if (g) throw g; | |
| }); | |
| return re(a, c, e); | |
| } | |
| function Ab(a) { | |
| if (!a.i || !a.J) { | |
| if (a.i && !a.J) throw new da("internal-error"); | |
| throw new da("auth-domain-config-required"); | |
| } | |
| } | |
| function re(a, b, p) { | |
| var c = hj(a, b, p); | |
| a.I.push(c); | |
| c.ka(function () { | |
| P(a.I, c); | |
| }); | |
| return c; | |
| } | |
| function hj(a, b, p) { | |
| return a.h && !p | |
| ? (b.cancel(), na(a.h)) | |
| : b.s(function (b) { | |
| !b || | |
| ("auth/user-disabled" != b.code && | |
| "auth/user-token-expired" != b.code) || | |
| (a.h || a.dispatchEvent(new ti("userInvalidated")), (a.h = b)); | |
| throw b; | |
| }); | |
| } | |
| function Fi(a) { | |
| if (!a.apiKey) return null; | |
| var b = { | |
| apiKey: a.apiKey, | |
| authDomain: a.authDomain, | |
| appName: a.appName, | |
| }, | |
| p = {}; | |
| if ( | |
| a.stsTokenManager && | |
| a.stsTokenManager.accessToken && | |
| a.stsTokenManager.expirationTime | |
| ) | |
| (p[mh] = a.stsTokenManager.accessToken), | |
| (p.refreshToken = a.stsTokenManager.refreshToken || null), | |
| (p.expiresIn = (a.stsTokenManager.expirationTime - Yh()) / 1e3); | |
| else return null; | |
| var c = new Ud(b, p, a); | |
| a.providerData && | |
| Ye(a.providerData, function (a) { | |
| a && Ti(c, od(a)); | |
| }); | |
| a.redirectEventId && (c.ca = a.redirectEventId); | |
| return c; | |
| } | |
| function Si(a, b, p, c) { | |
| var e = new Ud(a, b); | |
| p && (e.da = p); | |
| c && jg(e, c); | |
| return e.reload().then(function () { | |
| return e; | |
| }); | |
| } | |
| function Rh(a, b, p, c) { | |
| b = b || { apiKey: a.l, authDomain: a.o, appName: a.m }; | |
| var e = a.b, | |
| g = {}; | |
| g[mh] = e.b; | |
| g.refreshToken = e.a; | |
| g.expiresIn = (e.c - Yh()) / 1e3; | |
| b = new Ud(b, g); | |
| p && (b.da = p); | |
| c && jg(b, c); | |
| Vi(b, a); | |
| return b; | |
| } | |
| function dh(a) { | |
| this.a = a; | |
| this.b = yd(); | |
| } | |
| function Of(a) { | |
| return gg(a.b, pk, a.a); | |
| } | |
| function Xi(a, b) { | |
| return a.b.get(pk, a.a).then(function (a) { | |
| a && b && (a.authDomain = b); | |
| return Fi(a || {}); | |
| }); | |
| } | |
| function wi(a) { | |
| this.a = a; | |
| this.b = yd(); | |
| this.c = null; | |
| this.f = eh(this); | |
| this.b.addListener(Od("local"), this.a, y(this.g, this)); | |
| } | |
| function Re(a, b) { | |
| var p = [], | |
| c; | |
| for (c in bj) bj[c] !== b && p.push(gg(a.b, Od(bj[c]), a.a)); | |
| p.push(gg(a.b, qk, a.a)); | |
| return ua(p); | |
| } | |
| function eh(a) { | |
| var b = Od("local"), | |
| p = Od("session"), | |
| c = Od("none"); | |
| return lh(a.b, b, a.a) | |
| .then(function () { | |
| return a.b.get(p, a.a); | |
| }) | |
| .then(function (e) { | |
| return e | |
| ? p | |
| : a.b.get(c, a.a).then(function (p) { | |
| return p | |
| ? c | |
| : a.b.get(b, a.a).then(function (p) { | |
| return p | |
| ? b | |
| : a.b.get(qk, a.a).then(function (a) { | |
| return a ? Od(a) : b; | |
| }); | |
| }); | |
| }); | |
| }) | |
| .then(function (b) { | |
| a.c = b; | |
| return Re(a, b.C); | |
| }) | |
| .s(function () { | |
| a.c || (a.c = b); | |
| }); | |
| } | |
| function Od(a) { | |
| return { name: "authUser", C: a }; | |
| } | |
| function wh(a) { | |
| return xh(a, function () { | |
| return a.b.set(qk, a.c.C, a.a); | |
| }); | |
| } | |
| function ei(a, b) { | |
| return xh(a, function () { | |
| return a.b.set(a.c, b.A(), a.a); | |
| }); | |
| } | |
| function Ki(a) { | |
| return xh(a, function () { | |
| return gg(a.b, a.c, a.a); | |
| }); | |
| } | |
| function ff(a, b) { | |
| return xh(a, function () { | |
| return a.b.get(a.c, a.a).then(function (a) { | |
| a && b && (a.authDomain = b); | |
| return Fi(a || {}); | |
| }); | |
| }); | |
| } | |
| function xh(a, b) { | |
| a.f = a.f.then(b, b); | |
| return a.f; | |
| } | |
| function yf(a) { | |
| this.l = !1; | |
| Oa(this, "settings", new si()); | |
| Oa(this, "app", a); | |
| if (this.app.options && this.app.options.apiKey) | |
| (a = uc.SDK_VERSION ? nd(uc.SDK_VERSION) : null), | |
| (this.b = new Wc( | |
| this.app.options && this.app.options.apiKey, | |
| R(Gj), | |
| a | |
| )); | |
| else throw new da("invalid-api-key"); | |
| this.O = []; | |
| this.m = []; | |
| this.J = []; | |
| this.Ub = uc.INTERNAL.createSubscribe(y(this.oc, this)); | |
| this.W = void 0; | |
| this.Vb = uc.INTERNAL.createSubscribe(y(this.pc, this)); | |
| ji(this, null); | |
| this.h = new wi(this.app.options.apiKey + ":" + this.app.name); | |
| this.w = new dh(this.app.options.apiKey + ":" + this.app.name); | |
| this.Y = Ed(this, vj(this)); | |
| this.i = Ed(this, Kl(this)); | |
| this.ga = !1; | |
| this.ma = y(this.Nc, this); | |
| this.ub = y(this.aa, this); | |
| this.wa = y(this.bc, this); | |
| this.xa = y(this.mc, this); | |
| this.Ja = y(this.nc, this); | |
| this.a = null; | |
| Ii(this); | |
| this.INTERNAL = {}; | |
| this.INTERNAL["delete"] = y(this.delete, this); | |
| this.INTERNAL.logFramework = y(this.vc, this); | |
| this.o = 0; | |
| $a.call(this); | |
| xi(this); | |
| this.I = []; | |
| } | |
| function Wi(a) { | |
| vb.call(this, "languageCodeChanged"); | |
| this.g = a; | |
| } | |
| function Mg(a) { | |
| vb.call(this, "frameworkChanged"); | |
| this.c = a; | |
| } | |
| function xi(a) { | |
| Object.defineProperty(a, "lc", { | |
| get: function () { | |
| return this.ha(); | |
| }, | |
| set: function (a) { | |
| this.ua(a); | |
| }, | |
| enumerable: !1, | |
| }); | |
| a.Z = null; | |
| Object.defineProperty(a, "ti", { | |
| get: function () { | |
| return this.R(); | |
| }, | |
| set: function (a) { | |
| this.nb(a); | |
| }, | |
| enumerable: !1, | |
| }); | |
| a.P = null; | |
| } | |
| function jj(a) { | |
| return a.Tb || na(new da("auth-domain-config-required")); | |
| } | |
| function Ii(a) { | |
| var b = a.app.options.authDomain, | |
| p = a.app.options.apiKey; | |
| b && | |
| Qc() && | |
| (a.Tb = a.Y.then(function () { | |
| if (!a.l) { | |
| a.a = Ff(b, p, a.app.name); | |
| Zg(a.a, a); | |
| a.currentUser && Nh(a.currentUser); | |
| if (a.B) { | |
| Nh(a.B); | |
| var c = a.B; | |
| c.ua(a.ha()); | |
| bh(c, a); | |
| c = a.B; | |
| jg(c, a.I); | |
| fj(c, a); | |
| a.B = null; | |
| } | |
| return a.a; | |
| } | |
| })); | |
| } | |
| function Yi(a) { | |
| if (!Qc()) | |
| return na(new da("operation-not-supported-in-this-environment")); | |
| var b = jj(a) | |
| .then(function () { | |
| return a.a.oa(); | |
| }) | |
| .then(function (a) { | |
| return a ? od(a) : null; | |
| }); | |
| return Ed(a, b); | |
| } | |
| function Ji(a, b) { | |
| var p = {}; | |
| p.apiKey = a.app.options.apiKey; | |
| p.authDomain = a.app.options.authDomain; | |
| p.appName = a.app.name; | |
| return a.Y.then(function () { | |
| return Si(p, b, a.w, a.Ca()); | |
| }) | |
| .then(function (b) { | |
| if (a.currentUser && b.uid == a.currentUser.uid) | |
| return Vi(a.currentUser, b), a.aa(b); | |
| ji(a, b); | |
| Nh(b); | |
| return a.aa(b); | |
| }) | |
| .then(function () { | |
| pi(a); | |
| }); | |
| } | |
| function ji(a, b) { | |
| a.currentUser && | |
| (tj(a.currentUser, a.ub), | |
| yb(a.currentUser, "tokenChanged", a.wa), | |
| yb(a.currentUser, "userDeleted", a.xa), | |
| yb(a.currentUser, "userInvalidated", a.Ja), | |
| vh(a.currentUser)); | |
| b && | |
| (b.O.push(a.ub), | |
| kc(b, "tokenChanged", a.wa), | |
| kc(b, "userDeleted", a.xa), | |
| kc(b, "userInvalidated", a.Ja), | |
| 0 < a.o && vi(b)); | |
| Oa(a, "currentUser", b); | |
| b && (b.ua(a.ha()), bh(b, a), jg(b, a.I), fj(b, a)); | |
| } | |
| function uj(a) { | |
| var b = Xi(a.w, a.app.options.authDomain).then(function (b) { | |
| if ((a.B = b)) b.da = a.w; | |
| return Of(a.w); | |
| }); | |
| return Ed(a, b); | |
| } | |
| function vj(a) { | |
| var b = a.app.options.authDomain, | |
| p = uj(a) | |
| .then(function () { | |
| return ff(a.h, b); | |
| }) | |
| .then(function (b) { | |
| return b | |
| ? ((b.da = a.w), | |
| a.B && (a.B.ca || null) == (b.ca || null) | |
| ? b | |
| : b | |
| .reload() | |
| .then(function () { | |
| return ei(a.h, b).then(function () { | |
| return b; | |
| }); | |
| }) | |
| .s(function (p) { | |
| return "auth/network-request-failed" == p.code | |
| ? b | |
| : Ki(a.h); | |
| })) | |
| : null; | |
| }) | |
| .then(function (b) { | |
| ji(a, b || null); | |
| }); | |
| return Ed(a, p); | |
| } | |
| function Kl(a) { | |
| return a.Y.then(function () { | |
| return Yi(a); | |
| }) | |
| .s(function () {}) | |
| .then(function () { | |
| if (!a.l) return a.ma(); | |
| }) | |
| .s(function () {}) | |
| .then(function () { | |
| if (!a.l) { | |
| a.ga = !0; | |
| var b = a.h; | |
| b.b.addListener(Od("local"), b.a, a.ma); | |
| } | |
| }); | |
| } | |
| function Oi(a, b) { | |
| var p = null, | |
| c = null; | |
| return Ed( | |
| a, | |
| b | |
| .then(function (b) { | |
| p = gf(b); | |
| c = qe(b); | |
| return Ji(a, b); | |
| }) | |
| .then(function () { | |
| return od({ | |
| user: a.currentUser, | |
| credential: p, | |
| additionalUserInfo: c, | |
| operationType: "signIn", | |
| }); | |
| }) | |
| ); | |
| } | |
| function oi(a) { | |
| return (a.currentUser && a.currentUser._lat) || null; | |
| } | |
| function pi(a) { | |
| if (a.ga) { | |
| for (var b = 0; b < a.m.length; b++) if (a.m[b]) a.m[b](oi(a)); | |
| if (a.W !== a.getUid() && a.J.length) | |
| for (a.W = a.getUid(), b = 0; b < a.J.length; b++) | |
| if (a.J[b]) a.J[b](oi(a)); | |
| } | |
| } | |
| function Ij(a, b) { | |
| a.J.push(b); | |
| Ed( | |
| a, | |
| a.i.then(function () { | |
| !a.l && | |
| F(a.J, b) && | |
| a.W !== a.getUid() && | |
| ((a.W = a.getUid()), b(oi(a))); | |
| }) | |
| ); | |
| } | |
| function Ed(a, b) { | |
| a.O.push(b); | |
| b.ka(function () { | |
| P(a.O, b); | |
| }); | |
| return b; | |
| } | |
| function Bi() {} | |
| function Tg() { | |
| this.a = {}; | |
| this.b = 1e12; | |
| } | |
| function Jj(a, b) { | |
| return (b = Ak(b)) ? a.a[b] || null : null; | |
| } | |
| function Ak(a) { | |
| return (a = "undefined" === typeof a ? 1e12 : a) ? a.toString() : null; | |
| } | |
| function Ci(a, b) { | |
| this.g = !1; | |
| this.c = b; | |
| this.a = this.b = null; | |
| this.h = "invisible" !== this.c.size; | |
| this.f = Dc(a); | |
| var p = this; | |
| this.i = function () { | |
| p.execute(); | |
| }; | |
| this.h ? this.execute() : kc(this.f, "click", this.i); | |
| } | |
| function Kj(a) { | |
| if (a.g) throw Error("reCAPTCHA mock was already deleted!"); | |
| } | |
| function Lj() {} | |
| function rj() { | |
| this.b = sa.grecaptcha ? Infinity : 0; | |
| this.f = null; | |
| this.a = "__rcb" + Math.floor(1e6 * Math.random()).toString(); | |
| } | |
| function Oj(a, b, p, c, e, g, d) { | |
| Oa(this, "type", "recaptcha"); | |
| this.c = this.f = null; | |
| this.B = !1; | |
| this.u = b; | |
| this.g = null; | |
| d ? (rk || (rk = new Lj()), (d = rk)) : (sk || (sk = new rj()), (d = sk)); | |
| this.m = d; | |
| this.a = p || { theme: "light", type: "image" }; | |
| this.h = []; | |
| if (this.a[vl]) | |
| throw new da( | |
| "argument-error", | |
| "sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project." | |
| ); | |
| this.i = "invisible" === this.a[$m]; | |
| if (!sa.document) | |
| throw new da( | |
| "operation-not-supported-in-this-environment", | |
| "RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support." | |
| ); | |
| if (!Dc(b) || (!this.i && Dc(b).hasChildNodes())) | |
| throw new da( | |
| "argument-error", | |
| "reCAPTCHA container is either not found or already contains inner elements!" | |
| ); | |
| this.o = new Wc(a, g || null, e || null); | |
| this.v = | |
| c || | |
| function () { | |
| return null; | |
| }; | |
| var l = this; | |
| this.l = []; | |
| var h = this.a[wl]; | |
| this.a[wl] = function (a) { | |
| Ck(l, a); | |
| if ("function" === typeof h) h(a); | |
| else if ("string" === typeof h) { | |
| var b = Sb(h, sa); | |
| "function" === typeof b && b(a); | |
| } | |
| }; | |
| var k = this.a[xl]; | |
| this.a[xl] = function () { | |
| Ck(l, null); | |
| if ("function" === typeof k) k(); | |
| else if ("string" === typeof k) { | |
| var a = Sb(k, sa); | |
| "function" === typeof a && a(); | |
| } | |
| }; | |
| } | |
| function Ck(a, b) { | |
| for (var p = 0; p < a.l.length; p++) | |
| try { | |
| a.l[p](b); | |
| } catch (ki) {} | |
| } | |
| function dj(a, b) { | |
| J(a.l, function (a) { | |
| return a == b; | |
| }); | |
| } | |
| function Mj(a, b) { | |
| a.h.push(b); | |
| b.ka(function () { | |
| P(a.h, b); | |
| }); | |
| return b; | |
| } | |
| function sj(a) { | |
| if (a.B) | |
| throw new da( | |
| "internal-error", | |
| "RecaptchaVerifier instance has been destroyed." | |
| ); | |
| } | |
| function Nj(a, b, p) { | |
| var c = !1; | |
| try { | |
| this.b = p || uc.app(); | |
| } catch (li) { | |
| throw new da( | |
| "argument-error", | |
| "No firebase.app.App instance is currently initialized." | |
| ); | |
| } | |
| if (this.b.options && this.b.options.apiKey) p = this.b.options.apiKey; | |
| else throw new da("invalid-api-key"); | |
| var e = this, | |
| g = null; | |
| try { | |
| g = this.b.auth().Ca(); | |
| } catch (li) {} | |
| try { | |
| c = this.b.auth().settings.appVerificationDisabledForTesting; | |
| } catch (li) {} | |
| g = uc.SDK_VERSION ? nd(uc.SDK_VERSION, g) : null; | |
| Oj.call( | |
| this, | |
| p, | |
| a, | |
| b, | |
| function () { | |
| try { | |
| var a = e.b.auth().ha(); | |
| } catch (aj) { | |
| a = null; | |
| } | |
| return a; | |
| }, | |
| g, | |
| R(Gj), | |
| c | |
| ); | |
| } | |
| function Bk(a, b, p, c) { | |
| a: { | |
| p = Array.prototype.slice.call(p); | |
| for (var e = 0, g = !1, d = 0; d < b.length; d++) | |
| if (b[d].optional) g = !0; | |
| else { | |
| if (g) | |
| throw new da( | |
| "internal-error", | |
| "Argument validator encountered a required argument after an optional argument." | |
| ); | |
| e++; | |
| } | |
| g = b.length; | |
| if (p.length < e || g < p.length) | |
| c = | |
| "Expected " + | |
| (e == g | |
| ? 1 == e | |
| ? "1 argument" | |
| : e + " arguments" | |
| : e + "-" + g + " arguments") + | |
| " but got " + | |
| p.length + | |
| "."; | |
| else { | |
| for (e = 0; e < p.length; e++) | |
| if (((g = b[e].optional && void 0 === p[e]), !b[e].N(p[e]) && !g)) { | |
| b = b[e]; | |
| if (0 > e || e >= yl.length) | |
| throw new da( | |
| "internal-error", | |
| "Argument validator received an unsupported number of arguments." | |
| ); | |
| p = yl[e]; | |
| c = | |
| (c ? "" : p + " argument ") + | |
| (b.name ? '"' + b.name + '" ' : "") + | |
| "must be " + | |
| b.M + | |
| "."; | |
| break a; | |
| } | |
| c = null; | |
| } | |
| } | |
| if (c) throw new da("argument-error", a + " failed: " + c); | |
| } | |
| function pb(a, b) { | |
| return { name: a || "", M: "a valid string", optional: !!b, N: q }; | |
| } | |
| function Pj(a, b) { | |
| return { name: a || "", M: "a boolean", optional: !!b, N: h }; | |
| } | |
| function qf(a, b) { | |
| return { name: a || "", M: "a valid object", optional: !!b, N: l }; | |
| } | |
| function Pi(a, b) { | |
| return { name: a || "", M: "a function", optional: !!b, N: e }; | |
| } | |
| function ai(a, b) { | |
| return { name: a || "", M: "null", optional: !!b, N: k }; | |
| } | |
| function Ll() { | |
| return { | |
| name: "", | |
| M: "an HTML element", | |
| optional: !1, | |
| N: function (a) { | |
| return !!(a && a instanceof Element); | |
| }, | |
| }; | |
| } | |
| function Ml() { | |
| return { | |
| name: "auth", | |
| M: "an instance of Firebase Auth", | |
| optional: !0, | |
| N: function (a) { | |
| return !!(a && a instanceof yf); | |
| }, | |
| }; | |
| } | |
| function an() { | |
| return { | |
| name: "app", | |
| M: "an instance of Firebase App", | |
| optional: !0, | |
| N: function (a) { | |
| return !!(a && a instanceof uc.app.App); | |
| }, | |
| }; | |
| } | |
| function Ni(a) { | |
| return { | |
| name: a ? a + "Credential" : "credential", | |
| M: a ? "a valid " + a + " credential" : "a valid credential", | |
| optional: !1, | |
| N: function (b) { | |
| if (!b) return !1; | |
| var p = !a || b.providerId === a; | |
| return !(!b.na || !p); | |
| }, | |
| }; | |
| } | |
| function cj() { | |
| return { | |
| name: "authProvider", | |
| M: "a valid Auth provider", | |
| optional: !1, | |
| N: function (a) { | |
| return !!( | |
| a && | |
| a.providerId && | |
| a.hasOwnProperty && | |
| a.hasOwnProperty("isOAuthProvider") | |
| ); | |
| }, | |
| }; | |
| } | |
| function Hj() { | |
| return { | |
| name: "applicationVerifier", | |
| M: "an implementation of firebase.auth.ApplicationVerifier", | |
| optional: !1, | |
| N: function (a) { | |
| return !!(a && q(a.type) && e(a.verify)); | |
| }, | |
| }; | |
| } | |
| function Bf(a, b, p, c) { | |
| return { | |
| name: p || "", | |
| M: a.M + " or " + b.M, | |
| optional: !!c, | |
| N: function (p) { | |
| return a.N(p) || b.N(p); | |
| }, | |
| }; | |
| } | |
| function Ze(a, b) { | |
| for (var p in b) { | |
| var c = b[p].name; | |
| a[c] = zl(c, a[p], b[p].j); | |
| } | |
| } | |
| function Al(a, b) { | |
| for (var p in b) { | |
| var c = b[p].name; | |
| c !== p && | |
| Object.defineProperty(a, c, { | |
| get: x(function (a) { | |
| return this[a]; | |
| }, p), | |
| set: x( | |
| function (a, b, p, c) { | |
| Bk(a, [p], [c], !0); | |
| this[b] = c; | |
| }, | |
| c, | |
| p, | |
| b[p].Za | |
| ), | |
| enumerable: !0, | |
| }); | |
| } | |
| } | |
| function lf(a, b, p, c) { | |
| a[b] = zl(b, p, c); | |
| } | |
| function zl(a, b, p) { | |
| function c() { | |
| var a = Array.prototype.slice.call(arguments); | |
| Bk(e, p, a); | |
| return b.apply(this, a); | |
| } | |
| if (!p) return b; | |
| var e = bn(a), | |
| g; | |
| for (g in b) c[g] = b[g]; | |
| for (g in b.prototype) c.prototype[g] = b.prototype[g]; | |
| return c; | |
| } | |
| function bn(a) { | |
| a = a.split("."); | |
| return a[a.length - 1]; | |
| } | |
| var uc = f(26).default, | |
| cn = | |
| "function" == typeof Object.defineProperties | |
| ? Object.defineProperty | |
| : function (a, b, p) { | |
| a != Array.prototype && a != Object.prototype && (a[b] = p.value); | |
| }, | |
| Bl = | |
| "undefined" != typeof window && window === this | |
| ? this | |
| : "undefined" != typeof m && null != m | |
| ? m | |
| : this; | |
| (function (a, b) { | |
| if (b) { | |
| var p = Bl; | |
| a = a.split("."); | |
| for (var c = 0; c < a.length - 1; c++) { | |
| var e = a[c]; | |
| e in p || (p[e] = {}); | |
| p = p[e]; | |
| } | |
| a = a[a.length - 1]; | |
| c = p[a]; | |
| b = b(c); | |
| b != c && | |
| null != b && | |
| cn(p, a, { configurable: !0, writable: !0, value: b }); | |
| } | |
| })("Promise", function (a) { | |
| function b(a) { | |
| this.b = 0; | |
| this.c = void 0; | |
| this.a = []; | |
| var b = this.f(); | |
| try { | |
| a(b.resolve, b.reject); | |
| } catch (mi) { | |
| b.reject(mi); | |
| } | |
| } | |
| function p() { | |
| this.a = null; | |
| } | |
| function c(a) { | |
| return a instanceof b | |
| ? a | |
| : new b(function (b) { | |
| b(a); | |
| }); | |
| } | |
| if (a) return a; | |
| p.prototype.b = function (a) { | |
| if (null == this.a) { | |
| this.a = []; | |
| var b = this; | |
| this.c(function () { | |
| b.g(); | |
| }); | |
| } | |
| this.a.push(a); | |
| }; | |
| var e = Bl.setTimeout; | |
| p.prototype.c = function (a) { | |
| e(a, 0); | |
| }; | |
| p.prototype.g = function () { | |
| for (; this.a && this.a.length; ) { | |
| var a = this.a; | |
| this.a = []; | |
| for (var b = 0; b < a.length; ++b) { | |
| var p = a[b]; | |
| a[b] = null; | |
| try { | |
| p(); | |
| } catch (zi) { | |
| this.f(zi); | |
| } | |
| } | |
| } | |
| this.a = null; | |
| }; | |
| p.prototype.f = function (a) { | |
| this.c(function () { | |
| throw a; | |
| }); | |
| }; | |
| b.prototype.f = function () { | |
| function a(a) { | |
| return function (c) { | |
| p || ((p = !0), a.call(b, c)); | |
| }; | |
| } | |
| var b = this, | |
| p = !1; | |
| return { resolve: a(this.m), reject: a(this.g) }; | |
| }; | |
| b.prototype.m = function (a) { | |
| if (a === this) | |
| this.g(new TypeError("A Promise cannot resolve to itself")); | |
| else if (a instanceof b) this.o(a); | |
| else { | |
| a: switch (typeof a) { | |
| case "object": | |
| var p = null != a; | |
| break a; | |
| case "function": | |
| p = !0; | |
| break a; | |
| default: | |
| p = !1; | |
| } | |
| p ? this.u(a) : this.h(a); | |
| } | |
| }; | |
| b.prototype.u = function (a) { | |
| var b = void 0; | |
| try { | |
| b = a.then; | |
| } catch (mi) { | |
| this.g(mi); | |
| return; | |
| } | |
| "function" == typeof b ? this.v(b, a) : this.h(a); | |
| }; | |
| b.prototype.g = function (a) { | |
| this.i(2, a); | |
| }; | |
| b.prototype.h = function (a) { | |
| this.i(1, a); | |
| }; | |
| b.prototype.i = function (a, b) { | |
| if (0 != this.b) | |
| throw Error( | |
| "Cannot settle(" + | |
| a + | |
| ", " + | |
| b + | |
| "): Promise already settled in state" + | |
| this.b | |
| ); | |
| this.b = a; | |
| this.c = b; | |
| this.l(); | |
| }; | |
| b.prototype.l = function () { | |
| if (null != this.a) { | |
| for (var a = 0; a < this.a.length; ++a) g.b(this.a[a]); | |
| this.a = null; | |
| } | |
| }; | |
| var g = new p(); | |
| b.prototype.o = function (a) { | |
| var b = this.f(); | |
| a.La(b.resolve, b.reject); | |
| }; | |
| b.prototype.v = function (a, b) { | |
| var p = this.f(); | |
| try { | |
| a.call(b, p.resolve, p.reject); | |
| } catch (zi) { | |
| p.reject(zi); | |
| } | |
| }; | |
| b.prototype.then = function (a, p) { | |
| function c(a, b) { | |
| return "function" == typeof a | |
| ? function (b) { | |
| try { | |
| e(a(b)); | |
| } catch (dn) { | |
| g(dn); | |
| } | |
| } | |
| : b; | |
| } | |
| var e, | |
| g, | |
| d = new b(function (a, b) { | |
| e = a; | |
| g = b; | |
| }); | |
| this.La(c(a, e), c(p, g)); | |
| return d; | |
| }; | |
| b.prototype.catch = function (a) { | |
| return this.then(void 0, a); | |
| }; | |
| b.prototype.La = function (a, b) { | |
| function p() { | |
| switch (c.b) { | |
| case 1: | |
| a(c.c); | |
| break; | |
| case 2: | |
| b(c.c); | |
| break; | |
| default: | |
| throw Error("Unexpected state: " + c.b); | |
| } | |
| } | |
| var c = this; | |
| null == this.a ? g.b(p) : this.a.push(p); | |
| }; | |
| b.resolve = c; | |
| b.reject = function (a) { | |
| return new b(function (b, p) { | |
| p(a); | |
| }); | |
| }; | |
| b.race = function (a) { | |
| return new b(function (b, p) { | |
| for (var e = d(a), g = e.next(); !g.done; g = e.next()) | |
| c(g.value).La(b, p); | |
| }); | |
| }; | |
| b.all = function (a) { | |
| var p = d(a), | |
| e = p.next(); | |
| return e.done | |
| ? c([]) | |
| : new b(function (a, b) { | |
| function g(b) { | |
| return function (p) { | |
| d[b] = p; | |
| l--; | |
| 0 == l && a(d); | |
| }; | |
| } | |
| var d = [], | |
| l = 0; | |
| do | |
| d.push(void 0), | |
| l++, | |
| c(e.value).La(g(d.length - 1), b), | |
| (e = p.next()); | |
| while (!e.done); | |
| }); | |
| }; | |
| return b; | |
| }); | |
| var hk = hk || {}, | |
| sa = this || self, | |
| Rl = /^[\w+/_-]+[=]{0,2}$/, | |
| Rj = null, | |
| xj = "closure_uid_" + ((1e9 * Math.random()) >>> 0), | |
| Pk = 0, | |
| Yh = | |
| Date.now || | |
| function () { | |
| return +new Date(); | |
| }; | |
| v(H, Error); | |
| H.prototype.name = "CustomError"; | |
| v(C, H); | |
| C.prototype.name = "AssertionError"; | |
| G.prototype.get = function () { | |
| if (0 < this.b) { | |
| this.b--; | |
| var a = this.a; | |
| this.a = a.next; | |
| a.next = null; | |
| } else a = this.c(); | |
| return a; | |
| }; | |
| var Lk = new G( | |
| function () { | |
| return new r(); | |
| }, | |
| function (a) { | |
| a.reset(); | |
| } | |
| ); | |
| A.prototype.add = function (a, b) { | |
| var p = Lk.get(); | |
| p.set(a, b); | |
| this.b ? (this.b.next = p) : (this.a = p); | |
| this.b = p; | |
| }; | |
| r.prototype.set = function (a, b) { | |
| this.a = a; | |
| this.b = b; | |
| this.next = null; | |
| }; | |
| r.prototype.reset = function () { | |
| this.next = this.b = this.a = null; | |
| }; | |
| var Ek = Array.prototype.indexOf | |
| ? function (a, b) { | |
| return Array.prototype.indexOf.call(a, b, void 0); | |
| } | |
| : function (a, b) { | |
| if (q(a)) return q(b) && 1 == b.length ? a.indexOf(b, 0) : -1; | |
| for (var p = 0; p < a.length; p++) | |
| if (p in a && a[p] === b) return p; | |
| return -1; | |
| }, | |
| Ye = Array.prototype.forEach | |
| ? function (a, b, p) { | |
| Array.prototype.forEach.call(a, b, p); | |
| } | |
| : function (a, b, p) { | |
| for ( | |
| var c = a.length, e = q(a) ? a.split("") : a, g = 0; | |
| g < c; | |
| g++ | |
| ) | |
| g in e && b.call(p, e[g], g, a); | |
| }, | |
| ak = Array.prototype.map | |
| ? function (a, b) { | |
| return Array.prototype.map.call(a, b, void 0); | |
| } | |
| : function (a, b) { | |
| for ( | |
| var p = a.length, c = Array(p), e = q(a) ? a.split("") : a, g = 0; | |
| g < p; | |
| g++ | |
| ) | |
| g in e && (c[g] = b.call(void 0, e[g], g, a)); | |
| return c; | |
| }, | |
| ym = Array.prototype.some | |
| ? function (a, b) { | |
| return Array.prototype.some.call(a, b, void 0); | |
| } | |
| : function (a, b) { | |
| for ( | |
| var p = a.length, c = q(a) ? a.split("") : a, e = 0; | |
| e < p; | |
| e++ | |
| ) | |
| if (e in c && b.call(void 0, c[e], e, a)) return !0; | |
| return !1; | |
| }, | |
| Fk = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split( | |
| " " | |
| ); | |
| ca.prototype.qa = !0; | |
| ca.prototype.pa = function () { | |
| return this.a; | |
| }; | |
| ca.prototype.toString = function () { | |
| return "Const{" + this.a + "}"; | |
| }; | |
| var Gk = {}, | |
| mj = {}, | |
| Ql = new ca(mj, ""); | |
| ia.prototype.qa = !0; | |
| ia.prototype.pa = function () { | |
| return this.a.toString(); | |
| }; | |
| ia.prototype.toString = function () { | |
| return "TrustedResourceUrl{" + this.a + "}"; | |
| }; | |
| var Pl = /%{(\w+)}/g, | |
| Ol = /^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i, | |
| Hk = {}, | |
| Qk = String.prototype.trim | |
| ? function (a) { | |
| return a.trim(); | |
| } | |
| : function (a) { | |
| return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]; | |
| }, | |
| Tl = /&/g, | |
| Ul = /</g, | |
| Vl = />/g, | |
| Wl = /"/g, | |
| Xl = /'/g, | |
| Yl = /\x00/g, | |
| Sl = /[\x00&<>"']/; | |
| Z.prototype.qa = !0; | |
| Z.prototype.pa = function () { | |
| return this.a.toString(); | |
| }; | |
| Z.prototype.toString = function () { | |
| return "SafeUrl{" + this.a + "}"; | |
| }; | |
| var Jk = /^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i, | |
| Ik = {}; | |
| ea("about:blank"); | |
| a: { | |
| var Cl = sa.navigator; | |
| if (Cl) { | |
| var Dl = Cl.userAgent; | |
| if (Dl) { | |
| var nj = Dl; | |
| break a; | |
| } | |
| } | |
| nj = ""; | |
| } | |
| La.prototype.qa = !0; | |
| La.prototype.pa = function () { | |
| return this.a.toString(); | |
| }; | |
| La.prototype.toString = function () { | |
| return "SafeHtml{" + this.a + "}"; | |
| }; | |
| var Kk = {}; | |
| Aa("\x3c!DOCTYPE html\x3e"); | |
| var Zl = Aa(""); | |
| Aa("\x3cbr\x3e"); | |
| var Tj, | |
| wj, | |
| Sj = !1, | |
| Dk = new A(), | |
| Mi = 0, | |
| oj = 2, | |
| ni = 3; | |
| ya.prototype.reset = function () { | |
| this.f = this.b = this.g = this.a = null; | |
| this.c = !1; | |
| }; | |
| var Mk = new G( | |
| function () { | |
| return new ya(); | |
| }, | |
| function (a) { | |
| a.reset(); | |
| } | |
| ); | |
| ha.prototype.then = function (a, b, p) { | |
| return tb(this, e(a) ? a : null, e(b) ? b : null, p); | |
| }; | |
| ha.prototype.$goog_Thenable = !0; | |
| var W = ha.prototype; | |
| W.ka = function (a, b) { | |
| a = jb(a, a, b); | |
| a.c = !0; | |
| lb(this, a); | |
| return this; | |
| }; | |
| W.s = function (a, b) { | |
| return tb(this, null, a, b); | |
| }; | |
| W.cancel = function (a) { | |
| this.a == Mi && | |
| la(function () { | |
| var b = new kb(a); | |
| ma(this, b); | |
| }, this); | |
| }; | |
| W.Oc = function (a) { | |
| this.a = Mi; | |
| Ja(this, oj, a); | |
| }; | |
| W.Pc = function (a) { | |
| this.a = Mi; | |
| Ja(this, ni, a); | |
| }; | |
| W.Zb = function () { | |
| for (var a; (a = qb(this)); ) ta(this, a, this.a, this.i); | |
| this.h = !1; | |
| }; | |
| var Nk = X; | |
| v(kb, H); | |
| kb.prototype.name = "cancel"; | |
| var Uj = 0, | |
| Ok = {}; | |
| rb.prototype.va = !1; | |
| rb.prototype.za = function () { | |
| if (this.la) for (; this.la.length; ) this.la.shift()(); | |
| }; | |
| Yb[" "] = u; | |
| var en = za("Opera"), | |
| Ch = za("Trident") || za("MSIE"), | |
| El = za("Edge"), | |
| gm = El || Ch, | |
| Sk = | |
| za("Gecko") && | |
| !(ja(nj.toLowerCase(), "webkit") && !za("Edge")) && | |
| !(za("Trident") || za("MSIE")) && | |
| !za("Edge"), | |
| fn = ja(nj.toLowerCase(), "webkit") && !za("Edge"); | |
| a: { | |
| var tk = "", | |
| uk = (function () { | |
| var a = nj; | |
| if (Sk) return /rv:([^\);]+)(\)|;)/.exec(a); | |
| if (El) return /Edge\/([\d\.]+)/.exec(a); | |
| if (Ch) return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a); | |
| if (fn) return /WebKit\/(\S+)/.exec(a); | |
| if (en) return /(?:Version)[ \/]?(\S+)/.exec(a); | |
| })(); | |
| uk && (tk = uk ? uk[1] : ""); | |
| if (Ch) { | |
| var vk = Na(); | |
| if (null != vk && vk > parseFloat(tk)) { | |
| var Rk = String(vk); | |
| break a; | |
| } | |
| } | |
| Rk = tk; | |
| } | |
| var $l = {}; | |
| var Ai = sa.document && Ch ? Na() : void 0; | |
| var gn = | |
| Object.freeze || | |
| function (a) { | |
| return a; | |
| }, | |
| Uk = !Ch || 9 <= Number(Ai), | |
| hn = Ch && !xd("9"), | |
| cm = (function () { | |
| if (!sa.addEventListener || !Object.defineProperty) return !1; | |
| var a = !1, | |
| b = Object.defineProperty({}, "passive", { | |
| get: function () { | |
| a = !0; | |
| }, | |
| }); | |
| try { | |
| sa.addEventListener("test", u, b), | |
| sa.removeEventListener("test", u, b); | |
| } catch (lj) {} | |
| return a; | |
| })(); | |
| vb.prototype.preventDefault = function () { | |
| this.Mb = !1; | |
| }; | |
| v(Zb, vb); | |
| var am = gn({ 2: "touch", 3: "pen", 4: "mouse" }); | |
| Zb.prototype.preventDefault = function () { | |
| Zb.qb.preventDefault.call(this); | |
| var a = this.a; | |
| if (a.preventDefault) a.preventDefault(); | |
| else if (((a.returnValue = !1), hn)) | |
| try { | |
| if (a.ctrlKey || (112 <= a.keyCode && 123 >= a.keyCode)) | |
| a.keyCode = -1; | |
| } catch (Rf) {} | |
| }; | |
| Zb.prototype.f = function () { | |
| return this.a; | |
| }; | |
| var pj = "closure_listenable_" + ((1e6 * Math.random()) | 0), | |
| bm = 0; | |
| Sa.prototype.add = function (a, b, p, c, e) { | |
| var g = a.toString(); | |
| (a = this.a[g]) || ((a = this.a[g] = []), this.b++); | |
| var d = Ha(a, b, c, e); | |
| -1 < d | |
| ? ((b = a[d]), p || (b.Ka = !1)) | |
| : ((b = new Lc(b, this.src, g, !!c, e)), (b.Ka = p), a.push(b)); | |
| return b; | |
| }; | |
| var Vj = "closure_lm_" + ((1e6 * Math.random()) | 0), | |
| Wj = {}, | |
| Tk = 0, | |
| Xj = "__closure_events_fn_" + ((1e9 * Math.random()) >>> 0); | |
| v($a, rb); | |
| $a.prototype[pj] = !0; | |
| $a.prototype.addEventListener = function (a, b, p, c) { | |
| kc(this, a, b, p, c); | |
| }; | |
| $a.prototype.removeEventListener = function (a, b, p, c) { | |
| yb(this, a, b, p, c); | |
| }; | |
| $a.prototype.dispatchEvent = function (a) { | |
| var b, | |
| p = this.Xa; | |
| if (p) for (b = []; p; p = p.Xa) b.push(p); | |
| p = this.Sb; | |
| var c = a.type || a; | |
| if (q(a)) a = new vb(a, p); | |
| else if (a instanceof vb) a.target = a.target || p; | |
| else { | |
| var e = a; | |
| a = new vb(c, p); | |
| Y(a, e); | |
| } | |
| e = !0; | |
| if (b) | |
| for (var g = b.length - 1; 0 <= g; g--) { | |
| var d = (a.b = b[g]); | |
| e = hb(d, c, !0, a) && e; | |
| } | |
| d = a.b = p; | |
| e = hb(d, c, !0, a) && e; | |
| e = hb(d, c, !1, a) && e; | |
| if (b) | |
| for (g = 0; g < b.length; g++) | |
| (d = a.b = b[g]), (e = hb(d, c, !1, a) && e); | |
| return e; | |
| }; | |
| $a.prototype.za = function () { | |
| $a.qb.za.call(this); | |
| if (this.u) { | |
| var a = this.u, | |
| b = 0, | |
| p; | |
| for (p in a.a) { | |
| for (var c = a.a[p], e = 0; e < c.length; e++) ++b, nb(c[e]); | |
| delete a.a[p]; | |
| a.b--; | |
| } | |
| } | |
| this.Xa = null; | |
| }; | |
| W = nc.prototype; | |
| W.U = function () { | |
| ad(this); | |
| for (var a = [], b = 0; b < this.a.length; b++) a.push(this.b[this.a[b]]); | |
| return a; | |
| }; | |
| W.X = function () { | |
| ad(this); | |
| return this.a.concat(); | |
| }; | |
| W.clear = function () { | |
| this.b = {}; | |
| this.c = this.a.length = 0; | |
| }; | |
| W.get = function (a, b) { | |
| return Xb(this.b, a) ? this.b[a] : b; | |
| }; | |
| W.set = function (a, b) { | |
| Xb(this.b, a) || (this.c++, this.a.push(a)); | |
| this.b[a] = b; | |
| }; | |
| W.forEach = function (a, b) { | |
| for (var p = this.X(), c = 0; c < p.length; c++) { | |
| var e = p[c], | |
| g = this.get(e); | |
| a.call(b, g, e, this); | |
| } | |
| }; | |
| var Vk = /^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/; | |
| Mc.prototype.toString = function () { | |
| var a = [], | |
| b = this.f; | |
| b && a.push(Cd(b, Fl, !0), ":"); | |
| var p = this.b; | |
| if (p || "file" == b) | |
| a.push("//"), | |
| (b = this.i) && a.push(Cd(b, Fl, !0), "@"), | |
| a.push( | |
| encodeURIComponent(String(p)).replace(/%25([0-9a-fA-F]{2})/g, "%$1") | |
| ), | |
| (p = this.l), | |
| null != p && a.push(":", String(p)); | |
| if ((p = this.c)) | |
| this.b && "/" != p.charAt(0) && a.push("/"), | |
| a.push(Cd(p, "/" == p.charAt(0) ? jn : kn, !0)); | |
| (p = this.a.toString()) && a.push("?", p); | |
| (p = this.g) && a.push("#", Cd(p, ln)); | |
| return a.join(""); | |
| }; | |
| Mc.prototype.resolve = function (a) { | |
| var b = new Mc(this), | |
| p = !!a.f; | |
| p ? Ub(b, a.f) : (p = !!a.i); | |
| p ? (b.i = a.i) : (p = !!a.b); | |
| p ? (b.b = a.b) : (p = null != a.l); | |
| var c = a.c; | |
| if (p) ld(b, a.l); | |
| else if ((p = !!a.c)) { | |
| if ("/" != c.charAt(0)) | |
| if (this.b && !this.c) c = "/" + c; | |
| else { | |
| var e = b.c.lastIndexOf("/"); | |
| -1 != e && (c = b.c.substr(0, e + 1) + c); | |
| } | |
| e = c; | |
| if (".." == e || "." == e) c = ""; | |
| else if (ja(e, "./") || ja(e, "/.")) { | |
| c = 0 == e.lastIndexOf("/", 0); | |
| e = e.split("/"); | |
| for (var g = [], d = 0; d < e.length; ) { | |
| var l = e[d++]; | |
| "." == l | |
| ? c && d == e.length && g.push("") | |
| : ".." == l | |
| ? ((1 < g.length || (1 == g.length && "" != g[0])) && g.pop(), | |
| c && d == e.length && g.push("")) | |
| : (g.push(l), (c = !0)); | |
| } | |
| c = g.join("/"); | |
| } else c = e; | |
| } | |
| p ? (b.c = c) : (p = "" !== a.a.toString()); | |
| p ? Db(b, Ob(a.a)) : (p = !!a.g); | |
| p && (b.g = a.g); | |
| return b; | |
| }; | |
| var Fl = /[#\/\?@]/g, | |
| kn = /[#\?:]/g, | |
| jn = /[#\?]/g, | |
| dm = /[#\?@]/g, | |
| ln = /#/g; | |
| W = xa.prototype; | |
| W.add = function (a, b) { | |
| ec(this); | |
| this.c = null; | |
| a = Qa(this, a); | |
| var p = this.a.get(a); | |
| p || this.a.set(a, (p = [])); | |
| p.push(b); | |
| this.b += 1; | |
| return this; | |
| }; | |
| W.clear = function () { | |
| this.a = this.c = null; | |
| this.b = 0; | |
| }; | |
| W.forEach = function (a, b) { | |
| ec(this); | |
| this.a.forEach(function (p, c) { | |
| Ye( | |
| p, | |
| function (p) { | |
| a.call(b, p, c, this); | |
| }, | |
| this | |
| ); | |
| }, this); | |
| }; | |
| W.X = function () { | |
| ec(this); | |
| for (var a = this.a.U(), b = this.a.X(), p = [], c = 0; c < b.length; c++) | |
| for (var e = a[c], g = 0; g < e.length; g++) p.push(b[c]); | |
| return p; | |
| }; | |
| W.U = function (a) { | |
| ec(this); | |
| var b = []; | |
| if (q(a)) Eb(this, a) && (b = L(b, this.a.get(Qa(this, a)))); | |
| else { | |
| a = this.a.U(); | |
| for (var p = 0; p < a.length; p++) b = L(b, a[p]); | |
| } | |
| return b; | |
| }; | |
| W.set = function (a, b) { | |
| ec(this); | |
| this.c = null; | |
| a = Qa(this, a); | |
| Eb(this, a) && (this.b -= this.a.get(a).length); | |
| this.a.set(a, [b]); | |
| this.b += 1; | |
| return this; | |
| }; | |
| W.get = function (a, b) { | |
| if (!a) return b; | |
| a = this.U(a); | |
| return 0 < a.length ? String(a[0]) : b; | |
| }; | |
| W.toString = function () { | |
| if (this.c) return this.c; | |
| if (!this.a) return ""; | |
| for (var a = [], b = this.a.X(), p = 0; p < b.length; p++) { | |
| var c = b[p], | |
| e = encodeURIComponent(String(c)); | |
| c = this.U(c); | |
| for (var g = 0; g < c.length; g++) { | |
| var d = e; | |
| "" !== c[g] && (d += "\x3d" + encodeURIComponent(String(c[g]))); | |
| a.push(d); | |
| } | |
| } | |
| return (this.c = a.join("\x26")); | |
| }; | |
| var em = !Ch || 9 <= Number(Ai), | |
| Wk = { | |
| cellpadding: "cellPadding", | |
| cellspacing: "cellSpacing", | |
| colspan: "colSpan", | |
| frameborder: "frameBorder", | |
| height: "height", | |
| maxlength: "maxLength", | |
| nonce: "nonce", | |
| role: "role", | |
| rowspan: "rowSpan", | |
| type: "type", | |
| usemap: "useMap", | |
| valign: "vAlign", | |
| width: "width", | |
| }, | |
| Xk = { | |
| '"': '\\"', | |
| "\\": "\\\\", | |
| "/": "\\/", | |
| "\b": "\\b", | |
| "\f": "\\f", | |
| "\n": "\\n", | |
| "\r": "\\r", | |
| "\t": "\\t", | |
| "\x0B": "\\u000b", | |
| }, | |
| fm = /\uffff/.test("") | |
| ? /[\\"\x00-\x1f\x7f-\uffff]/g | |
| : /[\\"\x00-\x1f\x7f-\xff]/g, | |
| Rm = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, | |
| Gm = /^[^@]+@[^@]+$/, | |
| Yj = "Firefox", | |
| Yk = "Chrome", | |
| Zk = { Wc: "FirebaseCore-web", Yc: "FirebaseUI-web" }; | |
| Id.prototype.get = function () { | |
| var a = sa.navigator; | |
| return ( | |
| a && | |
| "boolean" === typeof a.onLine && | |
| (Lb() || | |
| "chrome-extension:" === Ac() || | |
| "undefined" !== typeof a.connection) | |
| ? a.onLine | |
| : 1 | |
| ) | |
| ? this.b | |
| ? this.c | |
| : this.a | |
| : Math.min(5e3, this.a); | |
| }; | |
| var $k = {}; | |
| try { | |
| var wk = {}; | |
| Object.defineProperty(wk, "abcd", { | |
| configurable: !0, | |
| enumerable: !0, | |
| value: 1, | |
| }); | |
| Object.defineProperty(wk, "abcd", { | |
| configurable: !0, | |
| enumerable: !0, | |
| value: 2, | |
| }); | |
| var al = 2 == wk.abcd; | |
| } catch (Nl) { | |
| al = !1; | |
| } | |
| var yj = "EMAIL_SIGNIN", | |
| hm = "email", | |
| im = "newEmail", | |
| jm = "requestType", | |
| lm = "email", | |
| km = "fromEmail", | |
| nm = "data", | |
| mm = "operation"; | |
| v(da, Error); | |
| da.prototype.A = function () { | |
| return { code: this.code, message: this.message }; | |
| }; | |
| da.prototype.toJSON = function () { | |
| return this.A(); | |
| }; | |
| var qj = "auth/", | |
| om = { | |
| "admin-restricted-operation": | |
| "This operation is restricted to administrators only.", | |
| "argument-error": "", | |
| "app-not-authorized": | |
| "This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.", | |
| "app-not-installed": | |
| "The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.", | |
| "captcha-check-failed": | |
| "The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.", | |
| "code-expired": | |
| "The SMS code has expired. Please re-send the verification code to try again.", | |
| "cordova-not-ready": "Cordova framework is not ready.", | |
| "cors-unsupported": "This browser is not supported.", | |
| "credential-already-in-use": | |
| "This credential is already associated with a different user account.", | |
| "custom-token-mismatch": | |
| "The custom token corresponds to a different audience.", | |
| "requires-recent-login": | |
| "This operation is sensitive and requires recent authentication. Log in again before retrying this request.", | |
| "dynamic-link-not-activated": | |
| "Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.", | |
| "email-already-in-use": | |
| "The email address is already in use by another account.", | |
| "expired-action-code": "The action code has expired. ", | |
| "cancelled-popup-request": | |
| "This operation has been cancelled due to another conflicting popup being opened.", | |
| "internal-error": "An internal error has occurred.", | |
| "invalid-app-credential": | |
| "The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.", | |
| "invalid-app-id": | |
| "The mobile app identifier is not registed for the current project.", | |
| "invalid-user-token": | |
| "This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.", | |
| "invalid-auth-event": "An internal error has occurred.", | |
| "invalid-verification-code": | |
| "The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.", | |
| "invalid-continue-uri": | |
| "The continue URL provided in the request is invalid.", | |
| "invalid-cordova-configuration": | |
| "The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.", | |
| "invalid-custom-token": | |
| "The custom token format is incorrect. Please check the documentation.", | |
| "invalid-dynamic-link-domain": | |
| "The provided dynamic link domain is not configured or authorized for the current project.", | |
| "invalid-email": "The email address is badly formatted.", | |
| "invalid-api-key": | |
| "Your API key is invalid, please check you have copied it correctly.", | |
| "invalid-cert-hash": "The SHA-1 certificate hash provided is invalid.", | |
| "invalid-credential": | |
| "The supplied auth credential is malformed or has expired.", | |
| "invalid-message-payload": | |
| "The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.", | |
| "invalid-oauth-provider": | |
| "EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.", | |
| "invalid-oauth-client-id": | |
| "The OAuth client ID provided is either invalid or does not match the specified API key.", | |
| "unauthorized-domain": | |
| "This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.", | |
| "invalid-action-code": | |
| "The action code is invalid. This can happen if the code is malformed, expired, or has already been used.", | |
| "wrong-password": | |
| "The password is invalid or the user does not have a password.", | |
| "invalid-persistence-type": | |
| "The specified persistence type is invalid. It can only be local, session or none.", | |
| "invalid-phone-number": | |
| "The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].", | |
| "invalid-provider-id": "The specified provider ID is invalid.", | |
| "invalid-recipient-email": | |
| "The email corresponding to this action failed to send as the provided recipient email address is invalid.", | |
| "invalid-sender": | |
| "The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.", | |
| "invalid-verification-id": | |
| "The verification ID used to create the phone auth credential is invalid.", | |
| "invalid-tenant-id": "The Auth instance's tenant ID is invalid.", | |
| "missing-android-pkg-name": | |
| "An Android Package Name must be provided if the Android App is required to be installed.", | |
| "auth-domain-config-required": | |
| "Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.", | |
| "missing-app-credential": | |
| "The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.", | |
| "missing-verification-code": | |
| "The phone auth credential was created with an empty SMS verification code.", | |
| "missing-continue-uri": | |
| "A continue URL must be provided in the request.", | |
| "missing-iframe-start": "An internal error has occurred.", | |
| "missing-ios-bundle-id": | |
| "An iOS Bundle ID must be provided if an App Store ID is provided.", | |
| "missing-or-invalid-nonce": | |
| "The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.", | |
| "missing-phone-number": | |
| "To send verification codes, provide a phone number for the recipient.", | |
| "missing-verification-id": | |
| "The phone auth credential was created with an empty verification ID.", | |
| "app-deleted": "This instance of FirebaseApp has been deleted.", | |
| "account-exists-with-different-credential": | |
| "An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.", | |
| "network-request-failed": | |
| "A network error (such as timeout, interrupted connection or unreachable host) has occurred.", | |
| "no-auth-event": "An internal error has occurred.", | |
| "no-such-provider": | |
| "User was not linked to an account with the given provider.", | |
| "null-user": | |
| "A null user object was provided as the argument for an operation which requires a non-null user object.", | |
| "operation-not-allowed": | |
| "The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.", | |
| "operation-not-supported-in-this-environment": | |
| 'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.', | |
| "popup-blocked": | |
| "Unable to establish a connection with the popup. It may have been blocked by the browser.", | |
| "popup-closed-by-user": | |
| "The popup has been closed by the user before finalizing the operation.", | |
| "provider-already-linked": | |
| "User can only be linked to one identity for the given provider.", | |
| "quota-exceeded": | |
| "The project's quota for this operation has been exceeded.", | |
| "redirect-cancelled-by-user": | |
| "The redirect operation has been cancelled by the user before finalizing.", | |
| "redirect-operation-pending": | |
| "A redirect sign-in operation is already pending.", | |
| "rejected-credential": | |
| "The request contains malformed or mismatching credentials.", | |
| "tenant-id-mismatch": | |
| "The provided tenant ID does not match the Auth instance's tenant ID", | |
| timeout: "The operation has timed out.", | |
| "user-token-expired": | |
| "The user's credential is no longer valid. The user must sign in again.", | |
| "too-many-requests": | |
| "We have blocked all requests from this device due to unusual activity. Try again later.", | |
| "unauthorized-continue-uri": | |
| "The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.", | |
| "unsupported-persistence-type": | |
| "The current environment does not support the specified persistence type.", | |
| "unsupported-tenant-operation": | |
| "This operation is not supported in a multi-tenant context.", | |
| "user-cancelled": | |
| "The user did not grant your application the permissions it requested.", | |
| "user-not-found": | |
| "There is no user record corresponding to this identifier. The user may have been deleted.", | |
| "user-disabled": | |
| "The user account has been disabled by an administrator.", | |
| "user-mismatch": | |
| "The supplied credentials do not correspond to the previously signed in user.", | |
| "user-signed-out": "", | |
| "weak-password": "The password must be 6 characters long or more.", | |
| "web-storage-unsupported": | |
| "This browser is not supported or 3rd party cookies and data may be disabled.", | |
| }, | |
| bl = "apiKey", | |
| cl = "oobCode", | |
| qm = "continueUrl", | |
| rm = "languageCode", | |
| dl = "mode", | |
| sm = "tenantId", | |
| pm = { | |
| recoverEmail: "RECOVER_EMAIL", | |
| resetPassword: "PASSWORD_RESET", | |
| signIn: yj, | |
| verifyEmail: "VERIFY_EMAIL", | |
| }, | |
| el = "android", | |
| kl = "dynamicLinkDomain", | |
| Zj = "handleCodeInApp", | |
| il = "iOS", | |
| tm = "url", | |
| gl = "installApp", | |
| hl = "minimumVersion", | |
| fl = "packageName", | |
| jl = "bundleId", | |
| Aj = null, | |
| zj = null; | |
| hd.prototype.R = function () { | |
| return this.c; | |
| }; | |
| hd.prototype.g = function () { | |
| return this.b; | |
| }; | |
| var bk = { | |
| bd: { | |
| cb: "https://www.googleapis.com/identitytoolkit/v3/relyingparty/", | |
| ib: "https://securetoken.googleapis.com/v1/token", | |
| id: "p", | |
| }, | |
| dd: { | |
| cb: | |
| "https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/", | |
| ib: "https://staging-securetoken.sandbox.googleapis.com/v1/token", | |
| id: "s", | |
| }, | |
| ed: { | |
| cb: | |
| "https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/", | |
| ib: "https://test-securetoken.sandbox.googleapis.com/v1/token", | |
| id: "t", | |
| }, | |
| }; | |
| var Gj = R("__EID__") ? "__EID__" : void 0; | |
| var ml = "oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split( | |
| " " | |
| ), | |
| Bj = ["client_id", "response_type", "scope", "redirect_uri", "state"], | |
| ck = { | |
| Xc: { Ea: "locale", sa: 700, ra: 600, Fa: "facebook.com", Qa: Bj }, | |
| Zc: { Ea: null, sa: 500, ra: 750, Fa: "github.com", Qa: Bj }, | |
| $c: { Ea: "hl", sa: 515, ra: 680, Fa: "google.com", Qa: Bj }, | |
| fd: { Ea: "lang", sa: 485, ra: 705, Fa: "twitter.com", Qa: ml }, | |
| Vc: { Ea: "locale", sa: 600, ra: 600, Fa: "apple.com", Qa: [] }, | |
| }, | |
| dk = "idToken", | |
| ll = "providerId"; | |
| v(pd, Fe); | |
| v(Ge, pd); | |
| v(He, pd); | |
| v(ke, pd); | |
| v(rf, pd); | |
| id.prototype.na = function (a) { | |
| return af(a, sf(this)); | |
| }; | |
| id.prototype.b = function (a, b) { | |
| var p = sf(this); | |
| p.idToken = b; | |
| return we(a, p); | |
| }; | |
| id.prototype.f = function (a, b) { | |
| return le(hg(a, sf(this)), b); | |
| }; | |
| id.prototype.A = function () { | |
| return { | |
| providerId: this.providerId, | |
| signInMethod: this.signInMethod, | |
| pendingToken: this.a, | |
| }; | |
| }; | |
| Sc.prototype.na = function (a) { | |
| return af(a, Vd(this)); | |
| }; | |
| Sc.prototype.b = function (a, b) { | |
| var p = Vd(this); | |
| p.idToken = b; | |
| return we(a, p); | |
| }; | |
| Sc.prototype.f = function (a, b) { | |
| var p = Vd(this); | |
| return le(hg(a, p), b); | |
| }; | |
| Sc.prototype.A = function () { | |
| var a = { providerId: this.providerId, signInMethod: this.signInMethod }; | |
| this.idToken && (a.oauthIdToken = this.idToken); | |
| this.accessToken && (a.oauthAccessToken = this.accessToken); | |
| this.secret && (a.oauthTokenSecret = this.secret); | |
| this.nonce && (a.nonce = this.nonce); | |
| this.a && (a.pendingToken = this.a); | |
| return a; | |
| }; | |
| tf.prototype.Ga = function (a) { | |
| this.zb = U(a); | |
| return this; | |
| }; | |
| v(Lf, tf); | |
| v(Jc, tf); | |
| Jc.prototype.ya = function (a) { | |
| F(this.a, a) || this.a.push(a); | |
| return this; | |
| }; | |
| Jc.prototype.Hb = function () { | |
| return N(this.a); | |
| }; | |
| Jc.prototype.credential = function (a, b) { | |
| var p; | |
| l(a) | |
| ? (p = { | |
| idToken: a.idToken || null, | |
| accessToken: a.accessToken || null, | |
| nonce: a.rawNonce || null, | |
| }) | |
| : (p = { idToken: a || null, accessToken: b || null }); | |
| if (!p.idToken && !p.accessToken) | |
| throw new da( | |
| "argument-error", | |
| "credential failed: must provide the ID token and/or the access token." | |
| ); | |
| return new Sc(this.providerId, p, this.providerId); | |
| }; | |
| v(Te, Jc); | |
| Oa(Te, "PROVIDER_ID", "facebook.com"); | |
| Oa(Te, "FACEBOOK_SIGN_IN_METHOD", "facebook.com"); | |
| v(Uc, Jc); | |
| Oa(Uc, "PROVIDER_ID", "github.com"); | |
| Oa(Uc, "GITHUB_SIGN_IN_METHOD", "github.com"); | |
| v(de, Jc); | |
| Oa(de, "PROVIDER_ID", "google.com"); | |
| Oa(de, "GOOGLE_SIGN_IN_METHOD", "google.com"); | |
| v(te, tf); | |
| Oa(te, "PROVIDER_ID", "twitter.com"); | |
| Oa(te, "TWITTER_SIGN_IN_METHOD", "twitter.com"); | |
| Nd.prototype.na = function (a) { | |
| return this.signInMethod == sd.EMAIL_LINK_SIGN_IN_METHOD | |
| ? Ra(a, mn, { email: this.a, oobCode: this.c }) | |
| : Ra(a, Gl, { email: this.a, password: this.c }); | |
| }; | |
| Nd.prototype.b = function (a, b) { | |
| return this.signInMethod == sd.EMAIL_LINK_SIGN_IN_METHOD | |
| ? Ra(a, nn, { idToken: b, email: this.a, oobCode: this.c }) | |
| : Ra(a, Hl, { idToken: b, email: this.a, password: this.c }); | |
| }; | |
| Nd.prototype.f = function (a, b) { | |
| return le(this.na(a), b); | |
| }; | |
| Nd.prototype.A = function () { | |
| return { | |
| email: this.a, | |
| password: this.c, | |
| signInMethod: this.signInMethod, | |
| }; | |
| }; | |
| wd(sd, { PROVIDER_ID: "password" }); | |
| wd(sd, { EMAIL_LINK_SIGN_IN_METHOD: "emailLink" }); | |
| wd(sd, { EMAIL_PASSWORD_SIGN_IN_METHOD: "password" }); | |
| Ue.prototype.na = function (a) { | |
| return a.Wa(oc(this)); | |
| }; | |
| Ue.prototype.b = function (a, b) { | |
| var p = oc(this); | |
| p.idToken = b; | |
| return Ra(a, on, p); | |
| }; | |
| Ue.prototype.f = function (a, b) { | |
| var p = oc(this); | |
| p.operation = "REAUTH"; | |
| a = Ra(a, pn, p); | |
| return le(a, b); | |
| }; | |
| Ue.prototype.A = function () { | |
| var a = { providerId: "phone" }; | |
| this.a.Va && (a.verificationId = this.a.Va); | |
| this.a.Ua && (a.verificationCode = this.a.Ua); | |
| this.a.Ha && (a.temporaryProof = this.a.Ha); | |
| this.a.ba && (a.phoneNumber = this.a.ba); | |
| return a; | |
| }; | |
| Td.prototype.Wa = function (a, b) { | |
| var p = this.a.b; | |
| return Da(b.verify()).then(function (c) { | |
| if (!q(c)) | |
| throw new da( | |
| "argument-error", | |
| "An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string." | |
| ); | |
| switch (b.type) { | |
| case "recaptcha": | |
| return Wg(p, { phoneNumber: a, recaptchaToken: c }).then( | |
| function (a) { | |
| "function" === typeof b.reset && b.reset(); | |
| return a; | |
| }, | |
| function (a) { | |
| "function" === typeof b.reset && b.reset(); | |
| throw a; | |
| } | |
| ); | |
| default: | |
| throw new da( | |
| "argument-error", | |
| 'Only firebase.auth.ApplicationVerifiers with type\x3d"recaptcha" are currently supported.' | |
| ); | |
| } | |
| }); | |
| }; | |
| wd(Td, { PROVIDER_ID: "phone" }); | |
| wd(Td, { PHONE_SIGN_IN_METHOD: "phone" }); | |
| wf.prototype.getUid = function () { | |
| var a = []; | |
| a.push(this.c); | |
| this.b && a.push(this.b); | |
| this.f && a.push(this.f); | |
| this.h && a.push(this.h); | |
| return a.join("-"); | |
| }; | |
| wf.prototype.R = function () { | |
| return this.h; | |
| }; | |
| wf.prototype.A = function () { | |
| return { | |
| type: this.c, | |
| eventId: this.b, | |
| urlResponse: this.g, | |
| sessionId: this.f, | |
| postBody: this.i, | |
| tenantId: this.h, | |
| error: this.a && this.a.A(), | |
| }; | |
| }; | |
| var ek = null; | |
| v(Ve, da); | |
| v(ee, da); | |
| ee.prototype.A = function () { | |
| var a = { code: this.code, message: this.message }; | |
| this.email && (a.email = this.email); | |
| this.phoneNumber && (a.phoneNumber = this.phoneNumber); | |
| this.tenantId && (a.tenantId = this.tenantId); | |
| var b = this.credential && this.credential.A(); | |
| b && Y(a, b); | |
| return a; | |
| }; | |
| ee.prototype.toJSON = function () { | |
| return this.A(); | |
| }; | |
| zf.prototype.c = null; | |
| v(hf, zf); | |
| hf.prototype.a = function () { | |
| var a = Pg(this); | |
| return a ? new ActiveXObject(a) : new XMLHttpRequest(); | |
| }; | |
| hf.prototype.b = function () { | |
| var a = {}; | |
| Pg(this) && ((a[0] = !0), (a[1] = !0)); | |
| return a; | |
| }; | |
| var ol = new hf(); | |
| v(Bg, zf); | |
| Bg.prototype.a = function () { | |
| var a = new XMLHttpRequest(); | |
| if ("withCredentials" in a) return a; | |
| if ("undefined" != typeof XDomainRequest) return new fi(); | |
| throw Error("Unsupported browser"); | |
| }; | |
| Bg.prototype.b = function () { | |
| return {}; | |
| }; | |
| W = fi.prototype; | |
| W.open = function (a, b, p) { | |
| if (null != p && !p) throw Error("Only async requests are supported."); | |
| this.a.open(a, b); | |
| }; | |
| W.send = function (a) { | |
| if (a) | |
| if ("string" == typeof a) this.a.send(a); | |
| else throw Error("Only string data is supported"); | |
| else this.a.send(); | |
| }; | |
| W.abort = function () { | |
| this.a.abort(); | |
| }; | |
| W.setRequestHeader = function () {}; | |
| W.getResponseHeader = function (a) { | |
| return "content-type" == a.toLowerCase() ? this.a.contentType : ""; | |
| }; | |
| W.fc = function () { | |
| this.status = 200; | |
| this.response = this.responseText = this.a.responseText; | |
| Cg(this, 4); | |
| }; | |
| W.Ib = function () { | |
| this.status = 500; | |
| this.response = this.responseText = ""; | |
| Cg(this, 4); | |
| }; | |
| W.kc = function () { | |
| this.Ib(); | |
| }; | |
| W.gc = function () { | |
| this.status = 200; | |
| Cg(this, 1); | |
| }; | |
| W.getAllResponseHeaders = function () { | |
| return "content-type: " + this.a.contentType; | |
| }; | |
| fe.prototype.a = null; | |
| var qn = 0; | |
| fe.prototype.reset = function (a, b, p, c, e) { | |
| "number" == typeof e || qn++; | |
| c || Yh(); | |
| delete this.a; | |
| }; | |
| We.prototype.toString = function () { | |
| return this.name; | |
| }; | |
| var pl = new We("SEVERE", 1e3), | |
| xk = new We("WARNING", 900), | |
| um = new We("CONFIG", 700), | |
| vm = new We("FINE", 500); | |
| me.prototype.log = function (a, b, p) { | |
| if (a.value >= jf(this).value) | |
| for ( | |
| e(b) && (b = b()), | |
| a = new fe(a, String(b), this.f), | |
| p && (a.a = p), | |
| p = this; | |
| p; | |
| ) | |
| p = p.a; | |
| }; | |
| var fk = {}, | |
| Cj = null; | |
| v(ze, zf); | |
| ze.prototype.a = function () { | |
| return new Jd(this.f); | |
| }; | |
| ze.prototype.b = (function (a) { | |
| return function () { | |
| return a; | |
| }; | |
| })({}); | |
| v(Jd, $a); | |
| var gk = 0; | |
| W = Jd.prototype; | |
| W.open = function (a, b) { | |
| if (this.readyState != gk) | |
| throw (this.abort(), Error("Error reopening a connection")); | |
| this.m = a; | |
| this.g = b; | |
| this.readyState = 1; | |
| mf(this); | |
| }; | |
| W.send = function (a) { | |
| if (1 != this.readyState) | |
| throw (this.abort(), Error("need to call open() first. ")); | |
| this.a = !0; | |
| var b = { | |
| headers: this.i, | |
| method: this.m, | |
| credentials: void 0, | |
| cache: void 0, | |
| }; | |
| a && (b.body = a); | |
| this.o | |
| .fetch(new Request(this.g, b)) | |
| .then(this.jc.bind(this), this.Oa.bind(this)); | |
| }; | |
| W.abort = function () { | |
| this.response = this.responseText = ""; | |
| this.i = new Headers(); | |
| this.status = 0; | |
| this.c && this.c.cancel("Request was aborted."); | |
| 1 <= this.readyState && | |
| this.a && | |
| 4 != this.readyState && | |
| ((this.a = !1), Cf(this, !1)); | |
| this.readyState = gk; | |
| }; | |
| W.jc = function (a) { | |
| this.a && | |
| ((this.f = a), | |
| this.b || ((this.b = a.headers), (this.readyState = 2), mf(this)), | |
| this.a && | |
| ((this.readyState = 3), | |
| mf(this), | |
| this.a && | |
| ("arraybuffer" === this.responseType | |
| ? a.arrayBuffer().then(this.hc.bind(this), this.Oa.bind(this)) | |
| : "undefined" !== typeof sa.ReadableStream && "body" in a | |
| ? ((this.response = this.responseText = ""), | |
| (this.c = a.body.getReader()), | |
| (this.l = new TextDecoder()), | |
| jd(this)) | |
| : a.text().then(this.ic.bind(this), this.Oa.bind(this))))); | |
| }; | |
| W.ec = function (a) { | |
| if (this.a) { | |
| var b = this.l.decode(a.value ? a.value : new Uint8Array(0), { | |
| stream: !a.done, | |
| }); | |
| b && (this.response = this.responseText += b); | |
| a.done ? Cf(this, !0) : mf(this); | |
| 3 == this.readyState && jd(this); | |
| } | |
| }; | |
| W.ic = function (a) { | |
| this.a && ((this.response = this.responseText = a), Cf(this, !0)); | |
| }; | |
| W.hc = function (a) { | |
| this.a && ((this.response = a), Cf(this, !0)); | |
| }; | |
| W.Oa = function (a) { | |
| var b = this.h; | |
| b && | |
| b.log( | |
| xk, | |
| "Failed to fetch url " + this.g, | |
| a instanceof Error ? a : Error(a) | |
| ); | |
| this.a && Cf(this, !0); | |
| }; | |
| W.setRequestHeader = function (a, b) { | |
| this.i.append(a, b); | |
| }; | |
| W.getResponseHeader = function (a) { | |
| return this.b | |
| ? this.b.get(a.toLowerCase()) || "" | |
| : ((a = this.h) && | |
| a.log( | |
| xk, | |
| "Attempting to get response header but no headers have been received for url: " + | |
| this.g, | |
| void 0 | |
| ), | |
| ""); | |
| }; | |
| W.getAllResponseHeaders = function () { | |
| if (!this.b) { | |
| var a = this.h; | |
| a && | |
| a.log( | |
| xk, | |
| "Attempting to get all response headers but no headers have been received for url: " + | |
| this.g, | |
| void 0 | |
| ); | |
| return ""; | |
| } | |
| a = []; | |
| for (var b = this.b.entries(), p = b.next(); !p.done; ) | |
| (p = p.value), a.push(p[0] + ": " + p[1]), (p = b.next()); | |
| return a.join("\r\n"); | |
| }; | |
| v(Ie, $a); | |
| var nl = ""; | |
| Ie.prototype.b = ue("goog.net.XhrIo"); | |
| var xm = /^https?$/i, | |
| wm = ["POST", "PUT"]; | |
| W = Ie.prototype; | |
| W.Ia = function () { | |
| "undefined" != typeof hk && | |
| this.a && | |
| ((this.h = "Timed out after " + this.g + "ms, aborting"), | |
| ve(this.b, xe(this, this.h)), | |
| this.dispatchEvent("timeout"), | |
| this.abort(8)); | |
| }; | |
| W.abort = function () { | |
| this.a && | |
| this.c && | |
| (ve(this.b, xe(this, "Aborting")), | |
| (this.c = !1), | |
| (this.f = !0), | |
| this.a.abort(), | |
| (this.f = !1), | |
| this.dispatchEvent("complete"), | |
| this.dispatchEvent("abort"), | |
| nf(this)); | |
| }; | |
| W.za = function () { | |
| this.a && | |
| (this.c && | |
| ((this.c = !1), (this.f = !0), this.a.abort(), (this.f = !1)), | |
| nf(this, !0)); | |
| Ie.qb.za.call(this); | |
| }; | |
| W.Lb = function () { | |
| this.va || (this.J || this.i || this.f ? Ug(this) : this.yc()); | |
| }; | |
| W.yc = function () { | |
| Ug(this); | |
| }; | |
| W.getResponse = function () { | |
| try { | |
| if (!this.a) return null; | |
| if ("response" in this.a) return this.a.response; | |
| switch (this.m) { | |
| case nl: | |
| case "text": | |
| return this.a.responseText; | |
| case "arraybuffer": | |
| if ("mozResponseArrayBuffer" in this.a) | |
| return this.a.mozResponseArrayBuffer; | |
| } | |
| var a = this.b; | |
| a && | |
| a.log( | |
| pl, | |
| "Response type " + this.m + " is not supported on this browser", | |
| void 0 | |
| ); | |
| return null; | |
| } catch (Rf) { | |
| return ve(this.b, "Can not get response: " + Rf.message), null; | |
| } | |
| }; | |
| ag.prototype.cancel = function (a) { | |
| if (this.a) this.c instanceof ag && this.c.cancel(); | |
| else { | |
| if (this.b) { | |
| var b = this.b; | |
| delete this.b; | |
| a ? b.cancel(a) : (b.l--, 0 >= b.l && b.cancel()); | |
| } | |
| this.v ? this.v.call(this.o, this) : (this.u = !0); | |
| this.a || ((a = new Qg(this)), Je(this), Dg(this, !1, a)); | |
| } | |
| }; | |
| ag.prototype.m = function (a, b) { | |
| this.i = !1; | |
| Dg(this, a, b); | |
| }; | |
| ag.prototype.then = function (a, b, p) { | |
| var c, | |
| e, | |
| g = new ha(function (a, b) { | |
| c = a; | |
| e = b; | |
| }); | |
| Yd(this, c, function (a) { | |
| a instanceof Qg ? g.cancel() : e(a); | |
| }); | |
| return g.then(a, b, p); | |
| }; | |
| ag.prototype.$goog_Thenable = !0; | |
| v(oh, H); | |
| oh.prototype.message = "Deferred has already fired"; | |
| oh.prototype.name = "AlreadyCalledError"; | |
| v(Qg, H); | |
| Qg.prototype.message = "Deferred was canceled"; | |
| Qg.prototype.name = "CanceledError"; | |
| fh.prototype.c = function () { | |
| delete Dj[this.a]; | |
| throw this.b; | |
| }; | |
| var Dj = {}, | |
| Am = 0, | |
| zm = 1; | |
| v(ph, H); | |
| v(pc, zf); | |
| pc.prototype.a = function () { | |
| return new this.f(); | |
| }; | |
| pc.prototype.b = function () { | |
| return {}; | |
| }; | |
| var ik, | |
| mh = "idToken", | |
| Bm = new Id(3e4, 6e4), | |
| Cm = { "Content-Type": "application/x-www-form-urlencoded" }, | |
| Dm = new Id(3e4, 6e4), | |
| Em = { "Content-Type": "application/json" }; | |
| Wc.prototype.R = function () { | |
| return this.b; | |
| }; | |
| Wc.prototype.o = function (a, b, p, c, e, g) { | |
| if ( | |
| Kb() && | |
| ("undefined" === typeof sa.fetch || | |
| "undefined" === typeof sa.Headers || | |
| "undefined" === typeof sa.Request) | |
| ) | |
| throw new da( | |
| "operation-not-supported-in-this-environment", | |
| "fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment." | |
| ); | |
| var d = new Ie(this.f); | |
| if (g) { | |
| d.g = Math.max(0, g); | |
| var l = setTimeout(function () { | |
| d.dispatchEvent("timeout"); | |
| }, g); | |
| } | |
| Pb(d, "complete", function () { | |
| l && clearTimeout(l); | |
| var a = null; | |
| try { | |
| a = JSON.parse(qi(this)) || null; | |
| } catch (zi) { | |
| a = null; | |
| } | |
| b && b(a); | |
| }); | |
| xb(d, "ready", function () { | |
| l && clearTimeout(l); | |
| Wb(this); | |
| }); | |
| xb(d, "timeout", function () { | |
| l && clearTimeout(l); | |
| Wb(this); | |
| b && b(null); | |
| }); | |
| bg(d, a, p, c, e); | |
| }; | |
| var Fm = new ca( | |
| mj, | |
| "https://apis.google.com/js/client.js?onload\x3d%{onload}" | |
| ), | |
| ql = "__fcb" + Math.floor(1e6 * Math.random()).toString(); | |
| Wc.prototype.m = function (a, b, p, c, e) { | |
| var g = this; | |
| ik.then(function () { | |
| window.gapi.client.setApiKey(g.c); | |
| var d = window.gapi.auth.getToken(); | |
| window.gapi.auth.setToken(null); | |
| window.gapi.client.request({ | |
| path: a, | |
| method: p, | |
| body: c, | |
| headers: e, | |
| authType: "none", | |
| callback: function (a) { | |
| window.gapi.auth.setToken(d); | |
| b && b(a); | |
| }, | |
| }); | |
| }).s(function (a) { | |
| b && b({ error: { message: (a && a.message) || "CORS_UNSUPPORTED" } }); | |
| }); | |
| }; | |
| Wc.prototype.ob = function () { | |
| return Ra(this, rn, {}); | |
| }; | |
| Wc.prototype.rb = function (a, b) { | |
| return Ra(this, Il, { idToken: a, email: b }); | |
| }; | |
| Wc.prototype.sb = function (a, b) { | |
| return Ra(this, Hl, { idToken: a, password: b }); | |
| }; | |
| var sn = { displayName: "DISPLAY_NAME", photoUrl: "PHOTO_URL" }; | |
| W = Wc.prototype; | |
| W.tb = function (a, b) { | |
| var p = { idToken: a }, | |
| c = []; | |
| B(sn, function (a, e) { | |
| var g = b[e]; | |
| null === g ? c.push(a) : e in b && (p[e] = g); | |
| }); | |
| c.length && (p.deleteAttribute = c); | |
| return Ra(this, Il, p); | |
| }; | |
| W.kb = function (a, b) { | |
| a = { requestType: "PASSWORD_RESET", email: a }; | |
| Y(a, b); | |
| return Ra(this, tn, a); | |
| }; | |
| W.lb = function (a, b) { | |
| a = { requestType: "EMAIL_SIGNIN", email: a }; | |
| Y(a, b); | |
| return Ra(this, un, a); | |
| }; | |
| W.jb = function (a, b) { | |
| a = { requestType: "VERIFY_EMAIL", idToken: a }; | |
| Y(a, b); | |
| return Ra(this, vn, a); | |
| }; | |
| W.Wa = function (a) { | |
| return Ra(this, wn, a); | |
| }; | |
| W.ab = function (a, b) { | |
| return Ra(this, xn, { oobCode: a, newPassword: b }); | |
| }; | |
| W.Ma = function (a) { | |
| return Ra(this, yn, { oobCode: a }); | |
| }; | |
| W.Ya = function (a) { | |
| return Ra(this, zn, { oobCode: a }); | |
| }; | |
| var zn = { endpoint: "setAccountInfo", D: ye, fa: "email", F: !0 }, | |
| yn = { | |
| endpoint: "resetPassword", | |
| D: ye, | |
| K: function (a) { | |
| var b = a.requestType; | |
| if (!b || (!a.email && "EMAIL_SIGNIN" != b)) | |
| throw new da("internal-error"); | |
| }, | |
| F: !0, | |
| }, | |
| An = { | |
| endpoint: "signupNewUser", | |
| D: function (a) { | |
| Sf(a); | |
| if (!a.password) throw new da("weak-password"); | |
| }, | |
| K: Zc, | |
| T: !0, | |
| F: !0, | |
| }, | |
| Hm = { endpoint: "createAuthUri", F: !0 }, | |
| Bn = { endpoint: "deleteAccount", V: ["idToken"] }, | |
| Km = { | |
| endpoint: "setAccountInfo", | |
| V: ["idToken", "deleteProvider"], | |
| D: function (a) { | |
| if (!n(a.deleteProvider)) throw new da("internal-error"); | |
| }, | |
| }, | |
| mn = { | |
| endpoint: "emailLinkSignin", | |
| V: ["email", "oobCode"], | |
| D: Sf, | |
| K: Zc, | |
| T: !0, | |
| F: !0, | |
| }, | |
| nn = { | |
| endpoint: "emailLinkSignin", | |
| V: ["idToken", "email", "oobCode"], | |
| D: Sf, | |
| K: Zc, | |
| T: !0, | |
| }, | |
| Zm = { endpoint: "getAccountInfo" }, | |
| un = { | |
| endpoint: "getOobConfirmationCode", | |
| V: ["requestType"], | |
| D: function (a) { | |
| if ("EMAIL_SIGNIN" != a.requestType) throw new da("internal-error"); | |
| Sf(a); | |
| }, | |
| fa: "email", | |
| F: !0, | |
| }, | |
| vn = { | |
| endpoint: "getOobConfirmationCode", | |
| V: ["idToken", "requestType"], | |
| D: function (a) { | |
| if ("VERIFY_EMAIL" != a.requestType) throw new da("internal-error"); | |
| }, | |
| fa: "email", | |
| F: !0, | |
| }, | |
| tn = { | |
| endpoint: "getOobConfirmationCode", | |
| V: ["requestType"], | |
| D: function (a) { | |
| if ("PASSWORD_RESET" != a.requestType) throw new da("internal-error"); | |
| Sf(a); | |
| }, | |
| fa: "email", | |
| F: !0, | |
| }, | |
| Im = { wb: !0, endpoint: "getProjectConfig", Kb: "GET" }, | |
| Cn = { | |
| wb: !0, | |
| endpoint: "getRecaptchaParam", | |
| Kb: "GET", | |
| K: function (a) { | |
| if (!a.recaptchaSiteKey) throw new da("internal-error"); | |
| }, | |
| }, | |
| xn = { endpoint: "resetPassword", D: ye, fa: "email", F: !0 }, | |
| Jm = { | |
| endpoint: "sendVerificationCode", | |
| V: ["phoneNumber", "recaptchaToken"], | |
| fa: "sessionInfo", | |
| F: !0, | |
| }, | |
| Il = { endpoint: "setAccountInfo", V: ["idToken"], D: kf, T: !0 }, | |
| Hl = { | |
| endpoint: "setAccountInfo", | |
| V: ["idToken"], | |
| D: function (a) { | |
| kf(a); | |
| if (!a.password) throw new da("weak-password"); | |
| }, | |
| K: Zc, | |
| T: !0, | |
| }, | |
| rn = { endpoint: "signupNewUser", K: Zc, T: !0, F: !0 }, | |
| Lm = { endpoint: "verifyAssertion", D: wg, Ra: Xd, K: ng, T: !0, F: !0 }, | |
| Nm = { | |
| endpoint: "verifyAssertion", | |
| D: wg, | |
| Ra: Xd, | |
| K: function (a) { | |
| if (a.errorMessage && "USER_NOT_FOUND" == a.errorMessage) | |
| throw new da("user-not-found"); | |
| if (a.errorMessage) throw Bc(a.errorMessage); | |
| if (!a[mh]) throw new da("internal-error"); | |
| }, | |
| T: !0, | |
| F: !0, | |
| }, | |
| Mm = { | |
| endpoint: "verifyAssertion", | |
| D: function (a) { | |
| wg(a); | |
| if (!a.idToken) throw new da("internal-error"); | |
| }, | |
| Ra: Xd, | |
| K: ng, | |
| T: !0, | |
| }, | |
| Dn = { | |
| endpoint: "verifyCustomToken", | |
| D: function (a) { | |
| if (!a.token) throw new da("invalid-custom-token"); | |
| }, | |
| K: Zc, | |
| T: !0, | |
| F: !0, | |
| }, | |
| Gl = { | |
| endpoint: "verifyPassword", | |
| D: function (a) { | |
| Sf(a); | |
| if (!a.password) throw new da("wrong-password"); | |
| }, | |
| K: Zc, | |
| T: !0, | |
| F: !0, | |
| }, | |
| wn = { endpoint: "verifyPhoneNumber", D: mc, K: Zc, F: !0 }, | |
| on = { | |
| endpoint: "verifyPhoneNumber", | |
| D: function (a) { | |
| if (!a.idToken) throw new da("internal-error"); | |
| mc(a); | |
| }, | |
| K: function (a) { | |
| if (a.temporaryProof) | |
| throw ((a.code = "credential-already-in-use"), Pd(a)); | |
| Zc(a); | |
| }, | |
| }, | |
| pn = { | |
| Yb: { USER_NOT_FOUND: "user-not-found" }, | |
| endpoint: "verifyPhoneNumber", | |
| D: mc, | |
| K: Zc, | |
| F: !0, | |
| }, | |
| Qm = new ca(mj, "https://apis.google.com/js/api.js?onload\x3d%{onload}"), | |
| Pm = new Id(3e4, 6e4), | |
| Om = new Id(5e3, 15e3), | |
| Ej = null; | |
| xg.prototype.toString = function () { | |
| this.f ? sb(this.a, "v", this.f) : Pa(this.a.a, "v"); | |
| this.b ? sb(this.a, "eid", this.b) : Pa(this.a.a, "eid"); | |
| this.c.length ? sb(this.a, "fw", this.c.join(",")) : Pa(this.a.a, "fw"); | |
| return this.a.toString(); | |
| }; | |
| of.prototype.nb = function (a) { | |
| this.h = a; | |
| return this; | |
| }; | |
| of.prototype.toString = function () { | |
| var a = ob(this.o, "/__/auth/handler"); | |
| sb(a, "apiKey", this.m); | |
| sb(a, "appName", this.c); | |
| sb(a, "authType", this.u); | |
| if (this.a.isOAuthProvider) { | |
| var b = this.a; | |
| try { | |
| var p = uc.app(this.c).auth().ha(); | |
| } catch (aj) { | |
| p = null; | |
| } | |
| b.bb = p; | |
| sb(a, "providerId", this.a.providerId); | |
| b = this.a; | |
| p = Hd(b.zb); | |
| for (var c in p) p[c] = p[c].toString(); | |
| c = b.Fc; | |
| p = U(p); | |
| for (var e = 0; e < c.length; e++) { | |
| var g = c[e]; | |
| g in p && delete p[g]; | |
| } | |
| b.eb && b.bb && !p[b.eb] && (p[b.eb] = b.bb); | |
| V(p) || sb(a, "customParameters", Rc(p)); | |
| } | |
| "function" === typeof this.a.Hb && | |
| ((b = this.a.Hb()), b.length && sb(a, "scopes", b.join(","))); | |
| this.l ? sb(a, "redirectUrl", this.l) : Pa(a.a, "redirectUrl"); | |
| this.g ? sb(a, "eventId", this.g) : Pa(a.a, "eventId"); | |
| this.i ? sb(a, "v", this.i) : Pa(a.a, "v"); | |
| if (this.b) | |
| for (var d in this.b) | |
| this.b.hasOwnProperty(d) && !ac(a, d) && sb(a, d, this.b[d]); | |
| this.h ? sb(a, "tid", this.h) : Pa(a.a, "tid"); | |
| this.f ? sb(a, "eid", this.f) : Pa(a.a, "eid"); | |
| d = Tf(this.c); | |
| d.length && sb(a, "fw", d.join(",")); | |
| return a.toString(); | |
| }; | |
| W = Xg.prototype; | |
| W.Fb = function (a, b, p) { | |
| var c = new da("popup-closed-by-user"), | |
| e = new da("web-storage-unsupported"), | |
| g = this, | |
| d = !1; | |
| return this.ia() | |
| .then(function () { | |
| Jh(g).then(function (p) { | |
| p || (a && bd(a), b(e), (d = !0)); | |
| }); | |
| }) | |
| .s(function () {}) | |
| .then(function () { | |
| if (!d) return Wa(a); | |
| }) | |
| .then(function () { | |
| if (!d) | |
| return Ad(p).then(function () { | |
| b(c); | |
| }); | |
| }); | |
| }; | |
| W.Ob = function () { | |
| var a = zc(); | |
| return !Dd(a) && !ae(a); | |
| }; | |
| W.Jb = function () { | |
| return !1; | |
| }; | |
| W.Db = function (a, b, p, c, e, g, d, l) { | |
| if (!a) return na(new da("popup-blocked")); | |
| if (d && !Dd()) | |
| return ( | |
| this.ia().s(function (b) { | |
| bd(a); | |
| e(b); | |
| }), | |
| c(), | |
| Da() | |
| ); | |
| this.a || (this.a = Zd(Zh(this))); | |
| var h = this; | |
| return this.a | |
| .then(function () { | |
| var b = h.ia().s(function (b) { | |
| bd(a); | |
| e(b); | |
| throw b; | |
| }); | |
| c(); | |
| return b; | |
| }) | |
| .then(function () { | |
| vf(p); | |
| if (!d) { | |
| var c = $c(h.u, h.f, h.b, b, p, null, g, h.c, void 0, h.h, l); | |
| ub(c, a); | |
| } | |
| }) | |
| .s(function (a) { | |
| "auth/network-request-failed" == a.code && (h.a = null); | |
| throw a; | |
| }); | |
| }; | |
| W.Eb = function (a, b, p, c) { | |
| this.a || (this.a = Zd(Zh(this))); | |
| var e = this; | |
| return this.a | |
| .then(function () { | |
| vf(b); | |
| var g = $c(e.u, e.f, e.b, a, b, eb(), p, e.c, void 0, e.h, c); | |
| ub(g); | |
| }) | |
| .s(function (a) { | |
| "auth/network-request-failed" == a.code && (e.a = null); | |
| throw a; | |
| }); | |
| }; | |
| W.ia = function () { | |
| var a = this; | |
| return Ih(this) | |
| .then(function () { | |
| return a.i.gb; | |
| }) | |
| .s(function () { | |
| a.a = null; | |
| throw new da("network-request-failed"); | |
| }); | |
| }; | |
| W.Rb = function () { | |
| return !0; | |
| }; | |
| W.Aa = function (a) { | |
| this.g.push(a); | |
| }; | |
| W.Na = function (a) { | |
| J(this.g, function (b) { | |
| return b == a; | |
| }); | |
| }; | |
| W = pf.prototype; | |
| W.get = function (a) { | |
| return Da(this.a.getItem(a)).then(function (a) { | |
| return a && vd(a); | |
| }); | |
| }; | |
| W.set = function (a, b) { | |
| return Da(this.a.setItem(a, Rc(b))); | |
| }; | |
| W.S = function (a) { | |
| return Da(this.a.removeItem(a)); | |
| }; | |
| W.$ = function () {}; | |
| W.ea = function () {}; | |
| var rl = []; | |
| Vf.prototype.c = function (a) { | |
| var b = a.data.eventType, | |
| p = a.data.eventId, | |
| c = this.a[b]; | |
| if (c && 0 < c.length) { | |
| a.ports[0].postMessage({ | |
| status: "ack", | |
| eventId: p, | |
| eventType: b, | |
| response: null, | |
| }); | |
| var e = []; | |
| Ye(c, function (b) { | |
| e.push( | |
| Da().then(function () { | |
| return b(a.origin, a.data.data); | |
| }) | |
| ); | |
| }); | |
| wa(e).then(function (c) { | |
| var e = []; | |
| Ye(c, function (a) { | |
| e.push({ | |
| fulfilled: a.Gb, | |
| value: a.value, | |
| reason: a.reason ? a.reason.message : void 0, | |
| }); | |
| }); | |
| Ye(e, function (a) { | |
| for (var b in a) "undefined" === typeof a[b] && delete a[b]; | |
| }); | |
| a.ports[0].postMessage({ | |
| status: "done", | |
| eventId: p, | |
| eventType: b, | |
| response: e, | |
| }); | |
| }); | |
| } | |
| }; | |
| pg.prototype.postMessage = function (a, b) { | |
| this.a.postMessage(a, b); | |
| }; | |
| Ke.prototype.close = function () { | |
| for (; 0 < this.a.length; ) qg(this, this.a[0]); | |
| this.b = !0; | |
| }; | |
| var jk; | |
| W = hh.prototype; | |
| W.set = function (a, b) { | |
| var p = !1, | |
| c, | |
| e = this; | |
| return rg(this) | |
| .then(function (b) { | |
| c = b; | |
| b = sg(gb(c, !0)); | |
| return Xe(b.get(a)); | |
| }) | |
| .then(function (g) { | |
| var d = sg(gb(c, !0)); | |
| if (g) return (g.value = b), Xe(d.put(g)); | |
| e.b++; | |
| p = !0; | |
| g = {}; | |
| g.fbase_key = a; | |
| g.value = b; | |
| return Xe(d.add(g)); | |
| }) | |
| .then(function () { | |
| e.c[a] = b; | |
| return kh(e, a); | |
| }) | |
| .ka(function () { | |
| p && e.b--; | |
| }); | |
| }; | |
| W.get = function (a) { | |
| return rg(this) | |
| .then(function (b) { | |
| return Xe(sg(gb(b, !1)).get(a)); | |
| }) | |
| .then(function (a) { | |
| return a && a.value; | |
| }); | |
| }; | |
| W.S = function (a) { | |
| var b = !1, | |
| p = this; | |
| return rg(this) | |
| .then(function (c) { | |
| b = !0; | |
| p.b++; | |
| return Xe(sg(gb(c, !0))["delete"](a)); | |
| }) | |
| .then(function () { | |
| delete p.c[a]; | |
| return kh(p, a); | |
| }) | |
| .ka(function () { | |
| b && p.b--; | |
| }); | |
| }; | |
| W.$ = function (a) { | |
| 0 == this.a.length && Xh(this); | |
| this.a.push(a); | |
| }; | |
| W.ea = function (a) { | |
| J(this.a, function (b) { | |
| return b == a; | |
| }); | |
| 0 == this.a.length && gi(this); | |
| }; | |
| W = hi.prototype; | |
| W.get = function (a) { | |
| return this.b.then(function (b) { | |
| return b.get(a); | |
| }); | |
| }; | |
| W.set = function (a, b) { | |
| return this.b.then(function (p) { | |
| return p.set(a, b); | |
| }); | |
| }; | |
| W.S = function (a) { | |
| return this.b.then(function (b) { | |
| return b.S(a); | |
| }); | |
| }; | |
| W.$ = function (a) { | |
| this.a.push(a); | |
| }; | |
| W.ea = function (a) { | |
| J(this.a, function (b) { | |
| return b == a; | |
| }); | |
| }; | |
| W = Eg.prototype; | |
| W.get = function (a) { | |
| return Da(this.a[a]); | |
| }; | |
| W.set = function (a, b) { | |
| this.a[a] = b; | |
| return Da(); | |
| }; | |
| W.S = function (a) { | |
| delete this.a[a]; | |
| return Da(); | |
| }; | |
| W.$ = function () {}; | |
| W.ea = function () {}; | |
| W = Sg.prototype; | |
| W.get = function (a) { | |
| var b = this; | |
| return Da().then(function () { | |
| var p = b.a.getItem(a); | |
| return vd(p); | |
| }); | |
| }; | |
| W.set = function (a, b) { | |
| var p = this; | |
| return Da().then(function () { | |
| var c = Rc(b); | |
| null === c ? p.S(a) : p.a.setItem(a, c); | |
| }); | |
| }; | |
| W.S = function (a) { | |
| var b = this; | |
| return Da().then(function () { | |
| b.a.removeItem(a); | |
| }); | |
| }; | |
| W.$ = function (a) { | |
| sa.window && kc(sa.window, "storage", a); | |
| }; | |
| W.ea = function (a) { | |
| sa.window && yb(sa.window, "storage", a); | |
| }; | |
| W = td.prototype; | |
| W.get = function () { | |
| return Da(null); | |
| }; | |
| W.set = function () { | |
| return Da(); | |
| }; | |
| W.S = function () { | |
| return Da(); | |
| }; | |
| W.$ = function () {}; | |
| W.ea = function () {}; | |
| W = Hg.prototype; | |
| W.get = function (a) { | |
| var b = this; | |
| return Da().then(function () { | |
| var p = b.a.getItem(a); | |
| return vd(p); | |
| }); | |
| }; | |
| W.set = function (a, b) { | |
| var p = this; | |
| return Da().then(function () { | |
| var c = Rc(b); | |
| null === c ? p.S(a) : p.a.setItem(a, c); | |
| }); | |
| }; | |
| W.S = function (a) { | |
| var b = this; | |
| return Da().then(function () { | |
| b.a.removeItem(a); | |
| }); | |
| }; | |
| W.$ = function () {}; | |
| W.ea = function () {}; | |
| var kk, | |
| Sm = { C: Sg, Ta: Hg }, | |
| Tm = { C: Sg, Ta: Hg }, | |
| Um = { C: pf, Ta: td }, | |
| Vm = { C: Sg, Ta: td }, | |
| bj = { ad: "local", NONE: "none", cd: "session" }, | |
| lk; | |
| W = Df.prototype; | |
| W.get = function (a, b) { | |
| return yg(this, a.C).get(Le(a, b)); | |
| }; | |
| W.set = function (a, b, p) { | |
| var c = Le(a, p), | |
| e = this, | |
| g = yg(this, a.C); | |
| return g | |
| .set(c, b) | |
| .then(function () { | |
| return g.get(c); | |
| }) | |
| .then(function (b) { | |
| "local" == a.C && (e.b[c] = b); | |
| }); | |
| }; | |
| W.addListener = function (a, b, p) { | |
| a = Le(a, b); | |
| this.l && (this.b[a] = sa.localStorage.getItem(a)); | |
| V(this.a) && | |
| (yg(this, "local").$(this.f), | |
| this.h || ((Fb() || !gd()) && sa.indexedDB) || !this.l || ge(this)); | |
| this.a[a] || (this.a[a] = []); | |
| this.a[a].push(p); | |
| }; | |
| W.removeListener = function (a, b, p) { | |
| a = Le(a, b); | |
| this.a[a] && | |
| (J(this.a[a], function (a) { | |
| return a == p; | |
| }), | |
| 0 == this.a[a].length && delete this.a[a]); | |
| V(this.a) && (yg(this, "local").ea(this.f), Ef(this)); | |
| }; | |
| W.Pb = function (a) { | |
| if (a && a.f) { | |
| var b = a.a.key; | |
| if (null == b) | |
| for (var p in this.a) { | |
| var c = this.b[p]; | |
| "undefined" === typeof c && (c = null); | |
| var e = sa.localStorage.getItem(p); | |
| e !== c && ((this.b[p] = e), this.$a(p)); | |
| } | |
| else if (0 == b.indexOf("firebase:") && this.a[b]) { | |
| "undefined" !== typeof a.a.a | |
| ? yg(this, "local").ea(this.f) | |
| : Ef(this); | |
| if (this.m) | |
| if (((p = sa.localStorage.getItem(b)), (c = a.a.newValue), c !== p)) | |
| null !== c | |
| ? sa.localStorage.setItem(b, c) | |
| : sa.localStorage.removeItem(b); | |
| else if (this.b[b] === c && "undefined" === typeof a.a.a) return; | |
| var g = this; | |
| p = function () { | |
| if ( | |
| "undefined" !== typeof a.a.a || | |
| g.b[b] !== sa.localStorage.getItem(b) | |
| ) | |
| (g.b[b] = sa.localStorage.getItem(b)), g.$a(b); | |
| }; | |
| Ch && | |
| Ai && | |
| 10 == Ai && | |
| sa.localStorage.getItem(b) !== a.a.newValue && | |
| a.a.newValue !== a.a.oldValue | |
| ? setTimeout(p, 10) | |
| : p(); | |
| } | |
| } else Ye(a, y(this.$a, this)); | |
| }; | |
| W.$a = function (a) { | |
| this.a[a] && | |
| Ye(this.a[a], function (a) { | |
| a(); | |
| }); | |
| }; | |
| var mk = { name: "authEvent", C: "local" }, | |
| Fj; | |
| v(lg, function () { | |
| this.b = -1; | |
| }); | |
| for (var sl = 64, En = sl - 1, Jl = [], yk = 0; yk < En; yk++) Jl[yk] = 0; | |
| var ul = L(128, Jl); | |
| lg.prototype.reset = function () { | |
| this.g = this.c = 0; | |
| this.a = sa.Int32Array ? new Int32Array(this.h) : N(this.h); | |
| }; | |
| var tl = [ | |
| 1116352408, | |
| 1899447441, | |
| 3049323471, | |
| 3921009573, | |
| 961987163, | |
| 1508970993, | |
| 2453635748, | |
| 2870763221, | |
| 3624381080, | |
| 310598401, | |
| 607225278, | |
| 1426881987, | |
| 1925078388, | |
| 2162078206, | |
| 2614888103, | |
| 3248222580, | |
| 3835390401, | |
| 4022224774, | |
| 264347078, | |
| 604807628, | |
| 770255983, | |
| 1249150122, | |
| 1555081692, | |
| 1996064986, | |
| 2554220882, | |
| 2821834349, | |
| 2952996808, | |
| 3210313671, | |
| 3336571891, | |
| 3584528711, | |
| 113926993, | |
| 338241895, | |
| 666307205, | |
| 773529912, | |
| 1294757372, | |
| 1396182291, | |
| 1695183700, | |
| 1986661051, | |
| 2177026350, | |
| 2456956037, | |
| 2730485921, | |
| 2820302411, | |
| 3259730800, | |
| 3345764771, | |
| 3516065817, | |
| 3600352804, | |
| 4094571909, | |
| 275423344, | |
| 430227734, | |
| 506948616, | |
| 659060556, | |
| 883997877, | |
| 958139571, | |
| 1322822218, | |
| 1537002063, | |
| 1747873779, | |
| 1955562222, | |
| 2024104815, | |
| 2227730452, | |
| 2361852424, | |
| 2428436474, | |
| 2756734187, | |
| 3204031479, | |
| 3329325298, | |
| ]; | |
| v(Rd, lg); | |
| var Wm = [ | |
| 1779033703, | |
| 3144134277, | |
| 1013904242, | |
| 2773480762, | |
| 1359893119, | |
| 2600822924, | |
| 528734635, | |
| 1541459225, | |
| ]; | |
| W = tc.prototype; | |
| W.ia = function () { | |
| return this.Da | |
| ? this.Da | |
| : (this.Da = ie().then( | |
| function () { | |
| if ("function" !== typeof Sb("universalLinks.subscribe", sa)) | |
| throw Wf("cordova-universal-links-plugin-fix is not installed"); | |
| if ("undefined" === typeof Sb("BuildInfo.packageName", sa)) | |
| throw Wf("cordova-plugin-buildinfo is not installed"); | |
| if ( | |
| "function" !== | |
| typeof Sb("cordova.plugins.browsertab.openUrl", sa) | |
| ) | |
| throw Wf("cordova-plugin-browsertab is not installed"); | |
| if ("function" !== typeof Sb("cordova.InAppBrowser.open", sa)) | |
| throw Wf("cordova-plugin-inappbrowser is not installed"); | |
| }, | |
| function () { | |
| throw new da("cordova-not-ready"); | |
| } | |
| )); | |
| }; | |
| W.Fb = function (a, b) { | |
| b(new da("operation-not-supported-in-this-environment")); | |
| return Da(); | |
| }; | |
| W.Db = function () { | |
| return na(new da("operation-not-supported-in-this-environment")); | |
| }; | |
| W.Rb = function () { | |
| return !1; | |
| }; | |
| W.Ob = function () { | |
| return !0; | |
| }; | |
| W.Jb = function () { | |
| return !0; | |
| }; | |
| W.Eb = function (a, b, p, c) { | |
| if (this.c) return na(new da("redirect-operation-pending")); | |
| var e = this, | |
| g = sa.document, | |
| d = null, | |
| l = null, | |
| h = null, | |
| k = null; | |
| return (this.c = Da() | |
| .then(function () { | |
| vf(b); | |
| return se(e); | |
| }) | |
| .then(function () { | |
| return $f(e, a, b, p, c); | |
| }) | |
| .then(function () { | |
| return new ha(function (a, b) { | |
| l = function () { | |
| var b = Sb("cordova.plugins.browsertab.close", sa); | |
| a(); | |
| "function" === typeof b && b(); | |
| e.a && | |
| "function" === typeof e.a.close && | |
| (e.a.close(), (e.a = null)); | |
| return !1; | |
| }; | |
| e.Aa(l); | |
| h = function () { | |
| d || | |
| (d = Ad(2e3).then(function () { | |
| b(new da("redirect-cancelled-by-user")); | |
| })); | |
| }; | |
| k = function () { | |
| je() && h(); | |
| }; | |
| g.addEventListener("resume", h, !1); | |
| zc() | |
| .toLowerCase() | |
| .match(/android/) || | |
| g.addEventListener("visibilitychange", k, !1); | |
| }).s(function (a) { | |
| return Th(e).then(function () { | |
| throw a; | |
| }); | |
| }); | |
| }) | |
| .ka(function () { | |
| h && g.removeEventListener("resume", h, !1); | |
| k && g.removeEventListener("visibilitychange", k, !1); | |
| d && d.cancel(); | |
| l && e.Na(l); | |
| e.c = null; | |
| })); | |
| }; | |
| W.Aa = function (a) { | |
| this.b.push(a); | |
| se(this).s(function (b) { | |
| "auth/invalid-cordova-configuration" === b.code && | |
| ((b = new wf("unknown", null, null, null, new da("no-auth-event"))), | |
| a(b)); | |
| }); | |
| }; | |
| W.Na = function (a) { | |
| J(this.b, function (b) { | |
| return b == a; | |
| }); | |
| }; | |
| var nk = { name: "pendingRedirect", C: "session" }; | |
| Ld.prototype.reset = function () { | |
| this.f = !1; | |
| this.a.Na(this.l); | |
| this.a = Yg(this.B, this.u, this.m); | |
| this.i = {}; | |
| }; | |
| Ld.prototype.o = function (a) { | |
| if (!a) throw new da("invalid-auth-event"); | |
| 6e5 <= Yh() - this.v && ((this.i = {}), (this.v = 0)); | |
| if (a && a.getUid() && this.i.hasOwnProperty(a.getUid())) return !1; | |
| for (var b = !1, p = 0; p < this.h.length; p++) { | |
| var c = this.h[p]; | |
| if (c.xb(a.c, a.b)) { | |
| if ((b = this.c[a.c])) | |
| b.h(a, c), | |
| a && (a.f || a.b) && ((this.i[a.getUid()] = !0), (this.v = Yh())); | |
| b = !0; | |
| break; | |
| } | |
| } | |
| bc(this.b); | |
| return b; | |
| }; | |
| var Xm = new Id(2e3, 1e4), | |
| Ym = new Id(3e4, 6e4); | |
| Ld.prototype.oa = function () { | |
| return this.b.oa(); | |
| }; | |
| var ok = {}; | |
| dd.prototype.reset = function () { | |
| this.b = null; | |
| this.a && (this.a.cancel(), (this.a = null)); | |
| }; | |
| dd.prototype.h = function (a, b) { | |
| if (a) { | |
| this.reset(); | |
| this.g = !0; | |
| var p = a.c, | |
| c = a.b, | |
| e = a.a && "auth/web-storage-unsupported" == a.a.code, | |
| g = | |
| a.a && | |
| "auth/operation-not-supported-in-this-environment" == a.a.code; | |
| this.i = !(!e && !g); | |
| "unknown" != p || e || g | |
| ? a.a | |
| ? (S(this, !0, null, a.a), Da()) | |
| : b.Ba(p, c) | |
| ? di(this, a, b) | |
| : na(new da("invalid-auth-event")) | |
| : (S(this, !1, null, null), Da()); | |
| } else na(new da("invalid-auth-event")); | |
| }; | |
| dd.prototype.oa = function () { | |
| var a = this; | |
| return new ha(function (b, p) { | |
| a.b ? a.b().then(b, p) : (a.f.push(b), a.c.push(p), Se(a)); | |
| }); | |
| }; | |
| rd.prototype.h = function (a, b) { | |
| if (a) { | |
| var p = a.c, | |
| c = a.b; | |
| a.a | |
| ? (b.ja(a.c, null, a.a, a.b), Da()) | |
| : b.Ba(p, c) | |
| ? Di(a, b) | |
| : na(new da("invalid-auth-event")); | |
| } else na(new da("invalid-auth-event")); | |
| }; | |
| $g.prototype.confirm = function (a) { | |
| a = Ag(this.verificationId, a); | |
| return this.a(a); | |
| }; | |
| sh.prototype.start = function () { | |
| this.a = this.c; | |
| Mh(this, !0); | |
| }; | |
| sh.prototype.stop = function () { | |
| this.b && (this.b.cancel(), (this.b = null)); | |
| }; | |
| bi.prototype.A = function () { | |
| return { | |
| apiKey: this.f.c, | |
| refreshToken: this.a, | |
| accessToken: this.b, | |
| expirationTime: this.c, | |
| }; | |
| }; | |
| bi.prototype.getToken = function (a) { | |
| a = !!a; | |
| return this.b && !this.a | |
| ? na(new da("user-token-expired")) | |
| : a || !this.b || Yh() > this.c - 3e4 | |
| ? this.a | |
| ? th(this, { grant_type: "refresh_token", refresh_token: this.a }) | |
| : Da(null) | |
| : Da({ | |
| accessToken: this.b, | |
| expirationTime: this.c, | |
| refreshToken: this.a, | |
| }); | |
| }; | |
| Lh.prototype.A = function () { | |
| return { lastLoginAt: this.b, createdAt: this.a }; | |
| }; | |
| v(ti, vb); | |
| v(Ud, $a); | |
| Ud.prototype.ua = function (a) { | |
| this.ga = a; | |
| Pf(this.a, a); | |
| }; | |
| Ud.prototype.ha = function () { | |
| return this.ga; | |
| }; | |
| Ud.prototype.Ca = function () { | |
| return N(this.P); | |
| }; | |
| Ud.prototype.Ja = function () { | |
| this.w.b && (this.w.stop(), this.w.start()); | |
| }; | |
| Oa(Ud.prototype, "providerId", "firebase"); | |
| W = Ud.prototype; | |
| W.reload = function () { | |
| var a = this; | |
| return re( | |
| this, | |
| Ui(this).then(function () { | |
| return Hi(a) | |
| .then(function () { | |
| return Oh(a); | |
| }) | |
| .then(uh); | |
| }) | |
| ); | |
| }; | |
| W.dc = function (a) { | |
| return this.G(a).then(function (a) { | |
| return new ig(a); | |
| }); | |
| }; | |
| W.G = function (a) { | |
| var b = this; | |
| return re( | |
| this, | |
| Ui(this) | |
| .then(function () { | |
| return b.b.getToken(a); | |
| }) | |
| .then(function (a) { | |
| if (!a) throw new da("internal-error"); | |
| a.accessToken != b.ma && | |
| (ci(b, a.accessToken), b.dispatchEvent(new ti("tokenChanged"))); | |
| Qh(b, "refreshToken", a.refreshToken); | |
| return a.accessToken; | |
| }) | |
| ); | |
| }; | |
| W.zc = function (a) { | |
| a = a.users; | |
| if (!a || !a.length) throw new da("internal-error"); | |
| a = a[0]; | |
| Qi(this, { | |
| uid: a.localId, | |
| displayName: a.displayName, | |
| photoURL: a.photoUrl, | |
| email: a.email, | |
| emailVerified: !!a.emailVerified, | |
| phoneNumber: a.phoneNumber, | |
| lastLoginAt: a.lastLoginAt, | |
| createdAt: a.createdAt, | |
| tenantId: a.tenantId, | |
| }); | |
| for (var b = Uh(a), p = 0; p < b.length; p++) Ti(this, b[p]); | |
| Qh( | |
| this, | |
| "isAnonymous", | |
| !(this.email && a.passwordHash) && | |
| !(this.providerData && this.providerData.length) | |
| ); | |
| }; | |
| W.Ac = function (a) { | |
| Bb( | |
| "firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead." | |
| ); | |
| return this.hb(a); | |
| }; | |
| W.hb = function (a) { | |
| var b = this, | |
| p = null; | |
| return re( | |
| this, | |
| a | |
| .f(this.a, this.uid) | |
| .then(function (a) { | |
| Vh(b, a); | |
| p = kg(b, a, "reauthenticate"); | |
| b.h = null; | |
| return b.reload(); | |
| }) | |
| .then(function () { | |
| return p; | |
| }), | |
| !0 | |
| ); | |
| }; | |
| W.rc = function (a) { | |
| Bb( | |
| "firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead." | |
| ); | |
| return this.fb(a); | |
| }; | |
| W.fb = function (a) { | |
| var b = this, | |
| p = null; | |
| return re( | |
| this, | |
| Md(this, a.providerId) | |
| .then(function () { | |
| return b.G(); | |
| }) | |
| .then(function (p) { | |
| return a.b(b.a, p); | |
| }) | |
| .then(function (a) { | |
| p = kg(b, a, "link"); | |
| return Kf(b, a); | |
| }) | |
| .then(function () { | |
| return p; | |
| }) | |
| ); | |
| }; | |
| W.sc = function (a, b) { | |
| var p = this; | |
| return re( | |
| this, | |
| Md(this, "phone").then(function () { | |
| return Ce(ah(p), a, b, y(p.fb, p)); | |
| }) | |
| ); | |
| }; | |
| W.Bc = function (a, b) { | |
| var p = this; | |
| return re( | |
| this, | |
| Da().then(function () { | |
| return Ce(ah(p), a, b, y(p.hb, p)); | |
| }), | |
| !0 | |
| ); | |
| }; | |
| W.rb = function (a) { | |
| var b = this; | |
| return re( | |
| this, | |
| this.G() | |
| .then(function (p) { | |
| return b.a.rb(p, a); | |
| }) | |
| .then(function (a) { | |
| Vh(b, a); | |
| return b.reload(); | |
| }) | |
| ); | |
| }; | |
| W.Sc = function (a) { | |
| var b = this; | |
| return re( | |
| this, | |
| this.G() | |
| .then(function (p) { | |
| return a.b(b.a, p); | |
| }) | |
| .then(function (a) { | |
| Vh(b, a); | |
| return b.reload(); | |
| }) | |
| ); | |
| }; | |
| W.sb = function (a) { | |
| var b = this; | |
| return re( | |
| this, | |
| this.G() | |
| .then(function (p) { | |
| return b.a.sb(p, a); | |
| }) | |
| .then(function (a) { | |
| Vh(b, a); | |
| return b.reload(); | |
| }) | |
| ); | |
| }; | |
| W.tb = function (a) { | |
| if (void 0 === a.displayName && void 0 === a.photoURL) return Ui(this); | |
| var b = this; | |
| return re( | |
| this, | |
| this.G() | |
| .then(function (p) { | |
| return b.a.tb(p, { | |
| displayName: a.displayName, | |
| photoUrl: a.photoURL, | |
| }); | |
| }) | |
| .then(function (a) { | |
| Vh(b, a); | |
| Qh(b, "displayName", a.displayName || null); | |
| Qh(b, "photoURL", a.photoUrl || null); | |
| Ye(b.providerData, function (a) { | |
| "password" === a.providerId && | |
| (Oa(a, "displayName", b.displayName), | |
| Oa(a, "photoURL", b.photoURL)); | |
| }); | |
| return Oh(b); | |
| }) | |
| .then(uh) | |
| ); | |
| }; | |
| W.Qc = function (a) { | |
| var b = this; | |
| return re( | |
| this, | |
| Hi(this).then(function (p) { | |
| return F(Gi(b), a) | |
| ? qc(b.a, p, [a]).then(function (a) { | |
| var p = {}; | |
| Ye(a.providerUserInfo || [], function (a) { | |
| p[a.providerId] = !0; | |
| }); | |
| Ye(Gi(b), function (a) { | |
| p[a] || ij(b, a); | |
| }); | |
| p[Td.PROVIDER_ID] || Oa(b, "phoneNumber", null); | |
| return Oh(b); | |
| }) | |
| : Oh(b).then(function () { | |
| throw new da("no-such-provider"); | |
| }); | |
| }) | |
| ); | |
| }; | |
| W.delete = function () { | |
| var a = this; | |
| return re( | |
| this, | |
| this.G() | |
| .then(function (b) { | |
| return Ra(a.a, Bn, { idToken: b }); | |
| }) | |
| .then(function () { | |
| a.dispatchEvent(new ti("userDeleted")); | |
| }) | |
| ).then(function () { | |
| for (var b = 0; b < a.I.length; b++) a.I[b].cancel("app-deleted"); | |
| bh(a, null); | |
| fj(a, null); | |
| a.I = []; | |
| a.B = !0; | |
| vh(a); | |
| Oa(a, "refreshToken", null); | |
| a.i && Be(a.i, a); | |
| }); | |
| }; | |
| W.xb = function (a, b) { | |
| return ("linkViaPopup" == a && (this.g || null) == b && this.f) || | |
| ("reauthViaPopup" == a && (this.g || null) == b && this.f) || | |
| ("linkViaRedirect" == a && (this.ca || null) == b) || | |
| ("reauthViaRedirect" == a && (this.ca || null) == b) | |
| ? !0 | |
| : !1; | |
| }; | |
| W.ja = function (a, b, p, c) { | |
| ("linkViaPopup" != a && "reauthViaPopup" != a) || | |
| c != (this.g || null) || | |
| (p && this.v ? this.v(p) : b && !p && this.f && this.f(b), | |
| this.c && (this.c.cancel(), (this.c = null)), | |
| delete this.f, | |
| delete this.v); | |
| }; | |
| W.Ba = function (a, b) { | |
| return "linkViaPopup" == a && b == (this.g || null) | |
| ? y(this.Bb, this) | |
| : "reauthViaPopup" == a && b == (this.g || null) | |
| ? y(this.Cb, this) | |
| : "linkViaRedirect" == a && (this.ca || null) == b | |
| ? y(this.Bb, this) | |
| : "reauthViaRedirect" == a && (this.ca || null) == b | |
| ? y(this.Cb, this) | |
| : null; | |
| }; | |
| W.tc = function (a) { | |
| var b = this; | |
| return Sh( | |
| this, | |
| "linkViaPopup", | |
| a, | |
| function () { | |
| return Md(b, a.providerId).then(function () { | |
| return Oh(b); | |
| }); | |
| }, | |
| !1 | |
| ); | |
| }; | |
| W.Cc = function (a) { | |
| return Sh( | |
| this, | |
| "reauthViaPopup", | |
| a, | |
| function () { | |
| return Da(); | |
| }, | |
| !0 | |
| ); | |
| }; | |
| W.uc = function (a) { | |
| var b = this; | |
| return Ri( | |
| this, | |
| "linkViaRedirect", | |
| a, | |
| function () { | |
| return Md(b, a.providerId); | |
| }, | |
| !1 | |
| ); | |
| }; | |
| W.Dc = function (a) { | |
| return Ri( | |
| this, | |
| "reauthViaRedirect", | |
| a, | |
| function () { | |
| return Da(); | |
| }, | |
| !0 | |
| ); | |
| }; | |
| W.Bb = function (a, b, p, c) { | |
| var e = this; | |
| this.c && (this.c.cancel(), (this.c = null)); | |
| var g = null; | |
| p = this.G() | |
| .then(function (p) { | |
| return we(e.a, { | |
| requestUri: a, | |
| postBody: c, | |
| sessionId: b, | |
| idToken: p, | |
| }); | |
| }) | |
| .then(function (a) { | |
| g = kg(e, a, "link"); | |
| return Kf(e, a); | |
| }) | |
| .then(function () { | |
| return g; | |
| }); | |
| return re(this, p); | |
| }; | |
| W.Cb = function (a, b, p, c) { | |
| var e = this; | |
| this.c && (this.c.cancel(), (this.c = null)); | |
| var g = null, | |
| d = Da() | |
| .then(function () { | |
| return le( | |
| hg(e.a, { | |
| requestUri: a, | |
| sessionId: b, | |
| postBody: c, | |
| tenantId: p, | |
| }), | |
| e.uid | |
| ); | |
| }) | |
| .then(function (a) { | |
| g = kg(e, a, "reauthenticate"); | |
| Vh(e, a); | |
| e.h = null; | |
| return e.reload(); | |
| }) | |
| .then(function () { | |
| return g; | |
| }); | |
| return re(this, d, !0); | |
| }; | |
| W.jb = function (a) { | |
| var b = this, | |
| p = null; | |
| return re( | |
| this, | |
| this.G() | |
| .then(function (b) { | |
| p = b; | |
| return "undefined" === typeof a || V(a) ? {} : pe(new cf(a)); | |
| }) | |
| .then(function (a) { | |
| return b.a.jb(p, a); | |
| }) | |
| .then(function (a) { | |
| if (b.email != a) return b.reload(); | |
| }) | |
| .then(function () {}) | |
| ); | |
| }; | |
| W.toJSON = function () { | |
| return this.A(); | |
| }; | |
| W.A = function () { | |
| var a = { | |
| uid: this.uid, | |
| displayName: this.displayName, | |
| photoURL: this.photoURL, | |
| email: this.email, | |
| emailVerified: this.emailVerified, | |
| phoneNumber: this.phoneNumber, | |
| isAnonymous: this.isAnonymous, | |
| tenantId: this.tenantId, | |
| providerData: [], | |
| apiKey: this.l, | |
| appName: this.m, | |
| authDomain: this.o, | |
| stsTokenManager: this.b.A(), | |
| redirectEventId: this.ca || null, | |
| }; | |
| this.metadata && Y(a, this.metadata.A()); | |
| Ye(this.providerData, function (b) { | |
| a.providerData.push(If(b)); | |
| }); | |
| return a; | |
| }; | |
| var pk = { name: "redirectUser", C: "session" }; | |
| wi.prototype.g = function () { | |
| var a = this, | |
| b = Od("local"); | |
| xh(this, function () { | |
| return Da() | |
| .then(function () { | |
| return a.c && "local" != a.c.C ? a.b.get(b, a.a) : null; | |
| }) | |
| .then(function (p) { | |
| if (p) | |
| return Re(a, "local").then(function () { | |
| a.c = b; | |
| }); | |
| }); | |
| }); | |
| }; | |
| var qk = { name: "persistence", C: "session" }; | |
| wi.prototype.mb = function (a) { | |
| var b = null, | |
| p = this; | |
| Gc(a); | |
| return xh(this, function () { | |
| return a != p.c.C | |
| ? p.b | |
| .get(p.c, p.a) | |
| .then(function (c) { | |
| b = c; | |
| return Re(p, a); | |
| }) | |
| .then(function () { | |
| p.c = Od(a); | |
| if (b) return p.b.set(p.c, b, p.a); | |
| }) | |
| : Da(); | |
| }); | |
| }; | |
| v(yf, $a); | |
| v(Wi, vb); | |
| v(Mg, vb); | |
| W = yf.prototype; | |
| W.mb = function (a) { | |
| a = this.h.mb(a); | |
| return Ed(this, a); | |
| }; | |
| W.ua = function (a) { | |
| this.Z === a || | |
| this.l || | |
| ((this.Z = a), | |
| Pf(this.b, this.Z), | |
| this.dispatchEvent(new Wi(this.ha()))); | |
| }; | |
| W.ha = function () { | |
| return this.Z; | |
| }; | |
| W.Tc = function () { | |
| var a = sa.navigator; | |
| this.ua( | |
| a | |
| ? (a.languages && a.languages[0]) || | |
| a.language || | |
| a.userLanguage || | |
| null | |
| : null | |
| ); | |
| }; | |
| W.vc = function (a) { | |
| this.I.push(a); | |
| Fh(this.b, uc.SDK_VERSION ? nd(uc.SDK_VERSION, this.I) : null); | |
| this.dispatchEvent(new Mg(this.I)); | |
| }; | |
| W.Ca = function () { | |
| return N(this.I); | |
| }; | |
| W.nb = function (a) { | |
| this.P === a || this.l || ((this.P = a), (this.b.b = this.P)); | |
| }; | |
| W.R = function () { | |
| return this.P; | |
| }; | |
| W.toJSON = function () { | |
| return { | |
| apiKey: this.app.options.apiKey, | |
| authDomain: this.app.options.authDomain, | |
| appName: this.app.name, | |
| currentUser: this.currentUser && this.currentUser.A(), | |
| }; | |
| }; | |
| W.xb = function (a, b) { | |
| switch (a) { | |
| case "unknown": | |
| case "signInViaRedirect": | |
| return !0; | |
| case "signInViaPopup": | |
| return this.g == b && !!this.f; | |
| default: | |
| return !1; | |
| } | |
| }; | |
| W.ja = function (a, b, p, c) { | |
| "signInViaPopup" == a && | |
| this.g == c && | |
| (p && this.v ? this.v(p) : b && !p && this.f && this.f(b), | |
| this.c && (this.c.cancel(), (this.c = null)), | |
| delete this.f, | |
| delete this.v); | |
| }; | |
| W.Ba = function (a, b) { | |
| return "signInViaRedirect" == a || | |
| ("signInViaPopup" == a && this.g == b && this.f) | |
| ? y(this.ac, this) | |
| : null; | |
| }; | |
| W.ac = function (a, b, p, c) { | |
| var e = this; | |
| a = { requestUri: a, postBody: c, sessionId: b, tenantId: p }; | |
| this.c && (this.c.cancel(), (this.c = null)); | |
| var g = null, | |
| d = null, | |
| l = af(e.b, a).then(function (a) { | |
| g = gf(a); | |
| d = qe(a); | |
| return a; | |
| }); | |
| a = e.Y.then(function () { | |
| return l; | |
| }) | |
| .then(function (a) { | |
| return Ji(e, a); | |
| }) | |
| .then(function () { | |
| return od({ | |
| user: e.currentUser, | |
| credential: g, | |
| additionalUserInfo: d, | |
| operationType: "signIn", | |
| }); | |
| }); | |
| return Ed(this, a); | |
| }; | |
| W.Lc = function (a) { | |
| if (!Qc()) | |
| return na(new da("operation-not-supported-in-this-environment")); | |
| var b = this, | |
| p = Ee(a.providerId), | |
| c = Xc(), | |
| e = null; | |
| (!Dd() || fc()) && | |
| this.app.options.authDomain && | |
| a.isOAuthProvider && | |
| (e = $c( | |
| this.app.options.authDomain, | |
| this.app.options.apiKey, | |
| this.app.name, | |
| "signInViaPopup", | |
| a, | |
| null, | |
| c, | |
| uc.SDK_VERSION || null, | |
| null, | |
| null, | |
| this.R() | |
| )); | |
| var g = vc(e, p && p.sa, p && p.ra); | |
| p = jj(this) | |
| .then(function (p) { | |
| return Oe(p, g, "signInViaPopup", a, c, !!e, b.R()); | |
| }) | |
| .then(function () { | |
| return new ha(function (a, p) { | |
| b.ja( | |
| "signInViaPopup", | |
| null, | |
| new da("cancelled-popup-request"), | |
| b.g | |
| ); | |
| b.f = a; | |
| b.v = p; | |
| b.g = c; | |
| b.c = db(b.a, b, "signInViaPopup", g, c); | |
| }); | |
| }) | |
| .then(function (a) { | |
| g && bd(g); | |
| return a ? od(a) : null; | |
| }) | |
| .s(function (a) { | |
| g && bd(g); | |
| throw a; | |
| }); | |
| return Ed(this, p); | |
| }; | |
| W.Mc = function (a) { | |
| if (!Qc()) | |
| return na(new da("operation-not-supported-in-this-environment")); | |
| var b = this, | |
| p = jj(this) | |
| .then(function () { | |
| return wh(b.h); | |
| }) | |
| .then(function () { | |
| return Xf(b.a, "signInViaRedirect", a, void 0, b.R()); | |
| }); | |
| return Ed(this, p); | |
| }; | |
| W.oa = function () { | |
| var a = this; | |
| return Yi(this) | |
| .then(function (b) { | |
| a.a && qd(a.a.b); | |
| return b; | |
| }) | |
| .s(function (b) { | |
| a.a && qd(a.a.b); | |
| throw b; | |
| }); | |
| }; | |
| W.Rc = function (a) { | |
| if (!a) return na(new da("null-user")); | |
| if (this.P != a.tenantId) return na(new da("tenant-id-mismatch")); | |
| var b = this, | |
| p = {}; | |
| p.apiKey = this.app.options.apiKey; | |
| p.authDomain = this.app.options.authDomain; | |
| p.appName = this.app.name; | |
| var c = Rh(a, p, b.w, b.Ca()); | |
| return Ed( | |
| this, | |
| this.i | |
| .then(function () { | |
| if (b.app.options.apiKey != a.l) return c.reload(); | |
| }) | |
| .then(function () { | |
| if (b.currentUser && a.uid == b.currentUser.uid) | |
| return Vi(b.currentUser, a), b.aa(a); | |
| ji(b, c); | |
| Nh(c); | |
| return b.aa(c); | |
| }) | |
| .then(function () { | |
| pi(b); | |
| }) | |
| ); | |
| }; | |
| W.pb = function () { | |
| var a = this, | |
| b = this.i.then(function () { | |
| a.a && qd(a.a.b); | |
| if (!a.currentUser) return Da(); | |
| ji(a, null); | |
| return Ki(a.h).then(function () { | |
| pi(a); | |
| }); | |
| }); | |
| return Ed(this, b); | |
| }; | |
| W.Nc = function () { | |
| var a = this; | |
| return ff(this.h, this.app.options.authDomain).then(function (b) { | |
| if (!a.l) { | |
| var p; | |
| if ((p = a.currentUser && b)) { | |
| p = a.currentUser.uid; | |
| var c = b.uid; | |
| p = | |
| void 0 === p || | |
| null === p || | |
| "" === p || | |
| void 0 === c || | |
| null === c || | |
| "" === c | |
| ? !1 | |
| : p == c; | |
| } | |
| if (p) return Vi(a.currentUser, b), a.currentUser.G(); | |
| if (a.currentUser || b) | |
| ji(a, b), b && (Nh(b), (b.da = a.w)), a.a && Zg(a.a, a), pi(a); | |
| } | |
| }); | |
| }; | |
| W.aa = function (a) { | |
| return ei(this.h, a); | |
| }; | |
| W.bc = function () { | |
| pi(this); | |
| this.aa(this.currentUser); | |
| }; | |
| W.mc = function () { | |
| this.pb(); | |
| }; | |
| W.nc = function () { | |
| this.pb(); | |
| }; | |
| W.oc = function (a) { | |
| var b = this; | |
| this.addAuthTokenListener(function () { | |
| a.next(b.currentUser); | |
| }); | |
| }; | |
| W.pc = function (a) { | |
| var b = this; | |
| Ij(this, function () { | |
| a.next(b.currentUser); | |
| }); | |
| }; | |
| W.xc = function (a, b, p) { | |
| var c = this; | |
| this.ga && | |
| Promise.resolve().then(function () { | |
| e(a) ? a(c.currentUser) : e(a.next) && a.next(c.currentUser); | |
| }); | |
| return this.Ub(a, b, p); | |
| }; | |
| W.wc = function (a, b, p) { | |
| var c = this; | |
| this.ga && | |
| Promise.resolve().then(function () { | |
| c.W = c.getUid(); | |
| e(a) ? a(c.currentUser) : e(a.next) && a.next(c.currentUser); | |
| }); | |
| return this.Vb(a, b, p); | |
| }; | |
| W.cc = function (a) { | |
| var b = this, | |
| p = this.i.then(function () { | |
| return b.currentUser | |
| ? b.currentUser.G(a).then(function (a) { | |
| return { accessToken: a }; | |
| }) | |
| : null; | |
| }); | |
| return Ed(this, p); | |
| }; | |
| W.Hc = function (a) { | |
| var b = this; | |
| return this.i | |
| .then(function () { | |
| return Oi(b, Ra(b.b, Dn, { token: a })); | |
| }) | |
| .then(function (a) { | |
| var p = a.user; | |
| Qh(p, "isAnonymous", !1); | |
| b.aa(p); | |
| return a; | |
| }); | |
| }; | |
| W.Ic = function (a, b) { | |
| var p = this; | |
| return this.i.then(function () { | |
| return Oi(p, Ra(p.b, Gl, { email: a, password: b })); | |
| }); | |
| }; | |
| W.Xb = function (a, b) { | |
| var p = this; | |
| return this.i.then(function () { | |
| return Oi(p, Ra(p.b, An, { email: a, password: b })); | |
| }); | |
| }; | |
| W.Sa = function (a) { | |
| var b = this; | |
| return this.i.then(function () { | |
| return Oi(b, a.na(b.b)); | |
| }); | |
| }; | |
| W.Gc = function (a) { | |
| Bb( | |
| "firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead." | |
| ); | |
| return this.Sa(a); | |
| }; | |
| W.ob = function () { | |
| var a = this; | |
| return this.i.then(function () { | |
| var b = a.currentUser; | |
| if (b && b.isAnonymous) { | |
| var p = od({ providerId: null, isNewUser: !1 }); | |
| return od({ | |
| user: b, | |
| credential: null, | |
| additionalUserInfo: p, | |
| operationType: "signIn", | |
| }); | |
| } | |
| return Oi(a, a.b.ob()).then(function (b) { | |
| var p = b.user; | |
| Qh(p, "isAnonymous", !0); | |
| a.aa(p); | |
| return b; | |
| }); | |
| }); | |
| }; | |
| W.getUid = function () { | |
| return (this.currentUser && this.currentUser.uid) || null; | |
| }; | |
| W.Wb = function (a) { | |
| this.addAuthTokenListener(a); | |
| this.o++; | |
| 0 < this.o && this.currentUser && vi(this.currentUser); | |
| }; | |
| W.Ec = function (a) { | |
| var b = this; | |
| Ye(this.m, function (p) { | |
| p == a && b.o--; | |
| }); | |
| 0 > this.o && (this.o = 0); | |
| 0 == this.o && this.currentUser && vh(this.currentUser); | |
| this.removeAuthTokenListener(a); | |
| }; | |
| W.addAuthTokenListener = function (a) { | |
| var b = this; | |
| this.m.push(a); | |
| Ed( | |
| this, | |
| this.i.then(function () { | |
| b.l || (F(b.m, a) && a(oi(b))); | |
| }) | |
| ); | |
| }; | |
| W.removeAuthTokenListener = function (a) { | |
| J(this.m, function (b) { | |
| return b == a; | |
| }); | |
| }; | |
| W.delete = function () { | |
| this.l = !0; | |
| for (var a = 0; a < this.O.length; a++) this.O[a].cancel("app-deleted"); | |
| this.O = []; | |
| this.h && ((a = this.h), a.b.removeListener(Od("local"), a.a, this.ma)); | |
| this.a && (Be(this.a, this), qd(this.a.b)); | |
| return Promise.resolve(); | |
| }; | |
| W.$b = function (a) { | |
| return Ed(this, Gh(this.b, a)); | |
| }; | |
| W.qc = function (a) { | |
| return !!Ng(a); | |
| }; | |
| W.lb = function (a, b) { | |
| var p = this; | |
| return Ed( | |
| this, | |
| Da() | |
| .then(function () { | |
| var a = new cf(b); | |
| if (!a.c) | |
| throw new da( | |
| "argument-error", | |
| Zj + " must be true when sending sign in link to email" | |
| ); | |
| return pe(a); | |
| }) | |
| .then(function (b) { | |
| return p.b.lb(a, b); | |
| }) | |
| .then(function () {}) | |
| ); | |
| }; | |
| W.Uc = function (a) { | |
| return this.Ma(a).then(function (a) { | |
| return a.data.email; | |
| }); | |
| }; | |
| W.ab = function (a, b) { | |
| return Ed( | |
| this, | |
| this.b.ab(a, b).then(function () {}) | |
| ); | |
| }; | |
| W.Ma = function (a) { | |
| return Ed( | |
| this, | |
| this.b.Ma(a).then(function (a) { | |
| return new bf(a); | |
| }) | |
| ); | |
| }; | |
| W.Ya = function (a) { | |
| return Ed( | |
| this, | |
| this.b.Ya(a).then(function () {}) | |
| ); | |
| }; | |
| W.kb = function (a, b) { | |
| var p = this; | |
| return Ed( | |
| this, | |
| Da() | |
| .then(function () { | |
| return "undefined" === typeof b || V(b) ? {} : pe(new cf(b)); | |
| }) | |
| .then(function (b) { | |
| return p.b.kb(a, b); | |
| }) | |
| .then(function () {}) | |
| ); | |
| }; | |
| W.Kc = function (a, b) { | |
| return Ed(this, Ce(this, a, b, y(this.Sa, this))); | |
| }; | |
| W.Jc = function (a, b) { | |
| var p = this; | |
| return Ed( | |
| this, | |
| Da().then(function () { | |
| var c = b || eb(), | |
| e = ic(a, c); | |
| c = Ng(c); | |
| if (!c) throw new da("argument-error", "Invalid email link!"); | |
| if (c.tenantId !== p.R()) throw new da("tenant-id-mismatch"); | |
| return p.Sa(e); | |
| }) | |
| ); | |
| }; | |
| Bi.prototype.render = function () {}; | |
| Bi.prototype.reset = function () {}; | |
| Bi.prototype.getResponse = function () {}; | |
| Bi.prototype.execute = function () {}; | |
| var zk = null; | |
| Tg.prototype.render = function (a, b) { | |
| this.a[this.b.toString()] = new Ci(a, b); | |
| return this.b++; | |
| }; | |
| Tg.prototype.reset = function (a) { | |
| var b = Jj(this, a); | |
| a = Ak(a); | |
| b && a && (b.delete(), delete this.a[a]); | |
| }; | |
| Tg.prototype.getResponse = function (a) { | |
| return (a = Jj(this, a)) ? a.getResponse() : null; | |
| }; | |
| Tg.prototype.execute = function (a) { | |
| (a = Jj(this, a)) && a.execute(); | |
| }; | |
| Ci.prototype.getResponse = function () { | |
| Kj(this); | |
| return this.b; | |
| }; | |
| Ci.prototype.execute = function () { | |
| Kj(this); | |
| var a = this; | |
| this.a || | |
| (this.a = setTimeout(function () { | |
| a.b = ed(); | |
| var b = a.c.callback, | |
| p = a.c["expired-callback"]; | |
| if (b) | |
| try { | |
| b(a.b); | |
| } catch (ki) {} | |
| a.a = setTimeout(function () { | |
| a.a = null; | |
| a.b = null; | |
| if (p) | |
| try { | |
| p(); | |
| } catch (ki) {} | |
| a.h && a.execute(); | |
| }, 6e4); | |
| }, 500)); | |
| }; | |
| Ci.prototype.delete = function () { | |
| Kj(this); | |
| this.g = !0; | |
| clearTimeout(this.a); | |
| this.a = null; | |
| yb(this.f, "click", this.i); | |
| }; | |
| Lj.prototype.g = function () { | |
| zk || (zk = new Tg()); | |
| return Da(zk); | |
| }; | |
| Lj.prototype.c = function () {}; | |
| var rk = null, | |
| Fn = new ca( | |
| mj, | |
| "https://www.google.com/recaptcha/api.js?onload\x3d%{onload}\x26render\x3dexplicit\x26hl\x3d%{hl}" | |
| ), | |
| Gn = new Id(3e4, 6e4); | |
| rj.prototype.g = function (a) { | |
| var b = this; | |
| return new ha(function (p, c) { | |
| var e = setTimeout(function () { | |
| c(new da("network-request-failed")); | |
| }, Gn.get()); | |
| if (!sa.grecaptcha || (a !== b.f && !b.b)) { | |
| sa[b.a] = function () { | |
| if (sa.grecaptcha) { | |
| b.f = a; | |
| var g = sa.grecaptcha.render; | |
| sa.grecaptcha.render = function (a, p) { | |
| a = g(a, p); | |
| b.b++; | |
| return a; | |
| }; | |
| clearTimeout(e); | |
| p(sa.grecaptcha); | |
| } else clearTimeout(e), c(new da("internal-error")); | |
| delete sa[b.a]; | |
| }; | |
| var g = fa(Fn, { onload: b.a, hl: a || "" }); | |
| Da(yh(g)).s(function () { | |
| clearTimeout(e); | |
| c( | |
| new da( | |
| "internal-error", | |
| "Unable to load external reCAPTCHA dependencies!" | |
| ) | |
| ); | |
| }); | |
| } else clearTimeout(e), p(sa.grecaptcha); | |
| }); | |
| }; | |
| rj.prototype.c = function () { | |
| this.b--; | |
| }; | |
| var sk = null, | |
| wl = "callback", | |
| xl = "expired-callback", | |
| vl = "sitekey", | |
| $m = "size"; | |
| W = Oj.prototype; | |
| W.Da = function () { | |
| var a = this; | |
| return this.f | |
| ? this.f | |
| : (this.f = Mj( | |
| this, | |
| Da() | |
| .then(function () { | |
| if (Lb() && !Kb()) return lc(); | |
| throw new da( | |
| "operation-not-supported-in-this-environment", | |
| "RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment." | |
| ); | |
| }) | |
| .then(function () { | |
| return a.m.g(a.v()); | |
| }) | |
| .then(function (b) { | |
| a.g = b; | |
| return Ra(a.o, Cn, {}); | |
| }) | |
| .then(function (b) { | |
| a.a[vl] = b.recaptchaSiteKey; | |
| }) | |
| .s(function (b) { | |
| a.f = null; | |
| throw b; | |
| }) | |
| )); | |
| }; | |
| W.render = function () { | |
| sj(this); | |
| var a = this; | |
| return Mj( | |
| this, | |
| this.Da().then(function () { | |
| if (null === a.c) { | |
| var b = a.u; | |
| if (!a.i) { | |
| var p = Dc(b); | |
| b = Ma("DIV"); | |
| p.appendChild(b); | |
| } | |
| a.c = a.g.render(b, a.a); | |
| } | |
| return a.c; | |
| }) | |
| ); | |
| }; | |
| W.verify = function () { | |
| sj(this); | |
| var a = this; | |
| return Mj( | |
| this, | |
| this.render().then(function (b) { | |
| return new ha(function (p) { | |
| var c = a.g.getResponse(b); | |
| if (c) p(c); | |
| else { | |
| var e = function (b) { | |
| b && (dj(a, e), p(b)); | |
| }; | |
| a.l.push(e); | |
| a.i && a.g.execute(a.c); | |
| } | |
| }); | |
| }) | |
| ); | |
| }; | |
| W.reset = function () { | |
| sj(this); | |
| null !== this.c && this.g.reset(this.c); | |
| }; | |
| W.clear = function () { | |
| sj(this); | |
| this.B = !0; | |
| this.m.c(); | |
| for (var a = 0; a < this.h.length; a++) | |
| this.h[a].cancel("RecaptchaVerifier instance has been destroyed."); | |
| if (!this.i) { | |
| a = Dc(this.u); | |
| for (var b; (b = a.firstChild); ) a.removeChild(b); | |
| } | |
| }; | |
| v(Nj, Oj); | |
| var yl = "First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split( | |
| " " | |
| ); | |
| Ze(yf.prototype, { | |
| Ya: { name: "applyActionCode", j: [pb("code")] }, | |
| Ma: { name: "checkActionCode", j: [pb("code")] }, | |
| ab: { name: "confirmPasswordReset", j: [pb("code"), pb("newPassword")] }, | |
| Xb: { | |
| name: "createUserWithEmailAndPassword", | |
| j: [pb("email"), pb("password")], | |
| }, | |
| $b: { name: "fetchSignInMethodsForEmail", j: [pb("email")] }, | |
| oa: { name: "getRedirectResult", j: [] }, | |
| qc: { name: "isSignInWithEmailLink", j: [pb("emailLink")] }, | |
| wc: { | |
| name: "onAuthStateChanged", | |
| j: [ | |
| Bf(qf(), Pi(), "nextOrObserver"), | |
| Pi("opt_error", !0), | |
| Pi("opt_completed", !0), | |
| ], | |
| }, | |
| xc: { | |
| name: "onIdTokenChanged", | |
| j: [ | |
| Bf(qf(), Pi(), "nextOrObserver"), | |
| Pi("opt_error", !0), | |
| Pi("opt_completed", !0), | |
| ], | |
| }, | |
| kb: { | |
| name: "sendPasswordResetEmail", | |
| j: [ | |
| pb("email"), | |
| Bf( | |
| qf("opt_actionCodeSettings", !0), | |
| ai(null, !0), | |
| "opt_actionCodeSettings", | |
| !0 | |
| ), | |
| ], | |
| }, | |
| lb: { | |
| name: "sendSignInLinkToEmail", | |
| j: [pb("email"), qf("actionCodeSettings")], | |
| }, | |
| mb: { name: "setPersistence", j: [pb("persistence")] }, | |
| Gc: { name: "signInAndRetrieveDataWithCredential", j: [Ni()] }, | |
| ob: { name: "signInAnonymously", j: [] }, | |
| Sa: { name: "signInWithCredential", j: [Ni()] }, | |
| Hc: { name: "signInWithCustomToken", j: [pb("token")] }, | |
| Ic: { | |
| name: "signInWithEmailAndPassword", | |
| j: [pb("email"), pb("password")], | |
| }, | |
| Jc: { | |
| name: "signInWithEmailLink", | |
| j: [pb("email"), pb("emailLink", !0)], | |
| }, | |
| Kc: { name: "signInWithPhoneNumber", j: [pb("phoneNumber"), Hj()] }, | |
| Lc: { name: "signInWithPopup", j: [cj()] }, | |
| Mc: { name: "signInWithRedirect", j: [cj()] }, | |
| Rc: { | |
| name: "updateCurrentUser", | |
| j: [ | |
| Bf( | |
| (function (a) { | |
| return { | |
| name: "user", | |
| M: "an instance of Firebase User", | |
| optional: !!a, | |
| N: function (a) { | |
| return !!(a && a instanceof Ud); | |
| }, | |
| }; | |
| })(), | |
| ai(), | |
| "user" | |
| ), | |
| ], | |
| }, | |
| pb: { name: "signOut", j: [] }, | |
| toJSON: { name: "toJSON", j: [pb(null, !0)] }, | |
| Tc: { name: "useDeviceLanguage", j: [] }, | |
| Uc: { name: "verifyPasswordResetCode", j: [pb("code")] }, | |
| }); | |
| Al(yf.prototype, { | |
| lc: { name: "languageCode", Za: Bf(pb(), ai(), "languageCode") }, | |
| ti: { name: "tenantId", Za: Bf(pb(), ai(), "tenantId") }, | |
| }); | |
| yf.Persistence = bj; | |
| yf.Persistence.LOCAL = "local"; | |
| yf.Persistence.SESSION = "session"; | |
| yf.Persistence.NONE = "none"; | |
| Ze(Ud.prototype, { | |
| delete: { name: "delete", j: [] }, | |
| dc: { name: "getIdTokenResult", j: [Pj("opt_forceRefresh", !0)] }, | |
| G: { name: "getIdToken", j: [Pj("opt_forceRefresh", !0)] }, | |
| rc: { name: "linkAndRetrieveDataWithCredential", j: [Ni()] }, | |
| fb: { name: "linkWithCredential", j: [Ni()] }, | |
| sc: { name: "linkWithPhoneNumber", j: [pb("phoneNumber"), Hj()] }, | |
| tc: { name: "linkWithPopup", j: [cj()] }, | |
| uc: { name: "linkWithRedirect", j: [cj()] }, | |
| Ac: { name: "reauthenticateAndRetrieveDataWithCredential", j: [Ni()] }, | |
| hb: { name: "reauthenticateWithCredential", j: [Ni()] }, | |
| Bc: { | |
| name: "reauthenticateWithPhoneNumber", | |
| j: [pb("phoneNumber"), Hj()], | |
| }, | |
| Cc: { name: "reauthenticateWithPopup", j: [cj()] }, | |
| Dc: { name: "reauthenticateWithRedirect", j: [cj()] }, | |
| reload: { name: "reload", j: [] }, | |
| jb: { | |
| name: "sendEmailVerification", | |
| j: [ | |
| Bf( | |
| qf("opt_actionCodeSettings", !0), | |
| ai(null, !0), | |
| "opt_actionCodeSettings", | |
| !0 | |
| ), | |
| ], | |
| }, | |
| toJSON: { name: "toJSON", j: [pb(null, !0)] }, | |
| Qc: { name: "unlink", j: [pb("provider")] }, | |
| rb: { name: "updateEmail", j: [pb("email")] }, | |
| sb: { name: "updatePassword", j: [pb("password")] }, | |
| Sc: { name: "updatePhoneNumber", j: [Ni("phone")] }, | |
| tb: { name: "updateProfile", j: [qf("profile")] }, | |
| }); | |
| Ze(Tg.prototype, { | |
| execute: { name: "execute" }, | |
| render: { name: "render" }, | |
| reset: { name: "reset" }, | |
| getResponse: { name: "getResponse" }, | |
| }); | |
| Ze(Bi.prototype, { | |
| execute: { name: "execute" }, | |
| render: { name: "render" }, | |
| reset: { name: "reset" }, | |
| getResponse: { name: "getResponse" }, | |
| }); | |
| Ze(ha.prototype, { | |
| ka: { name: "finally" }, | |
| s: { name: "catch" }, | |
| then: { name: "then" }, | |
| }); | |
| Al(si.prototype, { | |
| appVerificationDisabled: { | |
| name: "appVerificationDisabledForTesting", | |
| Za: Pj("appVerificationDisabledForTesting"), | |
| }, | |
| }); | |
| Ze($g.prototype, { | |
| confirm: { name: "confirm", j: [pb("verificationCode")] }, | |
| }); | |
| lf( | |
| Zf, | |
| "fromJSON", | |
| function (a) { | |
| a = q(a) ? JSON.parse(a) : a; | |
| for (var b, p = [Qe, Gf, Og, zg], c = 0; c < p.length; c++) | |
| if ((b = p[c](a))) return b; | |
| return null; | |
| }, | |
| [Bf(pb(), qf(), "json")] | |
| ); | |
| lf( | |
| sd, | |
| "credential", | |
| function (a, b) { | |
| return new Nd(a, b); | |
| }, | |
| [pb("email"), pb("password")] | |
| ); | |
| Ze(Nd.prototype, { A: { name: "toJSON", j: [pb(null, !0)] } }); | |
| Ze(Te.prototype, { | |
| ya: { name: "addScope", j: [pb("scope")] }, | |
| Ga: { name: "setCustomParameters", j: [qf("customOAuthParameters")] }, | |
| }); | |
| lf(Te, "credential", Nf, [Bf(pb(), qf(), "token")]); | |
| lf(sd, "credentialWithLink", ic, [pb("email"), pb("emailLink")]); | |
| Ze(Uc.prototype, { | |
| ya: { name: "addScope", j: [pb("scope")] }, | |
| Ga: { name: "setCustomParameters", j: [qf("customOAuthParameters")] }, | |
| }); | |
| lf(Uc, "credential", uf, [Bf(pb(), qf(), "token")]); | |
| Ze(de.prototype, { | |
| ya: { name: "addScope", j: [pb("scope")] }, | |
| Ga: { name: "setCustomParameters", j: [qf("customOAuthParameters")] }, | |
| }); | |
| lf(de, "credential", Tc, [ | |
| Bf(pb(), Bf(qf(), ai()), "idToken"), | |
| Bf(pb(), ai(), "accessToken", !0), | |
| ]); | |
| Ze(te.prototype, { | |
| Ga: { name: "setCustomParameters", j: [qf("customOAuthParameters")] }, | |
| }); | |
| lf(te, "credential", Lg, [Bf(pb(), qf(), "token"), pb("secret", !0)]); | |
| Ze(Jc.prototype, { | |
| ya: { name: "addScope", j: [pb("scope")] }, | |
| credential: { | |
| name: "credential", | |
| j: [ | |
| Bf(pb(), Bf(qf(), ai()), "optionsOrIdToken"), | |
| Bf(pb(), ai(), "accessToken", !0), | |
| ], | |
| }, | |
| Ga: { name: "setCustomParameters", j: [qf("customOAuthParameters")] }, | |
| }); | |
| Ze(Sc.prototype, { A: { name: "toJSON", j: [pb(null, !0)] } }); | |
| Ze(id.prototype, { A: { name: "toJSON", j: [pb(null, !0)] } }); | |
| lf(Td, "credential", Ag, [pb("verificationId"), pb("verificationCode")]); | |
| Ze(Td.prototype, { | |
| Wa: { name: "verifyPhoneNumber", j: [pb("phoneNumber"), Hj()] }, | |
| }); | |
| Ze(Ue.prototype, { A: { name: "toJSON", j: [pb(null, !0)] } }); | |
| Ze(da.prototype, { toJSON: { name: "toJSON", j: [pb(null, !0)] } }); | |
| Ze(ee.prototype, { toJSON: { name: "toJSON", j: [pb(null, !0)] } }); | |
| Ze(Ve.prototype, { toJSON: { name: "toJSON", j: [pb(null, !0)] } }); | |
| Ze(Nj.prototype, { | |
| clear: { name: "clear", j: [] }, | |
| render: { name: "render", j: [] }, | |
| verify: { name: "verify", j: [] }, | |
| }); | |
| lf(De, "parseLink", Sd, [pb("link")]); | |
| (function () { | |
| if ( | |
| "undefined" !== typeof uc && | |
| uc.INTERNAL && | |
| uc.INTERNAL.registerComponent | |
| ) { | |
| var a = { | |
| ActionCodeInfo: { | |
| Operation: { | |
| EMAIL_SIGNIN: yj, | |
| PASSWORD_RESET: "PASSWORD_RESET", | |
| RECOVER_EMAIL: "RECOVER_EMAIL", | |
| VERIFY_EMAIL: "VERIFY_EMAIL", | |
| }, | |
| }, | |
| Auth: yf, | |
| AuthCredential: Zf, | |
| Error: da, | |
| }; | |
| lf(a, "EmailAuthProvider", sd, []); | |
| lf(a, "FacebookAuthProvider", Te, []); | |
| lf(a, "GithubAuthProvider", Uc, []); | |
| lf(a, "GoogleAuthProvider", de, []); | |
| lf(a, "TwitterAuthProvider", te, []); | |
| lf(a, "OAuthProvider", Jc, [pb("providerId")]); | |
| lf(a, "SAMLAuthProvider", Lf, [pb("providerId")]); | |
| lf(a, "PhoneAuthProvider", Td, [Ml()]); | |
| lf(a, "RecaptchaVerifier", Nj, [ | |
| Bf(pb(), Ll(), "recaptchaContainer"), | |
| qf("recaptchaParameters", !0), | |
| an(), | |
| ]); | |
| lf(a, "ActionCodeURL", De, []); | |
| uc.INTERNAL.registerComponent({ | |
| name: "auth", | |
| instanceFactory: function (a) { | |
| a = a.getProvider("app").getImmediate(); | |
| return new yf(a); | |
| }, | |
| multipleInstances: !1, | |
| serviceProps: a, | |
| instantiationMode: "LAZY", | |
| type: "PUBLIC", | |
| }); | |
| uc.INTERNAL.registerComponent({ | |
| name: "auth-internal", | |
| instanceFactory: function (a) { | |
| a = a.getProvider("auth").getImmediate(); | |
| return { | |
| getUid: y(a.getUid, a), | |
| getToken: y(a.cc, a), | |
| addAuthTokenListener: y(a.Wb, a), | |
| removeAuthTokenListener: y(a.Ec, a), | |
| }; | |
| }, | |
| multipleInstances: !1, | |
| instantiationMode: "LAZY", | |
| type: "PRIVATE", | |
| }); | |
| uc.registerVersion("@firebase/auth", "0.13.4"); | |
| uc.INTERNAL.extendNamespace({ User: Ud }); | |
| } else | |
| throw Error( | |
| "Cannot find the firebase namespace; be sure to include firebase-app.js before this library." | |
| ); | |
| })(); | |
| }.apply( | |
| "undefined" !== typeof m | |
| ? m | |
| : "undefined" !== typeof self | |
| ? self | |
| : "undefined" !== typeof window | |
| ? window | |
| : {} | |
| )); | |
| }; | |
| shadow$provide[29] = function (m, f, r, d) { | |
| f(28); | |
| }; | |
| shadow$provide[30] = function (m, f, r, d) { | |
| function b() { | |
| throw Error("setTimeout has not been defined"); | |
| } | |
| function t() { | |
| throw Error("clearTimeout has not been defined"); | |
| } | |
| function q(a) { | |
| if (c === setTimeout) return setTimeout(a, 0); | |
| if ((c === b || !c) && setTimeout) | |
| return (c = setTimeout), setTimeout(a, 0); | |
| try { | |
| return c(a, 0); | |
| } catch (v) { | |
| try { | |
| return c.call(null, a, 0); | |
| } catch (I) { | |
| return c.call(this, a, 0); | |
| } | |
| } | |
| } | |
| function h(a) { | |
| if (e === clearTimeout) return clearTimeout(a); | |
| if ((e === t || !e) && clearTimeout) | |
| return (e = clearTimeout), clearTimeout(a); | |
| try { | |
| return e(a); | |
| } catch (v) { | |
| try { | |
| return e.call(null, a); | |
| } catch (I) { | |
| return e.call(this, a); | |
| } | |
| } | |
| } | |
| function u() { | |
| g && | |
| w && | |
| ((g = !1), w.length ? (l = w.concat(l)) : (y = -1), l.length && a()); | |
| } | |
| function a() { | |
| if (!g) { | |
| var a = q(u); | |
| g = !0; | |
| for (var b = l.length; b; ) { | |
| w = l; | |
| for (l = []; ++y < b; ) w && w[y].run(); | |
| y = -1; | |
| b = l.length; | |
| } | |
| w = null; | |
| g = !1; | |
| h(a); | |
| } | |
| } | |
| function k(a, b) { | |
| this.fun = a; | |
| this.array = b; | |
| } | |
| function n() {} | |
| m = r.exports = {}; | |
| try { | |
| var c = "function" === typeof setTimeout ? setTimeout : b; | |
| } catch (x) { | |
| c = b; | |
| } | |
| try { | |
| var e = "function" === typeof clearTimeout ? clearTimeout : t; | |
| } catch (x) { | |
| e = t; | |
| } | |
| var l = [], | |
| g = !1, | |
| w, | |
| y = -1; | |
| m.nextTick = function (b) { | |
| var c = Array(arguments.length - 1); | |
| if (1 < arguments.length) | |
| for (var e = 1; e < arguments.length; e++) c[e - 1] = arguments[e]; | |
| l.push(new k(b, c)); | |
| 1 !== l.length || g || q(a); | |
| }; | |
| k.prototype.run = function () { | |
| this.fun.apply(null, this.array); | |
| }; | |
| m.title = "browser"; | |
| m.browser = !0; | |
| m.env = {}; | |
| m.argv = []; | |
| m.version = ""; | |
| m.versions = {}; | |
| m.on = n; | |
| m.addListener = n; | |
| m.once = n; | |
| m.off = n; | |
| m.removeListener = n; | |
| m.removeAllListeners = n; | |
| m.emit = n; | |
| m.prependListener = n; | |
| m.prependOnceListener = n; | |
| m.listeners = function (a) { | |
| return []; | |
| }; | |
| m.binding = function (a) { | |
| throw Error("process.binding is not supported"); | |
| }; | |
| m.cwd = function () { | |
| return "/"; | |
| }; | |
| m.chdir = function (a) { | |
| throw Error("process.chdir is not supported"); | |
| }; | |
| m.umask = function () { | |
| return 0; | |
| }; | |
| }; | |
| shadow$provide[31] = function (m, f, r, d) { | |
| function b(a, b) { | |
| for (var c in a) a.hasOwnProperty(c) && b(c, a[c]); | |
| } | |
| function t(a, b) { | |
| return L(a.name, b.name); | |
| } | |
| function q(a, b) { | |
| return L(a, b); | |
| } | |
| function h(a, c) { | |
| void 0 === c && (c = null); | |
| if (null === a) return Na.EMPTY_NODE; | |
| "object" === typeof a && ".priority" in a && (c = a[".priority"]); | |
| e.assert( | |
| null === c || | |
| "string" === typeof c || | |
| "number" === typeof c || | |
| ("object" === typeof c && ".sv" in c), | |
| "Invalid priority type found: " + typeof c | |
| ); | |
| "object" === typeof a && | |
| ".value" in a && | |
| null !== a[".value"] && | |
| (a = a[".value"]); | |
| if ("object" !== typeof a || ".sv" in a) return new tb(a, h(c)); | |
| if (a instanceof Array) { | |
| var g = Na.EMPTY_NODE; | |
| b(a, function (b, c) { | |
| e.contains(a, b) && | |
| "." !== b.substring(0, 1) && | |
| ((c = h(c)), c.isLeafNode() || !c.isEmpty()) && | |
| (g = g.updateImmediateChild(b, c)); | |
| }); | |
| return g.updatePriority(h(c)); | |
| } | |
| var d = [], | |
| l = !1; | |
| b(a, function (a, b) { | |
| "." !== a.substring(0, 1) && | |
| ((b = h(b)), | |
| b.isEmpty() || | |
| ((l = l || !b.getPriority().isEmpty()), d.push(new ya(a, b)))); | |
| }); | |
| if (0 === d.length) return Na.EMPTY_NODE; | |
| var k = kb( | |
| d, | |
| t, | |
| function (a) { | |
| return a.name; | |
| }, | |
| q | |
| ); | |
| if (l) { | |
| var n = kb(d, Ja.getCompare()); | |
| return new Na(k, h(c), new Yb({ ".priority": n }, { ".priority": Ja })); | |
| } | |
| return new Na(k, h(c), Yb.Default); | |
| } | |
| function u(a, b, c) { | |
| if (null != b.value) return c.updateChild(a, b.value); | |
| var g = null; | |
| b.children.inorderTraversal(function (b, d) { | |
| ".priority" === b | |
| ? (e.assert( | |
| null !== d.value, | |
| "Priority writes must always be leaf nodes" | |
| ), | |
| (g = d.value)) | |
| : (c = u(a.child(b), d, c)); | |
| }); | |
| c.getChild(a).isEmpty() || | |
| null === g || | |
| (c = c.updateChild(a.child(".priority"), g)); | |
| return c; | |
| } | |
| function a(a) { | |
| Ma = a.SDK_VERSION; | |
| var b = a.INTERNAL.registerComponent( | |
| new g.Component( | |
| "database", | |
| function (a, b) { | |
| var c = a.getProvider("app").getImmediate(); | |
| a = a.getProvider("auth-internal"); | |
| return ie.getInstance().databaseFromApp(c, a, b); | |
| }, | |
| "PUBLIC" | |
| ) | |
| .setServiceProps({ | |
| Reference: zb, | |
| Query: rc, | |
| Database: yc, | |
| DataSnapshot: Sa, | |
| enableLogging: z, | |
| INTERNAL: Kb, | |
| ServerValue: wc, | |
| TEST_ACCESS: Rb, | |
| }) | |
| .setMultipleInstances(!0) | |
| ); | |
| a.registerVersion("@firebase/database", "0.5.19"); | |
| e.isNodeSdk() && (r.exports = b); | |
| } | |
| var k = f(30); | |
| ("use strict"); | |
| Object.defineProperty(d, "__esModule", { value: !0 }); | |
| var n = (function (a) { | |
| return a && "object" === typeof a && "default" in a ? a["default"] : a; | |
| })(f(26)), | |
| c = f(22), | |
| e = f(23), | |
| l = f(25), | |
| g = f(24), | |
| w = (function () { | |
| function a(a) { | |
| this.domStorage_ = a; | |
| this.prefix_ = "firebase:"; | |
| } | |
| a.prototype.set = function (a, b) { | |
| null == b | |
| ? this.domStorage_.removeItem(this.prefixedName_(a)) | |
| : this.domStorage_.setItem(this.prefixedName_(a), e.stringify(b)); | |
| }; | |
| a.prototype.get = function (a) { | |
| a = this.domStorage_.getItem(this.prefixedName_(a)); | |
| return null == a ? null : e.jsonEval(a); | |
| }; | |
| a.prototype.remove = function (a) { | |
| this.domStorage_.removeItem(this.prefixedName_(a)); | |
| }; | |
| a.prototype.prefixedName_ = function (a) { | |
| return this.prefix_ + a; | |
| }; | |
| a.prototype.toString = function () { | |
| return this.domStorage_.toString(); | |
| }; | |
| return a; | |
| })(), | |
| y = (function () { | |
| function a() { | |
| this.cache_ = {}; | |
| this.isInMemoryStorage = !0; | |
| } | |
| a.prototype.set = function (a, b) { | |
| null == b ? delete this.cache_[a] : (this.cache_[a] = b); | |
| }; | |
| a.prototype.get = function (a) { | |
| return e.contains(this.cache_, a) ? this.cache_[a] : null; | |
| }; | |
| a.prototype.remove = function (a) { | |
| delete this.cache_[a]; | |
| }; | |
| return a; | |
| })(), | |
| x = function (a) { | |
| try { | |
| if ("undefined" !== typeof window && "undefined" !== typeof window[a]) { | |
| var b = window[a]; | |
| b.setItem("firebase:sentinel", "cache"); | |
| b.removeItem("firebase:sentinel"); | |
| return new w(b); | |
| } | |
| } catch (nd) {} | |
| return new y(); | |
| }, | |
| v = x("localStorage"), | |
| I = x("sessionStorage"), | |
| H = new l.Logger("@firebase/database"), | |
| C = (function () { | |
| var a = 1; | |
| return function () { | |
| return a++; | |
| }; | |
| })(), | |
| E = function (a) { | |
| a = e.stringToByteArray(a); | |
| var b = new e.Sha1(); | |
| b.update(a); | |
| a = b.digest(); | |
| return e.base64.encodeByteArray(a); | |
| }, | |
| G = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) a[b] = arguments[b]; | |
| b = ""; | |
| for (var c = 0; c < a.length; c++) { | |
| var g = a[c]; | |
| b = | |
| Array.isArray(g) || | |
| (g && "object" === typeof g && "number" === typeof g.length) | |
| ? b + G.apply(null, g) | |
| : "object" === typeof g | |
| ? b + e.stringify(g) | |
| : b + g; | |
| b += " "; | |
| } | |
| return b; | |
| }, | |
| O = null, | |
| A = !0, | |
| z = function (a, b) { | |
| e.assert( | |
| !b || !0 === a || !1 === a, | |
| "Can't turn on custom loggers persistently." | |
| ); | |
| !0 === a | |
| ? ((H.logLevel = l.LogLevel.VERBOSE), | |
| (O = H.log.bind(H)), | |
| b && I.set("logging_enabled", !0)) | |
| : "function" === typeof a | |
| ? (O = a) | |
| : ((O = null), I.remove("logging_enabled")); | |
| }, | |
| K = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) a[b] = arguments[b]; | |
| !0 === A && | |
| ((A = !1), null === O && !0 === I.get("logging_enabled") && z(!0)); | |
| O && ((a = G.apply(null, a)), O(a)); | |
| }, | |
| D = function (a) { | |
| return function () { | |
| for (var b = [], e = 0; e < arguments.length; e++) b[e] = arguments[e]; | |
| K.apply(void 0, c.__spread([a], b)); | |
| }; | |
| }, | |
| Q = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) a[b] = arguments[b]; | |
| a = "FIREBASE INTERNAL ERROR: " + G.apply(void 0, c.__spread(a)); | |
| H.error(a); | |
| }, | |
| M = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) a[b] = arguments[b]; | |
| a = "FIREBASE FATAL ERROR: " + G.apply(void 0, c.__spread(a)); | |
| H.error(a); | |
| throw Error(a); | |
| }, | |
| F = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) a[b] = arguments[b]; | |
| a = "FIREBASE WARNING: " + G.apply(void 0, c.__spread(a)); | |
| H.warn(a); | |
| }, | |
| P = function (a) { | |
| return ( | |
| "number" === typeof a && | |
| (a !== a || | |
| a === Number.POSITIVE_INFINITY || | |
| a === Number.NEGATIVE_INFINITY) | |
| ); | |
| }, | |
| J = function (a) { | |
| if (e.isNodeSdk() || "complete" === document.readyState) a(); | |
| else { | |
| var b = !1, | |
| c = function () { | |
| document.body ? b || ((b = !0), a()) : setTimeout(c, 10); | |
| }; | |
| document.addEventListener | |
| ? (document.addEventListener("DOMContentLoaded", c, !1), | |
| window.addEventListener("load", c, !1)) | |
| : document.attachEvent && | |
| (document.attachEvent("onreadystatechange", function () { | |
| "complete" === document.readyState && c(); | |
| }), | |
| window.attachEvent("onload", c)); | |
| } | |
| }, | |
| L = function (a, b) { | |
| if (a === b) return 0; | |
| if ("[MIN_NAME]" === a || "[MAX_NAME]" === b) return -1; | |
| if ("[MIN_NAME]" === b || "[MAX_NAME]" === a) return 1; | |
| var c = ra(a), | |
| e = ra(b); | |
| return null !== c | |
| ? null !== e | |
| ? 0 === c - e | |
| ? a.length - b.length | |
| : c - e | |
| : -1 | |
| : null !== e | |
| ? 1 | |
| : a < b | |
| ? -1 | |
| : 1; | |
| }, | |
| N = function (a, b) { | |
| return a === b ? 0 : a < b ? -1 : 1; | |
| }, | |
| B = function (a, b) { | |
| if (b && a in b) return b[a]; | |
| throw Error( | |
| "Missing required key (" + a + ") in object: " + e.stringify(b) | |
| ); | |
| }, | |
| V = function (a) { | |
| if ("object" !== typeof a || null === a) return e.stringify(a); | |
| var b = []; | |
| for (c in a) b.push(c); | |
| b.sort(); | |
| var c = "{"; | |
| for (var g = 0; g < b.length; g++) | |
| 0 !== g && (c += ","), | |
| (c += e.stringify(b[g])), | |
| (c += ":"), | |
| (c += V(a[b[g]])); | |
| return c + "}"; | |
| }, | |
| U = function (a, b) { | |
| var c = a.length; | |
| if (c <= b) return [a]; | |
| for (var e = [], g = 0; g < c; g += b) | |
| g + b > c ? e.push(a.substring(g, c)) : e.push(a.substring(g, g + b)); | |
| return e; | |
| }, | |
| Y = function (a) { | |
| e.assert(!P(a), "Invalid JSON number"); | |
| var b; | |
| if (0 === a) { | |
| var c = (b = 0); | |
| var g = -Infinity === 1 / a ? 1 : 0; | |
| } else | |
| (g = 0 > a), | |
| (a = Math.abs(a)), | |
| a >= Math.pow(2, -1022) | |
| ? ((c = Math.min(Math.floor(Math.log(a) / Math.LN2), 1023)), | |
| (b = c + 1023), | |
| (c = Math.round(a * Math.pow(2, 52 - c) - Math.pow(2, 52)))) | |
| : ((b = 0), (c = Math.round(a / Math.pow(2, -1074)))); | |
| var d = []; | |
| for (a = 52; a; --a) d.push(c % 2 ? 1 : 0), (c = Math.floor(c / 2)); | |
| for (a = 11; a; --a) d.push(b % 2 ? 1 : 0), (b = Math.floor(b / 2)); | |
| d.push(g ? 1 : 0); | |
| d.reverse(); | |
| g = d.join(""); | |
| b = ""; | |
| for (a = 0; 64 > a; a += 8) | |
| (c = parseInt(g.substr(a, 8), 2).toString(16)), | |
| 1 === c.length && (c = "0" + c), | |
| (b += c); | |
| return b.toLowerCase(); | |
| }, | |
| ca = /^-?(0*)\d{1,10}$/, | |
| ra = function (a) { | |
| return ca.test(a) && | |
| ((a = Number(a)), -2147483648 <= a && 2147483647 >= a) | |
| ? a | |
| : null; | |
| }, | |
| ia = function (a) { | |
| try { | |
| a(); | |
| } catch (Gd) { | |
| setTimeout(function () { | |
| F("Exception was thrown by user callback.", Gd.stack || ""); | |
| throw Gd; | |
| }, 0); | |
| } | |
| }, | |
| Ca = function (a, b) { | |
| a = setTimeout(a, b); | |
| "object" === typeof a && a.unref && a.unref(); | |
| return a; | |
| }, | |
| fa = (function () { | |
| function a(a, b) { | |
| if (void 0 === b) { | |
| this.pieces_ = a.split("/"); | |
| for (b = a = 0; b < this.pieces_.length; b++) | |
| 0 < this.pieces_[b].length && | |
| ((this.pieces_[a] = this.pieces_[b]), a++); | |
| this.pieces_.length = a; | |
| this.pieceNum_ = 0; | |
| } else (this.pieces_ = a), (this.pieceNum_ = b); | |
| } | |
| Object.defineProperty(a, "Empty", { | |
| get: function () { | |
| return new a(""); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.getFront = function () { | |
| return this.pieceNum_ >= this.pieces_.length | |
| ? null | |
| : this.pieces_[this.pieceNum_]; | |
| }; | |
| a.prototype.getLength = function () { | |
| return this.pieces_.length - this.pieceNum_; | |
| }; | |
| a.prototype.popFront = function () { | |
| var b = this.pieceNum_; | |
| b < this.pieces_.length && b++; | |
| return new a(this.pieces_, b); | |
| }; | |
| a.prototype.getBack = function () { | |
| return this.pieceNum_ < this.pieces_.length | |
| ? this.pieces_[this.pieces_.length - 1] | |
| : null; | |
| }; | |
| a.prototype.toString = function () { | |
| for (var a = "", b = this.pieceNum_; b < this.pieces_.length; b++) | |
| "" !== this.pieces_[b] && (a += "/" + this.pieces_[b]); | |
| return a || "/"; | |
| }; | |
| a.prototype.toUrlEncodedString = function () { | |
| for (var a = "", b = this.pieceNum_; b < this.pieces_.length; b++) | |
| "" !== this.pieces_[b] && | |
| (a += "/" + encodeURIComponent(String(this.pieces_[b]))); | |
| return a || "/"; | |
| }; | |
| a.prototype.slice = function (a) { | |
| void 0 === a && (a = 0); | |
| return this.pieces_.slice(this.pieceNum_ + a); | |
| }; | |
| a.prototype.parent = function () { | |
| if (this.pieceNum_ >= this.pieces_.length) return null; | |
| for (var b = [], c = this.pieceNum_; c < this.pieces_.length - 1; c++) | |
| b.push(this.pieces_[c]); | |
| return new a(b, 0); | |
| }; | |
| a.prototype.child = function (b) { | |
| for (var c = [], e = this.pieceNum_; e < this.pieces_.length; e++) | |
| c.push(this.pieces_[e]); | |
| if (b instanceof a) | |
| for (e = b.pieceNum_; e < b.pieces_.length; e++) c.push(b.pieces_[e]); | |
| else | |
| for (b = b.split("/"), e = 0; e < b.length; e++) | |
| 0 < b[e].length && c.push(b[e]); | |
| return new a(c, 0); | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return this.pieceNum_ >= this.pieces_.length; | |
| }; | |
| a.relativePath = function (b, c) { | |
| var e = b.getFront(), | |
| g = c.getFront(); | |
| if (null === e) return c; | |
| if (e === g) return a.relativePath(b.popFront(), c.popFront()); | |
| throw Error( | |
| "INTERNAL ERROR: innerPath (" + | |
| c + | |
| ") is not within outerPath (" + | |
| b + | |
| ")" | |
| ); | |
| }; | |
| a.comparePaths = function (a, b) { | |
| a = a.slice(); | |
| b = b.slice(); | |
| for (var c = 0; c < a.length && c < b.length; c++) { | |
| var e = L(a[c], b[c]); | |
| if (0 !== e) return e; | |
| } | |
| return a.length === b.length ? 0 : a.length < b.length ? -1 : 1; | |
| }; | |
| a.prototype.equals = function (a) { | |
| if (this.getLength() !== a.getLength()) return !1; | |
| for ( | |
| var b = this.pieceNum_, c = a.pieceNum_; | |
| b <= this.pieces_.length; | |
| b++, c++ | |
| ) | |
| if (this.pieces_[b] !== a.pieces_[c]) return !1; | |
| return !0; | |
| }; | |
| a.prototype.contains = function (a) { | |
| var b = this.pieceNum_, | |
| c = a.pieceNum_; | |
| if (this.getLength() > a.getLength()) return !1; | |
| for (; b < this.pieces_.length; ) { | |
| if (this.pieces_[b] !== a.pieces_[c]) return !1; | |
| ++b; | |
| ++c; | |
| } | |
| return !0; | |
| }; | |
| return a; | |
| })(), | |
| Ga = (function () { | |
| function a(a, b) { | |
| this.errorPrefix_ = b; | |
| this.parts_ = a.slice(); | |
| this.byteLength_ = Math.max(1, this.parts_.length); | |
| for (a = 0; a < this.parts_.length; a++) | |
| this.byteLength_ += e.stringLength(this.parts_[a]); | |
| this.checkValid_(); | |
| } | |
| Object.defineProperty(a, "MAX_PATH_DEPTH", { | |
| get: function () { | |
| return 32; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a, "MAX_PATH_LENGTH_BYTES", { | |
| get: function () { | |
| return 768; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.push = function (a) { | |
| 0 < this.parts_.length && (this.byteLength_ += 1); | |
| this.parts_.push(a); | |
| this.byteLength_ += e.stringLength(a); | |
| this.checkValid_(); | |
| }; | |
| a.prototype.pop = function () { | |
| var a = this.parts_.pop(); | |
| this.byteLength_ -= e.stringLength(a); | |
| 0 < this.parts_.length && --this.byteLength_; | |
| }; | |
| a.prototype.checkValid_ = function () { | |
| if (this.byteLength_ > a.MAX_PATH_LENGTH_BYTES) | |
| throw Error( | |
| this.errorPrefix_ + | |
| "has a key path longer than " + | |
| a.MAX_PATH_LENGTH_BYTES + | |
| " bytes (" + | |
| this.byteLength_ + | |
| ")." | |
| ); | |
| if (this.parts_.length > a.MAX_PATH_DEPTH) | |
| throw Error( | |
| this.errorPrefix_ + | |
| "path specified exceeds the maximum depth that can be written (" + | |
| a.MAX_PATH_DEPTH + | |
| ") or object contains a cycle " + | |
| this.toErrorString() | |
| ); | |
| }; | |
| a.prototype.toErrorString = function () { | |
| return 0 === this.parts_.length | |
| ? "" | |
| : "in property '" + this.parts_.join(".") + "'"; | |
| }; | |
| return a; | |
| })(), | |
| ja = (function () { | |
| function a(a, b, c, e, g, d) { | |
| void 0 === g && (g = ""); | |
| void 0 === d && (d = !1); | |
| this.secure = b; | |
| this.namespace = c; | |
| this.webSocketOnly = e; | |
| this.persistenceKey = g; | |
| this.includeNamespaceInQueryParams = d; | |
| this.host = a.toLowerCase(); | |
| this.domain = this.host.substr(this.host.indexOf(".") + 1); | |
| this.internalHost = v.get("host:" + a) || this.host; | |
| } | |
| a.prototype.needsQueryParam = function () { | |
| return ( | |
| this.host !== this.internalHost || | |
| this.isCustomHost() || | |
| this.includeNamespaceInQueryParams | |
| ); | |
| }; | |
| a.prototype.isCacheableHost = function () { | |
| return "s-" === this.internalHost.substr(0, 2); | |
| }; | |
| a.prototype.isDemoHost = function () { | |
| return "firebaseio-demo.com" === this.domain; | |
| }; | |
| a.prototype.isCustomHost = function () { | |
| return ( | |
| "firebaseio.com" !== this.domain && | |
| "firebaseio-demo.com" !== this.domain | |
| ); | |
| }; | |
| a.prototype.updateHost = function (a) { | |
| a !== this.internalHost && | |
| ((this.internalHost = a), | |
| this.isCacheableHost() && | |
| v.set("host:" + this.host, this.internalHost)); | |
| }; | |
| a.prototype.connectionURL = function (a, c) { | |
| e.assert("string" === typeof a, "typeof type must \x3d\x3d string"); | |
| e.assert("object" === typeof c, "typeof params must \x3d\x3d object"); | |
| if ("websocket" === a) | |
| a = (this.secure ? "wss://" : "ws://") + this.internalHost + "/.ws?"; | |
| else if ("long_polling" === a) | |
| a = | |
| (this.secure ? "https://" : "http://") + | |
| this.internalHost + | |
| "/.lp?"; | |
| else throw Error("Unknown connection type: " + a); | |
| this.needsQueryParam() && (c.ns = this.namespace); | |
| var g = []; | |
| b(c, function (a, b) { | |
| g.push(a + "\x3d" + b); | |
| }); | |
| return a + g.join("\x26"); | |
| }; | |
| a.prototype.toString = function () { | |
| var a = this.toURLString(); | |
| this.persistenceKey && (a += "\x3c" + this.persistenceKey + "\x3e"); | |
| return a; | |
| }; | |
| a.prototype.toURLString = function () { | |
| return (this.secure ? "https://" : "http://") + this.host; | |
| }; | |
| return a; | |
| })(), | |
| ka = function (a) { | |
| var b, | |
| e, | |
| g, | |
| d, | |
| l = a; | |
| a = d = g = e = b = ""; | |
| var h = !0; | |
| var k = "https"; | |
| if ("string" === typeof l) { | |
| var n = l.indexOf("//"); | |
| 0 <= n && ((k = l.substring(0, n - 1)), (l = l.substring(n + 2))); | |
| n = l.indexOf("/"); | |
| -1 === n && (n = l.length); | |
| var v = l.indexOf("?"); | |
| -1 === v && (v = l.length); | |
| b = l.substring(0, Math.min(n, v)); | |
| if (n < v) { | |
| d = ""; | |
| n = l.substring(n, v).split("/"); | |
| for (var f = 0; f < n.length; f++) | |
| if (0 < n[f].length) { | |
| var w = n[f]; | |
| try { | |
| w = decodeURIComponent(w.replace(/\+/g, " ")); | |
| } catch (Oc) {} | |
| d += "/" + w; | |
| } | |
| } | |
| n = l.substring(Math.min(l.length, v)); | |
| var q; | |
| v = {}; | |
| "?" === n.charAt(0) && (n = n.substring(1)); | |
| try { | |
| for ( | |
| var x = c.__values(n.split("\x26")), u = x.next(); | |
| !u.done; | |
| u = x.next() | |
| ) { | |
| var y = u.value; | |
| if (0 !== y.length) { | |
| var t = y.split("\x3d"); | |
| 2 === t.length | |
| ? (v[decodeURIComponent(t[0])] = decodeURIComponent(t[1])) | |
| : F("Invalid query segment '" + y + "' in query '" + n + "'"); | |
| } | |
| } | |
| } catch (Oc) { | |
| var I = { error: Oc }; | |
| } finally { | |
| try { | |
| u && !u.done && (q = x.return) && q.call(x); | |
| } finally { | |
| if (I) throw I.error; | |
| } | |
| } | |
| n = b.indexOf(":"); | |
| 0 <= n | |
| ? ((h = "https" === k || "wss" === k), | |
| parseInt(b.substring(n + 1), 10)) | |
| : (n = l.length); | |
| I = b.split("."); | |
| 3 === I.length | |
| ? ((e = I[1]), (a = g = I[0].toLowerCase())) | |
| : 2 === I.length | |
| ? (e = I[0]) | |
| : "localhost" === I[0].slice(0, n).toLowerCase() && (e = "localhost"); | |
| "ns" in v && (a = v.ns); | |
| } | |
| "firebase" === e && | |
| M( | |
| b + | |
| " is no longer supported. Please use \x3cYOUR FIREBASE\x3e.firebaseio.com instead" | |
| ); | |
| (a && "undefined" !== a) || | |
| "localhost" === e || | |
| M( | |
| "Cannot parse Firebase url. Please use https://\x3cYOUR FIREBASE\x3e.firebaseio.com" | |
| ); | |
| h || | |
| ("undefined" !== typeof window && | |
| window.location && | |
| window.location.protocol && | |
| -1 !== window.location.protocol.indexOf("https:") && | |
| F( | |
| "Insecure Firebase access from a secure page. Please use https in calls to new Firebase()." | |
| )); | |
| return { | |
| repoInfo: new ja(b, h, a, "ws" === k || "wss" === k, "", a !== g), | |
| path: new fa(d), | |
| }; | |
| }, | |
| Z = /[\[\].#$\/\u0000-\u001F\u007F]/, | |
| Fa = /[\[\].#$\u0000-\u001F\u007F]/, | |
| qa = function (a) { | |
| return "string" === typeof a && 0 !== a.length && !Z.test(a); | |
| }, | |
| ea = function (a) { | |
| return "string" === typeof a && 0 !== a.length && !Fa.test(a); | |
| }, | |
| za = function (a) { | |
| return ( | |
| null === a || | |
| "string" === typeof a || | |
| ("number" === typeof a && !P(a)) || | |
| (a && "object" === typeof a && e.contains(a, ".sv")) | |
| ); | |
| }, | |
| La = function (a, b, c, g, d) { | |
| (d && void 0 === c) || pa(e.errorPrefix(a, b, d), c, g); | |
| }, | |
| pa = function (a, c, g) { | |
| var d = g instanceof fa ? new Ga(g, a) : g; | |
| if (void 0 === c) | |
| throw Error(a + "contains undefined " + d.toErrorString()); | |
| if ("function" === typeof c) | |
| throw Error( | |
| a + | |
| "contains a function " + | |
| d.toErrorString() + | |
| " with contents \x3d " + | |
| c.toString() | |
| ); | |
| if (P(c)) | |
| throw Error(a + "contains " + c.toString() + " " + d.toErrorString()); | |
| if ( | |
| "string" === typeof c && | |
| c.length > 10485760 / 3 && | |
| 10485760 < e.stringLength(c) | |
| ) | |
| throw Error( | |
| a + | |
| "contains a string greater than 10485760 utf8 bytes " + | |
| d.toErrorString() + | |
| " ('" + | |
| c.substring(0, 50) + | |
| "...')" | |
| ); | |
| if (c && "object" === typeof c) { | |
| var l = !1, | |
| h = !1; | |
| b(c, function (b, c) { | |
| if (".value" === b) l = !0; | |
| else if (".priority" !== b && ".sv" !== b && ((h = !0), !qa(b))) | |
| throw Error( | |
| a + | |
| " contains an invalid key (" + | |
| b + | |
| ") " + | |
| d.toErrorString() + | |
| '. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"' | |
| ); | |
| d.push(b); | |
| pa(a, c, d); | |
| d.pop(); | |
| }); | |
| if (l && h) | |
| throw Error( | |
| a + | |
| ' contains ".value" child ' + | |
| d.toErrorString() + | |
| " in addition to actual children." | |
| ); | |
| } | |
| }, | |
| Aa = function (a, b) { | |
| var c; | |
| for (c = 0; c < b.length; c++) { | |
| var e = b[c]; | |
| for (var g = e.slice(), d = 0; d < g.length; d++) | |
| if ((".priority" !== g[d] || d !== g.length - 1) && !qa(g[d])) | |
| throw Error( | |
| a + | |
| "contains an invalid key (" + | |
| g[d] + | |
| ") in path " + | |
| e.toString() + | |
| '. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"' | |
| ); | |
| } | |
| b.sort(fa.comparePaths); | |
| g = null; | |
| for (c = 0; c < b.length; c++) { | |
| e = b[c]; | |
| if (null !== g && g.contains(e)) | |
| throw Error( | |
| a + | |
| "contains a path " + | |
| g.toString() + | |
| " that is ancestor of another path " + | |
| e.toString() | |
| ); | |
| g = e; | |
| } | |
| }, | |
| Ka = function (a, c, g, d, l) { | |
| if (!l || void 0 !== g) { | |
| var h = e.errorPrefix(a, c, l); | |
| if (!g || "object" !== typeof g || Array.isArray(g)) | |
| throw Error( | |
| h + " must be an object containing the children to replace." | |
| ); | |
| var k = []; | |
| b(g, function (a, b) { | |
| a = new fa(a); | |
| pa(h, b, d.child(a)); | |
| if (".priority" === a.getBack() && !za(b)) | |
| throw Error( | |
| h + | |
| "contains an invalid value for '" + | |
| a.toString() + | |
| "', which must be a valid Firebase priority (a string, finite number, server value, or null)." | |
| ); | |
| k.push(a); | |
| }); | |
| Aa(h, k); | |
| } | |
| }, | |
| Ia = function (a, b, c, g) { | |
| if (!g || void 0 !== c) { | |
| if (P(c)) | |
| throw Error( | |
| e.errorPrefix(a, b, g) + | |
| "is " + | |
| c.toString() + | |
| ", but must be a valid Firebase priority (a string, finite number, server value, or null)." | |
| ); | |
| if (!za(c)) | |
| throw Error( | |
| e.errorPrefix(a, b, g) + | |
| "must be a valid Firebase priority (a string, finite number, server value, or null)." | |
| ); | |
| } | |
| }, | |
| bb = function (a, b, c, g) { | |
| if (!g || void 0 !== c) | |
| switch (c) { | |
| case "value": | |
| case "child_added": | |
| case "child_removed": | |
| case "child_changed": | |
| case "child_moved": | |
| break; | |
| default: | |
| throw Error( | |
| e.errorPrefix(a, b, g) + | |
| 'must be a valid event type \x3d "value", "child_added", "child_removed", "child_changed", or "child_moved".' | |
| ); | |
| } | |
| }, | |
| aa = function (a, b, c, g) { | |
| if (!((g && void 0 === c) || qa(c))) | |
| throw Error( | |
| e.errorPrefix(a, b, g) + | |
| 'was an invalid key \x3d "' + | |
| c + | |
| '". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").' | |
| ); | |
| }, | |
| X = function (a, b, c, g) { | |
| if (!((g && void 0 === c) || ea(c))) | |
| throw Error( | |
| e.errorPrefix(a, b, g) + | |
| 'was an invalid path \x3d "' + | |
| c + | |
| '". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"' | |
| ); | |
| }, | |
| va = function (a, b) { | |
| if (".info" === b.getFront()) | |
| throw Error(a + " failed \x3d Can't modify data under /.info/"); | |
| }, | |
| la = function (a, b, c) { | |
| var g = c.path.toString(); | |
| !(c = | |
| "string" !== typeof c.repoInfo.host || | |
| 0 === c.repoInfo.host.length || | |
| (!qa(c.repoInfo.namespace) && | |
| "localhost" !== c.repoInfo.host.split(":")[0])) && | |
| (c = 0 !== g.length) && | |
| (g && (g = g.replace(/^\/*\.info(\/|$)/, "/")), (c = !ea(g))); | |
| if (c) | |
| throw Error( | |
| e.errorPrefix(a, b, !1) + | |
| 'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".' | |
| ); | |
| }, | |
| fb = (function () { | |
| function a(a, b) { | |
| this.repo_ = a; | |
| this.path_ = b; | |
| } | |
| a.prototype.cancel = function (a) { | |
| e.validateArgCount("OnDisconnect.cancel", 0, 1, arguments.length); | |
| e.validateCallback("OnDisconnect.cancel", 1, a, !0); | |
| var b = new e.Deferred(); | |
| this.repo_.onDisconnectCancel(this.path_, b.wrapCallback(a)); | |
| return b.promise; | |
| }; | |
| a.prototype.remove = function (a) { | |
| e.validateArgCount("OnDisconnect.remove", 0, 1, arguments.length); | |
| va("OnDisconnect.remove", this.path_); | |
| e.validateCallback("OnDisconnect.remove", 1, a, !0); | |
| var b = new e.Deferred(); | |
| this.repo_.onDisconnectSet(this.path_, null, b.wrapCallback(a)); | |
| return b.promise; | |
| }; | |
| a.prototype.set = function (a, b) { | |
| e.validateArgCount("OnDisconnect.set", 1, 2, arguments.length); | |
| va("OnDisconnect.set", this.path_); | |
| La("OnDisconnect.set", 1, a, this.path_, !1); | |
| e.validateCallback("OnDisconnect.set", 2, b, !0); | |
| var c = new e.Deferred(); | |
| this.repo_.onDisconnectSet(this.path_, a, c.wrapCallback(b)); | |
| return c.promise; | |
| }; | |
| a.prototype.setWithPriority = function (a, b, c) { | |
| e.validateArgCount( | |
| "OnDisconnect.setWithPriority", | |
| 2, | |
| 3, | |
| arguments.length | |
| ); | |
| va("OnDisconnect.setWithPriority", this.path_); | |
| La("OnDisconnect.setWithPriority", 1, a, this.path_, !1); | |
| Ia("OnDisconnect.setWithPriority", 2, b, !1); | |
| e.validateCallback("OnDisconnect.setWithPriority", 3, c, !0); | |
| var g = new e.Deferred(); | |
| this.repo_.onDisconnectSetWithPriority( | |
| this.path_, | |
| a, | |
| b, | |
| g.wrapCallback(c) | |
| ); | |
| return g.promise; | |
| }; | |
| a.prototype.update = function (a, b) { | |
| e.validateArgCount("OnDisconnect.update", 1, 2, arguments.length); | |
| va("OnDisconnect.update", this.path_); | |
| if (Array.isArray(a)) { | |
| for (var c = {}, g = 0; g < a.length; ++g) c["" + g] = a[g]; | |
| a = c; | |
| F( | |
| "Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children." | |
| ); | |
| } | |
| Ka("OnDisconnect.update", 1, a, this.path_, !1); | |
| e.validateCallback("OnDisconnect.update", 2, b, !0); | |
| c = new e.Deferred(); | |
| this.repo_.onDisconnectUpdate(this.path_, a, c.wrapCallback(b)); | |
| return c.promise; | |
| }; | |
| return a; | |
| })(), | |
| cc = (function () { | |
| function a(a, b) { | |
| this.committed = a; | |
| this.snapshot = b; | |
| } | |
| a.prototype.toJSON = function () { | |
| e.validateArgCount("TransactionResult.toJSON", 0, 1, arguments.length); | |
| return { committed: this.committed, snapshot: this.snapshot.toJSON() }; | |
| }; | |
| return a; | |
| })(), | |
| ha = (function () { | |
| var a = 0, | |
| b = []; | |
| return function (c) { | |
| var g = c === a; | |
| a = c; | |
| var d, | |
| l = Array(8); | |
| for (d = 7; 0 <= d; d--) | |
| (l[ | |
| d | |
| ] = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt( | |
| c % 64 | |
| )), | |
| (c = Math.floor(c / 64)); | |
| e.assert(0 === c, "Cannot push at time \x3d\x3d 0"); | |
| c = l.join(""); | |
| if (g) { | |
| for (d = 11; 0 <= d && 63 === b[d]; d--) b[d] = 0; | |
| b[d]++; | |
| } else for (d = 0; 12 > d; d++) b[d] = Math.floor(64 * Math.random()); | |
| for (d = 0; 12 > d; d++) | |
| c += "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt( | |
| b[d] | |
| ); | |
| e.assert(20 === c.length, "nextPushId: Length should be 20."); | |
| return c; | |
| }; | |
| })(), | |
| ya = (function () { | |
| function a(a, b) { | |
| this.name = a; | |
| this.node = b; | |
| } | |
| a.Wrap = function (b, c) { | |
| return new a(b, c); | |
| }; | |
| return a; | |
| })(), | |
| jb = (function () { | |
| function a() {} | |
| a.prototype.getCompare = function () { | |
| return this.compare.bind(this); | |
| }; | |
| a.prototype.indexedValueChanged = function (a, b) { | |
| a = new ya("[MIN_NAME]", a); | |
| b = new ya("[MIN_NAME]", b); | |
| return 0 !== this.compare(a, b); | |
| }; | |
| a.prototype.minPost = function () { | |
| return ya.MIN; | |
| }; | |
| return a; | |
| })(), | |
| Da, | |
| na = (function (a) { | |
| function b() { | |
| return (null !== a && a.apply(this, arguments)) || this; | |
| } | |
| c.__extends(b, a); | |
| Object.defineProperty(b, "__EMPTY_NODE", { | |
| get: function () { | |
| return Da; | |
| }, | |
| set: function (a) { | |
| Da = a; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| b.prototype.compare = function (a, b) { | |
| return L(a.name, b.name); | |
| }; | |
| b.prototype.isDefinedOn = function (a) { | |
| throw e.assertionError( | |
| "KeyIndex.isDefinedOn not expected to be called." | |
| ); | |
| }; | |
| b.prototype.indexedValueChanged = function (a, b) { | |
| return !1; | |
| }; | |
| b.prototype.minPost = function () { | |
| return ya.MIN; | |
| }; | |
| b.prototype.maxPost = function () { | |
| return new ya("[MAX_NAME]", Da); | |
| }; | |
| b.prototype.makePost = function (a, b) { | |
| e.assert( | |
| "string" === typeof a, | |
| "KeyIndex indexValue must always be a string." | |
| ); | |
| return new ya(a, Da); | |
| }; | |
| b.prototype.toString = function () { | |
| return ".key"; | |
| }; | |
| return b; | |
| })(jb), | |
| Va = new na(), | |
| ua, | |
| wa = function (a) { | |
| return "number" === typeof a ? "number:" + Y(a) : "string:" + a; | |
| }, | |
| ma = function (a) { | |
| if (a.isLeafNode()) { | |
| var b = a.val(); | |
| e.assert( | |
| "string" === typeof b || | |
| "number" === typeof b || | |
| ("object" === typeof b && e.contains(b, ".sv")), | |
| "Priority must be a string or number." | |
| ); | |
| } else e.assert(a === ua || a.isEmpty(), "priority of unexpected type."); | |
| e.assert( | |
| a === ua || a.getPriority().isEmpty(), | |
| "Priority nodes can't have a priority of their own." | |
| ); | |
| }, | |
| lb, | |
| tb = (function () { | |
| function a(b, c) { | |
| void 0 === c && (c = a.__childrenNodeConstructor.EMPTY_NODE); | |
| this.value_ = b; | |
| this.priorityNode_ = c; | |
| this.lazyHash_ = null; | |
| e.assert( | |
| void 0 !== this.value_ && null !== this.value_, | |
| "LeafNode shouldn't be created with null/undefined value." | |
| ); | |
| ma(this.priorityNode_); | |
| } | |
| Object.defineProperty(a, "__childrenNodeConstructor", { | |
| get: function () { | |
| return lb; | |
| }, | |
| set: function (a) { | |
| lb = a; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.isLeafNode = function () { | |
| return !0; | |
| }; | |
| a.prototype.getPriority = function () { | |
| return this.priorityNode_; | |
| }; | |
| a.prototype.updatePriority = function (b) { | |
| return new a(this.value_, b); | |
| }; | |
| a.prototype.getImmediateChild = function (b) { | |
| return ".priority" === b | |
| ? this.priorityNode_ | |
| : a.__childrenNodeConstructor.EMPTY_NODE; | |
| }; | |
| a.prototype.getChild = function (b) { | |
| return b.isEmpty() | |
| ? this | |
| : ".priority" === b.getFront() | |
| ? this.priorityNode_ | |
| : a.__childrenNodeConstructor.EMPTY_NODE; | |
| }; | |
| a.prototype.hasChild = function () { | |
| return !1; | |
| }; | |
| a.prototype.getPredecessorChildName = function (a, b) { | |
| return null; | |
| }; | |
| a.prototype.updateImmediateChild = function (b, c) { | |
| return ".priority" === b | |
| ? this.updatePriority(c) | |
| : c.isEmpty() && ".priority" !== b | |
| ? this | |
| : a.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild( | |
| b, | |
| c | |
| ).updatePriority(this.priorityNode_); | |
| }; | |
| a.prototype.updateChild = function (b, c) { | |
| var g = b.getFront(); | |
| if (null === g) return c; | |
| if (c.isEmpty() && ".priority" !== g) return this; | |
| e.assert( | |
| ".priority" !== g || 1 === b.getLength(), | |
| ".priority must be the last token in a path" | |
| ); | |
| return this.updateImmediateChild( | |
| g, | |
| a.__childrenNodeConstructor.EMPTY_NODE.updateChild(b.popFront(), c) | |
| ); | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return !1; | |
| }; | |
| a.prototype.numChildren = function () { | |
| return 0; | |
| }; | |
| a.prototype.forEachChild = function (a, b) { | |
| return !1; | |
| }; | |
| a.prototype.val = function (a) { | |
| return a && !this.getPriority().isEmpty() | |
| ? { ".value": this.getValue(), ".priority": this.getPriority().val() } | |
| : this.getValue(); | |
| }; | |
| a.prototype.hash = function () { | |
| if (null === this.lazyHash_) { | |
| var a = ""; | |
| this.priorityNode_.isEmpty() || | |
| (a += "priority:" + wa(this.priorityNode_.val()) + ":"); | |
| var b = typeof this.value_; | |
| a += b + ":"; | |
| a = "number" === b ? a + Y(this.value_) : a + this.value_; | |
| this.lazyHash_ = E(a); | |
| } | |
| return this.lazyHash_; | |
| }; | |
| a.prototype.getValue = function () { | |
| return this.value_; | |
| }; | |
| a.prototype.compareTo = function (b) { | |
| if (b === a.__childrenNodeConstructor.EMPTY_NODE) return 1; | |
| if (b instanceof a.__childrenNodeConstructor) return -1; | |
| e.assert(b.isLeafNode(), "Unknown node type"); | |
| return this.compareToLeafNode_(b); | |
| }; | |
| a.prototype.compareToLeafNode_ = function (b) { | |
| var c = typeof b.value_, | |
| g = typeof this.value_, | |
| d = a.VALUE_TYPE_ORDER.indexOf(c), | |
| l = a.VALUE_TYPE_ORDER.indexOf(g); | |
| e.assert(0 <= d, "Unknown leaf type: " + c); | |
| e.assert(0 <= l, "Unknown leaf type: " + g); | |
| return d === l | |
| ? "object" === g | |
| ? 0 | |
| : this.value_ < b.value_ | |
| ? -1 | |
| : this.value_ === b.value_ | |
| ? 0 | |
| : 1 | |
| : l - d; | |
| }; | |
| a.prototype.withIndex = function () { | |
| return this; | |
| }; | |
| a.prototype.isIndexed = function () { | |
| return !0; | |
| }; | |
| a.prototype.equals = function (a) { | |
| return a === this | |
| ? !0 | |
| : a.isLeafNode() | |
| ? this.value_ === a.value_ && | |
| this.priorityNode_.equals(a.priorityNode_) | |
| : !1; | |
| }; | |
| a.VALUE_TYPE_ORDER = ["object", "boolean", "number", "string"]; | |
| return a; | |
| })(), | |
| Ja = new ((function (a) { | |
| function b() { | |
| return (null !== a && a.apply(this, arguments)) || this; | |
| } | |
| c.__extends(b, a); | |
| b.prototype.compare = function (a, b) { | |
| var c = a.node.getPriority(), | |
| e = b.node.getPriority(); | |
| c = c.compareTo(e); | |
| return 0 === c ? L(a.name, b.name) : c; | |
| }; | |
| b.prototype.isDefinedOn = function (a) { | |
| return !a.getPriority().isEmpty(); | |
| }; | |
| b.prototype.indexedValueChanged = function (a, b) { | |
| return !a.getPriority().equals(b.getPriority()); | |
| }; | |
| b.prototype.minPost = function () { | |
| return ya.MIN; | |
| }; | |
| b.prototype.maxPost = function () { | |
| return new ya("[MAX_NAME]", new tb("[PRIORITY-POST]", vb)); | |
| }; | |
| b.prototype.makePost = function (a, b) { | |
| a = Zb(a); | |
| return new ya(b, new tb("[PRIORITY-POST]", a)); | |
| }; | |
| b.prototype.toString = function () { | |
| return ".priority"; | |
| }; | |
| return b; | |
| })(jb))(), | |
| cb = (function () { | |
| function a(a, b, c, e, g) { | |
| void 0 === g && (g = null); | |
| this.isReverse_ = e; | |
| this.resultGenerator_ = g; | |
| for (this.nodeStack_ = []; !a.isEmpty(); ) | |
| if (((g = b ? c(a.key, b) : 1), e && (g *= -1), 0 > g)) | |
| a = this.isReverse_ ? a.left : a.right; | |
| else if (0 === g) { | |
| this.nodeStack_.push(a); | |
| break; | |
| } else | |
| this.nodeStack_.push(a), (a = this.isReverse_ ? a.right : a.left); | |
| } | |
| a.prototype.getNext = function () { | |
| if (0 === this.nodeStack_.length) return null; | |
| var a = this.nodeStack_.pop(); | |
| var b = this.resultGenerator_ | |
| ? this.resultGenerator_(a.key, a.value) | |
| : { key: a.key, value: a.value }; | |
| if (this.isReverse_) | |
| for (a = a.left; !a.isEmpty(); ) | |
| this.nodeStack_.push(a), (a = a.right); | |
| else | |
| for (a = a.right; !a.isEmpty(); ) | |
| this.nodeStack_.push(a), (a = a.left); | |
| return b; | |
| }; | |
| a.prototype.hasNext = function () { | |
| return 0 < this.nodeStack_.length; | |
| }; | |
| a.prototype.peek = function () { | |
| if (0 === this.nodeStack_.length) return null; | |
| var a = this.nodeStack_[this.nodeStack_.length - 1]; | |
| return this.resultGenerator_ | |
| ? this.resultGenerator_(a.key, a.value) | |
| : { key: a.key, value: a.value }; | |
| }; | |
| return a; | |
| })(), | |
| Xa = (function () { | |
| function a(b, c, e, g, d) { | |
| this.key = b; | |
| this.value = c; | |
| this.color = null != e ? e : a.RED; | |
| this.left = null != g ? g : ta.EMPTY_NODE; | |
| this.right = null != d ? d : ta.EMPTY_NODE; | |
| } | |
| a.prototype.copy = function (b, c, e, g, d) { | |
| return new a( | |
| null != b ? b : this.key, | |
| null != c ? c : this.value, | |
| null != e ? e : this.color, | |
| null != g ? g : this.left, | |
| null != d ? d : this.right | |
| ); | |
| }; | |
| a.prototype.count = function () { | |
| return this.left.count() + 1 + this.right.count(); | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return !1; | |
| }; | |
| a.prototype.inorderTraversal = function (a) { | |
| return ( | |
| this.left.inorderTraversal(a) || | |
| !!a(this.key, this.value) || | |
| this.right.inorderTraversal(a) | |
| ); | |
| }; | |
| a.prototype.reverseTraversal = function (a) { | |
| return ( | |
| this.right.reverseTraversal(a) || | |
| a(this.key, this.value) || | |
| this.left.reverseTraversal(a) | |
| ); | |
| }; | |
| a.prototype.min_ = function () { | |
| return this.left.isEmpty() ? this : this.left.min_(); | |
| }; | |
| a.prototype.minKey = function () { | |
| return this.min_().key; | |
| }; | |
| a.prototype.maxKey = function () { | |
| return this.right.isEmpty() ? this.key : this.right.maxKey(); | |
| }; | |
| a.prototype.insert = function (a, b, c) { | |
| var e = this, | |
| g = c(a, e.key); | |
| e = | |
| 0 > g | |
| ? e.copy(null, null, null, e.left.insert(a, b, c), null) | |
| : 0 === g | |
| ? e.copy(null, b, null, null, null) | |
| : e.copy(null, null, null, null, e.right.insert(a, b, c)); | |
| return e.fixUp_(); | |
| }; | |
| a.prototype.removeMin_ = function () { | |
| if (this.left.isEmpty()) return ta.EMPTY_NODE; | |
| var a = this; | |
| a.left.isRed_() || a.left.left.isRed_() || (a = a.moveRedLeft_()); | |
| a = a.copy(null, null, null, a.left.removeMin_(), null); | |
| return a.fixUp_(); | |
| }; | |
| a.prototype.remove = function (a, b) { | |
| var c = this; | |
| if (0 > b(a, c.key)) | |
| c.left.isEmpty() || | |
| c.left.isRed_() || | |
| c.left.left.isRed_() || | |
| (c = c.moveRedLeft_()), | |
| (c = c.copy(null, null, null, c.left.remove(a, b), null)); | |
| else { | |
| c.left.isRed_() && (c = c.rotateRight_()); | |
| c.right.isEmpty() || | |
| c.right.isRed_() || | |
| c.right.left.isRed_() || | |
| (c = c.moveRedRight_()); | |
| if (0 === b(a, c.key)) { | |
| if (c.right.isEmpty()) return ta.EMPTY_NODE; | |
| var e = c.right.min_(); | |
| c = c.copy(e.key, e.value, null, null, c.right.removeMin_()); | |
| } | |
| c = c.copy(null, null, null, null, c.right.remove(a, b)); | |
| } | |
| return c.fixUp_(); | |
| }; | |
| a.prototype.isRed_ = function () { | |
| return this.color; | |
| }; | |
| a.prototype.fixUp_ = function () { | |
| var a = this; | |
| a.right.isRed_() && !a.left.isRed_() && (a = a.rotateLeft_()); | |
| a.left.isRed_() && a.left.left.isRed_() && (a = a.rotateRight_()); | |
| a.left.isRed_() && a.right.isRed_() && (a = a.colorFlip_()); | |
| return a; | |
| }; | |
| a.prototype.moveRedLeft_ = function () { | |
| var a = this.colorFlip_(); | |
| a.right.left.isRed_() && | |
| ((a = a.copy(null, null, null, null, a.right.rotateRight_())), | |
| (a = a.rotateLeft_()), | |
| (a = a.colorFlip_())); | |
| return a; | |
| }; | |
| a.prototype.moveRedRight_ = function () { | |
| var a = this.colorFlip_(); | |
| a.left.left.isRed_() && ((a = a.rotateRight_()), (a = a.colorFlip_())); | |
| return a; | |
| }; | |
| a.prototype.rotateLeft_ = function () { | |
| var b = this.copy(null, null, a.RED, null, this.right.left); | |
| return this.right.copy(null, null, this.color, b, null); | |
| }; | |
| a.prototype.rotateRight_ = function () { | |
| var b = this.copy(null, null, a.RED, this.left.right, null); | |
| return this.left.copy(null, null, this.color, null, b); | |
| }; | |
| a.prototype.colorFlip_ = function () { | |
| var a = this.left.copy(null, null, !this.left.color, null, null), | |
| b = this.right.copy(null, null, !this.right.color, null, null); | |
| return this.copy(null, null, !this.color, a, b); | |
| }; | |
| a.prototype.checkMaxDepth_ = function () { | |
| var a = this.check_(); | |
| return Math.pow(2, a) <= this.count() + 1; | |
| }; | |
| a.prototype.check_ = function () { | |
| if (this.isRed_() && this.left.isRed_()) | |
| throw Error( | |
| "Red node has red child(" + this.key + "," + this.value + ")" | |
| ); | |
| if (this.right.isRed_()) | |
| throw Error( | |
| "Right child of (" + this.key + "," + this.value + ") is red" | |
| ); | |
| var a = this.left.check_(); | |
| if (a !== this.right.check_()) throw Error("Black depths differ"); | |
| return a + (this.isRed_() ? 0 : 1); | |
| }; | |
| a.RED = !0; | |
| a.BLACK = !1; | |
| return a; | |
| })(), | |
| qb = (function () { | |
| function a() {} | |
| a.prototype.copy = function (a, b, c, e, g) { | |
| return this; | |
| }; | |
| a.prototype.insert = function (a, b, c) { | |
| return new Xa(a, b, null); | |
| }; | |
| a.prototype.remove = function (a, b) { | |
| return this; | |
| }; | |
| a.prototype.count = function () { | |
| return 0; | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return !0; | |
| }; | |
| a.prototype.inorderTraversal = function (a) { | |
| return !1; | |
| }; | |
| a.prototype.reverseTraversal = function (a) { | |
| return !1; | |
| }; | |
| a.prototype.minKey = function () { | |
| return null; | |
| }; | |
| a.prototype.maxKey = function () { | |
| return null; | |
| }; | |
| a.prototype.check_ = function () { | |
| return 0; | |
| }; | |
| a.prototype.isRed_ = function () { | |
| return !1; | |
| }; | |
| return a; | |
| })(), | |
| ta = (function () { | |
| function a(b, c) { | |
| void 0 === c && (c = a.EMPTY_NODE); | |
| this.comparator_ = b; | |
| this.root_ = c; | |
| } | |
| a.prototype.insert = function (b, c) { | |
| return new a( | |
| this.comparator_, | |
| this.root_ | |
| .insert(b, c, this.comparator_) | |
| .copy(null, null, Xa.BLACK, null, null) | |
| ); | |
| }; | |
| a.prototype.remove = function (b) { | |
| return new a( | |
| this.comparator_, | |
| this.root_ | |
| .remove(b, this.comparator_) | |
| .copy(null, null, Xa.BLACK, null, null) | |
| ); | |
| }; | |
| a.prototype.get = function (a) { | |
| for (var b, c = this.root_; !c.isEmpty(); ) { | |
| b = this.comparator_(a, c.key); | |
| if (0 === b) return c.value; | |
| 0 > b ? (c = c.left) : 0 < b && (c = c.right); | |
| } | |
| return null; | |
| }; | |
| a.prototype.getPredecessorKey = function (a) { | |
| for (var b, c = this.root_, e = null; !c.isEmpty(); ) { | |
| b = this.comparator_(a, c.key); | |
| if (0 === b) { | |
| if (c.left.isEmpty()) return e ? e.key : null; | |
| for (c = c.left; !c.right.isEmpty(); ) c = c.right; | |
| return c.key; | |
| } | |
| 0 > b ? (c = c.left) : 0 < b && ((e = c), (c = c.right)); | |
| } | |
| throw Error( | |
| "Attempted to find predecessor key for a nonexistent key. What gives?" | |
| ); | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return this.root_.isEmpty(); | |
| }; | |
| a.prototype.count = function () { | |
| return this.root_.count(); | |
| }; | |
| a.prototype.minKey = function () { | |
| return this.root_.minKey(); | |
| }; | |
| a.prototype.maxKey = function () { | |
| return this.root_.maxKey(); | |
| }; | |
| a.prototype.inorderTraversal = function (a) { | |
| return this.root_.inorderTraversal(a); | |
| }; | |
| a.prototype.reverseTraversal = function (a) { | |
| return this.root_.reverseTraversal(a); | |
| }; | |
| a.prototype.getIterator = function (a) { | |
| return new cb(this.root_, null, this.comparator_, !1, a); | |
| }; | |
| a.prototype.getIteratorFrom = function (a, b) { | |
| return new cb(this.root_, a, this.comparator_, !1, b); | |
| }; | |
| a.prototype.getReverseIteratorFrom = function (a, b) { | |
| return new cb(this.root_, a, this.comparator_, !0, b); | |
| }; | |
| a.prototype.getReverseIterator = function (a) { | |
| return new cb(this.root_, null, this.comparator_, !0, a); | |
| }; | |
| a.EMPTY_NODE = new qb(); | |
| return a; | |
| })(), | |
| Ya = Math.log(2), | |
| Ta = (function () { | |
| function a(a) { | |
| this.count = parseInt(Math.log(a + 1) / Ya, 10); | |
| this.current_ = this.count - 1; | |
| var b = parseInt(Array(this.count + 1).join("1"), 2); | |
| this.bits_ = (a + 1) & b; | |
| } | |
| a.prototype.nextBitIsOne = function () { | |
| var a = !(this.bits_ & (1 << this.current_)); | |
| this.current_--; | |
| return a; | |
| }; | |
| return a; | |
| })(), | |
| kb = function (a, b, c, e) { | |
| a.sort(b); | |
| var g = function (b, e) { | |
| var d = e - b; | |
| if (0 === d) return null; | |
| if (1 === d) { | |
| d = a[b]; | |
| var l = c ? c(d) : d; | |
| return new Xa(l, d.node, Xa.BLACK, null, null); | |
| } | |
| d = parseInt(d / 2, 10) + b; | |
| b = g(b, d); | |
| e = g(d + 1, e); | |
| d = a[d]; | |
| l = c ? c(d) : d; | |
| return new Xa(l, d.node, Xa.BLACK, b, e); | |
| }, | |
| d = (function (b) { | |
| for ( | |
| var e = null, | |
| d = null, | |
| l = a.length, | |
| h = function (b, h) { | |
| var k = l - b, | |
| n = l; | |
| l -= b; | |
| b = g(k + 1, n); | |
| k = a[k]; | |
| n = c ? c(k) : k; | |
| h = new Xa(n, k.node, h, null, b); | |
| e ? (e.left = h) : (d = h); | |
| e = h; | |
| }, | |
| k = 0; | |
| k < b.count; | |
| ++k | |
| ) { | |
| var n = b.nextBitIsOne(), | |
| v = Math.pow(2, b.count - (k + 1)); | |
| n ? h(v, Xa.BLACK) : (h(v, Xa.BLACK), h(v, Xa.RED)); | |
| } | |
| return d; | |
| })(new Ta(a.length)); | |
| return new ta(e || b, d); | |
| }, | |
| rb, | |
| Wb = {}, | |
| Yb = (function () { | |
| function a(a, b) { | |
| this.indexes_ = a; | |
| this.indexSet_ = b; | |
| } | |
| Object.defineProperty(a, "Default", { | |
| get: function () { | |
| e.assert(Wb && Ja, "ChildrenNode.ts has not been loaded"); | |
| return (rb = rb || new a({ ".priority": Wb }, { ".priority": Ja })); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.get = function (a) { | |
| var b = e.safeGet(this.indexes_, a); | |
| if (!b) throw Error("No index defined for " + a); | |
| return b instanceof ta ? b : null; | |
| }; | |
| a.prototype.hasIndex = function (a) { | |
| return e.contains(this.indexSet_, a.toString()); | |
| }; | |
| a.prototype.addIndex = function (b, g) { | |
| e.assert( | |
| b !== Va, | |
| "KeyIndex always exists and isn't meant to be added to the IndexMap." | |
| ); | |
| var d = [], | |
| l = !1; | |
| g = g.getIterator(ya.Wrap); | |
| for (var h = g.getNext(); h; ) | |
| (l = l || b.isDefinedOn(h.node)), d.push(h), (h = g.getNext()); | |
| d = l ? kb(d, b.getCompare()) : Wb; | |
| l = b.toString(); | |
| g = c.__assign({}, this.indexSet_); | |
| g[l] = b; | |
| b = c.__assign({}, this.indexes_); | |
| b[l] = d; | |
| return new a(b, g); | |
| }; | |
| a.prototype.addToIndexes = function (b, c) { | |
| var g = this, | |
| d = e.map(this.indexes_, function (a, d) { | |
| var l = e.safeGet(g.indexSet_, d); | |
| e.assert(l, "Missing index implementation for " + d); | |
| if (a === Wb) { | |
| if (l.isDefinedOn(b.node)) { | |
| a = []; | |
| d = c.getIterator(ya.Wrap); | |
| for (var h = d.getNext(); h; ) | |
| h.name !== b.name && a.push(h), (h = d.getNext()); | |
| a.push(b); | |
| return kb(a, l.getCompare()); | |
| } | |
| return Wb; | |
| } | |
| (l = c.get(b.name)) && (a = a.remove(new ya(b.name, l))); | |
| return a.insert(b, b.node); | |
| }); | |
| return new a(d, this.indexSet_); | |
| }; | |
| a.prototype.removeFromIndexes = function (b, c) { | |
| var g = e.map(this.indexes_, function (a) { | |
| if (a === Wb) return a; | |
| var e = c.get(b.name); | |
| return e ? a.remove(new ya(b.name, e)) : a; | |
| }); | |
| return new a(g, this.indexSet_); | |
| }; | |
| return a; | |
| })(), | |
| Ea, | |
| Na = (function () { | |
| function a(a, b, c) { | |
| this.children_ = a; | |
| this.priorityNode_ = b; | |
| this.indexMap_ = c; | |
| this.lazyHash_ = null; | |
| this.priorityNode_ && ma(this.priorityNode_); | |
| this.children_.isEmpty() && | |
| e.assert( | |
| !this.priorityNode_ || this.priorityNode_.isEmpty(), | |
| "An empty node cannot have a priority" | |
| ); | |
| } | |
| Object.defineProperty(a, "EMPTY_NODE", { | |
| get: function () { | |
| return Ea || (Ea = new a(new ta(q), null, Yb.Default)); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.isLeafNode = function () { | |
| return !1; | |
| }; | |
| a.prototype.getPriority = function () { | |
| return this.priorityNode_ || Ea; | |
| }; | |
| a.prototype.updatePriority = function (b) { | |
| return this.children_.isEmpty() | |
| ? this | |
| : new a(this.children_, b, this.indexMap_); | |
| }; | |
| a.prototype.getImmediateChild = function (a) { | |
| if (".priority" === a) return this.getPriority(); | |
| a = this.children_.get(a); | |
| return null === a ? Ea : a; | |
| }; | |
| a.prototype.getChild = function (a) { | |
| var b = a.getFront(); | |
| return null === b | |
| ? this | |
| : this.getImmediateChild(b).getChild(a.popFront()); | |
| }; | |
| a.prototype.hasChild = function (a) { | |
| return null !== this.children_.get(a); | |
| }; | |
| a.prototype.updateImmediateChild = function (b, c) { | |
| e.assert(c, "We should always be passing snapshot nodes"); | |
| if (".priority" === b) return this.updatePriority(c); | |
| var g = new ya(b, c); | |
| c.isEmpty() | |
| ? ((b = this.children_.remove(b)), | |
| (g = this.indexMap_.removeFromIndexes(g, this.children_))) | |
| : ((b = this.children_.insert(b, c)), | |
| (g = this.indexMap_.addToIndexes(g, this.children_))); | |
| c = b.isEmpty() ? Ea : this.priorityNode_; | |
| return new a(b, c, g); | |
| }; | |
| a.prototype.updateChild = function (a, b) { | |
| var c = a.getFront(); | |
| if (null === c) return b; | |
| e.assert( | |
| ".priority" !== a.getFront() || 1 === a.getLength(), | |
| ".priority must be the last token in a path" | |
| ); | |
| a = this.getImmediateChild(c).updateChild(a.popFront(), b); | |
| return this.updateImmediateChild(c, a); | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return this.children_.isEmpty(); | |
| }; | |
| a.prototype.numChildren = function () { | |
| return this.children_.count(); | |
| }; | |
| a.prototype.val = function (b) { | |
| if (this.isEmpty()) return null; | |
| var c = {}, | |
| e = 0, | |
| g = 0, | |
| d = !0; | |
| this.forEachChild(Ja, function (l, h) { | |
| c[l] = h.val(b); | |
| e++; | |
| d && a.INTEGER_REGEXP_.test(l) | |
| ? (g = Math.max(g, Number(l))) | |
| : (d = !1); | |
| }); | |
| if (!b && d && g < 2 * e) { | |
| var l = [], | |
| h; | |
| for (h in c) l[h] = c[h]; | |
| return l; | |
| } | |
| b && | |
| !this.getPriority().isEmpty() && | |
| (c[".priority"] = this.getPriority().val()); | |
| return c; | |
| }; | |
| a.prototype.hash = function () { | |
| if (null === this.lazyHash_) { | |
| var a = ""; | |
| this.getPriority().isEmpty() || | |
| (a += "priority:" + wa(this.getPriority().val()) + ":"); | |
| this.forEachChild(Ja, function (b, c) { | |
| c = c.hash(); | |
| "" !== c && (a += ":" + b + ":" + c); | |
| }); | |
| this.lazyHash_ = "" === a ? "" : E(a); | |
| } | |
| return this.lazyHash_; | |
| }; | |
| a.prototype.getPredecessorChildName = function (a, b, c) { | |
| return (c = this.resolveIndex_(c)) | |
| ? (a = c.getPredecessorKey(new ya(a, b))) | |
| ? a.name | |
| : null | |
| : this.children_.getPredecessorKey(a); | |
| }; | |
| a.prototype.getFirstChildName = function (a) { | |
| return (a = this.resolveIndex_(a)) | |
| ? (a = a.minKey()) && a.name | |
| : this.children_.minKey(); | |
| }; | |
| a.prototype.getFirstChild = function (a) { | |
| return (a = this.getFirstChildName(a)) | |
| ? new ya(a, this.children_.get(a)) | |
| : null; | |
| }; | |
| a.prototype.getLastChildName = function (a) { | |
| return (a = this.resolveIndex_(a)) | |
| ? (a = a.maxKey()) && a.name | |
| : this.children_.maxKey(); | |
| }; | |
| a.prototype.getLastChild = function (a) { | |
| return (a = this.getLastChildName(a)) | |
| ? new ya(a, this.children_.get(a)) | |
| : null; | |
| }; | |
| a.prototype.forEachChild = function (a, b) { | |
| return (a = this.resolveIndex_(a)) | |
| ? a.inorderTraversal(function (a) { | |
| return b(a.name, a.node); | |
| }) | |
| : this.children_.inorderTraversal(b); | |
| }; | |
| a.prototype.getIterator = function (a) { | |
| return this.getIteratorFrom(a.minPost(), a); | |
| }; | |
| a.prototype.getIteratorFrom = function (a, b) { | |
| var c = this.resolveIndex_(b); | |
| if (c) | |
| return c.getIteratorFrom(a, function (a) { | |
| return a; | |
| }); | |
| c = this.children_.getIteratorFrom(a.name, ya.Wrap); | |
| for (var e = c.peek(); null != e && 0 > b.compare(e, a); ) | |
| c.getNext(), (e = c.peek()); | |
| return c; | |
| }; | |
| a.prototype.getReverseIterator = function (a) { | |
| return this.getReverseIteratorFrom(a.maxPost(), a); | |
| }; | |
| a.prototype.getReverseIteratorFrom = function (a, b) { | |
| var c = this.resolveIndex_(b); | |
| if (c) | |
| return c.getReverseIteratorFrom(a, function (a) { | |
| return a; | |
| }); | |
| c = this.children_.getReverseIteratorFrom(a.name, ya.Wrap); | |
| for (var e = c.peek(); null != e && 0 < b.compare(e, a); ) | |
| c.getNext(), (e = c.peek()); | |
| return c; | |
| }; | |
| a.prototype.compareTo = function (a) { | |
| return this.isEmpty() | |
| ? a.isEmpty() | |
| ? 0 | |
| : -1 | |
| : a.isLeafNode() || a.isEmpty() | |
| ? 1 | |
| : a === xd | |
| ? -1 | |
| : 0; | |
| }; | |
| a.prototype.withIndex = function (b) { | |
| if (b === Va || this.indexMap_.hasIndex(b)) return this; | |
| b = this.indexMap_.addIndex(b, this.children_); | |
| return new a(this.children_, this.priorityNode_, b); | |
| }; | |
| a.prototype.isIndexed = function (a) { | |
| return a === Va || this.indexMap_.hasIndex(a); | |
| }; | |
| a.prototype.equals = function (a) { | |
| if (a === this) return !0; | |
| if (a.isLeafNode()) return !1; | |
| if ( | |
| this.getPriority().equals(a.getPriority()) && | |
| this.children_.count() === a.children_.count() | |
| ) { | |
| var b = this.getIterator(Ja); | |
| a = a.getIterator(Ja); | |
| for (var c = b.getNext(), e = a.getNext(); c && e; ) { | |
| if (c.name !== e.name || !c.node.equals(e.node)) return !1; | |
| c = b.getNext(); | |
| e = a.getNext(); | |
| } | |
| return null === c && null === e; | |
| } | |
| return !1; | |
| }; | |
| a.prototype.resolveIndex_ = function (a) { | |
| return a === Va ? null : this.indexMap_.get(a.toString()); | |
| }; | |
| a.INTEGER_REGEXP_ = /^(0|[1-9]\d*)$/; | |
| return a; | |
| })(), | |
| xd = new ((function (a) { | |
| function b() { | |
| return a.call(this, new ta(q), Na.EMPTY_NODE, Yb.Default) || this; | |
| } | |
| c.__extends(b, a); | |
| b.prototype.compareTo = function (a) { | |
| return a === this ? 0 : 1; | |
| }; | |
| b.prototype.equals = function (a) { | |
| return a === this; | |
| }; | |
| b.prototype.getPriority = function () { | |
| return this; | |
| }; | |
| b.prototype.getImmediateChild = function (a) { | |
| return Na.EMPTY_NODE; | |
| }; | |
| b.prototype.isEmpty = function () { | |
| return !1; | |
| }; | |
| return b; | |
| })(Na))(); | |
| Object.defineProperties(ya, { | |
| MIN: { value: new ya("[MIN_NAME]", Na.EMPTY_NODE) }, | |
| MAX: { value: new ya("[MAX_NAME]", xd) }, | |
| }); | |
| na.__EMPTY_NODE = Na.EMPTY_NODE; | |
| tb.__childrenNodeConstructor = Na; | |
| var vb = (ua = xd); | |
| var Zb = h; | |
| var Lc = new ((function (a) { | |
| function b() { | |
| return (null !== a && a.apply(this, arguments)) || this; | |
| } | |
| c.__extends(b, a); | |
| b.prototype.compare = function (a, b) { | |
| var c = a.node.compareTo(b.node); | |
| return 0 === c ? L(a.name, b.name) : c; | |
| }; | |
| b.prototype.isDefinedOn = function (a) { | |
| return !0; | |
| }; | |
| b.prototype.indexedValueChanged = function (a, b) { | |
| return !a.equals(b); | |
| }; | |
| b.prototype.minPost = function () { | |
| return ya.MIN; | |
| }; | |
| b.prototype.maxPost = function () { | |
| return ya.MAX; | |
| }; | |
| b.prototype.makePost = function (a, b) { | |
| a = h(a); | |
| return new ya(b, a); | |
| }; | |
| b.prototype.toString = function () { | |
| return ".value"; | |
| }; | |
| return b; | |
| })(jb))(), | |
| nb = (function (a) { | |
| function b(b) { | |
| var c = a.call(this) || this; | |
| c.indexPath_ = b; | |
| e.assert( | |
| !b.isEmpty() && ".priority" !== b.getFront(), | |
| "Can't create PathIndex with empty path or .priority key" | |
| ); | |
| return c; | |
| } | |
| c.__extends(b, a); | |
| b.prototype.extractChild = function (a) { | |
| return a.getChild(this.indexPath_); | |
| }; | |
| b.prototype.isDefinedOn = function (a) { | |
| return !a.getChild(this.indexPath_).isEmpty(); | |
| }; | |
| b.prototype.compare = function (a, b) { | |
| var c = this.extractChild(a.node), | |
| e = this.extractChild(b.node); | |
| c = c.compareTo(e); | |
| return 0 === c ? L(a.name, b.name) : c; | |
| }; | |
| b.prototype.makePost = function (a, b) { | |
| a = h(a); | |
| a = Na.EMPTY_NODE.updateChild(this.indexPath_, a); | |
| return new ya(b, a); | |
| }; | |
| b.prototype.maxPost = function () { | |
| var a = Na.EMPTY_NODE.updateChild(this.indexPath_, xd); | |
| return new ya("[MAX_NAME]", a); | |
| }; | |
| b.prototype.toString = function () { | |
| return this.indexPath_.slice().join("/"); | |
| }; | |
| return b; | |
| })(jb), | |
| Sa = (function () { | |
| function a(a, b, c) { | |
| this.node_ = a; | |
| this.ref_ = b; | |
| this.index_ = c; | |
| } | |
| a.prototype.val = function () { | |
| e.validateArgCount("DataSnapshot.val", 0, 0, arguments.length); | |
| return this.node_.val(); | |
| }; | |
| a.prototype.exportVal = function () { | |
| e.validateArgCount("DataSnapshot.exportVal", 0, 0, arguments.length); | |
| return this.node_.val(!0); | |
| }; | |
| a.prototype.toJSON = function () { | |
| e.validateArgCount("DataSnapshot.toJSON", 0, 1, arguments.length); | |
| return this.exportVal(); | |
| }; | |
| a.prototype.exists = function () { | |
| e.validateArgCount("DataSnapshot.exists", 0, 0, arguments.length); | |
| return !this.node_.isEmpty(); | |
| }; | |
| a.prototype.child = function (b) { | |
| e.validateArgCount("DataSnapshot.child", 0, 1, arguments.length); | |
| b = String(b); | |
| X("DataSnapshot.child", 1, b, !1); | |
| var c = new fa(b), | |
| g = this.ref_.child(c); | |
| return new a(this.node_.getChild(c), g, Ja); | |
| }; | |
| a.prototype.hasChild = function (a) { | |
| e.validateArgCount("DataSnapshot.hasChild", 1, 1, arguments.length); | |
| X("DataSnapshot.hasChild", 1, a, !1); | |
| var b = new fa(a); | |
| return !this.node_.getChild(b).isEmpty(); | |
| }; | |
| a.prototype.getPriority = function () { | |
| e.validateArgCount("DataSnapshot.getPriority", 0, 0, arguments.length); | |
| return this.node_.getPriority().val(); | |
| }; | |
| a.prototype.forEach = function (b) { | |
| var c = this; | |
| e.validateArgCount("DataSnapshot.forEach", 1, 1, arguments.length); | |
| e.validateCallback("DataSnapshot.forEach", 1, b, !1); | |
| return this.node_.isLeafNode() | |
| ? !1 | |
| : !!this.node_.forEachChild(this.index_, function (e, g) { | |
| return b(new a(g, c.ref_.child(e), Ja)); | |
| }); | |
| }; | |
| a.prototype.hasChildren = function () { | |
| e.validateArgCount("DataSnapshot.hasChildren", 0, 0, arguments.length); | |
| return this.node_.isLeafNode() ? !1 : !this.node_.isEmpty(); | |
| }; | |
| Object.defineProperty(a.prototype, "key", { | |
| get: function () { | |
| return this.ref_.getKey(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.numChildren = function () { | |
| e.validateArgCount("DataSnapshot.numChildren", 0, 0, arguments.length); | |
| return this.node_.numChildren(); | |
| }; | |
| a.prototype.getRef = function () { | |
| e.validateArgCount("DataSnapshot.ref", 0, 0, arguments.length); | |
| return this.ref_; | |
| }; | |
| Object.defineProperty(a.prototype, "ref", { | |
| get: function () { | |
| return this.getRef(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| return a; | |
| })(), | |
| $b = (function () { | |
| function a(a, b, c, e) { | |
| this.eventType = a; | |
| this.eventRegistration = b; | |
| this.snapshot = c; | |
| this.prevName = e; | |
| } | |
| a.prototype.getPath = function () { | |
| var a = this.snapshot.getRef(); | |
| return "value" === this.eventType ? a.path : a.getParent().path; | |
| }; | |
| a.prototype.getEventType = function () { | |
| return this.eventType; | |
| }; | |
| a.prototype.getEventRunner = function () { | |
| return this.eventRegistration.getEventRunner(this); | |
| }; | |
| a.prototype.toString = function () { | |
| return ( | |
| this.getPath().toString() + | |
| ":" + | |
| this.eventType + | |
| ":" + | |
| e.stringify(this.snapshot.exportVal()) | |
| ); | |
| }; | |
| return a; | |
| })(), | |
| Ha = (function () { | |
| function a(a, b, c) { | |
| this.eventRegistration = a; | |
| this.error = b; | |
| this.path = c; | |
| } | |
| a.prototype.getPath = function () { | |
| return this.path; | |
| }; | |
| a.prototype.getEventType = function () { | |
| return "cancel"; | |
| }; | |
| a.prototype.getEventRunner = function () { | |
| return this.eventRegistration.getEventRunner(this); | |
| }; | |
| a.prototype.toString = function () { | |
| return this.path.toString() + ":cancel"; | |
| }; | |
| return a; | |
| })(), | |
| kc = (function () { | |
| function a(a, b, c) { | |
| this.callback_ = a; | |
| this.cancelCallback_ = b; | |
| this.context_ = c; | |
| } | |
| a.prototype.respondsTo = function (a) { | |
| return "value" === a; | |
| }; | |
| a.prototype.createEvent = function (a, b) { | |
| var c = b.getQueryParams().getIndex(); | |
| return new $b("value", this, new Sa(a.snapshotNode, b.getRef(), c)); | |
| }; | |
| a.prototype.getEventRunner = function (a) { | |
| var b = this.context_; | |
| if ("cancel" === a.getEventType()) { | |
| e.assert( | |
| this.cancelCallback_, | |
| "Raising a cancel event on a listener with no cancel callback" | |
| ); | |
| var c = this.cancelCallback_; | |
| return function () { | |
| c.call(b, a.error); | |
| }; | |
| } | |
| var g = this.callback_; | |
| return function () { | |
| g.call(b, a.snapshot); | |
| }; | |
| }; | |
| a.prototype.createCancelEvent = function (a, b) { | |
| return this.cancelCallback_ ? new Ha(this, a, b) : null; | |
| }; | |
| a.prototype.matches = function (b) { | |
| return b instanceof a | |
| ? b.callback_ && this.callback_ | |
| ? b.callback_ === this.callback_ && b.context_ === this.context_ | |
| : !0 | |
| : !1; | |
| }; | |
| a.prototype.hasAnyCallback = function () { | |
| return null !== this.callback_; | |
| }; | |
| return a; | |
| })(), | |
| Hc = (function () { | |
| function a(a, b, c) { | |
| this.callbacks_ = a; | |
| this.cancelCallback_ = b; | |
| this.context_ = c; | |
| } | |
| a.prototype.respondsTo = function (a) { | |
| a = "children_added" === a ? "child_added" : a; | |
| return e.contains( | |
| this.callbacks_, | |
| "children_removed" === a ? "child_removed" : a | |
| ); | |
| }; | |
| a.prototype.createCancelEvent = function (a, b) { | |
| return this.cancelCallback_ ? new Ha(this, a, b) : null; | |
| }; | |
| a.prototype.createEvent = function (a, b) { | |
| e.assert(null != a.childName, "Child events should have a childName."); | |
| var c = b.getRef().child(a.childName); | |
| b = b.getQueryParams().getIndex(); | |
| return new $b(a.type, this, new Sa(a.snapshotNode, c, b), a.prevName); | |
| }; | |
| a.prototype.getEventRunner = function (a) { | |
| var b = this.context_; | |
| if ("cancel" === a.getEventType()) { | |
| e.assert( | |
| this.cancelCallback_, | |
| "Raising a cancel event on a listener with no cancel callback" | |
| ); | |
| var c = this.cancelCallback_; | |
| return function () { | |
| c.call(b, a.error); | |
| }; | |
| } | |
| var g = this.callbacks_[a.eventType]; | |
| return function () { | |
| g.call(b, a.snapshot, a.prevName); | |
| }; | |
| }; | |
| a.prototype.matches = function (b) { | |
| var c = this; | |
| if (b instanceof a) { | |
| if (!this.callbacks_ || !b.callbacks_) return !0; | |
| if (this.context_ === b.context_) { | |
| var e = Object.keys(b.callbacks_), | |
| g = Object.keys(this.callbacks_), | |
| d = e.length; | |
| if (d === g.length) | |
| return 1 === d | |
| ? ((e = e[0]), | |
| (g = g[0]), | |
| g === e && | |
| (!b.callbacks_[e] || | |
| !this.callbacks_[g] || | |
| b.callbacks_[e] === this.callbacks_[g])) | |
| : g.every(function (a) { | |
| return b.callbacks_[a] === c.callbacks_[a]; | |
| }); | |
| } | |
| } | |
| return !1; | |
| }; | |
| a.prototype.hasAnyCallback = function () { | |
| return null !== this.callbacks_; | |
| }; | |
| return a; | |
| })(), | |
| xc, | |
| rc = (function () { | |
| function a(a, b, c, e) { | |
| this.repo = a; | |
| this.path = b; | |
| this.queryParams_ = c; | |
| this.orderByCalled_ = e; | |
| } | |
| Object.defineProperty(a, "__referenceConstructor", { | |
| get: function () { | |
| e.assert(xc, "Reference.ts has not been loaded"); | |
| return xc; | |
| }, | |
| set: function (a) { | |
| xc = a; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.validateQueryEndpoints_ = function (a) { | |
| var b = null, | |
| c = null; | |
| a.hasStart() && (b = a.getIndexStartValue()); | |
| a.hasEnd() && (c = a.getIndexEndValue()); | |
| if (a.getIndex() === Va) { | |
| if (a.hasStart()) { | |
| if ("[MIN_NAME]" !== a.getIndexStartName()) | |
| throw Error( | |
| "Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo()." | |
| ); | |
| if ("string" !== typeof b) | |
| throw Error( | |
| "Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string." | |
| ); | |
| } | |
| if (a.hasEnd()) { | |
| if ("[MAX_NAME]" !== a.getIndexEndName()) | |
| throw Error( | |
| "Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo()." | |
| ); | |
| if ("string" !== typeof c) | |
| throw Error( | |
| "Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string." | |
| ); | |
| } | |
| } else if (a.getIndex() === Ja) { | |
| if ((null != b && !za(b)) || (null != c && !za(c))) | |
| throw Error( | |
| "Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string)." | |
| ); | |
| } else if ( | |
| (e.assert( | |
| a.getIndex() instanceof nb || a.getIndex() === Lc, | |
| "unknown index type." | |
| ), | |
| (null != b && "object" === typeof b) || | |
| (null != c && "object" === typeof c)) | |
| ) | |
| throw Error( | |
| "Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object." | |
| ); | |
| }; | |
| a.validateLimit_ = function (a) { | |
| if (a.hasStart() && a.hasEnd() && a.hasLimit() && !a.hasAnchoredLimit()) | |
| throw Error( | |
| "Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead." | |
| ); | |
| }; | |
| a.prototype.validateNoPreviousOrderByCall_ = function (a) { | |
| if (!0 === this.orderByCalled_) | |
| throw Error(a + ": You can't combine multiple orderBy calls."); | |
| }; | |
| a.prototype.getQueryParams = function () { | |
| return this.queryParams_; | |
| }; | |
| a.prototype.getRef = function () { | |
| e.validateArgCount("Query.ref", 0, 0, arguments.length); | |
| return new a.__referenceConstructor(this.repo, this.path); | |
| }; | |
| a.prototype.on = function (b, c, g, d) { | |
| e.validateArgCount("Query.on", 2, 4, arguments.length); | |
| bb("Query.on", 1, b, !1); | |
| e.validateCallback("Query.on", 2, c, !1); | |
| var l = a.getCancelAndContextArgs_("Query.on", g, d); | |
| if ("value" === b) this.onValueEvent(c, l.cancel, l.context); | |
| else { | |
| var h = {}; | |
| h[b] = c; | |
| this.onChildEvent(h, l.cancel, l.context); | |
| } | |
| return c; | |
| }; | |
| a.prototype.onValueEvent = function (a, b, c) { | |
| a = new kc(a, b || null, c || null); | |
| this.repo.addEventCallbackForQuery(this, a); | |
| }; | |
| a.prototype.onChildEvent = function (a, b, c) { | |
| a = new Hc(a, b, c); | |
| this.repo.addEventCallbackForQuery(this, a); | |
| }; | |
| a.prototype.off = function (a, b, c) { | |
| e.validateArgCount("Query.off", 0, 3, arguments.length); | |
| bb("Query.off", 1, a, !0); | |
| e.validateCallback("Query.off", 2, b, !0); | |
| e.validateContextObject("Query.off", 3, c, !0); | |
| var g = null, | |
| d = null; | |
| "value" === a | |
| ? (g = new kc(b || null, null, c || null)) | |
| : a && | |
| (b && ((d = {}), (d[a] = b)), (g = new Hc(d, null, c || null))); | |
| this.repo.removeEventCallbackForQuery(this, g); | |
| }; | |
| a.prototype.once = function (b, c, g, d) { | |
| var l = this; | |
| e.validateArgCount("Query.once", 1, 4, arguments.length); | |
| bb("Query.once", 1, b, !1); | |
| e.validateCallback("Query.once", 2, c, !0); | |
| var h = a.getCancelAndContextArgs_("Query.once", g, d), | |
| k = !0, | |
| n = new e.Deferred(); | |
| n.promise.catch(function () {}); | |
| var v = function (a) { | |
| k && ((k = !1), l.off(b, v), c && c.bind(h.context)(a), n.resolve(a)); | |
| }; | |
| this.on(b, v, function (a) { | |
| l.off(b, v); | |
| h.cancel && h.cancel.bind(h.context)(a); | |
| n.reject(a); | |
| }); | |
| return n.promise; | |
| }; | |
| a.prototype.limitToFirst = function (b) { | |
| e.validateArgCount("Query.limitToFirst", 1, 1, arguments.length); | |
| if ("number" !== typeof b || Math.floor(b) !== b || 0 >= b) | |
| throw Error( | |
| "Query.limitToFirst: First argument must be a positive integer." | |
| ); | |
| if (this.queryParams_.hasLimit()) | |
| throw Error( | |
| "Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast)." | |
| ); | |
| return new a( | |
| this.repo, | |
| this.path, | |
| this.queryParams_.limitToFirst(b), | |
| this.orderByCalled_ | |
| ); | |
| }; | |
| a.prototype.limitToLast = function (b) { | |
| e.validateArgCount("Query.limitToLast", 1, 1, arguments.length); | |
| if ("number" !== typeof b || Math.floor(b) !== b || 0 >= b) | |
| throw Error( | |
| "Query.limitToLast: First argument must be a positive integer." | |
| ); | |
| if (this.queryParams_.hasLimit()) | |
| throw Error( | |
| "Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast)." | |
| ); | |
| return new a( | |
| this.repo, | |
| this.path, | |
| this.queryParams_.limitToLast(b), | |
| this.orderByCalled_ | |
| ); | |
| }; | |
| a.prototype.orderByChild = function (b) { | |
| e.validateArgCount("Query.orderByChild", 1, 1, arguments.length); | |
| if ("$key" === b) | |
| throw Error( | |
| 'Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.' | |
| ); | |
| if ("$priority" === b) | |
| throw Error( | |
| 'Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.' | |
| ); | |
| if ("$value" === b) | |
| throw Error( | |
| 'Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.' | |
| ); | |
| X("Query.orderByChild", 1, b, !1); | |
| this.validateNoPreviousOrderByCall_("Query.orderByChild"); | |
| var c = new fa(b); | |
| if (c.isEmpty()) | |
| throw Error( | |
| "Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead." | |
| ); | |
| c = new nb(c); | |
| c = this.queryParams_.orderBy(c); | |
| a.validateQueryEndpoints_(c); | |
| return new a(this.repo, this.path, c, !0); | |
| }; | |
| a.prototype.orderByKey = function () { | |
| e.validateArgCount("Query.orderByKey", 0, 0, arguments.length); | |
| this.validateNoPreviousOrderByCall_("Query.orderByKey"); | |
| var b = this.queryParams_.orderBy(Va); | |
| a.validateQueryEndpoints_(b); | |
| return new a(this.repo, this.path, b, !0); | |
| }; | |
| a.prototype.orderByPriority = function () { | |
| e.validateArgCount("Query.orderByPriority", 0, 0, arguments.length); | |
| this.validateNoPreviousOrderByCall_("Query.orderByPriority"); | |
| var b = this.queryParams_.orderBy(Ja); | |
| a.validateQueryEndpoints_(b); | |
| return new a(this.repo, this.path, b, !0); | |
| }; | |
| a.prototype.orderByValue = function () { | |
| e.validateArgCount("Query.orderByValue", 0, 0, arguments.length); | |
| this.validateNoPreviousOrderByCall_("Query.orderByValue"); | |
| var b = this.queryParams_.orderBy(Lc); | |
| a.validateQueryEndpoints_(b); | |
| return new a(this.repo, this.path, b, !0); | |
| }; | |
| a.prototype.startAt = function (b, c) { | |
| void 0 === b && (b = null); | |
| e.validateArgCount("Query.startAt", 0, 2, arguments.length); | |
| La("Query.startAt", 1, b, this.path, !0); | |
| aa("Query.startAt", 2, c, !0); | |
| var g = this.queryParams_.startAt(b, c); | |
| a.validateLimit_(g); | |
| a.validateQueryEndpoints_(g); | |
| if (this.queryParams_.hasStart()) | |
| throw Error( | |
| "Query.startAt: Starting point was already set (by another call to startAt or equalTo)." | |
| ); | |
| void 0 === b && (c = b = null); | |
| return new a(this.repo, this.path, g, this.orderByCalled_); | |
| }; | |
| a.prototype.endAt = function (b, c) { | |
| void 0 === b && (b = null); | |
| e.validateArgCount("Query.endAt", 0, 2, arguments.length); | |
| La("Query.endAt", 1, b, this.path, !0); | |
| aa("Query.endAt", 2, c, !0); | |
| var g = this.queryParams_.endAt(b, c); | |
| a.validateLimit_(g); | |
| a.validateQueryEndpoints_(g); | |
| if (this.queryParams_.hasEnd()) | |
| throw Error( | |
| "Query.endAt: Ending point was already set (by another call to endAt or equalTo)." | |
| ); | |
| return new a(this.repo, this.path, g, this.orderByCalled_); | |
| }; | |
| a.prototype.equalTo = function (a, b) { | |
| e.validateArgCount("Query.equalTo", 1, 2, arguments.length); | |
| La("Query.equalTo", 1, a, this.path, !1); | |
| aa("Query.equalTo", 2, b, !0); | |
| if (this.queryParams_.hasStart()) | |
| throw Error( | |
| "Query.equalTo: Starting point was already set (by another call to startAt or equalTo)." | |
| ); | |
| if (this.queryParams_.hasEnd()) | |
| throw Error( | |
| "Query.equalTo: Ending point was already set (by another call to endAt or equalTo)." | |
| ); | |
| return this.startAt(a, b).endAt(a, b); | |
| }; | |
| a.prototype.toString = function () { | |
| e.validateArgCount("Query.toString", 0, 0, arguments.length); | |
| return this.repo.toString() + this.path.toUrlEncodedString(); | |
| }; | |
| a.prototype.toJSON = function () { | |
| e.validateArgCount("Query.toJSON", 0, 1, arguments.length); | |
| return this.toString(); | |
| }; | |
| a.prototype.queryObject = function () { | |
| return this.queryParams_.getQueryObject(); | |
| }; | |
| a.prototype.queryIdentifier = function () { | |
| var a = this.queryObject(); | |
| a = V(a); | |
| return "{}" === a ? "default" : a; | |
| }; | |
| a.prototype.isEqual = function (b) { | |
| e.validateArgCount("Query.isEqual", 1, 1, arguments.length); | |
| if (!(b instanceof a)) | |
| throw Error( | |
| "Query.isEqual failed: First argument must be an instance of firebase.database.Query." | |
| ); | |
| var c = this.repo === b.repo, | |
| g = this.path.equals(b.path), | |
| d = this.queryIdentifier() === b.queryIdentifier(); | |
| return c && g && d; | |
| }; | |
| a.getCancelAndContextArgs_ = function (a, b, c) { | |
| var g = { cancel: null, context: null }; | |
| if (b && c) | |
| (g.cancel = b), | |
| e.validateCallback(a, 3, g.cancel, !0), | |
| (g.context = c), | |
| e.validateContextObject(a, 4, g.context, !0); | |
| else if (b) | |
| if ("object" === typeof b && null !== b) g.context = b; | |
| else if ("function" === typeof b) g.cancel = b; | |
| else | |
| throw Error( | |
| e.errorPrefix(a, 3, !0) + | |
| " must either be a cancel callback or a context object." | |
| ); | |
| return g; | |
| }; | |
| Object.defineProperty(a.prototype, "ref", { | |
| get: function () { | |
| return this.getRef(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| return a; | |
| })(), | |
| yb = (function () { | |
| function a() { | |
| this.value = null; | |
| this.children = new Map(); | |
| } | |
| a.prototype.find = function (a) { | |
| if (null != this.value) return this.value.getChild(a); | |
| if (!a.isEmpty() && 0 < this.children.size) { | |
| var b = a.getFront(); | |
| a = a.popFront(); | |
| return this.children.has(b) ? this.children.get(b).find(a) : null; | |
| } | |
| return null; | |
| }; | |
| a.prototype.remember = function (b, c) { | |
| if (b.isEmpty()) (this.value = c), this.children.clear(); | |
| else if (null !== this.value) this.value = this.value.updateChild(b, c); | |
| else { | |
| var e = b.getFront(); | |
| this.children.has(e) || this.children.set(e, new a()); | |
| e = this.children.get(e); | |
| b = b.popFront(); | |
| e.remember(b, c); | |
| } | |
| }; | |
| a.prototype.forget = function (a) { | |
| if (a.isEmpty()) return (this.value = null), this.children.clear(), !0; | |
| if (null !== this.value) { | |
| if (this.value.isLeafNode()) return !1; | |
| var b = this.value; | |
| this.value = null; | |
| var c = this; | |
| b.forEachChild(Ja, function (a, b) { | |
| c.remember(new fa(a), b); | |
| }); | |
| return this.forget(a); | |
| } | |
| return 0 < this.children.size | |
| ? ((b = a.getFront()), | |
| (a = a.popFront()), | |
| this.children.has(b) && | |
| this.children.get(b).forget(a) && | |
| this.children.delete(b), | |
| 0 === this.children.size) | |
| : !0; | |
| }; | |
| a.prototype.forEachTree = function (a, b) { | |
| null !== this.value | |
| ? b(a, this.value) | |
| : this.forEachChild(function (c, e) { | |
| c = new fa(a.toString() + "/" + c); | |
| e.forEachTree(c, b); | |
| }); | |
| }; | |
| a.prototype.forEachChild = function (a) { | |
| this.children.forEach(function (b, c) { | |
| a(c, b); | |
| }); | |
| }; | |
| return a; | |
| })(), | |
| Gb = function (a, b) { | |
| return a && "object" === typeof a | |
| ? (e.assert(".sv" in a, "Unexpected leaf node or priority contents"), | |
| b[a[".sv"]]) | |
| : a; | |
| }, | |
| dc = function (a, b) { | |
| var c = new yb(); | |
| a.forEachTree(new fa(""), function (a, e) { | |
| c.remember(a, oa(e, b)); | |
| }); | |
| return c; | |
| }, | |
| oa = function (a, b) { | |
| var c = a.getPriority().val(); | |
| c = Gb(c, b); | |
| if (a.isLeafNode()) { | |
| var e = Gb(a.getValue(), b); | |
| return e !== a.getValue() || c !== a.getPriority().val() | |
| ? new tb(e, h(c)) | |
| : a; | |
| } | |
| var g = a; | |
| c !== a.getPriority().val() && (g = g.updatePriority(new tb(c))); | |
| a.forEachChild(Ja, function (a, c) { | |
| var e = oa(c, b); | |
| e !== c && (g = g.updateImmediateChild(a, e)); | |
| }); | |
| return g; | |
| }, | |
| wb; | |
| (function (a) { | |
| a[(a.OVERWRITE = 0)] = "OVERWRITE"; | |
| a[(a.MERGE = 1)] = "MERGE"; | |
| a[(a.ACK_USER_WRITE = 2)] = "ACK_USER_WRITE"; | |
| a[(a.LISTEN_COMPLETE = 3)] = "LISTEN_COMPLETE"; | |
| })(wb || (wb = {})); | |
| var Cc = (function () { | |
| function a(a, b, c, g) { | |
| this.fromUser = a; | |
| this.fromServer = b; | |
| this.queryId = c; | |
| this.tagged = g; | |
| e.assert(!g || b, "Tagged queries must be from server."); | |
| } | |
| a.User = new a(!0, !1, null, !1); | |
| a.Server = new a(!1, !0, null, !1); | |
| a.forServerTaggedQuery = function (b) { | |
| return new a(!1, !0, b, !0); | |
| }; | |
| return a; | |
| })(), | |
| zd = (function () { | |
| function a(a, b, c) { | |
| this.path = a; | |
| this.affectedTree = b; | |
| this.revert = c; | |
| this.type = wb.ACK_USER_WRITE; | |
| this.source = Cc.User; | |
| } | |
| a.prototype.operationForChild = function (b) { | |
| if (this.path.isEmpty()) { | |
| if (null != this.affectedTree.value) | |
| return ( | |
| e.assert( | |
| this.affectedTree.children.isEmpty(), | |
| "affectedTree should not have overlapping affected paths." | |
| ), | |
| this | |
| ); | |
| b = this.affectedTree.subtree(new fa(b)); | |
| return new a(fa.Empty, b, this.revert); | |
| } | |
| e.assert( | |
| this.path.getFront() === b, | |
| "operationForChild called for unrelated child." | |
| ); | |
| return new a(this.path.popFront(), this.affectedTree, this.revert); | |
| }; | |
| return a; | |
| })(), | |
| ba, | |
| $a = (function () { | |
| function a(a, b) { | |
| void 0 === b && (ba || (ba = new ta(N)), (b = ba)); | |
| this.value = a; | |
| this.children = b; | |
| } | |
| a.fromObject = function (c) { | |
| var e = a.Empty; | |
| b(c, function (a, b) { | |
| e = e.set(new fa(a), b); | |
| }); | |
| return e; | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return null === this.value && this.children.isEmpty(); | |
| }; | |
| a.prototype.findRootMostMatchingPathAndValue = function (a, b) { | |
| if (null != this.value && b(this.value)) | |
| return { path: fa.Empty, value: this.value }; | |
| if (a.isEmpty()) return null; | |
| var c = a.getFront(), | |
| e = this.children.get(c); | |
| return null !== e | |
| ? ((a = e.findRootMostMatchingPathAndValue(a.popFront(), b)), | |
| null != a | |
| ? { path: new fa(c).child(a.path), value: a.value } | |
| : null) | |
| : null; | |
| }; | |
| a.prototype.findRootMostValueAndPath = function (a) { | |
| return this.findRootMostMatchingPathAndValue(a, function () { | |
| return !0; | |
| }); | |
| }; | |
| a.prototype.subtree = function (b) { | |
| if (b.isEmpty()) return this; | |
| var c = b.getFront(); | |
| c = this.children.get(c); | |
| return null !== c ? c.subtree(b.popFront()) : a.Empty; | |
| }; | |
| a.prototype.set = function (b, c) { | |
| if (b.isEmpty()) return new a(c, this.children); | |
| var e = b.getFront(); | |
| b = (this.children.get(e) || a.Empty).set(b.popFront(), c); | |
| e = this.children.insert(e, b); | |
| return new a(this.value, e); | |
| }; | |
| a.prototype.remove = function (b) { | |
| if (b.isEmpty()) | |
| return this.children.isEmpty() ? a.Empty : new a(null, this.children); | |
| var c = b.getFront(), | |
| e = this.children.get(c); | |
| return e | |
| ? ((b = e.remove(b.popFront())), | |
| (c = b.isEmpty() | |
| ? this.children.remove(c) | |
| : this.children.insert(c, b)), | |
| null === this.value && c.isEmpty() ? a.Empty : new a(this.value, c)) | |
| : this; | |
| }; | |
| a.prototype.get = function (a) { | |
| if (a.isEmpty()) return this.value; | |
| var b = a.getFront(); | |
| return (b = this.children.get(b)) ? b.get(a.popFront()) : null; | |
| }; | |
| a.prototype.setTree = function (b, c) { | |
| if (b.isEmpty()) return c; | |
| var e = b.getFront(); | |
| b = (this.children.get(e) || a.Empty).setTree(b.popFront(), c); | |
| e = b.isEmpty() ? this.children.remove(e) : this.children.insert(e, b); | |
| return new a(this.value, e); | |
| }; | |
| a.prototype.fold = function (a) { | |
| return this.fold_(fa.Empty, a); | |
| }; | |
| a.prototype.fold_ = function (a, b) { | |
| var c = {}; | |
| this.children.inorderTraversal(function (e, g) { | |
| c[e] = g.fold_(a.child(e), b); | |
| }); | |
| return b(a, this.value, c); | |
| }; | |
| a.prototype.findOnPath = function (a, b) { | |
| return this.findOnPath_(a, fa.Empty, b); | |
| }; | |
| a.prototype.findOnPath_ = function (a, b, c) { | |
| var e = this.value ? c(b, this.value) : !1; | |
| if (e) return e; | |
| if (a.isEmpty()) return null; | |
| e = a.getFront(); | |
| var g = this.children.get(e); | |
| return g ? g.findOnPath_(a.popFront(), b.child(e), c) : null; | |
| }; | |
| a.prototype.foreachOnPath = function (a, b) { | |
| return this.foreachOnPath_(a, fa.Empty, b); | |
| }; | |
| a.prototype.foreachOnPath_ = function (b, c, e) { | |
| if (b.isEmpty()) return this; | |
| this.value && e(c, this.value); | |
| var g = b.getFront(), | |
| d = this.children.get(g); | |
| return d ? d.foreachOnPath_(b.popFront(), c.child(g), e) : a.Empty; | |
| }; | |
| a.prototype.foreach = function (a) { | |
| this.foreach_(fa.Empty, a); | |
| }; | |
| a.prototype.foreach_ = function (a, b) { | |
| this.children.inorderTraversal(function (c, e) { | |
| e.foreach_(a.child(c), b); | |
| }); | |
| this.value && b(a, this.value); | |
| }; | |
| a.prototype.foreachChild = function (a) { | |
| this.children.inorderTraversal(function (b, c) { | |
| c.value && a(b, c.value); | |
| }); | |
| }; | |
| a.Empty = new a(null); | |
| return a; | |
| })(), | |
| Pb = (function () { | |
| function a(a, b) { | |
| this.source = a; | |
| this.path = b; | |
| this.type = wb.LISTEN_COMPLETE; | |
| } | |
| a.prototype.operationForChild = function (b) { | |
| return this.path.isEmpty() | |
| ? new a(this.source, fa.Empty) | |
| : new a(this.source, this.path.popFront()); | |
| }; | |
| return a; | |
| })(), | |
| xb = (function () { | |
| function a(a, b, c) { | |
| this.source = a; | |
| this.path = b; | |
| this.snap = c; | |
| this.type = wb.OVERWRITE; | |
| } | |
| a.prototype.operationForChild = function (b) { | |
| return this.path.isEmpty() | |
| ? new a(this.source, fa.Empty, this.snap.getImmediateChild(b)) | |
| : new a(this.source, this.path.popFront(), this.snap); | |
| }; | |
| return a; | |
| })(), | |
| hb = (function () { | |
| function a(a, b, c) { | |
| this.source = a; | |
| this.path = b; | |
| this.children = c; | |
| this.type = wb.MERGE; | |
| } | |
| a.prototype.operationForChild = function (b) { | |
| if (this.path.isEmpty()) | |
| return ( | |
| (b = this.children.subtree(new fa(b))), | |
| b.isEmpty() | |
| ? null | |
| : b.value | |
| ? new xb(this.source, fa.Empty, b.value) | |
| : new a(this.source, fa.Empty, b) | |
| ); | |
| e.assert( | |
| this.path.getFront() === b, | |
| "Can't get a merge for a child not on the path of the operation" | |
| ); | |
| return new a(this.source, this.path.popFront(), this.children); | |
| }; | |
| a.prototype.toString = function () { | |
| return ( | |
| "Operation(" + | |
| this.path + | |
| ": " + | |
| this.source.toString() + | |
| " merge: " + | |
| this.children.toString() + | |
| ")" | |
| ); | |
| }; | |
| return a; | |
| })(), | |
| Tb = (function () { | |
| function a(a, b, c) { | |
| this.node_ = a; | |
| this.fullyInitialized_ = b; | |
| this.filtered_ = c; | |
| } | |
| a.prototype.isFullyInitialized = function () { | |
| return this.fullyInitialized_; | |
| }; | |
| a.prototype.isFiltered = function () { | |
| return this.filtered_; | |
| }; | |
| a.prototype.isCompleteForPath = function (a) { | |
| if (a.isEmpty()) return this.isFullyInitialized() && !this.filtered_; | |
| a = a.getFront(); | |
| return this.isCompleteForChild(a); | |
| }; | |
| a.prototype.isCompleteForChild = function (a) { | |
| return ( | |
| (this.isFullyInitialized() && !this.filtered_) || | |
| this.node_.hasChild(a) | |
| ); | |
| }; | |
| a.prototype.getNode = function () { | |
| return this.node_; | |
| }; | |
| return a; | |
| })(), | |
| Ad = (function () { | |
| function a(a, b) { | |
| this.eventCache_ = a; | |
| this.serverCache_ = b; | |
| } | |
| a.prototype.updateEventSnap = function (b, c, e) { | |
| return new a(new Tb(b, c, e), this.serverCache_); | |
| }; | |
| a.prototype.updateServerSnap = function (b, c, e) { | |
| return new a(this.eventCache_, new Tb(b, c, e)); | |
| }; | |
| a.prototype.getEventCache = function () { | |
| return this.eventCache_; | |
| }; | |
| a.prototype.getCompleteEventSnap = function () { | |
| return this.eventCache_.isFullyInitialized() | |
| ? this.eventCache_.getNode() | |
| : null; | |
| }; | |
| a.prototype.getServerCache = function () { | |
| return this.serverCache_; | |
| }; | |
| a.prototype.getCompleteServerSnap = function () { | |
| return this.serverCache_.isFullyInitialized() | |
| ? this.serverCache_.getNode() | |
| : null; | |
| }; | |
| a.Empty = new a( | |
| new Tb(Na.EMPTY_NODE, !1, !1), | |
| new Tb(Na.EMPTY_NODE, !1, !1) | |
| ); | |
| return a; | |
| })(), | |
| ib = (function () { | |
| function a(a, b, c, e, g) { | |
| this.type = a; | |
| this.snapshotNode = b; | |
| this.childName = c; | |
| this.oldSnap = e; | |
| this.prevName = g; | |
| } | |
| a.valueChange = function (b) { | |
| return new a(a.VALUE, b); | |
| }; | |
| a.childAddedChange = function (b, c) { | |
| return new a(a.CHILD_ADDED, c, b); | |
| }; | |
| a.childRemovedChange = function (b, c) { | |
| return new a(a.CHILD_REMOVED, c, b); | |
| }; | |
| a.childChangedChange = function (b, c, e) { | |
| return new a(a.CHILD_CHANGED, c, b, e); | |
| }; | |
| a.childMovedChange = function (b, c) { | |
| return new a(a.CHILD_MOVED, c, b); | |
| }; | |
| a.CHILD_ADDED = "child_added"; | |
| a.CHILD_REMOVED = "child_removed"; | |
| a.CHILD_CHANGED = "child_changed"; | |
| a.CHILD_MOVED = "child_moved"; | |
| a.VALUE = "value"; | |
| return a; | |
| })(), | |
| Nb = (function () { | |
| function a(a) { | |
| this.index_ = a; | |
| } | |
| a.prototype.updateChild = function (a, b, c, g, d, l) { | |
| e.assert( | |
| a.isIndexed(this.index_), | |
| "A node must be indexed if only a child is updated" | |
| ); | |
| d = a.getImmediateChild(b); | |
| if (d.getChild(g).equals(c.getChild(g)) && d.isEmpty() === c.isEmpty()) | |
| return a; | |
| null != l && | |
| (c.isEmpty() | |
| ? a.hasChild(b) | |
| ? l.trackChildChange(ib.childRemovedChange(b, d)) | |
| : e.assert( | |
| a.isLeafNode(), | |
| "A child remove without an old child only makes sense on a leaf node" | |
| ) | |
| : d.isEmpty() | |
| ? l.trackChildChange(ib.childAddedChange(b, c)) | |
| : l.trackChildChange(ib.childChangedChange(b, c, d))); | |
| return a.isLeafNode() && c.isEmpty() | |
| ? a | |
| : a.updateImmediateChild(b, c).withIndex(this.index_); | |
| }; | |
| a.prototype.updateFullNode = function (a, b, c) { | |
| null != c && | |
| (a.isLeafNode() || | |
| a.forEachChild(Ja, function (a, e) { | |
| b.hasChild(a) || c.trackChildChange(ib.childRemovedChange(a, e)); | |
| }), | |
| b.isLeafNode() || | |
| b.forEachChild(Ja, function (b, e) { | |
| if (a.hasChild(b)) { | |
| var g = a.getImmediateChild(b); | |
| g.equals(e) || | |
| c.trackChildChange(ib.childChangedChange(b, e, g)); | |
| } else c.trackChildChange(ib.childAddedChange(b, e)); | |
| })); | |
| return b.withIndex(this.index_); | |
| }; | |
| a.prototype.updatePriority = function (a, b) { | |
| return a.isEmpty() ? Na.EMPTY_NODE : a.updatePriority(b); | |
| }; | |
| a.prototype.filtersNodes = function () { | |
| return !1; | |
| }; | |
| a.prototype.getIndexedFilter = function () { | |
| return this; | |
| }; | |
| a.prototype.getIndex = function () { | |
| return this.index_; | |
| }; | |
| return a; | |
| })(), | |
| Hb = (function () { | |
| function a() { | |
| this.changeMap = new Map(); | |
| } | |
| a.prototype.trackChildChange = function (a) { | |
| var b = a.type, | |
| c = a.childName; | |
| e.assert( | |
| b === ib.CHILD_ADDED || | |
| b === ib.CHILD_CHANGED || | |
| b === ib.CHILD_REMOVED, | |
| "Only child changes supported for tracking" | |
| ); | |
| e.assert( | |
| ".priority" !== c, | |
| "Only non-priority child changes can be tracked." | |
| ); | |
| var g = this.changeMap.get(c); | |
| if (g) { | |
| var d = g.type; | |
| if (b === ib.CHILD_ADDED && d === ib.CHILD_REMOVED) | |
| this.changeMap.set( | |
| c, | |
| ib.childChangedChange(c, a.snapshotNode, g.snapshotNode) | |
| ); | |
| else if (b === ib.CHILD_REMOVED && d === ib.CHILD_ADDED) | |
| this.changeMap.delete(c); | |
| else if (b === ib.CHILD_REMOVED && d === ib.CHILD_CHANGED) | |
| this.changeMap.set(c, ib.childRemovedChange(c, g.oldSnap)); | |
| else if (b === ib.CHILD_CHANGED && d === ib.CHILD_ADDED) | |
| this.changeMap.set(c, ib.childAddedChange(c, a.snapshotNode)); | |
| else if (b === ib.CHILD_CHANGED && d === ib.CHILD_CHANGED) | |
| this.changeMap.set( | |
| c, | |
| ib.childChangedChange(c, a.snapshotNode, g.oldSnap) | |
| ); | |
| else | |
| throw e.assertionError( | |
| "Illegal combination of changes: " + a + " occurred after " + g | |
| ); | |
| } else this.changeMap.set(c, a); | |
| }; | |
| a.prototype.getChanges = function () { | |
| return Array.from(this.changeMap.values()); | |
| }; | |
| return a; | |
| })(), | |
| nc = new ((function () { | |
| function a() {} | |
| a.prototype.getCompleteChild = function (a) { | |
| return null; | |
| }; | |
| a.prototype.getChildAfterChild = function (a, b, c) { | |
| return null; | |
| }; | |
| return a; | |
| })())(), | |
| ad = (function () { | |
| function a(a, b, c) { | |
| void 0 === c && (c = null); | |
| this.writes_ = a; | |
| this.viewCache_ = b; | |
| this.optCompleteServerCache_ = c; | |
| } | |
| a.prototype.getCompleteChild = function (a) { | |
| var b = this.viewCache_.getEventCache(); | |
| if (b.isCompleteForChild(a)) return b.getNode().getImmediateChild(a); | |
| b = | |
| null != this.optCompleteServerCache_ | |
| ? new Tb(this.optCompleteServerCache_, !0, !1) | |
| : this.viewCache_.getServerCache(); | |
| return this.writes_.calcCompleteChild(a, b); | |
| }; | |
| a.prototype.getChildAfterChild = function (a, b, c) { | |
| var e = | |
| null != this.optCompleteServerCache_ | |
| ? this.optCompleteServerCache_ | |
| : this.viewCache_.getCompleteServerSnap(); | |
| a = this.writes_.calcIndexedSlice(e, b, 1, c, a); | |
| return 0 === a.length ? null : a[0]; | |
| }; | |
| return a; | |
| })(), | |
| Xb = (function () { | |
| return function (a, b) { | |
| this.viewCache = a; | |
| this.changes = b; | |
| }; | |
| })(), | |
| Ic = (function () { | |
| function a(a) { | |
| this.filter_ = a; | |
| } | |
| a.prototype.assertIndexed = function (a) { | |
| e.assert( | |
| a.getEventCache().getNode().isIndexed(this.filter_.getIndex()), | |
| "Event snap not indexed" | |
| ); | |
| e.assert( | |
| a.getServerCache().getNode().isIndexed(this.filter_.getIndex()), | |
| "Server snap not indexed" | |
| ); | |
| }; | |
| a.prototype.applyOperation = function (b, c, g, d) { | |
| var l = new Hb(); | |
| if (c.type === wb.OVERWRITE) | |
| if (c.source.fromUser) | |
| c = this.applyUserOverwrite_(b, c.path, c.snap, g, d, l); | |
| else { | |
| e.assert(c.source.fromServer, "Unknown source."); | |
| var h = | |
| c.source.tagged || | |
| (b.getServerCache().isFiltered() && !c.path.isEmpty()); | |
| c = this.applyServerOverwrite_(b, c.path, c.snap, g, d, h, l); | |
| } | |
| else if (c.type === wb.MERGE) | |
| c.source.fromUser | |
| ? (c = this.applyUserMerge_(b, c.path, c.children, g, d, l)) | |
| : (e.assert(c.source.fromServer, "Unknown source."), | |
| (h = c.source.tagged || b.getServerCache().isFiltered()), | |
| (c = this.applyServerMerge_(b, c.path, c.children, g, d, h, l))); | |
| else if (c.type === wb.ACK_USER_WRITE) | |
| c = c.revert | |
| ? this.revertUserWrite_(b, c.path, g, d, l) | |
| : this.ackUserWrite_(b, c.path, c.affectedTree, g, d, l); | |
| else if (c.type === wb.LISTEN_COMPLETE) | |
| c = this.listenComplete_(b, c.path, g, l); | |
| else throw e.assertionError("Unknown operation type: " + c.type); | |
| l = l.getChanges(); | |
| a.maybeAddValueEvent_(b, c, l); | |
| return new Xb(c, l); | |
| }; | |
| a.maybeAddValueEvent_ = function (a, b, c) { | |
| var e = b.getEventCache(); | |
| if (e.isFullyInitialized()) { | |
| var g = e.getNode().isLeafNode() || e.getNode().isEmpty(), | |
| d = a.getCompleteEventSnap(); | |
| (0 < c.length || | |
| !a.getEventCache().isFullyInitialized() || | |
| (g && !e.getNode().equals(d)) || | |
| !e.getNode().getPriority().equals(d.getPriority())) && | |
| c.push(ib.valueChange(b.getCompleteEventSnap())); | |
| } | |
| }; | |
| a.prototype.generateEventCacheAfterServerEvent_ = function ( | |
| a, | |
| b, | |
| c, | |
| g, | |
| d | |
| ) { | |
| var l = a.getEventCache(); | |
| if (null != c.shadowingWrite(b)) return a; | |
| if (b.isEmpty()) | |
| e.assert( | |
| a.getServerCache().isFullyInitialized(), | |
| "If change path is empty, we must have complete server data" | |
| ), | |
| a.getServerCache().isFiltered() | |
| ? ((g = a.getCompleteServerSnap()), | |
| (c = c.calcCompleteEventChildren( | |
| g instanceof Na ? g : Na.EMPTY_NODE | |
| )), | |
| (d = this.filter_.updateFullNode( | |
| a.getEventCache().getNode(), | |
| c, | |
| d | |
| ))) | |
| : ((c = c.calcCompleteEventCache(a.getCompleteServerSnap())), | |
| (d = this.filter_.updateFullNode( | |
| a.getEventCache().getNode(), | |
| c, | |
| d | |
| ))); | |
| else { | |
| var h = b.getFront(); | |
| if (".priority" === h) { | |
| e.assert( | |
| 1 === b.getLength(), | |
| "Can't have a priority with additional path components" | |
| ); | |
| d = l.getNode(); | |
| var k = a.getServerCache().getNode(); | |
| c = c.calcEventCacheAfterServerOverwrite(b, d, k); | |
| d = null != c ? this.filter_.updatePriority(d, c) : l.getNode(); | |
| } else { | |
| var n = b.popFront(); | |
| l.isCompleteForChild(h) | |
| ? ((k = a.getServerCache().getNode()), | |
| (c = c.calcEventCacheAfterServerOverwrite(b, l.getNode(), k)), | |
| (c = | |
| null != c | |
| ? l.getNode().getImmediateChild(h).updateChild(n, c) | |
| : l.getNode().getImmediateChild(h))) | |
| : (c = c.calcCompleteChild(h, a.getServerCache())); | |
| d = | |
| null != c | |
| ? this.filter_.updateChild(l.getNode(), h, c, n, g, d) | |
| : l.getNode(); | |
| } | |
| } | |
| return a.updateEventSnap( | |
| d, | |
| l.isFullyInitialized() || b.isEmpty(), | |
| this.filter_.filtersNodes() | |
| ); | |
| }; | |
| a.prototype.applyServerOverwrite_ = function (a, b, c, e, g, d, l) { | |
| var h = a.getServerCache(); | |
| d = d ? this.filter_ : this.filter_.getIndexedFilter(); | |
| if (b.isEmpty()) c = d.updateFullNode(h.getNode(), c, null); | |
| else if (d.filtersNodes() && !h.isFiltered()) | |
| (c = h.getNode().updateChild(b, c)), | |
| (c = d.updateFullNode(h.getNode(), c, null)); | |
| else { | |
| var k = b.getFront(); | |
| if (!h.isCompleteForPath(b) && 1 < b.getLength()) return a; | |
| var n = b.popFront(); | |
| c = h.getNode().getImmediateChild(k).updateChild(n, c); | |
| c = | |
| ".priority" === k | |
| ? d.updatePriority(h.getNode(), c) | |
| : d.updateChild(h.getNode(), k, c, n, nc, null); | |
| } | |
| a = a.updateServerSnap( | |
| c, | |
| h.isFullyInitialized() || b.isEmpty(), | |
| d.filtersNodes() | |
| ); | |
| g = new ad(e, a, g); | |
| return this.generateEventCacheAfterServerEvent_(a, b, e, g, l); | |
| }; | |
| a.prototype.applyUserOverwrite_ = function (a, b, c, e, g, d) { | |
| var l = a.getEventCache(); | |
| e = new ad(e, a, g); | |
| if (b.isEmpty()) | |
| (d = this.filter_.updateFullNode(a.getEventCache().getNode(), c, d)), | |
| (a = a.updateEventSnap(d, !0, this.filter_.filtersNodes())); | |
| else if (((g = b.getFront()), ".priority" === g)) | |
| (d = this.filter_.updatePriority(a.getEventCache().getNode(), c)), | |
| (a = a.updateEventSnap(d, l.isFullyInitialized(), l.isFiltered())); | |
| else { | |
| b = b.popFront(); | |
| var h = l.getNode().getImmediateChild(g); | |
| if (!b.isEmpty()) { | |
| var k = e.getCompleteChild(g); | |
| c = | |
| null != k | |
| ? ".priority" === b.getBack() && | |
| k.getChild(b.parent()).isEmpty() | |
| ? k | |
| : k.updateChild(b, c) | |
| : Na.EMPTY_NODE; | |
| } | |
| h.equals(c) || | |
| ((d = this.filter_.updateChild(l.getNode(), g, c, b, e, d)), | |
| (a = a.updateEventSnap( | |
| d, | |
| l.isFullyInitialized(), | |
| this.filter_.filtersNodes() | |
| ))); | |
| } | |
| return a; | |
| }; | |
| a.cacheHasChild_ = function (a, b) { | |
| return a.getEventCache().isCompleteForChild(b); | |
| }; | |
| a.prototype.applyUserMerge_ = function (b, c, e, g, d, l) { | |
| var h = this, | |
| k = b; | |
| e.foreach(function (e, n) { | |
| e = c.child(e); | |
| a.cacheHasChild_(b, e.getFront()) && | |
| (k = h.applyUserOverwrite_(k, e, n, g, d, l)); | |
| }); | |
| e.foreach(function (e, n) { | |
| e = c.child(e); | |
| a.cacheHasChild_(b, e.getFront()) || | |
| (k = h.applyUserOverwrite_(k, e, n, g, d, l)); | |
| }); | |
| return k; | |
| }; | |
| a.prototype.applyMerge_ = function (a, b) { | |
| b.foreach(function (b, c) { | |
| a = a.updateChild(b, c); | |
| }); | |
| return a; | |
| }; | |
| a.prototype.applyServerMerge_ = function (a, b, c, e, g, d, l) { | |
| var h = this; | |
| if ( | |
| a.getServerCache().getNode().isEmpty() && | |
| !a.getServerCache().isFullyInitialized() | |
| ) | |
| return a; | |
| var k = a; | |
| b = b.isEmpty() ? c : $a.Empty.setTree(b, c); | |
| var n = a.getServerCache().getNode(); | |
| b.children.inorderTraversal(function (b, c) { | |
| if (n.hasChild(b)) { | |
| var v = a.getServerCache().getNode().getImmediateChild(b); | |
| c = h.applyMerge_(v, c); | |
| k = h.applyServerOverwrite_(k, new fa(b), c, e, g, d, l); | |
| } | |
| }); | |
| b.children.inorderTraversal(function (b, c) { | |
| var v = !a.getServerCache().isCompleteForChild(b) && null == c.value; | |
| n.hasChild(b) || | |
| v || | |
| ((v = a.getServerCache().getNode().getImmediateChild(b)), | |
| (c = h.applyMerge_(v, c)), | |
| (k = h.applyServerOverwrite_(k, new fa(b), c, e, g, d, l))); | |
| }); | |
| return k; | |
| }; | |
| a.prototype.ackUserWrite_ = function (a, b, c, e, g, d) { | |
| if (null != e.shadowingWrite(b)) return a; | |
| var l = a.getServerCache().isFiltered(), | |
| h = a.getServerCache(); | |
| if (null != c.value) { | |
| if ((b.isEmpty() && h.isFullyInitialized()) || h.isCompleteForPath(b)) | |
| return this.applyServerOverwrite_( | |
| a, | |
| b, | |
| h.getNode().getChild(b), | |
| e, | |
| g, | |
| l, | |
| d | |
| ); | |
| if (b.isEmpty()) { | |
| var k = $a.Empty; | |
| h.getNode().forEachChild(Va, function (a, b) { | |
| k = k.set(new fa(a), b); | |
| }); | |
| return this.applyServerMerge_(a, b, k, e, g, l, d); | |
| } | |
| return a; | |
| } | |
| var n = $a.Empty; | |
| c.foreach(function (a, c) { | |
| c = b.child(a); | |
| h.isCompleteForPath(c) && (n = n.set(a, h.getNode().getChild(c))); | |
| }); | |
| return this.applyServerMerge_(a, b, n, e, g, l, d); | |
| }; | |
| a.prototype.listenComplete_ = function (a, b, c, e) { | |
| var g = a.getServerCache(); | |
| a = a.updateServerSnap( | |
| g.getNode(), | |
| g.isFullyInitialized() || b.isEmpty(), | |
| g.isFiltered() | |
| ); | |
| return this.generateEventCacheAfterServerEvent_(a, b, c, nc, e); | |
| }; | |
| a.prototype.revertUserWrite_ = function (a, b, c, g, d) { | |
| if (null != c.shadowingWrite(b)) return a; | |
| var l = new ad(c, a, g); | |
| g = a.getEventCache().getNode(); | |
| if (b.isEmpty() || ".priority" === b.getFront()) | |
| a.getServerCache().isFullyInitialized() | |
| ? (b = c.calcCompleteEventCache(a.getCompleteServerSnap())) | |
| : ((b = a.getServerCache().getNode()), | |
| e.assert( | |
| b instanceof Na, | |
| "serverChildren would be complete if leaf node" | |
| ), | |
| (b = c.calcCompleteEventChildren(b))), | |
| (b = this.filter_.updateFullNode(g, b, d)); | |
| else { | |
| var h = b.getFront(), | |
| k = c.calcCompleteChild(h, a.getServerCache()); | |
| null == k && | |
| a.getServerCache().isCompleteForChild(h) && | |
| (k = g.getImmediateChild(h)); | |
| b = | |
| null != k | |
| ? this.filter_.updateChild(g, h, k, b.popFront(), l, d) | |
| : a.getEventCache().getNode().hasChild(h) | |
| ? this.filter_.updateChild( | |
| g, | |
| h, | |
| Na.EMPTY_NODE, | |
| b.popFront(), | |
| l, | |
| d | |
| ) | |
| : g; | |
| b.isEmpty() && | |
| a.getServerCache().isFullyInitialized() && | |
| ((g = c.calcCompleteEventCache(a.getCompleteServerSnap())), | |
| g.isLeafNode() && (b = this.filter_.updateFullNode(b, g, d))); | |
| } | |
| g = | |
| a.getServerCache().isFullyInitialized() || | |
| null != c.shadowingWrite(fa.Empty); | |
| return a.updateEventSnap(b, g, this.filter_.filtersNodes()); | |
| }; | |
| return a; | |
| })(), | |
| Mc = (function () { | |
| function a(a) { | |
| this.query_ = a; | |
| this.index_ = this.query_.getQueryParams().getIndex(); | |
| } | |
| a.prototype.generateEventsForChanges = function (a, b, c) { | |
| var e = this, | |
| g = [], | |
| d = []; | |
| a.forEach(function (a) { | |
| a.type === ib.CHILD_CHANGED && | |
| e.index_.indexedValueChanged(a.oldSnap, a.snapshotNode) && | |
| d.push(ib.childMovedChange(a.childName, a.snapshotNode)); | |
| }); | |
| this.generateEventsForType_(g, ib.CHILD_REMOVED, a, c, b); | |
| this.generateEventsForType_(g, ib.CHILD_ADDED, a, c, b); | |
| this.generateEventsForType_(g, ib.CHILD_MOVED, d, c, b); | |
| this.generateEventsForType_(g, ib.CHILD_CHANGED, a, c, b); | |
| this.generateEventsForType_(g, ib.VALUE, a, c, b); | |
| return g; | |
| }; | |
| a.prototype.generateEventsForType_ = function (a, b, c, e, g) { | |
| var d = this; | |
| c = c.filter(function (a) { | |
| return a.type === b; | |
| }); | |
| c.sort(this.compareChanges_.bind(this)); | |
| c.forEach(function (b) { | |
| var c = d.materializeSingleChange_(b, g); | |
| e.forEach(function (e) { | |
| e.respondsTo(b.type) && a.push(e.createEvent(c, d.query_)); | |
| }); | |
| }); | |
| }; | |
| a.prototype.materializeSingleChange_ = function (a, b) { | |
| "value" !== a.type && | |
| "child_removed" !== a.type && | |
| (a.prevName = b.getPredecessorChildName( | |
| a.childName, | |
| a.snapshotNode, | |
| this.index_ | |
| )); | |
| return a; | |
| }; | |
| a.prototype.compareChanges_ = function (a, b) { | |
| if (null == a.childName || null == b.childName) | |
| throw e.assertionError("Should only compare child_ events."); | |
| a = new ya(a.childName, a.snapshotNode); | |
| b = new ya(b.childName, b.snapshotNode); | |
| return this.index_.compare(a, b); | |
| }; | |
| return a; | |
| })(), | |
| Ub = (function () { | |
| function a(a, b) { | |
| this.query_ = a; | |
| this.eventRegistrations_ = []; | |
| var c = this.query_.getQueryParams(); | |
| a = new Nb(c.getIndex()); | |
| c = c.getNodeFilter(); | |
| this.processor_ = new Ic(c); | |
| var e = b.getServerCache(); | |
| b = b.getEventCache(); | |
| var g = a.updateFullNode(Na.EMPTY_NODE, e.getNode(), null), | |
| d = c.updateFullNode(Na.EMPTY_NODE, b.getNode(), null); | |
| a = new Tb(g, e.isFullyInitialized(), a.filtersNodes()); | |
| c = new Tb(d, b.isFullyInitialized(), c.filtersNodes()); | |
| this.viewCache_ = new Ad(c, a); | |
| this.eventGenerator_ = new Mc(this.query_); | |
| } | |
| a.prototype.getQuery = function () { | |
| return this.query_; | |
| }; | |
| a.prototype.getServerCache = function () { | |
| return this.viewCache_.getServerCache().getNode(); | |
| }; | |
| a.prototype.getCompleteServerCache = function (a) { | |
| var b = this.viewCache_.getCompleteServerSnap(); | |
| return b && | |
| (this.query_.getQueryParams().loadsAllData() || | |
| (!a.isEmpty() && !b.getImmediateChild(a.getFront()).isEmpty())) | |
| ? b.getChild(a) | |
| : null; | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return 0 === this.eventRegistrations_.length; | |
| }; | |
| a.prototype.addEventRegistration = function (a) { | |
| this.eventRegistrations_.push(a); | |
| }; | |
| a.prototype.removeEventRegistration = function (a, b) { | |
| var c = []; | |
| if (b) { | |
| e.assert( | |
| null == a, | |
| "A cancel should cancel all event registrations." | |
| ); | |
| var g = this.query_.path; | |
| this.eventRegistrations_.forEach(function (a) { | |
| (a = a.createCancelEvent(b, g)) && c.push(a); | |
| }); | |
| } | |
| if (a) { | |
| for (var d = [], l = 0; l < this.eventRegistrations_.length; ++l) { | |
| var h = this.eventRegistrations_[l]; | |
| if (!h.matches(a)) d.push(h); | |
| else if (a.hasAnyCallback()) { | |
| d = d.concat(this.eventRegistrations_.slice(l + 1)); | |
| break; | |
| } | |
| } | |
| this.eventRegistrations_ = d; | |
| } else this.eventRegistrations_ = []; | |
| return c; | |
| }; | |
| a.prototype.applyOperation = function (a, b, c) { | |
| a.type === wb.MERGE && | |
| null !== a.source.queryId && | |
| (e.assert( | |
| this.viewCache_.getCompleteServerSnap(), | |
| "We should always have a full cache before handling merges" | |
| ), | |
| e.assert( | |
| this.viewCache_.getCompleteEventSnap(), | |
| "Missing event cache, even though we have a server cache" | |
| )); | |
| var g = this.viewCache_; | |
| a = this.processor_.applyOperation(g, a, b, c); | |
| this.processor_.assertIndexed(a.viewCache); | |
| e.assert( | |
| a.viewCache.getServerCache().isFullyInitialized() || | |
| !g.getServerCache().isFullyInitialized(), | |
| "Once a server snap is complete, it should never go back" | |
| ); | |
| this.viewCache_ = a.viewCache; | |
| return this.generateEventsForChanges_( | |
| a.changes, | |
| a.viewCache.getEventCache().getNode(), | |
| null | |
| ); | |
| }; | |
| a.prototype.getInitialEvents = function (a) { | |
| var b = this.viewCache_.getEventCache(), | |
| c = []; | |
| b.getNode().isLeafNode() || | |
| b.getNode().forEachChild(Ja, function (a, b) { | |
| c.push(ib.childAddedChange(a, b)); | |
| }); | |
| b.isFullyInitialized() && c.push(ib.valueChange(b.getNode())); | |
| return this.generateEventsForChanges_(c, b.getNode(), a); | |
| }; | |
| a.prototype.generateEventsForChanges_ = function (a, b, c) { | |
| return this.eventGenerator_.generateEventsForChanges( | |
| a, | |
| b, | |
| c ? [c] : this.eventRegistrations_ | |
| ); | |
| }; | |
| return a; | |
| })(), | |
| ld, | |
| Db = (function () { | |
| function a() { | |
| this.views = new Map(); | |
| } | |
| Object.defineProperty(a, "__referenceConstructor", { | |
| get: function () { | |
| e.assert(ld, "Reference.ts has not been loaded"); | |
| return ld; | |
| }, | |
| set: function (a) { | |
| e.assert(!ld, "__referenceConstructor has already been defined"); | |
| ld = a; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.isEmpty = function () { | |
| return 0 === this.views.size; | |
| }; | |
| a.prototype.applyOperation = function (a, b, g) { | |
| var d, | |
| l = a.source.queryId; | |
| if (null !== l) { | |
| var h = this.views.get(l); | |
| e.assert(null != h, "SyncTree gave us an op for an invalid query."); | |
| return h.applyOperation(a, b, g); | |
| } | |
| l = []; | |
| try { | |
| for ( | |
| var k = c.__values(this.views.values()), n = k.next(); | |
| !n.done; | |
| n = k.next() | |
| ) | |
| (h = n.value), (l = l.concat(h.applyOperation(a, b, g))); | |
| } catch (Rc) { | |
| var v = { error: Rc }; | |
| } finally { | |
| try { | |
| n && !n.done && (d = k.return) && d.call(k); | |
| } finally { | |
| if (v) throw v.error; | |
| } | |
| } | |
| return l; | |
| }; | |
| a.prototype.addEventRegistration = function (a, b, c, e, g) { | |
| var d = a.queryIdentifier(), | |
| l = this.views.get(d); | |
| l || | |
| ((l = c.calcCompleteEventCache(g ? e : null)) | |
| ? (c = !0) | |
| : ((l = | |
| e instanceof Na | |
| ? c.calcCompleteEventChildren(e) | |
| : Na.EMPTY_NODE), | |
| (c = !1)), | |
| (e = new Ad(new Tb(l, c, !1), new Tb(e, g, !1))), | |
| (l = new Ub(a, e)), | |
| this.views.set(d, l)); | |
| l.addEventRegistration(b); | |
| return l.getInitialEvents(b); | |
| }; | |
| a.prototype.removeEventRegistration = function (b, e, g) { | |
| var d, | |
| l = b.queryIdentifier(), | |
| h = [], | |
| k = [], | |
| n = this.hasCompleteView(); | |
| if ("default" === l) | |
| try { | |
| for ( | |
| var v = c.__values(this.views.entries()), f = v.next(); | |
| !f.done; | |
| f = v.next() | |
| ) { | |
| var w = c.__read(f.value, 2), | |
| q = w[0], | |
| x = w[1]; | |
| k = k.concat(x.removeEventRegistration(e, g)); | |
| x.isEmpty() && | |
| (this.views.delete(q), | |
| x.getQuery().getQueryParams().loadsAllData() || | |
| h.push(x.getQuery())); | |
| } | |
| } catch (fd) { | |
| var u = { error: fd }; | |
| } finally { | |
| try { | |
| f && !f.done && (d = v.return) && d.call(v); | |
| } finally { | |
| if (u) throw u.error; | |
| } | |
| } | |
| else if ((x = this.views.get(l))) | |
| (k = k.concat(x.removeEventRegistration(e, g))), | |
| x.isEmpty() && | |
| (this.views.delete(l), | |
| x.getQuery().getQueryParams().loadsAllData() || | |
| h.push(x.getQuery())); | |
| n && | |
| !this.hasCompleteView() && | |
| h.push(new a.__referenceConstructor(b.repo, b.path)); | |
| return { removed: h, events: k }; | |
| }; | |
| a.prototype.getQueryViews = function () { | |
| var a, | |
| b = []; | |
| try { | |
| for ( | |
| var e = c.__values(this.views.values()), g = e.next(); | |
| !g.done; | |
| g = e.next() | |
| ) { | |
| var d = g.value; | |
| d.getQuery().getQueryParams().loadsAllData() || b.push(d); | |
| } | |
| } catch (Lb) { | |
| var l = { error: Lb }; | |
| } finally { | |
| try { | |
| g && !g.done && (a = e.return) && a.call(e); | |
| } finally { | |
| if (l) throw l.error; | |
| } | |
| } | |
| return b; | |
| }; | |
| a.prototype.getCompleteServerCache = function (a) { | |
| var b, | |
| e = null; | |
| try { | |
| for ( | |
| var g = c.__values(this.views.values()), d = g.next(); | |
| !d.done; | |
| d = g.next() | |
| ) { | |
| var l = d.value; | |
| e = e || l.getCompleteServerCache(a); | |
| } | |
| } catch (Ac) { | |
| var h = { error: Ac }; | |
| } finally { | |
| try { | |
| d && !d.done && (b = g.return) && b.call(g); | |
| } finally { | |
| if (h) throw h.error; | |
| } | |
| } | |
| return e; | |
| }; | |
| a.prototype.viewForQuery = function (a) { | |
| if (a.getQueryParams().loadsAllData()) return this.getCompleteView(); | |
| a = a.queryIdentifier(); | |
| return this.views.get(a); | |
| }; | |
| a.prototype.viewExistsForQuery = function (a) { | |
| return null != this.viewForQuery(a); | |
| }; | |
| a.prototype.hasCompleteView = function () { | |
| return null != this.getCompleteView(); | |
| }; | |
| a.prototype.getCompleteView = function () { | |
| var a; | |
| try { | |
| for ( | |
| var b = c.__values(this.views.values()), e = b.next(); | |
| !e.done; | |
| e = b.next() | |
| ) { | |
| var g = e.value; | |
| if (g.getQuery().getQueryParams().loadsAllData()) return g; | |
| } | |
| } catch (Qc) { | |
| var d = { error: Qc }; | |
| } finally { | |
| try { | |
| e && !e.done && (a = b.return) && a.call(b); | |
| } finally { | |
| if (d) throw d.error; | |
| } | |
| } | |
| return null; | |
| }; | |
| return a; | |
| })(), | |
| sb = (function () { | |
| function a(a) { | |
| this.writeTree_ = a; | |
| } | |
| a.prototype.addWrite = function (b, c) { | |
| if (b.isEmpty()) return new a(new $a(c)); | |
| var e = this.writeTree_.findRootMostValueAndPath(b); | |
| if (null != e) { | |
| var g = e.path; | |
| e = e.value; | |
| b = fa.relativePath(g, b); | |
| e = e.updateChild(b, c); | |
| return new a(this.writeTree_.set(g, e)); | |
| } | |
| c = new $a(c); | |
| b = this.writeTree_.setTree(b, c); | |
| return new a(b); | |
| }; | |
| a.prototype.addWrites = function (a, c) { | |
| var e = this; | |
| b(c, function (b, c) { | |
| e = e.addWrite(a.child(b), c); | |
| }); | |
| return e; | |
| }; | |
| a.prototype.removeWrite = function (b) { | |
| if (b.isEmpty()) return a.Empty; | |
| b = this.writeTree_.setTree(b, $a.Empty); | |
| return new a(b); | |
| }; | |
| a.prototype.hasCompleteWrite = function (a) { | |
| return null != this.getCompleteNode(a); | |
| }; | |
| a.prototype.getCompleteNode = function (a) { | |
| var b = this.writeTree_.findRootMostValueAndPath(a); | |
| return null != b | |
| ? this.writeTree_.get(b.path).getChild(fa.relativePath(b.path, a)) | |
| : null; | |
| }; | |
| a.prototype.getCompleteChildren = function () { | |
| var a = [], | |
| b = this.writeTree_.value; | |
| null != b | |
| ? b.isLeafNode() || | |
| b.forEachChild(Ja, function (b, c) { | |
| a.push(new ya(b, c)); | |
| }) | |
| : this.writeTree_.children.inorderTraversal(function (b, c) { | |
| null != c.value && a.push(new ya(b, c.value)); | |
| }); | |
| return a; | |
| }; | |
| a.prototype.childCompoundWrite = function (b) { | |
| if (b.isEmpty()) return this; | |
| var c = this.getCompleteNode(b); | |
| return null != c ? new a(new $a(c)) : new a(this.writeTree_.subtree(b)); | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return this.writeTree_.isEmpty(); | |
| }; | |
| a.prototype.apply = function (a) { | |
| return u(fa.Empty, this.writeTree_, a); | |
| }; | |
| a.Empty = new a(new $a(null)); | |
| return a; | |
| })(), | |
| ac = (function () { | |
| function a() { | |
| this.visibleWrites_ = sb.Empty; | |
| this.allWrites_ = []; | |
| this.lastWriteId_ = -1; | |
| } | |
| a.prototype.childWrites = function (a) { | |
| return new Ib(a, this); | |
| }; | |
| a.prototype.addOverwrite = function (a, b, c, g) { | |
| e.assert( | |
| c > this.lastWriteId_, | |
| "Stacking an older write on top of newer ones" | |
| ); | |
| void 0 === g && (g = !0); | |
| this.allWrites_.push({ path: a, snap: b, writeId: c, visible: g }); | |
| g && (this.visibleWrites_ = this.visibleWrites_.addWrite(a, b)); | |
| this.lastWriteId_ = c; | |
| }; | |
| a.prototype.addMerge = function (a, b, c) { | |
| e.assert( | |
| c > this.lastWriteId_, | |
| "Stacking an older merge on top of newer ones" | |
| ); | |
| this.allWrites_.push({ path: a, children: b, writeId: c, visible: !0 }); | |
| this.visibleWrites_ = this.visibleWrites_.addWrites(a, b); | |
| this.lastWriteId_ = c; | |
| }; | |
| a.prototype.getWrite = function (a) { | |
| for (var b = 0; b < this.allWrites_.length; b++) { | |
| var c = this.allWrites_[b]; | |
| if (c.writeId === a) return c; | |
| } | |
| return null; | |
| }; | |
| a.prototype.removeWrite = function (a) { | |
| var c = this, | |
| g = this.allWrites_.findIndex(function (b) { | |
| return b.writeId === a; | |
| }); | |
| e.assert(0 <= g, "removeWrite called with nonexistent writeId."); | |
| var d = this.allWrites_[g]; | |
| this.allWrites_.splice(g, 1); | |
| for ( | |
| var l = d.visible, h = !1, k = this.allWrites_.length - 1; | |
| l && 0 <= k; | |
| ) { | |
| var n = this.allWrites_[k]; | |
| n.visible && | |
| (k >= g && this.recordContainsPath_(n, d.path) | |
| ? (l = !1) | |
| : d.path.contains(n.path) && (h = !0)); | |
| k--; | |
| } | |
| return l | |
| ? (h | |
| ? this.resetTree_() | |
| : d.snap | |
| ? (this.visibleWrites_ = this.visibleWrites_.removeWrite(d.path)) | |
| : b(d.children, function (a) { | |
| c.visibleWrites_ = c.visibleWrites_.removeWrite( | |
| d.path.child(a) | |
| ); | |
| }), | |
| !0) | |
| : !1; | |
| }; | |
| a.prototype.getCompleteWriteData = function (a) { | |
| return this.visibleWrites_.getCompleteNode(a); | |
| }; | |
| a.prototype.calcCompleteEventCache = function (b, c, e, g) { | |
| if (e || g) { | |
| var d = this.visibleWrites_.childCompoundWrite(b); | |
| return !g && d.isEmpty() | |
| ? c | |
| : g || null != c || d.hasCompleteWrite(fa.Empty) | |
| ? ((d = a.layerTree_( | |
| this.allWrites_, | |
| function (a) { | |
| return ( | |
| (a.visible || g) && | |
| (!e || !~e.indexOf(a.writeId)) && | |
| (a.path.contains(b) || b.contains(a.path)) | |
| ); | |
| }, | |
| b | |
| )), | |
| (c = c || Na.EMPTY_NODE), | |
| d.apply(c)) | |
| : null; | |
| } | |
| d = this.visibleWrites_.getCompleteNode(b); | |
| if (null != d) return d; | |
| d = this.visibleWrites_.childCompoundWrite(b); | |
| return d.isEmpty() | |
| ? c | |
| : null != c || d.hasCompleteWrite(fa.Empty) | |
| ? ((c = c || Na.EMPTY_NODE), d.apply(c)) | |
| : null; | |
| }; | |
| a.prototype.calcCompleteEventChildren = function (a, b) { | |
| var c = Na.EMPTY_NODE, | |
| e = this.visibleWrites_.getCompleteNode(a); | |
| if (e) | |
| e.isLeafNode() || | |
| e.forEachChild(Ja, function (a, b) { | |
| c = c.updateImmediateChild(a, b); | |
| }); | |
| else if (b) { | |
| var g = this.visibleWrites_.childCompoundWrite(a); | |
| b.forEachChild(Ja, function (a, b) { | |
| b = g.childCompoundWrite(new fa(a)).apply(b); | |
| c = c.updateImmediateChild(a, b); | |
| }); | |
| g.getCompleteChildren().forEach(function (a) { | |
| c = c.updateImmediateChild(a.name, a.node); | |
| }); | |
| } else | |
| this.visibleWrites_ | |
| .childCompoundWrite(a) | |
| .getCompleteChildren() | |
| .forEach(function (a) { | |
| c = c.updateImmediateChild(a.name, a.node); | |
| }); | |
| return c; | |
| }; | |
| a.prototype.calcEventCacheAfterServerOverwrite = function (a, b, c, g) { | |
| e.assert( | |
| c || g, | |
| "Either existingEventSnap or existingServerSnap must exist" | |
| ); | |
| a = a.child(b); | |
| if (this.visibleWrites_.hasCompleteWrite(a)) return null; | |
| a = this.visibleWrites_.childCompoundWrite(a); | |
| return a.isEmpty() ? g.getChild(b) : a.apply(g.getChild(b)); | |
| }; | |
| a.prototype.calcCompleteChild = function (a, b, c) { | |
| a = a.child(b); | |
| var e = this.visibleWrites_.getCompleteNode(a); | |
| return null != e | |
| ? e | |
| : c.isCompleteForChild(b) | |
| ? this.visibleWrites_ | |
| .childCompoundWrite(a) | |
| .apply(c.getNode().getImmediateChild(b)) | |
| : null; | |
| }; | |
| a.prototype.shadowingWrite = function (a) { | |
| return this.visibleWrites_.getCompleteNode(a); | |
| }; | |
| a.prototype.calcIndexedSlice = function (a, b, c, e, g, d) { | |
| a = this.visibleWrites_.childCompoundWrite(a); | |
| var l = a.getCompleteNode(fa.Empty); | |
| if (null == l) | |
| if (null != b) l = a.apply(b); | |
| else return []; | |
| l = l.withIndex(d); | |
| if (l.isEmpty() || l.isLeafNode()) return []; | |
| b = []; | |
| a = d.getCompare(); | |
| g = g ? l.getReverseIteratorFrom(c, d) : l.getIteratorFrom(c, d); | |
| for (d = g.getNext(); d && b.length < e; ) | |
| 0 !== a(d, c) && b.push(d), (d = g.getNext()); | |
| return b; | |
| }; | |
| a.prototype.recordContainsPath_ = function (a, b) { | |
| if (a.snap) return a.path.contains(b); | |
| for (var c in a.children) | |
| if (a.children.hasOwnProperty(c) && a.path.child(c).contains(b)) | |
| return !0; | |
| return !1; | |
| }; | |
| a.prototype.resetTree_ = function () { | |
| this.visibleWrites_ = a.layerTree_( | |
| this.allWrites_, | |
| a.DefaultFilter_, | |
| fa.Empty | |
| ); | |
| this.lastWriteId_ = | |
| 0 < this.allWrites_.length | |
| ? this.allWrites_[this.allWrites_.length - 1].writeId | |
| : -1; | |
| }; | |
| a.DefaultFilter_ = function (a) { | |
| return a.visible; | |
| }; | |
| a.layerTree_ = function (a, b, c) { | |
| for (var g = sb.Empty, d = 0; d < a.length; ++d) { | |
| var l = a[d]; | |
| if (b(l)) { | |
| var h = l.path; | |
| if (l.snap) | |
| c.contains(h) | |
| ? ((h = fa.relativePath(c, h)), (g = g.addWrite(h, l.snap))) | |
| : h.contains(c) && | |
| ((h = fa.relativePath(h, c)), | |
| (g = g.addWrite(fa.Empty, l.snap.getChild(h)))); | |
| else if (l.children) | |
| if (c.contains(h)) | |
| (h = fa.relativePath(c, h)), (g = g.addWrites(h, l.children)); | |
| else { | |
| if (h.contains(c)) | |
| if (((h = fa.relativePath(h, c)), h.isEmpty())) | |
| g = g.addWrites(fa.Empty, l.children); | |
| else if ((l = e.safeGet(l.children, h.getFront()))) | |
| (l = l.getChild(h.popFront())), | |
| (g = g.addWrite(fa.Empty, l)); | |
| } | |
| else | |
| throw e.assertionError( | |
| "WriteRecord should have .snap or .children" | |
| ); | |
| } | |
| } | |
| return g; | |
| }; | |
| return a; | |
| })(), | |
| Ib = (function () { | |
| function a(a, b) { | |
| this.treePath_ = a; | |
| this.writeTree_ = b; | |
| } | |
| a.prototype.calcCompleteEventCache = function (a, b, c) { | |
| return this.writeTree_.calcCompleteEventCache(this.treePath_, a, b, c); | |
| }; | |
| a.prototype.calcCompleteEventChildren = function (a) { | |
| return this.writeTree_.calcCompleteEventChildren(this.treePath_, a); | |
| }; | |
| a.prototype.calcEventCacheAfterServerOverwrite = function (a, b, c) { | |
| return this.writeTree_.calcEventCacheAfterServerOverwrite( | |
| this.treePath_, | |
| a, | |
| b, | |
| c | |
| ); | |
| }; | |
| a.prototype.shadowingWrite = function (a) { | |
| return this.writeTree_.shadowingWrite(this.treePath_.child(a)); | |
| }; | |
| a.prototype.calcIndexedSlice = function (a, b, c, e, g) { | |
| return this.writeTree_.calcIndexedSlice(this.treePath_, a, b, c, e, g); | |
| }; | |
| a.prototype.calcCompleteChild = function (a, b) { | |
| return this.writeTree_.calcCompleteChild(this.treePath_, a, b); | |
| }; | |
| a.prototype.child = function (b) { | |
| return new a(this.treePath_.child(b), this.writeTree_); | |
| }; | |
| return a; | |
| })(), | |
| ob = (function () { | |
| function a(a) { | |
| this.listenProvider_ = a; | |
| this.syncPointTree_ = $a.Empty; | |
| this.pendingWriteTree_ = new ac(); | |
| this.tagToQueryMap = new Map(); | |
| this.queryToTagMap = new Map(); | |
| } | |
| a.prototype.applyUserOverwrite = function (a, b, c, e) { | |
| this.pendingWriteTree_.addOverwrite(a, b, c, e); | |
| return e ? this.applyOperationToSyncPoints_(new xb(Cc.User, a, b)) : []; | |
| }; | |
| a.prototype.applyUserMerge = function (a, b, c) { | |
| this.pendingWriteTree_.addMerge(a, b, c); | |
| b = $a.fromObject(b); | |
| return this.applyOperationToSyncPoints_(new hb(Cc.User, a, b)); | |
| }; | |
| a.prototype.ackUserWrite = function (a, c) { | |
| void 0 === c && (c = !1); | |
| var e = this.pendingWriteTree_.getWrite(a); | |
| if (this.pendingWriteTree_.removeWrite(a)) { | |
| var g = $a.Empty; | |
| null != e.snap | |
| ? (g = g.set(fa.Empty, !0)) | |
| : b(e.children, function (a, b) { | |
| g = g.set(new fa(a), b); | |
| }); | |
| return this.applyOperationToSyncPoints_(new zd(e.path, g, c)); | |
| } | |
| return []; | |
| }; | |
| a.prototype.applyServerOverwrite = function (a, b) { | |
| return this.applyOperationToSyncPoints_(new xb(Cc.Server, a, b)); | |
| }; | |
| a.prototype.applyServerMerge = function (a, b) { | |
| b = $a.fromObject(b); | |
| return this.applyOperationToSyncPoints_(new hb(Cc.Server, a, b)); | |
| }; | |
| a.prototype.applyListenComplete = function (a) { | |
| return this.applyOperationToSyncPoints_(new Pb(Cc.Server, a)); | |
| }; | |
| a.prototype.applyTaggedQueryOverwrite = function (b, c, e) { | |
| e = this.queryKeyForTag_(e); | |
| if (null != e) { | |
| var g = a.parseQueryKey_(e); | |
| e = g.path; | |
| g = g.queryId; | |
| b = fa.relativePath(e, b); | |
| c = new xb(Cc.forServerTaggedQuery(g), b, c); | |
| return this.applyTaggedOperation_(e, c); | |
| } | |
| return []; | |
| }; | |
| a.prototype.applyTaggedQueryMerge = function (b, c, e) { | |
| if ((e = this.queryKeyForTag_(e))) { | |
| var g = a.parseQueryKey_(e); | |
| e = g.path; | |
| g = g.queryId; | |
| b = fa.relativePath(e, b); | |
| c = $a.fromObject(c); | |
| c = new hb(Cc.forServerTaggedQuery(g), b, c); | |
| return this.applyTaggedOperation_(e, c); | |
| } | |
| return []; | |
| }; | |
| a.prototype.applyTaggedListenComplete = function (b, c) { | |
| if ((c = this.queryKeyForTag_(c))) { | |
| var e = a.parseQueryKey_(c); | |
| c = e.path; | |
| e = e.queryId; | |
| b = fa.relativePath(c, b); | |
| b = new Pb(Cc.forServerTaggedQuery(e), b); | |
| return this.applyTaggedOperation_(c, b); | |
| } | |
| return []; | |
| }; | |
| a.prototype.addEventRegistration = function (b, c) { | |
| var g = b.path, | |
| d = null, | |
| l = !1; | |
| this.syncPointTree_.foreachOnPath(g, function (a, b) { | |
| a = fa.relativePath(a, g); | |
| d = d || b.getCompleteServerCache(a); | |
| l = l || b.hasCompleteView(); | |
| }); | |
| var h = this.syncPointTree_.get(g); | |
| h | |
| ? ((l = l || h.hasCompleteView()), | |
| (d = d || h.getCompleteServerCache(fa.Empty))) | |
| : ((h = new Db()), | |
| (this.syncPointTree_ = this.syncPointTree_.set(g, h))); | |
| if (null != d) var k = !0; | |
| else | |
| (k = !1), | |
| (d = Na.EMPTY_NODE), | |
| this.syncPointTree_.subtree(g).foreachChild(function (a, b) { | |
| (b = b.getCompleteServerCache(fa.Empty)) && | |
| (d = d.updateImmediateChild(a, b)); | |
| }); | |
| var n = h.viewExistsForQuery(b); | |
| if (!n && !b.getQueryParams().loadsAllData()) { | |
| var v = a.makeQueryKey_(b); | |
| e.assert( | |
| !this.queryToTagMap.has(v), | |
| "View does not exist, but we have a tag" | |
| ); | |
| var f = a.getNextQueryTag_(); | |
| this.queryToTagMap.set(v, f); | |
| this.tagToQueryMap.set(f, v); | |
| } | |
| v = this.pendingWriteTree_.childWrites(g); | |
| c = h.addEventRegistration(b, c, v, d, k); | |
| n || | |
| l || | |
| ((h = h.viewForQuery(b)), (c = c.concat(this.setupListener_(b, h)))); | |
| return c; | |
| }; | |
| a.prototype.removeEventRegistration = function (b, c, e) { | |
| var g = this, | |
| d = b.path, | |
| l = this.syncPointTree_.get(d), | |
| h = []; | |
| if ( | |
| l && | |
| ("default" === b.queryIdentifier() || l.viewExistsForQuery(b)) | |
| ) { | |
| h = l.removeEventRegistration(b, c, e); | |
| l.isEmpty() && (this.syncPointTree_ = this.syncPointTree_.remove(d)); | |
| l = h.removed; | |
| h = h.events; | |
| c = | |
| -1 !== | |
| l.findIndex(function (a) { | |
| return a.getQueryParams().loadsAllData(); | |
| }); | |
| var k = this.syncPointTree_.findOnPath(d, function (a, b) { | |
| return b.hasCompleteView(); | |
| }); | |
| if (c && !k && ((d = this.syncPointTree_.subtree(d)), !d.isEmpty())) { | |
| d = this.collectDistinctViewsForSubTree_(d); | |
| for (var n = 0; n < d.length; ++n) { | |
| var v = d[n], | |
| f = v.getQuery(); | |
| v = this.createListenerForView_(v); | |
| this.listenProvider_.startListening( | |
| a.queryForListening_(f), | |
| this.tagForQuery_(f), | |
| v.hashFn, | |
| v.onComplete | |
| ); | |
| } | |
| } | |
| !k && | |
| 0 < l.length && | |
| !e && | |
| (c | |
| ? this.listenProvider_.stopListening( | |
| a.queryForListening_(b), | |
| null | |
| ) | |
| : l.forEach(function (b) { | |
| var c = g.queryToTagMap.get(a.makeQueryKey_(b)); | |
| g.listenProvider_.stopListening(a.queryForListening_(b), c); | |
| })); | |
| this.removeTags_(l); | |
| } | |
| return h; | |
| }; | |
| a.prototype.calcCompleteEventCache = function (a, b) { | |
| var c = this.pendingWriteTree_, | |
| e = this.syncPointTree_.findOnPath(a, function (b, c) { | |
| b = fa.relativePath(b, a); | |
| if ((c = c.getCompleteServerCache(b))) return c; | |
| }); | |
| return c.calcCompleteEventCache(a, e, b, !0); | |
| }; | |
| a.prototype.collectDistinctViewsForSubTree_ = function (a) { | |
| return a.fold(function (a, c, e) { | |
| if (c && c.hasCompleteView()) return [c.getCompleteView()]; | |
| var g = []; | |
| c && (g = c.getQueryViews()); | |
| b(e, function (a, b) { | |
| g = g.concat(b); | |
| }); | |
| return g; | |
| }); | |
| }; | |
| a.prototype.removeTags_ = function (b) { | |
| for (var c = 0; c < b.length; ++c) { | |
| var e = b[c]; | |
| if (!e.getQueryParams().loadsAllData()) { | |
| e = a.makeQueryKey_(e); | |
| var g = this.queryToTagMap.get(e); | |
| this.queryToTagMap.delete(e); | |
| this.tagToQueryMap.delete(g); | |
| } | |
| } | |
| }; | |
| a.queryForListening_ = function (a) { | |
| return a.getQueryParams().loadsAllData() && | |
| !a.getQueryParams().isDefault() | |
| ? a.getRef() | |
| : a; | |
| }; | |
| a.prototype.setupListener_ = function (c, g) { | |
| var d = c.path, | |
| l = this.tagForQuery_(c); | |
| g = this.createListenerForView_(g); | |
| c = this.listenProvider_.startListening( | |
| a.queryForListening_(c), | |
| l, | |
| g.hashFn, | |
| g.onComplete | |
| ); | |
| d = this.syncPointTree_.subtree(d); | |
| if (l) | |
| e.assert( | |
| !d.value.hasCompleteView(), | |
| "If we're adding a query, it shouldn't be shadowed" | |
| ); | |
| else | |
| for ( | |
| l = d.fold(function (a, c, e) { | |
| if (!a.isEmpty() && c && c.hasCompleteView()) | |
| return [c.getCompleteView().getQuery()]; | |
| var g = []; | |
| c && | |
| (g = g.concat( | |
| c.getQueryViews().map(function (a) { | |
| return a.getQuery(); | |
| }) | |
| )); | |
| b(e, function (a, b) { | |
| g = g.concat(b); | |
| }); | |
| return g; | |
| }), | |
| d = 0; | |
| d < l.length; | |
| ++d | |
| ) | |
| (g = l[d]), | |
| this.listenProvider_.stopListening( | |
| a.queryForListening_(g), | |
| this.tagForQuery_(g) | |
| ); | |
| return c; | |
| }; | |
| a.prototype.createListenerForView_ = function (a) { | |
| var b = this, | |
| c = a.getQuery(), | |
| e = this.tagForQuery_(c); | |
| return { | |
| hashFn: function () { | |
| return (a.getServerCache() || Na.EMPTY_NODE).hash(); | |
| }, | |
| onComplete: function (a) { | |
| if ("ok" === a) | |
| return e | |
| ? b.applyTaggedListenComplete(c.path, e) | |
| : b.applyListenComplete(c.path); | |
| var g = "Unknown Error"; | |
| "too_big" === a | |
| ? (g = | |
| "The data requested exceeds the maximum size that can be accessed with a single request.") | |
| : "permission_denied" === a | |
| ? (g = | |
| "Client doesn't have permission to access the desired data.") | |
| : "unavailable" === a && (g = "The service is unavailable"); | |
| g = Error(a + " at " + c.path.toString() + ": " + g); | |
| g.code = a.toUpperCase(); | |
| return b.removeEventRegistration(c, null, g); | |
| }, | |
| }; | |
| }; | |
| a.makeQueryKey_ = function (a) { | |
| return a.path.toString() + "$" + a.queryIdentifier(); | |
| }; | |
| a.parseQueryKey_ = function (a) { | |
| var b = a.indexOf("$"); | |
| e.assert(-1 !== b && b < a.length - 1, "Bad queryKey."); | |
| return { queryId: a.substr(b + 1), path: new fa(a.substr(0, b)) }; | |
| }; | |
| a.prototype.queryKeyForTag_ = function (a) { | |
| return this.tagToQueryMap.get(a); | |
| }; | |
| a.prototype.tagForQuery_ = function (b) { | |
| b = a.makeQueryKey_(b); | |
| return this.queryToTagMap.get(b); | |
| }; | |
| a.getNextQueryTag_ = function () { | |
| return a.nextQueryTag_++; | |
| }; | |
| a.prototype.applyTaggedOperation_ = function (a, b) { | |
| var c = this.syncPointTree_.get(a); | |
| e.assert(c, "Missing sync point for query tag that we're tracking"); | |
| a = this.pendingWriteTree_.childWrites(a); | |
| return c.applyOperation(b, a, null); | |
| }; | |
| a.prototype.applyOperationToSyncPoints_ = function (a) { | |
| return this.applyOperationHelper_( | |
| a, | |
| this.syncPointTree_, | |
| null, | |
| this.pendingWriteTree_.childWrites(fa.Empty) | |
| ); | |
| }; | |
| a.prototype.applyOperationHelper_ = function (a, b, c, e) { | |
| if (a.path.isEmpty()) | |
| return this.applyOperationDescendantsHelper_(a, b, c, e); | |
| var g = b.get(fa.Empty); | |
| null == c && null != g && (c = g.getCompleteServerCache(fa.Empty)); | |
| var d = [], | |
| l = a.path.getFront(), | |
| h = a.operationForChild(l); | |
| if ((b = b.children.get(l)) && h) { | |
| var k = c ? c.getImmediateChild(l) : null; | |
| l = e.child(l); | |
| d = d.concat(this.applyOperationHelper_(h, b, k, l)); | |
| } | |
| g && (d = d.concat(g.applyOperation(a, e, c))); | |
| return d; | |
| }; | |
| a.prototype.applyOperationDescendantsHelper_ = function (a, b, c, e) { | |
| var g = this, | |
| d = b.get(fa.Empty); | |
| null == c && null != d && (c = d.getCompleteServerCache(fa.Empty)); | |
| var l = []; | |
| b.children.inorderTraversal(function (b, d) { | |
| var h = c ? c.getImmediateChild(b) : null, | |
| k = e.child(b); | |
| (b = a.operationForChild(b)) && | |
| (l = l.concat(g.applyOperationDescendantsHelper_(b, d, h, k))); | |
| }); | |
| d && (l = l.concat(d.applyOperation(a, e, c))); | |
| return l; | |
| }; | |
| a.nextQueryTag_ = 1; | |
| return a; | |
| })(), | |
| Qb = (function () { | |
| function a() { | |
| this.rootNode_ = Na.EMPTY_NODE; | |
| } | |
| a.prototype.getNode = function (a) { | |
| return this.rootNode_.getChild(a); | |
| }; | |
| a.prototype.updateSnapshot = function (a, b) { | |
| this.rootNode_ = this.rootNode_.updateChild(a, b); | |
| }; | |
| return a; | |
| })(), | |
| Cd = (function () { | |
| function a(a, b) { | |
| var c = this; | |
| this.app_ = a; | |
| this.authProvider_ = b; | |
| this.auth_ = null; | |
| (this.auth_ = b.getImmediate({ optional: !0 })) || | |
| b.get().then(function (a) { | |
| return (c.auth_ = a); | |
| }); | |
| } | |
| a.prototype.getToken = function (a) { | |
| return this.auth_ | |
| ? this.auth_.getToken(a).catch(function (a) { | |
| return a && "auth/token-not-initialized" === a.code | |
| ? (K( | |
| "Got auth/token-not-initialized error. Treating as null token." | |
| ), | |
| null) | |
| : Promise.reject(a); | |
| }) | |
| : Promise.resolve(null); | |
| }; | |
| a.prototype.addTokenChangeListener = function (a) { | |
| this.auth_ | |
| ? this.auth_.addAuthTokenListener(a) | |
| : (setTimeout(function () { | |
| return a(null); | |
| }, 0), | |
| this.authProvider_.get().then(function (b) { | |
| return b.addAuthTokenListener(a); | |
| })); | |
| }; | |
| a.prototype.removeTokenChangeListener = function (a) { | |
| this.authProvider_.get().then(function (b) { | |
| return b.removeAuthTokenListener(a); | |
| }); | |
| }; | |
| a.prototype.notifyForInvalidToken = function () { | |
| var a = | |
| 'Provided authentication credentials for the app named "' + | |
| this.app_.name + | |
| '" are invalid. This usually indicates your app was not initialized correctly. '; | |
| a = | |
| "credential" in this.app_.options | |
| ? a + | |
| 'Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.' | |
| : "serviceAccount" in this.app_.options | |
| ? a + | |
| 'Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.' | |
| : a + | |
| 'Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.'; | |
| F(a); | |
| }; | |
| return a; | |
| })(), | |
| Ae = (function () { | |
| function a() { | |
| this.counters_ = {}; | |
| } | |
| a.prototype.incrementCounter = function (a, b) { | |
| void 0 === b && (b = 1); | |
| e.contains(this.counters_, a) || (this.counters_[a] = 0); | |
| this.counters_[a] += b; | |
| }; | |
| a.prototype.get = function () { | |
| return e.deepCopy(this.counters_); | |
| }; | |
| return a; | |
| })(), | |
| xa = (function () { | |
| function a() {} | |
| a.getCollection = function (a) { | |
| a = a.toString(); | |
| this.collections_[a] || (this.collections_[a] = new Ae()); | |
| return this.collections_[a]; | |
| }; | |
| a.getOrCreateReporter = function (a, b) { | |
| a = a.toString(); | |
| this.reporters_[a] || (this.reporters_[a] = b()); | |
| return this.reporters_[a]; | |
| }; | |
| a.collections_ = {}; | |
| a.reporters_ = {}; | |
| return a; | |
| })(), | |
| ec = (function () { | |
| function a(a) { | |
| this.collection_ = a; | |
| this.last_ = null; | |
| } | |
| a.prototype.get = function () { | |
| var a = this.collection_.get(), | |
| e = c.__assign({}, a); | |
| this.last_ && | |
| b(this.last_, function (a, b) { | |
| e[a] -= b; | |
| }); | |
| this.last_ = a; | |
| return e; | |
| }; | |
| return a; | |
| })(), | |
| ab = (function () { | |
| function a(a, b) { | |
| this.server_ = b; | |
| this.statsToReport_ = {}; | |
| this.statsListener_ = new ec(a); | |
| a = 1e4 + 2e4 * Math.random(); | |
| Ca(this.reportStats_.bind(this), Math.floor(a)); | |
| } | |
| a.prototype.includeStat = function (a) { | |
| this.statsToReport_[a] = !0; | |
| }; | |
| a.prototype.reportStats_ = function () { | |
| var a = this, | |
| c = this.statsListener_.get(), | |
| g = {}, | |
| d = !1; | |
| b(c, function (b, c) { | |
| 0 < c && e.contains(a.statsToReport_, b) && ((g[b] = c), (d = !0)); | |
| }); | |
| d && this.server_.reportStats(g); | |
| Ca(this.reportStats_.bind(this), Math.floor(6e5 * Math.random())); | |
| }; | |
| return a; | |
| })(), | |
| Pa = (function () { | |
| function a() { | |
| this.eventLists_ = []; | |
| this.recursionDepth_ = 0; | |
| } | |
| a.prototype.queueEvents = function (a) { | |
| for (var b = null, c = 0; c < a.length; c++) { | |
| var e = a[c], | |
| g = e.getPath(); | |
| null === b || | |
| g.equals(b.getPath()) || | |
| (this.eventLists_.push(b), (b = null)); | |
| null === b && (b = new Eb(g)); | |
| b.add(e); | |
| } | |
| b && this.eventLists_.push(b); | |
| }; | |
| a.prototype.raiseEventsAtPath = function (a, b) { | |
| this.queueEvents(b); | |
| this.raiseQueuedEventsMatchingPredicate_(function (b) { | |
| return b.equals(a); | |
| }); | |
| }; | |
| a.prototype.raiseEventsForChangedPath = function (a, b) { | |
| this.queueEvents(b); | |
| this.raiseQueuedEventsMatchingPredicate_(function (b) { | |
| return b.contains(a) || a.contains(b); | |
| }); | |
| }; | |
| a.prototype.raiseQueuedEventsMatchingPredicate_ = function (a) { | |
| this.recursionDepth_++; | |
| for (var b = !0, c = 0; c < this.eventLists_.length; c++) { | |
| var e = this.eventLists_[c]; | |
| e && | |
| ((e = e.getPath()), | |
| a(e) | |
| ? (this.eventLists_[c].raise(), (this.eventLists_[c] = null)) | |
| : (b = !1)); | |
| } | |
| b && (this.eventLists_ = []); | |
| this.recursionDepth_--; | |
| }; | |
| return a; | |
| })(), | |
| Eb = (function () { | |
| function a(a) { | |
| this.path_ = a; | |
| this.events_ = []; | |
| } | |
| a.prototype.add = function (a) { | |
| this.events_.push(a); | |
| }; | |
| a.prototype.raise = function () { | |
| for (var a = 0; a < this.events_.length; a++) { | |
| var b = this.events_[a]; | |
| if (null !== b) { | |
| this.events_[a] = null; | |
| var c = b.getEventRunner(); | |
| O && K("event: " + b.toString()); | |
| ia(c); | |
| } | |
| } | |
| }; | |
| a.prototype.getPath = function () { | |
| return this.path_; | |
| }; | |
| return a; | |
| })(), | |
| Ua = (function () { | |
| function a(a) { | |
| this.allowedEvents_ = a; | |
| this.listeners_ = {}; | |
| e.assert( | |
| Array.isArray(a) && 0 < a.length, | |
| "Requires a non-empty array" | |
| ); | |
| } | |
| a.prototype.trigger = function (a) { | |
| for (var b = [], e = 1; e < arguments.length; e++) | |
| b[e - 1] = arguments[e]; | |
| if (Array.isArray(this.listeners_[a])) { | |
| e = c.__spread(this.listeners_[a]); | |
| for (var g = 0; g < e.length; g++) | |
| e[g].callback.apply(e[g].context, b); | |
| } | |
| }; | |
| a.prototype.on = function (a, b, c) { | |
| this.validateEventType_(a); | |
| this.listeners_[a] = this.listeners_[a] || []; | |
| this.listeners_[a].push({ callback: b, context: c }); | |
| (a = this.getInitialEvent(a)) && b.apply(c, a); | |
| }; | |
| a.prototype.off = function (a, b, c) { | |
| this.validateEventType_(a); | |
| a = this.listeners_[a] || []; | |
| for (var e = 0; e < a.length; e++) | |
| if (a[e].callback === b && (!c || c === a[e].context)) { | |
| a.splice(e, 1); | |
| break; | |
| } | |
| }; | |
| a.prototype.validateEventType_ = function (a) { | |
| e.assert( | |
| this.allowedEvents_.find(function (b) { | |
| return b === a; | |
| }), | |
| "Unknown event: " + a | |
| ); | |
| }; | |
| return a; | |
| })(), | |
| Ob = (function (a) { | |
| function b() { | |
| var b = a.call(this, ["visible"]) || this; | |
| if ( | |
| "undefined" !== typeof document && | |
| "undefined" !== typeof document.addEventListener | |
| ) | |
| if ("undefined" !== typeof document.hidden) { | |
| var c = "visibilitychange"; | |
| var e = "hidden"; | |
| } else | |
| "undefined" !== typeof document.mozHidden | |
| ? ((c = "mozvisibilitychange"), (e = "mozHidden")) | |
| : "undefined" !== typeof document.msHidden | |
| ? ((c = "msvisibilitychange"), (e = "msHidden")) | |
| : "undefined" !== typeof document.webkitHidden && | |
| ((c = "webkitvisibilitychange"), (e = "webkitHidden")); | |
| b.visible_ = !0; | |
| c && | |
| document.addEventListener( | |
| c, | |
| function () { | |
| var a = !document[e]; | |
| a !== b.visible_ && ((b.visible_ = a), b.trigger("visible", a)); | |
| }, | |
| !1 | |
| ); | |
| return b; | |
| } | |
| c.__extends(b, a); | |
| b.getInstance = function () { | |
| return new b(); | |
| }; | |
| b.prototype.getInitialEvent = function (a) { | |
| e.assert("visible" === a, "Unknown event type: " + a); | |
| return [this.visible_]; | |
| }; | |
| return b; | |
| })(Ua), | |
| Qa = (function (a) { | |
| function b() { | |
| var b = a.call(this, ["online"]) || this; | |
| b.online_ = !0; | |
| "undefined" === typeof window || | |
| "undefined" === typeof window.addEventListener || | |
| e.isMobileCordova() || | |
| (window.addEventListener( | |
| "online", | |
| function () { | |
| b.online_ || ((b.online_ = !0), b.trigger("online", !0)); | |
| }, | |
| !1 | |
| ), | |
| window.addEventListener( | |
| "offline", | |
| function () { | |
| b.online_ && ((b.online_ = !1), b.trigger("online", !1)); | |
| }, | |
| !1 | |
| )); | |
| return b; | |
| } | |
| c.__extends(b, a); | |
| b.getInstance = function () { | |
| return new b(); | |
| }; | |
| b.prototype.getInitialEvent = function (a) { | |
| e.assert("online" === a, "Unknown event type: " + a); | |
| return [this.online_]; | |
| }; | |
| b.prototype.currentlyOnline = function () { | |
| return this.online_; | |
| }; | |
| return b; | |
| })(Ua), | |
| mb = (function () { | |
| function a(a) { | |
| this.onMessage_ = a; | |
| this.pendingResponses = []; | |
| this.currentResponseNum = 0; | |
| this.closeAfterResponse = -1; | |
| this.onClose = null; | |
| } | |
| a.prototype.closeAfter = function (a, b) { | |
| this.closeAfterResponse = a; | |
| this.onClose = b; | |
| this.closeAfterResponse < this.currentResponseNum && | |
| (this.onClose(), (this.onClose = null)); | |
| }; | |
| a.prototype.handleResponse = function (a, b) { | |
| var c = this; | |
| this.pendingResponses[a] = b; | |
| a = function () { | |
| var a = e.pendingResponses[e.currentResponseNum]; | |
| delete e.pendingResponses[e.currentResponseNum]; | |
| for ( | |
| var b = function (b) { | |
| a[b] && | |
| ia(function () { | |
| c.onMessage_(a[b]); | |
| }); | |
| }, | |
| g = 0; | |
| g < a.length; | |
| ++g | |
| ) | |
| b(g); | |
| if (e.currentResponseNum === e.closeAfterResponse) | |
| return e.onClose && (e.onClose(), (e.onClose = null)), "break"; | |
| e.currentResponseNum++; | |
| }; | |
| for ( | |
| var e = this; | |
| this.pendingResponses[this.currentResponseNum] && "break" !== a(); | |
| ); | |
| }; | |
| return a; | |
| })(), | |
| Dc = (function () { | |
| function a(a, b, c, e) { | |
| this.connId = a; | |
| this.repoInfo = b; | |
| this.transportSessionId = c; | |
| this.lastSessionId = e; | |
| this.bytesReceived = this.bytesSent = 0; | |
| this.everConnected_ = !1; | |
| this.log_ = D(a); | |
| this.stats_ = xa.getCollection(b); | |
| this.urlFn = function (a) { | |
| return b.connectionURL("long_polling", a); | |
| }; | |
| } | |
| a.prototype.open = function (a, b) { | |
| var e = this; | |
| this.curSegmentNum = 0; | |
| this.onDisconnect_ = b; | |
| this.myPacketOrderer = new mb(a); | |
| this.isClosed_ = !1; | |
| this.connectTimeoutTimer_ = setTimeout(function () { | |
| e.log_("Timed out trying to connect."); | |
| e.onClosed_(); | |
| e.connectTimeoutTimer_ = null; | |
| }, 3e4); | |
| J(function () { | |
| if (!e.isClosed_) { | |
| e.scriptTagHolder = new Vb( | |
| function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) | |
| a[b] = arguments[b]; | |
| var g = c.__read(a, 5); | |
| b = g[0]; | |
| var d = g[1]; | |
| g = g[2]; | |
| e.incrementIncomingBytes_(a); | |
| if (e.scriptTagHolder) | |
| if ( | |
| (e.connectTimeoutTimer_ && | |
| (clearTimeout(e.connectTimeoutTimer_), | |
| (e.connectTimeoutTimer_ = null)), | |
| (e.everConnected_ = !0), | |
| "start" === b) | |
| ) | |
| (e.id = d), (e.password = g); | |
| else if ("close" === b) | |
| if (d) | |
| (e.scriptTagHolder.sendNewPolls = !1), | |
| e.myPacketOrderer.closeAfter(d, function () { | |
| e.onClosed_(); | |
| }); | |
| else e.onClosed_(); | |
| else throw Error("Unrecognized command received: " + b); | |
| }, | |
| function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) | |
| a[b] = arguments[b]; | |
| var g = c.__read(a, 2); | |
| b = g[0]; | |
| g = g[1]; | |
| e.incrementIncomingBytes_(a); | |
| e.myPacketOrderer.handleResponse(b, g); | |
| }, | |
| function () { | |
| e.onClosed_(); | |
| }, | |
| e.urlFn | |
| ); | |
| var a = { start: "t" }; | |
| a.ser = Math.floor(1e8 * Math.random()); | |
| e.scriptTagHolder.uniqueCallbackIdentifier && | |
| (a.cb = e.scriptTagHolder.uniqueCallbackIdentifier); | |
| a.v = "5"; | |
| e.transportSessionId && (a.s = e.transportSessionId); | |
| e.lastSessionId && (a.ls = e.lastSessionId); | |
| "undefined" !== typeof location && | |
| location.href && | |
| -1 !== location.href.indexOf("firebaseio.com") && | |
| (a.r = "f"); | |
| a = e.urlFn(a); | |
| e.log_("Connecting via long-poll to " + a); | |
| e.scriptTagHolder.addTag(a, function () {}); | |
| } | |
| }); | |
| }; | |
| a.prototype.start = function () { | |
| this.scriptTagHolder.startLongPoll(this.id, this.password); | |
| this.addDisconnectPingFrame(this.id, this.password); | |
| }; | |
| a.forceAllow = function () { | |
| a.forceAllow_ = !0; | |
| }; | |
| a.forceDisallow = function () { | |
| a.forceDisallow_ = !0; | |
| }; | |
| a.isAvailable = function () { | |
| return e.isNodeSdk() | |
| ? !1 | |
| : a.forceAllow_ | |
| ? !0 | |
| : !a.forceDisallow_ && | |
| "undefined" !== typeof document && | |
| null != document.createElement && | |
| !( | |
| "object" === typeof window && | |
| window.chrome && | |
| window.chrome.extension && | |
| !/^chrome/.test(window.location.href) | |
| ) && | |
| !("object" === typeof Windows && "object" === typeof Windows.UI); | |
| }; | |
| a.prototype.markConnectionHealthy = function () {}; | |
| a.prototype.shutdown_ = function () { | |
| this.isClosed_ = !0; | |
| this.scriptTagHolder && | |
| (this.scriptTagHolder.close(), (this.scriptTagHolder = null)); | |
| this.myDisconnFrame && | |
| (document.body.removeChild(this.myDisconnFrame), | |
| (this.myDisconnFrame = null)); | |
| this.connectTimeoutTimer_ && | |
| (clearTimeout(this.connectTimeoutTimer_), | |
| (this.connectTimeoutTimer_ = null)); | |
| }; | |
| a.prototype.onClosed_ = function () { | |
| this.isClosed_ || | |
| (this.log_("Longpoll is closing itself"), | |
| this.shutdown_(), | |
| this.onDisconnect_ && | |
| (this.onDisconnect_(this.everConnected_), | |
| (this.onDisconnect_ = null))); | |
| }; | |
| a.prototype.close = function () { | |
| this.isClosed_ || | |
| (this.log_("Longpoll is being closed."), this.shutdown_()); | |
| }; | |
| a.prototype.send = function (a) { | |
| a = e.stringify(a); | |
| this.bytesSent += a.length; | |
| this.stats_.incrementCounter("bytes_sent", a.length); | |
| a = e.base64Encode(a); | |
| a = U(a, 1840); | |
| for (var b = 0; b < a.length; b++) | |
| this.scriptTagHolder.enqueueSegment( | |
| this.curSegmentNum, | |
| a.length, | |
| a[b] | |
| ), | |
| this.curSegmentNum++; | |
| }; | |
| a.prototype.addDisconnectPingFrame = function (a, b) { | |
| if (!e.isNodeSdk()) { | |
| this.myDisconnFrame = document.createElement("iframe"); | |
| var c = { dframe: "t" }; | |
| c.id = a; | |
| c.pw = b; | |
| this.myDisconnFrame.src = this.urlFn(c); | |
| this.myDisconnFrame.style.display = "none"; | |
| document.body.appendChild(this.myDisconnFrame); | |
| } | |
| }; | |
| a.prototype.incrementIncomingBytes_ = function (a) { | |
| a = e.stringify(a).length; | |
| this.bytesReceived += a; | |
| this.stats_.incrementCounter("bytes_received", a); | |
| }; | |
| return a; | |
| })(), | |
| Vb = (function () { | |
| function a(b, c, g, d) { | |
| this.onDisconnect = g; | |
| this.urlFn = d; | |
| this.outstandingRequests = new Set(); | |
| this.pendingSegs = []; | |
| this.currentSerial = Math.floor(1e8 * Math.random()); | |
| this.sendNewPolls = !0; | |
| if (e.isNodeSdk()) (this.commandCB = b), (this.onMessageCB = c); | |
| else { | |
| this.uniqueCallbackIdentifier = C(); | |
| window["pLPCommand" + this.uniqueCallbackIdentifier] = b; | |
| window["pRTLPCB" + this.uniqueCallbackIdentifier] = c; | |
| this.myIFrame = a.createIFrame_(); | |
| b = ""; | |
| this.myIFrame.src && | |
| "javascript:" === this.myIFrame.src.substr(0, 11) && | |
| (b = | |
| '\x3cscript\x3edocument.domain\x3d"' + | |
| document.domain + | |
| '";\x3c/script\x3e'); | |
| b = "\x3chtml\x3e\x3cbody\x3e" + b + "\x3c/body\x3e\x3c/html\x3e"; | |
| try { | |
| this.myIFrame.doc.open(), | |
| this.myIFrame.doc.write(b), | |
| this.myIFrame.doc.close(); | |
| } catch (Fc) { | |
| K("frame writing exception"), Fc.stack && K(Fc.stack), K(Fc); | |
| } | |
| } | |
| } | |
| a.createIFrame_ = function () { | |
| var a = document.createElement("iframe"); | |
| a.style.display = "none"; | |
| if (document.body) { | |
| document.body.appendChild(a); | |
| try { | |
| a.contentWindow.document || K("No IE domain setting required"); | |
| } catch (nd) { | |
| a.src = | |
| "javascript:void((function(){document.open();document.domain\x3d'" + | |
| document.domain + | |
| "';document.close();})())"; | |
| } | |
| } else | |
| throw "Document body has not initialized. Wait to initialize Firebase until after the document is ready."; | |
| a.contentDocument | |
| ? (a.doc = a.contentDocument) | |
| : a.contentWindow | |
| ? (a.doc = a.contentWindow.document) | |
| : a.document && (a.doc = a.document); | |
| return a; | |
| }; | |
| a.prototype.close = function () { | |
| var a = this; | |
| this.alive = !1; | |
| this.myIFrame && | |
| ((this.myIFrame.doc.body.innerHTML = ""), | |
| setTimeout(function () { | |
| null !== a.myIFrame && | |
| (document.body.removeChild(a.myIFrame), (a.myIFrame = null)); | |
| }, 0)); | |
| var b = this.onDisconnect; | |
| b && ((this.onDisconnect = null), b()); | |
| }; | |
| a.prototype.startLongPoll = function (a, b) { | |
| this.myID = a; | |
| this.myPW = b; | |
| for (this.alive = !0; this.newRequest_(); ); | |
| }; | |
| a.prototype.newRequest_ = function () { | |
| if ( | |
| this.alive && | |
| this.sendNewPolls && | |
| this.outstandingRequests.size < (0 < this.pendingSegs.length ? 2 : 1) | |
| ) { | |
| this.currentSerial++; | |
| var a = {}; | |
| a.id = this.myID; | |
| a.pw = this.myPW; | |
| a.ser = this.currentSerial; | |
| a = this.urlFn(a); | |
| for (var b = "", c = 0; 0 < this.pendingSegs.length; ) | |
| if (1870 >= this.pendingSegs[0].d.length + 30 + b.length) { | |
| var e = this.pendingSegs.shift(); | |
| b = | |
| b + | |
| "\x26seg" + | |
| c + | |
| "\x3d" + | |
| e.seg + | |
| "\x26ts" + | |
| c + | |
| "\x3d" + | |
| e.ts + | |
| "\x26d" + | |
| c + | |
| "\x3d" + | |
| e.d; | |
| c++; | |
| } else break; | |
| this.addLongPollTag_(a + b, this.currentSerial); | |
| return !0; | |
| } | |
| return !1; | |
| }; | |
| a.prototype.enqueueSegment = function (a, b, c) { | |
| this.pendingSegs.push({ seg: a, ts: b, d: c }); | |
| this.alive && this.newRequest_(); | |
| }; | |
| a.prototype.addLongPollTag_ = function (a, b) { | |
| var c = this; | |
| this.outstandingRequests.add(b); | |
| var e = function () { | |
| c.outstandingRequests.delete(b); | |
| c.newRequest_(); | |
| }, | |
| g = setTimeout(e, 25e3); | |
| this.addTag(a, function () { | |
| clearTimeout(g); | |
| e(); | |
| }); | |
| }; | |
| a.prototype.addTag = function (a, b) { | |
| var c = this; | |
| e.isNodeSdk() | |
| ? this.doNodeLongPoll(a, b) | |
| : setTimeout(function () { | |
| try { | |
| if (c.sendNewPolls) { | |
| var e = c.myIFrame.doc.createElement("script"); | |
| e.type = "text/javascript"; | |
| e.async = !0; | |
| e.src = a; | |
| e.onload = e.onreadystatechange = function () { | |
| var a = e.readyState; | |
| (a && "loaded" !== a && "complete" !== a) || | |
| ((e.onload = e.onreadystatechange = null), | |
| e.parentNode && e.parentNode.removeChild(e), | |
| b()); | |
| }; | |
| e.onerror = function () { | |
| K("Long-poll script failed to load: " + a); | |
| c.sendNewPolls = !1; | |
| c.close(); | |
| }; | |
| c.myIFrame.doc.body.appendChild(e); | |
| } | |
| } catch (Fc) {} | |
| }, 1); | |
| }; | |
| return a; | |
| })(), | |
| Ma = "", | |
| ud = null; | |
| "undefined" !== typeof MozWebSocket | |
| ? (ud = MozWebSocket) | |
| : "undefined" !== typeof WebSocket && (ud = WebSocket); | |
| var Nc = (function () { | |
| function a(b, c, e, g) { | |
| this.connId = b; | |
| this.frames = this.keepaliveTimer = null; | |
| this.bytesReceived = this.bytesSent = this.totalFrames = 0; | |
| this.log_ = D(this.connId); | |
| this.stats_ = xa.getCollection(c); | |
| this.connURL = a.connectionURL_(c, e, g); | |
| } | |
| a.connectionURL_ = function (a, b, c) { | |
| var g = { v: "5" }; | |
| !e.isNodeSdk() && | |
| "undefined" !== typeof location && | |
| location.href && | |
| -1 !== location.href.indexOf("firebaseio.com") && | |
| (g.r = "f"); | |
| b && (g.s = b); | |
| c && (g.ls = c); | |
| return a.connectionURL("websocket", g); | |
| }; | |
| a.prototype.open = function (a, b) { | |
| var c = this; | |
| this.onDisconnect = b; | |
| this.onMessage = a; | |
| this.log_("Websocket connecting to " + this.connURL); | |
| this.everConnected_ = !1; | |
| v.set("previous_websocket_failure", !0); | |
| try { | |
| if (e.isNodeSdk()) { | |
| var g = { | |
| headers: { | |
| "User-Agent": | |
| "Firebase/5/" + | |
| Ma + | |
| "/" + | |
| k.platform + | |
| "/" + | |
| (e.CONSTANTS.NODE_ADMIN ? "AdminNode" : "Node"), | |
| }, | |
| }, | |
| d = k.env, | |
| l = | |
| 0 === this.connURL.indexOf("wss://") | |
| ? d.HTTPS_PROXY || d.https_proxy | |
| : d.HTTP_PROXY || d.http_proxy; | |
| l && (g.proxy = { origin: l }); | |
| this.mySock = new ud(this.connURL, [], g); | |
| } else this.mySock = new ud(this.connURL); | |
| } catch (Lb) { | |
| this.log_("Error instantiating WebSocket."); | |
| (a = Lb.message || Lb.data) && this.log_(a); | |
| this.onClosed_(); | |
| return; | |
| } | |
| this.mySock.onopen = function () { | |
| c.log_("Websocket connected."); | |
| c.everConnected_ = !0; | |
| }; | |
| this.mySock.onclose = function () { | |
| c.log_("Websocket connection was disconnected."); | |
| c.mySock = null; | |
| c.onClosed_(); | |
| }; | |
| this.mySock.onmessage = function (a) { | |
| c.handleIncomingFrame(a); | |
| }; | |
| this.mySock.onerror = function (a) { | |
| c.log_("WebSocket error. Closing connection."); | |
| (a = a.message || a.data) && c.log_(a); | |
| c.onClosed_(); | |
| }; | |
| }; | |
| a.prototype.start = function () {}; | |
| a.forceDisallow = function () { | |
| a.forceDisallow_ = !0; | |
| }; | |
| a.isAvailable = function () { | |
| var b = !1; | |
| if ("undefined" !== typeof navigator && navigator.userAgent) { | |
| var c = navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/); | |
| c && 1 < c.length && 4.4 > parseFloat(c[1]) && (b = !0); | |
| } | |
| return !b && null !== ud && !a.forceDisallow_; | |
| }; | |
| a.previouslyFailed = function () { | |
| return ( | |
| v.isInMemoryStorage || !0 === v.get("previous_websocket_failure") | |
| ); | |
| }; | |
| a.prototype.markConnectionHealthy = function () { | |
| v.remove("previous_websocket_failure"); | |
| }; | |
| a.prototype.appendFrame_ = function (a) { | |
| this.frames.push(a); | |
| this.frames.length === this.totalFrames && | |
| ((a = this.frames.join("")), | |
| (this.frames = null), | |
| (a = e.jsonEval(a)), | |
| this.onMessage(a)); | |
| }; | |
| a.prototype.handleNewFrameCount_ = function (a) { | |
| this.totalFrames = a; | |
| this.frames = []; | |
| }; | |
| a.prototype.extractFrameCount_ = function (a) { | |
| e.assert(null === this.frames, "We already have a frame buffer"); | |
| if (6 >= a.length) { | |
| var b = Number(a); | |
| if (!isNaN(b)) return this.handleNewFrameCount_(b), null; | |
| } | |
| this.handleNewFrameCount_(1); | |
| return a; | |
| }; | |
| a.prototype.handleIncomingFrame = function (a) { | |
| null !== this.mySock && | |
| ((a = a.data), | |
| (this.bytesReceived += a.length), | |
| this.stats_.incrementCounter("bytes_received", a.length), | |
| this.resetKeepAlive(), | |
| null !== this.frames | |
| ? this.appendFrame_(a) | |
| : ((a = this.extractFrameCount_(a)), | |
| null !== a && this.appendFrame_(a))); | |
| }; | |
| a.prototype.send = function (a) { | |
| this.resetKeepAlive(); | |
| a = e.stringify(a); | |
| this.bytesSent += a.length; | |
| this.stats_.incrementCounter("bytes_sent", a.length); | |
| a = U(a, 16384); | |
| 1 < a.length && this.sendString_(String(a.length)); | |
| for (var b = 0; b < a.length; b++) this.sendString_(a[b]); | |
| }; | |
| a.prototype.shutdown_ = function () { | |
| this.isClosed_ = !0; | |
| this.keepaliveTimer && | |
| (clearInterval(this.keepaliveTimer), (this.keepaliveTimer = null)); | |
| this.mySock && (this.mySock.close(), (this.mySock = null)); | |
| }; | |
| a.prototype.onClosed_ = function () { | |
| this.isClosed_ || | |
| (this.log_("WebSocket is closing itself"), | |
| this.shutdown_(), | |
| this.onDisconnect && | |
| (this.onDisconnect(this.everConnected_), | |
| (this.onDisconnect = null))); | |
| }; | |
| a.prototype.close = function () { | |
| this.isClosed_ || | |
| (this.log_("WebSocket is being closed"), this.shutdown_()); | |
| }; | |
| a.prototype.resetKeepAlive = function () { | |
| var a = this; | |
| clearInterval(this.keepaliveTimer); | |
| this.keepaliveTimer = setInterval(function () { | |
| a.mySock && a.sendString_("0"); | |
| a.resetKeepAlive(); | |
| }, 45e3); | |
| }; | |
| a.prototype.sendString_ = function (a) { | |
| try { | |
| this.mySock.send(a); | |
| } catch (nd) { | |
| this.log_( | |
| "Exception thrown from WebSocket.send():", | |
| nd.message || nd.data, | |
| "Closing connection." | |
| ), | |
| setTimeout(this.onClosed_.bind(this), 0); | |
| } | |
| }; | |
| a.responsesRequiredToBeHealthy = 2; | |
| a.healthyTimeout = 3e4; | |
| return a; | |
| })(), | |
| Jb = (function () { | |
| function a(a) { | |
| this.initTransports_(a); | |
| } | |
| Object.defineProperty(a, "ALL_TRANSPORTS", { | |
| get: function () { | |
| return [Dc, Nc]; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.initTransports_ = function (b) { | |
| var e, | |
| g = Nc && Nc.isAvailable(), | |
| d = g && !Nc.previouslyFailed(); | |
| b.webSocketOnly && | |
| (g || | |
| F( | |
| "wss:// URL used, but browser isn't known to support websockets. Trying anyway." | |
| ), | |
| (d = !0)); | |
| if (d) this.transports_ = [Nc]; | |
| else { | |
| b = this.transports_ = []; | |
| try { | |
| for ( | |
| var l = c.__values(a.ALL_TRANSPORTS), h = l.next(); | |
| !h.done; | |
| h = l.next() | |
| ) { | |
| var k = h.value; | |
| k && k.isAvailable() && b.push(k); | |
| } | |
| } catch (Dd) { | |
| var n = { error: Dd }; | |
| } finally { | |
| try { | |
| h && !h.done && (e = l.return) && e.call(l); | |
| } finally { | |
| if (n) throw n.error; | |
| } | |
| } | |
| } | |
| }; | |
| a.prototype.initialTransport = function () { | |
| if (0 < this.transports_.length) return this.transports_[0]; | |
| throw Error("No transports available"); | |
| }; | |
| a.prototype.upgradeTransport = function () { | |
| return 1 < this.transports_.length ? this.transports_[1] : null; | |
| }; | |
| return a; | |
| })(), | |
| md = (function () { | |
| function a(a, b, c, e, g, d, l) { | |
| this.id = a; | |
| this.repoInfo_ = b; | |
| this.onMessage_ = c; | |
| this.onReady_ = e; | |
| this.onDisconnect_ = g; | |
| this.onKill_ = d; | |
| this.lastSessionId = l; | |
| this.connectionCount = 0; | |
| this.pendingDataMessages = []; | |
| this.state_ = 0; | |
| this.log_ = D("c:" + this.id + ":"); | |
| this.transportManager_ = new Jb(b); | |
| this.log_("Connection created"); | |
| this.start_(); | |
| } | |
| a.prototype.start_ = function () { | |
| var a = this, | |
| b = this.transportManager_.initialTransport(); | |
| this.conn_ = new b( | |
| this.nextTransportId_(), | |
| this.repoInfo_, | |
| void 0, | |
| this.lastSessionId | |
| ); | |
| this.primaryResponsesRequired_ = b.responsesRequiredToBeHealthy || 0; | |
| var c = this.connReceiver_(this.conn_), | |
| e = this.disconnReceiver_(this.conn_); | |
| this.rx_ = this.tx_ = this.conn_; | |
| this.secondaryConn_ = null; | |
| this.isHealthy_ = !1; | |
| setTimeout(function () { | |
| a.conn_ && a.conn_.open(c, e); | |
| }, 0); | |
| b = b.healthyTimeout || 0; | |
| 0 < b && | |
| (this.healthyTimeout_ = Ca(function () { | |
| a.healthyTimeout_ = null; | |
| a.isHealthy_ || | |
| (a.conn_ && 102400 < a.conn_.bytesReceived | |
| ? (a.log_( | |
| "Connection exceeded healthy timeout but has received " + | |
| a.conn_.bytesReceived + | |
| " bytes. Marking connection healthy." | |
| ), | |
| (a.isHealthy_ = !0), | |
| a.conn_.markConnectionHealthy()) | |
| : a.conn_ && 10240 < a.conn_.bytesSent | |
| ? a.log_( | |
| "Connection exceeded healthy timeout but has sent " + | |
| a.conn_.bytesSent + | |
| " bytes. Leaving connection alive." | |
| ) | |
| : (a.log_("Closing unhealthy connection after timeout."), | |
| a.close())); | |
| }, Math.floor(b))); | |
| }; | |
| a.prototype.nextTransportId_ = function () { | |
| return "c:" + this.id + ":" + this.connectionCount++; | |
| }; | |
| a.prototype.disconnReceiver_ = function (a) { | |
| var b = this; | |
| return function (c) { | |
| if (a === b.conn_) b.onConnectionLost_(c); | |
| else | |
| a === b.secondaryConn_ | |
| ? (b.log_("Secondary connection lost."), | |
| b.onSecondaryConnectionLost_()) | |
| : b.log_("closing an old connection"); | |
| }; | |
| }; | |
| a.prototype.connReceiver_ = function (a) { | |
| var b = this; | |
| return function (c) { | |
| if (2 !== b.state_) | |
| if (a === b.rx_) b.onPrimaryMessageReceived_(c); | |
| else if (a === b.secondaryConn_) b.onSecondaryMessageReceived_(c); | |
| else b.log_("message on old connection"); | |
| }; | |
| }; | |
| a.prototype.sendRequest = function (a) { | |
| this.sendData_({ t: "d", d: a }); | |
| }; | |
| a.prototype.tryCleanupConnection = function () { | |
| this.tx_ === this.secondaryConn_ && | |
| this.rx_ === this.secondaryConn_ && | |
| (this.log_( | |
| "cleaning up and promoting a connection: " + | |
| this.secondaryConn_.connId | |
| ), | |
| (this.conn_ = this.secondaryConn_), | |
| (this.secondaryConn_ = null)); | |
| }; | |
| a.prototype.onSecondaryControl_ = function (a) { | |
| "t" in a && | |
| ((a = a.t), | |
| "a" === a | |
| ? this.upgradeIfSecondaryHealthy_() | |
| : "r" === a | |
| ? (this.log_("Got a reset on secondary, closing it"), | |
| this.secondaryConn_.close(), | |
| (this.tx_ !== this.secondaryConn_ && | |
| this.rx_ !== this.secondaryConn_) || | |
| this.close()) | |
| : "o" === a && | |
| (this.log_("got pong on secondary."), | |
| this.secondaryResponsesRequired_--, | |
| this.upgradeIfSecondaryHealthy_())); | |
| }; | |
| a.prototype.onSecondaryMessageReceived_ = function (a) { | |
| var b = B("t", a); | |
| a = B("d", a); | |
| if ("c" === b) this.onSecondaryControl_(a); | |
| else if ("d" === b) this.pendingDataMessages.push(a); | |
| else throw Error("Unknown protocol layer: " + b); | |
| }; | |
| a.prototype.upgradeIfSecondaryHealthy_ = function () { | |
| 0 >= this.secondaryResponsesRequired_ | |
| ? (this.log_("Secondary connection is healthy."), | |
| (this.isHealthy_ = !0), | |
| this.secondaryConn_.markConnectionHealthy(), | |
| this.proceedWithUpgrade_()) | |
| : (this.log_("sending ping on secondary."), | |
| this.secondaryConn_.send({ t: "c", d: { t: "p", d: {} } })); | |
| }; | |
| a.prototype.proceedWithUpgrade_ = function () { | |
| this.secondaryConn_.start(); | |
| this.log_("sending client ack on secondary"); | |
| this.secondaryConn_.send({ t: "c", d: { t: "a", d: {} } }); | |
| this.log_("Ending transmission on primary"); | |
| this.conn_.send({ t: "c", d: { t: "n", d: {} } }); | |
| this.tx_ = this.secondaryConn_; | |
| this.tryCleanupConnection(); | |
| }; | |
| a.prototype.onPrimaryMessageReceived_ = function (a) { | |
| var b = B("t", a); | |
| a = B("d", a); | |
| if ("c" === b) this.onControl_(a); | |
| else if ("d" === b) this.onDataMessage_(a); | |
| }; | |
| a.prototype.onDataMessage_ = function (a) { | |
| this.onPrimaryResponse_(); | |
| this.onMessage_(a); | |
| }; | |
| a.prototype.onPrimaryResponse_ = function () { | |
| this.isHealthy_ || | |
| (this.primaryResponsesRequired_--, | |
| 0 >= this.primaryResponsesRequired_ && | |
| (this.log_("Primary connection is healthy."), | |
| (this.isHealthy_ = !0), | |
| this.conn_.markConnectionHealthy())); | |
| }; | |
| a.prototype.onControl_ = function (a) { | |
| var b = B("t", a); | |
| if ("d" in a) | |
| if (((a = a.d), "h" === b)) this.onHandshake_(a); | |
| else if ("n" === b) { | |
| this.log_("recvd end transmission on primary"); | |
| this.rx_ = this.secondaryConn_; | |
| for (b = 0; b < this.pendingDataMessages.length; ++b) | |
| this.onDataMessage_(this.pendingDataMessages[b]); | |
| this.pendingDataMessages = []; | |
| this.tryCleanupConnection(); | |
| } else if ("s" === b) this.onConnectionShutdown_(a); | |
| else if ("r" === b) this.onReset_(a); | |
| else | |
| "e" === b | |
| ? Q("Server Error: " + a) | |
| : "o" === b | |
| ? (this.log_("got pong on primary."), | |
| this.onPrimaryResponse_(), | |
| this.sendPingOnPrimaryIfNecessary_()) | |
| : Q("Unknown control packet command: " + b); | |
| }; | |
| a.prototype.onHandshake_ = function (a) { | |
| var b = a.ts, | |
| c = a.v, | |
| e = a.h; | |
| this.sessionId = a.s; | |
| this.repoInfo_.updateHost(e); | |
| 0 === this.state_ && | |
| (this.conn_.start(), | |
| this.onConnectionEstablished_(this.conn_, b), | |
| "5" !== c && F("Protocol version mismatch detected"), | |
| this.tryStartUpgrade_()); | |
| }; | |
| a.prototype.tryStartUpgrade_ = function () { | |
| var a = this.transportManager_.upgradeTransport(); | |
| a && this.startUpgrade_(a); | |
| }; | |
| a.prototype.startUpgrade_ = function (a) { | |
| var b = this; | |
| this.secondaryConn_ = new a( | |
| this.nextTransportId_(), | |
| this.repoInfo_, | |
| this.sessionId | |
| ); | |
| this.secondaryResponsesRequired_ = a.responsesRequiredToBeHealthy || 0; | |
| a = this.connReceiver_(this.secondaryConn_); | |
| var c = this.disconnReceiver_(this.secondaryConn_); | |
| this.secondaryConn_.open(a, c); | |
| Ca(function () { | |
| b.secondaryConn_ && | |
| (b.log_("Timed out trying to upgrade."), b.secondaryConn_.close()); | |
| }, 6e4); | |
| }; | |
| a.prototype.onReset_ = function (a) { | |
| this.log_("Reset packet received. New host: " + a); | |
| this.repoInfo_.updateHost(a); | |
| 1 === this.state_ | |
| ? this.close() | |
| : (this.closeConnections_(), this.start_()); | |
| }; | |
| a.prototype.onConnectionEstablished_ = function (a, b) { | |
| var c = this; | |
| this.log_("Realtime connection established."); | |
| this.conn_ = a; | |
| this.state_ = 1; | |
| this.onReady_ && | |
| (this.onReady_(b, this.sessionId), (this.onReady_ = null)); | |
| 0 === this.primaryResponsesRequired_ | |
| ? (this.log_("Primary connection is healthy."), | |
| (this.isHealthy_ = !0)) | |
| : Ca(function () { | |
| c.sendPingOnPrimaryIfNecessary_(); | |
| }, 5e3); | |
| }; | |
| a.prototype.sendPingOnPrimaryIfNecessary_ = function () { | |
| this.isHealthy_ || | |
| 1 !== this.state_ || | |
| (this.log_("sending ping on primary."), | |
| this.sendData_({ t: "c", d: { t: "p", d: {} } })); | |
| }; | |
| a.prototype.onSecondaryConnectionLost_ = function () { | |
| var a = this.secondaryConn_; | |
| this.secondaryConn_ = null; | |
| (this.tx_ !== a && this.rx_ !== a) || this.close(); | |
| }; | |
| a.prototype.onConnectionLost_ = function (a) { | |
| this.conn_ = null; | |
| a || 0 !== this.state_ | |
| ? 1 === this.state_ && this.log_("Realtime connection lost.") | |
| : (this.log_("Realtime connection failed."), | |
| this.repoInfo_.isCacheableHost() && | |
| (v.remove("host:" + this.repoInfo_.host), | |
| (this.repoInfo_.internalHost = this.repoInfo_.host))); | |
| this.close(); | |
| }; | |
| a.prototype.onConnectionShutdown_ = function (a) { | |
| this.log_("Connection shutdown command received. Shutting down..."); | |
| this.onKill_ && (this.onKill_(a), (this.onKill_ = null)); | |
| this.onDisconnect_ = null; | |
| this.close(); | |
| }; | |
| a.prototype.sendData_ = function (a) { | |
| if (1 !== this.state_) throw "Connection is not connected"; | |
| this.tx_.send(a); | |
| }; | |
| a.prototype.close = function () { | |
| 2 !== this.state_ && | |
| (this.log_("Closing realtime connection."), | |
| (this.state_ = 2), | |
| this.closeConnections_(), | |
| this.onDisconnect_ && | |
| (this.onDisconnect_(), (this.onDisconnect_ = null))); | |
| }; | |
| a.prototype.closeConnections_ = function () { | |
| this.log_("Shutting down all connections"); | |
| this.conn_ && (this.conn_.close(), (this.conn_ = null)); | |
| this.secondaryConn_ && | |
| (this.secondaryConn_.close(), (this.secondaryConn_ = null)); | |
| this.healthyTimeout_ && | |
| (clearTimeout(this.healthyTimeout_), (this.healthyTimeout_ = null)); | |
| }; | |
| return a; | |
| })(), | |
| Ba = (function () { | |
| function a() {} | |
| a.prototype.put = function (a, b, c, e) {}; | |
| a.prototype.merge = function (a, b, c, e) {}; | |
| a.prototype.refreshAuthToken = function (a) {}; | |
| a.prototype.onDisconnectPut = function (a, b, c) {}; | |
| a.prototype.onDisconnectMerge = function (a, b, c) {}; | |
| a.prototype.onDisconnectCancel = function (a, b) {}; | |
| a.prototype.reportStats = function (a) {}; | |
| return a; | |
| })(), | |
| Cb = (function (a) { | |
| function b(c, g, d, l, h, k) { | |
| var n = a.call(this) || this; | |
| n.repoInfo_ = c; | |
| n.onDataUpdate_ = g; | |
| n.onConnectStatus_ = d; | |
| n.onServerInfoUpdate_ = l; | |
| n.authTokenProvider_ = h; | |
| n.authOverride_ = k; | |
| n.id = b.nextPersistentConnectionId_++; | |
| n.log_ = D("p:" + n.id + ":"); | |
| n.interruptReasons_ = {}; | |
| n.listens = new Map(); | |
| n.outstandingPuts_ = []; | |
| n.outstandingPutCount_ = 0; | |
| n.onDisconnectRequestQueue_ = []; | |
| n.connected_ = !1; | |
| n.reconnectDelay_ = 1e3; | |
| n.maxReconnectDelay_ = 3e5; | |
| n.securityDebugCallback_ = null; | |
| n.lastSessionId = null; | |
| n.establishConnectionTimer_ = null; | |
| n.visible_ = !1; | |
| n.requestCBHash_ = {}; | |
| n.requestNumber_ = 0; | |
| n.realtime_ = null; | |
| n.authToken_ = null; | |
| n.forceTokenRefresh_ = !1; | |
| n.invalidAuthTokenCount_ = 0; | |
| n.firstConnection_ = !0; | |
| n.lastConnectionAttemptTime_ = null; | |
| n.lastConnectionEstablishedTime_ = null; | |
| if (k && !e.isNodeSdk()) | |
| throw Error( | |
| "Auth override specified in options, but not supported on non Node.js platforms" | |
| ); | |
| n.scheduleConnect_(0); | |
| Ob.getInstance().on("visible", n.onVisible_, n); | |
| if (-1 === c.host.indexOf("fblocal")) | |
| Qa.getInstance().on("online", n.onOnline_, n); | |
| return n; | |
| } | |
| c.__extends(b, a); | |
| b.prototype.sendRequest = function (a, b, c) { | |
| var g = ++this.requestNumber_; | |
| a = { r: g, a: a, b: b }; | |
| this.log_(e.stringify(a)); | |
| e.assert( | |
| this.connected_, | |
| "sendRequest call when we're not connected not allowed." | |
| ); | |
| this.realtime_.sendRequest(a); | |
| c && (this.requestCBHash_[g] = c); | |
| }; | |
| b.prototype.listen = function (a, b, c, g) { | |
| var d = a.queryIdentifier(), | |
| l = a.path.toString(); | |
| this.log_("Listen called for " + l + " " + d); | |
| this.listens.has(l) || this.listens.set(l, new Map()); | |
| e.assert( | |
| a.getQueryParams().isDefault() || !a.getQueryParams().loadsAllData(), | |
| "listen() called for non-default but complete query" | |
| ); | |
| e.assert( | |
| !this.listens.get(l).has(d), | |
| "listen() called twice for same path/queryId." | |
| ); | |
| a = { onComplete: g, hashFn: b, query: a, tag: c }; | |
| this.listens.get(l).set(d, a); | |
| this.connected_ && this.sendListen_(a); | |
| }; | |
| b.prototype.sendListen_ = function (a) { | |
| var c = this, | |
| e = a.query, | |
| g = e.path.toString(), | |
| d = e.queryIdentifier(); | |
| this.log_("Listen on " + g + " for " + d); | |
| var l = { p: g }; | |
| a.tag && ((l.q = e.queryObject()), (l.t = a.tag)); | |
| l.h = a.hashFn(); | |
| this.sendRequest("q", l, function (l) { | |
| var h = l.d, | |
| k = l.s; | |
| b.warnOnListenWarnings_(h, e); | |
| if ( | |
| (c.listens.get(g) && c.listens.get(g).get(d)) === a && | |
| (c.log_("listen response", l), | |
| "ok" !== k && c.removeListen_(g, d), | |
| a.onComplete) | |
| ) | |
| a.onComplete(k, h); | |
| }); | |
| }; | |
| b.warnOnListenWarnings_ = function (a, b) { | |
| a && | |
| "object" === typeof a && | |
| e.contains(a, "w") && | |
| ((a = e.safeGet(a, "w")), | |
| Array.isArray(a) && | |
| ~a.indexOf("no_index") && | |
| ((a = | |
| '".indexOn": "' + b.getQueryParams().getIndex().toString() + '"'), | |
| F( | |
| "Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding " + | |
| (a + " at ") + | |
| (b.path.toString() + | |
| " to your security rules for better performance.") | |
| ))); | |
| }; | |
| b.prototype.refreshAuthToken = function (a) { | |
| this.authToken_ = a; | |
| this.log_("Auth token refreshed"); | |
| this.authToken_ | |
| ? this.tryAuth() | |
| : this.connected_ && this.sendRequest("unauth", {}, function () {}); | |
| this.reduceReconnectDelayIfAdminCredential_(a); | |
| }; | |
| b.prototype.reduceReconnectDelayIfAdminCredential_ = function (a) { | |
| if ((a && 40 === a.length) || e.isAdmin(a)) | |
| this.log_( | |
| "Admin auth credential detected. Reducing max reconnect time." | |
| ), | |
| (this.maxReconnectDelay_ = 3e4); | |
| }; | |
| b.prototype.tryAuth = function () { | |
| var a = this; | |
| if (this.connected_ && this.authToken_) { | |
| var b = this.authToken_, | |
| c = e.isValidFormat(b) ? "auth" : "gauth", | |
| g = { cred: b }; | |
| null === this.authOverride_ | |
| ? (g.noauth = !0) | |
| : "object" === typeof this.authOverride_ && | |
| (g.authvar = this.authOverride_); | |
| this.sendRequest(c, g, function (c) { | |
| var e = c.s; | |
| c = c.d || "error"; | |
| if (a.authToken_ === b) | |
| if ("ok" === e) a.invalidAuthTokenCount_ = 0; | |
| else a.onAuthRevoked_(e, c); | |
| }); | |
| } | |
| }; | |
| b.prototype.unlisten = function (a, b) { | |
| var c = a.path.toString(), | |
| g = a.queryIdentifier(); | |
| this.log_("Unlisten called for " + c + " " + g); | |
| e.assert( | |
| a.getQueryParams().isDefault() || !a.getQueryParams().loadsAllData(), | |
| "unlisten() called for non-default but complete query" | |
| ); | |
| this.removeListen_(c, g) && | |
| this.connected_ && | |
| this.sendUnlisten_(c, g, a.queryObject(), b); | |
| }; | |
| b.prototype.sendUnlisten_ = function (a, b, c, e) { | |
| this.log_("Unlisten on " + a + " for " + b); | |
| a = { p: a }; | |
| e && ((a.q = c), (a.t = e)); | |
| this.sendRequest("n", a); | |
| }; | |
| b.prototype.onDisconnectPut = function (a, b, c) { | |
| this.connected_ | |
| ? this.sendOnDisconnect_("o", a, b, c) | |
| : this.onDisconnectRequestQueue_.push({ | |
| pathString: a, | |
| action: "o", | |
| data: b, | |
| onComplete: c, | |
| }); | |
| }; | |
| b.prototype.onDisconnectMerge = function (a, b, c) { | |
| this.connected_ | |
| ? this.sendOnDisconnect_("om", a, b, c) | |
| : this.onDisconnectRequestQueue_.push({ | |
| pathString: a, | |
| action: "om", | |
| data: b, | |
| onComplete: c, | |
| }); | |
| }; | |
| b.prototype.onDisconnectCancel = function (a, b) { | |
| this.connected_ | |
| ? this.sendOnDisconnect_("oc", a, null, b) | |
| : this.onDisconnectRequestQueue_.push({ | |
| pathString: a, | |
| action: "oc", | |
| data: null, | |
| onComplete: b, | |
| }); | |
| }; | |
| b.prototype.sendOnDisconnect_ = function (a, b, c, e) { | |
| b = { p: b, d: c }; | |
| this.log_("onDisconnect " + a, b); | |
| this.sendRequest(a, b, function (a) { | |
| e && | |
| setTimeout(function () { | |
| e(a.s, a.d); | |
| }, 0); | |
| }); | |
| }; | |
| b.prototype.put = function (a, b, c, e) { | |
| this.putInternal("p", a, b, c, e); | |
| }; | |
| b.prototype.merge = function (a, b, c, e) { | |
| this.putInternal("m", a, b, c, e); | |
| }; | |
| b.prototype.putInternal = function (a, b, c, e, g) { | |
| c = { p: b, d: c }; | |
| void 0 !== g && (c.h = g); | |
| this.outstandingPuts_.push({ action: a, request: c, onComplete: e }); | |
| this.outstandingPutCount_++; | |
| a = this.outstandingPuts_.length - 1; | |
| this.connected_ ? this.sendPut_(a) : this.log_("Buffering put: " + b); | |
| }; | |
| b.prototype.sendPut_ = function (a) { | |
| var b = this, | |
| c = this.outstandingPuts_[a].action, | |
| e = this.outstandingPuts_[a].request, | |
| g = this.outstandingPuts_[a].onComplete; | |
| this.outstandingPuts_[a].queued = this.connected_; | |
| this.sendRequest(c, e, function (e) { | |
| b.log_(c + " response", e); | |
| delete b.outstandingPuts_[a]; | |
| b.outstandingPutCount_--; | |
| 0 === b.outstandingPutCount_ && (b.outstandingPuts_ = []); | |
| g && g(e.s, e.d); | |
| }); | |
| }; | |
| b.prototype.reportStats = function (a) { | |
| var b = this; | |
| this.connected_ && | |
| ((a = { c: a }), | |
| this.log_("reportStats", a), | |
| this.sendRequest("s", a, function (a) { | |
| "ok" !== a.s && | |
| b.log_("reportStats", "Error sending stats: " + a.d); | |
| })); | |
| }; | |
| b.prototype.onDataMessage_ = function (a) { | |
| if ("r" in a) { | |
| this.log_("from server: " + e.stringify(a)); | |
| var b = a.r, | |
| c = this.requestCBHash_[b]; | |
| c && (delete this.requestCBHash_[b], c(a.b)); | |
| } else { | |
| if ("error" in a) | |
| throw "A server-side error has occurred: " + a.error; | |
| if ("a" in a) this.onDataPush_(a.a, a.b); | |
| } | |
| }; | |
| b.prototype.onDataPush_ = function (a, b) { | |
| this.log_("handleServerMessage", a, b); | |
| if ("d" === a) this.onDataUpdate_(b.p, b.d, !1, b.t); | |
| else if ("m" === a) this.onDataUpdate_(b.p, b.d, !0, b.t); | |
| else if ("c" === a) this.onListenRevoked_(b.p, b.q); | |
| else if ("ac" === a) this.onAuthRevoked_(b.s, b.d); | |
| else if ("sd" === a) this.onSecurityDebugPacket_(b); | |
| else | |
| Q( | |
| "Unrecognized action received from server: " + | |
| e.stringify(a) + | |
| "\nAre you using the latest client?" | |
| ); | |
| }; | |
| b.prototype.onReady_ = function (a, b) { | |
| this.log_("connection ready"); | |
| this.connected_ = !0; | |
| this.lastConnectionEstablishedTime_ = new Date().getTime(); | |
| this.handleTimestamp_(a); | |
| this.lastSessionId = b; | |
| this.firstConnection_ && this.sendConnectStats_(); | |
| this.restoreState_(); | |
| this.firstConnection_ = !1; | |
| this.onConnectStatus_(!0); | |
| }; | |
| b.prototype.scheduleConnect_ = function (a) { | |
| var b = this; | |
| e.assert( | |
| !this.realtime_, | |
| "Scheduling a connect when we're already connected/ing?" | |
| ); | |
| this.establishConnectionTimer_ && | |
| clearTimeout(this.establishConnectionTimer_); | |
| this.establishConnectionTimer_ = setTimeout(function () { | |
| b.establishConnectionTimer_ = null; | |
| b.establishConnection_(); | |
| }, Math.floor(a)); | |
| }; | |
| b.prototype.onVisible_ = function (a) { | |
| a && | |
| !this.visible_ && | |
| this.reconnectDelay_ === this.maxReconnectDelay_ && | |
| (this.log_("Window became visible. Reducing delay."), | |
| (this.reconnectDelay_ = 1e3), | |
| this.realtime_ || this.scheduleConnect_(0)); | |
| this.visible_ = a; | |
| }; | |
| b.prototype.onOnline_ = function (a) { | |
| a | |
| ? (this.log_("Browser went online."), | |
| (this.reconnectDelay_ = 1e3), | |
| this.realtime_ || this.scheduleConnect_(0)) | |
| : (this.log_("Browser went offline. Killing connection."), | |
| this.realtime_ && this.realtime_.close()); | |
| }; | |
| b.prototype.onRealtimeDisconnect_ = function () { | |
| this.log_("data client disconnected"); | |
| this.connected_ = !1; | |
| this.realtime_ = null; | |
| this.cancelSentTransactions_(); | |
| this.requestCBHash_ = {}; | |
| if (this.shouldReconnect_()) { | |
| this.visible_ | |
| ? this.lastConnectionEstablishedTime_ && | |
| (3e4 < | |
| new Date().getTime() - this.lastConnectionEstablishedTime_ && | |
| (this.reconnectDelay_ = 1e3), | |
| (this.lastConnectionEstablishedTime_ = null)) | |
| : (this.log_("Window isn't visible. Delaying reconnect."), | |
| (this.reconnectDelay_ = this.maxReconnectDelay_), | |
| (this.lastConnectionAttemptTime_ = new Date().getTime())); | |
| var a = new Date().getTime() - this.lastConnectionAttemptTime_; | |
| a = Math.max(0, this.reconnectDelay_ - a); | |
| a *= Math.random(); | |
| this.log_("Trying to reconnect in " + a + "ms"); | |
| this.scheduleConnect_(a); | |
| this.reconnectDelay_ = Math.min( | |
| this.maxReconnectDelay_, | |
| 1.3 * this.reconnectDelay_ | |
| ); | |
| } | |
| this.onConnectStatus_(!1); | |
| }; | |
| b.prototype.establishConnection_ = function () { | |
| if (this.shouldReconnect_()) { | |
| this.log_("Making a connection attempt"); | |
| this.lastConnectionAttemptTime_ = new Date().getTime(); | |
| this.lastConnectionEstablishedTime_ = null; | |
| var a = this.onDataMessage_.bind(this), | |
| c = this.onReady_.bind(this), | |
| g = this.onRealtimeDisconnect_.bind(this), | |
| d = this.id + ":" + b.nextConnectionId_++, | |
| l = this, | |
| h = this.lastSessionId, | |
| k = !1, | |
| n = null, | |
| v = function () { | |
| n ? n.close() : ((k = !0), g()); | |
| }; | |
| this.realtime_ = { | |
| close: v, | |
| sendRequest: function (a) { | |
| e.assert( | |
| n, | |
| "sendRequest call when we're not connected not allowed." | |
| ); | |
| n.sendRequest(a); | |
| }, | |
| }; | |
| var f = this.forceTokenRefresh_; | |
| this.forceTokenRefresh_ = !1; | |
| this.authTokenProvider_ | |
| .getToken(f) | |
| .then(function (b) { | |
| k | |
| ? K("getToken() completed but was canceled") | |
| : (K("getToken() completed. Creating connection."), | |
| (l.authToken_ = b && b.accessToken), | |
| (n = new md( | |
| d, | |
| l.repoInfo_, | |
| a, | |
| c, | |
| g, | |
| function (a) { | |
| F(a + " (" + l.repoInfo_.toString() + ")"); | |
| l.interrupt("server_kill"); | |
| }, | |
| h | |
| ))); | |
| }) | |
| .then(null, function (a) { | |
| l.log_("Failed to get token: " + a); | |
| k || (e.CONSTANTS.NODE_ADMIN && F(a), v()); | |
| }); | |
| } | |
| }; | |
| b.prototype.interrupt = function (a) { | |
| K("Interrupting connection for reason: " + a); | |
| this.interruptReasons_[a] = !0; | |
| if (this.realtime_) this.realtime_.close(); | |
| else if ( | |
| (this.establishConnectionTimer_ && | |
| (clearTimeout(this.establishConnectionTimer_), | |
| (this.establishConnectionTimer_ = null)), | |
| this.connected_) | |
| ) | |
| this.onRealtimeDisconnect_(); | |
| }; | |
| b.prototype.resume = function (a) { | |
| K("Resuming connection for reason: " + a); | |
| delete this.interruptReasons_[a]; | |
| e.isEmpty(this.interruptReasons_) && | |
| ((this.reconnectDelay_ = 1e3), | |
| this.realtime_ || this.scheduleConnect_(0)); | |
| }; | |
| b.prototype.handleTimestamp_ = function (a) { | |
| a -= new Date().getTime(); | |
| this.onServerInfoUpdate_({ serverTimeOffset: a }); | |
| }; | |
| b.prototype.cancelSentTransactions_ = function () { | |
| for (var a = 0; a < this.outstandingPuts_.length; a++) { | |
| var b = this.outstandingPuts_[a]; | |
| if (b && "h" in b.request && b.queued) { | |
| if (b.onComplete) b.onComplete("disconnect"); | |
| delete this.outstandingPuts_[a]; | |
| this.outstandingPutCount_--; | |
| } | |
| } | |
| 0 === this.outstandingPutCount_ && (this.outstandingPuts_ = []); | |
| }; | |
| b.prototype.onListenRevoked_ = function (a, b) { | |
| b = b | |
| ? b | |
| .map(function (a) { | |
| return V(a); | |
| }) | |
| .join("$") | |
| : "default"; | |
| if ((a = this.removeListen_(a, b)) && a.onComplete) | |
| a.onComplete("permission_denied"); | |
| }; | |
| b.prototype.removeListen_ = function (a, b) { | |
| a = new fa(a).toString(); | |
| if (this.listens.has(a)) { | |
| var c = this.listens.get(a); | |
| var e = c.get(b); | |
| c.delete(b); | |
| 0 === c.size && this.listens.delete(a); | |
| } else e = void 0; | |
| return e; | |
| }; | |
| b.prototype.onAuthRevoked_ = function (a, b) { | |
| K("Auth token revoked: " + a + "/" + b); | |
| this.authToken_ = null; | |
| this.forceTokenRefresh_ = !0; | |
| this.realtime_.close(); | |
| if ("invalid_token" === a || "permission_denied" === a) | |
| this.invalidAuthTokenCount_++, | |
| 3 <= this.invalidAuthTokenCount_ && | |
| ((this.reconnectDelay_ = 3e4), | |
| this.authTokenProvider_.notifyForInvalidToken()); | |
| }; | |
| b.prototype.onSecurityDebugPacket_ = function (a) { | |
| this.securityDebugCallback_ | |
| ? this.securityDebugCallback_(a) | |
| : "msg" in a && | |
| console.log("FIREBASE: " + a.msg.replace("\n", "\nFIREBASE: ")); | |
| }; | |
| b.prototype.restoreState_ = function () { | |
| var a, b, e; | |
| this.tryAuth(); | |
| try { | |
| for ( | |
| var g = c.__values(this.listens.values()), d = g.next(); | |
| !d.done; | |
| d = g.next() | |
| ) { | |
| var l = d.value; | |
| try { | |
| for ( | |
| var h = ((b = void 0), c.__values(l.values())), k = h.next(); | |
| !k.done; | |
| k = h.next() | |
| ) | |
| this.sendListen_(k.value); | |
| } catch (Hd) { | |
| b = { error: Hd }; | |
| } finally { | |
| try { | |
| k && !k.done && (e = h.return) && e.call(h); | |
| } finally { | |
| if (b) throw b.error; | |
| } | |
| } | |
| } | |
| } catch (Hd) { | |
| var n = { error: Hd }; | |
| } finally { | |
| try { | |
| d && !d.done && (a = g.return) && a.call(g); | |
| } finally { | |
| if (n) throw n.error; | |
| } | |
| } | |
| for (n = 0; n < this.outstandingPuts_.length; n++) | |
| this.outstandingPuts_[n] && this.sendPut_(n); | |
| for (; this.onDisconnectRequestQueue_.length; ) | |
| (n = this.onDisconnectRequestQueue_.shift()), | |
| this.sendOnDisconnect_( | |
| n.action, | |
| n.pathString, | |
| n.data, | |
| n.onComplete | |
| ); | |
| }; | |
| b.prototype.sendConnectStats_ = function () { | |
| var a = {}, | |
| b = "js"; | |
| e.CONSTANTS.NODE_ADMIN | |
| ? (b = "admin_node") | |
| : e.CONSTANTS.NODE_CLIENT && (b = "node"); | |
| a["sdk." + b + "." + Ma.replace(/\./g, "-")] = 1; | |
| e.isMobileCordova() | |
| ? (a["framework.cordova"] = 1) | |
| : e.isReactNative() && (a["framework.reactnative"] = 1); | |
| this.reportStats(a); | |
| }; | |
| b.prototype.shouldReconnect_ = function () { | |
| var a = Qa.getInstance().currentlyOnline(); | |
| return e.isEmpty(this.interruptReasons_) && a; | |
| }; | |
| b.nextPersistentConnectionId_ = 0; | |
| b.nextConnectionId_ = 0; | |
| return b; | |
| })(Ba), | |
| Fb = (function (a) { | |
| function b(b, c, e) { | |
| var g = a.call(this) || this; | |
| g.repoInfo_ = b; | |
| g.onDataUpdate_ = c; | |
| g.authTokenProvider_ = e; | |
| g.log_ = D("p:rest:"); | |
| g.listens_ = {}; | |
| return g; | |
| } | |
| c.__extends(b, a); | |
| b.prototype.reportStats = function (a) { | |
| throw Error("Method not implemented."); | |
| }; | |
| b.getListenId_ = function (a, b) { | |
| if (void 0 !== b) return "tag$" + b; | |
| e.assert( | |
| a.getQueryParams().isDefault(), | |
| "should have a tag if it's not a default query." | |
| ); | |
| return a.path.toString(); | |
| }; | |
| b.prototype.listen = function (a, c, g, d) { | |
| var l = this, | |
| h = a.path.toString(); | |
| this.log_("Listen called for " + h + " " + a.queryIdentifier()); | |
| var k = b.getListenId_(a, g), | |
| n = {}; | |
| this.listens_[k] = n; | |
| a = a.getQueryParams().toRestQueryStringParameters(); | |
| this.restRequest_(h + ".json", a, function (a, b) { | |
| 404 === a && (a = b = null); | |
| if (null === a) l.onDataUpdate_(h, b, !1, g); | |
| e.safeGet(l.listens_, k) === n && | |
| d( | |
| a ? (401 === a ? "permission_denied" : "rest_error:" + a) : "ok", | |
| null | |
| ); | |
| }); | |
| }; | |
| b.prototype.unlisten = function (a, c) { | |
| a = b.getListenId_(a, c); | |
| delete this.listens_[a]; | |
| }; | |
| b.prototype.refreshAuthToken = function (a) {}; | |
| b.prototype.restRequest_ = function (a, b, c) { | |
| var g = this; | |
| void 0 === b && (b = {}); | |
| b.format = "export"; | |
| this.authTokenProvider_.getToken(!1).then(function (d) { | |
| (d = d && d.accessToken) && (b.auth = d); | |
| var l = | |
| (g.repoInfo_.secure ? "https://" : "http://") + | |
| g.repoInfo_.host + | |
| a + | |
| "?ns\x3d" + | |
| g.repoInfo_.namespace + | |
| e.querystring(b); | |
| g.log_("Sending REST request for " + l); | |
| var h = new XMLHttpRequest(); | |
| h.onreadystatechange = function () { | |
| if (c && 4 === h.readyState) { | |
| g.log_( | |
| "REST Response for " + l + " received. status:", | |
| h.status, | |
| "response:", | |
| h.responseText | |
| ); | |
| var a = null; | |
| if (200 <= h.status && 300 > h.status) { | |
| try { | |
| a = e.jsonEval(h.responseText); | |
| } catch (Rc) { | |
| F( | |
| "Failed to parse JSON response for " + | |
| l + | |
| ": " + | |
| h.responseText | |
| ); | |
| } | |
| c(null, a); | |
| } else | |
| 401 !== h.status && | |
| 404 !== h.status && | |
| F( | |
| "Got unsuccessful REST response for " + | |
| l + | |
| " Status: " + | |
| h.status | |
| ), | |
| c(h.status); | |
| c = null; | |
| } | |
| }; | |
| h.open("GET", l, !0); | |
| h.send(); | |
| }); | |
| }; | |
| return b; | |
| })(Ba), | |
| eb = (function () { | |
| function a(a, b, c, g) { | |
| var d = this; | |
| this.repoInfo_ = a; | |
| this.app = c; | |
| this.dataUpdateCount = 0; | |
| this.statsListener_ = null; | |
| this.eventQueue_ = new Pa(); | |
| this.nextWriteId_ = 1; | |
| this.interceptServerDataCallback_ = null; | |
| this.onDisconnect_ = new yb(); | |
| this.persistentConnection_ = null; | |
| g = new Cd(c, g); | |
| this.stats_ = xa.getCollection(a); | |
| if ( | |
| b || | |
| 0 <= | |
| ( | |
| ("object" === typeof window && | |
| window.navigator && | |
| window.navigator.userAgent) || | |
| "" | |
| ).search( | |
| /googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i | |
| ) | |
| ) | |
| (this.server_ = new Fb( | |
| this.repoInfo_, | |
| this.onDataUpdate_.bind(this), | |
| g | |
| )), | |
| setTimeout(this.onConnectStatus_.bind(this, !0), 0); | |
| else { | |
| b = c.options.databaseAuthVariableOverride; | |
| if ("undefined" !== typeof b && null !== b) { | |
| if ("object" !== typeof b) | |
| throw Error( | |
| "Only objects are supported for option databaseAuthVariableOverride" | |
| ); | |
| try { | |
| e.stringify(b); | |
| } catch (Qc) { | |
| throw Error("Invalid authOverride provided: " + Qc); | |
| } | |
| } | |
| this.server_ = this.persistentConnection_ = new Cb( | |
| this.repoInfo_, | |
| this.onDataUpdate_.bind(this), | |
| this.onConnectStatus_.bind(this), | |
| this.onServerInfoUpdate_.bind(this), | |
| g, | |
| b | |
| ); | |
| } | |
| g.addTokenChangeListener(function (a) { | |
| d.server_.refreshAuthToken(a); | |
| }); | |
| this.statsReporter_ = xa.getOrCreateReporter(a, function () { | |
| return new ab(d.stats_, d.server_); | |
| }); | |
| this.transactionsInit_(); | |
| this.infoData_ = new Qb(); | |
| this.infoSyncTree_ = new ob({ | |
| startListening: function (a, b, c, e) { | |
| b = []; | |
| c = d.infoData_.getNode(a.path); | |
| c.isEmpty() || | |
| ((b = d.infoSyncTree_.applyServerOverwrite(a.path, c)), | |
| setTimeout(function () { | |
| e("ok"); | |
| }, 0)); | |
| return b; | |
| }, | |
| stopListening: function () {}, | |
| }); | |
| this.updateInfo_("connected", !1); | |
| this.serverSyncTree_ = new ob({ | |
| startListening: function (a, b, c, e) { | |
| d.server_.listen(a, c, b, function (b, c) { | |
| b = e(b, c); | |
| d.eventQueue_.raiseEventsForChangedPath(a.path, b); | |
| }); | |
| return []; | |
| }, | |
| stopListening: function (a, b) { | |
| d.server_.unlisten(a, b); | |
| }, | |
| }); | |
| } | |
| a.prototype.toString = function () { | |
| return ( | |
| (this.repoInfo_.secure ? "https://" : "http://") + this.repoInfo_.host | |
| ); | |
| }; | |
| a.prototype.name = function () { | |
| return this.repoInfo_.namespace; | |
| }; | |
| a.prototype.serverTime = function () { | |
| var a = | |
| this.infoData_.getNode(new fa(".info/serverTimeOffset")).val() || 0; | |
| return new Date().getTime() + a; | |
| }; | |
| a.prototype.generateServerValues = function () { | |
| var a = { timestamp: this.serverTime() }; | |
| a = a || {}; | |
| a.timestamp = a.timestamp || new Date().getTime(); | |
| return a; | |
| }; | |
| a.prototype.onDataUpdate_ = function (a, b, c, g) { | |
| this.dataUpdateCount++; | |
| var d = new fa(a); | |
| b = this.interceptServerDataCallback_ | |
| ? this.interceptServerDataCallback_(a, b) | |
| : b; | |
| a = []; | |
| g | |
| ? c | |
| ? ((b = e.map(b, function (a) { | |
| return h(a); | |
| })), | |
| (a = this.serverSyncTree_.applyTaggedQueryMerge(d, b, g))) | |
| : ((b = h(b)), | |
| (a = this.serverSyncTree_.applyTaggedQueryOverwrite(d, b, g))) | |
| : c | |
| ? ((g = e.map(b, function (a) { | |
| return h(a); | |
| })), | |
| (a = this.serverSyncTree_.applyServerMerge(d, g))) | |
| : ((g = h(b)), (a = this.serverSyncTree_.applyServerOverwrite(d, g))); | |
| g = d; | |
| 0 < a.length && (g = this.rerunTransactions_(d)); | |
| this.eventQueue_.raiseEventsForChangedPath(g, a); | |
| }; | |
| a.prototype.interceptServerData_ = function (a) { | |
| this.interceptServerDataCallback_ = a; | |
| }; | |
| a.prototype.onConnectStatus_ = function (a) { | |
| this.updateInfo_("connected", a); | |
| !1 === a && this.runOnDisconnectEvents_(); | |
| }; | |
| a.prototype.onServerInfoUpdate_ = function (a) { | |
| var c = this; | |
| b(a, function (a, b) { | |
| c.updateInfo_(a, b); | |
| }); | |
| }; | |
| a.prototype.updateInfo_ = function (a, b) { | |
| a = new fa("/.info/" + a); | |
| b = h(b); | |
| this.infoData_.updateSnapshot(a, b); | |
| b = this.infoSyncTree_.applyServerOverwrite(a, b); | |
| this.eventQueue_.raiseEventsForChangedPath(a, b); | |
| }; | |
| a.prototype.getNextWriteId_ = function () { | |
| return this.nextWriteId_++; | |
| }; | |
| a.prototype.setWithPriority = function (a, b, c, e) { | |
| var g = this; | |
| this.log_("set", { path: a.toString(), value: b, priority: c }); | |
| var d = this.generateServerValues(); | |
| b = h(b, c); | |
| d = oa(b, d); | |
| var l = this.getNextWriteId_(); | |
| d = this.serverSyncTree_.applyUserOverwrite(a, d, l, !0); | |
| this.eventQueue_.queueEvents(d); | |
| this.server_.put(a.toString(), b.val(!0), function (b, c) { | |
| var d = "ok" === b; | |
| d || F("set at " + a + " failed: " + b); | |
| d = g.serverSyncTree_.ackUserWrite(l, !d); | |
| g.eventQueue_.raiseEventsForChangedPath(a, d); | |
| g.callOnCompleteCallback(e, b, c); | |
| }); | |
| d = this.abortTransactions_(a); | |
| this.rerunTransactions_(d); | |
| this.eventQueue_.raiseEventsForChangedPath(d, []); | |
| }; | |
| a.prototype.update = function (a, c, e) { | |
| var g = this; | |
| this.log_("update", { path: a.toString(), value: c }); | |
| var d = !0, | |
| l = this.generateServerValues(), | |
| k = {}; | |
| b(c, function (a, b) { | |
| d = !1; | |
| b = h(b); | |
| k[a] = oa(b, l); | |
| }); | |
| if (d) | |
| K("update() called with empty data. Don't do anything."), | |
| this.callOnCompleteCallback(e, "ok"); | |
| else { | |
| var n = this.getNextWriteId_(), | |
| v = this.serverSyncTree_.applyUserMerge(a, k, n); | |
| this.eventQueue_.queueEvents(v); | |
| this.server_.merge(a.toString(), c, function (b, c) { | |
| var d = "ok" === b; | |
| d || F("update at " + a + " failed: " + b); | |
| d = g.serverSyncTree_.ackUserWrite(n, !d); | |
| var l = 0 < d.length ? g.rerunTransactions_(a) : a; | |
| g.eventQueue_.raiseEventsForChangedPath(l, d); | |
| g.callOnCompleteCallback(e, b, c); | |
| }); | |
| b(c, function (b) { | |
| b = g.abortTransactions_(a.child(b)); | |
| g.rerunTransactions_(b); | |
| }); | |
| this.eventQueue_.raiseEventsForChangedPath(a, []); | |
| } | |
| }; | |
| a.prototype.runOnDisconnectEvents_ = function () { | |
| var a = this; | |
| this.log_("onDisconnectEvents"); | |
| var b = this.generateServerValues(), | |
| c = []; | |
| dc(this.onDisconnect_, b).forEachTree(fa.Empty, function (b, e) { | |
| c = c.concat(a.serverSyncTree_.applyServerOverwrite(b, e)); | |
| b = a.abortTransactions_(b); | |
| a.rerunTransactions_(b); | |
| }); | |
| this.onDisconnect_ = new yb(); | |
| this.eventQueue_.raiseEventsForChangedPath(fa.Empty, c); | |
| }; | |
| a.prototype.onDisconnectCancel = function (a, b) { | |
| var c = this; | |
| this.server_.onDisconnectCancel(a.toString(), function (e, g) { | |
| "ok" === e && c.onDisconnect_.forget(a); | |
| c.callOnCompleteCallback(b, e, g); | |
| }); | |
| }; | |
| a.prototype.onDisconnectSet = function (a, b, c) { | |
| var e = this, | |
| g = h(b); | |
| this.server_.onDisconnectPut(a.toString(), g.val(!0), function (b, d) { | |
| "ok" === b && e.onDisconnect_.remember(a, g); | |
| e.callOnCompleteCallback(c, b, d); | |
| }); | |
| }; | |
| a.prototype.onDisconnectSetWithPriority = function (a, b, c, e) { | |
| var g = this, | |
| d = h(b, c); | |
| this.server_.onDisconnectPut(a.toString(), d.val(!0), function (b, c) { | |
| "ok" === b && g.onDisconnect_.remember(a, d); | |
| g.callOnCompleteCallback(e, b, c); | |
| }); | |
| }; | |
| a.prototype.onDisconnectUpdate = function (a, c, g) { | |
| var d = this; | |
| if (e.isEmpty(c)) | |
| K( | |
| "onDisconnect().update() called with empty data. Don't do anything." | |
| ), | |
| this.callOnCompleteCallback(g, "ok"); | |
| else | |
| this.server_.onDisconnectMerge(a.toString(), c, function (e, l) { | |
| "ok" === e && | |
| b(c, function (b, c) { | |
| c = h(c); | |
| d.onDisconnect_.remember(a.child(b), c); | |
| }); | |
| d.callOnCompleteCallback(g, e, l); | |
| }); | |
| }; | |
| a.prototype.addEventCallbackForQuery = function (a, b) { | |
| b = | |
| ".info" === a.path.getFront() | |
| ? this.infoSyncTree_.addEventRegistration(a, b) | |
| : this.serverSyncTree_.addEventRegistration(a, b); | |
| this.eventQueue_.raiseEventsAtPath(a.path, b); | |
| }; | |
| a.prototype.removeEventCallbackForQuery = function (a, b) { | |
| b = | |
| ".info" === a.path.getFront() | |
| ? this.infoSyncTree_.removeEventRegistration(a, b) | |
| : this.serverSyncTree_.removeEventRegistration(a, b); | |
| this.eventQueue_.raiseEventsAtPath(a.path, b); | |
| }; | |
| a.prototype.interrupt = function () { | |
| this.persistentConnection_ && | |
| this.persistentConnection_.interrupt("repo_interrupt"); | |
| }; | |
| a.prototype.resume = function () { | |
| this.persistentConnection_ && | |
| this.persistentConnection_.resume("repo_interrupt"); | |
| }; | |
| a.prototype.stats = function (a) { | |
| void 0 === a && (a = !1); | |
| if ("undefined" !== typeof console) { | |
| a | |
| ? (this.statsListener_ || | |
| (this.statsListener_ = new ec(this.stats_)), | |
| (a = this.statsListener_.get())) | |
| : (a = this.stats_.get()); | |
| var c = Object.keys(a).reduce(function (a, b) { | |
| return Math.max(b.length, a); | |
| }, 0); | |
| b(a, function (a, b) { | |
| var e = a; | |
| for (a = a.length; a < c + 2; a++) e += " "; | |
| console.log(e + b); | |
| }); | |
| } | |
| }; | |
| a.prototype.statsIncrementCounter = function (a) { | |
| this.stats_.incrementCounter(a); | |
| this.statsReporter_.includeStat(a); | |
| }; | |
| a.prototype.log_ = function () { | |
| for (var a = [], b = 0; b < arguments.length; b++) a[b] = arguments[b]; | |
| b = ""; | |
| this.persistentConnection_ && (b = this.persistentConnection_.id + ":"); | |
| K.apply(void 0, c.__spread([b], a)); | |
| }; | |
| a.prototype.callOnCompleteCallback = function (a, b, c) { | |
| a && | |
| ia(function () { | |
| if ("ok" === b) a(null); | |
| else { | |
| var e = (b || "error").toUpperCase(), | |
| g = e; | |
| c && (g += ": " + c); | |
| g = Error(g); | |
| g.code = e; | |
| a(g); | |
| } | |
| }); | |
| }; | |
| Object.defineProperty(a.prototype, "database", { | |
| get: function () { | |
| return this.__database || (this.__database = new yc(this)); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| return a; | |
| })(), | |
| ub = (function () { | |
| function a(b) { | |
| this.indexedFilter_ = new Nb(b.getIndex()); | |
| this.index_ = b.getIndex(); | |
| this.startPost_ = a.getStartPost_(b); | |
| this.endPost_ = a.getEndPost_(b); | |
| } | |
| a.prototype.getStartPost = function () { | |
| return this.startPost_; | |
| }; | |
| a.prototype.getEndPost = function () { | |
| return this.endPost_; | |
| }; | |
| a.prototype.matches = function (a) { | |
| return ( | |
| 0 >= this.index_.compare(this.getStartPost(), a) && | |
| 0 >= this.index_.compare(a, this.getEndPost()) | |
| ); | |
| }; | |
| a.prototype.updateChild = function (a, b, c, e, g, d) { | |
| this.matches(new ya(b, c)) || (c = Na.EMPTY_NODE); | |
| return this.indexedFilter_.updateChild(a, b, c, e, g, d); | |
| }; | |
| a.prototype.updateFullNode = function (a, b, c) { | |
| b.isLeafNode() && (b = Na.EMPTY_NODE); | |
| var e = b.withIndex(this.index_); | |
| e = e.updatePriority(Na.EMPTY_NODE); | |
| var g = this; | |
| b.forEachChild(Ja, function (a, b) { | |
| g.matches(new ya(a, b)) || | |
| (e = e.updateImmediateChild(a, Na.EMPTY_NODE)); | |
| }); | |
| return this.indexedFilter_.updateFullNode(a, e, c); | |
| }; | |
| a.prototype.updatePriority = function (a, b) { | |
| return a; | |
| }; | |
| a.prototype.filtersNodes = function () { | |
| return !0; | |
| }; | |
| a.prototype.getIndexedFilter = function () { | |
| return this.indexedFilter_; | |
| }; | |
| a.prototype.getIndex = function () { | |
| return this.index_; | |
| }; | |
| a.getStartPost_ = function (a) { | |
| if (a.hasStart()) { | |
| var b = a.getIndexStartName(); | |
| return a.getIndex().makePost(a.getIndexStartValue(), b); | |
| } | |
| return a.getIndex().minPost(); | |
| }; | |
| a.getEndPost_ = function (a) { | |
| if (a.hasEnd()) { | |
| var b = a.getIndexEndName(); | |
| return a.getIndex().makePost(a.getIndexEndValue(), b); | |
| } | |
| return a.getIndex().maxPost(); | |
| }; | |
| return a; | |
| })(), | |
| Za = (function () { | |
| function a(a) { | |
| this.rangedFilter_ = new ub(a); | |
| this.index_ = a.getIndex(); | |
| this.limit_ = a.getLimit(); | |
| this.reverse_ = !a.isViewFromLeft(); | |
| } | |
| a.prototype.updateChild = function (a, b, c, e, g, d) { | |
| this.rangedFilter_.matches(new ya(b, c)) || (c = Na.EMPTY_NODE); | |
| return a.getImmediateChild(b).equals(c) | |
| ? a | |
| : a.numChildren() < this.limit_ | |
| ? this.rangedFilter_.getIndexedFilter().updateChild(a, b, c, e, g, d) | |
| : this.fullLimitUpdateChild_(a, b, c, g, d); | |
| }; | |
| a.prototype.updateFullNode = function (a, b, c) { | |
| if (b.isLeafNode() || b.isEmpty()) | |
| var e = Na.EMPTY_NODE.withIndex(this.index_); | |
| else if ( | |
| 2 * this.limit_ < b.numChildren() && | |
| b.isIndexed(this.index_) | |
| ) { | |
| e = Na.EMPTY_NODE.withIndex(this.index_); | |
| var g = void 0; | |
| g = this.reverse_ | |
| ? b.getReverseIteratorFrom( | |
| this.rangedFilter_.getEndPost(), | |
| this.index_ | |
| ) | |
| : b.getIteratorFrom(this.rangedFilter_.getStartPost(), this.index_); | |
| for (b = 0; g.hasNext() && b < this.limit_; ) { | |
| var d = g.getNext(), | |
| l = void 0; | |
| if ( | |
| (l = this.reverse_ | |
| ? 0 >= this.index_.compare(this.rangedFilter_.getStartPost(), d) | |
| : 0 >= this.index_.compare(d, this.rangedFilter_.getEndPost())) | |
| ) | |
| (e = e.updateImmediateChild(d.name, d.node)), b++; | |
| else break; | |
| } | |
| } else { | |
| e = b.withIndex(this.index_); | |
| e = e.updatePriority(Na.EMPTY_NODE); | |
| var h = void 0, | |
| k = void 0, | |
| n = void 0; | |
| g = void 0; | |
| if (this.reverse_) { | |
| g = e.getReverseIterator(this.index_); | |
| h = this.rangedFilter_.getEndPost(); | |
| k = this.rangedFilter_.getStartPost(); | |
| var v = this.index_.getCompare(); | |
| n = function (a, b) { | |
| return v(b, a); | |
| }; | |
| } else | |
| (g = e.getIterator(this.index_)), | |
| (h = this.rangedFilter_.getStartPost()), | |
| (k = this.rangedFilter_.getEndPost()), | |
| (n = this.index_.getCompare()); | |
| b = 0; | |
| for (var f = !1; g.hasNext(); ) | |
| (d = g.getNext()), | |
| !f && 0 >= n(h, d) && (f = !0), | |
| (l = f && b < this.limit_ && 0 >= n(d, k)) | |
| ? b++ | |
| : (e = e.updateImmediateChild(d.name, Na.EMPTY_NODE)); | |
| } | |
| return this.rangedFilter_.getIndexedFilter().updateFullNode(a, e, c); | |
| }; | |
| a.prototype.updatePriority = function (a, b) { | |
| return a; | |
| }; | |
| a.prototype.filtersNodes = function () { | |
| return !0; | |
| }; | |
| a.prototype.getIndexedFilter = function () { | |
| return this.rangedFilter_.getIndexedFilter(); | |
| }; | |
| a.prototype.getIndex = function () { | |
| return this.index_; | |
| }; | |
| a.prototype.fullLimitUpdateChild_ = function (a, b, c, g, d) { | |
| if (this.reverse_) { | |
| var l = this.index_.getCompare(); | |
| var h = function (a, b) { | |
| return l(b, a); | |
| }; | |
| } else h = this.index_.getCompare(); | |
| e.assert(a.numChildren() === this.limit_, ""); | |
| var k = new ya(b, c), | |
| n = this.reverse_ | |
| ? a.getFirstChild(this.index_) | |
| : a.getLastChild(this.index_), | |
| v = this.rangedFilter_.matches(k); | |
| if (a.hasChild(b)) { | |
| var f = a.getImmediateChild(b); | |
| for ( | |
| n = g.getChildAfterChild(this.index_, n, this.reverse_); | |
| null != n && (n.name === b || a.hasChild(n.name)); | |
| ) | |
| n = g.getChildAfterChild(this.index_, n, this.reverse_); | |
| g = null == n ? 1 : h(n, k); | |
| if (v && !c.isEmpty() && 0 <= g) | |
| return ( | |
| null != d && d.trackChildChange(ib.childChangedChange(b, c, f)), | |
| a.updateImmediateChild(b, c) | |
| ); | |
| null != d && d.trackChildChange(ib.childRemovedChange(b, f)); | |
| a = a.updateImmediateChild(b, Na.EMPTY_NODE); | |
| return null != n && this.rangedFilter_.matches(n) | |
| ? (null != d && | |
| d.trackChildChange(ib.childAddedChange(n.name, n.node)), | |
| a.updateImmediateChild(n.name, n.node)) | |
| : a; | |
| } | |
| return c.isEmpty() | |
| ? a | |
| : v && 0 <= h(n, k) | |
| ? (null != d && | |
| (d.trackChildChange(ib.childRemovedChange(n.name, n.node)), | |
| d.trackChildChange(ib.childAddedChange(b, c))), | |
| a | |
| .updateImmediateChild(b, c) | |
| .updateImmediateChild(n.name, Na.EMPTY_NODE)) | |
| : a; | |
| }; | |
| return a; | |
| })(), | |
| Ec = (function () { | |
| function a() { | |
| this.endNameSet_ = this.endSet_ = this.startNameSet_ = this.startSet_ = this.limitSet_ = !1; | |
| this.limit_ = 0; | |
| this.viewFrom_ = ""; | |
| this.indexStartValue_ = null; | |
| this.indexStartName_ = ""; | |
| this.indexEndValue_ = null; | |
| this.indexEndName_ = ""; | |
| this.index_ = Ja; | |
| } | |
| a.prototype.hasStart = function () { | |
| return this.startSet_; | |
| }; | |
| a.prototype.isViewFromLeft = function () { | |
| return "" === this.viewFrom_ | |
| ? this.startSet_ | |
| : this.viewFrom_ === a.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT; | |
| }; | |
| a.prototype.getIndexStartValue = function () { | |
| e.assert(this.startSet_, "Only valid if start has been set"); | |
| return this.indexStartValue_; | |
| }; | |
| a.prototype.getIndexStartName = function () { | |
| e.assert(this.startSet_, "Only valid if start has been set"); | |
| return this.startNameSet_ ? this.indexStartName_ : "[MIN_NAME]"; | |
| }; | |
| a.prototype.hasEnd = function () { | |
| return this.endSet_; | |
| }; | |
| a.prototype.getIndexEndValue = function () { | |
| e.assert(this.endSet_, "Only valid if end has been set"); | |
| return this.indexEndValue_; | |
| }; | |
| a.prototype.getIndexEndName = function () { | |
| e.assert(this.endSet_, "Only valid if end has been set"); | |
| return this.endNameSet_ ? this.indexEndName_ : "[MAX_NAME]"; | |
| }; | |
| a.prototype.hasLimit = function () { | |
| return this.limitSet_; | |
| }; | |
| a.prototype.hasAnchoredLimit = function () { | |
| return this.limitSet_ && "" !== this.viewFrom_; | |
| }; | |
| a.prototype.getLimit = function () { | |
| e.assert(this.limitSet_, "Only valid if limit has been set"); | |
| return this.limit_; | |
| }; | |
| a.prototype.getIndex = function () { | |
| return this.index_; | |
| }; | |
| a.prototype.copy_ = function () { | |
| var b = new a(); | |
| b.limitSet_ = this.limitSet_; | |
| b.limit_ = this.limit_; | |
| b.startSet_ = this.startSet_; | |
| b.indexStartValue_ = this.indexStartValue_; | |
| b.startNameSet_ = this.startNameSet_; | |
| b.indexStartName_ = this.indexStartName_; | |
| b.endSet_ = this.endSet_; | |
| b.indexEndValue_ = this.indexEndValue_; | |
| b.endNameSet_ = this.endNameSet_; | |
| b.indexEndName_ = this.indexEndName_; | |
| b.index_ = this.index_; | |
| b.viewFrom_ = this.viewFrom_; | |
| return b; | |
| }; | |
| a.prototype.limit = function (a) { | |
| var b = this.copy_(); | |
| b.limitSet_ = !0; | |
| b.limit_ = a; | |
| b.viewFrom_ = ""; | |
| return b; | |
| }; | |
| a.prototype.limitToFirst = function (b) { | |
| var c = this.copy_(); | |
| c.limitSet_ = !0; | |
| c.limit_ = b; | |
| c.viewFrom_ = a.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT; | |
| return c; | |
| }; | |
| a.prototype.limitToLast = function (b) { | |
| var c = this.copy_(); | |
| c.limitSet_ = !0; | |
| c.limit_ = b; | |
| c.viewFrom_ = a.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT; | |
| return c; | |
| }; | |
| a.prototype.startAt = function (a, b) { | |
| var c = this.copy_(); | |
| c.startSet_ = !0; | |
| void 0 === a && (a = null); | |
| c.indexStartValue_ = a; | |
| null != b | |
| ? ((c.startNameSet_ = !0), (c.indexStartName_ = b)) | |
| : ((c.startNameSet_ = !1), (c.indexStartName_ = "")); | |
| return c; | |
| }; | |
| a.prototype.endAt = function (a, b) { | |
| var c = this.copy_(); | |
| c.endSet_ = !0; | |
| void 0 === a && (a = null); | |
| c.indexEndValue_ = a; | |
| void 0 !== b | |
| ? ((c.endNameSet_ = !0), (c.indexEndName_ = b)) | |
| : ((c.endNameSet_ = !1), (c.indexEndName_ = "")); | |
| return c; | |
| }; | |
| a.prototype.orderBy = function (a) { | |
| var b = this.copy_(); | |
| b.index_ = a; | |
| return b; | |
| }; | |
| a.prototype.getQueryObject = function () { | |
| var b = a.WIRE_PROTOCOL_CONSTANTS_, | |
| c = {}; | |
| this.startSet_ && | |
| ((c[b.INDEX_START_VALUE] = this.indexStartValue_), | |
| this.startNameSet_ && (c[b.INDEX_START_NAME] = this.indexStartName_)); | |
| this.endSet_ && | |
| ((c[b.INDEX_END_VALUE] = this.indexEndValue_), | |
| this.endNameSet_ && (c[b.INDEX_END_NAME] = this.indexEndName_)); | |
| if (this.limitSet_) { | |
| c[b.LIMIT] = this.limit_; | |
| var e = this.viewFrom_; | |
| "" === e && | |
| (e = this.isViewFromLeft() ? b.VIEW_FROM_LEFT : b.VIEW_FROM_RIGHT); | |
| c[b.VIEW_FROM] = e; | |
| } | |
| this.index_ !== Ja && (c[b.INDEX] = this.index_.toString()); | |
| return c; | |
| }; | |
| a.prototype.loadsAllData = function () { | |
| return !(this.startSet_ || this.endSet_ || this.limitSet_); | |
| }; | |
| a.prototype.isDefault = function () { | |
| return this.loadsAllData() && this.index_ === Ja; | |
| }; | |
| a.prototype.getNodeFilter = function () { | |
| return this.loadsAllData() | |
| ? new Nb(this.getIndex()) | |
| : this.hasLimit() | |
| ? new Za(this) | |
| : new ub(this); | |
| }; | |
| a.prototype.toRestQueryStringParameters = function () { | |
| var b = a.REST_QUERY_CONSTANTS_, | |
| c = {}; | |
| if (this.isDefault()) return c; | |
| if (this.index_ === Ja) var g = b.PRIORITY_INDEX; | |
| else | |
| this.index_ === Lc | |
| ? (g = b.VALUE_INDEX) | |
| : this.index_ === Va | |
| ? (g = b.KEY_INDEX) | |
| : (e.assert(this.index_ instanceof nb, "Unrecognized index type!"), | |
| (g = this.index_.toString())); | |
| c[b.ORDER_BY] = e.stringify(g); | |
| this.startSet_ && | |
| ((c[b.START_AT] = e.stringify(this.indexStartValue_)), | |
| this.startNameSet_ && | |
| (c[b.START_AT] += "," + e.stringify(this.indexStartName_))); | |
| this.endSet_ && | |
| ((c[b.END_AT] = e.stringify(this.indexEndValue_)), | |
| this.endNameSet_ && | |
| (c[b.END_AT] += "," + e.stringify(this.indexEndName_))); | |
| this.limitSet_ && | |
| (this.isViewFromLeft() | |
| ? (c[b.LIMIT_TO_FIRST] = this.limit_) | |
| : (c[b.LIMIT_TO_LAST] = this.limit_)); | |
| return c; | |
| }; | |
| a.WIRE_PROTOCOL_CONSTANTS_ = { | |
| INDEX_START_VALUE: "sp", | |
| INDEX_START_NAME: "sn", | |
| INDEX_END_VALUE: "ep", | |
| INDEX_END_NAME: "en", | |
| LIMIT: "l", | |
| VIEW_FROM: "vf", | |
| VIEW_FROM_LEFT: "l", | |
| VIEW_FROM_RIGHT: "r", | |
| INDEX: "i", | |
| }; | |
| a.REST_QUERY_CONSTANTS_ = { | |
| ORDER_BY: "orderBy", | |
| PRIORITY_INDEX: "$priority", | |
| VALUE_INDEX: "$value", | |
| KEY_INDEX: "$key", | |
| START_AT: "startAt", | |
| END_AT: "endAt", | |
| LIMIT_TO_FIRST: "limitToFirst", | |
| LIMIT_TO_LAST: "limitToLast", | |
| }; | |
| a.DEFAULT = new a(); | |
| return a; | |
| })(), | |
| zb = (function (a) { | |
| function b(b, c) { | |
| if (!(b instanceof eb)) | |
| throw Error( | |
| "new Reference() no longer supported - use app.database()." | |
| ); | |
| return a.call(this, b, c, Ec.DEFAULT, !1) || this; | |
| } | |
| c.__extends(b, a); | |
| b.prototype.getKey = function () { | |
| e.validateArgCount("Reference.key", 0, 0, arguments.length); | |
| return this.path.isEmpty() ? null : this.path.getBack(); | |
| }; | |
| b.prototype.child = function (a) { | |
| e.validateArgCount("Reference.child", 1, 1, arguments.length); | |
| if ("number" === typeof a) a = String(a); | |
| else if (!(a instanceof fa)) | |
| if (null === this.path.getFront()) { | |
| var c = a; | |
| c && (c = c.replace(/^\/*\.info(\/|$)/, "/")); | |
| X("Reference.child", 1, c, !1); | |
| } else X("Reference.child", 1, a, !1); | |
| return new b(this.repo, this.path.child(a)); | |
| }; | |
| b.prototype.getParent = function () { | |
| e.validateArgCount("Reference.parent", 0, 0, arguments.length); | |
| var a = this.path.parent(); | |
| return null === a ? null : new b(this.repo, a); | |
| }; | |
| b.prototype.getRoot = function () { | |
| e.validateArgCount("Reference.root", 0, 0, arguments.length); | |
| for (var a = this; null !== a.getParent(); ) a = a.getParent(); | |
| return a; | |
| }; | |
| b.prototype.databaseProp = function () { | |
| return this.repo.database; | |
| }; | |
| b.prototype.set = function (a, b) { | |
| e.validateArgCount("Reference.set", 1, 2, arguments.length); | |
| va("Reference.set", this.path); | |
| La("Reference.set", 1, a, this.path, !1); | |
| e.validateCallback("Reference.set", 2, b, !0); | |
| var c = new e.Deferred(); | |
| this.repo.setWithPriority(this.path, a, null, c.wrapCallback(b)); | |
| return c.promise; | |
| }; | |
| b.prototype.update = function (a, b) { | |
| e.validateArgCount("Reference.update", 1, 2, arguments.length); | |
| va("Reference.update", this.path); | |
| if (Array.isArray(a)) { | |
| for (var c = {}, g = 0; g < a.length; ++g) c["" + g] = a[g]; | |
| a = c; | |
| F( | |
| "Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children." | |
| ); | |
| } | |
| Ka("Reference.update", 1, a, this.path, !1); | |
| e.validateCallback("Reference.update", 2, b, !0); | |
| c = new e.Deferred(); | |
| this.repo.update(this.path, a, c.wrapCallback(b)); | |
| return c.promise; | |
| }; | |
| b.prototype.setWithPriority = function (a, b, c) { | |
| e.validateArgCount("Reference.setWithPriority", 2, 3, arguments.length); | |
| va("Reference.setWithPriority", this.path); | |
| La("Reference.setWithPriority", 1, a, this.path, !1); | |
| Ia("Reference.setWithPriority", 2, b, !1); | |
| e.validateCallback("Reference.setWithPriority", 3, c, !0); | |
| if (".length" === this.getKey() || ".keys" === this.getKey()) | |
| throw ( | |
| "Reference.setWithPriority failed: " + | |
| this.getKey() + | |
| " is a read-only object." | |
| ); | |
| var g = new e.Deferred(); | |
| this.repo.setWithPriority(this.path, a, b, g.wrapCallback(c)); | |
| return g.promise; | |
| }; | |
| b.prototype.remove = function (a) { | |
| e.validateArgCount("Reference.remove", 0, 1, arguments.length); | |
| va("Reference.remove", this.path); | |
| e.validateCallback("Reference.remove", 1, a, !0); | |
| return this.set(null, a); | |
| }; | |
| b.prototype.transaction = function (a, b, c) { | |
| e.validateArgCount("Reference.transaction", 1, 3, arguments.length); | |
| va("Reference.transaction", this.path); | |
| e.validateCallback("Reference.transaction", 1, a, !1); | |
| e.validateCallback("Reference.transaction", 2, b, !0); | |
| if (void 0 !== c && "boolean" !== typeof c) | |
| throw Error( | |
| e.errorPrefix("Reference.transaction", 3, !0) + "must be a boolean." | |
| ); | |
| if (".length" === this.getKey() || ".keys" === this.getKey()) | |
| throw ( | |
| "Reference.transaction failed: " + | |
| this.getKey() + | |
| " is a read-only object." | |
| ); | |
| void 0 === c && (c = !0); | |
| var g = new e.Deferred(); | |
| "function" === typeof b && g.promise.catch(function () {}); | |
| this.repo.startTransaction( | |
| this.path, | |
| a, | |
| function (a, c, e) { | |
| a ? g.reject(a) : g.resolve(new cc(c, e)); | |
| "function" === typeof b && b(a, c, e); | |
| }, | |
| c | |
| ); | |
| return g.promise; | |
| }; | |
| b.prototype.setPriority = function (a, b) { | |
| e.validateArgCount("Reference.setPriority", 1, 2, arguments.length); | |
| va("Reference.setPriority", this.path); | |
| Ia("Reference.setPriority", 1, a, !1); | |
| e.validateCallback("Reference.setPriority", 2, b, !0); | |
| var c = new e.Deferred(); | |
| this.repo.setWithPriority( | |
| this.path.child(".priority"), | |
| a, | |
| null, | |
| c.wrapCallback(b) | |
| ); | |
| return c.promise; | |
| }; | |
| b.prototype.push = function (a, b) { | |
| e.validateArgCount("Reference.push", 0, 2, arguments.length); | |
| va("Reference.push", this.path); | |
| La("Reference.push", 1, a, this.path, !0); | |
| e.validateCallback("Reference.push", 2, b, !0); | |
| var c = this.repo.serverTime(), | |
| g = ha(c); | |
| c = this.child(g); | |
| var d = this.child(g); | |
| g = | |
| null != a | |
| ? c.set(a, b).then(function () { | |
| return d; | |
| }) | |
| : Promise.resolve(d); | |
| c.then = g.then.bind(g); | |
| c.catch = g.then.bind(g, void 0); | |
| "function" === typeof b && g.catch(function () {}); | |
| return c; | |
| }; | |
| b.prototype.onDisconnect = function () { | |
| va("Reference.onDisconnect", this.path); | |
| return new fb(this.repo, this.path); | |
| }; | |
| Object.defineProperty(b.prototype, "database", { | |
| get: function () { | |
| return this.databaseProp(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(b.prototype, "key", { | |
| get: function () { | |
| return this.getKey(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(b.prototype, "parent", { | |
| get: function () { | |
| return this.getParent(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(b.prototype, "root", { | |
| get: function () { | |
| return this.getRoot(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| return b; | |
| })(rc); | |
| rc.__referenceConstructor = zb; | |
| Db.__referenceConstructor = zb; | |
| var bd = (function () { | |
| return function () { | |
| this.children = {}; | |
| this.childCount = 0; | |
| this.value = null; | |
| }; | |
| })(), | |
| vc = (function () { | |
| function a(a, b, c) { | |
| void 0 === a && (a = ""); | |
| void 0 === b && (b = null); | |
| void 0 === c && (c = new bd()); | |
| this.name_ = a; | |
| this.parent_ = b; | |
| this.node_ = c; | |
| } | |
| a.prototype.subTree = function (b) { | |
| b = b instanceof fa ? b : new fa(b); | |
| for (var c = this, g = b.getFront(); null !== g; ) { | |
| var d = e.safeGet(c.node_.children, g) || new bd(); | |
| c = new a(g, c, d); | |
| b = b.popFront(); | |
| g = b.getFront(); | |
| } | |
| return c; | |
| }; | |
| a.prototype.getValue = function () { | |
| return this.node_.value; | |
| }; | |
| a.prototype.setValue = function (a) { | |
| e.assert("undefined" !== typeof a, "Cannot set value to undefined"); | |
| this.node_.value = a; | |
| this.updateParents_(); | |
| }; | |
| a.prototype.clear = function () { | |
| this.node_.value = null; | |
| this.node_.children = {}; | |
| this.node_.childCount = 0; | |
| this.updateParents_(); | |
| }; | |
| a.prototype.hasChildren = function () { | |
| return 0 < this.node_.childCount; | |
| }; | |
| a.prototype.isEmpty = function () { | |
| return null === this.getValue() && !this.hasChildren(); | |
| }; | |
| a.prototype.forEachChild = function (c) { | |
| var e = this; | |
| b(this.node_.children, function (b, g) { | |
| c(new a(b, e, g)); | |
| }); | |
| }; | |
| a.prototype.forEachDescendant = function (a, b, c) { | |
| b && !c && a(this); | |
| this.forEachChild(function (b) { | |
| b.forEachDescendant(a, !0, c); | |
| }); | |
| b && c && a(this); | |
| }; | |
| a.prototype.forEachAncestor = function (a, b) { | |
| for (b = b ? this : this.parent(); null !== b; ) { | |
| if (a(b)) return !0; | |
| b = b.parent(); | |
| } | |
| return !1; | |
| }; | |
| a.prototype.forEachImmediateDescendantWithValue = function (a) { | |
| this.forEachChild(function (b) { | |
| null !== b.getValue() | |
| ? a(b) | |
| : b.forEachImmediateDescendantWithValue(a); | |
| }); | |
| }; | |
| a.prototype.path = function () { | |
| return new fa( | |
| null === this.parent_ | |
| ? this.name_ | |
| : this.parent_.path() + "/" + this.name_ | |
| ); | |
| }; | |
| a.prototype.name = function () { | |
| return this.name_; | |
| }; | |
| a.prototype.parent = function () { | |
| return this.parent_; | |
| }; | |
| a.prototype.updateParents_ = function () { | |
| null !== this.parent_ && this.parent_.updateChild_(this.name_, this); | |
| }; | |
| a.prototype.updateChild_ = function (a, b) { | |
| var c = b.isEmpty(), | |
| g = e.contains(this.node_.children, a); | |
| c && g | |
| ? (delete this.node_.children[a], | |
| this.node_.childCount--, | |
| this.updateParents_()) | |
| : c || | |
| g || | |
| ((this.node_.children[a] = b.node_), | |
| this.node_.childCount++, | |
| this.updateParents_()); | |
| }; | |
| return a; | |
| })(), | |
| Wa; | |
| (function (a) { | |
| a[(a.RUN = 0)] = "RUN"; | |
| a[(a.SENT = 1)] = "SENT"; | |
| a[(a.COMPLETED = 2)] = "COMPLETED"; | |
| a[(a.SENT_NEEDS_ABORT = 3)] = "SENT_NEEDS_ABORT"; | |
| a[(a.NEEDS_ABORT = 4)] = "NEEDS_ABORT"; | |
| })(Wa || (Wa = {})); | |
| eb.MAX_TRANSACTION_RETRIES_ = 25; | |
| eb.prototype.transactionsInit_ = function () { | |
| this.transactionQueueTree_ = new vc(); | |
| }; | |
| eb.prototype.startTransaction = function (a, b, c, g) { | |
| this.log_("transaction on " + a); | |
| var d = function () {}, | |
| l = new zb(this, a); | |
| l.on("value", d); | |
| b = { | |
| path: a, | |
| update: b, | |
| onComplete: c, | |
| status: null, | |
| order: C(), | |
| applyLocally: g, | |
| retryCount: 0, | |
| unwatcher: function () { | |
| l.off("value", d); | |
| }, | |
| abortReason: null, | |
| currentWriteId: null, | |
| currentInputSnapshot: null, | |
| currentOutputSnapshotRaw: null, | |
| currentOutputSnapshotResolved: null, | |
| }; | |
| c = this.getLatestState_(a); | |
| b.currentInputSnapshot = c; | |
| c = b.update(c.val()); | |
| if (void 0 === c) | |
| b.unwatcher(), | |
| (b.currentOutputSnapshotRaw = null), | |
| (b.currentOutputSnapshotResolved = null), | |
| b.onComplete && | |
| ((a = new Sa(b.currentInputSnapshot, new zb(this, b.path), Ja)), | |
| b.onComplete(null, !1, a)); | |
| else { | |
| pa("transaction failed: Data returned ", c, b.path); | |
| b.status = Wa.RUN; | |
| g = this.transactionQueueTree_.subTree(a); | |
| var k = g.getValue() || []; | |
| k.push(b); | |
| g.setValue(k); | |
| k = void 0; | |
| "object" === typeof c && null !== c && e.contains(c, ".priority") | |
| ? ((k = e.safeGet(c, ".priority")), | |
| e.assert( | |
| za(k), | |
| "Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null." | |
| )) | |
| : (k = (this.serverSyncTree_.calcCompleteEventCache(a) || Na.EMPTY_NODE) | |
| .getPriority() | |
| .val()); | |
| g = this.generateServerValues(); | |
| c = h(c, k); | |
| g = oa(c, g); | |
| b.currentOutputSnapshotRaw = c; | |
| b.currentOutputSnapshotResolved = g; | |
| b.currentWriteId = this.getNextWriteId_(); | |
| b = this.serverSyncTree_.applyUserOverwrite( | |
| a, | |
| g, | |
| b.currentWriteId, | |
| b.applyLocally | |
| ); | |
| this.eventQueue_.raiseEventsForChangedPath(a, b); | |
| this.sendReadyTransactions_(); | |
| } | |
| }; | |
| eb.prototype.getLatestState_ = function (a, b) { | |
| return this.serverSyncTree_.calcCompleteEventCache(a, b) || Na.EMPTY_NODE; | |
| }; | |
| eb.prototype.sendReadyTransactions_ = function (a) { | |
| var b = this; | |
| void 0 === a && (a = this.transactionQueueTree_); | |
| a || this.pruneCompletedTransactionsBelowNode_(a); | |
| if (null !== a.getValue()) { | |
| var c = this.buildTransactionQueue_(a); | |
| e.assert(0 < c.length, "Sending zero length transaction queue"); | |
| c.every(function (a) { | |
| return a.status === Wa.RUN; | |
| }) && this.sendTransactionQueue_(a.path(), c); | |
| } else | |
| a.hasChildren() && | |
| a.forEachChild(function (a) { | |
| b.sendReadyTransactions_(a); | |
| }); | |
| }; | |
| eb.prototype.sendTransactionQueue_ = function (a, b) { | |
| var c = this, | |
| g = b.map(function (a) { | |
| return a.currentWriteId; | |
| }), | |
| d = this.getLatestState_(a, g); | |
| g = d; | |
| d = d.hash(); | |
| for (var l = 0; l < b.length; l++) { | |
| var h = b[l]; | |
| e.assert( | |
| h.status === Wa.RUN, | |
| "tryToSendTransactionQueue_: items in queue should all be run." | |
| ); | |
| h.status = Wa.SENT; | |
| h.retryCount++; | |
| var k = fa.relativePath(a, h.path); | |
| g = g.updateChild(k, h.currentOutputSnapshotRaw); | |
| } | |
| g = g.val(!0); | |
| this.server_.put( | |
| a.toString(), | |
| g, | |
| function (e) { | |
| c.log_("transaction put response", { path: a.toString(), status: e }); | |
| var g = []; | |
| if ("ok" === e) { | |
| e = []; | |
| for (var d = 0; d < b.length; d++) { | |
| b[d].status = Wa.COMPLETED; | |
| g = g.concat(c.serverSyncTree_.ackUserWrite(b[d].currentWriteId)); | |
| if (b[d].onComplete) { | |
| var l = b[d].currentOutputSnapshotResolved, | |
| h = new zb(c, b[d].path); | |
| l = new Sa(l, h, Ja); | |
| e.push(b[d].onComplete.bind(null, null, !0, l)); | |
| } | |
| b[d].unwatcher(); | |
| } | |
| c.pruneCompletedTransactionsBelowNode_( | |
| c.transactionQueueTree_.subTree(a) | |
| ); | |
| c.sendReadyTransactions_(); | |
| c.eventQueue_.raiseEventsForChangedPath(a, g); | |
| for (d = 0; d < e.length; d++) ia(e[d]); | |
| } else { | |
| if ("datastale" === e) | |
| for (d = 0; d < b.length; d++) | |
| b[d].status = | |
| b[d].status === Wa.SENT_NEEDS_ABORT ? Wa.NEEDS_ABORT : Wa.RUN; | |
| else | |
| for ( | |
| F("transaction at " + a.toString() + " failed: " + e), d = 0; | |
| d < b.length; | |
| d++ | |
| ) | |
| (b[d].status = Wa.NEEDS_ABORT), (b[d].abortReason = e); | |
| c.rerunTransactions_(a); | |
| } | |
| }, | |
| d | |
| ); | |
| }; | |
| eb.prototype.rerunTransactions_ = function (a) { | |
| var b = this.getAncestorTransactionNode_(a); | |
| a = b.path(); | |
| b = this.buildTransactionQueue_(b); | |
| this.rerunTransactionQueue_(b, a); | |
| return a; | |
| }; | |
| eb.prototype.rerunTransactionQueue_ = function (a, b) { | |
| if (0 !== a.length) { | |
| for ( | |
| var c = [], | |
| g = [], | |
| d = a | |
| .filter(function (a) { | |
| return a.status === Wa.RUN; | |
| }) | |
| .map(function (a) { | |
| return a.currentWriteId; | |
| }), | |
| l = 0; | |
| l < a.length; | |
| l++ | |
| ) { | |
| var k = a[l], | |
| n = fa.relativePath(b, k.path), | |
| v = !1, | |
| f = void 0; | |
| e.assert( | |
| null !== n, | |
| "rerunTransactionsUnderNode_: relativePath should not be null." | |
| ); | |
| if (k.status === Wa.NEEDS_ABORT) | |
| (v = !0), | |
| (f = k.abortReason), | |
| (g = g.concat( | |
| this.serverSyncTree_.ackUserWrite(k.currentWriteId, !0) | |
| )); | |
| else if (k.status === Wa.RUN) | |
| if (k.retryCount >= eb.MAX_TRANSACTION_RETRIES_) | |
| (v = !0), | |
| (f = "maxretry"), | |
| (g = g.concat( | |
| this.serverSyncTree_.ackUserWrite(k.currentWriteId, !0) | |
| )); | |
| else { | |
| var w = this.getLatestState_(k.path, d); | |
| k.currentInputSnapshot = w; | |
| var q = a[l].update(w.val()); | |
| void 0 !== q | |
| ? (pa("transaction failed: Data returned ", q, k.path), | |
| (n = h(q)), | |
| ("object" === typeof q && | |
| null != q && | |
| e.contains(q, ".priority")) || | |
| (n = n.updatePriority(w.getPriority())), | |
| (w = k.currentWriteId), | |
| (q = this.generateServerValues()), | |
| (q = oa(n, q)), | |
| (k.currentOutputSnapshotRaw = n), | |
| (k.currentOutputSnapshotResolved = q), | |
| (k.currentWriteId = this.getNextWriteId_()), | |
| d.splice(d.indexOf(w), 1), | |
| (g = g.concat( | |
| this.serverSyncTree_.applyUserOverwrite( | |
| k.path, | |
| q, | |
| k.currentWriteId, | |
| k.applyLocally | |
| ) | |
| )), | |
| (g = g.concat(this.serverSyncTree_.ackUserWrite(w, !0)))) | |
| : ((v = !0), | |
| (f = "nodata"), | |
| (g = g.concat( | |
| this.serverSyncTree_.ackUserWrite(k.currentWriteId, !0) | |
| ))); | |
| } | |
| this.eventQueue_.raiseEventsForChangedPath(b, g); | |
| g = []; | |
| v && | |
| ((a[l].status = Wa.COMPLETED), | |
| setTimeout(a[l].unwatcher, 0), | |
| a[l].onComplete && | |
| ("nodata" === f | |
| ? ((k = new zb(this, a[l].path)), | |
| (k = new Sa(a[l].currentInputSnapshot, k, Ja)), | |
| c.push(a[l].onComplete.bind(null, null, !1, k))) | |
| : c.push(a[l].onComplete.bind(null, Error(f), !1, null)))); | |
| } | |
| this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_); | |
| for (l = 0; l < c.length; l++) ia(c[l]); | |
| this.sendReadyTransactions_(); | |
| } | |
| }; | |
| eb.prototype.getAncestorTransactionNode_ = function (a) { | |
| var b, | |
| c = this.transactionQueueTree_; | |
| for (b = a.getFront(); null !== b && null === c.getValue(); ) | |
| (c = c.subTree(b)), (a = a.popFront()), (b = a.getFront()); | |
| return c; | |
| }; | |
| eb.prototype.buildTransactionQueue_ = function (a) { | |
| var b = []; | |
| this.aggregateTransactionQueuesForNode_(a, b); | |
| b.sort(function (a, b) { | |
| return a.order - b.order; | |
| }); | |
| return b; | |
| }; | |
| eb.prototype.aggregateTransactionQueuesForNode_ = function (a, b) { | |
| var c = this, | |
| e = a.getValue(); | |
| if (null !== e) for (var g = 0; g < e.length; g++) b.push(e[g]); | |
| a.forEachChild(function (a) { | |
| c.aggregateTransactionQueuesForNode_(a, b); | |
| }); | |
| }; | |
| eb.prototype.pruneCompletedTransactionsBelowNode_ = function (a) { | |
| var b = this, | |
| c = a.getValue(); | |
| if (c) { | |
| for (var e = 0, g = 0; g < c.length; g++) | |
| c[g].status !== Wa.COMPLETED && ((c[e] = c[g]), e++); | |
| c.length = e; | |
| a.setValue(0 < c.length ? c : null); | |
| } | |
| a.forEachChild(function (a) { | |
| b.pruneCompletedTransactionsBelowNode_(a); | |
| }); | |
| }; | |
| eb.prototype.abortTransactions_ = function (a) { | |
| var b = this, | |
| c = this.getAncestorTransactionNode_(a).path(); | |
| a = this.transactionQueueTree_.subTree(a); | |
| a.forEachAncestor(function (a) { | |
| b.abortTransactionsOnNode_(a); | |
| }); | |
| this.abortTransactionsOnNode_(a); | |
| a.forEachDescendant(function (a) { | |
| b.abortTransactionsOnNode_(a); | |
| }); | |
| return c; | |
| }; | |
| eb.prototype.abortTransactionsOnNode_ = function (a) { | |
| var b = a.getValue(); | |
| if (null !== b) { | |
| for (var c = [], g = [], d = -1, l = 0; l < b.length; l++) | |
| b[l].status !== Wa.SENT_NEEDS_ABORT && | |
| (b[l].status === Wa.SENT | |
| ? (e.assert( | |
| d === l - 1, | |
| "All SENT items should be at beginning of queue." | |
| ), | |
| (d = l), | |
| (b[l].status = Wa.SENT_NEEDS_ABORT), | |
| (b[l].abortReason = "set")) | |
| : (e.assert( | |
| b[l].status === Wa.RUN, | |
| "Unexpected transaction status in abort" | |
| ), | |
| b[l].unwatcher(), | |
| (g = g.concat( | |
| this.serverSyncTree_.ackUserWrite(b[l].currentWriteId, !0) | |
| )), | |
| b[l].onComplete && | |
| c.push(b[l].onComplete.bind(null, Error("set"), !1, null)))); | |
| -1 === d ? a.setValue(null) : (b.length = d + 1); | |
| this.eventQueue_.raiseEventsForChangedPath(a.path(), g); | |
| for (l = 0; l < c.length; l++) ia(c[l]); | |
| } | |
| }; | |
| var lc, | |
| ie = (function () { | |
| function a() { | |
| this.repos_ = {}; | |
| this.useRestClient_ = !1; | |
| } | |
| a.getInstance = function () { | |
| lc || (lc = new a()); | |
| return lc; | |
| }; | |
| a.prototype.interrupt = function () { | |
| var a, b, e; | |
| try { | |
| for ( | |
| var g = c.__values(Object.keys(this.repos_)), d = g.next(); | |
| !d.done; | |
| d = g.next() | |
| ) { | |
| var l = d.value; | |
| try { | |
| for ( | |
| var h = ((b = void 0), c.__values(Object.keys(this.repos_[l]))), | |
| k = h.next(); | |
| !k.done; | |
| k = h.next() | |
| ) | |
| this.repos_[l][k.value].interrupt(); | |
| } catch (Rc) { | |
| b = { error: Rc }; | |
| } finally { | |
| try { | |
| k && !k.done && (e = h.return) && e.call(h); | |
| } finally { | |
| if (b) throw b.error; | |
| } | |
| } | |
| } | |
| } catch (Rc) { | |
| var n = { error: Rc }; | |
| } finally { | |
| try { | |
| d && !d.done && (a = g.return) && a.call(g); | |
| } finally { | |
| if (n) throw n.error; | |
| } | |
| } | |
| }; | |
| a.prototype.resume = function () { | |
| var a, b, e; | |
| try { | |
| for ( | |
| var g = c.__values(Object.keys(this.repos_)), d = g.next(); | |
| !d.done; | |
| d = g.next() | |
| ) { | |
| var l = d.value; | |
| try { | |
| for ( | |
| var h = ((b = void 0), c.__values(Object.keys(this.repos_[l]))), | |
| k = h.next(); | |
| !k.done; | |
| k = h.next() | |
| ) | |
| this.repos_[l][k.value].resume(); | |
| } catch (Rc) { | |
| b = { error: Rc }; | |
| } finally { | |
| try { | |
| k && !k.done && (e = h.return) && e.call(h); | |
| } finally { | |
| if (b) throw b.error; | |
| } | |
| } | |
| } | |
| } catch (Rc) { | |
| var n = { error: Rc }; | |
| } finally { | |
| try { | |
| d && !d.done && (a = g.return) && a.call(g); | |
| } finally { | |
| if (n) throw n.error; | |
| } | |
| } | |
| }; | |
| a.prototype.databaseFromApp = function (a, b, c) { | |
| c = c || a.options.databaseURL; | |
| void 0 === c && | |
| M( | |
| "Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.initializeApp()." | |
| ); | |
| c = ka(c); | |
| var e = c.repoInfo, | |
| g = void 0; | |
| "undefined" !== typeof k && (g = k.env.FIREBASE_DATABASE_EMULATOR_HOST); | |
| g && | |
| ((c = "http://" + g + "?ns\x3d" + e.namespace), | |
| (c = ka(c)), | |
| (e = c.repoInfo)); | |
| la("Invalid Firebase Database URL", 1, c); | |
| c.path.isEmpty() || | |
| M( | |
| "Database URL must point to the root of a Firebase Database (not including a child path)." | |
| ); | |
| return this.createRepo(e, a, b).database; | |
| }; | |
| a.prototype.deleteRepo = function (a) { | |
| var b = e.safeGet(this.repos_, a.app.name); | |
| (b && e.safeGet(b, a.repoInfo_.toURLString()) === a) || | |
| M( | |
| "Database " + | |
| a.app.name + | |
| "(" + | |
| a.repoInfo_ + | |
| ") has already been deleted." | |
| ); | |
| a.interrupt(); | |
| delete b[a.repoInfo_.toURLString()]; | |
| }; | |
| a.prototype.createRepo = function (a, b, c) { | |
| var g = e.safeGet(this.repos_, b.name); | |
| g || ((g = {}), (this.repos_[b.name] = g)); | |
| var d = e.safeGet(g, a.toURLString()); | |
| d && | |
| M( | |
| "Database initialized multiple times. Please make sure the format of the database URL matches with each database() call." | |
| ); | |
| d = new eb(a, this.useRestClient_, b, c); | |
| return (g[a.toURLString()] = d); | |
| }; | |
| a.prototype.forceRestClient = function (a) { | |
| this.useRestClient_ = a; | |
| }; | |
| return a; | |
| })(), | |
| yc = (function () { | |
| function a(a) { | |
| this.repo_ = a; | |
| a instanceof eb || | |
| M( | |
| "Don't call new Database() directly - please use firebase.database()." | |
| ); | |
| this.root_ = new zb(a, fa.Empty); | |
| this.INTERNAL = new fc(this); | |
| } | |
| Object.defineProperty(a.prototype, "app", { | |
| get: function () { | |
| return this.repo_.app; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.ref = function (a) { | |
| this.checkDeleted_("ref"); | |
| e.validateArgCount("database.ref", 0, 1, arguments.length); | |
| return a instanceof zb | |
| ? this.refFromURL(a.toString()) | |
| : void 0 !== a | |
| ? this.root_.child(a) | |
| : this.root_; | |
| }; | |
| a.prototype.refFromURL = function (a) { | |
| this.checkDeleted_("database.refFromURL"); | |
| e.validateArgCount("database.refFromURL", 1, 1, arguments.length); | |
| var b = ka(a); | |
| la("database.refFromURL", 1, b); | |
| var c = b.repoInfo; | |
| c.host !== this.repo_.repoInfo_.host && | |
| M( | |
| "database.refFromURL: Host name does not match the current database: (found " + | |
| c.host + | |
| " but expected " + | |
| this.repo_.repoInfo_.host + | |
| ")" | |
| ); | |
| return this.ref(b.path.toString()); | |
| }; | |
| a.prototype.checkDeleted_ = function (a) { | |
| null === this.repo_ && | |
| M("Cannot call " + a + " on a deleted database."); | |
| }; | |
| a.prototype.goOffline = function () { | |
| e.validateArgCount("database.goOffline", 0, 0, arguments.length); | |
| this.checkDeleted_("goOffline"); | |
| this.repo_.interrupt(); | |
| }; | |
| a.prototype.goOnline = function () { | |
| e.validateArgCount("database.goOnline", 0, 0, arguments.length); | |
| this.checkDeleted_("goOnline"); | |
| this.repo_.resume(); | |
| }; | |
| a.ServerValue = { TIMESTAMP: { ".sv": "timestamp" } }; | |
| return a; | |
| })(), | |
| fc = (function () { | |
| function a(a) { | |
| this.database = a; | |
| } | |
| a.prototype.delete = function () { | |
| return c.__awaiter(this, void 0, void 0, function () { | |
| return c.__generator(this, function (a) { | |
| this.database.checkDeleted_("delete"); | |
| ie.getInstance().deleteRepo(this.database.repo_); | |
| this.database.repo_ = null; | |
| this.database.root_ = null; | |
| this.database = this.database.INTERNAL = null; | |
| return [2]; | |
| }); | |
| }); | |
| }; | |
| return a; | |
| })(), | |
| Kb = Object.freeze({ | |
| __proto__: null, | |
| forceLongPolling: function () { | |
| Nc.forceDisallow(); | |
| Dc.forceAllow(); | |
| }, | |
| forceWebSockets: function () { | |
| Dc.forceDisallow(); | |
| }, | |
| isWebSocketsAvailable: function () { | |
| return Nc.isAvailable(); | |
| }, | |
| setSecurityDebugCallback: function (a, b) { | |
| a.repo.persistentConnection_.securityDebugCallback_ = b; | |
| }, | |
| stats: function (a, b) { | |
| a.repo.stats(b); | |
| }, | |
| statsIncrementCounter: function (a, b) { | |
| a.repo.statsIncrementCounter(b); | |
| }, | |
| dataUpdateCount: function (a) { | |
| return a.repo.dataUpdateCount; | |
| }, | |
| interceptServerData: function (a, b) { | |
| return a.repo.interceptServerData_(b); | |
| }, | |
| }); | |
| Cb.prototype.simpleListen = function (a, b) { | |
| this.sendRequest("q", { p: a }, b); | |
| }; | |
| Cb.prototype.echo = function (a, b) { | |
| this.sendRequest("echo", { d: a }, b); | |
| }; | |
| var Rb = Object.freeze({ | |
| __proto__: null, | |
| DataConnection: Cb, | |
| RealTimeConnection: md, | |
| hijackHash: function (a) { | |
| var b = Cb.prototype.put; | |
| Cb.prototype.put = function (c, e, g, d) { | |
| void 0 !== d && (d = a()); | |
| b.call(this, c, e, g, d); | |
| }; | |
| return function () { | |
| Cb.prototype.put = b; | |
| }; | |
| }, | |
| ConnectionTarget: ja, | |
| queryIdentifier: function (a) { | |
| return a.queryIdentifier(); | |
| }, | |
| forceRestClient: function (a) { | |
| ie.getInstance().forceRestClient(a); | |
| }, | |
| }), | |
| wc = yc.ServerValue; | |
| a(n); | |
| d.DataSnapshot = Sa; | |
| d.Database = yc; | |
| d.OnDisconnect = fb; | |
| d.Query = rc; | |
| d.Reference = zb; | |
| d.ServerValue = wc; | |
| d.enableLogging = z; | |
| d.registerDatabase = a; | |
| }; | |
| shadow$provide[32] = function (m, f, r, d) { | |
| f(31); | |
| }; | |
| shadow$provide[33] = function (m, f, r, d) { | |
| function b() { | |
| return new ha( | |
| ya.UNKNOWN, | |
| "An unknown error occurred, please check the error payload for server response." | |
| ); | |
| } | |
| function t() { | |
| return new ha(ya.CANCELED, "User canceled the upload/download."); | |
| } | |
| function q() { | |
| return new ha( | |
| ya.CANNOT_SLICE_BLOB, | |
| "Cannot slice blob for upload. Please retry the upload." | |
| ); | |
| } | |
| function h(a, b, c) { | |
| return new ha( | |
| ya.INVALID_ARGUMENT, | |
| "Invalid argument in `" + b + "` at index " + a + ": " + c | |
| ); | |
| } | |
| function u() { | |
| return new ha(ya.APP_DELETED, "The Firebase app was deleted."); | |
| } | |
| function a(a, b) { | |
| return new ha( | |
| ya.INVALID_FORMAT, | |
| "String does not match format '" + a + "': " + b | |
| ); | |
| } | |
| function k(a) { | |
| throw new ha(ya.INTERNAL_ERROR, "Internal error: " + a); | |
| } | |
| function n(a) { | |
| switch (a) { | |
| case jb.RAW: | |
| case jb.BASE64: | |
| case jb.BASE64URL: | |
| case jb.DATA_URL: | |
| break; | |
| default: | |
| throw ( | |
| "Expected one of the event types: [" + | |
| jb.RAW + | |
| ", " + | |
| jb.BASE64 + | |
| ", " + | |
| jb.BASE64URL + | |
| ", " + | |
| jb.DATA_URL + | |
| "]." | |
| ); | |
| } | |
| } | |
| function c(c, g) { | |
| switch (c) { | |
| case jb.RAW: | |
| return new Da(e(g)); | |
| case jb.BASE64: | |
| case jb.BASE64URL: | |
| return new Da(l(c, g)); | |
| case jb.DATA_URL: | |
| c = new na(g); | |
| if (c.base64) var d = l(jb.BASE64, c.rest); | |
| else { | |
| try { | |
| d = decodeURIComponent(c.rest); | |
| } catch (kc) { | |
| throw a(jb.DATA_URL, "Malformed data URL."); | |
| } | |
| d = e(d); | |
| } | |
| g = new na(g).contentType; | |
| return new Da(d, g); | |
| } | |
| throw b(); | |
| } | |
| function e(a) { | |
| for (var b = [], c = 0; c < a.length; c++) { | |
| var e = a.charCodeAt(c); | |
| if (127 >= e) b.push(e); | |
| else if (2047 >= e) b.push(192 | (e >> 6), 128 | (e & 63)); | |
| else if (55296 === (e & 64512)) | |
| if (c < a.length - 1 && 56320 === (a.charCodeAt(c + 1) & 64512)) { | |
| var g = a.charCodeAt(++c); | |
| e = 65536 | ((e & 1023) << 10) | (g & 1023); | |
| b.push( | |
| 240 | (e >> 18), | |
| 128 | ((e >> 12) & 63), | |
| 128 | ((e >> 6) & 63), | |
| 128 | (e & 63) | |
| ); | |
| } else b.push(239, 191, 189); | |
| else | |
| 56320 === (e & 64512) | |
| ? b.push(239, 191, 189) | |
| : b.push(224 | (e >> 12), 128 | ((e >> 6) & 63), 128 | (e & 63)); | |
| } | |
| return new Uint8Array(b); | |
| } | |
| function l(b, c) { | |
| switch (b) { | |
| case jb.BASE64: | |
| var e = -1 !== c.indexOf("-"), | |
| g = -1 !== c.indexOf("_"); | |
| if (e || g) | |
| throw a( | |
| b, | |
| "Invalid character '" + | |
| (e ? "-" : "_") + | |
| "' found: is it base64url encoded?" | |
| ); | |
| break; | |
| case jb.BASE64URL: | |
| e = -1 !== c.indexOf("+"); | |
| g = -1 !== c.indexOf("/"); | |
| if (e || g) | |
| throw a( | |
| b, | |
| "Invalid character '" + | |
| (e ? "+" : "/") + | |
| "' found: is it base64 encoded?" | |
| ); | |
| c = c.replace(/-/g, "+").replace(/_/g, "/"); | |
| } | |
| try { | |
| var d = atob(c); | |
| } catch (xc) { | |
| throw a(b, "Invalid character found"); | |
| } | |
| b = new Uint8Array(d.length); | |
| for (c = 0; c < d.length; c++) b[c] = d.charCodeAt(c); | |
| return b; | |
| } | |
| function g(a) { | |
| switch (a) { | |
| case ua.RUNNING: | |
| case ua.PAUSING: | |
| case ua.CANCELING: | |
| return wa.RUNNING; | |
| case ua.PAUSED: | |
| return wa.PAUSED; | |
| case ua.SUCCESS: | |
| return wa.SUCCESS; | |
| case ua.CANCELED: | |
| return wa.CANCELED; | |
| case ua.ERROR: | |
| return wa.ERROR; | |
| default: | |
| return wa.ERROR; | |
| } | |
| } | |
| function w(a) { | |
| return void 0 !== a; | |
| } | |
| function y(a) { | |
| return "object" === typeof a; | |
| } | |
| function x(a) { | |
| return "string" === typeof a || a instanceof String; | |
| } | |
| function v(a) { | |
| return "number" === typeof a || a instanceof Number; | |
| } | |
| function I(a) { | |
| return H() && a instanceof Blob; | |
| } | |
| function H() { | |
| return "undefined" !== typeof Blob; | |
| } | |
| function C() { | |
| for (var a = [], b = 0; b < arguments.length; b++) a[b] = arguments[b]; | |
| b = | |
| "undefined" !== typeof BlobBuilder | |
| ? BlobBuilder | |
| : "undefined" !== typeof WebKitBlobBuilder | |
| ? WebKitBlobBuilder | |
| : void 0; | |
| if (void 0 !== b) { | |
| b = new b(); | |
| for (var c = 0; c < a.length; c++) b.append(a[c]); | |
| return b.getBlob(); | |
| } | |
| if (H()) return new Blob(a); | |
| throw Error("This browser doesn't seem to support creating Blobs"); | |
| } | |
| function E(a) { | |
| try { | |
| var b = JSON.parse(a); | |
| } catch (Ha) { | |
| return null; | |
| } | |
| a = b; | |
| return y(a) && !Array.isArray(a) ? b : null; | |
| } | |
| function G(a, b) { | |
| b = b | |
| .split("/") | |
| .filter(function (a) { | |
| return 0 < a.length; | |
| }) | |
| .join("/"); | |
| return 0 === a.length ? b : a + "/" + b; | |
| } | |
| function O(a) { | |
| var b = a.lastIndexOf("/", a.length - 2); | |
| return -1 === b ? a : a.slice(b + 1); | |
| } | |
| function A(a) { | |
| return "https://firebasestorage.googleapis.com/v0" + a; | |
| } | |
| function z(a) { | |
| var b = encodeURIComponent, | |
| c = "?", | |
| e; | |
| for (e in a) | |
| if (a.hasOwnProperty(e)) { | |
| var g = b(e) + "\x3d" + b(a[e]); | |
| c = c + g + "\x26"; | |
| } | |
| return (c = c.slice(0, -1)); | |
| } | |
| function K(a, b) { | |
| return b; | |
| } | |
| function D() { | |
| if (qb) return qb; | |
| var a = []; | |
| a.push(new Xa("bucket")); | |
| a.push(new Xa("generation")); | |
| a.push(new Xa("metageneration")); | |
| a.push(new Xa("name", "fullPath", !0)); | |
| var b = new Xa("name"); | |
| b.xform = function (a, b) { | |
| a = !x(b) || 2 > b.length ? b : O(b); | |
| return a; | |
| }; | |
| a.push(b); | |
| b = new Xa("size"); | |
| b.xform = function (a, b) { | |
| return null != b ? Number(b) : b; | |
| }; | |
| a.push(b); | |
| a.push(new Xa("timeCreated")); | |
| a.push(new Xa("updated")); | |
| a.push(new Xa("md5Hash", null, !0)); | |
| a.push(new Xa("cacheControl", null, !0)); | |
| a.push(new Xa("contentDisposition", null, !0)); | |
| a.push(new Xa("contentEncoding", null, !0)); | |
| a.push(new Xa("contentLanguage", null, !0)); | |
| a.push(new Xa("contentType", null, !0)); | |
| a.push(new Xa("metadata", "customMetadata", !0)); | |
| return (qb = a); | |
| } | |
| function Q(a, b) { | |
| Object.defineProperty(a, "ref", { | |
| get: function () { | |
| var c = new cb(a.bucket, a.fullPath); | |
| return b.makeStorageReference(c); | |
| }, | |
| }); | |
| } | |
| function M(a, b, c) { | |
| b = E(b); | |
| if (null === b) return null; | |
| for (var e = { type: "file" }, g = c.length, d = 0; d < g; d++) { | |
| var l = c[d]; | |
| e[l.local] = l.xform(e, b[l.server]); | |
| } | |
| Q(e, a); | |
| return e; | |
| } | |
| function F(a, b) { | |
| b = E(b); | |
| if (null === b || !x(b.downloadTokens)) return null; | |
| b = b.downloadTokens; | |
| if (0 === b.length) return null; | |
| var c = encodeURIComponent; | |
| return b.split(",").map(function (b) { | |
| var e = a.fullPath; | |
| e = "/b/" + c(a.bucket) + "/o/" + c(e); | |
| e = A(e); | |
| b = z({ alt: "media", token: b }); | |
| return e + b; | |
| })[0]; | |
| } | |
| function P(a, b) { | |
| for (var c = {}, e = b.length, g = 0; g < e; g++) { | |
| var d = b[g]; | |
| d.writable && (c[d.server] = a[d.local]); | |
| } | |
| return JSON.stringify(c); | |
| } | |
| function J(a) { | |
| if (!y(a) || !a) throw "Expected Metadata object."; | |
| for (var b in a) | |
| if (a.hasOwnProperty(b)) { | |
| var c = a[b]; | |
| if ("customMetadata" === b) { | |
| if (!y(c)) throw "Expected object for 'customMetadata' mapping."; | |
| } else if (y(c) && null !== c) | |
| throw "Mapping for '" + b + "' cannot be an object."; | |
| } | |
| } | |
| function L(a) { | |
| if (!y(a) || !a) throw "Expected ListOptions object."; | |
| for (var b in a) | |
| if ("maxResults" === b) { | |
| var c = a.maxResults; | |
| if (!v(c) || !Number.isInteger(c) || 0 >= a.maxResults) | |
| throw "Expected maxResults to be a positive number."; | |
| if (1e3 < a.maxResults) | |
| throw "Expected maxResults to be less than or equal to 1000."; | |
| } else if ("pageToken" === b) { | |
| if (a.pageToken && !x(a.pageToken)) | |
| throw "Expected pageToken to be string."; | |
| } else throw "Unknown option: " + b; | |
| } | |
| function N(a) { | |
| if (!a) throw b(); | |
| } | |
| function B(a, b) { | |
| return function (c, e) { | |
| c = M(a, e, b); | |
| N(null !== c); | |
| return c; | |
| }; | |
| } | |
| function V(a) { | |
| return function (b, c) { | |
| var e = E(c); | |
| if (null === e) b = null; | |
| else { | |
| b = { prefixes: [], items: [], nextPageToken: e.nextPageToken }; | |
| c = a.bucket(); | |
| if (null === c) | |
| throw new ha( | |
| ya.NO_DEFAULT_BUCKET, | |
| "No default bucket found. Did you set the 'storageBucket' property when initializing the app?" | |
| ); | |
| if (e.prefixes) | |
| for (var g = 0, d = e.prefixes; g < d.length; g++) { | |
| var l = d[g].replace(/\/$/, ""); | |
| l = a.makeStorageReference(new cb(c, l)); | |
| b.prefixes.push(l); | |
| } | |
| if (e.items) | |
| for (g = 0, e = e.items; g < e.length; g++) | |
| (l = a.makeStorageReference(new cb(c, e[g].name))), b.items.push(l); | |
| } | |
| N(null !== b); | |
| return b; | |
| }; | |
| } | |
| function U(a, b) { | |
| return function (c, e) { | |
| c = M(a, e, b); | |
| N(null !== c); | |
| return F(c, e); | |
| }; | |
| } | |
| function Y(a) { | |
| return function (b, c) { | |
| b = | |
| 401 === b.getStatus() | |
| ? new ha( | |
| ya.UNAUTHENTICATED, | |
| "User is not authenticated, please authenticate using Firebase Authentication and try again." | |
| ) | |
| : 402 === b.getStatus() | |
| ? new ha( | |
| ya.QUOTA_EXCEEDED, | |
| "Quota for bucket '" + | |
| a.bucket + | |
| "' exceeded, please view quota on https://firebase.google.com/pricing/." | |
| ) | |
| : 403 === b.getStatus() | |
| ? new ha( | |
| ya.UNAUTHORIZED, | |
| "User does not have permission to access '" + a.path + "'." | |
| ) | |
| : c; | |
| b.setServerResponseProp(c.serverResponseProp()); | |
| return b; | |
| }; | |
| } | |
| function ca(a) { | |
| var b = Y(a); | |
| return function (c, e) { | |
| var g = b(c, e); | |
| 404 === c.getStatus() && | |
| (g = new ha( | |
| ya.OBJECT_NOT_FOUND, | |
| "Object '" + a.path + "' does not exist." | |
| )); | |
| g.setServerResponseProp(e.serverResponseProp()); | |
| return g; | |
| }; | |
| } | |
| function ra(a, b, c) { | |
| var e = b.fullServerUrl(); | |
| e = A(e); | |
| var g = a.maxOperationRetryTime(); | |
| a = new ta(e, "GET", B(a, c), g); | |
| a.errorHandler = ca(b); | |
| return a; | |
| } | |
| function ia(a, b, c) { | |
| var e = b.fullServerUrl(); | |
| e = A(e); | |
| var g = a.maxOperationRetryTime(); | |
| a = new ta(e, "GET", U(a, c), g); | |
| a.errorHandler = ca(b); | |
| return a; | |
| } | |
| function Ca(a, b) { | |
| var c = b.fullServerUrl(); | |
| c = A(c); | |
| a = a.maxOperationRetryTime(); | |
| a = new ta(c, "DELETE", function (a, b) {}, a); | |
| a.successCodes = [200, 204]; | |
| a.errorHandler = ca(b); | |
| return a; | |
| } | |
| function fa(a, b, c) { | |
| c = Object.assign({}, c); | |
| c.fullPath = a.path; | |
| c.size = b.size(); | |
| c.contentType || | |
| (c.contentType = (b && b.type()) || "application/octet-stream"); | |
| return c; | |
| } | |
| function Ga(a, b, c, e, g) { | |
| var d = b.bucketOnlyServerUrl(), | |
| l = { "X-Goog-Upload-Protocol": "multipart" }; | |
| var h = ""; | |
| for (var k = 0; 2 > k; k++) h += Math.random().toString().slice(2); | |
| l["Content-Type"] = "multipart/related; boundary\x3d" + h; | |
| g = fa(b, e, g); | |
| k = P(g, c); | |
| e = Ja.getBlob( | |
| "--" + | |
| h + | |
| "\r\nContent-Type: application/json; charset\x3dutf-8\r\n\r\n" + | |
| k + | |
| "\r\n--" + | |
| h + | |
| "\r\nContent-Type: " + | |
| g.contentType + | |
| "\r\n\r\n", | |
| e, | |
| "\r\n--" + h + "--" | |
| ); | |
| if (null === e) throw q(); | |
| g = { name: g.fullPath }; | |
| d = A(d); | |
| h = a.maxUploadRetryTime(); | |
| a = new ta(d, "POST", B(a, c), h); | |
| a.urlParams = g; | |
| a.headers = l; | |
| a.body = e.uploadData(); | |
| a.errorHandler = Y(b); | |
| return a; | |
| } | |
| function ja(a, b) { | |
| var c = null; | |
| try { | |
| c = a.getResponseHeader("X-Goog-Upload-Status"); | |
| } catch (kc) { | |
| N(!1); | |
| } | |
| a = b || ["active"]; | |
| N(!!c && -1 !== a.indexOf(c)); | |
| return c; | |
| } | |
| function ka(a, b, c, e, g) { | |
| var d = b.bucketOnlyServerUrl(), | |
| l = fa(b, e, g); | |
| g = { name: l.fullPath }; | |
| d = A(d); | |
| e = { | |
| "X-Goog-Upload-Protocol": "resumable", | |
| "X-Goog-Upload-Command": "start", | |
| "X-Goog-Upload-Header-Content-Length": e.size(), | |
| "X-Goog-Upload-Header-Content-Type": l.contentType, | |
| "Content-Type": "application/json; charset\x3dutf-8", | |
| }; | |
| c = P(l, c); | |
| a = a.maxUploadRetryTime(); | |
| a = new ta( | |
| d, | |
| "POST", | |
| function (a) { | |
| ja(a); | |
| try { | |
| var b = a.getResponseHeader("X-Goog-Upload-URL"); | |
| } catch (dc) { | |
| N(!1); | |
| } | |
| N(x(b)); | |
| return b; | |
| }, | |
| a | |
| ); | |
| a.urlParams = g; | |
| a.headers = e; | |
| a.body = c; | |
| a.errorHandler = Y(b); | |
| return a; | |
| } | |
| function Z(a, b, c, e) { | |
| a = a.maxUploadRetryTime(); | |
| c = new ta( | |
| c, | |
| "POST", | |
| function (a) { | |
| var b = ja(a, ["active", "final"]), | |
| c = null; | |
| try { | |
| c = a.getResponseHeader("X-Goog-Upload-Size-Received"); | |
| } catch (yb) { | |
| N(!1); | |
| } | |
| c || N(!1); | |
| a = Number(c); | |
| N(!isNaN(a)); | |
| return new Ya(a, e.size(), "final" === b); | |
| }, | |
| a | |
| ); | |
| c.headers = { "X-Goog-Upload-Command": "query" }; | |
| c.errorHandler = Y(b); | |
| return c; | |
| } | |
| function Fa(a, b, c, e, g, d, l, h) { | |
| var k = new Ya(0, 0); | |
| l | |
| ? ((k.current = l.current), (k.total = l.total)) | |
| : ((k.current = 0), (k.total = e.size())); | |
| if (e.size() !== k.total) | |
| throw new ha( | |
| ya.SERVER_FILE_WRONG_SIZE, | |
| "Server recorded incorrect upload file size, please retry the upload." | |
| ); | |
| var n = (l = k.total - k.current); | |
| 0 < g && (n = Math.min(n, g)); | |
| var v = k.current; | |
| g = { | |
| "X-Goog-Upload-Command": n === l ? "upload, finalize" : "upload", | |
| "X-Goog-Upload-Offset": k.current, | |
| }; | |
| l = e.slice(v, v + n); | |
| if (null === l) throw q(); | |
| v = b.maxUploadRetryTime(); | |
| c = new ta( | |
| c, | |
| "POST", | |
| function (a, c) { | |
| var g = ja(a, ["active", "final"]), | |
| l = k.current + n, | |
| h = e.size(); | |
| a = "final" === g ? B(b, d)(a, c) : null; | |
| return new Ya(l, h, "final" === g, a); | |
| }, | |
| v | |
| ); | |
| c.headers = g; | |
| c.body = l.uploadData(); | |
| c.progressCallback = h || null; | |
| c.errorHandler = Y(a); | |
| return c; | |
| } | |
| function qa(a, b, c) { | |
| for (var e = b.length, g = b.length, d = 0; d < b.length; d++) | |
| if (b[d].optional) { | |
| e = d; | |
| break; | |
| } | |
| if (!(e <= c.length && c.length <= g)) | |
| throw ( | |
| (e === g | |
| ? ((b = e), (e = 1 === e ? "argument" : "arguments")) | |
| : ((b = "between " + e + " and " + g), (e = "arguments")), | |
| new ha( | |
| ya.INVALID_ARGUMENT_COUNT, | |
| "Invalid argument count in `" + | |
| a + | |
| "`: Expected " + | |
| b + | |
| " " + | |
| e + | |
| ", received " + | |
| c.length + | |
| "." | |
| )) | |
| ); | |
| for (d = 0; d < c.length; d++) | |
| try { | |
| b[d].validator(c[d]); | |
| } catch (rc) { | |
| if (rc instanceof Error) throw h(d, a, rc.message); | |
| throw h(d, a, rc); | |
| } | |
| } | |
| function ea(a, b) { | |
| return function (c) { | |
| a(c); | |
| b(c); | |
| }; | |
| } | |
| function za(a, b) { | |
| function c(a) { | |
| if (!x(a)) throw "Expected string."; | |
| } | |
| a = a ? ea(c, a) : c; | |
| return new rb(a, b); | |
| } | |
| function La() { | |
| return new rb(function (a) { | |
| if ( | |
| !( | |
| a instanceof Uint8Array || | |
| a instanceof ArrayBuffer || | |
| (H() && a instanceof Blob) | |
| ) | |
| ) | |
| throw "Expected Blob or File."; | |
| }); | |
| } | |
| function pa() { | |
| return new rb(function (a) { | |
| if (!(v(a) && 0 <= a)) throw "Expected a number 0 or greater."; | |
| }); | |
| } | |
| function Aa(a, b) { | |
| return new rb(function (b) { | |
| if (!(null === b || (null != b && b instanceof Object))) | |
| throw "Expected an Object."; | |
| void 0 !== a && null !== a && a(b); | |
| }, b); | |
| } | |
| function Ka(a) { | |
| return new rb(function (a) { | |
| if (null !== a && "function" !== typeof a) throw "Expected a Function."; | |
| }, a); | |
| } | |
| function Ia(a) { | |
| return function () { | |
| for (var b = [], c = 0; c < arguments.length; c++) b[c] = arguments[c]; | |
| Promise.resolve().then(function () { | |
| return a.apply(void 0, b); | |
| }); | |
| }; | |
| } | |
| function bb(a, b, c) { | |
| function e() { | |
| for (var a = [], c = 0; c < arguments.length; c++) a[c] = arguments[c]; | |
| f || ((f = !0), b.apply(null, a)); | |
| } | |
| function g(b) { | |
| k = setTimeout(function () { | |
| k = null; | |
| a(d, 2 === v); | |
| }, b); | |
| } | |
| function d(a) { | |
| for (var b = [], c = 1; c < arguments.length; c++) | |
| b[c - 1] = arguments[c]; | |
| f || | |
| (a | |
| ? e.call.apply(e, fb.__spreadArrays([null, a], b)) | |
| : 2 === v || n | |
| ? e.call.apply(e, fb.__spreadArrays([null, a], b)) | |
| : (64 > h && (h *= 2), | |
| 1 === v ? ((v = 2), (b = 0)) : (b = 1e3 * (h + Math.random())), | |
| g(b))); | |
| } | |
| function l(a) { | |
| w || | |
| ((w = !0), | |
| f || | |
| (null !== k ? (a || (v = 2), clearTimeout(k), g(0)) : a || (v = 1))); | |
| } | |
| var h = 1, | |
| k = null, | |
| n = !1, | |
| v = 0, | |
| f = !1, | |
| w = !1; | |
| g(0); | |
| setTimeout(function () { | |
| n = !0; | |
| l(!0); | |
| }, c); | |
| return l; | |
| } | |
| function aa(a, b, c) { | |
| var e = z(a.urlParams); | |
| e = a.url + e; | |
| var g = Object.assign({}, a.headers); | |
| null !== b && 0 < b.length && (g.Authorization = "Firebase " + b); | |
| g["X-Firebase-Storage-Version"] = | |
| "webjs/" + ("undefined" !== typeof la ? la.SDK_VERSION : "AppManager"); | |
| return new vb( | |
| e, | |
| a.method, | |
| g, | |
| a.body, | |
| a.successCodes, | |
| a.additionalRetryCodes, | |
| a.handler, | |
| a.errorHandler, | |
| a.timeout, | |
| a.progressCallback, | |
| c | |
| ); | |
| } | |
| function X(a, b) { | |
| var c = a.getProvider("app").getImmediate(); | |
| a = a.getProvider("auth-internal"); | |
| return new Lc(c, a, new tb(), b); | |
| } | |
| function va(a) { | |
| var b = { | |
| TaskState: wa, | |
| TaskEvent: Va, | |
| StringFormat: jb, | |
| Storage: Lc, | |
| Reference: Yb, | |
| }; | |
| a.INTERNAL.registerComponent( | |
| new cc.Component("storage", X, "PUBLIC") | |
| .setServiceProps(b) | |
| .setMultipleInstances(!0) | |
| ); | |
| a.registerVersion("@firebase/storage", "0.3.24"); | |
| } | |
| Object.defineProperty(d, "__esModule", { value: !0 }); | |
| var la = (function (a) { | |
| return a && "object" === typeof a && "default" in a ? a["default"] : a; | |
| })(f(26)), | |
| fb = f(22), | |
| cc = f(24), | |
| ha = (function () { | |
| function a(a, b) { | |
| this.code_ = "storage/" + a; | |
| this.message_ = "Firebase Storage: " + b; | |
| this.serverResponse_ = null; | |
| this.name_ = "FirebaseError"; | |
| } | |
| a.prototype.codeProp = function () { | |
| return this.code; | |
| }; | |
| a.prototype.codeEquals = function (a) { | |
| return "storage/" + a === this.codeProp(); | |
| }; | |
| a.prototype.serverResponseProp = function () { | |
| return this.serverResponse_; | |
| }; | |
| a.prototype.setServerResponseProp = function (a) { | |
| this.serverResponse_ = a; | |
| }; | |
| Object.defineProperty(a.prototype, "name", { | |
| get: function () { | |
| return this.name_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "code", { | |
| get: function () { | |
| return this.code_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "message", { | |
| get: function () { | |
| return this.message_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "serverResponse", { | |
| get: function () { | |
| return this.serverResponse_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| return a; | |
| })(), | |
| ya = { | |
| UNKNOWN: "unknown", | |
| OBJECT_NOT_FOUND: "object-not-found", | |
| BUCKET_NOT_FOUND: "bucket-not-found", | |
| PROJECT_NOT_FOUND: "project-not-found", | |
| QUOTA_EXCEEDED: "quota-exceeded", | |
| UNAUTHENTICATED: "unauthenticated", | |
| UNAUTHORIZED: "unauthorized", | |
| RETRY_LIMIT_EXCEEDED: "retry-limit-exceeded", | |
| INVALID_CHECKSUM: "invalid-checksum", | |
| CANCELED: "canceled", | |
| INVALID_EVENT_NAME: "invalid-event-name", | |
| INVALID_URL: "invalid-url", | |
| INVALID_DEFAULT_BUCKET: "invalid-default-bucket", | |
| NO_DEFAULT_BUCKET: "no-default-bucket", | |
| CANNOT_SLICE_BLOB: "cannot-slice-blob", | |
| SERVER_FILE_WRONG_SIZE: "server-file-wrong-size", | |
| NO_DOWNLOAD_URL: "no-download-url", | |
| INVALID_ARGUMENT: "invalid-argument", | |
| INVALID_ARGUMENT_COUNT: "invalid-argument-count", | |
| APP_DELETED: "app-deleted", | |
| INVALID_ROOT_OPERATION: "invalid-root-operation", | |
| INVALID_FORMAT: "invalid-format", | |
| INTERNAL_ERROR: "internal-error", | |
| }, | |
| jb = { | |
| RAW: "raw", | |
| BASE64: "base64", | |
| BASE64URL: "base64url", | |
| DATA_URL: "data_url", | |
| }, | |
| Da = (function () { | |
| return function (a, b) { | |
| this.data = a; | |
| this.contentType = b || null; | |
| }; | |
| })(), | |
| na = (function () { | |
| return function (b) { | |
| this.base64 = !1; | |
| this.contentType = null; | |
| var c = b.match(/^data:([^,]+)?,/); | |
| if (null === c) | |
| throw a( | |
| jb.DATA_URL, | |
| "Must be formatted 'data:[\x3cmediatype\x3e][;base64],\x3cdata\x3e" | |
| ); | |
| c = c[1] || null; | |
| if (null != c) { | |
| var e = 7 <= c.length ? ";base64" === c.substring(c.length - 7) : !1; | |
| this.contentType = (this.base64 = e) | |
| ? c.substring(0, c.length - 7) | |
| : c; | |
| } | |
| this.rest = b.substring(b.indexOf(",") + 1); | |
| }; | |
| })(), | |
| Va = { STATE_CHANGED: "state_changed" }, | |
| ua = { | |
| RUNNING: "running", | |
| PAUSING: "pausing", | |
| PAUSED: "paused", | |
| SUCCESS: "success", | |
| CANCELING: "canceling", | |
| CANCELED: "canceled", | |
| ERROR: "error", | |
| }, | |
| wa = { | |
| RUNNING: "running", | |
| PAUSED: "paused", | |
| SUCCESS: "success", | |
| CANCELED: "canceled", | |
| ERROR: "error", | |
| }, | |
| ma; | |
| (function (a) { | |
| a[(a.NO_ERROR = 0)] = "NO_ERROR"; | |
| a[(a.NETWORK_ERROR = 1)] = "NETWORK_ERROR"; | |
| a[(a.ABORT = 2)] = "ABORT"; | |
| })(ma || (ma = {})); | |
| var lb = (function () { | |
| function a() { | |
| var a = this; | |
| this.sent_ = !1; | |
| this.xhr_ = new XMLHttpRequest(); | |
| this.errorCode_ = ma.NO_ERROR; | |
| this.sendPromise_ = new Promise(function (b) { | |
| a.xhr_.addEventListener("abort", function () { | |
| a.errorCode_ = ma.ABORT; | |
| b(a); | |
| }); | |
| a.xhr_.addEventListener("error", function () { | |
| a.errorCode_ = ma.NETWORK_ERROR; | |
| b(a); | |
| }); | |
| a.xhr_.addEventListener("load", function () { | |
| b(a); | |
| }); | |
| }); | |
| } | |
| a.prototype.send = function (a, b, c, e) { | |
| if (this.sent_) throw k("cannot .send() more than once"); | |
| this.sent_ = !0; | |
| this.xhr_.open(b, a, !0); | |
| if (null != e) | |
| for (var g in e) | |
| e.hasOwnProperty(g) && | |
| this.xhr_.setRequestHeader(g, e[g].toString()); | |
| null != c ? this.xhr_.send(c) : this.xhr_.send(); | |
| return this.sendPromise_; | |
| }; | |
| a.prototype.getErrorCode = function () { | |
| if (!this.sent_) throw k("cannot .getErrorCode() before sending"); | |
| return this.errorCode_; | |
| }; | |
| a.prototype.getStatus = function () { | |
| if (!this.sent_) throw k("cannot .getStatus() before sending"); | |
| try { | |
| return this.xhr_.status; | |
| } catch ($b) { | |
| return -1; | |
| } | |
| }; | |
| a.prototype.getResponseText = function () { | |
| if (!this.sent_) throw k("cannot .getResponseText() before sending"); | |
| return this.xhr_.responseText; | |
| }; | |
| a.prototype.abort = function () { | |
| this.xhr_.abort(); | |
| }; | |
| a.prototype.getResponseHeader = function (a) { | |
| return this.xhr_.getResponseHeader(a); | |
| }; | |
| a.prototype.addUploadProgressListener = function (a) { | |
| null != this.xhr_.upload && | |
| this.xhr_.upload.addEventListener("progress", a); | |
| }; | |
| a.prototype.removeUploadProgressListener = function (a) { | |
| null != this.xhr_.upload && | |
| this.xhr_.upload.removeEventListener("progress", a); | |
| }; | |
| return a; | |
| })(), | |
| tb = (function () { | |
| function a() {} | |
| a.prototype.createXhrIo = function () { | |
| return new lb(); | |
| }; | |
| return a; | |
| })(), | |
| Ja = (function () { | |
| function a(a, b) { | |
| var c = 0, | |
| e = ""; | |
| I(a) | |
| ? ((this.data_ = a), (c = a.size), (e = a.type)) | |
| : a instanceof ArrayBuffer | |
| ? (b | |
| ? (this.data_ = new Uint8Array(a)) | |
| : ((this.data_ = new Uint8Array(a.byteLength)), | |
| this.data_.set(new Uint8Array(a))), | |
| (c = this.data_.length)) | |
| : a instanceof Uint8Array && | |
| (b | |
| ? (this.data_ = a) | |
| : ((this.data_ = new Uint8Array(a.length)), this.data_.set(a)), | |
| (c = a.length)); | |
| this.size_ = c; | |
| this.type_ = e; | |
| } | |
| a.prototype.size = function () { | |
| return this.size_; | |
| }; | |
| a.prototype.type = function () { | |
| return this.type_; | |
| }; | |
| a.prototype.slice = function (b, c) { | |
| if (I(this.data_)) { | |
| var e = this.data_; | |
| b = e.webkitSlice | |
| ? e.webkitSlice(b, c) | |
| : e.mozSlice | |
| ? e.mozSlice(b, c) | |
| : e.slice | |
| ? e.slice(b, c) | |
| : null; | |
| return null === b ? null : new a(b); | |
| } | |
| b = new Uint8Array(this.data_.buffer, b, c - b); | |
| return new a(b, !0); | |
| }; | |
| a.getBlob = function () { | |
| for (var b = [], e = 0; e < arguments.length; e++) b[e] = arguments[e]; | |
| if (H()) | |
| return ( | |
| (b = b.map(function (b) { | |
| return b instanceof a ? b.data_ : b; | |
| })), | |
| new a(C.apply(null, b)) | |
| ); | |
| b = b.map(function (a) { | |
| return x(a) ? c(jb.RAW, a).data : a.data_; | |
| }); | |
| var g = 0; | |
| b.forEach(function (a) { | |
| g += a.byteLength; | |
| }); | |
| var d = new Uint8Array(g), | |
| l = 0; | |
| b.forEach(function (a) { | |
| for (var b = 0; b < a.length; b++) d[l++] = a[b]; | |
| }); | |
| return new a(d, !0); | |
| }; | |
| a.prototype.uploadData = function () { | |
| return this.data_; | |
| }; | |
| return a; | |
| })(), | |
| cb = (function () { | |
| function a(a, b) { | |
| this.bucket = a; | |
| this.path_ = b; | |
| } | |
| Object.defineProperty(a.prototype, "path", { | |
| get: function () { | |
| return this.path_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "isRoot", { | |
| get: function () { | |
| return 0 === this.path.length; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.fullServerUrl = function () { | |
| var a = encodeURIComponent; | |
| return "/b/" + a(this.bucket) + "/o/" + a(this.path); | |
| }; | |
| a.prototype.bucketOnlyServerUrl = function () { | |
| return "/b/" + encodeURIComponent(this.bucket) + "/o"; | |
| }; | |
| a.makeFromBucketSpec = function (b) { | |
| try { | |
| var c = a.makeFromUrl(b); | |
| } catch (kc) { | |
| return new a(b, ""); | |
| } | |
| if ("" === c.path) return c; | |
| throw new ha( | |
| ya.INVALID_DEFAULT_BUCKET, | |
| "Invalid default bucket '" + b + "'." | |
| ); | |
| }; | |
| a.makeFromUrl = function (b) { | |
| for ( | |
| var c = null, | |
| e = "firebasestorage.googleapis.com".replace(/[.]/g, "\\."), | |
| g = [ | |
| { | |
| regex: /^gs:\/\/([A-Za-z0-9.\-_]+)(\/(.*))?$/i, | |
| indices: { bucket: 1, path: 3 }, | |
| postModify: function (a) { | |
| "/" === a.path.charAt(a.path.length - 1) && | |
| (a.path_ = a.path_.slice(0, -1)); | |
| }, | |
| }, | |
| { | |
| regex: new RegExp( | |
| "^https?://" + | |
| e + | |
| "/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-_]+)/o(/([^?#]*).*)?$", | |
| "i" | |
| ), | |
| indices: { bucket: 1, path: 3 }, | |
| postModify: function (a) { | |
| a.path_ = decodeURIComponent(a.path); | |
| }, | |
| }, | |
| ], | |
| d = 0; | |
| d < g.length; | |
| d++ | |
| ) { | |
| e = g[d]; | |
| var l = e.regex.exec(b); | |
| if (l) { | |
| c = l[e.indices.bucket]; | |
| (l = l[e.indices.path]) || (l = ""); | |
| c = new a(c, l); | |
| e.postModify(c); | |
| break; | |
| } | |
| } | |
| if (null == c) throw new ha(ya.INVALID_URL, "Invalid URL '" + b + "'."); | |
| return c; | |
| }; | |
| return a; | |
| })(), | |
| Xa = (function () { | |
| return function (a, b, c, e) { | |
| this.server = a; | |
| this.local = b || a; | |
| this.writable = !!c; | |
| this.xform = e || K; | |
| }; | |
| })(), | |
| qb = null, | |
| ta = (function () { | |
| return function (a, b, c, e) { | |
| this.url = a; | |
| this.method = b; | |
| this.handler = c; | |
| this.timeout = e; | |
| this.urlParams = {}; | |
| this.headers = {}; | |
| this.progressCallback = this.errorHandler = this.body = null; | |
| this.successCodes = [200]; | |
| this.additionalRetryCodes = []; | |
| }; | |
| })(), | |
| Ya = (function () { | |
| return function (a, b, c, e) { | |
| this.current = a; | |
| this.total = b; | |
| this.finalized = !!c; | |
| this.metadata = e || null; | |
| }; | |
| })(), | |
| Ta = (function () { | |
| return function (a, b, c) { | |
| "function" === typeof a || null != b || null != c | |
| ? ((this.next = a), | |
| (this.error = b || null), | |
| (this.complete = c || null)) | |
| : ((this.next = a.next || null), | |
| (this.error = a.error || null), | |
| (this.complete = a.complete || null)); | |
| }; | |
| })(), | |
| kb = (function () { | |
| return function (a, b, c, e, g, d) { | |
| this.bytesTransferred = a; | |
| this.totalBytes = b; | |
| this.state = c; | |
| this.metadata = e; | |
| this.task = g; | |
| this.ref = d; | |
| }; | |
| })(), | |
| rb = (function () { | |
| return function (a, b) { | |
| var c = this; | |
| this.validator = function (b) { | |
| (c.optional && !w(b)) || a(b); | |
| }; | |
| this.optional = !!b; | |
| }; | |
| })(), | |
| Wb = (function () { | |
| function a(a, b, c, e, g, d) { | |
| var l = this; | |
| void 0 === d && (d = null); | |
| this.transferred_ = 0; | |
| this.needToFetchMetadata_ = this.needToFetchStatus_ = !1; | |
| this.observers_ = []; | |
| this.request_ = this.uploadUrl_ = this.error_ = null; | |
| this.chunkMultiplier_ = 1; | |
| this.reject_ = this.resolve_ = null; | |
| this.ref_ = a; | |
| this.authWrapper_ = b; | |
| this.location_ = c; | |
| this.blob_ = g; | |
| this.metadata_ = d; | |
| this.mappings_ = e; | |
| this.resumable_ = this.shouldDoResumable_(this.blob_); | |
| this.state_ = ua.RUNNING; | |
| this.errorHandler_ = function (a) { | |
| l.request_ = null; | |
| l.chunkMultiplier_ = 1; | |
| a.codeEquals(ya.CANCELED) | |
| ? ((l.needToFetchStatus_ = !0), l.completeTransitions_()) | |
| : ((l.error_ = a), l.transition_(ua.ERROR)); | |
| }; | |
| this.metadataErrorHandler_ = function (a) { | |
| l.request_ = null; | |
| a.codeEquals(ya.CANCELED) | |
| ? l.completeTransitions_() | |
| : ((l.error_ = a), l.transition_(ua.ERROR)); | |
| }; | |
| this.promise_ = new Promise(function (a, b) { | |
| l.resolve_ = a; | |
| l.reject_ = b; | |
| l.start_(); | |
| }); | |
| this.promise_.then(null, function () {}); | |
| } | |
| a.prototype.makeProgressCallback_ = function () { | |
| var a = this, | |
| b = this.transferred_; | |
| return function (c) { | |
| return a.updateProgress_(b + c); | |
| }; | |
| }; | |
| a.prototype.shouldDoResumable_ = function (a) { | |
| return 262144 < a.size(); | |
| }; | |
| a.prototype.start_ = function () { | |
| if (this.state_ === ua.RUNNING && null === this.request_) | |
| if (this.resumable_) | |
| null === this.uploadUrl_ | |
| ? this.createResumable_() | |
| : this.needToFetchStatus_ | |
| ? this.fetchStatus_() | |
| : this.needToFetchMetadata_ | |
| ? this.fetchMetadata_() | |
| : this.continueUpload_(); | |
| else this.oneShotUpload_(); | |
| }; | |
| a.prototype.resolveToken_ = function (a) { | |
| var b = this; | |
| this.authWrapper_.getAuthToken().then(function (c) { | |
| switch (b.state_) { | |
| case ua.RUNNING: | |
| a(c); | |
| break; | |
| case ua.CANCELING: | |
| b.transition_(ua.CANCELED); | |
| break; | |
| case ua.PAUSING: | |
| b.transition_(ua.PAUSED); | |
| } | |
| }); | |
| }; | |
| a.prototype.createResumable_ = function () { | |
| var a = this; | |
| this.resolveToken_(function (b) { | |
| var c = ka( | |
| a.authWrapper_, | |
| a.location_, | |
| a.mappings_, | |
| a.blob_, | |
| a.metadata_ | |
| ); | |
| b = a.authWrapper_.makeRequest(c, b); | |
| a.request_ = b; | |
| b.getPromise().then(function (b) { | |
| a.request_ = null; | |
| a.uploadUrl_ = b; | |
| a.needToFetchStatus_ = !1; | |
| a.completeTransitions_(); | |
| }, a.errorHandler_); | |
| }); | |
| }; | |
| a.prototype.fetchStatus_ = function () { | |
| var a = this, | |
| b = this.uploadUrl_; | |
| this.resolveToken_(function (c) { | |
| var e = Z(a.authWrapper_, a.location_, b, a.blob_); | |
| c = a.authWrapper_.makeRequest(e, c); | |
| a.request_ = c; | |
| c.getPromise().then(function (b) { | |
| a.request_ = null; | |
| a.updateProgress_(b.current); | |
| a.needToFetchStatus_ = !1; | |
| b.finalized && (a.needToFetchMetadata_ = !0); | |
| a.completeTransitions_(); | |
| }, a.errorHandler_); | |
| }); | |
| }; | |
| a.prototype.continueUpload_ = function () { | |
| var a = this, | |
| b = 262144 * this.chunkMultiplier_, | |
| c = new Ya(this.transferred_, this.blob_.size()), | |
| e = this.uploadUrl_; | |
| this.resolveToken_(function (g) { | |
| try { | |
| var d = Fa( | |
| a.location_, | |
| a.authWrapper_, | |
| e, | |
| a.blob_, | |
| b, | |
| a.mappings_, | |
| c, | |
| a.makeProgressCallback_() | |
| ); | |
| } catch (yb) { | |
| a.error_ = yb; | |
| a.transition_(ua.ERROR); | |
| return; | |
| } | |
| g = a.authWrapper_.makeRequest(d, g); | |
| a.request_ = g; | |
| g.getPromise().then(function (b) { | |
| a.increaseMultiplier_(); | |
| a.request_ = null; | |
| a.updateProgress_(b.current); | |
| b.finalized | |
| ? ((a.metadata_ = b.metadata), a.transition_(ua.SUCCESS)) | |
| : a.completeTransitions_(); | |
| }, a.errorHandler_); | |
| }); | |
| }; | |
| a.prototype.increaseMultiplier_ = function () { | |
| 33554432 > 262144 * this.chunkMultiplier_ && | |
| (this.chunkMultiplier_ *= 2); | |
| }; | |
| a.prototype.fetchMetadata_ = function () { | |
| var a = this; | |
| this.resolveToken_(function (b) { | |
| var c = ra(a.authWrapper_, a.location_, a.mappings_); | |
| b = a.authWrapper_.makeRequest(c, b); | |
| a.request_ = b; | |
| b.getPromise().then(function (b) { | |
| a.request_ = null; | |
| a.metadata_ = b; | |
| a.transition_(ua.SUCCESS); | |
| }, a.metadataErrorHandler_); | |
| }); | |
| }; | |
| a.prototype.oneShotUpload_ = function () { | |
| var a = this; | |
| this.resolveToken_(function (b) { | |
| var c = Ga( | |
| a.authWrapper_, | |
| a.location_, | |
| a.mappings_, | |
| a.blob_, | |
| a.metadata_ | |
| ); | |
| b = a.authWrapper_.makeRequest(c, b); | |
| a.request_ = b; | |
| b.getPromise().then(function (b) { | |
| a.request_ = null; | |
| a.metadata_ = b; | |
| a.updateProgress_(a.blob_.size()); | |
| a.transition_(ua.SUCCESS); | |
| }, a.errorHandler_); | |
| }); | |
| }; | |
| a.prototype.updateProgress_ = function (a) { | |
| var b = this.transferred_; | |
| this.transferred_ = a; | |
| this.transferred_ !== b && this.notifyObservers_(); | |
| }; | |
| a.prototype.transition_ = function (a) { | |
| if (this.state_ !== a) | |
| switch (a) { | |
| case ua.CANCELING: | |
| this.state_ = a; | |
| null !== this.request_ && this.request_.cancel(); | |
| break; | |
| case ua.PAUSING: | |
| this.state_ = a; | |
| null !== this.request_ && this.request_.cancel(); | |
| break; | |
| case ua.RUNNING: | |
| var b = this.state_ === ua.PAUSED; | |
| this.state_ = a; | |
| b && (this.notifyObservers_(), this.start_()); | |
| break; | |
| case ua.PAUSED: | |
| this.state_ = a; | |
| this.notifyObservers_(); | |
| break; | |
| case ua.CANCELED: | |
| this.error_ = t(); | |
| this.state_ = a; | |
| this.notifyObservers_(); | |
| break; | |
| case ua.ERROR: | |
| this.state_ = a; | |
| this.notifyObservers_(); | |
| break; | |
| case ua.SUCCESS: | |
| (this.state_ = a), this.notifyObservers_(); | |
| } | |
| }; | |
| a.prototype.completeTransitions_ = function () { | |
| switch (this.state_) { | |
| case ua.PAUSING: | |
| this.transition_(ua.PAUSED); | |
| break; | |
| case ua.CANCELING: | |
| this.transition_(ua.CANCELED); | |
| break; | |
| case ua.RUNNING: | |
| this.start_(); | |
| } | |
| }; | |
| Object.defineProperty(a.prototype, "snapshot", { | |
| get: function () { | |
| var a = g(this.state_); | |
| return new kb( | |
| this.transferred_, | |
| this.blob_.size(), | |
| a, | |
| this.metadata_, | |
| this, | |
| this.ref_ | |
| ); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.on = function (a, b, c, e) { | |
| function g(a) { | |
| try { | |
| l(a); | |
| return; | |
| } catch (Cc) {} | |
| try { | |
| if ((h(a), !(w(a.next) || w(a.error) || w(a.complete)))) throw ""; | |
| } catch (Cc) { | |
| throw "Expected a function or an Object with one of `next`, `error`, `complete` properties."; | |
| } | |
| } | |
| function d(a) { | |
| return function (b, c, g) { | |
| null !== a && qa("on", a, arguments); | |
| var d = new Ta(b, c, e); | |
| n.addObserver_(d); | |
| return function () { | |
| n.removeObserver_(d); | |
| }; | |
| }; | |
| } | |
| var l = Ka(!0).validator, | |
| h = Aa(null, !0).validator, | |
| k = [ | |
| za(function () { | |
| if (a !== Va.STATE_CHANGED) | |
| throw ( | |
| "Expected one of the event types: [" + Va.STATE_CHANGED + "]." | |
| ); | |
| }), | |
| Aa(g, !0), | |
| Ka(!0), | |
| Ka(!0), | |
| ]; | |
| qa("on", k, arguments); | |
| var n = this; | |
| k = [ | |
| Aa(function (a) { | |
| if (null === a) | |
| throw "Expected a function or an Object with one of `next`, `error`, `complete` properties."; | |
| g(a); | |
| }), | |
| Ka(!0), | |
| Ka(!0), | |
| ]; | |
| return w(b) || w(c) || w(e) ? d(null)(b, c, e) : d(k); | |
| }; | |
| a.prototype.then = function (a, b) { | |
| return this.promise_.then(a, b); | |
| }; | |
| a.prototype.catch = function (a) { | |
| return this.then(null, a); | |
| }; | |
| a.prototype.addObserver_ = function (a) { | |
| this.observers_.push(a); | |
| this.notifyObserver_(a); | |
| }; | |
| a.prototype.removeObserver_ = function (a) { | |
| a = this.observers_.indexOf(a); | |
| -1 !== a && this.observers_.splice(a, 1); | |
| }; | |
| a.prototype.notifyObservers_ = function () { | |
| var a = this; | |
| this.finishPromise_(); | |
| this.observers_.slice().forEach(function (b) { | |
| a.notifyObserver_(b); | |
| }); | |
| }; | |
| a.prototype.finishPromise_ = function () { | |
| if (null !== this.resolve_) { | |
| var a = !0; | |
| switch (g(this.state_)) { | |
| case wa.SUCCESS: | |
| Ia(this.resolve_.bind(null, this.snapshot))(); | |
| break; | |
| case wa.CANCELED: | |
| case wa.ERROR: | |
| Ia(this.reject_.bind(null, this.error_))(); | |
| break; | |
| default: | |
| a = !1; | |
| } | |
| a && (this.reject_ = this.resolve_ = null); | |
| } | |
| }; | |
| a.prototype.notifyObserver_ = function (a) { | |
| switch (g(this.state_)) { | |
| case wa.RUNNING: | |
| case wa.PAUSED: | |
| a.next && Ia(a.next.bind(a, this.snapshot))(); | |
| break; | |
| case wa.SUCCESS: | |
| a.complete && Ia(a.complete.bind(a))(); | |
| break; | |
| case wa.CANCELED: | |
| case wa.ERROR: | |
| a.error && Ia(a.error.bind(a, this.error_))(); | |
| break; | |
| default: | |
| a.error && Ia(a.error.bind(a, this.error_))(); | |
| } | |
| }; | |
| a.prototype.resume = function () { | |
| qa("resume", [], arguments); | |
| var a = this.state_ === ua.PAUSED || this.state_ === ua.PAUSING; | |
| a && this.transition_(ua.RUNNING); | |
| return a; | |
| }; | |
| a.prototype.pause = function () { | |
| qa("pause", [], arguments); | |
| var a = this.state_ === ua.RUNNING; | |
| a && this.transition_(ua.PAUSING); | |
| return a; | |
| }; | |
| a.prototype.cancel = function () { | |
| qa("cancel", [], arguments); | |
| var a = this.state_ === ua.RUNNING || this.state_ === ua.PAUSING; | |
| a && this.transition_(ua.CANCELING); | |
| return a; | |
| }; | |
| return a; | |
| })(), | |
| Yb = (function () { | |
| function a(a, b) { | |
| this.authWrapper = a; | |
| this.location = b instanceof cb ? b : cb.makeFromUrl(b); | |
| } | |
| a.prototype.toString = function () { | |
| qa("toString", [], arguments); | |
| return "gs://" + this.location.bucket + "/" + this.location.path; | |
| }; | |
| a.prototype.newRef = function (b, c) { | |
| return new a(b, c); | |
| }; | |
| a.prototype.mappings = function () { | |
| return D(); | |
| }; | |
| a.prototype.child = function (a) { | |
| qa("child", [za()], arguments); | |
| var b = G(this.location.path, a); | |
| b = new cb(this.location.bucket, b); | |
| return this.newRef(this.authWrapper, b); | |
| }; | |
| Object.defineProperty(a.prototype, "parent", { | |
| get: function () { | |
| var a = this.location.path; | |
| if (0 === a.length) a = null; | |
| else { | |
| var b = a.lastIndexOf("/"); | |
| a = -1 === b ? "" : a.slice(0, b); | |
| } | |
| if (null === a) return null; | |
| a = new cb(this.location.bucket, a); | |
| return this.newRef(this.authWrapper, a); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "root", { | |
| get: function () { | |
| var a = new cb(this.location.bucket, ""); | |
| return this.newRef(this.authWrapper, a); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "bucket", { | |
| get: function () { | |
| return this.location.bucket; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "fullPath", { | |
| get: function () { | |
| return this.location.path; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "name", { | |
| get: function () { | |
| return O(this.location.path); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "storage", { | |
| get: function () { | |
| return this.authWrapper.service(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.put = function (a, b) { | |
| void 0 === b && (b = null); | |
| qa("put", [La(), new rb(J, !0)], arguments); | |
| this.throwIfRoot_("put"); | |
| return new Wb( | |
| this, | |
| this.authWrapper, | |
| this.location, | |
| this.mappings(), | |
| new Ja(a), | |
| b | |
| ); | |
| }; | |
| a.prototype.putString = function (a, b, e) { | |
| void 0 === b && (b = jb.RAW); | |
| qa("putString", [za(), za(n, !0), new rb(J, !0)], arguments); | |
| this.throwIfRoot_("putString"); | |
| var g = c(b, a), | |
| d = Object.assign({}, e); | |
| null == d.contentType && | |
| null != g.contentType && | |
| (d.contentType = g.contentType); | |
| return new Wb( | |
| this, | |
| this.authWrapper, | |
| this.location, | |
| this.mappings(), | |
| new Ja(g.data, !0), | |
| d | |
| ); | |
| }; | |
| a.prototype.delete = function () { | |
| var a = this; | |
| qa("delete", [], arguments); | |
| this.throwIfRoot_("delete"); | |
| return this.authWrapper.getAuthToken().then(function (b) { | |
| var c = Ca(a.authWrapper, a.location); | |
| return a.authWrapper.makeRequest(c, b).getPromise(); | |
| }); | |
| }; | |
| a.prototype.listAll = function () { | |
| qa("listAll", [], arguments); | |
| var a = { prefixes: [], items: [] }; | |
| return this.listAllHelper(a).then(function () { | |
| return a; | |
| }); | |
| }; | |
| a.prototype.listAllHelper = function (a, b) { | |
| return fb.__awaiter(this, void 0, void 0, function () { | |
| var c, e, g, d; | |
| return fb.__generator(this, function (l) { | |
| switch (l.label) { | |
| case 0: | |
| return (c = { pageToken: b }), [4, this.list(c)]; | |
| case 1: | |
| return ( | |
| (e = l.sent()), | |
| (g = a.prefixes).push.apply(g, e.prefixes), | |
| (d = a.items).push.apply(d, e.items), | |
| null == e.nextPageToken | |
| ? [3, 3] | |
| : [4, this.listAllHelper(a, e.nextPageToken)] | |
| ); | |
| case 2: | |
| l.sent(), (l.label = 3); | |
| case 3: | |
| return [2]; | |
| } | |
| }); | |
| }); | |
| }; | |
| a.prototype.list = function (a) { | |
| qa("list", [new rb(L, !0)], arguments); | |
| var b = this; | |
| return this.authWrapper.getAuthToken().then(function (c) { | |
| var e = a || {}, | |
| g = b.authWrapper, | |
| d = b.location, | |
| l = e.pageToken, | |
| h = e.maxResults; | |
| e = {}; | |
| e.prefix = d.isRoot ? "" : d.path + "/"; | |
| e.delimiter = "/"; | |
| l && (e.pageToken = l); | |
| h && (e.maxResults = h); | |
| l = d.bucketOnlyServerUrl(); | |
| l = A(l); | |
| h = g.maxOperationRetryTime(); | |
| g = new ta(l, "GET", V(g), h); | |
| g.urlParams = e; | |
| g.errorHandler = Y(d); | |
| return b.authWrapper.makeRequest(g, c).getPromise(); | |
| }); | |
| }; | |
| a.prototype.getMetadata = function () { | |
| var a = this; | |
| qa("getMetadata", [], arguments); | |
| this.throwIfRoot_("getMetadata"); | |
| return this.authWrapper.getAuthToken().then(function (b) { | |
| var c = ra(a.authWrapper, a.location, a.mappings()); | |
| return a.authWrapper.makeRequest(c, b).getPromise(); | |
| }); | |
| }; | |
| a.prototype.updateMetadata = function (a) { | |
| var b = this; | |
| qa("updateMetadata", [new rb(J, void 0)], arguments); | |
| this.throwIfRoot_("updateMetadata"); | |
| return this.authWrapper.getAuthToken().then(function (c) { | |
| var e = b.authWrapper, | |
| g = b.location, | |
| d = a, | |
| l = b.mappings(), | |
| h = g.fullServerUrl(); | |
| h = A(h); | |
| d = P(d, l); | |
| var k = e.maxOperationRetryTime(); | |
| e = new ta(h, "PATCH", B(e, l), k); | |
| e.headers = { "Content-Type": "application/json; charset\x3dutf-8" }; | |
| e.body = d; | |
| e.errorHandler = ca(g); | |
| return b.authWrapper.makeRequest(e, c).getPromise(); | |
| }); | |
| }; | |
| a.prototype.getDownloadURL = function () { | |
| var a = this; | |
| qa("getDownloadURL", [], arguments); | |
| this.throwIfRoot_("getDownloadURL"); | |
| return this.authWrapper.getAuthToken().then(function (b) { | |
| var c = ia(a.authWrapper, a.location, a.mappings()); | |
| return a.authWrapper | |
| .makeRequest(c, b) | |
| .getPromise() | |
| .then(function (a) { | |
| if (null === a) | |
| throw new ha( | |
| ya.NO_DOWNLOAD_URL, | |
| "The given file does not have any download URLs." | |
| ); | |
| return a; | |
| }); | |
| }); | |
| }; | |
| a.prototype.throwIfRoot_ = function (a) { | |
| if ("" === this.location.path) | |
| throw new ha( | |
| ya.INVALID_ROOT_OPERATION, | |
| "The operation '" + | |
| a + | |
| "' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png')." | |
| ); | |
| }; | |
| return a; | |
| })(), | |
| Ea = (function () { | |
| function a(a) { | |
| this.promise_ = Promise.reject(a); | |
| } | |
| a.prototype.getPromise = function () { | |
| return this.promise_; | |
| }; | |
| a.prototype.cancel = function (a) {}; | |
| return a; | |
| })(), | |
| Na = (function () { | |
| function a() { | |
| this.map = new Map(); | |
| this.id = -9007199254740991; | |
| } | |
| a.prototype.addRequest = function (a) { | |
| var b = this, | |
| c = this.id; | |
| this.id++; | |
| this.map.set(c, a); | |
| a.getPromise().then( | |
| function () { | |
| return b.map.delete(c); | |
| }, | |
| function () { | |
| return b.map.delete(c); | |
| } | |
| ); | |
| }; | |
| a.prototype.clear = function () { | |
| this.map.forEach(function (a) { | |
| a && a.cancel(!0); | |
| }); | |
| this.map.clear(); | |
| }; | |
| return a; | |
| })(), | |
| xd = (function () { | |
| function a(b, c, e, g, d, l) { | |
| this.bucket_ = null; | |
| this.deleted_ = !1; | |
| this.app_ = b; | |
| null !== this.app_ && | |
| ((b = this.app_.options), | |
| null != b && (this.bucket_ = a.extractBucket_(b))); | |
| this.authProvider_ = c; | |
| this.storageRefMaker_ = e; | |
| this.requestMaker_ = g; | |
| this.pool_ = l; | |
| this.service_ = d; | |
| this.maxOperationRetryTime_ = 12e4; | |
| this.maxUploadRetryTime_ = 6e5; | |
| this.requestMap_ = new Na(); | |
| } | |
| a.extractBucket_ = function (a) { | |
| a = a.storageBucket || null; | |
| return null == a ? null : cb.makeFromBucketSpec(a).bucket; | |
| }; | |
| a.prototype.getAuthToken = function () { | |
| var a = this.authProvider_.getImmediate({ optional: !0 }); | |
| return a | |
| ? a.getToken().then( | |
| function (a) { | |
| return null !== a ? a.accessToken : null; | |
| }, | |
| function () { | |
| return null; | |
| } | |
| ) | |
| : Promise.resolve(null); | |
| }; | |
| a.prototype.bucket = function () { | |
| if (this.deleted_) throw u(); | |
| return this.bucket_; | |
| }; | |
| a.prototype.service = function () { | |
| return this.service_; | |
| }; | |
| a.prototype.makeStorageReference = function (a) { | |
| return this.storageRefMaker_(this, a); | |
| }; | |
| a.prototype.makeRequest = function (a, b) { | |
| if (this.deleted_) return new Ea(u()); | |
| a = this.requestMaker_(a, b, this.pool_); | |
| this.requestMap_.addRequest(a); | |
| return a; | |
| }; | |
| a.prototype.deleteApp = function () { | |
| this.deleted_ = !0; | |
| this.app_ = null; | |
| this.requestMap_.clear(); | |
| }; | |
| a.prototype.maxUploadRetryTime = function () { | |
| return this.maxUploadRetryTime_; | |
| }; | |
| a.prototype.setMaxUploadRetryTime = function (a) { | |
| this.maxUploadRetryTime_ = a; | |
| }; | |
| a.prototype.maxOperationRetryTime = function () { | |
| return this.maxOperationRetryTime_; | |
| }; | |
| a.prototype.setMaxOperationRetryTime = function (a) { | |
| this.maxOperationRetryTime_ = a; | |
| }; | |
| return a; | |
| })(), | |
| vb = (function () { | |
| function a(a, b, c, e, g, d, l, h, k, n, v) { | |
| var f = this; | |
| this.reject_ = this.resolve_ = this.backoffId_ = this.pendingXhr_ = null; | |
| this.appDelete_ = this.canceled_ = !1; | |
| this.url_ = a; | |
| this.method_ = b; | |
| this.headers_ = c; | |
| this.body_ = e; | |
| this.successCodes_ = g.slice(); | |
| this.additionalRetryCodes_ = d.slice(); | |
| this.callback_ = l; | |
| this.errorCallback_ = h; | |
| this.progressCallback_ = n; | |
| this.timeout_ = k; | |
| this.pool_ = v; | |
| this.promise_ = new Promise(function (a, b) { | |
| f.resolve_ = a; | |
| f.reject_ = b; | |
| f.start_(); | |
| }); | |
| } | |
| a.prototype.start_ = function () { | |
| function a(a, b) { | |
| function c(a) { | |
| var b = a.loaded; | |
| a = a.lengthComputable ? a.total : -1; | |
| null !== e.progressCallback_ && e.progressCallback_(b, a); | |
| } | |
| b | |
| ? a(!1, new Zb(!1, null, !0)) | |
| : ((b = e.pool_.createXhrIo()), | |
| (e.pendingXhr_ = b), | |
| null !== e.progressCallback_ && b.addUploadProgressListener(c), | |
| b.send(e.url_, e.method_, e.body_, e.headers_).then(function (b) { | |
| null !== e.progressCallback_ && | |
| b.removeUploadProgressListener(c); | |
| e.pendingXhr_ = null; | |
| var g = b.getErrorCode() === ma.NO_ERROR, | |
| d = b.getStatus(); | |
| !g || e.isRetryStatusCode_(d) | |
| ? ((b = b.getErrorCode() === ma.ABORT), | |
| a(!1, new Zb(!1, null, b))) | |
| : ((g = -1 !== e.successCodes_.indexOf(d)), | |
| a(!0, new Zb(g, b))); | |
| })); | |
| } | |
| function c(a, c) { | |
| var g = e.resolve_; | |
| a = e.reject_; | |
| var d = c.xhr; | |
| if (c.wasSuccessCode) | |
| try { | |
| var l = e.callback_(d, d.getResponseText()); | |
| w(l) ? g(l) : g(); | |
| } catch (dc) { | |
| a(dc); | |
| } | |
| else | |
| null !== d | |
| ? ((c = b()), | |
| c.setServerResponseProp(d.getResponseText()), | |
| e.errorCallback_ ? a(e.errorCallback_(d, c)) : a(c)) | |
| : ((c = c.canceled | |
| ? e.appDelete_ | |
| ? u() | |
| : t() | |
| : new ha( | |
| ya.RETRY_LIMIT_EXCEEDED, | |
| "Max retry time for operation exceeded, please try again." | |
| )), | |
| a(c)); | |
| } | |
| var e = this; | |
| this.canceled_ | |
| ? c(!1, new Zb(!1, null, !0)) | |
| : (this.backoffId_ = bb(a, c, this.timeout_)); | |
| }; | |
| a.prototype.getPromise = function () { | |
| return this.promise_; | |
| }; | |
| a.prototype.cancel = function (a) { | |
| this.canceled_ = !0; | |
| this.appDelete_ = a || !1; | |
| null !== this.backoffId_ && (0, this.backoffId_)(!1); | |
| null !== this.pendingXhr_ && this.pendingXhr_.abort(); | |
| }; | |
| a.prototype.isRetryStatusCode_ = function (a) { | |
| var b = 500 <= a && 600 > a, | |
| c = -1 !== [408, 429].indexOf(a); | |
| a = -1 !== this.additionalRetryCodes_.indexOf(a); | |
| return b || c || a; | |
| }; | |
| return a; | |
| })(), | |
| Zb = (function () { | |
| return function (a, b, c) { | |
| this.wasSuccessCode = a; | |
| this.xhr = b; | |
| this.canceled = !!c; | |
| }; | |
| })(), | |
| Lc = (function () { | |
| function a(a, b, c, e) { | |
| this.bucket_ = null; | |
| this.authWrapper_ = new xd( | |
| a, | |
| b, | |
| function (a, b) { | |
| return new Yb(a, b); | |
| }, | |
| aa, | |
| this, | |
| c | |
| ); | |
| this.app_ = a; | |
| null != e | |
| ? (this.bucket_ = cb.makeFromBucketSpec(e)) | |
| : ((a = this.authWrapper_.bucket()), | |
| null != a && (this.bucket_ = new cb(a, ""))); | |
| this.internals_ = new nb(this); | |
| } | |
| a.prototype.ref = function (a) { | |
| qa( | |
| "ref", | |
| [ | |
| za(function (a) { | |
| if ("string" !== typeof a) throw "Path is not a string."; | |
| if (/^[A-Za-z]+:\/\//.test(a)) | |
| throw "Expected child path but got a URL, use refFromURL instead."; | |
| }, !0), | |
| ], | |
| arguments | |
| ); | |
| if (null == this.bucket_) | |
| throw Error("No Storage Bucket defined in Firebase Options."); | |
| var b = new Yb(this.authWrapper_, this.bucket_); | |
| return null != a ? b.child(a) : b; | |
| }; | |
| a.prototype.refFromURL = function (a) { | |
| qa( | |
| "refFromURL", | |
| [ | |
| za(function (a) { | |
| if ("string" !== typeof a) throw "Path is not a string."; | |
| if (!/^[A-Za-z]+:\/\//.test(a)) | |
| throw "Expected full URL but got a child path, use ref instead."; | |
| try { | |
| cb.makeFromUrl(a); | |
| } catch (kc) { | |
| throw "Expected valid full URL but got an invalid one."; | |
| } | |
| }, !1), | |
| ], | |
| arguments | |
| ); | |
| return new Yb(this.authWrapper_, a); | |
| }; | |
| Object.defineProperty(a.prototype, "maxUploadRetryTime", { | |
| get: function () { | |
| return this.authWrapper_.maxUploadRetryTime(); | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| a.prototype.setMaxUploadRetryTime = function (a) { | |
| qa("setMaxUploadRetryTime", [pa()], arguments); | |
| this.authWrapper_.setMaxUploadRetryTime(a); | |
| }; | |
| a.prototype.setMaxOperationRetryTime = function (a) { | |
| qa("setMaxOperationRetryTime", [pa()], arguments); | |
| this.authWrapper_.setMaxOperationRetryTime(a); | |
| }; | |
| Object.defineProperty(a.prototype, "app", { | |
| get: function () { | |
| return this.app_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| Object.defineProperty(a.prototype, "INTERNAL", { | |
| get: function () { | |
| return this.internals_; | |
| }, | |
| enumerable: !0, | |
| configurable: !0, | |
| }); | |
| return a; | |
| })(), | |
| nb = (function () { | |
| function a(a) { | |
| this.service_ = a; | |
| } | |
| a.prototype.delete = function () { | |
| this.service_.authWrapper_.deleteApp(); | |
| return Promise.resolve(); | |
| }; | |
| return a; | |
| })(); | |
| va(la); | |
| d.registerStorage = va; | |
| }; | |
| shadow$provide[34] = function (m, f, r, d) { | |
| f(33); | |
| }; | |
| shadow$provide[35] = function (m, f, r, d) { | |
| (function (b) { | |
| "object" === typeof d && "undefined" !== typeof r | |
| ? (r.exports = b()) | |
| : "function" === typeof define && define.amd | |
| ? define([], b) | |
| : (("undefined" !== typeof window | |
| ? window | |
| : "undefined" !== typeof m | |
| ? m | |
| : "undefined" !== typeof self | |
| ? self | |
| : this | |
| ).localforage = b()); | |
| })(function () { | |
| return (function u(d, q, h) { | |
| function a(c, e) { | |
| if (!q[c]) { | |
| if (!d[c]) { | |
| var l = "function" == typeof f && f; | |
| if (!e && l) return l(c, !0); | |
| if (k) return k(c, !0); | |
| e = Error("Cannot find module '" + c + "'"); | |
| throw ((e.code = "MODULE_NOT_FOUND"), e); | |
| } | |
| e = q[c] = { exports: {} }; | |
| d[c][0].call( | |
| e.exports, | |
| function (e) { | |
| var g = d[c][1][e]; | |
| return a(g ? g : e); | |
| }, | |
| e, | |
| e.exports, | |
| u, | |
| d, | |
| q, | |
| h | |
| ); | |
| } | |
| return q[c].exports; | |
| } | |
| for (var k = "function" == typeof f && f, n = 0; n < h.length; n++) | |
| a(h[n]); | |
| return a; | |
| })( | |
| { | |
| 1: [ | |
| function (d, f, h) { | |
| (function (d) { | |
| function a() { | |
| g = !0; | |
| for (var a, c, e = w.length; e; ) { | |
| c = w; | |
| w = []; | |
| for (a = -1; ++a < e; ) c[a](); | |
| e = w.length; | |
| } | |
| g = !1; | |
| } | |
| var h = d.MutationObserver || d.WebKitMutationObserver; | |
| if (h) { | |
| var n = 0; | |
| h = new h(a); | |
| var c = d.document.createTextNode(""); | |
| h.observe(c, { characterData: !0 }); | |
| var e = function () { | |
| c.data = n = ++n % 2; | |
| }; | |
| } else if ( | |
| d.setImmediate || | |
| "undefined" === typeof d.MessageChannel | |
| ) | |
| e = | |
| "document" in d && | |
| "onreadystatechange" in d.document.createElement("script") | |
| ? function () { | |
| var c = d.document.createElement("script"); | |
| c.onreadystatechange = function () { | |
| a(); | |
| c.onreadystatechange = null; | |
| c.parentNode.removeChild(c); | |
| c = null; | |
| }; | |
| d.document.documentElement.appendChild(c); | |
| } | |
| : function () { | |
| setTimeout(a, 0); | |
| }; | |
| else { | |
| var l = new d.MessageChannel(); | |
| l.port1.onmessage = a; | |
| e = function () { | |
| l.port2.postMessage(0); | |
| }; | |
| } | |
| var g, | |
| w = []; | |
| f.exports = function (a) { | |
| 1 !== w.push(a) || g || e(); | |
| }; | |
| }.call( | |
| this, | |
| "undefined" !== typeof m | |
| ? m | |
| : "undefined" !== typeof self | |
| ? self | |
| : "undefined" !== typeof window | |
| ? window | |
| : {} | |
| )); | |
| }, | |
| {}, | |
| ], | |
| 2: [ | |
| function (d, f, h) { | |
| function q() {} | |
| function a(a) { | |
| if ("function" !== typeof a) | |
| throw new TypeError("resolver must be a function"); | |
| this.state = v; | |
| this.queue = []; | |
| this.outcome = void 0; | |
| a !== q && e(this, a); | |
| } | |
| function k(a, c, e) { | |
| this.promise = a; | |
| "function" === typeof c && | |
| ((this.onFulfilled = c), | |
| (this.callFulfilled = this.otherCallFulfilled)); | |
| "function" === typeof e && | |
| ((this.onRejected = e), | |
| (this.callRejected = this.otherCallRejected)); | |
| } | |
| function n(a, c, e) { | |
| g(function () { | |
| try { | |
| var g = c(e); | |
| } catch (G) { | |
| return w.reject(a, G); | |
| } | |
| g === a | |
| ? w.reject( | |
| a, | |
| new TypeError("Cannot resolve promise with itself") | |
| ) | |
| : w.resolve(a, g); | |
| }); | |
| } | |
| function c(a) { | |
| var c = a && a.then; | |
| if ( | |
| a && | |
| ("object" === typeof a || "function" === typeof a) && | |
| "function" === typeof c | |
| ) | |
| return function () { | |
| c.apply(a, arguments); | |
| }; | |
| } | |
| function e(a, c) { | |
| function e(c) { | |
| d || ((d = !0), w.reject(a, c)); | |
| } | |
| function g(c) { | |
| d || ((d = !0), w.resolve(a, c)); | |
| } | |
| var d = !1, | |
| h = l(function () { | |
| c(g, e); | |
| }); | |
| "error" === h.status && e(h.value); | |
| } | |
| function l(a, c) { | |
| var e = {}; | |
| try { | |
| (e.value = a(c)), (e.status = "success"); | |
| } catch (E) { | |
| (e.status = "error"), (e.value = E); | |
| } | |
| return e; | |
| } | |
| var g = d(1), | |
| w = {}, | |
| y = ["REJECTED"], | |
| x = ["FULFILLED"], | |
| v = ["PENDING"]; | |
| f.exports = a; | |
| a.prototype["catch"] = function (a) { | |
| return this.then(null, a); | |
| }; | |
| a.prototype.then = function (a, c) { | |
| if ( | |
| ("function" !== typeof a && this.state === x) || | |
| ("function" !== typeof c && this.state === y) | |
| ) | |
| return this; | |
| var e = new this.constructor(q); | |
| this.state !== v | |
| ? n(e, this.state === x ? a : c, this.outcome) | |
| : this.queue.push(new k(e, a, c)); | |
| return e; | |
| }; | |
| k.prototype.callFulfilled = function (a) { | |
| w.resolve(this.promise, a); | |
| }; | |
| k.prototype.otherCallFulfilled = function (a) { | |
| n(this.promise, this.onFulfilled, a); | |
| }; | |
| k.prototype.callRejected = function (a) { | |
| w.reject(this.promise, a); | |
| }; | |
| k.prototype.otherCallRejected = function (a) { | |
| n(this.promise, this.onRejected, a); | |
| }; | |
| w.resolve = function (a, g) { | |
| var d = l(c, g); | |
| if ("error" === d.status) return w.reject(a, d.value); | |
| if ((d = d.value)) e(a, d); | |
| else { | |
| a.state = x; | |
| a.outcome = g; | |
| d = -1; | |
| for (var h = a.queue.length; ++d < h; ) | |
| a.queue[d].callFulfilled(g); | |
| } | |
| return a; | |
| }; | |
| w.reject = function (a, c) { | |
| a.state = y; | |
| a.outcome = c; | |
| for (var e = -1, g = a.queue.length; ++e < g; ) | |
| a.queue[e].callRejected(c); | |
| return a; | |
| }; | |
| a.resolve = function (a) { | |
| return a instanceof this ? a : w.resolve(new this(q), a); | |
| }; | |
| a.reject = function (a) { | |
| var c = new this(q); | |
| return w.reject(c, a); | |
| }; | |
| a.all = function (a) { | |
| function c(a, c) { | |
| e.resolve(a).then( | |
| function (a) { | |
| l[c] = a; | |
| ++h !== g || d || ((d = !0), w.resolve(n, l)); | |
| }, | |
| function (a) { | |
| d || ((d = !0), w.reject(n, a)); | |
| } | |
| ); | |
| } | |
| var e = this; | |
| if ("[object Array]" !== Object.prototype.toString.call(a)) | |
| return this.reject(new TypeError("must be an array")); | |
| var g = a.length, | |
| d = !1; | |
| if (!g) return this.resolve([]); | |
| for (var l = Array(g), h = 0, k = -1, n = new this(q); ++k < g; ) | |
| c(a[k], k); | |
| return n; | |
| }; | |
| a.race = function (a) { | |
| function c(a) { | |
| e.resolve(a).then( | |
| function (a) { | |
| d || ((d = !0), w.resolve(h, a)); | |
| }, | |
| function (a) { | |
| d || ((d = !0), w.reject(h, a)); | |
| } | |
| ); | |
| } | |
| var e = this; | |
| if ("[object Array]" !== Object.prototype.toString.call(a)) | |
| return this.reject(new TypeError("must be an array")); | |
| var g = a.length, | |
| d = !1; | |
| if (!g) return this.resolve([]); | |
| for (var l = -1, h = new this(q); ++l < g; ) c(a[l]); | |
| return h; | |
| }; | |
| }, | |
| { 1: 1 }, | |
| ], | |
| 3: [ | |
| function (d, f, h) { | |
| f = | |
| "undefined" !== typeof m | |
| ? m | |
| : "undefined" !== typeof self | |
| ? self | |
| : "undefined" !== typeof window | |
| ? window | |
| : {}; | |
| "function" !== typeof f.Promise && (f.Promise = d(2)); | |
| }, | |
| { 2: 2 }, | |
| ], | |
| 4: [ | |
| function (d, f, h) { | |
| function q(a, c) { | |
| a = a || []; | |
| c = c || {}; | |
| try { | |
| return new Blob(a, c); | |
| } catch (Ka) { | |
| if ("TypeError" !== Ka.name) throw Ka; | |
| for ( | |
| var e = new ("undefined" !== typeof BlobBuilder | |
| ? BlobBuilder | |
| : "undefined" !== typeof MSBlobBuilder | |
| ? MSBlobBuilder | |
| : "undefined" !== typeof MozBlobBuilder | |
| ? MozBlobBuilder | |
| : WebKitBlobBuilder)(), | |
| g = 0; | |
| g < a.length; | |
| g += 1 | |
| ) | |
| e.append(a[g]); | |
| return e.getBlob(c.type); | |
| } | |
| } | |
| function a(a, c) { | |
| c && | |
| a.then( | |
| function (a) { | |
| c(null, a); | |
| }, | |
| function (a) { | |
| c(a); | |
| } | |
| ); | |
| } | |
| function k(a, c, e) { | |
| "function" === typeof c && a.then(c); | |
| if ("function" === typeof e) a["catch"](e); | |
| } | |
| function n(a) { | |
| "string" !== typeof a && | |
| (console.warn(a + " used as a key, but it is not a string."), | |
| (a = String(a))); | |
| return a; | |
| } | |
| function c() { | |
| if ( | |
| arguments.length && | |
| "function" === typeof arguments[arguments.length - 1] | |
| ) | |
| return arguments[arguments.length - 1]; | |
| } | |
| function e(a) { | |
| return new B(function (c) { | |
| var e = a.transaction( | |
| "local-forage-detect-blob-support", | |
| "readwrite" | |
| ), | |
| g = q([""]); | |
| e.objectStore("local-forage-detect-blob-support").put(g, "key"); | |
| e.onabort = function (a) { | |
| a.preventDefault(); | |
| a.stopPropagation(); | |
| c(!1); | |
| }; | |
| e.oncomplete = function () { | |
| var a = navigator.userAgent.match(/Chrome\/(\d+)/), | |
| e = navigator.userAgent.match(/Edge\//); | |
| c(e || !a || 43 <= parseInt(a[1], 10)); | |
| }; | |
| })["catch"](function () { | |
| return !1; | |
| }); | |
| } | |
| function l(a) { | |
| return "boolean" === typeof V | |
| ? B.resolve(V) | |
| : e(a).then(function (a) { | |
| return (V = a); | |
| }); | |
| } | |
| function g(a) { | |
| a = U[a.name]; | |
| var c = {}; | |
| c.promise = new B(function (a, e) { | |
| c.resolve = a; | |
| c.reject = e; | |
| }); | |
| a.deferredOperations.push(c); | |
| a.dbReady = a.dbReady | |
| ? a.dbReady.then(function () { | |
| return c.promise; | |
| }) | |
| : c.promise; | |
| } | |
| function w(a) { | |
| if ((a = U[a.name].deferredOperations.pop())) | |
| return a.resolve(), a.promise; | |
| } | |
| function y(a, c) { | |
| if ((a = U[a.name].deferredOperations.pop())) | |
| return a.reject(c), a.promise; | |
| } | |
| function x(a, c) { | |
| return new B(function (e, d) { | |
| U[a.name] = U[a.name] || m(); | |
| if (a.db) | |
| if (c) g(a), a.db.close(); | |
| else return e(a.db); | |
| var l = [a.name]; | |
| c && l.push(a.version); | |
| var h = N.open.apply(N, l); | |
| c && | |
| (h.onupgradeneeded = function (c) { | |
| var e = h.result; | |
| try { | |
| e.createObjectStore(a.storeName), | |
| 1 >= c.oldVersion && | |
| e.createObjectStore( | |
| "local-forage-detect-blob-support" | |
| ); | |
| } catch (X) { | |
| if ("ConstraintError" === X.name) | |
| console.warn( | |
| 'The database "' + | |
| a.name + | |
| '" has been upgraded from version ' + | |
| c.oldVersion + | |
| " to version " + | |
| c.newVersion + | |
| ', but the storage "' + | |
| a.storeName + | |
| '" already exists.' | |
| ); | |
| else throw X; | |
| } | |
| }); | |
| h.onerror = function (a) { | |
| a.preventDefault(); | |
| d(h.error); | |
| }; | |
| h.onsuccess = function () { | |
| e(h.result); | |
| w(a); | |
| }; | |
| }); | |
| } | |
| function v(a, c) { | |
| if (!a.db) return !0; | |
| var e = !a.db.objectStoreNames.contains(a.storeName), | |
| g = a.version > a.db.version; | |
| a.version < a.db.version && | |
| (a.version !== c && | |
| console.warn( | |
| 'The database "' + | |
| a.name + | |
| "\" can't be downgraded from version " + | |
| a.db.version + | |
| " to version " + | |
| a.version + | |
| "." | |
| ), | |
| (a.version = a.db.version)); | |
| return g || e | |
| ? (e && | |
| ((c = a.db.version + 1), c > a.version && (a.version = c)), | |
| !0) | |
| : !1; | |
| } | |
| function t(a) { | |
| return new B(function (c, e) { | |
| var g = new FileReader(); | |
| g.onerror = e; | |
| g.onloadend = function (e) { | |
| e = btoa(e.target.result || ""); | |
| c({ __local_forage_encoded_blob: !0, data: e, type: a.type }); | |
| }; | |
| g.readAsBinaryString(a); | |
| }); | |
| } | |
| function H(a) { | |
| for ( | |
| var c = atob(a.data), | |
| e = c.length, | |
| g = new ArrayBuffer(e), | |
| d = new Uint8Array(g), | |
| l = 0; | |
| l < e; | |
| l++ | |
| ) | |
| d[l] = c.charCodeAt(l); | |
| return q([g], { type: a.type }); | |
| } | |
| function C(a) { | |
| var c = this, | |
| e = c._initReady().then(function () { | |
| var a = U[c._dbInfo.name]; | |
| if (a && a.dbReady) return a.dbReady; | |
| }); | |
| k(e, a, a); | |
| return e; | |
| } | |
| function E(a) { | |
| g(a); | |
| for (var c = U[a.name], e = c.forages, d = 0; d < e.length; d++) { | |
| var l = e[d]; | |
| l._dbInfo.db && (l._dbInfo.db.close(), (l._dbInfo.db = null)); | |
| } | |
| a.db = null; | |
| return x(a, !1) | |
| .then(function (c) { | |
| a.db = c; | |
| return v(a) ? x(a, !0) : c; | |
| }) | |
| .then(function (g) { | |
| a.db = c.db = g; | |
| for (var d = 0; d < e.length; d++) e[d]._dbInfo.db = g; | |
| }) | |
| ["catch"](function (c) { | |
| y(a, c); | |
| throw c; | |
| }); | |
| } | |
| function G(a, c, e, g) { | |
| void 0 === g && (g = 1); | |
| try { | |
| var d = a.db.transaction(a.storeName, c); | |
| e(null, d); | |
| } catch (Ia) { | |
| if ( | |
| 0 < g && | |
| (!a.db || | |
| "InvalidStateError" === Ia.name || | |
| "NotFoundError" === Ia.name) | |
| ) | |
| return B.resolve() | |
| .then(function () { | |
| if ( | |
| !a.db || | |
| ("NotFoundError" === Ia.name && | |
| !a.db.objectStoreNames.contains(a.storeName) && | |
| a.version <= a.db.version) | |
| ) | |
| return a.db && (a.version = a.db.version + 1), x(a, !0); | |
| }) | |
| .then(function () { | |
| return E(a).then(function () { | |
| G(a, c, e, g - 1); | |
| }); | |
| }) | |
| ["catch"](e); | |
| e(Ia); | |
| } | |
| } | |
| function m() { | |
| return { | |
| forages: [], | |
| db: null, | |
| dbReady: null, | |
| deferredOperations: [], | |
| }; | |
| } | |
| function A(a) { | |
| var c = 0.75 * a.length, | |
| e = a.length, | |
| g = 0; | |
| "\x3d" === a[a.length - 1] && | |
| (c--, "\x3d" === a[a.length - 2] && c--); | |
| var d = new ArrayBuffer(c), | |
| l = new Uint8Array(d); | |
| for (c = 0; c < e; c += 4) { | |
| var h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf( | |
| a[c] | |
| ); | |
| var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf( | |
| a[c + 1] | |
| ); | |
| var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf( | |
| a[c + 2] | |
| ); | |
| var v = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf( | |
| a[c + 3] | |
| ); | |
| l[g++] = (h << 2) | (k >> 4); | |
| l[g++] = ((k & 15) << 4) | (n >> 2); | |
| l[g++] = ((n & 3) << 6) | (v & 63); | |
| } | |
| return d; | |
| } | |
| function z(a) { | |
| a = new Uint8Array(a); | |
| var c = "", | |
| e; | |
| for (e = 0; e < a.length; e += 3) | |
| (c += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[ | |
| a[e] >> 2 | |
| ]), | |
| (c += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[ | |
| ((a[e] & 3) << 4) | (a[e + 1] >> 4) | |
| ]), | |
| (c += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[ | |
| ((a[e + 1] & 15) << 2) | (a[e + 2] >> 6) | |
| ]), | |
| (c += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[ | |
| a[e + 2] & 63 | |
| ]); | |
| 2 === a.length % 3 | |
| ? (c = c.substring(0, c.length - 1) + "\x3d") | |
| : 1 === a.length % 3 && | |
| (c = c.substring(0, c.length - 2) + "\x3d\x3d"); | |
| return c; | |
| } | |
| function r(a, c, e, g) { | |
| a.executeSql( | |
| "CREATE TABLE IF NOT EXISTS " + | |
| c.storeName + | |
| " (id INTEGER PRIMARY KEY, key unique, value)", | |
| [], | |
| e, | |
| g | |
| ); | |
| } | |
| function D(a, c, e, g, d, l) { | |
| a.executeSql( | |
| e, | |
| g, | |
| d, | |
| function (a, h) { | |
| h.code === h.SYNTAX_ERR | |
| ? a.executeSql( | |
| "SELECT name FROM sqlite_master WHERE type\x3d'table' AND name \x3d ?", | |
| [c.storeName], | |
| function (a, k) { | |
| k.rows.length | |
| ? l(a, h) | |
| : r( | |
| a, | |
| c, | |
| function () { | |
| a.executeSql(e, g, d, l); | |
| }, | |
| l | |
| ); | |
| }, | |
| l | |
| ) | |
| : l(a, h); | |
| }, | |
| l | |
| ); | |
| } | |
| function Q(c, e, g, d) { | |
| var l = this; | |
| c = n(c); | |
| var h = new B(function (a, h) { | |
| l.ready() | |
| .then(function () { | |
| void 0 === e && (e = null); | |
| var k = e, | |
| n = l._dbInfo; | |
| n.serializer.serialize(e, function (e, v) { | |
| v | |
| ? h(v) | |
| : n.db.transaction( | |
| function (g) { | |
| D( | |
| g, | |
| n, | |
| "INSERT OR REPLACE INTO " + | |
| n.storeName + | |
| " (key, value) VALUES (?, ?)", | |
| [c, e], | |
| function () { | |
| a(k); | |
| }, | |
| function (a, c) { | |
| h(c); | |
| } | |
| ); | |
| }, | |
| function (e) { | |
| e.code === e.QUOTA_ERR && | |
| (0 < d | |
| ? a(Q.apply(l, [c, k, g, d - 1])) | |
| : h(e)); | |
| } | |
| ); | |
| }); | |
| }) | |
| ["catch"](h); | |
| }); | |
| a(h, g); | |
| return h; | |
| } | |
| function M(a) { | |
| return new B(function (c, e) { | |
| a.transaction( | |
| function (g) { | |
| g.executeSql( | |
| "SELECT name FROM sqlite_master WHERE type\x3d'table' AND name \x3c\x3e '__WebKitDatabaseInfoTable__'", | |
| [], | |
| function (e, g) { | |
| e = []; | |
| for (var d = 0; d < g.rows.length; d++) | |
| e.push(g.rows.item(d).name); | |
| c({ db: a, storeNames: e }); | |
| }, | |
| function (a, c) { | |
| e(c); | |
| } | |
| ); | |
| }, | |
| function (a) { | |
| e(a); | |
| } | |
| ); | |
| }); | |
| } | |
| function F(a, c) { | |
| var e = a.name + "/"; | |
| a.storeName !== c.storeName && (e += a.storeName + "/"); | |
| return e; | |
| } | |
| function P(a, c) { | |
| a[c] = function () { | |
| var e = arguments; | |
| return a.ready().then(function () { | |
| return a[c].apply(a, e); | |
| }); | |
| }; | |
| } | |
| function J() { | |
| for (var a = 1; a < arguments.length; a++) { | |
| var c = arguments[a]; | |
| if (c) | |
| for (var e in c) | |
| c.hasOwnProperty(e) && | |
| (Ga(c[e]) | |
| ? (arguments[0][e] = c[e].slice()) | |
| : (arguments[0][e] = c[e])); | |
| } | |
| return arguments[0]; | |
| } | |
| var L = | |
| "function" === typeof Symbol && | |
| "symbol" === typeof Symbol.iterator | |
| ? function (a) { | |
| return typeof a; | |
| } | |
| : function (a) { | |
| return a && | |
| "function" === typeof Symbol && | |
| a.constructor === Symbol && | |
| a !== Symbol.prototype | |
| ? "symbol" | |
| : typeof a; | |
| }, | |
| N = (function () { | |
| if ("undefined" !== typeof indexedDB) return indexedDB; | |
| if ("undefined" !== typeof webkitIndexedDB) | |
| return webkitIndexedDB; | |
| if ("undefined" !== typeof mozIndexedDB) return mozIndexedDB; | |
| if ("undefined" !== typeof OIndexedDB) return OIndexedDB; | |
| if ("undefined" !== typeof msIndexedDB) return msIndexedDB; | |
| })(); | |
| "undefined" === typeof Promise && d(3); | |
| var B = Promise, | |
| V = void 0, | |
| U = {}, | |
| Y = Object.prototype.toString; | |
| d = { | |
| _driver: "asyncStorage", | |
| _initStorage: function (a) { | |
| function c() { | |
| return B.resolve(); | |
| } | |
| var e = this, | |
| g = { db: null }; | |
| if (a) for (var d in a) g[d] = a[d]; | |
| var l = U[g.name]; | |
| l || ((l = m()), (U[g.name] = l)); | |
| l.forages.push(e); | |
| e._initReady || ((e._initReady = e.ready), (e.ready = C)); | |
| a = []; | |
| for (d = 0; d < l.forages.length; d++) { | |
| var h = l.forages[d]; | |
| h !== e && a.push(h._initReady()["catch"](c)); | |
| } | |
| var k = l.forages.slice(0); | |
| return B.all(a) | |
| .then(function () { | |
| g.db = l.db; | |
| return x(g, !1); | |
| }) | |
| .then(function (a) { | |
| g.db = a; | |
| return v(g, e._defaultConfig.version) ? x(g, !0) : a; | |
| }) | |
| .then(function (a) { | |
| g.db = l.db = a; | |
| e._dbInfo = g; | |
| for (a = 0; a < k.length; a++) { | |
| var c = k[a]; | |
| c !== e && | |
| ((c._dbInfo.db = g.db), | |
| (c._dbInfo.version = g.version)); | |
| } | |
| }); | |
| }, | |
| _support: (function () { | |
| try { | |
| if (!N) return !1; | |
| var a = | |
| "undefined" !== typeof openDatabase && | |
| /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && | |
| !/Chrome/.test(navigator.userAgent) && | |
| !/BlackBerry/.test(navigator.platform), | |
| c = | |
| "function" === typeof fetch && | |
| -1 !== fetch.toString().indexOf("[native code"); | |
| return ( | |
| (!a || c) && | |
| "undefined" !== typeof indexedDB && | |
| "undefined" !== typeof IDBKeyRange | |
| ); | |
| } catch (pa) { | |
| return !1; | |
| } | |
| })(), | |
| iterate: function (c, e) { | |
| var g = this, | |
| d = new B(function (a, e) { | |
| g.ready() | |
| .then(function () { | |
| G(g._dbInfo, "readonly", function (d, l) { | |
| if (d) return e(d); | |
| try { | |
| var h = l | |
| .objectStore(g._dbInfo.storeName) | |
| .openCursor(), | |
| k = 1; | |
| h.onsuccess = function () { | |
| var e = h.result; | |
| if (e) { | |
| var g = e.value; | |
| g && | |
| g.__local_forage_encoded_blob && | |
| (g = H(g)); | |
| g = c(g, e.key, k++); | |
| if (void 0 !== g) a(g); | |
| else e["continue"](); | |
| } else a(); | |
| }; | |
| h.onerror = function () { | |
| e(h.error); | |
| }; | |
| } catch (la) { | |
| e(la); | |
| } | |
| }); | |
| }) | |
| ["catch"](e); | |
| }); | |
| a(d, e); | |
| return d; | |
| }, | |
| getItem: function (c, e) { | |
| var g = this; | |
| c = n(c); | |
| var d = new B(function (a, e) { | |
| g.ready() | |
| .then(function () { | |
| G(g._dbInfo, "readonly", function (d, l) { | |
| if (d) return e(d); | |
| try { | |
| var h = l.objectStore(g._dbInfo.storeName).get(c); | |
| h.onsuccess = function () { | |
| var c = h.result; | |
| void 0 === c && (c = null); | |
| c && c.__local_forage_encoded_blob && (c = H(c)); | |
| a(c); | |
| }; | |
| h.onerror = function () { | |
| e(h.error); | |
| }; | |
| } catch (va) { | |
| e(va); | |
| } | |
| }); | |
| }) | |
| ["catch"](e); | |
| }); | |
| a(d, e); | |
| return d; | |
| }, | |
| setItem: function (c, e, g) { | |
| var d = this; | |
| c = n(c); | |
| var h = new B(function (a, g) { | |
| var h; | |
| d.ready() | |
| .then(function () { | |
| h = d._dbInfo; | |
| return "[object Blob]" === Y.call(e) | |
| ? l(h.db).then(function (a) { | |
| return a ? e : t(e); | |
| }) | |
| : e; | |
| }) | |
| .then(function (e) { | |
| G(d._dbInfo, "readwrite", function (l, h) { | |
| if (l) return g(l); | |
| try { | |
| var k = h.objectStore(d._dbInfo.storeName); | |
| null === e && (e = void 0); | |
| var n = k.put(e, c); | |
| h.oncomplete = function () { | |
| void 0 === e && (e = null); | |
| a(e); | |
| }; | |
| h.onabort = h.onerror = function () { | |
| g(n.error ? n.error : n.transaction.error); | |
| }; | |
| } catch (ha) { | |
| g(ha); | |
| } | |
| }); | |
| }) | |
| ["catch"](g); | |
| }); | |
| a(h, g); | |
| return h; | |
| }, | |
| removeItem: function (c, e) { | |
| var g = this; | |
| c = n(c); | |
| var d = new B(function (a, e) { | |
| g.ready() | |
| .then(function () { | |
| G(g._dbInfo, "readwrite", function (d, l) { | |
| if (d) return e(d); | |
| try { | |
| var h = l | |
| .objectStore(g._dbInfo.storeName) | |
| ["delete"](c); | |
| l.oncomplete = function () { | |
| a(); | |
| }; | |
| l.onerror = function () { | |
| e(h.error); | |
| }; | |
| l.onabort = function () { | |
| e(h.error ? h.error : h.transaction.error); | |
| }; | |
| } catch (va) { | |
| e(va); | |
| } | |
| }); | |
| }) | |
| ["catch"](e); | |
| }); | |
| a(d, e); | |
| return d; | |
| }, | |
| clear: function (c) { | |
| var e = this, | |
| g = new B(function (a, c) { | |
| e.ready() | |
| .then(function () { | |
| G(e._dbInfo, "readwrite", function (g, d) { | |
| if (g) return c(g); | |
| try { | |
| var l = d.objectStore(e._dbInfo.storeName).clear(); | |
| d.oncomplete = function () { | |
| a(); | |
| }; | |
| d.onabort = d.onerror = function () { | |
| c(l.error ? l.error : l.transaction.error); | |
| }; | |
| } catch (X) { | |
| c(X); | |
| } | |
| }); | |
| }) | |
| ["catch"](c); | |
| }); | |
| a(g, c); | |
| return g; | |
| }, | |
| length: function (c) { | |
| var e = this, | |
| g = new B(function (a, c) { | |
| e.ready() | |
| .then(function () { | |
| G(e._dbInfo, "readonly", function (g, d) { | |
| if (g) return c(g); | |
| try { | |
| var l = d.objectStore(e._dbInfo.storeName).count(); | |
| l.onsuccess = function () { | |
| a(l.result); | |
| }; | |
| l.onerror = function () { | |
| c(l.error); | |
| }; | |
| } catch (X) { | |
| c(X); | |
| } | |
| }); | |
| }) | |
| ["catch"](c); | |
| }); | |
| a(g, c); | |
| return g; | |
| }, | |
| key: function (c, e) { | |
| var g = this, | |
| d = new B(function (a, e) { | |
| if (0 > c) a(null); | |
| else | |
| g.ready() | |
| .then(function () { | |
| G(g._dbInfo, "readonly", function (d, l) { | |
| if (d) return e(d); | |
| try { | |
| var h = !1, | |
| k = l | |
| .objectStore(g._dbInfo.storeName) | |
| .openCursor(); | |
| k.onsuccess = function () { | |
| var e = k.result; | |
| e | |
| ? 0 === c | |
| ? a(e.key) | |
| : h | |
| ? a(e.key) | |
| : ((h = !0), e.advance(c)) | |
| : a(null); | |
| }; | |
| k.onerror = function () { | |
| e(k.error); | |
| }; | |
| } catch (la) { | |
| e(la); | |
| } | |
| }); | |
| }) | |
| ["catch"](e); | |
| }); | |
| a(d, e); | |
| return d; | |
| }, | |
| keys: function (c) { | |
| var e = this, | |
| g = new B(function (a, c) { | |
| e.ready() | |
| .then(function () { | |
| G(e._dbInfo, "readonly", function (g, d) { | |
| if (g) return c(g); | |
| try { | |
| var l = d | |
| .objectStore(e._dbInfo.storeName) | |
| .openCursor(), | |
| h = []; | |
| l.onsuccess = function () { | |
| var c = l.result; | |
| c ? (h.push(c.key), c["continue"]()) : a(h); | |
| }; | |
| l.onerror = function () { | |
| c(l.error); | |
| }; | |
| } catch (va) { | |
| c(va); | |
| } | |
| }); | |
| }) | |
| ["catch"](c); | |
| }); | |
| a(g, c); | |
| return g; | |
| }, | |
| dropInstance: function (e, d) { | |
| d = c.apply(this, arguments); | |
| var l = this.config(); | |
| e = ("function" !== typeof e && e) || {}; | |
| e.name || | |
| ((e.name = e.name || l.name), | |
| (e.storeName = e.storeName || l.storeName)); | |
| e.name | |
| ? ((l = | |
| e.name === l.name && this._dbInfo.db | |
| ? B.resolve(this._dbInfo.db) | |
| : x(e, !1).then(function (a) { | |
| var c = U[e.name], | |
| g = c.forages; | |
| c.db = a; | |
| for (c = 0; c < g.length; c++) g[c]._dbInfo.db = a; | |
| return a; | |
| })), | |
| (l = e.storeName | |
| ? l.then(function (a) { | |
| if (a.objectStoreNames.contains(e.storeName)) { | |
| var c = a.version + 1; | |
| g(e); | |
| var d = U[e.name], | |
| l = d.forages; | |
| a.close(); | |
| for (a = 0; a < l.length; a++) { | |
| var h = l[a]; | |
| h._dbInfo.db = null; | |
| h._dbInfo.version = c; | |
| } | |
| return new B(function (a, g) { | |
| var d = N.open(e.name, c); | |
| d.onerror = function (a) { | |
| d.result.close(); | |
| g(a); | |
| }; | |
| d.onupgradeneeded = function () { | |
| d.result.deleteObjectStore(e.storeName); | |
| }; | |
| d.onsuccess = function () { | |
| var c = d.result; | |
| c.close(); | |
| a(c); | |
| }; | |
| }) | |
| .then(function (a) { | |
| d.db = a; | |
| for (var c = 0; c < l.length; c++) { | |
| var e = l[c]; | |
| e._dbInfo.db = a; | |
| w(e._dbInfo); | |
| } | |
| }) | |
| ["catch"](function (a) { | |
| (y(e, a) || B.resolve())[ | |
| "catch" | |
| ](function () {}); | |
| throw a; | |
| }); | |
| } | |
| }) | |
| : l.then(function (a) { | |
| g(e); | |
| var c = U[e.name], | |
| d = c.forages; | |
| a.close(); | |
| for (a = 0; a < d.length; a++) d[a]._dbInfo.db = null; | |
| return new B(function (a, c) { | |
| var g = N.deleteDatabase(e.name); | |
| g.onerror = g.onblocked = function (a) { | |
| var e = g.result; | |
| e && e.close(); | |
| c(a); | |
| }; | |
| g.onsuccess = function () { | |
| var c = g.result; | |
| c && c.close(); | |
| a(c); | |
| }; | |
| }) | |
| .then(function (a) { | |
| c.db = a; | |
| for (a = 0; a < d.length; a++) w(d[a]._dbInfo); | |
| }) | |
| ["catch"](function (a) { | |
| (y(e, a) || B.resolve())["catch"](function () {}); | |
| throw a; | |
| }); | |
| }))) | |
| : (l = B.reject("Invalid arguments")); | |
| a(l, d); | |
| return l; | |
| }, | |
| }; | |
| var ca = /^~~local_forage_type~([^~]+)~/, | |
| ra = Object.prototype.toString, | |
| ia = { | |
| serialize: function (a, c) { | |
| var e = ""; | |
| a && (e = ra.call(a)); | |
| if ( | |
| a && | |
| ("[object ArrayBuffer]" === e || | |
| (a.buffer && | |
| "[object ArrayBuffer]" === ra.call(a.buffer))) | |
| ) { | |
| var g = "__lfsc__:"; | |
| if (a instanceof ArrayBuffer) { | |
| var d = a; | |
| g += "arbf"; | |
| } else | |
| (d = a.buffer), | |
| "[object Int8Array]" === e | |
| ? (g += "si08") | |
| : "[object Uint8Array]" === e | |
| ? (g += "ui08") | |
| : "[object Uint8ClampedArray]" === e | |
| ? (g += "uic8") | |
| : "[object Int16Array]" === e | |
| ? (g += "si16") | |
| : "[object Uint16Array]" === e | |
| ? (g += "ur16") | |
| : "[object Int32Array]" === e | |
| ? (g += "si32") | |
| : "[object Uint32Array]" === e | |
| ? (g += "ui32") | |
| : "[object Float32Array]" === e | |
| ? (g += "fl32") | |
| : "[object Float64Array]" === e | |
| ? (g += "fl64") | |
| : c(Error("Failed to get type for BinaryArray")); | |
| c(g + z(d)); | |
| } else if ("[object Blob]" === e) | |
| (e = new FileReader()), | |
| (e.onload = function () { | |
| var e = | |
| "~~local_forage_type~" + | |
| a.type + | |
| "~" + | |
| z(this.result); | |
| c("__lfsc__:blob" + e); | |
| }), | |
| e.readAsArrayBuffer(a); | |
| else | |
| try { | |
| c(JSON.stringify(a)); | |
| } catch (Ia) { | |
| console.error( | |
| "Couldn't convert value into a JSON string: ", | |
| a | |
| ), | |
| c(null, Ia); | |
| } | |
| }, | |
| deserialize: function (a) { | |
| if ("__lfsc__:" !== a.substring(0, 9)) return JSON.parse(a); | |
| var c = a.substring(13); | |
| a = a.substring(9, 13); | |
| if ("blob" === a && ca.test(c)) { | |
| var e = c.match(ca); | |
| var g = e[1]; | |
| c = c.substring(e[0].length); | |
| } | |
| c = A(c); | |
| switch (a) { | |
| case "arbf": | |
| return c; | |
| case "blob": | |
| return q([c], { type: g }); | |
| case "si08": | |
| return new Int8Array(c); | |
| case "ui08": | |
| return new Uint8Array(c); | |
| case "uic8": | |
| return new Uint8ClampedArray(c); | |
| case "si16": | |
| return new Int16Array(c); | |
| case "ur16": | |
| return new Uint16Array(c); | |
| case "si32": | |
| return new Int32Array(c); | |
| case "ui32": | |
| return new Uint32Array(c); | |
| case "fl32": | |
| return new Float32Array(c); | |
| case "fl64": | |
| return new Float64Array(c); | |
| default: | |
| throw Error("Unkown type: " + a); | |
| } | |
| }, | |
| stringToBuffer: A, | |
| bufferToString: z, | |
| }; | |
| h = { | |
| _driver: "webSQLStorage", | |
| _initStorage: function (a) { | |
| var c = this, | |
| e = { db: null }; | |
| if (a) | |
| for (var g in a) | |
| e[g] = "string" !== typeof a[g] ? a[g].toString() : a[g]; | |
| a = new B(function (a, g) { | |
| try { | |
| e.db = openDatabase( | |
| e.name, | |
| String(e.version), | |
| e.description, | |
| e.size | |
| ); | |
| } catch (bb) { | |
| return g(bb); | |
| } | |
| e.db.transaction(function (d) { | |
| r( | |
| d, | |
| e, | |
| function () { | |
| c._dbInfo = e; | |
| a(); | |
| }, | |
| function (a, c) { | |
| g(c); | |
| } | |
| ); | |
| }, g); | |
| }); | |
| e.serializer = ia; | |
| return a; | |
| }, | |
| _support: "function" === typeof openDatabase, | |
| iterate: function (c, e) { | |
| var g = this, | |
| d = new B(function (a, e) { | |
| g.ready() | |
| .then(function () { | |
| var d = g._dbInfo; | |
| d.db.transaction(function (g) { | |
| D( | |
| g, | |
| d, | |
| "SELECT * FROM " + d.storeName, | |
| [], | |
| function (e, g) { | |
| e = g.rows; | |
| g = e.length; | |
| for (var l = 0; l < g; l++) { | |
| var h = e.item(l), | |
| k = h.value; | |
| k && (k = d.serializer.deserialize(k)); | |
| k = c(k, h.key, l + 1); | |
| if (void 0 !== k) { | |
| a(k); | |
| return; | |
| } | |
| } | |
| a(); | |
| }, | |
| function (a, c) { | |
| e(c); | |
| } | |
| ); | |
| }); | |
| }) | |
| ["catch"](e); | |
| }); | |
| a(d, e); | |
| return d; | |
| }, | |
| getItem: function (c, e) { | |
| var g = this; | |
| c = n(c); | |
| var d = new B(function (a, e) { | |
| g.ready() | |
| .then(function () { | |
| var d = g._dbInfo; | |
| d.db.transaction(function (g) { | |
| D( | |
| g, | |
| d, | |
| "SELECT * FROM " + | |
| d.storeName + | |
| " WHERE key \x3d ? LIMIT 1", | |
| [c], | |
| function (c, e) { | |
| (c = e.rows.length ? e.rows.item(0).value : null) && | |
| (c = d.serializer.deserialize(c)); | |
| a(c); | |
| }, | |
| function (a, c) { | |
| e(c); | |
| } | |
| ); | |
| }); | |
| }) | |
| ["catch"](e); | |
| }); | |
| a(d, e); | |
| return d; | |
| }, | |
| setItem: function (a, c, e) { | |
| return Q.apply(this, [a, c, e, 1]); | |
| }, | |
| removeItem: function (c, e) { | |
| var g = this; | |
| c = n(c); | |
| var d = new B(function (a, e) { | |
| g.ready() | |
| .then(function () { | |
| var d = g._dbInfo; | |
| d.db.transaction(function (g) { | |
| D( | |
| g, | |
| d, | |
| "DELETE FROM " + d.storeName + " WHERE key \x3d ?", | |
| [c], | |
| function () { | |
| a(); | |
| }, | |
| function (a, c) { | |
| e(c); | |
| } | |
| ); | |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment