0xtrails 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var bF = Object.defineProperty;
2
2
  var wF = (e, t, n) => t in e ? bF(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var he = (e, t, n) => wF(e, typeof t != "symbol" ? t + "" : t, n);
3
+ var fe = (e, t, n) => wF(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as l, Fragment as Ke, jsxs as g } from "react/jsx-runtime";
5
5
  import { QueryClient as kb, useQuery as _t, useMutation as Tb, useQueryClient as HT, QueryClientProvider as GT } from "@tanstack/react-query";
6
6
  // React 19 compatibility: import React without internals
@@ -35,7 +35,7 @@ const getReactInternals = () => {
35
35
  return {};
36
36
  }
37
37
  };
38
- import Br, { createContext as tn, useRef as ze, useLayoutEffect as Eb, useEffect as ne, useId as Xf, useContext as yt, useInsertionEffect as zT, useMemo as fe, useCallback as Te, Children as vF, isValidElement as xF, useState as H, createElement as ml, Fragment as qT, forwardRef as wc, Component as kF, StrictMode as x2, useImperativeHandle as TF } from "react";
38
+ import Br, { createContext as tn, useRef as ze, useLayoutEffect as Eb, useEffect as ne, useId as Xf, useContext as yt, useInsertionEffect as zT, useMemo as pe, useCallback as Te, Children as vF, isValidElement as xF, useState as H, createElement as ml, Fragment as qT, forwardRef as wc, Component as kF, StrictMode as x2, useImperativeHandle as TF } from "react";
39
39
  import { getAddress as Ds, UserRejectedRequestError as k2, formatUnits as gn, zeroAddress as Le, ethAddress as T2, erc20Abi as qo, parseUnits as ra, isAddressEqual as Hh, encodeFunctionData as ys, createWalletClient as Cb, keccak256 as ld, encodeAbiParameters as E2, concat as Cu, pad as Ji, toHex as gl, custom as KT, encodeDeployData as EF, decodeAbiParameters as CF, decodeFunctionData as C2, parseGwei as AF, http as ao, maxUint256 as A2, decodeEventLog as vc, parseAbiItem as xc, isAddress as Yr, createPublicClient as QT, parseAbi as IF, defineChain as SF } from "viem";
40
40
  import { useIndexerClient as NF, useIndexerGatewayClient as Ll, SequenceHooksProvider as PF, useGetExchangeRate as YT } from "@0xsequence/hooks";
41
41
  import * as XT from "react-dom";
@@ -3354,13 +3354,13 @@ function A$(e) {
3354
3354
  const J = C(oe);
3355
3355
  if (!p(J))
3356
3356
  return;
3357
- const le = d(J), pe = u.BASE.multiply(J).toAffine(), me = c(pe.x);
3357
+ const ce = d(J), de = u.BASE.multiply(J).toAffine(), me = c(de.x);
3358
3358
  if (me === Ja)
3359
3359
  return;
3360
- const ve = c(le * c(Q + me * ee));
3360
+ const ve = c(ce * c(Q + me * ee));
3361
3361
  if (ve === Ja)
3362
3362
  return;
3363
- let ke = (pe.x === me ? 0 : 2) | Number(pe.y & er), $e = ve;
3363
+ let ke = (de.x === me ? 0 : 2) | Number(de.y & er), $e = ve;
3364
3364
  return P && y(ve) && ($e = b(ve), ke ^= 1), new w(me, $e, ke);
3365
3365
  }
3366
3366
  return { seed: Y, k2sig: re };
@@ -3400,7 +3400,7 @@ function A$(e) {
3400
3400
  if (!ae || P && ae.hasHighS())
3401
3401
  return !1;
3402
3402
  V && (_ = t.hash(_));
3403
- const { r: Q, s: re } = ae, oe = I(_), J = d(re), le = c(oe * J), pe = c(Q * J), me = u.BASE.multiplyAndAddUnsafe(Y, le, pe)?.toAffine();
3403
+ const { r: Q, s: re } = ae, oe = I(_), J = d(re), ce = c(oe * J), de = c(Q * J), me = u.BASE.multiplyAndAddUnsafe(Y, ce, de)?.toAffine();
3404
3404
  return me ? c(me.x) === Q : !1;
3405
3405
  }
