@opensecret/react 0.3.4 → 0.3.5

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.
@@ -163,11 +163,11 @@ function oy() {
163
163
  }
164
164
  return null;
165
165
  }
166
- var ht = Object.assign, Ye = 0, Ge, oe, Te, ft, St, Et, ce;
166
+ var dt = Object.assign, Ye = 0, Ge, oe, Te, ft, St, Et, ce;
167
167
  function Xe() {
168
168
  }
169
169
  Xe.__reactDisabledLog = !0;
170
- function dt() {
170
+ function pt() {
171
171
  {
172
172
  if (Ye === 0) {
173
173
  Ge = console.log, oe = console.info, Te = console.warn, ft = console.error, St = console.group, Et = console.groupCollapsed, ce = console.groupEnd;
@@ -199,25 +199,25 @@ function oy() {
199
199
  writable: !0
200
200
  };
201
201
  Object.defineProperties(console, {
202
- log: ht({}, h, {
202
+ log: dt({}, h, {
203
203
  value: Ge
204
204
  }),
205
- info: ht({}, h, {
205
+ info: dt({}, h, {
206
206
  value: oe
207
207
  }),
208
- warn: ht({}, h, {
208
+ warn: dt({}, h, {
209
209
  value: Te
210
210
  }),
211
- error: ht({}, h, {
211
+ error: dt({}, h, {
212
212
  value: ft
213
213
  }),
214
- group: ht({}, h, {
214
+ group: dt({}, h, {
215
215
  value: St
216
216
  }),
217
- groupCollapsed: ht({}, h, {
217
+ groupCollapsed: dt({}, h, {
218
218
  value: Et
219
219
  }),
220
- groupEnd: ht({}, h, {
220
+ groupEnd: dt({}, h, {
221
221
  value: ce
222
222
  })
223
223
  });
@@ -257,7 +257,7 @@ function oy() {
257
257
  var Z = Error.prepareStackTrace;
258
258
  Error.prepareStackTrace = void 0;
259
259
  var F;
260
- F = nt.current, nt.current = null, dt();
260
+ F = nt.current, nt.current = null, pt();
261
261
  try {
262
262
  if (m) {
263
263
  var pe = function() {
@@ -525,7 +525,7 @@ Check the render method of \`` + h + "`.";
525
525
  return "";
526
526
  }
527
527
  }
528
- function pt(h) {
528
+ function yt(h) {
529
529
  return "";
530
530
  }
531
531
  var Ut = {};
@@ -617,7 +617,7 @@ Check the top-level render call using <` + _ + ">.");
617
617
  if (!pe) {
618
618
  var V = "";
619
619
  (h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (V += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
620
- var be = pt();
620
+ var be = yt();
621
621
  be ? V += be : V += Je();
622
622
  var ye;
623
623
  h === null ? ye = "null" : bn(h) ? ye = "array" : h !== void 0 && h.$$typeof === e ? (ye = "<" + (at(h.type) || "Unknown") + " />", V = " Did you accidentally export a JSX literal instead of a component?") : ye = typeof h, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ye, V);
@@ -756,10 +756,10 @@ function Or(r) {
756
756
  }
757
757
  const ly = 20;
758
758
  function uy(r, e, t) {
759
- let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], d = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], b = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], S = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], Y = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], $ = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], w = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], E = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], B = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], I = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], R = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], P = n, z = i, he = s, ae = o, de = c, Re = u, rt = d, ut = b, xt = S, At = Y, at = $, ht = w, Ye = E, Ge = B, oe = I, Te = R;
759
+ let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], d = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], b = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], S = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], Y = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], $ = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], w = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], E = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], B = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], I = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], R = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], P = n, z = i, he = s, ae = o, de = c, Re = u, rt = d, ut = b, xt = S, At = Y, at = $, dt = w, Ye = E, Ge = B, oe = I, Te = R;
760
760
  for (let ft = 0; ft < ly; ft += 2)
761
- P = P + de | 0, Ye ^= P, Ye = Ye >>> 16 | Ye << 16, xt = xt + Ye | 0, de ^= xt, de = de >>> 20 | de << 12, z = z + Re | 0, Ge ^= z, Ge = Ge >>> 16 | Ge << 16, At = At + Ge | 0, Re ^= At, Re = Re >>> 20 | Re << 12, he = he + rt | 0, oe ^= he, oe = oe >>> 16 | oe << 16, at = at + oe | 0, rt ^= at, rt = rt >>> 20 | rt << 12, ae = ae + ut | 0, Te ^= ae, Te = Te >>> 16 | Te << 16, ht = ht + Te | 0, ut ^= ht, ut = ut >>> 20 | ut << 12, he = he + rt | 0, oe ^= he, oe = oe >>> 24 | oe << 8, at = at + oe | 0, rt ^= at, rt = rt >>> 25 | rt << 7, ae = ae + ut | 0, Te ^= ae, Te = Te >>> 24 | Te << 8, ht = ht + Te | 0, ut ^= ht, ut = ut >>> 25 | ut << 7, z = z + Re | 0, Ge ^= z, Ge = Ge >>> 24 | Ge << 8, At = At + Ge | 0, Re ^= At, Re = Re >>> 25 | Re << 7, P = P + de | 0, Ye ^= P, Ye = Ye >>> 24 | Ye << 8, xt = xt + Ye | 0, de ^= xt, de = de >>> 25 | de << 7, P = P + Re | 0, Te ^= P, Te = Te >>> 16 | Te << 16, at = at + Te | 0, Re ^= at, Re = Re >>> 20 | Re << 12, z = z + rt | 0, Ye ^= z, Ye = Ye >>> 16 | Ye << 16, ht = ht + Ye | 0, rt ^= ht, rt = rt >>> 20 | rt << 12, he = he + ut | 0, Ge ^= he, Ge = Ge >>> 16 | Ge << 16, xt = xt + Ge | 0, ut ^= xt, ut = ut >>> 20 | ut << 12, ae = ae + de | 0, oe ^= ae, oe = oe >>> 16 | oe << 16, At = At + oe | 0, de ^= At, de = de >>> 20 | de << 12, he = he + ut | 0, Ge ^= he, Ge = Ge >>> 24 | Ge << 8, xt = xt + Ge | 0, ut ^= xt, ut = ut >>> 25 | ut << 7, ae = ae + de | 0, oe ^= ae, oe = oe >>> 24 | oe << 8, At = At + oe | 0, de ^= At, de = de >>> 25 | de << 7, z = z + rt | 0, Ye ^= z, Ye = Ye >>> 24 | Ye << 8, ht = ht + Ye | 0, rt ^= ht, rt = rt >>> 25 | rt << 7, P = P + Re | 0, Te ^= P, Te = Te >>> 24 | Te << 8, at = at + Te | 0, Re ^= at, Re = Re >>> 25 | Re << 7;
762
- Ft(P + n | 0, r, 0), Ft(z + i | 0, r, 4), Ft(he + s | 0, r, 8), Ft(ae + o | 0, r, 12), Ft(de + c | 0, r, 16), Ft(Re + u | 0, r, 20), Ft(rt + d | 0, r, 24), Ft(ut + b | 0, r, 28), Ft(xt + S | 0, r, 32), Ft(At + Y | 0, r, 36), Ft(at + $ | 0, r, 40), Ft(ht + w | 0, r, 44), Ft(Ye + E | 0, r, 48), Ft(Ge + B | 0, r, 52), Ft(oe + I | 0, r, 56), Ft(Te + R | 0, r, 60);
761
+ P = P + de | 0, Ye ^= P, Ye = Ye >>> 16 | Ye << 16, xt = xt + Ye | 0, de ^= xt, de = de >>> 20 | de << 12, z = z + Re | 0, Ge ^= z, Ge = Ge >>> 16 | Ge << 16, At = At + Ge | 0, Re ^= At, Re = Re >>> 20 | Re << 12, he = he + rt | 0, oe ^= he, oe = oe >>> 16 | oe << 16, at = at + oe | 0, rt ^= at, rt = rt >>> 20 | rt << 12, ae = ae + ut | 0, Te ^= ae, Te = Te >>> 16 | Te << 16, dt = dt + Te | 0, ut ^= dt, ut = ut >>> 20 | ut << 12, he = he + rt | 0, oe ^= he, oe = oe >>> 24 | oe << 8, at = at + oe | 0, rt ^= at, rt = rt >>> 25 | rt << 7, ae = ae + ut | 0, Te ^= ae, Te = Te >>> 24 | Te << 8, dt = dt + Te | 0, ut ^= dt, ut = ut >>> 25 | ut << 7, z = z + Re | 0, Ge ^= z, Ge = Ge >>> 24 | Ge << 8, At = At + Ge | 0, Re ^= At, Re = Re >>> 25 | Re << 7, P = P + de | 0, Ye ^= P, Ye = Ye >>> 24 | Ye << 8, xt = xt + Ye | 0, de ^= xt, de = de >>> 25 | de << 7, P = P + Re | 0, Te ^= P, Te = Te >>> 16 | Te << 16, at = at + Te | 0, Re ^= at, Re = Re >>> 20 | Re << 12, z = z + rt | 0, Ye ^= z, Ye = Ye >>> 16 | Ye << 16, dt = dt + Ye | 0, rt ^= dt, rt = rt >>> 20 | rt << 12, he = he + ut | 0, Ge ^= he, Ge = Ge >>> 16 | Ge << 16, xt = xt + Ge | 0, ut ^= xt, ut = ut >>> 20 | ut << 12, ae = ae + de | 0, oe ^= ae, oe = oe >>> 16 | oe << 16, At = At + oe | 0, de ^= At, de = de >>> 20 | de << 12, he = he + ut | 0, Ge ^= he, Ge = Ge >>> 24 | Ge << 8, xt = xt + Ge | 0, ut ^= xt, ut = ut >>> 25 | ut << 7, ae = ae + de | 0, oe ^= ae, oe = oe >>> 24 | oe << 8, At = At + oe | 0, de ^= At, de = de >>> 25 | de << 7, z = z + rt | 0, Ye ^= z, Ye = Ye >>> 24 | Ye << 8, dt = dt + Ye | 0, rt ^= dt, rt = rt >>> 25 | rt << 7, P = P + Re | 0, Te ^= P, Te = Te >>> 24 | Te << 8, at = at + Te | 0, Re ^= at, Re = Re >>> 25 | Re << 7;
762
+ Ft(P + n | 0, r, 0), Ft(z + i | 0, r, 4), Ft(he + s | 0, r, 8), Ft(ae + o | 0, r, 12), Ft(de + c | 0, r, 16), Ft(Re + u | 0, r, 20), Ft(rt + d | 0, r, 24), Ft(ut + b | 0, r, 28), Ft(xt + S | 0, r, 32), Ft(At + Y | 0, r, 36), Ft(at + $ | 0, r, 40), Ft(dt + w | 0, r, 44), Ft(Ye + E | 0, r, 48), Ft(Ge + B | 0, r, 52), Ft(oe + I | 0, r, 56), Ft(Te + R | 0, r, 60);
763
763
  }
764
764
  function nl(r, e, t, n, i = 0) {
765
765
  if (r.length !== 32)
@@ -847,10 +847,10 @@ class yy {
847
847
  u += (xt >>> 7 | At << 9) & 8191;
848
848
  let at = e[t + 8] | e[t + 9] << 8;
849
849
  d += (At >>> 4 | at << 12) & 8191, b += at >>> 1 & 8191;
850
- let ht = e[t + 10] | e[t + 11] << 8;
851
- S += (at >>> 14 | ht << 2) & 8191;
850
+ let dt = e[t + 10] | e[t + 11] << 8;
851
+ S += (at >>> 14 | dt << 2) & 8191;
852
852
  let Ye = e[t + 12] | e[t + 13] << 8;
853
- Y += (ht >>> 11 | Ye << 5) & 8191;
853
+ Y += (dt >>> 11 | Ye << 5) & 8191;
854
854
  let Ge = e[t + 14] | e[t + 15] << 8;
855
855
  $ += (Ye >>> 8 | Ge << 8) & 8191, w += Ge >>> 5 | i;
856
856
  let oe = 0, Te = oe;
@@ -865,14 +865,14 @@ class yy {
865
865
  ce += s * P, ce += o * R, ce += c * I, ce += u * B, ce += d * E, oe = ce >>> 13, ce &= 8191, ce += b * (5 * Re), ce += S * (5 * de), ce += Y * (5 * ae), ce += $ * (5 * he), ce += w * (5 * z), oe += ce >>> 13, ce &= 8191;
866
866
  let Xe = oe;
867
867
  Xe += s * z, Xe += o * P, Xe += c * R, Xe += u * I, Xe += d * B, oe = Xe >>> 13, Xe &= 8191, Xe += b * E, Xe += S * (5 * Re), Xe += Y * (5 * de), Xe += $ * (5 * ae), Xe += w * (5 * he), oe += Xe >>> 13, Xe &= 8191;
868
- let dt = oe;
869
- dt += s * he, dt += o * z, dt += c * P, dt += u * R, dt += d * I, oe = dt >>> 13, dt &= 8191, dt += b * B, dt += S * E, dt += Y * (5 * Re), dt += $ * (5 * de), dt += w * (5 * ae), oe += dt >>> 13, dt &= 8191;
868
+ let pt = oe;
869
+ pt += s * he, pt += o * z, pt += c * P, pt += u * R, pt += d * I, oe = pt >>> 13, pt &= 8191, pt += b * B, pt += S * E, pt += Y * (5 * Re), pt += $ * (5 * de), pt += w * (5 * ae), oe += pt >>> 13, pt &= 8191;
870
870
  let ee = oe;
871
871
  ee += s * ae, ee += o * he, ee += c * z, ee += u * P, ee += d * R, oe = ee >>> 13, ee &= 8191, ee += b * I, ee += S * B, ee += Y * E, ee += $ * (5 * Re), ee += w * (5 * de), oe += ee >>> 13, ee &= 8191;
872
872
  let nt = oe;
873
873
  nt += s * de, nt += o * ae, nt += c * he, nt += u * z, nt += d * P, oe = nt >>> 13, nt &= 8191, nt += b * R, nt += S * I, nt += Y * B, nt += $ * E, nt += w * (5 * Re), oe += nt >>> 13, nt &= 8191;
874
874
  let kt = oe;
875
- kt += s * Re, kt += o * de, kt += c * ae, kt += u * he, kt += d * z, oe = kt >>> 13, kt &= 8191, kt += b * P, kt += S * R, kt += Y * I, kt += $ * B, kt += w * E, oe += kt >>> 13, kt &= 8191, oe = (oe << 2) + oe | 0, oe = oe + Te | 0, Te = oe & 8191, oe = oe >>> 13, ft += oe, s = Te, o = ft, c = St, u = Et, d = ce, b = Xe, S = dt, Y = ee, $ = nt, w = kt, t += 16, n -= 16;
875
+ kt += s * Re, kt += o * de, kt += c * ae, kt += u * he, kt += d * z, oe = kt >>> 13, kt &= 8191, kt += b * P, kt += S * R, kt += Y * I, kt += $ * B, kt += w * E, oe += kt >>> 13, kt &= 8191, oe = (oe << 2) + oe | 0, oe = oe + Te | 0, Te = oe & 8191, oe = oe >>> 13, ft += oe, s = Te, o = ft, c = St, u = Et, d = ce, b = Xe, S = pt, Y = ee, $ = nt, w = kt, t += 16, n -= 16;
876
876
  }
877
877
  this._h[0] = s, this._h[1] = o, this._h[2] = c, this._h[3] = u, this._h[4] = d, this._h[5] = b, this._h[6] = S, this._h[7] = Y, this._h[8] = $, this._h[9] = w;
878
878
  }
@@ -1142,7 +1142,7 @@ var Nf;
1142
1142
  function he(k, C, j) {
1143
1143
  if (!ee(C))
1144
1144
  throw new TypeError();
1145
- return ce(j) || (j = Mt(j)), ht(k, C, j);
1145
+ return ce(j) || (j = Mt(j)), dt(k, C, j);
1146
1146
  }
1147
1147
  e("hasMetadata", he);
1148
1148
  function ae(k, C, j) {
@@ -1212,12 +1212,12 @@ var Nf;
1212
1212
  }
1213
1213
  return W;
1214
1214
  }
1215
- function ht(k, C, j) {
1215
+ function dt(k, C, j) {
1216
1216
  var W = Ye(k, C, j);
1217
1217
  if (W)
1218
1218
  return !0;
1219
1219
  var Ee = $n(C);
1220
- return Xe(Ee) ? !1 : ht(k, Ee, j);
1220
+ return Xe(Ee) ? !1 : dt(k, Ee, j);
1221
1221
  }
1222
1222
  function Ye(k, C, j) {
1223
1223
  var W = br(
@@ -1309,7 +1309,7 @@ var Nf;
1309
1309
  function Xe(k) {
1310
1310
  return k === null;
1311
1311
  }
1312
- function dt(k) {
1312
+ function pt(k) {
1313
1313
  return typeof k == "symbol";
1314
1314
  }
1315
1315
  function ee(k) {
@@ -1365,7 +1365,7 @@ var Nf;
1365
1365
  }
1366
1366
  function Mt(k) {
1367
1367
  var C = nt(k);
1368
- return dt(C) ? C : Xr(C);
1368
+ return pt(C) ? C : Xr(C);
1369
1369
  }
1370
1370
  function hi(k) {
1371
1371
  return Array.isArray ? Array.isArray(k) : k instanceof Object ? k instanceof Array : Object.prototype.toString.call(k) === "[object Array]";
@@ -1466,10 +1466,10 @@ var Nf;
1466
1466
  return C;
1467
1467
  if (!ce(W))
1468
1468
  for (var Je = Un(W); ; ) {
1469
- var pt = ir(Je);
1470
- if (!pt)
1469
+ var yt = ir(Je);
1470
+ if (!yt)
1471
1471
  return;
1472
- var Ut = Dn(pt);
1472
+ var Ut = Dn(yt);
1473
1473
  if (Ut.isProviderFor(ve, Me))
1474
1474
  return wn(Je), Ut;
1475
1475
  }
@@ -1479,8 +1479,8 @@ var Nf;
1479
1479
  return k;
1480
1480
  }
1481
1481
  function X(ve, Me) {
1482
- var Je = Ee.get(ve), pt;
1483
- return ce(Je) || (pt = Je.get(Me)), ce(pt) && (pt = Ue(ve, Me), ce(pt) || (ce(Je) && (Je = new Y(), Ee.set(ve, Je)), Je.set(Me, pt))), pt;
1482
+ var Je = Ee.get(ve), yt;
1483
+ return ce(Je) || (yt = Je.get(Me)), ce(yt) && (yt = Ue(ve, Me), ce(yt) || (ce(Je) && (Je = new Y(), Ee.set(ve, Je)), Je.set(Me, yt))), yt;
1484
1484
  }
1485
1485
  function te(ve) {
1486
1486
  if (ce(ve))
@@ -1490,9 +1490,9 @@ var Nf;
1490
1490
  function re(ve, Me, Je) {
1491
1491
  if (!te(Je))
1492
1492
  throw new Error("Metadata provider not registered.");
1493
- var pt = X(ve, Me);
1494
- if (pt !== Je) {
1495
- if (!ce(pt))
1493
+ var yt = X(ve, Me);
1494
+ if (yt !== Je) {
1495
+ if (!ce(yt))
1496
1496
  return !1;
1497
1497
  var Ut = Ee.get(ve);
1498
1498
  ce(Ut) && (Ut = new Y(), Ee.set(ve, Ut)), Ut.set(Me, Je);
@@ -1529,14 +1529,14 @@ var Nf;
1529
1529
  return;
1530
1530
  Me = new Y(), C.set(te, Me), Je = !0;
1531
1531
  }
1532
- var pt = Me.get(re);
1533
- if (ce(pt)) {
1532
+ var yt = Me.get(re);
1533
+ if (ce(yt)) {
1534
1534
  if (!ve)
1535
1535
  return;
1536
- if (pt = new Y(), Me.set(re, pt), !k.setProvider(te, re, j))
1536
+ if (yt = new Y(), Me.set(re, yt), !k.setProvider(te, re, j))
1537
1537
  throw Me.delete(re), Je && C.delete(te), new Error("Wrong provider for target.");
1538
1538
  }
1539
- return pt;
1539
+ return yt;
1540
1540
  }
1541
1541
  function Ee(te, re, ve) {
1542
1542
  var Me = W(
@@ -1575,8 +1575,8 @@ var Nf;
1575
1575
  );
1576
1576
  if (ce(Me))
1577
1577
  return ve;
1578
- for (var Je = Me.keys(), pt = Un(Je), Ut = 0; ; ) {
1579
- var Hn = ir(pt);
1578
+ for (var Je = Me.keys(), yt = Un(Je), Ut = 0; ; ) {
1579
+ var Hn = ir(yt);
1580
1580
  if (!Hn)
1581
1581
  return ve.length = Ut, ve;
1582
1582
  var Fn = Dn(Hn);
@@ -1584,7 +1584,7 @@ var Nf;
1584
1584
  ve[Ut] = Fn;
1585
1585
  } catch (vi) {
1586
1586
  try {
1587
- wn(pt);
1587
+ wn(yt);
1588
1588
  } finally {
1589
1589
  throw vi;
1590
1590
  }
@@ -14010,12 +14010,12 @@ async function Q1(r) {
14010
14010
  const e = Us(r), n = ka(e)[2], i = ka(n);
14011
14011
  return await X1.parse(i);
14012
14012
  }
14013
- async function em(r, e) {
14013
+ async function em(r) {
14014
14014
  try {
14015
- const t = await pm(r);
14016
- return e && (e === "http://127.0.0.1:3000" || e === "http://localhost:3000" || e === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await Q1(t)) : await Pa(t, ja, r);
14017
- } catch (t) {
14018
- throw t instanceof Error ? (console.error("Error verifying attestation document:", t), new Error(`Couldn't process attestation document: ${t.message}`)) : (console.error("Error verifying attestation document:", t), new Error("Couldn't process attestation document."));
14015
+ const e = await ym(r), t = cm();
14016
+ return t && (t === "http://127.0.0.1:3000" || t === "http://localhost:3000" || t === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await Q1(e)) : await Pa(e, ja, r);
14017
+ } catch (e) {
14018
+ throw e instanceof Error ? (console.error("Error verifying attestation document:", e), new Error(`Couldn't process attestation document: ${e.message}`)) : (console.error("Error verifying attestation document:", e), new Error("Couldn't process attestation document."));
14019
14019
  }
14020
14020
  }
14021
14021
  function tm(r) {
@@ -14155,7 +14155,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14155
14155
  var m = new Uint8Array(16);
14156
14156
  return At(m, 0, p, a, v, h), B(l, y, m, 0);
14157
14157
  }
14158
- function ht(l, y, p, a, v) {
14158
+ function dt(l, y, p, a, v) {
14159
14159
  var h;
14160
14160
  if (p < 32) return -1;
14161
14161
  for (ut(l, 0, y, 0, p, a, v), At(l, 16, l, 32, p - 32, l), h = 0; h < 16; h++) l[h] = 0;
@@ -14208,7 +14208,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14208
14208
  function Xe(l, y, p) {
14209
14209
  for (var a = 0; a < 16; a++) l[a] = y[a] + p[a];
14210
14210
  }
14211
- function dt(l, y, p) {
14211
+ function pt(l, y, p) {
14212
14212
  for (var a = 0; a < 16; a++) l[a] = y[a] - p[a];
14213
14213
  }
14214
14214
  function ee(l, y, p) {
@@ -14238,7 +14238,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14238
14238
  for (a[31] = y[31] & 127 | 64, a[0] &= 248, ce(v, p), m = 0; m < 16; m++)
14239
14239
  N[m] = v[m], F[m] = _[m] = Z[m] = 0;
14240
14240
  for (_[0] = F[0] = 1, m = 254; m >= 0; --m)
14241
- h = a[m >>> 3] >>> (m & 7) & 1, Te(_, N, h), Te(Z, F, h), Xe(pe, _, Z), dt(_, _, Z), Xe(Z, N, F), dt(N, N, F), nt(F, pe), nt(V, _), ee(_, Z, _), ee(Z, N, pe), Xe(pe, _, Z), dt(_, _, Z), nt(N, _), dt(Z, F, V), ee(_, Z, u), Xe(_, _, F), ee(Z, Z, _), ee(_, F, V), ee(F, N, v), nt(N, pe), Te(_, N, h), Te(Z, F, h);
14241
+ h = a[m >>> 3] >>> (m & 7) & 1, Te(_, N, h), Te(Z, F, h), Xe(pe, _, Z), pt(_, _, Z), Xe(Z, N, F), pt(N, N, F), nt(F, pe), nt(V, _), ee(_, Z, _), ee(Z, N, pe), Xe(pe, _, Z), pt(_, _, Z), nt(N, _), pt(Z, F, V), ee(_, Z, u), Xe(_, _, F), ee(Z, Z, _), ee(_, F, V), ee(F, N, v), nt(N, pe), Te(_, N, h), Te(Z, F, h);
14242
14242
  for (m = 0; m < 16; m++)
14243
14243
  v[m + 16] = _[m], v[m + 32] = Z[m], v[m + 48] = N[m], v[m + 64] = F[m];
14244
14244
  var be = v.subarray(32), ye = v.subarray(16);
@@ -14254,7 +14254,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14254
14254
  var a = new Uint8Array(32);
14255
14255
  return Xr(a, p, y), he(l, i, a, ae);
14256
14256
  }
14257
- var di = ht, As = Ye;
14257
+ var di = dt, As = Ye;
14258
14258
  function Qr(l, y, p, a, v, h) {
14259
14259
  var m = new Uint8Array(32);
14260
14260
  return Cr(m, v, h), di(l, y, p, a, m);
@@ -14445,7 +14445,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14445
14445
  }
14446
14446
  function wn(l, y) {
14447
14447
  var p = t(), a = t(), v = t(), h = t(), m = t(), _ = t(), N = t(), Z = t(), F = t();
14448
- dt(p, l[1], l[0]), dt(F, y[1], y[0]), ee(p, p, F), Xe(a, l[0], l[1]), Xe(F, y[0], y[1]), ee(a, a, F), ee(v, l[3], y[3]), ee(v, v, b), ee(h, l[2], y[2]), Xe(h, h, h), dt(m, a, p), dt(_, h, v), Xe(N, h, v), Xe(Z, a, p), ee(l[0], m, _), ee(l[1], Z, N), ee(l[2], N, _), ee(l[3], m, Z);
14448
+ pt(p, l[1], l[0]), pt(F, y[1], y[0]), ee(p, p, F), Xe(a, l[0], l[1]), Xe(F, y[0], y[1]), ee(a, a, F), ee(v, l[3], y[3]), ee(v, v, b), ee(h, l[2], y[2]), Xe(h, h, h), pt(m, a, p), pt(_, h, v), Xe(N, h, v), Xe(Z, a, p), ee(l[0], m, _), ee(l[1], Z, N), ee(l[2], N, _), ee(l[3], m, Z);
14449
14449
  }
14450
14450
  function $n(l, y, p) {
14451
14451
  var a;
@@ -14506,7 +14506,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14506
14506
  }
14507
14507
  function Ln(l, y) {
14508
14508
  var p = t(), a = t(), v = t(), h = t(), m = t(), _ = t(), N = t();
14509
- return Ge(l[2], c), ce(l[1], y), nt(v, l[1]), ee(h, v, d), dt(v, v, l[2]), Xe(h, l[2], h), nt(m, h), nt(_, m), ee(N, _, m), ee(p, N, v), ee(p, p, h), Jr(p, p), ee(p, p, v), ee(p, p, h), ee(p, p, h), ee(l[0], p, h), nt(a, l[0]), ee(a, a, h), St(a, v) && ee(l[0], l[0], $), nt(a, l[0]), ee(a, a, h), St(a, v) ? -1 : (Et(l[0]) === y[31] >> 7 && dt(l[0], o, l[0]), ee(l[3], l[0], l[1]), 0);
14509
+ return Ge(l[2], c), ce(l[1], y), nt(v, l[1]), ee(h, v, d), pt(v, v, l[2]), Xe(h, l[2], h), nt(m, h), nt(_, m), ee(N, _, m), ee(p, N, v), ee(p, p, h), Jr(p, p), ee(p, p, v), ee(p, p, h), ee(p, p, h), ee(l[0], p, h), nt(a, l[0]), ee(a, a, h), St(a, v) && ee(l[0], l[0], $), nt(a, l[0]), ee(a, a, h), St(a, v) ? -1 : (Et(l[0]) === y[31] >> 7 && pt(l[0], o, l[0]), ee(l[3], l[0], l[1]), 0);
14510
14510
  }
14511
14511
  function k(l, y, p, a) {
14512
14512
  var v, h = new Uint8Array(32), m = new Uint8Array(64), _ = [t(), t(), t(), t()], N = [t(), t(), t(), t()];
@@ -14520,7 +14520,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14520
14520
  for (v = 0; v < p; v++) l[v] = y[v + 64];
14521
14521
  return p;
14522
14522
  }
14523
- var C = 32, j = 24, W = 32, Ee = 16, wt = 32, bt = 32, Ue = 32, X = 32, te = 32, re = j, ve = W, Me = Ee, Je = 64, pt = 32, Ut = 64, Hn = 32, Fn = 64;
14523
+ var C = 32, j = 24, W = 32, Ee = 16, wt = 32, bt = 32, Ue = 32, X = 32, te = 32, re = j, ve = W, Me = Ee, Je = 64, yt = 32, Ut = 64, Hn = 32, Fn = 64;
14524
14524
  e.lowlevel = {
14525
14525
  crypto_core_hsalsa20: he,
14526
14526
  crypto_stream_xor: ut,
@@ -14531,7 +14531,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14531
14531
  crypto_onetimeauth_verify: at,
14532
14532
  crypto_verify_16: B,
14533
14533
  crypto_verify_32: I,
14534
- crypto_secretbox: ht,
14534
+ crypto_secretbox: dt,
14535
14535
  crypto_secretbox_open: Ye,
14536
14536
  crypto_scalarmult: Xr,
14537
14537
  crypto_scalarmult_base: Mt,
@@ -14557,7 +14557,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14557
14557
  crypto_box_ZEROBYTES: ve,
14558
14558
  crypto_box_BOXZEROBYTES: Me,
14559
14559
  crypto_sign_BYTES: Je,
14560
- crypto_sign_PUBLICKEYBYTES: pt,
14560
+ crypto_sign_PUBLICKEYBYTES: yt,
14561
14561
  crypto_sign_SECRETKEYBYTES: Ut,
14562
14562
  crypto_sign_SEEDBYTES: Hn,
14563
14563
  crypto_hash_BYTES: Fn,
@@ -14569,7 +14569,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14569
14569
  M: ee,
14570
14570
  A: Xe,
14571
14571
  S: nt,
14572
- Z: dt,
14572
+ Z: pt,
14573
14573
  pow2523: Jr,
14574
14574
  add: wn,
14575
14575
  set25519: Ge,
@@ -14599,7 +14599,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14599
14599
  }, e.secretbox = function(l, y, p) {
14600
14600
  sr(l, y, p), vi(p, y);
14601
14601
  for (var a = new Uint8Array(W + l.length), v = new Uint8Array(a.length), h = 0; h < l.length; h++) a[h + W] = l[h];
14602
- return ht(v, a, a.length, y, p), v.subarray(Ee);
14602
+ return dt(v, a, a.length, y, p), v.subarray(Ee);
14603
14603
  }, e.secretbox.open = function(l, y, p) {
14604
14604
  sr(l, y, p), vi(p, y);
14605
14605
  for (var a = new Uint8Array(Ee + l.length), v = new Uint8Array(a.length), h = 0; h < l.length; h++) a[h + Ee] = l[h];
@@ -14637,7 +14637,7 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14637
14637
  var p = new Uint8Array(Je + l.length);
14638
14638
  return gi(p, l, l.length, y), p;
14639
14639
  }, e.sign.open = function(l, y) {
14640
- if (sr(l, y), y.length !== pt)
14640
+ if (sr(l, y), y.length !== yt)
14641
14641
  throw new Error("bad public key size");
14642
14642
  var p = new Uint8Array(l.length), a = k(p, l, l.length, y);
14643
14643
  if (a < 0) return null;
@@ -14649,26 +14649,26 @@ const rm = {}, nm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
14649
14649
  }, e.sign.detached.verify = function(l, y, p) {
14650
14650
  if (sr(l, y, p), y.length !== Je)
14651
14651
  throw new Error("bad signature size");
14652
- if (p.length !== pt)
14652
+ if (p.length !== yt)
14653
14653
  throw new Error("bad public key size");
14654
14654
  var a = new Uint8Array(Je + l.length), v = new Uint8Array(Je + l.length), h;
14655
14655
  for (h = 0; h < Je; h++) a[h] = y[h];
14656
14656
  for (h = 0; h < l.length; h++) a[h + Je] = l[h];
14657
14657
  return k(v, a, a.length, p) >= 0;
14658
14658
  }, e.sign.keyPair = function() {
14659
- var l = new Uint8Array(pt), y = new Uint8Array(Ut);
14659
+ var l = new Uint8Array(yt), y = new Uint8Array(Ut);
14660
14660
  return Vn(l, y), { publicKey: l, secretKey: y };
14661
14661
  }, e.sign.keyPair.fromSecretKey = function(l) {
14662
14662
  if (sr(l), l.length !== Ut)
14663
14663
  throw new Error("bad secret key size");
14664
- for (var y = new Uint8Array(pt), p = 0; p < y.length; p++) y[p] = l[32 + p];
14664
+ for (var y = new Uint8Array(yt), p = 0; p < y.length; p++) y[p] = l[32 + p];
14665
14665
  return { publicKey: y, secretKey: new Uint8Array(l) };
14666
14666
  }, e.sign.keyPair.fromSeed = function(l) {
14667
14667
  if (sr(l), l.length !== Hn)
14668
14668
  throw new Error("bad seed size");
14669
- for (var y = new Uint8Array(pt), p = new Uint8Array(Ut), a = 0; a < 32; a++) p[a] = l[a];
14669
+ for (var y = new Uint8Array(yt), p = new Uint8Array(Ut), a = 0; a < 32; a++) p[a] = l[a];
14670
14670
  return Vn(y, p, !0), { publicKey: y, secretKey: p };
14671
- }, e.sign.publicKeyLength = pt, e.sign.secretKeyLength = Ut, e.sign.seedLength = Hn, e.sign.signatureLength = Je, e.hash = function(l) {
14671
+ }, e.sign.publicKeyLength = yt, e.sign.secretKeyLength = Ut, e.sign.seedLength = Hn, e.sign.signatureLength = Je, e.hash = function(l) {
14672
14672
  sr(l);
14673
14673
  var y = new Uint8Array(Fn);
14674
14674
  return ir(y, l, l.length), y;
@@ -14710,12 +14710,12 @@ async function ho(r, e) {
14710
14710
  }
14711
14711
  const i = window.crypto.randomUUID();
14712
14712
  console.log("Generated attestation nonce:", i);
14713
- const s = await em(i, e);
14713
+ const s = await em(i);
14714
14714
  if (s && s.public_key) {
14715
14715
  console.log("Attestation document verification succeeded");
14716
14716
  const o = om();
14717
14717
  console.log("Generated client key pair");
14718
- const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: d } = await ym(
14718
+ const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: d } = await gm(
14719
14719
  Lr(o.publicKey),
14720
14720
  i
14721
14721
  );
@@ -14823,34 +14823,37 @@ async function Ir(r, e, t, n, i) {
14823
14823
  throw new Error("No data received from the server");
14824
14824
  return s.data;
14825
14825
  }
14826
- let yt = "http://localhost:3000";
14826
+ let ht = "";
14827
14827
  function am(r) {
14828
- yt = r;
14828
+ ht = r;
14829
14829
  }
14830
- async function cm(r, e) {
14830
+ function cm() {
14831
+ return ht;
14832
+ }
14833
+ async function lm(r, e) {
14831
14834
  return Ir(
14832
- `${yt}/login`,
14835
+ `${ht}/login`,
14833
14836
  "POST",
14834
14837
  { email: r, password: e }
14835
14838
  );
14836
14839
  }
14837
- async function lm(r, e) {
14840
+ async function um(r, e) {
14838
14841
  return Ir(
14839
- `${yt}/login`,
14842
+ `${ht}/login`,
14840
14843
  "POST",
14841
14844
  { id: r, password: e }
14842
14845
  );
14843
14846
  }
14844
- async function um(r, e, t, n) {
14845
- return Ir(`${yt}/register`, "POST", {
14847
+ async function fm(r, e, t, n) {
14848
+ return Ir(`${ht}/register`, "POST", {
14846
14849
  email: r,
14847
14850
  password: e,
14848
14851
  inviteCode: t.toLowerCase(),
14849
14852
  name: n
14850
14853
  });
14851
14854
  }
14852
- async function fm(r, e) {
14853
- return Ir(`${yt}/register`, "POST", {
14855
+ async function hm(r, e) {
14856
+ return Ir(`${ht}/register`, "POST", {
14854
14857
  password: r,
14855
14858
  inviteCode: e.toLowerCase()
14856
14859
  });
@@ -14861,7 +14864,7 @@ async function jc() {
14861
14864
  const e = { refresh_token: r };
14862
14865
  try {
14863
14866
  const t = await Ir(
14864
- `${yt}/refresh`,
14867
+ `${ht}/refresh`,
14865
14868
  "POST",
14866
14869
  e,
14867
14870
  void 0,
@@ -14872,9 +14875,9 @@ async function jc() {
14872
14875
  throw console.error("Error refreshing token:", t), t;
14873
14876
  }
14874
14877
  }
14875
- async function hm() {
14878
+ async function dm() {
14876
14879
  return kr(
14877
- `${yt}/protected/user`,
14880
+ `${ht}/protected/user`,
14878
14881
  "GET",
14879
14882
  void 0,
14880
14883
  "Failed to fetch user"
@@ -14882,7 +14885,7 @@ async function hm() {
14882
14885
  }
14883
14886
  async function $0(r, e) {
14884
14887
  return kr(
14885
- `${yt}/protected/kv/${r}`,
14888
+ `${ht}/protected/kv/${r}`,
14886
14889
  "PUT",
14887
14890
  e,
14888
14891
  "Failed to put key-value pair"
@@ -14890,7 +14893,7 @@ async function $0(r, e) {
14890
14893
  }
14891
14894
  async function M0(r) {
14892
14895
  return kr(
14893
- `${yt}/protected/kv/${r}`,
14896
+ `${ht}/protected/kv/${r}`,
14894
14897
  "DELETE",
14895
14898
  void 0,
14896
14899
  "Failed to delete key-value pair"
@@ -14899,7 +14902,7 @@ async function M0(r) {
14899
14902
  async function V0(r) {
14900
14903
  try {
14901
14904
  return await kr(
14902
- `${yt}/protected/kv/${r}`,
14905
+ `${ht}/protected/kv/${r}`,
14903
14906
  "GET",
14904
14907
  void 0,
14905
14908
  "Failed to get key-value pair"
@@ -14911,19 +14914,19 @@ async function V0(r) {
14911
14914
  }
14912
14915
  async function L0() {
14913
14916
  return kr(
14914
- `${yt}/protected/kv`,
14917
+ `${ht}/protected/kv`,
14915
14918
  "GET",
14916
14919
  void 0,
14917
14920
  "Failed to list key-value pairs"
14918
14921
  );
14919
14922
  }
14920
- async function dm(r) {
14923
+ async function pm(r) {
14921
14924
  const e = { refresh_token: r };
14922
- return Ir(`${yt}/logout`, "POST", e);
14925
+ return Ir(`${ht}/logout`, "POST", e);
14923
14926
  }
14924
14927
  async function H0(r) {
14925
14928
  return Ir(
14926
- `${yt}/verify-email/${r}`,
14929
+ `${ht}/verify-email/${r}`,
14927
14930
  "GET",
14928
14931
  void 0,
14929
14932
  void 0,
@@ -14932,20 +14935,20 @@ async function H0(r) {
14932
14935
  }
14933
14936
  async function Ua() {
14934
14937
  return kr(
14935
- `${yt}/protected/request_verification`,
14938
+ `${ht}/protected/request_verification`,
14936
14939
  "POST",
14937
14940
  void 0,
14938
14941
  "Failed to request new verification code"
14939
14942
  );
14940
14943
  }
14941
- async function pm(r) {
14942
- const e = await fetch(`${yt}/attestation/${r}`);
14944
+ async function ym(r) {
14945
+ const e = await fetch(`${ht}/attestation/${r}`);
14943
14946
  if (!e.ok)
14944
14947
  throw new Error(`Request failed with status ${e.status}`);
14945
14948
  return (await e.json()).attestation_document;
14946
14949
  }
14947
- async function ym(r, e) {
14948
- const t = await fetch(`${yt}/key_exchange`, {
14950
+ async function gm(r, e) {
14951
+ const t = await fetch(`${ht}/key_exchange`, {
14949
14952
  method: "POST",
14950
14953
  headers: {
14951
14954
  "Content-Type": "application/json"
@@ -14959,7 +14962,7 @@ async function ym(r, e) {
14959
14962
  async function F0(r, e) {
14960
14963
  const t = { email: r, hashed_secret: e };
14961
14964
  return Ir(
14962
- `${yt}/password-reset/request`,
14965
+ `${ht}/password-reset/request`,
14963
14966
  "POST",
14964
14967
  t,
14965
14968
  void 0,
@@ -14974,7 +14977,7 @@ async function G0(r, e, t, n) {
14974
14977
  new_password: n
14975
14978
  };
14976
14979
  return Ir(
14977
- `${yt}/password-reset/confirm`,
14980
+ `${ht}/password-reset/confirm`,
14978
14981
  "POST",
14979
14982
  i,
14980
14983
  void 0,
@@ -14987,16 +14990,16 @@ async function z0(r, e) {
14987
14990
  new_password: e
14988
14991
  };
14989
14992
  return kr(
14990
- `${yt}/protected/change_password`,
14993
+ `${ht}/protected/change_password`,
14991
14994
  "POST",
14992
14995
  t,
14993
14996
  "Failed to change password"
14994
14997
  );
14995
14998
  }
14996
- async function gm(r) {
14999
+ async function vm(r) {
14997
15000
  try {
14998
15001
  return await Ir(
14999
- `${yt}/auth/github`,
15002
+ `${ht}/auth/github`,
15000
15003
  "POST",
15001
15004
  r ? { invite_code: r } : {},
15002
15005
  void 0,
@@ -15006,11 +15009,11 @@ async function gm(r) {
15006
15009
  throw e instanceof Error && e.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : e;
15007
15010
  }
15008
15011
  }
15009
- async function vm(r, e, t) {
15012
+ async function mm(r, e, t) {
15010
15013
  const n = { code: r, state: e, invite_code: t };
15011
15014
  try {
15012
15015
  return await Ir(
15013
- `${yt}/auth/github/callback`,
15016
+ `${ht}/auth/github/callback`,
15014
15017
  "POST",
15015
15018
  n,
15016
15019
  void 0,
@@ -15024,10 +15027,10 @@ async function vm(r, e, t) {
15024
15027
  ) : new Error("Failed to authenticate with GitHub. Please try again.") : i;
15025
15028
  }
15026
15029
  }
15027
- async function mm(r) {
15030
+ async function wm(r) {
15028
15031
  try {
15029
15032
  return await Ir(
15030
- `${yt}/auth/google`,
15033
+ `${ht}/auth/google`,
15031
15034
  "POST",
15032
15035
  r ? { invite_code: r } : {},
15033
15036
  void 0,
@@ -15037,11 +15040,11 @@ async function mm(r) {
15037
15040
  throw e instanceof Error && e.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : e;
15038
15041
  }
15039
15042
  }
15040
- async function wm(r, e, t) {
15043
+ async function bm(r, e, t) {
15041
15044
  const n = { code: r, state: e, invite_code: t };
15042
15045
  try {
15043
15046
  return await Ir(
15044
- `${yt}/auth/google/callback`,
15047
+ `${ht}/auth/google/callback`,
15045
15048
  "POST",
15046
15049
  n,
15047
15050
  void 0,
@@ -15057,14 +15060,14 @@ async function wm(r, e, t) {
15057
15060
  }
15058
15061
  async function K0() {
15059
15062
  return kr(
15060
- `${yt}/protected/private_key`,
15063
+ `${ht}/protected/private_key`,
15061
15064
  "GET",
15062
15065
  void 0,
15063
15066
  "Failed to fetch private key"
15064
15067
  );
15065
15068
  }
15066
15069
  async function Z0(r) {
15067
- const e = r ? `${yt}/protected/private_key_bytes?derivation_path=${encodeURIComponent(r)}` : `${yt}/protected/private_key_bytes`;
15070
+ const e = r ? `${ht}/protected/private_key_bytes?derivation_path=${encodeURIComponent(r)}` : `${ht}/protected/private_key_bytes`;
15068
15071
  return kr(
15069
15072
  e,
15070
15073
  "GET",
@@ -15075,7 +15078,7 @@ async function Z0(r) {
15075
15078
  async function q0(r, e, t) {
15076
15079
  const n = Lr(r);
15077
15080
  return kr(
15078
- `${yt}/protected/sign_message`,
15081
+ `${ht}/protected/sign_message`,
15079
15082
  "POST",
15080
15083
  {
15081
15084
  message_base64: n,
@@ -15086,7 +15089,7 @@ async function q0(r, e, t) {
15086
15089
  );
15087
15090
  }
15088
15091
  async function W0(r, e) {
15089
- const t = e ? `${yt}/protected/public_key?algorithm=${r}&derivation_path=${encodeURIComponent(e)}` : `${yt}/protected/public_key?algorithm=${r}`;
15092
+ const t = e ? `${ht}/protected/public_key?algorithm=${r}&derivation_path=${encodeURIComponent(e)}` : `${ht}/protected/public_key?algorithm=${r}`;
15090
15093
  return kr(
15091
15094
  t,
15092
15095
  "GET",
@@ -15094,28 +15097,28 @@ async function W0(r, e) {
15094
15097
  "Failed to fetch public key"
15095
15098
  );
15096
15099
  }
15097
- async function bm(r, e, t) {
15100
+ async function xm(r, e, t) {
15098
15101
  const n = {
15099
15102
  email: r,
15100
15103
  password: e,
15101
15104
  name: t
15102
15105
  };
15103
15106
  return kr(
15104
- `${yt}/protected/convert_guest`,
15107
+ `${ht}/protected/convert_guest`,
15105
15108
  "POST",
15106
15109
  n,
15107
15110
  "Failed to convert guest account"
15108
15111
  );
15109
15112
  }
15110
- async function xm(r) {
15113
+ async function Am(r) {
15111
15114
  return kr(
15112
- `${yt}/protected/third_party_token`,
15115
+ `${ht}/protected/third_party_token`,
15113
15116
  "POST",
15114
15117
  { audience: r },
15115
15118
  "Failed to generate third party token"
15116
15119
  );
15117
15120
  }
15118
- function Am() {
15121
+ function _m() {
15119
15122
  return async (r, e) => {
15120
15123
  var n, i;
15121
15124
  const t = () => {
@@ -15157,7 +15160,7 @@ function Am() {
15157
15160
  const I = S.decode(B);
15158
15161
  Y += I;
15159
15162
  let R;
15160
- for (; R = _m(Y); )
15163
+ for (; R = Sm(Y); )
15161
15164
  if (Y = Y.slice(R.length), R.trim().startsWith("data: ")) {
15162
15165
  const P = R.slice(6).trim();
15163
15166
  if (P === "[DONE]")
@@ -15201,13 +15204,13 @@ function Am() {
15201
15204
  }
15202
15205
  };
15203
15206
  }
15204
- function _m(r) {
15207
+ function Sm(r) {
15205
15208
  const e = r.indexOf(`
15206
15209
 
15207
15210
  `);
15208
15211
  return e === -1 ? null : r.slice(0, e + 2);
15209
15212
  }
15210
- const Sm = [
15213
+ const Em = [
15211
15214
  "eeddbb58f57c38894d6d5af5e575fbe791c5bf3bbcfb5df8da8cfcf0c2e1da1913108e6a762112444740b88c163d7f4b",
15212
15215
  "74ed417f88cb0ca76c4a3d10f278bd010f1d3f95eafb254d4732511bb50e404507a4049b779c5230137e4091a5582271",
15213
15216
  "9043fcab93b972d3c14ad2dc8fa78ca7ad374fc937c02435681772a003f7a72876bc4d578089b5c4cf3fe9b480f1aabb",
@@ -15215,7 +15218,7 @@ const Sm = [
15215
15218
  "91cb67311e910cce68cd5b7d0de77aa40610d87c6681439b44c46c3ff786ae643956ab2c812478a1da8745b259f07a45",
15216
15219
  "859065ac81b81d3735130ba08b8af72a7256b603fefb74faabae25ed28cca6edcaa7c10ea32b5948d675c18a9b0f2b1d",
15217
15220
  "acd82a7d3943e23e95a9dc3ce0b0107ea358d6287f9e3afa245622f7c7e3e0a66142a928b6efcc02f594a95366d3a99d"
15218
- ], Em = [
15221
+ ], km = [
15219
15222
  "62c0407056217a4c10764ed9045694c29fa93255d3cc04c2f989cdd9a1f8050c8b169714c71f1118ebce2fcc9951d1a9",
15220
15223
  "cb95519905443f9f66f05f63c548b61ad1561a27fd5717b69285861aaea3c3063fe12a2571773b67fea3c6c11b4d8ec6",
15221
15224
  "deb5895831b5e4286f5a2dcf5e9c27383821446f8df2b465f141d10743599be20ba3bb381ce063bf7139cc89f7f61d4c",
@@ -15224,8 +15227,8 @@ const Sm = [
15224
15227
  "a791bf92c25ffdfd372660e460a0e238c6778c090672df6509ae4bc065cf8668b6baac6b6a11d554af53ee0ff0172ad5",
15225
15228
  "c4285443b87b9b12a6cea3bef1064ec060f652b235a297095975af8f134e5ed65f92d70d4616fdec80af9dff48bb9f35"
15226
15229
  ];
15227
- function km(r, e) {
15228
- const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...Sm], n = [...(e == null ? void 0 : e.pcr0DevValues) || [], ...Em];
15230
+ function Im(r, e) {
15231
+ const t = [...(e == null ? void 0 : e.pcr0Values) || [], ...Em], n = [...(e == null ? void 0 : e.pcr0DevValues) || [], ...km];
15229
15232
  return t.includes(r) ? {
15230
15233
  isMatch: !0,
15231
15234
  text: "PCR0 matches a known good value"
@@ -15241,7 +15244,7 @@ const Bu = ja, Y0 = "641a0321a3e244efe456463195d606317ed7cdcc3c1756e09893f3c68f7
15241
15244
  function J0(r) {
15242
15245
  return Array.from(r).map((e) => e.toString(16).padStart(2, "0")).join("");
15243
15246
  }
15244
- async function Im(r) {
15247
+ async function Cm(r) {
15245
15248
  const e = await crypto.subtle.digest("SHA-256", r);
15246
15249
  return J0(new Uint8Array(e));
15247
15250
  }
@@ -15250,7 +15253,7 @@ async function Ou(r, e, t) {
15250
15253
  const n = Array.from(r.pcrs.entries()).map(([b, S]) => ({
15251
15254
  id: b,
15252
15255
  value: J0(S)
15253
- })).filter((b) => !b.value.match(/^0+$/)), i = n.find((b) => b.id === 0), s = i ? km(i.value, t) : null, o = [...e, r.certificate].map((b) => {
15256
+ })).filter((b) => !b.value.match(/^0+$/)), i = n.find((b) => b.id === 0), s = i ? Im(i.value, t) : null, o = [...e, r.certificate].map((b) => {
15254
15257
  const S = new $i(b);
15255
15258
  return {
15256
15259
  subject: S.subject,
@@ -15259,7 +15262,7 @@ async function Ou(r, e, t) {
15259
15262
  pem: S.toString("pem"),
15260
15263
  isRoot: S.subject === "C=US, O=Amazon, OU=AWS, CN=aws.nitro-enclaves"
15261
15264
  };
15262
- }), c = new TextDecoder(), u = new $i(e[0]), d = await Im(u.rawData);
15265
+ }), c = new TextDecoder(), u = new $i(e[0]), d = await Cm(u.rawData);
15263
15266
  return {
15264
15267
  moduleId: r.module_id,
15265
15268
  publicKey: r.public_key ? Lr(r.public_key) : null,
@@ -15338,7 +15341,7 @@ const X0 = ty({
15338
15341
  },
15339
15342
  generateThirdPartyToken: async () => ({ token: "" })
15340
15343
  });
15341
- function Ib({
15344
+ function Cb({
15342
15345
  children: r,
15343
15346
  apiUrl: e,
15344
15347
  pcrConfig: t = {}
@@ -15352,7 +15355,7 @@ function Ib({
15352
15355
  throw new Error("OpenSecretProvider requires a non-empty apiUrl. Please provide a valid API endpoint URL.");
15353
15356
  am(e);
15354
15357
  }, [e]), Dc(() => {
15355
- n.user ? o(() => Am()) : o(void 0);
15358
+ n.user ? o(() => _m()) : o(void 0);
15356
15359
  }, [n.user]);
15357
15360
  async function c() {
15358
15361
  const z = window.localStorage.getItem("access_token"), he = window.localStorage.getItem("refresh_token");
@@ -15364,7 +15367,7 @@ function Ib({
15364
15367
  return;
15365
15368
  }
15366
15369
  try {
15367
- const ae = await hm();
15370
+ const ae = await dm();
15368
15371
  i({
15369
15372
  loading: !1,
15370
15373
  user: ae
@@ -15382,7 +15385,7 @@ function Ib({
15382
15385
  async function u(z, he) {
15383
15386
  console.log("Signing in");
15384
15387
  try {
15385
- const { access_token: ae, refresh_token: de } = await cm(z, he);
15388
+ const { access_token: ae, refresh_token: de } = await lm(z, he);
15386
15389
  window.localStorage.setItem("access_token", ae), window.localStorage.setItem("refresh_token", de), await c();
15387
15390
  } catch (ae) {
15388
15391
  throw console.error(ae), ae;
@@ -15390,7 +15393,7 @@ function Ib({
15390
15393
  }
15391
15394
  async function d(z, he, ae, de) {
15392
15395
  try {
15393
- const { access_token: Re, refresh_token: rt } = await um(
15396
+ const { access_token: Re, refresh_token: rt } = await fm(
15394
15397
  z,
15395
15398
  he,
15396
15399
  ae,
@@ -15404,7 +15407,7 @@ function Ib({
15404
15407
  async function b(z, he) {
15405
15408
  console.log("Signing in Guest");
15406
15409
  try {
15407
- const { access_token: ae, refresh_token: de } = await lm(z, he);
15410
+ const { access_token: ae, refresh_token: de } = await um(z, he);
15408
15411
  window.localStorage.setItem("access_token", ae), window.localStorage.setItem("refresh_token", de), await c();
15409
15412
  } catch (ae) {
15410
15413
  throw console.error(ae), ae;
@@ -15412,7 +15415,7 @@ function Ib({
15412
15415
  }
15413
15416
  async function S(z, he) {
15414
15417
  try {
15415
- const { access_token: ae, refresh_token: de, id: Re } = await fm(
15418
+ const { access_token: ae, refresh_token: de, id: Re } = await hm(
15416
15419
  z,
15417
15420
  he
15418
15421
  );
@@ -15423,7 +15426,7 @@ function Ib({
15423
15426
  }
15424
15427
  async function Y(z, he, ae) {
15425
15428
  try {
15426
- await bm(
15429
+ await xm(
15427
15430
  z,
15428
15431
  he,
15429
15432
  ae
@@ -15436,7 +15439,7 @@ function Ib({
15436
15439
  const z = window.localStorage.getItem("refresh_token");
15437
15440
  if (z)
15438
15441
  try {
15439
- await dm(z);
15442
+ await pm(z);
15440
15443
  } catch (he) {
15441
15444
  console.error("Error during logout:", he);
15442
15445
  }
@@ -15467,14 +15470,14 @@ function Ib({
15467
15470
  confirmPasswordReset: G0,
15468
15471
  initiateGitHubAuth: async (z) => {
15469
15472
  try {
15470
- return await gm(z);
15473
+ return await vm(z);
15471
15474
  } catch (he) {
15472
15475
  throw console.error("Failed to initiate GitHub auth:", he), he;
15473
15476
  }
15474
15477
  },
15475
15478
  handleGitHubCallback: async (z, he, ae) => {
15476
15479
  try {
15477
- const { access_token: de, refresh_token: Re } = await vm(
15480
+ const { access_token: de, refresh_token: Re } = await mm(
15478
15481
  z,
15479
15482
  he,
15480
15483
  ae
@@ -15486,14 +15489,14 @@ function Ib({
15486
15489
  },
15487
15490
  initiateGoogleAuth: async (z) => {
15488
15491
  try {
15489
- return await mm(z);
15492
+ return await wm(z);
15490
15493
  } catch (he) {
15491
15494
  throw console.error("Failed to initiate Google auth:", he), he;
15492
15495
  }
15493
15496
  },
15494
15497
  handleGoogleCallback: async (z, he, ae) => {
15495
15498
  try {
15496
- const { access_token: de, refresh_token: Re } = await wm(
15499
+ const { access_token: de, refresh_token: Re } = await bm(
15497
15500
  z,
15498
15501
  he,
15499
15502
  ae
@@ -15522,28 +15525,28 @@ function Ib({
15522
15525
  const ae = await he.json(), de = await Pa(ae.attestation_document, Bu, z);
15523
15526
  return Ou(de, de.cabundle, t);
15524
15527
  },
15525
- generateThirdPartyToken: xm
15528
+ generateThirdPartyToken: Am
15526
15529
  };
15527
15530
  return /* @__PURE__ */ ay.jsx(X0.Provider, { value: P, children: r });
15528
15531
  }
15529
- function Cb() {
15532
+ function Bb() {
15530
15533
  const r = ry(X0);
15531
15534
  if (!r)
15532
15535
  throw new Error("useOpenSecret must be used within an OpenSecretProvider");
15533
15536
  return r;
15534
15537
  }
15535
- function Bb() {
15538
+ function Ob() {
15536
15539
  const r = new Uint8Array(32);
15537
15540
  return crypto.getRandomValues(r), Array.from(r, (e) => e.toString(16).padStart(2, "0")).join("");
15538
15541
  }
15539
- async function Ob(r) {
15542
+ async function Tb(r) {
15540
15543
  const t = new TextEncoder().encode(r), n = await crypto.subtle.digest("SHA-256", t);
15541
15544
  return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, "0")).join("");
15542
15545
  }
15543
15546
  export {
15544
15547
  X0 as OpenSecretContext,
15545
- Ib as OpenSecretProvider,
15546
- Bb as generateSecureSecret,
15547
- Ob as hashSecret,
15548
- Cb as useOpenSecret
15548
+ Cb as OpenSecretProvider,
15549
+ Ob as generateSecureSecret,
15550
+ Tb as hashSecret,
15551
+ Bb as useOpenSecret
15549
15552
  };