hd-wallet-ui 2.0.32 → 2.0.33

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
- const Ac = new URL("./wallet-origin.6e082cab719b53635316cf29e89c381b9c51190babe172c190e66dfc6d5a34d4.wasm", import.meta.url).href, qn = {
1
+ const Ic = new URL("./wallet-origin.a45a7426d353fe1271289e298b528361c9d226b173aed2b03abf0c1fcd8e589c.wasm", import.meta.url).href, qn = {
2
2
  SECP256K1: 0
3
3
  }, xe = {
4
4
  OK: 0,
@@ -23,7 +23,7 @@ const Ac = new URL("./wallet-origin.6e082cab719b53635316cf29e89c381b9c51190babe1
23
23
  INVALID_SIGNATURE: 402,
24
24
  VERIFICATION_FAILED: 403,
25
25
  KEY_DERIVATION_FAILED: 404
26
- }, an = 116;
26
+ }, sn = 116;
27
27
  class Pr {
28
28
  constructor(r, t = 0) {
29
29
  this.view = new DataView(r, t, 116);
@@ -134,7 +134,7 @@ class Pr {
134
134
  return new Uint8Array(this.view.buffer, this.view.byteOffset, 116);
135
135
  }
136
136
  }
137
- const To = 132;
137
+ const Lo = 132;
138
138
  class Rr {
139
139
  constructor(r, t = 0) {
140
140
  this.view = new DataView(r, t, 132);
@@ -357,7 +357,7 @@ class fn {
357
357
  yield this.at(r);
358
358
  }
359
359
  }
360
- const mc = 40;
360
+ const wc = 40;
361
361
  class Lr {
362
362
  constructor(r, t = 0) {
363
363
  this.view = new DataView(r, t, 40);
@@ -416,7 +416,7 @@ class Lr {
416
416
  return new Uint8Array(this.view.buffer, this.view.byteOffset, 40);
417
417
  }
418
418
  }
419
- const Ic = 36;
419
+ const Sc = 36;
420
420
  class Tr {
421
421
  constructor(r, t = 0) {
422
422
  this.view = new DataView(r, t, 36);
@@ -476,7 +476,7 @@ class di {
476
476
  yield this.at(r);
477
477
  }
478
478
  }
479
- const wc = 76;
479
+ const kc = 76;
480
480
  class xr {
481
481
  constructor(r, t = 0) {
482
482
  this.view = new DataView(r, t, 76);
@@ -558,7 +558,7 @@ class _i {
558
558
  yield this.at(r);
559
559
  }
560
560
  }
561
- const Sc = 44;
561
+ const Oc = 44;
562
562
  class Dr {
563
563
  constructor(r, t = 0) {
564
564
  this.view = new DataView(r, t, 44);
@@ -625,7 +625,7 @@ class Dr {
625
625
  return new Uint8Array(this.view.buffer, this.view.byteOffset, 44);
626
626
  }
627
627
  }
628
- const kc = 100;
628
+ const Pc = 100;
629
629
  class Cr {
630
630
  constructor(r, t = 0) {
631
631
  this.view = new DataView(r, t, 100);
@@ -693,7 +693,7 @@ class hi {
693
693
  yield this.at(r);
694
694
  }
695
695
  }
696
- const Oc = 8;
696
+ const Rc = 8;
697
697
  class Ur {
698
698
  constructor(r, t = 0) {
699
699
  this.view = new DataView(r, t, 8);
@@ -753,7 +753,7 @@ class ui {
753
753
  yield this.at(r);
754
754
  }
755
755
  }
756
- const Pc = 132;
756
+ const Nc = 132;
757
757
  class Fr {
758
758
  constructor(r, t = 0) {
759
759
  this.view = new DataView(r, t, 132);
@@ -893,7 +893,7 @@ class Fr {
893
893
  return new Uint8Array(this.view.buffer, this.view.byteOffset, 132);
894
894
  }
895
895
  }
896
- const Rc = {
896
+ const Lc = {
897
897
  [xe.OK]: "Success",
898
898
  [xe.UNKNOWN]: "Unknown error",
899
899
  [xe.INVALID_ARGUMENT]: "Invalid argument",
@@ -911,10 +911,10 @@ const Rc = {
911
911
  };
912
912
  class Ye extends Error {
913
913
  constructor(r, t) {
914
- super(t || Rc[r] || `Error code: ${r}`), this.name = "AlignedError", this.code = r;
914
+ super(t || Lc[r] || `Error code: ${r}`), this.name = "AlignedError", this.code = r;
915
915
  }
916
916
  }
917
- class Nc {
917
+ class Tc {
918
918
  #r;
919
919
  /**
920
920
  * @param {Object} wasm - WASM module instance
@@ -934,7 +934,7 @@ class Nc {
934
934
  deriveBatch(r, t, s, a = !1) {
935
935
  if (s === 0)
936
936
  return [];
937
- const d = this.#r, b = d._hd_alloc(To);
937
+ const d = this.#r, b = d._hd_alloc(Lo);
938
938
  if (!b)
939
939
  throw new Ye(xe.OUT_OF_MEMORY);
940
940
  try {
@@ -983,7 +983,7 @@ class Nc {
983
983
  * @yields {Array<DerivedKey>} Batches of derived keys
984
984
  */
985
985
  *streamKeys(r, t = 0, s = 100, a = !1) {
986
- const d = this.#r, b = d._hd_alloc(Pc);
986
+ const d = this.#r, b = d._hd_alloc(Nc);
987
987
  if (!b)
988
988
  throw new Ye(xe.OUT_OF_MEMORY);
989
989
  const E = Fr.fromMemory(d.wasmMemory, b);
@@ -1029,7 +1029,7 @@ class Nc {
1029
1029
  */
1030
1030
  #c(r, t) {
1031
1031
  if (t._handle) {
1032
- const s = this.#r._hd_alloc(an);
1032
+ const s = this.#r._hd_alloc(sn);
1033
1033
  try {
1034
1034
  this.#r._hd_aligned_from_extended_key(t._handle, s);
1035
1035
  const a = Pr.fromMemory(
@@ -1049,7 +1049,7 @@ class Nc {
1049
1049
  );
1050
1050
  }
1051
1051
  }
1052
- class Lc {
1052
+ class xc {
1053
1053
  #r;
1054
1054
  /**
1055
1055
  * @param {Object} wasm - WASM module instance
@@ -1066,13 +1066,13 @@ class Lc {
1066
1066
  * @returns {Array<SignatureResult>} Array of signature results
1067
1067
  */
1068
1068
  signBatch(r, t, s = qn.SECP256K1) {
1069
- const a = this.#r, d = t.length, b = a._hd_alloc(mc);
1069
+ const a = this.#r, d = t.length, b = a._hd_alloc(wc);
1070
1070
  if (!b)
1071
1071
  throw new Ye(xe.OUT_OF_MEMORY);
1072
1072
  try {
1073
1073
  const E = Lr.fromMemory(a.wasmMemory, b);
1074
1074
  E.private_key_data.set(r), E.curve = s, E.count = d;
1075
- const I = a._hd_alloc(d * Ic);
1075
+ const I = a._hd_alloc(d * Sc);
1076
1076
  if (!I)
1077
1077
  throw new Ye(xe.OUT_OF_MEMORY);
1078
1078
  try {
@@ -1081,7 +1081,7 @@ class Lc {
1081
1081
  const N = P.at(m);
1082
1082
  N.index = m, N.hash_data.set(t[m]);
1083
1083
  }
1084
- const w = a._hd_alloc(d * wc);
1084
+ const w = a._hd_alloc(d * kc);
1085
1085
  if (!w)
1086
1086
  throw new Ye(xe.OUT_OF_MEMORY);
1087
1087
  try {
@@ -1128,13 +1128,13 @@ class Lc {
1128
1128
  * @returns {Array<VerifyResult>} Array of verification results
1129
1129
  */
1130
1130
  verifyBatch(r, t, s = qn.SECP256K1) {
1131
- const a = this.#r, d = t.length, b = a._hd_alloc(Sc);
1131
+ const a = this.#r, d = t.length, b = a._hd_alloc(Oc);
1132
1132
  if (!b)
1133
1133
  throw new Ye(xe.OUT_OF_MEMORY);
1134
1134
  try {
1135
1135
  const E = Dr.fromMemory(a.wasmMemory, b);
1136
1136
  E.public_key_data.set(r), E.curve = s, E.count = d;
1137
- const I = a._hd_alloc(d * kc);
1137
+ const I = a._hd_alloc(d * Pc);
1138
1138
  if (!I)
1139
1139
  throw new Ye(xe.OUT_OF_MEMORY);
1140
1140
  try {
@@ -1143,7 +1143,7 @@ class Lc {
1143
1143
  const N = P.at(m);
1144
1144
  N.index = m, N.hash_data.set(t[m].hash), N.signature_data.set(t[m].signature);
1145
1145
  }
1146
- const w = a._hd_alloc(d * Oc);
1146
+ const w = a._hd_alloc(d * Rc);
1147
1147
  if (!w)
1148
1148
  throw new Ye(xe.OUT_OF_MEMORY);
1149
1149
  try {
@@ -1181,7 +1181,7 @@ class Lc {
1181
1181
  }
1182
1182
  }
1183
1183
  }
1184
- class Tc {
1184
+ class Dc {
1185
1185
  #r;
1186
1186
  #c;
1187
1187
  #_;
@@ -1196,14 +1196,14 @@ class Tc {
1196
1196
  * @returns {AlignedKeyDeriver}
1197
1197
  */
1198
1198
  get keyDeriver() {
1199
- return this.#c || (this.#c = new Nc(this.#r)), this.#c;
1199
+ return this.#c || (this.#c = new Tc(this.#r)), this.#c;
1200
1200
  }
1201
1201
  /**
1202
1202
  * Get signer instance
1203
1203
  * @returns {AlignedSigner}
1204
1204
  */
1205
1205
  get signer() {
1206
- return this.#_ || (this.#_ = new Lc(this.#r)), this.#_;
1206
+ return this.#_ || (this.#_ = new xc(this.#r)), this.#_;
1207
1207
  }
1208
1208
  /**
1209
1209
  * Convert HDKey to ExtendedKeyData bytes
@@ -1211,14 +1211,14 @@ class Tc {
1211
1211
  * @returns {Uint8Array} Extended key data bytes
1212
1212
  */
1213
1213
  keyToBytes(r) {
1214
- const t = this.#r, s = t._hd_alloc(an);
1214
+ const t = this.#r, s = t._hd_alloc(sn);
1215
1215
  if (!s)
1216
1216
  throw new Ye(xe.OUT_OF_MEMORY);
1217
1217
  try {
1218
1218
  const a = t._hd_aligned_from_extended_key(r._handle, s);
1219
1219
  if (a !== 0)
1220
1220
  throw new Ye(a);
1221
- return new Uint8Array(t.HEAPU8.buffer, s, an).slice();
1221
+ return new Uint8Array(t.HEAPU8.buffer, s, sn).slice();
1222
1222
  } finally {
1223
1223
  t._hd_dealloc(s);
1224
1224
  }
@@ -1235,18 +1235,18 @@ class Tc {
1235
1235
  * @returns {number}
1236
1236
  */
1237
1237
  get extendedKeyDataSize() {
1238
- return an;
1238
+ return sn;
1239
1239
  }
1240
1240
  /**
1241
1241
  * Get size of BatchDeriveRequest struct
1242
1242
  * @returns {number}
1243
1243
  */
1244
1244
  get batchDeriveRequestSize() {
1245
- return To;
1245
+ return Lo;
1246
1246
  }
1247
1247
  }
1248
- const xc = "com.digitalarsenal.infrastructure.hd-wallet-wasm", xo = Object.freeze({
1249
- pluginId: xc,
1248
+ const Cc = "com.digitalarsenal.infrastructure.hd-wallet-wasm", To = Object.freeze({
1249
+ pluginId: Cc,
1250
1250
  name: "HD Wallet Crypto",
1251
1251
  version: "2.0.1",
1252
1252
  pluginFamily: "infrastructure",
@@ -1536,12 +1536,12 @@ const xc = "com.digitalarsenal.infrastructure.hd-wallet-wasm", xo = Object.freez
1536
1536
  abiVersion: 1
1537
1537
  });
1538
1538
  function Ki() {
1539
- return JSON.parse(JSON.stringify(xo));
1539
+ return JSON.parse(JSON.stringify(To));
1540
1540
  }
1541
- const Dc = Object.freeze({
1541
+ const Uc = Object.freeze({
1542
1542
  bytesSymbol: "plugin_get_manifest_flatbuffer",
1543
1543
  sizeSymbol: "plugin_get_manifest_flatbuffer_size"
1544
- }), Do = new TextEncoder();
1544
+ }), xo = new TextEncoder();
1545
1545
  function Ge(e, r) {
1546
1546
  if (e instanceof Uint8Array)
1547
1547
  return new Uint8Array(e);
@@ -1554,7 +1554,7 @@ function Ge(e, r) {
1554
1554
  function Nt(e, r) {
1555
1555
  return e == null ? null : Ge(e, r);
1556
1556
  }
1557
- function Cc(e, r) {
1557
+ function Fc(e, r) {
1558
1558
  return {
1559
1559
  portId: e.portId,
1560
1560
  typeRef: e.typeRef ? { ...e.typeRef } : null,
@@ -1570,8 +1570,8 @@ function Cc(e, r) {
1570
1570
  payload: r
1571
1571
  };
1572
1572
  }
1573
- function en(e, r, t, s, a) {
1574
- return Cc(
1573
+ function Zr(e, r, t, s, a) {
1574
+ return Fc(
1575
1575
  {
1576
1576
  portId: r,
1577
1577
  typeRef: {
@@ -1586,14 +1586,14 @@ function en(e, r, t, s, a) {
1586
1586
  ownership: "shared",
1587
1587
  generation: 0,
1588
1588
  mutability: "immutable",
1589
- traceId: e?.traceId ?? `${xo.pluginId}:${r}`,
1589
+ traceId: e?.traceId ?? `${To.pluginId}:${r}`,
1590
1590
  streamId: e?.streamId ?? 1,
1591
1591
  sequence: e?.sequence ?? 1
1592
1592
  },
1593
1593
  a
1594
1594
  );
1595
1595
  }
1596
- function Uc(e) {
1596
+ function Mc(e) {
1597
1597
  if (!Array.isArray(e?.inputs) || e.inputs.length === 0)
1598
1598
  throw new Error("Plugin invocation requires at least one input frame.");
1599
1599
  return e.inputs[e.inputs.length - 1];
@@ -1608,11 +1608,11 @@ function Yn(e, r, t) {
1608
1608
  throw new Error(`randomBytes capability must return exactly ${r} bytes.`);
1609
1609
  return s;
1610
1610
  }
1611
- function Co(e) {
1611
+ function Do(e) {
1612
1612
  const r = String(e.curve ?? "").trim();
1613
1613
  return r || (String(e.algorithm ?? "").trim().startsWith("ed25519") ? "ed25519" : "secp256k1");
1614
1614
  }
1615
- function Uo(e, r, t) {
1615
+ function Co(e, r, t) {
1616
1616
  const s = Ge(
1617
1617
  r.messageBytes ?? r.message ?? r.protectedRecordBytes,
1618
1618
  "message"
@@ -1625,8 +1625,8 @@ function Uo(e, r, t) {
1625
1625
  digest: Nt(r.digest, "digest")
1626
1626
  };
1627
1627
  }
1628
- function Fc(e, r, t) {
1629
- const s = Co(r), { messageBytes: a, digest: d } = Uo(e, r, s);
1628
+ function Bc(e, r, t) {
1629
+ const s = Do(r), { messageBytes: a, digest: d } = Co(e, r, s);
1630
1630
  if (!r.signerPrivateKey && typeof t != "function")
1631
1631
  throw new Error(
1632
1632
  "sign_detached requires signerPrivateKey bytes or a walletSign capability callback."
@@ -1670,8 +1670,8 @@ function Fc(e, r, t) {
1670
1670
  publicKey: Nt(r.publicKey, "publicKey") ?? e.curves.publicKeyFromPrivate(b, 0)
1671
1671
  };
1672
1672
  }
1673
- function Mc(e, r) {
1674
- const t = Co(r), s = Ge(r.signature, "signature"), a = Ge(r.publicKey, "publicKey"), { messageBytes: d, digest: b } = Uo(e, r, t), E = t === "secp256k1" ? b : b ?? d, I = t === "ed25519" ? e.curves.ed25519.verify(E, s, a) : e.curves.secp256k1.verify(E, s, a);
1673
+ function Vc(e, r) {
1674
+ const t = Do(r), s = Ge(r.signature, "signature"), a = Ge(r.publicKey, "publicKey"), { messageBytes: d, digest: b } = Co(e, r, t), E = t === "secp256k1" ? b : b ?? d, I = t === "ed25519" ? e.curves.ed25519.verify(E, s, a) : e.curves.secp256k1.verify(E, s, a);
1675
1675
  return {
1676
1676
  curve: t,
1677
1677
  algorithm: r.algorithm ?? (t === "ed25519" ? b ? "ed25519-prehash-sha256" : "ed25519" : "secp256k1-sha256"),
@@ -1682,27 +1682,27 @@ function Mc(e, r) {
1682
1682
  valid: I
1683
1683
  };
1684
1684
  }
1685
- function Fo(e, r) {
1685
+ function Uo(e, r) {
1686
1686
  return String(r?.curve ?? e.curve ?? "x25519").trim() || "x25519";
1687
1687
  }
1688
- function Mo(e, r, t, s) {
1688
+ function Fo(e, r, t, s) {
1689
1689
  if (r === "secp256k1")
1690
1690
  return e.curves.secp256k1.ecdh(t, s);
1691
1691
  if (r === "x25519")
1692
1692
  return e.curves.x25519.ecdh(t, s);
1693
1693
  throw new Error(`encrypt_fields does not support curve "${r}".`);
1694
1694
  }
1695
- function Bc(e, r, t) {
1695
+ function Hc(e, r, t) {
1696
1696
  if (r === "secp256k1")
1697
1697
  return e.curves.publicKeyFromPrivate(t, 0);
1698
1698
  if (r === "x25519")
1699
1699
  return e.curves.x25519.publicKey(t);
1700
1700
  throw new Error(`encrypt_fields does not support curve "${r}".`);
1701
1701
  }
1702
- function Bo(e) {
1702
+ function Mo(e) {
1703
1703
  return e === "secp256k1" ? "secp256k1-hkdf-aes-256-gcm" : "x25519-hkdf-aes-256-gcm";
1704
1704
  }
1705
- function Vc(e, r, t) {
1705
+ function zc(e, r, t) {
1706
1706
  if (r.senderPrivateKey)
1707
1707
  return Ge(r.senderPrivateKey, "senderPrivateKey");
1708
1708
  if (t === "x25519")
@@ -1714,19 +1714,19 @@ function Vc(e, r, t) {
1714
1714
  "encrypt_fields requires senderPrivateKey when using secp256k1 field encryption."
1715
1715
  );
1716
1716
  }
1717
- function Vo(e, r) {
1717
+ function Bo(e, r) {
1718
1718
  return Nt(e?.aad, "aad") ?? Nt(r?.aad, "aad") ?? new Uint8Array();
1719
1719
  }
1720
- function Hc(e, r, t) {
1720
+ function $c(e, r, t) {
1721
1721
  const s = Array.isArray(r.fields) ? r.fields : [];
1722
1722
  if (s.length === 0)
1723
1723
  throw new Error("encrypt_fields requires at least one field entry.");
1724
1724
  const a = [];
1725
1725
  for (const d of s) {
1726
- const b = Fo(r, d), E = Ge(
1726
+ const b = Uo(r, d), E = Ge(
1727
1727
  r.recipientPublicKey ?? d.recipientPublicKey,
1728
1728
  "recipientPublicKey"
1729
- ), I = Vc(t, r, b), P = Nt(d.senderPublicKey, "senderPublicKey") ?? Bc(e, b, I), w = Nt(d.salt, "salt") ?? Yn(t, 32, {
1729
+ ), I = zc(t, r, b), P = Nt(d.senderPublicKey, "senderPublicKey") ?? Hc(e, b, I), w = Nt(d.salt, "salt") ?? Yn(t, 32, {
1730
1730
  methodId: "encrypt_fields",
1731
1731
  fieldPath: d.fieldPath,
1732
1732
  purpose: "salt"
@@ -1734,7 +1734,7 @@ function Hc(e, r, t) {
1734
1734
  methodId: "encrypt_fields",
1735
1735
  fieldPath: d.fieldPath,
1736
1736
  purpose: "iv"
1737
- }), N = Ge(d.plaintext, "plaintext"), L = Vo(d, r), D = Mo(e, b, I, E), U = Do.encode(`field:${d.fieldPath}`), M = e.utils.hkdf(D, w, U, 32), { ciphertext: C, tag: B } = e.utils.aesGcm.encrypt(
1737
+ }), N = Ge(d.plaintext, "plaintext"), L = Bo(d, r), D = Fo(e, b, I, E), U = xo.encode(`field:${d.fieldPath}`), M = e.utils.hkdf(D, w, U, 32), { ciphertext: C, tag: B } = e.utils.aesGcm.encrypt(
1738
1738
  M,
1739
1739
  N,
1740
1740
  m,
@@ -1743,7 +1743,7 @@ function Hc(e, r, t) {
1743
1743
  a.push({
1744
1744
  fieldPath: String(d.fieldPath ?? ""),
1745
1745
  curve: b,
1746
- algorithm: Bo(b),
1746
+ algorithm: Mo(b),
1747
1747
  salt: w,
1748
1748
  iv: m,
1749
1749
  tag: B,
@@ -1754,7 +1754,7 @@ function Hc(e, r, t) {
1754
1754
  }
1755
1755
  return { fields: a };
1756
1756
  }
1757
- function zc(e, r) {
1757
+ function Wc(e, r) {
1758
1758
  const t = Array.isArray(r.fields) ? r.fields : [];
1759
1759
  if (t.length === 0)
1760
1760
  throw new Error("decrypt_fields requires at least one encrypted field entry.");
@@ -1763,18 +1763,18 @@ function zc(e, r) {
1763
1763
  "recipientPrivateKey"
1764
1764
  ), a = [];
1765
1765
  for (const d of t) {
1766
- const b = Fo(r, d), E = Ge(d.senderPublicKey, "senderPublicKey"), I = Ge(d.salt, "salt"), P = Ge(d.iv, "iv"), w = Ge(d.tag, "tag"), m = Ge(d.ciphertext, "ciphertext"), N = Vo(d, r), L = Mo(e, b, s, E), D = Do.encode(`field:${d.fieldPath}`), U = e.utils.hkdf(L, I, D, 32), M = e.utils.aesGcm.decrypt(U, m, w, P, N);
1766
+ const b = Uo(r, d), E = Ge(d.senderPublicKey, "senderPublicKey"), I = Ge(d.salt, "salt"), P = Ge(d.iv, "iv"), w = Ge(d.tag, "tag"), m = Ge(d.ciphertext, "ciphertext"), N = Bo(d, r), L = Fo(e, b, s, E), D = xo.encode(`field:${d.fieldPath}`), U = e.utils.hkdf(L, I, D, 32), M = e.utils.aesGcm.decrypt(U, m, w, P, N);
1767
1767
  a.push({
1768
1768
  fieldPath: String(d.fieldPath ?? ""),
1769
1769
  curve: b,
1770
- algorithm: d.algorithm ?? Bo(b),
1770
+ algorithm: d.algorithm ?? Mo(b),
1771
1771
  plaintext: M,
1772
1772
  aad: N
1773
1773
  });
1774
1774
  }
1775
1775
  return { fields: a };
1776
1776
  }
1777
- function $c(e) {
1777
+ function jc(e) {
1778
1778
  const r = e._plugin_get_manifest_flatbuffer, t = e._plugin_get_manifest_flatbuffer_size;
1779
1779
  if (typeof r != "function" || typeof t != "function")
1780
1780
  throw new Error("Embedded plugin manifest exports are not available in this build.");
@@ -1783,55 +1783,55 @@ function $c(e) {
1783
1783
  throw new Error("Embedded plugin manifest exports returned invalid values.");
1784
1784
  return e.HEAPU8.slice(s, s + a);
1785
1785
  }
1786
- function tn(e) {
1786
+ function en(e) {
1787
1787
  return {
1788
1788
  outputs: e,
1789
1789
  backlogRemaining: 0,
1790
1790
  yielded: !1
1791
1791
  };
1792
1792
  }
1793
- function Ho({ wallet: e, wasm: r, randomBytes: t = null, walletSign: s = null }) {
1793
+ function Vo({ wallet: e, wasm: r, randomBytes: t = null, walletSign: s = null }) {
1794
1794
  function a(d, b = {}) {
1795
- const E = Uc(b), I = E.payload ?? {};
1795
+ const E = Mc(b), I = E.payload ?? {};
1796
1796
  switch (d) {
1797
1797
  case "encrypt_fields":
1798
- return tn([
1799
- en(
1798
+ return en([
1799
+ Zr(
1800
1800
  E,
1801
1801
  "encrypted_fields",
1802
1802
  "EncryptedFieldSet.fbs",
1803
1803
  "EFLD",
1804
- Hc(e, I, t)
1804
+ $c(e, I, t)
1805
1805
  )
1806
1806
  ]);
1807
1807
  case "decrypt_fields":
1808
- return tn([
1809
- en(
1808
+ return en([
1809
+ Zr(
1810
1810
  E,
1811
1811
  "field_set",
1812
1812
  "FieldSelectionBundle.fbs",
1813
1813
  "FSLB",
1814
- zc(e, I)
1814
+ Wc(e, I)
1815
1815
  )
1816
1816
  ]);
1817
1817
  case "sign_detached":
1818
- return tn([
1819
- en(
1818
+ return en([
1819
+ Zr(
1820
1820
  E,
1821
1821
  "signature",
1822
1822
  "DetachedSignature.fbs",
1823
1823
  "SIGD",
1824
- Fc(e, I, s)
1824
+ Bc(e, I, s)
1825
1825
  )
1826
1826
  ]);
1827
1827
  case "verify_detached":
1828
- return tn([
1829
- en(
1828
+ return en([
1829
+ Zr(
1830
1830
  E,
1831
1831
  "verification",
1832
1832
  "DetachedVerificationResult.fbs",
1833
1833
  "SIGV",
1834
- Mc(e, I)
1834
+ Vc(e, I)
1835
1835
  )
1836
1836
  ]);
1837
1837
  default:
@@ -1840,15 +1840,15 @@ function Ho({ wallet: e, wasm: r, randomBytes: t = null, walletSign: s = null })
1840
1840
  }
1841
1841
  return {
1842
1842
  manifest: Ki(),
1843
- manifestExports: Dc,
1843
+ manifestExports: Uc,
1844
1844
  getManifest() {
1845
1845
  return Ki();
1846
1846
  },
1847
1847
  getManifestBytes() {
1848
- return $c(r);
1848
+ return jc(r);
1849
1849
  },
1850
1850
  withCapabilities(d = {}) {
1851
- return Ho({
1851
+ return Vo({
1852
1852
  wallet: e,
1853
1853
  wasm: r,
1854
1854
  randomBytes: d.randomBytes !== void 0 ? d.randomBytes : t,
@@ -1870,7 +1870,7 @@ function Ho({ wallet: e, wasm: r, randomBytes: t = null, walletSign: s = null })
1870
1870
  }
1871
1871
  };
1872
1872
  }
1873
- const et = 131072, zo = 131072, Yi = 4096, rn = 256, Gi = 4096, Wc = 1024, jc = 16, Xi = 1024, qc = 16n, Kc = (1n << 64n) - 1n, Ji = Object.freeze([
1873
+ const et = 131072, Ho = 131072, Yi = 4096, tn = 256, Gi = 4096, qc = 1024, Kc = 16, Xi = 1024, Yc = 16n, Gc = (1n << 64n) - 1n, Ji = Object.freeze([
1874
1874
  "INVALID_USERNAME",
1875
1875
  "INVALID_PASSWORD",
1876
1876
  "COMMON_PASSWORD",
@@ -1885,7 +1885,7 @@ const et = 131072, zo = 131072, Yi = 4096, rn = 256, Gi = 4096, Wc = 1024, jc =
1885
1885
  "CRYPTO_FAILURE",
1886
1886
  "OUT_OF_MEMORY",
1887
1887
  "FIPS_NOT_ALLOWED"
1888
- ]), Yc = Object.freeze([
1888
+ ]), Xc = Object.freeze([
1889
1889
  "_hd_sdn_derive_password_identity",
1890
1890
  "_hd_sdn_derive_legacy_password_identity",
1891
1891
  "_hd_sdn_import_legacy_mnemonic_identity",
@@ -1898,14 +1898,14 @@ const et = 131072, zo = 131072, Yi = 4096, rn = 256, Gi = 4096, Wc = 1024, jc =
1898
1898
  "_hd_sdn_sign_asset_review_decision",
1899
1899
  "_hd_sdn_seal_remembered_identity",
1900
1900
  "_hd_sdn_destroy_identity"
1901
- ]), Gc = new TextEncoder(), $o = new TextDecoder("utf-8", { fatal: !0 }), On = Uint8Array, Wo = Object.getPrototypeOf(On.prototype), jo = Object.getOwnPropertyDescriptor(
1902
- Wo,
1901
+ ]), Jc = new TextEncoder(), zo = new TextDecoder("utf-8", { fatal: !0 }), On = Uint8Array, $o = Object.getPrototypeOf(On.prototype), Wo = Object.getOwnPropertyDescriptor(
1902
+ $o,
1903
1903
  Symbol.toStringTag
1904
- ).get, Xc = Object.getOwnPropertyDescriptor(
1905
- Wo,
1904
+ ).get, Qc = Object.getOwnPropertyDescriptor(
1905
+ $o,
1906
1906
  "byteLength"
1907
- ).get, qo = On.prototype.fill, Jc = On.prototype.set;
1908
- class Qc extends Error {
1907
+ ).get, jo = On.prototype.fill, Zc = On.prototype.set;
1908
+ class el extends Error {
1909
1909
  constructor(r) {
1910
1910
  super(r), this.name = "SdnWalletError", this.code = r;
1911
1911
  }
@@ -1914,13 +1914,13 @@ class Qc extends Error {
1914
1914
  }
1915
1915
  }
1916
1916
  function re(e) {
1917
- throw new Qc(e);
1917
+ throw new el(e);
1918
1918
  }
1919
- function Zc(e) {
1919
+ function tl(e) {
1920
1920
  return Number.isInteger(e) && e >= 1 && e <= Ji.length ? Ji[e - 1] : "CRYPTO_FAILURE";
1921
1921
  }
1922
1922
  function Dn(e) {
1923
- re(Zc(e));
1923
+ re(tl(e));
1924
1924
  }
1925
1925
  function ht(e) {
1926
1926
  return e !== null && typeof e == "object";
@@ -1933,20 +1933,20 @@ function or(e, r) {
1933
1933
  function yr(e, r) {
1934
1934
  return or(e, r) || re("INVALID_REQUEST"), e;
1935
1935
  }
1936
- function Ko(e, r = "INVALID_REQUEST") {
1936
+ function qo(e, r = "INVALID_REQUEST") {
1937
1937
  let t;
1938
1938
  try {
1939
- t = jo.call(e);
1939
+ t = Wo.call(e);
1940
1940
  } catch {
1941
1941
  re(r);
1942
1942
  }
1943
1943
  return t !== "Uint8Array" && re(r), e;
1944
1944
  }
1945
1945
  function gt(e, r = "INVALID_REQUEST") {
1946
- const t = Ko(e, r);
1946
+ const t = qo(e, r);
1947
1947
  let s;
1948
1948
  try {
1949
- s = Xc.call(t);
1949
+ s = Qc.call(t);
1950
1950
  } catch {
1951
1951
  re(r);
1952
1952
  }
@@ -1957,19 +1957,19 @@ function gt(e, r = "INVALID_REQUEST") {
1957
1957
  re("OUT_OF_MEMORY");
1958
1958
  }
1959
1959
  try {
1960
- Jc.call(a, t);
1960
+ Zc.call(a, t);
1961
1961
  } catch {
1962
- qo.call(a, 0), re(r);
1962
+ jo.call(a, 0), re(r);
1963
1963
  }
1964
1964
  return a;
1965
1965
  }
1966
1966
  function tr(e, r) {
1967
- const t = Ko(e, r), s = gt(t, r);
1967
+ const t = qo(e, r), s = gt(t, r);
1968
1968
  return pn([t]) && (pn([s]), re("CRYPTO_FAILURE")), s;
1969
1969
  }
1970
1970
  function Gn(e) {
1971
1971
  try {
1972
- return jo.call(e) === "Uint8Array";
1972
+ return Wo.call(e) === "Uint8Array";
1973
1973
  } catch {
1974
1974
  return !1;
1975
1975
  }
@@ -1979,17 +1979,17 @@ function pn(e) {
1979
1979
  for (const t of e)
1980
1980
  if (Gn(t))
1981
1981
  try {
1982
- qo.call(t, 0);
1982
+ jo.call(t, 0);
1983
1983
  } catch {
1984
1984
  r = !0;
1985
1985
  }
1986
1986
  return r;
1987
1987
  }
1988
- function nn(e) {
1988
+ function rn(e) {
1989
1989
  let r = !1, t = !1;
1990
1990
  return () => (r || (r = !0, t = pn(e())), t);
1991
1991
  }
1992
- function el(e) {
1992
+ function rl(e) {
1993
1993
  if (typeof e != "string") return !1;
1994
1994
  for (let r = 0; r < e.length; r += 1) {
1995
1995
  const t = e.charCodeAt(r);
@@ -2003,9 +2003,9 @@ function el(e) {
2003
2003
  }
2004
2004
  return !0;
2005
2005
  }
2006
- function Xn(e, r = zo) {
2007
- el(e) || re("INVALID_REQUEST");
2008
- const t = Gc.encode(e);
2006
+ function Xn(e, r = Ho) {
2007
+ rl(e) || re("INVALID_REQUEST");
2008
+ const t = Jc.encode(e);
2009
2009
  return t.length > r && re("INVALID_REQUEST"), t;
2010
2010
  }
2011
2011
  function gr(e) {
@@ -2015,15 +2015,15 @@ function gr(e) {
2015
2015
  } catch {
2016
2016
  re("INVALID_REQUEST");
2017
2017
  }
2018
- return typeof r != "string" && re("INVALID_REQUEST"), Xn(r, zo);
2018
+ return typeof r != "string" && re("INVALID_REQUEST"), Xn(r, Ho);
2019
2019
  }
2020
2020
  function Cn(e) {
2021
2021
  return e !== 0 && e !== 1 && re("INVALID_ACCOUNT"), e;
2022
2022
  }
2023
- function tl(e) {
2024
- if (typeof e != "bigint" || e <= 0n || e > Kc) return !1;
2023
+ function nl(e) {
2024
+ if (typeof e != "bigint" || e <= 0n || e > Gc) return !1;
2025
2025
  const r = e & 0xffffffffn;
2026
- return e >> 32n !== 0n && r !== 0n && r <= qc;
2026
+ return e >> 32n !== 0n && r !== 0n && r <= Yc;
2027
2027
  }
2028
2028
  function Mt(e, r) {
2029
2029
  return typeof e == "string" && e.length === r && /^[0-9a-f]+$/.test(e);
@@ -2031,7 +2031,7 @@ function Mt(e, r) {
2031
2031
  function Jn(e) {
2032
2032
  return typeof e == "string" && /^sha256:[0-9a-f]{64}$/.test(e);
2033
2033
  }
2034
- function rl(e, r, t, s) {
2034
+ function il(e, r, t, s) {
2035
2035
  return (!or(e, [
2036
2036
  "purpose",
2037
2037
  "identityScheme",
@@ -2058,7 +2058,7 @@ function rl(e, r, t, s) {
2058
2058
  keyId: e.keyId
2059
2059
  });
2060
2060
  }
2061
- function nl(e) {
2061
+ function ol(e) {
2062
2062
  (!or(e, [
2063
2063
  "schemaVersion",
2064
2064
  "identityScheme",
@@ -2101,7 +2101,7 @@ function nl(e) {
2101
2101
  derivation: "bip32-scalar-as-ed25519-seed",
2102
2102
  path: `${t}0/0`
2103
2103
  }] : re("CRYPTO_FAILURE"), e.keys.length !== s.length && re("CRYPTO_FAILURE");
2104
- const a = e.keys.map((d, b) => rl(d, e.identityScheme, e.seedProfile, s[b]));
2104
+ const a = e.keys.map((d, b) => il(d, e.identityScheme, e.seedProfile, s[b]));
2105
2105
  return Object.freeze({
2106
2106
  schemaVersion: 1,
2107
2107
  identityScheme: e.identityScheme,
@@ -2114,16 +2114,16 @@ function nl(e) {
2114
2114
  keys: Object.freeze(a)
2115
2115
  });
2116
2116
  }
2117
- function il(e) {
2117
+ function sl(e) {
2118
2118
  let r;
2119
2119
  try {
2120
- r = JSON.parse($o.decode(e));
2120
+ r = JSON.parse(zo.decode(e));
2121
2121
  } catch {
2122
2122
  re("CRYPTO_FAILURE");
2123
2123
  }
2124
- return nl(r);
2124
+ return ol(r);
2125
2125
  }
2126
- function ol(e, r) {
2126
+ function al(e, r) {
2127
2127
  if (r === "module-delivery-key")
2128
2128
  return (!or(e, [
2129
2129
  "schemaVersion",
@@ -2167,14 +2167,14 @@ function ol(e, r) {
2167
2167
  };
2168
2168
  return r && (d.canonicalEnvelope = e.canonicalEnvelope, d.signedDigestSha256 = e.signedDigestSha256), d.signatureHex = e.signatureHex, Object.freeze(d);
2169
2169
  }
2170
- function sl(e, r) {
2170
+ function cl(e, r) {
2171
2171
  let t;
2172
2172
  try {
2173
- t = JSON.parse($o.decode(e));
2173
+ t = JSON.parse(zo.decode(e));
2174
2174
  } catch {
2175
2175
  re("CRYPTO_FAILURE");
2176
2176
  }
2177
- return ol(t, r);
2177
+ return al(t, r);
2178
2178
  }
2179
2179
  function Un(e) {
2180
2180
  let r;
@@ -2237,7 +2237,7 @@ function Fn(e) {
2237
2237
  }
2238
2238
  };
2239
2239
  }
2240
- function al(e, r) {
2240
+ function ll(e, r) {
2241
2241
  try {
2242
2242
  return e.view().getBigUint64(r, !0);
2243
2243
  } catch {
@@ -2251,8 +2251,8 @@ function Mn(e, r) {
2251
2251
  re("CRYPTO_FAILURE");
2252
2252
  }
2253
2253
  }
2254
- function cl(e) {
2255
- (!ht(e) || typeof e._malloc != "function" || typeof e._free != "function" || Yc.some((w) => typeof e[w] != "function")) && re("CRYPTO_FAILURE");
2254
+ function dl(e) {
2255
+ (!ht(e) || typeof e._malloc != "function" || typeof e._free != "function" || Xc.some((w) => typeof e[w] != "function")) && re("CRYPTO_FAILURE");
2256
2256
  const r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new Set();
2257
2257
  function s(w) {
2258
2258
  if (!(typeof w != "bigint" || w === 0n)) {
@@ -2299,10 +2299,10 @@ function cl(e) {
2299
2299
  } catch {
2300
2300
  v = !0;
2301
2301
  }
2302
- B = al(C, f), v && re("CRYPTO_FAILURE"), g !== 0 && Dn(g), tl(B) || re("CRYPTO_FAILURE");
2302
+ B = ll(C, f), v && re("CRYPTO_FAILURE"), g !== 0 && Dn(g), nl(B) || re("CRYPTO_FAILURE");
2303
2303
  const k = Mn(C, h);
2304
2304
  (k <= 0 || k > et) && re("CRYPTO_FAILURE");
2305
- const R = il(C.bytes(u, k));
2305
+ const R = sl(C.bytes(u, k));
2306
2306
  (R.identityScheme !== L || R.seedProfile !== D || R.accountIndex !== U) && re("CRYPTO_FAILURE"), C.cleanup() && re("CRYPTO_FAILURE"), M() && re("CRYPTO_FAILURE");
2307
2307
  const F = Object.freeze(/* @__PURE__ */ Object.create(null)), V = { nativeValue: B, state: "active" };
2308
2308
  r.set(F, V);
@@ -2330,7 +2330,7 @@ function cl(e) {
2330
2330
  }
2331
2331
  Y !== 0 && Dn(Y);
2332
2332
  const _ = Mn(U, C);
2333
- return (_ <= 0 || _ > et) && re("CRYPTO_FAILURE"), sl(U.bytes(B, _), D);
2333
+ return (_ <= 0 || _ > et) && re("CRYPTO_FAILURE"), cl(U.bytes(B, _), D);
2334
2334
  } finally {
2335
2335
  U.cleanup() && re("CRYPTO_FAILURE");
2336
2336
  }
@@ -2338,11 +2338,11 @@ function cl(e) {
2338
2338
  return Object.freeze({
2339
2339
  async derivePasswordIdentity(w) {
2340
2340
  let m, N;
2341
- const L = nn(() => [N, m]);
2341
+ const L = rn(() => [N, m]);
2342
2342
  try {
2343
2343
  ht(w) && (m = w.passwordUtf8), yr(w, ["usernameUtf8", "passwordUtf8", "accountIndex"]);
2344
2344
  const D = gt(w.usernameUtf8, "INVALID_USERNAME");
2345
- N = tr(m, "INVALID_PASSWORD"), D.length > rn && re("INVALID_USERNAME"), N.length > rn && re("INVALID_PASSWORD");
2345
+ N = tr(m, "INVALID_PASSWORD"), D.length > tn && re("INVALID_USERNAME"), N.length > tn && re("INVALID_PASSWORD");
2346
2346
  const U = Cn(w.accountIndex);
2347
2347
  return E(
2348
2348
  "_hd_sdn_derive_password_identity",
@@ -2365,7 +2365,7 @@ function cl(e) {
2365
2365
  },
2366
2366
  async deriveLegacyPasswordIdentity(w) {
2367
2367
  let m, N;
2368
- const L = nn(() => [N, m]);
2368
+ const L = rn(() => [N, m]);
2369
2369
  try {
2370
2370
  ht(w) && (m = w.passwordUtf8), yr(w, ["usernameUtf8", "passwordUtf8", "accountIndex"]);
2371
2371
  const D = gt(w.usernameUtf8, "INVALID_USERNAME");
@@ -2392,9 +2392,9 @@ function cl(e) {
2392
2392
  },
2393
2393
  async importLegacyMnemonicIdentity(w) {
2394
2394
  let m, N;
2395
- const L = nn(() => [N, m]);
2395
+ const L = rn(() => [N, m]);
2396
2396
  try {
2397
- ht(w) && (m = w.mnemonicUtf8), yr(w, ["mnemonicUtf8", "accountIndex"]), N = tr(m, "INVALID_MNEMONIC"), N.length > Wc && re("INVALID_MNEMONIC");
2397
+ ht(w) && (m = w.mnemonicUtf8), yr(w, ["mnemonicUtf8", "accountIndex"]), N = tr(m, "INVALID_MNEMONIC"), N.length > qc && re("INVALID_MNEMONIC");
2398
2398
  const D = Cn(w.accountIndex);
2399
2399
  return E(
2400
2400
  "_hd_sdn_import_legacy_mnemonic_identity",
@@ -2411,7 +2411,7 @@ function cl(e) {
2411
2411
  },
2412
2412
  importRememberedIdentity(w) {
2413
2413
  let m, N;
2414
- const L = nn(() => [N, m]);
2414
+ const L = rn(() => [N, m]);
2415
2415
  try {
2416
2416
  ht(w) && (m = w.prfOutput), yr(w, [
2417
2417
  "ciphertextAndTag",
@@ -2422,7 +2422,7 @@ function cl(e) {
2422
2422
  "canonicalAad"
2423
2423
  ]);
2424
2424
  const D = gt(w.ciphertextAndTag), U = gt(w.hkdfSalt), M = gt(w.nonce), C = gt(w.canonicalUsernameUtf8, "INVALID_USERNAME"), B = Xn(w.canonicalAad, Yi);
2425
- return N = tr(m, "INVALID_REQUEST"), (N.length !== 32 || U.length !== 32 || M.length !== 12 || D.length < jc || D.length > Xi || C.length > rn) && re("INVALID_REQUEST"), E(
2425
+ return N = tr(m, "INVALID_REQUEST"), (N.length !== 32 || U.length !== 32 || M.length !== 12 || D.length < Kc || D.length > Xi || C.length > tn) && re("INVALID_REQUEST"), E(
2426
2426
  "_hd_sdn_import_remembered_identity",
2427
2427
  (Y) => [
2428
2428
  Y[0],
@@ -2589,7 +2589,7 @@ function cl(e) {
2589
2589
  "canonicalAad"
2590
2590
  ]);
2591
2591
  const _ = gt(m.hkdfSalt), f = gt(m.nonce), h = Xn(m.canonicalAad, Yi);
2592
- D = tr(N, "INVALID_PASSWORD"), U = tr(L, "INVALID_REQUEST"), (D.length > rn || U.length !== 32 || _.length !== 32 || f.length !== 12) && re("INVALID_REQUEST");
2592
+ D = tr(N, "INVALID_PASSWORD"), U = tr(L, "INVALID_REQUEST"), (D.length > tn || U.length !== 32 || _.length !== 32 || f.length !== 12) && re("INVALID_REQUEST");
2593
2593
  const u = B.allocate(D, !0), g = B.allocate(U, !0), v = B.allocate(_), k = B.allocate(f), R = B.allocate(h), F = B.allocate(4), V = B.allocate(et);
2594
2594
  let Z;
2595
2595
  try {
@@ -2653,8 +2653,8 @@ function cl(e) {
2653
2653
  }
2654
2654
  });
2655
2655
  }
2656
- const Yo = /* @__PURE__ */ new WeakMap();
2657
- function ll(e) {
2656
+ const Ko = /* @__PURE__ */ new WeakMap();
2657
+ function _l(e) {
2658
2658
  const r = e.sdn, s = e.utils.sha256;
2659
2659
  return Object.freeze({
2660
2660
  sdn: r,
@@ -2663,19 +2663,19 @@ function ll(e) {
2663
2663
  }
2664
2664
  });
2665
2665
  }
2666
- function dl(e) {
2667
- const r = ll(e);
2666
+ function hl(e) {
2667
+ const r = _l(e);
2668
2668
  Object.defineProperty(e, "walletOriginCapabilities", {
2669
2669
  value: r,
2670
2670
  enumerable: !1,
2671
2671
  writable: !1,
2672
2672
  configurable: !1
2673
- }), Yo.set(e, r);
2673
+ }), Ko.set(e, r);
2674
2674
  }
2675
- function Go(e) {
2675
+ function Yo(e) {
2676
2676
  if (e === null || typeof e != "object")
2677
2677
  throw new TypeError("Invalid HD wallet module");
2678
- const r = Yo.get(e);
2678
+ const r = Ko.get(e);
2679
2679
  if (!r) throw new TypeError("Invalid HD wallet module");
2680
2680
  const t = Object.getOwnPropertyDescriptor(
2681
2681
  e,
@@ -2702,14 +2702,14 @@ const ot = Object.freeze({
2702
2702
  ITALIAN: 7,
2703
2703
  CZECH: 8,
2704
2704
  PORTUGUESE: 9
2705
- }), _l = Object.freeze({
2705
+ }), ul = Object.freeze({
2706
2706
  RANDOM: 0,
2707
2707
  FILESYSTEM: 1,
2708
2708
  NETWORK: 2,
2709
2709
  USB_HID: 3,
2710
2710
  CLOCK: 4,
2711
2711
  ENVIRONMENT: 5
2712
- }), hl = Object.freeze({
2712
+ }), fl = Object.freeze({
2713
2713
  NONE: 0,
2714
2714
  NEEDS_ENTROPY: 1,
2715
2715
  NEEDS_BRIDGE: 2,
@@ -2764,7 +2764,7 @@ const ot = Object.freeze({
2764
2764
  BRIDGE_FAILED: 701,
2765
2765
  NEEDS_BRIDGE: 702,
2766
2766
  FIPS_NOT_ALLOWED: 800
2767
- }), ul = {
2767
+ }), pl = {
2768
2768
  [W.OK]: "Success",
2769
2769
  [W.UNKNOWN]: "Unknown error",
2770
2770
  [W.INVALID_ARGUMENT]: "Invalid argument",
@@ -2807,7 +2807,7 @@ class $ extends Error {
2807
2807
  */
2808
2808
  constructor(r, t) {
2809
2809
  const s = r < 0 ? -r : r;
2810
- super(t || ul[s] || `Error code: ${r}`), this.name = "HDWalletError", this.code = s;
2810
+ super(t || pl[s] || `Error code: ${r}`), this.name = "HDWalletError", this.code = s;
2811
2811
  }
2812
2812
  }
2813
2813
  function te(e) {
@@ -2824,10 +2824,10 @@ function j(e, r, t = W.NOT_SUPPORTED, s) {
2824
2824
  throw new $(t, s || `Function ${r} is not available in this build`);
2825
2825
  return a;
2826
2826
  }
2827
- const Xo = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", fl = Object.freeze(Object.fromEntries(
2827
+ const Go = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", yl = Object.freeze(Object.fromEntries(
2828
+ Array.from(Go).map((e, r) => [e, r])
2829
+ )), Xo = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", gl = Object.freeze(Object.fromEntries(
2828
2830
  Array.from(Xo).map((e, r) => [e, r])
2829
- )), Jo = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", pl = Object.freeze(Object.fromEntries(
2830
- Array.from(Jo).map((e, r) => [e, r])
2831
2831
  ));
2832
2832
  function Qi(e) {
2833
2833
  let r = 0;
@@ -2842,7 +2842,7 @@ function Qi(e) {
2842
2842
  for (; a < s.length && s[a] === 0; ) a++;
2843
2843
  let d = "1".repeat(r);
2844
2844
  for (; a < s.length; )
2845
- d += Xo[s[a++]];
2845
+ d += Go[s[a++]];
2846
2846
  return d;
2847
2847
  }
2848
2848
  function Zi(e) {
@@ -2850,7 +2850,7 @@ function Zi(e) {
2850
2850
  for (; r < e.length && e[r] === "1"; ) r++;
2851
2851
  const t = Math.floor((e.length - r) * 733 / 1e3) + 1, s = new Uint8Array(t);
2852
2852
  for (let b = r; b < e.length; b++) {
2853
- const E = fl[e[b]];
2853
+ const E = yl[e[b]];
2854
2854
  if (E === void 0)
2855
2855
  throw new $(W.INVALID_ARGUMENT, `Invalid Base58 character: ${e[b]}`);
2856
2856
  let I = E;
@@ -2896,20 +2896,20 @@ function to(e) {
2896
2896
  throw new $(W.INVALID_ARGUMENT, "Invalid base64 string");
2897
2897
  }
2898
2898
  }
2899
- const Qo = new TextEncoder(), yl = new TextDecoder();
2900
- function gl(e, r) {
2899
+ const Jo = new TextEncoder(), vl = new TextDecoder();
2900
+ function bl(e, r) {
2901
2901
  let t = `${e}1`;
2902
2902
  for (let s = 0; s < r.length; s++)
2903
- t += Jo[r[s] & 31];
2903
+ t += Xo[r[s] & 31];
2904
2904
  return t;
2905
2905
  }
2906
- function vl(e) {
2906
+ function El(e) {
2907
2907
  const r = e.lastIndexOf("1");
2908
2908
  if (r <= 0)
2909
2909
  throw new $(W.INVALID_ARGUMENT, "Invalid bech32 string");
2910
2910
  const t = e.slice(0, r), s = e.slice(r + 1), a = new Uint8Array(s.length);
2911
2911
  for (let d = 0; d < s.length; d++) {
2912
- const b = pl[s[d].toLowerCase()];
2912
+ const b = gl[s[d].toLowerCase()];
2913
2913
  if (b === void 0)
2914
2914
  throw new $(W.INVALID_ARGUMENT, `Invalid bech32 character: ${s[d]}`);
2915
2915
  a[d] = b;
@@ -2935,7 +2935,7 @@ function ke(e, r) {
2935
2935
  function yn(e, r) {
2936
2936
  return e.getValue(r, "i32") >>> 0;
2937
2937
  }
2938
- function Zo(e, r, t) {
2938
+ function Qo(e, r, t) {
2939
2939
  return e === -W.OUT_OF_MEMORY && t > r;
2940
2940
  }
2941
2941
  function rr(e, r, t = {}) {
@@ -2952,7 +2952,7 @@ function rr(e, r, t = {}) {
2952
2952
  const w = r(P, d), m = yn(e, d);
2953
2953
  if (w === 0)
2954
2954
  return J(e, P, m);
2955
- if (Zo(w, I, m)) {
2955
+ if (Qo(w, I, m)) {
2956
2956
  b = Math.max(m, I * 2);
2957
2957
  continue;
2958
2958
  }
@@ -2983,7 +2983,7 @@ function Bn(e, r, t = {}) {
2983
2983
  const w = r(P, d), m = yn(e, d);
2984
2984
  if (w === 0)
2985
2985
  return ke(e, P);
2986
- if (Zo(w, I, m)) {
2986
+ if (Qo(w, I, m)) {
2987
2987
  b = Math.max(m, I * 2);
2988
2988
  continue;
2989
2989
  }
@@ -3009,7 +3009,7 @@ function bt(e, r = "data") {
3009
3009
  return new Uint8Array(e.slice(0));
3010
3010
  throw new $(W.INVALID_ARGUMENT, `${r} must be binary data`);
3011
3011
  }
3012
- function bl(e) {
3012
+ function Al(e) {
3013
3013
  switch (e) {
3014
3014
  case ot.SECP256K1:
3015
3015
  return "secp256k1";
@@ -3025,7 +3025,7 @@ function bl(e) {
3025
3025
  throw new $(W.INVALID_ARGUMENT, `Unsupported curve: ${e}`);
3026
3026
  }
3027
3027
  }
3028
- function El(e) {
3028
+ function ml(e) {
3029
3029
  return String(e).replace(/\\/g, "\\\\").replace(/,/g, "\\,");
3030
3030
  }
3031
3031
  function Kt(e, r) {
@@ -3036,15 +3036,15 @@ function Kt(e, r) {
3036
3036
  );
3037
3037
  }
3038
3038
  function Er(e, r, t = "certificate") {
3039
- return Kt(r, "encoding"), r === Yt.PEM && typeof e == "string" ? Qo.encode(e) : bt(e, t);
3039
+ return Kt(r, "encoding"), r === Yt.PEM && typeof e == "string" ? Jo.encode(e) : bt(e, t);
3040
3040
  }
3041
- function Al(e, r) {
3042
- return typeof e == "string" ? Qo.encode(e) : bt(e, r);
3041
+ function Il(e, r) {
3042
+ return typeof e == "string" ? Jo.encode(e) : bt(e, r);
3043
3043
  }
3044
3044
  function Vn(e, r) {
3045
- return r === Yt.PEM ? yl.decode(e) : e;
3045
+ return r === Yt.PEM ? vl.decode(e) : e;
3046
3046
  }
3047
- function ml(e) {
3047
+ function wl(e) {
3048
3048
  return {
3049
3049
  subjectDn: e.subject_dn ?? "",
3050
3050
  issuerDn: e.issuer_dn ?? "",
@@ -3060,7 +3060,7 @@ function ml(e) {
3060
3060
  walletAttestationValid: e.wallet_attestation_valid === !0
3061
3061
  };
3062
3062
  }
3063
- function Il(e) {
3063
+ function Sl(e) {
3064
3064
  return {
3065
3065
  certificatePem: e.certificate_pem ?? "",
3066
3066
  privateKeyPem: e.private_key_pem ?? "",
@@ -3073,11 +3073,11 @@ function ro(e) {
3073
3073
  const r = [], t = (a, d) => {
3074
3074
  d == null || d === "" || r.push(`${a}=${d}`);
3075
3075
  }, s = (a, d) => {
3076
- !Array.isArray(d) || d.length === 0 || r.push(`${a}=${d.map(El).join(",")}`);
3076
+ !Array.isArray(d) || d.length === 0 || r.push(`${a}=${d.map(ml).join(",")}`);
3077
3077
  };
3078
3078
  if (t("subject_dn", e.subjectDn), t("serial_hex", e.serialHex), t("not_before_unix", e.notBeforeUnix), t("not_after_unix", e.notAfterUnix), e.isCa !== void 0 && t("is_ca", e.isCa ? "true" : "false"), e.pathLen !== void 0 && e.pathLen !== null && t("path_len", e.pathLen), s("dns", e.dnsNames), s("ips", e.ipAddresses), s("emails", e.emailAddresses), s("uris", e.uriNames), s("key_usage", e.keyUsage), s("extended_key_usage", e.extendedKeyUsage), t("friendly_name", e.friendlyName), e.walletAttestation) {
3079
3079
  const a = e.walletAttestation;
3080
- t("wallet_curve", bl(a.curve)), t("wallet_private_key_hex", kr(bt(a.privateKey, "walletAttestation.privateKey"))), t("wallet_key_label", a.keyLabel), t("wallet_comment_prefix", a.commentPrefix);
3080
+ t("wallet_curve", Al(a.curve)), t("wallet_private_key_hex", kr(bt(a.privateKey, "walletAttestation.privateKey"))), t("wallet_key_label", a.keyLabel), t("wallet_comment_prefix", a.commentPrefix);
3081
3081
  }
3082
3082
  return r.join(`
3083
3083
  `);
@@ -3361,13 +3361,13 @@ try {
3361
3361
  }));
3362
3362
  } catch {
3363
3363
  }
3364
- async function wl() {
3365
- const r = (await Promise.resolve().then(() => Nh))?.default;
3364
+ async function kl() {
3365
+ const r = (await Promise.resolve().then(() => Th))?.default;
3366
3366
  if (typeof r != "function") throw new Error("Wallet WASM loader is invalid");
3367
- const t = new URL(Ac, import.meta.url).href, s = await fetch(t, {
3367
+ const t = new URL(Ic, import.meta.url).href, s = await fetch(t, {
3368
3368
  cache: "no-store",
3369
3369
  credentials: "omit",
3370
- integrity: "sha384-jL2ELgPv92rTFkleFdObXfmASgsQoaPmy/ew5u0E0ZZ52Sf48BPUWfNkZkU9sRH4",
3370
+ integrity: "sha384-S7mabenUxWMUuMu917SX7uNwhrSYWakTGqp4OU+SIF5miqVT6ArrFpZHvsXc52sC",
3371
3371
  mode: "same-origin",
3372
3372
  redirect: "error",
3373
3373
  referrerPolicy: "no-referrer"
@@ -3405,7 +3405,7 @@ async function wl() {
3405
3405
  I.set(w, P), P += w.byteLength;
3406
3406
  return r({ wasmBinary: I });
3407
3407
  }
3408
- function Sl(e) {
3408
+ function Ol(e) {
3409
3409
  const r = {
3410
3410
  /**
3411
3411
  * Generate a random mnemonic phrase
@@ -4753,7 +4753,7 @@ function Sl(e) {
4753
4753
  */
4754
4754
  isAvailable() {
4755
4755
  const _ = He(e, "_hd_wasi_has_feature");
4756
- return _ ? _(_l.USB_HID) !== 0 : !1;
4756
+ return _ ? _(ul.USB_HID) !== 0 : !1;
4757
4757
  },
4758
4758
  /**
4759
4759
  * Enumerate connected hardware wallets
@@ -5171,7 +5171,7 @@ function Sl(e) {
5171
5171
  encodeBech32(_, f) {
5172
5172
  const h = He(e, "_hd_encode_bech32");
5173
5173
  if (!h)
5174
- return gl(_, f);
5174
+ return bl(_, f);
5175
5175
  const u = le(e, _), g = T(e, f);
5176
5176
  try {
5177
5177
  const v = h(u, g, f.length);
@@ -5183,7 +5183,7 @@ function Sl(e) {
5183
5183
  decodeBech32(_) {
5184
5184
  const f = He(e, "_hd_decode_bech32");
5185
5185
  if (!f)
5186
- return vl(_);
5186
+ return El(_);
5187
5187
  const h = le(e, _), u = e._hd_alloc(128), g = e._hd_alloc(256), v = e._hd_alloc(4);
5188
5188
  try {
5189
5189
  e.setValue(v, 256, "i32");
@@ -5327,7 +5327,7 @@ function Sl(e) {
5327
5327
  Kt(f, "inputEncoding");
5328
5328
  const h = j(e, "_hd_x509_parse_certificate_json"), u = Er(_, f), g = T(e, u);
5329
5329
  try {
5330
- return ml(JSON.parse(
5330
+ return wl(JSON.parse(
5331
5331
  Bn(
5332
5332
  e,
5333
5333
  (v, k) => h(g, u.length, f, v, k)
@@ -5351,7 +5351,7 @@ function Sl(e) {
5351
5351
  },
5352
5352
  exportPkcs12(_, f, h, u, g, v = "", k = "") {
5353
5353
  Kt(f, "certificateEncoding");
5354
- const R = j(e, "_hd_x509_export_pkcs12"), F = Er(_, f), V = T(e, F), Z = bt(u, "privateKey"), ee = T(e, Z), ae = le(e, g), oe = e.lengthBytesUTF8(g) + 1, pe = le(e, v), ce = Al(k, "chainPem"), Q = ce.length > 0 ? T(e, ce) : 0;
5354
+ const R = j(e, "_hd_x509_export_pkcs12"), F = Er(_, f), V = T(e, F), Z = bt(u, "privateKey"), ee = T(e, Z), ae = le(e, g), oe = e.lengthBytesUTF8(g) + 1, pe = le(e, v), ce = Il(k, "chainPem"), Q = ce.length > 0 ? T(e, ce) : 0;
5355
5355
  try {
5356
5356
  return rr(
5357
5357
  e,
@@ -5378,7 +5378,7 @@ function Sl(e) {
5378
5378
  importPkcs12(_, f) {
5379
5379
  const h = j(e, "_hd_x509_import_pkcs12_json"), u = bt(_, "pkcs12Bundle"), g = T(e, u), v = le(e, f), k = e.lengthBytesUTF8(f) + 1;
5380
5380
  try {
5381
- return Il(JSON.parse(
5381
+ return Sl(JSON.parse(
5382
5382
  Bn(
5383
5383
  e,
5384
5384
  (R, F) => h(g, u.length, v, R, F),
@@ -5430,7 +5430,7 @@ function Sl(e) {
5430
5430
  },
5431
5431
  wasiGetWarning(_) {
5432
5432
  const f = He(e, "_hd_wasi_get_warning");
5433
- return f ? f(_) : hl.NOT_AVAILABLE_WASI;
5433
+ return f ? f(_) : fl.NOT_AVAILABLE_WASI;
5434
5434
  },
5435
5435
  wasiGetWarningMessage(_) {
5436
5436
  return "WASI warning API unavailable in this build";
@@ -5639,36 +5639,36 @@ function Sl(e) {
5639
5639
  }
5640
5640
  },
5641
5641
  // Key derivation helpers (convenience wrappers)
5642
- buildSigningPath: es,
5643
- buildEncryptionPath: ts,
5644
- getSigningKey: kl,
5645
- getEncryptionKey: Ol,
5642
+ buildSigningPath: Zo,
5643
+ buildEncryptionPath: es,
5644
+ getSigningKey: Pl,
5645
+ getEncryptionKey: Rl,
5646
5646
  // Aligned binary API for efficient batch operations
5647
5647
  get aligned() {
5648
5648
  if (!this._aligned) {
5649
5649
  const _ = Object.create(e);
5650
5650
  Object.defineProperty(_, "wasmMemory", {
5651
5651
  get: () => ({ buffer: e.HEAPU8.buffer })
5652
- }), this._aligned = new Tc(_);
5652
+ }), this._aligned = new Dc(_);
5653
5653
  }
5654
5654
  return this._aligned;
5655
5655
  }
5656
5656
  };
5657
5657
  return Object.defineProperty(Y, "sdn", {
5658
- value: cl(e),
5658
+ value: dl(e),
5659
5659
  enumerable: !0,
5660
5660
  writable: !1,
5661
5661
  configurable: !1
5662
- }), dl(Y), Y.plugin = Ho({ wallet: Y, wasm: e }), Y;
5662
+ }), hl(Y), Y.plugin = Vo({ wallet: Y, wasm: e }), Y;
5663
5663
  }
5664
- function es(e, r = "0", t = "0") {
5664
+ function Zo(e, r = "0", t = "0") {
5665
5665
  return `m/44'/${e}'/${r}'/0/${t}`;
5666
5666
  }
5667
- function ts(e, r = "0", t = "0") {
5667
+ function es(e, r = "0", t = "0") {
5668
5668
  return `m/44'/${e}'/${r}'/1/${t}`;
5669
5669
  }
5670
- function kl(e, r, t = "0", s = "0") {
5671
- const a = es(r, t, s), d = e.derivePath(a);
5670
+ function Pl(e, r, t = "0", s = "0") {
5671
+ const a = Zo(r, t, s), d = e.derivePath(a);
5672
5672
  try {
5673
5673
  return {
5674
5674
  privateKey: d.privateKey(),
@@ -5679,8 +5679,8 @@ function kl(e, r, t = "0", s = "0") {
5679
5679
  d.wipe();
5680
5680
  }
5681
5681
  }
5682
- function Ol(e, r, t = "0", s = "0") {
5683
- const a = ts(r, t, s), d = e.derivePath(a);
5682
+ function Rl(e, r, t = "0", s = "0") {
5683
+ const a = es(r, t, s), d = e.derivePath(a);
5684
5684
  try {
5685
5685
  return {
5686
5686
  privateKey: d.privateKey(),
@@ -5691,23 +5691,23 @@ function Ol(e, r, t = "0", s = "0") {
5691
5691
  d.wipe();
5692
5692
  }
5693
5693
  }
5694
- async function Pl() {
5695
- const e = await wl();
5696
- return Sl(e);
5694
+ async function Nl() {
5695
+ const e = await kl();
5696
+ return Ol(e);
5697
5697
  }
5698
- const Rl = Object.freeze({
5698
+ const Ll = Object.freeze({
5699
5699
  cm: 0.01,
5700
5700
  km: 1e3,
5701
5701
  m: 1,
5702
5702
  mm: 1e-3
5703
- }), Nl = Object.freeze({
5704
- metersPerSourceUnit: Rl,
5703
+ }), Tl = Object.freeze({
5704
+ metersPerSourceUnit: Ll,
5705
5705
  quaternionNormTolerance: 1e-6,
5706
5706
  scaleComponentExclusiveMin: 0,
5707
5707
  scaleComponentInclusiveMax: 1e6,
5708
5708
  translationComponentAbsMax: 1e6,
5709
5709
  upAxes: Object.freeze(["X_UP", "Y_UP", "Z_UP"])
5710
- }), Ll = Object.freeze({ reviewedTransform: Nl, schemaVersion: 1 }), Lt = new TextEncoder(), rs = Object.getPrototypeOf(Uint8Array.prototype), Tl = Object.getOwnPropertyDescriptor(rs, "buffer").get, xl = Object.getOwnPropertyDescriptor(rs, "length").get, Dl = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get, no = typeof SharedArrayBuffer > "u" ? null : Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, "byteLength").get, At = "sdn-bip32-slip10-purpose-v1", gn = "password-scrypt-v2", Xt = "ed25519-over-sha256-jcs-v1", io = "ed25519-raw-32-v1", Cl = "ed25519-sdn-signed-request-v2", oo = ["protocolVersion", "providerOrigin", "method", "requestUri", "bodySha256", "bodyBytes", "schema", "entityId", "entityName", "documentCount"], so = ["schemaVersion", "keyId", "identityScheme", "algorithm", "encoding", "signatureProfile", "publicKeyHex", "signatureHex", "requestDigestSha256", "challengeId", "challengeBase64url"], ns = "https://review.spacedatanetwork.org", is = "sdn-asset-review-v1", Ul = "asset-review:assets.ipfs.01", Fl = "asset-review-authority:assets.ipfs.01", Qn = "sdn-login:sdn.spaceaware.io", Ml = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Je = /^[0-9a-f]{64}$/u, fi = /^[0-9a-f]{128}$/u, Qt = /^sha256:[0-9a-f]{64}$/u, Bl = /^[1-9A-HJ-NP-Za-km-z]+$/u, Vl = /^b[a-z2-7]{58}$/u, Zn = "abcdefghijklmnopqrstuvwxyz234567", os = 131072, Hl = [
5710
+ }), xl = Object.freeze({ reviewedTransform: Tl, schemaVersion: 1 }), Lt = new TextEncoder(), ts = Object.getPrototypeOf(Uint8Array.prototype), Dl = Object.getOwnPropertyDescriptor(ts, "buffer").get, Cl = Object.getOwnPropertyDescriptor(ts, "length").get, Ul = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get, no = typeof SharedArrayBuffer > "u" ? null : Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, "byteLength").get, At = "sdn-bip32-slip10-purpose-v1", gn = "password-scrypt-v2", Xt = "ed25519-over-sha256-jcs-v1", io = "ed25519-raw-32-v1", Fl = "ed25519-sdn-signed-request-v2", oo = ["protocolVersion", "providerOrigin", "method", "requestUri", "bodySha256", "bodyBytes", "schema", "entityId", "entityName", "documentCount"], so = ["schemaVersion", "keyId", "identityScheme", "algorithm", "encoding", "signatureProfile", "publicKeyHex", "signatureHex", "requestDigestSha256", "challengeId", "challengeBase64url"], rs = "https://review.spacedatanetwork.org", ns = "sdn-asset-review-v1", Ml = "asset-review:assets.ipfs.01", Bl = "asset-review-authority:assets.ipfs.01", Qn = "sdn-login:sdn.spaceaware.io", Vl = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Je = /^[0-9a-f]{64}$/u, fi = /^[0-9a-f]{128}$/u, Qt = /^sha256:[0-9a-f]{64}$/u, Hl = /^[1-9A-HJ-NP-Za-km-z]+$/u, zl = /^b[a-z2-7]{58}$/u, Zn = "abcdefghijklmnopqrstuvwxyz234567", is = 131072, $l = [
5711
5711
  "accountFingerprint",
5712
5712
  "accountIndex",
5713
5713
  "accountLabel",
@@ -5717,7 +5717,7 @@ const Rl = Object.freeze({
5717
5717
  "keys",
5718
5718
  "schemaVersion",
5719
5719
  "seedProfile"
5720
- ], zl = [
5720
+ ], Wl = [
5721
5721
  "bip32Fingerprint",
5722
5722
  "curve",
5723
5723
  "derivation",
@@ -5729,12 +5729,12 @@ const Rl = Object.freeze({
5729
5729
  "purpose",
5730
5730
  "seedProfile",
5731
5731
  "signatureProfile"
5732
- ], $l = [
5732
+ ], jl = [
5733
5733
  "connectionExpiresAt",
5734
5734
  "event",
5735
5735
  "identity",
5736
5736
  "schemaVersion"
5737
- ], Wl = [
5737
+ ], ql = [
5738
5738
  "algorithm",
5739
5739
  "encoding",
5740
5740
  "identityScheme",
@@ -5742,7 +5742,7 @@ const Rl = Object.freeze({
5742
5742
  "schemaVersion",
5743
5743
  "signatureHex",
5744
5744
  "signatureProfile"
5745
- ], jl = [
5745
+ ], Kl = [
5746
5746
  "algorithm",
5747
5747
  "canonicalEnvelope",
5748
5748
  "encoding",
@@ -5782,7 +5782,7 @@ const Rl = Object.freeze({
5782
5782
  "previousDecisionHead",
5783
5783
  "protocolVersion",
5784
5784
  "requestOrigin"
5785
- ], ql = [
5785
+ ], Yl = [
5786
5786
  "metersPerSourceUnit",
5787
5787
  "rotation",
5788
5788
  "scale",
@@ -5811,8 +5811,8 @@ function tt(e, r) {
5811
5811
  }
5812
5812
  return e;
5813
5813
  }
5814
- function ss(e) {
5815
- typeof e != "string" && K("wire JSON must be a string"), Lt.encode(e).byteLength > os && K("wire JSON is too large"), e.charCodeAt(0) === 65279 && K("wire JSON must not contain a BOM");
5814
+ function os(e) {
5815
+ typeof e != "string" && K("wire JSON must be a string"), Lt.encode(e).byteLength > is && K("wire JSON is too large"), e.charCodeAt(0) === 65279 && K("wire JSON must not contain a BOM");
5816
5816
  let r = 0, t = 0;
5817
5817
  const s = () => {
5818
5818
  for (; r < e.length && /[\u0009\u000a\u000d\u0020]/u.test(e[r]); ) r += 1;
@@ -5876,33 +5876,33 @@ function ss(e) {
5876
5876
  const b = d();
5877
5877
  return s(), r !== e.length && K("wire JSON contains trailing bytes"), b;
5878
5878
  }
5879
- function as(e) {
5880
- return typeof e == "string" ? ss(e) : e;
5879
+ function ss(e) {
5880
+ return typeof e == "string" ? os(e) : e;
5881
5881
  }
5882
- function Kl(e, r) {
5882
+ function Gl(e, r) {
5883
5883
  if (e.byteLength !== r.byteLength) return !1;
5884
5884
  let t = 0;
5885
5885
  for (let s = 0; s < e.byteLength; s += 1) t |= e[s] ^ r[s];
5886
5886
  return t === 0;
5887
5887
  }
5888
5888
  function qe(e, r, t) {
5889
- const s = as(e);
5889
+ const s = ss(e);
5890
5890
  Pn(s) || K(`${t} must be a JSON object`), Object.getOwnPropertySymbols(s).length !== 0 && K(`${t} has an unknown symbol field`);
5891
5891
  const a = Object.getOwnPropertyNames(s).sort(), d = [...r].sort(), b = Lt.encode(a.join("\0")), E = Lt.encode(d.join("\0"));
5892
- Kl(b, E) || K(`${t} has missing or unknown fields`);
5892
+ Gl(b, E) || K(`${t} has missing or unknown fields`);
5893
5893
  for (const I of a) {
5894
5894
  const P = Object.getOwnPropertyDescriptor(s, I);
5895
5895
  (!P || !P.enumerable || !("value" in P)) && K(`${t}.${I} must be an enumerable data field`), P.value === void 0 && K(`${t}.${I} must not be undefined`);
5896
5896
  }
5897
5897
  return s;
5898
5898
  }
5899
- function Wr(e) {
5899
+ function $r(e) {
5900
5900
  if (!e || typeof e != "object" || Object.isFrozen(e)) return e;
5901
- for (const r of Object.values(e)) Wr(r);
5901
+ for (const r of Object.values(e)) $r(r);
5902
5902
  return Object.freeze(e);
5903
5903
  }
5904
5904
  function rt(e) {
5905
- return Wr(Object.fromEntries([...e].sort(([r], [t]) => r < t ? -1 : r > t ? 1 : 0)));
5905
+ return $r(Object.fromEntries([...e].sort(([r], [t]) => r < t ? -1 : r > t ? 1 : 0)));
5906
5906
  }
5907
5907
  function pi(e, r, t) {
5908
5908
  (!Array.isArray(e) || Object.getPrototypeOf(e) !== Array.prototype || e.length !== r) && K(`${t} must be a plain array with exactly ${r} values`);
@@ -5913,7 +5913,7 @@ function pi(e, r, t) {
5913
5913
  (!b || !b.enumerable || !("value" in b) || b.value === void 0) && K(`${t} must contain enumerable data values`);
5914
5914
  }
5915
5915
  }
5916
- function Yl(e) {
5916
+ function Xl(e) {
5917
5917
  const r = qe(
5918
5918
  e,
5919
5919
  ["reviewedTransform", "schemaVersion"],
@@ -5950,28 +5950,28 @@ function Yl(e) {
5950
5950
  ["upAxes", Object.freeze(Array.from({ length: 3 }, (a, d) => t.upAxes[d]))]
5951
5951
  ]);
5952
5952
  }
5953
- const qt = Yl(Ll);
5953
+ const qt = Xl(xl);
5954
5954
  function de(e, r, t) {
5955
5955
  return e !== r && K(`${t} must equal ${JSON.stringify(r)}`), e;
5956
5956
  }
5957
- function $r(e, r, t) {
5957
+ function zr(e, r, t) {
5958
5958
  return r.includes(e) || K(`${t} is not an allowed value`), e;
5959
5959
  }
5960
5960
  function Be(e, r, t) {
5961
5961
  return tt(e, t), r.test(e) || K(`${t} has an invalid encoding`), e;
5962
5962
  }
5963
5963
  function Tt(e, r) {
5964
- return tt(e, r), (!Ml.test(e) || new Date(e).toISOString() !== e) && K(`${r} must be exact RFC3339 milliseconds UTC`), e;
5964
+ return tt(e, r), (!Vl.test(e) || new Date(e).toISOString() !== e) && K(`${r} must be exact RFC3339 milliseconds UTC`), e;
5965
5965
  }
5966
5966
  function Rn(e, r) {
5967
5967
  const t = Date.parse(e), s = Date.parse(r);
5968
5968
  s > t && s - t <= 3e5 || K("request lifetime must be in (0, 300] seconds");
5969
5969
  }
5970
- function Gl(e, r) {
5971
- (!ArrayBuffer.isView(e) || !(e instanceof Uint8Array) || Object.getPrototypeOf(e) !== Uint8Array.prototype) && K(`${r} must be a plain Uint8Array`), xl.call(e) !== 32 && K(`${r} must be exactly 32 bytes`);
5970
+ function Jl(e, r) {
5971
+ (!ArrayBuffer.isView(e) || !(e instanceof Uint8Array) || Object.getPrototypeOf(e) !== Uint8Array.prototype) && K(`${r} must be a plain Uint8Array`), Cl.call(e) !== 32 && K(`${r} must be exactly 32 bytes`);
5972
5972
  const s = Array.from({ length: 32 }, (w, m) => String(m)), a = Reflect.ownKeys(e);
5973
5973
  (a.length !== s.length || a.some((w, m) => w !== s[m])) && K(`${r} Uint8Array must contain only 32 indexed bytes`);
5974
- const d = Tl.call(e);
5974
+ const d = Dl.call(e);
5975
5975
  let b = !1;
5976
5976
  if (no)
5977
5977
  try {
@@ -5981,7 +5981,7 @@ function Gl(e, r) {
5981
5981
  }
5982
5982
  b && K(`${r} must not use SharedArrayBuffer storage`);
5983
5983
  try {
5984
- Dl.call(d);
5984
+ Ul.call(d);
5985
5985
  } catch {
5986
5986
  K(`${r} must use ArrayBuffer storage`);
5987
5987
  }
@@ -6004,17 +6004,17 @@ function yi(e, r) {
6004
6004
  K(`${r} must be valid base64url`);
6005
6005
  }
6006
6006
  const s = Uint8Array.from(t, (a) => a.charCodeAt(0));
6007
- return (s.byteLength !== 32 || Gl(s, r) !== e) && K(`${r} must canonically encode exactly 32 bytes`), e;
6007
+ return (s.byteLength !== 32 || Jl(s, r) !== e) && K(`${r} must canonically encode exactly 32 bytes`), e;
6008
6008
  }
6009
- function Xl(e) {
6009
+ function Ql(e) {
6010
6010
  let r = 0, t = 0, s = "";
6011
6011
  for (const a of e)
6012
6012
  for (r = r << 8 | a, t += 8; t >= 5; )
6013
6013
  t -= 5, s += Zn[r >>> t & 31], r &= (1 << t) - 1;
6014
6014
  return t !== 0 && (s += Zn[r << 5 - t & 31]), s;
6015
6015
  }
6016
- function Jl(e, r) {
6017
- tt(e, "modelCid"), Vl.test(e) || K("modelCid must be canonical CIDv1 raw sha2-256 base32");
6016
+ function Zl(e, r) {
6017
+ tt(e, "modelCid"), zl.test(e) || K("modelCid must be canonical CIDv1 raw sha2-256 base32");
6018
6018
  let t = 0, s = 0;
6019
6019
  const a = [];
6020
6020
  for (const E of e.slice(1)) {
@@ -6023,7 +6023,7 @@ function Jl(e, r) {
6023
6023
  }
6024
6024
  (s !== 0 && t !== 0 || a.length !== 36) && K("modelCid has noncanonical base32 tail bits or length");
6025
6025
  const d = Uint8Array.from(a);
6026
- (d[0] !== 1 || d[1] !== 85 || d[2] !== 18 || d[3] !== 32) && K("modelCid must encode CIDv1 raw sha2-256 with a 32-byte digest"), `b${Xl(d)}` !== e && K("modelCid base32 is not canonical");
6026
+ (d[0] !== 1 || d[1] !== 85 || d[2] !== 18 || d[3] !== 32) && K("modelCid must encode CIDv1 raw sha2-256 with a 32-byte digest"), `b${Ql(d)}` !== e && K("modelCid base32 is not canonical");
6027
6027
  let b = 0;
6028
6028
  for (let E = 0; E < 32; E += 1) {
6029
6029
  const I = Number.parseInt(r.slice(E * 2, E * 2 + 2), 16);
@@ -6038,7 +6038,7 @@ function gi(e, r) {
6038
6038
  for (const t of ["identityScheme", "keyId", "signatureProfile"])
6039
6039
  e[t] !== r[t] && K(`canonicalEnvelope ${t} must match the signature result`);
6040
6040
  }
6041
- function Ql(e, r) {
6041
+ function ed(e, r) {
6042
6042
  const s = qe(e, [
6043
6043
  "audience",
6044
6044
  "challengeSha256",
@@ -6055,15 +6055,15 @@ function Ql(e, r) {
6055
6055
  ], "SDN login canonicalEnvelope");
6056
6056
  gi(s, r), de(s.audience, Qn, "SDN login envelope audience"), Be(s.challengeSha256, Je, "SDN login envelope challengeSha256"), de(s.clientId, "sdn-node-console-v1", "SDN login envelope clientId"), Tt(s.issuedAt, "SDN login envelope issuedAt"), Tt(s.expiresAt, "SDN login envelope expiresAt"), Rn(s.issuedAt, s.expiresAt), de(s.identityScheme, At, "SDN login envelope identityScheme"), Be(s.keyId, Qt, "SDN login envelope keyId"), de(s.kind, "sdn-login", "SDN login envelope kind"), Be(s.nonce, Je, "SDN login envelope nonce"), de(s.protocolVersion, 2, "SDN login envelope protocolVersion"), de(s.requestOrigin, "https://sdn.spaceaware.io", "SDN login envelope requestOrigin"), de(s.signatureProfile, Xt, "SDN login envelope signatureProfile");
6057
6057
  }
6058
- function Zl(e, r) {
6058
+ function td(e, r) {
6059
6059
  const t = qe(
6060
6060
  e,
6061
6061
  [...vn, "kind"],
6062
6062
  "authority activation canonicalEnvelope"
6063
6063
  );
6064
- gi(t, r), de(t.kind, "asset-review-authority-activation", "activation envelope kind"), ls(Object.fromEntries(vn.map((s) => [s, t[s]])));
6064
+ gi(t, r), de(t.kind, "asset-review-authority-activation", "activation envelope kind"), cs(Object.fromEntries(vn.map((s) => [s, t[s]])));
6065
6065
  }
6066
- function ed(e, r) {
6066
+ function rd(e, r) {
6067
6067
  const t = e?.decision === "approve" ? ["note", "reviewedTransform"] : e?.decision === "disapprove" ? ["reason"] : [], s = [...ei, ...t], a = qe(e, [
6068
6068
  ...s,
6069
6069
  "identityScheme",
@@ -6072,15 +6072,15 @@ function ed(e, r) {
6072
6072
  "purpose",
6073
6073
  "signatureProfile"
6074
6074
  ], "asset review decision canonicalEnvelope");
6075
- gi(a, r), de(a.identityScheme, At, "decision envelope identityScheme"), Be(a.keyId, Qt, "decision envelope keyId"), de(a.kind, "asset-review-attestation", "decision envelope kind"), de(a.purpose, "asset-review-approval", "decision envelope purpose"), de(a.signatureProfile, Xt, "decision envelope signatureProfile"), ds(Object.fromEntries(s.map((d) => [d, a[d]])));
6075
+ gi(a, r), de(a.identityScheme, At, "decision envelope identityScheme"), Be(a.keyId, Qt, "decision envelope keyId"), de(a.kind, "asset-review-attestation", "decision envelope kind"), de(a.purpose, "asset-review-approval", "decision envelope purpose"), de(a.signatureProfile, Xt, "decision envelope signatureProfile"), ls(Object.fromEntries(s.map((d) => [d, a[d]])));
6076
6076
  }
6077
- function td(e, r, t) {
6078
- tt(e, "canonicalEnvelope"), Lt.encode(e).byteLength > os && K("canonicalEnvelope is too large");
6079
- const s = ss(e);
6080
- return (!Pn(s) || s.kind !== r) && K("canonicalEnvelope kind does not match the operation"), ti(s) !== e && K("canonicalEnvelope must be exact JCS"), r === "sdn-login" ? Ql(s, t) : r === "asset-review-authority-activation" ? Zl(s, t) : r === "asset-review-attestation" ? ed(s, t) : K("canonicalEnvelope operation is not registered"), e;
6077
+ function nd(e, r, t) {
6078
+ tt(e, "canonicalEnvelope"), Lt.encode(e).byteLength > is && K("canonicalEnvelope is too large");
6079
+ const s = os(e);
6080
+ return (!Pn(s) || s.kind !== r) && K("canonicalEnvelope kind does not match the operation"), ti(s) !== e && K("canonicalEnvelope must be exact JCS"), r === "sdn-login" ? ed(s, t) : r === "asset-review-authority-activation" ? td(s, t) : r === "asset-review-attestation" ? rd(s, t) : K("canonicalEnvelope operation is not registered"), e;
6081
6081
  }
6082
- function rd(e, r) {
6083
- const t = qe(e, zl, `identity key ${r.purpose}`);
6082
+ function id(e, r) {
6083
+ const t = qe(e, Wl, `identity key ${r.purpose}`);
6084
6084
  return de(t.purpose, r.purpose, "key purpose"), de(t.identityScheme, At, "key identityScheme"), de(t.seedProfile, gn, "key seedProfile"), de(t.signatureProfile, r.signatureProfile, "key signatureProfile"), de(t.curve, r.curve, "key curve"), de(t.derivation, "slip10", "key derivation"), de(t.path, r.path, "key path"), de(t.encoding, "raw", "key encoding"), Be(t.publicKeyHex, Je, "key publicKeyHex"), de(t.bip32Fingerprint, null, "key bip32Fingerprint"), Be(t.keyId, Qt, "key keyId"), rt([
6085
6085
  ["bip32Fingerprint", null],
6086
6086
  ["curve", t.curve],
@@ -6095,9 +6095,9 @@ function rd(e, r) {
6095
6095
  ["signatureProfile", t.signatureProfile]
6096
6096
  ]);
6097
6097
  }
6098
- function nd(e) {
6099
- const r = qe(e, Hl, "WalletPublicIdentity");
6100
- de(r.schemaVersion, 1, "identity schemaVersion"), de(r.identityScheme, At, "identity identityScheme"), de(r.seedProfile, gn, "identity seedProfile"), r.accountIndex !== 0 && K("public wallet identity must use account 0"), de(r.accountLabel, null, "identity accountLabel"), tt(r.accountXpub, "identity accountXpub"), /^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(r.accountXpub) || K("identity accountXpub is invalid"), tt(r.accountPeerId, "identity accountPeerId"), (!r.accountPeerId.startsWith("16Uiu2H") || r.accountPeerId.length < 40 || r.accountPeerId.length > 64 || !Bl.test(r.accountPeerId)) && K("identity accountPeerId is invalid"), Be(r.accountFingerprint, /^[0-9a-f]{8}$/u, "identity accountFingerprint"), pi(r.keys, 3, "public identity keys array");
6098
+ function od(e) {
6099
+ const r = qe(e, $l, "WalletPublicIdentity");
6100
+ de(r.schemaVersion, 1, "identity schemaVersion"), de(r.identityScheme, At, "identity identityScheme"), de(r.seedProfile, gn, "identity seedProfile"), r.accountIndex !== 0 && K("public wallet identity must use account 0"), de(r.accountLabel, null, "identity accountLabel"), tt(r.accountXpub, "identity accountXpub"), /^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(r.accountXpub) || K("identity accountXpub is invalid"), tt(r.accountPeerId, "identity accountPeerId"), (!r.accountPeerId.startsWith("16Uiu2H") || r.accountPeerId.length < 40 || r.accountPeerId.length > 64 || !Hl.test(r.accountPeerId)) && K("identity accountPeerId is invalid"), Be(r.accountFingerprint, /^[0-9a-f]{8}$/u, "identity accountFingerprint"), pi(r.keys, 3, "public identity keys array");
6101
6101
  const t = [
6102
6102
  {
6103
6103
  purpose: "asset-review-approval",
@@ -6119,7 +6119,7 @@ function nd(e) {
6119
6119
  }
6120
6120
  ], s = Array.from(
6121
6121
  { length: 3 },
6122
- (a, d) => rd(r.keys[d], t[d])
6122
+ (a, d) => id(r.keys[d], t[d])
6123
6123
  );
6124
6124
  return rt([
6125
6125
  ["accountFingerprint", r.accountFingerprint],
@@ -6128,25 +6128,25 @@ function nd(e) {
6128
6128
  ["accountPeerId", r.accountPeerId],
6129
6129
  ["accountXpub", r.accountXpub],
6130
6130
  ["identityScheme", At],
6131
- ["keys", Wr(s)],
6131
+ ["keys", $r(s)],
6132
6132
  ["schemaVersion", 1],
6133
6133
  ["seedProfile", gn]
6134
6134
  ]);
6135
6135
  }
6136
- function cs(e, r) {
6137
- const t = qe(e, $l, `${r} result`);
6138
- de(t.schemaVersion, 1, "connection result schemaVersion"), $r(t.event, ["connected", "disconnected"], "connection event"), r === "connect" && t.event !== "connected" && K("connect result must be connected");
6136
+ function as(e, r) {
6137
+ const t = qe(e, jl, `${r} result`);
6138
+ de(t.schemaVersion, 1, "connection result schemaVersion"), zr(t.event, ["connected", "disconnected"], "connection event"), r === "connect" && t.event !== "connected" && K("connect result must be connected");
6139
6139
  let s = null, a = null;
6140
- return t.event === "connected" ? (s = nd(t.identity), a = Tt(t.connectionExpiresAt, "connectionExpiresAt")) : (t.identity !== null || t.connectionExpiresAt !== null) && K("disconnected result must clear identity and expiry"), rt([
6140
+ return t.event === "connected" ? (s = od(t.identity), a = Tt(t.connectionExpiresAt, "connectionExpiresAt")) : (t.identity !== null || t.connectionExpiresAt !== null) && K("disconnected result must clear identity and expiry"), rt([
6141
6141
  ["connectionExpiresAt", a],
6142
6142
  ["event", t.event],
6143
6143
  ["identity", s],
6144
6144
  ["schemaVersion", 1]
6145
6145
  ]);
6146
6146
  }
6147
- function id(e) {
6148
- const r = qe(e, Wl, "raw signature");
6149
- return de(r.schemaVersion, 1, "signature schemaVersion"), Be(r.keyId, Qt, "signature keyId"), $r(r.identityScheme, [
6147
+ function sd(e) {
6148
+ const r = qe(e, ql, "raw signature");
6149
+ return de(r.schemaVersion, 1, "signature schemaVersion"), Be(r.keyId, Qt, "signature keyId"), zr(r.identityScheme, [
6150
6150
  "sdn-fast-password-auth-v1-legacy",
6151
6151
  "sdn-bip39-auth-v1-legacy"
6152
6152
  ], "raw signature identityScheme"), de(r.algorithm, "ed25519", "signature algorithm"), de(r.encoding, "raw", "signature encoding"), de(r.signatureProfile, io, "signature profile"), Be(r.signatureHex, fi, "signatureHex"), rt([
@@ -6160,8 +6160,8 @@ function id(e) {
6160
6160
  ]);
6161
6161
  }
6162
6162
  function vi(e, r) {
6163
- const t = qe(e, jl, "canonical signature");
6164
- return de(t.schemaVersion, 1, "signature schemaVersion"), Be(t.keyId, Qt, "signature keyId"), de(t.identityScheme, At, "signature identityScheme"), de(t.algorithm, "ed25519", "signature algorithm"), de(t.encoding, "raw", "signature encoding"), de(t.signatureProfile, Xt, "signature profile"), td(t.canonicalEnvelope, r, t), Be(t.signedDigestSha256, Je, "signedDigestSha256"), Be(t.signatureHex, fi, "signatureHex"), rt([
6163
+ const t = qe(e, Kl, "canonical signature");
6164
+ return de(t.schemaVersion, 1, "signature schemaVersion"), Be(t.keyId, Qt, "signature keyId"), de(t.identityScheme, At, "signature identityScheme"), de(t.algorithm, "ed25519", "signature algorithm"), de(t.encoding, "raw", "signature encoding"), de(t.signatureProfile, Xt, "signature profile"), nd(t.canonicalEnvelope, r, t), Be(t.signedDigestSha256, Je, "signedDigestSha256"), Be(t.signatureHex, fi, "signatureHex"), rt([
6165
6165
  ["algorithm", "ed25519"],
6166
6166
  ["canonicalEnvelope", t.canonicalEnvelope],
6167
6167
  ["encoding", "raw"],
@@ -6173,16 +6173,16 @@ function vi(e, r) {
6173
6173
  ["signedDigestSha256", t.signedDigestSha256]
6174
6174
  ]);
6175
6175
  }
6176
- function od(e) {
6176
+ function ad(e) {
6177
6177
  const r = qe(e, ["challengeBase64url", "protocolVersion"], "SDN login v1 request");
6178
6178
  return de(r.protocolVersion, 1, "SDN login v1 protocolVersion"), yi(r.challengeBase64url, "challengeBase64url"), rt([
6179
6179
  ["challengeBase64url", r.challengeBase64url],
6180
6180
  ["protocolVersion", 1]
6181
6181
  ]);
6182
6182
  }
6183
- function sd(e) {
6183
+ function cd(e) {
6184
6184
  const r = qe(e, oo, "SDN publication request");
6185
- de(r.protocolVersion, 1, "publication protocolVersion"), de(r.method, "POST", "publication method"), $r(r.schema, ["CZM", "ETM"], "publication schema"), tt(r.providerOrigin, "providerOrigin");
6185
+ de(r.protocolVersion, 1, "publication protocolVersion"), de(r.method, "POST", "publication method"), zr(r.schema, ["CZM", "ETM"], "publication schema"), tt(r.providerOrigin, "providerOrigin");
6186
6186
  let t;
6187
6187
  try {
6188
6188
  t = new URL(r.providerOrigin);
@@ -6191,7 +6191,7 @@ function sd(e) {
6191
6191
  }
6192
6192
  (t.protocol !== "https:" || r.providerOrigin !== t.origin || t.username || t.password || t.port === "0" || t.pathname !== "/" || t.search || t.hash || t.hostname.length > 253 || t.hostname.split(".").some((d) => !/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/u.test(d))) && K("providerOrigin must be a canonical HTTPS DNS or IPv4 origin");
6193
6193
  const s = `/api/v1/data/publish/${r.schema}`, a = `/api/v1/data/publish/batch/${r.schema}`;
6194
- $r(r.requestUri, [s, `${s}.fbs`, a, `${a}.fbs`], "publication requestUri"), Be(r.bodySha256, Je, "publication bodySha256");
6194
+ zr(r.requestUri, [s, `${s}.fbs`, a, `${a}.fbs`], "publication requestUri"), Be(r.bodySha256, Je, "publication bodySha256");
6195
6195
  for (const [d, b] of [["bodyBytes", 1048576], ["documentCount", 1e5]])
6196
6196
  (!Number.isInteger(r[d]) || r[d] < 1 || r[d] > b) && K(`publication ${d} is outside its bounds`);
6197
6197
  for (const d of ["entityId", "entityName"]) {
@@ -6201,11 +6201,11 @@ function sd(e) {
6201
6201
  }
6202
6202
  return rt(oo.map((d) => [d, r[d]]));
6203
6203
  }
6204
- function ad(e) {
6204
+ function ld(e) {
6205
6205
  const r = qe(e, so, "SDN publication signature");
6206
- return de(r.schemaVersion, 1, "publication signature schemaVersion"), de(r.identityScheme, At, "publication identityScheme"), de(r.algorithm, "ed25519", "publication algorithm"), de(r.encoding, "raw", "publication encoding"), de(r.signatureProfile, Cl, "publication signatureProfile"), Be(r.keyId, Qt, "publication keyId"), Be(r.publicKeyHex, Je, "publication publicKeyHex"), Be(r.signatureHex, fi, "publication signatureHex"), Be(r.requestDigestSha256, Je, "publication requestDigestSha256"), Be(r.challengeId, /^[0-9a-f]{32}$/u, "publication challengeId"), yi(r.challengeBase64url, "publication challengeBase64url"), rt(so.map((t) => [t, r[t]]));
6206
+ return de(r.schemaVersion, 1, "publication signature schemaVersion"), de(r.identityScheme, At, "publication identityScheme"), de(r.algorithm, "ed25519", "publication algorithm"), de(r.encoding, "raw", "publication encoding"), de(r.signatureProfile, Fl, "publication signatureProfile"), Be(r.keyId, Qt, "publication keyId"), Be(r.publicKeyHex, Je, "publication publicKeyHex"), Be(r.signatureHex, fi, "publication signatureHex"), Be(r.requestDigestSha256, Je, "publication requestDigestSha256"), Be(r.challengeId, /^[0-9a-f]{32}$/u, "publication challengeId"), yi(r.challengeBase64url, "publication challengeBase64url"), rt(so.map((t) => [t, r[t]]));
6207
6207
  }
6208
- function cd(e) {
6208
+ function dd(e) {
6209
6209
  const r = qe(e, [
6210
6210
  "audience",
6211
6211
  "challengeBase64url",
@@ -6223,9 +6223,9 @@ function cd(e) {
6223
6223
  ["protocolVersion", 2]
6224
6224
  ]);
6225
6225
  }
6226
- function ls(e) {
6226
+ function cs(e) {
6227
6227
  const r = qe(e, vn, "authority activation request");
6228
- return de(r.protocolVersion, 1, "activation protocolVersion"), de(r.audience, Fl, "activation audience"), de(r.requestOrigin, ns, "activation requestOrigin"), de(r.clientId, is, "activation clientId"), de(r.serviceInstance, "assets.ipfs.01/asset-review-attestation", "activation serviceInstance"), de(r.purpose, "asset-review-authority-activation", "activation purpose"), Be(r.nonce, Je, "activation nonce"), Tt(r.issuedAt, "activation issuedAt"), Tt(r.expiresAt, "activation expiresAt"), Rn(r.issuedAt, r.expiresAt), Be(r.publicKeyHex, Je, "activation publicKeyHex"), Be(r.keyId, Qt, "activation keyId"), de(r.identityScheme, At, "activation identityScheme"), de(r.signatureProfile, Xt, "activation signatureProfile"), rt(vn.map((t) => [t, r[t]]));
6228
+ return de(r.protocolVersion, 1, "activation protocolVersion"), de(r.audience, Bl, "activation audience"), de(r.requestOrigin, rs, "activation requestOrigin"), de(r.clientId, ns, "activation clientId"), de(r.serviceInstance, "assets.ipfs.01/asset-review-attestation", "activation serviceInstance"), de(r.purpose, "asset-review-authority-activation", "activation purpose"), Be(r.nonce, Je, "activation nonce"), Tt(r.issuedAt, "activation issuedAt"), Tt(r.expiresAt, "activation expiresAt"), Rn(r.issuedAt, r.expiresAt), Be(r.publicKeyHex, Je, "activation publicKeyHex"), Be(r.keyId, Qt, "activation keyId"), de(r.identityScheme, At, "activation identityScheme"), de(r.signatureProfile, Xt, "activation signatureProfile"), rt(vn.map((t) => [t, r[t]]));
6229
6229
  }
6230
6230
  function Hn(e, r, t) {
6231
6231
  pi(e, r, `${t} array`);
@@ -6233,13 +6233,13 @@ function Hn(e, r, t) {
6233
6233
  const b = e[d];
6234
6234
  return (typeof b != "number" || !Number.isFinite(b)) && K(`${t} values must be finite numbers`), b;
6235
6235
  });
6236
- return Wr(s);
6236
+ return $r(s);
6237
6237
  }
6238
- function ld(e) {
6239
- const r = qe(e, ql, "reviewedTransform"), t = Hn(r.translation, 3, "translation"), s = Hn(r.rotation, 4, "rotation"), a = Hn(r.scale, 3, "scale");
6238
+ function _d(e) {
6239
+ const r = qe(e, Yl, "reviewedTransform"), t = Hn(r.translation, 3, "translation"), s = Hn(r.rotation, 4, "rotation"), a = Hn(r.scale, 3, "scale");
6240
6240
  t.some((b) => Math.abs(b) > qt.translationComponentAbsMax) && K("translation values exceed the reviewed transform policy"), a.some((b) => b <= qt.scaleComponentExclusiveMin || b > qt.scaleComponentInclusiveMax) && K("scale values exceed the reviewed transform policy");
6241
6241
  const d = Math.hypot(...s);
6242
- return Math.abs(d - 1) > qt.quaternionNormTolerance && K("rotation must be a unit quaternion within the reviewed tolerance"), $r(r.upAxis, qt.upAxes, "upAxis"), tt(r.sourceUnits, "sourceUnits"), Object.hasOwn(qt.metersPerSourceUnit, r.sourceUnits) || K("sourceUnits is not allowed by the reviewed transform policy"), (typeof r.metersPerSourceUnit != "number" || !Number.isFinite(r.metersPerSourceUnit) || r.metersPerSourceUnit !== qt.metersPerSourceUnit[r.sourceUnits]) && K("metersPerSourceUnit must exactly match sourceUnits"), rt([
6242
+ return Math.abs(d - 1) > qt.quaternionNormTolerance && K("rotation must be a unit quaternion within the reviewed tolerance"), zr(r.upAxis, qt.upAxes, "upAxis"), tt(r.sourceUnits, "sourceUnits"), Object.hasOwn(qt.metersPerSourceUnit, r.sourceUnits) || K("sourceUnits is not allowed by the reviewed transform policy"), (typeof r.metersPerSourceUnit != "number" || !Number.isFinite(r.metersPerSourceUnit) || r.metersPerSourceUnit !== qt.metersPerSourceUnit[r.sourceUnits]) && K("metersPerSourceUnit must exactly match sourceUnits"), rt([
6243
6243
  ["metersPerSourceUnit", r.metersPerSourceUnit],
6244
6244
  ["rotation", s],
6245
6245
  ["scale", a],
@@ -6257,66 +6257,66 @@ function co(e, r, t) {
6257
6257
  const s = Array.from(e, (a) => a.codePointAt(0));
6258
6258
  return (ao(s[0]) || ao(s[s.length - 1])) && K(`${r} must already be trimmed`), e;
6259
6259
  }
6260
- function ds(e) {
6261
- const r = as(e);
6260
+ function ls(e) {
6261
+ const r = ss(e);
6262
6262
  Pn(r) || K("asset review decision request must be a JSON object");
6263
6263
  const t = Object.getOwnPropertyDescriptor(r, "decision");
6264
6264
  (!t || !t.enumerable || !("value" in t) || t.value === void 0) && K("asset review decision request has an invalid decision field");
6265
6265
  const s = t.value, a = s === "approve" ? ["note", "reviewedTransform"] : s === "disapprove" ? ["reason"] : [], d = qe(r, [...ei, ...a], "asset review decision request");
6266
- de(d.protocolVersion, 1, "decision protocolVersion"), de(d.audience, Ul, "decision audience"), de(d.requestOrigin, ns, "decision requestOrigin"), de(d.clientId, is, "decision clientId"), Be(d.challengeId, Je, "challengeId"), Be(d.nonce, Je, "decision nonce"), Tt(d.issuedAt, "decision issuedAt"), Tt(d.expiresAt, "decision expiresAt"), Rn(d.issuedAt, d.expiresAt), Be(d.modelSha256, Je, "modelSha256"), Be(d.metadataSha256, Je, "metadataSha256"), d.previousDecisionHead !== null && Be(d.previousDecisionHead, Je, "previousDecisionHead"), Jl(d.modelCid, d.modelSha256), (!Number.isSafeInteger(d.modelBytes) || d.modelBytes <= 0) && K("modelBytes must be a positive safe integer"), tt(d.candidateKey, "candidateKey");
6266
+ de(d.protocolVersion, 1, "decision protocolVersion"), de(d.audience, Ml, "decision audience"), de(d.requestOrigin, rs, "decision requestOrigin"), de(d.clientId, ns, "decision clientId"), Be(d.challengeId, Je, "challengeId"), Be(d.nonce, Je, "decision nonce"), Tt(d.issuedAt, "decision issuedAt"), Tt(d.expiresAt, "decision expiresAt"), Rn(d.issuedAt, d.expiresAt), Be(d.modelSha256, Je, "modelSha256"), Be(d.metadataSha256, Je, "metadataSha256"), d.previousDecisionHead !== null && Be(d.previousDecisionHead, Je, "previousDecisionHead"), Zl(d.modelCid, d.modelSha256), (!Number.isSafeInteger(d.modelBytes) || d.modelBytes <= 0) && K("modelBytes must be a positive safe integer"), tt(d.candidateKey, "candidateKey");
6267
6267
  const b = "asset-review:", E = `:${d.modelSha256}`;
6268
6268
  (!d.candidateKey.startsWith(b) || !d.candidateKey.endsWith(E) || Lt.encode(d.candidateKey).byteLength > 206) && K("candidateKey does not bind the model digest");
6269
6269
  const I = d.candidateKey.slice(b.length, -E.length);
6270
6270
  (!/^[a-z0-9-]+\/[a-z0-9][a-z0-9-]*$/u.test(I) || Lt.encode(I).byteLength > 128) && K("candidateKey entityId is invalid");
6271
6271
  const P = ei.map((m) => [m, d[m]]);
6272
- return s === "approve" ? (P.push(["note", co(d.note, "note", !0)]), P.push(["reviewedTransform", ld(d.reviewedTransform)])) : P.push(["reason", co(d.reason, "reason", !1)]), Object.values(d).filter((m) => typeof m == "string").reduce((m, N) => m + Lt.encode(N).byteLength, 0) > 16384 && K("decision request strings exceed 16 KiB"), rt(P);
6273
- }
6274
- function _s(e, r) {
6275
- return qe(e, [], r), Wr({});
6276
- }
6277
- function dd(e) {
6278
- return _s(e, "wallet connect request");
6272
+ return s === "approve" ? (P.push(["note", co(d.note, "note", !0)]), P.push(["reviewedTransform", _d(d.reviewedTransform)])) : P.push(["reason", co(d.reason, "reason", !1)]), Object.values(d).filter((m) => typeof m == "string").reduce((m, N) => m + Lt.encode(N).byteLength, 0) > 16384 && K("decision request strings exceed 16 KiB"), rt(P);
6279
6273
  }
6280
- function _d(e) {
6281
- return cs(e, "connect");
6274
+ function ds(e, r) {
6275
+ return qe(e, [], r), $r({});
6282
6276
  }
6283
6277
  function hd(e) {
6284
- return _s(e, "wallet account request");
6285
- }
6286
- function hs(e) {
6287
- return cs(e, "account");
6278
+ return ds(e, "wallet connect request");
6288
6279
  }
6289
6280
  function ud(e) {
6290
- return od(e);
6281
+ return as(e, "connect");
6291
6282
  }
6292
6283
  function fd(e) {
6293
- return id(e);
6284
+ return ds(e, "wallet account request");
6285
+ }
6286
+ function _s(e) {
6287
+ return as(e, "account");
6294
6288
  }
6295
6289
  function pd(e) {
6296
- return cd(e);
6290
+ return ad(e);
6297
6291
  }
6298
6292
  function yd(e) {
6299
- return vi(e, "sdn-login");
6300
- }
6301
- function us(e) {
6302
6293
  return sd(e);
6303
6294
  }
6304
- function fs(e) {
6305
- return ad(e);
6306
- }
6307
6295
  function gd(e) {
6308
- return ls(e);
6296
+ return dd(e);
6309
6297
  }
6310
6298
  function vd(e) {
6311
- return vi(e, "asset-review-authority-activation");
6299
+ return vi(e, "sdn-login");
6300
+ }
6301
+ function hs(e) {
6302
+ return cd(e);
6303
+ }
6304
+ function us(e) {
6305
+ return ld(e);
6312
6306
  }
6313
6307
  function bd(e) {
6314
- return ds(e);
6308
+ return cs(e);
6315
6309
  }
6316
6310
  function Ed(e) {
6311
+ return vi(e, "asset-review-authority-activation");
6312
+ }
6313
+ function Ad(e) {
6314
+ return ls(e);
6315
+ }
6316
+ function md(e) {
6317
6317
  return vi(e, "asset-review-attestation");
6318
6318
  }
6319
- const Ad = Object.freeze([
6319
+ const Id = Object.freeze([
6320
6320
  "callbackUri",
6321
6321
  "clientDisplayName",
6322
6322
  "clientId",
@@ -6330,48 +6330,48 @@ const Ad = Object.freeze([
6330
6330
  "schemaVersion",
6331
6331
  "state",
6332
6332
  "transactionId"
6333
- ]), cn = /^[0-9a-f]{64}$/u, ps = /^[A-Za-z0-9_-]{43}$/u, md = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Id = new TextEncoder(), ys = Object.freeze({
6333
+ ]), an = /^[0-9a-f]{64}$/u, fs = /^[A-Za-z0-9_-]{43}$/u, wd = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Sd = new TextEncoder(), ps = Object.freeze({
6334
6334
  "sdn.auth.publish-request.v1": Object.freeze({
6335
- parseRequest: us,
6336
- buildResult: fs,
6335
+ parseRequest: hs,
6336
+ buildResult: us,
6337
6337
  publish: !0
6338
6338
  }),
6339
6339
  "sdn.auth.jcs-envelope.v2": Object.freeze({
6340
- parseRequest: pd,
6341
- buildResult: yd,
6340
+ parseRequest: gd,
6341
+ buildResult: vd,
6342
6342
  sign(e, r, t, s) {
6343
6343
  return e.signSdnLoginV2(r, t, s.registryRow);
6344
6344
  }
6345
6345
  }),
6346
6346
  "sdn.auth.raw-challenge.v1": Object.freeze({
6347
- parseRequest: ud,
6348
- buildResult: fd,
6347
+ parseRequest: pd,
6348
+ buildResult: yd,
6349
6349
  sign(e, r, t) {
6350
- return e.signSdnLoginV1(r, Od(t.challengeBase64url));
6350
+ return e.signSdnLoginV1(r, Rd(t.challengeBase64url));
6351
6351
  }
6352
6352
  }),
6353
6353
  "sdn.asset-review.authority-activation.v1": Object.freeze({
6354
- parseRequest: gd,
6355
- buildResult: vd,
6354
+ parseRequest: bd,
6355
+ buildResult: Ed,
6356
6356
  sign(e, r, t, s) {
6357
6357
  return e.signAssetReviewAuthorityActivation(r, t, s.registryRow);
6358
6358
  }
6359
6359
  }),
6360
6360
  "sdn.asset-review.decision.v1": Object.freeze({
6361
- parseRequest: bd,
6362
- buildResult: Ed,
6361
+ parseRequest: Ad,
6362
+ buildResult: md,
6363
6363
  sign(e, r, t, s) {
6364
6364
  return e.signAssetReviewDecision(r, t, s.registryRow);
6365
6365
  }
6366
6366
  }),
6367
6367
  "sdn.wallet.account.v1": Object.freeze({
6368
- parseRequest: hd,
6369
- buildResult: hs,
6368
+ parseRequest: fd,
6369
+ buildResult: _s,
6370
6370
  connect: !0
6371
6371
  }),
6372
6372
  "sdn.wallet.connect.v1": Object.freeze({
6373
- parseRequest: dd,
6374
- buildResult: _d,
6373
+ parseRequest: hd,
6374
+ buildResult: ud,
6375
6375
  connect: !0
6376
6376
  })
6377
6377
  });
@@ -6411,8 +6411,8 @@ function ri(e, r, t = "INVALID_TRANSACTION") {
6411
6411
  }
6412
6412
  return b;
6413
6413
  }
6414
- function ln(e, r = "INVALID_TRANSACTION") {
6415
- (typeof e != "string" || !md.test(e)) && Se(r);
6414
+ function cn(e, r = "INVALID_TRANSACTION") {
6415
+ (typeof e != "string" || !wd.test(e)) && Se(r);
6416
6416
  const t = Date.parse(e);
6417
6417
  return (!Number.isFinite(t) || new Date(t).toISOString() !== e) && Se(r), t;
6418
6418
  }
@@ -6426,17 +6426,17 @@ function Mr(e) {
6426
6426
  function ni(e) {
6427
6427
  return e === null || typeof e == "boolean" || typeof e == "string" ? JSON.stringify(e) : typeof e == "number" ? (Number.isFinite(e) || Se("INVALID_TRANSACTION"), JSON.stringify(e)) : Array.isArray(e) ? `[${e.map(ni).join(",")}]` : (bi(e) || Se("INVALID_TRANSACTION"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${ni(e[r])}`).join(",")}}`);
6428
6428
  }
6429
- async function wd(e, r) {
6429
+ async function kd(e, r) {
6430
6430
  typeof r != "function" && Se("CRYPTO_UNAVAILABLE");
6431
6431
  let t;
6432
6432
  try {
6433
- t = await r(Id.encode(ni(e)));
6433
+ t = await r(Sd.encode(ni(e)));
6434
6434
  } catch {
6435
6435
  Se("CRYPTO_UNAVAILABLE");
6436
6436
  }
6437
6437
  return (!(t instanceof Uint8Array) || t.byteLength !== 32) && Se("CRYPTO_UNAVAILABLE"), Array.from(t, (s) => s.toString(16).padStart(2, "0")).join("");
6438
6438
  }
6439
- function Sd(e, r) {
6439
+ function Od(e, r) {
6440
6440
  if (typeof e != "string" || typeof r != "string") return !1;
6441
6441
  const t = Math.max(e.length, r.length);
6442
6442
  let s = e.length ^ r.length;
@@ -6444,7 +6444,7 @@ function Sd(e, r) {
6444
6444
  s |= (e.charCodeAt(a) || 0) ^ (r.charCodeAt(a) || 0);
6445
6445
  return s === 0;
6446
6446
  }
6447
- function kd(e, r) {
6447
+ function Pd(e, r) {
6448
6448
  try {
6449
6449
  if (typeof e?.resolveRegistryBinding == "function")
6450
6450
  return e.resolveRegistryBinding(r);
@@ -6473,17 +6473,17 @@ async function zn(e, {
6473
6473
  now: d = () => Date.now(),
6474
6474
  expectedTransactionId: b = null
6475
6475
  }) {
6476
- const E = ri(e, Ad);
6477
- (E.schemaVersion !== 1 || typeof E.clientDisplayName != "string" || E.clientDisplayName.length < 1 || E.clientDisplayName.length > 80 || !cn.test(E.transactionId) || !cn.test(E.state) || !cn.test(E.requestSha256) || !ps.test(E.resultToken)) && Se("INVALID_TRANSACTION"), b !== null && E.transactionId !== b && Se("INVALID_TRANSACTION");
6478
- const I = ys[E.operation];
6476
+ const E = ri(e, Id);
6477
+ (E.schemaVersion !== 1 || typeof E.clientDisplayName != "string" || E.clientDisplayName.length < 1 || E.clientDisplayName.length > 80 || !an.test(E.transactionId) || !an.test(E.state) || !an.test(E.requestSha256) || !fs.test(E.resultToken)) && Se("INVALID_TRANSACTION"), b !== null && E.transactionId !== b && Se("INVALID_TRANSACTION");
6478
+ const I = ps[E.operation];
6479
6479
  I || Se("UNREGISTERED_TRANSACTION");
6480
- const P = kd(r, {
6480
+ const P = Pd(r, {
6481
6481
  clientId: E.clientId,
6482
6482
  operation: E.operation,
6483
6483
  requestOrigin: E.requestOrigin
6484
6484
  });
6485
6485
  (P.registryReleaseSha256 !== E.registryVersion || P.callbackUri !== E.callbackUri || P.clientDisplayName !== E.clientDisplayName || P.clientId !== E.clientId || P.operation !== E.operation || P.requestOrigin !== E.requestOrigin) && Se("REGISTRY_BINDING_MISMATCH");
6486
- const w = d(), m = ln(E.expiresAt);
6486
+ const w = d(), m = cn(E.expiresAt);
6487
6487
  (!Number.isFinite(w) || m <= w || m - w > P.maxLifetimeSeconds * 1e3) && Se("TRANSACTION_EXPIRED");
6488
6488
  let N;
6489
6489
  try {
@@ -6493,12 +6493,12 @@ async function zn(e, {
6493
6493
  }
6494
6494
  let L;
6495
6495
  try {
6496
- L = await wd(N, s);
6496
+ L = await kd(N, s);
6497
6497
  } catch (U) {
6498
6498
  if (U instanceof xt) throw U;
6499
6499
  Se("CRYPTO_UNAVAILABLE");
6500
6500
  }
6501
- Sd(L, E.requestSha256) || Se("REQUEST_HASH_MISMATCH");
6501
+ Od(L, E.requestSha256) || Se("REQUEST_HASH_MISMATCH");
6502
6502
  const D = { ...E, request: N };
6503
6503
  return Object.freeze({
6504
6504
  binding: Mr(P),
@@ -6507,8 +6507,8 @@ async function zn(e, {
6507
6507
  transaction: Mr(D)
6508
6508
  });
6509
6509
  }
6510
- function Od(e) {
6511
- ps.test(e) || Se("INVALID_TRANSACTION");
6510
+ function Rd(e) {
6511
+ fs.test(e) || Se("INVALID_TRANSACTION");
6512
6512
  let r;
6513
6513
  try {
6514
6514
  r = globalThis.atob(`${e.replace(/-/gu, "+").replace(/_/gu, "/")}=`);
@@ -6518,7 +6518,7 @@ function Od(e) {
6518
6518
  const t = Uint8Array.from(r, (s) => s.charCodeAt(0));
6519
6519
  return t.byteLength !== 32 && Se("INVALID_TRANSACTION"), t;
6520
6520
  }
6521
- function Pd(e, r, t, s) {
6521
+ function Nd(e, r, t, s) {
6522
6522
  const a = e.createElement("div");
6523
6523
  a.className = "wallet-confirmation-row";
6524
6524
  const d = e.createElement("strong");
@@ -6534,7 +6534,7 @@ function lo(e) {
6534
6534
  }
6535
6535
  }
6536
6536
  const _o = "The site sees your public key and address. It cannot spend or sign anything without asking you.";
6537
- function gs(e, r = {}) {
6537
+ function ys(e, r = {}) {
6538
6538
  const t = lo(e.requestOrigin), s = String(e.clientDisplayName ?? "").trim(), a = s || t, d = s && t && s !== t ? [["Site", t]] : [], b = (E, I, P, w = []) => ({
6539
6539
  title: E,
6540
6540
  detail: I,
@@ -6569,26 +6569,26 @@ function gs(e, r = {}) {
6569
6569
  return b(`Confirm a request from ${a}`, "", "Confirm");
6570
6570
  }
6571
6571
  }
6572
- function Rd(e, { binding: r, document: t, request: s }) {
6573
- const a = gs(r, s ?? {});
6572
+ function Ld(e, { binding: r, document: t, request: s }) {
6573
+ const a = ys(r, s ?? {});
6574
6574
  e.replaceChildren();
6575
6575
  const d = t.createElement("h1");
6576
6576
  if (d.id = "wallet-confirmation-heading", d.textContent = a.title, e.append(d), a.detail) {
6577
6577
  const b = t.createElement("p");
6578
6578
  b.className = "wallet-confirmation-detail", b.textContent = a.detail, e.append(b);
6579
6579
  }
6580
- for (const [b, E] of a.facts) Pd(t, e, b, String(E));
6580
+ for (const [b, E] of a.facts) Nd(t, e, b, String(E));
6581
6581
  return e;
6582
6582
  }
6583
- async function Nd({ assertCurrent: e, binding: r, capabilities: t, handle: s, identity: a, transaction: d }) {
6584
- const b = us(d.request);
6583
+ async function Td({ assertCurrent: e, binding: r, capabilities: t, handle: s, identity: a, transaction: d }) {
6584
+ const b = hs(d.request);
6585
6585
  (r.clientId !== "spaceaware-web-v1" || r.requestOrigin !== "https://spaceaware.io" || r.registryRow !== "spaceaware-publish-request-v1" || typeof t.signSdnPublishRequest != "function" || a?.identityScheme !== "sdn-bip32-slip10-purpose-v1" || a?.seedProfile !== "password-scrypt-v2") && Se("OPERATION_NOT_ALLOWED");
6586
6586
  const E = a.keys?.filter((C) => C?.purpose === "sdn-authentication") ?? [];
6587
- (E.length !== 1 || E[0].identityScheme !== a.identityScheme || E[0].seedProfile !== a.seedProfile || E[0].curve !== "ed25519" || !cn.test(E[0].publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(E[0].keyId)) && Se("OPERATION_NOT_ALLOWED");
6587
+ (E.length !== 1 || E[0].identityScheme !== a.identityScheme || E[0].seedProfile !== a.seedProfile || E[0].curve !== "ed25519" || !an.test(E[0].publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(E[0].keyId)) && Se("OPERATION_NOT_ALLOWED");
6588
6588
  const { publicKeyHex: I, keyId: P } = E[0], w = `${b.providerOrigin}/api/auth/challenge`, m = new AbortController(), N = setTimeout(() => m.abort(), 1e4);
6589
6589
  let L;
6590
6590
  try {
6591
- e(), Date.now() >= ln(d.expiresAt) && Se("TRANSACTION_EXPIRED");
6591
+ e(), Date.now() >= cn(d.expiresAt) && Se("TRANSACTION_EXPIRED");
6592
6592
  const C = await globalThis.fetch(w, {
6593
6593
  method: "POST",
6594
6594
  credentials: "omit",
@@ -6628,23 +6628,23 @@ async function Nd({ assertCurrent: e, binding: r, capabilities: t, handle: s, id
6628
6628
  clearTimeout(N);
6629
6629
  }
6630
6630
  const D = L.challenge.replace(/\+/gu, "-").replace(/\//gu, "_").replace(/=+$/u, "");
6631
- e(), (Date.now() >= ln(d.expiresAt) || L.expires_at * 1e3 <= Date.now()) && Se("TRANSACTION_EXPIRED");
6631
+ e(), (Date.now() >= cn(d.expiresAt) || L.expires_at * 1e3 <= Date.now()) && Se("TRANSACTION_EXPIRED");
6632
6632
  const U = await t.signSdnPublishRequest(s, {
6633
6633
  ...b,
6634
6634
  challengeId: L.challenge_id,
6635
6635
  challengeBase64url: D
6636
6636
  }, r.registryRow);
6637
- e(), (Date.now() >= ln(d.expiresAt) || L.expires_at * 1e3 <= Date.now()) && Se("TRANSACTION_EXPIRED");
6637
+ e(), (Date.now() >= cn(d.expiresAt) || L.expires_at * 1e3 <= Date.now()) && Se("TRANSACTION_EXPIRED");
6638
6638
  const M = ri(U, ["schemaVersion", "keyId", "identityScheme", "algorithm", "encoding", "signatureProfile", "publicKeyHex", "signatureHex", "requestDigestSha256"], "INVALID_WALLET_RESULT");
6639
- return (M.keyId !== P || M.publicKeyHex !== I) && Se("INVALID_WALLET_RESULT"), fs({ ...M, challengeId: L.challenge_id, challengeBase64url: D });
6639
+ return (M.keyId !== P || M.publicKeyHex !== I) && Se("INVALID_WALLET_RESULT"), us({ ...M, challengeId: L.challenge_id, challengeBase64url: D });
6640
6640
  }
6641
- function Ld({ binding: e, document: r, request: t }) {
6641
+ function xd({ binding: e, document: r, request: t }) {
6642
6642
  const s = r.activeElement ?? null, a = r.createElement("section");
6643
- a.className = "wallet-confirmation", a.setAttribute?.("role", "dialog"), a.setAttribute?.("aria-modal", "true"), a.setAttribute?.("aria-labelledby", "wallet-confirmation-heading"), a.tabIndex = -1, Rd(a, { binding: e, document: r, request: t });
6643
+ a.className = "wallet-confirmation", a.setAttribute?.("role", "dialog"), a.setAttribute?.("aria-modal", "true"), a.setAttribute?.("aria-labelledby", "wallet-confirmation-heading"), a.tabIndex = -1, Ld(a, { binding: e, document: r, request: t });
6644
6644
  const d = r.createElement("div");
6645
6645
  d.className = "wallet-confirmation-actions";
6646
6646
  const b = r.createElement("button");
6647
- b.type = "button", b.dataset.walletAction = "confirm", b.textContent = gs(e, t ?? {}).action;
6647
+ b.type = "button", b.dataset.walletAction = "confirm", b.textContent = ys(e, t ?? {}).action;
6648
6648
  const E = r.createElement("button");
6649
6649
  E.type = "button", E.dataset.walletAction = "cancel", E.textContent = "Cancel", d.append(b, E), a.append(d), r.body.append(a);
6650
6650
  let I = !1, P, w;
@@ -6690,7 +6690,7 @@ function Ld({ binding: e, document: r, request: t }) {
6690
6690
  }
6691
6691
  });
6692
6692
  }
6693
- async function Td({
6693
+ async function Dd({
6694
6694
  assertCurrent: e = () => {
6695
6695
  },
6696
6696
  binding: r,
@@ -6699,8 +6699,8 @@ async function Td({
6699
6699
  transaction: a,
6700
6700
  wasm: d
6701
6701
  }) {
6702
- const b = d?.sdn ?? d, E = ys[a.operation];
6703
- if ((!E || !b) && Se("OPERATION_NOT_ALLOWED"), E.publish) return Nd({ assertCurrent: e, binding: r, capabilities: b, handle: t, identity: s, transaction: a });
6702
+ const b = d?.sdn ?? d, E = ps[a.operation];
6703
+ if ((!E || !b) && Se("OPERATION_NOT_ALLOWED"), E.publish) return Td({ assertCurrent: e, binding: r, capabilities: b, handle: t, identity: s, transaction: a });
6704
6704
  if (E.connect)
6705
6705
  return E.buildResult({
6706
6706
  connectionExpiresAt: a.expiresAt,
@@ -6721,15 +6721,15 @@ async function Td({
6721
6721
  Se("INVALID_WALLET_RESULT");
6722
6722
  }
6723
6723
  }
6724
- function xd() {
6725
- return hs({
6724
+ function Cd() {
6725
+ return _s({
6726
6726
  connectionExpiresAt: null,
6727
6727
  event: "disconnected",
6728
6728
  identity: null,
6729
6729
  schemaVersion: 1
6730
6730
  });
6731
6731
  }
6732
- const ho = "webauthn-prf-hkdf-sha256-aes256gcm-v2", Dd = "sdn-bip32-slip10-purpose-v1", Cd = "password-scrypt-v2", Ud = Object.freeze([
6732
+ const ho = "webauthn-prf-hkdf-sha256-aes256gcm-v2", Ud = "sdn-bip32-slip10-purpose-v1", Fd = "password-scrypt-v2", Md = Object.freeze([
6733
6733
  "aad",
6734
6734
  "canonicalUsername",
6735
6735
  "ciphertextBase64url",
@@ -6740,40 +6740,40 @@ const ho = "webauthn-prf-hkdf-sha256-aes256gcm-v2", Dd = "sdn-bip32-slip10-purpo
6740
6740
  "prfInputBase64url",
6741
6741
  "schemaVersion",
6742
6742
  "storageProfile"
6743
- ]), Fd = Object.freeze([
6743
+ ]), Bd = Object.freeze([
6744
6744
  "credentialIdBase64url",
6745
6745
  "identityScheme",
6746
6746
  "schemaVersion",
6747
6747
  "seedProfile",
6748
6748
  "storageProfile",
6749
6749
  "usernameSha256"
6750
- ]), Md = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Bd = /^[0-9a-f]{64}$/u, Vd = /^[A-Za-z0-9_-]+$/u, Hd = new TextEncoder(), st = "sdn.wallet.remembered.v2", Bt = `${st}.pending`, dn = 16 * 1024, vs = Object.freeze([
6750
+ ]), Vd = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Hd = /^[0-9a-f]{64}$/u, zd = /^[A-Za-z0-9_-]+$/u, $d = new TextEncoder(), st = "sdn.wallet.remembered.v2", Bt = `${st}.pending`, ln = 16 * 1024, gs = Object.freeze([
6751
6751
  "wallet_storage_metadata",
6752
6752
  "wallet_storage_encrypted",
6753
6753
  "wallet_storage_passkey_credential",
6754
6754
  "encrypted_wallet",
6755
6755
  "passkey_credential",
6756
6756
  "passkey_wallet"
6757
- ]), bs = /* @__PURE__ */ new Set([
6757
+ ]), vs = /* @__PURE__ */ new Set([
6758
6758
  st,
6759
6759
  Bt,
6760
- ...vs
6760
+ ...gs
6761
6761
  ]), ii = /* @__PURE__ */ new WeakSet();
6762
- class jr extends Error {
6762
+ class Wr extends Error {
6763
6763
  constructor(r) {
6764
6764
  super(r), this.name = "WalletStorageError", this.code = r;
6765
6765
  }
6766
6766
  }
6767
6767
  function me(e) {
6768
- throw new jr(e);
6768
+ throw new Wr(e);
6769
6769
  }
6770
- function Es(e) {
6770
+ function bs(e) {
6771
6771
  if (!e || typeof e != "object" || Array.isArray(e)) return !1;
6772
6772
  const r = Object.getPrototypeOf(e);
6773
6773
  return r === Object.prototype || r === null;
6774
6774
  }
6775
6775
  function uo(e, r) {
6776
- Es(e) || me("INVALID_REMEMBERED_WALLET");
6776
+ bs(e) || me("INVALID_REMEMBERED_WALLET");
6777
6777
  let t;
6778
6778
  try {
6779
6779
  t = Reflect.ownKeys(e);
@@ -6795,7 +6795,7 @@ function uo(e, r) {
6795
6795
  }
6796
6796
  return d;
6797
6797
  }
6798
- function fo(e) {
6798
+ function Es(e) {
6799
6799
  if (typeof e != "string") return !1;
6800
6800
  for (let r = 0; r < e.length; r += 1) {
6801
6801
  const t = e.charCodeAt(r);
@@ -6807,14 +6807,19 @@ function fo(e) {
6807
6807
  }
6808
6808
  return !0;
6809
6809
  }
6810
- function zd(e) {
6810
+ function As(e) {
6811
+ if (!Es(e)) return !1;
6812
+ const r = $d.encode(e).length;
6813
+ return r >= 3 && r <= 64 && !/[\u0000-\u001f\u007f-\u009f]/u.test(e) && !/^ | $/u.test(e) && !/[A-Z]/u.test(e);
6814
+ }
6815
+ function Wd(e) {
6811
6816
  let r = "";
6812
6817
  for (let t = 0; t < e.length; t += 32768)
6813
6818
  r += String.fromCharCode(...e.subarray(t, t + 32768));
6814
6819
  return btoa(r).replace(/\+/gu, "-").replace(/\//gu, "_").replace(/=+$/u, "");
6815
6820
  }
6816
6821
  function Et(e, { minimum: r = 0, maximum: t = 65536, exact: s = null } = {}) {
6817
- (typeof e != "string" || e.length === 0 || !Vd.test(e)) && me("INVALID_REMEMBERED_WALLET");
6822
+ (typeof e != "string" || e.length === 0 || !zd.test(e)) && me("INVALID_REMEMBERED_WALLET");
6818
6823
  const a = e.length % 4;
6819
6824
  a === 1 && me("INVALID_REMEMBERED_WALLET");
6820
6825
  const d = e.replace(/-/gu, "+").replace(/_/gu, "/") + "=".repeat((4 - a) % 4);
@@ -6826,12 +6831,12 @@ function Et(e, { minimum: r = 0, maximum: t = 65536, exact: s = null } = {}) {
6826
6831
  }
6827
6832
  const E = new Uint8Array(b.length);
6828
6833
  for (let I = 0; I < b.length; I += 1) E[I] = b.charCodeAt(I);
6829
- return (zd(E) !== e || E.length < r || E.length > t || s !== null && E.length !== s) && me("INVALID_REMEMBERED_WALLET"), E;
6834
+ return (Wd(E) !== e || E.length < r || E.length > t || s !== null && E.length !== s) && me("INVALID_REMEMBERED_WALLET"), E;
6830
6835
  }
6831
6836
  function Ei(e) {
6832
- return e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e) ? JSON.stringify(e) : (Es(e) || me("INVALID_REMEMBERED_WALLET"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${Ei(e[r])}`).join(",")}}`);
6837
+ return e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e) ? JSON.stringify(e) : (bs(e) || me("INVALID_REMEMBERED_WALLET"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${Ei(e[r])}`).join(",")}}`);
6833
6838
  }
6834
- function $d(e) {
6839
+ function jd(e) {
6835
6840
  return Object.freeze({
6836
6841
  aad: Object.freeze({ ...e.aad }),
6837
6842
  canonicalUsername: e.canonicalUsername,
@@ -6845,12 +6850,12 @@ function $d(e) {
6845
6850
  storageProfile: e.storageProfile
6846
6851
  });
6847
6852
  }
6848
- function As(e) {
6849
- const r = uo(e, Ud), t = uo(r.aad, Fd), s = fo(r.canonicalUsername) ? Hd.encode(r.canonicalUsername) : null;
6850
- return (r.schemaVersion !== 2 || r.storageProfile !== ho || t.schemaVersion !== 2 || t.storageProfile !== ho || t.identityScheme !== Dd || t.seedProfile !== Cd || !s || s.length < 3 || s.length > 64 || !/^[a-z0-9][a-z0-9._-]*$/u.test(r.canonicalUsername) || !Bd.test(t.usernameSha256) || r.credentialIdBase64url !== t.credentialIdBase64url || !fo(r.createdAt) || !Md.test(r.createdAt) || new Date(r.createdAt).toISOString() !== r.createdAt) && me("INVALID_REMEMBERED_WALLET"), Et(r.credentialIdBase64url, { minimum: 1, maximum: 1024 }), Et(r.ciphertextBase64url, { minimum: 17, maximum: 1024 }), Et(r.hkdfSaltBase64url, { exact: 32 }), Et(r.nonceBase64url, { exact: 12 }), Et(r.prfInputBase64url, { exact: 32 }), $d({ ...r, aad: t });
6853
+ function ms(e) {
6854
+ const r = uo(e, Md), t = uo(r.aad, Bd);
6855
+ return (r.schemaVersion !== 2 || r.storageProfile !== ho || t.schemaVersion !== 2 || t.storageProfile !== ho || t.identityScheme !== Ud || t.seedProfile !== Fd || !As(r.canonicalUsername) || !Hd.test(t.usernameSha256) || r.credentialIdBase64url !== t.credentialIdBase64url || !Es(r.createdAt) || !Vd.test(r.createdAt) || new Date(r.createdAt).toISOString() !== r.createdAt) && me("INVALID_REMEMBERED_WALLET"), Et(r.credentialIdBase64url, { minimum: 1, maximum: 1024 }), Et(r.ciphertextBase64url, { minimum: 17, maximum: 1024 }), Et(r.hkdfSaltBase64url, { exact: 32 }), Et(r.nonceBase64url, { exact: 12 }), Et(r.prfInputBase64url, { exact: 32 }), jd({ ...r, aad: t });
6851
6856
  }
6852
- function Wd(e) {
6853
- return Ei(As(e));
6857
+ function qd(e) {
6858
+ return Ei(ms(e));
6854
6859
  }
6855
6860
  function Ai(e) {
6856
6861
  (typeof e != "string" || e.length === 0 || e.length > 131072) && me("INVALID_REMEMBERED_WALLET");
@@ -6860,7 +6865,7 @@ function Ai(e) {
6860
6865
  } catch {
6861
6866
  me("INVALID_REMEMBERED_WALLET");
6862
6867
  }
6863
- const t = As(r);
6868
+ const t = ms(r);
6864
6869
  return Ei(t) !== e && me("INVALID_REMEMBERED_WALLET"), t;
6865
6870
  }
6866
6871
  function oi(e, r, { pending: t = !1 } = {}) {
@@ -6873,7 +6878,7 @@ function oi(e, r, { pending: t = !1 } = {}) {
6873
6878
  }
6874
6879
  if (s === null) return Object.freeze({ raw: null, record: null, status: "empty" });
6875
6880
  typeof s != "string" && me("STORAGE_UNAVAILABLE");
6876
- const a = s.length > dn;
6881
+ const a = s.length > ln;
6877
6882
  if (t || a)
6878
6883
  return Object.freeze({
6879
6884
  exportable: !a,
@@ -6901,7 +6906,7 @@ function oi(e, r, { pending: t = !1 } = {}) {
6901
6906
  });
6902
6907
  }
6903
6908
  }
6904
- function ms(e) {
6909
+ function Is(e) {
6905
6910
  const r = oi(e, Bt, { pending: !0 }), t = oi(e, st), s = r.status === "empty", a = t.status === "empty" || t.status === "valid";
6906
6911
  return Object.freeze({
6907
6912
  active: t,
@@ -6910,10 +6915,10 @@ function ms(e) {
6910
6915
  pending: r
6911
6916
  });
6912
6917
  }
6913
- function jd(e, r) {
6914
- const t = ms(e);
6918
+ function Kd(e, r) {
6919
+ const t = Is(e);
6915
6920
  t.canSetup || me("STORAGE_QUARANTINED");
6916
- const s = Wd(r);
6921
+ const s = qd(r);
6917
6922
  try {
6918
6923
  e.setItem(Bt, s);
6919
6924
  } catch (b) {
@@ -6933,7 +6938,7 @@ function jd(e, r) {
6933
6938
  });
6934
6939
  return ii.add(d), d;
6935
6940
  }
6936
- function qd(e, r) {
6941
+ function Yd(e, r) {
6937
6942
  (!ii.has(r) || r.storage !== e) && me("INVALID_STORAGE_TRANSACTION"), ii.delete(r);
6938
6943
  let t, s;
6939
6944
  try {
@@ -6944,7 +6949,7 @@ function qd(e, r) {
6944
6949
  (t !== r.serialized || s !== r.previousActiveRaw) && me("STORAGE_COLLISION"), e.removeItem(Bt), e.getItem(Bt) !== null && me("STORAGE_WRITE_FAILED"), e.setItem(st, r.serialized);
6945
6950
  }
6946
6951
  function mi(e, r) {
6947
- bs.has(r) || me("INVALID_STORAGE_KEY"), (!e || typeof e.getItem != "function") && me("STORAGE_UNAVAILABLE");
6952
+ vs.has(r) || me("INVALID_STORAGE_KEY"), (!e || typeof e.getItem != "function") && me("STORAGE_UNAVAILABLE");
6948
6953
  let t;
6949
6954
  try {
6950
6955
  t = e.getItem(r);
@@ -6952,21 +6957,21 @@ function mi(e, r) {
6952
6957
  me("STORAGE_UNAVAILABLE");
6953
6958
  }
6954
6959
  if (t === null) return null;
6955
- if (typeof t != "string" && me("STORAGE_UNAVAILABLE"), r === st && t.length <= dn)
6960
+ if (typeof t != "string" && me("STORAGE_UNAVAILABLE"), r === st && t.length <= ln)
6956
6961
  try {
6957
6962
  Ai(t), me("NOT_QUARANTINED");
6958
6963
  } catch (s) {
6959
- if (s instanceof jr && s.code === "NOT_QUARANTINED") throw s;
6964
+ if (s instanceof Wr && s.code === "NOT_QUARANTINED") throw s;
6960
6965
  }
6961
6966
  return Object.freeze({
6962
- exportable: t.length <= dn,
6967
+ exportable: t.length <= ln,
6963
6968
  key: r,
6964
- oversized: t.length > dn,
6969
+ oversized: t.length > ln,
6965
6970
  raw: t,
6966
6971
  rawLength: t.length
6967
6972
  });
6968
6973
  }
6969
- function Kd(e) {
6974
+ function Gd(e) {
6970
6975
  return Object.freeze({
6971
6976
  exportable: e.exportable,
6972
6977
  key: e.key,
@@ -6974,52 +6979,52 @@ function Kd(e) {
6974
6979
  rawLength: e.rawLength
6975
6980
  });
6976
6981
  }
6977
- function Yd(e) {
6982
+ function Xd(e) {
6978
6983
  const r = [];
6979
6984
  for (const t of [
6980
6985
  st,
6981
6986
  Bt,
6982
- ...vs
6987
+ ...gs
6983
6988
  ]) {
6984
6989
  let s;
6985
6990
  try {
6986
6991
  s = mi(e, t);
6987
6992
  } catch (a) {
6988
- if (a instanceof jr && a.code === "NOT_QUARANTINED") continue;
6993
+ if (a instanceof Wr && a.code === "NOT_QUARANTINED") continue;
6989
6994
  throw a;
6990
6995
  }
6991
- s && r.push(Kd(s));
6996
+ s && r.push(Gd(s));
6992
6997
  }
6993
6998
  return Object.freeze(r);
6994
6999
  }
6995
- function Gd(e, r) {
7000
+ function Jd(e, r) {
6996
7001
  const t = mi(e, r);
6997
7002
  return t || me("QUARANTINE_NOT_FOUND"), t.exportable || me("QUARANTINE_EXPORT_TOO_LARGE"), t.raw;
6998
7003
  }
6999
- function Xd(e, r, t) {
7000
- bs.has(r) || me("INVALID_STORAGE_KEY"), t !== r && me("CONFIRMATION_REQUIRED"), mi(e, r) || me("QUARANTINE_NOT_FOUND");
7004
+ function Qd(e, r, t) {
7005
+ vs.has(r) || me("INVALID_STORAGE_KEY"), t !== r && me("CONFIRMATION_REQUIRED"), mi(e, r) || me("QUARANTINE_NOT_FOUND");
7001
7006
  try {
7002
7007
  e.removeItem(r), e.getItem(r) !== null && me("STORAGE_WRITE_FAILED");
7003
7008
  } catch (a) {
7004
- if (a instanceof jr) throw a;
7009
+ if (a instanceof Wr) throw a;
7005
7010
  me("STORAGE_UNAVAILABLE");
7006
7011
  }
7007
7012
  }
7008
- function Jd(e, r) {
7013
+ function Zd(e, r) {
7009
7014
  r !== st && me("CONFIRMATION_REQUIRED");
7010
7015
  const t = oi(e, st);
7011
7016
  t.status === "empty" && me("REMEMBER_UNAVAILABLE"), t.status !== "valid" && me("STORAGE_QUARANTINED");
7012
7017
  try {
7013
7018
  e.removeItem(st), e.getItem(st) !== null && me("STORAGE_WRITE_FAILED");
7014
7019
  } catch (s) {
7015
- if (s instanceof jr) throw s;
7020
+ if (s instanceof Wr) throw s;
7016
7021
  me("STORAGE_UNAVAILABLE");
7017
7022
  }
7018
7023
  }
7019
- const bn = "sdn-bip32-slip10-purpose-v1", En = "password-scrypt-v2", si = "m/44'/0'/0'/2'/0'", Ii = "Approval unavailable — migrate to the new wallet profile", po = Object.freeze({
7024
+ const bn = "sdn-bip32-slip10-purpose-v1", En = "password-scrypt-v2", si = "m/44'/0'/0'/2'/0'", Ii = "Approval unavailable — migrate to the new wallet profile", fo = Object.freeze({
7020
7025
  "bip39-mnemonic-v1-legacy": "sdn-bip39-auth-v1-legacy",
7021
7026
  "password-fast-v1-legacy": "sdn-fast-password-auth-v1-legacy"
7022
- }), yo = new TextEncoder(), Qd = Uint8Array.prototype.fill, wi = Object.freeze([
7027
+ }), po = new TextEncoder(), e_ = Uint8Array.prototype.fill, wi = Object.freeze([
7023
7028
  "accountFingerprint",
7024
7029
  "accountIndex",
7025
7030
  "accountLabel",
@@ -7061,18 +7066,18 @@ const bn = "sdn-bip32-slip10-purpose-v1", En = "password-scrypt-v2", si = "m/44'
7061
7066
  signatureProfile: "ed25519-over-sha256-jcs-v1"
7062
7067
  })
7063
7068
  ]);
7064
- class Is extends Error {
7069
+ class ws extends Error {
7065
7070
  constructor(r) {
7066
7071
  super(r === "APPROVAL_UNAVAILABLE" ? Ii : r), this.name = "WalletAccountError", this.code = r;
7067
7072
  }
7068
7073
  }
7069
7074
  function Fe(e) {
7070
- throw new Is(e);
7075
+ throw new ws(e);
7071
7076
  }
7072
- function go(e) {
7077
+ function yo(e) {
7073
7078
  if (e instanceof Uint8Array)
7074
7079
  try {
7075
- Qd.call(e, 0);
7080
+ e_.call(e, 0);
7076
7081
  } catch {
7077
7082
  }
7078
7083
  }
@@ -7083,13 +7088,13 @@ function Jt(e) {
7083
7088
  for (const t of Object.keys(e).sort()) r[t] = Jt(e[t]);
7084
7089
  return Object.freeze(r);
7085
7090
  }
7086
- function Zd(e) {
7091
+ function t_(e) {
7087
7092
  if (!e || typeof e != "object" || Array.isArray(e)) return !1;
7088
7093
  const r = Object.getPrototypeOf(e);
7089
7094
  return r === Object.prototype || r === null;
7090
7095
  }
7091
7096
  function mn(e, r) {
7092
- Zd(e) || Fe("INVALID_PUBLIC_IDENTITY");
7097
+ t_(e) || Fe("INVALID_PUBLIC_IDENTITY");
7093
7098
  let t;
7094
7099
  try {
7095
7100
  t = Reflect.ownKeys(e);
@@ -7122,7 +7127,7 @@ function sr(e) {
7122
7127
  }
7123
7128
  return !0;
7124
7129
  }
7125
- function e_(e) {
7130
+ function r_(e) {
7126
7131
  if (!Array.isArray(e) || Object.getPrototypeOf(e) !== Array.prototype || e.length !== An.length) return !1;
7127
7132
  let r;
7128
7133
  try {
@@ -7138,7 +7143,7 @@ function e_(e) {
7138
7143
  }
7139
7144
  return !0;
7140
7145
  }
7141
- function t_(e) {
7146
+ function n_(e) {
7142
7147
  if (!Array.isArray(e) || Object.getPrototypeOf(e) !== Array.prototype || e.length !== 1) return !1;
7143
7148
  let r;
7144
7149
  try {
@@ -7152,22 +7157,22 @@ function t_(e) {
7152
7157
  }
7153
7158
  function ft(e) {
7154
7159
  const r = mn(e, wi);
7155
- (r.schemaVersion !== 1 || r.identityScheme !== bn || r.seedProfile !== En || r.accountIndex !== 0 || r.accountLabel !== null || !/^[0-9a-f]{8}$/u.test(r.accountFingerprint) || !sr(r.accountXpub) || !/^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(r.accountXpub) || !sr(r.accountPeerId) || !/^16Uiu2H[1-9A-HJ-NP-Za-km-z]{33,57}$/u.test(r.accountPeerId) || !e_(r.keys)) && Fe("INVALID_PUBLIC_IDENTITY");
7160
+ (r.schemaVersion !== 1 || r.identityScheme !== bn || r.seedProfile !== En || r.accountIndex !== 0 || r.accountLabel !== null || !/^[0-9a-f]{8}$/u.test(r.accountFingerprint) || !sr(r.accountXpub) || !/^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(r.accountXpub) || !sr(r.accountPeerId) || !/^16Uiu2H[1-9A-HJ-NP-Za-km-z]{33,57}$/u.test(r.accountPeerId) || !r_(r.keys)) && Fe("INVALID_PUBLIC_IDENTITY");
7156
7161
  const t = An.map((s, a) => {
7157
7162
  const d = mn(r.keys[a], Si);
7158
7163
  return (d.bip32Fingerprint !== null || d.curve !== s.curve || d.derivation !== "slip10" || d.encoding !== "raw" || d.identityScheme !== bn || d.path !== s.path || d.purpose !== s.purpose || d.seedProfile !== En || d.signatureProfile !== s.signatureProfile || !/^[0-9a-f]{64}$/u.test(d.publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(d.keyId)) && Fe("INVALID_PUBLIC_IDENTITY"), Jt(d);
7159
7164
  });
7160
7165
  return Jt({ ...r, keys: t });
7161
7166
  }
7162
- function r_(e, { accountIndex: r = 0, profile: t } = {}) {
7163
- const s = Object.hasOwn(po, t) ? po[t] : null;
7167
+ function i_(e, { accountIndex: r = 0, profile: t } = {}) {
7168
+ const s = Object.hasOwn(fo, t) ? fo[t] : null;
7164
7169
  (!s || r !== 0) && Fe("INVALID_LEGACY_PROFILE");
7165
7170
  const a = mn(e, wi);
7166
- (a.schemaVersion !== 1 || a.identityScheme !== s || a.seedProfile !== t || a.accountIndex !== r || a.accountLabel !== null || !/^[0-9a-f]{8}$/u.test(a.accountFingerprint) || !sr(a.accountXpub) || !/^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(a.accountXpub) || !sr(a.accountPeerId) || !/^16Uiu2H[1-9A-HJ-NP-Za-km-z]{33,57}$/u.test(a.accountPeerId) || !t_(a.keys)) && Fe("INVALID_PUBLIC_IDENTITY");
7171
+ (a.schemaVersion !== 1 || a.identityScheme !== s || a.seedProfile !== t || a.accountIndex !== r || a.accountLabel !== null || !/^[0-9a-f]{8}$/u.test(a.accountFingerprint) || !sr(a.accountXpub) || !/^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(a.accountXpub) || !sr(a.accountPeerId) || !/^16Uiu2H[1-9A-HJ-NP-Za-km-z]{33,57}$/u.test(a.accountPeerId) || !n_(a.keys)) && Fe("INVALID_PUBLIC_IDENTITY");
7167
7172
  const d = mn(a.keys[0], Si);
7168
7173
  return (d.bip32Fingerprint !== null || d.curve !== "ed25519" || d.derivation !== "bip32-scalar-as-ed25519-seed" || d.encoding !== "raw" || d.identityScheme !== s || d.path !== `m/44'/0'/${r}'/0/0` || d.purpose !== "sdn-authentication" || d.seedProfile !== t || d.signatureProfile !== "ed25519-raw-32-v1" || !/^[0-9a-f]{64}$/u.test(d.publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(d.keyId)) && Fe("INVALID_PUBLIC_IDENTITY"), Jt({ ...a, keys: [d] });
7169
7174
  }
7170
- function vo(e) {
7175
+ function go(e) {
7171
7176
  if (!(!e || typeof e != "object")) {
7172
7177
  try {
7173
7178
  e.value = "";
@@ -7203,7 +7208,7 @@ function vo(e) {
7203
7208
  }
7204
7209
  }
7205
7210
  }
7206
- function bo(e, r) {
7211
+ function vo(e, r) {
7207
7212
  if (typeof e != "string" || typeof r != "string") return !1;
7208
7213
  const t = Math.max(e.length, r.length);
7209
7214
  let s = e.length ^ r.length;
@@ -7213,7 +7218,7 @@ function bo(e, r) {
7213
7218
  }
7214
7219
  return s === 0;
7215
7220
  }
7216
- function n_(e) {
7221
+ function o_(e) {
7217
7222
  return !e || typeof e != "object" || !Array.isArray(e.keys) ? null : e.keys.find((r) => r?.purpose === "asset-review-approval") ?? null;
7218
7223
  }
7219
7224
  function $n(e, r) {
@@ -7229,7 +7234,7 @@ function $n(e, r) {
7229
7234
  const a = e.keys[s], d = r.keys[s];
7230
7235
  for (const b of Si.filter((E) => E !== "publicKeyHex" && E !== "keyId"))
7231
7236
  t = a[b] === d[b] && t;
7232
- t = bo(a.publicKeyHex, d.publicKeyHex) && t, t = bo(a.keyId.slice(7), d.keyId.slice(7)) && t;
7237
+ t = vo(a.publicKeyHex, d.publicKeyHex) && t, t = vo(a.keyId.slice(7), d.keyId.slice(7)) && t;
7233
7238
  }
7234
7239
  return t;
7235
7240
  }
@@ -7241,9 +7246,9 @@ function nr(e, r, t, s) {
7241
7246
  const b = e.createElement("span");
7242
7247
  b.textContent = s == null ? "" : String(s), a.append(d, b), r.append(a);
7243
7248
  }
7244
- function ws(e) {
7249
+ function Ss(e) {
7245
7250
  (e?.identityScheme !== bn || e?.seedProfile !== En || e?.accountIndex !== 0) && Fe("APPROVAL_UNAVAILABLE");
7246
- const r = n_(e);
7251
+ const r = o_(e);
7247
7252
  return (!r || r.identityScheme !== e.identityScheme || r.seedProfile !== e.seedProfile || r.signatureProfile !== "ed25519-over-sha256-jcs-v1" || r.curve !== "ed25519" || r.derivation !== "slip10" || r.path !== si || r.encoding !== "raw" || !/^[0-9a-f]{64}$/u.test(r.publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(r.keyId)) && Fe("APPROVAL_UNAVAILABLE"), Jt({
7248
7253
  algorithm: "Ed25519",
7249
7254
  derivationPath: si,
@@ -7257,20 +7262,20 @@ function ws(e) {
7257
7262
  signatureProfile: "ed25519-over-sha256-jcs-v1"
7258
7263
  });
7259
7264
  }
7260
- function i_(e) {
7265
+ function s_(e) {
7261
7266
  return JSON.stringify(e, null, 2);
7262
7267
  }
7263
- function o_(e, r, { document: t = e.ownerDocument } = {}) {
7268
+ function a_(e, r, { document: t = e.ownerDocument } = {}) {
7264
7269
  e.replaceChildren();
7265
7270
  const s = t.createElement("h1");
7266
7271
  if (s.textContent = "Account", e.append(s), nr(t, e, "Username / account", r?.accountLabel ?? "account 0"), nr(t, e, "Account xpub", r?.accountXpub), nr(t, e, "Peer ID", r?.accountPeerId), nr(t, e, "Fingerprint", r?.accountFingerprint), r?.identityScheme !== bn || r?.seedProfile !== En) {
7267
7272
  const d = t.createElement("p");
7268
7273
  return d.textContent = Ii, e.append(d), Object.freeze({ approvalAvailable: !1 });
7269
7274
  }
7270
- const a = ws(r);
7275
+ const a = Ss(r);
7271
7276
  return nr(t, e, "Asset approval public key", a.publicKeyHex), nr(t, e, "Asset approval key ID", a.keyId), Object.freeze({ approvalAvailable: !0, configuration: a });
7272
7277
  }
7273
- function s_(e, { document: r = e.ownerDocument } = {}) {
7278
+ function c_(e, { document: r = e.ownerDocument } = {}) {
7274
7279
  e.replaceChildren();
7275
7280
  const t = r.createElement("h2");
7276
7281
  t.textContent = "Stored wallet";
@@ -7299,7 +7304,7 @@ function s_(e, { document: r = e.ownerDocument } = {}) {
7299
7304
  status: w
7300
7305
  });
7301
7306
  }
7302
- function a_(e, r, { document: t = e.ownerDocument } = {}) {
7307
+ function l_(e, r, { document: t = e.ownerDocument } = {}) {
7303
7308
  e.replaceChildren();
7304
7309
  const s = t.createElement("h2");
7305
7310
  s.textContent = "Quarantined wallet storage";
@@ -7340,14 +7345,14 @@ function a_(e, r, { document: t = e.ownerDocument } = {}) {
7340
7345
  }
7341
7346
  return e.append(s, a, d, b), Object.freeze({ rows: Object.freeze(E), status: b });
7342
7347
  }
7343
- async function c_(e, {
7348
+ async function d_(e, {
7344
7349
  assertCurrent: r = () => {
7345
7350
  },
7346
7351
  clipboard: t = globalThis.navigator?.clipboard,
7347
7352
  container: s,
7348
7353
  document: a = s?.ownerDocument
7349
7354
  }) {
7350
- const d = i_(e);
7355
+ const d = s_(e);
7351
7356
  let b = !1;
7352
7357
  try {
7353
7358
  if (!t?.writeText) throw new Error("clipboard unavailable");
@@ -7364,7 +7369,7 @@ async function c_(e, {
7364
7369
  }
7365
7370
  return b;
7366
7371
  }
7367
- async function Eo(e, r, t, {
7372
+ async function bo(e, r, t, {
7368
7373
  assertCurrent: s,
7369
7374
  ownBuffer: a,
7370
7375
  ownHandle: d,
@@ -7375,9 +7380,9 @@ async function Eo(e, r, t, {
7375
7380
  try {
7376
7381
  s();
7377
7382
  const L = I?.value, D = P?.value;
7378
- (typeof L != "string" || typeof D != "string") && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), (!sr(L) || !sr(D)) && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), w = yo.encode(L), a(w), m = yo.encode(D), a(m);
7383
+ (typeof L != "string" || typeof D != "string") && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), (!sr(L) || !sr(D)) && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), w = po.encode(L), a(w), m = po.encode(D), a(m);
7379
7384
  } finally {
7380
- vo(I), vo(P);
7385
+ go(I), go(P);
7381
7386
  const L = I?.form, D = P?.form;
7382
7387
  try {
7383
7388
  (L?.parentNode ?? L)?.remove?.();
@@ -7407,7 +7412,7 @@ async function Eo(e, r, t, {
7407
7412
  b(w), b(m);
7408
7413
  }
7409
7414
  }
7410
- class l_ {
7415
+ class __ {
7411
7416
  #r = null;
7412
7417
  #c;
7413
7418
  #_ = !1;
@@ -7448,12 +7453,12 @@ class l_ {
7448
7453
  ownBuffer: (b) => this.#o.add(b),
7449
7454
  ownHandle: (b) => this.#n.add(b),
7450
7455
  releaseBuffer: (b) => {
7451
- go(b), this.#o.delete(b);
7456
+ yo(b), this.#o.delete(b);
7452
7457
  }
7453
7458
  };
7454
- return t = await Eo(this.#t, this.#c, 1, d), this.#w(t.handle) || Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), t.handle = null, this.#p(r), s = await Eo(this.#t, this.#c, 2, d), this.#w(s.handle) || Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), s.handle = null, this.#p(r), (!$n(t.identity, s.identity) || this.#f !== null && (!$n(t.identity, this.#f) || !$n(s.identity, this.#f))) && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), this.#n.size !== 0 && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), this.#r = ws(s.identity), this.#r;
7459
+ return t = await bo(this.#t, this.#c, 1, d), this.#w(t.handle) || Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), t.handle = null, this.#p(r), s = await bo(this.#t, this.#c, 2, d), this.#w(s.handle) || Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), s.handle = null, this.#p(r), (!$n(t.identity, s.identity) || this.#f !== null && (!$n(t.identity, this.#f) || !$n(s.identity, this.#f))) && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), this.#n.size !== 0 && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), this.#r = Ss(s.identity), this.#r;
7455
7460
  } catch (a) {
7456
- if (this.#r = null, a instanceof Is && a.code === "CREDENTIAL_CONFIRMATION_MISMATCH") throw a;
7461
+ if (this.#r = null, a instanceof ws && a.code === "CREDENTIAL_CONFIRMATION_MISMATCH") throw a;
7457
7462
  Fe("CREDENTIAL_CONFIRMATION_MISMATCH");
7458
7463
  } finally {
7459
7464
  this.#a(), this.#S(), this.#e -= 1;
@@ -7480,10 +7485,10 @@ class l_ {
7480
7485
  #a() {
7481
7486
  const r = [...this.#o];
7482
7487
  this.#o.clear();
7483
- for (const t of r) go(t);
7488
+ for (const t of r) yo(t);
7484
7489
  }
7485
7490
  }
7486
- async function d_({
7491
+ async function h_({
7487
7492
  wasm: e,
7488
7493
  profile: r,
7489
7494
  operation: t,
@@ -7503,7 +7508,7 @@ async function d_({
7503
7508
  legacy: !0
7504
7509
  });
7505
7510
  }
7506
- function __(e, { document: r = e.ownerDocument } = {}) {
7511
+ function u_(e, { document: r = e.ownerDocument } = {}) {
7507
7512
  e.replaceChildren();
7508
7513
  const t = r.createElement("h2");
7509
7514
  t.textContent = "Migrate legacy wallet";
@@ -7523,37 +7528,37 @@ function __(e, { document: r = e.ownerDocument } = {}) {
7523
7528
  const b = r.createElement("div");
7524
7529
  return b.className = "wallet-legacy-comparison", e.append(t, s, a, d, b), Object.freeze({ launch: d, result: b, select: a });
7525
7530
  }
7526
- const In = Uint8Array, Ss = ArrayBuffer, ki = Object.getPrototypeOf(In.prototype), h_ = Object.getOwnPropertyDescriptor(ki, "buffer").get, u_ = Object.getOwnPropertyDescriptor(ki, "byteLength").get, f_ = Object.getOwnPropertyDescriptor(ki, "byteOffset").get, p_ = Object.getOwnPropertyDescriptor(Ss.prototype, "byteLength").get;
7527
- class y_ extends Error {
7531
+ const In = Uint8Array, ks = ArrayBuffer, ki = Object.getPrototypeOf(In.prototype), f_ = Object.getOwnPropertyDescriptor(ki, "buffer").get, p_ = Object.getOwnPropertyDescriptor(ki, "byteLength").get, y_ = Object.getOwnPropertyDescriptor(ki, "byteOffset").get, g_ = Object.getOwnPropertyDescriptor(ks.prototype, "byteLength").get;
7532
+ class v_ extends Error {
7528
7533
  constructor(r = "RNG_FAILURE") {
7529
7534
  super(r), this.name = "WalletRandomError", this.code = r;
7530
7535
  }
7531
7536
  }
7532
7537
  function Ft() {
7533
- throw new y_();
7538
+ throw new v_();
7534
7539
  }
7535
- function g_(e) {
7540
+ function b_(e) {
7536
7541
  if (!(e instanceof In) || Object.getPrototypeOf(e) !== In.prototype) return null;
7537
7542
  let r, t, s;
7538
7543
  try {
7539
- r = Reflect.apply(h_, e, []), t = Reflect.apply(u_, e, []), s = Reflect.apply(f_, e, []);
7544
+ r = Reflect.apply(f_, e, []), t = Reflect.apply(p_, e, []), s = Reflect.apply(y_, e, []);
7540
7545
  } catch {
7541
7546
  return null;
7542
7547
  }
7543
7548
  let a;
7544
7549
  try {
7545
- a = Reflect.apply(p_, r, []);
7550
+ a = Reflect.apply(g_, r, []);
7546
7551
  } catch {
7547
7552
  return null;
7548
7553
  }
7549
- return Object.getPrototypeOf(r) !== Ss.prototype || s !== 0 || t !== a || t !== 12 && t !== 32 ? null : r;
7554
+ return Object.getPrototypeOf(r) !== ks.prototype || s !== 0 || t !== a || t !== 12 && t !== 32 ? null : r;
7550
7555
  }
7551
- function v_({ getRandomValues: e, observedWrite: r } = {}) {
7556
+ function E_({ getRandomValues: e, observedWrite: r } = {}) {
7552
7557
  if (typeof e != "function")
7553
7558
  return () => Ft();
7554
7559
  const t = /* @__PURE__ */ new WeakSet(), s = /* @__PURE__ */ new WeakSet();
7555
7560
  return function(d) {
7556
- const b = g_(d);
7561
+ const b = b_(d);
7557
7562
  (!b || t.has(d) || s.has(b)) && Ft(), t.add(d), s.add(b);
7558
7563
  let E;
7559
7564
  try {
@@ -7579,32 +7584,32 @@ function ir(e, r) {
7579
7584
  const t = new In(r);
7580
7585
  return e(t);
7581
7586
  }
7582
- const Br = new TextEncoder(), b_ = new TextDecoder("utf-8", { fatal: !0 }), E_ = Uint8Array.prototype.fill, A_ = Uint8Array.prototype.slice, m_ = Uint8Array.prototype.subarray, Oi = Object.getPrototypeOf(Uint8Array.prototype), I_ = Object.getOwnPropertyDescriptor(Oi, "buffer").get, ks = Object.getOwnPropertyDescriptor(Oi, "byteLength").get, w_ = Object.getOwnPropertyDescriptor(Oi, "byteOffset").get, Os = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get, S_ = ArrayBuffer.prototype.slice, Ao = "webauthn-prf-hkdf-sha256-aes256gcm-v2", k_ = "sdn-bip32-slip10-purpose-v1", O_ = "password-scrypt-v2", P_ = "Space Data Network Wallet", Ps = 12e4;
7583
- class R_ extends Error {
7587
+ const dn = new TextEncoder(), A_ = new TextDecoder("utf-8", { fatal: !0 }), m_ = Uint8Array.prototype.fill, I_ = Uint8Array.prototype.slice, w_ = Uint8Array.prototype.subarray, Oi = Object.getPrototypeOf(Uint8Array.prototype), S_ = Object.getOwnPropertyDescriptor(Oi, "buffer").get, Os = Object.getOwnPropertyDescriptor(Oi, "byteLength").get, k_ = Object.getOwnPropertyDescriptor(Oi, "byteOffset").get, Ps = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get, O_ = ArrayBuffer.prototype.slice, Eo = "webauthn-prf-hkdf-sha256-aes256gcm-v2", P_ = "sdn-bip32-slip10-purpose-v1", R_ = "password-scrypt-v2", N_ = "Space Data Network Wallet", Rs = 12e4;
7588
+ class L_ extends Error {
7584
7589
  constructor(r) {
7585
7590
  super(r), this.name = "RememberedWalletError", this.code = r;
7586
7591
  }
7587
7592
  }
7588
7593
  function we(e) {
7589
- throw new R_(e);
7594
+ throw new L_(e);
7590
7595
  }
7591
- function mo(e) {
7596
+ function Ao(e) {
7592
7597
  if (typeof e != "string") return "";
7593
7598
  const r = e.trim().toLowerCase();
7594
7599
  return r.endsWith(".") ? r.slice(0, -1) : r;
7595
7600
  }
7596
- function N_(e, r) {
7601
+ function T_(e, r) {
7597
7602
  if (e == null || e === "") return;
7598
- const t = mo(e);
7603
+ const t = Ao(e);
7599
7604
  t === "" && we("INVALID_RP_ID");
7600
- const s = mo(r);
7605
+ const s = Ao(r);
7601
7606
  if (s === "" || t === s || s.endsWith(`.${t}`)) return t;
7602
7607
  we("INVALID_RP_ID");
7603
7608
  }
7604
7609
  function Ne(e) {
7605
7610
  if (e instanceof Uint8Array)
7606
7611
  try {
7607
- E_.call(e, 0);
7612
+ m_.call(e, 0);
7608
7613
  } catch {
7609
7614
  }
7610
7615
  }
@@ -7613,7 +7618,7 @@ function wn(e) {
7613
7618
  const r = Object.getPrototypeOf(e);
7614
7619
  return r === Object.prototype || r === null;
7615
7620
  }
7616
- function Rs(e, r) {
7621
+ function Ns(e, r) {
7617
7622
  if (!wn(e)) return !1;
7618
7623
  let t;
7619
7624
  try {
@@ -7625,8 +7630,8 @@ function Rs(e, r) {
7625
7630
  const s = [...t].sort(), a = [...r].sort();
7626
7631
  return s.length === a.length && s.every((d, b) => d === a[b]);
7627
7632
  }
7628
- function Vr(e, r) {
7629
- if (!Rs(e, r)) return null;
7633
+ function Br(e, r) {
7634
+ if (!Ns(e, r)) return null;
7630
7635
  const t = {};
7631
7636
  for (const s of r) {
7632
7637
  let a;
@@ -7646,18 +7651,18 @@ function _n(e, r = null) {
7646
7651
  return !1;
7647
7652
  let t, s, a, d;
7648
7653
  try {
7649
- t = Reflect.apply(I_, e, []), s = Reflect.apply(ks, e, []), a = Reflect.apply(w_, e, []), d = Reflect.apply(Os, t, []);
7654
+ t = Reflect.apply(S_, e, []), s = Reflect.apply(Os, e, []), a = Reflect.apply(k_, e, []), d = Reflect.apply(Ps, t, []);
7650
7655
  } catch {
7651
7656
  return !1;
7652
7657
  }
7653
7658
  return Object.getPrototypeOf(t) === ArrayBuffer.prototype && a === 0 && s === d && (r === null || s === r);
7654
7659
  }
7655
- function Ns(e, r, t) {
7660
+ function Ls(e, r, t) {
7656
7661
  if (!(e instanceof ArrayBuffer) || Object.getPrototypeOf(e) !== ArrayBuffer.prototype)
7657
7662
  return !1;
7658
7663
  let s;
7659
7664
  try {
7660
- s = Reflect.apply(Os, e, []);
7665
+ s = Reflect.apply(Ps, e, []);
7661
7666
  } catch {
7662
7667
  return !1;
7663
7668
  }
@@ -7665,7 +7670,7 @@ function Ns(e, r, t) {
7665
7670
  }
7666
7671
  function Gt(e) {
7667
7672
  try {
7668
- return Reflect.apply(ks, e, []);
7673
+ return Reflect.apply(Os, e, []);
7669
7674
  } catch {
7670
7675
  return -1;
7671
7676
  }
@@ -7676,13 +7681,13 @@ function Ar(e) {
7676
7681
  t < 0 && we("INVALID_REMEMBERED_WALLET");
7677
7682
  for (let s = 0; s < t; s += 32768)
7678
7683
  r += String.fromCharCode(...Reflect.apply(
7679
- m_,
7684
+ w_,
7680
7685
  e,
7681
7686
  [s, s + 32768]
7682
7687
  ));
7683
7688
  return btoa(r).replace(/\+/gu, "-").replace(/\//gu, "_").replace(/=+$/u, "");
7684
7689
  }
7685
- function L_(e) {
7690
+ function x_(e) {
7686
7691
  let r = "";
7687
7692
  for (const t of e) r += t.toString(16).padStart(2, "0");
7688
7693
  return r;
@@ -7690,7 +7695,7 @@ function L_(e) {
7690
7695
  function ar(e) {
7691
7696
  return e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e) ? JSON.stringify(e) : Array.isArray(e) ? `[${e.map(ar).join(",")}]` : (wn(e) || we("INVALID_REMEMBERED_WALLET"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${ar(e[r])}`).join(",")}}`);
7692
7697
  }
7693
- function T_(e, r) {
7698
+ function D_(e, r) {
7694
7699
  if (!(e instanceof Uint8Array) || !(r instanceof Uint8Array)) return !1;
7695
7700
  const t = Gt(e), s = Gt(r);
7696
7701
  if (t < 0 || s < 0) return !1;
@@ -7700,10 +7705,10 @@ function T_(e, r) {
7700
7705
  d |= (e[b] ?? 0) ^ (r[b] ?? 0);
7701
7706
  return d === 0;
7702
7707
  }
7703
- function x_(e, r) {
7708
+ function C_(e, r) {
7704
7709
  return ar(e) === ar(r);
7705
7710
  }
7706
- function Ls(e) {
7711
+ function Ts(e) {
7707
7712
  (!e || typeof e != "object" && typeof e != "function") && we("WEBAUTHN_INVALID_RESPONSE");
7708
7713
  let r, t, s;
7709
7714
  try {
@@ -7711,8 +7716,8 @@ function Ls(e) {
7711
7716
  } catch {
7712
7717
  we("WEBAUTHN_INVALID_RESPONSE");
7713
7718
  }
7714
- return (r !== "public-key" || !Ns(t, 1, 1024) || typeof s != "function") && we("WEBAUTHN_INVALID_RESPONSE"), Object.freeze({
7715
- rawId: new Uint8Array(Reflect.apply(S_, t, [0])),
7719
+ return (r !== "public-key" || !Ls(t, 1, 1024) || typeof s != "function") && we("WEBAUTHN_INVALID_RESPONSE"), Object.freeze({
7720
+ rawId: new Uint8Array(Reflect.apply(O_, t, [0])),
7716
7721
  readExtensionResults() {
7717
7722
  try {
7718
7723
  return Reflect.apply(s, e, []);
@@ -7722,19 +7727,19 @@ function Ls(e) {
7722
7727
  }
7723
7728
  });
7724
7729
  }
7725
- function D_(e) {
7726
- const r = Vr(e.readExtensionResults(), ["prf"]), t = r ? Vr(r.prf, ["enabled"]) : null;
7730
+ function U_(e) {
7731
+ const r = Br(e.readExtensionResults(), ["prf"]), t = r ? Br(r.prf, ["enabled"]) : null;
7727
7732
  (!t || t.enabled !== !0) && we("WEBAUTHN_PRF_REQUIRED");
7728
7733
  }
7729
- function C_(e, r) {
7730
- const t = Ls(e), s = t.rawId;
7731
- T_(s, r) || (Ne(s), we("WEBAUTHN_CREDENTIAL_MISMATCH")), Ne(s);
7732
- const a = Vr(t.readExtensionResults(), ["prf"]), d = a ? Vr(a.prf, ["results"]) : null, E = (d ? Vr(d.results, ["first"]) : null)?.first;
7733
- Ns(E, 32, 32) || we("WEBAUTHN_PRF_REQUIRED");
7734
- const I = new Uint8Array(E), P = Reflect.apply(A_, I, []);
7734
+ function F_(e, r) {
7735
+ const t = Ts(e), s = t.rawId;
7736
+ D_(s, r) || (Ne(s), we("WEBAUTHN_CREDENTIAL_MISMATCH")), Ne(s);
7737
+ const a = Br(t.readExtensionResults(), ["prf"]), d = a ? Br(a.prf, ["results"]) : null, E = (d ? Br(d.results, ["first"]) : null)?.first;
7738
+ Ls(E, 32, 32) || we("WEBAUTHN_PRF_REQUIRED");
7739
+ const I = new Uint8Array(E), P = Reflect.apply(I_, I, []);
7735
7740
  return Ne(I), P;
7736
7741
  }
7737
- function U_({ challenge: e, credentialId: r, prfInput: t, rpId: s, signal: a }) {
7742
+ function M_({ challenge: e, credentialId: r, prfInput: t, rpId: s, signal: a }) {
7738
7743
  return {
7739
7744
  publicKey: {
7740
7745
  allowCredentials: [{
@@ -7744,17 +7749,17 @@ function U_({ challenge: e, credentialId: r, prfInput: t, rpId: s, signal: a })
7744
7749
  challenge: e,
7745
7750
  extensions: { prf: { eval: { first: t } } },
7746
7751
  ...s === void 0 ? {} : { rpId: s },
7747
- timeout: Ps,
7752
+ timeout: Rs,
7748
7753
  userVerification: "required"
7749
7754
  },
7750
7755
  signal: a
7751
7756
  };
7752
7757
  }
7753
- async function Io({ assertCurrent: e, credentials: r, credentialId: t, fillRandom: s, prfInput: a, rpId: d, signal: b }) {
7758
+ async function mo({ assertCurrent: e, credentials: r, credentialId: t, fillRandom: s, prfInput: a, rpId: d, signal: b }) {
7754
7759
  const E = ir(s, 32);
7755
7760
  let I;
7756
7761
  try {
7757
- I = await r.get(U_({
7762
+ I = await r.get(M_({
7758
7763
  challenge: E,
7759
7764
  credentialId: t,
7760
7765
  prfInput: a,
@@ -7766,9 +7771,9 @@ async function Io({ assertCurrent: e, credentials: r, credentialId: t, fillRando
7766
7771
  } finally {
7767
7772
  Ne(E);
7768
7773
  }
7769
- return e(), C_(I, t);
7774
+ return e(), F_(I, t);
7770
7775
  }
7771
- function F_(e) {
7776
+ function B_(e) {
7772
7777
  if (typeof e != "string") return !1;
7773
7778
  for (let r = 0; r < e.length; r += 1) {
7774
7779
  const t = e.charCodeAt(r);
@@ -7780,38 +7785,38 @@ function F_(e) {
7780
7785
  }
7781
7786
  return !0;
7782
7787
  }
7783
- function M_(e) {
7788
+ function V_(e) {
7784
7789
  if (typeof e == "string")
7785
- return F_(e) || we("INVALID_USERNAME"), Br.encode(e).length > 256 && we("INVALID_USERNAME"), e;
7790
+ return B_(e) || we("INVALID_USERNAME"), dn.encode(e).length > 256 && we("INVALID_USERNAME"), e;
7786
7791
  (!_n(e) || Gt(e) > 256) && we("INVALID_USERNAME");
7787
7792
  try {
7788
- return b_.decode(e);
7793
+ return A_.decode(e);
7789
7794
  } catch {
7790
7795
  we("INVALID_USERNAME");
7791
7796
  }
7792
7797
  }
7793
7798
  function ai(e) {
7794
- const t = M_(e).replace(/^ +/u, "").replace(/ +$/u, "").replace(/[A-Z]/gu, (a) => a.toLowerCase()), s = Br.encode(t);
7795
- return (s.length < 3 || s.length > 64 || !/^[a-z0-9][a-z0-9._-]*$/u.test(t)) && we("INVALID_USERNAME"), t;
7799
+ const r = V_(e).replace(/^ +/u, "").replace(/ +$/u, "").replace(/[A-Z]/gu, (t) => t.toLowerCase());
7800
+ return As(r) || we("INVALID_USERNAME"), r;
7796
7801
  }
7797
- function B_(e) {
7802
+ function H_(e) {
7798
7803
  let r;
7799
7804
  try {
7800
- r = Go(e?.module);
7805
+ r = Yo(e?.module);
7801
7806
  } catch {
7802
7807
  we("WASM_UNAVAILABLE");
7803
7808
  }
7804
- return (!Rs(r, ["sdn", "sha256"]) || typeof r.sha256 != "function" || !r.sdn || typeof r.sdn != "object") && we("WASM_UNAVAILABLE"), r;
7809
+ return (!Ns(r, ["sdn", "sha256"]) || typeof r.sha256 != "function" || !r.sdn || typeof r.sdn != "object") && we("WASM_UNAVAILABLE"), r;
7805
7810
  }
7806
- function V_(e) {
7807
- const r = B_(e), t = r.sdn, s = e?.storage, a = e?.credentials, d = v_(e?.rng), b = e?.createRequestController, E = e?.releaseRequestController, I = e?.ownHandle, P = e?.destroyHandle, w = e?.ownedHandlesClean, m = e?.now ?? (() => /* @__PURE__ */ new Date()), N = e?.rpHostname ?? e?.window?.location?.hostname ?? globalThis?.location?.hostname, L = N_(e?.rpId, N), D = typeof e?.rpName == "string" && e.rpName !== "" ? e.rpName : P_, U = () => typeof a?.create == "function" && typeof a?.get == "function", M = () => ms(s), C = () => Yd(s), B = (v) => Gd(s, v), Y = (v, k) => (Xd(s, v, k), C().some((R) => R.key === v) && we("STORAGE_WRITE_FAILED"), !0), _ = () => M().active.status === "valid", f = ({ confirmation: v } = {}) => (_() || we("REMEMBER_UNAVAILABLE"), Jd(s, v), M().active.status !== "empty" && we("STORAGE_WRITE_FAILED"), !0), h = async (v) => {
7811
+ function z_(e) {
7812
+ const r = H_(e), t = r.sdn, s = e?.storage, a = e?.credentials, d = E_(e?.rng), b = e?.createRequestController, E = e?.releaseRequestController, I = e?.ownHandle, P = e?.destroyHandle, w = e?.ownedHandlesClean, m = e?.now ?? (() => /* @__PURE__ */ new Date()), N = e?.rpHostname ?? e?.window?.location?.hostname ?? globalThis?.location?.hostname, L = T_(e?.rpId, N), D = typeof e?.rpName == "string" && e.rpName !== "" ? e.rpName : N_, U = () => typeof a?.create == "function" && typeof a?.get == "function", M = () => Is(s), C = () => Xd(s), B = (v) => Jd(s, v), Y = (v, k) => (Qd(s, v, k), C().some((R) => R.key === v) && we("STORAGE_WRITE_FAILED"), !0), _ = () => M().active.status === "valid", f = ({ confirmation: v } = {}) => (_() || we("REMEMBER_UNAVAILABLE"), Zd(s, v), M().active.status !== "empty" && we("STORAGE_WRITE_FAILED"), !0), h = async (v) => {
7808
7813
  let k;
7809
7814
  try {
7810
- k = await r.sha256(Br.encode(v));
7815
+ k = await r.sha256(dn.encode(v));
7811
7816
  } catch {
7812
7817
  we("WASM_FAILURE");
7813
7818
  }
7814
- return _n(k, 32) || we("WASM_FAILURE"), L_(k);
7819
+ return _n(k, 32) || we("WASM_FAILURE"), x_(k);
7815
7820
  };
7816
7821
  return Object.freeze({
7817
7822
  canForget: _,
@@ -7832,11 +7837,11 @@ function V_(e) {
7832
7837
  }), Z = Et(R.prfInputBase64url, { exact: 32 }), ee = Et(R.ciphertextBase64url, {
7833
7838
  minimum: 17,
7834
7839
  maximum: 1024
7835
- }), ae = Et(R.hkdfSaltBase64url, { exact: 32 }), oe = Et(R.nonceBase64url, { exact: 12 }), pe = Br.encode(R.canonicalUsername), ce = ar(R.aad), Q = typeof b == "function" ? b() : null;
7840
+ }), ae = Et(R.hkdfSaltBase64url, { exact: 32 }), oe = Et(R.nonceBase64url, { exact: 12 }), pe = dn.encode(R.canonicalUsername), ce = ar(R.aad), Q = typeof b == "function" ? b() : null;
7836
7841
  (!Q?.signal || typeof Q.abort != "function") && (Ne(V), Ne(Z), Ne(ee), Ne(ae), Ne(oe), Ne(pe), we("WEBAUTHN_UNAVAILABLE"));
7837
7842
  let ie, ue = null, Ee = !1;
7838
7843
  try {
7839
- ie = await Io({
7844
+ ie = await mo({
7840
7845
  assertCurrent: v,
7841
7846
  credentialId: V,
7842
7847
  credentials: a,
@@ -7892,7 +7897,7 @@ function V_(e) {
7892
7897
  { alg: -257, type: "public-key" }
7893
7898
  ],
7894
7899
  rp: L === void 0 ? { name: D } : { id: L, name: D },
7895
- timeout: Ps,
7900
+ timeout: Rs,
7896
7901
  user: {
7897
7902
  displayName: k,
7898
7903
  id: pe,
@@ -7905,8 +7910,8 @@ function V_(e) {
7905
7910
  throw v(), ct;
7906
7911
  }
7907
7912
  v();
7908
- const Vt = Ls(It);
7909
- ue = Vt.rawId, D_(Vt), Ee = await Io({
7913
+ const Vt = Ts(It);
7914
+ ue = Vt.rawId, U_(Vt), Ee = await mo({
7910
7915
  assertCurrent: v,
7911
7916
  credentialId: ue,
7912
7917
  credentials: a,
@@ -7919,10 +7924,10 @@ function V_(e) {
7919
7924
  v();
7920
7925
  const Dt = Ar(ue), Ht = Object.freeze({
7921
7926
  credentialIdBase64url: Dt,
7922
- identityScheme: k_,
7927
+ identityScheme: P_,
7923
7928
  schemaVersion: 2,
7924
- seedProfile: O_,
7925
- storageProfile: Ao,
7929
+ seedProfile: R_,
7930
+ storageProfile: Eo,
7926
7931
  usernameSha256: at
7927
7932
  }), wt = ar(Ht);
7928
7933
  let pt;
@@ -7957,15 +7962,15 @@ function V_(e) {
7957
7962
  nonceBase64url: Ar(ie),
7958
7963
  prfInputBase64url: Ar(ce),
7959
7964
  schemaVersion: 2,
7960
- storageProfile: Ao
7965
+ storageProfile: Eo
7961
7966
  });
7962
- v(), mt = jd(s, kt);
7967
+ v(), mt = Kd(s, kt);
7963
7968
  let Ot;
7964
7969
  const Xe = Ce;
7965
7970
  try {
7966
7971
  Ot = t.importRememberedIdentity({
7967
7972
  canonicalAad: wt,
7968
- canonicalUsernameUtf8: Br.encode(k),
7973
+ canonicalUsernameUtf8: dn.encode(k),
7969
7974
  ciphertextAndTag: pt.slice(),
7970
7975
  hkdfSalt: Q.slice(),
7971
7976
  nonce: ie.slice(),
@@ -7976,7 +7981,7 @@ function V_(e) {
7976
7981
  }
7977
7982
  wn(Ot) || we("WASM_FAILURE"), Pe = Ot.handle, (Pe == null || typeof I != "function") && we("WASM_FAILURE"), I(Pe);
7978
7983
  const Zt = ft(Ot.identity);
7979
- return x_(Z, Zt) || we("IDENTITY_MISMATCH"), v(), (typeof P != "function" || !P(Pe)) && we("DESTRUCTION_FAILED"), Pe = null, (typeof w != "function" || !w(R)) && we("DESTRUCTION_FAILED"), v(), qd(s, mt), mt = null, Object.freeze({ remembered: !0 });
7984
+ return C_(Z, Zt) || we("IDENTITY_MISMATCH"), v(), (typeof P != "function" || !P(Pe)) && we("DESTRUCTION_FAILED"), Pe = null, (typeof w != "function" || !w(R)) && we("DESTRUCTION_FAILED"), v(), Yd(s, mt), mt = null, Object.freeze({ remembered: !0 });
7980
7985
  } finally {
7981
7986
  Pe !== null && typeof P == "function" && P(Pe), Ne(V), Ne(oe), Ne(pe), Ne(Ee), Ne(Re), Ne(Ce), Ne(Q), Ne(ie), Ne(ue), typeof E == "function" && E(ae);
7982
7987
  }
@@ -7987,7 +7992,7 @@ function V_(e) {
7987
7992
  supported: U
7988
7993
  });
7989
7994
  }
7990
- const Hr = /^[0-9a-f]{64}$/u, H_ = /^[A-Za-z0-9_-]{43}$/u, z_ = Object.freeze([
7995
+ const Vr = /^[0-9a-f]{64}$/u, $_ = /^[A-Za-z0-9_-]{43}$/u, W_ = Object.freeze([
7991
7996
  "callbackUri",
7992
7997
  "clientDisplayName",
7993
7998
  "clientId",
@@ -8001,7 +8006,7 @@ const Hr = /^[0-9a-f]{64}$/u, H_ = /^[A-Za-z0-9_-]{43}$/u, z_ = Object.freeze([
8001
8006
  "schemaVersion",
8002
8007
  "state",
8003
8008
  "transactionId"
8004
- ]), $_ = Object.freeze(["redirectUri", "schemaVersion", "transactionId"]), W_ = 64 * 1024, j_ = 4 * 1024, q_ = new TextEncoder(), K_ = new TextDecoder("utf-8", { fatal: !0 });
8009
+ ]), j_ = Object.freeze(["redirectUri", "schemaVersion", "transactionId"]), q_ = 64 * 1024, K_ = 4 * 1024, Y_ = new TextEncoder(), G_ = new TextDecoder("utf-8", { fatal: !0 });
8005
8010
  class Sn extends Error {
8006
8011
  constructor() {
8007
8012
  super("RELAY_FAILURE"), this.name = "WalletRelayError", this.code = "RELAY_FAILURE";
@@ -8010,13 +8015,13 @@ class Sn extends Error {
8010
8015
  function Oe() {
8011
8016
  throw new Sn();
8012
8017
  }
8013
- function Ts(e) {
8018
+ function xs(e) {
8014
8019
  if (e === null || typeof e != "object" || Array.isArray(e)) return !1;
8015
8020
  const r = Object.getPrototypeOf(e);
8016
8021
  return r === Object.prototype || r === null;
8017
8022
  }
8018
- function xs(e, r) {
8019
- Ts(e) || Oe();
8023
+ function Ds(e, r) {
8024
+ xs(e) || Oe();
8020
8025
  let t;
8021
8026
  try {
8022
8027
  t = Reflect.ownKeys(e);
@@ -8039,13 +8044,13 @@ function xs(e, r) {
8039
8044
  }
8040
8045
  function ci(e) {
8041
8046
  if (Array.isArray(e)) return Object.freeze(e.map(ci));
8042
- if (!Ts(e)) return e;
8047
+ if (!xs(e)) return e;
8043
8048
  const r = {};
8044
8049
  for (const t of Object.keys(e).sort()) r[t] = ci(e[t]);
8045
8050
  return Object.freeze(r);
8046
8051
  }
8047
- function Y_(e, r) {
8048
- (typeof e != "string" || q_.encode(e).byteLength > r || e.charCodeAt(0) === 65279) && Oe();
8052
+ function X_(e, r) {
8053
+ (typeof e != "string" || Y_.encode(e).byteLength > r || e.charCodeAt(0) === 65279) && Oe();
8049
8054
  let t = 0, s = 0;
8050
8055
  const a = () => {
8051
8056
  for (; t < e.length && /[\u0009\u000a\u000d\u0020]/u.test(e[t]); ) t += 1;
@@ -8116,27 +8121,27 @@ function Y_(e, r) {
8116
8121
  const E = b();
8117
8122
  return a(), t !== e.length && Oe(), E;
8118
8123
  }
8119
- function wo(e) {
8124
+ function Io(e) {
8120
8125
  try {
8121
8126
  Promise.resolve(e).catch(() => {
8122
8127
  });
8123
8128
  } catch {
8124
8129
  }
8125
8130
  }
8126
- function Ds(e, r = null) {
8131
+ function Cs(e, r = null) {
8127
8132
  try {
8128
8133
  const t = r?.cancel;
8129
- typeof t == "function" && wo(Reflect.apply(t, r, []));
8134
+ typeof t == "function" && Io(Reflect.apply(t, r, []));
8130
8135
  } catch {
8131
8136
  }
8132
8137
  if (!r)
8133
8138
  try {
8134
8139
  const t = e?.body, s = t?.cancel;
8135
- typeof s == "function" && wo(Reflect.apply(s, t, []));
8140
+ typeof s == "function" && Io(Reflect.apply(s, t, []));
8136
8141
  } catch {
8137
8142
  }
8138
8143
  }
8139
- function Cs(e, r, t = null) {
8144
+ function Us(e, r, t = null) {
8140
8145
  let s;
8141
8146
  try {
8142
8147
  s = Promise.resolve(e);
@@ -8170,7 +8175,7 @@ function Cs(e, r, t = null) {
8170
8175
  );
8171
8176
  }) : s;
8172
8177
  }
8173
- async function G_(e, r, t, s) {
8178
+ async function J_(e, r, t, s) {
8174
8179
  let a = null;
8175
8180
  try {
8176
8181
  (!e || e.status !== r || e.redirected === !0 || e.headers?.get?.("cache-control")?.trim().toLowerCase() !== "no-store" || e.headers?.get?.("content-type")?.trim().toLowerCase() !== "application/json; charset=utf-8" || typeof e.body?.getReader != "function") && Oe(), a = e.body.getReader(), (!a || typeof a.read != "function" || s?.aborted === !0) && Oe();
@@ -8178,7 +8183,7 @@ async function G_(e, r, t, s) {
8178
8183
  let b = 0;
8179
8184
  for (; ; ) {
8180
8185
  s?.aborted === !0 && Oe();
8181
- const { done: P, value: w } = await Cs(a.read(), s);
8186
+ const { done: P, value: w } = await Us(a.read(), s);
8182
8187
  if (s?.aborted === !0 && Oe(), P) break;
8183
8188
  w instanceof Uint8Array || Oe(), b += w.byteLength, b > t && Oe(), d.push(w);
8184
8189
  }
@@ -8186,9 +8191,9 @@ async function G_(e, r, t, s) {
8186
8191
  let I = 0;
8187
8192
  for (const P of d)
8188
8193
  E.set(P, I), I += P.byteLength;
8189
- return Y_(K_.decode(E), t);
8194
+ return X_(G_.decode(E), t);
8190
8195
  } catch (d) {
8191
- if (Ds(e, a), d instanceof Sn) throw d;
8196
+ if (Cs(e, a), d instanceof Sn) throw d;
8192
8197
  Oe();
8193
8198
  } finally {
8194
8199
  try {
@@ -8197,21 +8202,21 @@ async function G_(e, r, t, s) {
8197
8202
  }
8198
8203
  }
8199
8204
  }
8200
- function So(e, r) {
8201
- return xs(e, z_), (e.schemaVersion !== 1 || e.transactionId !== r || !Hr.test(e.transactionId) || !Hr.test(e.state) || !Hr.test(e.requestSha256) || !H_.test(e.resultToken) || typeof e.callbackUri != "string" || typeof e.clientDisplayName != "string" || typeof e.clientId != "string" || typeof e.expiresAt != "string" || typeof e.operation != "string" || typeof e.registryVersion != "string" || typeof e.requestOrigin != "string") && Oe(), ci(e);
8205
+ function wo(e, r) {
8206
+ return Ds(e, W_), (e.schemaVersion !== 1 || e.transactionId !== r || !Vr.test(e.transactionId) || !Vr.test(e.state) || !Vr.test(e.requestSha256) || !$_.test(e.resultToken) || typeof e.callbackUri != "string" || typeof e.clientDisplayName != "string" || typeof e.clientId != "string" || typeof e.expiresAt != "string" || typeof e.operation != "string" || typeof e.registryVersion != "string" || typeof e.requestOrigin != "string") && Oe(), ci(e);
8202
8207
  }
8203
8208
  function li(e, r) {
8204
- xs(r, $_), (r.schemaVersion !== 1 || r.transactionId !== e.transactionId || typeof r.redirectUri != "string") && Oe();
8209
+ Ds(r, j_), (r.schemaVersion !== 1 || r.transactionId !== e.transactionId || typeof r.redirectUri != "string") && Oe();
8205
8210
  const t = `${e.callbackUri}#code=`, s = `&state=${e.state}`;
8206
8211
  (!r.redirectUri.startsWith(t) || !r.redirectUri.endsWith(s)) && Oe();
8207
8212
  const a = r.redirectUri.slice(t.length, r.redirectUri.length - s.length);
8208
- return (!Hr.test(a) || r.redirectUri !== `${t}${a}${s}`) && Oe(), Object.freeze({
8213
+ return (!Vr.test(a) || r.redirectUri !== `${t}${a}${s}`) && Oe(), Object.freeze({
8209
8214
  redirectUri: r.redirectUri,
8210
8215
  schemaVersion: 1,
8211
8216
  transactionId: r.transactionId
8212
8217
  });
8213
8218
  }
8214
- function ko(e, r, t = void 0) {
8219
+ function So(e, r, t = void 0) {
8215
8220
  const s = {
8216
8221
  cache: "no-store",
8217
8222
  credentials: "omit",
@@ -8224,39 +8229,39 @@ function ko(e, r, t = void 0) {
8224
8229
  };
8225
8230
  return t !== void 0 && (s.body = JSON.stringify(t)), s;
8226
8231
  }
8227
- function X_({ fetch: e, location: r }) {
8232
+ function Q_({ fetch: e, location: r }) {
8228
8233
  (typeof e != "function" || typeof r?.replace != "function") && Oe();
8229
8234
  const t = /* @__PURE__ */ new Set(), s = async (a, d, b, E) => {
8230
8235
  let I;
8231
8236
  try {
8232
- I = await Cs(e(a, d), d.signal, (P) => Ds(P));
8237
+ I = await Us(e(a, d), d.signal, (P) => Cs(P));
8233
8238
  } catch {
8234
8239
  Oe();
8235
8240
  }
8236
- return G_(I, b, E, d.signal);
8241
+ return J_(I, b, E, d.signal);
8237
8242
  };
8238
8243
  return Object.freeze({
8239
8244
  async fetchTransaction(a, { signal: d } = {}) {
8240
- (typeof a != "string" || !Hr.test(a)) && Oe();
8245
+ (typeof a != "string" || !Vr.test(a)) && Oe();
8241
8246
  const b = await s(
8242
8247
  `/relay/v1/transactions/${a}`,
8243
- ko("GET", d),
8248
+ So("GET", d),
8244
8249
  200,
8245
- W_
8250
+ q_
8246
8251
  );
8247
- return So(b, a);
8252
+ return wo(b, a);
8248
8253
  },
8249
8254
  async publishResult(a, d, { signal: b } = {}) {
8250
- const E = So(a, a?.transactionId), I = await s(
8255
+ const E = wo(a, a?.transactionId), I = await s(
8251
8256
  `/relay/v1/transactions/${E.transactionId}/result`,
8252
- ko("POST", b, {
8257
+ So("POST", b, {
8253
8258
  result: d,
8254
8259
  resultToken: E.resultToken,
8255
8260
  schemaVersion: 1,
8256
8261
  transactionId: E.transactionId
8257
8262
  }),
8258
8263
  201,
8259
- j_
8264
+ K_
8260
8265
  ), P = li(E, I);
8261
8266
  return t.clear(), t.add(P.redirectUri), P;
8262
8267
  },
@@ -8276,7 +8281,7 @@ function X_({ fetch: e, location: r }) {
8276
8281
  }
8277
8282
  });
8278
8283
  }
8279
- const Us = Uint8Array, J_ = Us.prototype.fill, mr = new TextEncoder();
8284
+ const Fs = Uint8Array, Z_ = Fs.prototype.fill, mr = new TextEncoder();
8280
8285
  class Ue extends Error {
8281
8286
  constructor(r) {
8282
8287
  super(r), this.name = "WalletOriginError", this.code = r;
@@ -8289,9 +8294,9 @@ function Ir(e) {
8289
8294
  throw e instanceof xt ? new Ue(e.code) : e;
8290
8295
  }
8291
8296
  function _t(e) {
8292
- if (e instanceof Us)
8297
+ if (e instanceof Fs)
8293
8298
  try {
8294
- J_.call(e, 0);
8299
+ Z_.call(e, 0);
8295
8300
  } catch {
8296
8301
  }
8297
8302
  }
@@ -8306,7 +8311,7 @@ function wr(e) {
8306
8311
  }
8307
8312
  return !0;
8308
8313
  }
8309
- function Oo(e) {
8314
+ function ko(e) {
8310
8315
  if (!(!e || typeof e != "object")) {
8311
8316
  try {
8312
8317
  e.type === "checkbox" && (e.checked = !1);
@@ -8358,7 +8363,7 @@ function Sr(e, r) {
8358
8363
  } catch {
8359
8364
  a = null;
8360
8365
  }
8361
- a && t.add(a), Oo(s);
8366
+ a && t.add(a), ko(s);
8362
8367
  }
8363
8368
  for (const s of t) {
8364
8369
  let a = [];
@@ -8367,7 +8372,7 @@ function Sr(e, r) {
8367
8372
  } catch {
8368
8373
  a = [];
8369
8374
  }
8370
- for (const d of a) Oo(d);
8375
+ for (const d of a) ko(d);
8371
8376
  try {
8372
8377
  s.inert = !0, s.setAttribute?.("aria-hidden", "true");
8373
8378
  const d = e.createElement("div");
@@ -8380,21 +8385,21 @@ function Sr(e, r) {
8380
8385
  }
8381
8386
  }
8382
8387
  }
8383
- function Q_(e) {
8388
+ function eh(e) {
8384
8389
  let r;
8385
8390
  try {
8386
- r = Go(e);
8391
+ r = Yo(e);
8387
8392
  } catch {
8388
8393
  ne("WASM_UNAVAILABLE");
8389
8394
  }
8390
8395
  const t = r?.sdn, s = r?.sha256;
8391
8396
  return (!t || typeof t.derivePasswordIdentity != "function" || typeof t.destroySdnIdentity != "function" || typeof s != "function") && ne("WASM_UNAVAILABLE"), Object.freeze({ capabilities: t, sha256: s });
8392
8397
  }
8393
- function on(e) {
8398
+ function nn(e) {
8394
8399
  const r = e?.AbortController ?? globalThis.AbortController;
8395
8400
  return typeof r == "function" ? new r() : null;
8396
8401
  }
8397
- class Z_ {
8402
+ class th {
8398
8403
  #r = !1;
8399
8404
  #c;
8400
8405
  #_ = null;
@@ -8438,10 +8443,10 @@ class Z_ {
8438
8443
  wasm: w,
8439
8444
  window: m
8440
8445
  }) {
8441
- const N = Q_(w);
8442
- this.#c = N.capabilities, this.#T = N.sha256, this.#L = a, this.#d = d, this.#n = t, this.#s = m, this.#y = V_({
8446
+ const N = eh(w);
8447
+ this.#c = N.capabilities, this.#T = N.sha256, this.#L = a, this.#d = d, this.#n = t, this.#s = m, this.#y = z_({
8443
8448
  createRequestController: () => {
8444
- const L = on(this.#s);
8449
+ const L = nn(this.#s);
8445
8450
  return L && (this.#l.add(L), this.#O.add(L)), L;
8446
8451
  },
8447
8452
  credentials: r ?? m?.navigator?.credentials ?? globalThis.navigator?.credentials,
@@ -8598,11 +8603,11 @@ class Z_ {
8598
8603
  s = b, a = E;
8599
8604
  });
8600
8605
  return this.#N = d, (async () => {
8601
- const b = on(this.#s);
8606
+ const b = nn(this.#s);
8602
8607
  b && this.#l.add(b);
8603
8608
  try {
8604
8609
  this.#m(t.epoch, t.permit), it({ document: this.#n, window: this.#s }), typeof this.#d?.publishResult != "function" && ne("RELAY_UNAVAILABLE");
8605
- const E = r === "connected" ? t.connectedResult : xd();
8610
+ const E = r === "connected" ? t.connectedResult : Cd();
8606
8611
  let I;
8607
8612
  try {
8608
8613
  I = await this.#d.publishResult(t.transaction, E, {
@@ -8891,7 +8896,7 @@ class Z_ {
8891
8896
  U == null && ne("WASM_FAILURE"), this.#a.add(U);
8892
8897
  let M;
8893
8898
  try {
8894
- M = r_(D.identity, { accountIndex: r, profile: d });
8899
+ M = i_(D.identity, { accountIndex: r, profile: d });
8895
8900
  } catch {
8896
8901
  const C = this.#b(U);
8897
8902
  D = null, C || (this.revokeNow("native-destruction-failed"), ne("DESTRUCTION_FAILED")), ne("WASM_FAILURE");
@@ -8905,7 +8910,7 @@ class Z_ {
8905
8910
  }
8906
8911
  async prepare(r) {
8907
8912
  (this.#e || this.#i) && ne("STALE_CONTROLLER"), this.#r && ne("TRANSACTION_IN_PROGRESS"), this.#r = !0;
8908
- const t = this.#o, s = typeof r == "string" ? r : r?.transactionId ?? null, a = on(this.#s);
8913
+ const t = this.#o, s = typeof r == "string" ? r : r?.transactionId ?? null, a = nn(this.#s);
8909
8914
  a && this.#l.add(a);
8910
8915
  try {
8911
8916
  const d = typeof this.#d?.fetchTransaction == "function" ? await this.#d.fetchTransaction(r, { signal: a?.signal }) : r;
@@ -8938,7 +8943,7 @@ class Z_ {
8938
8943
  sha256: this.#T,
8939
8944
  window: this.#s
8940
8945
  });
8941
- this.#A(s, d), it({ document: this.#n, window: this.#s }), this.#_ = Ld({
8946
+ this.#A(s, d), it({ document: this.#n, window: this.#s }), this.#_ = xd({
8942
8947
  binding: E.binding,
8943
8948
  document: this.#n,
8944
8949
  identity: a,
@@ -8951,7 +8956,7 @@ class Z_ {
8951
8956
  sha256: this.#T,
8952
8957
  window: this.#s
8953
8958
  }), this.#A(s, d), it({ document: this.#n, window: this.#s });
8954
- const I = await Td({
8959
+ const I = await Dd({
8955
8960
  assertCurrent: () => this.#A(s, d),
8956
8961
  binding: E.binding,
8957
8962
  handle: s,
@@ -8977,7 +8982,7 @@ class Z_ {
8977
8982
  }), Object.freeze({ accountReady: !0 });
8978
8983
  try {
8979
8984
  this.#m(m, N), typeof this.#d?.publishResult != "function" && ne("RELAY_UNAVAILABLE");
8980
- const L = on(this.#s);
8985
+ const L = nn(this.#s);
8981
8986
  L && this.#l.add(L);
8982
8987
  let D;
8983
8988
  try {
@@ -9068,7 +9073,7 @@ class Z_ {
9068
9073
  })(), s;
9069
9074
  }
9070
9075
  }
9071
- const eh = [
9076
+ const rh = [
9072
9077
  {
9073
9078
  allowedOperations: [
9074
9079
  "sdn.wallet.account.v1",
@@ -9409,11 +9414,11 @@ const eh = [
9409
9414
  ],
9410
9415
  requestOrigin: "https://review.spacedatanetwork.org"
9411
9416
  }
9412
- ], th = "7674bfb019753eee8387f064467c0f6f2ff6babd1ecabbd70dc585afc31fbc1a", rh = 1, Fs = {
9413
- clients: eh,
9414
- registryReleaseSha256: th,
9415
- schemaVersion: rh
9416
- }, nh = new TextEncoder(), ih = /^[0-9a-f]{64}$/u, oh = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u, sh = Object.freeze({
9417
+ ], nh = "7674bfb019753eee8387f064467c0f6f2ff6babd1ecabbd70dc585afc31fbc1a", ih = 1, Ms = {
9418
+ clients: rh,
9419
+ registryReleaseSha256: nh,
9420
+ schemaVersion: ih
9421
+ }, oh = new TextEncoder(), sh = /^[0-9a-f]{64}$/u, ah = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u, ch = Object.freeze({
9417
9422
  "sdn.auth.publish-request.v1": Object.freeze({
9418
9423
  audience: null,
9419
9424
  registryRow: "spaceaware-publish-request-v1",
@@ -9459,26 +9464,26 @@ const eh = [
9459
9464
  }), vt = Object.freeze([
9460
9465
  "sdn.wallet.account.v1",
9461
9466
  "sdn.wallet.connect.v1"
9462
- ]), ah = Object.freeze([
9467
+ ]), lh = Object.freeze([
9463
9468
  "sdn.auth.jcs-envelope.v2",
9464
9469
  "sdn.auth.raw-challenge.v1",
9465
9470
  ...vt
9466
- ]), ch = Object.freeze(["sdn.auth.publish-request.v1", ...vt]), lh = Object.freeze([
9471
+ ]), dh = Object.freeze(["sdn.auth.publish-request.v1", ...vt]), _h = Object.freeze([
9467
9472
  "sdn.asset-review.authority-activation.v1",
9468
9473
  "sdn.asset-review.decision.v1",
9469
9474
  ...vt
9470
- ]), Po = Object.freeze([
9475
+ ]), Oo = Object.freeze([
9471
9476
  Object.freeze(["sdn-landing-web-v1", "Space Data Network", "https://spacedatanetwork.org", "https://spacedatanetwork.org/wallet-callback.html", vt]),
9472
9477
  Object.freeze(["sdn-standards-web-v1", "Space Data Standards", "https://spacedatastandards.org", "https://spacedatastandards.org/wallet-callback.html", vt]),
9473
9478
  Object.freeze(["sdn-flatbuffers-pages-v1", "FlatBuffers Documentation", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/flatbuffers/wallet-callback.html", vt]),
9474
9479
  Object.freeze(["sdn-flatsql-pages-v1", "FlatSQL Documentation", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/flatsql/wallet-callback.html", vt]),
9475
9480
  Object.freeze(["sdn-module-sdk-pages-v1", "Space Data Module SDK", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/space-data-module-sdk/wallet-callback.html", vt]),
9476
- Object.freeze(["spaceaware-web-v1", "SpaceAware", "https://spaceaware.io", "https://spaceaware.io/wallet/callback", ch]),
9477
- Object.freeze(["sdn-node-console-v1", "SDN Node Console", "https://sdn.spaceaware.io", "https://sdn.spaceaware.io/wallet/callback", ah]),
9481
+ Object.freeze(["spaceaware-web-v1", "SpaceAware", "https://spaceaware.io", "https://spaceaware.io/wallet/callback", dh]),
9482
+ Object.freeze(["sdn-node-console-v1", "SDN Node Console", "https://sdn.spaceaware.io", "https://sdn.spaceaware.io/wallet/callback", lh]),
9478
9483
  Object.freeze(["orbpro-pages-v1", "OrbPro", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/OrbPro/wallet-callback.html", vt]),
9479
9484
  Object.freeze(["sdn-asset-models-pages-v1", "SDN Asset Models", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/asset-models/wallet-callback.html", vt]),
9480
- Object.freeze(["sdn-asset-review-v1", "SDN Asset Review", "https://review.spacedatanetwork.org", "https://review.spacedatanetwork.org/wallet/callback", lh])
9481
- ]), dh = Object.freeze([
9485
+ Object.freeze(["sdn-asset-review-v1", "SDN Asset Review", "https://review.spacedatanetwork.org", "https://review.spacedatanetwork.org/wallet/callback", _h])
9486
+ ]), hh = Object.freeze([
9482
9487
  Object.freeze({
9483
9488
  audience: null,
9484
9489
  clientId: "spaceaware-web-v1",
@@ -9543,10 +9548,10 @@ function hn(e, r, t) {
9543
9548
  function ut(e) {
9544
9549
  return e === null || typeof e == "boolean" || typeof e == "string" ? JSON.stringify(e) : typeof e == "number" ? (Number.isFinite(e) || De("registry contains a non-finite number"), JSON.stringify(e)) : Array.isArray(e) ? `[${e.map(ut).join(",")}]` : (Pi(e) || De("registry contains an unsupported value"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${ut(e[r])}`).join(",")}}`);
9545
9550
  }
9546
- async function _h(e) {
9551
+ async function uh(e) {
9547
9552
  const r = globalThis.crypto?.subtle;
9548
9553
  r || De("Web Crypto SHA-256 is unavailable");
9549
- const t = new Uint8Array(await r.digest("SHA-256", nh.encode(e)));
9554
+ const t = new Uint8Array(await r.digest("SHA-256", oh.encode(e)));
9550
9555
  return Array.from(t, (s) => s.toString(16).padStart(2, "0")).join("");
9551
9556
  }
9552
9557
  function kn(e) {
@@ -9556,7 +9561,7 @@ function kn(e) {
9556
9561
  for (const t of Object.keys(e).sort()) r[t] = kn(e[t]);
9557
9562
  return Object.freeze(r);
9558
9563
  }
9559
- function hh(e, r) {
9564
+ function fh(e, r) {
9560
9565
  (typeof e != "string" || !e.startsWith("https://") || e.includes("*")) && De(`${r} must be exact HTTPS`);
9561
9566
  let t;
9562
9567
  try {
@@ -9566,7 +9571,7 @@ function hh(e, r) {
9566
9571
  }
9567
9572
  (t.protocol !== "https:" || t.username || t.password || t.port || t.origin !== e || t.pathname !== "/" || t.search || t.hash) && De(`${r} must be an exact HTTPS origin`);
9568
9573
  }
9569
- function uh(e, r) {
9574
+ function ph(e, r) {
9570
9575
  (typeof e != "string" || !e.startsWith("https://") || e.includes("*")) && De("callbackUri must be exact HTTPS");
9571
9576
  let t;
9572
9577
  try {
@@ -9576,8 +9581,8 @@ function uh(e, r) {
9576
9581
  }
9577
9582
  (t.protocol !== "https:" || t.username || t.password || t.port || t.origin !== r || t.search || t.hash || t.href !== e) && De("callbackUri must be exact and same-origin");
9578
9583
  }
9579
- function fh(e) {
9580
- hn(e, ["clients", "registryReleaseSha256", "schemaVersion"], "registry"), e.schemaVersion !== 1 && De("registry schemaVersion must be 1"), (typeof e.registryReleaseSha256 != "string" || !ih.test(e.registryReleaseSha256)) && De("registryReleaseSha256 must be lowercase SHA-256"), (!Array.isArray(e.clients) || e.clients.length !== Po.length) && De("registry must contain exactly the reviewed clients");
9584
+ function yh(e) {
9585
+ hn(e, ["clients", "registryReleaseSha256", "schemaVersion"], "registry"), e.schemaVersion !== 1 && De("registry schemaVersion must be 1"), (typeof e.registryReleaseSha256 != "string" || !sh.test(e.registryReleaseSha256)) && De("registryReleaseSha256 must be lowercase SHA-256"), (!Array.isArray(e.clients) || e.clients.length !== Oo.length) && De("registry must contain exactly the reviewed clients");
9581
9586
  const r = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
9582
9587
  e.clients.forEach((s, a) => {
9583
9588
  hn(s, [
@@ -9589,8 +9594,8 @@ function fh(e) {
9589
9594
  "operationBindings",
9590
9595
  "requestOrigin"
9591
9596
  ], `client ${a}`);
9592
- const [d, b, E, I, P] = Po[a];
9593
- (s.clientId !== d || s.clientDisplayName !== b || s.requestOrigin !== E || s.callbackUri !== I) && De(`client ${a} differs from the reviewed row`), (!oh.test(s.clientId) || r.has(s.clientId)) && De("clientId must be unique and canonical"), r.add(s.clientId), (typeof s.clientDisplayName != "string" || s.clientDisplayName.length < 1 || s.clientDisplayName.length > 80) && De("clientDisplayName is invalid"), hh(s.requestOrigin, "requestOrigin"), uh(s.callbackUri, s.requestOrigin), (!Array.isArray(s.allowedOperations) || ut(s.allowedOperations) !== ut(P)) && De(`${s.clientId} allowedOperations differ from the reviewed allowlist`), (!Array.isArray(s.operationBindings) || s.operationBindings.length !== P.length) && De(`${s.clientId} operationBindings differ from the reviewed allowlist`), s.operationBindings.forEach((m, N) => {
9597
+ const [d, b, E, I, P] = Oo[a];
9598
+ (s.clientId !== d || s.clientDisplayName !== b || s.requestOrigin !== E || s.callbackUri !== I) && De(`client ${a} differs from the reviewed row`), (!ah.test(s.clientId) || r.has(s.clientId)) && De("clientId must be unique and canonical"), r.add(s.clientId), (typeof s.clientDisplayName != "string" || s.clientDisplayName.length < 1 || s.clientDisplayName.length > 80) && De("clientDisplayName is invalid"), fh(s.requestOrigin, "requestOrigin"), ph(s.callbackUri, s.requestOrigin), (!Array.isArray(s.allowedOperations) || ut(s.allowedOperations) !== ut(P)) && De(`${s.clientId} allowedOperations differ from the reviewed allowlist`), (!Array.isArray(s.operationBindings) || s.operationBindings.length !== P.length) && De(`${s.clientId} operationBindings differ from the reviewed allowlist`), s.operationBindings.forEach((m, N) => {
9594
9599
  hn(m, [
9595
9600
  "audience",
9596
9601
  "maxLifetimeSeconds",
@@ -9601,7 +9606,7 @@ function fh(e) {
9601
9606
  ], `${s.clientId} operation ${N}`);
9602
9607
  const L = P[N];
9603
9608
  m.operation !== L && De(`${s.clientId} operation allowlist order or value changed`);
9604
- const D = sh[m.operation];
9609
+ const D = ch[m.operation];
9605
9610
  D || De("unknown registry operation"), (m.maxLifetimeSeconds !== 300 || m.audience !== D.audience || m.registryRow !== D.registryRow || m.serviceActivationState !== D.serviceActivationState || m.serviceInstance !== D.serviceInstance) && De(`${s.clientId} operation policy differs from the reviewed binding`);
9606
9611
  const U = `${s.clientId}\0${s.requestOrigin}\0${m.operation}`;
9607
9612
  t.has(U) && De("duplicate registry binding"), t.add(U);
@@ -9609,7 +9614,7 @@ function fh(e) {
9609
9614
  const w = [...new Set(s.operationBindings.map(({ audience: m }) => m).filter((m) => m !== null))].sort();
9610
9615
  (!Array.isArray(s.audiences) || ut(s.audiences) !== ut(w)) && De(`${s.clientId} audiences differ from operationBindings`), ut(s.allowedOperations) !== ut(s.operationBindings.map(({ operation: m }) => m)) && De(`${s.clientId} allowedOperations differ from operationBindings`);
9611
9616
  });
9612
- for (const s of dh) {
9617
+ for (const s of hh) {
9613
9618
  const a = e.clients.find((E) => E.clientId === s.clientId && E.requestOrigin === s.requestOrigin), d = a?.operationBindings.find((E) => E.operation === s.operation), b = d && {
9614
9619
  audience: d.audience,
9615
9620
  clientId: a.clientId,
@@ -9624,13 +9629,13 @@ function fh(e) {
9624
9629
  }
9625
9630
  return kn(e);
9626
9631
  }
9627
- const { registryReleaseSha256: ph, ...yh } = Fs, gh = await _h(ut(yh));
9628
- gh !== ph && De("registry release SHA-256 mismatch");
9629
- const Ro = fh(Fs);
9630
- function vh(e) {
9632
+ const { registryReleaseSha256: gh, ...vh } = Ms, bh = await uh(ut(vh));
9633
+ bh !== gh && De("registry release SHA-256 mismatch");
9634
+ const Po = yh(Ms);
9635
+ function Eh(e) {
9631
9636
  const r = hn(e, ["clientId", "operation", "requestOrigin"], "registry lookup");
9632
9637
  (typeof r.clientId != "string" || typeof r.requestOrigin != "string" || typeof r.operation != "string") && De("registry lookup fields must be strings");
9633
- const t = Ro.clients.find((a) => a.clientId === r.clientId && a.requestOrigin === r.requestOrigin), s = t?.operationBindings.find((a) => a.operation === r.operation);
9638
+ const t = Po.clients.find((a) => a.clientId === r.clientId && a.requestOrigin === r.requestOrigin), s = t?.operationBindings.find((a) => a.operation === r.operation);
9634
9639
  return (!t || !s) && De("no exact registry binding exists"), kn({
9635
9640
  audience: s.audience,
9636
9641
  callbackUri: t.callbackUri,
@@ -9639,17 +9644,17 @@ function vh(e) {
9639
9644
  maxLifetimeSeconds: s.maxLifetimeSeconds,
9640
9645
  operation: s.operation,
9641
9646
  requestOrigin: t.requestOrigin,
9642
- registryReleaseSha256: Ro.registryReleaseSha256,
9647
+ registryReleaseSha256: Po.registryReleaseSha256,
9643
9648
  registryRow: s.registryRow,
9644
9649
  serviceActivationState: s.serviceActivationState,
9645
9650
  serviceInstance: s.serviceInstance
9646
9651
  });
9647
9652
  }
9648
- const bh = /^\/transaction\/([0-9a-f]{64})$/u, Wn = new TextEncoder(), Eh = Uint8Array.prototype.fill, Ah = Object.freeze({ resolveRegistryBinding: vh });
9649
- function No(e) {
9653
+ const Ah = /^\/transaction\/([0-9a-f]{64})$/u, Wn = new TextEncoder(), mh = Uint8Array.prototype.fill, Ih = Object.freeze({ resolveRegistryBinding: Eh });
9654
+ function Ro(e) {
9650
9655
  if (e instanceof Uint8Array)
9651
9656
  try {
9652
- Eh.call(e, 0);
9657
+ mh.call(e, 0);
9653
9658
  } catch {
9654
9659
  }
9655
9660
  }
@@ -9664,10 +9669,10 @@ function jn(e) {
9664
9669
  }
9665
9670
  return !0;
9666
9671
  }
9667
- function Lo() {
9672
+ function No() {
9668
9673
  return new Ue("INVALID_TRANSACTION");
9669
9674
  }
9670
- function zr(e, r, t, s) {
9675
+ function Hr(e, r, t, s) {
9671
9676
  const a = e.createElement("label"), d = e.createElement("span");
9672
9677
  d.textContent = t, a.append(d, s), r.append(a);
9673
9678
  }
@@ -9711,7 +9716,7 @@ function cr(e, r) {
9711
9716
  } catch {
9712
9717
  }
9713
9718
  }
9714
- function Ms({
9719
+ function Bs({
9715
9720
  clipboard: e,
9716
9721
  controller: r,
9717
9722
  document: t,
@@ -9761,7 +9766,7 @@ function Ms({
9761
9766
  }
9762
9767
  if (!Array.isArray(M) || M.length === 0)
9763
9768
  return a.replaceChildren(), a.hidden = !0, !1;
9764
- a.hidden = !1, P = a_(a, M, { document: t });
9769
+ a.hidden = !1, P = l_(a, M, { document: t });
9765
9770
  const C = E;
9766
9771
  for (const B of P.rows) {
9767
9772
  const { entry: Y } = B, _ = async (g) => {
@@ -9843,7 +9848,7 @@ function Ms({
9843
9848
  refresh: D
9844
9849
  });
9845
9850
  }
9846
- function mh({
9851
+ function wh({
9847
9852
  clipboard: e = globalThis.navigator?.clipboard,
9848
9853
  controller: r = null,
9849
9854
  document: t,
@@ -9864,7 +9869,7 @@ function mh({
9864
9869
  const m = t.createElement("input");
9865
9870
  m.type = "text", m.name = "username", m.autocomplete = "username", m.required = !0;
9866
9871
  const N = t.createElement("input");
9867
- N.type = "password", N.name = "password", N.autocomplete = "current-password", N.required = !0, zr(t, w, "Username", m), zr(t, w, "Password", N);
9872
+ N.type = "password", N.name = "password", N.autocomplete = "current-password", N.required = !0, Hr(t, w, "Username", m), Hr(t, w, "Password", N);
9868
9873
  let L = null;
9869
9874
  if (r && typeof r == "object") {
9870
9875
  L = t.createElement("input"), L.type = "checkbox", L.dataset.walletRemember = "prf-only", L.checked = !1, L.defaultChecked = !1;
@@ -9874,13 +9879,13 @@ function mh({
9874
9879
  } catch {
9875
9880
  oe = !1;
9876
9881
  }
9877
- L.disabled = !oe, zr(t, w, "Remember on this device", L);
9882
+ L.disabled = !oe, Hr(t, w, "Remember on this device", L);
9878
9883
  }
9879
9884
  const D = t.createElement("p");
9880
9885
  D.dataset.walletRememberStatus = "true";
9881
9886
  let U = () => {
9882
9887
  };
9883
- const M = Ms({
9888
+ const M = Bs({
9884
9889
  clipboard: e,
9885
9890
  controller: r,
9886
9891
  document: t,
@@ -9961,7 +9966,7 @@ function mh({
9961
9966
  remove: F
9962
9967
  });
9963
9968
  }
9964
- function Bs({
9969
+ function Vs({
9965
9970
  document: e,
9966
9971
  mount: r = null,
9967
9972
  submitLabel: t = "Compare legacy account",
@@ -9976,7 +9981,7 @@ function Bs({
9976
9981
  const E = e.createElement("form");
9977
9982
  E.noValidate = !0;
9978
9983
  const I = e.createElement("textarea");
9979
- I.name = "mnemonic", I.autocomplete = "off", I.required = !0, zr(e, E, "Mnemonic", I);
9984
+ I.name = "mnemonic", I.autocomplete = "off", I.required = !0, Hr(e, E, "Mnemonic", I);
9980
9985
  const P = e.createElement("button");
9981
9986
  P.type = "submit", P.dataset.walletAction = "confirm-legacy-mnemonic", P.textContent = t;
9982
9987
  const w = e.createElement("button");
@@ -10008,7 +10013,7 @@ function Bs({
10008
10013
  remove: M
10009
10014
  });
10010
10015
  }
10011
- function Ih({ document: e, mount: r = null, title: t = "Choose legacy wallet profile" }) {
10016
+ function Sh({ document: e, mount: r = null, title: t = "Choose legacy wallet profile" }) {
10012
10017
  const s = r ?? e?.body;
10013
10018
  if (!e?.createElement || !s?.append) throw new Ue("DOM_UNAVAILABLE");
10014
10019
  const a = e.createElement("section");
@@ -10029,7 +10034,7 @@ function Ih({ document: e, mount: r = null, title: t = "Choose legacy wallet pro
10029
10034
  const h = e.createElement("option");
10030
10035
  h.value = _, h.textContent = f, _ === "" && (h.disabled = !0, h.selected = !0), I.append(h);
10031
10036
  }
10032
- zr(e, E, "Legacy profile", I);
10037
+ Hr(e, E, "Legacy profile", I);
10033
10038
  const P = e.createElement("button");
10034
10039
  P.type = "submit", P.dataset.walletAction = "continue-legacy-login", P.textContent = "Continue";
10035
10040
  const w = e.createElement("button");
@@ -10061,13 +10066,13 @@ function Ih({ document: e, mount: r = null, title: t = "Choose legacy wallet pro
10061
10066
  }
10062
10067
  return Object.freeze({ cancel: C, promise: D });
10063
10068
  }
10064
- function sn(e, r, t, s) {
10069
+ function on(e, r, t, s) {
10065
10070
  const a = e.createElement("div"), d = e.createElement("strong");
10066
10071
  d.textContent = `${t}: `;
10067
10072
  const b = e.createElement("span");
10068
10073
  b.textContent = String(s ?? ""), a.append(d, b), r.append(a);
10069
10074
  }
10070
- function Vs(e, r, t, s = null) {
10075
+ function Hs(e, r, t, s = null) {
10071
10076
  const a = s ?? e?.body, d = e.createElement("section");
10072
10077
  d.className = "wallet-complete";
10073
10078
  const b = e.createElement("h1");
@@ -10083,7 +10088,7 @@ function Vs(e, r, t, s = null) {
10083
10088
  }
10084
10089
  }), d.append(b, E, I), a?.replaceChildren?.(d);
10085
10090
  }
10086
- function Hs(e, r = "The wallet request could not be completed. Close this window.", t = null) {
10091
+ function zs(e, r = "The wallet request could not be completed. Close this window.", t = null) {
10087
10092
  const s = t ?? e?.body;
10088
10093
  if (!e?.createElement || !s?.replaceChildren) return;
10089
10094
  const a = e.createElement("section");
@@ -10093,7 +10098,7 @@ function Hs(e, r = "The wallet request could not be completed. Close this window
10093
10098
  const b = e.createElement("p");
10094
10099
  b.textContent = r, a.append(d, b), s.replaceChildren(a);
10095
10100
  }
10096
- function wh({
10101
+ function kh({
10097
10102
  clipboard: e,
10098
10103
  controller: r,
10099
10104
  document: t,
@@ -10106,7 +10111,7 @@ function wh({
10106
10111
  }) {
10107
10112
  const P = t.createElement("section");
10108
10113
  P.className = "wallet-account";
10109
- const w = t.createElement("div"), m = o_(w, s, { document: t }), N = t.createElement("section");
10114
+ const w = t.createElement("div"), m = a_(w, s, { document: t }), N = t.createElement("section");
10110
10115
  N.className = "wallet-approval-card";
10111
10116
  const L = t.createElement("h2");
10112
10117
  L.textContent = "Asset review approval";
@@ -10118,22 +10123,22 @@ function wh({
10118
10123
  B.type = "button", B.dataset.walletAction = "return-to-site", B.textContent = "Return to site";
10119
10124
  const Y = t.createElement("section");
10120
10125
  Y.className = "wallet-legacy-migration";
10121
- const _ = __(Y, { document: t });
10126
+ const _ = u_(Y, { document: t });
10122
10127
  let f = !1;
10123
10128
  try {
10124
10129
  f = r.canForgetRememberedWallet?.() === !0;
10125
10130
  } catch {
10126
10131
  f = !1;
10127
10132
  }
10128
- const h = f ? t.createElement("section") : null, u = h ? s_(h, { document: t }) : null;
10133
+ const h = f ? t.createElement("section") : null, u = h ? c_(h, { document: t }) : null;
10129
10134
  u && (u.launch.dataset.walletAction = "forget-stored-wallet");
10130
- const g = Ms({
10135
+ const g = Bs({
10131
10136
  clipboard: e,
10132
10137
  controller: r,
10133
10138
  document: t
10134
10139
  }), v = t.createElement("p");
10135
10140
  v.className = "wallet-account-exit-status", P.append(w, N), h && P.append(h), g?.hasEntries && P.append(g.container), P.append(B, C, Y), b.replaceChildren(P);
10136
- const k = new l_({
10141
+ const k = new __({
10137
10142
  credentialRound: async (fe) => {
10138
10143
  const Te = d({
10139
10144
  controller: null,
@@ -10155,11 +10160,11 @@ function wh({
10155
10160
  const Ce = (fe) => !ae && Re === fe, Pe = (fe) => {
10156
10161
  if (!Ce(fe)) throw new Error("account surface closed");
10157
10162
  }, mt = (fe) => (fe instanceof Uint8Array && Z.add(fe), fe), It = (fe) => {
10158
- No(fe), Z.delete(fe);
10163
+ Ro(fe), Z.delete(fe);
10159
10164
  }, Vt = () => {
10160
10165
  const fe = [...Z];
10161
10166
  Z.clear();
10162
- for (const Te of fe) No(Te);
10167
+ for (const Te of fe) Ro(Te);
10163
10168
  }, at = () => {
10164
10169
  const fe = ee || ie || ce;
10165
10170
  B.disabled = oe, C.disabled = oe, ae || (M.disabled = fe || !m.approvalAvailable, _.launch.disabled = fe, u && (u.launch.disabled = fe || Q, u.confirm.disabled = fe, u.cancel.disabled = fe));
@@ -10184,7 +10189,7 @@ function wh({
10184
10189
  try {
10185
10190
  const nt = await k.confirm();
10186
10191
  Pe(Te);
10187
- const $e = await c_(nt, {
10192
+ const $e = await d_(nt, {
10188
10193
  assertCurrent: () => Pe(Te),
10189
10194
  clipboard: e,
10190
10195
  container: U,
@@ -10223,14 +10228,14 @@ function wh({
10223
10228
  const $t = ze?.usernameControl?.form ?? ze?.passwordControl?.form ?? $e?.form, Nn = $t?.parentNode;
10224
10229
  cr($t, [ze?.usernameControl, ze?.passwordControl]), Nn?.remove?.(), hr = { passwordUtf8: dr, usernameUtf8: Pt };
10225
10230
  } else {
10226
- $e = Bs({ document: t, mount: b }), R.add($e);
10231
+ $e = Vs({ document: t, mount: b }), R.add($e);
10227
10232
  const ze = await $e.promise;
10228
10233
  Pe(nt);
10229
10234
  const lt = ze?.mnemonicControl?.value;
10230
10235
  if (!jn(lt)) throw new Error("invalid legacy credentials");
10231
10236
  _r = mt(Wn.encode(lt)), cr(ze.form, [ze.mnemonicControl]), ze.section?.remove?.(), hr = { mnemonicUtf8: _r };
10232
10237
  }
10233
- if ($e?.promise && R.delete($e), Ae = await d_({
10238
+ if ($e?.promise && R.delete($e), Ae = await h_({
10234
10239
  accountIndex: 0,
10235
10240
  credentials: hr,
10236
10241
  operation: "sdn.auth.raw-challenge.v1",
@@ -10239,14 +10244,14 @@ function wh({
10239
10244
  assertCurrent: () => Pe(nt),
10240
10245
  ownHandle: (ze) => F.add(ze)
10241
10246
  }), Pe(nt), !Ae?.handle) throw new Error("legacy derivation failed");
10242
- const Kr = Te === "password-fast-v1-legacy" ? "sdn-fast-password-auth-v1-legacy" : "sdn-bip39-auth-v1-legacy", Qe = Array.isArray(Ae.identity?.keys) ? Ae.identity.keys.find((ze) => ze?.purpose === "sdn-authentication") : null;
10243
- if (Ae.identity?.identityScheme !== Kr || Ae.identity?.seedProfile !== Te || typeof Ae.identity?.accountXpub != "string" || !Qe || typeof Qe.publicKeyHex != "string" || !/^[0-9a-f]{64}$/u.test(Qe.publicKeyHex))
10247
+ const qr = Te === "password-fast-v1-legacy" ? "sdn-fast-password-auth-v1-legacy" : "sdn-bip39-auth-v1-legacy", Qe = Array.isArray(Ae.identity?.keys) ? Ae.identity.keys.find((ze) => ze?.purpose === "sdn-authentication") : null;
10248
+ if (Ae.identity?.identityScheme !== qr || Ae.identity?.seedProfile !== Te || typeof Ae.identity?.accountXpub != "string" || !Qe || typeof Qe.publicKeyHex != "string" || !/^[0-9a-f]{64}$/u.test(Qe.publicKeyHex))
10244
10249
  throw new Error("legacy identity invalid");
10245
- const Yr = Ae.identity;
10250
+ const Kr = Ae.identity;
10246
10251
  if (!Dt(Ae.handle)) throw new Error("legacy destruction failed");
10247
10252
  Ae = null, Pe(nt);
10248
10253
  const Ct = s.keys.find((ze) => ze.purpose === "sdn-authentication");
10249
- _.result.replaceChildren(), sn(t, _.result, "Current account xpub", s.accountXpub), sn(t, _.result, "Legacy account xpub", Yr.accountXpub), sn(t, _.result, "Current authentication key", Ct?.publicKeyHex), sn(t, _.result, "Legacy authentication key", Qe.publicKeyHex);
10254
+ _.result.replaceChildren(), on(t, _.result, "Current account xpub", s.accountXpub), on(t, _.result, "Legacy account xpub", Kr.accountXpub), on(t, _.result, "Current authentication key", Ct?.publicKeyHex), on(t, _.result, "Legacy authentication key", Qe.publicKeyHex);
10250
10255
  } catch {
10251
10256
  Ce(nt) && (_.result.textContent = "Legacy account comparison could not be completed.");
10252
10257
  } finally {
@@ -10300,14 +10305,14 @@ function wh({
10300
10305
  }, Zt = () => {
10301
10306
  const fe = k.destroy(), Te = Ht();
10302
10307
  return fe && Te && ue === 0 && !ie && !ee;
10303
- }, ct = () => (Xe(!1), Ee || (Ee = !0, B.disabled = !0, C.disabled = !0, B.removeEventListener?.("click", zt), C.removeEventListener?.("click", qr), P.remove?.()), Zt()), lr = (fe, Te, nt, { requireTrustedEvent: $e = !0 } = {}) => $e && fe?.isTrusted !== !0 ? Promise.resolve() : pe || (oe || Ee ? Promise.reject(new Ue("STALE_CONTROLLER")) : (Xe(!0), Zt() ? (oe = !0, B.disabled = !0, C.disabled = !0, pe = (async () => {
10304
- E(), Vs(t, null, nt, b);
10308
+ }, ct = () => (Xe(!1), Ee || (Ee = !0, B.disabled = !0, C.disabled = !0, B.removeEventListener?.("click", zt), C.removeEventListener?.("click", jr), P.remove?.()), Zt()), lr = (fe, Te, nt, { requireTrustedEvent: $e = !0 } = {}) => $e && fe?.isTrusted !== !0 ? Promise.resolve() : pe || (oe || Ee ? Promise.reject(new Ue("STALE_CONTROLLER")) : (Xe(!0), Zt() ? (oe = !0, B.disabled = !0, C.disabled = !0, pe = (async () => {
10309
+ E(), Hs(t, null, nt, b);
10305
10310
  try {
10306
10311
  const Pt = await Te();
10307
10312
  if (!a()) throw new Ue("STALE_CONTROLLER");
10308
10313
  return Pt;
10309
10314
  } catch (Pt) {
10310
- throw a() && Hs(t, void 0, b), Pt;
10315
+ throw a() && zs(t, void 0, b), Pt;
10311
10316
  }
10312
10317
  })(), pe) : (v.textContent = "Secure cleanup is still pending. Retry Return or Logout.", B.disabled = !1, C.disabled = !1, Promise.reject(new Ue("DESTRUCTION_FAILED"))))), zt = (fe) => {
10313
10318
  lr(
@@ -10316,7 +10321,7 @@ function wh({
10316
10321
  "Returning to the requesting site."
10317
10322
  ).catch(() => {
10318
10323
  });
10319
- }, qr = (fe) => {
10324
+ }, jr = (fe) => {
10320
10325
  lr(
10321
10326
  fe,
10322
10327
  () => r.logout(),
@@ -10324,7 +10329,7 @@ function wh({
10324
10329
  ).catch(() => {
10325
10330
  });
10326
10331
  };
10327
- return M.addEventListener("click", wt), _.launch.addEventListener("click", pt), u?.launch.addEventListener?.("click", yt), u?.confirm.addEventListener?.("click", Ot), u?.cancel.addEventListener?.("click", kt), B.addEventListener("click", zt), C.addEventListener("click", qr), Object.freeze({
10332
+ return M.addEventListener("click", wt), _.launch.addEventListener("click", pt), u?.launch.addEventListener?.("click", yt), u?.confirm.addEventListener?.("click", Ot), u?.cancel.addEventListener?.("click", kt), B.addEventListener("click", zt), C.addEventListener("click", jr), Object.freeze({
10328
10333
  destroy: ct,
10329
10334
  logout: () => lr(
10330
10335
  null,
@@ -10334,24 +10339,24 @@ function wh({
10334
10339
  )
10335
10340
  });
10336
10341
  }
10337
- function Sh(e) {
10342
+ function Oh(e) {
10338
10343
  const r = e?.pathname, t = e?.search ?? "", s = e?.hash ?? "";
10339
- if (typeof r != "string" || t !== "" || s !== "") throw Lo();
10340
- const a = bh.exec(r);
10341
- if (!a) throw Lo();
10344
+ if (typeof r != "string" || t !== "" || s !== "") throw No();
10345
+ const a = Ah.exec(r);
10346
+ if (!a) throw No();
10342
10347
  return a[1];
10343
10348
  }
10344
- function kh(e) {
10345
- const r = e?.window ?? globalThis.window, t = e?.document ?? r?.document ?? globalThis.document, s = e?.mount ?? t?.body, a = typeof r?.fetch == "function" ? r.fetch.bind(r) : typeof globalThis.fetch == "function" ? globalThis.fetch.bind(globalThis) : null, d = e?.relay ?? (e?.controller ? null : X_({
10349
+ function Ph(e) {
10350
+ const r = e?.window ?? globalThis.window, t = e?.document ?? r?.document ?? globalThis.document, s = e?.mount ?? t?.body, a = typeof r?.fetch == "function" ? r.fetch.bind(r) : typeof globalThis.fetch == "function" ? globalThis.fetch.bind(globalThis) : null, d = e?.relay ?? (e?.controller ? null : Q_({
10346
10351
  fetch: e?.fetch ?? a,
10347
10352
  location: e?.location ?? r?.location
10348
- })), b = e?.registry ?? Ah, E = e?.controller ?? new Z_({
10353
+ })), b = e?.registry ?? Ih, E = e?.controller ?? new th({
10349
10354
  ...e,
10350
10355
  document: t,
10351
10356
  registry: b,
10352
10357
  relay: d,
10353
10358
  window: r
10354
- }), I = e?.credentialPrompt ?? ((R) => mh(R));
10359
+ }), I = e?.credentialPrompt ?? ((R) => wh(R));
10355
10360
  let P = null, w = null, m = null, N = null, L = null, D = [], U = 0, M = !1;
10356
10361
  const C = () => {
10357
10362
  (P?.destroy?.() ?? !0) && (P = null), w = null;
@@ -10394,14 +10399,14 @@ function kh(e) {
10394
10399
  const R = U;
10395
10400
  return M ? (N = Promise.reject(new Ue("STALE_CONTROLLER")), N) : (N = (async () => {
10396
10401
  try {
10397
- const F = Sh(r?.location);
10402
+ const F = Oh(r?.location);
10398
10403
  if (typeof E.prepare != "function" || typeof E.executePrepared != "function" || typeof E.unlockPassword != "function") {
10399
10404
  const ae = await E.execute(F);
10400
10405
  return h(R), ae;
10401
10406
  }
10402
10407
  const V = await E.prepare(F);
10403
10408
  if (h(R), V.transaction.operation === "sdn.auth.raw-challenge.v1") {
10404
- const ae = Ih({
10409
+ const ae = Sh({
10405
10410
  document: t,
10406
10411
  mount: s,
10407
10412
  title: `Choose the legacy profile for ${V.binding.clientDisplayName}`
@@ -10415,7 +10420,7 @@ function kh(e) {
10415
10420
  mount: s,
10416
10421
  title: `Sign in to ${V.binding.clientDisplayName}`,
10417
10422
  transaction: V
10418
- }) : Bs({
10423
+ }) : Vs({
10419
10424
  document: t,
10420
10425
  mount: s,
10421
10426
  submitLabel: "Continue",
@@ -10460,7 +10465,7 @@ function kh(e) {
10460
10465
  }
10461
10466
  }
10462
10467
  const ee = await E.executePrepared(V);
10463
- return h(R), u(m), V.transaction.operation === "sdn.wallet.account.v1" ? (w = E.copyPublicIdentity(), P = wh({
10468
+ return h(R), u(m), V.transaction.operation === "sdn.wallet.account.v1" ? (w = E.copyPublicIdentity(), P = kh({
10464
10469
  clipboard: e?.clipboard ?? globalThis.navigator?.clipboard,
10465
10470
  controller: E,
10466
10471
  document: t,
@@ -10470,7 +10475,7 @@ function kh(e) {
10470
10475
  mount: s,
10471
10476
  onClear: C,
10472
10477
  wasm: e?.wasm
10473
- })) : (w = null, t?.createElement && s?.replaceChildren && Vs(
10478
+ })) : (w = null, t?.createElement && s?.replaceChildren && Hs(
10474
10479
  t,
10475
10480
  r,
10476
10481
  "The wallet request completed successfully.",
@@ -10478,7 +10483,7 @@ function kh(e) {
10478
10483
  )), ee;
10479
10484
  } catch (F) {
10480
10485
  const V = !f(R);
10481
- throw m?.cancel?.(), m = null, C(), k(), V || Hs(t, F?.code === "USER_CANCELLED" ? "Cancelled. You may close this window." : void 0, s), await (L ?? E.destroy(V ? "stale-startup" : "startup-failure")), V && F?.code !== "DESTRUCTION_FAILED" ? new Ue("STALE_CONTROLLER") : F;
10486
+ throw m?.cancel?.(), m = null, C(), k(), V || zs(t, F?.code === "USER_CANCELLED" ? "Cancelled. You may close this window." : void 0, s), await (L ?? E.destroy(V ? "stale-startup" : "startup-failure")), V && F?.code !== "DESTRUCTION_FAILED" ? new Ue("STALE_CONTROLLER") : F;
10482
10487
  }
10483
10488
  })(), N);
10484
10489
  },
@@ -10489,24 +10494,24 @@ function kh(e) {
10489
10494
  }
10490
10495
  });
10491
10496
  }
10492
- async function Oh(e) {
10493
- const r = kh(e);
10497
+ async function Rh(e) {
10498
+ const r = Ph(e);
10494
10499
  return await r.start(), r;
10495
10500
  }
10496
10501
  const un = document.querySelector("[data-wallet-origin-root]") ?? document.body;
10497
- async function Ph() {
10502
+ async function Nh() {
10498
10503
  if (window.top !== window) throw new Error("Wallet origin cannot run in a frame");
10499
- if (getComputedStyle(document.documentElement).getPropertyValue("--sdn-wallet-origin-style-ready").trim() !== '"2.0.32"') throw new Error("Wallet origin style integrity failed");
10500
- const r = await Pl();
10501
- await Oh({ document, mount: un, wasm: r, window });
10504
+ if (getComputedStyle(document.documentElement).getPropertyValue("--sdn-wallet-origin-style-ready").trim() !== '"2.0.33"') throw new Error("Wallet origin style integrity failed");
10505
+ const r = await Nl();
10506
+ await Rh({ document, mount: un, wasm: r, window });
10502
10507
  }
10503
- Ph().catch(() => {
10508
+ Nh().catch(() => {
10504
10509
  if (un.childElementCount === 1 && un.firstElementChild?.classList?.contains("wallet-terminal-error") === !0)
10505
10510
  return;
10506
10511
  const e = document.createElement("p");
10507
10512
  e.className = "wallet-error", e.textContent = "The wallet could not start. Close this window and try again.", un.replaceChildren(e);
10508
10513
  });
10509
- var Rh = (() => {
10514
+ var Lh = (() => {
10510
10515
  var e = import.meta.url;
10511
10516
  return function(r = {}) {
10512
10517
  if (!(r.wasmBinary instanceof Uint8Array)) throw new Error("Verified WASM bytes are required");
@@ -10618,9 +10623,9 @@ var Rh = (() => {
10618
10623
  }) : at(i, o, c);
10619
10624
  }
10620
10625
  function Ht() {
10621
- var n = { a: Na };
10626
+ var n = { a: La };
10622
10627
  function i(c, l) {
10623
- return S = c.exports, M = S.xa, R(), Ui = S.za, ce(S.ya), Ce(), S;
10628
+ return S = c.exports, M = S.ya, R(), Ui = S.Aa, ce(S.za), Ce(), S;
10624
10629
  }
10625
10630
  Re();
10626
10631
  function o(c) {
@@ -10750,7 +10755,7 @@ var Rh = (() => {
10750
10755
  return pr(y), i;
10751
10756
  }
10752
10757
  return pr(c), i;
10753
- }, qr = () => zt([]), fe = (n) => zt([n]), Te = (n, i) => zt([n, i]), nt = (n, i, o) => zt([n, i, o]), $e = () => {
10758
+ }, jr = () => zt([]), fe = (n) => zt([n]), Te = (n, i) => zt([n, i]), nt = (n, i, o) => zt([n, i, o]), $e = () => {
10754
10759
  var n = yt.pop();
10755
10760
  n || Pe("no exception to throw");
10756
10761
  var i = n.excPtr;
@@ -10788,7 +10793,7 @@ var Rh = (() => {
10788
10793
  if (typeof crypto == "object" && typeof crypto.getRandomValues == "function")
10789
10794
  return (n) => crypto.getRandomValues(n);
10790
10795
  Pe("initRandomDevice");
10791
- }, Kr = (n) => (Kr = hr())(n), Qe = { resolve: function() {
10796
+ }, qr = (n) => (qr = hr())(n), Qe = { resolve: function() {
10792
10797
  for (var n = "", i = !1, o = arguments.length - 1; o >= -1 && !i; o--) {
10793
10798
  var c = o >= 0 ? arguments[o] : p.cwd();
10794
10799
  if (typeof c != "string")
@@ -10815,10 +10820,10 @@ var Rh = (() => {
10815
10820
  for (var x = [], O = A; O < c.length; O++)
10816
10821
  x.push("..");
10817
10822
  return x = x.concat(l.slice(A)), x.join("/");
10818
- } }, Yr = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, Ct = (n, i, o) => {
10823
+ } }, Kr = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, Ct = (n, i, o) => {
10819
10824
  for (var c = i + o, l = i; n[l] && !(l >= c); ) ++l;
10820
- if (l - i > 16 && n.buffer && Yr)
10821
- return Yr.decode(n.subarray(i, l));
10825
+ if (l - i > 16 && n.buffer && Kr)
10826
+ return Kr.decode(n.subarray(i, l));
10822
10827
  for (var y = ""; i < l; ) {
10823
10828
  var A = n[i++];
10824
10829
  if (!(A & 128)) {
@@ -11053,7 +11058,7 @@ var Rh = (() => {
11053
11058
  return { ptr: y, allocated: A };
11054
11059
  }, msync(n, i, o, c, l) {
11055
11060
  return Ie.stream_ops.write(n, i, 0, c, o, !1), 0;
11056
- } } }, zs = (n, i, o, c) => {
11061
+ } } }, $s = (n, i, o, c) => {
11057
11062
  var l = `al ${n}`;
11058
11063
  m(n, (y) => {
11059
11064
  B(y, `Loading data file "${n}" failed (no arrayBuffer).`), i(new Uint8Array(y)), l && Ce();
@@ -11063,26 +11068,26 @@ var Rh = (() => {
11063
11068
  else
11064
11069
  throw `Loading data file "${n}" failed.`;
11065
11070
  }), l && Re();
11066
- }, $s = (n, i, o, c, l, y) => {
11071
+ }, Ws = (n, i, o, c, l, y) => {
11067
11072
  p.createDataFile(n, i, o, c, l, y);
11068
- }, Ws = t.preloadPlugins || [], js = (n, i, o, c) => {
11073
+ }, js = t.preloadPlugins || [], qs = (n, i, o, c) => {
11069
11074
  typeof Browser < "u" && Browser.init();
11070
11075
  var l = !1;
11071
- return Ws.forEach((y) => {
11076
+ return js.forEach((y) => {
11072
11077
  l || y.canHandle(i) && (y.handle(n, i, o, c), l = !0);
11073
11078
  }), l;
11074
- }, qs = (n, i, o, c, l, y, A, O, x, H) => {
11079
+ }, Ks = (n, i, o, c, l, y, A, O, x, H) => {
11075
11080
  var G = i ? Qe.resolve(Ae.join2(n, i)) : n;
11076
11081
  function se(q) {
11077
11082
  function X(he) {
11078
- H?.(), O || $s(n, i, he, c, l, x), y?.(), Ce();
11083
+ H?.(), O || Ws(n, i, he, c, l, x), y?.(), Ce();
11079
11084
  }
11080
- js(q, G, X, () => {
11085
+ qs(q, G, X, () => {
11081
11086
  A?.(), Ce();
11082
11087
  }) || X(q);
11083
11088
  }
11084
- Re(), typeof o == "string" ? zs(o, (q) => se(q), A) : se(o);
11085
- }, Ks = (n) => {
11089
+ Re(), typeof o == "string" ? $s(o, (q) => se(q), A) : se(o);
11090
+ }, Ys = (n) => {
11086
11091
  var i = { r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090 }, o = i[n];
11087
11092
  if (typeof o > "u")
11088
11093
  throw new Error(`Unknown file open mode: ${n}`);
@@ -11471,7 +11476,7 @@ var Rh = (() => {
11471
11476
  }, open(n, i, o) {
11472
11477
  if (n === "")
11473
11478
  throw new p.ErrnoError(44);
11474
- i = typeof i == "string" ? Ks(i) : i, o = typeof o > "u" ? 438 : o, i & 64 ? o = o & 4095 | 32768 : o = 0;
11479
+ i = typeof i == "string" ? Ys(i) : i, o = typeof o > "u" ? 438 : o, i & 64 ? o = o & 4095 | 32768 : o = 0;
11475
11480
  var c;
11476
11481
  if (typeof n == "object")
11477
11482
  c = n;
@@ -11617,7 +11622,7 @@ var Rh = (() => {
11617
11622
  p.mkdir("/tmp"), p.mkdir("/home"), p.mkdir("/home/web_user");
11618
11623
  }, createDefaultDevices() {
11619
11624
  p.mkdir("/dev"), p.registerDevice(p.makedev(1, 3), { read: () => 0, write: (c, l, y, A, O) => A }), p.mkdev("/dev/null", p.makedev(1, 3)), Wt.register(p.makedev(5, 0), Wt.default_tty_ops), Wt.register(p.makedev(6, 0), Wt.default_tty1_ops), p.mkdev("/dev/tty", p.makedev(5, 0)), p.mkdev("/dev/tty1", p.makedev(6, 0));
11620
- var n = new Uint8Array(1024), i = 0, o = () => (i === 0 && (i = Kr(n).byteLength), n[--i]);
11625
+ var n = new Uint8Array(1024), i = 0, o = () => (i === 0 && (i = qr(n).byteLength), n[--i]);
11621
11626
  p.createDevice("/dev", "random", o), p.createDevice("/dev", "urandom", o), p.mkdir("/dev/shm"), p.mkdir("/dev/shm/tmp");
11622
11627
  }, createSpecialDirectories() {
11623
11628
  p.mkdir("/proc");
@@ -11854,7 +11859,7 @@ var Rh = (() => {
11854
11859
  var i = p.getStreamChecked(n);
11855
11860
  return i;
11856
11861
  } };
11857
- function Ys(n, i, o) {
11862
+ function Gs(n, i, o) {
11858
11863
  Le.varargs = o;
11859
11864
  try {
11860
11865
  var c = Le.getStreamFromFD(n);
@@ -11897,7 +11902,7 @@ var Rh = (() => {
11897
11902
  return -O.errno;
11898
11903
  }
11899
11904
  }
11900
- function Gs(n, i) {
11905
+ function Xs(n, i) {
11901
11906
  try {
11902
11907
  var o = Le.getStreamFromFD(n);
11903
11908
  return Le.doStat(p.stat, o.path, i);
@@ -11906,8 +11911,8 @@ var Rh = (() => {
11906
11911
  return -c.errno;
11907
11912
  }
11908
11913
  }
11909
- var Gr = (n, i, o) => er(n, _, i, o);
11910
- function Xs(n, i, o) {
11914
+ var Yr = (n, i, o) => er(n, _, i, o);
11915
+ function Js(n, i, o) {
11911
11916
  try {
11912
11917
  var c = Le.getStreamFromFD(n);
11913
11918
  c.getdents ||= p.readdir(c.path);
@@ -11922,7 +11927,7 @@ var Rh = (() => {
11922
11927
  var q = p.lookupNode(c.node, G);
11923
11928
  x = q.id, H = p.isChrdev(q.mode) ? 2 : p.isDir(q.mode) ? 4 : p.isLink(q.mode) ? 10 : 8;
11924
11929
  }
11925
- v[i + y >> 3] = BigInt(x), v[i + y + 8 >> 3] = BigInt((O + 1) * l), f[i + y + 16 >> 1] = 280, Y[i + y + 18 >> 0] = H, Gr(G, i + y + 19, 256), y += l, O += 1;
11930
+ v[i + y >> 3] = BigInt(x), v[i + y + 8 >> 3] = BigInt((O + 1) * l), f[i + y + 16 >> 1] = 280, Y[i + y + 18 >> 0] = H, Yr(G, i + y + 19, 256), y += l, O += 1;
11926
11931
  }
11927
11932
  return p.llseek(c, O * l, 0), y;
11928
11933
  } catch (X) {
@@ -11930,7 +11935,7 @@ var Rh = (() => {
11930
11935
  return -X.errno;
11931
11936
  }
11932
11937
  }
11933
- function Js(n, i, o) {
11938
+ function Qs(n, i, o) {
11934
11939
  Le.varargs = o;
11935
11940
  try {
11936
11941
  var c = Le.getStreamFromFD(n);
@@ -11994,7 +11999,7 @@ var Rh = (() => {
11994
11999
  return -X.errno;
11995
12000
  }
11996
12001
  }
11997
- function Qs(n, i) {
12002
+ function Zs(n, i) {
11998
12003
  try {
11999
12004
  return n = Le.getStr(n), Le.doStat(p.lstat, n, i);
12000
12005
  } catch (o) {
@@ -12002,7 +12007,7 @@ var Rh = (() => {
12002
12007
  return -o.errno;
12003
12008
  }
12004
12009
  }
12005
- function Zs(n, i, o, c) {
12010
+ function ea(n, i, o, c) {
12006
12011
  try {
12007
12012
  i = Le.getStr(i);
12008
12013
  var l = c & 256, y = c & 4096;
@@ -12012,7 +12017,7 @@ var Rh = (() => {
12012
12017
  return -A.errno;
12013
12018
  }
12014
12019
  }
12015
- function ea(n, i, o, c) {
12020
+ function ta(n, i, o, c) {
12016
12021
  Le.varargs = c;
12017
12022
  try {
12018
12023
  i = Le.getStr(i), i = Le.calculateAt(n, i);
@@ -12023,7 +12028,7 @@ var Rh = (() => {
12023
12028
  return -y.errno;
12024
12029
  }
12025
12030
  }
12026
- function ta(n, i) {
12031
+ function ra(n, i) {
12027
12032
  try {
12028
12033
  return n = Le.getStr(n), Le.doStat(p.stat, n, i);
12029
12034
  } catch (o) {
@@ -12031,8 +12036,8 @@ var Rh = (() => {
12031
12036
  return -o.errno;
12032
12037
  }
12033
12038
  }
12034
- var ra = 1, na = () => ra, ia = 9007199254740992, oa = -9007199254740992, Ni = (n) => n < oa || n > ia ? NaN : Number(n);
12035
- function sa(n, i) {
12039
+ var na = 1, ia = () => na, oa = 9007199254740992, sa = -9007199254740992, Ni = (n) => n < sa || n > oa ? NaN : Number(n);
12040
+ function aa(n, i) {
12036
12041
  n = Ni(n);
12037
12042
  var o = new Date(n * 1e3);
12038
12043
  h[i >> 2] = o.getUTCSeconds(), h[i + 4 >> 2] = o.getUTCMinutes(), h[i + 8 >> 2] = o.getUTCHours(), h[i + 12 >> 2] = o.getUTCDate(), h[i + 16 >> 2] = o.getUTCMonth(), h[i + 20 >> 2] = o.getUTCFullYear() - 1900, h[i + 24 >> 2] = o.getUTCDay();
@@ -12041,8 +12046,8 @@ var Rh = (() => {
12041
12046
  }
12042
12047
  var Li = (n) => {
12043
12048
  var i = lt(n) + 1, o = Vi(i);
12044
- return o && Gr(n, o, i), o;
12045
- }, aa = (n, i, o) => {
12049
+ return o && Yr(n, o, i), o;
12050
+ }, ca = (n, i, o) => {
12046
12051
  var c = (/* @__PURE__ */ new Date()).getFullYear(), l = new Date(c, 0, 1), y = new Date(c, 6, 1), A = l.getTimezoneOffset(), O = y.getTimezoneOffset(), x = Math.max(A, O);
12047
12052
  u[n >> 2] = x * 60, h[i >> 2] = +(A != O);
12048
12053
  function H(he) {
@@ -12051,33 +12056,33 @@ var Rh = (() => {
12051
12056
  }
12052
12057
  var G = H(l), se = H(y), q = Li(G), X = Li(se);
12053
12058
  O < A ? (u[o >> 2] = q, u[o + 4 >> 2] = X) : (u[o >> 2] = X, u[o + 4 >> 2] = q);
12054
- }, ca = () => {
12059
+ }, la = () => {
12055
12060
  Pe("");
12056
- }, la = () => Date.now(), Ti;
12061
+ }, da = () => Date.now(), Ti;
12057
12062
  Ti = () => performance.now();
12058
- var da = () => 536870912, _a = (n) => {
12063
+ var _a = () => 536870912, ha = (n) => {
12059
12064
  var i = M.buffer, o = (n - i.byteLength + 65535) / 65536;
12060
12065
  try {
12061
12066
  return M.grow(o), R(), 1;
12062
12067
  } catch {
12063
12068
  }
12064
- }, ha = (n) => {
12069
+ }, ua = (n) => {
12065
12070
  var i = _.length;
12066
12071
  n >>>= 0;
12067
- var o = da();
12072
+ var o = _a();
12068
12073
  if (n > o)
12069
12074
  return !1;
12070
12075
  for (var c = (x, H) => x + (H - x % H) % H, l = 1; l <= 4; l *= 2) {
12071
12076
  var y = i * (1 + 0.2 / l);
12072
12077
  y = Math.min(y, n + 100663296);
12073
- var A = Math.min(o, c(Math.max(n, y), 65536)), O = _a(A);
12078
+ var A = Math.min(o, c(Math.max(n, y), 65536)), O = ha(A);
12074
12079
  if (O)
12075
12080
  return !0;
12076
12081
  }
12077
12082
  return !1;
12078
- }, Tn = {}, ua = () => b || "./this.program", fr = () => {
12083
+ }, Tn = {}, fa = () => b || "./this.program", fr = () => {
12079
12084
  if (!fr.strings) {
12080
- var n = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", i = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: n, _: ua() };
12085
+ var n = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", i = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: n, _: fa() };
12081
12086
  for (var o in Tn)
12082
12087
  Tn[o] === void 0 ? delete i[o] : i[o] = Tn[o];
12083
12088
  var c = [];
@@ -12086,23 +12091,23 @@ var Rh = (() => {
12086
12091
  fr.strings = c;
12087
12092
  }
12088
12093
  return fr.strings;
12089
- }, fa = (n, i) => {
12094
+ }, pa = (n, i) => {
12090
12095
  for (var o = 0; o < n.length; ++o)
12091
12096
  Y[i++ >> 0] = n.charCodeAt(o);
12092
12097
  Y[i >> 0] = 0;
12093
- }, pa = (n, i) => {
12098
+ }, ya = (n, i) => {
12094
12099
  var o = 0;
12095
12100
  return fr().forEach((c, l) => {
12096
12101
  var y = i + o;
12097
- u[n + l * 4 >> 2] = y, fa(c, y), o += c.length + 1;
12102
+ u[n + l * 4 >> 2] = y, pa(c, y), o += c.length + 1;
12098
12103
  }), 0;
12099
- }, ya = (n, i) => {
12104
+ }, ga = (n, i) => {
12100
12105
  var o = fr();
12101
12106
  u[n >> 2] = o.length;
12102
12107
  var c = 0;
12103
12108
  return o.forEach((l) => c += l.length + 1), u[i >> 2] = c, 0;
12104
12109
  };
12105
- function ga(n) {
12110
+ function va(n) {
12106
12111
  try {
12107
12112
  var i = Le.getStreamFromFD(n);
12108
12113
  return p.close(i), 0;
@@ -12111,7 +12116,7 @@ var Rh = (() => {
12111
12116
  return o.errno;
12112
12117
  }
12113
12118
  }
12114
- var va = (n, i, o, c) => {
12119
+ var ba = (n, i, o, c) => {
12115
12120
  for (var l = 0, y = 0; y < o; y++) {
12116
12121
  var A = u[i >> 2], O = u[i + 4 >> 2];
12117
12122
  i += 8;
@@ -12121,16 +12126,16 @@ var Rh = (() => {
12121
12126
  }
12122
12127
  return l;
12123
12128
  };
12124
- function ba(n, i, o, c) {
12129
+ function Ea(n, i, o, c) {
12125
12130
  try {
12126
- var l = Le.getStreamFromFD(n), y = va(l, i, o);
12131
+ var l = Le.getStreamFromFD(n), y = ba(l, i, o);
12127
12132
  return u[c >> 2] = y, 0;
12128
12133
  } catch (A) {
12129
12134
  if (typeof p > "u" || A.name !== "ErrnoError") throw A;
12130
12135
  return A.errno;
12131
12136
  }
12132
12137
  }
12133
- function Ea(n, i, o, c) {
12138
+ function Aa(n, i, o, c) {
12134
12139
  i = Ni(i);
12135
12140
  try {
12136
12141
  if (isNaN(i)) return 61;
@@ -12141,7 +12146,7 @@ var Rh = (() => {
12141
12146
  return y.errno;
12142
12147
  }
12143
12148
  }
12144
- var Aa = (n, i, o, c) => {
12149
+ var ma = (n, i, o, c) => {
12145
12150
  for (var l = 0, y = 0; y < o; y++) {
12146
12151
  var A = u[i >> 2], O = u[i + 4 >> 2];
12147
12152
  i += 8;
@@ -12151,22 +12156,22 @@ var Rh = (() => {
12151
12156
  }
12152
12157
  return l;
12153
12158
  };
12154
- function ma(n, i, o, c) {
12159
+ function Ia(n, i, o, c) {
12155
12160
  try {
12156
- var l = Le.getStreamFromFD(n), y = Aa(l, i, o);
12161
+ var l = Le.getStreamFromFD(n), y = ma(l, i, o);
12157
12162
  return u[c >> 2] = y, 0;
12158
12163
  } catch (A) {
12159
12164
  if (typeof p > "u" || A.name !== "ErrnoError") throw A;
12160
12165
  return A.errno;
12161
12166
  }
12162
12167
  }
12163
- var Ia = (n) => n, Xr = (n) => n % 4 === 0 && (n % 100 !== 0 || n % 400 === 0), wa = (n, i) => {
12168
+ var wa = (n) => n, Gr = (n) => n % 4 === 0 && (n % 100 !== 0 || n % 400 === 0), Sa = (n, i) => {
12164
12169
  for (var o = 0, c = 0; c <= i; o += n[c++])
12165
12170
  ;
12166
12171
  return o;
12167
- }, xi = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Di = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Sa = (n, i) => {
12172
+ }, xi = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Di = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ka = (n, i) => {
12168
12173
  for (var o = new Date(n.getTime()); i > 0; ) {
12169
- var c = Xr(o.getFullYear()), l = o.getMonth(), y = (c ? xi : Di)[l];
12174
+ var c = Gr(o.getFullYear()), l = o.getMonth(), y = (c ? xi : Di)[l];
12170
12175
  if (i > y - o.getDate())
12171
12176
  i -= y - o.getDate() + 1, o.setDate(1), l < 11 ? o.setMonth(l + 1) : (o.setMonth(0), o.setFullYear(o.getFullYear() + 1));
12172
12177
  else
@@ -12175,7 +12180,7 @@ var Rh = (() => {
12175
12180
  return o;
12176
12181
  }, Ci = (n, i) => {
12177
12182
  Y.set(n, i);
12178
- }, ka = (n, i, o, c) => {
12183
+ }, Oa = (n, i, o, c) => {
12179
12184
  var l = u[c + 40 >> 2], y = { tm_sec: h[c >> 2], tm_min: h[c + 4 >> 2], tm_hour: h[c + 8 >> 2], tm_mday: h[c + 12 >> 2], tm_mon: h[c + 16 >> 2], tm_year: h[c + 20 >> 2], tm_wday: h[c + 24 >> 2], tm_yday: h[c + 28 >> 2], tm_isdst: h[c + 32 >> 2], tm_gmtoff: h[c + 36 >> 2], tm_zone: l ? ur(l) : "" }, A = ur(o), O = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" };
12180
12185
  for (var x in O)
12181
12186
  A = A.replace(new RegExp(x, "g"), O[x]);
@@ -12214,7 +12219,7 @@ var Rh = (() => {
12214
12219
  }
12215
12220
  }
12216
12221
  function Me(z) {
12217
- var _e = Sa(new Date(z.tm_year + 1900, 0, 1), z.tm_yday), Ke = new Date(_e.getFullYear(), 0, 4), Ve = new Date(_e.getFullYear() + 1, 0, 4), dt = he(Ke), je = he(Ve);
12222
+ var _e = ka(new Date(z.tm_year + 1900, 0, 1), z.tm_yday), Ke = new Date(_e.getFullYear(), 0, 4), Ve = new Date(_e.getFullYear() + 1, 0, 4), dt = he(Ke), je = he(Ve);
12218
12223
  return X(dt, _e) <= 0 ? X(je, _e) <= 0 ? _e.getFullYear() + 1 : _e.getFullYear() : _e.getFullYear() - 1;
12219
12224
  }
12220
12225
  var Ze = { "%a": (z) => H[z.tm_wday].substring(0, 3), "%A": (z) => H[z.tm_wday], "%b": (z) => G[z.tm_mon].substring(0, 3), "%B": (z) => G[z.tm_mon], "%C": (z) => {
@@ -12223,7 +12228,7 @@ var Rh = (() => {
12223
12228
  }, "%d": (z) => q(z.tm_mday, 2), "%e": (z) => se(z.tm_mday, 2, " "), "%g": (z) => Me(z).toString().substring(2), "%G": (z) => Me(z), "%H": (z) => q(z.tm_hour, 2), "%I": (z) => {
12224
12229
  var _e = z.tm_hour;
12225
12230
  return _e == 0 ? _e = 12 : _e > 12 && (_e -= 12), q(_e, 2);
12226
- }, "%j": (z) => q(z.tm_mday + wa(Xr(z.tm_year + 1900) ? xi : Di, z.tm_mon - 1), 3), "%m": (z) => q(z.tm_mon + 1, 2), "%M": (z) => q(z.tm_min, 2), "%n": () => `
12231
+ }, "%j": (z) => q(z.tm_mday + Sa(Gr(z.tm_year + 1900) ? xi : Di, z.tm_mon - 1), 3), "%m": (z) => q(z.tm_mon + 1, 2), "%M": (z) => q(z.tm_min, 2), "%n": () => `
12227
12232
  `, "%p": (z) => z.tm_hour >= 0 && z.tm_hour < 12 ? "AM" : "PM", "%S": (z) => q(z.tm_sec, 2), "%t": () => " ", "%u": (z) => z.tm_wday || 7, "%U": (z) => {
12228
12233
  var _e = z.tm_yday + 7 - z.tm_wday;
12229
12234
  return q(Math.floor(_e / 7), 2);
@@ -12232,12 +12237,12 @@ var Rh = (() => {
12232
12237
  if ((z.tm_wday + 371 - z.tm_yday - 2) % 7 <= 2 && _e++, _e) {
12233
12238
  if (_e == 53) {
12234
12239
  var Ve = (z.tm_wday + 371 - z.tm_yday) % 7;
12235
- Ve != 4 && (Ve != 3 || !Xr(z.tm_year)) && (_e = 1);
12240
+ Ve != 4 && (Ve != 3 || !Gr(z.tm_year)) && (_e = 1);
12236
12241
  }
12237
12242
  } else {
12238
12243
  _e = 52;
12239
12244
  var Ke = (z.tm_wday + 7 - z.tm_yday - 1) % 7;
12240
- (Ke == 4 || Ke == 5 && Xr(z.tm_year % 400 - 1)) && _e++;
12245
+ (Ke == 4 || Ke == 5 && Gr(z.tm_year % 400 - 1)) && _e++;
12241
12246
  }
12242
12247
  return q(_e, 2);
12243
12248
  }, "%w": (z) => z.tm_wday, "%W": (z) => {
@@ -12253,16 +12258,16 @@ var Rh = (() => {
12253
12258
  A = A.replace(/\0\0/g, "%");
12254
12259
  var We = $t(A, !1);
12255
12260
  return We.length > i ? 0 : (Ci(We, n), We.length - 1);
12256
- }, Oa = (n, i, o, c, l) => ka(n, i, o, c), Ui, be = (n) => Ui.get(n), Fi = (n) => {
12261
+ }, Pa = (n, i, o, c, l) => Oa(n, i, o, c), Ui, be = (n) => Ui.get(n), Fi = (n) => {
12257
12262
  var i = t["_" + n];
12258
12263
  return i;
12259
- }, Pa = (n) => {
12264
+ }, Ra = (n) => {
12260
12265
  var i = lt(n) + 1, o = xn(i);
12261
- return Gr(n, o, i), o;
12266
+ return Yr(n, o, i), o;
12262
12267
  }, Mi = (n, i, o, c, l) => {
12263
12268
  var y = { string: (he) => {
12264
12269
  var Me = 0;
12265
- return he != null && he !== 0 && (Me = Pa(he)), Me;
12270
+ return he != null && he !== 0 && (Me = Ra(he)), Me;
12266
12271
  }, array: (he) => {
12267
12272
  var Me = xn(he.length);
12268
12273
  return Ci(he, Me), Me;
@@ -12281,31 +12286,31 @@ var Rh = (() => {
12281
12286
  return H !== 0 && ve(H), A(he);
12282
12287
  }
12283
12288
  return q = X(q), q;
12284
- }, Ra = (n, i, o, c) => {
12289
+ }, Na = (n, i, o, c) => {
12285
12290
  var l = !o || o.every((A) => A === "number" || A === "boolean"), y = i !== "string";
12286
12291
  return y && l && !c ? Fi(n) : function() {
12287
12292
  return Mi(n, i, o, arguments);
12288
12293
  };
12289
12294
  }, Bi = function(n, i, o, c) {
12290
12295
  n || (n = this), this.parent = n, this.mount = n.mount, this.mounted = null, this.id = p.nextInode++, this.name = i, this.mode = o, this.node_ops = {}, this.stream_ops = {}, this.rdev = c;
12291
- }, Jr = 365, Qr = 146;
12296
+ }, Xr = 365, Jr = 146;
12292
12297
  Object.defineProperties(Bi.prototype, { read: { get: function() {
12293
- return (this.mode & Jr) === Jr;
12298
+ return (this.mode & Xr) === Xr;
12294
12299
  }, set: function(n) {
12295
- n ? this.mode |= Jr : this.mode &= ~Jr;
12300
+ n ? this.mode |= Xr : this.mode &= ~Xr;
12296
12301
  } }, write: { get: function() {
12297
- return (this.mode & Qr) === Qr;
12302
+ return (this.mode & Jr) === Jr;
12298
12303
  }, set: function(n) {
12299
- n ? this.mode |= Qr : this.mode &= ~Qr;
12304
+ n ? this.mode |= Jr : this.mode &= ~Jr;
12300
12305
  } }, isFolder: { get: function() {
12301
12306
  return p.isDir(this.mode);
12302
12307
  } }, isDevice: { get: function() {
12303
12308
  return p.isChrdev(this.mode);
12304
- } } }), p.FSNode = Bi, p.createPreloadedFile = qs, p.staticInit();
12305
- var Na = { p: Ot, r: Zt, a: qr, g: fe, n: Te, k: nt, ca: $e, o: Pt, S: dr, d: lr, U: Ys, qa: Gs, ia: Xs, sa: Js, oa: Qs, na: Zs, V: ea, pa: ta, ta: na, ja: sa, ha: aa, A: ca, M: la, W: Ti, ga: ha, la: pa, ma: ya, I: ga, T: ba, ka: Ea, ra: ma, Q: Ka, N: fc, R: vc, v: Ha, c: Da, e: Ba, i: Ta, q: Ca, j: Ua, y: ja, B: Ga, P: Xa, E: Wa, K: qa, wa: Qa, H: bc, $: nc, da: yc, Z: dc, D: rc, s: oc, ea: pc, ba: Za, L: gc, m: za, f: xa, b: La, h: Fa, l: Ma, w: $a, F: Va, x: Ya, va: tc, aa: ec, z: Ja, J: _c, G: Ec, _: lc, u: cc, O: ic, C: sc, Y: hc, ua: ac, X: uc, t: Ia, fa: Oa }, S = Ht(), Vi = t._malloc = (n) => (Vi = t._malloc = S.Aa)(n);
12306
- t._free = (n) => (t._free = S.Ba)(n), t._hd_secure_wipe = (n, i) => (t._hd_secure_wipe = S.Ca)(n, i), t._hd_alloc = (n) => (t._hd_alloc = S.Da)(n), t._hd_dealloc = (n) => (t._hd_dealloc = S.Ea)(n), t._hd_mnemonic_generate = (n, i, o, c) => (t._hd_mnemonic_generate = S.Fa)(n, i, o, c), t._hd_mnemonic_validate = (n, i) => (t._hd_mnemonic_validate = S.Ga)(n, i), t._hd_mnemonic_to_seed = (n, i, o, c) => (t._hd_mnemonic_to_seed = S.Ha)(n, i, o, c), t._hd_mnemonic_to_entropy = (n, i, o, c) => (t._hd_mnemonic_to_entropy = S.Ia)(n, i, o, c), t._hd_entropy_to_mnemonic = (n, i, o, c, l) => (t._hd_entropy_to_mnemonic = S.Ja)(n, i, o, c, l), t._hd_mnemonic_get_wordlist = (n) => (t._hd_mnemonic_get_wordlist = S.Ka)(n), t._hd_mnemonic_suggest_word = (n, i, o, c, l) => (t._hd_mnemonic_suggest_word = S.La)(n, i, o, c, l), t._hd_mnemonic_check_word = (n, i) => (t._hd_mnemonic_check_word = S.Ma)(n, i), t._hd_key_from_seed = (n, i, o) => (t._hd_key_from_seed = S.Na)(n, i, o), t._hd_key_from_xprv = (n) => (t._hd_key_from_xprv = S.Oa)(n), t._hd_key_from_xpub = (n) => (t._hd_key_from_xpub = S.Pa)(n), t._hd_key_derive_path = (n, i) => (t._hd_key_derive_path = S.Qa)(n, i), t._hd_key_derive_child = (n, i) => (t._hd_key_derive_child = S.Ra)(n, i), t._hd_key_derive_hardened = (n, i) => (t._hd_key_derive_hardened = S.Sa)(n, i), t._hd_key_get_private = (n, i, o) => (t._hd_key_get_private = S.Ta)(n, i, o), t._hd_key_get_public = (n, i, o) => (t._hd_key_get_public = S.Ua)(n, i, o), t._hd_key_get_chain_code = (n, i, o) => (t._hd_key_get_chain_code = S.Va)(n, i, o), t._hd_key_get_fingerprint = (n) => (t._hd_key_get_fingerprint = S.Wa)(n), t._hd_key_get_parent_fingerprint = (n) => (t._hd_key_get_parent_fingerprint = S.Xa)(n), t._hd_key_get_depth = (n) => (t._hd_key_get_depth = S.Ya)(n), t._hd_key_get_child_index = (n) => (t._hd_key_get_child_index = S.Za)(n), t._hd_key_serialize_xprv = (n, i, o) => (t._hd_key_serialize_xprv = S._a)(n, i, o), t._hd_key_serialize_xpub = (n, i, o) => (t._hd_key_serialize_xpub = S.$a)(n, i, o), t._hd_key_neutered = (n) => (t._hd_key_neutered = S.ab)(n), t._hd_key_is_neutered = (n) => (t._hd_key_is_neutered = S.bb)(n), t._hd_key_wipe = (n) => (t._hd_key_wipe = S.cb)(n), t._hd_key_clone = (n) => (t._hd_key_clone = S.db)(n), t._hd_key_destroy = (n) => (t._hd_key_destroy = S.eb)(n), t._hd_path_build = (n, i, o, c, l, y, A) => (t._hd_path_build = S.fb)(n, i, o, c, l, y, A), t._hd_path_parse = (n, i, o, c, l, y) => (t._hd_path_parse = S.gb)(n, i, o, c, l, y), t._hd_ed25519_sign = (n, i, o, c, l) => (t._hd_ed25519_sign = S.hb)(n, i, o, c, l), t._hd_ed25519_verify = (n, i, o, c, l, y) => (t._hd_ed25519_verify = S.ib)(n, i, o, c, l, y), t._hd_ed25519_pubkey_from_seed = (n, i, o) => (t._hd_ed25519_pubkey_from_seed = S.jb)(n, i, o), t._hd_slip10_ed25519_derive_path = (n, i, o, c, l) => (t._hd_slip10_ed25519_derive_path = S.kb)(n, i, o, c, l), t._hd_x25519_pubkey = (n, i, o) => (t._hd_x25519_pubkey = S.lb)(n, i, o), t._hd_ecdh_x25519 = (n, i, o, c) => (t._hd_ecdh_x25519 = S.mb)(n, i, o, c), t._hd_ecdh = (n, i, o, c, l, y, A) => (t._hd_ecdh = S.nb)(n, i, o, c, l, y, A), t._hd_ossl_hkdf_sha256 = (n, i, o, c, l, y, A, O) => (t._hd_ossl_hkdf_sha256 = S.ob)(n, i, o, c, l, y, A, O), t._hd_ossl_aes_gcm_encrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_ossl_aes_gcm_encrypt = S.pb)(n, i, o, c, l, y, A, O, x, H), t._hd_ossl_aes_gcm_decrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_ossl_aes_gcm_decrypt = S.qb)(n, i, o, c, l, y, A, O, x, H), t._hd_ossl_aes_ctr_encrypt = (n, i, o, c, l, y, A) => (t._hd_ossl_aes_ctr_encrypt = S.rb)(n, i, o, c, l, y, A), t._hd_ossl_aes_ctr_decrypt = (n, i, o, c, l, y, A) => (t._hd_ossl_aes_ctr_decrypt = S.sb)(n, i, o, c, l, y, A), t._hd_ecies_encrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_ecies_encrypt = S.tb)(n, i, o, c, l, y, A, O, x), t._hd_ecies_decrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_ecies_decrypt = S.ub)(n, i, o, c, l, y, A, O, x), t._hd_ecies_overhead = (n) => (t._hd_ecies_overhead = S.vb)(n), t._hd_aes_ctr_encrypt = (n, i, o, c, l, y, A, O) => (t._hd_aes_ctr_encrypt = S.wb)(n, i, o, c, l, y, A, O), t._hd_aes_ctr_decrypt = (n, i, o, c, l, y, A, O) => (t._hd_aes_ctr_decrypt = S.xb)(n, i, o, c, l, y, A, O), t._hd_x509_generate_private_key = (n, i, o) => (t._hd_x509_generate_private_key = S.yb)(n, i, o), t._hd_x509_export_private_key_pem = (n, i, o, c, l) => (t._hd_x509_export_private_key_pem = S.zb)(n, i, o, c, l), t._hd_x509_import_private_key_pem = (n, i, o, c) => (t._hd_x509_import_private_key_pem = S.Ab)(n, i, o, c), t._hd_x509_create_self_signed = (n, i, o, c, l, y, A) => (t._hd_x509_create_self_signed = S.Bb)(n, i, o, c, l, y, A), t._hd_x509_issue_certificate = (n, i, o, c, l, y, A, O, x, H, G, se, q) => (t._hd_x509_issue_certificate = S.Cb)(n, i, o, c, l, y, A, O, x, H, G, se, q), t._hd_x509_convert_certificate = (n, i, o, c, l, y) => (t._hd_x509_convert_certificate = S.Db)(n, i, o, c, l, y), t._hd_x509_parse_certificate_json = (n, i, o, c, l) => (t._hd_x509_parse_certificate_json = S.Eb)(n, i, o, c, l), t._hd_x509_verify_wallet_attestation = (n, i, o) => (t._hd_x509_verify_wallet_attestation = S.Fb)(n, i, o), t._hd_x509_export_pkcs12 = (n, i, o, c, l, y, A, O, x, H, G, se) => (t._hd_x509_export_pkcs12 = S.Gb)(n, i, o, c, l, y, A, O, x, H, G, se), t._hd_x509_import_pkcs12_json = (n, i, o, c, l) => (t._hd_x509_import_pkcs12_json = S.Hb)(n, i, o, c, l), t._hd_wasi_has_feature = (n) => (t._hd_wasi_has_feature = S.Ib)(n), t._hd_wasi_get_warning = (n) => (t._hd_wasi_get_warning = S.Jb)(n), t._hd_inject_entropy = (n, i) => (t._hd_inject_entropy = S.Kb)(n, i), t._hd_get_entropy_status = () => (t._hd_get_entropy_status = S.Lb)(), t._hd_get_version = () => (t._hd_get_version = S.Mb)(), t._hd_is_fips_mode = () => (t._hd_is_fips_mode = S.Nb)(), t._hd_get_version_string = () => (t._hd_get_version_string = S.Ob)(), t._hd_has_cryptopp = () => (t._hd_has_cryptopp = S.Pb)(), t._hd_aligned_derive_batch = (n, i, o) => (t._hd_aligned_derive_batch = S.Qb)(n, i, o), t._hd_aligned_sign_batch = (n, i, o, c, l) => (t._hd_aligned_sign_batch = S.Rb)(n, i, o, c, l), t._hd_aligned_verify_batch = (n, i, o, c, l) => (t._hd_aligned_verify_batch = S.Sb)(n, i, o, c, l), t._hd_aligned_stream_create = (n) => (t._hd_aligned_stream_create = S.Tb)(n), t._hd_aligned_stream_next = (n, i, o) => (t._hd_aligned_stream_next = S.Ub)(n, i, o), t._hd_aligned_stream_status = (n, i) => (t._hd_aligned_stream_status = S.Vb)(n, i), t._hd_aligned_stream_destroy = (n) => (t._hd_aligned_stream_destroy = S.Wb)(n), t._hd_aligned_from_extended_key = (n, i) => (t._hd_aligned_from_extended_key = S.Xb)(n, i), t._hd_aligned_to_extended_key = (n) => (t._hd_aligned_to_extended_key = S.Yb)(n), t._hd_aligned_derived_key_entry_size = () => (t._hd_aligned_derived_key_entry_size = S.Zb)(), t._hd_aligned_signature_entry_size = () => (t._hd_aligned_signature_entry_size = S._b)(), t._hd_aligned_extended_key_data_size = () => (t._hd_aligned_extended_key_data_size = S.$b)(), t._hd_aligned_batch_derive_request_size = () => (t._hd_aligned_batch_derive_request_size = S.ac)(), t._hd_hash_sha256 = (n, i, o, c) => (t._hd_hash_sha256 = S.bc)(n, i, o, c), t._hd_hash_sha512 = (n, i, o, c) => (t._hd_hash_sha512 = S.cc)(n, i, o, c), t._hd_hash_keccak256 = (n, i, o, c) => (t._hd_hash_keccak256 = S.dc)(n, i, o, c), t._hd_hash_ripemd160 = (n, i, o, c) => (t._hd_hash_ripemd160 = S.ec)(n, i, o, c), t._hd_hash_hash160 = (n, i, o, c) => (t._hd_hash_hash160 = S.fc)(n, i, o, c), t._hd_hash_blake2b = (n, i, o, c, l) => (t._hd_hash_blake2b = S.gc)(n, i, o, c, l), t._hd_hash_blake2s = (n, i, o, c, l) => (t._hd_hash_blake2s = S.hc)(n, i, o, c, l), t._hd_kdf_hkdf = (n, i, o, c, l, y, A, O) => (t._hd_kdf_hkdf = S.ic)(n, i, o, c, l, y, A, O), t._hd_kdf_pbkdf2 = (n, i, o, c, l, y, A) => (t._hd_kdf_pbkdf2 = S.jc)(n, i, o, c, l, y, A), t._hd_kdf_scrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_kdf_scrypt = S.kc)(n, i, o, c, l, y, A, O, x), t._hd_curve_pubkey_from_privkey = (n, i, o, c) => (t._hd_curve_pubkey_from_privkey = S.lc)(n, i, o, c), t._hd_secp256k1_sign = (n, i, o, c, l) => (t._hd_secp256k1_sign = S.mc)(n, i, o, c, l), t._hd_secp256k1_verify = (n, i, o, c, l, y) => (t._hd_secp256k1_verify = S.nc)(n, i, o, c, l, y), t._hd_secp256k1_sign_recoverable = (n, i, o, c) => (t._hd_secp256k1_sign_recoverable = S.oc)(n, i, o, c), t._hd_secp256k1_recover = (n, i, o, c) => (t._hd_secp256k1_recover = S.pc)(n, i, o, c), t._hd_curve_decompress_pubkey = (n, i, o, c) => (t._hd_curve_decompress_pubkey = S.qc)(n, i, o, c), t._hd_ecdh_secp256k1 = (n, i, o, c, l) => (t._hd_ecdh_secp256k1 = S.rc)(n, i, o, c, l), t._hd_p256_sign = (n, i, o, c, l) => (t._hd_p256_sign = S.sc)(n, i, o, c, l), t._hd_p256_verify = (n, i, o, c, l) => (t._hd_p256_verify = S.tc)(n, i, o, c, l), t._hd_ecdh_p256 = (n, i, o, c, l) => (t._hd_ecdh_p256 = S.uc)(n, i, o, c, l), t._hd_p384_sign = (n, i, o, c, l) => (t._hd_p384_sign = S.vc)(n, i, o, c, l), t._hd_p384_verify = (n, i, o, c, l) => (t._hd_p384_verify = S.wc)(n, i, o, c, l), t._hd_ecdh_p384 = (n, i, o, c, l) => (t._hd_ecdh_p384 = S.xc)(n, i, o, c, l), t._hd_aes_gcm_encrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_aes_gcm_encrypt = S.yc)(n, i, o, c, l, y, A, O, x, H), t._hd_aes_gcm_decrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_aes_gcm_decrypt = S.zc)(n, i, o, c, l, y, A, O, x, H), t._hd_sdn_derive_password_identity = (n, i, o, c, l, y, A, O, x) => (t._hd_sdn_derive_password_identity = S.Ac)(n, i, o, c, l, y, A, O, x), t._hd_sdn_derive_legacy_password_identity = (n, i, o, c, l, y, A, O, x) => (t._hd_sdn_derive_legacy_password_identity = S.Bc)(n, i, o, c, l, y, A, O, x), t._hd_sdn_import_legacy_mnemonic_identity = (n, i, o, c, l, y, A) => (t._hd_sdn_import_legacy_mnemonic_identity = S.Cc)(n, i, o, c, l, y, A), t._hd_sdn_import_remembered_identity = (n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me) => (t._hd_sdn_import_remembered_identity = S.Dc)(n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me), t._hd_sdn_sign_login_v1 = (n, i, o, c, l, y) => (t._hd_sdn_sign_login_v1 = S.Ec)(n, i, o, c, l, y), t._hd_sdn_sign_login_v2 = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_login_v2 = S.Fc)(n, i, o, c, l, y, A), t._hd_sdn_sign_publish_request = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_publish_request = S.Gc)(n, i, o, c, l, y, A), t._hd_sdn_sign_module_delivery_key = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_module_delivery_key = S.Hc)(n, i, o, c, l, y, A), t._hd_sdn_sign_asset_review_authority_activation = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_asset_review_authority_activation = S.Ic)(n, i, o, c, l, y, A), t._hd_sdn_sign_asset_review_decision = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_asset_review_decision = S.Jc)(n, i, o, c, l, y, A), t._hd_sdn_seal_remembered_identity = (n, i, o, c, l, y, A, O, x, H, G, se, q, X) => (t._hd_sdn_seal_remembered_identity = S.Kc)(n, i, o, c, l, y, A, O, x, H, G, se, q, X), t._hd_sdn_destroy_identity = (n) => (t._hd_sdn_destroy_identity = S.Lc)(n), t._plugin_get_manifest_flatbuffer = () => (t._plugin_get_manifest_flatbuffer = S.Mc)(), t._plugin_get_manifest_flatbuffer_size = () => (t._plugin_get_manifest_flatbuffer_size = S.Nc)(), t._hd_btc_tx_create = () => (t._hd_btc_tx_create = S.Oc)(), t._hd_btc_tx_create_v = (n) => (t._hd_btc_tx_create_v = S.Pc)(n), t._hd_btc_tx_add_input = (n, i, o, c, l, y, A) => (t._hd_btc_tx_add_input = S.Qc)(n, i, o, c, l, y, A), t._hd_btc_tx_add_output = (n, i, o, c) => (t._hd_btc_tx_add_output = S.Rc)(n, i, o, c), t._hd_btc_tx_add_p2pkh_output = (n, i, o) => (t._hd_btc_tx_add_p2pkh_output = S.Sc)(n, i, o), t._hd_btc_tx_add_p2wpkh_output = (n, i, o) => (t._hd_btc_tx_add_p2wpkh_output = S.Tc)(n, i, o), t._hd_btc_tx_sign = (n, i, o) => (t._hd_btc_tx_sign = S.Uc)(n, i, o), t._hd_btc_tx_sign_input = (n, i, o, c) => (t._hd_btc_tx_sign_input = S.Vc)(n, i, o, c), t._hd_btc_tx_serialize = (n, i, o, c) => (t._hd_btc_tx_serialize = S.Wc)(n, i, o, c), t._hd_btc_tx_get_txid = (n, i) => (t._hd_btc_tx_get_txid = S.Xc)(n, i), t._hd_btc_tx_get_txid_hex = (n, i, o) => (t._hd_btc_tx_get_txid_hex = S.Yc)(n, i, o), t._hd_btc_tx_get_size = (n) => (t._hd_btc_tx_get_size = S.Zc)(n), t._hd_btc_tx_get_vsize = (n) => (t._hd_btc_tx_get_vsize = S._c)(n), t._hd_btc_tx_get_weight = (n) => (t._hd_btc_tx_get_weight = S.$c)(n), t._hd_btc_tx_get_fee = (n) => (t._hd_btc_tx_get_fee = S.ad)(n), t._hd_btc_tx_validate = (n) => (t._hd_btc_tx_validate = S.bd)(n), t._hd_btc_tx_destroy = (n) => (t._hd_btc_tx_destroy = S.cd)(n), t._hd_btc_tx_parse = (n, i) => (t._hd_btc_tx_parse = S.dd)(n, i), t._hd_btc_tx_parse_hex = (n) => (t._hd_btc_tx_parse_hex = S.ed)(n), t._hd_eth_tx_create = (n) => (t._hd_eth_tx_create = S.fd)(n), t._hd_eth_tx_create_eip1559 = (n, i, o) => (t._hd_eth_tx_create_eip1559 = S.gd)(n, i, o), t._hd_eth_tx_set_nonce = (n, i) => (t._hd_eth_tx_set_nonce = S.hd)(n, i), t._hd_eth_tx_set_gas_price = (n, i) => (t._hd_eth_tx_set_gas_price = S.id)(n, i), t._hd_eth_tx_set_gas_limit = (n, i) => (t._hd_eth_tx_set_gas_limit = S.jd)(n, i), t._hd_eth_tx_set_to = (n, i) => (t._hd_eth_tx_set_to = S.kd)(n, i), t._hd_eth_tx_set_to_hex = (n, i) => (t._hd_eth_tx_set_to_hex = S.ld)(n, i), t._hd_eth_tx_set_value = (n, i) => (t._hd_eth_tx_set_value = S.md)(n, i), t._hd_eth_tx_set_value_256 = (n, i) => (t._hd_eth_tx_set_value_256 = S.nd)(n, i), t._hd_eth_tx_set_data = (n, i, o) => (t._hd_eth_tx_set_data = S.od)(n, i, o), t._hd_eth_tx_sign = (n, i) => (t._hd_eth_tx_sign = S.pd)(n, i), t._hd_eth_tx_serialize = (n, i, o, c) => (t._hd_eth_tx_serialize = S.qd)(n, i, o, c), t._hd_eth_tx_get_hash = (n, i) => (t._hd_eth_tx_get_hash = S.rd)(n, i), t._hd_eth_tx_get_hash_hex = (n, i, o) => (t._hd_eth_tx_get_hash_hex = S.sd)(n, i, o), t._hd_eth_tx_get_sender = (n, i) => (t._hd_eth_tx_get_sender = S.td)(n, i), t._hd_eth_tx_get_size = (n) => (t._hd_eth_tx_get_size = S.ud)(n), t._hd_eth_tx_get_max_fee = (n) => (t._hd_eth_tx_get_max_fee = S.vd)(n), t._hd_eth_tx_validate = (n) => (t._hd_eth_tx_validate = S.wd)(n), t._hd_eth_tx_destroy = (n) => (t._hd_eth_tx_destroy = S.xd)(n), t._hd_eth_tx_parse = (n, i) => (t._hd_eth_tx_parse = S.yd)(n, i), t._hd_eth_tx_parse_hex = (n) => (t._hd_eth_tx_parse_hex = S.zd)(n), t._hd_coin_address_from_pubkey = (n, i, o, c, l, y) => (t._hd_coin_address_from_pubkey = S.Ad)(n, i, o, c, l, y), t._hd_coin_validate_address = (n, i, o) => (t._hd_coin_validate_address = S.Bd)(n, i, o), t._hd_coin_sign_message = (n, i, o, c, l, y) => (t._hd_coin_sign_message = S.Cd)(n, i, o, c, l, y), t._hd_coin_verify_message = (n, i, o, c, l, y, A) => (t._hd_coin_verify_message = S.Dd)(n, i, o, c, l, y, A), t._hd_base58_encode = (n, i, o, c) => (t._hd_base58_encode = S.Ed)(n, i, o, c), t._hd_base58_decode = (n, i, o) => (t._hd_base58_decode = S.Fd)(n, i, o), t._hd_base58check_encode = (n, i, o, c) => (t._hd_base58check_encode = S.Gd)(n, i, o, c), t._hd_base58check_decode = (n, i, o) => (t._hd_base58check_decode = S.Hd)(n, i, o), t._hd_bech32_encode = (n, i, o, c, l, y) => (t._hd_bech32_encode = S.Id)(n, i, o, c, l, y), t._hd_bech32_decode = (n, i, o, c, l) => (t._hd_bech32_decode = S.Jd)(n, i, o, c, l), t._hd_btc_p2pkh_address = (n, i, o, c, l) => (t._hd_btc_p2pkh_address = S.Kd)(n, i, o, c, l), t._hd_btc_p2sh_address = (n, i, o, c, l) => (t._hd_btc_p2sh_address = S.Ld)(n, i, o, c, l), t._hd_btc_p2wpkh_address = (n, i, o, c, l) => (t._hd_btc_p2wpkh_address = S.Md)(n, i, o, c, l), t._hd_btc_p2wsh_address = (n, i, o, c, l) => (t._hd_btc_p2wsh_address = S.Nd)(n, i, o, c, l), t._hd_btc_p2tr_address = (n, i, o, c, l) => (t._hd_btc_p2tr_address = S.Od)(n, i, o, c, l), t._hd_btc_validate_address = (n, i) => (t._hd_btc_validate_address = S.Pd)(n, i), t._hd_btc_detect_address_type = (n, i) => (t._hd_btc_detect_address_type = S.Qd)(n, i), t._hd_btc_decode_address = (n, i, o, c, l) => (t._hd_btc_decode_address = S.Rd)(n, i, o, c, l), t._hd_btc_sign_message = (n, i, o, c, l) => (t._hd_btc_sign_message = S.Sd)(n, i, o, c, l), t._hd_btc_verify_message = (n, i, o, c, l) => (t._hd_btc_verify_message = S.Td)(n, i, o, c, l), t._hd_btc_to_wif = (n, i, o, c, l) => (t._hd_btc_to_wif = S.Ud)(n, i, o, c, l), t._hd_btc_from_wif = (n, i, o) => (t._hd_btc_from_wif = S.Vd)(n, i, o), t._hd_eth_address = (n, i, o, c) => (t._hd_eth_address = S.Wd)(n, i, o, c), t._hd_eth_validate_address = (n) => (t._hd_eth_validate_address = S.Xd)(n), t._hd_eth_checksum_address = (n, i, o) => (t._hd_eth_checksum_address = S.Yd)(n, i, o), t._hd_eth_verify_checksum = (n) => (t._hd_eth_verify_checksum = S.Zd)(n), t._hd_eth_sign_message = (n, i, o, c, l) => (t._hd_eth_sign_message = S._d)(n, i, o, c, l), t._hd_eth_verify_message = (n, i, o, c, l) => (t._hd_eth_verify_message = S.$d)(n, i, o, c, l), t._hd_eth_recover_address = (n, i, o, c, l, y) => (t._hd_eth_recover_address = S.ae)(n, i, o, c, l, y), t._hd_eth_hash_message = (n, i, o) => (t._hd_eth_hash_message = S.be)(n, i, o), t._hd_eth_sign_typed_data = (n, i, o, c, l, y, A, O) => (t._hd_eth_sign_typed_data = S.ce)(n, i, o, c, l, y, A, O), t._hd_sol_address = (n, i, o, c) => (t._hd_sol_address = S.de)(n, i, o, c), t._hd_sol_validate_address = (n) => (t._hd_sol_validate_address = S.ee)(n), t._hd_sol_address_to_pubkey = (n, i, o) => (t._hd_sol_address_to_pubkey = S.fe)(n, i, o), t._hd_sol_sign_message = (n, i, o, c, l) => (t._hd_sol_sign_message = S.ge)(n, i, o, c, l), t._hd_sol_verify_message = (n, i, o, c, l, y) => (t._hd_sol_verify_message = S.he)(n, i, o, c, l, y), t._hd_sol_derive_pubkey = (n, i, o) => (t._hd_sol_derive_pubkey = S.ie)(n, i, o), t._hd_sol_find_pda = (n, i, o, c, l, y, A, O) => (t._hd_sol_find_pda = S.je)(n, i, o, c, l, y, A, O), t._hd_sol_get_associated_token_address = (n, i, o, c) => (t._hd_sol_get_associated_token_address = S.ke)(n, i, o, c), t._hd_cosmos_address = (n, i, o, c, l) => (t._hd_cosmos_address = S.le)(n, i, o, c, l), t._hd_cosmos_validate_address = (n, i) => (t._hd_cosmos_validate_address = S.me)(n, i), t._hd_cosmos_convert_prefix = (n, i, o, c) => (t._hd_cosmos_convert_prefix = S.ne)(n, i, o, c), t._hd_cosmos_sign_amino = (n, i, o, c, l) => (t._hd_cosmos_sign_amino = S.oe)(n, i, o, c, l), t._hd_cosmos_sign_direct = (n, i, o, c, l) => (t._hd_cosmos_sign_direct = S.pe)(n, i, o, c, l), t._hd_cosmos_verify_signature = (n, i, o, c, l, y) => (t._hd_cosmos_verify_signature = S.qe)(n, i, o, c, l, y), t._hd_cosmos_sign_arbitrary = (n, i, o, c, l, y) => (t._hd_cosmos_sign_arbitrary = S.re)(n, i, o, c, l, y), t._hd_dot_address = (n, i, o, c, l) => (t._hd_dot_address = S.se)(n, i, o, c, l), t._hd_dot_validate_address = (n, i) => (t._hd_dot_validate_address = S.te)(n, i), t._hd_dot_decode_address = (n, i, o, c) => (t._hd_dot_decode_address = S.ue)(n, i, o, c), t._hd_dot_convert_prefix = (n, i, o, c) => (t._hd_dot_convert_prefix = S.ve)(n, i, o, c), t._hd_dot_sign_message = (n, i, o, c, l) => (t._hd_dot_sign_message = S.we)(n, i, o, c, l), t._hd_dot_verify_message = (n, i, o, c, l, y) => (t._hd_dot_verify_message = S.xe)(n, i, o, c, l, y), t._hd_dot_sign_extrinsic = (n, i, o, c, l) => (t._hd_dot_sign_extrinsic = S.ye)(n, i, o, c, l), t._hd_dot_derive_pubkey = (n, i, o) => (t._hd_dot_derive_pubkey = S.ze)(n, i, o), t._hd_libp2p_peer_id = (n, i, o, c, l) => (t._hd_libp2p_peer_id = S.Ae)(n, i, o, c, l), t._hd_libp2p_peer_id_string = (n, i, o, c, l) => (t._hd_libp2p_peer_id_string = S.Be)(n, i, o, c, l), t._hd_libp2p_ipns_hash = (n, i, o, c, l) => (t._hd_libp2p_ipns_hash = S.Ce)(n, i, o, c, l), t._hd_libp2p_ipns_hash_base32 = (n, i, o, c, l) => (t._hd_libp2p_ipns_hash_base32 = S.De)(n, i, o, c, l), t._hd_encode_base32lower = (n, i, o, c) => (t._hd_encode_base32lower = S.Ee)(n, i, o, c), t._hd_encode_base36lower = (n, i, o, c) => (t._hd_encode_base36lower = S.Fe)(n, i, o, c), t._hd_openssl_get_error = () => (t._hd_openssl_get_error = S.Ge)(), t._hd_openssl_init_fips = () => (t._hd_openssl_init_fips = S.He)(), t._hd_openssl_init_default = () => (t._hd_openssl_init_default = S.Ie)(), t._hd_openssl_cleanup = () => (t._hd_openssl_cleanup = S.Je)(), t._hd_openssl_is_fips = () => (t._hd_openssl_is_fips = S.Ke)(), t._hd_ossl_sha256 = (n, i, o) => (t._hd_ossl_sha256 = S.Le)(n, i, o), t._hd_ossl_sha384 = (n, i, o) => (t._hd_ossl_sha384 = S.Me)(n, i, o), t._hd_ossl_sha512 = (n, i, o) => (t._hd_ossl_sha512 = S.Ne)(n, i, o), t._hd_ossl_hmac_sha256 = (n, i, o, c, l) => (t._hd_ossl_hmac_sha256 = S.Oe)(n, i, o, c, l), t._hd_ossl_hmac_sha512 = (n, i, o, c, l) => (t._hd_ossl_hmac_sha512 = S.Pe)(n, i, o, c, l), t._hd_ossl_hkdf_sha384 = (n, i, o, c, l, y, A, O) => (t._hd_ossl_hkdf_sha384 = S.Qe)(n, i, o, c, l, y, A, O), t._hd_ossl_pbkdf2_sha512 = (n, i, o, c, l, y, A) => (t._hd_ossl_pbkdf2_sha512 = S.Re)(n, i, o, c, l, y, A), t._hd_ossl_ecdsa_sign = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdsa_sign = S.Se)(n, i, o, c, l, y, A), t._hd_ossl_ecdsa_verify = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdsa_verify = S.Te)(n, i, o, c, l, y, A), t._hd_ossl_ec_pubkey_from_privkey = (n, i, o, c, l) => (t._hd_ossl_ec_pubkey_from_privkey = S.Ue)(n, i, o, c, l), t._hd_ossl_ecdh_keygen = (n, i, o) => (t._hd_ossl_ecdh_keygen = S.Ve)(n, i, o), t._hd_ossl_ecdh_compute = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdh_compute = S.We)(n, i, o, c, l, y, A);
12307
- var Hi = () => (Hi = S.Xe)(), ye = (n, i) => (ye = S.Ye)(n, i), pr = (n) => (pr = S.Ze)(n), ge = () => (ge = S._e)(), ve = (n) => (ve = S.$e)(n), xn = (n) => (xn = S.af)(n), zi = (n) => (zi = S.bf)(n), $i = (n) => ($i = S.cf)(n), Wi = (n, i, o) => (Wi = S.df)(n, i, o), ji = (n) => (ji = S.ef)(n);
12308
- function La(n, i, o) {
12309
+ } } }), p.FSNode = Bi, p.createPreloadedFile = Ks, p.staticInit();
12310
+ var La = { p: Ot, r: Zt, a: jr, g: fe, n: Te, k: nt, ca: $e, o: Pt, R: dr, d: lr, T: Gs, qa: Xs, ia: Js, sa: Qs, oa: Zs, na: ea, U: ta, pa: ra, ta: ia, ja: aa, ha: ca, A: la, M: da, V: Ti, ga: ua, la: ya, ma: ga, I: va, S: Ea, ka: Aa, ra: Ia, P: Ya, N: yc, Q: Ec, v: za, c: Ca, e: Va, i: xa, q: Ua, j: Fa, y: qa, B: Xa, O: Ja, E: ja, K: Ka, xa: Za, H: Ac, $: ic, da: vc, Y: _c, D: nc, s: sc, ea: gc, ba: ec, L: bc, m: $a, f: Da, b: Ta, h: Ma, l: Ba, w: Wa, F: Ha, x: Ga, wa: rc, aa: tc, z: Qa, J: uc, G: mc, Z: dc, u: lc, _: oc, C: ac, X: fc, va: cc, ua: hc, W: pc, t: wa, fa: Pa }, S = Ht(), Vi = t._malloc = (n) => (Vi = t._malloc = S.Ba)(n);
12311
+ t._free = (n) => (t._free = S.Ca)(n), t._hd_secure_wipe = (n, i) => (t._hd_secure_wipe = S.Da)(n, i), t._hd_alloc = (n) => (t._hd_alloc = S.Ea)(n), t._hd_dealloc = (n) => (t._hd_dealloc = S.Fa)(n), t._hd_mnemonic_generate = (n, i, o, c) => (t._hd_mnemonic_generate = S.Ga)(n, i, o, c), t._hd_mnemonic_validate = (n, i) => (t._hd_mnemonic_validate = S.Ha)(n, i), t._hd_mnemonic_to_seed = (n, i, o, c) => (t._hd_mnemonic_to_seed = S.Ia)(n, i, o, c), t._hd_mnemonic_to_entropy = (n, i, o, c) => (t._hd_mnemonic_to_entropy = S.Ja)(n, i, o, c), t._hd_entropy_to_mnemonic = (n, i, o, c, l) => (t._hd_entropy_to_mnemonic = S.Ka)(n, i, o, c, l), t._hd_mnemonic_get_wordlist = (n) => (t._hd_mnemonic_get_wordlist = S.La)(n), t._hd_mnemonic_suggest_word = (n, i, o, c, l) => (t._hd_mnemonic_suggest_word = S.Ma)(n, i, o, c, l), t._hd_mnemonic_check_word = (n, i) => (t._hd_mnemonic_check_word = S.Na)(n, i), t._hd_key_from_seed = (n, i, o) => (t._hd_key_from_seed = S.Oa)(n, i, o), t._hd_key_from_xprv = (n) => (t._hd_key_from_xprv = S.Pa)(n), t._hd_key_from_xpub = (n) => (t._hd_key_from_xpub = S.Qa)(n), t._hd_key_derive_path = (n, i) => (t._hd_key_derive_path = S.Ra)(n, i), t._hd_key_derive_child = (n, i) => (t._hd_key_derive_child = S.Sa)(n, i), t._hd_key_derive_hardened = (n, i) => (t._hd_key_derive_hardened = S.Ta)(n, i), t._hd_key_get_private = (n, i, o) => (t._hd_key_get_private = S.Ua)(n, i, o), t._hd_key_get_public = (n, i, o) => (t._hd_key_get_public = S.Va)(n, i, o), t._hd_key_get_chain_code = (n, i, o) => (t._hd_key_get_chain_code = S.Wa)(n, i, o), t._hd_key_get_fingerprint = (n) => (t._hd_key_get_fingerprint = S.Xa)(n), t._hd_key_get_parent_fingerprint = (n) => (t._hd_key_get_parent_fingerprint = S.Ya)(n), t._hd_key_get_depth = (n) => (t._hd_key_get_depth = S.Za)(n), t._hd_key_get_child_index = (n) => (t._hd_key_get_child_index = S._a)(n), t._hd_key_serialize_xprv = (n, i, o) => (t._hd_key_serialize_xprv = S.$a)(n, i, o), t._hd_key_serialize_xpub = (n, i, o) => (t._hd_key_serialize_xpub = S.ab)(n, i, o), t._hd_key_neutered = (n) => (t._hd_key_neutered = S.bb)(n), t._hd_key_is_neutered = (n) => (t._hd_key_is_neutered = S.cb)(n), t._hd_key_wipe = (n) => (t._hd_key_wipe = S.db)(n), t._hd_key_clone = (n) => (t._hd_key_clone = S.eb)(n), t._hd_key_destroy = (n) => (t._hd_key_destroy = S.fb)(n), t._hd_path_build = (n, i, o, c, l, y, A) => (t._hd_path_build = S.gb)(n, i, o, c, l, y, A), t._hd_path_parse = (n, i, o, c, l, y) => (t._hd_path_parse = S.hb)(n, i, o, c, l, y), t._hd_ed25519_sign = (n, i, o, c, l) => (t._hd_ed25519_sign = S.ib)(n, i, o, c, l), t._hd_ed25519_verify = (n, i, o, c, l, y) => (t._hd_ed25519_verify = S.jb)(n, i, o, c, l, y), t._hd_ed25519_pubkey_from_seed = (n, i, o) => (t._hd_ed25519_pubkey_from_seed = S.kb)(n, i, o), t._hd_slip10_ed25519_derive_path = (n, i, o, c, l) => (t._hd_slip10_ed25519_derive_path = S.lb)(n, i, o, c, l), t._hd_x25519_pubkey = (n, i, o) => (t._hd_x25519_pubkey = S.mb)(n, i, o), t._hd_ecdh_x25519 = (n, i, o, c) => (t._hd_ecdh_x25519 = S.nb)(n, i, o, c), t._hd_ecdh = (n, i, o, c, l, y, A) => (t._hd_ecdh = S.ob)(n, i, o, c, l, y, A), t._hd_ossl_hkdf_sha256 = (n, i, o, c, l, y, A, O) => (t._hd_ossl_hkdf_sha256 = S.pb)(n, i, o, c, l, y, A, O), t._hd_ossl_aes_gcm_encrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_ossl_aes_gcm_encrypt = S.qb)(n, i, o, c, l, y, A, O, x, H), t._hd_ossl_aes_gcm_decrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_ossl_aes_gcm_decrypt = S.rb)(n, i, o, c, l, y, A, O, x, H), t._hd_ossl_aes_ctr_encrypt = (n, i, o, c, l, y, A) => (t._hd_ossl_aes_ctr_encrypt = S.sb)(n, i, o, c, l, y, A), t._hd_ossl_aes_ctr_decrypt = (n, i, o, c, l, y, A) => (t._hd_ossl_aes_ctr_decrypt = S.tb)(n, i, o, c, l, y, A), t._hd_ecies_encrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_ecies_encrypt = S.ub)(n, i, o, c, l, y, A, O, x), t._hd_ecies_decrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_ecies_decrypt = S.vb)(n, i, o, c, l, y, A, O, x), t._hd_ecies_overhead = (n) => (t._hd_ecies_overhead = S.wb)(n), t._hd_aes_ctr_encrypt = (n, i, o, c, l, y, A, O) => (t._hd_aes_ctr_encrypt = S.xb)(n, i, o, c, l, y, A, O), t._hd_aes_ctr_decrypt = (n, i, o, c, l, y, A, O) => (t._hd_aes_ctr_decrypt = S.yb)(n, i, o, c, l, y, A, O), t._hd_x509_generate_private_key = (n, i, o) => (t._hd_x509_generate_private_key = S.zb)(n, i, o), t._hd_x509_export_private_key_pem = (n, i, o, c, l) => (t._hd_x509_export_private_key_pem = S.Ab)(n, i, o, c, l), t._hd_x509_import_private_key_pem = (n, i, o, c) => (t._hd_x509_import_private_key_pem = S.Bb)(n, i, o, c), t._hd_x509_create_self_signed = (n, i, o, c, l, y, A) => (t._hd_x509_create_self_signed = S.Cb)(n, i, o, c, l, y, A), t._hd_x509_issue_certificate = (n, i, o, c, l, y, A, O, x, H, G, se, q) => (t._hd_x509_issue_certificate = S.Db)(n, i, o, c, l, y, A, O, x, H, G, se, q), t._hd_x509_convert_certificate = (n, i, o, c, l, y) => (t._hd_x509_convert_certificate = S.Eb)(n, i, o, c, l, y), t._hd_x509_parse_certificate_json = (n, i, o, c, l) => (t._hd_x509_parse_certificate_json = S.Fb)(n, i, o, c, l), t._hd_x509_verify_wallet_attestation = (n, i, o) => (t._hd_x509_verify_wallet_attestation = S.Gb)(n, i, o), t._hd_x509_export_pkcs12 = (n, i, o, c, l, y, A, O, x, H, G, se) => (t._hd_x509_export_pkcs12 = S.Hb)(n, i, o, c, l, y, A, O, x, H, G, se), t._hd_x509_import_pkcs12_json = (n, i, o, c, l) => (t._hd_x509_import_pkcs12_json = S.Ib)(n, i, o, c, l), t._hd_wasi_has_feature = (n) => (t._hd_wasi_has_feature = S.Jb)(n), t._hd_wasi_get_warning = (n) => (t._hd_wasi_get_warning = S.Kb)(n), t._hd_inject_entropy = (n, i) => (t._hd_inject_entropy = S.Lb)(n, i), t._hd_get_entropy_status = () => (t._hd_get_entropy_status = S.Mb)(), t._hd_get_version = () => (t._hd_get_version = S.Nb)(), t._hd_is_fips_mode = () => (t._hd_is_fips_mode = S.Ob)(), t._hd_get_version_string = () => (t._hd_get_version_string = S.Pb)(), t._hd_has_cryptopp = () => (t._hd_has_cryptopp = S.Qb)(), t._hd_aligned_derive_batch = (n, i, o) => (t._hd_aligned_derive_batch = S.Rb)(n, i, o), t._hd_aligned_sign_batch = (n, i, o, c, l) => (t._hd_aligned_sign_batch = S.Sb)(n, i, o, c, l), t._hd_aligned_verify_batch = (n, i, o, c, l) => (t._hd_aligned_verify_batch = S.Tb)(n, i, o, c, l), t._hd_aligned_stream_create = (n) => (t._hd_aligned_stream_create = S.Ub)(n), t._hd_aligned_stream_next = (n, i, o) => (t._hd_aligned_stream_next = S.Vb)(n, i, o), t._hd_aligned_stream_status = (n, i) => (t._hd_aligned_stream_status = S.Wb)(n, i), t._hd_aligned_stream_destroy = (n) => (t._hd_aligned_stream_destroy = S.Xb)(n), t._hd_aligned_from_extended_key = (n, i) => (t._hd_aligned_from_extended_key = S.Yb)(n, i), t._hd_aligned_to_extended_key = (n) => (t._hd_aligned_to_extended_key = S.Zb)(n), t._hd_aligned_derived_key_entry_size = () => (t._hd_aligned_derived_key_entry_size = S._b)(), t._hd_aligned_signature_entry_size = () => (t._hd_aligned_signature_entry_size = S.$b)(), t._hd_aligned_extended_key_data_size = () => (t._hd_aligned_extended_key_data_size = S.ac)(), t._hd_aligned_batch_derive_request_size = () => (t._hd_aligned_batch_derive_request_size = S.bc)(), t._hd_hash_sha256 = (n, i, o, c) => (t._hd_hash_sha256 = S.cc)(n, i, o, c), t._hd_hash_sha512 = (n, i, o, c) => (t._hd_hash_sha512 = S.dc)(n, i, o, c), t._hd_hash_keccak256 = (n, i, o, c) => (t._hd_hash_keccak256 = S.ec)(n, i, o, c), t._hd_hash_ripemd160 = (n, i, o, c) => (t._hd_hash_ripemd160 = S.fc)(n, i, o, c), t._hd_hash_hash160 = (n, i, o, c) => (t._hd_hash_hash160 = S.gc)(n, i, o, c), t._hd_hash_blake2b = (n, i, o, c, l) => (t._hd_hash_blake2b = S.hc)(n, i, o, c, l), t._hd_hash_blake2s = (n, i, o, c, l) => (t._hd_hash_blake2s = S.ic)(n, i, o, c, l), t._hd_kdf_hkdf = (n, i, o, c, l, y, A, O) => (t._hd_kdf_hkdf = S.jc)(n, i, o, c, l, y, A, O), t._hd_kdf_pbkdf2 = (n, i, o, c, l, y, A) => (t._hd_kdf_pbkdf2 = S.kc)(n, i, o, c, l, y, A), t._hd_kdf_scrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_kdf_scrypt = S.lc)(n, i, o, c, l, y, A, O, x), t._hd_curve_pubkey_from_privkey = (n, i, o, c) => (t._hd_curve_pubkey_from_privkey = S.mc)(n, i, o, c), t._hd_secp256k1_sign = (n, i, o, c, l) => (t._hd_secp256k1_sign = S.nc)(n, i, o, c, l), t._hd_secp256k1_verify = (n, i, o, c, l, y) => (t._hd_secp256k1_verify = S.oc)(n, i, o, c, l, y), t._hd_secp256k1_sign_recoverable = (n, i, o, c) => (t._hd_secp256k1_sign_recoverable = S.pc)(n, i, o, c), t._hd_secp256k1_recover = (n, i, o, c) => (t._hd_secp256k1_recover = S.qc)(n, i, o, c), t._hd_curve_decompress_pubkey = (n, i, o, c) => (t._hd_curve_decompress_pubkey = S.rc)(n, i, o, c), t._hd_ecdh_secp256k1 = (n, i, o, c, l) => (t._hd_ecdh_secp256k1 = S.sc)(n, i, o, c, l), t._hd_p256_sign = (n, i, o, c, l) => (t._hd_p256_sign = S.tc)(n, i, o, c, l), t._hd_p256_verify = (n, i, o, c, l) => (t._hd_p256_verify = S.uc)(n, i, o, c, l), t._hd_ecdh_p256 = (n, i, o, c, l) => (t._hd_ecdh_p256 = S.vc)(n, i, o, c, l), t._hd_p384_sign = (n, i, o, c, l) => (t._hd_p384_sign = S.wc)(n, i, o, c, l), t._hd_p384_verify = (n, i, o, c, l) => (t._hd_p384_verify = S.xc)(n, i, o, c, l), t._hd_ecdh_p384 = (n, i, o, c, l) => (t._hd_ecdh_p384 = S.yc)(n, i, o, c, l), t._hd_aes_gcm_encrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_aes_gcm_encrypt = S.zc)(n, i, o, c, l, y, A, O, x, H), t._hd_aes_gcm_decrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_aes_gcm_decrypt = S.Ac)(n, i, o, c, l, y, A, O, x, H), t._hd_sdn_derive_password_identity = (n, i, o, c, l, y, A, O, x) => (t._hd_sdn_derive_password_identity = S.Bc)(n, i, o, c, l, y, A, O, x), t._hd_sdn_derive_legacy_password_identity = (n, i, o, c, l, y, A, O, x) => (t._hd_sdn_derive_legacy_password_identity = S.Cc)(n, i, o, c, l, y, A, O, x), t._hd_sdn_import_legacy_mnemonic_identity = (n, i, o, c, l, y, A) => (t._hd_sdn_import_legacy_mnemonic_identity = S.Dc)(n, i, o, c, l, y, A), t._hd_sdn_import_remembered_identity = (n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me) => (t._hd_sdn_import_remembered_identity = S.Ec)(n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me), t._hd_sdn_sign_login_v1 = (n, i, o, c, l, y) => (t._hd_sdn_sign_login_v1 = S.Fc)(n, i, o, c, l, y), t._hd_sdn_sign_login_v2 = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_login_v2 = S.Gc)(n, i, o, c, l, y, A), t._hd_sdn_sign_publish_request = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_publish_request = S.Hc)(n, i, o, c, l, y, A), t._hd_sdn_sign_module_delivery_key = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_module_delivery_key = S.Ic)(n, i, o, c, l, y, A), t._hd_sdn_sign_asset_review_authority_activation = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_asset_review_authority_activation = S.Jc)(n, i, o, c, l, y, A), t._hd_sdn_sign_asset_review_decision = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_asset_review_decision = S.Kc)(n, i, o, c, l, y, A), t._hd_sdn_seal_remembered_identity = (n, i, o, c, l, y, A, O, x, H, G, se, q, X) => (t._hd_sdn_seal_remembered_identity = S.Lc)(n, i, o, c, l, y, A, O, x, H, G, se, q, X), t._hd_sdn_destroy_identity = (n) => (t._hd_sdn_destroy_identity = S.Mc)(n), t._plugin_get_manifest_flatbuffer = () => (t._plugin_get_manifest_flatbuffer = S.Nc)(), t._plugin_get_manifest_flatbuffer_size = () => (t._plugin_get_manifest_flatbuffer_size = S.Oc)(), t._hd_btc_tx_create = () => (t._hd_btc_tx_create = S.Pc)(), t._hd_btc_tx_create_v = (n) => (t._hd_btc_tx_create_v = S.Qc)(n), t._hd_btc_tx_add_input = (n, i, o, c, l, y, A) => (t._hd_btc_tx_add_input = S.Rc)(n, i, o, c, l, y, A), t._hd_btc_tx_add_output = (n, i, o, c) => (t._hd_btc_tx_add_output = S.Sc)(n, i, o, c), t._hd_btc_tx_add_p2pkh_output = (n, i, o) => (t._hd_btc_tx_add_p2pkh_output = S.Tc)(n, i, o), t._hd_btc_tx_add_p2wpkh_output = (n, i, o) => (t._hd_btc_tx_add_p2wpkh_output = S.Uc)(n, i, o), t._hd_btc_tx_sign = (n, i, o) => (t._hd_btc_tx_sign = S.Vc)(n, i, o), t._hd_btc_tx_sign_input = (n, i, o, c) => (t._hd_btc_tx_sign_input = S.Wc)(n, i, o, c), t._hd_btc_tx_serialize = (n, i, o, c) => (t._hd_btc_tx_serialize = S.Xc)(n, i, o, c), t._hd_btc_tx_get_txid = (n, i) => (t._hd_btc_tx_get_txid = S.Yc)(n, i), t._hd_btc_tx_get_txid_hex = (n, i, o) => (t._hd_btc_tx_get_txid_hex = S.Zc)(n, i, o), t._hd_btc_tx_get_size = (n) => (t._hd_btc_tx_get_size = S._c)(n), t._hd_btc_tx_get_vsize = (n) => (t._hd_btc_tx_get_vsize = S.$c)(n), t._hd_btc_tx_get_weight = (n) => (t._hd_btc_tx_get_weight = S.ad)(n), t._hd_btc_tx_get_fee = (n) => (t._hd_btc_tx_get_fee = S.bd)(n), t._hd_btc_tx_validate = (n) => (t._hd_btc_tx_validate = S.cd)(n), t._hd_btc_tx_destroy = (n) => (t._hd_btc_tx_destroy = S.dd)(n), t._hd_btc_tx_parse = (n, i) => (t._hd_btc_tx_parse = S.ed)(n, i), t._hd_btc_tx_parse_hex = (n) => (t._hd_btc_tx_parse_hex = S.fd)(n), t._hd_eth_tx_create = (n) => (t._hd_eth_tx_create = S.gd)(n), t._hd_eth_tx_create_eip1559 = (n, i, o) => (t._hd_eth_tx_create_eip1559 = S.hd)(n, i, o), t._hd_eth_tx_set_nonce = (n, i) => (t._hd_eth_tx_set_nonce = S.id)(n, i), t._hd_eth_tx_set_gas_price = (n, i) => (t._hd_eth_tx_set_gas_price = S.jd)(n, i), t._hd_eth_tx_set_gas_limit = (n, i) => (t._hd_eth_tx_set_gas_limit = S.kd)(n, i), t._hd_eth_tx_set_to = (n, i) => (t._hd_eth_tx_set_to = S.ld)(n, i), t._hd_eth_tx_set_to_hex = (n, i) => (t._hd_eth_tx_set_to_hex = S.md)(n, i), t._hd_eth_tx_set_value = (n, i) => (t._hd_eth_tx_set_value = S.nd)(n, i), t._hd_eth_tx_set_value_256 = (n, i) => (t._hd_eth_tx_set_value_256 = S.od)(n, i), t._hd_eth_tx_set_data = (n, i, o) => (t._hd_eth_tx_set_data = S.pd)(n, i, o), t._hd_eth_tx_sign = (n, i) => (t._hd_eth_tx_sign = S.qd)(n, i), t._hd_eth_tx_serialize = (n, i, o, c) => (t._hd_eth_tx_serialize = S.rd)(n, i, o, c), t._hd_eth_tx_get_hash = (n, i) => (t._hd_eth_tx_get_hash = S.sd)(n, i), t._hd_eth_tx_get_hash_hex = (n, i, o) => (t._hd_eth_tx_get_hash_hex = S.td)(n, i, o), t._hd_eth_tx_get_sender = (n, i) => (t._hd_eth_tx_get_sender = S.ud)(n, i), t._hd_eth_tx_get_size = (n) => (t._hd_eth_tx_get_size = S.vd)(n), t._hd_eth_tx_get_max_fee = (n) => (t._hd_eth_tx_get_max_fee = S.wd)(n), t._hd_eth_tx_validate = (n) => (t._hd_eth_tx_validate = S.xd)(n), t._hd_eth_tx_destroy = (n) => (t._hd_eth_tx_destroy = S.yd)(n), t._hd_eth_tx_parse = (n, i) => (t._hd_eth_tx_parse = S.zd)(n, i), t._hd_eth_tx_parse_hex = (n) => (t._hd_eth_tx_parse_hex = S.Ad)(n), t._hd_coin_address_from_pubkey = (n, i, o, c, l, y) => (t._hd_coin_address_from_pubkey = S.Bd)(n, i, o, c, l, y), t._hd_coin_validate_address = (n, i, o) => (t._hd_coin_validate_address = S.Cd)(n, i, o), t._hd_coin_sign_message = (n, i, o, c, l, y) => (t._hd_coin_sign_message = S.Dd)(n, i, o, c, l, y), t._hd_coin_verify_message = (n, i, o, c, l, y, A) => (t._hd_coin_verify_message = S.Ed)(n, i, o, c, l, y, A), t._hd_base58_encode = (n, i, o, c) => (t._hd_base58_encode = S.Fd)(n, i, o, c), t._hd_base58_decode = (n, i, o) => (t._hd_base58_decode = S.Gd)(n, i, o), t._hd_base58check_encode = (n, i, o, c) => (t._hd_base58check_encode = S.Hd)(n, i, o, c), t._hd_base58check_decode = (n, i, o) => (t._hd_base58check_decode = S.Id)(n, i, o), t._hd_bech32_encode = (n, i, o, c, l, y) => (t._hd_bech32_encode = S.Jd)(n, i, o, c, l, y), t._hd_bech32_decode = (n, i, o, c, l) => (t._hd_bech32_decode = S.Kd)(n, i, o, c, l), t._hd_btc_p2pkh_address = (n, i, o, c, l) => (t._hd_btc_p2pkh_address = S.Ld)(n, i, o, c, l), t._hd_btc_p2sh_address = (n, i, o, c, l) => (t._hd_btc_p2sh_address = S.Md)(n, i, o, c, l), t._hd_btc_p2wpkh_address = (n, i, o, c, l) => (t._hd_btc_p2wpkh_address = S.Nd)(n, i, o, c, l), t._hd_btc_p2wsh_address = (n, i, o, c, l) => (t._hd_btc_p2wsh_address = S.Od)(n, i, o, c, l), t._hd_btc_p2tr_address = (n, i, o, c, l) => (t._hd_btc_p2tr_address = S.Pd)(n, i, o, c, l), t._hd_btc_validate_address = (n, i) => (t._hd_btc_validate_address = S.Qd)(n, i), t._hd_btc_detect_address_type = (n, i) => (t._hd_btc_detect_address_type = S.Rd)(n, i), t._hd_btc_decode_address = (n, i, o, c, l) => (t._hd_btc_decode_address = S.Sd)(n, i, o, c, l), t._hd_btc_sign_message = (n, i, o, c, l) => (t._hd_btc_sign_message = S.Td)(n, i, o, c, l), t._hd_btc_verify_message = (n, i, o, c, l) => (t._hd_btc_verify_message = S.Ud)(n, i, o, c, l), t._hd_btc_to_wif = (n, i, o, c, l) => (t._hd_btc_to_wif = S.Vd)(n, i, o, c, l), t._hd_btc_from_wif = (n, i, o) => (t._hd_btc_from_wif = S.Wd)(n, i, o), t._hd_eth_address = (n, i, o, c) => (t._hd_eth_address = S.Xd)(n, i, o, c), t._hd_eth_validate_address = (n) => (t._hd_eth_validate_address = S.Yd)(n), t._hd_eth_checksum_address = (n, i, o) => (t._hd_eth_checksum_address = S.Zd)(n, i, o), t._hd_eth_verify_checksum = (n) => (t._hd_eth_verify_checksum = S._d)(n), t._hd_eth_sign_message = (n, i, o, c, l) => (t._hd_eth_sign_message = S.$d)(n, i, o, c, l), t._hd_eth_verify_message = (n, i, o, c, l) => (t._hd_eth_verify_message = S.ae)(n, i, o, c, l), t._hd_eth_recover_address = (n, i, o, c, l, y) => (t._hd_eth_recover_address = S.be)(n, i, o, c, l, y), t._hd_eth_hash_message = (n, i, o) => (t._hd_eth_hash_message = S.ce)(n, i, o), t._hd_eth_sign_typed_data = (n, i, o, c, l, y, A, O) => (t._hd_eth_sign_typed_data = S.de)(n, i, o, c, l, y, A, O), t._hd_sol_address = (n, i, o, c) => (t._hd_sol_address = S.ee)(n, i, o, c), t._hd_sol_validate_address = (n) => (t._hd_sol_validate_address = S.fe)(n), t._hd_sol_address_to_pubkey = (n, i, o) => (t._hd_sol_address_to_pubkey = S.ge)(n, i, o), t._hd_sol_sign_message = (n, i, o, c, l) => (t._hd_sol_sign_message = S.he)(n, i, o, c, l), t._hd_sol_verify_message = (n, i, o, c, l, y) => (t._hd_sol_verify_message = S.ie)(n, i, o, c, l, y), t._hd_sol_derive_pubkey = (n, i, o) => (t._hd_sol_derive_pubkey = S.je)(n, i, o), t._hd_sol_find_pda = (n, i, o, c, l, y, A, O) => (t._hd_sol_find_pda = S.ke)(n, i, o, c, l, y, A, O), t._hd_sol_get_associated_token_address = (n, i, o, c) => (t._hd_sol_get_associated_token_address = S.le)(n, i, o, c), t._hd_cosmos_address = (n, i, o, c, l) => (t._hd_cosmos_address = S.me)(n, i, o, c, l), t._hd_cosmos_validate_address = (n, i) => (t._hd_cosmos_validate_address = S.ne)(n, i), t._hd_cosmos_convert_prefix = (n, i, o, c) => (t._hd_cosmos_convert_prefix = S.oe)(n, i, o, c), t._hd_cosmos_sign_amino = (n, i, o, c, l) => (t._hd_cosmos_sign_amino = S.pe)(n, i, o, c, l), t._hd_cosmos_sign_direct = (n, i, o, c, l) => (t._hd_cosmos_sign_direct = S.qe)(n, i, o, c, l), t._hd_cosmos_verify_signature = (n, i, o, c, l, y) => (t._hd_cosmos_verify_signature = S.re)(n, i, o, c, l, y), t._hd_cosmos_sign_arbitrary = (n, i, o, c, l, y) => (t._hd_cosmos_sign_arbitrary = S.se)(n, i, o, c, l, y), t._hd_dot_address = (n, i, o, c, l) => (t._hd_dot_address = S.te)(n, i, o, c, l), t._hd_dot_validate_address = (n, i) => (t._hd_dot_validate_address = S.ue)(n, i), t._hd_dot_decode_address = (n, i, o, c) => (t._hd_dot_decode_address = S.ve)(n, i, o, c), t._hd_dot_convert_prefix = (n, i, o, c) => (t._hd_dot_convert_prefix = S.we)(n, i, o, c), t._hd_dot_sign_message = (n, i, o, c, l) => (t._hd_dot_sign_message = S.xe)(n, i, o, c, l), t._hd_dot_verify_message = (n, i, o, c, l, y) => (t._hd_dot_verify_message = S.ye)(n, i, o, c, l, y), t._hd_dot_sign_extrinsic = (n, i, o, c, l) => (t._hd_dot_sign_extrinsic = S.ze)(n, i, o, c, l), t._hd_dot_derive_pubkey = (n, i, o) => (t._hd_dot_derive_pubkey = S.Ae)(n, i, o), t._hd_libp2p_peer_id = (n, i, o, c, l) => (t._hd_libp2p_peer_id = S.Be)(n, i, o, c, l), t._hd_libp2p_peer_id_string = (n, i, o, c, l) => (t._hd_libp2p_peer_id_string = S.Ce)(n, i, o, c, l), t._hd_libp2p_ipns_hash = (n, i, o, c, l) => (t._hd_libp2p_ipns_hash = S.De)(n, i, o, c, l), t._hd_libp2p_ipns_hash_base32 = (n, i, o, c, l) => (t._hd_libp2p_ipns_hash_base32 = S.Ee)(n, i, o, c, l), t._hd_encode_base32lower = (n, i, o, c) => (t._hd_encode_base32lower = S.Fe)(n, i, o, c), t._hd_encode_base36lower = (n, i, o, c) => (t._hd_encode_base36lower = S.Ge)(n, i, o, c), t._hd_openssl_get_error = () => (t._hd_openssl_get_error = S.He)(), t._hd_openssl_init_fips = () => (t._hd_openssl_init_fips = S.Ie)(), t._hd_openssl_init_default = () => (t._hd_openssl_init_default = S.Je)(), t._hd_openssl_cleanup = () => (t._hd_openssl_cleanup = S.Ke)(), t._hd_openssl_is_fips = () => (t._hd_openssl_is_fips = S.Le)(), t._hd_ossl_sha256 = (n, i, o) => (t._hd_ossl_sha256 = S.Me)(n, i, o), t._hd_ossl_sha384 = (n, i, o) => (t._hd_ossl_sha384 = S.Ne)(n, i, o), t._hd_ossl_sha512 = (n, i, o) => (t._hd_ossl_sha512 = S.Oe)(n, i, o), t._hd_ossl_hmac_sha256 = (n, i, o, c, l) => (t._hd_ossl_hmac_sha256 = S.Pe)(n, i, o, c, l), t._hd_ossl_hmac_sha512 = (n, i, o, c, l) => (t._hd_ossl_hmac_sha512 = S.Qe)(n, i, o, c, l), t._hd_ossl_hkdf_sha384 = (n, i, o, c, l, y, A, O) => (t._hd_ossl_hkdf_sha384 = S.Re)(n, i, o, c, l, y, A, O), t._hd_ossl_pbkdf2_sha512 = (n, i, o, c, l, y, A) => (t._hd_ossl_pbkdf2_sha512 = S.Se)(n, i, o, c, l, y, A), t._hd_ossl_ecdsa_sign = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdsa_sign = S.Te)(n, i, o, c, l, y, A), t._hd_ossl_ecdsa_verify = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdsa_verify = S.Ue)(n, i, o, c, l, y, A), t._hd_ossl_ec_pubkey_from_privkey = (n, i, o, c, l) => (t._hd_ossl_ec_pubkey_from_privkey = S.Ve)(n, i, o, c, l), t._hd_ossl_ecdh_keygen = (n, i, o) => (t._hd_ossl_ecdh_keygen = S.We)(n, i, o), t._hd_ossl_ecdh_compute = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdh_compute = S.Xe)(n, i, o, c, l, y, A);
12312
+ var Hi = () => (Hi = S.Ye)(), ye = (n, i) => (ye = S.Ze)(n, i), pr = (n) => (pr = S._e)(n), ge = () => (ge = S.$e)(), ve = (n) => (ve = S.af)(n), xn = (n) => (xn = S.bf)(n), zi = (n) => (zi = S.cf)(n), $i = (n) => ($i = S.df)(n), Wi = (n, i, o) => (Wi = S.ef)(n, i, o), ji = (n) => (ji = S.ff)(n);
12313
+ function Ta(n, i, o) {
12309
12314
  var c = ge();
12310
12315
  try {
12311
12316
  be(n)(i, o);
@@ -12314,7 +12319,7 @@ var Rh = (() => {
12314
12319
  ye(1, 0);
12315
12320
  }
12316
12321
  }
12317
- function Ta(n, i, o, c) {
12322
+ function xa(n, i, o, c) {
12318
12323
  var l = ge();
12319
12324
  try {
12320
12325
  return be(n)(i, o, c);
@@ -12323,7 +12328,7 @@ var Rh = (() => {
12323
12328
  ye(1, 0);
12324
12329
  }
12325
12330
  }
12326
- function xa(n, i) {
12331
+ function Da(n, i) {
12327
12332
  var o = ge();
12328
12333
  try {
12329
12334
  be(n)(i);
@@ -12332,7 +12337,7 @@ var Rh = (() => {
12332
12337
  ye(1, 0);
12333
12338
  }
12334
12339
  }
12335
- function Da(n, i) {
12340
+ function Ca(n, i) {
12336
12341
  var o = ge();
12337
12342
  try {
12338
12343
  return be(n)(i);
@@ -12341,7 +12346,7 @@ var Rh = (() => {
12341
12346
  ye(1, 0);
12342
12347
  }
12343
12348
  }
12344
- function Ca(n, i, o, c, l) {
12349
+ function Ua(n, i, o, c, l) {
12345
12350
  var y = ge();
12346
12351
  try {
12347
12352
  return be(n)(i, o, c, l);
@@ -12350,7 +12355,7 @@ var Rh = (() => {
12350
12355
  ye(1, 0);
12351
12356
  }
12352
12357
  }
12353
- function Ua(n, i, o, c, l, y) {
12358
+ function Fa(n, i, o, c, l, y) {
12354
12359
  var A = ge();
12355
12360
  try {
12356
12361
  return be(n)(i, o, c, l, y);
@@ -12359,7 +12364,7 @@ var Rh = (() => {
12359
12364
  ye(1, 0);
12360
12365
  }
12361
12366
  }
12362
- function Fa(n, i, o, c) {
12367
+ function Ma(n, i, o, c) {
12363
12368
  var l = ge();
12364
12369
  try {
12365
12370
  be(n)(i, o, c);
@@ -12368,7 +12373,7 @@ var Rh = (() => {
12368
12373
  ye(1, 0);
12369
12374
  }
12370
12375
  }
12371
- function Ma(n, i, o, c, l) {
12376
+ function Ba(n, i, o, c, l) {
12372
12377
  var y = ge();
12373
12378
  try {
12374
12379
  be(n)(i, o, c, l);
@@ -12377,7 +12382,7 @@ var Rh = (() => {
12377
12382
  ye(1, 0);
12378
12383
  }
12379
12384
  }
12380
- function Ba(n, i, o) {
12385
+ function Va(n, i, o) {
12381
12386
  var c = ge();
12382
12387
  try {
12383
12388
  return be(n)(i, o);
@@ -12386,7 +12391,7 @@ var Rh = (() => {
12386
12391
  ye(1, 0);
12387
12392
  }
12388
12393
  }
12389
- function Va(n, i, o, c, l, y, A) {
12394
+ function Ha(n, i, o, c, l, y, A) {
12390
12395
  var O = ge();
12391
12396
  try {
12392
12397
  be(n)(i, o, c, l, y, A);
@@ -12395,7 +12400,7 @@ var Rh = (() => {
12395
12400
  ye(1, 0);
12396
12401
  }
12397
12402
  }
12398
- function Ha(n) {
12403
+ function za(n) {
12399
12404
  var i = ge();
12400
12405
  try {
12401
12406
  return be(n)();
@@ -12404,7 +12409,7 @@ var Rh = (() => {
12404
12409
  ye(1, 0);
12405
12410
  }
12406
12411
  }
12407
- function za(n) {
12412
+ function $a(n) {
12408
12413
  var i = ge();
12409
12414
  try {
12410
12415
  be(n)();
@@ -12413,7 +12418,7 @@ var Rh = (() => {
12413
12418
  ye(1, 0);
12414
12419
  }
12415
12420
  }
12416
- function $a(n, i, o, c, l, y) {
12421
+ function Wa(n, i, o, c, l, y) {
12417
12422
  var A = ge();
12418
12423
  try {
12419
12424
  be(n)(i, o, c, l, y);
@@ -12422,7 +12427,7 @@ var Rh = (() => {
12422
12427
  ye(1, 0);
12423
12428
  }
12424
12429
  }
12425
- function Wa(n, i, o, c, l, y, A, O, x, H) {
12430
+ function ja(n, i, o, c, l, y, A, O, x, H) {
12426
12431
  var G = ge();
12427
12432
  try {
12428
12433
  return be(n)(i, o, c, l, y, A, O, x, H);
@@ -12431,7 +12436,7 @@ var Rh = (() => {
12431
12436
  ye(1, 0);
12432
12437
  }
12433
12438
  }
12434
- function ja(n, i, o, c, l, y, A) {
12439
+ function qa(n, i, o, c, l, y, A) {
12435
12440
  var O = ge();
12436
12441
  try {
12437
12442
  return be(n)(i, o, c, l, y, A);
@@ -12440,7 +12445,7 @@ var Rh = (() => {
12440
12445
  ye(1, 0);
12441
12446
  }
12442
12447
  }
12443
- function qa(n, i, o, c, l, y, A, O, x, H, G) {
12448
+ function Ka(n, i, o, c, l, y, A, O, x, H, G) {
12444
12449
  var se = ge();
12445
12450
  try {
12446
12451
  return be(n)(i, o, c, l, y, A, O, x, H, G);
@@ -12449,7 +12454,7 @@ var Rh = (() => {
12449
12454
  ye(1, 0);
12450
12455
  }
12451
12456
  }
12452
- function Ka(n, i) {
12457
+ function Ya(n, i) {
12453
12458
  var o = ge();
12454
12459
  try {
12455
12460
  return be(n)(i);
@@ -12458,7 +12463,7 @@ var Rh = (() => {
12458
12463
  ye(1, 0);
12459
12464
  }
12460
12465
  }
12461
- function Ya(n, i, o, c, l, y, A, O) {
12466
+ function Ga(n, i, o, c, l, y, A, O) {
12462
12467
  var x = ge();
12463
12468
  try {
12464
12469
  be(n)(i, o, c, l, y, A, O);
@@ -12467,7 +12472,7 @@ var Rh = (() => {
12467
12472
  ye(1, 0);
12468
12473
  }
12469
12474
  }
12470
- function Ga(n, i, o, c, l, y, A, O) {
12475
+ function Xa(n, i, o, c, l, y, A, O) {
12471
12476
  var x = ge();
12472
12477
  try {
12473
12478
  return be(n)(i, o, c, l, y, A, O);
@@ -12476,7 +12481,7 @@ var Rh = (() => {
12476
12481
  ye(1, 0);
12477
12482
  }
12478
12483
  }
12479
- function Xa(n, i, o, c, l, y, A, O, x) {
12484
+ function Ja(n, i, o, c, l, y, A, O, x) {
12480
12485
  var H = ge();
12481
12486
  try {
12482
12487
  return be(n)(i, o, c, l, y, A, O, x);
@@ -12485,7 +12490,7 @@ var Rh = (() => {
12485
12490
  ye(1, 0);
12486
12491
  }
12487
12492
  }
12488
- function Ja(n, i, o, c, l, y, A, O, x, H, G) {
12493
+ function Qa(n, i, o, c, l, y, A, O, x, H, G) {
12489
12494
  var se = ge();
12490
12495
  try {
12491
12496
  be(n)(i, o, c, l, y, A, O, x, H, G);
@@ -12494,7 +12499,7 @@ var Rh = (() => {
12494
12499
  ye(1, 0);
12495
12500
  }
12496
12501
  }
12497
- function Qa(n, i, o, c, l, y, A, O, x, H, G) {
12502
+ function Za(n, i, o, c, l, y, A, O, x, H, G) {
12498
12503
  var se = ge();
12499
12504
  try {
12500
12505
  return be(n)(i, o, c, l, y, A, O, x, H, G);
@@ -12503,7 +12508,7 @@ var Rh = (() => {
12503
12508
  ye(1, 0);
12504
12509
  }
12505
12510
  }
12506
- function Za(n, i, o, c) {
12511
+ function ec(n, i, o, c) {
12507
12512
  var l = ge();
12508
12513
  try {
12509
12514
  return be(n)(i, o, c);
@@ -12512,7 +12517,7 @@ var Rh = (() => {
12512
12517
  return ye(1, 0), 0n;
12513
12518
  }
12514
12519
  }
12515
- function ec(n, i, o, c, l, y, A, O, x, H) {
12520
+ function tc(n, i, o, c, l, y, A, O, x, H) {
12516
12521
  var G = ge();
12517
12522
  try {
12518
12523
  be(n)(i, o, c, l, y, A, O, x, H);
@@ -12521,7 +12526,7 @@ var Rh = (() => {
12521
12526
  ye(1, 0);
12522
12527
  }
12523
12528
  }
12524
- function tc(n, i, o, c, l, y, A, O, x) {
12529
+ function rc(n, i, o, c, l, y, A, O, x) {
12525
12530
  var H = ge();
12526
12531
  try {
12527
12532
  be(n)(i, o, c, l, y, A, O, x);
@@ -12530,7 +12535,7 @@ var Rh = (() => {
12530
12535
  ye(1, 0);
12531
12536
  }
12532
12537
  }
12533
- function rc(n, i, o) {
12538
+ function nc(n, i, o) {
12534
12539
  var c = ge();
12535
12540
  try {
12536
12541
  return be(n)(i, o);
@@ -12539,7 +12544,7 @@ var Rh = (() => {
12539
12544
  ye(1, 0);
12540
12545
  }
12541
12546
  }
12542
- function nc(n, i, o, c, l, y, A, O, x, H, G) {
12547
+ function ic(n, i, o, c, l, y, A, O, x, H, G) {
12543
12548
  var se = ge();
12544
12549
  try {
12545
12550
  return be(n)(i, o, c, l, y, A, O, x, H, G);
@@ -12548,7 +12553,7 @@ var Rh = (() => {
12548
12553
  ye(1, 0);
12549
12554
  }
12550
12555
  }
12551
- function ic(n, i, o, c) {
12556
+ function oc(n, i, o, c) {
12552
12557
  var l = ge();
12553
12558
  try {
12554
12559
  be(n)(i, o, c);
@@ -12557,7 +12562,7 @@ var Rh = (() => {
12557
12562
  ye(1, 0);
12558
12563
  }
12559
12564
  }
12560
- function oc(n, i, o, c) {
12565
+ function sc(n, i, o, c) {
12561
12566
  var l = ge();
12562
12567
  try {
12563
12568
  return be(n)(i, o, c);
@@ -12566,7 +12571,7 @@ var Rh = (() => {
12566
12571
  ye(1, 0);
12567
12572
  }
12568
12573
  }
12569
- function sc(n, i, o, c, l) {
12574
+ function ac(n, i, o, c, l) {
12570
12575
  var y = ge();
12571
12576
  try {
12572
12577
  be(n)(i, o, c, l);
@@ -12575,7 +12580,7 @@ var Rh = (() => {
12575
12580
  ye(1, 0);
12576
12581
  }
12577
12582
  }
12578
- function ac(n, i, o, c, l, y, A, O) {
12583
+ function cc(n, i, o, c, l, y, A, O) {
12579
12584
  var x = ge();
12580
12585
  try {
12581
12586
  be(n)(i, o, c, l, y, A, O);
@@ -12584,7 +12589,7 @@ var Rh = (() => {
12584
12589
  ye(1, 0);
12585
12590
  }
12586
12591
  }
12587
- function cc(n, i, o) {
12592
+ function lc(n, i, o) {
12588
12593
  var c = ge();
12589
12594
  try {
12590
12595
  be(n)(i, o);
@@ -12593,7 +12598,7 @@ var Rh = (() => {
12593
12598
  ye(1, 0);
12594
12599
  }
12595
12600
  }
12596
- function lc(n, i, o, c, l, y, A) {
12601
+ function dc(n, i, o, c, l, y, A) {
12597
12602
  var O = ge();
12598
12603
  try {
12599
12604
  be(n)(i, o, c, l, y, A);
@@ -12602,7 +12607,7 @@ var Rh = (() => {
12602
12607
  ye(1, 0);
12603
12608
  }
12604
12609
  }
12605
- function dc(n, i, o, c) {
12610
+ function _c(n, i, o, c) {
12606
12611
  var l = ge();
12607
12612
  try {
12608
12613
  return be(n)(i, o, c);
@@ -12611,7 +12616,16 @@ var Rh = (() => {
12611
12616
  ye(1, 0);
12612
12617
  }
12613
12618
  }
12614
- function _c(n, i, o, c, l, y, A, O, x, H, G, se) {
12619
+ function hc(n, i, o, c) {
12620
+ var l = ge();
12621
+ try {
12622
+ be(n)(i, o, c);
12623
+ } catch (y) {
12624
+ if (ve(l), y !== y + 0) throw y;
12625
+ ye(1, 0);
12626
+ }
12627
+ }
12628
+ function uc(n, i, o, c, l, y, A, O, x, H, G, se) {
12615
12629
  var q = ge();
12616
12630
  try {
12617
12631
  be(n)(i, o, c, l, y, A, O, x, H, G, se);
@@ -12620,7 +12634,7 @@ var Rh = (() => {
12620
12634
  ye(1, 0);
12621
12635
  }
12622
12636
  }
12623
- function hc(n, i, o, c, l, y) {
12637
+ function fc(n, i, o, c, l, y) {
12624
12638
  var A = ge();
12625
12639
  try {
12626
12640
  be(n)(i, o, c, l, y);
@@ -12629,7 +12643,7 @@ var Rh = (() => {
12629
12643
  ye(1, 0);
12630
12644
  }
12631
12645
  }
12632
- function uc(n, i, o, c, l) {
12646
+ function pc(n, i, o, c, l) {
12633
12647
  var y = ge();
12634
12648
  try {
12635
12649
  be(n)(i, o, c, l);
@@ -12638,7 +12652,7 @@ var Rh = (() => {
12638
12652
  ye(1, 0);
12639
12653
  }
12640
12654
  }
12641
- function fc(n, i, o, c) {
12655
+ function yc(n, i, o, c) {
12642
12656
  var l = ge();
12643
12657
  try {
12644
12658
  return be(n)(i, o, c);
@@ -12647,7 +12661,7 @@ var Rh = (() => {
12647
12661
  ye(1, 0);
12648
12662
  }
12649
12663
  }
12650
- function pc(n) {
12664
+ function gc(n) {
12651
12665
  var i = ge();
12652
12666
  try {
12653
12667
  return be(n)();
@@ -12656,7 +12670,7 @@ var Rh = (() => {
12656
12670
  return ye(1, 0), 0n;
12657
12671
  }
12658
12672
  }
12659
- function yc(n, i, o, c, l, y) {
12673
+ function vc(n, i, o, c, l, y) {
12660
12674
  var A = ge();
12661
12675
  try {
12662
12676
  return be(n)(i, o, c, l, y);
@@ -12665,7 +12679,7 @@ var Rh = (() => {
12665
12679
  ye(1, 0);
12666
12680
  }
12667
12681
  }
12668
- function gc(n, i, o, c, l) {
12682
+ function bc(n, i, o, c, l) {
12669
12683
  var y = ge();
12670
12684
  try {
12671
12685
  return be(n)(i, o, c, l);
@@ -12674,7 +12688,7 @@ var Rh = (() => {
12674
12688
  return ye(1, 0), 0n;
12675
12689
  }
12676
12690
  }
12677
- function vc(n, i, o, c) {
12691
+ function Ec(n, i, o, c) {
12678
12692
  var l = ge();
12679
12693
  try {
12680
12694
  return be(n)(i, o, c);
@@ -12683,7 +12697,7 @@ var Rh = (() => {
12683
12697
  ye(1, 0);
12684
12698
  }
12685
12699
  }
12686
- function bc(n, i, o, c, l, y, A, O, x, H, G, se) {
12700
+ function Ac(n, i, o, c, l, y, A, O, x, H, G, se) {
12687
12701
  var q = ge();
12688
12702
  try {
12689
12703
  return be(n)(i, o, c, l, y, A, O, x, H, G, se);
@@ -12692,7 +12706,7 @@ var Rh = (() => {
12692
12706
  ye(1, 0);
12693
12707
  }
12694
12708
  }
12695
- function Ec(n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me) {
12709
+ function mc(n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me) {
12696
12710
  var Ze = ge();
12697
12711
  try {
12698
12712
  be(n)(i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me);
@@ -12701,16 +12715,16 @@ var Rh = (() => {
12701
12715
  ye(1, 0);
12702
12716
  }
12703
12717
  }
12704
- t.ccall = Mi, t.cwrap = Ra, t.setValue = St, t.getValue = pt, t.UTF8ToString = ur, t.stringToUTF8 = Gr, t.lengthBytesUTF8 = lt;
12705
- var Zr;
12718
+ t.ccall = Mi, t.cwrap = Na, t.setValue = St, t.getValue = pt, t.UTF8ToString = ur, t.stringToUTF8 = Yr, t.lengthBytesUTF8 = lt;
12719
+ var Qr;
12706
12720
  ue = function n() {
12707
- Zr || qi(), Zr || (ue = n);
12721
+ Qr || qi(), Qr || (ue = n);
12708
12722
  };
12709
12723
  function qi() {
12710
12724
  if (ie > 0 || (ee(), ie > 0))
12711
12725
  return;
12712
12726
  function n() {
12713
- Zr || (Zr = !0, t.calledRun = !0, !C && (ae(), s(t), t.onRuntimeInitialized && t.onRuntimeInitialized(), oe()));
12727
+ Qr || (Qr = !0, t.calledRun = !0, !C && (ae(), s(t), t.onRuntimeInitialized && t.onRuntimeInitialized(), oe()));
12714
12728
  }
12715
12729
  t.setStatus ? (t.setStatus("Running..."), setTimeout(function() {
12716
12730
  setTimeout(function() {
@@ -12724,7 +12738,7 @@ var Rh = (() => {
12724
12738
  return qi(), r.ready;
12725
12739
  };
12726
12740
  })();
12727
- const Nh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12741
+ const Th = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12728
12742
  __proto__: null,
12729
- default: Rh
12743
+ default: Lh
12730
12744
  }, Symbol.toStringTag, { value: "Module" }));