3406
3406
  return {
@@ -8191,7 +8191,7 @@ function Bj({ children: e, isPresent: t, anchorX: n, root: r }) {
8191
8191
  }
8192
8192
  const $j = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: s, presenceAffectsLayout: a, mode: o, anchorX: i, root: c }) => {
8193
8193
  const d = Hb(_j), u = Xf();
8194
- let h = !0, f = fe(() => (h = !1, {
8194
+ let h = !0, f = pe(() => (h = !1, {
8195
8195
  id: u,
8196
8196
  initial: t,
8197
8197
  isPresent: n,
@@ -8205,7 +8205,7 @@ const $j = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
8205
8205
  },
8206
8206
  register: (p) => (d.set(p, !1), () => d.delete(p))
8207
8207
  }), [n, d, r]);
8208
- return a && h && (f = { ...f }), fe(() => {
8208
+ return a && h && (f = { ...f }), pe(() => {
8209
8209
  d.forEach((p, y) => d.set(y, !1));
8210
8210
  }, [n]), ye.useEffect(() => {
8211
8211
  !n && !d.size && r && r();
@@ -8234,7 +8234,7 @@ function kx(e) {
8234
8234
  }), t;
8235
8235
  }
8236
8236
  const Pa = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: s = !0, mode: a = "sync", propagate: o = !1, anchorX: i = "left", root: c }) => {
8237
- const [d, u] = fC(o), h = fe(() => kx(e), [e]), f = o && !d ? [] : h.map(lh), p = ze(!0), y = ze(h), b = Hb(() => /* @__PURE__ */ new Map()), [v, w] = H(h), [T, k] = H(h);
8237
+ const [d, u] = fC(o), h = pe(() => kx(e), [e]), f = o && !d ? [] : h.map(lh), p = ze(!0), y = ze(h), b = Hb(() => /* @__PURE__ */ new Map()), [v, w] = H(h), [T, k] = H(h);
8238
8238
  k6(() => {
8239
8239
  p.current = !1, y.current = h;
8240
8240
  for (let C = 0; C < T.length; C++) {
@@ -8381,7 +8381,7 @@ function Gj(e, t) {
8381
8381
  }
8382
8382
  function zj(e) {
8383
8383
  const { initial: t, animate: n } = Gj(e, yt(g0));
8384
- return fe(() => ({ initial: t, animate: n }), [Ex(t), Ex(n)]);
8384
+ return pe(() => ({ initial: t, animate: n }), [Ex(t), Ex(n)]);
8385
8385
  }
8386
8386
  function Ex(e) {
8387
8387
  return Array.isArray(e) ? e.join(" ") : e;
@@ -8451,7 +8451,7 @@ function bC(e, t, n) {
8451
8451
  !Cr(t[r]) && !yC(r, n) && (e[r] = t[r]);
8452
8452
  }
8453
8453
  function Xj({ transformTemplate: e }, t) {
8454
- return fe(() => {
8454
+ return pe(() => {
8455
8455
  const n = yw();
8456
8456
  return gw(n, t, e), Object.assign({}, n.vars, n.style);
8457
8457
  }, [t]);
@@ -8501,7 +8501,7 @@ const vC = () => ({
8501
8501
  attrs: {}
8502
8502
  }), xC = (e) => typeof e == "string" && e.toLowerCase() === "svg";
8503
8503
  function rW(e, t, n, r) {
8504
- const s = fe(() => {
8504
+ const s = pe(() => {
8505
8505
  const a = vC();
8506
8506
  return wC(a, t, xC(r), e.transformTemplate, e.style), {
8507
8507
  ...a.attrs,
@@ -8562,7 +8562,7 @@ function bw(e) {
8562
8562
  );
8563
8563
  }
8564
8564
  function aW(e, t, n, { latestValues: r }, s, a = !1) {
8565
- const i = (bw(e) ? rW : Jj)(t, r, s, e), c = Hj(t, typeof e == "string", a), d = e !== qT ? { ...c, ...i, ref: n } : {}, { children: u } = t, h = fe(() => Cr(u) ? u.get() : u, [u]);
8565
+ const i = (bw(e) ? rW : Jj)(t, r, s, e), c = Hj(t, typeof e == "string", a), d = e !== qT ? { ...c, ...i, ref: n } : {}, { children: u } = t, h = pe(() => Cr(u) ? u.get() : u, [u]);
8566
8566
  return ml(e, {
8567
8567
  ...d,
8568
8568
  children: h
@@ -13143,8 +13143,8 @@ var Uw = "PopperContent", [oK, iK] = AA(Uw), MA = ye.forwardRef(
13143
13143
  eK({
13144
13144
  ...G,
13145
13145
  apply: ({ elements: Q, rects: re, availableWidth: oe, availableHeight: J }) => {
13146
- const { width: le, height: pe } = re.reference, me = Q.floating.style;
13147
- me.setProperty("--radix-popper-available-width", `${oe}px`), me.setProperty("--radix-popper-available-height", `${J}px`), me.setProperty("--radix-popper-anchor-width", `${le}px`), me.setProperty("--radix-popper-anchor-height", `${pe}px`);
13146
+ const { width: ce, height: de } = re.reference, me = Q.floating.style;
13147
+ me.setProperty("--radix-popper-available-width", `${oe}px`), me.setProperty("--radix-popper-available-height", `${J}px`), me.setProperty("--radix-popper-anchor-width", `${ce}px`), me.setProperty("--radix-popper-anchor-height", `${de}px`);
13148
13148
  }
13149
13149
  }),
13150
13150
  x && nK({ element: x, padding: i }),
@@ -13863,29 +13863,29 @@ function YK() {
13863
13863
  timeout: 0,
13864
13864
  overload: !1
13865
13865
  }, {
13866
- timeout: function(pe, me) {
13867
- return pe *= 1, (typeof pe != "number" || pe < 0 || !Number.isFinite(pe)) && me("timeout must be a positive number"), pe;
13866
+ timeout: function(de, me) {
13867
+ return de *= 1, (typeof de != "number" || de < 0 || !Number.isFinite(de)) && me("timeout must be a positive number"), de;
13868
13868
  }
13869
13869
  }), V = !P.overload && typeof A.prototype.cancel == "function" && typeof re == "function";
13870
13870
  function oe() {
13871
13871
  q && (q = null), te && (clearTimeout(te), te = 0);
13872
13872
  }
13873
- var J = function(pe) {
13874
- oe(), Y(pe);
13875
- }, le = function(pe) {
13876
- oe(), Q(pe);
13873
+ var J = function(de) {
13874
+ oe(), Y(de);
13875
+ }, ce = function(de) {
13876
+ oe(), Q(de);
13877
13877
  };
13878
- V ? N(J, le, re) : (q = [function(pe) {
13879
- le(pe || Error("canceled"));
13880
- }], N(J, le, function(pe) {
13878
+ V ? N(J, ce, re) : (q = [function(de) {
13879
+ ce(de || Error("canceled"));
13880
+ }], N(J, ce, function(de) {
13881
13881
  if (ee)
13882
13882
  throw Error("Unable to subscribe on cancel event asynchronously");
13883
- if (typeof pe != "function")
13883
+ if (typeof de != "function")
13884
13884
  throw TypeError("onCancel callback must be a function");
13885
- q.push(pe);
13885
+ q.push(de);
13886
13886
  }), ee = !0), P.timeout > 0 && (te = setTimeout(function() {
13887
- var pe = Error("timeout");
13888
- pe.code = "ETIMEDOUT", te = 0, ae.cancel(pe), Q(pe);
13887
+ var de = Error("timeout");
13888
+ de.code = "ETIMEDOUT", te = 0, ae.cancel(de), Q(de);
13889
13889
  }, P.timeout));
13890
13890
  });
13891
13891
  return V || (ae.cancel = function(Y) {
@@ -13921,22 +13921,22 @@ function YK() {
13921
13921
  N = [N], q = 1;
13922
13922
  } else te === "object" ? q = N.length : (N = [N], q = 1);
13923
13923
  }
13924
- var J = null, le, pe, me, ve, ke, $e = N[V], We = N[V + 1], de, we;
13924
+ var J = null, ce, de, me, ve, ke, $e = N[V], We = N[V + 1], ue, we;
13925
13925
  if (V === q)
13926
13926
  P._listeners && (typeof P._listeners == "function" ? (A && A.push(P._listeners), J = [P]) : (A && A.push.apply(A, P._listeners), J = [P]));
13927
13927
  else if ($e === "*") {
13928
- for (de = h(P), ae = de.length; ae-- > 0; )
13929
- le = de[ae], le !== "_listeners" && (we = O(A, N, P[le], V + 1, q), we && (J ? J.push.apply(J, we) : J = we));
13928
+ for (ue = h(P), ae = ue.length; ae-- > 0; )
13929
+ ce = ue[ae], ce !== "_listeners" && (we = O(A, N, P[ce], V + 1, q), we && (J ? J.push.apply(J, we) : J = we));
13930
13930
  return J;
13931
13931
  } else if ($e === "**") {
13932
- for (ke = V + 1 === q || V + 2 === q && We === "*", ke && P._listeners && (J = O(A, N, P, q, q)), de = h(P), ae = de.length; ae-- > 0; )
13933
- le = de[ae], le !== "_listeners" && (le === "*" || le === "**" ? (P[le]._listeners && !ke && (we = O(A, N, P[le], q, q), we && (J ? J.push.apply(J, we) : J = we)), we = O(A, N, P[le], V, q)) : le === We ? we = O(A, N, P[le], V + 2, q) : we = O(A, N, P[le], V, q), we && (J ? J.push.apply(J, we) : J = we));
13932
+ for (ke = V + 1 === q || V + 2 === q && We === "*", ke && P._listeners && (J = O(A, N, P, q, q)), ue = h(P), ae = ue.length; ae-- > 0; )
13933
+ ce = ue[ae], ce !== "_listeners" && (ce === "*" || ce === "**" ? (P[ce]._listeners && !ke && (we = O(A, N, P[ce], q, q), we && (J ? J.push.apply(J, we) : J = we)), we = O(A, N, P[ce], V, q)) : ce === We ? we = O(A, N, P[ce], V + 2, q) : we = O(A, N, P[ce], V, q), we && (J ? J.push.apply(J, we) : J = we));
13934
13934
  return J;
13935
13935
  } else P[$e] && (J = O(A, N, P[$e], V + 1, q));
13936
- if (pe = P["*"], pe && O(A, N, pe, V + 1, q), me = P["**"], me)
13936
+ if (de = P["*"], de && O(A, N, de, V + 1, q), me = P["**"], me)
13937
13937
  if (V < q)
13938
- for (me._listeners && O(A, N, me, q, q), de = h(me), ae = de.length; ae-- > 0; )
13939
- le = de[ae], le !== "_listeners" && (le === We ? O(A, N, me[le], V + 2, q) : le === $e ? O(A, N, me[le], V + 1, q) : (ve = {}, ve[le] = me[le], O(A, N, { "**": ve }, V + 1, q)));
13938
+ for (me._listeners && O(A, N, me, q, q), ue = h(me), ae = ue.length; ae-- > 0; )
13939
+ ce = ue[ae], ce !== "_listeners" && (ce === We ? O(A, N, me[ce], V + 2, q) : ce === $e ? O(A, N, me[ce], V + 1, q) : (ve = {}, ve[ce] = me[ce], O(A, N, { "**": ve }, V + 1, q)));
13940
13940
  else me._listeners ? O(A, N, me, q, q) : me["*"] && me["*"]._listeners && O(A, N, me["*"], q, q);
13941
13941
  return J;
13942
13942
  }
@@ -14028,8 +14028,8 @@ function YK() {
14028
14028
  throw TypeError("events must be an object");
14029
14029
  var ee = P.reducers, ae = S.call(V, A), Y;
14030
14030
  ae === -1 ? Y = new w(V, A, P) : Y = V._observers[ae];
14031
- for (var Q = h(te), re = Q.length, oe, J = typeof ee == "function", le = 0; le < re; le++)
14032
- oe = Q[le], Y.subscribe(
14031
+ for (var Q = h(te), re = Q.length, oe, J = typeof ee == "function", ce = 0; ce < re; ce++)
14032
+ oe = Q[ce], Y.subscribe(
14033
14033
  oe,
14034
14034
  te[oe] || oe,
14035
14035
  J ? ee : ee && ee[oe]
@@ -14813,10 +14813,10 @@ cQ((e) => ({
14813
14813
  }));
14814
14814
  var pQ = class {
14815
14815
  constructor(e, t) {
14816
- he(this, "hostname");
14817
- he(this, "fetch");
14818
- he(this, "path", "/rpc/Databeat/");
14819
- he(this, "ping", (e, t) => this.fetch(
14816
+ fe(this, "hostname");
14817
+ fe(this, "fetch");
14818
+ fe(this, "path", "/rpc/Databeat/");
14819
+ fe(this, "ping", (e, t) => this.fetch(
14820
14820
  this.url("Ping"),
14821
14821
  fd({}, e, t)
14822
14822
  ).then((n) => pd(n).then((r) => ({
@@ -14824,7 +14824,7 @@ var pQ = class {
14824
14824
  })), (n) => {
14825
14825
  throw _c.new({ cause: `fetch(): ${n.message || ""}` });
14826
14826
  }));
14827
- he(this, "version", (e, t) => this.fetch(
14827
+ fe(this, "version", (e, t) => this.fetch(
14828
14828
  this.url("Version"),
14829
14829
  fd({}, e, t)
14830
14830
  ).then((n) => pd(n).then((r) => ({
@@ -14832,7 +14832,7 @@ var pQ = class {
14832
14832
  })), (n) => {
14833
14833
  throw _c.new({ cause: `fetch(): ${n.message || ""}` });
14834
14834
  }));
14835
- he(this, "runtimeStatus", (e, t) => this.fetch(
14835
+ fe(this, "runtimeStatus", (e, t) => this.fetch(
14836
14836
  this.url("RuntimeStatus"),
14837
14837
  fd({}, e, t)
14838
14838
  ).then((n) => pd(n).then((r) => ({
@@ -14840,7 +14840,7 @@ var pQ = class {
14840
14840
  })), (n) => {
14841
14841
  throw _c.new({ cause: `fetch(): ${n.message || ""}` });
14842
14842
  }));
14843
- he(this, "tick", (e, t, n) => this.fetch(
14843
+ fe(this, "tick", (e, t, n) => this.fetch(
14844
14844
  this.url("Tick"),
14845
14845
  fd(e, t, n)
14846
14846
  ).then((r) => pd(r).then((s) => ({
@@ -14848,7 +14848,7 @@ var pQ = class {
14848
14848
  })), (r) => {
14849
14849
  throw _c.new({ cause: `fetch(): ${r.message || ""}` });
14850
14850
  }));
14851
- he(this, "rawEvents", (e, t, n) => this.fetch(
14851
+ fe(this, "rawEvents", (e, t, n) => this.fetch(
14852
14852
  this.url("RawEvents"),
14853
14853
  fd(e, t, n)
14854
14854
  ).then((r) => pd(r).then((s) => ({
@@ -14887,13 +14887,13 @@ var pQ = class {
14887
14887
  }), Yn = class lI extends Error {
14888
14888
  constructor(n, r, s, a, o) {
14889
14889
  super(s);
14890
- he(this, "name");
14891
- he(this, "code");
14892
- he(this, "message");
14893
- he(this, "status");
14894
- he(this, "cause");
14890
+ fe(this, "name");
14891
+ fe(this, "code");
14892
+ fe(this, "message");
14893
+ fe(this, "status");
14894
+ fe(this, "cause");
14895
14895
  /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */
14896
- he(this, "msg");
14896
+ fe(this, "msg");
14897
14897
  this.name = n || "WebrpcError", this.code = typeof r == "number" ? r : 0, this.message = s || `endpoint error ${this.code}`, this.msg = this.message, this.status = typeof a == "number" ? a : 0, this.cause = o, Object.setPrototypeOf(this, lI.prototype);
14898
14898
  }
14899
14899
  static new(n) {
@@ -14994,8 +14994,8 @@ var pQ = class {
14994
14994
  constructor(t, n) {
14995
14995
  const r = globalThis.fetch.bind(globalThis);
14996
14996
  super(t.endsWith("/") ? t.slice(0, -1) : t, r);
14997
- he(this, "_globalFetch");
14998
- he(this, "_fetch", (t, n) => {
14997
+ fe(this, "_globalFetch");
14998
+ fe(this, "_fetch", (t, n) => {
14999
14999
  if (this.auth) {
15000
15000
  let r = {};
15001
15001
  this.auth.jwt?.length > 0 && (r.Authorization = `BEARER ${this.auth.jwt}`), this.auth.headers && (r = { ...r, ...this.auth.headers }), n.headers = { ...n.headers, ...r };
@@ -15014,22 +15014,22 @@ var pQ = class {
15014
15014
  initProps: () => ({})
15015
15015
  }, NI = class {
15016
15016
  constructor(e, t, n) {
15017
- he(this, "rpc");
15018
- he(this, "auth");
15019
- he(this, "options");
15020
- he(this, "enabled");
15021
- he(this, "ident");
15022
- he(this, "userId");
15023
- he(this, "sessionId");
15024
- he(this, "allowUserTracking");
15025
- he(this, "projectId");
15026
- he(this, "queue");
15027
- he(this, "flushTimeout");
15028
- he(this, "defaultProps");
15029
- he(this, "dedupeIdentKey");
15030
- he(this, "dedupeViewKey");
15031
- he(this, "ts");
15032
- he(this, "flush", async () => {
15017
+ fe(this, "rpc");
15018
+ fe(this, "auth");
15019
+ fe(this, "options");
15020
+ fe(this, "enabled");
15021
+ fe(this, "ident");
15022
+ fe(this, "userId");
15023
+ fe(this, "sessionId");
15024
+ fe(this, "allowUserTracking");
15025
+ fe(this, "projectId");
15026
+ fe(this, "queue");
15027
+ fe(this, "flushTimeout");
15028
+ fe(this, "defaultProps");
15029
+ fe(this, "dedupeIdentKey");
15030
+ fe(this, "dedupeViewKey");
15031
+ fe(this, "ts");
15032
+ fe(this, "flush", async () => {
15033
15033
  if (this.flushTimeout !== null && (clearTimeout(this.flushTimeout), this.flushTimeout = null), !this.enabled || this.options.noop || this.options.strictMode && !this.allowUserTracking || this.queue.length === 0) return;
15034
15034
  const e = this.dedupedQueue();
15035
15035
  this.queue = [];
@@ -15039,7 +15039,7 @@ var pQ = class {
15039
15039
  console.warn(`databeat flush failed: ${t}`);
15040
15040
  }
15041
15041
  });
15042
- he(this, "dedupedQueue", () => {
15042
+ fe(this, "dedupedQueue", () => {
15043
15043
  const e = /* @__PURE__ */ new Map();
15044
15044
  for (let t = 0; t < this.queue.length; t++) {
15045
15045
  const n = this.queue[t], r = `${n.event}:${n.source}:${n.userId}:${n.sessionId}:${JSON.stringify(n.props)}:${JSON.stringify(n.nums)}`;
@@ -15208,11 +15208,11 @@ var $o;
15208
15208
  })($o || ($o = {}));
15209
15209
  class LQ {
15210
15210
  constructor() {
15211
- he(this, "_resolve", () => {
15211
+ fe(this, "_resolve", () => {
15212
15212
  });
15213
- he(this, "_reject", () => {
15213
+ fe(this, "_reject", () => {
15214
15214
  });
15215
- he(this, "_promise", new Promise((t, n) => {
15215
+ fe(this, "_promise", new Promise((t, n) => {
15216
15216
  this._reject = n, this._resolve = t;
15217
15217
  }));
15218
15218
  }
@@ -35223,114 +35223,114 @@ function i5() {
35223
35223
  })(f || (e.ContractVerificationStatus = f = {}));
35224
35224
  class p {
35225
35225
  constructor(U, F) {
35226
- he(this, "hostname");
35227
- he(this, "fetch");
35228
- he(this, "path", "/rpc/Indexer/");
35229
- he(this, "ping", (U, F) => this.fetch(this.url("Ping"), b({}, U, F)).then(($) => v($).then((R) => ({
35226
+ fe(this, "hostname");
35227
+ fe(this, "fetch");
35228
+ fe(this, "path", "/rpc/Indexer/");
35229
+ fe(this, "ping", (U, F) => this.fetch(this.url("Ping"), b({}, U, F)).then(($) => v($).then((R) => ({
35230
35230
  status: R.status
35231
35231
  })), ($) => {
35232
35232
  throw k.new({ cause: `fetch(): ${$.message || ""}` });
35233
35233
  }));
35234
- he(this, "version", (U, F) => this.fetch(this.url("Version"), b({}, U, F)).then(($) => v($).then((R) => ({
35234
+ fe(this, "version", (U, F) => this.fetch(this.url("Version"), b({}, U, F)).then(($) => v($).then((R) => ({
35235
35235
  version: R.version
35236
35236
  })), ($) => {
35237
35237
  throw k.new({ cause: `fetch(): ${$.message || ""}` });
35238
35238
  }));
35239
- he(this, "runtimeStatus", (U, F) => this.fetch(this.url("RuntimeStatus"), b({}, U, F)).then(($) => v($).then((R) => ({
35239
+ fe(this, "runtimeStatus", (U, F) => this.fetch(this.url("RuntimeStatus"), b({}, U, F)).then(($) => v($).then((R) => ({
35240
35240
  status: R.status
35241
35241
  })), ($) => {
35242
35242
  throw k.new({ cause: `fetch(): ${$.message || ""}` });
35243
35243
  }));
35244
- he(this, "getChainID", (U, F) => this.fetch(this.url("GetChainID"), b({}, U, F)).then(($) => v($).then((R) => ({
35244
+ fe(this, "getChainID", (U, F) => this.fetch(this.url("GetChainID"), b({}, U, F)).then(($) => v($).then((R) => ({
35245
35245
  chainID: R.chainID
35246
35246
  })), ($) => {
35247
35247
  throw k.new({ cause: `fetch(): ${$.message || ""}` });
35248
35248
  }));
35249
- he(this, "getEtherBalance", (U, F, $) => this.fetch(this.url("GetEtherBalance"), b(U, F, $)).then((R) => v(R).then((X) => ({
35249
+ fe(this, "getEtherBalance", (U, F, $) => this.fetch(this.url("GetEtherBalance"), b(U, F, $)).then((R) => v(R).then((X) => ({
35250
35250
  balance: X.balance
35251
35251
  })), (R) => {
35252
35252
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35253
35253
  }));
35254
- he(this, "getNativeTokenBalance", (U, F, $) => this.fetch(this.url("GetNativeTokenBalance"), b(U, F, $)).then((R) => v(R).then((X) => ({
35254
+ fe(this, "getNativeTokenBalance", (U, F, $) => this.fetch(this.url("GetNativeTokenBalance"), b(U, F, $)).then((R) => v(R).then((X) => ({
35255
35255
  balance: X.balance
35256
35256
  })), (R) => {
35257
35257
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35258
35258
  }));
35259
- he(this, "getTokenBalancesSummary", (U, F, $) => this.fetch(this.url("GetTokenBalancesSummary"), b(U, F, $)).then((R) => v(R).then((X) => ({
35259
+ fe(this, "getTokenBalancesSummary", (U, F, $) => this.fetch(this.url("GetTokenBalancesSummary"), b(U, F, $)).then((R) => v(R).then((X) => ({
35260
35260
  page: X.page,
35261
35261
  nativeBalances: X.nativeBalances,
35262
35262
  balances: X.balances
35263
35263
  })), (R) => {
35264
35264
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35265
35265
  }));
35266
- he(this, "getTokenBalancesDetails", (U, F, $) => this.fetch(this.url("GetTokenBalancesDetails"), b(U, F, $)).then((R) => v(R).then((X) => ({
35266
+ fe(this, "getTokenBalancesDetails", (U, F, $) => this.fetch(this.url("GetTokenBalancesDetails"), b(U, F, $)).then((R) => v(R).then((X) => ({
35267
35267
  page: X.page,
35268
35268
  nativeBalances: X.nativeBalances,
35269
35269
  balances: X.balances
35270
35270
  })), (R) => {
35271
35271
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35272
35272
  }));
35273
- he(this, "getTokenBalancesByContract", (U, F, $) => this.fetch(this.url("GetTokenBalancesByContract"), b(U, F, $)).then((R) => v(R).then((X) => ({
35273
+ fe(this, "getTokenBalancesByContract", (U, F, $) => this.fetch(this.url("GetTokenBalancesByContract"), b(U, F, $)).then((R) => v(R).then((X) => ({
35274
35274
  page: X.page,
35275
35275
  balances: X.balances
35276
35276
  })), (R) => {
35277
35277
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35278
35278
  }));
35279
- he(this, "getTokenBalances", (U, F, $) => this.fetch(this.url("GetTokenBalances"), b(U, F, $)).then((R) => v(R).then((X) => ({
35279
+ fe(this, "getTokenBalances", (U, F, $) => this.fetch(this.url("GetTokenBalances"), b(U, F, $)).then((R) => v(R).then((X) => ({
35280
35280
  page: X.page,
35281
35281
  balances: X.balances
35282
35282
  })), (R) => {
35283
35283
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35284
35284
  }));
35285
- he(this, "getTokenSupplies", (U, F, $) => this.fetch(this.url("GetTokenSupplies"), b(U, F, $)).then((R) => v(R).then((X) => ({
35285
+ fe(this, "getTokenSupplies", (U, F, $) => this.fetch(this.url("GetTokenSupplies"), b(U, F, $)).then((R) => v(R).then((X) => ({
35286
35286
  page: X.page,
35287
35287
  contractType: X.contractType,
35288
35288
  tokenIDs: X.tokenIDs
35289
35289
  })), (R) => {
35290
35290
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35291
35291
  }));
35292
- he(this, "getTokenSuppliesMap", (U, F, $) => this.fetch(this.url("GetTokenSuppliesMap"), b(U, F, $)).then((R) => v(R).then((X) => ({
35292
+ fe(this, "getTokenSuppliesMap", (U, F, $) => this.fetch(this.url("GetTokenSuppliesMap"), b(U, F, $)).then((R) => v(R).then((X) => ({
35293
35293
  supplies: X.supplies
35294
35294
  })), (R) => {
35295
35295
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35296
35296
  }));
35297
- he(this, "getTokenIDs", (U, F, $) => this.fetch(this.url("GetTokenIDs"), b(U, F, $)).then((R) => v(R).then((X) => ({
35297
+ fe(this, "getTokenIDs", (U, F, $) => this.fetch(this.url("GetTokenIDs"), b(U, F, $)).then((R) => v(R).then((X) => ({
35298
35298
  page: X.page,
35299
35299
  contractType: X.contractType,
35300
35300
  tokenIDs: X.tokenIDs
35301
35301
  })), (R) => {
35302
35302
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35303
35303
  }));
35304
- he(this, "getTokenIDRanges", (U, F, $) => this.fetch(this.url("GetTokenIDRanges"), b(U, F, $)).then((R) => v(R).then((X) => ({
35304
+ fe(this, "getTokenIDRanges", (U, F, $) => this.fetch(this.url("GetTokenIDRanges"), b(U, F, $)).then((R) => v(R).then((X) => ({
35305
35305
  contractType: X.contractType,
35306
35306
  tokenIDRanges: X.tokenIDRanges,
35307
35307
  moreRanges: X.moreRanges
35308
35308
  })), (R) => {
35309
35309
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35310
35310
  }));
35311
- he(this, "getBalanceUpdates", (U, F, $) => this.fetch(this.url("GetBalanceUpdates"), b(U, F, $)).then((R) => v(R).then((X) => ({
35311
+ fe(this, "getBalanceUpdates", (U, F, $) => this.fetch(this.url("GetBalanceUpdates"), b(U, F, $)).then((R) => v(R).then((X) => ({
35312
35312
  page: X.page,
35313
35313
  balances: X.balances
35314
35314
  })), (R) => {
35315
35315
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35316
35316
  }));
35317
- he(this, "getTransactionHistory", (U, F, $) => this.fetch(this.url("GetTransactionHistory"), b(U, F, $)).then((R) => v(R).then((X) => ({
35317
+ fe(this, "getTransactionHistory", (U, F, $) => this.fetch(this.url("GetTransactionHistory"), b(U, F, $)).then((R) => v(R).then((X) => ({
35318
35318
  page: X.page,
35319
35319
  transactions: X.transactions
35320
35320
  })), (R) => {
35321
35321
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35322
35322
  }));
35323
- he(this, "fetchTransactionReceipt", (U, F, $) => this.fetch(this.url("FetchTransactionReceipt"), b(U, F, $)).then((R) => v(R).then((X) => ({
35323
+ fe(this, "fetchTransactionReceipt", (U, F, $) => this.fetch(this.url("FetchTransactionReceipt"), b(U, F, $)).then((R) => v(R).then((X) => ({
35324
35324
  receipt: X.receipt
35325
35325
  })), (R) => {
35326
35326
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35327
35327
  }));
35328
- he(this, "fetchTransactionReceiptWithFilter", (U, F, $) => this.fetch(this.url("FetchTransactionReceiptWithFilter"), b(U, F, $)).then((R) => v(R).then((X) => ({
35328
+ fe(this, "fetchTransactionReceiptWithFilter", (U, F, $) => this.fetch(this.url("FetchTransactionReceiptWithFilter"), b(U, F, $)).then((R) => v(R).then((X) => ({
35329
35329
  receipt: X.receipt
35330
35330
  })), (R) => {
35331
35331
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35332
35332
  }));
35333
- he(this, "subscribeReceipts", (U, F) => {
35333
+ fe(this, "subscribeReceipts", (U, F) => {
35334
35334
  const $ = () => this.fetch(this.url("SubscribeReceipts"), b(U, F.headers, F.signal)).then(async (R) => {
35335
35335
  await y(R, F, $);
35336
35336
  }, (R) => {
@@ -35338,7 +35338,7 @@ function i5() {
35338
35338
  });
35339
35339
  return $();
35340
35340
  });
35341
- he(this, "subscribeEvents", (U, F) => {
35341
+ fe(this, "subscribeEvents", (U, F) => {
35342
35342
  const $ = () => this.fetch(this.url("SubscribeEvents"), b(U, F.headers, F.signal)).then(async (R) => {
35343
35343
  await y(R, F, $);
35344
35344
  }, (R) => {
@@ -35346,7 +35346,7 @@ function i5() {
35346
35346
  });
35347
35347
  return $();
35348
35348
  });
35349
- he(this, "subscribeBalanceUpdates", (U, F) => {
35349
+ fe(this, "subscribeBalanceUpdates", (U, F) => {
35350
35350
  const $ = () => this.fetch(this.url("SubscribeBalanceUpdates"), b(U, F.headers, F.signal)).then(async (R) => {
35351
35351
  await y(R, F, $);
35352
35352
  }, (R) => {
@@ -35354,62 +35354,62 @@ function i5() {
35354
35354
  });
35355
35355
  return $();
35356
35356
  });
35357
- he(this, "syncBalance", (U, F, $) => this.fetch(this.url("SyncBalance"), b(U, F, $)).then((R) => v(R).then((X) => ({})), (R) => {
35357
+ fe(this, "syncBalance", (U, F, $) => this.fetch(this.url("SyncBalance"), b(U, F, $)).then((R) => v(R).then((X) => ({})), (R) => {
35358
35358
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35359
35359
  }));
35360
- he(this, "getAllWebhookListeners", (U, F, $) => this.fetch(this.url("GetAllWebhookListeners"), b(U, F, $)).then((R) => v(R).then((X) => ({
35360
+ fe(this, "getAllWebhookListeners", (U, F, $) => this.fetch(this.url("GetAllWebhookListeners"), b(U, F, $)).then((R) => v(R).then((X) => ({
35361
35361
  listeners: X.listeners
35362
35362
  })), (R) => {
35363
35363
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35364
35364
  }));
35365
- he(this, "getWebhookListener", (U, F, $) => this.fetch(this.url("GetWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35365
+ fe(this, "getWebhookListener", (U, F, $) => this.fetch(this.url("GetWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35366
35366
  listener: X.listener
35367
35367
  })), (R) => {
35368
35368
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35369
35369
  }));
35370
- he(this, "addWebhookListener", (U, F, $) => this.fetch(this.url("AddWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35370
+ fe(this, "addWebhookListener", (U, F, $) => this.fetch(this.url("AddWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35371
35371
  status: X.status,
35372
35372
  listener: X.listener
35373
35373
  })), (R) => {
35374
35374
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35375
35375
  }));
35376
- he(this, "updateWebhookListener", (U, F, $) => this.fetch(this.url("UpdateWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35376
+ fe(this, "updateWebhookListener", (U, F, $) => this.fetch(this.url("UpdateWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35377
35377
  status: X.status
35378
35378
  })), (R) => {
35379
35379
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35380
35380
  }));
35381
- he(this, "removeWebhookListener", (U, F, $) => this.fetch(this.url("RemoveWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35381
+ fe(this, "removeWebhookListener", (U, F, $) => this.fetch(this.url("RemoveWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35382
35382
  status: X.status
35383
35383
  })), (R) => {
35384
35384
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35385
35385
  }));
35386
- he(this, "removeAllWebhookListeners", (U, F, $) => this.fetch(this.url("RemoveAllWebhookListeners"), b(U, F, $)).then((R) => v(R).then((X) => ({
35386
+ fe(this, "removeAllWebhookListeners", (U, F, $) => this.fetch(this.url("RemoveAllWebhookListeners"), b(U, F, $)).then((R) => v(R).then((X) => ({
35387
35387
  status: X.status
35388
35388
  })), (R) => {
35389
35389
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35390
35390
  }));
35391
- he(this, "toggleWebhookListener", (U, F, $) => this.fetch(this.url("ToggleWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35391
+ fe(this, "toggleWebhookListener", (U, F, $) => this.fetch(this.url("ToggleWebhookListener"), b(U, F, $)).then((R) => v(R).then((X) => ({
35392
35392
  webhookListener: X.webhookListener
35393
35393
  })), (R) => {
35394
35394
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35395
35395
  }));
35396
- he(this, "pauseAllWebhookListeners", (U, F, $) => this.fetch(this.url("PauseAllWebhookListeners"), b(U, F, $)).then((R) => v(R).then((X) => ({
35396
+ fe(this, "pauseAllWebhookListeners", (U, F, $) => this.fetch(this.url("PauseAllWebhookListeners"), b(U, F, $)).then((R) => v(R).then((X) => ({
35397
35397
  status: X.status
35398
35398
  })), (R) => {
35399
35399
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35400
35400
  }));
35401
- he(this, "resumeAllWebhookListeners", (U, F, $) => this.fetch(this.url("ResumeAllWebhookListeners"), b(U, F, $)).then((R) => v(R).then((X) => ({
35401
+ fe(this, "resumeAllWebhookListeners", (U, F, $) => this.fetch(this.url("ResumeAllWebhookListeners"), b(U, F, $)).then((R) => v(R).then((X) => ({
35402
35402
  status: X.status
35403
35403
  })), (R) => {
35404
35404
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35405
35405
  }));
35406
- he(this, "getOrderbookOrders", (U, F, $) => this.fetch(this.url("GetOrderbookOrders"), b(U, F, $)).then((R) => v(R).then((X) => ({
35406
+ fe(this, "getOrderbookOrders", (U, F, $) => this.fetch(this.url("GetOrderbookOrders"), b(U, F, $)).then((R) => v(R).then((X) => ({
35407
35407
  page: X.page,
35408
35408
  orders: X.orders
35409
35409
  })), (R) => {
35410
35410
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
35411
35411
  }));
35412
- he(this, "getTopOrders", (U, F, $) => this.fetch(this.url("GetTopOrders"), b(U, F, $)).then((R) => v(R).then((X) => ({
35412
+ fe(this, "getTopOrders", (U, F, $) => this.fetch(this.url("GetTopOrders"), b(U, F, $)).then((R) => v(R).then((X) => ({
35413
35413
  orders: X.orders
35414
35414
  })), (R) => {
35415
35415
  throw k.new({ cause: `fetch(): ${R.message || ""}` });
@@ -35443,8 +35443,8 @@ function i5() {
35443
35443
  let Fe = "", Ie = Date.now();
35444
35444
  const Oe = 11 * 1e3;
35445
35445
  let Se = !1;
35446
- const ue = setInterval(() => {
35447
- Date.now() - Ie > Oe && (Se = !0, clearInterval(ue), se.releaseLock());
35446
+ const he = setInterval(() => {
35447
+ Date.now() - Ie > Oe && (Se = !0, clearInterval(he), se.releaseLock());
35448
35448
  }, Oe);
35449
35449
  for (; ; ) {
35450
35450
  let Be, Ne;
@@ -35522,13 +35522,13 @@ function i5() {
35522
35522
  class w extends Error {
35523
35523
  constructor(F, $, R, X, Ae) {
35524
35524
  super(R);
35525
- he(this, "name");
35526
- he(this, "code");
35527
- he(this, "message");
35528
- he(this, "status");
35529
- he(this, "cause");
35525
+ fe(this, "name");
35526
+ fe(this, "code");
35527
+ fe(this, "message");
35528
+ fe(this, "status");
35529
+ fe(this, "cause");
35530
35530
  /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */
35531
- he(this, "msg");
35531
+ fe(this, "msg");
35532
35532
  this.name = F || "WebrpcError", this.code = typeof $ == "number" ? $ : 0, this.message = R || `endpoint error ${this.code}`, this.msg = this.message, this.status = typeof X == "number" ? X : 0, this.cause = Ae, Object.setPrototypeOf(this, w.prototype);
35533
35533
  }
35534
35534
  static new(F) {
@@ -35710,18 +35710,18 @@ function i5() {
35710
35710
  }
35711
35711
  }
35712
35712
  e.MaxAccessKeysError = J;
35713
- class le extends w {
35713
+ class ce extends w {
35714
35714
  constructor(U = "AtLeastOneKey", F = 1302, $ = "You need at least one Access Key", R = 0, X) {
35715
- super(U, F, $, R, X), Object.setPrototypeOf(this, le.prototype);
35715
+ super(U, F, $, R, X), Object.setPrototypeOf(this, ce.prototype);
35716
35716
  }
35717
35717
  }
35718
- e.AtLeastOneKeyError = le;
35719
- class pe extends w {
35718
+ e.AtLeastOneKeyError = ce;
35719
+ class de extends w {
35720
35720
  constructor(U = "Timeout", F = 1900, $ = "Request timed out", R = 0, X) {
35721
- super(U, F, $, R, X), Object.setPrototypeOf(this, pe.prototype);
35721
+ super(U, F, $, R, X), Object.setPrototypeOf(this, de.prototype);
35722
35722
  }
35723
35723
  }
35724
- e.TimeoutError = pe;
35724
+ e.TimeoutError = de;
35725
35725
  class me extends w {
35726
35726
  constructor(U = "InvalidArgument", F = 2001, $ = "Invalid argument", R = 0, X) {
35727
35727
  super(U, F, $, R, X), Object.setPrototypeOf(this, me.prototype);
@@ -35752,12 +35752,12 @@ function i5() {
35752
35752
  }
35753
35753
  }
35754
35754
  e.NotFoundError = We;
35755
- class de extends w {
35755
+ class ue extends w {
35756
35756
  constructor(U = "MetadataCallFailed", F = 3003, $ = "Metadata service call failed", R = 0, X) {
35757
- super(U, F, $, R, X), Object.setPrototypeOf(this, de.prototype);
35757
+ super(U, F, $, R, X), Object.setPrototypeOf(this, ue.prototype);
35758
35758
  }
35759
35759
  }
35760
- e.MetadataCallFailedError = de;
35760
+ e.MetadataCallFailedError = ue;
35761
35761
  var we;
35762
35762
  (function(B) {
35763
35763
  B.WebrpcEndpoint = "WebrpcEndpoint", B.WebrpcRequestFailed = "WebrpcRequestFailed", B.WebrpcBadRoute = "WebrpcBadRoute", B.WebrpcBadMethod = "WebrpcBadMethod", B.WebrpcBadRequest = "WebrpcBadRequest", B.WebrpcBadResponse = "WebrpcBadResponse", B.WebrpcServerPanic = "WebrpcServerPanic", B.WebrpcInternalError = "WebrpcInternalError", B.WebrpcClientDisconnected = "WebrpcClientDisconnected", B.WebrpcStreamLost = "WebrpcStreamLost", B.WebrpcStreamFinished = "WebrpcStreamFinished", B.Unauthorized = "Unauthorized", B.PermissionDenied = "PermissionDenied", B.SessionExpired = "SessionExpired", B.MethodNotFound = "MethodNotFound", B.RequestConflict = "RequestConflict", B.Aborted = "Aborted", B.Geoblocked = "Geoblocked", B.RateLimited = "RateLimited", B.ProjectNotFound = "ProjectNotFound", B.AccessKeyNotFound = "AccessKeyNotFound", B.AccessKeyMismatch = "AccessKeyMismatch", B.InvalidOrigin = "InvalidOrigin", B.InvalidService = "InvalidService", B.UnauthorizedUser = "UnauthorizedUser", B.QuotaExceeded = "QuotaExceeded", B.RateLimit = "RateLimit", B.NoDefaultKey = "NoDefaultKey", B.MaxAccessKeys = "MaxAccessKeys", B.AtLeastOneKey = "AtLeastOneKey", B.Timeout = "Timeout", B.InvalidArgument = "InvalidArgument", B.Unavailable = "Unavailable", B.QueryFailed = "QueryFailed", B.ResourceExhausted = "ResourceExhausted", B.NotFound = "NotFound", B.MetadataCallFailed = "MetadataCallFailed";
@@ -35792,14 +35792,14 @@ function i5() {
35792
35792
  1201: re,
35793
35793
  1300: oe,
35794
35794
  1301: J,
35795
- 1302: le,
35796
- 1900: pe,
35795
+ 1302: ce,
35796
+ 1900: de,
35797
35797
  2001: me,
35798
35798
  2002: ve,
35799
35799
  2003: ke,
35800
35800
  2004: $e,
35801
35801
  3e3: We,
35802
- 3003: de
35802
+ 3003: ue
35803
35803
  };
35804
35804
  })(cm)), cm;
35805
35805
  }
@@ -35878,57 +35878,57 @@ function l5() {
35878
35878
  })(f || (e.ContractVerificationStatus = f = {}));
35879
35879
  class p {
35880
35880
  constructor(B, U) {
35881
- he(this, "hostname");
35882
- he(this, "fetch");
35883
- he(this, "path", "/rpc/IndexerGateway/");
35884
- he(this, "getNativeTokenBalance", (B, U, F) => this.fetch(this.url("GetNativeTokenBalance"), y(B, U, F)).then(($) => b($).then((R) => ({
35881
+ fe(this, "hostname");
35882
+ fe(this, "fetch");
35883
+ fe(this, "path", "/rpc/IndexerGateway/");
35884
+ fe(this, "getNativeTokenBalance", (B, U, F) => this.fetch(this.url("GetNativeTokenBalance"), y(B, U, F)).then(($) => b($).then((R) => ({
35885
35885
  balances: R.balances
35886
35886
  })), ($) => {
35887
35887
  throw T.new({ cause: `fetch(): ${$.message || ""}` });
35888
35888
  }));
35889
- he(this, "getTokenBalances", (B, U, F) => this.fetch(this.url("GetTokenBalances"), y(B, U, F)).then(($) => b($).then((R) => ({
35889
+ fe(this, "getTokenBalances", (B, U, F) => this.fetch(this.url("GetTokenBalances"), y(B, U, F)).then(($) => b($).then((R) => ({
35890
35890
  page: R.page,
35891
35891
  balances: R.balances
35892
35892
  })), ($) => {
35893
35893
  throw T.new({ cause: `fetch(): ${$.message || ""}` });
35894
35894
  }));
35895
- he(this, "getTokenBalancesSummary", (B, U, F) => this.fetch(this.url("GetTokenBalancesSummary"), y(B, U, F)).then(($) => b($).then((R) => ({
35895
+ fe(this, "getTokenBalancesSummary", (B, U, F) => this.fetch(this.url("GetTokenBalancesSummary"), y(B, U, F)).then(($) => b($).then((R) => ({
35896
35896
  page: R.page,
35897
35897
  nativeBalances: R.nativeBalances,
35898
35898
  balances: R.balances
35899
35899
  })), ($) => {
35900
35900
  throw T.new({ cause: `fetch(): ${$.message || ""}` });
35901
35901
  }));
35902
- he(this, "getTokenBalancesDetails", (B, U, F) => this.fetch(this.url("GetTokenBalancesDetails"), y(B, U, F)).then(($) => b($).then((R) => ({
35902
+ fe(this, "getTokenBalancesDetails", (B, U, F) => this.fetch(this.url("GetTokenBalancesDetails"), y(B, U, F)).then(($) => b($).then((R) => ({
35903
35903
  page: R.page,
35904
35904
  nativeBalances: R.nativeBalances,
35905
35905
  balances: R.balances
35906
35906
  })), ($) => {
35907
35907
  throw T.new({ cause: `fetch(): ${$.message || ""}` });
35908
35908
  }));
35909
- he(this, "getTokenBalancesByContract", (B, U, F) => this.fetch(this.url("GetTokenBalancesByContract"), y(B, U, F)).then(($) => b($).then((R) => ({
35909
+ fe(this, "getTokenBalancesByContract", (B, U, F) => this.fetch(this.url("GetTokenBalancesByContract"), y(B, U, F)).then(($) => b($).then((R) => ({
35910
35910
  page: R.page,
35911
35911
  balances: R.balances
35912
35912
  })), ($) => {
35913
35913
  throw T.new({ cause: `fetch(): ${$.message || ""}` });
35914
35914
  }));
35915
- he(this, "getBalanceUpdates", (B, U, F) => this.fetch(this.url("GetBalanceUpdates"), y(B, U, F)).then(($) => b($).then((R) => ({
35915
+ fe(this, "getBalanceUpdates", (B, U, F) => this.fetch(this.url("GetBalanceUpdates"), y(B, U, F)).then(($) => b($).then((R) => ({
35916
35916
  page: R.page,
35917
35917
  balances: R.balances
35918
35918
  })), ($) => {
35919
35919
  throw T.new({ cause: `fetch(): ${$.message || ""}` });
35920
35920
  }));
35921
- he(this, "ping", (B, U) => this.fetch(this.url("Ping"), y({}, B, U)).then((F) => b(F).then(($) => ({
35921
+ fe(this, "ping", (B, U) => this.fetch(this.url("Ping"), y({}, B, U)).then((F) => b(F).then(($) => ({
35922
35922
  status: $.status
35923
35923
  })), (F) => {
35924
35924
  throw T.new({ cause: `fetch(): ${F.message || ""}` });
35925
35925
  }));
35926
- he(this, "version", (B, U) => this.fetch(this.url("Version"), y({}, B, U)).then((F) => b(F).then(($) => ({
35926
+ fe(this, "version", (B, U) => this.fetch(this.url("Version"), y({}, B, U)).then((F) => b(F).then(($) => ({
35927
35927
  version: $.version
35928
35928
  })), (F) => {
35929
35929
  throw T.new({ cause: `fetch(): ${F.message || ""}` });
35930
35930
  }));
35931
- he(this, "runtimeStatus", (B, U) => this.fetch(this.url("RuntimeStatus"), y({}, B, U)).then((F) => b(F).then(($) => ({
35931
+ fe(this, "runtimeStatus", (B, U) => this.fetch(this.url("RuntimeStatus"), y({}, B, U)).then((F) => b(F).then(($) => ({
35932
35932
  status: $.status
35933
35933
  })), (F) => {
35934
35934
  throw T.new({ cause: `fetch(): ${F.message || ""}` });
@@ -35968,13 +35968,13 @@ function l5() {
35968
35968
  class v extends Error {
35969
35969
  constructor(U, F, $, R, X) {
35970
35970
  super($);
35971
- he(this, "name");
35972
- he(this, "code");
35973
- he(this, "message");
35974
- he(this, "status");
35975
- he(this, "cause");
35971
+ fe(this, "name");
35972
+ fe(this, "code");
35973
+ fe(this, "message");
35974
+ fe(this, "status");
35975
+ fe(this, "cause");
35976
35976
  /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */
35977
- he(this, "msg");
35977
+ fe(this, "msg");
35978
35978
  this.name = U || "WebrpcError", this.code = typeof F == "number" ? F : 0, this.message = $ || `endpoint error ${this.code}`, this.msg = this.message, this.status = typeof R == "number" ? R : 0, this.cause = X, Object.setPrototypeOf(this, v.prototype);
35979
35979
  }
35980
35980
  static new(U) {
@@ -36162,18 +36162,18 @@ function l5() {
36162
36162
  }
36163
36163
  }
36164
36164
  e.AtLeastOneKeyError = J;
36165
- class le extends v {
36165
+ class ce extends v {
36166
36166
  constructor(B = "Timeout", U = 1900, F = "Request timed out", $ = 0, R) {
36167
- super(B, U, F, $, R), Object.setPrototypeOf(this, le.prototype);
36167
+ super(B, U, F, $, R), Object.setPrototypeOf(this, ce.prototype);
36168
36168
  }
36169
36169
  }
36170
- e.TimeoutError = le;
36171
- class pe extends v {
36170
+ e.TimeoutError = ce;
36171
+ class de extends v {
36172
36172
  constructor(B = "InvalidArgument", U = 2001, F = "Invalid argument", $ = 0, R) {
36173
- super(B, U, F, $, R), Object.setPrototypeOf(this, pe.prototype);
36173
+ super(B, U, F, $, R), Object.setPrototypeOf(this, de.prototype);
36174
36174
  }
36175
36175
  }
36176
- e.InvalidArgumentError = pe;
36176
+ e.InvalidArgumentError = de;
36177
36177
  class me extends v {
36178
36178
  constructor(B = "Unavailable", U = 2002, F = "Unavailable resource", $ = 0, R) {
36179
36179
  super(B, U, F, $, R), Object.setPrototypeOf(this, me.prototype);
@@ -36204,10 +36204,10 @@ function l5() {
36204
36204
  }
36205
36205
  }
36206
36206
  e.MetadataCallFailedError = We;
36207
- var de;
36207
+ var ue;
36208
36208
  (function(ie) {
36209
36209
  ie.WebrpcEndpoint = "WebrpcEndpoint", ie.WebrpcRequestFailed = "WebrpcRequestFailed", ie.WebrpcBadRoute = "WebrpcBadRoute", ie.WebrpcBadMethod = "WebrpcBadMethod", ie.WebrpcBadRequest = "WebrpcBadRequest", ie.WebrpcBadResponse = "WebrpcBadResponse", ie.WebrpcServerPanic = "WebrpcServerPanic", ie.WebrpcInternalError = "WebrpcInternalError", ie.WebrpcClientDisconnected = "WebrpcClientDisconnected", ie.WebrpcStreamLost = "WebrpcStreamLost", ie.WebrpcStreamFinished = "WebrpcStreamFinished", ie.Unauthorized = "Unauthorized", ie.PermissionDenied = "PermissionDenied", ie.SessionExpired = "SessionExpired", ie.MethodNotFound = "MethodNotFound", ie.RequestConflict = "RequestConflict", ie.Aborted = "Aborted", ie.Geoblocked = "Geoblocked", ie.RateLimited = "RateLimited", ie.ProjectNotFound = "ProjectNotFound", ie.AccessKeyNotFound = "AccessKeyNotFound", ie.AccessKeyMismatch = "AccessKeyMismatch", ie.InvalidOrigin = "InvalidOrigin", ie.InvalidService = "InvalidService", ie.UnauthorizedUser = "UnauthorizedUser", ie.QuotaExceeded = "QuotaExceeded", ie.RateLimit = "RateLimit", ie.NoDefaultKey = "NoDefaultKey", ie.MaxAccessKeys = "MaxAccessKeys", ie.AtLeastOneKey = "AtLeastOneKey", ie.Timeout = "Timeout", ie.InvalidArgument = "InvalidArgument", ie.Unavailable = "Unavailable", ie.QueryFailed = "QueryFailed", ie.ResourceExhausted = "ResourceExhausted", ie.NotFound = "NotFound", ie.MetadataCallFailed = "MetadataCallFailed";
36210
- })(de || (e.errors = de = {}));
36210
+ })(ue || (e.errors = ue = {}));
36211
36211
  const we = {
36212
36212
  0: w,
36213
36213
  [-1]: T,
@@ -36239,8 +36239,8 @@ function l5() {
36239
36239
  1300: re,
36240
36240
  1301: oe,
36241
36241
  1302: J,
36242
- 1900: le,
36243
- 2001: pe,
36242
+ 1900: ce,
36243
+ 2001: de,
36244
36244
  2002: me,
36245
36245
  2003: ve,
36246
36246
  2004: ke,
@@ -36286,9 +36286,9 @@ function Zte() {
36286
36286
  class i extends a.Indexer {
36287
36287
  constructor(h, f, p) {
36288
36288
  super(h.endsWith("/") ? h.slice(0, -1) : h, fetch);
36289
- he(this, "projectAccessKey");
36290
- he(this, "jwtAuth");
36291
- he(this, "_fetch", (h, f) => {
36289
+ fe(this, "projectAccessKey");
36290
+ fe(this, "jwtAuth");
36291
+ fe(this, "_fetch", (h, f) => {
36292
36292
  const p = {}, y = this.jwtAuth, b = this.projectAccessKey;
36293
36293
  return y && y.length > 0 && (p.Authorization = `BEARER ${y}`), b && b.length > 0 && (p["X-Access-Key"] = b), f.headers = { ...f.headers, ...p }, fetch(h, f);
36294
36294
  });
@@ -36299,9 +36299,9 @@ function Zte() {
36299
36299
  class c extends o.IndexerGateway {
36300
36300
  constructor(h, f, p) {
36301
36301
  super(h.endsWith("/") ? h.slice(0, -1) : h, fetch);
36302
- he(this, "projectAccessKey");
36303
- he(this, "jwtAuth");
36304
- he(this, "_fetch", (h, f) => {
36302
+ fe(this, "projectAccessKey");
36303
+ fe(this, "jwtAuth");
36304
+ fe(this, "_fetch", (h, f) => {
36305
36305
  const p = {}, y = this.jwtAuth, b = this.projectAccessKey;
36306
36306
  return y && y.length > 0 && (p.Authorization = `BEARER ${y}`), b && b.length > 0 && (p["X-Access-Key"] = b), f.headers = { ...f.headers, ...p }, fetch(h, f);
36307
36307
  });
@@ -36432,10 +36432,10 @@ var b5;
36432
36432
  })(b5 || (b5 = {}));
36433
36433
  class nne {
36434
36434
  constructor(t, n) {
36435
- he(this, "hostname");
36436
- he(this, "fetch");
36437
- he(this, "path", "/rpc/Trails/");
36438
- he(this, "queryKey", {
36435
+ fe(this, "hostname");
36436
+ fe(this, "fetch");
36437
+ fe(this, "path", "/rpc/Trails/");
36438
+ fe(this, "queryKey", {
36439
36439
  ping: () => ["Trails", "ping"],
36440
36440
  runtimeStatus: () => ["Trails", "runtimeStatus"],
36441
36441
  clock: () => ["Trails", "clock"],
@@ -36456,61 +36456,61 @@ class nne {
36456
36456
  getTrailsContracts: () => ["Trails", "getTrailsContracts"],
36457
36457
  getIntentTransactionHistory: (t) => ["Trails", "getIntentTransactionHistory", t]
36458
36458
  });
36459
- he(this, "ping", (t, n) => this.fetch(this.url("Ping"), Wn("{}", t, n)).then((r) => Hn(r).then((s) => Gn(s, "PingResponse")), (r) => {
36459
+ fe(this, "ping", (t, n) => this.fetch(this.url("Ping"), Wn("{}", t, n)).then((r) => Hn(r).then((s) => Gn(s, "PingResponse")), (r) => {
36460
36460
  throw Fn.new({ cause: `fetch(): ${r instanceof Error ? r.message : String(r)}` });
36461
36461
  }));
36462
- he(this, "runtimeStatus", (t, n) => this.fetch(this.url("RuntimeStatus"), Wn("{}", t, n)).then((r) => Hn(r).then((s) => Gn(s, "RuntimeStatusResponse")), (r) => {
36462
+ fe(this, "runtimeStatus", (t, n) => this.fetch(this.url("RuntimeStatus"), Wn("{}", t, n)).then((r) => Hn(r).then((s) => Gn(s, "RuntimeStatusResponse")), (r) => {
36463
36463
  throw Fn.new({ cause: `fetch(): ${r instanceof Error ? r.message : String(r)}` });
36464
36464
  }));
36465
- he(this, "clock", (t, n) => this.fetch(this.url("Clock"), Wn("{}", t, n)).then((r) => Hn(r).then((s) => Gn(s, "ClockResponse")), (r) => {
36465
+ fe(this, "clock", (t, n) => this.fetch(this.url("Clock"), Wn("{}", t, n)).then((r) => Hn(r).then((s) => Gn(s, "ClockResponse")), (r) => {
36466
36466
  throw Fn.new({ cause: `fetch(): ${r instanceof Error ? r.message : String(r)}` });
36467
36467
  }));
36468
- he(this, "quoteIntent", (t, n, r) => this.fetch(this.url("QuoteIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "QuoteIntentResponse")), (s) => {
36468
+ fe(this, "quoteIntent", (t, n, r) => this.fetch(this.url("QuoteIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "QuoteIntentResponse")), (s) => {
36469
36469
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36470
36470
  }));
36471
- he(this, "commitIntent", (t, n, r) => this.fetch(this.url("CommitIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "CommitIntentResponse")), (s) => {
36471
+ fe(this, "commitIntent", (t, n, r) => this.fetch(this.url("CommitIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "CommitIntentResponse")), (s) => {
36472
36472
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36473
36473
  }));
36474
- he(this, "executeIntent", (t, n, r) => this.fetch(this.url("ExecuteIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "ExecuteIntentResponse")), (s) => {
36474
+ fe(this, "executeIntent", (t, n, r) => this.fetch(this.url("ExecuteIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "ExecuteIntentResponse")), (s) => {
36475
36475
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36476
36476
  }));
36477
- he(this, "waitIntentReceipt", (t, n, r) => this.fetch(this.url("WaitIntentReceipt"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "WaitIntentReceiptResponse")), (s) => {
36477
+ fe(this, "waitIntentReceipt", (t, n, r) => this.fetch(this.url("WaitIntentReceipt"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "WaitIntentReceiptResponse")), (s) => {
36478
36478
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36479
36479
  }));
36480
- he(this, "getIntentReceipt", (t, n, r) => this.fetch(this.url("GetIntentReceipt"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetIntentReceiptResponse")), (s) => {
36480
+ fe(this, "getIntentReceipt", (t, n, r) => this.fetch(this.url("GetIntentReceipt"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetIntentReceiptResponse")), (s) => {
36481
36481
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36482
36482
  }));
36483
- he(this, "getIntent", (t, n, r) => this.fetch(this.url("GetIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetIntentResponse")), (s) => {
36483
+ fe(this, "getIntent", (t, n, r) => this.fetch(this.url("GetIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetIntentResponse")), (s) => {
36484
36484
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36485
36485
  }));
36486
- he(this, "searchIntents", (t, n, r) => this.fetch(this.url("SearchIntents"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "SearchIntentsResponse")), (s) => {
36486
+ fe(this, "searchIntents", (t, n, r) => this.fetch(this.url("SearchIntents"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "SearchIntentsResponse")), (s) => {
36487
36487
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36488
36488
  }));
36489
- he(this, "getIntentHistory", (t, n, r) => this.fetch(this.url("GetIntentHistory"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetIntentHistoryResponse")), (s) => {
36489
+ fe(this, "getIntentHistory", (t, n, r) => this.fetch(this.url("GetIntentHistory"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetIntentHistoryResponse")), (s) => {
36490
36490
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36491
36491
  }));
36492
- he(this, "abortIntent", (t, n, r) => this.fetch(this.url("AbortIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "AbortIntentResponse")), (s) => {
36492
+ fe(this, "abortIntent", (t, n, r) => this.fetch(this.url("AbortIntent"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "AbortIntentResponse")), (s) => {
36493
36493
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36494
36494
  }));
36495
- he(this, "getChains", (t, n, r) => this.fetch(this.url("GetChains"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetChainsResponse")), (s) => {
36495
+ fe(this, "getChains", (t, n, r) => this.fetch(this.url("GetChains"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetChainsResponse")), (s) => {
36496
36496
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36497
36497
  }));
36498
- he(this, "getExactOutputRoutes", (t, n, r) => this.fetch(this.url("GetExactOutputRoutes"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetExactOutputRoutesResponse")), (s) => {
36498
+ fe(this, "getExactOutputRoutes", (t, n, r) => this.fetch(this.url("GetExactOutputRoutes"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetExactOutputRoutesResponse")), (s) => {
36499
36499
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36500
36500
  }));
36501
- he(this, "getExactInputRoutes", (t, n, r) => this.fetch(this.url("GetExactInputRoutes"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetExactInputRoutesResponse")), (s) => {
36501
+ fe(this, "getExactInputRoutes", (t, n, r) => this.fetch(this.url("GetExactInputRoutes"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetExactInputRoutesResponse")), (s) => {
36502
36502
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36503
36503
  }));
36504
- he(this, "getTokenList", (t, n, r) => this.fetch(this.url("GetTokenList"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetTokenListResponse")), (s) => {
36504
+ fe(this, "getTokenList", (t, n, r) => this.fetch(this.url("GetTokenList"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetTokenListResponse")), (s) => {
36505
36505
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36506
36506
  }));
36507
- he(this, "getTokenPrices", (t, n, r) => this.fetch(this.url("GetTokenPrices"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetTokenPricesResponse")), (s) => {
36507
+ fe(this, "getTokenPrices", (t, n, r) => this.fetch(this.url("GetTokenPrices"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetTokenPricesResponse")), (s) => {
36508
36508
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36509
36509
  }));
36510
- he(this, "getTrailsContracts", (t, n) => this.fetch(this.url("GetTrailsContracts"), Wn("{}", t, n)).then((r) => Hn(r).then((s) => Gn(s, "GetTrailsContractsResponse")), (r) => {
36510
+ fe(this, "getTrailsContracts", (t, n) => this.fetch(this.url("GetTrailsContracts"), Wn("{}", t, n)).then((r) => Hn(r).then((s) => Gn(s, "GetTrailsContractsResponse")), (r) => {
36511
36511
  throw Fn.new({ cause: `fetch(): ${r instanceof Error ? r.message : String(r)}` });
36512
36512
  }));
36513
- he(this, "getIntentTransactionHistory", (t, n, r) => this.fetch(this.url("GetIntentTransactionHistory"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetIntentTransactionHistoryResponse")), (s) => {
36513
+ fe(this, "getIntentTransactionHistory", (t, n, r) => this.fetch(this.url("GetIntentTransactionHistory"), Wn($n(t), n, r)).then((s) => Hn(s).then((a) => Gn(a, "GetIntentTransactionHistoryResponse")), (s) => {
36514
36514
  throw Fn.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
36515
36515
  }));
36516
36516
  this.hostname = t.replace(/\/*$/, ""), this.fetch = (r, s) => n(r, s);
@@ -36654,8 +36654,8 @@ const $n = (e) => JSON.stringify(e, (t, n) => typeof n == "bigint" ? n.toString(
36654
36654
  let wt = class hD extends Error {
36655
36655
  constructor(n = {}) {
36656
36656
  super(n.message);
36657
- he(this, "code");
36658
- he(this, "status");
36657
+ fe(this, "code");
36658
+ fe(this, "status");
36659
36659
  this.name = n.name || "WebrpcEndpointError", this.code = typeof n.code == "number" ? n.code : 0, this.message = n.message || "endpoint error", this.status = typeof n.status == "number" ? n.status : 400, n.cause !== void 0 && (this.cause = n.cause), Object.setPrototypeOf(this, hD.prototype);
36660
36660
  }
36661
36661
  static new(n) {
@@ -36908,7 +36908,7 @@ function L1({
36908
36908
  }
36909
36909
  const da = (e) => {
36910
36910
  const t = hn();
36911
- return fe(() => L1({
36911
+ return pe(() => L1({
36912
36912
  apiKey: e?.apiKey || t.trailsApiKey || "",
36913
36913
  hostname: e?.hostname || t.trailsApiUrl,
36914
36914
  jwt: e?.jwt
@@ -37481,7 +37481,7 @@ function Ec({ chainId: e } = {}) {
37481
37481
  // Don't refetch when window regains focus
37482
37482
  refetchOnReconnect: !1
37483
37483
  // Don't refetch on network reconnect
37484
- }), a = fe(() => {
37484
+ }), a = pe(() => {
37485
37485
  const i = /* @__PURE__ */ new Map();
37486
37486
  return r.forEach((c) => {
37487
37487
  const d = `${c.chainId}-${c.contractAddress.toLowerCase()}`;
@@ -37492,7 +37492,7 @@ function Ec({ chainId: e } = {}) {
37492
37492
  }), Array.from(i.values());
37493
37493
  }, [r, t]);
37494
37494
  return {
37495
- supportedTokens: fe(() => e ? a.filter((i) => i.chainId === e) : a, [a, e]) || [],
37495
+ supportedTokens: pe(() => e ? a.filter((i) => i.chainId === e) : a, [a, e]) || [],
37496
37496
  isLoadingTokens: s
37497
37497
  };
37498
37498
  }
@@ -37704,7 +37704,7 @@ function Fs({
37704
37704
  return `https://assets.sequence.info/images/tokens/large/${e}/${t.toLowerCase()}.webp`;
37705
37705
  }
37706
37706
  function j1() {
37707
- return fe(
37707
+ return pe(
37708
37708
  () => ({
37709
37709
  getTokenImageUrl: (e) => Fs(e)
37710
37710
  }),
@@ -37722,7 +37722,7 @@ function Uf({
37722
37722
  address: e,
37723
37723
  chainId: t
37724
37724
  }) {
37725
- const { getTokenImageUrl: n } = j1(), r = e?.startsWith("0x") ?? !1, s = Xt(e) && !!t, a = fe(() => !r || !t ? null : dU(t, e), [r, t, e]), o = {
37725
+ const { getTokenImageUrl: n } = j1(), r = e?.startsWith("0x") ?? !1, s = Xt(e) && !!t, a = pe(() => !r || !t ? null : dU(t, e), [r, t, e]), o = {
37726
37726
  address: e,
37727
37727
  abi: qo,
37728
37728
  chainId: t
@@ -37732,7 +37732,7 @@ function Uf({
37732
37732
  { ...o, functionName: "symbol" },
37733
37733
  { ...o, functionName: "decimals" }
37734
37734
  ] : []
37735
- }), c = i?.error ?? i?.data?.find((y) => y.error)?.error ?? null, [d, u, h] = i.data ?? [], f = Ce(t), p = fe(() => {
37735
+ }), c = i?.error ?? i?.data?.find((y) => y.error)?.error ?? null, [d, u, h] = i.data ?? [], f = Ce(t), p = pe(() => {
37736
37736
  if (s) {
37737
37737
  const y = f?.nativeCurrency.symbol || "Unknown", b = f?.nativeCurrency.name || "Unknown", v = f?.nativeCurrency.decimals ?? 18, w = {
37738
37738
  tokenId: `${y}-${f?.name || ""}`,
@@ -39170,7 +39170,7 @@ const A5 = "trails-fee-option-preference", I5 = (e, t) => `${e ?? "unknown"}:${!
39170
39170
  ), e.tokenSymbol ? `-- ${e.tokenSymbol}` : "--";
39171
39171
  }
39172
39172
  }, gU = tn(void 0), kre = ({ children: e, initialToken: t = null }) => {
39173
- const [n, r] = H(t), [s, a] = H(!1), [o, i] = H([]), [c, d] = H(void 0), [u, h] = H([]), f = fe(() => {
39173
+ const [n, r] = H(t), [s, a] = H(!1), [o, i] = H([]), [c, d] = H(void 0), [u, h] = H([]), f = pe(() => {
39174
39174
  const T = /* @__PURE__ */ new Map();
39175
39175
  for (const k of u)
39176
39176
  T.set(
@@ -39191,7 +39191,7 @@ const A5 = "trails-fee-option-preference", I5 = (e, t) => `${e ?? "unknown"}:${!
39191
39191
  }
39192
39192
  }, []), y = Te(() => {
39193
39193
  r(null), a(!1);
39194
- }, []), b = fe(() => o.length ? o.map((T) => {
39194
+ }, []), b = pe(() => o.length ? o.map((T) => {
39195
39195
  const k = c !== void 0 ? f.get(
39196
39196
  I5(c, T.tokenAddress)
39197
39197
  ) : void 0, x = !!k?.balance && c !== void 0, E = k?.balance ?? "0", C = T.amount ? T.amount.toString() : "0", I = x ? BigInt(E) < BigInt(C) : void 0, S = xre(T);
@@ -39492,7 +39492,7 @@ const Uo = /* @__PURE__ */ new Map(), il = {
39492
39492
  Uo.clear();
39493
39493
  },
39494
39494
  getAll: () => Array.from(Uo.keys())
39495
- }, Ore = "0.9.2", Mre = {
39495
+ }, Ore = "0.9.3", Mre = {
39496
39496
  version: Ore
39497
39497
  };
39498
39498
  let $i = null;
@@ -39596,7 +39596,7 @@ const dn = {
39596
39596
  };
39597
39597
  class AU {
39598
39598
  constructor(t) {
39599
- he(this, "sequenceProjectAccessKey");
39599
+ fe(this, "sequenceProjectAccessKey");
39600
39600
  this.sequenceProjectAccessKey = t;
39601
39601
  }
39602
39602
  updateProjectAccessKey(t) {
@@ -40266,8 +40266,8 @@ class AU {
40266
40266
  class Bre extends AU {
40267
40267
  constructor(n, r, s, a) {
40268
40268
  super(a);
40269
- he(this, "databeat");
40270
- he(this, "loggingEnabled", !1);
40269
+ fe(this, "databeat");
40270
+ fe(this, "loggingEnabled", !1);
40271
40271
  this.databeat = new NI(n, r, {
40272
40272
  userIdentTracking: !0,
40273
40273
  privacy: {
@@ -40324,7 +40324,7 @@ class $re extends AU {
40324
40324
  sequenceProjectAccessKey: r
40325
40325
  }) {
40326
40326
  super(r);
40327
- he(this, "loggingEnabled", !1);
40327
+ fe(this, "loggingEnabled", !1);
40328
40328
  this.loggingEnabled = n;
40329
40329
  }
40330
40330
  identifyUser(n) {
@@ -41361,9 +41361,9 @@ async function Bf({
41361
41361
  Ie
41362
41362
  );
41363
41363
  }
41364
- const le = C?.quote?.fromAmountUsd && C?.quote?.fromAmount ? C.quote.fromAmountUsd / Number(gn(C.quote.fromAmount, O.decimals)) : f ? Number(f) : 0, pe = C?.quote?.toAmountUsd && C?.quote?.toAmount ? C.quote.toAmountUsd / Number(gn(C.quote.toAmount, D.decimals)) : p ? Number(p) : 0, me = Tse(
41365
- le,
41366
- pe,
41364
+ const ce = C?.quote?.fromAmountUsd != null && C?.quote?.fromAmount != null ? C.quote.fromAmountUsd / Number(gn(C.quote.fromAmount, O.decimals)) : f != null ? Number(f) : 0, de = C?.quote?.toAmountUsd != null && C?.quote?.toAmount != null ? C.quote.toAmountUsd / Number(gn(C.quote.toAmount, D.decimals)) : p != null ? Number(p) : 0, me = Tse(
41365
+ ce,
41366
+ de,
41367
41367
  O.symbol,
41368
41368
  D.symbol
41369
41369
  ), ve = C?.quote?.routeProviders && Array.isArray(C.quote.routeProviders) ? C.quote.routeProviders.map((Ie) => {
@@ -41379,7 +41379,7 @@ async function Bf({
41379
41379
  }) : [], ke = Pt(T), {
41380
41380
  trailsFeeBreakdown: $e,
41381
41381
  totalFeesUsd: We,
41382
- totalFeesUsdDisplay: de,
41382
+ totalFeesUsdDisplay: ue,
41383
41383
  originGasUsd: we,
41384
41384
  destinationGasUsd: ie,
41385
41385
  totalGasUsd: B,
@@ -41468,6 +41468,8 @@ async function Bf({
41468
41468
  gasCostFormatted: J,
41469
41469
  originTokenRate: me.originTokenRate,
41470
41470
  destinationTokenRate: me.destinationTokenRate,
41471
+ originTokenPriceUsd: ce,
41472
+ destinationTokenPriceUsd: de,
41471
41473
  originAmountDisplay: fs(N),
41472
41474
  destinationAmountDisplay: fs(q),
41473
41475
  originAmountMinDisplay: fs(G),
@@ -41478,7 +41480,7 @@ async function Bf({
41478
41480
  noSufficientBalance: x || !1,
41479
41481
  trailsFeeBreakdown: $e,
41480
41482
  totalFeesUsd: We,
41481
- totalFeesUsdDisplay: de,
41483
+ totalFeesUsdDisplay: ue,
41482
41484
  originGasUsd: we,
41483
41485
  destinationGasUsd: ie,
41484
41486
  totalGasUsd: B,
@@ -44554,7 +44556,7 @@ async function P9(e, t) {
44554
44556
  });
44555
44557
  return V === "0x" ? { data: void 0 } : { data: V };
44556
44558
  } catch (G) {
44557
- const W = eie(G), { offchainLookup: M, offchainLookupSignature: _ } = await import("./ccip-g6lDdnrD.js");
44559
+ const W = eie(G), { offchainLookup: M, offchainLookupSignature: _ } = await import("./ccip-CDO_EkNr.js");
44558
44560
  if (e.ccipRead !== !1 && W?.slice(0, 10) === _ && x)
44559
44561
  return { data: await M(e, { data: W, to: x }) };
44560
44562
  throw j && W?.slice(0, 10) === "0x101bb98d" ? new Poe({ factory: f }) : joe(G, {
@@ -50565,10 +50567,10 @@ async function Cle({
50565
50567
  send: async ({
50566
50568
  onOriginSend: $e,
50567
50569
  depositTransactionHash: We,
50568
- commitOnly: de
50570
+ commitOnly: ue
50569
50571
  }) => {
50570
50572
  try {
50571
- if (de)
50573
+ if (ue)
50572
50574
  return {
50573
50575
  depositUserTxnReceipt: null,
50574
50576
  originIntentTransaction: null,
@@ -50819,7 +50821,7 @@ async function Cle({
50819
50821
  value: J.value
50820
50822
  }
50821
50823
  );
50822
- const le = await ll(
50824
+ const ce = await ll(
50823
50825
  V,
50824
50826
  {
50825
50827
  account: u.address,
@@ -50831,9 +50833,9 @@ async function Cle({
50831
50833
  );
50832
50834
  m.console.log(
50833
50835
  "[trails-sdk][gas-estimation] Estimated gas limit for quote:",
50834
- le
50836
+ ce
50835
50837
  ), Q.quote?.routeProviders && Q.quote.routeProviders.length === 1 && (w = Q.quote.routeProviders[0]);
50836
- const pe = await Bf({
50838
+ const de = await Bf({
50837
50839
  originDepositAddress: Q.originIntentAddress,
50838
50840
  destinationDepositAddress: Q.destinationIntentAddress,
50839
50841
  destinationAddress: i,
@@ -50852,14 +50854,14 @@ async function Cle({
50852
50854
  originNativeTokenPriceUsd: b,
50853
50855
  slippageTolerance: v,
50854
50856
  noSufficientBalance: q,
50855
- estimatedGasLimit: le,
50857
+ estimatedGasLimit: ce,
50856
50858
  intent: Q
50857
50859
  });
50858
- return T?.triggerCheckoutQuote && T.triggerCheckoutQuote(pe), re && C !== "sequence-waas" && m.console.log(
50860
+ return T?.triggerCheckoutQuote && T.triggerCheckoutQuote(de), re && C !== "sequence-waas" && m.console.log(
50859
50861
  "[trails-sdk] [GASLESS-FLOW] [FEE-SELECT] Gasless enabled for same-chain. Using gasFeeOptions from QuoteIntent response",
50860
50862
  { originChainId: N, gasFeeOptions: re }
50861
50863
  ), {
50862
- quote: pe,
50864
+ quote: de,
50863
50865
  feeOptions: re,
50864
50866
  send: async ({
50865
50867
  onOriginSend: me,
@@ -50868,12 +50870,12 @@ async function Cle({
50868
50870
  skipCommit: $e,
50869
50871
  commitOnly: We
50870
50872
  }) => {
50871
- const de = ve, we = de != null && de.tokenAddress !== void 0 && de.tokenAddress !== null && !Xt(de.tokenAddress) && C !== "sequence-waas";
50873
+ const ue = ve, we = ue != null && ue.tokenAddress !== void 0 && ue.tokenAddress !== null && !Xt(ue.tokenAddress) && C !== "sequence-waas";
50872
50874
  if (m.console.log(
50873
50875
  "[trails-sdk] [FEE-SELECT] [GASLESS-FLOW] send() called for same-chain:",
50874
50876
  {
50875
50877
  runtimeSelectedFeeOption: ve,
50876
- effectiveSelectedFeeOption: de,
50878
+ effectiveSelectedFeeOption: ue,
50877
50879
  effectiveGasless: we
50878
50880
  }
50879
50881
  ), x === "onramp-meld") {
@@ -51007,7 +51009,7 @@ async function Cle({
51007
51009
  feeOptions: re,
51008
51010
  trailsContracts: oe,
51009
51011
  trailsClient: I,
51010
- selectedFeeOption: de,
51012
+ selectedFeeOption: ue,
51011
51013
  walletId: C,
51012
51014
  abortSignal: S,
51013
51015
  checkoutOnHandlers: T,
@@ -51065,7 +51067,7 @@ async function Cle({
51065
51067
  "[trails-sdk] Checking if deposit amount is sufficient",
51066
51068
  {
51067
51069
  depositAddress: Q.originIntentAddress,
51068
- requiredAmount: pe.originAmount,
51070
+ requiredAmount: de.originAmount,
51069
51071
  tokenAddress: P
51070
51072
  }
51071
51073
  );
@@ -51074,7 +51076,7 @@ async function Cle({
51074
51076
  address: Q.originIntentAddress
51075
51077
  },
51076
51078
  tokenAddress: P,
51077
- depositAmount: pe.originAmount,
51079
+ depositAmount: de.originAmount,
51078
51080
  publicClient: V
51079
51081
  });
51080
51082
  if (!ct.hasEnoughBalance) {
@@ -51266,14 +51268,14 @@ async function Cle({
51266
51268
  Be
51267
51269
  );
51268
51270
  }
51269
- const ue = Ce(N);
51271
+ const he = Ce(N);
51270
51272
  if (se && (se?.status === "success" ? so(
51271
51273
  "Transfer Confirmed",
51272
- `Your transaction on ${ue?.name || "chain"} has been confirmed`,
51274
+ `Your transaction on ${he?.name || "chain"} has been confirmed`,
51273
51275
  "info"
51274
51276
  ) : so(
51275
51277
  "Transfer Failed",
51276
- `Your transaction on ${ue?.name || "chain"} failed`,
51278
+ `Your transaction on ${he?.name || "chain"} failed`,
51277
51279
  "error"
51278
51280
  )), se && se.status === "success") {
51279
51281
  const Be = f.some(
@@ -51673,8 +51675,8 @@ async function _le({
51673
51675
  throw new Error(
51674
51676
  "Invalid intent: depositTransaction.amount is missing or undefined"
51675
51677
  );
51676
- const le = Y.quote.toAmount, pe = Y.quote.toAmountMin;
51677
- if (!le)
51678
+ const ce = Y.quote.toAmount, de = Y.quote.toAmountMin;
51679
+ if (!ce)
51678
51680
  throw new Error("Invalid intent: quote.toAmount is missing or undefined");
51679
51681
  const me = sr(
51680
51682
  J,
@@ -51691,7 +51693,7 @@ async function _le({
51691
51693
  depositAmount: J,
51692
51694
  sourceTokenDecimals: y
51693
51695
  });
51694
- const ke = le.toString(), $e = sr(
51696
+ const ke = ce.toString(), $e = sr(
51695
51697
  ke,
51696
51698
  b
51697
51699
  ), We = Rf({
@@ -51706,7 +51708,7 @@ async function _le({
51706
51708
  destinationTokenDecimals: b,
51707
51709
  destinationTokenPriceUsd: p,
51708
51710
  effectiveDestinationTokenAmountUsd: We,
51709
- quoteToAmount: le
51711
+ quoteToAmount: ce
51710
51712
  }
51711
51713
  ), m.console.log(
51712
51714
  "[trails-sdk] effectiveDestinationTokenAmountUsd",
@@ -51720,7 +51722,7 @@ async function _le({
51720
51722
  destinationChainId: s
51721
51723
  }
51722
51724
  );
51723
- let de = !1;
51725
+ let ue = !1;
51724
51726
  if (!(L === "qr-code" || L === "onramp-exchange" || L === "onramp-meld")) {
51725
51727
  const { hasEnoughBalance: F } = await zo({
51726
51728
  account: x,
@@ -51728,7 +51730,7 @@ async function _le({
51728
51730
  depositAmount: J,
51729
51731
  publicClient: T
51730
51732
  });
51731
- F || (de = !0);
51733
+ F || (ue = !0);
51732
51734
  }
51733
51735
  const we = hL({
51734
51736
  originTokenAddress: n,
@@ -51768,9 +51770,9 @@ async function _le({
51768
51770
  trailsApiUrl: ee || "",
51769
51771
  destinationCalldata: u,
51770
51772
  originAmount: J,
51771
- destinationAmount: le.toString(),
51773
+ destinationAmount: ce.toString(),
51772
51774
  originAmountMin: J,
51773
- destinationAmountMin: pe.toString(),
51775
+ destinationAmountMin: de.toString(),
51774
51776
  originTokenAddress: n,
51775
51777
  destinationTokenAddress: a,
51776
51778
  originTokenPriceUsd: f?.toString() || null,
@@ -51787,7 +51789,7 @@ async function _le({
51787
51789
  priceImpactUsd: fse(Y),
51788
51790
  transactionStates: C,
51789
51791
  originNativeTokenPriceUsd: O,
51790
- noSufficientBalance: de,
51792
+ noSufficientBalance: ue,
51791
51793
  estimatedGasLimit: ie,
51792
51794
  intent: Y
51793
51795
  });
@@ -51878,7 +51880,7 @@ async function _le({
51878
51880
  b
51879
51881
  );
51880
51882
  let Fe = null, Ie = null, Oe = null;
51881
- const Se = DU(), ue = Se ? gv(k) : k, Be = n;
51883
+ const Se = DU(), he = Se ? gv(k) : k, Be = n;
51882
51884
  m.console.log("[trails-sdk] testnet", Se);
51883
51885
  const Ne = Ce(s);
51884
51886
  if (!Ne)
@@ -51936,7 +51938,7 @@ async function _le({
51936
51938
  {
51937
51939
  originTokenAddress: Be,
51938
51940
  paymasterUrl: v,
51939
- chain: ue.id,
51941
+ chain: he.id,
51940
51942
  account: x.address,
51941
51943
  depositAmount: J,
51942
51944
  originIntentAddress: oe,
@@ -51949,7 +51951,7 @@ async function _le({
51949
51951
  ), Fe = await fL({
51950
51952
  originTokenAddress: Be,
51951
51953
  paymasterUrl: v,
51952
- chain: ue,
51954
+ chain: he,
51953
51955
  account: x,
51954
51956
  depositAmount: J,
51955
51957
  originIntentAddress: oe,
@@ -52699,7 +52701,7 @@ function Vle({
52699
52701
  c && !i && m.console.warn(
52700
52702
  "[trails-sdk] [useQuote] Warning: 'toRecipient' is deprecated, use 'toAddress' instead"
52701
52703
  );
52702
- const I = i ?? c, S = fe(() => Date.now(), []);
52704
+ const I = i ?? c, S = pe(() => Date.now(), []);
52703
52705
  w && (globalThis.__testNodeGatewayEnv = w);
52704
52706
  const O = ze(new AbortController()), D = T ? (() => {
52705
52707
  const ke = new AbortController();
@@ -52718,7 +52720,7 @@ function Vle({
52718
52720
  const { trailsApiKey: G, trailsApiUrl: W, sequenceIndexerUrl: M } = hn(), _ = G, z = da({
52719
52721
  apiKey: G,
52720
52722
  hostname: W
52721
- }), A = Ll(), N = bb(n ?? void 0), P = bb(s ?? void 0), { supportedTokens: V } = Ec(), q = mL(), te = gL(), ee = fe(() => !p && (n === An.id || s === An.id) ? "lifi" : p ?? null, [p, n, s]), ae = fe(() => !y && (n === An.id || s === An.id) ? "lifi" : y ?? null, [y, n, s]), { data: Y } = _t({
52723
+ }), A = Ll(), N = bb(n ?? void 0), P = bb(s ?? void 0), { supportedTokens: V } = Ec(), q = mL(), te = gL(), ee = pe(() => !p && (n === An.id || s === An.id) ? "lifi" : p ?? null, [p, n, s]), ae = pe(() => !y && (n === An.id || s === An.id) ? "lifi" : y ?? null, [y, n, s]), { data: Y } = _t({
52722
52724
  queryKey: ["isContract", "recipient", I, s],
52723
52725
  queryFn: async () => !I || !s ? null : jh(I, s),
52724
52726
  enabled: !!I && !!s,
@@ -52750,7 +52752,7 @@ function Vle({
52750
52752
  ),
52751
52753
  enabled: !!e?.account?.address && !!s,
52752
52754
  staleTime: 60 * 1e3
52753
- }), { data: oe, isLoading: J, error: le, refetch: pe } = _t({
52755
+ }), { data: oe, isLoading: J, error: ce, refetch: de } = _t({
52754
52756
  queryKey: [
52755
52757
  "prepareSend",
52756
52758
  t,
@@ -52784,12 +52786,12 @@ function Vle({
52784
52786
  trailsClient: z
52785
52787
  })).balances;
52786
52788
  } catch (Se) {
52787
- const ue = bn(Se), Be = ue.includes("Cross-Origin") || ue.includes("CORS") || ue.includes("Same Origin Policy"), Ne = ue.includes("fetch failed") || ue.includes("network");
52789
+ const he = bn(Se), Be = he.includes("Cross-Origin") || he.includes("CORS") || he.includes("Same Origin Policy"), Ne = he.includes("fetch failed") || he.includes("network");
52788
52790
  if (Be || Ne)
52789
52791
  m.console.warn(
52790
52792
  "[trails-sdk] [useQuote] Network or CORS error fetching balances, proceeding with quote using zero balance:",
52791
52793
  {
52792
- error: ue,
52794
+ error: he,
52793
52795
  account: e.account.address
52794
52796
  }
52795
52797
  ), ke = [];
@@ -52799,19 +52801,19 @@ function Vle({
52799
52801
  const We = ke.find(
52800
52802
  (Se) => Se.chainId === n && (Se.contractAddress?.toLowerCase() === t.toLowerCase() || !Se.contractAddress && t === Le)
52801
52803
  )?.balance ?? "0";
52802
- let de = 0;
52804
+ let ue = 0;
52803
52805
  try {
52804
- const ue = Ce(n)?.nativeCurrency?.symbol ?? "";
52805
- ue && (de = (await Mf(z, {
52806
- tokenSymbol: ue,
52806
+ const he = Ce(n)?.nativeCurrency?.symbol ?? "";
52807
+ he && (ue = (await Mf(z, {
52808
+ tokenSymbol: he,
52807
52809
  tokenAddress: Le,
52808
52810
  chainId: n
52809
52811
  }))?.priceUsd ?? 0, m.console.log(
52810
52812
  "[trails-sdk] [useQuote] Origin native token price:",
52811
52813
  {
52812
52814
  chainId: n,
52813
- symbol: ue,
52814
- priceUsd: de
52815
+ symbol: he,
52816
+ priceUsd: ue
52815
52817
  }
52816
52818
  ));
52817
52819
  } catch (Se) {
@@ -52820,26 +52822,26 @@ function Vle({
52820
52822
  Se
52821
52823
  );
52822
52824
  }
52823
- const we = async (Se, ue) => {
52825
+ const we = async (Se, he) => {
52824
52826
  try {
52825
- const Be = ue === n ? N : ue === s ? P : null;
52827
+ const Be = he === n ? N : he === s ? P : null;
52826
52828
  if (!Be)
52827
52829
  return m.console.warn(
52828
- `[trails-sdk] No RPC client available for chain ${ue}`
52830
+ `[trails-sdk] No RPC client available for chain ${he}`
52829
52831
  ), null;
52830
52832
  if (Se.toLowerCase() === Le.toLowerCase())
52831
- return Ce(ue)?.nativeCurrency.decimals ?? 18;
52833
+ return Ce(he)?.nativeCurrency.decimals ?? 18;
52832
52834
  const Ne = await Be.readContract({
52833
52835
  address: Se,
52834
52836
  abi: qo,
52835
52837
  functionName: "decimals"
52836
52838
  });
52837
52839
  return m.console.log(
52838
- `[trails-sdk] Fetched decimals on-chain for token ${Se} on chain ${ue}: ${Ne}`
52840
+ `[trails-sdk] Fetched decimals on-chain for token ${Se} on chain ${he}: ${Ne}`
52839
52841
  ), Ne;
52840
52842
  } catch (Be) {
52841
52843
  return m.console.error(
52842
- `[trails-sdk] Error fetching decimals on-chain for token ${Se} on chain ${ue}:`,
52844
+ `[trails-sdk] Error fetching decimals on-chain for token ${Se} on chain ${he}:`,
52843
52845
  Be
52844
52846
  ), null;
52845
52847
  }
@@ -52923,7 +52925,7 @@ function Vle({
52923
52925
  paymasterUrl: b,
52924
52926
  selectedFeeOption: v ?? null,
52925
52927
  abortSignal: D,
52926
- originNativeTokenPriceUsd: de,
52928
+ originNativeTokenPriceUsd: ue,
52927
52929
  commitIntentFn: q.mutateAsync,
52928
52930
  executeIntentFn: te.mutateAsync,
52929
52931
  checkoutOnHandlers: f,
@@ -52985,6 +52987,8 @@ function Vle({
52985
52987
  transactionStates: se.transactionStates ?? [],
52986
52988
  originTokenRate: se.originTokenRate ?? "",
52987
52989
  destinationTokenRate: se.destinationTokenRate ?? "",
52990
+ originTokenPriceUsd: se.originTokenPriceUsd ?? 0,
52991
+ destinationTokenPriceUsd: se.destinationTokenPriceUsd ?? 0,
52988
52992
  routeProviders: se.routeProviders ?? [],
52989
52993
  gasCostUsd: se.gasCostUsd ?? null,
52990
52994
  gasCostUsdDisplay: se.gasCostUsdDisplay ?? "",
@@ -53017,12 +53021,12 @@ function Vle({
53017
53021
  expiresAt: se.expiresAt ?? null
53018
53022
  },
53019
53023
  send: async (Se) => {
53020
- const ue = Se?.selectedFeeOption !== void 0 ? Se.selectedFeeOption : v ?? null, {
53024
+ const he = Se?.selectedFeeOption !== void 0 ? Se.selectedFeeOption : v ?? null, {
53021
53025
  depositUserTxnReceipt: Be,
53022
53026
  destinationIntentTransaction: Ne,
53023
53027
  totalCompletionSeconds: Je
53024
53028
  } = await xe({
53025
- selectedFeeOption: ue,
53029
+ selectedFeeOption: he,
53026
53030
  onOriginSend: Se?.onOriginSend,
53027
53031
  depositTransactionHash: Se?.depositTransactionHash,
53028
53032
  skipCommit: Se?.skipCommit,
@@ -53080,9 +53084,9 @@ function Vle({
53080
53084
  send: me,
53081
53085
  swap: ve,
53082
53086
  isLoadingQuote: J,
53083
- quoteError: le,
53084
- quoteErrorPrettified: Bl(le),
53085
- refetchQuote: () => pe(),
53087
+ quoteError: ce,
53088
+ quoteErrorPrettified: Bl(ce),
53089
+ refetchQuote: () => de(),
53086
53090
  abort: () => {
53087
53091
  m.console.log("[trails-sdk] useQuote abort() called"), m.console.log(
53088
53092
  "[trails-sdk] Active operations before abort:",
@@ -53171,9 +53175,9 @@ async function jle(e) {
53171
53175
  if (oU(o))
53172
53176
  throw new Error("Recipient address cannot be zero address");
53173
53177
  let Q = o, re = y;
53174
- const oe = ise(r, a), J = cse(n, i), le = oe && J, pe = P5(y);
53178
+ const oe = ise(r, a), J = cse(n, i), ce = oe && J, de = P5(y);
53175
53179
  let me = !1;
53176
- if (le && ee && pe) {
53180
+ if (ce && ee && de) {
53177
53181
  const we = re;
53178
53182
  re = nse(
53179
53183
  re || "",
@@ -53192,11 +53196,11 @@ async function jle(e) {
53192
53196
  }
53193
53197
  if (m.console.log("[trails-sdk] Trade type and calldata info:", {
53194
53198
  tradeType: d,
53195
- isSameChainSameToken: le,
53199
+ isSameChainSameToken: ce,
53196
53200
  hasCustomCalldata: ee,
53197
- originalHadPlaceholder: pe,
53201
+ originalHadPlaceholder: de,
53198
53202
  placeholderWasReplaced: me
53199
- }), !ee && d === qe.EXACT_INPUT && !Xt(i) && !le && (re = np({
53203
+ }), !ee && d === qe.EXACT_INPUT && !Xt(i) && !ce && (re = np({
53200
53204
  recipient: o,
53201
53205
  amount: BigInt(Zi)
53202
53206
  }), Q = i, ee = !0), ee && d === qe.EXACT_INPUT) {
@@ -53332,8 +53336,8 @@ async function jle(e) {
53332
53336
  state: "pending",
53333
53337
  label: ee ? "Execute" : ke ? "Receive" : "Send"
53334
53338
  }), b(Y), O?.triggerCheckoutStatusUpdate && O.triggerCheckoutStatusUpdate(Y), O?.triggerCheckoutStart && O.triggerCheckoutStart();
53335
- const We = I === "onramp-meld" || I === "onramp-exchange", de = !!y && y !== "0x";
53336
- return J && oe && (!We || We && !de) ? (m.console.log(
53339
+ const We = I === "onramp-meld" || I === "onramp-exchange", ue = !!y && y !== "0x";
53340
+ return J && oe && (!We || We && !ue) ? (m.console.log(
53337
53341
  "[trails-sdk] Same-chain same-token detected, using handleSameChainSameToken:",
53338
53342
  {
53339
53343
  recipient: Q,
@@ -53342,7 +53346,7 @@ async function jle(e) {
53342
53346
  originTokenAddress: n,
53343
53347
  destinationTokenAddress: i,
53344
53348
  isOnrampFlow: We,
53345
- hasDestinationCalldata: de,
53349
+ hasDestinationCalldata: ue,
53346
53350
  fundMethod: I
53347
53351
  }
53348
53352
  ), await Cle({
@@ -53380,13 +53384,13 @@ async function jle(e) {
53380
53384
  trailsApiKey: A,
53381
53385
  trailsApiUrl: N,
53382
53386
  tradeType: d
53383
- })) : (We && de && m.console.log(
53387
+ })) : (We && ue && m.console.log(
53384
53388
  "[trails-sdk] Onramp flow with calldata detected, using handleCrossChain for intent-based flow:",
53385
53389
  {
53386
53390
  fundMethod: I,
53387
53391
  isToSameToken: J,
53388
53392
  isToSameChain: oe,
53389
- hasDestinationCalldata: de,
53393
+ hasDestinationCalldata: ue,
53390
53394
  originChainId: r,
53391
53395
  destinationChainId: a
53392
53396
  }
@@ -53731,10 +53735,10 @@ function rd({
53731
53735
  sortedTokens: f,
53732
53736
  isLoadingSortedTokens: p,
53733
53737
  balanceError: y
53734
- } = Gu(d), { supportedTokens: b, isLoadingTokens: v } = Ec(), w = hn(), { supportedChains: T } = Ul(), { selectedChainId: k } = tp(), x = r === "onramp-exchange" || r === "qr-code" || s, E = fe(
53738
+ } = Gu(d), { supportedTokens: b, isLoadingTokens: v } = Ec(), w = hn(), { supportedChains: T } = Ul(), { selectedChainId: k } = tp(), x = r === "onramp-exchange" || r === "qr-code" || s, E = pe(
53735
53739
  () => T.map((U) => U.id),
53736
53740
  [T]
53737
- ), C = fe(() => i.trim(), [i]), I = Qle(C, 300), S = fe(
53741
+ ), C = pe(() => i.trim(), [i]), I = Qle(C, 300), S = pe(
53738
53742
  () => I ? Yr(I) : !1,
53739
53743
  [I]
53740
53744
  ), O = C !== I, { data: D, isLoading: j } = _t({
@@ -53800,7 +53804,7 @@ function rd({
53800
53804
  // 24 hours
53801
53805
  refetchOnWindowFocus: !1,
53802
53806
  refetchOnReconnect: !1
53803
- }), N = fe(() => r === "qr-code" || r === "onramp-exchange" || r === "onramp-meld" ? b?.length ? b.filter((F) => {
53807
+ }), N = pe(() => r === "qr-code" || r === "onramp-exchange" || r === "onramp-meld" ? b?.length ? b.filter((F) => {
53804
53808
  const $ = F.symbol.toUpperCase();
53805
53809
  return J5.includes($);
53806
53810
  }).map((F) => ({
@@ -53822,7 +53826,7 @@ function rd({
53822
53826
  hasSufficientBalanceUsd: Y,
53823
53827
  isLoadingHasSufficientBalanceUsd: Q,
53824
53828
  hasSufficientBalanceUsdError: re
53825
- } = vre(d, t), oe = !1, { supportedChains: J } = Ul(), le = fe(() => new Set(J.map((U) => U.id)), [J]), pe = fe(() => !x || !z?.tokens?.length || k === null ? [] : z.tokens.filter((U) => {
53829
+ } = vre(d, t), oe = !1, { supportedChains: J } = Ul(), ce = pe(() => new Set(J.map((U) => U.id)), [J]), de = pe(() => !x || !z?.tokens?.length || k === null ? [] : z.tokens.filter((U) => {
53826
53830
  const F = U.decimals;
53827
53831
  return !Number.isInteger(F) || F < 1 || F > 18 ? (m.console.warn(
53828
53832
  "[trails-sdk] Skipping token with invalid decimals:",
@@ -53839,15 +53843,15 @@ function rd({
53839
53843
  h,
53840
53844
  x,
53841
53845
  k
53842
- ]), me = fe(() => {
53846
+ ]), me = pe(() => {
53843
53847
  if (r === "qr-code" || r === "onramp-exchange" || r === "onramp-meld") {
53844
- if (x && k !== null && pe.length > 0) {
53848
+ if (x && k !== null && de.length > 0) {
53845
53849
  const $ = /* @__PURE__ */ new Map();
53846
53850
  for (const Ae of f) {
53847
53851
  const se = Ae.contractAddress || Le, xe = Ss(Ae.chainId || 0, se);
53848
53852
  $.set(xe, Ae);
53849
53853
  }
53850
- const R = pe.map(
53854
+ const R = de.map(
53851
53855
  (Ae) => {
53852
53856
  const se = Ae.contractAddress || Le, xe = Ss(Ae.chainId || 0, se), Fe = $.get(xe);
53853
53857
  return Fe && (Fe.balanceUsd || 0) > 0 ? Fe : Ae;
@@ -53891,13 +53895,13 @@ function rd({
53891
53895
  }
53892
53896
  ).sort(($, R) => (R.priceUsd || 0) - ($.priceUsd || 0));
53893
53897
  }
53894
- if (s && x && k !== null && pe.length > 0) {
53898
+ if (s && x && k !== null && de.length > 0) {
53895
53899
  const U = /* @__PURE__ */ new Map();
53896
53900
  for (const R of f) {
53897
53901
  const X = R.contractAddress || Le, Ae = Ss(R.chainId || 0, X);
53898
53902
  U.set(Ae, R);
53899
53903
  }
53900
- const F = pe.map(
53904
+ const F = de.map(
53901
53905
  (R) => {
53902
53906
  const X = R.contractAddress || Le, Ae = Ss(R.chainId || 0, X), se = U.get(Ae);
53903
53907
  return se && (se.balanceUsd || 0) > 0 ? se : R;
@@ -53916,16 +53920,16 @@ function rd({
53916
53920
  }
53917
53921
  return F;
53918
53922
  }
53919
- return f.filter((U) => !!le.has(U.chainId || 0));
53923
+ return f.filter((U) => !!ce.has(U.chainId || 0));
53920
53924
  }, [
53921
53925
  f,
53922
- le,
53926
+ ce,
53923
53927
  r,
53924
53928
  b,
53925
53929
  P,
53926
53930
  x,
53927
53931
  k,
53928
- pe,
53932
+ de,
53929
53933
  s
53930
53934
  ]);
53931
53935
  ne(() => {
@@ -53957,7 +53961,7 @@ function rd({
53957
53961
  Kn(a.contractAddress),
53958
53962
  Kn(U.contractAddress)
53959
53963
  ));
53960
- }, $e = fe(() => !x || !D?.tokens?.length ? [] : D.tokens.filter((U) => {
53964
+ }, $e = pe(() => !x || !D?.tokens?.length ? [] : D.tokens.filter((U) => {
53961
53965
  const F = U.decimals;
53962
53966
  return !Number.isInteger(F) || F < 1 || F > 18 ? (m.console.warn(
53963
53967
  "[trails-sdk] Skipping token with invalid decimals:",
@@ -53969,7 +53973,7 @@ function rd({
53969
53973
  ), !1) : !0;
53970
53974
  }).map(
53971
53975
  (U) => eT(U, h)
53972
- ), [D, h, x]), We = fe(() => {
53976
+ ), [D, h, x]), We = pe(() => {
53973
53977
  if (!M || !W) return null;
53974
53978
  const U = Ce(W), F = TL(M.decimals);
53975
53979
  return {
@@ -53986,7 +53990,7 @@ function rd({
53986
53990
  }),
53987
53991
  isCustomToken: !0
53988
53992
  };
53989
- }, [M, W, h]), de = fe(() => {
53993
+ }, [M, W, h]), ue = pe(() => {
53990
53994
  if (x && S && L && We)
53991
53995
  return [We];
53992
53996
  if (x && C && $e.length > 0) {
@@ -54020,9 +54024,9 @@ function rd({
54020
54024
  const se = (Ce(R.chainId || 0)?.name || "").toLowerCase(), xe = (R.symbol || "???").toLowerCase(), Fe = (R.name || "Unknown Token").toLowerCase(), Ie = (R.contractAddress || Le).toLowerCase();
54021
54025
  if (F.length > 1) {
54022
54026
  const Oe = F.some(
54023
- (ue) => se.includes(ue)
54027
+ (he) => se.includes(he)
54024
54028
  ), Se = F.some(
54025
- (ue) => xe.includes(ue) || Fe.includes(ue) || Ie.includes(ue)
54029
+ (he) => xe.includes(he) || Fe.includes(he) || Ie.includes(he)
54026
54030
  );
54027
54031
  return Oe && Se;
54028
54032
  }
@@ -54030,7 +54034,7 @@ function rd({
54030
54034
  (Oe) => xe.includes(Oe) || Fe.includes(Oe) || se.includes(Oe) || Ie.includes(Oe)
54031
54035
  );
54032
54036
  }).sort((R, X) => {
54033
- const Ae = Ce(R.chainId || 0), se = Ce(X.chainId || 0), xe = Ae?.name?.toLowerCase() || "", Fe = se?.name?.toLowerCase() || "", Ie = (R.symbol || "???").toLowerCase(), Oe = (X.symbol || "???").toLowerCase(), Se = (R.name || "Unknown Token").toLowerCase(), ue = (X.name || "Unknown Token").toLowerCase(), Be = xh(
54037
+ const Ae = Ce(R.chainId || 0), se = Ce(X.chainId || 0), xe = Ae?.name?.toLowerCase() || "", Fe = se?.name?.toLowerCase() || "", Ie = (R.symbol || "???").toLowerCase(), Oe = (X.symbol || "???").toLowerCase(), Se = (R.name || "Unknown Token").toLowerCase(), he = (X.name || "Unknown Token").toLowerCase(), Be = xh(
54034
54038
  Ie,
54035
54039
  Se,
54036
54040
  xe,
@@ -54038,7 +54042,7 @@ function rd({
54038
54042
  );
54039
54043
  return xh(
54040
54044
  Oe,
54041
- ue,
54045
+ he,
54042
54046
  Fe,
54043
54047
  F
54044
54048
  ) - Be;
@@ -54051,8 +54055,8 @@ function rd({
54051
54055
  S,
54052
54056
  L,
54053
54057
  We
54054
- ]), we = fe(() => {
54055
- const U = de.map((F) => {
54058
+ ]), we = pe(() => {
54059
+ const U = ue.map((F) => {
54056
54060
  const $ = F.isNativeToken ?? !1, R = Ce(F.chainId || 0);
54057
54061
  if (!F.decimals)
54058
54062
  return m.console.warn(
@@ -54112,18 +54116,18 @@ function rd({
54112
54116
  return R.filter((xe) => {
54113
54117
  const Fe = xe.chainName?.toLowerCase() || "", Ie = xe.symbol?.toLowerCase() || "", Oe = xe.name?.toLowerCase() || "", Se = xe.contractAddress?.toLowerCase() || "";
54114
54118
  if (Ae.length > 1) {
54115
- const ue = Ae.some(
54119
+ const he = Ae.some(
54116
54120
  (Ne) => Fe.includes(Ne)
54117
54121
  ), Be = Ae.some(
54118
54122
  (Ne) => Ie.includes(Ne) || Oe.includes(Ne) || Se.includes(Ne)
54119
54123
  );
54120
- return ue && Be;
54124
+ return he && Be;
54121
54125
  }
54122
54126
  return Ae.some(
54123
- (ue) => Ie.includes(ue) || Oe.includes(ue) || Fe.includes(ue) || Se.includes(ue)
54127
+ (he) => Ie.includes(he) || Oe.includes(he) || Fe.includes(he) || Se.includes(he)
54124
54128
  );
54125
54129
  }).sort((xe, Fe) => {
54126
- const Ie = xe.chainName?.toLowerCase() || "", Oe = xe.symbol?.toLowerCase() || "", Se = xe.name?.toLowerCase() || "", ue = Fe.chainName?.toLowerCase() || "", Be = Fe.symbol?.toLowerCase() || "", Ne = Fe.name?.toLowerCase() || "", Je = xh(
54130
+ const Ie = xe.chainName?.toLowerCase() || "", Oe = xe.symbol?.toLowerCase() || "", Se = xe.name?.toLowerCase() || "", he = Fe.chainName?.toLowerCase() || "", Be = Fe.symbol?.toLowerCase() || "", Ne = Fe.name?.toLowerCase() || "", Je = xh(
54127
54131
  Oe,
54128
54132
  Se,
54129
54133
  Ie,
@@ -54131,7 +54135,7 @@ function rd({
54131
54135
  ), tt = xh(
54132
54136
  Be,
54133
54137
  Ne,
54134
- ue,
54138
+ he,
54135
54139
  Ae
54136
54140
  );
54137
54141
  if (Je === tt) {
@@ -54146,13 +54150,13 @@ function rd({
54146
54150
  }
54147
54151
  return U;
54148
54152
  }, [
54149
- de,
54153
+ ue,
54150
54154
  t,
54151
54155
  s,
54152
54156
  b,
54153
54157
  P,
54154
54158
  i
54155
- ]), ie = fe(() => te && t && !Y && !Q && !re || we?.length > 0 && !we.some((U) => U.isSufficientBalance), [
54159
+ ]), ie = pe(() => te && t && !Y && !Q && !re || we?.length > 0 && !we.some((U) => U.isSufficientBalance), [
54156
54160
  t,
54157
54161
  Y,
54158
54162
  Q,
@@ -54164,7 +54168,7 @@ function rd({
54164
54168
  selectedToken: a,
54165
54169
  searchQuery: i,
54166
54170
  handleTokenSelect: ve,
54167
- filteredTokens: de,
54171
+ filteredTokens: ue,
54168
54172
  isLoadingSortedTokens: p || j,
54169
54173
  isLoadingSearchTokens: j,
54170
54174
  isSearching: O || j,
@@ -54220,7 +54224,7 @@ const Dt = ({
54220
54224
  contractAddress: r,
54221
54225
  size: s = 24
54222
54226
  }) => {
54223
- const [a, o] = H(!1), [i, c] = H(null), d = ze(null), u = wv(n || void 0), h = fe(() => Xle(e, t, n, r), [e, t, n, r]);
54227
+ const [a, o] = H(!1), [i, c] = H(null), d = ze(null), u = wv(n || void 0), h = pe(() => Xle(e, t, n, r), [e, t, n, r]);
54224
54228
  ne(() => {
54225
54229
  d.current !== h && (c(null), o(!1), d.current = h);
54226
54230
  }, [h]);
@@ -54369,7 +54373,7 @@ const Dt = ({
54369
54373
  chainListScreen: c = !1,
54370
54374
  onNavigateToChainList: d
54371
54375
  }) => {
54372
- const u = ze(null), h = ze(null), [f, p] = H(!1), [y, b] = H(""), v = fe(() => {
54376
+ const u = ze(null), h = ze(null), [f, p] = H(!1), [y, b] = H(""), v = pe(() => {
54373
54377
  if (!y.trim())
54374
54378
  return e;
54375
54379
  const x = y.trim().toLowerCase();
@@ -54393,7 +54397,7 @@ const Dt = ({
54393
54397
  n(x), p(!1), b("");
54394
54398
  }, T = () => {
54395
54399
  c && d ? d() : p(!f);
54396
- }, k = fe(() => {
54400
+ }, k = pe(() => {
54397
54401
  if (t === null) return null;
54398
54402
  const x = e.find(
54399
54403
  (C) => C.chainId === t
@@ -54546,10 +54550,10 @@ function Jle({
54546
54550
  // 24 hours
54547
54551
  refetchOnWindowFocus: !1,
54548
54552
  refetchOnReconnect: !1
54549
- }), c = fe(() => {
54553
+ }), c = pe(() => {
54550
54554
  const w = e.trim();
54551
54555
  return Yr(w) ? w : null;
54552
- }, [e]), d = fe(() => c ? a.some((T) => {
54556
+ }, [e]), d = pe(() => c ? a.some((T) => {
54553
54557
  const k = T.contractAddress.toLowerCase() === c.toLowerCase();
54554
54558
  return n !== null ? k && T.chainId === n : k;
54555
54559
  }) ? !0 : n !== null ? t.some(
@@ -54608,7 +54612,7 @@ function Jle({
54608
54612
  f
54609
54613
  );
54610
54614
  }, [f, c, d]);
54611
- const p = fe(() => a.filter((w) => c && !(w.contractAddress.toLowerCase() === c.toLowerCase()) ? !1 : n !== null ? w.chainId === n : !0).map((w) => {
54615
+ const p = pe(() => a.filter((w) => c && !(w.contractAddress.toLowerCase() === c.toLowerCase()) ? !1 : n !== null ? w.chainId === n : !0).map((w) => {
54612
54616
  const T = t.find(
54613
54617
  (E) => (E.chainId || 0) === (w.chainId || 0) && E.contractAddress.toLowerCase() === w.contractAddress.toLowerCase()
54614
54618
  ), x = Ce(w.chainId || 0)?.name || `Chain ${w.chainId || 0}`;
@@ -54630,7 +54634,7 @@ function Jle({
54630
54634
  } catch {
54631
54635
  return !1;
54632
54636
  }
54633
- }, []), b = fe(() => {
54637
+ }, []), b = pe(() => {
54634
54638
  let w = t;
54635
54639
  n !== null && (w = w.filter(
54636
54640
  (E) => (E.chainId || 0) === n
@@ -54769,7 +54773,7 @@ const fi = ({
54769
54773
  ne(() => {
54770
54774
  !O && !w && T(!0);
54771
54775
  }, [O, w]);
54772
- const N = !w && (O || _.length === 0), P = fe(() => {
54776
+ const N = !w && (O || _.length === 0), P = pe(() => {
54773
54777
  const Y = new Set(
54774
54778
  L.map((Q) => Q.chainId || 0)
54775
54779
  );
@@ -54803,7 +54807,7 @@ const fi = ({
54803
54807
  (re) => re.contractAddress.toLowerCase() === Y.contractAddress.toLowerCase() && (re.chainId || 0) === (Y.chainId || 0)
54804
54808
  );
54805
54809
  Q ? te(Q) : s && (M(null), s(Y));
54806
- }, ae = fe(() => A && E.trim().startsWith("0x") ? "Token not found on any supported chain." : E.trim() ? "No tokens found matching your search." : a === "qr-code" || a === "onramp-exchange" ? "" : x ? "No available tokens found" : "", [A, E, a, x]);
54810
+ }, ae = pe(() => A && E.trim().startsWith("0x") ? "Token not found on any supported chain." : E.trim() ? "No tokens found matching your search." : a === "qr-code" || a === "onramp-exchange" ? "" : x ? "No available tokens found" : "", [A, E, a, x]);
54807
54811
  return /* @__PURE__ */ g("div", { className: "space-y-2", children: [
54808
54812
  /* @__PURE__ */ l(
54809
54813
  sd,
@@ -54866,15 +54870,15 @@ const fi = ({
54866
54870
  imageUrl: re,
54867
54871
  chainId: oe,
54868
54872
  contractAddress: J,
54869
- balanceUsdFormatted: le,
54870
- balanceUsdDisplay: pe,
54873
+ balanceUsdFormatted: ce,
54874
+ balanceUsdDisplay: de,
54871
54875
  name: me,
54872
54876
  priceUsd: ve,
54873
54877
  balanceFormatted: ke,
54874
54878
  balance: $e,
54875
54879
  balanceUsd: We,
54876
- isSufficientBalance: de
54877
- } = Y, we = !yh($e) || !yh(ke) || !yh(We) || !yh(le), ie = de ?? !0;
54880
+ isSufficientBalance: ue
54881
+ } = Y, we = !yh($e) || !yh(ke) || !yh(We) || !yh(ce), ie = ue ?? !0;
54878
54882
  return /* @__PURE__ */ g(
54879
54883
  Ar.div,
54880
54884
  {
@@ -54933,7 +54937,7 @@ const fi = ({
54933
54937
  /* @__PURE__ */ g(
54934
54938
  "div",
54935
54939
  {
54936
- className: `flex items-center gap-1.5 transition-all duration-300 ease-in-out ${J && J.toLowerCase() !== Le.toLowerCase() ? "group-hover:opacity-0 group-hover:transform group-hover:-translate-x-2" : ""} ${!de && a !== "qr-code" && a !== "exchange" ? "opacity-70" : ""}`,
54940
+ className: `flex items-center gap-1.5 transition-all duration-300 ease-in-out ${J && J.toLowerCase() !== Le.toLowerCase() ? "group-hover:opacity-0 group-hover:transform group-hover:-translate-x-2" : ""} ${!ue && a !== "qr-code" && a !== "exchange" ? "opacity-70" : ""}`,
54937
54941
  children: [
54938
54942
  /* @__PURE__ */ l(
54939
54943
  "span",
@@ -55060,7 +55064,7 @@ const fi = ({
55060
55064
  "p",
55061
55065
  {
55062
55066
  className: `text-sm font-medium text-gray-900 dark:text-white ${!ie && a !== "qr-code" && a !== "exchange" ? "opacity-70" : ""}`,
55063
- children: k ? pe || le || "$0.00" : "••••••"
55067
+ children: k ? de || ce || "$0.00" : "••••••"
55064
55068
  }
55065
55069
  ),
55066
55070
  /* @__PURE__ */ l(
@@ -55120,12 +55124,12 @@ const fi = ({
55120
55124
  ) })
55121
55125
  ] });
55122
55126
  }, Ra = ({ onBack: e }) => {
55123
- const [t, n] = H(""), { selectedChainId: r, setSelectedChainId: s } = tp(), { supportedChains: a } = Ul(), o = fe(() => a.map((d) => ({
55127
+ const [t, n] = H(""), { selectedChainId: r, setSelectedChainId: s } = tp(), { supportedChains: a } = Ul(), o = pe(() => a.map((d) => ({
55124
55128
  chainId: d.id,
55125
55129
  name: d.name,
55126
55130
  imageUrl: ""
55127
55131
  // ChainImage component handles the icons
55128
- })), [a]), i = fe(() => {
55132
+ })), [a]), i = pe(() => {
55129
55133
  if (!t.trim())
55130
55134
  return o;
55131
55135
  const d = t.trim().toLowerCase();
@@ -55273,7 +55277,7 @@ const yb = ({
55273
55277
  variant: t = "default",
55274
55278
  size: n = "standard",
55275
55279
  textAlign: r = "left"
55276
- }) => fe(() => {
55280
+ }) => pe(() => {
55277
55281
  const s = e.length;
55278
55282
  let a;
55279
55283
  t === "smaller" || t === "inline" ? s > 15 ? a = "1rem" : s > 12 ? a = "1.125rem" : s > 9 ? a = "1.25rem" : s > 6 ? a = "1.375rem" : a = "1.5rem" : n === "large" ? s > 15 ? a = "1.5rem" : s > 12 ? a = "1.875rem" : s > 9 ? a = "2.25rem" : s > 6 ? a = "3rem" : a = "3.75rem" : s > 15 ? a = "1.25rem" : s > 12 ? a = "1.5rem" : s > 9 ? a = "1.75rem" : s > 6 ? a = "2rem" : a = "2.25rem";
@@ -55422,10 +55426,10 @@ const SL = ({
55422
55426
  ne(() => {
55423
55427
  s !== void 0 && o(s);
55424
55428
  }, [s]);
55425
- const i = fe(
55429
+ const i = pe(
55426
55430
  () => e ? Ce(e.chainId || 0) : void 0,
55427
55431
  [e]
55428
- ), c = fe(() => {
55432
+ ), c = pe(() => {
55429
55433
  if (!(!e?.balance || !e.decimals))
55430
55434
  try {
55431
55435
  return sr(e.balance, e.decimals);
@@ -56446,10 +56450,10 @@ const Co = ({
56446
56450
  o,
56447
56451
  i,
56448
56452
  c
56449
- ] = Ste({ chainIdOverride: e }), [d, u] = H(), [h, f] = H(!1), [p, y] = H(!1), [b, v] = H(!1), [w, T] = H(null), k = fe(
56453
+ ] = Ste({ chainIdOverride: e }), [d, u] = H(), [h, f] = H(!1), [p, y] = H(!1), [b, v] = H(!1), [w, T] = H(null), k = pe(
56450
56454
  () => t?.contractAddress?.toLowerCase() || null,
56451
56455
  [t?.contractAddress]
56452
- ), x = fe(() => {
56456
+ ), x = pe(() => {
56453
56457
  if (!n)
56454
56458
  return null;
56455
56459
  try {
@@ -56785,7 +56789,7 @@ const Co = ({
56785
56789
  );
56786
56790
  return () => clearTimeout(w);
56787
56791
  }, [e]);
56788
- const v = fe(() => {
56792
+ const v = pe(() => {
56789
56793
  if (!b) return !1;
56790
56794
  const w = b.name?.toLowerCase() || "", T = b.id?.toLowerCase() || "", k = w.includes("waas") || T.includes("waas") || T === "sequence-waas";
56791
56795
  return m.console.log("[trails-sdk] Sequence WaaS detection:", {
@@ -57677,7 +57681,7 @@ const ML = ({
57677
57681
  }, []);
57678
57682
  const v = Te((D) => D?.decodedGuestModuleEvents?.some(
57679
57683
  (j) => j.type === "CallFailed"
57680
- ), []), w = fe(() => r.some((D) => v(D)), [r, v]), T = fe(() => r.some((D) => D.state === "aborted"), [r]), k = fe(() => i || (d === "pay" ? "Pay Again" : d === "fund" ? "Fund Again" : d === "swap" ? "Swap Again" : "Send Again"), [d, i]), {
57684
+ ), []), w = pe(() => r.some((D) => v(D)), [r, v]), T = pe(() => r.some((D) => D.state === "aborted"), [r]), k = pe(() => i || (d === "pay" ? "Pay Again" : d === "fund" ? "Fund Again" : d === "swap" ? "Swap Again" : "Send Again"), [d, i]), {
57681
57685
  finalExplorerUrl: x,
57682
57686
  finalChainId: E,
57683
57687
  completionTimeSeconds: C
@@ -58434,7 +58438,7 @@ function Tde() {
58434
58438
  hasWagmiContext: !!e,
58435
58439
  hasTrailsContext: !!t
58436
58440
  });
58437
- const n = fe(() => {
58441
+ const n = pe(() => {
58438
58442
  if (e)
58439
58443
  return m.console.log(
58440
58444
  "[trails-sdk] [TrailsHookModal] Using parent WagmiProvider"
@@ -58520,7 +58524,7 @@ function fv() {
58520
58524
  return e;
58521
58525
  }
58522
58526
  const hp = tn(null), Cde = ({ children: e, config: t }) => {
58523
- const n = fe(() => ({
58527
+ const n = pe(() => ({
58524
58528
  trailsApiKey: t.trailsApiKey,
58525
58529
  trailsApiUrl: t.trailsApiUrl || _b,
58526
58530
  sequenceIndexerUrl: t.sequenceIndexerUrl || b6,
@@ -58560,7 +58564,7 @@ const hp = tn(null), Cde = ({ children: e, config: t }) => {
58560
58564
  n.trailsApiUrl,
58561
58565
  n.sequenceNodeGatewayUrl
58562
58566
  ]);
58563
- const r = fe(() => ({
58567
+ const r = pe(() => ({
58564
58568
  projectAccessKey: n.trailsApiKey || "",
58565
58569
  env: {
58566
58570
  apiUrl: n.sequenceApiUrl,
@@ -59517,7 +59521,7 @@ function Vde() {
59517
59521
  }
59518
59522
  i();
59519
59523
  }, []), {
59520
- data: fe(() => e.sort((i, c) => c.apy - i.apy), [e]),
59524
+ data: pe(() => e.sort((i, c) => c.apy - i.apy), [e]),
59521
59525
  loading: n,
59522
59526
  error: s
59523
59527
  };
@@ -59749,7 +59753,7 @@ function qde() {
59749
59753
  }
59750
59754
  i();
59751
59755
  }, []), {
59752
- data: fe(() => e.sort((i, c) => c.apy - i.apy), [e]),
59756
+ data: pe(() => e.sort((i, c) => c.apy - i.apy), [e]),
59753
59757
  loading: n,
59754
59758
  error: s
59755
59759
  };
@@ -59815,7 +59819,7 @@ function VL({ enabled: e = !0 } = {}) {
59815
59819
  data: s,
59816
59820
  loading: a,
59817
59821
  error: o
59818
- } = qde(), i = fe(() => {
59822
+ } = qde(), i = pe(() => {
59819
59823
  if (!e)
59820
59824
  return [];
59821
59825
  if (!t && !s)
@@ -59842,14 +59846,14 @@ function VL({ enabled: e = !0 } = {}) {
59842
59846
  refetchOnReconnect: !0,
59843
59847
  retry: 2,
59844
59848
  initialData: i.length > 0 ? i : void 0
59845
- }), d = fe(() => {
59849
+ }), d = pe(() => {
59846
59850
  if (!e)
59847
59851
  return !1;
59848
59852
  if (c && c.length > 0)
59849
59853
  return m.console.log("[trails-sdk] Using cached pools, not showing loading"), !1;
59850
59854
  const h = n || a;
59851
59855
  return h && m.console.log("[trails-sdk] Showing loading - sources still loading"), h;
59852
- }, [n, a, c, e]), u = fe(() => !e || c && c.length > 0 ? null : r || o, [r, o, c, e]);
59856
+ }, [n, a, c, e]), u = pe(() => !e || c && c.length > 0 ? null : r || o, [r, o, c, e]);
59853
59857
  return {
59854
59858
  data: c || [],
59855
59859
  loading: d,
@@ -61028,26 +61032,26 @@ function rue({
61028
61032
  } = vv({
61029
61033
  intentId: e,
61030
61034
  enabled: !!e
61031
- }), c = fe(() => s?.originIntentAddress ? Kn(s.originIntentAddress) : null, [s?.originIntentAddress]), d = fe(() => s?.destinationIntentAddress ? Kn(s.destinationIntentAddress) : null, [s?.destinationIntentAddress]), {
61035
+ }), c = pe(() => s?.originIntentAddress ? Kn(s.originIntentAddress) : null, [s?.originIntentAddress]), d = pe(() => s?.destinationIntentAddress ? Kn(s.destinationIntentAddress) : null, [s?.destinationIntentAddress]), {
61032
61036
  balancesByAccount: u,
61033
61037
  isLoading: h,
61034
61038
  error: f
61035
61039
  } = ure([
61036
61040
  c,
61037
61041
  d
61038
- ]), p = c ? u[c.toLowerCase()]?.tokenBalancesData : void 0, y = d ? u[d.toLowerCase()]?.tokenBalancesData : void 0, b = f, v = fe(() => p?.tokens ? p.tokens.filter((L) => L.chainId !== void 0).map((L) => ({
61042
+ ]), p = c ? u[c.toLowerCase()]?.tokenBalancesData : void 0, y = d ? u[d.toLowerCase()]?.tokenBalancesData : void 0, b = f, v = pe(() => p?.tokens ? p.tokens.filter((L) => L.chainId !== void 0).map((L) => ({
61039
61043
  tokenSymbol: L.symbol,
61040
61044
  tokenAddress: L.contractAddress || Le,
61041
61045
  chainId: L.chainId
61042
61046
  })) : [], [p]);
61043
61047
  Ml(v);
61044
- const w = fe(() => y?.tokens ? y.tokens.filter((L) => L.chainId !== void 0).map((L) => ({
61048
+ const w = pe(() => y?.tokens ? y.tokens.filter((L) => L.chainId !== void 0).map((L) => ({
61045
61049
  tokenSymbol: L.symbol,
61046
61050
  tokenAddress: L.contractAddress || Le,
61047
61051
  chainId: L.chainId
61048
61052
  })) : [], [y]);
61049
61053
  Ml(w);
61050
- const T = fe(() => {
61054
+ const T = pe(() => {
61051
61055
  if (!s) return null;
61052
61056
  const L = (N) => {
61053
61057
  if (!N?.tokens) return 0;
@@ -61136,7 +61140,7 @@ function rue({
61136
61140
  y,
61137
61141
  c,
61138
61142
  d
61139
- ]), k = fe(() => {
61143
+ ]), k = pe(() => {
61140
61144
  const L = (M, _) => {
61141
61145
  if (!M?.tokens)
61142
61146
  return m.console.log(`[recover] ${_} has no tokens data`), !1;
@@ -61169,7 +61173,7 @@ function rue({
61169
61173
  destinationHasBalance: W,
61170
61174
  overall: G || W
61171
61175
  }), G || W;
61172
- }, [p, y]), x = fe(() => {
61176
+ }, [p, y]), x = pe(() => {
61173
61177
  if (!T?.tokenBalancesData?.tokens)
61174
61178
  return m.console.log(
61175
61179
  "[recover] No tokens data available for selected intent address"
@@ -61204,7 +61208,7 @@ function rue({
61204
61208
  hasAllFields: !!(L.symbol && L.balanceFormatted)
61205
61209
  } : null
61206
61210
  ), L;
61207
- }, [T?.tokenBalancesData?.tokens]), E = fe(() => {
61211
+ }, [T?.tokenBalancesData?.tokens]), E = pe(() => {
61208
61212
  const L = n || t?.account?.address;
61209
61213
  return !L || ls(L, Le) ? null : L;
61210
61214
  }, [n, t?.account?.address]), I = Te(async () => {
@@ -61525,7 +61529,7 @@ function rue({
61525
61529
  return { status: "pending" };
61526
61530
  },
61527
61531
  []
61528
- ), j = fe(() => {
61532
+ ), j = pe(() => {
61529
61533
  if (!T) return null;
61530
61534
  const L = Ce(T.chainId);
61531
61535
  return {
@@ -61617,7 +61621,7 @@ const sue = ({ status: e }) => /* @__PURE__ */ l(
61617
61621
  } = rue({
61618
61622
  intentId: e.intentId && !p ? e.intentId : "",
61619
61623
  walletClient: f || void 0
61620
- }), I = fe(() => {
61624
+ }), I = pe(() => {
61621
61625
  if (n)
61622
61626
  return () => {
61623
61627
  n(), e.intentId && !p && C();
@@ -61680,8 +61684,8 @@ const sue = ({ status: e }) => /* @__PURE__ */ l(
61680
61684
  error: J
61681
61685
  }
61682
61686
  );
61683
- const le = J instanceof Error ? J.message : typeof J == "string" ? J : "Failed to commit intent. Please try again.";
61684
- _(le);
61687
+ const ce = J instanceof Error ? J.message : typeof J == "string" ? J : "Failed to commit intent. Please try again.";
61688
+ _(ce);
61685
61689
  } finally {
61686
61690
  W(!1);
61687
61691
  }
@@ -61717,8 +61721,8 @@ const sue = ({ status: e }) => /* @__PURE__ */ l(
61717
61721
  error: J
61718
61722
  }
61719
61723
  );
61720
- const le = J instanceof Error ? J.message : typeof J == "string" ? J : "Failed to execute intent. Please try again.";
61721
- P(le);
61724
+ const ce = J instanceof Error ? J.message : typeof J == "string" ? J : "Failed to execute intent. Please try again.";
61725
+ P(ce);
61722
61726
  } finally {
61723
61727
  A(!1);
61724
61728
  }
@@ -61755,12 +61759,12 @@ const sue = ({ status: e }) => /* @__PURE__ */ l(
61755
61759
  "[AccountIntentTransactionHistory] Failed to recover intent",
61756
61760
  { intentId: e.intentId, error: J }
61757
61761
  );
61758
- const le = J instanceof Error ? J.message : typeof J == "string" ? J : "Failed to recover intent. Please try again.";
61759
- L(le);
61762
+ const ce = J instanceof Error ? J.message : typeof J == "string" ? J : "Failed to recover intent. Please try again.";
61763
+ L(ce);
61760
61764
  } finally {
61761
61765
  D(!1);
61762
61766
  }
61763
- }, Q = fe(() => e.destinationTransactionHash && e.destinationChainId ? {
61767
+ }, Q = pe(() => e.destinationTransactionHash && e.destinationChainId ? {
61764
61768
  hash: e.destinationTransactionHash,
61765
61769
  chainId: e.destinationChainId
61766
61770
  } : e.destinationIntentTxHash && e.destinationChainId ? {
@@ -61783,10 +61787,10 @@ const sue = ({ status: e }) => /* @__PURE__ */ l(
61783
61787
  e.txnHash,
61784
61788
  e.destinationChainId,
61785
61789
  e.originChainId
61786
- ]), re = fe(() => !Q?.hash || !Q.chainId ? null : $r({
61790
+ ]), re = pe(() => !Q?.hash || !Q.chainId ? null : $r({
61787
61791
  txHash: Q.hash,
61788
61792
  chainId: Q.chainId
61789
- }), [Q]), oe = fe(() => !p || !e.originChainId ? null : $r({
61793
+ }), [Q]), oe = pe(() => !p || !e.originChainId ? null : $r({
61790
61794
  txHash: p,
61791
61795
  chainId: e.originChainId
61792
61796
  }), [p, e.originChainId]);
@@ -62154,7 +62158,7 @@ const oue = ({ accountAddress: e, className: t = "", onBack: n }) => {
62154
62158
  accountAddress: M,
62155
62159
  pageSize: aT,
62156
62160
  enabled: !!M
62157
- }), ae = fe(() => E ? _.find((Q) => Q.intentId === r) : null, [E, r, _]), Y = fe(() => {
62161
+ }), ae = pe(() => E ? _.find((Q) => Q.intentId === r) : null, [E, r, _]), Y = pe(() => {
62158
62162
  let Q = _;
62159
62163
  if (E && d === r) {
62160
62164
  const oe = _.find(
@@ -62954,7 +62958,7 @@ const oue = ({ accountAddress: e, className: t = "", onBack: n }) => {
62954
62958
  }
62955
62959
  });
62956
62960
  }), Array.from(S.values());
62957
- })(), x = fe(() => {
62961
+ })(), x = pe(() => {
62958
62962
  const S = f.filter((D) => {
62959
62963
  const j = D.type === "injected", L = D.id !== "walletConnect", G = D.id !== "privy" && !D.name?.toLowerCase().includes("privy") && !D.id?.toLowerCase().includes("privy"), W = !i.some(
62960
62964
  (M) => M.connector.id === D.id
@@ -63207,10 +63211,10 @@ const oue = ({ accountAddress: e, className: t = "", onBack: n }) => {
63207
63211
  ] });
63208
63212
  let iT = class {
63209
63213
  constructor(t, n) {
63210
- he(this, "hostname");
63211
- he(this, "fetch");
63212
- he(this, "path", "/rpc/TrailsOnramp/");
63213
- he(this, "queryKey", {
63214
+ fe(this, "hostname");
63215
+ fe(this, "fetch");
63216
+ fe(this, "path", "/rpc/TrailsOnramp/");
63217
+ fe(this, "queryKey", {
63214
63218
  getMeldCountryDefaults: (t) => ["TrailsOnramp", "getMeldCountryDefaults", t],
63215
63219
  getMeldFiatCurrencies: (t) => ["TrailsOnramp", "getMeldFiatCurrencies", t],
63216
63220
  getMeldPaymentMethods: (t) => ["TrailsOnramp", "getMeldPaymentMethods", t],
@@ -63223,67 +63227,67 @@ let iT = class {
63223
63227
  createMeldBankLinkingConnection: (t) => ["TrailsOnramp", "createMeldBankLinkingConnection", t],
63224
63228
  getMeldServiceProviders: (t) => ["TrailsOnramp", "getMeldServiceProviders", t]
63225
63229
  });
63226
- he(this, "getMeldCountryDefaults", (t, n, r) => this.fetch(
63230
+ fe(this, "getMeldCountryDefaults", (t, n, r) => this.fetch(
63227
63231
  this.url("GetMeldCountryDefaults"),
63228
63232
  qs(Qs(t), n, r)
63229
63233
  ).then((s) => Ks(s).then((a) => Ys(a, "GetMeldCountryDefaultsResponse")), (s) => {
63230
63234
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63231
63235
  }));
63232
- he(this, "getMeldFiatCurrencies", (t, n, r) => this.fetch(
63236
+ fe(this, "getMeldFiatCurrencies", (t, n, r) => this.fetch(
63233
63237
  this.url("GetMeldFiatCurrencies"),
63234
63238
  qs(Qs(t), n, r)
63235
63239
  ).then((s) => Ks(s).then((a) => Ys(a, "GetMeldFiatCurrenciesResponse")), (s) => {
63236
63240
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63237
63241
  }));
63238
- he(this, "getMeldPaymentMethods", (t, n, r) => this.fetch(
63242
+ fe(this, "getMeldPaymentMethods", (t, n, r) => this.fetch(
63239
63243
  this.url("GetMeldPaymentMethods"),
63240
63244
  qs(Qs(t), n, r)
63241
63245
  ).then((s) => Ks(s).then((a) => Ys(a, "GetMeldPaymentMethodsResponse")), (s) => {
63242
63246
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63243
63247
  }));
63244
- he(this, "getMeldCryptoCurrencies", (t, n, r) => this.fetch(
63248
+ fe(this, "getMeldCryptoCurrencies", (t, n, r) => this.fetch(
63245
63249
  this.url("GetMeldCryptoCurrencies"),
63246
63250
  qs(Qs(t), n, r)
63247
63251
  ).then((s) => Ks(s).then((a) => Ys(a, "GetMeldCryptoCurrenciesResponse")), (s) => {
63248
63252
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63249
63253
  }));
63250
- he(this, "getMeldPurchaseLimits", (t, n, r) => this.fetch(
63254
+ fe(this, "getMeldPurchaseLimits", (t, n, r) => this.fetch(
63251
63255
  this.url("GetMeldPurchaseLimits"),
63252
63256
  qs(Qs(t), n, r)
63253
63257
  ).then((s) => Ks(s).then((a) => Ys(a, "GetMeldPurchaseLimitsResponse")), (s) => {
63254
63258
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63255
63259
  }));
63256
- he(this, "getMeldQuote", (t, n, r) => this.fetch(
63260
+ fe(this, "getMeldQuote", (t, n, r) => this.fetch(
63257
63261
  this.url("GetMeldQuote"),
63258
63262
  qs(Qs(t), n, r)
63259
63263
  ).then((s) => Ks(s).then((a) => Ys(a, "GetMeldQuoteResponse")), (s) => {
63260
63264
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63261
63265
  }));
63262
- he(this, "createMeldWidgetSession", (t, n, r) => this.fetch(
63266
+ fe(this, "createMeldWidgetSession", (t, n, r) => this.fetch(
63263
63267
  this.url("CreateMeldWidgetSession"),
63264
63268
  qs(Qs(t), n, r)
63265
63269
  ).then((s) => Ks(s).then((a) => Ys(a, "CreateMeldWidgetSessionResponse")), (s) => {
63266
63270
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63267
63271
  }));
63268
- he(this, "getMeldTransaction", (t, n, r) => this.fetch(
63272
+ fe(this, "getMeldTransaction", (t, n, r) => this.fetch(
63269
63273
  this.url("GetMeldTransaction"),
63270
63274
  qs(Qs(t), n, r)
63271
63275
  ).then((s) => Ks(s).then((a) => Ys(a, "GetMeldTransactionResponse")), (s) => {
63272
63276
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63273
63277
  }));
63274
- he(this, "searchMeldTransactions", (t, n, r) => this.fetch(
63278
+ fe(this, "searchMeldTransactions", (t, n, r) => this.fetch(
63275
63279
  this.url("SearchMeldTransactions"),
63276
63280
  qs(Qs(t), n, r)
63277
63281
  ).then((s) => Ks(s).then((a) => Ys(a, "SearchMeldTransactionsResponse")), (s) => {
63278
63282
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63279
63283
  }));
63280
- he(this, "createMeldBankLinkingConnection", (t, n, r) => this.fetch(
63284
+ fe(this, "createMeldBankLinkingConnection", (t, n, r) => this.fetch(
63281
63285
  this.url("CreateMeldBankLinkingConnection"),
63282
63286
  qs(Qs(t), n, r)
63283
63287
  ).then((s) => Ks(s).then((a) => Ys(a, "CreateMeldBankLinkingConnectionResponse")), (s) => {
63284
63288
  throw Hr.new({ cause: `fetch(): ${s instanceof Error ? s.message : String(s)}` });
63285
63289
  }));
63286
- he(this, "getMeldServiceProviders", (t, n, r) => this.fetch(
63290
+ fe(this, "getMeldServiceProviders", (t, n, r) => this.fetch(
63287
63291
  this.url("GetMeldServiceProviders"),
63288
63292
  qs(Qs(t), n, r)
63289
63293
  ).then((s) => Ks(s).then((a) => Ys(a, "GetMeldServiceProvidersResponse")), (s) => {
@@ -63325,8 +63329,8 @@ const qs = (e = "{}", t = {}, n = null) => ({ method: "POST", headers: { ...t, "
63325
63329
  class pt extends Error {
63326
63330
  constructor(n = {}) {
63327
63331
  super(n.message);
63328
- he(this, "code");
63329
- he(this, "status");
63332
+ fe(this, "code");
63333
+ fe(this, "status");
63330
63334
  this.name = n.name || "WebrpcEndpointError", this.code = typeof n.code == "number" ? n.code : 0, this.message = n.message || "endpoint error", this.status = typeof n.status == "number" ? n.status : 400, n.cause !== void 0 && (this.cause = n.cause), Object.setPrototypeOf(this, pt.prototype);
63331
63335
  }
63332
63336
  static new(n) {
@@ -63615,7 +63619,7 @@ function pue({
63615
63619
  }
63616
63620
  const ki = (e) => {
63617
63621
  const t = hn();
63618
- return fe(() => new jL(
63622
+ return pe(() => new jL(
63619
63623
  e?.apiKey || t.trailsApiKey || "",
63620
63624
  {
63621
63625
  hostname: e?.hostname || t.trailsApiUrl,
@@ -64051,7 +64055,7 @@ const xue = (e) => {
64051
64055
  selectedCountry: n,
64052
64056
  trailsClient: r
64053
64057
  }) => {
64054
- const { countries: s, isLoading: a, error: o } = gue(), [i, c] = H(""), { data: d } = GL({ enabled: !0 }), u = fe(() => {
64058
+ const { countries: s, isLoading: a, error: o } = gue(), [i, c] = H(""), { data: d } = GL({ enabled: !0 }), u = pe(() => {
64055
64059
  let f = s;
64056
64060
  if (i.trim()) {
64057
64061
  const p = i.toLowerCase().trim();
@@ -64170,7 +64174,7 @@ const xue = (e) => {
64170
64174
  const { paymentMethods: i, isLoading: c, error: d } = c2(
64171
64175
  s || null,
64172
64176
  a
64173
- ), [u, h] = H(""), [f, p] = H(/* @__PURE__ */ new Set()), y = fe(() => {
64177
+ ), [u, h] = H(""), [f, p] = H(/* @__PURE__ */ new Set()), y = pe(() => {
64174
64178
  if (!u.trim())
64175
64179
  return i;
64176
64180
  const w = u.toLowerCase().trim();
@@ -64333,7 +64337,7 @@ const xue = (e) => {
64333
64337
  trailsClient: r,
64334
64338
  countryCode: s
64335
64339
  }) => {
64336
- const { tokens: a, isLoading: o, error: i } = yue(r, s), [c, d] = H(""), u = fe(() => {
64340
+ const { tokens: a, isLoading: o, error: i } = yue(r, s), [c, d] = H(""), u = pe(() => {
64337
64341
  let f = a;
64338
64342
  if (c.trim()) {
64339
64343
  const p = c.toLowerCase().trim();
@@ -64871,7 +64875,7 @@ function zL(e) {
64871
64875
  const S = I.data || null, O = S?.status, D = O === "COMPLETED" || O === "SETTLED" || O === "FAILED" || O === "DECLINED" || O === "CANCELLED" || O === "REFUNDED", j = O === "COMPLETED" || O === "SETTLED", L = j && S?.transactionHash || null, G = j && S?.destinationAmount?.toString() || null, W = O === "FAILED" || O === "DECLINED" || O === "CANCELLED";
64872
64876
  let M = "idle";
64873
64877
  b && !D ? M = "window-closed" : I.error ? M = "error" : j ? M = "success" : W ? M = "failed" : (E && c && I.isLoading || E && c) && (M = "polling");
64874
- const _ = fe(
64878
+ const _ = pe(
64875
64879
  () => ({
64876
64880
  state: M,
64877
64881
  message: Sue(M, O),
@@ -65256,7 +65260,7 @@ const jue = ({
65256
65260
  const { address: y } = fn(), b = hn(), { countryCode: v } = Xu({
65257
65261
  enabled: !u
65258
65262
  // Only fetch if no country prop provided
65259
- }), w = fe(() => {
65263
+ }), w = pe(() => {
65260
65264
  if (u) return u;
65261
65265
  if (v) {
65262
65266
  const B = lT.find(
@@ -65268,7 +65272,7 @@ const jue = ({
65268
65272
  };
65269
65273
  }
65270
65274
  return lT[0] || { code: "US", name: "United States" };
65271
- }, [u, v]), T = h || "CREDIT_DEBIT_CARD", [k, x] = H(() => localStorage.getItem("meld-form-amount") || "25"), [E] = H("USD"), C = fe(() => WL(e, b?.trailsApiUrl), [e, b?.trailsApiUrl]), { paymentMethods: I } = c2(C, E), S = fe(() => I.length ? I.find(
65275
+ }, [u, v]), T = h || "CREDIT_DEBIT_CARD", [k, x] = H(() => localStorage.getItem("meld-form-amount") || "25"), [E] = H("USD"), C = pe(() => WL(e, b?.trailsApiUrl), [e, b?.trailsApiUrl]), { paymentMethods: I } = c2(C, E), S = pe(() => I.length ? I.find(
65272
65276
  (B) => B.paymentMethod === T
65273
65277
  ) : null, [T, I]), O = f || $ue[0] || {
65274
65278
  code: "USDC_BASE",
@@ -65278,7 +65282,7 @@ const jue = ({
65278
65282
  chainName: "Base"
65279
65283
  }, [D, j] = H([]), L = p, [G, W] = H(!1), [M, _] = H(""), [z, A] = H(!1), [N, P] = H(
65280
65284
  null
65281
- ), [V, q] = H(!1), [te, ee] = H(null), [ae, Y] = H(null), [Q, re] = H(null), [oe, J] = H(null), [le, pe] = H(!1), [me, ve] = H(null), ke = ze(n);
65285
+ ), [V, q] = H(!1), [te, ee] = H(null), [ae, Y] = H(null), [Q, re] = H(null), [oe, J] = H(null), [ce, de] = H(!1), [me, ve] = H(null), ke = ze(n);
65282
65286
  ne(() => {
65283
65287
  ke.current = n;
65284
65288
  }, [n]);
@@ -65293,7 +65297,7 @@ const jue = ({
65293
65297
  []
65294
65298
  // No dependencies needed since we use ref
65295
65299
  ), We = Te(() => {
65296
- console.log("[MeldForm] Popup window was closed"), Y(null), q(!1), pe(!1);
65300
+ console.log("[MeldForm] Popup window was closed"), Y(null), q(!1), de(!1);
65297
65301
  }, []);
65298
65302
  ne(() => {
65299
65303
  const B = new URLSearchParams(window.location.search), U = B.get("sessionId") || B.get("externalSessionId") || B.get("orderId");
@@ -65302,7 +65306,7 @@ const jue = ({
65302
65306
  U
65303
65307
  ), ee(U), re(U), localStorage.setItem("meld-current-session-id", U));
65304
65308
  }, [te]);
65305
- const de = Te(async () => {
65309
+ const ue = Te(async () => {
65306
65310
  if (!w || !O || !k) {
65307
65311
  console.log("[MeldForm] Missing required parameters for loadProviders:", {
65308
65312
  selectedCountry: w,
@@ -65407,8 +65411,8 @@ const jue = ({
65407
65411
  C
65408
65412
  ]);
65409
65413
  ne(() => {
65410
- de(), P(null);
65411
- }, [de]), ne(() => {
65414
+ ue(), P(null);
65415
+ }, [ue]), ne(() => {
65412
65416
  D.length > 0 && (d?.(D), !L && c && D[0] && (console.log("[MeldForm] Auto-selecting first provider:", D[0]), c(D[0])));
65413
65417
  }, [D, L, d, c]), ne(() => {
65414
65418
  L && we();
@@ -65421,7 +65425,7 @@ const jue = ({
65421
65425
  "_blank",
65422
65426
  Uue(800, 600)
65423
65427
  );
65424
- B && (Y(B), pe(!0), me && me(B)), console.log(
65428
+ B && (Y(B), de(!0), me && me(B)), console.log(
65425
65429
  "[MeldForm] Payment window opened, session ID:",
65426
65430
  Q
65427
65431
  );
@@ -65602,7 +65606,7 @@ const jue = ({
65602
65606
  onWindowClosed: We,
65603
65607
  showTimeElapsed: !0,
65604
65608
  showPopupOpened: V,
65605
- isPopupOpen: le,
65609
+ isPopupOpen: ce,
65606
65610
  onSetWindowRef: ve
65607
65611
  }
65608
65612
  )
@@ -65706,13 +65710,13 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65706
65710
  },
65707
65711
  onError: () => {
65708
65712
  }
65709
- }), { address: a } = fn(), o = fe(() => WL(
65713
+ }), { address: a } = fn(), o = pe(() => WL(
65710
65714
  t.trailsApiKey,
65711
65715
  t.trailsApiUrl
65712
65716
  ), [t.trailsApiKey, t.trailsApiUrl]), [i, c] = H("menu");
65713
65717
  ne(() => {
65714
- const J = localStorage.getItem(vb), le = localStorage.getItem(xb);
65715
- J && v(J), le && T(le);
65718
+ const J = localStorage.getItem(vb), ce = localStorage.getItem(xb);
65719
+ J && v(J), ce && T(ce);
65716
65720
  }, []);
65717
65721
  const [d, u] = H(() => {
65718
65722
  try {
@@ -65743,29 +65747,29 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65743
65747
  "[MeldStepsFlow] All URL parameters:",
65744
65748
  Object.fromEntries(J.entries())
65745
65749
  );
65746
- const le = J.get("orderId") || // Meld sends orderId as the transaction identifier
65750
+ const ce = J.get("orderId") || // Meld sends orderId as the transaction identifier
65747
65751
  J.get("partnerOrderId") || // Backup identifier
65748
65752
  J.get("transactionId") || // Fallback options
65749
- J.get("meld_transaction_id") || J.get("transaction_id") || J.get("id"), pe = J.get("status") || // Meld sends 'status' parameter
65750
- J.get("meld_status") || J.get("transaction_status") || J.get("state"), me = J.get("fiatAmount"), ve = J.get("cryptoAmount"), ke = J.get("fiatCurrency"), $e = J.get("cryptoCurrency"), We = J.get("totalFeeInFiat"), de = J.get("walletAddress"), we = J.get("network");
65753
+ J.get("meld_transaction_id") || J.get("transaction_id") || J.get("id"), de = J.get("status") || // Meld sends 'status' parameter
65754
+ J.get("meld_status") || J.get("transaction_status") || J.get("state"), me = J.get("fiatAmount"), ve = J.get("cryptoAmount"), ke = J.get("fiatCurrency"), $e = J.get("cryptoCurrency"), We = J.get("totalFeeInFiat"), ue = J.get("walletAddress"), we = J.get("network");
65751
65755
  console.log("[MeldStepsFlow] Meld transaction details:", {
65752
- transactionId: le,
65753
- status: pe,
65756
+ transactionId: ce,
65757
+ status: de,
65754
65758
  fiatAmount: me,
65755
65759
  cryptoAmount: ve,
65756
65760
  fiatCurrency: ke,
65757
65761
  cryptoCurrency: $e,
65758
65762
  totalFee: We,
65759
- walletAddress: de,
65763
+ walletAddress: ue,
65760
65764
  network: we
65761
- }), console.log("[MeldStepsFlow] Extracted transaction ID:", le), console.log("[MeldStepsFlow] Extracted status:", pe);
65762
- const ie = le;
65765
+ }), console.log("[MeldStepsFlow] Extracted transaction ID:", ce), console.log("[MeldStepsFlow] Extracted status:", de);
65766
+ const ie = ce;
65763
65767
  if (ie || (console.log(
65764
65768
  "[MeldStepsFlow] No transaction ID in URL, will search by wallet address:",
65765
- de
65766
- ), de ? (console.log(
65769
+ ue
65770
+ ), ue ? (console.log(
65767
65771
  "[MeldStepsFlow] Searching for transactions by wallet address (external customer ID):",
65768
- de
65772
+ ue
65769
65773
  ), setTimeout(async () => {
65770
65774
  try {
65771
65775
  const B = localStorage.getItem(
@@ -65775,11 +65779,11 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65775
65779
  "[MeldStepsFlow] About to call searchMeldTransactions with params:",
65776
65780
  {
65777
65781
  customerIds: B,
65778
- fallbackCustomerIds: de,
65782
+ fallbackCustomerIds: ue,
65779
65783
  limit: 10
65780
65784
  }
65781
65785
  );
65782
- const U = B ? { customerIds: B, limit: 10 } : { customerIds: de, limit: 10 }, F = await o.searchMeldTransactions(U);
65786
+ const U = B ? { customerIds: B, limit: 10 } : { customerIds: ue, limit: 10 }, F = await o.searchMeldTransactions(U);
65783
65787
  console.log(
65784
65788
  "[MeldStepsFlow] Also searching for any recent transactions..."
65785
65789
  );
@@ -65816,7 +65820,7 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65816
65820
  // TERMINAL SUCCESS STATE
65817
65821
  case "settled": {
65818
65822
  se = "success";
65819
- const Ie = X.destinationAmount || "", Oe = X.destinationCurrencyCode || "", Se = X.destinationChainId || X.networkId, ue = X.serviceProvider || "provider", Be = Se ? Im(Number(Se)) : "", Ne = Ie && Oe ? `${Ie} ${Oe}${Be ? ` on ${Be}` : ""} via ${ue.toUpperCase()}` : "crypto", Je = X.walletAddress ? ` to ${X.walletAddress.slice(0, 6)}...${X.walletAddress.slice(-4)}` : "";
65823
+ const Ie = X.destinationAmount || "", Oe = X.destinationCurrencyCode || "", Se = X.destinationChainId || X.networkId, he = X.serviceProvider || "provider", Be = Se ? Im(Number(Se)) : "", Ne = Ie && Oe ? `${Ie} ${Oe}${Be ? ` on ${Be}` : ""} via ${he.toUpperCase()}` : "crypto", Je = X.walletAddress ? ` to ${X.walletAddress.slice(0, 6)}...${X.walletAddress.slice(-4)}` : "";
65820
65824
  xe = `Payment completed! ${Ne} purchased${Je}`;
65821
65825
  break;
65822
65826
  }
@@ -65872,8 +65876,8 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65872
65876
  break;
65873
65877
  }
65874
65878
  if (se === "pending" && !xe.includes("Transaction created") && !xe.includes("Payment submitted") && !xe.includes("Payment approved") && !xe.includes("complete 2FA") && !xe.includes("2FA submitted") && !xe.includes("Processing error")) {
65875
- const Ie = X.destinationAmount || "", Oe = X.destinationCurrencyCode || "", Se = X.destinationChainId || X.networkId, ue = X.serviceProvider || "provider", Be = Se ? Im(Number(Se)) : "";
65876
- xe = `${Ie && Oe ? `${Ie} ${Oe}${Be ? ` on ${Be}` : ""} via ${ue.toUpperCase()}` : "payment"} is being processed...`;
65879
+ const Ie = X.destinationAmount || "", Oe = X.destinationCurrencyCode || "", Se = X.destinationChainId || X.networkId, he = X.serviceProvider || "provider", Be = Se ? Im(Number(Se)) : "";
65880
+ xe = `${Ie && Oe ? `${Ie} ${Oe}${Be ? ` on ${Be}` : ""} via ${he.toUpperCase()}` : "payment"} is being processed...`;
65877
65881
  }
65878
65882
  P({
65879
65883
  status: X.status || "PROCESSING",
@@ -65886,7 +65890,7 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65886
65890
  } else
65887
65891
  console.log(
65888
65892
  "[MeldStepsFlow] No transactions found for wallet address:",
65889
- de
65893
+ ue
65890
65894
  ), console.log(
65891
65895
  "[MeldStepsFlow] Search result shows no transactions, this is normal for first-time users"
65892
65896
  );
@@ -65902,8 +65906,8 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65902
65906
  if (console.log(
65903
65907
  "[MeldStepsFlow] Setting transaction ID for tracking from URL:",
65904
65908
  ie
65905
- ), A(ie), pe) {
65906
- const F = (pe || "").toLowerCase();
65909
+ ), A(ie), de) {
65910
+ const F = (de || "").toLowerCase();
65907
65911
  let $ = "pending";
65908
65912
  switch (F) {
65909
65913
  case "settled":
@@ -65939,7 +65943,7 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65939
65943
  }
65940
65944
  let R = "Payment is being processed...";
65941
65945
  if ($ === "success") {
65942
- const X = ve || "", Ae = $e || "", se = we || "", Fe = X && Ae ? `${X} ${Ae}${se ? ` on ${se}` : ""} via MELD` : "crypto", Ie = de ? ` to ${de.slice(0, 6)}...${de.slice(-4)}` : "";
65946
+ const X = ve || "", Ae = $e || "", se = we || "", Fe = X && Ae ? `${X} ${Ae}${se ? ` on ${se}` : ""} via MELD` : "crypto", Ie = ue ? ` to ${ue.slice(0, 6)}...${ue.slice(-4)}` : "";
65943
65947
  R = `Payment completed! ${Fe} purchased${Ie}`;
65944
65948
  } else if ($ === "error")
65945
65949
  R = "Payment failed or was cancelled.";
@@ -65947,8 +65951,8 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65947
65951
  const X = ve || me || "", Ae = $e || "", se = we || "";
65948
65952
  X && Ae ? R = `${`${X} ${Ae}${se ? ` on ${se}` : ""} via MELD`} is being processed...` : R = `${me && ke ? `${ke} ${me}` : "payment"} is being processed...`;
65949
65953
  }
65950
- P({ status: pe, message: R, type: $ }), console.log("[MeldStepsFlow] Set initial transaction status:", {
65951
- status: pe,
65954
+ P({ status: de, message: R, type: $ }), console.log("[MeldStepsFlow] Set initial transaction status:", {
65955
+ status: de,
65952
65956
  type: $,
65953
65957
  message: R
65954
65958
  });
@@ -65999,34 +66003,34 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
65999
66003
  "[MeldStepsFlow] Checking transaction status for ID:",
66000
66004
  J
66001
66005
  ), console.log("[MeldStepsFlow] Making API call to getMeldTransaction...");
66002
- const le = await o.getMeldTransaction({
66006
+ const ce = await o.getMeldTransaction({
66003
66007
  transactionId: J
66004
66008
  });
66005
- console.log("[MeldStepsFlow] Raw API response:", le), console.log("[MeldStepsFlow] Response type:", typeof le), console.log(
66009
+ console.log("[MeldStepsFlow] Raw API response:", ce), console.log("[MeldStepsFlow] Response type:", typeof ce), console.log(
66006
66010
  "[MeldStepsFlow] Response keys:",
66007
- Object.keys(le || {})
66008
- ), console.log("[MeldStepsFlow] Transaction data:", le?.transaction), console.log(
66011
+ Object.keys(ce || {})
66012
+ ), console.log("[MeldStepsFlow] Transaction data:", ce?.transaction), console.log(
66009
66013
  "[MeldStepsFlow] Transaction data type:",
66010
- typeof le?.transaction
66014
+ typeof ce?.transaction
66011
66015
  );
66012
- let pe;
66016
+ let de;
66013
66017
  try {
66014
- pe = typeof le.transaction == "string" ? JSON.parse(le.transaction) : le.transaction;
66018
+ de = typeof ce.transaction == "string" ? JSON.parse(ce.transaction) : ce.transaction;
66015
66019
  } catch (ke) {
66016
66020
  console.error("[MeldStepsFlow] Error parsing transaction data:", ke);
66017
66021
  return;
66018
66022
  }
66019
- if (pe?.transaction && (pe = pe.transaction), !pe) {
66023
+ if (de?.transaction && (de = de.transaction), !de) {
66020
66024
  console.warn("[MeldStepsFlow] No transaction data in response");
66021
66025
  return;
66022
66026
  }
66023
66027
  let me = "pending", ve = "Payment is being processed...";
66024
- switch (console.log("[MeldStepsFlow] Transaction status:", pe.status), (pe.status || "").toLowerCase()) {
66028
+ switch (console.log("[MeldStepsFlow] Transaction status:", de.status), (de.status || "").toLowerCase()) {
66025
66029
  // TERMINAL SUCCESS STATE
66026
66030
  case "settled": {
66027
66031
  me = "success";
66028
- const ke = pe.walletAddress || pe.destinationWalletAddress || pe.cryptoDetails?.destinationWalletAddress || pe.cryptoDetails?.sessionWalletAddress || "", $e = ke && typeof ke == "string" ? ` sent to ${ke.slice(0, 6)}...${ke.slice(-4)}` : "", We = pe.destinationAmount || pe.cryptoDetails?.destinationAmount || "", de = pe.destinationCurrencyCode || "", we = pe.destinationChainId || pe.networkId, ie = pe.serviceProvider || "MELD", B = we ? Im(Number(we)) : "";
66029
- ve = `Payment completed! ${We && de ? `${We} ${de}${B ? ` on ${B}` : ""} via ${ie.toUpperCase()}` : "crypto"} purchased${$e}`;
66032
+ const ke = de.walletAddress || de.destinationWalletAddress || de.cryptoDetails?.destinationWalletAddress || de.cryptoDetails?.sessionWalletAddress || "", $e = ke && typeof ke == "string" ? ` sent to ${ke.slice(0, 6)}...${ke.slice(-4)}` : "", We = de.destinationAmount || de.cryptoDetails?.destinationAmount || "", ue = de.destinationCurrencyCode || "", we = de.destinationChainId || de.networkId, ie = de.serviceProvider || "MELD", B = we ? Im(Number(we)) : "";
66033
+ ve = `Payment completed! ${We && ue ? `${We} ${ue}${B ? ` on ${B}` : ""} via ${ie.toUpperCase()}` : "crypto"} purchased${$e}`;
66030
66034
  break;
66031
66035
  }
66032
66036
  // TERMINAL FAILURE STATES
@@ -66080,22 +66084,22 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66080
66084
  me = "pending", ve = "Payment is being processed...";
66081
66085
  break;
66082
66086
  default:
66083
- me = "pending", ve = `Payment status: ${pe.status || "Processing..."}`;
66087
+ me = "pending", ve = `Payment status: ${de.status || "Processing..."}`;
66084
66088
  }
66085
66089
  return console.log("[MeldStepsFlow] Setting transaction status:", {
66086
- status: pe.status,
66090
+ status: de.status,
66087
66091
  message: ve,
66088
66092
  type: me
66089
- }), P({ status: pe.status, message: ve, type: me }), pe;
66090
- } catch (le) {
66093
+ }), P({ status: de.status, message: ve, type: me }), de;
66094
+ } catch (ce) {
66091
66095
  console.error(
66092
66096
  "[MeldStepsFlow] Error checking transaction status:",
66093
- le
66097
+ ce
66094
66098
  );
66095
- let pe = "Unable to check payment status.";
66096
- le instanceof Error && (pe = `Error: ${le.message}`, le.message.includes("404") || le.message.includes("not found") ? pe = `Transaction not found. ID: ${J}` : le.message.includes("401") || le.message.includes("Unauthorized") ? pe = "Not authorized to access transaction data." : le.message.includes("timeout") && (pe = "Request timed out. Please try again.")), P({
66099
+ let de = "Unable to check payment status.";
66100
+ ce instanceof Error && (de = `Error: ${ce.message}`, ce.message.includes("404") || ce.message.includes("not found") ? de = `Transaction not found. ID: ${J}` : ce.message.includes("401") || ce.message.includes("Unauthorized") ? de = "Not authorized to access transaction data." : ce.message.includes("timeout") && (de = "Request timed out. Please try again.")), P({
66097
66101
  status: "error",
66098
- message: pe,
66102
+ message: de,
66099
66103
  type: "error"
66100
66104
  });
66101
66105
  }
@@ -66120,7 +66124,7 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66120
66124
  "meld-current-external-session-id",
66121
66125
  J
66122
66126
  ), console.log("[MeldStepsFlow] Stored external session ID in localStorage");
66123
- const le = window.location.origin + window.location.pathname;
66127
+ const ce = window.location.origin + window.location.pathname;
66124
66128
  console.log("[MeldStepsFlow] Creating widget session with:", {
66125
66129
  countryCode: d.code,
66126
66130
  destinationCurrencyCode: p.code,
@@ -66129,7 +66133,7 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66129
66133
  externalSessionId: J,
66130
66134
  walletAddress: a
66131
66135
  });
66132
- const pe = a.toLowerCase(), me = await o.createMeldWidgetSession({
66136
+ const de = a.toLowerCase(), me = await o.createMeldWidgetSession({
66133
66137
  sessionData: {
66134
66138
  walletAddress: a,
66135
66139
  countryCode: d.code,
@@ -66141,7 +66145,7 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66141
66145
  // redirectUrl, // Redirect back to current page after completion
66142
66146
  },
66143
66147
  sessionType: "BUY",
66144
- externalCustomerId: pe,
66148
+ externalCustomerId: de,
66145
66149
  externalSessionId: J
66146
66150
  });
66147
66151
  console.log("[MeldStepsFlow] Session response:", me);
@@ -66173,8 +66177,8 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66173
66177
  console.log("[MeldStepsFlow] Widget URL:", $e), x($e), S("");
66174
66178
  } catch (J) {
66175
66179
  console.error("[MeldStepsFlow] Error generating widget URL:", J), x("");
66176
- let le = J instanceof Error ? J.message : String(J);
66177
- le.includes("Invalid Customer") ? le = `Payment provider issue: ${G?.serviceProvider || "Unknown provider"} is currently unavailable. Please try again later or contact support.` : le.includes("BAD_REQUEST") && (le = "Invalid request parameters. Please check your selection and try again."), S(le);
66180
+ let ce = J instanceof Error ? J.message : String(J);
66181
+ ce.includes("Invalid Customer") ? ce = `Payment provider issue: ${G?.serviceProvider || "Unknown provider"} is currently unavailable. Please try again later or contact support.` : ce.includes("BAD_REQUEST") && (ce = "Invalid request parameters. Please check your selection and try again."), S(ce);
66178
66182
  } finally {
66179
66183
  C(!1);
66180
66184
  }
@@ -66193,7 +66197,7 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66193
66197
  }, [k, q]), Te(() => {
66194
66198
  if (!p)
66195
66199
  return;
66196
- const J = s.find((le) => le.symbol.toUpperCase() === p.symbol.toUpperCase() && le.chainId === p.chainId);
66200
+ const J = s.find((ce) => ce.symbol.toUpperCase() === p.symbol.toUpperCase() && ce.chainId === p.chainId);
66197
66201
  J && (r(J), n("home"));
66198
66202
  }, [p, s, r, n]), ne(() => {
66199
66203
  if (console.log("[MeldStepsFlow] Polling useEffect triggered:", {
@@ -66245,20 +66249,20 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66245
66249
  destinationCurrencyCode: p.code
66246
66250
  });
66247
66251
  console.log("[MeldStepsFlow] Quote response:", J);
66248
- let le;
66252
+ let ce;
66249
66253
  try {
66250
- le = typeof J.quoteResponse == "string" ? JSON.parse(J.quoteResponse) : J.quoteResponse;
66254
+ ce = typeof J.quoteResponse == "string" ? JSON.parse(J.quoteResponse) : J.quoteResponse;
66251
66255
  } catch (me) {
66252
66256
  console.error("[MeldStepsFlow] Error parsing quote response:", me), L(!1);
66253
66257
  return;
66254
66258
  }
66255
- console.log("[MeldStepsFlow] Parsed quote response:", le);
66256
- const pe = le?.quotes;
66257
- if (!pe || pe.length === 0) {
66259
+ console.log("[MeldStepsFlow] Parsed quote response:", ce);
66260
+ const de = ce?.quotes;
66261
+ if (!de || de.length === 0) {
66258
66262
  x("No quotes available for this selection"), C(!1);
66259
66263
  return;
66260
66264
  }
66261
- D(pe), pe.length > 0 && W(pe[0]), L(!1);
66265
+ D(de), de.length > 0 && W(de[0]), L(!1);
66262
66266
  } catch (J) {
66263
66267
  console.error("Error loading providers:", J), L(!1);
66264
66268
  }
@@ -66281,8 +66285,8 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66281
66285
  f(J), D([]), W(null), _(!1), x(""), S(""), c("menu");
66282
66286
  }, Q = (J) => {
66283
66287
  y(J), D([]), W(null), _(!1), x(""), S(""), c("menu");
66284
- }, re = (J, le) => {
66285
- v(J), T(le), D([]), W(null), _(!1), x(""), S(""), c("providers");
66288
+ }, re = (J, ce) => {
66289
+ v(J), T(ce), D([]), W(null), _(!1), x(""), S(""), c("providers");
66286
66290
  }, oe = (J) => {
66287
66291
  W(J), _(!1), x(""), S(""), c("menu");
66288
66292
  };
@@ -66327,8 +66331,8 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66327
66331
  ) : i === "amount" ? /* @__PURE__ */ l(
66328
66332
  Wue,
66329
66333
  {
66330
- onBack: (J, le) => {
66331
- J && (v(J), localStorage.setItem(vb, J)), le && (T(le), localStorage.setItem(xb, le)), c("menu");
66334
+ onBack: (J, ce) => {
66335
+ J && (v(J), localStorage.setItem(vb, J)), ce && (T(ce), localStorage.setItem(xb, ce)), c("menu");
66332
66336
  },
66333
66337
  onContinue: re,
66334
66338
  _selectedCountry: d,
@@ -66404,15 +66408,15 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66404
66408
  );
66405
66409
  const J = setInterval(async () => {
66406
66410
  try {
66407
- const le = localStorage.getItem(
66411
+ const ce = localStorage.getItem(
66408
66412
  "meld-current-customer-id-for-search"
66409
- ), pe = le ? { customerIds: le, limit: 5 } : { customerIds: a, limit: 5 };
66413
+ ), de = ce ? { customerIds: ce, limit: 5 } : { customerIds: a, limit: 5 };
66410
66414
  console.log(
66411
66415
  "[MeldStepsFlow] Polling search with params:",
66412
- pe
66416
+ de
66413
66417
  );
66414
66418
  const me = await o.searchMeldTransactions(
66415
- pe
66419
+ de
66416
66420
  );
66417
66421
  let ve;
66418
66422
  try {
@@ -66431,10 +66435,10 @@ const vb = "meld-form-amount", xb = "meld-debug-currency", Wue = ({
66431
66435
  $e
66432
66436
  ), A($e), clearInterval(J));
66433
66437
  }
66434
- } catch (le) {
66438
+ } catch (ce) {
66435
66439
  console.error(
66436
66440
  "[MeldStepsFlow] Search polling error:",
66437
- le
66441
+ ce
66438
66442
  );
66439
66443
  }
66440
66444
  }, 5e3);
@@ -66592,7 +66596,7 @@ function que({
66592
66596
  }
66593
66597
  function Kue(e) {
66594
66598
  const t = ki(), { providers: n } = bue(t);
66595
- return fe(() => {
66599
+ return pe(() => {
66596
66600
  if (!e) return "";
66597
66601
  const r = n.find(
66598
66602
  (s) => s.serviceProvider?.toLowerCase() === e.toLowerCase()
@@ -66969,7 +66973,7 @@ function Eu(e, t) {
66969
66973
  const { sortedTokens: n, isLoadingBalances: r } = Gu(
66970
66974
  t
66971
66975
  );
66972
- return { token: fe(() => {
66976
+ return { token: pe(() => {
66973
66977
  if (!e || !n) return e;
66974
66978
  const a = n.find(
66975
66979
  (o) => o.contractAddress.toLowerCase() === e.contractAddress.toLowerCase() && (o.chainId || 0) === (e.chainId || 0)
@@ -67080,16 +67084,16 @@ function gp({
67080
67084
  // 24 hours
67081
67085
  refetchOnWindowFocus: !1,
67082
67086
  refetchOnReconnect: !1
67083
- }), Q = fe(() => s?.startsWith("0x"), [s]), { addCustomToken: re } = V1(), {
67087
+ }), Q = pe(() => s?.startsWith("0x"), [s]), { addCustomToken: re } = V1(), {
67084
67088
  tokenInfo: oe,
67085
67089
  isLoading: J,
67086
- error: le
67090
+ error: ce
67087
67091
  } = Uf({
67088
67092
  address: Q ? s : "",
67089
67093
  chainId: r
67090
- }), pe = fe(() => Q ? !!(Q && !le && !J && oe) : !0, [Q, le, J, oe]);
67094
+ }), de = pe(() => Q ? !!(Q && !ce && !J && oe) : !0, [Q, ce, J, oe]);
67091
67095
  ne(() => {
67092
- if (oe && !le && Q && r && s && oe.symbol && oe.name && oe.decimals !== void 0)
67096
+ if (oe && !ce && Q && r && s && oe.symbol && oe.name && oe.decimals !== void 0)
67093
67097
  if (Y.some(
67094
67098
  (Xe) => Xe.chainId === r && Xe.contractAddress.toLowerCase() === s.toLowerCase()
67095
67099
  ))
@@ -67116,7 +67120,7 @@ function gp({
67116
67120
  }
67117
67121
  }, [
67118
67122
  oe,
67119
- le,
67123
+ ce,
67120
67124
  Q,
67121
67125
  r,
67122
67126
  s,
@@ -67125,13 +67129,13 @@ function gp({
67125
67129
  ]), ne(() => {
67126
67130
  Q && oe && !J && we(oe);
67127
67131
  }, [oe, Q, J]), ne(() => {
67128
- Q && le && !J && (m.console.error("[trails-sdk] errorCustomToken", le), A(
67129
- `Invalid custom toToken address. Error: ${le.message}`
67132
+ Q && ce && !J && (m.console.error("[trails-sdk] errorCustomToken", ce), A(
67133
+ `Invalid custom toToken address. Error: ${ce.message}`
67130
67134
  ));
67131
- }, [le, Q, J]);
67132
- const me = fe(() => E === "swap" ? null : q ? ee.find(
67135
+ }, [ce, Q, J]);
67136
+ const me = pe(() => E === "swap" ? null : q ? ee.find(
67133
67137
  (Qe) => Qe.chainId === q.id
67134
- ) || null : ee?.[0] || null, [ee, q, E]), [ve, ke] = H(!1), [$e, We] = H(!1), [de, we] = H(
67138
+ ) || null : ee?.[0] || null, [ee, q, E]), [ve, ke] = H(!1), [$e, We] = H(!1), [ue, we] = H(
67135
67139
  () => {
67136
67140
  let Qe = me;
67137
67141
  if (s && !Q) {
@@ -67145,8 +67149,8 @@ function gp({
67145
67149
  }
67146
67150
  );
67147
67151
  ne(() => {
67148
- !de && me && we(me);
67149
- }, [de, me]), hn();
67152
+ !ue && me && we(me);
67153
+ }, [ue, me]), hn();
67150
67154
  const { filteredTokensFormatted: ie } = rd({
67151
67155
  onContinue: () => {
67152
67156
  },
@@ -67163,14 +67167,14 @@ function gp({
67163
67167
  }, [ie]);
67164
67168
  const U = Cy({
67165
67169
  chainId: q?.id,
67166
- tokenSymbol: de?.symbol
67167
- }), F = fe(() => de && U && q?.id ? [
67170
+ tokenSymbol: ue?.symbol
67171
+ }), F = pe(() => ue && U && q?.id ? [
67168
67172
  {
67169
- tokenSymbol: de.symbol,
67173
+ tokenSymbol: ue.symbol,
67170
67174
  tokenAddress: U,
67171
67175
  chainId: q.id
67172
67176
  }
67173
- ] : [], [de, U, q?.id]), { tokenPrices: $ } = Ml(F), { tokenPrices: R } = Ml(
67177
+ ] : [], [ue, U, q?.id]), { tokenPrices: $ } = Ml(F), { tokenPrices: R } = Ml(
67174
67178
  f ? [
67175
67179
  {
67176
67180
  tokenSymbol: f.symbol,
@@ -67200,7 +67204,7 @@ function gp({
67200
67204
  ]), ne(() => {
67201
67205
  w === qe.EXACT_OUTPUT && L(t ?? "");
67202
67206
  }, [t, w]);
67203
- const X = fe(() => hs(t || 0), [t]);
67207
+ const X = pe(() => hs(t || 0), [t]);
67204
67208
  ne(() => {
67205
67209
  W(n ?? ""), _(n ?? "");
67206
67210
  }, [n]);
@@ -67216,10 +67220,10 @@ function gp({
67216
67220
  }
67217
67221
  },
67218
67222
  [c]
67219
- ), { token: Se, isLoadingBalance: ue } = Eu(f, e?.address), Be = Se?.balance && Se?.decimals ? sr(
67223
+ ), { token: Se, isLoadingBalance: he } = Eu(f, e?.address), Be = Se?.balance && Se?.decimals ? sr(
67220
67224
  Se.balance || "0",
67221
67225
  Se.decimals || 18
67222
- ) : void 0, Ne = Se?.balanceUsdFormatted || "", Je = !!(M && Yr(M)), tt = fe(() => {
67226
+ ) : void 0, Ne = Se?.balanceUsdFormatted || "", Je = !!(M && Yr(M)), tt = pe(() => {
67223
67227
  const Qe = w === qe.EXACT_INPUT ? R?.[0]?.priceUsd ?? 0 : $?.[0]?.priceUsd ?? 0, Xe = Number(j) * Qe;
67224
67228
  return Pt(Xe);
67225
67229
  }, [j, $, R, w]), {
@@ -67229,43 +67233,43 @@ function gp({
67229
67233
  setFeeOptions: ar
67230
67234
  } = yU(), Xn = Cy({
67231
67235
  chainId: q?.id,
67232
- tokenSymbol: de?.symbol
67233
- }), Vt = fe(() => {
67236
+ tokenSymbol: ue?.symbol
67237
+ }), Vt = pe(() => {
67234
67238
  if (Q)
67235
67239
  return m.console.log(
67236
67240
  "[trails-sdk] [CUSTOM-TOKEN] Using toToken prop as destinationTokenAddress:",
67237
67241
  s
67238
67242
  ), s ?? null;
67239
- if (de?.contractAddress)
67243
+ if (ue?.contractAddress)
67240
67244
  return m.console.log(
67241
67245
  "[trails-sdk] [CUSTOM-TOKEN] Using contractAddress from selectedDestToken:",
67242
67246
  {
67243
- contractAddress: de.contractAddress,
67244
- symbol: de.symbol
67247
+ contractAddress: ue.contractAddress,
67248
+ symbol: ue.symbol
67245
67249
  }
67246
- ), de.contractAddress;
67250
+ ), ue.contractAddress;
67247
67251
  const Qe = Xn ?? null;
67248
67252
  return m.console.log(
67249
67253
  "[trails-sdk] [CUSTOM-TOKEN] Using address from symbol lookup:",
67250
67254
  {
67251
67255
  addressFromSymbol: Qe,
67252
- symbol: de?.symbol
67256
+ symbol: ue?.symbol
67253
67257
  }
67254
67258
  ), Qe;
67255
67259
  }, [
67256
67260
  Q,
67257
67261
  s,
67258
- de?.contractAddress,
67259
- de?.symbol,
67262
+ ue?.contractAddress,
67263
+ ue?.symbol,
67260
67264
  Xn
67261
- ]), nn = fe(() => {
67262
- if (!f && !de)
67265
+ ]), nn = pe(() => {
67266
+ if (!f && !ue)
67263
67267
  return "0";
67264
- if (!j && !(f?.decimals || de?.decimals))
67268
+ if (!j && !(f?.decimals || ue?.decimals))
67265
67269
  return m.console.warn("[trails-sdk] Missing token decimals for quote", {
67266
67270
  amount: j,
67267
67271
  selectedToken: f,
67268
- selectedDestToken: de,
67272
+ selectedDestToken: ue,
67269
67273
  tradeType: w
67270
67274
  }), "0";
67271
67275
  if (w === qe.EXACT_INPUT) {
@@ -67277,20 +67281,20 @@ function gp({
67277
67281
  tradeType: w
67278
67282
  }
67279
67283
  ), "0";
67280
- } else if (!de?.decimals)
67284
+ } else if (!ue?.decimals)
67281
67285
  return m.console.warn(
67282
67286
  "[trails-sdk] Missing destination token decimals for quote",
67283
67287
  {
67284
- selectedDestToken: de,
67288
+ selectedDestToken: ue,
67285
67289
  tradeType: w
67286
67290
  }
67287
67291
  ), "0";
67288
- const Qe = w === qe.EXACT_INPUT ? f?.decimals : de?.decimals;
67292
+ const Qe = w === qe.EXACT_INPUT ? f?.decimals : ue?.decimals;
67289
67293
  if (!Qe)
67290
67294
  return m.console.warn("[trails-sdk] Missing token decimals for quote", {
67291
67295
  decimals: Qe,
67292
67296
  selectedToken: f,
67293
- selectedDestToken: de,
67297
+ selectedDestToken: ue,
67294
67298
  tradeType: w
67295
67299
  }), "0";
67296
67300
  try {
@@ -67300,24 +67304,24 @@ function gp({
67300
67304
  }
67301
67305
  }, [
67302
67306
  j,
67303
- de,
67307
+ ue,
67304
67308
  f,
67305
- de?.decimals,
67309
+ ue?.decimals,
67306
67310
  f?.decimals,
67307
67311
  w
67308
- ]), Ut = fe(() => h?.find(
67312
+ ]), Ut = pe(() => h?.find(
67309
67313
  (Qe) => Qe.chainId.toString() === (f?.chainId || 0).toString()
67310
- )?.url, [h, f?.chainId]), Zt = fe(() => {
67311
- if (!f || !de || !e?.address || !M)
67314
+ )?.url, [h, f?.chainId]), Zt = pe(() => {
67315
+ if (!f || !ue || !e?.address || !M)
67312
67316
  return !1;
67313
- const Qe = f.contractAddress?.toLowerCase() === de.contractAddress?.toLowerCase() && f.chainId === de.chainId, Xe = f.chainId === de.chainId;
67317
+ const Qe = f.contractAddress?.toLowerCase() === ue.contractAddress?.toLowerCase() && f.chainId === ue.chainId, Xe = f.chainId === ue.chainId;
67314
67318
  if (x === "qr-code" || x === "onramp-exchange" || x === "onramp-meld")
67315
67319
  return !1;
67316
67320
  const Ge = M.toLowerCase() === e.address.toLowerCase();
67317
67321
  return Qe && Xe && Ge;
67318
67322
  }, [
67319
67323
  f,
67320
- de,
67324
+ ue,
67321
67325
  e?.address,
67322
67326
  M,
67323
67327
  x
@@ -67351,17 +67355,17 @@ function gp({
67351
67355
  isSmartWallet: D,
67352
67356
  fundMethod: x,
67353
67357
  onramp: O
67354
- }), mn = rn, vs = ln ? bn(ln) : null, sn = Sr || null, nt = fe(() => !wn || !xt ? null : {
67358
+ }), mn = rn, vs = ln ? bn(ln) : null, sn = Sr || null, nt = pe(() => !wn || !xt ? null : {
67355
67359
  quote: { ...wn },
67356
67360
  feeOptions: { feeOptions: ge }
67357
67361
  // Note: send function is handled separately via sendFn
67358
- }, [wn, xt, ge]), cn = fe(() => {
67362
+ }, [wn, xt, ge]), cn = pe(() => {
67359
67363
  const Qe = nt?.quote?.destinationAmountFormatted;
67360
67364
  return Qe && Qe !== "0" ? Qe : X;
67361
- }, [nt, X]), Wr = fe(() => {
67365
+ }, [nt, X]), Wr = pe(() => {
67362
67366
  const Qe = hs(cn || 0);
67363
67367
  return Number(Qe) === 0 ? "0" : Qe;
67364
- }, [cn]), Zn = fe(() => {
67368
+ }, [cn]), Zn = pe(() => {
67365
67369
  if (nt?.quote) {
67366
67370
  const Qe = w === qe.EXACT_INPUT ? nt.quote.originAmountUsdDisplay : nt.quote.destinationAmountUsdDisplay;
67367
67371
  if (Qe && Qe !== "$0.00")
@@ -67521,22 +67525,22 @@ function gp({
67521
67525
  Xe instanceof Error ? Xe.message : "An unexpected error occurred"
67522
67526
  );
67523
67527
  });
67524
- }, ns = fe(() => {
67528
+ }, ns = pe(() => {
67525
67529
  if (!e?.address) return "Connect your wallet";
67526
67530
  if (!f) return "Select a token";
67527
67531
  if (!j) return "Enter an amount";
67528
- if (!de?.symbol) return "Select a token";
67532
+ if (!ue?.symbol) return "Select a token";
67529
67533
  if (Fe) return "Waiting for wallet...";
67530
67534
  if (se) return "Processing...";
67531
67535
  if (!Je && E === "earn") return "Select a vault";
67532
67536
  if (!Je) return "Enter a recipient";
67533
67537
  if (mn) return "Getting quote...";
67534
67538
  if (!nt) return "No quote available";
67535
- const Qe = nt?.quote?.originAmountFormatted ?? hs(j), Xe = nt?.quote?.destinationAmountFormatted ?? hs(j), Ge = f.symbol, wr = de?.symbol, Ht = fs(Qe), vn = fs(
67539
+ const Qe = nt?.quote?.originAmountFormatted ?? hs(j), Xe = nt?.quote?.destinationAmountFormatted ?? hs(j), Ge = f.symbol, wr = ue?.symbol, Ht = fs(Qe), vn = fs(
67536
67540
  Xe
67537
67541
  );
67538
67542
  try {
67539
- const Tn = f.chainId === q?.id, Tt = f.symbol === de.symbol, Nr = Ds(M), kt = Ds(e.address);
67543
+ const Tn = f.chainId === q?.id, Tt = f.symbol === ue.symbol, Nr = Ds(M), kt = Ds(e.address);
67540
67544
  return m.console.log("[trails-sdk] buttonText:", {
67541
67545
  mode: E,
67542
67546
  fundMethod: x,
@@ -67552,7 +67556,7 @@ function gp({
67552
67556
  Je,
67553
67557
  M,
67554
67558
  e?.address,
67555
- de?.symbol,
67559
+ ue?.symbol,
67556
67560
  Fe,
67557
67561
  se,
67558
67562
  mn,
@@ -67582,7 +67586,7 @@ function gp({
67582
67586
  recipient: M,
67583
67587
  recipientInput: G,
67584
67588
  selectedDestinationChain: q,
67585
- selectedDestToken: de,
67589
+ selectedDestToken: ue,
67586
67590
  setAmount: L,
67587
67591
  setRecipient: _,
67588
67592
  setRecipientInput: W,
@@ -67607,14 +67611,14 @@ function gp({
67607
67611
  toAmountFormatted: cn,
67608
67612
  toAmountDisplay: Wr,
67609
67613
  destinationTokenAddress: Vt,
67610
- isValidCustomToken: pe,
67614
+ isValidCustomToken: de,
67611
67615
  prepareSendQuote: nt?.quote ?? null,
67612
67616
  quoteError: vs,
67613
67617
  quoteErrorPrettified: sn,
67614
67618
  isRecipientContract: _e ?? !1,
67615
67619
  isSenderContractOnOrigin: ut ?? !1,
67616
67620
  isSenderContractOnDestination: Ye ?? !1,
67617
- isLoadingBalance: ue
67621
+ isLoadingBalance: he
67618
67622
  };
67619
67623
  }
67620
67624
  const fl = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20190.5%20190.5'%20enable-background='new%200%200%20190.5%20190.5'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill='%239391F7'%20d='M190.5,95.3C190.5,42.6,147.9,0,95.3,0S0,42.6,0,95.3s42.6,95.3,95.3,95.3S190.5,147.9,190.5,95.3%20L190.5,95.3z'/%3e%3cpath%20fill='%23FFFFFF'%20d='M77.5,99.9c8.2-1.3,13.7-9,12.4-17.2c-1.3-8.2-9-13.7-17.2-12.4c-8.2,1.3-13.7,9-12.4,17.2%20C61.7,95.7,69.4,101.2,77.5,99.9L77.5,99.9z%20M116.7,99.9c8.2-1.3,13.7-9,12.4-17.2c-1.3-8.2-9-13.7-17.2-12.4%20c-8.2,1.3-13.7,9-12.4,17.2C100.8,95.7,108.5,101.2,116.7,99.9L116.7,99.9z'/%3e%3cpath%20fill='%23FFFFFF'%20d='M94.7,23.3C54,23.3,21,56.9,21,98.3h18.8c0-31.1,24.4-56.2,54.8-56.2c30.5,0,54.8,25.2,54.8,56.2h18.8%20C168.4,56.9,135.4,23.3,94.7,23.3L94.7,23.3L94.7,23.3z'/%3e%3c/g%3e%3c/svg%3e", pl = "data:image/svg+xml,%3csvg%20width='300'%20height='300'%20viewBox='0%200%20300%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1122_283)'%3e%3cpath%20d='M150%20300C232.843%20300%20300%20232.843%20300%20150C300%2067.1573%20232.843%200%20150%200C67.1573%200%200%2067.1573%200%20150C0%20232.843%2067.1573%20300%20150%20300Z'%20fill='%232470FF'/%3e%3cpath%20opacity='0.8'%20d='M87.4323%20177.299V221.974C87.4323%20224.725%2089.7598%20225.866%2090.4839%20226.125C91.208%20226.437%2093.639%20227.111%2095.8113%20225.088L129.608%20192.609C132.486%20189.843%20135.264%20186.936%20137.352%20183.535C138.334%20181.936%20138.741%20181.035%20138.741%20181.035C140.811%20176.832%20140.811%20172.785%20138.793%20168.737C135.794%20162.718%20128.138%20156.595%20116.604%20150.784L96.8975%20161.784C91.053%20165.105%2087.4323%20170.969%2087.4323%20177.299Z'%20fill='white'/%3e%3cpath%20d='M68%2077.9327V124.788C68%20130.651%2071.931%20135.84%2077.5172%20137.5C96.5511%20143%20129.705%20154.831%20137.723%20172.213C138.756%20174.496%20139.377%20176.728%20139.585%20179.062C144.913%20169.359%20147.343%20158.203%20146.206%20146.892C144.653%20130.858%20136.17%20116.278%20122.93%20106.99L75.7068%2073.9373C74.8791%2073.3146%2073.8964%2073.0033%2072.9137%2073.0033C72.0861%2073.0033%2071.362%2073.159%2070.5862%2073.5741C69.0344%2074.4562%2068%2076.0647%2068%2077.9327Z'%20fill='white'/%3e%3cpath%20opacity='0.8'%20d='M213.136%20177.299V221.974C213.136%20224.725%20210.809%20225.866%20210.084%20226.125C209.361%20226.437%20206.928%20227.111%20204.757%20225.088L170.173%20191.854C167.819%20189.591%20165.571%20187.198%20163.798%20184.456C162.393%20182.285%20161.827%20181.035%20161.827%20181.035C159.758%20176.832%20159.758%20172.785%20161.774%20168.737C164.775%20162.718%20172.43%20156.595%20183.963%20150.784L203.67%20161.784C209.567%20165.105%20213.136%20170.969%20213.136%20177.299Z'%20fill='white'/%3e%3cpath%20d='M232.6%2077.9294V124.784C232.6%20130.648%20228.668%20135.836%20223.082%20137.497C204.048%20142.997%20170.895%20154.828%20162.877%20172.21C161.842%20174.493%20161.221%20176.724%20161.015%20179.059C155.687%20169.356%20153.257%20158.2%20154.394%20146.889C155.945%20130.855%20164.428%20116.275%20177.67%20106.987L224.893%2073.934C225.721%2073.3113%20226.703%2073%20227.686%2073C228.513%2073%20229.238%2073.1557%20230.012%2073.5708C231.565%2074.4529%20232.6%2076.0614%20232.6%2077.9294Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1122_283'%3e%3crect%20width='300'%20height='300'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", rhe = ({
@@ -67718,7 +67722,7 @@ const fl = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c
67718
67722
  }, [b, d]);
67719
67723
  const w = (E) => {
67720
67724
  u(E), v(E);
67721
- }, T = fe(() => {
67725
+ }, T = pe(() => {
67722
67726
  if (!n || !Array.isArray(n))
67723
67727
  return ["all"];
67724
67728
  try {
@@ -67731,7 +67735,7 @@ const fl = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c
67731
67735
  } catch (E) {
67732
67736
  return m.console.error("[trails-sdk] Error computing protocols:", E), ["all"];
67733
67737
  }
67734
- }, [n]), k = fe(() => {
67738
+ }, [n]), k = pe(() => {
67735
67739
  if (!n || !Array.isArray(n))
67736
67740
  return [];
67737
67741
  try {
@@ -67745,7 +67749,7 @@ const fl = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c
67745
67749
  } catch (E) {
67746
67750
  return m.console.error("[trails-sdk] Error computing unique chains:", E), [];
67747
67751
  }
67748
- }, [n]), x = fe(() => !n || !Array.isArray(n) ? [] : n.filter((C) => {
67752
+ }, [n]), x = pe(() => !n || !Array.isArray(n) ? [] : n.filter((C) => {
67749
67753
  try {
67750
67754
  if (!C.isActive)
67751
67755
  return !1;
@@ -67940,7 +67944,7 @@ const fl = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c
67940
67944
  unselectable: s = !1,
67941
67945
  fullWidth: a = !1
67942
67946
  }) => {
67943
- const o = Vr(), { setCurrentScreen: i } = br(), { selectedFundMethod: c } = ko(), d = e?.chainId || t, u = o.length > 0, h = fe(() => d ? Ce(d) : null, [d]);
67947
+ const o = Vr(), { setCurrentScreen: i } = br(), { selectedFundMethod: c } = ko(), d = e?.chainId || t, u = o.length > 0, h = pe(() => d ? Ce(d) : null, [d]);
67944
67948
  return /* @__PURE__ */ l(
67945
67949
  "button",
67946
67950
  {
@@ -68034,7 +68038,7 @@ const ad = (e, t) => {
68034
68038
  chainId: r,
68035
68039
  originTokenInfo: s
68036
68040
  }) => {
68037
- const a = s?.isLoadingBalance ?? !1, o = fe(() => a ? !1 : ad(e, s), [s, e, a]), i = !!n && !o && !a, c = /* @__PURE__ */ g(
68041
+ const a = s?.isLoadingBalance ?? !1, o = pe(() => a ? !1 : ad(e, s), [s, e, a]), i = !!n && !o && !a, c = /* @__PURE__ */ g(
68038
68042
  "button",
68039
68043
  {
68040
68044
  type: "button",
@@ -68163,7 +68167,7 @@ const ad = (e, t) => {
68163
68167
  ] }) });
68164
68168
  }, she = (e, t) => {
68165
68169
  const n = Vr(), { wallets: r } = wi();
68166
- return fe(() => {
68170
+ return pe(() => {
68167
68171
  if (!e || !r || r.length === 0)
68168
68172
  return;
68169
68173
  const a = /* @__PURE__ */ new Map();
@@ -68258,7 +68262,7 @@ const ad = (e, t) => {
68258
68262
  // Not used for auto-selection
68259
68263
  fundMethod: void 0,
68260
68264
  allSupportedTokens: !1
68261
- }), V = fe(() => {
68265
+ }), V = pe(() => {
68262
68266
  if (!S || !_ || !t || Number(_) <= 0) {
68263
68267
  m.console.log(
68264
68268
  "Skipping calldata generation: missing pool/amount/wallet or invalid amount"
@@ -68266,15 +68270,15 @@ const ad = (e, t) => {
68266
68270
  return;
68267
68271
  }
68268
68272
  try {
68269
- const de = S.token.decimals;
68270
- if (typeof de != "number" || de < 0 || de > 18)
68271
- throw new Error(`Invalid decimals: ${de}`);
68273
+ const ue = S.token.decimals;
68274
+ if (typeof ue != "number" || ue < 0 || ue > 18)
68275
+ throw new Error(`Invalid decimals: ${ue}`);
68272
68276
  const we = x && x.chainId === S.chainId && (x.contractAddress ?? Le).toLowerCase() === S.token.address.toLowerCase();
68273
68277
  let ie;
68274
68278
  if (we) {
68275
- const B = ra(_, de);
68279
+ const B = ra(_, ue);
68276
68280
  ie = B.toString(), m.console.log(
68277
- `Same-chain same-token deposit: Parsed amount: ${_} -> ${B} wei (decimals: ${de})`
68281
+ `Same-chain same-token deposit: Parsed amount: ${_} -> ${B} wei (decimals: ${ue})`
68278
68282
  );
68279
68283
  } else
68280
68284
  ie = Zi.toString(), m.console.log(
@@ -68295,8 +68299,8 @@ const ad = (e, t) => {
68295
68299
  m.console.warn(`Unsupported protocol: ${S.protocol}`);
68296
68300
  return;
68297
68301
  }
68298
- } catch (de) {
68299
- m.console.error("Error generating deposit calldata:", de);
68302
+ } catch (ue) {
68303
+ m.console.error("Error generating deposit calldata:", ue);
68300
68304
  return;
68301
68305
  }
68302
68306
  }, [t, S, _, x]), {
@@ -68309,8 +68313,8 @@ const ad = (e, t) => {
68309
68313
  buttonText: re,
68310
68314
  isValidRecipient: oe,
68311
68315
  processedFeeOptions: J,
68312
- selectedFeeOption: le,
68313
- setSelectedFeeOption: pe
68316
+ selectedFeeOption: ce,
68317
+ setSelectedFeeOption: de
68314
68318
  } = gp({
68315
68319
  account: e,
68316
68320
  toAmount: void 0,
@@ -68342,8 +68346,8 @@ const ad = (e, t) => {
68342
68346
  });
68343
68347
  ne(() => {
68344
68348
  if (!x && !P && N?.length > 0) {
68345
- const de = N[0];
68346
- de && Number(de.balanceUsd) > 0 && E(de);
68349
+ const ue = N[0];
68350
+ ue && Number(ue.balanceUsd) > 0 && E(ue);
68347
68351
  }
68348
68352
  }, [x, P, N, E]), ne(() => {
68349
68353
  A.current && A.current.focus();
@@ -68357,14 +68361,14 @@ const ad = (e, t) => {
68357
68361
  W,
68358
68362
  w
68359
68363
  ]);
68360
- const ve = (de) => {
68361
- z(de), ae(de);
68362
- }, ke = (de) => {
68363
- m.console.log("Selected pool:", de), O(de), j(!1);
68364
- }, $e = (de) => {
68365
- E(de), m.console.log("[trails-sdk] selected origin token", de), G(!1), v?.(de);
68366
- }, We = (de) => {
68367
- z(de), ae(de);
68364
+ const ve = (ue) => {
68365
+ z(ue), ae(ue);
68366
+ }, ke = (ue) => {
68367
+ m.console.log("Selected pool:", ue), O(ue), j(!1);
68368
+ }, $e = (ue) => {
68369
+ E(ue), m.console.log("[trails-sdk] selected origin token", ue), G(!1), v?.(ue);
68370
+ }, We = (ue) => {
68371
+ z(ue), ae(ue);
68368
68372
  };
68369
68373
  return W ? /* @__PURE__ */ l(
68370
68374
  Ra,
@@ -68418,7 +68422,7 @@ const ad = (e, t) => {
68418
68422
  {
68419
68423
  ref: A,
68420
68424
  value: _,
68421
- onChange: (de) => ve(de.target.value),
68425
+ onChange: (ue) => ve(ue.target.value),
68422
68426
  isLoading: te,
68423
68427
  variant: "default"
68424
68428
  }
@@ -68446,8 +68450,8 @@ const ad = (e, t) => {
68446
68450
  type: "button",
68447
68451
  className: "text-xs text-gray-500 dark:text-gray-400 cursor-pointer hover:text-gray-700 dark:hover:text-gray-200 transition-colors bg-transparent border-none p-0",
68448
68452
  onClick: () => We(q || "0"),
68449
- onKeyDown: (de) => {
68450
- (de.key === "Enter" || de.key === " ") && (de.preventDefault(), We(q || "0"));
68453
+ onKeyDown: (ue) => {
68454
+ (ue.key === "Enter" || ue.key === " ") && (ue.preventDefault(), We(q || "0"));
68451
68455
  },
68452
68456
  title: "Click to use full balance",
68453
68457
  disabled: !q,
@@ -68598,8 +68602,8 @@ const ad = (e, t) => {
68598
68602
  yp,
68599
68603
  {
68600
68604
  processedFeeOptions: J,
68601
- selectedFeeOption: le,
68602
- setSelectedFeeOption: (de) => pe(de),
68605
+ selectedFeeOption: ce,
68606
+ setSelectedFeeOption: (ue) => de(ue),
68603
68607
  chainId: x?.chainId,
68604
68608
  isRefetching: te,
68605
68609
  originTokenInfo: {
@@ -68622,7 +68626,7 @@ const ad = (e, t) => {
68622
68626
  "button",
68623
68627
  {
68624
68628
  type: "submit",
68625
- disabled: !_ || !oe || Q || !x || !S || te || !ee || ee?.noSufficientBalance || (le ? ad(le, {
68629
+ disabled: !_ || !oe || Q || !x || !S || te || !ee || ee?.noSufficientBalance || (ce ? ad(ce, {
68626
68630
  originToken: C ?? x,
68627
68631
  originTokenBalance: C?.balance ?? x?.balance ?? "0",
68628
68632
  originTokenAmount: _ ?? "0"
@@ -68810,7 +68814,7 @@ const ad = (e, t) => {
68810
68814
  }
68811
68815
  })();
68812
68816
  }, [d, i, v, e]);
68813
- const I = fe(() => {
68817
+ const I = pe(() => {
68814
68818
  if (!e?.address) {
68815
68819
  m.console.log(
68816
68820
  "[pool-withdraw] No account found, skipping calldata generation"
@@ -68973,7 +68977,7 @@ const ad = (e, t) => {
68973
68977
  V instanceof Error ? V.message : "Failed to withdraw from pool"
68974
68978
  );
68975
68979
  }
68976
- }, N = fe(() => i ? Ce(i.chainId) : null, [i]);
68980
+ }, N = pe(() => i ? Ce(i.chainId) : null, [i]);
68977
68981
  return f ? /* @__PURE__ */ l(
68978
68982
  d2,
68979
68983
  {
@@ -69307,7 +69311,7 @@ const uhe = ({
69307
69311
  toCalldata: a
69308
69312
  } = bs(), { targetAmountUsdFormatted: o } = Ju(), i = hn();
69309
69313
  m.console.log("[trails-sdk] Config from context:", i);
69310
- const c = i.debug || lo("debug") === "true", d = fe(() => Ce(an.id)?.rpcUrls?.default?.http?.[0] || "N/A", []), u = (f, p = 30) => f.length <= p ? f : `${f.substring(0, p)}...`, h = [
69314
+ const c = i.debug || lo("debug") === "true", d = pe(() => Ce(an.id)?.rpcUrls?.default?.http?.[0] || "N/A", []), u = (f, p = 30) => f.length <= p ? f : `${f.substring(0, p)}...`, h = [
69311
69315
  {
69312
69316
  label: "API URL",
69313
69317
  value: i.trailsApiUrl,
@@ -69575,7 +69579,7 @@ function h2() {
69575
69579
  r
69576
69580
  ), o = a, i = ze(null), c = ze("");
69577
69581
  return {
69578
- defaultOriginToken: fe(() => {
69582
+ defaultOriginToken: pe(() => {
69579
69583
  if (!s?.length)
69580
69584
  return i.current = null, null;
69581
69585
  const u = s.map((w) => `${w.symbol}-${w.chainId}-${w.contractAddress || "native"}`).join(",");
@@ -69716,7 +69720,7 @@ function f2(e) {
69716
69720
  t
69717
69721
  ), o = r || a, i = ze(null), c = ze("");
69718
69722
  return {
69719
- defaultDestinationToken: fe(() => {
69723
+ defaultDestinationToken: pe(() => {
69720
69724
  if (!e || !n?.length || !s?.length)
69721
69725
  return i.current = null, null;
69722
69726
  const u = `${e.symbol}-${e.chainId}-${e.contractAddress || "native"}`;
@@ -69805,7 +69809,7 @@ const bhe = () => {
69805
69809
  );
69806
69810
  };
69807
69811
  function p2(e) {
69808
- const { trailsClient: t, countryCode: n, enabled: r = !0 } = e, s = ki(), a = fe(() => !(!r || !n || t !== void 0 && !t), [r, n, t]), {
69812
+ const { trailsClient: t, countryCode: n, enabled: r = !0 } = e, s = ki(), a = pe(() => !(!r || !n || t !== void 0 && !t), [r, n, t]), {
69809
69813
  data: o = [],
69810
69814
  isLoading: i,
69811
69815
  error: c
@@ -69850,7 +69854,7 @@ const whe = ({
69850
69854
  compactMode: o = !1,
69851
69855
  nestedMode: i = !1
69852
69856
  }) => {
69853
- const c = ze(null), d = ze(null), [u, h] = H(!1), [f, p] = H(""), y = fe(() => {
69857
+ const c = ze(null), d = ze(null), [u, h] = H(!1), [f, p] = H(""), y = pe(() => {
69854
69858
  if (!f.trim())
69855
69859
  return e;
69856
69860
  const w = f.trim().toLowerCase();
@@ -69872,7 +69876,7 @@ const whe = ({
69872
69876
  }, []);
69873
69877
  const b = (w) => {
69874
69878
  n(w), h(!1), p("");
69875
- }, v = fe(() => t === null ? null : e.find(
69879
+ }, v = pe(() => t === null ? null : e.find(
69876
69880
  (w) => w.countryCode === t
69877
69881
  ) || null, [e, t]);
69878
69882
  return /* @__PURE__ */ g("div", { className: `relative ${r}`, ref: c, children: [
@@ -70012,7 +70016,7 @@ const whe = ({
70012
70016
  }, [n]), ne(() => {
70013
70017
  I.current = !1;
70014
70018
  }, []);
70015
- const S = fe(() => {
70019
+ const S = pe(() => {
70016
70020
  if (!u.trim())
70017
70021
  return x;
70018
70022
  const L = u.trim().toLowerCase();
@@ -70021,7 +70025,7 @@ const whe = ({
70021
70025
  );
70022
70026
  }, [x, u]), O = (L) => n?.currencyCode === L.currencyCode, D = (L) => {
70023
70027
  e(L);
70024
- }, j = fe(() => C || T ? "Failed to load currencies" : !k && w ? "Detecting your location..." : u.trim() && S.length === 0 ? "No currencies found matching your search." : x.length === 0 && !E ? "No currencies available for your location" : "", [
70028
+ }, j = pe(() => C || T ? "Failed to load currencies" : !k && w ? "Detecting your location..." : u.trim() && S.length === 0 ? "No currencies found matching your search." : x.length === 0 && !E ? "No currencies available for your location" : "", [
70025
70029
  C,
70026
70030
  T,
70027
70031
  k,
@@ -70169,13 +70173,13 @@ function XL(e) {
70169
70173
  countryCode: a,
70170
70174
  walletAddress: o,
70171
70175
  enabled: i = !0
70172
- } = e, c = ki(), d = fe(() => !!n && n !== "0" && !Number.isNaN(Number(n)) && Number(n) > 0 && !!r && !!s && !!a && !!o, [
70176
+ } = e, c = ki(), d = pe(() => !!n && n !== "0" && !Number.isNaN(Number(n)) && Number(n) > 0 && !!r && !!s && !!a && !!o, [
70173
70177
  n,
70174
70178
  r,
70175
70179
  s,
70176
70180
  a,
70177
70181
  o
70178
- ]), u = fe(() => !i || t !== void 0 && !t ? !1 : d, [i, t, d]), {
70182
+ ]), u = pe(() => !i || t !== void 0 && !t ? !1 : d, [i, t, d]), {
70179
70183
  data: h = [],
70180
70184
  isLoading: f,
70181
70185
  error: p,
@@ -70310,7 +70314,7 @@ function XL(e) {
70310
70314
  // Don't retry - if it fails once, return error immediately
70311
70315
  refetchOnWindowFocus: !1,
70312
70316
  refetchOnReconnect: !0
70313
- }), b = fe(() => h[0] ?? null, [h]), v = fe(() => !b || !n || !o ? null : {
70317
+ }), b = pe(() => h[0] ?? null, [h]), v = pe(() => !b || !n || !o ? null : {
70314
70318
  provider: b.serviceProvider || "Meld",
70315
70319
  sourceAmount: n,
70316
70320
  sourceCurrencyCode: r || "",
@@ -70680,17 +70684,17 @@ const g2 = ({
70680
70684
  setHasManualSelection: Q,
70681
70685
  fiatAmount: re,
70682
70686
  setFiatAmount: oe
70683
- } = dD(), [J, le] = H(!1), [pe, me] = H(
70687
+ } = dD(), [J, ce] = H(!1), [de, me] = H(
70684
70688
  null
70685
- ), [ve, ke] = H(!1), [$e, We] = H(null), [de, we] = H(re), ie = ze(null), B = k === "onramp-meld", [U, F] = H(!1), [$, R] = H(""), [X, Ae] = H(!1), [se, xe] = H(!1), Fe = ze(null), {
70689
+ ), [ve, ke] = H(!1), [$e, We] = H(null), [ue, we] = H(re), ie = ze(null), B = k === "onramp-meld", [U, F] = H(!1), [$, R] = H(""), [X, Ae] = H(!1), [se, xe] = H(!1), Fe = ze(null), {
70686
70690
  countryCode: Ie,
70687
70691
  defaultCurrencyCode: Oe,
70688
70692
  isLoading: Se
70689
70693
  } = Xu({
70690
70694
  enabled: B
70691
- }), ue = pe || Ie, { fiatCurrencies: Be, isLoading: Ne } = p2({
70692
- countryCode: ue || "US",
70693
- enabled: B && !!ue
70695
+ }), he = de || Ie, { fiatCurrencies: Be, isLoading: Ne } = p2({
70696
+ countryCode: he || "US",
70697
+ enabled: B && !!he
70694
70698
  });
70695
70699
  ne(() => {
70696
70700
  if (B && !ee && Be.length > 0 && !Se && !Ne && !Y) {
@@ -70737,7 +70741,7 @@ const g2 = ({
70737
70741
  a
70738
70742
  ), te(a));
70739
70743
  }, [a, te]);
70740
- const ut = fe(() => {
70744
+ const ut = pe(() => {
70741
70745
  const Ee = q || a || s?.address;
70742
70746
  return m.console.log("[trails-sdk] Fund effective recipient calculated:", {
70743
70747
  selectedRecipient: q,
@@ -70745,7 +70749,7 @@ const g2 = ({
70745
70749
  accountAddress: s?.address,
70746
70750
  effectiveRecipient: Ee
70747
70751
  }), Ee;
70748
- }, [q, a, s?.address]), Ye = fe(() => B ? "onramp-meld" : k, [B, k]);
70752
+ }, [q, a, s?.address]), Ye = pe(() => B ? "onramp-meld" : k, [B, k]);
70749
70753
  ne(() => (ie.current && clearTimeout(ie.current), ie.current = setTimeout(() => {
70750
70754
  we(re);
70751
70755
  }, 500), () => {
@@ -70758,12 +70762,12 @@ const g2 = ({
70758
70762
  error: nt,
70759
70763
  onrampTrackingData: cn
70760
70764
  } = XL({
70761
- amount: de,
70765
+ amount: ue,
70762
70766
  sourceCurrencyCode: ee?.currencyCode,
70763
70767
  destinationCurrencyCode: "USDC_BASE",
70764
- countryCode: ue || void 0,
70768
+ countryCode: he || void 0,
70765
70769
  walletAddress: s?.address || "",
70766
- enabled: B && !!de && !!ee && !!ue && !!ut
70770
+ enabled: B && !!ue && !!ee && !!he && !!ut
70767
70771
  }), {
70768
70772
  amount: Wr,
70769
70773
  amountRaw: Zn,
@@ -71071,7 +71075,7 @@ const g2 = ({
71071
71075
  /* @__PURE__ */ l(
71072
71076
  bt,
71073
71077
  {
71074
- onBack: () => le(!1),
71078
+ onBack: () => ce(!1),
71075
71079
  headerContent: "Select Currency",
71076
71080
  headerContentAlign: "left"
71077
71081
  }
@@ -71080,7 +71084,7 @@ const g2 = ({
71080
71084
  QL,
71081
71085
  {
71082
71086
  onCurrencySelect: (Ee) => {
71083
- ae(Ee), le(!1), Q(!0);
71087
+ ae(Ee), ce(!1), Q(!0);
71084
71088
  },
71085
71089
  onAutoSelect: (Ee) => {
71086
71090
  ae(Ee);
@@ -71213,7 +71217,7 @@ const g2 = ({
71213
71217
  const He = await ha({
71214
71218
  depositAddress: kt?.originDepositAddress || "",
71215
71219
  userAddress: s?.address || "",
71216
- countryCode: ue || "",
71220
+ countryCode: he || "",
71217
71221
  sourceCurrencyCode: ee.currencyCode,
71218
71222
  sourceAmount: re,
71219
71223
  destinationCurrencyCode: "USDC_BASE",
@@ -71237,7 +71241,7 @@ const g2 = ({
71237
71241
  widgetUrl: Mt,
71238
71242
  depositAddress: kt?.originDepositAddress || "",
71239
71243
  userAddress: s?.address?.toLowerCase() || "",
71240
- countryCode: ue || "",
71244
+ countryCode: he || "",
71241
71245
  sourceCurrencyCode: ee?.currencyCode || "",
71242
71246
  sourceAmount: re,
71243
71247
  destinationCurrencyCode: "USDC_BASE",
@@ -71262,7 +71266,7 @@ const g2 = ({
71262
71266
  {
71263
71267
  depositAddress: kt?.originDepositAddress || "",
71264
71268
  userAddress: s?.address?.toLowerCase() || "",
71265
- countryCode: ue || "",
71269
+ countryCode: he || "",
71266
71270
  sourceCurrencyCode: ee.currencyCode,
71267
71271
  sourceAmount: re,
71268
71272
  destinationCurrencyCode: "USDC_BASE",
@@ -71648,7 +71652,7 @@ const g2 = ({
71648
71652
  YL,
71649
71653
  {
71650
71654
  currency: ee,
71651
- onSelect: () => le(!0)
71655
+ onSelect: () => ce(!0)
71652
71656
  }
71653
71657
  ) : kt?.noSufficientBalance ? (
71654
71658
  // Show "Add funds" button when user has insufficient balance
@@ -71795,7 +71799,7 @@ const g2 = ({
71795
71799
  "button",
71796
71800
  {
71797
71801
  type: "submit",
71798
- disabled: B ? !Ut || Qe || ln || !ee || !Ge || !ue || !ut || sn || Ba || !Jt || !!nt || !!Io || Xe || !kt : !Wr || Qe || !Tt || !Nr || Xe || !kt || kt?.noSufficientBalance && !B || (rs ? ad(
71802
+ disabled: B ? !Ut || Qe || ln || !ee || !Ge || !he || !ut || sn || Ba || !Jt || !!nt || !!Io || Xe || !kt : !Wr || Qe || !Tt || !Nr || Xe || !kt || kt?.noSufficientBalance && !B || (rs ? ad(
71799
71803
  rs,
71800
71804
  {
71801
71805
  originToken: P ?? L,
@@ -71823,7 +71827,7 @@ const g2 = ({
71823
71827
  };
71824
71828
  function eF() {
71825
71829
  const e = hn();
71826
- return fe(() => e.fundOnramp || e.buyCryptoOnramp, [e.fundOnramp, e.buyCryptoOnramp]);
71830
+ return pe(() => e.fundOnramp || e.buyCryptoOnramp, [e.fundOnramp, e.buyCryptoOnramp]);
71827
71831
  }
71828
71832
  const khe = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.5755%205.09116C14.6687%205.09116%2015.7243%205.25284%2016.72%205.55209C15.0506%205.89213%2013.5212%206.61601%2012.224%207.62371C8.18051%208.27118%205.09114%2011.7741%205.09114%2016C5.09115%2019.9601%207.804%2023.2857%2011.4727%2024.2214C12.6797%2025.3468%2014.1414%2026.2011%2015.763%2026.6888C15.0563%2026.8327%2014.3247%2026.9089%2013.5755%2026.9089C7.5507%2026.9087%202.66667%2022.0249%202.66666%2016C2.66666%209.97516%207.5507%205.09128%2013.5755%205.09116Z'%20fill='black'/%3e%3cpath%20d='M18.9088%205.33334C24.9337%205.33334%2029.8176%2010.2174%2029.8177%2016.2422C29.8177%2022.2671%2024.9338%2027.1511%2018.9088%2027.1511C14.2677%2027.151%2010.306%2024.2525%208.73038%2020.1671C8.44107%2019.4169%209.03887%2018.6667%209.84289%2018.6667C10.3973%2018.6667%2010.8771%2019.0353%2011.0931%2019.5458C12.3812%2022.5906%2015.3949%2024.7278%2018.9088%2024.7279C23.5949%2024.7279%2027.3945%2020.9283%2027.3945%2016.2422C27.3944%2011.5563%2023.5948%207.75782%2018.9088%207.75782C15.5577%207.75791%2012.6605%209.70058%2011.2818%2012.5213C11.049%2012.9975%2010.5835%2013.3333%2010.0534%2013.3333C9.21967%2013.3333%208.6156%2012.5357%208.95732%2011.7752C10.6635%207.97812%2014.4761%205.33344%2018.9088%205.33334Z'%20fill='black'/%3e%3cpath%20d='M17.9596%209.95973C18.3502%209.5692%2018.9832%209.5692%2019.3737%209.95973L24.707%2015.2931C25.0975%2015.6836%2025.0975%2016.3166%2024.707%2016.7071L19.3737%2022.0405C18.9832%2022.4309%2018.3501%2022.4309%2017.9596%2022.0405C17.5691%2021.6499%2017.5691%2021.0169%2017.9596%2020.6264L21.5859%2017.0001H8C7.44774%2017.0001%207.00004%2016.5523%207%2016.0001C7%2015.4478%207.44771%2015.0001%208%2015.0001H21.5859L17.9596%2011.3738C17.5691%2010.9833%2017.5691%2010.3503%2017.9596%209.95973Z'%20fill='black'/%3e%3c/svg%3e", The = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15%201.66667C15.442%201.66667%2015.8658%201.84239%2016.1784%202.15495C16.491%202.46751%2016.6667%202.89131%2016.6667%203.33334V5.00001C17.1087%205.00001%2017.5325%205.17573%2017.8451%205.48829C18.1576%205.80085%2018.3333%206.22465%2018.3333%206.66667V10C18.3333%2010.4602%2017.9602%2010.8333%2017.5%2010.8333C17.0398%2010.8333%2016.6667%2010.4602%2016.6667%2010V6.66667H4.16667C3.87965%206.66667%203.59883%206.6142%203.33334%206.52019V15.8333C3.33334%2016.0544%203.4212%2016.2663%203.57748%2016.4225C3.73376%2016.5788%203.94566%2016.6667%204.16667%2016.6667H5.83334C6.29358%2016.6667%206.66667%2017.0398%206.66667%2017.5C6.66667%2017.9602%206.29358%2018.3333%205.83334%2018.3333H4.16667C3.50363%2018.3333%202.86793%2018.0698%202.39909%2017.6009C1.93025%2017.1321%201.66667%2016.4964%201.66667%2015.8333V4.16667C1.66667%203.50363%201.93025%202.86793%202.39909%202.39909C2.86793%201.93025%203.50363%201.66667%204.16667%201.66667H15ZM4.16667%203.33334C3.94566%203.33334%203.73376%203.4212%203.57748%203.57748C3.4212%203.73376%203.33334%203.94566%203.33334%204.16667L3.33741%204.24887C3.35632%204.4397%203.44069%204.61908%203.57748%204.75586C3.73376%204.91214%203.94566%205.00001%204.16667%205.00001H15V3.33334H4.16667Z'%20fill='black'/%3e%3cpath%20d='M8.98024%2010.5842C8.98567%2010.5844%208.99109%2010.5846%208.99652%2010.585C9.02873%2010.5869%209.06021%2010.5913%209.09092%2010.598C9.11196%2010.6026%209.1322%2010.61%209.15277%2010.6167C9.2082%2010.6349%209.26083%2010.6587%209.3082%2010.6908C9.34057%2010.7127%209.3715%2010.7378%209.40016%2010.7664L11.9002%2013.2664C12.1442%2013.5105%2012.1442%2013.9062%2011.9002%2014.1502C11.6561%2014.3943%2011.2605%2014.3943%2011.0164%2014.1502L9.58327%2012.7171V15.9748L9.58815%2016.0781C9.6119%2016.3164%209.71762%2016.5404%209.88844%2016.7113C10.0838%2016.9066%2010.3487%2017.0164%2010.6249%2017.0164H12.5252L12.5886%2017.0197C12.9039%2017.0515%2013.1501%2017.3178%2013.1502%2017.6414C13.1502%2017.9866%2012.8703%2018.2664%2012.5252%2018.2664H10.6249C10.0171%2018.2664%209.43443%2018.0248%209.00466%2017.5951C8.5749%2017.1653%208.33327%2016.5826%208.33327%2015.9748V12.7171L6.90016%2014.1502C6.65609%2014.3943%206.26045%2014.3943%206.01637%2014.1502C5.77232%2013.9062%205.7723%2013.5105%206.01637%2013.2664L8.51637%2010.7664L8.56357%2010.7233C8.57207%2010.7164%208.58166%2010.711%208.59043%2010.7046C8.60338%2010.6951%208.61663%2010.6862%208.63031%2010.6777C8.65022%2010.6654%208.67045%2010.6543%208.69134%2010.6444C8.70649%2010.6372%208.72194%2010.6308%208.73773%2010.6248C8.7594%2010.6167%208.78136%2010.6102%208.80365%2010.6045C8.82532%2010.599%208.84705%2010.5931%208.86956%2010.5899C8.87283%2010.5894%208.87606%2010.5886%208.87933%2010.5882C8.90516%2010.585%208.93155%2010.5833%208.95827%2010.5833L8.98024%2010.5842Z'%20fill='black'/%3e%3cpath%20d='M14.3749%2010.7666C14.9826%2010.7666%2015.5654%2011.0082%2015.9952%2011.4379C16.4249%2011.8677%2016.6665%2012.4505%2016.6665%2013.0582V16.1327L18.0996%2014.6996C18.3437%2014.4556%2018.7394%2014.4555%2018.9834%2014.6996C19.2275%2014.9436%2019.2274%2015.3393%2018.9834%2015.5833L16.4834%2018.0833C16.4392%2018.1275%2016.3885%2018.1609%2016.3361%2018.1891C16.3176%2018.1992%2016.2996%2018.2103%2016.28%2018.2184C16.2649%2018.2247%2016.249%2018.2281%2016.2336%2018.2331C16.1728%2018.2528%2016.1089%2018.2664%2016.0415%2018.2664L15.9773%2018.2632C15.9325%2018.2586%2015.8901%2018.2466%2015.8487%2018.2331C15.8333%2018.2281%2015.8173%2018.2247%2015.8023%2018.2184C15.7861%2018.2117%2015.7714%2018.2021%2015.7559%2018.194C15.7001%2018.1652%2015.6464%2018.1301%2015.5996%2018.0833L13.0996%2015.5833C12.8556%2015.3393%2012.8556%2014.9436%2013.0996%2014.6996C13.3437%2014.4556%2013.7394%2014.4555%2013.9834%2014.6996L15.4165%2016.1327V13.0582C15.4165%2012.782%2015.3067%2012.5171%2015.1114%2012.3217C14.9405%2012.1509%2014.7165%2012.0452%2014.4782%2012.0214L14.3749%2012.0166H12.5252C12.18%2012.0166%2011.9002%2011.7367%2011.9002%2011.3916C11.9002%2011.0464%2012.18%2010.7666%2012.5252%2010.7666H14.3749Z'%20fill='black'/%3e%3c/svg%3e", Ehe = ({
71829
71833
  headerContent: e,
@@ -72007,10 +72011,10 @@ function tF(e) {
72007
72011
  isLoading: i
72008
72012
  } = Xu({
72009
72013
  enabled: r
72010
- }), c = fe(
72014
+ }), c = pe(
72011
72015
  () => n || o || null,
72012
72016
  [n, o]
72013
- ), d = fe(() => !(!r || t !== void 0 && !t || !c || !n && i), [
72017
+ ), d = pe(() => !(!r || t !== void 0 && !t || !c || !n && i), [
72014
72018
  r,
72015
72019
  t,
72016
72020
  c,
@@ -72122,10 +72126,10 @@ function Ihe() {
72122
72126
  toAmount: i,
72123
72127
  toToken: c,
72124
72128
  toCalldata: d
72125
- } = bs(), { targetAmountUsdFormatted: u } = Ju(), h = fe(() => o ? Ce(Number(o)) : null, [o]), { tokenInfo: f } = Uf({
72129
+ } = bs(), { targetAmountUsdFormatted: u } = Ju(), h = pe(() => o ? Ce(Number(o)) : null, [o]), { tokenInfo: f } = Uf({
72126
72130
  address: c || "",
72127
72131
  chainId: o ? Number(o) : void 0
72128
- }), p = fe(() => {
72132
+ }), p = pe(() => {
72129
72133
  if (!e)
72130
72134
  return [];
72131
72135
  const b = [], v = /\{([^}]+)\}/g;
@@ -72229,7 +72233,7 @@ function Ihe() {
72229
72233
  o
72230
72234
  ]);
72231
72235
  return {
72232
- message: fe(() => e ? /* @__PURE__ */ l(Ke, { children: p.map((b) => {
72236
+ message: pe(() => e ? /* @__PURE__ */ l(Ke, { children: p.map((b) => {
72233
72237
  switch (b.type) {
72234
72238
  case "appImage":
72235
72239
  return b.value ? /* @__PURE__ */ l(
@@ -72441,7 +72445,7 @@ Please ensure all required props are provided when rendering the ${t} component.
72441
72445
  const { mode: D } = Vs(), { selectedToken: j, setSelectedToken: L } = vi(), {
72442
72446
  selectedToken: G,
72443
72447
  setSelectedToken: W
72444
- } = U1(), { selectedRecipient: M, setSelectedRecipient: _ } = xi(), { setAmount: z } = Cre(), { setCurrentScreen: A } = br(), { targetAmountUsd: N } = Ju(), P = j || e, { defaultOriginToken: V, isLoading: q } = h2(), { defaultDestinationToken: te, isLoading: ee } = f2(P), { message: ae } = Ihe(), [Y, Q] = H(""), [re, oe] = H(""), [J, le] = H(!1), [pe, me] = H(!1), [ve, ke] = H(!1), [$e, We] = H(!1), [de, we] = H(!1), ie = ze(null), B = ze(null), U = ze(null), { filteredTokensFormatted: F } = rd({
72448
+ } = U1(), { selectedRecipient: M, setSelectedRecipient: _ } = xi(), { setAmount: z } = Cre(), { setCurrentScreen: A } = br(), { targetAmountUsd: N } = Ju(), P = j || e, { defaultOriginToken: V, isLoading: q } = h2(), { defaultDestinationToken: te, isLoading: ee } = f2(P), { message: ae } = Ihe(), [Y, Q] = H(""), [re, oe] = H(""), [J, ce] = H(!1), [de, me] = H(!1), [ve, ke] = H(!1), [$e, We] = H(!1), [ue, we] = H(!1), ie = ze(null), B = ze(null), U = ze(null), { filteredTokensFormatted: F } = rd({
72445
72449
  onContinue: () => {
72446
72450
  },
72447
72451
  // Not used for auto-selection
@@ -72451,9 +72455,9 @@ Please ensure all required props are provided when rendering the ${t} component.
72451
72455
  fundMethod: void 0,
72452
72456
  allSupportedTokens: !0
72453
72457
  // Show all tokens for destination selection
72454
- }), $ = fe(() => !P || !F ? null : F.find(
72458
+ }), $ = pe(() => !P || !F ? null : F.find(
72455
72459
  (ge) => ge.contractAddress?.toLowerCase() === P.contractAddress?.toLowerCase() && ge.chainId === P.chainId
72456
- ), [P, F]), R = fe(() => {
72460
+ ), [P, F]), R = pe(() => {
72457
72461
  const ge = M || x || n?.address;
72458
72462
  return m.console.log("[trails-sdk] Effective recipient calculated:", {
72459
72463
  selectedRecipient: M,
@@ -72471,7 +72475,7 @@ Please ensure all required props are provided when rendering the ${t} component.
72471
72475
  isSubmitting: Ie,
72472
72476
  buttonText: Oe,
72473
72477
  isValidRecipient: Se,
72474
- selectedDestToken: ue,
72478
+ selectedDestToken: he,
72475
72479
  setSelectedDestToken: Be,
72476
72480
  setSelectedDestinationChain: Ne,
72477
72481
  quoteError: Je,
@@ -72567,7 +72571,7 @@ Please ensure all required props are provided when rendering the ${t} component.
72567
72571
  xe,
72568
72572
  z
72569
72573
  ]), ne(() => {
72570
- if (!I && !ue?.symbol) {
72574
+ if (!I && !he?.symbol) {
72571
72575
  const ge = G || te;
72572
72576
  if (ge && !ee && (m.console.log("[trails-sdk] Initializing destination token:", {
72573
72577
  symbol: ge.symbol,
@@ -72584,7 +72588,7 @@ Please ensure all required props are provided when rendering the ${t} component.
72584
72588
  G,
72585
72589
  te,
72586
72590
  ee,
72587
- ue?.symbol,
72591
+ he?.symbol,
72588
72592
  W,
72589
72593
  Be,
72590
72594
  Ne
@@ -72600,9 +72604,9 @@ Please ensure all required props are provided when rendering the ${t} component.
72600
72604
  ge.length > 16 || !ge.match(/^\d*\.?\d{0,8}$/) || (oe(ge), Q(ge), xe(ge), z(ge), O?.(ge));
72601
72605
  },
72602
72606
  [xe, z, O]
72603
- ), Zt = fe(() => re, [re]), wn = IL({ inputValue: Zt }), xt = Te(
72607
+ ), Zt = pe(() => re, [re]), wn = IL({ inputValue: Zt }), xt = Te(
72604
72608
  (ge) => {
72605
- L(ge), le(!1), m.console.log("[trails-sdk] selected origin token", ge), k?.(ge);
72609
+ L(ge), ce(!1), m.console.log("[trails-sdk] selected origin token", ge), k?.(ge);
72606
72610
  },
72607
72611
  [L, k]
72608
72612
  ), rn = Te(
@@ -72620,12 +72624,12 @@ Please ensure all required props are provided when rendering the ${t} component.
72620
72624
  k
72621
72625
  ]
72622
72626
  );
72623
- if (pe)
72627
+ if (de)
72624
72628
  return /* @__PURE__ */ l(
72625
72629
  Ra,
72626
72630
  {
72627
72631
  onBack: () => {
72628
- me(!1), le(!0);
72632
+ me(!1), ce(!0);
72629
72633
  }
72630
72634
  }
72631
72635
  );
@@ -72643,7 +72647,7 @@ Please ensure all required props are provided when rendering the ${t} component.
72643
72647
  /* @__PURE__ */ l(
72644
72648
  bt,
72645
72649
  {
72646
- onBack: () => le(!1),
72650
+ onBack: () => ce(!1),
72647
72651
  headerContent: "Select Token",
72648
72652
  headerContentAlign: "left"
72649
72653
  }
@@ -72659,12 +72663,12 @@ Please ensure all required props are provided when rendering the ${t} component.
72659
72663
  compactMode: !1,
72660
72664
  recentTokens: w,
72661
72665
  onRecentTokenSelect: (ge) => {
72662
- L(ge), le(!1), T?.(ge);
72666
+ L(ge), ce(!1), T?.(ge);
72663
72667
  },
72664
72668
  allSupportedTokens: !1,
72665
72669
  chainListScreen: !0,
72666
72670
  onNavigateToChainList: () => {
72667
- le(!1), me(!0);
72671
+ ce(!1), me(!0);
72668
72672
  },
72669
72673
  onNavigateToFundMethods: () => {
72670
72674
  A("payment-methods");
@@ -72786,7 +72790,7 @@ Please ensure all required props are provided when rendering the ${t} component.
72786
72790
  {
72787
72791
  token: P,
72788
72792
  chainId: P?.chainId,
72789
- onSelect: () => le(!0)
72793
+ onSelect: () => ce(!0)
72790
72794
  }
72791
72795
  ) })
72792
72796
  ] }),
@@ -72933,7 +72937,7 @@ Please ensure all required props are provided when rendering the ${t} component.
72933
72937
  "button",
72934
72938
  {
72935
72939
  type: "button",
72936
- onClick: () => le(!0),
72940
+ onClick: () => ce(!0),
72937
72941
  className: "w-full flex items-center justify-between space-x-3 hover:trails-hover-bg hover:bg-gray-50 dark:hover:bg-gray-700 trails-border-radius-list-button px-4 py-2 transition-all duration-200 cursor-pointer",
72938
72942
  children: [
72939
72943
  /* @__PURE__ */ l("div", { className: "text-left", children: /* @__PURE__ */ l("div", { className: "font-medium trails-text-primary text-sm", children: "Payment method" }) }),
@@ -72987,7 +72991,7 @@ Please ensure all required props are provided when rendering the ${t} component.
72987
72991
  type: "text",
72988
72992
  value: Zt,
72989
72993
  onChange: (ge) => Ut(ge.target.value),
72990
- placeholder: `0 ${ue?.symbol || ""}`,
72994
+ placeholder: `0 ${he?.symbol || ""}`,
72991
72995
  readOnly: !!E,
72992
72996
  autoComplete: "off",
72993
72997
  className: `w-full bg-transparent font-bold trails-text-primary placeholder:trails-text-muted border-none outline-none ${Ae ? "animate-pulse" : ""}`,
@@ -72999,14 +73003,14 @@ Please ensure all required props are provided when rendering the ${t} component.
72999
73003
  /* @__PURE__ */ l("div", { className: "relative", children: /* @__PURE__ */ l(
73000
73004
  bc,
73001
73005
  {
73002
- token: ue,
73006
+ token: he,
73003
73007
  chainId: G?.chainId || C,
73004
73008
  onSelect: () => ke(!0),
73005
73009
  unselectable: !!I
73006
73010
  }
73007
73011
  ) })
73008
73012
  ] }),
73009
- /* @__PURE__ */ l("div", { className: "mt-4 flex justify-between items-center", children: /* @__PURE__ */ l("div", { className: "text-xs text-gray-500 dark:text-gray-400", children: ue?.symbol && Zt ? /* @__PURE__ */ g(Ke, { children: [
73013
+ /* @__PURE__ */ l("div", { className: "mt-4 flex justify-between items-center", children: /* @__PURE__ */ l("div", { className: "text-xs text-gray-500 dark:text-gray-400", children: he?.symbol && Zt ? /* @__PURE__ */ g(Ke, { children: [
73010
73014
  "≈ ",
73011
73015
  X || "$0.00"
73012
73016
  ] }) : /* @__PURE__ */ l("span", { children: " " }) }) })
@@ -73053,7 +73057,7 @@ Please ensure all required props are provided when rendering the ${t} component.
73053
73057
  quote: se,
73054
73058
  showContent: !0,
73055
73059
  isRefetching: Ae,
73056
- initialExpanded: de
73060
+ initialExpanded: ue
73057
73061
  }
73058
73062
  ) }),
73059
73063
  /* @__PURE__ */ l("form", { onSubmit: Fe, children: /* @__PURE__ */ l(
@@ -73069,7 +73073,7 @@ Please ensure all required props are provided when rendering the ${t} component.
73069
73073
  children: Ie ? /* @__PURE__ */ g("div", { className: "flex items-center justify-center", children: [
73070
73074
  /* @__PURE__ */ l(ps, { className: "w-5 h-5 animate-spin mr-2" }),
73071
73075
  /* @__PURE__ */ l("span", { children: Oe })
73072
- ] }) : n?.address ? se?.noSufficientBalance ? "Insufficient Balance" : M ? P ? ue ? !Y || parseFloat(Y) <= 0 ? "Enter an amount" : !se && !Je ? /* @__PURE__ */ g("div", { className: "flex items-center justify-center", children: [
73076
+ ] }) : n?.address ? se?.noSufficientBalance ? "Insufficient Balance" : M ? P ? he ? !Y || parseFloat(Y) <= 0 ? "Enter an amount" : !se && !Je ? /* @__PURE__ */ g("div", { className: "flex items-center justify-center", children: [
73073
73077
  /* @__PURE__ */ l(ps, { className: "w-5 h-5 animate-spin mr-2 absolute left-4" }),
73074
73078
  /* @__PURE__ */ l("span", { children: "Getting quote..." })
73075
73079
  ] }) : Oe === "Getting quote..." ? /* @__PURE__ */ g("div", { className: "flex items-center justify-center", children: [
@@ -74726,28 +74730,28 @@ const oF = ({
74726
74730
  }, 3e3);
74727
74731
  return () => clearInterval(v);
74728
74732
  }, [e, i]);
74729
- const u = fe(() => {
74733
+ const u = pe(() => {
74730
74734
  if (!d || d.length === 0) return null;
74731
74735
  const v = n.toLowerCase(), w = v === Le.toLowerCase();
74732
74736
  return d.find((T) => {
74733
74737
  const k = T.isNativeToken ?? !1;
74734
74738
  return T.chainId !== a ? !1 : w ? k : !k && T.contractAddress?.toLowerCase() === v;
74735
74739
  });
74736
- }, [d, n, a]), h = fe(() => !d || d.length === 0 ? [] : d.filter((v) => {
74740
+ }, [d, n, a]), h = pe(() => !d || d.length === 0 ? [] : d.filter((v) => {
74737
74741
  if (v.chainId !== a) return !1;
74738
74742
  try {
74739
74743
  return BigInt(v.balance || "0") > 0n;
74740
74744
  } catch {
74741
74745
  return !1;
74742
74746
  }
74743
- }), [d, a]), f = fe(() => {
74747
+ }), [d, a]), f = pe(() => {
74744
74748
  if (h.length === 0) return !1;
74745
74749
  if (h.length > 1) return !0;
74746
74750
  const v = h[0];
74747
74751
  if (!v) return !1;
74748
74752
  const w = n.toLowerCase(), T = w === Le.toLowerCase(), k = v.isNativeToken ?? !1, x = k ? void 0 : v.contractAddress?.toLowerCase();
74749
74753
  return T && k ? !1 : T !== k ? !0 : !(!T && x === w);
74750
- }, [h, n]), p = fe(() => {
74754
+ }, [h, n]), p = pe(() => {
74751
74755
  const v = BigInt(t), w = u?.balance ? BigInt(u.balance) : 0n, T = v > 0n ? Number(w * 10000n / v) / 100 : 0, k = w >= v, x = w > 0n && w < v, E = w > v, C = gn(w, s), I = gn(v, s);
74752
74756
  return {
74753
74757
  currentBalance: w,
@@ -74867,11 +74871,11 @@ const oF = ({
74867
74871
  selectedWalletId: s,
74868
74872
  walletOptions: a
74869
74873
  }) => {
74870
- const o = M1(), i = a || o, c = i.find((y) => y.id === s) ?? i[0], d = r ?? c?.usesEip681 ?? !0, u = fe(() => n ? `ethereum:${Ds(n.originDepositAddress)}@${n.originChain.id}` : "", [n]), h = fe(() => {
74874
+ const o = M1(), i = a || o, c = i.find((y) => y.id === s) ?? i[0], d = r ?? c?.usesEip681 ?? !0, u = pe(() => n ? `ethereum:${Ds(n.originDepositAddress)}@${n.originChain.id}` : "", [n]), h = pe(() => {
74871
74875
  if (!n) return "";
74872
74876
  const y = Ds(n.originToken.contractAddress), b = Ds(n.originDepositAddress);
74873
74877
  return y === Le ? `ethereum:${b}@${n.originChain.id}?value=${n.originAmount}` : `ethereum:${y}@${n.originChain.id}/transfer?address=${b}&uint256=${n.originAmount}`;
74874
- }, [n]), f = fe(() => n ? d ? h : u : "", [n, d, u, h]), p = c?.icon;
74878
+ }, [n]), f = pe(() => n ? d ? h : u : "", [n, d, u, h]), p = c?.icon;
74875
74879
  return /* @__PURE__ */ g("div", { className: "space-y-6", children: [
74876
74880
  /* @__PURE__ */ l(
74877
74881
  bt,
@@ -75187,7 +75191,7 @@ function sfe({
75187
75191
  const w = setInterval(v, 15e3);
75188
75192
  return () => clearInterval(w);
75189
75193
  }, [s, e, t, n, r]);
75190
- const b = fe(() => {
75194
+ const b = pe(() => {
75191
75195
  if (p?.transactions && p.transactions.length > 0) {
75192
75196
  const v = p.transactions[0];
75193
75197
  if (v?.txnHash)
@@ -75356,8 +75360,8 @@ const afe = ({
75356
75360
  G
75357
75361
  ]), ne(() => {
75358
75362
  if (O?.status) {
75359
- const pe = O.status.toUpperCase();
75360
- ["DECLINED", "FAILED", "CANCELLED"].includes(pe) && v(!0), pe === "SETTLING" && !k && (x(!0), C(0));
75363
+ const de = O.status.toUpperCase();
75364
+ ["DECLINED", "FAILED", "CANCELLED"].includes(de) && v(!0), de === "SETTLING" && !k && (x(!0), C(0));
75361
75365
  }
75362
75366
  }, [O?.status, k]), ne(() => {
75363
75367
  u(!0);
@@ -75424,13 +75428,13 @@ const afe = ({
75424
75428
  q
75425
75429
  ]), ne(() => {
75426
75430
  if (p) return;
75427
- const pe = setInterval(() => {
75428
- k ? C((me) => me + 1) : f((me) => me <= 1 ? (clearInterval(pe), y(!0), 0) : me - 1);
75431
+ const de = setInterval(() => {
75432
+ k ? C((me) => me + 1) : f((me) => me <= 1 ? (clearInterval(de), y(!0), 0) : me - 1);
75429
75433
  }, 1e3);
75430
- return () => clearInterval(pe);
75434
+ return () => clearInterval(de);
75431
75435
  }, [p, k]);
75432
- const ae = (pe) => {
75433
- const me = Math.floor(pe / 60), ve = pe % 60;
75436
+ const ae = (de) => {
75437
+ const me = Math.floor(de / 60), ve = de % 60;
75434
75438
  return `${me}:${ve.toString().padStart(2, "0")}`;
75435
75439
  }, Y = () => k ? E : h, Q = () => {
75436
75440
  y(!1), f(1200), x(!1), C(0), u(!1), setTimeout(() => u(!0), 100);
@@ -75442,14 +75446,14 @@ const afe = ({
75442
75446
  return;
75443
75447
  }
75444
75448
  try {
75445
- const { widgetUrl: pe } = await o(a);
75449
+ const { widgetUrl: de } = await o(a);
75446
75450
  window.open(
75447
- pe,
75451
+ de,
75448
75452
  "onramp-widget",
75449
75453
  ofe(400, 700)
75450
75454
  ) && (y(!1), f(1200), x(!1), C(0), u(!1), setTimeout(() => u(!0), 100));
75451
- } catch (pe) {
75452
- console.error("Failed to regenerate widget session:", pe), t?.();
75455
+ } catch (de) {
75456
+ console.error("Failed to regenerate widget session:", de), t?.();
75453
75457
  }
75454
75458
  }, J = () => r?.originDepositAddress ? V ? P ? /* @__PURE__ */ l("div", { className: "mt-4 p-4 bg-green-50 dark:bg-green-900/20 rounded-lg border border-green-200 dark:border-green-700", children: /* @__PURE__ */ g("div", { className: "flex items-center space-x-2", children: [
75455
75459
  /* @__PURE__ */ g(
@@ -75574,7 +75578,7 @@ const afe = ({
75574
75578
  }
75575
75579
  ),
75576
75580
  /* @__PURE__ */ l("p", { className: "text-sm text-blue-800 dark:text-blue-200", children: "Starting deposit monitoring..." })
75577
- ] }) }) : null, le = () => {
75581
+ ] }) }) : null, ce = () => {
75578
75582
  if (!i)
75579
75583
  return /* @__PURE__ */ l("div", { className: "mt-4 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ l("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: "No external session ID - status monitoring disabled" }) });
75580
75584
  if (j)
@@ -75640,8 +75644,8 @@ const afe = ({
75640
75644
  /* @__PURE__ */ l("p", { className: "text-sm text-blue-800 dark:text-blue-200", children: "Checking transaction status..." })
75641
75645
  ] }) });
75642
75646
  if (O?.status) {
75643
- const pe = (de) => {
75644
- switch (de?.toUpperCase()) {
75647
+ const de = (ue) => {
75648
+ switch (ue?.toUpperCase()) {
75645
75649
  case "COMPLETED":
75646
75650
  case "SUCCESS":
75647
75651
  return "green";
@@ -75659,8 +75663,8 @@ const afe = ({
75659
75663
  default:
75660
75664
  return "blue";
75661
75665
  }
75662
- }, me = (de) => {
75663
- switch (de?.toUpperCase()) {
75666
+ }, me = (ue) => {
75667
+ switch (ue?.toUpperCase()) {
75664
75668
  case "COMPLETED":
75665
75669
  case "SUCCESS":
75666
75670
  return "Payment completed successfully";
@@ -75679,7 +75683,7 @@ const afe = ({
75679
75683
  default:
75680
75684
  return "Checking payment status";
75681
75685
  }
75682
- }, ve = pe(O.status), ke = {
75686
+ }, ve = de(O.status), ke = {
75683
75687
  green: "bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-700",
75684
75688
  red: "bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-700",
75685
75689
  yellow: "bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-700",
@@ -75916,7 +75920,7 @@ const afe = ({
75916
75920
  }
75917
75921
  ),
75918
75922
  k && /* @__PURE__ */ l("p", { className: "mt-4 text-sm text-left text-gray-600 dark:text-gray-400", children: "Your transaction is settling with payment provider. This usually takes 1-5 minutes to complete." }),
75919
- le(),
75923
+ ce(),
75920
75924
  J(),
75921
75925
  /* @__PURE__ */ l("div", { className: "mt-3 p-3 bg-amber-50 dark:bg-amber-900/20 rounded-lg border border-amber-200 dark:border-amber-700", children: /* @__PURE__ */ g("div", { className: "flex items-start space-x-3", children: [
75922
75926
  /* @__PURE__ */ l("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ l("span", { className: "text-amber-600 dark:text-amber-400", children: "⚠️" }) }),
@@ -76406,9 +76410,9 @@ const hfe = ({
76406
76410
  setHasManualSelection: re,
76407
76411
  fiatAmount: oe,
76408
76412
  setFiatAmount: J
76409
- } = dD(), [le, pe] = H(!1), [me, ve] = H(!1), [ke, $e] = H(
76413
+ } = dD(), [ce, de] = H(!1), [me, ve] = H(!1), [ke, $e] = H(
76410
76414
  null
76411
- ), [We, de] = H(!1), [we, ie] = H(null), B = x === "onramp-meld", {
76415
+ ), [We, ue] = H(!1), [we, ie] = H(null), B = x === "onramp-meld", {
76412
76416
  countryCode: U,
76413
76417
  defaultCurrencyCode: F,
76414
76418
  isLoading: $
@@ -76443,7 +76447,7 @@ const hfe = ({
76443
76447
  hasManualDestinationSelection: !1,
76444
76448
  lastOriginSelectionTime: 0,
76445
76449
  lastDestinationSelectionTime: 0
76446
- }), { defaultOriginToken: xe, isLoading: Fe } = h2(), { defaultDestinationToken: Ie, isLoading: Oe } = f2(M), [Se, ue] = H(
76450
+ }), { defaultOriginToken: xe, isLoading: Fe } = h2(), { defaultDestinationToken: Ie, isLoading: Oe } = f2(M), [Se, he] = H(
76447
76451
  e?.chainId || M?.chainId
76448
76452
  ), {
76449
76453
  tradeType: Be,
@@ -76463,7 +76467,7 @@ const hfe = ({
76463
76467
  o
76464
76468
  ), ee(o));
76465
76469
  }, [o, ee]);
76466
- const Ut = fe(() => {
76470
+ const Ut = pe(() => {
76467
76471
  const Pe = te || o || a?.address;
76468
76472
  return m.console.log(
76469
76473
  "[trails-sdk] ClassicSwap effective recipient calculated:",
@@ -76474,7 +76478,7 @@ const hfe = ({
76474
76478
  effectiveRecipient: Pe
76475
76479
  }
76476
76480
  ), Pe;
76477
- }, [te, o, a?.address]), Zt = fe(() => B ? "onramp-meld" : x, [B, x]), {
76481
+ }, [te, o, a?.address]), Zt = pe(() => B ? "onramp-meld" : x, [B, x]), {
76478
76482
  quotes: wn,
76479
76483
  selectedQuote: xt,
76480
76484
  isLoading: rn,
@@ -76556,7 +76560,7 @@ const hfe = ({
76556
76560
  Pe ? (m.console.log(
76557
76561
  "[ClassicSwap] Setting origin token to USDC on Base:",
76558
76562
  Pe
76559
- ), _(Pe), ue(fr.id)) : m.console.error(
76563
+ ), _(Pe), he(fr.id)) : m.console.error(
76560
76564
  "[ClassicSwap] Could not find USDC on Base in supported tokens"
76561
76565
  ), Ne(qe.EXACT_INPUT);
76562
76566
  }
@@ -76567,7 +76571,7 @@ const hfe = ({
76567
76571
  ), {
76568
76572
  token: Jt,
76569
76573
  isLoadingBalance: Ft
76570
- } = Eu(M, a?.address), Nc = fe(() => {
76574
+ } = Eu(M, a?.address), Nc = pe(() => {
76571
76575
  if (!Fa) return "0.00";
76572
76576
  try {
76573
76577
  return sr(
@@ -76651,7 +76655,7 @@ const hfe = ({
76651
76655
  !M && !Fe && xe && !z && (m.console.log(
76652
76656
  "[trails-sdk] Auto-selecting origin token:",
76653
76657
  xe
76654
- ), _(xe), ue(xe.chainId));
76658
+ ), _(xe), he(xe.chainId));
76655
76659
  }, [
76656
76660
  M,
76657
76661
  Fe,
@@ -76694,9 +76698,9 @@ const hfe = ({
76694
76698
  const Nn = Te(() => {
76695
76699
  if (!nt || !M || !cn || Ut && a?.address && Ut.toLowerCase() !== a.address.toLowerCase())
76696
76700
  return;
76697
- pe(!le);
76701
+ de(!ce);
76698
76702
  const Pe = M, Et = Se, Dn = ct || ns || "", Hs = Je || ge || "";
76699
- _(cn), P(Pe), ue(cn?.chainId), jn(Pe);
76703
+ _(cn), P(Pe), he(cn?.chainId), jn(Pe);
76700
76704
  const Ee = Ce(Et);
76701
76705
  Ee && Zn(Ee), (z || V) && (A(!0), q(!0)), j ? (tt(Hs), at(""), Ne(qe.EXACT_INPUT)) : mt === qe.EXACT_INPUT ? (at(Hs), tt(""), Ne(qe.EXACT_OUTPUT)) : (tt(Dn), at(""), Ne(qe.EXACT_INPUT));
76702
76706
  }, [
@@ -76708,7 +76712,7 @@ const hfe = ({
76708
76712
  P,
76709
76713
  jn,
76710
76714
  Zn,
76711
- le,
76715
+ ce,
76712
76716
  z,
76713
76717
  V,
76714
76718
  A,
@@ -76726,7 +76730,7 @@ const hfe = ({
76726
76730
  a?.address
76727
76731
  ]), pa = Te(
76728
76732
  (Pe) => {
76729
- Pe.contractAddress === N?.contractAddress && Pe.chainId === N?.chainId && Nn(), (!M || M.symbol !== Pe.symbol) && (tt(""), at(""), Ne(qe.EXACT_INPUT)), _(Pe), ue(Pe.chainId), ks(!1), A(!0), se.current.lastOriginSelectionTime = Date.now(), S?.(Pe), m.console.log("[trails-sdk] selected origin token", Pe);
76733
+ Pe.contractAddress === N?.contractAddress && Pe.chainId === N?.chainId && Nn(), (!M || M.symbol !== Pe.symbol) && (tt(""), at(""), Ne(qe.EXACT_INPUT)), _(Pe), he(Pe.chainId), ks(!1), A(!0), se.current.lastOriginSelectionTime = Date.now(), S?.(Pe), m.console.log("[trails-sdk] selected origin token", Pe);
76730
76734
  },
76731
76735
  [
76732
76736
  _,
@@ -76771,9 +76775,9 @@ const hfe = ({
76771
76775
  return We ? /* @__PURE__ */ l(
76772
76776
  l2,
76773
76777
  {
76774
- onBack: () => de(!1),
76778
+ onBack: () => ue(!1),
76775
76779
  onSelectProvider: (Pe) => {
76776
- ie(Pe), de(!1);
76780
+ ie(Pe), ue(!1);
76777
76781
  },
76778
76782
  selectedProvider: Tt,
76779
76783
  providers: wn,
@@ -77571,7 +77575,7 @@ const Efe = ({
77571
77575
  ne(() => {
77572
77576
  o && s === "success" && !C.current && e && e();
77573
77577
  }, [o, s, e]);
77574
- const I = fe(() => {
77578
+ const I = pe(() => {
77575
77579
  const D = Rte(r);
77576
77580
  return D && D !== "WalletConnect" ? b ? `Connect to ${D}` : `Scan code to connect to ${D}` : "Connect with WalletConnect";
77577
77581
  }, [r, b]), S = T ? /* @__PURE__ */ l(
@@ -78110,12 +78114,12 @@ const Efe = ({
78110
78114
  onWalletSelect: t,
78111
78115
  walletOptions: n
78112
78116
  }) => {
78113
- const [r, s] = H(""), a = fe(() => n.filter(
78117
+ const [r, s] = H(""), a = pe(() => n.filter(
78114
78118
  (c) => c.id !== "injected" && c.id !== "sequence-waas"
78115
78119
  ).sort((c, d) => {
78116
78120
  const u = r5.indexOf(c.id), h = r5.indexOf(d.id);
78117
78121
  return u !== -1 && h !== -1 ? u - h : u !== -1 ? -1 : h !== -1 ? 1 : c.name.localeCompare(d.name);
78118
- }), [n]), o = fe(() => {
78122
+ }), [n]), o = pe(() => {
78119
78123
  if (!r.trim()) return a;
78120
78124
  const c = r.trim().toLowerCase();
78121
78125
  return a.filter((d) => d.name.toLowerCase().includes(c) || d.id.toLowerCase().includes(c));
@@ -78863,7 +78867,7 @@ function Mfe(e, t, n) {
78863
78867
  }
78864
78868
  function Rfe() {
78865
78869
  const { connector: e } = fn();
78866
- return fe(() => UU(e), [e]);
78870
+ return pe(() => UU(e), [e]);
78867
78871
  }
78868
78872
  const Dfe = ({
78869
78873
  onBack: e,
@@ -79126,11 +79130,11 @@ const Dfe = ({
79126
79130
  priceImpactFallbackBridgeUrl: M,
79127
79131
  decoupleWagmi: _,
79128
79132
  hideDisconnect: z
79129
- } = bs(), { address: A, chainId: N, connector: P } = fn(), { trailsApiKey: V, fundOnramp: q } = hn(), te = M1(), ee = Rfe(), ae = Vr(), { disconnectAsync: Y } = Ib(), { switchAccount: Q } = Fl(), re = ae.length > 0, { recentTokens: oe, addRecentToken: J } = RL(A), { wallets: le } = wi(), { selectedToken: pe, setSelectedToken: me } = vi(), { onramp: ve } = bs(), {
79133
+ } = bs(), { address: A, chainId: N, connector: P } = fn(), { trailsApiKey: V, fundOnramp: q } = hn(), te = M1(), ee = Rfe(), ae = Vr(), { disconnectAsync: Y } = Ib(), { switchAccount: Q } = Fl(), re = ae.length > 0, { recentTokens: oe, addRecentToken: J } = RL(A), { wallets: ce } = wi(), { selectedToken: de, setSelectedToken: me } = vi(), { onramp: ve } = bs(), {
79130
79134
  isModalOpen: ke,
79131
79135
  openModal: $e,
79132
79136
  closeModal: We,
79133
- setHandleCloseModal: de,
79137
+ setHandleCloseModal: ue,
79134
79138
  pendingSelection: we,
79135
79139
  setPendingSelection: ie,
79136
79140
  hostTransactionState: B,
@@ -79149,7 +79153,7 @@ const Dfe = ({
79149
79153
  ke
79150
79154
  );
79151
79155
  }, [ke]);
79152
- const [Ie, Oe] = H(d), { currentScreen: Se, setCurrentScreen: ue } = br(), { previousScreen: Be } = vL(), { goBack: Ne, clearHistory: Je, setCurrentScreenWithBack: tt, getPreviousScreen: ct } = Ua(), { connectionContext: at, clearConnectionContext: mt, isRecipientSelection: ar } = D1(), { setSelectedRecipient: Xn } = xi(), Vt = () => {
79156
+ const [Ie, Oe] = H(d), { currentScreen: Se, setCurrentScreen: he } = br(), { previousScreen: Be } = vL(), { goBack: Ne, clearHistory: Je, setCurrentScreenWithBack: tt, getPreviousScreen: ct } = Ua(), { connectionContext: at, clearConnectionContext: mt, isRecipientSelection: ar } = D1(), { setSelectedRecipient: Xn } = xi(), Vt = () => {
79153
79157
  nt(null), Ne?.();
79154
79158
  }, [nn, Ut] = H(
79155
79159
  A
@@ -79158,10 +79162,10 @@ const Dfe = ({
79158
79162
  if (typeof window < "u")
79159
79163
  try {
79160
79164
  return localStorage.getItem("trails-last-wallet") || null;
79161
- } catch (ce) {
79165
+ } catch (le) {
79162
79166
  return m.console.error(
79163
79167
  "[trails-sdk] Failed to read from localStorage:",
79164
- ce
79168
+ le
79165
79169
  ), null;
79166
79170
  }
79167
79171
  return null;
@@ -79177,14 +79181,14 @@ const Dfe = ({
79177
79181
  }, [Ge]);
79178
79182
  const [Ht, vn] = H(null), [Tn, Tt] = H(
79179
79183
  null
79180
- ), [Nr, kt] = H(!1), [Ao, rs] = H(null), [Sc, ua] = H(null), { connectAsync: Fa } = Zf(), Jt = Te((ce) => ce === "swap" ? "swap" : ce === "earn" ? "earn" : ce === "fund" ? "fund-methods" : "send-form", []);
79184
+ ), [Nr, kt] = H(!1), [Ao, rs] = H(null), [Sc, ua] = H(null), { connectAsync: Fa } = Zf(), Jt = Te((le) => le === "swap" ? "swap" : le === "earn" ? "earn" : le === "fund" ? "fund-methods" : "send-form", []);
79181
79185
  ne(() => {
79182
- Oe(d), re && ue("home");
79183
- }, [d, re, ue]);
79186
+ Oe(d), re && he("home");
79187
+ }, [d, re, he]);
79184
79188
  const Ft = Te(() => {
79185
- const ce = Jt(Ie);
79186
- ue(ce);
79187
- }, [Ie, ue, Jt]);
79189
+ const le = Jt(Ie);
79190
+ he(le);
79191
+ }, [Ie, he, Jt]);
79188
79192
  ne(() => {
79189
79193
  Se === "home" && Ft();
79190
79194
  }, [Se, Ft]);
@@ -79192,9 +79196,9 @@ const Dfe = ({
79192
79196
  re,
79193
79197
  Ie,
79194
79198
  Jt
79195
- ), Pc = fe(() => Ie === "fund" ? "Fund" : Ie === "swap" ? "Swap" : Ie === "earn" ? "Earn" : "Pay", [Ie]);
79199
+ ), Pc = pe(() => Ie === "fund" ? "Fund" : Ie === "swap" ? "Swap" : Ie === "earn" ? "Earn" : "Pay", [Ie]);
79196
79200
  ne(() => {
79197
- const ce = Kne(r), Ve = Qne(s), ht = Ufe(a), Rt = n ? Yr(n) : !0;
79201
+ const le = Kne(r), Ve = Qne(s), ht = Ufe(a), Rt = n ? Yr(n) : !0;
79198
79202
  let ss = !0, ma = "";
79199
79203
  if (O && Array.isArray(O))
79200
79204
  for (const nh of O)
@@ -79204,11 +79208,11 @@ const Dfe = ({
79204
79208
  ss = !1, ma = nh.url;
79205
79209
  break;
79206
79210
  }
79207
- if (ce && Ve && ht && Rt && ss) {
79211
+ if (le && Ve && ht && Rt && ss) {
79208
79212
  nt(null);
79209
79213
  return;
79210
79214
  }
79211
- if (!ce) {
79215
+ if (!le) {
79212
79216
  m.console.error(
79213
79217
  "[trails-sdk] Invalid toAmount prop: must be numeric. Received:",
79214
79218
  r
@@ -79274,10 +79278,10 @@ const Dfe = ({
79274
79278
  }
79275
79279
  }
79276
79280
  }, [r, s, a, Ie, n, O]);
79277
- const Pr = Lfe(A, N, P), En = (ce) => {
79278
- if (Sr(ce), typeof window < "u")
79281
+ const Pr = Lfe(A, N, P), En = (le) => {
79282
+ if (Sr(le), typeof window < "u")
79279
79283
  try {
79280
- localStorage.setItem("trails-last-wallet", ce);
79284
+ localStorage.setItem("trails-last-wallet", le);
79281
79285
  } catch (Ve) {
79282
79286
  m.console.error(
79283
79287
  "[trails-sdk] Failed to save to localStorage:",
@@ -79287,12 +79291,12 @@ const Dfe = ({
79287
79291
  }, [ha] = H(null), [Ba, Io] = H(null), [xs, ks] = H(!1);
79288
79292
  H(
79289
79293
  null
79290
- ), ((ce, Ve, ht, Rt) => {
79291
- const ss = ce === "earn" || ce === "fund", { data: ma, loading: nh } = VL({
79294
+ ), ((le, Ve, ht, Rt) => {
79295
+ const ss = le === "earn" || le === "fund", { data: ma, loading: nh } = VL({
79292
79296
  enabled: ss
79293
79297
  });
79294
79298
  return ne(() => {
79295
- if (ce === "earn" && Ve && ht && Rt && ma && ma.length > 0 && (!xt || xt.chainId !== ht || xt.token.address.toLowerCase() !== Rt.toLowerCase() && xt.token.symbol.toLowerCase() !== Rt.toLowerCase())) {
79299
+ if (le === "earn" && Ve && ht && Rt && ma && ma.length > 0 && (!xt || xt.chainId !== ht || xt.token.address.toLowerCase() !== Rt.toLowerCase() && xt.token.symbol.toLowerCase() !== Rt.toLowerCase())) {
79296
79300
  const rh = typeof ht == "string" ? parseInt(ht, 10) : ht, wp = ma.find((Oo) => {
79297
79301
  let vp = Oo.depositAddress.toLowerCase() === Ve.toLowerCase();
79298
79302
  const yF = Oo.chainId === rh;
@@ -79300,7 +79304,7 @@ const Dfe = ({
79300
79304
  return !xp && Oo.protocol === "Aave" && (Rt === "0x0000000000000000000000000000000000000000" || Rt === "ETH") && (xp = Oo.token.symbol === "WETH" || Oo.token.address.toLowerCase() === lre(rh)?.toLowerCase(), vp || (vp = Oo.wrappedTokenGatewayAddress?.toLowerCase() === Ve.toLowerCase())), vp && yF && xp;
79301
79305
  });
79302
79306
  wp ? (m.console.log(
79303
- `[trails-sdk] Auto-selected pool for ${ce} mode toAddress:`,
79307
+ `[trails-sdk] Auto-selected pool for ${le} mode toAddress:`,
79304
79308
  Ve,
79305
79309
  "toChainId:",
79306
79310
  rh,
@@ -79308,7 +79312,7 @@ const Dfe = ({
79308
79312
  Rt,
79309
79313
  wp
79310
79314
  ), rn(wp)) : m.console.log(
79311
- `[trails-sdk] No matching pool found for ${ce} mode toAddress:`,
79315
+ `[trails-sdk] No matching pool found for ${le} mode toAddress:`,
79312
79316
  Ve,
79313
79317
  "toChainId:",
79314
79318
  rh,
@@ -79316,7 +79320,7 @@ const Dfe = ({
79316
79320
  Rt
79317
79321
  );
79318
79322
  }
79319
- }, [ce, Ve, ht, Rt, ma]), { poolsLoading: nh };
79323
+ }, [le, Ve, ht, Rt, ma]), { poolsLoading: nh };
79320
79324
  })(Ie, n, s, a);
79321
79325
  const {
79322
79326
  setOriginTxHash: Ws,
@@ -79342,7 +79346,7 @@ const Dfe = ({
79342
79346
  onCheckoutError: E,
79343
79347
  onCheckoutStatusUpdate: C
79344
79348
  }), { clearSelectedFeeOption: Va } = yU(), { handleDebugScreenSelect: Oc } = Ofe({
79345
- setCurrentScreen: ue,
79349
+ setCurrentScreen: he,
79346
79350
  setSelectedToken: me,
79347
79351
  setTransactionStates: Nn,
79348
79352
  setPrepareSendQuote: Wr,
@@ -79355,36 +79359,36 @@ const Dfe = ({
79355
79359
  });
79356
79360
  ne(() => {
79357
79361
  if (xt && (Se === "send-form" || Se === "fund-form")) {
79358
- const ce = Ie === "fund" ? "fund-form" : "send-form";
79359
- Se !== ce && ue(ce);
79362
+ const le = Ie === "fund" ? "fund-form" : "send-form";
79363
+ Se !== le && he(le);
79360
79364
  }
79361
- }, [Ie, Se, xt, ue]), ne(() => {
79365
+ }, [Ie, Se, xt, he]), ne(() => {
79362
79366
  Vre({
79363
79367
  screen: Se,
79364
79368
  userAddress: A || void 0
79365
79369
  });
79366
79370
  }, [Se, A]), ne(() => {
79367
- const ce = B.status;
79368
- if (ce !== "idle")
79369
- switch (ke || $e(), ce) {
79371
+ const le = B.status;
79372
+ if (le !== "idle")
79373
+ switch (ke || $e(), le) {
79370
79374
  case "awaiting-origin":
79371
- ue("select-origin-token");
79375
+ he("select-origin-token");
79372
79376
  break;
79373
79377
  case "awaiting-amount":
79374
- ue("select-origin-amount");
79378
+ he("select-origin-amount");
79375
79379
  break;
79376
79380
  case "confirmation":
79377
- ue("wallet-confirmation");
79381
+ he("wallet-confirmation");
79378
79382
  break;
79379
79383
  case "pending":
79380
- ue("pending");
79384
+ he("pending");
79381
79385
  break;
79382
79386
  case "success":
79383
79387
  case "error":
79384
- $.length > 0 ? ue("receipt") : ue("pending");
79388
+ $.length > 0 ? he("receipt") : he("pending");
79385
79389
  break;
79386
79390
  default:
79387
- ue("pending");
79391
+ he("pending");
79388
79392
  break;
79389
79393
  }
79390
79394
  }, [
@@ -79392,7 +79396,7 @@ const Dfe = ({
79392
79396
  $.length,
79393
79397
  ke,
79394
79398
  $e,
79395
- ue
79399
+ he
79396
79400
  ]), ne(() => {
79397
79401
  F && Wr(F);
79398
79402
  }, [F]), ne(() => {
@@ -79404,8 +79408,8 @@ const Dfe = ({
79404
79408
  }, [B.status, R]), ne(() => {
79405
79409
  V && _re(V);
79406
79410
  }, [V]), ne(() => {
79407
- const ce = Sn();
79408
- A ? ce.identifyUser({ address: A }) : ce.unidentifyUser();
79411
+ const le = Sn();
79412
+ A ? le.identifyUser({ address: A }) : le.unidentifyUser();
79409
79413
  }, [A]), ne(() => {
79410
79414
  !A || !N || !P?.name || Wre({
79411
79415
  walletType: P?.name || "",
@@ -79437,7 +79441,7 @@ const Dfe = ({
79437
79441
  Se
79438
79442
  ), Be !== "select-funding-wallet") {
79439
79443
  const Ve = Jt(Ie);
79440
- ue(Ve);
79444
+ he(Ve);
79441
79445
  }
79442
79446
  me(null), nt(null), Wr(null), kt(!1);
79443
79447
  }
@@ -79449,7 +79453,7 @@ const Dfe = ({
79449
79453
  Se,
79450
79454
  Ie,
79451
79455
  me,
79452
- ue,
79456
+ he,
79453
79457
  Jt,
79454
79458
  Be
79455
79459
  ]), ne(() => {
@@ -79457,18 +79461,18 @@ const Dfe = ({
79457
79461
  "Earn mode: Pool selected, calldata ready for amount updates"
79458
79462
  );
79459
79463
  }, [xt, Ie, mn]);
79460
- const Pe = async (ce) => {
79464
+ const Pe = async (le) => {
79461
79465
  try {
79462
79466
  nt(null), _e(!0);
79463
- const Ve = le.find((ht) => ht.id === ce);
79467
+ const Ve = ce.find((ht) => ht.id === le);
79464
79468
  if (!Ve) {
79465
- nt(`No configuration found for wallet: ${ce}`), _e(!1);
79469
+ nt(`No configuration found for wallet: ${le}`), _e(!1);
79466
79470
  return;
79467
79471
  }
79468
79472
  if (m.console.log(
79469
79473
  "[trails-sdk] Initiating connection to wallet",
79470
- ce
79471
- ), ce === "sequence-waas") {
79474
+ le
79475
+ ), le === "sequence-waas") {
79472
79476
  m.console.log("[trails-sdk] Opening Sequence WaaS connect modal");
79473
79477
  return;
79474
79478
  }
@@ -79476,13 +79480,13 @@ const Dfe = ({
79476
79480
  const ht = P;
79477
79481
  m.console.log(
79478
79482
  "[trails-sdk] Initiating connection to walletId",
79479
- ce
79483
+ le
79480
79484
  );
79481
79485
  const Rt = await Fa({ connector: Ve.connector });
79482
79486
  if (m.console.log(
79483
79487
  `[trails-sdk] Successfully connected to ${Ve.name}`,
79484
79488
  Rt
79485
- ), En(ce), ar) {
79489
+ ), En(le), ar) {
79486
79490
  if (m.console.log(
79487
79491
  "[trails-sdk] Connected wallet for recipient selection, setting as recipient:",
79488
79492
  Rt.accounts[0]
@@ -79500,7 +79504,7 @@ const Dfe = ({
79500
79504
  }
79501
79505
  mt();
79502
79506
  const ss = at.originScreen;
79503
- ue(ss || "recipients");
79507
+ he(ss || "recipients");
79504
79508
  } else
79505
79509
  m.console.log(
79506
79510
  "[trails-sdk] Normal wallet connection, switching active wallet"
@@ -79510,7 +79514,7 @@ const Dfe = ({
79510
79514
  "[trails-sdk] First wallet connection, going home"
79511
79515
  ), Ft());
79512
79516
  } else if (Ve.connector === Bi) {
79513
- P && P.name !== "WalletConnect" && Tt(P), ue("wallet-connect"), _e(!1);
79517
+ P && P.name !== "WalletConnect" && Tt(P), he("wallet-connect"), _e(!1);
79514
79518
  return;
79515
79519
  }
79516
79520
  _e(!1);
@@ -79526,37 +79530,37 @@ const Dfe = ({
79526
79530
  "[trails-sdk] Disconnecting all connected wallets:",
79527
79531
  ae.length
79528
79532
  );
79529
- for (const ce of ae)
79533
+ for (const le of ae)
79530
79534
  try {
79531
- await ce.connector.disconnect(), m.console.log(
79535
+ await le.connector.disconnect(), m.console.log(
79532
79536
  "[trails-sdk] Disconnected wallet:",
79533
- ce.connector.name
79537
+ le.connector.name
79534
79538
  );
79535
79539
  } catch (Ve) {
79536
79540
  m.console.error(
79537
79541
  "[trails-sdk] Failed to disconnect wallet:",
79538
- ce.connector.name,
79542
+ le.connector.name,
79539
79543
  Ve
79540
79544
  );
79541
79545
  }
79542
79546
  await Y(), Hre();
79543
- } catch (ce) {
79544
- m.console.error("[trails-sdk] Failed to disconnect:", ce);
79547
+ } catch (le) {
79548
+ m.console.error("[trails-sdk] Failed to disconnect:", le);
79545
79549
  }
79546
- ue("connect");
79550
+ he("connect");
79547
79551
  }, Dn = async () => {
79548
79552
  if (ar) {
79549
79553
  m.console.log(
79550
79554
  "[trails-sdk] WalletConnect completed for recipient selection, setting as recipient:",
79551
79555
  A
79552
79556
  ), A && Xn(A);
79553
- const ce = at.originalActiveConnector, Ve = at.originalActiveWalletAddress;
79554
- if (ce && Ve)
79557
+ const le = at.originalActiveConnector, Ve = at.originalActiveWalletAddress;
79558
+ if (le && Ve)
79555
79559
  try {
79556
79560
  m.console.log(
79557
79561
  "[trails-sdk] Switching back to original active wallet after WalletConnect:",
79558
79562
  Ve
79559
- ), Q({ connector: ce });
79563
+ ), Q({ connector: le });
79560
79564
  } catch (Rt) {
79561
79565
  m.console.error(
79562
79566
  "[trails-sdk] Failed to switch back to original wallet after WalletConnect:",
@@ -79565,20 +79569,20 @@ const Dfe = ({
79565
79569
  }
79566
79570
  mt();
79567
79571
  const ht = at.originScreen;
79568
- ue(ht || "recipients");
79572
+ he(ht || "recipients");
79569
79573
  } else
79570
- ue(Ie === "swap" ? "swap" : Ie === "earn" ? "earn" : Ie === "fund" ? "fund-methods" : Ie === "pay" ? "send-form" : "account-settings");
79571
- }, Hs = (ce) => {
79574
+ he(Ie === "swap" ? "swap" : Ie === "earn" ? "earn" : Ie === "fund" ? "fund-methods" : Ie === "pay" ? "send-form" : "account-settings");
79575
+ }, Hs = (le) => {
79572
79576
  try {
79573
- if (nt(null), me(ce), we) {
79577
+ if (nt(null), me(le), we) {
79574
79578
  if (we.requireAmountInput) {
79575
79579
  U((Rt) => ({
79576
79580
  ...Rt,
79577
79581
  status: "awaiting-amount"
79578
- })), He(ce);
79582
+ })), He(le);
79579
79583
  return;
79580
79584
  }
79581
- const Ve = ce.contractAddress || Le, ht = ce.chainId ?? 0;
79585
+ const Ve = le.contractAddress || Le, ht = le.chainId ?? 0;
79582
79586
  try {
79583
79587
  we.resolve({
79584
79588
  fromTokenAddress: Ve,
@@ -79592,34 +79596,34 @@ const Dfe = ({
79592
79596
  } finally {
79593
79597
  ie(void 0);
79594
79598
  }
79595
- He(ce);
79599
+ He(le);
79596
79600
  return;
79597
79601
  }
79598
- ue(Ie === "earn" ? n && s || xt ? "send-form" : "earn-pools" : Ie === "swap" ? "swap" : Ie === "fund" ? "fund-form" : "send-form"), He(ce);
79602
+ he(Ie === "earn" ? n && s || xt ? "send-form" : "earn-pools" : Ie === "swap" ? "swap" : Ie === "fund" ? "fund-form" : "send-form"), He(le);
79599
79603
  } catch (Ve) {
79600
79604
  nt(Ve instanceof Error ? Ve.message : "An unknown error occurred");
79601
79605
  }
79602
- }, Ee = (ce) => {
79603
- Hs(ce);
79604
- }, He = (ce) => {
79605
- const Ve = Ce(ce.chainId), ht = ce.decimals || 18, Rt = {
79606
- symbol: ce.symbol,
79607
- name: ce.name,
79606
+ }, Ee = (le) => {
79607
+ Hs(le);
79608
+ }, He = (le) => {
79609
+ const Ve = Ce(le.chainId), ht = le.decimals || 18, Rt = {
79610
+ symbol: le.symbol,
79611
+ name: le.name,
79608
79612
  decimals: ht,
79609
- contractAddress: ce.contractAddress,
79610
- tokenId: `${ce.symbol}-${Ve?.name || ce.chainId}`,
79611
- chainId: ce.chainId,
79612
- chainName: Ve?.name || `Chain ${ce.chainId}`,
79613
- imageUrl: ce.imageUrl
79613
+ contractAddress: le.contractAddress,
79614
+ tokenId: `${le.symbol}-${Ve?.name || le.chainId}`,
79615
+ chainId: le.chainId,
79616
+ chainName: Ve?.name || `Chain ${le.chainId}`,
79617
+ imageUrl: le.imageUrl
79614
79618
  };
79615
79619
  J(Rt);
79616
- }, Mt = (ce) => {
79617
- if (we && pe)
79620
+ }, Mt = (le) => {
79621
+ if (we && de)
79618
79622
  try {
79619
79623
  we.resolve({
79620
- fromTokenAddress: pe.contractAddress || Le,
79621
- fromChainId: pe.chainId ?? 0,
79622
- fromAmount: ce
79624
+ fromTokenAddress: de.contractAddress || Le,
79625
+ fromChainId: de.chainId ?? 0,
79626
+ fromAmount: le
79623
79627
  }), ie(void 0);
79624
79628
  } catch (Ve) {
79625
79629
  m.console.error(
@@ -79627,13 +79631,13 @@ const Dfe = ({
79627
79631
  Ve
79628
79632
  ), we.reject(Ve), ie(void 0);
79629
79633
  }
79630
- }, Gs = async (ce, Ve) => {
79631
- if (m.console.log("[trails-sdk] handleOnSend", ce, Ve), we && pe)
79634
+ }, Gs = async (le, Ve) => {
79635
+ if (m.console.log("[trails-sdk] handleOnSend", le, Ve), we && de)
79632
79636
  try {
79633
- const ht = ce;
79637
+ const ht = le;
79634
79638
  we.resolve({
79635
- fromTokenAddress: pe.contractAddress || Le,
79636
- fromChainId: pe.chainId ?? 0,
79639
+ fromTokenAddress: de.contractAddress || Le,
79640
+ fromChainId: de.chainId ?? 0,
79637
79641
  fromAmount: ht
79638
79642
  }), ie(void 0);
79639
79643
  return;
@@ -79646,10 +79650,10 @@ const Dfe = ({
79646
79650
  }
79647
79651
  return Promise.resolve();
79648
79652
  }, So = () => {
79649
- const ce = Jt(Ie);
79650
- ue(ce), od();
79653
+ const le = Jt(Ie);
79654
+ he(le), od();
79651
79655
  }, od = Te(() => {
79652
- wn("wallet"), ue("home"), rn(null), Sr(null), _e(!1), Ye(!1), vs(void 0), Ws(""), Ts(null), $a(""), fa(null), Nn([]), Wr(null), ua(null), Je(), Va(), X();
79656
+ wn("wallet"), he("home"), rn(null), Sr(null), _e(!1), Ye(!1), vs(void 0), Ws(""), Ts(null), $a(""), fa(null), Nn([]), Wr(null), ua(null), Je(), Va(), X();
79653
79657
  }, [
79654
79658
  wn,
79655
79659
  $a,
@@ -79658,21 +79662,21 @@ const Dfe = ({
79658
79662
  Ws,
79659
79663
  Ts,
79660
79664
  rn,
79661
- ue,
79665
+ he,
79662
79666
  Je,
79663
79667
  Va,
79664
79668
  X
79665
79669
  ]);
79666
79670
  ne(() => {
79667
- const ce = Jt(Ie);
79668
- ue(ce);
79669
- }, [Ie, Jt, ue]), ne(() => {
79670
- we && (ke || $e(), Se !== "select-origin-token" && ue("select-origin-token"));
79671
+ const le = Jt(Ie);
79672
+ he(le);
79673
+ }, [Ie, Jt, he]), ne(() => {
79674
+ we && (ke || $e(), Se !== "select-origin-token" && he("select-origin-token"));
79671
79675
  }, [
79672
79676
  we,
79673
79677
  ke,
79674
79678
  Se,
79675
- ue,
79679
+ he,
79676
79680
  $e
79677
79681
  ]);
79678
79682
  const No = Te(() => {
@@ -79691,9 +79695,9 @@ const Dfe = ({
79691
79695
  we,
79692
79696
  ie
79693
79697
  ]);
79694
- ne(() => (de(Po), () => {
79695
- de(null);
79696
- }), [Po, de]), TF(
79698
+ ne(() => (ue(Po), () => {
79699
+ ue(null);
79700
+ }), [Po, ue]), TF(
79697
79701
  t,
79698
79702
  () => ({
79699
79703
  openModal: No,
@@ -79703,23 +79707,23 @@ const Dfe = ({
79703
79707
  [ke, No, Po]
79704
79708
  );
79705
79709
  function iF() {
79706
- ue("pending");
79710
+ he("pending");
79707
79711
  }
79708
- function cF(ce = 0) {
79709
- ua(ce);
79712
+ function cF(le = 0) {
79713
+ ua(le);
79710
79714
  }
79711
- function id({ transactionStates: ce }) {
79715
+ function id({ transactionStates: le }) {
79712
79716
  m.console.log(
79713
79717
  "[trails-sdk] handleTransferComplete called",
79714
- ce
79718
+ le
79715
79719
  );
79716
- const Ve = ce[0], ht = ce[ce.length - 1];
79720
+ const Ve = le[0], ht = le[le.length - 1];
79717
79721
  Ve?.transactionHash && Ve?.chainId && (Ws(Ve.transactionHash), Ts(Ve.chainId)), (ht?.transactionHash || ht?.txnHash && ht?.chainId) && ($a(
79718
79722
  ht?.transactionHash || ht?.txnHash || ""
79719
- ), fa(ht?.chainId)), ue("receipt");
79723
+ ), fa(ht?.chainId)), he("receipt");
79720
79724
  }
79721
- async function lF(ce) {
79722
- if (m.console.log("[trails-sdk] Onramp transfer completed:", ce), m.console.log(
79725
+ async function lF(le) {
79726
+ if (m.console.log("[trails-sdk] Onramp transfer completed:", le), m.console.log(
79723
79727
  "[trails-sdk] Using real transaction states from prepareSendQuote"
79724
79728
  ), m.console.log("[trails-sdk] handleOnrampComplete state:", {
79725
79729
  hasOnrampContinueSend: !!Ba,
@@ -79734,7 +79738,7 @@ const Dfe = ({
79734
79738
  );
79735
79739
  return;
79736
79740
  }
79737
- if (m.console.log("[trails-sdk] Navigating away from onramp screen"), ue("pending"), Ba) {
79741
+ if (m.console.log("[trails-sdk] Navigating away from onramp screen"), he("pending"), Ba) {
79738
79742
  m.console.log(
79739
79743
  "[trails-sdk] Continuing send flow after onramp completion"
79740
79744
  ), ks(!0);
@@ -79757,14 +79761,14 @@ const Dfe = ({
79757
79761
  "[trails-sdk] Setting transaction states from prepareSendQuote"
79758
79762
  ), Nn(cn.transactionStates));
79759
79763
  }
79760
- function eh(ce) {
79764
+ function eh(le) {
79761
79765
  m.console.log(
79762
79766
  "[trails-sdk] transactionStates from widget",
79763
- ce
79764
- ), Nn([...ce]);
79767
+ le
79768
+ ), Nn([...le]);
79765
79769
  }
79766
79770
  const bp = () => {
79767
- P && P.name !== "WalletConnect" && Tt(P), Sr(null), ue("wallet-connect");
79771
+ P && P.name !== "WalletConnect" && Tt(P), Sr(null), he("wallet-connect");
79768
79772
  }, dF = async () => {
79769
79773
  if (Tn)
79770
79774
  try {
@@ -79774,71 +79778,71 @@ const Dfe = ({
79774
79778
  );
79775
79779
  try {
79776
79780
  await Fa({ connector: Tn });
79777
- } catch (ce) {
79781
+ } catch (le) {
79778
79782
  m.console.error(
79779
79783
  "[trails-sdk] Failed to reconnect to previous wallet:",
79780
- ce
79784
+ le
79781
79785
  );
79782
79786
  }
79783
79787
  Tt(null);
79784
- } catch (ce) {
79788
+ } catch (le) {
79785
79789
  m.console.error(
79786
79790
  "[trails-sdk] Failed to reconnect to previous wallet:",
79787
- ce
79788
- ), ue("fund-methods");
79791
+ le
79792
+ ), he("fund-methods");
79789
79793
  }
79790
79794
  else
79791
- ue("fund-methods");
79792
- }, uF = (ce, Ve) => {
79795
+ he("fund-methods");
79796
+ }, uF = (le, Ve) => {
79793
79797
  try {
79794
79798
  if (m.console.log(
79795
- `Generating deposit calldata for ${ce.protocol} pool:`,
79796
- ce.name
79799
+ `Generating deposit calldata for ${le.protocol} pool:`,
79800
+ le.name
79797
79801
  ), !Pr)
79798
79802
  throw new Error("Wallet client not found");
79799
- switch (ce.protocol.toLowerCase()) {
79803
+ switch (le.protocol.toLowerCase()) {
79800
79804
  case "aave":
79801
- return $L(Pr, ce, Ve);
79805
+ return $L(Pr, le, Ve);
79802
79806
  case "morpho":
79803
79807
  return _L(Pr, Ve);
79804
79808
  default:
79805
- m.console.warn(`Unsupported protocol: ${ce.protocol}`);
79809
+ m.console.warn(`Unsupported protocol: ${le.protocol}`);
79806
79810
  return;
79807
79811
  }
79808
79812
  } catch (ht) {
79809
79813
  m.console.error("Error generating deposit calldata:", ht);
79810
79814
  return;
79811
79815
  }
79812
- }, cd = (ce) => {
79813
- ce && m.console.error("[trails-sdk] Error sending transaction", ce);
79814
- const Ve = bn(ce), ht = Ko(ce), Rt = jF(ce), ss = oE(ce);
79815
- HF(ce) || (ht ? kt(!0) : ((Rt || ss) && kt(!0), nt(Ve)));
79816
- }, hF = (ce) => {
79817
- ce && m.console.error("[trails-sdk] Error connecting wallet", ce), nt(ce instanceof Error ? ce.message : ce);
79818
- }, b2 = (ce) => {
79819
- ce && m.console.error("[trails-sdk] Error selecting token", ce), nt(ce instanceof Error ? ce.message : ce);
79820
- }, th = (ce) => {
79821
- if (kt(!1), Wr(ce ?? null), Zt === "qr-code") {
79816
+ }, cd = (le) => {
79817
+ le && m.console.error("[trails-sdk] Error sending transaction", le);
79818
+ const Ve = bn(le), ht = Ko(le), Rt = jF(le), ss = oE(le);
79819
+ HF(le) || (ht ? kt(!0) : ((Rt || ss) && kt(!0), nt(Ve)));
79820
+ }, hF = (le) => {
79821
+ le && m.console.error("[trails-sdk] Error connecting wallet", le), nt(le instanceof Error ? le.message : le);
79822
+ }, b2 = (le) => {
79823
+ le && m.console.error("[trails-sdk] Error selecting token", le), nt(le instanceof Error ? le.message : le);
79824
+ }, th = (le) => {
79825
+ if (kt(!1), Wr(le ?? null), Zt === "qr-code") {
79822
79826
  tt("qr-code-wallet-select", Se);
79823
79827
  return;
79824
79828
  }
79825
- ue("wallet-confirmation");
79826
- }, w2 = (ce, Ve, ht, Rt, ss) => {
79829
+ he("wallet-confirmation");
79830
+ }, w2 = (le, Ve, ht, Rt, ss) => {
79827
79831
  console.log(
79828
79832
  "[widget] handleWaitingOnrampConfirm called with sessionId:",
79829
79833
  Rt
79830
- ), Wr(ce ?? null), jn(Ve ?? null), ss && ns(() => ss), ht && Xe(ht), Rt ? (console.log("[widget] Using provided sessionId:", Rt), wr(Rt)) : (console.error(
79834
+ ), Wr(le ?? null), jn(Ve ?? null), ss && ns(() => ss), ht && Xe(ht), Rt ? (console.log("[widget] Using provided sessionId:", Rt), wr(Rt)) : (console.error(
79831
79835
  "[widget] No sessionId provided - this should never happen for onramp flows"
79832
- ), wr(null)), ue("onramp-confirmation");
79836
+ ), wr(null)), he("onramp-confirmation");
79833
79837
  };
79834
79838
  async function fF() {
79835
79839
  if (Ao)
79836
79840
  try {
79837
79841
  nt(null), kt(!1), await Ao();
79838
- } catch (ce) {
79842
+ } catch (le) {
79839
79843
  m.console.error(
79840
79844
  "[trails-sdk] Error retrying wallet confirmation",
79841
- ce
79845
+ le
79842
79846
  );
79843
79847
  }
79844
79848
  }
@@ -79849,8 +79853,8 @@ const Dfe = ({
79849
79853
  due,
79850
79854
  {
79851
79855
  onConnect: (Ve) => {
79852
- if (le.find((ht) => ht.id === Ve)?.connector === Bi)
79853
- En(Ve), ue("wallet-connect");
79856
+ if (ce.find((ht) => ht.id === Ve)?.connector === Bi)
79857
+ En(Ve), he("wallet-connect");
79854
79858
  else {
79855
79859
  En(Ve);
79856
79860
  const ht = ct();
@@ -79877,16 +79881,16 @@ const Dfe = ({
79877
79881
  onBack: () => Ft(),
79878
79882
  onSelectWalletConnect: bp,
79879
79883
  onSelectConnectedAccount: () => {
79880
- wn("wallet"), ue(d === "fund" ? "select-origin-token" : "home");
79884
+ wn("wallet"), he(d === "fund" ? "select-origin-token" : "home");
79881
79885
  },
79882
79886
  onSelectQrCode: () => {
79883
79887
  tt("qrcode-options", "fund-methods");
79884
79888
  },
79885
79889
  onSelectOnrampMeld: () => {
79886
- ue(d === "fund" ? "fund-form" : "home");
79890
+ he(d === "fund" ? "fund-form" : "home");
79887
79891
  },
79888
79892
  onSelectOnrampExchange: () => {
79889
- ue(d === "fund" ? "fund-form" : "home");
79893
+ he(d === "fund" ? "fund-form" : "home");
79890
79894
  }
79891
79895
  }
79892
79896
  );
@@ -79897,7 +79901,7 @@ const Dfe = ({
79897
79901
  onBack: () => Ft(),
79898
79902
  onSelectWalletConnect: bp,
79899
79903
  onSelectConnectedAccount: () => {
79900
- wn("wallet"), ue("home");
79904
+ wn("wallet"), he("home");
79901
79905
  },
79902
79906
  onSelectQrCode: () => {
79903
79907
  tt("qrcode-options", "payment-methods");
@@ -79910,7 +79914,7 @@ const Dfe = ({
79910
79914
  return /* @__PURE__ */ l(
79911
79915
  Ahe,
79912
79916
  {
79913
- onBack: () => ue("fund-methods")
79917
+ onBack: () => he("fund-methods")
79914
79918
  }
79915
79919
  );
79916
79920
  case "qrcode-options":
@@ -79920,7 +79924,7 @@ const Dfe = ({
79920
79924
  onBack: Vt,
79921
79925
  onSelectWalletConnect: bp,
79922
79926
  onSelectQRCode: () => {
79923
- wn("qr-code"), ue(d === "fund" ? "fund-form" : "home");
79927
+ wn("qr-code"), he(d === "fund" ? "fund-form" : "home");
79924
79928
  }
79925
79929
  }
79926
79930
  );
@@ -79937,7 +79941,7 @@ const Dfe = ({
79937
79941
  onRecentTokenSelect: Ee,
79938
79942
  fundMethod: Zt,
79939
79943
  renderInline: c,
79940
- onNavigateToFundMethods: () => ue("fund-methods")
79944
+ onNavigateToFundMethods: () => he("fund-methods")
79941
79945
  }
79942
79946
  );
79943
79947
  case "select-origin-token":
@@ -79959,8 +79963,8 @@ const Dfe = ({
79959
79963
  return /* @__PURE__ */ l(
79960
79964
  SL,
79961
79965
  {
79962
- token: pe,
79963
- onBack: () => ue("select-origin-token"),
79966
+ token: de,
79967
+ onBack: () => he("select-origin-token"),
79964
79968
  onCancel: Po,
79965
79969
  onSubmit: Mt
79966
79970
  }
@@ -79970,10 +79974,10 @@ const Dfe = ({
79970
79974
  Nhe,
79971
79975
  {
79972
79976
  onBack: void 0,
79973
- selectedToken: pe,
79977
+ selectedToken: de,
79974
79978
  onSend: Gs,
79975
79979
  onWaitingForWalletConfirm: th,
79976
- onConfirm: () => ue("pending"),
79980
+ onConfirm: () => he("pending"),
79977
79981
  onComplete: id,
79978
79982
  account: Pr?.account,
79979
79983
  toRecipient: xt ? xt.depositAddress : n || void 0,
@@ -79990,17 +79994,17 @@ const Dfe = ({
79990
79994
  swapProvider: j,
79991
79995
  bridgeProvider: L,
79992
79996
  fundMethod: Zt,
79993
- onAmountUpdate: (ce) => {
79994
- if (xt && Ie === "earn" && ce && ce !== "")
79997
+ onAmountUpdate: (le) => {
79998
+ if (xt && Ie === "earn" && le && le !== "")
79995
79999
  try {
79996
80000
  const Ve = uF(
79997
80001
  xt,
79998
- ce
80002
+ le
79999
80003
  );
80000
80004
  m.console.log(
80001
80005
  "Updated calldata:",
80002
80006
  Ve,
80003
- ce
80007
+ le
80004
80008
  ), vs(Ve);
80005
80009
  } catch (Ve) {
80006
80010
  m.console.error("Error updating calldata:", Ve), vs(void 0);
@@ -80018,11 +80022,11 @@ const Dfe = ({
80018
80022
  return /* @__PURE__ */ l(
80019
80023
  xhe,
80020
80024
  {
80021
- selectedToken: pe,
80025
+ selectedToken: de,
80022
80026
  onSend: Gs,
80023
80027
  onWaitingForWalletConfirm: th,
80024
80028
  onWaitingForOnrampConfirm: w2,
80025
- onConfirm: () => ue("pending"),
80029
+ onConfirm: () => he("pending"),
80026
80030
  onComplete: id,
80027
80031
  account: Pr?.account,
80028
80032
  toAmount: r || void 0,
@@ -80052,10 +80056,10 @@ const Dfe = ({
80052
80056
  {
80053
80057
  onBack: Vt,
80054
80058
  onRetry: () => {
80055
- ue("fund-form");
80059
+ he("fund-form");
80056
80060
  },
80057
80061
  onIntentExecuted: () => {
80058
- ue("pending");
80062
+ he("pending");
80059
80063
  },
80060
80064
  quote: cn,
80061
80065
  onRampQuote: Zn,
@@ -80066,14 +80070,14 @@ const Dfe = ({
80066
80070
  }
80067
80071
  );
80068
80072
  case "wallet-confirmation": {
80069
- const ce = B.status !== "idle", Ve = ce ? B.retryEnabled ?? !1 : Nr;
80073
+ const le = B.status !== "idle", Ve = le ? B.retryEnabled ?? !1 : Nr;
80070
80074
  return /* @__PURE__ */ l(
80071
80075
  PL,
80072
80076
  {
80073
80077
  onBack: Vt,
80074
80078
  onComplete: iF,
80075
80079
  retryEnabled: Ve,
80076
- onRetry: ce ? () => {
80080
+ onRetry: le ? () => {
80077
80081
  xe.current && (U((Rt) => ({
80078
80082
  ...Rt,
80079
80083
  retryEnabled: !1
@@ -80089,8 +80093,8 @@ const Dfe = ({
80089
80093
  lfe,
80090
80094
  {
80091
80095
  onBack: Vt,
80092
- onSelect: (ce) => {
80093
- vn(ce), ue("qr-code-deposit");
80096
+ onSelect: (le) => {
80097
+ vn(le), he("qr-code-deposit");
80094
80098
  },
80095
80099
  selectedWalletId: Ht
80096
80100
  }
@@ -80099,8 +80103,8 @@ const Dfe = ({
80099
80103
  return /* @__PURE__ */ l(
80100
80104
  tfe,
80101
80105
  {
80102
- onBack: () => ue("qr-code-wallet-select"),
80103
- onChangeWallet: () => ue("qr-code-wallet-select"),
80106
+ onBack: () => he("qr-code-wallet-select"),
80107
+ onChangeWallet: () => he("qr-code-wallet-select"),
80104
80108
  quote: cn,
80105
80109
  selectedWalletId: Ht,
80106
80110
  walletOptions: te
@@ -80124,23 +80128,23 @@ const Dfe = ({
80124
80128
  onRampQuote: Zn,
80125
80129
  timestamp: R ?? void 0,
80126
80130
  onContinue: () => {
80127
- m.console.log("[trails-sdk] onContinue called"), ue("receipt");
80131
+ m.console.log("[trails-sdk] onContinue called"), he("receipt");
80128
80132
  }
80129
80133
  }
80130
80134
  );
80131
80135
  case "receipt": {
80132
- const ce = B.status !== "idle";
80136
+ const le = B.status !== "idle";
80133
80137
  return /* @__PURE__ */ l(
80134
80138
  ML,
80135
80139
  {
80136
- onSendAnother: ce ? se ?? void 0 : So,
80140
+ onSendAnother: le ? se ?? void 0 : So,
80137
80141
  onClose: Po,
80138
80142
  renderInline: c,
80139
80143
  transactionStates: _a,
80140
80144
  totalCompletionSeconds: Sc ?? void 0,
80141
80145
  quote: cn,
80142
80146
  showCloseButton: !1,
80143
- actionButtonText: ce ? Ae ?? void 0 : void 0,
80147
+ actionButtonText: le ? Ae ?? void 0 : void 0,
80144
80148
  onRampQuote: Zn
80145
80149
  }
80146
80150
  );
@@ -80171,12 +80175,12 @@ const Dfe = ({
80171
80175
  ] });
80172
80176
  try {
80173
80177
  return /* @__PURE__ */ l("div", { className: "flex flex-col h-full", children: ve({
80174
- setCurrentScreen: (ce) => {
80175
- ue(ce);
80178
+ setCurrentScreen: (le) => {
80179
+ he(le);
80176
80180
  },
80177
80181
  onComplete: lF,
80178
- onError: (ce) => {
80179
- m.console.error("[trails-sdk] Onramp error:", ce);
80182
+ onError: (le) => {
80183
+ m.console.error("[trails-sdk] Onramp error:", le);
80180
80184
  },
80181
80185
  onBack: Vt,
80182
80186
  toTokenSymbol: ha?.toTokenSymbol,
@@ -80186,8 +80190,8 @@ const Dfe = ({
80186
80190
  toAmountUsd: ha?.toAmountUsd,
80187
80191
  apiKey: V
80188
80192
  }) });
80189
- } catch (ce) {
80190
- return m.console.error("[trails-sdk] Error rendering onramp:", ce), /* @__PURE__ */ g("div", { className: "flex flex-col h-full p-4", children: [
80193
+ } catch (le) {
80194
+ return m.console.error("[trails-sdk] Error rendering onramp:", le), /* @__PURE__ */ g("div", { className: "flex flex-col h-full p-4", children: [
80191
80195
  /* @__PURE__ */ g("div", { className: "flex items-center mb-4", children: [
80192
80196
  /* @__PURE__ */ l(
80193
80197
  "button",
@@ -80203,7 +80207,7 @@ const Dfe = ({
80203
80207
  ] }),
80204
80208
  /* @__PURE__ */ l("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ g("div", { className: "text-center p-4 border border-solid border-red-200 dark:border-red-700 rounded-lg", children: [
80205
80209
  /* @__PURE__ */ l("p", { className: "text-red-600 dark:text-red-400 mb-2", children: "Error loading exchange funding." }),
80206
- /* @__PURE__ */ l("p", { className: "text-sm text-red-500 dark:text-red-500", children: ce instanceof Error ? ce.message : "Unknown error" })
80210
+ /* @__PURE__ */ l("p", { className: "text-sm text-red-500 dark:text-red-500", children: le instanceof Error ? le.message : "Unknown error" })
80207
80211
  ] }) })
80208
80212
  ] });
80209
80213
  }
@@ -80224,13 +80228,13 @@ const Dfe = ({
80224
80228
  Nfe,
80225
80229
  {
80226
80230
  onBack: Vt,
80227
- onWalletSelect: (ce) => {
80231
+ onWalletSelect: (le) => {
80228
80232
  m.console.log(
80229
80233
  "[trails-sdk] Wallet selected from wallet-list:",
80230
- ce
80231
- ), le.find((Ve) => Ve.id === ce)?.connector === Bi ? (En(ce), m.console.log(
80234
+ le
80235
+ ), ce.find((Ve) => Ve.id === le)?.connector === Bi ? (En(le), m.console.log(
80232
80236
  "[trails-sdk] WalletConnect selected, going to wallet-connect screen"
80233
- ), ue("wallet-connect")) : (En(ce), m.console.log(
80237
+ ), he("wallet-connect")) : (En(le), m.console.log(
80234
80238
  "[trails-sdk] Regular wallet selected, going to wallet-connection-pending"
80235
80239
  ), setTimeout(() => {
80236
80240
  const Ve = ct();
@@ -80239,14 +80243,14 @@ const Dfe = ({
80239
80243
  Ve || void 0
80240
80244
  );
80241
80245
  }, 100), setTimeout(() => {
80242
- Pe(ce);
80246
+ Pe(le);
80243
80247
  }, 100));
80244
80248
  },
80245
- walletOptions: le.map((ce) => ({
80246
- id: ce.id,
80247
- name: ce.name,
80248
- icon: ce.icon,
80249
- connector: ce.connector
80249
+ walletOptions: ce.map((le) => ({
80250
+ id: le.id,
80251
+ name: le.name,
80252
+ icon: le.icon,
80253
+ connector: le.connector
80250
80254
  }))
80251
80255
  }
80252
80256
  );
@@ -80254,13 +80258,13 @@ const Dfe = ({
80254
80258
  return /* @__PURE__ */ l(
80255
80259
  che,
80256
80260
  {
80257
- onContinue: () => ue("send-form"),
80261
+ onContinue: () => he("send-form"),
80258
80262
  account: Pr?.account,
80259
80263
  walletClient: Pr ?? void 0,
80260
80264
  onTransactionStateChange: eh,
80261
80265
  onError: cd,
80262
80266
  onWaitingForWalletConfirm: th,
80263
- onConfirm: () => ue("pending"),
80267
+ onConfirm: () => he("pending"),
80264
80268
  onComplete: id,
80265
80269
  onSend: Gs,
80266
80270
  paymasterUrls: O,
@@ -80279,8 +80283,8 @@ const Dfe = ({
80279
80283
  d2,
80280
80284
  {
80281
80285
  onBack: Vt,
80282
- onPoolSelect: (ce) => {
80283
- m.console.log("Selected pool:", ce), rn(ce), ue("send-form");
80286
+ onPoolSelect: (le) => {
80287
+ m.console.log("Selected pool:", le), rn(le), he("send-form");
80284
80288
  }
80285
80289
  }
80286
80290
  );
@@ -80291,9 +80295,9 @@ const Dfe = ({
80291
80295
  onSend: Gs,
80292
80296
  onWaitingForWalletConfirm: th,
80293
80297
  onWaitingForOnrampConfirm: w2,
80294
- onConfirm: () => ue("pending"),
80298
+ onConfirm: () => he("pending"),
80295
80299
  onComplete: id,
80296
- selectedToken: pe,
80300
+ selectedToken: de,
80297
80301
  account: Pr?.account,
80298
80302
  toRecipient: n || void 0,
80299
80303
  toAmount: r || void 0,
@@ -80342,14 +80346,14 @@ const Dfe = ({
80342
80346
  return /* @__PURE__ */ l(ehe, { limit: 20, autoRefetch: !1, onBack: Vt });
80343
80347
  case "account-settings":
80344
80348
  if (!re) {
80345
- ue("connect");
80349
+ he("connect");
80346
80350
  return;
80347
80351
  }
80348
80352
  return /* @__PURE__ */ l(lue, { onBack: Vt });
80349
80353
  case "user-preferences":
80350
80354
  return /* @__PURE__ */ l(yfe, { onBack: Vt });
80351
80355
  case "chain-list":
80352
- return /* @__PURE__ */ l(Ra, { onBack: () => ue("tokens") });
80356
+ return /* @__PURE__ */ l(Ra, { onBack: () => he("tokens") });
80353
80357
  case "recipients":
80354
80358
  return /* @__PURE__ */ l(hfe, { onBack: Vt });
80355
80359
  case "disconnect":
@@ -80394,7 +80398,7 @@ const Dfe = ({
80394
80398
  className: "flex flex-col min-h-[400px] shadow-xl p-4 sm:p-6 relative w-full max-w-[400px] min-w-0 sm:w-[400px] mx-auto custom-scrollbar trails-bg-primary trails-text-primary trails-font trails-border-radius-widget trails-widget-border",
80395
80399
  layout: !0,
80396
80400
  layoutId: "modal-container",
80397
- onClick: (ce) => ce.stopPropagation(),
80401
+ onClick: (le) => le.stopPropagation(),
80398
80402
  children: [
80399
80403
  /* @__PURE__ */ l(Pa, { mode: "wait", children: /* @__PURE__ */ g(
80400
80404
  Ar.div,
@@ -80509,7 +80513,7 @@ const Dfe = ({
80509
80513
  buyCryptoOnramp: e.buyCryptoOnramp
80510
80514
  };
80511
80515
  m.console.log("trailsConfig", o);
80512
- const i = e.decoupleWagmi || !n, c = !s, d = /* @__PURE__ */ l(tD, { initialTheme: e.theme, children: /* @__PURE__ */ l($fe, { ...e, ref: t }) }), h = /* @__PURE__ */ l(GT, { client: gu, children: i ? /* @__PURE__ */ l(tE, { config: a, children: d }) : d }), f = c ? /* @__PURE__ */ l(Cde, { config: o, children: h }) : h, p = fe(() => e.customCss instanceof Object ? Dde(e.customCss) : e.customCss, [e.customCss]);
80516
+ const i = e.decoupleWagmi || !n, c = !s, d = /* @__PURE__ */ l(tD, { initialTheme: e.theme, children: /* @__PURE__ */ l($fe, { ...e, ref: t }) }), h = /* @__PURE__ */ l(GT, { client: gu, children: i ? /* @__PURE__ */ l(tE, { config: a, children: d }) : d }), f = c ? /* @__PURE__ */ l(Cde, { config: o, children: h }) : h, p = pe(() => e.customCss instanceof Object ? Dde(e.customCss) : e.customCss, [e.customCss]);
80513
80517
  return e.disableCss ? /* @__PURE__ */ l(x2, { children: f }) : /* @__PURE__ */ l(JR, { customCss: p, children: /* @__PURE__ */ l(x2, { children: f }) });
80514
80518
  }
80515
80519
  ), z0e = (e) => ({