@dhedge/trading-widget 5.12.1 → 5.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -3,29 +3,29 @@ var ul = (e, t, n) => t in e ? pl(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var ze = (e, t, n) => ul(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsxs as w, Fragment as P, jsx as s } from "react/jsx-runtime";
5
5
  import { Tab as ea, Disclosure as ta, DisclosureButton as na, Transition as ra, DisclosurePanel as oa, TabPanel as aa, Popover as ml, PopoverButton as wl, PopoverBackdrop as hl, PopoverPanel as gl, Field as sa, Label as ia, Switch as vl, Checkbox as fl, TabGroup as la, TabList as ca, TabPanels as da, Dialog as bl, DialogBackdrop as yl, DialogPanel as Tl } from "@headlessui/react";
6
- import { QuestionMarkCircleIcon as rr, ExclamationCircleIcon as It, CheckCircleIcon as pa, Cog6ToothIcon as Al, LockClosedIcon as Sl, ArrowTopRightOnSquareIcon as ua } from "@heroicons/react/24/outline";
6
+ import { QuestionMarkCircleIcon as or, ExclamationCircleIcon as It, CheckCircleIcon as pa, Cog6ToothIcon as Al, LockClosedIcon as Sl, ArrowTopRightOnSquareIcon as ua } from "@heroicons/react/24/outline";
7
7
  import C from "classnames";
8
8
  import { usePopperTooltip as xl } from "react-popper-tooltip";
9
9
  import { createContext as ce, useMemo as L, useContext as de, useReducer as un, useCallback as f, useState as F, useEffect as _, forwardRef as Cl, useRef as we, Children as El, isValidElement as Il, Fragment as Nl } from "react";
10
10
  import { ChevronDownIcon as ma, ArrowDownIcon as _l, ArrowPathIcon as Ll, CheckIcon as Ot } from "@heroicons/react/24/solid";
11
11
  import { XMarkIcon as wa, ChevronLeftIcon as Pl } from "@heroicons/react/16/solid";
12
12
  import { injected as Ol } from "wagmi/connectors";
13
- import { b as I, q as W, H as kl, p as kt, j as Dl, S as oo, T as Rl, a0 as qt, t as ao, l as $l, r as Bl, a6 as Ml, a5 as je, n as Fl, u as ha, o as Wl, k as zl, x as ga, ac as qe, aq as Dt, ar as Re, as as Ve, at as nt, v as Ul, B as va, $ as ye, au as Fn, O as fa, J as Gl, an as or, h as ba, ab as ot, a1 as Te, av as Hl, K as mn, aw as ya, F as Ta, I as Aa, m as Vl, G as jl, ag as ql, af as Yl, D as Kl, a2 as Be, c as Jt, z as Oe, L as Ql, aa as wr, s as Sa, a7 as Xl, a as hr, y as xa, w as Ca, E as Zl, ah as Ea, d as Ia, a9 as Jl, Y as ec, ax as Na } from "./gmx-CKRd5jcU.js";
14
- import { A as vI, ay as fI, az as bI, aA as yI, aB as TI, aC as AI, aD as SI, C as xI, f as CI, aE as EI, aF as II, g as NI, i as _I, U as LI, V as PI, aG as OI, aH as kI, a3 as DI, aI as RI, a4 as $I, aJ as BI, aK as MI, aL as FI, aM as WI, aN as zI, aO as UI, aP as GI, aQ as HI, aR as VI, aS as jI, aT as qI, aU as YI, aV as KI, aW as QI, aX as XI, aY as ZI, aZ as JI, a_ as eN, a$ as tN, b0 as nN, b1 as rN, b2 as oN, b3 as aN, b4 as sN, b5 as iN, b6 as lN, b7 as cN, b8 as dN, b9 as pN, ba as uN, bb as mN, bc as wN, bd as hN, be as gN, ai as vN, aj as fN } from "./gmx-CKRd5jcU.js";
15
- import { useAccount as _a, useConfig as tc, useSwitchChain as nc, useReadContract as Ne, useBalance as rc, useWalletClient as La, usePublicClient as gr, useWriteContract as oc, useEstimateFeesPerGas as ac, useBlockNumber as sc, useConnect as Pa, useReadContracts as pe, useWaitForTransactionReceipt as Rt, useSimulateContract as ic } from "wagmi";
13
+ import { b as I, q as W, H as kl, p as kt, j as Dl, S as oo, T as Rl, a0 as qt, t as ao, l as $l, r as Bl, a6 as Ml, a5 as je, n as Fl, u as ha, o as Wl, k as zl, x as ga, ac as qe, aq as Dt, ar as Re, as as Ve, at as nt, v as Ul, B as va, $ as ye, au as Wn, O as fa, J as Gl, an as ar, h as ba, ab as ot, a1 as Te, av as Hl, K as mn, aw as ya, F as Ta, I as Aa, m as Vl, G as jl, ag as ql, af as Yl, D as Kl, a2 as Be, c as Jt, z as Oe, L as Ql, aa as hr, s as Sa, a7 as Xl, a as gr, y as xa, w as Ca, E as Zl, ah as Ea, d as Ia, a9 as Jl, Y as ec, ax as Na } from "./gmx-CJZtO7mw.js";
14
+ import { A as vI, ay as fI, az as bI, aA as yI, aB as TI, aC as AI, aD as SI, C as xI, f as CI, aE as EI, aF as II, g as NI, i as _I, U as LI, V as PI, aG as OI, aH as kI, a3 as DI, aI as RI, a4 as $I, aJ as BI, aK as MI, aL as FI, aM as WI, aN as zI, aO as UI, aP as GI, aQ as HI, aR as VI, aS as jI, aT as qI, aU as YI, aV as KI, aW as QI, aX as XI, aY as ZI, aZ as JI, a_ as eN, a$ as tN, b0 as nN, b1 as rN, b2 as oN, b3 as aN, b4 as sN, b5 as iN, b6 as lN, b7 as cN, b8 as dN, b9 as pN, ba as uN, bb as mN, bc as wN, bd as hN, be as gN, ai as vN, aj as fN } from "./gmx-CJZtO7mw.js";
15
+ import { useAccount as _a, useConfig as tc, useSwitchChain as nc, useReadContract as Ne, useBalance as rc, useWalletClient as La, usePublicClient as vr, useWriteContract as oc, useEstimateFeesPerGas as ac, useBlockNumber as sc, useConnect as Pa, useReadContracts as pe, useWaitForTransactionReceipt as Rt, useSimulateContract as ic } from "wagmi";
16
16
  import { useBlockNumber as yN, useConnect as TN, useDisconnect as AN, usePublicClient as SN, useReadContract as xN, useReadContracts as CN, useSendTransaction as EN, useWaitForTransactionReceipt as IN, useWalletClient as NN, useWriteContract as _N } from "wagmi";
17
17
  import { erc20Abi as Ee, encodeFunctionData as lc, formatUnits as Ae, formatEther as cc, isAddress as dc, encodeAbiParameters as pc, encodePacked as uc, keccak256 as mc } from "viem";
18
18
  import { decodeErrorResult as PN, encodeFunctionData as ON, erc20Abi as kN, formatEther as DN, formatUnits as RN, hexToString as $N, trim as BN } from "viem";
19
19
  import N, { BigNumber as De } from "bignumber.js";
20
- import { H as wc, o as hc, p as K, S as Y, T as Oa, F as vr, w as gc, U as J, L as vc, K as He, y as so, V as re, q as tn, x as rt, l as Yt, W as fc, X as Nt, D as bc, z as fr, c as yc, n as br, g as Wn, Q as Tc, i as Ac, P as Sc, h as xc, f as Cc, I as ka, k as zn, e as io, N as Ec, M as Da, C as Ra, s as $a, t as Ic, m as Ba, G as Ma, d as Nc, Y as $e, Z as _c, A as Fa, J as Wa, _ as yr, $ as Lc, B as lo, v as Pc, u as Oc, E as kc } from "./slippage-auto-simulation-CI3FlyW_.js";
21
- import { a0 as FN, a1 as WN, R as zN } from "./slippage-auto-simulation-CI3FlyW_.js";
20
+ import { H as wc, o as hc, p as K, S as Y, T as Oa, F as fr, w as gc, U as J, L as vc, K as He, y as so, V as re, q as tn, x as rt, l as Yt, W as fc, X as Nt, D as bc, z as br, c as yc, n as yr, g as zn, Q as Tc, i as Ac, P as Sc, h as xc, f as Cc, I as ka, k as Un, e as io, N as Ec, M as Da, C as Ra, s as $a, t as Ic, m as Ba, G as Ma, d as Nc, Y as $e, Z as _c, A as Fa, J as Wa, _ as Tr, $ as Lc, B as lo, v as Pc, u as Oc, E as kc } from "./slippage-auto-simulation-MsQpvjOP.js";
21
+ import { a0 as FN, a1 as WN, R as zN } from "./slippage-auto-simulation-MsQpvjOP.js";
22
22
  import { CustomError as Dc } from "ts-custom-error";
23
- import { useQuery as wn, useQueryClient as Tr } from "@tanstack/react-query";
23
+ import { useQuery as wn, useQueryClient as Ar } from "@tanstack/react-query";
24
24
  import { hyperEvm as za, base as Ua, polygon as Rc, optimism as Ga, arbitrum as hn, mainnet as $c } from "wagmi/chains";
25
25
  import { arbitrum as GN, base as HN, optimism as VN, polygon as jN } from "wagmi/chains";
26
26
  import { format as Bc, formatDuration as Ha, intervalToDuration as Mc } from "date-fns";
27
27
  import { CircleStackIcon as Va, ChevronDownIcon as ja, CheckIcon as qa } from "@heroicons/react/20/solid";
28
- import { L as Un, C as Fc } from "./storage-CSc9iE5L.js";
28
+ import { L as Gn, C as Fc } from "./storage-CSc9iE5L.js";
29
29
  const Wc = ({
30
30
  tooltipContent: e,
31
31
  children: t,
@@ -54,7 +54,7 @@ const Wc = ({
54
54
  }
55
55
  )
56
56
  ] });
