@wral/report-it 0.1.2 → 0.1.3

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 hn = /* @__PURE__ */ (function() {
1
+ var dn = /* @__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;
@@ -40,82 +40,82 @@ function Ut(n) {
40
40
  });
41
41
  }), t;
42
42
  }
43
- var rt = {}, ye = {}, zt;
44
- function fn() {
45
- if (zt) return ye;
46
- zt = 1, ye.byteLength = l, ye.toByteArray = d, ye.fromByteArray = v;
43
+ var rt = {}, we = {}, zt;
44
+ function pn() {
45
+ if (zt) return we;
46
+ zt = 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;
50
- function o(y) {
51
- var b = y.length;
50
+ function o(v) {
51
+ var b = v.length;
52
52
  if (b % 4 > 0)
53
53
  throw new Error("Invalid string. Length must be a multiple of 4");
54
- var _ = y.indexOf("=");
54
+ var _ = v.indexOf("=");
55
55
  _ === -1 && (_ = b);
56
- var E = _ === b ? 0 : 4 - _ % 4;
57
- return [_, E];
56
+ var C = _ === b ? 0 : 4 - _ % 4;
57
+ return [_, C];
58
58
  }
59
- function l(y) {
60
- var b = o(y), _ = b[0], E = b[1];
61
- return (_ + E) * 3 / 4 - E;
59
+ function l(v) {
60
+ var b = o(v), _ = b[0], C = b[1];
61
+ return (_ + C) * 3 / 4 - C;
62
62
  }
63
- function h(y, b, _) {
63
+ function h(v, b, _) {
64
64
  return (b + _) * 3 / 4 - _;
65
65
  }
66
- function d(y) {
67
- var b, _ = o(y), E = _[0], x = _[1], U = new t(h(y, E, x)), P = 0, B = x > 0 ? E - 4 : E, F;
66
+ function d(v) {
67
+ var b, _ = o(v), C = _[0], E = _[1], T = new t(h(v, C, E)), P = 0, B = E > 0 ? C - 4 : C, F;
68
68
  for (F = 0; F < B; F += 4)
69
- b = e[y.charCodeAt(F)] << 18 | e[y.charCodeAt(F + 1)] << 12 | e[y.charCodeAt(F + 2)] << 6 | e[y.charCodeAt(F + 3)], U[P++] = b >> 16 & 255, U[P++] = b >> 8 & 255, U[P++] = b & 255;
70
- return x === 2 && (b = e[y.charCodeAt(F)] << 2 | e[y.charCodeAt(F + 1)] >> 4, U[P++] = b & 255), x === 1 && (b = e[y.charCodeAt(F)] << 10 | e[y.charCodeAt(F + 1)] << 4 | e[y.charCodeAt(F + 2)] >> 2, U[P++] = b >> 8 & 255, U[P++] = b & 255), U;
69
+ b = e[v.charCodeAt(F)] << 18 | e[v.charCodeAt(F + 1)] << 12 | e[v.charCodeAt(F + 2)] << 6 | e[v.charCodeAt(F + 3)], T[P++] = b >> 16 & 255, T[P++] = b >> 8 & 255, T[P++] = b & 255;
70
+ return E === 2 && (b = e[v.charCodeAt(F)] << 2 | e[v.charCodeAt(F + 1)] >> 4, T[P++] = b & 255), E === 1 && (b = e[v.charCodeAt(F)] << 10 | e[v.charCodeAt(F + 1)] << 4 | e[v.charCodeAt(F + 2)] >> 2, T[P++] = b >> 8 & 255, T[P++] = b & 255), T;
71
71
  }
72
- function p(y) {
73
- return n[y >> 18 & 63] + n[y >> 12 & 63] + n[y >> 6 & 63] + n[y & 63];
72
+ function p(v) {
73
+ return n[v >> 18 & 63] + n[v >> 12 & 63] + n[v >> 6 & 63] + n[v & 63];
74
74
  }
75
- function m(y, b, _) {
76
- for (var E, x = [], U = b; U < _; U += 3)
77
- E = (y[U] << 16 & 16711680) + (y[U + 1] << 8 & 65280) + (y[U + 2] & 255), x.push(p(E));
78
- return x.join("");
75
+ function m(v, b, _) {
76
+ for (var C, E = [], T = b; T < _; T += 3)
77
+ C = (v[T] << 16 & 16711680) + (v[T + 1] << 8 & 65280) + (v[T + 2] & 255), E.push(p(C));
78
+ return E.join("");
79
79
  }
80
- function v(y) {
81
- for (var b, _ = y.length, E = _ % 3, x = [], U = 16383, P = 0, B = _ - E; P < B; P += U)
82
- x.push(m(y, P, P + U > B ? B : P + U));
83
- return E === 1 ? (b = y[_ - 1], x.push(
80
+ function y(v) {
81
+ for (var b, _ = v.length, C = _ % 3, E = [], T = 16383, P = 0, B = _ - C; P < B; P += T)
82
+ E.push(m(v, P, P + T > B ? B : P + T));
83
+ return C === 1 ? (b = v[_ - 1], E.push(
84
84
  n[b >> 2] + n[b << 4 & 63] + "=="
85
- )) : E === 2 && (b = (y[_ - 2] << 8) + y[_ - 1], x.push(
85
+ )) : C === 2 && (b = (v[_ - 2] << 8) + v[_ - 1], E.push(
86
86
  n[b >> 10] + n[b >> 4 & 63] + n[b << 2 & 63] + "="
87
- )), x.join("");
87
+ )), E.join("");
88
88
  }
89
- return ye;
89
+ return we;
90
90
  }
91
91
  var Ke = {};
92
92
  var Wt;
93
- function dn() {
93
+ function gn() {
94
94
  return Wt || (Wt = 1, Ke.read = function(n, e, t, r, i) {
95
- var s, o, l = i * 8 - r - 1, h = (1 << l) - 1, d = h >> 1, p = -7, m = t ? i - 1 : 0, v = t ? -1 : 1, y = n[e + m];
96
- for (m += v, s = y & (1 << -p) - 1, y >>= -p, p += l; p > 0; s = s * 256 + n[e + m], m += v, p -= 8)
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
+ 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
  ;
98
- for (o = s & (1 << -p) - 1, s >>= -p, p += r; p > 0; o = o * 256 + n[e + m], m += v, p -= 8)
98
+ for (o = s & (1 << -p) - 1, s >>= -p, p += r; p > 0; o = o * 256 + n[e + m], m += y, p -= 8)
99
99
  ;
100
100
  if (s === 0)
101
101
  s = 1 - d;
102
102
  else {
103
103
  if (s === h)
104
- return o ? NaN : (y ? -1 : 1) * (1 / 0);
104
+ return o ? NaN : (v ? -1 : 1) * (1 / 0);
105
105
  o = o + Math.pow(2, r), s = s - d;
106
106
  }
107
- return (y ? -1 : 1) * o * Math.pow(2, s - r);
107
+ return (v ? -1 : 1) * o * Math.pow(2, s - r);
108
108
  }, Ke.write = function(n, e, t, r, i, s) {
109
- var o, l, h, d = s * 8 - i - 1, p = (1 << d) - 1, m = p >> 1, v = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = r ? 0 : s - 1, b = r ? 1 : -1, _ = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
110
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (l = isNaN(e) ? 1 : 0, o = p) : (o = Math.floor(Math.log(e) / Math.LN2), e * (h = Math.pow(2, -o)) < 1 && (o--, h *= 2), o + m >= 1 ? e += v / h : e += v * Math.pow(2, 1 - m), e * h >= 2 && (o++, h /= 2), o + m >= p ? (l = 0, o = p) : o + m >= 1 ? (l = (e * h - 1) * Math.pow(2, i), o = o + m) : (l = e * Math.pow(2, m - 1) * Math.pow(2, i), o = 0)); i >= 8; n[t + y] = l & 255, y += b, l /= 256, i -= 8)
109
+ var o, l, h, d = s * 8 - i - 1, p = (1 << d) - 1, m = p >> 1, y = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, v = r ? 0 : s - 1, b = r ? 1 : -1, _ = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
110
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (l = isNaN(e) ? 1 : 0, o = p) : (o = Math.floor(Math.log(e) / Math.LN2), e * (h = Math.pow(2, -o)) < 1 && (o--, h *= 2), o + m >= 1 ? e += y / h : e += y * Math.pow(2, 1 - m), e * h >= 2 && (o++, h /= 2), o + m >= p ? (l = 0, o = p) : o + m >= 1 ? (l = (e * h - 1) * Math.pow(2, i), o = o + m) : (l = e * Math.pow(2, m - 1) * Math.pow(2, i), o = 0)); i >= 8; n[t + v] = l & 255, v += b, l /= 256, i -= 8)
111
111
  ;
112
- for (o = o << i | l, d += i; d > 0; n[t + y] = o & 255, y += b, o /= 256, d -= 8)
112
+ for (o = o << i | l, d += i; d > 0; n[t + v] = o & 255, v += b, o /= 256, d -= 8)
113
113
  ;
114
- n[t + y - b] |= _ * 128;
114
+ n[t + v - b] |= _ * 128;
115
115
  }), Ke;
116
116
  }
117
117
  var nt, Yt;
118
- function pn() {
118
+ function mn() {
119
119
  if (Yt) return nt;
120
120
  Yt = 1;
121
121
  var n = {}.toString;
@@ -124,10 +124,10 @@ function pn() {
124
124
  }, nt;
125
125
  }
126
126
  var Gt;
127
- function gn() {
127
+ function yn() {
128
128
  return Gt || (Gt = 1, (function(n) {
129
- var e = fn(), t = dn(), r = pn();
130
- n.Buffer = l, n.SlowBuffer = x, n.INSPECT_MAX_BYTES = 50, l.TYPED_ARRAY_SUPPORT = globalThis.TYPED_ARRAY_SUPPORT !== void 0 ? globalThis.TYPED_ARRAY_SUPPORT : i(), n.kMaxLength = s();
129
+ var e = pn(), t = gn(), r = mn();
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 {
133
133
  var c = new Uint8Array(1);
@@ -166,7 +166,7 @@ function gn() {
166
166
  function h(c, a, u, f) {
167
167
  if (typeof a == "number")
168
168
  throw new TypeError('"value" argument must not be a number');
169
- return typeof ArrayBuffer < "u" && a instanceof ArrayBuffer ? b(c, a, u, f) : typeof a == "string" ? v(c, a, u) : _(c, a);
169
+ return typeof ArrayBuffer < "u" && a instanceof ArrayBuffer ? b(c, a, u, f) : typeof a == "string" ? y(c, a, u) : _(c, a);
170
170
  }
171
171
  l.from = function(c, a, u) {
172
172
  return h(null, c, a, u);
@@ -187,7 +187,7 @@ function gn() {
187
187
  return p(null, c, a, u);
188
188
  };
189
189
  function m(c, a) {
190
- if (d(a), c = o(c, a < 0 ? 0 : E(a) | 0), !l.TYPED_ARRAY_SUPPORT)
190
+ if (d(a), c = o(c, a < 0 ? 0 : C(a) | 0), !l.TYPED_ARRAY_SUPPORT)
191
191
  for (var u = 0; u < a; ++u)
192
192
  c[u] = 0;
193
193
  return c;
@@ -197,16 +197,16 @@ function gn() {
197
197
  }, l.allocUnsafeSlow = function(c) {
198
198
  return m(null, c);
199
199
  };
200
- function v(c, a, u) {
200
+ function y(c, a, u) {
201
201
  if ((typeof u != "string" || u === "") && (u = "utf8"), !l.isEncoding(u))
202
202
  throw new TypeError('"encoding" must be a valid string encoding');
203
- var f = U(a, u) | 0;
203
+ var f = T(a, u) | 0;
204
204
  c = o(c, f);
205
205
  var g = c.write(a, u);
206
206
  return g !== f && (c = c.slice(0, g)), c;
207
207
  }
208
- function y(c, a) {
209
- var u = a.length < 0 ? 0 : E(a.length) | 0;
208
+ function v(c, a) {
209
+ var u = a.length < 0 ? 0 : C(a.length) | 0;
210
210
  c = o(c, u);
211
211
  for (var f = 0; f < u; f += 1)
212
212
  c[f] = a[f] & 255;
@@ -217,27 +217,27 @@ function gn() {
217
217
  throw new RangeError("'offset' is out of bounds");
218
218
  if (a.byteLength < u + (f || 0))
219
219
  throw new RangeError("'length' is out of bounds");
220
- return u === void 0 && f === void 0 ? a = new Uint8Array(a) : f === void 0 ? a = new Uint8Array(a, u) : a = new Uint8Array(a, u, f), l.TYPED_ARRAY_SUPPORT ? (c = a, c.__proto__ = l.prototype) : c = y(c, a), c;
220
+ return u === void 0 && f === void 0 ? a = new Uint8Array(a) : f === void 0 ? a = new Uint8Array(a, u) : a = new Uint8Array(a, u, f), l.TYPED_ARRAY_SUPPORT ? (c = a, c.__proto__ = l.prototype) : c = v(c, a), c;
221
221
  }
222
222
  function _(c, a) {
223
223
  if (l.isBuffer(a)) {
224
- var u = E(a.length) | 0;
224
+ var u = C(a.length) | 0;
225
225
  return c = o(c, u), c.length === 0 || a.copy(c, 0, 0, u), c;
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" || cn(a.length) ? o(c, 0) : y(c, a);
229
+ return typeof a.length != "number" || fn(a.length) ? o(c, 0) : v(c, a);
230
230
  if (a.type === "Buffer" && r(a.data))
231
- return y(c, a.data);
231
+ return v(c, a.data);
232
232
  }
233
233
  throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
234
234
  }
235
- function E(c) {
235
+ function C(c) {
236
236
  if (c >= s())
237
237
  throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s().toString(16) + " bytes");
238
238
  return c | 0;
239
239
  }
240
- function x(c) {
240
+ function E(c) {
241
241
  return +c != c && (c = 0), l.alloc(+c);
242
242
  }
243
243
  l.isBuffer = function(a) {
@@ -287,7 +287,7 @@ function gn() {
287
287
  }
288
288
  return g;
289
289
  };
290
- function U(c, a) {
290
+ function T(c, a) {
291
291
  if (l.isBuffer(c))
292
292
  return c.length;
293
293
  if (typeof ArrayBuffer < "u" && typeof ArrayBuffer.isView == "function" && (ArrayBuffer.isView(c) || c instanceof ArrayBuffer))
@@ -313,13 +313,13 @@ function gn() {
313
313
  case "hex":
314
314
  return u >>> 1;
315
315
  case "base64":
316
- return Vt(c).length;
316
+ return jt(c).length;
317
317
  default:
318
318
  if (f) return Ne(c).length;
319
319
  a = ("" + a).toLowerCase(), f = !0;
320
320
  }
321
321
  }
322
- l.byteLength = U;
322
+ l.byteLength = T;
323
323
  function P(c, a, u) {
324
324
  var f = !1;
325
325
  if ((a === void 0 || a < 0) && (a = 0), a > this.length || ((u === void 0 || u > this.length) && (u = this.length), u <= 0) || (u >>>= 0, a >>>= 0, u <= a))
@@ -327,22 +327,22 @@ function gn() {
327
327
  for (c || (c = "utf8"); ; )
328
328
  switch (c) {
329
329
  case "hex":
330
- return tn(this, a, u);
330
+ return nn(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 Qr(this, a, u);
335
+ return tn(this, a, u);
336
336
  case "latin1":
337
337
  case "binary":
338
- return en(this, a, u);
338
+ return rn(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 rn(this, a, u);
345
+ return sn(this, a, u);
346
346
  default:
347
347
  if (f) throw new TypeError("Unknown encoding: " + c);
348
348
  c = (c + "").toLowerCase(), f = !0;
@@ -395,9 +395,9 @@ function gn() {
395
395
  if (u >= f)
396
396
  return 1;
397
397
  if (u >>>= 0, f >>>= 0, g >>>= 0, w >>>= 0, this === a) return 0;
398
- for (var S = w - g, I = f - u, D = Math.min(S, I), k = this.slice(g, w), O = a.slice(u, f), $ = 0; $ < D; ++$)
399
- if (k[$] !== O[$]) {
400
- S = k[$], I = O[$];
398
+ for (var S = w - g, I = f - u, D = Math.min(S, I), R = this.slice(g, w), O = a.slice(u, f), $ = 0; $ < D; ++$)
399
+ if (R[$] !== O[$]) {
400
+ S = R[$], I = O[$];
401
401
  break;
402
402
  }
403
403
  return S < I ? -1 : I < S ? 1 : 0;
@@ -423,25 +423,25 @@ function gn() {
423
423
  return -1;
424
424
  w = 2, S /= 2, I /= 2, u /= 2;
425
425
  }
426
- function D(jt, Ht) {
427
- return w === 1 ? jt[Ht] : jt.readUInt16BE(Ht * w);
426
+ function D(Vt, Ht) {
427
+ return w === 1 ? Vt[Ht] : Vt.readUInt16BE(Ht * w);
428
428
  }
429
- var k;
429
+ var R;
430
430
  if (g) {
431
431
  var O = -1;
432
- for (k = u; k < S; k++)
433
- if (D(c, k) === D(a, O === -1 ? 0 : k - O)) {
434
- if (O === -1 && (O = k), k - O + 1 === I) return O * w;
432
+ for (R = u; R < S; R++)
433
+ if (D(c, R) === D(a, O === -1 ? 0 : R - O)) {
434
+ if (O === -1 && (O = R), R - O + 1 === I) return O * w;
435
435
  } else
436
- O !== -1 && (k -= k - O), O = -1;
436
+ O !== -1 && (R -= R - O), O = -1;
437
437
  } else
438
- for (u + I > S && (u = S - I), k = u; k >= 0; k--) {
438
+ for (u + I > S && (u = S - I), R = u; R >= 0; R--) {
439
439
  for (var $ = !0, Le = 0; Le < I; Le++)
440
- if (D(c, k + Le) !== D(a, Le)) {
440
+ if (D(c, R + Le) !== D(a, Le)) {
441
441
  $ = !1;
442
442
  break;
443
443
  }
444
- if ($) return k;
444
+ if ($) return R;
445
445
  }
446
446
  return -1;
447
447
  }
@@ -452,7 +452,7 @@ function gn() {
452
452
  }, l.prototype.lastIndexOf = function(a, u, f) {
453
453
  return F(this, a, u, f, !1);
454
454
  };
455
- function ge(c, a, u, f) {
455
+ function me(c, a, u, f) {
456
456
  u = Number(u) || 0;
457
457
  var g = c.length - u;
458
458
  f ? (f = Number(f), f > g && (f = g)) : f = g;
@@ -470,16 +470,16 @@ function gn() {
470
470
  return qe(Ne(a, c.length - u), c, u, f);
471
471
  }
472
472
  function K(c, a, u, f) {
473
- return qe(un(a), c, u, f);
473
+ return qe(cn(a), c, u, f);
474
474
  }
475
475
  function Q(c, a, u, f) {
476
476
  return K(c, a, u, f);
477
477
  }
478
478
  function ue(c, a, u, f) {
479
- return qe(Vt(a), c, u, f);
479
+ return qe(jt(a), c, u, f);
480
480
  }
481
- function me(c, a, u, f) {
482
- return qe(ln(a, c.length - u), c, u, f);
481
+ function ye(c, a, u, f) {
482
+ return qe(hn(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)
@@ -499,7 +499,7 @@ function gn() {
499
499
  for (var S = !1; ; )
500
500
  switch (g) {
501
501
  case "hex":
502
- return ge(this, a, u, f);
502
+ return me(this, a, u, f);
503
503
  case "utf8":
504
504
  case "utf-8":
505
505
  return G(this, a, u, f);
@@ -514,7 +514,7 @@ function gn() {
514
514
  case "ucs-2":
515
515
  case "utf16le":
516
516
  case "utf-16le":
517
- return me(this, a, u, f);
517
+ return ye(this, a, u, f);
518
518
  default:
519
519
  if (S) throw new TypeError("Unknown encoding: " + g);
520
520
  g = ("" + g).toLowerCase(), S = !0;
@@ -533,7 +533,7 @@ function gn() {
533
533
  for (var f = [], g = a; g < u; ) {
534
534
  var w = c[g], S = null, I = w > 239 ? 4 : w > 223 ? 3 : w > 191 ? 2 : 1;
535
535
  if (g + I <= u) {
536
- var D, k, O, $;
536
+ var D, R, O, $;
537
537
  switch (I) {
538
538
  case 1:
539
539
  w < 128 && (S = w);
@@ -542,10 +542,10 @@ function gn() {
542
542
  D = c[g + 1], (D & 192) === 128 && ($ = (w & 31) << 6 | D & 63, $ > 127 && (S = $));
543
543
  break;
544
544
  case 3:
545
- D = c[g + 1], k = c[g + 2], (D & 192) === 128 && (k & 192) === 128 && ($ = (w & 15) << 12 | (D & 63) << 6 | k & 63, $ > 2047 && ($ < 55296 || $ > 57343) && (S = $));
545
+ D = c[g + 1], R = c[g + 2], (D & 192) === 128 && (R & 192) === 128 && ($ = (w & 15) << 12 | (D & 63) << 6 | R & 63, $ > 2047 && ($ < 55296 || $ > 57343) && (S = $));
546
546
  break;
547
547
  case 4:
548
- D = c[g + 1], k = c[g + 2], O = c[g + 3], (D & 192) === 128 && (k & 192) === 128 && (O & 192) === 128 && ($ = (w & 15) << 18 | (D & 63) << 12 | (k & 63) << 6 | O & 63, $ > 65535 && $ < 1114112 && (S = $));
548
+ D = c[g + 1], R = c[g + 2], O = c[g + 3], (D & 192) === 128 && (R & 192) === 128 && (O & 192) === 128 && ($ = (w & 15) << 18 | (D & 63) << 12 | (R & 63) << 6 | O & 63, $ > 65535 && $ < 1114112 && (S = $));
549
549
  }
550
550
  }
551
551
  S === null ? (S = 65533, I = 1) : S > 65535 && (S -= 65536, f.push(S >>> 10 & 1023 | 55296), S = 56320 | S & 1023), f.push(S), g += I;
@@ -564,28 +564,28 @@ function gn() {
564
564
  );
565
565
  return u;
566
566
  }
567
- function Qr(c, a, u) {
567
+ function tn(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 en(c, a, u) {
574
+ function rn(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 tn(c, a, u) {
581
+ function nn(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 += an(c[w]);
585
+ g += ln(c[w]);
586
586
  return g;
587
587
  }
588
- function rn(c, a, u) {
588
+ function sn(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;
@@ -802,17 +802,17 @@ function gn() {
802
802
  }
803
803
  return this;
804
804
  };
805
- var nn = /[^+\/0-9A-Za-z-_]/g;
806
- function sn(c) {
807
- if (c = on(c).replace(nn, ""), c.length < 2) return "";
805
+ var on = /[^+\/0-9A-Za-z-_]/g;
806
+ function an(c) {
807
+ if (c = un(c).replace(on, ""), c.length < 2) return "";
808
808
  for (; c.length % 4 !== 0; )
809
809
  c = c + "=";
810
810
  return c;
811
811
  }
812
- function on(c) {
812
+ function un(c) {
813
813
  return c.trim ? c.trim() : c.replace(/^\s+|\s+$/g, "");
814
814
  }
815
- function an(c) {
815
+ function ln(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 gn() {
865
865
  }
866
866
  return w;
867
867
  }
868
- function un(c) {
868
+ function cn(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 ln(c, a) {
873
+ function hn(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 Vt(c) {
879
- return e.toByteArray(sn(c));
878
+ function jt(c) {
879
+ return e.toByteArray(an(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 cn(c) {
886
+ function fn(c) {
887
887
  return c !== c;
888
888
  }
889
889
  })(rt)), rt;
890
890
  }
891
- var R = gn(), W;
891
+ var k = yn(), 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 mn() {
900
+ function vn() {
901
901
  if (W) {
902
902
  if (typeof W.getRandomValues == "function")
903
903
  try {
@@ -912,24 +912,24 @@ function mn() {
912
912
  }
913
913
  throw new Error("Native crypto module could not be used to get secure random number.");
914
914
  }
915
- function vn(n) {
915
+ function wn(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 Dr = /* @__PURE__ */ (function() {
922
+ var Rr = /* @__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(mn());
929
+ i.push(vn());
930
930
  return new n(i, r);
931
931
  }, e.toString = function() {
932
- return vn(this);
932
+ return wn(this);
933
933
  }, n;
934
934
  })(), it = {};
935
935
  var ht = function(n, e) {
@@ -939,7 +939,7 @@ var ht = function(n, e) {
939
939
  for (var i in r) r.hasOwnProperty(i) && (t[i] = r[i]);
940
940
  }, ht(n, e);
941
941
  };
942
- function yn(n, e) {
942
+ function bn(n, e) {
943
943
  ht(n, e);
944
944
  function t() {
945
945
  this.constructor = n;
@@ -955,7 +955,7 @@ var ft = function() {
955
955
  return e;
956
956
  }, ft.apply(this, arguments);
957
957
  };
958
- function wn(n, e) {
958
+ function Sn(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 wn(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 bn(n, e, t, r) {
966
+ function _n(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 Sn(n, e) {
972
+ function An(n, e) {
973
973
  return function(t, r) {
974
974
  e(t, r, n);
975
975
  };
976
976
  }
977
- function _n(n, e) {
977
+ function xn(n, e) {
978
978
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(n, e);
979
979
  }
980
- function An(n, e, t, r) {
980
+ function Cn(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 An(n, e, t, r) {
1004
1004
  d((r = r.apply(n, e || [])).next());
1005
1005
  });
1006
1006
  }
1007
- function Cn(n, e) {
1007
+ function En(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,10 +1064,10 @@ function Cn(n, e) {
1064
1064
  return { value: d[0] ? d[1] : void 0, done: !0 };
1065
1065
  }
1066
1066
  }
1067
- function xn(n, e, t, r) {
1067
+ function Un(n, e, t, r) {
1068
1068
  r === void 0 && (r = t), n[r] = e[t];
1069
1069
  }
1070
- function En(n, e) {
1070
+ function Tn(n, e) {
1071
1071
  for (var t in n) t !== "default" && !e.hasOwnProperty(t) && (e[t] = n[t]);
1072
1072
  }
1073
1073
  function dt(n) {
@@ -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 Rr(n, e) {
1083
+ function $r(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,55 +1097,55 @@ function Rr(n, e) {
1097
1097
  }
1098
1098
  return s;
1099
1099
  }
1100
- function Un() {
1100
+ function In() {
1101
1101
  for (var n = [], e = 0; e < arguments.length; e++)
1102
- n = n.concat(Rr(arguments[e]));
1102
+ n = n.concat($r(arguments[e]));
1103
1103
  return n;
1104
1104
  }
1105
- function Tn() {
1105
+ function Dn() {
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++)
1109
1109
  r[i] = s[o];
1110
1110
  return r;
1111
1111
  }
1112
- function Re(n) {
1113
- return this instanceof Re ? (this.v = n, this) : new Re(n);
1112
+ function ke(n) {
1113
+ return this instanceof ke ? (this.v = n, this) : new ke(n);
1114
1114
  }
1115
- function In(n, e, t) {
1115
+ function kn(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() {
1119
1119
  return this;
1120
1120
  }, i;
1121
- function o(v) {
1122
- r[v] && (i[v] = function(y) {
1121
+ function o(y) {
1122
+ r[y] && (i[y] = function(v) {
1123
1123
  return new Promise(function(b, _) {
1124
- s.push([v, y, b, _]) > 1 || l(v, y);
1124
+ s.push([y, v, b, _]) > 1 || l(y, v);
1125
1125
  });
1126
1126
  });
1127
1127
  }
1128
- function l(v, y) {
1128
+ function l(y, v) {
1129
1129
  try {
1130
- h(r[v](y));
1130
+ h(r[y](v));
1131
1131
  } catch (b) {
1132
1132
  m(s[0][3], b);
1133
1133
  }
1134
1134
  }
1135
- function h(v) {
1136
- v.value instanceof Re ? Promise.resolve(v.value.v).then(d, p) : m(s[0][2], v);
1135
+ function h(y) {
1136
+ y.value instanceof ke ? Promise.resolve(y.value.v).then(d, p) : m(s[0][2], y);
1137
1137
  }
1138
- function d(v) {
1139
- l("next", v);
1138
+ function d(y) {
1139
+ l("next", y);
1140
1140
  }
1141
- function p(v) {
1142
- l("throw", v);
1141
+ function p(y) {
1142
+ l("throw", y);
1143
1143
  }
1144
- function m(v, y) {
1145
- v(y), s.shift(), s.length && l(s[0][0], s[0][1]);
1144
+ function m(y, v) {
1145
+ y(v), s.shift(), s.length && l(s[0][0], s[0][1]);
1146
1146
  }
1147
1147
  }
1148
- function Dn(n) {
1148
+ function Rn(n) {
1149
1149
  var e, t;
1150
1150
  return e = {}, r("next"), r("throw", function(i) {
1151
1151
  throw i;
@@ -1154,11 +1154,11 @@ function Dn(n) {
1154
1154
  }, e;
1155
1155
  function r(i, s) {
1156
1156
  e[i] = n[i] ? function(o) {
1157
- return (t = !t) ? { value: Re(n[i](o)), done: i === "return" } : s ? s(o) : o;
1157
+ return (t = !t) ? { value: ke(n[i](o)), done: i === "return" } : s ? s(o) : o;
1158
1158
  } : s;
1159
1159
  }
1160
1160
  }
1161
- function Rn(n) {
1161
+ function $n(n) {
1162
1162
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1163
1163
  var e = n[Symbol.asyncIterator], t;
1164
1164
  return e ? e.call(n) : (n = typeof dt == "function" ? dt(n) : n[Symbol.iterator](), t = {}, r("next"), r("throw"), r("return"), t[Symbol.asyncIterator] = function() {
@@ -1177,60 +1177,60 @@ function Rn(n) {
1177
1177
  }, o);
1178
1178
  }
1179
1179
  }
1180
- function kn(n, e) {
1180
+ function Pn(n, e) {
1181
1181
  return Object.defineProperty ? Object.defineProperty(n, "raw", { value: e }) : n.raw = e, n;
1182
1182
  }
1183
- function $n(n) {
1183
+ function Fn(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 Pn(n) {
1190
+ function Bn(n) {
1191
1191
  return n && n.__esModule ? n : { default: n };
1192
1192
  }
1193
- function Fn(n, e) {
1193
+ function Mn(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 Bn(n, e, t) {
1198
+ function On(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 Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1203
+ const Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1204
1204
  __proto__: null,
1205
1205
  get __assign() {
1206
1206
  return ft;
1207
1207
  },
1208
- __asyncDelegator: Dn,
1209
- __asyncGenerator: In,
1210
- __asyncValues: Rn,
1211
- __await: Re,
1212
- __awaiter: An,
1213
- __classPrivateFieldGet: Fn,
1214
- __classPrivateFieldSet: Bn,
1215
- __createBinding: xn,
1216
- __decorate: bn,
1217
- __exportStar: En,
1218
- __extends: yn,
1219
- __generator: Cn,
1220
- __importDefault: Pn,
1221
- __importStar: $n,
1222
- __makeTemplateObject: kn,
1223
- __metadata: _n,
1224
- __param: Sn,
1225
- __read: Rr,
1226
- __rest: wn,
1227
- __spread: Un,
1228
- __spreadArrays: Tn,
1208
+ __asyncDelegator: Rn,
1209
+ __asyncGenerator: kn,
1210
+ __asyncValues: $n,
1211
+ __await: ke,
1212
+ __awaiter: Cn,
1213
+ __classPrivateFieldGet: Mn,
1214
+ __classPrivateFieldSet: On,
1215
+ __createBinding: Un,
1216
+ __decorate: _n,
1217
+ __exportStar: Tn,
1218
+ __extends: bn,
1219
+ __generator: En,
1220
+ __importDefault: Bn,
1221
+ __importStar: Fn,
1222
+ __makeTemplateObject: Pn,
1223
+ __metadata: xn,
1224
+ __param: An,
1225
+ __read: $r,
1226
+ __rest: Sn,
1227
+ __spread: In,
1228
+ __spreadArrays: Dn,
1229
1229
  __values: dt
1230
- }, Symbol.toStringTag, { value: "Module" })), kr = /* @__PURE__ */ Ut(Mn);
1231
- var we = {}, V = {}, Jt;
1232
- function $r() {
1233
- return Jt || (Jt = 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([
1230
+ }, Symbol.toStringTag, { value: "Module" })), Pr = /* @__PURE__ */ Ut(Nn);
1231
+ var be = {}, j = {}, Jt;
1232
+ function Fr() {
1233
+ return Jt || (Jt = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.MAX_HASHABLE_LENGTH = j.INIT = j.KEY = j.DIGEST_LENGTH = j.BLOCK_SIZE = void 0, j.BLOCK_SIZE = 64, j.DIGEST_LENGTH = 32, j.KEY = new Uint32Array([
1234
1234
  1116352408,
1235
1235
  1899447441,
1236
1236
  3049323471,
@@ -1295,7 +1295,7 @@ function $r() {
1295
1295
  2756734187,
1296
1296
  3204031479,
1297
1297
  3329325298
1298
- ]), V.INIT = [
1298
+ ]), j.INIT = [
1299
1299
  1779033703,
1300
1300
  3144134277,
1301
1301
  1013904242,
@@ -1304,13 +1304,13 @@ function $r() {
1304
1304
  2600822924,
1305
1305
  528734635,
1306
1306
  1541459225
1307
- ], V.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1), V;
1307
+ ], j.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1), j;
1308
1308
  }
1309
- var be = {}, Zt;
1310
- function On() {
1311
- if (Zt) return be;
1312
- Zt = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.RawSha256 = void 0;
1313
- var n = $r(), e = (
1309
+ var Se = {}, Zt;
1310
+ function qn() {
1311
+ if (Zt) return Se;
1312
+ Zt = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.RawSha256 = void 0;
1313
+ var n = Fr(), e = (
1314
1314
  /** @class */
1315
1315
  (function() {
1316
1316
  function t() {
@@ -1340,26 +1340,26 @@ function On() {
1340
1340
  l[o * 4] = this.state[o] >>> 24 & 255, l[o * 4 + 1] = this.state[o] >>> 16 & 255, l[o * 4 + 2] = this.state[o] >>> 8 & 255, l[o * 4 + 3] = this.state[o] >>> 0 & 255;
1341
1341
  return l;
1342
1342
  }, t.prototype.hashBuffer = function() {
1343
- for (var r = this, i = r.buffer, s = r.state, o = s[0], l = s[1], h = s[2], d = s[3], p = s[4], m = s[5], v = s[6], y = s[7], b = 0; b < n.BLOCK_SIZE; b++) {
1343
+ for (var r = this, i = r.buffer, s = r.state, o = s[0], l = s[1], h = s[2], d = s[3], p = s[4], m = s[5], y = s[6], v = s[7], b = 0; b < n.BLOCK_SIZE; b++) {
1344
1344
  if (b < 16)
1345
1345
  this.temp[b] = (i[b * 4] & 255) << 24 | (i[b * 4 + 1] & 255) << 16 | (i[b * 4 + 2] & 255) << 8 | i[b * 4 + 3] & 255;
1346
1346
  else {
1347
- var _ = this.temp[b - 2], E = (_ >>> 17 | _ << 15) ^ (_ >>> 19 | _ << 13) ^ _ >>> 10;
1347
+ var _ = this.temp[b - 2], C = (_ >>> 17 | _ << 15) ^ (_ >>> 19 | _ << 13) ^ _ >>> 10;
1348
1348
  _ = this.temp[b - 15];
1349
- var x = (_ >>> 7 | _ << 25) ^ (_ >>> 18 | _ << 14) ^ _ >>> 3;
1350
- this.temp[b] = (E + this.temp[b - 7] | 0) + (x + this.temp[b - 16] | 0);
1349
+ var E = (_ >>> 7 | _ << 25) ^ (_ >>> 18 | _ << 14) ^ _ >>> 3;
1350
+ this.temp[b] = (C + this.temp[b - 7] | 0) + (E + this.temp[b - 16] | 0);
1351
1351
  }
1352
- var U = (((p >>> 6 | p << 26) ^ (p >>> 11 | p << 21) ^ (p >>> 25 | p << 7)) + (p & m ^ ~p & v) | 0) + (y + (n.KEY[b] + this.temp[b] | 0) | 0) | 0, P = ((o >>> 2 | o << 30) ^ (o >>> 13 | o << 19) ^ (o >>> 22 | o << 10)) + (o & l ^ o & h ^ l & h) | 0;
1353
- y = v, v = m, m = p, p = d + U | 0, d = h, h = l, l = o, o = U + P | 0;
1352
+ var T = (((p >>> 6 | p << 26) ^ (p >>> 11 | p << 21) ^ (p >>> 25 | p << 7)) + (p & m ^ ~p & y) | 0) + (v + (n.KEY[b] + this.temp[b] | 0) | 0) | 0, P = ((o >>> 2 | o << 30) ^ (o >>> 13 | o << 19) ^ (o >>> 22 | o << 10)) + (o & l ^ o & h ^ l & h) | 0;
1353
+ v = y, y = m, m = p, p = d + T | 0, d = h, h = l, l = o, o = T + P | 0;
1354
1354
  }
1355
- s[0] += o, s[1] += l, s[2] += h, s[3] += d, s[4] += p, s[5] += m, s[6] += v, s[7] += y;
1355
+ s[0] += o, s[1] += l, s[2] += h, s[3] += d, s[4] += p, s[5] += m, s[6] += y, s[7] += v;
1356
1356
  }, t;
1357
1357
  })()
1358
1358
  );
1359
- return be.RawSha256 = e, be;
1359
+ return Se.RawSha256 = e, Se;
1360
1360
  }
1361
- var st = {}, Se = {};
1362
- const Nn = (n) => {
1361
+ var st = {}, _e = {};
1362
+ const Ln = (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 Nn = (n) => {
1374
1374
  e.push(i >> 12 | 224, i >> 6 & 63 | 128, i & 63 | 128);
1375
1375
  }
1376
1376
  return Uint8Array.from(e);
1377
- }, qn = (n) => {
1377
+ }, Kn = (n) => {
1378
1378
  let e = "";
1379
1379
  for (let t = 0, r = n.length; t < r; t++) {
1380
1380
  const i = n[t];
@@ -1391,42 +1391,42 @@ const Nn = (n) => {
1391
1391
  }
1392
1392
  return e;
1393
1393
  };
1394
- function Ln(n) {
1394
+ function jn(n) {
1395
1395
  return new TextEncoder().encode(n);
1396
1396
  }
1397
- function Kn(n) {
1397
+ function Vn(n) {
1398
1398
  return new TextDecoder("utf-8").decode(n);
1399
1399
  }
1400
- const Vn = (n) => typeof TextEncoder == "function" ? Ln(n) : Nn(n), jn = (n) => typeof TextDecoder == "function" ? Kn(n) : qn(n), Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1400
+ const Hn = (n) => typeof TextEncoder == "function" ? jn(n) : Ln(n), zn = (n) => typeof TextDecoder == "function" ? Vn(n) : Kn(n), Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1401
1401
  __proto__: null,
1402
- fromUtf8: Vn,
1403
- toUtf8: jn
1404
- }, Symbol.toStringTag, { value: "Module" })), zn = /* @__PURE__ */ Ut(Hn);
1402
+ fromUtf8: Hn,
1403
+ toUtf8: zn
1404
+ }, Symbol.toStringTag, { value: "Module" })), Yn = /* @__PURE__ */ Ut(Wn);
1405
1405
  var Xt;
1406
- function Wn() {
1407
- if (Xt) return Se;
1408
- Xt = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.convertToBuffer = void 0;
1409
- var n = zn, e = typeof Buffer < "u" && Buffer.from ? function(r) {
1406
+ function Gn() {
1407
+ if (Xt) return _e;
1408
+ Xt = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.convertToBuffer = void 0;
1409
+ var n = Yn, e = typeof Buffer < "u" && Buffer.from ? function(r) {
1410
1410
  return Buffer.from(r, "utf8");
1411
1411
  } : n.fromUtf8;
1412
1412
  function t(r) {
1413
1413
  return r instanceof Uint8Array ? r : typeof r == "string" ? e(r) : ArrayBuffer.isView(r) ? new Uint8Array(r.buffer, r.byteOffset, r.byteLength / Uint8Array.BYTES_PER_ELEMENT) : new Uint8Array(r);
1414
1414
  }
1415
- return Se.convertToBuffer = t, Se;
1415
+ return _e.convertToBuffer = t, _e;
1416
1416
  }
1417
- var _e = {}, Qt;
1418
- function Yn() {
1419
- if (Qt) return _e;
1420
- Qt = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.isEmptyData = void 0;
1417
+ var Ae = {}, Qt;
1418
+ function Jn() {
1419
+ if (Qt) return Ae;
1420
+ Qt = 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
- return _e.isEmptyData = n, _e;
1424
+ return Ae.isEmptyData = n, Ae;
1425
1425
  }
1426
- var Ae = {}, er;
1427
- function Gn() {
1428
- if (er) return Ae;
1429
- er = 1, Object.defineProperty(Ae, "__esModule", { value: !0 }), Ae.numToUint8 = void 0;
1426
+ var xe = {}, er;
1427
+ function Zn() {
1428
+ if (er) return xe;
1429
+ er = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.numToUint8 = void 0;
1430
1430
  function n(e) {
1431
1431
  return new Uint8Array([
1432
1432
  (e & 4278190080) >> 24,
@@ -1435,10 +1435,10 @@ function Gn() {
1435
1435
  e & 255
1436
1436
  ]);
1437
1437
  }
1438
- return Ae.numToUint8 = n, Ae;
1438
+ return xe.numToUint8 = n, xe;
1439
1439
  }
1440
1440
  var Ce = {}, tr;
1441
- function Jn() {
1441
+ function Xn() {
1442
1442
  if (tr) return Ce;
1443
1443
  tr = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.uint32ArrayFrom = void 0;
1444
1444
  function n(e) {
@@ -1452,32 +1452,32 @@ function Jn() {
1452
1452
  return Ce.uint32ArrayFrom = n, Ce;
1453
1453
  }
1454
1454
  var rr;
1455
- function Zn() {
1455
+ function Qn() {
1456
1456
  return rr || (rr = 1, (function(n) {
1457
1457
  Object.defineProperty(n, "__esModule", { value: !0 }), n.uint32ArrayFrom = n.numToUint8 = n.isEmptyData = n.convertToBuffer = void 0;
1458
- var e = Wn();
1458
+ var e = Gn();
1459
1459
  Object.defineProperty(n, "convertToBuffer", { enumerable: !0, get: function() {
1460
1460
  return e.convertToBuffer;
1461
1461
  } });
1462
- var t = Yn();
1462
+ var t = Jn();
1463
1463
  Object.defineProperty(n, "isEmptyData", { enumerable: !0, get: function() {
1464
1464
  return t.isEmptyData;
1465
1465
  } });
1466
- var r = Gn();
1466
+ var r = Zn();
1467
1467
  Object.defineProperty(n, "numToUint8", { enumerable: !0, get: function() {
1468
1468
  return r.numToUint8;
1469
1469
  } });
1470
- var i = Jn();
1470
+ var i = Xn();
1471
1471
  Object.defineProperty(n, "uint32ArrayFrom", { enumerable: !0, get: function() {
1472
1472
  return i.uint32ArrayFrom;
1473
1473
  } });
1474
1474
  })(st)), st;
1475
1475
  }
1476
1476
  var nr;
1477
- function Xn() {
1478
- if (nr) return we;
1479
- nr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.Sha256 = void 0;
1480
- var n = kr, e = $r(), t = On(), r = Zn(), i = (
1477
+ function ei() {
1478
+ if (nr) return be;
1479
+ nr = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.Sha256 = void 0;
1480
+ var n = Pr, e = Fr(), t = qn(), r = Qn(), i = (
1481
1481
  /** @class */
1482
1482
  (function() {
1483
1483
  function o(l) {
@@ -1512,7 +1512,7 @@ function Xn() {
1512
1512
  }, o;
1513
1513
  })()
1514
1514
  );
1515
- we.Sha256 = i;
1515
+ be.Sha256 = i;
1516
1516
  function s(o) {
1517
1517
  var l = (0, r.convertToBuffer)(o);
1518
1518
  if (l.byteLength > e.BLOCK_SIZE) {
@@ -1522,39 +1522,39 @@ function Xn() {
1522
1522
  var d = new Uint8Array(e.BLOCK_SIZE);
1523
1523
  return d.set(l), d;
1524
1524
  }
1525
- return we;
1525
+ return be;
1526
1526
  }
1527
1527
  var ir;
1528
- function Qn() {
1528
+ function ti() {
1529
1529
  return ir || (ir = 1, (function(n) {
1530
1530
  Object.defineProperty(n, "__esModule", { value: !0 });
1531
- var e = kr;
1532
- (0, e.__exportStar)(Xn(), n);
1531
+ var e = Pr;
1532
+ (0, e.__exportStar)(ei(), n);
1533
1533
  })(it)), it;
1534
1534
  }
1535
- var Ie = Qn();
1535
+ var Ie = ti();
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, ei = 244837814094590, sr = (ei & 16777215) == 15715070;
1543
- function ti(n, e, t, r, i, s) {
1542
+ var Z, ri = 244837814094590, sr = (ri & 16777215) == 15715070;
1543
+ function ni(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 ri(n, e, t, r, i, s) {
1550
+ function ii(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 ni(n, e, t, r, i, s) {
1557
+ function si(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;
@@ -1562,7 +1562,7 @@ function ni(n, e, t, r, i, s) {
1562
1562
  return i;
1563
1563
  }
1564
1564
  var or = typeof navigator < "u";
1565
- or && sr && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am = ri, Z = 30) : or && sr && navigator.appName != "Netscape" ? (A.prototype.am = ti, Z = 26) : (A.prototype.am = ni, Z = 28);
1565
+ or && sr && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am = ii, Z = 30) : or && sr && navigator.appName != "Netscape" ? (A.prototype.am = ni, Z = 26) : (A.prototype.am = si, Z = 28);
1566
1566
  A.prototype.DB = Z;
1567
1567
  A.prototype.DM = (1 << Z) - 1;
1568
1568
  A.prototype.DV = 1 << Z;
@@ -1570,32 +1570,32 @@ var Tt = 52;
1570
1570
  A.prototype.FV = Math.pow(2, Tt);
1571
1571
  A.prototype.F1 = Tt - Z;
1572
1572
  A.prototype.F2 = 2 * Z - Tt;
1573
- var ii = "0123456789abcdefghijklmnopqrstuvwxyz", Xe = new Array(), de, Y;
1574
- de = 48;
1575
- for (Y = 0; Y <= 9; ++Y) Xe[de++] = Y;
1576
- de = 97;
1577
- for (Y = 10; Y < 36; ++Y) Xe[de++] = Y;
1578
- de = 65;
1579
- for (Y = 10; Y < 36; ++Y) Xe[de++] = Y;
1573
+ var oi = "0123456789abcdefghijklmnopqrstuvwxyz", Xe = new Array(), pe, Y;
1574
+ pe = 48;
1575
+ for (Y = 0; Y <= 9; ++Y) Xe[pe++] = Y;
1576
+ pe = 97;
1577
+ for (Y = 10; Y < 36; ++Y) Xe[pe++] = Y;
1578
+ pe = 65;
1579
+ for (Y = 10; Y < 36; ++Y) Xe[pe++] = Y;
1580
1580
  function ar(n) {
1581
- return ii.charAt(n);
1581
+ return oi.charAt(n);
1582
1582
  }
1583
- function si(n, e) {
1583
+ function ai(n, e) {
1584
1584
  var t = Xe[n.charCodeAt(e)];
1585
1585
  return t ?? -1;
1586
1586
  }
1587
- function oi(n) {
1587
+ function ui(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 ai(n) {
1591
+ function li(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
1594
  function It(n) {
1595
1595
  var e = q();
1596
1596
  return e.fromInt(n), e;
1597
1597
  }
1598
- function ui(n, e) {
1598
+ function ci(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 ui(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 = si(n, r);
1608
+ var o = ai(n, r);
1609
1609
  if (o < 0) {
1610
1610
  n.charAt(r) == "-" && (i = !0);
1611
1611
  continue;
@@ -1614,10 +1614,10 @@ function ui(n, e) {
1614
1614
  }
1615
1615
  this.clamp(), i && A.ZERO.subTo(this, this);
1616
1616
  }
1617
- function li() {
1617
+ function hi() {
1618
1618
  for (var n = this.s & this.DM; this.t > 0 && this[this.t - 1] == n; ) --this.t;
1619
1619
  }
1620
- function ci(n) {
1620
+ function fi(n) {
1621
1621
  if (this.s < 0) return "-" + this.negate().toString(n);
1622
1622
  var e;
1623
1623
  if (n == 16) e = 4;
@@ -1632,14 +1632,14 @@ function ci(n) {
1632
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 += ar(r));
1633
1633
  return i ? s : "0";
1634
1634
  }
1635
- function hi() {
1635
+ function di() {
1636
1636
  var n = q();
1637
1637
  return A.ZERO.subTo(this, n), n;
1638
1638
  }
1639
- function fi() {
1639
+ function pi() {
1640
1640
  return this.s < 0 ? this.negate() : this;
1641
1641
  }
1642
- function di(n) {
1642
+ function gi(n) {
1643
1643
  var e = this.s - n.s;
1644
1644
  if (e != 0) return e;
1645
1645
  var t = this.t;
@@ -1651,27 +1651,27 @@ function Dt(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 pi() {
1654
+ function mi() {
1655
1655
  return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Dt(this[this.t - 1] ^ this.s & this.DM);
1656
1656
  }
1657
- function gi(n, e) {
1657
+ function yi(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 mi(n, e) {
1663
+ function vi(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 vi(n, e) {
1667
+ function wi(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 yi(n, e) {
1674
+ function bi(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 yi(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 wi(n, e) {
1687
+ function Si(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 wi(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 bi(n, e) {
1701
+ function _i(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 Si(n) {
1707
+ function Ai(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 Si(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 _i(n, e, t) {
1715
+ function xi(n, e, t) {
1716
1716
  var r = n.abs();
1717
1717
  if (!(r.t <= 0)) {
1718
1718
  var i = this.abs();
@@ -1725,32 +1725,32 @@ function _i(n, e, t) {
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) {
1728
- var m = p * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0), v = this.FV / m, y = (1 << this.F1) / m, b = 1 << this.F2, _ = t.t, E = _ - d, x = e ?? q();
1729
- for (s.dlShiftTo(E, x), t.compareTo(x) >= 0 && (t[t.t++] = 1, t.subTo(x, t)), A.ONE.dlShiftTo(d, x), x.subTo(s, s); s.t < d; ) s[s.t++] = 0;
1730
- for (; --E >= 0; ) {
1731
- var U = t[--_] == p ? this.DM : Math.floor(t[_] * v + (t[_ - 1] + b) * y);
1732
- if ((t[_] += s.am(0, U, t, E, 0, d)) < U)
1733
- for (s.dlShiftTo(E, x), t.subTo(x, t); t[_] < --U; ) t.subTo(x, t);
1728
+ var m = p * (1 << this.F1) + (d > 1 ? s[d - 2] >> this.F2 : 0), y = this.FV / m, v = (1 << this.F1) / m, b = 1 << this.F2, _ = t.t, C = _ - d, E = e ?? q();
1729
+ for (s.dlShiftTo(C, E), t.compareTo(E) >= 0 && (t[t.t++] = 1, t.subTo(E, t)), A.ONE.dlShiftTo(d, E), E.subTo(s, s); s.t < d; ) s[s.t++] = 0;
1730
+ for (; --C >= 0; ) {
1731
+ var T = t[--_] == p ? this.DM : Math.floor(t[_] * y + (t[_ - 1] + b) * v);
1732
+ if ((t[_] += s.am(0, T, t, C, 0, d)) < T)
1733
+ for (s.dlShiftTo(C, E), t.subTo(E, t); t[_] < --T; ) t.subTo(E, t);
1734
1734
  }
1735
1735
  e != null && (t.drShiftTo(d, e), o != l && A.ZERO.subTo(e, e)), t.t = d, t.clamp(), h > 0 && t.rShiftTo(h, t), o < 0 && A.ZERO.subTo(t, t);
1736
1736
  }
1737
1737
  }
1738
1738
  }
1739
- function Ai(n) {
1739
+ function Ci(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 Ci() {
1743
+ function Ei() {
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 xi(n) {
1750
+ function Ui(n) {
1751
1751
  return this.compareTo(n) == 0;
1752
1752
  }
1753
- function Ei(n, e) {
1753
+ function Ti(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 Ei(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 Ui(n) {
1767
+ function Ii(n) {
1768
1768
  var e = q();
1769
1769
  return this.addTo(n, e), e;
1770
1770
  }
1771
- function Ti(n) {
1771
+ function Di(n) {
1772
1772
  var e = q();
1773
1773
  return this.subTo(n, e), e;
1774
1774
  }
1775
- function Ii(n) {
1775
+ function ki(n) {
1776
1776
  var e = q();
1777
1777
  return this.multiplyTo(n, e), e;
1778
1778
  }
1779
- function Di(n) {
1779
+ function Ri(n) {
1780
1780
  var e = q();
1781
1781
  return this.divRemTo(n, e, null), e;
1782
1782
  }
1783
- function pe(n) {
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 Ri(n) {
1786
+ function $i(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 ki(n) {
1790
+ function Pi(n) {
1791
1791
  var e = q();
1792
1792
  return n.copyTo(e), this.reduce(e), e;
1793
1793
  }
1794
- function $i(n) {
1794
+ function Fi(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 $i(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 Pi(n, e) {
1804
+ function Bi(n, e) {
1805
1805
  n.squareTo(e), this.reduce(e);
1806
1806
  }
1807
- function Fi(n, e, t) {
1807
+ function Mi(n, e, t) {
1808
1808
  n.multiplyTo(e, t), this.reduce(t);
1809
1809
  }
1810
- pe.prototype.convert = Ri;
1811
- pe.prototype.revert = ki;
1812
- pe.prototype.reduce = $i;
1813
- pe.prototype.mulTo = Fi;
1814
- pe.prototype.sqrTo = Pi;
1815
- function Bi(n, e, t) {
1816
- var r = n.bitLength(), i, s = It(1), o = new pe(e);
1810
+ ge.prototype.convert = $i;
1811
+ ge.prototype.revert = Pi;
1812
+ ge.prototype.reduce = Fi;
1813
+ ge.prototype.mulTo = Mi;
1814
+ ge.prototype.sqrTo = Bi;
1815
+ function Oi(n, e, t) {
1816
+ var r = n.bitLength(), i, s = It(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;
@@ -1822,58 +1822,58 @@ function Bi(n, e, t) {
1822
1822
  for (o.sqrTo(l[1], m); h <= p; )
1823
1823
  l[h] = q(), o.mulTo(m, l[h - 2], l[h]), h += 2;
1824
1824
  }
1825
- var v = n.t - 1, y, b = !0, _ = q(), E;
1826
- for (r = Dt(n[v]) - 1; v >= 0; ) {
1827
- for (r >= d ? y = n[v] >> r - d & p : (y = (n[v] & (1 << r + 1) - 1) << d - r, v > 0 && (y |= n[v - 1] >> this.DB + r - d)), h = i; (y & 1) == 0; )
1828
- y >>= 1, --h;
1829
- if ((r -= h) < 0 && (r += this.DB, --v), b)
1830
- l[y].copyTo(s), b = !1;
1825
+ var y = n.t - 1, v, b = !0, _ = q(), C;
1826
+ for (r = Dt(n[y]) - 1; y >= 0; ) {
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
+ v >>= 1, --h;
1829
+ if ((r -= h) < 0 && (r += this.DB, --y), b)
1830
+ l[v].copyTo(s), b = !1;
1831
1831
  else {
1832
1832
  for (; h > 1; )
1833
1833
  o.sqrTo(s, _), o.sqrTo(_, s), h -= 2;
1834
- h > 0 ? o.sqrTo(s, _) : (E = s, s = _, _ = E), o.mulTo(_, l[y], s);
1835
- }
1836
- for (; v >= 0 && (n[v] & 1 << r) == 0; )
1837
- o.sqrTo(s, _), E = s, s = _, _ = E, --r < 0 && (r = this.DB - 1, --v);
1838
- }
1839
- var x = o.revert(s);
1840
- return t(null, x), x;
1841
- }
1842
- A.prototype.copyTo = oi;
1843
- A.prototype.fromInt = ai;
1844
- A.prototype.fromString = ui;
1845
- A.prototype.clamp = li;
1846
- A.prototype.dlShiftTo = gi;
1847
- A.prototype.drShiftTo = mi;
1848
- A.prototype.lShiftTo = vi;
1849
- A.prototype.rShiftTo = yi;
1850
- A.prototype.subTo = wi;
1851
- A.prototype.multiplyTo = bi;
1852
- A.prototype.squareTo = Si;
1853
- A.prototype.divRemTo = _i;
1854
- A.prototype.invDigit = Ci;
1855
- A.prototype.addTo = Ei;
1856
- A.prototype.toString = ci;
1857
- A.prototype.negate = hi;
1858
- A.prototype.abs = fi;
1859
- A.prototype.compareTo = di;
1860
- A.prototype.bitLength = pi;
1861
- A.prototype.mod = Ai;
1862
- A.prototype.equals = xi;
1863
- A.prototype.add = Ui;
1864
- A.prototype.subtract = Ti;
1865
- A.prototype.multiply = Ii;
1866
- A.prototype.divide = Di;
1867
- A.prototype.modPow = Bi;
1834
+ h > 0 ? o.sqrTo(s, _) : (C = s, s = _, _ = C), o.mulTo(_, l[v], s);
1835
+ }
1836
+ for (; y >= 0 && (n[y] & 1 << r) == 0; )
1837
+ o.sqrTo(s, _), C = s, s = _, _ = C, --r < 0 && (r = this.DB - 1, --y);
1838
+ }
1839
+ var E = o.revert(s);
1840
+ return t(null, E), E;
1841
+ }
1842
+ A.prototype.copyTo = ui;
1843
+ A.prototype.fromInt = li;
1844
+ A.prototype.fromString = ci;
1845
+ A.prototype.clamp = hi;
1846
+ A.prototype.dlShiftTo = yi;
1847
+ A.prototype.drShiftTo = vi;
1848
+ A.prototype.lShiftTo = wi;
1849
+ A.prototype.rShiftTo = bi;
1850
+ A.prototype.subTo = Si;
1851
+ A.prototype.multiplyTo = _i;
1852
+ A.prototype.squareTo = Ai;
1853
+ A.prototype.divRemTo = xi;
1854
+ A.prototype.invDigit = Ei;
1855
+ A.prototype.addTo = Ti;
1856
+ A.prototype.toString = fi;
1857
+ A.prototype.negate = di;
1858
+ A.prototype.abs = pi;
1859
+ A.prototype.compareTo = gi;
1860
+ A.prototype.bitLength = mi;
1861
+ A.prototype.mod = Ci;
1862
+ A.prototype.equals = Ui;
1863
+ A.prototype.add = Ii;
1864
+ A.prototype.subtract = Di;
1865
+ A.prototype.multiply = ki;
1866
+ A.prototype.divide = Ri;
1867
+ A.prototype.modPow = Oi;
1868
1868
  A.ZERO = It(0);
1869
1869
  A.ONE = It(1);
1870
1870
  function ot(n) {
1871
- return R.Buffer.from(new Dr().random(n).toString(), "hex");
1871
+ return k.Buffer.from(new Rr().random(n).toString(), "hex");
1872
1872
  }
1873
- var Mi = /^[89a-f]/i, Oi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", Ni = "userAttributes.", ne = /* @__PURE__ */ (function() {
1873
+ var Ni = /^[89a-f]/i, qi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF", Li = "userAttributes.", ne = /* @__PURE__ */ (function() {
1874
1874
  function n(t) {
1875
- this.N = new A(Oi, 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
- }), this.infoBits = R.Buffer.from("Caldera Derived Key", "utf8"), this.poolName = t;
1875
+ this.N = new A(qi, 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
+ }), this.infoBits = k.Buffer.from("Caldera Derived Key", "utf8"), this.poolName = t;
1877
1877
  }
1878
1878
  var e = n.prototype;
1879
1879
  return e.getSmallAValue = function() {
@@ -1913,12 +1913,12 @@ var Mi = /^[89a-f]/i, Oi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
1913
1913
  }, e.hash = function(r) {
1914
1914
  var i = new Ie.Sha256();
1915
1915
  i.update(r);
1916
- var s = i.digestSync(), o = R.Buffer.from(s).toString("hex");
1916
+ var s = i.digestSync(), o = k.Buffer.from(s).toString("hex");
1917
1917
  return new Array(64 - o.length).join("0") + o;
1918
1918
  }, e.hexHash = function(r) {
1919
- return this.hash(R.Buffer.from(r, "hex"));
1919
+ return this.hash(k.Buffer.from(r, "hex"));
1920
1920
  }, e.computehkdf = function(r, i) {
1921
- var s = R.Buffer.concat([this.infoBits, R.Buffer.from("", "utf8")]), o = new Ie.Sha256(i);
1921
+ var s = k.Buffer.concat([this.infoBits, k.Buffer.from("", "utf8")]), o = new Ie.Sha256(i);
1922
1922
  o.update(r);
1923
1923
  var l = o.digestSync(), h = new Ie.Sha256(l);
1924
1924
  h.update(s);
@@ -1931,9 +1931,9 @@ var Mi = /^[89a-f]/i, Oi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
1931
1931
  if (this.UValue = this.calculateU(this.largeAValue, s), this.UValue.equals(A.ZERO))
1932
1932
  throw new Error("U cannot be zero.");
1933
1933
  var d = "" + this.poolName + r + ":" + i, p = this.hash(d), m = new A(this.hexHash(this.padHex(o) + p), 16);
1934
- this.calculateS(m, s, function(v, y) {
1935
- v && l(v, null);
1936
- var b = h.computehkdf(R.Buffer.from(h.padHex(y), "hex"), R.Buffer.from(h.padHex(h.UValue), "hex"));
1934
+ this.calculateS(m, s, function(y, v) {
1935
+ y && l(y, null);
1936
+ var b = h.computehkdf(k.Buffer.from(h.padHex(v), "hex"), k.Buffer.from(h.padHex(h.UValue), "hex"));
1937
1937
  l(null, b);
1938
1938
  });
1939
1939
  }, e.calculateS = function(r, i, s) {
@@ -1946,12 +1946,12 @@ var Mi = /^[89a-f]/i, Oi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
1946
1946
  });
1947
1947
  });
1948
1948
  }, e.getNewPasswordRequiredChallengeUserAttributePrefix = function() {
1949
- return Ni;
1949
+ return Li;
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 = Mi.test(s) ? "00" + s : s, i) {
1954
+ if (s = s.length % 2 !== 0 ? "0" + s : s, s = Ni.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 Mi = /^[89a-f]/i, Oi = "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD12902
1961
1961
  return s;
1962
1962
  }, n;
1963
1963
  })();
1964
- var Pr = /* @__PURE__ */ (function() {
1964
+ var Br = /* @__PURE__ */ (function() {
1965
1965
  function n(t) {
1966
1966
  this.jwtToken = t || "", this.payload = this.decodePayload();
1967
1967
  }
@@ -1975,13 +1975,13 @@ var Pr = /* @__PURE__ */ (function() {
1975
1975
  }, e.decodePayload = function() {
1976
1976
  var r = this.jwtToken.split(".")[1];
1977
1977
  try {
1978
- return JSON.parse(R.Buffer.from(r, "base64").toString("utf8"));
1978
+ return JSON.parse(k.Buffer.from(r, "base64").toString("utf8"));
1979
1979
  } catch {
1980
1980
  return {};
1981
1981
  }
1982
1982
  }, n;
1983
1983
  })();
1984
- function qi(n, e) {
1984
+ function Ki(n, e) {
1985
1985
  n.prototype = Object.create(e.prototype), n.prototype.constructor = n, pt(n, e);
1986
1986
  }
1987
1987
  function pt(n, e) {
@@ -1994,9 +1994,9 @@ var gt = /* @__PURE__ */ (function(n) {
1994
1994
  var r = t === void 0 ? {} : t, i = r.AccessToken;
1995
1995
  return n.call(this, i || "") || this;
1996
1996
  }
1997
- return qi(e, n), e;
1998
- })(Pr);
1999
- function Li(n, e) {
1997
+ return Ki(e, n), e;
1998
+ })(Br);
1999
+ function ji(n, e) {
2000
2000
  n.prototype = Object.create(e.prototype), n.prototype.constructor = n, mt(n, e);
2001
2001
  }
2002
2002
  function mt(n, e) {
@@ -2004,14 +2004,14 @@ function mt(n, e) {
2004
2004
  return t.__proto__ = r, t;
2005
2005
  }, mt(n, e);
2006
2006
  }
2007
- var vt = /* @__PURE__ */ (function(n) {
2007
+ var yt = /* @__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 Li(e, n), e;
2013
- })(Pr);
2014
- var yt = /* @__PURE__ */ (function() {
2012
+ return ji(e, n), e;
2013
+ })(Br);
2014
+ var vt = /* @__PURE__ */ (function() {
2015
2015
  function n(t) {
2016
2016
  var r = t === void 0 ? {} : t, i = r.RefreshToken;
2017
2017
  this.token = i || "";
@@ -2020,12 +2020,12 @@ var yt = /* @__PURE__ */ (function() {
2020
2020
  return e.getToken = function() {
2021
2021
  return this.token;
2022
2022
  }, n;
2023
- })(), Ki = "5.0.4";
2024
- var Vi = "aws-amplify/" + Ki, Fr = {
2025
- userAgent: Vi,
2023
+ })(), Vi = "5.0.4";
2024
+ var Hi = "aws-amplify/" + Vi, Mr = {
2025
+ userAgent: Hi,
2026
2026
  isReactNative: typeof navigator < "u" && navigator.product === "ReactNative"
2027
- }, ji = function() {
2028
- return Fr.userAgent;
2027
+ }, zi = function() {
2028
+ return Mr.userAgent;
2029
2029
  };
2030
2030
  var wt = /* @__PURE__ */ (function() {
2031
2031
  function n(t) {
@@ -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 Hi = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], zi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], bt = /* @__PURE__ */ (function() {
2054
+ var Wi = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Yi = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], bt = /* @__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 = zi[r.getUTCDay()], s = Hi[r.getUTCMonth()], o = r.getUTCDate(), l = r.getUTCHours();
2059
+ var r = /* @__PURE__ */ new Date(), i = Yi[r.getUTCDay()], s = Wi[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 Hi = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
2066
2066
  return m;
2067
2067
  }, n;
2068
2068
  })();
2069
- var Br = /* @__PURE__ */ (function() {
2069
+ var Or = /* @__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 Br = /* @__PURE__ */ (function() {
2089
2089
  };
2090
2090
  }, n;
2091
2091
  })();
2092
- var te = {}, Wi = /* @__PURE__ */ (function() {
2092
+ var te = {}, Gi = /* @__PURE__ */ (function() {
2093
2093
  function n() {
2094
2094
  }
2095
2095
  return n.setItem = function(t, r) {
@@ -2101,12 +2101,12 @@ var te = {}, Wi = /* @__PURE__ */ (function() {
2101
2101
  }, n.clear = function() {
2102
2102
  return te = {}, te;
2103
2103
  }, n;
2104
- })(), Mr = /* @__PURE__ */ (function() {
2104
+ })(), Nr = /* @__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 = Wi;
2109
+ this.storageWindow = Gi;
2110
2110
  }
2111
2111
  }
2112
2112
  var e = n.prototype;
@@ -2114,11 +2114,11 @@ var te = {}, Wi = /* @__PURE__ */ (function() {
2114
2114
  return this.storageWindow;
2115
2115
  }, n;
2116
2116
  })();
2117
- var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : navigator.userAgent : "nodejs", St = /* @__PURE__ */ (function() {
2117
+ var Ji = typeof navigator < "u", ur = Ji ? Mr.isReactNative ? "react-native" : navigator.userAgent : "nodejs", St = /* @__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 Mr().getStorage(), this.keyPrefix = "CognitoIdentityServiceProvider." + this.pool.getClientId(), this.userDataKey = this.keyPrefix + "." + this.username + ".userData";
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 Nr().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) {
@@ -2143,31 +2143,31 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2143
2143
  this.getUserContextData() && (h.UserContextData = this.getUserContextData()), this.client.request("InitiateAuth", h, function(d, p) {
2144
2144
  if (d)
2145
2145
  return i.onFailure(d);
2146
- var m = p.ChallengeName, v = p.ChallengeParameters;
2147
- return m === "CUSTOM_CHALLENGE" ? (s.Session = p.Session, i.customChallenge(v)) : (s.signInUserSession = s.getCognitoUserSession(p.AuthenticationResult), s.cacheTokens(), i.onSuccess(s.signInUserSession));
2146
+ var m = p.ChallengeName, y = p.ChallengeParameters;
2147
+ return m === "CUSTOM_CHALLENGE" ? (s.Session = p.Session, i.customChallenge(y)) : (s.signInUserSession = s.getCognitoUserSession(p.AuthenticationResult), s.cacheTokens(), i.onSuccess(s.signInUserSession));
2148
2148
  });
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
2152
  var s = this, o = new ne(this.pool.getUserPoolName()), l = new bt(), h, d, p = {};
2153
- this.deviceKey != null && (p.DEVICE_KEY = this.deviceKey), p.USERNAME = this.username, o.getLargeAValue(function(m, v) {
2154
- m && i.onFailure(m), p.SRP_A = v.toString(16), s.authenticationFlowType === "CUSTOM_AUTH" && (p.CHALLENGE_NAME = "SRP_A");
2155
- var y = Object.keys(r.getValidationData()).length !== 0 ? r.getValidationData() : r.getClientMetadata(), b = {
2153
+ this.deviceKey != null && (p.DEVICE_KEY = this.deviceKey), p.USERNAME = this.username, o.getLargeAValue(function(m, y) {
2154
+ m && i.onFailure(m), p.SRP_A = y.toString(16), s.authenticationFlowType === "CUSTOM_AUTH" && (p.CHALLENGE_NAME = "SRP_A");
2155
+ var v = Object.keys(r.getValidationData()).length !== 0 ? r.getValidationData() : r.getClientMetadata(), b = {
2156
2156
  AuthFlow: s.authenticationFlowType,
2157
2157
  ClientId: s.pool.getClientId(),
2158
2158
  AuthParameters: p,
2159
- ClientMetadata: y
2159
+ ClientMetadata: v
2160
2160
  };
2161
- s.getUserContextData(s.username) && (b.UserContextData = s.getUserContextData(s.username)), s.client.request("InitiateAuth", b, function(_, E) {
2161
+ s.getUserContextData(s.username) && (b.UserContextData = s.getUserContextData(s.username)), s.client.request("InitiateAuth", b, function(_, C) {
2162
2162
  if (_)
2163
2163
  return i.onFailure(_);
2164
- var x = E.ChallengeParameters;
2165
- s.username = x.USER_ID_FOR_SRP, s.userDataKey = s.keyPrefix + "." + s.username + ".userData", h = new A(x.SRP_B, 16), d = new A(x.SALT, 16), s.getCachedDeviceKeyAndPassword(), o.getPasswordAuthenticationKey(s.username, r.getPassword(), h, d, function(U, P) {
2166
- U && i.onFailure(U);
2167
- var B = l.getNowString(), F = R.Buffer.concat([R.Buffer.from(s.pool.getUserPoolName(), "utf8"), R.Buffer.from(s.username, "utf8"), R.Buffer.from(x.SECRET_BLOCK, "base64"), R.Buffer.from(B, "utf8")]), X = new Ie.Sha256(P);
2164
+ var E = C.ChallengeParameters;
2165
+ s.username = E.USER_ID_FOR_SRP, s.userDataKey = s.keyPrefix + "." + s.username + ".userData", h = new A(E.SRP_B, 16), d = new A(E.SALT, 16), s.getCachedDeviceKeyAndPassword(), o.getPasswordAuthenticationKey(s.username, r.getPassword(), h, d, function(T, P) {
2166
+ T && i.onFailure(T);
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 ge = X.digestSync(), G = R.Buffer.from(ge).toString("base64"), K = {};
2170
- K.USERNAME = s.username, K.PASSWORD_CLAIM_SECRET_BLOCK = x.SECRET_BLOCK, K.TIMESTAMP = B, K.PASSWORD_CLAIM_SIGNATURE = G, s.deviceKey != null && (K.DEVICE_KEY = s.deviceKey);
2169
+ var me = X.digestSync(), G = k.Buffer.from(me).toString("base64"), K = {};
2170
+ K.USERNAME = s.username, K.PASSWORD_CLAIM_SECRET_BLOCK = E.SECRET_BLOCK, K.TIMESTAMP = B, K.PASSWORD_CLAIM_SIGNATURE = G, s.deviceKey != null && (K.DEVICE_KEY = s.deviceKey);
2171
2171
  var Q = function(le, ve) {
2172
2172
  return s.client.request("RespondToAuthChallenge", le, function(ee, tt) {
2173
2173
  return ee && ee.code === "ResourceNotFoundException" && ee.message.toLowerCase().indexOf("device") !== -1 ? (K.DEVICE_KEY = null, s.deviceKey = null, s.randomPassword = null, s.deviceGroupKey = null, s.clearCachedDeviceKeyAndPassword(), Q(le, ve)) : ve(ee, tt);
@@ -2176,11 +2176,11 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2176
2176
  ChallengeName: "PASSWORD_VERIFIER",
2177
2177
  ClientId: s.pool.getClientId(),
2178
2178
  ChallengeResponses: K,
2179
- Session: E.Session,
2180
- ClientMetadata: y
2179
+ Session: C.Session,
2180
+ ClientMetadata: v
2181
2181
  };
2182
- s.getUserContextData() && (ue.UserContextData = s.getUserContextData()), Q(ue, function(me, le) {
2183
- return me ? i.onFailure(me) : s.authenticateUserInternal(le, o, i);
2182
+ s.getUserContextData() && (ue.UserContextData = s.getUserContextData()), Q(ue, function(ye, le) {
2183
+ return ye ? i.onFailure(ye) : s.authenticateUserInternal(le, o, i);
2184
2184
  });
2185
2185
  });
2186
2186
  });
@@ -2216,10 +2216,10 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2216
2216
  return this.Session = r.Session, s.customChallenge(h);
2217
2217
  if (l === "NEW_PASSWORD_REQUIRED") {
2218
2218
  this.Session = r.Session;
2219
- var d = null, p = null, m = [], v = i.getNewPasswordRequiredChallengeUserAttributePrefix();
2219
+ var d = null, p = null, m = [], y = i.getNewPasswordRequiredChallengeUserAttributePrefix();
2220
2220
  if (h && (d = JSON.parse(r.ChallengeParameters.userAttributes), p = JSON.parse(r.ChallengeParameters.requiredAttributes)), p)
2221
- for (var y = 0; y < p.length; y++)
2222
- m[y] = p[y].substr(v.length);
2221
+ for (var v = 0; v < p.length; v++)
2222
+ m[v] = p[v].substr(y.length);
2223
2223
  return s.newPasswordRequired(d, m);
2224
2224
  }
2225
2225
  if (l === "DEVICE_SRP_AUTH") {
@@ -2233,17 +2233,17 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2233
2233
  i.generateHashDevice(r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, r.AuthenticationResult.NewDeviceMetadata.DeviceKey, function(_) {
2234
2234
  if (_)
2235
2235
  return s.onFailure(_);
2236
- var E = {
2237
- Salt: R.Buffer.from(i.getSaltDevices(), "hex").toString("base64"),
2238
- PasswordVerifier: R.Buffer.from(i.getVerifierDevices(), "hex").toString("base64")
2236
+ var C = {
2237
+ Salt: k.Buffer.from(i.getSaltDevices(), "hex").toString("base64"),
2238
+ PasswordVerifier: k.Buffer.from(i.getVerifierDevices(), "hex").toString("base64")
2239
2239
  };
2240
- o.verifierDevices = E.PasswordVerifier, o.deviceGroupKey = b.DeviceGroupKey, o.randomPassword = i.getRandomPassword(), o.client.request("ConfirmDevice", {
2240
+ o.verifierDevices = C.PasswordVerifier, o.deviceGroupKey = b.DeviceGroupKey, o.randomPassword = i.getRandomPassword(), o.client.request("ConfirmDevice", {
2241
2241
  DeviceKey: b.DeviceKey,
2242
2242
  AccessToken: o.signInUserSession.getAccessToken().getJwtToken(),
2243
- DeviceSecretVerifierConfig: E,
2243
+ DeviceSecretVerifierConfig: C,
2244
2244
  DeviceName: ur
2245
- }, function(x, U) {
2246
- return x ? s.onFailure(x) : (o.deviceKey = r.AuthenticationResult.NewDeviceMetadata.DeviceKey, o.cacheDeviceKeyAndPassword(), U.UserConfirmationNecessary === !0 ? s.onSuccess(o.signInUserSession, U.UserConfirmationNecessary) : s.onSuccess(o.signInUserSession));
2245
+ }, function(E, T) {
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
  });
2248
2248
  });
2249
2249
  }, e.completeNewPasswordChallenge = function(r, i, s, o) {
@@ -2251,8 +2251,8 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2251
2251
  if (!r)
2252
2252
  return s.onFailure(new Error("New password is required."));
2253
2253
  var h = new ne(this.pool.getUserPoolName()), d = h.getNewPasswordRequiredChallengeUserAttributePrefix(), p = {};
2254
- i && Object.keys(i).forEach(function(v) {
2255
- p[d + v] = i[v];
2254
+ i && Object.keys(i).forEach(function(y) {
2255
+ p[d + y] = i[y];
2256
2256
  }), p.NEW_PASSWORD = r, p.USERNAME = this.username;
2257
2257
  var m = {
2258
2258
  ChallengeName: "NEW_PASSWORD_REQUIRED",
@@ -2261,8 +2261,8 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2261
2261
  Session: this.Session,
2262
2262
  ClientMetadata: o
2263
2263
  };
2264
- this.getUserContextData() && (m.UserContextData = this.getUserContextData()), this.client.request("RespondToAuthChallenge", m, function(v, y) {
2265
- return v ? s.onFailure(v) : l.authenticateUserInternal(y, h, s);
2264
+ this.getUserContextData() && (m.UserContextData = this.getUserContextData()), this.client.request("RespondToAuthChallenge", m, function(y, v) {
2265
+ return y ? s.onFailure(y) : l.authenticateUserInternal(v, h, s);
2266
2266
  });
2267
2267
  }, e.getDeviceResponse = function(r, i) {
2268
2268
  var s = this, o = new ne(this.deviceGroupKey), l = new bt(), h = {};
@@ -2275,22 +2275,22 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2275
2275
  ClientMetadata: i,
2276
2276
  Session: s.Session
2277
2277
  };
2278
- s.getUserContextData() && (m.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", m, function(v, y) {
2279
- if (v)
2280
- return r.onFailure(v);
2281
- var b = y.ChallengeParameters, _ = new A(b.SRP_B, 16), E = new A(b.SALT, 16);
2282
- o.getPasswordAuthenticationKey(s.deviceKey, s.randomPassword, _, E, function(x, U) {
2283
- if (x)
2284
- return r.onFailure(x);
2285
- var P = l.getNowString(), B = R.Buffer.concat([R.Buffer.from(s.deviceGroupKey, "utf8"), R.Buffer.from(s.deviceKey, "utf8"), R.Buffer.from(b.SECRET_BLOCK, "base64"), R.Buffer.from(P, "utf8")]), F = new Ie.Sha256(U);
2278
+ s.getUserContextData() && (m.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", m, function(y, v) {
2279
+ if (y)
2280
+ return r.onFailure(y);
2281
+ var b = v.ChallengeParameters, _ = new A(b.SRP_B, 16), C = new A(b.SALT, 16);
2282
+ o.getPasswordAuthenticationKey(s.deviceKey, s.randomPassword, _, C, function(E, T) {
2283
+ if (E)
2284
+ return r.onFailure(E);
2285
+ var P = l.getNowString(), B = k.Buffer.concat([k.Buffer.from(s.deviceGroupKey, "utf8"), k.Buffer.from(s.deviceKey, "utf8"), k.Buffer.from(b.SECRET_BLOCK, "base64"), k.Buffer.from(P, "utf8")]), F = new Ie.Sha256(T);
2286
2286
  F.update(B);
2287
- var X = F.digestSync(), ge = R.Buffer.from(X).toString("base64"), G = {};
2288
- G.USERNAME = s.username, G.PASSWORD_CLAIM_SECRET_BLOCK = b.SECRET_BLOCK, G.TIMESTAMP = P, G.PASSWORD_CLAIM_SIGNATURE = ge, G.DEVICE_KEY = s.deviceKey;
2287
+ var X = F.digestSync(), me = k.Buffer.from(X).toString("base64"), G = {};
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
2289
  var K = {
2290
2290
  ChallengeName: "DEVICE_PASSWORD_VERIFIER",
2291
2291
  ClientId: s.pool.getClientId(),
2292
2292
  ChallengeResponses: G,
2293
- Session: y.Session
2293
+ Session: v.Session
2294
2294
  };
2295
2295
  s.getUserContextData() && (K.UserContextData = s.getUserContextData()), s.client.request("RespondToAuthChallenge", K, function(Q, ue) {
2296
2296
  return Q ? r.onFailure(Q) : (s.signInUserSession = s.getCognitoUserSession(ue.AuthenticationResult), s.cacheTokens(), r.onSuccess(s.signInUserSession));
@@ -2336,31 +2336,31 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2336
2336
  Session: this.Session,
2337
2337
  ClientMetadata: o
2338
2338
  };
2339
- this.getUserContextData() && (p.UserContextData = this.getUserContextData()), this.client.request("RespondToAuthChallenge", p, function(m, v) {
2339
+ this.getUserContextData() && (p.UserContextData = this.getUserContextData()), this.client.request("RespondToAuthChallenge", p, function(m, y) {
2340
2340
  if (m)
2341
2341
  return i.onFailure(m);
2342
- var y = v.ChallengeName;
2343
- if (y === "DEVICE_SRP_AUTH") {
2342
+ var v = y.ChallengeName;
2343
+ if (v === "DEVICE_SRP_AUTH") {
2344
2344
  l.getDeviceResponse(i);
2345
2345
  return;
2346
2346
  }
2347
- if (l.signInUserSession = l.getCognitoUserSession(v.AuthenticationResult), l.cacheTokens(), v.AuthenticationResult.NewDeviceMetadata == null)
2347
+ if (l.signInUserSession = l.getCognitoUserSession(y.AuthenticationResult), l.cacheTokens(), y.AuthenticationResult.NewDeviceMetadata == null)
2348
2348
  return i.onSuccess(l.signInUserSession);
2349
2349
  var b = new ne(l.pool.getUserPoolName());
2350
- b.generateHashDevice(v.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, v.AuthenticationResult.NewDeviceMetadata.DeviceKey, function(_) {
2350
+ b.generateHashDevice(y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, y.AuthenticationResult.NewDeviceMetadata.DeviceKey, function(_) {
2351
2351
  if (_)
2352
2352
  return i.onFailure(_);
2353
- var E = {
2354
- Salt: R.Buffer.from(b.getSaltDevices(), "hex").toString("base64"),
2355
- PasswordVerifier: R.Buffer.from(b.getVerifierDevices(), "hex").toString("base64")
2353
+ var C = {
2354
+ Salt: k.Buffer.from(b.getSaltDevices(), "hex").toString("base64"),
2355
+ PasswordVerifier: k.Buffer.from(b.getVerifierDevices(), "hex").toString("base64")
2356
2356
  };
2357
- l.verifierDevices = E.PasswordVerifier, l.deviceGroupKey = v.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, l.randomPassword = b.getRandomPassword(), l.client.request("ConfirmDevice", {
2358
- DeviceKey: v.AuthenticationResult.NewDeviceMetadata.DeviceKey,
2357
+ l.verifierDevices = C.PasswordVerifier, l.deviceGroupKey = y.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, l.randomPassword = b.getRandomPassword(), l.client.request("ConfirmDevice", {
2358
+ DeviceKey: y.AuthenticationResult.NewDeviceMetadata.DeviceKey,
2359
2359
  AccessToken: l.signInUserSession.getAccessToken().getJwtToken(),
2360
- DeviceSecretVerifierConfig: E,
2360
+ DeviceSecretVerifierConfig: C,
2361
2361
  DeviceName: ur
2362
- }, function(x, U) {
2363
- return x ? i.onFailure(x) : (l.deviceKey = v.AuthenticationResult.NewDeviceMetadata.DeviceKey, l.cacheDeviceKeyAndPassword(), U.UserConfirmationNecessary === !0 ? i.onSuccess(l.signInUserSession, U.UserConfirmationNecessary) : i.onSuccess(l.signInUserSession));
2362
+ }, function(E, T) {
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
  });
2365
2365
  });
2366
2366
  });
@@ -2445,7 +2445,7 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.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 Br(h);
2448
+ }, d = new Or(h);
2449
2449
  o.push(d);
2450
2450
  }
2451
2451
  return r(null, o);
@@ -2537,23 +2537,23 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.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 vt({
2540
+ var p = new yt({
2541
2541
  IdToken: this.storage.getItem(o)
2542
2542
  }), m = new gt({
2543
2543
  AccessToken: this.storage.getItem(l)
2544
- }), v = new yt({
2544
+ }), y = new vt({
2545
2545
  RefreshToken: this.storage.getItem(h)
2546
- }), y = parseInt(this.storage.getItem(d), 0) || 0, b = {
2546
+ }), v = parseInt(this.storage.getItem(d), 0) || 0, b = {
2547
2547
  IdToken: p,
2548
2548
  AccessToken: m,
2549
- RefreshToken: v,
2550
- ClockDrift: y
2549
+ RefreshToken: y,
2550
+ ClockDrift: v
2551
2551
  }, _ = new wt(b);
2552
2552
  if (_.isValid())
2553
2553
  return this.signInUserSession = _, r(null, this.signInUserSession);
2554
- if (!v.getToken())
2554
+ if (!y.getToken())
2555
2555
  return r(new Error("Cannot retrieve a new session. Please authenticate."), null);
2556
- this.refreshSession(v, r, i.clientMetadata);
2556
+ this.refreshSession(y, r, i.clientMetadata);
2557
2557
  } else
2558
2558
  r(new Error("Local storage is missing an ID Token, Please authenticate"), null);
2559
2559
  }, e.refreshSession = function(r, i, s) {
@@ -2565,15 +2565,15 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2565
2565
  var m = d + "." + this.username + ".deviceKey";
2566
2566
  this.deviceKey = this.storage.getItem(m), h.DEVICE_KEY = this.deviceKey;
2567
2567
  }
2568
- var v = {
2568
+ var y = {
2569
2569
  ClientId: this.pool.getClientId(),
2570
2570
  AuthFlow: "REFRESH_TOKEN_AUTH",
2571
2571
  AuthParameters: h,
2572
2572
  ClientMetadata: s
2573
2573
  };
2574
- this.getUserContextData() && (v.UserContextData = this.getUserContextData()), this.client.requestWithRetry("InitiateAuth", v, function(y, b) {
2575
- if (y)
2576
- return y.code === "NotAuthorizedException" && o.clearCachedUser(), l(y, null);
2574
+ this.getUserContextData() && (y.UserContextData = this.getUserContextData()), this.client.requestWithRetry("InitiateAuth", y, function(v, b) {
2575
+ if (v)
2576
+ return v.code === "NotAuthorizedException" && o.clearCachedUser(), l(v, null);
2577
2577
  if (b) {
2578
2578
  var _ = b.AuthenticationResult;
2579
2579
  return Object.prototype.hasOwnProperty.call(_, "RefreshToken") || (_.RefreshToken = r.getToken()), o.signInUserSession = o.getCognitoUserSession(_), o.cacheTokens(), l(null, o.signInUserSession);
@@ -2601,7 +2601,7 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.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 vt(r), s = new gt(r), o = new yt(r), l = {
2604
+ var i = new yt(r), s = new gt(r), o = new vt(r), l = {
2605
2605
  IdToken: i,
2606
2606
  AccessToken: s,
2607
2607
  RefreshToken: o
@@ -2819,13 +2819,13 @@ var Yi = typeof navigator < "u", ur = Yi ? Fr.isReactNative ? "react-native" : n
2819
2819
  ChallengeResponses: d,
2820
2820
  Session: o.Session
2821
2821
  };
2822
- o.getUserContextData() && (p.UserContextData = o.getUserContextData()), o.client.request("RespondToAuthChallenge", p, function(m, v) {
2823
- return m ? s.onFailure(m) : (o.signInUserSession = o.getCognitoUserSession(v.AuthenticationResult), o.cacheTokens(), s.onSuccess(o.signInUserSession));
2822
+ o.getUserContextData() && (p.UserContextData = o.getUserContextData()), o.client.request("RespondToAuthChallenge", p, function(m, y) {
2823
+ return m ? s.onFailure(m) : (o.signInUserSession = o.getCognitoUserSession(y.AuthenticationResult), o.cacheTokens(), s.onSuccess(o.signInUserSession));
2824
2824
  });
2825
2825
  });
2826
2826
  }, n;
2827
2827
  })();
2828
- function Gi(n, e) {
2828
+ function Zi(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() {
@@ -2845,90 +2845,90 @@ function Gi(n, e) {
2845
2845
  } } };
2846
2846
  };
2847
2847
  for (var d in i.open(e.method || "get", n, !0), i.onload = function() {
2848
- i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(p, m, v) {
2849
- s.push(m = m.toLowerCase()), o.push([m, v]), l[m] = l[m] ? l[m] + "," + v : v;
2848
+ i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(p, m, y) {
2849
+ s.push(m = m.toLowerCase()), o.push([m, y]), l[m] = l[m] ? l[m] + "," + y : y;
2850
2850
  }), t(h());
2851
2851
  }, i.onerror = r, i.withCredentials = e.credentials == "include", e.headers) i.setRequestHeader(d, e.headers[d]);
2852
2852
  i.send(e.body || null);
2853
2853
  });
2854
2854
  }
2855
- const Ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2855
+ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2856
2856
  __proto__: null,
2857
- default: Gi
2858
- }, Symbol.toStringTag, { value: "Module" })), lr = /* @__PURE__ */ Ut(Ji);
2857
+ default: Zi
2858
+ }, Symbol.toStringTag, { value: "Module" })), lr = /* @__PURE__ */ Ut(Xi);
2859
2859
  var at, cr;
2860
- function Zi() {
2860
+ function Qi() {
2861
2861
  return cr || (cr = 1, at = self.fetch || (self.fetch = lr.default || lr)), at;
2862
2862
  }
2863
- Zi();
2864
- function j() {
2863
+ Qi();
2864
+ function H() {
2865
2865
  }
2866
- j.prototype.userAgent = ji();
2867
- var Xi = function(e) {
2868
- e && (j.prototype.userAgent && !j.prototype.userAgent.includes(e) && (j.prototype.userAgent = j.prototype.userAgent.concat(" ", e)), (!j.prototype.userAgent || j.prototype.userAgent === "") && (j.prototype.userAgent = e));
2869
- }, Qi = function(e) {
2870
- var t = j.category ? " " + j.category : "", r = j.framework ? " framework/" + j.framework : "", i = "" + j.prototype.userAgent + t + r;
2866
+ H.prototype.userAgent = zi();
2867
+ var es = function(e) {
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
+ }, ts = function(e) {
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 es(n, e) {
2874
- n.prototype = Object.create(e.prototype), n.prototype.constructor = n, ke(n, e);
2873
+ function rs(n, e) {
2874
+ n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Re(n, e);
2875
2875
  }
2876
2876
  function _t(n) {
2877
2877
  var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
2878
2878
  return _t = function(r) {
2879
- if (r === null || !rs(r)) return r;
2879
+ if (r === null || !is(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 ts(r, arguments, At(this).constructor);
2886
+ return ns(r, arguments, At(this).constructor);
2887
2887
  }
2888
- return i.prototype = Object.create(r.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), ke(i, r);
2888
+ return i.prototype = Object.create(r.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), Re(i, r);
2889
2889
  }, _t(n);
2890
2890
  }
2891
- function ts(n, e, t) {
2892
- if (Or()) return Reflect.construct.apply(null, arguments);
2891
+ function ns(n, e, t) {
2892
+ if (qr()) 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
- return t && ke(i, t.prototype), i;
2896
+ return t && Re(i, t.prototype), i;
2897
2897
  }
2898
- function Or() {
2898
+ function qr() {
2899
2899
  try {
2900
2900
  var n = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
2901
2901
  }));
2902
2902
  } catch {
2903
2903
  }
2904
- return (Or = function() {
2904
+ return (qr = function() {
2905
2905
  return !!n;
2906
2906
  })();
2907
2907
  }
2908
- function rs(n) {
2908
+ function is(n) {
2909
2909
  try {
2910
2910
  return Function.toString.call(n).indexOf("[native code]") !== -1;
2911
2911
  } catch {
2912
2912
  return typeof n == "function";
2913
2913
  }
2914
2914
  }
2915
- function ke(n, e) {
2916
- return ke = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
2915
+ function Re(n, e) {
2916
+ return Re = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
2917
2917
  return t.__proto__ = r, t;
2918
- }, ke(n, e);
2918
+ }, Re(n, e);
2919
2919
  }
2920
2920
  function At(n) {
2921
2921
  return At = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2922
2922
  return e.__proto__ || Object.getPrototypeOf(e);
2923
2923
  }, At(n);
2924
2924
  }
2925
- var ns = /* @__PURE__ */ (function(n) {
2925
+ var ss = /* @__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 es(e, n), e;
2931
- })(/* @__PURE__ */ _t(Error)), is = /* @__PURE__ */ (function() {
2930
+ return rs(e, n), e;
2931
+ })(/* @__PURE__ */ _t(Error)), os = /* @__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,15 +2941,15 @@ var ns = /* @__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 ns(h.message, h.code, h.name, h.statusCode)) : o(d);
2944
+ h ? l(new ss(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
- as(function(h) {
2949
+ ls(function(h) {
2950
2950
  return new Promise(function(d, p) {
2951
- o.request(r, h, function(m, v) {
2952
- m ? p(m) : d(v);
2951
+ o.request(r, h, function(m, y) {
2952
+ m ? p(m) : d(y);
2953
2953
  });
2954
2954
  });
2955
2955
  }, [i], l).then(function(h) {
@@ -2961,7 +2961,7 @@ var ns = /* @__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": Qi(),
2964
+ "X-Amz-User-Agent": ts(),
2965
2965
  "Cache-Control": "no-store"
2966
2966
  }, l = Object.assign({}, this.fetchOptions, {
2967
2967
  headers: o,
@@ -2993,48 +2993,48 @@ var ns = /* @__PURE__ */ (function(n) {
2993
2993
  return s(d);
2994
2994
  });
2995
2995
  }, n;
2996
- })(), Ve = {
2996
+ })(), je = {
2997
2997
  debug: function() {
2998
2998
  }
2999
- }, ss = function(e) {
2999
+ }, as = function(e) {
3000
3000
  var t = "nonRetryable";
3001
3001
  return e && e[t];
3002
3002
  };
3003
- function Nr(n, e, t, r) {
3003
+ function Lr(n, e, t, r) {
3004
3004
  if (r === void 0 && (r = 1), typeof n != "function")
3005
3005
  throw Error("functionToRetry must be a function");
3006
- return Ve.debug(n.name + " attempt #" + r + " with args: " + JSON.stringify(e)), n.apply(void 0, e).catch(function(i) {
3007
- if (Ve.debug("error on " + n.name, i), ss(i))
3008
- throw Ve.debug(n.name + " non retryable error", i), i;
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), as(i))
3008
+ throw je.debug(n.name + " non retryable error", i), i;
3009
3009
  var s = t(r, e, i);
3010
- if (Ve.debug(n.name + " retrying in " + s + " ms"), s !== !1)
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 Nr(n, e, t, r + 1);
3014
+ return Lr(n, e, t, r + 1);
3015
3015
  });
3016
3016
  throw i;
3017
3017
  });
3018
3018
  }
3019
- function os(n) {
3019
+ function us(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 as(n, e, t) {
3027
- return Nr(n, e, os(t));
3026
+ function ls(n, e, t) {
3027
+ return Lr(n, e, us(t));
3028
3028
  }
3029
- var us = 55, ls = /* @__PURE__ */ (function() {
3029
+ var cs = 55, hs = /* @__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 > us || !/^[\w-]+_[0-9a-zA-Z]+$/.test(s))
3034
+ if (s.length > cs || !/^[\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 is(p, l, h), this.advancedSecurityDataCollectionFlag = d !== !1, this.storage = t.Storage || new Mr().getStorage(), r && (this.wrapRefreshSessionCallback = r);
3037
+ this.userPoolId = s, this.clientId = o, this.client = new os(p, l, h), this.advancedSecurityDataCollectionFlag = d !== !1, this.storage = t.Storage || new Nr().getStorage(), r && (this.wrapRefreshSessionCallback = r);
3038
3038
  }
3039
3039
  var e = n.prototype;
3040
3040
  return e.getUserPoolId = function() {
@@ -3052,18 +3052,18 @@ var us = 55, ls = /* @__PURE__ */ (function() {
3052
3052
  ValidationData: o,
3053
3053
  ClientMetadata: h
3054
3054
  };
3055
- this.getUserContextData(r) && (p.UserContextData = this.getUserContextData(r)), this.client.request("SignUp", p, function(m, v) {
3055
+ this.getUserContextData(r) && (p.UserContextData = this.getUserContextData(r)), this.client.request("SignUp", p, function(m, y) {
3056
3056
  if (m)
3057
3057
  return l(m, null);
3058
- var y = {
3058
+ var v = {
3059
3059
  Username: r,
3060
3060
  Pool: d,
3061
3061
  Storage: d.storage
3062
3062
  }, b = {
3063
- user: new St(y),
3064
- userConfirmed: v.UserConfirmed,
3065
- userSub: v.UserSub,
3066
- codeDeliveryDetails: v.CodeDeliveryDetails
3063
+ user: new St(v),
3064
+ userConfirmed: y.UserConfirmed,
3065
+ userSub: y.UserSub,
3066
+ codeDeliveryDetails: y.CodeDeliveryDetails
3067
3067
  };
3068
3068
  return l(null, b);
3069
3069
  });
@@ -3094,7 +3094,7 @@ var us = 55, ls = /* @__PURE__ */ (function() {
3094
3094
  }
3095
3095
  }, n;
3096
3096
  })();
3097
- function je(n) {
3097
+ function Ve(n) {
3098
3098
  for (var e = 1; e < arguments.length; e++) {
3099
3099
  var t = arguments[e];
3100
3100
  for (var r in t)
@@ -3102,7 +3102,7 @@ function je(n) {
3102
3102
  }
3103
3103
  return n;
3104
3104
  }
3105
- var cs = {
3105
+ var fs = {
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,10 +3113,10 @@ var cs = {
3113
3113
  );
3114
3114
  }
3115
3115
  };
3116
- function Ct(n, e) {
3116
+ function xt(n, e) {
3117
3117
  function t(i, s, o) {
3118
3118
  if (!(typeof document > "u")) {
3119
- o = je({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
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);
3120
3120
  var l = "";
3121
3121
  for (var h in o)
3122
3122
  o[h] && (l += "; " + h, o[h] !== !0 && (l += "=" + o[h].split(";")[0]));
@@ -3145,16 +3145,16 @@ function Ct(n, e) {
3145
3145
  t(
3146
3146
  i,
3147
3147
  "",
3148
- je({}, s, {
3148
+ Ve({}, s, {
3149
3149
  expires: -1
3150
3150
  })
3151
3151
  );
3152
3152
  },
3153
3153
  withAttributes: function(i) {
3154
- return Ct(this.converter, je({}, this.attributes, i));
3154
+ return xt(this.converter, Ve({}, this.attributes, i));
3155
3155
  },
3156
3156
  withConverter: function(i) {
3157
- return Ct(je({}, this.converter, i), this.attributes);
3157
+ return xt(Ve({}, this.converter, i), this.attributes);
3158
3158
  }
3159
3159
  },
3160
3160
  {
@@ -3163,7 +3163,7 @@ function Ct(n, e) {
3163
3163
  }
3164
3164
  );
3165
3165
  }
3166
- var xe = Ct(cs, { path: "/" }), hs = /* @__PURE__ */ (function() {
3166
+ var Ee = xt(fs, { path: "/" }), ds = /* @__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))
@@ -3182,9 +3182,9 @@ var xe = Ct(cs, { path: "/" }), hs = /* @__PURE__ */ (function() {
3182
3182
  domain: this.domain,
3183
3183
  secure: this.secure
3184
3184
  };
3185
- return this.sameSite && (s.sameSite = this.sameSite), xe.set(r, i, s), xe.get(r);
3185
+ return this.sameSite && (s.sameSite = this.sameSite), Ee.set(r, i, s), Ee.get(r);
3186
3186
  }, e.getItem = function(r) {
3187
- var i = xe.get(r);
3187
+ var i = Ee.get(r);
3188
3188
  return i ?? null;
3189
3189
  }, e.removeItem = function(r) {
3190
3190
  var i = {
@@ -3193,39 +3193,39 @@ var xe = Ct(cs, { path: "/" }), hs = /* @__PURE__ */ (function() {
3193
3193
  domain: this.domain,
3194
3194
  secure: this.secure
3195
3195
  };
3196
- return this.sameSite && (i.sameSite = this.sameSite), xe.remove(r, i);
3196
+ return this.sameSite && (i.sameSite = this.sameSite), Ee.remove(r, i);
3197
3197
  }, e.clear = function() {
3198
- for (var r = xe.get(), i = Object.keys(r).length, s = 0; s < i; ++s)
3198
+ for (var r = Ee.get(), i = Object.keys(r).length, s = 0; s < i; ++s)
3199
3199
  this.removeItem(Object.keys(r)[s]);
3200
3200
  return {};
3201
3201
  }, n;
3202
3202
  })();
3203
- const fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3203
+ const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3204
3204
  __proto__: null,
3205
- AuthenticationDetails: hn,
3205
+ AuthenticationDetails: dn,
3206
3206
  AuthenticationHelper: ne,
3207
3207
  CognitoAccessToken: gt,
3208
- CognitoIdToken: vt,
3209
- CognitoRefreshToken: yt,
3208
+ CognitoIdToken: yt,
3209
+ CognitoRefreshToken: vt,
3210
3210
  CognitoUser: St,
3211
- CognitoUserAttribute: Br,
3212
- CognitoUserPool: ls,
3211
+ CognitoUserAttribute: Or,
3212
+ CognitoUserPool: hs,
3213
3213
  CognitoUserSession: wt,
3214
- CookieStorage: hs,
3214
+ CookieStorage: ds,
3215
3215
  DateHelper: bt,
3216
- WordArray: Dr,
3217
- appendToCognitoUserAgent: Xi
3216
+ WordArray: Rr,
3217
+ appendToCognitoUserAgent: es
3218
3218
  }, Symbol.toStringTag, { value: "Module" }));
3219
- const ze = globalThis, Rt = ze.ShadowRoot && (ze.ShadyCSS === void 0 || ze.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, kt = /* @__PURE__ */ Symbol(), hr = /* @__PURE__ */ new WeakMap();
3220
- let qr = class {
3219
+ const ze = globalThis, kt = ze.ShadowRoot && (ze.ShadyCSS === void 0 || ze.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Rt = /* @__PURE__ */ Symbol(), hr = /* @__PURE__ */ new WeakMap();
3220
+ let Kr = class {
3221
3221
  constructor(e, t, r) {
3222
- if (this._$cssResult$ = !0, r !== kt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
3222
+ if (this._$cssResult$ = !0, r !== Rt) 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 (Rt && e === void 0) {
3228
+ if (kt && e === void 0) {
3229
3229
  const r = t !== void 0 && t.length === 1;
3230
3230
  r && (e = hr.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && hr.set(t, e));
3231
3231
  }
@@ -3235,28 +3235,28 @@ let qr = class {
3235
3235
  return this.cssText;
3236
3236
  }
3237
3237
  };
3238
- const ds = (n) => new qr(typeof n == "string" ? n : n + "", void 0, kt), H = (n, ...e) => {
3238
+ const gs = (n) => new Kr(typeof n == "string" ? n : n + "", void 0, Rt), 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 qr(t, n, kt);
3245
- }, ps = (n, e) => {
3246
- if (Rt) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
3244
+ return new Kr(t, n, Rt);
3245
+ }, ms = (n, e) => {
3246
+ if (kt) 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
- }, fr = Rt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
3251
+ }, fr = kt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
3252
3252
  let t = "";
3253
3253
  for (const r of e.cssRules) t += r.cssText;
3254
- return ds(t);
3254
+ return gs(t);
3255
3255
  })(n) : n;
3256
- const { is: gs, defineProperty: ms, getOwnPropertyDescriptor: vs, getOwnPropertyNames: ys, getOwnPropertySymbols: ws, getPrototypeOf: bs } = Object, Qe = globalThis, dr = Qe.trustedTypes, Ss = dr ? dr.emptyScript : "", _s = Qe.reactiveElementPolyfillSupport, De = (n, e) => n, xt = { toAttribute(n, e) {
3256
+ const { is: ys, defineProperty: vs, getOwnPropertyDescriptor: ws, getOwnPropertyNames: bs, getOwnPropertySymbols: Ss, getPrototypeOf: _s } = Object, Qe = globalThis, dr = Qe.trustedTypes, As = dr ? dr.emptyScript : "", xs = Qe.reactiveElementPolyfillSupport, De = (n, e) => n, Ct = { toAttribute(n, e) {
3257
3257
  switch (e) {
3258
3258
  case Boolean:
3259
- n = n ? Ss : null;
3259
+ n = n ? As : null;
3260
3260
  break;
3261
3261
  case Object:
3262
3262
  case Array:
@@ -3281,9 +3281,9 @@ const { is: gs, defineProperty: ms, getOwnPropertyDescriptor: vs, getOwnProperty
3281
3281
  }
3282
3282
  }
3283
3283
  return t;
3284
- } }, Lr = (n, e) => !gs(n, e), pr = { attribute: !0, type: String, converter: xt, reflect: !1, useDefault: !1, hasChanged: Lr };
3284
+ } }, jr = (n, e) => !ys(n, e), pr = { attribute: !0, type: String, converter: Ct, reflect: !1, useDefault: !1, hasChanged: jr };
3285
3285
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Qe.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
3286
- let ce = class extends HTMLElement {
3286
+ let he = class extends HTMLElement {
3287
3287
  static addInitializer(e) {
3288
3288
  this._$Ei(), (this.l ??= []).push(e);
3289
3289
  }
@@ -3293,11 +3293,11 @@ let ce = class extends HTMLElement {
3293
3293
  static createProperty(e, t = pr) {
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 && ms(this.prototype, e, i);
3296
+ i !== void 0 && vs(this.prototype, e, i);
3297
3297
  }
3298
3298
  }
3299
3299
  static getPropertyDescriptor(e, t, r) {
3300
- const { get: i, set: s } = vs(this.prototype, e) ?? { get() {
3300
+ const { get: i, set: s } = ws(this.prototype, e) ?? { get() {
3301
3301
  return this[t];
3302
3302
  }, set(o) {
3303
3303
  this[t] = o;
@@ -3312,13 +3312,13 @@ let ce = class extends HTMLElement {
3312
3312
  }
3313
3313
  static _$Ei() {
3314
3314
  if (this.hasOwnProperty(De("elementProperties"))) return;
3315
- const e = bs(this);
3315
+ const e = _s(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 = [...ys(t), ...ws(t)];
3321
+ const t = this.properties, r = [...bs(t), ...Ss(t)];
3322
3322
  for (const i of r) this.createProperty(i, t[i]);
3323
3323
  }
3324
3324
  const e = this[Symbol.metadata];
@@ -3364,7 +3364,7 @@ let ce = class extends HTMLElement {
3364
3364
  }
3365
3365
  createRenderRoot() {
3366
3366
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
3367
- return ps(e, this.constructor.elementStyles), e;
3367
+ return ms(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 ce = 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 : xt).toAttribute(t, r.type);
3383
+ const s = (r.converter?.toAttribute !== void 0 ? r.converter : Ct).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 : xt;
3390
+ const s = r.getPropertyOptions(i), o = typeof s.converter == "function" ? { fromAttribute: s.converter } : s.converter?.fromAttribute !== void 0 ? s.converter : Ct;
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 ce = 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 ?? Lr)(s, t) || r.useDefault && r.reflect && s === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, r)))) return;
3399
+ if (i === !1 && (s = this[e]), r ??= o.getPropertyOptions(e), !((r.hasChanged ?? jr)(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,51 +3464,51 @@ let ce = class extends HTMLElement {
3464
3464
  firstUpdated(e) {
3465
3465
  }
3466
3466
  };
3467
- ce.elementStyles = [], ce.shadowRootOptions = { mode: "open" }, ce[De("elementProperties")] = /* @__PURE__ */ new Map(), ce[De("finalized")] = /* @__PURE__ */ new Map(), _s?.({ ReactiveElement: ce }), (Qe.reactiveElementVersions ??= []).push("2.1.2");
3468
- const $t = globalThis, gr = (n) => n, Ye = $t.trustedTypes, mr = Ye ? Ye.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Kr = "$lit$", J = `lit$${Math.random().toFixed(9).slice(2)}$`, Vr = "?" + J, As = `<${Vr}>`, oe = document, $e = () => oe.createComment(""), Pe = (n) => n === null || typeof n != "object" && typeof n != "function", Pt = Array.isArray, Cs = (n) => Pt(n) || typeof n?.[Symbol.iterator] == "function", ut = `[
3469
- \f\r]`, Ee = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, vr = /-->/g, yr = />/g, re = RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
3470
- \f\r"'\`<>=]|("|')|))|$)`, "g"), wr = /'/g, br = /"/g, jr = /^(?:script|style|textarea|title)$/i, xs = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), C = xs(1), he = /* @__PURE__ */ Symbol.for("lit-noChange"), T = /* @__PURE__ */ Symbol.for("lit-nothing"), Sr = /* @__PURE__ */ new WeakMap(), ie = oe.createTreeWalker(oe, 129);
3471
- function Hr(n, e) {
3467
+ he.elementStyles = [], he.shadowRootOptions = { mode: "open" }, he[De("elementProperties")] = /* @__PURE__ */ new Map(), he[De("finalized")] = /* @__PURE__ */ new Map(), xs?.({ ReactiveElement: he }), (Qe.reactiveElementVersions ??= []).push("2.1.2");
3468
+ const $t = globalThis, gr = (n) => n, Ye = $t.trustedTypes, mr = Ye ? Ye.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Vr = "$lit$", J = `lit$${Math.random().toFixed(9).slice(2)}$`, Hr = "?" + J, Cs = `<${Hr}>`, oe = document, $e = () => oe.createComment(""), Pe = (n) => n === null || typeof n != "object" && typeof n != "function", Pt = Array.isArray, Es = (n) => Pt(n) || typeof n?.[Symbol.iterator] == "function", ut = `[
3469
+ \f\r]`, Ue = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, yr = /-->/g, vr = />/g, re = RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
3470
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), wr = /'/g, br = /"/g, zr = /^(?:script|style|textarea|title)$/i, Us = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), x = Us(1), fe = /* @__PURE__ */ Symbol.for("lit-noChange"), U = /* @__PURE__ */ Symbol.for("lit-nothing"), Sr = /* @__PURE__ */ new WeakMap(), ie = oe.createTreeWalker(oe, 129);
3471
+ function Wr(n, e) {
3472
3472
  if (!Pt(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
3473
3473
  return mr !== void 0 ? mr.createHTML(e) : e;
3474
3474
  }
3475
- const Es = (n, e) => {
3475
+ const Ts = (n, e) => {
3476
3476
  const t = n.length - 1, r = [];
3477
- let i, s = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", o = Ee;
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
- let d, p, m = -1, v = 0;
3481
- for (; v < h.length && (o.lastIndex = v, p = o.exec(h), p !== null); ) v = o.lastIndex, o === Ee ? p[1] === "!--" ? o = vr : p[1] !== void 0 ? o = yr : p[2] !== void 0 ? (jr.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = re) : p[3] !== void 0 && (o = re) : o === re ? p[0] === ">" ? (o = i ?? Ee, 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] === '"' ? br : wr) : o === br || o === wr ? o = re : o === vr || o === yr ? o = Ee : (o = re, i = void 0);
3482
- const y = o === re && n[l + 1].startsWith("/>") ? " " : "";
3483
- s += o === Ee ? h + As : m >= 0 ? (r.push(d), h.slice(0, m) + Kr + h.slice(m) + J + y) : h + J + (m === -2 ? l : y);
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 = yr : p[1] !== void 0 ? o = vr : p[2] !== void 0 ? (zr.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] === '"' ? br : wr) : o === br || o === wr ? o = re : o === yr || o === vr ? o = Ue : (o = re, i = void 0);
3482
+ const v = o === re && n[l + 1].startsWith("/>") ? " " : "";
3483
+ s += o === Ue ? h + Cs : m >= 0 ? (r.push(d), h.slice(0, m) + Vr + h.slice(m) + J + v) : h + J + (m === -2 ? l : v);
3484
3484
  }
3485
- return [Hr(n, s + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
3485
+ return [Wr(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] = Es(e, t);
3492
+ const l = e.length - 1, h = this.parts, [d, p] = Ts(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(Kr)) {
3500
- const v = p[o++], y = i.getAttribute(m).split(J), b = /([.?@])?(.*)/.exec(v);
3501
- h.push({ type: 1, index: s, name: b[2], strings: y, ctor: b[1] === "." ? Ts : b[1] === "?" ? Is : b[1] === "@" ? Ds : et }), i.removeAttribute(m);
3499
+ if (i.hasAttributes()) for (const m of i.getAttributeNames()) if (m.endsWith(Vr)) {
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] === "." ? Ds : b[1] === "?" ? ks : b[1] === "@" ? Rs : et }), i.removeAttribute(m);
3502
3502
  } else m.startsWith(J) && (h.push({ type: 6, index: s }), i.removeAttribute(m));
3503
- if (jr.test(i.tagName)) {
3504
- const m = i.textContent.split(J), v = m.length - 1;
3505
- if (v > 0) {
3503
+ if (zr.test(i.tagName)) {
3504
+ const m = i.textContent.split(J), y = m.length - 1;
3505
+ if (y > 0) {
3506
3506
  i.textContent = Ye ? Ye.emptyScript : "";
3507
- for (let y = 0; y < v; y++) i.append(m[y], $e()), ie.nextNode(), h.push({ type: 2, index: ++s });
3508
- i.append(m[v], $e());
3507
+ for (let v = 0; v < y; v++) i.append(m[v], $e()), ie.nextNode(), h.push({ type: 2, index: ++s });
3508
+ i.append(m[y], $e());
3509
3509
  }
3510
3510
  }
3511
- } else if (i.nodeType === 8) if (i.data === Vr) h.push({ type: 2, index: s });
3511
+ } else if (i.nodeType === 8) if (i.data === Hr) 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;
@@ -3521,13 +3521,13 @@ class Fe {
3521
3521
  return r.innerHTML = e, r;
3522
3522
  }
3523
3523
  }
3524
- function fe(n, e, t = n, r) {
3525
- if (e === he) return e;
3524
+ function de(n, e, t = n, r) {
3525
+ if (e === fe) return e;
3526
3526
  let i = r !== void 0 ? t._$Co?.[r] : t._$Cl;
3527
3527
  const s = Pe(e) ? void 0 : e._$litDirective$;
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 = fe(n, i._$AS(n, e.values), i, r)), e;
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 Us {
3530
+ class Is {
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 Us {
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 Rs(s, this, e)), this._$AV.push(d), h = r[++l];
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 $s(s, this, e)), this._$AV.push(d), h = r[++l];
3548
3548
  }
3549
3549
  o !== h?.index && (s = ie.nextNode(), o++);
3550
3550
  }
@@ -3560,7 +3560,7 @@ class Be {
3560
3560
  return this._$AM?._$AU ?? this._$Cv;
3561
3561
  }
3562
3562
  constructor(e, t, r, i) {
3563
- this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
3563
+ this.type = 2, this._$AH = U, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
3564
3564
  }
3565
3565
  get parentNode() {
3566
3566
  let e = this._$AA.parentNode;
@@ -3574,7 +3574,7 @@ class Be {
3574
3574
  return this._$AB;
3575
3575
  }
3576
3576
  _$AI(e, t = this) {
3577
- e = fe(this, e, t), Pe(e) ? e === T || e == null || e === "" ? (this._$AH !== T && this._$AR(), this._$AH = T) : e !== this._$AH && e !== he && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Cs(e) ? this.k(e) : this._(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) : Es(e) ? this.k(e) : this._(e);
3578
3578
  }
3579
3579
  O(e) {
3580
3580
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -3583,13 +3583,13 @@ class Be {
3583
3583
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
3584
3584
  }
3585
3585
  _(e) {
3586
- this._$AH !== T && Pe(this._$AH) ? this._$AA.nextSibling.data = e : this.T(oe.createTextNode(e)), this._$AH = e;
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(Hr(r.h, r.h[0]), this.options)), r);
3589
+ const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = Fe.createElement(Wr(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 Us(i, this), o = s.u(this.options);
3592
+ const s = new Is(i, this), o = s.u(this.options);
3593
3593
  s.p(t), this.T(o), this._$AH = s;
3594
3594
  }
3595
3595
  }
@@ -3622,53 +3622,53 @@ class et {
3622
3622
  return this._$AM._$AU;
3623
3623
  }
3624
3624
  constructor(e, t, r, i, s) {
3625
- this.type = 1, this._$AH = T, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = s, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = T;
3625
+ this.type = 1, this._$AH = U, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = s, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = U;
3626
3626
  }
3627
3627
  _$AI(e, t = this, r, i) {
3628
3628
  const s = this.strings;
3629
3629
  let o = !1;
3630
- if (s === void 0) e = fe(this, e, t, 0), o = !Pe(e) || e !== this._$AH && e !== he, o && (this._$AH = e);
3630
+ if (s === void 0) e = de(this, e, t, 0), o = !Pe(e) || e !== this._$AH && e !== fe, o && (this._$AH = e);
3631
3631
  else {
3632
3632
  const l = e;
3633
3633
  let h, d;
3634
- for (e = s[0], h = 0; h < s.length - 1; h++) d = fe(this, l[r + h], t, h), d === he && (d = this._$AH[h]), o ||= !Pe(d) || d !== this._$AH[h], d === T ? e = T : e !== T && (e += (d ?? "") + s[h + 1]), this._$AH[h] = d;
3634
+ for (e = s[0], h = 0; h < s.length - 1; h++) d = de(this, l[r + h], t, h), d === fe && (d = this._$AH[h]), o ||= !Pe(d) || d !== this._$AH[h], d === U ? e = U : e !== U && (e += (d ?? "") + s[h + 1]), this._$AH[h] = d;
3635
3635
  }
3636
3636
  o && !i && this.j(e);
3637
3637
  }
3638
3638
  j(e) {
3639
- e === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
3639
+ e === U ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
3640
3640
  }
3641
3641
  }
3642
- class Ts extends et {
3642
+ class Ds extends et {
3643
3643
  constructor() {
3644
3644
  super(...arguments), this.type = 3;
3645
3645
  }
3646
3646
  j(e) {
3647
- this.element[this.name] = e === T ? void 0 : e;
3647
+ this.element[this.name] = e === U ? void 0 : e;
3648
3648
  }
3649
3649
  }
3650
- class Is extends et {
3650
+ class ks extends et {
3651
3651
  constructor() {
3652
3652
  super(...arguments), this.type = 4;
3653
3653
  }
3654
3654
  j(e) {
3655
- this.element.toggleAttribute(this.name, !!e && e !== T);
3655
+ this.element.toggleAttribute(this.name, !!e && e !== U);
3656
3656
  }
3657
3657
  }
3658
- class Ds extends et {
3658
+ class Rs extends et {
3659
3659
  constructor(e, t, r, i, s) {
3660
3660
  super(e, t, r, i, s), this.type = 5;
3661
3661
  }
3662
3662
  _$AI(e, t = this) {
3663
- if ((e = fe(this, e, t, 0) ?? T) === he) return;
3664
- const r = this._$AH, i = e === T && r !== T || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, s = e !== T && (r === T || i);
3663
+ if ((e = de(this, e, t, 0) ?? U) === fe) return;
3664
+ const r = this._$AH, i = e === U && r !== U || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, s = e !== U && (r === U || i);
3665
3665
  i && this.element.removeEventListener(this.name, this, r), s && this.element.addEventListener(this.name, this, e), this._$AH = e;
3666
3666
  }
3667
3667
  handleEvent(e) {
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 Rs {
3671
+ class $s {
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
  }
@@ -3676,12 +3676,12 @@ class Rs {
3676
3676
  return this._$AM._$AU;
3677
3677
  }
3678
3678
  _$AI(e) {
3679
- fe(this, e);
3679
+ de(this, e);
3680
3680
  }
3681
3681
  }
3682
- const ks = $t.litHtmlPolyfillSupport;
3683
- ks?.(Fe, Be), ($t.litHtmlVersions ??= []).push("3.3.3");
3684
- const $s = (n, e, t) => {
3682
+ const Ps = $t.litHtmlPolyfillSupport;
3683
+ Ps?.(Fe, Be), ($t.litHtmlVersions ??= []).push("3.3.3");
3684
+ const Fs = (n, e, t) => {
3685
3685
  const r = t?.renderBefore ?? e;
3686
3686
  let i = r._$litPart$;
3687
3687
  if (i === void 0) {
@@ -3691,7 +3691,7 @@ const $s = (n, e, t) => {
3691
3691
  return i._$AI(n), i;
3692
3692
  };
3693
3693
  const Ft = globalThis;
3694
- class se extends ce {
3694
+ class se extends he {
3695
3695
  constructor() {
3696
3696
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
3697
3697
  }
@@ -3701,7 +3701,7 @@ class se extends ce {
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 = $s(t, this.renderRoot, this.renderOptions);
3704
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Fs(t, this.renderRoot, this.renderOptions);
3705
3705
  }
3706
3706
  connectedCallback() {
3707
3707
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -3710,14 +3710,14 @@ class se extends ce {
3710
3710
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
3711
3711
  }
3712
3712
  render() {
3713
- return he;
3713
+ return fe;
3714
3714
  }
3715
3715
  }
3716
3716
  se._$litElement$ = !0, se.finalized = !0, Ft.litElementHydrateSupport?.({ LitElement: se });
3717
- const Ps = Ft.litElementPolyfillSupport;
3718
- Ps?.({ LitElement: se });
3717
+ const Bs = Ft.litElementPolyfillSupport;
3718
+ Bs?.({ LitElement: se });
3719
3719
  (Ft.litElementVersions ??= []).push("4.2.2");
3720
- const Fs = H`
3720
+ const Ms = z`
3721
3721
  :host {
3722
3722
  display: block;
3723
3723
  box-sizing: border-box;
@@ -3741,7 +3741,7 @@ const Fs = H`
3741
3741
  position: absolute; width: 1px; height: 1px; overflow: hidden;
3742
3742
  clip: rect(0 0 0 0); white-space: nowrap;
3743
3743
  }
3744
- `, Bs = H`
3744
+ `, Os = 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 Fs = H`
3772
3772
  animation: none !important;
3773
3773
  }
3774
3774
  }
3775
- `, Ms = H`
3775
+ `, Ns = 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 Fs = H`
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
- `, Os = H`
3797
+ `, qs = 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 Fs = H`
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
- `, Ns = H`
3811
+ `, Ls = z`
3812
3812
  .form-card {
3813
3813
  align-self: stretch;
3814
3814
  background: var(--wral-semantic-surface-default, #FFFFFF);
@@ -3873,7 +3873,7 @@ const Fs = H`
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
- `, qs = H`
3876
+ `, Ks = 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);
@@ -3919,13 +3919,48 @@ const Fs = H`
3919
3919
  .login-why ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--color-gray-6, #565454); }
3920
3920
  .login-why li { margin-bottom: 4px; line-height: 1.5; }
3921
3921
  .login-why a { color: var(--color-secondary, #2594E3); font-weight: 600; text-decoration: underline; }
3922
- .login-anon {
3923
- border-top: 1px solid var(--color-gray-2, #E7E5E4); margin: 16px 0 0; padding-top: 14px;
3924
- font-size: 14px; color: var(--color-gray-6, #565454); line-height: 1.5;
3922
+ .login-alt {
3923
+ border-top: 1px solid var(--color-gray-2, #E7E5E4); margin-top: 16px; padding-top: 12px;
3925
3924
  }
3926
- .login-anon a { color: var(--color-primary-dark, #00144A); font-weight: 600; text-decoration: none; white-space: nowrap; }
3927
- .login-anon a:hover { text-decoration: underline; }
3928
- `, Ls = H`
3925
+ .login-alt > summary {
3926
+ display: flex; align-items: center; gap: 7px;
3927
+ font-size: 14px; font-weight: 600;
3928
+ color: var(--color-gray-5, #6C6C6C);
3929
+ padding: 3px 0; cursor: pointer; list-style: none;
3930
+ }
3931
+ .login-alt > summary::-webkit-details-marker { display: none; }
3932
+ .login-alt > summary::before {
3933
+ content: ''; flex-shrink: 0; padding: 2.5px;
3934
+ border: solid currentColor; border-width: 0 1.5px 1.5px 0;
3935
+ transform: rotate(-45deg); transition: transform 150ms;
3936
+ }
3937
+ .login-alt[open] > summary::before { transform: rotate(45deg); }
3938
+ .login-alt > summary:hover { color: var(--color-gray-8, #263238); }
3939
+ .login-alt > summary:focus-visible { outline: 2px solid var(--color-secondary, #2594E3); outline-offset: 2px; }
3940
+ .login-alt .alt-body {
3941
+ font-size: 13.5px; color: var(--color-gray-6, #565454);
3942
+ line-height: 1.55; padding: 6px 0 2px;
3943
+ }
3944
+ .login-alt .alt-row { margin: 0 0 10px; }
3945
+ .login-alt .alt-row:last-child { margin-bottom: 0; }
3946
+ .login-alt a, .login-alt .alt-link {
3947
+ color: var(--color-primary-dark, #00144A); font-weight: 600;
3948
+ text-decoration: underline;
3949
+ }
3950
+ .login-alt a { text-decoration: none; white-space: nowrap; }
3951
+ .login-alt a:hover { text-decoration: underline; }
3952
+ .login-alt .alt-link {
3953
+ background: none; border: none; padding: 0; cursor: pointer;
3954
+ font-family: inherit; font-size: inherit;
3955
+ }
3956
+ .login-alt .alt-link:focus-visible { outline: 2px solid var(--color-secondary, #2594E3); outline-offset: 2px; }
3957
+ .anon-costs { margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; color: var(--color-gray-6, #565454); }
3958
+ .anon-costs li { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 9px; line-height: 1.5; }
3959
+ .anon-costs li:last-child { margin-bottom: 0; }
3960
+ .anon-costs .x { flex-shrink: 0; font-weight: 700; color: var(--wral-base-red-on-light, #D1232A); }
3961
+ .anon-actions { display: flex; flex-direction: column; gap: 10px; }
3962
+ .anon-actions .btn-ghost { width: 100%; }
3963
+ `, js = z`
3929
3964
  .review-list { margin: 0; padding: 0; list-style: none; font-size: 14px; }
3930
3965
  .review-list li {
3931
3966
  display: grid; grid-template-columns: 130px 1fr; gap: 10px;
@@ -3957,7 +3992,7 @@ const Fs = H`
3957
3992
  color: var(--wral-base-primary-1, #001D68);
3958
3993
  }
3959
3994
  @media (max-width: 540px) { .review-list li { grid-template-columns: 1fr; gap: 2px; } }
3960
- `, Ks = H`
3995
+ `, Vs = z`
3961
3996
  .upload-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; }
3962
3997
  .upload-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3963
3998
  .upload-row .state { font-size: 12px; color: var(--wral-semantic-fg-subtle, #64748B); }
@@ -3973,7 +4008,7 @@ const Fs = H`
3973
4008
  border-radius: 999px; padding: 3px 12px; cursor: pointer;
3974
4009
  }
3975
4010
  .retry-chip:focus-visible { outline: 2px solid var(--wral-base-secondary-1, #2594E3); outline-offset: 2px; }
3976
- `, Vs = H`
4011
+ `, Hs = z`
3977
4012
  .confirm-card {
3978
4013
  align-self: stretch;
3979
4014
  background: var(--wral-base-primary-1, #001D68);
@@ -4023,7 +4058,7 @@ const Fs = H`
4023
4058
  .c-again:hover { background: rgba(255, 255, 255, 0.12); }
4024
4059
  .c-again:focus-visible { outline: 2px solid var(--wral-base-secondary-2, #50A9E8); outline-offset: 2px; }
4025
4060
  .c-again:active { transform: scale(0.97); }
4026
- `, js = H`
4061
+ `, zs = z`
4027
4062
  .journey {
4028
4063
  align-self: stretch;
4029
4064
  background: var(--wral-semantic-surface-default, #FFFFFF);
@@ -4064,7 +4099,7 @@ const Fs = H`
4064
4099
  color: var(--wral-base-primary-1, #001D68); margin-bottom: 2px;
4065
4100
  }
4066
4101
  .j-body .j-d { font-size: 13.5px; color: var(--wral-semantic-fg-muted, #475569); line-height: 1.55; }
4067
- `, Hs = H`
4102
+ `, Ws = z`
4068
4103
  .bottom-bar {
4069
4104
  position: sticky; bottom: 0; z-index: 20;
4070
4105
  background: var(--wral-semantic-surface-default, #FFFFFF);
@@ -4077,32 +4112,32 @@ const Fs = H`
4077
4112
  }
4078
4113
  .bottom-bar .note { margin-left: auto; font-size: 12px; color: var(--wral-semantic-fg-subtle, #64748B); }
4079
4114
  @media (max-width: 540px) { .bottom-bar .note { display: none; } }
4080
- `, zs = [Fs, Bs, Ms, Os, Ns, qs, Ls, Ks, Vs, js, Hs];
4081
- function z(n, e, { noAnim: t = !1, error: r = !1 } = {}) {
4082
- return C`
4115
+ `, Ys = [Ms, Os, Ns, qs, Ls, Ks, js, Vs, Hs, zs, Ws];
4116
+ function V(n, e, { noAnim: t = !1, error: r = !1 } = {}) {
4117
+ return x`
4083
4118
  <div class="msg bot ${t ? "no-anim" : ""} ${r ? "error" : ""}">
4084
4119
  <span class="lead">${n}</span>
4085
- ${e ? C`<span class="sub">${e}</span>` : T}
4120
+ ${e ? x`<span class="sub">${e}</span>` : U}
4086
4121
  </div>
4087
4122
  `;
4088
4123
  }
4089
4124
  function He(n, { noAnim: e = !1 } = {}) {
4090
- return C`<div class="msg user ${e ? "no-anim" : ""}">${n}</div>`;
4125
+ return x`<div class="msg user ${e ? "no-anim" : ""}">${n}</div>`;
4091
4126
  }
4092
4127
  function lt() {
4093
- return C`<div class="msg bot typing"><span></span><span></span><span></span></div>`;
4128
+ return x`<div class="msg bot typing"><span></span><span></span><span></span></div>`;
4094
4129
  }
4095
- function Ws(n) {
4096
- return n ? C`<span class="flag-pill ${n}">${n === "urgent" ? "Urgent" : "Moderate"}</span>` : T;
4130
+ function Gs(n) {
4131
+ return n ? x`<span class="flag-pill ${n}">${n === "urgent" ? "Urgent" : "Moderate"}</span>` : U;
4097
4132
  }
4098
- function Ys() {
4099
- return C`
4133
+ function Js() {
4134
+ return x`
4100
4135
  <svg viewBox="0 0 24 24" fill="none" stroke="#FFFFFF" stroke-width="3"
4101
4136
  stroke-linecap="round" stroke-linejoin="round" width="20" height="20"
4102
4137
  aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
4103
4138
  `;
4104
4139
  }
4105
- const Gs = (n = {}) => ({
4140
+ const Zs = (n = {}) => ({
4106
4141
  userPoolId: n.userPoolId || "us-east-1_5Hz6i23GR",
4107
4142
  clientId: n.clientId || "835efrp61536otaeun4ob6iqn",
4108
4143
  region: n.region || "us-east-1",
@@ -4120,7 +4155,7 @@ const Gs = (n = {}) => ({
4120
4155
  } catch {
4121
4156
  return null;
4122
4157
  }
4123
- }, Js = () => {
4158
+ }, Xs = () => {
4124
4159
  const n = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789", e = "!@#$%^&*";
4125
4160
  return [...Array(12)].map(() => n.charAt(Math.floor(Math.random() * n.length))).join("") + "Aa1" + e.charAt(Math.floor(Math.random() * e.length));
4126
4161
  }, Bt = (n) => new AmazonCognitoIdentity.CognitoUserPool({
@@ -4133,7 +4168,7 @@ const Gs = (n = {}) => ({
4133
4168
  idToken: n.getIdToken().getJwtToken(),
4134
4169
  accessToken: n.getAccessToken().getJwtToken(),
4135
4170
  refreshToken: n.getRefreshToken().getToken()
4136
- }), zr = () => ({
4171
+ }), Yr = () => ({
4137
4172
  get: (n) => localStorage.getItem(n),
4138
4173
  set: (n, e) => localStorage.setItem(n, e),
4139
4174
  remove: (n) => localStorage.removeItem(n),
@@ -4142,7 +4177,7 @@ const Gs = (n = {}) => ({
4142
4177
  n.set(N.idToken, e.idToken), n.set(N.accessToken, e.accessToken), n.set(N.refreshToken, e.refreshToken);
4143
4178
  const r = t(e.idToken), i = r?.exp ? (r.exp * 1e3).toString() : (Date.now() + 3600 * 1e3).toString();
4144
4179
  n.set(N.idTokenExpiry, i), n.set(N.userEmail, r?.email || ""), n.set(N.userId, r?.sub || "");
4145
- }, Zs = (n, e, t) => new Promise((r) => {
4180
+ }, Qs = (n, e, t) => new Promise((r) => {
4146
4181
  const i = t();
4147
4182
  e.signUp(
4148
4183
  n,
@@ -4157,27 +4192,27 @@ const Gs = (n = {}) => ({
4157
4192
  r({ exists: !1, result: o });
4158
4193
  }
4159
4194
  );
4160
- }), Xs = async (n, e, t, r, i, s, o, l, h) => {
4195
+ }), eo = async (n, e, t, r, i, s, o, l, h) => {
4161
4196
  const d = e.toLowerCase().trim(), p = r(n);
4162
- await i(d, p, Js);
4197
+ await i(d, p, Xs);
4163
4198
  const m = s(d, p);
4164
- return m.setAuthenticationFlowType("CUSTOM_AUTH"), new Promise((v, y) => {
4199
+ return m.setAuthenticationFlowType("CUSTOM_AUTH"), new Promise((y, v) => {
4165
4200
  m.initiateAuth(new AmazonCognitoIdentity.AuthenticationDetails({
4166
4201
  Username: d
4167
4202
  }), {
4168
4203
  onSuccess: (b) => {
4169
4204
  const _ = o(b);
4170
- l(t, _, h), v({ success: !0, authenticated: !0, cognitoUser: m });
4205
+ l(t, _, h), y({ success: !0, authenticated: !0, cognitoUser: m });
4171
4206
  },
4172
4207
  onFailure: (b) => {
4173
- console.error("[sendCode] initiateAuth failed:", b), y(b);
4208
+ console.error("[sendCode] initiateAuth failed:", b), v(b);
4174
4209
  },
4175
4210
  customChallenge: () => {
4176
- console.log("[sendCode] Custom challenge issued - code sent to email"), v({ success: !0, challengeRequired: !0, cognitoUser: m });
4211
+ console.log("[sendCode] Custom challenge issued - code sent to email"), y({ success: !0, challengeRequired: !0, cognitoUser: m });
4177
4212
  }
4178
4213
  });
4179
4214
  });
4180
- }, Qs = (n, e, t, r, i, s) => new Promise((o, l) => {
4215
+ }, to = (n, e, t, r, i, s) => new Promise((o, l) => {
4181
4216
  n.sendCustomChallengeAnswer(e, {
4182
4217
  onSuccess: (h) => {
4183
4218
  const d = r(h);
@@ -4186,7 +4221,7 @@ const Gs = (n = {}) => ({
4186
4221
  onFailure: l,
4187
4222
  customChallenge: () => l(new Error("Invalid code"))
4188
4223
  });
4189
- }), Wr = async (n, e, t, r, i, s, o) => {
4224
+ }), Gr = async (n, e, t, r, i, s, o) => {
4190
4225
  const l = e.get(N.refreshToken);
4191
4226
  if (!l) return null;
4192
4227
  const h = e.get(N.userEmail);
@@ -4194,18 +4229,18 @@ const Gs = (n = {}) => ({
4194
4229
  const d = t(n), p = r(h, d), m = new AmazonCognitoIdentity.CognitoRefreshToken({
4195
4230
  RefreshToken: l
4196
4231
  });
4197
- return new Promise((v) => {
4198
- p.refreshSession(m, (y, b) => {
4199
- if (y)
4200
- return e.clear(), v(null);
4232
+ return new Promise((y) => {
4233
+ p.refreshSession(m, (v, b) => {
4234
+ if (v)
4235
+ return e.clear(), y(null);
4201
4236
  const _ = i(b);
4202
- s(e, _, o), v(_.accessToken);
4237
+ s(e, _, o), y(_.accessToken);
4203
4238
  });
4204
4239
  });
4205
- }, eo = async (n, e) => {
4240
+ }, ro = async (n, e) => {
4206
4241
  let t = e.get(N.accessToken);
4207
4242
  if (!t) {
4208
- const r = await Wr(
4243
+ const r = await Gr(
4209
4244
  n,
4210
4245
  e,
4211
4246
  Bt,
@@ -4224,11 +4259,11 @@ const Gs = (n = {}) => ({
4224
4259
  };
4225
4260
  let ct = null, _r = null;
4226
4261
  function Ot() {
4227
- return ct || (ct = Gs(window.authConfig || {}), _r = zr()), { config: ct, storage: _r };
4262
+ return ct || (ct = Zs(window.authConfig || {}), _r = Yr()), { config: ct, storage: _r };
4228
4263
  }
4229
- async function Yr() {
4264
+ async function Jr() {
4230
4265
  const { config: n, storage: e } = Ot();
4231
- return Wr(
4266
+ return Gr(
4232
4267
  n,
4233
4268
  e,
4234
4269
  Bt,
@@ -4238,93 +4273,118 @@ async function Yr() {
4238
4273
  Ge
4239
4274
  );
4240
4275
  }
4241
- async function to() {
4276
+ async function no() {
4242
4277
  const { storage: n } = Ot(), e = n.get(N.accessToken), t = n.get(N.idTokenExpiry);
4243
- return e && t && Date.now() < Number(t) ? !0 : !!await Yr();
4278
+ return e && t && Date.now() < Number(t) ? !0 : !!await Jr();
4244
4279
  }
4245
- class Ue extends Error {
4280
+ class ce extends Error {
4246
4281
  constructor(e, t) {
4247
4282
  super(`api-forms request failed with status ${e}`), this.status = e, this.body = t;
4248
4283
  }
4249
4284
  }
4250
- function ro({
4285
+ const Ar = Object.freeze({ enabled: !1, humanCheck: null });
4286
+ function io({
4251
4287
  baseUrl: n,
4252
4288
  fetchFn: e = (...i) => fetch(...i),
4253
4289
  xhrFactory: t = () => new XMLHttpRequest(),
4254
4290
  getAuthHeaders: r
4255
4291
  }) {
4256
4292
  const i = String(n || "").replace(/\/+$/, "");
4257
- async function s(o, { method: l = "GET", body: h, auth: d = !1 } = {}) {
4258
- const p = { Accept: "application/json" };
4259
- d && Object.assign(p, await r()), h !== void 0 && (p["Content-Type"] = "application/json");
4260
- let m;
4293
+ let s = Ar, o = null;
4294
+ async function l(h, { method: d = "GET", body: p, auth: m = !1 } = {}) {
4295
+ const y = { Accept: "application/json" };
4296
+ m && Object.assign(y, o ? { Authorization: `Bearer ${o}` } : await r()), p !== void 0 && (y["Content-Type"] = "application/json");
4297
+ let v;
4261
4298
  try {
4262
- m = await e(`${i}${o}`, {
4263
- method: l,
4264
- headers: p,
4265
- ...h !== void 0 ? { body: JSON.stringify(h) } : {}
4299
+ v = await e(`${i}${h}`, {
4300
+ method: d,
4301
+ headers: y,
4302
+ ...p !== void 0 ? { body: JSON.stringify(p) } : {}
4266
4303
  });
4267
- } catch (y) {
4268
- throw Object.assign(new Ue(0, null), { cause: y });
4304
+ } catch (_) {
4305
+ throw Object.assign(new ce(0, null), { cause: _ });
4269
4306
  }
4270
- let v = null;
4307
+ let b = null;
4271
4308
  try {
4272
- v = await m.json();
4309
+ b = await v.json();
4273
4310
  } catch {
4274
4311
  }
4275
- if (!m.ok)
4276
- throw new Ue(m.status, v);
4277
- return v;
4312
+ if (!v.ok)
4313
+ throw new ce(v.status, b);
4314
+ return b;
4278
4315
  }
4279
4316
  return {
4280
4317
  /** @returns {Promise<Array>} published form documents */
4281
4318
  listForms: async () => {
4282
- const { forms: o } = await s("/v1/forms");
4283
- return (o || []).filter((l) => l?.formId && l?.start && Array.isArray(l?.nodes));
4319
+ const h = await l("/v1/forms");
4320
+ return s = h?.anonymous?.enabled === !0 ? { enabled: !0, humanCheck: h.anonymous.humanCheck || null } : Ar, (h?.forms || []).filter((d) => d?.formId && d?.start && Array.isArray(d?.nodes));
4321
+ },
4322
+ /**
4323
+ * What the server advertised on the last listForms.
4324
+ * @returns {{enabled: boolean, humanCheck: {provider, siteKey}|null}}
4325
+ */
4326
+ anonymousCapability: () => s,
4327
+ /**
4328
+ * Mint a submission-scoped anonymous session; subsequent auth-bearing
4329
+ * calls present it until endAnonSession(). Unauthenticated by design.
4330
+ * @returns {Promise<{expiresIn: number}>}
4331
+ */
4332
+ createAnonSession: async ({ formId: h, requestId: d, humanToken: p }) => {
4333
+ const m = await l("/v1/anon/sessions", {
4334
+ method: "POST",
4335
+ body: { formId: h, requestId: d, ...p ? { humanToken: p } : {} }
4336
+ });
4337
+ if (o = m?.token || null, !o)
4338
+ throw new ce(502, { message: "The anonymous session had no token" });
4339
+ return { expiresIn: m.expiresIn };
4340
+ },
4341
+ /** Drop the anonymous session so identity headers apply again. */
4342
+ endAnonSession: () => {
4343
+ o = null;
4284
4344
  },
4285
4345
  /** @returns {Promise<Array<{assetId,url,method,expires,assetUrl}>>} */
4286
- createUploads: async (o) => {
4287
- const { uploads: l } = await s("/v1/uploads", { method: "POST", body: o, auth: !0 });
4288
- return l || [];
4346
+ createUploads: async (h) => {
4347
+ const { uploads: d } = await l("/v1/uploads", { method: "POST", body: h, auth: !0 });
4348
+ return d || [];
4289
4349
  },
4290
4350
  /**
4291
4351
  * PUT one file to its presigned URL. XHR (not fetch) so upload
4292
4352
  * progress is observable. Resolves on 2xx; rejects with
4293
4353
  * ApiError(status) otherwise. Returns { promise, abort }.
4294
4354
  */
4295
- uploadFile: ({ url: o, file: l, contentType: h, onProgress: d = () => {
4355
+ uploadFile: ({ url: h, file: d, contentType: p, onProgress: m = () => {
4296
4356
  } }) => {
4297
- const p = t();
4298
- return { promise: new Promise((v, y) => {
4299
- p.open("PUT", o), p.setRequestHeader("Content-Type", h || l.type), p.upload && (p.upload.onprogress = (b) => {
4300
- d({ loaded: b.loaded, total: b.total || l.size });
4301
- }), p.onload = () => {
4302
- p.status >= 200 && p.status < 300 ? v({ status: p.status }) : y(new Ue(p.status, null));
4303
- }, p.onerror = () => y(new Ue(0, null)), p.onabort = () => y(new Ue(0, { aborted: !0 })), p.send(l);
4304
- }), abort: () => p.abort() };
4357
+ const y = t();
4358
+ return { promise: new Promise((b, _) => {
4359
+ y.open("PUT", h), y.setRequestHeader("Content-Type", p || d.type), y.upload && (y.upload.onprogress = (C) => {
4360
+ m({ loaded: C.loaded, total: C.total || d.size });
4361
+ }), y.onload = () => {
4362
+ y.status >= 200 && y.status < 300 ? b({ status: y.status }) : _(new ce(y.status, null));
4363
+ }, y.onerror = () => _(new ce(0, null)), y.onabort = () => _(new ce(0, { aborted: !0 })), y.send(d);
4364
+ }), abort: () => y.abort() };
4305
4365
  },
4306
4366
  /** @returns {Promise<{requestId,reference,confirmation,routing}>} */
4307
- putRequest: async (o, l) => await s(`/v1/requests/${o}`, { method: "PUT", body: l, auth: !0 })
4367
+ putRequest: async (h, d) => await l(`/v1/requests/${h}`, { method: "PUT", body: d, auth: !0 })
4308
4368
  };
4309
4369
  }
4310
- function no() {
4370
+ function so() {
4311
4371
  const { config: n, storage: e } = Ot();
4312
4372
  let t = null;
4313
4373
  return {
4314
- isAuthenticated: () => to(),
4374
+ isAuthenticated: () => no(),
4315
4375
  signedInEmail: () => e.get(N.userEmail) || null,
4316
- getAuthHeaders: () => eo(n, e),
4376
+ getAuthHeaders: () => ro(n, e),
4317
4377
  /**
4318
4378
  * Email step. Keeps the challenge user in memory for verifyCode.
4319
4379
  * @returns {{challengeRequired?: boolean, authenticated?: boolean}}
4320
4380
  */
4321
4381
  sendCode: async (r) => {
4322
- const i = await Xs(
4382
+ const i = await eo(
4323
4383
  n,
4324
4384
  r,
4325
4385
  e,
4326
4386
  Bt,
4327
- Zs,
4387
+ Qs,
4328
4388
  Mt,
4329
4389
  Je,
4330
4390
  Ze,
@@ -4343,7 +4403,7 @@ function no() {
4343
4403
  if (!t)
4344
4404
  throw new Error("Please enter your email again to get a new code.");
4345
4405
  try {
4346
- await Qs(
4406
+ await to(
4347
4407
  t,
4348
4408
  r,
4349
4409
  e,
@@ -4354,11 +4414,11 @@ function no() {
4354
4414
  } catch {
4355
4415
  throw new Error("Invalid or expired code. Please request a new one and try again.");
4356
4416
  }
4357
- return await Yr(), { success: !0 };
4417
+ return await Jr(), { success: !0 };
4358
4418
  },
4359
4419
  /** Local sign-out only ("use a different email"). */
4360
4420
  signOut: () => {
4361
- t = null, zr().clear();
4421
+ t = null, Yr().clear();
4362
4422
  },
4363
4423
  /**
4364
4424
  * Detect a login completed in ANOTHER tab (the storage event
@@ -4372,14 +4432,14 @@ function no() {
4372
4432
  }
4373
4433
  };
4374
4434
  }
4375
- function io({ baseUrl: n }) {
4376
- const e = no();
4377
- return { ...ro({ baseUrl: n, getAuthHeaders: e.getAuthHeaders }), ...e };
4435
+ function oo({ baseUrl: n }) {
4436
+ const e = so();
4437
+ return { ...io({ baseUrl: n, getAuthHeaders: e.getAuthHeaders }), ...e };
4378
4438
  }
4379
4439
  function ae(n, e) {
4380
4440
  return (n?.nodes || []).find((t) => t.id === e);
4381
4441
  }
4382
- function Gr(n, e = []) {
4442
+ function Zr(n, e = []) {
4383
4443
  const t = [];
4384
4444
  let r = n?.start;
4385
4445
  for (const s of e) {
@@ -4400,9 +4460,9 @@ function Gr(n, e = []) {
4400
4460
  r = o.next;
4401
4461
  }
4402
4462
  const i = ae(n, r);
4403
- return i ? { nodeId: r, node: i, flags: Zr(t), error: null } : { nodeId: null, node: null, flags: t, error: { step: null, reason: `unknown node: ${r}` } };
4463
+ return i ? { nodeId: r, node: i, flags: Qr(t), error: null } : { nodeId: null, node: null, flags: t, error: { step: null, reason: `unknown node: ${r}` } };
4404
4464
  }
4405
- function so(n, e = []) {
4465
+ function ao(n, e = []) {
4406
4466
  const t = [];
4407
4467
  for (const r of e) {
4408
4468
  if (r.kind !== "collect") continue;
@@ -4411,46 +4471,46 @@ function so(n, e = []) {
4411
4471
  }
4412
4472
  return t;
4413
4473
  }
4414
- function oo(n = []) {
4474
+ function uo(n = []) {
4415
4475
  const e = {};
4416
4476
  for (const t of n)
4417
4477
  t.kind === "collect" && Object.assign(e, t.values || {});
4418
4478
  return e;
4419
4479
  }
4420
- function ao(n = []) {
4480
+ function lo(n = []) {
4421
4481
  return n.filter((e) => e.kind === "choice").map((e) => `${e.nodeId}:${e.optionId}`);
4422
4482
  }
4423
- function Jr(n, e = []) {
4483
+ function Xr(n, e = []) {
4424
4484
  const t = [];
4425
4485
  for (const r of e) {
4426
4486
  if (r.kind !== "choice") continue;
4427
4487
  const s = (ae(n, r.nodeId)?.options || []).find((o) => o.id === r.optionId);
4428
4488
  t.push(...s?.flags || []);
4429
4489
  }
4430
- return Zr(t);
4490
+ return Qr(t);
4431
4491
  }
4432
- function uo(n = []) {
4492
+ function co(n = []) {
4433
4493
  return n.includes("urgent") ? "urgent" : n.includes("moderate") ? "moderate" : null;
4434
4494
  }
4435
- function Zr(n) {
4495
+ function Qr(n) {
4436
4496
  return [...new Set(n)];
4437
4497
  }
4438
- const lo = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/, Ar = {
4498
+ const ho = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/, xr = {
4439
4499
  text: 500,
4440
4500
  textarea: 5e3,
4441
4501
  url: 2048
4442
4502
  };
4443
- function co(n, e) {
4444
- if (e == null || e === "" || n.kind === "location" && ho(e))
4503
+ function fo(n, e) {
4504
+ if (e == null || e === "" || n.kind === "location" && po(e))
4445
4505
  return n.required ? `Please fill in: ${n.label.toLowerCase()}.` : null;
4446
4506
  switch (n.kind) {
4447
4507
  case "text":
4448
4508
  case "textarea": {
4449
- const r = n.maxLength || Ar[n.kind];
4509
+ const r = n.maxLength || xr[n.kind];
4450
4510
  return typeof e != "string" ? `Please enter text for ${n.label.toLowerCase()}.` : e.length > r ? `Please keep ${n.label.toLowerCase()} under ${r} characters.` : null;
4451
4511
  }
4452
4512
  case "url": {
4453
- if (typeof e != "string" || e.length > Ar.url)
4513
+ if (typeof e != "string" || e.length > xr.url)
4454
4514
  return "Please enter a valid link.";
4455
4515
  try {
4456
4516
  return new URL(e), null;
@@ -4459,30 +4519,30 @@ function co(n, e) {
4459
4519
  }
4460
4520
  }
4461
4521
  case "datetime":
4462
- return lo.test(String(e)) ? null : "Please pick a date and time.";
4522
+ return ho.test(String(e)) ? null : "Please pick a date and time.";
4463
4523
  case "select":
4464
4524
  return (n.options || []).map((i) => i.id).includes(e) ? null : `Please choose one of the options for ${n.label.toLowerCase()}.`;
4465
4525
  case "consent":
4466
4526
  return e === !0 ? null : "Please confirm the rights statement so we can use what you send.";
4467
4527
  case "location":
4468
- return fo(n, e);
4528
+ return go(n, e);
4469
4529
  case "media":
4470
4530
  return null;
4471
4531
  default:
4472
4532
  return `Unsupported field: ${n.kind}`;
4473
4533
  }
4474
4534
  }
4475
- function ho(n) {
4535
+ function po(n) {
4476
4536
  return n == null ? !0 : typeof n != "object" ? !1 : !n.county && !n.where && !(Array.isArray(n.gps) && n.gps.length);
4477
4537
  }
4478
- function fo(n, e) {
4538
+ function go(n, e) {
4479
4539
  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;
4480
4540
  }
4481
4541
  function Cr(n, e = {}) {
4482
4542
  const t = {};
4483
4543
  for (const r of n) {
4484
4544
  if (r.kind === "media") continue;
4485
- const i = co(r, e[r.key]);
4545
+ const i = fo(r, e[r.key]);
4486
4546
  i && (t[r.key] = i);
4487
4547
  }
4488
4548
  return { ok: Object.keys(t).length === 0, errors: t };
@@ -4508,15 +4568,15 @@ function Et(n = [], e = {}, { required: t = !1 } = {}) {
4508
4568
  });
4509
4569
  }), { ok: o.length === 0, errors: o };
4510
4570
  }
4511
- function xr({ formId: n, requestId: e, files: t }) {
4571
+ function Er({ formId: n, requestId: e, files: t }) {
4512
4572
  return {
4513
4573
  formId: n,
4514
4574
  requestId: e,
4515
4575
  files: t.map((r) => ({ contentType: r.type, size: r.size }))
4516
4576
  };
4517
4577
  }
4518
- function po({ form: n, steps: e, media: t = [] }) {
4519
- const r = so(n, e), i = oo(e), s = {};
4578
+ function mo({ form: n, steps: e, media: t = [] }) {
4579
+ const r = ao(n, e), i = uo(e), s = {};
4520
4580
  for (const o of r) {
4521
4581
  if (o.kind === "media") continue;
4522
4582
  const l = i[o.key];
@@ -4532,12 +4592,12 @@ function po({ form: n, steps: e, media: t = [] }) {
4532
4592
  return {
4533
4593
  formId: n.formId,
4534
4594
  flowVersion: n.flowVersion,
4535
- path: ao(e),
4595
+ path: lo(e),
4536
4596
  answers: s,
4537
4597
  media: t.map(({ assetId: o, type: l }) => ({ assetId: o, type: l }))
4538
4598
  };
4539
4599
  }
4540
- function go(n, e) {
4600
+ function Ur(n, e) {
4541
4601
  if (n === 429)
4542
4602
  return {
4543
4603
  kind: "throttled",
@@ -4575,15 +4635,15 @@ function go(n, e) {
4575
4635
  message: "Something went wrong on our end; please try again."
4576
4636
  };
4577
4637
  }
4578
- const mo = 34, vo = 44;
4579
- function Er(n, e) {
4638
+ const yo = 34, vo = 44;
4639
+ function Tr(n, e) {
4580
4640
  const t = String(n);
4581
4641
  return t.length > e ? `${t.slice(0, e)}…` : t;
4582
4642
  }
4583
- function yo(n) {
4643
+ function wo(n) {
4584
4644
  return !n || typeof n != "object" ? "" : [n.county, n.where].filter(Boolean).join(", ");
4585
4645
  }
4586
- function wo(n, e = {}, t = []) {
4646
+ function bo(n, e = {}, t = []) {
4587
4647
  const r = [];
4588
4648
  for (const i of n) {
4589
4649
  if (i.kind === "consent") continue;
@@ -4591,21 +4651,21 @@ function wo(n, e = {}, t = []) {
4591
4651
  t.length && r.push(`${t.length} ${t.length === 1 ? "file" : "files"}`);
4592
4652
  continue;
4593
4653
  }
4594
- const s = i.kind === "location" ? yo(e[i.key]) : e[i.key];
4595
- s == null || s === "" || (i.kind === "textarea" ? r.push(`"${Er(s, vo)}"`) : r.push(Er(s, mo)));
4654
+ const s = i.kind === "location" ? wo(e[i.key]) : e[i.key];
4655
+ s == null || s === "" || (i.kind === "textarea" ? r.push(`"${Tr(s, vo)}"`) : r.push(Tr(s, yo)));
4596
4656
  }
4597
4657
  return r.join(" · ") || "Details provided";
4598
4658
  }
4599
- function bo(n, e = [], t = null) {
4659
+ function So(n, e = [], t = null) {
4600
4660
  const r = [];
4601
4661
  for (const s of e) {
4602
4662
  const o = ae(n, s.nodeId);
4603
- 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.email || t) && r.push({ k: "Verified email", v: s.email || t });
4663
+ 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 }));
4604
4664
  }
4605
- const i = uo(Jr(n, e));
4665
+ const i = co(Xr(n, e));
4606
4666
  return i && r.push({ k: "Priority", v: i === "urgent" ? "Urgent" : "Moderate", pill: i }), r;
4607
4667
  }
4608
- function So(n, e = []) {
4668
+ function _o(n, e = []) {
4609
4669
  const t = n?.confirmation || {};
4610
4670
  return {
4611
4671
  title: t.title || "Report received.",
@@ -4613,12 +4673,12 @@ function So(n, e = []) {
4613
4673
  urgentNote: e.includes("urgent") ? t.urgentNote : void 0
4614
4674
  };
4615
4675
  }
4616
- function _o(n, e) {
4676
+ function Ao(n, e) {
4617
4677
  const t = e === "failed" ? " The notification is queued for a delivery retry." : "";
4618
4678
  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.";
4619
4679
  }
4620
- function Ao({ routing: n = {}, flags: e = [], reference: t = "" }) {
4621
- const r = e.includes("urgent");
4680
+ function xo({ routing: n = {}, flags: e = [], reference: t = "", anonymous: r = !1 }) {
4681
+ const i = e.includes("urgent");
4622
4682
  return [
4623
4683
  {
4624
4684
  title: "Received",
@@ -4626,12 +4686,12 @@ function Ao({ routing: n = {}, flags: e = [], reference: t = "" }) {
4626
4686
  },
4627
4687
  {
4628
4688
  title: "Routed",
4629
- body: _o(n.destination, n.state),
4630
- pill: r ? "Urgent · pinned first" : void 0
4689
+ body: Ao(n.destination, n.state),
4690
+ pill: i ? "Urgent · pinned first" : void 0
4631
4691
  },
4632
4692
  {
4633
4693
  title: "Reviewed",
4634
- body: "An editor reviews it in the Report It queue: accept and promote with your credit, reject, or re-route."
4694
+ body: r ? "An editor reviews it in the Report It queue: accept and promote it uncredited, reject, or re-route." : "An editor reviews it in the Report It queue: accept and promote with your credit, reject, or re-route."
4635
4695
  },
4636
4696
  {
4637
4697
  title: "Monitored",
@@ -4643,30 +4703,30 @@ function Ao({ routing: n = {}, flags: e = [], reference: t = "" }) {
4643
4703
  }
4644
4704
  ];
4645
4705
  }
4646
- const Nt = "wral-report-it:draft:v1", Xr = 1;
4706
+ const Nt = "wral-report-it:draft:v1", en = 1;
4647
4707
  function Co(n, e) {
4648
4708
  try {
4649
- n.setItem(Nt, JSON.stringify({ ...e, v: Xr, savedAt: Date.now() }));
4709
+ n.setItem(Nt, JSON.stringify({ ...e, v: en, savedAt: Date.now() }));
4650
4710
  } catch {
4651
4711
  }
4652
4712
  }
4653
- function xo(n) {
4713
+ function Eo(n) {
4654
4714
  try {
4655
4715
  const e = n.getItem(Nt);
4656
4716
  if (!e) return null;
4657
4717
  const t = JSON.parse(e);
4658
- return t?.v !== Xr ? null : t;
4718
+ return t?.v !== en ? null : t;
4659
4719
  } catch {
4660
4720
  return null;
4661
4721
  }
4662
4722
  }
4663
- function Ur(n) {
4723
+ function Ir(n) {
4664
4724
  try {
4665
4725
  n.removeItem(Nt);
4666
4726
  } catch {
4667
4727
  }
4668
4728
  }
4669
- function Eo({ apiOrigin: n, form: e, steps: t, requestId: r = null, mediaMeta: i = {} }) {
4729
+ function Uo({ apiOrigin: n, form: e, steps: t, requestId: r = null, mediaMeta: i = {} }) {
4670
4730
  return {
4671
4731
  apiOrigin: n,
4672
4732
  formId: e.formId,
@@ -4676,13 +4736,13 @@ function Eo({ apiOrigin: n, form: e, steps: t, requestId: r = null, mediaMeta: i
4676
4736
  media: i
4677
4737
  };
4678
4738
  }
4679
- function Uo(n, e, { apiOrigin: t } = {}) {
4739
+ function To(n, e, { apiOrigin: t } = {}) {
4680
4740
  if (!n) return { status: "discarded" };
4681
4741
  if (t && n.apiOrigin && n.apiOrigin !== t)
4682
4742
  return { status: "discarded" };
4683
4743
  const r = (e || []).find((o) => o.formId === n.formId);
4684
4744
  if (!r) return { status: "discarded" };
4685
- const { error: i } = Gr(r, n.steps || []);
4745
+ const { error: i } = Zr(r, n.steps || []);
4686
4746
  if (i) return { status: "discarded" };
4687
4747
  const s = {};
4688
4748
  for (const [o, l] of Object.entries(n.media || {}))
@@ -4715,7 +4775,7 @@ function We(n = []) {
4715
4775
  error: null
4716
4776
  };
4717
4777
  }
4718
- function To(n, e) {
4778
+ function Io(n, e) {
4719
4779
  switch (e.type) {
4720
4780
  case "START":
4721
4781
  return { ...n, stage: n.files.length ? "minting" : "requesting", error: null };
@@ -4742,7 +4802,7 @@ function To(n, e) {
4742
4802
  }));
4743
4803
  case "FILE_DONE": {
4744
4804
  const t = Te(n, e.i, (r) => ({ ...r, status: "done", progress: 1 }));
4745
- return Io(t);
4805
+ return Do(t);
4746
4806
  }
4747
4807
  case "FILE_FAIL":
4748
4808
  return { ...Te(n, e.i, (r) => ({
@@ -4783,14 +4843,14 @@ function Te(n, e, t) {
4783
4843
  const r = n.files.map((i, s) => s === e ? t(i) : i);
4784
4844
  return { ...n, files: r };
4785
4845
  }
4786
- function Io(n) {
4846
+ function Do(n) {
4787
4847
  const e = n.files.every((r) => r.status === "done"), t = n.files.some((r) => r.status === "failed");
4788
4848
  return e ? { ...n, stage: "requesting" } : t ? { ...n, stage: "uploading-error" } : n;
4789
4849
  }
4790
- function Tr(n) {
4850
+ function Dr(n) {
4791
4851
  return n.files.map((e, t) => ({ ...e, i: t })).filter((e) => e.status === "failed");
4792
4852
  }
4793
- const Do = [
4853
+ const ko = [
4794
4854
  "Wake",
4795
4855
  "Durham",
4796
4856
  "Orange",
@@ -4807,14 +4867,18 @@ const Do = [
4807
4867
  "Moore",
4808
4868
  "Sampson",
4809
4869
  "Other / outside the area"
4810
- ], Ir = "(919) 821-8600", Ro = "https://www.wral.com/my-wral/";
4811
- function ko(n) {
4870
+ ], kr = "(919) 821-8600", Ro = "https://www.wral.com/my-wral/", $o = Object.freeze([
4871
+ "We cannot come back to you for the detail that often turns a tip into a story.",
4872
+ "We cannot credit you if we use your photos or video.",
4873
+ "If you lose your reference number, we cannot look it up for you."
4874
+ ]);
4875
+ function Po(n) {
4812
4876
  const e = String(n).replace(/\D/g, "");
4813
4877
  return `tel:+1${e.length === 11 && e.startsWith("1") ? e.slice(1) : e}`;
4814
4878
  }
4815
- const $o = "https://api.wral.com/forms", Po = 480, Fo = 2;
4816
- class Bo extends se {
4817
- static styles = zs;
4879
+ const Fo = "https://api.wral.com/forms", Bo = 480, Mo = 2;
4880
+ class Oo extends se {
4881
+ static styles = Ys;
4818
4882
  static properties = {
4819
4883
  api: { type: String },
4820
4884
  _phase: { state: !0 },
@@ -4830,34 +4894,35 @@ class Bo extends se {
4830
4894
  _notice: { state: !0 },
4831
4895
  _result: { state: !0 }
4832
4896
  };
4833
- #a = null;
4834
- #s = null;
4897
+ #u = null;
4898
+ #o = null;
4835
4899
  #h = null;
4836
4900
  #t = null;
4837
4901
  #r = {};
4838
4902
  #n = {};
4839
4903
  #i = /* @__PURE__ */ new Map();
4840
- #g = null;
4841
- #m = !1;
4842
- #u = null;
4904
+ #y = null;
4905
+ #v = !1;
4906
+ #l = null;
4907
+ #C = 0;
4843
4908
  constructor() {
4844
- super(), this.api = $o, this._phase = "loading", this._forms = [], this._form = null, this._steps = [], this._typing = !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;
4909
+ super(), this.api = Fo, this._phase = "loading", this._forms = [], this._form = null, this._steps = [], this._typing = !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;
4845
4910
  }
4846
4911
  get client() {
4847
- return this.#a ? this.#a : ((!this.#s || this.#h !== this.api) && (this.#s = io({ baseUrl: this.api }), this.#h = this.api), this.#s);
4912
+ return this.#u ? this.#u : ((!this.#o || this.#h !== this.api) && (this.#o = oo({ baseUrl: this.api }), this.#h = this.api), this.#o);
4848
4913
  }
4849
4914
  set client(e) {
4850
- this.#a = e || null, this.isConnected && this.#v();
4915
+ this.#u = e || null, this.isConnected && this.#w();
4851
4916
  }
4852
4917
  connectedCallback() {
4853
- super.connectedCallback(), this.#v();
4918
+ super.connectedCallback(), this.#w();
4854
4919
  }
4855
4920
  disconnectedCallback() {
4856
- super.disconnectedCallback(), clearTimeout(this.#g), this.#u?.();
4921
+ super.disconnectedCallback(), clearTimeout(this.#y), this.#l?.();
4857
4922
  for (const { abort: e } of this.#i.values()) e?.();
4858
4923
  this.#i.clear();
4859
4924
  }
4860
- get #D() {
4925
+ get #$() {
4861
4926
  try {
4862
4927
  return matchMedia("(prefers-reduced-motion: reduce)").matches;
4863
4928
  } catch {
@@ -4873,28 +4938,45 @@ class Bo extends se {
4873
4938
  } };
4874
4939
  }
4875
4940
  }
4941
+ /*
4942
+ * The anonymous route is offered only where it can actually complete.
4943
+ * The server is the authority: GET /v1/forms says whether anonymous
4944
+ * submission is enabled on this deployment, and a form whose desk needs
4945
+ * a way to reach the viewer opts out with allowAnonymous: false.
4946
+ */
4947
+ get #P() {
4948
+ return this.client.anonymousCapability?.().enabled === !0 && this._form?.allowAnonymous !== !1;
4949
+ }
4950
+ /* Derived from the gate step, so a reload restores the choice. */
4951
+ get #d() {
4952
+ return this._steps.some((e) => e.kind === "gate" && e.anonymous === !0);
4953
+ }
4876
4954
  // ── Loading + draft restore ─────────────────────────────────────
4877
- async #v() {
4955
+ async #w() {
4956
+ const e = ++this.#C, t = () => e === this.#C;
4878
4957
  this._phase = "loading", this._banner = null;
4958
+ let r;
4879
4959
  try {
4880
- this._forms = await this.client.listForms();
4960
+ r = await this.client.listForms();
4881
4961
  } catch {
4882
- this._phase = "load-error";
4962
+ t() && (this._phase = "load-error");
4883
4963
  return;
4884
4964
  }
4885
- const e = Uo(xo(this.#f), this._forms, { apiOrigin: this.api });
4886
- if (e.status === "ok" || e.status === "review-required") {
4887
- this._form = e.form, this._steps = e.steps, this.#t = e.requestId, this.#n = e.lostMedia || {}, e.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.#o({ animate: !1 });
4965
+ if (!t()) return;
4966
+ this._forms = r;
4967
+ const i = To(Eo(this.#f), this._forms, { apiOrigin: this.api });
4968
+ if (i.status === "ok" || i.status === "review-required") {
4969
+ 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 });
4888
4970
  return;
4889
4971
  }
4890
4972
  this._phase = "pick";
4891
4973
  }
4892
- #l() {
4974
+ #c() {
4893
4975
  if (!this._form) return;
4894
4976
  const e = {};
4895
4977
  for (const [t, r] of Object.entries(this.#r))
4896
4978
  r.length && (e[t] = r.map(({ name: i, type: s, size: o }) => ({ name: i, type: s, size: o })));
4897
- Co(this.#f, Eo({
4979
+ Co(this.#f, Uo({
4898
4980
  apiOrigin: this.api,
4899
4981
  form: this._form,
4900
4982
  steps: this._steps,
@@ -4903,41 +4985,41 @@ class Bo extends se {
4903
4985
  }));
4904
4986
  }
4905
4987
  // ── Walk mechanics ──────────────────────────────────────────────
4906
- #o({ animate: e = !0 } = {}) {
4907
- this._phase = "walk", this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, e && !this.#D ? (this._typing = !0, clearTimeout(this.#g), this.#g = setTimeout(() => {
4988
+ #a({ animate: e = !0 } = {}) {
4989
+ this._phase = "walk", this._cardValues = {}, this._fieldErrors = {}, this._gate = { stage: null, email: "", error: "", loading: !1 }, e && !this.#$ ? (this._typing = !0, clearTimeout(this.#y), this.#y = setTimeout(() => {
4908
4990
  this._typing = !1;
4909
- }, Po)) : this._typing = !1;
4991
+ }, Bo)) : this._typing = !1;
4910
4992
  }
4911
- get #A() {
4912
- return this._form ? Gr(this._form, this._steps) : { node: null };
4993
+ get #b() {
4994
+ return this._form ? Zr(this._form, this._steps) : { node: null };
4913
4995
  }
4914
- #R(e) {
4915
- this._form = e, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._notice = null, this.#l(), this.#o();
4996
+ #F(e) {
4997
+ this._form = e, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._notice = null, this.#c(), this.#a();
4916
4998
  }
4917
- #y(e) {
4918
- this._steps = [...this._steps, e], this.#l(), this.#o();
4999
+ #p(e) {
5000
+ this._steps = [...this._steps, e], this.#c(), this.#a();
4919
5001
  }
4920
- #k() {
5002
+ #B() {
4921
5003
  if (this._phase === "done" || this._phase === "submitting") return;
4922
5004
  if (this._phase === "review") {
4923
- this.#o({ animate: !1 });
5005
+ this.#a({ animate: !1 });
4924
5006
  return;
4925
5007
  }
4926
5008
  if (!this._steps.length) {
4927
- this.#w();
5009
+ this.#S();
4928
5010
  return;
4929
5011
  }
4930
5012
  const e = this._steps.at(-1);
4931
- this._steps = this._steps.slice(0, -1), e.kind === "collect" && (this._cardValues = { ...e.values }), this.#l(), this.#o({ animate: !1 });
5013
+ this._steps = this._steps.slice(0, -1), e.kind === "collect" && (this._cardValues = { ...e.values }), this.#c(), this.#a({ animate: !1 });
4932
5014
  }
4933
- #w() {
4934
- this._form = null, this._steps = [], this.#t = null, this.#r = {}, this.#n = {}, this._result = null, this._banner = null, this._notice = null, this._submit = We([]), Ur(this.#f), this._phase = "pick";
5015
+ #S() {
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([]), Ir(this.#f), this._phase = "pick";
4935
5017
  }
4936
5018
  // ── Collect card ────────────────────────────────────────────────
4937
- #b(e, t) {
5019
+ #_(e, t) {
4938
5020
  this._cardValues = { ...this._cardValues, [e]: t };
4939
5021
  }
4940
- #$(e) {
5022
+ #M(e) {
4941
5023
  const t = e.fields || [], { ok: r, errors: i } = Cr(t, this._cardValues), s = t.find((h) => h.kind === "media");
4942
5024
  let o = !0;
4943
5025
  if (s) {
@@ -4951,29 +5033,29 @@ class Bo extends se {
4951
5033
  return;
4952
5034
  }
4953
5035
  const l = this.#r[e.id] || [];
4954
- this.#y({
5036
+ this.#p({
4955
5037
  nodeId: e.id,
4956
5038
  kind: "collect",
4957
5039
  values: { ...this._cardValues },
4958
- summary: wo(t, this._cardValues, l)
5040
+ summary: bo(t, this._cardValues, l)
4959
5041
  });
4960
5042
  }
4961
5043
  // ── Gate ────────────────────────────────────────────────────────
4962
- async #C() {
4963
- if (!(this._gate.stage || this.#m)) {
4964
- this.#m = !0;
5044
+ async #E() {
5045
+ if (!(this._gate.stage || this.#v)) {
5046
+ this.#v = !0;
4965
5047
  try {
4966
5048
  const e = await this.client.isAuthenticated();
4967
5049
  this._gate = e ? { stage: "signedin", email: this.client.signedInEmail?.() || "", error: "", loading: !1 } : { stage: "email", email: "", error: "", loading: !1 };
4968
5050
  } finally {
4969
- this.#m = !1;
5051
+ this.#v = !1;
4970
5052
  }
4971
- this._gate.stage === "email" && this.client.onCrossTabLogin && !this.#u && (this.#u = this.client.onCrossTabLogin(() => {
4972
- this.#u?.(), this.#u = null, this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#C();
5053
+ 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.#E();
4973
5055
  }));
4974
5056
  }
4975
5057
  }
4976
- async #S() {
5058
+ async #A() {
4977
5059
  const e = this._gate.email.trim();
4978
5060
  if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
4979
5061
  this._gate = { ...this._gate, error: "Please enter a valid email address." };
@@ -4991,10 +5073,10 @@ class Bo extends se {
4991
5073
  };
4992
5074
  }
4993
5075
  }
4994
- async #x(e) {
5076
+ async #U(e) {
4995
5077
  this._gate = { ...this._gate, error: "", loading: !0 };
4996
5078
  try {
4997
- await this.client.verifyCode(e), this.#E(this._gate.email);
5079
+ await this.client.verifyCode(e), this.#T(this._gate.email);
4998
5080
  } catch (t) {
4999
5081
  this._gate = {
5000
5082
  ...this._gate,
@@ -5003,19 +5085,53 @@ class Bo extends se {
5003
5085
  };
5004
5086
  }
5005
5087
  }
5006
- #E(e) {
5088
+ #T(e) {
5007
5089
  if (this._gate = { stage: null, email: "", error: "", loading: !1 }, this._submit.stage === "auth") {
5008
- this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#c();
5090
+ this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#s();
5009
5091
  return;
5010
5092
  }
5011
- const { node: t } = this.#A;
5012
- t?.type === "gate" && this.#y({ nodeId: t.id, kind: "gate", email: e });
5093
+ const { node: t } = this.#b;
5094
+ t?.type === "gate" && this.#p({ nodeId: t.id, kind: "gate", email: e });
5013
5095
  }
5014
- #P() {
5096
+ #O() {
5015
5097
  this.client.signOut?.(), this._gate = { stage: "email", email: "", error: "", loading: !1 };
5016
5098
  }
5099
+ // ── Anonymous route ─────────────────────────────────────────────
5100
+ #N() {
5101
+ this._gate = { ...this._gate, stage: "anon-confirm", error: "" };
5102
+ }
5103
+ #q() {
5104
+ this._gate = { ...this._gate, stage: "email", error: "" };
5105
+ }
5106
+ /*
5107
+ * Records the choice only. The session is minted at submit, against
5108
+ * the requestId, so an abandoned form leaves nothing behind.
5109
+ */
5110
+ #L() {
5111
+ const { node: e } = this.#b;
5112
+ e?.type === "gate" && (this._gate = { stage: null, email: "", error: "", loading: !1 }, this.#p({ nodeId: e.id, kind: "gate", anonymous: !0 }));
5113
+ }
5114
+ async #I() {
5115
+ try {
5116
+ return await this.client.createAnonSession({
5117
+ formId: this._form.formId,
5118
+ requestId: this.#t
5119
+ }), !0;
5120
+ } catch (e) {
5121
+ return this._banner = Ur(e?.status ?? 0, e?.body ?? null), !1;
5122
+ }
5123
+ }
5124
+ /* An anonymous session outliving the upload run re-mints in place; there
5125
+ * is no identity to send back to the sign-in card. */
5126
+ async #K() {
5127
+ if (await this.#I()) {
5128
+ this.#e({ type: "AUTH_OK" }), this._phase = "submitting", this.#s();
5129
+ return;
5130
+ }
5131
+ this.#e({ type: "REQUEST_FAIL", error: this._banner });
5132
+ }
5017
5133
  // ── Submit pipeline ─────────────────────────────────────────────
5018
- get #d() {
5134
+ get #g() {
5019
5135
  const e = [];
5020
5136
  for (const t of this._steps)
5021
5137
  if (t.kind === "collect")
@@ -5024,9 +5140,9 @@ class Bo extends se {
5024
5140
  return e;
5025
5141
  }
5026
5142
  #e(e) {
5027
- this._submit = To(this._submit, e);
5143
+ this._submit = Io(this._submit, e);
5028
5144
  }
5029
- async #F() {
5145
+ async #j() {
5030
5146
  this._banner = null;
5031
5147
  for (let e = 0; e < this._steps.length; e++) {
5032
5148
  const t = this._steps[e];
@@ -5040,42 +5156,50 @@ class Bo extends se {
5040
5156
  d.ok || (l = !1, s[o.key] = d.errors[0].message);
5041
5157
  }
5042
5158
  if (!i || !l) {
5043
- this._steps = this._steps.slice(0, e), this._cardValues = { ...t.values }, this._fieldErrors = s, this.#l(), this.#o({ animate: !1 });
5159
+ this._steps = this._steps.slice(0, e), this._cardValues = { ...t.values }, this._fieldErrors = s, this.#c(), this.#a({ animate: !1 });
5044
5160
  return;
5045
5161
  }
5046
5162
  }
5047
- if (this.#t = this.#t || crypto.randomUUID(), this.#l(), this._submit = We(this.#d), this._phase = "submitting", !await this.client.isAuthenticated()) {
5163
+ if (this.#t = this.#t || crypto.randomUUID(), this.#c(), this.#d) {
5164
+ if (!await this.#I()) return;
5165
+ } else
5166
+ this.client.endAnonSession?.();
5167
+ if (this._submit = We(this.#g), this._phase = "submitting", this.#d) {
5168
+ this.#e({ type: "START" }), this.#s();
5169
+ return;
5170
+ }
5171
+ if (!await this.client.isAuthenticated()) {
5048
5172
  this.#e({ type: "START" }), this.#e({ type: "AUTH_REQUIRED" }), this._gate = { stage: "email", email: "", error: "", loading: !1 };
5049
5173
  return;
5050
5174
  }
5051
- this.#e({ type: "START" }), this.#c();
5175
+ this.#e({ type: "START" }), this.#s();
5052
5176
  }
5053
- async #c() {
5177
+ async #s() {
5054
5178
  const e = this._submit.stage;
5055
- if (e === "minting") return this.#B();
5056
- if (e === "uploading") return this.#U();
5057
- if (e === "requesting") return this.#N();
5179
+ if (e === "minting") return this.#V();
5180
+ if (e === "uploading") return this.#D();
5181
+ if (e === "requesting") return this.#W();
5058
5182
  }
5059
- async #B() {
5183
+ async #V() {
5060
5184
  try {
5061
- const e = await this.client.createUploads(xr({
5185
+ const e = await this.client.createUploads(Er({
5062
5186
  formId: this._form.formId,
5063
5187
  requestId: this.#t,
5064
- files: this.#d
5188
+ files: this.#g
5065
5189
  }));
5066
- this.#e({ type: "MINTED", uploads: e }), this.#c();
5190
+ this.#e({ type: "MINTED", uploads: e }), this.#s();
5067
5191
  } catch (e) {
5068
- this.#_(e);
5192
+ this.#x(e);
5069
5193
  }
5070
5194
  }
5071
- #U() {
5195
+ #D() {
5072
5196
  const e = this._submit.files, t = this.#i.size;
5073
5197
  let r = 0;
5074
- for (let i = 0; i < e.length && t + r < Fo; i++)
5075
- e[i].status !== "uploading" || this.#i.has(i) || (r += 1, this.#M(i));
5198
+ for (let i = 0; i < e.length && t + r < Mo; i++)
5199
+ e[i].status !== "uploading" || this.#i.has(i) || (r += 1, this.#H(i));
5076
5200
  }
5077
- #M(e) {
5078
- const t = this._submit.files[e], r = this.#d[e], { promise: i, abort: s } = this.client.uploadFile({
5201
+ #H(e) {
5202
+ const t = this._submit.files[e], r = this.#g[e], { promise: i, abort: s } = this.client.uploadFile({
5079
5203
  url: t.url,
5080
5204
  file: r,
5081
5205
  contentType: t.type,
@@ -5084,7 +5208,7 @@ class Bo extends se {
5084
5208
  }
5085
5209
  });
5086
5210
  this.#i.set(e, { abort: s }), i.then(() => {
5087
- this.#i.delete(e), this.#e({ type: "FILE_DONE", i: e }), this.#c();
5211
+ this.#i.delete(e), this.#e({ type: "FILE_DONE", i: e }), this.#s();
5088
5212
  }).catch((o) => {
5089
5213
  this.#i.delete(e), this.#e({
5090
5214
  type: "FILE_FAIL",
@@ -5093,48 +5217,52 @@ class Bo extends se {
5093
5217
  });
5094
5218
  });
5095
5219
  }
5096
- async #O(e) {
5220
+ async #z(e) {
5097
5221
  if (this._submit.files[e].error === "expired")
5098
5222
  try {
5099
- const [r] = await this.client.createUploads(xr({
5223
+ const [r] = await this.client.createUploads(Er({
5100
5224
  formId: this._form.formId,
5101
5225
  requestId: this.#t,
5102
- files: [this.#d[e]]
5226
+ files: [this.#g[e]]
5103
5227
  }));
5104
5228
  this.#e({ type: "REMINT_FILE", i: e, upload: r });
5105
5229
  } catch (r) {
5106
- this.#_(r);
5230
+ this.#x(r);
5107
5231
  return;
5108
5232
  }
5109
5233
  else
5110
5234
  this.#e({ type: "RETRY_FILE", i: e });
5111
- this.#U();
5235
+ this.#D();
5112
5236
  }
5113
- async #N() {
5237
+ async #W() {
5114
5238
  try {
5115
- const e = this._submit.files.map(({ assetId: r, type: i }) => ({ assetId: r, type: i })), t = await this.client.putRequest(this.#t, po({
5239
+ const e = this._submit.files.map(({ assetId: r, type: i }) => ({ assetId: r, type: i })), t = await this.client.putRequest(this.#t, mo({
5116
5240
  form: this._form,
5117
5241
  steps: this._steps,
5118
5242
  media: e
5119
5243
  }));
5120
- this.#e({ type: "REQUEST_OK", result: t }), this._result = t, Ur(this.#f), this._phase = "done";
5244
+ this.#e({ type: "REQUEST_OK", result: t }), this._result = t, Ir(this.#f), this.client.endAnonSession?.(), this._phase = "done";
5121
5245
  } catch (e) {
5122
- this.#_(e);
5246
+ this.#x(e);
5123
5247
  }
5124
5248
  }
5125
- #_(e) {
5126
- const t = go(e?.status ?? 0, e?.body ?? null);
5249
+ #x(e) {
5250
+ const t = Ur(e?.status ?? 0, e?.body ?? null);
5127
5251
  if (t.kind === "auth") {
5128
- this.#e({ type: "AUTH_REQUIRED" }), this._gate = { stage: "email", email: "", error: "", loading: !1 };
5252
+ if (this.#e({ type: "AUTH_REQUIRED" }), this.#d) {
5253
+ this.#K();
5254
+ return;
5255
+ }
5256
+ this._gate = { stage: "email", email: "", error: "", loading: !1 };
5129
5257
  return;
5130
5258
  }
5131
5259
  if (t.kind === "stale") {
5132
- this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t }), this.#q();
5260
+ this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t }), this.#Y();
5133
5261
  return;
5134
5262
  }
5135
5263
  this._banner = t, this.#e({ type: "REQUEST_FAIL", error: t });
5136
5264
  }
5137
- async #q() {
5265
+ async #Y() {
5138
5266
  try {
5139
5267
  this._forms = await this.client.listForms();
5140
5268
  const e = this._forms.find((t) => t.formId === this._form.formId);
@@ -5142,86 +5270,90 @@ class Bo extends se {
5142
5270
  } catch {
5143
5271
  }
5144
5272
  }
5145
- #L() {
5146
- this._banner = null, this.#e({ type: "REQUEST_START" }), this.#c();
5273
+ #G() {
5274
+ this._banner = null, this.#e({ type: "REQUEST_START" }), this.#s();
5147
5275
  }
5148
5276
  // ── Render ──────────────────────────────────────────────────────
5149
5277
  render() {
5150
- return C`
5278
+ return x`
5151
5279
  <div class="chat" aria-live="polite">
5152
- ${this.#K()}
5280
+ ${this.#J()}
5153
5281
  </div>
5154
- ${this.#Q()}
5282
+ ${this.#le()}
5155
5283
  `;
5156
5284
  }
5157
- #K() {
5285
+ #J() {
5158
5286
  switch (this._phase) {
5159
5287
  case "loading":
5160
5288
  return lt();
5161
5289
  case "load-error":
5162
- return C`
5163
- ${z("We could not load the forms.", "Check your connection and try again.", { error: !0 })}
5290
+ return x`
5291
+ ${V("We could not load the forms.", "Check your connection and try again.", { error: !0 })}
5164
5292
  <div class="options">
5165
- <button type="button" class="chip" @click=${() => this.#v()}>Try again</button>
5293
+ <button type="button" class="chip" @click=${() => this.#w()}>Try again</button>
5166
5294
  </div>
5167
5295
  `;
5168
5296
  case "pick":
5169
- return this.#V();
5297
+ return this.#Z();
5170
5298
  case "walk":
5171
- return C`${this.#p()}${this._typing ? lt() : this.#j()}`;
5299
+ return x`${this.#m()}${this._typing ? lt() : this.#X()}`;
5172
5300
  case "review":
5173
- return C`${this.#p()}${this.#I()}`;
5301
+ return x`${this.#m()}${this.#R()}`;
5174
5302
  case "submitting":
5175
- return C`${this.#p()}${this.#Z()}`;
5303
+ return x`${this.#m()}${this.#ae()}`;
5176
5304
  case "done":
5177
- return C`${this.#p()}${this.#X()}`;
5305
+ return x`${this.#m()}${this.#ue()}`;
5178
5306
  default:
5179
- return T;
5307
+ return U;
5180
5308
  }
5181
5309
  }
5182
- #V() {
5310
+ #Z() {
5183
5311
  const e = this._forms;
5184
- return C`
5185
- ${z(
5312
+ return x`
5313
+ ${V(
5186
5314
  "Welcome to Report It. What would you like to send us?",
5187
5315
  "A few quick questions route your report to the right team."
5188
5316
  )}
5189
5317
  <div class="options" role="group" aria-label="What would you like to send us?">
5190
- ${e.map((t, r) => C`
5318
+ ${e.map((t, r) => x`
5191
5319
  <button type="button" class="chip" style="animation-delay: ${60 + r * 50}ms"
5192
- @click=${() => this.#R(t)}>${t.title}</button>
5320
+ @click=${() => this.#F(t)}>${t.title}</button>
5193
5321
  `)}
5194
5322
  </div>
5195
5323
  `;
5196
5324
  }
5197
- #p() {
5325
+ #m() {
5198
5326
  const e = [];
5199
- this._form && (e.push(z(
5327
+ this._form && (e.push(V(
5200
5328
  "Welcome to Report It. What would you like to send us?",
5201
5329
  "A few quick questions route your report to the right team.",
5202
5330
  { noAnim: !0 }
5203
- )), e.push(He(this._form.title, { noAnim: !0 }))), this._notice && e.push(z(this._notice, "", { noAnim: !0 }));
5331
+ )), e.push(He(this._form.title, { noAnim: !0 }))), this._notice && e.push(V(this._notice, "", { noAnim: !0 }));
5204
5332
  for (const t of this._steps) {
5205
5333
  const r = ae(this._form, t.nodeId);
5206
- r?.prompt && e.push(z(r.prompt, r.help, { noAnim: !0 })), r?.type === "gate" && e.push(z(
5334
+ r?.prompt && e.push(V(r.prompt, r.help, { noAnim: !0 })), r?.type === "gate" && e.push(t.anonymous ? V(
5335
+ "Last step: how can we reach you?",
5336
+ "You chose to send this anonymously.",
5337
+ { noAnim: !0 }
5338
+ ) : V(
5207
5339
  "Last step: verify your email so we can follow up.",
5208
5340
  "One address, one code. No password needed.",
5209
5341
  { noAnim: !0 }
5210
- )), t.kind === "choice" && e.push(He(t.label || t.optionId, { noAnim: !0 })), t.kind === "collect" && e.push(He(t.summary || "Details provided", { noAnim: !0 })), t.kind === "gate" && e.push(He(t.email, { noAnim: !0 }));
5342
+ )), t.kind === "choice" && e.push(He(t.label || t.optionId, { noAnim: !0 })), t.kind === "collect" && e.push(He(t.summary || "Details provided", { noAnim: !0 })), t.kind === "gate" && e.push(He(t.anonymous ? "Send anonymously" : t.email, { noAnim: !0 }));
5211
5343
  }
5212
5344
  return e;
5213
5345
  }
5214
- #j() {
5215
- const { node: e, error: t } = this.#A;
5216
- return t || !e ? z("Something went sideways with this form.", "Please start over.", { error: !0 }) : e.type === "choice" ? this.#H(e) : e.type === "collect" ? this.#z(e) : e.type === "gate" ? this.#T(e) : e.type === "redirect" ? this.#J(e) : e.type === "terminal" ? this.#I() : T;
5346
+ #X() {
5347
+ const { node: e, error: t } = this.#b;
5348
+ return t || !e ? V("Something went sideways with this form.", "Please start over.", { error: !0 }) : e.type === "choice" ? this.#Q(e) : e.type === "collect" ? this.#ee(e) : e.type === "gate" ? this.#k(e) : e.type === "redirect" ? this.#oe(e) : e.type === "terminal" ? this.#R() : U;
5217
5349
  }
5218
- #H(e) {
5219
- return C`
5220
- ${z(e.prompt, e.help)}
5350
+ #Q(e) {
5351
+ return x`
5352
+ ${V(e.prompt, e.help)}
5221
5353
  <div class="options" role="group" aria-label=${e.prompt || "Choose one"}>
5222
- ${(e.options || []).map((t, r) => C`
5354
+ ${(e.options || []).map((t, r) => x`
5223
5355
  <button type="button" class="chip" style="animation-delay: ${60 + r * 50}ms"
5224
- @click=${() => this.#y({
5356
+ @click=${() => this.#p({
5225
5357
  nodeId: e.id,
5226
5358
  kind: "choice",
5227
5359
  optionId: t.id,
@@ -5231,61 +5363,61 @@ class Bo extends se {
5231
5363
  </div>
5232
5364
  `;
5233
5365
  }
5234
- #z(e) {
5366
+ #ee(e) {
5235
5367
  const t = e.fields || [];
5236
- return C`
5237
- ${z(e.prompt, e.help)}
5368
+ return x`
5369
+ ${V(e.prompt, e.help)}
5238
5370
  <div class="form-card">
5239
- ${t.map((r) => this.#W(e, r))}
5240
- <button type="button" class="btn-primary" @click=${() => this.#$(e)}>
5371
+ ${t.map((r) => this.#te(e, r))}
5372
+ <button type="button" class="btn-primary" @click=${() => this.#M(e)}>
5241
5373
  Continue
5242
5374
  </button>
5243
5375
  </div>
5244
5376
  `;
5245
5377
  }
5246
- #W(e, t) {
5247
- const r = this._cardValues[t.key], i = this._fieldErrors[t.key], s = !t.required && t.kind !== "consent" ? C` <span class="opt">optional</span>` : T, o = t.kind === "consent" ? T : C`
5378
+ #te(e, t) {
5379
+ 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`
5248
5380
  <label for="f-${t.key}">${t.label}${s}</label>
5249
5381
  `;
5250
- return C`
5382
+ return x`
5251
5383
  <div class="field">
5252
5384
  ${o}
5253
- ${this.#Y(e, t, r)}
5254
- ${i ? C`<div class="err" role="alert">${i}</div>` : T}
5385
+ ${this.#re(e, t, r)}
5386
+ ${i ? x`<div class="err" role="alert">${i}</div>` : U}
5255
5387
  </div>
5256
5388
  `;
5257
5389
  }
5258
- #Y(e, t, r) {
5259
- const i = (s) => (o) => this.#b(s, o.target.value);
5390
+ #re(e, t, r) {
5391
+ const i = (s) => (o) => this.#_(s, o.target.value);
5260
5392
  switch (t.kind) {
5261
5393
  case "text":
5262
- return C`<input type="text" id="f-${t.key}" .value=${r || ""}
5394
+ return x`<input type="text" id="f-${t.key}" .value=${r || ""}
5263
5395
  placeholder=${t.placeholder || ""} @input=${i(t.key)}>`;
5264
5396
  case "url":
5265
- return C`<input type="url" id="f-${t.key}" .value=${r || ""}
5397
+ return x`<input type="url" id="f-${t.key}" .value=${r || ""}
5266
5398
  placeholder=${t.placeholder || ""} @input=${i(t.key)}>`;
5267
5399
  case "textarea":
5268
- return C`<textarea id="f-${t.key}" .value=${r || ""}
5400
+ return x`<textarea id="f-${t.key}" .value=${r || ""}
5269
5401
  placeholder=${t.placeholder || ""} @input=${i(t.key)}></textarea>`;
5270
5402
  case "datetime":
5271
- return C`<input type="datetime-local" id="f-${t.key}" .value=${r || ""}
5403
+ return x`<input type="datetime-local" id="f-${t.key}" .value=${r || ""}
5272
5404
  @input=${i(t.key)}>`;
5273
5405
  case "select":
5274
- return C`
5406
+ return x`
5275
5407
  <select id="f-${t.key}" @change=${i(t.key)}>
5276
5408
  <option value="">Choose one</option>
5277
- ${(t.options || []).map((s) => C`
5409
+ ${(t.options || []).map((s) => x`
5278
5410
  <option value=${s.id} ?selected=${r === s.id}>${s.label}</option>
5279
5411
  `)}
5280
5412
  </select>
5281
5413
  `;
5282
5414
  case "location":
5283
- return this.#G(t, r || {});
5415
+ return this.#ne(t, r || {});
5284
5416
  case "consent":
5285
- return C`
5417
+ return x`
5286
5418
  <div class="consent-row">
5287
5419
  <input type="checkbox" id="f-${t.key}" .checked=${r === !0}
5288
- @change=${(s) => this.#b(t.key, s.target.checked)}>
5420
+ @change=${(s) => this.#_(t.key, s.target.checked)}>
5289
5421
  <label for="f-${t.key}" style="all: unset; cursor: pointer;">
5290
5422
  I took or own this material and give WRAL permission to use it
5291
5423
  on air and online with credit to me.
@@ -5293,7 +5425,7 @@ class Bo extends se {
5293
5425
  </div>
5294
5426
  `;
5295
5427
  case "media":
5296
- return C`
5428
+ return x`
5297
5429
  <wral-report-media
5298
5430
  .files=${this.#r[e.id] || []}
5299
5431
  .lostMeta=${this.#n[e.id] || []}
@@ -5305,16 +5437,16 @@ class Bo extends se {
5305
5437
  }}></wral-report-media>
5306
5438
  `;
5307
5439
  default:
5308
- return T;
5440
+ return U;
5309
5441
  }
5310
5442
  }
5311
- #G(e, t) {
5312
- const r = e.counties || Do, i = (s) => this.#b(e.key, { ...t, ...s });
5313
- return C`
5443
+ #ne(e, t) {
5444
+ const r = e.counties || ko, i = (s) => this.#_(e.key, { ...t, ...s });
5445
+ return x`
5314
5446
  <select id="f-${e.key}" aria-label="County"
5315
5447
  @change=${(s) => i({ county: s.target.value || void 0 })}>
5316
5448
  <option value="">Choose a county</option>
5317
- ${r.map((s) => C`
5449
+ ${r.map((s) => x`
5318
5450
  <option value=${s} ?selected=${t.county === s}>${s}</option>
5319
5451
  `)}
5320
5452
  </select>
@@ -5325,24 +5457,24 @@ class Bo extends se {
5325
5457
  @input=${(s) => i({ where: s.target.value || void 0 })}>
5326
5458
  `;
5327
5459
  }
5328
- #T(e) {
5329
- this.#C();
5330
- const t = this._gate, r = z(
5460
+ #k(e) {
5461
+ this.#E();
5462
+ const t = this._gate, r = V(
5331
5463
  "Last step: verify your email so we can follow up.",
5332
5464
  "One address, one code. No password needed."
5333
5465
  );
5334
- return t.stage ? t.stage === "signedin" ? C`
5466
+ return t.stage ? t.stage === "signedin" ? x`
5335
5467
  ${r}
5336
5468
  <div class="form-card">
5337
5469
  <p style="margin: 0 0 12px; font-size: 14.5px;">
5338
5470
  You are signed in as <strong>${t.email || "your My WRAL account"}</strong> on this device.
5339
5471
  </p>
5340
5472
  <button type="button" class="btn-primary"
5341
- @click=${() => this.#E(t.email)}>Continue</button>
5473
+ @click=${() => this.#T(t.email)}>Continue</button>
5342
5474
  <button type="button" class="btn-ghost"
5343
- @click=${() => this.#P()}>Use a different email</button>
5475
+ @click=${() => this.#O()}>Use a different email</button>
5344
5476
  </div>
5345
- ` : t.stage === "email" ? C`
5477
+ ` : t.stage === "email" ? x`
5346
5478
  ${r}
5347
5479
  <div class="form-card login-card">
5348
5480
  <h2>Sign in or create account</h2>
@@ -5357,12 +5489,12 @@ class Bo extends se {
5357
5489
  this._gate = { ...t, email: i.target.value };
5358
5490
  }}
5359
5491
  @keydown=${(i) => {
5360
- i.key === "Enter" && this.#S();
5492
+ i.key === "Enter" && this.#A();
5361
5493
  }}>
5362
5494
  </div>
5363
- ${t.error ? C`<div class="err" role="alert">${t.error}</div>` : T}
5495
+ ${t.error ? x`<div class="err" role="alert">${t.error}</div>` : U}
5364
5496
  <button type="button" class="login-btn" ?disabled=${t.loading}
5365
- @click=${() => this.#S()}>
5497
+ @click=${() => this.#A()}>
5366
5498
  ${t.loading ? "Sending…" : "Continue with email"}
5367
5499
  </button>
5368
5500
  <div class="login-why">
@@ -5374,12 +5506,9 @@ class Bo extends se {
5374
5506
  <li><a href=${Ro} target="_blank" rel="noopener">All other My WRAL account benefits</a></li>
5375
5507
  </ul>
5376
5508
  </div>
5377
- <p class="login-anon">
5378
- Want to remain anonymous? Call us at
5379
- <a href=${ko(Ir)}>${Ir}</a>.
5380
- </p>
5509
+ ${this._submit.stage === "auth" ? U : this.#ie()}
5381
5510
  </div>
5382
- ` : C`
5511
+ ` : t.stage === "anon-confirm" ? this.#se(r) : x`
5383
5512
  ${r}
5384
5513
  <div class="form-card login-card">
5385
5514
  <h2>Enter verification code</h2>
@@ -5393,27 +5522,71 @@ class Bo extends se {
5393
5522
  <div class="field">
5394
5523
  <label>Verification code</label>
5395
5524
  <wral-code-input
5396
- @code-complete=${(i) => this.#x(i.detail?.code ?? i.detail?.value ?? i.target.value)}>
5525
+ @code-complete=${(i) => this.#U(i.detail?.code ?? i.detail?.value ?? i.target.value)}>
5397
5526
  </wral-code-input>
5398
5527
  </div>
5399
- ${t.error ? C`<div class="err" role="alert">${t.error}</div>` : T}
5528
+ ${t.error ? x`<div class="err" role="alert">${t.error}</div>` : U}
5400
5529
  <button type="button" class="login-btn" ?disabled=${t.loading}
5401
5530
  @click=${() => {
5402
5531
  const i = this.renderRoot.querySelector("wral-code-input");
5403
- this.#x(i?.value || "");
5532
+ this.#U(i?.value || "");
5404
5533
  }}>
5405
5534
  ${t.loading ? "Checking…" : "Sign in"}
5406
5535
  </button>
5407
5536
  <p class="login-help">
5408
5537
  Didn’t receive a code? Check your spam folder or
5409
- <button type="button" @click=${() => this.#S()}>resend a new code</button>.
5538
+ <button type="button" @click=${() => this.#A()}>resend a new code</button>.
5410
5539
  </p>
5411
5540
  </div>
5412
- ` : C`${r}${lt()}`;
5541
+ ` : x`${r}${lt()}`;
5542
+ }
5543
+ /* Collapsed by default: findable for whoever needs it, never the
5544
+ * first thing a viewer reaches for. */
5545
+ #ie() {
5546
+ return x`
5547
+ <details class="login-alt">
5548
+ <summary>Other ways to send this</summary>
5549
+ <div class="alt-body">
5550
+ <p class="alt-row">
5551
+ Call the newsroom desk at
5552
+ <a href=${Po(kr)}>${kr}</a>.
5553
+ </p>
5554
+ ${this.#P ? x`
5555
+ <p class="alt-row">
5556
+ <button type="button" class="alt-link"
5557
+ @click=${() => this.#N()}>Send this anonymously</button>
5558
+ — no follow-up, and no credit if we use your photos or video.
5559
+ </p>
5560
+ ` : U}
5561
+ </div>
5562
+ </details>
5563
+ `;
5413
5564
  }
5414
- #J(e) {
5565
+ #se(e) {
5566
+ return x`
5567
+ ${e}
5568
+ <div class="form-card login-card">
5569
+ <h2>Before you send anonymously</h2>
5570
+ <p class="login-sub">
5571
+ You can send this report without an account. Here is what it costs you.
5572
+ </p>
5573
+ <ul class="anon-costs">
5574
+ ${$o.map((t) => x`
5575
+ <li><span class="x" aria-hidden="true">✕</span><span>${t}</span></li>
5576
+ `)}
5577
+ </ul>
5578
+ <div class="anon-actions">
5579
+ <button type="button" class="login-btn"
5580
+ @click=${() => this.#q()}>Sign in instead</button>
5581
+ <button type="button" class="btn-ghost"
5582
+ @click=${() => this.#L()}>Continue anonymously</button>
5583
+ </div>
5584
+ </div>
5585
+ `;
5586
+ }
5587
+ #oe(e) {
5415
5588
  const t = e.redirect || {};
5416
- return C`
5589
+ return x`
5417
5590
  <div class="form-card">
5418
5591
  <p style="margin: 0 0 6px; font-weight: 600; font-size: 16px;
5419
5592
  color: var(--wral-base-primary-1, #001D68);
@@ -5430,30 +5603,33 @@ class Bo extends se {
5430
5603
  </div>
5431
5604
  `;
5432
5605
  }
5433
- #I() {
5434
- const e = bo(this._form, this._steps);
5435
- return C`
5436
- ${z("Here is what you are sending.", "Check it over, then submit.")}
5606
+ #R() {
5607
+ const e = So(this._form, this._steps);
5608
+ return x`
5609
+ ${V("Here is what you are sending.", "Check it over, then submit.")}
5437
5610
  <div class="form-card">
5438
5611
  <ul class="review-list">
5439
- ${e.map((t) => C`
5612
+ ${e.map((t) => x`
5440
5613
  <li>
5441
5614
  <span class="k">${t.k}</span>
5442
- <span>${t.pill ? Ws(t.pill) : t.v}</span>
5615
+ <span>${t.pill ? Gs(t.pill) : t.v}</span>
5443
5616
  </li>
5444
5617
  `)}
5445
5618
  </ul>
5619
+ ${this._banner ? x`
5620
+ <div class="err" role="alert" style="margin-top: 12px;">${this._banner.message}</div>
5621
+ ` : U}
5446
5622
  <div style="margin-top: 16px;">
5447
- <button type="button" class="btn-primary" @click=${() => this.#F()}>
5623
+ <button type="button" class="btn-primary" @click=${() => this.#j()}>
5448
5624
  Submit report
5449
5625
  </button>
5450
5626
  </div>
5451
5627
  </div>
5452
5628
  `;
5453
5629
  }
5454
- #Z() {
5630
+ #ae() {
5455
5631
  const e = this._submit;
5456
- if (e.stage === "auth") return this.#T({ id: null, type: "gate" });
5632
+ if (e.stage === "auth") return this.#k({ id: null, type: "gate" });
5457
5633
  const t = {
5458
5634
  minting: "Preparing your uploads…",
5459
5635
  uploading: "Uploading your files…",
@@ -5461,10 +5637,10 @@ class Bo extends se {
5461
5637
  requesting: "Sending your report…",
5462
5638
  "requesting-error": this._banner?.message || "We could not send your report."
5463
5639
  }[e.stage] || "Working…";
5464
- return C`
5465
- ${z("Submitting your report.", t)}
5640
+ return x`
5641
+ ${V("Submitting your report.", t)}
5466
5642
  <div class="form-card">
5467
- ${e.files.map((r, i) => C`
5643
+ ${e.files.map((r, i) => x`
5468
5644
  <div class="upload-row">
5469
5645
  <span class="name">${r.name}</span>
5470
5646
  <div class="upload-bar" role="progressbar"
@@ -5475,62 +5651,63 @@ class Bo extends se {
5475
5651
  <span class="state ${r.status === "failed" ? "failed" : ""}">
5476
5652
  ${r.status === "done" ? "Done" : r.status === "failed" ? "Failed" : "Uploading"}
5477
5653
  </span>
5478
- ${r.status === "failed" ? C`
5479
- <button type="button" class="retry-chip" @click=${() => this.#O(i)}>
5654
+ ${r.status === "failed" ? x`
5655
+ <button type="button" class="retry-chip" @click=${() => this.#z(i)}>
5480
5656
  Retry
5481
5657
  </button>
5482
- ` : T}
5658
+ ` : U}
5483
5659
  </div>
5484
5660
  `)}
5485
- ${e.stage === "requesting-error" ? C`
5661
+ ${e.stage === "requesting-error" ? x`
5486
5662
  <div class="err" role="alert">${this._banner?.message || ""}</div>
5487
- ${this._banner?.retryAfter ? C`
5663
+ ${this._banner?.retryAfter ? x`
5488
5664
  <div class="file-note">You can try again in about
5489
5665
  ${Math.ceil(this._banner.retryAfter / 60)} minutes.</div>
5490
- ` : T}
5666
+ ` : U}
5491
5667
  <button type="button" class="btn-primary" style="margin-top: 8px;"
5492
- @click=${() => this.#L()}>Try again</button>
5493
- ` : T}
5494
- ${Tr(e).length && e.stage === "uploading-error" ? C`
5668
+ @click=${() => this.#G()}>Try again</button>
5669
+ ` : U}
5670
+ ${Dr(e).length && e.stage === "uploading-error" ? x`
5495
5671
  <div class="err" role="alert">Retry the failed
5496
- ${Tr(e).length === 1 ? "file" : "files"} to continue.</div>
5497
- ` : T}
5672
+ ${Dr(e).length === 1 ? "file" : "files"} to continue.</div>
5673
+ ` : U}
5498
5674
  </div>
5499
5675
  `;
5500
5676
  }
5501
- #X() {
5502
- const e = Jr(this._form, this._steps), t = So(this._result, e), r = Ao({
5677
+ #ue() {
5678
+ const e = Xr(this._form, this._steps), t = _o(this._result, e), r = xo({
5503
5679
  routing: this._result?.routing || {},
5504
5680
  flags: e,
5505
- reference: this._result?.reference || ""
5681
+ reference: this._result?.reference || "",
5682
+ anonymous: this.#d
5506
5683
  });
5507
- return C`
5684
+ return x`
5508
5685
  <div class="confirm-card">
5509
5686
  <div class="c-head">
5510
- <div class="c-check">${Ys()}</div>
5687
+ <div class="c-check">${Js()}</div>
5511
5688
  <div>
5512
5689
  <div class="eyebrow">Report received</div>
5513
5690
  <h2>${t.title}</h2>
5514
5691
  </div>
5515
5692
  </div>
5516
5693
  <p>${t.body}</p>
5517
- ${t.urgentNote ? C`<p>${t.urgentNote}</p>` : T}
5694
+ ${t.urgentNote ? x`<p>${t.urgentNote}</p>` : U}
5518
5695
  <div class="refs">
5519
5696
  <span class="ref"><span class="rk">Reference</span>${this._result?.reference || ""}</span>
5520
5697
  </div>
5521
- <button type="button" class="c-again" @click=${() => this.#w()}>
5698
+ <button type="button" class="c-again" @click=${() => this.#S()}>
5522
5699
  Start a new report
5523
5700
  </button>
5524
5701
  </div>
5525
5702
  <div class="journey">
5526
5703
  <div class="j-eyebrow">Behind the scenes</div>
5527
5704
  <div class="j-title">What happens to your report now</div>
5528
- ${r.map((i, s) => C`
5705
+ ${r.map((i, s) => x`
5529
5706
  <div class="j-step">
5530
5707
  <div class="j-dot">${s + 1}</div>
5531
5708
  <div class="j-body">
5532
5709
  <div class="j-t">${i.title}
5533
- ${i.pill ? C` <span class="flag-pill urgent">${i.pill}</span>` : T}
5710
+ ${i.pill ? x` <span class="flag-pill urgent">${i.pill}</span>` : U}
5534
5711
  </div>
5535
5712
  <div class="j-d">${i.body}</div>
5536
5713
  </div>
@@ -5539,15 +5716,15 @@ class Bo extends se {
5539
5716
  </div>
5540
5717
  `;
5541
5718
  }
5542
- #Q() {
5719
+ #le() {
5543
5720
  const e = this._phase === "submitting" || this._phase === "done" || this._phase === "loading" || this._phase === "load-error";
5544
- return C`
5721
+ return x`
5545
5722
  <div class="bottom-bar">
5546
5723
  <div class="inner">
5547
5724
  <button type="button" class="btn-ghost" ?disabled=${e || this._phase === "pick"}
5548
- @click=${() => this.#k()}>← Back</button>
5725
+ @click=${() => this.#B()}>← Back</button>
5549
5726
  <button type="button" class="btn-ghost" ?disabled=${this._phase === "submitting"}
5550
- @click=${() => this.#w()}>Start over</button>
5727
+ @click=${() => this.#S()}>Start over</button>
5551
5728
  <span class="note">Your report goes to a person on the right desk.</span>
5552
5729
  </div>
5553
5730
  </div>
@@ -5557,7 +5734,7 @@ class Bo extends se {
5557
5734
  this.renderRoot?.querySelector(".chat")?.lastElementChild?.scrollIntoView?.({ block: "nearest" });
5558
5735
  }
5559
5736
  }
5560
- class Mo extends se {
5737
+ class No extends se {
5561
5738
  static properties = {
5562
5739
  files: { attribute: !1 },
5563
5740
  lostMeta: { attribute: !1 },
@@ -5565,7 +5742,7 @@ class Mo extends se {
5565
5742
  required: { type: Boolean },
5566
5743
  label: { type: String }
5567
5744
  };
5568
- static styles = H`
5745
+ static styles = z`
5569
5746
  :host { display: block; }
5570
5747
  input[type=file] { font-family: inherit; font-size: 14px; }
5571
5748
  .file-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
@@ -5587,10 +5764,10 @@ class Mo extends se {
5587
5764
  constructor() {
5588
5765
  super(), this.files = [], this.lostMeta = [], this.budget = {}, this.required = !1, this.label = "Photos or video";
5589
5766
  }
5590
- get #a() {
5767
+ get #u() {
5591
5768
  return (this.budget?.allowedTypes || []).join(",");
5592
5769
  }
5593
- #s(e) {
5770
+ #o(e) {
5594
5771
  this.dispatchEvent(new CustomEvent("files-changed", {
5595
5772
  detail: { files: e },
5596
5773
  bubbles: !0,
@@ -5599,52 +5776,52 @@ class Mo extends se {
5599
5776
  }
5600
5777
  #h(e) {
5601
5778
  const t = [...e.target.files || []];
5602
- this.#s([...this.files || [], ...t]), e.target.value = "";
5779
+ this.#o([...this.files || [], ...t]), e.target.value = "";
5603
5780
  }
5604
5781
  #t(e) {
5605
5782
  const t = [...this.files];
5606
- t.splice(e, 1), this.#s(t);
5783
+ t.splice(e, 1), this.#o(t);
5607
5784
  }
5608
5785
  render() {
5609
5786
  const e = this.files || [], { errors: t } = Et(e, this.budget, { required: !1 });
5610
- return C`
5787
+ return x`
5611
5788
  <input type="file" multiple
5612
- accept=${this.#a || T}
5789
+ accept=${this.#u || U}
5613
5790
  aria-label=${this.label}
5614
5791
  @change=${this.#h}>
5615
- ${e.length ? C`
5792
+ ${e.length ? x`
5616
5793
  <ul class="file-list">
5617
- ${e.map((r, i) => C`
5794
+ ${e.map((r, i) => x`
5618
5795
  <li>
5619
5796
  <span>${r.name}</span>
5620
- <span class="size">${Oo(r.size)}</span>
5797
+ <span class="size">${qo(r.size)}</span>
5621
5798
  <button type="button" class="remove"
5622
5799
  aria-label="Remove ${r.name}"
5623
5800
  @click=${() => this.#t(i)}>✕</button>
5624
5801
  </li>
5625
5802
  `)}
5626
5803
  </ul>
5627
- ` : T}
5628
- ${(this.lostMeta || []).length ? C`
5804
+ ` : U}
5805
+ ${(this.lostMeta || []).length ? x`
5629
5806
  <div class="lost">
5630
5807
  Please re-attach your ${this.lostMeta.length === 1 ? "file" : "files"}
5631
5808
  (${this.lostMeta.map((r) => r.name).join(", ")}) —
5632
5809
  attachments can't be saved between visits.
5633
5810
  </div>
5634
- ` : T}
5635
- ${t.map((r) => C`<div class="err">${r.message}</div>`)}
5811
+ ` : U}
5812
+ ${t.map((r) => x`<div class="err">${r.message}</div>`)}
5636
5813
  `;
5637
5814
  }
5638
5815
  }
5639
- function Oo(n) {
5816
+ function qo(n) {
5640
5817
  return Number.isFinite(n) ? n >= 1024 * 1024 ? `${(n / (1024 * 1024)).toFixed(1)} MB` : n >= 1024 ? `${Math.round(n / 1024)} KB` : `${n} B` : "";
5641
5818
  }
5642
- const No = (n, e, t, r) => {
5819
+ const Lo = (n, e, t, r) => {
5643
5820
  const i = e.target.value.replace(/\D/g, "").slice(-1), s = [...t];
5644
5821
  s[n] = i;
5645
5822
  const o = s.join(""), l = s.every((h) => h !== "");
5646
5823
  return r("code-change", { value: o, complete: l }), i && l && r("code-complete", { value: o }), s;
5647
- }, qo = (n, e, t, r) => {
5824
+ }, Ko = (n, e, t, r) => {
5648
5825
  if (e.key === "Backspace") {
5649
5826
  const i = [...t];
5650
5827
  !i[n] && n > 0 ? i[n - 1] = "" : i[n] && (i[n] = "");
@@ -5652,7 +5829,7 @@ const No = (n, e, t, r) => {
5652
5829
  return r("code-change", { value: s, complete: !1 }), i;
5653
5830
  }
5654
5831
  return t;
5655
- }, Lo = (n, e, t) => {
5832
+ }, jo = (n, e, t) => {
5656
5833
  n.preventDefault();
5657
5834
  const r = n.clipboardData.getData("text").replace(/\D/g, "").slice(0, 6);
5658
5835
  if (r.length === 0) return e;
@@ -5662,13 +5839,13 @@ const No = (n, e, t, r) => {
5662
5839
  const s = i.join(""), o = i.every((l) => l !== "");
5663
5840
  return t("code-change", { value: s, complete: o }), r.length === 6 && t("code-complete", { value: s }), i;
5664
5841
  };
5665
- class Ko extends se {
5842
+ class Vo extends se {
5666
5843
  static formAssociated = !0;
5667
5844
  static properties = {
5668
5845
  _values: { type: Array, state: !0 },
5669
5846
  disabled: { type: Boolean, reflect: !0 }
5670
5847
  };
5671
- static styles = H`
5848
+ static styles = z`
5672
5849
  :host {
5673
5850
  display: block;
5674
5851
  width: 100%;
@@ -5767,7 +5944,7 @@ class Ko extends se {
5767
5944
  this.getInputs()[e]?.focus();
5768
5945
  }
5769
5946
  inputHandler(e, t) {
5770
- this._values = No(
5947
+ this._values = Lo(
5771
5948
  e,
5772
5949
  t,
5773
5950
  this._values,
@@ -5777,7 +5954,7 @@ class Ko extends se {
5777
5954
  keydownHandler(e, t) {
5778
5955
  if (t.key === "Backspace") {
5779
5956
  const r = !this._values[e];
5780
- this._values = qo(
5957
+ this._values = Ko(
5781
5958
  e,
5782
5959
  t,
5783
5960
  this._values,
@@ -5786,12 +5963,12 @@ class Ko extends se {
5786
5963
  }
5787
5964
  }
5788
5965
  pasteHandler(e) {
5789
- this._values = Lo(e, this._values, this.dispatchCustomEvent.bind(this));
5966
+ this._values = jo(e, this._values, this.dispatchCustomEvent.bind(this));
5790
5967
  }
5791
5968
  render() {
5792
- return C`
5969
+ return x`
5793
5970
  <div class="code-inputs">
5794
- ${[0, 1, 2, 3, 4, 5].map((e) => C`
5971
+ ${[0, 1, 2, 3, 4, 5].map((e) => x`
5795
5972
  <input
5796
5973
  type = "text"
5797
5974
  inputmode = "numeric"
@@ -5810,19 +5987,19 @@ class Ko extends se {
5810
5987
  `;
5811
5988
  }
5812
5989
  }
5813
- typeof window < "u" && !window.AmazonCognitoIdentity && (window.AmazonCognitoIdentity = fs);
5814
- const Vo = {
5815
- "wral-report-it": Bo,
5816
- "wral-report-media": Mo,
5817
- "wral-code-input": Ko
5990
+ typeof window < "u" && !window.AmazonCognitoIdentity && (window.AmazonCognitoIdentity = ps);
5991
+ const Ho = {
5992
+ "wral-report-it": Oo,
5993
+ "wral-report-media": No,
5994
+ "wral-code-input": Vo
5818
5995
  };
5819
- function jo() {
5996
+ function zo() {
5820
5997
  const n = globalThis?.customElements;
5821
5998
  if (n)
5822
- for (const [e, t] of Object.entries(Vo))
5999
+ for (const [e, t] of Object.entries(Ho))
5823
6000
  n.get(e) || n.define(e, t);
5824
6001
  }
5825
- typeof window < "u" && globalThis.customElements && jo();
6002
+ typeof window < "u" && globalThis.customElements && zo();
5826
6003
  export {
5827
- jo as defineAll
6004
+ zo as defineAll
5828
6005
  };