! function() { var e = { 724: function(e, t, n) { var r; e = n.nmd(e); var a = function(e) { "use strict"; var t = 1e7, n = 9007199254740992, r = f(n), i = "0123456789abcdefghijklmnopqrstuvwxyz", o = "function" == typeof BigInt; function l(e, t, n, r) { return void 0 === e ? l[0] : void 0 !== t && (10 != +t || n) ? z(e, t, n, r) : Y(e) } function u(e, t) { this.value = e, this.sign = t, this.isSmall = !1 } function c(e) { this.value = e, this.sign = e < 0, this.isSmall = !0 } function s(e) { this.value = e } function d(e) { return -n < e && e < n } function f(e) { return e < 1e7 ? [e] : e < 1e14 ? [e % 1e7, Math.floor(e / 1e7)] : [e % 1e7, Math.floor(e / 1e7) % 1e7, Math.floor(e / 1e14)] } function p(e) { h(e); var n = e.length; if (n < 4 && O(e, r) < 0) switch (n) { case 0: return 0; case 1: return e[0]; case 2: return e[0] + e[1] * t; default: return e[0] + (e[1] + e[2] * t) * t } return e } function h(e) { for (var t = e.length; 0 === e[--t];); e.length = t + 1 } function v(e) { for (var t = new Array(e), n = -1; ++n < e;) t[n] = 0; return t } function m(e) { return e > 0 ? Math.floor(e) : Math.ceil(e) } function y(e, n) { var r, a, i = e.length, o = n.length, l = new Array(i), u = 0, c = t; for (a = 0; a < o; a++) u = (r = e[a] + n[a] + u) >= c ? 1 : 0, l[a] = r - u * c; for (; a < i;) u = (r = e[a] + u) === c ? 1 : 0, l[a++] = r - u * c; return u > 0 && l.push(u), l } function g(e, t) { return e.length >= t.length ? y(e, t) : y(t, e) } function E(e, n) { var r, a, i = e.length, o = new Array(i), l = t; for (a = 0; a < i; a++) r = e[a] - l + n, n = Math.floor(r / l), o[a] = r - n * l, n += 1; for (; n > 0;) o[a++] = n % l, n = Math.floor(n / l); return o } function b(e, n) { var r, a, i = e.length, o = n.length, l = new Array(i), u = 0, c = t; for (r = 0; r < o; r++)(a = e[r] - u - n[r]) < 0 ? (a += c, u = 1) : u = 0, l[r] = a; for (r = o; r < i; r++) { if (!((a = e[r] - u) < 0)) { l[r++] = a; break } a += c, l[r] = a } for (; r < i; r++) l[r] = e[r]; return h(l), l } function C(e, n, r) { var a, i, o = e.length, l = new Array(o), s = -n, d = t; for (a = 0; a < o; a++) i = e[a] + s, s = Math.floor(i / d), i %= d, l[a] = i < 0 ? i + d : i; return "number" == typeof(l = p(l)) ? (r && (l = -l), new c(l)) : new u(l, r) } function _(e, n) { var r, a, i, o, l = e.length, u = n.length, c = v(l + u), s = t; for (i = 0; i < l; ++i) { o = e[i]; for (var d = 0; d < u; ++d) r = o * n[d] + c[i + d], a = Math.floor(r / s), c[i + d] = r - a * s, c[i + d + 1] += a } return h(c), c } function S(e, n) { var r, a, i = e.length, o = new Array(i), l = t, u = 0; for (a = 0; a < i; a++) r = e[a] * n + u, u = Math.floor(r / l), o[a] = r - u * l; for (; u > 0;) o[a++] = u % l, u = Math.floor(u / l); return o } function I(e, t) { for (var n = []; t-- > 0;) n.push(0); return n.concat(e) } function T(e, t) { var n = Math.max(e.length, t.length); if (n <= 30) return _(e, t); n = Math.ceil(n / 2); var r = e.slice(n), a = e.slice(0, n), i = t.slice(n), o = t.slice(0, n), l = T(a, o), u = T(r, i), c = T(g(a, r), g(o, i)), s = g(g(l, I(b(b(c, l), u), n)), I(u, 2 * n)); return h(s), s } function A(e, n, r) { return new u(e < t ? S(n, e) : _(n, f(e)), r) } function N(e) { var n, r, a, i, o = e.length, l = v(o + o), u = t; for (a = 0; a < o; a++) { r = 0 - (i = e[a]) * i; for (var c = a; c < o; c++) n = i * e[c] * 2 + l[a + c] + r, r = Math.floor(n / u), l[a + c] = n - r * u; l[a + o] = r } return h(l), l } function w(e, n) { var r, a, i, o, l = e.length, u = v(l), c = t; for (i = 0, r = l - 1; r >= 0; --r) i = (o = i * c + e[r]) - (a = m(o / n)) * n, u[r] = 0 | a; return [u, 0 | i] } function L(e, n) { var r, a = Y(n); if (o) return [new s(e.value / a.value), new s(e.value % a.value)]; var i, d = e.value, y = a.value; if (0 === y) throw new Error("Cannot divide by zero"); if (e.isSmall) return a.isSmall ? [new c(m(d / y)), new c(d % y)] : [l[0], e]; if (a.isSmall) { if (1 === y) return [e, l[0]]; if (-1 == y) return [e.negate(), l[0]]; var g = Math.abs(y); if (g < t) { i = p((r = w(d, g))[0]); var E = r[1]; return e.sign && (E = -E), "number" == typeof i ? (e.sign !== a.sign && (i = -i), [new c(i), new c(E)]) : [new u(i, e.sign !== a.sign), new c(E)] } y = f(g) } var C = O(d, y); if (-1 === C) return [l[0], e]; if (0 === C) return [l[e.sign === a.sign ? 1 : -1], l[0]]; r = d.length + y.length <= 200 ? function(e, n) { var r, a, i, o, l, u, c, s = e.length, d = n.length, f = t, h = v(n.length), m = n[d - 1], y = Math.ceil(f / (2 * m)), g = S(e, y), E = S(n, y); for (g.length <= s && g.push(0), E.push(0), m = E[d - 1], a = s - d; a >= 0; a--) { for (r = f - 1, g[a + d] !== m && (r = Math.floor((g[a + d] * f + g[a + d - 1]) / m)), i = 0, o = 0, u = E.length, l = 0; l < u; l++) i += r * E[l], c = Math.floor(i / f), o += g[a + l] - (i - c * f), i = c, o < 0 ? (g[a + l] = o + f, o = -1) : (g[a + l] = o, o = 0); for (; 0 !== o;) { for (r -= 1, i = 0, l = 0; l < u; l++)(i += g[a + l] - f + E[l]) < 0 ? (g[a + l] = i + f, i = 0) : (g[a + l] = i, i = 1); o += i } h[a] = r } return g = w(g, y)[0], [p(h), p(g)] }(d, y) : function(e, n) { for (var r, a, i, o, l, u = e.length, c = n.length, s = [], d = [], f = t; u;) if (d.unshift(e[--u]), h(d), O(d, n) < 0) s.push(0); else { i = d[(a = d.length) - 1] * f + d[a - 2], o = n[c - 1] * f + n[c - 2], a > c && (i = (i + 1) * f), r = Math.ceil(i / o); do { if (O(l = S(n, r), d) <= 0) break; r-- } while (r); s.push(r), d = b(d, l) } return s.reverse(), [p(s), p(d)] }(d, y), i = r[0]; var _ = e.sign !== a.sign, I = r[1], T = e.sign; return "number" == typeof i ? (_ && (i = -i), i = new c(i)) : i = new u(i, _), "number" == typeof I ? (T && (I = -I), I = new c(I)) : I = new u(I, T), [i, I] } function O(e, t) { if (e.length !== t.length) return e.length > t.length ? 1 : -1; for (var n = e.length - 1; n >= 0; n--) if (e[n] !== t[n]) return e[n] > t[n] ? 1 : -1; return 0 } function k(e) { var t = e.abs(); return !t.isUnit() && (!!(t.equals(2) || t.equals(3) || t.equals(5)) || !(t.isEven() || t.isDivisibleBy(3) || t.isDivisibleBy(5)) && (!!t.lesser(49) || void 0)) } function D(e, t) { for (var n, r, i, o = e.prev(), l = o, u = 0; l.isEven();) l = l.divide(2), u++; e: for (r = 0; r < t.length; r++) if (!e.lesser(t[r]) && !(i = a(t[r]).modPow(l, e)).isUnit() && !i.equals(o)) { for (n = u - 1; 0 != n; n--) { if ((i = i.square().mod(e)).isUnit()) return !1; if (i.equals(o)) continue e } return !1 } return !0 } u.prototype = Object.create(l.prototype), c.prototype = Object.create(l.prototype), s.prototype = Object.create(l.prototype), u.prototype.add = function(e) { var t = Y(e); if (this.sign !== t.sign) return this.subtract(t.negate()); var n = this.value, r = t.value; return t.isSmall ? new u(E(n, Math.abs(r)), this.sign) : new u(g(n, r), this.sign) }, u.prototype.plus = u.prototype.add, c.prototype.add = function(e) { var t = Y(e), n = this.value; if (n < 0 !== t.sign) return this.subtract(t.negate()); var r = t.value; if (t.isSmall) { if (d(n + r)) return new c(n + r); r = f(Math.abs(r)) } return new u(E(r, Math.abs(n)), n < 0) }, c.prototype.plus = c.prototype.add, s.prototype.add = function(e) { return new s(this.value + Y(e).value) }, s.prototype.plus = s.prototype.add, u.prototype.subtract = function(e) { var t = Y(e); if (this.sign !== t.sign) return this.add(t.negate()); var n = this.value, r = t.value; return t.isSmall ? C(n, Math.abs(r), this.sign) : function(e, t, n) { var r; return O(e, t) >= 0 ? r = b(e, t) : (r = b(t, e), n = !n), "number" == typeof(r = p(r)) ? (n && (r = -r), new c(r)) : new u(r, n) }(n, r, this.sign) }, u.prototype.minus = u.prototype.subtract, c.prototype.subtract = function(e) { var t = Y(e), n = this.value; if (n < 0 !== t.sign) return this.add(t.negate()); var r = t.value; return t.isSmall ? new c(n - r) : C(r, Math.abs(n), n >= 0) }, c.prototype.minus = c.prototype.subtract, s.prototype.subtract = function(e) { return new s(this.value - Y(e).value) }, s.prototype.minus = s.prototype.subtract, u.prototype.negate = function() { return new u(this.value, !this.sign) }, c.prototype.negate = function() { var e = this.sign, t = new c(-this.value); return t.sign = !e, t }, s.prototype.negate = function() { return new s(-this.value) }, u.prototype.abs = function() { return new u(this.value, !1) }, c.prototype.abs = function() { return new c(Math.abs(this.value)) }, s.prototype.abs = function() { return new s(this.value >= 0 ? this.value : -this.value) }, u.prototype.multiply = function(e) { var n, r, a, i = Y(e), o = this.value, c = i.value, s = this.sign !== i.sign; if (i.isSmall) { if (0 === c) return l[0]; if (1 === c) return this; if (-1 === c) return this.negate(); if ((n = Math.abs(c)) < t) return new u(S(o, n), s); c = f(n) } return r = o.length, a = c.length, new u(-.012 * r - .012 * a + 15e-6 * r * a > 0 ? T(o, c) : _(o, c), s) }, u.prototype.times = u.prototype.multiply, c.prototype._multiplyBySmall = function(e) { return d(e.value * this.value) ? new c(e.value * this.value) : A(Math.abs(e.value), f(Math.abs(this.value)), this.sign !== e.sign) }, u.prototype._multiplyBySmall = function(e) { return 0 === e.value ? l[0] : 1 === e.value ? this : -1 === e.value ? this.negate() : A(Math.abs(e.value), this.value, this.sign !== e.sign) }, c.prototype.multiply = function(e) { return Y(e)._multiplyBySmall(this) }, c.prototype.times = c.prototype.multiply, s.prototype.multiply = function(e) { return new s(this.value * Y(e).value) }, s.prototype.times = s.prototype.multiply, u.prototype.square = function() { return new u(N(this.value), !1) }, c.prototype.square = function() { var e = this.value * this.value; return d(e) ? new c(e) : new u(N(f(Math.abs(this.value))), !1) }, s.prototype.square = function(e) { return new s(this.value * this.value) }, u.prototype.divmod = function(e) { var t = L(this, e); return { quotient: t[0], remainder: t[1] } }, s.prototype.divmod = c.prototype.divmod = u.prototype.divmod, u.prototype.divide = function(e) { return L(this, e)[0] }, s.prototype.over = s.prototype.divide = function(e) { return new s(this.value / Y(e).value) }, c.prototype.over = c.prototype.divide = u.prototype.over = u.prototype.divide, u.prototype.mod = function(e) { return L(this, e)[1] }, s.prototype.mod = s.prototype.remainder = function(e) { return new s(this.value % Y(e).value) }, c.prototype.remainder = c.prototype.mod = u.prototype.remainder = u.prototype.mod, u.prototype.pow = function(e) { var t, n, r, a = Y(e), i = this.value, o = a.value; if (0 === o) return l[1]; if (0 === i) return l[0]; if (1 === i) return l[1]; if (-1 === i) return a.isEven() ? l[1] : l[-1]; if (a.sign) return l[0]; if (!a.isSmall) throw new Error("The exponent " + a.toString() + " is too large."); if (this.isSmall && d(t = Math.pow(i, o))) return new c(m(t)); for (n = this, r = l[1]; !0 & o && (r = r.times(n), --o), 0 !== o;) o /= 2, n = n.square(); return r }, c.prototype.pow = u.prototype.pow, s.prototype.pow = function(e) { var t = Y(e), n = this.value, r = t.value, a = BigInt(0), i = BigInt(1), o = BigInt(2); if (r === a) return l[1]; if (n === a) return l[0]; if (n === i) return l[1]; if (n === BigInt(-1)) return t.isEven() ? l[1] : l[-1]; if (t.isNegative()) return new s(a); for (var u = this, c = l[1]; (r & i) === i && (c = c.times(u), --r), r !== a;) r /= o, u = u.square(); return c }, u.prototype.modPow = function(e, t) { if (e = Y(e), (t = Y(t)).isZero()) throw new Error("Cannot take modPow with modulus 0"); var n = l[1], r = this.mod(t); for (e.isNegative() && (e = e.multiply(l[-1]), r = r.modInv(t)); e.isPositive();) { if (r.isZero()) return l[0]; e.isOdd() && (n = n.multiply(r).mod(t)), e = e.divide(2), r = r.square().mod(t) } return n }, s.prototype.modPow = c.prototype.modPow = u.prototype.modPow, u.prototype.compareAbs = function(e) { var t = Y(e), n = this.value, r = t.value; return t.isSmall ? 1 : O(n, r) }, c.prototype.compareAbs = function(e) { var t = Y(e), n = Math.abs(this.value), r = t.value; return t.isSmall ? n === (r = Math.abs(r)) ? 0 : n > r ? 1 : -1 : -1 }, s.prototype.compareAbs = function(e) { var t = this.value, n = Y(e).value; return (t = t >= 0 ? t : -t) === (n = n >= 0 ? n : -n) ? 0 : t > n ? 1 : -1 }, u.prototype.compare = function(e) { if (e === 1 / 0) return -1; if (e === -1 / 0) return 1; var t = Y(e), n = this.value, r = t.value; return this.sign !== t.sign ? t.sign ? 1 : -1 : t.isSmall ? this.sign ? -1 : 1 : O(n, r) * (this.sign ? -1 : 1) }, u.prototype.compareTo = u.prototype.compare, c.prototype.compare = function(e) { if (e === 1 / 0) return -1; if (e === -1 / 0) return 1; var t = Y(e), n = this.value, r = t.value; return t.isSmall ? n == r ? 0 : n > r ? 1 : -1 : n < 0 !== t.sign ? n < 0 ? -1 : 1 : n < 0 ? 1 : -1 }, c.prototype.compareTo = c.prototype.compare, s.prototype.compare = function(e) { if (e === 1 / 0) return -1; if (e === -1 / 0) return 1; var t = this.value, n = Y(e).value; return t === n ? 0 : t > n ? 1 : -1 }, s.prototype.compareTo = s.prototype.compare, u.prototype.equals = function(e) { return 0 === this.compare(e) }, s.prototype.eq = s.prototype.equals = c.prototype.eq = c.prototype.equals = u.prototype.eq = u.prototype.equals, u.prototype.notEquals = function(e) { return 0 !== this.compare(e) }, s.prototype.neq = s.prototype.notEquals = c.prototype.neq = c.prototype.notEquals = u.prototype.neq = u.prototype.notEquals, u.prototype.greater = function(e) { return this.compare(e) > 0 }, s.prototype.gt = s.prototype.greater = c.prototype.gt = c.prototype.greater = u.prototype.gt = u.prototype.greater, u.prototype.lesser = function(e) { return this.compare(e) < 0 }, s.prototype.lt = s.prototype.lesser = c.prototype.lt = c.prototype.lesser = u.prototype.lt = u.prototype.lesser, u.prototype.greaterOrEquals = function(e) { return this.compare(e) >= 0 }, s.prototype.geq = s.prototype.greaterOrEquals = c.prototype.geq = c.prototype.greaterOrEquals = u.prototype.geq = u.prototype.greaterOrEquals, u.prototype.lesserOrEquals = function(e) { return this.compare(e) <= 0 }, s.prototype.leq = s.prototype.lesserOrEquals = c.prototype.leq = c.prototype.lesserOrEquals = u.prototype.leq = u.prototype.lesserOrEquals, u.prototype.isEven = function() { return !(1 & this.value[0]) }, c.prototype.isEven = function() { return !(1 & this.value) }, s.prototype.isEven = function() { return (this.value & BigInt(1)) === BigInt(0) }, u.prototype.isOdd = function() { return !(1 & ~this.value[0]) }, c.prototype.isOdd = function() { return !(1 & ~this.value) }, s.prototype.isOdd = function() { return (this.value & BigInt(1)) === BigInt(1) }, u.prototype.isPositive = function() { return !this.sign }, c.prototype.isPositive = function() { return this.value > 0 }, s.prototype.isPositive = c.prototype.isPositive, u.prototype.isNegative = function() { return this.sign }, c.prototype.isNegative = function() { return this.value < 0 }, s.prototype.isNegative = c.prototype.isNegative, u.prototype.isUnit = function() { return !1 }, c.prototype.isUnit = function() { return 1 === Math.abs(this.value) }, s.prototype.isUnit = function() { return this.abs().value === BigInt(1) }, u.prototype.isZero = function() { return !1 }, c.prototype.isZero = function() { return 0 === this.value }, s.prototype.isZero = function() { return this.value === BigInt(0) }, u.prototype.isDivisibleBy = function(e) { var t = Y(e); return !t.isZero() && (!!t.isUnit() || (0 === t.compareAbs(2) ? this.isEven() : this.mod(t).isZero())) }, s.prototype.isDivisibleBy = c.prototype.isDivisibleBy = u.prototype.isDivisibleBy, u.prototype.isPrime = function(t) { var n = k(this); if (n !== e) return n; var r = this.abs(), i = r.bitLength(); if (i <= 64) return D(r, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]); for (var o = Math.log(2) * i.toJSNumber(), l = Math.ceil(!0 === t ? 2 * Math.pow(o, 2) : o), u = [], c = 0; c < l; c++) u.push(a(c + 2)); return D(r, u) }, s.prototype.isPrime = c.prototype.isPrime = u.prototype.isPrime, u.prototype.isProbablePrime = function(t, n) { var r = k(this); if (r !== e) return r; for (var i = this.abs(), o = t === e ? 5 : t, l = [], u = 0; u < o; u++) l.push(a.randBetween(2, i.minus(2), n)); return D(i, l) }, s.prototype.isProbablePrime = c.prototype.isProbablePrime = u.prototype.isProbablePrime, u.prototype.modInv = function(e) { for (var t, n, r, i = a.zero, o = a.one, l = Y(e), u = this.abs(); !u.isZero();) t = l.divide(u), n = i, r = l, i = o, l = u, o = n.subtract(t.multiply(o)), u = r.subtract(t.multiply(u)); if (!l.isUnit()) throw new Error(this.toString() + " and " + e.toString() + " are not co-prime"); return -1 === i.compare(0) && (i = i.add(e)), this.isNegative() ? i.negate() : i }, s.prototype.modInv = c.prototype.modInv = u.prototype.modInv, u.prototype.next = function() { var e = this.value; return this.sign ? C(e, 1, this.sign) : new u(E(e, 1), this.sign) }, c.prototype.next = function() { var e = this.value; return e + 1 < n ? new c(e + 1) : new u(r, !1) }, s.prototype.next = function() { return new s(this.value + BigInt(1)) }, u.prototype.prev = function() { var e = this.value; return this.sign ? new u(E(e, 1), !0) : C(e, 1, this.sign) }, c.prototype.prev = function() { var e = this.value; return e - 1 > -n ? new c(e - 1) : new u(r, !0) }, s.prototype.prev = function() { return new s(this.value - BigInt(1)) }; for (var R = [1]; 2 * R[R.length - 1] <= t;) R.push(2 * R[R.length - 1]); var P = R.length, x = R[P - 1]; function M(e) { return Math.abs(e) <= t } function V(e, t, n) { t = Y(t); for (var r = e.isNegative(), i = t.isNegative(), o = r ? e.not() : e, l = i ? t.not() : t, u = 0, c = 0, s = null, d = null, f = []; !o.isZero() || !l.isZero();) u = (s = L(o, x))[1].toJSNumber(), r && (u = x - 1 - u), c = (d = L(l, x))[1].toJSNumber(), i && (c = x - 1 - c), o = s[0], l = d[0], f.push(n(u, c)); for (var p = 0 !== n(r ? 1 : 0, i ? 1 : 0) ? a(-1) : a(0), h = f.length - 1; h >= 0; h -= 1) p = p.multiply(x).add(a(f[h])); return p } u.prototype.shiftLeft = function(e) { var t = Y(e).toJSNumber(); if (!M(t)) throw new Error(String(t) + " is too large for shifting."); if (t < 0) return this.shiftRight(-t); var n = this; if (n.isZero()) return n; for (; t >= P;) n = n.multiply(x), t -= P - 1; return n.multiply(R[t]) }, s.prototype.shiftLeft = c.prototype.shiftLeft = u.prototype.shiftLeft, u.prototype.shiftRight = function(e) { var t, n = Y(e).toJSNumber(); if (!M(n)) throw new Error(String(n) + " is too large for shifting."); if (n < 0) return this.shiftLeft(-n); for (var r = this; n >= P;) { if (r.isZero() || r.isNegative() && r.isUnit()) return r; r = (t = L(r, x))[1].isNegative() ? t[0].prev() : t[0], n -= P - 1 } return (t = L(r, R[n]))[1].isNegative() ? t[0].prev() : t[0] }, s.prototype.shiftRight = c.prototype.shiftRight = u.prototype.shiftRight, u.prototype.not = function() { return this.negate().prev() }, s.prototype.not = c.prototype.not = u.prototype.not, u.prototype.and = function(e) { return V(this, e, (function(e, t) { return e & t })) }, s.prototype.and = c.prototype.and = u.prototype.and, u.prototype.or = function(e) { return V(this, e, (function(e, t) { return e | t })) }, s.prototype.or = c.prototype.or = u.prototype.or, u.prototype.xor = function(e) { return V(this, e, (function(e, t) { return e ^ t })) }, s.prototype.xor = c.prototype.xor = u.prototype.xor; var U = 1 << 30; function W(e) { var n = e.value, r = "number" == typeof n ? n | U : "bigint" == typeof n ? n | BigInt(U) : n[0] + n[1] * t | 1073758208; return r & -r } function H(e, t) { if (t.compareTo(e) <= 0) { var n = H(e, t.square(t)), r = n.p, i = n.e, o = r.multiply(t); return o.compareTo(e) <= 0 ? { p: o, e: 2 * i + 1 } : { p: r, e: 2 * i } } return { p: a(1), e: 0 } } function F(e, t) { return e = Y(e), t = Y(t), e.greater(t) ? e : t } function G(e, t) { return e = Y(e), t = Y(t), e.lesser(t) ? e : t } function j(e, t) { if (e = Y(e).abs(), t = Y(t).abs(), e.equals(t)) return e; if (e.isZero()) return t; if (t.isZero()) return e; for (var n, r, a = l[1]; e.isEven() && t.isEven();) n = G(W(e), W(t)), e = e.divide(n), t = t.divide(n), a = a.multiply(n); for (; e.isEven();) e = e.divide(W(e)); do { for (; t.isEven();) t = t.divide(W(t)); e.greater(t) && (r = t, t = e, e = r), t = t.subtract(e) } while (!t.isZero()); return a.isUnit() ? e : e.multiply(a) } u.prototype.bitLength = function() { var e = this; return e.compareTo(a(0)) < 0 && (e = e.negate().subtract(a(1))), 0 === e.compareTo(a(0)) ? a(0) : a(H(e, a(2)).e).add(a(1)) }, s.prototype.bitLength = c.prototype.bitLength = u.prototype.bitLength; var z = function(e, t, n, r) { n = n || i, e = String(e), r || (e = e.toLowerCase(), n = n.toLowerCase()); var a, o = e.length, l = Math.abs(t), u = {}; for (a = 0; a < n.length; a++) u[n[a]] = a; for (a = 0; a < o; a++) { if ("-" !== (d = e[a]) && (d in u && u[d] >= l)) { if ("1" === d && 1 === l) continue; throw new Error(d + " is not a valid digit in base " + t + ".") } } t = Y(t); var c = [], s = "-" === e[0]; for (a = s ? 1 : 0; a < e.length; a++) { var d; if ((d = e[a]) in u) c.push(Y(u[d])); else { if ("<" !== d) throw new Error(d + " is not a valid character"); var f = a; do { a++ } while (">" !== e[a] && a < e.length); c.push(Y(e.slice(f + 1, a))) } } return Z(c, t, s) }; function Z(e, t, n) { var r, a = l[0], i = l[1]; for (r = e.length - 1; r >= 0; r--) a = a.add(e[r].times(i)), i = i.times(t); return n ? a.negate() : a } function q(e, t) { if ((t = a(t)).isZero()) { if (e.isZero()) return { value: [0], isNegative: !1 }; throw new Error("Cannot convert nonzero numbers to base 0.") } if (t.equals(-1)) { if (e.isZero()) return { value: [0], isNegative: !1 }; if (e.isNegative()) return { value: [].concat.apply([], Array.apply(null, Array(-e.toJSNumber())).map(Array.prototype.valueOf, [1, 0])), isNegative: !1 }; var n = Array.apply(null, Array(e.toJSNumber() - 1)).map(Array.prototype.valueOf, [0, 1]); return n.unshift([1]), { value: [].concat.apply([], n), isNegative: !1 } } var r = !1; if (e.isNegative() && t.isPositive() && (r = !0, e = e.abs()), t.isUnit()) return e.isZero() ? { value: [0], isNegative: !1 } : { value: Array.apply(null, Array(e.toJSNumber())).map(Number.prototype.valueOf, 1), isNegative: r }; for (var i, o = [], l = e; l.isNegative() || l.compareAbs(t) >= 0;) { i = l.divmod(t), l = i.quotient; var u = i.remainder; u.isNegative() && (u = t.minus(u).abs(), l = l.next()), o.push(u.toJSNumber()) } return o.push(l.toJSNumber()), { value: o.reverse(), isNegative: r } } function B(e, t, n) { var r = q(e, t); return (r.isNegative ? "-" : "") + r.value.map((function(e) { return function(e, t) { return e < (t = t || i).length ? t[e] : "<" + e + ">" }(e, n) })).join("") } function K(e) { if (d(+e)) { var t = +e; if (t === m(t)) return o ? new s(BigInt(t)) : new c(t); throw new Error("Invalid integer: " + e) } var n = "-" === e[0]; n && (e = e.slice(1)); var r = e.split(/e/i); if (r.length > 2) throw new Error("Invalid integer: " + r.join("e")); if (2 === r.length) { var a = r[1]; if ("+" === a[0] && (a = a.slice(1)), (a = +a) !== m(a) || !d(a)) throw new Error("Invalid integer: " + a + " is not a valid exponent."); var i = r[0], l = i.indexOf("."); if (l >= 0 && (a -= i.length - l - 1, i = i.slice(0, l) + i.slice(l + 1)), a < 0) throw new Error("Cannot include negative exponent part for integers"); e = i += new Array(a + 1).join("0") } if (!/^([0-9][0-9]*)$/.test(e)) throw new Error("Invalid integer: " + e); if (o) return new s(BigInt(n ? "-" + e : e)); for (var f = [], p = e.length, v = p - 7; p > 0;) f.push(+e.slice(v, p)), (v -= 7) < 0 && (v = 0), p -= 7; return h(f), new u(f, n) } function Y(e) { return "number" == typeof e ? function(e) { if (o) return new s(BigInt(e)); if (d(e)) { if (e !== m(e)) throw new Error(e + " is not an integer."); return new c(e) } return K(e.toString()) }(e) : "string" == typeof e ? K(e) : "bigint" == typeof e ? new s(e) : e } u.prototype.toArray = function(e) { return q(this, e) }, c.prototype.toArray = function(e) { return q(this, e) }, s.prototype.toArray = function(e) { return q(this, e) }, u.prototype.toString = function(t, n) { if (t === e && (t = 10), 10 !== t || n) return B(this, t, n); for (var r, a = this.value, i = a.length, o = String(a[--i]); --i >= 0;) r = String(a[i]), o += "0000000".slice(r.length) + r; return (this.sign ? "-" : "") + o }, c.prototype.toString = function(t, n) { return t === e && (t = 10), 10 != t || n ? B(this, t, n) : String(this.value) }, s.prototype.toString = c.prototype.toString, s.prototype.toJSON = u.prototype.toJSON = c.prototype.toJSON = function() { return this.toString() }, u.prototype.valueOf = function() { return parseInt(this.toString(), 10) }, u.prototype.toJSNumber = u.prototype.valueOf, c.prototype.valueOf = function() { return this.value }, c.prototype.toJSNumber = c.prototype.valueOf, s.prototype.valueOf = s.prototype.toJSNumber = function() { return parseInt(this.toString(), 10) }; for (var J = 0; J < 1e3; J++) l[J] = Y(J), J > 0 && (l[-J] = Y(-J)); return l.one = l[1], l.zero = l[0], l.minusOne = l[-1], l.max = F, l.min = G, l.gcd = j, l.lcm = function(e, t) { return e = Y(e).abs(), t = Y(t).abs(), e.divide(j(e, t)).multiply(t) }, l.isInstance = function(e) { return e instanceof u || e instanceof c || e instanceof s }, l.randBetween = function(e, n, r) { e = Y(e), n = Y(n); var a = r || Math.random, i = G(e, n), o = F(e, n).subtract(i).add(1); if (o.isSmall) return i.add(Math.floor(a() * o)); for (var u = q(o, t).value, c = [], s = !0, d = 0; d < u.length; d++) { var f = s ? u[d] + (d + 1 < u.length ? u[d + 1] / t : 0) : t, p = m(a() * f); c.push(p), p < u[d] && (s = !1) } return i.add(l.fromArray(c, t, !1)) }, l.fromArray = function(e, t, n) { return Z(e.map(Y), Y(t || 10), n) }, l }(); e.hasOwnProperty("exports") && (e.exports = a), void 0 === (r = function() { return a }.call(t, n, t, e)) || (e.exports = r) }, 375: function(e, t) { "use strict"; var n = this && this.__spreadArray || function(e, t, n) { if (n || 2 === arguments.length) for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]); return e.concat(r || Array.prototype.slice.call(t)) }; Object.defineProperty(t, "__esModule", { value: !0 }), t.dual = t.getEndomorphismMonoid = t.SK = t.hole = t.constVoid = t.constUndefined = t.constNull = t.constFalse = t.constTrue = t.unsafeCoerce = t.apply = t.getRing = t.getSemiring = t.getMonoid = t.getSemigroup = t.getBooleanAlgebra = void 0, t.identity = r, t.constant = a, t.flip = function(e) { return function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return t.length > 1 ? e(t[1], t[0]) : function(n) { return e(n)(t[0]) } } }, t.flow = i, t.tuple = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return e }, t.increment = function(e) { return e + 1 }, t.decrement = function(e) { return e - 1 }, t.absurd = o, t.tupled = function(e) { return function(t) { return e.apply(void 0, t) } }, t.untupled = function(e) { return function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return e(t) } }, t.pipe = function(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return t(e); case 3: return n(t(e)); case 4: return r(n(t(e))); case 5: return a(r(n(t(e)))); case 6: return i(a(r(n(t(e))))); case 7: return o(i(a(r(n(t(e)))))); case 8: return l(o(i(a(r(n(t(e))))))); case 9: return u(l(o(i(a(r(n(t(e)))))))); default: for (var c = arguments[0], s = 1; s < arguments.length; s++) c = arguments[s](c); return c } }, t.not = function(e) { return function(t) { return !e(t) } }; t.getBooleanAlgebra = function(e) { return function() { return { meet: function(t, n) { return function(r) { return e.meet(t(r), n(r)) } }, join: function(t, n) { return function(r) { return e.join(t(r), n(r)) } }, zero: function() { return e.zero }, one: function() { return e.one }, implies: function(t, n) { return function(r) { return e.implies(t(r), n(r)) } }, not: function(t) { return function(n) { return e.not(t(n)) } } } } }; t.getSemigroup = function(e) { return function() { return { concat: function(t, n) { return function(r) { return e.concat(t(r), n(r)) } } } } }; t.getMonoid = function(e) { var n = (0, t.getSemigroup)(e); return function() { return { concat: n().concat, empty: function() { return e.empty } } } }; t.getSemiring = function(e) { return { add: function(t, n) { return function(r) { return e.add(t(r), n(r)) } }, zero: function() { return e.zero }, mul: function(t, n) { return function(r) { return e.mul(t(r), n(r)) } }, one: function() { return e.one } } }; t.getRing = function(e) { var n = (0, t.getSemiring)(e); return { add: n.add, mul: n.mul, one: n.one, zero: n.zero, sub: function(t, n) { return function(r) { return e.sub(t(r), n(r)) } } } }; function r(e) { return e } function a(e) { return function() { return e } } function i(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return function() { return t(e.apply(this, arguments)) }; case 3: return function() { return n(t(e.apply(this, arguments))) }; case 4: return function() { return r(n(t(e.apply(this, arguments)))) }; case 5: return function() { return a(r(n(t(e.apply(this, arguments))))) }; case 6: return function() { return i(a(r(n(t(e.apply(this, arguments)))))) }; case 7: return function() { return o(i(a(r(n(t(e.apply(this, arguments))))))) }; case 8: return function() { return l(o(i(a(r(n(t(e.apply(this, arguments)))))))) }; case 9: return function() { return u(l(o(i(a(r(n(t(e.apply(this, arguments))))))))) } } } function o(e) { throw new Error("Called `absurd` function which should be uncallable") } t.apply = function(e) { return function(t) { return t(e) } }, t.unsafeCoerce = r, t.constTrue = a(!0), t.constFalse = a(!1), t.constNull = a(null), t.constUndefined = a(void 0), t.constVoid = t.constUndefined, t.hole = o; t.SK = function(e, t) { return t }; t.getEndomorphismMonoid = function() { return { concat: function(e, t) { return i(e, t) }, empty: r } }; t.dual = function(e, t) { var r = "number" == typeof e ? function(t) { return t.length >= e } : e; return function() { var e = Array.from(arguments); return r(arguments) ? t.apply(this, e) : function(r) { return t.apply(void 0, n([r], e, !1)) } } } } }, t = {}; function n(r) { var a = t[r]; if (void 0 !== a) return a.exports; var i = t[r] = { id: r, loaded: !1, exports: {} }; return e[r].call(i.exports, i, i.exports, n), i.loaded = !0, i.exports } n.n = function(e) { var t = e && e.__esModule ? function() { return e.default } : function() { return e }; return n.d(t, { a: t }), t }, n.d = function(e, t) { for (var r in t) n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, { enumerable: !0, get: t[r] }) }, n.o = function(e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, n.r = function(e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }, n.nmd = function(e) { return e.paths = [], e.children || (e.children = []), e }, function() { "use strict"; var e = {}; n.r(e), n.d(e, { getMetadata: function() { return io } }); var t = {}; n.r(t), n.d(t, { getEmailConfiguration: function() { return po }, updateForCurrentUser: function() { return fo } }); var r = {}; n.r(r), n.d(r, { getDetailsForUniverseIds: function() { return yo } }); var a = {}; n.r(a), n.d(a, { getMySettingsInfo: function() { return Co } }); var i = {}; n.r(i), n.d(i, { getMetadata: function() { return xo }, resendCode: function() { return Ro }, sendCodeForUser: function() { return Do }, validateCode: function() { return Po } }); var o = {}; n.r(o), n.d(o, { changeForCurrentUser: function() { return Bo }, resetSendPrompted: function() { return Ko }, validate: function() { return Yo } }); var l = {}; n.r(l), n.d(l, { getPhoneConfiguration: function() { return il }, getPhonePrefixList: function() { return ll }, prioritizeDefaultPrefix: function() { return ol } }); var u = {}; n.r(u), n.d(u, { disconnectPlaystation: function() { return gl }, getPlaystationConnection: function() { return yl } }); var c = {}; n.r(c), n.d(c, { getAllForCurrentUser: function() { return wl }, updateForCurrentUser: function() { return Ll } }); var s = {}; n.r(s), n.d(s, { verifyPuzzle: function() { return Vl } }); var d = {}; n.r(d), n.d(d, { getPuzzle: function() { return Zl }, verifyPuzzle: function() { return ql } }); var f = {}; n.r(f), n.d(f, { generateToken: function() { return Xl } }); var p = {}; n.r(p), n.d(p, { verifyPuzzle: function() { return ou } }); var h = {}; n.r(h), n.d(h, { answerQuestion: function() { return mu }, getQuestion: function() { return vu } }); var v = {}; n.r(v), n.d(v, { getSessions: function() { return Ou }, logoutFromAllSessionsAndReauthenticate: function() { return Du }, logoutSession: function() { return ku } }); var m = {}; n.r(m), n.d(m, { getIconsForUniverseIds: function() { return Wu } }); var y = {}; n.r(y), n.d(y, { deleteSecurityKey: function() { return Dc }, disableAuthenticator: function() { return bc }, disableEmailTwoStepVerification: function() { return mc }, disableSmsTwoStepVerification: function() { return Nc }, enableAuthenticator: function() { return yc }, enableEmailTwoStepVerification: function() { return pc }, enableSecurityKey: function() { return wc }, enableSmsTwoStepVerification: function() { return Ic }, enableVerifyAuthenticator: function() { return gc }, enableVerifySecurityKey: function() { return Lc }, generateRecoveryCodes: function() { return Sc }, generateResaleFrictionChallenge: function() { return Fc }, generateSpendFrictionChallenge: function() { return Wc }, generateTradeFrictionChallenge: function() { return Hc }, getMetadata: function() { return dc }, getPasskeyOptions: function() { return Pc }, getRecoveryCodesStatus: function() { return _c }, getResaleFrictionStatus: function() { return Uc }, getSecurityKeyOptions: function() { return Oc }, getSpendFrictionStatus: function() { return Mc }, getTradeFrictionStatus: function() { return Vc }, getUserConfiguration: function() { return fc }, listSecurityKey: function() { return Rc }, redeemResaleFrictionChallenge: function() { return zc }, redeemSpendFrictionChallenge: function() { return Gc }, redeemTradeFrictionChallenge: function() { return jc }, retractCrossDevice: function() { return Bc }, retryCrossDevice: function() { return Zc }, sendEmailCode: function() { return hc }, sendSmsCode: function() { return Tc }, verifyAuthenticatorCode: function() { return Ec }, verifyCrossDevice: function() { return qc }, verifyEmailCode: function() { return vc }, verifyPasskeyCredential: function() { return xc }, verifyPasswordCode: function() { return Kc }, verifyRecoveryCode: function() { return Cc }, verifySecurityKeyCredential: function() { return kc }, verifySmsCode: function() { return Ac } }); var g = {}; n.r(g), n.d(g, { getSettingsUiPolicy: function() { return ts } }); var E = {}; n.r(E), n.d(E, { disconnectXbox: function() { return cs }, getXboxConnection: function() { return us } }); var b = {}; n.r(b), n.d(b, { recordMetric: function() { return hs } }); var C = {}; n.r(C), n.d(C, { getPatToken: function() { return Cs } }); var _ = {}; n.r(_), n.d(_, { continueChallenge: function() { return Ls } }); var S = {}; n.r(S), n.d(S, { deletePasskeyBatch: function() { return Hs }, finishPasskeyRegistration: function() { return Ws }, listAllCredentials: function() { return Fs }, resetPassword: function() { return Gs }, startPasskeyRegistration: function() { return Us } }); var I = {}; n.r(I), n.d(I, { getNativeResponse: function() { return Bs }, getNavigatorCredentials: function() { return Ks } }); var T = {}; n.r(T), n.d(T, { recoverySessionMetadata: function() { return ud }, requestRecovery: function() { return ad }, resendCode: function() { return od }, sendCode: function() { return id }, setEmail: function() { return cd }, verifyCode: function() { return ld } }); var A = {}; n.r(A), n.d(A, { ActionType: function() { return _d }, ErrorCode: function() { return Sd }, renderChallenge: function() { return Yd } }); var N = {}; n.r(N), n.d(N, { ErrorCode: function() { return af }, renderChallenge: function() { return Ef } }); var w = {}; n.r(w), n.d(w, { ErrorCode: function() { return _f }, ForceActionRedirectChallengeType: function() { return Sf }, renderChallenge: function() { return Wf } }); var L = {}; n.r(L), n.d(L, { ErrorCode: function() { return qh }, renderChallenge: function() { return Zv } }); var O = {}; n.r(O), n.d(O, { ErrorCode: function() { return Bh }, PuzzleType: function() { return Kh }, renderChallenge: function() { return Nm } }); var k = {}; n.r(k), n.d(k, { ErrorCode: function() { return Yh }, renderChallenge: function() { return ty } }); var D = {}; n.r(D), n.d(D, { ErrorCode: function() { return Jh }, ReauthenticationType: function() { return Xh }, reauthInvalidationErrorMessageOrNull: function() { return $y }, renderChallenge: function() { return Qy } }); var R = {}; n.r(R), n.d(R, { ErrorCode: function() { return Qh }, PuzzleType: function() { return $h }, renderChallenge: function() { return wg } }); var P = {}; n.r(P), n.d(P, { ErrorCode: function() { return ev }, renderChallenge: function() { return Jg } }); var x = {}; n.r(x), n.d(x, { ActionType: function() { return tv }, ErrorCode: function() { return rv }, MediaType: function() { return nv }, renderChallenge: function() { return nb } }); var M = {}; n.r(M), n.d(M, { ChallengeError: function() { return K_ }, ChallengeErrorKind: function() { return zh }, ChallengeType: function() { return av }, ErrorCodeGeneric: function() { return jh }, interceptChallenge: function() { return Y_ }, loadPreludeIfMissing: function() { return J_ }, parseChallengeSpecificProperties: function() { return Z_ }, renderChallenge: function() { return q_ } }); var V = {}; function U(e, t) { return function(e) { if (Array.isArray(e)) return e }(e) || function(e, t) { if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return; var n = [], r = !0, a = !1, i = void 0; try { for (var o, l = e[Symbol.iterator](); !(r = (o = l.next()).done) && (n.push(o.value), !t || n.length !== t); r = !0); } catch (e) { a = !0, i = e } finally { try { r || null == l.return || l.return() } finally { if (a) throw i } } return n }(e, t) || H(e, t) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function W(e, t) { var n; if ("undefined" == typeof Symbol || null == e[Symbol.iterator]) { if (Array.isArray(e) || (n = H(e)) || t && e && "number" == typeof e.length) { n && (e = n); var r = 0, a = function() {}; return { s: a, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] } }, e: function(e) { throw e }, f: a } } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") } var i, o = !0, l = !1; return { s: function() { n = e[Symbol.iterator]() }, n: function() { var e = n.next(); return o = e.done, e }, e: function(e) { l = !0, i = e }, f: function() { try { o || null == n.return || n.return() } finally { if (l) throw i } } } } function H(e, t) { if (e) { if ("string" == typeof e) return F(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? F(e, t) : void 0 } } function F(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r } function G(e, t, n, r, a, i, o) { try { var l = e[i](o), u = l.value } catch (e) { return void n(e) } l.done ? t(u) : Promise.resolve(u).then(r, a) } function j(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter((function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function z(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? j(Object(n), !0).forEach((function(t) { Z(e, t, n[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : j(Object(n)).forEach((function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)) })) } return e } function Z(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } function q(e, t) { if (null == e) return {}; var n, r, a = function(e, t) { if (null == e) return {}; var n, r, a = {}, i = Object.keys(e); for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (a[n] = e[n]); return a }(e, t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(e, n) && (a[n] = e[n]) } return a } function B(e) { return B = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, B(e) } n.r(V), n.d(V, { ChallengeType: function() { return av }, HybridTarget: function() { return Zh }, dispatchNavigateToFeatureHybridEvent: function() { return sw }, renderChallengeFromQueryParameters: function() { return Tw }, renderGenericChallengeFromQueryParameters: function() { return Cw }, renderNewGenericChallengeFromQueryParameters: function() { return bw } }); var K = function(e) { return { _tag: "Left", left: e } }, Y = function(e) { return { _tag: "Right", right: e } }, J = { _tag: "None" }, X = function(e) { return { _tag: "Some", value: e } }, Q = function(e) { return function(t) { return te(t) ? J : X(e(t.value)) } }, $ = function(e) { return "Left" === e._tag ? J : X(e.right) }, ee = function(e) { return "Some" === e._tag }, te = function(e) { return "None" === e._tag };! function() { function e(e, t) { if (this.bufferIndex = 0, e < 1) throw new Error("EventPublishers must have size of at least 1!"); this.maxEventQueueLength = e, this.eventQueue = new Array(this.maxEventQueueLength).fill(J), this.delegatePublisher = t, this.appendEvent = this.appendEvent.bind(this), this.publish = this.publish.bind(this) } e.prototype.appendEvent = function(e) { var t = this.bufferIndex % this.maxEventQueueLength, n = this.eventQueue[t]; return this.eventQueue[t] = X(e), this.bufferIndex %= this.maxEventQueueLength, this.bufferIndex += 1, ee(n) }, e.prototype.publish = function() { this.delegatePublisher.publish(this.eventQueue.filter(ee)) } }(); function ne(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) } function re(e, t) { var n, r, a, i = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }, o = Object.create(("function" == typeof Iterator ? Iterator : Object).prototype); return o.next = l(0), o.throw = l(1), o.return = l(2), "function" == typeof Symbol && (o[Symbol.iterator] = function() { return this }), o; function l(l) { return function(u) { return function(l) { if (n) throw new TypeError("Generator is already executing."); for (; o && (o = 0, l[0] && (i = 0)), i;) try { if (n = 1, r && (a = 2 & l[0] ? r.return : l[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, l[1])).done) return a; switch (r = 0, a && (l = [2 & l[0], a.value]), l[0]) { case 0: case 1: a = l; break; case 4: return i.label++, { value: l[1], done: !1 }; case 5: i.label++, r = l[1], l = [0]; continue; case 7: l = i.ops.pop(), i.trys.pop(); continue; default: if (!((a = (a = i.trys).length > 0 && a[a.length - 1]) || 6 !== l[0] && 2 !== l[0])) { i = 0; continue } if (3 === l[0] && (!a || l[1] > a[0] && l[1] < a[3])) { i.label = l[1]; break } if (6 === l[0] && i.label < a[1]) { i.label = a[1], a = l; break } if (a && i.label < a[2]) { i.label = a[2], i.ops.push(l); break } a[2] && i.ops.pop(), i.trys.pop(); continue } l = t.call(e, i) } catch (e) { l = [6, e], r = 0 } finally { n = a = 0 } if (5 & l[0]) throw l[1]; return { value: l[0] ? l[1] : void 0, done: !0 } }([l, u]) } } } function ae(e, t, n) { if (n || 2 === arguments.length) for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]); return e.concat(r || Array.prototype.slice.call(t)) } "function" == typeof SuppressedError && SuppressedError; var ie = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, oe = function(e) { return e && e.Math === Math && e }, le = oe("object" == ("undefined" == typeof globalThis ? "undefined" : B(globalThis)) && globalThis) || oe("object" == ("undefined" == typeof window ? "undefined" : B(window)) && window) || oe("object" == ("undefined" == typeof self ? "undefined" : B(self)) && self) || oe("object" == B(ie) && ie) || oe("object" == B(ie) && ie) || function() { return this }() || Function("return this")(), ue = {}, ce = function(e) { try { return !!e() } catch (e) { return !0 } }, se = !ce((function() { return 7 !== Object.defineProperty({}, 1, { get: function() { return 7 } })[1] })), de = !ce((function() { var e = function() {}.bind(); return "function" != typeof e || e.hasOwnProperty("prototype") })), fe = de, pe = Function.prototype.call, he = fe ? pe.bind(pe) : function() { return pe.apply(pe, arguments) }, ve = {}, me = {}.propertyIsEnumerable, ye = Object.getOwnPropertyDescriptor, ge = ye && !me.call({ 1: 2 }, 1); ve.f = ge ? function(e) { var t = ye(this, e); return !!t && t.enumerable } : me; var Ee, be, Ce = function(e, t) { return { enumerable: !(1 & e), configurable: !(2 & e), writable: !(4 & e), value: t } }, _e = de, Se = Function.prototype, Ie = Se.call, Te = _e && Se.bind.bind(Ie, Ie), Ae = _e ? Te : function(e) { return function() { return Ie.apply(e, arguments) } }, Ne = Ae, we = Ne({}.toString), Le = Ne("".slice), Oe = ce, ke = Object, De = Ae("".split), Re = Oe((function() { return !ke("z").propertyIsEnumerable(0) })) ? function(e) { return "String" === function(e) { return Le(we(e), 8, -1) }(e) ? De(e, "") : ke(e) } : ke, Pe = function(e) { return null == e }, xe = Pe, Me = TypeError, Ve = function(e) { if (xe(e)) throw new Me("Can't call method on " + e); return e }, Ue = Re, We = Ve, He = function(e) { return Ue(We(e)) }, Fe = "object" == ("undefined" == typeof document ? "undefined" : B(document)) && document.all, Ge = void 0 === Fe && void 0 !== Fe ? function(e) { return "function" == typeof e || e === Fe } : function(e) { return "function" == typeof e }, je = Ge, ze = function(e) { return "object" == B(e) ? null !== e : je(e) }, Ze = le, qe = Ge, Be = function(e, t) { return arguments.length < 2 ? (n = Ze[e], qe(n) ? n : void 0) : Ze[e] && Ze[e][t]; var n }, Ke = Ae({}.isPrototypeOf), Ye = le.navigator, Je = Ye && Ye.userAgent, Xe = le, Qe = Je ? String(Je) : "", $e = Xe.process, et = Xe.Deno, tt = $e && $e.versions || et && et.version, nt = tt && tt.v8; nt && (be = (Ee = nt.split("."))[0] > 0 && Ee[0] < 4 ? 1 : +(Ee[0] + Ee[1])), !be && Qe && (!(Ee = Qe.match(/Edge\/(\d+)/)) || Ee[1] >= 74) && (Ee = Qe.match(/Chrome\/(\d+)/)) && (be = +Ee[1]); var rt = be, at = ce, it = le.String, ot = !!Object.getOwnPropertySymbols && !at((function() { var e = Symbol("symbol detection"); return !it(e) || !(Object(e) instanceof Symbol) || !Symbol.sham && rt && rt < 41 })), lt = ot && !Symbol.sham && "symbol" == B(Symbol.iterator), ut = Be, ct = Ge, st = Ke, dt = Object, ft = lt ? function(e) { return "symbol" == B(e) } : function(e) { var t = ut("Symbol"); return ct(t) && st(t.prototype, dt(e)) }, pt = String, ht = Ge, vt = TypeError, mt = function(e) { if (ht(e)) return e; throw new vt(function(e) { try { return pt(e) } catch (e) { return "Object" } }(e) + " is not a function") }, yt = mt, gt = Pe, Et = he, bt = Ge, Ct = ze, _t = TypeError, St = { exports: {} }, It = le, Tt = Object.defineProperty, At = function(e, t) { try { Tt(It, e, { value: t, configurable: !0, writable: !0 }) } catch (n) { It[e] = t } return t }, Nt = le, wt = At, Lt = "__core-js_shared__", Ot = St.exports = Nt[Lt] || wt(Lt, {}); (Ot.versions || (Ot.versions = [])).push({ version: "3.41.0", mode: "global", copyright: "© 2014-2025 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE", source: "https://github.com/zloirock/core-js" }); var kt = St.exports, Dt = kt, Rt = function(e, t) { return Dt[e] || (Dt[e] = t || {}) }, Pt = Ve, xt = Object, Mt = Ae({}.hasOwnProperty), Vt = Object.hasOwn || function(e, t) { return Mt(function(e) { return xt(Pt(e)) }(e), t) }, Ut = Ae, Wt = 0, Ht = Math.random(), Ft = Ut(1..toString), Gt = function(e) { return "Symbol(" + (void 0 === e ? "" : e) + ")_" + Ft(++Wt + Ht, 36) }, jt = Rt, zt = Vt, Zt = Gt, qt = ot, Bt = lt, Kt = le.Symbol, Yt = jt("wks"), Jt = Bt ? Kt.for || Kt : Kt && Kt.withoutSetter || Zt, Xt = he, Qt = ze, $t = ft, en = TypeError, tn = function(e) { return zt(Yt, e) || (Yt[e] = qt && zt(Kt, e) ? Kt[e] : Jt("Symbol." + e)), Yt[e] }("toPrimitive"), nn = function(e, t) { if (!Qt(e) || $t(e)) return e; var n, r = function(e, t) { var n = e[t]; return gt(n) ? void 0 : yt(n) }(e, tn); if (r) { if (void 0 === t && (t = "default"), n = Xt(r, e, t), !Qt(n) || $t(n)) return n; throw new en("Can't convert object to primitive value") } return void 0 === t && (t = "number"), function(e, t) { var n, r; if ("string" === t && bt(n = e.toString) && !Ct(r = Et(n, e))) return r; if (bt(n = e.valueOf) && !Ct(r = Et(n, e))) return r; if ("string" !== t && bt(n = e.toString) && !Ct(r = Et(n, e))) return r; throw new _t("Can't convert object to primitive value") }(e, t) }, rn = ft, an = function(e) { var t = nn(e, "string"); return rn(t) ? t : t + "" }, on = ze, ln = le.document, un = on(ln) && on(ln.createElement), cn = !se && !ce((function() { return 7 !== Object.defineProperty(function(e) { return un ? ln.createElement(e) : {} }("div"), "a", { get: function() { return 7 } }).a })), sn = se, dn = he, fn = ve, pn = Ce, hn = He, vn = an, mn = Vt, yn = cn, gn = Object.getOwnPropertyDescriptor; ue.f = sn ? gn : function(e, t) { if (e = hn(e), t = vn(t), yn) try { return gn(e, t) } catch (e) {} if (mn(e, t)) return pn(!dn(fn.f, e, t), e[t]) }; var En = {}, bn = se && ce((function() { return 42 !== Object.defineProperty((function() {}), "prototype", { value: 42, writable: !1 }).prototype })), Cn = ze, _n = String, Sn = TypeError, In = function(e) { if (Cn(e)) return e; throw new Sn(_n(e) + " is not an object") }, Tn = se, An = cn, Nn = bn, wn = In, Ln = an, On = TypeError, kn = Object.defineProperty, Dn = Object.getOwnPropertyDescriptor, Rn = "enumerable", Pn = "configurable", xn = "writable"; En.f = Tn ? Nn ? function(e, t, n) { if (wn(e), t = Ln(t), wn(n), "function" == typeof e && "prototype" === t && "value" in n && xn in n && !n[xn]) { var r = Dn(e, t); r && r[xn] && (e[t] = n.value, n = { configurable: Pn in n ? n[Pn] : r[Pn], enumerable: Rn in n ? n[Rn] : r[Rn], writable: !1 }) } return kn(e, t, n) } : kn : function(e, t, n) { if (wn(e), t = Ln(t), wn(n), An) try { return kn(e, t, n) } catch (e) {} if ("get" in n || "set" in n) throw new On("Accessors not supported"); return "value" in n && (e[t] = n.value), e }; var Mn = En, Vn = Ce, Un = se ? function(e, t, n) { return Mn.f(e, t, Vn(1, n)) } : function(e, t, n) { return e[t] = n, e }, Wn = { exports: {} }, Hn = se, Fn = Vt, Gn = Function.prototype, jn = Hn && Object.getOwnPropertyDescriptor, zn = Fn(Gn, "name"), Zn = { EXISTS: zn, PROPER: zn && "something" === function() {}.name, CONFIGURABLE: zn && (!Hn || Hn && jn(Gn, "name").configurable) }, qn = Ge, Bn = kt, Kn = Ae(Function.toString); qn(Bn.inspectSource) || (Bn.inspectSource = function(e) { return Kn(e) }); var Yn, Jn, Xn, Qn = Bn.inspectSource, $n = Ge, er = le.WeakMap, tr = $n(er) && /native code/.test(String(er)), nr = Gt, rr = Rt("keys"), ar = {}, ir = tr, or = le, lr = ze, ur = Un, cr = Vt, sr = kt, dr = ar, fr = "Object already initialized", pr = or.TypeError, hr = or.WeakMap; if (ir || sr.state) { var vr = sr.state || (sr.state = new hr); vr.get = vr.get, vr.has = vr.has, vr.set = vr.set, Yn = function(e, t) { if (vr.has(e)) throw new pr(fr); return t.facade = e, vr.set(e, t), t }, Jn = function(e) { return vr.get(e) || {} }, Xn = function(e) { return vr.has(e) } } else { var mr = function(e) { return rr[e] || (rr[e] = nr(e)) }("state"); dr[mr] = !0, Yn = function(e, t) { if (cr(e, mr)) throw new pr(fr); return t.facade = e, ur(e, mr, t), t }, Jn = function(e) { return cr(e, mr) ? e[mr] : {} }, Xn = function(e) { return cr(e, mr) } } var yr = { set: Yn, get: Jn, has: Xn, enforce: function(e) { return Xn(e) ? Jn(e) : Yn(e, {}) }, getterFor: function(e) { return function(t) { var n; if (!lr(t) || (n = Jn(t)).type !== e) throw new pr("Incompatible receiver, " + e + " required"); return n } } }, gr = Ae, Er = ce, br = Ge, Cr = Vt, _r = se, Sr = Zn.CONFIGURABLE, Ir = Qn, Tr = yr.enforce, Ar = yr.get, Nr = String, wr = Object.defineProperty, Lr = gr("".slice), Or = gr("".replace), kr = gr([].join), Dr = _r && !Er((function() { return 8 !== wr((function() {}), "length", { value: 8 }).length })), Rr = String(String).split("String"), Pr = Wn.exports = function(e, t, n) { "Symbol(" === Lr(Nr(t), 0, 7) && (t = "[" + Or(Nr(t), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), n && n.getter && (t = "get " + t), n && n.setter && (t = "set " + t), (!Cr(e, "name") || Sr && e.name !== t) && (_r ? wr(e, "name", { value: t, configurable: !0 }) : e.name = t), Dr && n && Cr(n, "arity") && e.length !== n.arity && wr(e, "length", { value: n.arity }); try { n && Cr(n, "constructor") && n.constructor ? _r && wr(e, "prototype", { writable: !1 }) : e.prototype && (e.prototype = void 0) } catch (e) {} var r = Tr(e); return Cr(r, "source") || (r.source = kr(Rr, "string" == typeof t ? t : "")), e }; Function.prototype.toString = Pr((function() { return br(this) && Ar(this).source || Ir(this) }), "toString"); var xr = Wn.exports, Mr = Ge, Vr = En, Ur = xr, Wr = At, Hr = {}, Fr = Math.ceil, Gr = Math.floor, jr = Math.trunc || function(e) { var t = +e; return (t > 0 ? Gr : Fr)(t) }, zr = function(e) { var t = +e; return t != t || 0 === t ? 0 : jr(t) }, Zr = zr, qr = Math.max, Br = Math.min, Kr = zr, Yr = Math.min, Jr = He, Xr = function(e) { return function(e) { var t = Kr(e); return t > 0 ? Yr(t, 9007199254740991) : 0 }(e.length) }, Qr = function(e) { return function(t, n, r) { var a = Jr(t), i = Xr(a); if (0 === i) return !e && -1; var o, l = function(e, t) { var n = Zr(e); return n < 0 ? qr(n + t, 0) : Br(n, t) }(r, i); if (e && n != n) { for (; i > l;) if ((o = a[l++]) != o) return !0 } else for (; i > l; l++) if ((e || l in a) && a[l] === n) return e || l || 0; return !e && -1 } }, $r = { includes: Qr(!0), indexOf: Qr(!1) }, ea = Vt, ta = He, na = $r.indexOf, ra = ar, aa = Ae([].push), ia = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"].concat("length", "prototype"); Hr.f = Object.getOwnPropertyNames || function(e) { return function(e, t) { var n, r = ta(e), a = 0, i = []; for (n in r) !ea(ra, n) && ea(r, n) && aa(i, n); for (; t.length > a;) ea(r, n = t[a++]) && (~na(i, n) || aa(i, n)); return i }(e, ia) }; var oa = {}; oa.f = Object.getOwnPropertySymbols; var la = Be, ua = Hr, ca = oa, sa = In, da = Ae([].concat), fa = la("Reflect", "ownKeys") || function(e) { var t = ua.f(sa(e)), n = ca.f; return n ? da(t, n(e)) : t }, pa = Vt, ha = fa, va = ue, ma = En, ya = ce, ga = Ge, Ea = /#|\.prototype\./, ba = function(e, t) { var n = _a[Ca(e)]; return n === Ia || n !== Sa && (ga(t) ? ya(t) : !!t) }, Ca = ba.normalize = function(e) { return String(e).replace(Ea, ".").toLowerCase() }, _a = ba.data = {}, Sa = ba.NATIVE = "N", Ia = ba.POLYFILL = "P", Ta = ba, Aa = le, Na = ue.f, wa = Un, La = function(e, t, n, r) { r || (r = {}); var a = r.enumerable, i = void 0 !== r.name ? r.name : t; if (Mr(n) && Ur(n, i, r), r.global) a ? e[t] = n : Wr(t, n); else { try { r.unsafe ? e[t] && (a = !0) : delete e[t] } catch (e) {} a ? e[t] = n : Vr.f(e, t, { value: n, enumerable: !1, configurable: !r.nonConfigurable, writable: !r.nonWritable }) } return e }, Oa = At, ka = function(e, t, n) { for (var r = ha(t), a = ma.f, i = va.f, o = 0; o < r.length; o++) { var l = r[o]; pa(e, l) || n && pa(n, l) || a(e, l, i(t, l)) } }, Da = Ta, Ra = {}, Pa = mt, xa = TypeError, Ma = function(e) { var t, n; this.promise = new e((function(e, r) { if (void 0 !== t || void 0 !== n) throw new xa("Bad Promise constructor"); t = e, n = r })), this.resolve = Pa(t), this.reject = Pa(n) }; Ra.f = function(e) { return new Ma(e) }; var Va = Ra;! function(e, t) { var n, r, a, i, o, l = e.target, u = e.global, c = e.stat; if (n = u ? Aa : c ? Aa[l] || Oa(l, {}) : Aa[l] && Aa[l].prototype) for (r in t) { if (i = t[r], a = e.dontCallGetSet ? (o = Na(n, r)) && o.value : n[r], !Da(u ? r : l + (c ? "." : "#") + r, e.forced) && void 0 !== a) { if (B(i) == B(a)) continue; ka(i, a) }(e.sham || a && a.sham) && wa(i, "sham", !0), La(n, r, i, e) } }({ target: "Promise", stat: !0 }, { withResolvers: function() { var e = Va.f(this); return { promise: e.promise, resolve: e.resolve, reject: e.reject } } }); var Ua = K, Wa = Y, Ha = function(e, t) { try { return Wa(e()) } catch (e) { return Ua(t(e)) } }, Fa = {};! function(e) { var t = ie && ie.__spreadArray || function(e, t, n) { if (n || 2 === arguments.length) for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]); return e.concat(r || Array.prototype.slice.call(t)) }; function n(e) { return e } function r(e) { return function() { return e } } function a(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return function() { return t(e.apply(this, arguments)) }; case 3: return function() { return n(t(e.apply(this, arguments))) }; case 4: return function() { return r(n(t(e.apply(this, arguments)))) }; case 5: return function() { return a(r(n(t(e.apply(this, arguments))))) }; case 6: return function() { return i(a(r(n(t(e.apply(this, arguments)))))) }; case 7: return function() { return o(i(a(r(n(t(e.apply(this, arguments))))))) }; case 8: return function() { return l(o(i(a(r(n(t(e.apply(this, arguments)))))))) }; case 9: return function() { return u(l(o(i(a(r(n(t(e.apply(this, arguments))))))))) } } } function i(e) { throw new Error("Called `absurd` function which should be uncallable") } Object.defineProperty(e, "__esModule", { value: !0 }), e.dual = e.getEndomorphismMonoid = e.SK = e.hole = e.constVoid = e.constUndefined = e.constNull = e.constFalse = e.constTrue = e.unsafeCoerce = e.apply = e.getRing = e.getSemiring = e.getMonoid = e.getSemigroup = e.getBooleanAlgebra = void 0, e.identity = n, e.constant = r, e.flip = function(e) { return function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return t.length > 1 ? e(t[1], t[0]) : function(n) { return e(n)(t[0]) } } }, e.flow = a, e.tuple = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return e }, e.increment = function(e) { return e + 1 }, e.decrement = function(e) { return e - 1 }, e.absurd = i, e.tupled = function(e) { return function(t) { return e.apply(void 0, t) } }, e.untupled = function(e) { return function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return e(t) } }, e.pipe = function(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return t(e); case 3: return n(t(e)); case 4: return r(n(t(e))); case 5: return a(r(n(t(e)))); case 6: return i(a(r(n(t(e))))); case 7: return o(i(a(r(n(t(e)))))); case 8: return l(o(i(a(r(n(t(e))))))); case 9: return u(l(o(i(a(r(n(t(e)))))))); default: for (var c = arguments[0], s = 1; s < arguments.length; s++) c = arguments[s](c); return c } }, e.not = function(e) { return function(t) { return !e(t) } }, e.getBooleanAlgebra = function(e) { return function() { return { meet: function(t, n) { return function(r) { return e.meet(t(r), n(r)) } }, join: function(t, n) { return function(r) { return e.join(t(r), n(r)) } }, zero: function() { return e.zero }, one: function() { return e.one }, implies: function(t, n) { return function(r) { return e.implies(t(r), n(r)) } }, not: function(t) { return function(n) { return e.not(t(n)) } } } } }, e.getSemigroup = function(e) { return function() { return { concat: function(t, n) { return function(r) { return e.concat(t(r), n(r)) } } } } }, e.getMonoid = function(t) { var n = (0, e.getSemigroup)(t); return function() { return { concat: n().concat, empty: function() { return t.empty } } } }, e.getSemiring = function(e) { return { add: function(t, n) { return function(r) { return e.add(t(r), n(r)) } }, zero: function() { return e.zero }, mul: function(t, n) { return function(r) { return e.mul(t(r), n(r)) } }, one: function() { return e.one } } }, e.getRing = function(t) { var n = (0, e.getSemiring)(t); return { add: n.add, mul: n.mul, one: n.one, zero: n.zero, sub: function(e, n) { return function(r) { return t.sub(e(r), n(r)) } } } }, e.apply = function(e) { return function(t) { return t(e) } }, e.unsafeCoerce = n, e.constTrue = r(!0), e.constFalse = r(!1), e.constNull = r(null), e.constUndefined = r(void 0), e.constVoid = e.constUndefined, e.hole = i, e.SK = function(e, t) { return t }, e.getEndomorphismMonoid = function() { return { concat: function(e, t) { return a(e, t) }, empty: n } }, e.dual = function(e, n) { var r = "number" == typeof e ? function(t) { return t.length >= e } : e; return function() { var e = Array.from(arguments); return r(arguments) ? n.apply(this, e) : function(r) { return n.apply(void 0, t([r], e, !1)) } } } }(Fa); var Ga = /\{[^{}]+\}/g; function ja(e) { var t, n, r, a = z({}, e), i = a.baseUrl, o = void 0 === i ? "" : i, l = a.Request, u = void 0 === l ? globalThis.Request : l, c = a.fetch, s = void 0 === c ? globalThis.fetch : c, d = a.querySerializer, f = a.bodySerializer, p = a.headers, h = a.requestInitExt, v = q(a, ["baseUrl", "Request", "fetch", "querySerializer", "bodySerializer", "headers", "requestInitExt"]); h = "object" == ("undefined" == typeof process ? "undefined" : B(process)) && Number.parseInt(null === (t = process) || void 0 === t || null === (n = t.versions) || void 0 === n || null === (r = n.node) || void 0 === r ? void 0 : r.substring(0, 2)) >= 18 && process.versions.undici ? h : void 0, o = Ja(o); var m = []; function y(e, t) { return g.apply(this, arguments) } function g() { return g = function(e) { return function() { var t = this, n = arguments; return new Promise((function(r, a) { var i = e.apply(t, n); function o(e) { G(i, r, a, o, l, "next", e) } function l(e) { G(i, r, a, o, l, "throw", e) } o(void 0) })) } }(regeneratorRuntime.mark((function e(t, n) { var r, a, i, l, c, y, g, E, b, C, _, S, I, T, A, N, w, L, O, k, D, R, P, x, M, V, U, H, F, G, j, Z, K, Y, J, X; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: for (x in a = (r = n || {}).baseUrl, i = r.fetch, l = void 0 === i ? s : i, c = r.Request, y = r.headers, g = r.params, E = void 0 === g ? {} : g, b = r.parseAs, C = void 0 === b ? "json" : b, _ = r.querySerializer, S = r.bodySerializer, I = void 0 === S ? null != f ? f : Ka : S, T = r.body, A = q(r, ["baseUrl", "fetch", "Request", "headers", "params", "parseAs", "querySerializer", "bodySerializer", "body"]), a && (o = Ja(a)), N = "function" == typeof d ? d : Ba(d), _ && (N = "function" == typeof _ ? _ : Ba(z(z({}, "object" == B(d) ? d : {}), _))), w = void 0 === T ? void 0 : I(T), L = void 0 === w || w instanceof FormData ? {} : { "Content-Type": "application/json" }, O = z(z(z({ redirect: "follow" }, v), A), {}, { body: w, headers: Ya(L, p, y, E.header) }), P = new u(function(e, t) { var n, r, a = "".concat(t.baseUrl).concat(e); (null === (n = t.params) || void 0 === n ? void 0 : n.path) && (a = function(e, t) { var n, r, a = e, i = W(null !== (n = e.match(Ga)) && void 0 !== n ? n : []); try { for (i.s(); !(r = i.n()).done;) { var o = r.value, l = o.substring(1, o.length - 1), u = !1, c = "simple"; if (l.endsWith("*") && (u = !0, l = l.substring(0, l.length - 1)), l.startsWith(".") ? (c = "label", l = l.substring(1)) : l.startsWith(";") && (c = "matrix", l = l.substring(1)), t && void 0 !== t[l] && null !== t[l]) { var s = t[l]; a = Array.isArray(s) ? a.replace(o, qa(l, s, { style: c, explode: u })) : "object" != B(s) ? "matrix" !== c ? a.replace(o, "label" === c ? ".".concat(encodeURIComponent(s)) : encodeURIComponent(s)) : a.replace(o, ";".concat(za(l, s))) : a.replace(o, Za(l, s, { style: c, explode: u })) } } } catch (e) { i.e(e) } finally { i.f() } return a }(a, t.params.path)); var i = t.querySerializer(null !== (r = t.params.query) && void 0 !== r ? r : {}); return i.startsWith("?") && (i = i.substring(1)), i && (a += "?".concat(i)), a }(t, { baseUrl: o, params: E, querySerializer: N }), O), A) x in P || (P[x] = A[x]); if (!m.length) { e.next = 35; break } k = Math.random().toString(36).slice(2, 11), D = Object.freeze({ baseUrl: o, fetch: l, parseAs: C, querySerializer: N, bodySerializer: I }), M = W(m), e.prev = 10, M.s(); case 12: if ((V = M.n()).done) { e.next = 27; break } if (!(U = V.value) || "object" != B(U) || "function" != typeof U.onRequest) { e.next = 25; break } return e.next = 17, U.onRequest({ request: P, schemaPath: t, params: E, options: D, id: k }); case 17: if (!(H = e.sent)) { e.next = 25; break } if (H instanceof u) { e.next = 24; break } if (!(H instanceof Response)) { e.next = 23; break } return R = H, e.abrupt("break", 27); case 23: throw new Error("onRequest: must return new Request() or Response() when modifying the request"); case 24: P = H; case 25: e.next = 12; break; case 27: e.next = 32; break; case 29: e.prev = 29, e.t0 = e.catch(10), M.e(e.t0); case 32: return e.prev = 32, M.f(), e.finish(32); case 35: if (R) { e.next = 81; break } return e.prev = 36, e.next = 39, l(P, h); case 39: R = e.sent, e.next = 66; break; case 42: if (e.prev = 42, e.t1 = e.catch(36), F = e.t1, !m.length) { e.next = 64; break } G = m.length - 1; case 47: if (!(G >= 0)) { e.next = 64; break } if (!(j = m[G]) || "object" != B(j) || "function" != typeof j.onError) { e.next = 61; break } return e.next = 52, j.onError({ request: P, error: F, schemaPath: t, params: E, options: D, id: k }); case 52: if (!(Z = e.sent)) { e.next = 61; break } if (!(Z instanceof Response)) { e.next = 57; break } return F = void 0, R = Z, e.abrupt("break", 64); case 57: if (!(Z instanceof Error)) { e.next = 60; break } return F = Z, e.abrupt("continue", 61); case 60: throw new Error("onError: must return new Response() or instance of Error"); case 61: G--, e.next = 47; break; case 64: if (!F) { e.next = 66; break } throw F; case 66: if (!m.length) { e.next = 81; break } K = m.length - 1; case 68: if (!(K >= 0)) { e.next = 81; break } if (!(Y = m[K]) || "object" != B(Y) || "function" != typeof Y.onResponse) { e.next = 78; break } return e.next = 73, Y.onResponse({ request: P, response: R, schemaPath: t, params: E, options: D, id: k }); case 73: if (!(J = e.sent)) { e.next = 78; break } if (J instanceof Response) { e.next = 77; break } throw new Error("onResponse: must return new Response() when modifying the response"); case 77: R = J; case 78: K--, e.next = 68; break; case 81: if (204 !== R.status && "0" !== R.headers.get("Content-Length")) { e.next = 83; break } return e.abrupt("return", R.ok ? { data: void 0, response: R } : { error: void 0, response: R }); case 83: if (!R.ok) { e.next = 94; break } if ("stream" !== C) { e.next = 88; break } e.t2 = { data: R.body, response: R }, e.next = 93; break; case 88: return e.next = 90, R[C](); case 90: e.t3 = e.sent, e.t4 = R, e.t2 = { data: e.t3, response: e.t4 }; case 93: return e.abrupt("return", e.t2); case 94: return e.next = 96, R.text(); case 96: X = e.sent; try { X = JSON.parse(X) } catch (e) {} return e.abrupt("return", { error: X, response: R }); case 99: case "end": return e.stop() } }), e, null, [ [10, 29, 32, 35], [36, 42] ]) }))), g.apply(this, arguments) } return { request: function(e, t, n) { return y(t, z(z({}, n), {}, { method: e.toUpperCase() })) }, GET: function(e, t) { return y(e, z(z({}, t), {}, { method: "GET" })) }, PUT: function(e, t) { return y(e, z(z({}, t), {}, { method: "PUT" })) }, POST: function(e, t) { return y(e, z(z({}, t), {}, { method: "POST" })) }, DELETE: function(e, t) { return y(e, z(z({}, t), {}, { method: "DELETE" })) }, OPTIONS: function(e, t) { return y(e, z(z({}, t), {}, { method: "OPTIONS" })) }, HEAD: function(e, t) { return y(e, z(z({}, t), {}, { method: "HEAD" })) }, PATCH: function(e, t) { return y(e, z(z({}, t), {}, { method: "PATCH" })) }, TRACE: function(e, t) { return y(e, z(z({}, t), {}, { method: "TRACE" })) }, use: function() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; for (var r = 0, a = t; r < a.length; r++) { var i = a[r]; if (i) { if ("object" != B(i) || !("onRequest" in i || "onResponse" in i || "onError" in i)) throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`"); m.push(i) } } }, eject: function() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; for (var r = 0, a = t; r < a.length; r++) { var i = a[r], o = m.indexOf(i); - 1 !== o && m.splice(o, 1) } } } } function za(e, t, n) { if (null == t) return ""; if ("object" == B(t)) throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these."); return "".concat(e, "=").concat(!0 === (null == n ? void 0 : n.allowReserved) ? t : encodeURIComponent(t)) } function Za(e, t, n) { if (!t || "object" != B(t)) return ""; var r = [], a = { simple: ",", label: ".", matrix: ";" } [n.style] || "&"; if ("deepObject" !== n.style && !1 === n.explode) { for (var i in t) r.push(i, !0 === n.allowReserved ? t[i] : encodeURIComponent(t[i])); var o = r.join(","); switch (n.style) { case "form": return "".concat(e, "=").concat(o); case "label": return ".".concat(o); case "matrix": return ";".concat(e, "=").concat(o); default: return o } } for (var l in t) { var u = "deepObject" === n.style ? "".concat(e, "[").concat(l, "]") : l; r.push(za(u, t[l], n)) } var c = r.join(a); return "label" === n.style || "matrix" === n.style ? "".concat(a).concat(c) : c } function qa(e, t, n) { if (!Array.isArray(t)) return ""; if (!1 === n.explode) { var r = { form: ",", spaceDelimited: "%20", pipeDelimited: "|" } [n.style] || ",", a = (!0 === n.allowReserved ? t : t.map((function(e) { return encodeURIComponent(e) }))).join(r); switch (n.style) { case "simple": return a; case "label": return ".".concat(a); case "matrix": return ";".concat(e, "=").concat(a); default: return "".concat(e, "=").concat(a) } } var i, o = { simple: ",", label: ".", matrix: ";" } [n.style] || "&", l = [], u = W(t); try { for (u.s(); !(i = u.n()).done;) { var c = i.value; "simple" === n.style || "label" === n.style ? l.push(!0 === n.allowReserved ? c : encodeURIComponent(c)) : l.push(za(e, c, n)) } } catch (e) { u.e(e) } finally { u.f() } return "label" === n.style || "matrix" === n.style ? "".concat(o).concat(l.join(o)) : l.join(o) } function Ba(e) { return function(t) { var n = []; if (t && "object" == B(t)) for (var r in t) { var a = t[r]; if (null != a) if (Array.isArray(a)) { if (0 === a.length) continue; n.push(qa(r, a, z(z({ style: "form", explode: !0 }, null == e ? void 0 : e.array), {}, { allowReserved: (null == e ? void 0 : e.allowReserved) || !1 }))) } else "object" != B(a) ? n.push(za(r, a, e)) : n.push(Za(r, a, z(z({ style: "deepObject", explode: !0 }, null == e ? void 0 : e.object), {}, { allowReserved: (null == e ? void 0 : e.allowReserved) || !1 }))) } return n.join("&") } } function Ka(e) { return e instanceof FormData ? e : JSON.stringify(e) } function Ya() { for (var e = new Headers, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; for (var a = 0, i = n; a < i.length; a++) { var o = i[a]; if (o && "object" == B(o)) { var l, u = W(o instanceof Headers ? o.entries() : Object.entries(o)); try { for (u.s(); !(l = u.n()).done;) { var c = U(l.value, 2), s = c[0], d = c[1]; if (null === d) e.delete(s); else if (Array.isArray(d)) { var f, p = W(d); try { for (p.s(); !(f = p.n()).done;) { var h = f.value; e.append(s, h) } } catch (e) { p.e(e) } finally { p.f() } } else void 0 !== d && e.set(s, d) } } catch (e) { u.e(e) } finally { u.f() } } } return e } function Ja(e) { return e.endsWith("/") ? e.substring(0, e.length - 1) : e } var Xa, Qa, $a = (null === (Qa = null === (Xa = window.Roblox) || void 0 === Xa ? void 0 : Xa.Cookies) || void 0 === Qa ? void 0 : Qa.getBrowserTrackerId) || function() { return "unknown" }, ei = function(e, t) { var n = ja({ baseUrl: e() }); return te(t) || n.use.apply(n, t.value), n }, ti = function() { var e, t, n, r = null !== (n = null === (t = null === (e = window.Roblox) || void 0 === e ? void 0 : e.EnvironmentUrls) || void 0 === t ? void 0 : t.apiGatewayUrl) && void 0 !== n ? n : "NOT_FOUND"; return "".concat(r, "/account-security-service") }, ni = ti(), ri = ei((function() { return ni }), J), ai = function(e, t, n) { for (var r = [], a = 3; a < arguments.length; a++) r[a - 3] = arguments[a]; return ne(void 0, ae([e, t, n], r, !0), void 0, (function(e, t, n, r) { return void 0 === r && (r = ri), re(this, (function(a) { switch (a.label) { case 0: return [4, (i = function() { return ne(void 0, void 0, void 0, (function() { return re(this, (function(a) { return [2, r.POST("/v1/metrics/record", { baseUrl: ti(), body: { identifier: n || $a(), name: e, labelValues: t, value: 1 } })] })) })) }, function() { return function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }(void 0, void 0, void 0, (function() { return function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(l) { return function(u) { return function(l) { if (n) throw new TypeError("Generator is already executing."); for (; i && (i = 0, l[0] && (o = 0)), o;) try { if (n = 1, r && (a = 2 & l[0] ? r.return : l[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, l[1])).done) return a; switch (r = 0, a && (l = [2 & l[0], a.value]), l[0]) { case 0: case 1: a = l; break; case 4: return o.label++, { value: l[1], done: !1 }; case 5: o.label++, r = l[1], l = [0]; continue; case 7: l = o.ops.pop(), o.trys.pop(); continue; default: if (!((a = (a = o.trys).length > 0 && a[a.length - 1]) || 6 !== l[0] && 2 !== l[0])) { o = 0; continue } if (3 === l[0] && (!a || l[1] > a[0] && l[1] < a[3])) { o.label = l[1]; break } if (6 === l[0] && o.label < a[1]) { o.label = a[1], a = l; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(l); break } a[2] && o.ops.pop(), o.trys.pop(); continue } l = t.call(e, o) } catch (e) { l = [6, e], r = 0 } finally { n = a = 0 } if (5 & l[0]) throw l[1]; return { value: l[0] ? l[1] : void 0, done: !0 } }([l, u]) } } }(this, (function(e) { switch (e.label) { case 0: return e.trys.push([0, 2, , 3]), [4, i().then(Y)]; case 1: return [2, e.sent()]; case 2: return e.sent(), [2, K(void 0)]; case 3: return [2] } })) })) })()]; case 1: return a.sent(), [2] } var i })) })) }, ii = "rbxIndexedDBSmokeTest", oi = function(e, t, n) { var r, a = Promise.withResolvers(), i = a.promise, o = a.resolve, l = a.reject; switch (t) { default: if (e.objectStoreNames.contains(n)) { ai(ii, { success: "true", arm: "transaction-upgrade-objstore-exists" }), o(null); break } Fa.pipe(Ha((function() { return e.createObjectStore(n) }), (function(e) { var t, n = "unknownerr-create-objstore"; return ai(ii, { success: "false", arm: "transaction-upgrade-objstore-creation", error: null !== (t = e instanceof Error && (null == e ? void 0 : e.message) || n) && void 0 !== t ? t : n }), l(new Error("Could not create object store.")), Ua(e) })), (r = function(e) { return ai(ii, { success: "true", arm: "transaction-upgrade-objstore-creation" }), o(e) }, function(e) { return function(e) { return "Left" === e._tag }(e) ? e : Wa(r(e.right)) })) } return i }, li = function(e) { var t = e.request, n = e.objectStoreName, r = e.upgradesHandler, a = Promise.withResolvers(), i = a.promise, o = a.resolve, l = a.reject; return t.onsuccess = function(e) { var t = e.target.result; ai(ii, { success: "true", arm: "connection" }), o(t) }, t.onerror = function(e) { var t, n = e.target.error; ai(ii, { success: "false", arm: "connection", error: null !== (t = null == n ? void 0 : n.message) && void 0 !== t ? t : "unknown-onerror" }), l(n) }, t.onupgradeneeded = function(e) { return ne(void 0, void 0, void 0, (function() { var t, a, l, u; return re(this, (function(c) { switch (c.label) { case 0: return t = e.target, a = t.result, [4, r(a, e.oldVersion, n)]; case 1: return l = c.sent(), u = Fa.pipe(null == (s = l) ? J : X(s), Q((function(e) { return e.transaction.oncomplete = function() { ai(ii, { success: "true", arm: "connection-initial-transaction" }), o(a) }, i }))), ee(u) || (ai(ii, { success: "true", arm: "connection-initial-transaction-early" }), o(a)), [2] } var s })) })) }, t.onblocked = function(e) { var t = e.target.result; ai(ii, { success: "true", arm: "connection-blocked" }), t.close() }, i }, ui = function(e) { var t = e.databaseName, n = e.objectStoreName, r = e.version; return Fa.pipe(Ha((function() { return ai(ii, { success: "true", arm: "open-connection" }), li({ request: indexedDB.open(t, r), objectStoreName: n, upgradesHandler: oi }) }), (function(e) { var t, n = "unknownerr-open-connection"; return ai(ii, { success: "false", arm: "open-connection", error: null !== (t = e instanceof Error && (null == e ? void 0 : e.message) || n) && void 0 !== t ? t : n }), e })), $) }, ci = function(e) { var t = e.database, n = e.objectStoreName, r = e.key; if (!t.objectStoreNames.contains(n)) return J; var a = Promise.withResolvers(), i = a.promise, o = a.resolve, l = t.transaction(n, "readonly"); return l.oncomplete = function() { ai(ii, { success: "true", arm: "transaction-get-complete" }) }, l.objectStore(n).get(r).onsuccess = function(e) { var t = e.target.result; ai(ii, { success: "true", arm: "transaction-get" }), o(t) }, X(i) }, si = function(e) { var t = e.database, n = e.objectStoreName, r = e.key, a = e.value; if (!t.objectStoreNames.contains(n)) return J; var i = Promise.withResolvers(), o = i.promise, l = i.resolve, u = t.transaction(n, "readwrite"); return u.oncomplete = function() { ai(ii, { success: "true", arm: "transaction-put-complete" }) }, u.objectStore(n).put(a, r).onsuccess = function(e) { var t = e.target.result; ai(ii, { success: "true", arm: "transaction-put" }), l(t) }, X(o) }, di = function() { var e, t, n, r = null !== (n = null === (t = null === (e = window.Roblox) || void 0 === e ? void 0 : e.EnvironmentUrls) || void 0 === t ? void 0 : t.apiGatewayUrl) && void 0 !== n ? n : "NOT_FOUND"; return "".concat(r, "/rotating-client-service") }(), fi = ei((function() { return di }), J), pi = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return ne(void 0, ae([], e, !0), void 0, (function(e) { var t; return void 0 === e && (e = fi), re(this, (function(n) { switch (n.label) { case 0: return [4, e.GET("/v1/metadata")]; case 1: return (t = n.sent()).error ? [2, { enableIndexedDbTelemetry: !1 }] : [2, t.data] } })) })) }, hi = "rbxInstrumentationStore", vi = "rbxTimestamp", mi = Roblox, yi = n.n(mi); function gi(e, t, n) { return gi = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(e, t, n) { var r = function(e, t) { for (; !Object.prototype.hasOwnProperty.call(e, t) && null !== (e = _i(e));); return e }(e, t); if (r) { var a = Object.getOwnPropertyDescriptor(r, t); return a.get ? a.get.call(n) : a.value } }, gi(e, t, n || e) } function Ei(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && bi(e, t) } function bi(e, t) { return bi = Object.setPrototypeOf || function(e, t) { return e.__proto__ = t, e }, bi(e, t) } function Ci(e) { var t = function() { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], (function() {}))), !0 } catch (e) { return !1 } }(); return function() { var n, r = _i(e); if (t) { var a = _i(this).constructor; n = Reflect.construct(r, arguments, a) } else n = r.apply(this, arguments); return function(e, t) { if (t && ("object" === Li(t) || "function" == typeof t)) return t; return function(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e }(e) }(this, n) } } function _i(e) { return _i = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { return e.__proto__ || Object.getPrototypeOf(e) }, _i(e) } function Si(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function Ii(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } function Ti(e, t, n) { return t && Ii(e.prototype, t), n && Ii(e, n), e } function Ai(e) { return function(e) { if (Array.isArray(e)) return wi(e) }(e) || function(e) { if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e) }(e) || Ni(e) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function Ni(e, t) { if (e) { if ("string" == typeof e) return wi(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? wi(e, t) : void 0 } } function wi(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r } function Li(e) { return Li = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, Li(e) } var Oi = function() { function e(t, n) { Si(this, e), t = this.words = t || [], this.sigBytes = void 0 !== n ? n : 4 * t.length } return Ti(e, [{ key: "toString", value: function(e) { return (e || ki).stringify(this) } }, { key: "concat", value: function(e) { if (this.clamp(), this.sigBytes % 4) for (var t = 0; t < e.sigBytes; t++) { var n = e.words[t >>> 2] >>> 24 - t % 4 * 8 & 255; this.words[this.sigBytes + t >>> 2] |= n << 24 - (this.sigBytes + t) % 4 * 8 } else for (var r = 0; r < e.sigBytes; r += 4) this.words[this.sigBytes + r >>> 2] = e.words[r >>> 2]; return this.sigBytes += e.sigBytes, this } }, { key: "clamp", value: function() { this.words[this.sigBytes >>> 2] &= 4294967295 << 32 - this.sigBytes % 4 * 8, this.words.length = Math.ceil(this.sigBytes / 4) } }, { key: "clone", value: function() { return new e(Ai(this.words)) } }]), e }(), ki = { stringify: function(e) { for (var t = [], n = 0; n < e.sigBytes; n++) { var r = e.words[n >>> 2] >>> 24 - n % 4 * 8 & 255; t.push((r >>> 4).toString(16), (15 & r).toString(16)) } return t.join("") } }, Di = function(e) { for (var t = e.length, n = [], r = 0; r < t; r++) n[r >>> 2] |= (255 & e.charCodeAt(r)) << 24 - r % 4 * 8; return new Oi(n, t) }, Ri = function(e) { return Di(unescape(encodeURIComponent(e))) }, Pi = function(e) { Ei(n, e); var t = Ci(n); function n() { return Si(this, n), t.apply(this, arguments) } return Ti(n, [{ key: "update", value: function(e) { return this._append(e), this._process(), this } }, { key: "finalize", value: function(e) { e && this._append(e) } }]), n }(function() { function e() { Si(this, e), this._minBufferSize = 0, this.blockSize = 16, this.reset() } return Ti(e, [{ key: "reset", value: function() { this._data = new Oi, this._nDataBytes = 0 } }, { key: "_append", value: function(e) { "string" == typeof e && (e = Ri(e)), this._data.concat(e), this._nDataBytes += e.sigBytes } }, { key: "_doProcessBlock", value: function(e, t) {} }, { key: "_process", value: function(e) { var t, n = this._data.sigBytes / (4 * this.blockSize), r = (n = e ? Math.ceil(n) : Math.max((0 | n) - this._minBufferSize, 0)) * this.blockSize, a = Math.min(4 * r, this._data.sigBytes); if (r) { for (var i = 0; i < r; i += this.blockSize) this._doProcessBlock(this._data.words, i); t = this._data.words.splice(0, r), this._data.sigBytes -= a } return new Oi(t, a) } }]), e }()), xi = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225], Mi = [1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998], Vi = [], Ui = function(e) { Ei(n, e); var t = Ci(n); function n() { var e; return Si(this, n), (e = t.call(this)).reset(), e } return Ti(n, [{ key: "reset", value: function() { gi(_i(n.prototype), "reset", this).call(this), this._hash = new Oi([].concat(xi)) } }, { key: "_doProcessBlock", value: function(e, t) { for (var n = this._hash.words, r = n[0], a = n[1], i = n[2], o = n[3], l = n[4], u = n[5], c = n[6], s = n[7], d = 0; d < 64; d++) { if (d < 16) Vi[d] = 0 | e[t + d]; else { var f = Vi[d - 15], p = (f << 25 | f >>> 7) ^ (f << 14 | f >>> 18) ^ f >>> 3, h = Vi[d - 2], v = (h << 15 | h >>> 17) ^ (h << 13 | h >>> 19) ^ h >>> 10; Vi[d] = p + Vi[d - 7] + v + Vi[d - 16] } var m = r & a ^ r & i ^ a & i, y = (r << 30 | r >>> 2) ^ (r << 19 | r >>> 13) ^ (r << 10 | r >>> 22), g = s + ((l << 26 | l >>> 6) ^ (l << 21 | l >>> 11) ^ (l << 7 | l >>> 25)) + (l & u ^ ~l & c) + Mi[d] + Vi[d]; s = c, c = u, u = l, l = o + g | 0, o = i, i = a, a = r, r = g + (y + m) | 0 } n[0] = n[0] + r | 0, n[1] = n[1] + a | 0, n[2] = n[2] + i | 0, n[3] = n[3] + o | 0, n[4] = n[4] + l | 0, n[5] = n[5] + u | 0, n[6] = n[6] + c | 0, n[7] = n[7] + s | 0 } }, { key: "finalize", value: function(e) { gi(_i(n.prototype), "finalize", this).call(this, e); var t = 8 * this._nDataBytes, r = 8 * this._data.sigBytes; return this._data.words[r >>> 5] |= 128 << 24 - r % 32, this._data.words[14 + (r + 64 >>> 9 << 4)] = Math.floor(t / 4294967296), this._data.words[15 + (r + 64 >>> 9 << 4)] = t, this._data.sigBytes = 4 * this._data.words.length, this._process(), this._hash } }]), n }(Pi); var Wi, Hi, Fi = React, Gi = n.n(Fi), ji = ReactDOM, zi = CoreUtilities, Zi = function(e) { return { isError: !1, value: e } }, qi = Zi, Bi = function(e, t, n) { return void 0 === n && (n = null), { isError: !0, error: e, errorRaw: t, errorStatusCode: n } }, Ki = function(e, t) { return e.isError ? e : Zi(t(e.value)) }, Yi = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Ji = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Xi = function(e) { return "object" != typeof e ? null : function(e) { var t = []; if (!e || "object" != typeof e) return []; var n = e.errors; return n instanceof Array ? (n.forEach((function(e) { if (e && "object" == typeof e) { var n = e.code; "number" == typeof n && t.push(n) } })), t) : [] }(e.data)[0] || null }, Qi = function(e, t) { return null == e ? null : Object.values(e).includes(t) ? t : null }, $i = function(e, t, n) { return Yi(void 0, void 0, Promise, (function() { var r, a, i, o; return Ji(this, (function(l) { switch (l.label) { case 0: return l.trys.push([0, 2, , 3]), [4, e]; case 1: return r = l.sent(), void 0 !== n ? [2, qi(n(r.data))] : [2, qi(r.data)]; case 2: return a = l.sent(), i = Xi(a), o = function(e) { if ("object" != typeof e || null === e) return null; var t = e.status || null; return "number" != typeof t ? null : t }(a), [2, Bi(Qi(t, i), a, o)]; case 3: return [2] } })) })) }, eo = function(e, t, n, r) { return void 0 === n && (n = Xi), Yi(void 0, void 0, Promise, (function() { var a, i, o; return Ji(this, (function(l) { switch (l.label) { case 0: return l.trys.push([0, 2, , 3]), [4, e]; case 1: return a = l.sent(), void 0 !== r ? [2, qi(r(a))] : [2, qi(a)]; case 2: return i = l.sent(), o = n(i), [2, Bi(Qi(t, o), i, 0)]; case 3: return [2] } })) })) }, to = (null !== (Wi = mi.EnvironmentUrls.apiGatewayCdnUrl) && void 0 !== Wi ? Wi : "URL_NOT_FOUND") + "/captcha";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(Hi || (Hi = {})); var no, ro, ao = { url: to + "/v1/metadata", timeout: 6e4 }, io = function() { return $i(zi.httpService.get(ao, {}), Hi) }, oo = null !== (no = mi.EnvironmentUrls.accountSettingsApi) && void 0 !== no ? no : "URL_NOT_FOUND";! function(e) { e[e.FEATURE_DISABLED = 2] = "FEATURE_DISABLED", e[e.TOO_MANY_ACCOUNTS_ON_EMAIL = 3] = "TOO_MANY_ACCOUNTS_ON_EMAIL", e[e.TOO_MANY_ATTEMPTS_TO_UPDATE_EMAIL = 6] = "TOO_MANY_ATTEMPTS_TO_UPDATE_EMAIL", e[e.INVALID_EMAIL_ADDRESS = 9] = "INVALID_EMAIL_ADDRESS" }(ro || (ro = {})); var lo, uo, co = { withCredentials: !0, url: oo + "/v1/email", timeout: 1e4 }, so = { withCredentials: !0, url: oo + "/v1/email", timeout: 1e4 }, fo = function(e) { return $i(zi.httpService.post(co, { emailAddress: e, skipVerificationEmail: !0 }), ro) }, po = function() { return $i(zi.httpService.get(so), ro) }, ho = null !== (lo = mi.EnvironmentUrls.gamesApi) && void 0 !== lo ? lo : "URL_NOT_FOUND";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(uo || (uo = {})); var vo, mo = { url: ho + "/v1/games", timeout: 1e4 }, yo = function(e) { return $i(zi.httpService.get(mo, { universeIds: e }), uo) };! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(vo || (vo = {})); var go, Eo, bo = { withCredentials: !0, url: "/my/settings/json", timeout: 1e4 }, Co = function() { return $i(zi.httpService.get(bo, {}), vo) }, _o = (null !== (go = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== go ? go : "URL_NOT_FOUND") + "/otp-service";! function(e) { e[e.NO_ERROR = 0] = "NO_ERROR", e[e.UNKNOWN = 1] = "UNKNOWN", e[e.INVALID_CODE = 2] = "INVALID_CODE", e[e.INVALID_SESSION_TOKEN = 3] = "INVALID_SESSION_TOKEN", e[e.CODE_EXPIRED = 4] = "CODE_EXPIRED", e[e.UNVALIDATED_SESSION_TOKEN = 5] = "UNVALIDATED_SESSION_TOKEN", e[e.TOO_MANY_REQUESTS = 6] = "TOO_MANY_REQUESTS", e[e.CONTACT_MALFORMED = 7] = "CONTACT_MALFORMED", e[e.VPN_REQUIRED = 8] = "VPN_REQUIRED", e[e.UNAUTHENTICATED = 9] = "UNAUTHENTICATED", e[e.METHOD_UNAVAILABLE = 10] = "METHOD_UNAVAILABLE" }(Eo || (Eo = {})); var So, Io, To, Ao = { withCredentials: !0, url: _o + "/v1/sendCodeForUser", timeout: 1e4 }, No = { withCredentials: !0, url: _o + "/v1/resendCode", timeout: 1e4 }, wo = { withCredentials: !0, url: _o + "/v1/validateCode", timeout: 1e4 }, Lo = { withCredentials: !0, url: _o + "/v1/metadata", timeout: 1e4 };! function(e) { e.Unset = "Unset", e.Email = "Email" }(So || (So = {})), function(e) { e.Reauth = "Reauth", e.Challenge = "Challenge" }(Io || (Io = {})), function(e) { e.Default = "Default" }(To || (To = {})); var Oo, ko, Do = function(e) { return $i(zi.httpService.post(Ao, { contactType: e, origin: Io.Reauth, messageVariant: To.Default }), Eo) }, Ro = function(e, t) { return $i(zi.httpService.post(No, { contactType: e, origin: Io.Reauth, otpSessionToken: t }), Eo) }, Po = function(e, t, n) { return $i(zi.httpService.post(wo, { contactType: e, origin: Io.Reauth, passCode: n, otpSessionToken: t }), Eo) }, xo = function(e) { return $i(zi.httpService.get(Lo, { Origin: e }), Eo) }, Mo = null !== (Oo = mi.EnvironmentUrls.authApi) && void 0 !== Oo ? Oo : "URL_NOT_FOUND";! function(e) { e[e.FLOODED = 2] = "FLOODED", e[e.INVALID_PASSWORD = 7] = "INVALID_PASSWORD", e[e.INVALID_CURRENT_PASSWORD = 8] = "INVALID_CURRENT_PASSWORD" }(ko || (ko = {})); var Vo, Uo = { withCredentials: !0, url: Mo + "/v2/user/passwords/change", timeout: 1e4 };! function(e) { e[e.USER_DOES_NOT_HAVE_EMAIL = 22] = "USER_DOES_NOT_HAVE_EMAIL" }(Vo || (Vo = {})); var Wo, Ho = { withCredentials: !0, url: Mo + "/v2/passwords/reset/send-prompted", timeout: 1e4 };! function(e) { e[e.VALID_PASSWORD = 0] = "VALID_PASSWORD", e[e.WEAK_PASSWORD = 1] = "WEAK_PASSWORD", e[e.SHORT_PASSWORD = 2] = "SHORT_PASSWORD", e[e.PASSWORD_SAME_AS_USERNAME = 3] = "PASSWORD_SAME_AS_USERNAME", e[e.FORBIDDEN_PASSWORD = 4] = "FORBIDDEN_PASSWORD", e[e.DUMB_STRINGS = 5] = "DUMB_STRINGS" }(Wo || (Wo = {})); var Fo, Go, jo, zo = { withCredentials: !0, url: Mo + "/v2/passwords/validate", timeout: 1e4 }, Zo = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, qo = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Bo = function(e, t) { return $i(zi.httpService.post(Uo, { currentPassword: e, newPassword: t }), ko) }, Ko = function() { return $i(zi.httpService.post(Ho), Vo) }, Yo = function(e, t) { return Zo(void 0, void 0, Promise, (function() { return qo(this, (function(n) { return [2, $i(zi.httpService.post(zo, { username: e, password: t }), null).then((function(e) { return Ki(e, (function(e) { return Qi(Wo, e.code) })) }))] })) })) }, Jo = "URL_NOT_FOUND", Xo = null !== (Fo = mi.EnvironmentUrls.accountInformationApi) && void 0 !== Fo ? Fo : Jo, Qo = null !== (Go = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== Go ? Go : Jo;! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(jo || (jo = {})); var $o, el, tl = { withCredentials: !0, url: Xo + "/v1/phone", timeout: 1e4 }, nl = { withCredentials: !0, url: Qo + "/phone-number-api/v1/phone-prefix-list", timeout: 1e4 }, rl = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, al = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, il = function() { return rl(void 0, void 0, Promise, (function() { return al(this, (function(e) { return [2, $i(zi.httpService.get(tl, {}), jo)] })) })) }, ol = function(e) { var t = e.find((function(e) { return e.isDefault })), n = e; return void 0 !== t && (n = e.filter((function(e) { return e.code !== t.code })), n.unshift(t)), n }, ll = function() { return rl(void 0, void 0, Promise, (function() { return al(this, (function(e) { return [2, $i(zi.httpService.get(nl, {}), jo, ol)] })) })) }, ul = null !== ($o = mi.EnvironmentUrls.authApi) && void 0 !== $o ? $o : "URL_NOT_FOUND", cl = "palisades-live";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(el || (el = {})); var sl, dl, fl, pl, hl, vl = { withCredentials: !0, url: ul + "/v1/" + cl + "/is-live", timeout: 1e4 }, ml = { withCredentials: !0, url: ul + "/v1/" + cl + "/disconnect", timeout: 1e4 }, yl = function() { return $i(zi.httpService.get(vl, {}), el) }, gl = function() { return $i(zi.httpService.post(ml, {}), el) }, El = (null !== (sl = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== sl ? sl : "URL_NOT_FOUND") + "/account-security-service";! function(e) { e[e.UNKNOWN = 1] = "UNKNOWN", e[e.REQUEST_TYPE_WAS_INVALID = 2] = "REQUEST_TYPE_WAS_INVALID", e[e.PROMPT_ASSIGNMENT_WAS_NOT_UPDATED = 3] = "PROMPT_ASSIGNMENT_WAS_NOT_UPDATED", e[e.UNKNOWN_PROMPT_TYPE = 4] = "UNKNOWN_PROMPT_TYPE" }(dl || (dl = {})), function(e) { e.TEXT_ONLY_BANNER = "DISPLAY_TYPE_TEXT_ONLY_BANNER" }(fl || (fl = {})), function(e) { e.GLOBAL = "PAGE_RESTRICTION_GLOBAL", e.HOME_PAGE_ONLY = "PAGE_RESTRICTION_HOME_PAGE" }(pl || (pl = {})), function(e) { e.CHANGE_PASSWORD__SUSPECTED_COMPROMISE = "PROMPT_TYPE_CHANGE_PASSWORD__SUSPECTED_COMPROMISE", e.CHANGE_PASSWORD__BREACHED_CREDENTIAL = "PROMPT_TYPE_CHANGE_PASSWORD__BREACHED_CREDENTIAL", e.AUTHENTICATOR_UPSELL = "PROMPT_TYPE_AUTHENTICATOR_UPSELL", e.ACCOUNT_RESTORES_POLICY_UPDATE = "PROMPT_TYPE_ACCOUNT_RESTORES_POLICY_UPDATE", e.ACCOUNT_RESTORES_POLICY_UPDATE_V2 = "PROMPT_TYPE_ACCOUNT_RESTORES_POLICY_UPDATE_V2", e.ACCOUNT_RESTORES_POLICY_UPDATE_V3 = "PROMPT_TYPE_ACCOUNT_RESTORES_POLICY_UPDATE_V3", e.ACCOUNT_RESTORES_POLICY_UPSELL = "PROMPT_TYPE_ACCOUNT_RESTORES_POLICY_UPSELL", e.BROADER_AUTHENTICATOR_UPSELL = "PROMPT_TYPE_BROADER_AUTHENTICATOR_UPSELL", e.EMAIL_2SV_UPSELL = "PROMPT_TYPE_EMAIL_2SV_UPSELL" }(hl || (hl = {})); var bl, Cl = { withCredentials: !0, url: El + "/v1/prompt-assignments", timeout: 1e4 };! function(e) { e.DISMISS_PROMPT = "DISMISS_PROMPT", e.DISABLE_PROMPT = "DISABLE_PROMPT" }(bl || (bl = {})); var _l, Sl, Il = { withCredentials: !0, url: El + "/v1/prompt-assignments", timeout: 1e4 }, Tl = function() { return Tl = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, Tl.apply(this, arguments) }, Al = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Nl = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, wl = function() { return Al(void 0, void 0, Promise, (function() { var e; return Nl(this, (function(t) { switch (t.label) { case 0: return [4, $i(zi.httpService.get(Cl, { shouldReturnMetadata: !0 }), dl)]; case 1: return (e = t.sent()).isError ? [2, e] : [2, e = Tl(Tl({}, e), { value: e.value.filter((function(e) { return e.isGeneric ? Object.values(fl).includes(e.metadata.displayType) : Object.values(hl).includes(e.promptType) })) })] } })) })) }, Ll = function(e, t) { return $i(zi.httpService.post(Il, { action: e, promptType: t }), dl) }, Ol = (null !== (_l = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== _l ? _l : "URL_NOT_FOUND") + "/proof-of-space";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.INTERNAL_ERROR = 1] = "INTERNAL_ERROR", e[e.INVALID_REQUEST = 2] = "INVALID_REQUEST", e[e.INVALID_SESSION = 3] = "INVALID_SESSION" }(Sl || (Sl = {})); var kl, Dl, Rl, Pl = { withCredentials: !0, url: Ol + "/v1/verify", timeout: 1e4 }, xl = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Ml = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Vl = function(e, t) { return xl(void 0, void 0, Promise, (function() { return Ml(this, (function(n) { return [2, $i(zi.httpService.post(Pl, { challengeId: e, solution: t }), Sl)] })) })) }, Ul = (null !== (kl = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== kl ? kl : "URL_NOT_FOUND") + "/proof-of-work-service";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.REQUEST_INVALID = 1] = "REQUEST_INVALID", e[e.SESSION_INACTIVE = 2] = "SESSION_INACTIVE" }(Dl || (Dl = {})), function(e) { e[e.TIME_LOCK = 0] = "TIME_LOCK" }(Rl || (Rl = {})); var Wl, Hl, Fl = { withCredentials: !0, url: Ul + "/v1/pow-puzzle", timeout: 1e4 }, Gl = { withCredentials: !0, url: Ul + "/v1/pow-puzzle", timeout: 1e4 }, jl = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, zl = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Zl = function(e) { return $i(zi.httpService.get(Fl, { sessionID: e }), Dl) }, ql = function(e, t) { return jl(void 0, void 0, Promise, (function() { return zl(this, (function(n) { return [2, $i(zi.httpService.post(Gl, { sessionID: e, solution: t }), Dl)] })) })) }, Bl = (null !== (Wl = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== Wl ? Wl : "URL_NOT_FOUND") + "/reauthentication-service";! function(e) { e[e.UNKNOWN = 1] = "UNKNOWN", e[e.REQUEST_TYPE_WAS_INVALID = 2] = "REQUEST_TYPE_WAS_INVALID", e[e.PASSWORD_INCORRECT = 3] = "PASSWORD_INCORRECT", e[e.OTP_EMAIL_REDEEM_FAILURE = 4] = "OTP_EMAIL_REDEEM_FAILURE" }(Hl || (Hl = {})); var Kl, Yl, Jl = { withCredentials: !0, url: Bl + "/v1/token/generate", timeout: 1e4 }, Xl = function(e) { return $i(zi.httpService.post(Jl, e), Hl) }, Ql = (null !== (Kl = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== Kl ? Kl : "URL_NOT_FOUND") + "/rostile";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.INTERNAL_ERROR = 1] = "INTERNAL_ERROR", e[e.INVALID_REQUEST = 2] = "INVALID_REQUEST", e[e.INVALID_SESSION = 3] = "INVALID_SESSION" }(Yl || (Yl = {})); var $l, eu, tu, nu, ru = { withCredentials: !0, url: Ql + "/v1/verify", timeout: 1e4 }, au = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, iu = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, ou = function(e, t) { return au(void 0, void 0, Promise, (function() { return iu(this, (function(n) { return [2, $i(zi.httpService.post(ru, { challengeId: e, solution: t }), Yl)] })) })) }, lu = (null !== ($l = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== $l ? $l : "URL_NOT_FOUND") + "/account-security-service";! function(e) { e[e.UNKNOWN = 1] = "UNKNOWN", e[e.REQUEST_TYPE_WAS_INVALID = 2] = "REQUEST_TYPE_WAS_INVALID", e[e.SECURITY_QUESTIONS_DISABLED = 3] = "SECURITY_QUESTIONS_DISABLED", e[e.SESSION_INACTIVE = 4] = "SESSION_INACTIVE", e[e.QUESTION_NOT_FOUND = 5] = "QUESTION_NOT_FOUND", e[e.ANSWER_WRONG_FORMAT = 6] = "ANSWER_WRONG_FORMAT" }(eu || (eu = {})), function(e) { e[e.INVALID = 0] = "INVALID", e[e.MOST_RECENT_GAMES_PLAYED = 1] = "MOST_RECENT_GAMES_PLAYED" }(tu || (tu = {})), function(e) { e[e.PICK_ALL_CORRECT_CHOICES = 0] = "PICK_ALL_CORRECT_CHOICES", e[e.PICK_C_CORRECT_CHOICES = 1] = "PICK_C_CORRECT_CHOICES" }(nu || (nu = {})); var uu, cu, su, du, fu, pu = { withCredentials: !0, url: lu + "/v1/security-question", timeout: 1e4 }, hu = { withCredentials: !0, url: lu + "/v1/security-question", timeout: 1e4 }, vu = function(e, t) { return $i(zi.httpService.get(pu, { userId: e, sessionId: t }), eu) }, mu = function(e, t, n) { return $i(zi.httpService.post(hu, { userId: e, answer: t, sessionId: n }), eu) }, yu = "URL_NOT_FOUND", gu = null !== (uu = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== uu ? uu : yu, Eu = null !== (cu = mi.EnvironmentUrls.authApi) && void 0 !== cu ? cu : yu, bu = gu + "/token-metadata-service";! function(e) { e[e.UNKNOWN = 1] = "UNKNOWN", e[e.REQUEST_TYPE_WAS_INVALID = 2] = "REQUEST_TYPE_WAS_INVALID", e[e.ATTEMPT_TO_INVALIDATE_CURRENT_TOKEN = 3] = "ATTEMPT_TO_INVALIDATE_CURRENT_TOKEN" }(su || (su = {})), function(e) { e[e.UNKNOWN = 1] = "UNKNOWN" }(du || (du = {})), function(e) { e.UNKNOWN = "Unknown", e.APP = "App", e.BROWSER = "Browser", e.STUDIO = "Studio" }(fu || (fu = {})); var Cu, _u, Su, Iu, Tu = { withCredentials: !0, url: bu + "/v1/sessions", timeout: 1e4 }, Au = { withCredentials: !0, url: bu + "/v1/logout", timeout: 1e4 }, Nu = { withCredentials: !0, url: Eu + "/v1/logoutfromallsessionsandreauthenticate", timeout: 1e4 }, wu = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Lu = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Ou = function(e, t) { return wu(void 0, void 0, Promise, (function() { return Lu(this, (function(n) { return [2, $i(zi.httpService.get(Tu, { nextCursor: e, desiredLimit: t }), su)] })) })) }, ku = function(e) { return wu(void 0, void 0, Promise, (function() { return Lu(this, (function(t) { return [2, $i(zi.httpService.post(Au, { token: e }), su)] })) })) }, Du = function(e) { return wu(void 0, void 0, Promise, (function() { return Lu(this, (function(t) { return [2, $i(zi.httpService.post(Nu, { secureAuthenticationIntent: e }), du)] })) })) }, Ru = null !== (Cu = mi.EnvironmentUrls.thumbnailsApi) && void 0 !== Cu ? Cu : "URL_NOT_FOUND";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(_u || (_u = {})), function(e) { e.PNG = "Png", e.JPEG = "Jpeg" }(Su || (Su = {})), function(e) { e.ERROR = "Error", e.COMPLETED = "Completed", e.IN_REVIEW = "InReview", e.PENDING = "Pending", e.BLOCKED = "Blocked" }(Iu || (Iu = {})); var Pu, xu, Mu, Vu, Uu = { url: Ru + "/v1/games/icons", timeout: 1e4 }, Wu = function(e, t, n, r) { return $i(zi.httpService.get(Uu, { universeIds: e, size: t, format: n, isCircular: r }), _u) }, Hu = CoreRobloxUtilities, Fu = "URL_NOT_FOUND", Gu = null !== (Pu = mi.EnvironmentUrls.twoStepVerificationApi) && void 0 !== Pu ? Pu : Fu, ju = null !== (xu = mi.EnvironmentUrls.economyApi) && void 0 !== xu ? xu : Fu, zu = null !== (Mu = mi.EnvironmentUrls.tradesApi) && void 0 !== Mu ? Mu : Fu, Zu = 1e4;! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.INVALID_CHALLENGE_ID = 1] = "INVALID_CHALLENGE_ID", e[e.INVALID_USER_ID = 2] = "INVALID_USER_ID", e[e.INVALID_EMAIL = 3] = "INVALID_EMAIL", e[e.INVALID_PASSWORD = 4] = "INVALID_PASSWORD", e[e.TOO_MANY_REQUESTS = 5] = "TOO_MANY_REQUESTS", e[e.PIN_LOCKED = 6] = "PIN_LOCKED", e[e.FEATURE_DISABLED = 7] = "FEATURE_DISABLED", e[e.NOT_ALLOWED = 8] = "NOT_ALLOWED", e[e.INVALID_CONFIGURATION = 9] = "INVALID_CONFIGURATION", e[e.INVALID_CODE = 10] = "INVALID_CODE", e[e.CONFIGURATION_ALREADY_ENABLED = 11] = "CONFIGURATION_ALREADY_ENABLED", e[e.INVALID_SETUP_TOKEN = 12] = "INVALID_SETUP_TOKEN", e[e.REAUTHENTICATION_REQUIRED = 13] = "REAUTHENTICATION_REQUIRED", e[e.INVALID_PHONE_NUMBER = 15] = "INVALID_PHONE_NUMBER", e[e.EXCEEDED_REGISTERED_KEYS_LIMIT = 16] = "EXCEEDED_REGISTERED_KEYS_LIMIT", e[e.INVALID_CREDENTIAL_NICKNAME = 17] = "INVALID_CREDENTIAL_NICKNAME", e[e.AUTHENTICATOR_CODE_ALREADY_USED = 18] = "AUTHENTICATOR_CODE_ALREADY_USED", e[e.CHALLENGE_DENIED = 19] = "CHALLENGE_DENIED", e[e.CROSS_DEVICE_DIALOG_EXPIRED = 20] = "CROSS_DEVICE_DIALOG_EXPIRED" }(Vu || (Vu = {})); var qu, Bu, Ku = { url: Gu + "/v1/metadata", withCredentials: !0, timeout: Zu }, Yu = function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/email/enable", timeout: Zu } }, Ju = function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/authenticator/enable-verify", timeout: Zu } }, Xu = function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/sms/enable", timeout: Zu } }, Qu = function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/security-key/enable-verify", timeout: Zu } }, $u = { withCredentials: !0, url: ju + "/v2/spend-friction/two-step-verification/status", timeout: Zu }, ec = { withCredentials: !0, url: zu + "/v1/trade-friction/two-step-verification/status", timeout: Zu }, tc = { withCredentials: !0, url: ju + "/v2/resale-friction/two-step-verification/status", timeout: Zu }, nc = { withCredentials: !0, url: ju + "/v2/spend-friction/two-step-verification/generate", timeout: Zu }, rc = { withCredentials: !0, url: zu + "/v1/trade-friction/two-step-verification/generate", timeout: Zu }, ac = { withCredentials: !0, url: ju + "/v2/resale-friction/two-step-verification/generate", timeout: Zu }, ic = { withCredentials: !0, url: ju + "/v2/spend-friction/two-step-verification/redeem", timeout: Zu }, oc = { withCredentials: !0, url: zu + "/v1/trade-friction/two-step-verification/redeem", timeout: Zu }, lc = { withCredentials: !0, url: ju + "/v2/resale-friction/two-step-verification/redeem", timeout: Zu }, uc = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, cc = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, sc = Hu.cryptoUtil.generateSecureAuthIntent, dc = function(e) { return $i(zi.httpService.get(Ku, e || {}), Vu) }, fc = function(e, t) { return $i(zi.httpService.get(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration", timeout: Zu } }(e), t || {}), Vu) }, pc = function(e) { return uc(void 0, void 0, Promise, (function() { var t; return cc(this, (function(n) { switch (n.label) { case 0: return [4, sc()]; case 1: return t = n.sent(), [2, $i(zi.httpService.post(Yu(e), { secureAuthenticationIntent: t }), Vu)] } })) })) }, hc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/email/send-code", timeout: Zu } }(e), t), Vu) }, vc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/email/verify", timeout: Zu } }(e), t), Vu) }, mc = function(e) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/email/disable", timeout: Zu } }(e), {}), Vu) }, yc = function(e) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/authenticator/enable", timeout: Zu } }(e), {}), Vu) }, gc = function(e, t, n) { return uc(void 0, void 0, Promise, (function() { var r; return cc(this, (function(a) { switch (a.label) { case 0: return [4, sc()]; case 1: return r = a.sent(), [2, $i(zi.httpService.post(Ju(e), { setupToken: t, code: n, secureAuthenticationIntent: r }), Vu)] } })) })) }, Ec = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/authenticator/verify", timeout: Zu } }(e), t), Vu) }, bc = function(e) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/authenticator/disable", timeout: Zu } }(e), {}), Vu) }, Cc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/recovery-codes/verify", timeout: Zu } }(e), t), Vu) }, _c = function(e) { return $i(zi.httpService.get(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/recovery-codes", timeout: Zu } }(e)), Vu) }, Sc = function(e) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/recovery-codes/regenerate", timeout: Zu } }(e), { password: "password" }), Vu) }, Ic = function(e) { return uc(void 0, void 0, Promise, (function() { var t; return cc(this, (function(n) { switch (n.label) { case 0: return [4, sc()]; case 1: return t = n.sent(), [2, $i(zi.httpService.post(Xu(e), { secureAuthenticationIntent: t }), Vu)] } })) })) }, Tc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/sms/send-code", timeout: Zu } }(e), t), Vu) }, Ac = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/sms/verify", timeout: Zu } }(e), t), Vu) }, Nc = function(e) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/sms/disable", timeout: Zu } }(e), {}), Vu) }, wc = function(e) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/security-key/enable", timeout: Zu } }(e), {}), Vu, (function(e) { return { creationOptions: JSON.parse(e.creationOptions), sessionId: e.sessionId } })) }, Lc = function(e, t, n, r) { return uc(void 0, void 0, Promise, (function() { var a; return cc(this, (function(i) { switch (i.label) { case 0: return [4, sc()]; case 1: return a = i.sent(), [2, $i(zi.httpService.post(Qu(e), { sessionId: t, credentialNickname: n, attestationResponse: r, secureAuthenticationIntent: a }), Vu)] } })) })) }, Oc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/security-key/verify-start", timeout: Zu } }(e), t), Vu) }, kc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/security-key/verify-finish", timeout: Zu } }(e), t), Vu) }, Dc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/security-key/disable", timeout: Zu } }(e), { credentialNicknames: t }), Vu) }, Rc = function(e) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/configuration/security-key/list", timeout: Zu } }(e), {}), Vu) }, Pc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/passkey/verify-start", timeout: Zu } }(e), t), Vu) }, xc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/passkey/verify-finish", timeout: Zu } }(e), t), Vu) }, Mc = function() { return $i(zi.httpService.get($u, {}), Vu) }, Vc = function() { return $i(zi.httpService.get(ec, {}), Vu) }, Uc = function() { return $i(zi.httpService.get(tc, {}), Vu) }, Wc = function() { return $i(zi.httpService.post(nc, {}), Vu) }, Hc = function() { return $i(zi.httpService.post(rc, {}), Vu) }, Fc = function() { return $i(zi.httpService.post(ac, {}), Vu) }, Gc = function(e, t) { return $i(zi.httpService.post(ic, { challengeToken: e, verificationToken: t }), Vu) }, jc = function(e, t) { return $i(zi.httpService.post(oc, { challengeToken: e, verificationToken: t }), Vu) }, zc = function(e, t) { return $i(zi.httpService.post(lc, { challengeToken: e, verificationToken: t }), Vu) }, Zc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/cross-device/retry", timeout: Zu } }(e), t), Vu) }, qc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/cross-device/verify", timeout: Zu } }(e), t), Vu) }, Bc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/cross-device/retract", timeout: Zu } }(e), t), Vu) }, Kc = function(e, t) { return $i(zi.httpService.post(function(e) { return { withCredentials: !0, url: Gu + "/v1/users/" + e + "/challenges/password/verify", timeout: Zu } }(e), t), Vu) }, Yc = null !== (qu = mi.EnvironmentUrls.universalAppConfigurationApi) && void 0 !== qu ? qu : "URL_NOT_FOUND";! function(e) { e[e.INTERNAL_ERROR = 9] = "INTERNAL_ERROR" }(Bu || (Bu = {})); var Jc, Xc, Qc = { withCredentials: !0, url: Yc + "/v1/behaviors/account-settings-ui/content", timeout: 1e4 }, $c = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, es = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, ts = function() { return $c(void 0, void 0, Promise, (function() { return es(this, (function(e) { return [2, $i(zi.httpService.get(Qc, {}), Bu)] })) })) }, ns = null !== (Jc = mi.EnvironmentUrls.authApi) && void 0 !== Jc ? Jc : "URL_NOT_FOUND";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(Xc || (Xc = {})); var rs, as, is, os = { withCredentials: !0, url: ns + "/v1/xbox/connection", timeout: 1e4 }, ls = { withCredentials: !0, url: ns + "/v1/xbox/disconnect", timeout: 1e4 }, us = function() { return $i(zi.httpService.get(os, {}), Xc) }, cs = function() { return $i(zi.httpService.post(ls, {}), Xc) }, ss = (null !== (rs = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== rs ? rs : "URL_NOT_FOUND") + "/account-security-service";! function(e) { e[e.UNKNOWN = 1] = "UNKNOWN", e[e.REQUEST_TYPE_WAS_INVALID = 2] = "REQUEST_TYPE_WAS_INVALID", e[e.INVAID_METRIC_NAME = 3] = "INVAID_METRIC_NAME", e[e.INVALID_METRIC_LABELS = 4] = "INVALID_METRIC_LABELS" }(as || (as = {})), function(e) { e.Event2sv = "event_2sv", e.SolveTime2sv = "solve_time_2sv", e.EventCaptcha = "event_captcha", e.SolveTimeCaptcha = "solve_time_captcha", e.EventPat = "event_pat", e.SolveTimePat = "solve_time_pat", e.EventPos = "event_pos", e.PuzzleComputeTimePos = "puzzle_compute_time_pos", e.SolveTimePos = "solve_time_pos", e.EventPow = "event_pow", e.PuzzleComputeTimePow = "puzzle_compute_time_pow", e.SolveTimePow = "solve_time_pow", e.EventRostile = "event_rostile", e.SolveTimeRostile = "solve_time_rostile", e.EventSecurityQuestion = "event_security_question", e.EventGeneric = "event_generic", e.EventReauthentication = "event_reauthentication", e.SolveTimeReauthentication = "solve_time_reauthentication", e.EventDeviceIntegrity = "event_device_integrity", e.SolveTimeDeviceIntegrity = "solve_time_device_integrity", e.EventPhoneVerification = "event_phone_verification", e.SolveTimePhoneVerification = "solve_time_phone_verification", e.EventEmailVerification = "event_email_verification", e.SolveTimeEmailVerification = "solve_time_email_verification" }(is || (is = {})); var ds, fs, ps = { withCredentials: !0, url: ss + "/v1/metrics/record", timeout: 1e4 }, hs = function(e) { return $i(zi.httpService.post(ps, e), as) }, vs = (null !== (ds = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== ds ? ds : "URL_NOT_FOUND") + "/private-access-token";! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(fs || (fs = {})); var ms, ys, gs = { withCredentials: !0, url: vs + "/v1/getPATToken", timeout: 1e4 }, Es = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, bs = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Cs = function(e) { return Es(void 0, void 0, Promise, (function() { return bs(this, (function(t) { return [2, $i(zi.httpService.post(gs, { challengeId: e }), fs)] })) })) }, _s = (null !== (ms = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== ms ? ms : "URL_NOT_FOUND") + "/challenge";! function(e) { e[e.UNKNOWN = 1] = "UNKNOWN" }(ys || (ys = {})); var Ss, Is, Ts, As = { withCredentials: !0, url: _s + "/v1/continue", timeout: 1e4 }, Ns = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, ws = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Ls = function(e, t, n) { return Ns(void 0, void 0, Promise, (function() { return ws(this, (function(r) { return [2, $i(zi.httpService.post(As, { challengeId: e, challengeType: t, challengeMetadata: n }), ys)] })) })) }, Os = null !== (Ss = mi.EnvironmentUrls.authApi) && void 0 !== Ss ? Ss : "URL_NOT_FOUND", ks = 1e4;! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.EXCEEDED_REGISTERED_KEYS_LIMIT = 1] = "EXCEEDED_REGISTERED_KEYS_LIMIT", e[e.FEATURE_DISABLED = 2] = "FEATURE_DISABLED", e[e.INVALID_CREDENTIAL_NICKNAME = 3] = "INVALID_CREDENTIAL_NICKNAME" }(Is || (Is = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.FEATURE_DISABLED = 1] = "FEATURE_DISABLED", e[e.FLOODED = 2] = "FLOODED", e[e.INVALID_PASSWORD = 20] = "INVALID_PASSWORD", e[e.PASSWORDS_DO_NOT_MATCH = 21] = "PASSWORDS_DO_NOT_MATCH", e[e.TWO_STEP_VERIFICATION_REQUIRED = 24] = "TWO_STEP_VERIFICATION_REQUIRED" }(Ts || (Ts = {})); var Ds, Rs = { withCredentials: !0, url: Os + "/v1/passkey/StartRegistration", timeout: ks }, Ps = { withCredentials: !0, url: Os + "/v1/passkey/FinishRegistration", timeout: ks }, xs = { withCredentials: !0, url: Os + "/v1/passkey/DeleteCredentialBatch", timeout: ks }, Ms = { withCredentials: !0, url: Os + "/v1/passkey/ListCredentials", timeout: ks }, Vs = { withCredentials: !0, url: Os + "/v2/passwords/reset", timeout: ks }, Us = function() { return $i(zi.httpService.post(Rs, {}), Is, (function(e) { return { creationOptions: JSON.parse(e.creationOptions), sessionId: e.sessionId } })) }, Ws = function(e, t, n) { return $i(zi.httpService.post(Ps, { sessionId: e, credentialNickname: t, attestationResponse: n }), Is) }, Hs = function(e) { return $i(zi.httpService.post(xs, { credentialNicknames: e }), Is) }, Fs = function() { return $i(zi.httpService.post(Ms, { all: !0 }), Is) }, Gs = function(e, t, n, r, a, i, o, l, u) { return $i(zi.httpService.post(Vs, { targetType: e, ticket: t, userId: n, password: r, passwordRepeated: a, twoStepVerificationChallengeId: i, twoStepVerificationToken: o, accountBlob: l, secureAuthenticationIntent: u }), Ts) };! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.CANCELLATION_ERROR = 1] = "CANCELLATION_ERROR", e[e.INTERRUPTED_ERROR = 2] = "INTERRUPTED_ERROR", e[e.INVALID_REQUEST = 3] = "INVALID_REQUEST", e[e.JSON_EXCEPTION = 4] = "JSON_EXCEPTION", e[e.CREDENTIALS_PROTOCOL_NOT_SUPPORTED = 5] = "CREDENTIALS_PROTOCOL_NOT_SUPPORTED", e[e.NO_CREDENTIALS_FOUND = 6] = "NO_CREDENTIALS_FOUND", e[e.INVALID_STATE_ERROR = 11] = "INVALID_STATE_ERROR" }(Ds || (Ds = {})); var js, zs, Zs, qs = function(e) { return e.code }, Bs = function(e, t, n) { return eo(Hu.hybridResponseService.getNativeResponse(e, t, n), Ds, qs, (function(e) { if (null === e) return null; var t = JSON.parse(e); if (void 0 !== t.errorCode) throw { name: "getNativeResponse Error", message: t.errorMsg, code: t.errorCode }; return !(mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp && (0, mi.DeviceMeta)().isAndroidApp) ? Hu.fido2Util.formatCredentialAuthenticationResponseApp(e) : e })) }, Ks = function(e) { return eo(navigator.credentials.get(e), Ds).then((function(e) { return Ki(e, (function(e) { return null === e ? null : Hu.fido2Util.formatCredentialAuthenticationResponseWeb(e) })) })) }, Ys = (null !== (js = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== js ? js : "URL_NOT_FOUND") + "/account-recovery-service";! function(e) { e[e.UNKNOWN = 1] = "UNKNOWN", e[e.REQUEST_TYPE_WAS_INVALID = 2] = "REQUEST_TYPE_WAS_INVALID", e[e.IDENTIFIER_INVALID = 3] = "IDENTIFIER_INVALID", e[e.TOO_MANY_REQUESTS = 4] = "TOO_MANY_REQUESTS", e[e.ACCOUNT_NOT_VERIFIED = 5] = "ACCOUNT_NOT_VERIFIED", e[e.INVALID_CODE = 6] = "INVALID_CODE" }(zs || (zs = {})), function(e) { e.Invalid = "RECOVERY_STATE_INVALID", e.AccountIdentifierRequired = "RECOVERY_STATE_ACCOUNT_IDENTIFIER_REQUIRED", e.ContactMethodVerificationRequired = "RECOVERY_STATE_CONTACT_METHOD_VERIFICATION_REQUIRED", e.AwaitingContactMethodVerification = "RECOVERY_STATE_AWAITING_CONTACT_METHOD_VERIFICATION", e.AccountVerified = "RECOVERY_STATE_ACCOUNT_VERIFIED" }(Zs || (Zs = {})); var Js, Xs = { url: Ys + "/v1/request-recovery", timeout: 1e4 };! function(e) { e[e.Email = 2] = "Email", e[e.Phone = 3] = "Phone" }(Js || (Js = {})); var Qs, $s = { url: Ys + "/v1/send-code", timeout: 1e4 }, ed = { url: Ys + "/v1/resend-code", timeout: 1e4 }, td = { url: Ys + "/v1/verify-code", timeout: 1e4 }, nd = { url: Ys + "/v1/recovery-session-metadata", timeout: 1e4 }, rd = { url: Ys + "/v1/set-email", timeout: 1e4 }, ad = function(e, t, n) { return $i(zi.httpService.post(Xs, { identifier: e, identifierType: t, recoverySessionId: n }), zs) }, id = function(e, t, n) { return $i(zi.httpService.post($s, { contactMethod: e, contactMethodType: t, recoverySessionId: n }), zs) }, od = function(e) { return $i(zi.httpService.post(ed, { recoverySessionId: e }), zs) }, ld = function(e, t) { return $i(zi.httpService.post(td, { recoverySessionId: e, code: t }), zs) }, ud = function(e) { return $i(zi.httpService.post(nd, { recoverySessionId: e }), zs) }, cd = function(e) { return $i(zi.httpService.post(rd, { recoverySessionId: e }), zs) }, sd = function() { this.captcha = e, this.email = t, this.fido2 = I, this.games = r, this.metrics = b, this.myAccount = a, this.otp = i, this.password = o, this.phone = l, this.playstation = u, this.promptAssignments = c, this.securityQuestions = h, this.sessionManagement = v, this.reauthentication = f, this.rostile = p, this.thumbnails = m, this.twoStepVerification = y, this.universalAppConfiguration = g, this.proofOfSpace = s, this.proofOfWork = d, this.xbox = E, this.privateAccessToken = C, this.genericChallenge = _, this.authApi = S, this.accountRecoveryApi = T }, dd = ReactUtilities, fd = "Captcha:", pd = { captcha: "captcha", captchaInitiated: "captchaInitiated", captchaV2Experimentation: "captchaV2Experimentation" }, hd = { visible: "visible", hidden: "hidden", error: "error" }, vd = { triggered: "Triggered", initialized: "Initialized", suppressed: "Suppressed", displayed: "Displayed", success: "Success", providerError: "FailedToLoad", metadataError: "FailedToLoadMetadata" }, md = { solveTime: "SolveTime" }, yd = { Login: "ACTION_TYPE_WEB_LOGIN", AppLogin: "ACTION_TYPE_WEB_LOGIN", Signup: "ACTION_TYPE_WEB_SIGNUP", AppSignup: "ACTION_TYPE_WEB_SIGNUP", JoinGroup: "ACTION_TYPE_GROUP_JOIN", GroupWallPost: "ACTION_TYPE_GROUP_WALL_POST", ResetPassword: "ACTION_TYPE_WEB_RESET_PASSWORD", ToyCodeRedeem: "ACTION_TYPE_WEB_GAMECARD_REDEMPTION", SupportRequest: "ACTION_TYPE_SUPPORT_REQUEST", FollowUser: "ACTION_TYPE_FOLLOW_USER", Generic: "ACTION_TYPE_GENERIC_CHALLENGE", GameCardRedeem: "ACTION_TYPE_WEB_GAMECARD_REDEMPTION", AssetComment: "ACTION_TYPE_ASSET_COMMENT", Marketplace: "ACTION_TYPE_MARKETPLACE" }, gd = "V2", Ed = ReactStyleGuide, bd = function(e) { var t = e.titleText, n = e.children; return Gi().createElement("div", { className: "inline-challenge" }, t && Gi().createElement("h4", { className: "inline-challenge-title" }, t), Gi().createElement("div", { className: "inline-challenge-content" }, n)) }, Cd = function(e) { var t = e.children; return Gi().createElement("div", { className: "inline-challenge-body" }, t) };! function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED", e[e.HIDE_MODAL_CHALLENGE = 2] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 3] = "SHOW_MODAL_CHALLENGE" }(Qs || (Qs = {})); var _d, Sd, Id = function() { return Id = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, Id.apply(this, arguments) }, Td = function(e, t) { var n, r = Id({}, e); switch (t.type) { case Qs.SET_CHALLENGE_COMPLETED: return r.onChallengeCompletedData = t.onChallengeCompletedData, r.isModalVisible = !1, r; case Qs.SET_CHALLENGE_INVALIDATED: return r.onChallengeInvalidatedData = { errorCode: t.errorCode, errorMessage: (n = e.resources, t.errorCode, n.Message.Error.Default) }, r.isModalVisible = !1, r; case Qs.HIDE_MODAL_CHALLENGE: return r.isModalVisible = !1, r; case Qs.SHOW_MODAL_CHALLENGE: return r.isModalVisible = !0, r; default: return e } }, Ad = (0, Fi.createContext)(null), Nd = function(e) { var t = e.actionType, n = e.appType, r = e.renderInline, a = e.dataExchangeBlob, i = e.unifiedCaptchaId, o = e.requestService, l = e.metadataResponse, u = e.eventService, c = e.metricsService, s = e.translate, d = e.onChallengeDisplayed, f = e.onChallengeCompleted, p = e.onChallengeInvalidated, h = e.onModalChallengeAbandoned, v = e.children, m = (0, Fi.useState)((function() { return function(e) { return { Action: { PleaseTryAgain: e("Action.PleaseTryAgain"), Reload: e("Action.Reload") }, Description: { VerifyingYouAreNotBot: e("Description.VerifyingYouAreNotBot") }, Message: { Error: { Default: e("Message.Error.Default") } } } }(s) }))[0], y = (0, Fi.useState)((function() { return { actionType: t, appType: n, dataExchangeBlob: a, unifiedCaptchaId: i, renderInline: r, metadataResponse: l, resources: m, requestService: o, eventService: u, metricsService: c, onChallengeDisplayed: d, onModalChallengeAbandoned: h, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !1 } }))[0], g = (0, Fi.useReducer)(Td, y), E = g[0], b = g[1]; return (0, Fi.useEffect)((function() { null !== E.onChallengeCompletedData && null === E.onChallengeInvalidatedData && f(E.onChallengeCompletedData) }), [E.onChallengeCompletedData, E.onChallengeInvalidatedData, f]), (0, Fi.useEffect)((function() { null !== E.onChallengeInvalidatedData && null === E.onChallengeCompletedData && p(E.onChallengeInvalidatedData) }), [E.onChallengeCompletedData, E.onChallengeInvalidatedData, p]), Gi().createElement(Ad.Provider, { value: { state: E, dispatch: b } }, v) }, wd = function() { var e = (0, Fi.useContext)(Ad); if (null === e) throw new Error("CaptchaContext was not provided in the current scope"); return e };! function(e) { e.Login = "Login", e.AppLogin = "AppLogin", e.Signup = "Signup", e.AppSignup = "AppSignup", e.JoinGroup = "JoinGroup", e.GroupWallPost = "GroupWallPost", e.ResetPassword = "ResetPassword", e.ToyCodeRedeem = "ToyCodeRedeem", e.GameCardRedeem = "GameCardRedeem", e.FollowUser = "FollowUser", e.Generic = "Generic", e.SupportRequest = "SupportRequest", e.AssetComment = "AssetComment", e.Marketplace = "Marketplace" }(_d || (_d = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(Sd || (Sd = {})); var Ld, Od, kd = {}, Dd = ((Ld = document.createElement("div")).className = "challenge-captcha-body", Ld.id = "challenge-captcha-element", Ld), Rd = function() { var e = wd(), t = e.state, n = t.actionType, r = t.appType, a = t.dataExchangeBlob, i = t.unifiedCaptchaId, o = t.renderInline, l = t.resources, u = t.metadataResponse, c = t.onChallengeDisplayed, s = t.onModalChallengeAbandoned, d = t.isModalVisible, f = e.dispatch, p = (0, Fi.useState)(!0), h = p[0], v = p[1], m = function() { f({ type: Qs.HIDE_MODAL_CHALLENGE }), null !== s && s((function() { return f({ type: Qs.SHOW_MODAL_CHALLENGE }) })) }; (0, Fi.useEffect)((function() {! function() { v(!0); var e = u.funCaptchaPublicKeys, t = []; Object.keys(mi.CaptchaConstants.funCaptchaPublicKeyMap).forEach((function(n) { var r = n, a = mi.CaptchaConstants.funCaptchaPublicKeyMap[r], i = e[a]; void 0 !== i && t.push({ Type: r, PublicKey: i }) })), mi.FunCaptcha.addCaptchaTypes(t, !1), null !== r && mi.FunCaptcha.setPerAppTypeLoggingEnabled(!0, r), Object.assign(kd, { shownCb: function() { v(!1), f({ type: Qs.SHOW_MODAL_CHALLENGE }), c({ displayed: !0 }) }, errorCb: function() { f({ type: Qs.SET_CHALLENGE_INVALIDATED, errorCode: Sd.UNKNOWN }) }, successCb: function(e, t) { f({ type: Qs.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { captchaToken: e, captchaId: t } }) } }), mi.FunCaptcha.render(Dd.id, { cType: n, inputParams: { dataExchange: a, unifiedCaptchaId: i }, returnTokenInSuccessCb: !0, shownCb: function() { return kd.shownCb && kd.shownCb() }, errorCb: function(e) { return kd.errorCb && kd.errorCb(e) }, successCb: function(e, t) { return kd.successCb && kd.successCb(e, t) } }) }() }), []); var y, g = (y = Dd, Gi().createElement("div", { ref: function(e) { return null == e ? void 0 : e.insertAdjacentElement("afterend", y) } })); return o ? Gi().createElement(bd, { titleText: l.Description.VerifyingYouAreNotBot }, Gi().createElement(Cd, null, h && Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin challenge-captcha-body" }), g)) : Gi().createElement(Fi.Fragment, null, !d && Gi().createElement("div", { style: { display: "none" } }, g), Gi().createElement(Ed.Modal, { className: "modal-modern modal-modern-challenge-captcha", show: d, onHide: m, backdrop: "static" }, Gi().createElement(Ed.Modal.Body, null, Gi().createElement("button", { type: "button", className: "challenge-captcha-close-button", onClick: m, disabled: !1 }, Gi().createElement("span", { className: "icon-close" })), h && Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin challenge-captcha-body" }), g))) }, Pd = "fc_nosuppress", xd = new URLSearchParams(window.location.search).get(Pd), Md = "fc_suppress", Vd = new URLSearchParams(window.location.search).get(Md), Ud = null !== xd ? "&" + Pd + "=" + xd : null !== Vd ? "&" + Md + "=" + Vd : "", Wd = 0, Hd = function() { var e = wd(), t = e.state, n = t.actionType, r = t.dataExchangeBlob, a = t.unifiedCaptchaId, i = t.renderInline, o = t.resources, l = t.metadataResponse, u = t.eventService, c = t.metricsService, s = t.onChallengeDisplayed, d = t.onModalChallengeAbandoned, f = t.isModalVisible, p = t.onChallengeCompletedData, h = t.onChallengeInvalidatedData, v = e.dispatch, m = (0, Fi.useState)((function() { var e = Wd; return Wd += 1, e.toString() }))[0], y = (0, Fi.useState)(""), g = y[0], E = y[1], b = (0, Fi.useState)(!0), C = b[0], _ = b[1], S = (0, Fi.useState)(!1), I = S[0], T = S[1], A = (0, Fi.useState)(null), N = A[0], w = A[1], L = (0, Fi.useState)(!1), O = L[0], k = L[1], D = (0, Fi.useRef)(null), R = function() { v({ type: Qs.HIDE_MODAL_CHALLENGE }), null !== d && d((function() { return v({ type: Qs.SHOW_MODAL_CHALLENGE }) })) }, P = (0, Fi.useCallback)((function(e, t) { return v({ type: Qs.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { captchaToken: e, captchaId: t } }) }), [v]), x = (0, Fi.useCallback)((function() { return v({ type: Qs.SET_CHALLENGE_INVALIDATED, errorCode: Sd.UNKNOWN }) }), [v]), M = (0, Fi.useCallback)((function() { _(!1), v({ type: Qs.SHOW_MODAL_CHALLENGE }), T(!0), s({ displayed: !0 }), w(Date.now()) }), [v, s]); (0, Fi.useEffect)((function() {! function() { _(!0); var e = l.funCaptchaPublicKeys; E(e[yd[n]] || ""), c.fireTriggeredEvent() }() }), []), (0, Fi.useEffect)((function() { var e = function(e) { try { var t = JSON.parse(e.data); if (!Object.prototype.hasOwnProperty.call(t, "arkoseIframeId")) return; if (t.arkoseIframeId !== m) return; switch (t.eventId) { case "challenge-complete": P(t.payload.captchaToken, a), c.fireSuccessEvent(); var r = 0; N && (r = Date.now() - N), u.sendCaptchaRedeemEvent(n, r, !0, t.payload.captchaToken, a, gd); break; case "challenge-error": x(), c.fireProviderErrorEvent(), u.sendCaptchaInitiatedEvent(n, hd.error, t.payload.captchaToken || "", a, t.payload.error, gd); break; case "challenge-shown": M(), c.fireDisplayedEvent(), u.sendCaptchaInitiatedEvent(n, hd.visible, t.payload.captchaToken, a, null, gd); break; case "challenge-resize": null !== D.current && (D.current.height = t.payload.height, D.current.width = t.payload.width); break; case "challenge-suppressed": c.fireSuppressedEvent(), u.sendCaptchaInitiatedEvent(n, hd.hidden, t.payload.captchaToken, a, null, gd); break; case "challenge-ready": c.fireInitializedEvent() } } catch (t) { if (t instanceof SyntaxError) return; c.fireProviderErrorEvent(), console.error(fd, "Got bad event data:", e.data), u.sendCaptchaInitiatedEvent(n, hd.error, null, a, String(t), gd) } }; return window.addEventListener("message", e), k(!0), function() { k(!1), window.removeEventListener("message", e) } }), [D, N, n, a, u, c, m, P, x, M]); var V = encodeURIComponent(r), U = Gi().createElement("div", { className: "challenge-captcha-body", style: { height: C ? 0 : void 0 } }, Gi().createElement("iframe", { ref: D, title: "Challenge", id: "arkose-iframe", src: "/arkose/iframe?publicKey=" + g + "&dataExchangeBlob=" + V + "&Proxy="+encodeURIComponent(document.querySelector('meta[name="proxy"]').getAttribute("value")) + "&arkoseIframeId=" + m + Ud, style: { border: "none", background: "transparent" } })), W = p || h; return i ? Gi().createElement(bd, { titleText: o.Description.VerifyingYouAreNotBot }, Gi().createElement(Cd, null, (C || !O) && Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin challenge-captcha-body" }), O && U)) : Gi().createElement(Ed.Modal, { className: "modal-modern modal-modern-challenge-captcha", show: (f || !I) && !W, style: { display: I ? "block" : "none" }, onHide: R, backdrop: !!I && "static" }, Gi().createElement(Ed.Modal.Body, null, Gi().createElement("button", { type: "button", className: "challenge-captcha-close-button", onClick: R, disabled: !1 }, Gi().createElement("span", { className: "icon-close" })), (C || !O) && Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin challenge-captcha-body" }), O && U)) }, Fd = (0, dd.withTranslations)((function(e) { var t = e.actionType, n = e.appType, r = e.dataExchangeBlob, a = e.unifiedCaptchaId, i = e.captchaVersion, o = e.renderInline, l = e.requestService, u = e.metadataResponse, c = e.eventService, s = e.metricsService, d = e.translate, f = e.onChallengeDisplayed, p = e.onChallengeCompleted, h = e.onChallengeInvalidated, v = e.onModalChallengeAbandoned; return Gi().createElement(Nd, { actionType: t, appType: n, dataExchangeBlob: r, unifiedCaptchaId: a, renderInline: o, requestService: l, translate: d, metadataResponse: u, eventService: c, metricsService: s, onChallengeDisplayed: f, onChallengeCompleted: p, onChallengeInvalidated: h, onModalChallengeAbandoned: v }, i === gd ? Gi().createElement(Hd, null) : Gi().createElement(Rd, null)) }), { common: [], feature: "Authentication.Captcha" }), Gd = function() { function e(e) { this.provider = e } return e.prototype.sendCaptchaRedeemEvent = function(e, t, n, r, a, i) { var o = n ? "true" : "false"; yi().EventStream.SendEventWithTarget(pd.captcha, e, { solveDuration: t, success: o, provider: this.provider, session: r || "", ucid: a || "", providerVersion: i }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendCaptchaInitiatedEvent = function(e, t, n, r, a, i) { yi().EventStream.SendEventWithTarget(pd.captchaInitiated, e, { type: t, provider: this.provider, ucid: r || "", session: n || "", message: a || "", providerVersion: i }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendCaptchaV2ExperimentationEvent = function(e, t, n, r) { yi().EventStream.SendEventWithTarget(pd.captchaV2Experimentation, e, { btid: n, provider: this.provider, ucid: t || "", captchaVersion: r }, yi().EventStream.TargetTypes.WWW) }, e }(), jd = function() { function e() { this.timeStore = {} } return e.prototype.start = function(e) { this.timeStore[e] = Date.now() }, e.prototype.end = function(e) { var t = this.timeStore[e]; return t ? (delete this.timeStore[e], Date.now() - t) : null }, e }(), zd = window.EventTracker, Zd = function() { function e(e, t, n, r, a) { this.applicationType = n, this.requestServiceDefault = r, this.actionType = e, this.eventTimer = new jd, this.provider = t, this.solveTimeSequenceName = "" + this.actionType + this.provider + "_" + md.solveTime, this.challengeId = a } return e.prototype.fireTriggeredEvent = function() { this.fireEvent(vd.triggered), zd && zd.start(this.appendApplicationType(this.solveTimeSequenceName)), this.eventTimer.start(this.solveTimeSequenceName) }, e.prototype.fireInitializedEvent = function() { this.fireEvent(vd.initialized) }, e.prototype.fireMetadataErrorEvent = function() { this.fireEvent(vd.metadataError) }, e.prototype.fireSuppressedEvent = function() { this.fireEvent(vd.suppressed) }, e.prototype.fireDisplayedEvent = function() { this.fireEvent(vd.displayed) }, e.prototype.fireProviderErrorEvent = function() { this.fireEvent(vd.providerError) }, e.prototype.fireSuccessEvent = function() { this.fireEvent(vd.success), zd && zd.endSuccess(this.appendApplicationType(this.solveTimeSequenceName)); var e = this.eventTimer.end(this.solveTimeSequenceName); null !== e && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimeCaptcha, value: e, labelValues: { action_type: this.actionType, event_type: this.provider + "_" + vd.success, application_type: this.applicationType || "unknown", version: gd } }).catch((function() {})) }, e.prototype.fireEvent = function(e) { if (zd) { var t = "" + this.actionType + this.provider + "_" + e; zd.fireEvent(this.appendApplicationType(t)) } this.requestServiceDefault.metrics.recordMetric({ name: is.EventCaptcha, value: 1, labelValues: { action_type: this.actionType, event_type: this.provider + "_" + e, application_type: this.applicationType || "unknown", version: gd }, identifier: this.challengeId }).catch((function() {})) }, e.prototype.appendApplicationType = function(e) { return this.applicationType ? e + "_" + this.applicationType : e }, e }(), qd = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Bd = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Kd = new sd, Yd = function(e) { var t = e.containerId, n = e.actionType, r = e.appType, a = e.dataExchangeBlob, i = e.unifiedCaptchaId, o = e.renderInline, l = e.onChallengeDisplayed, u = e.onChallengeCompleted, c = e.onChallengeInvalidated, s = e.onModalChallengeAbandoned; return qd(void 0, void 0, void 0, (function() { var e, d, f, p, h, v, m, y, g; return Bd(this, (function(E) { switch (E.label) { case 0: return null === (e = document.getElementById(t)) ? [3, 2] : ((0, ji.unmountComponentAtNode)(e), d = new Zd(n, "FunCaptcha", r, Kd, i), [4, Kd.captcha.getMetadata()]); case 1: if ((f = E.sent()).isError) return d.fireMetadataErrorEvent(), console.error(fd, "Got error code " + ((null === (g = f.error) || void 0 === g ? void 0 : g.toString()) || "null") + " fetching metadata"), [2, !1]; if (p = new Gd("FunCaptcha"), h = "V1", !0 !== f.value.disableCaptchaVersionExperiment) { v = mi.Cookies.getBrowserTrackerId() || "", m = ""; try { m = String((b = v, (new Ui).finalize(b).toString())) } catch (e) { console.error(fd, e) } y = m.slice(-2) || "00", parseInt(y, 16) % 1 == 0 && (h = "V2"), p.sendCaptchaV2ExperimentationEvent(n, i, v, h) } return (0, ji.render)(Gi().createElement(Fd, { actionType: n, appType: r, dataExchangeBlob: a, unifiedCaptchaId: i, renderInline: o, requestService: Kd, metadataResponse: f.value, eventService: p, metricsService: d, captchaVersion: h, onChallengeDisplayed: l, onChallengeCompleted: u, onChallengeInvalidated: c, onModalChallengeAbandoned: s }), e), [2, !0]; case 2: return [2, Promise.resolve(!1)] } var b })) })) }, Jd = "DeviceIntegrity", Xd = "accountSecurityChallengeDeviceIntegrityEvent", Qd = { challengeInitialized: "challengeInitialized", challengeCompleted: "challengeCompleted", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned" }, $d = { challengeInitialized: "ChallengeInitialized", challengeCompleted: "ChallengeCompleted", challengeInvalidated: "ChallengeInvalidated", challengeAbandoned: "ChallengeAbandoned" }, ef = { challengeSolveTime: "ChallengeSolveTime" }, tf = "NATIVE_EXCEPTION", nf = "INVALID_NATIVE_RESPONSE", rf = "NOT_IN_APP";! function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED" }(Od || (Od = {})); var af, of = function() { return of = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, of.apply(this, arguments) }, lf = function(e, t) { var n = of({}, e); switch (t.type) { case Od.SET_CHALLENGE_COMPLETED: return n.onChallengeCompletedData = t.onChallengeCompletedData, n; case Od.SET_CHALLENGE_INVALIDATED: return n.onChallengeInvalidatedData = t.onChallengeInvalidatedData, n; default: return e } }, uf = (0, Fi.createContext)(null), cf = function(e) { var t = e.challengeId, n = e.requestHash, r = e.integrityType, a = e.renderInline, i = e.eventService, o = e.metricsService, l = e.translate, u = e.onChallengeDisplayed, c = e.onChallengeCompleted, s = e.onChallengeInvalidated, d = e.onModalChallengeAbandoned, f = e.children, p = (0, Fi.useState)((function() { return function(e) { return { Description: { VerificationError: e("Description.VerificationError"), VerificationSuccess: e("Description.VerificationSuccess"), VerifyingYouAreNotBot: e("Description.VerifyingYouAreNotBot") } } }(l) }))[0], h = (0, Fi.useState)((function() { return { challengeId: t, requestHash: n, integrityType: r, renderInline: a, resources: p, eventService: i, metricsService: o, onChallengeDisplayed: u, onModalChallengeAbandoned: d, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !1 } }))[0], v = (0, Fi.useReducer)(lf, h), m = v[0], y = v[1]; return (0, Fi.useEffect)((function() { null !== m.onChallengeCompletedData && null === m.onChallengeInvalidatedData && c(m.onChallengeCompletedData) }), [m.onChallengeCompletedData, m.onChallengeInvalidatedData, c]), (0, Fi.useEffect)((function() { null === m.onChallengeCompletedData && null !== m.onChallengeInvalidatedData && s(m.onChallengeInvalidatedData) }), [i, o, m.onChallengeCompletedData, m.onChallengeInvalidatedData, s]), Gi().createElement(uf.Provider, { value: { state: m, dispatch: y } }, f) }, sf = function() { var e = (0, Fi.useContext)(uf); if (null === e) throw new Error("DeviceIntegrityContext was not provided in the current scope"); return e }, df = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, ff = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, pf = function() { var e = sf(), t = e.state, n = t.integrityType, r = t.requestHash, a = t.renderInline, i = t.resources, o = t.metricsService, l = t.eventService, u = e.dispatch, c = (0, Fi.useCallback)((function() { return df(void 0, void 0, void 0, (function() { var e, t, a, i; return ff(this, (function(c) { switch (c.label) { case 0: return c.trys.push([0, 4, , 5]), mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp ? (e = { requestHash: r, timeoutMillis: 450 }, [4, Hu.hybridResponseService.getNativeResponse(Hu.hybridResponseService.FeatureTarget.GET_INTEGRITY_TOKEN, { deviceIntegrityParams: JSON.stringify(e) }, 1200)]) : [3, 2]; case 1: return null !== (t = c.sent()) ? (a = JSON.parse(t), u({ type: Od.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { integrityType: n, redemptionToken: a.token } }), l.sendChallengeCompletedEvent(a.result), o.fireChallengeCompletedEvent(), [2]) : (l.sendChallengeInvalidatedEvent(nf), o.fireChallengeInvalidatedEvent(), [3, 3]); case 2: l.sendChallengeInvalidatedEvent(rf), o.fireChallengeInvalidatedEvent(), c.label = 3; case 3: return [3, 5]; case 4: return i = c.sent(), console.error(i), l.sendChallengeInvalidatedEvent(tf), o.fireChallengeInvalidatedEvent(), [3, 5]; case 5: return u({ type: Od.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { integrityType: n, redemptionToken: "" } }), [2] } })) })) }), [u, n, r, l, o]); return (0, Fi.useEffect)((function() { c() }), []), a ? Gi().createElement(bd, { titleText: i.Description.VerifyingYouAreNotBot }, Gi().createElement(Cd, null, Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin" }))) : Gi().createElement(Ed.Modal, { className: "modal-modern", backdrop: "static" }, Gi().createElement(Ed.Modal.Body, null, Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin" }))) }, hf = (0, dd.withTranslations)((function(e) { var t = e.challengeId, n = e.requestHash, r = e.integrityType, a = e.renderInline, i = e.eventService, o = e.metricsService, l = e.translate, u = e.onChallengeDisplayed, c = e.onChallengeCompleted, s = e.onChallengeInvalidated, d = e.onModalChallengeAbandoned; return Gi().createElement(cf, { challengeId: t, requestHash: n, integrityType: r, renderInline: a, eventService: i, metricsService: o, translate: l, onChallengeDisplayed: u, onChallengeCompleted: c, onChallengeInvalidated: s, onModalChallengeAbandoned: d }, Gi().createElement(pf, null)) }), { common: ["CommonUI.Messages"], feature: "Feature.DeviceIntegrityChallenge" }), vf = function() { function e(e, t) { this.challengeId = e, this.integrityType = t } return e.prototype.sendChallengeInitializedEvent = function() { yi().EventStream.SendEventWithTarget(Xd, Qd.challengeInitialized, { challengeId: this.challengeId, integrityType: this.integrityType }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeCompletedEvent = function(e) { yi().EventStream.SendEventWithTarget(Xd, Qd.challengeCompleted, { challengeId: this.challengeId, integrityType: this.integrityType, result: e }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function(e) { yi().EventStream.SendEventWithTarget(Xd, Qd.challengeInvalidated, { challengeId: this.challengeId, integrityType: this.integrityType, result: e }, yi().EventStream.TargetTypes.WWW) }, e }(), mf = function() { function e(e, t) { this.appType = e || "unknown", this.requestServiceDefault = t, this.eventTimer = new jd, this.challengeSolveTimeSequenceName = Jd + "_" + ef.challengeSolveTime } return e.prototype.fireChallengeInitializedEvent = function() { this.fireEvent($d.challengeInitialized), this.eventTimer.start(this.challengeSolveTimeSequenceName) }, e.prototype.fireChallengeCompletedEvent = function() { this.fireEvent($d.challengeCompleted), this.fireSolveTimeEvent($d.challengeCompleted) }, e.prototype.fireChallengeInvalidatedEvent = function() { this.fireEvent($d.challengeInvalidated), this.fireSolveTimeEvent($d.challengeInvalidated) }, e.prototype.fireChallengeAbandonedEvent = function() { this.fireEvent($d.challengeAbandoned), this.fireSolveTimeEvent($d.challengeAbandoned) }, e.prototype.fireEvent = function(e) { this.requestServiceDefault.metrics.recordMetric({ name: is.EventDeviceIntegrity, value: 1, labelValues: { event_type: Jd + "_" + e, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireSolveTimeEvent = function(e) { var t = this.eventTimer.end(this.challengeSolveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimeDeviceIntegrity, value: t, labelValues: { event_type: Jd + "_" + e, application_type: this.appType } }).catch((function() {})) }, e }();! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(af || (af = {})); var yf, gf = new sd, Ef = function(e) { var t = e.containerId, n = e.challengeId, r = e.requestHash, a = e.integrityType, i = e.appType, o = e.renderInline, l = e.onChallengeDisplayed, u = e.onChallengeCompleted, c = e.onChallengeInvalidated, s = e.onModalChallengeAbandoned, d = document.getElementById(t); if (null !== d) { (0, ji.unmountComponentAtNode)(d); var f = new vf(n, a), p = new mf(i, gf); return (0, ji.render)(Gi().createElement(hf, { challengeId: n, requestHash: r, renderInline: o, integrityType: a, eventService: f, metricsService: p, onChallengeDisplayed: l, onChallengeCompleted: u, onChallengeInvalidated: c, onModalChallengeAbandoned: s }), d), f.sendChallengeInitializedEvent(), p.fireChallengeInitializedEvent(), !0 } return !1 }, bf = function(e) { var t = e.positiveButton, n = e.negativeButton, r = e.children; return Gi().createElement("div", { className: "inline-challenge-footer" }, Gi().createElement("div", { className: "inline-challenge-footer-buttons" }, null !== n && Gi().createElement("button", { type: "button", className: "btn-secondary-md inline-challenge-footer-button", "aria-label": n.label, disabled: !n.enabled, onClick: n.action }, n.content), Gi().createElement("button", { type: "button", className: "btn-cta-md inline-challenge-footer-button", "aria-label": t.label, disabled: !t.enabled, onClick: t.action }, t.content)), r) }, Cf = function(e) { var t = e.positiveButton, n = e.negativeButton, r = e.children; return Gi().createElement(Ed.Modal.Footer, null, Gi().createElement("div", { className: "modal-modern-footer-buttons" }, null !== n && Gi().createElement("button", { type: "button", className: "btn-secondary-md modal-modern-footer-button", "aria-label": n.label, disabled: !n.enabled, onClick: n.action }, n.content), Gi().createElement("button", { type: "button", className: "btn-cta-md modal-modern-footer-button", "aria-label": t.label, disabled: !t.enabled, onClick: t.action }, t.content)), r) };! function(e) { e.BACK = "BACK", e.CLOSE = "CLOSE", e.HIDDEN = "HIDDEN" }(yf || (yf = {})); var _f, Sf, If = function(e) { var t = e.headerText, n = e.buttonType, r = e.buttonAction, a = e.buttonEnabled, i = e.headerInfo; return Gi().createElement(Ed.Modal.Header, { useBaseBootstrapComponent: !0 }, function(e, t, n) { switch (e) { case yf.BACK: return Gi().createElement("button", { type: "button", className: "modal-modern-header-button", onClick: t, disabled: !n }, Gi().createElement("span", { className: "icon-back" })); case yf.CLOSE: return Gi().createElement("button", { type: "button", className: "modal-modern-header-button", onClick: t, disabled: !n }, Gi().createElement("span", { className: "icon-close" })); case yf.HIDDEN: default: return Gi().createElement("div", null) } }(n, r, a), Gi().createElement(Ed.Modal.Title, null, t), Gi().createElement("div", { className: "modal-modern-header-info" }, i)) };! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(_f || (_f = {})), function(e) { e.ForceAuthenticator = "ForceAuthenticator", e.ForceTwoStepVerification = "ForceTwoStepVerification", e.BlockSession = "BlockSession" }(Sf || (Sf = {})); var Tf, Af = { common: [], feature: "Feature.ForceAuthenticator" }, Nf = { common: [], feature: "Feature.ForceTwoStepVerification" }, wf = { common: [], feature: "Feature.Denied" }, Lf = ["Action.Setup", "Description.Reason", "Description.SetupAuthenticator", "Header.TurnOnAuthenticator"], Of = ["ForceTwoStepVerification.Header", "ForceTwoStepVerification.Body", "ForceTwoStepVerification.Action"], kf = ["Denied.Header", "Denied.Body", "Denied.Action"];! function(e) { e[e.HIDE_MODAL_CHALLENGE = 0] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 1] = "SHOW_MODAL_CHALLENGE" }(Tf || (Tf = {})); var Df = function() { return Df = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, Df.apply(this, arguments) }, Rf = function(e, t) { var n = Df({}, e); switch (t.type) { case Tf.HIDE_MODAL_CHALLENGE: return n.isModalVisible = !1, n; case Tf.SHOW_MODAL_CHALLENGE: return n.isModalVisible = !0, n; default: return e } }, Pf = (0, Fi.createContext)(null), xf = function(e) { var t = e.forceActionRedirectChallengeConfig, n = e.renderInline, r = e.translate, a = e.onModalChallengeAbandoned, i = e.children, o = (0, Fi.useState)((function() { return t.getTranslationResources(r) }))[0], l = (0, Fi.useState)((function() { return { renderInline: n, resources: o, redirectURLSignifier: t.redirectURLSignifier, onModalChallengeAbandoned: a, isModalVisible: !0 } }))[0], u = (0, Fi.useReducer)(Rf, l), c = u[0], s = u[1]; return Gi().createElement(Pf.Provider, { value: { state: c, dispatch: s } }, i) }, Mf = function() { var e = (0, Fi.useContext)(Pf); if (null === e) throw new Error("ForceActionRedirectContext was not provided in the current scope"); return e }, Vf = function() { var e = Mf(), t = e.state, n = t.renderInline, r = t.redirectURLSignifier, a = t.resources, i = t.onModalChallengeAbandoned, o = t.isModalVisible, l = e.dispatch, u = function() { l({ type: Tf.HIDE_MODAL_CHALLENGE }), null !== i && i((function() { return l({ type: Tf.SHOW_MODAL_CHALLENGE }) })) }, c = { content: a.Action, label: a.Action, enabled: !0, action: function() { return function(e, t) { if ("blocksession" === e) t(); else { var n = "/my/account#!/security?src=" + e; window.top && window.top !== window.self ? window.top.location.href = n : window.open(n, "_self") } }(r, u) } }, s = function() { var e = n ? Cd : Ed.Modal.Body, t = n ? bf : Cf, r = n ? "inline-challenge-lock-icon" : "modal-lock-icon"; return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement("div", { className: r }), Gi().createElement("p", null, a.Body)), Gi().createElement(t, { positiveButton: c, negativeButton: null })) }; return n ? Gi().createElement(bd, { titleText: a.Header }, s()) : Gi().createElement(Ed.Modal, { className: "modal-modern", show: o, onHide: u, backdrop: "static" }, Gi().createElement(If, { headerText: a.Header, buttonType: yf.CLOSE, buttonAction: u, buttonEnabled: !0, headerInfo: null }), s()) }, Uf = function(e) { var t = e.renderInline, n = e.forceActionRedirectChallengeConfig, r = e.translate, a = e.onModalChallengeAbandoned; return Gi().createElement(xf, { renderInline: t, forceActionRedirectChallengeConfig: n, translate: r, onModalChallengeAbandoned: a }, Gi().createElement(Vf, null)) }, Wf = (new sd, function(e) { var t = e.containerId, n = e.renderInline, r = e.forceActionRedirectChallengeType, a = e.onModalChallengeAbandoned, i = document.getElementById(t), o = function(e) { switch (e) { case Sf.ForceAuthenticator: return { redirectURLSignifier: "forceauthenticator", translationConfig: Af, translationResourceKeys: Lf, getTranslationResources: function(e) { return { Header: e("Header.TurnOnAuthenticator"), Body: e("Description.SetupAuthenticator") + "\n" + e("Description.Reason"), Action: e("Action.Setup") } } }; case Sf.ForceTwoStepVerification: return { redirectURLSignifier: "forcetwostepverification", translationConfig: Nf, translationResourceKeys: Of, getTranslationResources: function(e) { return { Header: e("ForceTwoStepVerification.Header"), Body: e("ForceTwoStepVerification.Body"), Action: e("ForceTwoStepVerification.Action") } } }; case Sf.BlockSession: return { redirectURLSignifier: "blocksession", translationConfig: wf, translationResourceKeys: kf, getTranslationResources: function(e) { return { Header: e("Denied.Header"), Body: e("Denied.Body"), Action: e("Denied.Action") } } }; default: throw new Error("Invalid ForceActionRedirectChallengeType") } }(r); if (null !== i) { (0, ji.unmountComponentAtNode)(i); var l = (0, dd.withTranslations)(Uf, o.translationConfig); return (0, ji.render)(Gi().createElement(l, { forceActionRedirectChallengeConfig: o, renderInline: n, onModalChallengeAbandoned: a }), i), !0 } return !1 }); var Hf = function() { return Hf = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, Hf.apply(this, arguments) }; function Ff(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) } function Gf(e, t) { var n, r, a, i = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }, o = Object.create(("function" == typeof Iterator ? Iterator : Object).prototype); return o.next = l(0), o.throw = l(1), o.return = l(2), "function" == typeof Symbol && (o[Symbol.iterator] = function() { return this }), o; function l(l) { return function(u) { return function(l) { if (n) throw new TypeError("Generator is already executing."); for (; o && (o = 0, l[0] && (i = 0)), i;) try { if (n = 1, r && (a = 2 & l[0] ? r.return : l[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, l[1])).done) return a; switch (r = 0, a && (l = [2 & l[0], a.value]), l[0]) { case 0: case 1: a = l; break; case 4: return i.label++, { value: l[1], done: !1 }; case 5: i.label++, r = l[1], l = [0]; continue; case 7: l = i.ops.pop(), i.trys.pop(); continue; default: if (!(a = i.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== l[0] && 2 !== l[0])) { i = 0; continue } if (3 === l[0] && (!a || l[1] > a[0] && l[1] < a[3])) { i.label = l[1]; break } if (6 === l[0] && i.label < a[1]) { i.label = a[1], a = l; break } if (a && i.label < a[2]) { i.label = a[2], i.ops.push(l); break } a[2] && i.ops.pop(), i.trys.pop(); continue } l = t.call(e, i) } catch (e) { l = [6, e], r = 0 } finally { n = a = 0 } if (5 & l[0]) throw l[1]; return { value: l[0] ? l[1] : void 0, done: !0 } }([l, u]) } } } Object.create; function jf(e, t, n) { if (n || 2 === arguments.length) for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]); return e.concat(r || Array.prototype.slice.call(t)) } Object.create; "function" == typeof SuppressedError && SuppressedError; var zf = "3.4.2"; function Zf(e, t) { return new Promise((function(n) { return setTimeout(n, e, t) })) } function qf(e) { return !!e && "function" == typeof e.then } function Bf(e, t) { try { var n = e(); qf(n) ? n.then((function(e) { return t(!0, e) }), (function(e) { return t(!1, e) })) : t(!0, n) } catch (e) { t(!1, e) } } function Kf(e, t, n) { return void 0 === n && (n = 16), Ff(this, void 0, void 0, (function() { var r, a, i, o; return Gf(this, (function(l) { switch (l.label) { case 0: r = Array(e.length), a = Date.now(), i = 0, l.label = 1; case 1: return i < e.length ? (r[i] = t(e[i], i), (o = Date.now()) >= a + n ? (a = o, [4, Zf(0)]) : [3, 3]) : [3, 4]; case 2: l.sent(), l.label = 3; case 3: return ++i, [3, 1]; case 4: return [2, r] } })) })) } function Yf(e) { e.then(void 0, (function() {})) } function Jf(e, t) { e = [e[0] >>> 16, 65535 & e[0], e[1] >>> 16, 65535 & e[1]], t = [t[0] >>> 16, 65535 & t[0], t[1] >>> 16, 65535 & t[1]]; var n = [0, 0, 0, 0]; return n[3] += e[3] + t[3], n[2] += n[3] >>> 16, n[3] &= 65535, n[2] += e[2] + t[2], n[1] += n[2] >>> 16, n[2] &= 65535, n[1] += e[1] + t[1], n[0] += n[1] >>> 16, n[1] &= 65535, n[0] += e[0] + t[0], n[0] &= 65535, [n[0] << 16 | n[1], n[2] << 16 | n[3]] } function Xf(e, t) { e = [e[0] >>> 16, 65535 & e[0], e[1] >>> 16, 65535 & e[1]], t = [t[0] >>> 16, 65535 & t[0], t[1] >>> 16, 65535 & t[1]]; var n = [0, 0, 0, 0]; return n[3] += e[3] * t[3], n[2] += n[3] >>> 16, n[3] &= 65535, n[2] += e[2] * t[3], n[1] += n[2] >>> 16, n[2] &= 65535, n[2] += e[3] * t[2], n[1] += n[2] >>> 16, n[2] &= 65535, n[1] += e[1] * t[3], n[0] += n[1] >>> 16, n[1] &= 65535, n[1] += e[2] * t[2], n[0] += n[1] >>> 16, n[1] &= 65535, n[1] += e[3] * t[1], n[0] += n[1] >>> 16, n[1] &= 65535, n[0] += e[0] * t[3] + e[1] * t[2] + e[2] * t[1] + e[3] * t[0], n[0] &= 65535, [n[0] << 16 | n[1], n[2] << 16 | n[3]] } function Qf(e, t) { return 32 === (t %= 64) ? [e[1], e[0]] : t < 32 ? [e[0] << t | e[1] >>> 32 - t, e[1] << t | e[0] >>> 32 - t] : (t -= 32, [e[1] << t | e[0] >>> 32 - t, e[0] << t | e[1] >>> 32 - t]) } function $f(e, t) { return 0 === (t %= 64) ? e : t < 32 ? [e[0] << t | e[1] >>> 32 - t, e[1] << t] : [e[1] << t - 32, 0] } function ep(e, t) { return [e[0] ^ t[0], e[1] ^ t[1]] } function tp(e) { return e = ep(e, [0, e[0] >>> 1]), e = ep(e = Xf(e, [4283543511, 3981806797]), [0, e[0] >>> 1]), e = ep(e = Xf(e, [3301882366, 444984403]), [0, e[0] >>> 1]) } function np(e, t) { t = t || 0; var n, r = (e = e || "").length % 16, a = e.length - r, i = [0, t], o = [0, t], l = [0, 0], u = [0, 0], c = [2277735313, 289559509], s = [1291169091, 658871167]; for (n = 0; n < a; n += 16) l = [255 & e.charCodeAt(n + 4) | (255 & e.charCodeAt(n + 5)) << 8 | (255 & e.charCodeAt(n + 6)) << 16 | (255 & e.charCodeAt(n + 7)) << 24, 255 & e.charCodeAt(n) | (255 & e.charCodeAt(n + 1)) << 8 | (255 & e.charCodeAt(n + 2)) << 16 | (255 & e.charCodeAt(n + 3)) << 24], u = [255 & e.charCodeAt(n + 12) | (255 & e.charCodeAt(n + 13)) << 8 | (255 & e.charCodeAt(n + 14)) << 16 | (255 & e.charCodeAt(n + 15)) << 24, 255 & e.charCodeAt(n + 8) | (255 & e.charCodeAt(n + 9)) << 8 | (255 & e.charCodeAt(n + 10)) << 16 | (255 & e.charCodeAt(n + 11)) << 24], l = Qf(l = Xf(l, c), 31), i = Jf(i = Qf(i = ep(i, l = Xf(l, s)), 27), o), i = Jf(Xf(i, [0, 5]), [0, 1390208809]), u = Qf(u = Xf(u, s), 33), o = Jf(o = Qf(o = ep(o, u = Xf(u, c)), 31), i), o = Jf(Xf(o, [0, 5]), [0, 944331445]); switch (l = [0, 0], u = [0, 0], r) { case 15: u = ep(u, $f([0, e.charCodeAt(n + 14)], 48)); case 14: u = ep(u, $f([0, e.charCodeAt(n + 13)], 40)); case 13: u = ep(u, $f([0, e.charCodeAt(n + 12)], 32)); case 12: u = ep(u, $f([0, e.charCodeAt(n + 11)], 24)); case 11: u = ep(u, $f([0, e.charCodeAt(n + 10)], 16)); case 10: u = ep(u, $f([0, e.charCodeAt(n + 9)], 8)); case 9: u = Xf(u = ep(u, [0, e.charCodeAt(n + 8)]), s), o = ep(o, u = Xf(u = Qf(u, 33), c)); case 8: l = ep(l, $f([0, e.charCodeAt(n + 7)], 56)); case 7: l = ep(l, $f([0, e.charCodeAt(n + 6)], 48)); case 6: l = ep(l, $f([0, e.charCodeAt(n + 5)], 40)); case 5: l = ep(l, $f([0, e.charCodeAt(n + 4)], 32)); case 4: l = ep(l, $f([0, e.charCodeAt(n + 3)], 24)); case 3: l = ep(l, $f([0, e.charCodeAt(n + 2)], 16)); case 2: l = ep(l, $f([0, e.charCodeAt(n + 1)], 8)); case 1: l = Xf(l = ep(l, [0, e.charCodeAt(n)]), c), i = ep(i, l = Xf(l = Qf(l, 31), s)) } return i = Jf(i = ep(i, [0, e.length]), o = ep(o, [0, e.length])), o = Jf(o, i), i = Jf(i = tp(i), o = tp(o)), o = Jf(o, i), ("00000000" + (i[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (i[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[1] >>> 0).toString(16)).slice(-8) } function rp(e) { return parseInt(e) } function ap(e) { return parseFloat(e) } function ip(e, t) { return "number" == typeof e && isNaN(e) ? t : e } function op(e) { return e.reduce((function(e, t) { return e + (t ? 1 : 0) }), 0) } function lp(e, t) { if (void 0 === t && (t = 1), Math.abs(t) >= 1) return Math.round(e / t) * t; var n = 1 / t; return Math.round(e * n) / n } function up(e) { return e && "object" == typeof e && "message" in e ? e : { message: e } } function cp(e) { return "function" != typeof e } function sp(e, t, n) { var r = Object.keys(e).filter((function(e) { return ! function(e, t) { for (var n = 0, r = e.length; n < r; ++n) if (e[n] === t) return !0; return !1 }(n, e) })), a = Kf(r, (function(n) { return function(e, t) { var n = new Promise((function(n) { var r = Date.now(); Bf(e.bind(null, t), (function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var a = Date.now() - r; if (!e[0]) return n((function() { return { error: up(e[1]), duration: a } })); var i = e[1]; if (cp(i)) return n((function() { return { value: i, duration: a } })); n((function() { return new Promise((function(e) { var t = Date.now(); Bf(i, (function() { for (var n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r]; var i = a + Date.now() - t; if (!n[0]) return e({ error: up(n[1]), duration: i }); e({ value: n[1], duration: i }) })) })) })) })) })); return Yf(n), function() { return n.then((function(e) { return e() })) } }(e[n], t) })); return Yf(a), function() { return Ff(this, void 0, void 0, (function() { var e, t, n, i; return Gf(this, (function(o) { switch (o.label) { case 0: return [4, a]; case 1: return [4, Kf(o.sent(), (function(e) { var t = e(); return Yf(t), t }))]; case 2: return e = o.sent(), [4, Promise.all(e)]; case 3: for (t = o.sent(), n = {}, i = 0; i < r.length; ++i) n[r[i]] = t[i]; return [2, n] } })) })) } } function dp() { var e = window, t = navigator; return op(["MSCSSMatrix" in e, "msSetImmediate" in e, "msIndexedDB" in e, "msMaxTouchPoints" in t, "msPointerEnabled" in t]) >= 4 } function fp() { var e = window, t = navigator; return op(["webkitPersistentStorage" in t, "webkitTemporaryStorage" in t, 0 === t.vendor.indexOf("Google"), "webkitResolveLocalFileSystemURL" in e, "BatteryManager" in e, "webkitMediaStream" in e, "webkitSpeechGrammar" in e]) >= 5 } function pp() { var e = window, t = navigator; return op(["ApplePayError" in e, "CSSPrimitiveValue" in e, "Counter" in e, 0 === t.vendor.indexOf("Apple"), "getStorageUpdates" in t, "WebKitMediaKeys" in e]) >= 4 } function hp() { var e = window; return op(["safari" in e, !("DeviceMotionEvent" in e), !("ongestureend" in e), !("standalone" in navigator)]) >= 3 } function vp() { var e = document; return (e.exitFullscreen || e.msExitFullscreen || e.mozCancelFullScreen || e.webkitExitFullscreen).call(e) } function mp() { var e = fp(), t = function() { var e, t, n = window; return op(["buildID" in navigator, "MozAppearance" in (null !== (t = null === (e = document.documentElement) || void 0 === e ? void 0 : e.style) && void 0 !== t ? t : {}), "onmozfullscreenchange" in n, "mozInnerScreenX" in n, "CSSMozDocumentRule" in n, "CanvasCaptureMediaStream" in n]) >= 4 }(); if (!e && !t) return !1; var n = window; return op(["onorientationchange" in n, "orientation" in n, e && !("SharedWorker" in n), t && /android/i.test(navigator.appVersion)]) >= 2 } function yp(e) { var t = new Error(e); return t.name = e, t } function gp(e, t, n) { var r, a, i; return void 0 === n && (n = 50), Ff(this, void 0, void 0, (function() { var o, l; return Gf(this, (function(u) { switch (u.label) { case 0: o = document, u.label = 1; case 1: return o.body ? [3, 3] : [4, Zf(n)]; case 2: return u.sent(), [3, 1]; case 3: l = o.createElement("iframe"), u.label = 4; case 4: return u.trys.push([4, , 10, 11]), [4, new Promise((function(e, n) { var r = !1, a = function() { r = !0, e() }; l.onload = a, l.onerror = function(e) { r = !0, n(e) }; var i = l.style; i.setProperty("display", "block", "important"), i.position = "absolute", i.top = "0", i.left = "0", i.visibility = "hidden", t && "srcdoc" in l ? l.srcdoc = t : l.src = "about:blank", o.body.appendChild(l); var u = function() { var e, t; r || ("complete" === (null === (t = null === (e = l.contentWindow) || void 0 === e ? void 0 : e.document) || void 0 === t ? void 0 : t.readyState) ? a() : setTimeout(u, 10)) }; u() }))]; case 5: u.sent(), u.label = 6; case 6: return (null === (a = null === (r = l.contentWindow) || void 0 === r ? void 0 : r.document) || void 0 === a ? void 0 : a.body) ? [3, 8] : [4, Zf(n)]; case 7: return u.sent(), [3, 6]; case 8: return [4, e(l, l.contentWindow)]; case 9: return [2, u.sent()]; case 10: return null === (i = l.parentNode) || void 0 === i || i.removeChild(l), [7]; case 11: return [2] } })) })) } function Ep(e) { for (var t = function(e) { for (var t, n, r = "Unexpected syntax '".concat(e, "'"), a = /^\s*([a-z-]*)(.*)$/i.exec(e), i = a[1] || void 0, o = {}, l = /([.:#][\w-]+|\[.+?\])/gi, u = function(e, t) { o[e] = o[e] || [], o[e].push(t) };;) { var c = l.exec(a[2]); if (!c) break; var s = c[0]; switch (s[0]) { case ".": u("class", s.slice(1)); break; case "#": u("id", s.slice(1)); break; case "[": var d = /^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(s); if (!d) throw new Error(r); u(d[1], null !== (n = null !== (t = d[4]) && void 0 !== t ? t : d[5]) && void 0 !== n ? n : ""); break; default: throw new Error(r) } } return [i, o] }(e), n = t[0], r = t[1], a = document.createElement(null != n ? n : "div"), i = 0, o = Object.keys(r); i < o.length; i++) { var l = o[i], u = r[l].join(" "); "style" === l ? bp(a.style, u) : a.setAttribute(l, u) } return a } function bp(e, t) { for (var n = 0, r = t.split(";"); n < r.length; n++) { var a = r[n], i = /^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(a); if (i) { var o = i[1], l = i[2], u = i[4]; e.setProperty(o, l, u || "") } } } var Cp = ["monospace", "sans-serif", "serif"], _p = ["sans-serif-thin", "ARNO PRO", "Agency FB", "Arabic Typesetting", "Arial Unicode MS", "AvantGarde Bk BT", "BankGothic Md BT", "Batang", "Bitstream Vera Sans Mono", "Calibri", "Century", "Century Gothic", "Clarendon", "EUROSTILE", "Franklin Gothic", "Futura Bk BT", "Futura Md BT", "GOTHAM", "Gill Sans", "HELV", "Haettenschweiler", "Helvetica Neue", "Humanst521 BT", "Leelawadee", "Letter Gothic", "Levenim MT", "Lucida Bright", "Lucida Sans", "Menlo", "MS Mincho", "MS Outlook", "MS Reference Specialty", "MS UI Gothic", "MT Extra", "MYRIAD PRO", "Marlett", "Meiryo UI", "Microsoft Uighur", "Minion Pro", "Monotype Corsiva", "PMingLiU", "Pristina", "SCRIPTINA", "Segoe UI Light", "Serifa", "SimHei", "Small Fonts", "Staccato222 BT", "TRAJAN PRO", "Univers CE 55 Medium", "Vrinda", "ZWAdobeF"]; function Sp(e) { return e.toDataURL() } var Ip, Tp; function Ap() { var e = this; return function() { if (void 0 === Tp) { var e = function() { var t = Np(); wp(t) ? Tp = setTimeout(e, 2500) : (Ip = t, Tp = void 0) }; e() } }(), function() { return Ff(e, void 0, void 0, (function() { var e; return Gf(this, (function(t) { switch (t.label) { case 0: return wp(e = Np()) ? Ip ? [2, jf([], Ip, !0)] : function() { var e = document; return e.fullscreenElement || e.msFullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || null }() ? [4, vp()] : [3, 2] : [3, 2]; case 1: t.sent(), e = Np(), t.label = 2; case 2: return wp(e) || (Ip = e), [2, e] } })) })) } } function Np() { var e = screen; return [ip(ap(e.availTop), null), ip(ap(e.width) - ap(e.availWidth) - ip(ap(e.availLeft), 0), null), ip(ap(e.height) - ap(e.availHeight) - ip(ap(e.availTop), 0), null), ip(ap(e.availLeft), null)] } function wp(e) { for (var t = 0; t < 4; ++t) if (e[t]) return !1; return !0 } function Lp(e) { var t; return Ff(this, void 0, void 0, (function() { var n, r, a, i, o, l, u; return Gf(this, (function(c) { switch (c.label) { case 0: for (n = document, r = n.createElement("div"), a = new Array(e.length), i = {}, Op(r), u = 0; u < e.length; ++u) "DIALOG" === (o = Ep(e[u])).tagName && o.show(), Op(l = n.createElement("div")), l.appendChild(o), r.appendChild(l), a[u] = o; c.label = 1; case 1: return n.body ? [3, 3] : [4, Zf(50)]; case 2: return c.sent(), [3, 1]; case 3: n.body.appendChild(r); try { for (u = 0; u < e.length; ++u) a[u].offsetParent || (i[e[u]] = !0) } finally { null === (t = r.parentNode) || void 0 === t || t.removeChild(r) } return [2, i] } })) })) } function Op(e) { e.style.setProperty("display", "block", "important") } function kp(e) { return matchMedia("(inverted-colors: ".concat(e, ")")).matches } function Dp(e) { return matchMedia("(forced-colors: ".concat(e, ")")).matches } function Rp(e) { return matchMedia("(prefers-contrast: ".concat(e, ")")).matches } function Pp(e) { return matchMedia("(prefers-reduced-motion: ".concat(e, ")")).matches } function xp(e) { return matchMedia("(dynamic-range: ".concat(e, ")")).matches } var Mp = Math, Vp = function() { return 0 }; var Up = { default: [], apple: [{ font: "-apple-system-body" }], serif: [{ fontFamily: "serif" }], sans: [{ fontFamily: "sans-serif" }], mono: [{ fontFamily: "monospace" }], min: [{ fontSize: "1px" }], system: [{ fontFamily: "system-ui" }] }; var Wp = { fonts: function() { return gp((function(e, t) { var n = t.document, r = n.body; r.style.fontSize = "48px"; var a = n.createElement("div"), i = {}, o = {}, l = function(e) { var t = n.createElement("span"), r = t.style; return r.position = "absolute", r.top = "0", r.left = "0", r.fontFamily = e, t.textContent = "mmMwWLliI0O&1", a.appendChild(t), t }, u = Cp.map(l), c = function() { for (var e = {}, t = function(t) { e[t] = Cp.map((function(e) { return function(e, t) { return l("'".concat(e, "',").concat(t)) }(t, e) })) }, n = 0, r = _p; n < r.length; n++) { t(r[n]) } return e }(); r.appendChild(a); for (var s = 0; s < Cp.length; s++) i[Cp[s]] = u[s].offsetWidth, o[Cp[s]] = u[s].offsetHeight; return _p.filter((function(e) { return t = c[e], Cp.some((function(e, n) { return t[n].offsetWidth !== i[e] || t[n].offsetHeight !== o[e] })); var t })) })) }, domBlockers: function(e) { var t = (void 0 === e ? {} : e).debug; return Ff(this, void 0, void 0, (function() { var e, n, r, a, i; return Gf(this, (function(o) { switch (o.label) { case 0: return pp() || mp() ? (l = atob, e = { abpIndo: ["#Iklan-Melayang", "#Kolom-Iklan-728", "#SidebarIklan-wrapper", '[title="ALIENBOLA" i]', l("I0JveC1CYW5uZXItYWRz")], abpvn: [".quangcao", "#mobileCatfish", l("LmNsb3NlLWFkcw=="), '[id^="bn_bottom_fixed_"]', "#pmadv"], adBlockFinland: [".mainostila", l("LnNwb25zb3JpdA=="), ".ylamainos", l("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"), l("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")], adBlockPersian: ["#navbar_notice_50", ".kadr", 'TABLE[width="140px"]', "#divAgahi", l("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")], adBlockWarningRemoval: ["#adblock-honeypot", ".adblocker-root", ".wp_adblock_detect", l("LmhlYWRlci1ibG9ja2VkLWFk"), l("I2FkX2Jsb2NrZXI=")], adGuardAnnoyances: [".hs-sosyal", "#cookieconsentdiv", 'div[class^="app_gdpr"]', ".as-oil", '[data-cypress="soft-push-notification-modal"]'], adGuardBase: [".BetterJsPopOverlay", l("I2FkXzMwMFgyNTA="), l("I2Jhbm5lcmZsb2F0MjI="), l("I2NhbXBhaWduLWJhbm5lcg=="), l("I0FkLUNvbnRlbnQ=")], adGuardChinese: [l("LlppX2FkX2FfSA=="), l("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"), "#widget-quan", l("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"), l("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")], adGuardFrench: ["#pavePub", l("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"), ".mobile_adhesion", ".widgetadv", l("LmFkc19iYW4=")], adGuardGerman: ['aside[data-portal-id="leaderboard"]'], adGuardJapanese: ["#kauli_yad_1", l("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="), l("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="), l("LmFkZ29vZ2xl"), l("Ll9faXNib29zdFJldHVybkFk")], adGuardMobile: [l("YW1wLWF1dG8tYWRz"), l("LmFtcF9hZA=="), 'amp-embed[type="24smi"]', "#mgid_iframe1", l("I2FkX2ludmlld19hcmVh")], adGuardRussian: [l("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="), l("LnJlY2xhbWE="), 'div[id^="smi2adblock"]', l("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"), "#psyduckpockeball"], adGuardSocial: [l("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="), l("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="), ".etsy-tweet", "#inlineShare", ".popup-social"], adGuardSpanishPortuguese: ["#barraPublicidade", "#Publicidade", "#publiEspecial", "#queTooltip", ".cnt-publi"], adGuardTrackingProtection: ["#qoo-counter", l("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="), l("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="), l("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="), "#top100counter"], adGuardTurkish: ["#backkapat", l("I3Jla2xhbWk="), l("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="), l("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"), l("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")], bulgarian: [l("dGQjZnJlZW5ldF90YWJsZV9hZHM="), "#ea_intext_div", ".lapni-pop-over", "#xenium_hot_offers"], easyList: [".yb-floorad", l("LndpZGdldF9wb19hZHNfd2lkZ2V0"), l("LnRyYWZmaWNqdW5reS1hZA=="), ".textad_headline", l("LnNwb25zb3JlZC10ZXh0LWxpbmtz")], easyListChina: [l("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="), l("LmZyb250cGFnZUFkdk0="), "#taotaole", "#aafoot.top_box", ".cfa_popup"], easyListCookie: [".ezmob-footer", ".cc-CookieWarning", "[data-cookie-number]", l("LmF3LWNvb2tpZS1iYW5uZXI="), ".sygnal24-gdpr-modal-wrap"], easyListCzechSlovak: ["#onlajny-stickers", l("I3Jla2xhbW5pLWJveA=="), l("LnJla2xhbWEtbWVnYWJvYXJk"), ".sklik", l("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")], easyListDutch: [l("I2FkdmVydGVudGll"), l("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="), ".adstekst", l("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="), "#semilo-lrectangle"], easyListGermany: ["#SSpotIMPopSlider", l("LnNwb25zb3JsaW5rZ3J1ZW4="), l("I3dlcmJ1bmdza3k="), l("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"), l("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")], easyListItaly: [l("LmJveF9hZHZfYW5udW5jaQ=="), ".sb-box-pubbliredazionale", l("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"), l("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"), l("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")], easyListLithuania: [l("LnJla2xhbW9zX3RhcnBhcw=="), l("LnJla2xhbW9zX251b3JvZG9z"), l("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"), l("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"), l("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")], estonian: [l("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")], fanboyAnnoyances: ["#ac-lre-player", ".navigate-to-top", "#subscribe_popup", ".newsletter_holder", "#back-top"], fanboyAntiFacebook: [".util-bar-module-firefly-visible"], fanboyEnhancedTrackers: [".open.pushModal", "#issuem-leaky-paywall-articles-zero-remaining-nag", "#sovrn_container", 'div[class$="-hide"][zoompage-fontsize][style="display: block;"]', ".BlockNag__Card"], fanboySocial: ["#FollowUs", "#meteored_share", "#social_follow", ".article-sharer", ".community__social-desc"], frellwitSwedish: [l("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="), l("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="), "article.category-samarbete", l("ZGl2LmhvbGlkQWRz"), "ul.adsmodern"], greekAdBlock: [l("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"), l("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="), l("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"), "DIV.agores300", "TABLE.advright"], hungarian: ["#cemp_doboz", ".optimonk-iframe-container", l("LmFkX19tYWlu"), l("W2NsYXNzKj0iR29vZ2xlQWRzIl0="), "#hirdetesek_box"], iDontCareAboutCookies: ['.alert-info[data-block-track*="CookieNotice"]', ".ModuleTemplateCookieIndicator", ".o--cookies--container", "#cookies-policy-sticky", "#stickyCookieBar"], icelandicAbp: [l("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")], latvian: [l("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="), l("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")], listKr: [l("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="), l("I2xpdmVyZUFkV3JhcHBlcg=="), l("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="), l("aW5zLmZhc3R2aWV3LWFk"), ".revenue_unit_item.dable"], listeAr: [l("LmdlbWluaUxCMUFk"), ".right-and-left-sponsers", l("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="), l("YVtocmVmKj0iYm9vcmFxLm9yZyJd"), l("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")], listeFr: [l("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="), l("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="), l("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="), ".site-pub-interstitiel", 'div[id^="crt-"][data-criteo-id]'], officialPolish: ["#ceneo-placeholder-ceneo-12", l("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"), l("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="), l("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="), l("ZGl2I3NrYXBpZWNfYWQ=")], ro: [l("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"), l("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"), l("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="), l("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"), 'a[href^="/url/"]'], ruAd: [l("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"), l("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="), l("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="), "#pgeldiz", ".yandex-rtb-block"], thaiAds: ["a[href*=macau-uta-popup]", l("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="), l("LmFkczMwMHM="), ".bumq", ".img-kosana"], webAnnoyancesUltralist: ["#mod-social-share-2", "#social-tools", l("LmN0cGwtZnVsbGJhbm5lcg=="), ".zergnet-recommend", ".yt.btn-link.btn-md.btn"] }, n = Object.keys(e), [4, Lp((i = []).concat.apply(i, n.map((function(t) { return e[t] }))))]) : [2, void 0]; case 1: return r = o.sent(), t && function(e, t) { for (var n = "DOM blockers debug:\n```", r = 0, a = Object.keys(e); r < a.length; r++) { var i = a[r]; n += "\n".concat(i, ":"); for (var o = 0, l = e[i]; o < l.length; o++) { var u = l[o]; n += "\n ".concat(t[u] ? "🚫" : "➡️", " ").concat(u) } } console.log("".concat(n, "\n```")) }(e, r), (a = n.filter((function(t) { var n = e[t]; return op(n.map((function(e) { return r[e] }))) > .6 * n.length }))).sort(), [2, a] } var l })) })) }, fontPreferences: function() { return function(e, t) { void 0 === t && (t = 4e3); return gp((function(n, r) { var a = r.document, i = a.body, o = i.style; o.width = "".concat(t, "px"), o.webkitTextSizeAdjust = o.textSizeAdjust = "none", fp() ? i.style.zoom = "".concat(1 / r.devicePixelRatio) : pp() && (i.style.zoom = "reset"); var l = a.createElement("div"); return l.textContent = jf([], Array(t / 20 | 0), !0).map((function() { return "word" })).join(" "), i.appendChild(l), e(a, i) }), '') }((function(e, t) { for (var n = {}, r = {}, a = 0, i = Object.keys(Up); a < i.length; a++) { var o = i[a], l = Up[o], u = l[0], c = void 0 === u ? {} : u, s = l[1], d = void 0 === s ? "mmMwWLliI0fiflO&1" : s, f = e.createElement("span"); f.textContent = d, f.style.whiteSpace = "nowrap"; for (var p = 0, h = Object.keys(c); p < h.length; p++) { var v = h[p], m = c[v]; void 0 !== m && (f.style[v] = m) } n[o] = f, t.appendChild(e.createElement("br")), t.appendChild(f) } for (var y = 0, g = Object.keys(Up); y < g.length; y++) { r[o = g[y]] = n[o].getBoundingClientRect().width } return r })) }, audio: function() { var e = window, t = e.OfflineAudioContext || e.webkitOfflineAudioContext; if (!t) return -2; if (pp() && !hp() && ! function() { var e = window; return op(["DOMRectList" in e, "RTCPeerConnectionIceEvent" in e, "SVGGeometryElement" in e, "ontransitioncancel" in e]) >= 3 }()) return -1; var n = new t(1, 5e3, 44100), r = n.createOscillator(); r.type = "triangle", r.frequency.value = 1e4; var a = n.createDynamicsCompressor(); a.threshold.value = -50, a.knee.value = 40, a.ratio.value = 12, a.attack.value = 0, a.release.value = .25, r.connect(a), a.connect(n.destination), r.start(0); var i = function(e) { var t = 3, n = 500, r = 500, a = 5e3, i = function() {}, o = new Promise((function(o, l) { var u = !1, c = 0, s = 0; e.oncomplete = function(e) { return o(e.renderedBuffer) }; var d = function() { setTimeout((function() { return l(yp("timeout")) }), Math.min(r, s + a - Date.now())) }, f = function() { try { var r = e.startRendering(); switch (qf(r) && Yf(r), e.state) { case "running": s = Date.now(), u && d(); break; case "suspended": document.hidden || c++, u && c >= t ? l(yp("suspended")) : setTimeout(f, n) } } catch (e) { l(e) } }; f(), i = function() { u || (u = !0, s > 0 && d()) } })); return [o, i] }(n), o = i[0], l = i[1], u = o.then((function(e) { return function(e) { for (var t = 0, n = 0; n < e.length; ++n) t += Math.abs(e[n]); return t }(e.getChannelData(0).subarray(4500)) }), (function(e) { if ("timeout" === e.name || "suspended" === e.name) return -3; throw e })); return Yf(u), function() { return l(), u } }, screenFrame: function() { var e = this, t = Ap(); return function() { return Ff(e, void 0, void 0, (function() { var e, n; return Gf(this, (function(r) { switch (r.label) { case 0: return [4, t()]; case 1: return e = r.sent(), [2, [(n = function(e) { return null === e ? null : lp(e, 10) })(e[0]), n(e[1]), n(e[2]), n(e[3])]] } })) })) } }, osCpu: function() { return navigator.oscpu }, languages: function() { var e = navigator, t = [], n = e.language || e.userLanguage || e.browserLanguage || e.systemLanguage; if (void 0 !== n && t.push([n]), Array.isArray(e.languages)) fp() && function() { var e = window; return op([!("MediaSettingsRange" in e), "RTCEncodedAudioFrame" in e, "" + e.Intl == "[object Intl]", "" + e.Reflect == "[object Reflect]"]) >= 3 }() || t.push(e.languages); else if ("string" == typeof e.languages) { var r = e.languages; r && t.push(r.split(",")) } return t }, colorDepth: function() { return window.screen.colorDepth }, deviceMemory: function() { return ip(ap(navigator.deviceMemory), void 0) }, screenResolution: function() { var e = screen, t = function(e) { return ip(rp(e), null) }, n = [t(e.width), t(e.height)]; return n.sort().reverse(), n }, hardwareConcurrency: function() { return ip(rp(navigator.hardwareConcurrency), void 0) }, timezone: function() { var e, t = null === (e = window.Intl) || void 0 === e ? void 0 : e.DateTimeFormat; if (t) { var n = (new t).resolvedOptions().timeZone; if (n) return n } var r, a = (r = (new Date).getFullYear(), -Math.max(ap(new Date(r, 0, 1).getTimezoneOffset()), ap(new Date(r, 6, 1).getTimezoneOffset()))); return "UTC".concat(a >= 0 ? "+" : "").concat(Math.abs(a)) }, sessionStorage: function() { try { return !!window.sessionStorage } catch (e) { return !0 } }, localStorage: function() { try { return !!window.localStorage } catch (e) { return !0 } }, indexedDB: function() { if (!dp() && ! function() { var e = window, t = navigator; return op(["msWriteProfilerMark" in e, "MSStream" in e, "msLaunchUri" in t, "msSaveBlob" in t]) >= 3 && !dp() }()) try { return !!window.indexedDB } catch (e) { return !0 } }, openDatabase: function() { return !!window.openDatabase }, cpuClass: function() { return navigator.cpuClass }, platform: function() { var e = navigator.platform; return "MacIntel" === e && pp() && !hp() ? function() { if ("iPad" === navigator.platform) return !0; var e = screen, t = e.width / e.height; return op(["MediaSource" in window, !!Element.prototype.webkitRequestFullscreen, t > .65 && t < 1.53]) >= 2 }() ? "iPad" : "iPhone" : e }, plugins: function() { var e = navigator.plugins; if (e) { for (var t = [], n = 0; n < e.length; ++n) { var r = e[n]; if (r) { for (var a = [], i = 0; i < r.length; ++i) { var o = r[i]; a.push({ type: o.type, suffixes: o.suffixes }) } t.push({ name: r.name, description: r.description, mimeTypes: a }) } } return t } }, canvas: function() { var e, t, n = !1, r = function() { var e = document.createElement("canvas"); return e.width = 1, e.height = 1, [e, e.getContext("2d")] }(), a = r[0], i = r[1]; if (function(e, t) { return !(!t || !e.toDataURL) }(a, i)) { n = function(e) { return e.rect(0, 0, 10, 10), e.rect(2, 2, 6, 6), !e.isPointInPath(5, 5, "evenodd") }(i), function(e, t) { e.width = 240, e.height = 60, t.textBaseline = "alphabetic", t.fillStyle = "#f60", t.fillRect(100, 1, 62, 20), t.fillStyle = "#069", t.font = '11pt "Times New Roman"'; var n = "Cwm fjordbank gly ".concat(String.fromCharCode(55357, 56835)); t.fillText(n, 2, 15), t.fillStyle = "rgba(102, 204, 0, 0.2)", t.font = "18pt Arial", t.fillText(n, 4, 45) }(a, i); var o = Sp(a); o !== Sp(a) ? e = t = "unstable" : (t = o, function(e, t) { e.width = 122, e.height = 110, t.globalCompositeOperation = "multiply"; for (var n = 0, r = [ ["#f2f", 40, 40], ["#2ff", 80, 40], ["#ff2", 60, 80] ]; n < r.length; n++) { var a = r[n], i = a[0], o = a[1], l = a[2]; t.fillStyle = i, t.beginPath(), t.arc(o, l, 40, 0, 2 * Math.PI, !0), t.closePath(), t.fill() } t.fillStyle = "#f9c", t.arc(60, 60, 60, 0, 2 * Math.PI, !0), t.arc(60, 60, 20, 0, 2 * Math.PI, !0), t.fill("evenodd") }(a, i), e = Sp(a)) } else e = t = ""; return { winding: n, geometry: e, text: t } }, touchSupport: function() { var e, t = navigator, n = 0; void 0 !== t.maxTouchPoints ? n = rp(t.maxTouchPoints) : void 0 !== t.msMaxTouchPoints && (n = t.msMaxTouchPoints); try { document.createEvent("TouchEvent"), e = !0 } catch (t) { e = !1 } return { maxTouchPoints: n, touchEvent: e, touchStart: "ontouchstart" in window } }, vendor: function() { return navigator.vendor || "" }, vendorFlavors: function() { for (var e = [], t = 0, n = ["chrome", "safari", "__crWeb", "__gCrWeb", "yandex", "__yb", "__ybro", "__firefox__", "__edgeTrackingPreventionStatistics", "webkit", "oprt", "samsungAr", "ucweb", "UCShellJava", "puffinDevice"]; t < n.length; t++) { var r = n[t], a = window[r]; a && "object" == typeof a && e.push(r) } return e.sort() }, cookiesEnabled: function() { var e = document; try { e.cookie = "cookietest=1; SameSite=Strict;"; var t = -1 !== e.cookie.indexOf("cookietest="); return e.cookie = "cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT", t } catch (e) { return !1 } }, colorGamut: function() { for (var e = 0, t = ["rec2020", "p3", "srgb"]; e < t.length; e++) { var n = t[e]; if (matchMedia("(color-gamut: ".concat(n, ")")).matches) return n } }, invertedColors: function() { return !!kp("inverted") || !kp("none") && void 0 }, forcedColors: function() { return !!Dp("active") || !Dp("none") && void 0 }, monochrome: function() { if (matchMedia("(min-monochrome: 0)").matches) { for (var e = 0; e <= 100; ++e) if (matchMedia("(max-monochrome: ".concat(e, ")")).matches) return e; throw new Error("Too high value") } }, contrast: function() { return Rp("no-preference") ? 0 : Rp("high") || Rp("more") ? 1 : Rp("low") || Rp("less") ? -1 : Rp("forced") ? 10 : void 0 }, reducedMotion: function() { return !!Pp("reduce") || !Pp("no-preference") && void 0 }, hdr: function() { return !!xp("high") || !xp("standard") && void 0 }, math: function() { var e, t = Mp.acos || Vp, n = Mp.acosh || Vp, r = Mp.asin || Vp, a = Mp.asinh || Vp, i = Mp.atanh || Vp, o = Mp.atan || Vp, l = Mp.sin || Vp, u = Mp.sinh || Vp, c = Mp.cos || Vp, s = Mp.cosh || Vp, d = Mp.tan || Vp, f = Mp.tanh || Vp, p = Mp.exp || Vp, h = Mp.expm1 || Vp, v = Mp.log1p || Vp; return { acos: t(.12312423423423424), acosh: n(1e308), acoshPf: (e = 1e154, Mp.log(e + Mp.sqrt(e * e - 1))), asin: r(.12312423423423424), asinh: a(1), asinhPf: function(e) { return Mp.log(e + Mp.sqrt(e * e + 1)) }(1), atanh: i(.5), atanhPf: function(e) { return Mp.log((1 + e) / (1 - e)) / 2 }(.5), atan: o(.5), sin: l(-1e300), sinh: u(1), sinhPf: function(e) { return Mp.exp(e) - 1 / Mp.exp(e) / 2 }(1), cos: c(10.000000000123), cosh: s(1), coshPf: function(e) { return (Mp.exp(e) + 1 / Mp.exp(e)) / 2 }(1), tan: d(-1e300), tanh: f(1), tanhPf: function(e) { return (Mp.exp(2 * e) - 1) / (Mp.exp(2 * e) + 1) }(1), exp: p(1), expm1: h(1), expm1Pf: function(e) { return Mp.exp(e) - 1 }(1), log1p: v(10), log1pPf: function(e) { return Mp.log(1 + e) }(10), powPI: function(e) { return Mp.pow(Mp.PI, e) }(-100) } }, videoCard: function() { var e, t = document.createElement("canvas"), n = null !== (e = t.getContext("webgl")) && void 0 !== e ? e : t.getContext("experimental-webgl"); if (n && "getExtension" in n) { var r = n.getExtension("WEBGL_debug_renderer_info"); if (r) return { vendor: (n.getParameter(r.UNMASKED_VENDOR_WEBGL) || "").toString(), renderer: (n.getParameter(r.UNMASKED_RENDERER_WEBGL) || "").toString() } } }, pdfViewerEnabled: function() { return navigator.pdfViewerEnabled }, architecture: function() { var e = new Float32Array(1), t = new Uint8Array(e.buffer); return e[0] = 1 / 0, e[0] = e[0] - e[0], t[3] } }; function Hp(e) { var t = function(e) { if (mp()) return .4; if (pp()) return hp() ? .5 : .3; var t = e.platform.value || ""; if (/^Win/.test(t)) return .6; if (/^Mac/.test(t)) return .5; return .7 }(e), n = function(e) { return lp(.99 + .01 * e, 1e-4) }(t); return { score: t, comment: "$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g, "".concat(n)) } } function Fp(e) { return JSON.stringify(e, (function(e, t) { return t instanceof Error ? function(e) { var t; return Hf({ name: e.name, message: e.message, stack: null === (t = e.stack) || void 0 === t ? void 0 : t.split("\n") }, e) }(t) : t }), 2) } function Gp(e) { return np(function(e) { for (var t = "", n = 0, r = Object.keys(e).sort(); n < r.length; n++) { var a = r[n], i = e[a], o = i.error ? "error" : JSON.stringify(i.value); t += "".concat(t ? "|" : "").concat(a.replace(/([:|\\])/g, "\\$1"), ":").concat(o) } return t }(e)) } function jp(e) { return void 0 === e && (e = 50), function(e, t) { void 0 === t && (t = 1 / 0); var n = window.requestIdleCallback; return n ? new Promise((function(e) { return n.call(window, (function() { return e() }), { timeout: t }) })) : Zf(Math.min(e, t)) }(e, 2 * e) } function zp(e, t) { var n = Date.now(); return { get: function(r) { return Ff(this, void 0, void 0, (function() { var a, i, o; return Gf(this, (function(l) { switch (l.label) { case 0: return a = Date.now(), [4, e()]; case 1: return i = l.sent(), o = function(e) { var t, n = Hp(e); return { get visitorId() { return void 0 === t && (t = Gp(this.components)), t }, set visitorId(e) { t = e }, confidence: n, components: e, version: zf } }(i), (t || (null == r ? void 0 : r.debug)) && console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(o.version, "\nuserAgent: ").concat(navigator.userAgent, "\ntimeBetweenLoadAndGet: ").concat(a - n, "\nvisitorId: ").concat(o.visitorId, "\ncomponents: ").concat(Fp(i), "\n```")), [2, o] } })) })) } } } var Zp = { load: function(e) { var t = void 0 === e ? {} : e, n = t.delayFallback, r = t.debug, a = t.monitoring, i = void 0 === a || a; return Ff(this, void 0, void 0, (function() { return Gf(this, (function(e) { switch (e.label) { case 0: return i && function() { if (!(window.__fpjs_d_m || Math.random() >= .001)) try { var e = new XMLHttpRequest; e.open("get", "https://m1.openfpcdn.io/fingerprintjs/v".concat(zf, "/npm-monitoring"), !0), e.send() } catch (e) { console.error(e) } }(), [4, jp(n)]; case 1: return e.sent(), [2, zp(sp(Wp, { debug: r }, []), r)] } })) })) }, hashComponents: Gp, componentsToDebugString: Fp }; function qp(e) { return function(t, n) { return e.chain(t, (function(t) { return e.map(n(t), (function() { return t })) })) } } var Bp = function(e, t, n) { if (n || 2 === arguments.length) for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]); return e.concat(r || Array.prototype.slice.call(t)) }; function Kp(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return function() { return t(e.apply(this, arguments)) }; case 3: return function() { return n(t(e.apply(this, arguments))) }; case 4: return function() { return r(n(t(e.apply(this, arguments)))) }; case 5: return function() { return a(r(n(t(e.apply(this, arguments))))) }; case 6: return function() { return i(a(r(n(t(e.apply(this, arguments)))))) }; case 7: return function() { return o(i(a(r(n(t(e.apply(this, arguments))))))) }; case 8: return function() { return l(o(i(a(r(n(t(e.apply(this, arguments)))))))) }; case 9: return function() { return u(l(o(i(a(r(n(t(e.apply(this, arguments))))))))) } } } function Yp(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return t(e); case 3: return n(t(e)); case 4: return r(n(t(e))); case 5: return a(r(n(t(e)))); case 6: return i(a(r(n(t(e))))); case 7: return o(i(a(r(n(t(e)))))); case 8: return l(o(i(a(r(n(t(e))))))); case 9: return u(l(o(i(a(r(n(t(e)))))))); default: for (var c = arguments[0], s = 1; s < arguments.length; s++) c = arguments[s](c); return c } } var Jp = function(e, t) { var n = "number" == typeof e ? function(t) { return t.length >= e } : e; return function() { var e = Array.from(arguments); return n(arguments) ? t.apply(this, e) : function(n) { return t.apply(void 0, Bp([n], e, !1)) } } }; function Xp(e) { return function(t) { return Kp(t, e.fromEither) } } function Qp(e, t) { var n = Xp(e), r = qp(t); return function(e, t) { return r(e, n(t)) } } function $p(e) { return function(t, n) { return e.map(t, (function() { return n })) } } Object.prototype.hasOwnProperty; var eh = { _tag: "None" }, th = function(e) { return { _tag: "Some", value: e } }; var nh = function(e) { return "Left" === e._tag ? eh : th(e.right) }, rh = function(e, t) { return Yp(e, oh(t)) }, ah = function(e, t) { return Yp(e, uh(t)) }, ih = "Option", oh = function(e) { return function(t) { return hh(t) ? eh : th(e(t.value)) } }, lh = { URI: ih, map: rh }, uh = (Jp(2, $p(lh)), function(e) { var t = $p(e) }(lh), function(e) { return function(t) { return hh(t) || hh(e) ? eh : th(t.value(e.value)) } }), ch = Jp(2, (function(e, t) { return hh(e) ? eh : t(e.value) })), sh = { URI: ih, map: rh, ap: ah, chain: ch }, dh = Jp(2, (function(e, t) { return hh(e) ? t() : e })), fh = dh, ph = { URI: ih, fromEither: nh }, hh = function(e) { return "None" === e._tag }, vh = function(e) { return function(t) { return hh(t) ? e() : t.value } }, mh = vh, yh = (qp(sh), Qp(ph, sh), function(e) { return null == e ? eh : th(e) }); var gh, Eh, bh = { url: (null !== (gh = mi.EnvironmentUrls.apiGatewayUrl) && void 0 !== gh ? gh : "URL_NOT_FOUND") + "/rotating-client-service" + "/v1/prelude/latest", timeout: 1e3 }, Ch = "EmailVerification", _h = "otp-challenge-container", Sh = "accountSecurityChallengeEmailVerificationEvent", Ih = { challengeInitialized: "challengeInitialized", challengeCompleted: "challengeCompleted", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned" }, Th = { challengeInitialized: "ChallengeInitialized", challengeCompleted: "ChallengeCompleted", challengeInvalidated: "ChallengeInvalidated", challengeAbandoned: "ChallengeAbandoned" }, Ah = { challengeSolveTime: "ChallengeSolveTime" };! function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED", e[e.HIDE_MODAL_CHALLENGE = 2] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 3] = "SHOW_MODAL_CHALLENGE" }(Eh || (Eh = {})); var Nh, wh = function() { return wh = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, wh.apply(this, arguments) }, Lh = function(e, t) { var n, r = wh({}, e); switch (t.type) { case Eh.SET_CHALLENGE_COMPLETED: return r.onChallengeCompletedData = t.onChallengeCompletedData, r.isModalVisible = !1, r; case Eh.SET_CHALLENGE_INVALIDATED: return r.onChallengeInvalidatedData = { errorCode: t.errorCode, errorMessage: (n = e.resources, t.errorCode, n.Message.Error.Default) }, r.isModalVisible = !1, r; case Eh.HIDE_MODAL_CHALLENGE: return r.isModalVisible = !1, r; case Eh.SHOW_MODAL_CHALLENGE: return r.isModalVisible = !0, r; default: return e } }, Oh = (0, Fi.createContext)(null), kh = function(e) { var t = e.challengeId, n = e.renderInline, r = e.eventService, a = e.metricsService, i = e.translate, o = e.onChallengeCompleted, l = e.onChallengeInvalidated, u = e.onModalChallengeAbandoned, c = e.children, s = (0, Fi.useState)((function() { return function(e) { return { Header: { VerifyYourAccount: e("Header.VerifyYourAccount"), EnterCode: e("Header.EnterCode"), ConfirmAbandon: e("Header.ConfirmAbandon") }, Description: { SuspiciousActivityEmailVerification: e("Description.SuspiciousActivityEmailVerificationV1"), EnterCode: e("Description.EnterCode"), ConfirmAbandon: e("Description.ConfirmAbandon") }, Message: { Error: { Default: e("Message.Error.Default") } }, Label: { ConfirmAbandon: e("Label.ConfirmAbandon"), RejectAbandon: e("Label.RejectAbandon") } } }(i) }))[0], d = (0, Fi.useState)((function() { return { challengeId: t, renderInline: n, translate: i, resources: s, eventService: r, metricsService: a, onModalChallengeAbandoned: u, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !0 } }))[0], f = (0, Fi.useReducer)(Lh, d), p = f[0], h = f[1]; return (0, Fi.useEffect)((function() { null !== p.onChallengeCompletedData && null === p.onChallengeInvalidatedData && o(p.onChallengeCompletedData) }), [p.onChallengeCompletedData, p.onChallengeInvalidatedData, o]), (0, Fi.useEffect)((function() { null === p.onChallengeCompletedData && null !== p.onChallengeInvalidatedData && (r.sendChallengeInvalidatedEvent(), a.fireChallengeInvalidatedEvent(), l(p.onChallengeInvalidatedData)) }), [r, a, p.onChallengeCompletedData, p.onChallengeInvalidatedData, l]), Gi().createElement(Oh.Provider, { value: { state: p, dispatch: h } }, c) }, Dh = function() { var e = (0, Fi.useContext)(Oh); if (null === e) throw new Error("EmailVerificationContext was not provided in the current scope"); return e }, Rh = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Ph = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, xh = function(e, t, n, r) { var a = e ? Cd : Ed.Modal.Body, i = e ? bf : Cf; return Gi().createElement(Gi().Fragment, null, Gi().createElement(a, null, Gi().createElement("p", null, t)), Gi().createElement(i, { positiveButton: n, negativeButton: r })) }, Mh = function(e) { var t = e.renderInline, n = e.confirmAbandonLabel, r = e.rejectAbandonLabel, a = e.abandonConfirmationTitle, i = e.abandonConfirmationDescription, o = e.isConfirmationModalVisible, l = e.handleContinue, u = e.handleConfirmAbandon, c = { content: r, label: r, enabled: !0, action: l }, s = { content: n, label: n, enabled: !0, action: u }; return Gi().createElement(Gi().Fragment, null, t ? Gi().createElement(bd, { titleText: a }, xh(t, i, s, c)) : Gi().createElement(Ed.Modal, { className: "modal-modern", show: o, onHide: u, backdrop: "static" }, Gi().createElement(If, { headerText: a, buttonType: yf.CLOSE, buttonAction: u, buttonEnabled: !0, headerInfo: null }), xh(t, i, s, c))) }, Vh = function() { var e = Dh(), t = e.state, n = t.renderInline, r = t.resources, a = t.translate, i = t.eventService, o = t.metricsService, l = t.isModalVisible, u = e.dispatch, c = function() { var e = (0, Fi.useState)(6), t = e[0], n = e[1]; return (0, Fi.useEffect)((function() { Rh(void 0, void 0, Promise, (function() { var e; return Ph(this, (function(t) { switch (t.label) { case 0: return [4, xo(Io.Challenge)]; case 1: return (e = t.sent()).isError || n(e.value.OtpCodeLength), [2] } })) })) }), []), t }(), s = (0, Fi.useState)(!1), d = s[0], f = s[1], p = (0, Fi.useCallback)((function() { f(!0), u({ type: Eh.HIDE_MODAL_CHALLENGE }) }), [u]), h = (0, Fi.useCallback)((function() { f(!1), u({ type: Eh.SHOW_MODAL_CHALLENGE }) }), [u]), v = (0, Fi.useCallback)((function() { f(!1), u({ type: Eh.SET_CHALLENGE_INVALIDATED, errorCode: 0 }), o.fireChallengeInvalidatedEvent(), i.sendChallengeInvalidatedEvent() }), [u, i, o]); (0, Fi.useEffect)((function() { l && mi.EmailVerifyCodeModalService && mi.EmailVerifyCodeModalService.renderEmailVerifyCodeModal({ containerId: _h, codeLength: c, onEmailCodeEntered: function(e, t) { u({ type: Eh.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { otpSession: e } }), i.sendChallengeCompletedEvent(), o.fireChallengeCompletedEvent() }, onModalAbandoned: p, enterEmailTitle: r.Header.VerifyYourAccount, enterEmailDescription: r.Description.SuspiciousActivityEmailVerification, enterCodeTitle: r.Header.EnterCode, enterCodeDescription: r.Description.EnterCode, origin: Io.Challenge, translate: a, renderInWebview: n }) }), [l]); var m = function() { var e = n ? Cd : Ed.Modal.Body; return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement("div", { id: _h }))) }; return Gi().createElement(Gi().Fragment, null, d ? Gi().createElement(Mh, { renderInline: n, confirmAbandonLabel: r.Label.ConfirmAbandon, rejectAbandonLabel: r.Label.RejectAbandon, abandonConfirmationTitle: r.Header.ConfirmAbandon, abandonConfirmationDescription: r.Description.ConfirmAbandon, isConfirmationModalVisible: d, handleContinue: h, handleConfirmAbandon: v }) : n ? Gi().createElement(bd, { titleText: "" }, m()) : Gi().createElement(Ed.Modal, { className: "modal-modern", backdrop: "static", show: l }, m())) }, Uh = (0, dd.withTranslations)((function(e) { var t = e.challengeId, n = e.renderInline, r = e.eventService, a = e.metricsService, i = e.translate, o = e.onChallengeCompleted, l = e.onChallengeInvalidated, u = e.onModalChallengeAbandoned; return Gi().createElement(kh, { challengeId: t, renderInline: n, eventService: r, metricsService: a, translate: i, onChallengeCompleted: o, onChallengeInvalidated: l, onModalChallengeAbandoned: u }, Gi().createElement(Vh, null)) }), { common: ["CommonUI.Messages"], feature: "Feature.EmailVerificationChallenge" }), Wh = function() { function e(e) { this.challengeId = e } return e.prototype.sendChallengeInitializedEvent = function() { yi().EventStream.SendEventWithTarget(Sh, Ih.challengeInitialized, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeCompletedEvent = function() { yi().EventStream.SendEventWithTarget(Sh, Ih.challengeCompleted, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function() { yi().EventStream.SendEventWithTarget(Sh, Ih.challengeInvalidated, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e }(), Hh = function() { function e(e, t) { this.appType = e || "unknown", this.requestServiceDefault = t, this.eventTimer = new jd, this.challengeSolveTimeSequenceName = Ch + "_" + Ah.challengeSolveTime } return e.prototype.fireChallengeInitializedEvent = function() { this.fireEvent(Th.challengeInitialized), this.eventTimer.start(this.challengeSolveTimeSequenceName) }, e.prototype.fireChallengeCompletedEvent = function() { this.fireEvent(Th.challengeCompleted), this.fireSolveTimeEvent(Th.challengeCompleted) }, e.prototype.fireChallengeInvalidatedEvent = function() { this.fireEvent(Th.challengeInvalidated), this.fireSolveTimeEvent(Th.challengeInvalidated) }, e.prototype.fireChallengeAbandonedEvent = function() { this.fireEvent(Th.challengeAbandoned), this.fireSolveTimeEvent(Th.challengeAbandoned) }, e.prototype.fireEvent = function(e) { this.requestServiceDefault.metrics.recordMetric({ name: is.EventEmailVerification, value: 1, labelValues: { event_type: Ch + "_" + e, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireSolveTimeEvent = function(e) { var t = this.eventTimer.end(this.challengeSolveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimeEmailVerification, value: t, labelValues: { event_type: Ch + "_" + e, application_type: this.appType } }).catch((function() {})) }, e }();! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.ABANDONED = 1] = "ABANDONED" }(Nh || (Nh = {})); var Fh, Gh = new sd;! function(e) { e.CAPTCHA = "captcha", e.FORCE_AUTHENTICATOR = "forceauthenticator", e.FORCE_TWO_STEP_VERIFICATION = "forcetwostepverification", e.TWO_STEP_VERIFICATION = "twostepverification", e.SECURITY_QUESTIONS = "securityquestions", e.REAUTHENTICATION = "reauthentication", e.PROOF_OF_WORK = "proofofwork", e.ROSTILE = "rostile", e.PRIVATE_ACCESS_TOKEN = "privateaccesstoken", e.DEVICE_INTEGRITY = "deviceintegrity", e.PROOF_OF_SPACE = "proofofspace", e.PHONE_VERIFICATION = "phoneverification", e.EMAIL_VERIFICATION = "emailverification", e.BLOCK_SESSION = "blocksession" }(Fh || (Fh = {})); var jh, zh, Zh, qh, Bh, Kh, Yh, Jh, Xh, Qh, $h, ev, tv, nv, rv, av = Fh;! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(jh || (jh = {})), function(e) { e.UNKNOWN = "unknown", e.ABANDONED = "abandoned", e.INVALIDATED = "invalidated" }(zh || (zh = {})), function(e) { e.CHALLENGE_COMPLETED = "challengeCompleted", e.CHALLENGE_DISPLAYED = "challengeDisplayed", e.CHALLENGE_INITIALIZED = "challengeInitialized", e.CHALLENGE_INVALIDATED = "challengeInvalidated", e.CHALLENGE_PAGE_LOADED = "challengePageLoaded", e.CHALLENGE_PARSED = "challengeParsed" }(Zh || (Zh = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(qh || (qh = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_INVALID = 1] = "SESSION_INVALID", e[e.ANSWER_INVALID = 2] = "ANSWER_INVALID", e[e.WORKER_LOAD_ERROR = 3] = "WORKER_LOAD_ERROR", e[e.TIMEOUT = 4] = "TIMEOUT" }(Bh || (Bh = {})), function(e) { e.INVALID = "PROOF_OF_SPACE_PUZZLE_TYPE_INVALID", e.NONINTERACTIVE = "PROOF_OF_SPACE_PUZZLE_TYPE_NONINTERACTIVE", e.INTERACTIVE = "PROOF_OF_SPACE_PUZZLE_TYPE_INTERACTIVE" }(Kh || (Kh = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_INVALID = 1] = "SESSION_INVALID", e[e.ANSWER_INVALID = 2] = "ANSWER_INVALID", e[e.WORKER_LOAD_ERROR = 3] = "WORKER_LOAD_ERROR" }(Yh || (Yh = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.OTP_CODE_EXPIRED = 1] = "OTP_CODE_EXPIRED" }(Jh || (Jh = {})), function(e) { e.Password = "Password", e.OtpEmail = "Otp_Email", e.Passkey = "Passkey" }(Xh || (Xh = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.INVALID_SESSION = 1] = "INVALID_SESSION" }(Qh || (Qh = {})), function(e) { e.INVALID = "ROSTILE_PUZZLE_TYPE_INVALID", e.VISIBLE = "ROSTILE_PUZZLE_TYPE_VISIBLE", e.INVISIBLE = "ROSTILE_PUZZLE_TYPE_INVISIBLE" }($h || ($h = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_EXPIRED = 1] = "SESSION_EXPIRED", e[e.USER_WAS_FORCE_RESET = 2] = "USER_WAS_FORCE_RESET" }(ev || (ev = {})), function(e) { e.Unknown = "Unknown", e.Login = "Login", e.RobuxSpend = "RobuxSpend", e.ItemTrade = "ItemTrade", e.Resale = "Resale", e.PasswordReset = "PasswordReset", e.RevertAccount = "RevertAccount", e.Generic = "Generic", e.GenericWithRecoveryCodes = "GenericWithRecoveryCodes" }(tv || (tv = {})), function(e) { e.Email = "Email", e.Authenticator = "Authenticator", e.RecoveryCode = "RecoveryCode", e.SMS = "SMS", e.SecurityKey = "SecurityKey", e.CrossDevice = "CrossDevice", e.Password = "Password", e.Passkey = "Passkey" }(nv || (nv = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_EXPIRED = 1] = "SESSION_EXPIRED" }(rv || (rv = {})); var iv, ov = "PhoneVerification", lv = "phoneverification-challenge-container", uv = { SuspiciousActivityPhoneVerification: "Description.SuspiciousActivityPhoneVerificationV1", LegalText: "Description.ChallengeLegalDisclaimerV1" }, cv = { VerifyYourAccountHeader: "Header.VerifyYourAccountHeader" }, sv = "accountSecurityChallengePhoneVerificationEvent", dv = { challengeInitialized: "challengeInitialized", challengeCompleted: "challengeCompleted", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned" }, fv = { challengeInitialized: "ChallengeInitialized", challengeCompleted: "ChallengeCompleted", challengeInvalidated: "ChallengeInvalidated", challengeAbandoned: "ChallengeAbandoned" }, pv = { challengeSolveTime: "ChallengeSolveTime" };! function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED", e[e.HIDE_MODAL_CHALLENGE = 2] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 3] = "SHOW_MODAL_CHALLENGE" }(iv || (iv = {})); var hv, vv = function() { return vv = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, vv.apply(this, arguments) }, mv = function(e, t) { var n, r = vv({}, e); switch (t.type) { case iv.SET_CHALLENGE_COMPLETED: return r.onChallengeCompletedData = t.onChallengeCompletedData, r.isModalVisible = !1, r; case iv.SET_CHALLENGE_INVALIDATED: return r.onChallengeInvalidatedData = { errorCode: t.errorCode, errorMessage: (n = e.resources, t.errorCode, n.Message.Error.Default) }, r.isModalVisible = !1, r; case iv.HIDE_MODAL_CHALLENGE: return r.isModalVisible = !1, r; case iv.SHOW_MODAL_CHALLENGE: return r.isModalVisible = !0, r; default: return e } }, yv = (0, Fi.createContext)(null), gv = function(e) { var t = e.challengeId, n = e.renderInline, r = e.eventService, a = e.metricsService, i = e.translate, o = e.onChallengeCompleted, l = e.onChallengeInvalidated, u = e.onModalChallengeAbandoned, c = e.children, s = (0, Fi.useState)((function() { return function(e) { return { Header: { ConfirmAbandon: e("Header.ConfirmAbandon") }, Description: { ConfirmAbandon: e("Description.ConfirmAbandon") }, Message: { Error: { Default: e("Message.Error.Default") } }, Label: { ConfirmAbandon: e("Label.ConfirmAbandon"), RejectAbandon: e("Label.RejectAbandon") } } }(i) }))[0], d = (0, Fi.useState)((function() { return { challengeId: t, renderInline: n, translate: i, resources: s, eventService: r, metricsService: a, onModalChallengeAbandoned: u, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !0 } }))[0], f = (0, Fi.useReducer)(mv, d), p = f[0], h = f[1]; return (0, Fi.useEffect)((function() { null !== p.onChallengeCompletedData && null === p.onChallengeInvalidatedData && o(p.onChallengeCompletedData) }), [p.onChallengeCompletedData, p.onChallengeInvalidatedData, o]), (0, Fi.useEffect)((function() { null === p.onChallengeCompletedData && null !== p.onChallengeInvalidatedData && (r.sendChallengeInvalidatedEvent(), a.fireChallengeInvalidatedEvent(), l(p.onChallengeInvalidatedData)) }), [t, r, a, p.onChallengeCompletedData, p.onChallengeInvalidatedData, l]), Gi().createElement(yv.Provider, { value: { state: p, dispatch: h } }, c) }, Ev = function() { var e = (0, Fi.useContext)(yv); if (null === e) throw new Error("PhoneVerificationContext was not provided in the current scope"); return e }, bv = function() { var e = Ev(), t = e.state, n = t.renderInline, r = t.resources, a = t.metricsService, i = t.eventService, o = t.isModalVisible, l = e.dispatch, u = (0, Fi.useState)(!1), c = u[0], s = u[1], d = (0, Fi.useCallback)((function(e) { if (e) return l({ type: iv.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: {} }), i.sendChallengeCompletedEvent(), void a.fireChallengeCompletedEvent(); s(!0), l({ type: iv.HIDE_MODAL_CHALLENGE }) }), [l, i, a]), f = (0, Fi.useCallback)((function() { s(!1), l({ type: iv.SHOW_MODAL_CHALLENGE }) }), [l]), p = (0, Fi.useCallback)((function() { s(!1), l({ type: iv.SET_CHALLENGE_INVALIDATED, errorCode: 0 }), i.sendChallengeInvalidatedEvent(), a.fireChallengeInvalidatedEvent() }), [l, i, a]); (0, Fi.useEffect)((function() { o && mi.UpsellService.renderPhoneUpsell({ onClose: d, origin: "challenge", addPhoneHeadingKey: cv.VerifyYourAccountHeader, addPhoneDescriptionKey: uv.SuspiciousActivityPhoneVerification, containerId: lv, addPhoneLegalTextKey: uv.LegalText, renderInWebview: n }) }), [d, o]); var h = function() { var e = n ? Cd : Ed.Modal.Body; return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement("div", { id: lv }))) }; return Gi().createElement(Gi().Fragment, null, c ? Gi().createElement(Mh, { renderInline: n, confirmAbandonLabel: r.Label.ConfirmAbandon, rejectAbandonLabel: r.Label.RejectAbandon, abandonConfirmationTitle: r.Header.ConfirmAbandon, abandonConfirmationDescription: r.Description.ConfirmAbandon, isConfirmationModalVisible: c, handleContinue: f, handleConfirmAbandon: p }) : n ? Gi().createElement(bd, { titleText: "" }, h()) : Gi().createElement(Ed.Modal, { className: "modal-modern", backdrop: "static", show: o }, h())) }, Cv = (0, dd.withTranslations)((function(e) { var t = e.challengeId, n = e.renderInline, r = e.eventService, a = e.metricsService, i = e.translate, o = e.onChallengeCompleted, l = e.onChallengeInvalidated, u = e.onModalChallengeAbandoned; return Gi().createElement(gv, { challengeId: t, renderInline: n, eventService: r, metricsService: a, translate: i, onChallengeCompleted: o, onChallengeInvalidated: l, onModalChallengeAbandoned: u }, Gi().createElement(bv, null)) }), { common: ["CommonUI.Messages"], feature: "Feature.PhoneVerificationChallenge" }), _v = function() { function e(e) { this.challengeId = e } return e.prototype.sendChallengeInitializedEvent = function() { yi().EventStream.SendEventWithTarget(sv, dv.challengeInitialized, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeCompletedEvent = function() { yi().EventStream.SendEventWithTarget(sv, dv.challengeCompleted, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function() { yi().EventStream.SendEventWithTarget(sv, dv.challengeInvalidated, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e }(), Sv = function() { function e(e, t) { this.appType = e || "unknown", this.requestServiceDefault = t, this.eventTimer = new jd, this.challengeSolveTimeSequenceName = ov + "_" + pv.challengeSolveTime } return e.prototype.fireChallengeInitializedEvent = function() { this.fireEvent(fv.challengeInitialized), this.eventTimer.start(this.challengeSolveTimeSequenceName) }, e.prototype.fireChallengeCompletedEvent = function() { this.fireEvent(fv.challengeCompleted), this.fireSolveTimeEvent(fv.challengeCompleted) }, e.prototype.fireChallengeInvalidatedEvent = function() { this.fireEvent(fv.challengeInvalidated), this.fireSolveTimeEvent(fv.challengeInvalidated) }, e.prototype.fireChallengeAbandonedEvent = function() { this.fireEvent(fv.challengeAbandoned), this.fireSolveTimeEvent(fv.challengeAbandoned) }, e.prototype.fireEvent = function(e) { this.requestServiceDefault.metrics.recordMetric({ name: is.EventPhoneVerification, value: 1, labelValues: { event_type: ov + "_" + e, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireSolveTimeEvent = function(e) { var t = this.eventTimer.end(this.challengeSolveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimePhoneVerification, value: t, labelValues: { event_type: ov + "_" + e, application_type: this.appType } }).catch((function() {})) }, e }();! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(hv || (hv = {})); var Iv, Tv, Av = new sd, Nv = "PrivateAccessToken", wv = "accountSecurityChallengePrivateAccessTokenEvent", Lv = { challengeInitialized: "challengeInitialized", challengeCompleted: "challengeCompleted", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned" }, Ov = { challengeInitialized: "ChallengeInitialized", challengeCompleted: "ChallengeCompleted", challengeInvalidated: "ChallengeInvalidated", challengeAbandoned: "ChallengeAbandoned" }, kv = { challengeSolveTime: "ChallengeSolveTime" };! function(e) { e[e.INITIAL = 0] = "INITIAL", e[e.COMPLETED_ERROR = 1] = "COMPLETED_ERROR", e[e.COMPLETED_SUCCESS = 2] = "COMPLETED_SUCCESS" }(Iv || (Iv = {})), function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED" }(Tv || (Tv = {})); var Dv, Rv = function() { return Rv = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, Rv.apply(this, arguments) }, Pv = function(e, t) { var n = Rv({}, e); switch (t.type) { case Tv.SET_CHALLENGE_COMPLETED: return n.onChallengeCompletedData = t.onChallengeCompletedData, n; case Tv.SET_CHALLENGE_INVALIDATED: return n.onChallengeInvalidatedData = t.onChallengeInvalidatedData, n; default: return e } }, xv = (0, Fi.createContext)(null), Mv = function(e) { var t = e.challengeId, n = e.renderInline, r = e.eventService, a = e.metricsService, i = e.requestService, o = e.translate, l = e.onChallengeDisplayed, u = e.onChallengeCompleted, c = e.onChallengeInvalidated, s = e.onModalChallengeAbandoned, d = e.children, f = (0, Fi.useState)((function() { return function(e) { return { Description: { VerificationError: e("Description.VerificationError"), VerificationSuccess: e("Description.VerificationSuccess"), VerifyingYouAreNotBot: e("Description.VerifyingYouAreNotBot") } } }(o) }))[0], p = (0, Fi.useState)((function() { return { challengeId: t, renderInline: n, resources: f, eventService: r, metricsService: a, requestService: i, onChallengeDisplayed: l, onModalChallengeAbandoned: s, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !1 } }))[0], h = (0, Fi.useReducer)(Pv, p), v = h[0], m = h[1]; return (0, Fi.useEffect)((function() { null !== v.onChallengeCompletedData && null === v.onChallengeInvalidatedData && u(v.onChallengeCompletedData) }), [v.onChallengeCompletedData, v.onChallengeInvalidatedData, u]), (0, Fi.useEffect)((function() { null !== v.onChallengeInvalidatedData && null === v.onChallengeCompletedData && (r.sendChallengeInvalidatedEvent(), a.fireChallengeInvalidatedEvent(), c(v.onChallengeInvalidatedData)) }), [r, a, v.onChallengeCompletedData, v.onChallengeInvalidatedData, c]), Gi().createElement(xv.Provider, { value: { state: v, dispatch: m } }, d) }, Vv = function() { var e = (0, Fi.useContext)(xv); if (null === e) throw new Error("PrivateAccessTokenContext was not provided in the current scope"); return e }, Uv = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Wv = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Hv = function() { var e = Vv(), t = e.state, n = t.renderInline, r = t.challengeId, a = t.resources, i = t.requestService, o = t.metricsService, l = t.eventService, u = e.dispatch, c = (0, Fi.useState)(Iv.INITIAL), s = c[0], d = c[1], f = "ChallengeId", p = (0, Fi.useCallback)((function() { return Uv(void 0, void 0, void 0, (function() { var e, t; return Wv(this, (function(n) { switch (n.label) { case 0: return s !== Iv.INITIAL ? [2] : (e = Hu.localStorageService.getLocalStorage(f), r === e ? [2] : (Hu.localStorageService.setLocalStorage(f, r), [4, i.privateAccessToken.getPatToken(r)])); case 1: if ((t = n.sent()).isError) { if (t.errorStatusCode === zi.httpResponseCodes.unauthorized) return d(Iv.COMPLETED_SUCCESS), u({ type: Tv.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { redemptionToken: "" } }), l.sendChallengeCompletedEvent(!1), o.fireChallengeCompletedEvent(), [2]; d(Iv.COMPLETED_ERROR), u({ type: Tv.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: (t.error, qh.UNKNOWN), errorMessage: a.Description.VerificationError } }) } else d(Iv.COMPLETED_SUCCESS), l.sendChallengeCompletedEvent(!0), o.fireChallengeCompletedEvent(), u({ type: Tv.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { redemptionToken: t.value.redemptionToken } }); return [2] } })) })) }), [a, u, i.privateAccessToken, s, o, l, r]); return (0, Fi.useEffect)((function() { p() }), []), n ? Gi().createElement(bd, { titleText: a.Description.VerifyingYouAreNotBot }, Gi().createElement(Cd, null, Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin" }))) : Gi().createElement(Ed.Modal, { className: "modal-modern", backdrop: "static" }, Gi().createElement(Ed.Modal.Body, null, Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin" }))) }, Fv = (0, dd.withTranslations)((function(e) { var t = e.challengeId, n = e.renderInline, r = e.eventService, a = e.metricsService, i = e.requestService, o = e.translate, l = e.onChallengeDisplayed, u = e.onChallengeCompleted, c = e.onChallengeInvalidated, s = e.onModalChallengeAbandoned; return Gi().createElement(Mv, { challengeId: t, renderInline: n, eventService: r, metricsService: a, requestService: i, translate: o, onChallengeDisplayed: l, onChallengeCompleted: u, onChallengeInvalidated: c, onModalChallengeAbandoned: s }, Gi().createElement(Hv, null)) }), { common: ["CommonUI.Messages"], feature: "Feature.PrivateAccessTokenChallenge" }), Gv = function() { function e(e) { this.challengeId = e } return e.prototype.sendChallengeInitializedEvent = function() { yi().EventStream.SendEventWithTarget(wv, Lv.challengeInitialized, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeCompletedEvent = function(e) { yi().EventStream.SendEventWithTarget(wv, Lv.challengeCompleted, { challengeId: this.challengeId, supportPAT: e }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function() { yi().EventStream.SendEventWithTarget(wv, Lv.challengeInvalidated, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeAbandonedEvent = function() { yi().EventStream.SendEventWithTarget(wv, Lv.challengeAbandoned, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e }(), jv = function() { function e(e, t) { this.appType = e || "unknown", this.requestServiceDefault = t, this.eventTimer = new jd, this.challengeSolveTimeSequenceName = Nv + "_" + kv.challengeSolveTime } return e.prototype.fireChallengeInitializedEvent = function() { this.fireEvent(Ov.challengeInitialized), this.eventTimer.start(this.challengeSolveTimeSequenceName) }, e.prototype.fireChallengeCompletedEvent = function() { this.fireEvent(Ov.challengeCompleted), this.fireSolveTimeEvent(Ov.challengeCompleted) }, e.prototype.fireChallengeInvalidatedEvent = function() { this.fireEvent(Ov.challengeInvalidated), this.fireSolveTimeEvent(Ov.challengeInvalidated) }, e.prototype.fireChallengeAbandonedEvent = function() { this.fireEvent(Ov.challengeAbandoned), this.fireSolveTimeEvent(Ov.challengeAbandoned) }, e.prototype.fireEvent = function(e) { this.requestServiceDefault.metrics.recordMetric({ name: is.EventPat, value: 1, labelValues: { event_type: Nv + "_" + e, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireSolveTimeEvent = function(e) { var t = this.eventTimer.end(this.challengeSolveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimePat, value: t, labelValues: { event_type: Nv + "_" + e, application_type: this.appType } }).catch((function() {})) }, e }(), zv = new sd, Zv = function(e) { var t = e.containerId, n = e.challengeId, r = e.appType, a = e.renderInline, i = e.onChallengeDisplayed, o = e.onChallengeCompleted, l = e.onChallengeInvalidated, u = e.onModalChallengeAbandoned, c = document.getElementById(t); if (null !== c) { (0, ji.unmountComponentAtNode)(c); var s = new Gv(n), d = new jv(r, zv); return (0, ji.render)(Gi().createElement(Fv, { challengeId: n, renderInline: a, eventService: s, metricsService: d, requestService: zv, onChallengeDisplayed: i, onChallengeCompleted: o, onChallengeInvalidated: l, onModalChallengeAbandoned: u }), c), s.sendChallengeInitializedEvent(), d.fireChallengeInitializedEvent(), !0 } return !1 }, qv = "ProofOfSpace", Bv = "Proof-of-Space:", Kv = "accountSecurityChallengeProofOfSpaceEvent", Yv = { challengeInitialized: "challengeInitialized", puzzleInitialized: "puzzleInitialized", puzzleCompleted: "puzzleCompleted", challengeCompleted: "challengeCompleted", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned", challengeTimeout: "challengeTimeout" }, Jv = { challengeInitialized: "ChallengeInitialized", puzzleInitialized: "PuzzleInitialized", puzzleCompleted: "PuzzleCompleted", challengeCompleted: "ChallengeCompleted", challengeInvalidated: "ChallengeInvalidated", challengeAbandoned: "ChallengeAbandoned", challengeTimeout: "ChallengeTimeout" }, Xv = { puzzleWorkingTime: "PuzzleWorkingTime", challengeSolveTime: "ChallengeSolveTime" }, Qv = function() { function e(e, t, n) { this.blocks = [], this.length = e, this.blockSize = Math.pow(2, Math.floor(Math.log2(t))), this.blockIndexShift = Math.log2(this.blockSize) >>> 0, this.blockOffsetMask = this.blockSize - 1 >>> 0, this.head = 0, n || this.allocate(this.length) } return e.prototype.allocate = function(e) { for (var t = 0; t < Math.ceil(e / this.blockSize); t++) this.blocks.push(new Uint32Array(this.blockSize)) }, e.prototype.destructor = function() { this.blocks = [] }, e.prototype.push = function(e) { this.blocks[this.head >>> this.blockIndexShift][this.head & this.blockOffsetMask] = e, this.head += 1 }, e.prototype.concat = function(e) { for (var t = 0; t < e.blocks.length; t++) this.blocks.push(e.blocks[t]), this.head += this.blockSize }, e.prototype.get = function(e) { return this.blocks[e >>> this.blockIndexShift][e & this.blockOffsetMask] }, e.prototype.getHead = function() { return this.head }, e }(), $v = Qv, em = function() { function e(e) { this.seed = parseInt(e, 10) } return e.prototype.hash = function(e) { for (var t = this.seed, n = 0; n < e.length; n++) { var r = e[n]; r = (r = Math.imul(r, 3432918353)) << 15 | r >>> 17, t = (t ^= r = Math.imul(r >>> 0, 461845907) >>> 0) << 13 | t >>> 19, t = 3864292196 + (Math.imul(t >>> 0, 5) >>> 0) >>> 0 } return t ^= 4 * e.length, t ^= t >>> 16, t = Math.imul(t, 2246822507), t ^= t >>> 13, t = Math.imul(t, 3266489909), (t ^= t >>> 16) >>> 0 }, e.prototype.hashOneValue = function(e) { var t = this.seed, n = e; return n = (n = Math.imul(n, 3432918353)) << 15 | n >>> 17, t = (t ^= n = Math.imul(n >>> 0, 461845907) >>> 0) << 13 | t >>> 19, t = 3864292196 + (Math.imul(t >>> 0, 5) >>> 0) >>> 0, t ^= 4, t ^= t >>> 16, t = Math.imul(t, 2246822507), t ^= t >>> 13, t = Math.imul(t, 3266489909), (t ^= t >>> 16) >>> 0 }, e.prototype.hashTwoValues = function(e, t) { var n = this.seed, r = e; return r = (r = Math.imul(r, 3432918353)) << 15 | r >>> 17, n = (n ^= r = Math.imul(r >>> 0, 461845907) >>> 0) << 13 | n >>> 19, n = 3864292196 + (Math.imul(n >>> 0, 5) >>> 0) >>> 0, r = t, r = (r = Math.imul(r, 3432918353)) << 15 | r >>> 17, n = (n ^= r = Math.imul(r >>> 0, 461845907) >>> 0) << 13 | n >>> 19, n = 3864292196 + (Math.imul(n >>> 0, 5) >>> 0) >>> 0, n ^= 8, n ^= n >>> 16, n = Math.imul(n, 2246822507), n ^= n >>> 13, n = Math.imul(n, 3266489909), (n ^= n >>> 16) >>> 0 }, e.prototype.hashThreeValues = function(e, t, n) { var r = this.seed, a = e; return a = (a = Math.imul(a, 3432918353)) << 15 | a >>> 17, r = (r ^= a = Math.imul(a >>> 0, 461845907) >>> 0) << 13 | r >>> 19, r = 3864292196 + (Math.imul(r >>> 0, 5) >>> 0) >>> 0, a = t, a = (a = Math.imul(a, 3432918353)) << 15 | a >>> 17, r = (r ^= a = Math.imul(a >>> 0, 461845907) >>> 0) << 13 | r >>> 19, r = 3864292196 + (Math.imul(r >>> 0, 5) >>> 0) >>> 0, a = n, a = (a = Math.imul(a, 3432918353)) << 15 | a >>> 17, r = (r ^= a = Math.imul(a >>> 0, 461845907) >>> 0) << 13 | r >>> 19, r = 3864292196 + (Math.imul(r >>> 0, 5) >>> 0) >>> 0, r ^= 12, r ^= r >>> 16, r = Math.imul(r, 2246822507), r ^= r >>> 13, r = Math.imul(r, 3266489909), (r ^= r >>> 16) >>> 0 }, e }(), tm = em, nm = Math.pow(2, 18);! function(e) { e[e.INIT_GRAPH = 0] = "INIT_GRAPH", e[e.PEBBLE_GRAPH = 1] = "PEBBLE_GRAPH", e[e.CREATE_MERKLE_TREE = 2] = "CREATE_MERKLE_TREE", e[e.GENERATE_SOLUTION = 3] = "GENERATE_SOLUTION" }(Dv || (Dv = {})); var rm, am = function() { function e(e) { this.layers = e.layers, this.rounds = e.rounds, this.hasher = new tm(e.seed), this.merkleLayers = Math.pow(2, Math.floor(Math.log2(this.layers))), this.blockSize = Math.pow(2, Math.min(this.layers, 17)), this.layerSize = Math.pow(2, this.layers), this.prevLayer = new $v(this.layerSize, this.blockSize, !0), this.curLayer = new $v(this.layerSize, this.blockSize, !0), this.merkleTree = new $v(2 * this.merkleLayers * this.layerSize - 1, this.blockSize, !0), this.step = Dv.INIT_GRAPH, this.pebblingLayer = 0, this.totalComputedNodes = (this.layers + this.merkleLayers + 1) * this.layerSize - 1, this.isCancelled = !1 } return e.prototype.initPebbling = function(e) { 0 === this.curLayer.getHead() && this.curLayer.allocate(this.layerSize); for (var t = 0; t < e && this.curLayer.getHead() < this.layerSize; ++t) this.curLayer.push(this.hasher.hashOneValue(this.curLayer.getHead())); this.curLayer.getHead() === this.layerSize && (this.pebblingLayer += 1, this.prevLayer = this.curLayer, this.curLayer = new $v(this.layerSize, this.blockSize), this.step = Dv.PEBBLE_GRAPH) }, e.prototype.pebble = function(e) { for (var t = 0; t < e && this.curLayer.getHead() < this.layerSize; ++t) { var n = this.curLayer.getHead() | 1 << this.layers - this.pebblingLayer, r = this.curLayer.getHead() & ~(1 << this.layers - this.pebblingLayer); this.curLayer.push(this.hasher.hashThreeValues(this.curLayer.getHead() + this.pebblingLayer * this.layerSize, this.prevLayer.get(n), this.prevLayer.get(r))) } this.curLayer.getHead() === this.layerSize && (this.layers - this.pebblingLayer < this.merkleLayers && this.merkleTree.concat(this.curLayer), this.pebblingLayer += 1, this.prevLayer = this.curLayer, this.curLayer = new $v(this.layerSize, this.blockSize)), this.pebblingLayer === this.layers + 1 && (this.prevLayer.destructor(), this.curLayer.destructor(), this.step = Dv.CREATE_MERKLE_TREE, this.merkleTree.allocate(this.merkleLayers * this.layerSize - 1)) }, e.prototype.createMerkleTree = function(e) { for (var t = 2 * (this.merkleTree.getHead() - Math.ceil(this.merkleTree.length / 2)), n = 0; n < e && this.merkleTree.getHead() < this.merkleTree.length; n++) this.merkleTree.push(this.hasher.hashTwoValues(this.merkleTree.get(t), this.merkleTree.get(t + 1))), t += 2; this.merkleTree.getHead() === this.merkleTree.length && (this.step = Dv.GENERATE_SOLUTION) }, e.prototype.dispatch = function(e) { try { switch (this.step) { case Dv.INIT_GRAPH: this.initPebbling(e); break; case Dv.PEBBLE_GRAPH: this.pebble(e); break; case Dv.CREATE_MERKLE_TREE: this.createMerkleTree(e) } } catch (e) { return e instanceof Error ? e.message : String(e) } return null }, e.prototype.run = function(e, t, n) { for (var r = Math.ceil(this.totalComputedNodes / 1e3); !this.isDone();) { var a = this.dispatch(r); if (null !== a) return void n(a); e(this.progress()) } t(this.answer()), this.merkleTree.destructor() }, e.prototype.runAsync = function(e, t, n, r) { var a = this, i = function() { var o = a.dispatch(r || nm); null === o ? (e(a.progress()), a.isCancelled || (a.isDone() ? t(a.answer()) : setTimeout(i, 0))) : n(o) }; setTimeout(i, 0), this.merkleTree.destructor() }, e.prototype.cancelRunAsync = function() { this.isCancelled = !0 }, e.prototype.generateChallenge = function(e) { var t = this.hasher.hashOneValue(e), n = (this.layers - this.merkleLayers + 1 + 1) * this.layerSize; return t % ((this.merkleLayers - 1) * this.layerSize) + n }, e.prototype.open = function(e) { var t = [], n = e - (this.layers - this.merkleLayers + 1) * this.layerSize; t.push(this.merkleTree.get(n)); for (var r = 0; r < this.layers + Math.log2(this.merkleLayers); r++) n = n % 2 == 0 ? n + 1 : n - 1, t.push(this.merkleTree.get(n)), n = this.merkleTree.length - Math.floor((this.merkleTree.length - n) / 2); return t }, e.prototype.answer = function() { if (!this.isDone()) return null; for (var e = [], t = this.merkleTree.get(this.merkleTree.length - 1), n = this.generateChallenge(t), r = 0; r < this.rounds; r++) { var a = this.open(n), i = n >>> this.layers, o = (n | 1 << this.layers - i) - this.layerSize, l = (n & ~(1 << this.layers - i)) - this.layerSize; a = (a = a.concat(this.open(o))).concat(this.open(l)), e.push(a.map((function(e) { return e.toString() }))), n = this.generateChallenge(n) } return { commitment: t.toString(), solutions: e } }, e.prototype.progress = function() { return (this.pebblingLayer * this.layerSize + this.curLayer.getHead() + Math.max(this.merkleTree.getHead() - this.merkleLayers * this.layerSize, 0)) / this.totalComputedNodes }, e.prototype.isDone = function() { return this.step === Dv.GENERATE_SOLUTION }, e }();! function(e) { e[e.TIME_LOCK_PUZZLE = 0] = "TIME_LOCK_PUZZLE", e[e.GRAPH_PEBBLING_PUZZLE = 1] = "GRAPH_PEBBLING_PUZZLE" }(rm || (rm = {})); var im, om = 1e4, lm = "PoSTChallengeId";! function(e) { e[e.INITIAL = 0] = "INITIAL", e[e.READY_TO_COMPUTE = 1] = "READY_TO_COMPUTE", e[e.COMPUTING = 2] = "COMPUTING", e[e.COMPUTING_DONE = 3] = "COMPUTING_DONE", e[e.VERIFIED_CORRECT = 4] = "VERIFIED_CORRECT", e[e.VERIFIED_INCORRECT = 5] = "VERIFIED_INCORRECT" }(im || (im = {})); var um, cm = function(e) { return e === Sl.INVALID_SESSION ? Bh.SESSION_INVALID : Bh.UNKNOWN };! function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED", e[e.SET_CHALLENGE_ABANDONED = 2] = "SET_CHALLENGE_ABANDONED", e[e.SET_CHALLENGE_TIMEOUT = 3] = "SET_CHALLENGE_TIMEOUT", e[e.HIDE_MODAL_CHALLENGE = 4] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 5] = "SHOW_MODAL_CHALLENGE" }(um || (um = {})); var sm, dm, fm, pm = function() { return pm = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, pm.apply(this, arguments) }, hm = function(e, t) { var n = pm({}, e); switch (t.type) { case um.SET_CHALLENGE_COMPLETED: return n.onChallengeCompletedData = t.onChallengeCompletedData, n; case um.SET_CHALLENGE_INVALIDATED: return n.onChallengeInvalidatedData = t.onChallengeInvalidatedData, n; case um.SET_CHALLENGE_ABANDONED: return n.isAbandoned = !0, n; case um.SET_CHALLENGE_TIMEOUT: return n.progressWhenTimedOut = t.progress, n; case um.HIDE_MODAL_CHALLENGE: return n.isModalVisible = !1, n; case um.SHOW_MODAL_CHALLENGE: return n.isModalVisible = !0, n; default: return e } }, vm = (0, Fi.createContext)(null), mm = function(e) { var t = e.challengeId, n = e.renderInline, r = e.artifacts, a = e.eventService, i = e.metricsService, o = e.requestService, l = e.translate, u = e.onChallengeDisplayed, c = e.onChallengeCompleted, s = e.onChallengeInvalidated, d = e.onModalChallengeAbandoned, f = e.children, p = (0, Fi.useState)((function() { return function(e) { return { Description: { VerificationError: e("Description.VerificationError"), VerificationSuccess: e("Description.VerificationSuccess"), VerifyingYouAreNotBot: e("Description.VerifyingYouAreNotBot") } } }(l) }))[0], h = (0, Fi.useState)((function() { return { challengeId: t, renderInline: n, artifacts: r, resources: p, eventService: a, metricsService: i, requestService: o, onChallengeDisplayed: u, onModalChallengeAbandoned: d, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !1, isAbandoned: !1, progressWhenTimedOut: null } }))[0], v = (0, Fi.useReducer)(hm, h), m = v[0], y = v[1]; return (0, Fi.useEffect)((function() { null === m.onChallengeCompletedData || null !== m.onChallengeInvalidatedData || m.isAbandoned || null !== m.progressWhenTimedOut || (a.sendChallengeCompletedEvent(), i.fireChallengeCompletedEvent(), c(m.onChallengeCompletedData)) }), [a, i, m.onChallengeCompletedData, m.onChallengeInvalidatedData, m.isAbandoned, m.progressWhenTimedOut, c]), (0, Fi.useEffect)((function() { null !== m.onChallengeCompletedData || null === m.onChallengeInvalidatedData || m.isAbandoned || null !== m.progressWhenTimedOut || (a.sendChallengeInvalidatedEvent(), i.fireChallengeInvalidatedEvent(), s(m.onChallengeInvalidatedData)) }), [a, i, m.onChallengeCompletedData, m.onChallengeInvalidatedData, m.isAbandoned, m.progressWhenTimedOut, s]), (0, Fi.useEffect)((function() { null === m.onChallengeCompletedData && null === m.onChallengeInvalidatedData && m.isAbandoned && null === m.progressWhenTimedOut && (a.sendChallengeAbandonedEvent(), i.fireChallengeAbandonedEvent(), null !== d && d((function() { return y({ type: um.SHOW_MODAL_CHALLENGE }) }))) }), [a, i, m.onChallengeCompletedData, m.onChallengeInvalidatedData, m.isAbandoned, m.progressWhenTimedOut, d]), (0, Fi.useEffect)((function() { null !== m.onChallengeCompletedData || null !== m.onChallengeInvalidatedData || m.isAbandoned || null === m.progressWhenTimedOut || (a.sendChallengeTimeoutEvent(m.progressWhenTimedOut), i.fireChallengeTimeoutEvent(), c({ redemptionToken: "" })) }), [a, i, m.onChallengeCompletedData, m.onChallengeInvalidatedData, m.isAbandoned, m.progressWhenTimedOut, c]), Gi().createElement(vm.Provider, { value: { state: m, dispatch: y } }, f) }, ym = function() { var e = (0, Fi.useContext)(vm); if (null === e) throw new Error("ProofOfSpaceContext was not provided in the current scope"); return e }, gm = (null !== (sm = mi.EnvironmentUrls.websiteUrl) && void 0 !== sm ? sm : "URL_NOT_FOUND") + "/worker-resources/script/?component=ChallengeWebWorkers", Em = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, bm = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Cm = function(e) { return e.toFixed(0) + "%" }, _m = function() { var e = ym(), t = e.state, n = t.challengeId, r = t.artifacts, a = t.renderInline, i = t.resources, o = t.eventService, l = t.metricsService, u = t.requestService, c = t.onChallengeDisplayed, s = t.isModalVisible, d = e.dispatch, f = (0, Fi.useState)(null), p = f[0], h = f[1], v = (0, Fi.useState)(im.INITIAL), m = v[0], y = v[1], g = (0, Fi.useState)(0), E = g[0], b = g[1], C = (0, Fi.useRef)(null), _ = (0, Fi.useRef)(null), S = (0, Fi.useRef)(null), I = (0, Fi.useRef)(0), T = (0, Fi.useRef)(0), A = (0, Fi.useCallback)((function() { S.current = setTimeout((function() { d({ type: um.SHOW_MODAL_CHALLENGE }), c({ displayed: !0 }) }), 5e3) }), [d, c]), N = function() { clearTimeout(S.current || void 0), C.current && (C.current.terminate(), C.current = null), _.current && (_.current.cancelRunAsync(), _.current = null), h(null), y(im.INITIAL) }, w = function() { return d({ type: um.HIDE_MODAL_CHALLENGE }) }, L = function() { d({ type: um.SET_CHALLENGE_ABANDONED }), N(), w() }, O = function() { d({ type: um.SET_CHALLENGE_TIMEOUT, progress: I.current }), N(), w() }, k = function() { 1 !== I.current && (I.current < T.current + .33 ? O() : (T.current = I.current, setTimeout(k, om))) }, D = function() { N(); try { C.current = new Worker(gm) } catch (e) { C.current = null } y(im.READY_TO_COMPUTE) }, R = function() { return Em(void 0, void 0, void 0, (function() { return bm(this, (function(e) { switch (e.label) { case 0: switch (m) { case im.READY_TO_COMPUTE: return [3, 1]; case im.COMPUTING_DONE: return [3, 2] } return [3, 4]; case 1: return o.sendPuzzleInitializedEvent(), l.firePuzzleInitializedEvent(), A(), function() { if (m !== im.READY_TO_COMPUTE) return y(im.VERIFIED_INCORRECT), d({ type: um.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: Bh.UNKNOWN, errorMessage: i.Description.VerificationError } }), void w(); var e = { seed: r.seed, layers: parseInt(r.layers, 10), rounds: parseInt(r.rounds, 10) }; if (null == C.current) return _.current = new am(e), y(im.COMPUTING), _.current.runAsync((function(e) { b(e), I.current = e }), (function(e) { h(e), y(im.COMPUTING_DONE) }), (function(e) { console.error(Bv, "exception caught in fallback solver:", e), O() })), void setTimeout(k, om); y(im.COMPUTING), C.current.onmessage = function(e) { var t = "object" == typeof e.data ? e.data : JSON.parse(e.data); if (t.error) return console.error(Bv, "exception caught in worker:", t.error), void O(); b(t.progress), I.current = t.progress, t.answer && (h(t.answer), y(im.COMPUTING_DONE)) }, C.current.postMessage(JSON.stringify({ solverType: rm.GRAPH_PEBBLING_PUZZLE, solverParameters: e })), setTimeout(k, om) }(), [3, 5]; case 2: return o.sendPuzzleCompletedEvent(), l.firePuzzleCompletedEvent(), [4, Em(void 0, void 0, void 0, (function() { var e; return bm(this, (function(t) { switch (t.label) { case 0: return null == p ? [2] : [4, u.proofOfSpace.verifyPuzzle(n, p)]; case 1: return (e = t.sent()).isError ? (d({ type: um.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: cm(e.error), errorMessage: i.Description.VerificationError } }), [2]) : (e.value.redemptionToken ? (y(im.VERIFIED_CORRECT), d({ type: um.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { redemptionToken: e.value.redemptionToken } })) : (y(im.VERIFIED_INCORRECT), d({ type: um.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: Bh.ANSWER_INVALID, errorMessage: i.Description.VerificationError } })), [2]) } })) }))]; case 3: return e.sent(), N(), w(), [3, 5]; case 4: return [3, 5]; case 5: return [2] } })) })) }; (0, Fi.useEffect)((function() { var e = Hu.localStorageService.getLocalStorage(lm); return n === e ? function() {} : (Hu.localStorageService.setLocalStorage(lm, n), o.sendChallengeInitializedEvent(), l.fireChallengeInitializedEvent(), D(), N) }), []), (0, Fi.useEffect)((function() { R() }), [m]); var P = function() { var e = a ? Cd : Ed.Modal.Body, t = 100 * (E || 0); return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement("div", { className: "computation-progress-body" }, Gi().createElement(Ed.ProgressBar, { now: t, label: Cm(t), striped: !0 })))) }; return a ? Gi().createElement(bd, { titleText: i.Description.VerifyingYouAreNotBot }, P()) : Gi().createElement(Ed.Modal, { className: "modal-modern modal-modern-challenge-computation-progress", show: s, onHide: L, backdrop: "static" }, Gi().createElement(If, { headerText: i.Description.VerifyingYouAreNotBot, buttonType: yf.CLOSE, buttonAction: L, buttonEnabled: !0, headerInfo: null }), P()) }, Sm = (0, dd.withTranslations)((function(e) { var t = e.challengeId, n = e.renderInline, r = e.artifacts, a = e.eventService, i = e.metricsService, o = e.requestService, l = e.translate, u = e.onChallengeDisplayed, c = e.onChallengeCompleted, s = e.onChallengeInvalidated, d = e.onModalChallengeAbandoned; return Gi().createElement(mm, { challengeId: t, renderInline: n, artifacts: r, eventService: a, metricsService: i, requestService: o, translate: l, onChallengeDisplayed: u, onChallengeCompleted: c, onChallengeInvalidated: s, onModalChallengeAbandoned: d }, Gi().createElement(_m, null)) }), { common: ["CommonUI.Messages"], feature: "Feature.ProofOfSpaceChallenge" }), Im = function() { function e(e) { this.challengeId = e, this.startTime = null } return e.prototype.sendChallengeInitializedEvent = function() { this.startTime = Date.now(), yi().EventStream.SendEventWithTarget(Kv, Yv.challengeInitialized, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendPuzzleInitializedEvent = function() { yi().EventStream.SendEventWithTarget(Kv, Yv.puzzleInitialized, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendPuzzleCompletedEvent = function() { yi().EventStream.SendEventWithTarget(Kv, Yv.puzzleCompleted, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeCompletedEvent = function() { yi().EventStream.SendEventWithTarget(Kv, Yv.challengeCompleted, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function() { yi().EventStream.SendEventWithTarget(Kv, Yv.challengeInvalidated, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeAbandonedEvent = function() { yi().EventStream.SendEventWithTarget(Kv, Yv.challengeAbandoned, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeTimeoutEvent = function(e) { yi().EventStream.SendEventWithTarget(Kv, Yv.challengeTimeout, { challengeId: this.challengeId, timeoutProgress: e, timeoutElapsedTime: null !== this.startTime ? Date.now() - this.startTime : 0 }, yi().EventStream.TargetTypes.WWW) }, e }(), Tm = function() { function e(e, t) { this.appType = e || "unknown", this.requestServiceDefault = t, this.eventTimer = new jd, this.challengeSolveTimeSequenceName = qv + "_" + Xv.challengeSolveTime, this.puzzleWorkingTimeSequenceName = qv + "_" + Xv.puzzleWorkingTime } return e.prototype.fireChallengeInitializedEvent = function() { this.fireEvent(Jv.challengeInitialized), zd && zd.start(this.challengeSolveTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType), this.eventTimer.start(this.challengeSolveTimeSequenceName) }, e.prototype.firePuzzleInitializedEvent = function() { this.fireEvent(Jv.puzzleInitialized), zd && zd.start(this.puzzleWorkingTimeSequenceName, this.puzzleWorkingTimeSequenceName + "_" + this.appType), this.eventTimer.start(this.puzzleWorkingTimeSequenceName) }, e.prototype.firePuzzleCompletedEvent = function() { this.fireEvent(Jv.puzzleCompleted), zd && zd.endSuccess(this.puzzleWorkingTimeSequenceName, this.puzzleWorkingTimeSequenceName + "_" + this.appType); var e = this.eventTimer.end(this.puzzleWorkingTimeSequenceName); null !== e && this.requestServiceDefault.metrics.recordMetric({ name: is.PuzzleComputeTimePos, value: e, labelValues: { event_type: qv + "_" + Jv.puzzleCompleted, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireChallengeCompletedEvent = function() { this.fireEvent(Jv.challengeCompleted), zd && zd.endSuccess(this.challengeSolveTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType), this.fireSolveTimeEvent(Jv.challengeCompleted) }, e.prototype.fireChallengeInvalidatedEvent = function() { this.fireEvent(Jv.challengeInvalidated), zd && zd.endFailure(this.challengeSolveTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType), this.fireSolveTimeEvent(Jv.challengeInvalidated) }, e.prototype.fireChallengeAbandonedEvent = function() { this.fireEvent(Jv.challengeAbandoned), zd && zd.endCancel(this.challengeSolveTimeSequenceName, this.puzzleWorkingTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType, this.puzzleWorkingTimeSequenceName + "_" + this.appType), this.fireSolveTimeEvent(Jv.challengeAbandoned) }, e.prototype.fireChallengeTimeoutEvent = function() { this.fireEvent(Jv.challengeTimeout), zd && zd.endFailure(this.challengeSolveTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType), this.fireSolveTimeEvent(Jv.challengeTimeout) }, e.prototype.fireEvent = function(e) { if (zd) { var t = qv + "_" + e; zd.fireEvent(t, t + "_" + this.appType) } this.requestServiceDefault.metrics.recordMetric({ name: is.EventPos, value: 1, labelValues: { event_type: qv + "_" + e, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireSolveTimeEvent = function(e) { var t = this.eventTimer.end(this.challengeSolveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimePos, value: t, labelValues: { event_type: qv + "_" + e, application_type: this.appType } }).catch((function() {})) }, e }(), Am = new sd, Nm = function(e) { var t = e.containerId, n = e.challengeId, r = e.artifacts, a = e.appType, i = e.renderInline, o = e.onChallengeDisplayed, l = e.onChallengeCompleted, u = e.onChallengeInvalidated, c = e.onModalChallengeAbandoned, s = document.getElementById(t); if (null !== s) { (0, ji.unmountComponentAtNode)(s); var d = new Im(n), f = new Tm(a, Am); return (0, ji.render)(Gi().createElement(Sm, { challengeId: n, renderInline: i, artifacts: r, eventService: d, metricsService: f, requestService: Am, onChallengeDisplayed: o, onChallengeCompleted: l, onChallengeInvalidated: u, onModalChallengeAbandoned: c }), s), !0 } return !1 }, wm = "ProofOfWork", Lm = "accountSecurityChallengeProofOfWorkEvent", Om = { challengeInitialized: "challengeInitialized", puzzleInitialized: "puzzleInitialized", puzzleCompleted: "puzzleCompleted", challengeCompleted: "challengeCompleted", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned", challengeTimeout: "challengeTimeout" }, km = { challengeInitialized: "ChallengeInitialized", puzzleInitialized: "PuzzleInitialized", puzzleCompleted: "PuzzleCompleted", challengeCompleted: "ChallengeCompleted", challengeInvalidated: "ChallengeInvalidated", challengeAbandoned: "ChallengeAbandoned", challengeTimeout: "ChallengeTimeout" }, Dm = { puzzleWorkingTime: "PuzzleWorkingTime", challengeSolveTime: "ChallengeSolveTime" }, Rm = n(724), Pm = n.n(Rm), xm = function() { function e(e) { this.n = Pm()(e.N), this.a = Pm()(e.A), this.t = e.T, this.curBase = this.a, this.curT = 0, this.isCancelled = !1 } return e.prototype.run = function(e, t) { for (var n = Math.max(1, this.t / 1e3); !this.isDone();) this.doRepeatedSquaring(n), e(this.progress()); t(this.answer()) }, e.prototype.runAsync = function(e, t, n) { var r = this, a = function() { r.doRepeatedSquaring(n || 200), e(r.progress()), r.isCancelled || (r.isDone() ? t(r.answer()) : setTimeout(a, 0)) }; setTimeout(a, 0) }, e.prototype.cancelRunAsync = function() { this.isCancelled = !0 }, e.prototype.doRepeatedSquaring = function(e) { for (var t = void 0 !== e ? Math.min(this.t, this.curT + e) : this.t; this.curT < t; this.curT += 1) this.curBase = this.curBase.square().mod(this.n) }, e.prototype.answer = function() { return this.isDone() ? this.curBase.toString() : null }, e.prototype.progress = function() { return this.curT / this.t }, e.prototype.isDone = function() { return this.curT === this.t }, e }(), Mm = function(e) { return e === Dl.SESSION_INACTIVE ? Yh.SESSION_INVALID : Yh.UNKNOWN };! function(e) { e[e.INITIAL = 0] = "INITIAL", e[e.READY_TO_COMPUTE = 1] = "READY_TO_COMPUTE", e[e.COMPUTING = 2] = "COMPUTING", e[e.COMPUTING_DONE = 3] = "COMPUTING_DONE", e[e.VERIFIED_CORRECT = 4] = "VERIFIED_CORRECT", e[e.VERIFIED_INCORRECT = 5] = "VERIFIED_INCORRECT" }(dm || (dm = {})), function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED", e[e.SET_CHALLENGE_ABANDONED = 2] = "SET_CHALLENGE_ABANDONED", e[e.SET_CHALLENGE_TIMEOUT = 3] = "SET_CHALLENGE_TIMEOUT", e[e.HIDE_MODAL_CHALLENGE = 4] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 5] = "SHOW_MODAL_CHALLENGE" }(fm || (fm = {})); var Vm, Um, Wm = function() { return Wm = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, Wm.apply(this, arguments) }, Hm = function(e, t) { var n = Wm({}, e); switch (t.type) { case fm.SET_CHALLENGE_COMPLETED: return n.onChallengeCompletedData = t.onChallengeCompletedData, n; case fm.SET_CHALLENGE_INVALIDATED: return n.onChallengeInvalidatedData = t.onChallengeInvalidatedData, n; case fm.SET_CHALLENGE_ABANDONED: return n.isAbandoned = !0, n; case fm.SET_CHALLENGE_TIMEOUT: return n.isTimeout = !0, n; case fm.HIDE_MODAL_CHALLENGE: return n.isModalVisible = !1, n; case fm.SHOW_MODAL_CHALLENGE: return n.isModalVisible = !0, n; default: return e } }, Fm = (0, Fi.createContext)(null), Gm = function(e) { var t = e.sessionId, n = e.renderInline, r = e.eventService, a = e.metricsService, i = e.requestService, o = e.translate, l = e.onChallengeDisplayed, u = e.onChallengeCompleted, c = e.onChallengeInvalidated, s = e.onModalChallengeAbandoned, d = e.children, f = (0, Fi.useState)((function() { return function(e) { return { Description: { VerificationError: e("Description.VerificationError"), VerificationSuccess: e("Description.VerificationSuccess"), VerifyingYouAreNotBot: e("Description.VerifyingYouAreNotBot") } } }(o) }))[0], p = (0, Fi.useState)((function() { return { sessionId: t, renderInline: n, resources: f, eventService: r, metricsService: a, requestService: i, onChallengeDisplayed: l, onModalChallengeAbandoned: s, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !1, isAbandoned: !1, isTimeout: !1 } }))[0], h = (0, Fi.useReducer)(Hm, p), v = h[0], m = h[1]; return (0, Fi.useEffect)((function() { null === v.onChallengeCompletedData || null !== v.onChallengeInvalidatedData || v.isAbandoned || v.isTimeout || (r.sendChallengeCompletedEvent(), a.fireChallengeCompletedEvent(), u(v.onChallengeCompletedData)) }), [r, a, v.onChallengeCompletedData, v.onChallengeInvalidatedData, v.isAbandoned, v.isTimeout, u]), (0, Fi.useEffect)((function() { null !== v.onChallengeCompletedData || null === v.onChallengeInvalidatedData || v.isAbandoned || v.isTimeout || (r.sendChallengeInvalidatedEvent(), a.fireChallengeInvalidatedEvent(), c(v.onChallengeInvalidatedData)) }), [r, a, v.onChallengeCompletedData, v.onChallengeInvalidatedData, v.isAbandoned, v.isTimeout, c]), (0, Fi.useEffect)((function() { null === v.onChallengeCompletedData && null === v.onChallengeInvalidatedData && v.isAbandoned && !v.isTimeout && (r.sendChallengeAbandonedEvent(), a.fireChallengeAbandonedEvent(), null !== s && s((function() { return m({ type: fm.SHOW_MODAL_CHALLENGE }) }))) }), [r, a, v.onChallengeCompletedData, v.onChallengeInvalidatedData, v.isAbandoned, c, s]), (0, Fi.useEffect)((function() { null === v.onChallengeCompletedData && null === v.onChallengeInvalidatedData && !v.isAbandoned && v.isTimeout && (r.sendChallengeTimeoutEvent(), a.fireChallengeTimeoutEvent(), u({ redemptionToken: "" })) }), [r, a, v.onChallengeCompletedData, v.onChallengeInvalidatedData, v.isAbandoned, v.isTimeout, u]), Gi().createElement(Fm.Provider, { value: { state: v, dispatch: m } }, d) }, jm = function() { var e = (0, Fi.useContext)(Fm); if (null === e) throw new Error("ProofOfWorkContext was not provided in the current scope"); return e }, zm = (null !== (Vm = mi.EnvironmentUrls.websiteUrl) && void 0 !== Vm ? Vm : "URL_NOT_FOUND") + "/worker-resources/script/?component=ChallengeWebWorkers", Zm = 1e4, qm = "PoWSessionId", Bm = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Km = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Ym = function(e) { return e.toFixed(0) + "%" }, Jm = function() { var e = jm(), t = e.state, n = t.sessionId, r = t.renderInline, a = t.resources, i = t.eventService, o = t.metricsService, l = t.requestService, u = t.onChallengeDisplayed, c = t.isModalVisible, s = e.dispatch, d = (0, Fi.useState)(null), f = d[0], p = d[1], h = (0, Fi.useState)(null), v = h[0], m = h[1], y = (0, Fi.useState)(dm.INITIAL), g = y[0], E = y[1], b = (0, Fi.useState)(0), C = b[0], _ = b[1], S = (0, Fi.useRef)(null), I = (0, Fi.useRef)(null), T = (0, Fi.useRef)(null), A = (0, Fi.useRef)(0), N = ((0, Fi.useRef)(0), (0, Fi.useCallback)((function() { T.current = setTimeout((function() { s({ type: fm.SHOW_MODAL_CHALLENGE }), u({ displayed: !0 }) }), 5e3) }), [s, u])), w = function() { clearTimeout(T.current || void 0), S.current && (S.current.terminate(), S.current = null), I.current && (I.current.cancelRunAsync(), I.current = null), p(null), m(null), E(dm.INITIAL) }, L = function() { return s({ type: fm.HIDE_MODAL_CHALLENGE }) }, O = function() { s({ type: fm.SET_CHALLENGE_ABANDONED }), w(), L() }, k = function() { A.current }, D = function() { return Bm(void 0, void 0, void 0, (function() { var e; return Km(this, (function(t) { switch (t.label) { case 0: w(); try { S.current = new Worker(zm) } catch (e) { S.current = null } return [4, l.proofOfWork.getPuzzle(n)]; case 1: return (e = t.sent()).isError ? (s({ type: fm.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: Yh.UNKNOWN, errorMessage: a.Description.VerificationError } }), L(), [2]) : (p(e.value.artifacts), E(dm.READY_TO_COMPUTE), [2]) } })) })) }, R = function() { return Bm(void 0, void 0, void 0, (function() { return Km(this, (function(e) { switch (e.label) { case 0: switch (g) { case dm.READY_TO_COMPUTE: return [3, 1]; case dm.COMPUTING_DONE: return [3, 2] } return [3, 4]; case 1: return i.sendPuzzleInitializedEvent(), o.firePuzzleInitializedEvent(), N(), function() { if (null == f || g !== dm.READY_TO_COMPUTE) return E(dm.VERIFIED_INCORRECT), s({ type: fm.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: Yh.UNKNOWN, errorMessage: a.Description.VerificationError } }), void L(); var e = JSON.parse(f); if (null == S.current) return I.current = new xm(e), E(dm.COMPUTING), I.current.runAsync((function(e) { _(e), A.current = e }), (function(e) { m(e), E(dm.COMPUTING_DONE) })), void setTimeout(k, Zm); E(dm.COMPUTING), S.current.onmessage = function(e) { var t = "object" == typeof e.data ? e.data : JSON.parse(e.data); _(t.progress), A.current = t.progress, t.answer && (m(t.answer), E(dm.COMPUTING_DONE)) }, S.current.postMessage(JSON.stringify({ solverType: rm.TIME_LOCK_PUZZLE, solverParameters: e })), setTimeout(k, Zm) }(), [3, 5]; case 2: return i.sendPuzzleCompletedEvent(), o.firePuzzleCompletedEvent(), [4, Bm(void 0, void 0, void 0, (function() { var e; return Km(this, (function(t) { switch (t.label) { case 0: return null == v ? [2] : [4, l.proofOfWork.verifyPuzzle(n, v)]; case 1: return (e = t.sent()).isError ? (s({ type: fm.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: Mm(e.error), errorMessage: a.Description.VerificationError } }), [2]) : (e.value.answerCorrect ? (E(dm.VERIFIED_CORRECT), s({ type: fm.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { redemptionToken: e.value.redemptionToken } })) : (E(dm.VERIFIED_INCORRECT), s({ type: fm.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: Yh.ANSWER_INVALID, errorMessage: a.Description.VerificationError } })), [2]) } })) }))]; case 3: return e.sent(), w(), L(), [3, 5]; case 4: return [3, 5]; case 5: return [2] } })) })) }; (0, Fi.useEffect)((function() { var e = Hu.localStorageService.getLocalStorage(qm); return n === e ? function() {} : (Hu.localStorageService.setLocalStorage(qm, n), i.sendChallengeInitializedEvent(), o.fireChallengeInitializedEvent(), D(), w) }), []), (0, Fi.useEffect)((function() { R() }), [g]); var P = function() { var e = r ? Cd : Ed.Modal.Body, t = 100 * (C || 0); return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement("div", { className: "computation-progress-body" }, Gi().createElement(Ed.ProgressBar, { now: t, label: Ym(t), striped: !0 })))) }; return r ? Gi().createElement(bd, { titleText: a.Description.VerifyingYouAreNotBot }, P()) : Gi().createElement(Ed.Modal, { className: "modal-modern modal-modern-challenge-computation-progress", show: c, onHide: O, backdrop: "static" }, Gi().createElement(If, { headerText: a.Description.VerifyingYouAreNotBot, buttonType: yf.CLOSE, buttonAction: O, buttonEnabled: !0, headerInfo: null }), P()) }, Xm = (0, dd.withTranslations)((function(e) { var t = e.sessionId, n = e.renderInline, r = e.eventService, a = e.metricsService, i = e.requestService, o = e.translate, l = e.onChallengeDisplayed, u = e.onChallengeCompleted, c = e.onChallengeInvalidated, s = e.onModalChallengeAbandoned; return Gi().createElement(Gm, { sessionId: t, renderInline: n, eventService: r, metricsService: a, requestService: i, translate: o, onChallengeDisplayed: l, onChallengeCompleted: u, onChallengeInvalidated: c, onModalChallengeAbandoned: s }, Gi().createElement(Jm, null)) }), { common: ["CommonUI.Messages"], feature: "Feature.ProofOfWorkChallenge" }), Qm = function() { function e(e) { this.sessionId = e } return e.prototype.sendChallengeInitializedEvent = function() { yi().EventStream.SendEventWithTarget(Lm, Om.challengeInitialized, { sessionId: this.sessionId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendPuzzleInitializedEvent = function() { yi().EventStream.SendEventWithTarget(Lm, Om.puzzleInitialized, { sessionId: this.sessionId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendPuzzleCompletedEvent = function() { yi().EventStream.SendEventWithTarget(Lm, Om.puzzleCompleted, { sessionId: this.sessionId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeCompletedEvent = function() { yi().EventStream.SendEventWithTarget(Lm, Om.challengeCompleted, { sessionId: this.sessionId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function() { yi().EventStream.SendEventWithTarget(Lm, Om.challengeInvalidated, { sessionId: this.sessionId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeAbandonedEvent = function() { yi().EventStream.SendEventWithTarget(Lm, Om.challengeAbandoned, { sessionId: this.sessionId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeTimeoutEvent = function() { yi().EventStream.SendEventWithTarget(Lm, Om.challengeTimeout, { sessionId: this.sessionId }, yi().EventStream.TargetTypes.WWW) }, e }(), $m = function() { function e(e, t) { this.appType = e || "unknown", this.requestServiceDefault = t, this.eventTimer = new jd, this.challengeSolveTimeSequenceName = wm + "_" + Dm.challengeSolveTime, this.puzzleWorkingTimeSequenceName = wm + "_" + Dm.puzzleWorkingTime } return e.prototype.fireChallengeInitializedEvent = function() { this.fireEvent(km.challengeInitialized), zd && zd.start(this.challengeSolveTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType), this.eventTimer.start(this.challengeSolveTimeSequenceName) }, e.prototype.firePuzzleInitializedEvent = function() { this.fireEvent(km.puzzleInitialized), zd && zd.start(this.puzzleWorkingTimeSequenceName, this.puzzleWorkingTimeSequenceName + "_" + this.appType), this.eventTimer.start(this.puzzleWorkingTimeSequenceName) }, e.prototype.firePuzzleCompletedEvent = function() { this.fireEvent(km.puzzleCompleted), zd && zd.endSuccess(this.puzzleWorkingTimeSequenceName, this.puzzleWorkingTimeSequenceName + "_" + this.appType); var e = this.eventTimer.end(this.puzzleWorkingTimeSequenceName); null !== e && this.requestServiceDefault.metrics.recordMetric({ name: is.PuzzleComputeTimePow, value: e, labelValues: { event_type: wm + "_" + km.puzzleCompleted, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireChallengeCompletedEvent = function() { this.fireEvent(km.challengeCompleted), zd && zd.endSuccess(this.challengeSolveTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType), this.fireSolveTimeEvent(km.challengeCompleted) }, e.prototype.fireChallengeInvalidatedEvent = function() { this.fireEvent(km.challengeInvalidated), zd && zd.endFailure(this.challengeSolveTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType), this.fireSolveTimeEvent(km.challengeInvalidated) }, e.prototype.fireChallengeAbandonedEvent = function() { this.fireEvent(km.challengeAbandoned), zd && zd.endCancel(this.challengeSolveTimeSequenceName, this.puzzleWorkingTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType, this.puzzleWorkingTimeSequenceName + "_" + this.appType), this.fireSolveTimeEvent(km.challengeAbandoned) }, e.prototype.fireChallengeTimeoutEvent = function() { this.fireEvent(km.challengeTimeout), zd && zd.endFailure(this.challengeSolveTimeSequenceName, this.challengeSolveTimeSequenceName + "_" + this.appType), this.fireSolveTimeEvent(km.challengeTimeout) }, e.prototype.fireEvent = function(e) { if (zd) { var t = wm + "_" + e; zd.fireEvent(t, t + "_" + this.appType) } this.requestServiceDefault.metrics.recordMetric({ name: is.EventPow, value: 1, labelValues: { event_type: wm + "_" + e, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireSolveTimeEvent = function(e) { var t = this.eventTimer.end(this.challengeSolveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimePow, value: t, labelValues: { event_type: wm + "_" + e, application_type: this.appType } }).catch((function() {})) }, e }(), ey = new sd, ty = function(e) { var t = e.containerId, n = e.sessionId, r = e.appType, a = e.renderInline, i = e.onChallengeDisplayed, o = e.onChallengeCompleted, l = e.onChallengeInvalidated, u = e.onModalChallengeAbandoned, c = document.getElementById(t); if (null !== c) { (0, ji.unmountComponentAtNode)(c); var s = new Qm(n), d = new $m(r, ey); return (0, ji.render)(Gi().createElement(Xm, { sessionId: n, renderInline: a, eventService: s, metricsService: d, requestService: ey, onChallengeDisplayed: i, onChallengeCompleted: o, onChallengeInvalidated: l, onModalChallengeAbandoned: u }), c), !0 } return !1 }, ny = ReactRouterDOM, ry = "accountSecurityChallengeReauthenticationEvent", ay = { challengeInitialized: "challengeInitialized", userConfigurationLoaded: "userConfigurationLoaded", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned", challengeCompleted: "challengeCompleted", otpResendRequested: "otpResendRequested", reauthenticationTypeChanged: "reauthenticationTypeChanged", codeSubmitted: "codeSubmitted", codeVerificationFailed: "codeVerificationFailed", codeVerified: "codeVerified", noEnabledMethodsReturned: "noEnabledMethodsReturned" }, iy = { initialized: "Initialized", verified: "Verified", invalidated: "Invalidated", abandoned: "Abandoned" }, oy = { solveTime: "SolveTime" }, ly = ReactRouter, uy = function() { var e = (0, ly.useLocation)(), t = (0, ly.matchPath)(e.pathname, { path: "/:activeReauthenticationType", exact: !0, strict: !1 }); return (null == t ? void 0 : t.params) ? null == t ? void 0 : t.params.activeReauthenticationType : null }, cy = function(e) { return "/" + (e || "") }, sy = function(e, t) { switch (t) { case Hl.PASSWORD_INCORRECT: return e.Message.Error.PasswordIncorrect; case Hl.OTP_EMAIL_REDEEM_FAILURE: return e.Message.Error.OtpRedeemFailure; default: return e.Message.Error.Default } }, dy = function(e, t) { switch (t) { case Eo.INVALID_CODE: return e.Message.Error.OtpCodeIncorrect; case Eo.TOO_MANY_REQUESTS: return e.Message.Error.OtpCodeThrottled; default: return e.Message.Error.Default } }, fy = function(e) { switch (e) { case Eo.CODE_EXPIRED: case Eo.INVALID_SESSION_TOKEN: return Jh.OTP_CODE_EXPIRED; default: return Jh.UNKNOWN } };! function(e) { e[e.SET_REAUTHENTICATION_TYPES = 0] = "SET_REAUTHENTICATION_TYPES", e[e.SET_CHALLENGE_COMPLETED = 1] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 2] = "SET_CHALLENGE_INVALIDATED", e[e.HIDE_MODAL_CHALLENGE = 3] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 4] = "SHOW_MODAL_CHALLENGE", e[e.SET_CURRENT_REAUTHENTICATION_TYPE = 5] = "SET_CURRENT_REAUTHENTICATION_TYPE", e[e.INITIALIZE_EMAIL_OTP_SESSION = 6] = "INITIALIZE_EMAIL_OTP_SESSION" }(Um || (Um = {})); var py, hy = function() { return hy = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, hy.apply(this, arguments) }, vy = function(e, t) { var n, r, a = hy({}, e); switch (t.type) { case Um.SET_REAUTHENTICATION_TYPES: return a.defaultType = t.defaultType, a.availableTypes = t.availableTypes, a; case Um.SET_CHALLENGE_COMPLETED: return a.onChallengeCompletedData = t.onChallengeCompletedData, a.isModalVisible = !1, a; case Um.SET_CHALLENGE_INVALIDATED: return a.onChallengeInvalidatedData = { errorCode: t.errorCode, errorMessage: (n = e.resources, r = t.errorCode, r === Jh.OTP_CODE_EXPIRED ? n.Message.Error.OtpCodeExpired : n.Message.Error.Default) }, a.isModalVisible = !1, a; case Um.HIDE_MODAL_CHALLENGE: return a.isModalVisible = !1, a; case Um.SHOW_MODAL_CHALLENGE: return a.isModalVisible = !0, a; case Um.INITIALIZE_EMAIL_OTP_SESSION: return a.initialOtpSessionId = t.sessionId, a; default: return e } }, my = (0, Fi.createContext)(null), yy = function(e) { var t = e.renderInline, n = e.requestService, r = e.metricsService, a = e.eventService, i = e.defaultType, o = e.availableTypes, l = e.defaultTypeMetadata, u = e.translate, c = e.onChallengeCompleted, s = e.onChallengeInvalidated, d = e.onModalChallengeAbandoned, f = e.children, p = (0, Fi.useState)((function() { return function(e) { return { Action: { ForgotYourPassword: function(t, n) { return e("Action.ForgotYourPassword", { linkStart: t, linkEnd: n }) }, PleaseTryAgain: e("Action.PleaseTryAgain"), Verify: e("Action.Verify"), CodeSent: e("Action.CodeSent"), ResendCode: e("Action.ResendCode"), ChangeVerificationMethod: e("Action.ChangeVerificationMethod"), TryAlternativeMethod: e("Action.TryAlternativeMethod") }, Description: { EnterYourPassword: e("Description.EnterYourPassword"), EnterYourOtpCode: e("Description.EnterYourOtpCode", { lineBreak: "\n" }) }, Header: { PasskeyVerification: e("Header.PasskeyVerification"), PasswordVerification: e("Header.PasswordVerification"), OtpVerification: e("Header.OtpVerification"), VerificationMethodSelection: e("Header.VerificationMethodSelection") }, Label: { Passkey: e("Label.Passkey"), PasskeyDirections: e("Label.PasskeyDirections"), Password: e("Label.Password"), OneTimeCode: e("Label.OneTimeCode"), VerifyWithPasskey: e("Label.VerifyWithPasskey"), YourPassword: e("Label.YourPassword"), YourOtpCode: e("Label.YourOtpCode"), ChooseVerificationMethod: e("Label.ChooseVerificationMethod") }, Message: { Error: { Default: e("Message.Error.Default"), NoCredentialsFound: e("Message.Error.NoCredentialsFound"), PasswordIncorrect: e("Message.Error.PasswordIncorrect"), OtpCodeIncorrect: e("Message.Error.OtpCodeIncorrect"), OtpCodeExpired: e("Message.Error.OtpCodeExpired"), OtpRedeemFailure: e("Message.Error.OtpRedeemFailure"), OtpCodeThrottled: e("Message.Error.OtpCodeThrottled") } } } }(u) }))[0], h = (0, Fi.useState)((function() { return { renderInline: t, resources: p, requestService: n, metricsService: r, eventService: a, defaultType: i, availableTypes: o, defaultTypeMetadata: l, onModalChallengeAbandoned: d, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !0, initialOtpSessionId: null } }))[0], v = (0, Fi.useReducer)(vy, h), m = v[0], y = v[1], g = uy(); return (0, Fi.useEffect)((function() { null !== m.onChallengeCompletedData && null === m.onChallengeInvalidatedData && (r.fireVerifiedEvent(g), a.sendChallengeCompletedEvent(g), c(m.onChallengeCompletedData)) }), [g, r, a, m.onChallengeCompletedData, m.onChallengeInvalidatedData, c]), (0, Fi.useEffect)((function() { null !== m.onChallengeInvalidatedData && null === m.onChallengeCompletedData && (r.fireInvalidatedEvent(g), a.sendChallengeInvalidatedEvent(g), s(m.onChallengeInvalidatedData)) }), [g, r, a, m.onChallengeCompletedData, m.onChallengeInvalidatedData, s]), (0, Fi.useEffect)((function() { a.sendReauthenticationTypeChangedEvent(g) }), [g, a]), Gi().createElement(my.Provider, { value: { state: m, dispatch: y } }, f) }, gy = function() { var e = (0, Fi.useContext)(my); if (null === e) throw new Error("ReauthenticationContext was not provided in the current scope"); return e }, Ey = function(e) { var t = e.requestInFlight, n = e.setRequestError, r = gy().state, a = r.resources, i = r.renderInline, o = (0, ly.useHistory)(), l = i ? "inline-challenge-body-button-link" : "modal-body-button-link"; return Gi().createElement("p", null, Gi().createElement("button", { type: "button", className: l + " small", onClick: function() { return n(null), void o.push(cy(null)) }, disabled: t }, a.Action.ChangeVerificationMethod)) }, by = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Cy = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, _y = function(e) { var t = e.requestInFlightState, n = e.requestErrorState, r = e.children, a = gy(), i = a.state, o = i.renderInline, l = i.resources, u = i.requestService, c = i.defaultTypeMetadata, s = a.dispatch, d = t[0], f = t[1], p = n[0], h = n[1], v = o ? Cd : Ed.Modal.Body, m = o ? "inline-challenge-lock-icon" : "modal-lock-icon", y = o ? "inline-challenge-margin-bottom" : "modal-margin-bottom", g = o ? "inline-challenge-action-button" : "modal-action-button"; g = (g = g.concat(" ", "btn-cta-md")).concat(" ", y); var E = (o ? "inline-margin-bottom-xlarge" : "modal-margin-bottom-xlarge").concat(" ", "text-error xsmall"), b = o ? "inline-challenge-margin-bottom-sm" : "modal-margin-bottom-sm"; return c && Gi().createElement(Gi().Fragment, null, Gi().createElement(v, null, Gi().createElement("div", { className: m }), Gi().createElement("p", { className: b }, l.Label.VerifyWithPasskey), Gi().createElement("p", { className: y }, l.Label.PasskeyDirections), Gi().createElement("button", { type: "button", className: g, "aria-label": l.Action.Verify, disabled: d, onClick: function() { return by(void 0, void 0, void 0, (function() { var e, t, n, r, a, i; return Cy(this, (function(o) { switch (o.label) { case 0: return f(!0), h(null), null === c || void 0 === c.passkeyAuthOptions || void 0 === c.passkeySessionId ? (h(l.Message.Error.Default + " " + l.Action.PleaseTryAgain), f(!1), [2]) : (e = !(mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp && (0, mi.DeviceMeta)().isAndroidApp), (t = e ? Hu.fido2Util.convertPublicKeyParametersToStandardBase64(c.passkeyAuthOptions) : JSON.parse(c.passkeyAuthOptions)).publicKey ? (n = "", mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp ? (t.keyType = "platform", [4, u.fido2.getNativeResponse(Hu.hybridResponseService.FeatureTarget.GET_CREDENTIALS, { authenticationOptionsJSON: JSON.stringify(t) }, 3e5)]) : [3, 2]) : (h(l.Message.Error.Default + " " + l.Action.PleaseTryAgain), f(!1), [2])); case 1: return (r = o.sent()).isError ? (h(function(e, t) { switch (t) { case Ds.UNKNOWN: return e.Message.Error.Default + " " + e.Action.PleaseTryAgain; case Ds.NO_CREDENTIALS_FOUND: return e.Message.Error.NoCredentialsFound; default: return e.Message.Error.Default + " " + e.Action.PleaseTryAgain } }(l, r.error)), f(!1), [2]) : null === r.value ? (h(l.Message.Error.Default + " " + l.Action.PleaseTryAgain), f(!1), [2]) : (n = r.value, [3, 4]); case 2: return [4, u.fido2.getNavigatorCredentials({ publicKey: Hu.fido2Util.formatCredentialRequestWeb(JSON.stringify(t)) })]; case 3: if ((a = o.sent()).isError || null == a.value) return h(l.Message.Error.Default + " " + l.Action.PleaseTryAgain), f(!1), [2]; n = a.value, o.label = 4; case 4: return [4, u.reauthentication.generateToken({ password: n, sessionId: c.passkeySessionId, type: Xh.Passkey })]; case 5: return (i = o.sent()).isError ? (h(sy(l, i.error) + " " + l.Action.PleaseTryAgain), f(!1), [2]) : (h(null), s({ type: Um.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { reauthenticationToken: i.value.token } }), [2]) } })) })) } }, d ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : l.Action.Verify), r, Gi().createElement("p", { className: E }, p))) }, Sy = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Iy = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Ty = function(e, t) { return function(n) { return Sy(void 0, void 0, Promise, (function() { return Iy(this, (function(r) { switch (r.label) { case 0: return "Enter" === n.key && t ? (n.preventDefault(), n.stopPropagation(), [4, e()]) : [3, 2]; case 1: r.sent(), r.label = 2; case 2: return [2] } })) })) } }, Ay = function() { return Promise.resolve(null) }, Ny = function(e, t, n, r, a, i) { return function(o) { return Sy(void 0, void 0, Promise, (function() { var l, u; return Iy(this, (function(c) { switch (c.label) { case 0: return l = o.currentTarget.value, void 0 === t || t.test(l) || (l = e), void 0 !== i && i(l), r(l), u = a, [4, n(l)]; case 1: return u.apply(void 0, [c.sent()]), [2] } })) })) } }, wy = function(e) { var t = e.id, n = e.inputType, r = e.placeholder, a = e.disabled, i = e.value, o = e.error, l = e.canSubmit, u = e.validate, c = e.setValue, s = e.setError, d = e.handleSubmit, f = e.onChange, p = e.label, h = e.bottomLabel, v = e.inputMode, m = e.autoComplete, y = e.maxLength, g = e.validCharactersRegEx, E = e.hideFeedback, b = e.concealInput, C = e.autoFocus, _ = "" !== i && null === o, S = "" !== i && null !== o, I = _ || S; return Gi().createElement("div", { className: "input-control-wrapper" }, p && Gi().createElement("label", { className: "text-label xsmall", htmlFor: t }, p), Gi().createElement(Ed.FormGroup, { controlId: t, className: (I ? "form-has-feedback" : "") + " " + (_ ? "form-has-success" : "") + " " + (S ? "form-has-error" : "") }, Gi().createElement(Ed.FormControl, { as: "input", className: "input-field" + (b && i.length > 0 ? " input-field-concealed" : ""), type: n, inputMode: v, autoComplete: m, maxLength: y, disabled: a, value: i, placeholder: r, onChange: Ny(i, g, u, c, s, f), onKeyDown: Ty(d, l), autoFocus: C }), !a && !E && _ && Gi().createElement("span", { className: "icon-checkmark-on" }), !a && !E && S && Gi().createElement("span", { className: "icon-close" }), Gi().createElement("div", { className: "form-control-label bottom-label xsmall" }, !a && S ? o : h || ""))) }, Ly = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Oy = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, ky = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Dy = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Ry = function(e) { var t = e.otpResendCodeRemainingTimeState, n = e.requestInFlightState, r = e.requestErrorState, a = e.children, i = gy(), o = i.state, l = o.renderInline, u = o.resources, c = o.requestService, s = o.metricsService, d = o.eventService, f = o.initialOtpSessionId, p = i.dispatch, h = function() { var e = (0, Fi.useState)(6), t = e[0], n = e[1]; return (0, Fi.useEffect)((function() { Ly(void 0, void 0, Promise, (function() { var e; return Oy(this, (function(t) { switch (t.label) { case 0: return [4, xo(Io.Reauth)]; case 1: return (e = t.sent()).isError || n(e.value.OtpCodeLength), [2] } })) })) }), []), t }(), v = (0, Fi.useState)(""), m = v[0], y = v[1], g = (0, Fi.useState)(f), E = g[0], b = g[1], C = t[0], _ = t[1], S = (0, Fi.useState)(null), I = S[0], T = S[1], A = n[0], N = n[1], w = r[0], L = r[1], O = (0, Fi.useCallback)((function() { return ky(void 0, void 0, void 0, (function() { var e, t, n, r, a; return Dy(this, (function(i) { switch (i.label) { case 0: return N(!0), null === E ? (L(sy(u, Hl.UNKNOWN) + " " + u.Action.PleaseTryAgain), N(!1), [2]) : (d.sendCodeSubmittedEvent(Xh.OtpEmail), [4, c.otp.validateCode(So.Email, E, m)]); case 1: if ((e = i.sent()).isError) { t = void 0; try { t = e.errorRaw.data } catch (e) { t = null } return n = e.error || t, r = dy(u, n), L(r + " " + u.Action.PleaseTryAgain), d.sendCodeVerificationFailedEvent(Xh.OtpEmail, r), n !== Eo.CODE_EXPIRED && n !== Eo.INVALID_SESSION_TOKEN || p({ type: Um.SET_CHALLENGE_INVALIDATED, errorCode: fy(n) }), N(!1), [2] } return d.sendCodeVerifiedEvent(Xh.OtpEmail), [4, c.reauthentication.generateToken({ sessionId: E, type: Xh.OtpEmail })]; case 2: return (a = i.sent()).isError ? (L(sy(u, a.error) + " " + u.Action.PleaseTryAgain), N(!1), [2]) : (s.fireVerifiedEvent(Xh.OtpEmail), L(null), p({ type: Um.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { reauthenticationToken: a.value.token } }), [2]) } })) })) }), [p, m, E, c.otp, c.reauthentication, s, d, u, L, N]), k = function() { var e = Date.now() + 3e4; _(30); var t = setInterval((function() { var n = Math.round((e - Date.now()) / 1e3), r = Math.max(0, n); r <= 0 && clearInterval(t), _(r) }), 1e3); T(t) }; (0, Fi.useEffect)((function() { return ky(void 0, void 0, void 0, (function() { var e; return Dy(this, (function(t) { switch (t.label) { case 0: return null !== f ? [2] : [4, c.otp.sendCodeForUser(So.Email)]; case 1: return (e = t.sent()).isError ? (L(sy(u, Hl.UNKNOWN) + " " + u.Action.TryAlternativeMethod), [2]) : (b(e.value.otpSessionToken), k(), p({ type: Um.INITIALIZE_EMAIL_OTP_SESSION, sessionId: e.value.otpSessionToken }), [2]) } })) })), function() { null !== I && (clearInterval(I), T(null)) } }), []), (0, Fi.useEffect)((function() { m.length === h && ky(void 0, void 0, void 0, (function() { return Dy(this, (function(e) { switch (e.label) { case 0: return [4, O()]; case 1: return e.sent(), [2] } })) })) }), [m, h, O]); var D, R = { content: A ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : (D = C > 0 ? u.Action.CodeSent + " (" + C + ")" : "" + u.Action.ResendCode, w ? u.Message.Error.Default : D), label: u.Action.ResendCode, enabled: !A && C <= 0, action: function() { return ky(void 0, void 0, void 0, (function() { var e; return Dy(this, (function(t) { switch (t.label) { case 0: return N(!0), null === E ? (L(sy(u, Hl.UNKNOWN) + " " + u.Action.PleaseTryAgain), N(!1), [2]) : [4, c.otp.resendCode(So.Email, E)]; case 1: return (e = t.sent()).isError ? (L(dy(u, Eo.UNKNOWN) + " " + u.Action.PleaseTryAgain), N(!1), [2]) : (d.sendOtpResendRequestedEvent(), k(), L(null), b(e.value.otpSessionToken), N(!1), [2]) } })) })) } }, P = l ? Cd : Ed.Modal.Body, x = l ? bf : Cf, M = l ? "inline-challenge-lock-icon" : "modal-lock-icon", V = l ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge"; return Gi().createElement(Gi().Fragment, null, Gi().createElement(P, null, Gi().createElement("div", { className: M }), Gi().createElement("p", { className: V }, w || u.Description.EnterYourOtpCode), Gi().createElement(wy, { id: "reauthentication-email-otp-input", inputType: "password", disabled: A, value: m, setValue: y, error: w, setError: L, validate: Ay, canSubmit: m.length === h, handleSubmit: O, onChange: function() { return L(null) }, autoComplete: "off", placeholder: u.Label.YourOtpCode, hideFeedback: !0 }), Gi().createElement("p", null, a)), Gi().createElement(x, { positiveButton: R, negativeButton: null })) }, Py = function() { var e = gy().state.resources.Action.ForgotYourPassword('', ""); return Gi().createElement("span", { dangerouslySetInnerHTML: { __html: e } }) }, xy = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, My = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Vy = function(e) { var t = e.requestInFlightState, n = e.requestErrorState, r = e.children, a = gy(), i = a.state, o = i.renderInline, l = i.resources, u = i.requestService, c = (i.metricsService, i.eventService, a.dispatch), s = (0, Fi.useState)(""), d = s[0], f = s[1], p = t[0], h = t[1], v = n[0], m = n[1], y = function() { return xy(void 0, void 0, void 0, (function() { var e; return My(this, (function(t) { switch (t.label) { case 0: return h(!0), [4, u.reauthentication.generateToken({ password: d })]; case 1: return (e = t.sent()).isError ? (m(sy(l, e.error) + " " + l.Action.PleaseTryAgain), h(!1), [2]) : (m(null), c({ type: Um.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { reauthenticationToken: e.value.token } }), [2]) } })) })) }, g = { content: p ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : l.Action.Verify, label: l.Action.Verify, enabled: !p && d.length > 0, action: y }, E = o ? Cd : Ed.Modal.Body, b = o ? bf : Cf, C = o ? "inline-challenge-lock-icon" : "modal-lock-icon", _ = o ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge"; return Gi().createElement(Gi().Fragment, null, Gi().createElement(E, null, Gi().createElement("div", { className: C }), Gi().createElement("p", { className: _ }, l.Description.EnterYourPassword), Gi().createElement(wy, { id: "reauthentication-password-input", inputType: "password", disabled: p, value: d, setValue: f, error: v, setError: m, validate: Ay, canSubmit: d.length > 0, handleSubmit: y, onChange: function() { return m(null) }, autoComplete: "off", placeholder: l.Label.YourPassword, hideFeedback: !0 }), Gi().createElement("p", null, Gi().createElement(Py, null), r)), Gi().createElement(b, { positiveButton: g, negativeButton: null })) }, Uy = function(e) { var t = e.rowLabel, n = e.rowIcon, r = e.requestInFlight, a = e.typeToBeSelected, i = (0, ly.useHistory)(); return Gi().createElement("tr", { onClick: r ? void 0 : function() { return i.push(cy(a)) }, className: r ? "media-type-row disabled" : "media-type-row" }, Gi().createElement("td", null, Gi().createElement("span", { className: n })), Gi().createElement("td", { className: "media-type-label" }, t), Gi().createElement("td", { className: "media-type-selector" }, Gi().createElement("span", { className: "icon-next" }), Gi().createElement("div", { className: "icon-placeholder" }))) }, Wy = function(e) { var t = e.listItemConfig, n = gy().state, r = n.resources, a = n.renderInline, i = a ? Cd : Ed.Modal.Body, o = a ? "inline-challenge-lock-icon" : "modal-lock-icon", l = a ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge", u = a ? "" : "modal-margin-bottom-large"; return Gi().createElement(i, null, Gi().createElement("div", { className: o }), Gi().createElement("p", { className: l }, r.Label.ChooseVerificationMethod), Gi().createElement("table", { className: "table table-striped media-type-list " + u }, Gi().createElement("tbody", null, t.map((function(e) { return Gi().createElement(Uy, { key: e.rowLabel, rowLabel: e.rowLabel, rowIcon: e.rowIcon, requestInFlight: e.requestInFlight, typeToBeSelected: e.typeToBeSelected }) }))))) }, Hy = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Fy = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Gy = function() { return Hy(void 0, void 0, Promise, (function() { var e, t, n, r; return Fy(this, (function(a) { switch (a.label) { case 0: return e = mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp, t = !0, !e && function() { try { return void 0 !== PublicKeyCredential } catch (e) { return !1 } }() || (t = !1), n = mi.DeviceMeta && ((0, mi.DeviceMeta)().isIosApp || (0, mi.DeviceMeta)().isAndroidApp), r = !1, e && n ? [4, Hy(void 0, void 0, Promise, (function() { return Fy(this, (function(e) { switch (e.label) { case 0: return e.trys.push([0, 2, , 3]), [4, Hu.hybridResponseService.getNativeResponse(Hu.hybridResponseService.FeatureTarget.CREDENTIALS_PROTOCOL_AVAILABLE, {}, 2e3)]; case 1: return "true" === e.sent() ? [2, !0] : [3, 3]; case 2: return e.sent(), [2, !1]; case 3: return [2, !1] } })) }))] : [3, 2]; case 1: r = a.sent(), a.label = 2; case 2: return [2, t || r] } })) })) }, jy = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, zy = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Zy = function() { var e = gy(), t = e.state, n = t.availableTypes, r = t.resources, a = t.defaultType, i = t.renderInline, o = t.isModalVisible, l = t.metricsService, u = t.eventService, c = t.onModalChallengeAbandoned, s = e.dispatch, d = (0, Fi.useState)(!1), f = (0, Fi.useState)(""), p = (0, Fi.useState)(30), h = uy(), v = function() { s({ type: Um.HIDE_MODAL_CHALLENGE }), l.fireAbandonedEvent(h), u.sendChallengeAbandonedEvent(h), null !== c && c((function() { return s({ type: Um.SHOW_MODAL_CHALLENGE }) })) }, m = (0, ly.useHistory)(), y = n.length > 1; (0, Fi.useEffect)((function() { jy(void 0, void 0, void 0, (function() { var e, t, r; return zy(this, (function(i) { switch (i.label) { case 0: return a !== Xh.Passkey ? [3, 2] : [4, Gy()]; case 1: if (e = i.sent(), t = a, !e) { if (0 === (r = n.filter((function(e) { return e !== Xh.Passkey }))).length) return s({ type: Um.SET_CHALLENGE_INVALIDATED, errorCode: 0 }), [2]; t = r[r.length - 1], s({ type: Um.SET_REAUTHENTICATION_TYPES, defaultType: t, availableTypes: r }) } return m.replace(t), [2]; case 2: return m.replace(a), [2] } })) })) }), []); var g = function() { return Gi().createElement(ly.Switch, null, Gi().createElement(ly.Route, { path: cy(Xh.Passkey) }, Gi().createElement(_y, { requestInFlightState: d, requestErrorState: f }, y && Gi().createElement(Ey, { requestInFlight: d[0], setRequestError: f[1] }))), Gi().createElement(ly.Route, { path: cy(Xh.OtpEmail) }, Gi().createElement(Ry, { otpResendCodeRemainingTimeState: p, requestInFlightState: d, requestErrorState: f }, y && Gi().createElement(Ey, { requestInFlight: d[0], setRequestError: f[1] }))), Gi().createElement(ly.Route, { path: cy(Xh.Password) }, Gi().createElement(Vy, { requestInFlightState: d, requestErrorState: f }, y && Gi().createElement(Ey, { requestInFlight: d[0], setRequestError: f[1] }))), y && Gi().createElement(ly.Route, null, Gi().createElement(Wy, { listItemConfig: n.map((function(e) { var t; return (t = {}, t[Xh.Password] = { rowLabel: r.Label.Password, rowIcon: "icon-status-private", requestInFlight: d[0], typeToBeSelected: Xh.Password }, t[Xh.OtpEmail] = { rowLabel: r.Label.OneTimeCode, rowIcon: "icon-status-private", requestInFlight: d[0], typeToBeSelected: Xh.OtpEmail }, t[Xh.Passkey] = { rowLabel: r.Label.Passkey, rowIcon: "icon-status-private", requestInFlight: d[0], typeToBeSelected: Xh.Passkey }, t)[e] })) }))) }, E = function() { var e; return null === h ? r.Header.VerificationMethodSelection : (e = {}, e[Xh.Password] = r.Header.PasswordVerification, e[Xh.OtpEmail] = r.Header.OtpVerification, e[Xh.Passkey] = r.Header.PasskeyVerification, e)[h] }, b = Gi().createElement(bd, { titleText: E() }, g()), C = Gi().createElement(Ed.Modal, { className: "modal-modern", show: o, onHide: v, backdrop: "static" }, Gi().createElement(If, { headerText: E(), buttonType: yf.CLOSE, buttonAction: v, buttonEnabled: !d[0], headerInfo: null }), g()); return i ? b : C }, qy = (0, dd.withTranslations)((function(e) { var t = e.renderInline, n = e.requestService, r = e.metricsService, a = e.eventService, i = e.defaultType, o = e.availableTypes, l = e.defaultTypeMetadata, u = e.shouldModifyBrowserHistory, c = e.translate, s = e.onChallengeCompleted, d = e.onChallengeInvalidated, f = e.onModalChallengeAbandoned, p = Gi().createElement(yy, { renderInline: t, requestService: n, metricsService: r, eventService: a, translate: c, defaultType: i, availableTypes: o, defaultTypeMetadata: l, onChallengeCompleted: s, onChallengeInvalidated: d, onModalChallengeAbandoned: f }, Gi().createElement(Zy, null)); return u ? Gi().createElement(ny.HashRouter, { hashType: "noslash" }, p) : Gi().createElement(ny.MemoryRouter, null, p) }), { common: [], feature: "Feature.Reauthentication" }), By = function() { function e(e) { this.defaultType = e } return e.prototype.sendChallengeInitializedEvent = function() { yi().EventStream.SendEventWithTarget(ry, ay.challengeInitialized, { defaultType: this.defaultType }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendNoEnabledMethodsReturnedEvent = function(e, t) { yi().EventStream.SendEventWithTarget(ry, ay.noEnabledMethodsReturned, { defaultType: this.defaultType, primaryReauthenticationType: e || "unknown", methodsReturned: t }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function(e) { yi().EventStream.SendEventWithTarget(ry, ay.challengeInvalidated, { defaultType: this.defaultType, reauthenticationType: e || "unknown" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeAbandonedEvent = function(e) { yi().EventStream.SendEventWithTarget(ry, ay.challengeAbandoned, { defaultType: this.defaultType, reauthenticationType: e || "unknown" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeCompletedEvent = function(e) { yi().EventStream.SendEventWithTarget(ry, ay.challengeCompleted, { defaultType: this.defaultType, reauthenticationType: e || "unknown" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendOtpResendRequestedEvent = function() { yi().EventStream.SendEventWithTarget(ry, ay.otpResendRequested, { defaultType: this.defaultType }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendReauthenticationTypeChangedEvent = function(e) { yi().EventStream.SendEventWithTarget(ry, ay.reauthenticationTypeChanged, { defaultType: this.defaultType, reauthenticationType: e || "unknown" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendCodeSubmittedEvent = function(e) { yi().EventStream.SendEventWithTarget(ry, ay.codeSubmitted, { defaultType: this.defaultType, reauthenticationType: e || "unknown" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendCodeVerificationFailedEvent = function(e, t) { yi().EventStream.SendEventWithTarget(ry, ay.codeVerificationFailed, { defaultType: this.defaultType, reauthenticationType: e || "unknown", reason: t }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendCodeVerifiedEvent = function(e) { yi().EventStream.SendEventWithTarget(ry, ay.codeVerified, { defaultType: this.defaultType, reauthenticationType: e || "unknown" }, yi().EventStream.TargetTypes.WWW) }, e }(), Ky = function() { return { hasValue: !1 } }, Yy = { of: function(e) { return null == e ? { hasValue: !1 } : { hasValue: !0, value: e } }, empty: Ky, map: function(e, t) { return e.hasValue ? Yy.of(t(e.value)) : { hasValue: !1 } }, orElse: function(e, t) { return e.hasValue ? e : Yy.of(t) } }, Jy = function() { function e(e, t, n) { void 0 === n && (n = new jd), this.defaultType = e, this.requestServiceDefault = t, this.eventTimer = n, this.solveTimeSequenceName = "Reauthentication_" + oy.solveTime } return e.prototype.fireInitializedEvent = function() { this.requestServiceDefault.metrics.recordMetric({ name: is.EventReauthentication, value: 1, labelValues: { event_type: iy.initialized, reauthentication_type: this.defaultType } }), this.eventTimer.start(this.solveTimeSequenceName) }, e.prototype.fireVerifiedEvent = function(e) { var t = this; this.requestServiceDefault.metrics.recordMetric({ name: is.EventReauthentication, value: 1, labelValues: { event_type: iy.verified, reauthentication_type: null != e ? e : "unknown" } }), Yy.map(Yy.of(this.eventTimer.end(this.solveTimeSequenceName)), (function(n) { t.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimeReauthentication, value: n, labelValues: { event_type: iy.verified, reauthentication_type: null != e ? e : "unknown" } }) })) }, e.prototype.fireInvalidatedEvent = function(e) { var t = this; this.requestServiceDefault.metrics.recordMetric({ name: is.EventReauthentication, value: 1, labelValues: { event_type: iy.invalidated, reauthentication_type: null != e ? e : "unknown" } }), Yy.map(Yy.of(this.eventTimer.end(this.solveTimeSequenceName)), (function(n) { t.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimeReauthentication, value: n, labelValues: { event_type: "" + iy.invalidated, reauthentication_type: null != e ? e : "unknown" } }) })) }, e.prototype.fireAbandonedEvent = function(e) { var t = this; this.requestServiceDefault.metrics.recordMetric({ name: is.EventReauthentication, value: 1, labelValues: { event_type: iy.abandoned, reauthentication_type: null != e ? e : "unknown" } }), Yy.map(Yy.of(this.eventTimer.end(this.solveTimeSequenceName)), (function(n) { t.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimeReauthentication, value: n, labelValues: { event_type: "" + iy.abandoned, reauthentication_type: null != e ? e : "unknown" } }) })) }, e }(), Xy = new sd, Qy = function(e) { var t = e.containerId, n = e.renderInline, r = e.defaultType, a = e.availableTypes, i = e.defaultTypeMetadata, o = e.shouldModifyBrowserHistory, l = e.onChallengeCompleted, u = e.onChallengeInvalidated, c = e.onModalChallengeAbandoned, s = document.getElementById(t); if (null !== s) { (0, ji.unmountComponentAtNode)(s); var d = new By(r), f = new Jy(r, Xy); return (0, ji.render)(Gi().createElement(qy, { renderInline: n, requestService: Xy, metricsService: f, eventService: d, defaultType: r, availableTypes: a, defaultTypeMetadata: i, shouldModifyBrowserHistory: o || !1, onChallengeCompleted: l, onChallengeInvalidated: u, onModalChallengeAbandoned: c }), s), d.sendChallengeInitializedEvent(), f.fireInitializedEvent(), !0 } return !1 }, $y = function(e) { return K_.match(e) && e.parameters.data.challengeType === av.REAUTHENTICATION && e.parameters.kind === zh.INVALIDATED && "" !== e.parameters.data.errorMessage ? e.parameters.data.errorMessage : null }, eg = "Rostile", tg = "accountSecurityChallengeRostileEvent", ng = { challengeInitialized: "challengeInitialized", challengeCompleted: "challengeCompleted", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned" }, rg = { challengeInitialized: "ChallengeInitialized", challengeCompleted: "ChallengeCompleted", challengeInvalidated: "ChallengeInvalidated", challengeAbandoned: "ChallengeAbandoned" }, ag = { challengeSolveTime: "ChallengeSolveTime" }, ig = function(e) { return new Promise((function(t) { return setTimeout((function() { return t(void 0) }), e) })) }, og = "RostileChallengeId";! function(e) { e[e.INITIAL = 0] = "INITIAL", e[e.COMPLETED_UNRESOLVED = 1] = "COMPLETED_UNRESOLVED", e[e.COMPLETED_SUCCESS = 2] = "COMPLETED_SUCCESS", e[e.COMPLETED_ERROR = 3] = "COMPLETED_ERROR" }(py || (py = {})); var lg, ug = function(e) { return e === Yl.INVALID_SESSION ? Qh.INVALID_SESSION : Qh.UNKNOWN };! function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED", e[e.SET_CHALLENGE_ABANDONED = 2] = "SET_CHALLENGE_ABANDONED", e[e.HIDE_MODAL_CHALLENGE = 3] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 4] = "SHOW_MODAL_CHALLENGE" }(lg || (lg = {})); var cg, sg = function() { return sg = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, sg.apply(this, arguments) }, dg = function(e, t) { var n = sg({}, e); switch (t.type) { case lg.SET_CHALLENGE_COMPLETED: return n.onChallengeCompletedData = t.onChallengeCompletedData, n; case lg.SET_CHALLENGE_INVALIDATED: return n.onChallengeInvalidatedData = t.onChallengeInvalidatedData, n; case lg.SET_CHALLENGE_ABANDONED: return n.isAbandoned = !0, n; case lg.HIDE_MODAL_CHALLENGE: return n.isModalVisible = !1, n; case lg.SHOW_MODAL_CHALLENGE: return n.isModalVisible = !0, n; default: return e } }, fg = (0, Fi.createContext)(null), pg = function(e) { var t = e.challengeId, n = e.puzzleType, r = e.renderInline, a = e.eventService, i = e.metricsService, o = e.requestService, l = e.translate, u = e.onChallengeDisplayed, c = e.onChallengeCompleted, s = e.onChallengeInvalidated, d = e.onModalChallengeAbandoned, f = e.children, p = (0, Fi.useState)((function() { return function(e) { return { Description: { VerificationError: e("Description.VerificationError"), VerificationSuccess: e("Description.VerificationSuccess"), VerificationPrompt: e("Description.VerificationPrompt"), VerificationHeader: e("Description.VerificationHeader"), VerificationErrorHeader: e("Description.VerificationErrorHeader"), ImAHuman: e("Description.ImAHuman"), Ok: e("Description.Ok") } } }(l) }))[0], h = (0, Fi.useState)((function() { return { challengeId: t, puzzleType: n, renderInline: r, resources: p, eventService: a, metricsService: i, requestService: o, onChallengeDisplayed: u, onModalChallengeAbandoned: d, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isAbandoned: !1, isModalVisible: !1 } }))[0], v = (0, Fi.useReducer)(dg, h), m = v[0], y = v[1]; return (0, Fi.useEffect)((function() { null !== m.onChallengeCompletedData && null === m.onChallengeInvalidatedData && (a.sendChallengeCompletedEvent(), i.fireChallengeCompletedEvent(), c(m.onChallengeCompletedData)) }), [a, i, m.onChallengeCompletedData, m.onChallengeInvalidatedData, c]), (0, Fi.useEffect)((function() { m.isAbandoned || null === m.onChallengeInvalidatedData || null !== m.onChallengeCompletedData || (a.sendChallengeInvalidatedEvent(), i.fireChallengeInvalidatedEvent(), s(m.onChallengeInvalidatedData)) }), [a, i, m.onChallengeCompletedData, m.onChallengeInvalidatedData, s, m.isAbandoned]), (0, Fi.useEffect)((function() { m.isAbandoned && null === m.onChallengeCompletedData && null === m.onChallengeInvalidatedData && (a.sendChallengeAbandonedEvent(), i.fireChallengeAbandonedEvent(), null !== d && d((function() { return y({ type: lg.SHOW_MODAL_CHALLENGE }) }))) }), [a, i, m.onChallengeCompletedData, m.onChallengeInvalidatedData, m.isAbandoned, s, d]), Gi().createElement(fg.Provider, { value: { state: m, dispatch: y } }, f) }, hg = function() { var e = (0, Fi.useContext)(fg); if (null === e) throw new Error("RostileContext was not provided in the current scope"); return e }, vg = function(e, t) { for (var n = 0, r = t.length, a = e.length; n < r; n++, a++) e[a] = t[n]; return e }, mg = function() { var e = hg().state.puzzleType, t = (0, Fi.useRef)([]); return (0, Fi.useEffect)((function() { var e, n = (e = 0, function(n) { n.timeStamp - e > 20 && (t.current = vg(vg([], t.current.slice(-99)), [{ x: n.clientX, y: n.clientY, timestamp: n.timeStamp }]), e = n.timeStamp) }); return window.addEventListener("mousemove", n), function() { window.removeEventListener("mousemove", n) } }), [e]), t }, yg = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, gg = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Eg = function(e) { var t = e.answerState, n = e.checkAnswer, r = hg(), a = r.state, i = a.isModalVisible, o = a.renderInline, l = a.resources, u = r.dispatch, c = (0, Fi.useState)(!1), s = c[0], d = c[1], f = (0, Fi.useRef)(null), p = (0, Fi.useState)(null), h = p[0], v = p[1], m = (0, Fi.useState)(null), y = m[0], g = m[1], E = mg(), b = function() { u({ type: lg.HIDE_MODAL_CHALLENGE }) }, C = function() { var e = window.matchMedia; return !!e && e("(pointer:coarse)").matches }, _ = function(e) { return yg(void 0, void 0, void 0, (function() { var t, r, a, i, o; return gg(this, (function(l) { switch (l.label) { case 0: return e.preventDefault(), t = performance.now(), r = { width: window.screen.width, height: window.screen.height }, a = { width: window.innerWidth, height: window.innerHeight }, f.current ? (i = f.current.getBoundingClientRect(), o = { x: i.x, y: i.y, width: i.width, height: i.height }, null == h || null == y ? [3, 2] : (d(!0), [4, ig(200)])) : [2]; case 1: l.sent(), n({ buttonClicked: !0, click: { x: e.clientX, y: e.clientY, timestamp: e.timeStamp, duration: e.timeStamp - y }, completionTime: t - h, mouseMovements: E.current, screenSize: r, buttonLocation: o, windowSize: a, isMobile: C() }).then((function() { return d(!1) }), (function() { return d(!1) })), l.label = 2; case 2: return [2] } })) })) }, S = function(e) { g(e.timeStamp) }; (0, Fi.useEffect)((function() { i && v(performance.now()) }), [i]); return Gi().createElement("div", { className: "rostile-visible-puzzle" }, function() { if (s) return Gi().createElement(Ed.Loading, null); switch (t) { case py.INITIAL: return Gi().createElement(Gi().Fragment, null, Gi().createElement("span", null, l.Description.VerificationPrompt), Gi().createElement("br", null), Gi().createElement("span", { ref: f }, Gi().createElement(Ed.Button, { className: "rostile-verify-button", onClick: _, onMouseDown: S }, l.Description.ImAHuman))); case py.COMPLETED_UNRESOLVED: return Gi().createElement(Ed.Loading, null); case py.COMPLETED_SUCCESS: return Gi().createElement(Gi().Fragment, null, Gi().createElement("div", { className: "icon-checkmark" }), Gi().createElement("br", null), Gi().createElement("span", null, l.Description.VerificationSuccess)); case py.COMPLETED_ERROR: return Gi().createElement(Gi().Fragment, null, Gi().createElement("span", null, l.Description.VerificationError), Gi().createElement("br", null), !o && Gi().createElement(Ed.Button, { className: "rostile-verify-button", onClick: b }, l.Description.Ok)); default: return null } }()) }, bg = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, Cg = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, _g = function() { var e = hg(), t = e.state, n = t.challengeId, r = t.puzzleType, a = t.renderInline, i = t.resources, o = t.requestService, l = t.eventService, u = t.metricsService, c = t.onChallengeDisplayed, s = t.isModalVisible, d = e.dispatch, f = (0, Fi.useState)(py.INITIAL), p = f[0], h = f[1], v = function() { d({ type: lg.HIDE_MODAL_CHALLENGE }) }, m = function() { h(py.INITIAL), d({ type: lg.SET_CHALLENGE_ABANDONED }), v() }, y = function(e, t) { return void 0 === t && (t = !1), bg(void 0, void 0, Promise, (function() { var r; return Cg(this, (function(a) { switch (a.label) { case 0: return h(py.COMPLETED_UNRESOLVED), [4, o.rostile.verifyPuzzle(n, e)]; case 1: if ((r = a.sent()).isError) { if (r.error !== Yl.INVALID_SESSION && !t) return [2, y(e, !0)]; h(py.COMPLETED_ERROR), d({ type: lg.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: ug(r.error), errorMessage: i.Description.VerificationError } }) } else h(py.COMPLETED_SUCCESS), d({ type: lg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { redemptionToken: r.value.redemptionToken } }), setTimeout((function() { return s && v() }), 2e3); return [2, void 0] } })) })) }; (0, Fi.useEffect)((function() { var e = Hu.localStorageService.getLocalStorage(og); if (n !== e) switch (Hu.localStorageService.setLocalStorage(og, n), l.sendChallengeInitializedEvent(), u.fireChallengeInitializedEvent(), r) { case $h.VISIBLE: d({ type: lg.SHOW_MODAL_CHALLENGE }), c({ displayed: !0 }); break; case $h.INVISIBLE: bg(void 0, void 0, void 0, (function() { return Cg(this, (function(e) { switch (e.label) { case 0: return [4, y({})]; case 1: return e.sent(), [2] } })) })).then((function() {}), (function() {})); break; default: d({ type: lg.SET_CHALLENGE_INVALIDATED, onChallengeInvalidatedData: { errorCode: Qh.UNKNOWN, errorMessage: i.Description.VerificationError } }), s && v() } }), [d, c, r]); var g = function() { var e = a ? Cd : Ed.Modal.Body; switch (r) { case $h.VISIBLE: return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement(Eg, { answerState: p, checkAnswer: y }))); case $h.INVISIBLE: default: return null } }; return a ? Gi().createElement(bd, { titleText: p !== py.COMPLETED_ERROR ? i.Description.VerificationHeader : i.Description.VerificationErrorHeader }, g()) : Gi().createElement(Ed.Modal, { className: "modal-modern modal-modern-challenge-rostile", show: s, onHide: p === py.COMPLETED_ERROR ? v : m, backdrop: "static" }, Gi().createElement(If, { headerText: p !== py.COMPLETED_ERROR ? i.Description.VerificationHeader : i.Description.VerificationErrorHeader, buttonType: p === py.COMPLETED_ERROR ? yf.HIDDEN : yf.CLOSE, buttonAction: m, buttonEnabled: p !== py.COMPLETED_ERROR, headerInfo: null }), g()) }, Sg = (0, dd.withTranslations)((function(e) { var t = e.challengeId, n = e.puzzleType, r = e.renderInline, a = e.eventService, i = e.metricsService, o = e.requestService, l = e.translate, u = e.onChallengeDisplayed, c = e.onChallengeCompleted, s = e.onChallengeInvalidated, d = e.onModalChallengeAbandoned; return Gi().createElement(pg, { challengeId: t, puzzleType: n, renderInline: r, eventService: a, metricsService: i, requestService: o, translate: l, onChallengeDisplayed: u, onChallengeCompleted: c, onChallengeInvalidated: s, onModalChallengeAbandoned: d }, Gi().createElement(_g, null)) }), { common: ["CommonUI.Messages"], feature: "Feature.RostileChallenge" }), Ig = function() { function e(e) { this.challengeId = e } return e.prototype.sendChallengeInitializedEvent = function() { yi().EventStream.SendEventWithTarget(tg, ng.challengeInitialized, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeCompletedEvent = function() { yi().EventStream.SendEventWithTarget(tg, ng.challengeCompleted, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function() { yi().EventStream.SendEventWithTarget(tg, ng.challengeInvalidated, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeAbandonedEvent = function() { yi().EventStream.SendEventWithTarget(tg, ng.challengeAbandoned, { challengeId: this.challengeId }, yi().EventStream.TargetTypes.WWW) }, e }(), Tg = function(e) { switch (e) { case $h.VISIBLE: return "Visible"; case $h.INVISIBLE: return "Invisible"; case $h.INVALID: default: return "Invalid" } }, Ag = function() { function e(e, t, n) { this.appType = e || "unknown", this.puzzleType = t || $h.INVALID, this.requestServiceDefault = n, this.eventTimer = new jd, this.challengeSolveTimeSequenceName = eg + "_" + ag.challengeSolveTime } return e.prototype.fireChallengeInitializedEvent = function() { this.fireEvent(rg.challengeInitialized), this.eventTimer.start(this.challengeSolveTimeSequenceName) }, e.prototype.fireChallengeCompletedEvent = function() { this.fireEvent(rg.challengeCompleted), this.fireSolveTimeEvent(rg.challengeCompleted) }, e.prototype.fireChallengeInvalidatedEvent = function() { this.fireEvent(rg.challengeInvalidated), this.fireSolveTimeEvent(rg.challengeInvalidated) }, e.prototype.fireChallengeAbandonedEvent = function() { this.fireEvent(rg.challengeAbandoned), this.fireSolveTimeEvent(rg.challengeAbandoned) }, e.prototype.fireEvent = function(e) { this.requestServiceDefault.metrics.recordMetric({ name: is.EventRostile, value: 1, labelValues: { event_type: eg + "_" + e, application_type: this.appType, puzzle_type: Tg(this.puzzleType) } }).catch((function() {})) }, e.prototype.fireSolveTimeEvent = function(e) { var t = this.eventTimer.end(this.challengeSolveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTimeRostile, value: t, labelValues: { event_type: eg + "_" + e, application_type: this.appType, puzzle_type: Tg(this.puzzleType) } }).catch((function() {})) }, e }(), Ng = new sd, wg = function(e) { var t = e.containerId, n = e.challengeId, r = e.puzzleType, a = e.appType, i = e.renderInline, o = e.onChallengeDisplayed, l = e.onChallengeCompleted, u = e.onChallengeInvalidated, c = e.onModalChallengeAbandoned, s = document.getElementById(t); if (null !== s) { (0, ji.unmountComponentAtNode)(s); var d = new Ig(n), f = new Ag(a, r, Ng); return (0, ji.render)(Gi().createElement(Sg, { challengeId: n, puzzleType: r, renderInline: i, eventService: d, metricsService: f, requestService: Ng, onChallengeDisplayed: o, onChallengeCompleted: l, onChallengeInvalidated: u, onModalChallengeAbandoned: c }), s), !0 } return !1 }, Lg = "securityQuestionsEvent", Og = { answerChoicesFailedToLoad: "answerChoicesFailedToLoad" }, kg = { initialized: "Initialized", errored: "Errored", solved: "Solved", incorrect: "Incorrect", failed: "Failed" }, Dg = function(e, t) { switch (t) { case ev.USER_WAS_FORCE_RESET: return e.Message.Error.SecurityQuestions.UserWasForceReset; case ev.SESSION_EXPIRED: return e.Message.Error.SecurityQuestions.SessionInactive; default: return e.Message.Error.Default } }, Rg = function(e, t) { return t === eu.SESSION_INACTIVE ? e.Message.Error.SecurityQuestions.SessionInactive : e.Message.Error.Default }, Pg = function(e) { return e === eu.SESSION_INACTIVE ? ev.SESSION_EXPIRED : ev.UNKNOWN };! function(e) { e[e.SET_CHALLENGE_COMPLETED = 0] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 1] = "SET_CHALLENGE_INVALIDATED", e[e.HIDE_MODAL_CHALLENGE = 2] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 3] = "SHOW_MODAL_CHALLENGE" }(cg || (cg = {})); var xg, Mg = function() { return Mg = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, Mg.apply(this, arguments) }, Vg = function(e, t) { var n = Mg({}, e); switch (t.type) { case cg.SET_CHALLENGE_COMPLETED: return n.onChallengeCompletedData = t.onChallengeCompletedData, n.isModalVisible = !1, n; case cg.SET_CHALLENGE_INVALIDATED: return n.onChallengeInvalidatedData = { errorCode: t.errorCode, errorMessage: Dg(e.resources, t.errorCode) }, n.isModalVisible = !1, n; case cg.HIDE_MODAL_CHALLENGE: return n.isModalVisible = !1, n; case cg.SHOW_MODAL_CHALLENGE: return n.isModalVisible = !0, n; default: return e } }, Ug = (0, Fi.createContext)(null), Wg = function(e) { var t = e.userId, n = e.sessionId, r = e.renderInline, a = e.eventService, i = e.metricsService, o = e.requestService, l = e.translate, u = e.onChallengeCompleted, c = e.onChallengeInvalidated, s = e.onModalChallengeAbandoned, d = e.children, f = (0, Fi.useState)((function() { return function(e) { return { Action: { Confirm: e("Action.Confirm"), Continue: e("Action.Continue"), Ok: e("Action.OK"), PickN: function(t) { return e("Action.PickN", { count: t }) }, PleaseTryAgain: e("Action.PleaseTryAgain"), Reload: e("Action.Reload"), SelectAllThatApply: e("Action.SelectAllThatApply") }, Description: { RegainAccessGeneric: function(t) { return e("Description.RegainAccessGeneric", { styledLinkText: t }) }, UnknownChoice: e("Description.UnknownChoice"), VerifyYourIdentity: e("Description.VerifyYourIdentity"), WhichGames: e("Description.WhichGames", { days: 7 }), YourPasswordHasBeenReset: e("Description.YourPasswordHasBeenReset") }, Header: { PleaseConfirmYourIdentity: e("Header.PleaseConfirmYourIdentity") }, Message: { Error: { AnswerIncorrect: e("Message.Error.AnswerIncorrect"), Default: e("Message.Error.Default"), MustPickN: e("Message.Error.MustPickN"), SecurityQuestions: { SessionInactive: e("Message.Error.SecurityQuestions.SessionInactive"), UserWasForceReset: e("Message.Error.SecurityQuestions.UserWasForceReset") } } } } }(l) }))[0], p = (0, Fi.useState)((function() { return { userId: t, sessionId: n, renderInline: r, resources: f, eventService: a, metricsService: i, requestService: o, onModalChallengeAbandoned: s, onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !0 } }))[0], h = (0, Fi.useReducer)(Vg, p), v = h[0], m = h[1]; return (0, Fi.useEffect)((function() { null !== v.onChallengeCompletedData && null === v.onChallengeInvalidatedData && u(v.onChallengeCompletedData) }), [v.onChallengeCompletedData, v.onChallengeInvalidatedData, u]), (0, Fi.useEffect)((function() { null !== v.onChallengeInvalidatedData && null === v.onChallengeCompletedData && c(v.onChallengeInvalidatedData) }), [v.onChallengeCompletedData, v.onChallengeInvalidatedData, c]), Gi().createElement(Ug.Provider, { value: { state: v, dispatch: m } }, d) }, Hg = function() { var e = (0, Fi.useContext)(Ug); if (null === e) throw new Error("SecurityQuestionsContext was not provided in the current scope"); return e }, Fg = function(e) { var t = e.setSelected, n = e.caption, r = e.imageUrl, a = e.selected, i = Hg().state.resources, o = "answer-choice-image" + (a ? " answer-choice-selected" : ""), l = n || i.Description.UnknownChoice, u = function() { return t(!a) }; return Gi().createElement("div", { className: "answer-choice" }, Gi().createElement("div", { className: o, role: "checkbox", "aria-checked": a, onClick: function(e) { u(), e.currentTarget.blur() }, onKeyDown: function(e) { "Enter" === e.key && u() }, tabIndex: 0 }, null !== r ? Gi().createElement("img", { src: r, alt: l }) : Gi().createElement("div", { className: "answer-choice-img-placeholder" }, l)), Gi().createElement("div", { className: "answer-choice-caption xsmall" }, l)) }, Gg = function() { return Gg = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, Gg.apply(this, arguments) }, jg = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, zg = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, Zg = function() { var e, t = Hg(), n = t.state, r = n.userId, a = n.sessionId, i = n.renderInline, o = n.resources, l = n.eventService, u = n.metricsService, c = n.requestService, s = n.onModalChallengeAbandoned, d = n.isModalVisible, f = t.dispatch, p = (0, Fi.useState)(), h = p[0], v = p[1], m = (0, Fi.useState)(null), y = m[0], g = m[1], E = (0, Fi.useState)(null), b = E[0], C = E[1], _ = (0, Fi.useState)(null), S = _[0], I = _[1], T = (0, Fi.useState)(!1), A = T[0], N = T[1], w = (0, Fi.useState)(null), L = w[0], O = w[1], k = (0, Fi.useState)(!1), D = k[0], R = k[1], P = (0, Fi.useState)(!1), x = P[0], M = P[1], V = function() { v(null), g(null), C(null) }, U = function() { f({ type: cg.HIDE_MODAL_CHALLENGE }), null !== s && s((function() { return f({ type: cg.SHOW_MODAL_CHALLENGE }) })) }, W = function(e) { return function(t) { var n; null !== b && void 0 !== b[e] && C(Gg(Gg({}, b), ((n = {})[e] = Gg(Gg({}, b[e]), { selected: t }), n))) } }; e = function() { return jg(void 0, void 0, void 0, (function() { var e, t, n, i, u, s, d, p, h; return zg(this, (function(m) { switch (m.label) { case 0: return I(null), [4, c.securityQuestions.getQuestion(r, a)]; case 1: return (e = m.sent()).isError ? (e.error === eu.SESSION_INACTIVE ? f({ type: cg.SET_CHALLENGE_INVALIDATED, errorCode: Pg(e.error) }) : I(Rg(o, e.error) + " " + o.Action.PleaseTryAgain), [2]) : (v(e.value.questionType), e.value.answerPrompt === nu.PICK_ALL_CORRECT_CHOICES ? g({ answerPrompt: nu.PICK_ALL_CORRECT_CHOICES }) : g({ answerPrompt: nu.PICK_C_CORRECT_CHOICES, correctAnswerChoiceCount: e.value.correctAnswerChoiceCount }), t = {}, n = e.value.answerChoices, i = new Set(n), u = new Set(n), [4, c.games.getDetailsForUniverseIds(n)]); case 2: return (s = m.sent()).isError ? (I(function(e) { return e.Message.Error.Default }(o, s.error) + " " + o.Action.PleaseTryAgain), [2]) : (d = {}, s.value.data.forEach((function(e) { d[e.id] = e.name, i.delete(e.id.toString()) })), [4, c.thumbnails.getIconsForUniverseIds(n, "256x256", Su.PNG, !1)]); case 3: return (p = m.sent()).isError ? (I(function(e) { return e.Message.Error.Default }(o, p.error) + " " + o.Action.PleaseTryAgain), [2]) : (h = {}, p.value.data.forEach((function(e) { e.state === Iu.COMPLETED && (h[e.targetId] = e.imageUrl, u.delete(e.targetId.toString())) })), n.forEach((function(e) { t[e] = { caption: d[e] || null, imageUrl: h[e] || null, selected: !1 } })), C(t), (i.size > 0 || u.size > 0) && l.sendAnswerChoicesFailedToLoadEvent(Array.from(i), Array.from(u)), [2]) } })) })) }, (0, Fi.useEffect)((function() { return e(), function() { V() } }), []); var H = null !== b ? Object.entries(b).filter((function(e) { return e[1].selected })).length : 0, F = null !== y && (y.answerPrompt === nu.PICK_ALL_CORRECT_CHOICES || y.correctAnswerChoiceCount === H), G = { content: A ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : o.Action.Confirm, label: o.Action.Confirm, enabled: !A && F, action: function() { return jg(void 0, void 0, void 0, (function() { var t, n; return zg(this, (function(i) { switch (i.label) { case 0: return null === b ? [2] : (t = Object.entries(b).filter((function(e) { return e[1].selected })).map((function(e) { return e[0] })), N(!0), [4, c.securityQuestions.answerQuestion(r, t, a)]); case 1: return (n = i.sent()).isError ? n.error === eu.SESSION_INACTIVE ? (f({ type: cg.SET_CHALLENGE_INVALIDATED, errorCode: Pg(n.error) }), [2]) : (u.fireErroredEvent(), O(Rg(o, n.error) + " " + o.Action.PleaseTryAgain), N(!1), [2]) : (O(null), n.value.answerCorrect ? (u.fireSolvedEvent(), f({ type: cg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { redemptionToken: n.value.redemptionToken } }), [3, 6]) : [3, 2]); case 2: return n.value.shouldRequestNewQuestion ? (u.fireIncorrectEvent(), V(), [4, ig(250)]) : [3, 5]; case 3: return i.sent(), R(!0), [4, e()]; case 4: return i.sent(), N(!1), [3, 6]; case 5: n.value.userWasForceReset ? (u.fireFailedEvent(), M(!0)) : (u.fireErroredEvent(), u.fireFailedEvent(), f({ type: cg.SET_CHALLENGE_INVALIDATED, errorCode: ev.UNKNOWN })), i.label = 6; case 6: return [2] } })) })) } }, j = { content: o.Action.Reload, label: o.Action.Reload, enabled: null !== S, action: e }, z = { content: o.Action.Continue, label: o.Action.Continue, enabled: !0, action: function() { window.location.href = mi.Endpoints.getAbsoluteUrl("/login/securityNotification") } }, Z = function() { var e = i ? Cd : Ed.Modal.Body, t = i ? bf : Cf, n = i ? "inline-challenge-lock-icon" : "modal-lock-icon", r = i ? "inline-challenge-margin-bottom-sm" : "modal-margin-bottom-sm", a = i ? "inline-challenge-margin-bottom" : "modal-margin-bottom", l = i ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge"; if (x) return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement("div", { className: n }), Gi().createElement("p", { className: a + " font-bold" }, o.Description.YourPasswordHasBeenReset), Gi().createElement("p", { dangerouslySetInnerHTML: { __html: o.Description.RegainAccessGeneric('' + o.Action.Continue + "") } })), Gi().createElement(t, { positiveButton: z, negativeButton: null })); if (null !== S) return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement("p", null, S)), Gi().createElement(t, { positiveButton: j, negativeButton: null })); if (null === h || null === y || null === b) return Gi().createElement(e, null, Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin modal-margin-bottom-large" })); var u = Object.keys(b).length % 3 == 1; return Gi().createElement(Gi().Fragment, null, Gi().createElement(e, null, Gi().createElement("div", { className: n }), Gi().createElement("p", { className: r }, o.Description.WhichGames), Gi().createElement("p", { className: l + " font-bold" }, y.answerPrompt === nu.PICK_ALL_CORRECT_CHOICES ? o.Action.SelectAllThatApply : o.Action.PickN(y.correctAnswerChoiceCount)), Gi().createElement("p", { className: (D ? r : l) + " small" }, o.Description.VerifyYourIdentity), D && Gi().createElement("p", { className: l + " text-error" }, o.Message.Error.AnswerIncorrect, " ", o.Action.PleaseTryAgain), Gi().createElement("div", { className: l + " answer-choice-area" }, Object.keys(b).map((function(e, t) { return Gi().createElement(Gi().Fragment, { key: e }, Gi().createElement(Fg, Gg({ key: e, setSelected: W(e) }, b[e])), u && t === Object.keys(b).length - 3 ? Gi().createElement("br", null) : null) }))), Gi().createElement("p", { className: "text-error xsmall" }, L)), Gi().createElement(t, { positiveButton: G, negativeButton: null })) }; return i ? Gi().createElement(bd, { titleText: o.Header.PleaseConfirmYourIdentity }, Z()) : Gi().createElement(Ed.Modal, { className: "modal-modern", show: d, onHide: U, backdrop: "static" }, Gi().createElement(If, { headerText: o.Header.PleaseConfirmYourIdentity, buttonType: x ? yf.HIDDEN : yf.CLOSE, buttonAction: U, buttonEnabled: !A, headerInfo: null }), Z()) }, qg = (0, dd.withTranslations)((function(e) { var t = e.userId, n = e.sessionId, r = e.renderInline, a = e.eventService, i = e.metricsService, o = e.requestService, l = e.translate, u = e.onChallengeCompleted, c = e.onChallengeInvalidated, s = e.onModalChallengeAbandoned; return Gi().createElement(Wg, { userId: t, sessionId: n, renderInline: r, eventService: a, metricsService: i, requestService: o, translate: l, onChallengeCompleted: u, onChallengeInvalidated: c, onModalChallengeAbandoned: s }, Gi().createElement(Zg, null)) }), { common: ["CommonUI.Messages"], feature: "Feature.SecurityQuestions" }), Bg = function() { function e(e) { this.sessionId = e } return e.prototype.sendAnswerChoicesFailedToLoadEvent = function(e, t) { yi().EventStream.SendEventWithTarget(Lg, Og.answerChoicesFailedToLoad, { sessionId: this.sessionId, answerChoicesWithNoCaption: JSON.stringify(e), answerChoicesWithNoIcon: JSON.stringify(t) }, yi().EventStream.TargetTypes.WWW) }, e }(), Kg = function() { function e(e) { var t = e.appType, n = e.requestServiceDefault; this.appType = t || "unknown", this.requestServiceDefault = n } return e.prototype.fireInitializedEvent = function() { this.requestServiceDefault.metrics.recordMetric({ name: is.EventSecurityQuestion, value: 1, labelValues: { event_type: kg.initialized, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireErroredEvent = function() { this.requestServiceDefault.metrics.recordMetric({ name: is.EventSecurityQuestion, value: 1, labelValues: { event_type: kg.errored, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireSolvedEvent = function() { this.requestServiceDefault.metrics.recordMetric({ name: is.EventSecurityQuestion, value: 1, labelValues: { event_type: kg.solved, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireIncorrectEvent = function() { this.requestServiceDefault.metrics.recordMetric({ name: is.EventSecurityQuestion, value: 1, labelValues: { event_type: kg.incorrect, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireFailedEvent = function() { this.requestServiceDefault.metrics.recordMetric({ name: is.EventSecurityQuestion, value: 1, labelValues: { event_type: kg.failed, application_type: this.appType } }).catch((function() {})) }, e }(), Yg = new sd, Jg = function(e) { var t = e.containerId, n = e.userId, r = e.sessionId, a = e.appType, i = e.renderInline, o = e.onChallengeCompleted, l = e.onChallengeInvalidated, u = e.onModalChallengeAbandoned; n = n.toString(); var c = document.getElementById(t); if (null !== c) { (0, ji.unmountComponentAtNode)(c); var s = new Bg(r), d = new Kg({ appType: a, requestServiceDefault: Yg }); return (0, ji.render)(Gi().createElement(qg, { userId: n, sessionId: r, renderInline: i, eventService: s, metricsService: d, requestService: Yg, onChallengeCompleted: o, onChallengeInvalidated: l, onModalChallengeAbandoned: u }), c), d.fireInitializedEvent(), !0 } return !1 }, Xg = "TwoStepVerification", Qg = 100, $g = "accountSecurityChallengeTwoStepVerificationEvent", eE = { challengeInitialized: "challengeInitialized", userConfigurationLoaded: "userConfigurationLoaded", challengeInvalidated: "challengeInvalidated", challengeAbandoned: "challengeAbandoned", emailResendRequested: "emailResendRequested", smsResendRequested: "smsResendRequested", mediaTypeChanged: "mediaTypeChanged", codeSubmitted: "codeSubmitted", codeVerificationFailed: "codeVerificationFailed", codeVerified: "codeVerified", noEnabledMethodsReturned: "noEnabledMethodsReturned", tryToSwitchMediaType: "switchMediaType" }, tE = { initialized: "Initialized", verified: "Verified", invalidated: "Invalidated", abandoned: "Abandoned" }, nE = { solveTime: "SolveTime" }, rE = function(e, t) { switch (t) { case Vu.FEATURE_DISABLED: return e.Response.FeatureNotAvailable; case Vu.INVALID_CODE: return e.Response.InvalidCode; case Vu.TOO_MANY_REQUESTS: return e.Response.TooManyAttempts; case Vu.INVALID_CHALLENGE_ID: return e.Response.SessionExpired; case Vu.AUTHENTICATOR_CODE_ALREADY_USED: return e.Response.AuthenticatorCodeAlreadyUsed; case Vu.INVALID_PASSWORD: return e.Response.InvalidPassword; default: return e.Response.DefaultError } }, aE = function(e) { return e === Vu.INVALID_CHALLENGE_ID ? rv.SESSION_EXPIRED : rv.UNKNOWN }, iE = function() { var e = (0, ly.useLocation)(), t = (0, ly.matchPath)(e.pathname, { path: "/:activeMediaType", exact: !0, strict: !1 }); return (null == t ? void 0 : t.params) ? null == t ? void 0 : t.params.activeMediaType : null }, oE = function(e) { return "/" + (e || "") };! function(e) { e[e.SET_METADATA = 0] = "SET_METADATA", e[e.SET_USER_CONFIGURATION = 1] = "SET_USER_CONFIGURATION", e[e.SET_CHALLENGE_COMPLETED = 2] = "SET_CHALLENGE_COMPLETED", e[e.SET_CHALLENGE_INVALIDATED = 3] = "SET_CHALLENGE_INVALIDATED", e[e.HIDE_MODAL_CHALLENGE = 4] = "HIDE_MODAL_CHALLENGE", e[e.SHOW_MODAL_CHALLENGE = 5] = "SHOW_MODAL_CHALLENGE" }(xg || (xg = {})); var lE, uE, cE = function() { return cE = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, cE.apply(this, arguments) }, sE = function(e, t) { var n, r, a = cE({}, e); switch (t.type) { case xg.SET_METADATA: return a.metadata = t.metadata, a; case xg.SET_USER_CONFIGURATION: return a.userConfiguration = t.userConfiguration, a.enabledMediaTypes = t.enabledMediaTypes, a; case xg.SET_CHALLENGE_COMPLETED: return a.onChallengeCompletedData = t.onChallengeCompletedData, a.isModalVisible = !1, a; case xg.SET_CHALLENGE_INVALIDATED: return a.onChallengeInvalidatedData = { errorCode: t.errorCode, errorMessage: (n = e.resources, r = t.errorCode, r === rv.SESSION_EXPIRED ? n.Response.SessionExpired : n.Response.DefaultError) }, a.isModalVisible = !1, a; case xg.HIDE_MODAL_CHALLENGE: return a.isModalVisible = !1, a; case xg.SHOW_MODAL_CHALLENGE: return a.isModalVisible = !0, a; default: return e } }, dE = (0, Fi.createContext)(null), fE = function(e) { var t = e.userId, n = e.challengeId, r = e.actionType, a = e.renderInline, i = e.shouldShowRememberDeviceCheckbox, o = e.eventService, l = e.metricsService, u = e.requestService, c = e.translate, s = e.onChallengeCompleted, d = e.onChallengeInvalidated, f = e.onModalChallengeAbandoned, p = e.children, h = (0, Fi.useState)((function() { return function(e) { return { Action: { ChangeMediaType: e("Action.ChangeMediaType"), Okay: e("Action.Okay"), Reload: e("Action.Reload"), Resend: e("Action.Resend"), Retry: e("Action.Retry"), Verify: e("Action.Verify") }, Description: { Denied: e("Description.Denied"), Expired: e("Description.Expired"), LoginDenied: e("Description.LoginDenied"), LoginExpired: e("Description.LoginExpired"), SecurityWarningShort: e("Description.SecurityWarningShort", { boldStart: "", boldEnd: "" }), SecurityWarningShortBackupCodes: e("Description.SecurityWarningShortBackupCodes", { boldStart: "", boldEnd: "" }) }, Heading: { LoginDenied: e("Heading.LoginDenied"), LoginError: e("Heading.LoginError") }, Label: { ApproveWithDevice: e("Label.ApproveWithDevice"), AuthenticatorMediaType: e("Label.AuthenticatorMediaType"), CrossDeviceMediaType: e("Label.UseYourDevice"), ChooseAlternateMediaType: e("Label.ChooseAlternateMediaType"), CharacterCodeInputPlaceholderText: function(t) { return e("Label.CharacterCodeInputPlaceholderText", { codeLength: t }) }, CodeInputPlaceholderText: function(t) { return e("Label.CodeInputPlaceholderText", { codeLength: t }) }, EmailMediaType: e("Label.EmailMediaType"), EnterAuthenticatorCode: e("Label.EnterAuthenticatorCode"), EnterEmailCode: e("Label.EnterEmailCode"), EnterPassword: e("Label.EnterPassword"), EnterRecoveryCode: e("Label.EnterRecoveryCode"), EnterTextCode: e("Label.EnterTextCode"), LearnMore: e("Label.LearnMore"), HelpCenter: e("Label.HelpCenter"), HelpCenterLink: function(t) { return e("Label.HelpCenterLink", { helpCenterLink: t }) }, NeedHelpContactSupport: function(t) { return e("Label.NeedHelpContactSupport", { supportLink: t }) }, NewLogin: e("Label.NewLogin"), PasskeyDirections: e("Label.PasskeyDirections"), PasskeyMediaType: e("Label.PasskeyMediaType"), PasswordMediaType: e("Label.Password"), PasswordPlaceholder: e("Label.PasswordPlaceholder"), RecoveryCodeMediaType: e("Label.RecoveryCodeMediaType"), RobloxSupport: e("Label.RobloxSupport"), SecurityKeyDirections: e("Label.SecurityKeyDirections"), SecurityKeyMediaType: e("Label.SecurityKeyMediaType"), SmsMediaType: e("Label.SmsMediaType"), TrustThisDevice: e("Label.TrustThisDevice"), TwoStepVerification: e("Label.TwoStepVerification"), VerifyWithPasskey: e("Label.VerifyWithPasskey"), VerifyWithSecurityKey: e("Label.VerifyWithSecurityKey") }, Response: { AuthenticatorCodeAlreadyUsed: e("Response.AuthenticatorCodeAlreadyUsed"), CodeSent: e("Response.CodeSent"), DefaultError: e("Response.DefaultError"), FeatureNotAvailable: e("Response.FeatureNotAvailable"), InvalidCode: e("Response.InvalidCode"), InvalidPassword: e("Response.InvalidPassword"), SessionExpired: e("Response.SessionExpired"), SystemErrorSwitchingToEmail: e("Response.SystemErrorSwitchingToEmail"), TooManyAttempts: e("Response.TooManyAttempts"), VerificationError: e("Response.VerificationError") } } }(c) }))[0], v = (0, Fi.useState)((function() { return { userId: t, challengeId: n, actionType: r, renderInline: a, shouldShowRememberDeviceCheckbox: i, resources: h, eventService: o, metricsService: l, requestService: u, onModalChallengeAbandoned: f, metadata: null, userConfiguration: null, enabledMediaTypes: [], onChallengeCompletedData: null, onChallengeInvalidatedData: null, isModalVisible: !0 } }))[0], m = iE(), y = (0, Fi.useReducer)(sE, v), g = y[0], E = y[1]; return (0, Fi.useEffect)((function() { if (null !== g.onChallengeCompletedData && null === g.onChallengeInvalidatedData) { var e = g.onChallengeCompletedData; setTimeout((function() { return s(e) }), Qg) } }), [g.onChallengeCompletedData, g.onChallengeInvalidatedData, s]), (0, Fi.useEffect)((function() { if (null !== g.onChallengeInvalidatedData && null === g.onChallengeCompletedData) { o.sendChallengeInvalidatedEvent(m, r), l.fireInvalidatedEvent(); var e = g.onChallengeInvalidatedData; setTimeout((function() { return d(e) }), Qg) } }), [g.onChallengeCompletedData, g.onChallengeInvalidatedData, d, o, l, m]), (0, Fi.useEffect)((function() { null !== m && o.sendMediaTypeChangedEvent(m, r) }), [o, m]), Gi().createElement(dE.Provider, { value: { state: g, dispatch: E } }, p) }, pE = function() { var e = (0, Fi.useContext)(dE); if (null === e) throw new Error("TwoStepVerificationContext was not provided in the current scope"); return e }, hE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, vE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, mE = function(e) { var t = e.hasSentEmailCode, n = e.setHasSentEmailCode, r = e.hasSentSmsCode, a = e.setHasSentSmsCode, i = e.requestInFlight, o = e.setRequestInFlight, l = e.setModalTitleText, u = e.children, c = pE(), s = c.state, d = s.userId, f = s.challengeId, p = s.actionType, h = s.renderInline, v = s.resources, m = s.requestService, y = s.enabledMediaTypes, g = c.dispatch, E = (0, ly.useHistory)(), b = (0, Fi.useState)(null), C = b[0], _ = b[1], S = function(e) { switch (e) { case nv.Authenticator: return "icon-menu-mobile"; case nv.Email: return "icon-menu-email"; case nv.RecoveryCode: return "icon-menu-recover"; case nv.SMS: return "icon-menu-mobile"; case nv.SecurityKey: return "icon-menu-usb"; case nv.CrossDevice: return "icon-menu-mobile"; case nv.Passkey: return "icon-menu-fingerprint"; case nv.Password: return "icon-status-private"; default: return "icon-brokenpage" } }, I = function(e, l) { var u = function(e) { switch (e) { case nv.Authenticator: return v.Label.AuthenticatorMediaType; case nv.Email: return v.Label.EmailMediaType; case nv.RecoveryCode: return v.Label.RecoveryCodeMediaType; case nv.SMS: return v.Label.SmsMediaType; case nv.SecurityKey: return v.Label.SecurityKeyMediaType; case nv.CrossDevice: return v.Label.CrossDeviceMediaType; case nv.Passkey: return v.Label.PasskeyMediaType; case nv.Password: return v.Label.PasswordMediaType; default: return null } }(e); return u ? Gi().createElement("tr", { key: l, onClick: i ? void 0 : function() { return function(e) { return hE(void 0, void 0, void 0, (function() { var l; return vE(this, (function(u) { switch (u.label) { case 0: return i ? [2] : e !== nv.CrossDevice && y.includes(nv.CrossDevice) ? [4, m.twoStepVerification.retractCrossDevice(d, { challengeId: f, actionType: p })] : [3, 2]; case 1: u.sent(), u.label = 2; case 2: return e !== nv.Email || t ? [3, 4] : (o(!0), [4, m.twoStepVerification.sendEmailCode(d, { challengeId: f, actionType: p })]); case 3: if (l = u.sent(), o(!1), l.isError) return l.error === Vu.INVALID_USER_ID || l.error === Vu.INVALID_CHALLENGE_ID ? g({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(l.error) }) : _(rE(v, l.error)), [2]; n(!0), u.label = 4; case 4: return e !== nv.SMS || r ? [3, 6] : (o(!0), [4, m.twoStepVerification.sendSmsCode(d, { challengeId: f, actionType: p })]); case 5: if (l = u.sent(), o(!1), l.isError) return l.error === Vu.INVALID_USER_ID || l.error === Vu.INVALID_CHALLENGE_ID ? g({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(l.error) }) : _(rE(v, l.error)), [2]; a(!0), u.label = 6; case 6: return e !== nv.CrossDevice ? [3, 8] : (o(!0), [4, m.twoStepVerification.retryCrossDevice(d, { challengeId: f, actionType: p })]); case 7: if (l = u.sent(), o(!1), l.isError) { if (l.error === Vu.INVALID_USER_ID || l.error === Vu.INVALID_CHALLENGE_ID) return g({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(l.error) }), [2]; _(rE(v, l.error)) } u.label = 8; case 8: return E.push(oE(e)), [2] } })) })) }(e) }, className: i ? "media-type-row disabled" : "media-type-row" }, Gi().createElement("td", null, Gi().createElement("span", { className: S(e) })), Gi().createElement("td", { className: "media-type-label" }, u), Gi().createElement("td", { className: "media-type-selector" }, Gi().createElement("span", { className: "icon-next" }), Gi().createElement("div", { className: "icon-placeholder" }))) : null }; l(v.Label.TwoStepVerification); var T = h ? Cd : Ed.Modal.Body, A = h ? "inline-challenge-lock-icon" : "modal-lock-icon", N = h ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge", w = h ? "" : "modal-margin-bottom-large", L = h ? "inline-challenge-margin-top-large" : "modal-margin-bottom-large"; return Gi().createElement(T, null, Gi().createElement("div", { className: A }), Gi().createElement("p", { className: N }, v.Label.ChooseAlternateMediaType), Gi().createElement("table", { className: "table table-striped media-type-list " + w }, Gi().createElement("tbody", null, y.map((function(e, t) { return I(e, t) })))), C ? Gi().createElement("p", { className: "text-error xsmall " + L }, C) : null, u) }, yE = function(e) { var t = e.requestInFlight, n = e.originalMediaType, r = e.actionType, a = e.className, i = pE().state, o = i.renderInline, l = i.eventService, u = i.resources, c = (0, ly.useHistory)(), s = o ? "inline-challenge-body-button-link" : "modal-body-button-link"; return Gi().createElement("p", { className: a }, Gi().createElement("button", { type: "button", className: s + " small", onClick: function() { l.sendTryToSwitchMediaTypeEvent(n, r), c.push(oE(null)) }, disabled: t }, u.Action.ChangeMediaType)) }, gE = function(e) { var t = e.disabled, n = e.rememberDevice, r = e.setRememberDevice, a = e.className, i = pE().state.resources; return Gi().createElement("p", { className: a }, Gi().createElement("input", { id: "remember-device", type: "checkbox", onChange: function(e) { r(e.target.checked) }, checked: n, disabled: t, tabIndex: 0 }), " ", Gi().createElement("label", { htmlFor: "remember-device" }, i.Label.TrustThisDevice)) }, EE = function(e) { var t = e.className, n = pE().state.resources, r = n.Label.NeedHelpContactSupport('' + n.Label.RobloxSupport + ""); return Gi().createElement("p", { className: "text-footer" + (t ? " " + t : ""), dangerouslySetInnerHTML: { __html: r } }) }, bE = /^[0-9]*$/, CE = /^[A-Za-z0-9]*$/, _E = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, SE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, IE = function(e) { var t = e.requestInFlight, n = e.setRequestInFlight, r = e.children, a = pE(), i = a.state, o = i.userId, l = i.challengeId, u = i.actionType, c = i.renderInline, s = i.shouldShowRememberDeviceCheckbox, d = i.metadata, f = i.resources, p = i.eventService, h = i.metricsService, v = i.requestService, m = a.dispatch, y = iE(), g = (0, Fi.useState)(""), E = g[0], b = g[1], C = (0, Fi.useState)(null), _ = C[0], S = C[1], I = (0, Fi.useState)(null), T = I[0], A = I[1], N = (0, Fi.useState)(!1), w = N[0], L = N[1], O = function() { return _E(void 0, void 0, void 0, (function() { var e; return SE(this, (function(t) { switch (t.label) { case 0: return n(!0), A(null), p.sendCodeSubmittedEvent(y, u), [4, v.twoStepVerification.verifyAuthenticatorCode(o, { challengeId: l, actionType: u, code: E })]; case 1: return (e = t.sent()).isError ? (p.sendCodeVerificationFailedEvent(y, u, Vu[e.error || Vu.UNKNOWN]), e.error === Vu.INVALID_USER_ID || e.error === Vu.INVALID_CHALLENGE_ID ? (m({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e.error) }), [2]) : (n(!1), A(rE(f, e.error)), [2])) : (p.sendCodeVerifiedEvent(y, u), h.fireVerifiedEvent(y), m({ type: xg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { verificationToken: e.value.verificationToken, rememberDevice: w } }), [2]) } })) })) }, k = null === _ && E.length === (null == d ? void 0 : d.authenticatorCodeLength), D = { content: t ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : f.Action.Verify, label: f.Action.Verify, enabled: !t && k, action: O }, R = c ? Cd : Ed.Modal.Body, P = c ? bf : Cf, x = c ? "inline-challenge-lock-icon" : "modal-lock-icon", M = c ? "inline-challenge-margin-bottom" : "modal-margin-bottom", V = c ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge"; return d && Gi().createElement(Gi().Fragment, null, Gi().createElement(R, null, Gi().createElement("div", { className: x }), Gi().createElement("p", { className: V }, f.Label.EnterAuthenticatorCode), Gi().createElement(wy, { id: "two-step-verification-code-input", inputType: "text", disabled: t, value: E, setValue: b, error: T || _, setError: S, validate: Ay, canSubmit: k, handleSubmit: O, onChange: function() { return A(null) }, inputMode: "numeric", autoComplete: "off", placeholder: f.Label.CodeInputPlaceholderText(d.authenticatorCodeLength), maxLength: d.authenticatorCodeLength, validCharactersRegEx: bE, hideFeedback: !0, concealInput: !0, autoFocus: !0 }), s && Gi().createElement(gE, { disabled: t, rememberDevice: w, setRememberDevice: L, className: V }), r), Gi().createElement(P, { positiveButton: D, negativeButton: null }, Gi().createElement(EE, { className: M }), Gi().createElement("p", { className: "text-footer" }, f.Description.SecurityWarningShort))) }, TE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, AE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, NE = function(e) { var t = e.disabled, n = e.setCodeError, r = e.mediaType, a = e.className, i = pE(), o = i.state, l = o.userId, u = o.challengeId, c = o.actionType, s = o.renderInline, d = o.resources, f = o.eventService, p = o.requestService, h = i.dispatch, v = (0, Fi.useState)(!1), m = v[0], y = v[1]; if (m) return Gi().createElement("p", { className: a }, Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" })); var g = s ? "inline-challenge-body-button-link" : "modal-body-button-link"; return Gi().createElement("p", { className: a }, Gi().createElement("button", { type: "button", className: g + " small", onClick: function() { return TE(void 0, void 0, void 0, (function() { var e, t, a; return AE(this, (function(i) { switch (i.label) { case 0: return e = null, y(!0), r !== nv.Email ? [3, 2] : (f.sendEmailResendRequestedEvent(), [4, p.twoStepVerification.sendEmailCode(l, { challengeId: u, actionType: c })]); case 1: return (t = i.sent()).isError && (e = t.error), [3, 4]; case 2: return r !== nv.SMS ? [3, 4] : (f.sendSmsResendRequestedEvent(), [4, p.twoStepVerification.sendSmsCode(l, { challengeId: u, actionType: c })]); case 3: (a = i.sent()).isError && (e = a.error), i.label = 4; case 4: return y(!1), null != e && (e === Vu.INVALID_USER_ID || e === Vu.INVALID_CHALLENGE_ID ? h({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e) }) : n(rE(d, e))), [2] } })) })) }, disabled: t || m }, d.Action.Resend)) }, wE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, LE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, OE = function(e) { var t = e.requestInFlight, n = e.setRequestInFlight, r = e.children, a = pE(), i = a.state, o = i.userId, l = i.challengeId, u = i.actionType, c = i.renderInline, s = i.shouldShowRememberDeviceCheckbox, d = i.resources, f = i.metadata, p = i.eventService, h = i.metricsService, v = i.requestService, m = a.dispatch, y = iE(), g = (0, Fi.useState)(""), E = g[0], b = g[1], C = (0, Fi.useState)(null), _ = C[0], S = C[1], I = (0, Fi.useState)(null), T = I[0], A = I[1], N = (0, Fi.useState)(!1), w = N[0], L = N[1], O = function() { return wE(void 0, void 0, void 0, (function() { var e; return LE(this, (function(t) { switch (t.label) { case 0: return n(!0), A(null), p.sendCodeSubmittedEvent(y, u), [4, v.twoStepVerification.verifyEmailCode(o, { challengeId: l, actionType: u, code: E })]; case 1: return (e = t.sent()).isError ? (p.sendCodeVerificationFailedEvent(y, u, Vu[e.error || Vu.UNKNOWN]), e.error === Vu.INVALID_USER_ID || e.error === Vu.INVALID_CHALLENGE_ID ? (m({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e.error) }), [2]) : (n(!1), A(rE(d, e.error)), [2])) : (p.sendCodeVerifiedEvent(y, u), h.fireVerifiedEvent(y), m({ type: xg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { verificationToken: e.value.verificationToken, rememberDevice: w } }), [2]) } })) })) }, k = null === _ && E.length === (null == f ? void 0 : f.emailCodeLength), D = { content: t ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : d.Action.Verify, label: d.Action.Verify, enabled: !t && k, action: O }, R = c ? Cd : Ed.Modal.Body, P = c ? bf : Cf, x = c ? "inline-challenge-lock-icon" : "modal-lock-icon", M = c ? "inline-challenge-margin-bottom" : "modal-margin-bottom", V = c ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge"; return f && Gi().createElement(Gi().Fragment, null, Gi().createElement(R, null, Gi().createElement("div", { className: x }), Gi().createElement("p", { className: V }, d.Label.EnterEmailCode), Gi().createElement(wy, { id: "two-step-verification-code-input", inputType: "text", disabled: t, value: E, setValue: b, error: T || _, setError: S, validate: Ay, canSubmit: k, handleSubmit: O, onChange: function() { return A(null) }, inputMode: "numeric", autoComplete: "off", placeholder: d.Label.CodeInputPlaceholderText(f.emailCodeLength), maxLength: f.emailCodeLength, validCharactersRegEx: bE, hideFeedback: !0, concealInput: !0, autoFocus: !0 }), s && Gi().createElement(gE, { disabled: t, rememberDevice: w, setRememberDevice: L, className: V }), Gi().createElement(NE, { disabled: t, setCodeError: S, mediaType: y }), r), Gi().createElement(P, { positiveButton: D, negativeButton: null }, Gi().createElement(EE, { className: M }), Gi().createElement("p", { className: "text-footer" }, d.Description.SecurityWarningShort))) }, kE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, DE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, RE = function(e) { var t = e.requestInFlight, n = e.setRequestInFlight, r = e.children, a = pE(), i = a.state, o = i.userId, l = i.challengeId, u = i.actionType, c = i.renderInline, s = i.shouldShowRememberDeviceCheckbox, d = i.resources, f = i.eventService, p = i.metricsService, h = i.requestService, v = a.dispatch, m = iE(), y = (0, Fi.useState)(""), g = y[0], E = y[1], b = (0, Fi.useState)(null), C = b[0], _ = b[1], S = (0, Fi.useState)(null), I = S[0], T = S[1], A = (0, Fi.useState)(!1), N = A[0], w = A[1], L = function() { return kE(void 0, void 0, void 0, (function() { var e; return DE(this, (function(t) { switch (t.label) { case 0: return n(!0), T(null), f.sendCodeSubmittedEvent(m, u), [4, h.twoStepVerification.verifyRecoveryCode(o, { challengeId: l, actionType: u, code: g })]; case 1: return (e = t.sent()).isError ? (f.sendCodeVerificationFailedEvent(m, u, Vu[e.error || Vu.UNKNOWN]), e.error === Vu.INVALID_USER_ID || e.error === Vu.INVALID_CHALLENGE_ID ? (v({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e.error) }), [2]) : (n(!1), T(rE(d, e.error)), [2])) : (f.sendCodeVerifiedEvent(m, u), p.fireVerifiedEvent(m), v({ type: xg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { verificationToken: e.value.verificationToken, rememberDevice: N } }), [2]) } })) })) }, O = null === C && 9 === g.length, k = { content: t ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : d.Action.Verify, label: d.Action.Verify, enabled: !t && O, action: L }, D = c ? Cd : Ed.Modal.Body, R = c ? bf : Cf, P = c ? "inline-challenge-lock-icon" : "modal-lock-icon", x = c ? "inline-challenge-margin-bottom" : "modal-margin-bottom", M = c ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge"; return Gi().createElement(Gi().Fragment, null, Gi().createElement(D, null, Gi().createElement("div", { className: P }), Gi().createElement("p", { className: M }, d.Label.EnterRecoveryCode), Gi().createElement(wy, { id: "two-step-verification-code-input", inputType: "text", disabled: t, value: g, setValue: E, error: I || C, setError: _, validate: Ay, canSubmit: O, handleSubmit: L, onChange: function() { return T(null) }, autoComplete: "off", placeholder: d.Label.CodeInputPlaceholderText(9), maxLength: 9, validCharactersRegEx: CE, hideFeedback: !0, concealInput: !0, autoFocus: !0 }), s && Gi().createElement(gE, { disabled: t, rememberDevice: N, setRememberDevice: w, className: M }), r), Gi().createElement(R, { positiveButton: k, negativeButton: null }, Gi().createElement(EE, { className: x }), Gi().createElement("p", { className: "text-footer" }, d.Description.SecurityWarningShortBackupCodes))) }, PE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, xE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, ME = function(e) { var t = e.requestInFlight, n = e.setRequestInFlight, r = e.children, a = pE(), i = a.state, o = i.userId, l = i.challengeId, u = i.actionType, c = i.renderInline, s = i.shouldShowRememberDeviceCheckbox, d = i.resources, f = i.metadata, p = i.eventService, h = i.metricsService, v = i.requestService, m = a.dispatch, y = iE(), g = (0, Fi.useState)(null), E = g[0], b = g[1], C = (0, Fi.useState)(!1), _ = C[0], S = C[1], I = function(e, t) { t && p.sendCodeVerificationFailedEvent(y, u, Vu[e || Vu.UNKNOWN]), e !== Vu.INVALID_USER_ID && e !== Vu.INVALID_CHALLENGE_ID ? (n(!1), b(rE(d, e))) : m({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e) }) }, T = c ? Cd : Ed.Modal.Body, A = c ? "inline-challenge-lock-icon" : "modal-lock-icon", N = c ? "inline-challenge-margin-bottom" : "modal-margin-bottom", w = c ? "inline-challenge-action-button" : "modal-action-button"; w = (w = w.concat(" ", "btn-cta-md")).concat(" ", N); var L = (c ? "inline-margin-bottom-xlarge" : "modal-margin-bottom-xlarge").concat(" ", "text-error xsmall"), O = c ? "inline-challenge-margin-bottom-sm" : "modal-margin-bottom-sm"; return f && Gi().createElement(Gi().Fragment, null, Gi().createElement(T, null, Gi().createElement("div", { className: A }), Gi().createElement("p", { className: O }, d.Label.VerifyWithSecurityKey), Gi().createElement("p", { className: N }, d.Label.SecurityKeyDirections), Gi().createElement("button", { type: "button", className: w, "aria-label": d.Action.Verify, disabled: t, onClick: function() { return PE(void 0, void 0, void 0, (function() { var e, t, r, a, i, c, s; return xE(this, (function(d) { switch (d.label) { case 0: return n(!0), b(null), [4, v.twoStepVerification.getSecurityKeyOptions(o, { challengeId: l, actionType: u })]; case 1: return (e = d.sent()).isError ? (I(e.error, !0), [2]) : (t = !(mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp && (0, mi.DeviceMeta)().isAndroidApp), (r = t ? Hu.fido2Util.convertPublicKeyParametersToStandardBase64(e.value.authenticationOptions) : JSON.parse(e.value.authenticationOptions)).publicKey ? (a = "", mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp ? [4, Hu.hybridResponseService.getNativeResponse(Hu.hybridResponseService.FeatureTarget.GET_CREDENTIALS, { authenticationOptionsJSON: JSON.stringify(r) }, 3e5).catch((function() { I(Vu.UNKNOWN, !1) }))] : [3, 3]) : (I(Vu.UNKNOWN, !1), [2])); case 2: if (null == (i = d.sent())) return I(Vu.UNKNOWN, !1), [2]; if (void 0 !== (c = JSON.parse(i)).errorCode) return I(Vu.UNKNOWN, !1), [2]; try { a = t ? Hu.fido2Util.formatCredentialAuthenticationResponseApp(i) : i } catch (e) { return I(Vu.UNKNOWN, !1), [2] } return [3, 5]; case 3: return [4, navigator.credentials.get({ publicKey: Hu.fido2Util.formatCredentialRequestWeb(JSON.stringify(r)) }).catch((function() { I(Vu.UNKNOWN, !1) }))]; case 4: c = d.sent(); try { a = Hu.fido2Util.formatCredentialAuthenticationResponseWeb(c) } catch (e) { return I(Vu.UNKNOWN, !1), [2] } d.label = 5; case 5: return [4, v.twoStepVerification.verifySecurityKeyCredential(o, { challengeId: l, actionType: u, code: a })]; case 6: return (s = d.sent()).isError ? (I(s.error, !0), [2]) : (p.sendCodeVerifiedEvent(y, u), h.fireVerifiedEvent(y), m({ type: xg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { verificationToken: s.value.verificationToken, rememberDevice: _ } }), [2]) } })) })) } }, t ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : d.Action.Verify), s && Gi().createElement(gE, { disabled: t, rememberDevice: _, setRememberDevice: S, className: N }), r, Gi().createElement(EE, { className: N }), Gi().createElement("p", { className: L }, E))) }, VE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, UE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, WE = function(e) { var t = e.requestInFlight, n = e.setRequestInFlight, r = e.children, a = pE(), i = a.state, o = i.userId, l = i.challengeId, u = i.actionType, c = i.renderInline, s = i.shouldShowRememberDeviceCheckbox, d = i.resources, f = i.metadata, p = i.eventService, h = i.metricsService, v = i.requestService, m = a.dispatch, y = iE(), g = (0, Fi.useState)(""), E = g[0], b = g[1], C = (0, Fi.useState)(null), _ = C[0], S = C[1], I = (0, Fi.useState)(null), T = I[0], A = I[1], N = (0, Fi.useState)(!1), w = N[0], L = N[1], O = function() { return VE(void 0, void 0, void 0, (function() { var e; return UE(this, (function(t) { switch (t.label) { case 0: return n(!0), A(null), p.sendCodeSubmittedEvent(y, u), [4, v.twoStepVerification.verifySmsCode(o, { challengeId: l, actionType: u, code: E })]; case 1: return (e = t.sent()).isError ? (p.sendCodeVerificationFailedEvent(y, u, Vu[e.error || Vu.UNKNOWN]), e.error === Vu.INVALID_USER_ID || e.error === Vu.INVALID_CHALLENGE_ID ? (m({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e.error) }), [2]) : (n(!1), A(rE(d, e.error)), [2])) : (p.sendCodeVerifiedEvent(y, u), h.fireVerifiedEvent(y), m({ type: xg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { verificationToken: e.value.verificationToken, rememberDevice: w } }), [2]) } })) })) }, k = null === _ && E.length === (null == f ? void 0 : f.emailCodeLength), D = { content: t ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : d.Action.Verify, label: d.Action.Verify, enabled: !t && k, action: O }, R = c ? Cd : Ed.Modal.Body, P = c ? bf : Cf, x = c ? "inline-challenge-lock-icon" : "modal-lock-icon", M = c ? "inline-challenge-margin-bottom" : "modal-margin-bottom", V = c ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge"; return f && Gi().createElement(Gi().Fragment, null, Gi().createElement(R, null, Gi().createElement("div", { className: x }), Gi().createElement("p", { className: V }, d.Label.EnterTextCode), Gi().createElement(wy, { id: "two-step-verification-code-input", inputType: "text", disabled: t, value: E, setValue: b, error: T || _, setError: S, validate: Ay, canSubmit: k, handleSubmit: O, onChange: function() { return A(null) }, inputMode: "numeric", autoComplete: "off", placeholder: d.Label.CodeInputPlaceholderText(f.emailCodeLength), maxLength: f.emailCodeLength, validCharactersRegEx: bE, hideFeedback: !0, concealInput: !0, autoFocus: !0 }), s && Gi().createElement(gE, { disabled: t, rememberDevice: w, setRememberDevice: L, className: V }), Gi().createElement(NE, { disabled: t, setCodeError: S, mediaType: y }), r), Gi().createElement(P, { positiveButton: D, negativeButton: null }, Gi().createElement(EE, { className: M }), Gi().createElement("p", { className: "text-footer" }, d.Description.SecurityWarningShort))) }, HE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, FE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, GE = function(e) { var t = e.requestInFlight, n = e.setRequestInFlight, r = e.setModalTitleText, a = e.setShowChangeMediaType, i = e.children, o = pE(), l = o.state, u = l.userId, c = l.challengeId, s = l.actionType, d = l.renderInline, f = l.resources, p = l.metadata, h = l.eventService, v = l.metricsService, m = l.requestService, y = l.onModalChallengeAbandoned, g = o.dispatch, E = iE(), b = (0, Fi.useState)(null), C = b[0], _ = b[1], S = (0, Fi.useState)(f.Label.ApproveWithDevice), I = S[0], T = S[1], A = (0, Fi.useState)(!0), N = A[0], w = A[1], L = (0, Fi.useState)(!1), O = L[0], k = L[1], D = (0, Fi.useState)(0), R = D[0], P = D[1], x = (0, Fi.useState)(!1), M = x[0], V = x[1], U = function() { return HE(void 0, void 0, void 0, (function() { var e; return FE(this, (function(t) { switch (t.label) { case 0: return R >= 4 ? [4, m.twoStepVerification.retractCrossDevice(u, { challengeId: c, actionType: s })] : [3, 2]; case 1: return t.sent(), r(f.Label.TwoStepVerification), T(f.Description.LoginExpired), a(!1), w(!1), k(!0), [2]; case 2: return P(R + 1), n(!0), _(null), r(f.Label.TwoStepVerification), T(f.Label.ApproveWithDevice), [4, m.twoStepVerification.retryCrossDevice(u, { challengeId: c, actionType: s })]; case 3: return (e = t.sent()).isError ? (h.sendCodeVerificationFailedEvent(E, s, Vu[e.error || Vu.UNKNOWN]), e.error === Vu.INVALID_USER_ID || e.error === Vu.INVALID_CHALLENGE_ID ? (g({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e.error) }), [2]) : (n(!1), _(rE(f, e.error)), [2])) : (R > 0 && V(!0), n(!1), [2]) } })) })) }, W = d ? Cd : Ed.Modal.Body, H = d ? "inline-challenge-margin-bottom" : "modal-margin-bottom", F = d ? "inline-challenge-action-button" : "modal-action-button"; F = (F = F.concat(" ", "btn-secondary-md")).concat(" ", H); var G = d ? "inline-challenge-action-button" : "modal-action-button"; G = (G = G.concat(" ", "btn-cta-md")).concat(" ", H); var j = (d ? "inline-margin-bottom-xlarge" : "modal-margin-bottom-xlarge").concat(" ", "text-error xsmall"), z = d ? "inline-challenge-lock-icon" : "modal-lock-icon"; return (0, Fi.useEffect)((function() { if (M) { var e = setTimeout((function() { V(!1) }), 3e3); return function() { return clearTimeout(e) } } }), [M]), (0, Fi.useEffect)((function() { U().then((function() { return _(null) })).catch((function() { return _(rE(f, Vu.UNKNOWN)) })); var e = setInterval((function() { m.twoStepVerification.verifyCrossDevice(u, { challengeId: c, actionType: s }).then((function(t) { if (t.isError) { if (h.sendCodeVerificationFailedEvent(E, s, Vu[t.error || Vu.UNKNOWN]), t.error === Vu.CHALLENGE_DENIED) return r(f.Label.TwoStepVerification), T(f.Description.Denied), a(!1), w(!1), void clearInterval(e); if (t.error === Vu.CROSS_DEVICE_DIALOG_EXPIRED) return r(f.Label.TwoStepVerification), T(f.Description.Expired), a(!1), w(!1), k(!0), void clearInterval(e); if (t.error === Vu.INVALID_USER_ID || t.error === Vu.INVALID_CHALLENGE_ID) return void g({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(t.error) }); _(rE(f, t.error)) } else t.value.verificationToken && (h.sendCodeVerifiedEvent(E, s), v.fireVerifiedEvent(E), g({ type: xg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { verificationToken: t.value.verificationToken, rememberDevice: !1 } })) })).catch((function() { return _(rE(f, Vu.UNKNOWN)) })) }), 3e3); return function() { clearInterval(e) } }), []), p && Gi().createElement(Gi().Fragment, null, Gi().createElement(W, null, Gi().createElement("div", { className: z }), Gi().createElement("p", { className: H }, I), N ? Gi().createElement("button", { type: "button", className: F, "aria-label": f.Action.Retry, disabled: t, onClick: U }, t || M ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : f.Action.Retry) : Gi().createElement("button", { type: "button", className: G, "aria-label": f.Action.Okay, disabled: t, onClick: function() { g({ type: xg.HIDE_MODAL_CHALLENGE }), h.sendChallengeAbandonedEvent(E, s), v.fireAbandonedEvent(), null !== y && setTimeout((function() { return y((function() { return g({ type: xg.SHOW_MODAL_CHALLENGE }) })) }), Qg) } }, t ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : f.Action.Okay), N ? i : null, N || O ? Gi().createElement("p", { className: "text-footer " + H, dangerouslySetInnerHTML: { __html: f.Label.HelpCenterLink('' + f.Label.HelpCenter + "") } }) : null, Gi().createElement("p", { className: j }, C))) }, jE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, zE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, ZE = function(e) { var t = e.requestInFlight, n = e.setRequestInFlight, r = e.children, a = pE(), i = a.state, o = i.userId, l = i.challengeId, u = i.actionType, c = i.renderInline, s = i.shouldShowRememberDeviceCheckbox, d = i.resources, f = i.metadata, p = i.eventService, h = i.metricsService, v = i.requestService, m = a.dispatch, y = iE(), g = (0, Fi.useState)(null), E = g[0], b = g[1], C = (0, Fi.useState)(!1), _ = C[0], S = C[1], I = function(e, t) { t && p.sendCodeVerificationFailedEvent(y, u, Vu[e || Vu.UNKNOWN]), e !== Vu.INVALID_USER_ID && e !== Vu.INVALID_CHALLENGE_ID ? (n(!1), b(rE(d, e))) : m({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e) }) }, T = c ? Cd : Ed.Modal.Body, A = c ? "inline-challenge-lock-icon" : "modal-lock-icon", N = c ? "inline-challenge-margin-bottom" : "modal-margin-bottom", w = c ? "inline-challenge-action-button" : "modal-action-button"; w = (w = w.concat(" ", "btn-cta-md")).concat(" ", N); var L = (c ? "inline-margin-bottom-xlarge" : "modal-margin-bottom-xlarge").concat(" ", "text-error xsmall"), O = c ? "inline-challenge-margin-bottom-sm" : "modal-margin-bottom-sm"; return f && Gi().createElement(Gi().Fragment, null, Gi().createElement(T, null, Gi().createElement("div", { className: A }), Gi().createElement("p", { className: O }, d.Label.VerifyWithPasskey), Gi().createElement("p", { className: N }, d.Label.PasskeyDirections), Gi().createElement("button", { type: "button", className: w, "aria-label": d.Action.Verify, disabled: t, onClick: function() { return jE(void 0, void 0, void 0, (function() { var e, t, r, a, i, c, s; return zE(this, (function(d) { switch (d.label) { case 0: return n(!0), b(null), [4, v.twoStepVerification.getPasskeyOptions(o, { challengeId: l, actionType: u })]; case 1: return (e = d.sent()).isError ? (I(e.error, !0), [2]) : (t = !(mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp && (0, mi.DeviceMeta)().isAndroidApp), (r = t ? Hu.fido2Util.convertPublicKeyParametersToStandardBase64(e.value.authenticationOptions) : JSON.parse(e.value.authenticationOptions)).publicKey ? (a = "", mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp ? (r.keyType = "platform", [4, Hu.hybridResponseService.getNativeResponse(Hu.hybridResponseService.FeatureTarget.GET_CREDENTIALS, { authenticationOptionsJSON: JSON.stringify(r) }, 3e5).catch((function() { I(Vu.UNKNOWN, !1) }))]) : [3, 3]) : (I(Vu.UNKNOWN, !1), [2])); case 2: if (null == (i = d.sent())) return I(Vu.UNKNOWN, !1), [2]; if (void 0 !== (c = JSON.parse(i)).errorCode) return I(Vu.UNKNOWN, !1), [2]; try { a = t ? Hu.fido2Util.formatCredentialAuthenticationResponseApp(i) : i } catch (e) { return I(Vu.UNKNOWN, !1), [2] } return [3, 5]; case 3: return [4, navigator.credentials.get({ publicKey: Hu.fido2Util.formatCredentialRequestWeb(JSON.stringify(r)) }).catch((function() { I(Vu.UNKNOWN, !1) }))]; case 4: c = d.sent(); try { a = Hu.fido2Util.formatCredentialAuthenticationResponseWeb(c) } catch (e) { return I(Vu.UNKNOWN, !1), [2] } d.label = 5; case 5: return [4, v.twoStepVerification.verifyPasskeyCredential(o, { challengeId: l, actionType: u, code: a })]; case 6: return (s = d.sent()).isError ? (I(s.error, !0), [2]) : (p.sendCodeVerifiedEvent(y, u), h.fireVerifiedEvent(y), m({ type: xg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { verificationToken: s.value.verificationToken, rememberDevice: _ } }), [2]) } })) })) } }, t ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : d.Action.Verify), s && Gi().createElement(gE, { disabled: t, rememberDevice: _, setRememberDevice: S, className: N }), r, Gi().createElement(EE, { className: N }), Gi().createElement("p", { className: L }, E))) }, qE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, BE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, KE = function(e) { var t = e.requestInFlight, n = e.setRequestInFlight, r = e.children, a = pE(), i = a.state, o = i.userId, l = i.challengeId, u = i.actionType, c = i.renderInline, s = i.shouldShowRememberDeviceCheckbox, d = i.resources, f = i.metadata, p = i.eventService, h = i.metricsService, v = i.requestService, m = a.dispatch, y = iE(), g = (0, Fi.useState)(""), E = g[0], b = g[1], C = (0, Fi.useState)(null), _ = C[0], S = C[1], I = (0, Fi.useState)(null), T = I[0], A = I[1], N = (0, Fi.useState)(!1), w = N[0], L = N[1], O = function() { return qE(void 0, void 0, void 0, (function() { var e; return BE(this, (function(t) { switch (t.label) { case 0: return n(!0), A(null), p.sendCodeSubmittedEvent(y, u), [4, v.twoStepVerification.verifyPasswordCode(o, { challengeId: l, actionType: u, code: E })]; case 1: return (e = t.sent()).isError ? (p.sendCodeVerificationFailedEvent(y, u, Vu[e.error || Vu.UNKNOWN]), e.error === Vu.INVALID_USER_ID || e.error === Vu.INVALID_CHALLENGE_ID ? (m({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e.error) }), [2]) : (n(!1), A(rE(d, e.error)), [2])) : (p.sendCodeVerifiedEvent(y, u), h.fireVerifiedEvent(y), m({ type: xg.SET_CHALLENGE_COMPLETED, onChallengeCompletedData: { verificationToken: e.value.verificationToken, rememberDevice: w } }), [2]) } })) })) }, k = { content: t ? Gi().createElement("span", { className: "spinner spinner-xs spinner-no-margin" }) : d.Action.Verify, label: d.Action.Verify, enabled: !t, action: O }, D = c ? Cd : Ed.Modal.Body, R = c ? bf : Cf, P = c ? "inline-challenge-lock-icon" : "modal-lock-icon", x = c ? "inline-challenge-margin-bottom" : "modal-margin-bottom", M = c ? "inline-challenge-margin-bottom-xlarge" : "modal-margin-bottom-xlarge"; return f && Gi().createElement(Gi().Fragment, null, Gi().createElement(D, null, Gi().createElement("div", { className: P }), Gi().createElement("p", { className: M }, d.Label.EnterPassword), Gi().createElement(wy, { id: "two-step-verification-code-input", inputType: "text", disabled: t, value: E, setValue: b, error: T || _, setError: S, validate: Ay, handleSubmit: O, onChange: function() { return A(null) }, canSubmit: !0, autoComplete: "off", placeholder: d.Label.PasswordPlaceholder, hideFeedback: !0, concealInput: !0, autoFocus: !0 }), s && Gi().createElement(gE, { disabled: t, rememberDevice: w, setRememberDevice: L, className: M }), r), Gi().createElement(R, { positiveButton: k, negativeButton: null }, Gi().createElement(EE, { className: x }))) }, YE = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, JE = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, XE = function() { var e = pE(), t = e.state, n = t.userId, r = t.challengeId, a = t.actionType, i = t.renderInline, o = t.metadata, l = t.enabledMediaTypes, u = t.resources, c = t.eventService, s = t.metricsService, d = t.requestService, f = t.onModalChallengeAbandoned, p = t.isModalVisible, h = e.dispatch, v = iE(), m = (0, ly.useHistory)(), y = (0, Fi.useState)(!1), g = y[0], E = y[1], b = (0, Fi.useState)(!1), C = b[0], _ = b[1], S = (0, Fi.useState)(null), I = S[0], T = S[1], A = (0, Fi.useState)(!1), N = A[0], w = A[1], L = (0, Fi.useState)(u.Label.TwoStepVerification), O = L[0], k = L[1], D = (0, Fi.useState)(!0), R = D[0], P = D[1], x = function() { h({ type: xg.HIDE_MODAL_CHALLENGE }), c.sendChallengeAbandonedEvent(v, a), s.fireAbandonedEvent(), v === nv.CrossDevice && d.twoStepVerification.retractCrossDevice(n, { challengeId: r, actionType: a }), null !== f && setTimeout((function() { return f((function() { return h({ type: xg.SHOW_MODAL_CHALLENGE }) })) }), Qg) }, M = function() { return YE(void 0, void 0, void 0, (function() { var e, t, i, l, s, f, p, v, y, g, b; return JE(this, (function(C) { switch (C.label) { case 0: return T(null), null !== o ? [2] : [4, d.twoStepVerification.getMetadata({ userId: n, challengeId: r, actionType: a })]; case 1: return (e = C.sent()).isError ? (e.error === Vu.INVALID_USER_ID || e.error === Vu.INVALID_CHALLENGE_ID ? h({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(e.error) }) : T(rE(u, e.error)), [2]) : [4, d.twoStepVerification.getUserConfiguration(n, { challengeId: r, actionType: a })]; case 2: if ((t = C.sent()).isError) return t.error === Vu.INVALID_USER_ID || t.error === Vu.INVALID_CHALLENGE_ID ? h({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(t.error) }) : T(rE(u, t.error)), [2]; h({ type: xg.SET_METADATA, metadata: e.value }), i = nv[t.value.primaryMediaType] || null, l = t.value.methods.filter((function(e) { return e.enabled })).map((function(e) { var t = e.mediaType; return nv[t] || null })), s = mi.DeviceMeta && (0, mi.DeviceMeta)().isInApp, f = !0; try { (s || void 0 === PublicKeyCredential) && (f = !1) } catch (e) { f = !1 } return p = s && mi.DeviceMeta && ((0, mi.DeviceMeta)().isIosApp || (0, mi.DeviceMeta)().isAndroidApp && e.value.isAndroidSecurityKeyEnabled), v = s && mi.DeviceMeta && ((0, mi.DeviceMeta)().isIosApp || (0, mi.DeviceMeta)().isAndroidApp), y = !1, i === nv.SecurityKey && p || i === nv.Passkey && v ? [4, Hu.hybridResponseService.getNativeResponse(Hu.hybridResponseService.FeatureTarget.CREDENTIALS_PROTOCOL_AVAILABLE, {}, 2e3)] : [3, 4]; case 3: "true" === C.sent() && (y = !0), C.label = 4; case 4: return i !== nv.SecurityKey || f || y || (i = nv.Authenticator), g = !1, i !== nv.Passkey || f || y || (l.includes(nv.Passkey) && l.splice(l.indexOf(nv.Passkey), 1), l.length > 0 && (g = !0, i = l[0])), m.replace(oE(i)), i !== nv.Email ? [3, 7] : g ? (c.sendEmailResendRequestedEvent(), [4, d.twoStepVerification.sendEmailCode(n, { challengeId: r, actionType: a })]) : [3, 6]; case 5: (b = C.sent()).isError && ((null == b ? void 0 : b.error) !== Vu.INVALID_USER_ID && (null == b ? void 0 : b.error) !== Vu.INVALID_CHALLENGE_ID || h({ type: xg.SET_CHALLENGE_INVALIDATED, errorCode: aE(b.error) })), C.label = 6; case 6: E(!g), C.label = 7; case 7: return 0 !== l.length && i || c.sendNoEnabledMethodsReturnedEvent(i, a, t.value.methods.length), !l.includes(nv.SecurityKey) || f || y || l.splice(l.indexOf(nv.SecurityKey), 1), l.length > 0 && a === tv.Login && !l.includes(nv.RecoveryCode) && l.push(nv.RecoveryCode), h({ type: xg.SET_USER_CONFIGURATION, userConfiguration: t.value, enabledMediaTypes: l }), c.sendUserConfigurationLoadedEvent(i, a), [2] } })) })) }; (0, Fi.useEffect)((function() { M() }), []); var V = { content: u.Action.Reload, label: u.Action.Reload, enabled: null !== I, action: M }, U = function() { var e, t = i ? Cd : Ed.Modal.Body, n = i ? bf : Cf; return I ? Gi().createElement(Gi().Fragment, null, Gi().createElement(t, null, Gi().createElement("p", null, I)), Gi().createElement(n, { positiveButton: V, negativeButton: null })) : o ? (e = Gi().createElement(Gi().Fragment, null, v && l.length > 1 && R && Gi().createElement(yE, { requestInFlight: N, originalMediaType: v, actionType: a })), Gi().createElement(ly.Switch, null, Gi().createElement(ly.Route, { path: oE(nv.Authenticator) }, Gi().createElement(IE, { requestInFlight: N, setRequestInFlight: w }, e)), Gi().createElement(ly.Route, { path: oE(nv.Email) }, Gi().createElement(OE, { requestInFlight: N, setRequestInFlight: w }, e)), Gi().createElement(ly.Route, { path: oE(nv.RecoveryCode) }, Gi().createElement(RE, { requestInFlight: N, setRequestInFlight: w }, e)), Gi().createElement(ly.Route, { path: oE(nv.SMS) }, Gi().createElement(WE, { requestInFlight: N, setRequestInFlight: w }, e)), Gi().createElement(ly.Route, { path: oE(nv.SecurityKey) }, Gi().createElement(ME, { requestInFlight: N, setRequestInFlight: w }, e)), Gi().createElement(ly.Route, { path: oE(nv.CrossDevice) }, Gi().createElement(GE, { requestInFlight: N, setRequestInFlight: w, setModalTitleText: k, setShowChangeMediaType: P }, e)), Gi().createElement(ly.Route, { path: oE(nv.Passkey) }, Gi().createElement(ZE, { requestInFlight: N, setRequestInFlight: w }, e)), Gi().createElement(ly.Route, { path: oE(nv.Password) }, Gi().createElement(KE, { requestInFlight: N, setRequestInFlight: w }, e)), Gi().createElement(ly.Route, null, Gi().createElement(mE, { hasSentEmailCode: g, setHasSentEmailCode: E, hasSentSmsCode: C, setHasSentSmsCode: _, requestInFlight: N, setRequestInFlight: w, setModalTitleText: k }, e)))) : Gi().createElement(t, null, Gi().createElement("span", { className: "spinner spinner-default spinner-no-margin modal-margin-bottom-large" })) }; return i ? Gi().createElement(bd, { titleText: O }, U()) : Gi().createElement(Ed.Modal, { className: "modal-modern", show: p, onHide: x, backdrop: "static" }, Gi().createElement(If, { headerText: O, buttonType: yf.CLOSE, buttonAction: x, buttonEnabled: !N, headerInfo: null }), U()) }, QE = (0, dd.withTranslations)((function(e) { var t = e.userId, n = e.challengeId, r = e.actionType, a = e.renderInline, i = e.shouldModifyBrowserHistory, o = e.shouldShowRememberDeviceCheckbox, l = e.eventService, u = e.metricsService, c = e.requestService, s = e.translate, d = e.onChallengeCompleted, f = e.onChallengeInvalidated, p = e.onModalChallengeAbandoned, h = Gi().createElement(fE, { userId: t, challengeId: n, actionType: r, renderInline: a, shouldShowRememberDeviceCheckbox: o, eventService: l, metricsService: u, requestService: c, translate: s, onChallengeCompleted: d, onChallengeInvalidated: f, onModalChallengeAbandoned: p }, Gi().createElement(XE, null)); return i ? Gi().createElement(ny.HashRouter, { hashType: "noslash" }, h) : Gi().createElement(ny.MemoryRouter, null, h) }), { common: [], feature: "Authentication.TwoStepVerification" }), $E = function() { function e(e, t) { this.challengeId = e, this.targetUserId = t } return e.prototype.sendChallengeInitializedEvent = function() { yi().EventStream.SendEventWithTarget($g, eE.challengeInitialized, { challengeId: this.challengeId, targetUserId: this.targetUserId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendUserConfigurationLoadedEvent = function(e, t) { yi().EventStream.SendEventWithTarget($g, eE.userConfigurationLoaded, { challengeId: this.challengeId, targetUserId: this.targetUserId, mediaType: e || "", actionType: t || "" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendNoEnabledMethodsReturnedEvent = function(e, t, n) { yi().EventStream.SendEventWithTarget($g, eE.noEnabledMethodsReturned, { challengeId: this.challengeId, targetUserId: this.targetUserId, primaryMediaType: e || "", actionType: t || "", methodsReturned: n }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeInvalidatedEvent = function(e, t) { yi().EventStream.SendEventWithTarget($g, eE.challengeInvalidated, { challengeId: this.challengeId, targetUserId: this.targetUserId, mediaType: e || "", actionType: t || "" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendChallengeAbandonedEvent = function(e, t) { yi().EventStream.SendEventWithTarget($g, eE.challengeAbandoned, { challengeId: this.challengeId, targetUserId: this.targetUserId, mediaType: e || "", actionType: t || "" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendEmailResendRequestedEvent = function() { yi().EventStream.SendEventWithTarget($g, eE.emailResendRequested, { challengeId: this.challengeId, targetUserId: this.targetUserId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendSmsResendRequestedEvent = function() { yi().EventStream.SendEventWithTarget($g, eE.smsResendRequested, { challengeId: this.challengeId, targetUserId: this.targetUserId }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendMediaTypeChangedEvent = function(e, t) { yi().EventStream.SendEventWithTarget($g, eE.mediaTypeChanged, { challengeId: this.challengeId, targetUserId: this.targetUserId, mediaType: e || "", actionType: t || "" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendCodeSubmittedEvent = function(e, t) { yi().EventStream.SendEventWithTarget($g, eE.codeSubmitted, { challengeId: this.challengeId, targetUserId: this.targetUserId, mediaType: e || "", actionType: t || "" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendCodeVerificationFailedEvent = function(e, t, n) { yi().EventStream.SendEventWithTarget($g, eE.codeVerificationFailed, { challengeId: this.challengeId, targetUserId: this.targetUserId, mediaType: e || "", actionType: t || "", reason: n }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendTryToSwitchMediaTypeEvent = function(e, t) { yi().EventStream.SendEventWithTarget($g, eE.tryToSwitchMediaType, { challengeId: this.challengeId, targetUserId: this.targetUserId, mediaType: e || "", actionType: t || "" }, yi().EventStream.TargetTypes.WWW) }, e.prototype.sendCodeVerifiedEvent = function(e, t) { yi().EventStream.SendEventWithTarget($g, eE.codeVerified, { challengeId: this.challengeId, targetUserId: this.targetUserId, mediaType: e || "", actionType: t || "" }, yi().EventStream.TargetTypes.WWW) }, e }(), eb = function() { function e(e, t, n) { this.appType = t || "unknown", this.actionType = e, this.solveTimeSequenceName = this.actionType + "_" + Xg + "_" + nE.solveTime, this.eventTimer = new jd, this.requestServiceDefault = n } return e.prototype.fireInitializedEvent = function() { if (zd) { var e = this.actionType + "_" + Xg + "_" + tE.initialized; zd.fireEvent(e, e + "_" + this.appType), zd.start(this.solveTimeSequenceName, this.solveTimeSequenceName + "_" + this.appType) } this.requestServiceDefault.metrics.recordMetric({ name: is.Event2sv, value: 1, labelValues: { action_type: this.actionType, event_type: tE.initialized, application_type: this.appType } }).catch((function() {})), this.eventTimer.start(this.solveTimeSequenceName) }, e.prototype.fireVerifiedEvent = function(e) { if (null !== e) { if (zd) { var t = this.actionType + "_" + Xg + "_" + tE.verified + e; zd.fireEvent(t, t + "_" + this.appType), zd.endSuccess(this.solveTimeSequenceName, this.solveTimeSequenceName + "_" + this.appType) } this.requestServiceDefault.metrics.recordMetric({ name: is.Event2sv, value: 1, labelValues: { action_type: this.actionType, event_type: "" + tE.verified + e, application_type: this.appType } }).catch((function() {})); var n = this.eventTimer.end(this.solveTimeSequenceName); null !== n && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTime2sv, value: n, labelValues: { action_type: this.actionType, event_type: "" + tE.verified + e, application_type: this.appType } }).catch((function() {})) } }, e.prototype.fireInvalidatedEvent = function() { if (zd) { var e = this.actionType + "_" + Xg + "_" + tE.invalidated; zd.fireEvent(e, e + "_" + this.appType), zd.endFailure(this.solveTimeSequenceName, this.solveTimeSequenceName + "_" + this.appType) } this.requestServiceDefault.metrics.recordMetric({ name: is.Event2sv, value: 1, labelValues: { action_type: this.actionType, event_type: tE.invalidated, application_type: this.appType } }).catch((function() {})); var t = this.eventTimer.end(this.solveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTime2sv, value: t, labelValues: { action_type: this.actionType, event_type: tE.invalidated, application_type: this.appType } }).catch((function() {})) }, e.prototype.fireAbandonedEvent = function() { if (zd) { var e = this.actionType + "_" + Xg + "_" + tE.abandoned; zd.fireEvent(e, e + "_" + this.appType), zd.endCancel(this.solveTimeSequenceName, this.solveTimeSequenceName + "_" + this.appType) } this.requestServiceDefault.metrics.recordMetric({ name: is.Event2sv, value: 1, labelValues: { action_type: this.actionType, event_type: tE.abandoned, application_type: this.appType } }).catch((function() {})); var t = this.eventTimer.end(this.solveTimeSequenceName); null !== t && this.requestServiceDefault.metrics.recordMetric({ name: is.SolveTime2sv, value: t, labelValues: { action_type: this.actionType, event_type: tE.abandoned, application_type: this.appType } }).catch((function() {})) }, e }(), tb = new sd, nb = function(e) { var t = e.containerId, n = e.userId, r = e.challengeId, a = e.appType, i = e.actionType, o = e.renderInline, l = e.shouldModifyBrowserHistory, u = e.shouldShowRememberDeviceCheckbox, c = e.onChallengeCompleted, s = e.onChallengeInvalidated, d = e.onModalChallengeAbandoned, f = document.getElementById(t); if (null !== f) { (0, ji.unmountComponentAtNode)(f); var p = new $E(r, n), h = new eb(i, a, tb); return (0, ji.render)(Gi().createElement(QE, { userId: n, challengeId: r, actionType: i, renderInline: o, shouldModifyBrowserHistory: l || !1, shouldShowRememberDeviceCheckbox: u, eventService: p, metricsService: h, requestService: tb, onChallengeCompleted: c, onChallengeInvalidated: s, onModalChallengeAbandoned: d }), f), p.sendChallengeInitializedEvent(), h.fireInitializedEvent(), !0 } return !1 }, rb = "Generic Challenge:", ab = "challengeClientAnalysisEventV1", ib = { onCompleted: "onCompleted" }, ob = { success: "Success", parseFailure: "ParseFailure", renderFailure: "RenderFailure", continueFailure: "ContinueFailure" }, lb = "unknown", ub = function() { function e() {} return e.prototype.fireSuccessEvent = function(e) { hs({ name: is.EventGeneric, value: 1, labelValues: { event_type: ob.success, challenge_type: e } }).catch((function() {})) }, e.prototype.fireParseFailureEvent = function() { hs({ name: is.EventGeneric, value: 1, labelValues: { event_type: ob.parseFailure, challenge_type: lb } }).catch((function() {})) }, e.prototype.fireRenderFailureEvent = function(e) { hs({ name: is.EventGeneric, value: 1, labelValues: { event_type: ob.renderFailure, challenge_type: e } }).catch((function() {})) }, e.prototype.fireContinueFailureEvent = function(e) { hs({ name: is.EventGeneric, value: 1, labelValues: { event_type: ob.continueFailure, challenge_type: e } }).catch((function() {})) }, e }(); function cb(e, t) { return function(e) { if (Array.isArray(e)) return e }(e) || function(e, t) { if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return; var n = [], r = !0, a = !1, i = void 0; try { for (var o, l = e[Symbol.iterator](); !(r = (o = l.next()).done) && (n.push(o.value), !t || n.length !== t); r = !0); } catch (e) { a = !0, i = e } finally { try { r || null == l.return || l.return() } finally { if (a) throw i } } return n }(e, t) || Lb(e, t) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function sb(e, t, n, r, a, i, o) { try { var l = e[i](o), u = l.value } catch (e) { return void n(e) } l.done ? t(u) : Promise.resolve(u).then(r, a) } function db(e) { return function() { var t = this, n = arguments; return new Promise((function(r, a) { var i = e.apply(t, n); function o(e) { sb(i, r, a, o, l, "next", e) } function l(e) { sb(i, r, a, o, l, "throw", e) } o(void 0) })) } } function fb(e) { return function(e) { if (Array.isArray(e)) return Ob(e) }(e) || function(e) { if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e) }(e) || Lb(e) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function pb(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function hb(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } function vb(e, t, n) { return t && hb(e.prototype, t), n && hb(e, n), e } function mb(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && _b(e, t) } function yb(e) { var t = Cb(); return function() { var n, r = Sb(e); if (t) { var a = Sb(this).constructor; n = Reflect.construct(r, arguments, a) } else n = r.apply(this, arguments); return function(e, t) { if (t && ("object" === Ib(t) || "function" == typeof t)) return t; return gb(e) }(this, n) } } function gb(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e } function Eb(e) { var t = "function" == typeof Map ? new Map : void 0; return Eb = function(e) { if (null === e || ! function(e) { return -1 !== Function.toString.call(e).indexOf("[native code]") }(e)) return e; if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== t) { if (t.has(e)) return t.get(e); t.set(e, n) } function n() { return bb(e, arguments, Sb(this).constructor) } return n.prototype = Object.create(e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), _b(n, e) }, Eb(e) } function bb(e, t, n) { return bb = Cb() ? Reflect.construct : function(e, t, n) { var r = [null]; r.push.apply(r, t); var a = new(Function.bind.apply(e, r)); return n && _b(a, n.prototype), a }, bb.apply(null, arguments) } function Cb() { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], (function() {}))), !0 } catch (e) { return !1 } } function _b(e, t) { return _b = Object.setPrototypeOf || function(e, t) { return e.__proto__ = t, e }, _b(e, t) } function Sb(e) { return Sb = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { return e.__proto__ || Object.getPrototypeOf(e) }, Sb(e) } function Ib(e) { return Ib = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, Ib(e) } function Tb(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter((function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function Ab(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? Tb(Object(n), !0).forEach((function(t) { Nb(e, t, n[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Tb(Object(n)).forEach((function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)) })) } return e } function Nb(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } function wb(e, t) { var n; if ("undefined" == typeof Symbol || null == e[Symbol.iterator]) { if (Array.isArray(e) || (n = Lb(e)) || t && e && "number" == typeof e.length) { n && (e = n); var r = 0, a = function() {}; return { s: a, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] } }, e: function(e) { throw e }, f: a } } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") } var i, o = !0, l = !1; return { s: function() { n = e[Symbol.iterator]() }, n: function() { var e = n.next(); return o = e.done, e }, e: function(e) { l = !0, i = e }, f: function() { try { o || null == n.return || n.return() } finally { if (l) throw i } } } } function Lb(e, t) { if (e) { if ("string" == typeof e) return Ob(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ob(e, t) : void 0 } } function Ob(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r }! function(e) { e.assertEqual = function(e) { return e }, e.assertIs = function(e) {}, e.assertNever = function(e) { throw new Error }, e.arrayToEnum = function(e) { var t, n = {}, r = wb(e); try { for (r.s(); !(t = r.n()).done;) { var a = t.value; n[a] = a } } catch (e) { r.e(e) } finally { r.f() } return n }, e.getValidEnumValues = function(t) { var n, r = e.objectKeys(t).filter((function(e) { return "number" != typeof t[t[e]] })), a = {}, i = wb(r); try { for (i.s(); !(n = i.n()).done;) { var o = n.value; a[o] = t[o] } } catch (e) { i.e(e) } finally { i.f() } return e.objectValues(a) }, e.objectValues = function(t) { return e.objectKeys(t).map((function(e) { return t[e] })) }, e.objectKeys = "function" == typeof Object.keys ? function(e) { return Object.keys(e) } : function(e) { var t = []; for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n); return t }, e.find = function(e, t) { var n, r = wb(e); try { for (r.s(); !(n = r.n()).done;) { var a = n.value; if (t(a)) return a } } catch (e) { r.e(e) } finally { r.f() } }, e.isInteger = "function" == typeof Number.isInteger ? function(e) { return Number.isInteger(e) } : function(e) { return "number" == typeof e && isFinite(e) && Math.floor(e) === e }, e.joinValues = function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : " | "; return e.map((function(e) { return "string" == typeof e ? "'".concat(e, "'") : e })).join(t) }, e.jsonStringifyReplacer = function(e, t) { return "bigint" == typeof t ? t.toString() : t } }(lE || (lE = {})), function(e) { e.mergeShapes = function(e, t) { return Ab(Ab({}, e), t) } }(uE || (uE = {})); var kb = lE.arrayToEnum(["string", "nan", "number", "integer", "float", "boolean", "date", "bigint", "symbol", "function", "undefined", "null", "array", "object", "unknown", "promise", "void", "never", "map", "set"]), Db = function(e) { switch (Ib(e)) { case "undefined": return kb.undefined; case "string": return kb.string; case "number": return isNaN(e) ? kb.nan : kb.number; case "boolean": return kb.boolean; case "function": return kb.function; case "bigint": return kb.bigint; case "symbol": return kb.symbol; case "object": return Array.isArray(e) ? kb.array : null === e ? kb.null : e.then && "function" == typeof e.then && e.catch && "function" == typeof e.catch ? kb.promise : "undefined" != typeof Map && e instanceof Map ? kb.map : "undefined" != typeof Set && e instanceof Set ? kb.set : "undefined" != typeof Date && e instanceof Date ? kb.date : kb.object; default: return kb.unknown } }, Rb = lE.arrayToEnum(["invalid_type", "invalid_literal", "custom", "invalid_union", "invalid_union_discriminator", "invalid_enum_value", "unrecognized_keys", "invalid_arguments", "invalid_return_type", "invalid_date", "invalid_string", "too_small", "too_big", "invalid_intersection_types", "not_multiple_of", "not_finite"]), Pb = function(e) { mb(n, e); var t = yb(n); function n(e) { var r; pb(this, n), (r = t.call(this)).issues = [], r.addIssue = function(e) { r.issues = [].concat(fb(r.issues), [e]) }, r.addIssues = function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; r.issues = [].concat(fb(r.issues), fb(e)) }; var a = (this instanceof n ? this.constructor : void 0).prototype; return Object.setPrototypeOf ? Object.setPrototypeOf(gb(r), a) : r.__proto__ = a, r.name = "ZodError", r.issues = e, r } return vb(n, [{ key: "errors", get: function() { return this.issues } }]), vb(n, [{ key: "format", value: function(e) { var t = e || function(e) { return e.message }, n = { _errors: [] }; return function e(r) { var a, i = wb(r.issues); try { for (i.s(); !(a = i.n()).done;) { var o = a.value; if ("invalid_union" === o.code) o.unionErrors.map(e); else if ("invalid_return_type" === o.code) e(o.returnTypeError); else if ("invalid_arguments" === o.code) e(o.argumentsError); else if (0 === o.path.length) n._errors.push(t(o)); else for (var l = n, u = 0; u < o.path.length;) { var c = o.path[u]; u === o.path.length - 1 ? (l[c] = l[c] || { _errors: [] }, l[c]._errors.push(t(o))) : l[c] = l[c] || { _errors: [] }, l = l[c], u++ } } } catch (e) { i.e(e) } finally { i.f() } }(this), n } }, { key: "toString", value: function() { return this.message } }, { key: "flatten", value: function() { var e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function(e) { return e.message }, n = {}, r = [], a = wb(this.issues); try { for (a.s(); !(e = a.n()).done;) { var i = e.value; i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i)) } } catch (e) { a.e(e) } finally { a.f() } return { formErrors: r, fieldErrors: n } } }, { key: "message", get: function() { return JSON.stringify(this.issues, lE.jsonStringifyReplacer, 2) } }, { key: "isEmpty", get: function() { return 0 === this.issues.length } }, { key: "formErrors", get: function() { return this.flatten() } }], [{ key: "assert", value: function(e) { if (!(e instanceof n)) throw new Error("Not a ZodError: ".concat(e)) } }]), n }(Eb(Error)); Pb.create = function(e) { return new Pb(e) }; var xb = function(e, t) { var n; switch (e.code) { case Rb.invalid_type: n = e.received === kb.undefined ? "Required" : "Expected ".concat(e.expected, ", received ").concat(e.received); break; case Rb.invalid_literal: n = "Invalid literal value, expected ".concat(JSON.stringify(e.expected, lE.jsonStringifyReplacer)); break; case Rb.unrecognized_keys: n = "Unrecognized key(s) in object: ".concat(lE.joinValues(e.keys, ", ")); break; case Rb.invalid_union: n = "Invalid input"; break; case Rb.invalid_union_discriminator: n = "Invalid discriminator value. Expected ".concat(lE.joinValues(e.options)); break; case Rb.invalid_enum_value: n = "Invalid enum value. Expected ".concat(lE.joinValues(e.options), ", received '").concat(e.received, "'"); break; case Rb.invalid_arguments: n = "Invalid function arguments"; break; case Rb.invalid_return_type: n = "Invalid function return type"; break; case Rb.invalid_date: n = "Invalid date"; break; case Rb.invalid_string: "object" === Ib(e.validation) ? "includes" in e.validation ? (n = 'Invalid input: must include "'.concat(e.validation.includes, '"'), "number" == typeof e.validation.position && (n = "".concat(n, " at one or more positions greater than or equal to ").concat(e.validation.position))) : "startsWith" in e.validation ? n = 'Invalid input: must start with "'.concat(e.validation.startsWith, '"') : "endsWith" in e.validation ? n = 'Invalid input: must end with "'.concat(e.validation.endsWith, '"') : lE.assertNever(e.validation) : n = "regex" !== e.validation ? "Invalid ".concat(e.validation) : "Invalid"; break; case Rb.too_small: n = "array" === e.type ? "Array must contain ".concat(e.exact ? "exactly" : e.inclusive ? "at least" : "more than", " ").concat(e.minimum, " element(s)") : "string" === e.type ? "String must contain ".concat(e.exact ? "exactly" : e.inclusive ? "at least" : "over", " ").concat(e.minimum, " character(s)") : "number" === e.type ? "Number must be ".concat(e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than ").concat(e.minimum) : "date" === e.type ? "Date must be ".concat(e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than ").concat(new Date(Number(e.minimum))) : "Invalid input"; break; case Rb.too_big: n = "array" === e.type ? "Array must contain ".concat(e.exact ? "exactly" : e.inclusive ? "at most" : "less than", " ").concat(e.maximum, " element(s)") : "string" === e.type ? "String must contain ".concat(e.exact ? "exactly" : e.inclusive ? "at most" : "under", " ").concat(e.maximum, " character(s)") : "number" === e.type ? "Number must be ".concat(e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than", " ").concat(e.maximum) : "bigint" === e.type ? "BigInt must be ".concat(e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than", " ").concat(e.maximum) : "date" === e.type ? "Date must be ".concat(e.exact ? "exactly" : e.inclusive ? "smaller than or equal to" : "smaller than", " ").concat(new Date(Number(e.maximum))) : "Invalid input"; break; case Rb.custom: n = "Invalid input"; break; case Rb.invalid_intersection_types: n = "Intersection results could not be merged"; break; case Rb.not_multiple_of: n = "Number must be a multiple of ".concat(e.multipleOf); break; case Rb.not_finite: n = "Number must be finite"; break; default: n = t.defaultError, lE.assertNever(e) } return { message: n } }, Mb = xb; function Vb() { return Mb } var Ub = function(e) { var t = e.data, n = e.path, r = e.errorMaps, a = e.issueData, i = [].concat(fb(n), fb(a.path || [])), o = Ab(Ab({}, a), {}, { path: i }); if (void 0 !== a.message) return Ab(Ab({}, a), {}, { path: i, message: a.message }); var l, u = "", c = r.filter((function(e) { return !!e })).slice().reverse(), s = wb(c); try { for (s.s(); !(l = s.n()).done;) { u = (0, l.value)(o, { data: t, defaultError: u }).message } } catch (e) { s.e(e) } finally { s.f() } return Ab(Ab({}, a), {}, { path: i, message: u }) }; function Wb(e, t) { var n = Vb(), r = Ub({ issueData: t, data: e.data, path: e.path, errorMaps: [e.common.contextualErrorMap, e.schemaErrorMap, n, n === xb ? void 0 : xb].filter((function(e) { return !!e })) }); e.common.issues.push(r) } var Hb, Fb, Gb, jb = function() { function e() { pb(this, e), this.value = "valid" } var t; return vb(e, [{ key: "dirty", value: function() { "valid" === this.value && (this.value = "dirty") } }, { key: "abort", value: function() { "aborted" !== this.value && (this.value = "aborted") } }], [{ key: "mergeArray", value: function(e, t) { var n, r = [], a = wb(t); try { for (a.s(); !(n = a.n()).done;) { var i = n.value; if ("aborted" === i.status) return zb; "dirty" === i.status && e.dirty(), r.push(i.value) } } catch (e) { a.e(e) } finally { a.f() } return { status: e.value, value: r } } }, { key: "mergeObjectAsync", value: (t = db(regeneratorRuntime.mark((function t(n, r) { var a, i, o, l, u, c; return regeneratorRuntime.wrap((function(t) { for (;;) switch (t.prev = t.next) { case 0: a = [], i = wb(r), t.prev = 2, i.s(); case 4: if ((o = i.n()).done) { t.next = 15; break } return l = o.value, t.next = 8, l.key; case 8: return u = t.sent, t.next = 11, l.value; case 11: c = t.sent, a.push({ key: u, value: c }); case 13: t.next = 4; break; case 15: t.next = 20; break; case 17: t.prev = 17, t.t0 = t.catch(2), i.e(t.t0); case 20: return t.prev = 20, i.f(), t.finish(20); case 23: return t.abrupt("return", e.mergeObjectSync(n, a)); case 24: case "end": return t.stop() } }), t, null, [ [2, 17, 20, 23] ]) }))), function(e, n) { return t.apply(this, arguments) }) }, { key: "mergeObjectSync", value: function(e, t) { var n, r = {}, a = wb(t); try { for (a.s(); !(n = a.n()).done;) { var i = n.value, o = i.key, l = i.value; if ("aborted" === o.status) return zb; if ("aborted" === l.status) return zb; "dirty" === o.status && e.dirty(), "dirty" === l.status && e.dirty(), "__proto__" === o.value || void 0 === l.value && !i.alwaysSet || (r[o.value] = l.value) } } catch (e) { a.e(e) } finally { a.f() } return { status: e.value, value: r } } }]), e }(), zb = Object.freeze({ status: "aborted" }), Zb = function(e) { return { status: "dirty", value: e } }, qb = function(e) { return { status: "valid", value: e } }, Bb = function(e) { return "aborted" === e.status }, Kb = function(e) { return "dirty" === e.status }, Yb = function(e) { return "valid" === e.status }, Jb = function(e) { return "undefined" != typeof Promise && e instanceof Promise }; function Xb(e, t, n, r) { if ("a" === n && !r) throw new TypeError("Private accessor was defined without a getter"); if ("function" == typeof t ? e !== t || !r : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return "m" === n ? r : "a" === n ? r.call(e) : r ? r.value : t.get(e) } function Qb(e, t, n, r, a) { if ("m" === r) throw new TypeError("Private method is not writable"); if ("a" === r && !a) throw new TypeError("Private accessor was defined without a setter"); if ("function" == typeof t ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return "a" === r ? a.call(e, n) : a ? a.value = n : t.set(e, n), n } "function" == typeof SuppressedError && SuppressedError, function(e) { e.errToObj = function(e) { return "string" == typeof e ? { message: e } : e || {} }, e.toString = function(e) { return "string" == typeof e ? e : null == e ? void 0 : e.message } }(Hb || (Hb = {})); var $b = function() { function e(t, n, r, a) { pb(this, e), this._cachedPath = [], this.parent = t, this.data = n, this._path = r, this._key = a } return vb(e, [{ key: "path", get: function() { var e, t; this._cachedPath.length || (this._key instanceof Array ? (e = this._cachedPath).push.apply(e, fb(this._path).concat(fb(this._key))) : (t = this._cachedPath).push.apply(t, fb(this._path).concat([this._key]))); return this._cachedPath } }]), e }(), eC = function(e, t) { if (Yb(t)) return { success: !0, data: t.value }; if (!e.common.issues.length) throw new Error("Validation failed but no issues detected."); return { success: !1, get error() { if (this._error) return this._error; var t = new Pb(e.common.issues); return this._error = t, this._error } } }; function tC(e) { if (!e) return {}; var t = e.errorMap, n = e.invalid_type_error, r = e.required_error, a = e.description; if (t && (n || r)) throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.'); if (t) return { errorMap: t, description: a }; return { errorMap: function(t, a) { var i, o, l = e.message; return "invalid_enum_value" === t.code ? { message: null != l ? l : a.defaultError } : void 0 === a.data ? { message: null !== (i = null != l ? l : r) && void 0 !== i ? i : a.defaultError } : "invalid_type" !== t.code ? { message: a.defaultError } : { message: null !== (o = null != l ? l : n) && void 0 !== o ? o : a.defaultError } }, description: a } } var nC, rC = function() { var e, t; function n(e) { var t = this; pb(this, n), this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = { version: 1, vendor: "zod", validate: function(e) { return t["~validate"](e) } } } return vb(n, [{ key: "_getType", value: function(e) { return Db(e.data) } }, { key: "_getOrReturnCtx", value: function(e, t) { return t || { common: e.parent.common, data: e.data, parsedType: Db(e.data), schemaErrorMap: this._def.errorMap, path: e.path, parent: e.parent } } }, { key: "_processInputParams", value: function(e) { return { status: new jb, ctx: { common: e.parent.common, data: e.data, parsedType: Db(e.data), schemaErrorMap: this._def.errorMap, path: e.path, parent: e.parent } } } }, { key: "_parseSync", value: function(e) { var t = this._parse(e); if (Jb(t)) throw new Error("Synchronous parse encountered promise."); return t } }, { key: "_parseAsync", value: function(e) { var t = this._parse(e); return Promise.resolve(t) } }, { key: "parse", value: function(e, t) { var n = this.safeParse(e, t); if (n.success) return n.data; throw n.error } }, { key: "safeParse", value: function(e, t) { var n, r = { common: { issues: [], async: null !== (n = null == t ? void 0 : t.async) && void 0 !== n && n, contextualErrorMap: null == t ? void 0 : t.errorMap }, path: (null == t ? void 0 : t.path) || [], schemaErrorMap: this._def.errorMap, parent: null, data: e, parsedType: Db(e) }, a = this._parseSync({ data: e, path: r.path, parent: r }); return eC(r, a) } }, { key: "~validate", value: function(e) { var t, n, r = { common: { issues: [], async: !!this["~standard"].async }, path: [], schemaErrorMap: this._def.errorMap, parent: null, data: e, parsedType: Db(e) }; if (!this["~standard"].async) try { var a = this._parseSync({ data: e, path: [], parent: r }); return Yb(a) ? { value: a.value } : { issues: r.common.issues } } catch (e) { (null === (n = null === (t = null == e ? void 0 : e.message) || void 0 === t ? void 0 : t.toLowerCase()) || void 0 === n ? void 0 : n.includes("encountered")) && (this["~standard"].async = !0), r.common = { issues: [], async: !0 } } return this._parseAsync({ data: e, path: [], parent: r }).then((function(e) { return Yb(e) ? { value: e.value } : { issues: r.common.issues } })) } }, { key: "parseAsync", value: (t = db(regeneratorRuntime.mark((function e(t, n) { var r; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: return e.next = 2, this.safeParseAsync(t, n); case 2: if (!(r = e.sent).success) { e.next = 5; break } return e.abrupt("return", r.data); case 5: throw r.error; case 6: case "end": return e.stop() } }), e, this) }))), function(e, n) { return t.apply(this, arguments) }) }, { key: "safeParseAsync", value: (e = db(regeneratorRuntime.mark((function e(t, n) { var r, a, i; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: return r = { common: { issues: [], contextualErrorMap: null == n ? void 0 : n.errorMap, async: !0 }, path: (null == n ? void 0 : n.path) || [], schemaErrorMap: this._def.errorMap, parent: null, data: t, parsedType: Db(t) }, a = this._parse({ data: t, path: r.path, parent: r }), e.next = 4, Jb(a) ? a : Promise.resolve(a); case 4: return i = e.sent, e.abrupt("return", eC(r, i)); case 6: case "end": return e.stop() } }), e, this) }))), function(t, n) { return e.apply(this, arguments) }) }, { key: "refine", value: function(e, t) { return this._refinement((function(n, r) { var a = e(n), i = function() { return r.addIssue(Ab({ code: Rb.custom }, function(e) { return "string" == typeof t || void 0 === t ? { message: t } : "function" == typeof t ? t(e) : t }(n))) }; return "undefined" != typeof Promise && a instanceof Promise ? a.then((function(e) { return !!e || (i(), !1) })) : !!a || (i(), !1) })) } }, { key: "refinement", value: function(e, t) { return this._refinement((function(n, r) { return !!e(n) || (r.addIssue("function" == typeof t ? t(n, r) : t), !1) })) } }, { key: "_refinement", value: function(e) { return new n_({ schema: this, typeName: d_.ZodEffects, effect: { type: "refinement", refinement: e } }) } }, { key: "superRefine", value: function(e) { return this._refinement(e) } }, { key: "description", get: function() { return this._def.description } }]), vb(n, [{ key: "optional", value: function() { return r_.create(this, this._def) } }, { key: "nullable", value: function() { return a_.create(this, this._def) } }, { key: "nullish", value: function() { return this.nullable().optional() } }, { key: "array", value: function() { return VC.create(this) } }, { key: "promise", value: function() { return t_.create(this, this._def) } }, { key: "or", value: function(e) { return HC.create([this, e], this._def) } }, { key: "and", value: function(e) { return zC.create(this, e, this._def) } }, { key: "transform", value: function(e) { return new n_(Ab(Ab({}, tC(this._def)), {}, { schema: this, typeName: d_.ZodEffects, effect: { type: "transform", transform: e } })) } }, { key: "default", value: function(e) { var t = "function" == typeof e ? e : function() { return e }; return new i_(Ab(Ab({}, tC(this._def)), {}, { innerType: this, defaultValue: t, typeName: d_.ZodDefault })) } }, { key: "brand", value: function() { return new u_(Ab({ typeName: d_.ZodBranded, type: this }, tC(this._def))) } }, { key: "catch", value: function(e) { var t = "function" == typeof e ? e : function() { return e }; return new o_(Ab(Ab({}, tC(this._def)), {}, { innerType: this, catchValue: t, typeName: d_.ZodCatch })) } }, { key: "describe", value: function(e) { return new(0, this.constructor)(Ab(Ab({}, this._def), {}, { description: e })) } }, { key: "pipe", value: function(e) { return c_.create(this, e) } }, { key: "readonly", value: function() { return s_.create(this) } }, { key: "isOptional", value: function() { return this.safeParse(void 0).success } }, { key: "isNullable", value: function() { return this.safeParse(null).success } }]), n }(), aC = /^c[^\s-]{8,}$/i, iC = /^[0-9a-z]+$/, oC = /^[0-9A-HJKMNP-TV-Z]{26}$/i, lC = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, uC = /^[a-z0-9_-]{21}$/i, cC = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, sC = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, dC = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, fC = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, pC = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, hC = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, vC = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, mC = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, yC = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, gC = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", EC = new RegExp("^".concat(gC, "$")); function bC(e) { var t = "[0-5]\\d"; e.precision ? t = "".concat(t, "\\.\\d{").concat(e.precision, "}") : null == e.precision && (t = "".concat(t, "(\\.\\d+)?")); var n = e.precision ? "+" : "?"; return "([01]\\d|2[0-3]):[0-5]\\d(:".concat(t, ")").concat(n) } function CC(e) { var t = "".concat(gC, "T").concat(bC(e)), n = []; return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = "".concat(t, "(").concat(n.join("|"), ")"), new RegExp("^".concat(t, "$")) } function _C(e, t) { return !("v4" !== t && t || !fC.test(e)) || !("v6" !== t && t || !hC.test(e)) } function SC(e, t) { if (!cC.test(e)) return !1; try { var n = cb(e.split("."), 1)[0], r = n.replace(/-/g, "+").replace(/_/g, "/").padEnd(n.length + (4 - n.length % 4) % 4, "="), a = JSON.parse(atob(r)); return "object" === Ib(a) && null !== a && (!(!a.typ || !a.alg) && (!t || a.alg === t)) } catch (e) { return !1 } } function IC(e, t) { return !("v4" !== t && t || !pC.test(e)) || !("v6" !== t && t || !vC.test(e)) } var TC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== kb.string) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.string, received: t.parsedType }), zb } var n, r = new jb, a = void 0, i = wb(this._def.checks); try { for (i.s(); !(n = i.n()).done;) { var o = n.value; if ("min" === o.kind) e.data.length < o.value && (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.too_small, minimum: o.value, type: "string", inclusive: !0, exact: !1, message: o.message }), r.dirty()); else if ("max" === o.kind) e.data.length > o.value && (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.too_big, maximum: o.value, type: "string", inclusive: !0, exact: !1, message: o.message }), r.dirty()); else if ("length" === o.kind) { var l = e.data.length > o.value, u = e.data.length < o.value; (l || u) && (a = this._getOrReturnCtx(e, a), l ? Wb(a, { code: Rb.too_big, maximum: o.value, type: "string", inclusive: !0, exact: !0, message: o.message }) : u && Wb(a, { code: Rb.too_small, minimum: o.value, type: "string", inclusive: !0, exact: !0, message: o.message }), r.dirty()) } else if ("email" === o.kind) dC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "email", code: Rb.invalid_string, message: o.message }), r.dirty()); else if ("emoji" === o.kind) nC || (nC = new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), nC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "emoji", code: Rb.invalid_string, message: o.message }), r.dirty()); else if ("uuid" === o.kind) lC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "uuid", code: Rb.invalid_string, message: o.message }), r.dirty()); else if ("nanoid" === o.kind) uC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "nanoid", code: Rb.invalid_string, message: o.message }), r.dirty()); else if ("cuid" === o.kind) aC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "cuid", code: Rb.invalid_string, message: o.message }), r.dirty()); else if ("cuid2" === o.kind) iC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "cuid2", code: Rb.invalid_string, message: o.message }), r.dirty()); else if ("ulid" === o.kind) oC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "ulid", code: Rb.invalid_string, message: o.message }), r.dirty()); else if ("url" === o.kind) try { new URL(e.data) } catch (t) { Wb(a = this._getOrReturnCtx(e, a), { validation: "url", code: Rb.invalid_string, message: o.message }), r.dirty() } else if ("regex" === o.kind) { o.regex.lastIndex = 0, o.regex.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "regex", code: Rb.invalid_string, message: o.message }), r.dirty()) } else if ("trim" === o.kind) e.data = e.data.trim(); else if ("includes" === o.kind) e.data.includes(o.value, o.position) || (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.invalid_string, validation: { includes: o.value, position: o.position }, message: o.message }), r.dirty()); else if ("toLowerCase" === o.kind) e.data = e.data.toLowerCase(); else if ("toUpperCase" === o.kind) e.data = e.data.toUpperCase(); else if ("startsWith" === o.kind) e.data.startsWith(o.value) || (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.invalid_string, validation: { startsWith: o.value }, message: o.message }), r.dirty()); else if ("endsWith" === o.kind) e.data.endsWith(o.value) || (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.invalid_string, validation: { endsWith: o.value }, message: o.message }), r.dirty()); else if ("datetime" === o.kind) { CC(o).test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.invalid_string, validation: "datetime", message: o.message }), r.dirty()) } else if ("date" === o.kind) { EC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.invalid_string, validation: "date", message: o.message }), r.dirty()) } else if ("time" === o.kind) { new RegExp("^".concat(bC(o), "$")).test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.invalid_string, validation: "time", message: o.message }), r.dirty()) } else "duration" === o.kind ? sC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "duration", code: Rb.invalid_string, message: o.message }), r.dirty()) : "ip" === o.kind ? _C(e.data, o.version) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "ip", code: Rb.invalid_string, message: o.message }), r.dirty()) : "jwt" === o.kind ? SC(e.data, o.alg) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "jwt", code: Rb.invalid_string, message: o.message }), r.dirty()) : "cidr" === o.kind ? IC(e.data, o.version) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "cidr", code: Rb.invalid_string, message: o.message }), r.dirty()) : "base64" === o.kind ? mC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "base64", code: Rb.invalid_string, message: o.message }), r.dirty()) : "base64url" === o.kind ? yC.test(e.data) || (Wb(a = this._getOrReturnCtx(e, a), { validation: "base64url", code: Rb.invalid_string, message: o.message }), r.dirty()) : lE.assertNever(o) } } catch (e) { i.e(e) } finally { i.f() } return { status: r.value, value: e.data } } }, { key: "_regex", value: function(e, t, n) { return this.refinement((function(t) { return e.test(t) }), Ab({ validation: t, code: Rb.invalid_string }, Hb.errToObj(n))) } }, { key: "_addCheck", value: function(e) { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [e]) })) } }, { key: "email", value: function(e) { return this._addCheck(Ab({ kind: "email" }, Hb.errToObj(e))) } }, { key: "url", value: function(e) { return this._addCheck(Ab({ kind: "url" }, Hb.errToObj(e))) } }, { key: "emoji", value: function(e) { return this._addCheck(Ab({ kind: "emoji" }, Hb.errToObj(e))) } }, { key: "uuid", value: function(e) { return this._addCheck(Ab({ kind: "uuid" }, Hb.errToObj(e))) } }, { key: "nanoid", value: function(e) { return this._addCheck(Ab({ kind: "nanoid" }, Hb.errToObj(e))) } }, { key: "cuid", value: function(e) { return this._addCheck(Ab({ kind: "cuid" }, Hb.errToObj(e))) } }, { key: "cuid2", value: function(e) { return this._addCheck(Ab({ kind: "cuid2" }, Hb.errToObj(e))) } }, { key: "ulid", value: function(e) { return this._addCheck(Ab({ kind: "ulid" }, Hb.errToObj(e))) } }, { key: "base64", value: function(e) { return this._addCheck(Ab({ kind: "base64" }, Hb.errToObj(e))) } }, { key: "base64url", value: function(e) { return this._addCheck(Ab({ kind: "base64url" }, Hb.errToObj(e))) } }, { key: "jwt", value: function(e) { return this._addCheck(Ab({ kind: "jwt" }, Hb.errToObj(e))) } }, { key: "ip", value: function(e) { return this._addCheck(Ab({ kind: "ip" }, Hb.errToObj(e))) } }, { key: "cidr", value: function(e) { return this._addCheck(Ab({ kind: "cidr" }, Hb.errToObj(e))) } }, { key: "datetime", value: function(e) { var t, n; return "string" == typeof e ? this._addCheck({ kind: "datetime", precision: null, offset: !1, local: !1, message: e }) : this._addCheck(Ab({ kind: "datetime", precision: void 0 === (null == e ? void 0 : e.precision) ? null : null == e ? void 0 : e.precision, offset: null !== (t = null == e ? void 0 : e.offset) && void 0 !== t && t, local: null !== (n = null == e ? void 0 : e.local) && void 0 !== n && n }, Hb.errToObj(null == e ? void 0 : e.message))) } }, { key: "date", value: function(e) { return this._addCheck({ kind: "date", message: e }) } }, { key: "time", value: function(e) { return "string" == typeof e ? this._addCheck({ kind: "time", precision: null, message: e }) : this._addCheck(Ab({ kind: "time", precision: void 0 === (null == e ? void 0 : e.precision) ? null : null == e ? void 0 : e.precision }, Hb.errToObj(null == e ? void 0 : e.message))) } }, { key: "duration", value: function(e) { return this._addCheck(Ab({ kind: "duration" }, Hb.errToObj(e))) } }, { key: "regex", value: function(e, t) { return this._addCheck(Ab({ kind: "regex", regex: e }, Hb.errToObj(t))) } }, { key: "includes", value: function(e, t) { return this._addCheck(Ab({ kind: "includes", value: e, position: null == t ? void 0 : t.position }, Hb.errToObj(null == t ? void 0 : t.message))) } }, { key: "startsWith", value: function(e, t) { return this._addCheck(Ab({ kind: "startsWith", value: e }, Hb.errToObj(t))) } }, { key: "endsWith", value: function(e, t) { return this._addCheck(Ab({ kind: "endsWith", value: e }, Hb.errToObj(t))) } }, { key: "min", value: function(e, t) { return this._addCheck(Ab({ kind: "min", value: e }, Hb.errToObj(t))) } }, { key: "max", value: function(e, t) { return this._addCheck(Ab({ kind: "max", value: e }, Hb.errToObj(t))) } }, { key: "length", value: function(e, t) { return this._addCheck(Ab({ kind: "length", value: e }, Hb.errToObj(t))) } }, { key: "nonempty", value: function(e) { return this.min(1, Hb.errToObj(e)) } }, { key: "trim", value: function() { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [{ kind: "trim" }]) })) } }, { key: "toLowerCase", value: function() { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [{ kind: "toLowerCase" }]) })) } }, { key: "toUpperCase", value: function() { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [{ kind: "toUpperCase" }]) })) } }, { key: "isDatetime", get: function() { return !!this._def.checks.find((function(e) { return "datetime" === e.kind })) } }, { key: "isDate", get: function() { return !!this._def.checks.find((function(e) { return "date" === e.kind })) } }, { key: "isTime", get: function() { return !!this._def.checks.find((function(e) { return "time" === e.kind })) } }, { key: "isDuration", get: function() { return !!this._def.checks.find((function(e) { return "duration" === e.kind })) } }, { key: "isEmail", get: function() { return !!this._def.checks.find((function(e) { return "email" === e.kind })) } }, { key: "isURL", get: function() { return !!this._def.checks.find((function(e) { return "url" === e.kind })) } }, { key: "isEmoji", get: function() { return !!this._def.checks.find((function(e) { return "emoji" === e.kind })) } }, { key: "isUUID", get: function() { return !!this._def.checks.find((function(e) { return "uuid" === e.kind })) } }, { key: "isNANOID", get: function() { return !!this._def.checks.find((function(e) { return "nanoid" === e.kind })) } }, { key: "isCUID", get: function() { return !!this._def.checks.find((function(e) { return "cuid" === e.kind })) } }, { key: "isCUID2", get: function() { return !!this._def.checks.find((function(e) { return "cuid2" === e.kind })) } }, { key: "isULID", get: function() { return !!this._def.checks.find((function(e) { return "ulid" === e.kind })) } }, { key: "isIP", get: function() { return !!this._def.checks.find((function(e) { return "ip" === e.kind })) } }, { key: "isCIDR", get: function() { return !!this._def.checks.find((function(e) { return "cidr" === e.kind })) } }, { key: "isBase64", get: function() { return !!this._def.checks.find((function(e) { return "base64" === e.kind })) } }, { key: "isBase64url", get: function() { return !!this._def.checks.find((function(e) { return "base64url" === e.kind })) } }, { key: "minLength", get: function() { var e, t = null, n = wb(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "min" === r.kind && (null === t || r.value > t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "maxLength", get: function() { var e, t = null, n = wb(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "max" === r.kind && (null === t || r.value < t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }]), n }(rC); TC.create = function(e) { var t; return new TC(Ab({ checks: [], typeName: d_.ZodString, coerce: null !== (t = null == e ? void 0 : e.coerce) && void 0 !== t && t }, tC(e))) }; var AC = function(e) { mb(n, e); var t = yb(n); function n() { var e; return pb(this, n), (e = t.apply(this, arguments)).min = e.gte, e.max = e.lte, e.step = e.multipleOf, e } return vb(n, [{ key: "_parse", value: function(e) { if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== kb.number) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.number, received: t.parsedType }), zb } var n, r, a, i, o, l, u = void 0, c = new jb, s = wb(this._def.checks); try { for (s.s(); !(n = s.n()).done;) { var d = n.value; if ("int" === d.kind) lE.isInteger(e.data) || (Wb(u = this._getOrReturnCtx(e, u), { code: Rb.invalid_type, expected: "integer", received: "float", message: d.message }), c.dirty()); else if ("min" === d.kind) { (d.inclusive ? e.data < d.value : e.data <= d.value) && (Wb(u = this._getOrReturnCtx(e, u), { code: Rb.too_small, minimum: d.value, type: "number", inclusive: d.inclusive, exact: !1, message: d.message }), c.dirty()) } else if ("max" === d.kind) { (d.inclusive ? e.data > d.value : e.data >= d.value) && (Wb(u = this._getOrReturnCtx(e, u), { code: Rb.too_big, maximum: d.value, type: "number", inclusive: d.inclusive, exact: !1, message: d.message }), c.dirty()) } else "multipleOf" === d.kind ? 0 != (r = e.data, a = d.value, i = void 0, o = void 0, l = void 0, i = (r.toString().split(".")[1] || "").length, o = (a.toString().split(".")[1] || "").length, l = i > o ? i : o, parseInt(r.toFixed(l).replace(".", "")) % parseInt(a.toFixed(l).replace(".", "")) / Math.pow(10, l)) && (Wb(u = this._getOrReturnCtx(e, u), { code: Rb.not_multiple_of, multipleOf: d.value, message: d.message }), c.dirty()) : "finite" === d.kind ? Number.isFinite(e.data) || (Wb(u = this._getOrReturnCtx(e, u), { code: Rb.not_finite, message: d.message }), c.dirty()) : lE.assertNever(d) } } catch (e) { s.e(e) } finally { s.f() } return { status: c.value, value: e.data } } }, { key: "gte", value: function(e, t) { return this.setLimit("min", e, !0, Hb.toString(t)) } }, { key: "gt", value: function(e, t) { return this.setLimit("min", e, !1, Hb.toString(t)) } }, { key: "lte", value: function(e, t) { return this.setLimit("max", e, !0, Hb.toString(t)) } }, { key: "lt", value: function(e, t) { return this.setLimit("max", e, !1, Hb.toString(t)) } }, { key: "setLimit", value: function(e, t, r, a) { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [{ kind: e, value: t, inclusive: r, message: Hb.toString(a) }]) })) } }, { key: "_addCheck", value: function(e) { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [e]) })) } }, { key: "int", value: function(e) { return this._addCheck({ kind: "int", message: Hb.toString(e) }) } }, { key: "positive", value: function(e) { return this._addCheck({ kind: "min", value: 0, inclusive: !1, message: Hb.toString(e) }) } }, { key: "negative", value: function(e) { return this._addCheck({ kind: "max", value: 0, inclusive: !1, message: Hb.toString(e) }) } }, { key: "nonpositive", value: function(e) { return this._addCheck({ kind: "max", value: 0, inclusive: !0, message: Hb.toString(e) }) } }, { key: "nonnegative", value: function(e) { return this._addCheck({ kind: "min", value: 0, inclusive: !0, message: Hb.toString(e) }) } }, { key: "multipleOf", value: function(e, t) { return this._addCheck({ kind: "multipleOf", value: e, message: Hb.toString(t) }) } }, { key: "finite", value: function(e) { return this._addCheck({ kind: "finite", message: Hb.toString(e) }) } }, { key: "safe", value: function(e) { return this._addCheck({ kind: "min", inclusive: !0, value: Number.MIN_SAFE_INTEGER, message: Hb.toString(e) })._addCheck({ kind: "max", inclusive: !0, value: Number.MAX_SAFE_INTEGER, message: Hb.toString(e) }) } }, { key: "minValue", get: function() { var e, t = null, n = wb(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "min" === r.kind && (null === t || r.value > t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "maxValue", get: function() { var e, t = null, n = wb(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "max" === r.kind && (null === t || r.value < t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "isInt", get: function() { return !!this._def.checks.find((function(e) { return "int" === e.kind || "multipleOf" === e.kind && lE.isInteger(e.value) })) } }, { key: "isFinite", get: function() { var e, t = null, n = null, r = wb(this._def.checks); try { for (r.s(); !(e = r.n()).done;) { var a = e.value; if ("finite" === a.kind || "int" === a.kind || "multipleOf" === a.kind) return !0; "min" === a.kind ? (null === n || a.value > n) && (n = a.value) : "max" === a.kind && (null === t || a.value < t) && (t = a.value) } } catch (e) { r.e(e) } finally { r.f() } return Number.isFinite(n) && Number.isFinite(t) } }]), n }(rC); AC.create = function(e) { return new AC(Ab({ checks: [], typeName: d_.ZodNumber, coerce: (null == e ? void 0 : e.coerce) || !1 }, tC(e))) }; var NC = function(e) { mb(n, e); var t = yb(n); function n() { var e; return pb(this, n), (e = t.apply(this, arguments)).min = e.gte, e.max = e.lte, e } return vb(n, [{ key: "_parse", value: function(e) { if (this._def.coerce) try { e.data = BigInt(e.data) } catch (t) { return this._getInvalidInput(e) } if (this._getType(e) !== kb.bigint) return this._getInvalidInput(e); var t, n = void 0, r = new jb, a = wb(this._def.checks); try { for (a.s(); !(t = a.n()).done;) { var i = t.value; if ("min" === i.kind)(i.inclusive ? e.data < i.value : e.data <= i.value) && (Wb(n = this._getOrReturnCtx(e, n), { code: Rb.too_small, type: "bigint", minimum: i.value, inclusive: i.inclusive, message: i.message }), r.dirty()); else if ("max" === i.kind) { (i.inclusive ? e.data > i.value : e.data >= i.value) && (Wb(n = this._getOrReturnCtx(e, n), { code: Rb.too_big, type: "bigint", maximum: i.value, inclusive: i.inclusive, message: i.message }), r.dirty()) } else "multipleOf" === i.kind ? e.data % i.value !== BigInt(0) && (Wb(n = this._getOrReturnCtx(e, n), { code: Rb.not_multiple_of, multipleOf: i.value, message: i.message }), r.dirty()) : lE.assertNever(i) } } catch (e) { a.e(e) } finally { a.f() } return { status: r.value, value: e.data } } }, { key: "_getInvalidInput", value: function(e) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.bigint, received: t.parsedType }), zb } }, { key: "gte", value: function(e, t) { return this.setLimit("min", e, !0, Hb.toString(t)) } }, { key: "gt", value: function(e, t) { return this.setLimit("min", e, !1, Hb.toString(t)) } }, { key: "lte", value: function(e, t) { return this.setLimit("max", e, !0, Hb.toString(t)) } }, { key: "lt", value: function(e, t) { return this.setLimit("max", e, !1, Hb.toString(t)) } }, { key: "setLimit", value: function(e, t, r, a) { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [{ kind: e, value: t, inclusive: r, message: Hb.toString(a) }]) })) } }, { key: "_addCheck", value: function(e) { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [e]) })) } }, { key: "positive", value: function(e) { return this._addCheck({ kind: "min", value: BigInt(0), inclusive: !1, message: Hb.toString(e) }) } }, { key: "negative", value: function(e) { return this._addCheck({ kind: "max", value: BigInt(0), inclusive: !1, message: Hb.toString(e) }) } }, { key: "nonpositive", value: function(e) { return this._addCheck({ kind: "max", value: BigInt(0), inclusive: !0, message: Hb.toString(e) }) } }, { key: "nonnegative", value: function(e) { return this._addCheck({ kind: "min", value: BigInt(0), inclusive: !0, message: Hb.toString(e) }) } }, { key: "multipleOf", value: function(e, t) { return this._addCheck({ kind: "multipleOf", value: e, message: Hb.toString(t) }) } }, { key: "minValue", get: function() { var e, t = null, n = wb(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "min" === r.kind && (null === t || r.value > t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "maxValue", get: function() { var e, t = null, n = wb(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "max" === r.kind && (null === t || r.value < t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }]), n }(rC); NC.create = function(e) { var t; return new NC(Ab({ checks: [], typeName: d_.ZodBigInt, coerce: null !== (t = null == e ? void 0 : e.coerce) && void 0 !== t && t }, tC(e))) }; var wC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (this._def.coerce && (e.data = Boolean(e.data)), this._getType(e) !== kb.boolean) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.boolean, received: t.parsedType }), zb } return qb(e.data) } }]), n }(rC); wC.create = function(e) { return new wC(Ab({ typeName: d_.ZodBoolean, coerce: (null == e ? void 0 : e.coerce) || !1 }, tC(e))) }; var LC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== kb.date) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.date, received: t.parsedType }), zb } if (isNaN(e.data.getTime())) return Wb(this._getOrReturnCtx(e), { code: Rb.invalid_date }), zb; var n, r = new jb, a = void 0, i = wb(this._def.checks); try { for (i.s(); !(n = i.n()).done;) { var o = n.value; "min" === o.kind ? e.data.getTime() < o.value && (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.too_small, message: o.message, inclusive: !0, exact: !1, minimum: o.value, type: "date" }), r.dirty()) : "max" === o.kind ? e.data.getTime() > o.value && (Wb(a = this._getOrReturnCtx(e, a), { code: Rb.too_big, message: o.message, inclusive: !0, exact: !1, maximum: o.value, type: "date" }), r.dirty()) : lE.assertNever(o) } } catch (e) { i.e(e) } finally { i.f() } return { status: r.value, value: new Date(e.data.getTime()) } } }, { key: "_addCheck", value: function(e) { return new n(Ab(Ab({}, this._def), {}, { checks: [].concat(fb(this._def.checks), [e]) })) } }, { key: "min", value: function(e, t) { return this._addCheck({ kind: "min", value: e.getTime(), message: Hb.toString(t) }) } }, { key: "max", value: function(e, t) { return this._addCheck({ kind: "max", value: e.getTime(), message: Hb.toString(t) }) } }, { key: "minDate", get: function() { var e, t = null, n = wb(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "min" === r.kind && (null === t || r.value > t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return null != t ? new Date(t) : null } }, { key: "maxDate", get: function() { var e, t = null, n = wb(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "max" === r.kind && (null === t || r.value < t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return null != t ? new Date(t) : null } }]), n }(rC); LC.create = function(e) { return new LC(Ab({ checks: [], coerce: (null == e ? void 0 : e.coerce) || !1, typeName: d_.ZodDate }, tC(e))) }; var OC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== kb.symbol) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.symbol, received: t.parsedType }), zb } return qb(e.data) } }]), n }(rC); OC.create = function(e) { return new OC(Ab({ typeName: d_.ZodSymbol }, tC(e))) }; var kC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== kb.undefined) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.undefined, received: t.parsedType }), zb } return qb(e.data) } }]), n }(rC); kC.create = function(e) { return new kC(Ab({ typeName: d_.ZodUndefined }, tC(e))) }; var DC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== kb.null) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.null, received: t.parsedType }), zb } return qb(e.data) } }]), n }(rC); DC.create = function(e) { return new DC(Ab({ typeName: d_.ZodNull }, tC(e))) }; var RC = function(e) { mb(n, e); var t = yb(n); function n() { var e; return pb(this, n), (e = t.apply(this, arguments))._any = !0, e } return vb(n, [{ key: "_parse", value: function(e) { return qb(e.data) } }]), n }(rC); RC.create = function(e) { return new RC(Ab({ typeName: d_.ZodAny }, tC(e))) }; var PC = function(e) { mb(n, e); var t = yb(n); function n() { var e; return pb(this, n), (e = t.apply(this, arguments))._unknown = !0, e } return vb(n, [{ key: "_parse", value: function(e) { return qb(e.data) } }]), n }(rC); PC.create = function(e) { return new PC(Ab({ typeName: d_.ZodUnknown }, tC(e))) }; var xC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.never, received: t.parsedType }), zb } }]), n }(rC); xC.create = function(e) { return new xC(Ab({ typeName: d_.ZodNever }, tC(e))) }; var MC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== kb.undefined) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.void, received: t.parsedType }), zb } return qb(e.data) } }]), n }(rC); MC.create = function(e) { return new MC(Ab({ typeName: d_.ZodVoid }, tC(e))) }; var VC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.ctx, r = t.status, a = this._def; if (n.parsedType !== kb.array) return Wb(n, { code: Rb.invalid_type, expected: kb.array, received: n.parsedType }), zb; if (null !== a.exactLength) { var i = n.data.length > a.exactLength.value, o = n.data.length < a.exactLength.value; (i || o) && (Wb(n, { code: i ? Rb.too_big : Rb.too_small, minimum: o ? a.exactLength.value : void 0, maximum: i ? a.exactLength.value : void 0, type: "array", inclusive: !0, exact: !0, message: a.exactLength.message }), r.dirty()) } if (null !== a.minLength && n.data.length < a.minLength.value && (Wb(n, { code: Rb.too_small, minimum: a.minLength.value, type: "array", inclusive: !0, exact: !1, message: a.minLength.message }), r.dirty()), null !== a.maxLength && n.data.length > a.maxLength.value && (Wb(n, { code: Rb.too_big, maximum: a.maxLength.value, type: "array", inclusive: !0, exact: !1, message: a.maxLength.message }), r.dirty()), n.common.async) return Promise.all(fb(n.data).map((function(e, t) { return a.type._parseAsync(new $b(n, e, n.path, t)) }))).then((function(e) { return jb.mergeArray(r, e) })); var l = fb(n.data).map((function(e, t) { return a.type._parseSync(new $b(n, e, n.path, t)) })); return jb.mergeArray(r, l) } }, { key: "min", value: function(e, t) { return new n(Ab(Ab({}, this._def), {}, { minLength: { value: e, message: Hb.toString(t) } })) } }, { key: "max", value: function(e, t) { return new n(Ab(Ab({}, this._def), {}, { maxLength: { value: e, message: Hb.toString(t) } })) } }, { key: "length", value: function(e, t) { return new n(Ab(Ab({}, this._def), {}, { exactLength: { value: e, message: Hb.toString(t) } })) } }, { key: "nonempty", value: function(e) { return this.min(1, e) } }, { key: "element", get: function() { return this._def.type } }]), n }(rC); function UC(e) { if (e instanceof WC) { var t = {}; for (var n in e.shape) { var r = e.shape[n]; t[n] = r_.create(UC(r)) } return new WC(Ab(Ab({}, e._def), {}, { shape: function() { return t } })) } return e instanceof VC ? new VC(Ab(Ab({}, e._def), {}, { type: UC(e.element) })) : e instanceof r_ ? r_.create(UC(e.unwrap())) : e instanceof a_ ? a_.create(UC(e.unwrap())) : e instanceof ZC ? ZC.create(e.items.map((function(e) { return UC(e) }))) : e } VC.create = function(e, t) { return new VC(Ab({ type: e, minLength: null, maxLength: null, exactLength: null, typeName: d_.ZodArray }, tC(t))) }; var WC = function(e) { mb(n, e); var t = yb(n); function n() { var e; return pb(this, n), (e = t.apply(this, arguments))._cached = null, e.nonstrict = e.passthrough, e.augment = e.extend, e } return vb(n, [{ key: "_getCached", value: function() { if (null !== this._cached) return this._cached; var e = this._def.shape(), t = lE.objectKeys(e); return this._cached = { shape: e, keys: t } } }, { key: "_parse", value: function(e) { if (this._getType(e) !== kb.object) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.object, received: t.parsedType }), zb } var n = this._processInputParams(e), r = n.status, a = n.ctx, i = this._getCached(), o = i.shape, l = i.keys, u = []; if (!(this._def.catchall instanceof xC && "strip" === this._def.unknownKeys)) for (var c in a.data) l.includes(c) || u.push(c); var s, d = [], f = wb(l); try { for (f.s(); !(s = f.n()).done;) { var p = s.value, h = o[p], v = a.data[p]; d.push({ key: { status: "valid", value: p }, value: h._parse(new $b(a, v, a.path, p)), alwaysSet: p in a.data }) } } catch (e) { f.e(e) } finally { f.f() } if (this._def.catchall instanceof xC) { var m = this._def.unknownKeys; if ("passthrough" === m) { var y, g = wb(u); try { for (g.s(); !(y = g.n()).done;) { var E = y.value; d.push({ key: { status: "valid", value: E }, value: { status: "valid", value: a.data[E] } }) } } catch (e) { g.e(e) } finally { g.f() } } else if ("strict" === m) u.length > 0 && (Wb(a, { code: Rb.unrecognized_keys, keys: u }), r.dirty()); else if ("strip" !== m) throw new Error("Internal ZodObject error: invalid unknownKeys value.") } else { var b, C = this._def.catchall, _ = wb(u); try { for (_.s(); !(b = _.n()).done;) { var S = b.value, I = a.data[S]; d.push({ key: { status: "valid", value: S }, value: C._parse(new $b(a, I, a.path, S)), alwaysSet: S in a.data }) } } catch (e) { _.e(e) } finally { _.f() } } return a.common.async ? Promise.resolve().then(db(regeneratorRuntime.mark((function e() { var t, n, r, a, i, o; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: t = [], n = wb(d), e.prev = 2, n.s(); case 4: if ((r = n.n()).done) { e.next = 15; break } return a = r.value, e.next = 8, a.key; case 8: return i = e.sent, e.next = 11, a.value; case 11: o = e.sent, t.push({ key: i, value: o, alwaysSet: a.alwaysSet }); case 13: e.next = 4; break; case 15: e.next = 20; break; case 17: e.prev = 17, e.t0 = e.catch(2), n.e(e.t0); case 20: return e.prev = 20, n.f(), e.finish(20); case 23: return e.abrupt("return", t); case 24: case "end": return e.stop() } }), e, null, [ [2, 17, 20, 23] ]) })))).then((function(e) { return jb.mergeObjectSync(r, e) })) : jb.mergeObjectSync(r, d) } }, { key: "strict", value: function(e) { var t = this; return Hb.errToObj, new n(Ab(Ab({}, this._def), {}, { unknownKeys: "strict" }, void 0 !== e ? { errorMap: function(n, r) { var a, i, o, l, u = null !== (o = null === (i = (a = t._def).errorMap) || void 0 === i ? void 0 : i.call(a, n, r).message) && void 0 !== o ? o : r.defaultError; return "unrecognized_keys" === n.code ? { message: null !== (l = Hb.errToObj(e).message) && void 0 !== l ? l : u } : { message: u } } } : {})) } }, { key: "strip", value: function() { return new n(Ab(Ab({}, this._def), {}, { unknownKeys: "strip" })) } }, { key: "passthrough", value: function() { return new n(Ab(Ab({}, this._def), {}, { unknownKeys: "passthrough" })) } }, { key: "extend", value: function(e) { var t = this; return new n(Ab(Ab({}, this._def), {}, { shape: function() { return Ab(Ab({}, t._def.shape()), e) } })) } }, { key: "merge", value: function(e) { var t = this; return new n({ unknownKeys: e._def.unknownKeys, catchall: e._def.catchall, shape: function() { return Ab(Ab({}, t._def.shape()), e._def.shape()) }, typeName: d_.ZodObject }) } }, { key: "setKey", value: function(e, t) { return this.augment(Nb({}, e, t)) } }, { key: "catchall", value: function(e) { return new n(Ab(Ab({}, this._def), {}, { catchall: e })) } }, { key: "pick", value: function(e) { var t = this, r = {}; return lE.objectKeys(e).forEach((function(n) { e[n] && t.shape[n] && (r[n] = t.shape[n]) })), new n(Ab(Ab({}, this._def), {}, { shape: function() { return r } })) } }, { key: "omit", value: function(e) { var t = this, r = {}; return lE.objectKeys(this.shape).forEach((function(n) { e[n] || (r[n] = t.shape[n]) })), new n(Ab(Ab({}, this._def), {}, { shape: function() { return r } })) } }, { key: "deepPartial", value: function() { return UC(this) } }, { key: "partial", value: function(e) { var t = this, r = {}; return lE.objectKeys(this.shape).forEach((function(n) { var a = t.shape[n]; e && !e[n] ? r[n] = a : r[n] = a.optional() })), new n(Ab(Ab({}, this._def), {}, { shape: function() { return r } })) } }, { key: "required", value: function(e) { var t = this, r = {}; return lE.objectKeys(this.shape).forEach((function(n) { if (e && !e[n]) r[n] = t.shape[n]; else { for (var a = t.shape[n]; a instanceof r_;) a = a._def.innerType; r[n] = a } })), new n(Ab(Ab({}, this._def), {}, { shape: function() { return r } })) } }, { key: "keyof", value: function() { return QC(lE.objectKeys(this.shape)) } }, { key: "shape", get: function() { return this._def.shape() } }]), n }(rC); WC.create = function(e, t) { return new WC(Ab({ shape: function() { return e }, unknownKeys: "strip", catchall: xC.create(), typeName: d_.ZodObject }, tC(t))) }, WC.strictCreate = function(e, t) { return new WC(Ab({ shape: function() { return e }, unknownKeys: "strict", catchall: xC.create(), typeName: d_.ZodObject }, tC(t))) }, WC.lazycreate = function(e, t) { return new WC(Ab({ shape: e, unknownKeys: "strip", catchall: xC.create(), typeName: d_.ZodObject }, tC(t))) }; var HC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx, n = this._def.options; if (t.common.async) return Promise.all(n.map(function() { var e = db(regeneratorRuntime.mark((function e(n) { var r; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: return r = Ab(Ab({}, t), {}, { common: Ab(Ab({}, t.common), {}, { issues: [] }), parent: null }), e.next = 3, n._parseAsync({ data: t.data, path: t.path, parent: r }); case 3: return e.t0 = e.sent, e.t1 = r, e.abrupt("return", { result: e.t0, ctx: e.t1 }); case 6: case "end": return e.stop() } }), e) }))); return function(t) { return e.apply(this, arguments) } }())).then((function(e) { var n, r = wb(e); try { for (r.s(); !(n = r.n()).done;) { var a = n.value; if ("valid" === a.result.status) return a.result } } catch (e) { r.e(e) } finally { r.f() } var i, o = wb(e); try { for (o.s(); !(i = o.n()).done;) { var l, u = i.value; if ("dirty" === u.result.status) return (l = t.common.issues).push.apply(l, fb(u.ctx.common.issues)), u.result } } catch (e) { o.e(e) } finally { o.f() } var c = e.map((function(e) { return new Pb(e.ctx.common.issues) })); return Wb(t, { code: Rb.invalid_union, unionErrors: c }), zb })); var r, a, i = void 0, o = [], l = wb(n); try { for (l.s(); !(r = l.n()).done;) { var u = r.value, c = Ab(Ab({}, t), {}, { common: Ab(Ab({}, t.common), {}, { issues: [] }), parent: null }), s = u._parseSync({ data: t.data, path: t.path, parent: c }); if ("valid" === s.status) return s; "dirty" !== s.status || i || (i = { result: s, ctx: c }), c.common.issues.length && o.push(c.common.issues) } } catch (e) { l.e(e) } finally { l.f() } if (i) return (a = t.common.issues).push.apply(a, fb(i.ctx.common.issues)), i.result; var d = o.map((function(e) { return new Pb(e) })); return Wb(t, { code: Rb.invalid_union, unionErrors: d }), zb } }, { key: "options", get: function() { return this._def.options } }]), n }(rC); HC.create = function(e, t) { return new HC(Ab({ options: e, typeName: d_.ZodUnion }, tC(t))) }; var FC = function e(t) { return t instanceof JC ? e(t.schema) : t instanceof n_ ? e(t.innerType()) : t instanceof XC ? [t.value] : t instanceof $C ? t.options : t instanceof e_ ? lE.objectValues(t.enum) : t instanceof i_ ? e(t._def.innerType) : t instanceof kC ? [void 0] : t instanceof DC ? [null] : t instanceof r_ ? [void 0].concat(fb(e(t.unwrap()))) : t instanceof a_ ? [null].concat(fb(e(t.unwrap()))) : t instanceof u_ || t instanceof s_ ? e(t.unwrap()) : t instanceof o_ ? e(t._def.innerType) : [] }, GC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx; if (t.parsedType !== kb.object) return Wb(t, { code: Rb.invalid_type, expected: kb.object, received: t.parsedType }), zb; var n = this.discriminator, r = t.data[n], a = this.optionsMap.get(r); return a ? t.common.async ? a._parseAsync({ data: t.data, path: t.path, parent: t }) : a._parseSync({ data: t.data, path: t.path, parent: t }) : (Wb(t, { code: Rb.invalid_union_discriminator, options: Array.from(this.optionsMap.keys()), path: [n] }), zb) } }, { key: "discriminator", get: function() { return this._def.discriminator } }, { key: "options", get: function() { return this._def.options } }, { key: "optionsMap", get: function() { return this._def.optionsMap } }], [{ key: "create", value: function(e, t, r) { var a, i = new Map, o = wb(t); try { for (o.s(); !(a = o.n()).done;) { var l = a.value, u = FC(l.shape[e]); if (!u.length) throw new Error("A discriminator value for key `".concat(e, "` could not be extracted from all schema options")); var c, s = wb(u); try { for (s.s(); !(c = s.n()).done;) { var d = c.value; if (i.has(d)) throw new Error("Discriminator property ".concat(String(e), " has duplicate value ").concat(String(d))); i.set(d, l) } } catch (e) { s.e(e) } finally { s.f() } } } catch (e) { o.e(e) } finally { o.f() } return new n(Ab({ typeName: d_.ZodDiscriminatedUnion, discriminator: e, options: t, optionsMap: i }, tC(r))) } }]), n }(rC); function jC(e, t) { var n = Db(e), r = Db(t); if (e === t) return { valid: !0, data: e }; if (n === kb.object && r === kb.object) { var a, i = lE.objectKeys(t), o = lE.objectKeys(e).filter((function(e) { return -1 !== i.indexOf(e) })), l = Ab(Ab({}, e), t), u = wb(o); try { for (u.s(); !(a = u.n()).done;) { var c = a.value, s = jC(e[c], t[c]); if (!s.valid) return { valid: !1 }; l[c] = s.data } } catch (e) { u.e(e) } finally { u.f() } return { valid: !0, data: l } } if (n === kb.array && r === kb.array) { if (e.length !== t.length) return { valid: !1 }; for (var d = [], f = 0; f < e.length; f++) { var p = jC(e[f], t[f]); if (!p.valid) return { valid: !1 }; d.push(p.data) } return { valid: !0, data: d } } return n === kb.date && r === kb.date && +e == +t ? { valid: !0, data: e } : { valid: !1 } } var zC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.status, r = t.ctx, a = function(e, t) { if (Bb(e) || Bb(t)) return zb; var a = jC(e.value, t.value); return a.valid ? ((Kb(e) || Kb(t)) && n.dirty(), { status: n.value, value: a.data }) : (Wb(r, { code: Rb.invalid_intersection_types }), zb) }; return r.common.async ? Promise.all([this._def.left._parseAsync({ data: r.data, path: r.path, parent: r }), this._def.right._parseAsync({ data: r.data, path: r.path, parent: r })]).then((function(e) { var t = cb(e, 2), n = t[0], r = t[1]; return a(n, r) })) : a(this._def.left._parseSync({ data: r.data, path: r.path, parent: r }), this._def.right._parseSync({ data: r.data, path: r.path, parent: r })) } }]), n }(rC); zC.create = function(e, t, n) { return new zC(Ab({ left: e, right: t, typeName: d_.ZodIntersection }, tC(n))) }; var ZC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e), r = n.status, a = n.ctx; if (a.parsedType !== kb.array) return Wb(a, { code: Rb.invalid_type, expected: kb.array, received: a.parsedType }), zb; if (a.data.length < this._def.items.length) return Wb(a, { code: Rb.too_small, minimum: this._def.items.length, inclusive: !0, exact: !1, type: "array" }), zb;!this._def.rest && a.data.length > this._def.items.length && (Wb(a, { code: Rb.too_big, maximum: this._def.items.length, inclusive: !0, exact: !1, type: "array" }), r.dirty()); var i = fb(a.data).map((function(e, n) { var r = t._def.items[n] || t._def.rest; return r ? r._parse(new $b(a, e, a.path, n)) : null })).filter((function(e) { return !!e })); return a.common.async ? Promise.all(i).then((function(e) { return jb.mergeArray(r, e) })) : jb.mergeArray(r, i) } }, { key: "rest", value: function(e) { return new n(Ab(Ab({}, this._def), {}, { rest: e })) } }, { key: "items", get: function() { return this._def.items } }]), n }(rC); ZC.create = function(e, t) { if (!Array.isArray(e)) throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); return new ZC(Ab({ items: e, typeName: d_.ZodTuple, rest: null }, tC(t))) }; var qC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.status, r = t.ctx; if (r.parsedType !== kb.object) return Wb(r, { code: Rb.invalid_type, expected: kb.object, received: r.parsedType }), zb; var a = [], i = this._def.keyType, o = this._def.valueType; for (var l in r.data) a.push({ key: i._parse(new $b(r, l, r.path, l)), value: o._parse(new $b(r, r.data[l], r.path, l)), alwaysSet: l in r.data }); return r.common.async ? jb.mergeObjectAsync(n, a) : jb.mergeObjectSync(n, a) } }, { key: "keySchema", get: function() { return this._def.keyType } }, { key: "valueSchema", get: function() { return this._def.valueType } }, { key: "element", get: function() { return this._def.valueType } }], [{ key: "create", value: function(e, t, r) { return new n(t instanceof rC ? Ab({ keyType: e, valueType: t, typeName: d_.ZodRecord }, tC(r)) : Ab({ keyType: TC.create(), valueType: e, typeName: d_.ZodRecord }, tC(t))) } }]), n }(rC), BC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.status, r = t.ctx; if (r.parsedType !== kb.map) return Wb(r, { code: Rb.invalid_type, expected: kb.map, received: r.parsedType }), zb; var a = this._def.keyType, i = this._def.valueType, o = fb(r.data.entries()).map((function(e, t) { var n = cb(e, 2), o = n[0], l = n[1]; return { key: a._parse(new $b(r, o, r.path, [t, "key"])), value: i._parse(new $b(r, l, r.path, [t, "value"])) } })); if (r.common.async) { var l = new Map; return Promise.resolve().then(db(regeneratorRuntime.mark((function e() { var t, r, a, i, u; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: t = wb(o), e.prev = 1, t.s(); case 3: if ((r = t.n()).done) { e.next = 17; break } return a = r.value, e.next = 7, a.key; case 7: return i = e.sent, e.next = 10, a.value; case 10: if (u = e.sent, "aborted" !== i.status && "aborted" !== u.status) { e.next = 13; break } return e.abrupt("return", zb); case 13: "dirty" !== i.status && "dirty" !== u.status || n.dirty(), l.set(i.value, u.value); case 15: e.next = 3; break; case 17: e.next = 22; break; case 19: e.prev = 19, e.t0 = e.catch(1), t.e(e.t0); case 22: return e.prev = 22, t.f(), e.finish(22); case 25: return e.abrupt("return", { status: n.value, value: l }); case 26: case "end": return e.stop() } }), e, null, [ [1, 19, 22, 25] ]) })))) } var u, c = new Map, s = wb(o); try { for (s.s(); !(u = s.n()).done;) { var d = u.value, f = d.key, p = d.value; if ("aborted" === f.status || "aborted" === p.status) return zb; "dirty" !== f.status && "dirty" !== p.status || n.dirty(), c.set(f.value, p.value) } } catch (e) { s.e(e) } finally { s.f() } return { status: n.value, value: c } } }, { key: "keySchema", get: function() { return this._def.keyType } }, { key: "valueSchema", get: function() { return this._def.valueType } }]), n }(rC); BC.create = function(e, t, n) { return new BC(Ab({ valueType: t, keyType: e, typeName: d_.ZodMap }, tC(n))) }; var KC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.status, r = t.ctx; if (r.parsedType !== kb.set) return Wb(r, { code: Rb.invalid_type, expected: kb.set, received: r.parsedType }), zb; var a = this._def; null !== a.minSize && r.data.size < a.minSize.value && (Wb(r, { code: Rb.too_small, minimum: a.minSize.value, type: "set", inclusive: !0, exact: !1, message: a.minSize.message }), n.dirty()), null !== a.maxSize && r.data.size > a.maxSize.value && (Wb(r, { code: Rb.too_big, maximum: a.maxSize.value, type: "set", inclusive: !0, exact: !1, message: a.maxSize.message }), n.dirty()); var i = this._def.valueType; function o(e) { var t, r = new Set, a = wb(e); try { for (a.s(); !(t = a.n()).done;) { var i = t.value; if ("aborted" === i.status) return zb; "dirty" === i.status && n.dirty(), r.add(i.value) } } catch (e) { a.e(e) } finally { a.f() } return { status: n.value, value: r } } var l = fb(r.data.values()).map((function(e, t) { return i._parse(new $b(r, e, r.path, t)) })); return r.common.async ? Promise.all(l).then((function(e) { return o(e) })) : o(l) } }, { key: "min", value: function(e, t) { return new n(Ab(Ab({}, this._def), {}, { minSize: { value: e, message: Hb.toString(t) } })) } }, { key: "max", value: function(e, t) { return new n(Ab(Ab({}, this._def), {}, { maxSize: { value: e, message: Hb.toString(t) } })) } }, { key: "size", value: function(e, t) { return this.min(e, t).max(e, t) } }, { key: "nonempty", value: function(e) { return this.min(1, e) } }]), n }(rC); KC.create = function(e, t) { return new KC(Ab({ valueType: e, minSize: null, maxSize: null, typeName: d_.ZodSet }, tC(t))) }; var YC = function(e) { mb(n, e); var t = yb(n); function n() { var e; return pb(this, n), (e = t.apply(this, arguments)).validate = e.implement, e } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx; if (t.parsedType !== kb.function) return Wb(t, { code: Rb.invalid_type, expected: kb.function, received: t.parsedType }), zb; function n(e, n) { return Ub({ data: e, path: t.path, errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, Vb(), xb].filter((function(e) { return !!e })), issueData: { code: Rb.invalid_arguments, argumentsError: n } }) } function r(e, n) { return Ub({ data: e, path: t.path, errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, Vb(), xb].filter((function(e) { return !!e })), issueData: { code: Rb.invalid_return_type, returnTypeError: n } }) } var a = { errorMap: t.common.contextualErrorMap }, i = t.data; if (this._def.returns instanceof t_) { var o = this; return qb(db(regeneratorRuntime.mark((function e() { var t, l, u, c, s, d, f, p = arguments; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: for (t = p.length, l = new Array(t), u = 0; u < t; u++) l[u] = p[u]; return c = new Pb([]), e.next = 4, o._def.args.parseAsync(l, a).catch((function(e) { throw c.addIssue(n(l, e)), c })); case 4: return s = e.sent, e.next = 7, Reflect.apply(i, this, s); case 7: return d = e.sent, e.next = 10, o._def.returns._def.type.parseAsync(d, a).catch((function(e) { throw c.addIssue(r(d, e)), c })); case 10: return f = e.sent, e.abrupt("return", f); case 12: case "end": return e.stop() } }), e, this) })))) } var l = this; return qb((function() { for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++) t[o] = arguments[o]; var u = l._def.args.safeParse(t, a); if (!u.success) throw new Pb([n(t, u.error)]); var c = Reflect.apply(i, this, u.data), s = l._def.returns.safeParse(c, a); if (!s.success) throw new Pb([r(c, s.error)]); return s.data })) } }, { key: "parameters", value: function() { return this._def.args } }, { key: "returnType", value: function() { return this._def.returns } }, { key: "args", value: function() { for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r]; return new n(Ab(Ab({}, this._def), {}, { args: ZC.create(t).rest(PC.create()) })) } }, { key: "returns", value: function(e) { return new n(Ab(Ab({}, this._def), {}, { returns: e })) } }, { key: "implement", value: function(e) { return this.parse(e) } }, { key: "strictImplement", value: function(e) { return this.parse(e) } }], [{ key: "create", value: function(e, t, r) { return new n(Ab({ args: e || ZC.create([]).rest(PC.create()), returns: t || PC.create(), typeName: d_.ZodFunction }, tC(r))) } }]), n }(rC), JC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx; return this._def.getter()._parse({ data: t.data, path: t.path, parent: t }) } }, { key: "schema", get: function() { return this._def.getter() } }]), n }(rC); JC.create = function(e, t) { return new JC(Ab({ getter: e, typeName: d_.ZodLazy }, tC(t))) }; var XC = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (e.data !== this._def.value) { var t = this._getOrReturnCtx(e); return Wb(t, { received: t.data, code: Rb.invalid_literal, expected: this._def.value }), zb } return { status: "valid", value: e.data } } }, { key: "value", get: function() { return this._def.value } }]), n }(rC); function QC(e, t) { return new $C(Ab({ values: e, typeName: d_.ZodEnum }, tC(t))) } XC.create = function(e, t) { return new XC(Ab({ value: e, typeName: d_.ZodLiteral }, tC(t))) }; var $C = function(e) { mb(n, e); var t = yb(n); function n() { var e; return pb(this, n), e = t.apply(this, arguments), Fb.set(gb(e), void 0), e } return vb(n, [{ key: "_parse", value: function(e) { if ("string" != typeof e.data) { var t = this._getOrReturnCtx(e), n = this._def.values; return Wb(t, { expected: lE.joinValues(n), received: t.parsedType, code: Rb.invalid_type }), zb } if (Xb(this, Fb, "f") || Qb(this, Fb, new Set(this._def.values), "f"), !Xb(this, Fb, "f").has(e.data)) { var r = this._getOrReturnCtx(e), a = this._def.values; return Wb(r, { received: r.data, code: Rb.invalid_enum_value, options: a }), zb } return qb(e.data) } }, { key: "extract", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._def; return n.create(e, Ab(Ab({}, this._def), t)) } }, { key: "exclude", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._def; return n.create(this.options.filter((function(t) { return !e.includes(t) })), Ab(Ab({}, this._def), t)) } }, { key: "options", get: function() { return this._def.values } }, { key: "enum", get: function() { var e, t = {}, n = wb(this._def.values); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; t[r] = r } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "Values", get: function() { var e, t = {}, n = wb(this._def.values); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; t[r] = r } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "Enum", get: function() { var e, t = {}, n = wb(this._def.values); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; t[r] = r } } catch (e) { n.e(e) } finally { n.f() } return t } }]), n }(rC); Fb = new WeakMap, $C.create = QC; var e_ = function(e) { mb(n, e); var t = yb(n); function n() { var e; return pb(this, n), e = t.apply(this, arguments), Gb.set(gb(e), void 0), e } return vb(n, [{ key: "_parse", value: function(e) { var t = lE.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e); if (n.parsedType !== kb.string && n.parsedType !== kb.number) { var r = lE.objectValues(t); return Wb(n, { expected: lE.joinValues(r), received: n.parsedType, code: Rb.invalid_type }), zb } if (Xb(this, Gb, "f") || Qb(this, Gb, new Set(lE.getValidEnumValues(this._def.values)), "f"), !Xb(this, Gb, "f").has(e.data)) { var a = lE.objectValues(t); return Wb(n, { received: n.data, code: Rb.invalid_enum_value, options: a }), zb } return qb(e.data) } }, { key: "enum", get: function() { return this._def.values } }]), n }(rC); Gb = new WeakMap, e_.create = function(e, t) { return new e_(Ab({ values: e, typeName: d_.ZodNativeEnum }, tC(t))) }; var t_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "unwrap", value: function() { return this._def.type } }, { key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e).ctx; if (n.parsedType !== kb.promise && !1 === n.common.async) return Wb(n, { code: Rb.invalid_type, expected: kb.promise, received: n.parsedType }), zb; var r = n.parsedType === kb.promise ? n.data : Promise.resolve(n.data); return qb(r.then((function(e) { return t._def.type.parseAsync(e, { path: n.path, errorMap: n.common.contextualErrorMap }) }))) } }]), n }(rC); t_.create = function(e, t) { return new t_(Ab({ type: e, typeName: d_.ZodPromise }, tC(t))) }; var n_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "innerType", value: function() { return this._def.schema } }, { key: "sourceType", value: function() { return this._def.schema._def.typeName === d_.ZodEffects ? this._def.schema.sourceType() : this._def.schema } }, { key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e), r = n.status, a = n.ctx, i = this._def.effect || null, o = { addIssue: function(e) { Wb(a, e), e.fatal ? r.abort() : r.dirty() }, get path() { return a.path } }; if (o.addIssue = o.addIssue.bind(o), "preprocess" === i.type) { var l = i.transform(a.data, o); if (a.common.async) return Promise.resolve(l).then(function() { var e = db(regeneratorRuntime.mark((function e(n) { var i; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: if ("aborted" !== r.value) { e.next = 2; break } return e.abrupt("return", zb); case 2: return e.next = 4, t._def.schema._parseAsync({ data: n, path: a.path, parent: a }); case 4: if ("aborted" !== (i = e.sent).status) { e.next = 7; break } return e.abrupt("return", zb); case 7: if ("dirty" !== i.status) { e.next = 9; break } return e.abrupt("return", Zb(i.value)); case 9: if ("dirty" !== r.value) { e.next = 11; break } return e.abrupt("return", Zb(i.value)); case 11: return e.abrupt("return", i); case 12: case "end": return e.stop() } }), e) }))); return function(t) { return e.apply(this, arguments) } }()); if ("aborted" === r.value) return zb; var u = this._def.schema._parseSync({ data: l, path: a.path, parent: a }); return "aborted" === u.status ? zb : "dirty" === u.status || "dirty" === r.value ? Zb(u.value) : u } if ("refinement" === i.type) { var c = function(e) { var t = i.refinement(e, o); if (a.common.async) return Promise.resolve(t); if (t instanceof Promise) throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); return e }; if (!1 === a.common.async) { var s = this._def.schema._parseSync({ data: a.data, path: a.path, parent: a }); return "aborted" === s.status ? zb : ("dirty" === s.status && r.dirty(), c(s.value), { status: r.value, value: s.value }) } return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((function(e) { return "aborted" === e.status ? zb : ("dirty" === e.status && r.dirty(), c(e.value).then((function() { return { status: r.value, value: e.value } }))) })) } if ("transform" === i.type) { if (!1 === a.common.async) { var d = this._def.schema._parseSync({ data: a.data, path: a.path, parent: a }); if (!Yb(d)) return d; var f = i.transform(d.value, o); if (f instanceof Promise) throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."); return { status: r.value, value: f } } return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((function(e) { return Yb(e) ? Promise.resolve(i.transform(e.value, o)).then((function(e) { return { status: r.value, value: e } })) : e })) } lE.assertNever(i) } }]), n }(rC); n_.create = function(e, t, n) { return new n_(Ab({ schema: e, typeName: d_.ZodEffects, effect: t }, tC(n))) }, n_.createWithPreprocess = function(e, t, n) { return new n_(Ab({ schema: t, effect: { type: "preprocess", transform: e }, typeName: d_.ZodEffects }, tC(n))) }; var r_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { return this._getType(e) === kb.undefined ? qb(void 0) : this._def.innerType._parse(e) } }, { key: "unwrap", value: function() { return this._def.innerType } }]), n }(rC); r_.create = function(e, t) { return new r_(Ab({ innerType: e, typeName: d_.ZodOptional }, tC(t))) }; var a_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { return this._getType(e) === kb.null ? qb(null) : this._def.innerType._parse(e) } }, { key: "unwrap", value: function() { return this._def.innerType } }]), n }(rC); a_.create = function(e, t) { return new a_(Ab({ innerType: e, typeName: d_.ZodNullable }, tC(t))) }; var i_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx, n = t.data; return t.parsedType === kb.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({ data: n, path: t.path, parent: t }) } }, { key: "removeDefault", value: function() { return this._def.innerType } }]), n }(rC); i_.create = function(e, t) { return new i_(Ab({ innerType: e, typeName: d_.ZodDefault, defaultValue: "function" == typeof t.default ? t.default : function() { return t.default } }, tC(t))) }; var o_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e).ctx, r = Ab(Ab({}, n), {}, { common: Ab(Ab({}, n.common), {}, { issues: [] }) }), a = this._def.innerType._parse({ data: r.data, path: r.path, parent: Ab({}, r) }); return Jb(a) ? a.then((function(e) { return { status: "valid", value: "valid" === e.status ? e.value : t._def.catchValue({ get error() { return new Pb(r.common.issues) }, input: r.data }) } })) : { status: "valid", value: "valid" === a.status ? a.value : this._def.catchValue({ get error() { return new Pb(r.common.issues) }, input: r.data }) } } }, { key: "removeCatch", value: function() { return this._def.innerType } }]), n }(rC); o_.create = function(e, t) { return new o_(Ab({ innerType: e, typeName: d_.ZodCatch, catchValue: "function" == typeof t.catch ? t.catch : function() { return t.catch } }, tC(t))) }; var l_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== kb.nan) { var t = this._getOrReturnCtx(e); return Wb(t, { code: Rb.invalid_type, expected: kb.nan, received: t.parsedType }), zb } return { status: "valid", value: e.data } } }]), n }(rC); l_.create = function(e) { return new l_(Ab({ typeName: d_.ZodNaN }, tC(e))) }; Symbol("zod_brand"); var u_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx, n = t.data; return this._def.type._parse({ data: n, path: t.path, parent: t }) } }, { key: "unwrap", value: function() { return this._def.type } }]), n }(rC), c_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e), r = n.status, a = n.ctx; if (a.common.async) { var i = function() { var e = db(regeneratorRuntime.mark((function e() { var n; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: return e.next = 2, t._def.in._parseAsync({ data: a.data, path: a.path, parent: a }); case 2: if ("aborted" !== (n = e.sent).status) { e.next = 5; break } return e.abrupt("return", zb); case 5: if ("dirty" !== n.status) { e.next = 10; break } return r.dirty(), e.abrupt("return", Zb(n.value)); case 10: return e.abrupt("return", t._def.out._parseAsync({ data: n.value, path: a.path, parent: a })); case 11: case "end": return e.stop() } }), e) }))); return function() { return e.apply(this, arguments) } }(); return i() } var o = this._def.in._parseSync({ data: a.data, path: a.path, parent: a }); return "aborted" === o.status ? zb : "dirty" === o.status ? (r.dirty(), { status: "dirty", value: o.value }) : this._def.out._parseSync({ data: o.value, path: a.path, parent: a }) } }], [{ key: "create", value: function(e, t) { return new n({ in: e, out: t, typeName: d_.ZodPipeline }) } }]), n }(rC), s_ = function(e) { mb(n, e); var t = yb(n); function n() { return pb(this, n), t.apply(this, arguments) } return vb(n, [{ key: "_parse", value: function(e) { var t = this._def.innerType._parse(e), n = function(e) { return Yb(e) && (e.value = Object.freeze(e.value)), e }; return Jb(t) ? t.then((function(e) { return n(e) })) : n(t) } }, { key: "unwrap", value: function() { return this._def.innerType } }]), n }(rC); s_.create = function(e, t) { return new s_(Ab({ innerType: e, typeName: d_.ZodReadonly }, tC(t))) }; var d_; WC.lazycreate;! function(e) { e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly" }(d_ || (d_ = {})); var f_, p_, h_ = TC.create, v_ = (AC.create, l_.create, NC.create, wC.create), m_ = (LC.create, OC.create, kC.create, DC.create, RC.create), y_ = (PC.create, xC.create, MC.create, VC.create), g_ = WC.create, E_ = (WC.strictCreate, HC.create), b_ = (GC.create, zC.create, ZC.create, qC.create, BC.create, KC.create, YC.create, JC.create, XC.create), C_ = ($C.create, e_.create), __ = (t_.create, n_.create, r_.create, a_.create, n_.createWithPreprocess); c_.create;! function(e) { e.ZERO = "FRICTION_CONTEXT_INVALID", e.ONE = "FRICTION_CONTEXT_ONE" }(f_ || (f_ = {})); var S_ = g_({ sharedParameters: g_({ shouldAnalyze: v_().optional(), useContinueMode: v_().optional(), genericChallengeId: h_().optional() }).optional() }), I_ = g_({ userId: h_(), challengeId: h_(), shouldShowRememberDeviceCheckbox: v_(), actionType: C_(tv) }).and(S_), T_ = g_({ actionType: C_(_d), dataExchangeBlob: h_(), unifiedCaptchaId: h_() }).and(S_), A_ = g_({ userId: h_(), sessionId: h_() }).and(S_), N_ = g_({ defaultType: C_(Xh), availableTypes: y_(C_(Xh)), defaultTypeMetadata: g_({ passkeyAuthOptions: h_().optional(), passkeySessionId: h_().optional() }).nullable() }).and(S_), w_ = g_({}).and(S_), L_ = g_({}).and(S_), O_ = g_({ sessionId: h_() }).and(S_), k_ = g_({ challengeId: h_(), puzzleType: C_($h) }).and(S_), D_ = g_({ challengeId: h_() }).and(S_), R_ = g_({ integrityType: h_(), requestHash: h_() }).and(S_), P_ = g_({ challengeId: h_(), artifacts: g_({ puzzleType: C_(Kh), seed: h_(), rounds: h_(), layers: h_() }) }).and(S_), x_ = g_({ frictionContext: C_(f_).optional() }).and(S_), M_ = g_({ otpSession: h_(), frictionContext: C_(f_).optional() }).and(S_), V_ = m_(), U_ = ((p_ = {})[av.TWO_STEP_VERIFICATION] = I_, p_[av.CAPTCHA] = T_, p_[av.FORCE_AUTHENTICATOR] = w_, p_[av.FORCE_TWO_STEP_VERIFICATION] = L_, p_[av.SECURITY_QUESTIONS] = A_, p_[av.REAUTHENTICATION] = N_, p_[av.PROOF_OF_WORK] = O_, p_[av.ROSTILE] = k_, p_[av.PRIVATE_ACCESS_TOKEN] = D_, p_[av.DEVICE_INTEGRITY] = R_, p_[av.PROOF_OF_SPACE] = P_, p_[av.PHONE_VERIFICATION] = x_, p_[av.EMAIL_VERIFICATION] = M_, p_[av.BLOCK_SESSION] = V_, p_), W_ = function() { var e = function(t, n) { return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) { e.__proto__ = t } || function(e, t) { for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) }, e(t, n) }; return function(t, n) { if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null"); function r() { this.constructor = t } e(t, n), t.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r) } }(), H_ = function() { return H_ = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, H_.apply(this, arguments) }, F_ = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, G_ = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, j_ = new sd, z_ = new ub, Z_ = function(e, t, n) { var r, a = Object.values(av).includes(t) ? t : null; if (null === a) return null; try { r = null === n || "" === n ? {} : JSON.parse(n) } catch (e) { return null } var i = U_[a].safeParse(r); return i.success ? { challengeId: e, challengeType: a, challengeMetadata: r } : (console.error(rb, i.error), null) }, q_ = function(e) { var t = e.challengeBaseProperties, n = e.challengeSpecificProperties; return F_(void 0, void 0, Promise, (function() { var e, r, a, i, o, l, u, c, s, d, f, p, h, v, m, y, g, E, b, C, _, S, I, T; return G_(this, (function(A) { switch (e = n.challengeMetadata.sharedParameters, r = t.onChallengeCompleted, t.onChallengeCompleted = function(a) { return F_(void 0, void 0, void 0, (function() { var i, o, l, u; return G_(this, (function(c) { switch (c.label) { case 0: return [4, j_.genericChallenge.continueChallenge((null == e ? void 0 : e.genericChallengeId) || n.challengeId, a.challengeType, JSON.stringify(a.metadata))]; case 1: return (i = c.sent()).isError ? (z_.fireContinueFailureEvent(n.challengeType), t.onChallengeInvalidated({ challengeType: n.challengeType, errorCode: jh.UNKNOWN, errorMessage: "" }), [2]) : "" === i.value.challengeType ? (r(a), [2]) : Object.values(av).includes(i.value.challengeType) ? null === (u = Z_(i.value.challengeId, i.value.challengeType, i.value.challengeMetadata)) ? (console.error(rb, "Challenge headers failed to be parsed"), z_.fireParseFailureEvent(), t.onChallengeInvalidated({ challengeType: n.challengeType, errorCode: jh.UNKNOWN, errorMessage: "" }), [2]) : (t.onChallengeCompleted = r, q_({ challengeBaseProperties: t, challengeSpecificProperties: u }).then((function(e) { if (!e) return z_.fireRenderFailureEvent(u.challengeType), console.error(rb, "Challenge component failed to initialize"), void t.onChallengeInvalidated({ challengeType: u.challengeType, errorCode: jh.UNKNOWN, errorMessage: "" }); z_.fireSuccessEvent(u.challengeType) })).catch((function() { z_.fireRenderFailureEvent(u.challengeType), console.error(rb, "Exception on rendering challenge component"), t.onChallengeInvalidated({ challengeType: u.challengeType, errorCode: jh.UNKNOWN, errorMessage: "" }) })), [2]) : t.newRenderChallenge && t.newParseChallenge ? (o = t.newParseChallenge(i.value.challengeId, i.value.challengeType, i.value.challengeMetadata), hh(o) ? (t.onChallengeInvalidated({ challengeType: i.value.challengeType, errorCode: jh.UNKNOWN, errorMessage: "New middleware failed to parse subsequent challenges" }), [2]) : (l = o.value, t.newRenderChallenge({ challengeBaseProperties: t, challengeSpecificProperties: l }), [2])) : (console.warn("[old middleware] new challenge type found but no new fallback registered!"), t.onChallengeInvalidated({ challengeType: i.value.challengeType, errorCode: jh.UNKNOWN, errorMessage: "Subsequent challenges failed!" }), [2]) } })) })) }, !0 === (null == e ? void 0 : e.shouldAnalyze) && (a = Zp.load({ monitoring: !1 }), i = t.onChallengeCompleted, t.onChallengeCompleted = function(e) { return F_(void 0, void 0, void 0, (function() { var t, r; return G_(this, (function(o) { switch (o.label) { case 0: return o.trys.push([0, 3, , 4]), [4, a]; case 1: return [4, o.sent().get()]; case 2: return t = o.sent(), r = {}, Object.entries(t.components).forEach((function(e) { var t = e[0], n = e[1]; "canvas" !== t && (r[t] = "object" == typeof n.value ? JSON.stringify(n.value) : n.value) })), yi().EventStream.SendEventWithTarget(ab, ib.onCompleted, H_({ challengeId: n.challengeId, library: "FPJS", version: t.version }, r), yi().EventStream.TargetTypes.WWW), [3, 4]; case 3: return o.sent(), [3, 4]; case 4: return [2, i(e)] } })) })) }), n.challengeType) { case av.CAPTCHA: return o = n.challengeType, l = n.challengeMetadata, I = H_(H_(H_({ onChallengeDisplayed: function() {}, appType: null }, t), l), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: o }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: o, metadata: { unifiedCaptchaId: e.captchaId, captchaToken: e.captchaToken, actionType: l.actionType } }) } }), [2, Yd(I)]; case av.FORCE_AUTHENTICATOR: return S = n.challengeMetadata, I = H_(H_({ forceActionRedirectChallengeType: Sf.ForceAuthenticator }, t), S), (T = Wf(I)) && void 0 !== t.onChallengeDisplayed && t.onChallengeDisplayed({ displayed: !0 }), [2, Promise.resolve(T)]; case av.FORCE_TWO_STEP_VERIFICATION: return S = n.challengeMetadata, I = H_(H_({ forceActionRedirectChallengeType: Sf.ForceTwoStepVerification }, t), S), (T = Wf(I)) && void 0 !== t.onChallengeDisplayed && t.onChallengeDisplayed({ displayed: !0 }), [2, Promise.resolve(T)]; case av.TWO_STEP_VERIFICATION: return u = n.challengeType, c = n.challengeMetadata, I = H_(H_(H_({}, t), c), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: u }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: u, metadata: H_(H_({}, e), { challengeId: c.challengeId, actionType: c.actionType }) }) } }), (T = nb(I)) && void 0 !== t.onChallengeDisplayed && t.onChallengeDisplayed({ displayed: !0 }), [2, Promise.resolve(T)]; case av.SECURITY_QUESTIONS: return s = n.challengeType, S = n.challengeMetadata, I = H_(H_(H_({}, t), S), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: s }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: s, metadata: e }) } }), (T = Jg(I)) && void 0 !== t.onChallengeDisplayed && t.onChallengeDisplayed({ displayed: !0 }), [2, Promise.resolve(T)]; case av.REAUTHENTICATION: return d = n.challengeType, S = n.challengeMetadata, I = H_(H_(H_({}, t), S), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: d }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: d, metadata: e }) } }), (T = Qy(I)) && void 0 !== t.onChallengeDisplayed && t.onChallengeDisplayed({ displayed: !0 }), [2, Promise.resolve(T)]; case av.PROOF_OF_WORK: return f = n.challengeType, p = n.challengeMetadata, I = H_(H_(H_({ onChallengeDisplayed: function() {} }, t), p), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: f }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: f, metadata: H_(H_({}, e), { sessionId: p.sessionId }) }) } }), [2, Promise.resolve(ty(I))]; case av.ROSTILE: return h = n.challengeType, S = n.challengeMetadata, I = H_(H_(H_({ onChallengeDisplayed: function() {} }, t), S), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: h }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: h, metadata: H_({}, e) }) } }), [2, Promise.resolve(wg(I))]; case av.PRIVATE_ACCESS_TOKEN: return v = n.challengeType, S = n.challengeMetadata, I = H_(H_(H_({ onChallengeDisplayed: function() {} }, t), S), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: v }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: v, metadata: H_({}, e) }) } }), [2, Promise.resolve(Zv(I))]; case av.DEVICE_INTEGRITY: return b = n.challengeId, m = n.challengeType, S = n.challengeMetadata, I = H_(H_(H_({ onChallengeDisplayed: function() {}, challengeId: b }, t), S), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: m }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: m, metadata: H_({}, e) }) } }), [2, Promise.resolve(Ef(I))]; case av.PROOF_OF_SPACE: return y = n.challengeType, S = n.challengeMetadata, I = H_(H_(H_({ onChallengeDisplayed: function() {} }, t), S), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: y }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: y, metadata: H_({}, e) }) } }), [2, Promise.resolve(Nm(I))]; case av.PHONE_VERIFICATION: return b = n.challengeId, g = n.challengeType, E = n.challengeMetadata, I = H_(H_(H_({ onChallengeDisplayed: function() {}, challengeId: b }, t), E), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: g }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: g, metadata: H_({ frictionContext: E.frictionContext }, e) }) } }), T = function(e) { var t = e.containerId, n = e.challengeId, r = e.appType, a = e.renderInline, i = e.onChallengeCompleted, o = e.onChallengeInvalidated, l = e.onModalChallengeAbandoned, u = document.getElementById(t); if (null !== u) { (0, ji.unmountComponentAtNode)(u); var c = new _v(n), s = new Sv(r, Av); return (0, ji.render)(Gi().createElement(Cv, { challengeId: n, renderInline: a, eventService: c, metricsService: s, onChallengeCompleted: i, onChallengeInvalidated: o, onModalChallengeAbandoned: l }), u), c.sendChallengeInitializedEvent(), s.fireChallengeInitializedEvent(), !0 } return !1 }(I), T && void 0 !== t.onChallengeDisplayed && t.onChallengeDisplayed({ displayed: !0 }), [2, Promise.resolve(T)]; case av.EMAIL_VERIFICATION: return b = n.challengeId, C = n.challengeType, _ = n.challengeMetadata, I = H_(H_(H_({ onChallengeDisplayed: function() {}, challengeId: b }, t), _), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(H_({ challengeType: C }, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted({ challengeType: C, metadata: H_({ frictionContext: _.frictionContext }, e) }) } }), T = function(e) { var t = e.containerId, n = e.challengeId, r = e.renderInline, a = e.appType, i = e.onChallengeCompleted, o = e.onChallengeInvalidated, l = e.onModalChallengeAbandoned, u = document.getElementById(t); if (null !== u) { (0, ji.unmountComponentAtNode)(u); var c = new Wh(n), s = new Hh(a, Gh); return (0, ji.render)(Gi().createElement(Uh, { challengeId: n, renderInline: r, eventService: c, metricsService: s, onChallengeCompleted: i, onChallengeInvalidated: o, onModalChallengeAbandoned: l }), u), c.sendChallengeInitializedEvent(), s.fireChallengeInitializedEvent(), !0 } return !1 }(I), T && void 0 !== t.onChallengeDisplayed && t.onChallengeDisplayed({ displayed: !0 }), [2, Promise.resolve(T)]; case av.BLOCK_SESSION: return S = n.challengeMetadata, I = H_(H_({ forceActionRedirectChallengeType: Sf.BlockSession }, t), S), (T = Wf(I)) && void 0 !== t.onChallengeDisplayed && t.onChallengeDisplayed({ displayed: !0 }), [2, Promise.resolve(T)]; default: return [2, !1] } return [2] })) })) }, B_ = "generic-challenge-error", K_ = function(e) { function t(n) { var r = e.call(this, t.getMessage(n)) || this; return Object.setPrototypeOf(r, t.prototype), r.name = t.name, r._parameters = n, r._className = B_, r } return W_(t, e), t.match = function(e) { return "object" == typeof e && null !== e && e._className === B_ }, t.matchAbandoned = function(e) { return t.match(e) && e.parameters.kind === zh.ABANDONED }, t.getMessage = function(e) { return "Got (" + ["Kind: " + e.kind, "Type: " + (e.data.challengeType || "unknown"), "Code: " + (e.kind === zh.INVALIDATED ? e.data.errorCode : "null")].join("; ") + ")" }, Object.defineProperty(t.prototype, "parameters", { get: function() { return this._parameters }, enumerable: !1, configurable: !0 }), t }(Error), Y_ = function(e) { return new Promise((function(t, n) { var r, a = e.retryRequest, i = e.containerId, o = e.challengeId, l = e.challengeTypeRaw, u = e.challengeMetadataJsonBase64, c = e.newRenderChallenge, s = e.newParseChallenge; try { r = atob(u) } catch (e) { if (e instanceof DOMException && e.code === DOMException.INVALID_CHARACTER_ERR) return console.error(rb, "Base-64 decoding failed", e), void n(new K_({ kind: zh.UNKNOWN, data: {} })); throw e } var d = Z_(o, l, r); if (null === d) return console.error(rb, "Challenge headers failed to be parsed"), n(new K_({ kind: zh.UNKNOWN, data: {} })), void z_.fireParseFailureEvent(); var f = i + "-" + l; if (null === document.getElementById(f)) { var p = document.createElement("div"); p.id = f, document.body.appendChild(p) } q_({ challengeBaseProperties: { containerId: f, renderInline: !1, onChallengeCompleted: function(e) { try { t(a(o, btoa(JSON.stringify(e.metadata)))) } catch (e) { if (!(e instanceof DOMException && e.code === DOMException.INVALID_CHARACTER_ERR)) throw e; console.error(rb, "Base-64 encoding failed", e), n(new K_({ kind: zh.UNKNOWN, data: { challengeType: d.challengeType } })) } }, onChallengeInvalidated: function(e) { return n(new K_({ kind: zh.INVALIDATED, data: e })) }, onModalChallengeAbandoned: function() { return n(new K_({ kind: zh.ABANDONED, data: { challengeType: d.challengeType } })) }, newRenderChallenge: c, newParseChallenge: s }, challengeSpecificProperties: d }).then((function(e) { e ? z_.fireSuccessEvent(d.challengeType) : (z_.fireRenderFailureEvent(d.challengeType), console.error(rb, "Challenge component failed to initialize"), n(new K_({ kind: zh.UNKNOWN, data: { challengeType: d.challengeType } }))) })) })) }, J_ = function() { if (null === document.getElementById("prelude")) { var e = document.createElement("script"); e.src = bh.url, e.async = !0, e.id = "prelude", document.body.appendChild(e) } }, X_ = function(e, t) { return X_ = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) { e.__proto__ = t } || function(e, t) { for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) }, X_(e, t) }; function Q_(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); function n() { this.constructor = e } X_(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n) } var $_ = function() { return $_ = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, $_.apply(this, arguments) }; function eS(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) } function tS(e, t) { var n, r, a, i = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }, o = Object.create(("function" == typeof Iterator ? Iterator : Object).prototype); return o.next = l(0), o.throw = l(1), o.return = l(2), "function" == typeof Symbol && (o[Symbol.iterator] = function() { return this }), o; function l(l) { return function(u) { return function(l) { if (n) throw new TypeError("Generator is already executing."); for (; o && (o = 0, l[0] && (i = 0)), i;) try { if (n = 1, r && (a = 2 & l[0] ? r.return : l[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, l[1])).done) return a; switch (r = 0, a && (l = [2 & l[0], a.value]), l[0]) { case 0: case 1: a = l; break; case 4: return i.label++, { value: l[1], done: !1 }; case 5: i.label++, r = l[1], l = [0]; continue; case 7: l = i.ops.pop(), i.trys.pop(); continue; default: if (!((a = (a = i.trys).length > 0 && a[a.length - 1]) || 6 !== l[0] && 2 !== l[0])) { i = 0; continue } if (3 === l[0] && (!a || l[1] > a[0] && l[1] < a[3])) { i.label = l[1]; break } if (6 === l[0] && i.label < a[1]) { i.label = a[1], a = l; break } if (a && i.label < a[2]) { i.label = a[2], i.ops.push(l); break } a[2] && i.ops.pop(), i.trys.pop(); continue } l = t.call(e, i) } catch (e) { l = [6, e], r = 0 } finally { n = a = 0 } if (5 & l[0]) throw l[1]; return { value: l[0] ? l[1] : void 0, done: !0 } }([l, u]) } } } function nS(e) { return nS = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, nS(e) } "function" == typeof SuppressedError && SuppressedError; var rS, aS = "x-csrf-token", iS = aS, oS = function() { function e() { var e; try { if ("undefined" != typeof window) return void(this.currentToken = null !== (e = localStorage.getItem(iS)) && void 0 !== e ? e : "") } catch (e) { console.warn("Error reading localStorage key “".concat(iS, "”:"), e) } this.currentToken = "" } return e.prototype.storeCRSFToken = function(e) { this.currentToken = e; try { "undefined" != typeof window && localStorage.setItem(iS, e) } catch (e) { console.warn("Error setting localStorage key “".concat(iS, "”:"), e) } }, e.prototype.pre = function(e) { var t = e.url, n = e.init, r = this.currentToken; return n.headers && "object" == nS(n.headers) && aS in n.headers && (r = n.headers[aS]) && this.storeCRSFToken(r), "POST" === n.method || "PATCH" === n.method || "DELETE" === n.method || "PUT" === n.method ? Promise.resolve({ url: t, init: this.prepareRequestInit(n) }) : Promise.resolve({ url: t, init: n }) }, e.prototype.post = function(e) { var t = e.fetch, n = e.url, r = e.init, a = e.response, i = a.headers.get(aS); return 403 === a.status && a.headers.has(aS) && null !== i ? (this.storeCRSFToken(i), t(n, this.prepareRequestInit(r))) : Promise.resolve(a) }, e.prototype.prepareRequestInit = function(e) { var t; return $_($_({}, e), { headers: $_($_({}, e.headers), (t = {}, t[aS] = this.currentToken, t)) }) }, e }(), lS = "rblx-challenge-id", uS = "rblx-challenge-type", cS = "rblx-challenge-metadata";! function(e) { e.UNKNOWN = "unknown", e.INVALIDATED = "invalidated", e.ABANDONED = "abandoned", e.LOADFAILED = "loadfailed" }(rS || (rS = {})); var sS = function(e) { function t(t) { var n = e.call(this, "challenge error for challenge kind ".concat(t.kind)) || this; return n.parameters = t, n } return Q_(t, e), t.prototype.match = function(e) { return this.parameters.kind === e.parameters.kind && JSON.stringify(this.parameters.data) === JSON.stringify(e.parameters.data) }, t.prototype.matchAbandoned = function(e) { return this.match(e) && e.parameters.kind === rS.ABANDONED }, t }(Error), dS = function() { function e(e, t) { void 0 === t && (t = "iframe"), this.robloxSiteDomain = e, this.genericChallengeMiddlewareType = t, this.challengeLifecycleListener = null } return e.prototype.getTargetSubdomain = function() { return window.location.hostname.split(".").slice(0, -2).join(".") }, e.prototype.constructHybridChallengeFrameURL = function(e) { var t, n, r, a, i = new URLSearchParams([ ["challenge-type", "generic"], ["dark-mode", "true"], ["barista-mode", "true"], ["generic-challenge-type", null !== (t = e.headers.get(uS)) && void 0 !== t ? t : ""], ["generic-challenge-id", null !== (n = e.headers.get(lS)) && void 0 !== n ? n : ""], ["challenge-metadata-json", null !== (r = e.headers.get(cS)) && void 0 !== r ? r : ""], ["origin", null !== (a = this.getTargetSubdomain()) && void 0 !== a ? a : ""] ]); return new URL("https://www.".concat(this.robloxSiteDomain, "/challenge/cdn/hybrid?").concat(i.toString())) }, e.prototype.removeChallengeLifecycleListener = function() { this.challengeLifecycleListener && window.removeEventListener("message", this.challengeLifecycleListener, !1) }, e.prototype.createChallengeLifecycleListener = function(e, t, n, r) { var a = this; return function(i) { var o, l, u, c, s, d; if (i.data && i.data.genericChallengeResponse) { var f = t.fetch, p = t.url, h = t.init, v = t.response; switch (i.data.genericChallengeResponse.type) { case "challengeAbandoned": a.removeChallengeLifecycleListener(), e.remove(), r(new sS({ kind: rS.ABANDONED, data: { challengeType: null !== (o = v.headers.get(uS)) && void 0 !== o ? o : "" } })); break; case "challengeDisplayed": break; case "challengeCompleted": a.removeChallengeLifecycleListener(), e.remove(), (m = i.data.genericChallengeResponse.data).challengeType && m.metadata ? n(f(p, function(e, t, n) { var r, a, i; return $_($_({}, e), { headers: $_($_({}, e.headers), (r = {}, r[lS] = null !== (a = t.headers.get(lS)) && void 0 !== a ? a : "", r[cS] = btoa(JSON.stringify(n)), r[uS] = null !== (i = t.headers.get(uS)) && void 0 !== i ? i : "", r)) }) }(h, v, m.metadata))) : r(new sS({ kind: rS.UNKNOWN, data: { challengeType: null !== (l = v.headers.get(uS)) && void 0 !== l ? l : "" } })); break; case "challengeInvalidated": a.removeChallengeLifecycleListener(), e.remove(), (m = i.data.genericChallengeResponse.data) && m.challengeType && m.metadata ? r(new sS({ kind: rS.INVALIDATED, data: m })) : r(new sS({ kind: rS.INVALIDATED, data: { challengeType: null !== (u = v.headers.get(uS)) && void 0 !== u ? u : "" } })); break; case "challengeParsed": !1 === (m = i.data.genericChallengeResponse.data).parsed && (a.removeChallengeLifecycleListener(), e.remove(), r(new sS({ kind: rS.UNKNOWN, data: { challengeType: null !== (c = v.headers.get(uS)) && void 0 !== c ? c : "" } }))); break; case "challengeInitialized": !1 === (m = i.data.genericChallengeResponse.data).initialized && (a.removeChallengeLifecycleListener(), e.remove(), r(new sS({ kind: rS.UNKNOWN, data: { challengeType: null !== (s = v.headers.get(uS)) && void 0 !== s ? s : "" } }))); break; case "challengePageLoaded": var m;!1 === (m = i.data.genericChallengeResponse.data).pageLoaded && (a.removeChallengeLifecycleListener(), e.remove(), r(new sS({ kind: rS.LOADFAILED, data: { challengeType: null !== (d = v.headers.get(uS)) && void 0 !== d ? d : "" } }))) } } } }, e.prototype.startChallengeLifecycleListener = function(e, t, n, r) { window && e && (this.challengeLifecycleListener = this.createChallengeLifecycleListener(e, t, n, r), window.addEventListener("message", this.challengeLifecycleListener, !1)) }, e.prototype.post = function(e) { var t = this, n = e.response; return 403 === n.status && n.headers.has(lS) && n.headers.has(uS) && n.headers.has(cS) && "iframe" === this.genericChallengeMiddlewareType ? new Promise((function(r, a) { var i, o; t.startChallengeLifecycleListener(function(e) { return document && document.body ? document.body.appendChild(e) : null }((i = t.constructHybridChallengeFrameURL(n), (o = document.createElement("iframe")).id = "challenge-frame", o.allowFullscreen = !0, o.setAttribute("allowtransparency", "true"), o.setAttribute("allow", "publickey-credentials-get;publickey-credentials-create"), o.style.cssText = "position: fixed; top: 0; left: 0; width: 100%; height: 100%; visibility: hidden; color-scheme: normal; border: none; z-index: 2147483647;", o.src = i.toString(), o.onload = function() { o.style.visibility = "visible" }, o)), e, r, a) })) : Promise.resolve(n) }, e }(), fS = function() { var e = window.location.hostname.split(".").slice(0, -2).join("."); return e.includes("create") ? "creator_hub" : e.includes("advertise") ? "ads_manager" : "creator_hub" }, pS = function(e, t) { var n = "https://apis.".concat(e, "/account-security-service/v1/metrics/record"); try { fetch(n, { method: "POST", body: JSON.stringify({ name: "load_time_hba_frame", value: t, labelValues: { origin_site: fS() } }) }) } catch (e) {} }, hS = function(e, t) { var n = "https://apis.".concat(e, "/account-security-service/v1/metrics/record"); try { fetch(n, { method: "POST", body: JSON.stringify({ name: "response_time_hba_frame", value: t, labelValues: { origin_site: fS() } }) }) } catch (e) {} }, vS = function(e, t, n, r, a, i, o) { var l; if (void 0 === o && (o = yS), window) { var u = performance.now(), c = window.setTimeout((function() { hS(n, performance.now() - u), function(e) { var t = "https://apis.".concat(e, "/account-security-service/v1/metrics/record"); try { fetch(t, { method: "POST", body: JSON.stringify({ name: "event_hba_frame", value: 1, labelValues: { event_type: "FrameResponseTimedOut", origin_site: fS() } }) }) } catch (e) {} }(n), e({ url: a.url, init: a.init }) }), o), s = function(e, t, n, r, a, i, o) { return function t(l) { var u = l.data, c = r.url, s = r.init; if (l.origin === "https://www.".concat(n) && "dataFromHbaFrame" === u.msg && "batHeader" === u.data.type && (!u.data.identifier || u.data.identifier === a)) if (!u.data.isError && u.data.batHeader) { window.clearTimeout(i), window.removeEventListener("message", t, !1), hS(n, performance.now() - o); var d = u.data.batHeader; e({ url: c, init: $_($_({}, s), { headers: $_($_({}, s.headers), { "x-bound-auth-token": d["x-bound-auth-token"] }) }) }) } else window.clearTimeout(i), window.removeEventListener("message", t, !1), hS(n, performance.now() - o), e({ url: c, init: s }) } }(e, 0, n, a, i, c, u); window.addEventListener("message", s, !1), null === (l = r.contentWindow) || void 0 === l || l.postMessage({ msg: "signSubdomainRequest", identifier: i, serializedSubdomainRequestData: JSON.stringify({ url: a.url, requestInit: a.init }) }, "https://www.".concat(n)) } }, mS = 1500, yS = 100, gS = function() { function e(e, t, n) { void 0 === t && (t = mS), void 0 === n && (n = yS); var r = this; this.getOrCreateHbaFrame = function() { if (document) { var e = document.getElementById("hba-frame"); return null === e && (e = function(e) { return (null === document || void 0 === document ? void 0 : document.body) ? document.body.appendChild(e) : null }(function(e) { var t = document.createElement("iframe"); return t.id = "hba-frame", t.style.cssText = "position: fixed; top: 0; left: 0; width: 0%; height: 0%;", t.src = "https://www.".concat(e, "/hba/iframe"), t }(r.robloxSiteDomain))), e } return null }, this.robloxSiteDomain = e, this.hbaFrameAlreadyLoaded = !1, this.hbaFrameLoadFailed = !1, this.hbaFrame = null, this.loadTimeOut = t, this.dataTimeOut = n } return e.prototype.pre = function(e) { var t = this; return new Promise((function(n, r) { var a = e.url, i = e.init; if (t.hbaFrame = t.getOrCreateHbaFrame(), null !== t.hbaFrame) { var o = crypto.randomUUID(); t.hbaFrameAlreadyLoaded ? vS(n, 0, t.robloxSiteDomain, t.hbaFrame, e, o, t.dataTimeOut) : t.hbaFrameLoadFailed ? n({ url: a, init: i }) : function(e, t, n) { return void 0 === n && (n = mS), new Promise((function(r, a) { var i, o = performance.now(), l = window.setTimeout((function() { pS(e, performance.now() - o), function(e) { var t = "https://apis.".concat(e, "/account-security-service/v1/metrics/record"); try { fetch(t, { method: "POST", body: JSON.stringify({ name: "event_hba_frame", value: 1, labelValues: { event_type: "FrameLoadTimedOut", origin_site: fS() } }) }) } catch (e) {} }(e), a(new Error("Promise timed out after ".concat(n, " ms"))) }), n), u = function(e, t, n, r, a) { return function t(i) { var o = i.data; i.origin === "https://www.".concat(n) && "dataFromHbaFrame" === o.msg && "loaded" === o.data.type && (window.removeEventListener("message", t, !1), window.clearTimeout(r), pS(n, performance.now() - a), e()) } }(r, 0, e, l, o); window.addEventListener("message", u, !1), null === (i = t.contentWindow) || void 0 === i || i.postMessage({ msg: "checkLoadedRequest" }, "https://www.".concat(e)) })) }(t.robloxSiteDomain, t.hbaFrame, t.loadTimeOut).then((function() { t.hbaFrame ? (t.hbaFrameAlreadyLoaded = !0, vS(n, 0, t.robloxSiteDomain, t.hbaFrame, e, o, t.dataTimeOut)) : n({ url: a, init: i }) })).catch((function() { t.hbaFrameLoadFailed = !0, n({ url: a, init: i }) })) } else n({ url: a, init: i }) })) }, e }(), ES = function() { function e(e) { this.unifiedLogger = e } return e.prototype.post = function(e) { return this.unifiedLogger.logApiVitalsEvent({ eventName: "apiVitals", parameters: { elapsedTime: String(e.elapsedTime), apiUrl: e.url, statusCode: String(e.response.status) } }), Promise.resolve(e.response) }, e }(), bS = function() { function e() { this.observers = [] } return e.prototype.subscribe = function(e) { var t = this; return this.observers.push(e), function() { return t.unsubscribe(e) } }, e.prototype.unsubscribe = function(e) { this.observers = this.observers.filter((function(t) { return t !== e })) }, e.prototype.post = function(e) { var t = e.url, n = e.response; return 503 === n.status && this.observers.forEach((function(e) { return e(t) })), Promise.resolve(n) }, e }(), CS = function() { function e() {} return e.prototype.parseUrl = function(e) { return e.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/\d+/, "/number") }, e.prototype.post = function(e) { var t = this; return Promise.resolve().then((function() { var e = new Error("Cannot find module '@sentry/nextjs'"); throw e.code = "MODULE_NOT_FOUND", e })).then((function(n) { var r, a = n.captureException; return !1 === e.response.ok && !1 === [401, 403, 404].includes(e.response.status) && a(new Error("Network error"), { tags: { apiUrl: t.parseUrl(e.url), apiStatus: null === (r = e.response) || void 0 === r ? void 0 : r.status, cors: !1 } }), e.response })) }, e.prototype.onError = function(e) { var t = this; return Promise.resolve().then((function() { var e = new Error("Cannot find module '@sentry/nextjs'"); throw e.code = "MODULE_NOT_FOUND", e })).then((function(n) { var r; return (0, n.captureException)(new Error("Network error"), { tags: { apiUrl: t.parseUrl(e.url), apiStatus: null === (r = e.response) || void 0 === r ? void 0 : r.status, cors: !0 } }), e.response })) }, e }(), _S = function() { function e(e) { void 0 === e && (e = {}), this.configuration = e } return Object.defineProperty(e.prototype, "config", { set: function(e) { this.configuration = e }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "basePath", { get: function() { return this.configuration.basePath }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "fetchApi", { get: function() { return this.configuration.fetchApi || window.fetch.bind(window) }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "middleware", { get: function() { return this.configuration.middleware || [] }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "queryParamsStringify", { get: function() { return this.configuration.queryParamsStringify || OS }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "username", { get: function() { return this.configuration.username }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "password", { get: function() { return this.configuration.password }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "apiKey", { get: function() { var e = this.configuration.apiKey; if (e) return "function" == typeof e ? e : function() { return e } }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "accessToken", { get: function() { var e = this, t = this.configuration.accessToken; if (t) return "function" == typeof t ? t : function() { return eS(e, void 0, void 0, (function() { return tS(this, (function(e) { return [2, t] })) })) } }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "headers", { get: function() { return this.configuration.headers }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "credentials", { get: function() { return this.configuration.credentials }, enumerable: !1, configurable: !0 }), e }(), SS = new _S, IS = function() { function e(e) { void 0 === e && (e = SS); var t = this; this.configuration = e, this.fetchApi = function(e, n) { return eS(t, void 0, void 0, (function() { var t, r, a, i, o, l, u, c, s, d, f, p; return tS(this, (function(h) { switch (h.label) { case 0: t = { url: e, init: n }, r = 0, a = this.middleware, h.label = 1; case 1: return r < a.length ? (p = a[r]).pre ? [4, p.pre($_({ fetch: this.fetchApi }, t))] : [3, 3] : [3, 4]; case 2: t = h.sent() || t, h.label = 3; case 3: return r++, [3, 1]; case 4: i = void 0, o = performance.now(), h.label = 5; case 5: return h.trys.push([5, 7, , 12]), [4, (this.configuration.fetchApi || fetch)(t.url, t.init)]; case 6: return i = h.sent(), l = performance.now(), [3, 12]; case 7: u = h.sent(), l = performance.now(), c = 0, s = this.middleware, h.label = 8; case 8: return c < s.length ? (p = s[c]).onError ? [4, p.onError({ fetch: this.fetchApi, url: t.url, init: t.init, error: u, response: i ? i.clone() : void 0 })] : [3, 10] : [3, 11]; case 9: i = h.sent() || i, h.label = 10; case 10: return c++, [3, 8]; case 11: if (void 0 === i) throw u instanceof Error ? new NS(u, "The request failed and the interceptors did not return an alternative response") : u; return [3, 12]; case 12: d = 0, f = this.middleware, h.label = 13; case 13: return d < f.length ? (p = f[d]).post ? [4, p.post({ fetch: this.fetchApi, url: t.url, init: t.init, response: i.clone(), elapsedTime: l - o })] : [3, 15] : [3, 16]; case 14: i = h.sent() || i, h.label = 15; case 15: return d++, [3, 13]; case 16: return [2, i] } })) })) }, this.middleware = e.middleware } return e.prototype.withMiddleware = function() { for (var e, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; var r = this.clone(); return r.middleware = (e = r.middleware).concat.apply(e, t), r }, e.prototype.withPreMiddleware = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var n = e.map((function(e) { return { pre: e } })); return this.withMiddleware.apply(this, n) }, e.prototype.withPostMiddleware = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; var n = e.map((function(e) { return { post: e } })); return this.withMiddleware.apply(this, n) }, e.prototype.isJsonMime = function(t) { return !!t && e.jsonRegex.test(t) }, e.prototype.request = function(e, t) { return eS(this, void 0, void 0, (function() { var n, r, a, i; return tS(this, (function(o) { switch (o.label) { case 0: return [4, this.createFetchParams(e, t)]; case 1: return n = o.sent(), r = n.url, a = n.init, [4, this.fetchApi(r, a)]; case 2: if ((i = o.sent()) && i.status >= 200 && i.status < 300) return [2, i]; throw new AS(i, "Response from ".concat(i.url, " returned an error code ").concat(i.status)) } })) })) }, e.prototype.createFetchParams = function(e, t) { return eS(this, void 0, void 0, (function() { var n, r, a, i, o, l, u, c = this; return tS(this, (function(s) { switch (s.label) { case 0: return n = this.configuration.basePath + e.path, void 0 !== e.query && 0 !== Object.keys(e.query).length && (n += "?" + this.configuration.queryParamsStringify(e.query)), r = Object.assign({}, this.configuration.headers, e.headers), Object.keys(r).forEach((function(e) { return void 0 === r[e] ? delete r[e] : {} })), a = "function" == typeof t ? t : function() { return eS(c, void 0, void 0, (function() { return tS(this, (function(e) { return [2, t] })) })) }, i = { method: e.method, headers: r, body: e.body, credentials: this.configuration.credentials }, l = [$_({}, i)], [4, a({ init: i, context: e })]; case 1: return o = $_.apply(void 0, l.concat([s.sent()])), u = $_($_({}, o), { body: (d = o.body, "undefined" != typeof FormData && d instanceof FormData || o.body instanceof URLSearchParams || TS(o.body) ? o.body : JSON.stringify(o.body)) }), [2, { url: n, init: u }] } var d })) })) }, e.prototype.clone = function() { var e = new(0, this.constructor)(this.configuration); return e.middleware = this.middleware.slice(), e }, e.jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i"), e }(); function TS(e) { return "undefined" != typeof Blob && e instanceof Blob } var AS = function(e) { function t(t, n) { var r = e.call(this, n) || this; return r.response = t, r.name = "ResponseError", r } return Q_(t, e), t }(Error), NS = function(e) { function t(t, n) { var r = e.call(this, n) || this; return r.cause = t, r.name = "FetchError", r } return Q_(t, e), t }(Error), wS = function(e) { function t(t, n) { var r = e.call(this, n) || this; return r.field = t, r.name = "RequiredError", r } return Q_(t, e), t }(Error); function LS(e, t) { return null != e[t] } function OS(e, t) { return void 0 === t && (t = ""), Object.keys(e).map((function(n) { return kS(n, e[n], t) })).filter((function(e) { return e.length > 0 })).join("&") } function kS(e, t, n) { void 0 === n && (n = ""); var r = n + (n.length ? "[".concat(e, "]") : e); if (t instanceof Array) { var a = t.map((function(e) { return encodeURIComponent(String(e)) })).join("&".concat(encodeURIComponent(r), "=")); return "".concat(encodeURIComponent(r), "=").concat(a) } return t instanceof Set ? kS(e, Array.from(t), n) : t instanceof Date ? "".concat(encodeURIComponent(r), "=").concat(encodeURIComponent(t.toISOString())) : t instanceof Object ? OS(t, r) : "".concat(encodeURIComponent(r), "=").concat(encodeURIComponent(String(t))) } var DS = function() { function e(e, t) { void 0 === t && (t = function(e) { return e }), this.raw = e, this.transformer = t } return e.prototype.value = function() { return eS(this, void 0, void 0, (function() { var e; return tS(this, (function(t) { switch (t.label) { case 0: return e = this.transformer, [4, this.raw.json()]; case 1: return [2, e.apply(this, [t.sent()])] } })) })) }, e }(), RS = function() { function e(e) { this.raw = e } return e.prototype.value = function() { return eS(this, void 0, void 0, (function() { return tS(this, (function(e) { return [2, void 0] })) })) }, e }(), PS = (function() { function e(e) { this.raw = e } e.prototype.value = function() { return eS(this, void 0, void 0, (function() { return tS(this, (function(e) { switch (e.label) { case 0: return [4, this.raw.blob()]; case 1: return [2, e.sent()] } })) })) } }(), function() { function e(e) { this.raw = e } e.prototype.value = function() { return eS(this, void 0, void 0, (function() { return tS(this, (function(e) { switch (e.label) { case 0: return [4, this.raw.text()]; case 1: return [2, e.sent()] } })) })) } }(), new oS), xS = new bS, MS = [function(e) { return !0 === e.enableSentry ? new CS : void 0 }, function(e) { return e.robloxSiteDomain && e.enableBoundAuthToken ? new gS(e.robloxSiteDomain, e.boundAuthTokenLoadTimeout, e.boundAuthTokenDataTimeout) : void 0 }, function(e) { return e.robloxSiteDomain ? new dS(e.robloxSiteDomain, e.genericChallengeMiddlewareType) : void 0 }, function(e) { return e.unifiedLogger ? new ES(e.unifiedLogger) : void 0 }, function() { return PS }, function() { return xS }], VS = function(e) { function t(t) { void 0 === t && (t = {}); var n = $_({}, t), r = n.middleware || []; return r.unshift.apply(r, MS.map((function(e) { return e(n) })).filter((function(e) { return void 0 !== e }))), n.middleware = r, e.call(this, n) || this } return Q_(t, e), t }(_S); function US(e) { if (void 0 !== e) return null === e ? null : { challengeID: e.challengeID, challengeMetadata: e.challengeMetadata, challengeType: e.challengeType } } function WS(e) { return function(e) { return null == e ? e : { challengeId: LS(e, "challengeId") ? e.challengeId : void 0, challengeMetadata: LS(e, "challengeMetadata") ? e.challengeMetadata : void 0, challengeType: LS(e, "challengeType") ? e.challengeType : void 0 } }(e) } function HS(e) { return function(e) { return null == e ? e : { token: LS(e, "token") ? e.token : void 0 } }(e) } var FS = function(e) { function t() { return null !== e && e.apply(this, arguments) || this } return Q_(t, e), t.prototype._continueRaw = function(e, t) { return eS(this, void 0, void 0, (function() { var n, r, a; return tS(this, (function(i) { switch (i.label) { case 0: if (null === e.continueRequest || void 0 === e.continueRequest) throw new wS("continueRequest", "Required parameter requestParameters.continueRequest was null or undefined when calling _continue."); return n = {}, (r = {})["Content-Type"] = "application/json", [4, this.request({ path: "/v1/continue", method: "POST", headers: r, query: n, body: US(e.continueRequest) }, t)]; case 1: return a = i.sent(), [2, new DS(a, (function(e) { return WS(e) }))] } })) })) }, t.prototype._continue = function(e, t) { return eS(this, void 0, void 0, (function() { return tS(this, (function(n) { switch (n.label) { case 0: return [4, this._continueRaw(e, t)]; case 1: return [4, n.sent().value()]; case 2: return [2, n.sent()] } })) })) }, t.prototype.getXboxTokenRaw = function(e) { return eS(this, void 0, void 0, (function() { var t, n, r; return tS(this, (function(a) { switch (a.label) { case 0: return t = {}, n = {}, [4, this.request({ path: "/v1/xboxToken", method: "GET", headers: n, query: t }, e)]; case 1: return r = a.sent(), [2, new DS(r, (function(e) { return HS(e) }))] } })) })) }, t.prototype.getXboxToken = function(e) { return eS(this, void 0, void 0, (function() { return tS(this, (function(t) { switch (t.label) { case 0: return [4, this.getXboxTokenRaw(e)]; case 1: return [4, t.sent().value()]; case 2: return [2, t.sent()] } })) })) }, t.prototype.handleHealthCheckRaw = function(e) { return eS(this, void 0, void 0, (function() { var t, n, r; return tS(this, (function(a) { switch (a.label) { case 0: return t = {}, n = {}, [4, this.request({ path: "/health", method: "GET", headers: n, query: t }, e)]; case 1: return r = a.sent(), [2, new DS(r)] } })) })) }, t.prototype.handleHealthCheck = function(e) { return eS(this, void 0, void 0, (function() { return tS(this, (function(t) { switch (t.label) { case 0: return [4, this.handleHealthCheckRaw(e)]; case 1: return [4, t.sent().value()]; case 2: return [2, t.sent()] } })) })) }, t }(IS); function GS(e) { if (void 0 !== e) return null === e ? null : { challengeId: e.challengeId, userId: e.userId, timestamp: e.timestamp, scriptLocation: e.scriptLocation } } function jS(e) { if (void 0 !== e) return null === e ? null : { userId: e.userId, challengeId: e.challengeId } } function zS(e) { if (void 0 !== e) return null === e ? null : { userId: e.userId, challengeId: e.challengeId, payload: e.payload, payloadV2: e.payloadV2 } } function ZS(e) { if (void 0 !== e) return null === e ? null : { userId: e.userId, timestamp: e.timestamp, fileBase64: e.fileBase64 } } function qS(e) { return function(e) { return null == e ? e : { content: LS(e, "content") ? e.content : void 0, expectedNumCalls: LS(e, "expectedNumCalls") ? e.expectedNumCalls : void 0, expectedSymbols: LS(e, "expectedSymbols") ? e.expectedSymbols : void 0, identifiersToFetch: LS(e, "identifiersToFetch") ? e.identifiersToFetch : void 0 } }(e) } function BS(e) { return function(e) { return null == e ? e : { scriptLocation: LS(e, "scriptLocation") ? e.scriptLocation : void 0 } }(e) } var KS = function(e) { function t() { return null !== e && e.apply(this, arguments) || this } return Q_(t, e), t.prototype.challengeFetchRaw = function(e, t) { return eS(this, void 0, void 0, (function() { var n, r, a; return tS(this, (function(i) { switch (i.label) { case 0: return n = {}, void 0 !== e.req && (n.req = e.req), r = {}, void 0 !== e.robloxApiKey && null !== e.robloxApiKey && (r["Roblox-Api-Key"] = String(e.robloxApiKey)), [4, this.request({ path: "/v1/fetch", method: "GET", headers: r, query: n }, t)]; case 1: return a = i.sent(), [2, new RS(a)] } })) })) }, t.prototype.challengeFetch = function() { return eS(this, arguments, void 0, (function(e, t) { return void 0 === e && (e = {}), tS(this, (function(n) { switch (n.label) { case 0: return [4, this.challengeFetchRaw(e, t)]; case 1: return n.sent(), [2] } })) })) }, t.prototype.challengeInitSessionRaw = function(e, t) { return eS(this, void 0, void 0, (function() { var n, r, a; return tS(this, (function(i) { switch (i.label) { case 0: return n = {}, (r = {})["Content-Type"] = "application/json-patch+json", void 0 !== e.robloxApiKey && null !== e.robloxApiKey && (r["Roblox-Api-Key"] = String(e.robloxApiKey)), [4, this.request({ path: "/v1/initSession", method: "POST", headers: r, query: n, body: GS(e.challengeInitSessionRequest) }, t)]; case 1: return a = i.sent(), [2, new DS(a, (function(e) { return qS(e) }))] } })) })) }, t.prototype.challengeInitSession = function() { return eS(this, arguments, void 0, (function(e, t) { return void 0 === e && (e = {}), tS(this, (function(n) { switch (n.label) { case 0: return [4, this.challengeInitSessionRaw(e, t)]; case 1: return [4, n.sent().value()]; case 2: return [2, n.sent()] } })) })) }, t.prototype.challengeRedeemSessionRaw = function(e, t) { return eS(this, void 0, void 0, (function() { var n, r, a; return tS(this, (function(i) { switch (i.label) { case 0: return n = {}, (r = {})["Content-Type"] = "application/json-patch+json", void 0 !== e.robloxApiKey && null !== e.robloxApiKey && (r["Roblox-Api-Key"] = String(e.robloxApiKey)), [4, this.request({ path: "/v1/redeemSession", method: "POST", headers: r, query: n, body: jS(e.challengeRedeemSessionRequest) }, t)]; case 1: return a = i.sent(), [2, new DS(a)] } })) })) }, t.prototype.challengeRedeemSession = function() { return eS(this, arguments, void 0, (function(e, t) { return void 0 === e && (e = {}), tS(this, (function(n) { switch (n.label) { case 0: return [4, this.challengeRedeemSessionRaw(e, t)]; case 1: return [4, n.sent().value()]; case 2: return [2, n.sent()] } })) })) }, t.prototype.challengeSubmitRaw = function(e, t) { return eS(this, void 0, void 0, (function() { var n, r, a; return tS(this, (function(i) { switch (i.label) { case 0: return n = {}, (r = {})["Content-Type"] = "application/json-patch+json", void 0 !== e.referer && null !== e.referer && (r.Referer = String(e.referer)), [4, this.request({ path: "/v1/submit", method: "POST", headers: r, query: n, body: zS(e.challengeSubmitRequest) }, t)]; case 1: return a = i.sent(), [2, new DS(a)] } })) })) }, t.prototype.challengeSubmit = function() { return eS(this, arguments, void 0, (function(e, t) { return void 0 === e && (e = {}), tS(this, (function(n) { switch (n.label) { case 0: return [4, this.challengeSubmitRaw(e, t)]; case 1: return [4, n.sent().value()]; case 2: return [2, n.sent()] } })) })) }, t.prototype.challengeUploadRaw = function(e, t) { return eS(this, void 0, void 0, (function() { var n, r, a; return tS(this, (function(i) { switch (i.label) { case 0: return n = {}, (r = {})["Content-Type"] = "application/json-patch+json", void 0 !== e.robloxApiKey && null !== e.robloxApiKey && (r["Roblox-Api-Key"] = String(e.robloxApiKey)), [4, this.request({ path: "/v1/upload", method: "POST", headers: r, query: n, body: ZS(e.challengeUploadRequest) }, t)]; case 1: return a = i.sent(), [2, new DS(a, (function(e) { return BS(e) }))] } })) })) }, t.prototype.challengeUpload = function() { return eS(this, arguments, void 0, (function(e, t) { return void 0 === e && (e = {}), tS(this, (function(n) { switch (n.label) { case 0: return [4, this.challengeUploadRaw(e, t)]; case 1: return [4, n.sent().value()]; case 2: return [2, n.sent()] } })) })) }, t }(IS); function YS(e, t) { return function(e) { if (Array.isArray(e)) return e }(e) || function(e, t) { if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return; var n = [], r = !0, a = !1, i = void 0; try { for (var o, l = e[Symbol.iterator](); !(r = (o = l.next()).done) && (n.push(o.value), !t || n.length !== t); r = !0); } catch (e) { a = !0, i = e } finally { try { r || null == l.return || l.return() } finally { if (a) throw i } } return n }(e, t) || vI(e, t) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function JS(e, t, n, r, a, i, o) { try { var l = e[i](o), u = l.value } catch (e) { return void n(e) } l.done ? t(u) : Promise.resolve(u).then(r, a) } function XS(e) { return function() { var t = this, n = arguments; return new Promise((function(r, a) { var i = e.apply(t, n); function o(e) { JS(i, r, a, o, l, "next", e) } function l(e) { JS(i, r, a, o, l, "throw", e) } o(void 0) })) } } function QS(e) { return function(e) { if (Array.isArray(e)) return mI(e) }(e) || function(e) { if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e) }(e) || vI(e) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function $S(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function eI(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } function tI(e, t, n) { return t && eI(e.prototype, t), n && eI(e, n), e } function nI(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && uI(e, t) } function rI(e) { var t = lI(); return function() { var n, r = cI(e); if (t) { var a = cI(this).constructor; n = Reflect.construct(r, arguments, a) } else n = r.apply(this, arguments); return function(e, t) { if (t && ("object" === sI(t) || "function" == typeof t)) return t; return aI(e) }(this, n) } } function aI(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e } function iI(e) { var t = "function" == typeof Map ? new Map : void 0; return iI = function(e) { if (null === e || ! function(e) { return -1 !== Function.toString.call(e).indexOf("[native code]") }(e)) return e; if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== t) { if (t.has(e)) return t.get(e); t.set(e, n) } function n() { return oI(e, arguments, cI(this).constructor) } return n.prototype = Object.create(e.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), uI(n, e) }, iI(e) } function oI(e, t, n) { return oI = lI() ? Reflect.construct : function(e, t, n) { var r = [null]; r.push.apply(r, t); var a = new(Function.bind.apply(e, r)); return n && uI(a, n.prototype), a }, oI.apply(null, arguments) } function lI() { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], (function() {}))), !0 } catch (e) { return !1 } } function uI(e, t) { return uI = Object.setPrototypeOf || function(e, t) { return e.__proto__ = t, e }, uI(e, t) } function cI(e) { return cI = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { return e.__proto__ || Object.getPrototypeOf(e) }, cI(e) } function sI(e) { return sI = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, sI(e) } function dI(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter((function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function fI(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? dI(Object(n), !0).forEach((function(t) { pI(e, t, n[t]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : dI(Object(n)).forEach((function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)) })) } return e } function pI(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } function hI(e, t) { var n; if ("undefined" == typeof Symbol || null == e[Symbol.iterator]) { if (Array.isArray(e) || (n = vI(e)) || t && e && "number" == typeof e.length) { n && (e = n); var r = 0, a = function() {}; return { s: a, n: function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] } }, e: function(e) { throw e }, f: a } } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") } var i, o = !0, l = !1; return { s: function() { n = e[Symbol.iterator]() }, n: function() { var e = n.next(); return o = e.done, e }, e: function(e) { l = !0, i = e }, f: function() { try { o || null == n.return || n.return() } finally { if (l) throw i } } } } function vI(e, t) { if (e) { if ("string" == typeof e) return mI(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? mI(e, t) : void 0 } } function mI(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; return r } var yI, gI, EI, bI = function() { return bI = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, bI.apply(this, arguments) }; function CI(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) } function _I(e, t) { var n, r, a, i = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }, o = Object.create(("function" == typeof Iterator ? Iterator : Object).prototype); return o.next = l(0), o.throw = l(1), o.return = l(2), "function" == typeof Symbol && (o[Symbol.iterator] = function() { return this }), o; function l(l) { return function(u) { return function(l) { if (n) throw new TypeError("Generator is already executing."); for (; o && (o = 0, l[0] && (i = 0)), i;) try { if (n = 1, r && (a = 2 & l[0] ? r.return : l[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, l[1])).done) return a; switch (r = 0, a && (l = [2 & l[0], a.value]), l[0]) { case 0: case 1: a = l; break; case 4: return i.label++, { value: l[1], done: !1 }; case 5: i.label++, r = l[1], l = [0]; continue; case 7: l = i.ops.pop(), i.trys.pop(); continue; default: if (!((a = (a = i.trys).length > 0 && a[a.length - 1]) || 6 !== l[0] && 2 !== l[0])) { i = 0; continue } if (3 === l[0] && (!a || l[1] > a[0] && l[1] < a[3])) { i.label = l[1]; break } if (6 === l[0] && i.label < a[1]) { i.label = a[1], a = l; break } if (a && i.label < a[2]) { i.label = a[2], i.ops.push(l); break } a[2] && i.ops.pop(), i.trys.pop(); continue } l = t.call(e, i) } catch (e) { l = [6, e], r = 0 } finally { n = a = 0 } if (5 & l[0]) throw l[1]; return { value: l[0] ? l[1] : void 0, done: !0 } }([l, u]) } } } "function" == typeof SuppressedError && SuppressedError, function(e) { e.Login = "Login", e.AppLogin = "AppLogin", e.Signup = "Signup", e.AppSignup = "AppSignup", e.JoinGroup = "JoinGroup", e.GroupWallPost = "GroupWallPost", e.ResetPassword = "ResetPassword", e.ToyCodeRedeem = "ToyCodeRedeem", e.GameCardRedeem = "GameCardRedeem", e.FollowUser = "FollowUser", e.Generic = "Generic", e.SupportRequest = "SupportRequest", e.AssetComment = "AssetComment", e.Marketplace = "Marketplace" }(yI || (yI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(gI || (gI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.FAILED_PREP = 1] = "FAILED_PREP", e[e.FAILED_MIREPOIX = 2] = "FAILED_MIREPOIX", e[e.FAILED_SIMMER = 3] = "FAILED_SIMMER" }(EI || (EI = {})); var SI, II, TI, AI, NI, wI, LI, OI, kI, DI, RI, PI, xI, MI, VI, UI, WI = Object.freeze({ __proto__: null, get ErrorCode() { return EI } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(SI || (SI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(II || (II = {})), function(e) { e.ForceAuthenticator = "ForceAuthenticator", e.ForceTwoStepVerification = "ForceTwoStepVerification", e.BlockSession = "BlockSession" }(TI || (TI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(AI || (AI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_INVALID = 1] = "SESSION_INVALID", e[e.ANSWER_INVALID = 2] = "ANSWER_INVALID", e[e.WORKER_LOAD_ERROR = 3] = "WORKER_LOAD_ERROR", e[e.TIMEOUT = 4] = "TIMEOUT" }(NI || (NI = {})), function(e) { e.INVALID = "PROOF_OF_SPACE_PUZZLE_TYPE_INVALID", e.NONINTERACTIVE = "PROOF_OF_SPACE_PUZZLE_TYPE_NONINTERACTIVE", e.INTERACTIVE = "PROOF_OF_SPACE_PUZZLE_TYPE_INTERACTIVE" }(wI || (wI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_INVALID = 1] = "SESSION_INVALID", e[e.ANSWER_INVALID = 2] = "ANSWER_INVALID", e[e.WORKER_LOAD_ERROR = 3] = "WORKER_LOAD_ERROR" }(LI || (LI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.OTP_CODE_EXPIRED = 1] = "OTP_CODE_EXPIRED" }(OI || (OI = {})), function(e) { e.Password = "Password", e.OtpEmail = "Otp_Email", e.Passkey = "Passkey" }(kI || (kI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.INVALID_SESSION = 1] = "INVALID_SESSION" }(DI || (DI = {})), function(e) { e.INVALID = "ROSTILE_PUZZLE_TYPE_INVALID", e.VISIBLE = "ROSTILE_PUZZLE_TYPE_VISIBLE", e.INVISIBLE = "ROSTILE_PUZZLE_TYPE_INVISIBLE" }(RI || (RI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_EXPIRED = 1] = "SESSION_EXPIRED", e[e.USER_WAS_FORCE_RESET = 2] = "USER_WAS_FORCE_RESET" }(PI || (PI = {})), function(e) { e.Unknown = "Unknown", e.Login = "Login", e.RobuxSpend = "RobuxSpend", e.ItemTrade = "ItemTrade", e.Resale = "Resale", e.PasswordReset = "PasswordReset", e.RevertAccount = "RevertAccount", e.Generic = "Generic", e.GenericWithRecoveryCodes = "GenericWithRecoveryCodes" }(xI || (xI = {})), function(e) { e.Email = "Email", e.Authenticator = "Authenticator", e.RecoveryCode = "RecoveryCode", e.SMS = "SMS", e.SecurityKey = "SecurityKey", e.CrossDevice = "CrossDevice", e.Password = "Password", e.Passkey = "Passkey" }(MI || (MI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_EXPIRED = 1] = "SESSION_EXPIRED" }(VI || (VI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(UI || (UI = {})); var HI, FI, GI = function(e, t) { return GI = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) { e.__proto__ = t } || function(e, t) { for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) }, GI(e, t) }; "function" == typeof SuppressedError && SuppressedError, function(e) { e.UNKNOWN = "unknown", e.INVALIDATED = "invalidated", e.ABANDONED = "abandoned", e.LOADFAILED = "loadfailed" }(HI || (HI = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(FI || (FI = {})); var jI;! function(e) { function t(t) { var n = e.call(this, "challenge error for challenge kind ".concat(t.kind)) || this; return n.parameters = t, n }(function(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); function n() { this.constructor = e } GI(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n) })(t, e), t.prototype.match = function(e) { return this.parameters.kind === e.parameters.kind && JSON.stringify(this.parameters.data) === JSON.stringify(e.parameters.data) }, t.prototype.matchAbandoned = function(e) { return this.match(e) && e.parameters.kind === HI.ABANDONED } }(Error);! function(e) { e.UNKNOWN = "unknown", e.CHEF = "chef" }(jI || (jI = {})); function zI(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return function() { return t(e.apply(this, arguments)) }; case 3: return function() { return n(t(e.apply(this, arguments))) }; case 4: return function() { return r(n(t(e.apply(this, arguments)))) }; case 5: return function() { return a(r(n(t(e.apply(this, arguments))))) }; case 6: return function() { return i(a(r(n(t(e.apply(this, arguments)))))) }; case 7: return function() { return o(i(a(r(n(t(e.apply(this, arguments))))))) }; case 8: return function() { return l(o(i(a(r(n(t(e.apply(this, arguments)))))))) }; case 9: return function() { return u(l(o(i(a(r(n(t(e.apply(this, arguments))))))))) } } } function ZI(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return t(e); case 3: return n(t(e)); case 4: return r(n(t(e))); case 5: return a(r(n(t(e)))); case 6: return i(a(r(n(t(e))))); case 7: return o(i(a(r(n(t(e)))))); case 8: return l(o(i(a(r(n(t(e))))))); case 9: return u(l(o(i(a(r(n(t(e)))))))); default: for (var c = arguments[0], s = 1; s < arguments.length; s++) c = arguments[s](c); return c } } var qI = function(e, t) { return t }, BI = function(e, t) { var n = "number" == typeof e ? function(t) { return t.length >= e } : e; return function() { var e = Array.from(arguments); return n(arguments) ? t.apply(this, e) : function(n) { return t.apply(void 0, function(e, t, n) { if (n || 2 === arguments.length) for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]); return e.concat(r || Array.prototype.slice.call(t)) }([n], e, !1)) } } }, KI = function(e) { return { _tag: "Left", left: e } }, YI = function(e) { return { _tag: "Right", right: e } }, JI = { _tag: "None" }, XI = function(e) { return { _tag: "Some", value: e } }, QI = function(e) { return "None" === e._tag }, $I = KI, eT = YI, tT = { URI: "Either", map: function(e, t) { return ZI(e, function(e) { return function(t) { return nT(t) ? t : eT(e(t.right)) } }(t)) } }, nT = function(e) { return "Left" === e._tag }, rT = function(e, t) { try { return eT(e()) } catch (e) { return $I(t(e)) } }; var aT, iT = function(e, t) { return ZI(e, oT(t)) }, oT = function(e) { return function(t) { return function() { return Promise.resolve().then(t).then(e) } } }, lT = function(e) { return function() { return Promise.resolve(e) } }, uT = BI(2, (function(e, t) { return function() { return Promise.resolve().then(e).then((function(e) { return t(e)() })) } })), cT = "Task", sT = { URI: cT, map: iT }, dT = { URI: cT, map: iT, of: lT, ap: function(e, t) { return ZI(e, function(e) { return function(t) { return function() { return Promise.all([Promise.resolve().then(t), Promise.resolve().then(e)]).then((function(e) { return (0, e[0])(e[1]) })) } } }(t)) }, chain: uT }, fT = function(e) { return zI(eT, e.of) }({ URI: cT, of: lT }), pT = function(e) { return function(t) { return function(n) { return e.chain(n, function(e, t) { return function(n) { return nT(n) ? e(n.left) : t(n.right) } }(t, e.of)) } } }(dT), hT = function(e, t) { return function() { return function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }(void 0, void 0, void 0, (function() { var n; return function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(l) { return function(u) { return function(l) { if (n) throw new TypeError("Generator is already executing."); for (; i && (i = 0, l[0] && (o = 0)), o;) try { if (n = 1, r && (a = 2 & l[0] ? r.return : l[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, l[1])).done) return a; switch (r = 0, a && (l = [2 & l[0], a.value]), l[0]) { case 0: case 1: a = l; break; case 4: return o.label++, { value: l[1], done: !1 }; case 5: o.label++, r = l[1], l = [0]; continue; case 7: l = o.ops.pop(), o.trys.pop(); continue; default: if (!((a = (a = o.trys).length > 0 && a[a.length - 1]) || 6 !== l[0] && 2 !== l[0])) { o = 0; continue } if (3 === l[0] && (!a || l[1] > a[0] && l[1] < a[3])) { o.label = l[1]; break } if (6 === l[0] && o.label < a[1]) { o.label = a[1], a = l; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(l); break } a[2] && o.ops.pop(), o.trys.pop(); continue } l = t.call(e, o) } catch (e) { l = [6, e], r = 0 } finally { n = a = 0 } if (5 & l[0]) throw l[1]; return { value: l[0] ? l[1] : void 0, done: !0 } }([l, u]) } } }(this, (function(r) { switch (r.label) { case 0: return r.trys.push([0, 2, , 3]), [4, e().then(YI)]; case 1: return [2, r.sent()]; case 2: return n = r.sent(), [2, KI(t(n))]; case 3: return [2] } })) })) } }, vT = function(e) { return function(e, t) { return function(n) { return function(r) { return e.map(r, (function(e) { return t.map(e, n) })) } } }(e, tT) }(sT), mT = BI(3, (aT = sT, function(e, t, n) { return aT.map(e, function(e, t) { return function(n) { return nT(n) ? $I(e(n.left)) : eT(t(n.right)) } }(t, n)) })), yT = fT([]), gT = function(e) { return function(e) { var t = function(e) { return zI(function(e) { return function(t) { return function() { return Promise.all(t.map((function(t, n) { return Promise.resolve().then((function() { return e(n, t)() })) }))) } } }(e), oT(function(e) { return function(t) { var n = e(0, function(e) { return e[0] }(t)); if (nT(n)) return n; for (var r = [n.right], a = 1; a < t.length; a++) { var i = e(a, t[a]); if (nT(i)) return i; r.push(i.right) } return eT(r) } }(qI))) }(e); return function(e) { return function(e) { return e.length > 0 }(e) ? t(e) : yT } }((function(t, n) { return e(n) })) }, ET = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, bT = {};! function(e) { var t = ET && ET.__spreadArray || function(e, t, n) { if (n || 2 === arguments.length) for (var r, a = 0, i = t.length; a < i; a++) !r && a in t || (r || (r = Array.prototype.slice.call(t, 0, a)), r[a] = t[a]); return e.concat(r || Array.prototype.slice.call(t)) }; function n(e) { return e } function r(e) { return function() { return e } } function a(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return function() { return t(e.apply(this, arguments)) }; case 3: return function() { return n(t(e.apply(this, arguments))) }; case 4: return function() { return r(n(t(e.apply(this, arguments)))) }; case 5: return function() { return a(r(n(t(e.apply(this, arguments))))) }; case 6: return function() { return i(a(r(n(t(e.apply(this, arguments)))))) }; case 7: return function() { return o(i(a(r(n(t(e.apply(this, arguments))))))) }; case 8: return function() { return l(o(i(a(r(n(t(e.apply(this, arguments)))))))) }; case 9: return function() { return u(l(o(i(a(r(n(t(e.apply(this, arguments))))))))) } } } function i(e) { throw new Error("Called `absurd` function which should be uncallable") } Object.defineProperty(e, "__esModule", { value: !0 }), e.dual = e.getEndomorphismMonoid = e.SK = e.hole = e.constVoid = e.constUndefined = e.constNull = e.constFalse = e.constTrue = e.unsafeCoerce = e.apply = e.getRing = e.getSemiring = e.getMonoid = e.getSemigroup = e.getBooleanAlgebra = void 0, e.identity = n, e.constant = r, e.flip = function(e) { return function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return t.length > 1 ? e(t[1], t[0]) : function(n) { return e(n)(t[0]) } } }, e.flow = a, e.tuple = function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return e }, e.increment = function(e) { return e + 1 }, e.decrement = function(e) { return e - 1 }, e.absurd = i, e.tupled = function(e) { return function(t) { return e.apply(void 0, t) } }, e.untupled = function(e) { return function() { for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; return e(t) } }, e.pipe = function(e, t, n, r, a, i, o, l, u) { switch (arguments.length) { case 1: return e; case 2: return t(e); case 3: return n(t(e)); case 4: return r(n(t(e))); case 5: return a(r(n(t(e)))); case 6: return i(a(r(n(t(e))))); case 7: return o(i(a(r(n(t(e)))))); case 8: return l(o(i(a(r(n(t(e))))))); case 9: return u(l(o(i(a(r(n(t(e)))))))); default: for (var c = arguments[0], s = 1; s < arguments.length; s++) c = arguments[s](c); return c } }, e.not = function(e) { return function(t) { return !e(t) } }, e.getBooleanAlgebra = function(e) { return function() { return { meet: function(t, n) { return function(r) { return e.meet(t(r), n(r)) } }, join: function(t, n) { return function(r) { return e.join(t(r), n(r)) } }, zero: function() { return e.zero }, one: function() { return e.one }, implies: function(t, n) { return function(r) { return e.implies(t(r), n(r)) } }, not: function(t) { return function(n) { return e.not(t(n)) } } } } }, e.getSemigroup = function(e) { return function() { return { concat: function(t, n) { return function(r) { return e.concat(t(r), n(r)) } } } } }, e.getMonoid = function(t) { var n = (0, e.getSemigroup)(t); return function() { return { concat: n().concat, empty: function() { return t.empty } } } }, e.getSemiring = function(e) { return { add: function(t, n) { return function(r) { return e.add(t(r), n(r)) } }, zero: function() { return e.zero }, mul: function(t, n) { return function(r) { return e.mul(t(r), n(r)) } }, one: function() { return e.one } } }, e.getRing = function(t) { var n = (0, e.getSemiring)(t); return { add: n.add, mul: n.mul, one: n.one, zero: n.zero, sub: function(e, n) { return function(r) { return t.sub(e(r), n(r)) } } } }, e.apply = function(e) { return function(t) { return t(e) } }, e.unsafeCoerce = n, e.constTrue = r(!0), e.constFalse = r(!1), e.constNull = r(null), e.constUndefined = r(void 0), e.constVoid = e.constUndefined, e.hole = i, e.SK = function(e, t) { return t }, e.getEndomorphismMonoid = function() { return { concat: function(e, t) { return a(e, t) }, empty: n } }, e.dual = function(e, n) { var r = "number" == typeof e ? function(t) { return t.length >= e } : e; return function() { var e = Array.from(arguments); return r(arguments) ? n.apply(this, e) : function(r) { return n.apply(void 0, t([r], e, !1)) } } } }(bT); var CT, _T, ST = ["sitetest1", "sitetest2", "sitetest3"], IT = function() { var e = ST.filter((function(e) { return window.location.hostname.includes(e) })); return e.length > 0 ? "https://apis.".concat(e[0], ".robloxlabs.com") : "https://apis.roblox.com" }, TT = function(e) { return Object.values(jI).includes(e) }, AT = Object.freeze({ __proto__: null, isSupportedByGrasshopper: TT }), NT = "Generic Challenge:";! function(e) { e.assertEqual = function(e) { return e }, e.assertIs = function(e) {}, e.assertNever = function(e) { throw new Error }, e.arrayToEnum = function(e) { var t, n = {}, r = hI(e); try { for (r.s(); !(t = r.n()).done;) { var a = t.value; n[a] = a } } catch (e) { r.e(e) } finally { r.f() } return n }, e.getValidEnumValues = function(t) { var n, r = {}, a = hI(e.objectKeys(t).filter((function(e) { return "number" != typeof t[t[e]] }))); try { for (a.s(); !(n = a.n()).done;) { var i = n.value; r[i] = t[i] } } catch (e) { a.e(e) } finally { a.f() } return e.objectValues(r) }, e.objectValues = function(t) { return e.objectKeys(t).map((function(e) { return t[e] })) }, e.objectKeys = "function" == typeof Object.keys ? function(e) { return Object.keys(e) } : function(e) { var t = []; for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n); return t }, e.find = function(e, t) { var n, r = hI(e); try { for (r.s(); !(n = r.n()).done;) { var a = n.value; if (t(a)) return a } } catch (e) { r.e(e) } finally { r.f() } }, e.isInteger = "function" == typeof Number.isInteger ? function(e) { return Number.isInteger(e) } : function(e) { return "number" == typeof e && isFinite(e) && Math.floor(e) === e }, e.joinValues = function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : " | "; return e.map((function(e) { return "string" == typeof e ? "'".concat(e, "'") : e })).join(t) }, e.jsonStringifyReplacer = function(e, t) { return "bigint" == typeof t ? t.toString() : t } }(CT || (CT = {})), function(e) { e.mergeShapes = function(e, t) { return fI(fI({}, e), t) } }(_T || (_T = {})); var wT = CT.arrayToEnum(["string", "nan", "number", "integer", "float", "boolean", "date", "bigint", "symbol", "function", "undefined", "null", "array", "object", "unknown", "promise", "void", "never", "map", "set"]), LT = function(e) { switch (sI(e)) { case "undefined": return wT.undefined; case "string": return wT.string; case "number": return isNaN(e) ? wT.nan : wT.number; case "boolean": return wT.boolean; case "function": return wT.function; case "bigint": return wT.bigint; case "symbol": return wT.symbol; case "object": return Array.isArray(e) ? wT.array : null === e ? wT.null : e.then && "function" == typeof e.then && e.catch && "function" == typeof e.catch ? wT.promise : "undefined" != typeof Map && e instanceof Map ? wT.map : "undefined" != typeof Set && e instanceof Set ? wT.set : "undefined" != typeof Date && e instanceof Date ? wT.date : wT.object; default: return wT.unknown } }, OT = CT.arrayToEnum(["invalid_type", "invalid_literal", "custom", "invalid_union", "invalid_union_discriminator", "invalid_enum_value", "unrecognized_keys", "invalid_arguments", "invalid_return_type", "invalid_date", "invalid_string", "too_small", "too_big", "invalid_intersection_types", "not_multiple_of", "not_finite"]), kT = function(e) { nI(n, e); var t = rI(n); function n(e) { var r; $S(this, n), (r = t.call(this)).issues = [], r.addIssue = function(e) { r.issues = [].concat(QS(r.issues), [e]) }, r.addIssues = function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; r.issues = [].concat(QS(r.issues), QS(e)) }; var a = (this instanceof n ? this.constructor : void 0).prototype; return Object.setPrototypeOf ? Object.setPrototypeOf(aI(r), a) : r.__proto__ = a, r.name = "ZodError", r.issues = e, r } return tI(n, [{ key: "errors", get: function() { return this.issues } }]), tI(n, [{ key: "format", value: function(e) { var t = e || function(e) { return e.message }, n = { _errors: [] }; return function e(r) { var a, i = hI(r.issues); try { for (i.s(); !(a = i.n()).done;) { var o = a.value; if ("invalid_union" === o.code) o.unionErrors.map(e); else if ("invalid_return_type" === o.code) e(o.returnTypeError); else if ("invalid_arguments" === o.code) e(o.argumentsError); else if (0 === o.path.length) n._errors.push(t(o)); else for (var l = n, u = 0; u < o.path.length;) { var c = o.path[u]; u === o.path.length - 1 ? (l[c] = l[c] || { _errors: [] }, l[c]._errors.push(t(o))) : l[c] = l[c] || { _errors: [] }, l = l[c], u++ } } } catch (e) { i.e(e) } finally { i.f() } }(this), n } }, { key: "toString", value: function() { return this.message } }, { key: "flatten", value: function() { var e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function(e) { return e.message }, n = {}, r = [], a = hI(this.issues); try { for (a.s(); !(e = a.n()).done;) { var i = e.value; i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i)) } } catch (e) { a.e(e) } finally { a.f() } return { formErrors: r, fieldErrors: n } } }, { key: "message", get: function() { return JSON.stringify(this.issues, CT.jsonStringifyReplacer, 2) } }, { key: "isEmpty", get: function() { return 0 === this.issues.length } }, { key: "formErrors", get: function() { return this.flatten() } }], [{ key: "assert", value: function(e) { if (!(e instanceof n)) throw new Error("Not a ZodError: ".concat(e)) } }]), n }(iI(Error)); kT.create = function(e) { return new kT(e) }; var DT = function(e, t) { var n; switch (e.code) { case OT.invalid_type: n = e.received === wT.undefined ? "Required" : "Expected ".concat(e.expected, ", received ").concat(e.received); break; case OT.invalid_literal: n = "Invalid literal value, expected ".concat(JSON.stringify(e.expected, CT.jsonStringifyReplacer)); break; case OT.unrecognized_keys: n = "Unrecognized key(s) in object: ".concat(CT.joinValues(e.keys, ", ")); break; case OT.invalid_union: n = "Invalid input"; break; case OT.invalid_union_discriminator: n = "Invalid discriminator value. Expected ".concat(CT.joinValues(e.options)); break; case OT.invalid_enum_value: n = "Invalid enum value. Expected ".concat(CT.joinValues(e.options), ", received '").concat(e.received, "'"); break; case OT.invalid_arguments: n = "Invalid function arguments"; break; case OT.invalid_return_type: n = "Invalid function return type"; break; case OT.invalid_date: n = "Invalid date"; break; case OT.invalid_string: "object" == sI(e.validation) ? "includes" in e.validation ? (n = 'Invalid input: must include "'.concat(e.validation.includes, '"'), "number" == typeof e.validation.position && (n = "".concat(n, " at one or more positions greater than or equal to ").concat(e.validation.position))) : "startsWith" in e.validation ? n = 'Invalid input: must start with "'.concat(e.validation.startsWith, '"') : "endsWith" in e.validation ? n = 'Invalid input: must end with "'.concat(e.validation.endsWith, '"') : CT.assertNever(e.validation) : n = "regex" !== e.validation ? "Invalid ".concat(e.validation) : "Invalid"; break; case OT.too_small: n = "array" === e.type ? "Array must contain ".concat(e.exact ? "exactly" : e.inclusive ? "at least" : "more than", " ").concat(e.minimum, " element(s)") : "string" === e.type ? "String must contain ".concat(e.exact ? "exactly" : e.inclusive ? "at least" : "over", " ").concat(e.minimum, " character(s)") : "number" === e.type ? "Number must be ".concat(e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than ").concat(e.minimum) : "date" === e.type ? "Date must be ".concat(e.exact ? "exactly equal to " : e.inclusive ? "greater than or equal to " : "greater than ").concat(new Date(Number(e.minimum))) : "Invalid input"; break; case OT.too_big: n = "array" === e.type ? "Array must contain ".concat(e.exact ? "exactly" : e.inclusive ? "at most" : "less than", " ").concat(e.maximum, " element(s)") : "string" === e.type ? "String must contain ".concat(e.exact ? "exactly" : e.inclusive ? "at most" : "under", " ").concat(e.maximum, " character(s)") : "number" === e.type ? "Number must be ".concat(e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than", " ").concat(e.maximum) : "bigint" === e.type ? "BigInt must be ".concat(e.exact ? "exactly" : e.inclusive ? "less than or equal to" : "less than", " ").concat(e.maximum) : "date" === e.type ? "Date must be ".concat(e.exact ? "exactly" : e.inclusive ? "smaller than or equal to" : "smaller than", " ").concat(new Date(Number(e.maximum))) : "Invalid input"; break; case OT.custom: n = "Invalid input"; break; case OT.invalid_intersection_types: n = "Intersection results could not be merged"; break; case OT.not_multiple_of: n = "Number must be a multiple of ".concat(e.multipleOf); break; case OT.not_finite: n = "Number must be finite"; break; default: n = t.defaultError, CT.assertNever(e) } return { message: n } }, RT = DT; function PT(e, t) { var n = RT, r = function(e) { var t = e.data, n = e.path, r = e.errorMaps, a = e.issueData, i = [].concat(QS(n), QS(a.path || [])), o = fI(fI({}, a), {}, { path: i }); if (void 0 !== a.message) return fI(fI({}, a), {}, { path: i, message: a.message }); var l, u = "", c = r.filter((function(e) { return !!e })).slice().reverse(), s = hI(c); try { for (s.s(); !(l = s.n()).done;) u = (0, l.value)(o, { data: t, defaultError: u }).message } catch (e) { s.e(e) } finally { s.f() } return fI(fI({}, a), {}, { path: i, message: u }) }({ issueData: t, data: e.data, path: e.path, errorMaps: [e.common.contextualErrorMap, e.schemaErrorMap, n, n === DT ? void 0 : DT].filter((function(e) { return !!e })) }); e.common.issues.push(r) } var xT, MT, VT, UT = function() { function e() { $S(this, e), this.value = "valid" } var t; return tI(e, [{ key: "dirty", value: function() { "valid" === this.value && (this.value = "dirty") } }, { key: "abort", value: function() { "aborted" !== this.value && (this.value = "aborted") } }], [{ key: "mergeArray", value: function(e, t) { var n, r = [], a = hI(t); try { for (a.s(); !(n = a.n()).done;) { var i = n.value; if ("aborted" === i.status) return WT; "dirty" === i.status && e.dirty(), r.push(i.value) } } catch (e) { a.e(e) } finally { a.f() } return { status: e.value, value: r } } }, { key: "mergeObjectAsync", value: (t = XS(regeneratorRuntime.mark((function t(n, r) { var a, i, o, l, u, c; return regeneratorRuntime.wrap((function(t) { for (;;) switch (t.prev = t.next) { case 0: a = [], i = hI(r), t.prev = 2, i.s(); case 4: if ((o = i.n()).done) { t.next = 15; break } return l = o.value, t.next = 8, l.key; case 8: return u = t.sent, t.next = 11, l.value; case 11: c = t.sent, a.push({ key: u, value: c }); case 13: t.next = 4; break; case 15: t.next = 20; break; case 17: t.prev = 17, t.t0 = t.catch(2), i.e(t.t0); case 20: return t.prev = 20, i.f(), t.finish(20); case 23: return t.abrupt("return", e.mergeObjectSync(n, a)); case 24: case "end": return t.stop() } }), t, null, [ [2, 17, 20, 23] ]) }))), function(e, n) { return t.apply(this, arguments) }) }, { key: "mergeObjectSync", value: function(e, t) { var n, r = {}, a = hI(t); try { for (a.s(); !(n = a.n()).done;) { var i = n.value, o = i.key, l = i.value; if ("aborted" === o.status) return WT; if ("aborted" === l.status) return WT; "dirty" === o.status && e.dirty(), "dirty" === l.status && e.dirty(), "__proto__" === o.value || void 0 === l.value && !i.alwaysSet || (r[o.value] = l.value) } } catch (e) { a.e(e) } finally { a.f() } return { status: e.value, value: r } } }]), e }(), WT = Object.freeze({ status: "aborted" }), HT = function(e) { return { status: "dirty", value: e } }, FT = function(e) { return { status: "valid", value: e } }, GT = function(e) { return "aborted" === e.status }, jT = function(e) { return "dirty" === e.status }, zT = function(e) { return "valid" === e.status }, ZT = function(e) { return "undefined" != typeof Promise && e instanceof Promise }; function qT(e, t, n, r) { if ("a" === n && !r) throw new TypeError("Private accessor was defined without a getter"); if ("function" == typeof t ? e !== t || !r : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return "m" === n ? r : "a" === n ? r.call(e) : r ? r.value : t.get(e) } function BT(e, t, n, r, a) { if ("m" === r) throw new TypeError("Private method is not writable"); if ("a" === r && !a) throw new TypeError("Private accessor was defined without a setter"); if ("function" == typeof t ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return "a" === r ? a.call(e, n) : a ? a.value = n : t.set(e, n), n } "function" == typeof SuppressedError && SuppressedError, function(e) { e.errToObj = function(e) { return "string" == typeof e ? { message: e } : e || {} }, e.toString = function(e) { return "string" == typeof e ? e : null == e ? void 0 : e.message } }(xT || (xT = {})); var KT = function() { function e(t, n, r, a) { $S(this, e), this._cachedPath = [], this.parent = t, this.data = n, this._path = r, this._key = a } return tI(e, [{ key: "path", get: function() { var e, t; return this._cachedPath.length || (this._key instanceof Array ? (e = this._cachedPath).push.apply(e, QS(this._path).concat(QS(this._key))) : (t = this._cachedPath).push.apply(t, QS(this._path).concat([this._key]))), this._cachedPath } }]), e }(), YT = function(e, t) { if (zT(t)) return { success: !0, data: t.value }; if (!e.common.issues.length) throw new Error("Validation failed but no issues detected."); return { success: !1, get error() { if (this._error) return this._error; var t = new kT(e.common.issues); return this._error = t, this._error } } }; function JT(e) { if (!e) return {}; var t = e.errorMap, n = e.invalid_type_error, r = e.required_error, a = e.description; if (t && (n || r)) throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.'); return t ? { errorMap: t, description: a } : { errorMap: function(t, a) { var i, o, l = e.message; return "invalid_enum_value" === t.code ? { message: null != l ? l : a.defaultError } : void 0 === a.data ? { message: null !== (i = null != l ? l : r) && void 0 !== i ? i : a.defaultError } : "invalid_type" !== t.code ? { message: a.defaultError } : { message: null !== (o = null != l ? l : n) && void 0 !== o ? o : a.defaultError } }, description: a } } var XT, QT = function() { var e, t; function n(e) { var t = this; $S(this, n), this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this), this["~standard"] = { version: 1, vendor: "zod", validate: function(e) { return t["~validate"](e) } } } return tI(n, [{ key: "_getType", value: function(e) { return LT(e.data) } }, { key: "_getOrReturnCtx", value: function(e, t) { return t || { common: e.parent.common, data: e.data, parsedType: LT(e.data), schemaErrorMap: this._def.errorMap, path: e.path, parent: e.parent } } }, { key: "_processInputParams", value: function(e) { return { status: new UT, ctx: { common: e.parent.common, data: e.data, parsedType: LT(e.data), schemaErrorMap: this._def.errorMap, path: e.path, parent: e.parent } } } }, { key: "_parseSync", value: function(e) { var t = this._parse(e); if (ZT(t)) throw new Error("Synchronous parse encountered promise."); return t } }, { key: "_parseAsync", value: function(e) { var t = this._parse(e); return Promise.resolve(t) } }, { key: "parse", value: function(e, t) { var n = this.safeParse(e, t); if (n.success) return n.data; throw n.error } }, { key: "safeParse", value: function(e, t) { var n, r = { common: { issues: [], async: null !== (n = null == t ? void 0 : t.async) && void 0 !== n && n, contextualErrorMap: null == t ? void 0 : t.errorMap }, path: (null == t ? void 0 : t.path) || [], schemaErrorMap: this._def.errorMap, parent: null, data: e, parsedType: LT(e) }, a = this._parseSync({ data: e, path: r.path, parent: r }); return YT(r, a) } }, { key: "~validate", value: function(e) { var t, n, r = { common: { issues: [], async: !!this["~standard"].async }, path: [], schemaErrorMap: this._def.errorMap, parent: null, data: e, parsedType: LT(e) }; if (!this["~standard"].async) try { var a = this._parseSync({ data: e, path: [], parent: r }); return zT(a) ? { value: a.value } : { issues: r.common.issues } } catch (e) { (null === (n = null === (t = null == e ? void 0 : e.message) || void 0 === t ? void 0 : t.toLowerCase()) || void 0 === n ? void 0 : n.includes("encountered")) && (this["~standard"].async = !0), r.common = { issues: [], async: !0 } } return this._parseAsync({ data: e, path: [], parent: r }).then((function(e) { return zT(e) ? { value: e.value } : { issues: r.common.issues } })) } }, { key: "parseAsync", value: (t = XS(regeneratorRuntime.mark((function e(t, n) { var r; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: return e.next = 2, this.safeParseAsync(t, n); case 2: if (!(r = e.sent).success) { e.next = 5; break } return e.abrupt("return", r.data); case 5: throw r.error; case 6: case "end": return e.stop() } }), e, this) }))), function(e, n) { return t.apply(this, arguments) }) }, { key: "safeParseAsync", value: (e = XS(regeneratorRuntime.mark((function e(t, n) { var r, a, i; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: return r = { common: { issues: [], contextualErrorMap: null == n ? void 0 : n.errorMap, async: !0 }, path: (null == n ? void 0 : n.path) || [], schemaErrorMap: this._def.errorMap, parent: null, data: t, parsedType: LT(t) }, a = this._parse({ data: t, path: r.path, parent: r }), e.next = 4, ZT(a) ? a : Promise.resolve(a); case 4: return i = e.sent, e.abrupt("return", YT(r, i)); case 6: case "end": return e.stop() } }), e, this) }))), function(t, n) { return e.apply(this, arguments) }) }, { key: "refine", value: function(e, t) { var n = function(e) { return "string" == typeof t || void 0 === t ? { message: t } : "function" == typeof t ? t(e) : t }; return this._refinement((function(t, r) { var a = e(t), i = function() { return r.addIssue(fI({ code: OT.custom }, n(t))) }; return "undefined" != typeof Promise && a instanceof Promise ? a.then((function(e) { return !!e || (i(), !1) })) : !!a || (i(), !1) })) } }, { key: "refinement", value: function(e, t) { return this._refinement((function(n, r) { return !!e(n) || (r.addIssue("function" == typeof t ? t(n, r) : t), !1) })) } }, { key: "_refinement", value: function(e) { return new BA({ schema: this, typeName: $A.ZodEffects, effect: { type: "refinement", refinement: e } }) } }, { key: "superRefine", value: function(e) { return this._refinement(e) } }, { key: "description", get: function() { return this._def.description } }]), tI(n, [{ key: "optional", value: function() { return KA.create(this, this._def) } }, { key: "nullable", value: function() { return YA.create(this, this._def) } }, { key: "nullish", value: function() { return this.nullable().optional() } }, { key: "array", value: function() { return DA.create(this) } }, { key: "promise", value: function() { return qA.create(this, this._def) } }, { key: "or", value: function(e) { return xA.create([this, e], this._def) } }, { key: "and", value: function(e) { return VA.create(this, e, this._def) } }, { key: "transform", value: function(e) { return new BA(fI(fI({}, JT(this._def)), {}, { schema: this, typeName: $A.ZodEffects, effect: { type: "transform", transform: e } })) } }, { key: "default", value: function(e) { var t = "function" == typeof e ? e : function() { return e }; return new JA(fI(fI({}, JT(this._def)), {}, { innerType: this, defaultValue: t, typeName: $A.ZodDefault })) } }, { key: "brand", value: function() { return new eN(fI({ typeName: $A.ZodBranded, type: this }, JT(this._def))) } }, { key: "catch", value: function(e) { var t = "function" == typeof e ? e : function() { return e }; return new XA(fI(fI({}, JT(this._def)), {}, { innerType: this, catchValue: t, typeName: $A.ZodCatch })) } }, { key: "describe", value: function(e) { return new(0, this.constructor)(fI(fI({}, this._def), {}, { description: e })) } }, { key: "pipe", value: function(e) { return tN.create(this, e) } }, { key: "readonly", value: function() { return nN.create(this) } }, { key: "isOptional", value: function() { return this.safeParse(void 0).success } }, { key: "isNullable", value: function() { return this.safeParse(null).success } }]), n }(), $T = /^c[^\s-]{8,}$/i, eA = /^[0-9a-z]+$/, tA = /^[0-9A-HJKMNP-TV-Z]{26}$/i, nA = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, rA = /^[a-z0-9_-]{21}$/i, aA = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, iA = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, oA = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, lA = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, uA = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, cA = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, sA = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, dA = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, fA = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, pA = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", hA = new RegExp("^".concat(pA, "$")); function vA(e) { var t = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d"; return e.precision ? t = "".concat(t, "\\.\\d{").concat(e.precision, "}") : null == e.precision && (t = "".concat(t, "(\\.\\d+)?")), t } function mA(e) { var t = "".concat(pA, "T").concat(vA(e)), n = []; return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = "".concat(t, "(").concat(n.join("|"), ")"), new RegExp("^".concat(t, "$")) } function yA(e, t) { if (!aA.test(e)) return !1; try { var n = YS(e.split("."), 1)[0], r = n.replace(/-/g, "+").replace(/_/g, "/").padEnd(n.length + (4 - n.length % 4) % 4, "="), a = JSON.parse(atob(r)); return !("object" != sI(a) || null === a || !a.typ || !a.alg || t && a.alg !== t) } catch (e) { return !1 } } function gA(e, t) { return !("v4" !== t && t || !uA.test(e)) || !("v6" !== t && t || !sA.test(e)) } var EA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== wT.string) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.string, received: t.parsedType }), WT } var n, r, a, i, o = new UT, l = hI(this._def.checks); try { for (l.s(); !(r = l.n()).done;) { var u = r.value; if ("min" === u.kind) e.data.length < u.value && (PT(n = this._getOrReturnCtx(e, n), { code: OT.too_small, minimum: u.value, type: "string", inclusive: !0, exact: !1, message: u.message }), o.dirty()); else if ("max" === u.kind) e.data.length > u.value && (PT(n = this._getOrReturnCtx(e, n), { code: OT.too_big, maximum: u.value, type: "string", inclusive: !0, exact: !1, message: u.message }), o.dirty()); else if ("length" === u.kind) { var c = e.data.length > u.value, s = e.data.length < u.value; (c || s) && (n = this._getOrReturnCtx(e, n), c ? PT(n, { code: OT.too_big, maximum: u.value, type: "string", inclusive: !0, exact: !0, message: u.message }) : s && PT(n, { code: OT.too_small, minimum: u.value, type: "string", inclusive: !0, exact: !0, message: u.message }), o.dirty()) } else if ("email" === u.kind) oA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "email", code: OT.invalid_string, message: u.message }), o.dirty()); else if ("emoji" === u.kind) XT || (XT = new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), XT.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "emoji", code: OT.invalid_string, message: u.message }), o.dirty()); else if ("uuid" === u.kind) nA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "uuid", code: OT.invalid_string, message: u.message }), o.dirty()); else if ("nanoid" === u.kind) rA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "nanoid", code: OT.invalid_string, message: u.message }), o.dirty()); else if ("cuid" === u.kind) $T.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "cuid", code: OT.invalid_string, message: u.message }), o.dirty()); else if ("cuid2" === u.kind) eA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "cuid2", code: OT.invalid_string, message: u.message }), o.dirty()); else if ("ulid" === u.kind) tA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "ulid", code: OT.invalid_string, message: u.message }), o.dirty()); else if ("url" === u.kind) try { new URL(e.data) } catch (a) { PT(n = this._getOrReturnCtx(e, n), { validation: "url", code: OT.invalid_string, message: u.message }), o.dirty() } else "regex" === u.kind ? (u.regex.lastIndex = 0, u.regex.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "regex", code: OT.invalid_string, message: u.message }), o.dirty())) : "trim" === u.kind ? e.data = e.data.trim() : "includes" === u.kind ? e.data.includes(u.value, u.position) || (PT(n = this._getOrReturnCtx(e, n), { code: OT.invalid_string, validation: { includes: u.value, position: u.position }, message: u.message }), o.dirty()) : "toLowerCase" === u.kind ? e.data = e.data.toLowerCase() : "toUpperCase" === u.kind ? e.data = e.data.toUpperCase() : "startsWith" === u.kind ? e.data.startsWith(u.value) || (PT(n = this._getOrReturnCtx(e, n), { code: OT.invalid_string, validation: { startsWith: u.value }, message: u.message }), o.dirty()) : "endsWith" === u.kind ? e.data.endsWith(u.value) || (PT(n = this._getOrReturnCtx(e, n), { code: OT.invalid_string, validation: { endsWith: u.value }, message: u.message }), o.dirty()) : "datetime" === u.kind ? mA(u).test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { code: OT.invalid_string, validation: "datetime", message: u.message }), o.dirty()) : "date" === u.kind ? hA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { code: OT.invalid_string, validation: "date", message: u.message }), o.dirty()) : "time" === u.kind ? new RegExp("^".concat(vA(u), "$")).test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { code: OT.invalid_string, validation: "time", message: u.message }), o.dirty()) : "duration" === u.kind ? iA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "duration", code: OT.invalid_string, message: u.message }), o.dirty()) : "ip" === u.kind ? (a = e.data, ("v4" !== (i = u.version) && i || !lA.test(a)) && ("v6" !== i && i || !cA.test(a)) && (PT(n = this._getOrReturnCtx(e, n), { validation: "ip", code: OT.invalid_string, message: u.message }), o.dirty())) : "jwt" === u.kind ? yA(e.data, u.alg) || (PT(n = this._getOrReturnCtx(e, n), { validation: "jwt", code: OT.invalid_string, message: u.message }), o.dirty()) : "cidr" === u.kind ? gA(e.data, u.version) || (PT(n = this._getOrReturnCtx(e, n), { validation: "cidr", code: OT.invalid_string, message: u.message }), o.dirty()) : "base64" === u.kind ? dA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "base64", code: OT.invalid_string, message: u.message }), o.dirty()) : "base64url" === u.kind ? fA.test(e.data) || (PT(n = this._getOrReturnCtx(e, n), { validation: "base64url", code: OT.invalid_string, message: u.message }), o.dirty()) : CT.assertNever(u) } } catch (e) { l.e(e) } finally { l.f() } return { status: o.value, value: e.data } } }, { key: "_regex", value: function(e, t, n) { return this.refinement((function(t) { return e.test(t) }), fI({ validation: t, code: OT.invalid_string }, xT.errToObj(n))) } }, { key: "_addCheck", value: function(e) { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [e]) })) } }, { key: "email", value: function(e) { return this._addCheck(fI({ kind: "email" }, xT.errToObj(e))) } }, { key: "url", value: function(e) { return this._addCheck(fI({ kind: "url" }, xT.errToObj(e))) } }, { key: "emoji", value: function(e) { return this._addCheck(fI({ kind: "emoji" }, xT.errToObj(e))) } }, { key: "uuid", value: function(e) { return this._addCheck(fI({ kind: "uuid" }, xT.errToObj(e))) } }, { key: "nanoid", value: function(e) { return this._addCheck(fI({ kind: "nanoid" }, xT.errToObj(e))) } }, { key: "cuid", value: function(e) { return this._addCheck(fI({ kind: "cuid" }, xT.errToObj(e))) } }, { key: "cuid2", value: function(e) { return this._addCheck(fI({ kind: "cuid2" }, xT.errToObj(e))) } }, { key: "ulid", value: function(e) { return this._addCheck(fI({ kind: "ulid" }, xT.errToObj(e))) } }, { key: "base64", value: function(e) { return this._addCheck(fI({ kind: "base64" }, xT.errToObj(e))) } }, { key: "base64url", value: function(e) { return this._addCheck(fI({ kind: "base64url" }, xT.errToObj(e))) } }, { key: "jwt", value: function(e) { return this._addCheck(fI({ kind: "jwt" }, xT.errToObj(e))) } }, { key: "ip", value: function(e) { return this._addCheck(fI({ kind: "ip" }, xT.errToObj(e))) } }, { key: "cidr", value: function(e) { return this._addCheck(fI({ kind: "cidr" }, xT.errToObj(e))) } }, { key: "datetime", value: function(e) { var t, n; return "string" == typeof e ? this._addCheck({ kind: "datetime", precision: null, offset: !1, local: !1, message: e }) : this._addCheck(fI({ kind: "datetime", precision: void 0 === (null == e ? void 0 : e.precision) ? null : null == e ? void 0 : e.precision, offset: null !== (t = null == e ? void 0 : e.offset) && void 0 !== t && t, local: null !== (n = null == e ? void 0 : e.local) && void 0 !== n && n }, xT.errToObj(null == e ? void 0 : e.message))) } }, { key: "date", value: function(e) { return this._addCheck({ kind: "date", message: e }) } }, { key: "time", value: function(e) { return "string" == typeof e ? this._addCheck({ kind: "time", precision: null, message: e }) : this._addCheck(fI({ kind: "time", precision: void 0 === (null == e ? void 0 : e.precision) ? null : null == e ? void 0 : e.precision }, xT.errToObj(null == e ? void 0 : e.message))) } }, { key: "duration", value: function(e) { return this._addCheck(fI({ kind: "duration" }, xT.errToObj(e))) } }, { key: "regex", value: function(e, t) { return this._addCheck(fI({ kind: "regex", regex: e }, xT.errToObj(t))) } }, { key: "includes", value: function(e, t) { return this._addCheck(fI({ kind: "includes", value: e, position: null == t ? void 0 : t.position }, xT.errToObj(null == t ? void 0 : t.message))) } }, { key: "startsWith", value: function(e, t) { return this._addCheck(fI({ kind: "startsWith", value: e }, xT.errToObj(t))) } }, { key: "endsWith", value: function(e, t) { return this._addCheck(fI({ kind: "endsWith", value: e }, xT.errToObj(t))) } }, { key: "min", value: function(e, t) { return this._addCheck(fI({ kind: "min", value: e }, xT.errToObj(t))) } }, { key: "max", value: function(e, t) { return this._addCheck(fI({ kind: "max", value: e }, xT.errToObj(t))) } }, { key: "length", value: function(e, t) { return this._addCheck(fI({ kind: "length", value: e }, xT.errToObj(t))) } }, { key: "nonempty", value: function(e) { return this.min(1, xT.errToObj(e)) } }, { key: "trim", value: function() { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [{ kind: "trim" }]) })) } }, { key: "toLowerCase", value: function() { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [{ kind: "toLowerCase" }]) })) } }, { key: "toUpperCase", value: function() { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [{ kind: "toUpperCase" }]) })) } }, { key: "isDatetime", get: function() { return !!this._def.checks.find((function(e) { return "datetime" === e.kind })) } }, { key: "isDate", get: function() { return !!this._def.checks.find((function(e) { return "date" === e.kind })) } }, { key: "isTime", get: function() { return !!this._def.checks.find((function(e) { return "time" === e.kind })) } }, { key: "isDuration", get: function() { return !!this._def.checks.find((function(e) { return "duration" === e.kind })) } }, { key: "isEmail", get: function() { return !!this._def.checks.find((function(e) { return "email" === e.kind })) } }, { key: "isURL", get: function() { return !!this._def.checks.find((function(e) { return "url" === e.kind })) } }, { key: "isEmoji", get: function() { return !!this._def.checks.find((function(e) { return "emoji" === e.kind })) } }, { key: "isUUID", get: function() { return !!this._def.checks.find((function(e) { return "uuid" === e.kind })) } }, { key: "isNANOID", get: function() { return !!this._def.checks.find((function(e) { return "nanoid" === e.kind })) } }, { key: "isCUID", get: function() { return !!this._def.checks.find((function(e) { return "cuid" === e.kind })) } }, { key: "isCUID2", get: function() { return !!this._def.checks.find((function(e) { return "cuid2" === e.kind })) } }, { key: "isULID", get: function() { return !!this._def.checks.find((function(e) { return "ulid" === e.kind })) } }, { key: "isIP", get: function() { return !!this._def.checks.find((function(e) { return "ip" === e.kind })) } }, { key: "isCIDR", get: function() { return !!this._def.checks.find((function(e) { return "cidr" === e.kind })) } }, { key: "isBase64", get: function() { return !!this._def.checks.find((function(e) { return "base64" === e.kind })) } }, { key: "isBase64url", get: function() { return !!this._def.checks.find((function(e) { return "base64url" === e.kind })) } }, { key: "minLength", get: function() { var e, t = null, n = hI(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "min" === r.kind && (null === t || r.value > t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "maxLength", get: function() { var e, t = null, n = hI(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "max" === r.kind && (null === t || r.value < t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }]), n }(QT); function bA(e, t) { var n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, a = n > r ? n : r; return parseInt(e.toFixed(a).replace(".", "")) % parseInt(t.toFixed(a).replace(".", "")) / Math.pow(10, a) } EA.create = function(e) { var t; return new EA(fI({ checks: [], typeName: $A.ZodString, coerce: null !== (t = null == e ? void 0 : e.coerce) && void 0 !== t && t }, JT(e))) }; var CA = function(e) { nI(n, e); var t = rI(n); function n() { var e; return $S(this, n), (e = t.apply(this, arguments)).min = e.gte, e.max = e.lte, e.step = e.multipleOf, e } return tI(n, [{ key: "_parse", value: function(e) { if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== wT.number) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.number, received: t.parsedType }), WT } var n, r, a = new UT, i = hI(this._def.checks); try { for (i.s(); !(r = i.n()).done;) { var o = r.value; "int" === o.kind ? CT.isInteger(e.data) || (PT(n = this._getOrReturnCtx(e, n), { code: OT.invalid_type, expected: "integer", received: "float", message: o.message }), a.dirty()) : "min" === o.kind ? (o.inclusive ? e.data < o.value : e.data <= o.value) && (PT(n = this._getOrReturnCtx(e, n), { code: OT.too_small, minimum: o.value, type: "number", inclusive: o.inclusive, exact: !1, message: o.message }), a.dirty()) : "max" === o.kind ? (o.inclusive ? e.data > o.value : e.data >= o.value) && (PT(n = this._getOrReturnCtx(e, n), { code: OT.too_big, maximum: o.value, type: "number", inclusive: o.inclusive, exact: !1, message: o.message }), a.dirty()) : "multipleOf" === o.kind ? 0 !== bA(e.data, o.value) && (PT(n = this._getOrReturnCtx(e, n), { code: OT.not_multiple_of, multipleOf: o.value, message: o.message }), a.dirty()) : "finite" === o.kind ? Number.isFinite(e.data) || (PT(n = this._getOrReturnCtx(e, n), { code: OT.not_finite, message: o.message }), a.dirty()) : CT.assertNever(o) } } catch (e) { i.e(e) } finally { i.f() } return { status: a.value, value: e.data } } }, { key: "gte", value: function(e, t) { return this.setLimit("min", e, !0, xT.toString(t)) } }, { key: "gt", value: function(e, t) { return this.setLimit("min", e, !1, xT.toString(t)) } }, { key: "lte", value: function(e, t) { return this.setLimit("max", e, !0, xT.toString(t)) } }, { key: "lt", value: function(e, t) { return this.setLimit("max", e, !1, xT.toString(t)) } }, { key: "setLimit", value: function(e, t, r, a) { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [{ kind: e, value: t, inclusive: r, message: xT.toString(a) }]) })) } }, { key: "_addCheck", value: function(e) { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [e]) })) } }, { key: "int", value: function(e) { return this._addCheck({ kind: "int", message: xT.toString(e) }) } }, { key: "positive", value: function(e) { return this._addCheck({ kind: "min", value: 0, inclusive: !1, message: xT.toString(e) }) } }, { key: "negative", value: function(e) { return this._addCheck({ kind: "max", value: 0, inclusive: !1, message: xT.toString(e) }) } }, { key: "nonpositive", value: function(e) { return this._addCheck({ kind: "max", value: 0, inclusive: !0, message: xT.toString(e) }) } }, { key: "nonnegative", value: function(e) { return this._addCheck({ kind: "min", value: 0, inclusive: !0, message: xT.toString(e) }) } }, { key: "multipleOf", value: function(e, t) { return this._addCheck({ kind: "multipleOf", value: e, message: xT.toString(t) }) } }, { key: "finite", value: function(e) { return this._addCheck({ kind: "finite", message: xT.toString(e) }) } }, { key: "safe", value: function(e) { return this._addCheck({ kind: "min", inclusive: !0, value: Number.MIN_SAFE_INTEGER, message: xT.toString(e) })._addCheck({ kind: "max", inclusive: !0, value: Number.MAX_SAFE_INTEGER, message: xT.toString(e) }) } }, { key: "minValue", get: function() { var e, t = null, n = hI(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "min" === r.kind && (null === t || r.value > t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "maxValue", get: function() { var e, t = null, n = hI(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "max" === r.kind && (null === t || r.value < t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "isInt", get: function() { return !!this._def.checks.find((function(e) { return "int" === e.kind || "multipleOf" === e.kind && CT.isInteger(e.value) })) } }, { key: "isFinite", get: function() { var e, t = null, n = null, r = hI(this._def.checks); try { for (r.s(); !(e = r.n()).done;) { var a = e.value; if ("finite" === a.kind || "int" === a.kind || "multipleOf" === a.kind) return !0; "min" === a.kind ? (null === n || a.value > n) && (n = a.value) : "max" === a.kind && (null === t || a.value < t) && (t = a.value) } } catch (e) { r.e(e) } finally { r.f() } return Number.isFinite(n) && Number.isFinite(t) } }]), n }(QT); CA.create = function(e) { return new CA(fI({ checks: [], typeName: $A.ZodNumber, coerce: (null == e ? void 0 : e.coerce) || !1 }, JT(e))) }; var _A = function(e) { nI(n, e); var t = rI(n); function n() { var e; return $S(this, n), (e = t.apply(this, arguments)).min = e.gte, e.max = e.lte, e } return tI(n, [{ key: "_parse", value: function(e) { if (this._def.coerce) try { e.data = BigInt(e.data) } catch (t) { return this._getInvalidInput(e) } if (this._getType(e) !== wT.bigint) return this._getInvalidInput(e); var t, n, r = new UT, a = hI(this._def.checks); try { for (a.s(); !(n = a.n()).done;) { var i = n.value; "min" === i.kind ? (i.inclusive ? e.data < i.value : e.data <= i.value) && (PT(t = this._getOrReturnCtx(e, t), { code: OT.too_small, type: "bigint", minimum: i.value, inclusive: i.inclusive, message: i.message }), r.dirty()) : "max" === i.kind ? (i.inclusive ? e.data > i.value : e.data >= i.value) && (PT(t = this._getOrReturnCtx(e, t), { code: OT.too_big, type: "bigint", maximum: i.value, inclusive: i.inclusive, message: i.message }), r.dirty()) : "multipleOf" === i.kind ? e.data % i.value !== BigInt(0) && (PT(t = this._getOrReturnCtx(e, t), { code: OT.not_multiple_of, multipleOf: i.value, message: i.message }), r.dirty()) : CT.assertNever(i) } } catch (e) { a.e(e) } finally { a.f() } return { status: r.value, value: e.data } } }, { key: "_getInvalidInput", value: function(e) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.bigint, received: t.parsedType }), WT } }, { key: "gte", value: function(e, t) { return this.setLimit("min", e, !0, xT.toString(t)) } }, { key: "gt", value: function(e, t) { return this.setLimit("min", e, !1, xT.toString(t)) } }, { key: "lte", value: function(e, t) { return this.setLimit("max", e, !0, xT.toString(t)) } }, { key: "lt", value: function(e, t) { return this.setLimit("max", e, !1, xT.toString(t)) } }, { key: "setLimit", value: function(e, t, r, a) { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [{ kind: e, value: t, inclusive: r, message: xT.toString(a) }]) })) } }, { key: "_addCheck", value: function(e) { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [e]) })) } }, { key: "positive", value: function(e) { return this._addCheck({ kind: "min", value: BigInt(0), inclusive: !1, message: xT.toString(e) }) } }, { key: "negative", value: function(e) { return this._addCheck({ kind: "max", value: BigInt(0), inclusive: !1, message: xT.toString(e) }) } }, { key: "nonpositive", value: function(e) { return this._addCheck({ kind: "max", value: BigInt(0), inclusive: !0, message: xT.toString(e) }) } }, { key: "nonnegative", value: function(e) { return this._addCheck({ kind: "min", value: BigInt(0), inclusive: !0, message: xT.toString(e) }) } }, { key: "multipleOf", value: function(e, t) { return this._addCheck({ kind: "multipleOf", value: e, message: xT.toString(t) }) } }, { key: "minValue", get: function() { var e, t = null, n = hI(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "min" === r.kind && (null === t || r.value > t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "maxValue", get: function() { var e, t = null, n = hI(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "max" === r.kind && (null === t || r.value < t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return t } }]), n }(QT); _A.create = function(e) { var t; return new _A(fI({ checks: [], typeName: $A.ZodBigInt, coerce: null !== (t = null == e ? void 0 : e.coerce) && void 0 !== t && t }, JT(e))) }; var SA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (this._def.coerce && (e.data = Boolean(e.data)), this._getType(e) !== wT.boolean) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.boolean, received: t.parsedType }), WT } return FT(e.data) } }]), n }(QT); SA.create = function(e) { return new SA(fI({ typeName: $A.ZodBoolean, coerce: (null == e ? void 0 : e.coerce) || !1 }, JT(e))) }; var IA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== wT.date) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.date, received: t.parsedType }), WT } if (isNaN(e.data.getTime())) return PT(this._getOrReturnCtx(e), { code: OT.invalid_date }), WT; var n, r, a = new UT, i = hI(this._def.checks); try { for (i.s(); !(r = i.n()).done;) { var o = r.value; "min" === o.kind ? e.data.getTime() < o.value && (PT(n = this._getOrReturnCtx(e, n), { code: OT.too_small, message: o.message, inclusive: !0, exact: !1, minimum: o.value, type: "date" }), a.dirty()) : "max" === o.kind ? e.data.getTime() > o.value && (PT(n = this._getOrReturnCtx(e, n), { code: OT.too_big, message: o.message, inclusive: !0, exact: !1, maximum: o.value, type: "date" }), a.dirty()) : CT.assertNever(o) } } catch (e) { i.e(e) } finally { i.f() } return { status: a.value, value: new Date(e.data.getTime()) } } }, { key: "_addCheck", value: function(e) { return new n(fI(fI({}, this._def), {}, { checks: [].concat(QS(this._def.checks), [e]) })) } }, { key: "min", value: function(e, t) { return this._addCheck({ kind: "min", value: e.getTime(), message: xT.toString(t) }) } }, { key: "max", value: function(e, t) { return this._addCheck({ kind: "max", value: e.getTime(), message: xT.toString(t) }) } }, { key: "minDate", get: function() { var e, t = null, n = hI(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "min" === r.kind && (null === t || r.value > t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return null != t ? new Date(t) : null } }, { key: "maxDate", get: function() { var e, t = null, n = hI(this._def.checks); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; "max" === r.kind && (null === t || r.value < t) && (t = r.value) } } catch (e) { n.e(e) } finally { n.f() } return null != t ? new Date(t) : null } }]), n }(QT); IA.create = function(e) { return new IA(fI({ checks: [], coerce: (null == e ? void 0 : e.coerce) || !1, typeName: $A.ZodDate }, JT(e))) }; var TA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== wT.symbol) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.symbol, received: t.parsedType }), WT } return FT(e.data) } }]), n }(QT); TA.create = function(e) { return new TA(fI({ typeName: $A.ZodSymbol }, JT(e))) }; var AA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== wT.undefined) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.undefined, received: t.parsedType }), WT } return FT(e.data) } }]), n }(QT); AA.create = function(e) { return new AA(fI({ typeName: $A.ZodUndefined }, JT(e))) }; var NA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== wT.null) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.null, received: t.parsedType }), WT } return FT(e.data) } }]), n }(QT); NA.create = function(e) { return new NA(fI({ typeName: $A.ZodNull }, JT(e))) }; var wA = function(e) { nI(n, e); var t = rI(n); function n() { var e; return $S(this, n), (e = t.apply(this, arguments))._any = !0, e } return tI(n, [{ key: "_parse", value: function(e) { return FT(e.data) } }]), n }(QT); wA.create = function(e) { return new wA(fI({ typeName: $A.ZodAny }, JT(e))) }; var LA = function(e) { nI(n, e); var t = rI(n); function n() { var e; return $S(this, n), (e = t.apply(this, arguments))._unknown = !0, e } return tI(n, [{ key: "_parse", value: function(e) { return FT(e.data) } }]), n }(QT); LA.create = function(e) { return new LA(fI({ typeName: $A.ZodUnknown }, JT(e))) }; var OA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.never, received: t.parsedType }), WT } }]), n }(QT); OA.create = function(e) { return new OA(fI({ typeName: $A.ZodNever }, JT(e))) }; var kA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== wT.undefined) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.void, received: t.parsedType }), WT } return FT(e.data) } }]), n }(QT); kA.create = function(e) { return new kA(fI({ typeName: $A.ZodVoid }, JT(e))) }; var DA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.ctx, r = t.status, a = this._def; if (n.parsedType !== wT.array) return PT(n, { code: OT.invalid_type, expected: wT.array, received: n.parsedType }), WT; if (null !== a.exactLength) { var i = n.data.length > a.exactLength.value, o = n.data.length < a.exactLength.value; (i || o) && (PT(n, { code: i ? OT.too_big : OT.too_small, minimum: o ? a.exactLength.value : void 0, maximum: i ? a.exactLength.value : void 0, type: "array", inclusive: !0, exact: !0, message: a.exactLength.message }), r.dirty()) } if (null !== a.minLength && n.data.length < a.minLength.value && (PT(n, { code: OT.too_small, minimum: a.minLength.value, type: "array", inclusive: !0, exact: !1, message: a.minLength.message }), r.dirty()), null !== a.maxLength && n.data.length > a.maxLength.value && (PT(n, { code: OT.too_big, maximum: a.maxLength.value, type: "array", inclusive: !0, exact: !1, message: a.maxLength.message }), r.dirty()), n.common.async) return Promise.all(QS(n.data).map((function(e, t) { return a.type._parseAsync(new KT(n, e, n.path, t)) }))).then((function(e) { return UT.mergeArray(r, e) })); var l = QS(n.data).map((function(e, t) { return a.type._parseSync(new KT(n, e, n.path, t)) })); return UT.mergeArray(r, l) } }, { key: "min", value: function(e, t) { return new n(fI(fI({}, this._def), {}, { minLength: { value: e, message: xT.toString(t) } })) } }, { key: "max", value: function(e, t) { return new n(fI(fI({}, this._def), {}, { maxLength: { value: e, message: xT.toString(t) } })) } }, { key: "length", value: function(e, t) { return new n(fI(fI({}, this._def), {}, { exactLength: { value: e, message: xT.toString(t) } })) } }, { key: "nonempty", value: function(e) { return this.min(1, e) } }, { key: "element", get: function() { return this._def.type } }]), n }(QT); function RA(e) { if (e instanceof PA) { var t = {}; for (var n in e.shape) { var r = e.shape[n]; t[n] = KA.create(RA(r)) } return new PA(fI(fI({}, e._def), {}, { shape: function() { return t } })) } return e instanceof DA ? new DA(fI(fI({}, e._def), {}, { type: RA(e.element) })) : e instanceof KA ? KA.create(RA(e.unwrap())) : e instanceof YA ? YA.create(RA(e.unwrap())) : e instanceof UA ? UA.create(e.items.map((function(e) { return RA(e) }))) : e } DA.create = function(e, t) { return new DA(fI({ type: e, minLength: null, maxLength: null, exactLength: null, typeName: $A.ZodArray }, JT(t))) }; var PA = function(e) { nI(n, e); var t = rI(n); function n() { var e; return $S(this, n), (e = t.apply(this, arguments))._cached = null, e.nonstrict = e.passthrough, e.augment = e.extend, e } return tI(n, [{ key: "_getCached", value: function() { if (null !== this._cached) return this._cached; var e = this._def.shape(), t = CT.objectKeys(e); return this._cached = { shape: e, keys: t } } }, { key: "_parse", value: function(e) { if (this._getType(e) !== wT.object) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.object, received: t.parsedType }), WT } var n = this._processInputParams(e), r = n.status, a = n.ctx, i = this._getCached(), o = i.shape, l = i.keys, u = []; if (!(this._def.catchall instanceof OA && "strip" === this._def.unknownKeys)) for (var c in a.data) l.includes(c) || u.push(c); var s, d = [], f = hI(l); try { for (f.s(); !(s = f.n()).done;) { var p = s.value, h = o[p], v = a.data[p]; d.push({ key: { status: "valid", value: p }, value: h._parse(new KT(a, v, a.path, p)), alwaysSet: p in a.data }) } } catch (e) { f.e(e) } finally { f.f() } if (this._def.catchall instanceof OA) { var m = this._def.unknownKeys; if ("passthrough" === m) { var y, g = hI(u); try { for (g.s(); !(y = g.n()).done;) { var E = y.value; d.push({ key: { status: "valid", value: E }, value: { status: "valid", value: a.data[E] } }) } } catch (e) { g.e(e) } finally { g.f() } } else if ("strict" === m) u.length > 0 && (PT(a, { code: OT.unrecognized_keys, keys: u }), r.dirty()); else if ("strip" !== m) throw new Error("Internal ZodObject error: invalid unknownKeys value.") } else { var b, C = this._def.catchall, _ = hI(u); try { for (_.s(); !(b = _.n()).done;) { var S = b.value, I = a.data[S]; d.push({ key: { status: "valid", value: S }, value: C._parse(new KT(a, I, a.path, S)), alwaysSet: S in a.data }) } } catch (e) { _.e(e) } finally { _.f() } } return a.common.async ? Promise.resolve().then(XS(regeneratorRuntime.mark((function e() { var t, n, r, a, i, o; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: t = [], n = hI(d), e.prev = 2, n.s(); case 4: if ((r = n.n()).done) { e.next = 15; break } return a = r.value, e.next = 8, a.key; case 8: return i = e.sent, e.next = 11, a.value; case 11: o = e.sent, t.push({ key: i, value: o, alwaysSet: a.alwaysSet }); case 13: e.next = 4; break; case 15: e.next = 20; break; case 17: e.prev = 17, e.t0 = e.catch(2), n.e(e.t0); case 20: return e.prev = 20, n.f(), e.finish(20); case 23: return e.abrupt("return", t); case 24: case "end": return e.stop() } }), e, null, [ [2, 17, 20, 23] ]) })))).then((function(e) { return UT.mergeObjectSync(r, e) })) : UT.mergeObjectSync(r, d) } }, { key: "strict", value: function(e) { var t = this; return xT.errToObj, new n(fI(fI({}, this._def), {}, { unknownKeys: "strict" }, void 0 !== e ? { errorMap: function(n, r) { var a, i, o, l, u = null !== (o = null === (i = (a = t._def).errorMap) || void 0 === i ? void 0 : i.call(a, n, r).message) && void 0 !== o ? o : r.defaultError; return "unrecognized_keys" === n.code ? { message: null !== (l = xT.errToObj(e).message) && void 0 !== l ? l : u } : { message: u } } } : {})) } }, { key: "strip", value: function() { return new n(fI(fI({}, this._def), {}, { unknownKeys: "strip" })) } }, { key: "passthrough", value: function() { return new n(fI(fI({}, this._def), {}, { unknownKeys: "passthrough" })) } }, { key: "extend", value: function(e) { var t = this; return new n(fI(fI({}, this._def), {}, { shape: function() { return fI(fI({}, t._def.shape()), e) } })) } }, { key: "merge", value: function(e) { var t = this; return new n({ unknownKeys: e._def.unknownKeys, catchall: e._def.catchall, shape: function() { return fI(fI({}, t._def.shape()), e._def.shape()) }, typeName: $A.ZodObject }) } }, { key: "setKey", value: function(e, t) { return this.augment(pI({}, e, t)) } }, { key: "catchall", value: function(e) { return new n(fI(fI({}, this._def), {}, { catchall: e })) } }, { key: "pick", value: function(e) { var t = this, r = {}; return CT.objectKeys(e).forEach((function(n) { e[n] && t.shape[n] && (r[n] = t.shape[n]) })), new n(fI(fI({}, this._def), {}, { shape: function() { return r } })) } }, { key: "omit", value: function(e) { var t = this, r = {}; return CT.objectKeys(this.shape).forEach((function(n) { e[n] || (r[n] = t.shape[n]) })), new n(fI(fI({}, this._def), {}, { shape: function() { return r } })) } }, { key: "deepPartial", value: function() { return RA(this) } }, { key: "partial", value: function(e) { var t = this, r = {}; return CT.objectKeys(this.shape).forEach((function(n) { var a = t.shape[n]; e && !e[n] ? r[n] = a : r[n] = a.optional() })), new n(fI(fI({}, this._def), {}, { shape: function() { return r } })) } }, { key: "required", value: function(e) { var t = this, r = {}; return CT.objectKeys(this.shape).forEach((function(n) { if (e && !e[n]) r[n] = t.shape[n]; else { for (var a = t.shape[n]; a instanceof KA;) a = a._def.innerType; r[n] = a } })), new n(fI(fI({}, this._def), {}, { shape: function() { return r } })) } }, { key: "keyof", value: function() { return jA(CT.objectKeys(this.shape)) } }, { key: "shape", get: function() { return this._def.shape() } }]), n }(QT); PA.create = function(e, t) { return new PA(fI({ shape: function() { return e }, unknownKeys: "strip", catchall: OA.create(), typeName: $A.ZodObject }, JT(t))) }, PA.strictCreate = function(e, t) { return new PA(fI({ shape: function() { return e }, unknownKeys: "strict", catchall: OA.create(), typeName: $A.ZodObject }, JT(t))) }, PA.lazycreate = function(e, t) { return new PA(fI({ shape: e, unknownKeys: "strip", catchall: OA.create(), typeName: $A.ZodObject }, JT(t))) }; var xA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx, n = this._def.options; if (t.common.async) return Promise.all(n.map(function() { var e = XS(regeneratorRuntime.mark((function e(n) { var r; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: return r = fI(fI({}, t), {}, { common: fI(fI({}, t.common), {}, { issues: [] }), parent: null }), e.next = 3, n._parseAsync({ data: t.data, path: t.path, parent: r }); case 3: return e.t0 = e.sent, e.t1 = r, e.abrupt("return", { result: e.t0, ctx: e.t1 }); case 6: case "end": return e.stop() } }), e) }))); return function(t) { return e.apply(this, arguments) } }())).then((function(e) { var n, r = hI(e); try { for (r.s(); !(n = r.n()).done;) { var a = n.value; if ("valid" === a.result.status) return a.result } } catch (e) { r.e(e) } finally { r.f() } var i, o = hI(e); try { for (o.s(); !(i = o.n()).done;) { var l, u = i.value; if ("dirty" === u.result.status) return (l = t.common.issues).push.apply(l, QS(u.ctx.common.issues)), u.result } } catch (e) { o.e(e) } finally { o.f() } var c = e.map((function(e) { return new kT(e.ctx.common.issues) })); return PT(t, { code: OT.invalid_union, unionErrors: c }), WT })); var r, a, i, o = [], l = hI(n); try { for (l.s(); !(i = l.n()).done;) { var u = i.value, c = fI(fI({}, t), {}, { common: fI(fI({}, t.common), {}, { issues: [] }), parent: null }), s = u._parseSync({ data: t.data, path: t.path, parent: c }); if ("valid" === s.status) return s; "dirty" !== s.status || a || (a = { result: s, ctx: c }), c.common.issues.length && o.push(c.common.issues) } } catch (e) { l.e(e) } finally { l.f() } if (a) return (r = t.common.issues).push.apply(r, QS(a.ctx.common.issues)), a.result; var d = o.map((function(e) { return new kT(e) })); return PT(t, { code: OT.invalid_union, unionErrors: d }), WT } }, { key: "options", get: function() { return this._def.options } }]), n }(QT); function MA(e, t) { var n = LT(e), r = LT(t); if (e === t) return { valid: !0, data: e }; if (n === wT.object && r === wT.object) { var a, i = CT.objectKeys(t), o = CT.objectKeys(e).filter((function(e) { return -1 !== i.indexOf(e) })), l = fI(fI({}, e), t), u = hI(o); try { for (u.s(); !(a = u.n()).done;) { var c = a.value, s = MA(e[c], t[c]); if (!s.valid) return { valid: !1 }; l[c] = s.data } } catch (e) { u.e(e) } finally { u.f() } return { valid: !0, data: l } } if (n === wT.array && r === wT.array) { if (e.length !== t.length) return { valid: !1 }; for (var d = [], f = 0; f < e.length; f++) { var p = MA(e[f], t[f]); if (!p.valid) return { valid: !1 }; d.push(p.data) } return { valid: !0, data: d } } return n === wT.date && r === wT.date && +e == +t ? { valid: !0, data: e } : { valid: !1 } } xA.create = function(e, t) { return new xA(fI({ options: e, typeName: $A.ZodUnion }, JT(t))) }; var VA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.status, r = t.ctx, a = function(e, t) { if (GT(e) || GT(t)) return WT; var a = MA(e.value, t.value); return a.valid ? ((jT(e) || jT(t)) && n.dirty(), { status: n.value, value: a.data }) : (PT(r, { code: OT.invalid_intersection_types }), WT) }; return r.common.async ? Promise.all([this._def.left._parseAsync({ data: r.data, path: r.path, parent: r }), this._def.right._parseAsync({ data: r.data, path: r.path, parent: r })]).then((function(e) { var t = YS(e, 2), n = t[0], r = t[1]; return a(n, r) })) : a(this._def.left._parseSync({ data: r.data, path: r.path, parent: r }), this._def.right._parseSync({ data: r.data, path: r.path, parent: r })) } }]), n }(QT); VA.create = function(e, t, n) { return new VA(fI({ left: e, right: t, typeName: $A.ZodIntersection }, JT(n))) }; var UA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e), r = n.status, a = n.ctx; if (a.parsedType !== wT.array) return PT(a, { code: OT.invalid_type, expected: wT.array, received: a.parsedType }), WT; if (a.data.length < this._def.items.length) return PT(a, { code: OT.too_small, minimum: this._def.items.length, inclusive: !0, exact: !1, type: "array" }), WT;!this._def.rest && a.data.length > this._def.items.length && (PT(a, { code: OT.too_big, maximum: this._def.items.length, inclusive: !0, exact: !1, type: "array" }), r.dirty()); var i = QS(a.data).map((function(e, n) { var r = t._def.items[n] || t._def.rest; return r ? r._parse(new KT(a, e, a.path, n)) : null })).filter((function(e) { return !!e })); return a.common.async ? Promise.all(i).then((function(e) { return UT.mergeArray(r, e) })) : UT.mergeArray(r, i) } }, { key: "rest", value: function(e) { return new n(fI(fI({}, this._def), {}, { rest: e })) } }, { key: "items", get: function() { return this._def.items } }]), n }(QT); UA.create = function(e, t) { if (!Array.isArray(e)) throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); return new UA(fI({ items: e, typeName: $A.ZodTuple, rest: null }, JT(t))) }; var WA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.status, r = t.ctx; if (r.parsedType !== wT.map) return PT(r, { code: OT.invalid_type, expected: wT.map, received: r.parsedType }), WT; var a = this._def.keyType, i = this._def.valueType, o = QS(r.data.entries()).map((function(e, t) { var n = YS(e, 2), o = n[0], l = n[1]; return { key: a._parse(new KT(r, o, r.path, [t, "key"])), value: i._parse(new KT(r, l, r.path, [t, "value"])) } })); if (r.common.async) { var l = new Map; return Promise.resolve().then(XS(regeneratorRuntime.mark((function e() { var t, r, a, i, u; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: t = hI(o), e.prev = 1, t.s(); case 3: if ((r = t.n()).done) { e.next = 16; break } return a = r.value, e.next = 7, a.key; case 7: return i = e.sent, e.next = 10, a.value; case 10: if (u = e.sent, "aborted" !== i.status && "aborted" !== u.status) { e.next = 13; break } return e.abrupt("return", WT); case 13: "dirty" !== i.status && "dirty" !== u.status || n.dirty(), l.set(i.value, u.value); case 14: e.next = 3; break; case 16: e.next = 21; break; case 18: e.prev = 18, e.t0 = e.catch(1), t.e(e.t0); case 21: return e.prev = 21, t.f(), e.finish(21); case 24: return e.abrupt("return", { status: n.value, value: l }); case 25: case "end": return e.stop() } }), e, null, [ [1, 18, 21, 24] ]) })))) } var u, c = new Map, s = hI(o); try { for (s.s(); !(u = s.n()).done;) { var d = u.value, f = d.key, p = d.value; if ("aborted" === f.status || "aborted" === p.status) return WT; "dirty" !== f.status && "dirty" !== p.status || n.dirty(), c.set(f.value, p.value) } } catch (e) { s.e(e) } finally { s.f() } return { status: n.value, value: c } } }, { key: "keySchema", get: function() { return this._def.keyType } }, { key: "valueSchema", get: function() { return this._def.valueType } }]), n }(QT); WA.create = function(e, t, n) { return new WA(fI({ valueType: t, keyType: e, typeName: $A.ZodMap }, JT(n))) }; var HA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e), n = t.status, r = t.ctx; if (r.parsedType !== wT.set) return PT(r, { code: OT.invalid_type, expected: wT.set, received: r.parsedType }), WT; var a = this._def; null !== a.minSize && r.data.size < a.minSize.value && (PT(r, { code: OT.too_small, minimum: a.minSize.value, type: "set", inclusive: !0, exact: !1, message: a.minSize.message }), n.dirty()), null !== a.maxSize && r.data.size > a.maxSize.value && (PT(r, { code: OT.too_big, maximum: a.maxSize.value, type: "set", inclusive: !0, exact: !1, message: a.maxSize.message }), n.dirty()); var i = this._def.valueType; function o(e) { var t, r = new Set, a = hI(e); try { for (a.s(); !(t = a.n()).done;) { var i = t.value; if ("aborted" === i.status) return WT; "dirty" === i.status && n.dirty(), r.add(i.value) } } catch (e) { a.e(e) } finally { a.f() } return { status: n.value, value: r } } var l = QS(r.data.values()).map((function(e, t) { return i._parse(new KT(r, e, r.path, t)) })); return r.common.async ? Promise.all(l).then((function(e) { return o(e) })) : o(l) } }, { key: "min", value: function(e, t) { return new n(fI(fI({}, this._def), {}, { minSize: { value: e, message: xT.toString(t) } })) } }, { key: "max", value: function(e, t) { return new n(fI(fI({}, this._def), {}, { maxSize: { value: e, message: xT.toString(t) } })) } }, { key: "size", value: function(e, t) { return this.min(e, t).max(e, t) } }, { key: "nonempty", value: function(e) { return this.min(1, e) } }]), n }(QT); HA.create = function(e, t) { return new HA(fI({ valueType: e, minSize: null, maxSize: null, typeName: $A.ZodSet }, JT(t))) }; var FA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx; return this._def.getter()._parse({ data: t.data, path: t.path, parent: t }) } }, { key: "schema", get: function() { return this._def.getter() } }]), n }(QT); FA.create = function(e, t) { return new FA(fI({ getter: e, typeName: $A.ZodLazy }, JT(t))) }; var GA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (e.data !== this._def.value) { var t = this._getOrReturnCtx(e); return PT(t, { received: t.data, code: OT.invalid_literal, expected: this._def.value }), WT } return { status: "valid", value: e.data } } }, { key: "value", get: function() { return this._def.value } }]), n }(QT); function jA(e, t) { return new zA(fI({ values: e, typeName: $A.ZodEnum }, JT(t))) } GA.create = function(e, t) { return new GA(fI({ value: e, typeName: $A.ZodLiteral }, JT(t))) }; var zA = function(e) { nI(n, e); var t = rI(n); function n() { var e; return $S(this, n), e = t.apply(this, arguments), MT.set(aI(e), void 0), e } return tI(n, [{ key: "_parse", value: function(e) { if ("string" != typeof e.data) { var t = this._getOrReturnCtx(e), n = this._def.values; return PT(t, { expected: CT.joinValues(n), received: t.parsedType, code: OT.invalid_type }), WT } if (qT(this, MT, "f") || BT(this, MT, new Set(this._def.values), "f"), !qT(this, MT, "f").has(e.data)) { var r = this._getOrReturnCtx(e), a = this._def.values; return PT(r, { received: r.data, code: OT.invalid_enum_value, options: a }), WT } return FT(e.data) } }, { key: "extract", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._def; return n.create(e, fI(fI({}, this._def), t)) } }, { key: "exclude", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._def; return n.create(this.options.filter((function(t) { return !e.includes(t) })), fI(fI({}, this._def), t)) } }, { key: "options", get: function() { return this._def.values } }, { key: "enum", get: function() { var e, t = {}, n = hI(this._def.values); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; t[r] = r } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "Values", get: function() { var e, t = {}, n = hI(this._def.values); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; t[r] = r } } catch (e) { n.e(e) } finally { n.f() } return t } }, { key: "Enum", get: function() { var e, t = {}, n = hI(this._def.values); try { for (n.s(); !(e = n.n()).done;) { var r = e.value; t[r] = r } } catch (e) { n.e(e) } finally { n.f() } return t } }]), n }(QT); MT = new WeakMap, zA.create = jA; var ZA = function(e) { nI(n, e); var t = rI(n); function n() { var e; return $S(this, n), e = t.apply(this, arguments), VT.set(aI(e), void 0), e } return tI(n, [{ key: "_parse", value: function(e) { var t = CT.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e); if (n.parsedType !== wT.string && n.parsedType !== wT.number) { var r = CT.objectValues(t); return PT(n, { expected: CT.joinValues(r), received: n.parsedType, code: OT.invalid_type }), WT } if (qT(this, VT, "f") || BT(this, VT, new Set(CT.getValidEnumValues(this._def.values)), "f"), !qT(this, VT, "f").has(e.data)) { var a = CT.objectValues(t); return PT(n, { received: n.data, code: OT.invalid_enum_value, options: a }), WT } return FT(e.data) } }, { key: "enum", get: function() { return this._def.values } }]), n }(QT); VT = new WeakMap, ZA.create = function(e, t) { return new ZA(fI({ values: e, typeName: $A.ZodNativeEnum }, JT(t))) }; var qA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "unwrap", value: function() { return this._def.type } }, { key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e).ctx; if (n.parsedType !== wT.promise && !1 === n.common.async) return PT(n, { code: OT.invalid_type, expected: wT.promise, received: n.parsedType }), WT; var r = n.parsedType === wT.promise ? n.data : Promise.resolve(n.data); return FT(r.then((function(e) { return t._def.type.parseAsync(e, { path: n.path, errorMap: n.common.contextualErrorMap }) }))) } }]), n }(QT); qA.create = function(e, t) { return new qA(fI({ type: e, typeName: $A.ZodPromise }, JT(t))) }; var BA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "innerType", value: function() { return this._def.schema } }, { key: "sourceType", value: function() { return this._def.schema._def.typeName === $A.ZodEffects ? this._def.schema.sourceType() : this._def.schema } }, { key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e), r = n.status, a = n.ctx, i = this._def.effect || null, o = { addIssue: function(e) { PT(a, e), e.fatal ? r.abort() : r.dirty() }, get path() { return a.path } }; if (o.addIssue = o.addIssue.bind(o), "preprocess" === i.type) { var l = i.transform(a.data, o); if (a.common.async) return Promise.resolve(l).then(function() { var e = XS(regeneratorRuntime.mark((function e(n) { var i; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: if ("aborted" !== r.value) { e.next = 2; break } return e.abrupt("return", WT); case 2: return e.next = 4, t._def.schema._parseAsync({ data: n, path: a.path, parent: a }); case 4: return i = e.sent, e.abrupt("return", "aborted" === i.status ? WT : "dirty" === i.status || "dirty" === r.value ? HT(i.value) : i); case 6: case "end": return e.stop() } }), e) }))); return function(t) { return e.apply(this, arguments) } }()); if ("aborted" === r.value) return WT; var u = this._def.schema._parseSync({ data: l, path: a.path, parent: a }); return "aborted" === u.status ? WT : "dirty" === u.status || "dirty" === r.value ? HT(u.value) : u } if ("refinement" === i.type) { var c = function(e) { var t = i.refinement(e, o); if (a.common.async) return Promise.resolve(t); if (t instanceof Promise) throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); return e }; if (!1 === a.common.async) { var s = this._def.schema._parseSync({ data: a.data, path: a.path, parent: a }); return "aborted" === s.status ? WT : ("dirty" === s.status && r.dirty(), c(s.value), { status: r.value, value: s.value }) } return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((function(e) { return "aborted" === e.status ? WT : ("dirty" === e.status && r.dirty(), c(e.value).then((function() { return { status: r.value, value: e.value } }))) })) } if ("transform" === i.type) { if (!1 === a.common.async) { var d = this._def.schema._parseSync({ data: a.data, path: a.path, parent: a }); if (!zT(d)) return d; var f = i.transform(d.value, o); if (f instanceof Promise) throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."); return { status: r.value, value: f } } return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((function(e) { return zT(e) ? Promise.resolve(i.transform(e.value, o)).then((function(e) { return { status: r.value, value: e } })) : e })) } CT.assertNever(i) } }]), n }(QT); BA.create = function(e, t, n) { return new BA(fI({ schema: e, typeName: $A.ZodEffects, effect: t }, JT(n))) }, BA.createWithPreprocess = function(e, t, n) { return new BA(fI({ schema: t, effect: { type: "preprocess", transform: e }, typeName: $A.ZodEffects }, JT(n))) }; var KA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { return this._getType(e) === wT.undefined ? FT(void 0) : this._def.innerType._parse(e) } }, { key: "unwrap", value: function() { return this._def.innerType } }]), n }(QT); KA.create = function(e, t) { return new KA(fI({ innerType: e, typeName: $A.ZodOptional }, JT(t))) }; var YA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { return this._getType(e) === wT.null ? FT(null) : this._def.innerType._parse(e) } }, { key: "unwrap", value: function() { return this._def.innerType } }]), n }(QT); YA.create = function(e, t) { return new YA(fI({ innerType: e, typeName: $A.ZodNullable }, JT(t))) }; var JA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx, n = t.data; return t.parsedType === wT.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({ data: n, path: t.path, parent: t }) } }, { key: "removeDefault", value: function() { return this._def.innerType } }]), n }(QT); JA.create = function(e, t) { return new JA(fI({ innerType: e, typeName: $A.ZodDefault, defaultValue: "function" == typeof t.default ? t.default : function() { return t.default } }, JT(t))) }; var XA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e).ctx, r = fI(fI({}, n), {}, { common: fI(fI({}, n.common), {}, { issues: [] }) }), a = this._def.innerType._parse({ data: r.data, path: r.path, parent: fI({}, r) }); return ZT(a) ? a.then((function(e) { return { status: "valid", value: "valid" === e.status ? e.value : t._def.catchValue({ get error() { return new kT(r.common.issues) }, input: r.data }) } })) : { status: "valid", value: "valid" === a.status ? a.value : this._def.catchValue({ get error() { return new kT(r.common.issues) }, input: r.data }) } } }, { key: "removeCatch", value: function() { return this._def.innerType } }]), n }(QT); XA.create = function(e, t) { return new XA(fI({ innerType: e, typeName: $A.ZodCatch, catchValue: "function" == typeof t.catch ? t.catch : function() { return t.catch } }, JT(t))) }; var QA = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { if (this._getType(e) !== wT.nan) { var t = this._getOrReturnCtx(e); return PT(t, { code: OT.invalid_type, expected: wT.nan, received: t.parsedType }), WT } return { status: "valid", value: e.data } } }]), n }(QT); QA.create = function(e) { return new QA(fI({ typeName: $A.ZodNaN }, JT(e))) }; var $A, eN = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._processInputParams(e).ctx, n = t.data; return this._def.type._parse({ data: n, path: t.path, parent: t }) } }, { key: "unwrap", value: function() { return this._def.type } }]), n }(QT), tN = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this, n = this._processInputParams(e), r = n.status, a = n.ctx; if (a.common.async) return XS(regeneratorRuntime.mark((function e() { var n; return regeneratorRuntime.wrap((function(e) { for (;;) switch (e.prev = e.next) { case 0: return e.next = 2, t._def.in._parseAsync({ data: a.data, path: a.path, parent: a }); case 2: return n = e.sent, e.abrupt("return", "aborted" === n.status ? WT : "dirty" === n.status ? (r.dirty(), HT(n.value)) : t._def.out._parseAsync({ data: n.value, path: a.path, parent: a })); case 4: case "end": return e.stop() } }), e) })))(); var i = this._def.in._parseSync({ data: a.data, path: a.path, parent: a }); return "aborted" === i.status ? WT : "dirty" === i.status ? (r.dirty(), { status: "dirty", value: i.value }) : this._def.out._parseSync({ data: i.value, path: a.path, parent: a }) } }], [{ key: "create", value: function(e, t) { return new n({ in: e, out: t, typeName: $A.ZodPipeline }) } }]), n }(QT), nN = function(e) { nI(n, e); var t = rI(n); function n() { return $S(this, n), t.apply(this, arguments) } return tI(n, [{ key: "_parse", value: function(e) { var t = this._def.innerType._parse(e), n = function(e) { return zT(e) && (e.value = Object.freeze(e.value)), e }; return ZT(t) ? t.then((function(e) { return n(e) })) : n(t) } }, { key: "unwrap", value: function() { return this._def.innerType } }]), n }(QT); nN.create = function(e, t) { return new nN(fI({ innerType: e, typeName: $A.ZodReadonly }, JT(t))) }, PA.lazycreate, function(e) { e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly" }($A || ($A = {})); var rN = EA.create; CA.create, QA.create, _A.create; var aN = SA.create; IA.create, TA.create, AA.create, NA.create, wA.create, LA.create, OA.create, kA.create; var iN = DA.create, oN = PA.create; PA.strictCreate, xA.create, VA.create, UA.create, WA.create, HA.create, FA.create, GA.create, zA.create, ZA.create, qA.create, BA.create; var lN, uN = KA.create; YA.create, BA.createWithPreprocess, tN.create; var cN, sN, dN = oN({ sharedParameters: oN({ shouldAnalyze: aN().optional(), useContinueMode: aN().optional(), genericChallengeId: rN().optional() }).optional() }), fN = oN({ userId: rN(), challengeId: rN(), contentInlineBase64: rN(), expectedSymbols: iN(rN()), scriptIdentifiers: uN(iN(rN())) }).and(dN), pN = ((lN = {})[jI.UNKNOWN] = oN({}), lN[jI.CHEF] = fN, lN), hN = function(e, t, n) { if ("" === e || "" === n || "" === t) return JI; var r = bT.pipe(function() { try { return XI(atob(n)) } catch (e) { return JI } }(), function(e) { return function(t) { return QI(t) ? e() : t.value } }((function() { return n }))), a = t; if (!Object.values(jI).includes(a)) return JI; var i = rT((function() { return JSON.parse(r) }), (function() { return null })); if (nT(i)) return JI; var o = pN[a].safeParse(i.right); if (!o.success) return console.error(NT, o.error), JI; var l = { challengeId: e, challengeType: a, challengeMetadata: i.right }; return XI(l) }, vN = new KS(new VS({ basePath: "".concat(IT(), "/rotating-client-service"), genericChallengeMiddlewareType: "native", credentials: "include" })), mN = function(e, t) { return CI(void 0, void 0, void 0, (function() { var n, r, a, i, o; return _I(this, (function(l) { switch (l.label) { case 0: return n = null == (u = t) ? JI : XI(u), QI(n) ? [2, !1] : (r = function(t) { return function() { return e.challengeFetch({ req: { identifier: t } }) } }, a = gT((function(e) { return hT(e, (function(e) { return e })) })), i = function(e) { return e.map((function(e) { return rT((function() { return atob(e) }), (function(e) { return e })) })) }, [4, bT.pipe(n.value, (function(e) { return e.map(r) }), a, vT(i))()]); case 1: return o = l.sent(), nT(o) ? [2, !1] : [2, o.right.map((function(e) { if (nT(e)) return !1; var t = document.createElement("script"); return t.innerHTML = e.right, document.body.append(t), !0 })).reduce((function(e, t) { return e && t }))] } var u })) })) }, yN = function(e) { return CI(void 0, [e], void 0, (function(e) { var t = e.challengeBaseProperties, n = e.challengeSpecificProperties; return _I(this, (function(e) { return [2, bT.pipe(hT((function() { switch (n.challengeType) { case jI.CHEF: var e = n.challengeMetadata; return function(e) { return CI(void 0, [e], void 0, (function(e) { var t, n, r, a = e.userId, i = e.challengeId, o = e.contentInlineBase64, l = e.expectedSymbols, u = e.scriptIdentifiers, c = e.onChallengeCompleted, s = e.onChallengeInvalidated; return _I(this, (function(e) { switch (e.label) { case 0: return l.reduce((function(e, t) { return e || !(t in window) }), !1) ? (s({ challengeType: jI.CHEF, errorCode: WI.ErrorCode.FAILED_MIREPOIX, errorMessage: "Burnt the mirepoix :/." }), [2, !1]) : [4, mN(vN, u)]; case 1: return t = e.sent(), n = function(e, t) { return function(n) { return n ? t() : e() } }((function() { return function(e) { return CI(void 0, void 0, void 0, (function() { var t, n; return _I(this, (function(r) { return t = rT((function() { return atob(e) }), (function(e) { return e })), nT(t) ? [2, !1] : ((n = document.createElement("script")).innerHTML = t.right, document.body.append(n), [2, !0]) })) })) }(o) }), (function() { return CI(void 0, void 0, void 0, (function() { return _I(this, (function(e) { return [2, t] })) })) }))(t), [4, n]; case 2: return e.sent() ? (r = window, [2, bT.pipe(gT((function(e) { var t = r[e]; return hT((function() { return t({ userId: a, challengeId: i, expectedSymbol: e, rcsClient: vN }) }), (function(e) { return e })) }))(l), mT((function(e) { return s({ challengeType: jI.CHEF, errorCode: WI.ErrorCode.FAILED_SIMMER, errorMessage: "Simmer was too short!" }), !1 }), (function() { return c({ challengeType: jI.CHEF, metadata: { userId: a, challengeId: i } }), !0 })), pT((function(e) { return lT(e) })))()]) : (s({ challengeType: jI.CHEF, errorCode: WI.ErrorCode.FAILED_PREP, errorMessage: "Could not prep the cook successfully" }), [2, !1]) } })) })) }(bI(bI(bI({}, t), e), { onChallengeInvalidated: function(e) { return t.onChallengeInvalidated(bI({}, e)) }, onChallengeCompleted: function(e) { return t.onChallengeCompleted(bI({}, e)) } })); case jI.UNKNOWN: return Promise.resolve(!0); default: return Promise.resolve(!1) } }), (function(e) { return console.error(NT, "Failed to render challenge due to: ".concat(JSON.stringify(e))), e })), pT((function() { return lT(!1) })))()] })) })) }, gN = function(e) { var t = e.containerId, n = e.challengeTypeRaw, r = "".concat(t, "-").concat(n); if (null === document.getElementById(r)) { var a = document.createElement("div"); a.id = r, document.body.appendChild(a) } return r }, EN = new FS(new VS({ basePath: "".concat(IT(), "/challenge"), genericChallengeMiddlewareType: "native", credentials: "include" })), bN = function e(t) { var n = t.challengeBaseProperties, r = t.challengeSpecificProperties, a = r.challengeMetadata.sharedParameters, i = n.onChallengeCompleted; return function(t) { return CI(void 0, void 0, void 0, (function() { var o, l; return _I(this, (function(u) { switch (u.label) { case 0: return o = hT((function() { return EN._continue({ continueRequest: { challengeID: (null == a ? void 0 : a.genericChallengeId) || r.challengeId, challengeType: t.challengeType, challengeMetadata: JSON.stringify(t.metadata) } }) }), (function(e) { return e instanceof Error ? e.message : JSON.stringify(e) })), l = function(a) { return CI(void 0, void 0, void 0, (function() { var o, l, u, c, s, d, f; return _I(this, (function(p) { switch (p.label) { case 0: return a.challengeType ? TT(a.challengeType) ? (o = hN(null !== (s = a.challengeId) && void 0 !== s ? s : "", a.challengeType, null !== (d = a.challengeMetadata) && void 0 !== d ? d : ""), QI(o) ? (n.onChallengeInvalidated({ challengeType: r.challengeType, errorCode: FI.UNKNOWN, errorMessage: "" }), [2]) : (l = e({ challengeBaseProperties: n, challengeSpecificProperties: o.value }), gN({ containerId: n.containerId, challengeTypeRaw: null !== (f = a.challengeType) && void 0 !== f ? f : "" }), [4, yN({ challengeBaseProperties: bI(bI({}, n), { onChallengeCompleted: l }), challengeSpecificProperties: bI({}, o.value) })])) : n.legacyGenericRender ? (n.legacyGenericRender({ challengeBaseProperties: n, challengeSpecificProperties: { challengeId: null !== (u = a.challengeId) && void 0 !== u ? u : "", challengeType: a.challengeType, challengeMetadata: JSON.parse(null !== (c = a.challengeMetadata) && void 0 !== c ? c : "") } }), [2]) : (console.warn("[new middleware] legacy challenge type found but no fallback registered!"), n.onChallengeInvalidated({ challengeType: a.challengeType, errorCode: FI.UNKNOWN, errorMessage: "Subsequent challenges failed!" }), [2]) : (i(t), [2]); case 1: return p.sent() || n.onChallengeInvalidated({ challengeType: r.challengeType, errorCode: FI.UNKNOWN, errorMessage: "Subsequent challenges failed!" }), [2] } })) })) }, [4, bT.pipe(o, mT((function(e) { return n.onChallengeInvalidated({ challengeType: r.challengeType, errorCode: FI.UNKNOWN, errorMessage: "Unable to continue challenge due to: ".concat(e) }) }), (function(e) { return l(e) })))()]; case 1: return u.sent(), [2] } })) })) } }, CN = function(e, t) { return function(n) { return n ? t() : e() } }, _N = n(375), SN = "Hybrid Wrapper:";! function(e) { e.Login = "Login", e.AppLogin = "AppLogin", e.Signup = "Signup", e.AppSignup = "AppSignup", e.JoinGroup = "JoinGroup", e.GroupWallPost = "GroupWallPost", e.ResetPassword = "ResetPassword", e.ToyCodeRedeem = "ToyCodeRedeem", e.GameCardRedeem = "GameCardRedeem", e.FollowUser = "FollowUser", e.Generic = "Generic", e.SupportRequest = "SupportRequest", e.AssetComment = "AssetComment", e.Marketplace = "Marketplace" }(cN || (cN = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(sN || (sN = {})); var IN; Object.freeze({ __proto__: null, get ActionType() { return cN }, get ErrorCode() { return sN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.FAILED_PREP = 1] = "FAILED_PREP", e[e.FAILED_MIREPOIX = 2] = "FAILED_MIREPOIX", e[e.FAILED_SIMMER = 3] = "FAILED_SIMMER" }(IN || (IN = {})); var TN; Object.freeze({ __proto__: null, get ErrorCode() { return IN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(TN || (TN = {})); var AN, NN; Object.freeze({ __proto__: null, get ErrorCode() { return TN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(AN || (AN = {})), function(e) { e.ForceAuthenticator = "ForceAuthenticator", e.ForceTwoStepVerification = "ForceTwoStepVerification", e.BlockSession = "BlockSession" }(NN || (NN = {})); var wN; Object.freeze({ __proto__: null, BLOCK_SESSION_LANGUAGE_RESOURCES: ["Denied.Header", "Denied.Body", "Denied.Action"], get ErrorCode() { return AN }, FORCE_AUTHENTICATOR_LANGUAGE_RESOURCES: ["Action.Setup", "Description.Reason", "Description.SetupAuthenticator", "Header.TurnOnAuthenticator"], FORCE_TWO_STEP_VERIFICATION_LANGUAGE_RESOURCES: ["ForceTwoStepVerification.Header", "ForceTwoStepVerification.Body", "ForceTwoStepVerification.Action"], get ForceActionRedirectChallengeType() { return NN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(wN || (wN = {})); var LN, ON; Object.freeze({ __proto__: null, get ErrorCode() { return wN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_INVALID = 1] = "SESSION_INVALID", e[e.ANSWER_INVALID = 2] = "ANSWER_INVALID", e[e.WORKER_LOAD_ERROR = 3] = "WORKER_LOAD_ERROR", e[e.TIMEOUT = 4] = "TIMEOUT" }(LN || (LN = {})), function(e) { e.INVALID = "PROOF_OF_SPACE_PUZZLE_TYPE_INVALID", e.NONINTERACTIVE = "PROOF_OF_SPACE_PUZZLE_TYPE_NONINTERACTIVE", e.INTERACTIVE = "PROOF_OF_SPACE_PUZZLE_TYPE_INTERACTIVE" }(ON || (ON = {})); var kN; Object.freeze({ __proto__: null, get ErrorCode() { return LN }, get PuzzleType() { return ON } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_INVALID = 1] = "SESSION_INVALID", e[e.ANSWER_INVALID = 2] = "ANSWER_INVALID", e[e.WORKER_LOAD_ERROR = 3] = "WORKER_LOAD_ERROR" }(kN || (kN = {})); var DN, RN; Object.freeze({ __proto__: null, get ErrorCode() { return kN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.OTP_CODE_EXPIRED = 1] = "OTP_CODE_EXPIRED" }(DN || (DN = {})), function(e) { e.Password = "Password", e.OtpEmail = "Otp_Email", e.Passkey = "Passkey" }(RN || (RN = {})); var PN, xN; Object.freeze({ __proto__: null, get ErrorCode() { return DN }, get ReauthenticationType() { return RN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.INVALID_SESSION = 1] = "INVALID_SESSION" }(PN || (PN = {})), function(e) { e.INVALID = "ROSTILE_PUZZLE_TYPE_INVALID", e.VISIBLE = "ROSTILE_PUZZLE_TYPE_VISIBLE", e.INVISIBLE = "ROSTILE_PUZZLE_TYPE_INVISIBLE" }(xN || (xN = {})); var MN; Object.freeze({ __proto__: null, get ErrorCode() { return PN }, get PuzzleType() { return xN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_EXPIRED = 1] = "SESSION_EXPIRED", e[e.USER_WAS_FORCE_RESET = 2] = "USER_WAS_FORCE_RESET" }(MN || (MN = {})); var VN, UN, WN; Object.freeze({ __proto__: null, get ErrorCode() { return MN } });! function(e) { e.Unknown = "Unknown", e.Login = "Login", e.RobuxSpend = "RobuxSpend", e.ItemTrade = "ItemTrade", e.Resale = "Resale", e.PasswordReset = "PasswordReset", e.RevertAccount = "RevertAccount", e.Generic = "Generic", e.GenericWithRecoveryCodes = "GenericWithRecoveryCodes" }(VN || (VN = {})), function(e) { e.Email = "Email", e.Authenticator = "Authenticator", e.RecoveryCode = "RecoveryCode", e.SMS = "SMS", e.SecurityKey = "SecurityKey", e.CrossDevice = "CrossDevice", e.Password = "Password", e.Passkey = "Passkey" }(UN || (UN = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN", e[e.SESSION_EXPIRED = 1] = "SESSION_EXPIRED" }(WN || (WN = {})); var HN; Object.freeze({ __proto__: null, get ActionType() { return VN }, get ErrorCode() { return WN }, get MediaType() { return UN } });! function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(HN || (HN = {})); Object.freeze({ __proto__: null, get ErrorCode() { return HN } }); var FN = function(e, t) { return FN = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) { e.__proto__ = t } || function(e, t) { for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) }, FN(e, t) }; "function" == typeof SuppressedError && SuppressedError; var GN, jN;! function(e) { e.UNKNOWN = "unknown", e.INVALIDATED = "invalidated", e.ABANDONED = "abandoned", e.LOADFAILED = "loadfailed" }(GN || (GN = {})), function(e) { e[e.UNKNOWN = 0] = "UNKNOWN" }(jN || (jN = {})); var zN;! function(e) { function t(t) { var n = e.call(this, "challenge error for challenge kind ".concat(t.kind)) || this; return n.parameters = t, n }(function(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); function n() { this.constructor = e } FN(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n) })(t, e), t.prototype.match = function(e) { return this.parameters.kind === e.parameters.kind && JSON.stringify(this.parameters.data) === JSON.stringify(e.parameters.data) }, t.prototype.matchAbandoned = function(e) { return this.match(e) && e.parameters.kind === GN.ABANDONED } }(Error);! function(e) { e.UNKNOWN = "unknown", e.CHEF = "chef" }(zN || (zN = {})); var ZN; Object.freeze({ __proto__: null }), Object.freeze({ __proto__: null });! function(e) { e.ACTION_TYPE = "action-type", e.ALLOW_REMEMBER_DEVICE = "allow-remember-device", e.APP_TYPE = "app-type", e.BARISTA_MODE = "barista-mode", e.CAPTCHA_ID = "captcha-id", e.CHALLENGE_ID = "challenge-id", e.CHALLENGE_METADATA_JSON = "challenge-metadata-json", e.CHALLENGE_TYPE = "challenge-type", e.DARK_MODE = "dark-mode", e.DATA_EXCHANGE_BLOB = "data-exchange-blob", e.GENERIC_CHALLENGE_TYPE = "generic-challenge-type", e.INTEGRITY_TYPE = "integrity-type", e.REQUEST_HASH = "request-hash", e.PROOF_OF_SPACE_ARTIFACTS = "proof-of-space-artifacts", e.PUZZLE_TYPE = "puzzle-type", e.SESSION_ID = "session-id", e.USER_ID = "user-id", e.DEFAULT_TYPE = "default-type", e.AVAILABLE_TYPES = "available-types", e.DEFAULT_TYPE_METADATA_JSON = "default-type-metadata-json", e.GENERIC_CHALLENGE_ID = "generic-challenge-id", e.ORIGIN = "origin" }(ZN || (ZN = {})); var qN = function(e) { var t = e.replace(/[^A-Za-z0-9-_]/g, ""), n = Hu.fido2Util.base64UrlStringToBase64String(t); try { return atob(n) } catch (e) { if (e instanceof DOMException && e.code === DOMException.INVALID_CHARACTER_ERR) return console.error(SN, "Base-64 decoding failed", e), null; throw e } }, BN = g_({ challengeType: __((function(e) { return "string" == typeof e ? e.replace(/-/g, "") : e }), E_([C_(av), b_("generic")])), darkMode: E_([b_("false"), b_("true")]).default("false").transform((function(e) { return "true" === e })), appType: h_().default("unknown"), baristaMode: E_([b_("false"), b_("true")]).default("false").transform((function(e) { return "true" === e })), origin: h_().default("") }), KN = g_({ actionType: C_(_d), dataExchangeBlob: h_(), unifiedCaptchaId: h_() }), YN = g_({ userId: h_(), challengeId: h_(), actionType: C_(tv), allowRememberDevice: E_([b_("false"), b_("true")]).transform((function(e) { return "true" === e })) }), JN = g_({ userId: h_(), sessionId: h_() }), XN = g_({ defaultType: C_(Xh), availableTypes: y_(C_(Xh)), defaultTypeMetadataJSON: h_().optional() }), QN = g_({ sessionId: h_() }), $N = g_({ challengeId: h_(), puzzleType: C_($h) }), ew = g_({ challengeId: h_() }), tw = g_({ challengeId: h_(), integrityType: h_(), requestHash: h_() }), nw = g_({ challengeId: h_(), artifacts: g_({ puzzleType: C_(Kh), seed: h_(), rounds: h_(), layers: h_() }) }), rw = g_({ challengeId: h_().default(""), challengeType: E_([C_(zN), C_(av)]), challengeMetadataJson: h_() }), aw = function() { return aw = Object.assign || function(e) { for (var t, n = 1, r = arguments.length; n < r; n++) for (var a in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]); return e }, aw.apply(this, arguments) }, iw = function(e, t, n, r) { return new(n || (n = Promise))((function(a, i) { function o(e) { try { u(r.next(e)) } catch (e) { i(e) } } function l(e) { try { u(r.throw(e)) } catch (e) { i(e) } } function u(e) { var t; e.done ? a(e.value) : (t = e.value, t instanceof n ? t : new n((function(e) { e(t) }))).then(o, l) } u((r = r.apply(e, t || [])).next()) })) }, ow = function(e, t) { var n, r, a, i, o = { label: 0, sent: function() { if (1 & a[0]) throw a[1]; return a[1] }, trys: [], ops: [] }; return i = { next: l(0), throw: l(1), return: l(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function() { return this }), i; function l(i) { return function(l) { return function(i) { if (n) throw new TypeError("Generator is already executing."); for (; o;) try { if (n = 1, r && (a = 2 & i[0] ? r.return : i[0] ? r.throw || ((a = r.return) && a.call(r), 0) : r.next) && !(a = a.call(r, i[1])).done) return a; switch (r = 0, a && (i = [2 & i[0], a.value]), i[0]) { case 0: case 1: a = i; break; case 4: return o.label++, { value: i[1], done: !1 }; case 5: o.label++, r = i[1], i = [0]; continue; case 7: i = o.ops.pop(), o.trys.pop(); continue; default: if (!(a = o.trys, (a = a.length > 0 && a[a.length - 1]) || 6 !== i[0] && 2 !== i[0])) { o = 0; continue } if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) { o.label = i[1]; break } if (6 === i[0] && o.label < a[1]) { o.label = a[1], a = i; break } if (a && o.label < a[2]) { o.label = a[2], o.ops.push(i); break } a[2] && o.ops.pop(), o.trys.pop(); continue } i = t.call(e, o) } catch (e) { i = [6, e], r = 0 } finally { n = a = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, l]) } } }, lw = "light-theme", uw = "dark-theme", cw = function(e, t, n) { if (window.parent) { var r = mi.EnvironmentUrls.domain ? "https://" + n + "." + (mi.EnvironmentUrls.domain.includes("sitetest") ? "robloxlabs.com" : "roblox.com") : "URL_NOT_FOUND"; window.parent.postMessage({ genericChallengeResponse: { type: e, data: t } }, r) } }, sw = function(e, t, n, r) { var a, i; console.log(SN, "Sending hybrid call:", t, " to origin: ", r), null === (i = null === mi.Hybrid || void 0 === mi.Hybrid ? void 0 : mi.Hybrid.Navigation) || void 0 === i || i.navigateToFeature(((a = {}).feature = t, a.data = n, a), (function() { return console.log(SN, "Sent hybrid call:", t) })); var o = e[t], l = document.getElementById(o); if (null !== l && "INPUT" === l.tagName) { l.value = JSON.stringify(n); var u = document.createEvent("HTMLEvents"); u.initEvent("callbackInputChanged", !1, !1), l.dispatchEvent(u) } try { r && cw(t, n, r) } catch (e) { console.error(SN, e) } }, dw = function(e, t, n) { return iw(void 0, void 0, Promise, (function() { var r, a, i, o; return ow(this, (function(l) { switch (l.label) { case 0: return r = function() { var e = mi.UrlParser.getParametersAsObject(), t = { actionType: e[ZN.ACTION_TYPE], dataExchangeBlob: e[ZN.DATA_EXCHANGE_BLOB], unifiedCaptchaId: e[ZN.CAPTCHA_ID] }, n = KN.safeParse(t); return n.success ? n.data : (console.error(SN, n.error), null) }(), null === r ? (sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), [2, !1]) : (sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }), a = r.actionType, i = r.dataExchangeBlob, o = r.unifiedCaptchaId, [4, Yd({ containerId: e, actionType: a, appType: n, dataExchangeBlob: i, unifiedCaptchaId: o, renderInline: !0, onChallengeDisplayed: function(e) { return sw(t, Zh.CHALLENGE_DISPLAYED, e) }, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null })]); case 1: return !1 === l.sent() ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), [2, !1]) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), [2, !0]) } })) })) }, fw = function(e, t, n) { var r = function() { var e = mi.UrlParser.getParametersAsObject(), t = { userId: e[ZN.USER_ID], challengeId: e[ZN.CHALLENGE_ID], actionType: e[ZN.ACTION_TYPE], allowRememberDevice: e[ZN.ALLOW_REMEMBER_DEVICE] }, n = YN.safeParse(t); return n.success ? n.data : (console.error(SN, n.error), null) }(); if (null === r) return sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), !1; sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }); var a = r.userId, i = r.challengeId, o = r.actionType, l = r.allowRememberDevice; return !1 === nb({ containerId: e, userId: a, challengeId: i, actionType: o, appType: n, renderInline: !0, shouldModifyBrowserHistory: !0, shouldShowRememberDeviceCheckbox: l, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), sw(t, Zh.CHALLENGE_DISPLAYED, { displayed: !0 }), !0) }, pw = function(e, t, n) { var r = function() { var e = mi.UrlParser.getParametersAsObject(), t = { userId: e[ZN.USER_ID], sessionId: e[ZN.SESSION_ID] }, n = JN.safeParse(t); return n.success ? n.data : (console.error(SN, n.error), null) }(); if (null === r) return sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), !1; sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }); var a = r.userId, i = r.sessionId; return !1 === Jg({ containerId: e, userId: a, sessionId: i, appType: n, renderInline: !0, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), sw(t, Zh.CHALLENGE_DISPLAYED, { displayed: !0 }), !0) }, hw = function(e, t, n) { var r = function() { var e = mi.UrlParser.getParametersAsObject(), t = { defaultType: e[ZN.DEFAULT_TYPE], availableTypes: e[ZN.AVAILABLE_TYPES].split(","), defaultTypeMetadataJSON: e[ZN.DEFAULT_TYPE_METADATA_JSON] }, n = XN.safeParse(t); if (!n.success) return console.error(SN, n.error), null; var r = n.data, a = r.defaultType, i = r.availableTypes, o = r.defaultTypeMetadataJSON; if (void 0 === o) return n.data; var l = qN(o); return null === l ? null : { defaultType: a, availableTypes: i, defaultTypeMetadataJSON: l } }(); if (null === r) return sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), !1; sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }); var a = r.defaultType, i = r.availableTypes, o = r.defaultTypeMetadataJSON, l = null; if (void 0 !== o) try { l = JSON.parse(o) } catch (e) { return !1 } return !1 === Qy({ containerId: e, renderInline: !0, defaultType: a, availableTypes: i, defaultTypeMetadata: l, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), sw(t, Zh.CHALLENGE_DISPLAYED, { displayed: !0 }), !0) }, vw = function(e, t, n) { var r = function() { var e = { challengeId: mi.UrlParser.getParametersAsObject()[ZN.CHALLENGE_ID] }, t = ew.safeParse(e); return t.success ? t.data : (console.error(SN, t.error), null) }(); if (null === r) return sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), !1; sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }); var a = r.challengeId; return !1 === Zv({ containerId: e, challengeId: a, renderInline: !0, onChallengeDisplayed: function(e) { return sw(t, Zh.CHALLENGE_DISPLAYED, e) }, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), !0) }, mw = function(e, t, n) { var r = function() { var e = { sessionId: mi.UrlParser.getParametersAsObject()[ZN.SESSION_ID] }, t = QN.safeParse(e); return t.success ? t.data : (console.error(SN, t.error), null) }(); if (null === r) return sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), !1; sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }); var a = r.sessionId; return !1 === ty({ containerId: e, sessionId: a, renderInline: !0, onChallengeDisplayed: function(e) { return sw(t, Zh.CHALLENGE_DISPLAYED, e) }, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), !0) }, yw = function(e, t, n) { var r = function() { var e = mi.UrlParser.getParametersAsObject(), t = { challengeId: e[ZN.CHALLENGE_ID], puzzleType: e[ZN.PUZZLE_TYPE] }, n = $N.safeParse(t); return n.success ? n.data : (console.error(SN, n.error), null) }(); if (null === r) return sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), !1; sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }); var a = r.challengeId, i = r.puzzleType; return !1 === wg({ containerId: e, challengeId: a, puzzleType: i, appType: n, renderInline: !0, onChallengeDisplayed: function(e) { return sw(t, Zh.CHALLENGE_DISPLAYED, e) }, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), !0) }, gw = function(e, t, n) { var r = function() { var e = mi.UrlParser.getParametersAsObject(), t = { challengeId: e[ZN.CHALLENGE_ID], integrityType: e[ZN.INTEGRITY_TYPE], requestHash: e[ZN.REQUEST_HASH] }, n = tw.safeParse(t); return n.success ? n.data : (console.error(SN, n.error), null) }(); if (null === r) return sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), !1; sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }); var a = r.challengeId, i = r.integrityType, o = r.requestHash; return !1 === Ef({ containerId: e, challengeId: a, integrityType: i, requestHash: o, renderInline: !0, onChallengeDisplayed: function(e) { return sw(t, Zh.CHALLENGE_DISPLAYED, e) }, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), !0) }, Ew = function(e, t, n) { var r = function() { var e = mi.UrlParser.getParametersAsObject(), t = { challengeId: e[ZN.CHALLENGE_ID], artifacts: e[ZN.PROOF_OF_SPACE_ARTIFACTS] }, n = nw.safeParse(t); return n.success ? n.data : (console.error(SN, n.error), null) }(); if (null === r) return sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), !1; sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }); var a = r.challengeId, i = r.artifacts; return !1 === Nm({ containerId: e, challengeId: a, artifacts: i, renderInline: !0, onChallengeDisplayed: function(e) { return sw(t, Zh.CHALLENGE_DISPLAYED, e) }, onChallengeCompleted: function(e) { return sw(t, Zh.CHALLENGE_COMPLETED, e) }, onChallengeInvalidated: function(e) { return sw(t, Zh.CHALLENGE_INVALIDATED, e) }, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), !0) }, bw = function(e, t) { if (!AT.isSupportedByGrasshopper(t.challengeType)) return eh; var n = e, r = t; return th(yN({ challengeBaseProperties: aw(aw({}, n), { onChallengeCompleted: bN({ challengeBaseProperties: n, challengeSpecificProperties: r }) }), challengeSpecificProperties: r })) }, Cw = function(e, t, n, r) { return iw(void 0, void 0, Promise, (function() { var a, i, o, l, u, c, s, d, f; return ow(this, (function(p) { switch (p.label) { case 0: return a = window.location.href.split("?")[0], i = function() { var e = mi.UrlParser.getParametersAsObject(), t = { challengeId: e[ZN.GENERIC_CHALLENGE_ID], challengeType: e[ZN.GENERIC_CHALLENGE_TYPE], challengeMetadataJson: e[ZN.CHALLENGE_METADATA_JSON] }, n = rw.safeParse(t); if (!n.success) return console.error(SN, n.error), null; var r = n.data, a = r.challengeId, i = r.challengeType, o = r.challengeMetadataJson, l = qN(o); return null === l ? null : (0, _N.pipe)(Z_(a, i, l), yh, fh((function() { return hN(a, i, l) })), vh((function() { return null }))) }(), null === i ? (sw(t, Zh.CHALLENGE_PARSED, { parsed: !1 }), [2, !1]) : (sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }), o = 0 === r.length, l = o ? void 0 : r, u = { renderInline: !0, onModalChallengeAbandoned: null }, c = { renderInline: !1, onModalChallengeAbandoned: function() { return sw(t, Zh.CHALLENGE_INVALIDATED, { abandoned: !0 }, l) } }, s = CN((function() { return c }), (function() { return u }))(o), d = aw({ containerId: e, appType: n, shouldModifyBrowserHistory: !0, onChallengeCompleted: function(e) { window.history.replaceState(null, "", a), sw(t, Zh.CHALLENGE_COMPLETED, e, l) }, onChallengeInvalidated: function(e) { window.history.replaceState(null, "", a), sw(t, Zh.CHALLENGE_INVALIDATED, e, l) }, onChallengeDisplayed: function(e) { sw(t, Zh.CHALLENGE_DISPLAYED, e, l) } }, s), f = bw(d, i), [4, (0, _N.pipe)(f, mh((function() { return q_({ challengeBaseProperties: d, challengeSpecificProperties: i }) })))]); case 1: return !1 === p.sent() ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }, r), [2, !1]) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }, r), [2, !0]) } })) })) }, _w = function(e, t, n) { return sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }), !1 === Wf({ containerId: e, forceActionRedirectChallengeType: Sf.ForceAuthenticator, renderInline: !0, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), sw(t, Zh.CHALLENGE_DISPLAYED, { displayed: !0 }), !0) }, Sw = function(e, t, n) { return sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }), !1 === Wf({ containerId: e, forceActionRedirectChallengeType: Sf.ForceTwoStepVerification, renderInline: !0, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), sw(t, Zh.CHALLENGE_DISPLAYED, { displayed: !0 }), !0) }, Iw = function(e, t, n) { return sw(t, Zh.CHALLENGE_PARSED, { parsed: !0 }), !1 === Wf({ containerId: e, forceActionRedirectChallengeType: Sf.BlockSession, renderInline: !0, onModalChallengeAbandoned: null }) ? (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !1 }), !1) : (sw(t, Zh.CHALLENGE_INITIALIZED, { initialized: !0 }), sw(t, Zh.CHALLENGE_DISPLAYED, { displayed: !0 }), !0) }, Tw = function(e) { var t = e.containerId, n = e.hybridTargetToCallbackInputId; return iw(void 0, void 0, void 0, (function() { var e; return ow(this, (function(r) { var a, i, o; if (sw(n, Zh.CHALLENGE_PAGE_LOADED, { pageLoaded: !0 }), a = mi.UrlParser.getParametersAsObject(), i = { challengeType: a[ZN.CHALLENGE_TYPE], darkMode: a[ZN.DARK_MODE], appType: a[ZN.APP_TYPE], baristaMode: a[ZN.BARISTA_MODE], origin: a[ZN.ORIGIN] }, o = BN.safeParse(i), null === (e = o.success ? o.data : (console.error(SN, o.error), null))) return sw(n, Zh.CHALLENGE_PARSED, { parsed: !1 }), [2, !1]; switch (e.baristaMode && (document.body.style.backgroundColor = "transparent"), e.darkMode ? (document.body.classList.remove(lw), document.body.classList.add(uw)) : (document.body.classList.remove(uw), document.body.classList.add(lw)), e.challengeType) { case av.CAPTCHA: return [2, dw(t, n, e.appType)]; case av.FORCE_AUTHENTICATOR: return [2, _w(t, n, e.appType)]; case av.FORCE_TWO_STEP_VERIFICATION: return [2, Sw(t, n, e.appType)]; case av.TWO_STEP_VERIFICATION: return [2, fw(t, n, e.appType)]; case av.SECURITY_QUESTIONS: return [2, pw(t, n, e.appType)]; case av.REAUTHENTICATION: return [2, hw(t, n, e.appType)]; case av.PROOF_OF_WORK: return [2, mw(t, n, e.appType)]; case av.ROSTILE: return [2, yw(t, n, e.appType)]; case av.PRIVATE_ACCESS_TOKEN: return [2, vw(t, n, e.appType)]; case av.DEVICE_INTEGRITY: return [2, gw(t, n, e.appType)]; case av.PROOF_OF_SPACE: return [2, Ew(t, n, e.appType)]; case av.PHONE_VERIFICATION: case av.EMAIL_VERIFICATION: return [2, !1]; case av.BLOCK_SESSION: return [2, Iw(t, n, e.appType)]; case "generic": return [2, Cw(t, n, e.appType, e.origin)]; default: return e.challengeType, [2, !1] } return [2] })) })) }, Aw = { Captcha: A, DeviceIntegrity: N, ForceActionRedirect: w, Generic: M, HybridWrapper: V, PrivateAccessToken: L, ProofOfSpace: O, ProofOfWork: k, Reauthentication: D, Rostile: R, SecurityQuestions: P, TwoStepVerification: x }; Object.assign(yi(), { AccountIntegrityChallengeService: Aw }), J_(), ne(void 0, void 0, void 0, (function() { var e, t, n, r, a, i; return re(this, (function(o) { switch (o.label) { case 0: return [4, pi()]; case 1: return o.sent().enableIndexedDbTelemetry ? (e = ui({ databaseName: "rbxInstrumentationDb", objectStoreName: hi, version: 1 }), te(e) ? (ai(ii, { success: "false", arm: "connection-consumer" }), [2]) : [4, e.value]) : [2]; case 2: return t = o.sent(), n = ci({ database: t, objectStoreName: hi, key: vi }), te(n) ? (ai(ii, { success: "false", arm: "get-consumer" }), [2]) : [4, n.value]; case 3: return void 0 !== (r = o.sent()) ? (ai(ii, { success: "true", arm: "get-consumer", timestamp: r.toString() }), [2]) : (a = (new Date).getTime(), i = si({ database: t, objectStoreName: hi, key: vi, value: a }), Fa.pipe(i, Q((function() { return { success: "true", arm: "put-consumer", timestamp: a.toString() } })), function(e) { return function(t) { return te(t) ? e() : t.value } }((function() { return { success: "false", arm: "put-consumer", timestamp: a.toString() } })), (function(e) { return ai(ii, e) })), [2]) } })) })) }() }(); //# sourceMappingURL=https://sourcemaps.rbxcdn.com/50d1292f74343f6a54b48a0554bc39eb-challenge.bundle.min.js.map /* Bundle detector */ window.Roblox && window.Roblox.BundleDetector && window.Roblox.BundleDetector.bundleDetected("Challenge");