@wral/report-it 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var gn = /* @__PURE__ */ (function() {
|
|
2
2
|
function n(t) {
|
|
3
3
|
var r = t || {}, i = r.ValidationData, s = r.Username, o = r.Password, l = r.AuthParameters, h = r.ClientMetadata;
|
|
4
4
|
this.validationData = i || {}, this.authParameters = l || {}, this.clientMetadata = h || {}, this.username = s, this.password = o;
|
|
@@ -16,7 +16,7 @@ var dn = /* @__PURE__ */ (function() {
|
|
|
16
16
|
return this.clientMetadata;
|
|
17
17
|
}, n;
|
|
18
18
|
})();
|
|
19
|
-
function
|
|
19
|
+
function It(n) {
|
|
20
20
|
if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
|
|
21
21
|
var e = n.default;
|
|
22
22
|
if (typeof e == "function") {
|
|
@@ -40,10 +40,10 @@ function Ut(n) {
|
|
|
40
40
|
});
|
|
41
41
|
}), t;
|
|
42
42
|
}
|
|
43
|
-
var rt = {}, we = {},
|
|
44
|
-
function
|
|
45
|
-
if (
|
|
46
|
-
|
|
43
|
+
var rt = {}, we = {}, Yt;
|
|
44
|
+
function mn() {
|
|
45
|
+
if (Yt) return we;
|
|
46
|
+
Yt = 1, we.byteLength = l, we.toByteArray = d, we.fromByteArray = y;
|
|
47
47
|
for (var n = [], e = [], t = typeof Uint8Array < "u" ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, s = r.length; i < s; ++i)
|
|
48
48
|
n[i] = r[i], e[r.charCodeAt(i)] = i;
|
|
49
49
|
e[45] = 62, e[95] = 63;
|
|
@@ -89,9 +89,9 @@ function pn() {
|
|
|
89
89
|
return we;
|
|
90
90
|
}
|
|
91
91
|
var Ke = {};
|
|
92
|
-
var
|
|
93
|
-
function
|
|
94
|
-
return
|
|
92
|
+
var Gt;
|
|
93
|
+
function yn() {
|
|
94
|
+
return Gt || (Gt = 1, Ke.read = function(n, e, t, r, i) {
|
|
95
95
|
var s, o, l = i * 8 - r - 1, h = (1 << l) - 1, d = h >> 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 += l; p > 0; s = s * 256 + n[e + m], m += y, p -= 8)
|
|
97
97
|
;
|
|
@@ -114,19 +114,19 @@ function gn() {
|
|
|
114
114
|
n[t + v - b] |= _ * 128;
|
|
115
115
|
}), Ke;
|
|
116
116
|
}
|
|
117
|
-
var nt,
|
|
118
|
-
function
|
|
119
|
-
if (
|
|
120
|
-
|
|
117
|
+
var nt, Jt;
|
|
118
|
+
function vn() {
|
|
119
|
+
if (Jt) return nt;
|
|
120
|
+
Jt = 1;
|
|
121
121
|
var n = {}.toString;
|
|
122
122
|
return nt = Array.isArray || function(e) {
|
|
123
123
|
return n.call(e) == "[object Array]";
|
|
124
124
|
}, nt;
|
|
125
125
|
}
|
|
126
|
-
var
|
|
127
|
-
function
|
|
128
|
-
return
|
|
129
|
-
var e =
|
|
126
|
+
var Zt;
|
|
127
|
+
function wn() {
|
|
128
|
+
return Zt || (Zt = 1, (function(n) {
|
|
129
|
+
var e = mn(), t = yn(), r = vn();
|
|
130
130
|
n.Buffer = l, n.SlowBuffer = E, n.INSPECT_MAX_BYTES = 50, l.TYPED_ARRAY_SUPPORT = globalThis.TYPED_ARRAY_SUPPORT !== void 0 ? globalThis.TYPED_ARRAY_SUPPORT : i(), n.kMaxLength = s();
|
|
131
131
|
function i() {
|
|
132
132
|
try {
|
|
@@ -226,7 +226,7 @@ function yn() {
|
|
|
226
226
|
}
|
|
227
227
|
if (a) {
|
|
228
228
|
if (typeof ArrayBuffer < "u" && a.buffer instanceof ArrayBuffer || "length" in a)
|
|
229
|
-
return typeof a.length != "number" ||
|
|
229
|
+
return typeof a.length != "number" || pn(a.length) ? o(c, 0) : v(c, a);
|
|
230
230
|
if (a.type === "Buffer" && r(a.data))
|
|
231
231
|
return v(c, a.data);
|
|
232
232
|
}
|
|
@@ -313,7 +313,7 @@ function yn() {
|
|
|
313
313
|
case "hex":
|
|
314
314
|
return u >>> 1;
|
|
315
315
|
case "base64":
|
|
316
|
-
return
|
|
316
|
+
return Ht(c).length;
|
|
317
317
|
default:
|
|
318
318
|
if (f) return Ne(c).length;
|
|
319
319
|
a = ("" + a).toLowerCase(), f = !0;
|
|
@@ -327,22 +327,22 @@ function yn() {
|
|
|
327
327
|
for (c || (c = "utf8"); ; )
|
|
328
328
|
switch (c) {
|
|
329
329
|
case "hex":
|
|
330
|
-
return
|
|
330
|
+
return on(this, a, u);
|
|
331
331
|
case "utf8":
|
|
332
332
|
case "utf-8":
|
|
333
333
|
return ve(this, a, u);
|
|
334
334
|
case "ascii":
|
|
335
|
-
return
|
|
335
|
+
return nn(this, a, u);
|
|
336
336
|
case "latin1":
|
|
337
337
|
case "binary":
|
|
338
|
-
return
|
|
338
|
+
return sn(this, a, u);
|
|
339
339
|
case "base64":
|
|
340
340
|
return le(this, a, u);
|
|
341
341
|
case "ucs2":
|
|
342
342
|
case "ucs-2":
|
|
343
343
|
case "utf16le":
|
|
344
344
|
case "utf-16le":
|
|
345
|
-
return
|
|
345
|
+
return an(this, a, u);
|
|
346
346
|
default:
|
|
347
347
|
if (f) throw new TypeError("Unknown encoding: " + c);
|
|
348
348
|
c = (c + "").toLowerCase(), f = !0;
|
|
@@ -423,8 +423,8 @@ function yn() {
|
|
|
423
423
|
return -1;
|
|
424
424
|
w = 2, S /= 2, I /= 2, u /= 2;
|
|
425
425
|
}
|
|
426
|
-
function D(
|
|
427
|
-
return w === 1 ?
|
|
426
|
+
function D(zt, Wt) {
|
|
427
|
+
return w === 1 ? zt[Wt] : zt.readUInt16BE(Wt * w);
|
|
428
428
|
}
|
|
429
429
|
var R;
|
|
430
430
|
if (g) {
|
|
@@ -469,17 +469,17 @@ function yn() {
|
|
|
469
469
|
function G(c, a, u, f) {
|
|
470
470
|
return qe(Ne(a, c.length - u), c, u, f);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
return qe(
|
|
472
|
+
function j(c, a, u, f) {
|
|
473
|
+
return qe(fn(a), c, u, f);
|
|
474
474
|
}
|
|
475
475
|
function Q(c, a, u, f) {
|
|
476
|
-
return
|
|
476
|
+
return j(c, a, u, f);
|
|
477
477
|
}
|
|
478
478
|
function ue(c, a, u, f) {
|
|
479
|
-
return qe(
|
|
479
|
+
return qe(Ht(a), c, u, f);
|
|
480
480
|
}
|
|
481
481
|
function ye(c, a, u, f) {
|
|
482
|
-
return qe(
|
|
482
|
+
return qe(dn(a, c.length - u), c, u, f);
|
|
483
483
|
}
|
|
484
484
|
l.prototype.write = function(a, u, f, g) {
|
|
485
485
|
if (u === void 0)
|
|
@@ -504,7 +504,7 @@ function yn() {
|
|
|
504
504
|
case "utf-8":
|
|
505
505
|
return G(this, a, u, f);
|
|
506
506
|
case "ascii":
|
|
507
|
-
return
|
|
507
|
+
return j(this, a, u, f);
|
|
508
508
|
case "latin1":
|
|
509
509
|
case "binary":
|
|
510
510
|
return Q(this, a, u, f);
|
|
@@ -564,28 +564,28 @@ function yn() {
|
|
|
564
564
|
);
|
|
565
565
|
return u;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function nn(c, a, u) {
|
|
568
568
|
var f = "";
|
|
569
569
|
u = Math.min(c.length, u);
|
|
570
570
|
for (var g = a; g < u; ++g)
|
|
571
571
|
f += String.fromCharCode(c[g] & 127);
|
|
572
572
|
return f;
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function sn(c, a, u) {
|
|
575
575
|
var f = "";
|
|
576
576
|
u = Math.min(c.length, u);
|
|
577
577
|
for (var g = a; g < u; ++g)
|
|
578
578
|
f += String.fromCharCode(c[g]);
|
|
579
579
|
return f;
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function on(c, a, u) {
|
|
582
582
|
var f = c.length;
|
|
583
583
|
(!a || a < 0) && (a = 0), (!u || u < 0 || u > f) && (u = f);
|
|
584
584
|
for (var g = "", w = a; w < u; ++w)
|
|
585
|
-
g +=
|
|
585
|
+
g += hn(c[w]);
|
|
586
586
|
return g;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function an(c, a, u) {
|
|
589
589
|
for (var f = c.slice(a, u), g = "", w = 0; w < f.length; w += 2)
|
|
590
590
|
g += String.fromCharCode(f[w] + f[w + 1] * 256);
|
|
591
591
|
return g;
|
|
@@ -735,25 +735,25 @@ function yn() {
|
|
|
735
735
|
}, l.prototype.writeInt32BE = function(a, u, f) {
|
|
736
736
|
return a = +a, u = u | 0, f || L(this, a, u, 4, 2147483647, -2147483648), a < 0 && (a = 4294967295 + a + 1), l.TYPED_ARRAY_SUPPORT ? (this[u] = a >>> 24, this[u + 1] = a >>> 16, this[u + 2] = a >>> 8, this[u + 3] = a & 255) : Oe(this, a, u, !1), u + 4;
|
|
737
737
|
};
|
|
738
|
-
function
|
|
738
|
+
function Kt(c, a, u, f, g, w) {
|
|
739
739
|
if (u + f > c.length) throw new RangeError("Index out of range");
|
|
740
740
|
if (u < 0) throw new RangeError("Index out of range");
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
return g ||
|
|
742
|
+
function jt(c, a, u, f, g) {
|
|
743
|
+
return g || Kt(c, a, u, 4), t.write(c, a, u, f, 23, 4), u + 4;
|
|
744
744
|
}
|
|
745
745
|
l.prototype.writeFloatLE = function(a, u, f) {
|
|
746
|
-
return
|
|
746
|
+
return jt(this, a, u, !0, f);
|
|
747
747
|
}, l.prototype.writeFloatBE = function(a, u, f) {
|
|
748
|
-
return
|
|
748
|
+
return jt(this, a, u, !1, f);
|
|
749
749
|
};
|
|
750
|
-
function
|
|
751
|
-
return g ||
|
|
750
|
+
function Vt(c, a, u, f, g) {
|
|
751
|
+
return g || Kt(c, a, u, 8), t.write(c, a, u, f, 52, 8), u + 8;
|
|
752
752
|
}
|
|
753
753
|
l.prototype.writeDoubleLE = function(a, u, f) {
|
|
754
|
-
return
|
|
754
|
+
return Vt(this, a, u, !0, f);
|
|
755
755
|
}, l.prototype.writeDoubleBE = function(a, u, f) {
|
|
756
|
-
return
|
|
756
|
+
return Vt(this, a, u, !1, f);
|
|
757
757
|
}, l.prototype.copy = function(a, u, f, g) {
|
|
758
758
|
if (f || (f = 0), !g && g !== 0 && (g = this.length), u >= a.length && (u = a.length), u || (u = 0), g > 0 && g < f && (g = f), g === f || a.length === 0 || this.length === 0) return 0;
|
|
759
759
|
if (u < 0)
|
|
@@ -802,17 +802,17 @@ function yn() {
|
|
|
802
802
|
}
|
|
803
803
|
return this;
|
|
804
804
|
};
|
|
805
|
-
var
|
|
806
|
-
function
|
|
807
|
-
if (c =
|
|
805
|
+
var un = /[^+\/0-9A-Za-z-_]/g;
|
|
806
|
+
function ln(c) {
|
|
807
|
+
if (c = cn(c).replace(un, ""), c.length < 2) return "";
|
|
808
808
|
for (; c.length % 4 !== 0; )
|
|
809
809
|
c = c + "=";
|
|
810
810
|
return c;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function cn(c) {
|
|
813
813
|
return c.trim ? c.trim() : c.replace(/^\s+|\s+$/g, "");
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function hn(c) {
|
|
816
816
|
return c < 16 ? "0" + c.toString(16) : c.toString(16);
|
|
817
817
|
}
|
|
818
818
|
function Ne(c, a) {
|
|
@@ -865,30 +865,30 @@ function yn() {
|
|
|
865
865
|
}
|
|
866
866
|
return w;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function fn(c) {
|
|
869
869
|
for (var a = [], u = 0; u < c.length; ++u)
|
|
870
870
|
a.push(c.charCodeAt(u) & 255);
|
|
871
871
|
return a;
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function dn(c, a) {
|
|
874
874
|
for (var u, f, g, w = [], S = 0; S < c.length && !((a -= 2) < 0); ++S)
|
|
875
875
|
u = c.charCodeAt(S), f = u >> 8, g = u % 256, w.push(g), w.push(f);
|
|
876
876
|
return w;
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
return e.toByteArray(
|
|
878
|
+
function Ht(c) {
|
|
879
|
+
return e.toByteArray(ln(c));
|
|
880
880
|
}
|
|
881
881
|
function qe(c, a, u, f) {
|
|
882
882
|
for (var g = 0; g < f && !(g + u >= a.length || g >= c.length); ++g)
|
|
883
883
|
a[g + u] = c[g];
|
|
884
884
|
return g;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function pn(c) {
|
|
887
887
|
return c !== c;
|
|
888
888
|
}
|
|
889
889
|
})(rt)), rt;
|
|
890
890
|
}
|
|
891
|
-
var k =
|
|
891
|
+
var k = wn(), W;
|
|
892
892
|
typeof window < "u" && window.crypto && (W = window.crypto);
|
|
893
893
|
!W && typeof window < "u" && window.msCrypto && (W = window.msCrypto);
|
|
894
894
|
!W && typeof globalThis < "u" && globalThis.crypto && (W = globalThis.crypto);
|
|
@@ -897,7 +897,7 @@ if (!W && typeof require == "function")
|
|
|
897
897
|
W = require("crypto");
|
|
898
898
|
} catch {
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function bn() {
|
|
901
901
|
if (W) {
|
|
902
902
|
if (typeof W.getRandomValues == "function")
|
|
903
903
|
try {
|
|
@@ -912,50 +912,50 @@ function vn() {
|
|
|
912
912
|
}
|
|
913
913
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function Sn(n) {
|
|
916
916
|
for (var e = n.words, t = n.sigBytes, r = [], i = 0; i < t; i++) {
|
|
917
917
|
var s = e[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
918
918
|
r.push((s >>> 4).toString(16)), r.push((s & 15).toString(16));
|
|
919
919
|
}
|
|
920
920
|
return r.join("");
|
|
921
921
|
}
|
|
922
|
-
var
|
|
922
|
+
var Pr = /* @__PURE__ */ (function() {
|
|
923
923
|
function n(t, r) {
|
|
924
924
|
t = this.words = t || [], r != null ? this.sigBytes = r : this.sigBytes = t.length * 4;
|
|
925
925
|
}
|
|
926
926
|
var e = n.prototype;
|
|
927
927
|
return e.random = function(r) {
|
|
928
928
|
for (var i = [], s = 0; s < r; s += 4)
|
|
929
|
-
i.push(
|
|
929
|
+
i.push(bn());
|
|
930
930
|
return new n(i, r);
|
|
931
931
|
}, e.toString = function() {
|
|
932
|
-
return
|
|
932
|
+
return Sn(this);
|
|
933
933
|
}, n;
|
|
934
934
|
})(), it = {};
|
|
935
|
-
var
|
|
936
|
-
return
|
|
935
|
+
var dt = function(n, e) {
|
|
936
|
+
return dt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
|
|
937
937
|
t.__proto__ = r;
|
|
938
938
|
} || function(t, r) {
|
|
939
939
|
for (var i in r) r.hasOwnProperty(i) && (t[i] = r[i]);
|
|
940
|
-
},
|
|
940
|
+
}, dt(n, e);
|
|
941
941
|
};
|
|
942
|
-
function
|
|
943
|
-
|
|
942
|
+
function _n(n, e) {
|
|
943
|
+
dt(n, e);
|
|
944
944
|
function t() {
|
|
945
945
|
this.constructor = n;
|
|
946
946
|
}
|
|
947
947
|
n.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
948
948
|
}
|
|
949
|
-
var
|
|
950
|
-
return
|
|
949
|
+
var pt = function() {
|
|
950
|
+
return pt = Object.assign || function(e) {
|
|
951
951
|
for (var t, r = 1, i = arguments.length; r < i; r++) {
|
|
952
952
|
t = arguments[r];
|
|
953
953
|
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
|
|
954
954
|
}
|
|
955
955
|
return e;
|
|
956
|
-
},
|
|
956
|
+
}, pt.apply(this, arguments);
|
|
957
957
|
};
|
|
958
|
-
function
|
|
958
|
+
function An(n, e) {
|
|
959
959
|
var t = {};
|
|
960
960
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
961
961
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -963,21 +963,21 @@ function Sn(n, e) {
|
|
|
963
963
|
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
|
|
964
964
|
return t;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function xn(n, e, t, r) {
|
|
967
967
|
var i = arguments.length, s = i < 3 ? e : r === null ? r = Object.getOwnPropertyDescriptor(e, t) : r, o;
|
|
968
968
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(n, e, t, r);
|
|
969
969
|
else for (var l = n.length - 1; l >= 0; l--) (o = n[l]) && (s = (i < 3 ? o(s) : i > 3 ? o(e, t, s) : o(e, t)) || s);
|
|
970
970
|
return i > 3 && s && Object.defineProperty(e, t, s), s;
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function Cn(n, e) {
|
|
973
973
|
return function(t, r) {
|
|
974
974
|
e(t, r, n);
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function En(n, e) {
|
|
978
978
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(n, e);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function Un(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 Cn(n, e, t, r) {
|
|
|
1004
1004
|
d((r = r.apply(n, e || [])).next());
|
|
1005
1005
|
});
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function Tn(n, e) {
|
|
1008
1008
|
var t = { label: 0, sent: function() {
|
|
1009
1009
|
if (s[0] & 1) throw s[1];
|
|
1010
1010
|
return s[1];
|
|
@@ -1064,13 +1064,13 @@ function En(n, e) {
|
|
|
1064
1064
|
return { value: d[0] ? d[1] : void 0, done: !0 };
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function In(n, e, t, r) {
|
|
1068
1068
|
r === void 0 && (r = t), n[r] = e[t];
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function Dn(n, e) {
|
|
1071
1071
|
for (var t in n) t !== "default" && !e.hasOwnProperty(t) && (e[t] = n[t]);
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function gt(n) {
|
|
1074
1074
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && n[e], r = 0;
|
|
1075
1075
|
if (t) return t.call(n);
|
|
1076
1076
|
if (n && typeof n.length == "number") return {
|
|
@@ -1080,7 +1080,7 @@ function dt(n) {
|
|
|
1080
1080
|
};
|
|
1081
1081
|
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function Fr(n, e) {
|
|
1084
1084
|
var t = typeof Symbol == "function" && n[Symbol.iterator];
|
|
1085
1085
|
if (!t) return n;
|
|
1086
1086
|
var r = t.call(n), i, s = [], o;
|
|
@@ -1097,12 +1097,12 @@ function $r(n, e) {
|
|
|
1097
1097
|
}
|
|
1098
1098
|
return s;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function kn() {
|
|
1101
1101
|
for (var n = [], e = 0; e < arguments.length; e++)
|
|
1102
|
-
n = n.concat(
|
|
1102
|
+
n = n.concat(Fr(arguments[e]));
|
|
1103
1103
|
return n;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function Rn() {
|
|
1106
1106
|
for (var n = 0, e = 0, t = arguments.length; e < t; e++) n += arguments[e].length;
|
|
1107
1107
|
for (var r = Array(n), i = 0, e = 0; e < t; e++)
|
|
1108
1108
|
for (var s = arguments[e], o = 0, l = s.length; o < l; o++, i++)
|
|
@@ -1112,7 +1112,7 @@ function Dn() {
|
|
|
1112
1112
|
function ke(n) {
|
|
1113
1113
|
return this instanceof ke ? (this.v = n, this) : new ke(n);
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function $n(n, e, t) {
|
|
1116
1116
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1117
1117
|
var r = t.apply(n, e || []), i, s = [];
|
|
1118
1118
|
return i = {}, o("next"), o("throw"), o("return"), i[Symbol.asyncIterator] = function() {
|
|
@@ -1145,7 +1145,7 @@ function kn(n, e, t) {
|
|
|
1145
1145
|
y(v), s.shift(), s.length && l(s[0][0], s[0][1]);
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function Pn(n) {
|
|
1149
1149
|
var e, t;
|
|
1150
1150
|
return e = {}, r("next"), r("throw", function(i) {
|
|
1151
1151
|
throw i;
|
|
@@ -1158,10 +1158,10 @@ function Rn(n) {
|
|
|
1158
1158
|
} : s;
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function Fn(n) {
|
|
1162
1162
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1163
1163
|
var e = n[Symbol.asyncIterator], t;
|
|
1164
|
-
return e ? e.call(n) : (n = typeof
|
|
1164
|
+
return e ? e.call(n) : (n = typeof gt == "function" ? gt(n) : n[Symbol.iterator](), t = {}, r("next"), r("throw"), r("return"), t[Symbol.asyncIterator] = function() {
|
|
1165
1165
|
return this;
|
|
1166
1166
|
}, t);
|
|
1167
1167
|
function r(s) {
|
|
@@ -1177,60 +1177,60 @@ function $n(n) {
|
|
|
1177
1177
|
}, o);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function Bn(n, e) {
|
|
1181
1181
|
return Object.defineProperty ? Object.defineProperty(n, "raw", { value: e }) : n.raw = e, n;
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function Mn(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 On(n) {
|
|
1191
1191
|
return n && n.__esModule ? n : { default: n };
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Nn(n, e) {
|
|
1194
1194
|
if (!e.has(n))
|
|
1195
1195
|
throw new TypeError("attempted to get private field on non-instance");
|
|
1196
1196
|
return e.get(n);
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function qn(n, e, t) {
|
|
1199
1199
|
if (!e.has(n))
|
|
1200
1200
|
throw new TypeError("attempted to set private field on non-instance");
|
|
1201
1201
|
return e.set(n, t), t;
|
|
1202
1202
|
}
|
|
1203
|
-
const
|
|
1203
|
+
const Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1204
1204
|
__proto__: null,
|
|
1205
1205
|
get __assign() {
|
|
1206
|
-
return
|
|
1206
|
+
return pt;
|
|
1207
1207
|
},
|
|
1208
|
-
__asyncDelegator:
|
|
1209
|
-
__asyncGenerator:
|
|
1210
|
-
__asyncValues:
|
|
1208
|
+
__asyncDelegator: Pn,
|
|
1209
|
+
__asyncGenerator: $n,
|
|
1210
|
+
__asyncValues: Fn,
|
|
1211
1211
|
__await: ke,
|
|
1212
|
-
__awaiter:
|
|
1213
|
-
__classPrivateFieldGet:
|
|
1214
|
-
__classPrivateFieldSet:
|
|
1215
|
-
__createBinding:
|
|
1216
|
-
__decorate:
|
|
1217
|
-
__exportStar:
|
|
1218
|
-
__extends:
|
|
1219
|
-
__generator:
|
|
1220
|
-
__importDefault:
|
|
1221
|
-
__importStar:
|
|
1222
|
-
__makeTemplateObject:
|
|
1223
|
-
__metadata:
|
|
1224
|
-
__param:
|
|
1225
|
-
__read:
|
|
1226
|
-
__rest:
|
|
1227
|
-
__spread:
|
|
1228
|
-
__spreadArrays:
|
|
1229
|
-
__values:
|
|
1230
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1231
|
-
var be = {},
|
|
1232
|
-
function
|
|
1233
|
-
return
|
|
1212
|
+
__awaiter: Un,
|
|
1213
|
+
__classPrivateFieldGet: Nn,
|
|
1214
|
+
__classPrivateFieldSet: qn,
|
|
1215
|
+
__createBinding: In,
|
|
1216
|
+
__decorate: xn,
|
|
1217
|
+
__exportStar: Dn,
|
|
1218
|
+
__extends: _n,
|
|
1219
|
+
__generator: Tn,
|
|
1220
|
+
__importDefault: On,
|
|
1221
|
+
__importStar: Mn,
|
|
1222
|
+
__makeTemplateObject: Bn,
|
|
1223
|
+
__metadata: En,
|
|
1224
|
+
__param: Cn,
|
|
1225
|
+
__read: Fr,
|
|
1226
|
+
__rest: An,
|
|
1227
|
+
__spread: kn,
|
|
1228
|
+
__spreadArrays: Rn,
|
|
1229
|
+
__values: gt
|
|
1230
|
+
}, Symbol.toStringTag, { value: "Module" })), Br = /* @__PURE__ */ It(Ln);
|
|
1231
|
+
var be = {}, V = {}, Xt;
|
|
1232
|
+
function Mr() {
|
|
1233
|
+
return Xt || (Xt = 1, Object.defineProperty(V, "__esModule", { value: !0 }), V.MAX_HASHABLE_LENGTH = V.INIT = V.KEY = V.DIGEST_LENGTH = V.BLOCK_SIZE = void 0, V.BLOCK_SIZE = 64, V.DIGEST_LENGTH = 32, V.KEY = new Uint32Array([
|
|
1234
1234
|
1116352408,
|
|
1235
1235
|
1899447441,
|
|
1236
1236
|
3049323471,
|
|
@@ -1295,7 +1295,7 @@ function Fr() {
|
|
|
1295
1295
|
2756734187,
|
|
1296
1296
|
3204031479,
|
|
1297
1297
|
3329325298
|
|
1298
|
-
]),
|
|
1298
|
+
]), V.INIT = [
|
|
1299
1299
|
1779033703,
|
|
1300
1300
|
3144134277,
|
|
1301
1301
|
1013904242,
|
|
@@ -1304,13 +1304,13 @@ function Fr() {
|
|
|
1304
1304
|
2600822924,
|
|
1305
1305
|
528734635,
|
|
1306
1306
|
1541459225
|
|
1307
|
-
],
|
|
1307
|
+
], V.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1), V;
|
|
1308
1308
|
}
|
|
1309
|
-
var Se = {},
|
|
1310
|
-
function
|
|
1311
|
-
if (
|
|
1312
|
-
|
|
1313
|
-
var n =
|
|
1309
|
+
var Se = {}, Qt;
|
|
1310
|
+
function Kn() {
|
|
1311
|
+
if (Qt) return Se;
|
|
1312
|
+
Qt = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.RawSha256 = void 0;
|
|
1313
|
+
var n = Mr(), e = (
|
|
1314
1314
|
/** @class */
|
|
1315
1315
|
(function() {
|
|
1316
1316
|
function t() {
|
|
@@ -1359,7 +1359,7 @@ function qn() {
|
|
|
1359
1359
|
return Se.RawSha256 = e, Se;
|
|
1360
1360
|
}
|
|
1361
1361
|
var st = {}, _e = {};
|
|
1362
|
-
const
|
|
1362
|
+
const jn = (n) => {
|
|
1363
1363
|
const e = [];
|
|
1364
1364
|
for (let t = 0, r = n.length; t < r; t++) {
|
|
1365
1365
|
const i = n.charCodeAt(t);
|
|
@@ -1374,7 +1374,7 @@ const Ln = (n) => {
|
|
|
1374
1374
|
e.push(i >> 12 | 224, i >> 6 & 63 | 128, i & 63 | 128);
|
|
1375
1375
|
}
|
|
1376
1376
|
return Uint8Array.from(e);
|
|
1377
|
-
},
|
|
1377
|
+
}, Vn = (n) => {
|
|
1378
1378
|
let e = "";
|
|
1379
1379
|
for (let t = 0, r = n.length; t < r; t++) {
|
|
1380
1380
|
const i = n[t];
|
|
@@ -1391,22 +1391,22 @@ const Ln = (n) => {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
return e;
|
|
1393
1393
|
};
|
|
1394
|
-
function
|
|
1394
|
+
function Hn(n) {
|
|
1395
1395
|
return new TextEncoder().encode(n);
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function zn(n) {
|
|
1398
1398
|
return new TextDecoder("utf-8").decode(n);
|
|
1399
1399
|
}
|
|
1400
|
-
const
|
|
1400
|
+
const Wn = (n) => typeof TextEncoder == "function" ? Hn(n) : jn(n), Yn = (n) => typeof TextDecoder == "function" ? zn(n) : Vn(n), Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1401
1401
|
__proto__: null,
|
|
1402
|
-
fromUtf8:
|
|
1403
|
-
toUtf8:
|
|
1404
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1405
|
-
var
|
|
1406
|
-
function
|
|
1407
|
-
if (
|
|
1408
|
-
|
|
1409
|
-
var n =
|
|
1402
|
+
fromUtf8: Wn,
|
|
1403
|
+
toUtf8: Yn
|
|
1404
|
+
}, Symbol.toStringTag, { value: "Module" })), Jn = /* @__PURE__ */ It(Gn);
|
|
1405
|
+
var er;
|
|
1406
|
+
function Zn() {
|
|
1407
|
+
if (er) return _e;
|
|
1408
|
+
er = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.convertToBuffer = void 0;
|
|
1409
|
+
var n = Jn, e = typeof Buffer < "u" && Buffer.from ? function(r) {
|
|
1410
1410
|
return Buffer.from(r, "utf8");
|
|
1411
1411
|
} : n.fromUtf8;
|
|
1412
1412
|
function t(r) {
|
|
@@ -1414,19 +1414,19 @@ function Gn() {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
return _e.convertToBuffer = t, _e;
|
|
1416
1416
|
}
|
|
1417
|
-
var Ae = {},
|
|
1418
|
-
function
|
|
1419
|
-
if (
|
|
1420
|
-
|
|
1417
|
+
var Ae = {}, tr;
|
|
1418
|
+
function Xn() {
|
|
1419
|
+
if (tr) return Ae;
|
|
1420
|
+
tr = 1, Object.defineProperty(Ae, "__esModule", { value: !0 }), Ae.isEmptyData = void 0;
|
|
1421
1421
|
function n(e) {
|
|
1422
1422
|
return typeof e == "string" ? e.length === 0 : e.byteLength === 0;
|
|
1423
1423
|
}
|
|
1424
1424
|
return Ae.isEmptyData = n, Ae;
|
|
1425
1425
|
}
|
|
1426
|
-
var xe = {},
|
|
1427
|
-
function
|
|
1428
|
-
if (
|
|
1429
|
-
|
|
1426
|
+
var xe = {}, rr;
|
|
1427
|
+
function Qn() {
|
|
1428
|
+
if (rr) return xe;
|
|
1429
|
+
rr = 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,
|
|
@@ -1437,10 +1437,10 @@ function Zn() {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
return xe.numToUint8 = n, xe;
|
|
1439
1439
|
}
|
|
1440
|
-
var Ce = {},
|
|
1441
|
-
function
|
|
1442
|
-
if (
|
|
1443
|
-
|
|
1440
|
+
var Ce = {}, nr;
|
|
1441
|
+
function ei() {
|
|
1442
|
+
if (nr) return Ce;
|
|
1443
|
+
nr = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.uint32ArrayFrom = void 0;
|
|
1444
1444
|
function n(e) {
|
|
1445
1445
|
if (!Array.from) {
|
|
1446
1446
|
for (var t = new Uint32Array(e.length), r = 0; r < e.length; )
|
|
@@ -1451,33 +1451,33 @@ function Xn() {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
return Ce.uint32ArrayFrom = n, Ce;
|
|
1453
1453
|
}
|
|
1454
|
-
var
|
|
1455
|
-
function
|
|
1456
|
-
return
|
|
1454
|
+
var ir;
|
|
1455
|
+
function ti() {
|
|
1456
|
+
return ir || (ir = 1, (function(n) {
|
|
1457
1457
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.uint32ArrayFrom = n.numToUint8 = n.isEmptyData = n.convertToBuffer = void 0;
|
|
1458
|
-
var e =
|
|
1458
|
+
var e = Zn();
|
|
1459
1459
|
Object.defineProperty(n, "convertToBuffer", { enumerable: !0, get: function() {
|
|
1460
1460
|
return e.convertToBuffer;
|
|
1461
1461
|
} });
|
|
1462
|
-
var t =
|
|
1462
|
+
var t = Xn();
|
|
1463
1463
|
Object.defineProperty(n, "isEmptyData", { enumerable: !0, get: function() {
|
|
1464
1464
|
return t.isEmptyData;
|
|
1465
1465
|
} });
|
|
1466
|
-
var r =
|
|
1466
|
+
var r = Qn();
|
|
1467
1467
|
Object.defineProperty(n, "numToUint8", { enumerable: !0, get: function() {
|
|
1468
1468
|
return r.numToUint8;
|
|
1469
1469
|
} });
|
|
1470
|
-
var i =
|
|
1470
|
+
var i = ei();
|
|
1471
1471
|
Object.defineProperty(n, "uint32ArrayFrom", { enumerable: !0, get: function() {
|
|
1472
1472
|
return i.uint32ArrayFrom;
|
|
1473
1473
|
} });
|
|
1474
1474
|
})(st)), st;
|
|
1475
1475
|
}
|
|
1476
|
-
var
|
|
1477
|
-
function
|
|
1478
|
-
if (
|
|
1479
|
-
|
|
1480
|
-
var n =
|
|
1476
|
+
var sr;
|
|
1477
|
+
function ri() {
|
|
1478
|
+
if (sr) return be;
|
|
1479
|
+
sr = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.Sha256 = void 0;
|
|
1480
|
+
var n = Br, e = Mr(), t = Kn(), r = ti(), i = (
|
|
1481
1481
|
/** @class */
|
|
1482
1482
|
(function() {
|
|
1483
1483
|
function o(l) {
|
|
@@ -1524,78 +1524,78 @@ function ei() {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
return be;
|
|
1526
1526
|
}
|
|
1527
|
-
var
|
|
1528
|
-
function
|
|
1529
|
-
return
|
|
1527
|
+
var or;
|
|
1528
|
+
function ni() {
|
|
1529
|
+
return or || (or = 1, (function(n) {
|
|
1530
1530
|
Object.defineProperty(n, "__esModule", { value: !0 });
|
|
1531
|
-
var e =
|
|
1532
|
-
(0, e.__exportStar)(
|
|
1531
|
+
var e = Br;
|
|
1532
|
+
(0, e.__exportStar)(ri(), n);
|
|
1533
1533
|
})(it)), it;
|
|
1534
1534
|
}
|
|
1535
|
-
var Ie =
|
|
1535
|
+
var Ie = ni();
|
|
1536
1536
|
function A(n, e) {
|
|
1537
1537
|
n != null && this.fromString(n, e);
|
|
1538
1538
|
}
|
|
1539
1539
|
function q() {
|
|
1540
1540
|
return new A(null);
|
|
1541
1541
|
}
|
|
1542
|
-
var Z,
|
|
1543
|
-
function
|
|
1542
|
+
var Z, ii = 244837814094590, ar = (ii & 16777215) == 15715070;
|
|
1543
|
+
function si(n, e, t, r, i, s) {
|
|
1544
1544
|
for (; --s >= 0; ) {
|
|
1545
1545
|
var o = e * this[n++] + t[r] + i;
|
|
1546
1546
|
i = Math.floor(o / 67108864), t[r++] = o & 67108863;
|
|
1547
1547
|
}
|
|
1548
1548
|
return i;
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function oi(n, e, t, r, i, s) {
|
|
1551
1551
|
for (var o = e & 32767, l = e >> 15; --s >= 0; ) {
|
|
1552
1552
|
var h = this[n] & 32767, d = this[n++] >> 15, p = l * h + d * o;
|
|
1553
1553
|
h = o * h + ((p & 32767) << 15) + t[r] + (i & 1073741823), i = (h >>> 30) + (p >>> 15) + l * d + (i >>> 30), t[r++] = h & 1073741823;
|
|
1554
1554
|
}
|
|
1555
1555
|
return i;
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function ai(n, e, t, r, i, s) {
|
|
1558
1558
|
for (var o = e & 16383, l = e >> 14; --s >= 0; ) {
|
|
1559
1559
|
var h = this[n] & 16383, d = this[n++] >> 14, p = l * h + d * o;
|
|
1560
1560
|
h = o * h + ((p & 16383) << 14) + t[r] + i, i = (h >> 28) + (p >> 14) + l * d, t[r++] = h & 268435455;
|
|
1561
1561
|
}
|
|
1562
1562
|
return i;
|
|
1563
1563
|
}
|
|
1564
|
-
var
|
|
1565
|
-
|
|
1564
|
+
var ur = typeof navigator < "u";
|
|
1565
|
+
ur && ar && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am = oi, Z = 30) : ur && ar && navigator.appName != "Netscape" ? (A.prototype.am = si, Z = 26) : (A.prototype.am = ai, Z = 28);
|
|
1566
1566
|
A.prototype.DB = Z;
|
|
1567
1567
|
A.prototype.DM = (1 << Z) - 1;
|
|
1568
1568
|
A.prototype.DV = 1 << Z;
|
|
1569
|
-
var
|
|
1570
|
-
A.prototype.FV = Math.pow(2,
|
|
1571
|
-
A.prototype.F1 =
|
|
1572
|
-
A.prototype.F2 = 2 * Z -
|
|
1573
|
-
var
|
|
1569
|
+
var Dt = 52;
|
|
1570
|
+
A.prototype.FV = Math.pow(2, Dt);
|
|
1571
|
+
A.prototype.F1 = Dt - Z;
|
|
1572
|
+
A.prototype.F2 = 2 * Z - Dt;
|
|
1573
|
+
var ui = "0123456789abcdefghijklmnopqrstuvwxyz", Xe = new Array(), pe, Y;
|
|
1574
1574
|
pe = 48;
|
|
1575
1575
|
for (Y = 0; Y <= 9; ++Y) Xe[pe++] = Y;
|
|
1576
1576
|
pe = 97;
|
|
1577
1577
|
for (Y = 10; Y < 36; ++Y) Xe[pe++] = Y;
|
|
1578
1578
|
pe = 65;
|
|
1579
1579
|
for (Y = 10; Y < 36; ++Y) Xe[pe++] = Y;
|
|
1580
|
-
function
|
|
1581
|
-
return
|
|
1580
|
+
function lr(n) {
|
|
1581
|
+
return ui.charAt(n);
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function li(n, e) {
|
|
1584
1584
|
var t = Xe[n.charCodeAt(e)];
|
|
1585
1585
|
return t ?? -1;
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function ci(n) {
|
|
1588
1588
|
for (var e = this.t - 1; e >= 0; --e) n[e] = this[e];
|
|
1589
1589
|
n.t = this.t, n.s = this.s;
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1591
|
+
function hi(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 kt(n) {
|
|
1595
1595
|
var e = q();
|
|
1596
1596
|
return e.fromInt(n), e;
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1598
|
+
function fi(n, e) {
|
|
1599
1599
|
var t;
|
|
1600
1600
|
if (e == 16) t = 4;
|
|
1601
1601
|
else if (e == 8) t = 3;
|
|
@@ -1605,7 +1605,7 @@ function ci(n, e) {
|
|
|
1605
1605
|
else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");
|
|
1606
1606
|
this.t = 0, this.s = 0;
|
|
1607
1607
|
for (var r = n.length, i = !1, s = 0; --r >= 0; ) {
|
|
1608
|
-
var o =
|
|
1608
|
+
var o = li(n, r);
|
|
1609
1609
|
if (o < 0) {
|
|
1610
1610
|
n.charAt(r) == "-" && (i = !0);
|
|
1611
1611
|
continue;
|
|
@@ -1614,10 +1614,10 @@ function ci(n, e) {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
this.clamp(), i && A.ZERO.subTo(this, this);
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function di() {
|
|
1618
1618
|
for (var n = this.s & this.DM; this.t > 0 && this[this.t - 1] == n; ) --this.t;
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function pi(n) {
|
|
1621
1621
|
if (this.s < 0) return "-" + this.negate().toString(n);
|
|
1622
1622
|
var e;
|
|
1623
1623
|
if (n == 16) e = 4;
|
|
@@ -1628,18 +1628,18 @@ function fi(n) {
|
|
|
1628
1628
|
else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");
|
|
1629
1629
|
var t = (1 << e) - 1, r, i = !1, s = "", o = this.t, l = this.DB - o * this.DB % e;
|
|
1630
1630
|
if (o-- > 0)
|
|
1631
|
-
for (l < this.DB && (r = this[o] >> l) > 0 && (i = !0, s =
|
|
1632
|
-
l < e ? (r = (this[o] & (1 << l) - 1) << e - l, r |= this[--o] >> (l += this.DB - e)) : (r = this[o] >> (l -= e) & t, l <= 0 && (l += this.DB, --o)), r > 0 && (i = !0), i && (s +=
|
|
1631
|
+
for (l < this.DB && (r = this[o] >> l) > 0 && (i = !0, s = lr(r)); o >= 0; )
|
|
1632
|
+
l < e ? (r = (this[o] & (1 << l) - 1) << e - l, r |= this[--o] >> (l += this.DB - e)) : (r = this[o] >> (l -= e) & t, l <= 0 && (l += this.DB, --o)), r > 0 && (i = !0), i && (s += lr(r));
|
|
1633
1633
|
return i ? s : "0";
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function gi() {
|
|
1636
1636
|
var n = q();
|
|
1637
1637
|
return A.ZERO.subTo(this, n), n;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function mi() {
|
|
1640
1640
|
return this.s < 0 ? this.negate() : this;
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function yi(n) {
|
|
1643
1643
|
var e = this.s - n.s;
|
|
1644
1644
|
if (e != 0) return e;
|
|
1645
1645
|
var t = this.t;
|
|
@@ -1647,31 +1647,31 @@ function gi(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 Rt(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 vi() {
|
|
1655
|
+
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Rt(this[this.t - 1] ^ this.s & this.DM);
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function wi(n, e) {
|
|
1658
1658
|
var t;
|
|
1659
1659
|
for (t = this.t - 1; t >= 0; --t) e[t + n] = this[t];
|
|
1660
1660
|
for (t = n - 1; t >= 0; --t) e[t] = 0;
|
|
1661
1661
|
e.t = this.t + n, e.s = this.s;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1663
|
+
function bi(n, e) {
|
|
1664
1664
|
for (var t = n; t < this.t; ++t) e[t - n] = this[t];
|
|
1665
1665
|
e.t = Math.max(this.t - n, 0), e.s = this.s;
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1667
|
+
function Si(n, e) {
|
|
1668
1668
|
var t = n % this.DB, r = this.DB - t, i = (1 << r) - 1, s = Math.floor(n / this.DB), o = this.s << t & this.DM, l;
|
|
1669
1669
|
for (l = this.t - 1; l >= 0; --l)
|
|
1670
1670
|
e[l + s + 1] = this[l] >> r | o, o = (this[l] & i) << t;
|
|
1671
1671
|
for (l = s - 1; l >= 0; --l) e[l] = 0;
|
|
1672
1672
|
e[s] = o, e.t = this.t + s + 1, e.s = this.s, e.clamp();
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function _i(n, e) {
|
|
1675
1675
|
e.s = this.s;
|
|
1676
1676
|
var t = Math.floor(n / this.DB);
|
|
1677
1677
|
if (t >= this.t) {
|
|
@@ -1684,7 +1684,7 @@ function bi(n, e) {
|
|
|
1684
1684
|
e[o - t - 1] |= (this[o] & s) << i, e[o - t] = this[o] >> r;
|
|
1685
1685
|
r > 0 && (e[this.t - t - 1] |= (this.s & s) << i), e.t = this.t - t, e.clamp();
|
|
1686
1686
|
}
|
|
1687
|
-
function
|
|
1687
|
+
function Ai(n, e) {
|
|
1688
1688
|
for (var t = 0, r = 0, i = Math.min(n.t, this.t); t < i; )
|
|
1689
1689
|
r += this[t] - n[t], e[t++] = r & this.DM, r >>= this.DB;
|
|
1690
1690
|
if (n.t < this.t) {
|
|
@@ -1698,13 +1698,13 @@ function Si(n, e) {
|
|
|
1698
1698
|
}
|
|
1699
1699
|
e.s = r < 0 ? -1 : 0, r < -1 ? e[t++] = this.DV + r : r > 0 && (e[t++] = r), e.t = t, e.clamp();
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1701
|
+
function xi(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
1705
|
e.s = 0, e.clamp(), this.s != n.s && A.ZERO.subTo(e, e);
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function Ci(n) {
|
|
1708
1708
|
for (var e = this.abs(), t = n.t = 2 * e.t; --t >= 0; ) n[t] = 0;
|
|
1709
1709
|
for (t = 0; t < e.t - 1; ++t) {
|
|
1710
1710
|
var r = e.am(t, e[t], n, 2 * t, 0, 1);
|
|
@@ -1712,7 +1712,7 @@ function Ai(n) {
|
|
|
1712
1712
|
}
|
|
1713
1713
|
n.t > 0 && (n[n.t - 1] += e.am(t, e[t], n, 2 * t, 0, 1)), n.s = 0, n.clamp();
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1715
|
+
function Ei(n, e, t) {
|
|
1716
1716
|
var r = n.abs();
|
|
1717
1717
|
if (!(r.t <= 0)) {
|
|
1718
1718
|
var i = this.abs();
|
|
@@ -1721,7 +1721,7 @@ function xi(n, e, t) {
|
|
|
1721
1721
|
return;
|
|
1722
1722
|
}
|
|
1723
1723
|
t == null && (t = q());
|
|
1724
|
-
var s = q(), o = this.s, l = n.s, h = this.DB -
|
|
1724
|
+
var s = q(), o = this.s, l = n.s, h = this.DB - Rt(r[r.t - 1]);
|
|
1725
1725
|
h > 0 ? (r.lShiftTo(h, s), i.lShiftTo(h, t)) : (r.copyTo(s), i.copyTo(t));
|
|
1726
1726
|
var d = s.t, p = s[d - 1];
|
|
1727
1727
|
if (p != 0) {
|
|
@@ -1736,21 +1736,21 @@ function xi(n, e, t) {
|
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
1739
|
-
function
|
|
1739
|
+
function Ui(n) {
|
|
1740
1740
|
var e = q();
|
|
1741
1741
|
return this.abs().divRemTo(n, null, e), this.s < 0 && e.compareTo(A.ZERO) > 0 && n.subTo(e, e), e;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function Ti() {
|
|
1744
1744
|
if (this.t < 1) return 0;
|
|
1745
1745
|
var n = this[0];
|
|
1746
1746
|
if ((n & 1) == 0) return 0;
|
|
1747
1747
|
var e = n & 3;
|
|
1748
1748
|
return e = e * (2 - (n & 15) * e) & 15, e = e * (2 - (n & 255) * e) & 255, e = e * (2 - ((n & 65535) * e & 65535)) & 65535, e = e * (2 - n * e % this.DV) % this.DV, e > 0 ? this.DV - e : -e;
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function Ii(n) {
|
|
1751
1751
|
return this.compareTo(n) == 0;
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function Di(n, e) {
|
|
1754
1754
|
for (var t = 0, r = 0, i = Math.min(n.t, this.t); t < i; )
|
|
1755
1755
|
r += this[t] + n[t], e[t++] = r & this.DM, r >>= this.DB;
|
|
1756
1756
|
if (n.t < this.t) {
|
|
@@ -1764,34 +1764,34 @@ function Ti(n, e) {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
e.s = r < 0 ? -1 : 0, r > 0 ? e[t++] = r : r < -1 && (e[t++] = this.DV + r), e.t = t, e.clamp();
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function ki(n) {
|
|
1768
1768
|
var e = q();
|
|
1769
1769
|
return this.addTo(n, e), e;
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function Ri(n) {
|
|
1772
1772
|
var e = q();
|
|
1773
1773
|
return this.subTo(n, e), e;
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1775
|
+
function $i(n) {
|
|
1776
1776
|
var e = q();
|
|
1777
1777
|
return this.multiplyTo(n, e), e;
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1779
|
+
function Pi(n) {
|
|
1780
1780
|
var e = q();
|
|
1781
1781
|
return this.divRemTo(n, e, null), e;
|
|
1782
1782
|
}
|
|
1783
1783
|
function ge(n) {
|
|
1784
1784
|
this.m = n, this.mp = n.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << n.DB - 15) - 1, this.mt2 = 2 * n.t;
|
|
1785
1785
|
}
|
|
1786
|
-
function
|
|
1786
|
+
function Fi(n) {
|
|
1787
1787
|
var e = q();
|
|
1788
1788
|
return n.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), n.s < 0 && e.compareTo(A.ZERO) > 0 && this.m.subTo(e, e), e;
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function Bi(n) {
|
|
1791
1791
|
var e = q();
|
|
1792
1792
|
return n.copyTo(e), this.reduce(e), e;
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function Mi(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 Fi(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 Oi(n, e) {
|
|
1805
1805
|
n.squareTo(e), this.reduce(e);
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function Ni(n, e, t) {
|
|
1808
1808
|
n.multiplyTo(e, t), this.reduce(t);
|
|
1809
1809
|
}
|
|
1810
|
-
ge.prototype.convert =
|
|
1811
|
-
ge.prototype.revert =
|
|
1812
|
-
ge.prototype.reduce =
|
|
1813
|
-
ge.prototype.mulTo =
|
|
1814
|
-
ge.prototype.sqrTo =
|
|
1815
|
-
function
|
|
1816
|
-
var r = n.bitLength(), i, s =
|
|
1810
|
+
ge.prototype.convert = Fi;
|
|
1811
|
+
ge.prototype.revert = Bi;
|
|
1812
|
+
ge.prototype.reduce = Mi;
|
|
1813
|
+
ge.prototype.mulTo = Ni;
|
|
1814
|
+
ge.prototype.sqrTo = Oi;
|
|
1815
|
+
function qi(n, e, t) {
|
|
1816
|
+
var r = n.bitLength(), i, s = kt(1), o = new ge(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 l = new Array(), h = 3, d = i - 1, p = (1 << i) - 1;
|
|
@@ -1823,7 +1823,7 @@ function Oi(n, e, t) {
|
|
|
1823
1823
|
l[h] = q(), o.mulTo(m, l[h - 2], l[h]), h += 2;
|
|
1824
1824
|
}
|
|
1825
1825
|
var y = n.t - 1, v, b = !0, _ = q(), C;
|
|
1826
|
-
for (r =
|
|
1826
|
+
for (r = Rt(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)), h = i; (v & 1) == 0; )
|
|
1828
1828
|
v >>= 1, --h;
|
|
1829
1829
|
if ((r -= h) < 0 && (r += this.DB, --y), b)
|
|
@@ -1839,40 +1839,40 @@ function Oi(n, e, t) {
|
|
|
1839
1839
|
var E = o.revert(s);
|
|
1840
1840
|
return t(null, E), E;
|
|
1841
1841
|
}
|
|
1842
|
-
A.prototype.copyTo =
|
|
1843
|
-
A.prototype.fromInt =
|
|
1844
|
-
A.prototype.fromString =
|
|
1845
|
-
A.prototype.clamp =
|
|
1846
|
-
A.prototype.dlShiftTo =
|
|
1847
|
-
A.prototype.drShiftTo =
|
|
1848
|
-
A.prototype.lShiftTo =
|
|
1849
|
-
A.prototype.rShiftTo =
|
|
1850
|
-
A.prototype.subTo =
|
|
1851
|
-
A.prototype.multiplyTo =
|
|
1852
|
-
A.prototype.squareTo =
|
|
1853
|
-
A.prototype.divRemTo =
|
|
1854
|
-
A.prototype.invDigit =
|
|
1855
|
-
A.prototype.addTo =
|
|
1856
|
-
A.prototype.toString =
|
|
1857
|
-
A.prototype.negate =
|
|
1858
|
-
A.prototype.abs =
|
|
1859
|
-
A.prototype.compareTo =
|
|
1860
|
-
A.prototype.bitLength =
|
|
1861
|
-
A.prototype.mod =
|
|
1862
|
-
A.prototype.equals =
|
|
1863
|
-
A.prototype.add =
|
|
1864
|
-
A.prototype.subtract =
|
|
1865
|
-
A.prototype.multiply =
|
|
1866
|
-
A.prototype.divide =
|
|
1867
|
-
A.prototype.modPow =
|
|
1868
|
-
A.ZERO =
|
|
1869
|
-
A.ONE =
|
|
1842
|
+
A.prototype.copyTo = ci;
|
|
1843
|
+
A.prototype.fromInt = hi;
|
|
1844
|
+
A.prototype.fromString = fi;
|
|
1845
|
+
A.prototype.clamp = di;
|
|
1846
|
+
A.prototype.dlShiftTo = wi;
|
|
1847
|
+
A.prototype.drShiftTo = bi;
|
|
1848
|
+
A.prototype.lShiftTo = Si;
|
|
1849
|
+
A.prototype.rShiftTo = _i;
|
|
1850
|
+
A.prototype.subTo = Ai;
|
|
1851
|
+
A.prototype.multiplyTo = xi;
|
|
1852
|
+
A.prototype.squareTo = Ci;
|
|
1853
|
+
A.prototype.divRemTo = Ei;
|
|
1854
|
+
A.prototype.invDigit = Ti;
|
|
1855
|
+
A.prototype.addTo = Di;
|
|
1856
|
+
A.prototype.toString = pi;
|
|
1857
|
+
A.prototype.negate = gi;
|
|
1858
|
+
A.prototype.abs = mi;
|
|
1859
|
+
A.prototype.compareTo = yi;
|
|
1860
|
+
A.prototype.bitLength = vi;
|
|
1861
|
+
A.prototype.mod = Ui;
|
|
1862
|
+
A.prototype.equals = Ii;
|
|
1863
|
+
A.prototype.add = ki;
|
|
1864
|
+
A.prototype.subtract = Ri;
|
|
1865
|
+
A.prototype.multiply = $i;
|
|
1866
|
+
A.prototype.divide = Pi;
|
|
1867
|
+
A.prototype.modPow = qi;
|
|
1868
|
+
A.ZERO = kt(0);
|
|
1869
|
+
A.ONE = kt(1);
|
|
1870
1870
|
function ot(n) {
|
|
1871
|
-
return k.Buffer.from(new
|
|
1871
|
+
return k.Buffer.from(new Pr().random(n).toString(), "hex");
|
|
1872
1872
|
}
|
|
1873
|
-
var
|
|
1873
|
+
var Li = /^[89a-f]/i, Ki = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", ji = "userAttributes.", ne = /* @__PURE__ */ (function() {
|
|
1874
1874
|
function n(t) {
|
|
1875
|
-
this.N = new A(
|
|
1875
|
+
this.N = new A(Ki, 16), this.g = new A("2", 16), this.k = new A(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;
|
|
@@ -1946,12 +1946,12 @@ var Ni = /^[89a-f]/i, qi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
|
|
|
1946
1946
|
});
|
|
1947
1947
|
});
|
|
1948
1948
|
}, e.getNewPasswordRequiredChallengeUserAttributePrefix = function() {
|
|
1949
|
-
return
|
|
1949
|
+
return ji;
|
|
1950
1950
|
}, e.padHex = function(r) {
|
|
1951
1951
|
if (!(r instanceof A))
|
|
1952
1952
|
throw new Error("Not a BigInteger");
|
|
1953
1953
|
var i = r.compareTo(A.ZERO) < 0, s = r.abs().toString(16);
|
|
1954
|
-
if (s = s.length % 2 !== 0 ? "0" + s : s, s =
|
|
1954
|
+
if (s = s.length % 2 !== 0 ? "0" + s : s, s = Li.test(s) ? "00" + s : s, i) {
|
|
1955
1955
|
var o = s.split("").map(function(h) {
|
|
1956
1956
|
var d = ~parseInt(h, 16) & 15;
|
|
1957
1957
|
return "0123456789ABCDEF".charAt(d);
|
|
@@ -1961,7 +1961,7 @@ var Ni = /^[89a-f]/i, qi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
|
|
|
1961
1961
|
return s;
|
|
1962
1962
|
}, n;
|
|
1963
1963
|
})();
|
|
1964
|
-
var
|
|
1964
|
+
var Or = /* @__PURE__ */ (function() {
|
|
1965
1965
|
function n(t) {
|
|
1966
1966
|
this.jwtToken = t || "", this.payload = this.decodePayload();
|
|
1967
1967
|
}
|
|
@@ -1981,37 +1981,37 @@ var Br = /* @__PURE__ */ (function() {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
}, n;
|
|
1983
1983
|
})();
|
|
1984
|
-
function
|
|
1985
|
-
n.prototype = Object.create(e.prototype), n.prototype.constructor = n,
|
|
1984
|
+
function Vi(n, e) {
|
|
1985
|
+
n.prototype = Object.create(e.prototype), n.prototype.constructor = n, mt(n, e);
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1988
|
-
return
|
|
1987
|
+
function mt(n, e) {
|
|
1988
|
+
return mt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
|
|
1989
1989
|
return t.__proto__ = r, t;
|
|
1990
|
-
},
|
|
1990
|
+
}, mt(n, e);
|
|
1991
1991
|
}
|
|
1992
|
-
var
|
|
1992
|
+
var yt = /* @__PURE__ */ (function(n) {
|
|
1993
1993
|
function e(t) {
|
|
1994
1994
|
var r = t === void 0 ? {} : t, i = r.AccessToken;
|
|
1995
1995
|
return n.call(this, i || "") || this;
|
|
1996
1996
|
}
|
|
1997
|
-
return
|
|
1998
|
-
})(
|
|
1999
|
-
function
|
|
2000
|
-
n.prototype = Object.create(e.prototype), n.prototype.constructor = n,
|
|
1997
|
+
return Vi(e, n), e;
|
|
1998
|
+
})(Or);
|
|
1999
|
+
function Hi(n, e) {
|
|
2000
|
+
n.prototype = Object.create(e.prototype), n.prototype.constructor = n, vt(n, e);
|
|
2001
2001
|
}
|
|
2002
|
-
function
|
|
2003
|
-
return
|
|
2002
|
+
function vt(n, e) {
|
|
2003
|
+
return vt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
|
|
2004
2004
|
return t.__proto__ = r, t;
|
|
2005
|
-
},
|
|
2005
|
+
}, vt(n, e);
|
|
2006
2006
|
}
|
|
2007
|
-
var
|
|
2007
|
+
var wt = /* @__PURE__ */ (function(n) {
|
|
2008
2008
|
function e(t) {
|
|
2009
2009
|
var r = t === void 0 ? {} : t, i = r.IdToken;
|
|
2010
2010
|
return n.call(this, i || "") || this;
|
|
2011
2011
|
}
|
|
2012
|
-
return
|
|
2013
|
-
})(
|
|
2014
|
-
var
|
|
2012
|
+
return Hi(e, n), e;
|
|
2013
|
+
})(Or);
|
|
2014
|
+
var bt = /* @__PURE__ */ (function() {
|
|
2015
2015
|
function n(t) {
|
|
2016
2016
|
var r = t === void 0 ? {} : t, i = r.RefreshToken;
|
|
2017
2017
|
this.token = i || "";
|
|
@@ -2020,14 +2020,14 @@ var vt = /* @__PURE__ */ (function() {
|
|
|
2020
2020
|
return e.getToken = function() {
|
|
2021
2021
|
return this.token;
|
|
2022
2022
|
}, n;
|
|
2023
|
-
})(),
|
|
2024
|
-
var
|
|
2025
|
-
userAgent:
|
|
2023
|
+
})(), zi = "5.0.4";
|
|
2024
|
+
var Wi = "aws-amplify/" + zi, Nr = {
|
|
2025
|
+
userAgent: Wi,
|
|
2026
2026
|
isReactNative: typeof navigator < "u" && navigator.product === "ReactNative"
|
|
2027
|
-
},
|
|
2028
|
-
return
|
|
2027
|
+
}, Yi = function() {
|
|
2028
|
+
return Nr.userAgent;
|
|
2029
2029
|
};
|
|
2030
|
-
var
|
|
2030
|
+
var St = /* @__PURE__ */ (function() {
|
|
2031
2031
|
function n(t) {
|
|
2032
2032
|
var r = t === void 0 ? {} : t, i = r.IdToken, s = r.RefreshToken, o = r.AccessToken, l = r.ClockDrift;
|
|
2033
2033
|
if (o == null || i == null)
|
|
@@ -2051,12 +2051,12 @@ var wt = /* @__PURE__ */ (function() {
|
|
|
2051
2051
|
return i < this.accessToken.getExpiration() && i < this.idToken.getExpiration();
|
|
2052
2052
|
}, n;
|
|
2053
2053
|
})();
|
|
2054
|
-
var
|
|
2054
|
+
var Gi = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Ji = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], _t = /* @__PURE__ */ (function() {
|
|
2055
2055
|
function n() {
|
|
2056
2056
|
}
|
|
2057
2057
|
var e = n.prototype;
|
|
2058
2058
|
return e.getNowString = function() {
|
|
2059
|
-
var r = /* @__PURE__ */ new Date(), i =
|
|
2059
|
+
var r = /* @__PURE__ */ new Date(), i = Ji[r.getUTCDay()], s = Gi[r.getUTCMonth()], o = r.getUTCDate(), l = r.getUTCHours();
|
|
2060
2060
|
l < 10 && (l = "0" + l);
|
|
2061
2061
|
var h = r.getUTCMinutes();
|
|
2062
2062
|
h < 10 && (h = "0" + h);
|
|
@@ -2066,7 +2066,7 @@ var Wi = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
|
|
|
2066
2066
|
return m;
|
|
2067
2067
|
}, n;
|
|
2068
2068
|
})();
|
|
2069
|
-
var
|
|
2069
|
+
var qr = /* @__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 || "";
|
|
@@ -2089,7 +2089,7 @@ var Or = /* @__PURE__ */ (function() {
|
|
|
2089
2089
|
};
|
|
2090
2090
|
}, n;
|
|
2091
2091
|
})();
|
|
2092
|
-
var te = {},
|
|
2092
|
+
var te = {}, Zi = /* @__PURE__ */ (function() {
|
|
2093
2093
|
function n() {
|
|
2094
2094
|
}
|
|
2095
2095
|
return n.setItem = function(t, r) {
|
|
@@ -2101,12 +2101,12 @@ var te = {}, Gi = /* @__PURE__ */ (function() {
|
|
|
2101
2101
|
}, n.clear = function() {
|
|
2102
2102
|
return te = {}, te;
|
|
2103
2103
|
}, n;
|
|
2104
|
-
})(),
|
|
2104
|
+
})(), Lr = /* @__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");
|
|
2108
2108
|
} catch {
|
|
2109
|
-
this.storageWindow =
|
|
2109
|
+
this.storageWindow = Zi;
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
var e = n.prototype;
|
|
@@ -2114,11 +2114,11 @@ var te = {}, Gi = /* @__PURE__ */ (function() {
|
|
|
2114
2114
|
return this.storageWindow;
|
|
2115
2115
|
}, n;
|
|
2116
2116
|
})();
|
|
2117
|
-
var
|
|
2117
|
+
var Xi = typeof navigator < "u", cr = Xi ? Nr.isReactNative ? "react-native" : navigator.userAgent : "nodejs", At = /* @__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 Lr().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) {
|
|
@@ -2149,7 +2149,7 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2149
2149
|
}, e.authenticateUser = function(r, i) {
|
|
2150
2150
|
return this.authenticationFlowType === "USER_PASSWORD_AUTH" ? this.authenticateUserPlainUsernamePassword(r, i) : this.authenticationFlowType === "USER_SRP_AUTH" || this.authenticationFlowType === "CUSTOM_AUTH" ? this.authenticateUserDefaultAuth(r, i) : i.onFailure(new Error("Authentication flow type is invalid."));
|
|
2151
2151
|
}, e.authenticateUserDefaultAuth = function(r, i) {
|
|
2152
|
-
var s = this, o = new ne(this.pool.getUserPoolName()), l = new
|
|
2152
|
+
var s = this, o = new ne(this.pool.getUserPoolName()), l = new _t(), h, d, p = {};
|
|
2153
2153
|
this.deviceKey != null && (p.DEVICE_KEY = this.deviceKey), p.USERNAME = this.username, o.getLargeAValue(function(m, y) {
|
|
2154
2154
|
m && i.onFailure(m), p.SRP_A = y.toString(16), s.authenticationFlowType === "CUSTOM_AUTH" && (p.CHALLENGE_NAME = "SRP_A");
|
|
2155
2155
|
var v = Object.keys(r.getValidationData()).length !== 0 ? r.getValidationData() : r.getClientMetadata(), b = {
|
|
@@ -2166,16 +2166,16 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2166
2166
|
T && i.onFailure(T);
|
|
2167
2167
|
var B = l.getNowString(), F = k.Buffer.concat([k.Buffer.from(s.pool.getUserPoolName(), "utf8"), k.Buffer.from(s.username, "utf8"), k.Buffer.from(E.SECRET_BLOCK, "base64"), k.Buffer.from(B, "utf8")]), X = new Ie.Sha256(P);
|
|
2168
2168
|
X.update(F);
|
|
2169
|
-
var me = X.digestSync(), G = k.Buffer.from(me).toString("base64"),
|
|
2170
|
-
|
|
2169
|
+
var me = X.digestSync(), G = k.Buffer.from(me).toString("base64"), j = {};
|
|
2170
|
+
j.USERNAME = s.username, j.PASSWORD_CLAIM_SECRET_BLOCK = E.SECRET_BLOCK, j.TIMESTAMP = B, j.PASSWORD_CLAIM_SIGNATURE = G, s.deviceKey != null && (j.DEVICE_KEY = s.deviceKey);
|
|
2171
2171
|
var Q = function(le, ve) {
|
|
2172
2172
|
return s.client.request("RespondToAuthChallenge", le, function(ee, tt) {
|
|
2173
|
-
return ee && ee.code === "ResourceNotFoundException" && ee.message.toLowerCase().indexOf("device") !== -1 ? (
|
|
2173
|
+
return ee && ee.code === "ResourceNotFoundException" && ee.message.toLowerCase().indexOf("device") !== -1 ? (j.DEVICE_KEY = null, s.deviceKey = null, s.randomPassword = null, s.deviceGroupKey = null, s.clearCachedDeviceKeyAndPassword(), Q(le, ve)) : ve(ee, tt);
|
|
2174
2174
|
});
|
|
2175
2175
|
}, ue = {
|
|
2176
2176
|
ChallengeName: "PASSWORD_VERIFIER",
|
|
2177
2177
|
ClientId: s.pool.getClientId(),
|
|
2178
|
-
ChallengeResponses:
|
|
2178
|
+
ChallengeResponses: j,
|
|
2179
2179
|
Session: C.Session,
|
|
2180
2180
|
ClientMetadata: v
|
|
2181
2181
|
};
|
|
@@ -2241,7 +2241,7 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2241
2241
|
DeviceKey: b.DeviceKey,
|
|
2242
2242
|
AccessToken: o.signInUserSession.getAccessToken().getJwtToken(),
|
|
2243
2243
|
DeviceSecretVerifierConfig: C,
|
|
2244
|
-
DeviceName:
|
|
2244
|
+
DeviceName: cr
|
|
2245
2245
|
}, function(E, T) {
|
|
2246
2246
|
return E ? s.onFailure(E) : (o.deviceKey = r.AuthenticationResult.NewDeviceMetadata.DeviceKey, o.cacheDeviceKeyAndPassword(), T.UserConfirmationNecessary === !0 ? s.onSuccess(o.signInUserSession, T.UserConfirmationNecessary) : s.onSuccess(o.signInUserSession));
|
|
2247
2247
|
});
|
|
@@ -2265,7 +2265,7 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2265
2265
|
return y ? s.onFailure(y) : l.authenticateUserInternal(v, h, s);
|
|
2266
2266
|
});
|
|
2267
2267
|
}, e.getDeviceResponse = function(r, i) {
|
|
2268
|
-
var s = this, o = new ne(this.deviceGroupKey), l = new
|
|
2268
|
+
var s = this, o = new ne(this.deviceGroupKey), l = new _t(), h = {};
|
|
2269
2269
|
h.USERNAME = this.username, h.DEVICE_KEY = this.deviceKey, o.getLargeAValue(function(d, p) {
|
|
2270
2270
|
d && r.onFailure(d), h.SRP_A = p.toString(16);
|
|
2271
2271
|
var m = {
|
|
@@ -2286,13 +2286,13 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2286
2286
|
F.update(B);
|
|
2287
2287
|
var X = F.digestSync(), me = k.Buffer.from(X).toString("base64"), G = {};
|
|
2288
2288
|
G.USERNAME = s.username, G.PASSWORD_CLAIM_SECRET_BLOCK = b.SECRET_BLOCK, G.TIMESTAMP = P, G.PASSWORD_CLAIM_SIGNATURE = me, G.DEVICE_KEY = s.deviceKey;
|
|
2289
|
-
var
|
|
2289
|
+
var j = {
|
|
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() && (j.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", j, function(Q, ue) {
|
|
2296
2296
|
return Q ? r.onFailure(Q) : (s.signInUserSession = s.getCognitoUserSession(ue.AuthenticationResult), s.cacheTokens(), r.onSuccess(s.signInUserSession));
|
|
2297
2297
|
});
|
|
2298
2298
|
});
|
|
@@ -2358,7 +2358,7 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2358
2358
|
DeviceKey: y.AuthenticationResult.NewDeviceMetadata.DeviceKey,
|
|
2359
2359
|
AccessToken: l.signInUserSession.getAccessToken().getJwtToken(),
|
|
2360
2360
|
DeviceSecretVerifierConfig: C,
|
|
2361
|
-
DeviceName:
|
|
2361
|
+
DeviceName: cr
|
|
2362
2362
|
}, function(E, T) {
|
|
2363
2363
|
return E ? i.onFailure(E) : (l.deviceKey = y.AuthenticationResult.NewDeviceMetadata.DeviceKey, l.cacheDeviceKeyAndPassword(), T.UserConfirmationNecessary === !0 ? i.onSuccess(l.signInUserSession, T.UserConfirmationNecessary) : i.onSuccess(l.signInUserSession));
|
|
2364
2364
|
});
|
|
@@ -2445,7 +2445,7 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2445
2445
|
var h = {
|
|
2446
2446
|
Name: s.UserAttributes[l].Name,
|
|
2447
2447
|
Value: s.UserAttributes[l].Value
|
|
2448
|
-
}, d = new
|
|
2448
|
+
}, d = new qr(h);
|
|
2449
2449
|
o.push(d);
|
|
2450
2450
|
}
|
|
2451
2451
|
return r(null, o);
|
|
@@ -2537,18 +2537,18 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2537
2537
|
return r(null, this.signInUserSession);
|
|
2538
2538
|
var s = "CognitoIdentityServiceProvider." + this.pool.getClientId() + "." + this.username, o = s + ".idToken", l = s + ".accessToken", h = s + ".refreshToken", d = s + ".clockDrift";
|
|
2539
2539
|
if (this.storage.getItem(o)) {
|
|
2540
|
-
var p = new
|
|
2540
|
+
var p = new wt({
|
|
2541
2541
|
IdToken: this.storage.getItem(o)
|
|
2542
|
-
}), m = new
|
|
2542
|
+
}), m = new yt({
|
|
2543
2543
|
AccessToken: this.storage.getItem(l)
|
|
2544
|
-
}), y = new
|
|
2544
|
+
}), y = new bt({
|
|
2545
2545
|
RefreshToken: this.storage.getItem(h)
|
|
2546
2546
|
}), v = parseInt(this.storage.getItem(d), 0) || 0, b = {
|
|
2547
2547
|
IdToken: p,
|
|
2548
2548
|
AccessToken: m,
|
|
2549
2549
|
RefreshToken: y,
|
|
2550
2550
|
ClockDrift: v
|
|
2551
|
-
}, _ = new
|
|
2551
|
+
}, _ = new St(b);
|
|
2552
2552
|
if (_.isValid())
|
|
2553
2553
|
return this.signInUserSession = _, r(null, this.signInUserSession);
|
|
2554
2554
|
if (!y.getToken())
|
|
@@ -2601,12 +2601,12 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2601
2601
|
var r = "CognitoIdentityServiceProvider." + this.pool.getClientId(), i = r + "." + this.username + ".idToken", s = r + "." + this.username + ".accessToken", o = r + "." + this.username + ".refreshToken", l = r + ".LastAuthUser", h = r + "." + this.username + ".clockDrift";
|
|
2602
2602
|
this.storage.removeItem(i), this.storage.removeItem(s), this.storage.removeItem(o), this.storage.removeItem(l), this.storage.removeItem(h);
|
|
2603
2603
|
}, e.getCognitoUserSession = function(r) {
|
|
2604
|
-
var i = new
|
|
2604
|
+
var i = new wt(r), s = new yt(r), o = new bt(r), l = {
|
|
2605
2605
|
IdToken: i,
|
|
2606
2606
|
AccessToken: s,
|
|
2607
2607
|
RefreshToken: o
|
|
2608
2608
|
};
|
|
2609
|
-
return new
|
|
2609
|
+
return new St(l);
|
|
2610
2610
|
}, e.forgotPassword = function(r, i) {
|
|
2611
2611
|
var s = {
|
|
2612
2612
|
ClientId: this.pool.getClientId(),
|
|
@@ -2825,7 +2825,7 @@ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : n
|
|
|
2825
2825
|
});
|
|
2826
2826
|
}, n;
|
|
2827
2827
|
})();
|
|
2828
|
-
function
|
|
2828
|
+
function Qi(n, e) {
|
|
2829
2829
|
return e = e || {}, new Promise(function(t, r) {
|
|
2830
2830
|
var i = new XMLHttpRequest(), s = [], o = [], l = {}, h = function() {
|
|
2831
2831
|
return { ok: (i.status / 100 | 0) == 2, statusText: i.statusText, status: i.status, url: i.responseURL, text: function() {
|
|
@@ -2852,60 +2852,60 @@ function Zi(n, e) {
|
|
|
2852
2852
|
i.send(e.body || null);
|
|
2853
2853
|
});
|
|
2854
2854
|
}
|
|
2855
|
-
const
|
|
2855
|
+
const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2856
2856
|
__proto__: null,
|
|
2857
|
-
default:
|
|
2858
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2859
|
-
var at,
|
|
2860
|
-
function
|
|
2861
|
-
return
|
|
2857
|
+
default: Qi
|
|
2858
|
+
}, Symbol.toStringTag, { value: "Module" })), hr = /* @__PURE__ */ It(es);
|
|
2859
|
+
var at, fr;
|
|
2860
|
+
function ts() {
|
|
2861
|
+
return fr || (fr = 1, at = self.fetch || (self.fetch = hr.default || hr)), at;
|
|
2862
2862
|
}
|
|
2863
|
-
|
|
2863
|
+
ts();
|
|
2864
2864
|
function H() {
|
|
2865
2865
|
}
|
|
2866
|
-
H.prototype.userAgent =
|
|
2867
|
-
var
|
|
2866
|
+
H.prototype.userAgent = Yi();
|
|
2867
|
+
var rs = function(e) {
|
|
2868
2868
|
e && (H.prototype.userAgent && !H.prototype.userAgent.includes(e) && (H.prototype.userAgent = H.prototype.userAgent.concat(" ", e)), (!H.prototype.userAgent || H.prototype.userAgent === "") && (H.prototype.userAgent = e));
|
|
2869
|
-
},
|
|
2869
|
+
}, ns = function(e) {
|
|
2870
2870
|
var t = H.category ? " " + H.category : "", r = H.framework ? " framework/" + H.framework : "", i = "" + H.prototype.userAgent + t + r;
|
|
2871
2871
|
return i;
|
|
2872
2872
|
};
|
|
2873
|
-
function
|
|
2873
|
+
function is(n, e) {
|
|
2874
2874
|
n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Re(n, e);
|
|
2875
2875
|
}
|
|
2876
|
-
function
|
|
2876
|
+
function xt(n) {
|
|
2877
2877
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
2878
|
-
return
|
|
2879
|
-
if (r === null || !
|
|
2878
|
+
return xt = function(r) {
|
|
2879
|
+
if (r === null || !os(r)) return r;
|
|
2880
2880
|
if (typeof r != "function") throw new TypeError("Super expression must either be null or a function");
|
|
2881
2881
|
if (e !== void 0) {
|
|
2882
2882
|
if (e.has(r)) return e.get(r);
|
|
2883
2883
|
e.set(r, i);
|
|
2884
2884
|
}
|
|
2885
2885
|
function i() {
|
|
2886
|
-
return
|
|
2886
|
+
return ss(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
|
+
}, xt(n);
|
|
2890
2890
|
}
|
|
2891
|
-
function
|
|
2892
|
-
if (
|
|
2891
|
+
function ss(n, e, t) {
|
|
2892
|
+
if (Kr()) return Reflect.construct.apply(null, arguments);
|
|
2893
2893
|
var r = [null];
|
|
2894
2894
|
r.push.apply(r, e);
|
|
2895
2895
|
var i = new (n.bind.apply(n, r))();
|
|
2896
2896
|
return t && Re(i, t.prototype), i;
|
|
2897
2897
|
}
|
|
2898
|
-
function
|
|
2898
|
+
function Kr() {
|
|
2899
2899
|
try {
|
|
2900
2900
|
var n = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2901
2901
|
}));
|
|
2902
2902
|
} catch {
|
|
2903
2903
|
}
|
|
2904
|
-
return (
|
|
2904
|
+
return (Kr = function() {
|
|
2905
2905
|
return !!n;
|
|
2906
2906
|
})();
|
|
2907
2907
|
}
|
|
2908
|
-
function
|
|
2908
|
+
function os(n) {
|
|
2909
2909
|
try {
|
|
2910
2910
|
return Function.toString.call(n).indexOf("[native code]") !== -1;
|
|
2911
2911
|
} catch {
|
|
@@ -2917,18 +2917,18 @@ 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
|
-
var
|
|
2925
|
+
var as = /* @__PURE__ */ (function(n) {
|
|
2926
2926
|
function e(t, r, i, s) {
|
|
2927
2927
|
var o;
|
|
2928
2928
|
return o = n.call(this, t) || this, o.code = r, o.name = i, o.statusCode = s, o;
|
|
2929
2929
|
}
|
|
2930
|
-
return
|
|
2931
|
-
})(/* @__PURE__ */
|
|
2930
|
+
return is(e, n), e;
|
|
2931
|
+
})(/* @__PURE__ */ xt(Error)), us = /* @__PURE__ */ (function() {
|
|
2932
2932
|
function n(t, r, i) {
|
|
2933
2933
|
this.endpoint = r || "https://cognito-idp." + t + ".amazonaws.com/";
|
|
2934
2934
|
var s = i || {}, o = s.credentials;
|
|
@@ -2941,12 +2941,12 @@ var ss = /* @__PURE__ */ (function(n) {
|
|
|
2941
2941
|
var s = this;
|
|
2942
2942
|
return new Promise(function(o, l) {
|
|
2943
2943
|
s.request(r, i, function(h, d) {
|
|
2944
|
-
h ? l(new
|
|
2944
|
+
h ? l(new as(h.message, h.code, h.name, h.statusCode)) : o(d);
|
|
2945
2945
|
});
|
|
2946
2946
|
});
|
|
2947
2947
|
}, e.requestWithRetry = function(r, i, s) {
|
|
2948
2948
|
var o = this, l = 5 * 1e3;
|
|
2949
|
-
|
|
2949
|
+
hs(function(h) {
|
|
2950
2950
|
return new Promise(function(d, p) {
|
|
2951
2951
|
o.request(r, h, function(m, y) {
|
|
2952
2952
|
m ? p(m) : d(y);
|
|
@@ -2961,7 +2961,7 @@ var ss = /* @__PURE__ */ (function(n) {
|
|
|
2961
2961
|
var o = {
|
|
2962
2962
|
"Content-Type": "application/x-amz-json-1.1",
|
|
2963
2963
|
"X-Amz-Target": "AWSCognitoIdentityProviderService." + r,
|
|
2964
|
-
"X-Amz-User-Agent":
|
|
2964
|
+
"X-Amz-User-Agent": ns(),
|
|
2965
2965
|
"Cache-Control": "no-store"
|
|
2966
2966
|
}, l = Object.assign({}, this.fetchOptions, {
|
|
2967
2967
|
headers: o,
|
|
@@ -2996,45 +2996,45 @@ var ss = /* @__PURE__ */ (function(n) {
|
|
|
2996
2996
|
})(), je = {
|
|
2997
2997
|
debug: function() {
|
|
2998
2998
|
}
|
|
2999
|
-
},
|
|
2999
|
+
}, ls = function(e) {
|
|
3000
3000
|
var t = "nonRetryable";
|
|
3001
3001
|
return e && e[t];
|
|
3002
3002
|
};
|
|
3003
|
-
function
|
|
3003
|
+
function jr(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
3006
|
return je.debug(n.name + " attempt #" + r + " with args: " + JSON.stringify(e)), n.apply(void 0, e).catch(function(i) {
|
|
3007
|
-
if (je.debug("error on " + n.name, i),
|
|
3007
|
+
if (je.debug("error on " + n.name, i), ls(i))
|
|
3008
3008
|
throw je.debug(n.name + " non retryable error", i), i;
|
|
3009
3009
|
var s = t(r, e, i);
|
|
3010
3010
|
if (je.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() {
|
|
3014
|
-
return
|
|
3014
|
+
return jr(n, e, t, r + 1);
|
|
3015
3015
|
});
|
|
3016
3016
|
throw i;
|
|
3017
3017
|
});
|
|
3018
3018
|
}
|
|
3019
|
-
function
|
|
3019
|
+
function cs(n) {
|
|
3020
3020
|
var e = 100, t = 100;
|
|
3021
3021
|
return function(r) {
|
|
3022
3022
|
var i = Math.pow(2, r) * e + t * Math.random();
|
|
3023
3023
|
return i > n ? !1 : i;
|
|
3024
3024
|
};
|
|
3025
3025
|
}
|
|
3026
|
-
function
|
|
3027
|
-
return
|
|
3026
|
+
function hs(n, e, t) {
|
|
3027
|
+
return jr(n, e, cs(t));
|
|
3028
3028
|
}
|
|
3029
|
-
var
|
|
3029
|
+
var fs = 55, ds = /* @__PURE__ */ (function() {
|
|
3030
3030
|
function n(t, r) {
|
|
3031
3031
|
var i = t || {}, s = i.UserPoolId, o = i.ClientId, l = i.endpoint, h = i.fetchOptions, d = i.AdvancedSecurityDataCollectionFlag;
|
|
3032
3032
|
if (!s || !o)
|
|
3033
3033
|
throw new Error("Both UserPoolId and ClientId are required.");
|
|
3034
|
-
if (s.length >
|
|
3034
|
+
if (s.length > fs || !/^[\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
|
|
3037
|
+
this.userPoolId = s, this.clientId = o, this.client = new us(p, l, h), this.advancedSecurityDataCollectionFlag = d !== !1, this.storage = t.Storage || new Lr().getStorage(), r && (this.wrapRefreshSessionCallback = r);
|
|
3038
3038
|
}
|
|
3039
3039
|
var e = n.prototype;
|
|
3040
3040
|
return e.getUserPoolId = function() {
|
|
@@ -3060,7 +3060,7 @@ var cs = 55, hs = /* @__PURE__ */ (function() {
|
|
|
3060
3060
|
Pool: d,
|
|
3061
3061
|
Storage: d.storage
|
|
3062
3062
|
}, b = {
|
|
3063
|
-
user: new
|
|
3063
|
+
user: new At(v),
|
|
3064
3064
|
userConfirmed: y.UserConfirmed,
|
|
3065
3065
|
userSub: y.UserSub,
|
|
3066
3066
|
codeDeliveryDetails: y.CodeDeliveryDetails
|
|
@@ -3075,7 +3075,7 @@ var cs = 55, hs = /* @__PURE__ */ (function() {
|
|
|
3075
3075
|
Pool: this,
|
|
3076
3076
|
Storage: this.storage
|
|
3077
3077
|
};
|
|
3078
|
-
return new
|
|
3078
|
+
return new At(s);
|
|
3079
3079
|
}
|
|
3080
3080
|
return null;
|
|
3081
3081
|
}, e.getUserContextData = function(r) {
|
|
@@ -3102,7 +3102,7 @@ function Ve(n) {
|
|
|
3102
3102
|
}
|
|
3103
3103
|
return n;
|
|
3104
3104
|
}
|
|
3105
|
-
var
|
|
3105
|
+
var ps = {
|
|
3106
3106
|
read: function(n) {
|
|
3107
3107
|
return n[0] === '"' && (n = n.slice(1, -1)), n.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3108
3108
|
},
|
|
@@ -3113,7 +3113,7 @@ var fs = {
|
|
|
3113
3113
|
);
|
|
3114
3114
|
}
|
|
3115
3115
|
};
|
|
3116
|
-
function
|
|
3116
|
+
function Et(n, e) {
|
|
3117
3117
|
function t(i, s, o) {
|
|
3118
3118
|
if (!(typeof document > "u")) {
|
|
3119
3119
|
o = Ve({}, 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);
|
|
@@ -3151,10 +3151,10 @@ function xt(n, e) {
|
|
|
3151
3151
|
);
|
|
3152
3152
|
},
|
|
3153
3153
|
withAttributes: function(i) {
|
|
3154
|
-
return
|
|
3154
|
+
return Et(this.converter, Ve({}, this.attributes, i));
|
|
3155
3155
|
},
|
|
3156
3156
|
withConverter: function(i) {
|
|
3157
|
-
return
|
|
3157
|
+
return Et(Ve({}, this.converter, i), this.attributes);
|
|
3158
3158
|
}
|
|
3159
3159
|
},
|
|
3160
3160
|
{
|
|
@@ -3163,7 +3163,7 @@ function xt(n, e) {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
);
|
|
3165
3165
|
}
|
|
3166
|
-
var Ee =
|
|
3166
|
+
var Ee = Et(ps, { path: "/" }), gs = /* @__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))
|
|
@@ -3200,34 +3200,34 @@ var Ee = xt(fs, { path: "/" }), ds = /* @__PURE__ */ (function() {
|
|
|
3200
3200
|
return {};
|
|
3201
3201
|
}, n;
|
|
3202
3202
|
})();
|
|
3203
|
-
const
|
|
3203
|
+
const ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3204
3204
|
__proto__: null,
|
|
3205
|
-
AuthenticationDetails:
|
|
3205
|
+
AuthenticationDetails: gn,
|
|
3206
3206
|
AuthenticationHelper: ne,
|
|
3207
|
-
CognitoAccessToken:
|
|
3208
|
-
CognitoIdToken:
|
|
3209
|
-
CognitoRefreshToken:
|
|
3210
|
-
CognitoUser:
|
|
3211
|
-
CognitoUserAttribute:
|
|
3212
|
-
CognitoUserPool:
|
|
3213
|
-
CognitoUserSession:
|
|
3214
|
-
CookieStorage:
|
|
3215
|
-
DateHelper:
|
|
3216
|
-
WordArray:
|
|
3217
|
-
appendToCognitoUserAgent:
|
|
3207
|
+
CognitoAccessToken: yt,
|
|
3208
|
+
CognitoIdToken: wt,
|
|
3209
|
+
CognitoRefreshToken: bt,
|
|
3210
|
+
CognitoUser: At,
|
|
3211
|
+
CognitoUserAttribute: qr,
|
|
3212
|
+
CognitoUserPool: ds,
|
|
3213
|
+
CognitoUserSession: St,
|
|
3214
|
+
CookieStorage: gs,
|
|
3215
|
+
DateHelper: _t,
|
|
3216
|
+
WordArray: Pr,
|
|
3217
|
+
appendToCognitoUserAgent: rs
|
|
3218
3218
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3219
|
-
const ze = globalThis,
|
|
3220
|
-
let
|
|
3219
|
+
const ze = globalThis, $t = ze.ShadowRoot && (ze.ShadyCSS === void 0 || ze.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Pt = /* @__PURE__ */ Symbol(), dr = /* @__PURE__ */ new WeakMap();
|
|
3220
|
+
let Vr = class {
|
|
3221
3221
|
constructor(e, t, r) {
|
|
3222
|
-
if (this._$cssResult$ = !0, r !==
|
|
3222
|
+
if (this._$cssResult$ = !0, r !== Pt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
3223
3223
|
this.cssText = e, this.t = t;
|
|
3224
3224
|
}
|
|
3225
3225
|
get styleSheet() {
|
|
3226
3226
|
let e = this.o;
|
|
3227
3227
|
const t = this.t;
|
|
3228
|
-
if (
|
|
3228
|
+
if ($t && e === void 0) {
|
|
3229
3229
|
const r = t !== void 0 && t.length === 1;
|
|
3230
|
-
r && (e =
|
|
3230
|
+
r && (e = dr.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && dr.set(t, e));
|
|
3231
3231
|
}
|
|
3232
3232
|
return e;
|
|
3233
3233
|
}
|
|
@@ -3235,28 +3235,28 @@ let Kr = class {
|
|
|
3235
3235
|
return this.cssText;
|
|
3236
3236
|
}
|
|
3237
3237
|
};
|
|
3238
|
-
const
|
|
3238
|
+
const ys = (n) => new Vr(typeof n == "string" ? n : n + "", void 0, Pt), z = (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
|
-
return new
|
|
3245
|
-
},
|
|
3246
|
-
if (
|
|
3244
|
+
return new Vr(t, n, Pt);
|
|
3245
|
+
}, vs = (n, e) => {
|
|
3246
|
+
if ($t) 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;
|
|
3249
3249
|
i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, n.appendChild(r);
|
|
3250
3250
|
}
|
|
3251
|
-
},
|
|
3251
|
+
}, pr = $t ? (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 ys(t);
|
|
3255
3255
|
})(n) : n;
|
|
3256
|
-
const { is:
|
|
3256
|
+
const { is: ws, defineProperty: bs, getOwnPropertyDescriptor: Ss, getOwnPropertyNames: _s, getOwnPropertySymbols: As, getPrototypeOf: xs } = Object, Qe = globalThis, gr = Qe.trustedTypes, Cs = gr ? gr.emptyScript : "", Es = Qe.reactiveElementPolyfillSupport, De = (n, e) => n, Ut = { toAttribute(n, e) {
|
|
3257
3257
|
switch (e) {
|
|
3258
3258
|
case Boolean:
|
|
3259
|
-
n = n ?
|
|
3259
|
+
n = n ? Cs : null;
|
|
3260
3260
|
break;
|
|
3261
3261
|
case Object:
|
|
3262
3262
|
case Array:
|
|
@@ -3281,7 +3281,7 @@ const { is: ys, defineProperty: vs, getOwnPropertyDescriptor: ws, getOwnProperty
|
|
|
3281
3281
|
}
|
|
3282
3282
|
}
|
|
3283
3283
|
return t;
|
|
3284
|
-
} },
|
|
3284
|
+
} }, Hr = (n, e) => !ws(n, e), mr = { attribute: !0, type: String, converter: Ut, reflect: !1, useDefault: !1, hasChanged: Hr };
|
|
3285
3285
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Qe.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
3286
3286
|
let he = class extends HTMLElement {
|
|
3287
3287
|
static addInitializer(e) {
|
|
@@ -3290,14 +3290,14 @@ let he = class extends HTMLElement {
|
|
|
3290
3290
|
static get observedAttributes() {
|
|
3291
3291
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
3292
3292
|
}
|
|
3293
|
-
static createProperty(e, t =
|
|
3293
|
+
static createProperty(e, t = mr) {
|
|
3294
3294
|
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
3295
3295
|
const r = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(e, r, t);
|
|
3296
|
-
i !== void 0 &&
|
|
3296
|
+
i !== void 0 && bs(this.prototype, e, i);
|
|
3297
3297
|
}
|
|
3298
3298
|
}
|
|
3299
3299
|
static getPropertyDescriptor(e, t, r) {
|
|
3300
|
-
const { get: i, set: s } =
|
|
3300
|
+
const { get: i, set: s } = Ss(this.prototype, e) ?? { get() {
|
|
3301
3301
|
return this[t];
|
|
3302
3302
|
}, set(o) {
|
|
3303
3303
|
this[t] = o;
|
|
@@ -3308,17 +3308,17 @@ let he = class extends HTMLElement {
|
|
|
3308
3308
|
}, configurable: !0, enumerable: !0 };
|
|
3309
3309
|
}
|
|
3310
3310
|
static getPropertyOptions(e) {
|
|
3311
|
-
return this.elementProperties.get(e) ??
|
|
3311
|
+
return this.elementProperties.get(e) ?? mr;
|
|
3312
3312
|
}
|
|
3313
3313
|
static _$Ei() {
|
|
3314
3314
|
if (this.hasOwnProperty(De("elementProperties"))) return;
|
|
3315
|
-
const e =
|
|
3315
|
+
const e = xs(this);
|
|
3316
3316
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
3317
3317
|
}
|
|
3318
3318
|
static finalize() {
|
|
3319
3319
|
if (this.hasOwnProperty(De("finalized"))) return;
|
|
3320
3320
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(De("properties"))) {
|
|
3321
|
-
const t = this.properties, r = [...
|
|
3321
|
+
const t = this.properties, r = [..._s(t), ...As(t)];
|
|
3322
3322
|
for (const i of r) this.createProperty(i, t[i]);
|
|
3323
3323
|
}
|
|
3324
3324
|
const e = this[Symbol.metadata];
|
|
@@ -3337,8 +3337,8 @@ let he = class extends HTMLElement {
|
|
|
3337
3337
|
const t = [];
|
|
3338
3338
|
if (Array.isArray(e)) {
|
|
3339
3339
|
const r = new Set(e.flat(1 / 0).reverse());
|
|
3340
|
-
for (const i of r) t.unshift(
|
|
3341
|
-
} else e !== void 0 && t.push(
|
|
3340
|
+
for (const i of r) t.unshift(pr(i));
|
|
3341
|
+
} else e !== void 0 && t.push(pr(e));
|
|
3342
3342
|
return t;
|
|
3343
3343
|
}
|
|
3344
3344
|
static _$Eu(e, t) {
|
|
@@ -3364,7 +3364,7 @@ let he = class extends HTMLElement {
|
|
|
3364
3364
|
}
|
|
3365
3365
|
createRenderRoot() {
|
|
3366
3366
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
3367
|
-
return
|
|
3367
|
+
return vs(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?.());
|
|
@@ -3380,14 +3380,14 @@ let he = class extends HTMLElement {
|
|
|
3380
3380
|
_$ET(e, t) {
|
|
3381
3381
|
const r = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, r);
|
|
3382
3382
|
if (i !== void 0 && r.reflect === !0) {
|
|
3383
|
-
const s = (r.converter?.toAttribute !== void 0 ? r.converter :
|
|
3383
|
+
const s = (r.converter?.toAttribute !== void 0 ? r.converter : Ut).toAttribute(t, r.type);
|
|
3384
3384
|
this._$Em = e, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$Em = null;
|
|
3385
3385
|
}
|
|
3386
3386
|
}
|
|
3387
3387
|
_$AK(e, t) {
|
|
3388
3388
|
const r = this.constructor, i = r._$Eh.get(e);
|
|
3389
3389
|
if (i !== void 0 && this._$Em !== i) {
|
|
3390
|
-
const s = r.getPropertyOptions(i), o = typeof s.converter == "function" ? { fromAttribute: s.converter } : s.converter?.fromAttribute !== void 0 ? s.converter :
|
|
3390
|
+
const s = r.getPropertyOptions(i), o = typeof s.converter == "function" ? { fromAttribute: s.converter } : s.converter?.fromAttribute !== void 0 ? s.converter : Ut;
|
|
3391
3391
|
this._$Em = i;
|
|
3392
3392
|
const l = o.fromAttribute(t, s.type);
|
|
3393
3393
|
this[i] = l ?? this._$Ej?.get(i) ?? l, this._$Em = null;
|
|
@@ -3396,7 +3396,7 @@ let he = class extends HTMLElement {
|
|
|
3396
3396
|
requestUpdate(e, t, r, i = !1, s) {
|
|
3397
3397
|
if (e !== void 0) {
|
|
3398
3398
|
const o = this.constructor;
|
|
3399
|
-
if (i === !1 && (s = this[e]), r ??= o.getPropertyOptions(e), !((r.hasChanged ??
|
|
3399
|
+
if (i === !1 && (s = this[e]), r ??= o.getPropertyOptions(e), !((r.hasChanged ?? Hr)(s, t) || r.useDefault && r.reflect && s === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, r)))) return;
|
|
3400
3400
|
this.C(e, t, r);
|
|
3401
3401
|
}
|
|
3402
3402
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -3464,43 +3464,43 @@ let he = class extends HTMLElement {
|
|
|
3464
3464
|
firstUpdated(e) {
|
|
3465
3465
|
}
|
|
3466
3466
|
};
|
|
3467
|
-
he.elementStyles = [], he.shadowRootOptions = { mode: "open" }, he[De("elementProperties")] = /* @__PURE__ */ new Map(), he[De("finalized")] = /* @__PURE__ */ new Map(),
|
|
3468
|
-
const
|
|
3469
|
-
\f\r]`, Ue = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
3470
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
3471
|
-
function
|
|
3472
|
-
if (!
|
|
3473
|
-
return
|
|
3474
|
-
}
|
|
3475
|
-
const
|
|
3467
|
+
he.elementStyles = [], he.shadowRootOptions = { mode: "open" }, he[De("elementProperties")] = /* @__PURE__ */ new Map(), he[De("finalized")] = /* @__PURE__ */ new Map(), Es?.({ ReactiveElement: he }), (Qe.reactiveElementVersions ??= []).push("2.1.2");
|
|
3468
|
+
const Ft = globalThis, yr = (n) => n, Ye = Ft.trustedTypes, vr = Ye ? Ye.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, zr = "$lit$", J = `lit$${Math.random().toFixed(9).slice(2)}$`, Wr = "?" + J, Us = `<${Wr}>`, oe = document, $e = () => oe.createComment(""), Pe = (n) => n === null || typeof n != "object" && typeof n != "function", Bt = Array.isArray, Ts = (n) => Bt(n) || typeof n?.[Symbol.iterator] == "function", ut = `[
|
|
3469
|
+
\f\r]`, Ue = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, wr = /-->/g, br = />/g, re = RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
|
|
3470
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Sr = /'/g, _r = /"/g, Yr = /^(?:script|style|textarea|title)$/i, Is = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), x = Is(1), fe = /* @__PURE__ */ Symbol.for("lit-noChange"), U = /* @__PURE__ */ Symbol.for("lit-nothing"), Ar = /* @__PURE__ */ new WeakMap(), ie = oe.createTreeWalker(oe, 129);
|
|
3471
|
+
function Gr(n, e) {
|
|
3472
|
+
if (!Bt(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
3473
|
+
return vr !== void 0 ? vr.createHTML(e) : e;
|
|
3474
|
+
}
|
|
3475
|
+
const Ds = (n, e) => {
|
|
3476
3476
|
const t = n.length - 1, r = [];
|
|
3477
3477
|
let i, s = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", o = Ue;
|
|
3478
3478
|
for (let l = 0; l < t; l++) {
|
|
3479
3479
|
const h = n[l];
|
|
3480
3480
|
let d, p, m = -1, y = 0;
|
|
3481
|
-
for (; y < h.length && (o.lastIndex = y, p = o.exec(h), p !== null); ) y = o.lastIndex, o === Ue ? p[1] === "!--" ? o =
|
|
3481
|
+
for (; y < h.length && (o.lastIndex = y, p = o.exec(h), p !== null); ) y = o.lastIndex, o === Ue ? p[1] === "!--" ? o = wr : p[1] !== void 0 ? o = br : p[2] !== void 0 ? (Yr.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = re) : p[3] !== void 0 && (o = re) : o === re ? p[0] === ">" ? (o = i ?? Ue, m = -1) : p[1] === void 0 ? m = -2 : (m = o.lastIndex - p[2].length, d = p[1], o = p[3] === void 0 ? re : p[3] === '"' ? _r : Sr) : o === _r || o === Sr ? o = re : o === wr || o === br ? o = Ue : (o = re, i = void 0);
|
|
3482
3482
|
const v = o === re && n[l + 1].startsWith("/>") ? " " : "";
|
|
3483
|
-
s += o === Ue ? h +
|
|
3483
|
+
s += o === Ue ? h + Us : m >= 0 ? (r.push(d), h.slice(0, m) + zr + h.slice(m) + J + v) : h + J + (m === -2 ? l : v);
|
|
3484
3484
|
}
|
|
3485
|
-
return [
|
|
3485
|
+
return [Gr(n, s + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
|
|
3486
3486
|
};
|
|
3487
3487
|
class Fe {
|
|
3488
3488
|
constructor({ strings: e, _$litType$: t }, r) {
|
|
3489
3489
|
let i;
|
|
3490
3490
|
this.parts = [];
|
|
3491
3491
|
let s = 0, o = 0;
|
|
3492
|
-
const l = e.length - 1, h = this.parts, [d, p] =
|
|
3492
|
+
const l = e.length - 1, h = this.parts, [d, p] = Ds(e, t);
|
|
3493
3493
|
if (this.el = Fe.createElement(d, r), ie.currentNode = this.el.content, t === 2 || t === 3) {
|
|
3494
3494
|
const m = this.el.content.firstChild;
|
|
3495
3495
|
m.replaceWith(...m.childNodes);
|
|
3496
3496
|
}
|
|
3497
3497
|
for (; (i = ie.nextNode()) !== null && h.length < l; ) {
|
|
3498
3498
|
if (i.nodeType === 1) {
|
|
3499
|
-
if (i.hasAttributes()) for (const m of i.getAttributeNames()) if (m.endsWith(
|
|
3499
|
+
if (i.hasAttributes()) for (const m of i.getAttributeNames()) if (m.endsWith(zr)) {
|
|
3500
3500
|
const y = p[o++], v = i.getAttribute(m).split(J), b = /([.?@])?(.*)/.exec(y);
|
|
3501
|
-
h.push({ type: 1, index: s, name: b[2], strings: v, ctor: b[1] === "." ?
|
|
3501
|
+
h.push({ type: 1, index: s, name: b[2], strings: v, ctor: b[1] === "." ? Rs : b[1] === "?" ? $s : b[1] === "@" ? Ps : et }), i.removeAttribute(m);
|
|
3502
3502
|
} else m.startsWith(J) && (h.push({ type: 6, index: s }), i.removeAttribute(m));
|
|
3503
|
-
if (
|
|
3503
|
+
if (Yr.test(i.tagName)) {
|
|
3504
3504
|
const m = i.textContent.split(J), y = m.length - 1;
|
|
3505
3505
|
if (y > 0) {
|
|
3506
3506
|
i.textContent = Ye ? Ye.emptyScript : "";
|
|
@@ -3508,7 +3508,7 @@ class Fe {
|
|
|
3508
3508
|
i.append(m[y], $e());
|
|
3509
3509
|
}
|
|
3510
3510
|
}
|
|
3511
|
-
} else if (i.nodeType === 8) if (i.data ===
|
|
3511
|
+
} else if (i.nodeType === 8) if (i.data === Wr) h.push({ type: 2, index: s });
|
|
3512
3512
|
else {
|
|
3513
3513
|
let m = -1;
|
|
3514
3514
|
for (; (m = i.data.indexOf(J, m + 1)) !== -1; ) h.push({ type: 7, index: s }), m += J.length - 1;
|
|
@@ -3527,7 +3527,7 @@ function de(n, e, t = n, r) {
|
|
|
3527
3527
|
const s = Pe(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 = de(n, i._$AS(n, e.values), i, r)), e;
|
|
3529
3529
|
}
|
|
3530
|
-
class
|
|
3530
|
+
class ks {
|
|
3531
3531
|
constructor(e, t) {
|
|
3532
3532
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
3533
3533
|
}
|
|
@@ -3544,7 +3544,7 @@ class Is {
|
|
|
3544
3544
|
for (; h !== void 0; ) {
|
|
3545
3545
|
if (o === h.index) {
|
|
3546
3546
|
let d;
|
|
3547
|
-
h.type === 2 ? d = new Be(s, s.nextSibling, this, e) : h.type === 1 ? d = new h.ctor(s, h.name, h.strings, this, e) : h.type === 6 && (d = new
|
|
3547
|
+
h.type === 2 ? d = new Be(s, s.nextSibling, this, e) : h.type === 1 ? d = new h.ctor(s, h.name, h.strings, this, e) : h.type === 6 && (d = new Fs(s, this, e)), this._$AV.push(d), h = r[++l];
|
|
3548
3548
|
}
|
|
3549
3549
|
o !== h?.index && (s = ie.nextNode(), o++);
|
|
3550
3550
|
}
|
|
@@ -3574,7 +3574,7 @@ class Be {
|
|
|
3574
3574
|
return this._$AB;
|
|
3575
3575
|
}
|
|
3576
3576
|
_$AI(e, t = this) {
|
|
3577
|
-
e = de(this, e, t), Pe(e) ? e === U || e == null || e === "" ? (this._$AH !== U && this._$AR(), this._$AH = U) : e !== this._$AH && e !== fe && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) :
|
|
3577
|
+
e = de(this, e, t), Pe(e) ? e === U || e == null || e === "" ? (this._$AH !== U && this._$AR(), this._$AH = U) : e !== this._$AH && e !== fe && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Ts(e) ? this.k(e) : this._(e);
|
|
3578
3578
|
}
|
|
3579
3579
|
O(e) {
|
|
3580
3580
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -3586,19 +3586,19 @@ class Be {
|
|
|
3586
3586
|
this._$AH !== U && Pe(this._$AH) ? this._$AA.nextSibling.data = e : this.T(oe.createTextNode(e)), this._$AH = e;
|
|
3587
3587
|
}
|
|
3588
3588
|
$(e) {
|
|
3589
|
-
const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = Fe.createElement(
|
|
3589
|
+
const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = Fe.createElement(Gr(r.h, r.h[0]), this.options)), r);
|
|
3590
3590
|
if (this._$AH?._$AD === i) this._$AH.p(t);
|
|
3591
3591
|
else {
|
|
3592
|
-
const s = new
|
|
3592
|
+
const s = new ks(i, this), o = s.u(this.options);
|
|
3593
3593
|
s.p(t), this.T(o), this._$AH = s;
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
3596
|
_$AC(e) {
|
|
3597
|
-
let t =
|
|
3598
|
-
return t === void 0 &&
|
|
3597
|
+
let t = Ar.get(e.strings);
|
|
3598
|
+
return t === void 0 && Ar.set(e.strings, t = new Fe(e)), t;
|
|
3599
3599
|
}
|
|
3600
3600
|
k(e) {
|
|
3601
|
-
|
|
3601
|
+
Bt(this._$AH) || (this._$AH = [], this._$AR());
|
|
3602
3602
|
const t = this._$AH;
|
|
3603
3603
|
let r, i = 0;
|
|
3604
3604
|
for (const s of e) i === t.length ? t.push(r = new Be(this.O($e()), this.O($e()), this, this.options)) : r = t[i], r._$AI(s), i++;
|
|
@@ -3606,8 +3606,8 @@ class Be {
|
|
|
3606
3606
|
}
|
|
3607
3607
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
3608
3608
|
for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
|
|
3609
|
-
const r =
|
|
3610
|
-
|
|
3609
|
+
const r = yr(e).nextSibling;
|
|
3610
|
+
yr(e).remove(), e = r;
|
|
3611
3611
|
}
|
|
3612
3612
|
}
|
|
3613
3613
|
setConnected(e) {
|
|
@@ -3639,7 +3639,7 @@ class et {
|
|
|
3639
3639
|
e === U ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
3640
3640
|
}
|
|
3641
3641
|
}
|
|
3642
|
-
class
|
|
3642
|
+
class Rs extends et {
|
|
3643
3643
|
constructor() {
|
|
3644
3644
|
super(...arguments), this.type = 3;
|
|
3645
3645
|
}
|
|
@@ -3647,7 +3647,7 @@ class Ds extends et {
|
|
|
3647
3647
|
this.element[this.name] = e === U ? void 0 : e;
|
|
3648
3648
|
}
|
|
3649
3649
|
}
|
|
3650
|
-
class
|
|
3650
|
+
class $s extends et {
|
|
3651
3651
|
constructor() {
|
|
3652
3652
|
super(...arguments), this.type = 4;
|
|
3653
3653
|
}
|
|
@@ -3655,7 +3655,7 @@ class ks extends et {
|
|
|
3655
3655
|
this.element.toggleAttribute(this.name, !!e && e !== U);
|
|
3656
3656
|
}
|
|
3657
3657
|
}
|
|
3658
|
-
class
|
|
3658
|
+
class Ps extends et {
|
|
3659
3659
|
constructor(e, t, r, i, s) {
|
|
3660
3660
|
super(e, t, r, i, s), this.type = 5;
|
|
3661
3661
|
}
|
|
@@ -3668,7 +3668,7 @@ class Rs extends et {
|
|
|
3668
3668
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
3669
3669
|
}
|
|
3670
3670
|
}
|
|
3671
|
-
class
|
|
3671
|
+
class Fs {
|
|
3672
3672
|
constructor(e, t, r) {
|
|
3673
3673
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = r;
|
|
3674
3674
|
}
|
|
@@ -3679,9 +3679,9 @@ class $s {
|
|
|
3679
3679
|
de(this, e);
|
|
3680
3680
|
}
|
|
3681
3681
|
}
|
|
3682
|
-
const
|
|
3683
|
-
|
|
3684
|
-
const
|
|
3682
|
+
const Bs = Ft.litHtmlPolyfillSupport;
|
|
3683
|
+
Bs?.(Fe, Be), (Ft.litHtmlVersions ??= []).push("3.3.3");
|
|
3684
|
+
const Ms = (n, e, t) => {
|
|
3685
3685
|
const r = t?.renderBefore ?? e;
|
|
3686
3686
|
let i = r._$litPart$;
|
|
3687
3687
|
if (i === void 0) {
|
|
@@ -3690,7 +3690,7 @@ const Fs = (n, e, t) => {
|
|
|
3690
3690
|
}
|
|
3691
3691
|
return i._$AI(n), i;
|
|
3692
3692
|
};
|
|
3693
|
-
const
|
|
3693
|
+
const Mt = globalThis;
|
|
3694
3694
|
class se extends he {
|
|
3695
3695
|
constructor() {
|
|
3696
3696
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
@@ -3701,7 +3701,7 @@ class se extends he {
|
|
|
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 = Ms(t, this.renderRoot, this.renderOptions);
|
|
3705
3705
|
}
|
|
3706
3706
|
connectedCallback() {
|
|
3707
3707
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -3713,11 +3713,11 @@ class se extends he {
|
|
|
3713
3713
|
return fe;
|
|
3714
3714
|
}
|
|
3715
3715
|
}
|
|
3716
|
-
se._$litElement$ = !0, se.finalized = !0,
|
|
3717
|
-
const
|
|
3718
|
-
|
|
3719
|
-
(
|
|
3720
|
-
const
|
|
3716
|
+
se._$litElement$ = !0, se.finalized = !0, Mt.litElementHydrateSupport?.({ LitElement: se });
|
|
3717
|
+
const Os = Mt.litElementPolyfillSupport;
|
|
3718
|
+
Os?.({ LitElement: se });
|
|
3719
|
+
(Mt.litElementVersions ??= []).push("4.2.2");
|
|
3720
|
+
const Ns = z`
|
|
3721
3721
|
:host {
|
|
3722
3722
|
display: block;
|
|
3723
3723
|
box-sizing: border-box;
|
|
@@ -3741,7 +3741,7 @@ const Ms = 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
|
-
`,
|
|
3744
|
+
`, qs = z`
|
|
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); }
|
|
@@ -3772,7 +3772,7 @@ const Ms = z`
|
|
|
3772
3772
|
animation: none !important;
|
|
3773
3773
|
}
|
|
3774
3774
|
}
|
|
3775
|
-
`,
|
|
3775
|
+
`, Ls = z`
|
|
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 Ms = 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
|
-
`,
|
|
3797
|
+
`, Ks = z`
|
|
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 Ms = 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
|
-
`,
|
|
3811
|
+
`, js = z`
|
|
3812
3812
|
.form-card {
|
|
3813
3813
|
align-self: stretch;
|
|
3814
3814
|
background: var(--wral-semantic-surface-default, #FFFFFF);
|
|
@@ -3873,7 +3873,7 @@ const Ms = 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
|
-
`,
|
|
3876
|
+
`, Vs = z`
|
|
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 Ms = 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
|
-
`,
|
|
3963
|
+
`, Hs = z`
|
|
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 Ms = 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
|
-
`,
|
|
3995
|
+
`, zs = z`
|
|
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 Ms = 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
|
-
`,
|
|
4011
|
+
`, Ws = z`
|
|
4012
4012
|
.confirm-card {
|
|
4013
4013
|
align-self: stretch;
|
|
4014
4014
|
background: var(--wral-base-primary-1, #001D68);
|
|
@@ -4058,7 +4058,7 @@ const Ms = z`
|
|
|
4058
4058
|
.c-again:hover { background: rgba(255, 255, 255, 0.12); }
|
|
4059
4059
|
.c-again:focus-visible { outline: 2px solid var(--wral-base-secondary-2, #50A9E8); outline-offset: 2px; }
|
|
4060
4060
|
.c-again:active { transform: scale(0.97); }
|
|
4061
|
-
`,
|
|
4061
|
+
`, Ys = z`
|
|
4062
4062
|
.journey {
|
|
4063
4063
|
align-self: stretch;
|
|
4064
4064
|
background: var(--wral-semantic-surface-default, #FFFFFF);
|
|
@@ -4099,7 +4099,7 @@ const Ms = z`
|
|
|
4099
4099
|
color: var(--wral-base-primary-1, #001D68); margin-bottom: 2px;
|
|
4100
4100
|
}
|
|
4101
4101
|
.j-body .j-d { font-size: 13.5px; color: var(--wral-semantic-fg-muted, #475569); line-height: 1.55; }
|
|
4102
|
-
`,
|
|
4102
|
+
`, Gs = z`
|
|
4103
4103
|
.bottom-bar {
|
|
4104
4104
|
position: sticky; bottom: 0; z-index: 20;
|
|
4105
4105
|
background: var(--wral-semantic-surface-default, #FFFFFF);
|
|
@@ -4112,8 +4112,8 @@ const Ms = z`
|
|
|
4112
4112
|
}
|
|
4113
4113
|
.bottom-bar .note { margin-left: auto; font-size: 12px; color: var(--wral-semantic-fg-subtle, #64748B); }
|
|
4114
4114
|
@media (max-width: 540px) { .bottom-bar .note { display: none; } }
|
|
4115
|
-
`,
|
|
4116
|
-
function
|
|
4115
|
+
`, Js = [Ns, qs, Ls, Ks, js, Vs, Hs, zs, Ws, Ys, Gs];
|
|
4116
|
+
function K(n, e, { noAnim: t = !1, error: r = !1 } = {}) {
|
|
4117
4117
|
return x`
|
|
4118
4118
|
<div class="msg bot ${t ? "no-anim" : ""} ${r ? "error" : ""}">
|
|
4119
4119
|
<span class="lead">${n}</span>
|
|
@@ -4127,17 +4127,17 @@ function He(n, { noAnim: e = !1 } = {}) {
|
|
|
4127
4127
|
function lt() {
|
|
4128
4128
|
return x`<div class="msg bot typing"><span></span><span></span><span></span></div>`;
|
|
4129
4129
|
}
|
|
4130
|
-
function
|
|
4130
|
+
function Zs(n) {
|
|
4131
4131
|
return n ? x`<span class="flag-pill ${n}">${n === "urgent" ? "Urgent" : "Moderate"}</span>` : U;
|
|
4132
4132
|
}
|
|
4133
|
-
function
|
|
4133
|
+
function Xs() {
|
|
4134
4134
|
return x`
|
|
4135
4135
|
<svg viewBox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="3"
|
|
4136
4136
|
stroke-linecap="round" stroke-linejoin="round" width="20" height="20"
|
|
4137
4137
|
aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
|
|
4138
4138
|
`;
|
|
4139
4139
|
}
|
|
4140
|
-
const
|
|
4140
|
+
const Qs = (n = {}) => ({
|
|
4141
4141
|
userPoolId: n.userPoolId || "us-east-1_5Hz6i23GR",
|
|
4142
4142
|
clientId: n.clientId || "835efrp61536otaeun4ob6iqn",
|
|
4143
4143
|
region: n.region || "us-east-1",
|
|
@@ -4155,20 +4155,20 @@ const Zs = (n = {}) => ({
|
|
|
4155
4155
|
} catch {
|
|
4156
4156
|
return null;
|
|
4157
4157
|
}
|
|
4158
|
-
},
|
|
4158
|
+
}, eo = () => {
|
|
4159
4159
|
const n = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789", e = "!@#$%^&*";
|
|
4160
4160
|
return [...Array(12)].map(() => n.charAt(Math.floor(Math.random() * n.length))).join("") + "Aa1" + e.charAt(Math.floor(Math.random() * e.length));
|
|
4161
|
-
},
|
|
4161
|
+
}, Ot = (n) => new AmazonCognitoIdentity.CognitoUserPool({
|
|
4162
4162
|
UserPoolId: n.userPoolId,
|
|
4163
4163
|
ClientId: n.clientId
|
|
4164
|
-
}),
|
|
4164
|
+
}), Nt = (n, e) => new AmazonCognitoIdentity.CognitoUser({
|
|
4165
4165
|
Username: n.toLowerCase().trim(),
|
|
4166
4166
|
Pool: e
|
|
4167
4167
|
}), Je = (n) => ({
|
|
4168
4168
|
idToken: n.getIdToken().getJwtToken(),
|
|
4169
4169
|
accessToken: n.getAccessToken().getJwtToken(),
|
|
4170
4170
|
refreshToken: n.getRefreshToken().getToken()
|
|
4171
|
-
}),
|
|
4171
|
+
}), Jr = () => ({
|
|
4172
4172
|
get: (n) => localStorage.getItem(n),
|
|
4173
4173
|
set: (n, e) => localStorage.setItem(n, e),
|
|
4174
4174
|
remove: (n) => localStorage.removeItem(n),
|
|
@@ -4177,7 +4177,7 @@ const Zs = (n = {}) => ({
|
|
|
4177
4177
|
n.set(N.idToken, e.idToken), n.set(N.accessToken, e.accessToken), n.set(N.refreshToken, e.refreshToken);
|
|
4178
4178
|
const r = t(e.idToken), i = r?.exp ? (r.exp * 1e3).toString() : (Date.now() + 3600 * 1e3).toString();
|
|
4179
4179
|
n.set(N.idTokenExpiry, i), n.set(N.userEmail, r?.email || ""), n.set(N.userId, r?.sub || "");
|
|
4180
|
-
},
|
|
4180
|
+
}, to = (n, e, t) => new Promise((r) => {
|
|
4181
4181
|
const i = t();
|
|
4182
4182
|
e.signUp(
|
|
4183
4183
|
n,
|
|
@@ -4192,9 +4192,9 @@ const Zs = (n = {}) => ({
|
|
|
4192
4192
|
r({ exists: !1, result: o });
|
|
4193
4193
|
}
|
|
4194
4194
|
);
|
|
4195
|
-
}),
|
|
4195
|
+
}), ro = async (n, e, t, r, i, s, o, l, h) => {
|
|
4196
4196
|
const d = e.toLowerCase().trim(), p = r(n);
|
|
4197
|
-
await i(d, p,
|
|
4197
|
+
await i(d, p, eo);
|
|
4198
4198
|
const m = s(d, p);
|
|
4199
4199
|
return m.setAuthenticationFlowType("CUSTOM_AUTH"), new Promise((y, v) => {
|
|
4200
4200
|
m.initiateAuth(new AmazonCognitoIdentity.AuthenticationDetails({
|
|
@@ -4212,7 +4212,7 @@ const Zs = (n = {}) => ({
|
|
|
4212
4212
|
}
|
|
4213
4213
|
});
|
|
4214
4214
|
});
|
|
4215
|
-
},
|
|
4215
|
+
}, no = (n, e, t, r, i, s) => new Promise((o, l) => {
|
|
4216
4216
|
n.sendCustomChallengeAnswer(e, {
|
|
4217
4217
|
onSuccess: (h) => {
|
|
4218
4218
|
const d = r(h);
|
|
@@ -4221,7 +4221,7 @@ const Zs = (n = {}) => ({
|
|
|
4221
4221
|
onFailure: l,
|
|
4222
4222
|
customChallenge: () => l(new Error("Invalid code"))
|
|
4223
4223
|
});
|
|
4224
|
-
}),
|
|
4224
|
+
}), Zr = async (n, e, t, r, i, s, o) => {
|
|
4225
4225
|
const l = e.get(N.refreshToken);
|
|
4226
4226
|
if (!l) return null;
|
|
4227
4227
|
const h = e.get(N.userEmail);
|
|
@@ -4237,14 +4237,14 @@ const Zs = (n = {}) => ({
|
|
|
4237
4237
|
s(e, _, o), y(_.accessToken);
|
|
4238
4238
|
});
|
|
4239
4239
|
});
|
|
4240
|
-
},
|
|
4240
|
+
}, io = async (n, e) => {
|
|
4241
4241
|
let t = e.get(N.accessToken);
|
|
4242
4242
|
if (!t) {
|
|
4243
|
-
const r = await
|
|
4243
|
+
const r = await Zr(
|
|
4244
4244
|
n,
|
|
4245
4245
|
e,
|
|
4246
|
-
|
|
4247
|
-
|
|
4246
|
+
Ot,
|
|
4247
|
+
Nt,
|
|
4248
4248
|
Je,
|
|
4249
4249
|
Ze,
|
|
4250
4250
|
Ge
|
|
@@ -4257,67 +4257,69 @@ const Zs = (n = {}) => ({
|
|
|
4257
4257
|
"Content-Type": "application/json"
|
|
4258
4258
|
};
|
|
4259
4259
|
};
|
|
4260
|
-
let ct = null,
|
|
4261
|
-
function
|
|
4262
|
-
return ct || (ct =
|
|
4260
|
+
let ct = null, xr = null;
|
|
4261
|
+
function qt() {
|
|
4262
|
+
return ct || (ct = Qs(window.authConfig || {}), xr = Jr()), { config: ct, storage: xr };
|
|
4263
4263
|
}
|
|
4264
|
-
async function
|
|
4265
|
-
const { config: n, storage: e } =
|
|
4266
|
-
return
|
|
4264
|
+
async function Xr() {
|
|
4265
|
+
const { config: n, storage: e } = qt();
|
|
4266
|
+
return Zr(
|
|
4267
4267
|
n,
|
|
4268
4268
|
e,
|
|
4269
|
-
|
|
4270
|
-
|
|
4269
|
+
Ot,
|
|
4270
|
+
Nt,
|
|
4271
4271
|
Je,
|
|
4272
4272
|
Ze,
|
|
4273
4273
|
Ge
|
|
4274
4274
|
);
|
|
4275
4275
|
}
|
|
4276
|
-
async function
|
|
4277
|
-
const { storage: n } =
|
|
4278
|
-
return e && t && Date.now() < Number(t) ? !0 : !!await
|
|
4276
|
+
async function so() {
|
|
4277
|
+
const { storage: n } = qt(), e = n.get(N.accessToken), t = n.get(N.idTokenExpiry);
|
|
4278
|
+
return e && t && Date.now() < Number(t) ? !0 : !!await Xr();
|
|
4279
4279
|
}
|
|
4280
|
+
const oo = 15e3;
|
|
4280
4281
|
class ce extends Error {
|
|
4281
4282
|
constructor(e, t) {
|
|
4282
4283
|
super(`api-forms request failed with status ${e}`), this.status = e, this.body = t;
|
|
4283
4284
|
}
|
|
4284
4285
|
}
|
|
4285
|
-
const
|
|
4286
|
-
function
|
|
4286
|
+
const Cr = Object.freeze({ enabled: !1, humanCheck: null });
|
|
4287
|
+
function ao({
|
|
4287
4288
|
baseUrl: n,
|
|
4288
4289
|
fetchFn: e = (...i) => fetch(...i),
|
|
4289
4290
|
xhrFactory: t = () => new XMLHttpRequest(),
|
|
4290
4291
|
getAuthHeaders: r
|
|
4291
4292
|
}) {
|
|
4292
4293
|
const i = String(n || "").replace(/\/+$/, "");
|
|
4293
|
-
let s =
|
|
4294
|
-
async function l(h, { method: d = "GET", body: p, auth: m = !1 } = {}) {
|
|
4295
|
-
const
|
|
4296
|
-
m && Object.assign(
|
|
4297
|
-
let
|
|
4294
|
+
let s = Cr, o = null;
|
|
4295
|
+
async function l(h, { method: d = "GET", body: p, auth: m = !1, timeoutMs: y } = {}) {
|
|
4296
|
+
const v = { Accept: "application/json" };
|
|
4297
|
+
m && Object.assign(v, o ? { Authorization: `Bearer ${o}` } : await r()), p !== void 0 && (v["Content-Type"] = "application/json");
|
|
4298
|
+
let b;
|
|
4298
4299
|
try {
|
|
4299
|
-
|
|
4300
|
+
b = await e(`${i}${h}`, {
|
|
4300
4301
|
method: d,
|
|
4301
|
-
headers:
|
|
4302
|
+
headers: v,
|
|
4303
|
+
...y ? { signal: AbortSignal.timeout(y) } : {},
|
|
4302
4304
|
...p !== void 0 ? { body: JSON.stringify(p) } : {}
|
|
4303
4305
|
});
|
|
4304
|
-
} catch (
|
|
4305
|
-
throw Object.assign(new ce(0, null), { cause:
|
|
4306
|
+
} catch (C) {
|
|
4307
|
+
throw Object.assign(new ce(0, null), { cause: C });
|
|
4306
4308
|
}
|
|
4307
|
-
let
|
|
4309
|
+
let _ = null;
|
|
4308
4310
|
try {
|
|
4309
|
-
|
|
4311
|
+
_ = await b.json();
|
|
4310
4312
|
} catch {
|
|
4311
4313
|
}
|
|
4312
|
-
if (!
|
|
4313
|
-
throw new ce(
|
|
4314
|
-
return
|
|
4314
|
+
if (!b.ok)
|
|
4315
|
+
throw new ce(b.status, _);
|
|
4316
|
+
return _;
|
|
4315
4317
|
}
|
|
4316
4318
|
return {
|
|
4317
4319
|
/** @returns {Promise<Array>} published form documents */
|
|
4318
4320
|
listForms: async () => {
|
|
4319
|
-
const h = await l("/v1/forms");
|
|
4320
|
-
return s = h?.anonymous?.enabled === !0 ? { enabled: !0, humanCheck: h.anonymous.humanCheck || null } :
|
|
4321
|
+
const h = await l("/v1/forms", { timeoutMs: oo });
|
|
4322
|
+
return s = h?.anonymous?.enabled === !0 ? { enabled: !0, humanCheck: h.anonymous.humanCheck || null } : Cr, (h?.forms || []).filter((d) => d?.formId && d?.start && Array.isArray(d?.nodes));
|
|
4321
4323
|
},
|
|
4322
4324
|
/**
|
|
4323
4325
|
* What the server advertised on the last listForms.
|
|
@@ -4367,25 +4369,25 @@ function io({
|
|
|
4367
4369
|
putRequest: async (h, d) => await l(`/v1/requests/${h}`, { method: "PUT", body: d, auth: !0 })
|
|
4368
4370
|
};
|
|
4369
4371
|
}
|
|
4370
|
-
function
|
|
4371
|
-
const { config: n, storage: e } =
|
|
4372
|
+
function uo() {
|
|
4373
|
+
const { config: n, storage: e } = qt();
|
|
4372
4374
|
let t = null;
|
|
4373
4375
|
return {
|
|
4374
|
-
isAuthenticated: () =>
|
|
4376
|
+
isAuthenticated: () => so(),
|
|
4375
4377
|
signedInEmail: () => e.get(N.userEmail) || null,
|
|
4376
|
-
getAuthHeaders: () =>
|
|
4378
|
+
getAuthHeaders: () => io(n, e),
|
|
4377
4379
|
/**
|
|
4378
4380
|
* Email step. Keeps the challenge user in memory for verifyCode.
|
|
4379
4381
|
* @returns {{challengeRequired?: boolean, authenticated?: boolean}}
|
|
4380
4382
|
*/
|
|
4381
4383
|
sendCode: async (r) => {
|
|
4382
|
-
const i = await
|
|
4384
|
+
const i = await ro(
|
|
4383
4385
|
n,
|
|
4384
4386
|
r,
|
|
4385
4387
|
e,
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4388
|
+
Ot,
|
|
4389
|
+
to,
|
|
4390
|
+
Nt,
|
|
4389
4391
|
Je,
|
|
4390
4392
|
Ze,
|
|
4391
4393
|
Ge
|
|
@@ -4403,7 +4405,7 @@ function so() {
|
|
|
4403
4405
|
if (!t)
|
|
4404
4406
|
throw new Error("Please enter your email again to get a new code.");
|
|
4405
4407
|
try {
|
|
4406
|
-
await
|
|
4408
|
+
await no(
|
|
4407
4409
|
t,
|
|
4408
4410
|
r,
|
|
4409
4411
|
e,
|
|
@@ -4414,11 +4416,11 @@ function so() {
|
|
|
4414
4416
|
} catch {
|
|
4415
4417
|
throw new Error("Invalid or expired code. Please request a new one and try again.");
|
|
4416
4418
|
}
|
|
4417
|
-
return await
|
|
4419
|
+
return await Xr(), { success: !0 };
|
|
4418
4420
|
},
|
|
4419
4421
|
/** Local sign-out only ("use a different email"). */
|
|
4420
4422
|
signOut: () => {
|
|
4421
|
-
t = null,
|
|
4423
|
+
t = null, Jr().clear();
|
|
4422
4424
|
},
|
|
4423
4425
|
/**
|
|
4424
4426
|
* Detect a login completed in ANOTHER tab (the storage event
|
|
@@ -4432,14 +4434,14 @@ function so() {
|
|
|
4432
4434
|
}
|
|
4433
4435
|
};
|
|
4434
4436
|
}
|
|
4435
|
-
function
|
|
4436
|
-
const e =
|
|
4437
|
-
return { ...
|
|
4437
|
+
function lo({ baseUrl: n }) {
|
|
4438
|
+
const e = uo();
|
|
4439
|
+
return { ...ao({ baseUrl: n, getAuthHeaders: e.getAuthHeaders }), ...e };
|
|
4438
4440
|
}
|
|
4439
4441
|
function ae(n, e) {
|
|
4440
4442
|
return (n?.nodes || []).find((t) => t.id === e);
|
|
4441
4443
|
}
|
|
4442
|
-
function
|
|
4444
|
+
function Qr(n, e = []) {
|
|
4443
4445
|
const t = [];
|
|
4444
4446
|
let r = n?.start;
|
|
4445
4447
|
for (const s of e) {
|
|
@@ -4460,9 +4462,9 @@ function Zr(n, e = []) {
|
|
|
4460
4462
|
r = o.next;
|
|
4461
4463
|
}
|
|
4462
4464
|
const i = ae(n, r);
|
|
4463
|
-
return i ? { nodeId: r, node: i, flags:
|
|
4465
|
+
return i ? { nodeId: r, node: i, flags: tn(t), error: null } : { nodeId: null, node: null, flags: t, error: { step: null, reason: `unknown node: ${r}` } };
|
|
4464
4466
|
}
|
|
4465
|
-
function
|
|
4467
|
+
function co(n, e = []) {
|
|
4466
4468
|
const t = [];
|
|
4467
4469
|
for (const r of e) {
|
|
4468
4470
|
if (r.kind !== "collect") continue;
|
|
@@ -4471,46 +4473,46 @@ function ao(n, e = []) {
|
|
|
4471
4473
|
}
|
|
4472
4474
|
return t;
|
|
4473
4475
|
}
|
|
4474
|
-
function
|
|
4476
|
+
function ho(n = []) {
|
|
4475
4477
|
const e = {};
|
|
4476
4478
|
for (const t of n)
|
|
4477
4479
|
t.kind === "collect" && Object.assign(e, t.values || {});
|
|
4478
4480
|
return e;
|
|
4479
4481
|
}
|
|
4480
|
-
function
|
|
4482
|
+
function fo(n = []) {
|
|
4481
4483
|
return n.filter((e) => e.kind === "choice").map((e) => `${e.nodeId}:${e.optionId}`);
|
|
4482
4484
|
}
|
|
4483
|
-
function
|
|
4485
|
+
function en(n, e = []) {
|
|
4484
4486
|
const t = [];
|
|
4485
4487
|
for (const r of e) {
|
|
4486
4488
|
if (r.kind !== "choice") continue;
|
|
4487
4489
|
const s = (ae(n, r.nodeId)?.options || []).find((o) => o.id === r.optionId);
|
|
4488
4490
|
t.push(...s?.flags || []);
|
|
4489
4491
|
}
|
|
4490
|
-
return
|
|
4492
|
+
return tn(t);
|
|
4491
4493
|
}
|
|
4492
|
-
function
|
|
4494
|
+
function po(n = []) {
|
|
4493
4495
|
return n.includes("urgent") ? "urgent" : n.includes("moderate") ? "moderate" : null;
|
|
4494
4496
|
}
|
|
4495
|
-
function
|
|
4497
|
+
function tn(n) {
|
|
4496
4498
|
return [...new Set(n)];
|
|
4497
4499
|
}
|
|
4498
|
-
const
|
|
4500
|
+
const go = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/, Er = {
|
|
4499
4501
|
text: 500,
|
|
4500
4502
|
textarea: 5e3,
|
|
4501
4503
|
url: 2048
|
|
4502
4504
|
};
|
|
4503
|
-
function
|
|
4504
|
-
if (e == null || e === "" || n.kind === "location" &&
|
|
4505
|
+
function mo(n, e) {
|
|
4506
|
+
if (e == null || e === "" || n.kind === "location" && yo(e))
|
|
4505
4507
|
return n.required ? `Please fill in: ${n.label.toLowerCase()}.` : null;
|
|
4506
4508
|
switch (n.kind) {
|
|
4507
4509
|
case "text":
|
|
4508
4510
|
case "textarea": {
|
|
4509
|
-
const r = n.maxLength ||
|
|
4511
|
+
const r = n.maxLength || Er[n.kind];
|
|
4510
4512
|
return typeof e != "string" ? `Please enter text for ${n.label.toLowerCase()}.` : e.length > r ? `Please keep ${n.label.toLowerCase()} under ${r} characters.` : null;
|
|
4511
4513
|
}
|
|
4512
4514
|
case "url": {
|
|
4513
|
-
if (typeof e != "string" || e.length >
|
|
4515
|
+
if (typeof e != "string" || e.length > Er.url)
|
|
4514
4516
|
return "Please enter a valid link.";
|
|
4515
4517
|
try {
|
|
4516
4518
|
return new URL(e), null;
|
|
@@ -4519,35 +4521,35 @@ function fo(n, e) {
|
|
|
4519
4521
|
}
|
|
4520
4522
|
}
|
|
4521
4523
|
case "datetime":
|
|
4522
|
-
return
|
|
4524
|
+
return go.test(String(e)) ? null : "Please pick a date and time.";
|
|
4523
4525
|
case "select":
|
|
4524
4526
|
return (n.options || []).map((i) => i.id).includes(e) ? null : `Please choose one of the options for ${n.label.toLowerCase()}.`;
|
|
4525
4527
|
case "consent":
|
|
4526
4528
|
return e === !0 ? null : "Please confirm the rights statement so we can use what you send.";
|
|
4527
4529
|
case "location":
|
|
4528
|
-
return
|
|
4530
|
+
return vo(n, e);
|
|
4529
4531
|
case "media":
|
|
4530
4532
|
return null;
|
|
4531
4533
|
default:
|
|
4532
4534
|
return `Unsupported field: ${n.kind}`;
|
|
4533
4535
|
}
|
|
4534
4536
|
}
|
|
4535
|
-
function
|
|
4537
|
+
function yo(n) {
|
|
4536
4538
|
return n == null ? !0 : typeof n != "object" ? !1 : !n.county && !n.where && !(Array.isArray(n.gps) && n.gps.length);
|
|
4537
4539
|
}
|
|
4538
|
-
function
|
|
4540
|
+
function vo(n, e) {
|
|
4539
4541
|
return typeof e != "object" || Array.isArray(e) ? "Please tell us where this was." : e.county !== void 0 && (typeof e.county != "string" || e.county.length > 100) ? "Please choose a county." : e.where !== void 0 && (typeof e.where != "string" || e.where.length > 500) ? "Please shorten the location description." : e.gps !== void 0 && !(Array.isArray(e.gps) && e.gps.length === 2 && e.gps.every((r) => typeof r == "number" && Number.isFinite(r))) ? "Location coordinates look wrong; try re-sharing your location." : n.required && !e.county && !e.where ? `Please fill in: ${n.label.toLowerCase()}.` : null;
|
|
4540
4542
|
}
|
|
4541
|
-
function
|
|
4543
|
+
function Ur(n, e = {}) {
|
|
4542
4544
|
const t = {};
|
|
4543
4545
|
for (const r of n) {
|
|
4544
4546
|
if (r.kind === "media") continue;
|
|
4545
|
-
const i =
|
|
4547
|
+
const i = mo(r, e[r.key]);
|
|
4546
4548
|
i && (t[r.key] = i);
|
|
4547
4549
|
}
|
|
4548
4550
|
return { ok: Object.keys(t).length === 0, errors: t };
|
|
4549
4551
|
}
|
|
4550
|
-
function
|
|
4552
|
+
function Tt(n = [], e = {}, { required: t = !1 } = {}) {
|
|
4551
4553
|
const {
|
|
4552
4554
|
maxFiles: r = 5,
|
|
4553
4555
|
maxFileBytes: i = 512 * 1024 * 1024,
|
|
@@ -4568,15 +4570,15 @@ function Et(n = [], e = {}, { required: t = !1 } = {}) {
|
|
|
4568
4570
|
});
|
|
4569
4571
|
}), { ok: o.length === 0, errors: o };
|
|
4570
4572
|
}
|
|
4571
|
-
function
|
|
4573
|
+
function Tr({ formId: n, requestId: e, files: t }) {
|
|
4572
4574
|
return {
|
|
4573
4575
|
formId: n,
|
|
4574
4576
|
requestId: e,
|
|
4575
4577
|
files: t.map((r) => ({ contentType: r.type, size: r.size }))
|
|
4576
4578
|
};
|
|
4577
4579
|
}
|
|
4578
|
-
function
|
|
4579
|
-
const r =
|
|
4580
|
+
function wo({ form: n, steps: e, media: t = [] }) {
|
|
4581
|
+
const r = co(n, e), i = ho(e), s = {};
|
|
4580
4582
|
for (const o of r) {
|
|
4581
4583
|
if (o.kind === "media") continue;
|
|
4582
4584
|
const l = i[o.key];
|
|
@@ -4592,12 +4594,12 @@ function mo({ form: n, steps: e, media: t = [] }) {
|
|
|
4592
4594
|
return {
|
|
4593
4595
|
formId: n.formId,
|
|
4594
4596
|
flowVersion: n.flowVersion,
|
|
4595
|
-
path:
|
|
4597
|
+
path: fo(e),
|
|
4596
4598
|
answers: s,
|
|
4597
4599
|
media: t.map(({ assetId: o, type: l }) => ({ assetId: o, type: l }))
|
|
4598
4600
|
};
|
|
4599
4601
|
}
|
|
4600
|
-
function
|
|
4602
|
+
function Ir(n, e) {
|
|
4601
4603
|
if (n === 429)
|
|
4602
4604
|
return {
|
|
4603
4605
|
kind: "throttled",
|
|
@@ -4635,15 +4637,15 @@ function Ur(n, e) {
|
|
|
4635
4637
|
message: "Something went wrong on our end; please try again."
|
|
4636
4638
|
};
|
|
4637
4639
|
}
|
|
4638
|
-
const
|
|
4639
|
-
function
|
|
4640
|
+
const bo = 34, So = 44;
|
|
4641
|
+
function Dr(n, e) {
|
|
4640
4642
|
const t = String(n);
|
|
4641
4643
|
return t.length > e ? `${t.slice(0, e)}…` : t;
|
|
4642
4644
|
}
|
|
4643
|
-
function
|
|
4645
|
+
function _o(n) {
|
|
4644
4646
|
return !n || typeof n != "object" ? "" : [n.county, n.where].filter(Boolean).join(", ");
|
|
4645
4647
|
}
|
|
4646
|
-
function
|
|
4648
|
+
function Ao(n, e = {}, t = []) {
|
|
4647
4649
|
const r = [];
|
|
4648
4650
|
for (const i of n) {
|
|
4649
4651
|
if (i.kind === "consent") continue;
|
|
@@ -4651,21 +4653,21 @@ function bo(n, e = {}, t = []) {
|
|
|
4651
4653
|
t.length && r.push(`${t.length} ${t.length === 1 ? "file" : "files"}`);
|
|
4652
4654
|
continue;
|
|
4653
4655
|
}
|
|
4654
|
-
const s = i.kind === "location" ?
|
|
4655
|
-
s == null || s === "" || (i.kind === "textarea" ? r.push(`"${
|
|
4656
|
+
const s = i.kind === "location" ? _o(e[i.key]) : e[i.key];
|
|
4657
|
+
s == null || s === "" || (i.kind === "textarea" ? r.push(`"${Dr(s, So)}"`) : r.push(Dr(s, bo)));
|
|
4656
4658
|
}
|
|
4657
4659
|
return r.join(" · ") || "Details provided";
|
|
4658
4660
|
}
|
|
4659
|
-
function
|
|
4661
|
+
function xo(n, e = [], t = null) {
|
|
4660
4662
|
const r = [];
|
|
4661
4663
|
for (const s of e) {
|
|
4662
4664
|
const o = ae(n, s.nodeId);
|
|
4663
4665
|
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 }));
|
|
4664
4666
|
}
|
|
4665
|
-
const i =
|
|
4667
|
+
const i = po(en(n, e));
|
|
4666
4668
|
return i && r.push({ k: "Priority", v: i === "urgent" ? "Urgent" : "Moderate", pill: i }), r;
|
|
4667
4669
|
}
|
|
4668
|
-
function
|
|
4670
|
+
function Co(n, e = []) {
|
|
4669
4671
|
const t = n?.confirmation || {};
|
|
4670
4672
|
return {
|
|
4671
4673
|
title: t.title || "Report received.",
|
|
@@ -4673,11 +4675,11 @@ function _o(n, e = []) {
|
|
|
4673
4675
|
urgentNote: e.includes("urgent") ? t.urgentNote : void 0
|
|
4674
4676
|
};
|
|
4675
4677
|
}
|
|
4676
|
-
function
|
|
4678
|
+
function Eo(n, e) {
|
|
4677
4679
|
const t = e === "failed" ? " The notification is queued for a delivery retry." : "";
|
|
4678
4680
|
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.";
|
|
4679
4681
|
}
|
|
4680
|
-
function
|
|
4682
|
+
function Uo({ routing: n = {}, flags: e = [], reference: t = "", anonymous: r = !1 }) {
|
|
4681
4683
|
const i = e.includes("urgent");
|
|
4682
4684
|
return [
|
|
4683
4685
|
{
|
|
@@ -4686,7 +4688,7 @@ function xo({ routing: n = {}, flags: e = [], reference: t = "", anonymous: r =
|
|
|
4686
4688
|
},
|
|
4687
4689
|
{
|
|
4688
4690
|
title: "Routed",
|
|
4689
|
-
body:
|
|
4691
|
+
body: Eo(n.destination, n.state),
|
|
4690
4692
|
pill: i ? "Urgent · pinned first" : void 0
|
|
4691
4693
|
},
|
|
4692
4694
|
{
|
|
@@ -4703,30 +4705,30 @@ function xo({ routing: n = {}, flags: e = [], reference: t = "", anonymous: r =
|
|
|
4703
4705
|
}
|
|
4704
4706
|
];
|
|
4705
4707
|
}
|
|
4706
|
-
const
|
|
4707
|
-
function
|
|
4708
|
+
const Lt = "wral-report-it:draft:v1", rn = 1;
|
|
4709
|
+
function To(n, e) {
|
|
4708
4710
|
try {
|
|
4709
|
-
n.setItem(
|
|
4711
|
+
n.setItem(Lt, JSON.stringify({ ...e, v: rn, savedAt: Date.now() }));
|
|
4710
4712
|
} catch {
|
|
4711
4713
|
}
|
|
4712
4714
|
}
|
|
4713
|
-
function
|
|
4715
|
+
function Io(n) {
|
|
4714
4716
|
try {
|
|
4715
|
-
const e = n.getItem(
|
|
4717
|
+
const e = n.getItem(Lt);
|
|
4716
4718
|
if (!e) return null;
|
|
4717
4719
|
const t = JSON.parse(e);
|
|
4718
|
-
return t?.v !==
|
|
4720
|
+
return t?.v !== rn ? null : t;
|
|
4719
4721
|
} catch {
|
|
4720
4722
|
return null;
|
|
4721
4723
|
}
|
|
4722
4724
|
}
|
|
4723
|
-
function
|
|
4725
|
+
function kr(n) {
|
|
4724
4726
|
try {
|
|
4725
|
-
n.removeItem(
|
|
4727
|
+
n.removeItem(Lt);
|
|
4726
4728
|
} catch {
|
|
4727
4729
|
}
|
|
4728
4730
|
}
|
|
4729
|
-
function
|
|
4731
|
+
function Do({ apiOrigin: n, form: e, steps: t, requestId: r = null, mediaMeta: i = {} }) {
|
|
4730
4732
|
return {
|
|
4731
4733
|
apiOrigin: n,
|
|
4732
4734
|
formId: e.formId,
|
|
@@ -4736,13 +4738,13 @@ function Uo({ apiOrigin: n, form: e, steps: t, requestId: r = null, mediaMeta: i
|
|
|
4736
4738
|
media: i
|
|
4737
4739
|
};
|
|
4738
4740
|
}
|
|
4739
|
-
function
|
|
4741
|
+
function ko(n, e, { apiOrigin: t } = {}) {
|
|
4740
4742
|
if (!n) return { status: "discarded" };
|
|
4741
4743
|
if (t && n.apiOrigin && n.apiOrigin !== t)
|
|
4742
4744
|
return { status: "discarded" };
|
|
4743
4745
|
const r = (e || []).find((o) => o.formId === n.formId);
|
|
4744
4746
|
if (!r) return { status: "discarded" };
|
|
4745
|
-
const { error: i } =
|
|
4747
|
+
const { error: i } = Qr(r, n.steps || []);
|
|
4746
4748
|
if (i) return { status: "discarded" };
|
|
4747
4749
|
const s = {};
|
|
4748
4750
|
for (const [o, l] of Object.entries(n.media || {}))
|
|
@@ -4775,7 +4777,7 @@ function We(n = []) {
|
|
|
4775
4777
|
error: null
|
|
4776
4778
|
};
|
|
4777
4779
|
}
|
|
4778
|
-
function
|
|
4780
|
+
function Ro(n, e) {
|
|
4779
4781
|
switch (e.type) {
|
|
4780
4782
|
case "START":
|
|
4781
4783
|
return { ...n, stage: n.files.length ? "minting" : "requesting", error: null };
|
|
@@ -4802,7 +4804,7 @@ function Io(n, e) {
|
|
|
4802
4804
|
}));
|
|
4803
4805
|
case "FILE_DONE": {
|
|
4804
4806
|
const t = Te(n, e.i, (r) => ({ ...r, status: "done", progress: 1 }));
|
|
4805
|
-
return
|
|
4807
|
+
return $o(t);
|
|
4806
4808
|
}
|
|
4807
4809
|
case "FILE_FAIL":
|
|
4808
4810
|
return { ...Te(n, e.i, (r) => ({
|
|
@@ -4843,14 +4845,14 @@ function Te(n, e, t) {
|
|
|
4843
4845
|
const r = n.files.map((i, s) => s === e ? t(i) : i);
|
|
4844
4846
|
return { ...n, files: r };
|
|
4845
4847
|
}
|
|
4846
|
-
function
|
|
4848
|
+
function $o(n) {
|
|
4847
4849
|
const e = n.files.every((r) => r.status === "done"), t = n.files.some((r) => r.status === "failed");
|
|
4848
4850
|
return e ? { ...n, stage: "requesting" } : t ? { ...n, stage: "uploading-error" } : n;
|
|
4849
4851
|
}
|
|
4850
|
-
function
|
|
4852
|
+
function Rr(n) {
|
|
4851
4853
|
return n.files.map((e, t) => ({ ...e, i: t })).filter((e) => e.status === "failed");
|
|
4852
4854
|
}
|
|
4853
|
-
const
|
|
4855
|
+
const Po = [
|
|
4854
4856
|
"Wake",
|
|
4855
4857
|
"Durham",
|
|
4856
4858
|
"Orange",
|
|
@@ -4867,18 +4869,18 @@ const ko = [
|
|
|
4867
4869
|
"Moore",
|
|
4868
4870
|
"Sampson",
|
|
4869
4871
|
"Other / outside the area"
|
|
4870
|
-
],
|
|
4872
|
+
], $r = "(919) 821-8600", Fo = "https://www.wral.com/my-wral/", Bo = Object.freeze([
|
|
4871
4873
|
"We cannot come back to you for the detail that often turns a tip into a story.",
|
|
4872
4874
|
"We cannot credit you if we use your photos or video.",
|
|
4873
4875
|
"If you lose your reference number, we cannot look it up for you."
|
|
4874
4876
|
]);
|
|
4875
|
-
function
|
|
4877
|
+
function Mo(n) {
|
|
4876
4878
|
const e = String(n).replace(/\D/g, "");
|
|
4877
4879
|
return `tel:+1${e.length === 11 && e.startsWith("1") ? e.slice(1) : e}`;
|
|
4878
4880
|
}
|
|
4879
|
-
const
|
|
4880
|
-
class
|
|
4881
|
-
static styles =
|
|
4881
|
+
const Oo = "https://api.wral.com/forms", No = 480, qo = 2, ht = "Welcome to Report It. What would you like to send us?", ft = "A few quick questions route your report to the right team.", Lo = 2500;
|
|
4882
|
+
class Ko extends se {
|
|
4883
|
+
static styles = Js;
|
|
4882
4884
|
static properties = {
|
|
4883
4885
|
api: { type: String },
|
|
4884
4886
|
_phase: { state: !0 },
|
|
@@ -4886,6 +4888,7 @@ class Oo extends se {
|
|
|
4886
4888
|
_form: { state: !0 },
|
|
4887
4889
|
_steps: { state: !0 },
|
|
4888
4890
|
_typing: { state: !0 },
|
|
4891
|
+
_loadingSlow: { state: !0 },
|
|
4889
4892
|
_cardValues: { state: !0 },
|
|
4890
4893
|
_fieldErrors: { state: !0 },
|
|
4891
4894
|
_gate: { state: !0 },
|
|
@@ -4901,35 +4904,36 @@ class Oo extends se {
|
|
|
4901
4904
|
#r = {};
|
|
4902
4905
|
#n = {};
|
|
4903
4906
|
#i = /* @__PURE__ */ new Map();
|
|
4904
|
-
#
|
|
4905
|
-
#
|
|
4907
|
+
#v = null;
|
|
4908
|
+
#f = null;
|
|
4909
|
+
#w = !1;
|
|
4906
4910
|
#l = null;
|
|
4907
|
-
#
|
|
4911
|
+
#E = 0;
|
|
4908
4912
|
constructor() {
|
|
4909
|
-
super(), this.api =
|
|
4913
|
+
super(), this.api = Oo, this._phase = "loading", this._forms = [], this._form = null, this._steps = [], 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;
|
|
4910
4914
|
}
|
|
4911
4915
|
get client() {
|
|
4912
|
-
return this.#u ? this.#u : ((!this.#o || this.#h !== this.api) && (this.#o =
|
|
4916
|
+
return this.#u ? this.#u : ((!this.#o || this.#h !== this.api) && (this.#o = lo({ baseUrl: this.api }), this.#h = this.api), this.#o);
|
|
4913
4917
|
}
|
|
4914
4918
|
set client(e) {
|
|
4915
|
-
this.#u = e || null, this.isConnected && this.#
|
|
4919
|
+
this.#u = e || null, this.isConnected && this.#b();
|
|
4916
4920
|
}
|
|
4917
4921
|
connectedCallback() {
|
|
4918
|
-
super.connectedCallback(), this.#
|
|
4922
|
+
super.connectedCallback(), this.#b();
|
|
4919
4923
|
}
|
|
4920
4924
|
disconnectedCallback() {
|
|
4921
|
-
super.disconnectedCallback(), clearTimeout(this.#
|
|
4925
|
+
super.disconnectedCallback(), clearTimeout(this.#v), clearTimeout(this.#f), this.#l?.();
|
|
4922
4926
|
for (const { abort: e } of this.#i.values()) e?.();
|
|
4923
4927
|
this.#i.clear();
|
|
4924
4928
|
}
|
|
4925
|
-
get
|
|
4929
|
+
get #P() {
|
|
4926
4930
|
try {
|
|
4927
4931
|
return matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
4928
4932
|
} catch {
|
|
4929
4933
|
return !0;
|
|
4930
4934
|
}
|
|
4931
4935
|
}
|
|
4932
|
-
get #
|
|
4936
|
+
get #d() {
|
|
4933
4937
|
try {
|
|
4934
4938
|
return sessionStorage;
|
|
4935
4939
|
} catch {
|
|
@@ -4944,27 +4948,31 @@ class Oo extends se {
|
|
|
4944
4948
|
* submission is enabled on this deployment, and a form whose desk needs
|
|
4945
4949
|
* a way to reach the viewer opts out with allowAnonymous: false.
|
|
4946
4950
|
*/
|
|
4947
|
-
get #
|
|
4951
|
+
get #F() {
|
|
4948
4952
|
return this.client.anonymousCapability?.().enabled === !0 && this._form?.allowAnonymous !== !1;
|
|
4949
4953
|
}
|
|
4950
4954
|
/* Derived from the gate step, so a reload restores the choice. */
|
|
4951
|
-
get #
|
|
4955
|
+
get #p() {
|
|
4952
4956
|
return this._steps.some((e) => e.kind === "gate" && e.anonymous === !0);
|
|
4953
4957
|
}
|
|
4954
4958
|
// ── Loading + draft restore ─────────────────────────────────────
|
|
4955
|
-
async #
|
|
4956
|
-
const e = ++this.#
|
|
4957
|
-
this._phase = "loading", this._banner = null
|
|
4959
|
+
async #b() {
|
|
4960
|
+
const e = ++this.#E, t = () => e === this.#E;
|
|
4961
|
+
this._phase = "loading", this._banner = null, this._loadingSlow = !1, clearTimeout(this.#f), this.#f = setTimeout(() => {
|
|
4962
|
+
this._loadingSlow = !0;
|
|
4963
|
+
}, Lo);
|
|
4958
4964
|
let r;
|
|
4959
4965
|
try {
|
|
4960
4966
|
r = await this.client.listForms();
|
|
4961
4967
|
} catch {
|
|
4962
4968
|
t() && (this._phase = "load-error");
|
|
4963
4969
|
return;
|
|
4970
|
+
} finally {
|
|
4971
|
+
t() && (clearTimeout(this.#f), this._loadingSlow = !1);
|
|
4964
4972
|
}
|
|
4965
4973
|
if (!t()) return;
|
|
4966
4974
|
this._forms = r;
|
|
4967
|
-
const i =
|
|
4975
|
+
const i = ko(Io(this.#d), this._forms, { apiOrigin: this.api });
|
|
4968
4976
|
if (i.status === "ok" || i.status === "review-required") {
|
|
4969
4977
|
this._form = i.form, this._steps = i.steps, this.#t = i.requestId, this.#n = i.lostMedia || {}, i.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.#a({ animate: !1 });
|
|
4970
4978
|
return;
|
|
@@ -4976,7 +4984,7 @@ class Oo extends se {
|
|
|
4976
4984
|
const e = {};
|
|
4977
4985
|
for (const [t, r] of Object.entries(this.#r))
|
|
4978
4986
|
r.length && (e[t] = r.map(({ name: i, type: s, size: o }) => ({ name: i, type: s, size: o })));
|
|
4979
|
-
|
|
4987
|
+
To(this.#d, Do({
|
|
4980
4988
|
apiOrigin: this.api,
|
|
4981
4989
|
form: this._form,
|
|
4982
4990
|
steps: this._steps,
|
|
@@ -4986,44 +4994,44 @@ class Oo extends se {
|
|
|
4986
4994
|
}
|
|
4987
4995
|
// ── Walk mechanics ──────────────────────────────────────────────
|
|
4988
4996
|
#a({ animate: e = !0 } = {}) {
|
|
4989
|
-
this._phase = "walk", this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, e && !this
|
|
4997
|
+
this._phase = "walk", this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, e && !this.#P ? (this._typing = !0, clearTimeout(this.#v), this.#v = setTimeout(() => {
|
|
4990
4998
|
this._typing = !1;
|
|
4991
|
-
},
|
|
4999
|
+
}, No)) : this._typing = !1;
|
|
4992
5000
|
}
|
|
4993
|
-
get #
|
|
4994
|
-
return this._form ?
|
|
5001
|
+
get #S() {
|
|
5002
|
+
return this._form ? Qr(this._form, this._steps) : { node: null };
|
|
4995
5003
|
}
|
|
4996
|
-
#
|
|
5004
|
+
#B(e) {
|
|
4997
5005
|
this._form = e, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._notice = null, this.#c(), this.#a();
|
|
4998
5006
|
}
|
|
4999
|
-
#
|
|
5007
|
+
#g(e) {
|
|
5000
5008
|
this._steps = [...this._steps, e], this.#c(), this.#a();
|
|
5001
5009
|
}
|
|
5002
|
-
#
|
|
5010
|
+
#M() {
|
|
5003
5011
|
if (this._phase === "done" || this._phase === "submitting") return;
|
|
5004
5012
|
if (this._phase === "review") {
|
|
5005
5013
|
this.#a({ animate: !1 });
|
|
5006
5014
|
return;
|
|
5007
5015
|
}
|
|
5008
5016
|
if (!this._steps.length) {
|
|
5009
|
-
this.#
|
|
5017
|
+
this.#_();
|
|
5010
5018
|
return;
|
|
5011
5019
|
}
|
|
5012
5020
|
const e = this._steps.at(-1);
|
|
5013
5021
|
this._steps = this._steps.slice(0, -1), e.kind === "collect" && (this._cardValues = { ...e.values }), this.#c(), this.#a({ animate: !1 });
|
|
5014
5022
|
}
|
|
5015
|
-
#
|
|
5016
|
-
this.client.endAnonSession?.(), this._form = null, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._result = null, this._banner = null, this._notice = null, this._submit = We([]),
|
|
5023
|
+
#_() {
|
|
5024
|
+
this.client.endAnonSession?.(), this._form = null, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._result = null, this._banner = null, this._notice = null, this._submit = We([]), kr(this.#d), this._phase = "pick";
|
|
5017
5025
|
}
|
|
5018
5026
|
// ── Collect card ────────────────────────────────────────────────
|
|
5019
|
-
#
|
|
5027
|
+
#A(e, t) {
|
|
5020
5028
|
this._cardValues = { ...this._cardValues, [e]: t };
|
|
5021
5029
|
}
|
|
5022
|
-
#
|
|
5023
|
-
const t = e.fields || [], { ok: r, errors: i } =
|
|
5030
|
+
#O(e) {
|
|
5031
|
+
const t = e.fields || [], { ok: r, errors: i } = Ur(t, this._cardValues), s = t.find((h) => h.kind === "media");
|
|
5024
5032
|
let o = !0;
|
|
5025
5033
|
if (s) {
|
|
5026
|
-
const h = this.#r[e.id] || [], d =
|
|
5034
|
+
const h = this.#r[e.id] || [], d = Tt(h, this._form.budget, {
|
|
5027
5035
|
required: !!s.required
|
|
5028
5036
|
});
|
|
5029
5037
|
d.ok ? h.length && (this.#n = { ...this.#n, [e.id]: [] }) : (o = !1, i[s.key] = d.errors[0].message);
|
|
@@ -5033,29 +5041,29 @@ class Oo extends se {
|
|
|
5033
5041
|
return;
|
|
5034
5042
|
}
|
|
5035
5043
|
const l = this.#r[e.id] || [];
|
|
5036
|
-
this.#
|
|
5044
|
+
this.#g({
|
|
5037
5045
|
nodeId: e.id,
|
|
5038
5046
|
kind: "collect",
|
|
5039
5047
|
values: { ...this._cardValues },
|
|
5040
|
-
summary:
|
|
5048
|
+
summary: Ao(t, this._cardValues, l)
|
|
5041
5049
|
});
|
|
5042
5050
|
}
|
|
5043
5051
|
// ── Gate ────────────────────────────────────────────────────────
|
|
5044
|
-
async #
|
|
5045
|
-
if (!(this._gate.stage || this.#
|
|
5046
|
-
this.#
|
|
5052
|
+
async #U() {
|
|
5053
|
+
if (!(this._gate.stage || this.#w)) {
|
|
5054
|
+
this.#w = !0;
|
|
5047
5055
|
try {
|
|
5048
5056
|
const e = await this.client.isAuthenticated();
|
|
5049
5057
|
this._gate = e ? { stage: "signedin", email: this.client.signedInEmail?.() || "", error: "", loading: !1 } : { stage: "email", email: "", error: "", loading: !1 };
|
|
5050
5058
|
} finally {
|
|
5051
|
-
this.#
|
|
5059
|
+
this.#w = !1;
|
|
5052
5060
|
}
|
|
5053
5061
|
this._gate.stage === "email" && this.client.onCrossTabLogin && !this.#l && (this.#l = this.client.onCrossTabLogin(() => {
|
|
5054
|
-
this.#l?.(), this.#l = null, this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#
|
|
5062
|
+
this.#l?.(), this.#l = null, this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#U();
|
|
5055
5063
|
}));
|
|
5056
5064
|
}
|
|
5057
5065
|
}
|
|
5058
|
-
async #
|
|
5066
|
+
async #x() {
|
|
5059
5067
|
const e = this._gate.email.trim();
|
|
5060
5068
|
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
|
|
5061
5069
|
this._gate = { ...this._gate, error: "Please enter a valid email address." };
|
|
@@ -5073,10 +5081,10 @@ class Oo extends se {
|
|
|
5073
5081
|
};
|
|
5074
5082
|
}
|
|
5075
5083
|
}
|
|
5076
|
-
async #
|
|
5084
|
+
async #T(e) {
|
|
5077
5085
|
this._gate = { ...this._gate, error: "", loading: !0 };
|
|
5078
5086
|
try {
|
|
5079
|
-
await this.client.verifyCode(e), this.#
|
|
5087
|
+
await this.client.verifyCode(e), this.#I(this._gate.email);
|
|
5080
5088
|
} catch (t) {
|
|
5081
5089
|
this._gate = {
|
|
5082
5090
|
...this._gate,
|
|
@@ -5085,53 +5093,53 @@ class Oo extends se {
|
|
|
5085
5093
|
};
|
|
5086
5094
|
}
|
|
5087
5095
|
}
|
|
5088
|
-
#
|
|
5096
|
+
#I(e) {
|
|
5089
5097
|
if (this._gate = { stage: null, email: "", error: "", loading: !1 }, this._submit.stage === "auth") {
|
|
5090
5098
|
this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#s();
|
|
5091
5099
|
return;
|
|
5092
5100
|
}
|
|
5093
|
-
const { node: t } = this.#
|
|
5094
|
-
t?.type === "gate" && this.#
|
|
5101
|
+
const { node: t } = this.#S;
|
|
5102
|
+
t?.type === "gate" && this.#g({ nodeId: t.id, kind: "gate", email: e });
|
|
5095
5103
|
}
|
|
5096
|
-
#
|
|
5104
|
+
#N() {
|
|
5097
5105
|
this.client.signOut?.(), this._gate = { stage: "email", email: "", error: "", loading: !1 };
|
|
5098
5106
|
}
|
|
5099
5107
|
// ── Anonymous route ─────────────────────────────────────────────
|
|
5100
|
-
#
|
|
5108
|
+
#q() {
|
|
5101
5109
|
this._gate = { ...this._gate, stage: "anon-confirm", error: "" };
|
|
5102
5110
|
}
|
|
5103
|
-
#
|
|
5111
|
+
#L() {
|
|
5104
5112
|
this._gate = { ...this._gate, stage: "email", error: "" };
|
|
5105
5113
|
}
|
|
5106
5114
|
/*
|
|
5107
5115
|
* Records the choice only. The session is minted at submit, against
|
|
5108
5116
|
* the requestId, so an abandoned form leaves nothing behind.
|
|
5109
5117
|
*/
|
|
5110
|
-
#
|
|
5111
|
-
const { node: e } = this.#
|
|
5112
|
-
e?.type === "gate" && (this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#
|
|
5118
|
+
#K() {
|
|
5119
|
+
const { node: e } = this.#S;
|
|
5120
|
+
e?.type === "gate" && (this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#g({ nodeId: e.id, kind: "gate", anonymous: !0 }));
|
|
5113
5121
|
}
|
|
5114
|
-
async #
|
|
5122
|
+
async #D() {
|
|
5115
5123
|
try {
|
|
5116
5124
|
return await this.client.createAnonSession({
|
|
5117
5125
|
formId: this._form.formId,
|
|
5118
5126
|
requestId: this.#t
|
|
5119
5127
|
}), !0;
|
|
5120
5128
|
} catch (e) {
|
|
5121
|
-
return this._banner =
|
|
5129
|
+
return this._banner = Ir(e?.status ?? 0, e?.body ?? null), !1;
|
|
5122
5130
|
}
|
|
5123
5131
|
}
|
|
5124
5132
|
/* An anonymous session outliving the upload run re-mints in place; there
|
|
5125
5133
|
* is no identity to send back to the sign-in card. */
|
|
5126
|
-
async #
|
|
5127
|
-
if (await this.#
|
|
5134
|
+
async #j() {
|
|
5135
|
+
if (await this.#D()) {
|
|
5128
5136
|
this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#s();
|
|
5129
5137
|
return;
|
|
5130
5138
|
}
|
|
5131
5139
|
this.#e({ type: "REQUEST_FAIL", error: this._banner });
|
|
5132
5140
|
}
|
|
5133
5141
|
// ── Submit pipeline ─────────────────────────────────────────────
|
|
5134
|
-
get #
|
|
5142
|
+
get #m() {
|
|
5135
5143
|
const e = [];
|
|
5136
5144
|
for (const t of this._steps)
|
|
5137
5145
|
if (t.kind === "collect")
|
|
@@ -5140,17 +5148,17 @@ class Oo extends se {
|
|
|
5140
5148
|
return e;
|
|
5141
5149
|
}
|
|
5142
5150
|
#e(e) {
|
|
5143
|
-
this._submit =
|
|
5151
|
+
this._submit = Ro(this._submit, e);
|
|
5144
5152
|
}
|
|
5145
|
-
async #
|
|
5153
|
+
async #V() {
|
|
5146
5154
|
this._banner = null;
|
|
5147
5155
|
for (let e = 0; e < this._steps.length; e++) {
|
|
5148
5156
|
const t = this._steps[e];
|
|
5149
5157
|
if (t.kind !== "collect") continue;
|
|
5150
|
-
const r = ae(this._form, t.nodeId), { ok: i, errors: s } =
|
|
5158
|
+
const r = ae(this._form, t.nodeId), { ok: i, errors: s } = Ur(r?.fields || [], t.values), o = (r?.fields || []).find((h) => h.kind === "media");
|
|
5151
5159
|
let l = !0;
|
|
5152
5160
|
if (o) {
|
|
5153
|
-
const h = this.#r[t.nodeId] || [], d =
|
|
5161
|
+
const h = this.#r[t.nodeId] || [], d = Tt(h, this._form.budget, {
|
|
5154
5162
|
required: !!o.required
|
|
5155
5163
|
});
|
|
5156
5164
|
d.ok || (l = !1, s[o.key] = d.errors[0].message);
|
|
@@ -5160,11 +5168,11 @@ class Oo extends se {
|
|
|
5160
5168
|
return;
|
|
5161
5169
|
}
|
|
5162
5170
|
}
|
|
5163
|
-
if (this.#t = this.#t || crypto.randomUUID(), this.#c(), this.#
|
|
5164
|
-
if (!await this.#
|
|
5171
|
+
if (this.#t = this.#t || crypto.randomUUID(), this.#c(), this.#p) {
|
|
5172
|
+
if (!await this.#D()) return;
|
|
5165
5173
|
} else
|
|
5166
5174
|
this.client.endAnonSession?.();
|
|
5167
|
-
if (this._submit = We(this.#
|
|
5175
|
+
if (this._submit = We(this.#m), this._phase = "submitting", this.#p) {
|
|
5168
5176
|
this.#e({ type: "START" }), this.#s();
|
|
5169
5177
|
return;
|
|
5170
5178
|
}
|
|
@@ -5176,30 +5184,30 @@ class Oo extends se {
|
|
|
5176
5184
|
}
|
|
5177
5185
|
async #s() {
|
|
5178
5186
|
const e = this._submit.stage;
|
|
5179
|
-
if (e === "minting") return this.#
|
|
5180
|
-
if (e === "uploading") return this.#
|
|
5181
|
-
if (e === "requesting") return this.#
|
|
5187
|
+
if (e === "minting") return this.#H();
|
|
5188
|
+
if (e === "uploading") return this.#k();
|
|
5189
|
+
if (e === "requesting") return this.#Y();
|
|
5182
5190
|
}
|
|
5183
|
-
async #
|
|
5191
|
+
async #H() {
|
|
5184
5192
|
try {
|
|
5185
|
-
const e = await this.client.createUploads(
|
|
5193
|
+
const e = await this.client.createUploads(Tr({
|
|
5186
5194
|
formId: this._form.formId,
|
|
5187
5195
|
requestId: this.#t,
|
|
5188
|
-
files: this.#
|
|
5196
|
+
files: this.#m
|
|
5189
5197
|
}));
|
|
5190
5198
|
this.#e({ type: "MINTED", uploads: e }), this.#s();
|
|
5191
5199
|
} catch (e) {
|
|
5192
|
-
this.#
|
|
5200
|
+
this.#C(e);
|
|
5193
5201
|
}
|
|
5194
5202
|
}
|
|
5195
|
-
#
|
|
5203
|
+
#k() {
|
|
5196
5204
|
const e = this._submit.files, t = this.#i.size;
|
|
5197
5205
|
let r = 0;
|
|
5198
|
-
for (let i = 0; i < e.length && t + r <
|
|
5199
|
-
e[i].status !== "uploading" || this.#i.has(i) || (r += 1, this.#
|
|
5206
|
+
for (let i = 0; i < e.length && t + r < qo; i++)
|
|
5207
|
+
e[i].status !== "uploading" || this.#i.has(i) || (r += 1, this.#z(i));
|
|
5200
5208
|
}
|
|
5201
|
-
#
|
|
5202
|
-
const t = this._submit.files[e], r = this.#
|
|
5209
|
+
#z(e) {
|
|
5210
|
+
const t = this._submit.files[e], r = this.#m[e], { promise: i, abort: s } = this.client.uploadFile({
|
|
5203
5211
|
url: t.url,
|
|
5204
5212
|
file: r,
|
|
5205
5213
|
contentType: t.type,
|
|
@@ -5217,52 +5225,52 @@ class Oo extends se {
|
|
|
5217
5225
|
});
|
|
5218
5226
|
});
|
|
5219
5227
|
}
|
|
5220
|
-
async #
|
|
5228
|
+
async #W(e) {
|
|
5221
5229
|
if (this._submit.files[e].error === "expired")
|
|
5222
5230
|
try {
|
|
5223
|
-
const [r] = await this.client.createUploads(
|
|
5231
|
+
const [r] = await this.client.createUploads(Tr({
|
|
5224
5232
|
formId: this._form.formId,
|
|
5225
5233
|
requestId: this.#t,
|
|
5226
|
-
files: [this.#
|
|
5234
|
+
files: [this.#m[e]]
|
|
5227
5235
|
}));
|
|
5228
5236
|
this.#e({ type: "REMINT_FILE", i: e, upload: r });
|
|
5229
5237
|
} catch (r) {
|
|
5230
|
-
this.#
|
|
5238
|
+
this.#C(r);
|
|
5231
5239
|
return;
|
|
5232
5240
|
}
|
|
5233
5241
|
else
|
|
5234
5242
|
this.#e({ type: "RETRY_FILE", i: e });
|
|
5235
|
-
this.#
|
|
5243
|
+
this.#k();
|
|
5236
5244
|
}
|
|
5237
|
-
async #
|
|
5245
|
+
async #Y() {
|
|
5238
5246
|
try {
|
|
5239
|
-
const e = this._submit.files.map(({ assetId: r, type: i }) => ({ assetId: r, type: i })), t = await this.client.putRequest(this.#t,
|
|
5247
|
+
const e = this._submit.files.map(({ assetId: r, type: i }) => ({ assetId: r, type: i })), t = await this.client.putRequest(this.#t, wo({
|
|
5240
5248
|
form: this._form,
|
|
5241
5249
|
steps: this._steps,
|
|
5242
5250
|
media: e
|
|
5243
5251
|
}));
|
|
5244
|
-
this.#e({ type: "REQUEST_OK", result: t }), this._result = t,
|
|
5252
|
+
this.#e({ type: "REQUEST_OK", result: t }), this._result = t, kr(this.#d), this.client.endAnonSession?.(), this._phase = "done";
|
|
5245
5253
|
} catch (e) {
|
|
5246
|
-
this.#
|
|
5254
|
+
this.#C(e);
|
|
5247
5255
|
}
|
|
5248
5256
|
}
|
|
5249
|
-
#
|
|
5250
|
-
const t =
|
|
5257
|
+
#C(e) {
|
|
5258
|
+
const t = Ir(e?.status ?? 0, e?.body ?? null);
|
|
5251
5259
|
if (t.kind === "auth") {
|
|
5252
|
-
if (this.#e({ type: "AUTH_REQUIRED" }), this.#
|
|
5253
|
-
this.#
|
|
5260
|
+
if (this.#e({ type: "AUTH_REQUIRED" }), this.#p) {
|
|
5261
|
+
this.#j();
|
|
5254
5262
|
return;
|
|
5255
5263
|
}
|
|
5256
5264
|
this._gate = { stage: "email", email: "", error: "", loading: !1 };
|
|
5257
5265
|
return;
|
|
5258
5266
|
}
|
|
5259
5267
|
if (t.kind === "stale") {
|
|
5260
|
-
this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t }), this.#
|
|
5268
|
+
this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t }), this.#G();
|
|
5261
5269
|
return;
|
|
5262
5270
|
}
|
|
5263
5271
|
this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t });
|
|
5264
5272
|
}
|
|
5265
|
-
async #
|
|
5273
|
+
async #G() {
|
|
5266
5274
|
try {
|
|
5267
5275
|
this._forms = await this.client.listForms();
|
|
5268
5276
|
const e = this._forms.find((t) => t.formId === this._form.formId);
|
|
@@ -5270,72 +5278,66 @@ class Oo extends se {
|
|
|
5270
5278
|
} catch {
|
|
5271
5279
|
}
|
|
5272
5280
|
}
|
|
5273
|
-
#
|
|
5281
|
+
#J() {
|
|
5274
5282
|
this._banner = null, this.#e({ type: "REQUEST_START" }), this.#s();
|
|
5275
5283
|
}
|
|
5276
5284
|
// ── Render ──────────────────────────────────────────────────────
|
|
5277
5285
|
render() {
|
|
5278
5286
|
return x`
|
|
5279
5287
|
<div class="chat" aria-live="polite">
|
|
5280
|
-
${this.#
|
|
5288
|
+
${this.#Z()}
|
|
5281
5289
|
</div>
|
|
5282
|
-
${this.#
|
|
5290
|
+
${this.#ce()}
|
|
5283
5291
|
`;
|
|
5284
5292
|
}
|
|
5285
|
-
#
|
|
5293
|
+
#Z() {
|
|
5286
5294
|
switch (this._phase) {
|
|
5287
5295
|
case "loading":
|
|
5288
|
-
return
|
|
5296
|
+
return x`${K(ht, this._loadingSlow ? "Loading the form list…" : ft)}
|
|
5297
|
+
${lt()}`;
|
|
5289
5298
|
case "load-error":
|
|
5290
5299
|
return x`
|
|
5291
|
-
${
|
|
5300
|
+
${K("We could not load the forms.", "Check your connection and try again.", { error: !0 })}
|
|
5292
5301
|
<div class="options">
|
|
5293
|
-
<button type="button" class="chip" @click=${() => this.#
|
|
5302
|
+
<button type="button" class="chip" @click=${() => this.#b()}>Try again</button>
|
|
5294
5303
|
</div>
|
|
5295
5304
|
`;
|
|
5296
5305
|
case "pick":
|
|
5297
|
-
return this.#
|
|
5306
|
+
return this.#X();
|
|
5298
5307
|
case "walk":
|
|
5299
|
-
return x`${this.#
|
|
5308
|
+
return x`${this.#y()}${this._typing ? lt() : this.#Q()}`;
|
|
5300
5309
|
case "review":
|
|
5301
|
-
return x`${this.#
|
|
5310
|
+
return x`${this.#y()}${this.#$()}`;
|
|
5302
5311
|
case "submitting":
|
|
5303
|
-
return x`${this.#
|
|
5312
|
+
return x`${this.#y()}${this.#ue()}`;
|
|
5304
5313
|
case "done":
|
|
5305
|
-
return x`${this.#
|
|
5314
|
+
return x`${this.#y()}${this.#le()}`;
|
|
5306
5315
|
default:
|
|
5307
5316
|
return U;
|
|
5308
5317
|
}
|
|
5309
5318
|
}
|
|
5310
|
-
#
|
|
5319
|
+
#X() {
|
|
5311
5320
|
const e = this._forms;
|
|
5312
5321
|
return x`
|
|
5313
|
-
${
|
|
5314
|
-
"Welcome to Report It. What would you like to send us?",
|
|
5315
|
-
"A few quick questions route your report to the right team."
|
|
5316
|
-
)}
|
|
5322
|
+
${K(ht, ft, { noAnim: !0 })}
|
|
5317
5323
|
<div class="options" role="group" aria-label="What would you like to send us?">
|
|
5318
5324
|
${e.map((t, r) => x`
|
|
5319
5325
|
<button type="button" class="chip" style="animation-delay: ${60 + r * 50}ms"
|
|
5320
|
-
@click=${() => this.#
|
|
5326
|
+
@click=${() => this.#B(t)}>${t.title}</button>
|
|
5321
5327
|
`)}
|
|
5322
5328
|
</div>
|
|
5323
5329
|
`;
|
|
5324
5330
|
}
|
|
5325
|
-
#
|
|
5331
|
+
#y() {
|
|
5326
5332
|
const e = [];
|
|
5327
|
-
this._form && (e.push(
|
|
5328
|
-
"Welcome to Report It. What would you like to send us?",
|
|
5329
|
-
"A few quick questions route your report to the right team.",
|
|
5330
|
-
{ noAnim: !0 }
|
|
5331
|
-
)), e.push(He(this._form.title, { noAnim: !0 }))), this._notice && e.push(V(this._notice, "", { noAnim: !0 }));
|
|
5333
|
+
this._form && (e.push(K(ht, ft, { noAnim: !0 })), e.push(He(this._form.title, { noAnim: !0 }))), this._notice && e.push(K(this._notice, "", { noAnim: !0 }));
|
|
5332
5334
|
for (const t of this._steps) {
|
|
5333
5335
|
const r = ae(this._form, t.nodeId);
|
|
5334
|
-
r?.prompt && e.push(
|
|
5336
|
+
r?.prompt && e.push(K(r.prompt, r.help, { noAnim: !0 })), r?.type === "gate" && e.push(t.anonymous ? K(
|
|
5335
5337
|
"Last step: how can we reach you?",
|
|
5336
5338
|
"You chose to send this anonymously.",
|
|
5337
5339
|
{ noAnim: !0 }
|
|
5338
|
-
) :
|
|
5340
|
+
) : K(
|
|
5339
5341
|
"Last step: verify your email so we can follow up.",
|
|
5340
5342
|
"One address, one code. No password needed.",
|
|
5341
5343
|
{ noAnim: !0 }
|
|
@@ -5343,17 +5345,17 @@ class Oo extends se {
|
|
|
5343
5345
|
}
|
|
5344
5346
|
return e;
|
|
5345
5347
|
}
|
|
5346
|
-
#
|
|
5347
|
-
const { node: e, error: t } = this.#
|
|
5348
|
-
return t || !e ?
|
|
5348
|
+
#Q() {
|
|
5349
|
+
const { node: e, error: t } = this.#S;
|
|
5350
|
+
return t || !e ? K("Something went sideways with this form.", "Please start over.", { error: !0 }) : e.type === "choice" ? this.#ee(e) : e.type === "collect" ? this.#te(e) : e.type === "gate" ? this.#R(e) : e.type === "redirect" ? this.#ae(e) : e.type === "terminal" ? this.#$() : U;
|
|
5349
5351
|
}
|
|
5350
|
-
#
|
|
5352
|
+
#ee(e) {
|
|
5351
5353
|
return x`
|
|
5352
|
-
${
|
|
5354
|
+
${K(e.prompt, e.help)}
|
|
5353
5355
|
<div class="options" role="group" aria-label=${e.prompt || "Choose one"}>
|
|
5354
5356
|
${(e.options || []).map((t, r) => x`
|
|
5355
5357
|
<button type="button" class="chip" style="animation-delay: ${60 + r * 50}ms"
|
|
5356
|
-
@click=${() => this.#
|
|
5358
|
+
@click=${() => this.#g({
|
|
5357
5359
|
nodeId: e.id,
|
|
5358
5360
|
kind: "choice",
|
|
5359
5361
|
optionId: t.id,
|
|
@@ -5363,32 +5365,32 @@ class Oo extends se {
|
|
|
5363
5365
|
</div>
|
|
5364
5366
|
`;
|
|
5365
5367
|
}
|
|
5366
|
-
#
|
|
5368
|
+
#te(e) {
|
|
5367
5369
|
const t = e.fields || [];
|
|
5368
5370
|
return x`
|
|
5369
|
-
${
|
|
5371
|
+
${K(e.prompt, e.help)}
|
|
5370
5372
|
<div class="form-card">
|
|
5371
|
-
${t.map((r) => this.#
|
|
5372
|
-
<button type="button" class="btn-primary" @click=${() => this.#
|
|
5373
|
+
${t.map((r) => this.#re(e, r))}
|
|
5374
|
+
<button type="button" class="btn-primary" @click=${() => this.#O(e)}>
|
|
5373
5375
|
Continue
|
|
5374
5376
|
</button>
|
|
5375
5377
|
</div>
|
|
5376
5378
|
`;
|
|
5377
5379
|
}
|
|
5378
|
-
#
|
|
5380
|
+
#re(e, t) {
|
|
5379
5381
|
const r = this._cardValues[t.key], i = this._fieldErrors[t.key], s = !t.required && t.kind !== "consent" ? x` <span class="opt">optional</span>` : U, o = t.kind === "consent" ? U : x`
|
|
5380
5382
|
<label for="f-${t.key}">${t.label}${s}</label>
|
|
5381
5383
|
`;
|
|
5382
5384
|
return x`
|
|
5383
5385
|
<div class="field">
|
|
5384
5386
|
${o}
|
|
5385
|
-
${this.#
|
|
5387
|
+
${this.#ne(e, t, r)}
|
|
5386
5388
|
${i ? x`<div class="err" role="alert">${i}</div>` : U}
|
|
5387
5389
|
</div>
|
|
5388
5390
|
`;
|
|
5389
5391
|
}
|
|
5390
|
-
#
|
|
5391
|
-
const i = (s) => (o) => this.#
|
|
5392
|
+
#ne(e, t, r) {
|
|
5393
|
+
const i = (s) => (o) => this.#A(s, o.target.value);
|
|
5392
5394
|
switch (t.kind) {
|
|
5393
5395
|
case "text":
|
|
5394
5396
|
return x`<input type="text" id="f-${t.key}" .value=${r || ""}
|
|
@@ -5412,12 +5414,12 @@ class Oo extends se {
|
|
|
5412
5414
|
</select>
|
|
5413
5415
|
`;
|
|
5414
5416
|
case "location":
|
|
5415
|
-
return this.#
|
|
5417
|
+
return this.#ie(t, r || {});
|
|
5416
5418
|
case "consent":
|
|
5417
5419
|
return x`
|
|
5418
5420
|
<div class="consent-row">
|
|
5419
5421
|
<input type="checkbox" id="f-${t.key}" .checked=${r === !0}
|
|
5420
|
-
@change=${(s) => this.#
|
|
5422
|
+
@change=${(s) => this.#A(t.key, s.target.checked)}>
|
|
5421
5423
|
<label for="f-${t.key}" style="all: unset; cursor: pointer;">
|
|
5422
5424
|
I took or own this material and give WRAL permission to use it
|
|
5423
5425
|
on air and online with credit to me.
|
|
@@ -5440,8 +5442,8 @@ class Oo extends se {
|
|
|
5440
5442
|
return U;
|
|
5441
5443
|
}
|
|
5442
5444
|
}
|
|
5443
|
-
#
|
|
5444
|
-
const r = e.counties ||
|
|
5445
|
+
#ie(e, t) {
|
|
5446
|
+
const r = e.counties || Po, i = (s) => this.#A(e.key, { ...t, ...s });
|
|
5445
5447
|
return x`
|
|
5446
5448
|
<select id="f-${e.key}" aria-label="County"
|
|
5447
5449
|
@change=${(s) => i({ county: s.target.value || void 0 })}>
|
|
@@ -5457,9 +5459,9 @@ class Oo extends se {
|
|
|
5457
5459
|
@input=${(s) => i({ where: s.target.value || void 0 })}>
|
|
5458
5460
|
`;
|
|
5459
5461
|
}
|
|
5460
|
-
#
|
|
5461
|
-
this.#
|
|
5462
|
-
const t = this._gate, r =
|
|
5462
|
+
#R(e) {
|
|
5463
|
+
this.#U();
|
|
5464
|
+
const t = this._gate, r = K(
|
|
5463
5465
|
"Last step: verify your email so we can follow up.",
|
|
5464
5466
|
"One address, one code. No password needed."
|
|
5465
5467
|
);
|
|
@@ -5470,9 +5472,9 @@ class Oo extends se {
|
|
|
5470
5472
|
You are signed in as <strong>${t.email || "your My WRAL account"}</strong> on this device.
|
|
5471
5473
|
</p>
|
|
5472
5474
|
<button type="button" class="btn-primary"
|
|
5473
|
-
@click=${() => this.#
|
|
5475
|
+
@click=${() => this.#I(t.email)}>Continue</button>
|
|
5474
5476
|
<button type="button" class="btn-ghost"
|
|
5475
|
-
@click=${() => this.#
|
|
5477
|
+
@click=${() => this.#N()}>Use a different email</button>
|
|
5476
5478
|
</div>
|
|
5477
5479
|
` : t.stage === "email" ? x`
|
|
5478
5480
|
${r}
|
|
@@ -5489,12 +5491,12 @@ class Oo extends se {
|
|
|
5489
5491
|
this._gate = { ...t, email: i.target.value };
|
|
5490
5492
|
}}
|
|
5491
5493
|
@keydown=${(i) => {
|
|
5492
|
-
i.key === "Enter" && this.#
|
|
5494
|
+
i.key === "Enter" && this.#x();
|
|
5493
5495
|
}}>
|
|
5494
5496
|
</div>
|
|
5495
5497
|
${t.error ? x`<div class="err" role="alert">${t.error}</div>` : U}
|
|
5496
5498
|
<button type="button" class="login-btn" ?disabled=${t.loading}
|
|
5497
|
-
@click=${() => this.#
|
|
5499
|
+
@click=${() => this.#x()}>
|
|
5498
5500
|
${t.loading ? "Sending…" : "Continue with email"}
|
|
5499
5501
|
</button>
|
|
5500
5502
|
<div class="login-why">
|
|
@@ -5503,12 +5505,12 @@ class Oo extends se {
|
|
|
5503
5505
|
<li>We can follow up on your report</li>
|
|
5504
5506
|
<li>Your contact information fills in automatically next time</li>
|
|
5505
5507
|
<li>You are credited by name when we use your photos or video</li>
|
|
5506
|
-
<li><a href=${
|
|
5508
|
+
<li><a href=${Fo} target="_blank" rel="noopener">All other My WRAL account benefits</a></li>
|
|
5507
5509
|
</ul>
|
|
5508
5510
|
</div>
|
|
5509
|
-
${this._submit.stage === "auth" ? U : this.#
|
|
5511
|
+
${this._submit.stage === "auth" ? U : this.#se()}
|
|
5510
5512
|
</div>
|
|
5511
|
-
` : t.stage === "anon-confirm" ? this.#
|
|
5513
|
+
` : t.stage === "anon-confirm" ? this.#oe(r) : x`
|
|
5512
5514
|
${r}
|
|
5513
5515
|
<div class="form-card login-card">
|
|
5514
5516
|
<h2>Enter verification code</h2>
|
|
@@ -5522,39 +5524,39 @@ class Oo extends se {
|
|
|
5522
5524
|
<div class="field">
|
|
5523
5525
|
<label>Verification code</label>
|
|
5524
5526
|
<wral-code-input
|
|
5525
|
-
@code-complete=${(i) => this.#
|
|
5527
|
+
@code-complete=${(i) => this.#T(i.detail?.code ?? i.detail?.value ?? i.target.value)}>
|
|
5526
5528
|
</wral-code-input>
|
|
5527
5529
|
</div>
|
|
5528
5530
|
${t.error ? x`<div class="err" role="alert">${t.error}</div>` : U}
|
|
5529
5531
|
<button type="button" class="login-btn" ?disabled=${t.loading}
|
|
5530
5532
|
@click=${() => {
|
|
5531
5533
|
const i = this.renderRoot.querySelector("wral-code-input");
|
|
5532
|
-
this.#
|
|
5534
|
+
this.#T(i?.value || "");
|
|
5533
5535
|
}}>
|
|
5534
5536
|
${t.loading ? "Checking…" : "Sign in"}
|
|
5535
5537
|
</button>
|
|
5536
5538
|
<p class="login-help">
|
|
5537
5539
|
Didn’t receive a code? Check your spam folder or
|
|
5538
|
-
<button type="button" @click=${() => this.#
|
|
5540
|
+
<button type="button" @click=${() => this.#x()}>resend a new code</button>.
|
|
5539
5541
|
</p>
|
|
5540
5542
|
</div>
|
|
5541
5543
|
` : x`${r}${lt()}`;
|
|
5542
5544
|
}
|
|
5543
5545
|
/* Collapsed by default: findable for whoever needs it, never the
|
|
5544
5546
|
* first thing a viewer reaches for. */
|
|
5545
|
-
#
|
|
5547
|
+
#se() {
|
|
5546
5548
|
return x`
|
|
5547
5549
|
<details class="login-alt">
|
|
5548
5550
|
<summary>Other ways to send this</summary>
|
|
5549
5551
|
<div class="alt-body">
|
|
5550
5552
|
<p class="alt-row">
|
|
5551
5553
|
Call the newsroom desk at
|
|
5552
|
-
<a href=${
|
|
5554
|
+
<a href=${Mo($r)}>${$r}</a>.
|
|
5553
5555
|
</p>
|
|
5554
|
-
${this.#
|
|
5556
|
+
${this.#F ? x`
|
|
5555
5557
|
<p class="alt-row">
|
|
5556
5558
|
<button type="button" class="alt-link"
|
|
5557
|
-
@click=${() => this.#
|
|
5559
|
+
@click=${() => this.#q()}>Send this anonymously</button>
|
|
5558
5560
|
— no follow-up, and no credit if we use your photos or video.
|
|
5559
5561
|
</p>
|
|
5560
5562
|
` : U}
|
|
@@ -5562,7 +5564,7 @@ class Oo extends se {
|
|
|
5562
5564
|
</details>
|
|
5563
5565
|
`;
|
|
5564
5566
|
}
|
|
5565
|
-
#
|
|
5567
|
+
#oe(e) {
|
|
5566
5568
|
return x`
|
|
5567
5569
|
${e}
|
|
5568
5570
|
<div class="form-card login-card">
|
|
@@ -5571,20 +5573,20 @@ class Oo extends se {
|
|
|
5571
5573
|
You can send this report without an account. Here is what it costs you.
|
|
5572
5574
|
</p>
|
|
5573
5575
|
<ul class="anon-costs">
|
|
5574
|
-
${
|
|
5576
|
+
${Bo.map((t) => x`
|
|
5575
5577
|
<li><span class="x" aria-hidden="true">✕</span><span>${t}</span></li>
|
|
5576
5578
|
`)}
|
|
5577
5579
|
</ul>
|
|
5578
5580
|
<div class="anon-actions">
|
|
5579
5581
|
<button type="button" class="login-btn"
|
|
5580
|
-
@click=${() => this.#
|
|
5582
|
+
@click=${() => this.#L()}>Sign in instead</button>
|
|
5581
5583
|
<button type="button" class="btn-ghost"
|
|
5582
|
-
@click=${() => this.#
|
|
5584
|
+
@click=${() => this.#K()}>Continue anonymously</button>
|
|
5583
5585
|
</div>
|
|
5584
5586
|
</div>
|
|
5585
5587
|
`;
|
|
5586
5588
|
}
|
|
5587
|
-
#
|
|
5589
|
+
#ae(e) {
|
|
5588
5590
|
const t = e.redirect || {};
|
|
5589
5591
|
return x`
|
|
5590
5592
|
<div class="form-card">
|
|
@@ -5603,16 +5605,16 @@ class Oo extends se {
|
|
|
5603
5605
|
</div>
|
|
5604
5606
|
`;
|
|
5605
5607
|
}
|
|
5606
|
-
|
|
5607
|
-
const e =
|
|
5608
|
+
#$() {
|
|
5609
|
+
const e = xo(this._form, this._steps);
|
|
5608
5610
|
return x`
|
|
5609
|
-
${
|
|
5611
|
+
${K("Here is what you are sending.", "Check it over, then submit.")}
|
|
5610
5612
|
<div class="form-card">
|
|
5611
5613
|
<ul class="review-list">
|
|
5612
5614
|
${e.map((t) => x`
|
|
5613
5615
|
<li>
|
|
5614
5616
|
<span class="k">${t.k}</span>
|
|
5615
|
-
<span>${t.pill ?
|
|
5617
|
+
<span>${t.pill ? Zs(t.pill) : t.v}</span>
|
|
5616
5618
|
</li>
|
|
5617
5619
|
`)}
|
|
5618
5620
|
</ul>
|
|
@@ -5620,16 +5622,16 @@ class Oo extends se {
|
|
|
5620
5622
|
<div class="err" role="alert" style="margin-top: 12px;">${this._banner.message}</div>
|
|
5621
5623
|
` : U}
|
|
5622
5624
|
<div style="margin-top: 16px;">
|
|
5623
|
-
<button type="button" class="btn-primary" @click=${() => this.#
|
|
5625
|
+
<button type="button" class="btn-primary" @click=${() => this.#V()}>
|
|
5624
5626
|
Submit report
|
|
5625
5627
|
</button>
|
|
5626
5628
|
</div>
|
|
5627
5629
|
</div>
|
|
5628
5630
|
`;
|
|
5629
5631
|
}
|
|
5630
|
-
#
|
|
5632
|
+
#ue() {
|
|
5631
5633
|
const e = this._submit;
|
|
5632
|
-
if (e.stage === "auth") return this.#
|
|
5634
|
+
if (e.stage === "auth") return this.#R({ id: null, type: "gate" });
|
|
5633
5635
|
const t = {
|
|
5634
5636
|
minting: "Preparing your uploads…",
|
|
5635
5637
|
uploading: "Uploading your files…",
|
|
@@ -5638,7 +5640,7 @@ class Oo extends se {
|
|
|
5638
5640
|
"requesting-error": this._banner?.message || "We could not send your report."
|
|
5639
5641
|
}[e.stage] || "Working…";
|
|
5640
5642
|
return x`
|
|
5641
|
-
${
|
|
5643
|
+
${K("Submitting your report.", t)}
|
|
5642
5644
|
<div class="form-card">
|
|
5643
5645
|
${e.files.map((r, i) => x`
|
|
5644
5646
|
<div class="upload-row">
|
|
@@ -5652,7 +5654,7 @@ class Oo extends se {
|
|
|
5652
5654
|
${r.status === "done" ? "Done" : r.status === "failed" ? "Failed" : "Uploading"}
|
|
5653
5655
|
</span>
|
|
5654
5656
|
${r.status === "failed" ? x`
|
|
5655
|
-
<button type="button" class="retry-chip" @click=${() => this.#
|
|
5657
|
+
<button type="button" class="retry-chip" @click=${() => this.#W(i)}>
|
|
5656
5658
|
Retry
|
|
5657
5659
|
</button>
|
|
5658
5660
|
` : U}
|
|
@@ -5665,26 +5667,26 @@ class Oo extends se {
|
|
|
5665
5667
|
${Math.ceil(this._banner.retryAfter / 60)} minutes.</div>
|
|
5666
5668
|
` : U}
|
|
5667
5669
|
<button type="button" class="btn-primary" style="margin-top: 8px;"
|
|
5668
|
-
@click=${() => this.#
|
|
5670
|
+
@click=${() => this.#J()}>Try again</button>
|
|
5669
5671
|
` : U}
|
|
5670
|
-
${
|
|
5672
|
+
${Rr(e).length && e.stage === "uploading-error" ? x`
|
|
5671
5673
|
<div class="err" role="alert">Retry the failed
|
|
5672
|
-
${
|
|
5674
|
+
${Rr(e).length === 1 ? "file" : "files"} to continue.</div>
|
|
5673
5675
|
` : U}
|
|
5674
5676
|
</div>
|
|
5675
5677
|
`;
|
|
5676
5678
|
}
|
|
5677
|
-
#
|
|
5678
|
-
const e =
|
|
5679
|
+
#le() {
|
|
5680
|
+
const e = en(this._form, this._steps), t = Co(this._result, e), r = Uo({
|
|
5679
5681
|
routing: this._result?.routing || {},
|
|
5680
5682
|
flags: e,
|
|
5681
5683
|
reference: this._result?.reference || "",
|
|
5682
|
-
anonymous: this.#
|
|
5684
|
+
anonymous: this.#p
|
|
5683
5685
|
});
|
|
5684
5686
|
return x`
|
|
5685
5687
|
<div class="confirm-card">
|
|
5686
5688
|
<div class="c-head">
|
|
5687
|
-
<div class="c-check">${
|
|
5689
|
+
<div class="c-check">${Xs()}</div>
|
|
5688
5690
|
<div>
|
|
5689
5691
|
<div class="eyebrow">Report received</div>
|
|
5690
5692
|
<h2>${t.title}</h2>
|
|
@@ -5695,7 +5697,7 @@ class Oo extends se {
|
|
|
5695
5697
|
<div class="refs">
|
|
5696
5698
|
<span class="ref"><span class="rk">Reference</span>${this._result?.reference || ""}</span>
|
|
5697
5699
|
</div>
|
|
5698
|
-
<button type="button" class="c-again" @click=${() => this.#
|
|
5700
|
+
<button type="button" class="c-again" @click=${() => this.#_()}>
|
|
5699
5701
|
Start a new report
|
|
5700
5702
|
</button>
|
|
5701
5703
|
</div>
|
|
@@ -5716,15 +5718,15 @@ class Oo extends se {
|
|
|
5716
5718
|
</div>
|
|
5717
5719
|
`;
|
|
5718
5720
|
}
|
|
5719
|
-
#
|
|
5721
|
+
#ce() {
|
|
5720
5722
|
const e = this._phase === "submitting" || this._phase === "done" || this._phase === "loading" || this._phase === "load-error";
|
|
5721
5723
|
return x`
|
|
5722
5724
|
<div class="bottom-bar">
|
|
5723
5725
|
<div class="inner">
|
|
5724
5726
|
<button type="button" class="btn-ghost" ?disabled=${e || this._phase === "pick"}
|
|
5725
|
-
@click=${() => this.#
|
|
5727
|
+
@click=${() => this.#M()}>← Back</button>
|
|
5726
5728
|
<button type="button" class="btn-ghost" ?disabled=${this._phase === "submitting"}
|
|
5727
|
-
@click=${() => this.#
|
|
5729
|
+
@click=${() => this.#_()}>Start over</button>
|
|
5728
5730
|
<span class="note">Your report goes to a person on the right desk.</span>
|
|
5729
5731
|
</div>
|
|
5730
5732
|
</div>
|
|
@@ -5734,7 +5736,7 @@ class Oo extends se {
|
|
|
5734
5736
|
this.renderRoot?.querySelector(".chat")?.lastElementChild?.scrollIntoView?.({ block: "nearest" });
|
|
5735
5737
|
}
|
|
5736
5738
|
}
|
|
5737
|
-
class
|
|
5739
|
+
class jo extends se {
|
|
5738
5740
|
static properties = {
|
|
5739
5741
|
files: { attribute: !1 },
|
|
5740
5742
|
lostMeta: { attribute: !1 },
|
|
@@ -5783,7 +5785,7 @@ class No extends se {
|
|
|
5783
5785
|
t.splice(e, 1), this.#o(t);
|
|
5784
5786
|
}
|
|
5785
5787
|
render() {
|
|
5786
|
-
const e = this.files || [], { errors: t } =
|
|
5788
|
+
const e = this.files || [], { errors: t } = Tt(e, this.budget, { required: !1 });
|
|
5787
5789
|
return x`
|
|
5788
5790
|
<input type="file" multiple
|
|
5789
5791
|
accept=${this.#u || U}
|
|
@@ -5794,7 +5796,7 @@ class No extends se {
|
|
|
5794
5796
|
${e.map((r, i) => x`
|
|
5795
5797
|
<li>
|
|
5796
5798
|
<span>${r.name}</span>
|
|
5797
|
-
<span class="size">${
|
|
5799
|
+
<span class="size">${Vo(r.size)}</span>
|
|
5798
5800
|
<button type="button" class="remove"
|
|
5799
5801
|
aria-label="Remove ${r.name}"
|
|
5800
5802
|
@click=${() => this.#t(i)}>✕</button>
|
|
@@ -5813,15 +5815,15 @@ class No extends se {
|
|
|
5813
5815
|
`;
|
|
5814
5816
|
}
|
|
5815
5817
|
}
|
|
5816
|
-
function
|
|
5818
|
+
function Vo(n) {
|
|
5817
5819
|
return Number.isFinite(n) ? n >= 1024 * 1024 ? `${(n / (1024 * 1024)).toFixed(1)} MB` : n >= 1024 ? `${Math.round(n / 1024)} KB` : `${n} B` : "";
|
|
5818
5820
|
}
|
|
5819
|
-
const
|
|
5821
|
+
const Ho = (n, e, t, r) => {
|
|
5820
5822
|
const i = e.target.value.replace(/\D/g, "").slice(-1), s = [...t];
|
|
5821
5823
|
s[n] = i;
|
|
5822
5824
|
const o = s.join(""), l = s.every((h) => h !== "");
|
|
5823
5825
|
return r("code-change", { value: o, complete: l }), i && l && r("code-complete", { value: o }), s;
|
|
5824
|
-
},
|
|
5826
|
+
}, zo = (n, e, t, r) => {
|
|
5825
5827
|
if (e.key === "Backspace") {
|
|
5826
5828
|
const i = [...t];
|
|
5827
5829
|
!i[n] && n > 0 ? i[n - 1] = "" : i[n] && (i[n] = "");
|
|
@@ -5829,7 +5831,7 @@ const Lo = (n, e, t, r) => {
|
|
|
5829
5831
|
return r("code-change", { value: s, complete: !1 }), i;
|
|
5830
5832
|
}
|
|
5831
5833
|
return t;
|
|
5832
|
-
},
|
|
5834
|
+
}, Wo = (n, e, t) => {
|
|
5833
5835
|
n.preventDefault();
|
|
5834
5836
|
const r = n.clipboardData.getData("text").replace(/\D/g, "").slice(0, 6);
|
|
5835
5837
|
if (r.length === 0) return e;
|
|
@@ -5839,7 +5841,7 @@ const Lo = (n, e, t, r) => {
|
|
|
5839
5841
|
const s = i.join(""), o = i.every((l) => l !== "");
|
|
5840
5842
|
return t("code-change", { value: s, complete: o }), r.length === 6 && t("code-complete", { value: s }), i;
|
|
5841
5843
|
};
|
|
5842
|
-
class
|
|
5844
|
+
class Yo extends se {
|
|
5843
5845
|
static formAssociated = !0;
|
|
5844
5846
|
static properties = {
|
|
5845
5847
|
_values: { type: Array, state: !0 },
|
|
@@ -5944,7 +5946,7 @@ class Vo extends se {
|
|
|
5944
5946
|
this.getInputs()[e]?.focus();
|
|
5945
5947
|
}
|
|
5946
5948
|
inputHandler(e, t) {
|
|
5947
|
-
this._values =
|
|
5949
|
+
this._values = Ho(
|
|
5948
5950
|
e,
|
|
5949
5951
|
t,
|
|
5950
5952
|
this._values,
|
|
@@ -5954,7 +5956,7 @@ class Vo extends se {
|
|
|
5954
5956
|
keydownHandler(e, t) {
|
|
5955
5957
|
if (t.key === "Backspace") {
|
|
5956
5958
|
const r = !this._values[e];
|
|
5957
|
-
this._values =
|
|
5959
|
+
this._values = zo(
|
|
5958
5960
|
e,
|
|
5959
5961
|
t,
|
|
5960
5962
|
this._values,
|
|
@@ -5963,7 +5965,7 @@ class Vo extends se {
|
|
|
5963
5965
|
}
|
|
5964
5966
|
}
|
|
5965
5967
|
pasteHandler(e) {
|
|
5966
|
-
this._values =
|
|
5968
|
+
this._values = Wo(e, this._values, this.dispatchCustomEvent.bind(this));
|
|
5967
5969
|
}
|
|
5968
5970
|
render() {
|
|
5969
5971
|
return x`
|
|
@@ -5987,19 +5989,19 @@ class Vo extends se {
|
|
|
5987
5989
|
`;
|
|
5988
5990
|
}
|
|
5989
5991
|
}
|
|
5990
|
-
typeof window < "u" && !window.AmazonCognitoIdentity && (window.AmazonCognitoIdentity =
|
|
5991
|
-
const
|
|
5992
|
-
"wral-report-it":
|
|
5993
|
-
"wral-report-media":
|
|
5994
|
-
"wral-code-input":
|
|
5992
|
+
typeof window < "u" && !window.AmazonCognitoIdentity && (window.AmazonCognitoIdentity = ms);
|
|
5993
|
+
const Go = {
|
|
5994
|
+
"wral-report-it": Ko,
|
|
5995
|
+
"wral-report-media": jo,
|
|
5996
|
+
"wral-code-input": Yo
|
|
5995
5997
|
};
|
|
5996
|
-
function
|
|
5998
|
+
function Jo() {
|
|
5997
5999
|
const n = globalThis?.customElements;
|
|
5998
6000
|
if (n)
|
|
5999
|
-
for (const [e, t] of Object.entries(
|
|
6001
|
+
for (const [e, t] of Object.entries(Go))
|
|
6000
6002
|
n.get(e) || n.define(e, t);
|
|
6001
6003
|
}
|
|
6002
|
-
typeof window < "u" && globalThis.customElements &&
|
|
6004
|
+
typeof window < "u" && globalThis.customElements && Jo();
|
|
6003
6005
|
export {
|
|
6004
|
-
|
|
6006
|
+
Jo as defineAll
|
|
6005
6007
|
};
|