57
- }, Ar = ({ text: e, ...t }) => /* @__PURE__ */ s(
57
+ }, Sr = ({ text: e, ...t }) => /* @__PURE__ */ s(
58
58
  Wc,
59
59
  {
60
60
  ...t,
@@ -64,8 +64,8 @@ const Wc = ({
64
64
  text: e,
65
65
  placement: t,
66
66
  iconClassName: n = "dtw-text-[color:var(--panel-secondary-content-color)]",
67
- Icon: r = rr
68
- }) => /* @__PURE__ */ s(Ar, { text: e, placement: t, children: /* @__PURE__ */ s(
67
+ Icon: r = or
68
+ }) => /* @__PURE__ */ s(Sr, { text: e, placement: t, children: /* @__PURE__ */ s(
69
69
  r,
70
70
  {
71
71
  className: C(
@@ -267,12 +267,12 @@ const Wc = ({
267
267
  WITHDRAW_STEPPER: "WITHDRAW_STEPPER",
268
268
  HYPEREVM_WARNING: "HYPEREVM_WARNING"
269
269
  }, Hc = {
270
- [U.DEFAULT]: rr,
270
+ [U.DEFAULT]: or,
271
271
  [U.ERROR]: It,
272
272
  [U.SUCCESS]: pa,
273
273
  [U.WARNING]: It,
274
- [U.CUSTOM]: rr
275
- }, Gn = ({
274
+ [U.CUSTOM]: or
275
+ }, Hn = ({
276
276
  tooltipText: e,
277
277
  value: t,
278
278
  label: n,
@@ -331,7 +331,7 @@ const Wc = ({
331
331
  r
332
332
  ]
333
333
  }
334
- ), Sr = ({
334
+ ), xr = ({
335
335
  children: e,
336
336
  staticItems: t,
337
337
  collapseItems: n,
@@ -340,9 +340,9 @@ const Wc = ({
340
340
  }) => {
341
341
  const a = S();
342
342
  return /* @__PURE__ */ s("div", { className: "dtw-w-full dtw-flex dtw-flex-col dtw-gap-1", children: /* @__PURE__ */ s(ta, { children: ({ open: i }) => /* @__PURE__ */ w(P, { children: [
343
- t?.map((l) => /* @__PURE__ */ s(Gn, { ...l }, l.label)),
343
+ t?.map((l) => /* @__PURE__ */ s(Hn, { ...l }, l.label)),
344
344
  /* @__PURE__ */ s(na, { className: "dtw-p-0 dtw-flex dtw-w-full dtw-justify-between dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] hover:dtw-bg-[var(--panel-meta-hover-bg,var(--panel-neutral-color))] focus:dtw-outline-none", children: /* @__PURE__ */ w(
345
- Gn,
345
+ Hn,
346
346
  {
347
347
  tooltipText: a.fullReceiveDetails,
348
348
  label: a.tradeDetails,
@@ -364,7 +364,7 @@ const Wc = ({
364
364
  }
365
365
  ) }),
366
366
  /* @__PURE__ */ s(ra, { show: i, children: /* @__PURE__ */ w(oa, { className: "dtw-transition dtw-transform dtw-duration-100 dtw-ease-out data-[closed]:opacity-0 data-[closed]:-dtw-translate-y-2.5 dtw-static dtw-text-[length:var(--panel-label-font-size,var(--panel-font-size-xs))] dtw-leading-[var(--panel-label-line-height,var(--panel-line-height-xs))] dtw-text-[color:var(--panel-secondary-content-color)] dtw-font-[var(--panel-meta-font-weight,var(--panel-font-weight-light))] dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] dtw-flex dtw-flex-col dtw-gap-1", children: [
367
- n?.map((l) => /* @__PURE__ */ s(Gn, { ...l }, l.label)),
367
+ n?.map((l) => /* @__PURE__ */ s(Hn, { ...l }, l.label)),
368
368
  e
369
369
  ] }) })
370
370
  ] }) }) });
@@ -881,7 +881,7 @@ const co = {
881
881
  t,
882
882
  n
883
883
  ]);
884
- }, XE = () => z().setPoolAddress, ZE = () => z().updateSendTokenInput, JE = () => z().updateReceiveTokenInput, eI = () => z().updateTradingSettings, tI = () => z().setTradingType, nI = () => z().updateTradingModal, Qc = () => z().updatePoolFallbackData, Xc = () => z().onTransactionError, Zc = () => z().onTradingSettleError, Jc = () => z().onTransactionSuccess, xr = () => z().onTransactionEstimationError, ed = () => z().onTokenSelector, it = () => z().onLog, td = () => z().onSimulateTransaction, Cr = () => {
884
+ }, XE = () => z().setPoolAddress, ZE = () => z().updateSendTokenInput, JE = () => z().updateReceiveTokenInput, eI = () => z().updateTradingSettings, tI = () => z().setTradingType, nI = () => z().updateTradingModal, Qc = () => z().updatePoolFallbackData, Xc = () => z().onTransactionError, Zc = () => z().onTradingSettleError, Jc = () => z().onTransactionSuccess, Cr = () => z().onTransactionEstimationError, ed = () => z().onTokenSelector, it = () => z().onLog, td = () => z().onSimulateTransaction, Er = () => {
885
885
  const e = z().getSwapQuotes, { effectiveSelectedAggregators: t } = gn();
886
886
  return f(
887
887
  ({
@@ -898,7 +898,7 @@ const co = {
898
898
  }),
899
899
  [e, t]
900
900
  );
901
- }, rI = () => z().updatePoolConfig, oI = () => z().addPoolConfig, aI = () => z().updateCustomDepositTokensPerChain, Er = () => z().setSwapQuoteRefreshTriggered, nd = () => z().getReferrerAddress, Ja = () => ne().input, O = () => [
901
+ }, rI = () => z().updatePoolConfig, oI = () => z().addPoolConfig, aI = () => z().updateCustomDepositTokensPerChain, Ir = () => z().setSwapQuoteRefreshTriggered, nd = () => z().getReferrerAddress, Ja = () => ne().input, O = () => [
902
902
  Ja().sendToken,
903
903
  z().updateSendTokenInput
904
904
  ], M = () => [
@@ -916,15 +916,15 @@ const co = {
916
916
  ], xe = () => [ne().type, z().setTradingType], Ye = () => ne().type === "deposit", ue = () => [
917
917
  ne().transactions,
918
918
  z().updateTransactions
919
- ], od = () => ne().defaultChainId, Hn = (e, t) => t.some(({ id: n }) => n === e), Ke = () => {
920
- const { chain: e } = _a(), { chains: t } = tc(), { switchChain: n, switchChainAsync: r } = nc(), o = od(), a = e?.id, i = Hn(a, t), l = o && Hn(o, t) ? o : t[0].id;
919
+ ], od = () => ne().defaultChainId, Vn = (e, t) => t.some(({ id: n }) => n === e), Ke = () => {
920
+ const { chain: e } = _a(), { chains: t } = tc(), { switchChain: n, switchChainAsync: r } = nc(), o = od(), a = e?.id, i = Vn(a, t), l = o && Vn(o, t) ? o : t[0].id;
921
921
  return {
922
922
  chain: e,
923
923
  isSupported: i,
924
924
  switchNetwork: n,
925
925
  switchNetworkAsync: r,
926
926
  chainId: i ? a : void 0,
927
- supportedChainId: Hn(a, t) ? a : l,
927
+ supportedChainId: Vn(a, t) ? a : l,
928
928
  chains: t
929
929
  };
930
930
  }, fn = ({
@@ -963,7 +963,7 @@ var sd = ad;
963
963
  function id(e, t) {
964
964
  return e === t || e !== e && t !== t;
965
965
  }
966
- var Ir = id, ld = Ir;
966
+ var Nr = id, ld = Nr;
967
967
  function cd(e, t) {
968
968
  for (var n = e.length; n--; )
969
969
  if (ld(e[n][0], t))
@@ -1053,8 +1053,8 @@ function dp(e) {
1053
1053
  var t = op(e);
1054
1054
  return t == ip || t == lp || t == sp || t == cp;
1055
1055
  }
1056
- var rs = dp, pp = _e, up = pp["__core-js_shared__"], mp = up, Vn = mp, wo = function() {
1057
- var e = /[^.]+$/.exec(Vn && Vn.keys && Vn.keys.IE_PROTO || "");
1056
+ var rs = dp, pp = _e, up = pp["__core-js_shared__"], mp = up, jn = mp, wo = function() {
1057
+ var e = /[^.]+$/.exec(jn && jn.keys && jn.keys.IE_PROTO || "");
1058
1058
  return e ? "Symbol(src)_1." + e : "";
1059
1059
  }();
1060
1060
  function wp(e) {
@@ -1092,7 +1092,7 @@ function $p(e, t) {
1092
1092
  var n = Rp(e, t);
1093
1093
  return Dp(n) ? n : void 0;
1094
1094
  }
1095
- var dt = $p, Bp = dt, Mp = _e, Fp = Bp(Mp, "Map"), Nr = Fp, Wp = dt, zp = Wp(Object, "create"), Sn = zp, ho = Sn;
1095
+ var dt = $p, Bp = dt, Mp = _e, Fp = Bp(Mp, "Map"), _r = Fp, Wp = dt, zp = Wp(Object, "create"), Sn = zp, ho = Sn;
1096
1096
  function Up() {
1097
1097
  this.__data__ = ho ? ho(null) : {}, this.size = 0;
1098
1098
  }
@@ -1133,7 +1133,7 @@ pt.prototype.delete = lu;
1133
1133
  pt.prototype.get = cu;
1134
1134
  pt.prototype.has = du;
1135
1135
  pt.prototype.set = pu;
1136
- var uu = pt, go = uu, mu = Tn, wu = Nr;
1136
+ var uu = pt, go = uu, mu = Tn, wu = _r;
1137
1137
  function hu() {
1138
1138
  this.size = 0, this.__data__ = {
1139
1139
  hash: new go(),
@@ -1182,7 +1182,7 @@ ut.prototype.delete = Du;
1182
1182
  ut.prototype.get = Ru;
1183
1183
  ut.prototype.has = $u;
1184
1184
  ut.prototype.set = Bu;
1185
- var _r = ut, Mu = Tn, Fu = Nr, Wu = _r, zu = 200;
1185
+ var Lr = ut, Mu = Tn, Fu = _r, Wu = Lr, zu = 200;
1186
1186
  function Uu(e, t) {
1187
1187
  var n = this.__data__;
1188
1188
  if (n instanceof Mu) {
@@ -1211,7 +1211,7 @@ var Zu = Xu;
1211
1211
  function Ju(e) {
1212
1212
  return this.__data__.has(e);
1213
1213
  }
1214
- var em = Ju, tm = _r, nm = Zu, rm = em;
1214
+ var em = Ju, tm = Lr, nm = Zu, rm = em;
1215
1215
  function on(e) {
1216
1216
  var t = -1, n = e == null ? 0 : e.length;
1217
1217
  for (this.__data__ = new tm(); ++t < n; )
@@ -1278,7 +1278,7 @@ function fm(e) {
1278
1278
  n[++t] = r;
1279
1279
  }), n;
1280
1280
  }
1281
- var Lr = fm, vo = An, fo = hm, bm = Ir, ym = ls, Tm = vm, Am = Lr, Sm = 1, xm = 2, Cm = "[object Boolean]", Em = "[object Date]", Im = "[object Error]", Nm = "[object Map]", _m = "[object Number]", Lm = "[object RegExp]", Pm = "[object Set]", Om = "[object String]", km = "[object Symbol]", Dm = "[object ArrayBuffer]", Rm = "[object DataView]", bo = vo ? vo.prototype : void 0, jn = bo ? bo.valueOf : void 0;
1281
+ var Pr = fm, vo = An, fo = hm, bm = Nr, ym = ls, Tm = vm, Am = Pr, Sm = 1, xm = 2, Cm = "[object Boolean]", Em = "[object Date]", Im = "[object Error]", Nm = "[object Map]", _m = "[object Number]", Lm = "[object RegExp]", Pm = "[object Set]", Om = "[object String]", km = "[object Symbol]", Dm = "[object ArrayBuffer]", Rm = "[object DataView]", bo = vo ? vo.prototype : void 0, qn = bo ? bo.valueOf : void 0;
1282
1282
  function $m(e, t, n, r, o, a, i) {
1283
1283
  switch (n) {
1284
1284
  case Rm:
@@ -1309,8 +1309,8 @@ function $m(e, t, n, r, o, a, i) {
1309
1309
  var p = ym(l(e), l(t), r, o, a, i);
1310
1310
  return i.delete(e), p;
1311
1311
  case km:
1312
- if (jn)
1313
- return jn.call(e) == jn.call(t);
1312
+ if (qn)
1313
+ return qn.call(e) == qn.call(t);
1314
1314
  }
1315
1315
  return !1;
1316
1316
  }
@@ -1374,11 +1374,11 @@ function vw(e, t) {
1374
1374
  var n = typeof e;
1375
1375
  return t = t ?? hw, !!t && (n == "number" || n != "symbol" && gw.test(e)) && e > -1 && e % 1 == 0 && e < t;
1376
1376
  }
1377
- var Pr = vw, fw = 9007199254740991;
1377
+ var Or = vw, fw = 9007199254740991;
1378
1378
  function bw(e) {
1379
1379
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= fw;
1380
1380
  }
1381
- var Or = bw, yw = ct, Tw = Or, Aw = wt, Sw = "[object Arguments]", xw = "[object Array]", Cw = "[object Boolean]", Ew = "[object Date]", Iw = "[object Error]", Nw = "[object Function]", _w = "[object Map]", Lw = "[object Number]", Pw = "[object Object]", Ow = "[object RegExp]", kw = "[object Set]", Dw = "[object String]", Rw = "[object WeakMap]", $w = "[object ArrayBuffer]", Bw = "[object DataView]", Mw = "[object Float32Array]", Fw = "[object Float64Array]", Ww = "[object Int8Array]", zw = "[object Int16Array]", Uw = "[object Int32Array]", Gw = "[object Uint8Array]", Hw = "[object Uint8ClampedArray]", Vw = "[object Uint16Array]", jw = "[object Uint32Array]", q = {};
1381
+ var kr = bw, yw = ct, Tw = kr, Aw = wt, Sw = "[object Arguments]", xw = "[object Array]", Cw = "[object Boolean]", Ew = "[object Date]", Iw = "[object Error]", Nw = "[object Function]", _w = "[object Map]", Lw = "[object Number]", Pw = "[object Object]", Ow = "[object RegExp]", kw = "[object Set]", Dw = "[object String]", Rw = "[object WeakMap]", $w = "[object ArrayBuffer]", Bw = "[object DataView]", Mw = "[object Float32Array]", Fw = "[object Float64Array]", Ww = "[object Int8Array]", zw = "[object Int16Array]", Uw = "[object Int32Array]", Gw = "[object Uint8Array]", Hw = "[object Uint8ClampedArray]", Vw = "[object Uint16Array]", jw = "[object Uint32Array]", q = {};
1382
1382
  q[Mw] = q[Fw] = q[Ww] = q[zw] = q[Uw] = q[Gw] = q[Hw] = q[Vw] = q[jw] = !0;
1383
1383
  q[Sw] = q[xw] = q[$w] = q[Cw] = q[Bw] = q[Ew] = q[Iw] = q[Nw] = q[_w] = q[Lw] = q[Pw] = q[Ow] = q[kw] = q[Dw] = q[Rw] = !1;
1384
1384
  function qw(e) {
@@ -1402,7 +1402,7 @@ sn.exports;
1402
1402
  }();
1403
1403
  e.exports = l;
1404
1404
  })(sn, sn.exports);
1405
- var Xw = sn.exports, Zw = Yw, Jw = Qw, Ao = Xw, So = Ao && Ao.isTypedArray, eh = So ? Jw(So) : Zw, us = eh, th = nw, nh = ds, rh = Fe, oh = ps, ah = Pr, sh = us, ih = Object.prototype, lh = ih.hasOwnProperty;
1405
+ var Xw = sn.exports, Zw = Yw, Jw = Qw, Ao = Xw, So = Ao && Ao.isTypedArray, eh = So ? Jw(So) : Zw, us = eh, th = nw, nh = ds, rh = Fe, oh = ps, ah = Or, sh = us, ih = Object.prototype, lh = ih.hasOwnProperty;
1406
1406
  function ch(e, t) {
1407
1407
  var n = rh(e), r = !n && nh(e), o = !n && !r && oh(e), a = !n && !r && !o && sh(e), i = n || r || o || a, l = i ? th(e.length, String) : [], c = l.length;
1408
1408
  for (var d in e)
@@ -1433,7 +1433,7 @@ function Sh(e) {
1433
1433
  Ah.call(e, n) && n != "constructor" && t.push(n);
1434
1434
  return t;
1435
1435
  }
1436
- var xh = Sh, Ch = rs, Eh = Or;
1436
+ var xh = Sh, Ch = rs, Eh = kr;
1437
1437
  function Ih(e) {
1438
1438
  return e != null && Eh(e.length) && !Ch(e);
1439
1439
  }
@@ -1441,7 +1441,7 @@ var ms = Ih, Nh = dh, _h = xh, Lh = ms;
1441
1441
  function Ph(e) {
1442
1442
  return Lh(e) ? Nh(e) : _h(e);
1443
1443
  }
1444
- var kr = Ph, Oh = Hm, kh = ew, Dh = kr;
1444
+ var Dr = Ph, Oh = Hm, kh = ew, Dh = Dr;
1445
1445
  function Rh(e) {
1446
1446
  return Oh(e, Dh, kh);
1447
1447
  }
@@ -1477,8 +1477,8 @@ function Wh(e, t, n, r, o, a) {
1477
1477
  }
1478
1478
  return a.delete(e), a.delete(t), g;
1479
1479
  }
1480
- var zh = Wh, Uh = dt, Gh = _e, Hh = Uh(Gh, "DataView"), Vh = Hh, jh = dt, qh = _e, Yh = jh(qh, "Promise"), Kh = Yh, Qh = dt, Xh = _e, Zh = Qh(Xh, "Set"), ws = Zh, Jh = dt, eg = _e, tg = Jh(eg, "WeakMap"), ng = tg, ar = Vh, sr = Nr, ir = Kh, lr = ws, cr = ng, hs = ct, ht = os, Co = "[object Map]", rg = "[object Object]", Eo = "[object Promise]", Io = "[object Set]", No = "[object WeakMap]", _o = "[object DataView]", og = ht(ar), ag = ht(sr), sg = ht(ir), ig = ht(lr), lg = ht(cr), Ue = hs;
1481
- (ar && Ue(new ar(new ArrayBuffer(1))) != _o || sr && Ue(new sr()) != Co || ir && Ue(ir.resolve()) != Eo || lr && Ue(new lr()) != Io || cr && Ue(new cr()) != No) && (Ue = function(e) {
1480
+ var zh = Wh, Uh = dt, Gh = _e, Hh = Uh(Gh, "DataView"), Vh = Hh, jh = dt, qh = _e, Yh = jh(qh, "Promise"), Kh = Yh, Qh = dt, Xh = _e, Zh = Qh(Xh, "Set"), ws = Zh, Jh = dt, eg = _e, tg = Jh(eg, "WeakMap"), ng = tg, sr = Vh, ir = _r, lr = Kh, cr = ws, dr = ng, hs = ct, ht = os, Co = "[object Map]", rg = "[object Object]", Eo = "[object Promise]", Io = "[object Set]", No = "[object WeakMap]", _o = "[object DataView]", og = ht(sr), ag = ht(ir), sg = ht(lr), ig = ht(cr), lg = ht(dr), Ue = hs;
1481
+ (sr && Ue(new sr(new ArrayBuffer(1))) != _o || ir && Ue(new ir()) != Co || lr && Ue(lr.resolve()) != Eo || cr && Ue(new cr()) != Io || dr && Ue(new dr()) != No) && (Ue = function(e) {
1482
1482
  var t = hs(e), n = t == rg ? e.constructor : void 0, r = n ? ht(n) : "";
1483
1483
  if (r)
1484
1484
  switch (r) {
@@ -1495,7 +1495,7 @@ var zh = Wh, Uh = dt, Gh = _e, Hh = Uh(Gh, "DataView"), Vh = Hh, jh = dt, qh = _
1495
1495
  }
1496
1496
  return t;
1497
1497
  });
1498
- var cg = Ue, qn = as, dg = ls, pg = Bm, ug = zh, Lo = cg, Po = Fe, Oo = ps, mg = us, wg = 1, ko = "[object Arguments]", Do = "[object Array]", Qt = "[object Object]", hg = Object.prototype, Ro = hg.hasOwnProperty;
1498
+ var cg = Ue, Yn = as, dg = ls, pg = Bm, ug = zh, Lo = cg, Po = Fe, Oo = ps, mg = us, wg = 1, ko = "[object Arguments]", Do = "[object Array]", Qt = "[object Object]", hg = Object.prototype, Ro = hg.hasOwnProperty;
1499
1499
  function gg(e, t, n, r, o, a) {
1500
1500
  var i = Po(e), l = Po(t), c = i ? Do : Lo(e), d = l ? Do : Lo(t);
1501
1501
  c = c == ko ? Qt : c, d = d == ko ? Qt : d;
@@ -1506,15 +1506,15 @@ function gg(e, t, n, r, o, a) {
1506
1506
  i = !0, p = !1;
1507
1507
  }
1508
1508
  if (m && !p)
1509
- return a || (a = new qn()), i || mg(e) ? dg(e, t, n, r, o, a) : pg(e, t, c, n, r, o, a);
1509
+ return a || (a = new Yn()), i || mg(e) ? dg(e, t, n, r, o, a) : pg(e, t, c, n, r, o, a);
1510
1510
  if (!(n & wg)) {
1511
1511
  var h = p && Ro.call(e, "__wrapped__"), v = u && Ro.call(t, "__wrapped__");
1512
1512
  if (h || v) {
1513
1513
  var g = h ? e.value() : e, b = v ? t.value() : t;
1514
- return a || (a = new qn()), o(g, b, n, r, a);
1514
+ return a || (a = new Yn()), o(g, b, n, r, a);
1515
1515
  }
1516
1516
  }
1517
- return m ? (a || (a = new qn()), ug(e, t, n, r, o, a)) : !1;
1517
+ return m ? (a || (a = new Yn()), ug(e, t, n, r, o, a)) : !1;
1518
1518
  }
1519
1519
  var vg = gg, fg = vg, $o = wt;
1520
1520
  function gs(e, t, n, r, o) {
@@ -1550,7 +1550,7 @@ var xg = Sg, Cg = Bt;
1550
1550
  function Eg(e) {
1551
1551
  return e === e && !Cg(e);
1552
1552
  }
1553
- var fs = Eg, Ig = fs, Ng = kr;
1553
+ var fs = Eg, Ig = fs, Ng = Dr;
1554
1554
  function _g(e) {
1555
1555
  for (var t = Ng(e), n = t.length; n--; ) {
1556
1556
  var r = t[n], o = e[r];
@@ -1582,8 +1582,8 @@ function Vg(e, t) {
1582
1582
  var n = typeof e;
1583
1583
  return n == "number" || n == "symbol" || n == "boolean" || e == null || Ug(e) ? !0 : Hg.test(e) || !Gg.test(e) || t != null && e in Object(t);
1584
1584
  }
1585
- var Dr = Vg, ys = _r, jg = "Expected a function";
1586
- function Rr(e, t) {
1585
+ var Rr = Vg, ys = Lr, jg = "Expected a function";
1586
+ function $r(e, t) {
1587
1587
  if (typeof e != "function" || t != null && typeof t != "function")
1588
1588
  throw new TypeError(jg);
1589
1589
  var n = function() {
@@ -1593,10 +1593,10 @@ function Rr(e, t) {
1593
1593
  var i = e.apply(this, r);
1594
1594
  return n.cache = a.set(o, i) || a, i;
1595
1595
  };
1596
- return n.cache = new (Rr.Cache || ys)(), n;
1596
+ return n.cache = new ($r.Cache || ys)(), n;
1597
1597
  }
1598
- Rr.Cache = ys;
1599
- var qg = Rr, Yg = qg, Kg = 500;
1598
+ $r.Cache = ys;
1599
+ var qg = $r, Yg = qg, Kg = 500;
1600
1600
  function Qg(e) {
1601
1601
  var t = Yg(e, function(r) {
1602
1602
  return n.size === Kg && n.clear(), r;
@@ -1629,7 +1629,7 @@ var lv = Ts, cv = lv;
1629
1629
  function dv(e) {
1630
1630
  return e == null ? "" : cv(e);
1631
1631
  }
1632
- var pv = dv, uv = Fe, mv = Dr, wv = nv, hv = pv;
1632
+ var pv = dv, uv = Fe, mv = Rr, wv = nv, hv = pv;
1633
1633
  function gv(e, t) {
1634
1634
  return uv(e) ? e : mv(e, t) ? [e] : wv(hv(e));
1635
1635
  }
@@ -1656,7 +1656,7 @@ var xv = Sv;
1656
1656
  function Cv(e, t) {
1657
1657
  return e != null && t in Object(e);
1658
1658
  }
1659
- var Ev = Cv, Iv = As, Nv = ds, _v = Fe, Lv = Pr, Pv = Or, Ov = En;
1659
+ var Ev = Cv, Iv = As, Nv = ds, _v = Fe, Lv = Or, Pv = kr, Ov = En;
1660
1660
  function kv(e, t, n) {
1661
1661
  t = Iv(t, e);
1662
1662
  for (var r = -1, o = t.length, a = !1; ++r < o; ) {
@@ -1671,7 +1671,7 @@ var Dv = kv, Rv = Ev, $v = Dv;
1671
1671
  function Bv(e, t) {
1672
1672
  return e != null && $v(e, t, Rv);
1673
1673
  }
1674
- var Mv = Bv, Fv = vs, Wv = xv, zv = Mv, Uv = Dr, Gv = fs, Hv = bs, Vv = En, jv = 1, qv = 2;
1674
+ var Mv = Bv, Fv = vs, Wv = xv, zv = Mv, Uv = Rr, Gv = fs, Hv = bs, Vv = En, jv = 1, qv = 2;
1675
1675
  function Yv(e, t) {
1676
1676
  return Uv(e) && Gv(t) ? Hv(Vv(e), t) : function(n) {
1677
1677
  var r = Wv(n, e);
@@ -1694,7 +1694,7 @@ function tf(e) {
1694
1694
  return ef(t, e);
1695
1695
  };
1696
1696
  }
1697
- var nf = tf, rf = Jv, of = nf, af = Dr, sf = En;
1697
+ var nf = tf, rf = Jv, of = nf, af = Rr, sf = En;
1698
1698
  function lf(e) {
1699
1699
  return af(e) ? rf(sf(e)) : of(e);
1700
1700
  }
@@ -1713,7 +1713,7 @@ function gf(e) {
1713
1713
  return t;
1714
1714
  };
1715
1715
  }
1716
- var vf = gf, ff = vf, bf = ff(), yf = bf, Tf = yf, Af = kr;
1716
+ var vf = gf, ff = vf, bf = ff(), yf = bf, Tf = yf, Af = Dr;
1717
1717
  function Sf(e, t) {
1718
1718
  return e && Tf(e, t, Af);
1719
1719
  }
@@ -1772,7 +1772,7 @@ class Mt extends Dc {
1772
1772
  }
1773
1773
  }
1774
1774
  const Uf = async () => {
1775
- }, Yn = (e) => {
1775
+ }, Kn = (e) => {
1776
1776
  const t = e[e.length - 1], n = typeof t == "object" && t !== null && ("value" in t || "gas" in t), r = n ? t : {}, o = n ? e.slice(0, -1) : e;
1777
1777
  return { transactionOverrides: r, argumentsWithoutOverrides: o };
1778
1778
  }, Ce = ({
@@ -1781,14 +1781,14 @@ const Uf = async () => {
1781
1781
  contractId: n,
1782
1782
  onSettled: r
1783
1783
  }) => {
1784
- const { account: o } = B(), { chainId: a, supportedChainId: i } = Ke(), l = La({ chainId: a }), c = gr({ chainId: a }), d = hc(n), p = t ?? K(n, a ?? i), u = td(), [{ isForceSendEnabled: m, forceSendGas: h }] = X(), { writeContract: v } = oc({
1784
+ const { account: o } = B(), { chainId: a, supportedChainId: i } = Ke(), l = La({ chainId: a }), c = vr({ chainId: a }), d = hc(n), p = t ?? K(n, a ?? i), u = td(), [{ isForceSendEnabled: m, forceSendGas: h }] = X(), { writeContract: v } = oc({
1785
1785
  mutation: {
1786
1786
  onSettled: r
1787
1787
  }
1788
1788
  }), g = f(
1789
1789
  async (...x) => {
1790
1790
  try {
1791
- const { argumentsWithoutOverrides: E, transactionOverrides: D } = Yn(x), V = await c?.estimateContractGas({
1791
+ const { argumentsWithoutOverrides: E, transactionOverrides: D } = Kn(x), V = await c?.estimateContractGas({
1792
1792
  address: p,
1793
1793
  abi: d,
1794
1794
  functionName: e,
@@ -1827,7 +1827,7 @@ const Uf = async () => {
1827
1827
  return { data: null, error: ao };
1828
1828
  if (!c)
1829
1829
  return { data: null, error: "Client is not defined" };
1830
- const { argumentsWithoutOverrides: E, transactionOverrides: D } = Yn(x), V = lc({
1830
+ const { argumentsWithoutOverrides: E, transactionOverrides: D } = Kn(x), V = lc({
1831
1831
  abi: d,
1832
1832
  functionName: e,
1833
1833
  args: E
@@ -1860,7 +1860,7 @@ const Uf = async () => {
1860
1860
  ]
1861
1861
  ), T = f(
1862
1862
  async (...x) => {
1863
- const { argumentsWithoutOverrides: E, transactionOverrides: D } = Yn(x);
1863
+ const { argumentsWithoutOverrides: E, transactionOverrides: D } = Kn(x);
1864
1864
  if (D.gas)
1865
1865
  return v({
1866
1866
  address: p,
@@ -1950,7 +1950,7 @@ const Uf = async () => {
1950
1950
  ...e?.query,
1951
1951
  staleTime: 3e4
1952
1952
  }
1953
- }), $r = (e) => {
1953
+ }), Br = (e) => {
1954
1954
  _(() => {
1955
1955
  e && e.forEach(({ error: t, status: n }) => {
1956
1956
  n === "failure" && console.warn(t?.message);
@@ -1983,7 +1983,7 @@ const Uf = async () => {
1983
1983
  chainId: a,
1984
1984
  refetchInterval: i
1985
1985
  }) => {
1986
- const l = gr({ chainId: a });
1986
+ const l = vr({ chainId: a });
1987
1987
  return wn({
1988
1988
  queryKey: [{ functionName: t, address: n, args: o, chainId: a }],
1989
1989
  queryFn: async ({ queryKey: [c] }) => {
@@ -1999,11 +1999,11 @@ const Uf = async () => {
1999
1999
  enabled: !e && !!a && !Y(n) && !!t,
2000
2000
  refetchInterval: i
2001
2001
  });
2002
- }, dr = ({
2002
+ }, pr = ({
2003
2003
  queryKey: e,
2004
2004
  watch: t = !0
2005
2005
  }) => {
2006
- const n = Tr(), { data: r } = sc({
2006
+ const n = Ar(), { data: r } = sc({
2007
2007
  query: {
2008
2008
  refetchInterval: je
2009
2009
  }
@@ -2011,7 +2011,7 @@ const Uf = async () => {
2011
2011
  _(() => {
2012
2012
  t && n.refetchQueries({ queryKey: e, stale: !0 });
2013
2013
  }, [t, r]);
2014
- }, Br = "limitOrders", Ns = "getAllLimitOrderIds", Mr = 0, _s = "100", Hf = 1, Vf = 5, jf = 2, qf = [
2014
+ }, Mr = "limitOrders", Ns = "getAllLimitOrderIds", Fr = 0, _s = "100", Hf = 1, Vf = 5, jf = 2, qf = [
2015
2015
  "balanceOf",
2016
2016
  "getFundSummary",
2017
2017
  "getFundComposition",
@@ -2023,14 +2023,14 @@ const Uf = async () => {
2023
2023
  "tokenPrice",
2024
2024
  "limitOrders",
2025
2025
  "calculateAvailableManagerFee",
2026
- Br,
2026
+ Mr,
2027
2027
  Ns
2028
2028
  ], Yf = ["allowance"], Wo = (e, t) => e[0] === "readContract" ? t.includes(
2029
2029
  e?.[1]?.functionName ?? ""
2030
2030
  ) : e[0] === "readContracts" ? !!e[1]?.contracts?.some(
2031
2031
  ({ functionName: r }) => t.includes(r ?? "")
2032
2032
  ) : !1, In = () => {
2033
- const e = Tr(), t = f(() => {
2033
+ const e = Ar(), t = f(() => {
2034
2034
  e.invalidateQueries({
2035
2035
  predicate: ({ queryKey: r }) => Wo(r, Yf)
2036
2036
  });
@@ -2053,7 +2053,7 @@ function Qf(e) {
2053
2053
  const n = e.toLowerCase();
2054
2054
  return n.includes("bear") ? "torosbear" : n.includes("bull") ? "torosbull" : n;
2055
2055
  }
2056
- const Fr = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/main/icons/${Qf(
2056
+ const Wr = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/main/icons/${Qf(
2057
2057
  e
2058
2058
  )}.png` : "", Ls = {
2059
2059
  isGeoBlocked: !1,
@@ -2096,7 +2096,7 @@ const Fr = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
2096
2096
  iconPath: ""
2097
2097
  }
2098
2098
  },
2099
- getFallbackIconPath: Fr,
2099
+ getFallbackIconPath: Wr,
2100
2100
  minLimitOrderValue: 0,
2101
2101
  limitOrderThemeConfig: {}
2102
2102
  }, Xf = () => {
@@ -2142,10 +2142,10 @@ const Fr = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
2142
2142
  if (!e)
2143
2143
  throw new Error("ConfigContext is used out of Provider");
2144
2144
  return e;
2145
- }, j = () => Os().params, Wr = () => Os().actions, zr = () => {
2145
+ }, j = () => Os().params, zr = () => Os().actions, Ur = () => {
2146
2146
  const { defaultWithdrawSlippage: e } = j(), { chainId: t } = y();
2147
2147
  return Oa(e) ? e : e[t] ?? ga;
2148
- }, Ur = () => {
2148
+ }, Gr = () => {
2149
2149
  const { defaultSwapTransactionSlippage: e } = j(), { chainId: t } = y();
2150
2150
  return Oa(e) ? e : e[t] ?? ha;
2151
2151
  }, eb = ({
@@ -2359,7 +2359,7 @@ const Fr = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
2359
2359
  /* @__PURE__ */ s(It, { className: "dtw-h-5 dtw-w-5" }),
2360
2360
  /* @__PURE__ */ s("div", { className: "dtw-py-1 dtw-text-xs", children: t })
2361
2361
  ] }),
2362
- /* @__PURE__ */ s(Ar, { text: t, children: /* @__PURE__ */ s(n, { disabled: !0, children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-justify-center dtw-gap-2", children: [
2362
+ /* @__PURE__ */ s(Sr, { text: t, children: /* @__PURE__ */ s(n, { disabled: !0, children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-justify-center dtw-gap-2", children: [
2363
2363
  /* @__PURE__ */ s(Sl, { className: "dtw-h-5" }),
2364
2364
  /* @__PURE__ */ s("span", { children: e })
2365
2365
  ] }) }) })
@@ -2480,7 +2480,7 @@ const Fr = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
2480
2480
  address: t,
2481
2481
  watch: n = !1
2482
2482
  }) => {
2483
- const { account: r } = B(), o = y(), a = vr(e, o.chainId), { data: i } = Gf({
2483
+ const { account: r } = B(), o = y(), a = fr(e, o.chainId), { data: i } = Gf({
2484
2484
  chainId: o.chainId,
2485
2485
  query: {
2486
2486
  enabled: a
@@ -2511,10 +2511,10 @@ const Fr = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
2511
2511
  enabled: !a && !!r
2512
2512
  }
2513
2513
  });
2514
- return dr({
2514
+ return pr({
2515
2515
  watch: n && a,
2516
2516
  queryKey: c
2517
- }), dr({
2517
+ }), pr({
2518
2518
  watch: n && !a,
2519
2519
  queryKey: p
2520
2520
  }), a ? gc({
@@ -2695,7 +2695,7 @@ function vb(e, t, n) {
2695
2695
  a[r] = e[r + t];
2696
2696
  return a;
2697
2697
  }
2698
- var fb = vb, bb = Ir, yb = ms, Tb = Pr, Ab = Bt;
2698
+ var fb = vb, bb = Nr, yb = ms, Tb = Or, Ab = Bt;
2699
2699
  function Sb(e, t, n) {
2700
2700
  if (!Ab(n))
2701
2701
  return !1;
@@ -2896,7 +2896,7 @@ const Fs = /* @__PURE__ */ bn(Jb), Ws = ({
2896
2896
  staleTime: 1 / 0
2897
2897
  }
2898
2898
  });
2899
- return $r(d), L(() => {
2899
+ return Br(d), L(() => {
2900
2900
  if (!o?.length)
2901
2901
  return [];
2902
2902
  const p = Fs(d, 2);
@@ -2996,7 +2996,7 @@ const Fs = /* @__PURE__ */ bn(Jb), Ws = ({
2996
2996
  return n(
2997
2997
  BigInt(o?.tokenPrice ?? r?.tokenPrice ?? "0")
2998
2998
  );
2999
- }, Gr = ({ address: e, chainId: t }) => {
2999
+ }, Hr = ({ address: e, chainId: t }) => {
3000
3000
  const [n] = st(), r = J(n.address, e) ? n : null, {
3001
3001
  data: {
3002
3002
  performanceFee: o,
@@ -3047,7 +3047,7 @@ const Fs = /* @__PURE__ */ bn(Jb), Ws = ({
3047
3047
  address: e,
3048
3048
  chainId: t
3049
3049
  });
3050
- dr({ queryKey: n });
3050
+ pr({ queryKey: n });
3051
3051
  }, Xt = Ua.id, py = (e) => {
3052
3052
  const t = K(
3053
3053
  "flatcoinPointsModule",
@@ -3057,21 +3057,21 @@ const Fs = /* @__PURE__ */ bn(Jb), Ws = ({
3057
3057
  {
3058
3058
  address: t,
3059
3059
  chainId: Xt,
3060
- abi: Fn,
3060
+ abi: Wn,
3061
3061
  functionName: "lockedBalance",
3062
3062
  args: [e]
3063
3063
  },
3064
3064
  {
3065
3065
  address: t,
3066
3066
  chainId: Xt,
3067
- abi: Fn,
3067
+ abi: Wn,
3068
3068
  functionName: "getUnlockTax",
3069
3069
  args: [e]
3070
3070
  },
3071
3071
  {
3072
3072
  address: t,
3073
3073
  chainId: Xt,
3074
- abi: Fn,
3074
+ abi: Wn,
3075
3075
  functionName: "unlockTime",
3076
3076
  args: [e]
3077
3077
  }
@@ -3126,7 +3126,7 @@ const Fs = /* @__PURE__ */ bn(Jb), Ws = ({
3126
3126
  if (e <= t)
3127
3127
  return n;
3128
3128
  return Gl;
3129
- }, Kn = (e) => Number(e?.toString() ?? "0") * 1e3, gy = ({
3129
+ }, Qn = (e) => Number(e?.toString() ?? "0") * 1e3, gy = ({
3130
3130
  address: e,
3131
3131
  chainId: t
3132
3132
  }) => {
@@ -3139,9 +3139,9 @@ const Fs = /* @__PURE__ */ bn(Jb), Ws = ({
3139
3139
  args: [n ?? I],
3140
3140
  query: {
3141
3141
  enabled: !!n,
3142
- select: Kn,
3143
- refetchInterval: (r) => hy(Kn(r.state?.data)),
3144
- refetchOnWindowFocus: (r) => Kn(r.state?.data) > 0
3142
+ select: Qn,
3143
+ refetchInterval: (r) => hy(Qn(r.state?.data)),
3144
+ refetchOnWindowFocus: (r) => Qn(r.state?.data) > 0
3145
3145
  }
3146
3146
  });
3147
3147
  };
@@ -3162,7 +3162,7 @@ function vy(e, t, n) {
3162
3162
  }
3163
3163
  const Gs = (e, t) => fc(e) ? {
3164
3164
  rawBalance: e?.toString() ?? "",
3165
- ...vy(Ae(e, or), t?.toString())
3165
+ ...vy(Ae(e, ar), t?.toString())
3166
3166
  } : {
3167
3167
  rawBalance: "",
3168
3168
  balanceInUsd: "",
@@ -3293,7 +3293,7 @@ const Gs = (e, t) => fc(e) ? {
3293
3293
  p,
3294
3294
  u
3295
3295
  ]);
3296
- }, Hr = () => {
3296
+ }, Vr = () => {
3297
3297
  const { depositQuoteDiffErrorThreshold: e } = j(), [t, n] = F(!1), [{ slippage: r, minSlippage: o }] = X(), a = r === "auto" ? o ?? 0 : r, l = !_n() && a > e && !t, c = f(() => {
3298
3298
  n(!0);
3299
3299
  }, []);
@@ -3312,9 +3312,9 @@ const Ny = /* @__PURE__ */ bn(Iy), Hs = ({
3312
3312
  slippage: t,
3313
3313
  minSlippage: n
3314
3314
  }) => {
3315
- const r = zr();
3315
+ const r = Ur();
3316
3316
  return t !== "auto" ? t.toString() : Ny(n) ? n.toString() : e === "deposit" ? ba.toString() : r.toString();
3317
- }, _y = async (e, t = Fr) => {
3317
+ }, _y = async (e, t = Wr) => {
3318
3318
  try {
3319
3319
  return (await import(`@dhedge/crypto-assets/icons/${e.toLowerCase()}.png`))?.default?.src ?? t(e);
3320
3320
  } catch {
@@ -3423,7 +3423,7 @@ const Ny = /* @__PURE__ */ bn(Iy), Hs = ({
3423
3423
  }));
3424
3424
  }, [t, n, e]);
3425
3425
  return { displayLimitSellOverlay: n, openLimitSellOverlay: r };
3426
- }, Vr = "0x000000000022D473030F116dDEE9F6B43aC78BA3", Ry = 100, $y = 28, By = 1, My = 500, Xs = 2, Fy = 1, Wy = 5, zy = 2, Zs = {
3426
+ }, jr = "0x000000000022D473030F116dDEE9F6B43aC78BA3", Ry = 100, $y = 28, By = 1, My = 500, Xs = 2, Fy = 1, Wy = 5, zy = 2, Zs = {
3427
3427
  [hn.id]: "0x40F2978D87348250F085ACEbd680B387842a69eF"
3428
3428
  }, Uy = {
3429
3429
  PermitWitnessTransferFrom: [
@@ -3475,7 +3475,7 @@ const Ny = /* @__PURE__ */ bn(Iy), Hs = ({
3475
3475
  status: t,
3476
3476
  statusLabel: n[t]
3477
3477
  };
3478
- }, jr = (e) => {
3478
+ }, qr = (e) => {
3479
3479
  const t = S(), { status: n } = Js();
3480
3480
  if (!(!e || n === "Success"))
3481
3481
  return n === "Mining" ? t.miningTx : t.sendingOrderToWallet;
@@ -3612,7 +3612,7 @@ const Ny = /* @__PURE__ */ bn(Iy), Hs = ({
3612
3612
  ),
3613
3613
  children: t
3614
3614
  }
3615
- ), Qn = (e, t = !1) => {
3615
+ ), Xn = (e, t = !1) => {
3616
3616
  if (!e) return "";
3617
3617
  let n = "";
3618
3618
  t && e.startsWith("-") && (n = "-", e = e.slice(1));
@@ -3620,7 +3620,7 @@ const Ny = /* @__PURE__ */ bn(Iy), Hs = ({
3620
3620
  if (!a) return o ? `${n}0.${o}` : n;
3621
3621
  const i = new Intl.NumberFormat().format(Number(a));
3622
3622
  return o !== void 0 ? `${n}${i}.${o.replace(/[^\d]/g, "")}` : `${n}${i}`;
3623
- }, Xn = (e) => e.replace(/,/g, ""), Yy = Cl(
3623
+ }, Zn = (e) => e.replace(/,/g, ""), Yy = Cl(
3624
3624
  ({
3625
3625
  value: e,
3626
3626
  onChange: t,
@@ -3631,15 +3631,15 @@ const Ny = /* @__PURE__ */ bn(Iy), Hs = ({
3631
3631
  const i = (c) => {
3632
3632
  const p = c.target.value.replace(r ? /[^0-9.-]/g : /[^0-9.]/g, "").replace(/^(-?\d*\.\d*).*$/, "$1").replace(/^(-?\.)(.*)/, "$1$2");
3633
3633
  if (n)
3634
- t?.(p, Xn(p));
3634
+ t?.(p, Zn(p));
3635
3635
  else {
3636
- const u = Qn(p, r);
3637
- t?.(u, Xn(u));
3636
+ const u = Xn(p, r);
3637
+ t?.(u, Zn(u));
3638
3638
  }
3639
3639
  }, l = () => {
3640
3640
  if (!n) return;
3641
- const c = Qn(e, r);
3642
- t?.(c, Xn(c));
3641
+ const c = Xn(e, r);
3642
+ t?.(c, Zn(c));
3643
3643
  };
3644
3644
  return /* @__PURE__ */ s(
3645
3645
  "input",
@@ -3648,7 +3648,7 @@ const Ny = /* @__PURE__ */ bn(Iy), Hs = ({
3648
3648
  ref: a,
3649
3649
  type: "text",
3650
3650
  inputMode: "decimal",
3651
- value: Qn(e, r),
3651
+ value: Xn(e, r),
3652
3652
  onChange: i,
3653
3653
  onBlur: l
3654
3654
  }
@@ -3855,7 +3855,7 @@ const Zy = () => {
3855
3855
  refetchInterval: n
3856
3856
  }
3857
3857
  });
3858
- return $r(a), a?.[0]?.result;
3858
+ return Br(a), a?.[0]?.result;
3859
3859
  }, le = ({
3860
3860
  address: e,
3861
3861
  chainId: t,
@@ -3904,7 +3904,7 @@ const tT = () => {
3904
3904
  }, Xe = () => {
3905
3905
  const e = !Ye(), [{ symbol: t }] = M(), [{ isMultiAssetWithdrawalEnabled: n }] = X();
3906
3906
  return e && n && t === Te.symbol;
3907
- }, qr = ({
3907
+ }, Yr = ({
3908
3908
  onErrorCallback: e
3909
3909
  } = {}) => {
3910
3910
  const { account: t } = B(), { chainId: n } = y(), r = Xe(), [o] = O(), a = new N(o.value || "0").shiftedBy(o.decimals).toFixed(0, N.ROUND_UP), i = K("easySwapperV2", n), { canSpend: l, isFetching: c } = si({
@@ -3925,7 +3925,7 @@ const tT = () => {
3925
3925
  address: e,
3926
3926
  chainId: t
3927
3927
  }) => {
3928
- const n = gr({ chainId: t }), { data: { aaveAssetGuardAddress: r = I } = {} } = Pn({
3928
+ const n = vr({ chainId: t }), { data: { aaveAssetGuardAddress: r = I } = {} } = Pn({
3929
3929
  address: e,
3930
3930
  chainId: t
3931
3931
  });
@@ -3940,7 +3940,7 @@ const tT = () => {
3940
3940
  args: [
3941
3941
  e,
3942
3942
  o,
3943
- fr(a)
3943
+ br(a)
3944
3944
  ],
3945
3945
  publicClient: n
3946
3946
  }),
@@ -3977,7 +3977,7 @@ const tT = () => {
3977
3977
  signal: n,
3978
3978
  buildKey: yc
3979
3979
  }), aT = (e, t) => {
3980
- const n = Cr(), { effectiveSelectedAggregators: r } = gn();
3980
+ const n = Er(), { effectiveSelectedAggregators: r } = gn();
3981
3981
  return wn({
3982
3982
  queryKey: ["getSwapsQuotes", e, r],
3983
3983
  queryFn: async ({ signal: o, queryKey: [, a] }) => await ni({
@@ -3991,7 +3991,7 @@ const tT = () => {
3991
3991
  }, sT = new AbortController(), iT = sT.signal, lT = ({
3992
3992
  chainId: e
3993
3993
  }) => {
3994
- const { account: t = I } = B(), n = Cr();
3994
+ const { account: t = I } = B(), n = Er();
3995
3995
  return f(
3996
3996
  async ({
3997
3997
  swapParams: r,
@@ -4032,11 +4032,11 @@ const tT = () => {
4032
4032
  estimate: d,
4033
4033
  transactionArgs: p
4034
4034
  }) => {
4035
- const u = fr(l), m = c ? br({ maxSlippage: l }) : [];
4035
+ const u = br(l), m = c ? yr({ maxSlippage: l }) : [];
4036
4036
  if (!r?.some(
4037
4037
  (x) => J(x, n)
4038
4038
  ))
4039
- return Wn(
4039
+ return zn(
4040
4040
  r,
4041
4041
  u
4042
4042
  );
@@ -4056,7 +4056,7 @@ const tT = () => {
4056
4056
  v,
4057
4057
  d,
4058
4058
  p
4059
- ) ?? Wn(r, u);
4059
+ ) ?? zn(r, u);
4060
4060
  const g = await v(l), b = Ac(
4061
4061
  g
4062
4062
  );
@@ -4066,7 +4066,7 @@ const tT = () => {
4066
4066
  u,
4067
4067
  d,
4068
4068
  p
4069
- ) ?? Wn(r, u);
4069
+ ) ?? zn(r, u);
4070
4070
  },
4071
4071
  [
4072
4072
  n,
@@ -4076,7 +4076,7 @@ const tT = () => {
4076
4076
  ]
4077
4077
  );
4078
4078
  }, vt = () => {
4079
- const e = zr(), [{ slippage: t }] = X();
4079
+ const e = Ur(), [{ slippage: t }] = X();
4080
4080
  return t === "auto" ? e : t;
4081
4081
  };
4082
4082
  function Vo(e, t, n) {
@@ -4139,7 +4139,7 @@ const ri = (e, t) => {
4139
4139
  e ?? 0
4140
4140
  );
4141
4141
  return L(() => {
4142
- const l = fr(o), c = ka(i), d = (a ?? []).map((p) => ({
4142
+ const l = br(o), c = ka(i), d = (a ?? []).map((p) => ({
4143
4143
  supportedAsset: p,
4144
4144
  withdrawData: "",
4145
4145
  slippageTolerance: l
@@ -4206,7 +4206,7 @@ const ri = (e, t) => {
4206
4206
  }
4207
4207
  });
4208
4208
  }, wT = (e) => typeof e[0] == "string" && typeof e[1] == "bigint" && Array.isArray(e[2]), hT = () => {
4209
- const e = y(), t = _n(), { canSpend: n } = qr(), r = pT({
4209
+ const e = y(), t = _n(), { canSpend: n } = Yr(), r = pT({
4210
4210
  debounceTime: Aa
4211
4211
  }), o = wT(r) && r[1] !== BigInt(0) && !t && n, { data: a } = ic({
4212
4212
  abi: Ve,
@@ -4221,7 +4221,7 @@ const ri = (e, t) => {
4221
4221
  assets: a?.result[0] ?? [],
4222
4222
  chainId: e.chainId
4223
4223
  });
4224
- }, Yr = () => {
4224
+ }, Kr = () => {
4225
4225
  const [e] = M(), {
4226
4226
  data: t = [],
4227
4227
  isFetching: n,
@@ -4236,7 +4236,7 @@ const ri = (e, t) => {
4236
4236
  }, gT = ({
4237
4237
  onErrorCallback: e
4238
4238
  } = {}) => {
4239
- const t = y(), n = Xe(), { isUnrollAndClaimTransaction: r } = Yr(), o = dT(), a = ue()[1], i = n ? "multi_withdraw" : r ? "single_withdraw_and_claim" : "single_withdraw", l = gt({ action: i, onErrorCallback: e }), c = n ? Vl : r ? jl : Ta, { send: d, estimate: p } = Ce({
4239
+ const t = y(), n = Xe(), { isUnrollAndClaimTransaction: r } = Kr(), o = dT(), a = ue()[1], i = n ? "multi_withdraw" : r ? "single_withdraw_and_claim" : "single_withdraw", l = gt({ action: i, onErrorCallback: e }), c = n ? Vl : r ? jl : Ta, { send: d, estimate: p } = Ce({
4240
4240
  contractId: n ? "poolLogic" : "easySwapperV2",
4241
4241
  dynamicContractAddress: n ? t.address : void 0,
4242
4242
  functionName: c,
@@ -4263,11 +4263,11 @@ const ri = (e, t) => {
4263
4263
  ]),
4264
4264
  action: i
4265
4265
  };
4266
- }, Kr = ({
4266
+ }, Qr = ({
4267
4267
  trade: e,
4268
4268
  onErrorCallback: t
4269
4269
  }) => {
4270
- const n = S(), r = ae(), { account: o } = B(), a = y(), [i] = O(), [l] = M(), [c] = xe(), d = Q()[1], p = ue()[1], u = xr(), m = Xe(), { isUnrollAndClaimTransaction: h } = Yr(), v = ge({
4270
+ const n = S(), r = ae(), { account: o } = B(), a = y(), [i] = O(), [l] = M(), [c] = xe(), d = Q()[1], p = ue()[1], u = Cr(), m = Xe(), { isUnrollAndClaimTransaction: h } = Kr(), v = ge({
4271
4271
  symbol: i.symbol,
4272
4272
  address: i.address
4273
4273
  }), g = c === "deposit", b = Jy(), T = g ? "deposit" : m ? "multi_withdraw" : h ? "single_withdraw_and_claim" : "single_withdraw", x = async () => {
@@ -4329,9 +4329,9 @@ const ri = (e, t) => {
4329
4329
  };
4330
4330
  const o = e * t / 100 / n;
4331
4331
  return {
4332
- yearlyEarnings: zn({ value: o, currency: r }),
4333
- dailyEarnings: zn({ value: o / 365, currency: r }),
4334
- monthlyEarnings: zn({ value: o / 12, currency: r })
4332
+ yearlyEarnings: Un({ value: o, currency: r }),
4333
+ dailyEarnings: Un({ value: o / 365, currency: r }),
4334
+ monthlyEarnings: Un({ value: o / 12, currency: r })
4335
4335
  };
4336
4336
  }, yT = ({
4337
4337
  currency: e,
@@ -4376,7 +4376,7 @@ const ri = (e, t) => {
4376
4376
  showEarnings: !1
4377
4377
  };
4378
4378
  }, AT = (e) => e.chainId ? e.sourceAddress ? e.destinationAddress ? !e.amount || e.amount === "0" || e.amount === "NaN" ? { isValid: !1, error: "Missing required parameter: amount or amount must be greater than 0" } : e.slippage ? { isValid: !0 } : { isValid: !1, error: "Missing required parameter: slippage" } : { isValid: !1, error: "Missing required parameter: destinationAddress" } : { isValid: !1, error: "Missing required parameter: sourceAddress" } : { isValid: !1, error: "Missing required parameter: chainId" }, ST = (e, t) => {
4379
- const { effectiveSelectedAggregators: n } = gn(), r = Cr(), { isValid: o } = AT({
4379
+ const { effectiveSelectedAggregators: n } = gn(), r = Er(), { isValid: o } = AT({
4380
4380
  chainId: String(e.chainId),
4381
4381
  sourceAddress: e.sourceAddress,
4382
4382
  destinationAddress: e.destinationAddress,
@@ -4575,15 +4575,15 @@ const ri = (e, t) => {
4575
4575
  }) => {
4576
4576
  const [a, i] = Vo(
4577
4577
  "localStorage",
4578
- Un.REFERRER,
4578
+ Gn.REFERRER,
4579
4579
  ""
4580
4580
  ), [l, c] = Vo(
4581
4581
  "localStorage",
4582
- Un.REF_POOL,
4582
+ Gn.REF_POOL,
4583
4583
  ""
4584
4584
  ), d = n[NT];
4585
4585
  _(() => {
4586
- !d || typeof d != "string" || Y(e) || localStorage.getItem(Un.REFERRER) || (i(d), c(e), r?.());
4586
+ !d || typeof d != "string" || Y(e) || localStorage.getItem(Gn.REFERRER) || (i(d), c(e), r?.());
4587
4587
  }, [e, d, c, i, r]), _(() => {
4588
4588
  if (!t || !a || l.toLowerCase() !== e.toLowerCase())
4589
4589
  return;
@@ -4642,7 +4642,7 @@ const ri = (e, t) => {
4642
4642
  const a = r.filter(
4643
4643
  ({ isDeposit: c }) => c
4644
4644
  );
4645
- if (vr(e.symbol, t)) {
4645
+ if (fr(e.symbol, t)) {
4646
4646
  const c = a.find(
4647
4647
  ({ tokenName: d }) => Jt[t]?.wrappedNativeTokenName === d
4648
4648
  );
@@ -4674,31 +4674,30 @@ const ri = (e, t) => {
4674
4674
  }, Ut = () => {
4675
4675
  const [e] = O(), { vaultDepositTokenAddress: t } = ft();
4676
4676
  return !J(e.address, t);
4677
- }, Qr = () => {
4678
- const e = Ur(), [{ slippage: t }] = X(), n = Ut();
4677
+ }, $n = () => {
4678
+ const e = Gr(), [{ slippage: t }] = X(), n = Ut();
4679
4679
  return t === "auto" ? n ? e : ba : t;
4680
4680
  }, Gt = () => {
4681
- const { account: e = I } = B(), { chainId: t } = y(), [n] = O(), { debouncedSendTokenValue: r } = Rn(), { vaultDepositTokenAddress: o } = ft(), a = Ut();
4681
+ const { account: e = I } = B(), { chainId: t } = y(), [n] = O(), { debouncedSendTokenValue: r } = Rn(), { vaultDepositTokenAddress: o } = ft(), a = Ut(), i = $n();
4682
4682
  return ST(
4683
4683
  {
4684
4684
  sourceAddress: n.address,
4685
4685
  destinationAddress: o,
4686
4686
  amount: new N(r).shiftedBy(n.decimals).toFixed(0),
4687
4687
  chainId: t,
4688
- slippage: "33",
4689
- // hardcode 33% slippage to get a quote due to api quotes being unrealistically high, actual slippage is handled by buildZapDepositTransactionArguments and useMinVaultTokensReceivedAmount
4688
+ slippage: i.toString(),
4690
4689
  walletAddress: e
4691
4690
  },
4692
4691
  {
4693
4692
  enabled: a && !!r,
4694
- refetchInterval: wr
4693
+ refetchInterval: hr
4695
4694
  }
4696
4695
  );
4697
4696
  }, ci = () => {
4698
4697
  const { defaultNoSwapMinDepositAmountGap: e } = j(), { address: t, chainId: n } = y(), [r] = O(), [o] = M(), { data: { entryFee: a } = {} } = me({ address: t, chainId: n }), i = rt(
4699
4698
  Number(a ?? "0"),
4700
4699
  ye
4701
- ), [{ slippage: l }] = X(), c = l === "auto", d = Qr(), p = Ut(), u = +le({
4700
+ ), [{ slippage: l }] = X(), c = l === "auto", d = $n(), p = Ut(), u = +le({
4702
4701
  address: r.address,
4703
4702
  chainId: n
4704
4703
  }), m = +ve({ address: t, chainId: n });
@@ -4735,7 +4734,7 @@ const ri = (e, t) => {
4735
4734
  sendTokenValue: t
4736
4735
  });
4737
4736
  return n ? r : new N(t || "0").shiftedBy(e.decimals).toFixed(0);
4738
- }, kT = "0x", pr = (e, t, n = [], r) => {
4737
+ }, kT = "0x", ur = (e, t, n = [], r) => {
4739
4738
  const {
4740
4739
  vaultAddress: o,
4741
4740
  vaultDepositTokenAddress: a,
@@ -4801,7 +4800,7 @@ const ri = (e, t) => {
4801
4800
  routerKey: b?.routerKey,
4802
4801
  swapDestinationAmount: u,
4803
4802
  swapSlippage: g
4804
- }), x = pr(
4803
+ }), x = ur(
4805
4804
  l,
4806
4805
  e,
4807
4806
  T,
@@ -4832,7 +4831,7 @@ const ri = (e, t) => {
4832
4831
  swapDestinationAmount: u,
4833
4832
  swapSlippage: r
4834
4833
  });
4835
- v = pr(
4834
+ v = ur(
4836
4835
  l,
4837
4836
  e,
4838
4837
  b,
@@ -4847,7 +4846,7 @@ const ri = (e, t) => {
4847
4846
  depositMethod: e,
4848
4847
  vaultDepositTokenAddress: t
4849
4848
  }) => {
4850
- const { address: n } = y(), [r] = O(), [{ slippage: o }] = X(), a = r.value || "0", i = new N(a).shiftedBy(r.decimals).toFixed(0), l = di(), { data: c } = Gt(), d = ci(), p = Qr(), { referralData: u } = LT(), m = o === "auto", h = m ? br({ maxSlippage: p }) : void 0;
4849
+ const { address: n } = y(), [r] = O(), [{ slippage: o }] = X(), a = r.value || "0", i = new N(a).shiftedBy(r.decimals).toFixed(0), l = di(), { data: c } = Gt(), d = ci(), p = $n(), { referralData: u } = LT(), m = o === "auto", h = m ? yr({ maxSlippage: p }) : void 0;
4851
4850
  return f(
4852
4851
  async (v) => {
4853
4852
  const g = {
@@ -4868,7 +4867,7 @@ const ri = (e, t) => {
4868
4867
  sendTokenAddress: r.address,
4869
4868
  depositMethod: e,
4870
4869
  referralData: u
4871
- }) : pr(
4870
+ }) : ur(
4872
4871
  e,
4873
4872
  g,
4874
4873
  void 0,
@@ -4935,7 +4934,7 @@ const ri = (e, t) => {
4935
4934
  spenderAddress: r,
4936
4935
  rawAmountToSpend: o,
4937
4936
  chainId: t,
4938
- skip: vr(n.symbol, t) || o === "0"
4937
+ skip: fr(n.symbol, t) || o === "0"
4939
4938
  });
4940
4939
  return { approve: ai({
4941
4940
  token: n,
@@ -4945,7 +4944,7 @@ const ri = (e, t) => {
4945
4944
  }, zT = () => {
4946
4945
  const [e, t] = F("idle"), n = we(!1), r = f(() => {
4947
4946
  t("idle"), n.current = !1;
4948
- }, []), o = FT({ onDepositSettled: r }), { handleTrade: a } = Kr({
4947
+ }, []), o = FT({ onDepositSettled: r }), { handleTrade: a } = Qr({
4949
4948
  trade: o,
4950
4949
  onErrorCallback: r
4951
4950
  }), { approve: i, canSpend: l } = WT(), { chainId: c } = y(), [{ action: d, status: p }] = Q(), [u] = ue(), m = u.find(
@@ -4961,7 +4960,7 @@ const ri = (e, t) => {
4961
4960
  (async () => {
4962
4961
  if (h && e === "waiting-confirmation" && !n.current) {
4963
4962
  n.current = !0, t("depositing");
4964
- const T = hr[c];
4963
+ const T = gr[c];
4965
4964
  await new Promise((x) => setTimeout(x, T)), await a();
4966
4965
  }
4967
4966
  })();
@@ -5048,7 +5047,7 @@ const ri = (e, t) => {
5048
5047
  }, HT = () => {
5049
5048
  const e = Ye(), [t] = M(), [, n] = X(), { isDebouncing: r } = Rn({
5050
5049
  extendedDebounceTime: !0
5051
- }), o = Qr(), a = pi({ includesEntryFee: !0 });
5050
+ }), o = $n(), a = pi({ includesEntryFee: !0 });
5052
5051
  _(() => {
5053
5052
  if (!e || t.isLoading || r)
5054
5053
  return;
@@ -5099,9 +5098,9 @@ function aA(e, t, n) {
5099
5098
  var sA = aA;
5100
5099
  function iA() {
5101
5100
  }
5102
- var lA = iA, Zn = ws, cA = lA, dA = Lr, pA = 1 / 0, uA = Zn && 1 / dA(new Zn([, -0]))[1] == pA ? function(e) {
5103
- return new Zn(e);
5104
- } : cA, mA = uA, wA = ss, hA = oA, gA = sA, vA = is, fA = mA, bA = Lr, yA = 200;
5101
+ var lA = iA, Jn = ws, cA = lA, dA = Pr, pA = 1 / 0, uA = Jn && 1 / dA(new Jn([, -0]))[1] == pA ? function(e) {
5102
+ return new Jn(e);
5103
+ } : cA, mA = uA, wA = ss, hA = oA, gA = sA, vA = is, fA = mA, bA = Pr, yA = 200;
5105
5104
  function TA(e, t, n) {
5106
5105
  var r = -1, o = hA, a = e.length, i = !0, l = [], c = l;
5107
5106
  if (n)
@@ -5170,7 +5169,7 @@ const IA = /* @__PURE__ */ bn(EA), Ht = ({
5170
5169
  enabled: u
5171
5170
  }
5172
5171
  });
5173
- return $r(m), L(() => {
5172
+ return Br(m), L(() => {
5174
5173
  if (!p)
5175
5174
  return [];
5176
5175
  const h = [];
@@ -5272,11 +5271,11 @@ const IA = /* @__PURE__ */ bn(EA), Ht = ({
5272
5271
  const [{ action: t, status: n }] = Q();
5273
5272
  return t === e && (n === "Wallet" || n === "Mining");
5274
5273
  }, kA = (e) => {
5275
- const t = ae(), { onAcceptTermsOfUse: n } = Wr(), { termsOfUseAccepted: r } = j(), { swapQuoteRefreshTriggered: o } = ne(), a = Er(), i = we(!1), l = o === "deposit", {
5274
+ const t = ae(), { onAcceptTermsOfUse: n } = zr(), { termsOfUseAccepted: r } = j(), { swapQuoteRefreshTriggered: o } = ne(), a = Ir(), i = we(!1), l = o === "deposit", {
5276
5275
  disabled: c,
5277
5276
  label: d,
5278
5277
  handleTrade: p
5279
- } = Kr({ trade: e }), {
5278
+ } = Qr({ trade: e }), {
5280
5279
  isError: u,
5281
5280
  isLoading: m,
5282
5281
  isFetching: h
@@ -5370,7 +5369,7 @@ const IA = /* @__PURE__ */ bn(EA), Ht = ({
5370
5369
  } = y(), [i] = O(), l = _n(), c = le({
5371
5370
  address: i.address,
5372
5371
  chainId: n
5373
- }), { isVaultDepositLocked: d, isAccountWhitelisted: p } = _A(), { requiresHighSlippageConfirm: u, confirmHighSlippage: m, slippageToBeUsed: h } = Hr(), { requiresMinDeposit: v, requiredMinDepositAmount: g } = OA(), T = Number(i.value || "0") * Number(c), x = a !== void 0 && T > a;
5372
+ }), { isVaultDepositLocked: d, isAccountWhitelisted: p } = _A(), { requiresHighSlippageConfirm: u, confirmHighSlippage: m, slippageToBeUsed: h } = Vr(), { requiresMinDeposit: v, requiredMinDepositAmount: g } = OA(), T = Number(i.value || "0") * Number(c), x = a !== void 0 && T > a;
5374
5373
  return {
5375
5374
  requiresMinDeposit: v,
5376
5375
  requiresWhitelist: d && !p,
@@ -5842,7 +5841,7 @@ const qA = (e) => {
5842
5841
  const { formattedBalance: e, symbol: t } = QA();
5843
5842
  return /* @__PURE__ */ s(Rs, { balance: e, symbol: t });
5844
5843
  }, XA = () => {
5845
- const e = Ur(), t = zr(), n = !Ye(), { isCompleteWithdrawStep: r, isFetching: o } = bt(), [a] = M(), [, i] = X(), l = fi();
5844
+ const e = Gr(), t = Ur(), n = !Ye(), { isCompleteWithdrawStep: r, isFetching: o } = bt(), [a] = M(), [, i] = X(), l = fi();
5846
5845
  _(() => {
5847
5846
  if (!(!n || a.isLoading || o)) {
5848
5847
  if (r) {
@@ -5900,7 +5899,7 @@ const qA = (e) => {
5900
5899
  );
5901
5900
  if (!T?.length)
5902
5901
  return console.warn("[Complete Withdraw] No available routers found for swap"), [];
5903
- const x = d ? br({
5902
+ const x = d ? yr({
5904
5903
  maxSlippage: l
5905
5904
  }) : [l];
5906
5905
  for (const E of x)
@@ -5972,7 +5971,7 @@ const qA = (e) => {
5972
5971
  const { data: e = [], isFetching: t } = ie();
5973
5972
  return { isCompleteWithdrawStep: e?.length > 0, isFetching: t };
5974
5973
  }, Ze = () => {
5975
- const e = Ur(), { chainId: t } = y(), { account: n = I } = B(), [{ slippage: r }] = X(), [o] = M(), { data: a = [] } = ie(), i = bi(), l = L(
5974
+ const e = Gr(), { chainId: t } = y(), { account: n = I } = B(), [{ slippage: r }] = X(), [o] = M(), { data: a = [] } = ie(), i = bi(), l = L(
5976
5975
  () => a.filter(({ address: c }) => !J(c, o.address)).map(({ address: c, rawBalance: d }) => ({
5977
5976
  chainId: t,
5978
5977
  sourceAddress: c,
@@ -5992,7 +5991,7 @@ const qA = (e) => {
5992
5991
  );
5993
5992
  return aT(l, {
5994
5993
  enabled: i,
5995
- refetchInterval: wr
5994
+ refetchInterval: hr
5996
5995
  });
5997
5996
  }, eS = () => {
5998
5997
  const [e, t] = M(), { data: n = [] } = ie(), {
@@ -6031,7 +6030,7 @@ const qA = (e) => {
6031
6030
  isClaim: t,
6032
6031
  onErrorCallback: n
6033
6032
  }) => {
6034
- const r = S(), o = ae(), { account: a } = B(), i = y(), [l] = M(), c = Q()[1], d = ue()[1], p = xr(), { data: u } = ie(), { isFetching: m } = Ze(), h = f(async () => {
6033
+ const r = S(), o = ae(), { account: a } = B(), i = y(), [l] = M(), c = Q()[1], d = ue()[1], p = Cr(), { data: u } = ie(), { isFetching: m } = Ze(), h = f(async () => {
6035
6034
  const v = i.chainId, g = (u ?? []).map(
6036
6035
  ({ address: T, decimals: x, symbol: E, balance: D }) => ({
6037
6036
  address: T,
@@ -6292,7 +6291,7 @@ const qA = (e) => {
6292
6291
  )
6293
6292
  ] }) : null;
6294
6293
  }, iS = () => {
6295
- const e = S(), [{ slippage: t, minSlippage: n, isMaxSlippageLoading: r }] = X(), o = t === "auto", a = ci(), [i] = M(), { address: l, chainId: c } = y(), { entryFee: d } = Gr({ address: l, chainId: c }), { minDepositUSD: p } = zs(l, c), u = LA(), m = Ut(), h = p ? re({ value: p, minimumFractionDigits: 0 }) : "", v = Wt(
6294
+ const e = S(), [{ slippage: t, minSlippage: n, isMaxSlippageLoading: r }] = X(), o = t === "auto", a = ci(), [i] = M(), { address: l, chainId: c } = y(), { entryFee: d } = Hr({ address: l, chainId: c }), { minDepositUSD: p } = zs(l, c), u = LA(), m = Ut(), h = p ? re({ value: p, minimumFractionDigits: 0 }) : "", v = Wt(
6296
6295
  o ? n ?? 0 : t
6297
6296
  ), g = Hs({
6298
6297
  tradingType: "deposit",
@@ -6418,7 +6417,7 @@ const qA = (e) => {
6418
6417
  d
6419
6418
  ]);
6420
6419
  return /* @__PURE__ */ s(
6421
- Sr,
6420
+ xr,
6422
6421
  {
6423
6422
  collapseItems: u,
6424
6423
  themeType: a
@@ -6436,7 +6435,7 @@ const qA = (e) => {
6436
6435
  }, dS = () => {
6437
6436
  GT(), HT();
6438
6437
  }, pS = () => {
6439
- const { ActionButton: e = H } = k(), t = S(), { status: n } = Pa(), { onConnect: r } = Wr();
6438
+ const { ActionButton: e = H } = k(), t = S(), { status: n } = Pa(), { onConnect: r } = zr();
6440
6439
  return /* @__PURE__ */ s(
6441
6440
  e,
6442
6441
  {
@@ -6472,12 +6471,12 @@ const qA = (e) => {
6472
6471
  if (!r) return;
6473
6472
  const i = setTimeout(() => {
6474
6473
  o(!1);
6475
- }, wr);
6474
+ }, hr);
6476
6475
  return () => clearTimeout(i);
6477
6476
  }, [r]), { disabled: n || r, tooltipText: t, handleClick: a };
6478
6477
  }, Si = (e) => {
6479
6478
  const { disabled: t, tooltipText: n, handleClick: r } = mS(e);
6480
- return /* @__PURE__ */ s(Ar, { text: n, children: /* @__PURE__ */ s(
6479
+ return /* @__PURE__ */ s(Sr, { text: n, children: /* @__PURE__ */ s(
6481
6480
  rn,
6482
6481
  {
6483
6482
  Icon: Ll,
@@ -6533,7 +6532,7 @@ const qA = (e) => {
6533
6532
  const { ActionButton: n = H } = k(), { openLimitBuyOverlay: r, displayLimitBuyOverlay: o } = Hy();
6534
6533
  return o ? /* @__PURE__ */ s(n, { ...t, onClick: r, children: e }) : null;
6535
6534
  }, Ci = ({ children: e, ...t }) => {
6536
- const { ActionButton: n = H } = k(), { onOpenNotificationsSettings: r } = Wr();
6535
+ const { ActionButton: n = H } = k(), { onOpenNotificationsSettings: r } = zr();
6537
6536
  return r ? /* @__PURE__ */ s(n, { ...t, onClick: r, children: e }) : null;
6538
6537
  }, yS = () => {
6539
6538
  const { address: e, symbol: t } = y();
@@ -6543,7 +6542,7 @@ const qA = (e) => {
6543
6542
  address: e,
6544
6543
  symbol: t,
6545
6544
  decimals: W,
6546
- image: Fr(t)
6545
+ image: Wr(t)
6547
6546
  });
6548
6547
  }, [e, t])
6549
6548
  };
@@ -6559,7 +6558,7 @@ const qA = (e) => {
6559
6558
  }
6560
6559
  );
6561
6560
  }, AS = () => {
6562
- const e = S(), t = ae(), { symbol: n } = y(), [r] = O(), [o] = M(), a = vn()[1], { isCompleteWithdrawStep: i } = bt(), { swapQuoteRefreshTriggered: l } = ne(), c = Er(), { isFetching: d, isError: p } = Ze(), u = we(!1), m = f(() => {
6561
+ const e = S(), t = ae(), { symbol: n } = y(), [r] = O(), [o] = M(), a = vn()[1], { isCompleteWithdrawStep: i } = bt(), { swapQuoteRefreshTriggered: l } = ne(), c = Ir(), { isFetching: d, isError: p } = Ze(), u = we(!1), m = f(() => {
6563
6562
  a({
6564
6563
  sendToken: {
6565
6564
  symbol: n,
@@ -6627,13 +6626,13 @@ const qA = (e) => {
6627
6626
  ].filter(({ value: c }) => c);
6628
6627
  return /* @__PURE__ */ w(P, { children: [
6629
6628
  /* @__PURE__ */ s(G.InputGroup, { children: /* @__PURE__ */ s(oS, {}) }),
6630
- a && /* @__PURE__ */ s(a, {}),
6631
6629
  /* @__PURE__ */ s(cS, { children: i ? l.map(
6632
6630
  ({ Component: c, key: d }) => c && /* @__PURE__ */ s(c, {}, d)
6633
6631
  ) : /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(eo, { children: /* @__PURE__ */ w("div", { className: "tw-flex tw-flex-col tw-gap-2", children: [
6634
6632
  /* @__PURE__ */ s(BA, {}),
6635
6633
  /* @__PURE__ */ s(bS, { highlighted: !1, children: e.limitBuy })
6636
- ] }) }) }) })
6634
+ ] }) }) }) }),
6635
+ a && /* @__PURE__ */ s(a, {})
6637
6636
  ] });
6638
6637
  }, xS = () => /* @__PURE__ */ s(G.Panel, { children: /* @__PURE__ */ s(SS, {}) }), CS = (e) => Object.keys($).some((t) => t === e), ES = ({ children: e }) => {
6639
6638
  const t = Ks();
@@ -6938,10 +6937,10 @@ const qA = (e) => {
6938
6937
  ] }),
6939
6938
  e
6940
6939
  ] });
6941
- }, ur = (e, t) => e.address in t ? {
6940
+ }, mr = (e, t) => e.address in t ? {
6942
6941
  balanceInUsd: t[e.address]?.balanceInUsd ?? re({ value: 0 }),
6943
6942
  balanceInUsdNumber: t[e.address]?.balanceInUsdNumber ?? 0
6944
- } : { balanceInUsd: re({ value: 0 }), balanceInUsdNumber: 0 }, MS = (e) => (t, n) => ur(n, e).balanceInUsdNumber - ur(t, e).balanceInUsdNumber, FS = ({
6943
+ } : { balanceInUsd: re({ value: 0 }), balanceInUsdNumber: 0 }, MS = (e) => (t, n) => mr(n, e).balanceInUsdNumber - mr(t, e).balanceInUsdNumber, FS = ({
6945
6944
  searchQuery: e,
6946
6945
  type: t
6947
6946
  }) => {
@@ -6967,7 +6966,7 @@ const qA = (e) => {
6967
6966
  (h) => h.chainId === m && !h.deprecated
6968
6967
  ).map((h) => ({
6969
6968
  ...h,
6970
- ...ur(h, n),
6969
+ ...mr(h, n),
6971
6970
  isActive: o.address === h.address
6972
6971
  })).filter(
6973
6972
  ({ symbol: h }) => e ? h.toLowerCase().includes(e) : !0
@@ -7402,7 +7401,7 @@ const qA = (e) => {
7402
7401
  isFetched: n,
7403
7402
  onClose: r
7404
7403
  }) => {
7405
- const o = Er(), { invalidateTradingQueries: a } = In();
7404
+ const o = Ir(), { invalidateTradingQueries: a } = In();
7406
7405
  return { handleClick: () => {
7407
7406
  o(e), a(), t(), r?.();
7408
7407
  }, disabled: !n };
@@ -7731,10 +7730,10 @@ const qA = (e) => {
7731
7730
  ] })
7732
7731
  }
7733
7732
  );
7734
- }, Tx = 7, mr = 4, Ko = (e) => {
7733
+ }, Tx = 7, wr = 4, Ko = (e) => {
7735
7734
  if (!e)
7736
7735
  return "";
7737
- const [t = "", n] = e.replace(/,/g, "").split("."), r = n && n.length > mr ? n.slice(0, mr) : n, o = t.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
7736
+ const [t = "", n] = e.replace(/,/g, "").split("."), r = n && n.length > wr ? n.slice(0, wr) : n, o = t.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
7738
7737
  return r !== void 0 ? `${o}.${r}` : o;
7739
7738
  }, Ax = ({
7740
7739
  inputValue: e = "",
@@ -7751,7 +7750,7 @@ const qA = (e) => {
7751
7750
  },
7752
7751
  onInputChange: (c) => {
7753
7752
  const d = c.target.value.replace(/[^\d.]/g, "").replace(/(\..*)\./g, "$1"), [p = "", u = ""] = d.split(".");
7754
- t && p.length <= Tx && u.length <= mr && /^\d*(\.\d*)?$/.test(d) && (o(Ko(d)), t(d));
7753
+ t && p.length <= Tx && u.length <= wr && /^\d*(\.\d*)?$/.test(d) && (o(Ko(d)), t(d));
7755
7754
  }
7756
7755
  };
7757
7756
  }, pn = (e) => {
@@ -7869,7 +7868,7 @@ const Mi = (e) => ({
7869
7868
  address: I,
7870
7869
  symbol: ""
7871
7870
  },
7872
- minAmountInUsd: Mr,
7871
+ minAmountInUsd: Fr,
7873
7872
  form: {
7874
7873
  lowerLimitPrice: "",
7875
7874
  upperLimitPrice: ""
@@ -7934,7 +7933,7 @@ const Mi = (e) => ({
7934
7933
  ]
7935
7934
  );
7936
7935
  return /* @__PURE__ */ s(Wi.Provider, { value: m, children: /* @__PURE__ */ s(Fi.Provider, { value: r, children: e }) });
7937
- }, he = () => de(Fi), yt = () => de(Wi), $n = () => {
7936
+ }, he = () => de(Fi), yt = () => de(Wi), Bn = () => {
7938
7937
  const { account: e } = B(), {
7939
7938
  vaultAddress: t,
7940
7939
  vaultChainId: n,
@@ -7974,10 +7973,10 @@ const Mi = (e) => ({
7974
7973
  }, Cx = ({
7975
7974
  price: e,
7976
7975
  markPrice: t
7977
- }) => new N(e).gt(t) ? `+${yr((+e / +t - 1) * 100, 2)}` : "", Ex = ({
7976
+ }) => new N(e).gt(t) ? `+${Tr((+e / +t - 1) * 100, 2)}` : "", Ex = ({
7978
7977
  price: e,
7979
7978
  markPrice: t
7980
- }) => new N(e).lt(t) ? `-${yr((1 - +e / +t) * 100, 2)}` : "", Ix = ({
7979
+ }) => new N(e).lt(t) ? `-${Tr((1 - +e / +t) * 100, 2)}` : "", Ix = ({
7981
7980
  error: e,
7982
7981
  translationMap: t
7983
7982
  }) => e ? e.title === ec ? {
@@ -7992,7 +7991,7 @@ const Mi = (e) => ({
7992
7991
  address: o.address,
7993
7992
  chainId: a,
7994
7993
  refetchInterval: je
7995
- }), p = Number(d) < Hf ? Vf : jf, { formatted: u, symbol: m } = $n(), h = Cx({
7994
+ }), p = Number(d) < Hf ? Vf : jf, { formatted: u, symbol: m } = Bn(), h = Cx({
7996
7995
  price: t,
7997
7996
  markPrice: d
7998
7997
  }), v = Ex({
@@ -8115,7 +8114,7 @@ const Mi = (e) => ({
8115
8114
  )
8116
8115
  ] }) });
8117
8116
  }, Lx = () => {
8118
- const { account: e = I } = B(), { vaultAddress: t, vaultChainId: n } = he(), r = K("limitOrder", n), o = $n(), { data: a } = fn({
8117
+ const { account: e = I } = B(), { vaultAddress: t, vaultChainId: n } = he(), r = K("limitOrder", n), o = Bn(), { data: a } = fn({
8119
8118
  tokenAddress: t,
8120
8119
  ownerAddress: e,
8121
8120
  spenderAddress: r,
@@ -8164,7 +8163,7 @@ const Mi = (e) => ({
8164
8163
  (async () => {
8165
8164
  if (u && t === "waiting-confirmation" && !a.current) {
8166
8165
  a.current = !0, n("creating");
8167
- const T = hr[d] ?? 1e3;
8166
+ const T = gr[d] ?? 1e3;
8168
8167
  await new Promise((x) => setTimeout(x, T));
8169
8168
  try {
8170
8169
  await e();
@@ -8228,7 +8227,7 @@ const Mi = (e) => ({
8228
8227
  user: r,
8229
8228
  vault: o,
8230
8229
  pricingAsset: a
8231
- }, Bn = ({
8230
+ }, Mn = ({
8232
8231
  chainId: e,
8233
8232
  userAddress: t,
8234
8233
  vaultAddress: n
@@ -8238,7 +8237,7 @@ const Mi = (e) => ({
8238
8237
  address: r,
8239
8238
  abi: Na,
8240
8239
  chainId: e,
8241
- functionName: Br,
8240
+ functionName: Mr,
8242
8241
  args: [xx({ userAddress: t, vaultAddress: n })],
8243
8242
  query: {
8244
8243
  enabled: !Y(r) && !Y(t) && !Y(n),
@@ -8253,7 +8252,7 @@ const Mi = (e) => ({
8253
8252
  vaultChainId: n,
8254
8253
  form: { lowerLimitPrice: r, upperLimitPrice: o },
8255
8254
  pricingAsset: a
8256
- } = he(), i = $n(), { data: l } = Bn({
8255
+ } = he(), i = Bn(), { data: l } = Mn({
8257
8256
  userAddress: e,
8258
8257
  vaultAddress: t,
8259
8258
  chainId: n
@@ -8293,7 +8292,7 @@ const Mi = (e) => ({
8293
8292
  error: v ?? null
8294
8293
  };
8295
8294
  }, Rx = () => {
8296
- const e = Le(), { vaultAddress: t, vaultChainId: n, minAmountInUsd: r } = he(), o = $n(), a = ve({
8295
+ const e = Le(), { vaultAddress: t, vaultChainId: n, minAmountInUsd: r } = he(), o = Bn(), a = ve({
8297
8296
  address: t,
8298
8297
  chainId: n
8299
8298
  }), { createLimitOrder: i, isModifyTransaction: l, error: c } = Hi(), p = new De(o.formatted).multipliedBy(
@@ -8354,7 +8353,7 @@ const Mi = (e) => ({
8354
8353
  )
8355
8354
  ] });
8356
8355
  }, Bx = "remove", Mx = () => {
8357
- const { account: e = I } = B(), { vaultAddress: t, vaultChainId: n, pendingTransaction: r } = he(), { data: o } = Bn({
8356
+ const { account: e = I } = B(), { vaultAddress: t, vaultChainId: n, pendingTransaction: r } = he(), { data: o } = Mn({
8358
8357
  userAddress: e,
8359
8358
  vaultAddress: t,
8360
8359
  chainId: n
@@ -8379,7 +8378,7 @@ const Mi = (e) => ({
8379
8378
  }, Qo = (e) => {
8380
8379
  const t = e?.trim();
8381
8380
  return t ? !isNaN(Number(t)) : !1;
8382
- }, Jn = (e) => {
8381
+ }, er = (e) => {
8383
8382
  const t = e?.trim();
8384
8383
  return t ? !isNaN(Number(t)) && Number(t) > 0 : !1;
8385
8384
  }, Wx = () => {
@@ -8463,18 +8462,18 @@ const Mi = (e) => ({
8463
8462
  vaultAddress: e,
8464
8463
  vaultChainId: t
8465
8464
  }) => {
8466
- const { account: n = I } = B(), { isFetched: r, data: o } = Bn({
8465
+ const { account: n = I } = B(), { isFetched: r, data: o } = Mn({
8467
8466
  vaultAddress: e,
8468
8467
  chainId: t,
8469
8468
  userAddress: n
8470
8469
  }), a = o && o.takeProfitPriceD18 !== Be ? o.takeProfitPrice : "", i = o && o.stopLossPriceD18 !== BigInt(0) ? o.stopLossPrice : "";
8471
8470
  return { isFetched: r, upperLimitPrice: a, lowerLimitPrice: i };
8472
8471
  }, Gx = [
8473
- Br,
8472
+ Mr,
8474
8473
  Ns,
8475
8474
  "allowance"
8476
8475
  ], Hx = () => {
8477
- const e = Tr();
8476
+ const e = Ar();
8478
8477
  return f(() => {
8479
8478
  e.invalidateQueries({
8480
8479
  predicate: ({ queryKey: t }) => {
@@ -8545,7 +8544,7 @@ const Mi = (e) => ({
8545
8544
  AMBER: {
8546
8545
  400: "#AFA58D"
8547
8546
  }
8548
- }, Mn = ({
8547
+ }, Fn = ({
8549
8548
  children: e,
8550
8549
  config: t
8551
8550
  }) => /* @__PURE__ */ s(
@@ -8702,12 +8701,12 @@ const Mi = (e) => ({
8702
8701
  },
8703
8702
  children: e
8704
8703
  }
8705
- ), Vx = ({ themeConfig: e }) => (qi(), /* @__PURE__ */ s(Mn, { config: e, children: /* @__PURE__ */ s(Vi, { hideDeleteButton: !0 }) })), jx = ({
8704
+ ), Vx = ({ themeConfig: e }) => (qi(), /* @__PURE__ */ s(Fn, { config: e, children: /* @__PURE__ */ s(Vi, { hideDeleteButton: !0 }) })), jx = ({
8706
8705
  vaultChainId: e,
8707
8706
  vaultAddress: t,
8708
8707
  pricingAsset: n,
8709
8708
  translation: r,
8710
- minAmountInUsd: o = Mr,
8709
+ minAmountInUsd: o = Fr,
8711
8710
  actions: a,
8712
8711
  themeConfig: i
8713
8712
  }) => {
@@ -9288,7 +9287,7 @@ const Ki = (e) => {
9288
9287
  } = Pe(), { data: o } = fn({
9289
9288
  tokenAddress: t.address,
9290
9289
  ownerAddress: e,
9291
- spenderAddress: Vr,
9290
+ spenderAddress: jr,
9292
9291
  chainId: n,
9293
9292
  skip: Y(t.address)
9294
9293
  }), a = r ? He(r, t.decimals) : "0";
@@ -9304,7 +9303,7 @@ const Ki = (e) => {
9304
9303
  });
9305
9304
  return {
9306
9305
  approvePermit2: async () => {
9307
- Y(e.address) || (n(!0), await a(Vr, Be));
9306
+ Y(e.address) || (n(!0), await a(jr, Be));
9308
9307
  },
9309
9308
  isApproving: t,
9310
9309
  txHash: r
@@ -9331,7 +9330,7 @@ const Ki = (e) => {
9331
9330
  slippageBps: b,
9332
9331
  deadlineDays: T
9333
9332
  }
9334
- } = n, x = BigInt(He(g, m.decimals)), E = !!v, V = BigInt(!!h ? He(h, or) : 0), Z = E ? BigInt(He(v, or)) : Be, oe = iC(), ee = lC(T), We = {
9333
+ } = n, x = BigInt(He(g, m.decimals)), E = !!v, V = BigInt(!!h ? He(h, ar) : 0), Z = E ? BigInt(He(v, ar)) : Be, oe = iC(), ee = lC(T), We = {
9335
9334
  owner: t,
9336
9335
  targetVault: c,
9337
9336
  pricingAsset: u.address,
@@ -9353,7 +9352,7 @@ const Ki = (e) => {
9353
9352
  const fe = {
9354
9353
  name: "Permit2",
9355
9354
  chainId: d,
9356
- verifyingContract: Vr
9355
+ verifyingContract: jr
9357
9356
  }, tt = await e.signTypedData({
9358
9357
  account: t,
9359
9358
  domain: fe,
@@ -9405,7 +9404,7 @@ const Ki = (e) => {
9405
9404
  (async () => {
9406
9405
  if (d && e === "waiting-confirmation" && !n.current) {
9407
9406
  n.current = !0, t("signing");
9408
- const g = hr[c] ?? 1e3;
9407
+ const g = gr[c] ?? 1e3;
9409
9408
  await new Promise((b) => setTimeout(b, g));
9410
9409
  try {
9411
9410
  await l();
@@ -9439,7 +9438,7 @@ const Ki = (e) => {
9439
9438
  }, dC = () => {
9440
9439
  const e = Je(), {
9441
9440
  form: { upperLimitPrice: t, lowerLimitPrice: n, inputAmount: r, slippageBps: o }
9442
- } = Pe(), { approveAndSign: a, isLoading: i, flowState: l, needsApproval: c } = rl(), d = Jn(t) || Jn(n), p = Jn(r), u = Number(o), m = !isNaN(u) && u >= By && u <= My;
9441
+ } = Pe(), { approveAndSign: a, isLoading: i, flowState: l, needsApproval: c } = rl(), d = er(t) || er(n), p = er(r), u = Number(o), m = !isNaN(u) && u >= By && u <= My;
9443
9442
  return {
9444
9443
  handleClick: a,
9445
9444
  disabled: !d || !p || !m,
@@ -9534,7 +9533,7 @@ const Ki = (e) => {
9534
9533
  ] });
9535
9534
  }, wC = ({
9536
9535
  themeConfig: e
9537
- }) => /* @__PURE__ */ s(Mn, { config: e, children: /* @__PURE__ */ s(ol, {}) }), hC = ({
9536
+ }) => /* @__PURE__ */ s(Fn, { config: e, children: /* @__PURE__ */ s(ol, {}) }), hC = ({
9538
9537
  vaultChainId: e,
9539
9538
  vaultAddress: t,
9540
9539
  limitBuyManagerAddress: n,
@@ -9696,7 +9695,7 @@ const Ki = (e) => {
9696
9695
  l(...h), e();
9697
9696
  },
9698
9697
  [l, e]
9699
- ), d = al(), { data: p } = Bn({
9698
+ ), d = al(), { data: p } = Mn({
9700
9699
  userAddress: t,
9701
9700
  vaultAddress: n,
9702
9701
  chainId: r
@@ -9735,7 +9734,7 @@ const Ki = (e) => {
9735
9734
  limitOrderHandler: e,
9736
9735
  action: t
9737
9736
  }) => {
9738
- const n = S(), r = ae(), { account: o } = B(), a = y(), [i] = O(), l = Q()[1], c = ue()[1], d = xr(), p = t === "delete_limit_order_withdraw", u = async () => {
9737
+ const n = S(), r = ae(), { account: o } = B(), a = y(), [i] = O(), l = Q()[1], c = ue()[1], d = Cr(), p = t === "delete_limit_order_withdraw", u = async () => {
9739
9738
  const m = a.chainId;
9740
9739
  l({
9741
9740
  isOpen: !0,
@@ -9850,7 +9849,7 @@ const Ki = (e) => {
9850
9849
  isActive: e,
9851
9850
  onError: t
9852
9851
  }) => {
9853
- const n = S(), r = jr(e), { canSpend: o, approve: a, isCanSpendFetching: i } = qr({
9852
+ const n = S(), r = qr(e), { canSpend: o, approve: a, isCanSpendFetching: i } = Yr({
9854
9853
  onErrorCallback: t
9855
9854
  }), l = we(!1);
9856
9855
  return _(() => {
@@ -9960,7 +9959,7 @@ const Ki = (e) => {
9960
9959
  isUnrollAndClaimTransaction: i,
9961
9960
  isFetching: l,
9962
9961
  isFetched: c
9963
- } = Yr(), { canSpend: d } = qr({
9962
+ } = Kr(), { canSpend: d } = Yr({
9964
9963
  onErrorCallback: t
9965
9964
  }), p = RC(d);
9966
9965
  DC(t, r, o);
@@ -9982,7 +9981,7 @@ const Ki = (e) => {
9982
9981
  isActive: e,
9983
9982
  onError: t
9984
9983
  }) => {
9985
- const n = S(), r = jr(e), o = gi({
9984
+ const n = S(), r = qr(e), o = gi({
9986
9985
  onErrorCallback: t
9987
9986
  }), { handleTrade: a } = vi({
9988
9987
  withdraw: o,
@@ -10019,9 +10018,9 @@ const Ki = (e) => {
10019
10018
  isPending: r,
10020
10019
  onError: o
10021
10020
  }) => {
10022
- const a = jr(e), { withdraw: i } = gT({
10021
+ const a = qr(e), { withdraw: i } = gT({
10023
10022
  onErrorCallback: o
10024
- }), { handleTrade: l } = Kr({
10023
+ }), { handleTrade: l } = Qr({
10025
10024
  trade: i,
10026
10025
  onErrorCallback: o
10027
10026
  }), c = we(!1);
@@ -10265,7 +10264,7 @@ const Ki = (e) => {
10265
10264
  /* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--panel-input-group-gap,var(--panel-gap))] dtw-rounded-[var(--panel-input-radius,var(--panel-radius))] dtw-border dtw-bg-[var(--panel-input-bg,var(--panel-neutral-color))] dtw-py-[var(--panel-input-py)] dtw-px-[var(--panel-input-px)] dtw-shadow-md dtw-border-[var(--panel-input-border-color)]", children: /* @__PURE__ */ s(HC, { assets: t }) })
10266
10265
  ] });
10267
10266
  }, qC = () => {
10268
- const e = ae(), { requiresHighSlippageConfirm: t, confirmHighSlippage: n, slippageToBeUsed: r } = Hr();
10267
+ const e = ae(), { requiresHighSlippageConfirm: t, confirmHighSlippage: n, slippageToBeUsed: r } = Vr();
10269
10268
  return {
10270
10269
  requiresHighSlippageConfirm: t,
10271
10270
  slippageToBeUsed: r,
@@ -10360,7 +10359,7 @@ const Ki = (e) => {
10360
10359
  e.exchangeRate,
10361
10360
  e.rate
10362
10361
  ]);
10363
- return /* @__PURE__ */ s(Sr, { collapseItems: o });
10362
+ return /* @__PURE__ */ s(xr, { collapseItems: o });
10364
10363
  }, JC = ({ children: e }) => /* @__PURE__ */ w(G.Meta, { children: [
10365
10364
  /* @__PURE__ */ s("div", { className: "dtw-bg-[var(--panel-meta-action-panel-bg)]", children: e }),
10366
10365
  /* @__PURE__ */ s(ZC, {})
@@ -10374,7 +10373,7 @@ const Ki = (e) => {
10374
10373
  /* @__PURE__ */ s(Pi, { highlighted: !1 })
10375
10374
  ] }) }) })
10376
10375
  ] })), tE = () => {
10377
- const { chainId: e, address: t } = y(), { exitFeeNumber: n } = Gr({
10376
+ const { chainId: e, address: t } = y(), { exitFeeNumber: n } = Hr({
10378
10377
  address: t,
10379
10378
  chainId: e
10380
10379
  }), [r] = O(), [o, a] = M(), i = ve({ address: t, chainId: e }), l = le({
@@ -10414,7 +10413,7 @@ const Ki = (e) => {
10414
10413
  }, rE = () => {
10415
10414
  const { ActionButton: e = H } = k(), { label: t, openLimitOrderWithdrawOverlay: n } = nE();
10416
10415
  return /* @__PURE__ */ s(e, { onClick: n, children: t });
10417
- }, er = [
10416
+ }, tr = [
10418
10417
  {
10419
10418
  isLeveragedAsset: Ra,
10420
10419
  getWithdrawAssetByLeverageAddress: $a,
@@ -10428,40 +10427,40 @@ const Ki = (e) => {
10428
10427
  getWithdrawAssetByVaultAddress: Pc,
10429
10428
  isLentAndBorrowedAsset: lo
10430
10429
  }
10431
- ], tr = {
10430
+ ], nr = {
10432
10431
  requiresLeveragedCollateralLiquidity: !1,
10433
10432
  leveragedCollateralValueFormatted: "$0"
10434
- }, nr = (e) => N(e.amount).shiftedBy(-e.precision).times(e.rate).shiftedBy(-W).toNumber(), sl = () => {
10433
+ }, rr = (e) => N(e.amount).shiftedBy(-e.precision).times(e.rate).shiftedBy(-W).toNumber(), sl = () => {
10435
10434
  const e = y(), t = Ft(e), [n] = O(), r = ve(e), o = t.find(
10436
- ({ tokenAddress: u, amount: m }) => er.some(
10435
+ ({ tokenAddress: u, amount: m }) => tr.some(
10437
10436
  (h) => h.isLeveragedAsset(u) && m !== "0"
10438
10437
  )
10439
10438
  );
10440
10439
  if (!o)
10441
- return tr;
10442
- const a = er.find(
10440
+ return nr;
10441
+ const a = tr.find(
10443
10442
  (u) => u.isLeveragedAsset(o.tokenAddress)
10444
10443
  );
10445
10444
  if (!a)
10446
- return tr;
10445
+ return nr;
10447
10446
  const i = a.getWithdrawAssetByVaultAddress(e.address)?.address ?? a.getWithdrawAssetByLeverageAddress(
10448
10447
  o.tokenAddress
10449
10448
  ).address, l = t.find(
10450
10449
  ({ tokenAddress: u }) => J(i, u)
10451
10450
  );
10452
10451
  if (!l)
10453
- return tr;
10454
- const c = Number(n.value || "0") * Number(r), d = nr(l);
10452
+ return nr;
10453
+ const c = Number(n.value || "0") * Number(r), d = rr(l);
10455
10454
  if (t.find(
10456
- ({ tokenAddress: u, amount: m }) => er.some(
10455
+ ({ tokenAddress: u, amount: m }) => tr.some(
10457
10456
  (h) => h.isLentAndBorrowedAsset({
10458
10457
  address: u,
10459
10458
  chainId: e.chainId
10460
10459
  }) && m !== "0"
10461
10460
  )
10462
10461
  )) {
10463
- const u = nr(o), m = t.reduce(
10464
- (T, x) => T + nr(x),
10462
+ const u = rr(o), m = t.reduce(
10463
+ (T, x) => T + rr(x),
10465
10464
  0
10466
10465
  ), h = d / m, v = u / m, b = h / (h + v) * m;
10467
10466
  return {
@@ -10486,7 +10485,7 @@ const Ki = (e) => {
10486
10485
  chainId: t
10487
10486
  }), p = d > 0, u = Ha(
10488
10487
  Mc({ start: 0, end: d })
10489
- ), { requiresHighSlippageConfirm: m, confirmHighSlippage: h, slippageToBeUsed: v } = Hr(), g = () => {
10488
+ ), { requiresHighSlippageConfirm: m, confirmHighSlippage: h, slippageToBeUsed: v } = Vr(), g = () => {
10490
10489
  i({
10491
10490
  type: "MERGE_OVERLAY",
10492
10491
  payload: {
@@ -10606,7 +10605,7 @@ const Ki = (e) => {
10606
10605
  )
10607
10606
  ] });
10608
10607
  }, dE = () => {
10609
- const e = S(), { address: t, chainId: n } = y(), [{ isMaxSlippageLoading: r }] = X(), { exitFeeNumber: o } = Gr({
10608
+ const e = S(), { address: t, chainId: n } = y(), [{ isMaxSlippageLoading: r }] = X(), { exitFeeNumber: o } = Hr({
10610
10609
  address: t,
10611
10610
  chainId: n
10612
10611
  }), a = vt(), i = Xe();
@@ -10614,7 +10613,7 @@ const Ki = (e) => {
10614
10613
  slippageTooltipText: Wt(a) === U.DEFAULT ? e.withdrawSlippageWarning : e.highSlippageWarning,
10615
10614
  isMaxSlippageLoading: r,
10616
10615
  slippagePlaceholder: `${a}%`,
10617
- exitFee: yr(o, 2),
10616
+ exitFee: Tr(o, 2),
10618
10617
  minReceivedText: e.estimatedMultiAssetFractions,
10619
10618
  showMinReceivedText: i
10620
10619
  };
@@ -10675,7 +10674,7 @@ const Ki = (e) => {
10675
10674
  i,
10676
10675
  a
10677
10676
  ]);
10678
- return /* @__PURE__ */ s(Sr, { collapseItems: l });
10677
+ return /* @__PURE__ */ s(xr, { collapseItems: l });
10679
10678
  }, uE = ({ children: e }) => {
10680
10679
  const { WithdrawMetaInfo: t, AvailableLiquidityAlert: n, OnDemandWithdrawAlert: r } = k(), {
10681
10680
  requiresLeveragedCollateralLiquidity: o,
@@ -11113,7 +11112,7 @@ const Ki = (e) => {
11113
11112
  const { onOpen: n, isModalOpen: r, onClose: o, isTransactionPending: a } = xE(), i = Le();
11114
11113
  qi();
11115
11114
  const l = f(
11116
- ({ children: c }) => /* @__PURE__ */ s(Mn, { config: t, children: c }),
11115
+ ({ children: c }) => /* @__PURE__ */ s(Fn, { config: t, children: c }),
11117
11116
  [t]
11118
11117
  );
11119
11118
  return /* @__PURE__ */ w(P, { children: [
@@ -11142,7 +11141,7 @@ const Ki = (e) => {
11142
11141
  vaultAddress: n,
11143
11142
  pricingAsset: r,
11144
11143
  translation: o,
11145
- minAmountInUsd: a = Mr,
11144
+ minAmountInUsd: a = Fr,
11146
11145
  actions: i,
11147
11146
  themeConfig: l,
11148
11147
  isModalOpen: c
@@ -11172,7 +11171,7 @@ const Ki = (e) => {
11172
11171
  return d ? /* @__PURE__ */ s(Ri, { config: o, children: /* @__PURE__ */ s(zi, { initialState: m, actions: i, children: /* @__PURE__ */ s(CE, { themeConfig: l, children: e }) }) }) : null;
11173
11172
  }, EE = ({ children: e, themeConfig: t, isOpen: n, onOpen: r, onClose: o }) => {
11174
11173
  const a = Je(), i = f(
11175
- ({ children: l }) => /* @__PURE__ */ s(Mn, { config: t, children: l }),
11174
+ ({ children: l }) => /* @__PURE__ */ s(Fn, { config: t, children: l }),
11176
11175
  [t]
11177
11176
  );
11178
11177
  return /* @__PURE__ */ w(P, { children: [
@@ -11287,7 +11286,7 @@ export {
11287
11286
  PI as GMX_MARKET_ASSETS_MAP,
11288
11287
  Zs as LIMIT_BUY_MANAGER_ADDRESS_MAP,
11289
11288
  Xs as LIMIT_BUY_SLIPPAGE_PERCENT_DECIMALS,
11290
- Br as LIMIT_SELL_ORDER_READ_FUNCTION_NAME,
11289
+ Mr as LIMIT_SELL_ORDER_READ_FUNCTION_NAME,
11291
11290
  OI as LINK_ARBITRUM,
11292
11291
  kI as LINK_OPTIMISM,
11293
11292
  wI as LimitBuyOrderModal,
@@ -11300,7 +11299,7 @@ export {
11300
11299
  Be as MaxUint256,
11301
11300
  DI as NATIVE_TOKEN_DEPOSIT_GAS_LIMIT,
11302
11301
  RI as PAXG_POLYGON,
11303
- Vr as PERMIT2_ADDRESS,
11302
+ jr as PERMIT2_ADDRESS,
11304
11303
  $I as PYTH_API_LINK,
11305
11304
  Dt as PoolFactoryAbi,
11306
11305
  Re as PoolLogicAbi,
@@ -11357,11 +11356,11 @@ export {
11357
11356
  PN as decodeErrorResult,
11358
11357
  ON as encodeFunctionData,
11359
11358
  kN as erc20Abi,
11360
- zn as formatByCurrency,
11359
+ Un as formatByCurrency,
11361
11360
  DN as formatEther,
11362
11361
  $e as formatNumberToLimitedDecimals,
11363
11362
  Yt as formatNumeratorToPercentage,
11364
- yr as formatPercentage,
11363
+ Tr as formatPercentage,
11365
11364
  re as formatToUsd,
11366
11365
  RN as formatUnits,
11367
11366
  hc as getContractAbiById,
@@ -11377,7 +11376,7 @@ export {
11377
11376
  J as isEqualAddress,
11378
11377
  Ff as isErrorWithMessage,
11379
11378
  bc as isFmpAirdropVaultAddress,
11380
- vr as isNativeToken,
11379
+ fr as isNativeToken,
11381
11380
  Y as isZeroAddress,
11382
11381
  Nt as normalizeNumber,
11383
11382
  VN as optimism,
@@ -11402,7 +11401,7 @@ export {
11402
11401
  Ce as useContractFunction,
11403
11402
  sy as useContractPoolComposition,
11404
11403
  Es as useContractReadErrorLogging,
11405
- $r as useContractReadsErrorLogging,
11404
+ Br as useContractReadsErrorLogging,
11406
11405
  rd as useCustomDepositTokensPerChain,
11407
11406
  ri as useDebounce,
11408
11407
  LA as useDepositLockTime,
@@ -11416,7 +11415,7 @@ export {
11416
11415
  nd as useGetReferrerAddress,
11417
11416
  Us as useHasSingleAssetWithdrawBlockers,
11418
11417
  Hx as useInvalidateLimitSellOrderQuery,
11419
- dr as useInvalidateOnBlock,
11418
+ pr as useInvalidateOnBlock,
11420
11419
  dy as useInvalidatePoolContractData,
11421
11420
  In as useInvalidateTradingQueries,
11422
11421
  bt as useIsCompleteWithdrawStep,
@@ -11434,12 +11433,12 @@ export {
11434
11433
  ed as useOnTokenSelector,
11435
11434
  yi as useOnTradingTypeChange,
11436
11435
  Xc as useOnTransactionError,
11437
- xr as useOnTransactionEstimationError,
11436
+ Cr as useOnTransactionEstimationError,
11438
11437
  Jc as useOnTransactionSuccess,
11439
11438
  Ft as usePoolComposition,
11440
11439
  cy as usePoolCompositionWithFraction,
11441
11440
  me as usePoolDynamic,
11442
- Gr as usePoolFees,
11441
+ Hr as usePoolFees,
11443
11442
  kn as usePoolManagerDynamic,
11444
11443
  zs as usePoolManagerLogicData,
11445
11444
  On as usePoolManagerStatic,
@@ -11479,7 +11478,7 @@ export {
11479
11478
  nI as useUpdateTradingModal,
11480
11479
  eI as useUpdateTradingSettings,
11481
11480
  ny as useUserBalancesDynamic,
11482
- Bn as useUserLimitSellOrder,
11481
+ Mn as useUserLimitSellOrder,
11483
11482
  ge as useUserTokenBalance,
11484
11483
  by as useUserVaultBalance,
11485
11484
  fy as useUserVaultsBalances,