@orbs-network/spot-react 1.1.16 → 1.1.17

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.
@@ -1525,7 +1525,7 @@ var ga = /* @__PURE__ */ ((e) => (e.FRESHNESS = "freshness", e.MIN_CHUNK_SIZE_US
1525
1525
  const k1 = "-5", C1 = "10", v1 = "-10", A1 = "5";
1526
1526
  var T1 = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Ni = Math.ceil, mt = Math.floor, Xe = "[BigNumber Error] ", nd = Xe + "Number primitive has more than 15 significant digits: ", Ct = 1e14, ee = 14, _i = 9007199254740991, zi = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], gn = 1e7, Fe = 1e9;
1527
1527
  function Kp(e) {
1528
- var t, n, r, s = k.prototype = { constructor: k, toString: null, valueOf: null }, a = new k(1), o = 20, i = 4, c = -7, l = 21, d = -1e7, p = 1e7, f = !1, m = 1, y = 0, x = {
1528
+ var t, n, r, s = v.prototype = { constructor: v, toString: null, valueOf: null }, a = new v(1), o = 20, i = 4, c = -7, l = 21, d = -1e7, p = 1e7, f = !1, m = 1, y = 0, x = {
1529
1529
  prefix: "",
1530
1530
  groupSize: 3,
1531
1531
  secondaryGroupSize: 0,
@@ -1535,10 +1535,10 @@ function Kp(e) {
1535
1535
  fractionGroupSeparator: " ",
1536
1536
  // non-breaking space
1537
1537
  suffix: ""
1538
- }, S = "0123456789abcdefghijklmnopqrstuvwxyz", B = !0;
1539
- function k(h, b) {
1540
- var g, v, E, T, O, w, A, F, P = this;
1541
- if (!(P instanceof k)) return new k(h, b);
1538
+ }, S = "0123456789abcdefghijklmnopqrstuvwxyz", U = !0;
1539
+ function v(h, b) {
1540
+ var g, C, k, T, O, w, A, F, P = this;
1541
+ if (!(P instanceof v)) return new v(h, b);
1542
1542
  if (b == null) {
1543
1543
  if (h && h._isBigNumber === !0) {
1544
1544
  P.s = h.s, !h.c || h.e > p ? P.c = P.e = null : h.e < d ? P.c = [P.e = 0] : (P.e = h.e, P.c = h.c.slice());
@@ -1557,23 +1557,23 @@ function Kp(e) {
1557
1557
  }
1558
1558
  (T = F.indexOf(".")) > -1 && (F = F.replace(".", "")), (O = F.search(/e/i)) > 0 ? (T < 0 && (T = O), T += +F.slice(O + 1), F = F.substring(0, O)) : T < 0 && (T = F.length);
1559
1559
  } else {
1560
- if (ye(b, 2, S.length, "Base"), b == 10 && B)
1561
- return P = new k(h), N(P, o + P.e + 1, i);
1560
+ if (ye(b, 2, S.length, "Base"), b == 10 && U)
1561
+ return P = new v(h), N(P, o + P.e + 1, i);
1562
1562
  if (F = String(h), w = typeof h == "number") {
1563
1563
  if (h * 0 != 0) return r(P, F, w, b);
1564
- if (P.s = 1 / h < 0 ? (F = F.slice(1), -1) : 1, k.DEBUG && F.replace(/^0\.0*|\./, "").length > 15)
1564
+ if (P.s = 1 / h < 0 ? (F = F.slice(1), -1) : 1, v.DEBUG && F.replace(/^0\.0*|\./, "").length > 15)
1565
1565
  throw Error(nd + h);
1566
1566
  } else
1567
1567
  P.s = F.charCodeAt(0) === 45 ? (F = F.slice(1), -1) : 1;
1568
1568
  for (g = S.slice(0, b), T = O = 0, A = F.length; O < A; O++)
1569
- if (g.indexOf(v = F.charAt(O)) < 0) {
1570
- if (v == ".") {
1569
+ if (g.indexOf(C = F.charAt(O)) < 0) {
1570
+ if (C == ".") {
1571
1571
  if (O > T) {
1572
1572
  T = A;
1573
1573
  continue;
1574
1574
  }
1575
- } else if (!E && (F == F.toUpperCase() && (F = F.toLowerCase()) || F == F.toLowerCase() && (F = F.toUpperCase()))) {
1576
- E = !0, O = -1, T = 0;
1575
+ } else if (!k && (F == F.toUpperCase() && (F = F.toLowerCase()) || F == F.toLowerCase() && (F = F.toUpperCase()))) {
1576
+ k = !0, O = -1, T = 0;
1577
1577
  continue;
1578
1578
  }
1579
1579
  return r(P, String(h), w, b);
@@ -1583,7 +1583,7 @@ function Kp(e) {
1583
1583
  for (O = 0; F.charCodeAt(O) === 48; O++) ;
1584
1584
  for (A = F.length; F.charCodeAt(--A) === 48; ) ;
1585
1585
  if (F = F.slice(O, ++A)) {
1586
- if (A -= O, w && k.DEBUG && A > 15 && (h > _i || h !== mt(h)))
1586
+ if (A -= O, w && v.DEBUG && A > 15 && (h > _i || h !== mt(h)))
1587
1587
  throw Error(nd + P.s * h);
1588
1588
  if ((T = T - O - 1) > p)
1589
1589
  P.c = P.e = null;
@@ -1602,7 +1602,7 @@ function Kp(e) {
1602
1602
  } else
1603
1603
  P.c = [P.e = 0];
1604
1604
  }
1605
- k.clone = Kp, k.ROUND_UP = 0, k.ROUND_DOWN = 1, k.ROUND_CEIL = 2, k.ROUND_FLOOR = 3, k.ROUND_HALF_UP = 4, k.ROUND_HALF_DOWN = 5, k.ROUND_HALF_EVEN = 6, k.ROUND_HALF_CEIL = 7, k.ROUND_HALF_FLOOR = 8, k.EUCLID = 9, k.config = k.set = function(h) {
1605
+ v.clone = Kp, v.ROUND_UP = 0, v.ROUND_DOWN = 1, v.ROUND_CEIL = 2, v.ROUND_FLOOR = 3, v.ROUND_HALF_UP = 4, v.ROUND_HALF_DOWN = 5, v.ROUND_HALF_EVEN = 6, v.ROUND_HALF_CEIL = 7, v.ROUND_HALF_FLOOR = 8, v.EUCLID = 9, v.config = v.set = function(h) {
1606
1606
  var b, g;
1607
1607
  if (h != null)
1608
1608
  if (typeof h == "object") {
@@ -1629,7 +1629,7 @@ function Kp(e) {
1629
1629
  else throw Error(Xe + b + " not an object: " + g);
1630
1630
  if (h.hasOwnProperty(b = "ALPHABET"))
1631
1631
  if (g = h[b], typeof g == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(g))
1632
- B = g.slice(0, 10) == "0123456789", S = g;
1632
+ U = g.slice(0, 10) == "0123456789", S = g;
1633
1633
  else
1634
1634
  throw Error(Xe + b + " invalid: " + g);
1635
1635
  } else
@@ -1645,45 +1645,45 @@ function Kp(e) {
1645
1645
  FORMAT: x,
1646
1646
  ALPHABET: S
1647
1647
  };
1648
- }, k.isBigNumber = function(h) {
1648
+ }, v.isBigNumber = function(h) {
1649
1649
  if (!h || h._isBigNumber !== !0) return !1;
1650
- if (!k.DEBUG) return !0;
1651
- var b, g, v = h.c, E = h.e, T = h.s;
1652
- e: if ({}.toString.call(v) == "[object Array]") {
1653
- if ((T === 1 || T === -1) && E >= -Fe && E <= Fe && E === mt(E)) {
1654
- if (v[0] === 0) {
1655
- if (E === 0 && v.length === 1) return !0;
1650
+ if (!v.DEBUG) return !0;
1651
+ var b, g, C = h.c, k = h.e, T = h.s;
1652
+ e: if ({}.toString.call(C) == "[object Array]") {
1653
+ if ((T === 1 || T === -1) && k >= -Fe && k <= Fe && k === mt(k)) {
1654
+ if (C[0] === 0) {
1655
+ if (k === 0 && C.length === 1) return !0;
1656
1656
  break e;
1657
1657
  }
1658
- if (b = (E + 1) % ee, b < 1 && (b += ee), String(v[0]).length == b) {
1659
- for (b = 0; b < v.length; b++)
1660
- if (g = v[b], g < 0 || g >= Ct || g !== mt(g)) break e;
1658
+ if (b = (k + 1) % ee, b < 1 && (b += ee), String(C[0]).length == b) {
1659
+ for (b = 0; b < C.length; b++)
1660
+ if (g = C[b], g < 0 || g >= Ct || g !== mt(g)) break e;
1661
1661
  if (g !== 0) return !0;
1662
1662
  }
1663
1663
  }
1664
- } else if (v === null && E === null && (T === null || T === 1 || T === -1))
1664
+ } else if (C === null && k === null && (T === null || T === 1 || T === -1))
1665
1665
  return !0;
1666
1666
  throw Error(Xe + "Invalid BigNumber: " + h);
1667
- }, k.maximum = k.max = function() {
1668
- return C(arguments, -1);
1669
- }, k.minimum = k.min = function() {
1670
- return C(arguments, 1);
1671
- }, k.random = (function() {
1667
+ }, v.maximum = v.max = function() {
1668
+ return E(arguments, -1);
1669
+ }, v.minimum = v.min = function() {
1670
+ return E(arguments, 1);
1671
+ }, v.random = (function() {
1672
1672
  var h = 9007199254740992, b = Math.random() * h & 2097151 ? function() {
1673
1673
  return mt(Math.random() * h);
1674
1674
  } : function() {
1675
1675
  return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
1676
1676
  };
1677
1677
  return function(g) {
1678
- var v, E, T, O, w, A = 0, F = [], P = new k(a);
1678
+ var C, k, T, O, w, A = 0, F = [], P = new v(a);
1679
1679
  if (g == null ? g = o : ye(g, 0, Fe), O = Ni(g / ee), f)
1680
1680
  if (crypto.getRandomValues) {
1681
- for (v = crypto.getRandomValues(new Uint32Array(O *= 2)); A < O; )
1682
- w = v[A] * 131072 + (v[A + 1] >>> 11), w >= 9e15 ? (E = crypto.getRandomValues(new Uint32Array(2)), v[A] = E[0], v[A + 1] = E[1]) : (F.push(w % 1e14), A += 2);
1681
+ for (C = crypto.getRandomValues(new Uint32Array(O *= 2)); A < O; )
1682
+ w = C[A] * 131072 + (C[A + 1] >>> 11), w >= 9e15 ? (k = crypto.getRandomValues(new Uint32Array(2)), C[A] = k[0], C[A + 1] = k[1]) : (F.push(w % 1e14), A += 2);
1683
1683
  A = O / 2;
1684
1684
  } else if (crypto.randomBytes) {
1685
- for (v = crypto.randomBytes(O *= 7); A < O; )
1686
- w = (v[A] & 31) * 281474976710656 + v[A + 1] * 1099511627776 + v[A + 2] * 4294967296 + v[A + 3] * 16777216 + (v[A + 4] << 16) + (v[A + 5] << 8) + v[A + 6], w >= 9e15 ? crypto.randomBytes(7).copy(v, A) : (F.push(w % 1e14), A += 7);
1685
+ for (C = crypto.randomBytes(O *= 7); A < O; )
1686
+ w = (C[A] & 31) * 281474976710656 + C[A + 1] * 1099511627776 + C[A + 2] * 4294967296 + C[A + 3] * 16777216 + (C[A + 4] << 16) + (C[A + 5] << 8) + C[A + 6], w >= 9e15 ? crypto.randomBytes(7).copy(C, A) : (F.push(w % 1e14), A += 7);
1687
1687
  A = O / 7;
1688
1688
  } else
1689
1689
  throw f = !1, Error(Xe + "crypto unavailable");
@@ -1700,33 +1700,33 @@ function Kp(e) {
1700
1700
  }
1701
1701
  return P.e = T, P.c = F, P;
1702
1702
  };
1703
- })(), k.sum = function() {
1704
- for (var h = 1, b = arguments, g = new k(b[0]); h < b.length; ) g = g.plus(b[h++]);
1703
+ })(), v.sum = function() {
1704
+ for (var h = 1, b = arguments, g = new v(b[0]); h < b.length; ) g = g.plus(b[h++]);
1705
1705
  return g;
1706
1706
  }, n = /* @__PURE__ */ (function() {
1707
1707
  var h = "0123456789";
1708
- function b(g, v, E, T) {
1708
+ function b(g, C, k, T) {
1709
1709
  for (var O, w = [0], A, F = 0, P = g.length; F < P; ) {
1710
- for (A = w.length; A--; w[A] *= v) ;
1710
+ for (A = w.length; A--; w[A] *= C) ;
1711
1711
  for (w[0] += T.indexOf(g.charAt(F++)), O = 0; O < w.length; O++)
1712
- w[O] > E - 1 && (w[O + 1] == null && (w[O + 1] = 0), w[O + 1] += w[O] / E | 0, w[O] %= E);
1712
+ w[O] > k - 1 && (w[O + 1] == null && (w[O + 1] = 0), w[O + 1] += w[O] / k | 0, w[O] %= k);
1713
1713
  }
1714
1714
  return w.reverse();
1715
1715
  }
1716
- return function(g, v, E, T, O) {
1716
+ return function(g, C, k, T, O) {
1717
1717
  var w, A, F, P, M, L, G, X, se = g.indexOf("."), ie = o, Q = i;
1718
- for (se >= 0 && (P = y, y = 0, g = g.replace(".", ""), X = new k(v), L = X.pow(g.length - se), y = P, X.c = b(
1718
+ for (se >= 0 && (P = y, y = 0, g = g.replace(".", ""), X = new v(C), L = X.pow(g.length - se), y = P, X.c = b(
1719
1719
  Wt(pt(L.c), L.e, "0"),
1720
1720
  10,
1721
- E,
1721
+ k,
1722
1722
  h
1723
- ), X.e = X.c.length), G = b(g, v, E, O ? (w = S, h) : (w = h, S)), F = P = G.length; G[--P] == 0; G.pop()) ;
1723
+ ), X.e = X.c.length), G = b(g, C, k, O ? (w = S, h) : (w = h, S)), F = P = G.length; G[--P] == 0; G.pop()) ;
1724
1724
  if (!G[0]) return w.charAt(0);
1725
- if (se < 0 ? --F : (L.c = G, L.e = F, L.s = T, L = t(L, X, ie, Q, E), G = L.c, M = L.r, F = L.e), A = F + ie + 1, se = G[A], P = E / 2, M = M || A < 0 || G[A + 1] != null, M = Q < 4 ? (se != null || M) && (Q == 0 || Q == (L.s < 0 ? 3 : 2)) : se > P || se == P && (Q == 4 || M || Q == 6 && G[A - 1] & 1 || Q == (L.s < 0 ? 8 : 7)), A < 1 || !G[0])
1725
+ if (se < 0 ? --F : (L.c = G, L.e = F, L.s = T, L = t(L, X, ie, Q, k), G = L.c, M = L.r, F = L.e), A = F + ie + 1, se = G[A], P = k / 2, M = M || A < 0 || G[A + 1] != null, M = Q < 4 ? (se != null || M) && (Q == 0 || Q == (L.s < 0 ? 3 : 2)) : se > P || se == P && (Q == 4 || M || Q == 6 && G[A - 1] & 1 || Q == (L.s < 0 ? 8 : 7)), A < 1 || !G[0])
1726
1726
  g = M ? Wt(w.charAt(1), -ie, w.charAt(0)) : w.charAt(0);
1727
1727
  else {
1728
1728
  if (G.length = A, M)
1729
- for (--E; ++G[--A] > E; )
1729
+ for (--k; ++G[--A] > k; )
1730
1730
  G[A] = 0, A || (++F, G = [1].concat(G));
1731
1731
  for (P = G.length; !G[--P]; ) ;
1732
1732
  for (se = 0, g = ""; se <= P; g += w.charAt(G[se++])) ;
@@ -1735,40 +1735,40 @@ function Kp(e) {
1735
1735
  return g;
1736
1736
  };
1737
1737
  })(), t = /* @__PURE__ */ (function() {
1738
- function h(v, E, T) {
1739
- var O, w, A, F, P = 0, M = v.length, L = E % gn, G = E / gn | 0;
1740
- for (v = v.slice(); M--; )
1741
- A = v[M] % gn, F = v[M] / gn | 0, O = G * A + F * L, w = L * A + O % gn * gn + P, P = (w / T | 0) + (O / gn | 0) + G * F, v[M] = w % T;
1742
- return P && (v = [P].concat(v)), v;
1738
+ function h(C, k, T) {
1739
+ var O, w, A, F, P = 0, M = C.length, L = k % gn, G = k / gn | 0;
1740
+ for (C = C.slice(); M--; )
1741
+ A = C[M] % gn, F = C[M] / gn | 0, O = G * A + F * L, w = L * A + O % gn * gn + P, P = (w / T | 0) + (O / gn | 0) + G * F, C[M] = w % T;
1742
+ return P && (C = [P].concat(C)), C;
1743
1743
  }
1744
- function b(v, E, T, O) {
1744
+ function b(C, k, T, O) {
1745
1745
  var w, A;
1746
1746
  if (T != O)
1747
1747
  A = T > O ? 1 : -1;
1748
1748
  else
1749
1749
  for (w = A = 0; w < T; w++)
1750
- if (v[w] != E[w]) {
1751
- A = v[w] > E[w] ? 1 : -1;
1750
+ if (C[w] != k[w]) {
1751
+ A = C[w] > k[w] ? 1 : -1;
1752
1752
  break;
1753
1753
  }
1754
1754
  return A;
1755
1755
  }
1756
- function g(v, E, T, O) {
1756
+ function g(C, k, T, O) {
1757
1757
  for (var w = 0; T--; )
1758
- v[T] -= w, w = v[T] < E[T] ? 1 : 0, v[T] = w * O + v[T] - E[T];
1759
- for (; !v[0] && v.length > 1; v.splice(0, 1)) ;
1758
+ C[T] -= w, w = C[T] < k[T] ? 1 : 0, C[T] = w * O + C[T] - k[T];
1759
+ for (; !C[0] && C.length > 1; C.splice(0, 1)) ;
1760
1760
  }
1761
- return function(v, E, T, O, w) {
1762
- var A, F, P, M, L, G, X, se, ie, Q, Y, he, xn, wt, Mt, We, Et, Se = v.s == E.s ? 1 : -1, ke = v.c, fe = E.c;
1761
+ return function(C, k, T, O, w) {
1762
+ var A, F, P, M, L, G, X, se, ie, Q, Y, he, xn, wt, Mt, We, Et, Se = C.s == k.s ? 1 : -1, ke = C.c, fe = k.c;
1763
1763
  if (!ke || !ke[0] || !fe || !fe[0])
1764
- return new k(
1764
+ return new v(
1765
1765
  // Return NaN if either NaN, or both Infinity or 0.
1766
- !v.s || !E.s || (ke ? fe && ke[0] == fe[0] : !fe) ? NaN : (
1766
+ !C.s || !k.s || (ke ? fe && ke[0] == fe[0] : !fe) ? NaN : (
1767
1767
  // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
1768
1768
  ke && ke[0] == 0 || !fe ? Se * 0 : Se / 0
1769
1769
  )
1770
1770
  );
1771
- for (se = new k(Se), ie = se.c = [], F = v.e - E.e, Se = T + F + 1, w || (w = Ct, F = ht(v.e / ee) - ht(E.e / ee), Se = Se / ee | 0), P = 0; fe[P] == (ke[P] || 0); P++) ;
1771
+ for (se = new v(Se), ie = se.c = [], F = C.e - k.e, Se = T + F + 1, w || (w = Ct, F = ht(C.e / ee) - ht(k.e / ee), Se = Se / ee | 0), P = 0; fe[P] == (ke[P] || 0); P++) ;
1772
1772
  if (fe[P] > (ke[P] || 0) && F--, Se < 0)
1773
1773
  ie.push(1), M = !0;
1774
1774
  else {
@@ -1797,72 +1797,72 @@ function Kp(e) {
1797
1797
  return se;
1798
1798
  };
1799
1799
  })();
1800
- function U(h, b, g, v) {
1801
- var E, T, O, w, A;
1800
+ function B(h, b, g, C) {
1801
+ var k, T, O, w, A;
1802
1802
  if (g == null ? g = i : ye(g, 0, 8), !h.c) return h.toString();
1803
- if (E = h.c[0], O = h.e, b == null)
1804
- A = pt(h.c), A = v == 1 || v == 2 && (O <= c || O >= l) ? Va(A, O) : Wt(A, O, "0");
1805
- else if (h = N(new k(h), b, g), T = h.e, A = pt(h.c), w = A.length, v == 1 || v == 2 && (b <= T || T <= c)) {
1803
+ if (k = h.c[0], O = h.e, b == null)
1804
+ A = pt(h.c), A = C == 1 || C == 2 && (O <= c || O >= l) ? Va(A, O) : Wt(A, O, "0");
1805
+ else if (h = N(new v(h), b, g), T = h.e, A = pt(h.c), w = A.length, C == 1 || C == 2 && (b <= T || T <= c)) {
1806
1806
  for (; w < b; A += "0", w++) ;
1807
1807
  A = Va(A, T);
1808
- } else if (b -= O + (v === 2 && T > O), A = Wt(A, T, "0"), T + 1 > w) {
1808
+ } else if (b -= O + (C === 2 && T > O), A = Wt(A, T, "0"), T + 1 > w) {
1809
1809
  if (--b > 0) for (A += "."; b--; A += "0") ;
1810
1810
  } else if (b += T - w, b > 0)
1811
1811
  for (T + 1 == w && (A += "."); b--; A += "0") ;
1812
- return h.s < 0 && E ? "-" + A : A;
1812
+ return h.s < 0 && k ? "-" + A : A;
1813
1813
  }
1814
- function C(h, b) {
1815
- for (var g, v, E = 1, T = new k(h[0]); E < h.length; E++)
1816
- v = new k(h[E]), (!v.s || (g = Hn(T, v)) === b || g === 0 && T.s === b) && (T = v);
1814
+ function E(h, b) {
1815
+ for (var g, C, k = 1, T = new v(h[0]); k < h.length; k++)
1816
+ C = new v(h[k]), (!C.s || (g = Hn(T, C)) === b || g === 0 && T.s === b) && (T = C);
1817
1817
  return T;
1818
1818
  }
1819
1819
  function D(h, b, g) {
1820
- for (var v = 1, E = b.length; !b[--E]; b.pop()) ;
1821
- for (E = b[0]; E >= 10; E /= 10, v++) ;
1822
- return (g = v + g * ee - 1) > p ? h.c = h.e = null : g < d ? h.c = [h.e = 0] : (h.e = g, h.c = b), h;
1820
+ for (var C = 1, k = b.length; !b[--k]; b.pop()) ;
1821
+ for (k = b[0]; k >= 10; k /= 10, C++) ;
1822
+ return (g = C + g * ee - 1) > p ? h.c = h.e = null : g < d ? h.c = [h.e = 0] : (h.e = g, h.c = b), h;
1823
1823
  }
1824
1824
  r = /* @__PURE__ */ (function() {
1825
- var h = /^(-?)0([xbo])(?=\w[\w.]*$)/i, b = /^([^.]+)\.$/, g = /^\.([^.]+)$/, v = /^-?(Infinity|NaN)$/, E = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
1825
+ var h = /^(-?)0([xbo])(?=\w[\w.]*$)/i, b = /^([^.]+)\.$/, g = /^\.([^.]+)$/, C = /^-?(Infinity|NaN)$/, k = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
1826
1826
  return function(T, O, w, A) {
1827
- var F, P = w ? O : O.replace(E, "");
1828
- if (v.test(P))
1827
+ var F, P = w ? O : O.replace(k, "");
1828
+ if (C.test(P))
1829
1829
  T.s = isNaN(P) ? null : P < 0 ? -1 : 1;
1830
1830
  else {
1831
1831
  if (!w && (P = P.replace(h, function(M, L, G) {
1832
1832
  return F = (G = G.toLowerCase()) == "x" ? 16 : G == "b" ? 2 : 8, !A || A == F ? L : M;
1833
1833
  }), A && (F = A, P = P.replace(b, "$1").replace(g, "0.$1")), O != P))
1834
- return new k(P, F);
1835
- if (k.DEBUG)
1834
+ return new v(P, F);
1835
+ if (v.DEBUG)
1836
1836
  throw Error(Xe + "Not a" + (A ? " base " + A : "") + " number: " + O);
1837
1837
  T.s = null;
1838
1838
  }
1839
1839
  T.c = T.e = null;
1840
1840
  };
1841
1841
  })();
1842
- function N(h, b, g, v) {
1843
- var E, T, O, w, A, F, P, M = h.c, L = zi;
1842
+ function N(h, b, g, C) {
1843
+ var k, T, O, w, A, F, P, M = h.c, L = zi;
1844
1844
  if (M) {
1845
1845
  e: {
1846
- for (E = 1, w = M[0]; w >= 10; w /= 10, E++) ;
1847
- if (T = b - E, T < 0)
1848
- T += ee, O = b, A = M[F = 0], P = mt(A / L[E - O - 1] % 10);
1846
+ for (k = 1, w = M[0]; w >= 10; w /= 10, k++) ;
1847
+ if (T = b - k, T < 0)
1848
+ T += ee, O = b, A = M[F = 0], P = mt(A / L[k - O - 1] % 10);
1849
1849
  else if (F = Ni((T + 1) / ee), F >= M.length)
1850
- if (v) {
1850
+ if (C) {
1851
1851
  for (; M.length <= F; M.push(0)) ;
1852
- A = P = 0, E = 1, T %= ee, O = T - ee + 1;
1852
+ A = P = 0, k = 1, T %= ee, O = T - ee + 1;
1853
1853
  } else
1854
1854
  break e;
1855
1855
  else {
1856
- for (A = w = M[F], E = 1; w >= 10; w /= 10, E++) ;
1857
- T %= ee, O = T - ee + E, P = O < 0 ? 0 : mt(A / L[E - O - 1] % 10);
1856
+ for (A = w = M[F], k = 1; w >= 10; w /= 10, k++) ;
1857
+ T %= ee, O = T - ee + k, P = O < 0 ? 0 : mt(A / L[k - O - 1] % 10);
1858
1858
  }
1859
- if (v = v || b < 0 || // Are there any non-zero digits after the rounding digit?
1859
+ if (C = C || b < 0 || // Are there any non-zero digits after the rounding digit?
1860
1860
  // The expression n % pows10[d - j - 1] returns all digits of n to the right
1861
1861
  // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
1862
- M[F + 1] != null || (O < 0 ? A : A % L[E - O - 1]), v = g < 4 ? (P || v) && (g == 0 || g == (h.s < 0 ? 3 : 2)) : P > 5 || P == 5 && (g == 4 || v || g == 6 && // Check whether the digit to the left of the rounding digit is odd.
1863
- (T > 0 ? O > 0 ? A / L[E - O] : 0 : M[F - 1]) % 10 & 1 || g == (h.s < 0 ? 8 : 7)), b < 1 || !M[0])
1864
- return M.length = 0, v ? (b -= h.e + 1, M[0] = L[(ee - b % ee) % ee], h.e = -b || 0) : M[0] = h.e = 0, h;
1865
- if (T == 0 ? (M.length = F, w = 1, F--) : (M.length = F + 1, w = L[ee - T], M[F] = O > 0 ? mt(A / L[E - O] % L[O]) * w : 0), v)
1862
+ M[F + 1] != null || (O < 0 ? A : A % L[k - O - 1]), C = g < 4 ? (P || C) && (g == 0 || g == (h.s < 0 ? 3 : 2)) : P > 5 || P == 5 && (g == 4 || C || g == 6 && // Check whether the digit to the left of the rounding digit is odd.
1863
+ (T > 0 ? O > 0 ? A / L[k - O] : 0 : M[F - 1]) % 10 & 1 || g == (h.s < 0 ? 8 : 7)), b < 1 || !M[0])
1864
+ return M.length = 0, C ? (b -= h.e + 1, M[0] = L[(ee - b % ee) % ee], h.e = -b || 0) : M[0] = h.e = 0, h;
1865
+ if (T == 0 ? (M.length = F, w = 1, F--) : (M.length = F + 1, w = L[ee - T], M[F] = O > 0 ? mt(A / L[k - O] % L[O]) * w : 0), C)
1866
1866
  for (; ; )
1867
1867
  if (F == 0) {
1868
1868
  for (T = 1, O = M[0]; O >= 10; O /= 10, T++) ;
@@ -1884,69 +1884,69 @@ function Kp(e) {
1884
1884
  return g === null ? h.toString() : (b = pt(h.c), b = g <= c || g >= l ? Va(b, g) : Wt(b, g, "0"), h.s < 0 ? "-" + b : b);
1885
1885
  }
1886
1886
  return s.absoluteValue = s.abs = function() {
1887
- var h = new k(this);
1887
+ var h = new v(this);
1888
1888
  return h.s < 0 && (h.s = 1), h;
1889
1889
  }, s.comparedTo = function(h, b) {
1890
- return Hn(this, new k(h, b));
1890
+ return Hn(this, new v(h, b));
1891
1891
  }, s.decimalPlaces = s.dp = function(h, b) {
1892
- var g, v, E, T = this;
1892
+ var g, C, k, T = this;
1893
1893
  if (h != null)
1894
- return ye(h, 0, Fe), b == null ? b = i : ye(b, 0, 8), N(new k(T), h + T.e + 1, b);
1894
+ return ye(h, 0, Fe), b == null ? b = i : ye(b, 0, 8), N(new v(T), h + T.e + 1, b);
1895
1895
  if (!(g = T.c)) return null;
1896
- if (v = ((E = g.length - 1) - ht(this.e / ee)) * ee, E = g[E]) for (; E % 10 == 0; E /= 10, v--) ;
1897
- return v < 0 && (v = 0), v;
1896
+ if (C = ((k = g.length - 1) - ht(this.e / ee)) * ee, k = g[k]) for (; k % 10 == 0; k /= 10, C--) ;
1897
+ return C < 0 && (C = 0), C;
1898
1898
  }, s.dividedBy = s.div = function(h, b) {
1899
- return t(this, new k(h, b), o, i);
1899
+ return t(this, new v(h, b), o, i);
1900
1900
  }, s.dividedToIntegerBy = s.idiv = function(h, b) {
1901
- return t(this, new k(h, b), 0, 1);
1901
+ return t(this, new v(h, b), 0, 1);
1902
1902
  }, s.exponentiatedBy = s.pow = function(h, b) {
1903
- var g, v, E, T, O, w, A, F, P, M = this;
1904
- if (h = new k(h), h.c && !h.isInteger())
1903
+ var g, C, k, T, O, w, A, F, P, M = this;
1904
+ if (h = new v(h), h.c && !h.isInteger())
1905
1905
  throw Error(Xe + "Exponent not an integer: " + R(h));
1906
- if (b != null && (b = new k(b)), w = h.e > 14, !M.c || !M.c[0] || M.c[0] == 1 && !M.e && M.c.length == 1 || !h.c || !h.c[0])
1907
- return P = new k(Math.pow(+R(M), w ? h.s * (2 - ja(h)) : +R(h))), b ? P.mod(b) : P;
1906
+ if (b != null && (b = new v(b)), w = h.e > 14, !M.c || !M.c[0] || M.c[0] == 1 && !M.e && M.c.length == 1 || !h.c || !h.c[0])
1907
+ return P = new v(Math.pow(+R(M), w ? h.s * (2 - ja(h)) : +R(h))), b ? P.mod(b) : P;
1908
1908
  if (A = h.s < 0, b) {
1909
- if (b.c ? !b.c[0] : !b.s) return new k(NaN);
1910
- v = !A && M.isInteger() && b.isInteger(), v && (M = M.mod(b));
1909
+ if (b.c ? !b.c[0] : !b.s) return new v(NaN);
1910
+ C = !A && M.isInteger() && b.isInteger(), C && (M = M.mod(b));
1911
1911
  } else {
1912
1912
  if (h.e > 9 && (M.e > 0 || M.e < -1 || (M.e == 0 ? M.c[0] > 1 || w && M.c[1] >= 24e7 : M.c[0] < 8e13 || w && M.c[0] <= 9999975e7)))
1913
- return T = M.s < 0 && ja(h) ? -0 : 0, M.e > -1 && (T = 1 / T), new k(A ? 1 / T : T);
1913
+ return T = M.s < 0 && ja(h) ? -0 : 0, M.e > -1 && (T = 1 / T), new v(A ? 1 / T : T);
1914
1914
  y && (T = Ni(y / ee + 2));
1915
1915
  }
1916
- for (w ? (g = new k(0.5), A && (h.s = 1), F = ja(h)) : (E = Math.abs(+R(h)), F = E % 2), P = new k(a); ; ) {
1916
+ for (w ? (g = new v(0.5), A && (h.s = 1), F = ja(h)) : (k = Math.abs(+R(h)), F = k % 2), P = new v(a); ; ) {
1917
1917
  if (F) {
1918
1918
  if (P = P.times(M), !P.c) break;
1919
- T ? P.c.length > T && (P.c.length = T) : v && (P = P.mod(b));
1919
+ T ? P.c.length > T && (P.c.length = T) : C && (P = P.mod(b));
1920
1920
  }
1921
- if (E) {
1922
- if (E = mt(E / 2), E === 0) break;
1923
- F = E % 2;
1921
+ if (k) {
1922
+ if (k = mt(k / 2), k === 0) break;
1923
+ F = k % 2;
1924
1924
  } else if (h = h.times(g), N(h, h.e + 1, 1), h.e > 14)
1925
1925
  F = ja(h);
1926
1926
  else {
1927
- if (E = +R(h), E === 0) break;
1928
- F = E % 2;
1927
+ if (k = +R(h), k === 0) break;
1928
+ F = k % 2;
1929
1929
  }
1930
- M = M.times(M), T ? M.c && M.c.length > T && (M.c.length = T) : v && (M = M.mod(b));
1930
+ M = M.times(M), T ? M.c && M.c.length > T && (M.c.length = T) : C && (M = M.mod(b));
1931
1931
  }
1932
- return v ? P : (A && (P = a.div(P)), b ? P.mod(b) : T ? N(P, y, i, O) : P);
1932
+ return C ? P : (A && (P = a.div(P)), b ? P.mod(b) : T ? N(P, y, i, O) : P);
1933
1933
  }, s.integerValue = function(h) {
1934
- var b = new k(this);
1934
+ var b = new v(this);
1935
1935
  return h == null ? h = i : ye(h, 0, 8), N(b, b.e + 1, h);
1936
1936
  }, s.isEqualTo = s.eq = function(h, b) {
1937
- return Hn(this, new k(h, b)) === 0;
1937
+ return Hn(this, new v(h, b)) === 0;
1938
1938
  }, s.isFinite = function() {
1939
1939
  return !!this.c;
1940
1940
  }, s.isGreaterThan = s.gt = function(h, b) {
1941
- return Hn(this, new k(h, b)) > 0;
1941
+ return Hn(this, new v(h, b)) > 0;
1942
1942
  }, s.isGreaterThanOrEqualTo = s.gte = function(h, b) {
1943
- return (b = Hn(this, new k(h, b))) === 1 || b === 0;
1943
+ return (b = Hn(this, new v(h, b))) === 1 || b === 0;
1944
1944
  }, s.isInteger = function() {
1945
1945
  return !!this.c && ht(this.e / ee) > this.c.length - 2;
1946
1946
  }, s.isLessThan = s.lt = function(h, b) {
1947
- return Hn(this, new k(h, b)) < 0;
1947
+ return Hn(this, new v(h, b)) < 0;
1948
1948
  }, s.isLessThanOrEqualTo = s.lte = function(h, b) {
1949
- return (b = Hn(this, new k(h, b))) === -1 || b === 0;
1949
+ return (b = Hn(this, new v(h, b))) === -1 || b === 0;
1950
1950
  }, s.isNaN = function() {
1951
1951
  return !this.s;
1952
1952
  }, s.isNegative = function() {
@@ -1956,97 +1956,97 @@ function Kp(e) {
1956
1956
  }, s.isZero = function() {
1957
1957
  return !!this.c && this.c[0] == 0;
1958
1958
  }, s.minus = function(h, b) {
1959
- var g, v, E, T, O = this, w = O.s;
1960
- if (h = new k(h, b), b = h.s, !w || !b) return new k(NaN);
1959
+ var g, C, k, T, O = this, w = O.s;
1960
+ if (h = new v(h, b), b = h.s, !w || !b) return new v(NaN);
1961
1961
  if (w != b)
1962
1962
  return h.s = -b, O.plus(h);
1963
1963
  var A = O.e / ee, F = h.e / ee, P = O.c, M = h.c;
1964
1964
  if (!A || !F) {
1965
- if (!P || !M) return P ? (h.s = -b, h) : new k(M ? O : NaN);
1965
+ if (!P || !M) return P ? (h.s = -b, h) : new v(M ? O : NaN);
1966
1966
  if (!P[0] || !M[0])
1967
- return M[0] ? (h.s = -b, h) : new k(P[0] ? O : (
1967
+ return M[0] ? (h.s = -b, h) : new v(P[0] ? O : (
1968
1968
  // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
1969
1969
  i == 3 ? -0 : 0
1970
1970
  ));
1971
1971
  }
1972
1972
  if (A = ht(A), F = ht(F), P = P.slice(), w = A - F) {
1973
- for ((T = w < 0) ? (w = -w, E = P) : (F = A, E = M), E.reverse(), b = w; b--; E.push(0)) ;
1974
- E.reverse();
1973
+ for ((T = w < 0) ? (w = -w, k = P) : (F = A, k = M), k.reverse(), b = w; b--; k.push(0)) ;
1974
+ k.reverse();
1975
1975
  } else
1976
- for (v = (T = (w = P.length) < (b = M.length)) ? w : b, w = b = 0; b < v; b++)
1976
+ for (C = (T = (w = P.length) < (b = M.length)) ? w : b, w = b = 0; b < C; b++)
1977
1977
  if (P[b] != M[b]) {
1978
1978
  T = P[b] < M[b];
1979
1979
  break;
1980
1980
  }
1981
- if (T && (E = P, P = M, M = E, h.s = -h.s), b = (v = M.length) - (g = P.length), b > 0) for (; b--; P[g++] = 0) ;
1982
- for (b = Ct - 1; v > w; ) {
1983
- if (P[--v] < M[v]) {
1984
- for (g = v; g && !P[--g]; P[g] = b) ;
1985
- --P[g], P[v] += Ct;
1981
+ if (T && (k = P, P = M, M = k, h.s = -h.s), b = (C = M.length) - (g = P.length), b > 0) for (; b--; P[g++] = 0) ;
1982
+ for (b = Ct - 1; C > w; ) {
1983
+ if (P[--C] < M[C]) {
1984
+ for (g = C; g && !P[--g]; P[g] = b) ;
1985
+ --P[g], P[C] += Ct;
1986
1986
  }
1987
- P[v] -= M[v];
1987
+ P[C] -= M[C];
1988
1988
  }
1989
1989
  for (; P[0] == 0; P.splice(0, 1), --F) ;
1990
1990
  return P[0] ? D(h, P, F) : (h.s = i == 3 ? -1 : 1, h.c = [h.e = 0], h);
1991
1991
  }, s.modulo = s.mod = function(h, b) {
1992
- var g, v, E = this;
1993
- return h = new k(h, b), !E.c || !h.s || h.c && !h.c[0] ? new k(NaN) : !h.c || E.c && !E.c[0] ? new k(E) : (m == 9 ? (v = h.s, h.s = 1, g = t(E, h, 0, 3), h.s = v, g.s *= v) : g = t(E, h, 0, m), h = E.minus(g.times(h)), !h.c[0] && m == 1 && (h.s = E.s), h);
1992
+ var g, C, k = this;
1993
+ return h = new v(h, b), !k.c || !h.s || h.c && !h.c[0] ? new v(NaN) : !h.c || k.c && !k.c[0] ? new v(k) : (m == 9 ? (C = h.s, h.s = 1, g = t(k, h, 0, 3), h.s = C, g.s *= C) : g = t(k, h, 0, m), h = k.minus(g.times(h)), !h.c[0] && m == 1 && (h.s = k.s), h);
1994
1994
  }, s.multipliedBy = s.times = function(h, b) {
1995
- var g, v, E, T, O, w, A, F, P, M, L, G, X, se, ie, Q = this, Y = Q.c, he = (h = new k(h, b)).c;
1995
+ var g, C, k, T, O, w, A, F, P, M, L, G, X, se, ie, Q = this, Y = Q.c, he = (h = new v(h, b)).c;
1996
1996
  if (!Y || !he || !Y[0] || !he[0])
1997
1997
  return !Q.s || !h.s || Y && !Y[0] && !he || he && !he[0] && !Y ? h.c = h.e = h.s = null : (h.s *= Q.s, !Y || !he ? h.c = h.e = null : (h.c = [0], h.e = 0)), h;
1998
- for (v = ht(Q.e / ee) + ht(h.e / ee), h.s *= Q.s, A = Y.length, M = he.length, A < M && (X = Y, Y = he, he = X, E = A, A = M, M = E), E = A + M, X = []; E--; X.push(0)) ;
1999
- for (se = Ct, ie = gn, E = M; --E >= 0; ) {
2000
- for (g = 0, L = he[E] % ie, G = he[E] / ie | 0, O = A, T = E + O; T > E; )
1998
+ for (C = ht(Q.e / ee) + ht(h.e / ee), h.s *= Q.s, A = Y.length, M = he.length, A < M && (X = Y, Y = he, he = X, k = A, A = M, M = k), k = A + M, X = []; k--; X.push(0)) ;
1999
+ for (se = Ct, ie = gn, k = M; --k >= 0; ) {
2000
+ for (g = 0, L = he[k] % ie, G = he[k] / ie | 0, O = A, T = k + O; T > k; )
2001
2001
  F = Y[--O] % ie, P = Y[O] / ie | 0, w = G * F + P * L, F = L * F + w % ie * ie + X[T] + g, g = (F / se | 0) + (w / ie | 0) + G * P, X[T--] = F % se;
2002
2002
  X[T] = g;
2003
2003
  }
2004
- return g ? ++v : X.splice(0, 1), D(h, X, v);
2004
+ return g ? ++C : X.splice(0, 1), D(h, X, C);
2005
2005
  }, s.negated = function() {
2006
- var h = new k(this);
2006
+ var h = new v(this);
2007
2007
  return h.s = -h.s || null, h;
2008
2008
  }, s.plus = function(h, b) {
2009
- var g, v = this, E = v.s;
2010
- if (h = new k(h, b), b = h.s, !E || !b) return new k(NaN);
2011
- if (E != b)
2012
- return h.s = -b, v.minus(h);
2013
- var T = v.e / ee, O = h.e / ee, w = v.c, A = h.c;
2009
+ var g, C = this, k = C.s;
2010
+ if (h = new v(h, b), b = h.s, !k || !b) return new v(NaN);
2011
+ if (k != b)
2012
+ return h.s = -b, C.minus(h);
2013
+ var T = C.e / ee, O = h.e / ee, w = C.c, A = h.c;
2014
2014
  if (!T || !O) {
2015
- if (!w || !A) return new k(E / 0);
2016
- if (!w[0] || !A[0]) return A[0] ? h : new k(w[0] ? v : E * 0);
2015
+ if (!w || !A) return new v(k / 0);
2016
+ if (!w[0] || !A[0]) return A[0] ? h : new v(w[0] ? C : k * 0);
2017
2017
  }
2018
- if (T = ht(T), O = ht(O), w = w.slice(), E = T - O) {
2019
- for (E > 0 ? (O = T, g = A) : (E = -E, g = w), g.reverse(); E--; g.push(0)) ;
2018
+ if (T = ht(T), O = ht(O), w = w.slice(), k = T - O) {
2019
+ for (k > 0 ? (O = T, g = A) : (k = -k, g = w), g.reverse(); k--; g.push(0)) ;
2020
2020
  g.reverse();
2021
2021
  }
2022
- for (E = w.length, b = A.length, E - b < 0 && (g = A, A = w, w = g, b = E), E = 0; b; )
2023
- E = (w[--b] = w[b] + A[b] + E) / Ct | 0, w[b] = Ct === w[b] ? 0 : w[b] % Ct;
2024
- return E && (w = [E].concat(w), ++O), D(h, w, O);
2022
+ for (k = w.length, b = A.length, k - b < 0 && (g = A, A = w, w = g, b = k), k = 0; b; )
2023
+ k = (w[--b] = w[b] + A[b] + k) / Ct | 0, w[b] = Ct === w[b] ? 0 : w[b] % Ct;
2024
+ return k && (w = [k].concat(w), ++O), D(h, w, O);
2025
2025
  }, s.precision = s.sd = function(h, b) {
2026
- var g, v, E, T = this;
2026
+ var g, C, k, T = this;
2027
2027
  if (h != null && h !== !!h)
2028
- return ye(h, 1, Fe), b == null ? b = i : ye(b, 0, 8), N(new k(T), h, b);
2028
+ return ye(h, 1, Fe), b == null ? b = i : ye(b, 0, 8), N(new v(T), h, b);
2029
2029
  if (!(g = T.c)) return null;
2030
- if (E = g.length - 1, v = E * ee + 1, E = g[E]) {
2031
- for (; E % 10 == 0; E /= 10, v--) ;
2032
- for (E = g[0]; E >= 10; E /= 10, v++) ;
2030
+ if (k = g.length - 1, C = k * ee + 1, k = g[k]) {
2031
+ for (; k % 10 == 0; k /= 10, C--) ;
2032
+ for (k = g[0]; k >= 10; k /= 10, C++) ;
2033
2033
  }
2034
- return h && T.e + 1 > v && (v = T.e + 1), v;
2034
+ return h && T.e + 1 > C && (C = T.e + 1), C;
2035
2035
  }, s.shiftedBy = function(h) {
2036
2036
  return ye(h, -_i, _i), this.times("1e" + h);
2037
2037
  }, s.squareRoot = s.sqrt = function() {
2038
- var h, b, g, v, E, T = this, O = T.c, w = T.s, A = T.e, F = o + 4, P = new k("0.5");
2038
+ var h, b, g, C, k, T = this, O = T.c, w = T.s, A = T.e, F = o + 4, P = new v("0.5");
2039
2039
  if (w !== 1 || !O || !O[0])
2040
- return new k(!w || w < 0 && (!O || O[0]) ? NaN : O ? T : 1 / 0);
2041
- if (w = Math.sqrt(+R(T)), w == 0 || w == 1 / 0 ? (b = pt(O), (b.length + A) % 2 == 0 && (b += "0"), w = Math.sqrt(+b), A = ht((A + 1) / 2) - (A < 0 || A % 2), w == 1 / 0 ? b = "5e" + A : (b = w.toExponential(), b = b.slice(0, b.indexOf("e") + 1) + A), g = new k(b)) : g = new k(w + ""), g.c[0]) {
2040
+ return new v(!w || w < 0 && (!O || O[0]) ? NaN : O ? T : 1 / 0);
2041
+ if (w = Math.sqrt(+R(T)), w == 0 || w == 1 / 0 ? (b = pt(O), (b.length + A) % 2 == 0 && (b += "0"), w = Math.sqrt(+b), A = ht((A + 1) / 2) - (A < 0 || A % 2), w == 1 / 0 ? b = "5e" + A : (b = w.toExponential(), b = b.slice(0, b.indexOf("e") + 1) + A), g = new v(b)) : g = new v(w + ""), g.c[0]) {
2042
2042
  for (A = g.e, w = A + F, w < 3 && (w = 0); ; )
2043
- if (E = g, g = P.times(E.plus(t(T, E, F, 1))), pt(E.c).slice(0, w) === (b = pt(g.c)).slice(0, w))
2044
- if (g.e < A && --w, b = b.slice(w - 3, w + 1), b == "9999" || !v && b == "4999") {
2045
- if (!v && (N(E, E.e + o + 2, 0), E.times(E).eq(T))) {
2046
- g = E;
2043
+ if (k = g, g = P.times(k.plus(t(T, k, F, 1))), pt(k.c).slice(0, w) === (b = pt(g.c)).slice(0, w))
2044
+ if (g.e < A && --w, b = b.slice(w - 3, w + 1), b == "9999" || !C && b == "4999") {
2045
+ if (!C && (N(k, k.e + o + 2, 0), k.times(k).eq(T))) {
2046
+ g = k;
2047
2047
  break;
2048
2048
  }
2049
- F += 4, w += 4, v = 1;
2049
+ F += 4, w += 4, C = 1;
2050
2050
  } else {
2051
2051
  (!+b || !+b.slice(1) && b.charAt(0) == "5") && (N(g, g.e + o + 2, 1), h = !g.times(g).eq(T));
2052
2052
  break;
@@ -2054,47 +2054,47 @@ function Kp(e) {
2054
2054
  }
2055
2055
  return N(g, g.e + o + 1, i, h);
2056
2056
  }, s.toExponential = function(h, b) {
2057
- return h != null && (ye(h, 0, Fe), h++), U(this, h, b, 1);
2057
+ return h != null && (ye(h, 0, Fe), h++), B(this, h, b, 1);
2058
2058
  }, s.toFixed = function(h, b) {
2059
- return h != null && (ye(h, 0, Fe), h = h + this.e + 1), U(this, h, b);
2059
+ return h != null && (ye(h, 0, Fe), h = h + this.e + 1), B(this, h, b);
2060
2060
  }, s.toFormat = function(h, b, g) {
2061
- var v, E = this;
2061
+ var C, k = this;
2062
2062
  if (g == null)
2063
2063
  h != null && b && typeof b == "object" ? (g = b, b = null) : h && typeof h == "object" ? (g = h, h = b = null) : g = x;
2064
2064
  else if (typeof g != "object")
2065
2065
  throw Error(Xe + "Argument not an object: " + g);
2066
- if (v = E.toFixed(h, b), E.c) {
2067
- var T, O = v.split("."), w = +g.groupSize, A = +g.secondaryGroupSize, F = g.groupSeparator || "", P = O[0], M = O[1], L = E.s < 0, G = L ? P.slice(1) : P, X = G.length;
2066
+ if (C = k.toFixed(h, b), k.c) {
2067
+ var T, O = C.split("."), w = +g.groupSize, A = +g.secondaryGroupSize, F = g.groupSeparator || "", P = O[0], M = O[1], L = k.s < 0, G = L ? P.slice(1) : P, X = G.length;
2068
2068
  if (A && (T = w, w = A, A = T, X -= T), w > 0 && X > 0) {
2069
2069
  for (T = X % w || w, P = G.substr(0, T); T < X; T += w) P += F + G.substr(T, w);
2070
2070
  A > 0 && (P += F + G.slice(T)), L && (P = "-" + P);
2071
2071
  }
2072
- v = M ? P + (g.decimalSeparator || "") + ((A = +g.fractionGroupSize) ? M.replace(
2072
+ C = M ? P + (g.decimalSeparator || "") + ((A = +g.fractionGroupSize) ? M.replace(
2073
2073
  new RegExp("\\d{" + A + "}\\B", "g"),
2074
2074
  "$&" + (g.fractionGroupSeparator || "")
2075
2075
  ) : M) : P;
2076
2076
  }
2077
- return (g.prefix || "") + v + (g.suffix || "");
2077
+ return (g.prefix || "") + C + (g.suffix || "");
2078
2078
  }, s.toFraction = function(h) {
2079
- var b, g, v, E, T, O, w, A, F, P, M, L, G = this, X = G.c;
2080
- if (h != null && (w = new k(h), !w.isInteger() && (w.c || w.s !== 1) || w.lt(a)))
2079
+ var b, g, C, k, T, O, w, A, F, P, M, L, G = this, X = G.c;
2080
+ if (h != null && (w = new v(h), !w.isInteger() && (w.c || w.s !== 1) || w.lt(a)))
2081
2081
  throw Error(Xe + "Argument " + (w.isInteger() ? "out of range: " : "not an integer: ") + R(w));
2082
- if (!X) return new k(G);
2083
- for (b = new k(a), F = g = new k(a), v = A = new k(a), L = pt(X), T = b.e = L.length - G.e - 1, b.c[0] = zi[(O = T % ee) < 0 ? ee + O : O], h = !h || w.comparedTo(b) > 0 ? T > 0 ? b : F : w, O = p, p = 1 / 0, w = new k(L), A.c[0] = 0; P = t(w, b, 0, 1), E = g.plus(P.times(v)), E.comparedTo(h) != 1; )
2084
- g = v, v = E, F = A.plus(P.times(E = F)), A = E, b = w.minus(P.times(E = b)), w = E;
2085
- return E = t(h.minus(g), v, 0, 1), A = A.plus(E.times(F)), g = g.plus(E.times(v)), A.s = F.s = G.s, T = T * 2, M = t(F, v, T, i).minus(G).abs().comparedTo(
2082
+ if (!X) return new v(G);
2083
+ for (b = new v(a), F = g = new v(a), C = A = new v(a), L = pt(X), T = b.e = L.length - G.e - 1, b.c[0] = zi[(O = T % ee) < 0 ? ee + O : O], h = !h || w.comparedTo(b) > 0 ? T > 0 ? b : F : w, O = p, p = 1 / 0, w = new v(L), A.c[0] = 0; P = t(w, b, 0, 1), k = g.plus(P.times(C)), k.comparedTo(h) != 1; )
2084
+ g = C, C = k, F = A.plus(P.times(k = F)), A = k, b = w.minus(P.times(k = b)), w = k;
2085
+ return k = t(h.minus(g), C, 0, 1), A = A.plus(k.times(F)), g = g.plus(k.times(C)), A.s = F.s = G.s, T = T * 2, M = t(F, C, T, i).minus(G).abs().comparedTo(
2086
2086
  t(A, g, T, i).minus(G).abs()
2087
- ) < 1 ? [F, v] : [A, g], p = O, M;
2087
+ ) < 1 ? [F, C] : [A, g], p = O, M;
2088
2088
  }, s.toNumber = function() {
2089
2089
  return +R(this);
2090
2090
  }, s.toPrecision = function(h, b) {
2091
- return h != null && ye(h, 1, Fe), U(this, h, b, 2);
2091
+ return h != null && ye(h, 1, Fe), B(this, h, b, 2);
2092
2092
  }, s.toString = function(h) {
2093
- var b, g = this, v = g.s, E = g.e;
2094
- return E === null ? v ? (b = "Infinity", v < 0 && (b = "-" + b)) : b = "NaN" : (h == null ? b = E <= c || E >= l ? Va(pt(g.c), E) : Wt(pt(g.c), E, "0") : h === 10 && B ? (g = N(new k(g), o + E + 1, i), b = Wt(pt(g.c), g.e, "0")) : (ye(h, 2, S.length, "Base"), b = n(Wt(pt(g.c), E, "0"), 10, h, v, !0)), v < 0 && g.c[0] && (b = "-" + b)), b;
2093
+ var b, g = this, C = g.s, k = g.e;
2094
+ return k === null ? C ? (b = "Infinity", C < 0 && (b = "-" + b)) : b = "NaN" : (h == null ? b = k <= c || k >= l ? Va(pt(g.c), k) : Wt(pt(g.c), k, "0") : h === 10 && U ? (g = N(new v(g), o + k + 1, i), b = Wt(pt(g.c), g.e, "0")) : (ye(h, 2, S.length, "Base"), b = n(Wt(pt(g.c), k, "0"), 10, h, C, !0)), C < 0 && g.c[0] && (b = "-" + b)), b;
2095
2095
  }, s.valueOf = s.toJSON = function() {
2096
2096
  return R(this);
2097
- }, s._isBigNumber = !0, s[Symbol.toStringTag] = "BigNumber", s[Symbol.for("nodejs.util.inspect.custom")] = s.valueOf, e != null && k.set(e), k;
2097
+ }, s._isBigNumber = !0, s[Symbol.toStringTag] = "BigNumber", s[Symbol.for("nodejs.util.inspect.custom")] = s.valueOf, e != null && v.set(e), v;
2098
2098
  }
2099
2099
  function ht(e) {
2100
2100
  var t = e | 0;
@@ -2439,7 +2439,7 @@ const cr = (e) => e ? e.value * e.unit : 0, I1 = (e) => !e || e === "NaN" ? "0"
2439
2439
  const { nonce: m, epoch: y, deadline: x, freshness: S } = Jp(
2440
2440
  a,
2441
2441
  s
2442
- ), B = f === re.TAKE_PROFIT ? Al : d, k = f === re.TAKE_PROFIT ? d : l, U = {
2442
+ ), U = f === re.TAKE_PROFIT ? Al : d, v = f === re.TAKE_PROFIT ? d : l, B = {
2443
2443
  permitted: {
2444
2444
  token: t,
2445
2445
  amount: r
@@ -2471,8 +2471,8 @@ const cr = (e) => e ? e.value * e.unit : 0, I1 = (e) => !e || e === "NaN" ? "0"
2471
2471
  },
2472
2472
  output: {
2473
2473
  token: n,
2474
- limit: _(k || 0).toFixed(),
2475
- stop: _(B || 0).toFixed(),
2474
+ limit: _(v || 0).toFixed(),
2475
+ stop: _(U || 0).toFixed(),
2476
2476
  recipient: i
2477
2477
  }
2478
2478
  }
@@ -2484,7 +2484,7 @@ const cr = (e) => e ? e.value * e.unit : 0, I1 = (e) => !e || e === "NaN" ? "0"
2484
2484
  chainId: e,
2485
2485
  verifyingContract: p.repermit
2486
2486
  },
2487
- order: U,
2487
+ order: B,
2488
2488
  types: w1,
2489
2489
  primaryType: qp
2490
2490
  };
@@ -2506,7 +2506,7 @@ const cr = (e) => e ? e.value * e.unit : 0, I1 = (e) => !e || e === "NaN" ? "0"
2506
2506
  const { nonce: m, epoch: y, deadline: x, freshness: S } = Jp(
2507
2507
  a,
2508
2508
  s
2509
- ), B = Math.floor(Date.now() / 1e3).toString(), k = l, U = f === re.STOP_LOSS ? d : "0", C = f === re.TAKE_PROFIT ? d : "0", D = {
2509
+ ), U = Math.floor(Date.now() / 1e3).toString(), v = l, B = f === re.STOP_LOSS ? d : "0", E = f === re.TAKE_PROFIT ? d : "0", D = {
2510
2510
  permitted: {
2511
2511
  token: t,
2512
2512
  amount: r
@@ -2525,7 +2525,7 @@ const cr = (e) => e ? e.value * e.unit : 0, I1 = (e) => !e || e === "NaN" ? "0"
2525
2525
  },
2526
2526
  swapper: i,
2527
2527
  nonce: m,
2528
- start: B,
2528
+ start: U,
2529
2529
  deadline: x,
2530
2530
  chainid: e,
2531
2531
  exclusivity: 0,
@@ -2539,9 +2539,9 @@ const cr = (e) => e ? e.value * e.unit : 0, I1 = (e) => !e || e === "NaN" ? "0"
2539
2539
  },
2540
2540
  output: {
2541
2541
  token: n,
2542
- limit: _(k || 0).toFixed(),
2543
- triggerLower: _(U || 0).toFixed(),
2544
- triggerUpper: _(C || 0).toFixed(),
2542
+ limit: _(v || 0).toFixed(),
2543
+ triggerLower: _(B || 0).toFixed(),
2544
+ triggerUpper: _(E || 0).toFixed(),
2545
2545
  recipient: i
2546
2546
  }
2547
2547
  }
@@ -3246,7 +3246,7 @@ const Ib = async ({
3246
3246
  }) => (await Promise.all([
3247
3247
  s ? Ib({ chainId: n, signal: e, page: t, limit: r, filters: { accounts: [a], configs: s.twapConfig ? [s.twapConfig] : [] } }) : Promise.resolve([]),
3248
3248
  kb({ chainId: n, signal: e, account: a, exchange: s == null ? void 0 : s.adapter, isDev: o })
3249
- ]).then(([l, d]) => [...l, ...d])).sort((l, d) => d.createdAt - l.createdAt), Mb = "1.1.16", Rb = {
3249
+ ]).then(([l, d]) => [...l, ...d])).sort((l, d) => d.createdAt - l.createdAt), Mb = "1.1.17", Rb = {
3250
3250
  version: Mb
3251
3251
  }, od = (e) => {
3252
3252
  let t;
@@ -7417,20 +7417,20 @@ class tf extends Y0 {
7417
7417
  this.Ah = t | 0, this.Al = n | 0, this.Bh = r | 0, this.Bl = s | 0, this.Ch = a | 0, this.Cl = o | 0, this.Dh = i | 0, this.Dl = c | 0, this.Eh = l | 0, this.El = d | 0, this.Fh = p | 0, this.Fl = f | 0, this.Gh = m | 0, this.Gl = y | 0, this.Hh = x | 0, this.Hl = S | 0;
7418
7418
  }
7419
7419
  process(t, n) {
7420
- for (let U = 0; U < 16; U++, n += 4)
7421
- kn[U] = t.getUint32(n), Cn[U] = t.getUint32(n += 4);
7422
- for (let U = 16; U < 80; U++) {
7423
- const C = kn[U - 15] | 0, D = Cn[U - 15] | 0, N = Sr(C, D, 1) ^ Sr(C, D, 8) ^ gd(C, D, 7), R = Pr(C, D, 1) ^ Pr(C, D, 8) ^ wd(C, D, 7), h = kn[U - 2] | 0, b = Cn[U - 2] | 0, g = Sr(h, b, 19) ^ Ka(h, b, 61) ^ gd(h, b, 6), v = Pr(h, b, 19) ^ Wa(h, b, 61) ^ wd(h, b, 6), E = o6(R, v, Cn[U - 7], Cn[U - 16]), T = i6(E, N, g, kn[U - 7], kn[U - 16]);
7424
- kn[U] = T | 0, Cn[U] = E | 0;
7420
+ for (let B = 0; B < 16; B++, n += 4)
7421
+ kn[B] = t.getUint32(n), Cn[B] = t.getUint32(n += 4);
7422
+ for (let B = 16; B < 80; B++) {
7423
+ const E = kn[B - 15] | 0, D = Cn[B - 15] | 0, N = Sr(E, D, 1) ^ Sr(E, D, 8) ^ gd(E, D, 7), R = Pr(E, D, 1) ^ Pr(E, D, 8) ^ wd(E, D, 7), h = kn[B - 2] | 0, b = Cn[B - 2] | 0, g = Sr(h, b, 19) ^ Ka(h, b, 61) ^ gd(h, b, 6), C = Pr(h, b, 19) ^ Wa(h, b, 61) ^ wd(h, b, 6), k = o6(R, C, Cn[B - 7], Cn[B - 16]), T = i6(k, N, g, kn[B - 7], kn[B - 16]);
7424
+ kn[B] = T | 0, Cn[B] = k | 0;
7425
7425
  }
7426
- let { Ah: r, Al: s, Bh: a, Bl: o, Ch: i, Cl: c, Dh: l, Dl: d, Eh: p, El: f, Fh: m, Fl: y, Gh: x, Gl: S, Hh: B, Hl: k } = this;
7427
- for (let U = 0; U < 80; U++) {
7428
- const C = Sr(p, f, 14) ^ Sr(p, f, 18) ^ Ka(p, f, 41), D = Pr(p, f, 14) ^ Pr(p, f, 18) ^ Wa(p, f, 41), N = p & m ^ ~p & x, R = f & y ^ ~f & S, h = c6(k, D, R, H2[U], Cn[U]), b = l6(h, B, C, N, $2[U], kn[U]), g = h | 0, v = Sr(r, s, 28) ^ Ka(r, s, 34) ^ Ka(r, s, 39), E = Pr(r, s, 28) ^ Wa(r, s, 34) ^ Wa(r, s, 39), T = r & a ^ r & i ^ a & i, O = s & o ^ s & c ^ o & c;
7429
- B = x | 0, k = S | 0, x = m | 0, S = y | 0, m = p | 0, y = f | 0, { h: p, l: f } = Qt(l | 0, d | 0, b | 0, g | 0), l = i | 0, d = c | 0, i = a | 0, c = o | 0, a = r | 0, o = s | 0;
7430
- const w = s6(g, E, O);
7431
- r = a6(w, b, v, T), s = w | 0;
7426
+ let { Ah: r, Al: s, Bh: a, Bl: o, Ch: i, Cl: c, Dh: l, Dl: d, Eh: p, El: f, Fh: m, Fl: y, Gh: x, Gl: S, Hh: U, Hl: v } = this;
7427
+ for (let B = 0; B < 80; B++) {
7428
+ const E = Sr(p, f, 14) ^ Sr(p, f, 18) ^ Ka(p, f, 41), D = Pr(p, f, 14) ^ Pr(p, f, 18) ^ Wa(p, f, 41), N = p & m ^ ~p & x, R = f & y ^ ~f & S, h = c6(v, D, R, H2[B], Cn[B]), b = l6(h, U, E, N, $2[B], kn[B]), g = h | 0, C = Sr(r, s, 28) ^ Ka(r, s, 34) ^ Ka(r, s, 39), k = Pr(r, s, 28) ^ Wa(r, s, 34) ^ Wa(r, s, 39), T = r & a ^ r & i ^ a & i, O = s & o ^ s & c ^ o & c;
7429
+ U = x | 0, v = S | 0, x = m | 0, S = y | 0, m = p | 0, y = f | 0, { h: p, l: f } = Qt(l | 0, d | 0, b | 0, g | 0), l = i | 0, d = c | 0, i = a | 0, c = o | 0, a = r | 0, o = s | 0;
7430
+ const w = s6(g, k, O);
7431
+ r = a6(w, b, C, T), s = w | 0;
7432
7432
  }
7433
- ({ h: r, l: s } = Qt(this.Ah | 0, this.Al | 0, r | 0, s | 0)), { h: a, l: o } = Qt(this.Bh | 0, this.Bl | 0, a | 0, o | 0), { h: i, l: c } = Qt(this.Ch | 0, this.Cl | 0, i | 0, c | 0), { h: l, l: d } = Qt(this.Dh | 0, this.Dl | 0, l | 0, d | 0), { h: p, l: f } = Qt(this.Eh | 0, this.El | 0, p | 0, f | 0), { h: m, l: y } = Qt(this.Fh | 0, this.Fl | 0, m | 0, y | 0), { h: x, l: S } = Qt(this.Gh | 0, this.Gl | 0, x | 0, S | 0), { h: B, l: k } = Qt(this.Hh | 0, this.Hl | 0, B | 0, k | 0), this.set(r, s, a, o, i, c, l, d, p, f, m, y, x, S, B, k);
7433
+ ({ h: r, l: s } = Qt(this.Ah | 0, this.Al | 0, r | 0, s | 0)), { h: a, l: o } = Qt(this.Bh | 0, this.Bl | 0, a | 0, o | 0), { h: i, l: c } = Qt(this.Ch | 0, this.Cl | 0, i | 0, c | 0), { h: l, l: d } = Qt(this.Dh | 0, this.Dl | 0, l | 0, d | 0), { h: p, l: f } = Qt(this.Eh | 0, this.El | 0, p | 0, f | 0), { h: m, l: y } = Qt(this.Fh | 0, this.Fl | 0, m | 0, y | 0), { h: x, l: S } = Qt(this.Gh | 0, this.Gl | 0, x | 0, S | 0), { h: U, l: v } = Qt(this.Hh | 0, this.Hl | 0, U | 0, v | 0), this.set(r, s, a, o, i, c, l, d, p, f, m, y, x, S, U, v);
7434
7434
  }
7435
7435
  roundClean() {
7436
7436
  Mn(kn, Cn);
@@ -7564,8 +7564,8 @@ async function zn(e) {
7564
7564
  return it(t);
7565
7565
  }
7566
7566
  async function Yl(e, t) {
7567
- var h, b, g, v, E;
7568
- const { account: n = e.account, accessList: r, authorizationList: s, chain: a = e.chain, blobVersionedHashes: o, blobs: i, data: c, gas: l, gasPrice: d, maxFeePerBlobGas: p, maxFeePerGas: f, maxPriorityFeePerGas: m, nonce: y, nonceManager: x, to: S, type: B, value: k, ...U } = t, C = await (async () => {
7567
+ var h, b, g, C, k;
7568
+ const { account: n = e.account, accessList: r, authorizationList: s, chain: a = e.chain, blobVersionedHashes: o, blobs: i, data: c, gas: l, gasPrice: d, maxFeePerBlobGas: p, maxFeePerGas: f, maxPriorityFeePerGas: m, nonce: y, nonceManager: x, to: S, type: U, value: v, ...B } = t, E = await (async () => {
7569
7569
  if (!n || !x || typeof y < "u")
7570
7570
  return y;
7571
7571
  const T = me(n), O = a ? a.id : await q(e, zn, "getChainId")({});
@@ -7578,7 +7578,7 @@ async function Yl(e, t) {
7578
7578
  Kt(t);
7579
7579
  const D = (b = (h = a == null ? void 0 : a.formatters) == null ? void 0 : h.transactionRequest) == null ? void 0 : b.format, R = (D || Dt)({
7580
7580
  // Pick out extra data that might exist on the chain's transaction request type.
7581
- ...kr(U, { format: D }),
7581
+ ...kr(B, { format: D }),
7582
7582
  account: n ? me(n) : void 0,
7583
7583
  accessList: r,
7584
7584
  authorizationList: s,
@@ -7590,16 +7590,16 @@ async function Yl(e, t) {
7590
7590
  maxFeePerBlobGas: p,
7591
7591
  maxFeePerGas: f,
7592
7592
  maxPriorityFeePerGas: m,
7593
- nonce: C,
7593
+ nonce: E,
7594
7594
  to: S,
7595
- type: B,
7596
- value: k
7595
+ type: U,
7596
+ value: v
7597
7597
  }, "fillTransaction");
7598
7598
  try {
7599
7599
  const T = await e.request({
7600
7600
  method: "eth_fillTransaction",
7601
7601
  params: [R]
7602
- }), w = (((v = (g = a == null ? void 0 : a.formatters) == null ? void 0 : g.transaction) == null ? void 0 : v.format) || Cr)(T.tx);
7602
+ }), w = (((C = (g = a == null ? void 0 : a.formatters) == null ? void 0 : g.transaction) == null ? void 0 : C.format) || Cr)(T.tx);
7603
7603
  delete w.blockHash, delete w.blockNumber, delete w.r, delete w.s, delete w.transactionIndex, delete w.v, delete w.yParity, w.data = w.input, w.gas && (w.gas = t.gas ?? w.gas), w.gasPrice && (w.gasPrice = t.gasPrice ?? w.gasPrice), w.maxFeePerBlobGas && (w.maxFeePerBlobGas = t.maxFeePerBlobGas ?? w.maxFeePerBlobGas), w.maxFeePerGas && (w.maxFeePerGas = t.maxFeePerGas ?? w.maxFeePerGas), w.maxPriorityFeePerGas && (w.maxPriorityFeePerGas = t.maxPriorityFeePerGas ?? w.maxPriorityFeePerGas), w.nonce && (w.nonce = t.nonce ?? w.nonce);
7604
7604
  const A = await (async () => {
7605
7605
  var L, G;
@@ -7615,7 +7615,7 @@ async function Yl(e, t) {
7615
7615
  })();
7616
7616
  if (A < 1)
7617
7617
  throw new X0();
7618
- const P = 10 ** (((E = A.toString().split(".")[1]) == null ? void 0 : E.length) ?? 0), M = (L) => L * BigInt(Math.ceil(A * P)) / BigInt(P);
7618
+ const P = 10 ** (((k = A.toString().split(".")[1]) == null ? void 0 : k.length) ?? 0), M = (L) => L * BigInt(Math.ceil(A * P)) / BigInt(P);
7619
7619
  return w.maxFeePerGas && !t.maxFeePerGas && (w.maxFeePerGas = M(w.maxFeePerGas)), w.gasPrice && !t.gasPrice && (w.gasPrice = M(w.gasPrice)), {
7620
7620
  raw: T.raw,
7621
7621
  transaction: {
@@ -7639,7 +7639,7 @@ const eu = [
7639
7639
  "type"
7640
7640
  ], Md = /* @__PURE__ */ new Map(), qi = /* @__PURE__ */ new ds(128);
7641
7641
  async function Pa(e, t) {
7642
- var C, D, N;
7642
+ var E, D, N;
7643
7643
  let n = t;
7644
7644
  n.account ?? (n.account = e.account), n.parameters ?? (n.parameters = eu);
7645
7645
  const { account: r, chain: s = e.chain, nonceManager: a, parameters: o } = n, i = (() => {
@@ -7668,19 +7668,19 @@ async function Pa(e, t) {
7668
7668
  client: e
7669
7669
  });
7670
7670
  }
7671
- i != null && i.fn && ((C = i.runAt) != null && C.includes("beforeFillTransaction")) && (n = await i.fn({ ...n, chain: s }, {
7671
+ i != null && i.fn && ((E = i.runAt) != null && E.includes("beforeFillTransaction")) && (n = await i.fn({ ...n, chain: s }, {
7672
7672
  phase: "beforeFillTransaction"
7673
7673
  }), p ?? (p = n.nonce));
7674
7674
  const m = ((o.includes("blobVersionedHashes") || o.includes("sidecars")) && n.kzg && n.blobs || qi.get(e.uid) === !1 || !["fees", "gas"].some((h) => o.includes(h)) ? !1 : !!(o.includes("chainId") && typeof n.chainId != "number" || o.includes("nonce") && typeof p != "number" || o.includes("fees") && typeof n.gasPrice != "bigint" && (typeof n.maxFeePerGas != "bigint" || typeof n.maxPriorityFeePerGas != "bigint") || o.includes("gas") && typeof n.gas != "bigint")) ? await q(e, Yl, "fillTransaction")({ ...n, nonce: p }).then((R) => {
7675
- const { chainId: h, from: b, gas: g, gasPrice: v, nonce: E, maxFeePerBlobGas: T, maxFeePerGas: O, maxPriorityFeePerGas: w, type: A, ...F } = R.transaction;
7675
+ const { chainId: h, from: b, gas: g, gasPrice: C, nonce: k, maxFeePerBlobGas: T, maxFeePerGas: O, maxPriorityFeePerGas: w, type: A, ...F } = R.transaction;
7676
7676
  return qi.set(e.uid, !0), {
7677
7677
  ...n,
7678
7678
  ...b ? { from: b } : {},
7679
7679
  ...A ? { type: A } : {},
7680
7680
  ...typeof h < "u" ? { chainId: h } : {},
7681
7681
  ...typeof g < "u" ? { gas: g } : {},
7682
- ...typeof v < "u" ? { gasPrice: v } : {},
7683
- ...typeof E < "u" ? { nonce: E } : {},
7682
+ ...typeof C < "u" ? { gasPrice: C } : {},
7683
+ ...typeof k < "u" ? { nonce: k } : {},
7684
7684
  ...typeof T < "u" ? { maxFeePerBlobGas: T } : {},
7685
7685
  ...typeof O < "u" ? { maxFeePerGas: O } : {},
7686
7686
  ...typeof w < "u" ? { maxPriorityFeePerGas: w } : {},
@@ -7689,9 +7689,9 @@ async function Pa(e, t) {
7689
7689
  }).catch((R) => {
7690
7690
  var g;
7691
7691
  const h = R;
7692
- return h.name !== "TransactionExecutionError" || ((g = h.walk) == null ? void 0 : g.call(h, (v) => {
7693
- const E = v;
7694
- return E.name === "MethodNotFoundRpcError" || E.name === "MethodNotSupportedRpcError";
7692
+ return h.name !== "TransactionExecutionError" || ((g = h.walk) == null ? void 0 : g.call(h, (C) => {
7693
+ const k = C;
7694
+ return k.name === "MethodNotFoundRpcError" || k.name === "MethodNotSupportedRpcError";
7695
7695
  })) && qi.set(e.uid, !1), n;
7696
7696
  }) : n;
7697
7697
  p ?? (p = m.nonce), n = {
@@ -7699,13 +7699,13 @@ async function Pa(e, t) {
7699
7699
  ...d ? { from: d == null ? void 0 : d.address } : {},
7700
7700
  ...p ? { nonce: p } : {}
7701
7701
  };
7702
- const { blobs: y, gas: x, kzg: S, type: B } = n;
7702
+ const { blobs: y, gas: x, kzg: S, type: U } = n;
7703
7703
  i != null && i.fn && ((D = i.runAt) != null && D.includes("beforeFillParameters")) && (n = await i.fn({ ...n, chain: s }, {
7704
7704
  phase: "beforeFillParameters"
7705
7705
  }));
7706
- let k;
7707
- async function U() {
7708
- return k || (k = await q(e, Pt, "getBlock")({ blockTag: "latest" }), k);
7706
+ let v;
7707
+ async function B() {
7708
+ return v || (v = await q(e, Pt, "getBlock")({ blockTag: "latest" }), v);
7709
7709
  }
7710
7710
  if (o.includes("nonce") && typeof p > "u" && d && !a && (n.nonce = await q(e, Kl, "getTransactionCount")({
7711
7711
  address: d.address,
@@ -7729,13 +7729,13 @@ async function Pa(e, t) {
7729
7729
  n.sidecars = b;
7730
7730
  }
7731
7731
  }
7732
- if (o.includes("chainId") && (n.chainId = await l()), (o.includes("fees") || o.includes("type")) && typeof B > "u")
7732
+ if (o.includes("chainId") && (n.chainId = await l()), (o.includes("fees") || o.includes("type")) && typeof U > "u")
7733
7733
  try {
7734
7734
  n.type = Jl(n);
7735
7735
  } catch {
7736
7736
  let R = Md.get(e.uid);
7737
7737
  if (typeof R > "u") {
7738
- const h = await U();
7738
+ const h = await B();
7739
7739
  R = typeof (h == null ? void 0 : h.baseFeePerGas) == "bigint", Md.set(e.uid, R);
7740
7740
  }
7741
7741
  n.type = R ? "eip1559" : "legacy";
@@ -7743,7 +7743,7 @@ async function Pa(e, t) {
7743
7743
  if (o.includes("fees"))
7744
7744
  if (n.type !== "legacy" && n.type !== "eip2930") {
7745
7745
  if (typeof n.maxFeePerGas > "u" || typeof n.maxPriorityFeePerGas > "u") {
7746
- const R = await U(), { maxFeePerGas: h, maxPriorityFeePerGas: b } = await Lc(e, {
7746
+ const R = await B(), { maxFeePerGas: h, maxPriorityFeePerGas: b } = await Lc(e, {
7747
7747
  block: R,
7748
7748
  chain: s,
7749
7749
  request: n
@@ -7758,7 +7758,7 @@ async function Pa(e, t) {
7758
7758
  if (typeof n.maxFeePerGas < "u" || typeof n.maxPriorityFeePerGas < "u")
7759
7759
  throw new Gl();
7760
7760
  if (typeof n.gasPrice > "u") {
7761
- const R = await U(), { gasPrice: h } = await Lc(e, {
7761
+ const R = await B(), { gasPrice: h } = await Lc(e, {
7762
7762
  block: R,
7763
7763
  chain: s,
7764
7764
  request: n,
@@ -7793,14 +7793,14 @@ async function tu(e, t) {
7793
7793
  }).catch(() => {
7794
7794
  throw new z("`to` is required. Could not infer from `authorizationList`");
7795
7795
  });
7796
- })(), { accessList: d, authorizationList: p, blobs: f, blobVersionedHashes: m, blockNumber: y, blockTag: x, data: S, gas: B, gasPrice: k, maxFeePerBlobGas: U, maxFeePerGas: C, maxPriorityFeePerGas: D, nonce: N, value: R, stateOverride: h, ...b } = r ? await Pa(e, {
7796
+ })(), { accessList: d, authorizationList: p, blobs: f, blobVersionedHashes: m, blockNumber: y, blockTag: x, data: S, gas: U, gasPrice: v, maxFeePerBlobGas: B, maxFeePerGas: E, maxPriorityFeePerGas: D, nonce: N, value: R, stateOverride: h, ...b } = r ? await Pa(e, {
7797
7797
  ...t,
7798
7798
  parameters: a,
7799
7799
  to: l
7800
7800
  }) : t;
7801
- if (B && t.gas !== B)
7802
- return B;
7803
- const v = (typeof y == "bigint" ? H(y) : void 0) || x, E = Hl(h);
7801
+ if (U && t.gas !== U)
7802
+ return U;
7803
+ const C = (typeof y == "bigint" ? H(y) : void 0) || x, k = Hl(h);
7804
7804
  Kt(t);
7805
7805
  const T = (c = (i = (o = e.chain) == null ? void 0 : o.formatters) == null ? void 0 : i.transactionRequest) == null ? void 0 : c.format, w = (T || Dt)({
7806
7806
  // Pick out extra data that might exist on the chain's transaction request type.
@@ -7811,9 +7811,9 @@ async function tu(e, t) {
7811
7811
  blobs: f,
7812
7812
  blobVersionedHashes: m,
7813
7813
  data: S,
7814
- gasPrice: k,
7815
- maxFeePerBlobGas: U,
7816
- maxFeePerGas: C,
7814
+ gasPrice: v,
7815
+ maxFeePerBlobGas: B,
7816
+ maxFeePerGas: E,
7817
7817
  maxPriorityFeePerGas: D,
7818
7818
  nonce: N,
7819
7819
  to: l,
@@ -7821,11 +7821,11 @@ async function tu(e, t) {
7821
7821
  }, "estimateGas");
7822
7822
  return BigInt(await e.request({
7823
7823
  method: "eth_estimateGas",
7824
- params: E ? [
7824
+ params: k ? [
7825
7825
  w,
7826
- v ?? e.experimental_blockTag ?? "latest",
7827
- E
7828
- ] : v ? [w, v] : [w]
7826
+ C ?? e.experimental_blockTag ?? "latest",
7827
+ k
7828
+ ] : C ? [w, C] : [w]
7829
7829
  }));
7830
7830
  } catch (l) {
7831
7831
  throw S2(l, {
@@ -7876,15 +7876,15 @@ function $o(e) {
7876
7876
  throw new My(o, { docsPath: Rd });
7877
7877
  const { name: l, inputs: d } = c, p = d == null ? void 0 : d.some((x) => !("name" in x && x.name)), f = p ? [] : {}, m = d.map((x, S) => [x, S]).filter(([x]) => "indexed" in x && x.indexed);
7878
7878
  for (let x = 0; x < m.length; x++) {
7879
- const [S, B] = m[x], k = i[x];
7880
- if (!k)
7879
+ const [S, U] = m[x], v = i[x];
7880
+ if (!v)
7881
7881
  throw new Bl({
7882
7882
  abiItem: c,
7883
7883
  param: S
7884
7884
  });
7885
- f[p ? B : S.name || B] = J2({
7885
+ f[p ? U : S.name || U] = J2({
7886
7886
  param: S,
7887
- value: k
7887
+ value: v
7888
7888
  });
7889
7889
  }
7890
7890
  const y = d.filter((x) => !("indexed" in x && x.indexed));
@@ -9443,19 +9443,19 @@ function Df({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: s }) {
9443
9443
  }
9444
9444
  async function yi(e, t) {
9445
9445
  var T, O, w, A;
9446
- const { account: n = e.account, authorizationList: r, batch: s = !!((T = e.batch) != null && T.multicall), blockNumber: a, blockTag: o = e.experimental_blockTag ?? "latest", accessList: i, blobs: c, blockOverrides: l, code: d, data: p, factory: f, factoryData: m, gas: y, gasPrice: x, maxFeePerBlobGas: S, maxFeePerGas: B, maxPriorityFeePerGas: k, nonce: U, to: C, value: D, stateOverride: N, ...R } = t, h = n ? me(n) : void 0;
9446
+ const { account: n = e.account, authorizationList: r, batch: s = !!((T = e.batch) != null && T.multicall), blockNumber: a, blockTag: o = e.experimental_blockTag ?? "latest", accessList: i, blobs: c, blockOverrides: l, code: d, data: p, factory: f, factoryData: m, gas: y, gasPrice: x, maxFeePerBlobGas: S, maxFeePerGas: U, maxPriorityFeePerGas: v, nonce: B, to: E, value: D, stateOverride: N, ...R } = t, h = n ? me(n) : void 0;
9447
9447
  if (d && (f || m))
9448
9448
  throw new z("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
9449
- if (d && C)
9449
+ if (d && E)
9450
9450
  throw new z("Cannot provide both `code` & `to` as parameters.");
9451
- const b = d && p, g = f && m && C && p, v = b || g, E = b ? Mf({
9451
+ const b = d && p, g = f && m && E && p, C = b || g, k = b ? Mf({
9452
9452
  code: d,
9453
9453
  data: p
9454
9454
  }) : g ? $5({
9455
9455
  data: p,
9456
9456
  factory: f,
9457
9457
  factoryData: m,
9458
- to: C
9458
+ to: E
9459
9459
  }) : p;
9460
9460
  try {
9461
9461
  Kt(t);
@@ -9466,14 +9466,14 @@ async function yi(e, t) {
9466
9466
  account: h,
9467
9467
  authorizationList: r,
9468
9468
  blobs: c,
9469
- data: E,
9469
+ data: k,
9470
9470
  gas: y,
9471
9471
  gasPrice: x,
9472
9472
  maxFeePerBlobGas: S,
9473
- maxFeePerGas: B,
9474
- maxPriorityFeePerGas: k,
9475
- nonce: U,
9476
- to: v ? void 0 : C,
9473
+ maxFeePerGas: U,
9474
+ maxPriorityFeePerGas: v,
9475
+ nonce: B,
9476
+ to: C ? void 0 : E,
9477
9477
  value: D
9478
9478
  }, "call");
9479
9479
  if (s && z5({ request: se }) && !L && !M)
@@ -9499,10 +9499,10 @@ async function yi(e, t) {
9499
9499
  });
9500
9500
  return Q === "0x" ? { data: void 0 } : { data: Q };
9501
9501
  } catch (F) {
9502
- const P = H5(F), { offchainLookup: M, offchainLookupSignature: L } = await import("./ccip-BCkIDgv2.js");
9503
- if (e.ccipRead !== !1 && (P == null ? void 0 : P.slice(0, 10)) === L && C)
9504
- return { data: await M(e, { data: P, to: C }) };
9505
- throw v && (P == null ? void 0 : P.slice(0, 10)) === "0x101bb98d" ? new y2({ factory: f }) : lu(F, {
9502
+ const P = H5(F), { offchainLookup: M, offchainLookupSignature: L } = await import("./ccip-DlC79THP.js");
9503
+ if (e.ccipRead !== !1 && (P == null ? void 0 : P.slice(0, 10)) === L && E)
9504
+ return { data: await M(e, { data: P, to: E }) };
9505
+ throw C && (P == null ? void 0 : P.slice(0, 10)) === "0x101bb98d" ? new y2({ factory: f }) : lu(F, {
9506
9506
  ...t,
9507
9507
  account: h,
9508
9508
  chain: e.chain
@@ -9531,36 +9531,36 @@ async function L5(e, t) {
9531
9531
  id: `${e.uid}.${p}`,
9532
9532
  wait: s,
9533
9533
  shouldSplitBatch(S) {
9534
- return S.reduce((k, { data: U }) => k + (U.length - 2), 0) > n * 2;
9534
+ return S.reduce((v, { data: B }) => v + (B.length - 2), 0) > n * 2;
9535
9535
  },
9536
9536
  fn: async (S) => {
9537
- const B = S.map((C) => ({
9537
+ const U = S.map((E) => ({
9538
9538
  allowFailure: !0,
9539
- callData: C.data,
9540
- target: C.to
9541
- })), k = lt({
9539
+ callData: E.data,
9540
+ target: E.to
9541
+ })), v = lt({
9542
9542
  abi: jo,
9543
- args: [B],
9543
+ args: [U],
9544
9544
  functionName: "aggregate3"
9545
- }), U = await e.request({
9545
+ }), B = await e.request({
9546
9546
  method: "eth_call",
9547
9547
  params: [
9548
9548
  {
9549
9549
  ...l === null ? {
9550
9550
  data: Mf({
9551
9551
  code: cu,
9552
- data: k
9552
+ data: v
9553
9553
  })
9554
- } : { to: l, data: k }
9554
+ } : { to: l, data: v }
9555
9555
  },
9556
9556
  p
9557
9557
  ]
9558
9558
  });
9559
9559
  return vr({
9560
9560
  abi: jo,
9561
- args: [B],
9561
+ args: [U],
9562
9562
  functionName: "aggregate3",
9563
- data: U || "0x"
9563
+ data: B || "0x"
9564
9564
  });
9565
9565
  }
9566
9566
  }), [{ returnData: m, success: y }] = await f({ data: i, to: c });
@@ -9767,7 +9767,7 @@ async function gi(e, { filter: t }) {
9767
9767
  function Z5(e, t) {
9768
9768
  const { abi: n, address: r, args: s, batch: a = !0, eventName: o, fromBlock: i, onError: c, onLogs: l, poll: d, pollingInterval: p = e.pollingInterval, strict: f } = t;
9769
9769
  return (typeof d < "u" ? d : typeof i == "bigint" ? !0 : !(e.transport.type === "webSocket" || e.transport.type === "ipc" || e.transport.type === "fallback" && (e.transport.transports[0].config.type === "webSocket" || e.transport.transports[0].config.type === "ipc"))) ? (() => {
9770
- const S = f ?? !1, B = Ie([
9770
+ const S = f ?? !1, U = Ie([
9771
9771
  "watchContractEvent",
9772
9772
  r,
9773
9773
  s,
@@ -9778,15 +9778,15 @@ function Z5(e, t) {
9778
9778
  S,
9779
9779
  i
9780
9780
  ]);
9781
- return mn(B, { onLogs: l, onError: c }, (k) => {
9782
- let U;
9783
- i !== void 0 && (U = i - 1n);
9784
- let C, D = !1;
9781
+ return mn(U, { onLogs: l, onError: c }, (v) => {
9782
+ let B;
9783
+ i !== void 0 && (B = i - 1n);
9784
+ let E, D = !1;
9785
9785
  const N = hs(async () => {
9786
9786
  var R;
9787
9787
  if (!D) {
9788
9788
  try {
9789
- C = await q(e, N0, "createContractEventFilter")({
9789
+ E = await q(e, N0, "createContractEventFilter")({
9790
9790
  abi: n,
9791
9791
  address: r,
9792
9792
  args: s,
@@ -9801,40 +9801,40 @@ function Z5(e, t) {
9801
9801
  }
9802
9802
  try {
9803
9803
  let h;
9804
- if (C)
9805
- h = await q(e, xi, "getFilterChanges")({ filter: C });
9804
+ if (E)
9805
+ h = await q(e, xi, "getFilterChanges")({ filter: E });
9806
9806
  else {
9807
9807
  const b = await q(e, Da, "getBlockNumber")({});
9808
- U && U < b ? h = await q(e, df, "getContractEvents")({
9808
+ B && B < b ? h = await q(e, df, "getContractEvents")({
9809
9809
  abi: n,
9810
9810
  address: r,
9811
9811
  args: s,
9812
9812
  eventName: o,
9813
- fromBlock: U + 1n,
9813
+ fromBlock: B + 1n,
9814
9814
  toBlock: b,
9815
9815
  strict: S
9816
- }) : h = [], U = b;
9816
+ }) : h = [], B = b;
9817
9817
  }
9818
9818
  if (h.length === 0)
9819
9819
  return;
9820
9820
  if (a)
9821
- k.onLogs(h);
9821
+ v.onLogs(h);
9822
9822
  else
9823
9823
  for (const b of h)
9824
- k.onLogs([b]);
9824
+ v.onLogs([b]);
9825
9825
  } catch (h) {
9826
- C && h instanceof Rn && (D = !1), (R = k.onError) == null || R.call(k, h);
9826
+ E && h instanceof Rn && (D = !1), (R = v.onError) == null || R.call(v, h);
9827
9827
  }
9828
9828
  }, {
9829
9829
  emitOnBegin: !0,
9830
9830
  interval: p
9831
9831
  });
9832
9832
  return async () => {
9833
- C && await q(e, gi, "uninstallFilter")({ filter: C }), N();
9833
+ E && await q(e, gi, "uninstallFilter")({ filter: E }), N();
9834
9834
  };
9835
9835
  });
9836
9836
  })() : (() => {
9837
- const S = f ?? !1, B = Ie([
9837
+ const S = f ?? !1, U = Ie([
9838
9838
  "watchContractEvent",
9839
9839
  r,
9840
9840
  s,
@@ -9844,8 +9844,8 @@ function Z5(e, t) {
9844
9844
  p,
9845
9845
  S
9846
9846
  ]);
9847
- let k = !0, U = () => k = !1;
9848
- return mn(B, { onLogs: l, onError: c }, (C) => ((async () => {
9847
+ let v = !0, B = () => v = !1;
9848
+ return mn(U, { onLogs: l, onError: c }, (E) => ((async () => {
9849
9849
  try {
9850
9850
  const D = (() => {
9851
9851
  if (e.transport.type === "fallback") {
@@ -9861,44 +9861,44 @@ function Z5(e, t) {
9861
9861
  params: ["logs", { address: r, topics: N }],
9862
9862
  onData(h) {
9863
9863
  var g;
9864
- if (!k)
9864
+ if (!v)
9865
9865
  return;
9866
9866
  const b = h.result;
9867
9867
  try {
9868
- const { eventName: v, args: E } = $o({
9868
+ const { eventName: C, args: k } = $o({
9869
9869
  abi: n,
9870
9870
  data: b.data,
9871
9871
  topics: b.topics,
9872
9872
  strict: f
9873
9873
  }), T = Vt(b, {
9874
- args: E,
9875
- eventName: v
9874
+ args: k,
9875
+ eventName: C
9876
9876
  });
9877
- C.onLogs([T]);
9878
- } catch (v) {
9879
- let E, T;
9880
- if (v instanceof Lo || v instanceof Bl) {
9877
+ E.onLogs([T]);
9878
+ } catch (C) {
9879
+ let k, T;
9880
+ if (C instanceof Lo || C instanceof Bl) {
9881
9881
  if (f)
9882
9882
  return;
9883
- E = v.abiItem.name, T = (g = v.abiItem.inputs) == null ? void 0 : g.some((w) => !("name" in w && w.name));
9883
+ k = C.abiItem.name, T = (g = C.abiItem.inputs) == null ? void 0 : g.some((w) => !("name" in w && w.name));
9884
9884
  }
9885
9885
  const O = Vt(b, {
9886
9886
  args: T ? [] : {},
9887
- eventName: E
9887
+ eventName: k
9888
9888
  });
9889
- C.onLogs([O]);
9889
+ E.onLogs([O]);
9890
9890
  }
9891
9891
  },
9892
9892
  onError(h) {
9893
9893
  var b;
9894
- (b = C.onError) == null || b.call(C, h);
9894
+ (b = E.onError) == null || b.call(E, h);
9895
9895
  }
9896
9896
  });
9897
- U = R, k || U();
9897
+ B = R, v || B();
9898
9898
  } catch (D) {
9899
9899
  c == null || c(D);
9900
9900
  }
9901
- })(), () => U()));
9901
+ })(), () => B()));
9902
9902
  })();
9903
9903
  }
9904
9904
  class bn extends z {
@@ -9937,13 +9937,13 @@ async function pu(e, { serializedTransaction: t }) {
9937
9937
  }
9938
9938
  const Yi = new ds(128);
9939
9939
  async function wi(e, t) {
9940
- var k, U, C, D;
9940
+ var v, B, E, D;
9941
9941
  const { account: n = e.account, chain: r = e.chain, accessList: s, authorizationList: a, blobs: o, data: i, gas: c, gasPrice: l, maxFeePerBlobGas: d, maxFeePerGas: p, maxPriorityFeePerGas: f, nonce: m, type: y, value: x, ...S } = t;
9942
9942
  if (typeof n > "u")
9943
9943
  throw new bn({
9944
9944
  docsPath: "/docs/actions/wallet/sendTransaction"
9945
9945
  });
9946
- const B = n ? me(n) : null;
9946
+ const U = n ? me(n) : null;
9947
9947
  try {
9948
9948
  Kt(t);
9949
9949
  const N = await (async () => {
@@ -9956,17 +9956,17 @@ async function wi(e, t) {
9956
9956
  throw new z("`to` is required. Could not infer from `authorizationList`.");
9957
9957
  });
9958
9958
  })();
9959
- if ((B == null ? void 0 : B.type) === "json-rpc" || B === null) {
9959
+ if ((U == null ? void 0 : U.type) === "json-rpc" || U === null) {
9960
9960
  let R;
9961
9961
  r !== null && (R = await q(e, zn, "getChainId")({}), du({
9962
9962
  currentChainId: R,
9963
9963
  chain: r
9964
9964
  }));
9965
- const h = (C = (U = (k = e.chain) == null ? void 0 : k.formatters) == null ? void 0 : U.transactionRequest) == null ? void 0 : C.format, g = (h || Dt)({
9965
+ const h = (E = (B = (v = e.chain) == null ? void 0 : v.formatters) == null ? void 0 : B.transactionRequest) == null ? void 0 : E.format, g = (h || Dt)({
9966
9966
  // Pick out extra data that might exist on the chain's transaction request type.
9967
9967
  ...kr(S, { format: h }),
9968
9968
  accessList: s,
9969
- account: B,
9969
+ account: U,
9970
9970
  authorizationList: a,
9971
9971
  blobs: o,
9972
9972
  chainId: R,
@@ -9980,14 +9980,14 @@ async function wi(e, t) {
9980
9980
  to: N,
9981
9981
  type: y,
9982
9982
  value: x
9983
- }, "sendTransaction"), v = Yi.get(e.uid), E = v ? "wallet_sendTransaction" : "eth_sendTransaction";
9983
+ }, "sendTransaction"), C = Yi.get(e.uid), k = C ? "wallet_sendTransaction" : "eth_sendTransaction";
9984
9984
  try {
9985
9985
  return await e.request({
9986
- method: E,
9986
+ method: k,
9987
9987
  params: [g]
9988
9988
  }, { retryCount: 0 });
9989
9989
  } catch (T) {
9990
- if (v === !1)
9990
+ if (C === !1)
9991
9991
  throw T;
9992
9992
  const O = T;
9993
9993
  if (O.name === "InvalidInputRpcError" || O.name === "InvalidParamsRpcError" || O.name === "MethodNotFoundRpcError" || O.name === "MethodNotSupportedRpcError")
@@ -10001,9 +10001,9 @@ async function wi(e, t) {
10001
10001
  throw O;
10002
10002
  }
10003
10003
  }
10004
- if ((B == null ? void 0 : B.type) === "local") {
10004
+ if ((U == null ? void 0 : U.type) === "local") {
10005
10005
  const R = await q(e, Pa, "prepareTransactionRequest")({
10006
- account: B,
10006
+ account: U,
10007
10007
  accessList: s,
10008
10008
  authorizationList: a,
10009
10009
  blobs: o,
@@ -10015,20 +10015,20 @@ async function wi(e, t) {
10015
10015
  maxFeePerGas: p,
10016
10016
  maxPriorityFeePerGas: f,
10017
10017
  nonce: m,
10018
- nonceManager: B.nonceManager,
10018
+ nonceManager: U.nonceManager,
10019
10019
  parameters: [...eu, "sidecars"],
10020
10020
  type: y,
10021
10021
  value: x,
10022
10022
  ...S,
10023
10023
  to: N
10024
- }), h = (D = r == null ? void 0 : r.serializers) == null ? void 0 : D.transaction, b = await B.signTransaction(R, {
10024
+ }), h = (D = r == null ? void 0 : r.serializers) == null ? void 0 : D.transaction, b = await U.signTransaction(R, {
10025
10025
  serializer: h
10026
10026
  });
10027
10027
  return await q(e, pu, "sendRawTransaction")({
10028
10028
  serializedTransaction: b
10029
10029
  });
10030
10030
  }
10031
- throw (B == null ? void 0 : B.type) === "smart" ? new ir({
10031
+ throw (U == null ? void 0 : U.type) === "smart" ? new ir({
10032
10032
  metaMessages: [
10033
10033
  "Consider using the `sendUserOperation` Action instead."
10034
10034
  ],
@@ -10036,12 +10036,12 @@ async function wi(e, t) {
10036
10036
  type: "smart"
10037
10037
  }) : new ir({
10038
10038
  docsPath: "/docs/actions/wallet/sendTransaction",
10039
- type: B == null ? void 0 : B.type
10039
+ type: U == null ? void 0 : U.type
10040
10040
  });
10041
10041
  } catch (N) {
10042
10042
  throw N instanceof ir ? N : di(N, {
10043
10043
  ...t,
10044
- account: B,
10044
+ account: U,
10045
10045
  chain: t.chain || void 0
10046
10046
  });
10047
10047
  }
@@ -10169,33 +10169,33 @@ async function zf(e, t) {
10169
10169
  if (a && (m.name === "MethodNotFoundRpcError" || m.name === "MethodNotSupportedRpcError" || m.name === "UnknownRpcError" || m.details.toLowerCase().includes("does not exist / is not available") || m.details.toLowerCase().includes("missing or invalid. request()") || m.details.toLowerCase().includes("did not match any variant of untagged enum") || m.details.toLowerCase().includes("account upgraded to unsupported contract") || m.details.toLowerCase().includes("eip-7702 not supported") || m.details.toLowerCase().includes("unsupported wc_ method") || // magic.link
10170
10170
  m.details.toLowerCase().includes("feature toggled misconfigured") || // Trust Wallet
10171
10171
  m.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))) {
10172
- if (r && Object.values(r).some((k) => !k.optional)) {
10173
- const k = "non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";
10174
- throw new os(new z(k, {
10175
- details: k
10172
+ if (r && Object.values(r).some((v) => !v.optional)) {
10173
+ const v = "non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";
10174
+ throw new os(new z(v, {
10175
+ details: v
10176
10176
  }));
10177
10177
  }
10178
10178
  if (i && p.length > 1) {
10179
- const B = "`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";
10180
- throw new is(new z(B, {
10181
- details: B
10179
+ const U = "`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";
10180
+ throw new is(new z(U, {
10181
+ details: U
10182
10182
  }));
10183
10183
  }
10184
10184
  const y = [];
10185
- for (const B of p) {
10186
- const k = wi(e, {
10185
+ for (const U of p) {
10186
+ const v = wi(e, {
10187
10187
  account: d,
10188
10188
  chain: s,
10189
- data: B.data,
10190
- to: B.to,
10191
- value: B.value ? de(B.value) : void 0
10189
+ data: U.data,
10190
+ to: U.to,
10191
+ value: U.value ? de(U.value) : void 0
10192
10192
  });
10193
- y.push(k), o > 0 && await new Promise((U) => setTimeout(U, o));
10193
+ y.push(v), o > 0 && await new Promise((B) => setTimeout(B, o));
10194
10194
  }
10195
10195
  const x = await Promise.allSettled(y);
10196
- if (x.every((B) => B.status === "rejected"))
10196
+ if (x.every((U) => U.status === "rejected"))
10197
10197
  throw x[0].reason;
10198
- const S = x.map((B) => B.status === "fulfilled" ? B.value : _f);
10198
+ const S = x.map((U) => U.status === "fulfilled" ? U.value : _f);
10199
10199
  return {
10200
10200
  id: gt([
10201
10201
  ...S,
@@ -10265,24 +10265,24 @@ async function $f(e, t) {
10265
10265
  let m;
10266
10266
  const y = mn(l, { resolve: p, reject: f }, (x) => {
10267
10267
  const S = hs(async () => {
10268
- const B = (k) => {
10269
- clearTimeout(m), S(), k(), y();
10268
+ const U = (v) => {
10269
+ clearTimeout(m), S(), v(), y();
10270
10270
  };
10271
10271
  try {
10272
- const k = await Vo(async () => {
10273
- const U = await q(e, Lf, "getCallsStatus")({ id: n });
10274
- if (c && U.status === "failure")
10275
- throw new Q5(U);
10276
- return U;
10272
+ const v = await Vo(async () => {
10273
+ const B = await q(e, Lf, "getCallsStatus")({ id: n });
10274
+ if (c && B.status === "failure")
10275
+ throw new Q5(B);
10276
+ return B;
10277
10277
  }, {
10278
10278
  retryCount: a,
10279
10279
  delay: o
10280
10280
  });
10281
- if (!s(k))
10281
+ if (!s(v))
10282
10282
  return;
10283
- B(() => x.resolve(k));
10284
- } catch (k) {
10285
- B(() => x.reject(k));
10283
+ U(() => x.resolve(v));
10284
+ } catch (v) {
10285
+ U(() => x.reject(v));
10286
10286
  }
10287
10287
  }, {
10288
10288
  interval: r,
@@ -10314,7 +10314,7 @@ function Gf(e) {
10314
10314
  account: f,
10315
10315
  chain: n,
10316
10316
  pollingInterval: d
10317
- }), S = { ...m, ...x }, B = {
10317
+ }), S = { ...m, ...x }, U = {
10318
10318
  account: f,
10319
10319
  batch: t,
10320
10320
  cacheTime: p,
@@ -10329,16 +10329,16 @@ function Gf(e) {
10329
10329
  uid: Hf(),
10330
10330
  ...i ? { experimental_blockTag: i } : {}
10331
10331
  };
10332
- function k(U) {
10333
- return (C) => {
10334
- const D = C(U);
10335
- for (const R in B)
10332
+ function v(B) {
10333
+ return (E) => {
10334
+ const D = E(B);
10335
+ for (const R in U)
10336
10336
  delete D[R];
10337
- const N = { ...U, ...D };
10338
- return Object.assign(N, { extend: k(N) });
10337
+ const N = { ...B, ...D };
10338
+ return Object.assign(N, { extend: v(N) });
10339
10339
  };
10340
10340
  }
10341
- return Object.assign(B, { extend: k(B) });
10341
+ return Object.assign(U, { extend: v(U) });
10342
10342
  }
10343
10343
  function mu(e) {
10344
10344
  var n, r, s, a, o, i;
@@ -10832,11 +10832,11 @@ async function wx(e, t) {
10832
10832
  return c;
10833
10833
  }
10834
10834
  async function Wf(e, t) {
10835
- var S, B, k;
10835
+ var S, U, v;
10836
10836
  const { account: n = e.account, blockNumber: r, blockTag: s = "latest", blobs: a, data: o, gas: i, gasPrice: c, maxFeePerBlobGas: l, maxFeePerGas: d, maxPriorityFeePerGas: p, to: f, value: m, ...y } = t, x = n ? me(n) : void 0;
10837
10837
  try {
10838
10838
  Kt(t);
10839
- const C = (typeof r == "bigint" ? H(r) : void 0) || s, D = (k = (B = (S = e.chain) == null ? void 0 : S.formatters) == null ? void 0 : B.transactionRequest) == null ? void 0 : k.format, R = (D || Dt)({
10839
+ const E = (typeof r == "bigint" ? H(r) : void 0) || s, D = (v = (U = (S = e.chain) == null ? void 0 : S.formatters) == null ? void 0 : U.transactionRequest) == null ? void 0 : v.format, R = (D || Dt)({
10840
10840
  // Pick out extra data that might exist on the chain's transaction request type.
10841
10841
  ...kr(y, { format: D }),
10842
10842
  account: x,
@@ -10851,14 +10851,14 @@ async function Wf(e, t) {
10851
10851
  value: m
10852
10852
  }, "createAccessList"), h = await e.request({
10853
10853
  method: "eth_createAccessList",
10854
- params: [R, C]
10854
+ params: [R, E]
10855
10855
  });
10856
10856
  return {
10857
10857
  accessList: h.accessList,
10858
10858
  gasUsed: BigInt(h.gasUsed)
10859
10859
  };
10860
- } catch (U) {
10861
- throw lu(U, {
10860
+ } catch (B) {
10861
+ throw lu(B, {
10862
10862
  ...t,
10863
10863
  account: x,
10864
10864
  chain: e.chain
@@ -11141,15 +11141,15 @@ function Rx(e, t) {
11141
11141
  Fx(e);
11142
11142
  let f = e.blobVersionedHashes, m = e.sidecars;
11143
11143
  if (e.blobs && (typeof f > "u" || typeof m > "u")) {
11144
- const U = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((N) => Pe(N)), C = e.kzg, D = Wl({
11145
- blobs: U,
11146
- kzg: C
11144
+ const B = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((N) => Pe(N)), E = e.kzg, D = Wl({
11145
+ blobs: B,
11146
+ kzg: E
11147
11147
  });
11148
11148
  if (typeof f > "u" && (f = sf({
11149
11149
  commitments: D
11150
11150
  })), typeof m > "u") {
11151
- const N = Xl({ blobs: U, commitments: D, kzg: C });
11152
- m = uf({ blobs: U, commitments: D, proofs: N });
11151
+ const N = Xl({ blobs: B, commitments: D, kzg: E });
11152
+ m = uf({ blobs: B, commitments: D, proofs: N });
11153
11153
  }
11154
11154
  }
11155
11155
  const y = Ma(d), x = [
@@ -11165,16 +11165,16 @@ function Rx(e, t) {
11165
11165
  i ? H(i) : "0x",
11166
11166
  f ?? [],
11167
11167
  ...bs(e, t)
11168
- ], S = [], B = [], k = [];
11168
+ ], S = [], U = [], v = [];
11169
11169
  if (m)
11170
- for (let U = 0; U < m.length; U++) {
11171
- const { blob: C, commitment: D, proof: N } = m[U];
11172
- S.push(C), B.push(D), k.push(N);
11170
+ for (let B = 0; B < m.length; B++) {
11171
+ const { blob: E, commitment: D, proof: N } = m[B];
11172
+ S.push(E), U.push(D), v.push(N);
11173
11173
  }
11174
11174
  return ct([
11175
11175
  "0x03",
11176
11176
  // If sidecars are enabled, envelope turns into a "wrapper":
11177
- jt(m ? [x, S, B, k] : x)
11177
+ jt(m ? [x, S, U, v] : x)
11178
11178
  ]);
11179
11179
  }
11180
11180
  function Nx(e, t) {
@@ -11479,10 +11479,10 @@ function Wx(e, t = {}) {
11479
11479
  const m = await qx(async ({ signal: x }) => {
11480
11480
  const S = {
11481
11481
  ...c,
11482
- body: Array.isArray(r) ? Ie(r.map((C) => ({
11482
+ body: Array.isArray(r) ? Ie(r.map((E) => ({
11483
11483
  jsonrpc: "2.0",
11484
- id: C.id ?? Xd.take(),
11485
- ...C
11484
+ id: E.id ?? Xd.take(),
11485
+ ...E
11486
11486
  }))) : Ie({
11487
11487
  jsonrpc: "2.0",
11488
11488
  id: r.id ?? Xd.take(),
@@ -11494,8 +11494,8 @@ function Wx(e, t = {}) {
11494
11494
  },
11495
11495
  method: d || "POST",
11496
11496
  signal: p || (i > 0 ? x : null)
11497
- }, B = new Request(e, S), k = await (a == null ? void 0 : a(B, S)) ?? { ...S, url: e };
11498
- return await s(k.url ?? e, k);
11497
+ }, U = new Request(e, S), v = await (a == null ? void 0 : a(U, S)) ?? { ...S, url: e };
11498
+ return await s(v.url ?? e, v);
11499
11499
  }, {
11500
11500
  errorInstance: new Ud({ body: r, url: e }),
11501
11501
  timeout: i,
@@ -11585,10 +11585,10 @@ function Jf(e) {
11585
11585
  for (const c of o) {
11586
11586
  const { name: l, type: d } = c, p = i[l], f = d.match(M0);
11587
11587
  if (f && (typeof p == "number" || typeof p == "bigint")) {
11588
- const [x, S, B] = f;
11588
+ const [x, S, U] = f;
11589
11589
  H(p, {
11590
11590
  signed: S === "int",
11591
- size: Number.parseInt(B, 10) / 8
11591
+ size: Number.parseInt(U, 10) / 8
11592
11592
  });
11593
11593
  }
11594
11594
  if (d === "address" && typeof p == "string" && !be(p))
@@ -12019,11 +12019,11 @@ function v8(e, t, n) {
12019
12019
  const y = [];
12020
12020
  for (let x = 0; x < p; ++x) {
12021
12021
  e.setPosition(d + (f ? x * 32 : m));
12022
- const [S, B] = Lr(e, t, {
12022
+ const [S, U] = Lr(e, t, {
12023
12023
  checksumAddress: r,
12024
12024
  staticPosition: d
12025
12025
  });
12026
- m += B, y.push(S);
12026
+ m += U, y.push(S);
12027
12027
  }
12028
12028
  return e.setPosition(a + 32), [y, 32];
12029
12029
  }
@@ -12825,8 +12825,8 @@ function t3(e) {
12825
12825
  for (; !c.eql(x, c.ONE); )
12826
12826
  if (y++, x = c.sqr(x), y === d)
12827
12827
  throw new Error("Cannot find square root");
12828
- const S = Ke << BigInt(d - y - 1), B = c.pow(p, S);
12829
- d = y, p = c.sqr(B), f = c.mul(f, p), m = c.mul(m, B);
12828
+ const S = Ke << BigInt(d - y - 1), U = c.pow(p, S);
12829
+ d = y, p = c.sqr(U), f = c.mul(f, p), m = c.mul(m, U);
12830
12830
  }
12831
12831
  return m;
12832
12832
  };
@@ -13104,8 +13104,8 @@ function u3(e, t, n, r) {
13104
13104
  for (let m = p; m >= 0; m -= c) {
13105
13105
  d.fill(o);
13106
13106
  for (let x = 0; x < a; x++) {
13107
- const S = r[x], B = Number(S >> BigInt(m) & l);
13108
- d[B] = d[B].add(n[x]);
13107
+ const S = r[x], U = Number(S >> BigInt(m) & l);
13108
+ d[U] = d[U].add(n[x]);
13109
13109
  }
13110
13110
  let y = o;
13111
13111
  for (let x = d.length - 1, S = o; x > 0; x--)
@@ -13258,19 +13258,19 @@ const cn = BigInt(0), De = BigInt(1);
13258
13258
  BigInt(2);
13259
13259
  const cc = BigInt(3), f3 = BigInt(4);
13260
13260
  function m3(e) {
13261
- const t = d3(e), { Fp: n } = t, r = ys(t.n, t.nBitLength), s = t.toBytes || ((U, C, D) => {
13262
- const N = C.toAffine();
13261
+ const t = d3(e), { Fp: n } = t, r = ys(t.n, t.nBitLength), s = t.toBytes || ((B, E, D) => {
13262
+ const N = E.toAffine();
13263
13263
  return Go(Uint8Array.from([4]), n.toBytes(N.x), n.toBytes(N.y));
13264
- }), a = t.fromBytes || ((U) => {
13265
- const C = U.subarray(1), D = n.fromBytes(C.subarray(0, n.BYTES)), N = n.fromBytes(C.subarray(n.BYTES, 2 * n.BYTES));
13264
+ }), a = t.fromBytes || ((B) => {
13265
+ const E = B.subarray(1), D = n.fromBytes(E.subarray(0, n.BYTES)), N = n.fromBytes(E.subarray(n.BYTES, 2 * n.BYTES));
13266
13266
  return { x: D, y: N };
13267
13267
  });
13268
- function o(U) {
13269
- const { a: C, b: D } = t, N = n.sqr(U), R = n.mul(N, U);
13270
- return n.add(n.add(R, n.mul(U, C)), D);
13268
+ function o(B) {
13269
+ const { a: E, b: D } = t, N = n.sqr(B), R = n.mul(N, B);
13270
+ return n.add(n.add(R, n.mul(B, E)), D);
13271
13271
  }
13272
- function i(U, C) {
13273
- const D = n.sqr(C), N = o(U);
13272
+ function i(B, E) {
13273
+ const D = n.sqr(E), N = o(B);
13274
13274
  return n.eql(D, N);
13275
13275
  }
13276
13276
  if (!i(t.Gx, t.Gy))
@@ -13278,72 +13278,72 @@ function m3(e) {
13278
13278
  const c = n.mul(n.pow(t.a, cc), f3), l = n.mul(n.sqr(t.b), BigInt(27));
13279
13279
  if (n.is0(n.add(c, l)))
13280
13280
  throw new Error("bad curve params: a or b");
13281
- function d(U) {
13282
- return ou(U, De, t.n);
13281
+ function d(B) {
13282
+ return ou(B, De, t.n);
13283
13283
  }
13284
- function p(U) {
13285
- const { allowedPrivateKeyLengths: C, nByteLength: D, wrapPrivateKey: N, n: R } = t;
13286
- if (C && typeof U != "bigint") {
13287
- if (Ua(U) && (U = ia(U)), typeof U != "string" || !C.includes(U.length))
13284
+ function p(B) {
13285
+ const { allowedPrivateKeyLengths: E, nByteLength: D, wrapPrivateKey: N, n: R } = t;
13286
+ if (E && typeof B != "bigint") {
13287
+ if (Ua(B) && (B = ia(B)), typeof B != "string" || !E.includes(B.length))
13288
13288
  throw new Error("invalid private key");
13289
- U = U.padStart(D * 2, "0");
13289
+ B = B.padStart(D * 2, "0");
13290
13290
  }
13291
13291
  let h;
13292
13292
  try {
13293
- h = typeof U == "bigint" ? U : or(bt("private key", U, D));
13293
+ h = typeof B == "bigint" ? B : or(bt("private key", B, D));
13294
13294
  } catch {
13295
- throw new Error("invalid private key, expected hex or " + D + " bytes, got " + typeof U);
13295
+ throw new Error("invalid private key, expected hex or " + D + " bytes, got " + typeof B);
13296
13296
  }
13297
13297
  return N && (h = Je(h, R)), zr("private key", h, De, R), h;
13298
13298
  }
13299
- function f(U) {
13300
- if (!(U instanceof x))
13299
+ function f(B) {
13300
+ if (!(B instanceof x))
13301
13301
  throw new Error("ProjectivePoint expected");
13302
13302
  }
13303
- const m = zd((U, C) => {
13304
- const { px: D, py: N, pz: R } = U;
13303
+ const m = zd((B, E) => {
13304
+ const { px: D, py: N, pz: R } = B;
13305
13305
  if (n.eql(R, n.ONE))
13306
13306
  return { x: D, y: N };
13307
- const h = U.is0();
13308
- C == null && (C = h ? n.ONE : n.inv(R));
13309
- const b = n.mul(D, C), g = n.mul(N, C), v = n.mul(R, C);
13307
+ const h = B.is0();
13308
+ E == null && (E = h ? n.ONE : n.inv(R));
13309
+ const b = n.mul(D, E), g = n.mul(N, E), C = n.mul(R, E);
13310
13310
  if (h)
13311
13311
  return { x: n.ZERO, y: n.ZERO };
13312
- if (!n.eql(v, n.ONE))
13312
+ if (!n.eql(C, n.ONE))
13313
13313
  throw new Error("invZ was invalid");
13314
13314
  return { x: b, y: g };
13315
- }), y = zd((U) => {
13316
- if (U.is0()) {
13317
- if (t.allowInfinityPoint && !n.is0(U.py))
13315
+ }), y = zd((B) => {
13316
+ if (B.is0()) {
13317
+ if (t.allowInfinityPoint && !n.is0(B.py))
13318
13318
  return;
13319
13319
  throw new Error("bad point: ZERO");
13320
13320
  }
13321
- const { x: C, y: D } = U.toAffine();
13322
- if (!n.isValid(C) || !n.isValid(D))
13321
+ const { x: E, y: D } = B.toAffine();
13322
+ if (!n.isValid(E) || !n.isValid(D))
13323
13323
  throw new Error("bad point: x or y not FE");
13324
- if (!i(C, D))
13324
+ if (!i(E, D))
13325
13325
  throw new Error("bad point: equation left != right");
13326
- if (!U.isTorsionFree())
13326
+ if (!B.isTorsionFree())
13327
13327
  throw new Error("bad point: not in prime-order subgroup");
13328
13328
  return !0;
13329
13329
  });
13330
13330
  class x {
13331
- constructor(C, D, N) {
13332
- if (C == null || !n.isValid(C))
13331
+ constructor(E, D, N) {
13332
+ if (E == null || !n.isValid(E))
13333
13333
  throw new Error("x required");
13334
13334
  if (D == null || !n.isValid(D) || n.is0(D))
13335
13335
  throw new Error("y required");
13336
13336
  if (N == null || !n.isValid(N))
13337
13337
  throw new Error("z required");
13338
- this.px = C, this.py = D, this.pz = N, Object.freeze(this);
13338
+ this.px = E, this.py = D, this.pz = N, Object.freeze(this);
13339
13339
  }
13340
13340
  // Does not validate if the point is on-curve.
13341
13341
  // Use fromHex instead, or call assertValidity() later.
13342
- static fromAffine(C) {
13343
- const { x: D, y: N } = C || {};
13344
- if (!C || !n.isValid(D) || !n.isValid(N))
13342
+ static fromAffine(E) {
13343
+ const { x: D, y: N } = E || {};
13344
+ if (!E || !n.isValid(D) || !n.isValid(N))
13345
13345
  throw new Error("invalid affine point");
13346
- if (C instanceof x)
13346
+ if (E instanceof x)
13347
13347
  throw new Error("projective point not allowed");
13348
13348
  const R = (h) => n.eql(h, n.ZERO);
13349
13349
  return R(D) && R(N) ? x.ZERO : new x(D, N, n.ONE);
@@ -13360,47 +13360,47 @@ function m3(e) {
13360
13360
  * so this improves performance massively.
13361
13361
  * Optimization: converts a list of projective points to a list of identical points with Z=1.
13362
13362
  */
13363
- static normalizeZ(C) {
13364
- const D = gm(n, C.map((N) => N.pz));
13365
- return C.map((N, R) => N.toAffine(D[R])).map(x.fromAffine);
13363
+ static normalizeZ(E) {
13364
+ const D = gm(n, E.map((N) => N.pz));
13365
+ return E.map((N, R) => N.toAffine(D[R])).map(x.fromAffine);
13366
13366
  }
13367
13367
  /**
13368
13368
  * Converts hash string or Uint8Array to Point.
13369
13369
  * @param hex short/long ECDSA hex
13370
13370
  */
13371
- static fromHex(C) {
13372
- const D = x.fromAffine(a(bt("pointHex", C)));
13371
+ static fromHex(E) {
13372
+ const D = x.fromAffine(a(bt("pointHex", E)));
13373
13373
  return D.assertValidity(), D;
13374
13374
  }
13375
13375
  // Multiplies generator point by privateKey.
13376
- static fromPrivateKey(C) {
13377
- return x.BASE.multiply(p(C));
13376
+ static fromPrivateKey(E) {
13377
+ return x.BASE.multiply(p(E));
13378
13378
  }
13379
13379
  // Multiscalar Multiplication
13380
- static msm(C, D) {
13381
- return u3(x, r, C, D);
13380
+ static msm(E, D) {
13381
+ return u3(x, r, E, D);
13382
13382
  }
13383
13383
  // "Private method", don't use it directly
13384
- _setWindowSize(C) {
13385
- k.setWindowSize(this, C);
13384
+ _setWindowSize(E) {
13385
+ v.setWindowSize(this, E);
13386
13386
  }
13387
13387
  // A point on curve is valid if it conforms to equation.
13388
13388
  assertValidity() {
13389
13389
  y(this);
13390
13390
  }
13391
13391
  hasEvenY() {
13392
- const { y: C } = this.toAffine();
13392
+ const { y: E } = this.toAffine();
13393
13393
  if (n.isOdd)
13394
- return !n.isOdd(C);
13394
+ return !n.isOdd(E);
13395
13395
  throw new Error("Field doesn't support isOdd");
13396
13396
  }
13397
13397
  /**
13398
13398
  * Compare one point to another.
13399
13399
  */
13400
- equals(C) {
13401
- f(C);
13402
- const { px: D, py: N, pz: R } = this, { px: h, py: b, pz: g } = C, v = n.eql(n.mul(D, g), n.mul(h, R)), E = n.eql(n.mul(N, g), n.mul(b, R));
13403
- return v && E;
13400
+ equals(E) {
13401
+ f(E);
13402
+ const { px: D, py: N, pz: R } = this, { px: h, py: b, pz: g } = E, C = n.eql(n.mul(D, g), n.mul(h, R)), k = n.eql(n.mul(N, g), n.mul(b, R));
13403
+ return C && k;
13404
13404
  }
13405
13405
  /**
13406
13406
  * Flips point to one corresponding to (x, -y) in Affine coordinates.
@@ -13413,52 +13413,52 @@ function m3(e) {
13413
13413
  // https://eprint.iacr.org/2015/1060, algorithm 3
13414
13414
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
13415
13415
  double() {
13416
- const { a: C, b: D } = t, N = n.mul(D, cc), { px: R, py: h, pz: b } = this;
13417
- let g = n.ZERO, v = n.ZERO, E = n.ZERO, T = n.mul(R, R), O = n.mul(h, h), w = n.mul(b, b), A = n.mul(R, h);
13418
- return A = n.add(A, A), E = n.mul(R, b), E = n.add(E, E), g = n.mul(C, E), v = n.mul(N, w), v = n.add(g, v), g = n.sub(O, v), v = n.add(O, v), v = n.mul(g, v), g = n.mul(A, g), E = n.mul(N, E), w = n.mul(C, w), A = n.sub(T, w), A = n.mul(C, A), A = n.add(A, E), E = n.add(T, T), T = n.add(E, T), T = n.add(T, w), T = n.mul(T, A), v = n.add(v, T), w = n.mul(h, b), w = n.add(w, w), T = n.mul(w, A), g = n.sub(g, T), E = n.mul(w, O), E = n.add(E, E), E = n.add(E, E), new x(g, v, E);
13416
+ const { a: E, b: D } = t, N = n.mul(D, cc), { px: R, py: h, pz: b } = this;
13417
+ let g = n.ZERO, C = n.ZERO, k = n.ZERO, T = n.mul(R, R), O = n.mul(h, h), w = n.mul(b, b), A = n.mul(R, h);
13418
+ return A = n.add(A, A), k = n.mul(R, b), k = n.add(k, k), g = n.mul(E, k), C = n.mul(N, w), C = n.add(g, C), g = n.sub(O, C), C = n.add(O, C), C = n.mul(g, C), g = n.mul(A, g), k = n.mul(N, k), w = n.mul(E, w), A = n.sub(T, w), A = n.mul(E, A), A = n.add(A, k), k = n.add(T, T), T = n.add(k, T), T = n.add(T, w), T = n.mul(T, A), C = n.add(C, T), w = n.mul(h, b), w = n.add(w, w), T = n.mul(w, A), g = n.sub(g, T), k = n.mul(w, O), k = n.add(k, k), k = n.add(k, k), new x(g, C, k);
13419
13419
  }
13420
13420
  // Renes-Costello-Batina exception-free addition formula.
13421
13421
  // There is 30% faster Jacobian formula, but it is not complete.
13422
13422
  // https://eprint.iacr.org/2015/1060, algorithm 1
13423
13423
  // Cost: 12M + 0S + 3*a + 3*b3 + 23add.
13424
- add(C) {
13425
- f(C);
13426
- const { px: D, py: N, pz: R } = this, { px: h, py: b, pz: g } = C;
13427
- let v = n.ZERO, E = n.ZERO, T = n.ZERO;
13424
+ add(E) {
13425
+ f(E);
13426
+ const { px: D, py: N, pz: R } = this, { px: h, py: b, pz: g } = E;
13427
+ let C = n.ZERO, k = n.ZERO, T = n.ZERO;
13428
13428
  const O = t.a, w = n.mul(t.b, cc);
13429
13429
  let A = n.mul(D, h), F = n.mul(N, b), P = n.mul(R, g), M = n.add(D, N), L = n.add(h, b);
13430
13430
  M = n.mul(M, L), L = n.add(A, F), M = n.sub(M, L), L = n.add(D, R);
13431
13431
  let G = n.add(h, g);
13432
- return L = n.mul(L, G), G = n.add(A, P), L = n.sub(L, G), G = n.add(N, R), v = n.add(b, g), G = n.mul(G, v), v = n.add(F, P), G = n.sub(G, v), T = n.mul(O, L), v = n.mul(w, P), T = n.add(v, T), v = n.sub(F, T), T = n.add(F, T), E = n.mul(v, T), F = n.add(A, A), F = n.add(F, A), P = n.mul(O, P), L = n.mul(w, L), F = n.add(F, P), P = n.sub(A, P), P = n.mul(O, P), L = n.add(L, P), A = n.mul(F, L), E = n.add(E, A), A = n.mul(G, L), v = n.mul(M, v), v = n.sub(v, A), A = n.mul(M, F), T = n.mul(G, T), T = n.add(T, A), new x(v, E, T);
13432
+ return L = n.mul(L, G), G = n.add(A, P), L = n.sub(L, G), G = n.add(N, R), C = n.add(b, g), G = n.mul(G, C), C = n.add(F, P), G = n.sub(G, C), T = n.mul(O, L), C = n.mul(w, P), T = n.add(C, T), C = n.sub(F, T), T = n.add(F, T), k = n.mul(C, T), F = n.add(A, A), F = n.add(F, A), P = n.mul(O, P), L = n.mul(w, L), F = n.add(F, P), P = n.sub(A, P), P = n.mul(O, P), L = n.add(L, P), A = n.mul(F, L), k = n.add(k, A), A = n.mul(G, L), C = n.mul(M, C), C = n.sub(C, A), A = n.mul(M, F), T = n.mul(G, T), T = n.add(T, A), new x(C, k, T);
13433
13433
  }
13434
- subtract(C) {
13435
- return this.add(C.negate());
13434
+ subtract(E) {
13435
+ return this.add(E.negate());
13436
13436
  }
13437
13437
  is0() {
13438
13438
  return this.equals(x.ZERO);
13439
13439
  }
13440
- wNAF(C) {
13441
- return k.wNAFCached(this, C, x.normalizeZ);
13440
+ wNAF(E) {
13441
+ return v.wNAFCached(this, E, x.normalizeZ);
13442
13442
  }
13443
13443
  /**
13444
13444
  * Non-constant-time multiplication. Uses double-and-add algorithm.
13445
13445
  * It's faster, but should only be used when you don't care about
13446
13446
  * an exposed private key e.g. sig verification, which works over *public* keys.
13447
13447
  */
13448
- multiplyUnsafe(C) {
13448
+ multiplyUnsafe(E) {
13449
13449
  const { endo: D, n: N } = t;
13450
- zr("scalar", C, cn, N);
13450
+ zr("scalar", E, cn, N);
13451
13451
  const R = x.ZERO;
13452
- if (C === cn)
13452
+ if (E === cn)
13453
13453
  return R;
13454
- if (this.is0() || C === De)
13454
+ if (this.is0() || E === De)
13455
13455
  return this;
13456
- if (!D || k.hasPrecomputes(this))
13457
- return k.wNAFCachedUnsafe(this, C, x.normalizeZ);
13458
- let { k1neg: h, k1: b, k2neg: g, k2: v } = D.splitScalar(C), E = R, T = R, O = this;
13459
- for (; b > cn || v > cn; )
13460
- b & De && (E = E.add(O)), v & De && (T = T.add(O)), O = O.double(), b >>= De, v >>= De;
13461
- return h && (E = E.negate()), g && (T = T.negate()), T = new x(n.mul(T.px, D.beta), T.py, T.pz), E.add(T);
13456
+ if (!D || v.hasPrecomputes(this))
13457
+ return v.wNAFCachedUnsafe(this, E, x.normalizeZ);
13458
+ let { k1neg: h, k1: b, k2neg: g, k2: C } = D.splitScalar(E), k = R, T = R, O = this;
13459
+ for (; b > cn || C > cn; )
13460
+ b & De && (k = k.add(O)), C & De && (T = T.add(O)), O = O.double(), b >>= De, C >>= De;
13461
+ return h && (k = k.negate()), g && (T = T.negate()), T = new x(n.mul(T.px, D.beta), T.py, T.pz), k.add(T);
13462
13462
  }
13463
13463
  /**
13464
13464
  * Constant time multiplication.
@@ -13469,16 +13469,16 @@ function m3(e) {
13469
13469
  * @param scalar by which the point would be multiplied
13470
13470
  * @returns New point
13471
13471
  */
13472
- multiply(C) {
13472
+ multiply(E) {
13473
13473
  const { endo: D, n: N } = t;
13474
- zr("scalar", C, De, N);
13474
+ zr("scalar", E, De, N);
13475
13475
  let R, h;
13476
13476
  if (D) {
13477
- const { k1neg: b, k1: g, k2neg: v, k2: E } = D.splitScalar(C);
13478
- let { p: T, f: O } = this.wNAF(g), { p: w, f: A } = this.wNAF(E);
13479
- T = k.constTimeNegate(b, T), w = k.constTimeNegate(v, w), w = new x(n.mul(w.px, D.beta), w.py, w.pz), R = T.add(w), h = O.add(A);
13477
+ const { k1neg: b, k1: g, k2neg: C, k2: k } = D.splitScalar(E);
13478
+ let { p: T, f: O } = this.wNAF(g), { p: w, f: A } = this.wNAF(k);
13479
+ T = v.constTimeNegate(b, T), w = v.constTimeNegate(C, w), w = new x(n.mul(w.px, D.beta), w.py, w.pz), R = T.add(w), h = O.add(A);
13480
13480
  } else {
13481
- const { p: b, f: g } = this.wNAF(C);
13481
+ const { p: b, f: g } = this.wNAF(E);
13482
13482
  R = b, h = g;
13483
13483
  }
13484
13484
  return x.normalizeZ([R, h])[0];
@@ -13489,37 +13489,37 @@ function m3(e) {
13489
13489
  * The trick could be useful if both P and Q are not G (not in our case).
13490
13490
  * @returns non-zero affine point
13491
13491
  */
13492
- multiplyAndAddUnsafe(C, D, N) {
13493
- const R = x.BASE, h = (g, v) => v === cn || v === De || !g.equals(R) ? g.multiplyUnsafe(v) : g.multiply(v), b = h(this, D).add(h(C, N));
13492
+ multiplyAndAddUnsafe(E, D, N) {
13493
+ const R = x.BASE, h = (g, C) => C === cn || C === De || !g.equals(R) ? g.multiplyUnsafe(C) : g.multiply(C), b = h(this, D).add(h(E, N));
13494
13494
  return b.is0() ? void 0 : b;
13495
13495
  }
13496
13496
  // Converts Projective point to affine (x, y) coordinates.
13497
13497
  // Can accept precomputed Z^-1 - for example, from invertBatch.
13498
13498
  // (x, y, z) ∋ (x=x/z, y=y/z)
13499
- toAffine(C) {
13500
- return m(this, C);
13499
+ toAffine(E) {
13500
+ return m(this, E);
13501
13501
  }
13502
13502
  isTorsionFree() {
13503
- const { h: C, isTorsionFree: D } = t;
13504
- if (C === De)
13503
+ const { h: E, isTorsionFree: D } = t;
13504
+ if (E === De)
13505
13505
  return !0;
13506
13506
  if (D)
13507
13507
  return D(x, this);
13508
13508
  throw new Error("isTorsionFree() has not been declared for the elliptic curve");
13509
13509
  }
13510
13510
  clearCofactor() {
13511
- const { h: C, clearCofactor: D } = t;
13512
- return C === De ? this : D ? D(x, this) : this.multiplyUnsafe(t.h);
13511
+ const { h: E, clearCofactor: D } = t;
13512
+ return E === De ? this : D ? D(x, this) : this.multiplyUnsafe(t.h);
13513
13513
  }
13514
- toRawBytes(C = !0) {
13515
- return oa("isCompressed", C), this.assertValidity(), s(x, this, C);
13514
+ toRawBytes(E = !0) {
13515
+ return oa("isCompressed", E), this.assertValidity(), s(x, this, E);
13516
13516
  }
13517
- toHex(C = !0) {
13518
- return oa("isCompressed", C), ia(this.toRawBytes(C));
13517
+ toHex(E = !0) {
13518
+ return oa("isCompressed", E), ia(this.toRawBytes(E));
13519
13519
  }
13520
13520
  }
13521
13521
  x.BASE = new x(t.Gx, t.Gy, n.ONE), x.ZERO = new x(n.ZERO, n.ONE, n.ZERO);
13522
- const { endo: S, nBitLength: B } = t, k = l3(x, S ? Math.ceil(B / 2) : B);
13522
+ const { endo: S, nBitLength: U } = t, v = l3(x, S ? Math.ceil(U / 2) : U);
13523
13523
  return {
13524
13524
  CURVE: t,
13525
13525
  ProjectivePoint: x,
@@ -13587,20 +13587,20 @@ function b3(e) {
13587
13587
  return y(w) ? c(-w) : w;
13588
13588
  }
13589
13589
  const S = (w, A, F) => or(w.slice(A, F));
13590
- class B {
13590
+ class U {
13591
13591
  constructor(A, F, P) {
13592
13592
  zr("r", A, De, r), zr("s", F, De, r), this.r = A, this.s = F, P != null && (this.recovery = P), Object.freeze(this);
13593
13593
  }
13594
13594
  // pair (bytes of r, bytes of s)
13595
13595
  static fromCompact(A) {
13596
13596
  const F = s;
13597
- return A = bt("compactSignature", A, F * 2), new B(S(A, 0, F), S(A, F, 2 * F));
13597
+ return A = bt("compactSignature", A, F * 2), new U(S(A, 0, F), S(A, F, 2 * F));
13598
13598
  }
13599
13599
  // DER encoded ECDSA signature
13600
13600
  // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
13601
13601
  static fromDER(A) {
13602
13602
  const { r: F, s: P } = nn.toSig(bt("DER", A));
13603
- return new B(F, P);
13603
+ return new U(F, P);
13604
13604
  }
13605
13605
  /**
13606
13606
  * @todo remove
@@ -13609,7 +13609,7 @@ function b3(e) {
13609
13609
  assertValidity() {
13610
13610
  }
13611
13611
  addRecoveryBit(A) {
13612
- return new B(this.r, this.s, A);
13612
+ return new U(this.r, this.s, A);
13613
13613
  }
13614
13614
  recoverPublicKey(A) {
13615
13615
  const { r: F, s: P, recovery: M } = this, L = R(bt("msgHash", A));
@@ -13628,7 +13628,7 @@ function b3(e) {
13628
13628
  return y(this.s);
13629
13629
  }
13630
13630
  normalizeS() {
13631
- return this.hasHighS() ? new B(this.r, c(-this.s), this.recovery) : this;
13631
+ return this.hasHighS() ? new U(this.r, c(-this.s), this.recovery) : this;
13632
13632
  }
13633
13633
  // DER-encoded
13634
13634
  toDERRawBytes() {
@@ -13646,7 +13646,7 @@ function b3(e) {
13646
13646
  return ic(this.r, A) + ic(this.s, A);
13647
13647
  }
13648
13648
  }
13649
- const k = {
13649
+ const v = {
13650
13650
  isValidPrivateKey(w) {
13651
13651
  try {
13652
13652
  return p(w), !0;
@@ -13675,10 +13675,10 @@ function b3(e) {
13675
13675
  return A._setWindowSize(w), A.multiply(BigInt(3)), A;
13676
13676
  }
13677
13677
  };
13678
- function U(w, A = !0) {
13678
+ function B(w, A = !0) {
13679
13679
  return d.fromPrivateKey(w).toRawBytes(A);
13680
13680
  }
13681
- function C(w) {
13681
+ function E(w) {
13682
13682
  if (typeof w == "bigint")
13683
13683
  return !1;
13684
13684
  if (w instanceof d)
@@ -13688,9 +13688,9 @@ function b3(e) {
13688
13688
  return F === M || F === L;
13689
13689
  }
13690
13690
  function D(w, A, F = !0) {
13691
- if (C(w) === !0)
13691
+ if (E(w) === !0)
13692
13692
  throw new Error("first arg must be private key");
13693
- if (C(A) === !1)
13693
+ if (E(A) === !1)
13694
13694
  throw new Error("second arg must be public key");
13695
13695
  return d.fromHex(A).multiply(p(w)).toRawBytes(F);
13696
13696
  }
@@ -13705,7 +13705,7 @@ function b3(e) {
13705
13705
  function b(w) {
13706
13706
  return zr("num < 2^" + a, w, cn, h), Ia(w, s);
13707
13707
  }
13708
- function g(w, A, F = v) {
13708
+ function g(w, A, F = C) {
13709
13709
  if (["recovered", "canonical"].some((wt) => wt in F))
13710
13710
  throw new Error("sign() legacy options not supported");
13711
13711
  const { hash: P, randomBytes: M } = t;
@@ -13728,17 +13728,17 @@ function b3(e) {
13728
13728
  if (ke === cn)
13729
13729
  return;
13730
13730
  let fe = (Et.x === Se ? 0 : 2) | Number(Et.y & De), Tr = ke;
13731
- return L && y(ke) && (Tr = x(ke), fe ^= 1), new B(Se, Tr, fe);
13731
+ return L && y(ke) && (Tr = x(ke), fe ^= 1), new U(Se, Tr, fe);
13732
13732
  }
13733
13733
  return { seed: Y, k2sig: xn };
13734
13734
  }
13735
- const v = { lowS: t.lowS, prehash: !1 }, E = { lowS: t.lowS, prehash: !1 };
13736
- function T(w, A, F = v) {
13735
+ const C = { lowS: t.lowS, prehash: !1 }, k = { lowS: t.lowS, prehash: !1 };
13736
+ function T(w, A, F = C) {
13737
13737
  const { seed: P, k2sig: M } = g(w, A, F), L = t;
13738
13738
  return n5(L.hash.outputLen, L.nByteLength, L.hmac)(P, M);
13739
13739
  }
13740
13740
  d.BASE._setWindowSize(8);
13741
- function O(w, A, F, P = E) {
13741
+ function O(w, A, F, P = k) {
13742
13742
  var fe;
13743
13743
  const M = w;
13744
13744
  A = bt("msgHash", A), F = bt("publicKey", F);
@@ -13752,14 +13752,14 @@ function b3(e) {
13752
13752
  throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");
13753
13753
  let Q, Y;
13754
13754
  try {
13755
- if (ie && (Q = new B(M.r, M.s)), se) {
13755
+ if (ie && (Q = new U(M.r, M.s)), se) {
13756
13756
  try {
13757
- X !== "compact" && (Q = B.fromDER(M));
13757
+ X !== "compact" && (Q = U.fromDER(M));
13758
13758
  } catch (Tr) {
13759
13759
  if (!(Tr instanceof nn.Err))
13760
13760
  throw Tr;
13761
13761
  }
13762
- !Q && X !== "der" && (Q = B.fromCompact(M));
13762
+ !Q && X !== "der" && (Q = U.fromCompact(M));
13763
13763
  }
13764
13764
  Y = d.fromHex(F);
13765
13765
  } catch {
@@ -13773,13 +13773,13 @@ function b3(e) {
13773
13773
  }
13774
13774
  return {
13775
13775
  CURVE: t,
13776
- getPublicKey: U,
13776
+ getPublicKey: B,
13777
13777
  getSharedSecret: D,
13778
13778
  sign: T,
13779
13779
  verify: O,
13780
13780
  ProjectivePoint: d,
13781
- Signature: B,
13782
- utils: k
13781
+ Signature: U,
13782
+ utils: v
13783
13783
  };
13784
13784
  }
13785
13785
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -13797,7 +13797,7 @@ function Ci(e, t) {
13797
13797
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
13798
13798
  const Tm = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), op = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), x3 = BigInt(0), g3 = BigInt(1), Yc = BigInt(2), ip = (e, t) => (e + t / Yc) / t;
13799
13799
  function w3(e) {
13800
- const t = Tm, n = BigInt(3), r = BigInt(6), s = BigInt(11), a = BigInt(22), o = BigInt(23), i = BigInt(44), c = BigInt(88), l = e * e * e % t, d = l * l * e % t, p = ft(d, n, t) * d % t, f = ft(p, n, t) * d % t, m = ft(f, Yc, t) * l % t, y = ft(m, s, t) * m % t, x = ft(y, a, t) * y % t, S = ft(x, i, t) * x % t, B = ft(S, c, t) * S % t, k = ft(B, i, t) * x % t, U = ft(k, n, t) * d % t, C = ft(U, o, t) * y % t, D = ft(C, r, t) * l % t, N = ft(D, Yc, t);
13800
+ const t = Tm, n = BigInt(3), r = BigInt(6), s = BigInt(11), a = BigInt(22), o = BigInt(23), i = BigInt(44), c = BigInt(88), l = e * e * e % t, d = l * l * e % t, p = ft(d, n, t) * d % t, f = ft(p, n, t) * d % t, m = ft(f, Yc, t) * l % t, y = ft(m, s, t) * m % t, x = ft(y, a, t) * y % t, S = ft(x, i, t) * x % t, U = ft(S, c, t) * S % t, v = ft(U, i, t) * x % t, B = ft(v, n, t) * d % t, E = ft(B, o, t) * y % t, D = ft(E, r, t) * l % t, N = ft(D, Yc, t);
13801
13801
  if (!el.eql(el.sqr(N), e))
13802
13802
  throw new Error("Cannot find square root");
13803
13803
  return N;
@@ -14191,8 +14191,8 @@ async function Ro(e, { hash: t }) {
14191
14191
  return (((o = (a = (s = e.chain) == null ? void 0 : s.formatters) == null ? void 0 : a.transactionReceipt) == null ? void 0 : o.format) || Ei)(n, "getTransactionReceipt");
14192
14192
  }
14193
14193
  async function X3(e, t) {
14194
- var k;
14195
- const { account: n, authorizationList: r, allowFailure: s = !0, blockNumber: a, blockOverrides: o, blockTag: i, stateOverride: c } = t, l = t.contracts, { batchSize: d = t.batchSize ?? 1024, deployless: p = t.deployless ?? !1 } = typeof ((k = e.batch) == null ? void 0 : k.multicall) == "object" ? e.batch.multicall : {}, f = (() => {
14194
+ var v;
14195
+ const { account: n, authorizationList: r, allowFailure: s = !0, blockNumber: a, blockOverrides: o, blockTag: i, stateOverride: c } = t, l = t.contracts, { batchSize: d = t.batchSize ?? 1024, deployless: p = t.deployless ?? !1 } = typeof ((v = e.batch) == null ? void 0 : v.multicall) == "object" ? e.batch.multicall : {}, f = (() => {
14196
14196
  if (t.multicallAddress)
14197
14197
  return t.multicallAddress;
14198
14198
  if (p)
@@ -14206,10 +14206,10 @@ async function X3(e, t) {
14206
14206
  throw new Error("client chain not configured. multicallAddress is required.");
14207
14207
  })(), m = [[]];
14208
14208
  let y = 0, x = 0;
14209
- for (let U = 0; U < l.length; U++) {
14210
- const { abi: C, address: D, args: N, functionName: R } = l[U];
14209
+ for (let B = 0; B < l.length; B++) {
14210
+ const { abi: E, address: D, args: N, functionName: R } = l[B];
14211
14211
  try {
14212
- const h = lt({ abi: C, args: N, functionName: R });
14212
+ const h = lt({ abi: E, args: N, functionName: R });
14213
14213
  x += (h.length - 2) / 2, // Check if batching is enabled.
14214
14214
  d > 0 && // Check if the current size of the batch exceeds the size limit.
14215
14215
  x > d && // Check if the current chunk is not already empty.
@@ -14223,7 +14223,7 @@ async function X3(e, t) {
14223
14223
  ];
14224
14224
  } catch (h) {
14225
14225
  const b = pr(h, {
14226
- abi: C,
14226
+ abi: E,
14227
14227
  address: D,
14228
14228
  args: N,
14229
14229
  docsPath: "/docs/contract/multicall",
@@ -14242,34 +14242,34 @@ async function X3(e, t) {
14242
14242
  ];
14243
14243
  }
14244
14244
  }
14245
- const S = await Promise.allSettled(m.map((U) => q(e, It, "readContract")({
14245
+ const S = await Promise.allSettled(m.map((B) => q(e, It, "readContract")({
14246
14246
  ...f === null ? { code: cu } : { address: f },
14247
14247
  abi: jo,
14248
14248
  account: n,
14249
- args: [U],
14249
+ args: [B],
14250
14250
  authorizationList: r,
14251
14251
  blockNumber: a,
14252
14252
  blockOverrides: o,
14253
14253
  blockTag: i,
14254
14254
  functionName: "aggregate3",
14255
14255
  stateOverride: c
14256
- }))), B = [];
14257
- for (let U = 0; U < S.length; U++) {
14258
- const C = S[U];
14259
- if (C.status === "rejected") {
14256
+ }))), U = [];
14257
+ for (let B = 0; B < S.length; B++) {
14258
+ const E = S[B];
14259
+ if (E.status === "rejected") {
14260
14260
  if (!s)
14261
- throw C.reason;
14262
- for (let N = 0; N < m[U].length; N++)
14263
- B.push({
14261
+ throw E.reason;
14262
+ for (let N = 0; N < m[B].length; N++)
14263
+ U.push({
14264
14264
  status: "failure",
14265
- error: C.reason,
14265
+ error: E.reason,
14266
14266
  result: void 0
14267
14267
  });
14268
14268
  continue;
14269
14269
  }
14270
- const D = C.value;
14270
+ const D = E.value;
14271
14271
  for (let N = 0; N < D.length; N++) {
14272
- const { returnData: R, success: h } = D[N], { callData: b } = m[U][N], { abi: g, address: v, functionName: E, args: T } = l[B.length];
14272
+ const { returnData: R, success: h } = D[N], { callData: b } = m[B][N], { abi: g, address: C, functionName: k, args: T } = l[U.length];
14273
14273
  try {
14274
14274
  if (b === "0x")
14275
14275
  throw new Ea();
@@ -14279,26 +14279,26 @@ async function X3(e, t) {
14279
14279
  abi: g,
14280
14280
  args: T,
14281
14281
  data: R,
14282
- functionName: E
14282
+ functionName: k
14283
14283
  });
14284
- B.push(s ? { result: O, status: "success" } : O);
14284
+ U.push(s ? { result: O, status: "success" } : O);
14285
14285
  } catch (O) {
14286
14286
  const w = pr(O, {
14287
14287
  abi: g,
14288
- address: v,
14288
+ address: C,
14289
14289
  args: T,
14290
14290
  docsPath: "/docs/contract/multicall",
14291
- functionName: E
14291
+ functionName: k
14292
14292
  });
14293
14293
  if (!s)
14294
14294
  throw w;
14295
- B.push({ error: w, result: void 0, status: "failure" });
14295
+ U.push({ error: w, result: void 0, status: "failure" });
14296
14296
  }
14297
14297
  }
14298
14298
  }
14299
- if (B.length !== l.length)
14299
+ if (U.length !== l.length)
14300
14300
  throw new z("multicall results mismatch");
14301
- return B;
14301
+ return U;
14302
14302
  }
14303
14303
  async function tl(e, t) {
14304
14304
  const { blockNumber: n, blockTag: r = e.experimental_blockTag ?? "latest", blocks: s, returnFullTransactions: a, traceTransfers: o, validation: i } = t;
@@ -14306,13 +14306,13 @@ async function tl(e, t) {
14306
14306
  const c = [];
14307
14307
  for (const f of s) {
14308
14308
  const m = f.blockOverrides ? Sf(f.blockOverrides) : void 0, y = f.calls.map((S) => {
14309
- const B = S, k = B.account ? me(B.account) : void 0, U = B.abi ? lt(B) : B.data, C = {
14310
- ...B,
14311
- account: k,
14312
- data: B.dataSuffix ? gt([U || "0x", B.dataSuffix]) : U,
14313
- from: B.from ?? (k == null ? void 0 : k.address)
14309
+ const U = S, v = U.account ? me(U.account) : void 0, B = U.abi ? lt(U) : U.data, E = {
14310
+ ...U,
14311
+ account: v,
14312
+ data: U.dataSuffix ? gt([B || "0x", U.dataSuffix]) : B,
14313
+ from: U.from ?? (v == null ? void 0 : v.address)
14314
14314
  };
14315
- return Kt(C), Dt(C);
14315
+ return Kt(E), Dt(E);
14316
14316
  }), x = f.stateOverrides ? Hl(f.stateOverrides) : void 0;
14317
14317
  c.push({
14318
14318
  blockOverrides: m,
@@ -14330,26 +14330,26 @@ async function tl(e, t) {
14330
14330
  })).map((f, m) => ({
14331
14331
  ...jl(f),
14332
14332
  calls: f.calls.map((y, x) => {
14333
- var g, v;
14334
- const { abi: S, args: B, functionName: k, to: U } = s[m].calls[x], C = ((g = y.error) == null ? void 0 : g.data) ?? y.returnData, D = BigInt(y.gasUsed), N = (v = y.logs) == null ? void 0 : v.map((E) => Vt(E)), R = y.status === "0x1" ? "success" : "failure", h = S && R === "success" && C !== "0x" ? vr({
14333
+ var g, C;
14334
+ const { abi: S, args: U, functionName: v, to: B } = s[m].calls[x], E = ((g = y.error) == null ? void 0 : g.data) ?? y.returnData, D = BigInt(y.gasUsed), N = (C = y.logs) == null ? void 0 : C.map((k) => Vt(k)), R = y.status === "0x1" ? "success" : "failure", h = S && R === "success" && E !== "0x" ? vr({
14335
14335
  abi: S,
14336
- data: C,
14337
- functionName: k
14336
+ data: E,
14337
+ functionName: v
14338
14338
  }) : null, b = (() => {
14339
14339
  var T;
14340
14340
  if (R === "success")
14341
14341
  return;
14342
- let E;
14343
- if (((T = y.error) == null ? void 0 : T.data) === "0x" ? E = new Ea() : y.error && (E = new oi(y.error)), !!E)
14344
- return pr(E, {
14342
+ let k;
14343
+ if (((T = y.error) == null ? void 0 : T.data) === "0x" ? k = new Ea() : y.error && (k = new oi(y.error)), !!k)
14344
+ return pr(k, {
14345
14345
  abi: S ?? [],
14346
- address: U ?? "0x",
14347
- args: B,
14348
- functionName: k ?? "<unknown>"
14346
+ address: B ?? "0x",
14347
+ args: U,
14348
+ functionName: v ?? "<unknown>"
14349
14349
  });
14350
14350
  })();
14351
14351
  return {
14352
- data: C,
14352
+ data: E,
14353
14353
  gasUsed: D,
14354
14354
  logs: N,
14355
14355
  status: R,
@@ -14728,7 +14728,7 @@ async function ag(e, t) {
14728
14728
  ],
14729
14729
  traceTransfers: i,
14730
14730
  validation: c
14731
- }), m = o ? f[2] : f[0], [y, x, , S, B, k, U, C] = o ? f : [], { calls: D, ...N } = m, R = D.slice(0, -1) ?? [], h = (y == null ? void 0 : y.calls) ?? [], b = (x == null ? void 0 : x.calls) ?? [], g = [...h, ...b].map((P) => P.status === "success" ? de(P.data) : null), v = (S == null ? void 0 : S.calls) ?? [], E = (B == null ? void 0 : B.calls) ?? [], T = [...v, ...E].map((P) => P.status === "success" ? de(P.data) : null), O = ((k == null ? void 0 : k.calls) ?? []).map((P) => P.status === "success" ? P.result : null), w = ((C == null ? void 0 : C.calls) ?? []).map((P) => P.status === "success" ? P.result : null), A = ((U == null ? void 0 : U.calls) ?? []).map((P) => P.status === "success" ? P.result : null), F = [];
14731
+ }), m = o ? f[2] : f[0], [y, x, , S, U, v, B, E] = o ? f : [], { calls: D, ...N } = m, R = D.slice(0, -1) ?? [], h = (y == null ? void 0 : y.calls) ?? [], b = (x == null ? void 0 : x.calls) ?? [], g = [...h, ...b].map((P) => P.status === "success" ? de(P.data) : null), C = (S == null ? void 0 : S.calls) ?? [], k = (U == null ? void 0 : U.calls) ?? [], T = [...C, ...k].map((P) => P.status === "success" ? de(P.data) : null), O = ((v == null ? void 0 : v.calls) ?? []).map((P) => P.status === "success" ? P.result : null), w = ((E == null ? void 0 : E.calls) ?? []).map((P) => P.status === "success" ? P.result : null), A = ((B == null ? void 0 : B.calls) ?? []).map((P) => P.status === "success" ? P.result : null), F = [];
14732
14732
  for (const [P, M] of T.entries()) {
14733
14733
  const L = g[P];
14734
14734
  if (typeof M != "bigint" || typeof L != "bigint")
@@ -14996,22 +14996,22 @@ function Rm(e, { emitOnBegin: t = !1, emitMissed: n = !1, onBlockNumber: r, onEr
14996
14996
  try {
14997
14997
  const x = (() => {
14998
14998
  if (e.transport.type === "fallback") {
14999
- const B = e.transport.transports.find((k) => k.config.type === "webSocket" || k.config.type === "ipc");
15000
- return B ? B.value : e.transport;
14999
+ const U = e.transport.transports.find((v) => v.config.type === "webSocket" || v.config.type === "ipc");
15000
+ return U ? U.value : e.transport;
15001
15001
  }
15002
15002
  return e.transport;
15003
15003
  })(), { unsubscribe: S } = await x.subscribe({
15004
15004
  params: ["newHeads"],
15005
- onData(B) {
15006
- var U;
15005
+ onData(U) {
15006
+ var B;
15007
15007
  if (!m)
15008
15008
  return;
15009
- const k = de((U = B.result) == null ? void 0 : U.number);
15010
- f.onBlockNumber(k, c), c = k;
15009
+ const v = de((B = U.result) == null ? void 0 : B.number);
15010
+ f.onBlockNumber(v, c), c = v;
15011
15011
  },
15012
- onError(B) {
15013
- var k;
15014
- (k = f.onError) == null || k.call(f, B);
15012
+ onError(U) {
15013
+ var v;
15014
+ (v = f.onError) == null || v.call(f, U);
15015
15015
  }
15016
15016
  });
15017
15017
  y = S, m || y();
@@ -15037,13 +15037,13 @@ async function Nm(e, t) {
15037
15037
  return t.pollingInterval ? t.pollingInterval : (D = e.chain) != null && D.experimental_preconfirmationTime ? e.chain.experimental_preconfirmationTime : e.pollingInterval;
15038
15038
  })();
15039
15039
  let p, f, m, y = !1, x, S;
15040
- const { promise: B, resolve: k, reject: U } = uu(), C = c ? setTimeout(() => {
15041
- S == null || S(), x == null || x(), U(new m2({ hash: s }));
15040
+ const { promise: U, resolve: v, reject: B } = uu(), E = c ? setTimeout(() => {
15041
+ S == null || S(), x == null || x(), B(new m2({ hash: s }));
15042
15042
  }, c) : void 0;
15043
- return x = mn(l, { onReplaced: a, resolve: k, reject: U }, async (D) => {
15043
+ return x = mn(l, { onReplaced: a, resolve: v, reject: B }, async (D) => {
15044
15044
  if (m = await q(e, Ro, "getTransactionReceipt")({ hash: s }).catch(() => {
15045
15045
  }), m && r <= 1) {
15046
- clearTimeout(C), D.resolve(m), x == null || x();
15046
+ clearTimeout(E), D.resolve(m), x == null || x();
15047
15047
  return;
15048
15048
  }
15049
15049
  S = q(e, Rm, "watchBlockNumber")({
@@ -15053,7 +15053,7 @@ async function Nm(e, t) {
15053
15053
  pollingInterval: d,
15054
15054
  async onBlockNumber(N) {
15055
15055
  const R = (b) => {
15056
- clearTimeout(C), S == null || S(), b(), x == null || x();
15056
+ clearTimeout(E), S == null || S(), b(), x == null || x();
15057
15057
  };
15058
15058
  let h = N;
15059
15059
  if (!y)
@@ -15089,18 +15089,18 @@ async function Nm(e, t) {
15089
15089
  shouldRetry: ({ error: T }) => T instanceof Z0
15090
15090
  });
15091
15091
  y = !1;
15092
- const v = g.transactions.find(({ from: T, nonce: O }) => T === f.from && O === f.nonce);
15093
- if (!v || (m = await q(e, Ro, "getTransactionReceipt")({
15094
- hash: v.hash
15092
+ const C = g.transactions.find(({ from: T, nonce: O }) => T === f.from && O === f.nonce);
15093
+ if (!C || (m = await q(e, Ro, "getTransactionReceipt")({
15094
+ hash: C.hash
15095
15095
  }), r > 1 && (!m.blockNumber || h - m.blockNumber + 1n < r)))
15096
15096
  return;
15097
- let E = "replaced";
15098
- v.to === f.to && v.value === f.value && v.input === f.input ? E = "repriced" : v.from === v.to && v.value === 0n && (E = "cancelled"), R(() => {
15097
+ let k = "replaced";
15098
+ C.to === f.to && C.value === f.value && C.input === f.input ? k = "repriced" : C.from === C.to && C.value === 0n && (k = "cancelled"), R(() => {
15099
15099
  var T;
15100
15100
  (T = D.onReplaced) == null || T.call(D, {
15101
- reason: E,
15101
+ reason: k,
15102
15102
  replacedTransaction: f,
15103
- transaction: v,
15103
+ transaction: C,
15104
15104
  transactionReceipt: m
15105
15105
  }), D.resolve(m);
15106
15106
  });
@@ -15112,7 +15112,7 @@ async function Nm(e, t) {
15112
15112
  }
15113
15113
  }
15114
15114
  });
15115
- }), B;
15115
+ }), U;
15116
15116
  }
15117
15117
  function bg(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed: n = !1, emitOnBegin: r = !1, onBlock: s, onError: a, includeTransactions: o, poll: i, pollingInterval: c = e.pollingInterval }) {
15118
15118
  const l = typeof i < "u" ? i : !(e.transport.type === "webSocket" || e.transport.type === "ipc" || e.transport.type === "fallback" && (e.transport.transports[0].config.type === "webSocket" || e.transport.transports[0].config.type === "ipc")), d = o ?? !1;
@@ -15130,29 +15130,29 @@ function bg(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
15130
15130
  return mn(y, { onBlock: s, onError: a }, (x) => hs(async () => {
15131
15131
  var S;
15132
15132
  try {
15133
- const B = await q(e, Pt, "getBlock")({
15133
+ const U = await q(e, Pt, "getBlock")({
15134
15134
  blockTag: t,
15135
15135
  includeTransactions: d
15136
15136
  });
15137
- if (B.number !== null && (p == null ? void 0 : p.number) != null) {
15138
- if (B.number === p.number)
15137
+ if (U.number !== null && (p == null ? void 0 : p.number) != null) {
15138
+ if (U.number === p.number)
15139
15139
  return;
15140
- if (B.number - p.number > 1 && n)
15141
- for (let k = (p == null ? void 0 : p.number) + 1n; k < B.number; k++) {
15142
- const U = await q(e, Pt, "getBlock")({
15143
- blockNumber: k,
15140
+ if (U.number - p.number > 1 && n)
15141
+ for (let v = (p == null ? void 0 : p.number) + 1n; v < U.number; v++) {
15142
+ const B = await q(e, Pt, "getBlock")({
15143
+ blockNumber: v,
15144
15144
  includeTransactions: d
15145
15145
  });
15146
- x.onBlock(U, p), p = U;
15146
+ x.onBlock(B, p), p = B;
15147
15147
  }
15148
15148
  }
15149
15149
  // If no previous block exists, emit.
15150
15150
  ((p == null ? void 0 : p.number) == null || // If the block tag is "pending" with no block number, emit.
15151
- t === "pending" && (B == null ? void 0 : B.number) == null || // If the next block number is greater than the previous block number, emit.
15151
+ t === "pending" && (U == null ? void 0 : U.number) == null || // If the next block number is greater than the previous block number, emit.
15152
15152
  // We don't want to emit blocks in the past.
15153
- B.number !== null && B.number > p.number) && (x.onBlock(B, p), p = B);
15154
- } catch (B) {
15155
- (S = x.onError) == null || S.call(x, B);
15153
+ U.number !== null && U.number > p.number) && (x.onBlock(U, p), p = U);
15154
+ } catch (U) {
15155
+ (S = x.onError) == null || S.call(x, U);
15156
15156
  }
15157
15157
  }, {
15158
15158
  emitOnBegin: r,
@@ -15165,35 +15165,35 @@ function bg(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
15165
15165
  r && q(e, Pt, "getBlock")({
15166
15166
  blockTag: t,
15167
15167
  includeTransactions: d
15168
- }).then((U) => {
15169
- y && x && (s(U, void 0), x = !1);
15168
+ }).then((B) => {
15169
+ y && x && (s(B, void 0), x = !1);
15170
15170
  }).catch(a);
15171
- const B = (() => {
15171
+ const U = (() => {
15172
15172
  if (e.transport.type === "fallback") {
15173
- const U = e.transport.transports.find((C) => C.config.type === "webSocket" || C.config.type === "ipc");
15174
- return U ? U.value : e.transport;
15173
+ const B = e.transport.transports.find((E) => E.config.type === "webSocket" || E.config.type === "ipc");
15174
+ return B ? B.value : e.transport;
15175
15175
  }
15176
15176
  return e.transport;
15177
- })(), { unsubscribe: k } = await B.subscribe({
15177
+ })(), { unsubscribe: v } = await U.subscribe({
15178
15178
  params: ["newHeads"],
15179
- async onData(U) {
15179
+ async onData(B) {
15180
15180
  var D;
15181
15181
  if (!y)
15182
15182
  return;
15183
- const C = await q(e, Pt, "getBlock")({
15184
- blockNumber: (D = U.result) == null ? void 0 : D.number,
15183
+ const E = await q(e, Pt, "getBlock")({
15184
+ blockNumber: (D = B.result) == null ? void 0 : D.number,
15185
15185
  includeTransactions: d
15186
15186
  }).catch(() => {
15187
15187
  });
15188
- y && (s(C, p), x = !1, p = C);
15188
+ y && (s(E, p), x = !1, p = E);
15189
15189
  },
15190
- onError(U) {
15191
- a == null || a(U);
15190
+ onError(B) {
15191
+ a == null || a(B);
15192
15192
  }
15193
15193
  });
15194
- S = k, y || S();
15195
- } catch (B) {
15196
- a == null || a(B);
15194
+ S = v, y || S();
15195
+ } catch (U) {
15196
+ a == null || a(U);
15197
15197
  }
15198
15198
  })(), () => S();
15199
15199
  })();
@@ -15211,15 +15211,15 @@ function yg(e, { address: t, args: n, batch: r = !0, event: s, events: a, fromBl
15211
15211
  d,
15212
15212
  o
15213
15213
  ]);
15214
- return mn(S, { onLogs: c, onError: i }, (B) => {
15215
- let k;
15216
- o !== void 0 && (k = o - 1n);
15217
- let U, C = !1;
15214
+ return mn(S, { onLogs: c, onError: i }, (U) => {
15215
+ let v;
15216
+ o !== void 0 && (v = o - 1n);
15217
+ let B, E = !1;
15218
15218
  const D = hs(async () => {
15219
15219
  var N;
15220
- if (!C) {
15220
+ if (!E) {
15221
15221
  try {
15222
- U = await q(e, Xf, "createEventFilter")({
15222
+ B = await q(e, Xf, "createEventFilter")({
15223
15223
  address: t,
15224
15224
  args: n,
15225
15225
  event: s,
@@ -15229,61 +15229,61 @@ function yg(e, { address: t, args: n, batch: r = !0, event: s, events: a, fromBl
15229
15229
  });
15230
15230
  } catch {
15231
15231
  }
15232
- C = !0;
15232
+ E = !0;
15233
15233
  return;
15234
15234
  }
15235
15235
  try {
15236
15236
  let R;
15237
- if (U)
15238
- R = await q(e, xi, "getFilterChanges")({ filter: U });
15237
+ if (B)
15238
+ R = await q(e, xi, "getFilterChanges")({ filter: B });
15239
15239
  else {
15240
15240
  const h = await q(e, Da, "getBlockNumber")({});
15241
- k && k !== h ? R = await q(e, ru, "getLogs")({
15241
+ v && v !== h ? R = await q(e, ru, "getLogs")({
15242
15242
  address: t,
15243
15243
  args: n,
15244
15244
  event: s,
15245
15245
  events: a,
15246
- fromBlock: k + 1n,
15246
+ fromBlock: v + 1n,
15247
15247
  toBlock: h
15248
- }) : R = [], k = h;
15248
+ }) : R = [], v = h;
15249
15249
  }
15250
15250
  if (R.length === 0)
15251
15251
  return;
15252
15252
  if (r)
15253
- B.onLogs(R);
15253
+ U.onLogs(R);
15254
15254
  else
15255
15255
  for (const h of R)
15256
- B.onLogs([h]);
15256
+ U.onLogs([h]);
15257
15257
  } catch (R) {
15258
- U && R instanceof Rn && (C = !1), (N = B.onError) == null || N.call(B, R);
15258
+ B && R instanceof Rn && (E = !1), (N = U.onError) == null || N.call(U, R);
15259
15259
  }
15260
15260
  }, {
15261
15261
  emitOnBegin: !0,
15262
15262
  interval: d
15263
15263
  });
15264
15264
  return async () => {
15265
- U && await q(e, gi, "uninstallFilter")({ filter: U }), D();
15265
+ B && await q(e, gi, "uninstallFilter")({ filter: B }), D();
15266
15266
  };
15267
15267
  });
15268
15268
  })() : (() => {
15269
- let S = !0, B = () => S = !1;
15269
+ let S = !0, U = () => S = !1;
15270
15270
  return (async () => {
15271
15271
  try {
15272
- const k = (() => {
15272
+ const v = (() => {
15273
15273
  if (e.transport.type === "fallback") {
15274
15274
  const N = e.transport.transports.find((R) => R.config.type === "webSocket" || R.config.type === "ipc");
15275
15275
  return N ? N.value : e.transport;
15276
15276
  }
15277
15277
  return e.transport;
15278
- })(), U = a ?? (s ? [s] : void 0);
15279
- let C = [];
15280
- U && (C = [U.flatMap((R) => va({
15278
+ })(), B = a ?? (s ? [s] : void 0);
15279
+ let E = [];
15280
+ B && (E = [B.flatMap((R) => va({
15281
15281
  abi: [R],
15282
15282
  eventName: R.name,
15283
15283
  args: n
15284
- }))], s && (C = C[0]));
15285
- const { unsubscribe: D } = await k.subscribe({
15286
- params: ["logs", { address: t, topics: C }],
15284
+ }))], s && (E = E[0]));
15285
+ const { unsubscribe: D } = await v.subscribe({
15286
+ params: ["logs", { address: t, topics: E }],
15287
15287
  onData(N) {
15288
15288
  var h;
15289
15289
  if (!S)
@@ -15291,35 +15291,35 @@ function yg(e, { address: t, args: n, batch: r = !0, event: s, events: a, fromBl
15291
15291
  const R = N.result;
15292
15292
  try {
15293
15293
  const { eventName: b, args: g } = $o({
15294
- abi: U ?? [],
15294
+ abi: B ?? [],
15295
15295
  data: R.data,
15296
15296
  topics: R.topics,
15297
15297
  strict: m
15298
- }), v = Vt(R, { args: g, eventName: b });
15299
- c([v]);
15298
+ }), C = Vt(R, { args: g, eventName: b });
15299
+ c([C]);
15300
15300
  } catch (b) {
15301
- let g, v;
15301
+ let g, C;
15302
15302
  if (b instanceof Lo || b instanceof Bl) {
15303
15303
  if (p)
15304
15304
  return;
15305
- g = b.abiItem.name, v = (h = b.abiItem.inputs) == null ? void 0 : h.some((T) => !("name" in T && T.name));
15305
+ g = b.abiItem.name, C = (h = b.abiItem.inputs) == null ? void 0 : h.some((T) => !("name" in T && T.name));
15306
15306
  }
15307
- const E = Vt(R, {
15308
- args: v ? [] : {},
15307
+ const k = Vt(R, {
15308
+ args: C ? [] : {},
15309
15309
  eventName: g
15310
15310
  });
15311
- c([E]);
15311
+ c([k]);
15312
15312
  }
15313
15313
  },
15314
15314
  onError(N) {
15315
15315
  i == null || i(N);
15316
15316
  }
15317
15317
  });
15318
- B = D, S || B();
15319
- } catch (k) {
15320
- i == null || i(k);
15318
+ U = D, S || U();
15319
+ } catch (v) {
15320
+ i == null || i(v);
15321
15321
  }
15322
- })(), () => B();
15322
+ })(), () => U();
15323
15323
  })();
15324
15324
  }
15325
15325
  function xg(e, { batch: t = !0, onError: n, onTransactions: r, poll: s, pollingInterval: a = e.pollingInterval }) {
@@ -15595,12 +15595,12 @@ async function Og(e, t) {
15595
15595
  const uc = new ds(128);
15596
15596
  async function zm(e, t) {
15597
15597
  var D, N, R, h;
15598
- const { account: n = e.account, chain: r = e.chain, accessList: s, authorizationList: a, blobs: o, data: i, gas: c, gasPrice: l, maxFeePerBlobGas: d, maxFeePerGas: p, maxPriorityFeePerGas: f, nonce: m, pollingInterval: y, throwOnReceiptRevert: x, type: S, value: B, ...k } = t, U = t.timeout ?? Math.max(((r == null ? void 0 : r.blockTime) ?? 0) * 3, 5e3);
15598
+ const { account: n = e.account, chain: r = e.chain, accessList: s, authorizationList: a, blobs: o, data: i, gas: c, gasPrice: l, maxFeePerBlobGas: d, maxFeePerGas: p, maxPriorityFeePerGas: f, nonce: m, pollingInterval: y, throwOnReceiptRevert: x, type: S, value: U, ...v } = t, B = t.timeout ?? Math.max(((r == null ? void 0 : r.blockTime) ?? 0) * 3, 5e3);
15599
15599
  if (typeof n > "u")
15600
15600
  throw new bn({
15601
15601
  docsPath: "/docs/actions/wallet/sendTransactionSync"
15602
15602
  });
15603
- const C = n ? me(n) : null;
15603
+ const E = n ? me(n) : null;
15604
15604
  try {
15605
15605
  Kt(t);
15606
15606
  const b = await (async () => {
@@ -15613,17 +15613,17 @@ async function zm(e, t) {
15613
15613
  throw new z("`to` is required. Could not infer from `authorizationList`.");
15614
15614
  });
15615
15615
  })();
15616
- if ((C == null ? void 0 : C.type) === "json-rpc" || C === null) {
15616
+ if ((E == null ? void 0 : E.type) === "json-rpc" || E === null) {
15617
15617
  let g;
15618
15618
  r !== null && (g = await q(e, zn, "getChainId")({}), du({
15619
15619
  currentChainId: g,
15620
15620
  chain: r
15621
15621
  }));
15622
- const v = (R = (N = (D = e.chain) == null ? void 0 : D.formatters) == null ? void 0 : N.transactionRequest) == null ? void 0 : R.format, T = (v || Dt)({
15622
+ const C = (R = (N = (D = e.chain) == null ? void 0 : D.formatters) == null ? void 0 : N.transactionRequest) == null ? void 0 : R.format, T = (C || Dt)({
15623
15623
  // Pick out extra data that might exist on the chain's transaction request type.
15624
- ...kr(k, { format: v }),
15624
+ ...kr(v, { format: C }),
15625
15625
  accessList: s,
15626
- account: C,
15626
+ account: E,
15627
15627
  authorizationList: a,
15628
15628
  blobs: o,
15629
15629
  chainId: g,
@@ -15636,7 +15636,7 @@ async function zm(e, t) {
15636
15636
  nonce: m,
15637
15637
  to: b,
15638
15638
  type: S,
15639
- value: B
15639
+ value: U
15640
15640
  }, "sendTransaction"), O = uc.get(e.uid), w = O ? "wallet_sendTransaction" : "eth_sendTransaction", A = await (async () => {
15641
15641
  try {
15642
15642
  return await e.request({
@@ -15661,15 +15661,15 @@ async function zm(e, t) {
15661
15661
  checkReplacement: !1,
15662
15662
  hash: A,
15663
15663
  pollingInterval: y,
15664
- timeout: U
15664
+ timeout: B
15665
15665
  });
15666
15666
  if (x && F.status === "reverted")
15667
15667
  throw new G0({ receipt: F });
15668
15668
  return F;
15669
15669
  }
15670
- if ((C == null ? void 0 : C.type) === "local") {
15670
+ if ((E == null ? void 0 : E.type) === "local") {
15671
15671
  const g = await q(e, Pa, "prepareTransactionRequest")({
15672
- account: C,
15672
+ account: E,
15673
15673
  accessList: s,
15674
15674
  authorizationList: a,
15675
15675
  blobs: o,
@@ -15681,21 +15681,21 @@ async function zm(e, t) {
15681
15681
  maxFeePerGas: p,
15682
15682
  maxPriorityFeePerGas: f,
15683
15683
  nonce: m,
15684
- nonceManager: C.nonceManager,
15684
+ nonceManager: E.nonceManager,
15685
15685
  parameters: [...eu, "sidecars"],
15686
15686
  type: S,
15687
- value: B,
15688
- ...k,
15687
+ value: U,
15688
+ ...v,
15689
15689
  to: b
15690
- }), v = (h = r == null ? void 0 : r.serializers) == null ? void 0 : h.transaction, E = await C.signTransaction(g, {
15691
- serializer: v
15690
+ }), C = (h = r == null ? void 0 : r.serializers) == null ? void 0 : h.transaction, k = await E.signTransaction(g, {
15691
+ serializer: C
15692
15692
  });
15693
15693
  return await q(e, Fu, "sendRawTransactionSync")({
15694
- serializedTransaction: E,
15694
+ serializedTransaction: k,
15695
15695
  throwOnReceiptRevert: x
15696
15696
  });
15697
15697
  }
15698
- throw (C == null ? void 0 : C.type) === "smart" ? new ir({
15698
+ throw (E == null ? void 0 : E.type) === "smart" ? new ir({
15699
15699
  metaMessages: [
15700
15700
  "Consider using the `sendUserOperation` Action instead."
15701
15701
  ],
@@ -15703,12 +15703,12 @@ async function zm(e, t) {
15703
15703
  type: "smart"
15704
15704
  }) : new ir({
15705
15705
  docsPath: "/docs/actions/wallet/sendTransactionSync",
15706
- type: C == null ? void 0 : C.type
15706
+ type: E == null ? void 0 : E.type
15707
15707
  });
15708
15708
  } catch (b) {
15709
15709
  throw b instanceof ir ? b : di(b, {
15710
15710
  ...t,
15711
- account: C,
15711
+ account: E,
15712
15712
  chain: t.chain || void 0
15713
15713
  });
15714
15714
  }
@@ -15906,15 +15906,15 @@ class Vg extends z {
15906
15906
  function qg(e, t = {}) {
15907
15907
  const { batch: n, fetchFn: r, fetchOptions: s, key: a = "http", methods: o, name: i = "HTTP JSON-RPC", onFetchRequest: c, onFetchResponse: l, retryDelay: d, raw: p } = t;
15908
15908
  return ({ chain: f, retryCount: m, timeout: y }) => {
15909
- const { batchSize: x = 1e3, wait: S = 0 } = typeof n == "object" ? n : {}, B = t.retryCount ?? m, k = y ?? t.timeout ?? 1e4, U = f == null ? void 0 : f.rpcUrls.default.http[0];
15910
- if (!U)
15909
+ const { batchSize: x = 1e3, wait: S = 0 } = typeof n == "object" ? n : {}, U = t.retryCount ?? m, v = y ?? t.timeout ?? 1e4, B = f == null ? void 0 : f.rpcUrls.default.http[0];
15910
+ if (!B)
15911
15911
  throw new Vg();
15912
- const C = Wx(U, {
15912
+ const E = Wx(B, {
15913
15913
  fetchFn: r,
15914
15914
  fetchOptions: s,
15915
15915
  onRequest: c,
15916
15916
  onResponse: l,
15917
- timeout: k
15917
+ timeout: v
15918
15918
  });
15919
15919
  return Lm({
15920
15920
  key: a,
@@ -15922,37 +15922,37 @@ function qg(e, t = {}) {
15922
15922
  name: i,
15923
15923
  async request({ method: D, params: N }) {
15924
15924
  const R = { method: D, params: N }, { schedule: h } = Df({
15925
- id: U,
15925
+ id: B,
15926
15926
  wait: S,
15927
- shouldSplitBatch(E) {
15928
- return E.length > x;
15927
+ shouldSplitBatch(k) {
15928
+ return k.length > x;
15929
15929
  },
15930
- fn: (E) => C.request({
15931
- body: E
15930
+ fn: (k) => E.request({
15931
+ body: k
15932
15932
  }),
15933
- sort: (E, T) => E.id - T.id
15934
- }), b = async (E) => n ? h(E) : [
15935
- await C.request({
15936
- body: E
15933
+ sort: (k, T) => k.id - T.id
15934
+ }), b = async (k) => n ? h(k) : [
15935
+ await E.request({
15936
+ body: k
15937
15937
  })
15938
- ], [{ error: g, result: v }] = await b(R);
15938
+ ], [{ error: g, result: C }] = await b(R);
15939
15939
  if (p)
15940
- return { error: g, result: v };
15940
+ return { error: g, result: C };
15941
15941
  if (g)
15942
15942
  throw new Ll({
15943
15943
  body: R,
15944
15944
  error: g,
15945
- url: U
15945
+ url: B
15946
15946
  });
15947
- return v;
15947
+ return C;
15948
15948
  },
15949
- retryCount: B,
15949
+ retryCount: U,
15950
15950
  retryDelay: d,
15951
- timeout: k,
15951
+ timeout: v,
15952
15952
  type: "http"
15953
15953
  }, {
15954
15954
  fetchOptions: s,
15955
- url: U
15955
+ url: B
15956
15956
  });
15957
15957
  };
15958
15958
  }
@@ -16217,8 +16217,8 @@ const xO = (e, t) => e ? ue.TWAP_MARKET : t === 1 ? ue.LIMIT : ue.TWAP_LIMIT, Hm
16217
16217
  return $r(S.toFixed(), t);
16218
16218
  }
16219
16219
  if (r !== void 0 && _(n || "0").gt(0) && !_(n || "0").isNaN()) {
16220
- const S = _(n || "0"), B = _(r || 0).div(100);
16221
- return S.plus(S.multipliedBy(B)).decimalPlaces(0).toFixed();
16220
+ const S = _(n || "0"), U = _(r || 0).div(100);
16221
+ return S.plus(S.multipliedBy(U)).decimalPlaces(0).toFixed();
16222
16222
  }
16223
16223
  return _(n).gt(0) ? n : "";
16224
16224
  })()).decimalPlaces(0).toFixed(), [e, r, t, n, c]), d = Te(
@@ -16236,8 +16236,8 @@ const xO = (e, t) => e ? ue.TWAP_MARKET : t === 1 ? ue.LIMIT : ue.TWAP_LIMIT, Hm
16236
16236
  if (r != null)
16237
16237
  return r;
16238
16238
  if (l) {
16239
- const x = _(n), B = _(l).minus(x).div(x).multipliedBy(100).decimalPlaces(2).toString();
16240
- return _(B || "0").isZero() ? "" : B;
16239
+ const x = _(n), U = _(l).minus(x).div(x).multipliedBy(100).decimalPlaces(2).toString();
16240
+ return _(U || "0").isZero() ? "" : U;
16241
16241
  }
16242
16242
  return "";
16243
16243
  }, [l, n, r]), m = W(() => {
@@ -16369,7 +16369,7 @@ const xO = (e, t) => e ? ue.TWAP_MARKET : t === 1 ? ue.LIMIT : ue.TWAP_LIMIT, Hm
16369
16369
  hide: a
16370
16370
  };
16371
16371
  }, dw = () => {
16372
- const { module: e, marketPriceLoading: t, srcToken: n, dstToken: r } = J(), { amount: s, amountUI: a, onChange: o, onPercentageChange: i, usd: c, selectedPercentage: l, error: d, isTypedValue: p } = Ui(), f = te((U) => U.updateState), m = Ru(), { isLimitPrice: y, toggleLimitPrice: x } = uw(), { fromToken: S, toToken: B } = Bi(), k = Te(() => {
16372
+ const { module: e, marketPriceLoading: t, srcToken: n, dstToken: r } = J(), { amount: s, amountUI: a, onChange: o, onPercentageChange: i, usd: c, selectedPercentage: l, error: d, isTypedValue: p } = Ui(), f = te((B) => B.updateState), m = Ru(), { isLimitPrice: y, toggleLimitPrice: x } = uw(), { fromToken: S, toToken: U } = Bi(), v = Te(() => {
16373
16373
  f({ typedLimitPrice: void 0 }), f({ limitPricePercent: m });
16374
16374
  }, [f, e, m]);
16375
16375
  return {
@@ -16378,12 +16378,12 @@ const xO = (e, t) => e ? ue.TWAP_MARKET : t === 1 ? ue.LIMIT : ue.TWAP_LIMIT, Hm
16378
16378
  error: d,
16379
16379
  onInputChange: o,
16380
16380
  onPercentageChange: i,
16381
- onReset: k,
16381
+ onReset: v,
16382
16382
  usd: c,
16383
16383
  srcToken: n,
16384
16384
  dstToken: r,
16385
16385
  invertedSrcToken: S,
16386
- invertedDstToken: B,
16386
+ invertedDstToken: U,
16387
16387
  percentage: l,
16388
16388
  isLoading: t,
16389
16389
  isLimitPrice: y,
@@ -16391,7 +16391,7 @@ const xO = (e, t) => e ? ue.TWAP_MARKET : t === 1 ? ue.LIMIT : ue.TWAP_LIMIT, Hm
16391
16391
  isTypedValue: p
16392
16392
  };
16393
16393
  }, pw = () => {
16394
- const { marketPrice: e, marketPriceLoading: t, srcToken: n, dstToken: r } = J(), { amount: s, amountUI: a, onChange: o, onPercentageChange: i, usd: c, selectedPercentage: l, error: d, pricePerChunk: p, pricePerChunkUI: f, pricePerChunkUsd: m, isTypedValue: y } = Ar(), x = te((U) => U.updateState), { fromToken: S, toToken: B } = Bi(), k = Te(() => {
16394
+ const { marketPrice: e, marketPriceLoading: t, srcToken: n, dstToken: r } = J(), { amount: s, amountUI: a, onChange: o, onPercentageChange: i, usd: c, selectedPercentage: l, error: d, pricePerChunk: p, pricePerChunkUI: f, pricePerChunkUsd: m, isTypedValue: y } = Ar(), x = te((B) => B.updateState), { fromToken: S, toToken: U } = Bi(), v = Te(() => {
16395
16395
  x({ triggerPricePercent: void 0, typedTriggerPrice: void 0 });
16396
16396
  }, [x]);
16397
16397
  return {
@@ -16404,12 +16404,12 @@ const xO = (e, t) => e ? ue.TWAP_MARKET : t === 1 ? ue.LIMIT : ue.TWAP_LIMIT, Hm
16404
16404
  onInputChange: o,
16405
16405
  onPercentageChange: i,
16406
16406
  percentage: l,
16407
- onReset: k,
16407
+ onReset: v,
16408
16408
  usd: c,
16409
16409
  srcToken: n,
16410
16410
  dstToken: r,
16411
16411
  invertedSrcToken: S,
16412
- invertedDstToken: B,
16412
+ invertedDstToken: U,
16413
16413
  isLoading: t || !e,
16414
16414
  isTypedValue: y
16415
16415
  };
@@ -16887,8 +16887,8 @@ function Qm(e) {
16887
16887
  const s = cl(), a = () => s.status !== "pending", o = (x) => {
16888
16888
  var S;
16889
16889
  if (!a()) {
16890
- const B = new ll(x);
16891
- f(B), (S = e.onCancel) == null || S.call(e, B);
16890
+ const U = new ll(x);
16891
+ f(U), (S = e.onCancel) == null || S.call(e, U);
16892
16892
  }
16893
16893
  }, i = () => {
16894
16894
  t = !0;
@@ -16900,8 +16900,8 @@ function Qm(e) {
16900
16900
  a() || (r == null || r(), s.reject(x));
16901
16901
  }, m = () => new Promise((x) => {
16902
16902
  var S;
16903
- r = (B) => {
16904
- (a() || l()) && x(B);
16903
+ r = (U) => {
16904
+ (a() || l()) && x(U);
16905
16905
  }, (S = e.onPause) == null || S.call(e);
16906
16906
  }).then(() => {
16907
16907
  var x;
@@ -16913,20 +16913,20 @@ function Qm(e) {
16913
16913
  const S = n === 0 ? e.initialPromise : void 0;
16914
16914
  try {
16915
16915
  x = S ?? e.fn();
16916
- } catch (B) {
16917
- x = Promise.reject(B);
16916
+ } catch (U) {
16917
+ x = Promise.reject(U);
16918
16918
  }
16919
- Promise.resolve(x).then(p).catch((B) => {
16919
+ Promise.resolve(x).then(p).catch((U) => {
16920
16920
  var N;
16921
16921
  if (a())
16922
16922
  return;
16923
- const k = e.retry ?? (yr ? 0 : 3), U = e.retryDelay ?? Pw, C = typeof U == "function" ? U(n, B) : U, D = k === !0 || typeof k == "number" && n < k || typeof k == "function" && k(n, B);
16923
+ const v = e.retry ?? (yr ? 0 : 3), B = e.retryDelay ?? Pw, E = typeof B == "function" ? B(n, U) : B, D = v === !0 || typeof v == "number" && n < v || typeof v == "function" && v(n, U);
16924
16924
  if (t || !D) {
16925
- f(B);
16925
+ f(U);
16926
16926
  return;
16927
16927
  }
16928
- n++, (N = e.onFail) == null || N.call(e, n, B), Ew(C).then(() => l() ? void 0 : m()).then(() => {
16929
- t ? f(B) : y();
16928
+ n++, (N = e.onFail) == null || N.call(e, n, U), Ew(E).then(() => l() ? void 0 : m()).then(() => {
16929
+ t ? f(U) : y();
16930
16930
  });
16931
16931
  });
16932
16932
  };
@@ -17060,7 +17060,7 @@ var Qn, Rp, Jm = (Rp = class {
17060
17060
  this.state.isInvalidated || ne(this, At, tn).call(this, { type: "invalidate" });
17061
17061
  }
17062
17062
  async fetch(t, n) {
17063
- var c, l, d, p, f, m, y, x, S, B, k, U;
17063
+ var c, l, d, p, f, m, y, x, S, U, v, B;
17064
17064
  if (this.state.fetchStatus !== "idle" && // If the promise in the retyer is already rejected, we have to definitely
17065
17065
  // re-start the fetch; there is a chance that the query is still in a
17066
17066
  // pending state when that happens
@@ -17071,19 +17071,19 @@ var Qn, Rp, Jm = (Rp = class {
17071
17071
  return I(this, Oe).continueRetry(), I(this, Oe).promise;
17072
17072
  }
17073
17073
  if (t && this.setOptions(t), !this.options.queryFn) {
17074
- const C = this.observers.find((D) => D.options.queryFn);
17075
- C && this.setOptions(C.options);
17074
+ const E = this.observers.find((D) => D.options.queryFn);
17075
+ E && this.setOptions(E.options);
17076
17076
  }
17077
17077
  process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
17078
17078
  "As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
17079
17079
  ));
17080
- const r = new AbortController(), s = (C) => {
17081
- Object.defineProperty(C, "signal", {
17080
+ const r = new AbortController(), s = (E) => {
17081
+ Object.defineProperty(E, "signal", {
17082
17082
  enumerable: !0,
17083
17083
  get: () => (V(this, er, !0), r.signal)
17084
17084
  });
17085
17085
  }, a = () => {
17086
- const C = Wm(this.options, n), N = (() => {
17086
+ const E = Wm(this.options, n), N = (() => {
17087
17087
  const R = {
17088
17088
  client: I(this, Yn),
17089
17089
  queryKey: this.queryKey,
@@ -17092,12 +17092,12 @@ var Qn, Rp, Jm = (Rp = class {
17092
17092
  return s(R), R;
17093
17093
  })();
17094
17094
  return V(this, er, !1), this.options.persister ? this.options.persister(
17095
- C,
17095
+ E,
17096
17096
  N,
17097
17097
  this
17098
- ) : C(N);
17098
+ ) : E(N);
17099
17099
  }, i = (() => {
17100
- const C = {
17100
+ const E = {
17101
17101
  fetchOptions: n,
17102
17102
  options: this.options,
17103
17103
  queryKey: this.queryKey,
@@ -17105,19 +17105,19 @@ var Qn, Rp, Jm = (Rp = class {
17105
17105
  state: this.state,
17106
17106
  fetchFn: a
17107
17107
  };
17108
- return s(C), C;
17108
+ return s(E), E;
17109
17109
  })();
17110
17110
  (l = this.options.behavior) == null || l.onFetch(i, this), V(this, Vr, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = i.fetchOptions) == null ? void 0 : d.meta)) && ne(this, At, tn).call(this, { type: "fetch", meta: (p = i.fetchOptions) == null ? void 0 : p.meta }), V(this, Oe, Qm({
17111
17111
  initialPromise: n == null ? void 0 : n.initialPromise,
17112
17112
  fn: i.fetchFn,
17113
- onCancel: (C) => {
17114
- C instanceof ll && C.revert && this.setState({
17113
+ onCancel: (E) => {
17114
+ E instanceof ll && E.revert && this.setState({
17115
17115
  ...I(this, Vr),
17116
17116
  fetchStatus: "idle"
17117
17117
  }), r.abort();
17118
17118
  },
17119
- onFail: (C, D) => {
17120
- ne(this, At, tn).call(this, { type: "failed", failureCount: C, error: D });
17119
+ onFail: (E, D) => {
17120
+ ne(this, At, tn).call(this, { type: "failed", failureCount: E, error: D });
17121
17121
  },
17122
17122
  onPause: () => {
17123
17123
  ne(this, At, tn).call(this, { type: "pause" });
@@ -17131,40 +17131,40 @@ var Qn, Rp, Jm = (Rp = class {
17131
17131
  canRun: () => !0
17132
17132
  }));
17133
17133
  try {
17134
- const C = await I(this, Oe).start();
17135
- if (C === void 0)
17134
+ const E = await I(this, Oe).start();
17135
+ if (E === void 0)
17136
17136
  throw process.env.NODE_ENV !== "production" && console.error(
17137
17137
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
17138
17138
  ), new Error(`${this.queryHash} data is undefined`);
17139
- return this.setData(C), (m = (f = I(this, yt).config).onSuccess) == null || m.call(f, C, this), (x = (y = I(this, yt).config).onSettled) == null || x.call(
17139
+ return this.setData(E), (m = (f = I(this, yt).config).onSuccess) == null || m.call(f, E, this), (x = (y = I(this, yt).config).onSettled) == null || x.call(
17140
17140
  y,
17141
- C,
17141
+ E,
17142
17142
  this.state.error,
17143
17143
  this
17144
- ), C;
17145
- } catch (C) {
17146
- if (C instanceof ll) {
17147
- if (C.silent)
17144
+ ), E;
17145
+ } catch (E) {
17146
+ if (E instanceof ll) {
17147
+ if (E.silent)
17148
17148
  return I(this, Oe).promise;
17149
- if (C.revert) {
17149
+ if (E.revert) {
17150
17150
  if (this.state.data === void 0)
17151
- throw C;
17151
+ throw E;
17152
17152
  return this.state.data;
17153
17153
  }
17154
17154
  }
17155
17155
  throw ne(this, At, tn).call(this, {
17156
17156
  type: "error",
17157
- error: C
17158
- }), (B = (S = I(this, yt).config).onError) == null || B.call(
17157
+ error: E
17158
+ }), (U = (S = I(this, yt).config).onError) == null || U.call(
17159
17159
  S,
17160
- C,
17160
+ E,
17161
17161
  this
17162
- ), (U = (k = I(this, yt).config).onSettled) == null || U.call(
17163
- k,
17162
+ ), (B = (v = I(this, yt).config).onSettled) == null || B.call(
17163
+ v,
17164
17164
  this.state.data,
17165
- C,
17165
+ E,
17166
17166
  this
17167
- ), C;
17167
+ ), E;
17168
17168
  } finally {
17169
17169
  this.scheduleGc();
17170
17170
  }
@@ -17385,18 +17385,18 @@ var Ze, ce, ha, je, tr, qr, rn, Sn, ba, Kr, Wr, nr, rr, Pn, Xr, pe, Ms, ul, dl,
17385
17385
  const r = I(this, ce), s = this.options, a = I(this, je), o = I(this, tr), i = I(this, qr), l = t !== r ? t.state : I(this, ha), { state: d } = t;
17386
17386
  let p = { ...d }, f = !1, m;
17387
17387
  if (n._optimisticResults) {
17388
- const g = this.hasListeners(), v = !g && hp(t, n), E = g && bp(t, r, n, s);
17389
- (v || E) && (p = {
17388
+ const g = this.hasListeners(), C = !g && hp(t, n), k = g && bp(t, r, n, s);
17389
+ (C || k) && (p = {
17390
17390
  ...p,
17391
17391
  ...Ym(d.data, t.options)
17392
17392
  }), n._optimisticResults === "isRestoring" && (p.fetchStatus = "idle");
17393
17393
  }
17394
17394
  let { error: y, errorUpdatedAt: x, status: S } = p;
17395
17395
  m = p.data;
17396
- let B = !1;
17396
+ let U = !1;
17397
17397
  if (n.placeholderData !== void 0 && m === void 0 && S === "pending") {
17398
17398
  let g;
17399
- a != null && a.isPlaceholderData && n.placeholderData === (i == null ? void 0 : i.placeholderData) ? (g = a.data, B = !0) : g = typeof n.placeholderData == "function" ? n.placeholderData(
17399
+ a != null && a.isPlaceholderData && n.placeholderData === (i == null ? void 0 : i.placeholderData) ? (g = a.data, U = !0) : g = typeof n.placeholderData == "function" ? n.placeholderData(
17400
17400
  (b = I(this, Wr)) == null ? void 0 : b.state.data,
17401
17401
  I(this, Wr)
17402
17402
  ) : n.placeholderData, g !== void 0 && (S = "success", m = il(
@@ -17405,7 +17405,7 @@ var Ze, ce, ha, je, tr, qr, rn, Sn, ba, Kr, Wr, nr, rr, Pn, Xr, pe, Ms, ul, dl,
17405
17405
  n
17406
17406
  ), f = !0);
17407
17407
  }
17408
- if (n.select && m !== void 0 && !B)
17408
+ if (n.select && m !== void 0 && !U)
17409
17409
  if (a && m === (o == null ? void 0 : o.data) && n.select === I(this, ba))
17410
17410
  m = I(this, Kr);
17411
17411
  else
@@ -17415,12 +17415,12 @@ var Ze, ce, ha, je, tr, qr, rn, Sn, ba, Kr, Wr, nr, rr, Pn, Xr, pe, Ms, ul, dl,
17415
17415
  V(this, Sn, g);
17416
17416
  }
17417
17417
  I(this, Sn) && (y = I(this, Sn), m = I(this, Kr), x = Date.now(), S = "error");
17418
- const k = p.fetchStatus === "fetching", U = S === "pending", C = S === "error", D = U && k, N = m !== void 0, h = {
17418
+ const v = p.fetchStatus === "fetching", B = S === "pending", E = S === "error", D = B && v, N = m !== void 0, h = {
17419
17419
  status: S,
17420
17420
  fetchStatus: p.fetchStatus,
17421
- isPending: U,
17421
+ isPending: B,
17422
17422
  isSuccess: S === "success",
17423
- isError: C,
17423
+ isError: E,
17424
17424
  isInitialLoading: D,
17425
17425
  isLoading: D,
17426
17426
  data: m,
@@ -17432,12 +17432,12 @@ var Ze, ce, ha, je, tr, qr, rn, Sn, ba, Kr, Wr, nr, rr, Pn, Xr, pe, Ms, ul, dl,
17432
17432
  errorUpdateCount: p.errorUpdateCount,
17433
17433
  isFetched: p.dataUpdateCount > 0 || p.errorUpdateCount > 0,
17434
17434
  isFetchedAfterMount: p.dataUpdateCount > l.dataUpdateCount || p.errorUpdateCount > l.errorUpdateCount,
17435
- isFetching: k,
17436
- isRefetching: k && !U,
17437
- isLoadingError: C && !N,
17435
+ isFetching: v,
17436
+ isRefetching: v && !B,
17437
+ isLoadingError: E && !N,
17438
17438
  isPaused: p.fetchStatus === "paused",
17439
17439
  isPlaceholderData: f,
17440
- isRefetchError: C && N,
17440
+ isRefetchError: E && N,
17441
17441
  isStale: Lu(t, n),
17442
17442
  refetch: this.refetch,
17443
17443
  promise: I(this, rn),
@@ -17446,19 +17446,19 @@ var Ze, ce, ha, je, tr, qr, rn, Sn, ba, Kr, Wr, nr, rr, Pn, Xr, pe, Ms, ul, dl,
17446
17446
  if (this.options.experimental_prefetchInRender) {
17447
17447
  const g = (T) => {
17448
17448
  h.status === "error" ? T.reject(h.error) : h.data !== void 0 && T.resolve(h.data);
17449
- }, v = () => {
17449
+ }, C = () => {
17450
17450
  const T = V(this, rn, h.promise = cl());
17451
17451
  g(T);
17452
- }, E = I(this, rn);
17453
- switch (E.status) {
17452
+ }, k = I(this, rn);
17453
+ switch (k.status) {
17454
17454
  case "pending":
17455
- t.queryHash === r.queryHash && g(E);
17455
+ t.queryHash === r.queryHash && g(k);
17456
17456
  break;
17457
17457
  case "fulfilled":
17458
- (h.status === "error" || h.data !== E.value) && v();
17458
+ (h.status === "error" || h.data !== k.value) && C();
17459
17459
  break;
17460
17460
  case "rejected":
17461
- (h.status !== "error" || h.error !== E.reason) && v();
17461
+ (h.status !== "error" || h.error !== k.reason) && C();
17462
17462
  break;
17463
17463
  }
17464
17464
  }
@@ -17565,47 +17565,47 @@ function yp(e) {
17565
17565
  let i = { pages: [], pageParams: [] }, c = 0;
17566
17566
  const l = async () => {
17567
17567
  let x = !1;
17568
- const S = (U) => {
17569
- Object.defineProperty(U, "signal", {
17568
+ const S = (B) => {
17569
+ Object.defineProperty(B, "signal", {
17570
17570
  enumerable: !0,
17571
17571
  get: () => (t.signal.aborted ? x = !0 : t.signal.addEventListener("abort", () => {
17572
17572
  x = !0;
17573
17573
  }), t.signal)
17574
17574
  });
17575
- }, B = Wm(t.options, t.fetchOptions), k = async (U, C, D) => {
17575
+ }, U = Wm(t.options, t.fetchOptions), v = async (B, E, D) => {
17576
17576
  if (x)
17577
17577
  return Promise.reject();
17578
- if (C == null && U.pages.length)
17579
- return Promise.resolve(U);
17578
+ if (E == null && B.pages.length)
17579
+ return Promise.resolve(B);
17580
17580
  const R = (() => {
17581
- const v = {
17581
+ const C = {
17582
17582
  client: t.client,
17583
17583
  queryKey: t.queryKey,
17584
- pageParam: C,
17584
+ pageParam: E,
17585
17585
  direction: D ? "backward" : "forward",
17586
17586
  meta: t.options.meta
17587
17587
  };
17588
- return S(v), v;
17589
- })(), h = await B(R), { maxPages: b } = t.options, g = D ? Cw : kw;
17588
+ return S(C), C;
17589
+ })(), h = await U(R), { maxPages: b } = t.options, g = D ? Cw : kw;
17590
17590
  return {
17591
- pages: g(U.pages, h, b),
17592
- pageParams: g(U.pageParams, C, b)
17591
+ pages: g(B.pages, h, b),
17592
+ pageParams: g(B.pageParams, E, b)
17593
17593
  };
17594
17594
  };
17595
17595
  if (s && a.length) {
17596
- const U = s === "backward", C = U ? Ow : xp, D = {
17596
+ const B = s === "backward", E = B ? Ow : xp, D = {
17597
17597
  pages: a,
17598
17598
  pageParams: o
17599
- }, N = C(r, D);
17600
- i = await k(D, N, U);
17599
+ }, N = E(r, D);
17600
+ i = await v(D, N, B);
17601
17601
  } else {
17602
- const U = e ?? a.length;
17602
+ const B = e ?? a.length;
17603
17603
  do {
17604
- const C = c === 0 ? o[0] ?? r.initialPageParam : xp(r, i);
17605
- if (c > 0 && C == null)
17604
+ const E = c === 0 ? o[0] ?? r.initialPageParam : xp(r, i);
17605
+ if (c > 0 && E == null)
17606
17606
  break;
17607
- i = await k(i, C), c++;
17608
- } while (c < U);
17607
+ i = await v(i, E), c++;
17608
+ } while (c < B);
17609
17609
  }
17610
17610
  return i;
17611
17611
  };
@@ -17678,7 +17678,7 @@ var ya, zt, Ve, sr, Lt, vn, zp, Dw = (zp = class extends Jm {
17678
17678
  this.execute(this.state.variables);
17679
17679
  }
17680
17680
  async execute(t) {
17681
- var o, i, c, l, d, p, f, m, y, x, S, B, k, U, C, D, N, R, h, b;
17681
+ var o, i, c, l, d, p, f, m, y, x, S, U, v, B, E, D, N, R, h, b;
17682
17682
  const n = () => {
17683
17683
  ne(this, Lt, vn).call(this, { type: "continue" });
17684
17684
  }, r = {
@@ -17688,8 +17688,8 @@ var ya, zt, Ve, sr, Lt, vn, zp, Dw = (zp = class extends Jm {
17688
17688
  };
17689
17689
  V(this, sr, Qm({
17690
17690
  fn: () => this.options.mutationFn ? this.options.mutationFn(t, r) : Promise.reject(new Error("No mutationFn found")),
17691
- onFail: (g, v) => {
17692
- ne(this, Lt, vn).call(this, { type: "failed", failureCount: g, error: v });
17691
+ onFail: (g, C) => {
17692
+ ne(this, Lt, vn).call(this, { type: "failed", failureCount: g, error: C });
17693
17693
  },
17694
17694
  onPause: () => {
17695
17695
  ne(this, Lt, vn).call(this, { type: "pause" });
@@ -17711,14 +17711,14 @@ var ya, zt, Ve, sr, Lt, vn, zp, Dw = (zp = class extends Jm {
17711
17711
  this,
17712
17712
  r
17713
17713
  ));
17714
- const v = await ((l = (c = this.options).onMutate) == null ? void 0 : l.call(
17714
+ const C = await ((l = (c = this.options).onMutate) == null ? void 0 : l.call(
17715
17715
  c,
17716
17716
  t,
17717
17717
  r
17718
17718
  ));
17719
- v !== this.state.context && ne(this, Lt, vn).call(this, {
17719
+ C !== this.state.context && ne(this, Lt, vn).call(this, {
17720
17720
  type: "pending",
17721
- context: v,
17721
+ context: C,
17722
17722
  variables: t,
17723
17723
  isPaused: a
17724
17724
  });
@@ -17745,7 +17745,7 @@ var ya, zt, Ve, sr, Lt, vn, zp, Dw = (zp = class extends Jm {
17745
17745
  this.state.context,
17746
17746
  this,
17747
17747
  r
17748
- )), await ((B = (S = this.options).onSettled) == null ? void 0 : B.call(
17748
+ )), await ((U = (S = this.options).onSettled) == null ? void 0 : U.call(
17749
17749
  S,
17750
17750
  g,
17751
17751
  null,
@@ -17755,15 +17755,15 @@ var ya, zt, Ve, sr, Lt, vn, zp, Dw = (zp = class extends Jm {
17755
17755
  )), ne(this, Lt, vn).call(this, { type: "success", data: g }), g;
17756
17756
  } catch (g) {
17757
17757
  try {
17758
- throw await ((U = (k = I(this, Ve).config).onError) == null ? void 0 : U.call(
17759
- k,
17758
+ throw await ((B = (v = I(this, Ve).config).onError) == null ? void 0 : B.call(
17759
+ v,
17760
17760
  g,
17761
17761
  t,
17762
17762
  this.state.context,
17763
17763
  this,
17764
17764
  r
17765
- )), await ((D = (C = this.options).onError) == null ? void 0 : D.call(
17766
- C,
17765
+ )), await ((D = (E = this.options).onError) == null ? void 0 : D.call(
17766
+ E,
17767
17767
  g,
17768
17768
  t,
17769
17769
  this.state.context,
@@ -18409,8 +18409,8 @@ function Zw(e, t, n) {
18409
18409
  if (Re.useSyncExternalStore(
18410
18410
  Re.useCallback(
18411
18411
  (S) => {
18412
- const B = d ? c.subscribe(Be.batchCalls(S)) : qe;
18413
- return c.updateResult(), B;
18412
+ const U = d ? c.subscribe(Be.batchCalls(S)) : qe;
18413
+ return c.updateResult(), U;
18414
18414
  },
18415
18415
  [c, d]
18416
18416
  ),
@@ -18681,7 +18681,7 @@ const Fi = () => {
18681
18681
  const { account: e, walletClient: t, chainId: n, callbacks: r } = J(), s = ah(), { refetch: a } = Hu();
18682
18682
  return yn({
18683
18683
  mutationFn: async () => {
18684
- var y, x, S, B;
18684
+ var y, x, S, U;
18685
18685
  if (!e)
18686
18686
  throw new Error("missing account");
18687
18687
  if (!t)
@@ -18699,8 +18699,8 @@ const Fi = () => {
18699
18699
  message: o,
18700
18700
  account: e
18701
18701
  }));
18702
- } catch (k) {
18703
- throw (y = r == null ? void 0 : r.onSignOrderError) == null || y.call(r, k), ve.onSignOrderError(k), k;
18702
+ } catch (v) {
18703
+ throw (y = r == null ? void 0 : r.onSignOrderError) == null || y.call(r, v), ve.onSignOrderError(v), v;
18704
18704
  }
18705
18705
  ve.onSignOrderSuccess(d), (x = r == null ? void 0 : r.onSignOrderSuccess) == null || x.call(r, d);
18706
18706
  const p = Kg(d), f = {
@@ -18710,7 +18710,7 @@ const Fi = () => {
18710
18710
  };
18711
18711
  (S = r == null ? void 0 : r.onSignOrderRequest) == null || S.call(r);
18712
18712
  const m = await Cb(o, f);
18713
- return (B = r == null ? void 0 : r.onOrderCreated) == null || B.call(r, m), await a(), m;
18713
+ return (U = r == null ? void 0 : r.onOrderCreated) == null || U.call(r, m), await a(), m;
18714
18714
  }
18715
18715
  });
18716
18716
  }, ih = () => {
@@ -18778,15 +18778,15 @@ const Fi = () => {
18778
18778
  throw new Error("failed to approve token");
18779
18779
  let m = !1;
18780
18780
  for (let S = 0; S < 3; S++) {
18781
- const { approvalRequired: B } = await i({
18781
+ const { approvalRequired: U } = await i({
18782
18782
  tokenAddress: c.address,
18783
18783
  srcAmountWei: d
18784
18784
  });
18785
- if (!B) {
18785
+ if (!U) {
18786
18786
  m = !0;
18787
18787
  break;
18788
18788
  }
18789
- S < 2 && await new Promise((k) => setTimeout(k, 3e3));
18789
+ S < 2 && await new Promise((v) => setTimeout(v, 3e3));
18790
18790
  }
18791
18791
  if (!m)
18792
18792
  throw new Error(
@@ -18858,25 +18858,25 @@ const ch = () => {
18858
18858
  tokenAddress: x.address,
18859
18859
  srcAmountWei: d
18860
18860
  });
18861
- let B = 0, k = 1;
18862
- f && k++, S && k++, l({
18863
- totalSteps: k,
18864
- stepIndex: B,
18861
+ let U = 0, v = 1;
18862
+ f && v++, S && v++, l({
18863
+ totalSteps: v,
18864
+ stepIndex: U,
18865
18865
  allowanceLoading: !1,
18866
18866
  hasApproval: !S,
18867
18867
  status: Ht.LOADING
18868
18868
  }), p();
18869
- let U = [];
18870
- f && U.push(jn.WRAP), S && U.push(jn.APPROVE), U.push(jn.CREATE), l({ pendingSteps: U }), f && (l({ step: jn.WRAP }), await o({
18869
+ let B = [];
18870
+ f && B.push(jn.WRAP), S && B.push(jn.APPROVE), B.push(jn.CREATE), l({ pendingSteps: B }), f && (l({ step: jn.WRAP }), await o({
18871
18871
  onHash: (D) => l({ wrapTxHash: D }),
18872
18872
  srcAmountWei: d
18873
- }), B++, l({ stepIndex: B })), S && (l({ step: jn.APPROVE }), await a({
18873
+ }), U++, l({ stepIndex: U })), S && (l({ step: jn.APPROVE }), await a({
18874
18874
  token: x,
18875
18875
  onHash: (D) => l({ approveTxHash: D }),
18876
18876
  srcAmountWei: d
18877
- }), B++, l({ stepIndex: B })), l({ step: jn.CREATE });
18878
- const C = await i();
18879
- return l({ status: Ht.SUCCESS, orderId: C.id }), C;
18877
+ }), U++, l({ stepIndex: U })), l({ step: jn.CREATE });
18878
+ const E = await i();
18879
+ return l({ status: Ht.SUCCESS, orderId: E.id }), E;
18880
18880
  } catch (x) {
18881
18881
  if ($m(x))
18882
18882
  (m = r == null ? void 0 : r.onSubmitOrderRejected) == null || m.call(r), l({
@@ -19031,10 +19031,10 @@ const ch = () => {
19031
19031
  amountUI: x,
19032
19032
  usd: S
19033
19033
  } = Nu(), {
19034
- amountUI: B,
19035
- amount: k,
19036
- usd: U
19037
- } = Ar(), { milliseconds: C } = xs(), { amount: D, amountUI: N } = Ii(), { srcAmountUsd: R, dstAmountUsd: h } = dE(), { amount: b, amountUI: g, percent: v, usd: E } = pE(), T = ah(), O = te((X) => X.state.isMarketOrder), w = te((X) => X.state.currentTime), A = Fi(), F = Yw(), P = A.acceptedSrcAmount || a, M = Ye(r, (t == null ? void 0 : t.decimals) || 0), L = W(() => F === ue.TAKE_PROFIT_MARKET || F === ue.TAKE_PROFIT_LIMIT || F === ue.STOP_LOSS_LIMIT || F === ue.STOP_LOSS_MARKET, [F]), G = fE({
19034
+ amountUI: U,
19035
+ amount: v,
19036
+ usd: B
19037
+ } = Ar(), { milliseconds: E } = xs(), { amount: D, amountUI: N } = Ii(), { srcAmountUsd: R, dstAmountUsd: h } = dE(), { amount: b, amountUI: g, percent: C, usd: k } = pE(), T = ah(), O = te((X) => X.state.isMarketOrder), w = te((X) => X.state.currentTime), A = Fi(), F = Yw(), P = A.acceptedSrcAmount || a, M = Ye(r, (t == null ? void 0 : t.decimals) || 0), L = W(() => F === ue.TAKE_PROFIT_MARKET || F === ue.TAKE_PROFIT_LIMIT || F === ue.STOP_LOSS_LIMIT || F === ue.STOP_LOSS_MARKET, [F]), G = fE({
19038
19038
  srcToken: e,
19039
19039
  dstToken: t,
19040
19040
  account: n,
@@ -19042,7 +19042,7 @@ const ch = () => {
19042
19042
  createdAt: w,
19043
19043
  deadline: m,
19044
19044
  totalTrades: f,
19045
- tradeInterval: C,
19045
+ tradeInterval: E,
19046
19046
  srcAmount: P,
19047
19047
  srcAmountUI: Ye(P, (e == null ? void 0 : e.decimals) || 0),
19048
19048
  srcAmountUsd: R,
@@ -19058,16 +19058,16 @@ const ch = () => {
19058
19058
  minDestAmountPerTrade: y,
19059
19059
  minDestAmountPerTradeUI: x,
19060
19060
  minDestAmountPerTradeUsd: S,
19061
- triggerPrice: k,
19062
- triggerPriceUI: B,
19063
- triggerPriceUsd: U
19061
+ triggerPrice: v,
19062
+ triggerPriceUI: U,
19063
+ triggerPriceUsd: B
19064
19064
  });
19065
19065
  return W(() => ({
19066
19066
  ...G,
19067
19067
  feesAmountUI: g,
19068
19068
  feesAmount: b,
19069
- feesUsd: E || "",
19070
- feesPercentage: v,
19069
+ feesUsd: k || "",
19070
+ feesPercentage: C,
19071
19071
  rePermitData: T,
19072
19072
  isTriggerPrice: L,
19073
19073
  isMarketOrder: O,
@@ -19078,8 +19078,8 @@ const ch = () => {
19078
19078
  G,
19079
19079
  g,
19080
19080
  b,
19081
- E,
19082
- v,
19081
+ k,
19082
+ C,
19083
19083
  T,
19084
19084
  L,
19085
19085
  O,
@@ -19132,35 +19132,30 @@ const ch = () => {
19132
19132
  throw ve.onCancelOrderError(f), f;
19133
19133
  }
19134
19134
  }, d = async (p) => {
19135
- var f;
19136
19135
  try {
19137
19136
  ve.onCancelOrderRequest(
19138
- p.map((x) => x.hash),
19137
+ p.map((y) => y.hash),
19139
19138
  2
19140
19139
  );
19141
- const m = await t.writeContract({
19140
+ const f = await t.writeContract({
19142
19141
  account: e,
19143
19142
  address: r.repermit,
19144
19143
  abi: c1,
19145
19144
  functionName: "cancel",
19146
- args: [p.map((x) => x.hash)],
19145
+ args: [p.map((y) => y.hash)],
19147
19146
  chain: t.chain
19148
- }), y = await o(m);
19149
- if (!y) throw new Error("failed to get transaction receipt");
19150
- if (y.status === "reverted")
19147
+ }), m = await o(f);
19148
+ if (!m) throw new Error("failed to get transaction receipt");
19149
+ if (m.status === "reverted")
19151
19150
  throw new Error("failed to cancel order");
19152
- return ve.onCancelOrderSuccess(m), (f = s == null ? void 0 : s.onCancelOrderSuccess) == null || f.call(s, {
19153
- orders: p,
19154
- txHash: m,
19155
- explorerUrl: za(m, a)
19156
- }), y.transactionHash;
19157
- } catch (m) {
19158
- throw ve.onCancelOrderError(m), m;
19151
+ return ve.onCancelOrderSuccess(f), m.transactionHash;
19152
+ } catch (f) {
19153
+ throw ve.onCancelOrderError(f), f;
19159
19154
  }
19160
19155
  };
19161
19156
  return yn({
19162
19157
  mutationFn: async ({ orders: p }) => {
19163
- var f, m;
19158
+ var f, m, y;
19164
19159
  if (!e || !t || !n || !r)
19165
19160
  throw new Error("missing required parameters");
19166
19161
  try {
@@ -19169,24 +19164,30 @@ const ch = () => {
19169
19164
  cancelOrderTxHash: void 0,
19170
19165
  cancelOrderError: void 0
19171
19166
  });
19172
- const y = p.filter((k) => k.version === 1), x = p.filter((k) => k.version === 2), [S, B] = await Promise.all([
19173
- y.length ? l(y) : Promise.resolve(""),
19174
- x.length ? d(x) : Promise.resolve("")
19167
+ const x = p.filter((E) => E.version === 1), S = p.filter((E) => E.version === 2), [U, v] = await Promise.all([
19168
+ x.length ? l(x) : Promise.resolve(""),
19169
+ S.length ? d(S) : Promise.resolve("")
19175
19170
  ]);
19176
- return await i(p.map((k) => k.id)), c({
19171
+ await i(p.map((E) => E.id));
19172
+ const B = U || v;
19173
+ return (m = s == null ? void 0 : s.onCancelOrderSuccess) == null || m.call(s, {
19174
+ orders: p,
19175
+ txHash: B,
19176
+ explorerUrl: za(B, a)
19177
+ }), c({
19177
19178
  cancelOrderStatus: Ht.SUCCESS
19178
- }), [S, B].filter(Boolean);
19179
- } catch (y) {
19180
- console.error("cancel order error", y), (m = s == null ? void 0 : s.onCancelOrderFailed) == null || m.call(s, y), $m(y) ? c({ cancelOrderStatus: void 0 }) : (c({ cancelOrderStatus: Ht.FAILED }), ve.onCancelOrderError(y));
19179
+ }), [U, v].filter(Boolean);
19180
+ } catch (x) {
19181
+ console.error("cancel order error", x), (y = s == null ? void 0 : s.onCancelOrderFailed) == null || y.call(s, x), $m(x) ? c({ cancelOrderStatus: void 0 }) : (c({ cancelOrderStatus: Ht.FAILED }), ve.onCancelOrderError(x));
19181
19182
  }
19182
19183
  }
19183
19184
  });
19184
19185
  }, uh = kl(null), gE = ({
19185
19186
  children: e
19186
19187
  }) => {
19187
- const t = tw(), n = aw(), r = rw(), s = dw(), a = pw(), o = Bi(), i = fw(), c = mw(), l = qm(), d = uE(), p = hE(), f = sE(), m = lE(), y = bE(), x = xE(), S = oh(), B = ch(), k = lh(), { module: U } = J(), C = W(
19188
- () => ({ cancelOrder: x, signOrder: S, submitOrder: B, refetchUntilStatusSynced: k }),
19189
- [x, S, B, k]
19188
+ const t = tw(), n = aw(), r = rw(), s = dw(), a = pw(), o = Bi(), i = fw(), c = mw(), l = qm(), d = uE(), p = hE(), f = sE(), m = lE(), y = bE(), x = xE(), S = oh(), U = ch(), v = lh(), { module: B } = J(), E = W(
19189
+ () => ({ cancelOrder: x, signOrder: S, submitOrder: U, refetchUntilStatusSynced: v }),
19190
+ [x, S, U, v]
19190
19191
  ), D = {
19191
19192
  tradesAmountPanel: t,
19192
19193
  durationPanel: n,
@@ -19202,8 +19203,8 @@ const ch = () => {
19202
19203
  orderHistoryPanel: f,
19203
19204
  orderExecutionPanel: m,
19204
19205
  supportedChains: y,
19205
- mutations: C,
19206
- module: U
19206
+ mutations: E,
19207
+ module: B
19207
19208
  };
19208
19209
  return /* @__PURE__ */ Bt(uh.Provider, { value: D, children: e });
19209
19210
  }, wO = () => {
@@ -27104,11 +27105,11 @@ async function iA(e, t) {
27104
27105
  throw new bn();
27105
27106
  const r = me(n);
27106
27107
  try {
27107
- const { accessList: i, blockNumber: c, blockTag: l, data: d, gas: p, gasPrice: f, maxFeePerGas: m, maxPriorityFeePerGas: y, nonce: x, to: S, value: B, ...k } = t, C = (typeof c == "bigint" ? H(c) : void 0) || l;
27108
+ const { accessList: i, blockNumber: c, blockTag: l, data: d, gas: p, gasPrice: f, maxFeePerGas: m, maxPriorityFeePerGas: y, nonce: x, to: S, value: U, ...v } = t, E = (typeof c == "bigint" ? H(c) : void 0) || l;
27108
27109
  Kt(t);
27109
27110
  const D = (o = (a = (s = e.chain) == null ? void 0 : s.formatters) == null ? void 0 : a.transactionRequest) == null ? void 0 : o.format, R = (D || Dt)({
27110
27111
  // Pick out extra data that might exist on the chain's transaction request type.
27111
- ...kr(k, { format: D }),
27112
+ ...kr(v, { format: D }),
27112
27113
  account: r,
27113
27114
  accessList: i,
27114
27115
  data: d,
@@ -27118,10 +27119,10 @@ async function iA(e, t) {
27118
27119
  maxPriorityFeePerGas: y,
27119
27120
  nonce: x,
27120
27121
  to: S,
27121
- value: B
27122
+ value: U
27122
27123
  }, "estimateGas"), { baseFeePerGas: h, gasLimit: b, priorityFeePerGas: g } = await e.request({
27123
27124
  method: "linea_estimateGas",
27124
- params: C ? [R, C] : [R]
27125
+ params: E ? [R, E] : [R]
27125
27126
  });
27126
27127
  return {
27127
27128
  baseFeePerGas: BigInt(h),
@@ -33194,8 +33195,8 @@ function aU(e) {
33194
33195
  if ((f & 1) !== 1 || d && (f & 4) !== 4 || (f & 8) !== 8 && (f & 16) === 16)
33195
33196
  return !1;
33196
33197
  if (l !== void 0) {
33197
- const k = '"type":"webauthn.get"';
33198
- if (k !== c.slice(Number(l), k.length + 1))
33198
+ const v = '"type":"webauthn.get"';
33199
+ if (v !== c.slice(Number(l), v.length + 1))
33199
33200
  return !1;
33200
33201
  }
33201
33202
  const m = i !== void 0 ? c.slice(Number(i)).match(/^"challenge":"(.*?)"/) : c.match(/"challenge":"(.*?)"/);
@@ -33206,10 +33207,10 @@ function aU(e) {
33206
33207
  return !1;
33207
33208
  const S = c8(gf(c), {
33208
33209
  as: "Bytes"
33209
- }), B = m5(p, S);
33210
+ }), U = m5(p, S);
33210
33211
  return vh({
33211
33212
  hash: n,
33212
- payload: B,
33213
+ payload: U,
33213
33214
  publicKey: s,
33214
33215
  signature: a
33215
33216
  });
@@ -33850,7 +33851,7 @@ function Zu(e) {
33850
33851
  });
33851
33852
  }
33852
33853
  function RU(e) {
33853
- const t = q8(oe(e, 1)), [n, r, s, a, o, i, c, l, d, p, f, m, y, x, S] = t, B = Array.isArray(x) ? x : void 0, k = B ? S : x;
33854
+ const t = q8(oe(e, 1)), [n, r, s, a, o, i, c, l, d, p, f, m, y, x, S] = t, U = Array.isArray(x) ? x : void 0, v = U ? S : x;
33854
33855
  if (!(t.length === 13 || t.length === 14 || t.length === 15))
33855
33856
  throw new FU({
33856
33857
  attributes: {
@@ -33861,7 +33862,7 @@ function RU(e) {
33861
33862
  gas: a,
33862
33863
  calls: o,
33863
33864
  accessList: i,
33864
- keyAuthorization: B,
33865
+ keyAuthorization: U,
33865
33866
  nonceKey: c,
33866
33867
  nonce: l,
33867
33868
  validBefore: d,
@@ -33869,29 +33870,29 @@ function RU(e) {
33869
33870
  feeToken: f,
33870
33871
  feePayerSignatureOrSender: m,
33871
33872
  ...t.length > 12 ? {
33872
- signature: k
33873
+ signature: v
33873
33874
  } : {}
33874
33875
  },
33875
33876
  serialized: e,
33876
33877
  type: Tp
33877
33878
  });
33878
- let U = {
33879
+ let B = {
33879
33880
  chainId: Number(n),
33880
33881
  type: Tp
33881
33882
  };
33882
- if (vt(a) && a !== "0x" && (U.gas = BigInt(a)), vt(l) && (U.nonce = l === "0x" ? 0n : BigInt(l)), vt(s) && s !== "0x" && (U.maxFeePerGas = BigInt(s)), vt(r) && r !== "0x" && (U.maxPriorityFeePerGas = BigInt(r)), vt(c) && (U.nonceKey = c === "0x" ? 0n : BigInt(c)), vt(d) && d !== "0x" && (U.validBefore = Number(d)), vt(p) && p !== "0x" && (U.validAfter = Number(p)), vt(f) && f !== "0x" && (U.feeToken = f), o && o !== "0x") {
33883
+ if (vt(a) && a !== "0x" && (B.gas = BigInt(a)), vt(l) && (B.nonce = l === "0x" ? 0n : BigInt(l)), vt(s) && s !== "0x" && (B.maxFeePerGas = BigInt(s)), vt(r) && r !== "0x" && (B.maxPriorityFeePerGas = BigInt(r)), vt(c) && (B.nonceKey = c === "0x" ? 0n : BigInt(c)), vt(d) && d !== "0x" && (B.validBefore = Number(d)), vt(p) && p !== "0x" && (B.validAfter = Number(p)), vt(f) && f !== "0x" && (B.feeToken = f), o && o !== "0x") {
33883
33884
  const D = o;
33884
- U.calls = D.map((N) => {
33885
+ B.calls = D.map((N) => {
33885
33886
  const [R, h, b] = N, g = {};
33886
33887
  return R && R !== "0x" && (g.to = R), h && h !== "0x" && (g.value = BigInt(h)), b && b !== "0x" && (g.data = b), g;
33887
33888
  });
33888
33889
  }
33889
- (i == null ? void 0 : i.length) !== 0 && i !== "0x" && (U.accessList = TU(i)), (y == null ? void 0 : y.length) !== 0 && y !== "0x" && (U.authorizationList = dU(y)), m !== "0x" && m !== void 0 && (m === "0x00" || Wo(m) ? U.feePayerSignature = null : U.feePayerSignature = v3(m)), B && (U.keyAuthorization = yU(B));
33890
- const C = k ? ws(k) : void 0;
33891
- return C && (U = {
33892
- ...U,
33893
- signature: C
33894
- }), Zu(U), U;
33890
+ (i == null ? void 0 : i.length) !== 0 && i !== "0x" && (B.accessList = TU(i)), (y == null ? void 0 : y.length) !== 0 && y !== "0x" && (B.authorizationList = dU(y)), m !== "0x" && m !== void 0 && (m === "0x00" || Wo(m) ? B.feePayerSignature = null : B.feePayerSignature = v3(m)), U && (B.keyAuthorization = yU(U));
33891
+ const E = v ? ws(v) : void 0;
33892
+ return E && (B = {
33893
+ ...B,
33894
+ signature: E
33895
+ }), Zu(B), B;
33895
33896
  }
33896
33897
  function NU(e, t = {}) {
33897
33898
  const { feePayerSignature: n, signature: r } = t, s = typeof e == "string" ? RU(e) : e;
@@ -33905,33 +33906,33 @@ function NU(e, t = {}) {
33905
33906
  function zs(e, t = {}) {
33906
33907
  const { accessList: n, authorizationList: r, calls: s, chainId: a, feeToken: o, gas: i, keyAuthorization: c, nonce: l, nonceKey: d, maxFeePerGas: p, maxPriorityFeePerGas: f, validBefore: m, validAfter: y } = e;
33907
33908
  Zu(e);
33908
- const x = SU(n), S = t.signature || e.signature, B = hU(r), k = s.map((D) => [
33909
+ const x = SU(n), S = t.signature || e.signature, U = hU(r), v = s.map((D) => [
33909
33910
  D.to ?? "0x",
33910
33911
  D.value ? j(D.value) : "0x",
33911
33912
  D.data ?? "0x"
33912
- ]), U = (() => {
33913
+ ]), B = (() => {
33913
33914
  if (t.sender)
33914
33915
  return t.sender;
33915
33916
  const D = typeof t.feePayerSignature < "u" ? t.feePayerSignature : e.feePayerSignature;
33916
33917
  return D === null ? "0x00" : D ? T3(D) : "0x";
33917
- })(), C = [
33918
+ })(), E = [
33918
33919
  j(a),
33919
33920
  f ? j(f) : "0x",
33920
33921
  p ? j(p) : "0x",
33921
33922
  i ? j(i) : "0x",
33922
- k,
33923
+ v,
33923
33924
  x,
33924
33925
  d ? j(d) : "0x",
33925
33926
  l ? j(l) : "0x",
33926
33927
  typeof m == "number" ? j(m) : "0x",
33927
33928
  typeof y == "number" ? j(y) : "0x",
33928
33929
  typeof o == "bigint" || typeof o == "string" ? Ph(o) : "0x",
33929
- U,
33930
33930
  B,
33931
+ U,
33931
33932
  ...c ? [gU(c)] : [],
33932
33933
  ...S ? [Di(La(S))] : []
33933
33934
  ];
33934
- return Ee(t.format === "feePayer" ? DU : MU, Z8(C));
33935
+ return Ee(t.format === "feePayer" ? DU : MU, Z8(E));
33935
33936
  }
33936
33937
  function _U(e) {
33937
33938
  return zU(e, { presign: !0 });
@@ -37005,15 +37006,15 @@ const Dh = kl(null), RF = new _w({
37005
37006
  }, 6e4);
37006
37007
  return () => clearInterval(o);
37007
37008
  }, [t]), Gn(() => {
37008
- var i, c, l, d, p, f, m, y, x, S, B, k, U, C, D, N;
37009
+ var i, c, l, d, p, f, m, y, x, S, U, v, B, E, D, N;
37009
37010
  const o = (c = (i = e.overrides) == null ? void 0 : i.state) == null ? void 0 : c.isMarketOrder;
37010
37011
  o !== void 0 && t({ isMarketOrder: o }), t({
37011
37012
  typedChunks: (d = (l = e.overrides) == null ? void 0 : l.state) == null ? void 0 : d.chunks,
37012
37013
  typedFillDelay: (f = (p = e.overrides) == null ? void 0 : p.state) == null ? void 0 : f.fillDelay,
37013
37014
  typedDuration: (y = (m = e.overrides) == null ? void 0 : m.state) == null ? void 0 : y.duration,
37014
37015
  typedLimitPrice: (S = (x = e.overrides) == null ? void 0 : x.state) == null ? void 0 : S.limitPrice,
37015
- typedTriggerPrice: (k = (B = e.overrides) == null ? void 0 : B.state) == null ? void 0 : k.triggerPrice,
37016
- triggerPricePercent: (C = (U = e.overrides) == null ? void 0 : U.state) == null ? void 0 : C.triggerPricePercent,
37016
+ typedTriggerPrice: (v = (U = e.overrides) == null ? void 0 : U.state) == null ? void 0 : v.triggerPrice,
37017
+ triggerPricePercent: (E = (B = e.overrides) == null ? void 0 : B.state) == null ? void 0 : E.triggerPricePercent,
37017
37018
  limitPricePercent: (N = (D = e.overrides) == null ? void 0 : D.state) == null ? void 0 : N.limitPricePercent
37018
37019
  });
37019
37020
  }, [(r = e.overrides) == null ? void 0 : r.state, e.module]), Gn(() => {