@edgex-web/components 1.0.0-beta.6 → 1.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ccip-sLjM_hEM.mjs → ccip-PikfM9kh.mjs} +2 -2
- package/dist/{ccip-sLjM_hEM.mjs.map → ccip-PikfM9kh.mjs.map} +1 -1
- package/dist/components/Deposit/src/components/evm/types/approve.d.ts +1 -1
- package/dist/components/Deposit/src/components/evm/types/approve.d.ts.map +1 -1
- package/dist/{index-VjAiP2Y6.mjs → index-BJxeI_Vg.mjs} +550 -550
- package/dist/{index-VjAiP2Y6.mjs.map → index-BJxeI_Vg.mjs.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/token.d.ts +1 -0
- package/dist/types/token.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -134,14 +134,14 @@ function fb() {
|
|
|
134
134
|
}
|
|
135
135
|
return null;
|
|
136
136
|
}
|
|
137
|
-
var
|
|
137
|
+
var D = Object.assign, v = 0, R, C, E, k, F, z, U;
|
|
138
138
|
function H() {
|
|
139
139
|
}
|
|
140
140
|
H.__reactDisabledLog = !0;
|
|
141
141
|
function ee() {
|
|
142
142
|
{
|
|
143
143
|
if (v === 0) {
|
|
144
|
-
R = console.log, C = console.info, E = console.warn,
|
|
144
|
+
R = console.log, C = console.info, E = console.warn, k = console.error, F = console.group, z = console.groupCollapsed, U = console.groupEnd;
|
|
145
145
|
var L = {
|
|
146
146
|
configurable: !0,
|
|
147
147
|
enumerable: !0,
|
|
@@ -170,25 +170,25 @@ function fb() {
|
|
|
170
170
|
writable: !0
|
|
171
171
|
};
|
|
172
172
|
Object.defineProperties(console, {
|
|
173
|
-
log:
|
|
173
|
+
log: D({}, L, {
|
|
174
174
|
value: R
|
|
175
175
|
}),
|
|
176
|
-
info:
|
|
176
|
+
info: D({}, L, {
|
|
177
177
|
value: C
|
|
178
178
|
}),
|
|
179
|
-
warn:
|
|
179
|
+
warn: D({}, L, {
|
|
180
180
|
value: E
|
|
181
181
|
}),
|
|
182
|
-
error:
|
|
183
|
-
value:
|
|
182
|
+
error: D({}, L, {
|
|
183
|
+
value: k
|
|
184
184
|
}),
|
|
185
|
-
group:
|
|
185
|
+
group: D({}, L, {
|
|
186
186
|
value: F
|
|
187
187
|
}),
|
|
188
|
-
groupCollapsed:
|
|
188
|
+
groupCollapsed: D({}, L, {
|
|
189
189
|
value: z
|
|
190
190
|
}),
|
|
191
|
-
groupEnd:
|
|
191
|
+
groupEnd: D({}, L, {
|
|
192
192
|
value: U
|
|
193
193
|
})
|
|
194
194
|
});
|
|
@@ -330,7 +330,7 @@ function fb() {
|
|
|
330
330
|
} else
|
|
331
331
|
pe.setExtraStackFrame(null);
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function ke(L, V, X, ue, Pe) {
|
|
334
334
|
{
|
|
335
335
|
var Se = Function.call.bind(ye);
|
|
336
336
|
for (var ge in L)
|
|
@@ -467,7 +467,7 @@ function fb() {
|
|
|
467
467
|
return Km(L, be, Ze, Pe, ue, Rn.current, ge);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
var
|
|
470
|
+
var Di = A.ReactCurrentOwner, tu = A.ReactDebugCurrentFrame;
|
|
471
471
|
function gr(L) {
|
|
472
472
|
if (L) {
|
|
473
473
|
var V = L._owner, X = se(L.type, L._source, V ? V.type : null);
|
|
@@ -475,15 +475,15 @@ function fb() {
|
|
|
475
475
|
} else
|
|
476
476
|
tu.setExtraStackFrame(null);
|
|
477
477
|
}
|
|
478
|
-
var
|
|
479
|
-
|
|
478
|
+
var ki;
|
|
479
|
+
ki = !1;
|
|
480
480
|
function Bi(L) {
|
|
481
481
|
return typeof L == "object" && L !== null && L.$$typeof === t;
|
|
482
482
|
}
|
|
483
483
|
function nu() {
|
|
484
484
|
{
|
|
485
|
-
if (
|
|
486
|
-
var L = I(
|
|
485
|
+
if (Di.current) {
|
|
486
|
+
var L = I(Di.current.type);
|
|
487
487
|
if (L)
|
|
488
488
|
return `
|
|
489
489
|
|
|
@@ -518,7 +518,7 @@ Check the top-level render call using <` + X + ">.");
|
|
|
518
518
|
return;
|
|
519
519
|
ru[X] = !0;
|
|
520
520
|
var ue = "";
|
|
521
|
-
L && L._owner && L._owner !==
|
|
521
|
+
L && L._owner && L._owner !== Di.current && (ue = " It was passed a child from " + I(L._owner.type) + "."), gr(L), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', X, ue), gr(null);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
function su(L, V) {
|
|
@@ -556,9 +556,9 @@ Check the top-level render call using <` + X + ">.");
|
|
|
556
556
|
return;
|
|
557
557
|
if (X) {
|
|
558
558
|
var ue = I(V);
|
|
559
|
-
|
|
560
|
-
} else if (V.PropTypes !== void 0 && !
|
|
561
|
-
|
|
559
|
+
ke(X, L.props, "prop", ue, L);
|
|
560
|
+
} else if (V.PropTypes !== void 0 && !ki) {
|
|
561
|
+
ki = !0;
|
|
562
562
|
var Pe = I(V);
|
|
563
563
|
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Pe || "Unknown");
|
|
564
564
|
}
|
|
@@ -1441,7 +1441,7 @@ const db = {
|
|
|
1441
1441
|
throw new Error("useComponentConfig must be used within ComponentProvider");
|
|
1442
1442
|
return e;
|
|
1443
1443
|
};
|
|
1444
|
-
var Sb = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Li = Math.ceil, xt = Math.floor, et = "[BigNumber Error] ", fu = et + "Number primitive has more than 15 significant digits: ",
|
|
1444
|
+
var Sb = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Li = Math.ceil, xt = Math.floor, et = "[BigNumber Error] ", fu = et + "Number primitive has more than 15 significant digits: ", Dt = 1e14, fe = 14, Fi = 9007199254740991, ji = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], On = 1e7, Le = 1e9;
|
|
1445
1445
|
function gd(e) {
|
|
1446
1446
|
var t, n, r, o = w.prototype = { constructor: w, toString: null, valueOf: null }, s = new w(1), i = 20, c = 4, a = -7, l = 21, u = -1e7, f = 1e7, p = !1, d = 1, h = 0, m = {
|
|
1447
1447
|
prefix: "",
|
|
@@ -1455,7 +1455,7 @@ function gd(e) {
|
|
|
1455
1455
|
suffix: ""
|
|
1456
1456
|
}, g = "0123456789abcdefghijklmnopqrstuvwxyz", A = !0;
|
|
1457
1457
|
function w(b, y) {
|
|
1458
|
-
var x, S, O, I,
|
|
1458
|
+
var x, S, O, I, D, v, R, C, E = this;
|
|
1459
1459
|
if (!(E instanceof w)) return new w(b, y);
|
|
1460
1460
|
if (y == null) {
|
|
1461
1461
|
if (b && b._isBigNumber === !0) {
|
|
@@ -1464,7 +1464,7 @@ function gd(e) {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
if ((v = typeof b == "number") && b * 0 == 0) {
|
|
1466
1466
|
if (E.s = 1 / b < 0 ? (b = -b, -1) : 1, b === ~~b) {
|
|
1467
|
-
for (I = 0,
|
|
1467
|
+
for (I = 0, D = b; D >= 10; D /= 10, I++) ;
|
|
1468
1468
|
I > f ? E.c = E.e = null : (E.e = I, E.c = [b]);
|
|
1469
1469
|
return;
|
|
1470
1470
|
}
|
|
@@ -1473,7 +1473,7 @@ function gd(e) {
|
|
|
1473
1473
|
if (!Sb.test(C = String(b))) return r(E, C, v);
|
|
1474
1474
|
E.s = C.charCodeAt(0) == 45 ? (C = C.slice(1), -1) : 1;
|
|
1475
1475
|
}
|
|
1476
|
-
(I = C.indexOf(".")) > -1 && (C = C.replace(".", "")), (
|
|
1476
|
+
(I = C.indexOf(".")) > -1 && (C = C.replace(".", "")), (D = C.search(/e/i)) > 0 ? (I < 0 && (I = D), I += +C.slice(D + 1), C = C.substring(0, D)) : I < 0 && (I = C.length);
|
|
1477
1477
|
} else {
|
|
1478
1478
|
if (Ae(y, 2, g.length, "Base"), y == 10 && A)
|
|
1479
1479
|
return E = new w(b), B(E, i + E.e + 1, c);
|
|
@@ -1483,38 +1483,38 @@ function gd(e) {
|
|
|
1483
1483
|
throw Error(fu + b);
|
|
1484
1484
|
} else
|
|
1485
1485
|
E.s = C.charCodeAt(0) === 45 ? (C = C.slice(1), -1) : 1;
|
|
1486
|
-
for (x = g.slice(0, y), I =
|
|
1487
|
-
if (x.indexOf(S = C.charAt(
|
|
1486
|
+
for (x = g.slice(0, y), I = D = 0, R = C.length; D < R; D++)
|
|
1487
|
+
if (x.indexOf(S = C.charAt(D)) < 0) {
|
|
1488
1488
|
if (S == ".") {
|
|
1489
|
-
if (
|
|
1489
|
+
if (D > I) {
|
|
1490
1490
|
I = R;
|
|
1491
1491
|
continue;
|
|
1492
1492
|
}
|
|
1493
1493
|
} else if (!O && (C == C.toUpperCase() && (C = C.toLowerCase()) || C == C.toLowerCase() && (C = C.toUpperCase()))) {
|
|
1494
|
-
O = !0,
|
|
1494
|
+
O = !0, D = -1, I = 0;
|
|
1495
1495
|
continue;
|
|
1496
1496
|
}
|
|
1497
1497
|
return r(E, String(b), v, y);
|
|
1498
1498
|
}
|
|
1499
1499
|
v = !1, C = n(C, y, 10, E.s), (I = C.indexOf(".")) > -1 ? C = C.replace(".", "") : I = C.length;
|
|
1500
1500
|
}
|
|
1501
|
-
for (
|
|
1501
|
+
for (D = 0; C.charCodeAt(D) === 48; D++) ;
|
|
1502
1502
|
for (R = C.length; C.charCodeAt(--R) === 48; ) ;
|
|
1503
|
-
if (C = C.slice(
|
|
1504
|
-
if (R -=
|
|
1503
|
+
if (C = C.slice(D, ++R)) {
|
|
1504
|
+
if (R -= D, v && w.DEBUG && R > 15 && (b > Fi || b !== xt(b)))
|
|
1505
1505
|
throw Error(fu + E.s * b);
|
|
1506
|
-
if ((I = I -
|
|
1506
|
+
if ((I = I - D - 1) > f)
|
|
1507
1507
|
E.c = E.e = null;
|
|
1508
1508
|
else if (I < u)
|
|
1509
1509
|
E.c = [E.e = 0];
|
|
1510
1510
|
else {
|
|
1511
|
-
if (E.e = I, E.c = [],
|
|
1512
|
-
for (
|
|
1513
|
-
E.c.push(+C.slice(
|
|
1514
|
-
|
|
1511
|
+
if (E.e = I, E.c = [], D = (I + 1) % fe, I < 0 && (D += fe), D < R) {
|
|
1512
|
+
for (D && E.c.push(+C.slice(0, D)), R -= fe; D < R; )
|
|
1513
|
+
E.c.push(+C.slice(D, D += fe));
|
|
1514
|
+
D = fe - (C = C.slice(D)).length;
|
|
1515
1515
|
} else
|
|
1516
|
-
|
|
1517
|
-
for (;
|
|
1516
|
+
D -= R;
|
|
1517
|
+
for (; D--; C += "0") ;
|
|
1518
1518
|
E.c.push(+C);
|
|
1519
1519
|
}
|
|
1520
1520
|
} else
|
|
@@ -1575,7 +1575,7 @@ function gd(e) {
|
|
|
1575
1575
|
}
|
|
1576
1576
|
if (y = (O + 1) % fe, y < 1 && (y += fe), String(S[0]).length == y) {
|
|
1577
1577
|
for (y = 0; y < S.length; y++)
|
|
1578
|
-
if (x = S[y], x < 0 || x >=
|
|
1578
|
+
if (x = S[y], x < 0 || x >= Dt || x !== xt(x)) break e;
|
|
1579
1579
|
if (x !== 0) return !0;
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
@@ -1593,22 +1593,22 @@ function gd(e) {
|
|
|
1593
1593
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
1594
1594
|
};
|
|
1595
1595
|
return function(x) {
|
|
1596
|
-
var S, O, I,
|
|
1597
|
-
if (x == null ? x = i : Ae(x, 0, Le),
|
|
1596
|
+
var S, O, I, D, v, R = 0, C = [], E = new w(s);
|
|
1597
|
+
if (x == null ? x = i : Ae(x, 0, Le), D = Li(x / fe), p)
|
|
1598
1598
|
if (crypto.getRandomValues) {
|
|
1599
|
-
for (S = crypto.getRandomValues(new Uint32Array(
|
|
1599
|
+
for (S = crypto.getRandomValues(new Uint32Array(D *= 2)); R < D; )
|
|
1600
1600
|
v = S[R] * 131072 + (S[R + 1] >>> 11), v >= 9e15 ? (O = crypto.getRandomValues(new Uint32Array(2)), S[R] = O[0], S[R + 1] = O[1]) : (C.push(v % 1e14), R += 2);
|
|
1601
|
-
R =
|
|
1601
|
+
R = D / 2;
|
|
1602
1602
|
} else if (crypto.randomBytes) {
|
|
1603
|
-
for (S = crypto.randomBytes(
|
|
1603
|
+
for (S = crypto.randomBytes(D *= 7); R < D; )
|
|
1604
1604
|
v = (S[R] & 31) * 281474976710656 + S[R + 1] * 1099511627776 + S[R + 2] * 4294967296 + S[R + 3] * 16777216 + (S[R + 4] << 16) + (S[R + 5] << 8) + S[R + 6], v >= 9e15 ? crypto.randomBytes(7).copy(S, R) : (C.push(v % 1e14), R += 7);
|
|
1605
|
-
R =
|
|
1605
|
+
R = D / 7;
|
|
1606
1606
|
} else
|
|
1607
1607
|
throw p = !1, Error(et + "crypto unavailable");
|
|
1608
1608
|
if (!p)
|
|
1609
|
-
for (; R <
|
|
1609
|
+
for (; R < D; )
|
|
1610
1610
|
v = y(), v < 9e15 && (C[R++] = v % 1e14);
|
|
1611
|
-
for (
|
|
1611
|
+
for (D = C[--R], x %= fe, D && x && (v = ji[fe - x], C[R] = xt(D / v) * v); C[R] === 0; C.pop(), R--) ;
|
|
1612
1612
|
if (R < 0)
|
|
1613
1613
|
C = [I = 0];
|
|
1614
1614
|
else {
|
|
@@ -1624,26 +1624,26 @@ function gd(e) {
|
|
|
1624
1624
|
}, n = /* @__PURE__ */ function() {
|
|
1625
1625
|
var b = "0123456789";
|
|
1626
1626
|
function y(x, S, O, I) {
|
|
1627
|
-
for (var
|
|
1627
|
+
for (var D, v = [0], R, C = 0, E = x.length; C < E; ) {
|
|
1628
1628
|
for (R = v.length; R--; v[R] *= S) ;
|
|
1629
|
-
for (v[0] += I.indexOf(x.charAt(C++)),
|
|
1630
|
-
v[
|
|
1629
|
+
for (v[0] += I.indexOf(x.charAt(C++)), D = 0; D < v.length; D++)
|
|
1630
|
+
v[D] > O - 1 && (v[D + 1] == null && (v[D + 1] = 0), v[D + 1] += v[D] / O | 0, v[D] %= O);
|
|
1631
1631
|
}
|
|
1632
1632
|
return v.reverse();
|
|
1633
1633
|
}
|
|
1634
|
-
return function(x, S, O, I,
|
|
1635
|
-
var v, R, C, E,
|
|
1634
|
+
return function(x, S, O, I, D) {
|
|
1635
|
+
var v, R, C, E, k, F, z, U, H = x.indexOf("."), ee = i, G = c;
|
|
1636
1636
|
for (H >= 0 && (E = h, h = 0, x = x.replace(".", ""), U = new w(S), F = U.pow(x.length - H), h = E, U.c = y(
|
|
1637
1637
|
cn(yt(F.c), F.e, "0"),
|
|
1638
1638
|
10,
|
|
1639
1639
|
O,
|
|
1640
1640
|
b
|
|
1641
|
-
), U.e = U.c.length), z = y(x, S, O,
|
|
1641
|
+
), U.e = U.c.length), z = y(x, S, O, D ? (v = g, b) : (v = b, g)), C = E = z.length; z[--E] == 0; z.pop()) ;
|
|
1642
1642
|
if (!z[0]) return v.charAt(0);
|
|
1643
|
-
if (H < 0 ? --C : (F.c = z, F.e = C, F.s = I, F = t(F, U, ee, G, O), z = F.c,
|
|
1644
|
-
x =
|
|
1643
|
+
if (H < 0 ? --C : (F.c = z, F.e = C, F.s = I, F = t(F, U, ee, G, O), z = F.c, k = F.r, C = F.e), R = C + ee + 1, H = z[R], E = O / 2, k = k || R < 0 || z[R + 1] != null, k = G < 4 ? (H != null || k) && (G == 0 || G == (F.s < 0 ? 3 : 2)) : H > E || H == E && (G == 4 || k || G == 6 && z[R - 1] & 1 || G == (F.s < 0 ? 8 : 7)), R < 1 || !z[0])
|
|
1644
|
+
x = k ? cn(v.charAt(1), -ee, v.charAt(0)) : v.charAt(0);
|
|
1645
1645
|
else {
|
|
1646
|
-
if (z.length = R,
|
|
1646
|
+
if (z.length = R, k)
|
|
1647
1647
|
for (--O; ++z[--R] > O; )
|
|
1648
1648
|
z[R] = 0, R || (++C, z = [1].concat(z));
|
|
1649
1649
|
for (E = z.length; !z[--E]; ) ;
|
|
@@ -1654,15 +1654,15 @@ function gd(e) {
|
|
|
1654
1654
|
};
|
|
1655
1655
|
}(), t = /* @__PURE__ */ function() {
|
|
1656
1656
|
function b(S, O, I) {
|
|
1657
|
-
var
|
|
1658
|
-
for (S = S.slice();
|
|
1659
|
-
R = S[
|
|
1657
|
+
var D, v, R, C, E = 0, k = S.length, F = O % On, z = O / On | 0;
|
|
1658
|
+
for (S = S.slice(); k--; )
|
|
1659
|
+
R = S[k] % On, C = S[k] / On | 0, D = z * R + C * F, v = F * R + D % On * On + E, E = (v / I | 0) + (D / On | 0) + z * C, S[k] = v % I;
|
|
1660
1660
|
return E && (S = [E].concat(S)), S;
|
|
1661
1661
|
}
|
|
1662
|
-
function y(S, O, I,
|
|
1662
|
+
function y(S, O, I, D) {
|
|
1663
1663
|
var v, R;
|
|
1664
|
-
if (I !=
|
|
1665
|
-
R = I >
|
|
1664
|
+
if (I != D)
|
|
1665
|
+
R = I > D ? 1 : -1;
|
|
1666
1666
|
else
|
|
1667
1667
|
for (v = R = 0; v < I; v++)
|
|
1668
1668
|
if (S[v] != O[v]) {
|
|
@@ -1671,13 +1671,13 @@ function gd(e) {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
return R;
|
|
1673
1673
|
}
|
|
1674
|
-
function x(S, O, I,
|
|
1674
|
+
function x(S, O, I, D) {
|
|
1675
1675
|
for (var v = 0; I--; )
|
|
1676
|
-
S[I] -= v, v = S[I] < O[I] ? 1 : 0, S[I] = v *
|
|
1676
|
+
S[I] -= v, v = S[I] < O[I] ? 1 : 0, S[I] = v * D + S[I] - O[I];
|
|
1677
1677
|
for (; !S[0] && S.length > 1; S.splice(0, 1)) ;
|
|
1678
1678
|
}
|
|
1679
|
-
return function(S, O, I,
|
|
1680
|
-
var R, C, E,
|
|
1679
|
+
return function(S, O, I, D, v) {
|
|
1680
|
+
var R, C, E, k, F, z, U, H, ee, G, _, ne, xe, q, ae, ce, K, Q = S.s == O.s ? 1 : -1, le = S.c, se = O.c;
|
|
1681
1681
|
if (!le || !le[0] || !se || !se[0])
|
|
1682
1682
|
return new w(
|
|
1683
1683
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
@@ -1686,9 +1686,9 @@ function gd(e) {
|
|
|
1686
1686
|
le && le[0] == 0 || !se ? Q * 0 : Q / 0
|
|
1687
1687
|
)
|
|
1688
1688
|
);
|
|
1689
|
-
for (H = new w(Q), ee = H.c = [], C = S.e - O.e, Q = I + C + 1, v || (v =
|
|
1689
|
+
for (H = new w(Q), ee = H.c = [], C = S.e - O.e, Q = I + C + 1, v || (v = Dt, C = Et(S.e / fe) - Et(O.e / fe), Q = Q / fe | 0), E = 0; se[E] == (le[E] || 0); E++) ;
|
|
1690
1690
|
if (se[E] > (le[E] || 0) && C--, Q < 0)
|
|
1691
|
-
ee.push(1),
|
|
1691
|
+
ee.push(1), k = !0;
|
|
1692
1692
|
else {
|
|
1693
1693
|
for (q = le.length, ce = se.length, E = 0, Q += 2, F = xt(v / (se[0] + 1)), F > 1 && (se = b(se, F, v), le = b(le, F, v), ce = se.length, q = le.length), xe = ce, G = le.slice(0, ce), _ = G.length; _ < ce; G[_++] = 0) ;
|
|
1694
1694
|
K = se.slice(), K = [0].concat(K), ae = se[0], se[1] >= v / 2 && ae++;
|
|
@@ -1705,25 +1705,25 @@ function gd(e) {
|
|
|
1705
1705
|
} else R === 0 && (F++, G = [0]);
|
|
1706
1706
|
ee[E++] = F, G[0] ? G[_++] = le[xe] || 0 : (G = [le[xe]], _ = 1);
|
|
1707
1707
|
} while ((xe++ < q || G[0] != null) && Q--);
|
|
1708
|
-
|
|
1708
|
+
k = G[0] != null, ee[0] || ee.splice(0, 1);
|
|
1709
1709
|
}
|
|
1710
|
-
if (v ==
|
|
1710
|
+
if (v == Dt) {
|
|
1711
1711
|
for (E = 1, Q = ee[0]; Q >= 10; Q /= 10, E++) ;
|
|
1712
|
-
B(H, I + (H.e = E + C * fe - 1) + 1,
|
|
1712
|
+
B(H, I + (H.e = E + C * fe - 1) + 1, D, k);
|
|
1713
1713
|
} else
|
|
1714
|
-
H.e = C, H.r = +
|
|
1714
|
+
H.e = C, H.r = +k;
|
|
1715
1715
|
return H;
|
|
1716
1716
|
};
|
|
1717
1717
|
}();
|
|
1718
1718
|
function P(b, y, x, S) {
|
|
1719
|
-
var O, I,
|
|
1719
|
+
var O, I, D, v, R;
|
|
1720
1720
|
if (x == null ? x = c : Ae(x, 0, 8), !b.c) return b.toString();
|
|
1721
|
-
if (O = b.c[0],
|
|
1722
|
-
R = yt(b.c), R = S == 1 || S == 2 && (
|
|
1721
|
+
if (O = b.c[0], D = b.e, y == null)
|
|
1722
|
+
R = yt(b.c), R = S == 1 || S == 2 && (D <= a || D >= l) ? cs(R, D) : cn(R, D, "0");
|
|
1723
1723
|
else if (b = B(new w(b), y, x), I = b.e, R = yt(b.c), v = R.length, S == 1 || S == 2 && (y <= I || I <= a)) {
|
|
1724
1724
|
for (; v < y; R += "0", v++) ;
|
|
1725
1725
|
R = cs(R, I);
|
|
1726
|
-
} else if (y -=
|
|
1726
|
+
} else if (y -= D + (S === 2 && I > D), R = cn(R, I, "0"), I + 1 > v) {
|
|
1727
1727
|
if (--y > 0) for (R += "."; y--; R += "0") ;
|
|
1728
1728
|
} else if (y += I - v, y > 0)
|
|
1729
1729
|
for (I + 1 == v && (R += "."); y--; R += "0") ;
|
|
@@ -1741,57 +1741,57 @@ function gd(e) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
r = /* @__PURE__ */ function() {
|
|
1743
1743
|
var b = /^(-?)0([xbo])(?=\w[\w.]*$)/i, y = /^([^.]+)\.$/, x = /^\.([^.]+)$/, S = /^-?(Infinity|NaN)$/, O = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
1744
|
-
return function(I,
|
|
1745
|
-
var C, E = v ?
|
|
1744
|
+
return function(I, D, v, R) {
|
|
1745
|
+
var C, E = v ? D : D.replace(O, "");
|
|
1746
1746
|
if (S.test(E))
|
|
1747
1747
|
I.s = isNaN(E) ? null : E < 0 ? -1 : 1;
|
|
1748
1748
|
else {
|
|
1749
|
-
if (!v && (E = E.replace(b, function(
|
|
1750
|
-
return C = (z = z.toLowerCase()) == "x" ? 16 : z == "b" ? 2 : 8, !R || R == C ? F :
|
|
1751
|
-
}), R && (C = R, E = E.replace(y, "$1").replace(x, "0.$1")),
|
|
1749
|
+
if (!v && (E = E.replace(b, function(k, F, z) {
|
|
1750
|
+
return C = (z = z.toLowerCase()) == "x" ? 16 : z == "b" ? 2 : 8, !R || R == C ? F : k;
|
|
1751
|
+
}), R && (C = R, E = E.replace(y, "$1").replace(x, "0.$1")), D != E))
|
|
1752
1752
|
return new w(E, C);
|
|
1753
1753
|
if (w.DEBUG)
|
|
1754
|
-
throw Error(et + "Not a" + (R ? " base " + R : "") + " number: " +
|
|
1754
|
+
throw Error(et + "Not a" + (R ? " base " + R : "") + " number: " + D);
|
|
1755
1755
|
I.s = null;
|
|
1756
1756
|
}
|
|
1757
1757
|
I.c = I.e = null;
|
|
1758
1758
|
};
|
|
1759
1759
|
}();
|
|
1760
1760
|
function B(b, y, x, S) {
|
|
1761
|
-
var O, I,
|
|
1762
|
-
if (
|
|
1761
|
+
var O, I, D, v, R, C, E, k = b.c, F = ji;
|
|
1762
|
+
if (k) {
|
|
1763
1763
|
e: {
|
|
1764
|
-
for (O = 1, v =
|
|
1764
|
+
for (O = 1, v = k[0]; v >= 10; v /= 10, O++) ;
|
|
1765
1765
|
if (I = y - O, I < 0)
|
|
1766
|
-
I += fe,
|
|
1767
|
-
else if (C = Li((I + 1) / fe), C >=
|
|
1766
|
+
I += fe, D = y, R = k[C = 0], E = xt(R / F[O - D - 1] % 10);
|
|
1767
|
+
else if (C = Li((I + 1) / fe), C >= k.length)
|
|
1768
1768
|
if (S) {
|
|
1769
|
-
for (;
|
|
1770
|
-
R = E = 0, O = 1, I %= fe,
|
|
1769
|
+
for (; k.length <= C; k.push(0)) ;
|
|
1770
|
+
R = E = 0, O = 1, I %= fe, D = I - fe + 1;
|
|
1771
1771
|
} else
|
|
1772
1772
|
break e;
|
|
1773
1773
|
else {
|
|
1774
|
-
for (R = v =
|
|
1775
|
-
I %= fe,
|
|
1774
|
+
for (R = v = k[C], O = 1; v >= 10; v /= 10, O++) ;
|
|
1775
|
+
I %= fe, D = I - fe + O, E = D < 0 ? 0 : xt(R / F[O - D - 1] % 10);
|
|
1776
1776
|
}
|
|
1777
1777
|
if (S = S || y < 0 || // Are there any non-zero digits after the rounding digit?
|
|
1778
1778
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
1779
1779
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
1780
|
-
|
|
1781
|
-
(I > 0 ?
|
|
1782
|
-
return
|
|
1783
|
-
if (I == 0 ? (
|
|
1780
|
+
k[C + 1] != null || (D < 0 ? R : R % F[O - D - 1]), S = x < 4 ? (E || S) && (x == 0 || x == (b.s < 0 ? 3 : 2)) : E > 5 || E == 5 && (x == 4 || S || x == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
1781
|
+
(I > 0 ? D > 0 ? R / F[O - D] : 0 : k[C - 1]) % 10 & 1 || x == (b.s < 0 ? 8 : 7)), y < 1 || !k[0])
|
|
1782
|
+
return k.length = 0, S ? (y -= b.e + 1, k[0] = F[(fe - y % fe) % fe], b.e = -y || 0) : k[0] = b.e = 0, b;
|
|
1783
|
+
if (I == 0 ? (k.length = C, v = 1, C--) : (k.length = C + 1, v = F[fe - I], k[C] = D > 0 ? xt(R / F[O - D] % F[D]) * v : 0), S)
|
|
1784
1784
|
for (; ; )
|
|
1785
1785
|
if (C == 0) {
|
|
1786
|
-
for (I = 1,
|
|
1787
|
-
for (
|
|
1788
|
-
I != v && (b.e++,
|
|
1786
|
+
for (I = 1, D = k[0]; D >= 10; D /= 10, I++) ;
|
|
1787
|
+
for (D = k[0] += v, v = 1; D >= 10; D /= 10, v++) ;
|
|
1788
|
+
I != v && (b.e++, k[0] == Dt && (k[0] = 1));
|
|
1789
1789
|
break;
|
|
1790
1790
|
} else {
|
|
1791
|
-
if (
|
|
1792
|
-
|
|
1791
|
+
if (k[C] += v, k[C] != Dt) break;
|
|
1792
|
+
k[C--] = 0, v = 1;
|
|
1793
1793
|
}
|
|
1794
|
-
for (I =
|
|
1794
|
+
for (I = k.length; k[--I] === 0; k.pop()) ;
|
|
1795
1795
|
}
|
|
1796
1796
|
b.e > f ? b.c = b.e = null : b.e < u && (b.c = [b.e = 0]);
|
|
1797
1797
|
}
|
|
@@ -1818,22 +1818,22 @@ function gd(e) {
|
|
|
1818
1818
|
}, o.dividedToIntegerBy = o.idiv = function(b, y) {
|
|
1819
1819
|
return t(this, new w(b, y), 0, 1);
|
|
1820
1820
|
}, o.exponentiatedBy = o.pow = function(b, y) {
|
|
1821
|
-
var x, S, O, I,
|
|
1821
|
+
var x, S, O, I, D, v, R, C, E, k = this;
|
|
1822
1822
|
if (b = new w(b), b.c && !b.isInteger())
|
|
1823
1823
|
throw Error(et + "Exponent not an integer: " + M(b));
|
|
1824
|
-
if (y != null && (y = new w(y)), v = b.e > 14, !
|
|
1825
|
-
return E = new w(Math.pow(+M(
|
|
1824
|
+
if (y != null && (y = new w(y)), v = b.e > 14, !k.c || !k.c[0] || k.c[0] == 1 && !k.e && k.c.length == 1 || !b.c || !b.c[0])
|
|
1825
|
+
return E = new w(Math.pow(+M(k), v ? b.s * (2 - as(b)) : +M(b))), y ? E.mod(y) : E;
|
|
1826
1826
|
if (R = b.s < 0, y) {
|
|
1827
1827
|
if (y.c ? !y.c[0] : !y.s) return new w(NaN);
|
|
1828
|
-
S = !R &&
|
|
1828
|
+
S = !R && k.isInteger() && y.isInteger(), S && (k = k.mod(y));
|
|
1829
1829
|
} else {
|
|
1830
|
-
if (b.e > 9 && (
|
|
1831
|
-
return I =
|
|
1830
|
+
if (b.e > 9 && (k.e > 0 || k.e < -1 || (k.e == 0 ? k.c[0] > 1 || v && k.c[1] >= 24e7 : k.c[0] < 8e13 || v && k.c[0] <= 9999975e7)))
|
|
1831
|
+
return I = k.s < 0 && as(b) ? -0 : 0, k.e > -1 && (I = 1 / I), new w(R ? 1 / I : I);
|
|
1832
1832
|
h && (I = Li(h / fe + 2));
|
|
1833
1833
|
}
|
|
1834
1834
|
for (v ? (x = new w(0.5), R && (b.s = 1), C = as(b)) : (O = Math.abs(+M(b)), C = O % 2), E = new w(s); ; ) {
|
|
1835
1835
|
if (C) {
|
|
1836
|
-
if (E = E.times(
|
|
1836
|
+
if (E = E.times(k), !E.c) break;
|
|
1837
1837
|
I ? E.c.length > I && (E.c.length = I) : S && (E = E.mod(y));
|
|
1838
1838
|
}
|
|
1839
1839
|
if (O) {
|
|
@@ -1845,9 +1845,9 @@ function gd(e) {
|
|
|
1845
1845
|
if (O = +M(b), O === 0) break;
|
|
1846
1846
|
C = O % 2;
|
|
1847
1847
|
}
|
|
1848
|
-
|
|
1848
|
+
k = k.times(k), I ? k.c && k.c.length > I && (k.c.length = I) : S && (k = k.mod(y));
|
|
1849
1849
|
}
|
|
1850
|
-
return S ? E : (R && (E = s.div(E)), y ? E.mod(y) : I ? B(E, h, c,
|
|
1850
|
+
return S ? E : (R && (E = s.div(E)), y ? E.mod(y) : I ? B(E, h, c, D) : E);
|
|
1851
1851
|
}, o.integerValue = function(b) {
|
|
1852
1852
|
var y = new w(this);
|
|
1853
1853
|
return b == null ? b = c : Ae(b, 0, 8), B(y, y.e + 1, b);
|
|
@@ -1874,35 +1874,35 @@ function gd(e) {
|
|
|
1874
1874
|
}, o.isZero = function() {
|
|
1875
1875
|
return !!this.c && this.c[0] == 0;
|
|
1876
1876
|
}, o.minus = function(b, y) {
|
|
1877
|
-
var x, S, O, I,
|
|
1877
|
+
var x, S, O, I, D = this, v = D.s;
|
|
1878
1878
|
if (b = new w(b, y), y = b.s, !v || !y) return new w(NaN);
|
|
1879
1879
|
if (v != y)
|
|
1880
|
-
return b.s = -y,
|
|
1881
|
-
var R =
|
|
1880
|
+
return b.s = -y, D.plus(b);
|
|
1881
|
+
var R = D.e / fe, C = b.e / fe, E = D.c, k = b.c;
|
|
1882
1882
|
if (!R || !C) {
|
|
1883
|
-
if (!E || !
|
|
1884
|
-
if (!E[0] || !
|
|
1885
|
-
return
|
|
1883
|
+
if (!E || !k) return E ? (b.s = -y, b) : new w(k ? D : NaN);
|
|
1884
|
+
if (!E[0] || !k[0])
|
|
1885
|
+
return k[0] ? (b.s = -y, b) : new w(E[0] ? D : (
|
|
1886
1886
|
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
|
|
1887
1887
|
c == 3 ? -0 : 0
|
|
1888
1888
|
));
|
|
1889
1889
|
}
|
|
1890
1890
|
if (R = Et(R), C = Et(C), E = E.slice(), v = R - C) {
|
|
1891
|
-
for ((I = v < 0) ? (v = -v, O = E) : (C = R, O =
|
|
1891
|
+
for ((I = v < 0) ? (v = -v, O = E) : (C = R, O = k), O.reverse(), y = v; y--; O.push(0)) ;
|
|
1892
1892
|
O.reverse();
|
|
1893
1893
|
} else
|
|
1894
|
-
for (S = (I = (v = E.length) < (y =
|
|
1895
|
-
if (E[y] !=
|
|
1896
|
-
I = E[y] <
|
|
1894
|
+
for (S = (I = (v = E.length) < (y = k.length)) ? v : y, v = y = 0; y < S; y++)
|
|
1895
|
+
if (E[y] != k[y]) {
|
|
1896
|
+
I = E[y] < k[y];
|
|
1897
1897
|
break;
|
|
1898
1898
|
}
|
|
1899
|
-
if (I && (O = E, E =
|
|
1900
|
-
for (y =
|
|
1901
|
-
if (E[--S] <
|
|
1899
|
+
if (I && (O = E, E = k, k = O, b.s = -b.s), y = (S = k.length) - (x = E.length), y > 0) for (; y--; E[x++] = 0) ;
|
|
1900
|
+
for (y = Dt - 1; S > v; ) {
|
|
1901
|
+
if (E[--S] < k[S]) {
|
|
1902
1902
|
for (x = S; x && !E[--x]; E[x] = y) ;
|
|
1903
|
-
--E[x], E[S] +=
|
|
1903
|
+
--E[x], E[S] += Dt;
|
|
1904
1904
|
}
|
|
1905
|
-
E[S] -=
|
|
1905
|
+
E[S] -= k[S];
|
|
1906
1906
|
}
|
|
1907
1907
|
for (; E[0] == 0; E.splice(0, 1), --C) ;
|
|
1908
1908
|
return E[0] ? $(b, E, C) : (b.s = c == 3 ? -1 : 1, b.c = [b.e = 0], b);
|
|
@@ -1910,13 +1910,13 @@ function gd(e) {
|
|
|
1910
1910
|
var x, S, O = this;
|
|
1911
1911
|
return b = new w(b, y), !O.c || !b.s || b.c && !b.c[0] ? new w(NaN) : !b.c || O.c && !O.c[0] ? new w(O) : (d == 9 ? (S = b.s, b.s = 1, x = t(O, b, 0, 3), b.s = S, x.s *= S) : x = t(O, b, 0, d), b = O.minus(x.times(b)), !b.c[0] && d == 1 && (b.s = O.s), b);
|
|
1912
1912
|
}, o.multipliedBy = o.times = function(b, y) {
|
|
1913
|
-
var x, S, O, I,
|
|
1913
|
+
var x, S, O, I, D, v, R, C, E, k, F, z, U, H, ee, G = this, _ = G.c, ne = (b = new w(b, y)).c;
|
|
1914
1914
|
if (!_ || !ne || !_[0] || !ne[0])
|
|
1915
1915
|
return !G.s || !b.s || _ && !_[0] && !ne || ne && !ne[0] && !_ ? b.c = b.e = b.s = null : (b.s *= G.s, !_ || !ne ? b.c = b.e = null : (b.c = [0], b.e = 0)), b;
|
|
1916
|
-
for (S = Et(G.e / fe) + Et(b.e / fe), b.s *= G.s, R = _.length,
|
|
1917
|
-
for (H =
|
|
1918
|
-
for (x = 0, F = ne[O] % ee, z = ne[O] / ee | 0,
|
|
1919
|
-
C = _[--
|
|
1916
|
+
for (S = Et(G.e / fe) + Et(b.e / fe), b.s *= G.s, R = _.length, k = ne.length, R < k && (U = _, _ = ne, ne = U, O = R, R = k, k = O), O = R + k, U = []; O--; U.push(0)) ;
|
|
1917
|
+
for (H = Dt, ee = On, O = k; --O >= 0; ) {
|
|
1918
|
+
for (x = 0, F = ne[O] % ee, z = ne[O] / ee | 0, D = R, I = O + D; I > O; )
|
|
1919
|
+
C = _[--D] % ee, E = _[D] / ee | 0, v = z * C + E * F, C = F * C + v % ee * ee + U[I] + x, x = (C / H | 0) + (v / ee | 0) + z * E, U[I--] = C % H;
|
|
1920
1920
|
U[I] = x;
|
|
1921
1921
|
}
|
|
1922
1922
|
return x ? ++S : U.splice(0, 1), $(b, U, S);
|
|
@@ -1928,18 +1928,18 @@ function gd(e) {
|
|
|
1928
1928
|
if (b = new w(b, y), y = b.s, !O || !y) return new w(NaN);
|
|
1929
1929
|
if (O != y)
|
|
1930
1930
|
return b.s = -y, S.minus(b);
|
|
1931
|
-
var I = S.e / fe,
|
|
1932
|
-
if (!I || !
|
|
1931
|
+
var I = S.e / fe, D = b.e / fe, v = S.c, R = b.c;
|
|
1932
|
+
if (!I || !D) {
|
|
1933
1933
|
if (!v || !R) return new w(O / 0);
|
|
1934
1934
|
if (!v[0] || !R[0]) return R[0] ? b : new w(v[0] ? S : O * 0);
|
|
1935
1935
|
}
|
|
1936
|
-
if (I = Et(I),
|
|
1937
|
-
for (O > 0 ? (
|
|
1936
|
+
if (I = Et(I), D = Et(D), v = v.slice(), O = I - D) {
|
|
1937
|
+
for (O > 0 ? (D = I, x = R) : (O = -O, x = v), x.reverse(); O--; x.push(0)) ;
|
|
1938
1938
|
x.reverse();
|
|
1939
1939
|
}
|
|
1940
1940
|
for (O = v.length, y = R.length, O - y < 0 && (x = R, R = v, v = x, y = O), O = 0; y; )
|
|
1941
|
-
O = (v[--y] = v[y] + R[y] + O) /
|
|
1942
|
-
return O && (v = [O].concat(v), ++
|
|
1941
|
+
O = (v[--y] = v[y] + R[y] + O) / Dt | 0, v[y] = Dt === v[y] ? 0 : v[y] % Dt;
|
|
1942
|
+
return O && (v = [O].concat(v), ++D), $(b, v, D);
|
|
1943
1943
|
}, o.precision = o.sd = function(b, y) {
|
|
1944
1944
|
var x, S, O, I = this;
|
|
1945
1945
|
if (b != null && b !== !!b)
|
|
@@ -1953,10 +1953,10 @@ function gd(e) {
|
|
|
1953
1953
|
}, o.shiftedBy = function(b) {
|
|
1954
1954
|
return Ae(b, -Fi, Fi), this.times("1e" + b);
|
|
1955
1955
|
}, o.squareRoot = o.sqrt = function() {
|
|
1956
|
-
var b, y, x, S, O, I = this,
|
|
1957
|
-
if (v !== 1 || !
|
|
1958
|
-
return new w(!v || v < 0 && (!
|
|
1959
|
-
if (v = Math.sqrt(+M(I)), v == 0 || v == 1 / 0 ? (y = yt(
|
|
1956
|
+
var b, y, x, S, O, I = this, D = I.c, v = I.s, R = I.e, C = i + 4, E = new w("0.5");
|
|
1957
|
+
if (v !== 1 || !D || !D[0])
|
|
1958
|
+
return new w(!v || v < 0 && (!D || D[0]) ? NaN : D ? I : 1 / 0);
|
|
1959
|
+
if (v = Math.sqrt(+M(I)), v == 0 || v == 1 / 0 ? (y = yt(D), (y.length + R) % 2 == 0 && (y += "0"), v = Math.sqrt(+y), R = Et((R + 1) / 2) - (R < 0 || R % 2), v == 1 / 0 ? y = "5e" + R : (y = v.toExponential(), y = y.slice(0, y.indexOf("e") + 1) + R), x = new w(y)) : x = new w(v + ""), x.c[0]) {
|
|
1960
1960
|
for (R = x.e, v = R + C, v < 3 && (v = 0); ; )
|
|
1961
1961
|
if (O = x, x = E.times(O.plus(t(I, O, C, 1))), yt(O.c).slice(0, v) === (y = yt(x.c)).slice(0, v))
|
|
1962
1962
|
if (x.e < R && --v, y = y.slice(v - 3, v + 1), y == "9999" || !S && y == "4999") {
|
|
@@ -1982,27 +1982,27 @@ function gd(e) {
|
|
|
1982
1982
|
else if (typeof x != "object")
|
|
1983
1983
|
throw Error(et + "Argument not an object: " + x);
|
|
1984
1984
|
if (S = O.toFixed(b, y), O.c) {
|
|
1985
|
-
var I,
|
|
1985
|
+
var I, D = S.split("."), v = +x.groupSize, R = +x.secondaryGroupSize, C = x.groupSeparator || "", E = D[0], k = D[1], F = O.s < 0, z = F ? E.slice(1) : E, U = z.length;
|
|
1986
1986
|
if (R && (I = v, v = R, R = I, U -= I), v > 0 && U > 0) {
|
|
1987
1987
|
for (I = U % v || v, E = z.substr(0, I); I < U; I += v) E += C + z.substr(I, v);
|
|
1988
1988
|
R > 0 && (E += C + z.slice(I)), F && (E = "-" + E);
|
|
1989
1989
|
}
|
|
1990
|
-
S =
|
|
1990
|
+
S = k ? E + (x.decimalSeparator || "") + ((R = +x.fractionGroupSize) ? k.replace(
|
|
1991
1991
|
new RegExp("\\d{" + R + "}\\B", "g"),
|
|
1992
1992
|
"$&" + (x.fractionGroupSeparator || "")
|
|
1993
|
-
) :
|
|
1993
|
+
) : k) : E;
|
|
1994
1994
|
}
|
|
1995
1995
|
return (x.prefix || "") + S + (x.suffix || "");
|
|
1996
1996
|
}, o.toFraction = function(b) {
|
|
1997
|
-
var y, x, S, O, I,
|
|
1997
|
+
var y, x, S, O, I, D, v, R, C, E, k, F, z = this, U = z.c;
|
|
1998
1998
|
if (b != null && (v = new w(b), !v.isInteger() && (v.c || v.s !== 1) || v.lt(s)))
|
|
1999
1999
|
throw Error(et + "Argument " + (v.isInteger() ? "out of range: " : "not an integer: ") + M(v));
|
|
2000
2000
|
if (!U) return new w(z);
|
|
2001
|
-
for (y = new w(s), C = x = new w(s), S = R = new w(s), F = yt(U), I = y.e = F.length - z.e - 1, y.c[0] = ji[(
|
|
2001
|
+
for (y = new w(s), C = x = new w(s), S = R = new w(s), F = yt(U), I = y.e = F.length - z.e - 1, y.c[0] = ji[(D = I % fe) < 0 ? fe + D : D], b = !b || v.comparedTo(y) > 0 ? I > 0 ? y : C : v, D = f, f = 1 / 0, v = new w(F), R.c[0] = 0; E = t(v, y, 0, 1), O = x.plus(E.times(S)), O.comparedTo(b) != 1; )
|
|
2002
2002
|
x = S, S = O, C = R.plus(E.times(O = C)), R = O, y = v.minus(E.times(O = y)), v = O;
|
|
2003
|
-
return O = t(b.minus(x), S, 0, 1), R = R.plus(O.times(C)), x = x.plus(O.times(S)), R.s = C.s = z.s, I = I * 2,
|
|
2003
|
+
return O = t(b.minus(x), S, 0, 1), R = R.plus(O.times(C)), x = x.plus(O.times(S)), R.s = C.s = z.s, I = I * 2, k = t(C, S, I, c).minus(z).abs().comparedTo(
|
|
2004
2004
|
t(R, x, I, c).minus(z).abs()
|
|
2005
|
-
) < 1 ? [C, S] : [R, x], f =
|
|
2005
|
+
) < 1 ? [C, S] : [R, x], f = D, k;
|
|
2006
2006
|
}, o.toNumber = function() {
|
|
2007
2007
|
return +M(this);
|
|
2008
2008
|
}, o.toPrecision = function(b, y) {
|
|
@@ -2233,10 +2233,10 @@ function $b(e) {
|
|
|
2233
2233
|
return Tn(Sd, e);
|
|
2234
2234
|
}
|
|
2235
2235
|
const Td = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
|
|
2236
|
-
function
|
|
2236
|
+
function Db(e) {
|
|
2237
2237
|
return Td.test(e);
|
|
2238
2238
|
}
|
|
2239
|
-
function
|
|
2239
|
+
function kb(e) {
|
|
2240
2240
|
return Tn(Td, e);
|
|
2241
2241
|
}
|
|
2242
2242
|
const Ad = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
|
|
@@ -2521,7 +2521,7 @@ function Ca(e, t = {}) {
|
|
|
2521
2521
|
return t1(e, t);
|
|
2522
2522
|
if (Ab(e))
|
|
2523
2523
|
return n1(e, t);
|
|
2524
|
-
if (
|
|
2524
|
+
if (Db(e))
|
|
2525
2525
|
return r1(e, t);
|
|
2526
2526
|
if (Bb(e))
|
|
2527
2527
|
return o1(e);
|
|
@@ -2584,7 +2584,7 @@ function n1(e, t = {}) {
|
|
|
2584
2584
|
return { name: n.name, type: "error", inputs: o };
|
|
2585
2585
|
}
|
|
2586
2586
|
function r1(e, t = {}) {
|
|
2587
|
-
const n =
|
|
2587
|
+
const n = kb(e);
|
|
2588
2588
|
if (!n)
|
|
2589
2589
|
throw new _r({ signature: e, type: "constructor" });
|
|
2590
2590
|
const r = ft(n.parameters), o = [], s = r.length;
|
|
@@ -2980,7 +2980,7 @@ class gu extends W {
|
|
|
2980
2980
|
});
|
|
2981
2981
|
}
|
|
2982
2982
|
}
|
|
2983
|
-
class
|
|
2983
|
+
class Dd extends W {
|
|
2984
2984
|
constructor(t, { docsPath: n }) {
|
|
2985
2985
|
super([
|
|
2986
2986
|
`Encoded error signature "${t}" not found on ABI.`,
|
|
@@ -3043,7 +3043,7 @@ class Br extends W {
|
|
|
3043
3043
|
});
|
|
3044
3044
|
}
|
|
3045
3045
|
}
|
|
3046
|
-
class
|
|
3046
|
+
class kd extends W {
|
|
3047
3047
|
constructor(t, { docsPath: n }) {
|
|
3048
3048
|
super([
|
|
3049
3049
|
`Function "${t}" does not contain any \`outputs\` on ABI.`,
|
|
@@ -3311,12 +3311,12 @@ function oe(e, t = {}) {
|
|
|
3311
3311
|
const c = `0x${(n && o < 0 ? (1n << BigInt(r * 8)) + BigInt(o) : o).toString(16)}`;
|
|
3312
3312
|
return r ? Wr(c, { size: r }) : c;
|
|
3313
3313
|
}
|
|
3314
|
-
const
|
|
3314
|
+
const D1 = /* @__PURE__ */ new TextEncoder();
|
|
3315
3315
|
function ho(e, t = {}) {
|
|
3316
|
-
const n =
|
|
3316
|
+
const n = D1.encode(e);
|
|
3317
3317
|
return Me(n, t);
|
|
3318
3318
|
}
|
|
3319
|
-
const
|
|
3319
|
+
const k1 = /* @__PURE__ */ new TextEncoder();
|
|
3320
3320
|
function Vr(e, t = {}) {
|
|
3321
3321
|
return typeof e == "number" || typeof e == "bigint" ? M1(e, t) : typeof e == "boolean" ? B1(e, t) : tn(e) ? rn(e, t) : er(e, t);
|
|
3322
3322
|
}
|
|
@@ -3359,7 +3359,7 @@ function M1(e, t) {
|
|
|
3359
3359
|
return rn(n);
|
|
3360
3360
|
}
|
|
3361
3361
|
function er(e, t = {}) {
|
|
3362
|
-
const n =
|
|
3362
|
+
const n = k1.encode(e);
|
|
3363
3363
|
return typeof t.size == "number" ? (Wt(n, { size: t.size }), Wr(n, { dir: "right", size: t.size })) : n;
|
|
3364
3364
|
}
|
|
3365
3365
|
const ls = /* @__PURE__ */ BigInt(2 ** 32 - 1), xu = /* @__PURE__ */ BigInt(32);
|
|
@@ -3908,7 +3908,7 @@ function dr(e) {
|
|
|
3908
3908
|
continue;
|
|
3909
3909
|
if (n.every((l, u) => {
|
|
3910
3910
|
const f = "inputs" in c && c.inputs[u];
|
|
3911
|
-
return f ?
|
|
3911
|
+
return f ? Da(l, f) : !1;
|
|
3912
3912
|
})) {
|
|
3913
3913
|
if (i && "inputs" in i && i.inputs) {
|
|
3914
3914
|
const l = Jd(c.inputs, i.inputs, n);
|
|
@@ -3926,7 +3926,7 @@ function dr(e) {
|
|
|
3926
3926
|
}
|
|
3927
3927
|
return i || s[0];
|
|
3928
3928
|
}
|
|
3929
|
-
function
|
|
3929
|
+
function Da(e, t) {
|
|
3930
3930
|
const n = typeof e, r = t.type;
|
|
3931
3931
|
switch (r) {
|
|
3932
3932
|
case "address":
|
|
@@ -3938,7 +3938,7 @@ function ka(e, t) {
|
|
|
3938
3938
|
case "string":
|
|
3939
3939
|
return n === "string";
|
|
3940
3940
|
default:
|
|
3941
|
-
return r === "tuple" && "components" in t ? Object.values(t.components).every((o, s) =>
|
|
3941
|
+
return r === "tuple" && "components" in t ? Object.values(t.components).every((o, s) => Da(Object.values(e)[s], o)) : /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r) ? n === "number" || n === "bigint" : /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r) ? n === "string" || e instanceof Uint8Array : /[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r) ? Array.isArray(e) && e.every((o) => Da(o, {
|
|
3942
3942
|
...t,
|
|
3943
3943
|
// Pop off `[]` or `[M]` from end of type
|
|
3944
3944
|
type: r.replace(/(\[[0-9]{0,}\])$/, "")
|
|
@@ -4272,9 +4272,9 @@ function Or(e, t, { staticPosition: n }) {
|
|
|
4272
4272
|
if (t.type === "address")
|
|
4273
4273
|
return Cg(e);
|
|
4274
4274
|
if (t.type === "bool")
|
|
4275
|
-
return
|
|
4275
|
+
return Dg(e);
|
|
4276
4276
|
if (t.type.startsWith("bytes"))
|
|
4277
|
-
return
|
|
4277
|
+
return kg(e, t, { staticPosition: n });
|
|
4278
4278
|
if (t.type.startsWith("uint") || t.type.startsWith("int"))
|
|
4279
4279
|
return Bg(e, t);
|
|
4280
4280
|
if (t.type === "string")
|
|
@@ -4283,14 +4283,14 @@ function Or(e, t, { staticPosition: n }) {
|
|
|
4283
4283
|
docsPath: "/docs/contract/decodeAbiParameters"
|
|
4284
4284
|
});
|
|
4285
4285
|
}
|
|
4286
|
-
const Ou = 32,
|
|
4286
|
+
const Ou = 32, ka = 32;
|
|
4287
4287
|
function Cg(e) {
|
|
4288
4288
|
const t = e.readBytes(32);
|
|
4289
4289
|
return [ti(Me(Yd(t, -20))), 32];
|
|
4290
4290
|
}
|
|
4291
4291
|
function $g(e, t, { length: n, staticPosition: r }) {
|
|
4292
4292
|
if (!n) {
|
|
4293
|
-
const i = bn(e.readBytes(
|
|
4293
|
+
const i = bn(e.readBytes(ka)), c = r + i, a = c + Ou;
|
|
4294
4294
|
e.setPosition(c);
|
|
4295
4295
|
const l = bn(e.readBytes(Ou)), u = bo(t);
|
|
4296
4296
|
let f = 0;
|
|
@@ -4305,7 +4305,7 @@ function $g(e, t, { length: n, staticPosition: r }) {
|
|
|
4305
4305
|
return e.setPosition(r + 32), [p, 32];
|
|
4306
4306
|
}
|
|
4307
4307
|
if (bo(t)) {
|
|
4308
|
-
const i = bn(e.readBytes(
|
|
4308
|
+
const i = bn(e.readBytes(ka)), c = r + i, a = [];
|
|
4309
4309
|
for (let l = 0; l < n; ++l) {
|
|
4310
4310
|
e.setPosition(c + l * 32);
|
|
4311
4311
|
const [u] = Or(e, t, {
|
|
@@ -4325,10 +4325,10 @@ function $g(e, t, { length: n, staticPosition: r }) {
|
|
|
4325
4325
|
}
|
|
4326
4326
|
return [s, o];
|
|
4327
4327
|
}
|
|
4328
|
-
function
|
|
4328
|
+
function Dg(e) {
|
|
4329
4329
|
return [Og(e.readBytes(32), { size: 32 }), 32];
|
|
4330
4330
|
}
|
|
4331
|
-
function
|
|
4331
|
+
function kg(e, t, { staticPosition: n }) {
|
|
4332
4332
|
const [r, o] = t.type.split("bytes");
|
|
4333
4333
|
if (!o) {
|
|
4334
4334
|
const i = bn(e.readBytes(32));
|
|
@@ -4352,7 +4352,7 @@ function Mg(e, t, { staticPosition: n }) {
|
|
|
4352
4352
|
const r = t.components.length === 0 || t.components.some(({ name: i }) => !i), o = r ? [] : {};
|
|
4353
4353
|
let s = 0;
|
|
4354
4354
|
if (bo(t)) {
|
|
4355
|
-
const i = bn(e.readBytes(
|
|
4355
|
+
const i = bn(e.readBytes(ka)), c = n + i;
|
|
4356
4356
|
for (let a = 0; a < t.components.length; ++a) {
|
|
4357
4357
|
const l = t.components[a];
|
|
4358
4358
|
e.setPosition(c + s);
|
|
@@ -4396,7 +4396,7 @@ function Fg(e) {
|
|
|
4396
4396
|
throw new Ho();
|
|
4397
4397
|
const s = [...t || [], e0, Tg].find((i) => i.type === "error" && r === Go(jt(i)));
|
|
4398
4398
|
if (!s)
|
|
4399
|
-
throw new
|
|
4399
|
+
throw new Dd(r, {
|
|
4400
4400
|
docsPath: "/docs/contract/decodeErrorResult"
|
|
4401
4401
|
});
|
|
4402
4402
|
return {
|
|
@@ -4684,7 +4684,7 @@ class Ba extends W {
|
|
|
4684
4684
|
}
|
|
4685
4685
|
else o && (a = o);
|
|
4686
4686
|
let l;
|
|
4687
|
-
s instanceof
|
|
4687
|
+
s instanceof Dd && (l = s.signature, c = [
|
|
4688
4688
|
`Unable to decode signature "${l}" as it was not found on the provided ABI.`,
|
|
4689
4689
|
"Make sure you are using the correct ABI and that the error exists on it.",
|
|
4690
4690
|
`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`
|
|
@@ -5186,31 +5186,31 @@ Object.defineProperty($o, "code", {
|
|
|
5186
5186
|
writable: !0,
|
|
5187
5187
|
value: 5720
|
|
5188
5188
|
});
|
|
5189
|
-
class
|
|
5189
|
+
class Do extends ht {
|
|
5190
5190
|
constructor(t) {
|
|
5191
5191
|
super(t, {
|
|
5192
|
-
code:
|
|
5192
|
+
code: Do.code,
|
|
5193
5193
|
name: "UnknownBundleIdError",
|
|
5194
5194
|
shortMessage: "This bundle id is unknown / has not been submitted"
|
|
5195
5195
|
});
|
|
5196
5196
|
}
|
|
5197
5197
|
}
|
|
5198
|
-
Object.defineProperty(
|
|
5198
|
+
Object.defineProperty(Do, "code", {
|
|
5199
5199
|
enumerable: !0,
|
|
5200
5200
|
configurable: !0,
|
|
5201
5201
|
writable: !0,
|
|
5202
5202
|
value: 5730
|
|
5203
5203
|
});
|
|
5204
|
-
class
|
|
5204
|
+
class ko extends ht {
|
|
5205
5205
|
constructor(t) {
|
|
5206
5206
|
super(t, {
|
|
5207
|
-
code:
|
|
5207
|
+
code: ko.code,
|
|
5208
5208
|
name: "BundleTooLargeError",
|
|
5209
5209
|
shortMessage: "The call bundle is too large for the Wallet to process."
|
|
5210
5210
|
});
|
|
5211
5211
|
}
|
|
5212
5212
|
}
|
|
5213
|
-
Object.defineProperty(
|
|
5213
|
+
Object.defineProperty(ko, "code", {
|
|
5214
5214
|
enumerable: !0,
|
|
5215
5215
|
configurable: !0,
|
|
5216
5216
|
writable: !0,
|
|
@@ -5635,7 +5635,7 @@ function ly(e) {
|
|
|
5635
5635
|
...typeof t.v < "u" && typeof t.yParity > "u" ? { v: oe(t.v) } : {}
|
|
5636
5636
|
}));
|
|
5637
5637
|
}
|
|
5638
|
-
function
|
|
5638
|
+
function Du(e) {
|
|
5639
5639
|
if (!(!e || e.length === 0))
|
|
5640
5640
|
return e.reduce((t, { slot: n, value: r }) => {
|
|
5641
5641
|
if (n.length !== 66)
|
|
@@ -5655,10 +5655,10 @@ function ku(e) {
|
|
|
5655
5655
|
}
|
|
5656
5656
|
function uy(e) {
|
|
5657
5657
|
const { balance: t, nonce: n, state: r, stateDiff: o, code: s } = e, i = {};
|
|
5658
|
-
if (s !== void 0 && (i.code = s), t !== void 0 && (i.balance = oe(t)), n !== void 0 && (i.nonce = oe(n)), r !== void 0 && (i.state =
|
|
5658
|
+
if (s !== void 0 && (i.code = s), t !== void 0 && (i.balance = oe(t)), n !== void 0 && (i.nonce = oe(n)), r !== void 0 && (i.state = Du(r)), o !== void 0) {
|
|
5659
5659
|
if (i.state)
|
|
5660
5660
|
throw new _g();
|
|
5661
|
-
i.stateDiff =
|
|
5661
|
+
i.stateDiff = Du(o);
|
|
5662
5662
|
}
|
|
5663
5663
|
return i;
|
|
5664
5664
|
}
|
|
@@ -6095,9 +6095,9 @@ function Sy(e) {
|
|
|
6095
6095
|
}));
|
|
6096
6096
|
return o;
|
|
6097
6097
|
}
|
|
6098
|
-
const
|
|
6098
|
+
const ku = 6, x0 = 32, ol = 4096, E0 = x0 * ol, Bu = E0 * ku - // terminator byte (0x80).
|
|
6099
6099
|
1 - // zero byte (0x00) appended to each field element.
|
|
6100
|
-
1 * ol *
|
|
6100
|
+
1 * ol * ku;
|
|
6101
6101
|
class Ty extends W {
|
|
6102
6102
|
constructor({ maxSize: t, size: n }) {
|
|
6103
6103
|
super("Blob size is too large.", {
|
|
@@ -6181,10 +6181,10 @@ async function P0(e, t) {
|
|
|
6181
6181
|
const { account: n = e.account, accessList: r, authorizationList: o, chain: s = e.chain, blobVersionedHashes: i, blobs: c, data: a, gas: l, gasPrice: u, maxFeePerBlobGas: f, maxFeePerGas: p, maxPriorityFeePerGas: d, nonce: h, nonceManager: m, to: g, type: A, value: w, ...P } = t, N = await (async () => {
|
|
6182
6182
|
if (!n || !m || typeof h < "u")
|
|
6183
6183
|
return h;
|
|
6184
|
-
const I = dt(n),
|
|
6184
|
+
const I = dt(n), D = s ? s.id : await re(e, sl, "getChainId")({});
|
|
6185
6185
|
return await m.consume({
|
|
6186
6186
|
address: I.address,
|
|
6187
|
-
chainId:
|
|
6187
|
+
chainId: D,
|
|
6188
6188
|
client: e
|
|
6189
6189
|
});
|
|
6190
6190
|
})();
|
|
@@ -6228,8 +6228,8 @@ async function P0(e, t) {
|
|
|
6228
6228
|
})();
|
|
6229
6229
|
if (R < 1)
|
|
6230
6230
|
throw new d0();
|
|
6231
|
-
const E = 10 ** (((O = R.toString().split(".")[1]) == null ? void 0 : O.length) ?? 0),
|
|
6232
|
-
return v.maxFeePerGas && !t.maxFeePerGas && (v.maxFeePerGas =
|
|
6231
|
+
const E = 10 ** (((O = R.toString().split(".")[1]) == null ? void 0 : O.length) ?? 0), k = (F) => F * BigInt(Math.ceil(R * E)) / BigInt(E);
|
|
6232
|
+
return v.maxFeePerGas && !t.maxFeePerGas && (v.maxFeePerGas = k(v.maxFeePerGas)), v.gasPrice && !t.gasPrice && (v.gasPrice = k(v.gasPrice)), {
|
|
6233
6233
|
raw: I.raw,
|
|
6234
6234
|
transaction: {
|
|
6235
6235
|
from: M.from,
|
|
@@ -6284,7 +6284,7 @@ async function S0(e, t) {
|
|
|
6284
6284
|
phase: "beforeFillTransaction"
|
|
6285
6285
|
}), f ?? (f = n.nonce));
|
|
6286
6286
|
const d = ((i.includes("blobVersionedHashes") || i.includes("sidecars")) && n.kzg && n.blobs || Vi.get(e.uid) === !1 || !["fees", "gas"].some((b) => i.includes(b)) ? !1 : !!(i.includes("chainId") && typeof n.chainId != "number" || i.includes("nonce") && typeof f != "number" || i.includes("fees") && typeof n.gasPrice != "bigint" && (typeof n.maxFeePerGas != "bigint" || typeof n.maxPriorityFeePerGas != "bigint") || i.includes("gas") && typeof n.gas != "bigint")) ? await re(e, P0, "fillTransaction")({ ...n, nonce: f }).then((M) => {
|
|
6287
|
-
const { chainId: b, from: y, gas: x, gasPrice: S, nonce: O, maxFeePerBlobGas: I, maxFeePerGas:
|
|
6287
|
+
const { chainId: b, from: y, gas: x, gasPrice: S, nonce: O, maxFeePerBlobGas: I, maxFeePerGas: D, maxPriorityFeePerGas: v, type: R, ...C } = M.transaction;
|
|
6288
6288
|
return Vi.set(e.uid, !0), {
|
|
6289
6289
|
...n,
|
|
6290
6290
|
...y ? { from: y } : {},
|
|
@@ -6294,7 +6294,7 @@ async function S0(e, t) {
|
|
|
6294
6294
|
...typeof S < "u" ? { gasPrice: S } : {},
|
|
6295
6295
|
...typeof O < "u" ? { nonce: O } : {},
|
|
6296
6296
|
...typeof I < "u" ? { maxFeePerBlobGas: I } : {},
|
|
6297
|
-
...typeof
|
|
6297
|
+
...typeof D < "u" ? { maxFeePerGas: D } : {},
|
|
6298
6298
|
...typeof v < "u" ? { maxPriorityFeePerGas: v } : {},
|
|
6299
6299
|
..."nonceKey" in C && typeof C.nonceKey < "u" ? { nonceKey: C.nonceKey } : {}
|
|
6300
6300
|
};
|
|
@@ -6494,7 +6494,7 @@ function $s(e) {
|
|
|
6494
6494
|
abiItem: a,
|
|
6495
6495
|
param: g
|
|
6496
6496
|
});
|
|
6497
|
-
p[f ? A : g.name || A] =
|
|
6497
|
+
p[f ? A : g.name || A] = Dy({
|
|
6498
6498
|
param: g,
|
|
6499
6499
|
value: w
|
|
6500
6500
|
});
|
|
@@ -6533,7 +6533,7 @@ function $s(e) {
|
|
|
6533
6533
|
args: Object.values(p).length > 0 ? p : void 0
|
|
6534
6534
|
};
|
|
6535
6535
|
}
|
|
6536
|
-
function
|
|
6536
|
+
function Dy({ param: e, value: t }) {
|
|
6537
6537
|
return e.type === "string" || e.type === "bytes" || e.type === "tuple" || e.type.match(/^(.*)\[(\d+)?\]$/) ? t : (Ko([e], t) || [])[0];
|
|
6538
6538
|
}
|
|
6539
6539
|
function al(e) {
|
|
@@ -6574,14 +6574,14 @@ function al(e) {
|
|
|
6574
6574
|
};
|
|
6575
6575
|
}
|
|
6576
6576
|
}
|
|
6577
|
-
return !a || !l || s && !s.includes(a.eventName) || !
|
|
6577
|
+
return !a || !l || s && !s.includes(a.eventName) || !ky({
|
|
6578
6578
|
args: a.args,
|
|
6579
6579
|
inputs: l.inputs,
|
|
6580
6580
|
matchArgs: n
|
|
6581
6581
|
}) ? null : { ...a, ...i };
|
|
6582
6582
|
}).filter(Boolean);
|
|
6583
6583
|
}
|
|
6584
|
-
function
|
|
6584
|
+
function ky(e) {
|
|
6585
6585
|
const { args: t, inputs: n, matchArgs: r } = e;
|
|
6586
6586
|
if (!r)
|
|
6587
6587
|
return !0;
|
|
@@ -6675,7 +6675,7 @@ function pr(e) {
|
|
|
6675
6675
|
if (s.type !== "function")
|
|
6676
6676
|
throw new Br(void 0, { docsPath: Hi });
|
|
6677
6677
|
if (!s.outputs)
|
|
6678
|
-
throw new
|
|
6678
|
+
throw new kd(s.name, { docsPath: Hi });
|
|
6679
6679
|
const i = Ko(s.outputs, o);
|
|
6680
6680
|
if (i && i.length > 1)
|
|
6681
6681
|
return i;
|
|
@@ -6725,7 +6725,7 @@ function Fu(e) {
|
|
|
6725
6725
|
if (e >= un.a && e <= un.f)
|
|
6726
6726
|
return e - (un.a - 10);
|
|
6727
6727
|
}
|
|
6728
|
-
function
|
|
6728
|
+
function Ds(e) {
|
|
6729
6729
|
if (typeof e != "string")
|
|
6730
6730
|
throw new Error("hex string expected, got " + typeof e);
|
|
6731
6731
|
if (N0)
|
|
@@ -6751,7 +6751,7 @@ function R0(e) {
|
|
|
6751
6751
|
return ul(e), A0(Fo(Uint8Array.from(e).reverse()));
|
|
6752
6752
|
}
|
|
6753
6753
|
function Qo(e, t) {
|
|
6754
|
-
return
|
|
6754
|
+
return Ds(e.toString(16).padStart(t * 2, "0"));
|
|
6755
6755
|
}
|
|
6756
6756
|
function O0(e, t) {
|
|
6757
6757
|
return Qo(e, t).reverse();
|
|
@@ -6760,7 +6760,7 @@ function St(e, t, n) {
|
|
|
6760
6760
|
let r;
|
|
6761
6761
|
if (typeof t == "string")
|
|
6762
6762
|
try {
|
|
6763
|
-
r =
|
|
6763
|
+
r = Ds(t);
|
|
6764
6764
|
} catch (s) {
|
|
6765
6765
|
throw new Error(e + " must be hex string or Uint8Array, cause: " + s);
|
|
6766
6766
|
}
|
|
@@ -6773,7 +6773,7 @@ function St(e, t, n) {
|
|
|
6773
6773
|
throw new Error(e + " of length " + n + " expected, got " + o);
|
|
6774
6774
|
return r;
|
|
6775
6775
|
}
|
|
6776
|
-
function
|
|
6776
|
+
function ks(...e) {
|
|
6777
6777
|
let t = 0;
|
|
6778
6778
|
for (let r = 0; r < e.length; r++) {
|
|
6779
6779
|
const o = e[r];
|
|
@@ -6823,7 +6823,7 @@ function Ly(e, t, n) {
|
|
|
6823
6823
|
const d = r.slice();
|
|
6824
6824
|
p.push(d), f += r.length;
|
|
6825
6825
|
}
|
|
6826
|
-
return
|
|
6826
|
+
return ks(...p);
|
|
6827
6827
|
};
|
|
6828
6828
|
return (f, p) => {
|
|
6829
6829
|
i(), a(f);
|
|
@@ -7022,17 +7022,17 @@ function $0(e, t = {}) {
|
|
|
7022
7022
|
return `0x${o[n === "right" ? "padEnd" : "padStart"](r * 2, "0")}`;
|
|
7023
7023
|
}
|
|
7024
7024
|
const Vy = "#__bigint";
|
|
7025
|
-
function
|
|
7025
|
+
function D0(e, t, n) {
|
|
7026
7026
|
return JSON.stringify(e, (r, o) => typeof o == "bigint" ? o.toString() + Vy : o, n);
|
|
7027
7027
|
}
|
|
7028
7028
|
const Hy = /* @__PURE__ */ new TextDecoder(), Gy = /* @__PURE__ */ new TextEncoder();
|
|
7029
7029
|
function qy(e) {
|
|
7030
|
-
return e instanceof Uint8Array ? e : typeof e == "string" ?
|
|
7030
|
+
return e instanceof Uint8Array ? e : typeof e == "string" ? k0(e) : Ky(e);
|
|
7031
7031
|
}
|
|
7032
7032
|
function Ky(e) {
|
|
7033
7033
|
return e instanceof Uint8Array ? e : new Uint8Array(e);
|
|
7034
7034
|
}
|
|
7035
|
-
function
|
|
7035
|
+
function k0(e, t = {}) {
|
|
7036
7036
|
const { size: n } = t;
|
|
7037
7037
|
let r = e;
|
|
7038
7038
|
n && (li(e, n), r = sr(e, n));
|
|
@@ -7222,7 +7222,7 @@ class j0 extends he {
|
|
|
7222
7222
|
}
|
|
7223
7223
|
class _u extends he {
|
|
7224
7224
|
constructor(t) {
|
|
7225
|
-
super(`Value \`${typeof t == "object" ?
|
|
7225
|
+
super(`Value \`${typeof t == "object" ? D0(t) : t}\` of type \`${typeof t}\` is an invalid hex type.`, {
|
|
7226
7226
|
metaMessages: ['Hex types must be represented as `"0x${string}"`.']
|
|
7227
7227
|
}), Object.defineProperty(this, "name", {
|
|
7228
7228
|
enumerable: !0,
|
|
@@ -7927,7 +7927,7 @@ function Z0({ fn: e, id: t, shouldSplitBatch: n, wait: r = 0, sort: o }) {
|
|
|
7927
7927
|
};
|
|
7928
7928
|
}
|
|
7929
7929
|
async function ui(e, t) {
|
|
7930
|
-
var I,
|
|
7930
|
+
var I, D, v, R;
|
|
7931
7931
|
const { account: n = e.account, authorizationList: r, batch: o = !!((I = e.batch) != null && I.multicall), blockNumber: s, blockTag: i = e.experimental_blockTag ?? "latest", accessList: c, blobs: a, blockOverrides: l, code: u, data: f, factory: p, factoryData: d, gas: h, gasPrice: m, maxFeePerBlobGas: g, maxFeePerGas: A, maxPriorityFeePerGas: w, nonce: P, to: N, value: $, stateOverride: B, ...M } = t, b = n ? dt(n) : void 0;
|
|
7932
7932
|
if (u && (p || d))
|
|
7933
7933
|
throw new W("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
@@ -7944,7 +7944,7 @@ async function ui(e, t) {
|
|
|
7944
7944
|
}) : f;
|
|
7945
7945
|
try {
|
|
7946
7946
|
Gr(t);
|
|
7947
|
-
const E = (typeof s == "bigint" ? oe(s) : void 0) || i,
|
|
7947
|
+
const E = (typeof s == "bigint" ? oe(s) : void 0) || i, k = l ? U0(l) : void 0, F = el(B), z = (R = (v = (D = e.chain) == null ? void 0 : D.formatters) == null ? void 0 : v.transactionRequest) == null ? void 0 : R.format, H = (z || Xo)({
|
|
7948
7948
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
7949
7949
|
...si(M, { format: z }),
|
|
7950
7950
|
accessList: c,
|
|
@@ -7961,7 +7961,7 @@ async function ui(e, t) {
|
|
|
7961
7961
|
to: S ? void 0 : N,
|
|
7962
7962
|
value: $
|
|
7963
7963
|
}, "call");
|
|
7964
|
-
if (o && gv({ request: H }) && !F && !
|
|
7964
|
+
if (o && gv({ request: H }) && !F && !k)
|
|
7965
7965
|
try {
|
|
7966
7966
|
return await yv(e, {
|
|
7967
7967
|
...H,
|
|
@@ -7977,16 +7977,16 @@ async function ui(e, t) {
|
|
|
7977
7977
|
H,
|
|
7978
7978
|
E
|
|
7979
7979
|
];
|
|
7980
|
-
return F &&
|
|
7980
|
+
return F && k ? [..._, F, k] : F ? [..._, F] : k ? [..._, {}, k] : _;
|
|
7981
7981
|
})(), G = await e.request({
|
|
7982
7982
|
method: "eth_call",
|
|
7983
7983
|
params: ee
|
|
7984
7984
|
});
|
|
7985
7985
|
return G === "0x" ? { data: void 0 } : { data: G };
|
|
7986
7986
|
} catch (C) {
|
|
7987
|
-
const E = wv(C), { offchainLookup:
|
|
7987
|
+
const E = wv(C), { offchainLookup: k, offchainLookupSignature: F } = await import("./ccip-PikfM9kh.mjs");
|
|
7988
7988
|
if (e.ccipRead !== !1 && (E == null ? void 0 : E.slice(0, 10)) === F && N)
|
|
7989
|
-
return { data: await
|
|
7989
|
+
return { data: await k(e, { data: E, to: N }) };
|
|
7990
7990
|
throw S && (E == null ? void 0 : E.slice(0, 10)) === "0x101bb98d" ? new Yg({ factory: p }) : q0(C, {
|
|
7991
7991
|
...t,
|
|
7992
7992
|
account: b,
|
|
@@ -8367,11 +8367,11 @@ function Rv(e, t) {
|
|
|
8367
8367
|
return;
|
|
8368
8368
|
O = S.abiItem.name, I = (x = S.abiItem.inputs) == null ? void 0 : x.some((v) => !("name" in v && v.name));
|
|
8369
8369
|
}
|
|
8370
|
-
const
|
|
8370
|
+
const D = En(y, {
|
|
8371
8371
|
args: I ? [] : {},
|
|
8372
8372
|
eventName: O
|
|
8373
8373
|
});
|
|
8374
|
-
N.onLogs([
|
|
8374
|
+
N.onLogs([D]);
|
|
8375
8375
|
}
|
|
8376
8376
|
},
|
|
8377
8377
|
onError(b) {
|
|
@@ -8512,7 +8512,7 @@ function Ku(e) {
|
|
|
8512
8512
|
return Hr([i, c]);
|
|
8513
8513
|
}
|
|
8514
8514
|
const Ji = "/docs/contract/encodeFunctionResult";
|
|
8515
|
-
function
|
|
8515
|
+
function Dv(e) {
|
|
8516
8516
|
const { abi: t, functionName: n, result: r } = e;
|
|
8517
8517
|
let o = t[0];
|
|
8518
8518
|
if (n) {
|
|
@@ -8524,7 +8524,7 @@ function kv(e) {
|
|
|
8524
8524
|
if (o.type !== "function")
|
|
8525
8525
|
throw new Br(void 0, { docsPath: Ji });
|
|
8526
8526
|
if (!o.outputs)
|
|
8527
|
-
throw new
|
|
8527
|
+
throw new kd(o.name, { docsPath: Ji });
|
|
8528
8528
|
const s = (() => {
|
|
8529
8529
|
if (o.outputs.length === 0)
|
|
8530
8530
|
return [];
|
|
@@ -8537,15 +8537,15 @@ function kv(e) {
|
|
|
8537
8537
|
return fr(o.outputs, s);
|
|
8538
8538
|
}
|
|
8539
8539
|
const pi = "x-batch-gateway:true";
|
|
8540
|
-
async function
|
|
8540
|
+
async function kv(e) {
|
|
8541
8541
|
const { data: t, ccipRequest: n } = e, { args: [r] } = $v({ abi: Ga, data: t }), o = [], s = [];
|
|
8542
8542
|
return await Promise.all(r.map(async (i, c) => {
|
|
8543
8543
|
try {
|
|
8544
|
-
s[c] = i.urls.includes(pi) ? await
|
|
8544
|
+
s[c] = i.urls.includes(pi) ? await kv({ data: i.data, ccipRequest: n }) : await n(i), o[c] = !1;
|
|
8545
8545
|
} catch (a) {
|
|
8546
8546
|
o[c] = !0, s[c] = Bv(a);
|
|
8547
8547
|
}
|
|
8548
|
-
})),
|
|
8548
|
+
})), Dv({
|
|
8549
8549
|
abi: Ga,
|
|
8550
8550
|
functionName: "query",
|
|
8551
8551
|
result: [o, s]
|
|
@@ -9246,10 +9246,10 @@ function dw(e, t = {}) {
|
|
|
9246
9246
|
throw new Co(d);
|
|
9247
9247
|
case $o.code:
|
|
9248
9248
|
throw new $o(d);
|
|
9249
|
-
case ko.code:
|
|
9250
|
-
throw new ko(d);
|
|
9251
9249
|
case Do.code:
|
|
9252
9250
|
throw new Do(d);
|
|
9251
|
+
case ko.code:
|
|
9252
|
+
throw new ko(d);
|
|
9253
9253
|
case Bo.code:
|
|
9254
9254
|
throw new Bo(d);
|
|
9255
9255
|
case Mo.code:
|
|
@@ -9599,7 +9599,7 @@ function hi(e, t = {}) {
|
|
|
9599
9599
|
if (!$w.test(e))
|
|
9600
9600
|
throw new Xu({
|
|
9601
9601
|
address: e,
|
|
9602
|
-
cause: new
|
|
9602
|
+
cause: new Dw()
|
|
9603
9603
|
});
|
|
9604
9604
|
if (n) {
|
|
9605
9605
|
if (e.toLowerCase() === e)
|
|
@@ -9607,7 +9607,7 @@ function hi(e, t = {}) {
|
|
|
9607
9607
|
if (dp(e) !== e)
|
|
9608
9608
|
throw new Xu({
|
|
9609
9609
|
address: e,
|
|
9610
|
-
cause: new
|
|
9610
|
+
cause: new kw()
|
|
9611
9611
|
});
|
|
9612
9612
|
}
|
|
9613
9613
|
}
|
|
@@ -9641,7 +9641,7 @@ class Xu extends he {
|
|
|
9641
9641
|
});
|
|
9642
9642
|
}
|
|
9643
9643
|
}
|
|
9644
|
-
class
|
|
9644
|
+
class Dw extends he {
|
|
9645
9645
|
constructor() {
|
|
9646
9646
|
super("Address is not a 20 byte (40 hexadecimal character) value."), Object.defineProperty(this, "name", {
|
|
9647
9647
|
enumerable: !0,
|
|
@@ -9651,7 +9651,7 @@ class kw extends he {
|
|
|
9651
9651
|
});
|
|
9652
9652
|
}
|
|
9653
9653
|
}
|
|
9654
|
-
class
|
|
9654
|
+
class kw extends he {
|
|
9655
9655
|
constructor() {
|
|
9656
9656
|
super("Address does not match its checksum counterpart."), Object.defineProperty(this, "name", {
|
|
9657
9657
|
enumerable: !0,
|
|
@@ -9662,7 +9662,7 @@ class Dw extends he {
|
|
|
9662
9662
|
}
|
|
9663
9663
|
}
|
|
9664
9664
|
const Bw = /^(.*)\[([0-9]*)\]$/, Mw = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, pp = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/, Ju = 2n ** 256n - 1n;
|
|
9665
|
-
function
|
|
9665
|
+
function Dr(e, t, n) {
|
|
9666
9666
|
const { checksumAddress: r, staticPosition: o } = n, s = xl(t.type);
|
|
9667
9667
|
if (s) {
|
|
9668
9668
|
const [i, c] = s;
|
|
@@ -9700,7 +9700,7 @@ function Fw(e, t, n) {
|
|
|
9700
9700
|
const h = [];
|
|
9701
9701
|
for (let m = 0; m < f; ++m) {
|
|
9702
9702
|
e.setPosition(u + (p ? m * 32 : d));
|
|
9703
|
-
const [g, A] =
|
|
9703
|
+
const [g, A] = Dr(e, t, {
|
|
9704
9704
|
checksumAddress: r,
|
|
9705
9705
|
staticPosition: u
|
|
9706
9706
|
});
|
|
@@ -9712,7 +9712,7 @@ function Fw(e, t, n) {
|
|
|
9712
9712
|
const a = gn(e.readBytes(ec)), l = s + a, u = [];
|
|
9713
9713
|
for (let f = 0; f < o; ++f) {
|
|
9714
9714
|
e.setPosition(l + f * 32);
|
|
9715
|
-
const [p] =
|
|
9715
|
+
const [p] = Dr(e, t, {
|
|
9716
9716
|
checksumAddress: r,
|
|
9717
9717
|
staticPosition: l
|
|
9718
9718
|
});
|
|
@@ -9723,7 +9723,7 @@ function Fw(e, t, n) {
|
|
|
9723
9723
|
let i = 0;
|
|
9724
9724
|
const c = [];
|
|
9725
9725
|
for (let a = 0; a < o; ++a) {
|
|
9726
|
-
const [l, u] =
|
|
9726
|
+
const [l, u] = Dr(e, t, {
|
|
9727
9727
|
checksumAddress: r,
|
|
9728
9728
|
staticPosition: s + i
|
|
9729
9729
|
});
|
|
@@ -9762,7 +9762,7 @@ function _w(e, t, n) {
|
|
|
9762
9762
|
for (let u = 0; u < t.components.length; ++u) {
|
|
9763
9763
|
const f = t.components[u];
|
|
9764
9764
|
e.setPosition(l + c);
|
|
9765
|
-
const [p, d] =
|
|
9765
|
+
const [p, d] = Dr(e, f, {
|
|
9766
9766
|
checksumAddress: r,
|
|
9767
9767
|
staticPosition: l
|
|
9768
9768
|
});
|
|
@@ -9771,7 +9771,7 @@ function _w(e, t, n) {
|
|
|
9771
9771
|
return e.setPosition(o + 32), [i, 32];
|
|
9772
9772
|
}
|
|
9773
9773
|
for (let a = 0; a < t.components.length; ++a) {
|
|
9774
|
-
const l = t.components[a], [u, f] =
|
|
9774
|
+
const l = t.components[a], [u, f] = Dr(e, l, {
|
|
9775
9775
|
checksumAddress: r,
|
|
9776
9776
|
staticPosition: o
|
|
9777
9777
|
});
|
|
@@ -10137,7 +10137,7 @@ class t6 extends he {
|
|
|
10137
10137
|
}
|
|
10138
10138
|
}
|
|
10139
10139
|
function n6(e, t, n = {}) {
|
|
10140
|
-
const { as: r = "Array", checksumAddress: o = !1 } = n, s = typeof t == "string" ?
|
|
10140
|
+
const { as: r = "Array", checksumAddress: o = !1 } = n, s = typeof t == "string" ? k0(t) : t, i = Qw(s);
|
|
10141
10141
|
if (Sr(s) === 0 && e.length > 0)
|
|
10142
10142
|
throw new o6();
|
|
10143
10143
|
if (Sr(s) && Sr(s) < 32)
|
|
@@ -10151,7 +10151,7 @@ function n6(e, t, n = {}) {
|
|
|
10151
10151
|
for (let l = 0; l < e.length; ++l) {
|
|
10152
10152
|
const u = e[l];
|
|
10153
10153
|
i.setPosition(c);
|
|
10154
|
-
const [f, p] =
|
|
10154
|
+
const [f, p] = Dr(i, u, {
|
|
10155
10155
|
checksumAddress: o,
|
|
10156
10156
|
staticPosition: 0
|
|
10157
10157
|
});
|
|
@@ -10851,7 +10851,7 @@ const sa = BigInt(3), x6 = BigInt(4);
|
|
|
10851
10851
|
function E6(e) {
|
|
10852
10852
|
const t = v6(e), { Fp: n } = t, r = Sl(t.n, t.nBitLength), o = t.toBytes || ((P, N, $) => {
|
|
10853
10853
|
const B = N.toAffine();
|
|
10854
|
-
return
|
|
10854
|
+
return ks(Uint8Array.from([4]), n.toBytes(B.x), n.toBytes(B.y));
|
|
10855
10855
|
}), s = t.fromBytes || ((P) => {
|
|
10856
10856
|
const N = P.subarray(1), $ = n.fromBytes(N.subarray(0, n.BYTES)), B = n.fromBytes(N.subarray(n.BYTES, 2 * n.BYTES));
|
|
10857
10857
|
return { x: $, y: B };
|
|
@@ -11005,8 +11005,8 @@ function E6(e) {
|
|
|
11005
11005
|
// Cost: 8M + 3S + 3*a + 2*b3 + 15add.
|
|
11006
11006
|
double() {
|
|
11007
11007
|
const { a: N, b: $ } = t, B = n.mul($, sa), { px: M, py: b, pz: y } = this;
|
|
11008
|
-
let x = n.ZERO, S = n.ZERO, O = n.ZERO, I = n.mul(M, M),
|
|
11009
|
-
return R = n.add(R, R), O = n.mul(M, y), O = n.add(O, O), x = n.mul(N, O), S = n.mul(B, v), S = n.add(x, S), x = n.sub(
|
|
11008
|
+
let x = n.ZERO, S = n.ZERO, O = n.ZERO, I = n.mul(M, M), D = n.mul(b, b), v = n.mul(y, y), R = n.mul(M, b);
|
|
11009
|
+
return R = n.add(R, R), O = n.mul(M, y), O = n.add(O, O), x = n.mul(N, O), S = n.mul(B, v), S = n.add(x, S), x = n.sub(D, S), S = n.add(D, S), S = n.mul(x, S), x = n.mul(R, x), O = n.mul(B, O), v = n.mul(N, v), R = n.sub(I, v), R = n.mul(N, R), R = n.add(R, O), O = n.add(I, I), I = n.add(O, I), I = n.add(I, v), I = n.mul(I, R), S = n.add(S, I), v = n.mul(b, y), v = n.add(v, v), I = n.mul(v, R), x = n.sub(x, I), O = n.mul(v, D), O = n.add(O, O), O = n.add(O, O), new m(x, S, O);
|
|
11010
11010
|
}
|
|
11011
11011
|
// Renes-Costello-Batina exception-free addition formula.
|
|
11012
11012
|
// There is 30% faster Jacobian formula, but it is not complete.
|
|
@@ -11016,11 +11016,11 @@ function E6(e) {
|
|
|
11016
11016
|
p(N);
|
|
11017
11017
|
const { px: $, py: B, pz: M } = this, { px: b, py: y, pz: x } = N;
|
|
11018
11018
|
let S = n.ZERO, O = n.ZERO, I = n.ZERO;
|
|
11019
|
-
const
|
|
11020
|
-
let R = n.mul($, b), C = n.mul(B, y), E = n.mul(M, x),
|
|
11021
|
-
|
|
11019
|
+
const D = t.a, v = n.mul(t.b, sa);
|
|
11020
|
+
let R = n.mul($, b), C = n.mul(B, y), E = n.mul(M, x), k = n.add($, B), F = n.add(b, y);
|
|
11021
|
+
k = n.mul(k, F), F = n.add(R, C), k = n.sub(k, F), F = n.add($, M);
|
|
11022
11022
|
let z = n.add(b, x);
|
|
11023
|
-
return F = n.mul(F, z), z = n.add(R, E), F = n.sub(F, z), z = n.add(B, M), S = n.add(y, x), z = n.mul(z, S), S = n.add(C, E), z = n.sub(z, S), I = n.mul(
|
|
11023
|
+
return F = n.mul(F, z), z = n.add(R, E), F = n.sub(F, z), z = n.add(B, M), S = n.add(y, x), z = n.mul(z, S), S = n.add(C, E), z = n.sub(z, S), I = n.mul(D, F), S = n.mul(v, E), I = n.add(S, I), S = n.sub(C, I), I = n.add(C, I), O = n.mul(S, I), C = n.add(R, R), C = n.add(C, R), E = n.mul(D, E), F = n.mul(v, F), C = n.add(C, E), E = n.sub(R, E), E = n.mul(D, E), F = n.add(F, E), R = n.mul(C, F), O = n.add(O, R), R = n.mul(z, F), S = n.mul(k, S), S = n.sub(S, R), R = n.mul(k, C), I = n.mul(z, I), I = n.add(I, R), new m(S, O, I);
|
|
11024
11024
|
}
|
|
11025
11025
|
subtract(N) {
|
|
11026
11026
|
return this.add(N.negate());
|
|
@@ -11046,9 +11046,9 @@ function E6(e) {
|
|
|
11046
11046
|
return this;
|
|
11047
11047
|
if (!$ || w.hasPrecomputes(this))
|
|
11048
11048
|
return w.wNAFCachedUnsafe(this, N, m.normalizeZ);
|
|
11049
|
-
let { k1neg: b, k1: y, k2neg: x, k2: S } = $.splitScalar(N), O = M, I = M,
|
|
11049
|
+
let { k1neg: b, k1: y, k2neg: x, k2: S } = $.splitScalar(N), O = M, I = M, D = this;
|
|
11050
11050
|
for (; y > hn || S > hn; )
|
|
11051
|
-
y & je && (O = O.add(
|
|
11051
|
+
y & je && (O = O.add(D)), S & je && (I = I.add(D)), D = D.double(), y >>= je, S >>= je;
|
|
11052
11052
|
return b && (O = O.negate()), x && (I = I.negate()), I = new m(n.mul(I.px, $.beta), I.py, I.pz), O.add(I);
|
|
11053
11053
|
}
|
|
11054
11054
|
/**
|
|
@@ -11066,8 +11066,8 @@ function E6(e) {
|
|
|
11066
11066
|
let M, b;
|
|
11067
11067
|
if ($) {
|
|
11068
11068
|
const { k1neg: y, k1: x, k2neg: S, k2: O } = $.splitScalar(N);
|
|
11069
|
-
let { p: I, f:
|
|
11070
|
-
I = w.constTimeNegate(y, I), v = w.constTimeNegate(S, v), v = new m(n.mul(v.px, $.beta), v.py, v.pz), M = I.add(v), b =
|
|
11069
|
+
let { p: I, f: D } = this.wNAF(x), { p: v, f: R } = this.wNAF(O);
|
|
11070
|
+
I = w.constTimeNegate(y, I), v = w.constTimeNegate(S, v), v = new m(n.mul(v.px, $.beta), v.py, v.pz), M = I.add(v), b = D.add(R);
|
|
11071
11071
|
} else {
|
|
11072
11072
|
const { p: y, f: x } = this.wNAF(N);
|
|
11073
11073
|
M = y, b = x;
|
|
@@ -11142,16 +11142,16 @@ function S6(e) {
|
|
|
11142
11142
|
const { ProjectivePoint: u, normPrivateKeyToScalar: f, weierstrassEquation: p, isWithinCurveOrder: d } = E6({
|
|
11143
11143
|
...t,
|
|
11144
11144
|
toBytes(v, R, C) {
|
|
11145
|
-
const E = R.toAffine(),
|
|
11146
|
-
return Lo("isCompressed", C), C ? F(Uint8Array.from([R.hasEvenY() ? 2 : 3]),
|
|
11145
|
+
const E = R.toAffine(), k = n.toBytes(E.x), F = ks;
|
|
11146
|
+
return Lo("isCompressed", C), C ? F(Uint8Array.from([R.hasEvenY() ? 2 : 3]), k) : F(Uint8Array.from([4]), k, n.toBytes(E.y));
|
|
11147
11147
|
},
|
|
11148
11148
|
fromBytes(v) {
|
|
11149
11149
|
const R = v.length, C = v[0], E = v.subarray(1);
|
|
11150
11150
|
if (R === i && (C === 2 || C === 3)) {
|
|
11151
|
-
const
|
|
11152
|
-
if (!fl(
|
|
11151
|
+
const k = tr(E);
|
|
11152
|
+
if (!fl(k, je, n.ORDER))
|
|
11153
11153
|
throw new Error("Point is not on curve");
|
|
11154
|
-
const F = p(
|
|
11154
|
+
const F = p(k);
|
|
11155
11155
|
let z;
|
|
11156
11156
|
try {
|
|
11157
11157
|
z = n.sqrt(F);
|
|
@@ -11160,13 +11160,13 @@ function S6(e) {
|
|
|
11160
11160
|
throw new Error("Point is not on curve" + G);
|
|
11161
11161
|
}
|
|
11162
11162
|
const U = (z & je) === je;
|
|
11163
|
-
return (C & 1) === 1 !== U && (z = n.neg(z)), { x:
|
|
11163
|
+
return (C & 1) === 1 !== U && (z = n.neg(z)), { x: k, y: z };
|
|
11164
11164
|
} else if (R === c && C === 4) {
|
|
11165
|
-
const
|
|
11166
|
-
return { x:
|
|
11165
|
+
const k = n.fromBytes(E.subarray(0, n.BYTES)), F = n.fromBytes(E.subarray(n.BYTES, 2 * n.BYTES));
|
|
11166
|
+
return { x: k, y: F };
|
|
11167
11167
|
} else {
|
|
11168
|
-
const
|
|
11169
|
-
throw new Error("invalid Point, expected length of " +
|
|
11168
|
+
const k = i, F = c;
|
|
11169
|
+
throw new Error("invalid Point, expected length of " + k + ", or uncompressed " + F + ", got " + R);
|
|
11170
11170
|
}
|
|
11171
11171
|
}
|
|
11172
11172
|
});
|
|
@@ -11203,13 +11203,13 @@ function S6(e) {
|
|
|
11203
11203
|
return new A(this.r, this.s, R);
|
|
11204
11204
|
}
|
|
11205
11205
|
recoverPublicKey(R) {
|
|
11206
|
-
const { r: C, s: E, recovery:
|
|
11207
|
-
if (
|
|
11206
|
+
const { r: C, s: E, recovery: k } = this, F = M(St("msgHash", R));
|
|
11207
|
+
if (k == null || ![0, 1, 2, 3].includes(k))
|
|
11208
11208
|
throw new Error("recovery id invalid");
|
|
11209
|
-
const z =
|
|
11209
|
+
const z = k === 2 || k === 3 ? C + t.n : C;
|
|
11210
11210
|
if (z >= n.ORDER)
|
|
11211
11211
|
throw new Error("recovery id 2 or 3 invalid");
|
|
11212
|
-
const U =
|
|
11212
|
+
const U = k & 1 ? "03" : "02", H = u.fromHex(U + oa(z, n.BYTES)), ee = l(z), G = a(-F * ee), _ = a(E * ee), ne = u.BASE.multiplyAndAddUnsafe(H, G, _);
|
|
11213
11213
|
if (!ne)
|
|
11214
11214
|
throw new Error("point at infinify");
|
|
11215
11215
|
return ne.assertValidity(), ne;
|
|
@@ -11223,14 +11223,14 @@ function S6(e) {
|
|
|
11223
11223
|
}
|
|
11224
11224
|
// DER-encoded
|
|
11225
11225
|
toDERRawBytes() {
|
|
11226
|
-
return
|
|
11226
|
+
return Ds(this.toDERHex());
|
|
11227
11227
|
}
|
|
11228
11228
|
toDERHex() {
|
|
11229
11229
|
return dn.hexFromSig(this);
|
|
11230
11230
|
}
|
|
11231
11231
|
// padded bytes of r, then padded bytes of s
|
|
11232
11232
|
toCompactRawBytes() {
|
|
11233
|
-
return
|
|
11233
|
+
return Ds(this.toCompactHex());
|
|
11234
11234
|
}
|
|
11235
11235
|
toCompactHex() {
|
|
11236
11236
|
const R = o;
|
|
@@ -11274,9 +11274,9 @@ function S6(e) {
|
|
|
11274
11274
|
return !1;
|
|
11275
11275
|
if (v instanceof u)
|
|
11276
11276
|
return !0;
|
|
11277
|
-
const C = St("key", v).length, E = n.BYTES,
|
|
11278
|
-
if (!(t.allowedPrivateKeyLengths || o ===
|
|
11279
|
-
return C ===
|
|
11277
|
+
const C = St("key", v).length, E = n.BYTES, k = E + 1, F = 2 * E + 1;
|
|
11278
|
+
if (!(t.allowedPrivateKeyLengths || o === k))
|
|
11279
|
+
return C === k || C === F;
|
|
11280
11280
|
}
|
|
11281
11281
|
function $(v, R, C = !0) {
|
|
11282
11282
|
if (N(v) === !0)
|
|
@@ -11299,15 +11299,15 @@ function S6(e) {
|
|
|
11299
11299
|
function x(v, R, C = S) {
|
|
11300
11300
|
if (["recovered", "canonical"].some((q) => q in C))
|
|
11301
11301
|
throw new Error("sign() legacy options not supported");
|
|
11302
|
-
const { hash: E, randomBytes:
|
|
11302
|
+
const { hash: E, randomBytes: k } = t;
|
|
11303
11303
|
let { lowS: F, prehash: z, extraEntropy: U } = C;
|
|
11304
11304
|
F == null && (F = !0), v = St("msgHash", v), of(C), z && (v = St("prehashed msgHash", E(v)));
|
|
11305
11305
|
const H = M(v), ee = f(R), G = [y(ee), y(H)];
|
|
11306
11306
|
if (U != null && U !== !1) {
|
|
11307
|
-
const q = U === !0 ?
|
|
11307
|
+
const q = U === !0 ? k(n.BYTES) : U;
|
|
11308
11308
|
G.push(St("extraEntropy", q));
|
|
11309
11309
|
}
|
|
11310
|
-
const _ =
|
|
11310
|
+
const _ = ks(...G), ne = H;
|
|
11311
11311
|
function xe(q) {
|
|
11312
11312
|
const ae = B(q);
|
|
11313
11313
|
if (!d(ae))
|
|
@@ -11325,32 +11325,32 @@ function S6(e) {
|
|
|
11325
11325
|
}
|
|
11326
11326
|
const S = { lowS: t.lowS, prehash: !1 }, O = { lowS: t.lowS, prehash: !1 };
|
|
11327
11327
|
function I(v, R, C = S) {
|
|
11328
|
-
const { seed: E, k2sig:
|
|
11329
|
-
return Ly(F.hash.outputLen, F.nByteLength, F.hmac)(E,
|
|
11328
|
+
const { seed: E, k2sig: k } = x(v, R, C), F = t;
|
|
11329
|
+
return Ly(F.hash.outputLen, F.nByteLength, F.hmac)(E, k);
|
|
11330
11330
|
}
|
|
11331
11331
|
u.BASE._setWindowSize(8);
|
|
11332
|
-
function
|
|
11332
|
+
function D(v, R, C, E = O) {
|
|
11333
11333
|
var se;
|
|
11334
|
-
const
|
|
11334
|
+
const k = v;
|
|
11335
11335
|
R = St("msgHash", R), C = St("publicKey", C);
|
|
11336
11336
|
const { lowS: F, prehash: z, format: U } = E;
|
|
11337
11337
|
if (of(E), "strict" in E)
|
|
11338
11338
|
throw new Error("options.strict was renamed to lowS");
|
|
11339
11339
|
if (U !== void 0 && U !== "compact" && U !== "der")
|
|
11340
11340
|
throw new Error("format must be compact or der");
|
|
11341
|
-
const H = typeof
|
|
11341
|
+
const H = typeof k == "string" || Jo(k), ee = !H && !U && typeof k == "object" && k !== null && typeof k.r == "bigint" && typeof k.s == "bigint";
|
|
11342
11342
|
if (!H && !ee)
|
|
11343
11343
|
throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");
|
|
11344
11344
|
let G, _;
|
|
11345
11345
|
try {
|
|
11346
|
-
if (ee && (G = new A(
|
|
11346
|
+
if (ee && (G = new A(k.r, k.s)), H) {
|
|
11347
11347
|
try {
|
|
11348
|
-
U !== "compact" && (G = A.fromDER(
|
|
11348
|
+
U !== "compact" && (G = A.fromDER(k));
|
|
11349
11349
|
} catch (ye) {
|
|
11350
11350
|
if (!(ye instanceof dn.Err))
|
|
11351
11351
|
throw ye;
|
|
11352
11352
|
}
|
|
11353
|
-
!G && U !== "der" && (G = A.fromCompact(
|
|
11353
|
+
!G && U !== "der" && (G = A.fromCompact(k));
|
|
11354
11354
|
}
|
|
11355
11355
|
_ = u.fromHex(C);
|
|
11356
11356
|
} catch {
|
|
@@ -11367,7 +11367,7 @@ function S6(e) {
|
|
|
11367
11367
|
getPublicKey: P,
|
|
11368
11368
|
getSharedSecret: $,
|
|
11369
11369
|
sign: I,
|
|
11370
|
-
verify:
|
|
11370
|
+
verify: D,
|
|
11371
11371
|
ProjectivePoint: u,
|
|
11372
11372
|
Signature: A,
|
|
11373
11373
|
utils: w
|
|
@@ -11435,9 +11435,9 @@ function $p(e, t = {}) {
|
|
|
11435
11435
|
throw new Al({ value: e.yParity });
|
|
11436
11436
|
}
|
|
11437
11437
|
function C6(e) {
|
|
11438
|
-
return
|
|
11438
|
+
return Dp(Ut(e));
|
|
11439
11439
|
}
|
|
11440
|
-
function
|
|
11440
|
+
function Dp(e) {
|
|
11441
11441
|
if (e.length !== 130 && e.length !== 132)
|
|
11442
11442
|
throw new M6({ signature: e });
|
|
11443
11443
|
const t = BigInt(Xt(e, 0, 32)), n = BigInt(Xt(e, 32, 64)), r = (() => {
|
|
@@ -11460,17 +11460,17 @@ function kp(e) {
|
|
|
11460
11460
|
}
|
|
11461
11461
|
function $6(e) {
|
|
11462
11462
|
if (!(typeof e.r > "u") && !(typeof e.s > "u"))
|
|
11463
|
-
return
|
|
11463
|
+
return D6(e);
|
|
11464
11464
|
}
|
|
11465
|
-
function
|
|
11466
|
-
const t = typeof e == "string" ?
|
|
11465
|
+
function D6(e) {
|
|
11466
|
+
const t = typeof e == "string" ? Dp(e) : e instanceof Uint8Array ? C6(e) : typeof e.r == "string" ? B6(e) : e.v ? k6(e) : {
|
|
11467
11467
|
r: e.r,
|
|
11468
11468
|
s: e.s,
|
|
11469
11469
|
...typeof e.yParity < "u" ? { yParity: e.yParity } : {}
|
|
11470
11470
|
};
|
|
11471
11471
|
return $p(t), t;
|
|
11472
11472
|
}
|
|
11473
|
-
function
|
|
11473
|
+
function k6(e) {
|
|
11474
11474
|
return {
|
|
11475
11475
|
r: e.r,
|
|
11476
11476
|
s: e.s,
|
|
@@ -11517,7 +11517,7 @@ class M6 extends he {
|
|
|
11517
11517
|
}
|
|
11518
11518
|
class ia extends he {
|
|
11519
11519
|
constructor({ signature: t }) {
|
|
11520
|
-
super(`Signature \`${
|
|
11520
|
+
super(`Signature \`${D0(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`), Object.defineProperty(this, "name", {
|
|
11521
11521
|
enumerable: !0,
|
|
11522
11522
|
configurable: !0,
|
|
11523
11523
|
writable: !0,
|
|
@@ -11578,7 +11578,7 @@ function U6(e) {
|
|
|
11578
11578
|
};
|
|
11579
11579
|
}
|
|
11580
11580
|
const _6 = "0x8010801080108010801080108010801080108010801080108010801080108010", W6 = hp("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");
|
|
11581
|
-
function
|
|
11581
|
+
function kp(e) {
|
|
11582
11582
|
if (typeof e == "string") {
|
|
11583
11583
|
if (Xt(e, -32) !== _6)
|
|
11584
11584
|
throw new G6(e);
|
|
@@ -11586,7 +11586,7 @@ function Dp(e) {
|
|
|
11586
11586
|
$p(e.authorization);
|
|
11587
11587
|
}
|
|
11588
11588
|
function V6(e) {
|
|
11589
|
-
|
|
11589
|
+
kp(e);
|
|
11590
11590
|
const t = F0(Xt(e, -64, -32)), n = Xt(e, -t - 64, -64), r = Xt(e, 0, -t - 64), [o, s, i] = n6(W6, n);
|
|
11591
11591
|
return {
|
|
11592
11592
|
authorization: z6({
|
|
@@ -11603,7 +11603,7 @@ function V6(e) {
|
|
|
11603
11603
|
}
|
|
11604
11604
|
function H6(e) {
|
|
11605
11605
|
try {
|
|
11606
|
-
return
|
|
11606
|
+
return kp(e), !0;
|
|
11607
11607
|
} catch {
|
|
11608
11608
|
return !1;
|
|
11609
11609
|
}
|
|
@@ -11799,15 +11799,15 @@ async function e5(e, t) {
|
|
|
11799
11799
|
throw new Ho();
|
|
11800
11800
|
if (!b)
|
|
11801
11801
|
throw new ri({ data: M });
|
|
11802
|
-
const
|
|
11802
|
+
const D = pr({
|
|
11803
11803
|
abi: x,
|
|
11804
11804
|
args: I,
|
|
11805
11805
|
data: M,
|
|
11806
11806
|
functionName: O
|
|
11807
11807
|
});
|
|
11808
|
-
A.push(o ? { result:
|
|
11809
|
-
} catch (
|
|
11810
|
-
const v = zr(
|
|
11808
|
+
A.push(o ? { result: D, status: "success" } : D);
|
|
11809
|
+
} catch (D) {
|
|
11810
|
+
const v = zr(D, {
|
|
11811
11811
|
abi: x,
|
|
11812
11812
|
address: S,
|
|
11813
11813
|
args: I,
|
|
@@ -12128,12 +12128,12 @@ async function u5(e, t) {
|
|
|
12128
12128
|
}) : void 0, f = i ? await Promise.all(t.calls.map(async (E) => {
|
|
12129
12129
|
if (!E.data && !E.abi)
|
|
12130
12130
|
return;
|
|
12131
|
-
const { accessList:
|
|
12131
|
+
const { accessList: k } = await rp(e, {
|
|
12132
12132
|
account: l.address,
|
|
12133
12133
|
...E,
|
|
12134
12134
|
data: E.abi ? Vt(E) : E.data
|
|
12135
12135
|
});
|
|
12136
|
-
return
|
|
12136
|
+
return k.map(({ address: F, storageKeys: z }) => z.length > 0 ? F : null);
|
|
12137
12137
|
})).then((E) => E.flat().filter(Boolean)) : [], p = await ic(e, {
|
|
12138
12138
|
blockNumber: n,
|
|
12139
12139
|
blockTag: r,
|
|
@@ -12146,7 +12146,7 @@ async function u5(e, t) {
|
|
|
12146
12146
|
},
|
|
12147
12147
|
// Asset pre balances
|
|
12148
12148
|
{
|
|
12149
|
-
calls: f.map((E,
|
|
12149
|
+
calls: f.map((E, k) => ({
|
|
12150
12150
|
abi: [
|
|
12151
12151
|
wr("function balanceOf(address) returns (uint256)")
|
|
12152
12152
|
],
|
|
@@ -12154,7 +12154,7 @@ async function u5(e, t) {
|
|
|
12154
12154
|
args: [l.address],
|
|
12155
12155
|
to: E,
|
|
12156
12156
|
from: qt,
|
|
12157
|
-
nonce:
|
|
12157
|
+
nonce: k
|
|
12158
12158
|
})),
|
|
12159
12159
|
stateOverrides: [
|
|
12160
12160
|
{
|
|
@@ -12178,7 +12178,7 @@ async function u5(e, t) {
|
|
|
12178
12178
|
},
|
|
12179
12179
|
// Asset post balances
|
|
12180
12180
|
{
|
|
12181
|
-
calls: f.map((E,
|
|
12181
|
+
calls: f.map((E, k) => ({
|
|
12182
12182
|
abi: [
|
|
12183
12183
|
wr("function balanceOf(address) returns (uint256)")
|
|
12184
12184
|
],
|
|
@@ -12186,7 +12186,7 @@ async function u5(e, t) {
|
|
|
12186
12186
|
args: [l.address],
|
|
12187
12187
|
to: E,
|
|
12188
12188
|
from: qt,
|
|
12189
|
-
nonce:
|
|
12189
|
+
nonce: k
|
|
12190
12190
|
})),
|
|
12191
12191
|
stateOverrides: [
|
|
12192
12192
|
{
|
|
@@ -12197,14 +12197,14 @@ async function u5(e, t) {
|
|
|
12197
12197
|
},
|
|
12198
12198
|
// Decimals
|
|
12199
12199
|
{
|
|
12200
|
-
calls: f.map((E,
|
|
12200
|
+
calls: f.map((E, k) => ({
|
|
12201
12201
|
to: E,
|
|
12202
12202
|
abi: [
|
|
12203
12203
|
wr("function decimals() returns (uint256)")
|
|
12204
12204
|
],
|
|
12205
12205
|
functionName: "decimals",
|
|
12206
12206
|
from: qt,
|
|
12207
|
-
nonce:
|
|
12207
|
+
nonce: k
|
|
12208
12208
|
})),
|
|
12209
12209
|
stateOverrides: [
|
|
12210
12210
|
{
|
|
@@ -12215,7 +12215,7 @@ async function u5(e, t) {
|
|
|
12215
12215
|
},
|
|
12216
12216
|
// Token URI
|
|
12217
12217
|
{
|
|
12218
|
-
calls: f.map((E,
|
|
12218
|
+
calls: f.map((E, k) => ({
|
|
12219
12219
|
to: E,
|
|
12220
12220
|
abi: [
|
|
12221
12221
|
wr("function tokenURI(uint256) returns (string)")
|
|
@@ -12223,7 +12223,7 @@ async function u5(e, t) {
|
|
|
12223
12223
|
functionName: "tokenURI",
|
|
12224
12224
|
args: [0n],
|
|
12225
12225
|
from: qt,
|
|
12226
|
-
nonce:
|
|
12226
|
+
nonce: k
|
|
12227
12227
|
})),
|
|
12228
12228
|
stateOverrides: [
|
|
12229
12229
|
{
|
|
@@ -12234,12 +12234,12 @@ async function u5(e, t) {
|
|
|
12234
12234
|
},
|
|
12235
12235
|
// Symbols
|
|
12236
12236
|
{
|
|
12237
|
-
calls: f.map((E,
|
|
12237
|
+
calls: f.map((E, k) => ({
|
|
12238
12238
|
to: E,
|
|
12239
12239
|
abi: [wr("function symbol() returns (string)")],
|
|
12240
12240
|
functionName: "symbol",
|
|
12241
12241
|
from: qt,
|
|
12242
|
-
nonce:
|
|
12242
|
+
nonce: k
|
|
12243
12243
|
})),
|
|
12244
12244
|
stateOverrides: [
|
|
12245
12245
|
{
|
|
@@ -12252,12 +12252,12 @@ async function u5(e, t) {
|
|
|
12252
12252
|
],
|
|
12253
12253
|
traceTransfers: c,
|
|
12254
12254
|
validation: a
|
|
12255
|
-
}), d = i ? p[2] : p[0], [h, m, , g, A, w, P, N] = i ? p : [], { calls: $, ...B } = d, M = $.slice(0, -1) ?? [], b = (h == null ? void 0 : h.calls) ?? [], y = (m == null ? void 0 : m.calls) ?? [], x = [...b, ...y].map((E) => E.status === "success" ? nn(E.data) : null), S = (g == null ? void 0 : g.calls) ?? [], O = (A == null ? void 0 : A.calls) ?? [], I = [...S, ...O].map((E) => E.status === "success" ? nn(E.data) : null),
|
|
12256
|
-
for (const [E,
|
|
12255
|
+
}), d = i ? p[2] : p[0], [h, m, , g, A, w, P, N] = i ? p : [], { calls: $, ...B } = d, M = $.slice(0, -1) ?? [], b = (h == null ? void 0 : h.calls) ?? [], y = (m == null ? void 0 : m.calls) ?? [], x = [...b, ...y].map((E) => E.status === "success" ? nn(E.data) : null), S = (g == null ? void 0 : g.calls) ?? [], O = (A == null ? void 0 : A.calls) ?? [], I = [...S, ...O].map((E) => E.status === "success" ? nn(E.data) : null), D = ((w == null ? void 0 : w.calls) ?? []).map((E) => E.status === "success" ? E.result : null), v = ((N == null ? void 0 : N.calls) ?? []).map((E) => E.status === "success" ? E.result : null), R = ((P == null ? void 0 : P.calls) ?? []).map((E) => E.status === "success" ? E.result : null), C = [];
|
|
12256
|
+
for (const [E, k] of I.entries()) {
|
|
12257
12257
|
const F = x[E];
|
|
12258
|
-
if (typeof
|
|
12258
|
+
if (typeof k != "bigint" || typeof F != "bigint")
|
|
12259
12259
|
continue;
|
|
12260
|
-
const z =
|
|
12260
|
+
const z = D[E - 1], U = v[E - 1], H = R[E - 1], ee = E === 0 ? {
|
|
12261
12261
|
address: c5,
|
|
12262
12262
|
decimals: 18,
|
|
12263
12263
|
symbol: "ETH"
|
|
@@ -12270,8 +12270,8 @@ async function u5(e, t) {
|
|
|
12270
12270
|
token: ee,
|
|
12271
12271
|
value: {
|
|
12272
12272
|
pre: F,
|
|
12273
|
-
post:
|
|
12274
|
-
diff:
|
|
12273
|
+
post: k,
|
|
12274
|
+
diff: k - F
|
|
12275
12275
|
}
|
|
12276
12276
|
});
|
|
12277
12277
|
}
|
|
@@ -12610,7 +12610,7 @@ async function x5(e, t) {
|
|
|
12610
12610
|
shouldRetry: ({ error: I }) => I instanceof p0
|
|
12611
12611
|
});
|
|
12612
12612
|
h = !1;
|
|
12613
|
-
const S = x.transactions.find(({ from: I, nonce:
|
|
12613
|
+
const S = x.transactions.find(({ from: I, nonce: D }) => I === p.from && D === p.nonce);
|
|
12614
12614
|
if (!S || (d = await re(e, xs, "getTransactionReceipt")({
|
|
12615
12615
|
hash: S.hash
|
|
12616
12616
|
}), r > 1 && (!d.blockNumber || b - d.blockNumber + 1n < r)))
|
|
@@ -13034,7 +13034,7 @@ function $5(e) {
|
|
|
13034
13034
|
type: "publicClient"
|
|
13035
13035
|
}).extend(C5);
|
|
13036
13036
|
}
|
|
13037
|
-
function
|
|
13037
|
+
function D5({ key: e, methods: t, name: n, request: r, retryCount: o = 3, retryDelay: s = 150, timeout: i, type: c }, a) {
|
|
13038
13038
|
const l = J0();
|
|
13039
13039
|
return {
|
|
13040
13040
|
config: {
|
|
@@ -13051,7 +13051,7 @@ function k5({ key: e, methods: t, name: n, request: r, retryCount: o = 3, retryD
|
|
|
13051
13051
|
value: a
|
|
13052
13052
|
};
|
|
13053
13053
|
}
|
|
13054
|
-
class
|
|
13054
|
+
class k5 extends W {
|
|
13055
13055
|
constructor() {
|
|
13056
13056
|
super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.", {
|
|
13057
13057
|
docsPath: "/docs/clients/intro",
|
|
@@ -13064,7 +13064,7 @@ function B5(e, t = {}) {
|
|
|
13064
13064
|
return ({ chain: p, retryCount: d, timeout: h }) => {
|
|
13065
13065
|
const { batchSize: m = 1e3, wait: g = 0 } = typeof n == "object" ? n : {}, A = t.retryCount ?? d, w = h ?? t.timeout ?? 1e4, P = e || (p == null ? void 0 : p.rpcUrls.default.http[0]);
|
|
13066
13066
|
if (!P)
|
|
13067
|
-
throw new
|
|
13067
|
+
throw new k5();
|
|
13068
13068
|
const N = gw(P, {
|
|
13069
13069
|
fetchFn: r,
|
|
13070
13070
|
fetchOptions: o,
|
|
@@ -13072,7 +13072,7 @@ function B5(e, t = {}) {
|
|
|
13072
13072
|
onResponse: l,
|
|
13073
13073
|
timeout: w
|
|
13074
13074
|
});
|
|
13075
|
-
return
|
|
13075
|
+
return D5({
|
|
13076
13076
|
key: s,
|
|
13077
13077
|
methods: i,
|
|
13078
13078
|
name: c,
|
|
@@ -13832,12 +13832,12 @@ function hr() {
|
|
|
13832
13832
|
let [e] = ie(mt);
|
|
13833
13833
|
return Te(() => () => e.dispose(), [e]), e;
|
|
13834
13834
|
}
|
|
13835
|
-
let
|
|
13835
|
+
let De = (e, t) => {
|
|
13836
13836
|
Jt.isServer ? Te(e, t) : Zs(e, t);
|
|
13837
13837
|
};
|
|
13838
13838
|
function mr(e) {
|
|
13839
13839
|
let t = de(e);
|
|
13840
|
-
return
|
|
13840
|
+
return De(() => {
|
|
13841
13841
|
t.current = e;
|
|
13842
13842
|
}, [e]), t;
|
|
13843
13843
|
}
|
|
@@ -13889,7 +13889,7 @@ function Rt(e, t, ...n) {
|
|
|
13889
13889
|
let r = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((o) => `"${o}"`).join(", ")}.`);
|
|
13890
13890
|
throw Error.captureStackTrace && Error.captureStackTrace(r, Rt), r;
|
|
13891
13891
|
}
|
|
13892
|
-
var zs = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(zs || {}),
|
|
13892
|
+
var zs = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(zs || {}), Dn = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Dn || {});
|
|
13893
13893
|
function bt() {
|
|
13894
13894
|
let e = Ax();
|
|
13895
13895
|
return te((t) => Tx({ mergeRefs: e, ...t }), [e]);
|
|
@@ -14019,7 +14019,7 @@ function oh(e, t) {
|
|
|
14019
14019
|
}
|
|
14020
14020
|
function sh(e, t, n) {
|
|
14021
14021
|
if (Array.isArray(n)) for (let [r, o] of n.entries()) sh(e, oh(t, r.toString()), o);
|
|
14022
|
-
else n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) :
|
|
14022
|
+
else n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) : Dx(n) && !Uc(n) && rh(n, t, e);
|
|
14023
14023
|
}
|
|
14024
14024
|
function $x(e) {
|
|
14025
14025
|
var t, n;
|
|
@@ -14032,17 +14032,17 @@ function $x(e) {
|
|
|
14032
14032
|
(n = r.requestSubmit) == null || n.call(r);
|
|
14033
14033
|
}
|
|
14034
14034
|
}
|
|
14035
|
-
function
|
|
14035
|
+
function Dx(e) {
|
|
14036
14036
|
if (Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
14037
14037
|
let t = Object.getPrototypeOf(e);
|
|
14038
14038
|
return t === null || Object.getPrototypeOf(t) === null;
|
|
14039
14039
|
}
|
|
14040
|
-
let
|
|
14041
|
-
var
|
|
14040
|
+
let kx = "span";
|
|
14041
|
+
var Dl = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Dl || {});
|
|
14042
14042
|
function Bx(e, t) {
|
|
14043
14043
|
var n;
|
|
14044
14044
|
let { features: r = 1, ...o } = e, s = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = o["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
|
|
14045
|
-
return bt()({ ourProps: s, theirProps: o, slot: {}, defaultTag:
|
|
14045
|
+
return bt()({ ourProps: s, theirProps: o, slot: {}, defaultTag: kx, name: "Hidden" });
|
|
14046
14046
|
}
|
|
14047
14047
|
let ih = ut(Bx), Mx = He(null);
|
|
14048
14048
|
function Lx({ children: e }) {
|
|
@@ -14055,7 +14055,7 @@ function Fx({ data: e, form: t, disabled: n, onReset: r, overrides: o }) {
|
|
|
14055
14055
|
let [s, i] = ie(null), c = hr();
|
|
14056
14056
|
return Te(() => {
|
|
14057
14057
|
if (r && s) return c.addEventListener(s, "reset", r);
|
|
14058
|
-
}, [s, t, r]), Z.createElement(Lx, null, Z.createElement(jx, { setForm: i, formId: t }), rh(e).map(([a, l]) => Z.createElement(ih, { features:
|
|
14058
|
+
}, [s, t, r]), Z.createElement(Lx, null, Z.createElement(jx, { setForm: i, formId: t }), rh(e).map(([a, l]) => Z.createElement(ih, { features: Dl.Hidden, ...$n({ key: a, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: n, name: a, value: l, ...o }) })));
|
|
14059
14059
|
}
|
|
14060
14060
|
function jx({ setForm: e, formId: t }) {
|
|
14061
14061
|
return Te(() => {
|
|
@@ -14063,7 +14063,7 @@ function jx({ setForm: e, formId: t }) {
|
|
|
14063
14063
|
let n = document.getElementById(t);
|
|
14064
14064
|
n && e(n);
|
|
14065
14065
|
}
|
|
14066
|
-
}, [e, t]), t ? null : Z.createElement(ih, { features:
|
|
14066
|
+
}, [e, t]), t ? null : Z.createElement(ih, { features: Dl.Hidden, as: "input", type: "hidden", hidden: !0, readOnly: !0, ref: (n) => {
|
|
14067
14067
|
if (!n) return;
|
|
14068
14068
|
let r = n.closest("form");
|
|
14069
14069
|
r && e(r);
|
|
@@ -14135,10 +14135,10 @@ function It(...e) {
|
|
|
14135
14135
|
});
|
|
14136
14136
|
return e.every((r) => r == null || (r == null ? void 0 : r[fh])) ? void 0 : n;
|
|
14137
14137
|
}
|
|
14138
|
-
let
|
|
14139
|
-
|
|
14138
|
+
let kl = He(null);
|
|
14139
|
+
kl.displayName = "DescriptionContext";
|
|
14140
14140
|
function dh() {
|
|
14141
|
-
let e = Ne(
|
|
14141
|
+
let e = Ne(kl);
|
|
14142
14142
|
if (e === null) {
|
|
14143
14143
|
let t = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
|
|
14144
14144
|
throw Error.captureStackTrace && Error.captureStackTrace(t, dh), t;
|
|
@@ -14147,12 +14147,12 @@ function dh() {
|
|
|
14147
14147
|
}
|
|
14148
14148
|
function qx() {
|
|
14149
14149
|
var e, t;
|
|
14150
|
-
return (t = (e = Ne(
|
|
14150
|
+
return (t = (e = Ne(kl)) == null ? void 0 : e.value) != null ? t : void 0;
|
|
14151
14151
|
}
|
|
14152
14152
|
let Kx = "p";
|
|
14153
14153
|
function Zx(e, t) {
|
|
14154
14154
|
let n = ur(), r = $l(), { id: o = `headlessui-description-${n}`, ...s } = e, i = dh(), c = It(t);
|
|
14155
|
-
|
|
14155
|
+
De(() => i.register(o), [o, i.register]);
|
|
14156
14156
|
let a = Wn({ ...i.slot, disabled: r || !1 }), l = { ref: c, ...i.props, id: o };
|
|
14157
14157
|
return bt()({ ourProps: l, theirProps: s, slot: a, defaultTag: Kx, name: i.name || "Description" });
|
|
14158
14158
|
}
|
|
@@ -14188,7 +14188,7 @@ let Jx = "label";
|
|
|
14188
14188
|
function Qx(e, t) {
|
|
14189
14189
|
var n;
|
|
14190
14190
|
let r = ur(), o = ph(), s = ah(), i = $l(), { id: c = `headlessui-label-${r}`, htmlFor: a = s ?? ((n = o.props) == null ? void 0 : n.htmlFor), passive: l = !1, ...u } = e, f = It(t);
|
|
14191
|
-
|
|
14191
|
+
De(() => o.register(c), [c, o.register]);
|
|
14192
14192
|
let p = ve((m) => {
|
|
14193
14193
|
let g = m.currentTarget;
|
|
14194
14194
|
if (!(m.target !== m.currentTarget && Vx(m.target)) && (ff(g) && m.preventDefault(), o.props && "onClick" in o.props && typeof o.props.onClick == "function" && o.props.onClick(m), ff(g))) {
|
|
@@ -14224,7 +14224,7 @@ function pf(e) {
|
|
|
14224
14224
|
}
|
|
14225
14225
|
function o2(e, t, n = !1) {
|
|
14226
14226
|
let [r, o] = ie(() => pf(t));
|
|
14227
|
-
return
|
|
14227
|
+
return De(() => {
|
|
14228
14228
|
if (!t || !e) return;
|
|
14229
14229
|
let s = mt();
|
|
14230
14230
|
return s.requestAnimationFrame(function i() {
|
|
@@ -14479,7 +14479,7 @@ function b2(e) {
|
|
|
14479
14479
|
}
|
|
14480
14480
|
function Eh(e, t) {
|
|
14481
14481
|
let n = ur(), r = Bl.get(t), [o, s] = nt(r, te((i) => [r.selectors.isTop(i, n), r.selectors.inStack(i, n)], [r, n]));
|
|
14482
|
-
return
|
|
14482
|
+
return De(() => {
|
|
14483
14483
|
if (e) return r.actions.push(n), () => r.actions.pop(n);
|
|
14484
14484
|
}, [r, e, n]), e ? s ? o : !0 : !1;
|
|
14485
14485
|
}
|
|
@@ -14498,7 +14498,7 @@ function wf(e) {
|
|
|
14498
14498
|
}
|
|
14499
14499
|
function g2(e, { allowed: t, disallowed: n } = {}) {
|
|
14500
14500
|
let r = Eh(e, "inert-others");
|
|
14501
|
-
|
|
14501
|
+
De(() => {
|
|
14502
14502
|
var o, s;
|
|
14503
14503
|
if (!r) return;
|
|
14504
14504
|
let i = mt();
|
|
@@ -14670,7 +14670,7 @@ function vc(...e) {
|
|
|
14670
14670
|
}
|
|
14671
14671
|
var C2 = ((e) => (e[e.Ignore = 0] = "Ignore", e[e.Select = 1] = "Select", e[e.Close = 2] = "Close", e))(C2 || {});
|
|
14672
14672
|
const bs = { Ignore: { kind: 0 }, Select: (e) => ({ kind: 1, target: e }), Close: { kind: 2 } }, $2 = 200, Pf = 5;
|
|
14673
|
-
function
|
|
14673
|
+
function D2(e, { trigger: t, action: n, close: r, select: o }) {
|
|
14674
14674
|
let s = de(null), i = de(null), c = de(null);
|
|
14675
14675
|
Nr(e && t !== null, "pointerdown", (a) => {
|
|
14676
14676
|
ch(a == null ? void 0 : a.target) && t != null && t.contains(a.target) && (i.current = a.x, c.current = a.y, s.current = a.timeStamp);
|
|
@@ -14693,7 +14693,7 @@ function k2(e, { trigger: t, action: n, close: r, select: o }) {
|
|
|
14693
14693
|
}
|
|
14694
14694
|
}, { capture: !0 });
|
|
14695
14695
|
}
|
|
14696
|
-
function
|
|
14696
|
+
function k2(e, t) {
|
|
14697
14697
|
return J(() => {
|
|
14698
14698
|
var n;
|
|
14699
14699
|
if (e.type) return e.type;
|
|
@@ -14809,7 +14809,7 @@ Jn.subscribe(() => {
|
|
|
14809
14809
|
});
|
|
14810
14810
|
function z2(e, t, n = () => ({ containers: [] })) {
|
|
14811
14811
|
let r = B2(Jn), o = t ? r.get(t) : void 0, s = o ? o.count > 0 : !1;
|
|
14812
|
-
return
|
|
14812
|
+
return De(() => {
|
|
14813
14813
|
if (!(!t || !e)) return Jn.dispatch("PUSH", t, n), () => Jn.dispatch("POP", t, n);
|
|
14814
14814
|
}, [e, t]), s;
|
|
14815
14815
|
}
|
|
@@ -14849,7 +14849,7 @@ function Nh(e) {
|
|
|
14849
14849
|
}
|
|
14850
14850
|
function Rh(e, t, n, r) {
|
|
14851
14851
|
let [o, s] = ie(n), { hasFlag: i, addFlag: c, removeFlag: a } = W2(e && o ? 3 : 0), l = de(!1), u = de(!1), f = hr();
|
|
14852
|
-
return
|
|
14852
|
+
return De(() => {
|
|
14853
14853
|
var p;
|
|
14854
14854
|
if (e) {
|
|
14855
14855
|
if (n && s(!0), !t) {
|
|
@@ -15179,15 +15179,15 @@ var mE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
15179
15179
|
}
|
|
15180
15180
|
}
|
|
15181
15181
|
return o;
|
|
15182
|
-
}, kh = function(t) {
|
|
15183
|
-
return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
|
|
15184
15182
|
}, Dh = function(t) {
|
|
15183
|
+
return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
|
|
15184
|
+
}, kh = function(t) {
|
|
15185
15185
|
if (!t)
|
|
15186
15186
|
throw new Error("No node provided");
|
|
15187
|
-
return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || bE(t)) && !
|
|
15187
|
+
return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || bE(t)) && !Dh(t) ? 0 : t.tabIndex;
|
|
15188
15188
|
}, yE = function(t, n) {
|
|
15189
|
-
var r =
|
|
15190
|
-
return r < 0 && n && !
|
|
15189
|
+
var r = kh(t);
|
|
15190
|
+
return r < 0 && n && !Dh(t) ? 0 : r;
|
|
15191
15191
|
}, vE = function(t, n) {
|
|
15192
15192
|
return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
|
|
15193
15193
|
}, Bh = function(t) {
|
|
@@ -15299,7 +15299,7 @@ var mE = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
15299
15299
|
_o(n) || wE(n) || NE(n, t) || // For a details element with a summary, the summary element gets the focus
|
|
15300
15300
|
xE(n) || RE(n));
|
|
15301
15301
|
}, Cf = function(t, n) {
|
|
15302
|
-
return !(TE(n) ||
|
|
15302
|
+
return !(TE(n) || kh(n) < 0 || !OE(t, n));
|
|
15303
15303
|
}, IE = function(t) {
|
|
15304
15304
|
var n = parseInt(t.getAttribute("tabindex"), 10);
|
|
15305
15305
|
return !!(isNaN(n) || n >= 0);
|
|
@@ -15505,12 +15505,12 @@ const $E = (e) => ({
|
|
|
15505
15505
|
}, d = zl(o), h = jl(d), m = await i.getDimensions(l), g = d === "y", A = g ? "top" : "left", w = g ? "bottom" : "right", P = g ? "clientHeight" : "clientWidth", N = s.reference[h] + s.reference[d] - p[d] - s.floating[h], $ = p[d] - s.reference[d], B = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
15506
15506
|
let M = B ? B[P] : 0;
|
|
15507
15507
|
(!M || !await (i.isElement == null ? void 0 : i.isElement(B))) && (M = c.floating[P] || s.floating[h]);
|
|
15508
|
-
const b = N / 2 - $ / 2, y = M / 2 - m[h] / 2 - 1, x = Sn(f[A], y), S = Sn(f[w], y), O = x, I = M - m[h] - S,
|
|
15508
|
+
const b = N / 2 - $ / 2, y = M / 2 - m[h] / 2 - 1, x = Sn(f[A], y), S = Sn(f[w], y), O = x, I = M - m[h] - S, D = M / 2 - m[h] / 2 + b, v = Ec(O, D, I), R = !a.arrow && Zr(o) != null && D !== v && s.reference[h] / 2 - (D < O ? x : S) - m[h] / 2 < 0, C = R ? D < O ? D - O : D - I : 0;
|
|
15509
15509
|
return {
|
|
15510
15510
|
[d]: p[d] + C,
|
|
15511
15511
|
data: {
|
|
15512
15512
|
[d]: v,
|
|
15513
|
-
centerOffset:
|
|
15513
|
+
centerOffset: D - v - C,
|
|
15514
15514
|
...R && {
|
|
15515
15515
|
alignmentOffset: C
|
|
15516
15516
|
}
|
|
@@ -15518,7 +15518,7 @@ const $E = (e) => ({
|
|
|
15518
15518
|
reset: R
|
|
15519
15519
|
};
|
|
15520
15520
|
}
|
|
15521
|
-
}),
|
|
15521
|
+
}), DE = function(e) {
|
|
15522
15522
|
return e === void 0 && (e = {}), {
|
|
15523
15523
|
name: "flip",
|
|
15524
15524
|
options: e,
|
|
@@ -15547,21 +15547,21 @@ const $E = (e) => ({
|
|
|
15547
15547
|
const M = [c, ...$], b = await Ai(t, g), y = [];
|
|
15548
15548
|
let x = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
15549
15549
|
if (u && y.push(b[A]), f) {
|
|
15550
|
-
const
|
|
15551
|
-
y.push(b[
|
|
15550
|
+
const D = cE(o, i, N);
|
|
15551
|
+
y.push(b[D[0]], b[D[1]]);
|
|
15552
15552
|
}
|
|
15553
15553
|
if (x = [...x, {
|
|
15554
15554
|
placement: o,
|
|
15555
15555
|
overflows: y
|
|
15556
|
-
}], !y.every((
|
|
15556
|
+
}], !y.every((D) => D <= 0)) {
|
|
15557
15557
|
var S, O;
|
|
15558
|
-
const
|
|
15558
|
+
const D = (((S = s.flip) == null ? void 0 : S.index) || 0) + 1, v = M[D];
|
|
15559
15559
|
if (v && (!(f === "alignment" ? w !== mn(v) : !1) || // We leave the current main axis only if every placement on that axis
|
|
15560
15560
|
// overflows the main axis.
|
|
15561
15561
|
x.every((E) => mn(E.placement) === w ? E.overflows[0] > 0 : !0)))
|
|
15562
15562
|
return {
|
|
15563
15563
|
data: {
|
|
15564
|
-
index:
|
|
15564
|
+
index: D,
|
|
15565
15565
|
overflows: x
|
|
15566
15566
|
},
|
|
15567
15567
|
reset: {
|
|
@@ -15575,13 +15575,13 @@ const $E = (e) => ({
|
|
|
15575
15575
|
var I;
|
|
15576
15576
|
const C = (I = x.filter((E) => {
|
|
15577
15577
|
if (B) {
|
|
15578
|
-
const
|
|
15579
|
-
return
|
|
15578
|
+
const k = mn(E.placement);
|
|
15579
|
+
return k === w || // Create a bias to the `y` side axis due to horizontal
|
|
15580
15580
|
// reading directions favoring greater width.
|
|
15581
|
-
|
|
15581
|
+
k === "y";
|
|
15582
15582
|
}
|
|
15583
15583
|
return !0;
|
|
15584
|
-
}).map((E) => [E.placement, E.overflows.filter((
|
|
15584
|
+
}).map((E) => [E.placement, E.overflows.filter((k) => k > 0).reduce((k, F) => k + F, 0)]).sort((E, k) => E[1] - k[1])[0]) == null ? void 0 : I[0];
|
|
15585
15585
|
C && (R = C);
|
|
15586
15586
|
break;
|
|
15587
15587
|
}
|
|
@@ -15599,13 +15599,13 @@ const $E = (e) => ({
|
|
|
15599
15599
|
return {};
|
|
15600
15600
|
}
|
|
15601
15601
|
};
|
|
15602
|
-
},
|
|
15602
|
+
}, kE = /* @__PURE__ */ new Set(["left", "top"]);
|
|
15603
15603
|
async function BE(e, t) {
|
|
15604
15604
|
const {
|
|
15605
15605
|
placement: n,
|
|
15606
15606
|
platform: r,
|
|
15607
15607
|
elements: o
|
|
15608
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Vn(n), c = Zr(n), a = mn(n) === "y", l =
|
|
15608
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Vn(n), c = Zr(n), a = mn(n) === "y", l = kE.has(i) ? -1 : 1, u = s && a ? -1 : 1, f = br(t, e);
|
|
15609
15609
|
let {
|
|
15610
15610
|
mainAxis: p,
|
|
15611
15611
|
crossAxis: d,
|
|
@@ -15759,7 +15759,7 @@ function Fh(e) {
|
|
|
15759
15759
|
function Ul(e) {
|
|
15760
15760
|
return Ee(e) ? e : e.contextElement;
|
|
15761
15761
|
}
|
|
15762
|
-
function
|
|
15762
|
+
function kr(e) {
|
|
15763
15763
|
const t = Ul(e);
|
|
15764
15764
|
if (!Je(t))
|
|
15765
15765
|
return Qt(1);
|
|
@@ -15789,14 +15789,14 @@ function cr(e, t, n, r) {
|
|
|
15789
15789
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
15790
15790
|
const o = e.getBoundingClientRect(), s = Ul(e);
|
|
15791
15791
|
let i = Qt(1);
|
|
15792
|
-
t && (r ? Ee(r) && (i =
|
|
15792
|
+
t && (r ? Ee(r) && (i = kr(r)) : i = kr(e));
|
|
15793
15793
|
const c = zE(s, n, r) ? jh(s) : Qt(0);
|
|
15794
15794
|
let a = (o.left + c.x) / i.x, l = (o.top + c.y) / i.y, u = o.width / i.x, f = o.height / i.y;
|
|
15795
15795
|
if (s) {
|
|
15796
15796
|
const p = st(s), d = r && Ee(r) ? st(r) : r;
|
|
15797
15797
|
let h = p, m = xc(h);
|
|
15798
15798
|
for (; m && r && d !== h; ) {
|
|
15799
|
-
const g =
|
|
15799
|
+
const g = kr(m), A = m.getBoundingClientRect(), w = Ot(m), P = A.left + (m.clientLeft + parseFloat(w.paddingLeft)) * g.x, N = A.top + (m.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
15800
15800
|
a *= g.x, l *= g.y, u *= g.x, f *= g.y, a += P, l += N, h = st(m), m = xc(h);
|
|
15801
15801
|
}
|
|
15802
15802
|
}
|
|
@@ -15835,7 +15835,7 @@ function UE(e) {
|
|
|
15835
15835
|
const u = Qt(0), f = Je(r);
|
|
15836
15836
|
if ((f || !f && !s) && ((Kr(r) !== "body" || os(i)) && (a = Ti(r)), Je(r))) {
|
|
15837
15837
|
const d = cr(r);
|
|
15838
|
-
l =
|
|
15838
|
+
l = kr(r), u.x = d.x + r.clientLeft, u.y = d.y + r.clientTop;
|
|
15839
15839
|
}
|
|
15840
15840
|
const p = i && !f && !s ? zh(i, a) : Qt(0);
|
|
15841
15841
|
return {
|
|
@@ -15859,7 +15859,7 @@ function WE(e) {
|
|
|
15859
15859
|
y: c
|
|
15860
15860
|
};
|
|
15861
15861
|
}
|
|
15862
|
-
const
|
|
15862
|
+
const Df = 25;
|
|
15863
15863
|
function VE(e, t) {
|
|
15864
15864
|
const n = st(e), r = an(e), o = n.visualViewport;
|
|
15865
15865
|
let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
|
|
@@ -15871,8 +15871,8 @@ function VE(e, t) {
|
|
|
15871
15871
|
const l = Ni(r);
|
|
15872
15872
|
if (l <= 0) {
|
|
15873
15873
|
const u = r.ownerDocument, f = u.body, p = getComputedStyle(f), d = u.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(r.clientWidth - f.clientWidth - d);
|
|
15874
|
-
h <=
|
|
15875
|
-
} else l <=
|
|
15874
|
+
h <= Df && (s -= h);
|
|
15875
|
+
} else l <= Df && (s += l);
|
|
15876
15876
|
return {
|
|
15877
15877
|
width: s,
|
|
15878
15878
|
height: i,
|
|
@@ -15882,7 +15882,7 @@ function VE(e, t) {
|
|
|
15882
15882
|
}
|
|
15883
15883
|
const HE = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
15884
15884
|
function GE(e, t) {
|
|
15885
|
-
const n = cr(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Je(e) ?
|
|
15885
|
+
const n = cr(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Je(e) ? kr(e) : Qt(1), i = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, l = r * s.y;
|
|
15886
15886
|
return {
|
|
15887
15887
|
width: i,
|
|
15888
15888
|
height: c,
|
|
@@ -15890,7 +15890,7 @@ function GE(e, t) {
|
|
|
15890
15890
|
y: l
|
|
15891
15891
|
};
|
|
15892
15892
|
}
|
|
15893
|
-
function
|
|
15893
|
+
function kf(e, t, n) {
|
|
15894
15894
|
let r;
|
|
15895
15895
|
if (t === "viewport")
|
|
15896
15896
|
r = VE(e, n);
|
|
@@ -15934,9 +15934,9 @@ function KE(e) {
|
|
|
15934
15934
|
strategy: o
|
|
15935
15935
|
} = e;
|
|
15936
15936
|
const i = [...n === "clippingAncestors" ? Pi(t) ? [] : qE(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((l, u) => {
|
|
15937
|
-
const f =
|
|
15937
|
+
const f = kf(t, u, o);
|
|
15938
15938
|
return l.top = Ge(f.top, l.top), l.right = Sn(f.right, l.right), l.bottom = Sn(f.bottom, l.bottom), l.left = Ge(f.left, l.left), l;
|
|
15939
|
-
},
|
|
15939
|
+
}, kf(t, c, o));
|
|
15940
15940
|
return {
|
|
15941
15941
|
width: a.right - a.left,
|
|
15942
15942
|
height: a.bottom - a.top,
|
|
@@ -16030,7 +16030,7 @@ const QE = {
|
|
|
16030
16030
|
getElementRects: XE,
|
|
16031
16031
|
getClientRects: _E,
|
|
16032
16032
|
getDimensions: ZE,
|
|
16033
|
-
getScale:
|
|
16033
|
+
getScale: kr,
|
|
16034
16034
|
isElement: Ee,
|
|
16035
16035
|
isRTL: JE
|
|
16036
16036
|
};
|
|
@@ -16119,7 +16119,7 @@ function Vh(e, t, n, r) {
|
|
|
16119
16119
|
}), f == null || f(), (A = d) == null || A.disconnect(), d = null, a && cancelAnimationFrame(h);
|
|
16120
16120
|
};
|
|
16121
16121
|
}
|
|
16122
|
-
const ba = Ai, t8 = ME, n8 = LE, r8 =
|
|
16122
|
+
const ba = Ai, t8 = ME, n8 = LE, r8 = DE, o8 = FE, Mf = $E, s8 = (e, t, n) => {
|
|
16123
16123
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
16124
16124
|
platform: QE,
|
|
16125
16125
|
...n
|
|
@@ -16212,16 +16212,16 @@ function Gh(e) {
|
|
|
16212
16212
|
strategy: n,
|
|
16213
16213
|
middleware: p
|
|
16214
16214
|
};
|
|
16215
|
-
S.current && (E.platform = S.current), s8(B.current, M.current, E).then((
|
|
16215
|
+
S.current && (E.platform = S.current), s8(B.current, M.current, E).then((k) => {
|
|
16216
16216
|
const F = {
|
|
16217
|
-
...
|
|
16217
|
+
...k,
|
|
16218
16218
|
// The floating element's position may be recomputed while it's closed
|
|
16219
16219
|
// but still mounted (such as when transitioning out). To ensure
|
|
16220
16220
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
16221
16221
|
// setting it to `true` when `open === false` (must be specified).
|
|
16222
16222
|
isPositioned: O.current !== !1
|
|
16223
16223
|
};
|
|
16224
|
-
|
|
16224
|
+
D.current && !Vs(b.current, F) && (b.current = F, po.flushSync(() => {
|
|
16225
16225
|
f(F);
|
|
16226
16226
|
}));
|
|
16227
16227
|
});
|
|
@@ -16232,9 +16232,9 @@ function Gh(e) {
|
|
|
16232
16232
|
isPositioned: !1
|
|
16233
16233
|
})));
|
|
16234
16234
|
}, [l]);
|
|
16235
|
-
const
|
|
16236
|
-
Es(() => (
|
|
16237
|
-
|
|
16235
|
+
const D = j.useRef(!1);
|
|
16236
|
+
Es(() => (D.current = !0, () => {
|
|
16237
|
+
D.current = !1;
|
|
16238
16238
|
}), []), Es(() => {
|
|
16239
16239
|
if (N && (B.current = N), $ && (M.current = $), N && $) {
|
|
16240
16240
|
if (x.current)
|
|
@@ -16258,16 +16258,16 @@ function Gh(e) {
|
|
|
16258
16258
|
};
|
|
16259
16259
|
if (!R.floating)
|
|
16260
16260
|
return E;
|
|
16261
|
-
const
|
|
16261
|
+
const k = Lf(R.floating, u.x), F = Lf(R.floating, u.y);
|
|
16262
16262
|
return c ? {
|
|
16263
16263
|
...E,
|
|
16264
|
-
transform: "translate(" +
|
|
16264
|
+
transform: "translate(" + k + "px, " + F + "px)",
|
|
16265
16265
|
...Hh(R.floating) >= 1.5 && {
|
|
16266
16266
|
willChange: "transform"
|
|
16267
16267
|
}
|
|
16268
16268
|
} : {
|
|
16269
16269
|
position: n,
|
|
16270
|
-
left:
|
|
16270
|
+
left: k,
|
|
16271
16271
|
top: F
|
|
16272
16272
|
};
|
|
16273
16273
|
}, [n, c, R.floating, u.x, u.y]);
|
|
@@ -16665,17 +16665,17 @@ function C8() {
|
|
|
16665
16665
|
function $8() {
|
|
16666
16666
|
return Ne(Yr).getReferenceProps;
|
|
16667
16667
|
}
|
|
16668
|
-
function
|
|
16668
|
+
function D8() {
|
|
16669
16669
|
let { getFloatingProps: e, slot: t } = Ne(Yr);
|
|
16670
16670
|
return te((...n) => Object.assign({}, e(...n), { "data-anchor": t.anchor }), [e, t]);
|
|
16671
16671
|
}
|
|
16672
|
-
function
|
|
16672
|
+
function k8(e = null) {
|
|
16673
16673
|
e === !1 && (e = null), typeof e == "string" && (e = { to: e });
|
|
16674
16674
|
let t = Ne(Wl), n = J(() => e, [JSON.stringify(e, (o, s) => {
|
|
16675
16675
|
var i;
|
|
16676
16676
|
return (i = s == null ? void 0 : s.outerHTML) != null ? i : s;
|
|
16677
16677
|
})]);
|
|
16678
|
-
|
|
16678
|
+
De(() => {
|
|
16679
16679
|
t == null || t(n ?? null);
|
|
16680
16680
|
}, [t, n]);
|
|
16681
16681
|
let r = Ne(Yr);
|
|
@@ -16686,26 +16686,26 @@ function B8({ children: e, enabled: t = !0 }) {
|
|
|
16686
16686
|
let [n, r] = ie(null), [o, s] = ie(0), i = de(null), [c, a] = ie(null);
|
|
16687
16687
|
M8(c);
|
|
16688
16688
|
let l = t && n !== null && c !== null, { to: u = "bottom", gap: f = 0, offset: p = 0, padding: d = 0, inner: h } = L8(n, c), [m, g = "center"] = u.split(" ");
|
|
16689
|
-
|
|
16689
|
+
De(() => {
|
|
16690
16690
|
l && s(0);
|
|
16691
16691
|
}, [l]);
|
|
16692
16692
|
let { refs: A, floatingStyles: w, context: P } = A8({ open: l, placement: m === "selection" ? g === "center" ? "bottom" : `bottom-${g}` : g === "center" ? `${m}` : `${m}-${g}`, strategy: "absolute", transform: !1, middleware: [_l({ mainAxis: m === "selection" ? 0 : f, crossAxis: p }), qh({ padding: d }), m !== "selection" && Kh({ padding: d }), m === "selection" && h ? R8({ ...h, padding: d, overflowRef: i, offset: o, minItemsVisible: Wf, referenceOverflowThreshold: d, onFallbackChange(S) {
|
|
16693
16693
|
var O, I;
|
|
16694
16694
|
if (!S) return;
|
|
16695
|
-
let
|
|
16696
|
-
if (!
|
|
16697
|
-
let v = parseFloat(getComputedStyle(
|
|
16698
|
-
for (let
|
|
16699
|
-
let F =
|
|
16695
|
+
let D = P.elements.floating;
|
|
16696
|
+
if (!D) return;
|
|
16697
|
+
let v = parseFloat(getComputedStyle(D).scrollPaddingBottom) || 0, R = Math.min(Wf, D.childElementCount), C = 0, E = 0;
|
|
16698
|
+
for (let k of (I = (O = P.elements.floating) == null ? void 0 : O.childNodes) != null ? I : []) if (Nn(k)) {
|
|
16699
|
+
let F = k.offsetTop, z = F + k.clientHeight + v, U = D.scrollTop, H = U + D.clientHeight;
|
|
16700
16700
|
if (F >= U && z <= H) R--;
|
|
16701
16701
|
else {
|
|
16702
|
-
E = Math.max(0, Math.min(z, H) - Math.max(F, U)), C =
|
|
16702
|
+
E = Math.max(0, Math.min(z, H) - Math.max(F, U)), C = k.clientHeight;
|
|
16703
16703
|
break;
|
|
16704
16704
|
}
|
|
16705
16705
|
}
|
|
16706
|
-
R >= 1 && s((
|
|
16706
|
+
R >= 1 && s((k) => {
|
|
16707
16707
|
let F = C * R - E + v;
|
|
16708
|
-
return
|
|
16708
|
+
return k >= F ? k : F;
|
|
16709
16709
|
});
|
|
16710
16710
|
} }) : null, l8({ padding: d, apply({ availableWidth: S, availableHeight: O, elements: I }) {
|
|
16711
16711
|
Object.assign(I.floating.style, { overflow: "auto", maxWidth: `${S}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${O}px)` });
|
|
@@ -16717,7 +16717,7 @@ function B8({ children: e, enabled: t = !0 }) {
|
|
|
16717
16717
|
return j.createElement(Wl.Provider, { value: r }, j.createElement(Yr.Provider, { value: { setFloating: x, setReference: A.setReference, styles: w, getReferenceProps: b, getFloatingProps: y, slot: B } }, e));
|
|
16718
16718
|
}
|
|
16719
16719
|
function M8(e) {
|
|
16720
|
-
|
|
16720
|
+
De(() => {
|
|
16721
16721
|
if (!e) return;
|
|
16722
16722
|
let t = new MutationObserver(() => {
|
|
16723
16723
|
let n = window.getComputedStyle(e).maxHeight, r = parseFloat(n);
|
|
@@ -16766,7 +16766,7 @@ function va(e, t, n = void 0) {
|
|
|
16766
16766
|
}
|
|
16767
16767
|
return [n, null];
|
|
16768
16768
|
}), s = J(() => o(e, t)[0], [e, t]), [i = s, c] = ie();
|
|
16769
|
-
return
|
|
16769
|
+
return De(() => {
|
|
16770
16770
|
let [a, l] = o(e, t);
|
|
16771
16771
|
if (c(a), !!l) return l(c);
|
|
16772
16772
|
}, [e, t]), i;
|
|
@@ -16919,7 +16919,7 @@ function om() {
|
|
|
16919
16919
|
}
|
|
16920
16920
|
function Q8() {
|
|
16921
16921
|
let e = de(!1);
|
|
16922
|
-
return
|
|
16922
|
+
return De(() => (e.current = !0, () => {
|
|
16923
16923
|
e.current = !1;
|
|
16924
16924
|
}), []), e;
|
|
16925
16925
|
}
|
|
@@ -16946,11 +16946,11 @@ function Ii(e) {
|
|
|
16946
16946
|
return "children" in e ? Ii(e.children) : e.current.filter(({ el: t }) => t.current !== null).filter(({ state: t }) => t === "visible").length > 0;
|
|
16947
16947
|
}
|
|
16948
16948
|
function im(e, t) {
|
|
16949
|
-
let n = mr(e), r = de([]), o = Q8(), s = hr(), i = ve((d, h =
|
|
16949
|
+
let n = mr(e), r = de([]), o = Q8(), s = hr(), i = ve((d, h = Dn.Hidden) => {
|
|
16950
16950
|
let m = r.current.findIndex(({ el: g }) => g === d);
|
|
16951
|
-
m !== -1 && (Rt(h, { [
|
|
16951
|
+
m !== -1 && (Rt(h, { [Dn.Unmount]() {
|
|
16952
16952
|
r.current.splice(m, 1);
|
|
16953
|
-
}, [
|
|
16953
|
+
}, [Dn.Hidden]() {
|
|
16954
16954
|
r.current[m].state = "hidden";
|
|
16955
16955
|
} }), s.microTask(() => {
|
|
16956
16956
|
var g;
|
|
@@ -16958,7 +16958,7 @@ function im(e, t) {
|
|
|
16958
16958
|
}));
|
|
16959
16959
|
}), c = ve((d) => {
|
|
16960
16960
|
let h = r.current.find(({ el: m }) => m === d);
|
|
16961
|
-
return h ? h.state !== "visible" && (h.state = "visible") : r.current.push({ el: d, state: "visible" }), () => i(d,
|
|
16961
|
+
return h ? h.state !== "visible" && (h.state = "visible") : r.current.push({ el: d, state: "visible" }), () => i(d, Dn.Unmount);
|
|
16962
16962
|
}), a = de([]), l = de(Promise.resolve()), u = de({ enter: [], leave: [] }), f = ve((d, h, m) => {
|
|
16963
16963
|
a.current.splice(0), t && (t.chains.current[h] = t.chains.current[h].filter(([g]) => g !== d)), t == null || t.chains.current[h].push([d, new Promise((g) => {
|
|
16964
16964
|
a.current.push(g);
|
|
@@ -16976,33 +16976,33 @@ function im(e, t) {
|
|
|
16976
16976
|
let am = Ft, cm = zs.RenderStrategy;
|
|
16977
16977
|
function r3(e, t) {
|
|
16978
16978
|
var n, r;
|
|
16979
|
-
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: l, enterFrom: u, enterTo: f, entered: p, leave: d, leaveFrom: h, leaveTo: m, ...g } = e, [A, w] = ie(null), P = de(null), N = sm(e), $ = It(...N ? [P, t, w] : t === null ? [] : [t]), B = (n = g.unmount) == null || n ?
|
|
16980
|
-
|
|
16981
|
-
if (B ===
|
|
16979
|
+
let { transition: o = !0, beforeEnter: s, afterEnter: i, beforeLeave: c, afterLeave: a, enter: l, enterFrom: u, enterTo: f, entered: p, leave: d, leaveFrom: h, leaveTo: m, ...g } = e, [A, w] = ie(null), P = de(null), N = sm(e), $ = It(...N ? [P, t, w] : t === null ? [] : [t]), B = (n = g.unmount) == null || n ? Dn.Unmount : Dn.Hidden, { show: M, appear: b, initial: y } = t3(), [x, S] = ie(M ? "visible" : "hidden"), O = n3(), { register: I, unregister: D } = O;
|
|
16980
|
+
De(() => I(P), [I, P]), De(() => {
|
|
16981
|
+
if (B === Dn.Hidden && P.current) {
|
|
16982
16982
|
if (M && x !== "visible") {
|
|
16983
16983
|
S("visible");
|
|
16984
16984
|
return;
|
|
16985
16985
|
}
|
|
16986
|
-
return Rt(x, { hidden: () =>
|
|
16986
|
+
return Rt(x, { hidden: () => D(P), visible: () => I(P) });
|
|
16987
16987
|
}
|
|
16988
|
-
}, [x, P, I,
|
|
16988
|
+
}, [x, P, I, D, M, B]);
|
|
16989
16989
|
let v = om();
|
|
16990
|
-
|
|
16990
|
+
De(() => {
|
|
16991
16991
|
if (N && v && x === "visible" && P.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
16992
16992
|
}, [P, x, v, N]);
|
|
16993
|
-
let R = y && !b, C = b && M && y, E = de(!1),
|
|
16994
|
-
E.current || (S("hidden"),
|
|
16993
|
+
let R = y && !b, C = b && M && y, E = de(!1), k = im(() => {
|
|
16994
|
+
E.current || (S("hidden"), D(P));
|
|
16995
16995
|
}, O), F = ve((ne) => {
|
|
16996
16996
|
E.current = !0;
|
|
16997
16997
|
let xe = ne ? "enter" : "leave";
|
|
16998
|
-
|
|
16998
|
+
k.onStart(P, xe, (q) => {
|
|
16999
16999
|
q === "enter" ? s == null || s() : q === "leave" && (c == null || c());
|
|
17000
17000
|
});
|
|
17001
17001
|
}), z = ve((ne) => {
|
|
17002
17002
|
let xe = ne ? "enter" : "leave";
|
|
17003
|
-
E.current = !1,
|
|
17003
|
+
E.current = !1, k.onStop(P, xe, (q) => {
|
|
17004
17004
|
q === "enter" ? i == null || i() : q === "leave" && (a == null || a());
|
|
17005
|
-
}), xe === "leave" && !Ii(
|
|
17005
|
+
}), xe === "leave" && !Ii(k) && (S("hidden"), D(P));
|
|
17006
17006
|
});
|
|
17007
17007
|
Te(() => {
|
|
17008
17008
|
N && o || (F(M), z(M));
|
|
@@ -17010,7 +17010,7 @@ function r3(e, t) {
|
|
|
17010
17010
|
let U = !(!o || !N || !v || R), [, H] = Rh(U, A, M, { start: F, end: z }), ee = $n({ ref: $, className: ((r = hc(g.className, C && l, C && u, H.enter && l, H.enter && H.closed && u, H.enter && !H.closed && f, H.leave && d, H.leave && !H.closed && h, H.leave && H.closed && m, !H.transition && M && p)) == null ? void 0 : r.trim()) || void 0, ...Nh(H) }), G = 0;
|
|
17011
17011
|
x === "visible" && (G |= Mt.Open), x === "hidden" && (G |= Mt.Closed), M && x === "hidden" && (G |= Mt.Opening), !M && x === "visible" && (G |= Mt.Closing);
|
|
17012
17012
|
let _ = bt();
|
|
17013
|
-
return Z.createElement(Oi.Provider, { value:
|
|
17013
|
+
return Z.createElement(Oi.Provider, { value: k }, Z.createElement(Qh, { value: G }, _({ ourProps: ee, theirProps: g, defaultTag: am, features: cm, visible: x === "visible", name: "Transition.Child" })));
|
|
17014
17014
|
}
|
|
17015
17015
|
function o3(e, t) {
|
|
17016
17016
|
let { show: n, appear: r = !1, unmount: o = !0, ...s } = e, i = de(null), c = sm(e), a = It(...c ? [i, t] : t === null ? [] : [t]);
|
|
@@ -17020,11 +17020,11 @@ function o3(e, t) {
|
|
|
17020
17020
|
let [u, f] = ie(n ? "visible" : "hidden"), p = im(() => {
|
|
17021
17021
|
n || f("hidden");
|
|
17022
17022
|
}), [d, h] = ie(!0), m = de([n]);
|
|
17023
|
-
|
|
17023
|
+
De(() => {
|
|
17024
17024
|
d !== !1 && m.current[m.current.length - 1] !== n && (m.current.push(n), h(!1));
|
|
17025
17025
|
}, [m, n]);
|
|
17026
17026
|
let g = J(() => ({ show: n, appear: r, initial: d }), [n, r, d]);
|
|
17027
|
-
|
|
17027
|
+
De(() => {
|
|
17028
17028
|
n ? f("visible") : !Ii(p) && i.current !== null && f("hidden");
|
|
17029
17029
|
}, [n, p]);
|
|
17030
17030
|
let A = { unmount: o }, w = ve(() => {
|
|
@@ -17078,7 +17078,7 @@ function c3(e) {
|
|
|
17078
17078
|
return t.current = o, n.current = s, s;
|
|
17079
17079
|
});
|
|
17080
17080
|
}
|
|
17081
|
-
var l3 = Object.defineProperty, u3 = (e, t, n) => t in e ? l3(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, qf = (e, t, n) => (u3(e, typeof t != "symbol" ? t + "" : t, n), n), qe = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(qe || {}),
|
|
17081
|
+
var l3 = Object.defineProperty, u3 = (e, t, n) => t in e ? l3(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, qf = (e, t, n) => (u3(e, typeof t != "symbol" ? t + "" : t, n), n), qe = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(qe || {}), kn = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(kn || {}), Ss = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Ss || {}), um = ((e) => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.SelectOption = 5] = "SelectOption", e[e.RegisterOptions = 6] = "RegisterOptions", e[e.UnregisterOptions = 7] = "UnregisterOptions", e[e.SetButtonElement = 8] = "SetButtonElement", e[e.SetOptionsElement = 9] = "SetOptionsElement", e[e.SortOptions = 10] = "SortOptions", e[e.MarkButtonAsMoved = 11] = "MarkButtonAsMoved", e))(um || {});
|
|
17082
17082
|
function Kf(e, t = (n) => n) {
|
|
17083
17083
|
let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = Th(t(e.options.slice()), (s) => s.dataRef.current.domRef.current), o = n ? r.indexOf(n) : null;
|
|
17084
17084
|
return o === -1 && (o = null), { options: r, activeOptionIndex: o };
|
|
@@ -17263,23 +17263,23 @@ let d3 = Ft;
|
|
|
17263
17263
|
function p3(e, t) {
|
|
17264
17264
|
let n = ur(), r = $l(), { value: o, defaultValue: s, form: i, name: c, onChange: a, by: l, invalid: u = !1, disabled: f = r || !1, horizontal: p = !1, multiple: d = !1, __demoMode: h = !1, ...m } = e;
|
|
17265
17265
|
const g = p ? "horizontal" : "vertical";
|
|
17266
|
-
let A = It(t), w = Cx(s), [P = d ? [] : void 0, N] = Ix(o, a, w), $ = dm({ id: n, __demoMode: h }), B = de({ static: !1, hold: !1 }), M = de(/* @__PURE__ */ new Map()), b = r2(l), y = te((U) => Rt(x.mode, { [
|
|
17267
|
-
|
|
17266
|
+
let A = It(t), w = Cx(s), [P = d ? [] : void 0, N] = Ix(o, a, w), $ = dm({ id: n, __demoMode: h }), B = de({ static: !1, hold: !1 }), M = de(/* @__PURE__ */ new Map()), b = r2(l), y = te((U) => Rt(x.mode, { [kn.Multi]: () => P.some((H) => b(H, U)), [kn.Single]: () => b(P, U) }), [P]), x = Wn({ value: P, disabled: f, invalid: u, mode: d ? kn.Multi : kn.Single, orientation: g, onChange: N, compare: b, isSelected: y, optionsPropsRef: B, listRef: M });
|
|
17267
|
+
De(() => {
|
|
17268
17268
|
$.state.dataRef.current = x;
|
|
17269
17269
|
}, [x]);
|
|
17270
|
-
let S = nt($, (U) => U.listboxState), O = Bl.get(null), I = nt(O, te((U) => O.selectors.isTop(U, n), [O, n])), [
|
|
17271
|
-
I2(I, [
|
|
17272
|
-
$.send({ type: um.CloseListbox }), Sh(H, Ml.Loose) || (U.preventDefault(),
|
|
17270
|
+
let S = nt($, (U) => U.listboxState), O = Bl.get(null), I = nt(O, te((U) => O.selectors.isTop(U, n), [O, n])), [D, v] = nt($, (U) => [U.buttonElement, U.optionsElement]);
|
|
17271
|
+
I2(I, [D, v], (U, H) => {
|
|
17272
|
+
$.send({ type: um.CloseListbox }), Sh(H, Ml.Loose) || (U.preventDefault(), D == null || D.focus());
|
|
17273
17273
|
});
|
|
17274
|
-
let R = Wn({ open: S === qe.Open, disabled: f, invalid: u, value: P }), [C, E] = Xx({ inherit: !0 }),
|
|
17274
|
+
let R = Wn({ open: S === qe.Open, disabled: f, invalid: u, value: P }), [C, E] = Xx({ inherit: !0 }), k = { ref: A }, F = te(() => {
|
|
17275
17275
|
if (w !== void 0) return N == null ? void 0 : N(w);
|
|
17276
17276
|
}, [N, w]), z = bt();
|
|
17277
|
-
return Z.createElement(E, { value: C, props: { htmlFor:
|
|
17277
|
+
return Z.createElement(E, { value: C, props: { htmlFor: D == null ? void 0 : D.id }, slot: { open: S === qe.Open, disabled: f } }, Z.createElement(B8, null, Z.createElement(fm.Provider, { value: $ }, Z.createElement(Ci.Provider, { value: x }, Z.createElement(Qh, { value: Rt(S, { [qe.Open]: Mt.Open, [qe.Closed]: Mt.Closed }) }, c != null && P != null && Z.createElement(Fx, { disabled: f, data: { [c]: P }, form: i, onReset: F }), z({ ourProps: k, theirProps: m, slot: R, defaultTag: d3, name: "Listbox" }))))));
|
|
17278
17278
|
}
|
|
17279
17279
|
let h3 = "button";
|
|
17280
17280
|
function m3(e, t) {
|
|
17281
17281
|
let n = ur(), r = ah(), o = ss("Listbox.Button"), s = Kl("Listbox.Button"), { id: i = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: a = !1, ...l } = e, u = It(t, C8(), s.actions.setButtonElement), f = $8(), [p, d, h] = nt(s, (v) => [v.listboxState, v.buttonElement, v.optionsElement]), m = p === qe.Open;
|
|
17282
|
-
|
|
17282
|
+
D2(m, { trigger: d, action: te((v) => {
|
|
17283
17283
|
if (d != null && d.contains(v.target)) return bs.Ignore;
|
|
17284
17284
|
let R = v.target.closest('[role="option"]:not([data-disabled])');
|
|
17285
17285
|
return Nn(R) ? bs.Select(R) : h != null && h.contains(v.target) ? bs.Ignore : bs.Close;
|
|
@@ -17306,8 +17306,8 @@ function m3(e, t) {
|
|
|
17306
17306
|
}), w = s2((v) => {
|
|
17307
17307
|
var R;
|
|
17308
17308
|
s.state.listboxState === qe.Open ? (Ns(() => s.actions.closeListbox()), (R = s.state.buttonElement) == null || R.focus({ preventScroll: !0 })) : (v.preventDefault(), s.actions.openListbox({ focus: Oe.Nothing }));
|
|
17309
|
-
}), P = ve((v) => v.preventDefault()), N = hh([i]), $ = qx(), { isFocusVisible: B, focusProps: M } = bx({ autoFocus: a }), { isHovered: b, hoverProps: y } = mx({ isDisabled: c }), { pressed: x, pressProps: S } = Px({ disabled: c }), O = Wn({ open: p === qe.Open, active: x || p === qe.Open, disabled: c, invalid: o.invalid, value: o.value, hover: b, focus: B, autofocus: a }), I = nt(s, (v) => v.listboxState === qe.Open),
|
|
17310
|
-
return bt()({ ourProps:
|
|
17309
|
+
}), P = ve((v) => v.preventDefault()), N = hh([i]), $ = qx(), { isFocusVisible: B, focusProps: M } = bx({ autoFocus: a }), { isHovered: b, hoverProps: y } = mx({ isDisabled: c }), { pressed: x, pressProps: S } = Px({ disabled: c }), O = Wn({ open: p === qe.Open, active: x || p === qe.Open, disabled: c, invalid: o.invalid, value: o.value, hover: b, focus: B, autofocus: a }), I = nt(s, (v) => v.listboxState === qe.Open), D = nh(f(), { ref: u, id: i, type: k2(e, d), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": I, "aria-labelledby": N, "aria-describedby": $, disabled: c || void 0, autoFocus: a, onKeyDown: g, onKeyUp: A, onKeyPress: P }, w, M, y, S);
|
|
17310
|
+
return bt()({ ourProps: D, theirProps: l, slot: O, defaultTag: h3, name: "Listbox.Button" });
|
|
17311
17311
|
}
|
|
17312
17312
|
let pm = He(!1), b3 = "div", g3 = zs.RenderStrategy | zs.Static;
|
|
17313
17313
|
function y3(e, t) {
|
|
@@ -17324,19 +17324,19 @@ function y3(e, t) {
|
|
|
17324
17324
|
if (l == null || !((ne = l == null ? void 0 : l.to) != null && ne.includes("selection"))) return null;
|
|
17325
17325
|
let xe = _.options.findIndex((q) => O(q.dataRef.current.value));
|
|
17326
17326
|
return xe === -1 && (xe = 0), xe;
|
|
17327
|
-
}),
|
|
17327
|
+
}), D = (() => {
|
|
17328
17328
|
if (l == null) return;
|
|
17329
17329
|
if (I === null) return { ...l, inner: void 0 };
|
|
17330
17330
|
let _ = Array.from(p.listRef.current.values());
|
|
17331
17331
|
return { ...l, inner: { listRef: { current: _ }, index: I } };
|
|
17332
|
-
})(), [v, R] =
|
|
17332
|
+
})(), [v, R] = k8(D), C = D8(), E = It(t, l ? v : null, d.actions.setOptionsElement, f), k = hr();
|
|
17333
17333
|
Te(() => {
|
|
17334
17334
|
let _ = g;
|
|
17335
17335
|
_ && h === qe.Open && (wx(_) || _ == null || _.focus({ preventScroll: !0 }));
|
|
17336
17336
|
}, [h, g]);
|
|
17337
17337
|
let F = ve((_) => {
|
|
17338
17338
|
var ne;
|
|
17339
|
-
switch (
|
|
17339
|
+
switch (k.dispose(), _.key) {
|
|
17340
17340
|
case Fe.Space:
|
|
17341
17341
|
if (d.state.searchQuery !== "") return _.preventDefault(), _.stopPropagation(), d.actions.search(_.key);
|
|
17342
17342
|
case Fe.Enter:
|
|
@@ -17359,13 +17359,13 @@ function y3(e, t) {
|
|
|
17359
17359
|
_.preventDefault(), _.stopPropagation(), Ns(() => d.actions.closeListbox()), A2(d.state.buttonElement, _.shiftKey ? yc.Previous : yc.Next);
|
|
17360
17360
|
break;
|
|
17361
17361
|
default:
|
|
17362
|
-
_.key.length === 1 && (d.actions.search(_.key),
|
|
17362
|
+
_.key.length === 1 && (d.actions.search(_.key), k.setTimeout(() => d.actions.clearSearch(), 350));
|
|
17363
17363
|
break;
|
|
17364
17364
|
}
|
|
17365
17365
|
}), z = nt(d, (_) => {
|
|
17366
17366
|
var ne;
|
|
17367
17367
|
return (ne = _.buttonElement) == null ? void 0 : ne.id;
|
|
17368
|
-
}), U = Wn({ open: h === qe.Open }), H = nh(l ? C() : {}, { id: r, ref: E, "aria-activedescendant": nt(d, d.selectors.activeDescendantId), "aria-multiselectable": p.mode ===
|
|
17368
|
+
}), U = Wn({ open: h === qe.Open }), H = nh(l ? C() : {}, { id: r, ref: E, "aria-activedescendant": nt(d, d.selectors.activeDescendantId), "aria-multiselectable": p.mode === kn.Multi ? !0 : void 0, "aria-labelledby": z, "aria-orientation": p.orientation, onKeyDown: F, role: "listbox", tabIndex: h === qe.Open ? 0 : void 0, style: { ...a.style, ...R, "--button-width": o2($, m, !0).width }, ...Nh(B) }), ee = bt(), G = J(() => p.mode === kn.Multi ? p : { ...p, isSelected: O }, [p, O]);
|
|
17369
17369
|
return Z.createElement(Y8, { enabled: s ? e.static || $ : !1, ownerDocument: w }, Z.createElement(Ci.Provider, { value: G }, ee({ ourProps: H, theirProps: a, slot: U, defaultTag: b3, features: g3, visible: y, name: "Listbox.Options" })));
|
|
17370
17370
|
}
|
|
17371
17371
|
let v3 = "div";
|
|
@@ -17375,12 +17375,12 @@ function w3(e, t) {
|
|
|
17375
17375
|
} }), m = It(t, p, (x) => {
|
|
17376
17376
|
x ? a.listRef.current.set(r, x) : a.listRef.current.delete(r);
|
|
17377
17377
|
}), g = nt(l, (x) => l.selectors.shouldScrollIntoView(x, r));
|
|
17378
|
-
|
|
17378
|
+
De(() => {
|
|
17379
17379
|
if (g) return mt().requestAnimationFrame(() => {
|
|
17380
17380
|
var x, S;
|
|
17381
17381
|
(S = (x = p.current) == null ? void 0 : x.scrollIntoView) == null || S.call(x, { block: "nearest" });
|
|
17382
17382
|
});
|
|
17383
|
-
}, [g, p]),
|
|
17383
|
+
}, [g, p]), De(() => {
|
|
17384
17384
|
if (!c) return l.actions.registerOption(r, h), () => l.actions.unregisterOption(r);
|
|
17385
17385
|
}, [h, r, c]);
|
|
17386
17386
|
let A = ve((x) => {
|
|
@@ -17398,7 +17398,7 @@ function w3(e, t) {
|
|
|
17398
17398
|
}
|
|
17399
17399
|
let x3 = Ft;
|
|
17400
17400
|
function E3(e, t) {
|
|
17401
|
-
let { options: n, placeholder: r, ...o } = e, s = { ref: It(t) }, i = ss("ListboxSelectedOption"), c = Wn({}), a = i.value === void 0 || i.value === null || i.mode ===
|
|
17401
|
+
let { options: n, placeholder: r, ...o } = e, s = { ref: It(t) }, i = ss("ListboxSelectedOption"), c = Wn({}), a = i.value === void 0 || i.value === null || i.mode === kn.Multi && Array.isArray(i.value) && i.value.length === 0, l = bt();
|
|
17402
17402
|
return Z.createElement(pm.Provider, { value: !0 }, l({ ourProps: s, theirProps: { ...o, children: Z.createElement(Z.Fragment, null, r && a ? r : n) }, slot: c, defaultTag: x3, name: "ListboxSelectedOption" }));
|
|
17403
17403
|
}
|
|
17404
17404
|
let P3 = ut(p3), S3 = ut(m3), T3 = t2, A3 = ut(y3), N3 = ut(w3), R3 = ut(E3), At = Object.assign(P3, { Button: S3, Label: T3, Options: A3, Option: N3, SelectedOption: R3 });
|
|
@@ -17464,9 +17464,9 @@ const O3 = () => /* @__PURE__ */ T.jsxs(
|
|
|
17464
17464
|
const r = Array.from({ length: t }, (o, s) => s + 1);
|
|
17465
17465
|
return /* @__PURE__ */ T.jsx("div", { className: `flex items-center ${n}`, children: r.map((o) => /* @__PURE__ */ T.jsx("div", { className: "flex items-center justify-center", children: o > t - e ? /* @__PURE__ */ T.jsx(O3, {}) : /* @__PURE__ */ T.jsx(I3, {}) }, o)) });
|
|
17466
17466
|
};
|
|
17467
|
-
class
|
|
17467
|
+
class kt {
|
|
17468
17468
|
}
|
|
17469
|
-
Xr(
|
|
17469
|
+
Xr(kt, "FAST", 3), Xr(kt, "Medium", 2), Xr(kt, "SLOW", 1), Xr(kt, "NONE", 0);
|
|
17470
17470
|
const C3 = {
|
|
17471
17471
|
MAINNET: 1,
|
|
17472
17472
|
// ETH 主网
|
|
@@ -17477,14 +17477,14 @@ const C3 = {
|
|
|
17477
17477
|
return $3.includes(
|
|
17478
17478
|
t
|
|
17479
17479
|
);
|
|
17480
|
-
},
|
|
17480
|
+
}, D3 = {
|
|
17481
17481
|
USDT: !0
|
|
17482
17482
|
// 如果需要添加其他代币,在这里添加
|
|
17483
17483
|
// USDC: true,
|
|
17484
17484
|
}, hm = (e, t) => {
|
|
17485
17485
|
const n = typeof e == "string" ? parseInt(e, 10) : e;
|
|
17486
|
-
return n === 1 || n === 11155111 ? !1 : (n === 42161 || n === 421614) && t ? t.toUpperCase() === "ETH" ? !1 : !
|
|
17487
|
-
},
|
|
17486
|
+
return n === 1 || n === 11155111 ? !1 : (n === 42161 || n === 421614) && t ? t.toUpperCase() === "ETH" ? !1 : !D3[t.toUpperCase()] : !0;
|
|
17487
|
+
}, k3 = ({
|
|
17488
17488
|
chains: e,
|
|
17489
17489
|
selectedChain: t,
|
|
17490
17490
|
onChainChange: n,
|
|
@@ -17600,7 +17600,7 @@ const C3 = {
|
|
|
17600
17600
|
so,
|
|
17601
17601
|
{
|
|
17602
17602
|
className: "w-full justify-between",
|
|
17603
|
-
selectedLevel: pn(a.chainId) ?
|
|
17603
|
+
selectedLevel: pn(a.chainId) ? kt.SLOW : kt.FAST,
|
|
17604
17604
|
maxLevel: 3
|
|
17605
17605
|
}
|
|
17606
17606
|
) })
|
|
@@ -17841,7 +17841,7 @@ const C3 = {
|
|
|
17841
17841
|
}
|
|
17842
17842
|
),
|
|
17843
17843
|
/* @__PURE__ */ T.jsx(
|
|
17844
|
-
|
|
17844
|
+
k3,
|
|
17845
17845
|
{
|
|
17846
17846
|
chains: p,
|
|
17847
17847
|
selectedChain: d,
|
|
@@ -18859,8 +18859,8 @@ var u4 = function() {
|
|
|
18859
18859
|
"marginSize",
|
|
18860
18860
|
"imageSettings"
|
|
18861
18861
|
]), { style: g } = m, A = $c(m, ["style"]), w = d == null ? void 0 : d.src, P = Z.useRef(null), N = Z.useRef(null), $ = Z.useCallback(
|
|
18862
|
-
(
|
|
18863
|
-
P.current =
|
|
18862
|
+
(D) => {
|
|
18863
|
+
P.current = D, typeof n == "function" ? n(D) : n && (n.current = D);
|
|
18864
18864
|
},
|
|
18865
18865
|
[n]
|
|
18866
18866
|
), [B, M] = Z.useState(!1), { margin: b, cells: y, numCells: x, calculatedImageSettings: S } = Im({
|
|
@@ -18875,7 +18875,7 @@ var u4 = function() {
|
|
|
18875
18875
|
});
|
|
18876
18876
|
Z.useEffect(() => {
|
|
18877
18877
|
if (P.current != null) {
|
|
18878
|
-
const
|
|
18878
|
+
const D = P.current, v = D.getContext("2d");
|
|
18879
18879
|
if (!v)
|
|
18880
18880
|
return;
|
|
18881
18881
|
let R = y;
|
|
@@ -18884,9 +18884,9 @@ var u4 = function() {
|
|
|
18884
18884
|
y,
|
|
18885
18885
|
S.excavation
|
|
18886
18886
|
));
|
|
18887
|
-
const
|
|
18888
|
-
|
|
18889
|
-
const F = s / x *
|
|
18887
|
+
const k = window.devicePixelRatio || 1;
|
|
18888
|
+
D.height = D.width = s * k;
|
|
18889
|
+
const F = s / x * k;
|
|
18890
18890
|
v.scale(F, F), v.fillStyle = c, v.fillRect(0, 0, x, x), v.fillStyle = a, u4 ? v.fill(new Path2D(Rm(R, b))) : y.forEach(function(z, U) {
|
|
18891
18891
|
z.forEach(function(H, ee) {
|
|
18892
18892
|
H && v.fillRect(ee + b, U + b, 1, 1);
|
|
@@ -19031,7 +19031,7 @@ function m4() {
|
|
|
19031
19031
|
return p4().includes("jsdom/");
|
|
19032
19032
|
}
|
|
19033
19033
|
const Qf = "data-floating-ui-focusable", b4 = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
19034
|
-
function
|
|
19034
|
+
function Dc(e) {
|
|
19035
19035
|
let t = e.activeElement;
|
|
19036
19036
|
for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
|
|
19037
19037
|
var n;
|
|
@@ -19072,7 +19072,7 @@ function g4(e) {
|
|
|
19072
19072
|
function Yt(e) {
|
|
19073
19073
|
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
19074
19074
|
}
|
|
19075
|
-
function
|
|
19075
|
+
function Dm(e) {
|
|
19076
19076
|
return Je(e) && e.matches(b4);
|
|
19077
19077
|
}
|
|
19078
19078
|
function y4(e) {
|
|
@@ -19124,7 +19124,7 @@ function Zt(e) {
|
|
|
19124
19124
|
return t.current == null ? void 0 : t.current(...r);
|
|
19125
19125
|
}, []);
|
|
19126
19126
|
}
|
|
19127
|
-
const
|
|
19127
|
+
const km = () => ({
|
|
19128
19128
|
getShadowRoot: !0,
|
|
19129
19129
|
displayCheck: (
|
|
19130
19130
|
// JSDOM does not support the `tabbable` library. To solve this we can
|
|
@@ -19134,9 +19134,9 @@ const Dm = () => ({
|
|
|
19134
19134
|
)
|
|
19135
19135
|
});
|
|
19136
19136
|
function Bm(e, t) {
|
|
19137
|
-
const n = Lh(e,
|
|
19137
|
+
const n = Lh(e, km()), r = n.length;
|
|
19138
19138
|
if (r === 0) return;
|
|
19139
|
-
const o =
|
|
19139
|
+
const o = Dc(Yt(e)), s = n.indexOf(o), i = s === -1 ? t === 1 ? 0 : r - 1 : s + t;
|
|
19140
19140
|
return n[i];
|
|
19141
19141
|
}
|
|
19142
19142
|
function A4(e) {
|
|
@@ -19150,7 +19150,7 @@ function xa(e, t) {
|
|
|
19150
19150
|
return !r || !Ur(n, r);
|
|
19151
19151
|
}
|
|
19152
19152
|
function R4(e) {
|
|
19153
|
-
Lh(e,
|
|
19153
|
+
Lh(e, km()).forEach((n) => {
|
|
19154
19154
|
n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
|
|
19155
19155
|
});
|
|
19156
19156
|
}
|
|
@@ -19177,16 +19177,16 @@ function $4() {
|
|
|
19177
19177
|
rd = !0;
|
|
19178
19178
|
}, []), e;
|
|
19179
19179
|
}
|
|
19180
|
-
const
|
|
19181
|
-
let
|
|
19182
|
-
process.env.NODE_ENV !== "production" && (
|
|
19183
|
-
function
|
|
19180
|
+
const D4 = I4.useId, Yl = D4 || $4;
|
|
19181
|
+
let kc;
|
|
19182
|
+
process.env.NODE_ENV !== "production" && (kc = /* @__PURE__ */ new Set());
|
|
19183
|
+
function k4() {
|
|
19184
19184
|
for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
19185
19185
|
n[r] = arguments[r];
|
|
19186
19186
|
const o = "Floating UI: " + n.join(" ");
|
|
19187
|
-
if (!((e =
|
|
19187
|
+
if (!((e = kc) != null && e.has(o))) {
|
|
19188
19188
|
var s;
|
|
19189
|
-
(s =
|
|
19189
|
+
(s = kc) == null || s.add(o), console.error(o);
|
|
19190
19190
|
}
|
|
19191
19191
|
}
|
|
19192
19192
|
function B4() {
|
|
@@ -19255,30 +19255,30 @@ function F4(e, t) {
|
|
|
19255
19255
|
if (!c) return;
|
|
19256
19256
|
function C(E) {
|
|
19257
19257
|
let {
|
|
19258
|
-
open:
|
|
19258
|
+
open: k
|
|
19259
19259
|
} = E;
|
|
19260
|
-
|
|
19260
|
+
k || (Pt(N), Pt(B), M.current = !0, x.current = !1);
|
|
19261
19261
|
}
|
|
19262
19262
|
return s.on("openchange", C), () => {
|
|
19263
19263
|
s.off("openchange", C);
|
|
19264
19264
|
};
|
|
19265
19265
|
}, [c, s]), j.useEffect(() => {
|
|
19266
19266
|
if (!c || !m.current || !n) return;
|
|
19267
|
-
function C(
|
|
19268
|
-
S() && r(!1,
|
|
19267
|
+
function C(k) {
|
|
19268
|
+
S() && r(!1, k, "hover");
|
|
19269
19269
|
}
|
|
19270
19270
|
const E = Yt(i.floating).documentElement;
|
|
19271
19271
|
return E.addEventListener("mouseleave", C), () => {
|
|
19272
19272
|
E.removeEventListener("mouseleave", C);
|
|
19273
19273
|
};
|
|
19274
19274
|
}, [i.floating, n, r, c, m, S]);
|
|
19275
|
-
const O = j.useCallback(function(C, E,
|
|
19276
|
-
E === void 0 && (E = !0),
|
|
19275
|
+
const O = j.useCallback(function(C, E, k) {
|
|
19276
|
+
E === void 0 && (E = !0), k === void 0 && (k = "hover");
|
|
19277
19277
|
const F = Ea(g.current, "close", P.current);
|
|
19278
|
-
F && !$.current ? (Pt(N), N.current = window.setTimeout(() => r(!1, C,
|
|
19278
|
+
F && !$.current ? (Pt(N), N.current = window.setTimeout(() => r(!1, C, k), F)) : E && (Pt(N), r(!1, C, k));
|
|
19279
19279
|
}, [g, r]), I = Zt(() => {
|
|
19280
19280
|
y.current(), $.current = void 0;
|
|
19281
|
-
}),
|
|
19281
|
+
}), D = Zt(() => {
|
|
19282
19282
|
if (b.current) {
|
|
19283
19283
|
const C = Yt(i.floating).body;
|
|
19284
19284
|
C.style.pointerEvents = "", C.removeAttribute(sd), b.current = !1;
|
|
@@ -19296,7 +19296,7 @@ function F4(e, t) {
|
|
|
19296
19296
|
}
|
|
19297
19297
|
function E(U) {
|
|
19298
19298
|
if (v()) {
|
|
19299
|
-
|
|
19299
|
+
D();
|
|
19300
19300
|
return;
|
|
19301
19301
|
}
|
|
19302
19302
|
y.current();
|
|
@@ -19308,7 +19308,7 @@ function F4(e, t) {
|
|
|
19308
19308
|
x: U.clientX,
|
|
19309
19309
|
y: U.clientY,
|
|
19310
19310
|
onClose() {
|
|
19311
|
-
|
|
19311
|
+
D(), I(), v() || O(U, !0, "safe-polygon");
|
|
19312
19312
|
}
|
|
19313
19313
|
});
|
|
19314
19314
|
const G = $.current;
|
|
@@ -19319,14 +19319,14 @@ function F4(e, t) {
|
|
|
19319
19319
|
}
|
|
19320
19320
|
(P.current === "touch" ? !Ur(i.floating, U.relatedTarget) : !0) && O(U);
|
|
19321
19321
|
}
|
|
19322
|
-
function
|
|
19322
|
+
function k(U) {
|
|
19323
19323
|
v() || o.current.floatingContext && (m.current == null || m.current({
|
|
19324
19324
|
...o.current.floatingContext,
|
|
19325
19325
|
tree: d,
|
|
19326
19326
|
x: U.clientX,
|
|
19327
19327
|
y: U.clientY,
|
|
19328
19328
|
onClose() {
|
|
19329
|
-
|
|
19329
|
+
D(), I(), v() || O(U);
|
|
19330
19330
|
}
|
|
19331
19331
|
})(U));
|
|
19332
19332
|
}
|
|
@@ -19338,32 +19338,32 @@ function F4(e, t) {
|
|
|
19338
19338
|
}
|
|
19339
19339
|
if (Ee(i.domReference)) {
|
|
19340
19340
|
const U = i.domReference, H = i.floating;
|
|
19341
|
-
return n && U.addEventListener("mouseleave",
|
|
19341
|
+
return n && U.addEventListener("mouseleave", k), p && U.addEventListener("mousemove", C, {
|
|
19342
19342
|
once: !0
|
|
19343
|
-
}), U.addEventListener("mouseenter", C), U.addEventListener("mouseleave", E), H && (H.addEventListener("mouseleave",
|
|
19344
|
-
n && U.removeEventListener("mouseleave",
|
|
19343
|
+
}), U.addEventListener("mouseenter", C), U.addEventListener("mouseleave", E), H && (H.addEventListener("mouseleave", k), H.addEventListener("mouseenter", F), H.addEventListener("mouseleave", z)), () => {
|
|
19344
|
+
n && U.removeEventListener("mouseleave", k), p && U.removeEventListener("mousemove", C), U.removeEventListener("mouseenter", C), U.removeEventListener("mouseleave", E), H && (H.removeEventListener("mouseleave", k), H.removeEventListener("mouseenter", F), H.removeEventListener("mouseleave", z));
|
|
19345
19345
|
};
|
|
19346
19346
|
}
|
|
19347
|
-
}, [i, c, e, u, p, O, I,
|
|
19347
|
+
}, [i, c, e, u, p, O, I, D, r, n, A, d, g, m, o, v, w]), en(() => {
|
|
19348
19348
|
var C;
|
|
19349
19349
|
if (c && n && (C = m.current) != null && (C = C.__options) != null && C.blockPointerEvents && S()) {
|
|
19350
19350
|
b.current = !0;
|
|
19351
|
-
const
|
|
19352
|
-
if (Ee(i.domReference) &&
|
|
19351
|
+
const k = i.floating;
|
|
19352
|
+
if (Ee(i.domReference) && k) {
|
|
19353
19353
|
var E;
|
|
19354
19354
|
const F = Yt(i.floating).body;
|
|
19355
19355
|
F.setAttribute(sd, "");
|
|
19356
19356
|
const z = i.domReference, U = d == null || (E = d.nodesRef.current.find((H) => H.id === h)) == null || (E = E.context) == null ? void 0 : E.elements.floating;
|
|
19357
|
-
return U && (U.style.pointerEvents = ""), F.style.pointerEvents = "none", z.style.pointerEvents = "auto",
|
|
19358
|
-
F.style.pointerEvents = "", z.style.pointerEvents = "",
|
|
19357
|
+
return U && (U.style.pointerEvents = ""), F.style.pointerEvents = "none", z.style.pointerEvents = "auto", k.style.pointerEvents = "auto", () => {
|
|
19358
|
+
F.style.pointerEvents = "", z.style.pointerEvents = "", k.style.pointerEvents = "";
|
|
19359
19359
|
};
|
|
19360
19360
|
}
|
|
19361
19361
|
}
|
|
19362
19362
|
}, [c, n, h, i, d, m, S]), en(() => {
|
|
19363
|
-
n || (P.current = void 0, x.current = !1, I(),
|
|
19364
|
-
}, [n, I,
|
|
19365
|
-
I(), Pt(N), Pt(B),
|
|
19366
|
-
}, [c, i.domReference, I,
|
|
19363
|
+
n || (P.current = void 0, x.current = !1, I(), D());
|
|
19364
|
+
}, [n, I, D]), j.useEffect(() => () => {
|
|
19365
|
+
I(), Pt(N), Pt(B), D();
|
|
19366
|
+
}, [c, i.domReference, I, D]);
|
|
19367
19367
|
const R = j.useMemo(() => {
|
|
19368
19368
|
function C(E) {
|
|
19369
19369
|
P.current = E.pointerType;
|
|
@@ -19373,10 +19373,10 @@ function F4(e, t) {
|
|
|
19373
19373
|
onPointerEnter: C,
|
|
19374
19374
|
onMouseMove(E) {
|
|
19375
19375
|
const {
|
|
19376
|
-
nativeEvent:
|
|
19376
|
+
nativeEvent: k
|
|
19377
19377
|
} = E;
|
|
19378
19378
|
function F() {
|
|
19379
|
-
!M.current && !A.current && r(!0,
|
|
19379
|
+
!M.current && !A.current && r(!0, k, "hover");
|
|
19380
19380
|
}
|
|
19381
19381
|
u && !Vo(P.current) || n || Pa(w.current) === 0 || x.current && E.movementX ** 2 + E.movementY ** 2 < 2 || (Pt(B), P.current === "touch" ? F() : (x.current = !0, B.current = window.setTimeout(F, Pa(w.current))));
|
|
19382
19382
|
}
|
|
@@ -19518,7 +19518,7 @@ function _4(e) {
|
|
|
19518
19518
|
return Je(e.target) && e.target.tagName === "A";
|
|
19519
19519
|
}
|
|
19520
19520
|
function ld(e) {
|
|
19521
|
-
return
|
|
19521
|
+
return Dm(e);
|
|
19522
19522
|
}
|
|
19523
19523
|
function W4(e, t) {
|
|
19524
19524
|
t === void 0 && (t = {});
|
|
@@ -19601,38 +19601,38 @@ function G4(e, t) {
|
|
|
19601
19601
|
} = ud(d), {
|
|
19602
19602
|
escapeKey: $,
|
|
19603
19603
|
outsidePress: B
|
|
19604
|
-
} = ud(h), M = j.useRef(!1), b = Zt((
|
|
19604
|
+
} = ud(h), M = j.useRef(!1), b = Zt((D) => {
|
|
19605
19605
|
var v;
|
|
19606
|
-
if (!n || !i || !c ||
|
|
19606
|
+
if (!n || !i || !c || D.key !== "Escape" || M.current)
|
|
19607
19607
|
return;
|
|
19608
19608
|
const R = (v = s.current.floatingContext) == null ? void 0 : v.nodeId, C = m ? Ts(m.nodesRef.current, R) : [];
|
|
19609
|
-
if (!P && (
|
|
19609
|
+
if (!P && (D.stopPropagation(), C.length > 0)) {
|
|
19610
19610
|
let E = !0;
|
|
19611
|
-
if (C.forEach((
|
|
19611
|
+
if (C.forEach((k) => {
|
|
19612
19612
|
var F;
|
|
19613
|
-
if ((F =
|
|
19613
|
+
if ((F = k.context) != null && F.open && !k.context.dataRef.current.__escapeKeyBubbles) {
|
|
19614
19614
|
E = !1;
|
|
19615
19615
|
return;
|
|
19616
19616
|
}
|
|
19617
19617
|
}), !E)
|
|
19618
19618
|
return;
|
|
19619
19619
|
}
|
|
19620
|
-
r(!1, w4(
|
|
19621
|
-
}), y = Zt((
|
|
19620
|
+
r(!1, w4(D) ? D.nativeEvent : D, "escape-key");
|
|
19621
|
+
}), y = Zt((D) => {
|
|
19622
19622
|
var v;
|
|
19623
19623
|
const R = () => {
|
|
19624
19624
|
var C;
|
|
19625
|
-
b(
|
|
19625
|
+
b(D), (C = Er(D)) == null || C.removeEventListener("keydown", R);
|
|
19626
19626
|
};
|
|
19627
|
-
(v = Er(
|
|
19628
|
-
}), x = Zt((
|
|
19627
|
+
(v = Er(D)) == null || v.addEventListener("keydown", R);
|
|
19628
|
+
}), x = Zt((D) => {
|
|
19629
19629
|
var v;
|
|
19630
19630
|
const R = s.current.insideReactTree;
|
|
19631
19631
|
s.current.insideReactTree = !1;
|
|
19632
19632
|
const C = w.current;
|
|
19633
|
-
if (w.current = !1, l === "click" && C || R || typeof A == "function" && !A(
|
|
19633
|
+
if (w.current = !1, l === "click" && C || R || typeof A == "function" && !A(D))
|
|
19634
19634
|
return;
|
|
19635
|
-
const E = Er(
|
|
19635
|
+
const E = Er(D), k = "[" + is("inert") + "]", F = Yt(o.floating).querySelectorAll(k);
|
|
19636
19636
|
let z = Ee(E) ? E : null;
|
|
19637
19637
|
for (; z && !vn(z); ) {
|
|
19638
19638
|
const G = Pn(z);
|
|
@@ -19646,15 +19646,15 @@ function G4(e, t) {
|
|
|
19646
19646
|
Array.from(F).every((G) => !Ur(z, G)))
|
|
19647
19647
|
return;
|
|
19648
19648
|
if (Je(E) && I) {
|
|
19649
|
-
const G = vn(E), _ = Ot(E), ne = /auto|scroll/, xe = G || ne.test(_.overflowX), q = G || ne.test(_.overflowY), ae = xe && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, ce = q && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, K = _.direction === "rtl", Q = ce && (K ?
|
|
19649
|
+
const G = vn(E), _ = Ot(E), ne = /auto|scroll/, xe = G || ne.test(_.overflowX), q = G || ne.test(_.overflowY), ae = xe && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, ce = q && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, K = _.direction === "rtl", Q = ce && (K ? D.offsetX <= E.offsetWidth - E.clientWidth : D.offsetX > E.clientWidth), le = ae && D.offsetY > E.clientHeight;
|
|
19650
19650
|
if (Q || le)
|
|
19651
19651
|
return;
|
|
19652
19652
|
}
|
|
19653
19653
|
const U = (v = s.current.floatingContext) == null ? void 0 : v.nodeId, H = m && Ts(m.nodesRef.current, U).some((G) => {
|
|
19654
19654
|
var _;
|
|
19655
|
-
return wa(
|
|
19655
|
+
return wa(D, (_ = G.context) == null ? void 0 : _.elements.floating);
|
|
19656
19656
|
});
|
|
19657
|
-
if (wa(
|
|
19657
|
+
if (wa(D, o.floating) || wa(D, o.domReference) || H)
|
|
19658
19658
|
return;
|
|
19659
19659
|
const ee = m ? Ts(m.nodesRef.current, U) : [];
|
|
19660
19660
|
if (ee.length > 0) {
|
|
@@ -19668,28 +19668,28 @@ function G4(e, t) {
|
|
|
19668
19668
|
}), !G)
|
|
19669
19669
|
return;
|
|
19670
19670
|
}
|
|
19671
|
-
r(!1,
|
|
19672
|
-
}), S = Zt((
|
|
19671
|
+
r(!1, D, "outside-press");
|
|
19672
|
+
}), S = Zt((D) => {
|
|
19673
19673
|
var v;
|
|
19674
19674
|
const R = () => {
|
|
19675
19675
|
var C;
|
|
19676
|
-
x(
|
|
19676
|
+
x(D), (C = Er(D)) == null || C.removeEventListener(l, R);
|
|
19677
19677
|
};
|
|
19678
|
-
(v = Er(
|
|
19678
|
+
(v = Er(D)) == null || v.addEventListener(l, R);
|
|
19679
19679
|
});
|
|
19680
19680
|
j.useEffect(() => {
|
|
19681
19681
|
if (!n || !i)
|
|
19682
19682
|
return;
|
|
19683
19683
|
s.current.__escapeKeyBubbles = P, s.current.__outsidePressBubbles = N;
|
|
19684
|
-
let
|
|
19684
|
+
let D = -1;
|
|
19685
19685
|
function v(F) {
|
|
19686
19686
|
r(!1, F, "ancestor-scroll");
|
|
19687
19687
|
}
|
|
19688
19688
|
function R() {
|
|
19689
|
-
window.clearTimeout(
|
|
19689
|
+
window.clearTimeout(D), M.current = !0;
|
|
19690
19690
|
}
|
|
19691
19691
|
function C() {
|
|
19692
|
-
|
|
19692
|
+
D = window.setTimeout(
|
|
19693
19693
|
() => {
|
|
19694
19694
|
M.current = !1;
|
|
19695
19695
|
},
|
|
@@ -19700,18 +19700,18 @@ function G4(e, t) {
|
|
|
19700
19700
|
}
|
|
19701
19701
|
const E = Yt(o.floating);
|
|
19702
19702
|
c && (E.addEventListener("keydown", $ ? y : b, $), E.addEventListener("compositionstart", R), E.addEventListener("compositionend", C)), A && E.addEventListener(l, B ? S : x, B);
|
|
19703
|
-
let
|
|
19704
|
-
return p && (Ee(o.domReference) && (
|
|
19703
|
+
let k = [];
|
|
19704
|
+
return p && (Ee(o.domReference) && (k = Ln(o.domReference)), Ee(o.floating) && (k = k.concat(Ln(o.floating))), !Ee(o.reference) && o.reference && o.reference.contextElement && (k = k.concat(Ln(o.reference.contextElement)))), k = k.filter((F) => {
|
|
19705
19705
|
var z;
|
|
19706
19706
|
return F !== ((z = E.defaultView) == null ? void 0 : z.visualViewport);
|
|
19707
|
-
}),
|
|
19707
|
+
}), k.forEach((F) => {
|
|
19708
19708
|
F.addEventListener("scroll", v, {
|
|
19709
19709
|
passive: !0
|
|
19710
19710
|
});
|
|
19711
19711
|
}), () => {
|
|
19712
|
-
c && (E.removeEventListener("keydown", $ ? y : b, $), E.removeEventListener("compositionstart", R), E.removeEventListener("compositionend", C)), A && E.removeEventListener(l, B ? S : x, B),
|
|
19712
|
+
c && (E.removeEventListener("keydown", $ ? y : b, $), E.removeEventListener("compositionstart", R), E.removeEventListener("compositionend", C)), A && E.removeEventListener(l, B ? S : x, B), k.forEach((F) => {
|
|
19713
19713
|
F.removeEventListener("scroll", v);
|
|
19714
|
-
}), window.clearTimeout(
|
|
19714
|
+
}), window.clearTimeout(D);
|
|
19715
19715
|
};
|
|
19716
19716
|
}, [s, o, c, A, l, n, r, p, i, P, N, b, $, y, x, B, S]), j.useEffect(() => {
|
|
19717
19717
|
s.current.insideReactTree = !1;
|
|
@@ -19719,12 +19719,12 @@ function G4(e, t) {
|
|
|
19719
19719
|
const O = j.useMemo(() => ({
|
|
19720
19720
|
onKeyDown: b,
|
|
19721
19721
|
...u && {
|
|
19722
|
-
[V4[f]]: (
|
|
19723
|
-
r(!1,
|
|
19722
|
+
[V4[f]]: (D) => {
|
|
19723
|
+
r(!1, D.nativeEvent, "reference-press");
|
|
19724
19724
|
},
|
|
19725
19725
|
...f !== "click" && {
|
|
19726
|
-
onClick(
|
|
19727
|
-
r(!1,
|
|
19726
|
+
onClick(D) {
|
|
19727
|
+
r(!1, D.nativeEvent, "reference-press");
|
|
19728
19728
|
}
|
|
19729
19729
|
}
|
|
19730
19730
|
}
|
|
@@ -19753,7 +19753,7 @@ function q4(e) {
|
|
|
19753
19753
|
} = e, o = Yl(), s = j.useRef({}), [i] = j.useState(() => B4()), c = Xl() != null;
|
|
19754
19754
|
if (process.env.NODE_ENV !== "production") {
|
|
19755
19755
|
const d = r.reference;
|
|
19756
|
-
d && !Ee(d) &&
|
|
19756
|
+
d && !Ee(d) && k4("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
19757
19757
|
}
|
|
19758
19758
|
const [a, l] = j.useState(r.reference), u = Zt((d, h, m) => {
|
|
19759
19759
|
s.current.openEvent = d ? h : void 0, i.emit("openchange", {
|
|
@@ -19859,7 +19859,7 @@ function Z4(e, t) {
|
|
|
19859
19859
|
if (!c) return;
|
|
19860
19860
|
const d = st(i.domReference);
|
|
19861
19861
|
function h() {
|
|
19862
|
-
!n && Je(i.domReference) && i.domReference ===
|
|
19862
|
+
!n && Je(i.domReference) && i.domReference === Dc(Yt(i.domReference)) && (l.current = !0);
|
|
19863
19863
|
}
|
|
19864
19864
|
function m() {
|
|
19865
19865
|
f.current = !0;
|
|
@@ -19893,7 +19893,7 @@ function Z4(e, t) {
|
|
|
19893
19893
|
const h = Er(d.nativeEvent);
|
|
19894
19894
|
if (a && Ee(h)) {
|
|
19895
19895
|
if (Sa() && !d.relatedTarget) {
|
|
19896
|
-
if (!f.current && !
|
|
19896
|
+
if (!f.current && !Dm(h))
|
|
19897
19897
|
return;
|
|
19898
19898
|
} else if (!y4(h))
|
|
19899
19899
|
return;
|
|
@@ -19905,7 +19905,7 @@ function Z4(e, t) {
|
|
|
19905
19905
|
const h = d.relatedTarget, m = d.nativeEvent, g = Ee(h) && h.hasAttribute(is("focus-guard")) && h.getAttribute("data-type") === "outside";
|
|
19906
19906
|
u.current = window.setTimeout(() => {
|
|
19907
19907
|
var A;
|
|
19908
|
-
const w =
|
|
19908
|
+
const w = Dc(i.domReference ? i.domReference.ownerDocument : document);
|
|
19909
19909
|
!h && w === i.domReference || Ur((A = s.current.floatingContext) == null ? void 0 : A.refs.floating.current, w) || Ur(i.domReference, w) || g || r(!1, m, "focus");
|
|
19910
19910
|
});
|
|
19911
19911
|
}
|
|
@@ -20638,7 +20638,7 @@ const iP = (e) => {
|
|
|
20638
20638
|
]);
|
|
20639
20639
|
};
|
|
20640
20640
|
function dP(e) {
|
|
20641
|
-
const { account: t, accountChainId: n, targetChainId: r, tokenInfo: o, amount: s } = e, { useReadContract: i, useWriteContract: c, usePublicClient: a, useSwitchChain: l } = e.wagmiHooks, u = o == null ? void 0 : o.tokenAddress, f = (o == null ? void 0 : o.decimals) ?? 18, p = o == null ? void 0 : o.contractAddress, d = !u || u.toLowerCase() === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", { switchChainAsync: h } = l(), { writeContractAsync: m } = c(), g = a(), A = i({
|
|
20641
|
+
const { account: t, accountChainId: n, targetChainId: r, tokenInfo: o, amount: s } = e, { useReadContract: i, useWriteContract: c, usePublicClient: a, useSwitchChain: l } = e.wagmiHooks, u = o == null ? void 0 : o.tokenAddress, f = (o == null ? void 0 : o.decimals) ?? 18, p = (o == null ? void 0 : o.approveSpender) || (o == null ? void 0 : o.contractAddress), d = !u || u.toLowerCase() === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", { switchChainAsync: h } = l(), { writeContractAsync: m } = c(), g = a(), A = i({
|
|
20642
20642
|
address: u,
|
|
20643
20643
|
abi: $r,
|
|
20644
20644
|
functionName: "allowance",
|
|
@@ -20875,7 +20875,7 @@ const pP = ({
|
|
|
20875
20875
|
decimals: 6,
|
|
20876
20876
|
fallbackFormatted: x,
|
|
20877
20877
|
pollingInterval: 12e3
|
|
20878
|
-
}), [O, I] = ie(!1), { approve:
|
|
20878
|
+
}), [O, I] = ie(!1), { approve: D, onApprove: v } = dP({
|
|
20879
20879
|
account: e,
|
|
20880
20880
|
accountChainId: p.chainId,
|
|
20881
20881
|
targetChainId: +t.chainId,
|
|
@@ -20897,7 +20897,7 @@ const pP = ({
|
|
|
20897
20897
|
Te(() => {
|
|
20898
20898
|
C && E();
|
|
20899
20899
|
}, [C, E]);
|
|
20900
|
-
const { showLayerZeroTip:
|
|
20900
|
+
const { showLayerZeroTip: k, layerZeroTipKey: F } = J(() => {
|
|
20901
20901
|
const K = +t.chainId == 42161 || +t.chainId == 421614, Q = (n == null ? void 0 : n.toUpperCase()) === "USDT", le = new _e(g || "0"), se = new _e("200000");
|
|
20902
20902
|
let ye = !1, Y;
|
|
20903
20903
|
if (K && Q && g)
|
|
@@ -20906,8 +20906,8 @@ const pP = ({
|
|
|
20906
20906
|
else {
|
|
20907
20907
|
const pe = S;
|
|
20908
20908
|
if (typeof pe == "string" && pe.length > 0) {
|
|
20909
|
-
const
|
|
20910
|
-
!
|
|
20909
|
+
const ke = new _e(pe);
|
|
20910
|
+
!ke.isNaN() && le.gte(ke) && (ye = !0, Y = "deposit.layerZeroDepositTipExceedPool");
|
|
20911
20911
|
}
|
|
20912
20912
|
}
|
|
20913
20913
|
return { showLayerZeroTip: ye, layerZeroTipKey: Y };
|
|
@@ -20944,10 +20944,10 @@ const pP = ({
|
|
|
20944
20944
|
}, [d == null ? void 0 : d.depositFeeRate]), xe = m && w === "fast" && !!ne, q = fP({
|
|
20945
20945
|
isNetworkMismatch: C,
|
|
20946
20946
|
depositAmount: g,
|
|
20947
|
-
approved:
|
|
20947
|
+
approved: D,
|
|
20948
20948
|
currentTokenBalance: B,
|
|
20949
20949
|
selectedToken: n,
|
|
20950
|
-
showLayerZeroTip:
|
|
20950
|
+
showLayerZeroTip: k,
|
|
20951
20951
|
minDeposit: d != null && d.minDepositSize ? parseFloat(d.minDepositSize) : 10
|
|
20952
20952
|
}), ae = (K) => {
|
|
20953
20953
|
const Q = K.target.value, le = z(), se = qs(Q, le);
|
|
@@ -21039,7 +21039,7 @@ const pP = ({
|
|
|
21039
21039
|
) })
|
|
21040
21040
|
] })
|
|
21041
21041
|
] }),
|
|
21042
|
-
!
|
|
21042
|
+
!D && eP(g || "0", 0) && /* @__PURE__ */ T.jsxs("div", { className: "flex justify-center flex-col items-center", children: [
|
|
21043
21043
|
/* @__PURE__ */ T.jsx("h3", { className: "text-text-primary text-sm leading-4 font-medium", children: f("deposit.enableSystemProWithToken", {
|
|
21044
21044
|
token: n,
|
|
21045
21045
|
network: t == null ? void 0 : t.chain
|
|
@@ -21060,7 +21060,7 @@ const pP = ({
|
|
|
21060
21060
|
}
|
|
21061
21061
|
)
|
|
21062
21062
|
] }),
|
|
21063
|
-
|
|
21063
|
+
k && /* @__PURE__ */ T.jsxs(T.Fragment, { children: [
|
|
21064
21064
|
/* @__PURE__ */ T.jsxs("div", { className: "flex mb-4", children: [
|
|
21065
21065
|
/* @__PURE__ */ T.jsx("div", { className: "w-5", children: /* @__PURE__ */ T.jsx("img", { src: uo, className: "w-4 h-4", alt: "Warning" }) }),
|
|
21066
21066
|
/* @__PURE__ */ T.jsx("div", { className: "flex-1 text-xs text-functional-orange-1", children: f(F || "deposit.layerZeroDepositTip") })
|
|
@@ -21073,7 +21073,7 @@ const pP = ({
|
|
|
21073
21073
|
] }),
|
|
21074
21074
|
U && /* @__PURE__ */ T.jsx("div", { className: "my-2 ml-5 h-px border-b border-dashed border-line-divider-secondary" }),
|
|
21075
21075
|
/* @__PURE__ */ T.jsxs("div", { className: "flex mb-4", children: [
|
|
21076
|
-
/* @__PURE__ */ T.jsx("div", { className: "w-5", children: !(U ||
|
|
21076
|
+
/* @__PURE__ */ T.jsx("div", { className: "w-5", children: !(U || k) && /* @__PURE__ */ T.jsx("img", { src: uo, className: "w-4 h-4", alt: "Warning" }) }),
|
|
21077
21077
|
/* @__PURE__ */ T.jsx("div", { className: "flex-1 text-xs text-functional-orange-1 whitespace-pre-line", children: f("deposit.noPrivateKeyWalletWarning") })
|
|
21078
21078
|
] }),
|
|
21079
21079
|
/* @__PURE__ */ T.jsxs("div", { className: "border-t border-line-divider-secondary border-dashed py-4", children: [
|
|
@@ -21215,15 +21215,15 @@ const pP = ({
|
|
|
21215
21215
|
if (!S || !Lc(S.account) || !(w === Ue.SPOT || w === Ue.PERPETUALV2)) return !1;
|
|
21216
21216
|
const ce = !!((Q = S.walletOptions) != null && Q.evm), K = !!((le = S.walletOptions) != null && le.mpc);
|
|
21217
21217
|
return ce && K;
|
|
21218
|
-
}, [S, w]),
|
|
21218
|
+
}, [S, w]), D = te(() => {
|
|
21219
21219
|
var q, ae;
|
|
21220
21220
|
return (q = S == null ? void 0 : S.walletOptions) != null && q.evm ? "evm" : (ae = S == null ? void 0 : S.walletOptions) != null && ae.mpc || S != null && S.account && fo(S.account) ? "mpc" : "evm";
|
|
21221
21221
|
}, [S]), [v, R] = ie(
|
|
21222
|
-
() => I ? null :
|
|
21222
|
+
() => I ? null : D()
|
|
21223
21223
|
);
|
|
21224
21224
|
Te(() => {
|
|
21225
|
-
R(I ? null :
|
|
21226
|
-
}, [w, I,
|
|
21225
|
+
R(I ? null : D());
|
|
21226
|
+
}, [w, I, D]);
|
|
21227
21227
|
const C = J(() => {
|
|
21228
21228
|
if (!S) return;
|
|
21229
21229
|
if (!I)
|
|
@@ -21234,7 +21234,7 @@ const pP = ({
|
|
|
21234
21234
|
}, [S, v, I]), E = J(
|
|
21235
21235
|
() => C && fo(C) ? yn : gi,
|
|
21236
21236
|
[C]
|
|
21237
|
-
),
|
|
21237
|
+
), k = O.find((q) => q.chainId === y) || O[0], [F, z] = ie(b), U = te(
|
|
21238
21238
|
(q) => {
|
|
21239
21239
|
x(q), f == null || f(q);
|
|
21240
21240
|
},
|
|
@@ -21309,13 +21309,13 @@ const pP = ({
|
|
|
21309
21309
|
const ce = N(ae);
|
|
21310
21310
|
if (!ce || ce.length === 0) return;
|
|
21311
21311
|
const K = ce.find(
|
|
21312
|
-
(
|
|
21312
|
+
(ke) => ke.chainId === y
|
|
21313
21313
|
), Q = K ? K.chainId : ce[0].chainId;
|
|
21314
21314
|
x(Q), f == null || f(Q);
|
|
21315
21315
|
const le = ce.find(
|
|
21316
|
-
(
|
|
21316
|
+
(ke) => ke.chainId === Q
|
|
21317
21317
|
), se = (le == null ? void 0 : le.tokenList) || [], Y = se.some(
|
|
21318
|
-
(
|
|
21318
|
+
(ke) => (ke.symbol || ke.token) === F
|
|
21319
21319
|
) ? F : ((pe = se[0]) == null ? void 0 : pe.symbol) || ((we = se[0]) == null ? void 0 : we.token) || "";
|
|
21320
21320
|
Y && (z(Y), p == null || p(Y));
|
|
21321
21321
|
},
|
|
@@ -21325,7 +21325,7 @@ const pP = ({
|
|
|
21325
21325
|
/* @__PURE__ */ T.jsx(
|
|
21326
21326
|
mm,
|
|
21327
21327
|
{
|
|
21328
|
-
currentActiveChain:
|
|
21328
|
+
currentActiveChain: k,
|
|
21329
21329
|
chainList: O,
|
|
21330
21330
|
onChainChange: U,
|
|
21331
21331
|
curSelectToken: F,
|
|
@@ -21377,7 +21377,7 @@ const pP = ({
|
|
|
21377
21377
|
Q4,
|
|
21378
21378
|
{
|
|
21379
21379
|
address: C.smartWalletAddress,
|
|
21380
|
-
currentActiveChain:
|
|
21380
|
+
currentActiveChain: k,
|
|
21381
21381
|
selectedToken: F,
|
|
21382
21382
|
accountType: w,
|
|
21383
21383
|
accountId: C.accountId,
|
|
@@ -21391,7 +21391,7 @@ const pP = ({
|
|
|
21391
21391
|
mP,
|
|
21392
21392
|
{
|
|
21393
21393
|
address: C.ethAddress,
|
|
21394
|
-
currentActiveChain:
|
|
21394
|
+
currentActiveChain: k,
|
|
21395
21395
|
selectedToken: F,
|
|
21396
21396
|
accountType: w,
|
|
21397
21397
|
accountId: C.accountId,
|
|
@@ -21554,15 +21554,15 @@ const pP = ({
|
|
|
21554
21554
|
content: /* @__PURE__ */ T.jsxs("div", { children: [
|
|
21555
21555
|
/* @__PURE__ */ T.jsx("div", { children: d("withdraw.speedNote") }),
|
|
21556
21556
|
/* @__PURE__ */ T.jsxs("div", { className: "flex gap-1 items-center mt-1", children: [
|
|
21557
|
-
/* @__PURE__ */ T.jsx(so, { selectedLevel:
|
|
21557
|
+
/* @__PURE__ */ T.jsx(so, { selectedLevel: kt.FAST, maxLevel: 3 }),
|
|
21558
21558
|
/* @__PURE__ */ T.jsx("span", { children: d("withdraw.speedNoteSpeed1") })
|
|
21559
21559
|
] }),
|
|
21560
21560
|
/* @__PURE__ */ T.jsxs("div", { className: "flex gap-1 items-center mt-1", children: [
|
|
21561
|
-
/* @__PURE__ */ T.jsx(so, { selectedLevel:
|
|
21561
|
+
/* @__PURE__ */ T.jsx(so, { selectedLevel: kt.Medium, maxLevel: 3 }),
|
|
21562
21562
|
/* @__PURE__ */ T.jsx("span", { children: d("withdraw.speedNoteSpeed2") })
|
|
21563
21563
|
] }),
|
|
21564
21564
|
/* @__PURE__ */ T.jsxs("div", { className: "flex gap-1 items-center mt-1", children: [
|
|
21565
|
-
/* @__PURE__ */ T.jsx(so, { selectedLevel:
|
|
21565
|
+
/* @__PURE__ */ T.jsx(so, { selectedLevel: kt.SLOW, maxLevel: 3 }),
|
|
21566
21566
|
/* @__PURE__ */ T.jsx("span", { children: d("withdraw.speedNoteSpeed3") })
|
|
21567
21567
|
] })
|
|
21568
21568
|
] }),
|
|
@@ -21572,7 +21572,7 @@ const pP = ({
|
|
|
21572
21572
|
/* @__PURE__ */ T.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ T.jsx(
|
|
21573
21573
|
so,
|
|
21574
21574
|
{
|
|
21575
|
-
selectedLevel: pn(r == null ? void 0 : r.chainId) ?
|
|
21575
|
+
selectedLevel: pn(r == null ? void 0 : r.chainId) ? kt.SLOW : kt.FAST,
|
|
21576
21576
|
maxLevel: 3
|
|
21577
21577
|
}
|
|
21578
21578
|
) })
|
|
@@ -21781,8 +21781,8 @@ const vP = (e) => {
|
|
|
21781
21781
|
), x = J(() => {
|
|
21782
21782
|
var Ht, Ce;
|
|
21783
21783
|
if (!b || !Lc(b.account) || !($ === Ue.SPOT || $ === Ue.PERPETUALV2)) return !1;
|
|
21784
|
-
const we = !!((Ht = b.walletOptions) != null && Ht.evm),
|
|
21785
|
-
return we &&
|
|
21784
|
+
const we = !!((Ht = b.walletOptions) != null && Ht.evm), ke = !!((Ce = b.walletOptions) != null && Ce.mpc);
|
|
21785
|
+
return we && ke;
|
|
21786
21786
|
}, [b, $]), S = te(() => {
|
|
21787
21787
|
var Y, pe;
|
|
21788
21788
|
return (Y = b == null ? void 0 : b.walletOptions) != null && Y.evm ? "evm" : (pe = b == null ? void 0 : b.walletOptions) != null && pe.mpc || b != null && b.account && fo(b.account) ? "mpc" : "evm";
|
|
@@ -21792,14 +21792,14 @@ const vP = (e) => {
|
|
|
21792
21792
|
Te(() => {
|
|
21793
21793
|
I(x ? null : S());
|
|
21794
21794
|
}, [$, x, S]);
|
|
21795
|
-
const
|
|
21795
|
+
const D = J(() => {
|
|
21796
21796
|
if (!b) return;
|
|
21797
21797
|
if (!x)
|
|
21798
21798
|
return b.account;
|
|
21799
21799
|
if (!O) return;
|
|
21800
21800
|
const Y = b.walletOptions;
|
|
21801
21801
|
return O === "mpc" ? (Y == null ? void 0 : Y.mpc) || b.account : (Y == null ? void 0 : Y.evm) || b.account;
|
|
21802
|
-
}, [b, x, O]), v = J(() =>
|
|
21802
|
+
}, [b, x, O]), v = J(() => D && fo(D) ? "mpc" : "evm", [D]), R = v === "mpc" ? yn : gi, C = J(() => {
|
|
21803
21803
|
if (!y || y.length === 0)
|
|
21804
21804
|
return { chainId: 1, tokenSymbol: "" };
|
|
21805
21805
|
const Y = (Ce) => {
|
|
@@ -21829,18 +21829,18 @@ const vP = (e) => {
|
|
|
21829
21829
|
}
|
|
21830
21830
|
const pe = "USDC", we = (Ce) => Array.isArray(Ce.tokenList) && Ce.tokenList.some(
|
|
21831
21831
|
(ze) => (ze.token || ze.symbol || "").toUpperCase() === pe
|
|
21832
|
-
),
|
|
21833
|
-
if (!
|
|
21832
|
+
), ke = y.find(we) || y[0];
|
|
21833
|
+
if (!ke)
|
|
21834
21834
|
return { chainId: 1, tokenSymbol: "" };
|
|
21835
|
-
const Ht = Y(
|
|
21836
|
-
return { chainId:
|
|
21837
|
-
}, [y, t, n]), [E,
|
|
21835
|
+
const Ht = Y(ke.tokenList);
|
|
21836
|
+
return { chainId: ke.chainId, tokenSymbol: Ht };
|
|
21837
|
+
}, [y, t, n]), [E, k] = ie(
|
|
21838
21838
|
() => C.chainId
|
|
21839
21839
|
), [F, z] = ie(
|
|
21840
21840
|
() => C.tokenSymbol
|
|
21841
21841
|
), [U, H] = ie(r), [ee, G] = ie(""), _ = te(
|
|
21842
21842
|
(Y) => {
|
|
21843
|
-
|
|
21843
|
+
k(Y), p == null || p(Y);
|
|
21844
21844
|
},
|
|
21845
21845
|
[p]
|
|
21846
21846
|
), ne = te(
|
|
@@ -21933,8 +21933,8 @@ const vP = (e) => {
|
|
|
21933
21933
|
B(pe), m == null || m(pe);
|
|
21934
21934
|
const we = M(pe);
|
|
21935
21935
|
if (!we || we.length === 0) return;
|
|
21936
|
-
const
|
|
21937
|
-
|
|
21936
|
+
const ke = we.find(($t) => $t.chainId === E), Ht = ke ? ke.chainId : we[0].chainId;
|
|
21937
|
+
k(Ht), p == null || p(Ht);
|
|
21938
21938
|
const Ce = we.find(
|
|
21939
21939
|
($t) => $t.chainId === Ht
|
|
21940
21940
|
), ze = (Ce == null ? void 0 : Ce.tokenList) || [], Ke = ze.some(
|
|
@@ -22146,7 +22146,7 @@ export {
|
|
|
22146
22146
|
md as S,
|
|
22147
22147
|
Fn as T,
|
|
22148
22148
|
TP as W,
|
|
22149
|
-
|
|
22149
|
+
kv as a,
|
|
22150
22150
|
on as b,
|
|
22151
22151
|
ui as c,
|
|
22152
22152
|
Fg as d,
|
|
@@ -22173,4 +22173,4 @@ export {
|
|
|
22173
22173
|
yP as y,
|
|
22174
22174
|
vP as z
|
|
22175
22175
|
};
|
|
22176
|
-
//# sourceMappingURL=index-
|
|
22176
|
+
//# sourceMappingURL=index-BJxeI_Vg.mjs.map
|