@nexus-cross/crossx-sdk-core 2.0.1-beta.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -468,27 +468,27 @@ const Rt = "crossx_access_token", Ot = "crossx_refresh_token", Pt = "crossx_user
468
468
  let t, n = !1;
469
469
  try {
470
470
  const { authApiUrl: u } = this.config, { accessToken: f, refreshToken: _ } = await this.exchangeFirebaseToken(e, u);
471
- let p, b, S;
471
+ let p, b, E;
472
472
  try {
473
473
  const A = this.crypto.decodeJWT(e);
474
474
  d.log("[CROSSx] Firebase JWT 필드:", Object.keys(A).join(", ")), b = (o = A.firebase) == null ? void 0 : o.sign_in_provider;
475
- const R = ((i = A.firebase) == null ? void 0 : i.identities) ?? {};
476
- S = A.email ?? ((a = R.email) == null ? void 0 : a[0]), b === "google.com" ? p = (c = R["google.com"]) == null ? void 0 : c[0] : b === "apple.com" && (p = (l = R["apple.com"]) == null ? void 0 : l[0]), d.log("[CROSSx] OAuth provider sub 추출 — provider:", b, "hasProviderSub:", !!p, "email:", S ?? "(없음)");
475
+ const k = ((i = A.firebase) == null ? void 0 : i.identities) ?? {};
476
+ E = A.email ?? ((a = k.email) == null ? void 0 : a[0]), b === "google.com" ? p = (c = k["google.com"]) == null ? void 0 : c[0] : b === "apple.com" && (p = (l = k["apple.com"]) == null ? void 0 : l[0]), d.log("[CROSSx] OAuth provider sub 추출 — provider:", b, "hasProviderSub:", !!p, "email:", E ?? "(없음)");
477
477
  } catch {
478
478
  d.warn("[CROSSx] firebaseToken에서 providerSub 추출 실패");
479
479
  }
480
480
  if (f) {
481
481
  const A = this.crypto.decodeJWT(f);
482
482
  d.log("[CROSSx] access_token 디코딩 — sub:", A.sub, "exp:", A.exp, "필드:", Object.keys(A).join(", "));
483
- const R = await this.crypto.verifyJWT(f);
484
- if (n = R.signatureVerified ?? !1, !R.valid)
483
+ const k = await this.crypto.verifyJWT(f);
484
+ if (n = k.signatureVerified ?? !1, !k.valid)
485
485
  throw d.error("[CROSSx] access_token 검증 실패"), new Error("유효하지 않은 access token");
486
- const F = R.payload, M = F.email ?? S ?? s;
486
+ const F = k.payload, M = F.email ?? E ?? s;
487
487
  d.log(
488
488
  "[CROSSx] email 소스 — CROSSx JWT:",
489
489
  F.email ?? "(없음)",
490
490
  "/ Firebase JWT:",
491
- S ?? "(없음)",
491
+ E ?? "(없음)",
492
492
  "/ OAuth 콜백:",
493
493
  s ?? "(없음)",
494
494
  "→",
@@ -509,8 +509,8 @@ const Rt = "crossx_access_token", Ot = "crossx_refresh_token", Pt = "crossx_user
509
509
  }, d.log("[CROSSx] Cookie 모드 — Firebase 토큰에서 사용자 정보 추출 — id:", t.id);
510
510
  }
511
511
  d.log("[CROSSx] 사용자 정보 — id:", t.id, "email:", t.email ?? "(없음)");
512
- const E = this.useCookieAuth ? { id: t.id, email: t.email, signInProvider: t.signInProvider, providerSub: t.providerSub } : t;
513
- await this.storage.set(this.STORAGE_KEY_USER, E), d.log("[CROSSx] 사용자 정보 저장 완료 (authMode:", this.useCookieAuth ? "cookie" : "token", ")");
512
+ const S = this.useCookieAuth ? { id: t.id, email: t.email, signInProvider: t.signInProvider, providerSub: t.providerSub } : t;
513
+ await this.storage.set(this.STORAGE_KEY_USER, S), d.log("[CROSSx] 사용자 정보 저장 완료 (authMode:", this.useCookieAuth ? "cookie" : "token", ")");
514
514
  } catch (u) {
515
515
  return d.error("[CROSSx] SignIn 에러 (토큰 교환 단계):", u), {
516
516
  success: !1,
@@ -1806,12 +1806,12 @@ const J = class J extends rr {
1806
1806
  * logger.log(receipt.status); // '0x1' | '0x0'
1807
1807
  */
1808
1808
  async sendTransactionWithWaitForReceipt(e, s, t = {}) {
1809
- var S, E;
1810
- const { intervalMs: n, timeoutMs: o, ...i } = t, { txHash: a } = await this.sendTransaction(e, s, i), c = n ?? ((S = this._config.receiptPolling) == null ? void 0 : S.intervalMs) ?? ir, l = o ?? ((E = this._config.receiptPolling) == null ? void 0 : E.timeoutMs) ?? Ct, u = tt(e), f = s.from ?? "";
1809
+ var E, S;
1810
+ const { intervalMs: n, timeoutMs: o, ...i } = t, { txHash: a } = await this.sendTransaction(e, s, i), c = n ?? ((E = this._config.receiptPolling) == null ? void 0 : E.intervalMs) ?? ir, l = o ?? ((S = this._config.receiptPolling) == null ? void 0 : S.timeoutMs) ?? Ct, u = tt(e), f = s.from ?? "";
1811
1811
  let _, p;
1812
1812
  const b = this.waitForTxAndGetReceipt(a, e, { intervalMs: c, timeoutMs: l }).then((A) => {
1813
1813
  _ = A;
1814
- const R = BigInt(A.gasUsed) * BigInt(A.effectiveGasPrice), F = s.value ? BigInt(s.value) : 0n, M = J.formatTxAmount(s.value, u.symbol, u.decimals), K = J.formatTxAmount("0x" + R.toString(16), u.symbol, u.decimals), q = J.formatTxAmount("0x" + (F + R).toString(16), u.symbol, u.decimals);
1814
+ const k = BigInt(A.gasUsed) * BigInt(A.effectiveGasPrice), F = s.value ? BigInt(s.value) : 0n, M = J.formatTxAmount(s.value, u.symbol, u.decimals), K = J.formatTxAmount("0x" + k.toString(16), u.symbol, u.decimals), q = J.formatTxAmount("0x" + (F + k).toString(16), u.symbol, u.decimals);
1815
1815
  return {
1816
1816
  chainId: e,
1817
1817
  txHash: a,
@@ -2122,8 +2122,8 @@ const J = class J extends rr {
2122
2122
  }
2123
2123
  const p = _.pinStatus;
2124
2124
  if (i = p.maxAttempts, o = i - p.remainingAttempts, p.remainingAttempts === 0 && p.lockExpiresAt) {
2125
- const b = p.lockExpiresAt * 1e3, S = Math.max(1, Math.round((b - Date.now()) / 1e3)), E = S <= 1800 ? "Too many failed attempts. Please try again in 30 minutes." : "Too many failed attempts. Please try again in 24 hours.";
2126
- d.warn(`[CROSSx][Migration Phase 4] verify-recovery-pin 잠금 — ${S}초, 메시지: ${E}`), await this.confirmation.showRecoveryPinLockedPrompt(S, E), o = 0, n = "Your account lock has been lifted. You may try again.";
2125
+ const b = p.lockExpiresAt * 1e3, E = Math.max(1, Math.round((b - Date.now()) / 1e3)), S = E <= 1800 ? "Too many failed attempts. Please try again in 30 minutes." : "Too many failed attempts. Please try again in 24 hours.";
2126
+ d.warn(`[CROSSx][Migration Phase 4] verify-recovery-pin 잠금 — ${E}초, 메시지: ${S}`), await this.confirmation.showRecoveryPinLockedPrompt(E, S), o = 0, n = "Your account lock has been lifted. You may try again.";
2127
2127
  } else
2128
2128
  d.warn(`[CROSSx][Migration Phase 4] PIN 불일치 (시도 ${o}/${i})`), n = "Incorrect PIN.";
2129
2129
  } catch (_) {
@@ -2145,8 +2145,8 @@ const J = class J extends rr {
2145
2145
  const p = _.details;
2146
2146
  if (i = (p == null ? void 0 : p.maxAttempts) ?? 5, (p == null ? void 0 : p.permanent) === !0)
2147
2147
  return d.warn("[CROSSx][Migration Phase 4] PIN 영구 잠금 (verify-recovery-pin)"), await this.confirmation.showRecoveryPinLockedPrompt(0, "Your account has been permanently locked due to too many failed attempts."), null;
2148
- const b = ((p == null ? void 0 : p.lockExpiresAt) ?? 0) * 1e3, S = Math.max(1, Math.round((b - Date.now()) / 1e3)), E = S <= 1800 ? "Too many failed attempts. Please try again in 30 minutes." : "Too many failed attempts. Please try again in 24 hours.";
2149
- d.warn(`[CROSSx][Migration Phase 4] verify-recovery-pin 이미 잠금 — ${S}초`), await this.confirmation.showRecoveryPinLockedPrompt(S, E), o = 0, n = "Your account lock has been lifted. You may try again.";
2148
+ const b = ((p == null ? void 0 : p.lockExpiresAt) ?? 0) * 1e3, E = Math.max(1, Math.round((b - Date.now()) / 1e3)), S = E <= 1800 ? "Too many failed attempts. Please try again in 30 minutes." : "Too many failed attempts. Please try again in 24 hours.";
2149
+ d.warn(`[CROSSx][Migration Phase 4] verify-recovery-pin 이미 잠금 — ${E}초`), await this.confirmation.showRecoveryPinLockedPrompt(E, S), o = 0, n = "Your account lock has been lifted. You may try again.";
2150
2150
  } else
2151
2151
  throw d.error("[CROSSx][Migration Phase 4] verify-recovery-pin 실패 (복구 불가):", _), _;
2152
2152
  }
@@ -2169,10 +2169,10 @@ const J = class J extends rr {
2169
2169
  }) === "signin-again" && (await this.signInAgain()).success) {
2170
2170
  d.log("[CROSSx][Migration Phase 5] 재로그인 성공 — 마이그레이션 재시도 (검증된 PIN 유지)");
2171
2171
  try {
2172
- const S = await this.migrateWalletUseCase.execute(a, e);
2173
- return d.log("[CROSSx][Migration Phase 5] 마이그레이션 재시도 성공 — address:", S.address), S;
2174
- } catch (S) {
2175
- throw d.error("[CROSSx][Migration Phase 5] 마이그레이션 재시도 실패:", S), S;
2172
+ const E = await this.migrateWalletUseCase.execute(a, e);
2173
+ return d.log("[CROSSx][Migration Phase 5] 마이그레이션 재시도 성공 — address:", E.address), E;
2174
+ } catch (E) {
2175
+ throw d.error("[CROSSx][Migration Phase 5] 마이그레이션 재시도 실패:", E), E;
2176
2176
  }
2177
2177
  }
2178
2178
  throw this.clearAuthState(), f;
@@ -3165,13 +3165,13 @@ class Pr extends vr {
3165
3165
  for (let f = 0; f < 16; f++, s += 4)
3166
3166
  be[f] = e.getUint32(s, !1);
3167
3167
  for (let f = 16; f < 64; f++) {
3168
- const _ = be[f - 15], p = be[f - 2], b = pe(_, 7) ^ pe(_, 18) ^ _ >>> 3, S = pe(p, 17) ^ pe(p, 19) ^ p >>> 10;
3169
- be[f] = S + be[f - 7] + b + be[f - 16] | 0;
3168
+ const _ = be[f - 15], p = be[f - 2], b = pe(_, 7) ^ pe(_, 18) ^ _ >>> 3, E = pe(p, 17) ^ pe(p, 19) ^ p >>> 10;
3169
+ be[f] = E + be[f - 7] + b + be[f - 16] | 0;
3170
3170
  }
3171
3171
  let { A: t, B: n, C: o, D: i, E: a, F: c, G: l, H: u } = this;
3172
3172
  for (let f = 0; f < 64; f++) {
3173
- const _ = pe(a, 6) ^ pe(a, 11) ^ pe(a, 25), p = u + _ + br(a, c, l) + Or[f] + be[f] | 0, S = (pe(t, 2) ^ pe(t, 13) ^ pe(t, 22)) + Sr(t, n, o) | 0;
3174
- u = l, l = c, c = a, a = i + p | 0, i = o, o = n, n = t, t = p + S | 0;
3173
+ const _ = pe(a, 6) ^ pe(a, 11) ^ pe(a, 25), p = u + _ + br(a, c, l) + Or[f] + be[f] | 0, E = (pe(t, 2) ^ pe(t, 13) ^ pe(t, 22)) + Sr(t, n, o) | 0;
3174
+ u = l, l = c, c = a, a = i + p | 0, i = o, o = n, n = t, t = p + E | 0;
3175
3175
  }
3176
3176
  t = t + this.A | 0, n = n + this.B | 0, o = o + this.C | 0, i = i + this.D | 0, a = a + this.E | 0, c = c + this.F | 0, l = l + this.G | 0, u = u + this.H | 0, this.set(t, n, o, i, a, c, l, u);
3177
3177
  }
@@ -3264,30 +3264,30 @@ const yt = (r) => (pt << BigInt(r)) - pt;
3264
3264
  function Br(r, e, s) {
3265
3265
  if (we(r, "hashLen"), we(e, "qByteLen"), typeof s != "function")
3266
3266
  throw new Error("hmacFn must be a function");
3267
- const t = (E) => new Uint8Array(E), n = Uint8Array.of(), o = Uint8Array.of(0), i = Uint8Array.of(1), a = 1e3;
3267
+ const t = (S) => new Uint8Array(S), n = Uint8Array.of(), o = Uint8Array.of(0), i = Uint8Array.of(1), a = 1e3;
3268
3268
  let c = t(r), l = t(r), u = 0;
3269
3269
  const f = () => {
3270
3270
  c.fill(1), l.fill(0), u = 0;
3271
- }, _ = (...E) => s(l, ve(c, ...E)), p = (E = n) => {
3272
- l = _(o, E), c = _(), E.length !== 0 && (l = _(i, E), c = _());
3271
+ }, _ = (...S) => s(l, ve(c, ...S)), p = (S = n) => {
3272
+ l = _(o, S), c = _(), S.length !== 0 && (l = _(i, S), c = _());
3273
3273
  }, b = () => {
3274
3274
  if (u++ >= a)
3275
3275
  throw new Error("drbg: tried max amount of iterations");
3276
- let E = 0;
3276
+ let S = 0;
3277
3277
  const A = [];
3278
- for (; E < e; ) {
3278
+ for (; S < e; ) {
3279
3279
  c = _();
3280
- const R = c.slice();
3281
- A.push(R), E += c.length;
3280
+ const k = c.slice();
3281
+ A.push(k), S += c.length;
3282
3282
  }
3283
3283
  return ve(...A);
3284
3284
  };
3285
- return (E, A) => {
3286
- f(), p(E);
3287
- let R;
3288
- for (; !(R = A(b())); )
3285
+ return (S, A) => {
3286
+ f(), p(S);
3287
+ let k;
3288
+ for (; !(k = A(b())); )
3289
3289
  p();
3290
- return f(), R;
3290
+ return f(), k;
3291
3291
  };
3292
3292
  }
3293
3293
  function bt(r, e = {}, s = {}) {
@@ -3358,8 +3358,8 @@ function Wr(r) {
3358
3358
  let l = a.pow(c, i), u = a.mul(l, t);
3359
3359
  const f = a.mul(l, n), _ = a.mul(l, o), p = a.eql(a.sqr(u), c), b = a.eql(a.sqr(f), c);
3360
3360
  l = a.cmov(l, u, p), u = a.cmov(_, f, b);
3361
- const S = a.eql(a.sqr(u), c), E = a.cmov(l, u, S);
3362
- return St(a, E, c), E;
3361
+ const E = a.eql(a.sqr(u), c), S = a.cmov(l, u, E);
3362
+ return St(a, S, c), S;
3363
3363
  };
3364
3364
  }
3365
3365
  function Ss(r) {
@@ -3386,11 +3386,11 @@ function Ss(r) {
3386
3386
  for (; !c.eql(_, c.ONE); ) {
3387
3387
  if (c.is0(_))
3388
3388
  return c.ZERO;
3389
- let b = 1, S = c.sqr(_);
3390
- for (; !c.eql(S, c.ONE); )
3391
- if (b++, S = c.sqr(S), b === u)
3389
+ let b = 1, E = c.sqr(_);
3390
+ for (; !c.eql(E, c.ONE); )
3391
+ if (b++, E = c.sqr(E), b === u)
3392
3392
  throw new Error("Cannot find square root");
3393
- const E = se << BigInt(u - b - 1), A = c.pow(f, E);
3393
+ const S = se << BigInt(u - b - 1), A = c.pow(f, S);
3394
3394
  u = b, f = c.sqr(A), _ = c.mul(_, f), p = c.mul(p, A);
3395
3395
  }
3396
3396
  return p;
@@ -3944,7 +3944,7 @@ function rn(r, e = {}) {
3944
3944
  const w = t.fromBytes(D);
3945
3945
  if (!t.isValid(w))
3946
3946
  throw new Error("bad point: is not on curve, wrong x");
3947
- const y = S(w);
3947
+ const y = E(w);
3948
3948
  let v;
3949
3949
  try {
3950
3950
  v = t.sqrt(y);
@@ -3957,25 +3957,25 @@ function rn(r, e = {}) {
3957
3957
  return (O & 1) === 1 !== I && (v = t.neg(v)), { x: w, y: v };
3958
3958
  } else if (T === m && O === 4) {
3959
3959
  const w = t.BYTES, y = t.fromBytes(D.subarray(0, w)), v = t.fromBytes(D.subarray(w, w * 2));
3960
- if (!E(y, v))
3960
+ if (!S(y, v))
3961
3961
  throw new Error("bad point: is not on curve");
3962
3962
  return { x: y, y: v };
3963
3963
  } else
3964
3964
  throw new Error(`bad point: got length ${T}, expected compressed=${g} or uncompressed=${m}`);
3965
3965
  }
3966
3966
  const p = e.toBytes || f, b = e.fromBytes || _;
3967
- function S($) {
3967
+ function E($) {
3968
3968
  const g = t.sqr($), m = t.mul(g, $);
3969
3969
  return t.add(t.add(m, t.mul($, o.a)), o.b);
3970
3970
  }
3971
- function E($, g) {
3972
- const m = t.sqr(g), T = S($);
3971
+ function S($, g) {
3972
+ const m = t.sqr(g), T = E($);
3973
3973
  return t.eql(m, T);
3974
3974
  }
3975
- if (!E(o.Gx, o.Gy))
3975
+ if (!S(o.Gx, o.Gy))
3976
3976
  throw new Error("bad curve params: generator point");
3977
- const A = t.mul(t.pow(o.a, Ke), sn), R = t.mul(t.sqr(o.b), BigInt(27));
3978
- if (t.is0(t.add(A, R)))
3977
+ const A = t.mul(t.pow(o.a, Ke), sn), k = t.mul(t.sqr(o.b), BigInt(27));
3978
+ if (t.is0(t.add(A, k)))
3979
3979
  throw new Error("bad curve params: a or b");
3980
3980
  function F($, g, m = !1) {
3981
3981
  if (!t.isValid(g) || m && t.is0(g))
@@ -4012,7 +4012,7 @@ function rn(r, e = {}) {
4012
4012
  const { x: g, y: m } = $.toAffine();
4013
4013
  if (!t.isValid(g) || !t.isValid(m))
4014
4014
  throw new Error("bad point: x or y not field elements");
4015
- if (!E(g, m))
4015
+ if (!S(g, m))
4016
4016
  throw new Error("bad point: equation left != right");
4017
4017
  if (!$.isTorsionFree())
4018
4018
  throw new Error("bad point: not in prime-order subgroup");
@@ -4090,8 +4090,8 @@ function rn(r, e = {}) {
4090
4090
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
4091
4091
  double() {
4092
4092
  const { a: g, b: m } = o, T = t.mul(m, Ke), { X: O, Y: D, Z: w } = this;
4093
- let y = t.ZERO, v = t.ZERO, I = t.ZERO, k = t.mul(O, O), H = t.mul(D, D), B = t.mul(w, w), N = t.mul(O, D);
4094
- return N = t.add(N, N), I = t.mul(O, w), I = t.add(I, I), y = t.mul(g, I), v = t.mul(T, B), v = t.add(y, v), y = t.sub(H, v), v = t.add(H, v), v = t.mul(y, v), y = t.mul(N, y), I = t.mul(T, I), B = t.mul(g, B), N = t.sub(k, B), N = t.mul(g, N), N = t.add(N, I), I = t.add(k, k), k = t.add(I, k), k = t.add(k, B), k = t.mul(k, N), v = t.add(v, k), B = t.mul(D, w), B = t.add(B, B), k = t.mul(B, N), y = t.sub(y, k), I = t.mul(B, H), I = t.add(I, I), I = t.add(I, I), new C(y, v, I);
4093
+ let y = t.ZERO, v = t.ZERO, I = t.ZERO, R = t.mul(O, O), H = t.mul(D, D), B = t.mul(w, w), N = t.mul(O, D);
4094
+ return N = t.add(N, N), I = t.mul(O, w), I = t.add(I, I), y = t.mul(g, I), v = t.mul(T, B), v = t.add(y, v), y = t.sub(H, v), v = t.add(H, v), v = t.mul(y, v), y = t.mul(N, y), I = t.mul(T, I), B = t.mul(g, B), N = t.sub(R, B), N = t.mul(g, N), N = t.add(N, I), I = t.add(R, R), R = t.add(I, R), R = t.add(R, B), R = t.mul(R, N), v = t.add(v, R), B = t.mul(D, w), B = t.add(B, B), R = t.mul(B, N), y = t.sub(y, R), I = t.mul(B, H), I = t.add(I, I), I = t.add(I, I), new C(y, v, I);
4095
4095
  }
4096
4096
  // Renes-Costello-Batina exception-free addition formula.
4097
4097
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -4100,12 +4100,12 @@ function rn(r, e = {}) {
4100
4100
  add(g) {
4101
4101
  M(g);
4102
4102
  const { X: m, Y: T, Z: O } = this, { X: D, Y: w, Z: y } = g;
4103
- let v = t.ZERO, I = t.ZERO, k = t.ZERO;
4103
+ let v = t.ZERO, I = t.ZERO, R = t.ZERO;
4104
4104
  const H = o.a, B = t.mul(o.b, Ke);
4105
4105
  let N = t.mul(m, D), G = t.mul(T, w), j = t.mul(O, y), ie = t.add(m, T), V = t.add(D, w);
4106
4106
  ie = t.mul(ie, V), V = t.add(N, G), ie = t.sub(ie, V), V = t.add(m, O);
4107
4107
  let te = t.add(D, y);
4108
- return V = t.mul(V, te), te = t.add(N, j), V = t.sub(V, te), te = t.add(T, O), v = t.add(w, y), te = t.mul(te, v), v = t.add(G, j), te = t.sub(te, v), k = t.mul(H, V), v = t.mul(B, j), k = t.add(v, k), v = t.sub(G, k), k = t.add(G, k), I = t.mul(v, k), G = t.add(N, N), G = t.add(G, N), j = t.mul(H, j), V = t.mul(B, V), G = t.add(G, j), j = t.sub(N, j), j = t.mul(H, j), V = t.add(V, j), N = t.mul(G, V), I = t.add(I, N), N = t.mul(te, V), v = t.mul(ie, v), v = t.sub(v, N), N = t.mul(ie, G), k = t.mul(te, k), k = t.add(k, N), new C(v, I, k);
4108
+ return V = t.mul(V, te), te = t.add(N, j), V = t.sub(V, te), te = t.add(T, O), v = t.add(w, y), te = t.mul(te, v), v = t.add(G, j), te = t.sub(te, v), R = t.mul(H, V), v = t.mul(B, j), R = t.add(v, R), v = t.sub(G, R), R = t.add(G, R), I = t.mul(v, R), G = t.add(N, N), G = t.add(G, N), j = t.mul(H, j), V = t.mul(B, V), G = t.add(G, j), j = t.sub(N, j), j = t.mul(H, j), V = t.add(V, j), N = t.mul(G, V), I = t.add(I, N), N = t.mul(te, V), v = t.mul(ie, v), v = t.sub(v, N), N = t.mul(ie, G), R = t.mul(te, R), R = t.add(R, N), new C(v, I, R);
4109
4109
  }
4110
4110
  subtract(g) {
4111
4111
  return this.add(g.negate());
@@ -4129,8 +4129,8 @@ function rn(r, e = {}) {
4129
4129
  let T, O;
4130
4130
  const D = (w) => U.cached(this, w, (y) => Kt(C, y));
4131
4131
  if (m) {
4132
- const { k1neg: w, k1: y, k2neg: v, k2: I } = K(g), { p: k, f: H } = D(y), { p: B, f: N } = D(I);
4133
- O = H.add(N), T = W(m.beta, k, B, w, v);
4132
+ const { k1neg: w, k1: y, k2neg: v, k2: I } = K(g), { p: R, f: H } = D(y), { p: B, f: N } = D(I);
4133
+ O = H.add(N), T = W(m.beta, R, B, w, v);
4134
4134
  } else {
4135
4135
  const { p: w, f: y } = D(g);
4136
4136
  T = w, O = y;
@@ -4223,10 +4223,10 @@ function nn(r, e = {}) {
4223
4223
  }
4224
4224
  }
4225
4225
  function i(p, b) {
4226
- const { publicKey: S, publicKeyUncompressed: E } = n;
4226
+ const { publicKey: E, publicKeyUncompressed: S } = n;
4227
4227
  try {
4228
4228
  const A = p.length;
4229
- return b === !0 && A !== S || b === !1 && A !== E ? !1 : !!r.fromBytes(p);
4229
+ return b === !0 && A !== E || b === !1 && A !== S ? !1 : !!r.fromBytes(p);
4230
4230
  } catch {
4231
4231
  return !1;
4232
4232
  }
@@ -4238,19 +4238,19 @@ function nn(r, e = {}) {
4238
4238
  return r.BASE.multiply(s.fromBytes(p)).toBytes(b);
4239
4239
  }
4240
4240
  function l(p) {
4241
- const { secretKey: b, publicKey: S, publicKeyUncompressed: E } = n;
4242
- if (!gt(p) || "_lengths" in s && s._lengths || b === S)
4241
+ const { secretKey: b, publicKey: E, publicKeyUncompressed: S } = n;
4242
+ if (!gt(p) || "_lengths" in s && s._lengths || b === E)
4243
4243
  return;
4244
4244
  const A = z(p, void 0, "key").length;
4245
- return A === S || A === E;
4245
+ return A === E || A === S;
4246
4246
  }
4247
- function u(p, b, S = !0) {
4247
+ function u(p, b, E = !0) {
4248
4248
  if (l(p) === !0)
4249
4249
  throw new Error("first arg must be private key");
4250
4250
  if (l(b) === !1)
4251
4251
  throw new Error("second arg must be public key");
4252
- const E = s.fromBytes(p);
4253
- return r.fromBytes(b).multiply(E).toBytes(S);
4252
+ const S = s.fromBytes(p);
4253
+ return r.fromBytes(b).multiply(S).toBytes(E);
4254
4254
  }
4255
4255
  const f = {
4256
4256
  isValidSecretKey: o,
@@ -4272,8 +4272,8 @@ function on(r, e, s = {}) {
4272
4272
  lowS: typeof s.lowS == "boolean" ? s.lowS : !0,
4273
4273
  format: "compact",
4274
4274
  extraEntropy: !1
4275
- }, S = a * Os < o.ORDER;
4276
- function E(g) {
4275
+ }, E = a * Os < o.ORDER;
4276
+ function S(g) {
4277
4277
  const m = a >> Ce;
4278
4278
  return g > m;
4279
4279
  }
@@ -4282,8 +4282,8 @@ function on(r, e, s = {}) {
4282
4282
  throw new Error(`invalid signature ${g}: out of range 1..Point.Fn.ORDER`);
4283
4283
  return m;
4284
4284
  }
4285
- function R() {
4286
- if (S)
4285
+ function k() {
4286
+ if (E)
4287
4287
  throw new Error('"recovered" sig type is not supported for cofactor >2 curves');
4288
4288
  }
4289
4289
  function F(g, m) {
@@ -4297,7 +4297,7 @@ function on(r, e, s = {}) {
4297
4297
  P(this, "s");
4298
4298
  P(this, "recovery");
4299
4299
  if (this.r = A("r", m), this.s = A("s", T), O != null) {
4300
- if (R(), ![0, 1, 2, 3].includes(O))
4300
+ if (k(), ![0, 1, 2, 3].includes(O))
4301
4301
  throw new Error("invalid recovery id");
4302
4302
  this.recovery = O;
4303
4303
  }
@@ -4330,20 +4330,20 @@ function on(r, e, s = {}) {
4330
4330
  const { r: T, s: O } = this, D = this.assertRecovery(), w = D === 2 || D === 3 ? T + a : T;
4331
4331
  if (!o.isValid(w))
4332
4332
  throw new Error("invalid recovery id: sig.r+curve.n != R.x");
4333
- const y = o.toBytes(w), v = r.fromBytes(ve(Ps((D & 1) === 0), y)), I = i.inv(w), k = q(z(m, void 0, "msgHash")), H = i.create(-k * I), B = i.create(O * I), N = r.BASE.multiplyUnsafe(H).add(v.multiplyUnsafe(B));
4333
+ const y = o.toBytes(w), v = r.fromBytes(ve(Ps((D & 1) === 0), y)), I = i.inv(w), R = q(z(m, void 0, "msgHash")), H = i.create(-R * I), B = i.create(O * I), N = r.BASE.multiplyUnsafe(H).add(v.multiplyUnsafe(B));
4334
4334
  if (N.is0())
4335
4335
  throw new Error("invalid recovery: point at infinify");
4336
4336
  return N.assertValidity(), N;
4337
4337
  }
4338
4338
  // Signatures should be low-s, to prevent malleability.
4339
4339
  hasHighS() {
4340
- return E(this.s);
4340
+ return S(this.s);
4341
4341
  }
4342
4342
  toBytes(m = b.format) {
4343
4343
  if (ft(m), m === "der")
4344
4344
  return Ve(Se.hexFromSig(this));
4345
4345
  const { r: T, s: O } = this, D = i.toBytes(T), w = i.toBytes(O);
4346
- return m === "recovered" ? (R(), ve(Uint8Array.of(this.assertRecovery()), D, w)) : ve(D, w);
4346
+ return m === "recovered" ? (k(), ve(Uint8Array.of(this.assertRecovery()), D, w)) : ve(D, w);
4347
4347
  }
4348
4348
  toHex(m) {
4349
4349
  return Fe(this.toBytes(m));
@@ -4374,7 +4374,7 @@ function on(r, e, s = {}) {
4374
4374
  const N = w === !0 ? t(p.secretKey) : w;
4375
4375
  I.push(z(N, void 0, "extraEntropy"));
4376
4376
  }
4377
- const k = ve(...I), H = y;
4377
+ const R = ve(...I), H = y;
4378
4378
  function B(N) {
4379
4379
  const G = K(N);
4380
4380
  if (!i.isValidNot0(G))
@@ -4386,9 +4386,9 @@ function on(r, e, s = {}) {
4386
4386
  if (te === ge)
4387
4387
  return;
4388
4388
  let At = (ie.x === V ? 0 : 2) | Number(ie.y & Ce), Tt = te;
4389
- return O && E(te) && (Tt = i.neg(te), At ^= 1), new M(V, Tt, S ? void 0 : At);
4389
+ return O && S(te) && (Tt = i.neg(te), At ^= 1), new M(V, Tt, E ? void 0 : At);
4390
4390
  }
4391
- return { seed: k, k2sig: B };
4391
+ return { seed: R, k2sig: B };
4392
4392
  }
4393
4393
  function U(g, m, T = {}) {
4394
4394
  const { seed: O, k2sig: D } = Q(g, m, T);
@@ -4405,8 +4405,8 @@ function on(r, e, s = {}) {
4405
4405
  const v = M.fromBytes(g, y), I = r.fromBytes(T);
4406
4406
  if (D && v.hasHighS())
4407
4407
  return !1;
4408
- const { r: k, s: H } = v, B = q(m), N = i.inv(H), G = i.create(B * N), j = i.create(k * N), ie = r.BASE.multiplyUnsafe(G).add(I.multiplyUnsafe(j));
4409
- return ie.is0() ? !1 : i.create(ie.x) === k;
4408
+ const { r: R, s: H } = v, B = q(m), N = i.inv(H), G = i.create(B * N), j = i.create(R * N), ie = r.BASE.multiplyUnsafe(G).add(I.multiplyUnsafe(j));
4409
+ return ie.is0() ? !1 : i.create(ie.x) === R;
4410
4410
  } catch {
4411
4411
  return !1;
4412
4412
  }
@@ -4446,7 +4446,7 @@ const vt = {
4446
4446
  ]
4447
4447
  }, Xt = /* @__PURE__ */ BigInt(2);
4448
4448
  function cn(r) {
4449
- const e = vt.p, s = BigInt(3), t = BigInt(6), n = BigInt(11), o = BigInt(22), i = BigInt(23), a = BigInt(44), c = BigInt(88), l = r * r * r % e, u = l * l * r % e, f = ce(u, s, e) * u % e, _ = ce(f, s, e) * u % e, p = ce(_, Xt, e) * l % e, b = ce(p, n, e) * p % e, S = ce(b, o, e) * b % e, E = ce(S, a, e) * S % e, A = ce(E, c, e) * E % e, R = ce(A, a, e) * S % e, F = ce(R, s, e) * u % e, M = ce(F, i, e) * b % e, K = ce(M, t, e) * l % e, q = ce(K, Xt, e);
4449
+ const e = vt.p, s = BigInt(3), t = BigInt(6), n = BigInt(11), o = BigInt(22), i = BigInt(23), a = BigInt(44), c = BigInt(88), l = r * r * r % e, u = l * l * r % e, f = ce(u, s, e) * u % e, _ = ce(f, s, e) * u % e, p = ce(_, Xt, e) * l % e, b = ce(p, n, e) * p % e, E = ce(b, o, e) * b % e, S = ce(E, a, e) * E % e, A = ce(S, c, e) * S % e, k = ce(A, a, e) * E % e, F = ce(k, s, e) * u % e, M = ce(F, i, e) * b % e, K = ce(M, t, e) * l % e, q = ce(K, Xt, e);
4450
4450
  if (!_t.eql(_t.sqr(q), r))
4451
4451
  throw new Error("Cannot find square root");
4452
4452
  return q;
@@ -4632,11 +4632,11 @@ ${t.length}`
4632
4632
  const i = Qt(o), a = s.startsWith("0x") ? s.slice(2) : s;
4633
4633
  if (a.length !== 130)
4634
4634
  throw new Error(`서명 길이가 유효하지 않습니다: 130 hex 문자 예상, 현재 ${a.length}`);
4635
- const c = Sn(a), l = c.slice(0, 32), u = c.slice(32, 64), f = c[64], _ = f >= 27 ? f - 27 : f, S = new dn.Signature(
4635
+ const c = Sn(a), l = c.slice(0, 32), u = c.slice(32, 64), f = c[64], _ = f >= 27 ? f - 27 : f, E = new dn.Signature(
4636
4636
  es(l),
4637
4637
  es(u)
4638
- ).addRecoveryBit(_).recoverPublicKey(i).toBytes(!1).slice(1), E = Qt(S);
4639
- return "0x" + Fe(E.slice(12));
4638
+ ).addRecoveryBit(_).recoverPublicKey(i).toBytes(!1).slice(1), S = Qt(E);
4639
+ return "0x" + Fe(S.slice(12));
4640
4640
  }
4641
4641
  }
4642
4642
  function Sn(r) {
@@ -4782,20 +4782,20 @@ class Ie {
4782
4782
  }
4783
4783
  const p = setTimeout(() => {
4784
4784
  d.warn("[CROSSx] OAuth 타임아웃 (5분) — postMessage를 수신하지 못했습니다"), M(), t(new Error("Authentication timeout"));
4785
- }, 5 * 60 * 1e3), b = 10, S = 30;
4786
- let E = 0, A = null;
4787
- const R = () => {
4788
- clearInterval(F), d.warn("[CROSSx] COOP 감지 — OAuth 서버 응답을 " + S + "초간 대기합니다"), A = setTimeout(() => {
4785
+ }, 5 * 60 * 1e3), b = 10, E = 30;
4786
+ let S = 0, A = null;
4787
+ const k = () => {
4788
+ clearInterval(F), d.warn("[CROSSx] COOP 감지 — OAuth 서버 응답을 " + E + "초간 대기합니다"), A = setTimeout(() => {
4789
4789
  M(), t(new Error(
4790
4790
  "OAuth 서버로부터 응답을 받지 못했습니다. 브라우저 보안 정책(COOP)으로 인해 팝업 통신이 차단되었을 수 있습니다. 다시 시도해 주세요."
4791
4791
  ));
4792
- }, S * 1e3);
4792
+ }, E * 1e3);
4793
4793
  }, F = setInterval(() => {
4794
- E++;
4794
+ S++;
4795
4795
  try {
4796
- _.closed && (E <= b ? R() : (M(), t(new Error("로그인이 취소되었습니다"))));
4796
+ _.closed && (S <= b ? k() : (M(), t(new Error("로그인이 취소되었습니다"))));
4797
4797
  } catch {
4798
- R();
4798
+ k();
4799
4799
  }
4800
4800
  }, 1e3), M = () => {
4801
4801
  clearTimeout(p), clearInterval(F), A && clearTimeout(A), window.removeEventListener("message", K);
@@ -5070,19 +5070,19 @@ class Ae {
5070
5070
  url: i,
5071
5071
  method: e
5072
5072
  });
5073
- const S = Ae.mapGatewayError(p.code, p.data);
5074
- if (S === h.AUTH_NOT_AUTHENTICATED && !n && this._onTokenRefresh) {
5073
+ const E = Ae.mapGatewayError(p.code, p.data);
5074
+ if (E === h.AUTH_NOT_AUTHENTICATED && !n && this._onTokenRefresh) {
5075
5075
  if (d.warn("[CROSSx] Gateway -10002 감지 — 토큰 갱신 후 재시도"), await this.deduplicatedRefresh())
5076
5076
  return this.request(e, s, t, !0);
5077
5077
  throw new x(h.SESSION_EXPIRED, "인증 세션이 만료되었습니다. 다시 로그인해 주세요.");
5078
5078
  }
5079
- if (S === h.USER_NOT_FOUND)
5079
+ if (E === h.USER_NOT_FOUND)
5080
5080
  throw d.warn("[CROSSx] Gateway -10033 감지 — 유저 미존재, 강제 로그아웃"), (c = this._onUnauthorized) == null || c.call(this), new x(
5081
5081
  h.USER_NOT_FOUND,
5082
5082
  Ae.getGatewayErrorMessage(p.code, b)
5083
5083
  );
5084
- const E = S === h.AUTH_NOT_AUTHENTICATED ? h.SESSION_EXPIRED : S, A = E === h.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : Ae.getGatewayErrorMessage(p.code, b), R = p.data, F = S === h.PIN_LOCKED ? Ae.extractLockDetails(R) : R ?? void 0;
5085
- throw new x(E, A, F);
5084
+ const S = E === h.AUTH_NOT_AUTHENTICATED ? h.SESSION_EXPIRED : E, A = S === h.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : Ae.getGatewayErrorMessage(p.code, b), k = p.data, F = E === h.PIN_LOCKED ? Ae.extractLockDetails(k) : k ?? void 0;
5085
+ throw new x(S, A, F);
5086
5086
  }
5087
5087
  return d.log("[CROSSx] Wallet Gateway API 성공:", { code: p.code, url: i, method: e }), p.data ?? p;
5088
5088
  }
@@ -5099,16 +5099,16 @@ class Ae {
5099
5099
  );
5100
5100
  }
5101
5101
  if ((u = _.response) != null && u.data) {
5102
- const b = _.response.data, S = b.message || b.data || "API 요청에 실패했습니다", E = b.code || "UNKNOWN";
5102
+ const b = _.response.data, E = b.message || b.data || "API 요청에 실패했습니다", S = b.code || "UNKNOWN";
5103
5103
  throw d.error("[CROSSx] Wallet Gateway API 에러 (HTTP 에러):", {
5104
- code: E,
5105
- message: S,
5104
+ code: S,
5105
+ message: E,
5106
5106
  url: i,
5107
5107
  method: e,
5108
5108
  status: (f = _.response) == null ? void 0 : f.status
5109
5109
  }), new x(
5110
5110
  h.UNKNOWN_ERROR,
5111
- `Wallet Gateway 오류 (${E}): ${S}`
5111
+ `Wallet Gateway 오류 (${S}): ${E}`
5112
5112
  );
5113
5113
  }
5114
5114
  throw _;
@@ -6776,6 +6776,30 @@ const Rn = `
6776
6776
  border: 1px solid var(--cx-border);
6777
6777
  border-radius: 20px;
6778
6778
  box-sizing: border-box;
6779
+ box-shadow: none;
6780
+ }
6781
+ button.__crossx-connect-other-block {
6782
+ cursor: pointer;
6783
+ font: inherit;
6784
+ text-align: left;
6785
+ appearance: none;
6786
+ -webkit-appearance: none;
6787
+ -webkit-tap-highlight-color: transparent;
6788
+ outline: none;
6789
+ min-width: 0;
6790
+ }
6791
+ button.__crossx-connect-other-block::-moz-focus-inner {
6792
+ border: 0;
6793
+ }
6794
+ button.__crossx-connect-other-block:hover,
6795
+ button.__crossx-connect-other-block:focus,
6796
+ button.__crossx-connect-other-block:active {
6797
+ opacity: 1 !important;
6798
+ box-shadow: none !important;
6799
+ outline: none !important;
6800
+ filter: none !important;
6801
+ transform: none !important;
6802
+ background: var(--cx-pill-bg) !important;
6779
6803
  }
6780
6804
  .__crossx-connect-other-text {
6781
6805
  display: flex;
@@ -6785,29 +6809,15 @@ const Rn = `
6785
6809
  justify-content: center;
6786
6810
  gap: 6px;
6787
6811
  min-width: 0;
6812
+ width: 100%;
6788
6813
  }
6789
- .__crossx-connect-other-wallet--inline {
6814
+ .__crossx-connect-other-wallet-desc-part {
6790
6815
  display: inline-flex;
6791
6816
  align-items: center;
6792
6817
  gap: 6px;
6793
6818
  vertical-align: middle;
6794
- margin: 0;
6795
- padding: 0;
6796
- background: none;
6797
- border: none;
6798
- border-radius: 0;
6799
- color: inherit;
6800
- font: inherit;
6801
- font-size: inherit;
6802
- font-weight: inherit;
6803
- line-height: inherit;
6804
- text-decoration: none;
6805
- cursor: default;
6806
6819
  user-select: none;
6807
6820
  -webkit-user-select: none;
6808
- -webkit-tap-highlight-color: transparent;
6809
- box-shadow: none;
6810
- outline: none;
6811
6821
  }
6812
6822
  .__crossx-connect-other-wallet-icon {
6813
6823
  display: inline-flex;
@@ -6819,21 +6829,6 @@ const Rn = `
6819
6829
  width: 16px;
6820
6830
  height: 16px;
6821
6831
  }
6822
- .__crossx-connect-other-wallet--inline:hover,
6823
- .__crossx-connect-other-wallet--inline:active {
6824
- color: inherit;
6825
- text-decoration: none;
6826
- opacity: 1;
6827
- background: none;
6828
- box-shadow: none;
6829
- }
6830
- .__crossx-connect-other-wallet--inline:focus {
6831
- outline: none;
6832
- }
6833
- .__crossx-connect-other-wallet--inline:focus-visible {
6834
- outline: 1px dotted var(--cx-hint);
6835
- outline-offset: 2px;
6836
- }
6837
6832
  .__crossx-connect-other-title {
6838
6833
  font-size: 18px;
6839
6834
  font-weight: 700;
@@ -6851,7 +6846,9 @@ const Rn = `
6851
6846
  text-align: left;
6852
6847
  }
6853
6848
  .__crossx-connect-other-summary {
6849
+ display: block;
6854
6850
  margin: 0;
6851
+ width: 100%;
6855
6852
  }
6856
6853
  /* ── Wallet Selector Modal ─────────────────────────────────── */
6857
6854
  .__crossx-wallet-list {
@@ -8035,8 +8032,8 @@ function zn(r, e) {
8035
8032
  function Vn(r, e, s) {
8036
8033
  const t = e.status !== "reverted" && e.status !== "timeout", n = e.status === "timeout", o = r.querySelector("#__crossx-ttl"), i = r.querySelector(".__crossx-header");
8037
8034
  if (o) {
8038
- const b = n ? Hn : t ? "" : Un, S = n ? "Transaction timeout" : t ? "Transaction complete" : "Transaction failed";
8039
- b ? (o.style.display = "flex", o.style.alignItems = "center", o.style.gap = "8px", o.innerHTML = `${b}<span>${S}</span>`) : o.textContent = S;
8035
+ const b = n ? Hn : t ? "" : Un, E = n ? "Transaction timeout" : t ? "Transaction complete" : "Transaction failed";
8036
+ b ? (o.style.display = "flex", o.style.alignItems = "center", o.style.gap = "8px", o.innerHTML = `${b}<span>${E}</span>`) : o.textContent = E;
8040
8037
  }
8041
8038
  if (i && !r.querySelector("#__crossx-close-btn")) {
8042
8039
  const b = document.createElement("button");
@@ -8062,11 +8059,11 @@ function Vn(r, e, s) {
8062
8059
  ${p}
8063
8060
  <button class="__crossx-approve-btn" id="__crossx-done-btn">${t ? "All Done" : "Done"}</button>
8064
8061
  `, a.querySelectorAll(".__crossx-copy-btn").forEach((b) => {
8065
- b.addEventListener("click", (S) => {
8062
+ b.addEventListener("click", (E) => {
8066
8063
  var A;
8067
- S.stopPropagation();
8068
- const E = b.dataset.copy;
8069
- E && ((A = navigator.clipboard) == null || A.writeText(E).catch(() => {
8064
+ E.stopPropagation();
8065
+ const S = b.dataset.copy;
8066
+ S && ((A = navigator.clipboard) == null || A.writeText(S).catch(() => {
8070
8067
  }));
8071
8068
  });
8072
8069
  });
@@ -8212,8 +8209,8 @@ const Zn = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="h
8212
8209
  <path d="M20.5 8.76c2.69 0 5.1.92 7 2.73l5.24-5.24C29.58 3.36 25.43 1.5 20.5 1.5A18.49 18.49 0 0 0 4.16 11.59l6.08 4.72C11.68 11.98 15.73 8.76 20.5 8.76z" fill="#EA4335"/>
8213
8210
  </svg>`;
8214
8211
  function eo(r) {
8215
- const e = Vs(r), s = Bn[r] ?? "";
8216
- return `<span role="button" tabindex="0" class="__crossx-connect-other-wallet--inline" data-wallet-id="${L(String(r))}"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${s}</span><span class="__crossx-connect-other-wallet-name">${L(e)}</span></span>`;
8212
+ const e = Vs(r);
8213
+ return `<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${Bn[r] ?? ""}</span><span class="__crossx-connect-other-wallet-name">${L(e)}</span></span>`;
8217
8214
  }
8218
8215
  function to(r) {
8219
8216
  if (r.length === 0) return "";
@@ -8228,17 +8225,17 @@ function to(r) {
8228
8225
  return `${s}${e(0)}, ${e(1)}, ${e(2)}, and ${t} more.`;
8229
8226
  }
8230
8227
  function so(r, e = []) {
8231
- const s = r, t = e.length > 0 ? `
8228
+ const s = r, t = L(String(e[0])), n = e.length > 0 ? `
8232
8229
  <div class="__crossx-login-or-divider">
8233
8230
  <hr><span>or</span><hr>
8234
8231
  </div>
8235
- <div class="__crossx-connect-other-block">
8236
- <div class="__crossx-connect-other-text">
8237
- <span class="__crossx-connect-other-title">Connect with Other Wallets</span>
8238
- <p class="__crossx-connect-other-desc __crossx-connect-other-summary">${to(e)}</p>
8239
- </div>
8240
- </div>` : "", n = document.createElement("div");
8241
- return n.id = ee, n.innerHTML = `
8232
+ <button type="button" class="__crossx-connect-other-block" id="__crossx-connect-other-wallet-btn" data-wallet-id="${t}" aria-labelledby="__crossx-connect-other-heading">
8233
+ <span class="__crossx-connect-other-text">
8234
+ <span class="__crossx-connect-other-title" id="__crossx-connect-other-heading">Connect with Other Wallets</span>
8235
+ <span class="__crossx-connect-other-desc __crossx-connect-other-summary">${to(e)}</span>
8236
+ </span>
8237
+ </button>` : "", o = document.createElement("div");
8238
+ return o.id = ee, o.innerHTML = `
8242
8239
  <div class="__crossx-card __crossx-card--migration" style="${ae(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
8243
8240
  <div class="__crossx-header">
8244
8241
  <div style="display:flex;flex-direction:column;gap:4px;padding-right:36px;">
@@ -8258,13 +8255,13 @@ function so(r, e = []) {
8258
8255
  <span class="__crossx-login-icon">${Qn}</span>
8259
8256
  <span class="__crossx-login-btn-label">Sign in with&nbsp;&nbsp;Google</span>
8260
8257
  </button>
8261
- </div>${t}
8258
+ </div>${n}
8262
8259
  <p class="__crossx-login-terms">
8263
8260
  By continuing, you agree to NEXUS&nbsp;<a class="__crossx-login-terms-link" href="https://terms.crosstoken.io/docs/cross-terms-of-use" target="_blank" rel="noopener noreferrer">Terms of Service</a>&nbsp;and consent to its&nbsp;<a class="__crossx-login-terms-link" href="https://terms.crosstoken.io/docs/nexus-privacy-policy" target="_blank" rel="noopener noreferrer">Privacy Policy.</a>
8264
8261
  </p>
8265
8262
  </div>
8266
8263
  </div>
8267
- `, n;
8264
+ `, o;
8268
8265
  }
8269
8266
  function ro(r, e) {
8270
8267
  const s = r, t = document.createElement("div");
@@ -8419,10 +8416,10 @@ function lt(r) {
8419
8416
  <span id="__crossx-pin6-lock-countdown"></span>
8420
8417
  </p>` : "", a = r.warningMessage && r.attemptCount != null && r.attemptCount > 0 ? `<p class="__crossx-pin6-warning" id="__crossx-pin6-warning">${L(r.warningMessage)}</p>` : '<p class="__crossx-pin6-warning" id="__crossx-pin6-warning"></p>', c = r.attemptCount != null && r.attemptCount > 0 ? `<p class="__crossx-pin6-attempt" id="__crossx-pin6-attempt">${r.attemptCount}/${r.maxAttempts ?? "?"}</p>` : '<p class="__crossx-pin6-attempt" id="__crossx-pin6-attempt"></p>', l = e ? " --locked" : "", u = Array.from(
8421
8418
  { length: 6 },
8422
- (S, E) => `<input class="__crossx-pin6-box${l}" type="password" maxlength="1" inputmode="numeric" pattern="[0-9]" autocomplete="off" aria-label="PIN digit ${E + 1}"${e ? " disabled" : ""}>`
8419
+ (E, S) => `<input class="__crossx-pin6-box${l}" type="password" maxlength="1" inputmode="numeric" pattern="[0-9]" autocomplete="off" aria-label="PIN digit ${S + 1}"${e ? " disabled" : ""}>`
8423
8420
  ).join(""), f = e ? " --locked" : "", _ = Array.from(
8424
8421
  { length: 6 },
8425
- (S, E) => `<div class="__crossx-pin6-dot${f}" data-dot-index="${E}" aria-label="PIN digit ${E + 1}"></div>`
8422
+ (E, S) => `<div class="__crossx-pin6-dot${f}" data-dot-index="${S}" aria-label="PIN digit ${S + 1}"></div>`
8426
8423
  ).join(""), p = e ? " --disabled" : "", b = `
8427
8424
  <div class="__crossx-pin6-numpad" id="__crossx-pin6-numpad">
8428
8425
  <div class="__crossx-pin6-numpad-row">
@@ -8491,18 +8488,18 @@ function uo(r) {
8491
8488
  function dt(r, e, s, t, n, o, i) {
8492
8489
  var O, D;
8493
8490
  let a = !!(o && o > Date.now()), c = !1;
8494
- const l = () => Array.from(r.querySelectorAll(".__crossx-pin6-box")), u = () => r.querySelector("#__crossx-pin6-boxes"), f = () => r.querySelector("#__crossx-pin6-error"), _ = () => r.querySelector("#__crossx-pin6-lock-msg"), p = () => r.querySelector("#__crossx-pin6-lock-countdown"), b = () => r.querySelector(".__crossx-pin6-body"), S = () => l().map((w) => w.value).join(""), E = () => Array.from(r.querySelectorAll(".__crossx-pin6-dot")), A = () => {
8491
+ const l = () => Array.from(r.querySelectorAll(".__crossx-pin6-box")), u = () => r.querySelector("#__crossx-pin6-boxes"), f = () => r.querySelector("#__crossx-pin6-error"), _ = () => r.querySelector("#__crossx-pin6-lock-msg"), p = () => r.querySelector("#__crossx-pin6-lock-countdown"), b = () => r.querySelector(".__crossx-pin6-body"), E = () => l().map((w) => w.value).join(""), S = () => Array.from(r.querySelectorAll(".__crossx-pin6-dot")), A = () => {
8495
8492
  var v;
8496
- const w = l(), y = E();
8497
- if (y.length && (y.forEach((I, k) => {
8498
- const H = !!(w[k] && w[k].value);
8493
+ const w = l(), y = S();
8494
+ if (y.length && (y.forEach((I, R) => {
8495
+ const H = !!(w[R] && w[R].value);
8499
8496
  I.classList.toggle("--filled", H), I.classList.toggle("--active", !1);
8500
8497
  }), !a && !c)) {
8501
8498
  const I = w.findIndex((H) => !H.value);
8502
8499
  (v = y[I === -1 ? 5 : I]) == null || v.classList.add("--active");
8503
8500
  }
8504
- }, R = () => {
8505
- r.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach((y) => y.classList.toggle("--disabled", a)), E().forEach((y) => y.classList.toggle("--locked", a)), A();
8501
+ }, k = () => {
8502
+ r.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach((y) => y.classList.toggle("--disabled", a)), S().forEach((y) => y.classList.toggle("--locked", a)), A();
8506
8503
  }, F = (w) => {
8507
8504
  a = w, l().forEach((y) => {
8508
8505
  y.disabled = w, y.classList.toggle("--locked", w);
@@ -8527,8 +8524,8 @@ function dt(r, e, s, t, n, o, i) {
8527
8524
  let v = M();
8528
8525
  if (!v) {
8529
8526
  v = document.createElement("p"), v.className = "__crossx-pin6-attempt", v.id = "__crossx-pin6-attempt";
8530
- const k = Z() ?? f();
8531
- k ? k.insertAdjacentElement("afterend", v) : (I = b()) == null || I.appendChild(v);
8527
+ const R = Z() ?? f();
8528
+ R ? R.insertAdjacentElement("afterend", v) : (I = b()) == null || I.appendChild(v);
8532
8529
  }
8533
8530
  v.textContent = `${w}/${y}`;
8534
8531
  }, U = () => {
@@ -8548,7 +8545,7 @@ function dt(r, e, s, t, n, o, i) {
8548
8545
  var H;
8549
8546
  F(!0), l().forEach((B) => {
8550
8547
  B.value = "";
8551
- }), R();
8548
+ }), k();
8552
8549
  const y = f();
8553
8550
  if (y && (y.textContent = "Too many failed attempts. Please wait."), !_()) {
8554
8551
  const B = document.createElement("p");
@@ -8559,19 +8556,19 @@ function dt(r, e, s, t, n, o, i) {
8559
8556
  const v = () => {
8560
8557
  var G;
8561
8558
  const B = w - Date.now(), N = p();
8562
- B <= 0 ? (clearInterval(I), F(!1), (G = _()) == null || G.remove(), y && (y.textContent = ""), R(), setTimeout(() => {
8559
+ B <= 0 ? (clearInterval(I), F(!1), (G = _()) == null || G.remove(), y && (y.textContent = ""), k(), setTimeout(() => {
8563
8560
  var j;
8564
8561
  return (j = l()[0]) == null ? void 0 : j.focus();
8565
8562
  }, 50)) : N && (N.textContent = ` ${uo(B)}`);
8566
8563
  }, I = setInterval(v, 1e3);
8567
8564
  v();
8568
- const k = new MutationObserver(() => {
8569
- document.contains(r) || (clearInterval(I), k.disconnect());
8565
+ const R = new MutationObserver(() => {
8566
+ document.contains(r) || (clearInterval(I), R.disconnect());
8570
8567
  });
8571
- k.observe(document.body, { childList: !0, subtree: !1 });
8568
+ R.observe(document.body, { childList: !0, subtree: !1 });
8572
8569
  }, g = async () => {
8573
8570
  if (a || c) return;
8574
- const w = S();
8571
+ const w = E();
8575
8572
  if (w.length === 6) {
8576
8573
  c = !0, l().forEach((y) => {
8577
8574
  y.disabled = !0;
@@ -8609,9 +8606,9 @@ function dt(r, e, s, t, n, o, i) {
8609
8606
  w.addEventListener("input", () => {
8610
8607
  var I;
8611
8608
  const v = w.value.replace(/\D/g, "").slice(-1);
8612
- w.value = v, K(), v && y < 5 && ((I = l()[y + 1]) == null || I.focus()), A(), S().length === 6 && setTimeout(g, 80);
8609
+ w.value = v, K(), v && y < 5 && ((I = l()[y + 1]) == null || I.focus()), A(), E().length === 6 && setTimeout(g, 80);
8613
8610
  }), w.addEventListener("keydown", (v) => {
8614
- var I, k;
8611
+ var I, R;
8615
8612
  if (v.key === "Backspace") {
8616
8613
  if (v.preventDefault(), w.value)
8617
8614
  w.value = "";
@@ -8620,16 +8617,16 @@ function dt(r, e, s, t, n, o, i) {
8620
8617
  H.value = "", H.focus();
8621
8618
  }
8622
8619
  A();
8623
- } else v.key === "ArrowLeft" && y > 0 ? (v.preventDefault(), (I = l()[y - 1]) == null || I.focus()) : v.key === "ArrowRight" && y < 5 ? (v.preventDefault(), (k = l()[y + 1]) == null || k.focus()) : v.key === "Escape" && s();
8620
+ } else v.key === "ArrowLeft" && y > 0 ? (v.preventDefault(), (I = l()[y - 1]) == null || I.focus()) : v.key === "ArrowRight" && y < 5 ? (v.preventDefault(), (R = l()[y + 1]) == null || R.focus()) : v.key === "Escape" && s();
8624
8621
  }), w.addEventListener("paste", (v) => {
8625
8622
  var H, B;
8626
8623
  v.preventDefault();
8627
8624
  const I = (((H = v.clipboardData) == null ? void 0 : H.getData("text")) ?? "").replace(/\D/g, "").slice(0, 6);
8628
8625
  if (!I) return;
8629
- const k = l();
8626
+ const R = l();
8630
8627
  I.split("").forEach((N, G) => {
8631
- k[G] && (k[G].value = N);
8632
- }), (B = k[Math.min(I.length - 1, 5)]) == null || B.focus(), K(), A(), S().length === 6 && setTimeout(g, 80);
8628
+ R[G] && (R[G].value = N);
8629
+ }), (B = R[Math.min(I.length - 1, 5)]) == null || B.focus(), K(), A(), E().length === 6 && setTimeout(g, 80);
8633
8630
  }), w.addEventListener("focus", () => w.select());
8634
8631
  });
8635
8632
  const T = r.querySelector("#__crossx-pin6-numpad");
@@ -8639,28 +8636,28 @@ function dt(r, e, s, t, n, o, i) {
8639
8636
  w && (w.classList.remove("--pressed"), w = null);
8640
8637
  };
8641
8638
  T.addEventListener("pointerdown", (I) => {
8642
- const k = I.target.closest(".__crossx-pin6-numpad-key");
8643
- !k || a || c || (y(), w = k, k.classList.add("--pressed"), k.setPointerCapture(I.pointerId));
8639
+ const R = I.target.closest(".__crossx-pin6-numpad-key");
8640
+ !R || a || c || (y(), w = R, R.classList.add("--pressed"), R.setPointerCapture(I.pointerId));
8644
8641
  });
8645
8642
  const v = (I) => {
8646
- const k = I.dataset.key;
8647
- if (!k) return;
8648
- if (k === "backspace") {
8643
+ const R = I.dataset.key;
8644
+ if (!R) return;
8645
+ if (R === "backspace") {
8649
8646
  const G = [...l()].reverse().find((j) => j.value);
8650
8647
  G && (G.value = "", K()), A();
8651
8648
  return;
8652
8649
  }
8653
- if (!/^\d$/.test(k)) return;
8650
+ if (!/^\d$/.test(R)) return;
8654
8651
  const B = l().find((N) => !N.value);
8655
- B && (B.value = k, K(), A(), S().length === 6 && setTimeout(g, 80));
8652
+ B && (B.value = R, K(), A(), E().length === 6 && setTimeout(g, 80));
8656
8653
  };
8657
8654
  T.addEventListener("pointerup", (I) => {
8658
8655
  if (!w) return;
8659
- const k = w;
8656
+ const R = w;
8660
8657
  y();
8661
- const H = k.getBoundingClientRect();
8662
- I.clientX >= H.left && I.clientX <= H.right && I.clientY >= H.top && I.clientY <= H.bottom && !a && !c && v(k);
8663
- }), T.addEventListener("pointercancel", y), T.addEventListener("pointerleave", y, !0), A(), o && o > Date.now() && R();
8658
+ const H = R.getBoundingClientRect();
8659
+ I.clientX >= H.left && I.clientX <= H.right && I.clientY >= H.top && I.clientY <= H.bottom && !a && !c && v(R);
8660
+ }), T.addEventListener("pointercancel", y), T.addEventListener("pointerleave", y, !0), A(), o && o > Date.now() && k();
8664
8661
  }
8665
8662
  }
8666
8663
  const ho = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -8727,23 +8724,23 @@ class xo {
8727
8724
  */
8728
8725
  showWalletSelector(e, s, t) {
8729
8726
  return new Promise((n) => {
8730
- var S;
8727
+ var E;
8731
8728
  le();
8732
8729
  const o = [...e], i = Jn(o, this.tokens, t), a = Oe();
8733
8730
  de(i);
8734
8731
  let c = !1;
8735
8732
  const l = () => {
8736
8733
  c || (c = !0, i.remove(), a());
8737
- }, u = (E) => {
8738
- l(), n(E);
8734
+ }, u = (S) => {
8735
+ l(), n(S);
8739
8736
  }, f = () => {
8740
8737
  l(), n(null);
8741
8738
  };
8742
8739
  (() => {
8743
- i.querySelectorAll(".__crossx-wallet-item").forEach((E) => {
8744
- E.addEventListener("click", () => {
8745
- const A = E.dataset.walletAddress ?? "", R = parseInt(E.dataset.walletIndex ?? "0", 10);
8746
- u({ address: A, index: R });
8740
+ i.querySelectorAll(".__crossx-wallet-item").forEach((S) => {
8741
+ S.addEventListener("click", () => {
8742
+ const A = S.dataset.walletAddress ?? "", k = parseInt(S.dataset.walletIndex ?? "0", 10);
8743
+ u({ address: A, index: k });
8747
8744
  });
8748
8745
  });
8749
8746
  })();
@@ -8751,22 +8748,22 @@ class xo {
8751
8748
  p && p.addEventListener("click", async () => {
8752
8749
  p.disabled = !0;
8753
8750
  try {
8754
- const E = await s();
8755
- o.push(E);
8751
+ const S = await s();
8752
+ o.push(S);
8756
8753
  const A = i.querySelector("#__crossx-wallet-list");
8757
8754
  if (A) {
8758
- const R = document.createElement("button");
8759
- R.className = "__crossx-wallet-item", R.dataset.walletIndex = String(E.index), R.dataset.walletAddress = E.address, R.innerHTML = `<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">Account ${E.index + 1}</span><span class="__crossx-wallet-addr">${re(E.address)}</span></span>`, R.addEventListener("click", () => u(E)), A.appendChild(R), R.scrollIntoView({ behavior: "smooth", block: "nearest" });
8755
+ const k = document.createElement("button");
8756
+ k.className = "__crossx-wallet-item", k.dataset.walletIndex = String(S.index), k.dataset.walletAddress = S.address, k.innerHTML = `<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">Account ${S.index + 1}</span><span class="__crossx-wallet-addr">${re(S.address)}</span></span>`, k.addEventListener("click", () => u(S)), A.appendChild(k), k.scrollIntoView({ behavior: "smooth", block: "nearest" });
8760
8757
  }
8761
8758
  } catch {
8762
8759
  } finally {
8763
8760
  p.disabled = !1;
8764
8761
  }
8765
- }), (S = i.querySelector("#__crossx-close-btn")) == null || S.addEventListener("click", f), i.addEventListener("click", (E) => {
8766
- E.target === i && f();
8762
+ }), (E = i.querySelector("#__crossx-close-btn")) == null || E.addEventListener("click", f), i.addEventListener("click", (S) => {
8763
+ S.target === i && f();
8767
8764
  });
8768
- const b = (E) => {
8769
- E.key === "Escape" && (document.removeEventListener("keydown", b), f());
8765
+ const b = (S) => {
8766
+ S.key === "Escape" && (document.removeEventListener("keydown", b), f());
8770
8767
  };
8771
8768
  document.addEventListener("keydown", b);
8772
8769
  });
@@ -8774,7 +8771,7 @@ class xo {
8774
8771
  /**
8775
8772
  * 로그인 프로바이더 선택 팝업: "CROSS Wallet"
8776
8773
  * Apple / Google 버튼을 표시하고 선택된 프로바이더를 반환합니다.
8777
- * `connectOtherWallets`가 비어 있지 않으면 해당 목록을 "Connect with Other Wallets" 아래에 표시합니다.
8774
+ * `connectOtherWallets`가 비어 있지 않으면 카드 전체가 하나의 버튼이 되고, 목록은 설명 문구로만 표시됩니다. 선택 시 `walletId`는 배열의 첫 요소입니다.
8778
8775
  */
8779
8776
  showLoginSelector(e) {
8780
8777
  var t;
@@ -8782,7 +8779,7 @@ class xo {
8782
8779
  (n) => Object.values(Ue).includes(n) && String(n).trim() !== ""
8783
8780
  )) ?? [];
8784
8781
  return new Promise((n) => {
8785
- var _, p, b;
8782
+ var _, p, b, E;
8786
8783
  le();
8787
8784
  const o = so(this.tokens, s), i = Oe();
8788
8785
  de(o);
@@ -8795,18 +8792,13 @@ class xo {
8795
8792
  }, u = () => {
8796
8793
  a(), n(null);
8797
8794
  };
8798
- (_ = o.querySelector("#__crossx-apple-btn")) == null || _.addEventListener("click", () => c("apple")), (p = o.querySelector("#__crossx-google-btn")) == null || p.addEventListener("click", () => c("google")), o.querySelectorAll(".__crossx-connect-other-wallet--inline").forEach((S) => {
8799
- const E = () => {
8800
- const A = S.dataset.walletId ?? "";
8801
- l(A);
8802
- };
8803
- S.addEventListener("click", E), S.addEventListener("keydown", (A) => {
8804
- (A.key === "Enter" || A.key === " ") && (A.preventDefault(), E());
8805
- });
8806
- }), (b = o.querySelector("#__crossx-close-btn")) == null || b.addEventListener("click", u), o.addEventListener("click", (S) => {
8795
+ (_ = o.querySelector("#__crossx-apple-btn")) == null || _.addEventListener("click", () => c("apple")), (p = o.querySelector("#__crossx-google-btn")) == null || p.addEventListener("click", () => c("google")), (b = o.querySelector("#__crossx-connect-other-wallet-btn")) == null || b.addEventListener("click", (S) => {
8796
+ const k = S.currentTarget.dataset.walletId ?? "";
8797
+ k && l(k);
8798
+ }), (E = o.querySelector("#__crossx-close-btn")) == null || E.addEventListener("click", u), o.addEventListener("click", (S) => {
8807
8799
  S.target === o && u();
8808
8800
  }), o.querySelectorAll(".__crossx-login-terms-link").forEach((S) => {
8809
- S.addEventListener("click", (E) => E.stopPropagation());
8801
+ S.addEventListener("click", (A) => A.stopPropagation());
8810
8802
  });
8811
8803
  const f = (S) => {
8812
8804
  S.key === "Escape" && (document.removeEventListener("keydown", f), u());
@@ -8899,8 +8891,8 @@ class xo {
8899
8891
  let l = !1;
8900
8892
  const u = () => {
8901
8893
  l || (l = !0, a.remove(), c());
8902
- }, f = (R) => {
8903
- u(), s(R);
8894
+ }, f = (k) => {
8895
+ u(), s(k);
8904
8896
  }, _ = () => {
8905
8897
  u(), s(null);
8906
8898
  }, p = a.querySelector(".__crossx-card"), b = {
@@ -8909,32 +8901,32 @@ class xo {
8909
8901
  repeatingDigit: (t == null ? void 0 : t.pinValidation_repeatingDigit) ?? "Cannot use the same number 3+ times in a row.",
8910
8902
  sequential: (t == null ? void 0 : t.pinValidation_sequential) ?? "Sequential numbers (e.g., 123456) are not allowed.",
8911
8903
  alternatingPattern: (t == null ? void 0 : t.pinValidation_alternatingPattern) ?? "Repeating patterns (e.g., 121212) are not allowed."
8912
- }, S = (R) => {
8904
+ }, E = (k) => {
8913
8905
  var F;
8914
8906
  p.innerHTML = lt({
8915
8907
  title: i.title,
8916
8908
  headerSubtitle: i.headerSubtitle
8917
8909
  }), (F = p.querySelector("#__crossx-close-btn")) == null || F.addEventListener("click", _), dt(p, (M) => {
8918
- M === R ? f(R) : E(o.mismatchError);
8910
+ M === k ? f(k) : S(o.mismatchError);
8919
8911
  }, _);
8920
- }, E = (R) => {
8912
+ }, S = (k) => {
8921
8913
  var F;
8922
8914
  p.innerHTML = lt({
8923
8915
  title: o.title,
8924
8916
  headerSubtitle: o.headerSubtitle,
8925
8917
  subtitle: o.subtitle,
8926
- errorMessage: R
8918
+ errorMessage: k
8927
8919
  }), (F = p.querySelector("#__crossx-close-btn")) == null || F.addEventListener("click", _), dt(p, (M) => {
8928
8920
  const K = lo(M, b);
8929
- K ? E(K) : S(M);
8921
+ K ? S(K) : E(M);
8930
8922
  }, _);
8931
8923
  };
8932
8924
  (() => {
8933
8925
  var Q;
8934
- const R = Array.from(p.querySelectorAll(".__crossx-pw-notice-item")), F = p.querySelector("#__crossx-pin-notice-next"), M = /* @__PURE__ */ new Set();
8926
+ const k = Array.from(p.querySelectorAll(".__crossx-pw-notice-item")), F = p.querySelector("#__crossx-pin-notice-next"), M = /* @__PURE__ */ new Set();
8935
8927
  F.removeAttribute("disabled");
8936
8928
  const K = F.dataset.nextLabel ?? "Next", q = F.dataset.submitLabel ?? "I Understand", Z = () => {
8937
- const U = M.size === R.length;
8929
+ const U = M.size === k.length;
8938
8930
  F.classList.toggle("--disabled", !U), F.textContent = U ? q : K;
8939
8931
  }, W = (U, C) => {
8940
8932
  if (M.has(C)) return;
@@ -8945,7 +8937,7 @@ class xo {
8945
8937
  const $ = U.querySelector(`#__crossx-notice-check-${C}`);
8946
8938
  M.delete(C), $.classList.remove("--checked"), U.setAttribute("aria-checked", "false"), Z();
8947
8939
  };
8948
- R.forEach((U) => {
8940
+ k.forEach((U) => {
8949
8941
  const C = parseInt(U.dataset.checkIndex ?? "0", 10);
8950
8942
  U.addEventListener("click", () => {
8951
8943
  M.has(C) ? X(U, C) : W(U, C);
@@ -8953,11 +8945,11 @@ class xo {
8953
8945
  ($.key === " " || $.key === "Enter") && ($.preventDefault(), M.has(C) ? X(U, C) : W(U, C));
8954
8946
  });
8955
8947
  }), F.addEventListener("click", () => {
8956
- if (M.size === R.length) {
8957
- E(e == null ? void 0 : e.errorMessage);
8948
+ if (M.size === k.length) {
8949
+ S(e == null ? void 0 : e.errorMessage);
8958
8950
  return;
8959
8951
  }
8960
- const U = R.find(($) => {
8952
+ const U = k.find(($) => {
8961
8953
  const g = parseInt($.dataset.checkIndex ?? "0", 10);
8962
8954
  return !M.has(g);
8963
8955
  });
@@ -8967,8 +8959,8 @@ class xo {
8967
8959
  U.classList.remove("--highlight"), W(U, C);
8968
8960
  }, 400);
8969
8961
  }), (Q = p.querySelector("#__crossx-close-btn")) == null || Q.addEventListener("click", _);
8970
- })(), a.addEventListener("click", (R) => {
8971
- R.target === a && _();
8962
+ })(), a.addEventListener("click", (k) => {
8963
+ k.target === a && _();
8972
8964
  });
8973
8965
  });
8974
8966
  }
@@ -8997,15 +8989,15 @@ class xo {
8997
8989
  let f = !1;
8998
8990
  const _ = () => {
8999
8991
  f || (f = !0, l.remove(), u());
9000
- }, p = (R) => {
9001
- _(), s(R);
8992
+ }, p = (k) => {
8993
+ _(), s(k);
9002
8994
  }, b = () => {
9003
8995
  _(), s(null);
9004
- }, S = (R) => {
9005
- _(), t(R);
9006
- }, E = l.querySelector(".__crossx-card");
9007
- (A = E.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", b), dt(E, p, b, S, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, c), l.addEventListener("click", (R) => {
9008
- R.target === l && b();
8996
+ }, E = (k) => {
8997
+ _(), t(k);
8998
+ }, S = l.querySelector(".__crossx-card");
8999
+ (A = S.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", b), dt(S, p, b, E, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, c), l.addEventListener("click", (k) => {
9000
+ k.target === l && b();
9009
9001
  });
9010
9002
  });
9011
9003
  }
@@ -9129,10 +9121,10 @@ class xo {
9129
9121
  };
9130
9122
  (l = t.querySelector("#__crossx-confirm-btn")) == null || l.addEventListener("click", i), (u = t.querySelector("#__crossx-cancel-btn")) == null || u.addEventListener("click", a), (f = t.querySelector("#__crossx-close-btn")) == null || f.addEventListener("click", a), t.querySelectorAll(".__crossx-copy-btn").forEach((_) => {
9131
9123
  _.addEventListener("click", (p) => {
9132
- var S;
9124
+ var E;
9133
9125
  p.stopPropagation();
9134
9126
  const b = _.dataset.copy;
9135
- b && ((S = navigator.clipboard) == null || S.writeText(b).catch(() => {
9127
+ b && ((E = navigator.clipboard) == null || E.writeText(b).catch(() => {
9136
9128
  }));
9137
9129
  });
9138
9130
  }), t.addEventListener("click", (_) => {
@@ -9202,7 +9194,7 @@ function Io(r, e) {
9202
9194
  u,
9203
9195
  f
9204
9196
  ));
9205
- const p = new He(n, c), b = new xo(r.theme ?? "light", r.themeTokens), S = e != null && e.wrapConfirmation ? e.wrapConfirmation(b) : b, E = new ht(
9197
+ const p = new He(n, c), b = new xo(r.theme ?? "light", r.themeTokens), E = e != null && e.wrapConfirmation ? e.wrapConfirmation(b) : b, S = new ht(
9206
9198
  t,
9207
9199
  n,
9208
9200
  i,
@@ -9211,11 +9203,11 @@ function Io(r, e) {
9211
9203
  l,
9212
9204
  _,
9213
9205
  u,
9214
- S,
9206
+ E,
9215
9207
  p,
9216
9208
  f
9217
9209
  );
9218
- return typeof window < "u" && (window.__crossxSDK = E), E;
9210
+ return typeof window < "u" && (window.__crossxSDK = S), S;
9219
9211
  }
9220
9212
  function Ao(r) {
9221
9213
  const e = mo(r), s = wo(e), t = JSON.parse(s);