@jaw.id/ui 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -53121,7 +53121,7 @@ function qL(e = 768) {
53121
53121
  }
53122
53122
  //#endregion
53123
53123
  //#region ../core/dist/sdk-info.js
53124
- var JL = "0.4.1";
53124
+ var JL = "0.4.2";
53125
53125
  (/* @__PURE__ */ L(((e, t) => {
53126
53126
  var n = Object.prototype.hasOwnProperty, r = "~";
53127
53127
  function i() {}
@@ -57241,14 +57241,55 @@ function rU(e, t, n) {
57241
57241
  };
57242
57242
  }
57243
57243
  //#endregion
57244
- //#region src/utils/formatAddress.ts
57245
- var iU = (e) => !e || e.length < 10 ? e : `${e.slice(0, 6)}...${e.slice(-4)}`, aU = (e, t) => e || iU(t), oU = ["0x0000000000000000000000000000000000000000", "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"];
57244
+ //#region src/utils/reverseResolve.ts
57245
+ var iU = "https://api.justaname.id/ens/v2/reverse", aU = 50, oU = "https://ipfs.io/ipfs/";
57246
57246
  function sU(e) {
57247
- return oU.includes(e.toLowerCase());
57247
+ return e ? e.startsWith("https://") || e.startsWith("http://") || e.startsWith("data:image/") ? e : e.startsWith("ipfs://") ? oU + e.slice(7).replace(/^ipfs\//, "") : null : null;
57248
57248
  }
57249
57249
  async function cU(e, t, n) {
57250
+ let r = new URL(iU);
57251
+ e.forEach(({ address: e, chainId: t }) => r.searchParams.append("address", `${e}@eip155:${t}`)), r.searchParams.set("rpcUrl", t), n && r.searchParams.set("records", "true");
57252
+ let i = await fetch(r.toString());
57253
+ if (!i.ok) return {};
57254
+ let a = (await i.json()).result?.data;
57255
+ if (!a) return {};
57256
+ let o = Array.isArray(a) ? a : [a], s = {};
57257
+ for (let e of o) {
57258
+ if (!e?.name) continue;
57259
+ let t = { name: e.name };
57260
+ if (n) {
57261
+ let n = sU(e.records?.records?.texts?.find((e) => e.key === "avatar")?.value);
57262
+ n && (t.avatar = n);
57263
+ }
57264
+ s[e.address.toLowerCase()] = t;
57265
+ }
57266
+ return s;
57267
+ }
57268
+ async function lU(e, t, n) {
57269
+ let r = Array.from(new Map(e.map((e) => [`${e.address.toLowerCase()}:${e.chainId}`, e])).values());
57270
+ if (r.length === 0) return {};
57271
+ let i = [];
57272
+ for (let e = 0; e < r.length; e += aU) i.push(r.slice(e, e + aU));
57273
+ let a = await Promise.all(i.map((e) => cU(e, t, n).catch(() => ({}))));
57274
+ return Object.assign({}, ...a);
57275
+ }
57276
+ async function uU(e, t) {
57277
+ let n = await lU(e, t, !1), r = {};
57278
+ for (let [e, t] of Object.entries(n)) r[e] = t.name;
57279
+ return r;
57280
+ }
57281
+ async function dU(e, t) {
57282
+ return lU(e, t, !0);
57283
+ }
57284
+ //#endregion
57285
+ //#region src/utils/formatAddress.ts
57286
+ var fU = (e) => !e || e.length < 10 ? e : `${e.slice(0, 6)}...${e.slice(-4)}`, pU = (e, t) => e || fU(t), mU = ["0x0000000000000000000000000000000000000000", "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"];
57287
+ function hU(e) {
57288
+ return mU.includes(e.toLowerCase());
57289
+ }
57290
+ async function gU(e, t, n) {
57250
57291
  let r = be({ transport: P(n) });
57251
- return sU(e) ? r.getBalance({ address: t }) : r.readContract({
57292
+ return hU(e) ? r.getBalance({ address: t }) : r.readContract({
57252
57293
  address: e,
57253
57294
  abi: Be,
57254
57295
  functionName: "balanceOf",
@@ -57257,7 +57298,7 @@ async function cU(e, t, n) {
57257
57298
  }
57258
57299
  //#endregion
57259
57300
  //#region src/utils/resolveChainLabel.ts
57260
- var lU = "0x2a9B5787207863cf2d63d20172ed1F7bB2c9487A", uU = [{
57301
+ var _U = "0x2a9B5787207863cf2d63d20172ed1F7bB2c9487A", vU = [{
57261
57302
  name: "chainLabel",
57262
57303
  type: "function",
57263
57304
  stateMutability: "view",
@@ -57269,25 +57310,25 @@ var lU = "0x2a9B5787207863cf2d63d20172ed1F7bB2c9487A", uU = [{
57269
57310
  name: "",
57270
57311
  type: "string"
57271
57312
  }]
57272
- }], dU = "interop_chain_labels", fU = /* @__PURE__ */ new Map(), pU = !1;
57273
- function mU() {
57274
- if (!pU) {
57275
- pU = !0;
57313
+ }], yU = "interop_chain_labels", bU = /* @__PURE__ */ new Map(), xU = !1;
57314
+ function SU() {
57315
+ if (!xU) {
57316
+ xU = !0;
57276
57317
  try {
57277
- let e = localStorage.getItem(dU);
57318
+ let e = localStorage.getItem(yU);
57278
57319
  if (!e) return;
57279
57320
  let t = JSON.parse(e);
57280
- for (let [e, n] of Object.entries(t)) fU.set(Number(e), n || null);
57321
+ for (let [e, n] of Object.entries(t)) bU.set(Number(e), n || null);
57281
57322
  } catch {}
57282
57323
  }
57283
57324
  }
57284
- function hU(e, t) {
57325
+ function CU(e, t) {
57285
57326
  try {
57286
- let n = localStorage.getItem(dU), r = n ? JSON.parse(n) : {};
57287
- t && (r[e.toString()] = t), localStorage.setItem(dU, JSON.stringify(r));
57327
+ let n = localStorage.getItem(yU), r = n ? JSON.parse(n) : {};
57328
+ t && (r[e.toString()] = t), localStorage.setItem(yU, JSON.stringify(r));
57288
57329
  } catch {}
57289
57330
  }
57290
- function gU(e) {
57331
+ function wU(e) {
57291
57332
  let t = [0, 1], n = [0, 0], r = e.toString(16);
57292
57333
  r.length % 2 && (r = "0" + r);
57293
57334
  let i = [];
@@ -57301,108 +57342,138 @@ function gU(e) {
57301
57342
  ...o
57302
57343
  ].map((e) => e.toString(16).padStart(2, "0")).join("");
57303
57344
  }
57304
- var _U = /* @__PURE__ */ new Map();
57305
- async function vU(e, t) {
57306
- if (fU.has(e) || (mU(), fU.has(e))) return fU.get(e) ?? null;
57307
- if (_U.has(e)) return _U.get(e);
57308
- let n = yU(e, t);
57309
- _U.set(e, n);
57345
+ var TU = /* @__PURE__ */ new Map();
57346
+ async function EU(e, t) {
57347
+ if (bU.has(e) || (SU(), bU.has(e))) return bU.get(e) ?? null;
57348
+ if (TU.has(e)) return TU.get(e);
57349
+ let n = DU(e, t);
57350
+ TU.set(e, n);
57310
57351
  try {
57311
57352
  return await n;
57312
57353
  } finally {
57313
- _U.delete(e);
57354
+ TU.delete(e);
57314
57355
  }
57315
57356
  }
57316
- async function yU(t, n) {
57357
+ async function DU(t, n) {
57317
57358
  try {
57318
57359
  let r = be({
57319
57360
  chain: e,
57320
57361
  transport: P(n)
57321
- }), i = gU(t), a = await r.readContract({
57322
- address: lU,
57323
- abi: uU,
57362
+ }), i = wU(t), a = await r.readContract({
57363
+ address: _U,
57364
+ abi: vU,
57324
57365
  functionName: "chainLabel",
57325
57366
  args: [i]
57326
57367
  }), o = a && a.length > 0 ? a : null;
57327
- return fU.set(t, o), hU(t, o), o;
57368
+ return bU.set(t, o), CU(t, o), o;
57328
57369
  } catch {
57329
- return fU.set(t, null), null;
57370
+ return bU.set(t, null), null;
57330
57371
  }
57331
57372
  }
57332
57373
  //#endregion
57374
+ //#region src/components/IdentityAvatar.tsx
57375
+ var OU = /* @__PURE__ */ B(cs, {
57376
+ className: "h-3 w-3 flex-shrink-0",
57377
+ stroke: "currentColor"
57378
+ }), kU = ({ src: e, fallback: t = OU }) => {
57379
+ let [n, r] = z();
57380
+ return !e || n === e ? /* @__PURE__ */ B(lt, { children: t }) : /* @__PURE__ */ B("img", {
57381
+ src: e,
57382
+ alt: "",
57383
+ referrerPolicy: "no-referrer",
57384
+ onError: () => r(e),
57385
+ className: "size-5 flex-shrink-0 rounded-full object-cover"
57386
+ });
57387
+ };
57388
+ //#endregion
57333
57389
  //#region src/components/TransactionDialog/ClearSignedView.tsx
57334
- function bU(e) {
57390
+ function AU(e) {
57335
57391
  let [t, n] = e.split("."), r = t.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
57336
57392
  return n ? `${r}.${n}` : r;
57337
57393
  }
57338
- function xU({ row: e }) {
57394
+ function jU({ row: e }) {
57339
57395
  return /* @__PURE__ */ V("p", {
57340
57396
  className: "text-foreground break-all font-mono text-xs leading-[150%]",
57341
57397
  children: [/* @__PURE__ */ B("span", {
57342
57398
  className: "font-semibold",
57343
- children: bU(e.value)
57399
+ children: AU(e.value)
57344
57400
  }), e.symbol && /* @__PURE__ */ V("span", {
57345
57401
  className: "text-muted-foreground",
57346
57402
  children: [" ", e.symbol]
57347
57403
  })]
57348
57404
  });
57349
57405
  }
57350
- function SU({ row: e, resolvedName: t }) {
57351
- let n = e.rawValue ?? e.value;
57352
- return /* @__PURE__ */ B("p", {
57353
- className: "text-foreground break-all font-mono text-xs leading-[150%]",
57354
- children: t ? `${t} (${iU(n)})` : n
57406
+ function MU({ row: e, resolvedName: t, avatarSrc: n }) {
57407
+ let r = e.rawValue ?? e.value;
57408
+ return /* @__PURE__ */ V("div", {
57409
+ className: "flex flex-row items-center gap-1",
57410
+ children: [/* @__PURE__ */ B(kU, {
57411
+ src: n,
57412
+ fallback: null
57413
+ }), /* @__PURE__ */ B("p", {
57414
+ className: "text-foreground break-all font-mono text-xs leading-[150%]",
57415
+ children: t ? `${t} (${fU(r)})` : r
57416
+ })]
57355
57417
  });
57356
57418
  }
57357
- var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57358
- let [r, i] = z({}), a = ct(/* @__PURE__ */ new Set());
57419
+ var NU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57420
+ let [r, i] = z({}), [a, o] = z({}), s = ct(/* @__PURE__ */ new Set());
57359
57421
  at(() => {
57360
57422
  if (!n) return;
57361
- let r = e.rows.filter((e) => e.kind === "address" && e.rawValue).map((e) => e.rawValue.toLowerCase()), o = [...new Set(r)].filter((e) => !a.current.has(e));
57362
- if (o.length === 0) return;
57363
- o.forEach((e) => a.current.add(e));
57364
- let s = !1, c = lM(n);
57365
- return o.forEach((e) => {
57366
- c.subnames.reverseResolve({
57367
- address: e,
57368
- chainId: t
57369
- }).then(async (r) => {
57370
- if (s || !r) return;
57371
- let a = await vU(t, n), o = a ? `${r}@${a}` : r;
57372
- i((t) => t[e] === o ? t : {
57373
- ...t,
57374
- [e]: o
57375
- });
57376
- }).catch(() => {});
57377
- }), () => {
57378
- s = !0;
57423
+ let r = e.rows.filter((e) => e.kind === "address" && e.rawValue).map((e) => e.rawValue.toLowerCase()), a = [...new Set(r)].filter((e) => !s.current.has(e));
57424
+ if (a.length === 0) return;
57425
+ a.forEach((e) => s.current.add(e));
57426
+ let c = !1;
57427
+ return dU(a.map((e) => ({
57428
+ address: e,
57429
+ chainId: t
57430
+ })), n).then(async (e) => {
57431
+ if (c) return;
57432
+ let r = await EU(t, n);
57433
+ if (c) return;
57434
+ let s = {}, l = {};
57435
+ for (let t of a) {
57436
+ let n = e[t];
57437
+ n && (s[t] = r ? `${n.name}@${r}` : n.name, n.avatar && (l[t] = n.avatar));
57438
+ }
57439
+ i((e) => {
57440
+ let t = { ...e }, n = !1;
57441
+ for (let [e, r] of Object.entries(s)) t[e] !== r && (t[e] = r, n = !0);
57442
+ return n ? t : e;
57443
+ }), Object.keys(l).length > 0 && o((e) => ({
57444
+ ...e,
57445
+ ...l
57446
+ }));
57447
+ }).catch(() => void 0), () => {
57448
+ c = !0;
57379
57449
  };
57380
57450
  }, [
57381
57451
  e,
57382
57452
  n,
57383
57453
  t
57384
57454
  ]);
57385
- let o = !!e.intent, s = e.rows.length > 0;
57386
- return !o && !s ? null : /* @__PURE__ */ V("div", {
57455
+ let c = !!e.intent, l = e.rows.length > 0;
57456
+ return !c && !l ? null : /* @__PURE__ */ V("div", {
57387
57457
  className: "bg-secondary flex flex-col rounded-[6px]",
57388
- children: [o && /* @__PURE__ */ B("div", {
57389
- className: `flex items-center gap-2 px-2 pt-2 ${s ? "pb-1.5" : "pb-2"}`,
57458
+ children: [c && /* @__PURE__ */ B("div", {
57459
+ className: `flex items-center gap-2 px-2 pt-2 ${l ? "pb-1.5" : "pb-2"}`,
57390
57460
  children: /* @__PURE__ */ B("span", {
57391
57461
  className: "text-foreground text-xs font-semibold capitalize",
57392
57462
  children: e.intent
57393
57463
  })
57394
- }), s && /* @__PURE__ */ B("div", {
57395
- className: `flex flex-col gap-1 px-2 pb-2 ${o ? "border-border/40 border-t pt-2" : "pt-2"}`,
57464
+ }), l && /* @__PURE__ */ B("div", {
57465
+ className: `flex flex-col gap-1 px-2 pb-2 ${c ? "border-border/40 border-t pt-2" : "pt-2"}`,
57396
57466
  children: e.rows.map((e, t) => {
57397
- let n = e.rawValue?.toLowerCase(), i = n ? r[n] : void 0;
57467
+ let n = e.rawValue?.toLowerCase(), i = n ? r[n] : void 0, o = n ? a[n] : void 0;
57398
57468
  return /* @__PURE__ */ V("div", {
57399
57469
  className: "flex flex-col gap-0.5",
57400
57470
  children: [/* @__PURE__ */ B("span", {
57401
57471
  className: "text-muted-foreground text-xs font-semibold",
57402
57472
  children: e.label
57403
- }), e.kind === "tokenAmount" || e.kind === "amount" ? /* @__PURE__ */ B(xU, { row: e }) : e.kind === "address" ? /* @__PURE__ */ B(SU, {
57473
+ }), e.kind === "tokenAmount" || e.kind === "amount" ? /* @__PURE__ */ B(jU, { row: e }) : e.kind === "address" ? /* @__PURE__ */ B(MU, {
57404
57474
  row: e,
57405
- resolvedName: i
57475
+ resolvedName: i,
57476
+ avatarSrc: o
57406
57477
  }) : /* @__PURE__ */ B("p", {
57407
57478
  className: "text-foreground break-all font-mono text-xs leading-[150%]",
57408
57479
  children: e.value
@@ -57411,50 +57482,60 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57411
57482
  })
57412
57483
  })]
57413
57484
  });
57414
- }, wU = "0x0000000000000000000000000000000000000000", TU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, mainnetRpcUrl: a }) => {
57415
- let { clearSigned: o, decoded: s, isLoading: c } = nU(e, t, n, r), [l, u] = z({}), d = ct(/* @__PURE__ */ new Set()), f = ct(s);
57485
+ }, PU = "0x0000000000000000000000000000000000000000";
57486
+ function FU(e, t) {
57487
+ let n = {};
57488
+ for (let [t, r] of Object.entries(e ?? {})) n[t.toLowerCase()] = r;
57489
+ for (let [e, r] of Object.entries(t)) n[e.toLowerCase()] = r;
57490
+ return n;
57491
+ }
57492
+ var IU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolvedAvatars: a, mainnetRpcUrl: o }) => {
57493
+ let { clearSigned: s, decoded: c, isLoading: l } = nU(e, t, n, r), [u, d] = z({}), [f, p] = z({}), m = ct(/* @__PURE__ */ new Set()), h = ct(c);
57416
57494
  at(() => {
57417
- f.current !== s && (f.current = s, u({}), d.current = /* @__PURE__ */ new Set());
57418
- }, [s]);
57419
- let p = st(() => {
57420
- let e = {};
57421
- if (i) for (let [t, n] of Object.entries(i)) e[t.toLowerCase()] = n;
57422
- for (let [t, n] of Object.entries(l)) e[t.toLowerCase()] = n;
57423
- return e;
57424
- }, [i, l]), m = ct(p);
57425
- return m.current = p, at(() => {
57426
- if (!s || !a) return;
57427
- let e = m.current, t = s.params.filter((e) => e.type === "address" && e.rawValue).map((e) => e.rawValue).filter((t) => {
57495
+ h.current !== c && (h.current = c, d({}), p({}), m.current = /* @__PURE__ */ new Set());
57496
+ }, [c]);
57497
+ let g = st(() => FU(i, u), [i, u]), _ = st(() => FU(a, f), [a, f]), v = ct(g);
57498
+ return v.current = g, at(() => {
57499
+ if (!c || !o) return;
57500
+ let e = v.current, t = c.params.filter((e) => e.type === "address" && e.rawValue).map((e) => e.rawValue).filter((t) => {
57428
57501
  let n = t.toLowerCase();
57429
- return n !== wU && !e[n] && !d.current.has(n);
57502
+ return n !== PU && !e[n] && !m.current.has(n);
57430
57503
  }), r = [...new Set(t)];
57431
57504
  if (r.length === 0) return;
57432
- r.forEach((e) => d.current.add(e.toLowerCase()));
57433
- let i = lM(a);
57434
- r.forEach((e) => {
57435
- i.subnames.reverseResolve({
57436
- address: e,
57437
- chainId: n
57438
- }).then(async (t) => {
57439
- if (t) {
57440
- let r = await vU(n, a);
57441
- u((n) => ({
57442
- ...n,
57443
- [e.toLowerCase()]: r ? `${t}@${r}` : t
57444
- }));
57445
- }
57446
- }).catch(() => {});
57447
- });
57505
+ r.forEach((e) => m.current.add(e.toLowerCase()));
57506
+ let i = !1;
57507
+ return dU(r.map((e) => ({
57508
+ address: e,
57509
+ chainId: n
57510
+ })), o).then(async (e) => {
57511
+ if (i) return;
57512
+ let t = await EU(n, o);
57513
+ if (i) return;
57514
+ let a = {}, s = {};
57515
+ for (let n of r) {
57516
+ let r = e[n.toLowerCase()];
57517
+ r && (a[n.toLowerCase()] = t ? `${r.name}@${t}` : r.name, r.avatar && (s[n.toLowerCase()] = r.avatar));
57518
+ }
57519
+ Object.keys(a).length > 0 && d((e) => ({
57520
+ ...e,
57521
+ ...a
57522
+ })), Object.keys(s).length > 0 && p((e) => ({
57523
+ ...e,
57524
+ ...s
57525
+ }));
57526
+ }).catch(() => void 0), () => {
57527
+ i = !0;
57528
+ };
57448
57529
  }, [
57449
- s,
57450
- a,
57530
+ c,
57531
+ o,
57451
57532
  n
57452
- ]), o && o.rows.length > 0 ? /* @__PURE__ */ V("div", {
57533
+ ]), s && s.rows.length > 0 ? /* @__PURE__ */ V("div", {
57453
57534
  className: "flex flex-col gap-2",
57454
- children: [/* @__PURE__ */ B(CU, {
57455
- display: o,
57535
+ children: [/* @__PURE__ */ B(NU, {
57536
+ display: s,
57456
57537
  chainId: n,
57457
- mainnetRpcUrl: a
57538
+ mainnetRpcUrl: o
57458
57539
  }), /* @__PURE__ */ V("details", {
57459
57540
  className: "text-xs",
57460
57541
  children: [/* @__PURE__ */ B("summary", {
@@ -57462,18 +57543,18 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57462
57543
  children: "Show raw details"
57463
57544
  }), /* @__PURE__ */ V("div", {
57464
57545
  className: "mt-1 flex flex-col gap-2",
57465
- children: [s ? /* @__PURE__ */ V(lt, { children: [/* @__PURE__ */ V("div", {
57546
+ children: [c ? /* @__PURE__ */ V(lt, { children: [/* @__PURE__ */ V("div", {
57466
57547
  className: "flex items-center gap-2",
57467
57548
  children: [/* @__PURE__ */ B("span", {
57468
57549
  className: "text-foreground bg-primary/10 rounded px-2 py-0.5 text-xs font-semibold",
57469
- children: s.functionName
57550
+ children: c.functionName
57470
57551
  }), /* @__PURE__ */ B("span", {
57471
57552
  className: "text-muted-foreground font-mono text-xs",
57472
- children: s.signature
57553
+ children: c.signature
57473
57554
  })]
57474
- }), s.params.length > 0 && /* @__PURE__ */ B("div", {
57555
+ }), c.params.length > 0 && /* @__PURE__ */ B("div", {
57475
57556
  className: "bg-secondary flex flex-col gap-1 rounded-[6px] p-2",
57476
- children: s.params.map((e, t) => /* @__PURE__ */ V("div", {
57557
+ children: c.params.map((e, t) => /* @__PURE__ */ V("div", {
57477
57558
  className: "flex flex-col gap-0.5",
57478
57559
  children: [/* @__PURE__ */ V("div", {
57479
57560
  className: "flex items-baseline gap-1.5",
@@ -57498,7 +57579,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57498
57579
  })]
57499
57580
  })]
57500
57581
  })]
57501
- }) : c ? /* @__PURE__ */ V("div", {
57582
+ }) : l ? /* @__PURE__ */ V("div", {
57502
57583
  className: "flex flex-col gap-2",
57503
57584
  children: [/* @__PURE__ */ V("div", {
57504
57585
  className: "flex items-center gap-2",
@@ -57513,23 +57594,23 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57513
57594
  children: t
57514
57595
  })
57515
57596
  })]
57516
- }) : s ? /* @__PURE__ */ V("div", {
57597
+ }) : c ? /* @__PURE__ */ V("div", {
57517
57598
  className: "flex flex-col gap-2",
57518
57599
  children: [
57519
57600
  /* @__PURE__ */ V("div", {
57520
57601
  className: "flex items-center gap-2",
57521
57602
  children: [/* @__PURE__ */ B("span", {
57522
57603
  className: "text-foreground bg-primary/10 rounded px-2 py-0.5 text-xs font-semibold",
57523
- children: s.functionName
57604
+ children: c.functionName
57524
57605
  }), /* @__PURE__ */ B("span", {
57525
57606
  className: "text-muted-foreground font-mono text-xs",
57526
- children: s.signature
57607
+ children: c.signature
57527
57608
  })]
57528
57609
  }),
57529
- s.params.length > 0 && /* @__PURE__ */ B("div", {
57610
+ c.params.length > 0 && /* @__PURE__ */ B("div", {
57530
57611
  className: "bg-secondary flex flex-col gap-1 rounded-[6px] p-2",
57531
- children: s.params.map((e, t) => {
57532
- let n = e.rawValue ? p[e.rawValue.toLowerCase()] : void 0;
57612
+ children: c.params.map((e, t) => {
57613
+ let n = e.rawValue ? g[e.rawValue.toLowerCase()] : void 0, r = e.rawValue ? _[e.rawValue.toLowerCase()] : void 0;
57533
57614
  return /* @__PURE__ */ V("div", {
57534
57615
  className: "flex flex-col gap-0.5",
57535
57616
  children: [/* @__PURE__ */ V("div", {
@@ -57541,9 +57622,15 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57541
57622
  className: "text-muted-foreground/60 font-mono text-[10px]",
57542
57623
  children: e.type
57543
57624
  })]
57544
- }), /* @__PURE__ */ B("p", {
57545
- className: "text-foreground break-all font-mono text-xs leading-[150%]",
57546
- children: n ? `${n} (${iU(e.rawValue)})` : e.value
57625
+ }), /* @__PURE__ */ V("div", {
57626
+ className: "flex flex-row items-center gap-1",
57627
+ children: [/* @__PURE__ */ B(kU, {
57628
+ src: r,
57629
+ fallback: null
57630
+ }), /* @__PURE__ */ B("p", {
57631
+ className: "text-foreground break-all font-mono text-xs leading-[150%]",
57632
+ children: n ? `${n} (${fU(e.rawValue)})` : e.value
57633
+ })]
57547
57634
  })]
57548
57635
  }, t);
57549
57636
  })
@@ -57569,43 +57656,47 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57569
57656
  children: t
57570
57657
  })
57571
57658
  });
57572
- }, EU = ({ transactions: e, walletAddress: t, gasFee: n, gasFeeLoading: r, gasEstimationError: i, sponsored: a, onConfirm: o, onCancel: s, isProcessing: c, transactionStatus: l, networkName: u, apiKey: d, feeTokens: f, feeTokensLoading: p, selectedFeeToken: m, onFeeTokenSelect: h, showFeeTokenSelector: g, isPayingWithErc20: _, mainnetRpcUrl: v, nativeCurrencySymbol: y }) => {
57573
- let b = qL(), [x, S] = z({}), [C, w] = z({}), [T, E] = z({}), D = e.length, O = D === 1, k = e[0], A = dz(k?.chainId || 1, d, 24), j = f?.find((e) => e.isNative)?.symbol || y || "ETH", M = gz(j), N = !f || f.length === 0 ? !0 : f.some((e) => e.isSelectable);
57659
+ }, LU = ({ transactions: e, walletAddress: t, gasFee: n, gasFeeLoading: r, gasEstimationError: i, sponsored: a, onConfirm: o, onCancel: s, isProcessing: c, transactionStatus: l, networkName: u, apiKey: d, feeTokens: f, feeTokensLoading: p, selectedFeeToken: m, onFeeTokenSelect: h, showFeeTokenSelector: g, isPayingWithErc20: _, mainnetRpcUrl: v, nativeCurrencySymbol: y }) => {
57660
+ let b = qL(), [x, S] = z({}), [C, w] = z({}), [T, E] = z({}), [D, O] = z({}), k = e.length, A = k === 1, j = e[0], M = dz(j?.chainId || 1, d, 24), N = f?.find((e) => e.isNative)?.symbol || y || "ETH", P = gz(N), ee = !f || f.length === 0 ? !0 : f.some((e) => e.isSelectable);
57574
57661
  at(() => {
57575
- let n = lM(v);
57576
- t && k?.chainId && n.subnames.reverseResolve({
57662
+ let n = [];
57663
+ if (t && j?.chainId && n.push({
57577
57664
  address: t,
57578
- chainId: k.chainId
57579
- }).then(async (e) => {
57580
- if (e) {
57581
- let n = await vU(k.chainId, v);
57582
- E((r) => ({
57583
- ...r,
57584
- [t]: n ? `${e}@${n}` : e
57585
- }));
57586
- }
57587
- }).catch(() => {}), e.forEach((e) => {
57588
- e.to && e.chainId && n.subnames.reverseResolve({
57665
+ chainId: j.chainId
57666
+ }), e.forEach((e) => {
57667
+ e.to && e.chainId && n.push({
57589
57668
  address: e.to,
57590
57669
  chainId: e.chainId
57591
- }).then(async (t) => {
57592
- if (t) {
57593
- let n = await vU(e.chainId, v);
57594
- E((r) => ({
57595
- ...r,
57596
- [e.to]: n ? `${t}@${n}` : t
57597
- }));
57598
- }
57599
- }).catch(() => {});
57600
- });
57670
+ });
57671
+ }), n.length === 0) return;
57672
+ let r = !1;
57673
+ return dU(n, v).then(async (e) => {
57674
+ if (r) return;
57675
+ let t = {}, i = {};
57676
+ for (let { address: r, chainId: a } of n) {
57677
+ let n = e[r.toLowerCase()];
57678
+ if (!n) continue;
57679
+ let o = await EU(a, v);
57680
+ t[r] = o ? `${n.name}@${o}` : n.name, n.avatar && (i[r] = n.avatar);
57681
+ }
57682
+ r || (Object.keys(t).length > 0 && E((e) => ({
57683
+ ...e,
57684
+ ...t
57685
+ })), Object.keys(i).length > 0 && O((e) => ({
57686
+ ...e,
57687
+ ...i
57688
+ })));
57689
+ }).catch(() => void 0), () => {
57690
+ r = !0;
57691
+ };
57601
57692
  }, [
57602
57693
  t,
57603
57694
  e,
57604
- k?.chainId
57695
+ j?.chainId
57605
57696
  ]);
57606
- let [P, ee] = z({}), F = e.filter((e) => !!e.to).map((e) => gH(e.chainId, e.to)).sort().join("|");
57697
+ let [F, te] = z({}), I = e.filter((e) => !!e.to).map((e) => gH(e.chainId, e.to)).sort().join("|");
57607
57698
  at(() => {
57608
- if (!F) return;
57699
+ if (!I) return;
57609
57700
  let t = !1;
57610
57701
  return (async () => {
57611
57702
  let n = hH(), r;
@@ -57634,22 +57725,22 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57634
57725
  if (t) return;
57635
57726
  let o = {};
57636
57727
  for (let e of a) e && (o[e[0]] = e[1]);
57637
- Object.keys(o).length > 0 && ee((e) => ({
57728
+ Object.keys(o).length > 0 && te((e) => ({
57638
57729
  ...e,
57639
57730
  ...o
57640
57731
  }));
57641
57732
  })(), () => {
57642
57733
  t = !0;
57643
57734
  };
57644
- }, [F]);
57645
- let te = (e) => e ? T[e] || P[e.toLowerCase()] || aU(void 0, e) : "", I = aU(T[t], t), L = te(k?.to), ne = (e) => {
57735
+ }, [I]);
57736
+ let L = (e) => e ? T[e] || F[e.toLowerCase()] || pU(void 0, e) : "", ne = pU(T[t], t), re = L(j?.to), ie = (e) => {
57646
57737
  if (!e || e === "0" || e === "0x0") return null;
57647
57738
  try {
57648
57739
  return e.startsWith("0x") || /^\d+$/.test(e) && e.length > 10 ? ze(BigInt(e)) : /^\d+\.?\d*$/.test(e) && e.length <= 20 ? e : ze(BigInt(e));
57649
57740
  } catch (t) {
57650
57741
  return console.warn("Failed to format transaction value:", e, t), null;
57651
57742
  }
57652
- }, re = !N || i && !a && !_, ie = !c && !r && !re;
57743
+ }, ae = !ee || i && !a && !_, oe = !c && !r && !ae;
57653
57744
  return /* @__PURE__ */ B(ko, {
57654
57745
  open: !0,
57655
57746
  onOpenChange: c ? void 0 : () => {},
@@ -57679,12 +57770,12 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57679
57770
  className: "text-foreground text-[30px] font-normal leading-[100%]",
57680
57771
  children: "Review Transaction"
57681
57772
  }),
57682
- D > 1 && k?.description && /* @__PURE__ */ V("p", {
57773
+ k > 1 && j?.description && /* @__PURE__ */ V("p", {
57683
57774
  className: "text-muted-foreground text-sm",
57684
57775
  children: [
57685
- k.action,
57776
+ j.action,
57686
57777
  ": ",
57687
- k.description
57778
+ j.description
57688
57779
  ]
57689
57780
  })
57690
57781
  ]
@@ -57698,11 +57789,11 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57698
57789
  } : {
57699
57790
  width: "500px",
57700
57791
  minWidth: "500px",
57701
- maxHeight: O ? void 0 : "85vh"
57792
+ maxHeight: A ? void 0 : "85vh"
57702
57793
  },
57703
57794
  children: /* @__PURE__ */ B("div", {
57704
- className: `flex flex-col justify-between gap-6 max-md:h-full ${O ? "" : "h-full overflow-hidden"}`,
57705
- children: O ? /* @__PURE__ */ V(lt, { children: [/* @__PURE__ */ V("div", {
57795
+ className: `flex flex-col justify-between gap-6 max-md:h-full ${A ? "" : "h-full overflow-hidden"}`,
57796
+ children: A ? /* @__PURE__ */ V(lt, { children: [/* @__PURE__ */ V("div", {
57706
57797
  className: "flex max-h-[60vh] min-h-0 flex-1 flex-col gap-3 overflow-y-auto",
57707
57798
  children: [
57708
57799
  /* @__PURE__ */ V("div", {
@@ -57715,12 +57806,9 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57715
57806
  children: "From"
57716
57807
  }), /* @__PURE__ */ V("div", {
57717
57808
  className: "flex min-w-0 flex-row items-center gap-1",
57718
- children: [/* @__PURE__ */ B(cs, {
57719
- className: "h-3 w-3 flex-shrink-0",
57720
- stroke: "currentColor"
57721
- }), /* @__PURE__ */ B("p", {
57809
+ children: [/* @__PURE__ */ B(kU, { src: D[t] }), /* @__PURE__ */ B("p", {
57722
57810
  className: "break-all text-base font-normal leading-[150%]",
57723
- children: I
57811
+ children: ne
57724
57812
  })]
57725
57813
  })]
57726
57814
  }),
@@ -57733,15 +57821,12 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57733
57821
  }), /* @__PURE__ */ V("div", {
57734
57822
  className: "flex min-w-0 flex-row items-center gap-1",
57735
57823
  children: [
57736
- /* @__PURE__ */ B(cs, {
57737
- className: "h-3 w-3 flex-shrink-0",
57738
- stroke: "currentColor"
57739
- }),
57824
+ /* @__PURE__ */ B(kU, { src: j?.to ? D[j.to] : void 0 }),
57740
57825
  /* @__PURE__ */ B("p", {
57741
57826
  className: "break-all text-base font-normal leading-[150%]",
57742
- children: L
57827
+ children: re
57743
57828
  }),
57744
- k?.to && (C["single-to"] ? /* @__PURE__ */ B(us, {
57829
+ j?.to && (C["single-to"] ? /* @__PURE__ */ B(us, {
57745
57830
  width: 14,
57746
57831
  height: 14,
57747
57832
  className: "flex-shrink-0"
@@ -57749,7 +57834,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57749
57834
  width: 14,
57750
57835
  height: 14,
57751
57836
  onClick: () => {
57752
- typeof window < "u" && navigator?.clipboard && (navigator.clipboard.writeText(k.to), w((e) => ({
57837
+ typeof window < "u" && navigator?.clipboard && (navigator.clipboard.writeText(j.to), w((e) => ({
57753
57838
  ...e,
57754
57839
  "single-to": !0
57755
57840
  })), setTimeout(() => w((e) => ({
@@ -57764,7 +57849,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57764
57849
  })
57765
57850
  ]
57766
57851
  }),
57767
- ne(k?.value) && /* @__PURE__ */ B("div", {
57852
+ ie(j?.value) && /* @__PURE__ */ B("div", {
57768
57853
  className: "border-border flex flex-row items-center justify-between gap-2.5 rounded-[6px] border p-3.5",
57769
57854
  children: /* @__PURE__ */ V("div", {
57770
57855
  className: "text-foreground flex flex-col gap-0.5",
@@ -57774,9 +57859,9 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57774
57859
  }), /* @__PURE__ */ V("p", {
57775
57860
  className: "text-base font-normal leading-[150%]",
57776
57861
  children: [
57777
- ne(k?.value),
57862
+ ie(j?.value),
57778
57863
  " ",
57779
- j
57864
+ N
57780
57865
  ]
57781
57866
  })]
57782
57867
  })
@@ -57791,7 +57876,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57791
57876
  children: "Network"
57792
57877
  }), /* @__PURE__ */ V("div", {
57793
57878
  className: "flex flex-row items-center gap-1",
57794
- children: [A, /* @__PURE__ */ B("p", {
57879
+ children: [M, /* @__PURE__ */ B("p", {
57795
57880
  className: "truncate text-ellipsis text-base font-normal leading-[150%]",
57796
57881
  children: u || "Ethereum"
57797
57882
  })]
@@ -57816,7 +57901,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57816
57901
  children: /* @__PURE__ */ V("p", { children: [
57817
57902
  "Gas fees paid to network validators to process your transaction. You can pay with",
57818
57903
  " ",
57819
- j,
57904
+ N,
57820
57905
  " or supported tokens."
57821
57906
  ] })
57822
57907
  })] })
@@ -57836,11 +57921,11 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57836
57921
  className: "flex flex-col",
57837
57922
  children: [/* @__PURE__ */ V("div", {
57838
57923
  className: "flex items-center gap-2",
57839
- children: [n && n !== "sponsored" && M > 0 && /* @__PURE__ */ B("div", {
57924
+ children: [n && n !== "sponsored" && P > 0 && /* @__PURE__ */ B("div", {
57840
57925
  className: "text-muted-foreground flex flex-col line-through",
57841
57926
  children: /* @__PURE__ */ V("p", {
57842
57927
  className: "text-base font-normal",
57843
- children: ["$", (M * Number(n)).toFixed(4)]
57928
+ children: ["$", (P * Number(n)).toFixed(4)]
57844
57929
  })
57845
57930
  }), /* @__PURE__ */ B("span", {
57846
57931
  className: "text-success bg-success/10 rounded px-2 py-0.5 text-xs font-semibold",
@@ -57850,7 +57935,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57850
57935
  className: "text-muted-foreground text-xs font-normal",
57851
57936
  children: n && n !== "sponsored" ? (() => {
57852
57937
  let e = Number(n);
57853
- return e > 0 && e < 1e-4 ? `< 0.0001 ${j}` : `${e.toFixed(4)} ${j}`;
57938
+ return e > 0 && e < 1e-4 ? `< 0.0001 ${N}` : `${e.toFixed(4)} ${N}`;
57854
57939
  })() : "Gas fees covered"
57855
57940
  })]
57856
57941
  }) : _ && m ? /* @__PURE__ */ V("div", {
@@ -57869,7 +57954,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57869
57954
  onSelect: h,
57870
57955
  isLoading: p ?? !1,
57871
57956
  disabled: c,
57872
- nativeTokenPrice: M,
57957
+ nativeTokenPrice: P,
57873
57958
  estimatedGasEth: n || "0"
57874
57959
  })]
57875
57960
  }), m.gasCostFormatted && /* @__PURE__ */ V("p", {
@@ -57887,21 +57972,21 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57887
57972
  className: "flex w-full items-center justify-between",
57888
57973
  children: [/* @__PURE__ */ B("p", {
57889
57974
  className: "text-foreground text-base font-normal",
57890
- children: M > 0 ? `$${(M * Number(n)).toFixed(4)}` : ""
57975
+ children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` : ""
57891
57976
  }), g && !a && f && h && /* @__PURE__ */ B(KL, {
57892
57977
  tokens: f,
57893
57978
  selectedToken: m ?? null,
57894
57979
  onSelect: h,
57895
57980
  isLoading: p ?? !1,
57896
57981
  disabled: c,
57897
- nativeTokenPrice: M,
57982
+ nativeTokenPrice: P,
57898
57983
  estimatedGasEth: n
57899
57984
  })]
57900
57985
  }), /* @__PURE__ */ B("p", {
57901
57986
  className: "text-muted-foreground text-xs font-normal",
57902
57987
  children: (() => {
57903
57988
  let e = Number(n);
57904
- return e > 0 && e < 1e-4 ? `< 0.0001 ${j}` : `${e.toFixed(4)} ${j}`;
57989
+ return e > 0 && e < 1e-4 ? `< 0.0001 ${N}` : `${e.toFixed(4)} ${N}`;
57905
57990
  })()
57906
57991
  })]
57907
57992
  }) : /* @__PURE__ */ B("p", {
@@ -57912,7 +57997,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57912
57997
  })
57913
57998
  ]
57914
57999
  }),
57915
- k?.data && k.data !== "0x" && /* @__PURE__ */ V("div", {
58000
+ j?.data && j.data !== "0x" && /* @__PURE__ */ V("div", {
57916
58001
  className: "border-border flex flex-col gap-2.5 rounded-[6px] border p-3.5",
57917
58002
  children: [/* @__PURE__ */ V("div", {
57918
58003
  className: "flex w-full flex-row items-center justify-between",
@@ -57926,7 +58011,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57926
58011
  width: 16,
57927
58012
  height: 16,
57928
58013
  onClick: () => {
57929
- typeof window < "u" && navigator?.clipboard && (navigator.clipboard.writeText(k?.data ?? ""), S({
58014
+ typeof window < "u" && navigator?.clipboard && (navigator.clipboard.writeText(j?.data ?? ""), S({
57930
58015
  ...x,
57931
58016
  0: !0
57932
58017
  }), setTimeout(() => S((e) => ({
@@ -57936,12 +58021,13 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57936
58021
  },
57937
58022
  className: "cursor-pointer"
57938
58023
  })]
57939
- }), /* @__PURE__ */ B(TU, {
57940
- to: k.to,
57941
- data: k.data,
57942
- chainId: k.chainId,
58024
+ }), /* @__PURE__ */ B(IU, {
58025
+ to: j.to,
58026
+ data: j.data,
58027
+ chainId: j.chainId,
57943
58028
  apiKey: d,
57944
58029
  resolvedAddresses: T,
58030
+ resolvedAvatars: D,
57945
58031
  mainnetRpcUrl: v
57946
58032
  })]
57947
58033
  }),
@@ -57960,9 +58046,9 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57960
58046
  children: "Cancel"
57961
58047
  }), /* @__PURE__ */ B($o, {
57962
58048
  onClick: o,
57963
- disabled: !ie,
58049
+ disabled: !oe,
57964
58050
  className: "flex-1",
57965
- children: re ? "Insufficient Funds" : c ? "Processing..." : "Transact"
58051
+ children: ae ? "Insufficient Funds" : c ? "Processing..." : "Transact"
57966
58052
  })]
57967
58053
  })] }) : /* @__PURE__ */ V(lt, { children: [/* @__PURE__ */ V("div", {
57968
58054
  className: "flex max-h-[60vh] min-h-0 flex-1 flex-col gap-3 overflow-y-auto",
@@ -57974,12 +58060,9 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
57974
58060
  children: "From"
57975
58061
  }), /* @__PURE__ */ V("div", {
57976
58062
  className: "flex flex-row items-center gap-1",
57977
- children: [/* @__PURE__ */ B(cs, {
57978
- className: "h-3 w-3 flex-shrink-0",
57979
- stroke: "currentColor"
57980
- }), /* @__PURE__ */ B("p", {
58063
+ children: [/* @__PURE__ */ B(kU, { src: D[t] }), /* @__PURE__ */ B("p", {
57981
58064
  className: "break-all text-base font-normal leading-[150%]",
57982
- children: I
58065
+ children: ne
57983
58066
  })]
57984
58067
  })]
57985
58068
  }),
@@ -58029,16 +58112,13 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58029
58112
  })]
58030
58113
  }), /* @__PURE__ */ V("div", {
58031
58114
  className: "flex flex-row items-center gap-1",
58032
- children: [/* @__PURE__ */ B(cs, {
58033
- className: "h-3 w-3 flex-shrink-0",
58034
- stroke: "currentColor"
58035
- }), /* @__PURE__ */ B("p", {
58115
+ children: [/* @__PURE__ */ B(kU, { src: e.to ? D[e.to] : void 0 }), /* @__PURE__ */ B("p", {
58036
58116
  className: "text-sm font-normal leading-[150%]",
58037
- children: te(e.to)
58117
+ children: L(e.to)
58038
58118
  })]
58039
58119
  })]
58040
58120
  }),
58041
- ne(e.value) && /* @__PURE__ */ V("div", {
58121
+ ie(e.value) && /* @__PURE__ */ V("div", {
58042
58122
  className: "border-border flex items-center gap-2 rounded-[6px] border p-2",
58043
58123
  children: [/* @__PURE__ */ B("div", {
58044
58124
  className: "bg-primary/10 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full",
@@ -58063,13 +58143,13 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58063
58143
  children: [/* @__PURE__ */ V("p", {
58064
58144
  className: "text-base font-normal",
58065
58145
  children: [
58066
- ne(e.value),
58146
+ ie(e.value),
58067
58147
  " ",
58068
- j
58148
+ N
58069
58149
  ]
58070
- }), M > 0 && /* @__PURE__ */ V("p", {
58150
+ }), P > 0 && /* @__PURE__ */ V("p", {
58071
58151
  className: "text-muted-foreground text-sm",
58072
- children: ["$", (Number(ne(e.value)) * M).toFixed(2)]
58152
+ children: ["$", (Number(ie(e.value)) * P).toFixed(2)]
58073
58153
  })]
58074
58154
  })]
58075
58155
  })]
@@ -58098,12 +58178,13 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58098
58178
  },
58099
58179
  className: "cursor-pointer"
58100
58180
  })]
58101
- }), /* @__PURE__ */ B(TU, {
58181
+ }), /* @__PURE__ */ B(IU, {
58102
58182
  to: e.to,
58103
58183
  data: e.data,
58104
58184
  chainId: e.chainId,
58105
58185
  apiKey: d,
58106
58186
  resolvedAddresses: T,
58187
+ resolvedAvatars: D,
58107
58188
  mainnetRpcUrl: v
58108
58189
  })]
58109
58190
  })
@@ -58130,7 +58211,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58130
58211
  children: "Network"
58131
58212
  }), /* @__PURE__ */ V("div", {
58132
58213
  className: "flex flex-row items-center gap-1",
58133
- children: [A, /* @__PURE__ */ B("p", {
58214
+ children: [M, /* @__PURE__ */ B("p", {
58134
58215
  className: "truncate text-ellipsis text-base font-normal leading-[150%]",
58135
58216
  children: u || "Ethereum"
58136
58217
  })]
@@ -58155,7 +58236,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58155
58236
  children: /* @__PURE__ */ V("p", { children: [
58156
58237
  "Gas fees paid to network validators to process your transaction. You can pay with",
58157
58238
  " ",
58158
- j,
58239
+ N,
58159
58240
  " or supported tokens."
58160
58241
  ] })
58161
58242
  })] })
@@ -58175,11 +58256,11 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58175
58256
  className: "flex flex-col",
58176
58257
  children: [/* @__PURE__ */ V("div", {
58177
58258
  className: "flex items-center gap-2",
58178
- children: [n && n !== "sponsored" && M > 0 && /* @__PURE__ */ B("div", {
58259
+ children: [n && n !== "sponsored" && P > 0 && /* @__PURE__ */ B("div", {
58179
58260
  className: "text-muted-foreground flex flex-col line-through",
58180
58261
  children: /* @__PURE__ */ V("p", {
58181
58262
  className: "text-base font-normal",
58182
- children: ["$", (M * Number(n)).toFixed(4)]
58263
+ children: ["$", (P * Number(n)).toFixed(4)]
58183
58264
  })
58184
58265
  }), /* @__PURE__ */ B("span", {
58185
58266
  className: "text-success bg-success/10 rounded px-2 py-0.5 text-xs font-semibold",
@@ -58189,7 +58270,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58189
58270
  className: "text-muted-foreground text-xs font-normal",
58190
58271
  children: n && n !== "sponsored" ? (() => {
58191
58272
  let e = Number(n);
58192
- return e > 0 && e < 1e-4 ? `< 0.0001 ${j}` : `${e.toFixed(4)} ${j}`;
58273
+ return e > 0 && e < 1e-4 ? `< 0.0001 ${N}` : `${e.toFixed(4)} ${N}`;
58193
58274
  })() : "Gas fees covered"
58194
58275
  })]
58195
58276
  }) : _ && m ? /* @__PURE__ */ V("div", {
@@ -58208,7 +58289,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58208
58289
  onSelect: h,
58209
58290
  isLoading: p ?? !1,
58210
58291
  disabled: c,
58211
- nativeTokenPrice: M,
58292
+ nativeTokenPrice: P,
58212
58293
  estimatedGasEth: n || "0"
58213
58294
  })]
58214
58295
  }), m.gasCostFormatted && /* @__PURE__ */ V("p", {
@@ -58226,21 +58307,21 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58226
58307
  className: "flex w-full items-center justify-between",
58227
58308
  children: [/* @__PURE__ */ B("p", {
58228
58309
  className: "text-foreground text-base font-normal",
58229
- children: M > 0 ? `$${(M * Number(n)).toFixed(4)}` : ""
58310
+ children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` : ""
58230
58311
  }), g && !a && f && h && /* @__PURE__ */ B(KL, {
58231
58312
  tokens: f,
58232
58313
  selectedToken: m ?? null,
58233
58314
  onSelect: h,
58234
58315
  isLoading: p ?? !1,
58235
58316
  disabled: c,
58236
- nativeTokenPrice: M,
58317
+ nativeTokenPrice: P,
58237
58318
  estimatedGasEth: n
58238
58319
  })]
58239
58320
  }), /* @__PURE__ */ B("p", {
58240
58321
  className: "text-muted-foreground text-xs font-normal",
58241
58322
  children: (() => {
58242
58323
  let e = Number(n);
58243
- return e > 0 && e < 1e-4 ? `< 0.0001 ${j}` : `${e.toFixed(4)} ${j}`;
58324
+ return e > 0 && e < 1e-4 ? `< 0.0001 ${N}` : `${e.toFixed(4)} ${N}`;
58244
58325
  })()
58245
58326
  })]
58246
58327
  }) : /* @__PURE__ */ B("p", {
@@ -58260,7 +58341,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58260
58341
  children: "Cancel"
58261
58342
  }), /* @__PURE__ */ B($o, {
58262
58343
  onClick: o,
58263
- disabled: !ie,
58344
+ disabled: !oe,
58264
58345
  className: "flex-1",
58265
58346
  children: i && !a ? "Insufficient Funds" : c ? "Processing..." : "Transact"
58266
58347
  })]
@@ -58268,20 +58349,21 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58268
58349
  })] })
58269
58350
  })
58270
58351
  });
58271
- }, DU = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, accountAddress: a, chainName: o, chainId: s, chainIcon: c, mainnetRpcUrl: l, onSign: u, onCancel: d, isProcessing: f, signatureStatus: p, canSign: m }) => {
58352
+ }, RU = ({ open: e, onOpenChange: t, message: n, origin: r, timestamp: i, accountAddress: a, chainName: o, chainId: s, chainIcon: c, mainnetRpcUrl: l, onSign: u, onCancel: d, isProcessing: f, signatureStatus: p, canSign: m }) => {
58272
58353
  let h = qL(), [g, _] = z(null);
58273
58354
  at(() => {
58274
- a && s && lM(l).subnames.reverseResolve({
58355
+ a && s && uU([{
58275
58356
  address: a,
58276
58357
  chainId: s
58277
- }).then(async (e) => {
58278
- if (e) {
58279
- let t = await vU(s, l);
58280
- _(t ? `${e}@${t}` : e);
58358
+ }], l).then(async (e) => {
58359
+ let t = e[a.toLowerCase()];
58360
+ if (t) {
58361
+ let e = await EU(s, l);
58362
+ _(e ? `${t}@${e}` : t);
58281
58363
  }
58282
58364
  }).catch(() => {});
58283
58365
  }, [a, s]);
58284
- let v = aU(g, a || "");
58366
+ let v = pU(g, a || "");
58285
58367
  return /* @__PURE__ */ B(ko, {
58286
58368
  open: e,
58287
58369
  onOpenChange: f ? void 0 : t,
@@ -58402,20 +58484,21 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58402
58484
  ]
58403
58485
  })
58404
58486
  });
58405
- }, OU = ({ open: e, onOpenChange: t, message: n, timestamp: r, appName: i, appLogoUrl: a, accountAddress: o, chainName: s, chainId: c, chainIcon: l, mainnetRpcUrl: u, onSign: d, onCancel: f, isProcessing: p, siweStatus: m, canSign: h, warningMessage: g }) => {
58487
+ }, zU = ({ open: e, onOpenChange: t, message: n, timestamp: r, appName: i, appLogoUrl: a, accountAddress: o, chainName: s, chainId: c, chainIcon: l, mainnetRpcUrl: u, onSign: d, onCancel: f, isProcessing: p, siweStatus: m, canSign: h, warningMessage: g }) => {
58406
58488
  let _ = qL(), [v, y] = z(null);
58407
58489
  at(() => {
58408
- o && c && lM(u).subnames.reverseResolve({
58490
+ o && c && uU([{
58409
58491
  address: o,
58410
58492
  chainId: c
58411
- }).then(async (e) => {
58412
- if (e) {
58413
- let t = await vU(c, u);
58414
- y(t ? `${e}@${t}` : e);
58493
+ }], u).then(async (e) => {
58494
+ let t = e[o.toLowerCase()];
58495
+ if (t) {
58496
+ let e = await EU(c, u);
58497
+ y(e ? `${t}@${e}` : t);
58415
58498
  }
58416
58499
  }).catch(() => {});
58417
58500
  }, [o, c]);
58418
- let b = aU(v, o || "");
58501
+ let b = pU(v, o || "");
58419
58502
  return /* @__PURE__ */ B(ko, {
58420
58503
  open: e,
58421
58504
  onOpenChange: p ? void 0 : t,
@@ -58596,16 +58679,17 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58596
58679
  ]
58597
58680
  })
58598
58681
  });
58599
- }, kU = ({ open: e, onOpenChange: t, appName: n, appLogoUrl: r, origin: i, timestamp: a, accountName: o, walletAddress: s, chainName: c, chainId: l, chainIcon: u, mainnetRpcUrl: d, onConnect: f, onCancel: p, showPermissions: m = !0, isProcessing: h }) => {
58682
+ }, BU = ({ open: e, onOpenChange: t, appName: n, appLogoUrl: r, origin: i, timestamp: a, accountName: o, walletAddress: s, chainName: c, chainId: l, chainIcon: u, mainnetRpcUrl: d, onConnect: f, onCancel: p, showPermissions: m = !0, isProcessing: h }) => {
58600
58683
  let g = qL(), [_, v] = z(null), [y, b] = z(!1);
58601
58684
  at(() => {
58602
- s && l && lM(d).subnames.reverseResolve({
58685
+ s && l && uU([{
58603
58686
  address: s,
58604
58687
  chainId: l
58605
- }).then(async (e) => {
58606
- if (e) {
58607
- let t = await vU(l, d);
58608
- v(t ? `${e}@${t}` : e);
58688
+ }], d).then(async (e) => {
58689
+ let t = e[s.toLowerCase()];
58690
+ if (t) {
58691
+ let e = await EU(l, d);
58692
+ v(e ? `${t}@${e}` : t);
58609
58693
  }
58610
58694
  }).catch(() => {});
58611
58695
  }, [s, l]);
@@ -58780,23 +58864,23 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58780
58864
  ]
58781
58865
  })
58782
58866
  });
58783
- }, AU = (e) => typeof e == "object" && !!e && !Array.isArray(e), jU = (e) => Array.isArray(e), MU = (e) => typeof e == "string" ? "text-foreground" : typeof e == "number" ? "text-info dark:text-info" : typeof e == "boolean" ? "text-info" : e == null ? "text-muted-foreground" : "text-foreground", NU = (e) => e === null ? {
58867
+ }, VU = (e) => typeof e == "object" && !!e && !Array.isArray(e), HU = (e) => Array.isArray(e), UU = (e) => typeof e == "string" ? "text-foreground" : typeof e == "number" ? "text-info dark:text-info" : typeof e == "boolean" ? "text-info" : e == null ? "text-muted-foreground" : "text-foreground", WU = (e) => e === null ? {
58784
58868
  text: "null",
58785
- color: MU(null)
58869
+ color: UU(null)
58786
58870
  } : e === void 0 ? {
58787
58871
  text: "undefined",
58788
- color: MU(void 0)
58872
+ color: UU(void 0)
58789
58873
  } : typeof e == "boolean" || typeof e == "number" ? {
58790
58874
  text: String(e),
58791
- color: MU(e)
58875
+ color: UU(e)
58792
58876
  } : typeof e == "string" ? {
58793
58877
  text: `"${e}"`,
58794
- color: MU(e)
58878
+ color: UU(e)
58795
58879
  } : {
58796
58880
  text: JSON.stringify(e),
58797
58881
  color: "text-foreground"
58798
- }, PU = ({ propertyKey: e, value: t, isLast: n, depth: r }) => {
58799
- let i = NU(t);
58882
+ }, GU = ({ propertyKey: e, value: t, isLast: n, depth: r }) => {
58883
+ let i = WU(t);
58800
58884
  return /* @__PURE__ */ V("div", {
58801
58885
  className: "flex items-start gap-1 py-0.5 font-mono text-sm",
58802
58886
  style: { paddingLeft: `${r * 16}px` },
@@ -58819,9 +58903,9 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58819
58903
  })
58820
58904
  ]
58821
58905
  });
58822
- }, FU = ({ data: e, depth: t = 0, parentKey: n, isLast: r = !0 }) => {
58906
+ }, KU = ({ data: e, depth: t = 0, parentKey: n, isLast: r = !0 }) => {
58823
58907
  let i = t * 16;
58824
- if (AU(e)) {
58908
+ if (VU(e)) {
58825
58909
  let a = Object.entries(e), o = `${n || "root"}-${t}`;
58826
58910
  return t === 0 ? /* @__PURE__ */ B("div", {
58827
58911
  className: "w-full font-mono text-sm",
@@ -58829,12 +58913,12 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58829
58913
  className: "flex flex-col",
58830
58914
  children: a.map(([e, n], r) => {
58831
58915
  let i = r === a.length - 1;
58832
- return AU(n) || jU(n) ? /* @__PURE__ */ B(FU, {
58916
+ return VU(n) || HU(n) ? /* @__PURE__ */ B(KU, {
58833
58917
  data: n,
58834
58918
  depth: t + 1,
58835
58919
  parentKey: e,
58836
58920
  isLast: i
58837
- }, e) : /* @__PURE__ */ B(PU, {
58921
+ }, e) : /* @__PURE__ */ B(GU, {
58838
58922
  propertyKey: e,
58839
58923
  value: n,
58840
58924
  isLast: i,
@@ -58887,12 +58971,12 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58887
58971
  className: "flex flex-col",
58888
58972
  children: [a.map(([e, n], r) => {
58889
58973
  let i = r === a.length - 1;
58890
- return AU(n) || jU(n) ? /* @__PURE__ */ B(FU, {
58974
+ return VU(n) || HU(n) ? /* @__PURE__ */ B(KU, {
58891
58975
  data: n,
58892
58976
  depth: t + 1,
58893
58977
  parentKey: e,
58894
58978
  isLast: i
58895
- }, e) : /* @__PURE__ */ B(PU, {
58979
+ }, e) : /* @__PURE__ */ B(GU, {
58896
58980
  propertyKey: e,
58897
58981
  value: n,
58898
58982
  isLast: i,
@@ -58909,7 +58993,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58909
58993
  })
58910
58994
  });
58911
58995
  }
58912
- if (jU(e)) {
58996
+ if (HU(e)) {
58913
58997
  let a = `${n || "array"}-${t}`;
58914
58998
  return t === 0 ? /* @__PURE__ */ B("div", {
58915
58999
  className: "w-full font-mono text-sm",
@@ -58917,16 +59001,16 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58917
59001
  className: "flex flex-col",
58918
59002
  children: e.map((n, r) => {
58919
59003
  let i = r === e.length - 1, a = `[${r}]`;
58920
- if (AU(n) || jU(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
59004
+ if (VU(n) || HU(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
58921
59005
  className: "text-muted-foreground py-0.5 font-mono text-sm",
58922
59006
  style: { paddingLeft: `${t * 16}px` },
58923
59007
  children: [a, ":"]
58924
- }), /* @__PURE__ */ B(FU, {
59008
+ }), /* @__PURE__ */ B(KU, {
58925
59009
  data: n,
58926
59010
  depth: t + 1,
58927
59011
  isLast: i
58928
59012
  })] }, r);
58929
- let o = NU(n);
59013
+ let o = WU(n);
58930
59014
  return /* @__PURE__ */ V("div", {
58931
59015
  className: "flex items-start gap-1 py-0.5 font-mono text-sm",
58932
59016
  style: { paddingLeft: `${t * 16}px` },
@@ -58992,16 +59076,16 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
58992
59076
  className: "flex flex-col",
58993
59077
  children: [e.map((n, r) => {
58994
59078
  let i = r === e.length - 1, a = `[${r}]`;
58995
- if (AU(n) || jU(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
59079
+ if (VU(n) || HU(n)) return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("div", {
58996
59080
  className: "text-muted-foreground py-0.5 font-mono text-sm",
58997
59081
  style: { paddingLeft: `${(t + 1) * 16}px` },
58998
59082
  children: [a, ":"]
58999
- }), /* @__PURE__ */ B(FU, {
59083
+ }), /* @__PURE__ */ B(KU, {
59000
59084
  data: n,
59001
59085
  depth: t + 2,
59002
59086
  isLast: i
59003
59087
  })] }, r);
59004
- let o = NU(n);
59088
+ let o = WU(n);
59005
59089
  return /* @__PURE__ */ V("div", {
59006
59090
  className: "flex items-start gap-1 py-0.5 font-mono text-sm",
59007
59091
  style: { paddingLeft: `${(t + 1) * 16}px` },
@@ -59031,7 +59115,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59031
59115
  })
59032
59116
  });
59033
59117
  }
59034
- let a = NU(e);
59118
+ let a = WU(e);
59035
59119
  return /* @__PURE__ */ B("div", {
59036
59120
  className: "py-0.5 font-mono text-sm",
59037
59121
  style: { paddingLeft: `${i}px` },
@@ -59040,7 +59124,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59040
59124
  children: a.text
59041
59125
  })
59042
59126
  });
59043
- }, IU = ({ open: e, onOpenChange: t, typedDataJson: n, origin: r, timestamp: i, accountAddress: a, chainName: o, chainId: s, chainIcon: c, mainnetRpcUrl: l, onSign: u, onCancel: d, isProcessing: f, signatureStatus: p, canSign: m }) => {
59127
+ }, qU = ({ open: e, onOpenChange: t, typedDataJson: n, origin: r, timestamp: i, accountAddress: a, chainName: o, chainId: s, chainIcon: c, mainnetRpcUrl: l, onSign: u, onCancel: d, isProcessing: f, signatureStatus: p, canSign: m }) => {
59044
59128
  let h = ct(null), g = qL(), [_, v] = z(null), y = st(() => {
59045
59129
  try {
59046
59130
  return JSON.parse(n);
@@ -59055,13 +59139,14 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59055
59139
  }
59056
59140
  }, [l]), { display: x } = rU(n, s ?? 1, b);
59057
59141
  at(() => {
59058
- a && s && lM(l).subnames.reverseResolve({
59142
+ a && s && uU([{
59059
59143
  address: a,
59060
59144
  chainId: s
59061
- }).then(async (e) => {
59062
- if (e) {
59063
- let t = await vU(s, l);
59064
- v(t ? `${e}@${t}` : e);
59145
+ }], l).then(async (e) => {
59146
+ let t = e[a.toLowerCase()];
59147
+ if (t) {
59148
+ let e = await EU(s, l);
59149
+ v(e ? `${t}@${e}` : t);
59065
59150
  }
59066
59151
  }).catch(() => {});
59067
59152
  }, [a, s]), at(() => {
@@ -59080,7 +59165,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59080
59165
  clearTimeout(n), t && t();
59081
59166
  };
59082
59167
  }, [e]);
59083
- let S = aU(_, a || ""), C = (e) => {
59168
+ let S = pU(_, a || ""), C = (e) => {
59084
59169
  try {
59085
59170
  return new URL(e.startsWith("http") ? e : `https://${e}`).hostname.replace("www.", "");
59086
59171
  } catch {
@@ -59148,7 +59233,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59148
59233
  let e = /* @__PURE__ */ B("div", {
59149
59234
  ref: h,
59150
59235
  className: "bg-muted/30 dark:bg-muted/10 border-border flex overflow-y-auto rounded-[6px] border p-3",
59151
- children: /* @__PURE__ */ B(FU, {
59236
+ children: /* @__PURE__ */ B(KU, {
59152
59237
  data: y,
59153
59238
  depth: 0
59154
59239
  })
@@ -59160,7 +59245,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59160
59245
  className: "flex flex-col gap-2",
59161
59246
  children: [/* @__PURE__ */ B("div", {
59162
59247
  className: "bg-muted/30 dark:bg-muted/10 border-border rounded-[6px] border p-3",
59163
- children: /* @__PURE__ */ B(CU, {
59248
+ children: /* @__PURE__ */ B(NU, {
59164
59249
  display: x,
59165
59250
  chainId: s ?? 1,
59166
59251
  mainnetRpcUrl: l
@@ -59253,46 +59338,46 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59253
59338
  })]
59254
59339
  })
59255
59340
  });
59256
- }, LU = ({ open: e, onOpenChange: t, mode: n, permissionId: r, spenderAddress: i, origin: a, spends: o = [], calls: s = [], expiryDate: c, networkName: l, chainId: u, chainIcon: d, apiKey: f, onConfirm: p, onCancel: m, isProcessing: h, status: g, isLoadingTokenInfo: _ = !1, timestamp: v = /* @__PURE__ */ new Date(), warningMessage: y, gasFee: b, gasFeeLoading: x = !1, gasEstimationError: S, sponsored: C = !1, feeTokens: w, feeTokensLoading: T, selectedFeeToken: E, onFeeTokenSelect: D, showFeeTokenSelector: O, isPayingWithErc20: k, mainnetRpcUrl: A, nativeCurrencySymbol: j }) => {
59257
- let M = ct(null), N = qL(), P = w?.find((e) => e.isNative)?.symbol || j || "ETH", ee = gz(P), [F, te] = z(!1), [I, L] = z({}), [ne, re] = z(!0);
59341
+ }, JU = ({ open: e, onOpenChange: t, mode: n, permissionId: r, spenderAddress: i, origin: a, spends: o = [], calls: s = [], expiryDate: c, networkName: l, chainId: u, chainIcon: d, apiKey: f, onConfirm: p, onCancel: m, isProcessing: h, status: g, isLoadingTokenInfo: _ = !1, timestamp: v = /* @__PURE__ */ new Date(), warningMessage: y, gasFee: b, gasFeeLoading: x = !1, gasEstimationError: S, sponsored: C = !1, feeTokens: w, feeTokensLoading: T, selectedFeeToken: E, onFeeTokenSelect: D, showFeeTokenSelector: O, isPayingWithErc20: k, mainnetRpcUrl: A, nativeCurrencySymbol: j }) => {
59342
+ let M = ct(null), N = qL(), P = w?.find((e) => e.isNative)?.symbol || j || "ETH", ee = gz(P), [F, te] = z(!1), [I, L] = z({}), [ne, re] = z({}), [ie, ae] = z(!0);
59258
59343
  at(() => {
59259
59344
  if (!u) {
59260
- re(!1);
59345
+ ae(!1);
59261
59346
  return;
59262
59347
  }
59263
- let e = lM(A), t = [];
59264
- if (i && t.push(i), s.forEach((e) => {
59265
- e.target && !t.includes(e.target) && e.target.toLowerCase() !== "0x3232323232323232323232323232323232323232" && t.push(e.target);
59266
- }), t.length === 0) {
59267
- re(!1);
59348
+ let e = [];
59349
+ if (i && e.push(i), s.forEach((t) => {
59350
+ t.target && !e.includes(t.target) && t.target.toLowerCase() !== "0x3232323232323232323232323232323232323232" && e.push(t.target);
59351
+ }), e.length === 0) {
59352
+ ae(!1);
59268
59353
  return;
59269
59354
  }
59270
- re(!0);
59271
- let n = t.map(async (t) => {
59272
- try {
59273
- let n = await e.subnames.reverseResolve({
59274
- address: t,
59275
- chainId: u
59276
- });
59277
- if (n) {
59278
- let e = await vU(u, A);
59279
- return {
59280
- address: t,
59281
- name: e ? `${n}@${e}` : n
59282
- };
59283
- }
59284
- } catch {}
59285
- return null;
59286
- });
59287
- Promise.all(n).then((e) => {
59288
- let t = {};
59289
- e.forEach((e) => {
59290
- e && (t[e.address] = e.name);
59291
- }), L((e) => ({
59355
+ ae(!0);
59356
+ let t = !1;
59357
+ return dU(e.map((e) => ({
59358
+ address: e,
59359
+ chainId: u
59360
+ })), A).then(async (n) => {
59361
+ if (t) return;
59362
+ let r = await EU(u, A);
59363
+ if (t) return;
59364
+ let i = {}, a = {};
59365
+ for (let t of e) {
59366
+ let e = n[t.toLowerCase()];
59367
+ e && (i[t] = r ? `${e.name}@${r}` : e.name, e.avatar && (a[t] = e.avatar));
59368
+ }
59369
+ L((e) => ({
59292
59370
  ...e,
59293
- ...t
59294
- })), re(!1);
59295
- });
59371
+ ...i
59372
+ })), Object.keys(a).length > 0 && re((e) => ({
59373
+ ...e,
59374
+ ...a
59375
+ }));
59376
+ }).catch(() => void 0).finally(() => {
59377
+ t || ae(!1);
59378
+ }), () => {
59379
+ t = !0;
59380
+ };
59296
59381
  }, [
59297
59382
  i,
59298
59383
  s,
@@ -59307,9 +59392,9 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59307
59392
  e.removeEventListener("wheel", t);
59308
59393
  };
59309
59394
  }, []);
59310
- let ie = dz(u || 1, f, 24), ae = d || ie, oe = (e) => e.toLowerCase() === "0x3232323232323232323232323232323232323232" ? "Any Contract" : null, se = (e, t) => t?.toLowerCase() === "0x32323232" ? "Any Function" : e, ce = (e) => e ? `${e.slice(0, 5)}...${e.slice(-4)}` : "", le = (e, t) => {
59395
+ let oe = dz(u || 1, f, 24), se = d || oe, ce = (e) => e.toLowerCase() === "0x3232323232323232323232323232323232323232" ? "Any Contract" : null, le = (e, t) => t?.toLowerCase() === "0x32323232" ? "Any Function" : e, ue = (e) => e ? `${e.slice(0, 5)}...${e.slice(-4)}` : "", de = (e, t) => {
59311
59396
  typeof window < "u" && navigator?.clipboard && (navigator.clipboard.writeText(e), t(!0), setTimeout(() => t(!1), 3e3));
59312
- }, ue = !h && !_ && !ne && !x && (!S || C), de = o.length, fe = s.length, pe = de + fe;
59397
+ }, fe = !h && !_ && !ie && !x && (!S || C), pe = o.length, me = s.length, he = pe + me;
59313
59398
  return /* @__PURE__ */ B(ko, {
59314
59399
  open: e,
59315
59400
  onOpenChange: h ? void 0 : t,
@@ -59367,7 +59452,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59367
59452
  }) : /* @__PURE__ */ B(ls, {
59368
59453
  width: 16,
59369
59454
  height: 16,
59370
- onClick: () => le(r, te),
59455
+ onClick: () => de(r, te),
59371
59456
  className: "cursor-pointer"
59372
59457
  })]
59373
59458
  }), /* @__PURE__ */ B("p", {
@@ -59396,12 +59481,9 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59396
59481
  children: "Spender Address"
59397
59482
  }), /* @__PURE__ */ V("div", {
59398
59483
  className: "flex flex-row items-center gap-1",
59399
- children: [/* @__PURE__ */ B(cs, {
59400
- className: "h-3 w-3 flex-shrink-0",
59401
- stroke: "currentColor"
59402
- }), /* @__PURE__ */ B("p", {
59484
+ children: [/* @__PURE__ */ B(kU, { src: ne[i] }), /* @__PURE__ */ B("p", {
59403
59485
  className: "break-all text-base font-normal leading-[150%]",
59404
- children: I[i] || ce(i)
59486
+ children: I[i] || ue(i)
59405
59487
  })]
59406
59488
  })]
59407
59489
  })
@@ -59417,7 +59499,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59417
59499
  children: "Network"
59418
59500
  }), /* @__PURE__ */ V("div", {
59419
59501
  className: "flex flex-row items-center gap-1",
59420
- children: [ae, /* @__PURE__ */ B("p", {
59502
+ children: [se, /* @__PURE__ */ B("p", {
59421
59503
  className: "text-base font-normal leading-[150%]",
59422
59504
  children: l
59423
59505
  })]
@@ -59436,13 +59518,13 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59436
59518
  })
59437
59519
  ]
59438
59520
  }),
59439
- de > 0 && /* @__PURE__ */ V("div", {
59521
+ pe > 0 && /* @__PURE__ */ V("div", {
59440
59522
  className: "flex flex-col gap-2",
59441
59523
  children: [/* @__PURE__ */ V("p", {
59442
59524
  className: "text-foreground px-1 text-sm font-bold",
59443
59525
  children: [
59444
59526
  "Spend Permissions (",
59445
- de,
59527
+ pe,
59446
59528
  ")"
59447
59529
  ]
59448
59530
  }), /* @__PURE__ */ B("div", {
@@ -59485,7 +59567,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59485
59567
  children: "Token"
59486
59568
  }), /* @__PURE__ */ B("p", {
59487
59569
  className: "text-foreground text-base font-normal leading-[150%]",
59488
- children: sU(e.tokenAddress) ? `Native (${P})` : e.token
59570
+ children: hU(e.tokenAddress) ? `Native (${P})` : e.token
59489
59571
  })]
59490
59572
  })
59491
59573
  ]
@@ -59493,13 +59575,13 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59493
59575
  }, t))
59494
59576
  })]
59495
59577
  }),
59496
- fe > 0 && /* @__PURE__ */ V("div", {
59578
+ me > 0 && /* @__PURE__ */ V("div", {
59497
59579
  className: "flex flex-col gap-2",
59498
59580
  children: [/* @__PURE__ */ V("p", {
59499
59581
  className: "text-foreground px-1 text-sm font-bold",
59500
59582
  children: [
59501
59583
  "Call Permissions (",
59502
- fe,
59584
+ me,
59503
59585
  ")"
59504
59586
  ]
59505
59587
  }), /* @__PURE__ */ B("div", {
@@ -59513,16 +59595,22 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59513
59595
  children: "Function"
59514
59596
  }), /* @__PURE__ */ B("code", {
59515
59597
  className: "text-foreground break-all font-mono text-sm leading-[150%]",
59516
- children: se(e.functionSignature, e.selector)
59598
+ children: le(e.functionSignature, e.selector)
59517
59599
  })]
59518
59600
  }), /* @__PURE__ */ V("div", {
59519
59601
  className: "flex flex-col gap-0.5",
59520
59602
  children: [/* @__PURE__ */ B("p", {
59521
59603
  className: "text-muted-foreground text-xs font-bold leading-[133%]",
59522
59604
  children: "Contract"
59523
- }), /* @__PURE__ */ B("p", {
59524
- className: "text-foreground break-all font-mono text-sm leading-[150%]",
59525
- children: oe(e.target) || I[e.target] || e.target
59605
+ }), /* @__PURE__ */ V("div", {
59606
+ className: "flex flex-row items-center gap-1",
59607
+ children: [/* @__PURE__ */ B(kU, {
59608
+ src: ne[e.target],
59609
+ fallback: null
59610
+ }), /* @__PURE__ */ B("p", {
59611
+ className: "text-foreground break-all font-mono text-sm leading-[150%]",
59612
+ children: ce(e.target) || I[e.target] || e.target
59613
+ })]
59526
59614
  })]
59527
59615
  })]
59528
59616
  }, t))
@@ -59567,7 +59655,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59567
59655
  children: "Warning"
59568
59656
  }), /* @__PURE__ */ B("p", {
59569
59657
  className: "text-warning-foreground text-xs font-normal leading-[150%]",
59570
- children: y || `You are granting ${pe} permission${pe > 1 ? "s" : ""} to this dApp until ${c}. Only approve if you trust this dApp.`
59658
+ children: y || `You are granting ${he} permission${he > 1 ? "s" : ""} to this dApp until ${c}. Only approve if you trust this dApp.`
59571
59659
  })]
59572
59660
  })]
59573
59661
  }) : /* @__PURE__ */ V("div", {
@@ -59630,7 +59718,7 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59630
59718
  children: "Network"
59631
59719
  }), /* @__PURE__ */ V("div", {
59632
59720
  className: "flex flex-row items-center gap-1",
59633
- children: [ae, /* @__PURE__ */ B("p", {
59721
+ children: [se, /* @__PURE__ */ B("p", {
59634
59722
  className: "truncate text-ellipsis text-base font-normal leading-[150%]",
59635
59723
  children: l
59636
59724
  })]
@@ -59760,15 +59848,15 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59760
59848
  }), /* @__PURE__ */ B($o, {
59761
59849
  variant: n === "revoke" ? "destructive" : "default",
59762
59850
  onClick: p,
59763
- disabled: !ue,
59851
+ disabled: !fe,
59764
59852
  className: "flex-1",
59765
- children: h ? "Processing..." : _ || ne || x ? "Loading..." : n === "grant" ? "Accept" : "Revoke"
59853
+ children: h ? "Processing..." : _ || ie || x ? "Loading..." : n === "grant" ? "Accept" : "Revoke"
59766
59854
  })]
59767
59855
  })]
59768
59856
  })]
59769
59857
  })
59770
59858
  });
59771
- }, RU = class extends Le {
59859
+ }, YU = class extends Le {
59772
59860
  constructor(e) {
59773
59861
  let { docsPath: t, field: n, metaMessages: r } = e;
59774
59862
  super(`Invalid Sign-In with Ethereum message field "${n}".`, {
@@ -59780,9 +59868,9 @@ var CU = ({ display: e, chainId: t, mainnetRpcUrl: n }) => {
59780
59868
  };
59781
59869
  //#endregion
59782
59870
  //#region ../../node_modules/viem/_esm/utils/siwe/utils.js
59783
- function zU(e) {
59871
+ function XU(e) {
59784
59872
  if (/[^a-z0-9:/?#[\]@!$&'()*+,;=.\-_~%]/i.test(e) || /%[^0-9a-f]/i.test(e) || /%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)) return !1;
59785
- let t = BU(e), n = t[1], r = t[2], i = t[3], a = t[4], o = t[5];
59873
+ let t = ZU(e), n = t[1], r = t[2], i = t[3], a = t[4], o = t[5];
59786
59874
  if (!(n?.length && i.length >= 0)) return !1;
59787
59875
  if (r?.length) {
59788
59876
  if (!(i.length === 0 || /^\//.test(i))) return !1;
@@ -59791,15 +59879,15 @@ function zU(e) {
59791
59879
  let s = "";
59792
59880
  return s += `${n}:`, r?.length && (s += `//${r}`), s += i, a?.length && (s += `?${a}`), o?.length && (s += `#${o}`), s;
59793
59881
  }
59794
- function BU(e) {
59882
+ function ZU(e) {
59795
59883
  return e.match(/(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);
59796
59884
  }
59797
59885
  //#endregion
59798
59886
  //#region ../../node_modules/viem/_esm/utils/siwe/createSiweMessage.js
59799
- function VU(e) {
59887
+ function QU(e) {
59800
59888
  let { chainId: t, domain: n, expirationTime: r, issuedAt: i = /* @__PURE__ */ new Date(), nonce: a, notBefore: o, requestId: s, resources: c, scheme: l, uri: u, version: d } = e;
59801
59889
  {
59802
- if (t !== Math.floor(t)) throw new RU({
59890
+ if (t !== Math.floor(t)) throw new YU({
59803
59891
  field: "chainId",
59804
59892
  metaMessages: [
59805
59893
  "- Chain ID must be a EIP-155 chain ID.",
@@ -59808,7 +59896,7 @@ function VU(e) {
59808
59896
  `Provided value: ${t}`
59809
59897
  ]
59810
59898
  });
59811
- if (!(HU.test(n) || UU.test(n) || WU.test(n))) throw new RU({
59899
+ if (!($U.test(n) || eW.test(n) || tW.test(n))) throw new YU({
59812
59900
  field: "domain",
59813
59901
  metaMessages: [
59814
59902
  "- Domain must be an RFC 3986 authority.",
@@ -59817,7 +59905,7 @@ function VU(e) {
59817
59905
  `Provided value: ${n}`
59818
59906
  ]
59819
59907
  });
59820
- if (!GU.test(a)) throw new RU({
59908
+ if (!nW.test(a)) throw new YU({
59821
59909
  field: "nonce",
59822
59910
  metaMessages: [
59823
59911
  "- Nonce must be at least 8 characters.",
@@ -59826,7 +59914,7 @@ function VU(e) {
59826
59914
  `Provided value: ${a}`
59827
59915
  ]
59828
59916
  });
59829
- if (!zU(u)) throw new RU({
59917
+ if (!XU(u)) throw new YU({
59830
59918
  field: "uri",
59831
59919
  metaMessages: [
59832
59920
  "- URI must be a RFC 3986 URI referring to the resource that is the subject of the signing.",
@@ -59835,7 +59923,7 @@ function VU(e) {
59835
59923
  `Provided value: ${u}`
59836
59924
  ]
59837
59925
  });
59838
- if (d !== "1") throw new RU({
59926
+ if (d !== "1") throw new YU({
59839
59927
  field: "version",
59840
59928
  metaMessages: [
59841
59929
  "- Version must be '1'.",
@@ -59843,7 +59931,7 @@ function VU(e) {
59843
59931
  `Provided value: ${d}`
59844
59932
  ]
59845
59933
  });
59846
- if (l && !KU.test(l)) throw new RU({
59934
+ if (l && !rW.test(l)) throw new YU({
59847
59935
  field: "scheme",
59848
59936
  metaMessages: [
59849
59937
  "- Scheme must be an RFC 3986 URI scheme.",
@@ -59853,7 +59941,7 @@ function VU(e) {
59853
59941
  ]
59854
59942
  });
59855
59943
  let r = e.statement;
59856
- if (r?.includes("\n")) throw new RU({
59944
+ if (r?.includes("\n")) throw new YU({
59857
59945
  field: "statement",
59858
59946
  metaMessages: [
59859
59947
  "- Statement must not include '\\n'.",
@@ -59866,7 +59954,7 @@ function VU(e) {
59866
59954
  if (r && (m += `\nExpiration Time: ${r.toISOString()}`), o && (m += `\nNot Before: ${o.toISOString()}`), s && (m += `\nRequest ID: ${s}`), c) {
59867
59955
  let e = "\nResources:";
59868
59956
  for (let t of c) {
59869
- if (!zU(t)) throw new RU({
59957
+ if (!XU(t)) throw new YU({
59870
59958
  field: "resources",
59871
59959
  metaMessages: [
59872
59960
  "- Every resource must be a RFC 3986 URI.",
@@ -59881,7 +59969,7 @@ function VU(e) {
59881
59969
  }
59882
59970
  return `${p}\n${m}`;
59883
59971
  }
59884
- var HU = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1,5})?$/, UU = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:[0-9]{1,5})?$/, WU = /^localhost(:[0-9]{1,5})?$/, GU = /^[a-zA-Z0-9]{8,}$/, KU = /^([a-zA-Z][a-zA-Z0-9+-.]*)$/, qU = Object.freeze({
59972
+ var $U = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1,5})?$/, eW = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:[0-9]{1,5})?$/, tW = /^localhost(:[0-9]{1,5})?$/, nW = /^[a-zA-Z0-9]{8,}$/, rW = /^([a-zA-Z][a-zA-Z0-9+-.]*)$/, iW = Object.freeze({
59885
59973
  "--jaw-color-background": "oklch(1 0 0)",
59886
59974
  "--jaw-color-foreground": "oklch(0.145 0 0)",
59887
59975
  "--jaw-color-card": "oklch(1 0 0)",
@@ -59907,7 +59995,7 @@ var HU = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1
59907
59995
  "--jaw-color-warning-foreground": "oklch(0.205 0 0)",
59908
59996
  "--jaw-color-info": "oklch(0.623 0.214 259.815)",
59909
59997
  "--jaw-color-info-foreground": "oklch(0.985 0 0)"
59910
- }), JU = Object.freeze({
59998
+ }), aW = Object.freeze({
59911
59999
  "--jaw-color-background": "oklch(0.178 0 0)",
59912
60000
  "--jaw-color-foreground": "oklch(0.985 0 0)",
59913
60001
  "--jaw-color-card": "oklch(0.215 0 0)",
@@ -59933,21 +60021,21 @@ var HU = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1
59933
60021
  "--jaw-color-warning-foreground": "oklch(0.920 0.150 80)",
59934
60022
  "--jaw-color-info": "oklch(0.623 0.214 259.815)",
59935
60023
  "--jaw-color-info-foreground": "oklch(0.985 0 0)"
59936
- }), YU = Object.freeze({
60024
+ }), oW = Object.freeze({
59937
60025
  sm: "0.375rem",
59938
60026
  md: "0.625rem",
59939
60027
  lg: "1rem"
59940
- }), XU = Object.freeze({
60028
+ }), sW = Object.freeze({
59941
60029
  system: "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
59942
60030
  rounded: "\"Nunito\", \"SF Pro Rounded\", ui-rounded, \"Hiragino Maru Gothic ProN\", sans-serif",
59943
60031
  mono: "ui-monospace, \"SF Mono\", \"Cascadia Code\", \"Segoe UI Mono\", Menlo, Consolas, monospace"
59944
60032
  });
59945
60033
  //#endregion
59946
60034
  //#region src/theme/palette.ts
59947
- function ZU(e) {
60035
+ function cW(e) {
59948
60036
  return e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
59949
60037
  }
59950
- function QU(e) {
60038
+ function lW(e) {
59951
60039
  let t = e.replace(/^#/, "");
59952
60040
  if (t.length !== 6 && t.length !== 3) throw Error(`Invalid hex color: ${e}`);
59953
60041
  let n = t.length === 3 ? t[0] + t[0] + t[1] + t[1] + t[2] + t[2] : t;
@@ -59957,14 +60045,14 @@ function QU(e) {
59957
60045
  parseInt(n.slice(4, 6), 16) / 255
59958
60046
  ];
59959
60047
  }
59960
- function $U(e, t, n) {
60048
+ function uW(e, t, n) {
59961
60049
  return [
59962
60050
  .4124564 * e + .3575761 * t + .1804375 * n,
59963
60051
  .2126729 * e + .7151522 * t + .072175 * n,
59964
60052
  .0193339 * e + .119192 * t + .9503041 * n
59965
60053
  ];
59966
60054
  }
59967
- function eW(e, t, n) {
60055
+ function dW(e, t, n) {
59968
60056
  let r = .8189330101 * e + .3618667424 * t - .1288597137 * n, i = .0329845436 * e + .9293118715 * t + .0361456387 * n, a = .0482003018 * e + .2643662691 * t + .633851707 * n, o = Math.cbrt(r), s = Math.cbrt(i), c = Math.cbrt(a);
59969
60057
  return [
59970
60058
  .2104542553 * o + .793617785 * s - .0040720468 * c,
@@ -59972,7 +60060,7 @@ function eW(e, t, n) {
59972
60060
  .0259040371 * o + .7827717662 * s - .808675766 * c
59973
60061
  ];
59974
60062
  }
59975
- function tW(e, t, n) {
60063
+ function fW(e, t, n) {
59976
60064
  let r = Math.sqrt(t * t + n * n), i = Math.atan2(n, t) * 180 / Math.PI;
59977
60065
  return i < 0 && (i += 360), {
59978
60066
  l: e,
@@ -59980,25 +60068,25 @@ function tW(e, t, n) {
59980
60068
  h: i
59981
60069
  };
59982
60070
  }
59983
- function nW(e) {
59984
- let [t, n, r] = QU(e), [i, a, o] = $U(ZU(t), ZU(n), ZU(r)), [s, c, l] = eW(i, a, o);
59985
- return tW(s, c, l);
60071
+ function pW(e) {
60072
+ let [t, n, r] = lW(e), [i, a, o] = uW(cW(t), cW(n), cW(r)), [s, c, l] = dW(i, a, o);
60073
+ return fW(s, c, l);
59986
60074
  }
59987
- function rW(e) {
60075
+ function mW(e) {
59988
60076
  return `oklch(${e.l.toFixed(3)} ${e.c.toFixed(3)} ${e.h.toFixed(1)})`;
59989
60077
  }
59990
- function iW(e, t, n) {
59991
- let r = nW(e), i = t === "dark" && r.l < .5 ? {
60078
+ function hW(e, t, n) {
60079
+ let r = pW(e), i = t === "dark" && r.l < .5 ? {
59992
60080
  l: Math.min(r.l + .15, .75),
59993
60081
  c: r.c,
59994
60082
  h: r.h
59995
- } : r, a = rW(i), o;
59996
- o = n ? rW(nW(n)) : i.l > .6 ? "oklch(0.205 0 0)" : "oklch(0.985 0 0)";
59997
- let s = rW({
60083
+ } : r, a = mW(i), o;
60084
+ o = n ? mW(pW(n)) : i.l > .6 ? "oklch(0.205 0 0)" : "oklch(0.985 0 0)";
60085
+ let s = mW({
59998
60086
  l: i.l,
59999
60087
  c: i.c * .5,
60000
60088
  h: i.h
60001
- }), c = rW({
60089
+ }), c = mW({
60002
60090
  l: t === "dark" ? .25 : .95,
60003
60091
  c: r.c * .15,
60004
60092
  h: r.h
@@ -60013,23 +60101,23 @@ function iW(e, t, n) {
60013
60101
  }
60014
60102
  //#endregion
60015
60103
  //#region src/theme/resolve-theme.ts
60016
- function aW(e, t) {
60017
- let n = e.mode === "light" || e.mode === "dark" ? e.mode : t, r = { ...n === "dark" ? JU : qU };
60104
+ function gW(e, t) {
60105
+ let n = e.mode === "light" || e.mode === "dark" ? e.mode : t, r = { ...n === "dark" ? aW : iW };
60018
60106
  if (e.accentColor) try {
60019
- let t = iW(e.accentColor, n, e.accentColorForeground);
60107
+ let t = hW(e.accentColor, n, e.accentColorForeground);
60020
60108
  Object.assign(r, t);
60021
60109
  } catch {}
60022
60110
  if (e.accentColorForeground && !e.accentColor) try {
60023
- r["--jaw-color-primary-foreground"] = rW(nW(e.accentColorForeground));
60111
+ r["--jaw-color-primary-foreground"] = mW(pW(e.accentColorForeground));
60024
60112
  } catch {}
60025
- return e.borderRadius && (r["--jaw-radius"] = YU[e.borderRadius]), e.fontStack && (r["--jaw-font-family"] = XU[e.fontStack]), e.cssVariables && Object.assign(r, e.cssVariables), Object.freeze({
60113
+ return e.borderRadius && (r["--jaw-radius"] = oW[e.borderRadius]), e.fontStack && (r["--jaw-font-family"] = sW[e.fontStack]), e.cssVariables && Object.assign(r, e.cssVariables), Object.freeze({
60026
60114
  variables: Object.freeze(r),
60027
60115
  colorScheme: n
60028
60116
  });
60029
60117
  }
60030
60118
  //#endregion
60031
60119
  //#region src/theme/apply-theme.ts
60032
- var oW = {
60120
+ var _W = {
60033
60121
  "--jaw-color-background": "--background",
60034
60122
  "--jaw-color-foreground": "--foreground",
60035
60123
  "--jaw-color-card": "--card",
@@ -60056,12 +60144,12 @@ var oW = {
60056
60144
  "--jaw-color-info": "--info",
60057
60145
  "--jaw-color-info-foreground": "--info-foreground"
60058
60146
  };
60059
- function sW(e, t) {
60147
+ function vW(e, t) {
60060
60148
  let n = Object.entries(t.variables);
60061
60149
  for (let t = 0; t < n.length; t++) {
60062
60150
  let [r, i] = n[t];
60063
60151
  e.style.setProperty(r, i);
60064
- let a = oW[r];
60152
+ let a = _W[r];
60065
60153
  a && e.style.setProperty(a, i);
60066
60154
  }
60067
60155
  let r = t.variables["--jaw-radius"];
@@ -60071,19 +60159,19 @@ function sW(e, t) {
60071
60159
  }
60072
60160
  //#endregion
60073
60161
  //#region src/theme/use-color-scheme.ts
60074
- var cW = "(prefers-color-scheme: dark)";
60075
- function lW() {
60162
+ var yW = "(prefers-color-scheme: dark)";
60163
+ function bW() {
60076
60164
  if (typeof window > "u") return "light";
60077
60165
  let e = document.documentElement;
60078
- return e.classList.contains("dark") ? "dark" : e.classList.contains("light") ? "light" : window.matchMedia(cW).matches ? "dark" : "light";
60166
+ return e.classList.contains("dark") ? "dark" : e.classList.contains("light") ? "light" : window.matchMedia(yW).matches ? "dark" : "light";
60079
60167
  }
60080
- function uW() {
60081
- let [e, t] = z(lW);
60168
+ function xW() {
60169
+ let [e, t] = z(bW);
60082
60170
  return at(() => {
60083
60171
  if (typeof window > "u") return;
60084
60172
  let e = () => {
60085
- t(lW());
60086
- }, n = window.matchMedia(cW);
60173
+ t(bW());
60174
+ }, n = window.matchMedia(yW);
60087
60175
  n.addEventListener("change", e);
60088
60176
  let r = new MutationObserver(e);
60089
60177
  return r.observe(document.documentElement, {
@@ -60096,16 +60184,16 @@ function uW() {
60096
60184
  }
60097
60185
  //#endregion
60098
60186
  //#region src/react/ReactUIHandler.tsx
60099
- function dW(e) {
60187
+ function SW(e) {
60100
60188
  let t = e.startsWith("0x") ? e.slice(2) : e, n = new Uint8Array(t.length / 2);
60101
60189
  for (let e = 0; e < t.length; e += 2) n[e / 2] = parseInt(t.slice(e, e + 2), 16);
60102
60190
  return new TextDecoder().decode(n);
60103
60191
  }
60104
- function fW(e) {
60192
+ function CW(e) {
60105
60193
  if (!e) return !1;
60106
60194
  try {
60107
60195
  let t = e;
60108
- e.startsWith("0x") && (t = dW(e));
60196
+ e.startsWith("0x") && (t = SW(e));
60109
60197
  let n = t.includes("wants you to sign in with your Ethereum account");
60110
60198
  if (!n) return !1;
60111
60199
  let r = /URI:\s*.+/.test(t), i = /Version:\s*1/.test(t), a = /Chain ID:\s*\d+/.test(t), o = /Nonce:\s*[a-zA-Z0-9]{8,}/.test(t), s = /Issued At:\s*.+/.test(t);
@@ -60114,10 +60202,10 @@ function fW(e) {
60114
60202
  return console.error("Error checking if message is SIWE:", e), !1;
60115
60203
  }
60116
60204
  }
60117
- function pW(e) {
60205
+ function wW(e) {
60118
60206
  return ue.find((t) => t.id === e)?.name || "Unknown Network";
60119
60207
  }
60120
- var mW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
60208
+ var TW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
60121
60209
  day: "2-digit",
60122
60210
  month: "2-digit",
60123
60211
  year: "numeric",
@@ -60125,18 +60213,18 @@ var mW = (e) => (/* @__PURE__ */ new Date(e * 1e3)).toLocaleString("en-US", {
60125
60213
  minute: "2-digit",
60126
60214
  second: "2-digit",
60127
60215
  hour12: !1
60128
- }), hW = ko;
60129
- function gW({ theme: e, container: t }) {
60130
- let n = uW();
60216
+ }), EW = ko;
60217
+ function DW({ theme: e, container: t }) {
60218
+ let n = xW();
60131
60219
  return at(() => {
60132
- (!e.mode || e.mode === "auto") && sW(t, aW(e, n));
60220
+ (!e.mode || e.mode === "auto") && vW(t, gW(e, n));
60133
60221
  }, [
60134
60222
  n,
60135
60223
  e,
60136
60224
  t
60137
60225
  ]), null;
60138
60226
  }
60139
- var _W = class {
60227
+ var OW = class {
60140
60228
  config = {};
60141
60229
  localTheme;
60142
60230
  constructor(e) {
@@ -60179,7 +60267,7 @@ var _W = class {
60179
60267
  WebkitFontSmoothing: "antialiased",
60180
60268
  MozOsxFontSmoothing: "grayscale",
60181
60269
  WebkitTapHighlightColor: "transparent"
60182
- }), sW(n, aW(this.effectiveTheme, lW())), document.body.appendChild(n);
60270
+ }), vW(n, gW(this.effectiveTheme, bW())), document.body.appendChild(n);
60183
60271
  let r = ft(n), i = () => {
60184
60272
  try {
60185
60273
  document.body.style.removeProperty("pointer-events"), r.unmount(), n.parentNode && n.parentNode.removeChild(n);
@@ -60199,7 +60287,7 @@ var _W = class {
60199
60287
  error: n || kR.userRejected()
60200
60288
  });
60201
60289
  }), o = this.effectiveTheme;
60202
- r.render(et.createElement(So.Provider, { value: n }, et.createElement(gW, {
60290
+ r.render(et.createElement(So.Provider, { value: n }, et.createElement(DW, {
60203
60291
  theme: o,
60204
60292
  container: n
60205
60293
  }), a));
@@ -60227,7 +60315,7 @@ var _W = class {
60227
60315
  }
60228
60316
  renderDialog(e, t, n) {
60229
60317
  switch (e.type) {
60230
- case "wallet_connect": return /* @__PURE__ */ B(xW, {
60318
+ case "wallet_connect": return /* @__PURE__ */ B(MW, {
60231
60319
  request: e,
60232
60320
  onApprove: t,
60233
60321
  onReject: n,
@@ -60238,14 +60326,14 @@ var _W = class {
60238
60326
  });
60239
60327
  case "personal_sign": {
60240
60328
  let r = e;
60241
- return fW(r.data.message) ? /* @__PURE__ */ B(kW, {
60329
+ return CW(r.data.message) ? /* @__PURE__ */ B(BW, {
60242
60330
  request: r,
60243
60331
  onApprove: t,
60244
60332
  onReject: n,
60245
60333
  apiKey: this.config.apiKey,
60246
60334
  defaultChainId: this.config.defaultChainId,
60247
60335
  paymasters: this.config.paymasters
60248
- }) : /* @__PURE__ */ B(SW, {
60336
+ }) : /* @__PURE__ */ B(NW, {
60249
60337
  request: r,
60250
60338
  onApprove: t,
60251
60339
  onReject: n,
@@ -60258,7 +60346,7 @@ var _W = class {
60258
60346
  let r = e, i = r.data.request.type;
60259
60347
  if (i === "0x45") {
60260
60348
  let e = r.data.request.data.message;
60261
- return fW(e) ? /* @__PURE__ */ B(kW, {
60349
+ return CW(e) ? /* @__PURE__ */ B(BW, {
60262
60350
  request: {
60263
60351
  ...r,
60264
60352
  type: "personal_sign",
@@ -60273,7 +60361,7 @@ var _W = class {
60273
60361
  apiKey: this.config.apiKey,
60274
60362
  defaultChainId: this.config.defaultChainId,
60275
60363
  paymasters: this.config.paymasters
60276
- }) : /* @__PURE__ */ B(SW, {
60364
+ }) : /* @__PURE__ */ B(NW, {
60277
60365
  request: {
60278
60366
  ...r,
60279
60367
  type: "personal_sign",
@@ -60291,7 +60379,7 @@ var _W = class {
60291
60379
  });
60292
60380
  } else if (i === "0x01") {
60293
60381
  let e = r.data.request.data, i = typeof e == "string" ? e : JSON.stringify(e);
60294
- return /* @__PURE__ */ B(CW, {
60382
+ return /* @__PURE__ */ B(PW, {
60295
60383
  request: {
60296
60384
  ...r,
60297
60385
  type: "eth_signTypedData_v4",
@@ -60307,12 +60395,12 @@ var _W = class {
60307
60395
  defaultChainId: this.config.defaultChainId,
60308
60396
  paymasters: this.config.paymasters
60309
60397
  });
60310
- } else return /* @__PURE__ */ B(jW, {
60398
+ } else return /* @__PURE__ */ B(HW, {
60311
60399
  method: `wallet_sign (type: ${i})`,
60312
60400
  onReject: n
60313
60401
  });
60314
60402
  }
60315
- case "eth_signTypedData_v4": return /* @__PURE__ */ B(CW, {
60403
+ case "eth_signTypedData_v4": return /* @__PURE__ */ B(PW, {
60316
60404
  request: e,
60317
60405
  onApprove: t,
60318
60406
  onReject: n,
@@ -60320,7 +60408,7 @@ var _W = class {
60320
60408
  defaultChainId: this.config.defaultChainId,
60321
60409
  paymasters: this.config.paymasters
60322
60410
  });
60323
- case "wallet_sendCalls": return /* @__PURE__ */ B(wW, {
60411
+ case "wallet_sendCalls": return /* @__PURE__ */ B(FW, {
60324
60412
  request: e,
60325
60413
  onApprove: t,
60326
60414
  onReject: n,
@@ -60328,7 +60416,7 @@ var _W = class {
60328
60416
  defaultChainId: this.config.defaultChainId,
60329
60417
  paymasters: this.config.paymasters
60330
60418
  });
60331
- case "eth_sendTransaction": return /* @__PURE__ */ B(TW, {
60419
+ case "eth_sendTransaction": return /* @__PURE__ */ B(IW, {
60332
60420
  request: e,
60333
60421
  onApprove: t,
60334
60422
  onReject: n,
@@ -60336,7 +60424,7 @@ var _W = class {
60336
60424
  defaultChainId: this.config.defaultChainId,
60337
60425
  paymasters: this.config.paymasters
60338
60426
  });
60339
- case "wallet_grantPermissions": return /* @__PURE__ */ B(OW, {
60427
+ case "wallet_grantPermissions": return /* @__PURE__ */ B(zW, {
60340
60428
  request: e,
60341
60429
  onApprove: t,
60342
60430
  onReject: n,
@@ -60344,7 +60432,7 @@ var _W = class {
60344
60432
  defaultChainId: this.config.defaultChainId,
60345
60433
  paymasters: this.config.paymasters
60346
60434
  });
60347
- case "wallet_revokePermissions": return /* @__PURE__ */ B(AW, {
60435
+ case "wallet_revokePermissions": return /* @__PURE__ */ B(VW, {
60348
60436
  request: e,
60349
60437
  onApprove: t,
60350
60438
  onReject: n,
@@ -60352,24 +60440,24 @@ var _W = class {
60352
60440
  defaultChainId: this.config.defaultChainId,
60353
60441
  paymasters: this.config.paymasters
60354
60442
  });
60355
- default: return /* @__PURE__ */ B(jW, {
60443
+ default: return /* @__PURE__ */ B(HW, {
60356
60444
  method: e.type,
60357
60445
  onReject: n
60358
60446
  });
60359
60447
  }
60360
60448
  }
60361
60449
  };
60362
- function vW(e, t, n) {
60450
+ function kW(e, t, n) {
60363
60451
  return {
60364
60452
  id: e,
60365
60453
  rpcUrl: t ? `${S}?chainId=${e}&api-key=${t}` : `${S}?chainId=${e}`,
60366
60454
  ...n && { paymaster: { url: n } }
60367
60455
  };
60368
60456
  }
60369
- function yW(e) {
60457
+ function AW(e) {
60370
60458
  return e ? `${S}?chainId=1&api-key=${e}` : `${S}?chainId=1`;
60371
60459
  }
60372
- async function bW(e, t, n) {
60460
+ async function jW(e, t, n) {
60373
60461
  if (!e) throw Error("API key is required for signing operations");
60374
60462
  let r = t || 1;
60375
60463
  return await rz.get({
@@ -60378,8 +60466,8 @@ async function bW(e, t, n) {
60378
60466
  paymasterUrl: n
60379
60467
  });
60380
60468
  }
60381
- function xW({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId: a, paymasters: o, ens: s }) {
60382
- let [c, l] = z(!0), [u, d] = z([]), [f, p] = z(null), [m, h] = z(!1), [g, _] = z(!1), [v, y] = z(!1), [b, x] = z(null), [S, C] = z(null), [w, T] = z(!1), [E, D] = z(!1), [O, k] = z(""), A = typeof window < "u" ? window.location.hostname : "localhost", j = typeof window < "u" ? window.location.origin : "unknown", M = e.data.chainId || a || 1, N = pW(M), P = dz(M, i, 24);
60469
+ function MW({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId: a, paymasters: o, ens: s }) {
60470
+ let [c, l] = z(!0), [u, d] = z([]), [f, p] = z(null), [m, h] = z(!1), [g, _] = z(!1), [v, y] = z(!1), [b, x] = z(null), [S, C] = z(null), [w, T] = z(!1), [E, D] = z(!1), [O, k] = z(""), A = typeof window < "u" ? window.location.hostname : "localhost", j = typeof window < "u" ? window.location.origin : "unknown", M = e.data.chainId || a || 1, N = wW(M), P = dz(M, i, 24);
60383
60471
  at(() => {
60384
60472
  d(rz.getStoredAccounts(i).map((e) => ({
60385
60473
  username: e.username,
@@ -60490,7 +60578,7 @@ function xW({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
60490
60578
  } catch {
60491
60579
  e = j, t = j;
60492
60580
  }
60493
- return VU({
60581
+ return QU({
60494
60582
  address: S,
60495
60583
  chainId: n(se.chainId),
60496
60584
  domain: se.domain || e,
@@ -60515,7 +60603,7 @@ function xW({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
60515
60603
  if (!(!S || !ce)) {
60516
60604
  D(!0), k("Signing message...");
60517
60605
  try {
60518
- let e = await (await bW(i, M, o?.[M]?.url)).signMessage(ce);
60606
+ let e = await (await jW(i, M, o?.[M]?.url)).signMessage(ce);
60519
60607
  k("Sign-in successful!"), t({ accounts: [{
60520
60608
  address: S,
60521
60609
  capabilities: { signInWithEthereum: {
@@ -60531,7 +60619,7 @@ function xW({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
60531
60619
  E || (y(!1), x(null), C(null), p(null), k(""));
60532
60620
  };
60533
60621
  if (v && S && se) if (!ce) console.error("SIWE capability present but message could not be built");
60534
- else return /* @__PURE__ */ B(OU, {
60622
+ else return /* @__PURE__ */ B(zU, {
60535
60623
  open: !0,
60536
60624
  onOpenChange: (e) => {
60537
60625
  e || de();
@@ -60545,14 +60633,14 @@ function xW({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
60545
60633
  chainName: N,
60546
60634
  chainId: M,
60547
60635
  chainIcon: P,
60548
- mainnetRpcUrl: yW(i),
60636
+ mainnetRpcUrl: AW(i),
60549
60637
  onSign: le,
60550
60638
  onCancel: de,
60551
60639
  isProcessing: E,
60552
60640
  siweStatus: O,
60553
60641
  canSign: !E
60554
60642
  });
60555
- return v && S ? /* @__PURE__ */ B(kU, {
60643
+ return v && S ? /* @__PURE__ */ B(BU, {
60556
60644
  open: !0,
60557
60645
  onOpenChange: (e) => {
60558
60646
  e || te();
@@ -60566,12 +60654,12 @@ function xW({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
60566
60654
  chainName: N,
60567
60655
  chainId: M,
60568
60656
  chainIcon: P,
60569
- mainnetRpcUrl: yW(i),
60657
+ mainnetRpcUrl: AW(i),
60570
60658
  onConnect: async () => F(),
60571
60659
  onCancel: te,
60572
60660
  showPermissions: !1,
60573
60661
  isProcessing: w
60574
- }) : /* @__PURE__ */ B(hW, {
60662
+ }) : /* @__PURE__ */ B(EW, {
60575
60663
  open: c,
60576
60664
  onOpenChange: (e) => {
60577
60665
  e ? l(e) : ee();
@@ -60591,18 +60679,18 @@ function xW({ request: e, onApprove: t, onReject: r, apiKey: i, defaultChainId:
60591
60679
  isCreating: g,
60592
60680
  ensDomain: ie,
60593
60681
  chainId: ae,
60594
- mainnetRpcUrl: yW(i),
60682
+ mainnetRpcUrl: AW(i),
60595
60683
  apiKey: i,
60596
60684
  supportedChains: ue.map((e) => ({ id: e.id })),
60597
60685
  subnameTextRecords: oe
60598
60686
  })
60599
60687
  });
60600
60688
  }
60601
- function SW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
60602
- let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = pW(f), m = dz(f, r, 24), h = async () => {
60689
+ function NW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
60690
+ let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = wW(f), m = dz(f, r, 24), h = async () => {
60603
60691
  l(!0), d("Signing message...");
60604
60692
  try {
60605
- let n = await (await bW(r, f, a?.[f]?.url)).signMessage(e.data.message, { address: e.data.address });
60693
+ let n = await (await jW(r, f, a?.[f]?.url)).signMessage(e.data.message, { address: e.data.address });
60606
60694
  d("Signature successful!"), t(n);
60607
60695
  } catch (e) {
60608
60696
  console.error("Signature failed:", e);
@@ -60614,7 +60702,7 @@ function SW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60614
60702
  }, g = () => {
60615
60703
  s(!1), n(kR.userRejected());
60616
60704
  };
60617
- return /* @__PURE__ */ B(DU, {
60705
+ return /* @__PURE__ */ B(RU, {
60618
60706
  open: o,
60619
60707
  onOpenChange: (e) => {
60620
60708
  e ? s(e) : g();
@@ -60626,7 +60714,7 @@ function SW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60626
60714
  chainName: p,
60627
60715
  chainId: f,
60628
60716
  chainIcon: m,
60629
- mainnetRpcUrl: yW(r),
60717
+ mainnetRpcUrl: AW(r),
60630
60718
  onSign: h,
60631
60719
  onCancel: g,
60632
60720
  isProcessing: c,
@@ -60634,11 +60722,11 @@ function SW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60634
60722
  canSign: !c && !!e.data.message
60635
60723
  });
60636
60724
  }
60637
- function CW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
60725
+ function PW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
60638
60726
  let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = async () => {
60639
60727
  l(!0), d("Signing typed data...");
60640
60728
  try {
60641
- let n = await bW(r, f, a?.[f]?.url), i = typeof e.data.typedData == "string" ? JSON.parse(e.data.typedData) : e.data.typedData, o = await n.signTypedData({
60729
+ let n = await jW(r, f, a?.[f]?.url), i = typeof e.data.typedData == "string" ? JSON.parse(e.data.typedData) : e.data.typedData, o = await n.signTypedData({
60642
60730
  domain: i.domain,
60643
60731
  types: i.types,
60644
60732
  primaryType: i.primaryType,
@@ -60655,7 +60743,7 @@ function CW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60655
60743
  }, m = () => {
60656
60744
  s(!1), n(kR.userRejected());
60657
60745
  };
60658
- return /* @__PURE__ */ B(IU, {
60746
+ return /* @__PURE__ */ B(qU, {
60659
60747
  open: o,
60660
60748
  onOpenChange: (e) => {
60661
60749
  e ? s(e) : m();
@@ -60664,7 +60752,7 @@ function CW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60664
60752
  origin: typeof window < "u" ? window.location.origin : "unknown",
60665
60753
  timestamp: new Date(e.timestamp),
60666
60754
  accountAddress: e.data.address,
60667
- mainnetRpcUrl: yW(r),
60755
+ mainnetRpcUrl: AW(r),
60668
60756
  onSign: p,
60669
60757
  onCancel: m,
60670
60758
  isProcessing: c,
@@ -60672,7 +60760,7 @@ function CW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60672
60760
  canSign: !0
60673
60761
  });
60674
60762
  }
60675
- function wW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
60763
+ function FW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
60676
60764
  let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(null), [f, p] = z(""), [m, h] = z([]), [g, _] = z(!1), v = e.data.chainId || i || 1, y = ue.find((e) => e.id === v), b = y?.name || "Unknown Network", S = gz(m?.find((e) => e.isNative)?.symbol || y?.nativeCurrency?.symbol || "ETH"), w = st(() => e.data.capabilities?.paymasterService?.url || a?.[v]?.url, [
60677
60765
  e.data.capabilities?.paymasterService?.url,
60678
60766
  a,
@@ -60743,9 +60831,9 @@ function wW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60743
60831
  t && _(!1);
60744
60832
  return;
60745
60833
  }
60746
- let o = vW(v, r).rpcUrl || y?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
60834
+ let o = kW(v, r).rpcUrl || y?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
60747
60835
  try {
60748
- let n = await cU(t.address, e.data.from, o), r = Ge(n, t.decimals), i = sU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
60836
+ let n = await gU(t.address, e.data.from, o), r = Ge(n, t.decimals), i = hU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
60749
60837
  return {
60750
60838
  uid: t.uid,
60751
60839
  symbol: t.symbol,
@@ -60765,7 +60853,7 @@ function wW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60765
60853
  decimals: t.decimals,
60766
60854
  balance: 0n,
60767
60855
  balanceFormatted: "0",
60768
- isNative: sU(t.address),
60856
+ isNative: hU(t.address),
60769
60857
  isSelectable: !1,
60770
60858
  logoURI: t.logoURI
60771
60859
  };
@@ -60790,7 +60878,7 @@ function wW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60790
60878
  let e = !0;
60791
60879
  return (async () => {
60792
60880
  try {
60793
- let t = await bW(r, v, w);
60881
+ let t = await jW(r, v, w);
60794
60882
  e && d(t);
60795
60883
  } catch (e) {
60796
60884
  console.error("Error initializing account:", e);
@@ -60825,7 +60913,7 @@ function wW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60825
60913
  }, ne = () => {
60826
60914
  s(!1), n(kR.userRejected());
60827
60915
  }, re = !E && m.some((e) => !e.isNative);
60828
- return /* @__PURE__ */ B(EU, {
60916
+ return /* @__PURE__ */ B(LU, {
60829
60917
  open: o,
60830
60918
  onOpenChange: (e) => {
60831
60919
  e ? s(e) : ne();
@@ -60841,7 +60929,7 @@ function wW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60841
60929
  isProcessing: c,
60842
60930
  transactionStatus: f,
60843
60931
  networkName: b,
60844
- mainnetRpcUrl: yW(r),
60932
+ mainnetRpcUrl: AW(r),
60845
60933
  apiKey: r,
60846
60934
  feeTokens: m,
60847
60935
  feeTokensLoading: g,
@@ -60852,7 +60940,7 @@ function wW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60852
60940
  nativeCurrencySymbol: y?.nativeCurrency?.symbol
60853
60941
  });
60854
60942
  }
60855
- function TW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
60943
+ function IW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
60856
60944
  let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(null), [f, p] = z(""), [m, h] = z([]), [g, _] = z(!1), v = e.data.chainId || i || 1, y = ue.find((e) => e.id === v), b = y?.name || "Unknown Network", S = gz(m?.find((e) => e.isNative)?.symbol || y?.nativeCurrency?.symbol || "ETH"), w = st(() => e.data.capabilities?.paymasterService?.url || a?.[v]?.url, [
60857
60945
  e.data.capabilities?.paymasterService?.url,
60858
60946
  a,
@@ -60922,9 +61010,9 @@ function TW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60922
61010
  t && _(!1);
60923
61011
  return;
60924
61012
  }
60925
- let o = vW(v, r).rpcUrl || y?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
61013
+ let o = kW(v, r).rpcUrl || y?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
60926
61014
  try {
60927
- let n = await cU(t.address, e.data.from, o), r = Ge(n, t.decimals), i = sU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
61015
+ let n = await gU(t.address, e.data.from, o), r = Ge(n, t.decimals), i = hU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
60928
61016
  return {
60929
61017
  uid: t.uid,
60930
61018
  symbol: t.symbol,
@@ -60944,7 +61032,7 @@ function TW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60944
61032
  decimals: t.decimals,
60945
61033
  balance: 0n,
60946
61034
  balanceFormatted: "0",
60947
- isNative: sU(t.address),
61035
+ isNative: hU(t.address),
60948
61036
  isSelectable: !1,
60949
61037
  logoURI: t.logoURI
60950
61038
  };
@@ -60969,7 +61057,7 @@ function TW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60969
61057
  let e = !0;
60970
61058
  return (async () => {
60971
61059
  try {
60972
- let t = await bW(r, v, w);
61060
+ let t = await jW(r, v, w);
60973
61061
  e && d(t);
60974
61062
  } catch (e) {
60975
61063
  console.error("Error initializing account:", e);
@@ -60998,7 +61086,7 @@ function TW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
60998
61086
  }, L = () => {
60999
61087
  s(!1), n(kR.userRejected());
61000
61088
  }, ne = !E && m.some((e) => !e.isNative);
61001
- return /* @__PURE__ */ B(EU, {
61089
+ return /* @__PURE__ */ B(LU, {
61002
61090
  open: o,
61003
61091
  onOpenChange: (e) => {
61004
61092
  e ? s(e) : L();
@@ -61014,7 +61102,7 @@ function TW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61014
61102
  isProcessing: c,
61015
61103
  transactionStatus: f,
61016
61104
  networkName: b,
61017
- mainnetRpcUrl: yW(r),
61105
+ mainnetRpcUrl: AW(r),
61018
61106
  apiKey: r,
61019
61107
  feeTokens: m,
61020
61108
  feeTokensLoading: g,
@@ -61025,7 +61113,7 @@ function TW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61025
61113
  nativeCurrencySymbol: y?.nativeCurrency?.symbol
61026
61114
  });
61027
61115
  }
61028
- var EW = {
61116
+ var LW = {
61029
61117
  "0x32323232": "Any Function",
61030
61118
  "0xe0e0e0e0": "Empty Calldata",
61031
61119
  "0xcc53287f": "lockdown((address,address)[])",
@@ -61033,8 +61121,8 @@ var EW = {
61033
61121
  "0x095ea7b3": "approve(address,uint256)",
61034
61122
  "0x23b872dd": "transferFrom(address,address,uint256)",
61035
61123
  "0xa9059cbb": "transfer(address,uint256)"
61036
- }, DW = (e) => EW[e.toLowerCase()] || e;
61037
- function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
61124
+ }, RW = (e) => LW[e.toLowerCase()] || e;
61125
+ function zW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
61038
61126
  let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), [f, p] = z({}), [m, h] = z(!0), [g, _] = z(null), [v, y] = z([]), [b, S] = z(!0), w = e.data.chainId, T = typeof w == "string" ? parseInt(w, w.startsWith("0x") ? 16 : 10) : w || i || 1, E = ue.find((e) => e.id === T), D = E?.name || "Unknown Network", O = v?.find((e) => e.isNative)?.symbol || E?.nativeCurrency?.symbol || "ETH", k = gz(O), A = st(() => e.data.capabilities?.paymasterService?.url || a?.[T]?.url, [
61039
61127
  e.data.capabilities?.paymasterService?.url,
61040
61128
  a,
@@ -61092,7 +61180,7 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61092
61180
  te,
61093
61181
  N,
61094
61182
  k
61095
- ]), ae = st(() => vW(T, r, re), [
61183
+ ]), ae = st(() => kW(T, r, re), [
61096
61184
  T,
61097
61185
  r,
61098
61186
  re
@@ -61110,7 +61198,7 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61110
61198
  t[e] = f[e];
61111
61199
  continue;
61112
61200
  }
61113
- if (sU(e)) {
61201
+ if (hU(e)) {
61114
61202
  t[e] = {
61115
61203
  decimals: E?.nativeCurrency?.decimals ?? 18,
61116
61204
  symbol: E?.nativeCurrency?.symbol || "ETH"
@@ -61187,9 +61275,9 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61187
61275
  t && S(!1);
61188
61276
  return;
61189
61277
  }
61190
- let o = vW(T, r).rpcUrl || E?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
61278
+ let o = kW(T, r).rpcUrl || E?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
61191
61279
  try {
61192
- let n = await cU(t.address, e.data.address, o), r = Ge(n, t.decimals), i = sU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
61280
+ let n = await gU(t.address, e.data.address, o), r = Ge(n, t.decimals), i = hU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
61193
61281
  return {
61194
61282
  uid: t.uid,
61195
61283
  symbol: t.symbol,
@@ -61209,7 +61297,7 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61209
61297
  decimals: t.decimals,
61210
61298
  balance: 0n,
61211
61299
  balanceFormatted: "0",
61212
- isNative: sU(t.address),
61300
+ isNative: hU(t.address),
61213
61301
  isSelectable: !1,
61214
61302
  logoURI: t.logoURI
61215
61303
  };
@@ -61234,7 +61322,7 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61234
61322
  let e = !0;
61235
61323
  return (async () => {
61236
61324
  try {
61237
- let t = await bW(r, T, A);
61325
+ let t = await jW(r, T, A);
61238
61326
  e && _(t);
61239
61327
  } catch (e) {
61240
61328
  console.error("[PermissionDialogWrapper] Error initializing account:", e);
@@ -61248,7 +61336,7 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61248
61336
  A
61249
61337
  ]);
61250
61338
  let ce = st(() => oe.map((e) => {
61251
- let t = f[e.token] || (sU(e.token) ? {
61339
+ let t = f[e.token] || (hU(e.token) ? {
61252
61340
  decimals: E?.nativeCurrency?.decimals ?? 18,
61253
61341
  symbol: O
61254
61342
  } : {
@@ -61257,7 +61345,7 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61257
61345
  }), n = Ge(BigInt(e.allowance), t.decimals), r = `${n} ${t.symbol}`, i = e.multiplier ?? 1, a = `${i} ${e.unit}${i > 1 ? "s" : ""}`;
61258
61346
  return {
61259
61347
  amount: n,
61260
- token: sU(e.token) ? `Native (${O})` : t.symbol,
61348
+ token: hU(e.token) ? `Native (${O})` : t.symbol,
61261
61349
  tokenAddress: e.token,
61262
61350
  duration: a,
61263
61351
  limit: r
@@ -61270,8 +61358,8 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61270
61358
  ]), le = st(() => se.map((e) => ({
61271
61359
  target: e.target,
61272
61360
  selector: e.selector,
61273
- functionSignature: e.functionSignature || (e.selector ? DW(e.selector) : "Unknown Function")
61274
- })), [se]), de = st(() => mW(e.data.expiry), [e.data.expiry]), fe = st(() => {
61361
+ functionSignature: e.functionSignature || (e.selector ? RW(e.selector) : "Unknown Function")
61362
+ })), [se]), de = st(() => TW(e.data.expiry), [e.data.expiry]), fe = st(() => {
61275
61363
  let e = [];
61276
61364
  if (ce.length > 0) {
61277
61365
  let t = ce.map((e) => {
@@ -61314,7 +61402,7 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61314
61402
  }, me = () => {
61315
61403
  s(!1), n(kR.userRejected());
61316
61404
  };
61317
- return /* @__PURE__ */ B(LU, {
61405
+ return /* @__PURE__ */ B(JU, {
61318
61406
  open: o,
61319
61407
  onOpenChange: (e) => {
61320
61408
  e ? s(e) : me();
@@ -61339,7 +61427,7 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61339
61427
  gasFeeLoading: ee,
61340
61428
  gasEstimationError: F,
61341
61429
  sponsored: M,
61342
- mainnetRpcUrl: yW(r),
61430
+ mainnetRpcUrl: AW(r),
61343
61431
  feeTokens: v,
61344
61432
  feeTokensLoading: b,
61345
61433
  selectedFeeToken: I,
@@ -61349,11 +61437,11 @@ function OW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61349
61437
  nativeCurrencySymbol: E?.nativeCurrency?.symbol
61350
61438
  });
61351
61439
  }
61352
- function kW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
61353
- let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = pW(f), m = dz(f, r, 24), h = typeof window < "u" ? window.location.origin : "unknown", g = st(() => {
61440
+ function BW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
61441
+ let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), f = e.data.chainId || i || 1, p = wW(f), m = dz(f, r, 24), h = typeof window < "u" ? window.location.origin : "unknown", g = st(() => {
61354
61442
  let t = e.data.message;
61355
61443
  if (t.startsWith("0x")) try {
61356
- return dW(t);
61444
+ return SW(t);
61357
61445
  } catch {
61358
61446
  return t;
61359
61447
  }
@@ -61371,7 +61459,7 @@ function kW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61371
61459
  }, [g]), y = async () => {
61372
61460
  l(!0), d("Signing message...");
61373
61461
  try {
61374
- let n = await (await bW(r, f, a?.[f]?.url)).signMessage(e.data.message);
61462
+ let n = await (await jW(r, f, a?.[f]?.url)).signMessage(e.data.message);
61375
61463
  d("Sign-in successful!"), t(n);
61376
61464
  } catch (e) {
61377
61465
  console.error("SIWE signature failed:", e);
@@ -61383,7 +61471,7 @@ function kW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61383
61471
  }, b = () => {
61384
61472
  s(!1), n(kR.userRejected());
61385
61473
  };
61386
- return /* @__PURE__ */ B(OU, {
61474
+ return /* @__PURE__ */ B(zU, {
61387
61475
  open: o,
61388
61476
  onOpenChange: (e) => {
61389
61477
  e ? s(e) : b();
@@ -61396,7 +61484,7 @@ function kW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61396
61484
  chainName: p,
61397
61485
  chainId: f,
61398
61486
  chainIcon: m,
61399
- mainnetRpcUrl: yW(r),
61487
+ mainnetRpcUrl: AW(r),
61400
61488
  onSign: y,
61401
61489
  onCancel: b,
61402
61490
  isProcessing: c,
@@ -61405,7 +61493,7 @@ function kW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61405
61493
  warningMessage: v
61406
61494
  });
61407
61495
  }
61408
- function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
61496
+ function VW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId: i, paymasters: a }) {
61409
61497
  let [o, s] = z(!0), [c, l] = z(!1), [u, d] = z(""), [f, p] = z(!0), [m, h] = z(null), [g, _] = z({}), [v, y] = z(null), [b, S] = z([]), [w, T] = z(!0), E = e.data.chainId || i || 1, D = ue.find((e) => e.id === E), O = D?.name || "Unknown Network", k = b?.find((e) => e.isNative)?.symbol || D?.nativeCurrency?.symbol || "ETH", A = gz(k), j = st(() => e.data.capabilities?.paymasterService?.url || a?.[E]?.url, [
61410
61498
  e.data.capabilities?.paymasterService?.url,
61411
61499
  a,
@@ -61458,7 +61546,7 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61458
61546
  I,
61459
61547
  ee,
61460
61548
  A
61461
- ]), oe = st(() => vW(E, r, ie), [
61549
+ ]), oe = st(() => kW(E, r, ie), [
61462
61550
  E,
61463
61551
  r,
61464
61552
  ie
@@ -61475,7 +61563,7 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61475
61563
  let e = {};
61476
61564
  for (let n of t.spends) {
61477
61565
  let t = n.token;
61478
- if (sU(t)) e[t] = {
61566
+ if (hU(t)) e[t] = {
61479
61567
  decimals: D?.nativeCurrency?.decimals ?? 18,
61480
61568
  symbol: D?.nativeCurrency?.symbol || "ETH"
61481
61569
  };
@@ -61545,9 +61633,9 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61545
61633
  t && T(!1);
61546
61634
  return;
61547
61635
  }
61548
- let o = vW(E, r).rpcUrl || D?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
61636
+ let o = kW(E, r).rpcUrl || D?.rpcUrls?.default?.http?.[0] || "https://eth.llamarpc.com", s = await Promise.all(a.tokens.map(async (t) => {
61549
61637
  try {
61550
- let n = await cU(t.address, e.data.address, o), r = Ge(n, t.decimals), i = sU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
61638
+ let n = await gU(t.address, e.data.address, o), r = Ge(n, t.decimals), i = hU(t.address), a = i ? n > 0n : parseFloat(r) >= .5;
61551
61639
  return {
61552
61640
  uid: t.uid,
61553
61641
  symbol: t.symbol,
@@ -61567,7 +61655,7 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61567
61655
  decimals: t.decimals,
61568
61656
  balance: 0n,
61569
61657
  balanceFormatted: "0",
61570
- isNative: sU(t.address),
61658
+ isNative: hU(t.address),
61571
61659
  isSelectable: !1,
61572
61660
  logoURI: t.logoURI
61573
61661
  };
@@ -61592,7 +61680,7 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61592
61680
  let e = !0;
61593
61681
  return (async () => {
61594
61682
  try {
61595
- let t = await bW(r, E, j);
61683
+ let t = await jW(r, E, j);
61596
61684
  e && y(t);
61597
61685
  } catch (e) {
61598
61686
  console.error("[RevokePermissionDialogWrapper] Error initializing account:", e);
@@ -61612,7 +61700,7 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61612
61700
  }, r = Ge(BigInt(e.allowance), n.decimals), i = `${r} ${n.symbol}`, a = e.multiplier ?? 1, o = `${a} ${e.unit}${a > 1 ? "s" : ""}`;
61613
61701
  return {
61614
61702
  amount: r,
61615
- token: sU(t) ? `Native (${k})` : n.symbol,
61703
+ token: hU(t) ? `Native (${k})` : n.symbol,
61616
61704
  tokenAddress: t,
61617
61705
  duration: o,
61618
61706
  limit: i
@@ -61625,8 +61713,8 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61625
61713
  ]), ce = st(() => m?.calls ? m.calls.map((e) => ({
61626
61714
  target: e.target,
61627
61715
  selector: e.selector,
61628
- functionSignature: e.functionSignature || (e.selector ? DW(e.selector) : "Unknown Function")
61629
- })) : [], [m]), le = st(() => m ? mW(parseInt(m.end, 10)) : "", [m]), de = m?.spender || "0x...", fe = async () => {
61716
+ functionSignature: e.functionSignature || (e.selector ? RW(e.selector) : "Unknown Function")
61717
+ })) : [], [m]), le = st(() => m ? TW(parseInt(m.end, 10)) : "", [m]), de = m?.spender || "0x...", fe = async () => {
61630
61718
  if (!v) {
61631
61719
  console.error("[RevokePermissionDialogWrapper] Account not initialized");
61632
61720
  return;
@@ -61644,7 +61732,7 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61644
61732
  }, pe = () => {
61645
61733
  s(!1), n(kR.userRejected());
61646
61734
  };
61647
- return /* @__PURE__ */ B(LU, {
61735
+ return /* @__PURE__ */ B(JU, {
61648
61736
  open: o,
61649
61737
  onOpenChange: (e) => {
61650
61738
  e ? s(e) : pe();
@@ -61665,7 +61753,7 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61665
61753
  status: u,
61666
61754
  isLoadingTokenInfo: f,
61667
61755
  timestamp: new Date(e.timestamp),
61668
- mainnetRpcUrl: yW(r),
61756
+ mainnetRpcUrl: AW(r),
61669
61757
  gasFee: ee,
61670
61758
  gasFeeLoading: F,
61671
61759
  gasEstimationError: te,
@@ -61679,11 +61767,11 @@ function AW({ request: e, onApprove: t, onReject: n, apiKey: r, defaultChainId:
61679
61767
  nativeCurrencySymbol: D?.nativeCurrency?.symbol
61680
61768
  });
61681
61769
  }
61682
- function jW({ method: e, onReject: t }) {
61770
+ function HW({ method: e, onReject: t }) {
61683
61771
  let [n, r] = z(!0), [i, a] = z(!1), o = typeof window < "u" ? window.location.origin : "unknown", s = () => {
61684
61772
  i || (a(!0), r(!1), t(kR.unsupportedRequest(e)));
61685
61773
  };
61686
- return /* @__PURE__ */ B(hW, {
61774
+ return /* @__PURE__ */ B(EW, {
61687
61775
  open: n,
61688
61776
  onOpenChange: (e) => {
61689
61777
  e ? r(e) : s();
@@ -61748,4 +61836,4 @@ function jW({ method: e, onReject: t }) {
61748
61836
  });
61749
61837
  }
61750
61838
  //#endregion
61751
- export { YU as BORDER_RADIUS_MAP, fs as BadgeDollarIcon, ss as CloseIcon, kU as ConnectDialog, us as CopiedIcon, ls as CopyIcon, JU as DEFAULT_DARK_PALETTE, qU as DEFAULT_LIGHT_PALETTE, ko as DefaultDialog, IU as Eip712Dialog, ms as EthIcon, ds as EyeIcon, XU as FONT_STACK_MAP, KL as FeeTokenSelector, _s as GenericTokenIcon, ps as LockIcon, uM as OnboardingDialog, Yo as OrSeparator, LU as PermissionDialog, So as PortalContainerContext, _W as ReactUIHandler, DU as SignatureDialog, OU as SiweDialog, EU as TransactionDialog, hs as UsdcIcon, gs as UsdtIcon, cs as WalletIcon, zH as applyFormat, sW as applyThemeToContainer, gH as caip10, hz as clearTokenPriceCache, xo as cn, KH as createTokenResolver, BH as decodeCalldataWithSignature, iW as deriveAccentPalette, xH as eip712TypeHash, cU as fetchTokenBalance, mz as fetchTokenPrice, iU as formatAddress, vU as getChainLabel, hH as getDefaultDescriptorSource, aU as getDisplayAddress, lM as getJustaNameInstance, qH as getNativeSymbol, lW as getSystemColorScheme, nW as hexToOklch, sU as isNativeToken, rW as oklchToString, yH as resolveCalldataDescriptor, EH as resolveEip712Descriptor, uH as resolvePath, aW as resolveTheme, dz as useChainIconURI, rU as useClearSigningTypedData, uW as useColorScheme, nU as useDecodedCalldata, gz as useFeeTokenPrice, xz as useGasEstimation, qL as useIsMobile };
61839
+ export { oW as BORDER_RADIUS_MAP, fs as BadgeDollarIcon, ss as CloseIcon, BU as ConnectDialog, us as CopiedIcon, ls as CopyIcon, aW as DEFAULT_DARK_PALETTE, iW as DEFAULT_LIGHT_PALETTE, ko as DefaultDialog, qU as Eip712Dialog, ms as EthIcon, ds as EyeIcon, sW as FONT_STACK_MAP, KL as FeeTokenSelector, _s as GenericTokenIcon, ps as LockIcon, uM as OnboardingDialog, Yo as OrSeparator, JU as PermissionDialog, So as PortalContainerContext, OW as ReactUIHandler, RU as SignatureDialog, zU as SiweDialog, LU as TransactionDialog, hs as UsdcIcon, gs as UsdtIcon, cs as WalletIcon, zH as applyFormat, vW as applyThemeToContainer, gH as caip10, hz as clearTokenPriceCache, xo as cn, KH as createTokenResolver, BH as decodeCalldataWithSignature, hW as deriveAccentPalette, xH as eip712TypeHash, gU as fetchTokenBalance, mz as fetchTokenPrice, fU as formatAddress, EU as getChainLabel, hH as getDefaultDescriptorSource, pU as getDisplayAddress, lM as getJustaNameInstance, qH as getNativeSymbol, bW as getSystemColorScheme, pW as hexToOklch, hU as isNativeToken, mW as oklchToString, yH as resolveCalldataDescriptor, EH as resolveEip712Descriptor, uH as resolvePath, gW as resolveTheme, uU as reverseResolveAddresses, dU as reverseResolveWithAvatars, dz as useChainIconURI, rU as useClearSigningTypedData, xW as useColorScheme, nU as useDecodedCalldata, gz as useFeeTokenPrice, xz as useGasEstimation, qL as useIsMobile };