@nexus-cross/crossx-sdk-core 2.3.10-beta.2 → 2.3.10-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ class h extends Error {
16
16
  };
17
17
  }
18
18
  }
19
- const Rt = 2e3, je = 6e4, Ct = 1e3, Pt = 1e4, Nt = "0x77359400", Ye = "0x3B9ACA00", Xe = 130, Fe = 6, Je = 18, Ze = 3e4, Ot = 5 * 60 * 1e3, Lt = 30 * 1e3, Ne = 100, Dt = "crossx-sdk-js/2.3.10-beta.2", Be = "ONEwallet";
19
+ const Rt = 2e3, je = 6e4, Ct = 1e3, Pt = 1e4, Nt = "0x77359400", Ye = "0x3B9ACA00", Xe = 130, Fe = 6, Je = 18, Ze = 3e4, Ot = 5 * 60 * 1e3, Lt = 30 * 1e3, Ne = 100, Dt = "crossx-sdk-js/2.3.10-beta.4", Be = "ONEwallet";
20
20
  var ge = /* @__PURE__ */ ((i) => (i.MetaMask = "io.metamask", i.Binance = "com.binance.wallet", i.CROSSx = "crossx", i))(ge || {});
21
21
  const Mt = {
22
22
  "io.metamask": "MetaMask",
@@ -34,7 +34,7 @@ function Ft(i) {
34
34
  function Bt(i) {
35
35
  return Array.isArray(i.connectOtherWallets) && i.connectOtherWallets.length > 0 ? [...i.connectOtherWallets] : i.showConnectOtherWallets === !0 ? [...$t] : [];
36
36
  }
37
- const Se = {
37
+ const ve = {
38
38
  // ─── CROSS ────────────────────────────────────────────
39
39
  CROSS_MAINNET: {
40
40
  caipId: "eip155:612055",
@@ -83,13 +83,13 @@ const Se = {
83
83
  rpcUrl: "https://saigon-testnet.roninchain.com/rpc",
84
84
  testnet: !0
85
85
  }
86
- }, Ws = Object.fromEntries(
87
- Object.entries(Se).map(([i, e]) => [i, e.caipId])
86
+ }, Hs = Object.fromEntries(
87
+ Object.entries(ve).map(([i, e]) => [i, e.caipId])
88
88
  ), Wt = new Map(
89
- Object.values(Se).map((i) => [i.caipId, i])
89
+ Object.values(ve).map((i) => [i.caipId, i])
90
90
  );
91
91
  new Map(
92
- Object.values(Se).map((i) => [i.chainId, i])
92
+ Object.values(ve).map((i) => [i.chainId, i])
93
93
  );
94
94
  const Ut = { symbol: "", decimals: 18 };
95
95
  function Ae(i) {
@@ -469,7 +469,7 @@ function X(i = "en", e) {
469
469
  function zt(i) {
470
470
  return i === "ko" || i === "en" ? i : typeof navigator < "u" && (navigator.language ?? "").toLowerCase().startsWith("ko") ? "ko" : "en";
471
471
  }
472
- const et = "crossx_access_token", tt = "crossx_refresh_token", rt = "crossx_user_info", ve = class ve {
472
+ const et = "crossx_access_token", tt = "crossx_refresh_token", rt = "crossx_user_info", Se = class Se {
473
473
  constructor(e, r, t, s, o, n, a, l, p = () => {
474
474
  }) {
475
475
  this.config = e, this.storage = r, this.crypto = t, this.oauth = s, this.transport = o, this.walletProvider = n, this.tokenStore = a, this.requestFreshTokenFromBridge = l, this.getLocale = p, this._refreshPromise = null, this._migrated = !1;
@@ -679,18 +679,18 @@ const et = "crossx_access_token", tt = "crossx_refresh_token", rt = "crossx_user
679
679
  try {
680
680
  const E = this.crypto.decodeJWT(e);
681
681
  c.log("[CROSSx] Firebase JWT 필드:", Object.keys(E).join(", ")), f = (o = E.firebase) == null ? void 0 : o.sign_in_provider;
682
- const S = ((n = E.firebase) == null ? void 0 : n.identities) ?? {};
683
- m = E.email ?? ((a = S.email) == null ? void 0 : a[0]), f === "google.com" ? g = (l = S["google.com"]) == null ? void 0 : l[0] : f === "apple.com" && (g = (p = S["apple.com"]) == null ? void 0 : p[0]), c.log("[CROSSx] OAuth provider sub 추출 — provider:", f, "hasProviderSub:", !!g, "email:", m ?? "(없음)");
682
+ const v = ((n = E.firebase) == null ? void 0 : n.identities) ?? {};
683
+ m = E.email ?? ((a = v.email) == null ? void 0 : a[0]), f === "google.com" ? g = (l = v["google.com"]) == null ? void 0 : l[0] : f === "apple.com" && (g = (p = v["apple.com"]) == null ? void 0 : p[0]), c.log("[CROSSx] OAuth provider sub 추출 — provider:", f, "hasProviderSub:", !!g, "email:", m ?? "(없음)");
684
684
  } catch {
685
685
  c.warn("[CROSSx] firebaseToken에서 providerSub 추출 실패");
686
686
  }
687
687
  if (u) {
688
688
  const E = this.crypto.decodeJWT(u);
689
689
  c.log("[CROSSx] access_token 디코딩 — sub:", E.sub, "exp:", E.exp, "필드:", Object.keys(E).join(", "));
690
- const S = await this.crypto.verifyJWT(u);
691
- if (s = S.signatureVerified ?? !1, !S.valid)
690
+ const v = await this.crypto.verifyJWT(u);
691
+ if (s = v.signatureVerified ?? !1, !v.valid)
692
692
  throw c.error("[CROSSx] access_token 검증 실패"), new Error("유효하지 않은 access token");
693
- const A = S.payload, k = A.email ?? m ?? r;
693
+ const A = v.payload, T = A.email ?? m ?? r;
694
694
  c.log(
695
695
  "[CROSSx] email 소스 — CROSSx JWT:",
696
696
  A.email ?? "(없음)",
@@ -699,10 +699,10 @@ const et = "crossx_access_token", tt = "crossx_refresh_token", rt = "crossx_user
699
699
  "/ OAuth 콜백:",
700
700
  r ?? "(없음)",
701
701
  "→",
702
- k ?? "(없음)"
702
+ T ?? "(없음)"
703
703
  ), t = {
704
704
  id: A.sub,
705
- email: k,
705
+ email: T,
706
706
  signInProvider: f,
707
707
  providerSub: g
708
708
  }, this.tokenStore.set(u), this.useCookieAuth || (await this.storage.set(this.STORAGE_KEY_ACCESS_TOKEN, u), x && this.config.secureStorageAvailable !== !1 ? await this.storage.set(this.STORAGE_KEY_REFRESH_TOKEN, x) : x && c.warn("[CROSSx] 안전한 스토리지 미사용 — refresh_token 영속 저장을 건너뜁니다"));
@@ -915,7 +915,7 @@ const et = "crossx_access_token", tt = "crossx_refresh_token", rt = "crossx_user
915
915
  c.log("[CROSSx] silentRefresh 응답 — status:", n.status);
916
916
  const a = n.data, l = this.extractResponseErrorCode(a);
917
917
  if (l) {
918
- const _ = ve.REFRESH_RELOGIN_CODES.has(l.code);
918
+ const _ = Se.REFRESH_RELOGIN_CODES.has(l.code);
919
919
  throw new h(
920
920
  _ ? d.SESSION_EXPIRED : d.AUTH_FAILED,
921
921
  `토큰 갱신 실패 (코드 ${l.code}): ${l.message}`
@@ -1051,8 +1051,8 @@ const et = "crossx_access_token", tt = "crossx_refresh_token", rt = "crossx_user
1051
1051
  return c.log("[CROSSx] loadWallet 결과 — address:", t, "needsMigration:", s), { success: !0, address: t, user: e, needsMigration: s, tokenSignatureVerified: r };
1052
1052
  }
1053
1053
  };
1054
- ve.REFRESH_RELOGIN_CODES = /* @__PURE__ */ new Set([1007, 1008]);
1055
- let Oe = ve;
1054
+ Se.REFRESH_RELOGIN_CODES = /* @__PURE__ */ new Set([1007, 1008]);
1055
+ let Oe = Se;
1056
1056
  class Vt {
1057
1057
  constructor(e, r, t) {
1058
1058
  this.config = e, this.storage = r, this.tokenStore = t;
@@ -2547,7 +2547,7 @@ const ne = class ne extends Yt {
2547
2547
  }
2548
2548
  async _doInitialize(e) {
2549
2549
  var r, t;
2550
- c.log("[CROSSx SDK] v2.3.10-beta.2 초기화 중..."), this.confirmation.setMessages(X(this._config.locale));
2550
+ c.log("[CROSSx SDK] v2.3.10-beta.4 초기화 중..."), this.confirmation.setMessages(X(this._config.locale));
2551
2551
  try {
2552
2552
  const s = We();
2553
2553
  this.internalConfig.oauthServiceUrl = s.oauthServiceUrl, this.internalConfig.authApiUrl = s.authApiUrl, this.internalConfig.walletGatewayUrl = s.walletGatewayUrl, this.adapterConfig.gatewayUrl = s.walletGatewayUrl, (t = (r = this.crypto).setJWKSEndpoint) == null || t.call(r, `${s.authApiUrl}/.well-known/jwks.json`);
@@ -2583,7 +2583,7 @@ const ne = class ne extends Yt {
2583
2583
  throw u;
2584
2584
  }
2585
2585
  }
2586
- return this.initialized = !0, c.info("[CROSSx SDK] v2.3.10-beta.2 초기화 완료"), this.emit("initialized", { restored: !!(l != null && l.success) }), l ?? null;
2586
+ return this.initialized = !0, c.info("[CROSSx SDK] v2.3.10-beta.4 초기화 완료"), this.emit("initialized", { restored: !!(l != null && l.success) }), l ?? null;
2587
2587
  } catch (s) {
2588
2588
  throw new h(d.AUTH_NOT_INITIALIZED, "SDK 초기화에 실패했습니다", s);
2589
2589
  }
@@ -2603,7 +2603,7 @@ const ne = class ne extends Yt {
2603
2603
  c.log("[CROSSx] RN Bridge 감지 — Handshake 시도"), c.info("[CROSSx][RNBridge trace] Bootstrap config", {
2604
2604
  appId: this._config.projectId,
2605
2605
  appVersion: "1.0.0",
2606
- sdkVersion: "2.3.10-beta.2",
2606
+ sdkVersion: "2.3.10-beta.4",
2607
2607
  keyId: "key-id-1",
2608
2608
  userIdHash: "user-hash-placeholder",
2609
2609
  projectId: this._config.projectId
@@ -2611,7 +2611,7 @@ const ne = class ne extends Yt {
2611
2611
  const e = new j({
2612
2612
  appId: this._config.projectId,
2613
2613
  appVersion: "1.0.0",
2614
- sdkVersion: "2.3.10-beta.2",
2614
+ sdkVersion: "2.3.10-beta.4",
2615
2615
  keyId: "key-id-1",
2616
2616
  userIdHash: "user-hash-placeholder",
2617
2617
  projectId: this._config.projectId
@@ -2808,29 +2808,31 @@ const ne = class ne extends Yt {
2808
2808
  * }
2809
2809
  */
2810
2810
  async signInWithOAuthToken(e) {
2811
+ var t, s;
2811
2812
  if (this.ensureInitialized(), this.authenticated)
2812
2813
  throw new h(
2813
2814
  d.ALREADY_AUTHENTICATED,
2814
2815
  "이미 로그인된 상태입니다. signOut()을 먼저 호출하세요."
2815
2816
  );
2817
+ (s = (t = this.oauth).cancelPending) == null || s.call(t, "signInWithOAuthToken으로 외부 인증이 도착했습니다");
2816
2818
  let r;
2817
2819
  try {
2818
2820
  r = await this.signInUseCase.executeWithOAuthToken(e), r.success && (this._isAuthenticatedViaRNBridge = !1, this.applyAuthResult(r));
2819
- } catch (t) {
2820
- throw t instanceof h ? t : new h(d.AUTH_FAILED, "OAuth 토큰 로그인에 실패했습니다", t);
2821
+ } catch (o) {
2822
+ throw o instanceof h ? o : new h(d.AUTH_FAILED, "OAuth 토큰 로그인에 실패했습니다", o);
2821
2823
  }
2822
2824
  if (!r.success) return { ...r, addresses: [] };
2823
2825
  try {
2824
2826
  if (r.needsMigration || !r.address) {
2825
- const { address: o } = await this.createWallet(), n = await this.getAddresses(), a = await this.selectWalletIfMultiple(n);
2826
- return { ...r, address: (a == null ? void 0 : a.address) ?? o, needsMigration: !1, addresses: n };
2827
+ const { address: a } = await this.createWallet(), l = await this.getAddresses(), p = await this.selectWalletIfMultiple(l);
2828
+ return { ...r, address: (p == null ? void 0 : p.address) ?? a, needsMigration: !1, addresses: l };
2827
2829
  }
2828
- const t = await this.getAddresses(), s = await this.selectWalletIfMultiple(t);
2829
- return { ...r, address: (s == null ? void 0 : s.address) ?? r.address, addresses: t };
2830
- } catch (t) {
2831
- throw t instanceof h && t.code === d.PIN_CANCELLED && (c.log("[CROSSx] signInWithOAuthToken: 비밀번호 설정 취소 — 자동 로그아웃 진행"), await this.signOut().catch(
2832
- (s) => c.warn("[CROSSx] signInWithOAuthToken: 자동 로그아웃 실패", s)
2833
- )), t;
2830
+ const o = await this.getAddresses(), n = await this.selectWalletIfMultiple(o);
2831
+ return { ...r, address: (n == null ? void 0 : n.address) ?? r.address, addresses: o };
2832
+ } catch (o) {
2833
+ throw o instanceof h && o.code === d.PIN_CANCELLED && (c.log("[CROSSx] signInWithOAuthToken: 비밀번호 설정 취소 — 자동 로그아웃 진행"), await this.signOut().catch(
2834
+ (n) => c.warn("[CROSSx] signInWithOAuthToken: 자동 로그아웃 실패", n)
2835
+ )), o;
2834
2836
  }
2835
2837
  }
2836
2838
  /**
@@ -3568,14 +3570,14 @@ const ne = class ne extends Yt {
3568
3570
  let x, g;
3569
3571
  const f = this.waitForTxAndGetReceipt(a, e, { intervalMs: l, timeoutMs: p }).then((E) => {
3570
3572
  x = E;
3571
- const S = BigInt(E.gasUsed) * BigInt(E.effectiveGasPrice), A = r.value ? BigInt(r.value) : 0n, k = me(r.value, _.symbol, _.decimals, this._config.displayDecimals), T = me("0x" + S.toString(16), _.symbol, _.decimals, this._config.displayDecimals), O = me("0x" + (A + S).toString(16), _.symbol, _.decimals, this._config.displayDecimals);
3573
+ const v = BigInt(E.gasUsed) * BigInt(E.effectiveGasPrice), A = r.value ? BigInt(r.value) : 0n, T = me(r.value, _.symbol, _.decimals, this._config.displayDecimals), k = me("0x" + v.toString(16), _.symbol, _.decimals, this._config.displayDecimals), O = me("0x" + (A + v).toString(16), _.symbol, _.decimals, this._config.displayDecimals);
3572
3574
  return {
3573
3575
  chainId: e,
3574
3576
  txHash: a,
3575
3577
  from: E.from,
3576
3578
  to: E.to ?? r.to,
3577
- amount: k,
3578
- fees: T,
3579
+ amount: T,
3580
+ fees: k,
3579
3581
  total: O,
3580
3582
  nativeSymbol: _.symbol,
3581
3583
  status: E.status === "0x1" ? "success" : "reverted"
@@ -4353,7 +4355,7 @@ function ot(i) {
4353
4355
  for (const r of i) e += r.toString(16).padStart(2, "0");
4354
4356
  return BigInt(e);
4355
4357
  }
4356
- const vr = 3e4, Sr = 1e3;
4358
+ const Sr = 3e4, vr = 1e3;
4357
4359
  class Er {
4358
4360
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4359
4361
  async request(e) {
@@ -4365,7 +4367,7 @@ class Er {
4365
4367
  } catch (s) {
4366
4368
  if (t === r) throw s;
4367
4369
  }
4368
- await new Promise((s) => setTimeout(s, Sr * 2 ** t));
4370
+ await new Promise((s) => setTimeout(s, vr * 2 ** t));
4369
4371
  }
4370
4372
  throw new Error("Unexpected: retry loop exited without result");
4371
4373
  }
@@ -4373,7 +4375,7 @@ class Er {
4373
4375
  async _doRequest(e) {
4374
4376
  const r = new AbortController(), t = setTimeout(
4375
4377
  () => r.abort(),
4376
- e.timeoutMs ?? vr
4378
+ e.timeoutMs ?? Sr
4377
4379
  );
4378
4380
  try {
4379
4381
  const s = await fetch(e.url, {
@@ -4407,8 +4409,19 @@ const Ar = /* @__PURE__ */ new Set([
4407
4409
  "https://one-wallet-oauth.onechain.nexus",
4408
4410
  "https://stg-one-wallet-oauth.onechain.nexus",
4409
4411
  "https://dev-one-wallet-oauth.onechain.nexus"
4410
- ]);
4412
+ ]), Ir = /CROSSx\/[\d.]+/i, kr = "crossx://oauth-callback";
4411
4413
  class ie {
4414
+ constructor() {
4415
+ this.abortPending = null;
4416
+ }
4417
+ /**
4418
+ * 외부 경로 인증이 들어와 대화형 OAuth 대기가 무의미해졌을 때 호출한다.
4419
+ * 대기 중인 openAuth를 reject시켜 상위 connect() 흐름을 즉시 종료시킨다.
4420
+ */
4421
+ cancelPending(e = "외부 경로 인증으로 OAuth 대기를 중단했습니다") {
4422
+ const r = this.abortPending;
4423
+ r && (c.log("[CROSSx] OAuth 대기 중단 —", e), r(e));
4424
+ }
4412
4425
  static generateRandom16Hex() {
4413
4426
  const e = new Uint8Array(16);
4414
4427
  return crypto.getRandomValues(e), Array.from(e, (r) => r.toString(16).padStart(2, "0")).join("");
@@ -4471,8 +4484,9 @@ class ie {
4471
4484
  }
4472
4485
  openAuth(e) {
4473
4486
  return new Promise((r, t) => {
4474
- const s = Math.max(e.width ?? 500, 500), o = Math.max(e.height ?? 700, 700), n = window.screenX + (window.outerWidth - s) / 2, a = window.screenY + (window.outerHeight - o) / 2, l = ie.generateRandom16Hex(), p = ie.generateRandom16Hex(), _ = e.authUrl.includes("?") ? "&" : "?", u = encodeURIComponent(window.location.origin), x = `${e.authUrl}${_}state=${l}&nonce=${p}&origin=${u}`;
4475
- c.log("[CROSSx] OAuth 팝업 열기 — state, nonce 생성 완료:", {
4487
+ const s = Math.max(e.width ?? 500, 500), o = Math.max(e.height ?? 700, 700), n = window.screenX + (window.outerWidth - s) / 2, a = window.screenY + (window.outerHeight - o) / 2, l = ie.generateRandom16Hex(), p = ie.generateRandom16Hex(), _ = e.authUrl.includes("?") ? "&" : "?", u = encodeURIComponent(window.location.origin);
4488
+ let x = `${e.authUrl}${_}state=${l}&nonce=${p}&origin=${u}`;
4489
+ Ir.test(navigator.userAgent) && !x.includes("redirectUrl=") && (x += `&redirectUrl=${encodeURIComponent(kr)}`, c.log("[CROSSx] 지갑 인앱 브라우저 감지 — redirectUrl 콜백 자동 부착")), c.log("[CROSSx] OAuth 팝업 열기 — state, nonce 생성 완료:", {
4476
4490
  stateLength: l.length,
4477
4491
  nonceLength: p.length,
4478
4492
  authUrlBase: e.authUrl
@@ -4487,29 +4501,29 @@ class ie {
4487
4501
  return;
4488
4502
  }
4489
4503
  const f = setTimeout(() => {
4490
- c.warn("[CROSSx] OAuth 타임아웃 (5분) — postMessage를 수신하지 못했습니다"), T(), t(new Error("Authentication timeout"));
4504
+ c.warn("[CROSSx] OAuth 타임아웃 (5분) — postMessage를 수신하지 못했습니다"), k(), t(new Error("Authentication timeout"));
4491
4505
  }, 5 * 60 * 1e3), m = 10, y = 30;
4492
- let E = 0, S = null;
4506
+ let E = 0, v = null;
4493
4507
  const A = () => {
4494
- clearInterval(k), c.warn("[CROSSx] COOP 감지 — OAuth 서버 응답을 " + y + "초간 대기합니다"), S = setTimeout(() => {
4495
- T(), t(new Error(
4508
+ clearInterval(T), c.warn("[CROSSx] COOP 감지 — OAuth 서버 응답을 " + y + "초간 대기합니다"), v = setTimeout(() => {
4509
+ k(), t(new Error(
4496
4510
  "OAuth 서버로부터 응답을 받지 못했습니다. 브라우저 보안 정책(COOP)으로 인해 팝업 통신이 차단되었을 수 있습니다. 다시 시도해 주세요."
4497
4511
  ));
4498
4512
  }, y * 1e3);
4499
- }, k = setInterval(() => {
4513
+ }, T = setInterval(() => {
4500
4514
  E++;
4501
4515
  try {
4502
4516
  if (!g.closed) return;
4503
4517
  const M = typeof document < "u" && document.hasFocus();
4504
- E <= m && !M ? A() : (T(), t(new Error("로그인이 취소되었습니다")));
4518
+ E <= m && !M ? A() : (k(), t(new Error("로그인이 취소되었습니다")));
4505
4519
  } catch {
4506
4520
  A();
4507
4521
  }
4508
- }, 1e3), T = () => {
4509
- clearTimeout(f), clearInterval(k), S && clearTimeout(S), window.removeEventListener("message", O);
4522
+ }, 1e3), k = () => {
4523
+ this.abortPending = null, clearTimeout(f), clearInterval(T), v && clearTimeout(v), window.removeEventListener("message", O);
4510
4524
  }, O = (M) => {
4511
4525
  if (!Ar.has(M.origin)) return;
4512
- T();
4526
+ k();
4513
4527
  const G = typeof M.data.status == "string", P = G ? M.data.data ?? {} : M.data;
4514
4528
  c.log("[CROSSx] OAuth postMessage 수신 —", {
4515
4529
  format: G ? "wrapped" : "flat",
@@ -4547,12 +4561,14 @@ class ie {
4547
4561
  "서버 측 nonce 검증이 필요합니다."
4548
4562
  ), r(pe)) : C ? _e(C) : t(new Error("Token not found in response"));
4549
4563
  };
4550
- window.addEventListener("message", O);
4564
+ this.abortPending = (M) => {
4565
+ k(), t(new Error(M));
4566
+ }, window.addEventListener("message", O);
4551
4567
  });
4552
4568
  }
4553
4569
  }
4554
4570
  const xe = "crossx_wallet_data", ce = "crossx_mock_pin_hash";
4555
- class Ir {
4571
+ class Tr {
4556
4572
  constructor(e, r) {
4557
4573
  this.storage = e, this.pinStore = r ?? null;
4558
4574
  }
@@ -4785,9 +4801,9 @@ class oe {
4785
4801
  d.USER_NOT_FOUND,
4786
4802
  oe.getGatewayErrorMessage(g.code, f)
4787
4803
  );
4788
- const y = m === d.AUTH_NOT_AUTHENTICATED ? d.SESSION_EXPIRED : m, E = y === d.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : oe.getGatewayErrorMessage(g.code, f), S = g.data;
4804
+ const y = m === d.AUTH_NOT_AUTHENTICATED ? d.SESSION_EXPIRED : m, E = y === d.SESSION_EXPIRED ? "인증 세션이 만료되었습니다. 다시 로그인해 주세요." : oe.getGatewayErrorMessage(g.code, f), v = g.data;
4789
4805
  let A;
4790
- throw m === d.PIN_LOCKED ? A = oe.extractLockDetails(S) : m === d.ADDRESS_LIMIT_EXCEEDED ? A = { limit: Ne, raw: S } : A = S ?? void 0, new h(y, E, A);
4806
+ throw m === d.PIN_LOCKED ? A = oe.extractLockDetails(v) : m === d.ADDRESS_LIMIT_EXCEEDED ? A = { limit: Ne, raw: v } : A = v ?? void 0, new h(y, E, A);
4791
4807
  }
4792
4808
  return c.log("[CROSSx] Wallet Gateway API 성공:", { code: g.code, url: n, method: e }), g.data ?? g;
4793
4809
  }
@@ -5185,7 +5201,7 @@ class oe {
5185
5201
  }
5186
5202
  }
5187
5203
  }
5188
- class kr {
5204
+ class Rr {
5189
5205
  constructor(e, r, t, s = () => {
5190
5206
  }, o = () => {
5191
5207
  }) {
@@ -5374,7 +5390,7 @@ class fe {
5374
5390
  );
5375
5391
  }
5376
5392
  static fallbackChains() {
5377
- return Object.values(Se).map((e) => ({
5393
+ return Object.values(ve).map((e) => ({
5378
5394
  chainId: e.caipId,
5379
5395
  rpcUrl: e.rpcUrl
5380
5396
  }));
@@ -5398,7 +5414,7 @@ class fe {
5398
5414
  }
5399
5415
  }
5400
5416
  }
5401
- const nt = "__crossx-confirm-style", F = "__crossx-confirm-overlay", Tr = {
5417
+ const nt = "__crossx-confirm-style", F = "__crossx-confirm-overlay", Cr = {
5402
5418
  light: {
5403
5419
  bg: "#FFFFFF",
5404
5420
  border: "rgba(0,0,0,0.07)",
@@ -5467,7 +5483,7 @@ const nt = "__crossx-confirm-style", F = "__crossx-confirm-overlay", Tr = {
5467
5483
  }
5468
5484
  };
5469
5485
  function at(i, e) {
5470
- const r = Tr[i], t = e == null ? void 0 : e[i];
5486
+ const r = Cr[i], t = e == null ? void 0 : e[i];
5471
5487
  return t ? {
5472
5488
  ...r,
5473
5489
  // ── Brand
@@ -5501,7 +5517,7 @@ function at(i, e) {
5501
5517
  ...t.error !== void 0 && { errorColor: t.error }
5502
5518
  } : r;
5503
5519
  }
5504
- const Rr = `
5520
+ const Pr = `
5505
5521
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&family=Sora:wght@400;600&display=swap');
5506
5522
 
5507
5523
  #${F} {
@@ -8104,9 +8120,9 @@ button.__crossx-connect-other-block:active {
8104
8120
  `;
8105
8121
  function K() {
8106
8122
  let i = document.getElementById(nt);
8107
- i || (i = document.createElement("style"), i.id = nt, document.head.appendChild(i)), i.textContent = Rr;
8123
+ i || (i = document.createElement("style"), i.id = nt, document.head.appendChild(i)), i.textContent = Pr;
8108
8124
  }
8109
- function Cr() {
8125
+ function Nr() {
8110
8126
  const i = `#${F}`, e = (t) => {
8111
8127
  var s, o;
8112
8128
  (o = (s = t.target) == null ? void 0 : s.closest) != null && o.call(s, i) && t.stopImmediatePropagation();
@@ -8146,12 +8162,12 @@ function z(i) {
8146
8162
  }
8147
8163
  n.preventDefault();
8148
8164
  }, { passive: !1 });
8149
- const t = Cr(), s = Pr(i), o = i.remove.bind(i);
8165
+ const t = Nr(), s = Or(i), o = i.remove.bind(i);
8150
8166
  i.remove = () => {
8151
8167
  s(), t(), o();
8152
8168
  }, document.body.appendChild(i);
8153
8169
  }
8154
- function Pr(i) {
8170
+ function Or(i) {
8155
8171
  if (typeof window > "u") return () => {
8156
8172
  };
8157
8173
  const e = window.visualViewport;
@@ -8166,7 +8182,7 @@ function Pr(i) {
8166
8182
  e.removeEventListener("resize", t), e.removeEventListener("scroll", t), i.style.removeProperty("--cx-keyboard-inset");
8167
8183
  };
8168
8184
  }
8169
- function Nr(i) {
8185
+ function Lr(i) {
8170
8186
  const e = Array.from(i.querySelectorAll(".__crossx-amount-tip"));
8171
8187
  if (!e.length) return;
8172
8188
  const r = document.createElement("div");
@@ -8190,9 +8206,9 @@ function Nr(i) {
8190
8206
  n.target.closest(".__crossx-amount-tip") || o();
8191
8207
  }, { passive: !0 });
8192
8208
  }
8193
- const Or = () => /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
8209
+ const Dr = () => /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
8194
8210
  function se() {
8195
- if (Or()) {
8211
+ if (Dr()) {
8196
8212
  const e = window.scrollY;
8197
8213
  return document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.left = "0", document.body.style.right = "0", () => {
8198
8214
  document.body.style.position = "", document.body.style.top = "", document.body.style.left = "", document.body.style.right = "", window.scrollTo(0, e);
@@ -8246,7 +8262,7 @@ const ct = {
8246
8262
  612055: "CROSS Mainnet"
8247
8263
  }, Ue = /* @__PURE__ */ new Map();
8248
8264
  let Te = !1;
8249
- function Lr() {
8265
+ function Mr() {
8250
8266
  if (Te || (Te = !0, typeof fetch > "u")) return;
8251
8267
  const i = We().contentsBaseUrl;
8252
8268
  i && fetch(`${i}/chains.json`, { cache: "no-store" }).then((e) => e.ok ? e.json() : null).then((e) => {
@@ -8305,18 +8321,18 @@ function Re(i) {
8305
8321
  return i;
8306
8322
  }
8307
8323
  }
8308
- function Dr(i) {
8324
+ function $r(i) {
8309
8325
  try {
8310
8326
  return BigInt(i).toLocaleString();
8311
8327
  } catch {
8312
8328
  return i;
8313
8329
  }
8314
8330
  }
8315
- function Mr(i, e) {
8331
+ function Fr(i, e) {
8316
8332
  const { gasLimit: r, gasPrice: t, maxFeePerGas: s, maxPriorityFeePerGas: o, nativeDecimals: n = 18 } = i, a = He(i.chainId, i.nativeSymbol ?? "ETH");
8317
8333
  if (!r) return null;
8318
8334
  try {
8319
- const l = BigInt(r), p = Dr(r);
8335
+ const l = BigInt(r), p = $r(r);
8320
8336
  if (s) {
8321
8337
  const _ = l * BigInt(s);
8322
8338
  return {
@@ -8348,7 +8364,7 @@ function Mr(i, e) {
8348
8364
  }
8349
8365
  }
8350
8366
  function ft(i, e, r) {
8351
- const t = Mr(i, e);
8367
+ const t = Fr(i, e);
8352
8368
  if (!t) return D((r == null ? void 0 : r.label_estimated_fee) ?? "Estimated fee", "<span>—</span>");
8353
8369
  let s = D((r == null ? void 0 : r.label_est_tx_fee) ?? "Est. Tx Fee", `<span>${t.estTxFee}</span>`);
8354
8370
  return t.isDynamic ? (t.maxPriorityFeeGwei !== void 0 && (s += D((r == null ? void 0 : r.label_max_priority_fee) ?? "Max Priority Fee", `<span>${t.maxPriorityFeeGwei} Gwei</span>`)), t.maxFeeGwei !== void 0 && (s += D((r == null ? void 0 : r.label_max_gas_fee) ?? "Max Gas Fee", `<span>${t.maxFeeGwei} Gwei</span>`))) : t.gasPriceGwei !== void 0 && (s += D((r == null ? void 0 : r.label_gas_price) ?? "Gas Price", `<span>${t.gasPriceGwei} Gwei</span>`)), t.gasLimitFormatted && (s += D((r == null ? void 0 : r.label_gas_limit) ?? "Gas Limit", `<span>${t.gasLimitFormatted}</span>`)), s;
@@ -8359,16 +8375,16 @@ const J = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="c
8359
8375
  </svg>`, W = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
8360
8376
  <line x1="18" y1="6" x2="6" y2="18"/>
8361
8377
  <line x1="6" y1="6" x2="18" y2="18"/>
8362
- </svg>`, $r = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8378
+ </svg>`, Br = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8363
8379
  <circle cx="20" cy="20" r="20" fill="#00D5AA"/>
8364
8380
  <path fill-rule="evenodd" clip-rule="evenodd" d="M20.3225 2.85742L23.7249 6.25982V11.8301L28.1175 7.43757L32.9292 12.2493L28.5806 16.5979H20.3225C18.4435 16.5979 16.9201 18.1212 16.9201 20.0003C16.9201 21.8794 18.4434 23.4027 20.3225 23.4027H28.5372L32.9293 27.7948L28.1176 32.6066L23.7249 28.2139V33.7407L20.3225 37.1431L16.9201 33.7407V28.2584L12.5719 32.6066L7.76022 27.7948L12.1524 23.4027H6.58209L3.17969 20.0003L6.58209 16.5979H12.1089L7.76035 12.2493L12.5721 7.43757L16.9201 11.7857V6.25982L20.3225 2.85742Z" fill="#121212"/>
8365
- </svg>`, Fr = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 318.6 318.6" aria-hidden="true"><style>.st1,.st6{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st6{fill:#f6851b;stroke:#f6851b}</style><path fill="#e2761b" stroke="#e2761b" stroke-linecap="round" stroke-linejoin="round" d="m274.1 35.5-99.5 73.9L193 65.8z"/><path d="m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z" class="st1"/><path d="m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z" class="st1"/><path fill="#d7c1b3" stroke="#d7c1b3" stroke-linecap="round" stroke-linejoin="round" d="m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"/><path fill="#233447" stroke="#233447" stroke-linecap="round" stroke-linejoin="round" d="m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"/><path fill="#cd6116" stroke="#cd6116" stroke-linecap="round" stroke-linejoin="round" d="m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"/><path fill="#e4751f" stroke="#e4751f" stroke-linecap="round" stroke-linejoin="round" d="m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"/><path d="m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z" class="st6"/><path fill="#c0ad9e" stroke="#c0ad9e" stroke-linecap="round" stroke-linejoin="round" d="m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"/><path fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" d="m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"/><path fill="#763d16" stroke="#763d16" stroke-linecap="round" stroke-linejoin="round" d="m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"/><path d="m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z" class="st6"/></svg>', Br = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 126.611 126.611" aria-hidden="true"><polygon fill="#F3BA2F" points="38.171,53.203 62.759,28.616 87.36,53.216 101.667,38.909 62.759,0 23.864,38.896 "/><rect x="3.644" y="53.188" transform="matrix(0.7071 0.7071 -0.7071 0.7071 48.7933 8.8106)" fill="#F3BA2F" width="20.233" height="20.234"/><polygon fill="#F3BA2F" points="38.171,73.408 62.759,97.995 87.359,73.396 101.674,87.695 101.667,87.703 62.759,126.611 23.863,87.716 23.843,87.696 "/><rect x="101.64" y="53.189" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 235.5457 29.0503)" fill="#F3BA2F" width="20.234" height="20.233"/><polygon fill="#F3BA2F" points="77.271,63.298 77.277,63.298 62.759,48.78 52.03,59.509 52.029,59.509 50.797,60.742 48.254,63.285 48.254,63.285 48.234,63.305 48.254,63.326 62.759,77.831 77.277,63.313 77.284,63.305 "/></svg>', Wr = '<svg width="16" height="16" viewBox="0 0 229 229" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><g clip-path="url(#clip0_74746_12130)"><rect width="228.273" height="228.273" rx="87" fill="white"/><path d="M228.307 -0.0644531H0.0332031V228.209H228.307V-0.0644531Z" fill="#CE3E35"/><path d="M33.9219 43.7533C33.9219 31.934 43.5033 22.3527 55.3225 22.3527H173.019C184.838 22.3527 194.419 31.9341 194.419 43.7533V123.107H33.9219V43.7533Z" fill="white"/><g filter="url(#filter0_d_74746_12130)"><path d="M228.241 228.21H0.0332031V56.5961C0.0332031 48.7166 6.4208 42.329 14.3003 42.329H77.9502C84.6851 42.329 90.1926 47.3831 94.2527 52.7566C98.8699 58.8676 106.06 62.7958 114.137 62.7958C122.214 62.7958 129.404 58.8676 134.021 52.7566C138.081 47.3831 143.589 42.329 150.324 42.329H213.974C221.854 42.329 228.241 48.7166 228.241 56.5961V228.21Z" fill="url(#paint0_linear_74746_12130)"/></g><path d="M79.7598 228.096H228.24V64.7367L79.7598 159.851V228.096Z" fill="url(#paint1_linear_74746_12130)"/><path d="M79.7694 228.209H0.0332031V75.9257L79.7694 160.218V228.209Z" fill="url(#paint2_linear_74746_12130)"/><g filter="url(#filter1_d_74746_12130)"><path d="M113.105 89.2908L81.3322 107.655C75.7279 110.878 73.7862 118.118 77.0076 123.724C80.229 129.331 87.4661 131.273 93.0704 128.051L119.945 112.511L107.147 126.241V180.098C107.147 186.588 112.443 191.885 118.93 191.885C125.417 191.885 130.712 186.588 130.712 180.098V99.4884C130.712 97.237 130.006 95.0297 129.124 93.5729C125.814 88.0106 118.665 86.024 113.061 89.2466L113.105 89.2908Z" fill="white"/></g></g><defs><filter id="filter0_d_74746_12130" x="-7.10034" y="33.4121" width="242.474" height="200.148" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="-1.78339"/><feGaussianBlur stdDeviation="3.56677"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.892803 0 0 0 0 0.220099 0 0 0 0 0.293135 0 0 0 0.5 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_74746_12130"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_74746_12130" result="shape"/></filter><filter id="filter1_d_74746_12130" x="67.9009" y="80.1489" width="75.3839" height="124.308" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="2.51084" dy="2.51084"/><feGaussianBlur stdDeviation="5.03056"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_74746_12130"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_74746_12130" result="shape"/></filter><linearGradient id="paint0_linear_74746_12130" x1="-26.3993" y1="19.4879" x2="193.409" y2="286.17" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_74746_12130" x1="56.978" y1="73.7355" x2="168.096" y2="169.248" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_74746_12130" x1="142.362" y1="29.5078" x2="37.3384" y2="166.255" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_74746_12130"><rect width="228.273" height="228.273" rx="87" fill="white"/></clipPath></defs></svg>', Ur = {
8366
- [ge.MetaMask]: Fr,
8367
- [ge.Binance]: Br,
8368
- [ge.CROSSx]: Wr
8369
- }, wt = '<path d="M22.6667 11.8333V10.1667C22.6667 9.2475 21.9192 8.5 21.0001 8.5H10.1667C8.78841 8.5 7.66675 9.62167 7.66675 11V21C7.66675 22.8342 9.16175 23.5 10.1667 23.5H22.6667C23.5859 23.5 24.3334 22.7525 24.3334 21.8333V13.5C24.3334 12.5808 23.5859 11.8333 22.6667 11.8333ZM21.0001 19.3333H19.3334V16H21.0001V19.3333ZM10.1667 11.8333C9.95218 11.8237 9.74959 11.7317 9.60114 11.5765C9.4527 11.4213 9.36986 11.2148 9.36986 11C9.36986 10.7852 9.4527 10.5787 9.60114 10.4235C9.74959 10.2683 9.95218 10.1763 10.1667 10.1667H21.0001V11.8333H10.1667Z"/>', Ge = `<svg width="20" height="20" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">${wt}</svg>`, Hr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8381
+ </svg>`, Wr = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 318.6 318.6" aria-hidden="true"><style>.st1,.st6{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st6{fill:#f6851b;stroke:#f6851b}</style><path fill="#e2761b" stroke="#e2761b" stroke-linecap="round" stroke-linejoin="round" d="m274.1 35.5-99.5 73.9L193 65.8z"/><path d="m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z" class="st1"/><path d="m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z" class="st1"/><path fill="#d7c1b3" stroke="#d7c1b3" stroke-linecap="round" stroke-linejoin="round" d="m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"/><path fill="#233447" stroke="#233447" stroke-linecap="round" stroke-linejoin="round" d="m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"/><path fill="#cd6116" stroke="#cd6116" stroke-linecap="round" stroke-linejoin="round" d="m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"/><path fill="#e4751f" stroke="#e4751f" stroke-linecap="round" stroke-linejoin="round" d="m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"/><path d="m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z" class="st6"/><path fill="#c0ad9e" stroke="#c0ad9e" stroke-linecap="round" stroke-linejoin="round" d="m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"/><path fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" d="m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"/><path fill="#763d16" stroke="#763d16" stroke-linecap="round" stroke-linejoin="round" d="m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"/><path d="m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z" class="st6"/></svg>', Ur = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 126.611 126.611" aria-hidden="true"><polygon fill="#F3BA2F" points="38.171,53.203 62.759,28.616 87.36,53.216 101.667,38.909 62.759,0 23.864,38.896 "/><rect x="3.644" y="53.188" transform="matrix(0.7071 0.7071 -0.7071 0.7071 48.7933 8.8106)" fill="#F3BA2F" width="20.233" height="20.234"/><polygon fill="#F3BA2F" points="38.171,73.408 62.759,97.995 87.359,73.396 101.674,87.695 101.667,87.703 62.759,126.611 23.863,87.716 23.843,87.696 "/><rect x="101.64" y="53.189" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 235.5457 29.0503)" fill="#F3BA2F" width="20.234" height="20.233"/><polygon fill="#F3BA2F" points="77.271,63.298 77.277,63.298 62.759,48.78 52.03,59.509 52.029,59.509 50.797,60.742 48.254,63.285 48.254,63.285 48.234,63.305 48.254,63.326 62.759,77.831 77.277,63.313 77.284,63.305 "/></svg>', Hr = '<svg width="16" height="16" viewBox="0 0 229 229" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><g clip-path="url(#clip0_74746_12130)"><rect width="228.273" height="228.273" rx="87" fill="white"/><path d="M228.307 -0.0644531H0.0332031V228.209H228.307V-0.0644531Z" fill="#CE3E35"/><path d="M33.9219 43.7533C33.9219 31.934 43.5033 22.3527 55.3225 22.3527H173.019C184.838 22.3527 194.419 31.9341 194.419 43.7533V123.107H33.9219V43.7533Z" fill="white"/><g filter="url(#filter0_d_74746_12130)"><path d="M228.241 228.21H0.0332031V56.5961C0.0332031 48.7166 6.4208 42.329 14.3003 42.329H77.9502C84.6851 42.329 90.1926 47.3831 94.2527 52.7566C98.8699 58.8676 106.06 62.7958 114.137 62.7958C122.214 62.7958 129.404 58.8676 134.021 52.7566C138.081 47.3831 143.589 42.329 150.324 42.329H213.974C221.854 42.329 228.241 48.7166 228.241 56.5961V228.21Z" fill="url(#paint0_linear_74746_12130)"/></g><path d="M79.7598 228.096H228.24V64.7367L79.7598 159.851V228.096Z" fill="url(#paint1_linear_74746_12130)"/><path d="M79.7694 228.209H0.0332031V75.9257L79.7694 160.218V228.209Z" fill="url(#paint2_linear_74746_12130)"/><g filter="url(#filter1_d_74746_12130)"><path d="M113.105 89.2908L81.3322 107.655C75.7279 110.878 73.7862 118.118 77.0076 123.724C80.229 129.331 87.4661 131.273 93.0704 128.051L119.945 112.511L107.147 126.241V180.098C107.147 186.588 112.443 191.885 118.93 191.885C125.417 191.885 130.712 186.588 130.712 180.098V99.4884C130.712 97.237 130.006 95.0297 129.124 93.5729C125.814 88.0106 118.665 86.024 113.061 89.2466L113.105 89.2908Z" fill="white"/></g></g><defs><filter id="filter0_d_74746_12130" x="-7.10034" y="33.4121" width="242.474" height="200.148" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="-1.78339"/><feGaussianBlur stdDeviation="3.56677"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0.892803 0 0 0 0 0.220099 0 0 0 0 0.293135 0 0 0 0.5 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_74746_12130"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_74746_12130" result="shape"/></filter><filter id="filter1_d_74746_12130" x="67.9009" y="80.1489" width="75.3839" height="124.308" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dx="2.51084" dy="2.51084"/><feGaussianBlur stdDeviation="5.03056"/><feColorMatrix type="matrix" values="0 0 0 0 0.831373 0 0 0 0 0.113725 0 0 0 0 0.356863 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_74746_12130"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_74746_12130" result="shape"/></filter><linearGradient id="paint0_linear_74746_12130" x1="-26.3993" y1="19.4879" x2="193.409" y2="286.17" gradientUnits="userSpaceOnUse"><stop stop-color="#F3752D"/><stop offset="1" stop-color="#EC1272"/></linearGradient><linearGradient id="paint1_linear_74746_12130" x1="56.978" y1="73.7355" x2="168.096" y2="169.248" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><linearGradient id="paint2_linear_74746_12130" x1="142.362" y1="29.5078" x2="37.3384" y2="166.255" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.5"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient><clipPath id="clip0_74746_12130"><rect width="228.273" height="228.273" rx="87" fill="white"/></clipPath></defs></svg>', Gr = {
8382
+ [ge.MetaMask]: Wr,
8383
+ [ge.Binance]: Ur,
8384
+ [ge.CROSSx]: Hr
8385
+ }, wt = '<path d="M22.6667 11.8333V10.1667C22.6667 9.2475 21.9192 8.5 21.0001 8.5H10.1667C8.78841 8.5 7.66675 9.62167 7.66675 11V21C7.66675 22.8342 9.16175 23.5 10.1667 23.5H22.6667C23.5859 23.5 24.3334 22.7525 24.3334 21.8333V13.5C24.3334 12.5808 23.5859 11.8333 22.6667 11.8333ZM21.0001 19.3333H19.3334V16H21.0001V19.3333ZM10.1667 11.8333C9.95218 11.8237 9.74959 11.7317 9.60114 11.5765C9.4527 11.4213 9.36986 11.2148 9.36986 11C9.36986 10.7852 9.4527 10.5787 9.60114 10.4235C9.74959 10.2683 9.95218 10.1763 10.1667 10.1667H21.0001V11.8333H10.1667Z"/>', Ge = `<svg width="20" height="20" viewBox="0 0 32 32" fill="currentColor" xmlns="http://www.w3.org/2000/svg">${wt}</svg>`, Kr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8370
8386
  <path d="M12 0C18.6274 0 24 5.37258 24 12C23.9999 18.6273 18.6274 24 12 24C5.37264 24 9.89594e-05 18.6273 0 12C0 5.37258 5.37258 0 12 0ZM10.875 15.127V17.377H13.125V15.127H10.875ZM10.875 6.62207V13.627H13.125V6.62207H10.875Z" fill="var(--cx-error)"/>
8371
- </svg>`, Gr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8387
+ </svg>`, zr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
8372
8388
  <circle cx="12" cy="12" r="12" fill="var(--cx-error)"/>
8373
8389
  <circle cx="12" cy="12" r="5.5" stroke="white" stroke-width="1.5"/>
8374
8390
  <path d="M12 9.5v3l2 1.5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
@@ -8406,7 +8422,7 @@ function H(i) {
8406
8422
  `--cx-on-primary:${i.onPrimary}`
8407
8423
  ].join(";");
8408
8424
  }
8409
- function Kr(i, e) {
8425
+ function Vr(i, e) {
8410
8426
  i.style.setProperty("--cx-bg", e.bg), i.style.setProperty("--cx-border", e.border), i.style.setProperty("--cx-border-medium", e.borderMedium), i.style.setProperty("--cx-title", e.titleColor), i.style.setProperty("--cx-subtitle", e.subtitleColor), i.style.setProperty("--cx-label", e.labelColor), i.style.setProperty("--cx-value", e.valueColor), i.style.setProperty("--cx-pill-bg", e.pillBg), i.style.setProperty("--cx-pill-from", e.pillFromColor), i.style.setProperty("--cx-pill-amt", e.pillAmtColor), i.style.setProperty("--cx-divider", e.divider), i.style.setProperty("--cx-close", e.closeColor), i.style.setProperty("--cx-close-hover", e.closeHoverBg), i.style.setProperty("--cx-copy", e.copyColor), i.style.setProperty("--cx-input-bg", e.inputBg), i.style.setProperty("--cx-input-border", e.inputBorder), i.style.setProperty("--cx-hint", e.hintColor), i.style.setProperty("--cx-surface-subtle", e.surfaceSubtle), i.style.setProperty("--cx-surface-high", e.surfaceHigh), i.style.setProperty("--cx-primary", e.primary), i.style.setProperty("--cx-primary-glow", e.primaryGlow), i.style.setProperty("--cx-primary-gradient", e.primaryGradient), i.style.setProperty("--cx-secondary", e.secondary), i.style.setProperty("--cx-error", e.errorColor), i.style.setProperty("--cx-notice-bg", e.noticeBg), i.style.setProperty("--cx-notice-border", e.noticeBorder), i.style.setProperty("--cx-notice-title", e.noticeTitleColor), i.style.setProperty("--cx-on-primary", e.onPrimary);
8411
8427
  }
8412
8428
  function D(i, e) {
@@ -8416,7 +8432,7 @@ function D(i, e) {
8416
8432
  <div class="__crossx-row-value">${e}</div>
8417
8433
  </div>`;
8418
8434
  }
8419
- function zr(i, e, r, t) {
8435
+ function qr(i, e, r, t) {
8420
8436
  const s = e, o = He(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Ee(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${Z(i.to)}</span>
8421
8437
  <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${J}</button>` : "<span>—</span>", p = ft(i, r, t), _ = ut(i.value, o, n, r), u = _ ? D((t == null ? void 0 : t.label_value) ?? "Value", `<span>${_}</span>`) : "", x = i.data ?? "0x", g = document.createElement("div");
8422
8438
  return g.id = F, g.innerHTML = `
@@ -8457,7 +8473,7 @@ function zr(i, e, r, t) {
8457
8473
  </div>
8458
8474
  `, g;
8459
8475
  }
8460
- const Vr = /* @__PURE__ */ new Set([
8476
+ const jr = /* @__PURE__ */ new Set([
8461
8477
  "0x095ea7b3",
8462
8478
  // approve(address,uint256) — ERC20 / ERC721
8463
8479
  "0xa22cb465",
@@ -8467,12 +8483,12 @@ const Vr = /* @__PURE__ */ new Set([
8467
8483
  "0x8fcbaf0c"
8468
8484
  // permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32) — DAI 스타일
8469
8485
  ]);
8470
- function qr(i) {
8471
- return i ? Vr.has(i.slice(0, 10).toLowerCase()) : !1;
8486
+ function Yr(i) {
8487
+ return i ? jr.has(i.slice(0, 10).toLowerCase()) : !1;
8472
8488
  }
8473
- function jr(i, e, r, t) {
8489
+ function Xr(i, e, r, t) {
8474
8490
  const s = e, o = He(i.chainId, i.nativeSymbol ?? "ETH"), n = i.nativeDecimals ?? 18, a = Ee(i.dappName), l = i.to ? `<span class="__crossx-addr-text">${Z(i.to)}</span>
8475
- <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${J}</button>` : "<span>—</span>", p = ft(i, r, t), u = ut(i.value, o, n, r) ?? "—", x = qr(i.data) ? (t == null ? void 0 : t.send_tx_approve_button) ?? "Approve" : (t == null ? void 0 : t.send_tx_confirm_button) ?? "Confirm", g = document.createElement("div");
8491
+ <button class="__crossx-copy-btn" data-copy="${w(i.to)}" title="Copy address">${J}</button>` : "<span>—</span>", p = ft(i, r, t), u = ut(i.value, o, n, r) ?? "—", x = Yr(i.data) ? (t == null ? void 0 : t.send_tx_approve_button) ?? "Approve" : (t == null ? void 0 : t.send_tx_confirm_button) ?? "Confirm", g = document.createElement("div");
8476
8492
  return g.id = F, g.innerHTML = `
8477
8493
  <div class="__crossx-card __crossx-card--migration __crossx-card--send-tx" style="${H(s)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
8478
8494
  <div class="__crossx-header">
@@ -8512,10 +8528,10 @@ function Ee(i) {
8512
8528
  function w(i) {
8513
8529
  return i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
8514
8530
  }
8515
- function Yr(i) {
8531
+ function Jr(i) {
8516
8532
  return typeof i == "string" && /^0x[0-9a-fA-F]{40}$/i.test(i);
8517
8533
  }
8518
- function Xr(i) {
8534
+ function Zr(i) {
8519
8535
  if (typeof i == "string") return w(i);
8520
8536
  if (typeof i == "number" || typeof i == "bigint" || typeof i == "boolean") return String(i);
8521
8537
  try {
@@ -8524,25 +8540,25 @@ function Xr(i) {
8524
8540
  return String(i);
8525
8541
  }
8526
8542
  }
8527
- function Jr(i) {
8543
+ function Qr(i) {
8528
8544
  return i.includes(":") ? i.split(":")[1] ?? i : i;
8529
8545
  }
8530
- function Zr(i) {
8546
+ function es(i) {
8531
8547
  return `https://www.crossscan.io/address/${i}?tab=txs`;
8532
8548
  }
8533
- function Qr(i, e) {
8534
- return `https://explorer.crosstoken.io/${Jr(i)}/tx/${e}`;
8549
+ function ts(i, e) {
8550
+ return `https://explorer.crosstoken.io/${Qr(i)}/tx/${e}`;
8535
8551
  }
8536
8552
  function mt(i, e) {
8537
8553
  return `<a class="__crossx-addr-text __crossx-row-link" href="${w(e)}" target="_blank" rel="noopener noreferrer">${w(i)}</a>`;
8538
8554
  }
8539
8555
  function be(i) {
8540
- return mt(Z(i), Zr(i));
8556
+ return mt(Z(i), es(i));
8541
8557
  }
8542
8558
  function yt(i, e) {
8543
- return mt(Z(e), Qr(i, e));
8559
+ return mt(Z(e), ts(i, e));
8544
8560
  }
8545
- function es(i, e, r) {
8561
+ function rs(i, e, r) {
8546
8562
  const t = D(
8547
8563
  (r == null ? void 0 : r.label_from) ?? "From",
8548
8564
  `${be(i.from)}
@@ -8574,7 +8590,7 @@ function es(i, e, r) {
8574
8590
  </div>
8575
8591
  `, p;
8576
8592
  }
8577
- function ts(i, e, r) {
8593
+ function ss(i, e, r) {
8578
8594
  const t = document.createElement("div");
8579
8595
  return t.id = F, t.innerHTML = `
8580
8596
  <div class="__crossx-card __crossx-card--migration" style="${H(e)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8591,10 +8607,10 @@ function ts(i, e, r) {
8591
8607
  </div>
8592
8608
  `, t;
8593
8609
  }
8594
- function rs(i, e, r, t) {
8610
+ function is(i, e, r, t) {
8595
8611
  const s = e.status !== "reverted" && e.status !== "timeout", o = e.status === "timeout", n = i.querySelector("#__crossx-ttl"), a = i.querySelector(".__crossx-header");
8596
8612
  if (n) {
8597
- const m = o ? Gr : s ? "" : Hr, y = o ? (t == null ? void 0 : t.tx_timeout) ?? "Transaction timeout" : s ? (t == null ? void 0 : t.tx_success) ?? "Transaction complete" : (t == null ? void 0 : t.tx_failed) ?? "Transaction failed";
8613
+ const m = o ? zr : s ? "" : Kr, y = o ? (t == null ? void 0 : t.tx_timeout) ?? "Transaction timeout" : s ? (t == null ? void 0 : t.tx_success) ?? "Transaction complete" : (t == null ? void 0 : t.tx_failed) ?? "Transaction failed";
8598
8614
  m ? (n.style.display = "flex", n.style.alignItems = "center", n.style.gap = "8px", n.innerHTML = `${m}<span>${w(y)}</span>`) : n.textContent = y;
8599
8615
  }
8600
8616
  if (a && !i.querySelector("#__crossx-close-btn")) {
@@ -8622,15 +8638,15 @@ function rs(i, e, r, t) {
8622
8638
  <button class="__crossx-approve-btn" id="__crossx-done-btn">${w((t == null ? void 0 : t.tx_complete_done_button) ?? (s ? "All Done" : "Done"))}</button>
8623
8639
  `, l.querySelectorAll(".__crossx-copy-btn").forEach((m) => {
8624
8640
  m.addEventListener("click", (y) => {
8625
- var S;
8641
+ var v;
8626
8642
  y.stopPropagation();
8627
8643
  const E = m.dataset.copy;
8628
- E && ((S = navigator.clipboard) == null || S.writeText(E).catch(() => {
8644
+ E && ((v = navigator.clipboard) == null || v.writeText(E).catch(() => {
8629
8645
  }));
8630
8646
  });
8631
8647
  });
8632
8648
  }
8633
- function ss(i, e, r) {
8649
+ function os(i, e, r) {
8634
8650
  const t = e, s = Ee(i.dappName), o = w(i.message), n = document.createElement("div");
8635
8651
  return n.id = F, n.innerHTML = `
8636
8652
  <div class="__crossx-card __crossx-card--migration __crossx-card--sign-msg" style="${H(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8662,7 +8678,7 @@ function ss(i, e, r) {
8662
8678
  </div>
8663
8679
  `, n;
8664
8680
  }
8665
- function is(i, e, r) {
8681
+ function ns(i, e, r) {
8666
8682
  const t = e, s = Ee(i.dappName);
8667
8683
  let o = {};
8668
8684
  if (typeof i.typedData == "string")
@@ -8678,7 +8694,7 @@ function is(i, e, r) {
8678
8694
  <span class="__crossx-td-value">${w(n)}</span>
8679
8695
  </div>`;
8680
8696
  for (const [_, u] of Object.entries(a)) {
8681
- const x = Xr(u), f = Yr(u) ? `<span class="__crossx-addr-text">${Z(u)}</span>
8697
+ const x = Zr(u), f = Jr(u) ? `<span class="__crossx-addr-text">${Z(u)}</span>
8682
8698
  <button class="__crossx-copy-btn" data-copy="${w(String(u))}" title="Copy">${J}</button>` : `<span>${x}</span>`;
8683
8699
  l += `
8684
8700
  <div class="__crossx-td-row">
@@ -8717,30 +8733,30 @@ function is(i, e, r) {
8717
8733
  </div>
8718
8734
  `, p;
8719
8735
  }
8720
- const os = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
8736
+ const as = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
8721
8737
  <line x1="12" y1="5" x2="12" y2="19"/>
8722
8738
  <line x1="5" y1="12" x2="19" y2="12"/>
8723
- </svg>`, ns = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="var(--cx-primary, #00ceb2)"/><path d="M7.5 12.5L10.5 15.5L16.5 8.5" stroke="var(--cx-on-primary, #000)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
8739
+ </svg>`, cs = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="var(--cx-primary, #00ceb2)"/><path d="M7.5 12.5L10.5 15.5L16.5 8.5" stroke="var(--cx-on-primary, #000)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
8724
8740
  function bt(i) {
8725
8741
  return i.name || `Account ${i.index + 1}`;
8726
8742
  }
8727
- function as() {
8743
+ function ls() {
8728
8744
  return `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><rect width="32" height="32" rx="16" fill="#121212" fill-opacity="0.1"/><g fill="#121212" fill-opacity="0.5">${wt}</g></svg>`;
8729
8745
  }
8730
- const cs = We().portraitBaseUrl;
8731
- function ls(i, e) {
8746
+ const ds = We().portraitBaseUrl;
8747
+ function ps(i, e) {
8732
8748
  const r = e.replace("#", "");
8733
- return `${cs}/portrait/evm/${i}.png?size=256&bg=${r}`;
8749
+ return `${ds}/portrait/evm/${i}.png?size=256&bg=${r}`;
8734
8750
  }
8735
- function vt(i, e, r) {
8736
- const t = ls(i, r), o = as().replace(/"/g, "&quot;");
8751
+ function St(i, e, r) {
8752
+ const t = ps(i, r), o = ls().replace(/"/g, "&quot;");
8737
8753
  return `<span class="__crossx-wallet-avatar"><img class="__crossx-wallet-avatar-img" src="${t}" alt="" onerror="this.style.display='none';this.nextElementSibling.innerHTML='${o}';this.nextElementSibling.style.display='flex';"><span class="__crossx-wallet-avatar-fallback"></span></span>`;
8738
8754
  }
8739
- function ds(i, e, r, t) {
8755
+ function _s(i, e, r, t) {
8740
8756
  const s = r == null ? void 0 : r.toLowerCase(), o = i.map((a) => {
8741
- const l = s && a.address.toLowerCase() === s, p = l ? " __crossx-wallet-item--selected" : "", _ = l ? `<span class="__crossx-wallet-selected">${w((t == null ? void 0 : t.wallet_selector_selected) ?? "Selected")}</span><span class="__crossx-wallet-check">${ns}</span>` : "";
8757
+ const l = s && a.address.toLowerCase() === s, p = l ? " __crossx-wallet-item--selected" : "", _ = l ? `<span class="__crossx-wallet-selected">${w((t == null ? void 0 : t.wallet_selector_selected) ?? "Selected")}</span><span class="__crossx-wallet-check">${cs}</span>` : "";
8742
8758
  return `<button class="__crossx-wallet-item${p}" data-wallet-index="${a.index}" data-wallet-address="${w(a.address)}">
8743
- ${vt(a.address, a.index, e.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(bt(a))}</span><span class="__crossx-wallet-addr">${ht(a.address)}</span></span>${_}
8759
+ ${St(a.address, a.index, e.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(bt(a))}</span><span class="__crossx-wallet-addr">${ht(a.address)}</span></span>${_}
8744
8760
  </button>`;
8745
8761
  }).join(""), n = document.createElement("div");
8746
8762
  return n.id = F, n.className = "__crossx-overlay--wallet-selector", n.innerHTML = `
@@ -8760,7 +8776,7 @@ function ds(i, e, r, t) {
8760
8776
  ${o}
8761
8777
  </div>
8762
8778
  <button class="__crossx-wallet-add" id="__crossx-add-wallet-btn" type="button">
8763
- <span class="__crossx-wallet-add-icon">${os}</span>
8779
+ <span class="__crossx-wallet-add-icon">${as}</span>
8764
8780
  <span class="__crossx-wallet-add-label">${w((t == null ? void 0 : t.wallet_selector_add_button) ?? "Add Wallet")}</span>
8765
8781
  </button>
8766
8782
  <p class="__crossx-wallet-add-error" id="__crossx-add-wallet-error" role="alert" aria-live="polite" hidden></p>
@@ -8775,11 +8791,11 @@ function ds(i, e, r, t) {
8775
8791
  </div>
8776
8792
  `, n;
8777
8793
  }
8778
- function ps(i, e) {
8794
+ function hs(i, e) {
8779
8795
  const r = document.createElement("div");
8780
8796
  r.id = F;
8781
8797
  const t = document.createElement("div");
8782
- t.className = "__crossx-card __crossx-card--wallet-created", Kr(t, i), t.role = "dialog", t.ariaModal = "true", t.setAttribute("aria-labelledby", "__crossx-ttl");
8798
+ t.className = "__crossx-card __crossx-card--wallet-created", Vr(t, i), t.role = "dialog", t.ariaModal = "true", t.setAttribute("aria-labelledby", "__crossx-ttl");
8783
8799
  const s = document.createElement("div");
8784
8800
  s.className = "__crossx-header";
8785
8801
  const o = document.createElement("span");
@@ -8816,22 +8832,22 @@ function ps(i, e) {
8816
8832
  const f = document.createElement("button");
8817
8833
  return f.className = "__crossx-wallet-created-btn", f.id = "__crossx-wallet-created-done", f.type = "button", f.textContent = (e == null ? void 0 : e.wallet_created_button) ?? "Got it", g.appendChild(f), t.append(s, l, p, g), r.appendChild(t), r;
8818
8834
  }
8819
- const _s = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8835
+ const us = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8820
8836
  <path d="M26.693 21.193c-.028-3.168 2.587-4.712 2.706-4.786-1.477-2.16-3.77-2.454-4.58-2.484-1.944-.197-3.804 1.148-4.793 1.148-.992 0-2.52-1.12-4.147-1.09-2.13.032-4.1 1.239-5.198 3.133-2.222 3.855-.569 9.562 1.593 12.69 1.061 1.535 2.318 3.258 3.975 3.196 1.6-.064 2.2-1.03 4.133-1.03 1.928 0 2.48 1.03 4.172.997 1.72-.03 2.806-1.56 3.862-3.1 1.211-1.779 1.713-3.495 1.74-3.583-.037-.017-3.427-1.316-3.463-5.09z" fill="currentColor"/>
8821
8837
  <path d="M23.527 11.876c.877-1.065 1.471-2.545 1.31-4.024-1.266.053-2.807.845-3.718 1.907-.813.946-1.53 2.468-1.34 3.915 1.41.107 2.852-.716 3.748-1.798z" fill="currentColor"/>
8822
- </svg>`, hs = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8838
+ </svg>`, xs = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
8823
8839
  <path d="M38.06 20.44c0-1.34-.12-2.63-.34-3.87H20.5v7.32h9.84c-.42 2.28-1.71 4.21-3.65 5.51v4.57h5.91c3.46-3.19 5.46-7.88 5.46-13.53z" fill="#4285F4"/>
8824
8840
  <path d="M20.5 38.5c4.94 0 9.09-1.64 12.12-4.44l-5.91-4.57c-1.64 1.1-3.73 1.75-6.21 1.75-4.77 0-8.82-3.22-10.26-7.55H4.16v4.72A18.49 18.49 0 0 0 20.5 38.5z" fill="#34A853"/>
8825
8841
  <path d="M10.24 23.69A11.16 11.16 0 0 1 9.66 20c0-1.28.22-2.52.58-3.69v-4.72H4.16A18.49 18.49 0 0 0 2 20c0 2.97.71 5.78 1.97 8.28l6.27-4.59z" fill="#FBBC05"/>
8826
8842
  <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"/>
8827
8843
  </svg>`;
8828
- function us(i) {
8844
+ function gs(i) {
8829
8845
  const e = Ft(i);
8830
- return `<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${Ur[i] ?? ""}</span><span class="__crossx-connect-other-wallet-name">${w(e)}</span></span>`;
8846
+ return `<span class="__crossx-connect-other-wallet-desc-part"><span class="__crossx-connect-other-wallet-icon" aria-hidden="true">${Gr[i] ?? ""}</span><span class="__crossx-connect-other-wallet-name">${w(e)}</span></span>`;
8831
8847
  }
8832
- function xs(i) {
8848
+ function fs(i) {
8833
8849
  if (i.length === 0) return "";
8834
- const e = (s) => us(i[s]), r = "Supported wallets include ";
8850
+ const e = (s) => gs(i[s]), r = "Supported wallets include ";
8835
8851
  if (i.length === 1)
8836
8852
  return `${r}${e(0)}.`;
8837
8853
  if (i.length === 2)
@@ -8841,7 +8857,7 @@ function xs(i) {
8841
8857
  const t = i.length - 3;
8842
8858
  return `${r}${e(0)}, ${e(1)}, ${e(2)}, and ${t} more.`;
8843
8859
  }
8844
- function gs(i, e = [], r) {
8860
+ function ws(i, e = [], r) {
8845
8861
  const t = i, s = w(String(e[0])), o = w((r == null ? void 0 : r.login_selector_or) ?? "or"), n = e.length > 0 ? `
8846
8862
  <div class="__crossx-login-or-divider">
8847
8863
  <hr><span>${o}</span><hr>
@@ -8849,7 +8865,7 @@ function gs(i, e = [], r) {
8849
8865
  <button type="button" class="__crossx-connect-other-block" id="__crossx-connect-other-wallet-btn" data-wallet-id="${s}" aria-labelledby="__crossx-connect-other-heading">
8850
8866
  <span class="__crossx-connect-other-text">
8851
8867
  <span class="__crossx-connect-other-title" id="__crossx-connect-other-heading">${w((r == null ? void 0 : r.login_selector_connect_other_wallets) ?? "Connect with Other Wallets")}</span>
8852
- <span class="__crossx-connect-other-desc __crossx-connect-other-summary">${xs(e)}</span>
8868
+ <span class="__crossx-connect-other-desc __crossx-connect-other-summary">${fs(e)}</span>
8853
8869
  </span>
8854
8870
  </button>` : "", a = document.createElement("div");
8855
8871
  return a.id = F, a.innerHTML = `
@@ -8865,11 +8881,11 @@ function gs(i, e = [], r) {
8865
8881
  <div class="__crossx-body">
8866
8882
  <div class="__crossx-login-btn-row">
8867
8883
  <button class="__crossx-login-btn" id="__crossx-apple-btn" type="button">
8868
- <span class="__crossx-login-icon" style="color:var(--cx-value);">${_s}</span>
8884
+ <span class="__crossx-login-icon" style="color:var(--cx-value);">${us}</span>
8869
8885
  <span class="__crossx-login-btn-label">${w((r == null ? void 0 : r.login_selector_apple) ?? "Sign in with Apple")}</span>
8870
8886
  </button>
8871
8887
  <button class="__crossx-login-btn" id="__crossx-google-btn" type="button">
8872
- <span class="__crossx-login-icon">${hs}</span>
8888
+ <span class="__crossx-login-icon">${xs}</span>
8873
8889
  <span class="__crossx-login-btn-label">${w((r == null ? void 0 : r.login_selector_google) ?? "Sign in with Google")}</span>
8874
8890
  </button>
8875
8891
  </div>${n}
@@ -8880,7 +8896,7 @@ function gs(i, e = [], r) {
8880
8896
  </div>
8881
8897
  `, a;
8882
8898
  }
8883
- function fs(i, e) {
8899
+ function ms(i, e) {
8884
8900
  const r = i, t = document.createElement("div");
8885
8901
  t.id = F;
8886
8902
  const s = w(e.message).replace(/\n/g, "<br>"), o = e.email ? `<div class="__crossx-session-account-card">
@@ -8908,7 +8924,7 @@ function fs(i, e) {
8908
8924
  </div>
8909
8925
  `, t;
8910
8926
  }
8911
- function ws(i, e = !0) {
8927
+ function ys(i, e = !0) {
8912
8928
  const r = i, t = e ? `<button class="__crossx-close" id="__crossx-close-btn" aria-label="Close">${W}</button>` : "", s = e ? '<button class="__crossx-skip-btn" id="__crossx-skip-btn">Skip for Now</button>' : "", o = document.createElement("div");
8913
8929
  return o.id = F, o.innerHTML = `
8914
8930
  <div class="__crossx-card __crossx-card--migration" style="${H(r)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8924,7 +8940,7 @@ function ws(i, e = !0) {
8924
8940
  <p class="__crossx-mig-info-desc">It safely restores and integrates all your previous assets. Simply verify your PIN to get started.</p>
8925
8941
  </div>
8926
8942
  <button class="__crossx-recover-btn" id="__crossx-recover-btn">
8927
- <span class="__crossx-recover-icon">${$r}</span>
8943
+ <span class="__crossx-recover-icon">${Br}</span>
8928
8944
  <span class="__crossx-recover-label">Import from Social Backup</span>
8929
8945
  </button>
8930
8946
  ${s}
@@ -8932,7 +8948,7 @@ function ws(i, e = !0) {
8932
8948
  </div>
8933
8949
  `, o;
8934
8950
  }
8935
- function ms(i, e) {
8951
+ function bs(i, e) {
8936
8952
  const r = i, { errorMessage: t, attemptCount: s, maxAttempts: o = 5 } = e ?? {}, n = !!t, a = n ? " --error" : "", l = s != null && s > 0 ? `<p class="__crossx-pin-attempt">${s}/${o}</p>` : "", p = s != null && s >= 3 ? '<p class="__crossx-pin-warning">Your account will be locked after further failures.</p>' : "", _ = n ? `<p class="__crossx-pin-error-text">${t}</p>` : "", u = document.createElement("div");
8937
8953
  return u.id = F, u.innerHTML = `
8938
8954
  <div class="__crossx-card __crossx-card--migration" style="${H(r)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
@@ -8956,12 +8972,12 @@ function ms(i, e) {
8956
8972
  </div>
8957
8973
  `, u;
8958
8974
  }
8959
- function ys(i) {
8975
+ function Ss(i) {
8960
8976
  const e = new Date(i), r = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], t = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], s = r[e.getDay()], o = t[e.getMonth()], n = e.getDate(), a = String(e.getHours()).padStart(2, "0"), l = String(e.getMinutes()).padStart(2, "0");
8961
8977
  return `${s}, ${o} ${n} ${a}:${l}`;
8962
8978
  }
8963
- function bs(i, e, r) {
8964
- const t = i, s = e <= 0, o = s ? null : Date.now() + e * 1e3, n = o ? ys(o) : null, a = document.createElement("div");
8979
+ function vs(i, e, r) {
8980
+ const t = i, s = e <= 0, o = s ? null : Date.now() + e * 1e3, n = o ? Ss(o) : null, a = document.createElement("div");
8965
8981
  return a.id = F, a.innerHTML = `
8966
8982
  <div class="__crossx-card __crossx-card--migration" style="${H(t)}" role="dialog" aria-modal="true" aria-labelledby="__crossx-ttl">
8967
8983
  <div class="__crossx-header">
@@ -8991,10 +9007,10 @@ function bs(i, e, r) {
8991
9007
  return () => clearInterval(u);
8992
9008
  } };
8993
9009
  }
8994
- function vs(i) {
9010
+ function Es(i) {
8995
9011
  const r = [i.check1, i.check2].map((t, s) => `
8996
9012
  <div class="__crossx-pw-notice-item" data-check-index="${s}" role="checkbox" aria-checked="false" tabindex="0">
8997
- <div class="__crossx-pw-notice-check" id="__crossx-notice-check-${s}">${Is}</div>
9013
+ <div class="__crossx-pw-notice-check" id="__crossx-notice-check-${s}">${Ts}</div>
8998
9014
  <span class="__crossx-pw-notice-item-text">${w(t)}</span>
8999
9015
  </div>
9000
9016
  `).join("");
@@ -9010,7 +9026,7 @@ function vs(i) {
9010
9026
  <div class="__crossx-pw-fields __crossx-pw-fields--notice">
9011
9027
  <div class="__crossx-pw-notice-header">
9012
9028
  <div class="__crossx-pw-notice-title-row">
9013
- <span class="__crossx-pw-notice-icon">${ks}</span>
9029
+ <span class="__crossx-pw-notice-icon">${Rs}</span>
9014
9030
  <p class="__crossx-pw-notice-title">${w(i.noticeTitle)}</p>
9015
9031
  </div>
9016
9032
  <p class="__crossx-pw-notice-desc">${w(i.noticeDesc)}</p>
@@ -9032,7 +9048,7 @@ function vs(i) {
9032
9048
  }
9033
9049
  function Ce(i) {
9034
9050
  const e = !!i.lockExpiresAt && i.lockExpiresAt > Date.now(), r = i.lockExpiresAt ? ` data-lock-expires="${i.lockExpiresAt}"` : "", t = i.headerSubtitle ? `<p class="__crossx-pin6-header-sub">${w(i.headerSubtitle)}</p>` : "", s = i.subtitle ? `<p class="__crossx-pin6-subtitle">${w(i.subtitle)}</p>` : "", o = i.errorMessage ? `<p class="__crossx-pin6-error" id="__crossx-pin6-error">${w(i.errorMessage)}</p>` : '<p class="__crossx-pin6-error" id="__crossx-pin6-error"></p>', n = e ? `<p class="__crossx-pin6-lock-msg" id="__crossx-pin6-lock-msg">
9035
- ${St}
9051
+ ${vt}
9036
9052
  <span id="__crossx-pin6-lock-countdown"></span>
9037
9053
  </p>` : "", a = i.warningMessage && i.attemptCount != null && i.attemptCount > 0 ? `<p class="__crossx-pin6-warning" id="__crossx-pin6-warning">${w(i.warningMessage)}</p>` : '<p class="__crossx-pin6-warning" id="__crossx-pin6-warning"></p>', l = i.attemptCount != null && i.attemptCount > 0 ? `<p class="__crossx-pin6-attempt" id="__crossx-pin6-attempt">${i.attemptCount}/${i.maxAttempts ?? "?"}</p>` : '<p class="__crossx-pin6-attempt" id="__crossx-pin6-attempt"></p>', p = e ? " --locked" : "", _ = Array.from(
9038
9054
  { length: 6 },
@@ -9060,7 +9076,7 @@ function Ce(i) {
9060
9076
  <div class="__crossx-pin6-numpad-row">
9061
9077
  <button type="button" class="__crossx-pin6-numpad-key --empty" aria-hidden="true"></button>
9062
9078
  <button type="button" class="__crossx-pin6-numpad-key${g}" data-key="0">0</button>
9063
- <button type="button" class="__crossx-pin6-numpad-key --delete${g}" data-key="backspace" aria-label="Delete">${As}</button>
9079
+ <button type="button" class="__crossx-pin6-numpad-key --delete${g}" data-key="backspace" aria-label="Delete">${ks}</button>
9064
9080
  </div>
9065
9081
  </div>`;
9066
9082
  return `
@@ -9095,56 +9111,56 @@ function lt(i, e) {
9095
9111
  </div>
9096
9112
  `, r;
9097
9113
  }
9098
- function Ss(i, e) {
9114
+ function As(i, e) {
9099
9115
  if (i.length !== 6) return e.tooShort;
9100
9116
  if (!/^\d+$/.test(i)) return e.numbersOnly;
9101
9117
  if (/(.)\1{2}/.test(i)) return e.repeatingDigit;
9102
9118
  const r = i.split("").map(Number), t = r.every((o, n) => n === 0 || o === (r[n - 1] + 1) % 10), s = r.every((o, n) => n === 0 || o === (r[n - 1] + 9) % 10);
9103
9119
  return t || s ? e.sequential : i[0] !== i[1] && i === i.slice(0, 2).repeat(3) ? e.alternatingPattern : null;
9104
9120
  }
9105
- function Es(i) {
9121
+ function Is(i) {
9106
9122
  const e = Math.max(0, Math.ceil(i / 1e3)), r = Math.floor(e / 3600), t = Math.floor(e % 3600 / 60), s = e % 60;
9107
9123
  return r > 0 ? `${r}h ${String(t).padStart(2, "0")}m` : `${String(t).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
9108
9124
  }
9109
9125
  function Pe(i, e, r, t, s, o, n) {
9110
9126
  var ze, Ve;
9111
9127
  let a = !!(o && o > Date.now()), l = !1;
9112
- const p = () => Array.from(i.querySelectorAll(".__crossx-pin6-box")), _ = () => i.querySelector("#__crossx-pin6-boxes"), u = () => i.querySelector("#__crossx-pin6-error"), x = () => i.querySelector("#__crossx-pin6-lock-msg"), g = () => i.querySelector("#__crossx-pin6-lock-countdown"), f = () => i.querySelector(".__crossx-pin6-body"), m = "●", y = (b, v) => {
9113
- b.dataset.digit = v, b.value = m;
9128
+ const p = () => Array.from(i.querySelectorAll(".__crossx-pin6-box")), _ = () => i.querySelector("#__crossx-pin6-boxes"), u = () => i.querySelector("#__crossx-pin6-error"), x = () => i.querySelector("#__crossx-pin6-lock-msg"), g = () => i.querySelector("#__crossx-pin6-lock-countdown"), f = () => i.querySelector(".__crossx-pin6-body"), m = "●", y = (b, S) => {
9129
+ b.dataset.digit = S, b.value = m;
9114
9130
  }, E = (b) => {
9115
9131
  delete b.dataset.digit, b.value = "";
9116
- }, S = (b) => b.dataset.digit ?? "", A = () => p().map(S).join(""), k = () => Array.from(i.querySelectorAll(".__crossx-pin6-dot")), T = () => {
9132
+ }, v = (b) => b.dataset.digit ?? "", A = () => p().map(v).join(""), T = () => Array.from(i.querySelectorAll(".__crossx-pin6-dot")), k = () => {
9117
9133
  var I;
9118
- const b = p(), v = k();
9119
- if (v.length && (v.forEach((R, N) => {
9120
- const $ = !!(b[N] && S(b[N]));
9134
+ const b = p(), S = T();
9135
+ if (S.length && (S.forEach((R, N) => {
9136
+ const $ = !!(b[N] && v(b[N]));
9121
9137
  R.classList.toggle("--filled", $), R.classList.toggle("--active", !1);
9122
9138
  }), !a && !l)) {
9123
- const R = b.findIndex(($) => !S($));
9124
- (I = v[R === -1 ? 5 : R]) == null || I.classList.add("--active");
9139
+ const R = b.findIndex(($) => !v($));
9140
+ (I = S[R === -1 ? 5 : R]) == null || I.classList.add("--active");
9125
9141
  }
9126
9142
  }, O = () => {
9127
- i.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach((v) => v.classList.toggle("--disabled", a)), k().forEach((v) => v.classList.toggle("--locked", a)), T();
9143
+ i.querySelectorAll(".__crossx-pin6-numpad-key[data-key]").forEach((S) => S.classList.toggle("--disabled", a)), T().forEach((S) => S.classList.toggle("--locked", a)), k();
9128
9144
  }, M = (b) => {
9129
- a = b, p().forEach((v) => {
9130
- v.disabled = b, v.classList.toggle("--locked", b);
9145
+ a = b, p().forEach((S) => {
9146
+ S.disabled = b, S.classList.toggle("--locked", b);
9131
9147
  });
9132
9148
  }, G = () => i.querySelector("#__crossx-pin6-attempt"), P = () => {
9133
9149
  const b = u();
9134
9150
  b && (b.textContent = "");
9135
9151
  }, ee = () => n ?? "Your account will be locked after further failures.", C = () => i.querySelector("#__crossx-pin6-warning"), L = (b) => {
9136
9152
  var I;
9137
- let v = C();
9138
- if (!v) {
9139
- v = document.createElement("p"), v.className = "__crossx-pin6-warning", v.id = "__crossx-pin6-warning";
9153
+ let S = C();
9154
+ if (!S) {
9155
+ S = document.createElement("p"), S.className = "__crossx-pin6-warning", S.id = "__crossx-pin6-warning";
9140
9156
  const R = u();
9141
- R ? R.insertAdjacentElement("afterend", v) : (I = f()) == null || I.appendChild(v);
9157
+ R ? R.insertAdjacentElement("afterend", S) : (I = f()) == null || I.appendChild(S);
9142
9158
  }
9143
- v.textContent = b;
9159
+ S.textContent = b;
9144
9160
  }, U = () => {
9145
9161
  const b = C();
9146
9162
  b && (b.textContent = "");
9147
- }, ae = (b, v) => {
9163
+ }, ae = (b, S) => {
9148
9164
  var R;
9149
9165
  let I = G();
9150
9166
  if (!I) {
@@ -9152,35 +9168,35 @@ function Pe(i, e, r, t, s, o, n) {
9152
9168
  const N = C() ?? u();
9153
9169
  N ? N.insertAdjacentElement("afterend", I) : (R = f()) == null || R.appendChild(I);
9154
9170
  }
9155
- I.textContent = `${b}/${v}`;
9171
+ I.textContent = `${b}/${S}`;
9156
9172
  }, pe = () => {
9157
9173
  const b = G();
9158
9174
  b && (b.textContent = "");
9159
9175
  }, _e = (b) => {
9160
- const v = u();
9161
- v && (v.textContent = b);
9176
+ const S = u();
9177
+ S && (S.textContent = b);
9162
9178
  const I = _();
9163
9179
  I == null || I.classList.add("--shake"), setTimeout(() => I == null ? void 0 : I.classList.remove("--shake"), 500), p().forEach(E), setTimeout(() => {
9164
9180
  var R;
9165
- (R = p()[0]) == null || R.focus(), T();
9181
+ (R = p()[0]) == null || R.focus(), k();
9166
9182
  }, 50);
9167
9183
  }, he = (b) => {
9168
9184
  var $;
9169
9185
  M(!0), p().forEach(E), O();
9170
- const v = u();
9171
- if (v && (v.textContent = "Too many failed attempts. Please wait."), !x()) {
9186
+ const S = u();
9187
+ if (S && (S.textContent = "Too many failed attempts. Please wait."), !x()) {
9172
9188
  const B = document.createElement("p");
9173
- B.className = "__crossx-pin6-lock-msg", B.id = "__crossx-pin6-lock-msg", B.innerHTML = `${St}<span id="__crossx-pin6-lock-countdown"></span>`;
9189
+ B.className = "__crossx-pin6-lock-msg", B.id = "__crossx-pin6-lock-msg", B.innerHTML = `${vt}<span id="__crossx-pin6-lock-countdown"></span>`;
9174
9190
  const V = u();
9175
9191
  V ? V.insertAdjacentElement("afterend", B) : ($ = f()) == null || $.appendChild(B);
9176
9192
  }
9177
9193
  const I = () => {
9178
9194
  var Q;
9179
9195
  const B = b - Date.now(), V = g();
9180
- B <= 0 ? (clearInterval(R), M(!1), (Q = x()) == null || Q.remove(), v && (v.textContent = ""), O(), setTimeout(() => {
9196
+ B <= 0 ? (clearInterval(R), M(!1), (Q = x()) == null || Q.remove(), S && (S.textContent = ""), O(), setTimeout(() => {
9181
9197
  var we;
9182
9198
  return (we = p()[0]) == null ? void 0 : we.focus();
9183
- }, 50)) : V && (V.textContent = ` ${Es(B)}`);
9199
+ }, 50)) : V && (V.textContent = ` ${Is(B)}`);
9184
9200
  }, R = setInterval(I, 1e3);
9185
9201
  I();
9186
9202
  const N = new MutationObserver(() => {
@@ -9191,21 +9207,21 @@ function Pe(i, e, r, t, s, o, n) {
9191
9207
  if (a || l) return;
9192
9208
  const b = A();
9193
9209
  if (b.length === 6) {
9194
- l = !0, p().forEach((v) => {
9195
- v.disabled = !0;
9210
+ l = !0, p().forEach((S) => {
9211
+ S.disabled = !0;
9196
9212
  });
9197
9213
  try {
9198
9214
  if (s) {
9199
- const v = await s(b);
9200
- v.ok ? e(b) : v.lockExpiresAt ? (pe(), he(v.lockExpiresAt)) : (_e(v.error ?? "Incorrect PIN. Please try again."), v.attemptCount != null && v.maxAttempts != null ? (L(ee()), ae(v.attemptCount, v.maxAttempts)) : (U(), pe()));
9215
+ const S = await s(b);
9216
+ S.ok ? e(b) : S.lockExpiresAt ? (pe(), he(S.lockExpiresAt)) : (_e(S.error ?? "Incorrect PIN. Please try again."), S.attemptCount != null && S.maxAttempts != null ? (L(ee()), ae(S.attemptCount, S.maxAttempts)) : (U(), pe()));
9201
9217
  } else
9202
9218
  e(b);
9203
- } catch (v) {
9204
- t && t(v);
9219
+ } catch (S) {
9220
+ t && t(S);
9205
9221
  } finally {
9206
- l = !1, a || p().forEach((v) => {
9207
- v.disabled = !1;
9208
- }), T();
9222
+ l = !1, a || p().forEach((S) => {
9223
+ S.disabled = !1;
9224
+ }), k();
9209
9225
  }
9210
9226
  }
9211
9227
  };
@@ -9215,30 +9231,30 @@ function Pe(i, e, r, t, s, o, n) {
9215
9231
  }, 100);
9216
9232
  const Ke = () => {
9217
9233
  if (a || l) return;
9218
- const b = p(), v = b.find((I) => !S(I)) ?? b[b.length - 1];
9219
- v == null || v.focus();
9234
+ const b = p(), S = b.find((I) => !v(I)) ?? b[b.length - 1];
9235
+ S == null || S.focus();
9220
9236
  };
9221
9237
  (ze = _()) == null || ze.addEventListener("click", (b) => {
9222
9238
  b.target.classList.contains("__crossx-pin6-box") || Ke();
9223
9239
  }), (Ve = f()) == null || Ve.addEventListener("click", (b) => {
9224
- const v = b.target;
9225
- v.classList.contains("__crossx-pin6-box") || v.closest("button") || Ke();
9226
- }), p().forEach((b, v) => {
9240
+ const S = b.target;
9241
+ S.classList.contains("__crossx-pin6-box") || S.closest("button") || Ke();
9242
+ }), p().forEach((b, S) => {
9227
9243
  b.addEventListener("input", () => {
9228
9244
  var R;
9229
9245
  const I = b.value.replace(/\D/g, "").slice(-1);
9230
- I ? y(b, I) : E(b), P(), I && v < 5 && ((R = p()[v + 1]) == null || R.focus()), T(), A().length === 6 && setTimeout(te, 80);
9246
+ I ? y(b, I) : E(b), P(), I && S < 5 && ((R = p()[S + 1]) == null || R.focus()), k(), A().length === 6 && setTimeout(te, 80);
9231
9247
  }), b.addEventListener("keydown", (I) => {
9232
9248
  var R, N;
9233
9249
  if (I.key === "Backspace") {
9234
- if (I.preventDefault(), S(b))
9250
+ if (I.preventDefault(), v(b))
9235
9251
  E(b);
9236
- else if (v > 0) {
9237
- const $ = p()[v - 1];
9252
+ else if (S > 0) {
9253
+ const $ = p()[S - 1];
9238
9254
  E($), $.focus();
9239
9255
  }
9240
- T();
9241
- } else I.key === "ArrowLeft" && v > 0 ? (I.preventDefault(), (R = p()[v - 1]) == null || R.focus()) : I.key === "ArrowRight" && v < 5 ? (I.preventDefault(), (N = p()[v + 1]) == null || N.focus()) : I.key === "Escape" && r();
9256
+ k();
9257
+ } else I.key === "ArrowLeft" && S > 0 ? (I.preventDefault(), (R = p()[S - 1]) == null || R.focus()) : I.key === "ArrowRight" && S < 5 ? (I.preventDefault(), (N = p()[S + 1]) == null || N.focus()) : I.key === "Escape" && r();
9242
9258
  }), b.addEventListener("paste", (I) => {
9243
9259
  var $, B;
9244
9260
  I.preventDefault();
@@ -9247,52 +9263,52 @@ function Pe(i, e, r, t, s, o, n) {
9247
9263
  const N = p();
9248
9264
  R.split("").forEach((V, Q) => {
9249
9265
  N[Q] && y(N[Q], V);
9250
- }), (B = N[Math.min(R.length - 1, 5)]) == null || B.focus(), P(), T(), A().length === 6 && setTimeout(te, 80);
9266
+ }), (B = N[Math.min(R.length - 1, 5)]) == null || B.focus(), P(), k(), A().length === 6 && setTimeout(te, 80);
9251
9267
  }), b.addEventListener("focus", () => b.select());
9252
9268
  });
9253
9269
  const ue = i.querySelector("#__crossx-pin6-numpad");
9254
9270
  if (ue) {
9255
9271
  let b = null;
9256
- const v = () => {
9272
+ const S = () => {
9257
9273
  b && (b.classList.remove("--pressed"), b = null);
9258
9274
  };
9259
9275
  ue.addEventListener("pointerdown", (R) => {
9260
9276
  const N = R.target.closest(".__crossx-pin6-numpad-key");
9261
- !N || a || l || (v(), b = N, N.classList.add("--pressed"), N.setPointerCapture(R.pointerId));
9277
+ !N || a || l || (S(), b = N, N.classList.add("--pressed"), N.setPointerCapture(R.pointerId));
9262
9278
  });
9263
9279
  const I = (R) => {
9264
9280
  const N = R.dataset.key;
9265
9281
  if (!N) return;
9266
9282
  if (N === "backspace") {
9267
- const Q = [...p()].reverse().find((we) => S(we));
9268
- Q && (E(Q), P()), T();
9283
+ const Q = [...p()].reverse().find((we) => v(we));
9284
+ Q && (E(Q), P()), k();
9269
9285
  return;
9270
9286
  }
9271
9287
  if (!/^\d$/.test(N)) return;
9272
- const B = p().find((V) => !S(V));
9273
- B && (y(B, N), P(), T(), A().length === 6 && setTimeout(te, 80));
9288
+ const B = p().find((V) => !v(V));
9289
+ B && (y(B, N), P(), k(), A().length === 6 && setTimeout(te, 80));
9274
9290
  };
9275
9291
  ue.addEventListener("pointerup", (R) => {
9276
9292
  if (!b) return;
9277
9293
  const N = b;
9278
- v();
9294
+ S();
9279
9295
  const $ = N.getBoundingClientRect();
9280
9296
  R.clientX >= $.left && R.clientX <= $.right && R.clientY >= $.top && R.clientY <= $.bottom && !a && !l && I(N);
9281
- }), ue.addEventListener("pointercancel", v), ue.addEventListener("pointerleave", v, !0), T(), o && o > Date.now() && O();
9297
+ }), ue.addEventListener("pointercancel", S), ue.addEventListener("pointerleave", S, !0), k(), o && o > Date.now() && O();
9282
9298
  }
9283
9299
  }
9284
- const As = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
9300
+ const ks = `<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg">
9285
9301
  <path d="M7.36 0.5H19.5C20.6046 0.5 21.5 1.39543 21.5 2.5V14.5C21.5 15.6046 20.6046 16.5 19.5 16.5H7.36C6.76 16.5 6.19 16.24 5.8 15.79L0.94 10.02C0.35 9.32 0.35 8.3 0.94 7.6L5.8 1.71C6.19 1.26 6.76 0.5 7.36 0.5Z" stroke="currentColor" stroke-width="1.2" fill="none"/>
9286
9302
  <line x1="10" y1="5.5" x2="16" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
9287
9303
  <line x1="16" y1="5.5" x2="10" y2="11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
9288
- </svg>`, St = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
9304
+ </svg>`, vt = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
9289
9305
  <path d="M14.5 8.5H14V6.5C14 4.015 11.985 2 9.5 2C7.015 2 5 4.015 5 6.5V8.5H4.5C3.672 8.5 3 9.172 3 10V16.5C3 17.328 3.672 18 4.5 18H14.5C15.328 18 16 17.328 16 16.5V10C16 9.172 15.328 8.5 14.5 8.5ZM10.5 13.415V15C10.5 15.276 10.276 15.5 10 15.5H9C8.724 15.5 8.5 15.276 8.5 15V13.415C8.187 13.196 8 12.847 8 12.5C8 11.672 8.672 11 9.5 11C10.328 11 11 11.672 11 12.5C11 12.847 10.813 13.196 10.5 13.415ZM12.5 8.5H6.5V6.5C6.5 4.843 7.843 3.5 9.5 3.5C11.157 3.5 12.5 4.843 12.5 6.5V8.5Z" fill="currentColor"/>
9290
- </svg>`, Is = `<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
9306
+ </svg>`, Ts = `<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg">
9291
9307
  <path d="M1 4.5L4 7.5L10 1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
9292
- </svg>`, ks = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
9308
+ </svg>`, Rs = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
9293
9309
  <path d="M12 0C18.6274 0 24 5.37258 24 12C23.9999 18.6273 18.6274 24 12 24C5.37264 24 9.89594e-05 18.6273 0 12C0 5.37258 5.37258 0 12 0ZM10.875 15.127V17.377H13.125V15.127H10.875ZM10.875 6.62207V13.627H13.125V6.62207H10.875Z" fill="currentColor"/>
9294
9310
  </svg>`;
9295
- function Ts(i, e, r) {
9311
+ function Cs(i, e, r) {
9296
9312
  var o;
9297
9313
  const t = i.querySelectorAll(".__crossx-pin-input");
9298
9314
  t.forEach((n, a) => {
@@ -9325,9 +9341,9 @@ function Ts(i, e, r) {
9325
9341
  }
9326
9342
  }), (o = t[0]) == null || o.focus();
9327
9343
  }
9328
- class Rs {
9344
+ class Ps {
9329
9345
  constructor(e = "light", r, t = Fe, s) {
9330
- this.theme = e, this.overrides = r, this.tokens = at(e, r), this.displayDecimals = t, this.pinKeyboard = s, Lr();
9346
+ this.theme = e, this.overrides = r, this.tokens = at(e, r), this.displayDecimals = t, this.pinKeyboard = s, Mr();
9331
9347
  }
9332
9348
  setPinKeyboard(e) {
9333
9349
  this.pinKeyboard = e;
@@ -9368,9 +9384,9 @@ class Rs {
9368
9384
  */
9369
9385
  showWalletSelector(e, r, t) {
9370
9386
  return new Promise((s, o) => {
9371
- var S;
9387
+ var v;
9372
9388
  K();
9373
- const n = [...e], a = ds(n, this.tokens, t, this.messages), l = se();
9389
+ const n = [...e], a = _s(n, this.tokens, t, this.messages), l = se();
9374
9390
  z(a);
9375
9391
  let p = !1;
9376
9392
  const _ = () => {
@@ -9385,8 +9401,8 @@ class Rs {
9385
9401
  (() => {
9386
9402
  a.querySelectorAll(".__crossx-wallet-item").forEach((A) => {
9387
9403
  A.addEventListener("click", () => {
9388
- const k = A.dataset.walletAddress ?? "", T = parseInt(A.dataset.walletIndex ?? "0", 10), O = n.find((M) => M.index === T);
9389
- x({ address: k, index: T, name: O == null ? void 0 : O.name });
9404
+ const T = A.dataset.walletAddress ?? "", k = parseInt(A.dataset.walletIndex ?? "0", 10), O = n.find((M) => M.index === k);
9405
+ x({ address: T, index: k, name: O == null ? void 0 : O.name });
9390
9406
  });
9391
9407
  });
9392
9408
  })();
@@ -9396,21 +9412,21 @@ class Rs {
9396
9412
  try {
9397
9413
  const A = await r();
9398
9414
  n.push(A);
9399
- const k = a.querySelector("#__crossx-wallet-list");
9400
- if (k) {
9401
- const T = document.createElement("button");
9402
- T.className = "__crossx-wallet-item", T.dataset.walletIndex = String(A.index), T.dataset.walletAddress = A.address, T.innerHTML = `${vt(A.address, A.index, this.tokens.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(bt(A))}</span><span class="__crossx-wallet-addr">${ht(A.address)}</span></span>`, T.addEventListener("click", () => x(A)), k.appendChild(T);
9415
+ const T = a.querySelector("#__crossx-wallet-list");
9416
+ if (T) {
9417
+ const k = document.createElement("button");
9418
+ k.className = "__crossx-wallet-item", k.dataset.walletIndex = String(A.index), k.dataset.walletAddress = A.address, k.innerHTML = `${St(A.address, A.index, this.tokens.bg)}<span class="__crossx-wallet-info"><span class="__crossx-wallet-idx">${w(bt(A))}</span><span class="__crossx-wallet-addr">${ht(A.address)}</span></span>`, k.addEventListener("click", () => x(A)), T.appendChild(k);
9403
9419
  try {
9404
- T.scrollIntoView({ behavior: "smooth", block: "nearest" });
9420
+ k.scrollIntoView({ behavior: "smooth", block: "nearest" });
9405
9421
  } catch {
9406
9422
  }
9407
9423
  }
9408
9424
  y.disabled = !1;
9409
9425
  } catch (A) {
9410
- const k = A instanceof h && A.code === d.ADDRESS_LIMIT_EXCEEDED, T = this.resolveAddWalletErrorMessage(A);
9411
- m && (m.textContent = T, m.hidden = !1), k ? (y.disabled = !0, y.setAttribute("aria-disabled", "true")) : y.disabled = !1, u = A;
9426
+ const T = A instanceof h && A.code === d.ADDRESS_LIMIT_EXCEEDED, k = this.resolveAddWalletErrorMessage(A);
9427
+ m && (m.textContent = k, m.hidden = !1), T ? (y.disabled = !0, y.setAttribute("aria-disabled", "true")) : y.disabled = !1, u = A;
9412
9428
  }
9413
- }), (S = a.querySelector("#__crossx-close-btn")) == null || S.addEventListener("click", g), a.addEventListener("click", (A) => {
9429
+ }), (v = a.querySelector("#__crossx-close-btn")) == null || v.addEventListener("click", g), a.addEventListener("click", (A) => {
9414
9430
  A.target === a && g();
9415
9431
  });
9416
9432
  const E = (A) => {
@@ -9423,7 +9439,7 @@ class Rs {
9423
9439
  return new Promise((e) => {
9424
9440
  var a, l;
9425
9441
  K();
9426
- const r = ps(this.tokens, this.messages), t = se();
9442
+ const r = hs(this.tokens, this.messages), t = se();
9427
9443
  z(r);
9428
9444
  let s = !1, o = null;
9429
9445
  const n = () => {
@@ -9464,7 +9480,7 @@ class Rs {
9464
9480
  return new Promise((s) => {
9465
9481
  var x, g, f, m;
9466
9482
  K();
9467
- const o = gs(this.tokens, r, this.messages), n = se();
9483
+ const o = ws(this.tokens, r, this.messages), n = se();
9468
9484
  z(o);
9469
9485
  const a = () => {
9470
9486
  o.remove(), n();
@@ -9476,8 +9492,8 @@ class Rs {
9476
9492
  a(), s(null);
9477
9493
  };
9478
9494
  (x = o.querySelector("#__crossx-apple-btn")) == null || x.addEventListener("click", () => l("apple")), (g = o.querySelector("#__crossx-google-btn")) == null || g.addEventListener("click", () => l("google")), (f = o.querySelector("#__crossx-connect-other-wallet-btn")) == null || f.addEventListener("click", (y) => {
9479
- const S = y.currentTarget.dataset.walletId ?? "";
9480
- S && p(S);
9495
+ const v = y.currentTarget.dataset.walletId ?? "";
9496
+ v && p(v);
9481
9497
  }), (m = o.querySelector("#__crossx-close-btn")) == null || m.addEventListener("click", _), o.addEventListener("click", (y) => {
9482
9498
  y.target === o && _();
9483
9499
  }), o.querySelectorAll(".__crossx-login-terms-link").forEach((y) => {
@@ -9493,7 +9509,7 @@ class Rs {
9493
9509
  return new Promise((r) => {
9494
9510
  var _, u, x;
9495
9511
  K();
9496
- const t = this.messages, s = fs(this.tokens, {
9512
+ const t = this.messages, s = ms(this.tokens, {
9497
9513
  title: e.title,
9498
9514
  message: e.message,
9499
9515
  email: e.email,
@@ -9523,7 +9539,7 @@ class Rs {
9523
9539
  return new Promise((t) => {
9524
9540
  var a, l, p;
9525
9541
  K();
9526
- const s = ws(this.tokens, r);
9542
+ const s = ys(this.tokens, r);
9527
9543
  z(s);
9528
9544
  const o = () => s.remove(), n = () => {
9529
9545
  o(), t("recover");
@@ -9570,13 +9586,13 @@ class Rs {
9570
9586
  title: (t == null ? void 0 : t.pin_setup_confirm_title) ?? "Confirm PIN",
9571
9587
  headerSubtitle: (t == null ? void 0 : t.pin_setup_header_subtitle) ?? "This PIN is used to authorize your transactions.",
9572
9588
  subtitle: (t == null ? void 0 : t.pin_setup_confirm_subtitle) ?? "Confirm your 6-digit PIN"
9573
- }, a = lt(this.tokens, vs(s)), l = se();
9589
+ }, a = lt(this.tokens, Es(s)), l = se();
9574
9590
  z(a);
9575
9591
  let p = !1;
9576
9592
  const _ = () => {
9577
9593
  p || (p = !0, a.remove(), l());
9578
- }, u = (S) => {
9579
- _(), r(S);
9594
+ }, u = (v) => {
9595
+ _(), r(v);
9580
9596
  }, x = () => {
9581
9597
  _(), r(null);
9582
9598
  }, g = a.querySelector(".__crossx-card"), f = {
@@ -9585,58 +9601,58 @@ class Rs {
9585
9601
  repeatingDigit: (t == null ? void 0 : t.pin_validation_repeating_digit) ?? "Cannot use the same number 3+ times in a row.",
9586
9602
  sequential: (t == null ? void 0 : t.pin_validation_sequential) ?? "Sequential numbers (e.g., 123456) are not allowed.",
9587
9603
  alternatingPattern: (t == null ? void 0 : t.pin_validation_alternating_pattern) ?? "Repeating patterns (e.g., 121212) are not allowed."
9588
- }, m = (S) => {
9604
+ }, m = (v) => {
9589
9605
  var A;
9590
9606
  g.innerHTML = Ce({
9591
9607
  title: n.title,
9592
9608
  headerSubtitle: n.headerSubtitle,
9593
9609
  subtitle: n.subtitle
9594
- }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Pe(g, (k) => {
9595
- k === S ? u(S) : y(o.mismatchError);
9610
+ }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Pe(g, (T) => {
9611
+ T === v ? u(v) : y(o.mismatchError);
9596
9612
  }, x);
9597
- }, y = (S) => {
9613
+ }, y = (v) => {
9598
9614
  var A;
9599
9615
  g.innerHTML = Ce({
9600
9616
  title: o.title,
9601
9617
  headerSubtitle: o.headerSubtitle,
9602
9618
  subtitle: o.subtitle,
9603
- errorMessage: S
9604
- }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Pe(g, (k) => {
9605
- const T = Ss(k, f);
9606
- T ? y(T) : m(k);
9619
+ errorMessage: v
9620
+ }), this.applyPinKeyboardMode(g), (A = g.querySelector("#__crossx-close-btn")) == null || A.addEventListener("click", x), Pe(g, (T) => {
9621
+ const k = As(T, f);
9622
+ k ? y(k) : m(T);
9607
9623
  }, x);
9608
9624
  };
9609
9625
  (() => {
9610
9626
  var ee;
9611
- const S = Array.from(g.querySelectorAll(".__crossx-pw-notice-item")), A = g.querySelector("#__crossx-pin-notice-next"), k = /* @__PURE__ */ new Set();
9627
+ const v = Array.from(g.querySelectorAll(".__crossx-pw-notice-item")), A = g.querySelector("#__crossx-pin-notice-next"), T = /* @__PURE__ */ new Set();
9612
9628
  A.removeAttribute("disabled");
9613
- const T = A.dataset.nextLabel ?? "Next", O = A.dataset.submitLabel ?? "I Understand", M = () => {
9614
- const C = k.size === S.length;
9615
- A.classList.toggle("--disabled", !C), A.textContent = O || T;
9629
+ const k = A.dataset.nextLabel ?? "Next", O = A.dataset.submitLabel ?? "I Understand", M = () => {
9630
+ const C = T.size === v.length;
9631
+ A.classList.toggle("--disabled", !C), A.textContent = O || k;
9616
9632
  }, G = (C, L) => {
9617
- if (k.has(L)) return;
9633
+ if (T.has(L)) return;
9618
9634
  const U = C.querySelector(`#__crossx-notice-check-${L}`);
9619
- k.add(L), U.classList.add("--checked"), C.setAttribute("aria-checked", "true"), M();
9635
+ T.add(L), U.classList.add("--checked"), C.setAttribute("aria-checked", "true"), M();
9620
9636
  }, P = (C, L) => {
9621
- if (!k.has(L)) return;
9637
+ if (!T.has(L)) return;
9622
9638
  const U = C.querySelector(`#__crossx-notice-check-${L}`);
9623
- k.delete(L), U.classList.remove("--checked"), C.setAttribute("aria-checked", "false"), M();
9639
+ T.delete(L), U.classList.remove("--checked"), C.setAttribute("aria-checked", "false"), M();
9624
9640
  };
9625
- S.forEach((C) => {
9641
+ v.forEach((C) => {
9626
9642
  const L = parseInt(C.dataset.checkIndex ?? "0", 10);
9627
9643
  C.addEventListener("click", () => {
9628
- k.has(L) ? P(C, L) : G(C, L);
9644
+ T.has(L) ? P(C, L) : G(C, L);
9629
9645
  }), C.addEventListener("keydown", (U) => {
9630
- (U.key === " " || U.key === "Enter") && (U.preventDefault(), k.has(L) ? P(C, L) : G(C, L));
9646
+ (U.key === " " || U.key === "Enter") && (U.preventDefault(), T.has(L) ? P(C, L) : G(C, L));
9631
9647
  });
9632
9648
  }), A.addEventListener("click", () => {
9633
- if (k.size === S.length) {
9649
+ if (T.size === v.length) {
9634
9650
  y(e == null ? void 0 : e.errorMessage);
9635
9651
  return;
9636
9652
  }
9637
- const C = S.find((U) => {
9653
+ const C = v.find((U) => {
9638
9654
  const ae = parseInt(U.dataset.checkIndex ?? "0", 10);
9639
- return !k.has(ae);
9655
+ return !T.has(ae);
9640
9656
  });
9641
9657
  if (!C) return;
9642
9658
  const L = parseInt(C.dataset.checkIndex ?? "0", 10);
@@ -9644,8 +9660,8 @@ class Rs {
9644
9660
  C.classList.remove("--highlight"), G(C, L);
9645
9661
  }, 400);
9646
9662
  }), (ee = g.querySelector("#__crossx-close-btn")) == null || ee.addEventListener("click", x);
9647
- })(), a.addEventListener("click", (S) => {
9648
- S.target === a && x();
9663
+ })(), a.addEventListener("click", (v) => {
9664
+ v.target === a && x();
9649
9665
  });
9650
9666
  });
9651
9667
  }
@@ -9674,15 +9690,15 @@ class Rs {
9674
9690
  let u = !1;
9675
9691
  const x = () => {
9676
9692
  u || (u = !0, p.remove(), _());
9677
- }, g = (S) => {
9678
- x(), r(S);
9693
+ }, g = (v) => {
9694
+ x(), r(v);
9679
9695
  }, f = () => {
9680
9696
  x(), r(null);
9681
- }, m = (S) => {
9682
- x(), t(S);
9697
+ }, m = (v) => {
9698
+ x(), t(v);
9683
9699
  }, y = p.querySelector(".__crossx-card");
9684
- this.applyPinKeyboardMode(y), (E = y.querySelector("#__crossx-close-btn")) == null || E.addEventListener("click", f), Pe(y, g, f, m, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, l), p.addEventListener("click", (S) => {
9685
- S.target === p && f();
9700
+ this.applyPinKeyboardMode(y), (E = y.querySelector("#__crossx-close-btn")) == null || E.addEventListener("click", f), Pe(y, g, f, m, e == null ? void 0 : e.onSubmit, e == null ? void 0 : e.lockExpiresAt, l), p.addEventListener("click", (v) => {
9701
+ v.target === p && f();
9686
9702
  });
9687
9703
  });
9688
9704
  }
@@ -9697,14 +9713,14 @@ class Rs {
9697
9713
  return new Promise((r) => {
9698
9714
  var l;
9699
9715
  K();
9700
- const t = ms(this.tokens, e);
9716
+ const t = bs(this.tokens, e);
9701
9717
  z(t);
9702
9718
  const s = () => t.remove(), o = (p) => {
9703
9719
  s(), r(p);
9704
9720
  }, n = () => {
9705
9721
  s(), r(null);
9706
9722
  }, a = t.querySelector(".__crossx-card");
9707
- a && this.applyPinKeyboardMode(a), Ts(t, o, n), (l = t.querySelector("#__crossx-close-btn")) == null || l.addEventListener("click", n), t.addEventListener("click", (p) => {
9723
+ a && this.applyPinKeyboardMode(a), Cs(t, o, n), (l = t.querySelector("#__crossx-close-btn")) == null || l.addEventListener("click", n), t.addEventListener("click", (p) => {
9708
9724
  p.target === t && n();
9709
9725
  });
9710
9726
  });
@@ -9719,7 +9735,7 @@ class Rs {
9719
9735
  return new Promise((t) => {
9720
9736
  var p;
9721
9737
  K();
9722
- const { overlay: s, startCountdown: o } = bs(this.tokens, e, r);
9738
+ const { overlay: s, startCountdown: o } = vs(this.tokens, e, r);
9723
9739
  z(s);
9724
9740
  const n = () => {
9725
9741
  l(), s.remove();
@@ -9739,7 +9755,7 @@ class Rs {
9739
9755
  return new Promise((r) => {
9740
9756
  var a, l;
9741
9757
  K();
9742
- const t = es(e, this.tokens, this.messages);
9758
+ const t = rs(e, this.tokens, this.messages);
9743
9759
  z(t);
9744
9760
  const s = () => t.remove(), o = () => {
9745
9761
  s(), r();
@@ -9768,7 +9784,7 @@ class Rs {
9768
9784
  showTransactionProgress(e, r) {
9769
9785
  return new Promise((t) => {
9770
9786
  K();
9771
- const s = ts(e, this.tokens, this.messages);
9787
+ const s = ss(e, this.tokens, this.messages);
9772
9788
  z(s);
9773
9789
  const o = () => s.remove();
9774
9790
  let n = !1;
@@ -9785,7 +9801,7 @@ class Rs {
9785
9801
  document.addEventListener("keydown", p);
9786
9802
  };
9787
9803
  r.then((p) => {
9788
- n || (rs(s, p, this.tokens, this.messages), l());
9804
+ n || (is(s, p, this.tokens, this.messages), l());
9789
9805
  });
9790
9806
  });
9791
9807
  }
@@ -9794,7 +9810,7 @@ class Rs {
9794
9810
  var p, _, u;
9795
9811
  K();
9796
9812
  let t;
9797
- e.type === "sign-message" ? t = ss(e, this.tokens, this.messages) : e.type === "sign-typed-data" ? t = is(e, this.tokens, this.messages) : e.type === "sign" ? t = zr(e, this.tokens, this.displayDecimals, this.messages) : t = jr(e, this.tokens, this.displayDecimals, this.messages);
9813
+ e.type === "sign-message" ? t = os(e, this.tokens, this.messages) : e.type === "sign-typed-data" ? t = ns(e, this.tokens, this.messages) : e.type === "sign" ? t = qr(e, this.tokens, this.displayDecimals, this.messages) : t = Xr(e, this.tokens, this.displayDecimals, this.messages);
9798
9814
  const s = se();
9799
9815
  z(t);
9800
9816
  const o = () => {
@@ -9812,7 +9828,7 @@ class Rs {
9812
9828
  f && ((m = navigator.clipboard) == null || m.writeText(f).catch(() => {
9813
9829
  }));
9814
9830
  });
9815
- }), Nr(t), t.addEventListener("click", (x) => {
9831
+ }), Lr(t), t.addEventListener("click", (x) => {
9816
9832
  x.target === t && a();
9817
9833
  });
9818
9834
  const l = (x) => {
@@ -9822,7 +9838,7 @@ class Rs {
9822
9838
  });
9823
9839
  }
9824
9840
  }
9825
- class Cs {
9841
+ class Ns {
9826
9842
  constructor(e, r, t, s = () => !1) {
9827
9843
  this.browserConfirmation = e, this.getBridge = r, this.getOrigin = t, this.isAuthenticatedViaRNBridge = s;
9828
9844
  }
@@ -9992,7 +10008,7 @@ class Cs {
9992
10008
  (t = (r = this.browserConfirmation).setPinKeyboard) == null || t.call(r, e);
9993
10009
  }
9994
10010
  }
9995
- class Ps {
10011
+ class Os {
9996
10012
  constructor() {
9997
10013
  this._accessToken = null, this._expiresAt = 0;
9998
10014
  }
@@ -10024,7 +10040,7 @@ class Ps {
10024
10040
  return !this._accessToken || this._expiresAt <= 0 ? !0 : Date.now() >= this._expiresAt - e;
10025
10041
  }
10026
10042
  }
10027
- function Us(i, e) {
10043
+ function Gs(i, e) {
10028
10044
  if (!i.projectId)
10029
10045
  throw new Error(
10030
10046
  `[CROSSx] Fatal: projectId is required but was not provided.
@@ -10046,9 +10062,9 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10046
10062
  "refresh_token이 평문 저장되지 않도록 세션 영속성이 제한됩니다.",
10047
10063
  "IndexedDB를 지원하는 브라우저 사용을 권장합니다."
10048
10064
  ), t.secureStorageAvailable = o;
10049
- const n = o ? new it(i.projectId) : new gr(), a = new yr(), l = new Er(), p = new ie(), _ = new Ps(), u = new pt();
10065
+ const n = o ? new it(i.projectId) : new gr(), a = new yr(), l = new Er(), p = new ie(), _ = new Os(), u = new pt();
10050
10066
  let x;
10051
- i.useMockWallet ? (c.log("[CROSSx] Mock Wallet Provider 사용"), x = new Ir(n, u)) : (c.log("[CROSSx] Remote Wallet Provider 사용"), x = new oe(
10067
+ i.useMockWallet ? (c.log("[CROSSx] Mock Wallet Provider 사용"), x = new Tr(n, u)) : (c.log("[CROSSx] Remote Wallet Provider 사용"), x = new oe(
10052
10068
  s,
10053
10069
  n,
10054
10070
  l,
@@ -10063,7 +10079,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10063
10079
  var O;
10064
10080
  return (O = g == null ? void 0 : g.assertRNBridgeSessionActive) == null ? void 0 : O.call(g);
10065
10081
  };
10066
- x = new kr(
10082
+ x = new Rr(
10067
10083
  x,
10068
10084
  () => {
10069
10085
  var O;
@@ -10073,12 +10089,12 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10073
10089
  m,
10074
10090
  () => i.appName
10075
10091
  );
10076
- const y = new fe(s, l), E = new Rs(
10092
+ const y = new fe(s, l), E = new Ps(
10077
10093
  i.theme ?? "light",
10078
10094
  i.themeTokens,
10079
10095
  i.displayDecimals,
10080
10096
  i.pinKeyboard
10081
- ), S = new Cs(
10097
+ ), v = new Ns(
10082
10098
  E,
10083
10099
  () => {
10084
10100
  var O;
@@ -10086,7 +10102,7 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10086
10102
  },
10087
10103
  () => typeof window < "u" ? window.location.origin : "http://localhost",
10088
10104
  f
10089
- ), A = e != null && e.wrapConfirmation ? e.wrapConfirmation(S) : S, k = new Le(
10105
+ ), A = e != null && e.wrapConfirmation ? e.wrapConfirmation(v) : v, T = new Le(
10090
10106
  t,
10091
10107
  s,
10092
10108
  n,
@@ -10099,13 +10115,13 @@ Example: createCROSSxSDK({ projectId: "your-project-id", ... })`
10099
10115
  y,
10100
10116
  u
10101
10117
  );
10102
- g = k;
10103
- const T = k.signInUseCase;
10104
- return T && typeof T.setFreshTokenCallback == "function" && T.setFreshTokenCallback(() => k.requestFreshFirebaseIdTokenFromBridge()), typeof window < "u" && (window.__crossxSDK = k), k;
10118
+ g = T;
10119
+ const k = T.signInUseCase;
10120
+ return k && typeof k.setFreshTokenCallback == "function" && k.setFreshTokenCallback(() => T.requestFreshFirebaseIdTokenFromBridge()), typeof window < "u" && (window.__crossxSDK = T), T;
10105
10121
  }
10106
- function Hs(i) {
10107
- const e = Ns(i), r = Os(e), t = JSON.parse(r);
10108
- Ds(t);
10122
+ function Ks(i) {
10123
+ const e = Ls(i), r = Ds(e), t = JSON.parse(r);
10124
+ $s(t);
10109
10125
  const { data: s } = t;
10110
10126
  return {
10111
10127
  status: t.status,
@@ -10119,7 +10135,7 @@ function Hs(i) {
10119
10135
  raw: t
10120
10136
  };
10121
10137
  }
10122
- function Ns(i) {
10138
+ function Ls(i) {
10123
10139
  if (i.includes("://") && i.includes("?")) {
10124
10140
  const e = new URL(i), r = e.searchParams.get("crossx_oauth_result");
10125
10141
  if (r) return r;
@@ -10129,22 +10145,22 @@ function Ns(i) {
10129
10145
  }
10130
10146
  return i;
10131
10147
  }
10132
- function Os(i) {
10148
+ function Ds(i) {
10133
10149
  if (i.startsWith("{"))
10134
10150
  return i;
10135
10151
  if (i.startsWith("%7B") || i.startsWith("%7b"))
10136
10152
  return decodeURIComponent(i);
10137
- const e = Ls(i);
10153
+ const e = Ms(i);
10138
10154
  return decodeURIComponent(e);
10139
10155
  }
10140
- function Ls(i) {
10156
+ function Ms(i) {
10141
10157
  if (typeof atob == "function")
10142
10158
  return atob(i);
10143
10159
  if (typeof Buffer < "u")
10144
10160
  return Buffer.from(i, "base64").toString("utf-8");
10145
10161
  throw new Error("Base64 디코딩을 지원하는 환경이 아닙니다");
10146
10162
  }
10147
- function Ds(i) {
10163
+ function $s(i) {
10148
10164
  if (typeof i != "object" || i === null)
10149
10165
  throw new Error("Deeplink payload가 유효한 객체가 아닙니다");
10150
10166
  const e = i;
@@ -10165,14 +10181,14 @@ export {
10165
10181
  h as CROSSxError,
10166
10182
  Ht as CROSSxEthereumProvider,
10167
10183
  Le as CROSSxSDK,
10168
- Ws as ChainId,
10184
+ Hs as ChainId,
10169
10185
  ge as ConnectOtherWalletItem,
10170
10186
  d as ErrorCode,
10171
10187
  Ne as MNEMONIC_ADDRESS_LIMIT,
10172
10188
  pt as PinMemoryStore,
10173
- Ps as TokenMemoryStore,
10189
+ Os as TokenMemoryStore,
10174
10190
  Be as WALLET_BRAND_NAME,
10175
- Us as createCROSSxSDK,
10191
+ Gs as createCROSSxSDK,
10176
10192
  Ft as getConnectOtherWalletLabel,
10177
- Hs as parseOAuthDeeplink
10193
+ Ks as parseOAuthDeeplink
10178
10194
  };