@wral/report-it 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/define.mjs +1 -1
- package/dist/define.standalone.js +421 -512
- package/dist/index.mjs +1 -1
- package/dist/{wral-code-input-BH_1EP8b.js → wral-code-input-BA1oCHMu.js} +499 -590
- package/package.json +1 -1
|
@@ -53,45 +53,45 @@ function An() {
|
|
|
53
53
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
54
54
|
var _ = v.indexOf("=");
|
|
55
55
|
_ === -1 && (_ = b);
|
|
56
|
-
var
|
|
57
|
-
return [_,
|
|
56
|
+
var x = _ === b ? 0 : 4 - _ % 4;
|
|
57
|
+
return [_, x];
|
|
58
58
|
}
|
|
59
59
|
function u(v) {
|
|
60
|
-
var b = o(v), _ = b[0],
|
|
61
|
-
return (_ +
|
|
60
|
+
var b = o(v), _ = b[0], x = b[1];
|
|
61
|
+
return (_ + x) * 3 / 4 - x;
|
|
62
62
|
}
|
|
63
63
|
function c(v, b, _) {
|
|
64
64
|
return (b + _) * 3 / 4 - _;
|
|
65
65
|
}
|
|
66
66
|
function d(v) {
|
|
67
|
-
var b, _ = o(v),
|
|
68
|
-
for (
|
|
69
|
-
b = e[v.charCodeAt(
|
|
70
|
-
return U === 2 && (b = e[v.charCodeAt(
|
|
67
|
+
var b, _ = o(v), x = _[0], U = _[1], T = new t(c(v, x, U)), P = 0, B = U > 0 ? x - 4 : x, F;
|
|
68
|
+
for (F = 0; F < B; F += 4)
|
|
69
|
+
b = e[v.charCodeAt(F)] << 18 | e[v.charCodeAt(F + 1)] << 12 | e[v.charCodeAt(F + 2)] << 6 | e[v.charCodeAt(F + 3)], T[P++] = b >> 16 & 255, T[P++] = b >> 8 & 255, T[P++] = b & 255;
|
|
70
|
+
return U === 2 && (b = e[v.charCodeAt(F)] << 2 | e[v.charCodeAt(F + 1)] >> 4, T[P++] = b & 255), U === 1 && (b = e[v.charCodeAt(F)] << 10 | e[v.charCodeAt(F + 1)] << 4 | e[v.charCodeAt(F + 2)] >> 2, T[P++] = b >> 8 & 255, T[P++] = b & 255), T;
|
|
71
71
|
}
|
|
72
72
|
function p(v) {
|
|
73
73
|
return n[v >> 18 & 63] + n[v >> 12 & 63] + n[v >> 6 & 63] + n[v & 63];
|
|
74
74
|
}
|
|
75
75
|
function m(v, b, _) {
|
|
76
|
-
for (var
|
|
77
|
-
|
|
76
|
+
for (var x, U = [], T = b; T < _; T += 3)
|
|
77
|
+
x = (v[T] << 16 & 16711680) + (v[T + 1] << 8 & 65280) + (v[T + 2] & 255), U.push(p(x));
|
|
78
78
|
return U.join("");
|
|
79
79
|
}
|
|
80
80
|
function y(v) {
|
|
81
|
-
for (var b, _ = v.length,
|
|
82
|
-
U.push(m(v,
|
|
83
|
-
return
|
|
81
|
+
for (var b, _ = v.length, x = _ % 3, U = [], T = 16383, P = 0, B = _ - x; P < B; P += T)
|
|
82
|
+
U.push(m(v, P, P + T > B ? B : P + T));
|
|
83
|
+
return x === 1 ? (b = v[_ - 1], U.push(
|
|
84
84
|
n[b >> 2] + n[b << 4 & 63] + "=="
|
|
85
|
-
)) :
|
|
85
|
+
)) : x === 2 && (b = (v[_ - 2] << 8) + v[_ - 1], U.push(
|
|
86
86
|
n[b >> 10] + n[b >> 4 & 63] + n[b << 2 & 63] + "="
|
|
87
87
|
)), U.join("");
|
|
88
88
|
}
|
|
89
89
|
return be;
|
|
90
90
|
}
|
|
91
|
-
var
|
|
91
|
+
var Ve = {};
|
|
92
92
|
var Jt;
|
|
93
|
-
function
|
|
94
|
-
return Jt || (Jt = 1,
|
|
93
|
+
function Cn() {
|
|
94
|
+
return Jt || (Jt = 1, Ve.read = function(n, e, t, r, i) {
|
|
95
95
|
var s, o, u = i * 8 - r - 1, c = (1 << u) - 1, d = c >> 1, p = -7, m = t ? i - 1 : 0, y = t ? -1 : 1, v = n[e + m];
|
|
96
96
|
for (m += y, s = v & (1 << -p) - 1, v >>= -p, p += u; p > 0; s = s * 256 + n[e + m], m += y, p -= 8)
|
|
97
97
|
;
|
|
@@ -105,17 +105,17 @@ function xn() {
|
|
|
105
105
|
o = o + Math.pow(2, r), s = s - d;
|
|
106
106
|
}
|
|
107
107
|
return (v ? -1 : 1) * o * Math.pow(2, s - r);
|
|
108
|
-
},
|
|
108
|
+
}, Ve.write = function(n, e, t, r, i, s) {
|
|
109
109
|
var o, u, c, d = s * 8 - i - 1, p = (1 << d) - 1, m = p >> 1, y = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, v = r ? 0 : s - 1, b = r ? 1 : -1, _ = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
110
110
|
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (u = isNaN(e) ? 1 : 0, o = p) : (o = Math.floor(Math.log(e) / Math.LN2), e * (c = Math.pow(2, -o)) < 1 && (o--, c *= 2), o + m >= 1 ? e += y / c : e += y * Math.pow(2, 1 - m), e * c >= 2 && (o++, c /= 2), o + m >= p ? (u = 0, o = p) : o + m >= 1 ? (u = (e * c - 1) * Math.pow(2, i), o = o + m) : (u = e * Math.pow(2, m - 1) * Math.pow(2, i), o = 0)); i >= 8; n[t + v] = u & 255, v += b, u /= 256, i -= 8)
|
|
111
111
|
;
|
|
112
112
|
for (o = o << i | u, d += i; d > 0; n[t + v] = o & 255, v += b, o /= 256, d -= 8)
|
|
113
113
|
;
|
|
114
114
|
n[t + v - b] |= _ * 128;
|
|
115
|
-
}),
|
|
115
|
+
}), Ve;
|
|
116
116
|
}
|
|
117
117
|
var rt, Zt;
|
|
118
|
-
function
|
|
118
|
+
function xn() {
|
|
119
119
|
if (Zt) return rt;
|
|
120
120
|
Zt = 1;
|
|
121
121
|
var n = {}.toString;
|
|
@@ -126,7 +126,7 @@ function Cn() {
|
|
|
126
126
|
var Xt;
|
|
127
127
|
function En() {
|
|
128
128
|
return Xt || (Xt = 1, (function(n) {
|
|
129
|
-
var e = An(), t =
|
|
129
|
+
var e = An(), t = Cn(), r = xn();
|
|
130
130
|
n.Buffer = u, n.SlowBuffer = U, n.INSPECT_MAX_BYTES = 50, u.TYPED_ARRAY_SUPPORT = globalThis.TYPED_ARRAY_SUPPORT !== void 0 ? globalThis.TYPED_ARRAY_SUPPORT : i(), n.kMaxLength = s();
|
|
131
131
|
function i() {
|
|
132
132
|
try {
|
|
@@ -187,7 +187,7 @@ function En() {
|
|
|
187
187
|
return p(null, h, a, l);
|
|
188
188
|
};
|
|
189
189
|
function m(h, a) {
|
|
190
|
-
if (d(a), h = o(h, a < 0 ? 0 :
|
|
190
|
+
if (d(a), h = o(h, a < 0 ? 0 : x(a) | 0), !u.TYPED_ARRAY_SUPPORT)
|
|
191
191
|
for (var l = 0; l < a; ++l)
|
|
192
192
|
h[l] = 0;
|
|
193
193
|
return h;
|
|
@@ -206,7 +206,7 @@ function En() {
|
|
|
206
206
|
return g !== f && (h = h.slice(0, g)), h;
|
|
207
207
|
}
|
|
208
208
|
function v(h, a) {
|
|
209
|
-
var l = a.length < 0 ? 0 :
|
|
209
|
+
var l = a.length < 0 ? 0 : x(a.length) | 0;
|
|
210
210
|
h = o(h, l);
|
|
211
211
|
for (var f = 0; f < l; f += 1)
|
|
212
212
|
h[f] = a[f] & 255;
|
|
@@ -221,7 +221,7 @@ function En() {
|
|
|
221
221
|
}
|
|
222
222
|
function _(h, a) {
|
|
223
223
|
if (u.isBuffer(a)) {
|
|
224
|
-
var l =
|
|
224
|
+
var l = x(a.length) | 0;
|
|
225
225
|
return h = o(h, l), h.length === 0 || a.copy(h, 0, 0, l), h;
|
|
226
226
|
}
|
|
227
227
|
if (a) {
|
|
@@ -232,7 +232,7 @@ function En() {
|
|
|
232
232
|
}
|
|
233
233
|
throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function x(h) {
|
|
236
236
|
if (h >= s())
|
|
237
237
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s().toString(16) + " bytes");
|
|
238
238
|
return h | 0;
|
|
@@ -320,7 +320,7 @@ function En() {
|
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
u.byteLength = T;
|
|
323
|
-
function
|
|
323
|
+
function P(h, a, l) {
|
|
324
324
|
var f = !1;
|
|
325
325
|
if ((a === void 0 || a < 0) && (a = 0), a > this.length || ((l === void 0 || l > this.length) && (l = this.length), l <= 0) || (l >>>= 0, a >>>= 0, l <= a))
|
|
326
326
|
return "";
|
|
@@ -376,7 +376,7 @@ function En() {
|
|
|
376
376
|
return this;
|
|
377
377
|
}, u.prototype.toString = function() {
|
|
378
378
|
var a = this.length | 0;
|
|
379
|
-
return a === 0 ? "" : arguments.length === 0 ? we(this, 0, a) :
|
|
379
|
+
return a === 0 ? "" : arguments.length === 0 ? we(this, 0, a) : P.apply(this, arguments);
|
|
380
380
|
}, u.prototype.equals = function(a) {
|
|
381
381
|
if (!u.isBuffer(a)) throw new TypeError("Argument must be a Buffer");
|
|
382
382
|
return this === a ? !0 : u.compare(this, a) === 0;
|
|
@@ -402,7 +402,7 @@ function En() {
|
|
|
402
402
|
}
|
|
403
403
|
return S < I ? -1 : I < S ? 1 : 0;
|
|
404
404
|
};
|
|
405
|
-
function
|
|
405
|
+
function F(h, a, l, f, g) {
|
|
406
406
|
if (h.length === 0) return -1;
|
|
407
407
|
if (typeof l == "string" ? (f = l, l = 0) : l > 2147483647 ? l = 2147483647 : l < -2147483648 && (l = -2147483648), l = +l, isNaN(l) && (l = g ? 0 : h.length - 1), l < 0 && (l = h.length + l), l >= h.length) {
|
|
408
408
|
if (g) return -1;
|
|
@@ -448,9 +448,9 @@ function En() {
|
|
|
448
448
|
u.prototype.includes = function(a, l, f) {
|
|
449
449
|
return this.indexOf(a, l, f) !== -1;
|
|
450
450
|
}, u.prototype.indexOf = function(a, l, f) {
|
|
451
|
-
return
|
|
451
|
+
return F(this, a, l, f, !0);
|
|
452
452
|
}, u.prototype.lastIndexOf = function(a, l, f) {
|
|
453
|
-
return
|
|
453
|
+
return F(this, a, l, f, !1);
|
|
454
454
|
};
|
|
455
455
|
function ye(h, a, l, f) {
|
|
456
456
|
l = Number(l) || 0;
|
|
@@ -469,11 +469,11 @@ function En() {
|
|
|
469
469
|
function G(h, a, l, f) {
|
|
470
470
|
return qe(Le(a, h.length - l), h, l, f);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function V(h, a, l, f) {
|
|
473
473
|
return qe(wn(a), h, l, f);
|
|
474
474
|
}
|
|
475
475
|
function te(h, a, l, f) {
|
|
476
|
-
return
|
|
476
|
+
return V(h, a, l, f);
|
|
477
477
|
}
|
|
478
478
|
function le(h, a, l, f) {
|
|
479
479
|
return qe(zt(a), h, l, f);
|
|
@@ -504,7 +504,7 @@ function En() {
|
|
|
504
504
|
case "utf-8":
|
|
505
505
|
return G(this, a, l, f);
|
|
506
506
|
case "ascii":
|
|
507
|
-
return
|
|
507
|
+
return V(this, a, l, f);
|
|
508
508
|
case "latin1":
|
|
509
509
|
case "binary":
|
|
510
510
|
return te(this, a, l, f);
|
|
@@ -735,25 +735,25 @@ function En() {
|
|
|
735
735
|
}, u.prototype.writeInt32BE = function(a, l, f) {
|
|
736
736
|
return a = +a, l = l | 0, f || K(this, a, l, 4, 2147483647, -2147483648), a < 0 && (a = 4294967295 + a + 1), u.TYPED_ARRAY_SUPPORT ? (this[l] = a >>> 24, this[l + 1] = a >>> 16, this[l + 2] = a >>> 8, this[l + 3] = a & 255) : Ne(this, a, l, !1), l + 4;
|
|
737
737
|
};
|
|
738
|
-
function
|
|
738
|
+
function Vt(h, a, l, f, g, w) {
|
|
739
739
|
if (l + f > h.length) throw new RangeError("Index out of range");
|
|
740
740
|
if (l < 0) throw new RangeError("Index out of range");
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
return g ||
|
|
742
|
+
function Ht(h, a, l, f, g) {
|
|
743
|
+
return g || Vt(h, a, l, 4), t.write(h, a, l, f, 23, 4), l + 4;
|
|
744
744
|
}
|
|
745
745
|
u.prototype.writeFloatLE = function(a, l, f) {
|
|
746
|
-
return
|
|
746
|
+
return Ht(this, a, l, !0, f);
|
|
747
747
|
}, u.prototype.writeFloatBE = function(a, l, f) {
|
|
748
|
-
return
|
|
748
|
+
return Ht(this, a, l, !1, f);
|
|
749
749
|
};
|
|
750
|
-
function
|
|
751
|
-
return g ||
|
|
750
|
+
function jt(h, a, l, f, g) {
|
|
751
|
+
return g || Vt(h, a, l, 8), t.write(h, a, l, f, 52, 8), l + 8;
|
|
752
752
|
}
|
|
753
753
|
u.prototype.writeDoubleLE = function(a, l, f) {
|
|
754
|
-
return
|
|
754
|
+
return jt(this, a, l, !0, f);
|
|
755
755
|
}, u.prototype.writeDoubleBE = function(a, l, f) {
|
|
756
|
-
return
|
|
756
|
+
return jt(this, a, l, !1, f);
|
|
757
757
|
}, u.prototype.copy = function(a, l, f, g) {
|
|
758
758
|
if (f || (f = 0), !g && g !== 0 && (g = this.length), l >= a.length && (l = a.length), l || (l = 0), g > 0 && g < f && (g = f), g === f || a.length === 0 || this.length === 0) return 0;
|
|
759
759
|
if (l < 0)
|
|
@@ -888,25 +888,25 @@ function En() {
|
|
|
888
888
|
}
|
|
889
889
|
})(tt)), tt;
|
|
890
890
|
}
|
|
891
|
-
var k = En(),
|
|
892
|
-
typeof window < "u" && window.crypto && (
|
|
893
|
-
!
|
|
894
|
-
!
|
|
895
|
-
if (!
|
|
891
|
+
var k = En(), z;
|
|
892
|
+
typeof window < "u" && window.crypto && (z = window.crypto);
|
|
893
|
+
!z && typeof window < "u" && window.msCrypto && (z = window.msCrypto);
|
|
894
|
+
!z && typeof globalThis < "u" && globalThis.crypto && (z = globalThis.crypto);
|
|
895
|
+
if (!z && typeof require == "function")
|
|
896
896
|
try {
|
|
897
|
-
|
|
897
|
+
z = require("crypto");
|
|
898
898
|
} catch {
|
|
899
899
|
}
|
|
900
900
|
function Un() {
|
|
901
|
-
if (
|
|
902
|
-
if (typeof
|
|
901
|
+
if (z) {
|
|
902
|
+
if (typeof z.getRandomValues == "function")
|
|
903
903
|
try {
|
|
904
|
-
return
|
|
904
|
+
return z.getRandomValues(new Uint32Array(1))[0];
|
|
905
905
|
} catch {
|
|
906
906
|
}
|
|
907
|
-
if (typeof
|
|
907
|
+
if (typeof z.randomBytes == "function")
|
|
908
908
|
try {
|
|
909
|
-
return
|
|
909
|
+
return z.randomBytes(4).readInt32LE();
|
|
910
910
|
} catch {
|
|
911
911
|
}
|
|
912
912
|
}
|
|
@@ -977,7 +977,7 @@ function $n(n, e) {
|
|
|
977
977
|
function Rn(n, e) {
|
|
978
978
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(n, e);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function Pn(n, e, t, r) {
|
|
981
981
|
function i(s) {
|
|
982
982
|
return s instanceof t ? s : new t(function(o) {
|
|
983
983
|
o(s);
|
|
@@ -1004,7 +1004,7 @@ function Fn(n, e, t, r) {
|
|
|
1004
1004
|
d((r = r.apply(n, e || [])).next());
|
|
1005
1005
|
});
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function Fn(n, e) {
|
|
1008
1008
|
var t = { label: 0, sent: function() {
|
|
1009
1009
|
if (s[0] & 1) throw s[1];
|
|
1010
1010
|
return s[1];
|
|
@@ -1177,17 +1177,17 @@ function Kn(n) {
|
|
|
1177
1177
|
}, o);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function Vn(n, e) {
|
|
1181
1181
|
return Object.defineProperty ? Object.defineProperty(n, "raw", { value: e }) : n.raw = e, n;
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function Hn(n) {
|
|
1184
1184
|
if (n && n.__esModule) return n;
|
|
1185
1185
|
var e = {};
|
|
1186
1186
|
if (n != null)
|
|
1187
1187
|
for (var t in n) Object.hasOwnProperty.call(n, t) && (e[t] = n[t]);
|
|
1188
1188
|
return e.default = n, e;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function jn(n) {
|
|
1191
1191
|
return n && n.__esModule ? n : { default: n };
|
|
1192
1192
|
}
|
|
1193
1193
|
function zn(n, e) {
|
|
@@ -1209,17 +1209,17 @@ const Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1209
1209
|
__asyncGenerator: Ln,
|
|
1210
1210
|
__asyncValues: Kn,
|
|
1211
1211
|
__await: $e,
|
|
1212
|
-
__awaiter:
|
|
1212
|
+
__awaiter: Pn,
|
|
1213
1213
|
__classPrivateFieldGet: zn,
|
|
1214
1214
|
__classPrivateFieldSet: Wn,
|
|
1215
1215
|
__createBinding: Bn,
|
|
1216
1216
|
__decorate: kn,
|
|
1217
1217
|
__exportStar: On,
|
|
1218
1218
|
__extends: In,
|
|
1219
|
-
__generator:
|
|
1220
|
-
__importDefault:
|
|
1221
|
-
__importStar:
|
|
1222
|
-
__makeTemplateObject:
|
|
1219
|
+
__generator: Fn,
|
|
1220
|
+
__importDefault: jn,
|
|
1221
|
+
__importStar: Hn,
|
|
1222
|
+
__makeTemplateObject: Vn,
|
|
1223
1223
|
__metadata: Rn,
|
|
1224
1224
|
__param: $n,
|
|
1225
1225
|
__read: Nr,
|
|
@@ -1228,9 +1228,9 @@ const Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1228
1228
|
__spreadArrays: Nn,
|
|
1229
1229
|
__values: pt
|
|
1230
1230
|
}, Symbol.toStringTag, { value: "Module" })), Lr = /* @__PURE__ */ $t(Yn);
|
|
1231
|
-
var Se = {},
|
|
1231
|
+
var Se = {}, H = {}, Qt;
|
|
1232
1232
|
function qr() {
|
|
1233
|
-
return Qt || (Qt = 1, Object.defineProperty(
|
|
1233
|
+
return Qt || (Qt = 1, Object.defineProperty(H, "__esModule", { value: !0 }), H.MAX_HASHABLE_LENGTH = H.INIT = H.KEY = H.DIGEST_LENGTH = H.BLOCK_SIZE = void 0, H.BLOCK_SIZE = 64, H.DIGEST_LENGTH = 32, H.KEY = new Uint32Array([
|
|
1234
1234
|
1116352408,
|
|
1235
1235
|
1899447441,
|
|
1236
1236
|
3049323471,
|
|
@@ -1295,7 +1295,7 @@ function qr() {
|
|
|
1295
1295
|
2756734187,
|
|
1296
1296
|
3204031479,
|
|
1297
1297
|
3329325298
|
|
1298
|
-
]),
|
|
1298
|
+
]), H.INIT = [
|
|
1299
1299
|
1779033703,
|
|
1300
1300
|
3144134277,
|
|
1301
1301
|
1013904242,
|
|
@@ -1304,7 +1304,7 @@ function qr() {
|
|
|
1304
1304
|
2600822924,
|
|
1305
1305
|
528734635,
|
|
1306
1306
|
1541459225
|
|
1307
|
-
],
|
|
1307
|
+
], H.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1), H;
|
|
1308
1308
|
}
|
|
1309
1309
|
var _e = {}, er;
|
|
1310
1310
|
function Gn() {
|
|
@@ -1344,13 +1344,13 @@ function Gn() {
|
|
|
1344
1344
|
if (b < 16)
|
|
1345
1345
|
this.temp[b] = (i[b * 4] & 255) << 24 | (i[b * 4 + 1] & 255) << 16 | (i[b * 4 + 2] & 255) << 8 | i[b * 4 + 3] & 255;
|
|
1346
1346
|
else {
|
|
1347
|
-
var _ = this.temp[b - 2],
|
|
1347
|
+
var _ = this.temp[b - 2], x = (_ >>> 17 | _ << 15) ^ (_ >>> 19 | _ << 13) ^ _ >>> 10;
|
|
1348
1348
|
_ = this.temp[b - 15];
|
|
1349
1349
|
var U = (_ >>> 7 | _ << 25) ^ (_ >>> 18 | _ << 14) ^ _ >>> 3;
|
|
1350
|
-
this.temp[b] = (
|
|
1350
|
+
this.temp[b] = (x + this.temp[b - 7] | 0) + (U + this.temp[b - 16] | 0);
|
|
1351
1351
|
}
|
|
1352
|
-
var T = (((p >>> 6 | p << 26) ^ (p >>> 11 | p << 21) ^ (p >>> 25 | p << 7)) + (p & m ^ ~p & y) | 0) + (v + (n.KEY[b] + this.temp[b] | 0) | 0) | 0,
|
|
1353
|
-
v = y, y = m, m = p, p = d + T | 0, d = c, c = u, u = o, o = T +
|
|
1352
|
+
var T = (((p >>> 6 | p << 26) ^ (p >>> 11 | p << 21) ^ (p >>> 25 | p << 7)) + (p & m ^ ~p & y) | 0) + (v + (n.KEY[b] + this.temp[b] | 0) | 0) | 0, P = ((o >>> 2 | o << 30) ^ (o >>> 13 | o << 19) ^ (o >>> 22 | o << 10)) + (o & u ^ o & c ^ u & c) | 0;
|
|
1353
|
+
v = y, y = m, m = p, p = d + T | 0, d = c, c = u, u = o, o = T + P | 0;
|
|
1354
1354
|
}
|
|
1355
1355
|
s[0] += o, s[1] += u, s[2] += c, s[3] += d, s[4] += p, s[5] += m, s[6] += y, s[7] += v;
|
|
1356
1356
|
}, t;
|
|
@@ -1414,19 +1414,19 @@ function ii() {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
return Ae.convertToBuffer = t, Ae;
|
|
1416
1416
|
}
|
|
1417
|
-
var
|
|
1417
|
+
var Ce = {}, rr;
|
|
1418
1418
|
function si() {
|
|
1419
|
-
if (rr) return
|
|
1420
|
-
rr = 1, Object.defineProperty(
|
|
1419
|
+
if (rr) return Ce;
|
|
1420
|
+
rr = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.isEmptyData = void 0;
|
|
1421
1421
|
function n(e) {
|
|
1422
1422
|
return typeof e == "string" ? e.length === 0 : e.byteLength === 0;
|
|
1423
1423
|
}
|
|
1424
|
-
return
|
|
1424
|
+
return Ce.isEmptyData = n, Ce;
|
|
1425
1425
|
}
|
|
1426
|
-
var
|
|
1426
|
+
var xe = {}, nr;
|
|
1427
1427
|
function oi() {
|
|
1428
|
-
if (nr) return
|
|
1429
|
-
nr = 1, Object.defineProperty(
|
|
1428
|
+
if (nr) return xe;
|
|
1429
|
+
nr = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.numToUint8 = void 0;
|
|
1430
1430
|
function n(e) {
|
|
1431
1431
|
return new Uint8Array([
|
|
1432
1432
|
(e & 4278190080) >> 24,
|
|
@@ -1435,7 +1435,7 @@ function oi() {
|
|
|
1435
1435
|
e & 255
|
|
1436
1436
|
]);
|
|
1437
1437
|
}
|
|
1438
|
-
return
|
|
1438
|
+
return xe.numToUint8 = n, xe;
|
|
1439
1439
|
}
|
|
1440
1440
|
var Ee = {}, ir;
|
|
1441
1441
|
function ai() {
|
|
@@ -1533,11 +1533,11 @@ function ci() {
|
|
|
1533
1533
|
})(nt)), nt;
|
|
1534
1534
|
}
|
|
1535
1535
|
var De = ci();
|
|
1536
|
-
function
|
|
1536
|
+
function C(n, e) {
|
|
1537
1537
|
n != null && this.fromString(n, e);
|
|
1538
1538
|
}
|
|
1539
1539
|
function q() {
|
|
1540
|
-
return new
|
|
1540
|
+
return new C(null);
|
|
1541
1541
|
}
|
|
1542
1542
|
var Q, hi = 244837814094590, ur = (hi & 16777215) == 15715070;
|
|
1543
1543
|
function fi(n, e, t, r, i, s) {
|
|
@@ -1562,21 +1562,21 @@ function pi(n, e, t, r, i, s) {
|
|
|
1562
1562
|
return i;
|
|
1563
1563
|
}
|
|
1564
1564
|
var lr = typeof navigator < "u";
|
|
1565
|
-
lr && ur && navigator.appName == "Microsoft Internet Explorer" ? (
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1565
|
+
lr && ur && navigator.appName == "Microsoft Internet Explorer" ? (C.prototype.am = di, Q = 30) : lr && ur && navigator.appName != "Netscape" ? (C.prototype.am = fi, Q = 26) : (C.prototype.am = pi, Q = 28);
|
|
1566
|
+
C.prototype.DB = Q;
|
|
1567
|
+
C.prototype.DM = (1 << Q) - 1;
|
|
1568
|
+
C.prototype.DV = 1 << Q;
|
|
1569
1569
|
var Rt = 52;
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
var gi = "0123456789abcdefghijklmnopqrstuvwxyz", Ge = new Array(), ge,
|
|
1570
|
+
C.prototype.FV = Math.pow(2, Rt);
|
|
1571
|
+
C.prototype.F1 = Rt - Q;
|
|
1572
|
+
C.prototype.F2 = 2 * Q - Rt;
|
|
1573
|
+
var gi = "0123456789abcdefghijklmnopqrstuvwxyz", Ge = new Array(), ge, W;
|
|
1574
1574
|
ge = 48;
|
|
1575
|
-
for (
|
|
1575
|
+
for (W = 0; W <= 9; ++W) Ge[ge++] = W;
|
|
1576
1576
|
ge = 97;
|
|
1577
|
-
for (
|
|
1577
|
+
for (W = 10; W < 36; ++W) Ge[ge++] = W;
|
|
1578
1578
|
ge = 65;
|
|
1579
|
-
for (
|
|
1579
|
+
for (W = 10; W < 36; ++W) Ge[ge++] = W;
|
|
1580
1580
|
function cr(n) {
|
|
1581
1581
|
return gi.charAt(n);
|
|
1582
1582
|
}
|
|
@@ -1591,7 +1591,7 @@ function yi(n) {
|
|
|
1591
1591
|
function vi(n) {
|
|
1592
1592
|
this.t = 1, this.s = n < 0 ? -1 : 0, n > 0 ? this[0] = n : n < -1 ? this[0] = n + this.DV : this.t = 0;
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function Pt(n) {
|
|
1595
1595
|
var e = q();
|
|
1596
1596
|
return e.fromInt(n), e;
|
|
1597
1597
|
}
|
|
@@ -1612,7 +1612,7 @@ function wi(n, e) {
|
|
|
1612
1612
|
}
|
|
1613
1613
|
i = !1, s == 0 ? this[this.t++] = o : s + t > this.DB ? (this[this.t - 1] |= (o & (1 << this.DB - s) - 1) << s, this[this.t++] = o >> this.DB - s) : this[this.t - 1] |= o << s, s += t, s >= this.DB && (s -= this.DB);
|
|
1614
1614
|
}
|
|
1615
|
-
this.clamp(), i &&
|
|
1615
|
+
this.clamp(), i && C.ZERO.subTo(this, this);
|
|
1616
1616
|
}
|
|
1617
1617
|
function bi() {
|
|
1618
1618
|
for (var n = this.s & this.DM; this.t > 0 && this[this.t - 1] == n; ) --this.t;
|
|
@@ -1634,12 +1634,12 @@ function Si(n) {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
function _i() {
|
|
1636
1636
|
var n = q();
|
|
1637
|
-
return
|
|
1637
|
+
return C.ZERO.subTo(this, n), n;
|
|
1638
1638
|
}
|
|
1639
1639
|
function Ai() {
|
|
1640
1640
|
return this.s < 0 ? this.negate() : this;
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function Ci(n) {
|
|
1643
1643
|
var e = this.s - n.s;
|
|
1644
1644
|
if (e != 0) return e;
|
|
1645
1645
|
var t = this.t;
|
|
@@ -1647,12 +1647,12 @@ function xi(n) {
|
|
|
1647
1647
|
for (; --t >= 0; ) if ((e = this[t] - n[t]) != 0) return e;
|
|
1648
1648
|
return 0;
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function Ft(n) {
|
|
1651
1651
|
var e = 1, t;
|
|
1652
1652
|
return (t = n >>> 16) != 0 && (n = t, e += 16), (t = n >> 8) != 0 && (n = t, e += 8), (t = n >> 4) != 0 && (n = t, e += 4), (t = n >> 2) != 0 && (n = t, e += 2), (t = n >> 1) != 0 && (n = t, e += 1), e;
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1655
|
-
return this.t <= 0 ? 0 : this.DB * (this.t - 1) +
|
|
1654
|
+
function xi() {
|
|
1655
|
+
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Ft(this[this.t - 1] ^ this.s & this.DM);
|
|
1656
1656
|
}
|
|
1657
1657
|
function Ei(n, e) {
|
|
1658
1658
|
var t;
|
|
@@ -1702,7 +1702,7 @@ function ki(n, e) {
|
|
|
1702
1702
|
var t = this.abs(), r = n.abs(), i = t.t;
|
|
1703
1703
|
for (e.t = i + r.t; --i >= 0; ) e[i] = 0;
|
|
1704
1704
|
for (i = 0; i < r.t; ++i) e[i + t.t] = t.am(0, r[i], e, i, 0, t.t);
|
|
1705
|
-
e.s = 0, e.clamp(), this.s != n.s &&
|
|
1705
|
+
e.s = 0, e.clamp(), this.s != n.s && C.ZERO.subTo(e, e);
|
|
1706
1706
|
}
|
|
1707
1707
|
function $i(n) {
|
|
1708
1708
|
for (var e = this.abs(), t = n.t = 2 * e.t; --t >= 0; ) n[t] = 0;
|
|
@@ -1721,26 +1721,26 @@ function Ri(n, e, t) {
|
|
|
1721
1721
|
return;
|
|
1722
1722
|
}
|
|
1723
1723
|
t == null && (t = q());
|
|
1724
|
-
var s = q(), o = this.s, u = n.s, c = this.DB -
|
|
1724
|
+
var s = q(), o = this.s, u = n.s, c = this.DB - Ft(r[r.t - 1]);
|
|
1725
1725
|
c > 0 ? (r.lShiftTo(c, s), i.lShiftTo(c, t)) : (r.copyTo(s), i.copyTo(t));
|
|
1726
1726
|
var d = s.t, p = s[d - 1];
|
|
1727
1727
|
if (p != 0) {
|
|
1728
|
-
var m = p * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0), y = this.FV / m, v = (1 << this.F1) / m, b = 1 << this.F2, _ = t.t,
|
|
1729
|
-
for (s.dlShiftTo(
|
|
1730
|
-
for (; --
|
|
1728
|
+
var m = p * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0), y = this.FV / m, v = (1 << this.F1) / m, b = 1 << this.F2, _ = t.t, x = _ - d, U = e ?? q();
|
|
1729
|
+
for (s.dlShiftTo(x, U), t.compareTo(U) >= 0 && (t[t.t++] = 1, t.subTo(U, t)), C.ONE.dlShiftTo(d, U), U.subTo(s, s); s.t < d; ) s[s.t++] = 0;
|
|
1730
|
+
for (; --x >= 0; ) {
|
|
1731
1731
|
var T = t[--_] == p ? this.DM : Math.floor(t[_] * y + (t[_ - 1] + b) * v);
|
|
1732
|
-
if ((t[_] += s.am(0, T, t,
|
|
1733
|
-
for (s.dlShiftTo(
|
|
1732
|
+
if ((t[_] += s.am(0, T, t, x, 0, d)) < T)
|
|
1733
|
+
for (s.dlShiftTo(x, U), t.subTo(U, t); t[_] < --T; ) t.subTo(U, t);
|
|
1734
1734
|
}
|
|
1735
|
-
e != null && (t.drShiftTo(d, e), o != u &&
|
|
1735
|
+
e != null && (t.drShiftTo(d, e), o != u && C.ZERO.subTo(e, e)), t.t = d, t.clamp(), c > 0 && t.rShiftTo(c, t), o < 0 && C.ZERO.subTo(t, t);
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
1739
|
-
function
|
|
1739
|
+
function Pi(n) {
|
|
1740
1740
|
var e = q();
|
|
1741
|
-
return this.abs().divRemTo(n, null, e), this.s < 0 && e.compareTo(
|
|
1741
|
+
return this.abs().divRemTo(n, null, e), this.s < 0 && e.compareTo(C.ZERO) > 0 && n.subTo(e, e), e;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function Fi() {
|
|
1744
1744
|
if (this.t < 1) return 0;
|
|
1745
1745
|
var n = this[0];
|
|
1746
1746
|
if ((n & 1) == 0) return 0;
|
|
@@ -1785,13 +1785,13 @@ function me(n) {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
function Ki(n) {
|
|
1787
1787
|
var e = q();
|
|
1788
|
-
return n.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), n.s < 0 && e.compareTo(
|
|
1788
|
+
return n.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), n.s < 0 && e.compareTo(C.ZERO) > 0 && this.m.subTo(e, e), e;
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function Vi(n) {
|
|
1791
1791
|
var e = q();
|
|
1792
1792
|
return n.copyTo(e), this.reduce(e), e;
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function Hi(n) {
|
|
1795
1795
|
for (; n.t <= this.mt2; )
|
|
1796
1796
|
n[n.t++] = 0;
|
|
1797
1797
|
for (var e = 0; e < this.m.t; ++e) {
|
|
@@ -1801,19 +1801,19 @@ function Vi(n) {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
n.clamp(), n.drShiftTo(this.m.t, n), n.compareTo(this.m) >= 0 && n.subTo(this.m, n);
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function ji(n, e) {
|
|
1805
1805
|
n.squareTo(e), this.reduce(e);
|
|
1806
1806
|
}
|
|
1807
1807
|
function zi(n, e, t) {
|
|
1808
1808
|
n.multiplyTo(e, t), this.reduce(t);
|
|
1809
1809
|
}
|
|
1810
1810
|
me.prototype.convert = Ki;
|
|
1811
|
-
me.prototype.revert =
|
|
1812
|
-
me.prototype.reduce =
|
|
1811
|
+
me.prototype.revert = Vi;
|
|
1812
|
+
me.prototype.reduce = Hi;
|
|
1813
1813
|
me.prototype.mulTo = zi;
|
|
1814
|
-
me.prototype.sqrTo =
|
|
1814
|
+
me.prototype.sqrTo = ji;
|
|
1815
1815
|
function Wi(n, e, t) {
|
|
1816
|
-
var r = n.bitLength(), i, s =
|
|
1816
|
+
var r = n.bitLength(), i, s = Pt(1), o = new me(e);
|
|
1817
1817
|
if (r <= 0) return s;
|
|
1818
1818
|
r < 18 ? i = 1 : r < 48 ? i = 3 : r < 144 ? i = 4 : r < 768 ? i = 5 : i = 6;
|
|
1819
1819
|
var u = new Array(), c = 3, d = i - 1, p = (1 << i) - 1;
|
|
@@ -1822,8 +1822,8 @@ function Wi(n, e, t) {
|
|
|
1822
1822
|
for (o.sqrTo(u[1], m); c <= p; )
|
|
1823
1823
|
u[c] = q(), o.mulTo(m, u[c - 2], u[c]), c += 2;
|
|
1824
1824
|
}
|
|
1825
|
-
var y = n.t - 1, v, b = !0, _ = q(),
|
|
1826
|
-
for (r =
|
|
1825
|
+
var y = n.t - 1, v, b = !0, _ = q(), x;
|
|
1826
|
+
for (r = Ft(n[y]) - 1; y >= 0; ) {
|
|
1827
1827
|
for (r >= d ? v = n[y] >> r - d & p : (v = (n[y] & (1 << r + 1) - 1) << d - r, y > 0 && (v |= n[y - 1] >> this.DB + r - d)), c = i; (v & 1) == 0; )
|
|
1828
1828
|
v >>= 1, --c;
|
|
1829
1829
|
if ((r -= c) < 0 && (r += this.DB, --y), b)
|
|
@@ -1831,48 +1831,48 @@ function Wi(n, e, t) {
|
|
|
1831
1831
|
else {
|
|
1832
1832
|
for (; c > 1; )
|
|
1833
1833
|
o.sqrTo(s, _), o.sqrTo(_, s), c -= 2;
|
|
1834
|
-
c > 0 ? o.sqrTo(s, _) : (
|
|
1834
|
+
c > 0 ? o.sqrTo(s, _) : (x = s, s = _, _ = x), o.mulTo(_, u[v], s);
|
|
1835
1835
|
}
|
|
1836
1836
|
for (; y >= 0 && (n[y] & 1 << r) == 0; )
|
|
1837
|
-
o.sqrTo(s, _),
|
|
1837
|
+
o.sqrTo(s, _), x = s, s = _, _ = x, --r < 0 && (r = this.DB - 1, --y);
|
|
1838
1838
|
}
|
|
1839
1839
|
var U = o.revert(s);
|
|
1840
1840
|
return t(null, U), U;
|
|
1841
1841
|
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1842
|
+
C.prototype.copyTo = yi;
|
|
1843
|
+
C.prototype.fromInt = vi;
|
|
1844
|
+
C.prototype.fromString = wi;
|
|
1845
|
+
C.prototype.clamp = bi;
|
|
1846
|
+
C.prototype.dlShiftTo = Ei;
|
|
1847
|
+
C.prototype.drShiftTo = Ui;
|
|
1848
|
+
C.prototype.lShiftTo = Ti;
|
|
1849
|
+
C.prototype.rShiftTo = Ii;
|
|
1850
|
+
C.prototype.subTo = Di;
|
|
1851
|
+
C.prototype.multiplyTo = ki;
|
|
1852
|
+
C.prototype.squareTo = $i;
|
|
1853
|
+
C.prototype.divRemTo = Ri;
|
|
1854
|
+
C.prototype.invDigit = Fi;
|
|
1855
|
+
C.prototype.addTo = Oi;
|
|
1856
|
+
C.prototype.toString = Si;
|
|
1857
|
+
C.prototype.negate = _i;
|
|
1858
|
+
C.prototype.abs = Ai;
|
|
1859
|
+
C.prototype.compareTo = Ci;
|
|
1860
|
+
C.prototype.bitLength = xi;
|
|
1861
|
+
C.prototype.mod = Pi;
|
|
1862
|
+
C.prototype.equals = Bi;
|
|
1863
|
+
C.prototype.add = Mi;
|
|
1864
|
+
C.prototype.subtract = Ni;
|
|
1865
|
+
C.prototype.multiply = Li;
|
|
1866
|
+
C.prototype.divide = qi;
|
|
1867
|
+
C.prototype.modPow = Wi;
|
|
1868
|
+
C.ZERO = Pt(0);
|
|
1869
|
+
C.ONE = Pt(1);
|
|
1870
1870
|
function st(n) {
|
|
1871
1871
|
return k.Buffer.from(new Mr().random(n).toString(), "hex");
|
|
1872
1872
|
}
|
|
1873
1873
|
var Yi = /^[89a-f]/i, Gi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", Ji = "userAttributes.", se = /* @__PURE__ */ (function() {
|
|
1874
1874
|
function n(t) {
|
|
1875
|
-
this.N = new
|
|
1875
|
+
this.N = new C(Gi, 16), this.g = new C("2", 16), this.k = new C(this.hexHash("" + this.padHex(this.N) + this.padHex(this.g)), 16), this.smallAValue = this.generateRandomSmallA(), this.getLargeAValue(function() {
|
|
1876
1876
|
}), this.infoBits = k.Buffer.from("Caldera Derived Key", "utf8"), this.poolName = t;
|
|
1877
1877
|
}
|
|
1878
1878
|
var e = n.prototype;
|
|
@@ -1884,7 +1884,7 @@ var Yi = /^[89a-f]/i, Gi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
|
|
|
1884
1884
|
s && r(s, null), i.largeAValue = o, r(null, i.largeAValue);
|
|
1885
1885
|
});
|
|
1886
1886
|
}, e.generateRandomSmallA = function() {
|
|
1887
|
-
var r = st(128).toString("hex"), i = new
|
|
1887
|
+
var r = st(128).toString("hex"), i = new C(r, 16);
|
|
1888
1888
|
return i;
|
|
1889
1889
|
}, e.generateRandomString = function() {
|
|
1890
1890
|
return st(40).toString("base64");
|
|
@@ -1898,17 +1898,17 @@ var Yi = /^[89a-f]/i, Gi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
|
|
|
1898
1898
|
var o = this;
|
|
1899
1899
|
this.randomPassword = this.generateRandomString();
|
|
1900
1900
|
var u = "" + r + i + ":" + this.randomPassword, c = this.hash(u), d = st(16).toString("hex");
|
|
1901
|
-
this.SaltToHashDevices = this.padHex(new
|
|
1901
|
+
this.SaltToHashDevices = this.padHex(new C(d, 16)), this.g.modPow(new C(this.hexHash(this.SaltToHashDevices + c), 16), this.N, function(p, m) {
|
|
1902
1902
|
p && s(p, null), o.verifierDevices = o.padHex(m), s(null, null);
|
|
1903
1903
|
});
|
|
1904
1904
|
}, e.calculateA = function(r, i) {
|
|
1905
1905
|
var s = this;
|
|
1906
1906
|
this.g.modPow(r, this.N, function(o, u) {
|
|
1907
|
-
o && i(o, null), u.mod(s.N).equals(
|
|
1907
|
+
o && i(o, null), u.mod(s.N).equals(C.ZERO) && i(new Error("Illegal paramater. A mod N cannot be 0."), null), i(null, u);
|
|
1908
1908
|
});
|
|
1909
1909
|
}, e.calculateU = function(r, i) {
|
|
1910
1910
|
this.UHexHash = this.hexHash(this.padHex(r) + this.padHex(i));
|
|
1911
|
-
var s = new
|
|
1911
|
+
var s = new C(this.UHexHash, 16);
|
|
1912
1912
|
return s;
|
|
1913
1913
|
}, e.hash = function(r) {
|
|
1914
1914
|
var i = new De.Sha256();
|
|
@@ -1926,11 +1926,11 @@ var Yi = /^[89a-f]/i, Gi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
|
|
|
1926
1926
|
return m;
|
|
1927
1927
|
}, e.getPasswordAuthenticationKey = function(r, i, s, o, u) {
|
|
1928
1928
|
var c = this;
|
|
1929
|
-
if (s.mod(this.N).equals(
|
|
1929
|
+
if (s.mod(this.N).equals(C.ZERO))
|
|
1930
1930
|
throw new Error("B cannot be zero.");
|
|
1931
|
-
if (this.UValue = this.calculateU(this.largeAValue, s), this.UValue.equals(
|
|
1931
|
+
if (this.UValue = this.calculateU(this.largeAValue, s), this.UValue.equals(C.ZERO))
|
|
1932
1932
|
throw new Error("U cannot be zero.");
|
|
1933
|
-
var d = "" + this.poolName + r + ":" + i, p = this.hash(d), m = new
|
|
1933
|
+
var d = "" + this.poolName + r + ":" + i, p = this.hash(d), m = new C(this.hexHash(this.padHex(o) + p), 16);
|
|
1934
1934
|
this.calculateS(m, s, function(y, v) {
|
|
1935
1935
|
y && u(y, null);
|
|
1936
1936
|
var b = c.computehkdf(k.Buffer.from(c.padHex(v), "hex"), k.Buffer.from(c.padHex(c.UValue), "hex"));
|
|
@@ -1948,14 +1948,14 @@ var Yi = /^[89a-f]/i, Gi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
|
|
|
1948
1948
|
}, e.getNewPasswordRequiredChallengeUserAttributePrefix = function() {
|
|
1949
1949
|
return Ji;
|
|
1950
1950
|
}, e.padHex = function(r) {
|
|
1951
|
-
if (!(r instanceof
|
|
1951
|
+
if (!(r instanceof C))
|
|
1952
1952
|
throw new Error("Not a BigInteger");
|
|
1953
|
-
var i = r.compareTo(
|
|
1953
|
+
var i = r.compareTo(C.ZERO) < 0, s = r.abs().toString(16);
|
|
1954
1954
|
if (s = s.length % 2 !== 0 ? "0" + s : s, s = Yi.test(s) ? "00" + s : s, i) {
|
|
1955
1955
|
var o = s.split("").map(function(c) {
|
|
1956
1956
|
var d = ~parseInt(c, 16) & 15;
|
|
1957
1957
|
return "0123456789ABCDEF".charAt(d);
|
|
1958
|
-
}).join(""), u = new
|
|
1958
|
+
}).join(""), u = new C(o, 16).add(C.ONE);
|
|
1959
1959
|
s = u.toString(16), s.toUpperCase().startsWith("FF8") && (s = s.substring(2));
|
|
1960
1960
|
}
|
|
1961
1961
|
return s;
|
|
@@ -2021,11 +2021,11 @@ var wt = /* @__PURE__ */ (function() {
|
|
|
2021
2021
|
return this.token;
|
|
2022
2022
|
}, n;
|
|
2023
2023
|
})(), Qi = "5.0.4";
|
|
2024
|
-
var es = "aws-amplify/" + Qi,
|
|
2024
|
+
var es = "aws-amplify/" + Qi, Vr = {
|
|
2025
2025
|
userAgent: es,
|
|
2026
2026
|
isReactNative: typeof navigator < "u" && navigator.product === "ReactNative"
|
|
2027
2027
|
}, ts = function() {
|
|
2028
|
-
return
|
|
2028
|
+
return Vr.userAgent;
|
|
2029
2029
|
};
|
|
2030
2030
|
var bt = /* @__PURE__ */ (function() {
|
|
2031
2031
|
function n(t) {
|
|
@@ -2066,7 +2066,7 @@ var rs = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
|
|
|
2066
2066
|
return m;
|
|
2067
2067
|
}, n;
|
|
2068
2068
|
})();
|
|
2069
|
-
var
|
|
2069
|
+
var Hr = /* @__PURE__ */ (function() {
|
|
2070
2070
|
function n(t) {
|
|
2071
2071
|
var r = t === void 0 ? {} : t, i = r.Name, s = r.Value;
|
|
2072
2072
|
this.Name = i || "", this.Value = s || "";
|
|
@@ -2101,7 +2101,7 @@ var ne = {}, is = /* @__PURE__ */ (function() {
|
|
|
2101
2101
|
}, n.clear = function() {
|
|
2102
2102
|
return ne = {}, ne;
|
|
2103
2103
|
}, n;
|
|
2104
|
-
})(),
|
|
2104
|
+
})(), jr = /* @__PURE__ */ (function() {
|
|
2105
2105
|
function n() {
|
|
2106
2106
|
try {
|
|
2107
2107
|
this.storageWindow = window.localStorage, this.storageWindow.setItem("aws.cognito.test-ls", 1), this.storageWindow.removeItem("aws.cognito.test-ls");
|
|
@@ -2114,11 +2114,11 @@ var ne = {}, is = /* @__PURE__ */ (function() {
|
|
|
2114
2114
|
return this.storageWindow;
|
|
2115
2115
|
}, n;
|
|
2116
2116
|
})();
|
|
2117
|
-
var ss = typeof navigator < "u", hr = ss ?
|
|
2117
|
+
var ss = typeof navigator < "u", hr = ss ? Vr.isReactNative ? "react-native" : navigator.userAgent : "nodejs", _t = /* @__PURE__ */ (function() {
|
|
2118
2118
|
function n(t) {
|
|
2119
2119
|
if (t == null || t.Username == null || t.Pool == null)
|
|
2120
2120
|
throw new Error("Username and Pool information are required.");
|
|
2121
|
-
this.username = t.Username || "", this.pool = t.Pool, this.Session = null, this.client = t.Pool.client, this.signInUserSession = null, this.authenticationFlowType = "USER_SRP_AUTH", this.storage = t.Storage || new
|
|
2121
|
+
this.username = t.Username || "", this.pool = t.Pool, this.Session = null, this.client = t.Pool.client, this.signInUserSession = null, this.authenticationFlowType = "USER_SRP_AUTH", this.storage = t.Storage || new jr().getStorage(), this.keyPrefix = "CognitoIdentityServiceProvider." + this.pool.getClientId(), this.userDataKey = this.keyPrefix + "." + this.username + ".userData";
|
|
2122
2122
|
}
|
|
2123
2123
|
var e = n.prototype;
|
|
2124
2124
|
return e.setSignInUserSession = function(r) {
|
|
@@ -2158,25 +2158,25 @@ var ss = typeof navigator < "u", hr = ss ? jr.isReactNative ? "react-native" : n
|
|
|
2158
2158
|
AuthParameters: p,
|
|
2159
2159
|
ClientMetadata: v
|
|
2160
2160
|
};
|
|
2161
|
-
s.getUserContextData(s.username) && (b.UserContextData = s.getUserContextData(s.username)), s.client.request("InitiateAuth", b, function(_,
|
|
2161
|
+
s.getUserContextData(s.username) && (b.UserContextData = s.getUserContextData(s.username)), s.client.request("InitiateAuth", b, function(_, x) {
|
|
2162
2162
|
if (_)
|
|
2163
2163
|
return i.onFailure(_);
|
|
2164
|
-
var U =
|
|
2165
|
-
s.username = U.USER_ID_FOR_SRP, s.userDataKey = s.keyPrefix + "." + s.username + ".userData", c = new
|
|
2164
|
+
var U = x.ChallengeParameters;
|
|
2165
|
+
s.username = U.USER_ID_FOR_SRP, s.userDataKey = s.keyPrefix + "." + s.username + ".userData", c = new C(U.SRP_B, 16), d = new C(U.SALT, 16), s.getCachedDeviceKeyAndPassword(), o.getPasswordAuthenticationKey(s.username, r.getPassword(), c, d, function(T, P) {
|
|
2166
2166
|
T && i.onFailure(T);
|
|
2167
|
-
var B = u.getNowString(),
|
|
2168
|
-
ee.update(
|
|
2169
|
-
var ye = ee.digestSync(), G = k.Buffer.from(ye).toString("base64"),
|
|
2170
|
-
|
|
2167
|
+
var B = u.getNowString(), F = k.Buffer.concat([k.Buffer.from(s.pool.getUserPoolName(), "utf8"), k.Buffer.from(s.username, "utf8"), k.Buffer.from(U.SECRET_BLOCK, "base64"), k.Buffer.from(B, "utf8")]), ee = new De.Sha256(P);
|
|
2168
|
+
ee.update(F);
|
|
2169
|
+
var ye = ee.digestSync(), G = k.Buffer.from(ye).toString("base64"), V = {};
|
|
2170
|
+
V.USERNAME = s.username, V.PASSWORD_CLAIM_SECRET_BLOCK = U.SECRET_BLOCK, V.TIMESTAMP = B, V.PASSWORD_CLAIM_SIGNATURE = G, s.deviceKey != null && (V.DEVICE_KEY = s.deviceKey);
|
|
2171
2171
|
var te = function(ce, we) {
|
|
2172
2172
|
return s.client.request("RespondToAuthChallenge", ce, function(re, et) {
|
|
2173
|
-
return re && re.code === "ResourceNotFoundException" && re.message.toLowerCase().indexOf("device") !== -1 ? (
|
|
2173
|
+
return re && re.code === "ResourceNotFoundException" && re.message.toLowerCase().indexOf("device") !== -1 ? (V.DEVICE_KEY = null, s.deviceKey = null, s.randomPassword = null, s.deviceGroupKey = null, s.clearCachedDeviceKeyAndPassword(), te(ce, we)) : we(re, et);
|
|
2174
2174
|
});
|
|
2175
2175
|
}, le = {
|
|
2176
2176
|
ChallengeName: "PASSWORD_VERIFIER",
|
|
2177
2177
|
ClientId: s.pool.getClientId(),
|
|
2178
|
-
ChallengeResponses:
|
|
2179
|
-
Session:
|
|
2178
|
+
ChallengeResponses: V,
|
|
2179
|
+
Session: x.Session,
|
|
2180
2180
|
ClientMetadata: v
|
|
2181
2181
|
};
|
|
2182
2182
|
s.getUserContextData() && (le.UserContextData = s.getUserContextData()), te(le, function(ve, ce) {
|
|
@@ -2233,14 +2233,14 @@ var ss = typeof navigator < "u", hr = ss ? jr.isReactNative ? "react-native" : n
|
|
|
2233
2233
|
i.generateHashDevice(r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, r.AuthenticationResult.NewDeviceMetadata.DeviceKey, function(_) {
|
|
2234
2234
|
if (_)
|
|
2235
2235
|
return s.onFailure(_);
|
|
2236
|
-
var
|
|
2236
|
+
var x = {
|
|
2237
2237
|
Salt: k.Buffer.from(i.getSaltDevices(), "hex").toString("base64"),
|
|
2238
2238
|
PasswordVerifier: k.Buffer.from(i.getVerifierDevices(), "hex").toString("base64")
|
|
2239
2239
|
};
|
|
2240
|
-
o.verifierDevices =
|
|
2240
|
+
o.verifierDevices = x.PasswordVerifier, o.deviceGroupKey = b.DeviceGroupKey, o.randomPassword = i.getRandomPassword(), o.client.request("ConfirmDevice", {
|
|
2241
2241
|
DeviceKey: b.DeviceKey,
|
|
2242
2242
|
AccessToken: o.signInUserSession.getAccessToken().getJwtToken(),
|
|
2243
|
-
DeviceSecretVerifierConfig:
|
|
2243
|
+
DeviceSecretVerifierConfig: x,
|
|
2244
2244
|
DeviceName: hr
|
|
2245
2245
|
}, function(U, T) {
|
|
2246
2246
|
return U ? s.onFailure(U) : (o.deviceKey = r.AuthenticationResult.NewDeviceMetadata.DeviceKey, o.cacheDeviceKeyAndPassword(), T.UserConfirmationNecessary === !0 ? s.onSuccess(o.signInUserSession, T.UserConfirmationNecessary) : s.onSuccess(o.signInUserSession));
|
|
@@ -2278,21 +2278,21 @@ var ss = typeof navigator < "u", hr = ss ? jr.isReactNative ? "react-native" : n
|
|
|
2278
2278
|
s.getUserContextData() && (m.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", m, function(y, v) {
|
|
2279
2279
|
if (y)
|
|
2280
2280
|
return r.onFailure(y);
|
|
2281
|
-
var b = v.ChallengeParameters, _ = new
|
|
2282
|
-
o.getPasswordAuthenticationKey(s.deviceKey, s.randomPassword, _,
|
|
2281
|
+
var b = v.ChallengeParameters, _ = new C(b.SRP_B, 16), x = new C(b.SALT, 16);
|
|
2282
|
+
o.getPasswordAuthenticationKey(s.deviceKey, s.randomPassword, _, x, function(U, T) {
|
|
2283
2283
|
if (U)
|
|
2284
2284
|
return r.onFailure(U);
|
|
2285
|
-
var
|
|
2286
|
-
|
|
2287
|
-
var ee =
|
|
2288
|
-
G.USERNAME = s.username, G.PASSWORD_CLAIM_SECRET_BLOCK = b.SECRET_BLOCK, G.TIMESTAMP =
|
|
2289
|
-
var
|
|
2285
|
+
var P = u.getNowString(), B = k.Buffer.concat([k.Buffer.from(s.deviceGroupKey, "utf8"), k.Buffer.from(s.deviceKey, "utf8"), k.Buffer.from(b.SECRET_BLOCK, "base64"), k.Buffer.from(P, "utf8")]), F = new De.Sha256(T);
|
|
2286
|
+
F.update(B);
|
|
2287
|
+
var ee = F.digestSync(), ye = k.Buffer.from(ee).toString("base64"), G = {};
|
|
2288
|
+
G.USERNAME = s.username, G.PASSWORD_CLAIM_SECRET_BLOCK = b.SECRET_BLOCK, G.TIMESTAMP = P, G.PASSWORD_CLAIM_SIGNATURE = ye, G.DEVICE_KEY = s.deviceKey;
|
|
2289
|
+
var V = {
|
|
2290
2290
|
ChallengeName: "DEVICE_PASSWORD_VERIFIER",
|
|
2291
2291
|
ClientId: s.pool.getClientId(),
|
|
2292
2292
|
ChallengeResponses: G,
|
|
2293
2293
|
Session: v.Session
|
|
2294
2294
|
};
|
|
2295
|
-
s.getUserContextData() && (
|
|
2295
|
+
s.getUserContextData() && (V.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", V, function(te, le) {
|
|
2296
2296
|
return te ? r.onFailure(te) : (s.signInUserSession = s.getCognitoUserSession(le.AuthenticationResult), s.cacheTokens(), r.onSuccess(s.signInUserSession));
|
|
2297
2297
|
});
|
|
2298
2298
|
});
|
|
@@ -2350,14 +2350,14 @@ var ss = typeof navigator < "u", hr = ss ? jr.isReactNative ? "react-native" : n
|
|
|
2350
2350
|
b.generateHashDevice(y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, y.AuthenticationResult.NewDeviceMetadata.DeviceKey, function(_) {
|
|
2351
2351
|
if (_)
|
|
2352
2352
|
return i.onFailure(_);
|
|
2353
|
-
var
|
|
2353
|
+
var x = {
|
|
2354
2354
|
Salt: k.Buffer.from(b.getSaltDevices(), "hex").toString("base64"),
|
|
2355
2355
|
PasswordVerifier: k.Buffer.from(b.getVerifierDevices(), "hex").toString("base64")
|
|
2356
2356
|
};
|
|
2357
|
-
u.verifierDevices =
|
|
2357
|
+
u.verifierDevices = x.PasswordVerifier, u.deviceGroupKey = y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, u.randomPassword = b.getRandomPassword(), u.client.request("ConfirmDevice", {
|
|
2358
2358
|
DeviceKey: y.AuthenticationResult.NewDeviceMetadata.DeviceKey,
|
|
2359
2359
|
AccessToken: u.signInUserSession.getAccessToken().getJwtToken(),
|
|
2360
|
-
DeviceSecretVerifierConfig:
|
|
2360
|
+
DeviceSecretVerifierConfig: x,
|
|
2361
2361
|
DeviceName: hr
|
|
2362
2362
|
}, function(U, T) {
|
|
2363
2363
|
return U ? i.onFailure(U) : (u.deviceKey = y.AuthenticationResult.NewDeviceMetadata.DeviceKey, u.cacheDeviceKeyAndPassword(), T.UserConfirmationNecessary === !0 ? i.onSuccess(u.signInUserSession, T.UserConfirmationNecessary) : i.onSuccess(u.signInUserSession));
|
|
@@ -2445,7 +2445,7 @@ var ss = typeof navigator < "u", hr = ss ? jr.isReactNative ? "react-native" : n
|
|
|
2445
2445
|
var c = {
|
|
2446
2446
|
Name: s.UserAttributes[u].Name,
|
|
2447
2447
|
Value: s.UserAttributes[u].Value
|
|
2448
|
-
}, d = new
|
|
2448
|
+
}, d = new Hr(c);
|
|
2449
2449
|
o.push(d);
|
|
2450
2450
|
}
|
|
2451
2451
|
return r(null, o);
|
|
@@ -2861,13 +2861,13 @@ function us() {
|
|
|
2861
2861
|
return dr || (dr = 1, ot = self.fetch || (self.fetch = fr.default || fr)), ot;
|
|
2862
2862
|
}
|
|
2863
2863
|
us();
|
|
2864
|
-
function
|
|
2864
|
+
function j() {
|
|
2865
2865
|
}
|
|
2866
|
-
|
|
2866
|
+
j.prototype.userAgent = ts();
|
|
2867
2867
|
var ls = function(e) {
|
|
2868
|
-
e && (
|
|
2868
|
+
e && (j.prototype.userAgent && !j.prototype.userAgent.includes(e) && (j.prototype.userAgent = j.prototype.userAgent.concat(" ", e)), (!j.prototype.userAgent || j.prototype.userAgent === "") && (j.prototype.userAgent = e));
|
|
2869
2869
|
}, cs = function(e) {
|
|
2870
|
-
var t =
|
|
2870
|
+
var t = j.category ? " " + j.category : "", r = j.framework ? " framework/" + j.framework : "", i = "" + j.prototype.userAgent + t + r;
|
|
2871
2871
|
return i;
|
|
2872
2872
|
};
|
|
2873
2873
|
function hs(n, e) {
|
|
@@ -2883,7 +2883,7 @@ function At(n) {
|
|
|
2883
2883
|
e.set(r, i);
|
|
2884
2884
|
}
|
|
2885
2885
|
function i() {
|
|
2886
|
-
return fs(r, arguments,
|
|
2886
|
+
return fs(r, arguments, Ct(this).constructor);
|
|
2887
2887
|
}
|
|
2888
2888
|
return i.prototype = Object.create(r.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), Re(i, r);
|
|
2889
2889
|
}, At(n);
|
|
@@ -2917,10 +2917,10 @@ function Re(n, e) {
|
|
|
2917
2917
|
return t.__proto__ = r, t;
|
|
2918
2918
|
}, Re(n, e);
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2921
|
-
return
|
|
2920
|
+
function Ct(n) {
|
|
2921
|
+
return Ct = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
2922
2922
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
2923
|
-
},
|
|
2923
|
+
}, Ct(n);
|
|
2924
2924
|
}
|
|
2925
2925
|
var ps = /* @__PURE__ */ (function(n) {
|
|
2926
2926
|
function e(t, r, i, s) {
|
|
@@ -2993,7 +2993,7 @@ var ps = /* @__PURE__ */ (function(n) {
|
|
|
2993
2993
|
return s(d);
|
|
2994
2994
|
});
|
|
2995
2995
|
}, n;
|
|
2996
|
-
})(),
|
|
2996
|
+
})(), He = {
|
|
2997
2997
|
debug: function() {
|
|
2998
2998
|
}
|
|
2999
2999
|
}, ms = function(e) {
|
|
@@ -3003,11 +3003,11 @@ var ps = /* @__PURE__ */ (function(n) {
|
|
|
3003
3003
|
function Wr(n, e, t, r) {
|
|
3004
3004
|
if (r === void 0 && (r = 1), typeof n != "function")
|
|
3005
3005
|
throw Error("functionToRetry must be a function");
|
|
3006
|
-
return
|
|
3007
|
-
if (
|
|
3008
|
-
throw
|
|
3006
|
+
return He.debug(n.name + " attempt #" + r + " with args: " + JSON.stringify(e)), n.apply(void 0, e).catch(function(i) {
|
|
3007
|
+
if (He.debug("error on " + n.name, i), ms(i))
|
|
3008
|
+
throw He.debug(n.name + " non retryable error", i), i;
|
|
3009
3009
|
var s = t(r, e, i);
|
|
3010
|
-
if (
|
|
3010
|
+
if (He.debug(n.name + " retrying in " + s + " ms"), s !== !1)
|
|
3011
3011
|
return new Promise(function(o) {
|
|
3012
3012
|
return setTimeout(o, s);
|
|
3013
3013
|
}).then(function() {
|
|
@@ -3034,7 +3034,7 @@ var ws = 55, bs = /* @__PURE__ */ (function() {
|
|
|
3034
3034
|
if (s.length > ws || !/^[\w-]+_[0-9a-zA-Z]+$/.test(s))
|
|
3035
3035
|
throw new Error("Invalid UserPoolId format.");
|
|
3036
3036
|
var p = s.split("_")[0];
|
|
3037
|
-
this.userPoolId = s, this.clientId = o, this.client = new gs(p, u, c), this.advancedSecurityDataCollectionFlag = d !== !1, this.storage = t.Storage || new
|
|
3037
|
+
this.userPoolId = s, this.clientId = o, this.client = new gs(p, u, c), this.advancedSecurityDataCollectionFlag = d !== !1, this.storage = t.Storage || new jr().getStorage(), r && (this.wrapRefreshSessionCallback = r);
|
|
3038
3038
|
}
|
|
3039
3039
|
var e = n.prototype;
|
|
3040
3040
|
return e.getUserPoolId = function() {
|
|
@@ -3094,7 +3094,7 @@ var ws = 55, bs = /* @__PURE__ */ (function() {
|
|
|
3094
3094
|
}
|
|
3095
3095
|
}, n;
|
|
3096
3096
|
})();
|
|
3097
|
-
function
|
|
3097
|
+
function je(n) {
|
|
3098
3098
|
for (var e = 1; e < arguments.length; e++) {
|
|
3099
3099
|
var t = arguments[e];
|
|
3100
3100
|
for (var r in t)
|
|
@@ -3113,10 +3113,10 @@ var Ss = {
|
|
|
3113
3113
|
);
|
|
3114
3114
|
}
|
|
3115
3115
|
};
|
|
3116
|
-
function
|
|
3116
|
+
function xt(n, e) {
|
|
3117
3117
|
function t(i, s, o) {
|
|
3118
3118
|
if (!(typeof document > "u")) {
|
|
3119
|
-
o =
|
|
3119
|
+
o = je({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
3120
3120
|
var u = "";
|
|
3121
3121
|
for (var c in o)
|
|
3122
3122
|
o[c] && (u += "; " + c, o[c] !== !0 && (u += "=" + o[c].split(";")[0]));
|
|
@@ -3145,16 +3145,16 @@ function Ct(n, e) {
|
|
|
3145
3145
|
t(
|
|
3146
3146
|
i,
|
|
3147
3147
|
"",
|
|
3148
|
-
|
|
3148
|
+
je({}, s, {
|
|
3149
3149
|
expires: -1
|
|
3150
3150
|
})
|
|
3151
3151
|
);
|
|
3152
3152
|
},
|
|
3153
3153
|
withAttributes: function(i) {
|
|
3154
|
-
return
|
|
3154
|
+
return xt(this.converter, je({}, this.attributes, i));
|
|
3155
3155
|
},
|
|
3156
3156
|
withConverter: function(i) {
|
|
3157
|
-
return
|
|
3157
|
+
return xt(je({}, this.converter, i), this.attributes);
|
|
3158
3158
|
}
|
|
3159
3159
|
},
|
|
3160
3160
|
{
|
|
@@ -3163,7 +3163,7 @@ function Ct(n, e) {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
);
|
|
3165
3165
|
}
|
|
3166
|
-
var Ue =
|
|
3166
|
+
var Ue = xt(Ss, { path: "/" }), _s = /* @__PURE__ */ (function() {
|
|
3167
3167
|
function n(t) {
|
|
3168
3168
|
if (t === void 0 && (t = {}), t.domain && (this.domain = t.domain), t.path ? this.path = t.path : this.path = "/", Object.prototype.hasOwnProperty.call(t, "expires") ? this.expires = t.expires : this.expires = 365, Object.prototype.hasOwnProperty.call(t, "secure") ? this.secure = t.secure : this.secure = !0, Object.prototype.hasOwnProperty.call(t, "sameSite")) {
|
|
3169
3169
|
if (!["strict", "lax", "none"].includes(t.sameSite))
|
|
@@ -3208,7 +3208,7 @@ const As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3208
3208
|
CognitoIdToken: vt,
|
|
3209
3209
|
CognitoRefreshToken: wt,
|
|
3210
3210
|
CognitoUser: _t,
|
|
3211
|
-
CognitoUserAttribute:
|
|
3211
|
+
CognitoUserAttribute: Hr,
|
|
3212
3212
|
CognitoUserPool: bs,
|
|
3213
3213
|
CognitoUserSession: bt,
|
|
3214
3214
|
CookieStorage: _s,
|
|
@@ -3235,14 +3235,14 @@ let Yr = class {
|
|
|
3235
3235
|
return this.cssText;
|
|
3236
3236
|
}
|
|
3237
3237
|
};
|
|
3238
|
-
const
|
|
3238
|
+
const Cs = (n) => new Yr(typeof n == "string" ? n : n + "", void 0, Ot), Y = (n, ...e) => {
|
|
3239
3239
|
const t = n.length === 1 ? n[0] : e.reduce((r, i, s) => r + ((o) => {
|
|
3240
3240
|
if (o._$cssResult$ === !0) return o.cssText;
|
|
3241
3241
|
if (typeof o == "number") return o;
|
|
3242
3242
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
3243
3243
|
})(i) + n[s + 1], n[0]);
|
|
3244
3244
|
return new Yr(t, n, Ot);
|
|
3245
|
-
},
|
|
3245
|
+
}, xs = (n, e) => {
|
|
3246
3246
|
if (Bt) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
3247
3247
|
else for (const t of e) {
|
|
3248
3248
|
const r = document.createElement("style"), i = ze.litNonce;
|
|
@@ -3251,7 +3251,7 @@ const xs = (n) => new Yr(typeof n == "string" ? n : n + "", void 0, Ot), z = (n,
|
|
|
3251
3251
|
}, gr = Bt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
|
|
3252
3252
|
let t = "";
|
|
3253
3253
|
for (const r of e.cssRules) t += r.cssText;
|
|
3254
|
-
return
|
|
3254
|
+
return Cs(t);
|
|
3255
3255
|
})(n) : n;
|
|
3256
3256
|
const { is: Es, defineProperty: Us, getOwnPropertyDescriptor: Ts, getOwnPropertyNames: Is, getOwnPropertySymbols: Ds, getPrototypeOf: ks } = Object, Je = globalThis, mr = Je.trustedTypes, $s = mr ? mr.emptyScript : "", Rs = Je.reactiveElementPolyfillSupport, ke = (n, e) => n, Et = { toAttribute(n, e) {
|
|
3257
3257
|
switch (e) {
|
|
@@ -3364,7 +3364,7 @@ let fe = class extends HTMLElement {
|
|
|
3364
3364
|
}
|
|
3365
3365
|
createRenderRoot() {
|
|
3366
3366
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
3367
|
-
return
|
|
3367
|
+
return xs(e, this.constructor.elementStyles), e;
|
|
3368
3368
|
}
|
|
3369
3369
|
connectedCallback() {
|
|
3370
3370
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
|
|
@@ -3465,9 +3465,9 @@ let fe = class extends HTMLElement {
|
|
|
3465
3465
|
}
|
|
3466
3466
|
};
|
|
3467
3467
|
fe.elementStyles = [], fe.shadowRootOptions = { mode: "open" }, fe[ke("elementProperties")] = /* @__PURE__ */ new Map(), fe[ke("finalized")] = /* @__PURE__ */ new Map(), Rs?.({ ReactiveElement: fe }), (Je.reactiveElementVersions ??= []).push("2.1.2");
|
|
3468
|
-
const Mt = globalThis, vr = (n) => n, Ye = Mt.trustedTypes, wr = Ye ? Ye.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Jr = "$lit$", X = `lit$${Math.random().toFixed(9).slice(2)}$`, Zr = "?" + X,
|
|
3468
|
+
const Mt = globalThis, vr = (n) => n, Ye = Mt.trustedTypes, wr = Ye ? Ye.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Jr = "$lit$", X = `lit$${Math.random().toFixed(9).slice(2)}$`, Zr = "?" + X, Ps = `<${Zr}>`, ue = document, Pe = () => ue.createComment(""), Fe = (n) => n === null || typeof n != "object" && typeof n != "function", Nt = Array.isArray, Fs = (n) => Nt(n) || typeof n?.[Symbol.iterator] == "function", at = `[
|
|
3469
3469
|
\f\r]`, Te = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, br = /-->/g, Sr = />/g, ie = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
|
3470
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), _r = /'/g, Ar = /"/g, Xr = /^(?:script|style|textarea|title)$/i, Bs = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), A = Bs(1), de = /* @__PURE__ */ Symbol.for("lit-noChange"), E = /* @__PURE__ */ Symbol.for("lit-nothing"),
|
|
3470
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), _r = /'/g, Ar = /"/g, Xr = /^(?:script|style|textarea|title)$/i, Bs = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), A = Bs(1), de = /* @__PURE__ */ Symbol.for("lit-noChange"), E = /* @__PURE__ */ Symbol.for("lit-nothing"), Cr = /* @__PURE__ */ new WeakMap(), oe = ue.createTreeWalker(ue, 129);
|
|
3471
3471
|
function Qr(n, e) {
|
|
3472
3472
|
if (!Nt(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
3473
3473
|
return wr !== void 0 ? wr.createHTML(e) : e;
|
|
@@ -3480,7 +3480,7 @@ const Os = (n, e) => {
|
|
|
3480
3480
|
let d, p, m = -1, y = 0;
|
|
3481
3481
|
for (; y < c.length && (o.lastIndex = y, p = o.exec(c), p !== null); ) y = o.lastIndex, o === Te ? p[1] === "!--" ? o = br : p[1] !== void 0 ? o = Sr : p[2] !== void 0 ? (Xr.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = ie) : p[3] !== void 0 && (o = ie) : o === ie ? p[0] === ">" ? (o = i ?? Te, m = -1) : p[1] === void 0 ? m = -2 : (m = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? ie : p[3] === '"' ? Ar : _r) : o === Ar || o === _r ? o = ie : o === br || o === Sr ? o = Te : (o = ie, i = void 0);
|
|
3482
3482
|
const v = o === ie && n[u + 1].startsWith("/>") ? " " : "";
|
|
3483
|
-
s += o === Te ? c +
|
|
3483
|
+
s += o === Te ? c + Ps : m >= 0 ? (r.push(d), c.slice(0, m) + Jr + c.slice(m) + X + v) : c + X + (m === -2 ? u : v);
|
|
3484
3484
|
}
|
|
3485
3485
|
return [Qr(n, s + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
|
|
3486
3486
|
};
|
|
@@ -3504,8 +3504,8 @@ class Be {
|
|
|
3504
3504
|
const m = i.textContent.split(X), y = m.length - 1;
|
|
3505
3505
|
if (y > 0) {
|
|
3506
3506
|
i.textContent = Ye ? Ye.emptyScript : "";
|
|
3507
|
-
for (let v = 0; v < y; v++) i.append(m[v],
|
|
3508
|
-
i.append(m[y],
|
|
3507
|
+
for (let v = 0; v < y; v++) i.append(m[v], Pe()), oe.nextNode(), c.push({ type: 2, index: ++s });
|
|
3508
|
+
i.append(m[y], Pe());
|
|
3509
3509
|
}
|
|
3510
3510
|
}
|
|
3511
3511
|
} else if (i.nodeType === 8) if (i.data === Zr) c.push({ type: 2, index: s });
|
|
@@ -3524,7 +3524,7 @@ class Be {
|
|
|
3524
3524
|
function pe(n, e, t = n, r) {
|
|
3525
3525
|
if (e === de) return e;
|
|
3526
3526
|
let i = r !== void 0 ? t._$Co?.[r] : t._$Cl;
|
|
3527
|
-
const s =
|
|
3527
|
+
const s = Fe(e) ? void 0 : e._$litDirective$;
|
|
3528
3528
|
return i?.constructor !== s && (i?._$AO?.(!1), s === void 0 ? i = void 0 : (i = new s(n), i._$AT(n, t, r)), r !== void 0 ? (t._$Co ??= [])[r] = i : t._$Cl = i), i !== void 0 && (e = pe(n, i._$AS(n, e.values), i, r)), e;
|
|
3529
3529
|
}
|
|
3530
3530
|
class Ms {
|
|
@@ -3574,7 +3574,7 @@ class Oe {
|
|
|
3574
3574
|
return this._$AB;
|
|
3575
3575
|
}
|
|
3576
3576
|
_$AI(e, t = this) {
|
|
3577
|
-
e = pe(this, e, t),
|
|
3577
|
+
e = pe(this, e, t), Fe(e) ? e === E || e == null || e === "" ? (this._$AH !== E && this._$AR(), this._$AH = E) : e !== this._$AH && e !== de && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Fs(e) ? this.k(e) : this._(e);
|
|
3578
3578
|
}
|
|
3579
3579
|
O(e) {
|
|
3580
3580
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -3583,7 +3583,7 @@ class Oe {
|
|
|
3583
3583
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
3584
3584
|
}
|
|
3585
3585
|
_(e) {
|
|
3586
|
-
this._$AH !== E &&
|
|
3586
|
+
this._$AH !== E && Fe(this._$AH) ? this._$AA.nextSibling.data = e : this.T(ue.createTextNode(e)), this._$AH = e;
|
|
3587
3587
|
}
|
|
3588
3588
|
$(e) {
|
|
3589
3589
|
const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = Be.createElement(Qr(r.h, r.h[0]), this.options)), r);
|
|
@@ -3594,14 +3594,14 @@ class Oe {
|
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
3596
|
_$AC(e) {
|
|
3597
|
-
let t =
|
|
3598
|
-
return t === void 0 &&
|
|
3597
|
+
let t = Cr.get(e.strings);
|
|
3598
|
+
return t === void 0 && Cr.set(e.strings, t = new Be(e)), t;
|
|
3599
3599
|
}
|
|
3600
3600
|
k(e) {
|
|
3601
3601
|
Nt(this._$AH) || (this._$AH = [], this._$AR());
|
|
3602
3602
|
const t = this._$AH;
|
|
3603
3603
|
let r, i = 0;
|
|
3604
|
-
for (const s of e) i === t.length ? t.push(r = new Oe(this.O(
|
|
3604
|
+
for (const s of e) i === t.length ? t.push(r = new Oe(this.O(Pe()), this.O(Pe()), this, this.options)) : r = t[i], r._$AI(s), i++;
|
|
3605
3605
|
i < t.length && (this._$AR(r && r._$AB.nextSibling, i), t.length = i);
|
|
3606
3606
|
}
|
|
3607
3607
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
@@ -3627,11 +3627,11 @@ class Ze {
|
|
|
3627
3627
|
_$AI(e, t = this, r, i) {
|
|
3628
3628
|
const s = this.strings;
|
|
3629
3629
|
let o = !1;
|
|
3630
|
-
if (s === void 0) e = pe(this, e, t, 0), o = !
|
|
3630
|
+
if (s === void 0) e = pe(this, e, t, 0), o = !Fe(e) || e !== this._$AH && e !== de, o && (this._$AH = e);
|
|
3631
3631
|
else {
|
|
3632
3632
|
const u = e;
|
|
3633
3633
|
let c, d;
|
|
3634
|
-
for (e = s[0], c = 0; c < s.length - 1; c++) d = pe(this, u[r + c], t, c), d === de && (d = this._$AH[c]), o ||= !
|
|
3634
|
+
for (e = s[0], c = 0; c < s.length - 1; c++) d = pe(this, u[r + c], t, c), d === de && (d = this._$AH[c]), o ||= !Fe(d) || d !== this._$AH[c], d === E ? e = E : e !== E && (e += (d ?? "") + s[c + 1]), this._$AH[c] = d;
|
|
3635
3635
|
}
|
|
3636
3636
|
o && !i && this.j(e);
|
|
3637
3637
|
}
|
|
@@ -3679,14 +3679,14 @@ class Ks {
|
|
|
3679
3679
|
pe(this, e);
|
|
3680
3680
|
}
|
|
3681
3681
|
}
|
|
3682
|
-
const
|
|
3683
|
-
|
|
3684
|
-
const
|
|
3682
|
+
const Vs = Mt.litHtmlPolyfillSupport;
|
|
3683
|
+
Vs?.(Be, Oe), (Mt.litHtmlVersions ??= []).push("3.3.3");
|
|
3684
|
+
const Hs = (n, e, t) => {
|
|
3685
3685
|
const r = t?.renderBefore ?? e;
|
|
3686
3686
|
let i = r._$litPart$;
|
|
3687
3687
|
if (i === void 0) {
|
|
3688
3688
|
const s = t?.renderBefore ?? null;
|
|
3689
|
-
r._$litPart$ = i = new Oe(e.insertBefore(
|
|
3689
|
+
r._$litPart$ = i = new Oe(e.insertBefore(Pe(), s), s, void 0, t ?? {});
|
|
3690
3690
|
}
|
|
3691
3691
|
return i._$AI(n), i;
|
|
3692
3692
|
};
|
|
@@ -3701,7 +3701,7 @@ class ae extends fe {
|
|
|
3701
3701
|
}
|
|
3702
3702
|
update(e) {
|
|
3703
3703
|
const t = this.render();
|
|
3704
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
3704
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Hs(t, this.renderRoot, this.renderOptions);
|
|
3705
3705
|
}
|
|
3706
3706
|
connectedCallback() {
|
|
3707
3707
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -3714,10 +3714,10 @@ class ae extends fe {
|
|
|
3714
3714
|
}
|
|
3715
3715
|
}
|
|
3716
3716
|
ae._$litElement$ = !0, ae.finalized = !0, Lt.litElementHydrateSupport?.({ LitElement: ae });
|
|
3717
|
-
const
|
|
3718
|
-
|
|
3717
|
+
const js = Lt.litElementPolyfillSupport;
|
|
3718
|
+
js?.({ LitElement: ae });
|
|
3719
3719
|
(Lt.litElementVersions ??= []).push("4.2.2");
|
|
3720
|
-
const
|
|
3720
|
+
const xr = (n) => n ?? E, zs = Y`
|
|
3721
3721
|
:host {
|
|
3722
3722
|
display: block;
|
|
3723
3723
|
box-sizing: border-box;
|
|
@@ -3741,7 +3741,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
3741
3741
|
position: absolute; width: 1px; height: 1px; overflow: hidden;
|
|
3742
3742
|
clip: rect(0 0 0 0); white-space: nowrap;
|
|
3743
3743
|
}
|
|
3744
|
-
`, Ws =
|
|
3744
|
+
`, Ws = Y`
|
|
3745
3745
|
@keyframes pop-in {
|
|
3746
3746
|
0% { opacity: 0; transform: translateY(16px) scale(0.95); }
|
|
3747
3747
|
100% { opacity: 1; transform: translateY(0) scale(1); }
|
|
@@ -3754,7 +3754,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
3754
3754
|
0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
|
|
3755
3755
|
30% { transform: translateY(-5px); opacity: 1; }
|
|
3756
3756
|
}
|
|
3757
|
-
.msg, .options, .form-card, .confirm-card
|
|
3757
|
+
.msg, .options, .form-card, .confirm-card {
|
|
3758
3758
|
animation: pop-in 340ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
|
|
3759
3759
|
}
|
|
3760
3760
|
.chip { animation: chip-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
|
|
@@ -3768,11 +3768,11 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
3768
3768
|
.typing span:nth-child(2) { animation-delay: 0.15s; }
|
|
3769
3769
|
.typing span:nth-child(3) { animation-delay: 0.3s; }
|
|
3770
3770
|
@media (prefers-reduced-motion: reduce) {
|
|
3771
|
-
.msg, .options, .form-card, .confirm-card, .
|
|
3771
|
+
.msg, .options, .form-card, .confirm-card, .chip, .typing span {
|
|
3772
3772
|
animation: none !important;
|
|
3773
3773
|
}
|
|
3774
3774
|
}
|
|
3775
|
-
`, Ys =
|
|
3775
|
+
`, Ys = Y`
|
|
3776
3776
|
.msg { max-width: 85%; padding: 12px 16px; border-radius: 14px; font-size: 15px; }
|
|
3777
3777
|
.msg.bot {
|
|
3778
3778
|
background: var(--wral-semantic-surface-default, #FFFFFF);
|
|
@@ -3794,7 +3794,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
3794
3794
|
.msg .sub { display: block; font-size: 13px; color: var(--wral-semantic-fg-muted, #64748B); margin-top: 4px; }
|
|
3795
3795
|
.msg.user .sub { color: rgba(255, 255, 255, 0.75); }
|
|
3796
3796
|
.msg.error { border-left: 3px solid var(--wral-base-red-on-light, #D1232A); }
|
|
3797
|
-
`, Gs =
|
|
3797
|
+
`, Gs = Y`
|
|
3798
3798
|
.options { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 92%; padding: 2px 0 6px; }
|
|
3799
3799
|
.chip {
|
|
3800
3800
|
font-family: var(--wral-base-font-ui, 'IBM Plex Sans Condensed', sans-serif);
|
|
@@ -3808,7 +3808,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
3808
3808
|
.chip:hover { background: var(--wral-base-secondary-1, #2594E3); color: #FFFFFF; }
|
|
3809
3809
|
.chip:focus-visible { outline: 2px solid var(--wral-base-secondary-1, #2594E3); outline-offset: 2px; }
|
|
3810
3810
|
.chip:active { transform: scale(0.97); }
|
|
3811
|
-
`, Js =
|
|
3811
|
+
`, Js = Y`
|
|
3812
3812
|
.form-card {
|
|
3813
3813
|
align-self: stretch;
|
|
3814
3814
|
background: var(--wral-semantic-surface-default, #FFFFFF);
|
|
@@ -3873,7 +3873,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
3873
3873
|
.btn-ghost:hover { border-color: var(--wral-base-secondary-1, #2594E3); }
|
|
3874
3874
|
.btn-ghost:active { transform: scale(0.97); }
|
|
3875
3875
|
.btn-ghost:focus-visible { outline: 2px solid var(--wral-base-secondary-1, #2594E3); outline-offset: 2px; }
|
|
3876
|
-
`, Zs =
|
|
3876
|
+
`, Zs = Y`
|
|
3877
3877
|
.login-card { padding: 28px 26px; }
|
|
3878
3878
|
.login-card h2 {
|
|
3879
3879
|
font-family: var(--wral-base-font-display, 'IBM Plex Sans Condensed', sans-serif);
|
|
@@ -3960,7 +3960,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
3960
3960
|
.anon-costs .x { flex-shrink: 0; font-weight: 700; color: var(--wral-base-red-on-light, #D1232A); }
|
|
3961
3961
|
.anon-actions { display: flex; flex-direction: column; gap: 10px; }
|
|
3962
3962
|
.anon-actions .btn-ghost { width: 100%; }
|
|
3963
|
-
`, Xs =
|
|
3963
|
+
`, Xs = Y`
|
|
3964
3964
|
.review-list { margin: 0; padding: 0; list-style: none; font-size: 14px; }
|
|
3965
3965
|
.review-list li {
|
|
3966
3966
|
display: grid; grid-template-columns: 130px 1fr; gap: 10px;
|
|
@@ -3992,7 +3992,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
3992
3992
|
color: var(--wral-base-primary-1, #001D68);
|
|
3993
3993
|
}
|
|
3994
3994
|
@media (max-width: 540px) { .review-list li { grid-template-columns: 1fr; gap: 2px; } }
|
|
3995
|
-
`, Qs =
|
|
3995
|
+
`, Qs = Y`
|
|
3996
3996
|
.upload-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; }
|
|
3997
3997
|
.upload-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
3998
3998
|
.upload-row .state { font-size: 12px; color: var(--wral-semantic-fg-subtle, #64748B); }
|
|
@@ -4008,7 +4008,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
4008
4008
|
border-radius: 999px; padding: 3px 12px; cursor: pointer;
|
|
4009
4009
|
}
|
|
4010
4010
|
.retry-chip:focus-visible { outline: 2px solid var(--wral-base-secondary-1, #2594E3); outline-offset: 2px; }
|
|
4011
|
-
`, eo =
|
|
4011
|
+
`, eo = Y`
|
|
4012
4012
|
.confirm-card {
|
|
4013
4013
|
align-self: stretch;
|
|
4014
4014
|
background: var(--wral-base-primary-1, #001D68);
|
|
@@ -4074,48 +4074,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
4074
4074
|
color: var(--wral-base-primary-1, #001D68);
|
|
4075
4075
|
}
|
|
4076
4076
|
.facts-offer .actions { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
4077
|
-
`, to =
|
|
4078
|
-
.journey {
|
|
4079
|
-
align-self: stretch;
|
|
4080
|
-
background: var(--wral-semantic-surface-default, #FFFFFF);
|
|
4081
|
-
border: 1px solid var(--wral-semantic-border-muted, #E2E8F0);
|
|
4082
|
-
border-radius: 12px; padding: 20px 22px;
|
|
4083
|
-
box-shadow: 0 1px 2px rgba(3, 7, 17, 0.07), 0 6px 16px rgba(3, 7, 17, 0.05);
|
|
4084
|
-
}
|
|
4085
|
-
.j-eyebrow {
|
|
4086
|
-
font-family: var(--wral-base-font-ui, 'IBM Plex Sans Condensed', sans-serif);
|
|
4087
|
-
font-size: 12px; font-weight: 700; text-transform: uppercase;
|
|
4088
|
-
letter-spacing: 0.08em;
|
|
4089
|
-
color: var(--wral-base-red-on-light, #D1232A);
|
|
4090
|
-
margin-bottom: 2px;
|
|
4091
|
-
}
|
|
4092
|
-
.j-title {
|
|
4093
|
-
font-family: var(--wral-base-font-display, 'IBM Plex Sans Condensed', sans-serif);
|
|
4094
|
-
font-size: 18px; font-weight: 700;
|
|
4095
|
-
color: var(--wral-base-primary-1, #001D68); margin: 0 0 10px;
|
|
4096
|
-
}
|
|
4097
|
-
.j-step { position: relative; display: flex; gap: 12px; padding: 9px 0; }
|
|
4098
|
-
.j-step:not(:last-child)::before {
|
|
4099
|
-
content: ''; position: absolute; left: 12px; top: 38px; bottom: -6px;
|
|
4100
|
-
width: 1.5px; background: var(--wral-semantic-border-default, #CBD5E1);
|
|
4101
|
-
}
|
|
4102
|
-
.j-dot {
|
|
4103
|
-
flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
|
|
4104
|
-
background: var(--wral-semantic-surface-sunken, #F1F5F9);
|
|
4105
|
-
border: 1.5px solid var(--wral-base-secondary-1, #2594E3);
|
|
4106
|
-
color: var(--wral-base-primary-1, #001D68);
|
|
4107
|
-
font-family: var(--wral-base-font-mono, 'IBM Plex Mono', monospace);
|
|
4108
|
-
font-size: 11px;
|
|
4109
|
-
display: flex; align-items: center; justify-content: center;
|
|
4110
|
-
position: relative; z-index: 1;
|
|
4111
|
-
}
|
|
4112
|
-
.j-body .j-t {
|
|
4113
|
-
font-family: var(--wral-base-font-ui, 'IBM Plex Sans Condensed', sans-serif);
|
|
4114
|
-
font-size: 14.5px; font-weight: 700;
|
|
4115
|
-
color: var(--wral-base-primary-1, #001D68); margin-bottom: 2px;
|
|
4116
|
-
}
|
|
4117
|
-
.j-body .j-d { font-size: 13.5px; color: var(--wral-semantic-fg-muted, #475569); line-height: 1.55; }
|
|
4118
|
-
`, ro = z`
|
|
4077
|
+
`, to = Y`
|
|
4119
4078
|
.bottom-bar {
|
|
4120
4079
|
position: sticky; bottom: 0; z-index: 20;
|
|
4121
4080
|
background: var(--wral-semantic-surface-default, #FFFFFF);
|
|
@@ -4128,7 +4087,7 @@ const Cr = (n) => n ?? E, zs = z`
|
|
|
4128
4087
|
}
|
|
4129
4088
|
.bottom-bar .note { margin-left: auto; font-size: 12px; color: var(--wral-semantic-fg-subtle, #64748B); }
|
|
4130
4089
|
@media (max-width: 540px) { .bottom-bar .note { display: none; } }
|
|
4131
|
-
`,
|
|
4090
|
+
`, ro = [zs, Ws, Ys, Gs, Js, Zs, Xs, Qs, eo, to];
|
|
4132
4091
|
function M(n, e, { noAnim: t = !1, error: r = !1 } = {}) {
|
|
4133
4092
|
return A`
|
|
4134
4093
|
<div class="msg bot ${t ? "no-anim" : ""} ${r ? "error" : ""}">
|
|
@@ -4143,17 +4102,17 @@ function Z(n, { noAnim: e = !1 } = {}) {
|
|
|
4143
4102
|
function ut() {
|
|
4144
4103
|
return A`<div class="msg bot typing"><span></span><span></span><span></span></div>`;
|
|
4145
4104
|
}
|
|
4146
|
-
function
|
|
4105
|
+
function no(n) {
|
|
4147
4106
|
return n ? A`<span class="flag-pill ${n}">${n === "urgent" ? "Urgent" : "Moderate"}</span>` : E;
|
|
4148
4107
|
}
|
|
4149
|
-
function
|
|
4108
|
+
function io() {
|
|
4150
4109
|
return A`
|
|
4151
4110
|
<svg viewBox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="3"
|
|
4152
4111
|
stroke-linecap="round" stroke-linejoin="round" width="20" height="20"
|
|
4153
4112
|
aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
|
|
4154
4113
|
`;
|
|
4155
4114
|
}
|
|
4156
|
-
function
|
|
4115
|
+
function so() {
|
|
4157
4116
|
return A`
|
|
4158
4117
|
<svg class="my-wral-icon" aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 423 423">
|
|
4159
4118
|
<rect x="7.4" y="7.4" width="408.21" height="408.21" rx="204.1" ry="204.1" transform="translate(-46.49 60.15) rotate(-14.6)" fill="#fff"/>
|
|
@@ -4164,7 +4123,7 @@ function oo() {
|
|
|
4164
4123
|
</svg>
|
|
4165
4124
|
`;
|
|
4166
4125
|
}
|
|
4167
|
-
const
|
|
4126
|
+
const oo = (n = {}) => ({
|
|
4168
4127
|
userPoolId: n.userPoolId || "us-east-1_5Hz6i23GR",
|
|
4169
4128
|
clientId: n.clientId || "835efrp61536otaeun4ob6iqn",
|
|
4170
4129
|
region: n.region || "us-east-1",
|
|
@@ -4182,7 +4141,7 @@ const ao = (n = {}) => ({
|
|
|
4182
4141
|
} catch {
|
|
4183
4142
|
return null;
|
|
4184
4143
|
}
|
|
4185
|
-
},
|
|
4144
|
+
}, ao = () => {
|
|
4186
4145
|
const n = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789", e = "!@#$%^&*";
|
|
4187
4146
|
return [...Array(12)].map(() => n.charAt(Math.floor(Math.random() * n.length))).join("") + "Aa1" + e.charAt(Math.floor(Math.random() * e.length));
|
|
4188
4147
|
}, en = (n) => new AmazonCognitoIdentity.CognitoUserPool({
|
|
@@ -4204,7 +4163,7 @@ const ao = (n = {}) => ({
|
|
|
4204
4163
|
n.set(L.idToken, e.idToken), n.set(L.accessToken, e.accessToken), n.set(L.refreshToken, e.refreshToken);
|
|
4205
4164
|
const r = t(e.idToken), i = r?.exp ? (r.exp * 1e3).toString() : (Date.now() + 3600 * 1e3).toString();
|
|
4206
4165
|
n.set(L.idTokenExpiry, i), n.set(L.userEmail, r?.email || ""), n.set(L.userId, r?.sub || "");
|
|
4207
|
-
},
|
|
4166
|
+
}, uo = (n, e, t) => new Promise((r) => {
|
|
4208
4167
|
const i = t();
|
|
4209
4168
|
e.signUp(
|
|
4210
4169
|
n,
|
|
@@ -4219,9 +4178,9 @@ const ao = (n = {}) => ({
|
|
|
4219
4178
|
r({ exists: !1, result: o });
|
|
4220
4179
|
}
|
|
4221
4180
|
);
|
|
4222
|
-
}),
|
|
4181
|
+
}), lo = async (n, e, t, r, i, s, o, u, c) => {
|
|
4223
4182
|
const d = e.toLowerCase().trim(), p = r(n);
|
|
4224
|
-
await i(d, p,
|
|
4183
|
+
await i(d, p, ao);
|
|
4225
4184
|
const m = s(d, p);
|
|
4226
4185
|
return m.setAuthenticationFlowType("CUSTOM_AUTH"), new Promise((y, v) => {
|
|
4227
4186
|
m.initiateAuth(new AmazonCognitoIdentity.AuthenticationDetails({
|
|
@@ -4239,7 +4198,7 @@ const ao = (n = {}) => ({
|
|
|
4239
4198
|
}
|
|
4240
4199
|
});
|
|
4241
4200
|
});
|
|
4242
|
-
},
|
|
4201
|
+
}, co = (n, e, t, r, i, s) => new Promise((o, u) => {
|
|
4243
4202
|
n.sendCustomChallengeAnswer(e, {
|
|
4244
4203
|
onSuccess: (c) => {
|
|
4245
4204
|
const d = r(c);
|
|
@@ -4248,7 +4207,7 @@ const ao = (n = {}) => ({
|
|
|
4248
4207
|
onFailure: u,
|
|
4249
4208
|
customChallenge: () => u(new Error("Invalid code"))
|
|
4250
4209
|
});
|
|
4251
|
-
}),
|
|
4210
|
+
}), ho = async (n, e, t, r, i, s, o) => {
|
|
4252
4211
|
const u = e.get(L.refreshToken);
|
|
4253
4212
|
if (!u) return null;
|
|
4254
4213
|
const c = e.get(L.userEmail);
|
|
@@ -4267,11 +4226,11 @@ const ao = (n = {}) => ({
|
|
|
4267
4226
|
};
|
|
4268
4227
|
let lt = null, Er = null;
|
|
4269
4228
|
function qt() {
|
|
4270
|
-
return lt || (lt =
|
|
4229
|
+
return lt || (lt = oo(window.authConfig || {}), Er = rn()), { config: lt, storage: Er };
|
|
4271
4230
|
}
|
|
4272
4231
|
async function Dt() {
|
|
4273
4232
|
const { config: n, storage: e } = qt();
|
|
4274
|
-
return
|
|
4233
|
+
return ho(
|
|
4275
4234
|
n,
|
|
4276
4235
|
e,
|
|
4277
4236
|
en,
|
|
@@ -4281,18 +4240,18 @@ async function Dt() {
|
|
|
4281
4240
|
Ut
|
|
4282
4241
|
);
|
|
4283
4242
|
}
|
|
4284
|
-
async function
|
|
4243
|
+
async function fo() {
|
|
4285
4244
|
const { storage: n } = qt(), e = n.get(L.accessToken), t = n.get(L.idTokenExpiry);
|
|
4286
4245
|
return e && t && Date.now() < Number(t) ? !0 : !!await Dt();
|
|
4287
4246
|
}
|
|
4288
|
-
const
|
|
4247
|
+
const po = 15e3;
|
|
4289
4248
|
class he extends Error {
|
|
4290
4249
|
constructor(e, t) {
|
|
4291
4250
|
super(`api-forms request failed with status ${e}`), this.status = e, this.body = t;
|
|
4292
4251
|
}
|
|
4293
4252
|
}
|
|
4294
4253
|
const Ur = Object.freeze({ enabled: !1, humanCheck: null });
|
|
4295
|
-
function
|
|
4254
|
+
function go({
|
|
4296
4255
|
baseUrl: n,
|
|
4297
4256
|
fetchFn: e = (...i) => fetch(...i),
|
|
4298
4257
|
xhrFactory: t = () => new XMLHttpRequest(),
|
|
@@ -4311,8 +4270,8 @@ function mo({
|
|
|
4311
4270
|
...y ? { signal: AbortSignal.timeout(y) } : {},
|
|
4312
4271
|
...p !== void 0 ? { body: JSON.stringify(p) } : {}
|
|
4313
4272
|
});
|
|
4314
|
-
} catch (
|
|
4315
|
-
throw Object.assign(new he(0, null), { cause:
|
|
4273
|
+
} catch (x) {
|
|
4274
|
+
throw Object.assign(new he(0, null), { cause: x });
|
|
4316
4275
|
}
|
|
4317
4276
|
let _ = null;
|
|
4318
4277
|
try {
|
|
@@ -4326,7 +4285,7 @@ function mo({
|
|
|
4326
4285
|
return {
|
|
4327
4286
|
/** @returns {Promise<Array>} published form documents */
|
|
4328
4287
|
listForms: async () => {
|
|
4329
|
-
const c = await u("/v1/forms", { timeoutMs:
|
|
4288
|
+
const c = await u("/v1/forms", { timeoutMs: po });
|
|
4330
4289
|
return s = c?.anonymous?.enabled === !0 ? { enabled: !0, humanCheck: c.anonymous.humanCheck || null } : Ur, (c?.forms || []).filter((d) => d?.formId && d?.start && Array.isArray(d?.nodes));
|
|
4331
4290
|
},
|
|
4332
4291
|
/**
|
|
@@ -4366,8 +4325,8 @@ function mo({
|
|
|
4366
4325
|
} }) => {
|
|
4367
4326
|
const y = t();
|
|
4368
4327
|
return { promise: new Promise((b, _) => {
|
|
4369
|
-
y.open("PUT", c), y.setRequestHeader("Content-Type", p || d.type), y.upload && (y.upload.onprogress = (
|
|
4370
|
-
m({ loaded:
|
|
4328
|
+
y.open("PUT", c), y.setRequestHeader("Content-Type", p || d.type), y.upload && (y.upload.onprogress = (x) => {
|
|
4329
|
+
m({ loaded: x.loaded, total: x.total || d.size });
|
|
4371
4330
|
}), y.onload = () => {
|
|
4372
4331
|
y.status >= 200 && y.status < 300 ? b({ status: y.status }) : _(new he(y.status, null));
|
|
4373
4332
|
}, y.onerror = () => _(new he(0, null)), y.onabort = () => _(new he(0, { aborted: !0 })), y.send(d);
|
|
@@ -4378,7 +4337,7 @@ function mo({
|
|
|
4378
4337
|
};
|
|
4379
4338
|
}
|
|
4380
4339
|
const Tr = 60 * 1e3;
|
|
4381
|
-
async function
|
|
4340
|
+
async function mo({ read: n, refresh: e, now: t = Date.now }) {
|
|
4382
4341
|
const r = (s) => {
|
|
4383
4342
|
const { token: o, expiry: u } = n() || {};
|
|
4384
4343
|
return o && Number(u) - s > t() ? o : null;
|
|
@@ -4396,7 +4355,7 @@ async function yo({ read: n, refresh: e, now: t = Date.now }) {
|
|
|
4396
4355
|
return { Authorization: `Bearer ${i}` };
|
|
4397
4356
|
}
|
|
4398
4357
|
const Ir = (n) => String(n || "").toLowerCase().trim();
|
|
4399
|
-
function
|
|
4358
|
+
function yo(n) {
|
|
4400
4359
|
const e = /* @__PURE__ */ new Set();
|
|
4401
4360
|
return {
|
|
4402
4361
|
signUpIfNeeded: async (t, ...r) => {
|
|
@@ -4406,8 +4365,8 @@ function vo(n) {
|
|
|
4406
4365
|
isNewAccount: (t) => e.has(Ir(t))
|
|
4407
4366
|
};
|
|
4408
4367
|
}
|
|
4409
|
-
const
|
|
4410
|
-
function
|
|
4368
|
+
const vo = "wral_user_facts", wo = "1", bo = 100;
|
|
4369
|
+
function So(n, e) {
|
|
4411
4370
|
let t = "";
|
|
4412
4371
|
for (const r of n) {
|
|
4413
4372
|
if (t.length + r.length > e) break;
|
|
@@ -4415,14 +4374,14 @@ function _o(n, e) {
|
|
|
4415
4374
|
}
|
|
4416
4375
|
return t;
|
|
4417
4376
|
}
|
|
4418
|
-
const
|
|
4377
|
+
const _o = [
|
|
4419
4378
|
{
|
|
4420
4379
|
autocomplete: "name",
|
|
4421
4380
|
factName: "preferred_name",
|
|
4422
4381
|
label: "Name",
|
|
4423
4382
|
shape: (n) => {
|
|
4424
4383
|
const e = String(n ?? "").replace(/\s+/g, " ").trim();
|
|
4425
|
-
return e ?
|
|
4384
|
+
return e ? So(e, bo).trim() : null;
|
|
4426
4385
|
}
|
|
4427
4386
|
},
|
|
4428
4387
|
{
|
|
@@ -4432,9 +4391,9 @@ const Ao = [
|
|
|
4432
4391
|
shape: (n) => String(n ?? "").trim().match(/^(\d{5})(-\d{4})?$/)?.[1] ?? null
|
|
4433
4392
|
}
|
|
4434
4393
|
];
|
|
4435
|
-
function
|
|
4394
|
+
function Ao(n = [], e = {}) {
|
|
4436
4395
|
const t = [];
|
|
4437
|
-
for (const r of
|
|
4396
|
+
for (const r of _o) {
|
|
4438
4397
|
const i = n.find((s) => s?.kind === "text" && s.autocomplete === r.autocomplete && r.shape(e[s.key]) !== null);
|
|
4439
4398
|
i && t.push({ factName: r.factName, label: r.label, value: r.shape(e[i.key]) });
|
|
4440
4399
|
}
|
|
@@ -4455,7 +4414,7 @@ async function Co(n, {
|
|
|
4455
4414
|
let p;
|
|
4456
4415
|
try {
|
|
4457
4416
|
p = await r(
|
|
4458
|
-
`${s}/user/${encodeURIComponent(u)}/${
|
|
4417
|
+
`${s}/user/${encodeURIComponent(u)}/${wo}`,
|
|
4459
4418
|
{ method: "PUT", headers: d, body: JSON.stringify({ value: c }) }
|
|
4460
4419
|
);
|
|
4461
4420
|
} catch (m) {
|
|
@@ -4472,10 +4431,10 @@ async function Co(n, {
|
|
|
4472
4431
|
o && i();
|
|
4473
4432
|
}
|
|
4474
4433
|
}
|
|
4475
|
-
function
|
|
4476
|
-
const { config: e, storage: t } = qt(), r =
|
|
4434
|
+
function xo({ factsBaseUrl: n } = {}) {
|
|
4435
|
+
const { config: e, storage: t } = qt(), r = yo(uo);
|
|
4477
4436
|
let i = null;
|
|
4478
|
-
const s = () =>
|
|
4437
|
+
const s = () => mo({
|
|
4479
4438
|
read: () => ({
|
|
4480
4439
|
token: t.get(L.idToken),
|
|
4481
4440
|
expiry: t.get(L.idTokenExpiry)
|
|
@@ -4483,7 +4442,7 @@ function Eo({ factsBaseUrl: n } = {}) {
|
|
|
4483
4442
|
refresh: () => Dt()
|
|
4484
4443
|
});
|
|
4485
4444
|
return {
|
|
4486
|
-
isAuthenticated: () =>
|
|
4445
|
+
isAuthenticated: () => fo(),
|
|
4487
4446
|
signedInEmail: () => t.get(L.userEmail) || null,
|
|
4488
4447
|
getAuthHeaders: s,
|
|
4489
4448
|
/* Save mapped answers (../lib/user-facts.mjs) to the viewer's My WRAL user facts. */
|
|
@@ -4493,7 +4452,7 @@ function Eo({ factsBaseUrl: n } = {}) {
|
|
|
4493
4452
|
getAuthHeaders: s,
|
|
4494
4453
|
onSaved: () => {
|
|
4495
4454
|
try {
|
|
4496
|
-
localStorage.removeItem(
|
|
4455
|
+
localStorage.removeItem(vo);
|
|
4497
4456
|
} catch {
|
|
4498
4457
|
}
|
|
4499
4458
|
}
|
|
@@ -4505,7 +4464,7 @@ function Eo({ factsBaseUrl: n } = {}) {
|
|
|
4505
4464
|
* @returns {{challengeRequired?: boolean, authenticated?: boolean, newAccount: boolean}}
|
|
4506
4465
|
*/
|
|
4507
4466
|
sendCode: async (o) => {
|
|
4508
|
-
const u = await
|
|
4467
|
+
const u = await lo(
|
|
4509
4468
|
e,
|
|
4510
4469
|
o,
|
|
4511
4470
|
t,
|
|
@@ -4530,7 +4489,7 @@ function Eo({ factsBaseUrl: n } = {}) {
|
|
|
4530
4489
|
if (!i)
|
|
4531
4490
|
throw new Error("Please enter your email again to get a new code.");
|
|
4532
4491
|
try {
|
|
4533
|
-
await
|
|
4492
|
+
await co(
|
|
4534
4493
|
i,
|
|
4535
4494
|
o,
|
|
4536
4495
|
t,
|
|
@@ -4559,9 +4518,9 @@ function Eo({ factsBaseUrl: n } = {}) {
|
|
|
4559
4518
|
}
|
|
4560
4519
|
};
|
|
4561
4520
|
}
|
|
4562
|
-
function
|
|
4563
|
-
const t =
|
|
4564
|
-
return { ...
|
|
4521
|
+
function Eo({ baseUrl: n, factsBaseUrl: e }) {
|
|
4522
|
+
const t = xo({ factsBaseUrl: e });
|
|
4523
|
+
return { ...go({ baseUrl: n, getAuthHeaders: t.getAuthHeaders }), ...t };
|
|
4565
4524
|
}
|
|
4566
4525
|
function J(n, e) {
|
|
4567
4526
|
return (n?.nodes || []).find((t) => t.id === e);
|
|
@@ -4609,7 +4568,7 @@ function sn(n = []) {
|
|
|
4609
4568
|
t.kind === "collect" && Object.assign(e, t.values || {});
|
|
4610
4569
|
return e;
|
|
4611
4570
|
}
|
|
4612
|
-
function
|
|
4571
|
+
function Uo(n = []) {
|
|
4613
4572
|
return n.filter((e) => e.kind === "choice").map((e) => `${e.nodeId}:${e.optionId}`);
|
|
4614
4573
|
}
|
|
4615
4574
|
function on(n, e = []) {
|
|
@@ -4621,13 +4580,13 @@ function on(n, e = []) {
|
|
|
4621
4580
|
}
|
|
4622
4581
|
return an(t);
|
|
4623
4582
|
}
|
|
4624
|
-
function
|
|
4583
|
+
function To(n = []) {
|
|
4625
4584
|
return n.includes("urgent") ? "urgent" : n.includes("moderate") ? "moderate" : null;
|
|
4626
4585
|
}
|
|
4627
4586
|
function an(n) {
|
|
4628
4587
|
return [...new Set(n)];
|
|
4629
4588
|
}
|
|
4630
|
-
function
|
|
4589
|
+
function Io(n, e = []) {
|
|
4631
4590
|
const t = [];
|
|
4632
4591
|
for (const i of e) {
|
|
4633
4592
|
const [s, o] = String(i).split(":"), u = J(n, s), c = u?.type === "choice" ? (u.options || []).find((d) => d.id === o) : null;
|
|
@@ -4638,25 +4597,25 @@ function Do(n, e = []) {
|
|
|
4638
4597
|
const { error: r } = Qe(n, t);
|
|
4639
4598
|
return r ? { steps: [], error: r.reason } : { steps: t, error: null };
|
|
4640
4599
|
}
|
|
4641
|
-
function
|
|
4600
|
+
function Do(n, e) {
|
|
4642
4601
|
const t = Xe(e);
|
|
4643
4602
|
if (!t) return { form: null, steps: [], error: "not a hand-off" };
|
|
4644
4603
|
const r = (n || []).find((o) => o.formId === t.formId);
|
|
4645
4604
|
if (!r) return { form: null, steps: [], error: `unknown form: ${t.formId}` };
|
|
4646
|
-
const { steps: i, error: s } =
|
|
4605
|
+
const { steps: i, error: s } = Io(r, t.path);
|
|
4647
4606
|
return s ? { form: null, steps: [], error: s } : { form: r, steps: i, error: null };
|
|
4648
4607
|
}
|
|
4649
|
-
function
|
|
4608
|
+
function ko(n, e, t, r) {
|
|
4650
4609
|
return {
|
|
4651
4610
|
form: n,
|
|
4652
4611
|
steps: e,
|
|
4653
4612
|
option: { nodeId: t.id, optionId: r.id, label: r.label }
|
|
4654
4613
|
};
|
|
4655
4614
|
}
|
|
4656
|
-
function
|
|
4615
|
+
function $o(n = []) {
|
|
4657
4616
|
return n.every((e) => e.preset === !0);
|
|
4658
4617
|
}
|
|
4659
|
-
function
|
|
4618
|
+
function Ro(n, e, t) {
|
|
4660
4619
|
if (!Array.isArray(n) || !n.length) return [];
|
|
4661
4620
|
const r = [];
|
|
4662
4621
|
for (let i = 0; i < n.length; i++) {
|
|
@@ -4679,41 +4638,41 @@ function Po({ attr: n = null, search: e = "" } = {}) {
|
|
|
4679
4638
|
return null;
|
|
4680
4639
|
}
|
|
4681
4640
|
}
|
|
4682
|
-
function
|
|
4641
|
+
function Fo(n, e) {
|
|
4683
4642
|
return e && (n || []).find((t) => t.formId === e) || null;
|
|
4684
4643
|
}
|
|
4685
|
-
function
|
|
4644
|
+
function Bo(n, e) {
|
|
4686
4645
|
return !e || n?.form?.formId === e ? !0 : (n?.origins || []).some((t) => t.form?.formId === e);
|
|
4687
4646
|
}
|
|
4688
|
-
const
|
|
4647
|
+
const Oo = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/, Dr = {
|
|
4689
4648
|
text: 500,
|
|
4690
4649
|
textarea: 5e3,
|
|
4691
4650
|
url: 2048
|
|
4692
|
-
},
|
|
4651
|
+
}, Mo = "Please confirm the rights statement so we can use what you send.";
|
|
4693
4652
|
function un(n, { mediaCount: e = 0 } = {}) {
|
|
4694
4653
|
return n.kind === "consent" && n.requiredIf === "media" ? e > 0 : !!n.required;
|
|
4695
4654
|
}
|
|
4696
|
-
function
|
|
4655
|
+
function No(n, e) {
|
|
4697
4656
|
try {
|
|
4698
4657
|
return new RegExp(n, "u").test(e);
|
|
4699
4658
|
} catch {
|
|
4700
4659
|
return !0;
|
|
4701
4660
|
}
|
|
4702
4661
|
}
|
|
4703
|
-
function
|
|
4662
|
+
function Lo(n) {
|
|
4704
4663
|
return n.key === "zip" ? "Please enter a five-digit zip code." : `Please check the format of ${n.label.toLowerCase()}.`;
|
|
4705
4664
|
}
|
|
4706
|
-
function
|
|
4665
|
+
function qo(n, e, { mediaCount: t = 0 } = {}) {
|
|
4707
4666
|
const r = un(n, { mediaCount: t });
|
|
4708
4667
|
if (n.kind === "consent")
|
|
4709
|
-
return e === !0 || !r ? null :
|
|
4710
|
-
if (e == null || e === "" || n.kind === "location" &&
|
|
4668
|
+
return e === !0 || !r ? null : Mo;
|
|
4669
|
+
if (e == null || e === "" || n.kind === "location" && Ko(e))
|
|
4711
4670
|
return r ? `Please fill in: ${n.label.toLowerCase()}.` : null;
|
|
4712
4671
|
switch (n.kind) {
|
|
4713
4672
|
case "text":
|
|
4714
4673
|
case "textarea": {
|
|
4715
4674
|
const s = n.maxLength || Dr[n.kind];
|
|
4716
|
-
return typeof e != "string" ? `Please enter text for ${n.label.toLowerCase()}.` : e.length > s ? `Please keep ${n.label.toLowerCase()} under ${s} characters.` : n.kind === "text" && n.pattern && !
|
|
4675
|
+
return typeof e != "string" ? `Please enter text for ${n.label.toLowerCase()}.` : e.length > s ? `Please keep ${n.label.toLowerCase()} under ${s} characters.` : n.kind === "text" && n.pattern && !No(n.pattern, e) ? Lo(n) : null;
|
|
4717
4676
|
}
|
|
4718
4677
|
case "url": {
|
|
4719
4678
|
if (typeof e != "string" || e.length > Dr.url)
|
|
@@ -4725,7 +4684,7 @@ function Ko(n, e, { mediaCount: t = 0 } = {}) {
|
|
|
4725
4684
|
}
|
|
4726
4685
|
}
|
|
4727
4686
|
case "datetime":
|
|
4728
|
-
return
|
|
4687
|
+
return Oo.test(String(e)) ? null : "Please pick a date and time.";
|
|
4729
4688
|
case "select":
|
|
4730
4689
|
return (n.options || []).map((o) => o.id).includes(e) ? null : `Please choose one of the options for ${n.label.toLowerCase()}.`;
|
|
4731
4690
|
case "location":
|
|
@@ -4736,7 +4695,7 @@ function Ko(n, e, { mediaCount: t = 0 } = {}) {
|
|
|
4736
4695
|
return `Unsupported field: ${n.kind}`;
|
|
4737
4696
|
}
|
|
4738
4697
|
}
|
|
4739
|
-
function
|
|
4698
|
+
function Ko(n) {
|
|
4740
4699
|
return n == null ? !0 : typeof n != "object" ? !1 : !n.county && !n.where && !(Array.isArray(n.gps) && n.gps.length);
|
|
4741
4700
|
}
|
|
4742
4701
|
function Vo(n, e) {
|
|
@@ -4746,7 +4705,7 @@ function kr(n, e = {}, { mediaCount: t = 0 } = {}) {
|
|
|
4746
4705
|
const r = {};
|
|
4747
4706
|
for (const i of n) {
|
|
4748
4707
|
if (i.kind === "media") continue;
|
|
4749
|
-
const s =
|
|
4708
|
+
const s = qo(i, e[i.key], { mediaCount: t });
|
|
4750
4709
|
s && (r[i.key] = s);
|
|
4751
4710
|
}
|
|
4752
4711
|
return { ok: Object.keys(r).length === 0, errors: r };
|
|
@@ -4796,7 +4755,7 @@ function Ho({ form: n, steps: e, media: t = [] }) {
|
|
|
4796
4755
|
return {
|
|
4797
4756
|
formId: n.formId,
|
|
4798
4757
|
flowVersion: n.flowVersion,
|
|
4799
|
-
path:
|
|
4758
|
+
path: Uo(e),
|
|
4800
4759
|
answers: s,
|
|
4801
4760
|
media: t.map(({ assetId: o, type: u }) => ({ assetId: o, type: u }))
|
|
4802
4761
|
};
|
|
@@ -4839,19 +4798,19 @@ function Rr(n, e) {
|
|
|
4839
4798
|
message: "Something went wrong on our end; please try again."
|
|
4840
4799
|
};
|
|
4841
4800
|
}
|
|
4842
|
-
const
|
|
4843
|
-
function
|
|
4801
|
+
const jo = 34, zo = 44;
|
|
4802
|
+
function Pr(n, e) {
|
|
4844
4803
|
const t = String(n);
|
|
4845
4804
|
return t.length > e ? `${t.slice(0, e)}…` : t;
|
|
4846
4805
|
}
|
|
4847
|
-
function
|
|
4806
|
+
function Wo(n, e) {
|
|
4848
4807
|
const t = (n.options || []).find((r) => r.id === e);
|
|
4849
4808
|
return t ? t.label : e;
|
|
4850
4809
|
}
|
|
4851
|
-
function
|
|
4810
|
+
function Yo(n) {
|
|
4852
4811
|
return !n || typeof n != "object" ? "" : [n.county, n.where].filter(Boolean).join(", ");
|
|
4853
4812
|
}
|
|
4854
|
-
function
|
|
4813
|
+
function Go(n, e = {}, t = []) {
|
|
4855
4814
|
const r = [];
|
|
4856
4815
|
for (const i of n) {
|
|
4857
4816
|
if (i.kind === "consent") continue;
|
|
@@ -4859,21 +4818,21 @@ function Jo(n, e = {}, t = []) {
|
|
|
4859
4818
|
t.length && r.push(`${t.length} ${t.length === 1 ? "file" : "files"}`);
|
|
4860
4819
|
continue;
|
|
4861
4820
|
}
|
|
4862
|
-
const s = i.kind === "location" ?
|
|
4863
|
-
s == null || s === "" || (i.kind === "textarea" ? r.push(`"${
|
|
4821
|
+
const s = i.kind === "location" ? Yo(e[i.key]) : i.kind === "select" ? Wo(i, e[i.key]) : e[i.key];
|
|
4822
|
+
s == null || s === "" || (i.kind === "textarea" ? r.push(`"${Pr(s, zo)}"`) : r.push(Pr(s, jo)));
|
|
4864
4823
|
}
|
|
4865
4824
|
return r.join(" · ") || "Details provided";
|
|
4866
4825
|
}
|
|
4867
|
-
function
|
|
4826
|
+
function Jo(n, e = [], t = null) {
|
|
4868
4827
|
const r = [];
|
|
4869
4828
|
for (const s of e) {
|
|
4870
4829
|
const o = J(n, s.nodeId);
|
|
4871
4830
|
s.kind === "choice" && o && r.push({ k: (o.prompt || "").replace(/\?$/, ""), v: s.label || s.optionId }), s.kind === "collect" && r.push({ k: "Details", v: s.summary || "Details provided" }), s.kind === "gate" && (s.anonymous ? r.push({ k: "Contact", v: "Anonymous — we will have no way to reach you" }) : (s.email || t) && r.push({ k: "Verified email", v: s.email || t }));
|
|
4872
4831
|
}
|
|
4873
|
-
const i =
|
|
4832
|
+
const i = To(on(n, e));
|
|
4874
4833
|
return i && r.push({ k: "Priority", v: i === "urgent" ? "Urgent" : "Moderate", pill: i }), r;
|
|
4875
4834
|
}
|
|
4876
|
-
function
|
|
4835
|
+
function Zo(n, e = []) {
|
|
4877
4836
|
const t = n?.confirmation || {};
|
|
4878
4837
|
return {
|
|
4879
4838
|
title: t.title || "Report received.",
|
|
@@ -4881,44 +4840,14 @@ function Xo(n, e = []) {
|
|
|
4881
4840
|
urgentNote: e.includes("urgent") ? t.urgentNote : void 0
|
|
4882
4841
|
};
|
|
4883
4842
|
}
|
|
4884
|
-
function Qo(n, e) {
|
|
4885
|
-
const t = e === "failed" ? " The notification is queued for a delivery retry." : "";
|
|
4886
|
-
return n?.startsWith("studio+email:") ? `Sent to the Studio review queue; the desk is emailed.${t}` : n?.startsWith("studio:") ? "Sent to the Studio review queue." : n?.startsWith("jsm:") ? `A ticket is opened for tech support with your details as fields, not prose.${t}` : n?.startsWith("email:") ? `Emailed to the owning desk with a link to your report.${t}` : "Routed to the right team.";
|
|
4887
|
-
}
|
|
4888
|
-
function ea({ routing: n = {}, flags: e = [], reference: t = "", anonymous: r = !1 }) {
|
|
4889
|
-
const i = e.includes("urgent");
|
|
4890
|
-
return [
|
|
4891
|
-
{
|
|
4892
|
-
title: "Received",
|
|
4893
|
-
body: `Report ${t} and its media are written to the dedicated Report It intake store before anything downstream touches them.`
|
|
4894
|
-
},
|
|
4895
|
-
{
|
|
4896
|
-
title: "Routed",
|
|
4897
|
-
body: Qo(n.destination, n.state),
|
|
4898
|
-
pill: i ? "Urgent · pinned first" : void 0
|
|
4899
|
-
},
|
|
4900
|
-
{
|
|
4901
|
-
title: "Reviewed",
|
|
4902
|
-
body: r ? "An editor reviews it in the Report It queue: accept and promote it uncredited, reject, or re-route." : "An editor reviews it in the Report It queue: accept and promote with your credit, reject, or re-route."
|
|
4903
|
-
},
|
|
4904
|
-
{
|
|
4905
|
-
title: "Monitored",
|
|
4906
|
-
body: "The record joins the monitoring stream, which watches for related reports by category, place and symptom."
|
|
4907
|
-
},
|
|
4908
|
-
{
|
|
4909
|
-
title: "Escalation check",
|
|
4910
|
-
body: "Related reports crossing a threshold alert the owning team automatically; below it, we keep monitoring."
|
|
4911
|
-
}
|
|
4912
|
-
];
|
|
4913
|
-
}
|
|
4914
4843
|
const Kt = "wral-report-it:draft:v1", ln = 1;
|
|
4915
|
-
function
|
|
4844
|
+
function Xo(n, e) {
|
|
4916
4845
|
try {
|
|
4917
4846
|
n.setItem(Kt, JSON.stringify({ ...e, v: ln, savedAt: Date.now() }));
|
|
4918
4847
|
} catch {
|
|
4919
4848
|
}
|
|
4920
4849
|
}
|
|
4921
|
-
function
|
|
4850
|
+
function Qo(n) {
|
|
4922
4851
|
try {
|
|
4923
4852
|
const e = n.getItem(Kt);
|
|
4924
4853
|
if (!e) return null;
|
|
@@ -4928,13 +4857,13 @@ function ra(n) {
|
|
|
4928
4857
|
return null;
|
|
4929
4858
|
}
|
|
4930
4859
|
}
|
|
4931
|
-
function
|
|
4860
|
+
function Fr(n) {
|
|
4932
4861
|
try {
|
|
4933
4862
|
n.removeItem(Kt);
|
|
4934
4863
|
} catch {
|
|
4935
4864
|
}
|
|
4936
4865
|
}
|
|
4937
|
-
function
|
|
4866
|
+
function ea({
|
|
4938
4867
|
apiOrigin: n,
|
|
4939
4868
|
form: e,
|
|
4940
4869
|
steps: t,
|
|
@@ -4956,7 +4885,7 @@ function na({
|
|
|
4956
4885
|
}))
|
|
4957
4886
|
};
|
|
4958
4887
|
}
|
|
4959
|
-
function
|
|
4888
|
+
function ta(n, e, { apiOrigin: t } = {}) {
|
|
4960
4889
|
if (!n) return { status: "discarded" };
|
|
4961
4890
|
if (t && n.apiOrigin && n.apiOrigin !== t)
|
|
4962
4891
|
return { status: "discarded" };
|
|
@@ -4973,7 +4902,7 @@ function ia(n, e, { apiOrigin: t } = {}) {
|
|
|
4973
4902
|
steps: n.steps || [],
|
|
4974
4903
|
requestId: n.requestId || null,
|
|
4975
4904
|
lostMedia: s,
|
|
4976
|
-
origins:
|
|
4905
|
+
origins: Ro(n.origins, e, r.formId)
|
|
4977
4906
|
};
|
|
4978
4907
|
}
|
|
4979
4908
|
function We(n = []) {
|
|
@@ -4996,7 +4925,7 @@ function We(n = []) {
|
|
|
4996
4925
|
error: null
|
|
4997
4926
|
};
|
|
4998
4927
|
}
|
|
4999
|
-
function
|
|
4928
|
+
function ra(n, e) {
|
|
5000
4929
|
switch (e.type) {
|
|
5001
4930
|
case "START":
|
|
5002
4931
|
return { ...n, stage: n.files.length ? "minting" : "requesting", error: null };
|
|
@@ -5023,7 +4952,7 @@ function sa(n, e) {
|
|
|
5023
4952
|
}));
|
|
5024
4953
|
case "FILE_DONE": {
|
|
5025
4954
|
const t = Ie(n, e.i, (r) => ({ ...r, status: "done", progress: 1 }));
|
|
5026
|
-
return
|
|
4955
|
+
return na(t);
|
|
5027
4956
|
}
|
|
5028
4957
|
case "FILE_FAIL":
|
|
5029
4958
|
return { ...Ie(n, e.i, (r) => ({
|
|
@@ -5064,14 +4993,14 @@ function Ie(n, e, t) {
|
|
|
5064
4993
|
const r = n.files.map((i, s) => s === e ? t(i) : i);
|
|
5065
4994
|
return { ...n, files: r };
|
|
5066
4995
|
}
|
|
5067
|
-
function
|
|
4996
|
+
function na(n) {
|
|
5068
4997
|
const e = n.files.every((r) => r.status === "done"), t = n.files.some((r) => r.status === "failed");
|
|
5069
4998
|
return e ? { ...n, stage: "requesting" } : t ? { ...n, stage: "uploading-error" } : n;
|
|
5070
4999
|
}
|
|
5071
5000
|
function Br(n) {
|
|
5072
5001
|
return n.files.map((e, t) => ({ ...e, i: t })).filter((e) => e.status === "failed");
|
|
5073
5002
|
}
|
|
5074
|
-
const
|
|
5003
|
+
const ia = [
|
|
5075
5004
|
"Wake",
|
|
5076
5005
|
"Durham",
|
|
5077
5006
|
"Orange",
|
|
@@ -5088,18 +5017,18 @@ const aa = [
|
|
|
5088
5017
|
"Moore",
|
|
5089
5018
|
"Sampson",
|
|
5090
5019
|
"Other / outside the area"
|
|
5091
|
-
], Or = "(919) 821-8600",
|
|
5020
|
+
], Or = "(919) 821-8600", sa = "https://www.wral.com/my-wral/", oa = Object.freeze([
|
|
5092
5021
|
"We cannot come back to you for the detail that often turns a tip into a story.",
|
|
5093
5022
|
"We cannot credit you if we use your photos or video.",
|
|
5094
5023
|
"If you lose your reference number, we cannot look it up for you."
|
|
5095
5024
|
]);
|
|
5096
|
-
function
|
|
5025
|
+
function aa(n) {
|
|
5097
5026
|
const e = String(n).replace(/\D/g, "");
|
|
5098
5027
|
return `tel:+1${e.length === 11 && e.startsWith("1") ? e.slice(1) : e}`;
|
|
5099
5028
|
}
|
|
5100
|
-
const
|
|
5101
|
-
class
|
|
5102
|
-
static styles =
|
|
5029
|
+
const ua = "https://api.wral.com/forms", la = 480, ca = 2, cn = "What would you like to send to WRAL?", ct = `Welcome to Report It. ${cn}`, ht = "A few quick questions route your report to the right team.", ha = 2500, fa = "I took or own this material and give WRAL permission to use it on air and online with credit to me.";
|
|
5030
|
+
class da extends ae {
|
|
5031
|
+
static styles = ro;
|
|
5103
5032
|
static properties = {
|
|
5104
5033
|
api: { type: String },
|
|
5105
5034
|
factsApi: { type: String, attribute: "facts-api" },
|
|
@@ -5123,26 +5052,26 @@ class ma extends ae {
|
|
|
5123
5052
|
};
|
|
5124
5053
|
#l = null;
|
|
5125
5054
|
#u = null;
|
|
5126
|
-
#
|
|
5055
|
+
#h = null;
|
|
5127
5056
|
#t = null;
|
|
5128
5057
|
#r = {};
|
|
5129
5058
|
#n = {};
|
|
5130
5059
|
#s = /* @__PURE__ */ new Map();
|
|
5131
5060
|
#w = null;
|
|
5132
|
-
#
|
|
5061
|
+
#f = null;
|
|
5133
5062
|
#b = !1;
|
|
5134
5063
|
#c = null;
|
|
5135
5064
|
#U = 0;
|
|
5136
5065
|
/* The gate was passed with an account created on this page load; offered once. */
|
|
5137
|
-
#
|
|
5066
|
+
#d = !1;
|
|
5138
5067
|
constructor() {
|
|
5139
|
-
super(), this.api =
|
|
5068
|
+
super(), this.api = ua, this.factsApi = null, this.flow = null, this._phase = "loading", this._forms = [], this._form = null, this._steps = [], this._origins = [], this._handoffError = !1, this._typing = !1, this._loadingSlow = !1, this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, this._submit = We([]), this._banner = null, this._notice = null, this._result = null, this._factsOffer = null;
|
|
5140
5069
|
}
|
|
5141
5070
|
get client() {
|
|
5142
5071
|
if (this.#l) return this.#l;
|
|
5143
5072
|
const e = `${this.api}
|
|
5144
5073
|
${this.factsApi || ""}`;
|
|
5145
|
-
return (!this.#u || this.#
|
|
5074
|
+
return (!this.#u || this.#h !== e) && (this.#u = Eo({ baseUrl: this.api, factsBaseUrl: this.factsApi || null }), this.#h = e), this.#u;
|
|
5146
5075
|
}
|
|
5147
5076
|
set client(e) {
|
|
5148
5077
|
this.#l = e || null, this.isConnected && this.#S();
|
|
@@ -5151,7 +5080,7 @@ ${this.factsApi || ""}`;
|
|
|
5151
5080
|
super.connectedCallback(), this.#S();
|
|
5152
5081
|
}
|
|
5153
5082
|
disconnectedCallback() {
|
|
5154
|
-
super.disconnectedCallback(), clearTimeout(this.#w), clearTimeout(this.#
|
|
5083
|
+
super.disconnectedCallback(), clearTimeout(this.#w), clearTimeout(this.#f), this.#c?.();
|
|
5155
5084
|
for (const { abort: e } of this.#s.values()) e?.();
|
|
5156
5085
|
this.#s.clear();
|
|
5157
5086
|
}
|
|
@@ -5162,7 +5091,7 @@ ${this.factsApi || ""}`;
|
|
|
5162
5091
|
return !0;
|
|
5163
5092
|
}
|
|
5164
5093
|
}
|
|
5165
|
-
get #
|
|
5094
|
+
get #p() {
|
|
5166
5095
|
try {
|
|
5167
5096
|
return sessionStorage;
|
|
5168
5097
|
} catch {
|
|
@@ -5181,15 +5110,15 @@ ${this.factsApi || ""}`;
|
|
|
5181
5110
|
return this.client.anonymousCapability?.().enabled === !0 && this._form?.allowAnonymous !== !1;
|
|
5182
5111
|
}
|
|
5183
5112
|
/* Derived from the gate step, so a reload restores the choice. */
|
|
5184
|
-
get #
|
|
5113
|
+
get #g() {
|
|
5185
5114
|
return this._steps.some((e) => e.kind === "gate" && e.anonymous === !0);
|
|
5186
5115
|
}
|
|
5187
5116
|
// ── Loading + draft restore ─────────────────────────────────────
|
|
5188
5117
|
async #S() {
|
|
5189
5118
|
const e = ++this.#U, t = () => e === this.#U;
|
|
5190
|
-
this._phase = "loading", this._banner = null, this._loadingSlow = !1, clearTimeout(this.#
|
|
5119
|
+
this._phase = "loading", this._banner = null, this._loadingSlow = !1, clearTimeout(this.#f), this.#f = setTimeout(() => {
|
|
5191
5120
|
this._loadingSlow = !0;
|
|
5192
|
-
},
|
|
5121
|
+
}, ha);
|
|
5193
5122
|
let r;
|
|
5194
5123
|
try {
|
|
5195
5124
|
r = await this.client.listForms();
|
|
@@ -5197,16 +5126,16 @@ ${this.factsApi || ""}`;
|
|
|
5197
5126
|
t() && (this._phase = "load-error");
|
|
5198
5127
|
return;
|
|
5199
5128
|
} finally {
|
|
5200
|
-
t() && (clearTimeout(this.#
|
|
5129
|
+
t() && (clearTimeout(this.#f), this._loadingSlow = !1);
|
|
5201
5130
|
}
|
|
5202
5131
|
if (!t()) return;
|
|
5203
5132
|
this._forms = r;
|
|
5204
|
-
const i = Po({ attr: this.flow, search: globalThis.location?.search }), s =
|
|
5205
|
-
if ((s.status === "ok" || s.status === "review-required") &&
|
|
5133
|
+
const i = Po({ attr: this.flow, search: globalThis.location?.search }), s = ta(Qo(this.#p), this._forms, { apiOrigin: this.api });
|
|
5134
|
+
if ((s.status === "ok" || s.status === "review-required") && Bo(s, i)) {
|
|
5206
5135
|
this._form = s.form, this._steps = s.steps, this._origins = s.origins || [], this.#t = s.requestId, this.#n = s.lostMedia || {}, s.status === "review-required" ? this._notice = "This form changed since your last visit — please review your answers." : Object.keys(this.#n).length && (this._notice = "Welcome back — your answers were saved, but attachments need to be re-attached."), this.#i({ animate: !1 });
|
|
5207
5136
|
return;
|
|
5208
5137
|
}
|
|
5209
|
-
const o =
|
|
5138
|
+
const o = Fo(this._forms, i);
|
|
5210
5139
|
if (o) {
|
|
5211
5140
|
this.#T(o);
|
|
5212
5141
|
return;
|
|
@@ -5218,7 +5147,7 @@ ${this.factsApi || ""}`;
|
|
|
5218
5147
|
const e = {};
|
|
5219
5148
|
for (const [t, r] of Object.entries(this.#r))
|
|
5220
5149
|
r.length && (e[t] = r.map(({ name: i, type: s, size: o }) => ({ name: i, type: s, size: o })));
|
|
5221
|
-
|
|
5150
|
+
Xo(this.#p, ea({
|
|
5222
5151
|
apiOrigin: this.api,
|
|
5223
5152
|
form: this._form,
|
|
5224
5153
|
steps: this._steps,
|
|
@@ -5231,7 +5160,7 @@ ${this.factsApi || ""}`;
|
|
|
5231
5160
|
#i({ animate: e = !0 } = {}) {
|
|
5232
5161
|
this._phase = "walk", this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, e && !this.#L ? (this._typing = !0, clearTimeout(this.#w), this.#w = setTimeout(() => {
|
|
5233
5162
|
this._typing = !1;
|
|
5234
|
-
},
|
|
5163
|
+
}, la)) : this._typing = !1;
|
|
5235
5164
|
}
|
|
5236
5165
|
get #_() {
|
|
5237
5166
|
return this._form ? Qe(this._form, this._steps) : { node: null };
|
|
@@ -5244,7 +5173,7 @@ ${this.factsApi || ""}`;
|
|
|
5244
5173
|
}
|
|
5245
5174
|
#K(e, t) {
|
|
5246
5175
|
if (Xe(t)) {
|
|
5247
|
-
this.#
|
|
5176
|
+
this.#V(e, t);
|
|
5248
5177
|
return;
|
|
5249
5178
|
}
|
|
5250
5179
|
this._handoffError = !1, this.#m({
|
|
@@ -5261,31 +5190,31 @@ ${this.factsApi || ""}`;
|
|
|
5261
5190
|
* Back can return them. A target that is missing or no longer matches
|
|
5262
5191
|
* its preset path is a config mistake: say so and stay put.
|
|
5263
5192
|
*/
|
|
5264
|
-
#
|
|
5265
|
-
const { form: r, steps: i, error: s } =
|
|
5193
|
+
#V(e, t) {
|
|
5194
|
+
const { form: r, steps: i, error: s } = Do(this._forms, t);
|
|
5266
5195
|
if (s) {
|
|
5267
5196
|
this._handoffError = !0;
|
|
5268
5197
|
return;
|
|
5269
5198
|
}
|
|
5270
5199
|
this._handoffError = !1, this._origins = [...this._origins, {
|
|
5271
|
-
|
|
5200
|
+
...ko(this._form, this._steps, e, t),
|
|
5272
5201
|
media: this.#r,
|
|
5273
5202
|
lostMedia: this.#n
|
|
5274
5203
|
}], this._form = r, this._steps = i, this.#t = null, this.#r = {}, this.#n = {}, this._notice = null, this.#o(), this.#i();
|
|
5275
5204
|
}
|
|
5276
5205
|
/* Back past a hand-off: the originating form, on the choice card. */
|
|
5277
|
-
#
|
|
5206
|
+
#H() {
|
|
5278
5207
|
const e = this._origins.at(-1);
|
|
5279
5208
|
this._origins = this._origins.slice(0, -1), this._form = e.form, this._steps = e.steps, this.#t = null, this.#r = e.media || {}, this.#n = e.lostMedia || {}, this._handoffError = !1, this.#o(), this.#i({ animate: !1 });
|
|
5280
5209
|
}
|
|
5281
|
-
#
|
|
5210
|
+
#j() {
|
|
5282
5211
|
if (this._phase === "done" || this._phase === "submitting") return;
|
|
5283
5212
|
if (this._phase === "review") {
|
|
5284
5213
|
this.#i({ animate: !1 });
|
|
5285
5214
|
return;
|
|
5286
5215
|
}
|
|
5287
|
-
if (this._origins.length &&
|
|
5288
|
-
this.#
|
|
5216
|
+
if (this._origins.length && $o(this._steps)) {
|
|
5217
|
+
this.#H();
|
|
5289
5218
|
return;
|
|
5290
5219
|
}
|
|
5291
5220
|
if (!this._steps.length) {
|
|
@@ -5296,10 +5225,10 @@ ${this.factsApi || ""}`;
|
|
|
5296
5225
|
this._steps = this._steps.slice(0, -1), e.kind === "collect" && (this._cardValues = { ...e.values }), this.#o(), this.#i({ animate: !1 });
|
|
5297
5226
|
}
|
|
5298
5227
|
#A() {
|
|
5299
|
-
this.client.endAnonSession?.(), this._form = null, this._steps = [], this._origins = [], this._handoffError = !1, this.#t = null, this.#r = {}, this.#n = {}, this._result = null, this._banner = null, this._notice = null, this._submit = We([]), this._factsOffer = null,
|
|
5228
|
+
this.client.endAnonSession?.(), this._form = null, this._steps = [], this._origins = [], this._handoffError = !1, this.#t = null, this.#r = {}, this.#n = {}, this._result = null, this._banner = null, this._notice = null, this._submit = We([]), this._factsOffer = null, Fr(this.#p), this._phase = "pick";
|
|
5300
5229
|
}
|
|
5301
5230
|
// ── Collect card ────────────────────────────────────────────────
|
|
5302
|
-
#
|
|
5231
|
+
#C(e, t) {
|
|
5303
5232
|
this._cardValues = { ...this._cardValues, [e]: t };
|
|
5304
5233
|
}
|
|
5305
5234
|
/* Files attached on the given collect cards (a files-only consent counts them). */
|
|
@@ -5333,7 +5262,7 @@ ${this.factsApi || ""}`;
|
|
|
5333
5262
|
nodeId: e.id,
|
|
5334
5263
|
kind: "collect",
|
|
5335
5264
|
values: { ...this._cardValues },
|
|
5336
|
-
summary:
|
|
5265
|
+
summary: Go(t, this._cardValues, u)
|
|
5337
5266
|
});
|
|
5338
5267
|
}
|
|
5339
5268
|
// ── Gate ────────────────────────────────────────────────────────
|
|
@@ -5351,7 +5280,7 @@ ${this.factsApi || ""}`;
|
|
|
5351
5280
|
}));
|
|
5352
5281
|
}
|
|
5353
5282
|
}
|
|
5354
|
-
async #
|
|
5283
|
+
async #x() {
|
|
5355
5284
|
const e = this._gate.email.trim();
|
|
5356
5285
|
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
|
|
5357
5286
|
this._gate = { ...this._gate, error: "Please enter a valid email address." };
|
|
@@ -5382,7 +5311,7 @@ ${this.factsApi || ""}`;
|
|
|
5382
5311
|
}
|
|
5383
5312
|
}
|
|
5384
5313
|
#R(e) {
|
|
5385
|
-
if (this.#
|
|
5314
|
+
if (this.#d = !!this._gate.newAccount, this._gate = { stage: null, email: "", error: "", loading: !1 }, this._submit.stage === "auth") {
|
|
5386
5315
|
this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#a();
|
|
5387
5316
|
return;
|
|
5388
5317
|
}
|
|
@@ -5390,7 +5319,7 @@ ${this.factsApi || ""}`;
|
|
|
5390
5319
|
t?.type === "gate" && this.#m({ nodeId: t.id, kind: "gate", email: e });
|
|
5391
5320
|
}
|
|
5392
5321
|
#W() {
|
|
5393
|
-
this.client.signOut?.(), this.#
|
|
5322
|
+
this.client.signOut?.(), this.#d = !1, this._gate = { stage: "email", email: "", error: "", loading: !1 };
|
|
5394
5323
|
}
|
|
5395
5324
|
// ── Anonymous route ─────────────────────────────────────────────
|
|
5396
5325
|
#Y() {
|
|
@@ -5407,7 +5336,7 @@ ${this.factsApi || ""}`;
|
|
|
5407
5336
|
const { node: e } = this.#_;
|
|
5408
5337
|
e?.type === "gate" && (this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#m({ nodeId: e.id, kind: "gate", anonymous: !0 }));
|
|
5409
5338
|
}
|
|
5410
|
-
async #
|
|
5339
|
+
async #P() {
|
|
5411
5340
|
try {
|
|
5412
5341
|
return await this.client.createAnonSession({
|
|
5413
5342
|
formId: this._form.formId,
|
|
@@ -5420,7 +5349,7 @@ ${this.factsApi || ""}`;
|
|
|
5420
5349
|
/* An anonymous session outliving the upload run re-mints in place; there
|
|
5421
5350
|
* is no identity to send back to the sign-in card. */
|
|
5422
5351
|
async #Z() {
|
|
5423
|
-
if (await this.#
|
|
5352
|
+
if (await this.#P()) {
|
|
5424
5353
|
this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#a();
|
|
5425
5354
|
return;
|
|
5426
5355
|
}
|
|
@@ -5436,7 +5365,7 @@ ${this.factsApi || ""}`;
|
|
|
5436
5365
|
return e;
|
|
5437
5366
|
}
|
|
5438
5367
|
#e(e) {
|
|
5439
|
-
this._submit =
|
|
5368
|
+
this._submit = ra(this._submit, e);
|
|
5440
5369
|
}
|
|
5441
5370
|
async #X() {
|
|
5442
5371
|
this._banner = null;
|
|
@@ -5458,11 +5387,11 @@ ${this.factsApi || ""}`;
|
|
|
5458
5387
|
return;
|
|
5459
5388
|
}
|
|
5460
5389
|
}
|
|
5461
|
-
if (this.#t = this.#t || crypto.randomUUID(), this.#o(), this.#
|
|
5462
|
-
if (!await this.#
|
|
5390
|
+
if (this.#t = this.#t || crypto.randomUUID(), this.#o(), this.#g) {
|
|
5391
|
+
if (!await this.#P()) return;
|
|
5463
5392
|
} else
|
|
5464
5393
|
this.client.endAnonSession?.();
|
|
5465
|
-
if (this._submit = We(this.#y), this._phase = "submitting", this.#
|
|
5394
|
+
if (this._submit = We(this.#y), this._phase = "submitting", this.#g) {
|
|
5466
5395
|
this.#e({ type: "START" }), this.#a();
|
|
5467
5396
|
return;
|
|
5468
5397
|
}
|
|
@@ -5475,7 +5404,7 @@ ${this.factsApi || ""}`;
|
|
|
5475
5404
|
async #a() {
|
|
5476
5405
|
const e = this._submit.stage;
|
|
5477
5406
|
if (e === "minting") return this.#Q();
|
|
5478
|
-
if (e === "uploading") return this.#
|
|
5407
|
+
if (e === "uploading") return this.#F();
|
|
5479
5408
|
if (e === "requesting") return this.#re();
|
|
5480
5409
|
}
|
|
5481
5410
|
async #Q() {
|
|
@@ -5490,10 +5419,10 @@ ${this.factsApi || ""}`;
|
|
|
5490
5419
|
this.#E(e);
|
|
5491
5420
|
}
|
|
5492
5421
|
}
|
|
5493
|
-
#
|
|
5422
|
+
#F() {
|
|
5494
5423
|
const e = this._submit.files, t = this.#s.size;
|
|
5495
5424
|
let r = 0;
|
|
5496
|
-
for (let i = 0; i < e.length && t + r <
|
|
5425
|
+
for (let i = 0; i < e.length && t + r < ca; i++)
|
|
5497
5426
|
e[i].status !== "uploading" || this.#s.has(i) || (r += 1, this.#ee(i));
|
|
5498
5427
|
}
|
|
5499
5428
|
#ee(e) {
|
|
@@ -5530,7 +5459,7 @@ ${this.factsApi || ""}`;
|
|
|
5530
5459
|
}
|
|
5531
5460
|
else
|
|
5532
5461
|
this.#e({ type: "RETRY_FILE", i: e });
|
|
5533
|
-
this.#
|
|
5462
|
+
this.#F();
|
|
5534
5463
|
}
|
|
5535
5464
|
async #re() {
|
|
5536
5465
|
try {
|
|
@@ -5539,16 +5468,16 @@ ${this.factsApi || ""}`;
|
|
|
5539
5468
|
steps: this._steps,
|
|
5540
5469
|
media: e
|
|
5541
5470
|
}));
|
|
5542
|
-
this.#e({ type: "REQUEST_OK", result: t }), this._result = t,
|
|
5471
|
+
this.#e({ type: "REQUEST_OK", result: t }), this._result = t, Fr(this.#p), this.client.endAnonSession?.(), this.#ne(), this._phase = "done";
|
|
5543
5472
|
} catch (e) {
|
|
5544
5473
|
this.#E(e);
|
|
5545
5474
|
}
|
|
5546
5475
|
}
|
|
5547
5476
|
// ── Save to My WRAL (new accounts only) ─────────────────────────
|
|
5548
5477
|
#ne() {
|
|
5549
|
-
if (!this.#
|
|
5550
|
-
this.#
|
|
5551
|
-
const e =
|
|
5478
|
+
if (!this.#d || this.#g || !this.client.saveUserFacts) return;
|
|
5479
|
+
this.#d = !1;
|
|
5480
|
+
const e = Ao(nn(this._form, this._steps), sn(this._steps));
|
|
5552
5481
|
e.length && (this._factsOffer = { stage: "offer", facts: e });
|
|
5553
5482
|
}
|
|
5554
5483
|
async #ie() {
|
|
@@ -5565,7 +5494,7 @@ ${this.factsApi || ""}`;
|
|
|
5565
5494
|
#E(e) {
|
|
5566
5495
|
const t = Rr(e?.status ?? 0, e?.body ?? null);
|
|
5567
5496
|
if (t.kind === "auth") {
|
|
5568
|
-
if (this.#e({ type: "AUTH_REQUIRED" }), this.#
|
|
5497
|
+
if (this.#e({ type: "AUTH_REQUIRED" }), this.#g) {
|
|
5569
5498
|
this.#Z();
|
|
5570
5499
|
return;
|
|
5571
5500
|
}
|
|
@@ -5727,11 +5656,11 @@ ${this.factsApi || ""}`;
|
|
|
5727
5656
|
`;
|
|
5728
5657
|
}
|
|
5729
5658
|
#de(e, t, r) {
|
|
5730
|
-
const i = (s) => (o) => this.#
|
|
5659
|
+
const i = (s) => (o) => this.#C(s, o.target.value);
|
|
5731
5660
|
switch (t.kind) {
|
|
5732
5661
|
case "text":
|
|
5733
5662
|
return A`<input type="text" id="f-${t.key}" name=${t.key} .value=${r || ""}
|
|
5734
|
-
inputmode=${
|
|
5663
|
+
inputmode=${xr(t.inputMode)} autocomplete=${xr(t.autocomplete)}
|
|
5735
5664
|
placeholder=${t.placeholder || ""} @input=${i(t.key)}>`;
|
|
5736
5665
|
case "url":
|
|
5737
5666
|
return A`<input type="url" id="f-${t.key}" .value=${r || ""}
|
|
@@ -5757,9 +5686,9 @@ ${this.factsApi || ""}`;
|
|
|
5757
5686
|
return A`
|
|
5758
5687
|
<div class="consent-row">
|
|
5759
5688
|
<input type="checkbox" id="f-${t.key}" .checked=${r === !0}
|
|
5760
|
-
@change=${(s) => this.#
|
|
5689
|
+
@change=${(s) => this.#C(t.key, s.target.checked)}>
|
|
5761
5690
|
<label for="f-${t.key}" style="all: unset; cursor: pointer;">
|
|
5762
|
-
${t.text ||
|
|
5691
|
+
${t.text || fa}
|
|
5763
5692
|
</label>
|
|
5764
5693
|
</div>
|
|
5765
5694
|
`;
|
|
@@ -5780,7 +5709,7 @@ ${this.factsApi || ""}`;
|
|
|
5780
5709
|
}
|
|
5781
5710
|
}
|
|
5782
5711
|
#pe(e, t) {
|
|
5783
|
-
const r = e.counties ||
|
|
5712
|
+
const r = e.counties || ia, i = (s) => this.#C(e.key, { ...t, ...s });
|
|
5784
5713
|
return A`
|
|
5785
5714
|
<select id="f-${e.key}" aria-label="County"
|
|
5786
5715
|
@change=${(s) => i({ county: s.target.value || void 0 })}>
|
|
@@ -5828,12 +5757,12 @@ ${this.factsApi || ""}`;
|
|
|
5828
5757
|
this._gate = { ...t, email: i.target.value };
|
|
5829
5758
|
}}
|
|
5830
5759
|
@keydown=${(i) => {
|
|
5831
|
-
i.key === "Enter" && this.#
|
|
5760
|
+
i.key === "Enter" && this.#x();
|
|
5832
5761
|
}}>
|
|
5833
5762
|
</div>
|
|
5834
5763
|
${t.error ? A`<div class="err" role="alert">${t.error}</div>` : E}
|
|
5835
5764
|
<button type="button" class="login-btn" ?disabled=${t.loading}
|
|
5836
|
-
@click=${() => this.#
|
|
5765
|
+
@click=${() => this.#x()}>
|
|
5837
5766
|
${t.loading ? "Sending…" : "Continue with email"}
|
|
5838
5767
|
</button>
|
|
5839
5768
|
<div class="login-why">
|
|
@@ -5842,7 +5771,7 @@ ${this.factsApi || ""}`;
|
|
|
5842
5771
|
<li>We can follow up on your report</li>
|
|
5843
5772
|
<li>Your contact information fills in automatically next time</li>
|
|
5844
5773
|
<li>You are credited by name when we use your photos or video</li>
|
|
5845
|
-
<li><a href=${
|
|
5774
|
+
<li><a href=${sa} target="_blank" rel="noopener">All other My WRAL account benefits</a></li>
|
|
5846
5775
|
</ul>
|
|
5847
5776
|
</div>
|
|
5848
5777
|
${this._submit.stage === "auth" ? E : this.#ge()}
|
|
@@ -5874,7 +5803,7 @@ ${this.factsApi || ""}`;
|
|
|
5874
5803
|
</button>
|
|
5875
5804
|
<p class="login-help">
|
|
5876
5805
|
Didn’t receive a code? Check your spam folder or
|
|
5877
|
-
<button type="button" @click=${() => this.#
|
|
5806
|
+
<button type="button" @click=${() => this.#x()}>resend a new code</button>.
|
|
5878
5807
|
</p>
|
|
5879
5808
|
</div>
|
|
5880
5809
|
` : A`${r}${ut()}`;
|
|
@@ -5888,7 +5817,7 @@ ${this.factsApi || ""}`;
|
|
|
5888
5817
|
<div class="alt-body">
|
|
5889
5818
|
<p class="alt-row">
|
|
5890
5819
|
Call the newsroom desk at
|
|
5891
|
-
<a href=${
|
|
5820
|
+
<a href=${aa(Or)}>${Or}</a>.
|
|
5892
5821
|
</p>
|
|
5893
5822
|
${this.#q ? A`
|
|
5894
5823
|
<p class="alt-row">
|
|
@@ -5910,7 +5839,7 @@ ${this.factsApi || ""}`;
|
|
|
5910
5839
|
You can send this report without an account. Here is what it costs you.
|
|
5911
5840
|
</p>
|
|
5912
5841
|
<ul class="anon-costs">
|
|
5913
|
-
${
|
|
5842
|
+
${oa.map((t) => A`
|
|
5914
5843
|
<li><span class="x" aria-hidden="true">✕</span><span>${t}</span></li>
|
|
5915
5844
|
`)}
|
|
5916
5845
|
</ul>
|
|
@@ -5943,7 +5872,7 @@ ${this.factsApi || ""}`;
|
|
|
5943
5872
|
`;
|
|
5944
5873
|
}
|
|
5945
5874
|
#M() {
|
|
5946
|
-
const e =
|
|
5875
|
+
const e = Jo(this._form, this._steps);
|
|
5947
5876
|
return A`
|
|
5948
5877
|
${M("Here is what you are sending.", "Check it over, then submit.")}
|
|
5949
5878
|
<div class="form-card">
|
|
@@ -5951,7 +5880,7 @@ ${this.factsApi || ""}`;
|
|
|
5951
5880
|
${e.map((t) => A`
|
|
5952
5881
|
<li>
|
|
5953
5882
|
<span class="k">${t.k}</span>
|
|
5954
|
-
<span>${t.pill ?
|
|
5883
|
+
<span>${t.pill ? no(t.pill) : t.v}</span>
|
|
5955
5884
|
</li>
|
|
5956
5885
|
`)}
|
|
5957
5886
|
</ul>
|
|
@@ -6014,16 +5943,11 @@ ${this.factsApi || ""}`;
|
|
|
6014
5943
|
`;
|
|
6015
5944
|
}
|
|
6016
5945
|
#we() {
|
|
6017
|
-
const e = on(this._form, this._steps), t =
|
|
6018
|
-
routing: this._result?.routing || {},
|
|
6019
|
-
flags: e,
|
|
6020
|
-
reference: this._result?.reference || "",
|
|
6021
|
-
anonymous: this.#h
|
|
6022
|
-
});
|
|
5946
|
+
const e = on(this._form, this._steps), t = Zo(this._result, e);
|
|
6023
5947
|
return A`
|
|
6024
5948
|
<div class="confirm-card">
|
|
6025
5949
|
<div class="c-head">
|
|
6026
|
-
<div class="c-check">${
|
|
5950
|
+
<div class="c-check">${io()}</div>
|
|
6027
5951
|
<div>
|
|
6028
5952
|
<div class="eyebrow">Report received</div>
|
|
6029
5953
|
<h2>${t.title}</h2>
|
|
@@ -6042,21 +5966,6 @@ ${this.factsApi || ""}`;
|
|
|
6042
5966
|
Start a new report
|
|
6043
5967
|
</button>
|
|
6044
5968
|
</div>
|
|
6045
|
-
<div class="journey">
|
|
6046
|
-
<div class="j-eyebrow">Behind the scenes</div>
|
|
6047
|
-
<div class="j-title">What happens to your report now</div>
|
|
6048
|
-
${r.map((i, s) => A`
|
|
6049
|
-
<div class="j-step">
|
|
6050
|
-
<div class="j-dot">${s + 1}</div>
|
|
6051
|
-
<div class="j-body">
|
|
6052
|
-
<div class="j-t">${i.title}
|
|
6053
|
-
${i.pill ? A` <span class="flag-pill urgent">${i.pill}</span>` : E}
|
|
6054
|
-
</div>
|
|
6055
|
-
<div class="j-d">${i.body}</div>
|
|
6056
|
-
</div>
|
|
6057
|
-
</div>
|
|
6058
|
-
`)}
|
|
6059
|
-
</div>
|
|
6060
5969
|
`;
|
|
6061
5970
|
}
|
|
6062
5971
|
/* The offer is a step of its own: the confirmation waits for Save or No thanks. */
|
|
@@ -6082,7 +5991,7 @@ ${this.factsApi || ""}`;
|
|
|
6082
5991
|
${e.facts.map((r) => A`<dt>${r.label}</dt><dd>${r.value}</dd>`)}
|
|
6083
5992
|
</dl>
|
|
6084
5993
|
<p class="facts-note">
|
|
6085
|
-
${
|
|
5994
|
+
${so()}
|
|
6086
5995
|
<span>${e.facts.length === 1 ? "This is saved to your My WRAL dashboard, where you can change it anytime." : "These are saved to your My WRAL dashboard, where you can change them anytime."}</span>
|
|
6087
5996
|
</p>
|
|
6088
5997
|
${e.stage === "error" ? A`
|
|
@@ -6109,7 +6018,7 @@ ${this.factsApi || ""}`;
|
|
|
6109
6018
|
<div class="bottom-bar">
|
|
6110
6019
|
<div class="inner">
|
|
6111
6020
|
<button type="button" class="btn-ghost" ?disabled=${e || this._phase === "pick"}
|
|
6112
|
-
@click=${() => this.#
|
|
6021
|
+
@click=${() => this.#j()}>← Back</button>
|
|
6113
6022
|
<button type="button" class="btn-ghost" ?disabled=${this._phase === "submitting"}
|
|
6114
6023
|
@click=${() => this.#A()}>Start over</button>
|
|
6115
6024
|
<span class="note">Your report goes to a person on the right desk.</span>
|
|
@@ -6121,7 +6030,7 @@ ${this.factsApi || ""}`;
|
|
|
6121
6030
|
this.renderRoot?.querySelector(".chat")?.lastElementChild?.scrollIntoView?.({ block: "nearest" });
|
|
6122
6031
|
}
|
|
6123
6032
|
}
|
|
6124
|
-
class
|
|
6033
|
+
class pa extends ae {
|
|
6125
6034
|
static properties = {
|
|
6126
6035
|
files: { attribute: !1 },
|
|
6127
6036
|
lostMeta: { attribute: !1 },
|
|
@@ -6129,7 +6038,7 @@ class ya extends ae {
|
|
|
6129
6038
|
required: { type: Boolean },
|
|
6130
6039
|
label: { type: String }
|
|
6131
6040
|
};
|
|
6132
|
-
static styles =
|
|
6041
|
+
static styles = Y`
|
|
6133
6042
|
:host { display: block; }
|
|
6134
6043
|
input[type=file] { font-family: inherit; font-size: 14px; }
|
|
6135
6044
|
.file-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
|
|
@@ -6161,7 +6070,7 @@ class ya extends ae {
|
|
|
6161
6070
|
composed: !0
|
|
6162
6071
|
}));
|
|
6163
6072
|
}
|
|
6164
|
-
#
|
|
6073
|
+
#h(e) {
|
|
6165
6074
|
const t = [...e.target.files || []];
|
|
6166
6075
|
this.#u([...this.files || [], ...t]), e.target.value = "";
|
|
6167
6076
|
}
|
|
@@ -6175,13 +6084,13 @@ class ya extends ae {
|
|
|
6175
6084
|
<input type="file" multiple
|
|
6176
6085
|
accept=${this.#l || E}
|
|
6177
6086
|
aria-label=${this.label}
|
|
6178
|
-
@change=${this.#
|
|
6087
|
+
@change=${this.#h}>
|
|
6179
6088
|
${e.length ? A`
|
|
6180
6089
|
<ul class="file-list">
|
|
6181
6090
|
${e.map((r, i) => A`
|
|
6182
6091
|
<li>
|
|
6183
6092
|
<span>${r.name}</span>
|
|
6184
|
-
<span class="size">${
|
|
6093
|
+
<span class="size">${ga(r.size)}</span>
|
|
6185
6094
|
<button type="button" class="remove"
|
|
6186
6095
|
aria-label="Remove ${r.name}"
|
|
6187
6096
|
@click=${() => this.#t(i)}>✕</button>
|
|
@@ -6200,15 +6109,15 @@ class ya extends ae {
|
|
|
6200
6109
|
`;
|
|
6201
6110
|
}
|
|
6202
6111
|
}
|
|
6203
|
-
function
|
|
6112
|
+
function ga(n) {
|
|
6204
6113
|
return Number.isFinite(n) ? n >= 1024 * 1024 ? `${(n / (1024 * 1024)).toFixed(1)} MB` : n >= 1024 ? `${Math.round(n / 1024)} KB` : `${n} B` : "";
|
|
6205
6114
|
}
|
|
6206
|
-
const
|
|
6115
|
+
const ma = (n, e, t, r) => {
|
|
6207
6116
|
const i = e.target.value.replace(/\D/g, "").slice(-1), s = [...t];
|
|
6208
6117
|
s[n] = i;
|
|
6209
6118
|
const o = s.join(""), u = s.every((c) => c !== "");
|
|
6210
6119
|
return r("code-change", { value: o, complete: u }), i && u && r("code-complete", { value: o }), s;
|
|
6211
|
-
},
|
|
6120
|
+
}, ya = (n, e, t, r) => {
|
|
6212
6121
|
if (e.key === "Backspace") {
|
|
6213
6122
|
const i = [...t];
|
|
6214
6123
|
!i[n] && n > 0 ? i[n - 1] = "" : i[n] && (i[n] = "");
|
|
@@ -6216,7 +6125,7 @@ const wa = (n, e, t, r) => {
|
|
|
6216
6125
|
return r("code-change", { value: s, complete: !1 }), i;
|
|
6217
6126
|
}
|
|
6218
6127
|
return t;
|
|
6219
|
-
},
|
|
6128
|
+
}, va = (n, e, t) => {
|
|
6220
6129
|
n.preventDefault();
|
|
6221
6130
|
const r = n.clipboardData.getData("text").replace(/\D/g, "").slice(0, 6);
|
|
6222
6131
|
if (r.length === 0) return e;
|
|
@@ -6226,13 +6135,13 @@ const wa = (n, e, t, r) => {
|
|
|
6226
6135
|
const s = i.join(""), o = i.every((u) => u !== "");
|
|
6227
6136
|
return t("code-change", { value: s, complete: o }), r.length === 6 && t("code-complete", { value: s }), i;
|
|
6228
6137
|
};
|
|
6229
|
-
class
|
|
6138
|
+
class wa extends ae {
|
|
6230
6139
|
static formAssociated = !0;
|
|
6231
6140
|
static properties = {
|
|
6232
6141
|
_values: { type: Array, state: !0 },
|
|
6233
6142
|
disabled: { type: Boolean, reflect: !0 }
|
|
6234
6143
|
};
|
|
6235
|
-
static styles =
|
|
6144
|
+
static styles = Y`
|
|
6236
6145
|
:host {
|
|
6237
6146
|
display: block;
|
|
6238
6147
|
width: 100%;
|
|
@@ -6331,7 +6240,7 @@ class _a extends ae {
|
|
|
6331
6240
|
this.getInputs()[e]?.focus();
|
|
6332
6241
|
}
|
|
6333
6242
|
inputHandler(e, t) {
|
|
6334
|
-
this._values =
|
|
6243
|
+
this._values = ma(
|
|
6335
6244
|
e,
|
|
6336
6245
|
t,
|
|
6337
6246
|
this._values,
|
|
@@ -6341,7 +6250,7 @@ class _a extends ae {
|
|
|
6341
6250
|
keydownHandler(e, t) {
|
|
6342
6251
|
if (t.key === "Backspace") {
|
|
6343
6252
|
const r = !this._values[e];
|
|
6344
|
-
this._values =
|
|
6253
|
+
this._values = ya(
|
|
6345
6254
|
e,
|
|
6346
6255
|
t,
|
|
6347
6256
|
this._values,
|
|
@@ -6350,7 +6259,7 @@ class _a extends ae {
|
|
|
6350
6259
|
}
|
|
6351
6260
|
}
|
|
6352
6261
|
pasteHandler(e) {
|
|
6353
|
-
this._values =
|
|
6262
|
+
this._values = va(e, this._values, this.dispatchCustomEvent.bind(this));
|
|
6354
6263
|
}
|
|
6355
6264
|
render() {
|
|
6356
6265
|
return A`
|
|
@@ -6375,18 +6284,18 @@ class _a extends ae {
|
|
|
6375
6284
|
}
|
|
6376
6285
|
}
|
|
6377
6286
|
typeof window < "u" && !window.AmazonCognitoIdentity && (window.AmazonCognitoIdentity = As);
|
|
6378
|
-
const
|
|
6379
|
-
"wral-report-it":
|
|
6380
|
-
"wral-report-media":
|
|
6381
|
-
"wral-code-input":
|
|
6287
|
+
const ba = {
|
|
6288
|
+
"wral-report-it": da,
|
|
6289
|
+
"wral-report-media": pa,
|
|
6290
|
+
"wral-code-input": wa
|
|
6382
6291
|
};
|
|
6383
|
-
function
|
|
6292
|
+
function Sa() {
|
|
6384
6293
|
const n = globalThis?.customElements;
|
|
6385
6294
|
if (n)
|
|
6386
|
-
for (const [e, t] of Object.entries(
|
|
6295
|
+
for (const [e, t] of Object.entries(ba))
|
|
6387
6296
|
n.get(e) || n.define(e, t);
|
|
6388
6297
|
}
|
|
6389
|
-
typeof window < "u" && globalThis.customElements &&
|
|
6298
|
+
typeof window < "u" && globalThis.customElements && Sa();
|
|
6390
6299
|
export {
|
|
6391
|
-
|
|
6300
|
+
Sa as defineAll
|
|
6392
6301
|
};
|