@dhedge/trading-widget 4.5.1 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +9 -9
- package/index.js +533 -533
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,13 +2,13 @@ var fx = Object.defineProperty;
|
|
|
2
2
|
var hx = (t, e, n) => e in t ? fx(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var Io = (t, e, n) => hx(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { jsx as p, jsxs as B, Fragment as Te } from "react/jsx-runtime";
|
|
5
|
-
import { useAccount as Tv, useConfig as yx, useSwitchChain as wx, useReadContract as Cr, useBalance as vx, useWalletClient as bx, usePublicClient as
|
|
5
|
+
import { useAccount as Tv, useConfig as yx, useSwitchChain as wx, useReadContract as Cr, useBalance as vx, useWalletClient as bx, usePublicClient as Fu, useWriteContract as gx, useEstimateFeesPerGas as Tx, useBlockNumber as xx, useCapabilities as Ex, useReadContracts as Ut, useConnect as xv, useWaitForTransactionReceipt as Ev, useWaitForCallsStatus as Ax, useSimulateContract as Sx, useSendCalls as Ox } from "wagmi";
|
|
6
6
|
import { useBlockNumber as M6, useConnect as B6, useDisconnect as F6, usePublicClient as W6, useReadContract as U6, useReadContracts as H6, useSendTransaction as z6, useWaitForTransactionReceipt as V6, useWalletClient as G6, useWriteContract as j6 } from "wagmi";
|
|
7
7
|
import * as F from "react";
|
|
8
|
-
import G, { useRef as pe, useCallback as Y, useEffect as se, useState as ce, useMemo as K, useLayoutEffect as
|
|
9
|
-
import { erc20Abi as wn, stringToHex as
|
|
8
|
+
import G, { useRef as pe, useCallback as Y, useEffect as se, useState as ce, useMemo as K, useLayoutEffect as Wu, useContext as ye, createContext as be, forwardRef as Av, Fragment as ht, isValidElement as Sv, cloneElement as Cx, createElement as Dx, useId as lt, useReducer as Ko, useSyncExternalStore as Px, createRef as Ix, Children as _x } from "react";
|
|
9
|
+
import { erc20Abi as wn, stringToHex as Uu, encodeAbiParameters as Hy, formatUnits as jn, encodeFunctionData as Ov, formatEther as Cv, getAddress as pc, SwitchChainError as zy, numberToHex as Vy, UserRejectedRequestError as yr, withRetry as Lx, withTimeout as Nx, ResourceUnavailableRpcError as kd, encodePacked as Rx, keccak256 as kx } from "viem";
|
|
10
10
|
import { decodeErrorResult as q6, encodeFunctionData as K6, erc20Abi as X6, formatEther as Q6, formatUnits as Z6, hexToString as J6, trim as eB } from "viem";
|
|
11
|
-
import { useQuery as
|
|
11
|
+
import { useQuery as Hu, useQueryClient as zu } from "@tanstack/react-query";
|
|
12
12
|
import * as Sl from "react-dom";
|
|
13
13
|
import { createPortal as Dv } from "react-dom";
|
|
14
14
|
const Pv = typeof document < "u" ? G.useLayoutEffect : () => {
|
|
@@ -35,11 +35,11 @@ function Bx(t) {
|
|
|
35
35
|
return Mx(t) && t.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in t;
|
|
36
36
|
}
|
|
37
37
|
let Fx = !1;
|
|
38
|
-
function
|
|
38
|
+
function Vu() {
|
|
39
39
|
return Fx;
|
|
40
40
|
}
|
|
41
41
|
function Iv(t, e) {
|
|
42
|
-
if (!
|
|
42
|
+
if (!Vu()) return e && t ? t.contains(e) : !1;
|
|
43
43
|
if (!t || !e) return !1;
|
|
44
44
|
let n = e;
|
|
45
45
|
for (; n !== null; ) {
|
|
@@ -48,21 +48,21 @@ function Iv(t, e) {
|
|
|
48
48
|
}
|
|
49
49
|
return !1;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const fu = (t = document) => {
|
|
52
52
|
var e;
|
|
53
|
-
if (!
|
|
53
|
+
if (!Vu()) return t.activeElement;
|
|
54
54
|
let n = t.activeElement;
|
|
55
55
|
for (; n && "shadowRoot" in n && (!((e = n.shadowRoot) === null || e === void 0) && e.activeElement); ) n = n.shadowRoot.activeElement;
|
|
56
56
|
return n;
|
|
57
57
|
};
|
|
58
58
|
function _v(t) {
|
|
59
|
-
return
|
|
59
|
+
return Vu() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
|
|
60
60
|
}
|
|
61
61
|
function Qc(t) {
|
|
62
62
|
var e;
|
|
63
63
|
return typeof window > "u" || window.navigator == null ? !1 : ((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands.some((n) => t.test(n.brand))) || t.test(window.navigator.userAgent);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Gu(t) {
|
|
66
66
|
var e;
|
|
67
67
|
return typeof window < "u" && window.navigator != null ? t.test(((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.platform) || window.navigator.platform) : !1;
|
|
68
68
|
}
|
|
@@ -71,18 +71,18 @@ function Dr(t) {
|
|
|
71
71
|
let e = null;
|
|
72
72
|
return () => (e == null && (e = t()), e);
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
return
|
|
74
|
+
const ju = Dr(function() {
|
|
75
|
+
return Gu(/^Mac/i);
|
|
76
76
|
}), Wx = Dr(function() {
|
|
77
|
-
return
|
|
77
|
+
return Gu(/^iPhone/i);
|
|
78
78
|
}), Ux = Dr(function() {
|
|
79
|
-
return
|
|
80
|
-
|
|
79
|
+
return Gu(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
80
|
+
ju() && navigator.maxTouchPoints > 1;
|
|
81
81
|
}), Hx = Dr(function() {
|
|
82
82
|
return Wx() || Ux();
|
|
83
83
|
});
|
|
84
84
|
Dr(function() {
|
|
85
|
-
return
|
|
85
|
+
return ju() || Hx();
|
|
86
86
|
});
|
|
87
87
|
Dr(function() {
|
|
88
88
|
return Qc(/AppleWebKit/i) && !zx();
|
|
@@ -189,33 +189,33 @@ function Rv(t) {
|
|
|
189
189
|
n
|
|
190
190
|
]);
|
|
191
191
|
}
|
|
192
|
-
let Yx = !1, $l = null,
|
|
192
|
+
let Yx = !1, $l = null, hu = /* @__PURE__ */ new Set(), yl = /* @__PURE__ */ new Map(), Uo = !1, yu = !1;
|
|
193
193
|
const qx = {
|
|
194
194
|
Tab: !0,
|
|
195
195
|
Escape: !0
|
|
196
196
|
};
|
|
197
|
-
function
|
|
198
|
-
for (let n of
|
|
197
|
+
function Yu(t, e) {
|
|
198
|
+
for (let n of hu) n(t, e);
|
|
199
199
|
}
|
|
200
200
|
function Kx(t) {
|
|
201
|
-
return !(t.metaKey || !
|
|
201
|
+
return !(t.metaKey || !ju() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
|
202
202
|
}
|
|
203
203
|
function Ic(t) {
|
|
204
|
-
Uo = !0, Kx(t) && ($l = "keyboard",
|
|
204
|
+
Uo = !0, Kx(t) && ($l = "keyboard", Yu("keyboard", t));
|
|
205
205
|
}
|
|
206
206
|
function Jt(t) {
|
|
207
|
-
$l = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (Uo = !0,
|
|
207
|
+
$l = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (Uo = !0, Yu("pointer", t));
|
|
208
208
|
}
|
|
209
209
|
function kv(t) {
|
|
210
210
|
Gx(t) && (Uo = !0, $l = "virtual");
|
|
211
211
|
}
|
|
212
212
|
function $v(t) {
|
|
213
|
-
t.target === window || t.target === document || Yx || !t.isTrusted || (!Uo && !
|
|
213
|
+
t.target === window || t.target === document || Yx || !t.isTrusted || (!Uo && !yu && ($l = "virtual", Yu("virtual", t)), Uo = !1, yu = !1);
|
|
214
214
|
}
|
|
215
215
|
function Mv() {
|
|
216
|
-
Uo = !1,
|
|
216
|
+
Uo = !1, yu = !0;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function wu(t) {
|
|
219
219
|
if (typeof window > "u" || typeof document > "u" || yl.get(ko(t))) return;
|
|
220
220
|
const e = ko(t), n = ia(t);
|
|
221
221
|
let r = e.HTMLElement.prototype.focus;
|
|
@@ -236,8 +236,8 @@ const Bv = (t, e) => {
|
|
|
236
236
|
function Xx(t) {
|
|
237
237
|
const e = ia(t);
|
|
238
238
|
let n;
|
|
239
|
-
return e.readyState !== "loading" ?
|
|
240
|
-
|
|
239
|
+
return e.readyState !== "loading" ? wu(t) : (n = () => {
|
|
240
|
+
wu(t);
|
|
241
241
|
}, e.addEventListener("DOMContentLoaded", n)), () => Bv(t, n);
|
|
242
242
|
}
|
|
243
243
|
typeof document < "u" && Xx();
|
|
@@ -261,12 +261,12 @@ function Zx(t, e, n) {
|
|
|
261
261
|
return t = t || r.activeElement instanceof a && !Qx.has(r.activeElement.type) || r.activeElement instanceof o || r.activeElement instanceof s && r.activeElement.isContentEditable, !(t && e === "keyboard" && n instanceof i && !qx[n.key]);
|
|
262
262
|
}
|
|
263
263
|
function Jx(t, e, n) {
|
|
264
|
-
|
|
264
|
+
wu(), se(() => {
|
|
265
265
|
let r = (a, o) => {
|
|
266
266
|
Zx(!!(n != null && n.isTextInput), a, o) && t(Fv());
|
|
267
267
|
};
|
|
268
|
-
return
|
|
269
|
-
|
|
268
|
+
return hu.add(r), () => {
|
|
269
|
+
hu.delete(r);
|
|
270
270
|
};
|
|
271
271
|
}, e);
|
|
272
272
|
}
|
|
@@ -279,7 +279,7 @@ function e1(t) {
|
|
|
279
279
|
r,
|
|
280
280
|
a
|
|
281
281
|
]), s = Rv(o), i = Y((l) => {
|
|
282
|
-
const c = ia(l.target), d = c ?
|
|
282
|
+
const c = ia(l.target), d = c ? fu(c) : fu();
|
|
283
283
|
l.target === l.currentTarget && d === _v(l.nativeEvent) && (n && n(l), a && a(!0), s(l));
|
|
284
284
|
}, [
|
|
285
285
|
a,
|
|
@@ -305,7 +305,7 @@ function t1(t) {
|
|
|
305
305
|
i
|
|
306
306
|
]), c = Rv(l), d = Y((u) => {
|
|
307
307
|
if (!u.currentTarget.contains(u.target)) return;
|
|
308
|
-
const f = ia(u.target), m =
|
|
308
|
+
const f = ia(u.target), m = fu(f);
|
|
309
309
|
if (!o.current.isFocusWithin && m === _v(u.nativeEvent)) {
|
|
310
310
|
r && r(u), a && a(!0), o.current.isFocusWithin = !0, c(u);
|
|
311
311
|
let h = u.currentTarget;
|
|
@@ -342,19 +342,19 @@ function t1(t) {
|
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
|
-
let _c = !1,
|
|
346
|
-
function
|
|
345
|
+
let _c = !1, $d = 0;
|
|
346
|
+
function vu() {
|
|
347
347
|
_c = !0, setTimeout(() => {
|
|
348
348
|
_c = !1;
|
|
349
349
|
}, 50);
|
|
350
350
|
}
|
|
351
351
|
function Gy(t) {
|
|
352
|
-
t.pointerType === "touch" &&
|
|
352
|
+
t.pointerType === "touch" && vu();
|
|
353
353
|
}
|
|
354
354
|
function n1() {
|
|
355
355
|
if (!(typeof document > "u"))
|
|
356
|
-
return typeof PointerEvent < "u" ? document.addEventListener("pointerup", Gy) : process.env.NODE_ENV === "test" && document.addEventListener("touchend",
|
|
357
|
-
|
|
356
|
+
return typeof PointerEvent < "u" ? document.addEventListener("pointerup", Gy) : process.env.NODE_ENV === "test" && document.addEventListener("touchend", vu), $d++, () => {
|
|
357
|
+
$d--, !($d > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", Gy) : process.env.NODE_ENV === "test" && document.removeEventListener("touchend", vu));
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
function Ml(t) {
|
|
@@ -448,10 +448,10 @@ function fs(t = {}) {
|
|
|
448
448
|
focusProps: r ? f : u
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
|
-
var r1 = Object.defineProperty, a1 = (t, e, n) => e in t ? r1(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n,
|
|
451
|
+
var r1 = Object.defineProperty, a1 = (t, e, n) => e in t ? r1(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Md = (t, e, n) => (a1(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
452
452
|
let o1 = class {
|
|
453
453
|
constructor() {
|
|
454
|
-
|
|
454
|
+
Md(this, "current", this.detect()), Md(this, "handoffState", "pending"), Md(this, "currentId", 0);
|
|
455
455
|
}
|
|
456
456
|
set(e) {
|
|
457
457
|
this.current !== e && (this.handoffState = "pending", this.currentId = 0, this.current = e);
|
|
@@ -528,7 +528,7 @@ function ca() {
|
|
|
528
528
|
return se(() => () => t.dispose(), [t]), t;
|
|
529
529
|
}
|
|
530
530
|
let Be = (t, e) => {
|
|
531
|
-
Bo.isServer ? se(t, e) :
|
|
531
|
+
Bo.isServer ? se(t, e) : Wu(t, e);
|
|
532
532
|
};
|
|
533
533
|
function Mt(t) {
|
|
534
534
|
let e = pe(t);
|
|
@@ -573,7 +573,7 @@ function Wl() {
|
|
|
573
573
|
function l1({ value: t, children: e }) {
|
|
574
574
|
return G.createElement(Wv.Provider, { value: t }, e);
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function bu(...t) {
|
|
577
577
|
return Array.from(new Set(t.flatMap((e) => typeof e == "string" ? e.split(" ") : []))).filter(Boolean).join(" ");
|
|
578
578
|
}
|
|
579
579
|
function qe(t, e, ...n) {
|
|
@@ -609,7 +609,7 @@ function c1({ ourProps: t, theirProps: e, slot: n, defaultTag: r, features: a, v
|
|
|
609
609
|
return mc(l, n, r, s, i);
|
|
610
610
|
}
|
|
611
611
|
function mc(t, e = {}, n, r, a) {
|
|
612
|
-
let { as: o = n, children: s, refName: i = "ref", ...l } =
|
|
612
|
+
let { as: o = n, children: s, refName: i = "ref", ...l } = Bd(t, ["unmount", "static"]), c = t.ref !== void 0 ? { [i]: t.ref } : {}, d = typeof s == "function" ? s(e) : s;
|
|
613
613
|
"className" in l && l.className && typeof l.className == "function" && (l.className = l.className(e)), l["aria-labelledby"] && l["aria-labelledby"] === l.id && (l["aria-labelledby"] = void 0);
|
|
614
614
|
let u = {};
|
|
615
615
|
if (e) {
|
|
@@ -626,11 +626,11 @@ function mc(t, e = {}, n, r, a) {
|
|
|
626
626
|
`)].join(`
|
|
627
627
|
`));
|
|
628
628
|
} else {
|
|
629
|
-
let f = d.props, m = f == null ? void 0 : f.className, h = typeof m == "function" ? (...D) =>
|
|
629
|
+
let f = d.props, m = f == null ? void 0 : f.className, h = typeof m == "function" ? (...D) => bu(m(...D), l.className) : bu(m, l.className), b = h ? { className: h } : {}, x = Uv(d.props, ea(Bd(l, ["ref"])));
|
|
630
630
|
for (let D in u) D in x && delete u[D];
|
|
631
631
|
return Cx(d, Object.assign({}, x, u, c, { ref: a(p1(d), c.ref) }, b));
|
|
632
632
|
}
|
|
633
|
-
return Dx(o, Object.assign({},
|
|
633
|
+
return Dx(o, Object.assign({}, Bd(l, ["ref"]), o !== ht && c, o !== ht && u), d);
|
|
634
634
|
}
|
|
635
635
|
function d1() {
|
|
636
636
|
let t = pe([]), e = Y((n) => {
|
|
@@ -683,7 +683,7 @@ function ea(t) {
|
|
|
683
683
|
for (let n in e) e[n] === void 0 && delete e[n];
|
|
684
684
|
return e;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Bd(t, e = []) {
|
|
687
687
|
let n = Object.assign({}, t);
|
|
688
688
|
for (let r of e) r in n && delete n[r];
|
|
689
689
|
return n;
|
|
@@ -758,7 +758,7 @@ function w1({ setForm: t, formId: e }) {
|
|
|
758
758
|
} });
|
|
759
759
|
}
|
|
760
760
|
let Xv = be(void 0);
|
|
761
|
-
function
|
|
761
|
+
function qu() {
|
|
762
762
|
return ye(Xv);
|
|
763
763
|
}
|
|
764
764
|
function v1({ id: t, children: e }) {
|
|
@@ -785,7 +785,7 @@ function g1(t) {
|
|
|
785
785
|
function Zv(t) {
|
|
786
786
|
return _t(t) && t.nodeName === "INPUT";
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function gu(t) {
|
|
789
789
|
return _t(t) && t.nodeName === "LABEL";
|
|
790
790
|
}
|
|
791
791
|
function T1(t) {
|
|
@@ -813,7 +813,7 @@ function E1(t) {
|
|
|
813
813
|
return !0;
|
|
814
814
|
}
|
|
815
815
|
let eb = Symbol();
|
|
816
|
-
function
|
|
816
|
+
function Ku(t, e = !0) {
|
|
817
817
|
return Object.assign(t, { [eb]: e });
|
|
818
818
|
}
|
|
819
819
|
function Ue(...t) {
|
|
@@ -840,7 +840,7 @@ function nb() {
|
|
|
840
840
|
var t, e;
|
|
841
841
|
return (e = (t = ye(Zc)) == null ? void 0 : t.value) != null ? e : void 0;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Xu() {
|
|
844
844
|
let [t, e] = ce([]);
|
|
845
845
|
return [t.length > 0 ? t.join(" ") : void 0, K(() => function(n) {
|
|
846
846
|
let r = Z((o) => (e((s) => [...s, o]), () => e((s) => {
|
|
@@ -869,13 +869,13 @@ function ab() {
|
|
|
869
869
|
}
|
|
870
870
|
return t;
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function Qu(t) {
|
|
873
873
|
var e, n, r;
|
|
874
874
|
let a = (n = (e = ye(Jc)) == null ? void 0 : e.value) != null ? n : void 0;
|
|
875
875
|
return ((r = void 0) != null ? r : 0) > 0 ? [a, ...t].filter(Boolean).join(" ") : a;
|
|
876
876
|
}
|
|
877
877
|
function ob({ inherit: t = !1 } = {}) {
|
|
878
|
-
let e =
|
|
878
|
+
let e = Qu(), [n, r] = ce([]), a = t ? [e, ...n].filter(Boolean) : n;
|
|
879
879
|
return [a.length > 0 ? a.join(" ") : void 0, K(() => function(o) {
|
|
880
880
|
let s = Z((l) => (r((c) => [...c, l]), () => r((c) => {
|
|
881
881
|
let d = c.slice(), u = d.indexOf(l);
|
|
@@ -887,11 +887,11 @@ function ob({ inherit: t = !1 } = {}) {
|
|
|
887
887
|
let C1 = "label";
|
|
888
888
|
function D1(t, e) {
|
|
889
889
|
var n;
|
|
890
|
-
let r = lt(), a = ab(), o =
|
|
890
|
+
let r = lt(), a = ab(), o = qu(), s = Wl(), { id: i = `headlessui-label-${r}`, htmlFor: l = o ?? ((n = a.props) == null ? void 0 : n.htmlFor), passive: c = !1, ...d } = t, u = Ue(e);
|
|
891
891
|
Be(() => a.register(i), [i, a.register]);
|
|
892
892
|
let f = Z((x) => {
|
|
893
893
|
let D = x.currentTarget;
|
|
894
|
-
if (!(x.target !== x.currentTarget && x1(x.target)) && (
|
|
894
|
+
if (!(x.target !== x.currentTarget && x1(x.target)) && (gu(D) && x.preventDefault(), a.props && "onClick" in a.props && typeof a.props.onClick == "function" && a.props.onClick(x), gu(D))) {
|
|
895
895
|
let T = document.getElementById(D.htmlFor);
|
|
896
896
|
if (T) {
|
|
897
897
|
let O = T.getAttribute("disabled");
|
|
@@ -904,9 +904,9 @@ function D1(t, e) {
|
|
|
904
904
|
}), m = s || !1, h = K(() => ({ ...a.slot, disabled: m }), [a.slot, m]), b = { ref: u, ...a.props, id: i, htmlFor: l, onClick: f };
|
|
905
905
|
return c && ("onClick" in b && (delete b.htmlFor, delete b.onClick), "onClick" in d && delete d.onClick), Ce()({ ourProps: b, theirProps: d, slot: h, defaultTag: l ? C1 : "div", name: a.name || "Label" });
|
|
906
906
|
}
|
|
907
|
-
let P1 = Ae(D1),
|
|
907
|
+
let P1 = Ae(D1), Zu = Object.assign(P1, {}), I1 = "span";
|
|
908
908
|
function _1(t, e) {
|
|
909
|
-
let n = lt(), r =
|
|
909
|
+
let n = lt(), r = qu(), a = Wl(), { id: o = r || `headlessui-checkbox-${n}`, disabled: s = a || !1, autoFocus: i = !1, checked: l, defaultChecked: c, onChange: d, name: u, value: f, form: m, indeterminate: h = !1, tabIndex: b = 0, ...x } = t, D = zv(c), [T, O] = Hv(l, d, D ?? !1), R = Qu(), k = nb(), M = ca(), [W, y] = ce(!1), v = Z(() => {
|
|
910
910
|
y(!0), O == null || O(!T), M.nextFrame(() => {
|
|
911
911
|
y(!1);
|
|
912
912
|
});
|
|
@@ -951,13 +951,13 @@ let sb = class extends Map {
|
|
|
951
951
|
};
|
|
952
952
|
var $1 = Object.defineProperty, M1 = (t, e, n) => e in t ? $1(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, B1 = (t, e, n) => (M1(t, e + "", n), n), ib = (t, e, n) => {
|
|
953
953
|
if (!e.has(t)) throw TypeError("Cannot " + n);
|
|
954
|
-
}, qt = (t, e, n) => (ib(t, e, "read from private field"), n ? n.call(t) : e.get(t)),
|
|
954
|
+
}, qt = (t, e, n) => (ib(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Fd = (t, e, n) => {
|
|
955
955
|
if (e.has(t)) throw TypeError("Cannot add the same private member more than once");
|
|
956
956
|
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
957
957
|
}, jy = (t, e, n, r) => (ib(t, e, "write to private field"), e.set(t, n), n), Hn, fl, hl;
|
|
958
958
|
let lb = class {
|
|
959
959
|
constructor(e) {
|
|
960
|
-
|
|
960
|
+
Fd(this, Hn, {}), Fd(this, fl, new sb(() => /* @__PURE__ */ new Set())), Fd(this, hl, /* @__PURE__ */ new Set()), B1(this, "disposables", Pr()), jy(this, Hn, e);
|
|
961
961
|
}
|
|
962
962
|
dispose() {
|
|
963
963
|
this.disposables.dispose();
|
|
@@ -990,9 +990,9 @@ let lb = class {
|
|
|
990
990
|
};
|
|
991
991
|
Hn = /* @__PURE__ */ new WeakMap(), fl = /* @__PURE__ */ new WeakMap(), hl = /* @__PURE__ */ new WeakMap();
|
|
992
992
|
function cb(t, e) {
|
|
993
|
-
return Object.is(t, e) ? !0 : typeof t != "object" || t === null || typeof e != "object" || e === null ? !1 : Array.isArray(t) && Array.isArray(e) ? t.length !== e.length ? !1 :
|
|
993
|
+
return Object.is(t, e) ? !0 : typeof t != "object" || t === null || typeof e != "object" || e === null ? !1 : Array.isArray(t) && Array.isArray(e) ? t.length !== e.length ? !1 : Wd(t[Symbol.iterator](), e[Symbol.iterator]()) : t instanceof Map && e instanceof Map || t instanceof Set && e instanceof Set ? t.size !== e.size ? !1 : Wd(t.entries(), e.entries()) : Yy(t) && Yy(e) ? Wd(Object.entries(t)[Symbol.iterator](), Object.entries(e)[Symbol.iterator]()) : !1;
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function Wd(t, e) {
|
|
996
996
|
do {
|
|
997
997
|
let n = t.next(), r = e.next();
|
|
998
998
|
if (n.done && r.done) return !0;
|
|
@@ -1028,12 +1028,12 @@ let H1 = { 0(t, e) {
|
|
|
1028
1028
|
return qe(n.type, H1, e, n);
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
|
-
const
|
|
1031
|
+
const Ju = new sb(() => z1.new());
|
|
1032
1032
|
var fc = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1033
1033
|
function Hl(t) {
|
|
1034
1034
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1035
1035
|
}
|
|
1036
|
-
var
|
|
1036
|
+
var Tu = { exports: {} }, Ud = {};
|
|
1037
1037
|
/**
|
|
1038
1038
|
* @license React
|
|
1039
1039
|
* use-sync-external-store-with-selector.production.js
|
|
@@ -1045,14 +1045,14 @@ var gu = { exports: {} }, Wd = {};
|
|
|
1045
1045
|
*/
|
|
1046
1046
|
var Ky;
|
|
1047
1047
|
function V1() {
|
|
1048
|
-
if (Ky) return
|
|
1048
|
+
if (Ky) return Ud;
|
|
1049
1049
|
Ky = 1;
|
|
1050
1050
|
var t = G;
|
|
1051
1051
|
function e(l, c) {
|
|
1052
1052
|
return l === c && (l !== 0 || 1 / l === 1 / c) || l !== l && c !== c;
|
|
1053
1053
|
}
|
|
1054
1054
|
var n = typeof Object.is == "function" ? Object.is : e, r = t.useSyncExternalStore, a = t.useRef, o = t.useEffect, s = t.useMemo, i = t.useDebugValue;
|
|
1055
|
-
return
|
|
1055
|
+
return Ud.useSyncExternalStoreWithSelector = function(l, c, d, u, f) {
|
|
1056
1056
|
var m = a(null);
|
|
1057
1057
|
if (m.current === null) {
|
|
1058
1058
|
var h = { hasValue: !1, value: null };
|
|
@@ -1092,9 +1092,9 @@ function V1() {
|
|
|
1092
1092
|
},
|
|
1093
1093
|
[b]
|
|
1094
1094
|
), i(b), b;
|
|
1095
|
-
},
|
|
1095
|
+
}, Ud;
|
|
1096
1096
|
}
|
|
1097
|
-
var
|
|
1097
|
+
var Hd = {};
|
|
1098
1098
|
/**
|
|
1099
1099
|
* @license React
|
|
1100
1100
|
* use-sync-external-store-with-selector.development.js
|
|
@@ -1112,7 +1112,7 @@ function G1() {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1114
1114
|
var e = G, n = typeof Object.is == "function" ? Object.is : t, r = e.useSyncExternalStore, a = e.useRef, o = e.useEffect, s = e.useMemo, i = e.useDebugValue;
|
|
1115
|
-
|
|
1115
|
+
Hd.useSyncExternalStoreWithSelector = function(l, c, d, u, f) {
|
|
1116
1116
|
var m = a(null);
|
|
1117
1117
|
if (m.current === null) {
|
|
1118
1118
|
var h = { hasValue: !1, value: null };
|
|
@@ -1154,10 +1154,10 @@ function G1() {
|
|
|
1154
1154
|
[b]
|
|
1155
1155
|
), i(b), b;
|
|
1156
1156
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1157
|
-
}()),
|
|
1157
|
+
}()), Hd;
|
|
1158
1158
|
}
|
|
1159
|
-
process.env.NODE_ENV === "production" ?
|
|
1160
|
-
var j1 =
|
|
1159
|
+
process.env.NODE_ENV === "production" ? Tu.exports = V1() : Tu.exports = G1();
|
|
1160
|
+
var j1 = Tu.exports;
|
|
1161
1161
|
function ra(t, e, n = cb) {
|
|
1162
1162
|
return j1.useSyncExternalStoreWithSelector(Z((r) => t.subscribe(Y1, r)), Z(() => t.state), Z(() => t.state), Z(e), n);
|
|
1163
1163
|
}
|
|
@@ -1165,23 +1165,23 @@ function Y1(t) {
|
|
|
1165
1165
|
return t;
|
|
1166
1166
|
}
|
|
1167
1167
|
function zl(t, e) {
|
|
1168
|
-
let n = lt(), r =
|
|
1168
|
+
let n = lt(), r = Ju.get(e), [a, o] = ra(r, Y((s) => [r.selectors.isTop(s, n), r.selectors.inStack(s, n)], [r, n]));
|
|
1169
1169
|
return Be(() => {
|
|
1170
1170
|
if (t) return r.actions.push(n), () => r.actions.pop(n);
|
|
1171
1171
|
}, [r, t, n]), t ? o ? a : !0 : !1;
|
|
1172
1172
|
}
|
|
1173
|
-
let
|
|
1173
|
+
let xu = /* @__PURE__ */ new Map(), wl = /* @__PURE__ */ new Map();
|
|
1174
1174
|
function Qy(t) {
|
|
1175
1175
|
var e;
|
|
1176
1176
|
let n = (e = wl.get(t)) != null ? e : 0;
|
|
1177
|
-
return wl.set(t, n + 1), n !== 0 ? () => Zy(t) : (
|
|
1177
|
+
return wl.set(t, n + 1), n !== 0 ? () => Zy(t) : (xu.set(t, { "aria-hidden": t.getAttribute("aria-hidden"), inert: t.inert }), t.setAttribute("aria-hidden", "true"), t.inert = !0, () => Zy(t));
|
|
1178
1178
|
}
|
|
1179
1179
|
function Zy(t) {
|
|
1180
1180
|
var e;
|
|
1181
1181
|
let n = (e = wl.get(t)) != null ? e : 1;
|
|
1182
1182
|
if (n === 1 ? wl.delete(t) : wl.set(t, n - 1), n !== 1) return;
|
|
1183
|
-
let r =
|
|
1184
|
-
r && (r["aria-hidden"] === null ? t.removeAttribute("aria-hidden") : t.setAttribute("aria-hidden", r["aria-hidden"]), t.inert = r.inert,
|
|
1183
|
+
let r = xu.get(t);
|
|
1184
|
+
r && (r["aria-hidden"] === null ? t.removeAttribute("aria-hidden") : t.setAttribute("aria-hidden", r["aria-hidden"]), t.inert = r.inert, xu.delete(t));
|
|
1185
1185
|
}
|
|
1186
1186
|
function q1(t, { allowed: e, disallowed: n } = {}) {
|
|
1187
1187
|
let r = zl(t, "inert-others");
|
|
@@ -1233,7 +1233,7 @@ function td(t = document.body) {
|
|
|
1233
1233
|
function Q1(t = document.body) {
|
|
1234
1234
|
return t == null ? [] : Array.from(t.querySelectorAll(K1)).sort((e, n) => Math.sign((e.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
1235
1235
|
}
|
|
1236
|
-
var
|
|
1236
|
+
var ep = ((t) => (t[t.Strict = 0] = "Strict", t[t.Loose = 1] = "Loose", t))(ep || {});
|
|
1237
1237
|
function pb(t, e = 0) {
|
|
1238
1238
|
var n;
|
|
1239
1239
|
return t === ((n = la(t)) == null ? void 0 : n.body) ? !1 : qe(e, { 0() {
|
|
@@ -1334,7 +1334,7 @@ function hb(t, e, n) {
|
|
|
1334
1334
|
return typeof f == "function" ? u(f()) : Array.isArray(f) || f instanceof Set ? f : [f];
|
|
1335
1335
|
}(e);
|
|
1336
1336
|
for (let u of d) if (u !== null && (u.contains(c) || i.composed && i.composedPath().includes(u))) return;
|
|
1337
|
-
return !pb(c,
|
|
1337
|
+
return !pb(c, ep.Loose) && c.tabIndex !== -1 && i.preventDefault(), r.current(i, c);
|
|
1338
1338
|
}, [r, e]), o = pe(null);
|
|
1339
1339
|
hc(t, "pointerdown", (i) => {
|
|
1340
1340
|
var l, c;
|
|
@@ -1355,7 +1355,7 @@ function hb(t, e, n) {
|
|
|
1355
1355
|
function aa(...t) {
|
|
1356
1356
|
return K(() => la(...t), [...t]);
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function tp(t, e, n, r) {
|
|
1359
1359
|
let a = Mt(n);
|
|
1360
1360
|
se(() => {
|
|
1361
1361
|
t = t ?? window;
|
|
@@ -1551,7 +1551,7 @@ function mE(t, { inFlight: e, prepare: n }) {
|
|
|
1551
1551
|
let r = t.style.transition;
|
|
1552
1552
|
t.style.transition = "none", n(), t.offsetHeight, t.style.transition = r;
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function np(t, e) {
|
|
1555
1555
|
let n = pe([]), r = Z(t);
|
|
1556
1556
|
se(() => {
|
|
1557
1557
|
let a = [...n.current];
|
|
@@ -1608,14 +1608,14 @@ function sd(t) {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
});
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1612
|
-
const e =
|
|
1611
|
+
function rp(t) {
|
|
1612
|
+
const e = ap(), n = ft(t) ? gn(t) : t;
|
|
1613
1613
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
1614
1614
|
}
|
|
1615
1615
|
function hE(t) {
|
|
1616
1616
|
let e = oa(t);
|
|
1617
1617
|
for (; Yn(e) && !rs(e); ) {
|
|
1618
|
-
if (
|
|
1618
|
+
if (rp(e))
|
|
1619
1619
|
return e;
|
|
1620
1620
|
if (sd(e))
|
|
1621
1621
|
return null;
|
|
@@ -1623,7 +1623,7 @@ function hE(t) {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
return null;
|
|
1625
1625
|
}
|
|
1626
|
-
function
|
|
1626
|
+
function ap() {
|
|
1627
1627
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1628
1628
|
}
|
|
1629
1629
|
function rs(t) {
|
|
@@ -1662,12 +1662,12 @@ function Ol(t, e, n) {
|
|
|
1662
1662
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1663
1663
|
const a = vb(t), o = a === ((r = t.ownerDocument) == null ? void 0 : r.body), s = Ft(a);
|
|
1664
1664
|
if (o) {
|
|
1665
|
-
const i =
|
|
1665
|
+
const i = Eu(s);
|
|
1666
1666
|
return e.concat(s, s.visualViewport || [], Vl(a) ? a : [], i && n ? Ol(i) : []);
|
|
1667
1667
|
}
|
|
1668
1668
|
return e.concat(a, Ol(a, [], n));
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function Eu(t) {
|
|
1671
1671
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
1672
1672
|
}
|
|
1673
1673
|
function yE() {
|
|
@@ -1724,9 +1724,9 @@ function bE(t, e, n) {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
function gE(t) {
|
|
1726
1726
|
const e = Nc(t);
|
|
1727
|
-
return [
|
|
1727
|
+
return [Au(t), e, Au(e)];
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function Au(t) {
|
|
1730
1730
|
return t.replace(/start|end/g, (e) => vE[e]);
|
|
1731
1731
|
}
|
|
1732
1732
|
function TE(t, e, n) {
|
|
@@ -1745,7 +1745,7 @@ function TE(t, e, n) {
|
|
|
1745
1745
|
function xE(t, e, n, r) {
|
|
1746
1746
|
const a = Gl(t);
|
|
1747
1747
|
let o = TE(sa(t), n === "start", r);
|
|
1748
|
-
return a && (o = o.map((s) => s + "-" + a), e && (o = o.concat(o.map(
|
|
1748
|
+
return a && (o = o.map((s) => s + "-" + a), e && (o = o.concat(o.map(Au)))), o;
|
|
1749
1749
|
}
|
|
1750
1750
|
function Nc(t) {
|
|
1751
1751
|
return t.replace(/left|right|bottom|top/g, (e) => wE[e]);
|
|
@@ -2177,11 +2177,11 @@ function xb(t) {
|
|
|
2177
2177
|
$: i
|
|
2178
2178
|
};
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2180
|
+
function op(t) {
|
|
2181
2181
|
return ft(t) ? t : t.contextElement;
|
|
2182
2182
|
}
|
|
2183
2183
|
function ts(t) {
|
|
2184
|
-
const e =
|
|
2184
|
+
const e = op(t);
|
|
2185
2185
|
if (!Yn(e))
|
|
2186
2186
|
return Vn(1);
|
|
2187
2187
|
const n = e.getBoundingClientRect(), {
|
|
@@ -2198,7 +2198,7 @@ function ts(t) {
|
|
|
2198
2198
|
const _E = /* @__PURE__ */ Vn(0);
|
|
2199
2199
|
function Eb(t) {
|
|
2200
2200
|
const e = Ft(t);
|
|
2201
|
-
return !
|
|
2201
|
+
return !ap() || !e.visualViewport ? _E : {
|
|
2202
2202
|
x: e.visualViewport.offsetLeft,
|
|
2203
2203
|
y: e.visualViewport.offsetTop
|
|
2204
2204
|
};
|
|
@@ -2208,17 +2208,17 @@ function LE(t, e, n) {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
function zo(t, e, n, r) {
|
|
2210
2210
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
2211
|
-
const a = t.getBoundingClientRect(), o =
|
|
2211
|
+
const a = t.getBoundingClientRect(), o = op(t);
|
|
2212
2212
|
let s = Vn(1);
|
|
2213
2213
|
e && (r ? ft(r) && (s = ts(r)) : s = ts(t));
|
|
2214
2214
|
const i = LE(o, n, r) ? Eb(o) : Vn(0);
|
|
2215
2215
|
let l = (a.left + i.x) / s.x, c = (a.top + i.y) / s.y, d = a.width / s.x, u = a.height / s.y;
|
|
2216
2216
|
if (o) {
|
|
2217
2217
|
const f = Ft(o), m = r && ft(r) ? Ft(r) : r;
|
|
2218
|
-
let h = f, b =
|
|
2218
|
+
let h = f, b = Eu(h);
|
|
2219
2219
|
for (; b && r && m !== h; ) {
|
|
2220
2220
|
const x = ts(b), D = b.getBoundingClientRect(), T = gn(b), O = D.left + (b.clientLeft + parseFloat(T.paddingLeft)) * x.x, R = D.top + (b.clientTop + parseFloat(T.paddingTop)) * x.y;
|
|
2221
|
-
l *= x.x, c *= x.y, d *= x.x, u *= x.y, l += O, c += R, h = Ft(b), b =
|
|
2221
|
+
l *= x.x, c *= x.y, d *= x.x, u *= x.y, l += O, c += R, h = Ft(b), b = Eu(h);
|
|
2222
2222
|
}
|
|
2223
2223
|
}
|
|
2224
2224
|
return Rc({
|
|
@@ -2228,7 +2228,7 @@ function zo(t, e, n, r) {
|
|
|
2228
2228
|
y: c
|
|
2229
2229
|
});
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2231
|
+
function sp(t, e) {
|
|
2232
2232
|
const n = id(t).scrollLeft;
|
|
2233
2233
|
return e ? e.left + n : zo(Jn(t)).left + n;
|
|
2234
2234
|
}
|
|
@@ -2236,7 +2236,7 @@ function Ab(t, e, n) {
|
|
|
2236
2236
|
n === void 0 && (n = !1);
|
|
2237
2237
|
const r = t.getBoundingClientRect(), a = r.left + e.scrollLeft - (n ? 0 : (
|
|
2238
2238
|
// RTL <body> scrollbar.
|
|
2239
|
-
|
|
2239
|
+
sp(t, r)
|
|
2240
2240
|
)), o = r.top + e.scrollTop;
|
|
2241
2241
|
return {
|
|
2242
2242
|
x: a,
|
|
@@ -2275,7 +2275,7 @@ function RE(t) {
|
|
|
2275
2275
|
}
|
|
2276
2276
|
function kE(t) {
|
|
2277
2277
|
const e = Jn(t), n = id(t), r = t.ownerDocument.body, a = mt(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), o = mt(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
|
|
2278
|
-
let s = -n.scrollLeft +
|
|
2278
|
+
let s = -n.scrollLeft + sp(t);
|
|
2279
2279
|
const i = -n.scrollTop;
|
|
2280
2280
|
return gn(r).direction === "rtl" && (s += mt(e.clientWidth, r.clientWidth) - a), {
|
|
2281
2281
|
width: a,
|
|
@@ -2289,7 +2289,7 @@ function $E(t, e) {
|
|
|
2289
2289
|
let o = r.clientWidth, s = r.clientHeight, i = 0, l = 0;
|
|
2290
2290
|
if (a) {
|
|
2291
2291
|
o = a.width, s = a.height;
|
|
2292
|
-
const c =
|
|
2292
|
+
const c = ap();
|
|
2293
2293
|
(!c || c && e === "fixed") && (i = a.offsetLeft, l = a.offsetTop);
|
|
2294
2294
|
}
|
|
2295
2295
|
return {
|
|
@@ -2339,7 +2339,7 @@ function BE(t, e) {
|
|
|
2339
2339
|
const o = gn(t).position === "fixed";
|
|
2340
2340
|
let s = o ? oa(t) : t;
|
|
2341
2341
|
for (; ft(s) && !rs(s); ) {
|
|
2342
|
-
const i = gn(s), l =
|
|
2342
|
+
const i = gn(s), l = rp(s);
|
|
2343
2343
|
!l && i.position === "fixed" && (a = null), (o ? !l && !a : !l && i.position === "static" && !!a && ["absolute", "fixed"].includes(a.position) || Vl(s) && !l && Sb(t, s)) ? r = r.filter((d) => d !== s) : a = i, s = oa(s);
|
|
2344
2344
|
}
|
|
2345
2345
|
return e.set(t, r), r;
|
|
@@ -2380,7 +2380,7 @@ function UE(t, e, n) {
|
|
|
2380
2380
|
};
|
|
2381
2381
|
const l = Vn(0);
|
|
2382
2382
|
function c() {
|
|
2383
|
-
l.x =
|
|
2383
|
+
l.x = sp(a);
|
|
2384
2384
|
}
|
|
2385
2385
|
if (r || !r && !o)
|
|
2386
2386
|
if ((hs(e) !== "body" || Vl(a)) && (i = id(e)), r) {
|
|
@@ -2396,7 +2396,7 @@ function UE(t, e, n) {
|
|
|
2396
2396
|
height: s.height
|
|
2397
2397
|
};
|
|
2398
2398
|
}
|
|
2399
|
-
function
|
|
2399
|
+
function zd(t) {
|
|
2400
2400
|
return gn(t).position === "static";
|
|
2401
2401
|
}
|
|
2402
2402
|
function iw(t, e) {
|
|
@@ -2414,16 +2414,16 @@ function Ob(t, e) {
|
|
|
2414
2414
|
if (!Yn(t)) {
|
|
2415
2415
|
let a = oa(t);
|
|
2416
2416
|
for (; a && !rs(a); ) {
|
|
2417
|
-
if (ft(a) && !
|
|
2417
|
+
if (ft(a) && !zd(a))
|
|
2418
2418
|
return a;
|
|
2419
2419
|
a = oa(a);
|
|
2420
2420
|
}
|
|
2421
2421
|
return n;
|
|
2422
2422
|
}
|
|
2423
2423
|
let r = iw(t, e);
|
|
2424
|
-
for (; r && fE(r) &&
|
|
2424
|
+
for (; r && fE(r) && zd(r); )
|
|
2425
2425
|
r = iw(r, e);
|
|
2426
|
-
return r && rs(r) &&
|
|
2426
|
+
return r && rs(r) && zd(r) && !rp(r) ? n : r || hE(t) || n;
|
|
2427
2427
|
}
|
|
2428
2428
|
const HE = async function(t) {
|
|
2429
2429
|
const e = this.getOffsetParent || Ob, n = this.getDimensions, r = await n(t.floating);
|
|
@@ -2509,7 +2509,7 @@ function jE(t, e, n, r) {
|
|
|
2509
2509
|
elementResize: s = typeof ResizeObserver == "function",
|
|
2510
2510
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
2511
2511
|
animationFrame: l = !1
|
|
2512
|
-
} = r, c =
|
|
2512
|
+
} = r, c = op(t), d = a || o ? [...c ? Ol(c) : [], ...Ol(e)] : [];
|
|
2513
2513
|
d.forEach((D) => {
|
|
2514
2514
|
a && D.addEventListener("scroll", n, {
|
|
2515
2515
|
passive: !0
|
|
@@ -2537,7 +2537,7 @@ function jE(t, e, n, r) {
|
|
|
2537
2537
|
}), u == null || u(), (D = m) == null || D.disconnect(), m = null, l && cancelAnimationFrame(h);
|
|
2538
2538
|
};
|
|
2539
2539
|
}
|
|
2540
|
-
const
|
|
2540
|
+
const Vd = ld, YE = DE, qE = PE, KE = OE, XE = IE, QE = (t, e, n) => {
|
|
2541
2541
|
const r = /* @__PURE__ */ new Map(), a = {
|
|
2542
2542
|
platform: VE,
|
|
2543
2543
|
...n
|
|
@@ -2551,7 +2551,7 @@ const zd = ld, YE = DE, qE = PE, KE = OE, XE = IE, QE = (t, e, n) => {
|
|
|
2551
2551
|
});
|
|
2552
2552
|
};
|
|
2553
2553
|
var ZE = typeof document < "u", JE = function() {
|
|
2554
|
-
}, Ac = ZE ?
|
|
2554
|
+
}, Ac = ZE ? Wu : JE;
|
|
2555
2555
|
function kc(t, e) {
|
|
2556
2556
|
if (t === e)
|
|
2557
2557
|
return !0;
|
|
@@ -2589,7 +2589,7 @@ function lw(t, e) {
|
|
|
2589
2589
|
const n = Db(t);
|
|
2590
2590
|
return Math.round(e * n) / n;
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2592
|
+
function Gd(t) {
|
|
2593
2593
|
const e = F.useRef(t);
|
|
2594
2594
|
return Ac(() => {
|
|
2595
2595
|
e.current = t;
|
|
@@ -2622,7 +2622,7 @@ function eA(t) {
|
|
|
2622
2622
|
_ !== M.current && (M.current = _, b(_));
|
|
2623
2623
|
}, []), O = F.useCallback((_) => {
|
|
2624
2624
|
_ !== W.current && (W.current = _, D(_));
|
|
2625
|
-
}, []), R = o || h, k = s || x, M = F.useRef(null), W = F.useRef(null), y = F.useRef(d), v = l != null, g =
|
|
2625
|
+
}, []), R = o || h, k = s || x, M = F.useRef(null), W = F.useRef(null), y = F.useRef(d), v = l != null, g = Gd(l), P = Gd(a), A = Gd(c), I = F.useCallback(() => {
|
|
2626
2626
|
if (!M.current || !W.current)
|
|
2627
2627
|
return;
|
|
2628
2628
|
const _ = {
|
|
@@ -2725,7 +2725,7 @@ function _b(t) {
|
|
|
2725
2725
|
return e.current == null ? void 0 : e.current(...r);
|
|
2726
2726
|
}, []);
|
|
2727
2727
|
}
|
|
2728
|
-
var
|
|
2728
|
+
var Su = typeof document < "u" ? Wu : se;
|
|
2729
2729
|
let cw = !1, sA = 0;
|
|
2730
2730
|
const dw = () => (
|
|
2731
2731
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
@@ -2734,7 +2734,7 @@ const dw = () => (
|
|
|
2734
2734
|
);
|
|
2735
2735
|
function iA() {
|
|
2736
2736
|
const [t, e] = F.useState(() => cw ? dw() : void 0);
|
|
2737
|
-
return
|
|
2737
|
+
return Su(() => {
|
|
2738
2738
|
t == null && e(dw());
|
|
2739
2739
|
}, []), F.useEffect(() => {
|
|
2740
2740
|
cw = !0;
|
|
@@ -2827,7 +2827,7 @@ function bA(t) {
|
|
|
2827
2827
|
...t.elements
|
|
2828
2828
|
}
|
|
2829
2829
|
}), r = t.rootContext || n, a = r.elements, [o, s] = F.useState(null), [i, l] = F.useState(null), d = (a == null ? void 0 : a.domReference) || o, u = F.useRef(null), f = yA();
|
|
2830
|
-
|
|
2830
|
+
Su(() => {
|
|
2831
2831
|
d && (u.current = d);
|
|
2832
2832
|
}, [d]);
|
|
2833
2833
|
const m = eA({
|
|
@@ -2864,7 +2864,7 @@ function bA(t) {
|
|
|
2864
2864
|
elements: D,
|
|
2865
2865
|
nodeId: e
|
|
2866
2866
|
}), [m, x, D, e, r]);
|
|
2867
|
-
return
|
|
2867
|
+
return Su(() => {
|
|
2868
2868
|
r.dataRef.current.floatingContext = T;
|
|
2869
2869
|
const O = f == null ? void 0 : f.nodesRef.current.find((R) => R.id === e);
|
|
2870
2870
|
O && (O.context = T);
|
|
@@ -2876,7 +2876,7 @@ function bA(t) {
|
|
|
2876
2876
|
}), [m, x, D, T]);
|
|
2877
2877
|
}
|
|
2878
2878
|
const uw = "active", pw = "selected";
|
|
2879
|
-
function
|
|
2879
|
+
function jd(t, e, n) {
|
|
2880
2880
|
const r = /* @__PURE__ */ new Map(), a = n === "item";
|
|
2881
2881
|
let o = t;
|
|
2882
2882
|
if (a && t) {
|
|
@@ -2916,15 +2916,15 @@ function Gd(t, e, n) {
|
|
|
2916
2916
|
function gA(t) {
|
|
2917
2917
|
t === void 0 && (t = []);
|
|
2918
2918
|
const e = t.map((i) => i == null ? void 0 : i.reference), n = t.map((i) => i == null ? void 0 : i.floating), r = t.map((i) => i == null ? void 0 : i.item), a = F.useCallback(
|
|
2919
|
-
(i) =>
|
|
2919
|
+
(i) => jd(i, t, "reference"),
|
|
2920
2920
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2921
2921
|
e
|
|
2922
2922
|
), o = F.useCallback(
|
|
2923
|
-
(i) =>
|
|
2923
|
+
(i) => jd(i, t, "floating"),
|
|
2924
2924
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2925
2925
|
n
|
|
2926
2926
|
), s = F.useCallback(
|
|
2927
|
-
(i) =>
|
|
2927
|
+
(i) => jd(i, t, "item"),
|
|
2928
2928
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2929
2929
|
r
|
|
2930
2930
|
);
|
|
@@ -2971,7 +2971,7 @@ const TA = (t) => ({
|
|
|
2971
2971
|
const O = {
|
|
2972
2972
|
...e,
|
|
2973
2973
|
...await Pb(-m.offsetTop - f.clientTop - u.reference.height / 2 - m.offsetHeight / 2 - o).fn(e)
|
|
2974
|
-
}, R = await
|
|
2974
|
+
}, R = await Vd(mw(O, h.scrollHeight + b + f.clientTop), d), k = await Vd(O, {
|
|
2975
2975
|
...d,
|
|
2976
2976
|
elementContext: "reference"
|
|
2977
2977
|
}), M = mt(0, R.top), W = O.y + M, g = (h.scrollHeight > h.clientHeight ? (P) => P : Cl)(mt(0, h.scrollHeight + (x && T || D ? b * 2 : 0) - M - mt(0, R.bottom)));
|
|
@@ -2979,7 +2979,7 @@ const TA = (t) => ({
|
|
|
2979
2979
|
const P = h.offsetHeight < m.offsetHeight * Ho(i, n.current.length) - 1 || k.top >= -l || k.bottom >= -l;
|
|
2980
2980
|
Sl.flushSync(() => a(P));
|
|
2981
2981
|
}
|
|
2982
|
-
return r && (r.current = await
|
|
2982
|
+
return r && (r.current = await Vd(mw({
|
|
2983
2983
|
...O,
|
|
2984
2984
|
y: W
|
|
2985
2985
|
}, h.offsetHeight + b + f.clientTop), d)), {
|
|
@@ -3048,8 +3048,8 @@ let jl = be({ styles: void 0, setReference: () => {
|
|
|
3048
3048
|
}, setFloating: () => {
|
|
3049
3049
|
}, getReferenceProps: () => ({}), getFloatingProps: () => ({}), slot: {} });
|
|
3050
3050
|
jl.displayName = "FloatingContext";
|
|
3051
|
-
let
|
|
3052
|
-
|
|
3051
|
+
let ip = be(null);
|
|
3052
|
+
ip.displayName = "PlacementContext";
|
|
3053
3053
|
function EA(t) {
|
|
3054
3054
|
return K(() => t ? typeof t == "string" ? { to: t } : t : null, [t]);
|
|
3055
3055
|
}
|
|
@@ -3062,7 +3062,7 @@ function SA() {
|
|
|
3062
3062
|
}
|
|
3063
3063
|
function OA(t = null) {
|
|
3064
3064
|
t === !1 && (t = null), typeof t == "string" && (t = { to: t });
|
|
3065
|
-
let e = ye(
|
|
3065
|
+
let e = ye(ip), n = K(() => t, [JSON.stringify(t, (a, o) => {
|
|
3066
3066
|
var s;
|
|
3067
3067
|
return (s = o == null ? void 0 : o.outerHTML) != null ? s : o;
|
|
3068
3068
|
})]);
|
|
@@ -3105,7 +3105,7 @@ function CA({ children: t, enabled: e = !0 }) {
|
|
|
3105
3105
|
let M = K(() => ({ anchor: [R, k].filter(Boolean).join(" ") }), [R, k]), W = xA(O, { overflowRef: s, onChange: o }), { getReferenceProps: y, getFloatingProps: v } = gA([W]), g = Z((P) => {
|
|
3106
3106
|
l(P), D.setFloating(P);
|
|
3107
3107
|
});
|
|
3108
|
-
return F.createElement(
|
|
3108
|
+
return F.createElement(ip.Provider, { value: r }, F.createElement(jl.Provider, { value: { setFloating: g, setReference: D.setReference, styles: T, getReferenceProps: y, getFloatingProps: v, slot: M } }, t));
|
|
3109
3109
|
}
|
|
3110
3110
|
function DA(t) {
|
|
3111
3111
|
Be(() => {
|
|
@@ -3123,10 +3123,10 @@ function DA(t) {
|
|
|
3123
3123
|
}
|
|
3124
3124
|
function PA(t, e) {
|
|
3125
3125
|
var n, r, a;
|
|
3126
|
-
let o =
|
|
3126
|
+
let o = Yd((n = t == null ? void 0 : t.gap) != null ? n : "var(--anchor-gap, 0)", e), s = Yd((r = t == null ? void 0 : t.offset) != null ? r : "var(--anchor-offset, 0)", e), i = Yd((a = t == null ? void 0 : t.padding) != null ? a : "var(--anchor-padding, 0)", e);
|
|
3127
3127
|
return { ...t, gap: o, offset: s, padding: i };
|
|
3128
3128
|
}
|
|
3129
|
-
function
|
|
3129
|
+
function Yd(t, e, n = void 0) {
|
|
3130
3130
|
let r = ca(), a = Z((l, c) => {
|
|
3131
3131
|
if (l == null) return [n, null];
|
|
3132
3132
|
if (typeof l == "number") return [l, null];
|
|
@@ -3184,10 +3184,10 @@ var Ze = ((t) => (t[t.Open = 1] = "Open", t[t.Closed = 2] = "Closed", t[t.Closin
|
|
|
3184
3184
|
function Xo() {
|
|
3185
3185
|
return ye(cd);
|
|
3186
3186
|
}
|
|
3187
|
-
function
|
|
3187
|
+
function lp({ value: t, children: e }) {
|
|
3188
3188
|
return G.createElement(cd.Provider, { value: t }, e);
|
|
3189
3189
|
}
|
|
3190
|
-
function
|
|
3190
|
+
function cp({ children: t }) {
|
|
3191
3191
|
return G.createElement(cd.Provider, { value: null }, t);
|
|
3192
3192
|
}
|
|
3193
3193
|
function IA(t) {
|
|
@@ -3205,7 +3205,7 @@ IA(() => {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
window.addEventListener("click", t, { capture: !0 }), window.addEventListener("mousedown", t, { capture: !0 }), window.addEventListener("focus", t, { capture: !0 }), document.body.addEventListener("click", t, { capture: !0 }), document.body.addEventListener("mousedown", t, { capture: !0 }), document.body.addEventListener("focus", t, { capture: !0 });
|
|
3207
3207
|
});
|
|
3208
|
-
function
|
|
3208
|
+
function dp(t) {
|
|
3209
3209
|
let e = Z(t), n = pe(!1);
|
|
3210
3210
|
se(() => (n.current = !1, () => {
|
|
3211
3211
|
n.current = !0, Bl(() => {
|
|
@@ -3249,17 +3249,17 @@ function NA(t) {
|
|
|
3249
3249
|
}, [n, a, e]), r;
|
|
3250
3250
|
}
|
|
3251
3251
|
let Rb = ht, RA = Ae(function(t, e) {
|
|
3252
|
-
let { ownerDocument: n = null, ...r } = t, a = pe(null), o = Ue(
|
|
3252
|
+
let { ownerDocument: n = null, ...r } = t, a = pe(null), o = Ue(Ku((m) => {
|
|
3253
3253
|
a.current = m;
|
|
3254
3254
|
}), e), s = aa(a), i = n ?? s, l = NA(i), [c] = ce(() => {
|
|
3255
3255
|
var m;
|
|
3256
3256
|
return Bo.isServer ? null : (m = i == null ? void 0 : i.createElement("div")) != null ? m : null;
|
|
3257
|
-
}), d = ye(
|
|
3257
|
+
}), d = ye(Ou), u = Yl();
|
|
3258
3258
|
Be(() => {
|
|
3259
3259
|
!l || !c || l.contains(c) || (c.setAttribute("data-headlessui-portal", ""), l.appendChild(c));
|
|
3260
3260
|
}, [l, c]), Be(() => {
|
|
3261
3261
|
if (c && d) return d.register(c);
|
|
3262
|
-
}, [d, c]),
|
|
3262
|
+
}, [d, c]), dp(() => {
|
|
3263
3263
|
var m;
|
|
3264
3264
|
!l || !c || (Qv(c) && l.contains(c) && l.removeChild(c), l.childNodes.length <= 0 && ((m = l.parentElement) == null || m.removeChild(l)));
|
|
3265
3265
|
});
|
|
@@ -3275,20 +3275,20 @@ function MA(t, e) {
|
|
|
3275
3275
|
let { target: n, ...r } = t, a = { ref: Ue(e) }, o = Ce();
|
|
3276
3276
|
return G.createElement(kb.Provider, { value: n }, o({ ourProps: a, theirProps: r, defaultTag: $A, name: "Popover.Group" }));
|
|
3277
3277
|
}
|
|
3278
|
-
let
|
|
3278
|
+
let Ou = be(null);
|
|
3279
3279
|
function $b() {
|
|
3280
|
-
let t = ye(
|
|
3280
|
+
let t = ye(Ou), e = pe([]), n = Z((o) => (e.current.push(o), t && t.register(o), () => r(o))), r = Z((o) => {
|
|
3281
3281
|
let s = e.current.indexOf(o);
|
|
3282
3282
|
s !== -1 && e.current.splice(s, 1), t && t.unregister(o);
|
|
3283
3283
|
}), a = K(() => ({ register: n, unregister: r, portals: e }), [n, r, e]);
|
|
3284
3284
|
return [e, K(() => function({ children: o }) {
|
|
3285
|
-
return G.createElement(
|
|
3285
|
+
return G.createElement(Ou.Provider, { value: a }, o);
|
|
3286
3286
|
}, [a])];
|
|
3287
3287
|
}
|
|
3288
3288
|
let BA = Ae(kA), Mb = Ae(MA), Bb = Object.assign(BA, { Group: Mb });
|
|
3289
3289
|
function FA(t, e = typeof document < "u" ? document.defaultView : null, n) {
|
|
3290
3290
|
let r = zl(t, "escape");
|
|
3291
|
-
|
|
3291
|
+
tp(e, "keydown", (a) => {
|
|
3292
3292
|
r && (a.defaultPrevented || a.key === Ne.Escape && n(a));
|
|
3293
3293
|
});
|
|
3294
3294
|
}
|
|
@@ -3316,7 +3316,7 @@ function Fb({ defaultContainers: t = [], portals: e, mainTreeNode: n } = {}) {
|
|
|
3316
3316
|
}
|
|
3317
3317
|
let Wb = be(null);
|
|
3318
3318
|
function $c({ children: t, node: e }) {
|
|
3319
|
-
let [n, r] = ce(null), a =
|
|
3319
|
+
let [n, r] = ce(null), a = up(e ?? n);
|
|
3320
3320
|
return G.createElement(Wb.Provider, { value: a }, t, a === null && G.createElement(bn, { features: vn.Hidden, ref: (o) => {
|
|
3321
3321
|
var s, i;
|
|
3322
3322
|
if (o) {
|
|
@@ -3327,7 +3327,7 @@ function $c({ children: t, node: e }) {
|
|
|
3327
3327
|
}
|
|
3328
3328
|
} }));
|
|
3329
3329
|
}
|
|
3330
|
-
function
|
|
3330
|
+
function up(t = null) {
|
|
3331
3331
|
var e;
|
|
3332
3332
|
return (e = ye(Wb)) != null ? e : t;
|
|
3333
3333
|
}
|
|
@@ -3338,7 +3338,7 @@ function dd() {
|
|
|
3338
3338
|
}), []), t;
|
|
3339
3339
|
}
|
|
3340
3340
|
var Bt = ((t) => (t[t.Forwards = 0] = "Forwards", t[t.Backwards = 1] = "Backwards", t))(Bt || {});
|
|
3341
|
-
function
|
|
3341
|
+
function pp() {
|
|
3342
3342
|
let t = pe(0);
|
|
3343
3343
|
return fb(!0, "keydown", (e) => {
|
|
3344
3344
|
e.key === "Tab" && (t.current = e.shiftKey ? 1 : 0);
|
|
@@ -3360,7 +3360,7 @@ function HA(t, e) {
|
|
|
3360
3360
|
jA(i, { ownerDocument: c });
|
|
3361
3361
|
let d = YA(i, { ownerDocument: c, container: n, initialFocus: a, initialFocusFallback: o });
|
|
3362
3362
|
qA(i, { ownerDocument: c, container: n, containers: s, previousActiveElement: d });
|
|
3363
|
-
let u =
|
|
3363
|
+
let u = pp(), f = Z((T) => {
|
|
3364
3364
|
if (!_t(n.current)) return;
|
|
3365
3365
|
let O = n.current;
|
|
3366
3366
|
((R) => R())(() => {
|
|
@@ -3386,7 +3386,7 @@ function HA(t, e) {
|
|
|
3386
3386
|
let zA = Ae(HA), VA = Object.assign(zA, { features: No });
|
|
3387
3387
|
function GA(t = !0) {
|
|
3388
3388
|
let e = pe(ta.slice());
|
|
3389
|
-
return
|
|
3389
|
+
return np(([n], [r]) => {
|
|
3390
3390
|
r === !0 && n === !1 && Bl(() => {
|
|
3391
3391
|
e.current.splice(0);
|
|
3392
3392
|
}), r === !1 && n === !0 && (e.current = ta.slice());
|
|
@@ -3397,15 +3397,15 @@ function GA(t = !0) {
|
|
|
3397
3397
|
}
|
|
3398
3398
|
function jA(t, { ownerDocument: e }) {
|
|
3399
3399
|
let n = !!(t & 8), r = GA(n);
|
|
3400
|
-
|
|
3400
|
+
np(() => {
|
|
3401
3401
|
n || (e == null ? void 0 : e.activeElement) === (e == null ? void 0 : e.body) && xr(r());
|
|
3402
|
-
}, [n]),
|
|
3402
|
+
}, [n]), dp(() => {
|
|
3403
3403
|
n && xr(r());
|
|
3404
3404
|
});
|
|
3405
3405
|
}
|
|
3406
3406
|
function YA(t, { ownerDocument: e, container: n, initialFocus: r, initialFocusFallback: a }) {
|
|
3407
3407
|
let o = pe(null), s = zl(!!(t & 1), "focus-trap#initial-focus"), i = dd();
|
|
3408
|
-
return
|
|
3408
|
+
return np(() => {
|
|
3409
3409
|
if (t === 0) return;
|
|
3410
3410
|
if (!s) {
|
|
3411
3411
|
a != null && a.current && xr(a.current);
|
|
@@ -3438,7 +3438,7 @@ function YA(t, { ownerDocument: e, container: n, initialFocus: r, initialFocusFa
|
|
|
3438
3438
|
}
|
|
3439
3439
|
function qA(t, { ownerDocument: e, container: n, containers: r, previousActiveElement: a }) {
|
|
3440
3440
|
let o = dd(), s = !!(t & 4);
|
|
3441
|
-
|
|
3441
|
+
tp(e == null ? void 0 : e.defaultView, "focus", (i) => {
|
|
3442
3442
|
if (!s || !o.current) return;
|
|
3443
3443
|
let l = Ub(r);
|
|
3444
3444
|
_t(n.current) && l.add(n.current);
|
|
@@ -3536,10 +3536,10 @@ function ZA(t, e) {
|
|
|
3536
3536
|
se(() => {
|
|
3537
3537
|
R && a || (H(W), j(W));
|
|
3538
3538
|
}, [W, R, a]);
|
|
3539
|
-
let Q = !(!a || !R || !E || S), [, V] = ad(Q, D, W, { start: H, end: j }), ie = ea({ ref: k, className: ((r =
|
|
3539
|
+
let Q = !(!a || !R || !E || S), [, V] = ad(Q, D, W, { start: H, end: j }), ie = ea({ ref: k, className: ((r = bu(x.className, N && c, N && d, V.enter && c, V.enter && V.closed && d, V.enter && !V.closed && u, V.leave && m, V.leave && !V.closed && h, V.leave && V.closed && b, !V.transition && W && f)) == null ? void 0 : r.trim()) || void 0, ...rd(V) }), z = 0;
|
|
3540
3540
|
g === "visible" && (z |= Ze.Open), g === "hidden" && (z |= Ze.Closed), W && g === "hidden" && (z |= Ze.Opening), !W && g === "visible" && (z |= Ze.Closing);
|
|
3541
3541
|
let ne = Ce();
|
|
3542
|
-
return G.createElement(pd.Provider, { value: $ }, G.createElement(
|
|
3542
|
+
return G.createElement(pd.Provider, { value: $ }, G.createElement(lp, { value: z }, ne({ ourProps: ie, theirProps: x, defaultTag: Gb, features: jb, visible: g === "visible", name: "Transition.Child" })));
|
|
3543
3543
|
}
|
|
3544
3544
|
function JA(t, e) {
|
|
3545
3545
|
let { show: n, appear: r = !1, unmount: a = !0, ...o } = t, s = pe(null), i = zb(t), l = Ue(...i ? [s, e] : e === null ? [] : [e]);
|
|
@@ -3567,16 +3567,16 @@ function JA(t, e) {
|
|
|
3567
3567
|
}
|
|
3568
3568
|
function eS(t, e) {
|
|
3569
3569
|
let n = ye(ud) !== null, r = Xo() !== null;
|
|
3570
|
-
return G.createElement(G.Fragment, null, !n && r ? G.createElement(
|
|
3570
|
+
return G.createElement(G.Fragment, null, !n && r ? G.createElement(Cu, { ref: e, ...t }) : G.createElement(Yb, { ref: e, ...t }));
|
|
3571
3571
|
}
|
|
3572
|
-
let
|
|
3572
|
+
let Cu = Ae(JA), Yb = Ae(ZA), mp = Ae(eS), fp = Object.assign(Cu, { Child: mp, Root: Cu });
|
|
3573
3573
|
var tS = ((t) => (t[t.Open = 0] = "Open", t[t.Closed = 1] = "Closed", t))(tS || {}), nS = ((t) => (t[t.SetTitleId = 0] = "SetTitleId", t))(nS || {});
|
|
3574
3574
|
let rS = { 0(t, e) {
|
|
3575
3575
|
return t.titleId === e.id ? t : { ...t, titleId: e.id };
|
|
3576
|
-
} },
|
|
3577
|
-
|
|
3576
|
+
} }, hp = be(null);
|
|
3577
|
+
hp.displayName = "DialogContext";
|
|
3578
3578
|
function fd(t) {
|
|
3579
|
-
let e = ye(
|
|
3579
|
+
let e = ye(hp);
|
|
3580
3580
|
if (e === null) {
|
|
3581
3581
|
let n = new Error(`<${t} /> is missing a parent <Dialog /> component.`);
|
|
3582
3582
|
throw Error.captureStackTrace && Error.captureStackTrace(n, fd), n;
|
|
@@ -3596,7 +3596,7 @@ let ww = Ae(function(t, e) {
|
|
|
3596
3596
|
let h = pe(null), b = Ue(h, e), x = aa(h), D = a ? 0 : 1, [T, O] = Ko(aS, { titleId: null, descriptionId: null, panelRef: Ix() }), R = Z(() => o(!1)), k = Z((V) => O({ type: 0, id: V })), M = Yl() ? D === 0 : !1, [W, y] = $b(), v = { get current() {
|
|
3597
3597
|
var V;
|
|
3598
3598
|
return (V = T.panelRef.current) != null ? V : h.current;
|
|
3599
|
-
} }, g =
|
|
3599
|
+
} }, g = up(), { resolveContainers: P } = Fb({ mainTreeNode: g, portals: W, defaultContainers: [v] }), A = m !== null ? (m & Ze.Closing) === Ze.Closing : !1;
|
|
3600
3600
|
q1(c || A ? !1 : M, { allowed: Z(() => {
|
|
3601
3601
|
var V, ie;
|
|
3602
3602
|
return [(ie = (V = h.current) == null ? void 0 : V.closest("[data-headlessui-portal]")) != null ? ie : null];
|
|
@@ -3604,7 +3604,7 @@ let ww = Ae(function(t, e) {
|
|
|
3604
3604
|
var V;
|
|
3605
3605
|
return [(V = g == null ? void 0 : g.closest("body > *:not(#headlessui-portal-root)")) != null ? V : null];
|
|
3606
3606
|
}) });
|
|
3607
|
-
let I =
|
|
3607
|
+
let I = Ju.get(null);
|
|
3608
3608
|
Be(() => {
|
|
3609
3609
|
if (M) return I.actions.push(r), () => I.actions.pop(r);
|
|
3610
3610
|
}, [I, r, M]);
|
|
@@ -3614,10 +3614,10 @@ let ww = Ae(function(t, e) {
|
|
|
3614
3614
|
}), FA(L, x == null ? void 0 : x.defaultView, (V) => {
|
|
3615
3615
|
V.preventDefault(), V.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), R();
|
|
3616
3616
|
}), yb(c || A ? !1 : M, x, P), ub(M, h, R);
|
|
3617
|
-
let [E, S] =
|
|
3617
|
+
let [E, S] = Xu(), N = K(() => [{ dialogState: D, close: R, setTitleId: k, unmount: d }, T], [D, T, R, k, d]), _ = K(() => ({ open: D === 0 }), [D]), $ = { ref: b, id: r, role: i, tabIndex: -1, "aria-modal": c ? void 0 : D === 0 ? !0 : void 0, "aria-labelledby": T.titleId, "aria-describedby": E, unmount: d }, H = !WA(), j = No.None;
|
|
3618
3618
|
M && !c && (j |= No.RestoreFocus, j |= No.TabLock, l && (j |= No.AutoFocus), H && (j |= No.InitialFocus));
|
|
3619
3619
|
let Q = Ce();
|
|
3620
|
-
return G.createElement(
|
|
3620
|
+
return G.createElement(cp, null, G.createElement(yw, { force: !0 }, G.createElement(Bb, null, G.createElement(hp.Provider, { value: N }, G.createElement(Mb, { target: h }, G.createElement(yw, { force: !1 }, G.createElement(S, { slot: _ }, G.createElement(y, null, G.createElement(VA, { initialFocus: s, initialFocusFallback: h, containers: P, features: j }, G.createElement(ed, { value: R }, Q({ ourProps: $, theirProps: u, slot: _, defaultTag: oS, features: sS, visible: D === 0, name: "Dialog" })))))))))));
|
|
3621
3621
|
}), oS = "div", sS = tn.RenderStrategy | tn.Static;
|
|
3622
3622
|
function iS(t, e) {
|
|
3623
3623
|
let { transition: n = !1, open: r, ...a } = t, o = Xo(), s = t.hasOwnProperty("open") || o !== null, i = t.hasOwnProperty("onClose");
|
|
@@ -3626,18 +3626,18 @@ function iS(t, e) {
|
|
|
3626
3626
|
if (!i) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
|
|
3627
3627
|
if (!o && typeof t.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);
|
|
3628
3628
|
if (typeof t.onClose != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);
|
|
3629
|
-
return (r !== void 0 || n) && !a.static ? G.createElement($c, null, G.createElement(
|
|
3629
|
+
return (r !== void 0 || n) && !a.static ? G.createElement($c, null, G.createElement(fp, { show: r, transition: n, unmount: a.unmount }, G.createElement(ww, { ref: e, ...a }))) : G.createElement($c, null, G.createElement(ww, { ref: e, open: r, ...a }));
|
|
3630
3630
|
}
|
|
3631
3631
|
let lS = "div";
|
|
3632
3632
|
function cS(t, e) {
|
|
3633
3633
|
let n = lt(), { id: r = `headlessui-dialog-panel-${n}`, transition: a = !1, ...o } = t, [{ dialogState: s, unmount: i }, l] = fd("Dialog.Panel"), c = Ue(e, l.panelRef), d = K(() => ({ open: s === 0 }), [s]), u = Z((x) => {
|
|
3634
3634
|
x.stopPropagation();
|
|
3635
|
-
}), f = { ref: c, id: r, onClick: u }, m = a ?
|
|
3635
|
+
}), f = { ref: c, id: r, onClick: u }, m = a ? mp : ht, h = a ? { unmount: i } : {}, b = Ce();
|
|
3636
3636
|
return G.createElement(m, { ...h }, b({ ourProps: f, theirProps: o, slot: d, defaultTag: lS, name: "Dialog.Panel" }));
|
|
3637
3637
|
}
|
|
3638
3638
|
let dS = "div";
|
|
3639
3639
|
function uS(t, e) {
|
|
3640
|
-
let { transition: n = !1, ...r } = t, [{ dialogState: a, unmount: o }] = fd("Dialog.Backdrop"), s = K(() => ({ open: a === 0 }), [a]), i = { ref: e, "aria-hidden": !0 }, l = n ?
|
|
3640
|
+
let { transition: n = !1, ...r } = t, [{ dialogState: a, unmount: o }] = fd("Dialog.Backdrop"), s = K(() => ({ open: a === 0 }), [a]), i = { ref: e, "aria-hidden": !0 }, l = n ? mp : ht, c = n ? { unmount: o } : {}, d = Ce();
|
|
3641
3641
|
return G.createElement(l, { ...c }, d({ ourProps: i, theirProps: r, slot: s, defaultTag: dS, name: "Dialog.Backdrop" }));
|
|
3642
3642
|
}
|
|
3643
3643
|
let pS = "h2";
|
|
@@ -3661,37 +3661,37 @@ let TS = { 0: (t) => ({ ...t, disclosureState: qe(t.disclosureState, { 0: 1, 1:
|
|
|
3661
3661
|
return t.buttonElement === e.element ? t : { ...t, buttonElement: e.element };
|
|
3662
3662
|
}, 5(t, e) {
|
|
3663
3663
|
return t.panelElement === e.element ? t : { ...t, panelElement: e.element };
|
|
3664
|
-
} },
|
|
3665
|
-
|
|
3666
|
-
function
|
|
3667
|
-
let e = ye(
|
|
3664
|
+
} }, yp = be(null);
|
|
3665
|
+
yp.displayName = "DisclosureContext";
|
|
3666
|
+
function wp(t) {
|
|
3667
|
+
let e = ye(yp);
|
|
3668
3668
|
if (e === null) {
|
|
3669
3669
|
let n = new Error(`<${t} /> is missing a parent <Disclosure /> component.`);
|
|
3670
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
3670
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, wp), n;
|
|
3671
3671
|
}
|
|
3672
3672
|
return e;
|
|
3673
3673
|
}
|
|
3674
|
-
let
|
|
3675
|
-
|
|
3674
|
+
let vp = be(null);
|
|
3675
|
+
vp.displayName = "DisclosureAPIContext";
|
|
3676
3676
|
function Kb(t) {
|
|
3677
|
-
let e = ye(
|
|
3677
|
+
let e = ye(vp);
|
|
3678
3678
|
if (e === null) {
|
|
3679
3679
|
let n = new Error(`<${t} /> is missing a parent <Disclosure /> component.`);
|
|
3680
3680
|
throw Error.captureStackTrace && Error.captureStackTrace(n, Kb), n;
|
|
3681
3681
|
}
|
|
3682
3682
|
return e;
|
|
3683
3683
|
}
|
|
3684
|
-
let
|
|
3685
|
-
|
|
3684
|
+
let bp = be(null);
|
|
3685
|
+
bp.displayName = "DisclosurePanelContext";
|
|
3686
3686
|
function xS() {
|
|
3687
|
-
return ye(
|
|
3687
|
+
return ye(bp);
|
|
3688
3688
|
}
|
|
3689
3689
|
function ES(t, e) {
|
|
3690
3690
|
return qe(e.type, TS, t, e);
|
|
3691
3691
|
}
|
|
3692
3692
|
let AS = ht;
|
|
3693
3693
|
function SS(t, e) {
|
|
3694
|
-
let { defaultOpen: n = !1, ...r } = t, a = pe(null), o = Ue(e,
|
|
3694
|
+
let { defaultOpen: n = !1, ...r } = t, a = pe(null), o = Ue(e, Ku((b) => {
|
|
3695
3695
|
a.current = b;
|
|
3696
3696
|
}, t.as === void 0 || t.as === ht)), s = Ko(ES, { disclosureState: n ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: i, buttonId: l }, c] = s, d = Z((b) => {
|
|
3697
3697
|
c({ type: 1 });
|
|
@@ -3700,11 +3700,11 @@ function SS(t, e) {
|
|
|
3700
3700
|
let D = b ? yn(b) ? b : "current" in b && yn(b.current) ? b.current : x.getElementById(l) : x.getElementById(l);
|
|
3701
3701
|
D == null || D.focus();
|
|
3702
3702
|
}), u = K(() => ({ close: d }), [d]), f = K(() => ({ open: i === 0, close: d }), [i, d]), m = { ref: o }, h = Ce();
|
|
3703
|
-
return G.createElement(
|
|
3703
|
+
return G.createElement(yp.Provider, { value: s }, G.createElement(vp.Provider, { value: u }, G.createElement(ed, { value: d }, G.createElement(lp, { value: qe(i, { 0: Ze.Open, 1: Ze.Closed }) }, h({ ourProps: m, theirProps: r, slot: f, defaultTag: AS, name: "Disclosure" })))));
|
|
3704
3704
|
}
|
|
3705
3705
|
let OS = "button";
|
|
3706
3706
|
function CS(t, e) {
|
|
3707
|
-
let n = lt(), { id: r = `headlessui-disclosure-button-${n}`, disabled: a = !1, autoFocus: o = !1, ...s } = t, [i, l] =
|
|
3707
|
+
let n = lt(), { id: r = `headlessui-disclosure-button-${n}`, disabled: a = !1, autoFocus: o = !1, ...s } = t, [i, l] = wp("Disclosure.Button"), c = xS(), d = c === null ? !1 : c === i.panelId, u = pe(null), f = Ue(u, e, Z((v) => {
|
|
3708
3708
|
if (!d) return l({ type: 4, element: v });
|
|
3709
3709
|
}));
|
|
3710
3710
|
se(() => {
|
|
@@ -3742,18 +3742,18 @@ function CS(t, e) {
|
|
|
3742
3742
|
}
|
|
3743
3743
|
let DS = "div", PS = tn.RenderStrategy | tn.Static;
|
|
3744
3744
|
function IS(t, e) {
|
|
3745
|
-
let n = lt(), { id: r = `headlessui-disclosure-panel-${n}`, transition: a = !1, ...o } = t, [s, i] =
|
|
3745
|
+
let n = lt(), { id: r = `headlessui-disclosure-panel-${n}`, transition: a = !1, ...o } = t, [s, i] = wp("Disclosure.Panel"), { close: l } = Kb("Disclosure.Panel"), [c, d] = ce(null), u = Ue(e, Z((T) => {
|
|
3746
3746
|
vS(() => i({ type: 5, element: T }));
|
|
3747
3747
|
}), d);
|
|
3748
3748
|
se(() => (i({ type: 3, panelId: r }), () => {
|
|
3749
3749
|
i({ type: 3, panelId: null });
|
|
3750
3750
|
}), [r, i]);
|
|
3751
3751
|
let f = Xo(), [m, h] = ad(a, c, f !== null ? (f & Ze.Open) === Ze.Open : s.disclosureState === 0), b = K(() => ({ open: s.disclosureState === 0, close: l }), [s.disclosureState, l]), x = { ref: u, id: r, ...rd(h) }, D = Ce();
|
|
3752
|
-
return G.createElement(
|
|
3752
|
+
return G.createElement(cp, null, G.createElement(bp.Provider, { value: s.panelId }, D({ ourProps: x, theirProps: o, slot: b, defaultTag: DS, features: PS, visible: m, name: "Disclosure.Panel" })));
|
|
3753
3753
|
}
|
|
3754
|
-
let _S = Ae(SS),
|
|
3754
|
+
let _S = Ae(SS), gp = Ae(CS), Tp = Ae(IS), Xb = Object.assign(_S, { Button: gp, Panel: Tp }), LS = "div";
|
|
3755
3755
|
function NS(t, e) {
|
|
3756
|
-
let n = `headlessui-control-${lt()}`, [r, a] = ob(), [o, s] =
|
|
3756
|
+
let n = `headlessui-control-${lt()}`, [r, a] = ob(), [o, s] = Xu(), i = Wl(), { disabled: l = i || !1, ...c } = t, d = K(() => ({ disabled: l }), [l]), u = { ref: e, disabled: l || void 0, "aria-disabled": l || void 0 }, f = Ce();
|
|
3757
3757
|
return G.createElement(l1, { value: l }, G.createElement(a, { value: r }, G.createElement(s, { value: o }, G.createElement(v1, { id: n }, f({ ourProps: u, theirProps: { ...c, children: G.createElement(h1, null, typeof c.children == "function" ? c.children(d) : c.children) }, slot: d, defaultTag: LS, name: "Field" })))));
|
|
3758
3758
|
}
|
|
3759
3759
|
let Qb = Ae(NS);
|
|
@@ -3769,7 +3769,7 @@ let MS = { 0: (t) => t.popoverState === 0 ? t : { ...t, popoverState: 0, __demoM
|
|
|
3769
3769
|
}, 5(t, e) {
|
|
3770
3770
|
return t.panelId === e.panelId ? t : { ...t, panelId: e.panelId };
|
|
3771
3771
|
} };
|
|
3772
|
-
class
|
|
3772
|
+
class xp extends lb {
|
|
3773
3773
|
constructor(e) {
|
|
3774
3774
|
super(e), bw(this, "actions", { close: () => this.send({ type: 1 }), refocusableClose: (n) => {
|
|
3775
3775
|
this.actions.close();
|
|
@@ -3782,12 +3782,12 @@ class Tp extends lb {
|
|
|
3782
3782
|
return !n.panel.contains(i) && !n.panel.contains(l);
|
|
3783
3783
|
} });
|
|
3784
3784
|
{
|
|
3785
|
-
let n = this.state.id, r =
|
|
3785
|
+
let n = this.state.id, r = Ju.get(null);
|
|
3786
3786
|
this.on(0, () => r.actions.push(n)), this.on(1, () => r.actions.pop(n));
|
|
3787
3787
|
}
|
|
3788
3788
|
}
|
|
3789
3789
|
static new({ id: e, __demoMode: n = !1 }) {
|
|
3790
|
-
return new
|
|
3790
|
+
return new xp({ id: e, __demoMode: n, popoverState: n ? 0 : 1, buttons: { current: [] }, button: null, buttonId: null, panel: null, panelId: null, beforePanelSentinel: { current: null }, afterPanelSentinel: { current: null }, afterButtonSentinel: { current: null } });
|
|
3791
3791
|
}
|
|
3792
3792
|
reduce(e, n) {
|
|
3793
3793
|
return qe(n.type, MS, e, n);
|
|
@@ -3803,13 +3803,13 @@ function hd(t) {
|
|
|
3803
3803
|
return e;
|
|
3804
3804
|
}
|
|
3805
3805
|
function BS({ id: t, __demoMode: e = !1 }) {
|
|
3806
|
-
let n = K(() =>
|
|
3807
|
-
return
|
|
3806
|
+
let n = K(() => xp.new({ id: t, __demoMode: e }), []);
|
|
3807
|
+
return dp(() => n.dispose()), n;
|
|
3808
3808
|
}
|
|
3809
|
-
let
|
|
3810
|
-
|
|
3809
|
+
let Ep = be(null);
|
|
3810
|
+
Ep.displayName = "PopoverGroupContext";
|
|
3811
3811
|
function Jb() {
|
|
3812
|
-
return ye(
|
|
3812
|
+
return ye(Ep);
|
|
3813
3813
|
}
|
|
3814
3814
|
let yd = be(null);
|
|
3815
3815
|
yd.displayName = "PopoverPanelContext";
|
|
@@ -3819,28 +3819,28 @@ function FS() {
|
|
|
3819
3819
|
let WS = "div";
|
|
3820
3820
|
function US(t, e) {
|
|
3821
3821
|
var n;
|
|
3822
|
-
let r = lt(), { __demoMode: a = !1, ...o } = t, s = BS({ id: r, __demoMode: a }), i = pe(null), l = Ue(e,
|
|
3822
|
+
let r = lt(), { __demoMode: a = !1, ...o } = t, s = BS({ id: r, __demoMode: a }), i = pe(null), l = Ue(e, Ku((L) => {
|
|
3823
3823
|
i.current = L;
|
|
3824
3824
|
})), [c, d, u, f, m] = ra(s, Y((L) => [L.popoverState, L.button, L.panel, L.buttonId, L.panelId], [])), h = aa((n = i.current) != null ? n : d), b = Mt(f), x = Mt(m), D = K(() => ({ buttonId: b, panelId: x, close: s.actions.close }), [b, x, s]), T = Jb(), O = T == null ? void 0 : T.registerPopover, R = Z(() => {
|
|
3825
3825
|
var L;
|
|
3826
3826
|
return (L = T == null ? void 0 : T.isFocusWithinPopoverGroup()) != null ? L : (h == null ? void 0 : h.activeElement) && ((d == null ? void 0 : d.contains(h.activeElement)) || (u == null ? void 0 : u.contains(h.activeElement)));
|
|
3827
3827
|
});
|
|
3828
3828
|
se(() => O == null ? void 0 : O(D), [O, D]);
|
|
3829
|
-
let [k, M] = $b(), W =
|
|
3829
|
+
let [k, M] = $b(), W = up(d), y = Fb({ mainTreeNode: W, portals: k, defaultContainers: [{ get current() {
|
|
3830
3830
|
return s.state.button;
|
|
3831
3831
|
} }, { get current() {
|
|
3832
3832
|
return s.state.panel;
|
|
3833
3833
|
} }] });
|
|
3834
|
-
|
|
3834
|
+
tp(h == null ? void 0 : h.defaultView, "focus", (L) => {
|
|
3835
3835
|
var E, S, N, _, $, H;
|
|
3836
3836
|
L.target !== window && yn(L.target) && s.state.popoverState === rt.Open && (R() || s.state.button && s.state.panel && (y.contains(L.target) || (S = (E = s.state.beforePanelSentinel.current) == null ? void 0 : E.contains) != null && S.call(E, L.target) || (_ = (N = s.state.afterPanelSentinel.current) == null ? void 0 : N.contains) != null && _.call(N, L.target) || (H = ($ = s.state.afterButtonSentinel.current) == null ? void 0 : $.contains) != null && H.call($, L.target) || s.actions.close()));
|
|
3837
3837
|
}, !0);
|
|
3838
3838
|
let v = c === rt.Open;
|
|
3839
3839
|
hb(v, y.resolveContainers, (L, E) => {
|
|
3840
|
-
s.actions.close(), pb(E,
|
|
3840
|
+
s.actions.close(), pb(E, ep.Loose) || (L.preventDefault(), d == null || d.focus());
|
|
3841
3841
|
});
|
|
3842
3842
|
let g = K(() => ({ open: c === rt.Open, close: s.actions.refocusableClose }), [c, s]), P = ra(s, Y((L) => qe(L.popoverState, { [rt.Open]: Ze.Open, [rt.Closed]: Ze.Closed }), [])), A = { ref: l }, I = Ce();
|
|
3843
|
-
return G.createElement($c, { node: W }, G.createElement(CA, null, G.createElement(yd.Provider, { value: null }, G.createElement(Zb.Provider, { value: s }, G.createElement(ed, { value: s.actions.refocusableClose }, G.createElement(
|
|
3843
|
+
return G.createElement($c, { node: W }, G.createElement(CA, null, G.createElement(yd.Provider, { value: null }, G.createElement(Zb.Provider, { value: s }, G.createElement(ed, { value: s.actions.refocusableClose }, G.createElement(lp, { value: P }, G.createElement(M, null, I({ ourProps: A, theirProps: o, slot: g, defaultTag: WS, name: "Popover" }))))))));
|
|
3844
3844
|
}
|
|
3845
3845
|
let HS = "button";
|
|
3846
3846
|
function zS(t, e) {
|
|
@@ -3885,7 +3885,7 @@ function zS(t, e) {
|
|
|
3885
3885
|
Ul(z.currentTarget) || a || (O ? (i.actions.close(), (ne = i.state.button) == null || ne.focus()) : (z.preventDefault(), z.stopPropagation(), i.state.popoverState === rt.Closed ? (T == null || T(i.state.buttonId), i.actions.open()) : i.actions.close(), (oe = i.state.button) == null || oe.focus()));
|
|
3886
3886
|
}), P = Z((z) => {
|
|
3887
3887
|
z.preventDefault(), z.stopPropagation();
|
|
3888
|
-
}), { isFocusVisible: A, focusProps: I } = fs({ autoFocus: o }), { isHovered: L, hoverProps: E } = Ml({ isDisabled: a }), { pressed: S, pressProps: N } = Fl({ disabled: a }), _ = l === rt.Open, $ = K(() => ({ open: _, active: S || _, disabled: a, hover: L, focus: A, autofocus: o }), [_, L, A, S, a, o]), H = nd(t, d), j = Ar(O ? { ref: M, type: H, onKeyDown: y, onClick: g, disabled: a || void 0, autoFocus: o } : { ref: k, id: u, type: H, "aria-expanded": l === rt.Open, "aria-controls": f ? m : void 0, disabled: a || void 0, autoFocus: o, onKeyDown: y, onKeyUp: v, onClick: g, onMouseDown: P }, I, E, N), Q =
|
|
3888
|
+
}), { isFocusVisible: A, focusProps: I } = fs({ autoFocus: o }), { isHovered: L, hoverProps: E } = Ml({ isDisabled: a }), { pressed: S, pressProps: N } = Fl({ disabled: a }), _ = l === rt.Open, $ = K(() => ({ open: _, active: S || _, disabled: a, hover: L, focus: A, autofocus: o }), [_, L, A, S, a, o]), H = nd(t, d), j = Ar(O ? { ref: M, type: H, onKeyDown: y, onClick: g, disabled: a || void 0, autoFocus: o } : { ref: k, id: u, type: H, "aria-expanded": l === rt.Open, "aria-controls": f ? m : void 0, disabled: a || void 0, autoFocus: o, onKeyDown: y, onKeyUp: v, onClick: g, onMouseDown: P }, I, E, N), Q = pp(), V = Z(() => {
|
|
3889
3889
|
if (!_t(i.state.panel)) return;
|
|
3890
3890
|
let z = i.state.panel;
|
|
3891
3891
|
function ne() {
|
|
@@ -3932,7 +3932,7 @@ function qS(t, e) {
|
|
|
3932
3932
|
var ie, z, ne, oe, ae;
|
|
3933
3933
|
let Ee = V.relatedTarget;
|
|
3934
3934
|
Ee && O.current && ((ie = O.current) != null && ie.contains(Ee) || (d.actions.close(), ((ne = (z = b.current) == null ? void 0 : z.contains) != null && ne.call(z, Ee) || (ae = (oe = x.current) == null ? void 0 : oe.contains) != null && ae.call(oe, Ee)) && Ee.focus({ preventScroll: !0 })));
|
|
3935
|
-
} : void 0, tabIndex: -1, style: { ...c.style, ...M, "--button-width": k1(m, !0).width }, ...rd(E) }), $ =
|
|
3935
|
+
} : void 0, tabIndex: -1, style: { ...c.style, ...M, "--button-width": k1(m, !0).width }, ...rd(E) }), $ = pp(), H = Z(() => {
|
|
3936
3936
|
let V = O.current;
|
|
3937
3937
|
if (!V) return;
|
|
3938
3938
|
function ie() {
|
|
@@ -3964,7 +3964,7 @@ function qS(t, e) {
|
|
|
3964
3964
|
}
|
|
3965
3965
|
ie();
|
|
3966
3966
|
}), Q = Ce();
|
|
3967
|
-
return G.createElement(
|
|
3967
|
+
return G.createElement(cp, null, G.createElement(yd.Provider, { value: r }, G.createElement(ed, { value: d.actions.refocusableClose }, G.createElement(Bb, { enabled: s ? t.static || L : !1, ownerDocument: P }, L && u && G.createElement(bn, { id: D, ref: b, features: vn.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: H }), Q({ ourProps: _, theirProps: c, slot: N, defaultTag: jS, features: YS, visible: L, name: "Popover.Panel" }), L && u && G.createElement(bn, { id: T, ref: x, features: vn.Focusable, "data-headlessui-focus-guard": !0, as: "button", type: "button", onFocus: j })))));
|
|
3968
3968
|
}
|
|
3969
3969
|
let KS = "div";
|
|
3970
3970
|
function XS(t, e) {
|
|
@@ -3989,22 +3989,22 @@ function XS(t, e) {
|
|
|
3989
3989
|
}), c = Z((b) => {
|
|
3990
3990
|
for (let x of a) x.buttonId.current !== b && x.close();
|
|
3991
3991
|
}), d = K(() => ({ registerPopover: i, unregisterPopover: s, isFocusWithinPopoverGroup: l, closeOthers: c }), [i, s, l, c]), u = K(() => ({}), []), f = t, m = { ref: r }, h = Ce();
|
|
3992
|
-
return G.createElement($c, null, G.createElement(
|
|
3992
|
+
return G.createElement($c, null, G.createElement(Ep.Provider, { value: d }, h({ ourProps: m, theirProps: f, slot: u, defaultTag: KS, name: "Popover.Group" })));
|
|
3993
3993
|
}
|
|
3994
|
-
let QS = Ae(US), t0 = Ae(zS), ZS = Ae(e0), n0 = Ae(e0), r0 = Ae(qS), JS = Ae(XS), e2 = Object.assign(QS, { Button: t0, Backdrop: n0, Overlay: ZS, Panel: r0, Group: JS }),
|
|
3995
|
-
|
|
3994
|
+
let QS = Ae(US), t0 = Ae(zS), ZS = Ae(e0), n0 = Ae(e0), r0 = Ae(qS), JS = Ae(XS), e2 = Object.assign(QS, { Button: t0, Backdrop: n0, Overlay: ZS, Panel: r0, Group: JS }), Ap = be(null);
|
|
3995
|
+
Ap.displayName = "GroupContext";
|
|
3996
3996
|
let t2 = ht;
|
|
3997
3997
|
function n2(t) {
|
|
3998
3998
|
var e;
|
|
3999
|
-
let [n, r] = ce(null), [a, o] = ob(), [s, i] =
|
|
3999
|
+
let [n, r] = ce(null), [a, o] = ob(), [s, i] = Xu(), l = K(() => ({ switch: n, setSwitch: r }), [n, r]), c = {}, d = t, u = Ce();
|
|
4000
4000
|
return G.createElement(i, { name: "Switch.Description", value: s }, G.createElement(o, { name: "Switch.Label", value: a, props: { htmlFor: (e = l.switch) == null ? void 0 : e.id, onClick(f) {
|
|
4001
|
-
n && (
|
|
4002
|
-
} } }, G.createElement(
|
|
4001
|
+
n && (gu(f.currentTarget) && f.preventDefault(), n.click(), n.focus({ preventScroll: !0 }));
|
|
4002
|
+
} } }, G.createElement(Ap.Provider, { value: l }, u({ ourProps: c, theirProps: d, slot: {}, defaultTag: t2, name: "Switch.Group" }))));
|
|
4003
4003
|
}
|
|
4004
4004
|
let r2 = "button";
|
|
4005
4005
|
function a2(t, e) {
|
|
4006
4006
|
var n;
|
|
4007
|
-
let r = lt(), a =
|
|
4007
|
+
let r = lt(), a = qu(), o = Wl(), { id: s = a || `headlessui-switch-${r}`, disabled: i = o || !1, checked: l, defaultChecked: c, onChange: d, name: u, value: f, form: m, autoFocus: h = !1, ...b } = t, x = ye(Ap), [D, T] = ce(null), O = pe(null), R = Ue(O, e, x === null ? null : x.setSwitch, T), k = zv(c), [M, W] = Hv(l, d, k ?? !1), y = ca(), [v, g] = ce(!1), P = Z(() => {
|
|
4008
4008
|
g(!0), W == null || W(!M), y.nextFrame(() => {
|
|
4009
4009
|
g(!1);
|
|
4010
4010
|
});
|
|
@@ -4013,12 +4013,12 @@ function a2(t, e) {
|
|
|
4013
4013
|
oe.preventDefault(), P();
|
|
4014
4014
|
}), I = Z((oe) => {
|
|
4015
4015
|
oe.key === Ne.Space ? (oe.preventDefault(), P()) : oe.key === Ne.Enter && Yv(oe.currentTarget);
|
|
4016
|
-
}), L = Z((oe) => oe.preventDefault()), E =
|
|
4016
|
+
}), L = Z((oe) => oe.preventDefault()), E = Qu(), S = nb(), { isFocusVisible: N, focusProps: _ } = fs({ autoFocus: h }), { isHovered: $, hoverProps: H } = Ml({ isDisabled: i }), { pressed: j, pressProps: Q } = Fl({ disabled: i }), V = K(() => ({ checked: M, disabled: i, hover: $, focus: N, active: j, autofocus: h, changing: v }), [M, $, N, j, i, v, h]), ie = Ar({ id: s, ref: R, role: "switch", type: nd(t, D), tabIndex: t.tabIndex === -1 ? 0 : (n = t.tabIndex) != null ? n : 0, "aria-checked": M, "aria-labelledby": E, "aria-describedby": S, disabled: i || void 0, autoFocus: h, onClick: A, onKeyUp: I, onKeyPress: L }, _, H, Q), z = Y(() => {
|
|
4017
4017
|
if (k !== void 0) return W == null ? void 0 : W(k);
|
|
4018
4018
|
}, [W, k]), ne = Ce();
|
|
4019
4019
|
return G.createElement(G.Fragment, null, u != null && G.createElement(Kv, { disabled: i, data: { [u]: f || "on" }, overrides: { type: "checkbox", checked: M }, form: m, onReset: z }), ne({ ourProps: ie, theirProps: b, slot: V, defaultTag: r2, name: "Switch" }));
|
|
4020
4020
|
}
|
|
4021
|
-
let o2 = Ae(a2), s2 = n2, i2 =
|
|
4021
|
+
let o2 = Ae(a2), s2 = n2, i2 = Zu, l2 = rb, c2 = Object.assign(o2, { Group: s2, Label: i2, Description: l2 });
|
|
4022
4022
|
function d2({ onFocus: t }) {
|
|
4023
4023
|
let [e, n] = ce(!0), r = dd();
|
|
4024
4024
|
return e ? G.createElement(bn, { as: "button", type: "button", features: vn.Focusable, onFocus: (a) => {
|
|
@@ -4092,23 +4092,23 @@ let y2 = { 0(t, e) {
|
|
|
4092
4092
|
return t.panels.includes(e.panel) ? t : { ...t, panels: es([...t.panels, e.panel], (n) => n.current) };
|
|
4093
4093
|
}, 4(t, e) {
|
|
4094
4094
|
return { ...t, panels: t.panels.filter((n) => n !== e.panel) };
|
|
4095
|
-
} },
|
|
4096
|
-
|
|
4095
|
+
} }, Sp = be(null);
|
|
4096
|
+
Sp.displayName = "TabsDataContext";
|
|
4097
4097
|
function as(t) {
|
|
4098
|
-
let e = ye(
|
|
4098
|
+
let e = ye(Sp);
|
|
4099
4099
|
if (e === null) {
|
|
4100
4100
|
let n = new Error(`<${t} /> is missing a parent <Tab.Group /> component.`);
|
|
4101
4101
|
throw Error.captureStackTrace && Error.captureStackTrace(n, as), n;
|
|
4102
4102
|
}
|
|
4103
4103
|
return e;
|
|
4104
4104
|
}
|
|
4105
|
-
let
|
|
4106
|
-
|
|
4107
|
-
function
|
|
4108
|
-
let e = ye(
|
|
4105
|
+
let Op = be(null);
|
|
4106
|
+
Op.displayName = "TabsActionsContext";
|
|
4107
|
+
function Cp(t) {
|
|
4108
|
+
let e = ye(Op);
|
|
4109
4109
|
if (e === null) {
|
|
4110
4110
|
let n = new Error(`<${t} /> is missing a parent <Tab.Group /> component.`);
|
|
4111
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
4111
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, Cp), n;
|
|
4112
4112
|
}
|
|
4113
4113
|
return e;
|
|
4114
4114
|
}
|
|
@@ -4131,7 +4131,7 @@ function b2(t, e) {
|
|
|
4131
4131
|
g.some((P, A) => m.tabs[A] !== P) && k(g.indexOf(m.tabs[M.current]));
|
|
4132
4132
|
});
|
|
4133
4133
|
let y = { ref: f }, v = Ce();
|
|
4134
|
-
return G.createElement(p2, null, G.createElement(
|
|
4134
|
+
return G.createElement(p2, null, G.createElement(Op.Provider, { value: W }, G.createElement(Sp.Provider, { value: T }, T.tabs.length <= 0 && G.createElement(d2, { onFocus: () => {
|
|
4135
4135
|
var g, P;
|
|
4136
4136
|
for (let A of D.current) if (((g = A.current) == null ? void 0 : g.tabIndex) === 0) return (P = A.current) == null || P.focus(), !0;
|
|
4137
4137
|
return !1;
|
|
@@ -4145,7 +4145,7 @@ function T2(t, e) {
|
|
|
4145
4145
|
let x2 = "button";
|
|
4146
4146
|
function E2(t, e) {
|
|
4147
4147
|
var n, r;
|
|
4148
|
-
let a = lt(), { id: o = `headlessui-tabs-tab-${a}`, disabled: s = !1, autoFocus: i = !1, ...l } = t, { orientation: c, activation: d, selectedIndex: u, tabs: f, panels: m } = as("Tab"), h =
|
|
4148
|
+
let a = lt(), { id: o = `headlessui-tabs-tab-${a}`, disabled: s = !1, autoFocus: i = !1, ...l } = t, { orientation: c, activation: d, selectedIndex: u, tabs: f, panels: m } = as("Tab"), h = Cp("Tab"), b = as("Tab"), [x, D] = ce(null), T = pe(null), O = Ue(T, e, D);
|
|
4149
4149
|
Be(() => h.registerTab(T), [h, T]);
|
|
4150
4150
|
let R = o0("tabs"), k = f.indexOf(T);
|
|
4151
4151
|
k === -1 && (k = R);
|
|
@@ -4194,14 +4194,14 @@ function S2(t, e) {
|
|
|
4194
4194
|
let O2 = "div", C2 = tn.RenderStrategy | tn.Static;
|
|
4195
4195
|
function D2(t, e) {
|
|
4196
4196
|
var n, r, a, o;
|
|
4197
|
-
let s = lt(), { id: i = `headlessui-tabs-panel-${s}`, tabIndex: l = 0, ...c } = t, { selectedIndex: d, tabs: u, panels: f } = as("Tab.Panel"), m =
|
|
4197
|
+
let s = lt(), { id: i = `headlessui-tabs-panel-${s}`, tabIndex: l = 0, ...c } = t, { selectedIndex: d, tabs: u, panels: f } = as("Tab.Panel"), m = Cp("Tab.Panel"), h = pe(null), b = Ue(h, e);
|
|
4198
4198
|
Be(() => m.registerPanel(h), [m, h]);
|
|
4199
4199
|
let x = o0("panels"), D = f.indexOf(h);
|
|
4200
4200
|
D === -1 && (D = x);
|
|
4201
4201
|
let T = D === d, { isFocusVisible: O, focusProps: R } = fs(), k = K(() => ({ selected: T, focus: O }), [T, O]), M = Ar({ ref: b, id: i, role: "tabpanel", "aria-labelledby": (r = (n = u[D]) == null ? void 0 : n.current) == null ? void 0 : r.id, tabIndex: T ? l : -1 }, R), W = Ce();
|
|
4202
4202
|
return !T && ((a = c.unmount) == null || a) && !((o = c.static) != null && o) ? G.createElement(bn, { "aria-hidden": "true", ...M }) : W({ ourProps: M, theirProps: c, slot: k, defaultTag: O2, features: C2, visible: T, name: "Tabs.Panel" });
|
|
4203
4203
|
}
|
|
4204
|
-
let P2 = Ae(E2),
|
|
4204
|
+
let P2 = Ae(E2), Dp = Ae(b2), Pp = Ae(T2), Ip = Ae(S2), _p = Ae(D2), s0 = Object.assign(P2, { Group: Dp, List: Pp, Panels: Ip, Panel: _p });
|
|
4205
4205
|
const _e = () => {
|
|
4206
4206
|
const { address: t, status: e, connector: n, isConnected: r } = Tv();
|
|
4207
4207
|
return {
|
|
@@ -4224,13 +4224,13 @@ const i0 = "2.31.4";
|
|
|
4224
4224
|
let al = {
|
|
4225
4225
|
getDocsUrl: ({ docsBaseUrl: t, docsPath: e = "", docsSlug: n }) => e ? `${t ?? "https://viem.sh"}${e}${n ? `#${n}` : ""}` : void 0,
|
|
4226
4226
|
version: `viem@${i0}`
|
|
4227
|
-
}, Qe = class
|
|
4227
|
+
}, Qe = class Du extends Error {
|
|
4228
4228
|
constructor(e, n = {}) {
|
|
4229
4229
|
var i;
|
|
4230
4230
|
const r = (() => {
|
|
4231
4231
|
var l;
|
|
4232
|
-
return n.cause instanceof
|
|
4233
|
-
})(), a = n.cause instanceof
|
|
4232
|
+
return n.cause instanceof Du ? n.cause.details : (l = n.cause) != null && l.message ? n.cause.message : n.details;
|
|
4233
|
+
})(), a = n.cause instanceof Du && n.cause.docsPath || n.docsPath, o = (i = al.getDocsUrl) == null ? void 0 : i.call(al, { ...n, docsPath: a }), s = [
|
|
4234
4234
|
e || "An error occurred.",
|
|
4235
4235
|
"",
|
|
4236
4236
|
...n.metaMessages ? [...n.metaMessages, ""] : [],
|
|
@@ -4444,7 +4444,7 @@ function Jo(t, e = {}) {
|
|
|
4444
4444
|
function Bc(t, e = {}) {
|
|
4445
4445
|
return Number(Jo(t, e));
|
|
4446
4446
|
}
|
|
4447
|
-
function
|
|
4447
|
+
function Lp(t, e) {
|
|
4448
4448
|
return ({ exclude: n, format: r }) => ({
|
|
4449
4449
|
exclude: n,
|
|
4450
4450
|
format: (a) => {
|
|
@@ -4467,7 +4467,7 @@ const p0 = {
|
|
|
4467
4467
|
"0x3": "eip4844",
|
|
4468
4468
|
"0x4": "eip7702"
|
|
4469
4469
|
};
|
|
4470
|
-
function
|
|
4470
|
+
function Np(t) {
|
|
4471
4471
|
const e = {
|
|
4472
4472
|
...t,
|
|
4473
4473
|
blockHash: t.blockHash ? t.blockHash : null,
|
|
@@ -4499,7 +4499,7 @@ function Lp(t) {
|
|
|
4499
4499
|
}
|
|
4500
4500
|
})(), e.type === "legacy" && (delete e.accessList, delete e.maxFeePerBlobGas, delete e.maxFeePerGas, delete e.maxPriorityFeePerGas, delete e.yParity), e.type === "eip2930" && (delete e.maxFeePerBlobGas, delete e.maxFeePerGas, delete e.maxPriorityFeePerGas), e.type === "eip1559" && delete e.maxFeePerBlobGas, e;
|
|
4501
4501
|
}
|
|
4502
|
-
const H2 = /* @__PURE__ */
|
|
4502
|
+
const H2 = /* @__PURE__ */ Lp("transaction", Np);
|
|
4503
4503
|
function z2(t) {
|
|
4504
4504
|
return t.map((e) => ({
|
|
4505
4505
|
address: e.address,
|
|
@@ -4511,7 +4511,7 @@ function z2(t) {
|
|
|
4511
4511
|
}));
|
|
4512
4512
|
}
|
|
4513
4513
|
function V2(t) {
|
|
4514
|
-
const e = (t.transactions ?? []).map((n) => typeof n == "string" ? n :
|
|
4514
|
+
const e = (t.transactions ?? []).map((n) => typeof n == "string" ? n : Np(n));
|
|
4515
4515
|
return {
|
|
4516
4516
|
...t,
|
|
4517
4517
|
baseFeePerGas: t.baseFeePerGas ? BigInt(t.baseFeePerGas) : null,
|
|
@@ -4530,7 +4530,7 @@ function V2(t) {
|
|
|
4530
4530
|
totalDifficulty: t.totalDifficulty ? BigInt(t.totalDifficulty) : null
|
|
4531
4531
|
};
|
|
4532
4532
|
}
|
|
4533
|
-
const G2 = /* @__PURE__ */
|
|
4533
|
+
const G2 = /* @__PURE__ */ Lp("block", V2);
|
|
4534
4534
|
function j2(t, { args: e, eventName: n } = {}) {
|
|
4535
4535
|
return {
|
|
4536
4536
|
...t,
|
|
@@ -4562,7 +4562,7 @@ function q2(t) {
|
|
|
4562
4562
|
};
|
|
4563
4563
|
return t.blobGasPrice && (e.blobGasPrice = BigInt(t.blobGasPrice)), t.blobGasUsed && (e.blobGasUsed = BigInt(t.blobGasUsed)), e;
|
|
4564
4564
|
}
|
|
4565
|
-
const K2 = /* @__PURE__ */
|
|
4565
|
+
const K2 = /* @__PURE__ */ Lp("transactionReceipt", q2), Rp = 2n ** 256n - 1n;
|
|
4566
4566
|
function Xl(t) {
|
|
4567
4567
|
return `0x${t.reduce((e, n) => e + n.replace("0x", ""), "")}`;
|
|
4568
4568
|
}
|
|
@@ -4761,7 +4761,7 @@ function nO(t, e) {
|
|
|
4761
4761
|
];
|
|
4762
4762
|
return o = o.replace(/(0+)$/, ""), `${r ? "-" : ""}${a || "0"}${o ? `.${o}` : ""}`;
|
|
4763
4763
|
}
|
|
4764
|
-
function
|
|
4764
|
+
function Pu(t, e = "wei") {
|
|
4765
4765
|
return nO(t, tO[e]);
|
|
4766
4766
|
}
|
|
4767
4767
|
function rO(t) {
|
|
@@ -4864,7 +4864,7 @@ function Il(...t) {
|
|
|
4864
4864
|
for (let e = 0; e < t.length; e++)
|
|
4865
4865
|
t[e].fill(0);
|
|
4866
4866
|
}
|
|
4867
|
-
function
|
|
4867
|
+
function qd(t) {
|
|
4868
4868
|
return new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
4869
4869
|
}
|
|
4870
4870
|
function Un(t, e) {
|
|
@@ -4885,13 +4885,13 @@ function mO(t) {
|
|
|
4885
4885
|
throw new Error("string expected");
|
|
4886
4886
|
return new Uint8Array(new TextEncoder().encode(t));
|
|
4887
4887
|
}
|
|
4888
|
-
function
|
|
4888
|
+
function kp(t) {
|
|
4889
4889
|
return typeof t == "string" && (t = mO(t)), Pl(t), t;
|
|
4890
4890
|
}
|
|
4891
4891
|
class b0 {
|
|
4892
4892
|
}
|
|
4893
4893
|
function g0(t) {
|
|
4894
|
-
const e = (r) => t().update(
|
|
4894
|
+
const e = (r) => t().update(kp(r)).digest(), n = t();
|
|
4895
4895
|
return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
|
|
4896
4896
|
}
|
|
4897
4897
|
function fO(t, e, n, r) {
|
|
@@ -4908,15 +4908,15 @@ function yO(t, e, n) {
|
|
|
4908
4908
|
}
|
|
4909
4909
|
class wO extends b0 {
|
|
4910
4910
|
constructor(e, n, r, a) {
|
|
4911
|
-
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = n, this.padOffset = r, this.isLE = a, this.buffer = new Uint8Array(e), this.view =
|
|
4911
|
+
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = n, this.padOffset = r, this.isLE = a, this.buffer = new Uint8Array(e), this.view = qd(this.buffer);
|
|
4912
4912
|
}
|
|
4913
4913
|
update(e) {
|
|
4914
|
-
Fc(this), e =
|
|
4914
|
+
Fc(this), e = kp(e), Pl(e);
|
|
4915
4915
|
const { view: n, buffer: r, blockLen: a } = this, o = e.length;
|
|
4916
4916
|
for (let s = 0; s < o; ) {
|
|
4917
4917
|
const i = Math.min(a - this.pos, o - s);
|
|
4918
4918
|
if (i === a) {
|
|
4919
|
-
const l =
|
|
4919
|
+
const l = qd(e);
|
|
4920
4920
|
for (; a <= o - s; s += a)
|
|
4921
4921
|
this.process(l, s);
|
|
4922
4922
|
continue;
|
|
@@ -4933,7 +4933,7 @@ class wO extends b0 {
|
|
|
4933
4933
|
for (let u = s; u < a; u++)
|
|
4934
4934
|
n[u] = 0;
|
|
4935
4935
|
fO(r, a - 8, BigInt(this.length * 8), o), this.process(r, 0);
|
|
4936
|
-
const i =
|
|
4936
|
+
const i = qd(e), l = this.outputLen;
|
|
4937
4937
|
if (l % 4)
|
|
4938
4938
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
4939
4939
|
const c = l / 4, d = this.get();
|
|
@@ -5096,9 +5096,9 @@ function IO(t) {
|
|
|
5096
5096
|
}));
|
|
5097
5097
|
return a;
|
|
5098
5098
|
}
|
|
5099
|
-
const Sw = 6, T0 = 32,
|
|
5099
|
+
const Sw = 6, T0 = 32, $p = 4096, x0 = T0 * $p, Ow = x0 * Sw - // terminator byte (0x80).
|
|
5100
5100
|
1 - // zero byte (0x00) appended to each field element.
|
|
5101
|
-
1 *
|
|
5101
|
+
1 * $p * Sw, E0 = 1;
|
|
5102
5102
|
class _O extends Qe {
|
|
5103
5103
|
constructor({ maxSize: e, size: n }) {
|
|
5104
5104
|
super("Blob size is too large.", {
|
|
@@ -5145,7 +5145,7 @@ function RO(t) {
|
|
|
5145
5145
|
for (; o; ) {
|
|
5146
5146
|
const i = m0(new Uint8Array(x0));
|
|
5147
5147
|
let l = 0;
|
|
5148
|
-
for (; l <
|
|
5148
|
+
for (; l < $p; ) {
|
|
5149
5149
|
const c = n.slice(s, s + (T0 - 1));
|
|
5150
5150
|
if (i.pushByte(0), i.pushBytes(c), c.length < 31) {
|
|
5151
5151
|
i.pushByte(128), o = !1;
|
|
@@ -5185,7 +5185,7 @@ class wd extends Qe {
|
|
|
5185
5185
|
}
|
|
5186
5186
|
class vd extends Qe {
|
|
5187
5187
|
constructor({ cause: e, maxFeePerGas: n } = {}) {
|
|
5188
|
-
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${
|
|
5188
|
+
super(`The fee cap (\`maxFeePerGas\`${n ? ` = ${Pu(n)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
5189
5189
|
cause: e,
|
|
5190
5190
|
name: "FeeCapTooHighError"
|
|
5191
5191
|
});
|
|
@@ -5200,7 +5200,7 @@ Object.defineProperty(vd, "nodeMessage", {
|
|
|
5200
5200
|
class S0 extends Qe {
|
|
5201
5201
|
constructor({ cause: e, maxPriorityFeePerGas: n, maxFeePerGas: r } = {}) {
|
|
5202
5202
|
super([
|
|
5203
|
-
`The provided tip (\`maxPriorityFeePerGas\`${n ? ` = ${
|
|
5203
|
+
`The provided tip (\`maxPriorityFeePerGas\`${n ? ` = ${Pu(n)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r ? ` = ${Pu(r)} gwei` : ""}).`
|
|
5204
5204
|
].join(`
|
|
5205
5205
|
`), {
|
|
5206
5206
|
cause: e,
|
|
@@ -5269,7 +5269,7 @@ function zO(t, e = 24) {
|
|
|
5269
5269
|
}
|
|
5270
5270
|
Il(n);
|
|
5271
5271
|
}
|
|
5272
|
-
class
|
|
5272
|
+
class Mp extends b0 {
|
|
5273
5273
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
5274
5274
|
constructor(e, n, r, a = !1, o = 24) {
|
|
5275
5275
|
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = e, this.suffix = n, this.outputLen = r, this.enableXOF = a, this.rounds = o, xw(r), !(0 < e && e < 200))
|
|
@@ -5283,7 +5283,7 @@ class $p extends b0 {
|
|
|
5283
5283
|
Ew(this.state32), zO(this.state32, this.rounds), Ew(this.state32), this.posOut = 0, this.pos = 0;
|
|
5284
5284
|
}
|
|
5285
5285
|
update(e) {
|
|
5286
|
-
Fc(this), e =
|
|
5286
|
+
Fc(this), e = kp(e), Pl(e);
|
|
5287
5287
|
const { blockLen: n, state: r } = this, a = e.length;
|
|
5288
5288
|
for (let o = 0; o < a; ) {
|
|
5289
5289
|
const s = Math.min(n - this.pos, a - o);
|
|
@@ -5331,30 +5331,30 @@ class $p extends b0 {
|
|
|
5331
5331
|
}
|
|
5332
5332
|
_cloneInto(e) {
|
|
5333
5333
|
const { blockLen: n, suffix: r, outputLen: a, rounds: o, enableXOF: s } = this;
|
|
5334
|
-
return e || (e = new
|
|
5334
|
+
return e || (e = new Mp(n, r, a, s, o)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = o, e.suffix = r, e.outputLen = a, e.enableXOF = s, e.destroyed = this.destroyed, e;
|
|
5335
5335
|
}
|
|
5336
5336
|
}
|
|
5337
|
-
const VO = (t, e, n) => g0(() => new
|
|
5337
|
+
const VO = (t, e, n) => g0(() => new Mp(e, t, n)), GO = VO(1, 136, 256 / 8);
|
|
5338
5338
|
function jO(t, e) {
|
|
5339
5339
|
return GO(Kl(t, { strict: !1 }) ? d0(t) : t);
|
|
5340
5340
|
}
|
|
5341
|
-
const
|
|
5341
|
+
const Kd = /* @__PURE__ */ new O0(8192);
|
|
5342
5342
|
function YO(t, e) {
|
|
5343
|
-
if (
|
|
5344
|
-
return
|
|
5343
|
+
if (Kd.has(`${t}.${e}`))
|
|
5344
|
+
return Kd.get(`${t}.${e}`);
|
|
5345
5345
|
const n = t.substring(2).toLowerCase(), r = jO(u0(n)), a = n.split("");
|
|
5346
5346
|
for (let s = 0; s < 40; s += 2)
|
|
5347
5347
|
r[s >> 1] >> 4 >= 8 && a[s] && (a[s] = a[s].toUpperCase()), (r[s >> 1] & 15) >= 8 && a[s + 1] && (a[s + 1] = a[s + 1].toUpperCase());
|
|
5348
5348
|
const o = `0x${a.join("")}`;
|
|
5349
|
-
return
|
|
5349
|
+
return Kd.set(`${t}.${e}`, o), o;
|
|
5350
5350
|
}
|
|
5351
|
-
const qO = /^0x[a-fA-F0-9]{40}$/,
|
|
5351
|
+
const qO = /^0x[a-fA-F0-9]{40}$/, Xd = /* @__PURE__ */ new O0(8192);
|
|
5352
5352
|
function Yo(t, e) {
|
|
5353
5353
|
const { strict: n = !0 } = e ?? {}, r = `${t}.${n}`;
|
|
5354
|
-
if (
|
|
5355
|
-
return
|
|
5354
|
+
if (Xd.has(r))
|
|
5355
|
+
return Xd.get(r);
|
|
5356
5356
|
const a = qO.test(t) ? t.toLowerCase() === t ? !0 : n ? YO(t) === t : !0 : !1;
|
|
5357
|
-
return
|
|
5357
|
+
return Xd.set(r, a), a;
|
|
5358
5358
|
}
|
|
5359
5359
|
function KO(t, e, n, { strict: r } = {}) {
|
|
5360
5360
|
return Kl(t, { strict: !1 }) ? QO(t, e, n, {
|
|
@@ -5389,7 +5389,7 @@ function ZO(t) {
|
|
|
5389
5389
|
if (r < 0)
|
|
5390
5390
|
throw new wd({ chainId: r });
|
|
5391
5391
|
}
|
|
5392
|
-
|
|
5392
|
+
Bp(t);
|
|
5393
5393
|
}
|
|
5394
5394
|
function JO(t) {
|
|
5395
5395
|
const { blobVersionedHashes: e } = t;
|
|
@@ -5407,15 +5407,15 @@ function JO(t) {
|
|
|
5407
5407
|
});
|
|
5408
5408
|
}
|
|
5409
5409
|
}
|
|
5410
|
-
|
|
5410
|
+
Bp(t);
|
|
5411
5411
|
}
|
|
5412
|
-
function
|
|
5412
|
+
function Bp(t) {
|
|
5413
5413
|
const { chainId: e, maxPriorityFeePerGas: n, maxFeePerGas: r, to: a } = t;
|
|
5414
5414
|
if (e <= 0)
|
|
5415
5415
|
throw new wd({ chainId: e });
|
|
5416
5416
|
if (a && !Yo(a))
|
|
5417
5417
|
throw new jo({ address: a });
|
|
5418
|
-
if (r && r >
|
|
5418
|
+
if (r && r > Rp)
|
|
5419
5419
|
throw new vd({ maxFeePerGas: r });
|
|
5420
5420
|
if (n && r && n > r)
|
|
5421
5421
|
throw new S0({ maxFeePerGas: r, maxPriorityFeePerGas: n });
|
|
@@ -5428,7 +5428,7 @@ function eC(t) {
|
|
|
5428
5428
|
throw new jo({ address: o });
|
|
5429
5429
|
if (n || a)
|
|
5430
5430
|
throw new Qe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
|
|
5431
|
-
if (r && r >
|
|
5431
|
+
if (r && r > Rp)
|
|
5432
5432
|
throw new vd({ maxFeePerGas: r });
|
|
5433
5433
|
}
|
|
5434
5434
|
function tC(t) {
|
|
@@ -5439,7 +5439,7 @@ function tC(t) {
|
|
|
5439
5439
|
throw new wd({ chainId: e });
|
|
5440
5440
|
if (n || a)
|
|
5441
5441
|
throw new Qe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
|
|
5442
|
-
if (r && r >
|
|
5442
|
+
if (r && r > Rp)
|
|
5443
5443
|
throw new vd({ maxFeePerGas: r });
|
|
5444
5444
|
}
|
|
5445
5445
|
function nC(t) {
|
|
@@ -5538,7 +5538,7 @@ function oC(t, e) {
|
|
|
5538
5538
|
}
|
|
5539
5539
|
function sC(t, e) {
|
|
5540
5540
|
const { chainId: n, gas: r, nonce: a, to: o, value: s, maxFeePerGas: i, maxPriorityFeePerGas: l, accessList: c, data: d } = t;
|
|
5541
|
-
|
|
5541
|
+
Bp(t);
|
|
5542
5542
|
const u = bd(c), f = [
|
|
5543
5543
|
ve(n),
|
|
5544
5544
|
a ? ve(a) : "0x",
|
|
@@ -5641,7 +5641,7 @@ const cC = {
|
|
|
5641
5641
|
transactions: (n = t.transactions) == null ? void 0 : n.map((r) => {
|
|
5642
5642
|
if (typeof r == "string")
|
|
5643
5643
|
return r;
|
|
5644
|
-
const a =
|
|
5644
|
+
const a = Np(r);
|
|
5645
5645
|
return a.typeHex === "0x7e" && (a.isSystemTx = r.isSystemTx, a.mint = r.mint ? Jo(r.mint) : void 0, a.sourceHash = r.sourceHash, a.type = "deposit"), a;
|
|
5646
5646
|
}),
|
|
5647
5647
|
stateRoot: t.stateRoot
|
|
@@ -6004,7 +6004,7 @@ function Lw(t, e) {
|
|
|
6004
6004
|
const n = t.getFullYear() - e.getFullYear() || t.getMonth() - e.getMonth() || t.getDate() - e.getDate() || t.getHours() - e.getHours() || t.getMinutes() - e.getMinutes() || t.getSeconds() - e.getSeconds() || t.getMilliseconds() - e.getMilliseconds();
|
|
6005
6005
|
return n < 0 ? -1 : n > 0 ? 1 : n;
|
|
6006
6006
|
}
|
|
6007
|
-
function
|
|
6007
|
+
function Fp(t) {
|
|
6008
6008
|
return (e) => {
|
|
6009
6009
|
const r = (t ? Math[t] : Math.trunc)(e);
|
|
6010
6010
|
return r === 0 ? 0 : r;
|
|
@@ -6016,14 +6016,14 @@ function DC(t, e, n) {
|
|
|
6016
6016
|
t,
|
|
6017
6017
|
e
|
|
6018
6018
|
), o = (+r - +a) / vC;
|
|
6019
|
-
return
|
|
6019
|
+
return Fp(n == null ? void 0 : n.roundingMethod)(o);
|
|
6020
6020
|
}
|
|
6021
6021
|
function k0(t, e) {
|
|
6022
6022
|
return +Je(t) - +Je(e);
|
|
6023
6023
|
}
|
|
6024
6024
|
function PC(t, e, n) {
|
|
6025
6025
|
const r = k0(t, e) / wC;
|
|
6026
|
-
return
|
|
6026
|
+
return Fp(n == null ? void 0 : n.roundingMethod)(r);
|
|
6027
6027
|
}
|
|
6028
6028
|
function IC(t, e) {
|
|
6029
6029
|
const n = Je(t, e == null ? void 0 : e.in);
|
|
@@ -6055,7 +6055,7 @@ function NC(t, e, n) {
|
|
|
6055
6055
|
}
|
|
6056
6056
|
function RC(t, e, n) {
|
|
6057
6057
|
const r = k0(t, e) / 1e3;
|
|
6058
|
-
return
|
|
6058
|
+
return Fp(n == null ? void 0 : n.roundingMethod)(r);
|
|
6059
6059
|
}
|
|
6060
6060
|
function kC(t, e, n) {
|
|
6061
6061
|
const [r, a] = ua(
|
|
@@ -6142,7 +6142,7 @@ const BC = {
|
|
|
6142
6142
|
const a = BC[t];
|
|
6143
6143
|
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
6144
6144
|
};
|
|
6145
|
-
function
|
|
6145
|
+
function Qd(t) {
|
|
6146
6146
|
return (e = {}) => {
|
|
6147
6147
|
const n = e.width ? String(e.width) : t.defaultWidth;
|
|
6148
6148
|
return t.formats[n] || t.formats[t.defaultWidth];
|
|
@@ -6164,15 +6164,15 @@ const WC = {
|
|
|
6164
6164
|
medium: "{{date}}, {{time}}",
|
|
6165
6165
|
short: "{{date}}, {{time}}"
|
|
6166
6166
|
}, zC = {
|
|
6167
|
-
date:
|
|
6167
|
+
date: Qd({
|
|
6168
6168
|
formats: WC,
|
|
6169
6169
|
defaultWidth: "full"
|
|
6170
6170
|
}),
|
|
6171
|
-
time:
|
|
6171
|
+
time: Qd({
|
|
6172
6172
|
formats: UC,
|
|
6173
6173
|
defaultWidth: "full"
|
|
6174
6174
|
}),
|
|
6175
|
-
dateTime:
|
|
6175
|
+
dateTime: Qd({
|
|
6176
6176
|
formats: HC,
|
|
6177
6177
|
defaultWidth: "full"
|
|
6178
6178
|
})
|
|
@@ -7212,7 +7212,7 @@ const $D = [
|
|
|
7212
7212
|
"minutes",
|
|
7213
7213
|
"seconds"
|
|
7214
7214
|
];
|
|
7215
|
-
function
|
|
7215
|
+
function Wp(t, e) {
|
|
7216
7216
|
const r = Zl().locale ?? $0, a = $D, o = " ";
|
|
7217
7217
|
return r.formatDistance ? a.reduce((i, l) => {
|
|
7218
7218
|
const c = `x${l.replace(/(^.)/, (u) => u.toUpperCase())}`, d = t[l];
|
|
@@ -7235,14 +7235,14 @@ function MD(t, e) {
|
|
|
7235
7235
|
}
|
|
7236
7236
|
const me = "0x0000000000000000000000000000000000000000", bs = BigInt(
|
|
7237
7237
|
"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
7238
|
-
), re = 18, BD = "1000000000000000000", FD = 59e3, Jl = 3e4, gs = 15e3, F0 = 5e3, W0 = 400, U0 = W0 * 1.2, WD =
|
|
7238
|
+
), re = 18, BD = "1000000000000000000", FD = 59e3, Jl = 3e4, gs = 15e3, F0 = 5e3, W0 = 400, U0 = W0 * 1.2, WD = Wp({ hours: 24 }), UD = {
|
|
7239
7239
|
address: me,
|
|
7240
7240
|
symbol: "",
|
|
7241
7241
|
chainId: nn.id,
|
|
7242
7242
|
depositParams: { customTokens: [] },
|
|
7243
7243
|
withdrawParams: { customTokens: [] },
|
|
7244
7244
|
deprecated: !1
|
|
7245
|
-
}, XM = "deposit", HD = 1,
|
|
7245
|
+
}, XM = "deposit", HD = 1, Up = 0, zD = 0.5, H0 = 0.02, VD = 0.75, QM = [Up], GD = "withdrawSafe", z0 = "initWithdrawal", jD = "unrollAndClaim", YD = "completeWithdrawal", qD = 3e7, KD = 1.25, Ro = 1e4, XD = 13e3, V0 = 3, Hp = 2e4, QD = 15e3, ZD = {
|
|
7246
7246
|
[Kn.id]: Kn,
|
|
7247
7247
|
[Xn.id]: Xn,
|
|
7248
7248
|
[nn.id]: nn,
|
|
@@ -7279,7 +7279,7 @@ const me = "0x0000000000000000000000000000000000000000", bs = BigInt(
|
|
|
7279
7279
|
address: "0x4200000000000000000000000000000000000006",
|
|
7280
7280
|
decimals: re
|
|
7281
7281
|
}
|
|
7282
|
-
},
|
|
7282
|
+
}, Zd = {
|
|
7283
7283
|
[Kn.id]: 299e5,
|
|
7284
7284
|
[Xn.id]: 299e5,
|
|
7285
7285
|
[nn.id]: 299e5,
|
|
@@ -10595,7 +10595,7 @@ const me = "0x0000000000000000000000000000000000000000", bs = BigInt(
|
|
|
10595
10595
|
stateMutability: "payable",
|
|
10596
10596
|
type: "function"
|
|
10597
10597
|
}
|
|
10598
|
-
],
|
|
10598
|
+
], zp = [
|
|
10599
10599
|
{ inputs: [], name: "ExternalCallerNotAllowed", type: "error" },
|
|
10600
10600
|
{
|
|
10601
10601
|
inputs: [{ internalType: "address", name: "asset", type: "address" }],
|
|
@@ -11286,7 +11286,7 @@ const me = "0x0000000000000000000000000000000000000000", bs = BigInt(
|
|
|
11286
11286
|
poolLogic: Sr,
|
|
11287
11287
|
flatcoinPointsModule: Sc,
|
|
11288
11288
|
easySwapperV2: Qn,
|
|
11289
|
-
limitOrder:
|
|
11289
|
+
limitOrder: zp
|
|
11290
11290
|
}, Bw = "Gas estimate error occurred", RP = "See console logs to report error details.", Fw = "Missing simulation params", kP = "Simulation timeout", j0 = "swap_data_deposit_error", Y0 = "swap_data_withdraw_error", ul = {
|
|
11291
11291
|
title: "Low Slippage",
|
|
11292
11292
|
hint: "Please increase slippage tolerance and try again."
|
|
@@ -11522,7 +11522,7 @@ const me = "0x0000000000000000000000000000000000000000", bs = BigInt(
|
|
|
11522
11522
|
symbol: "cbBTC",
|
|
11523
11523
|
decimals: 8,
|
|
11524
11524
|
value: ""
|
|
11525
|
-
},
|
|
11525
|
+
}, Jd = {
|
|
11526
11526
|
address: "0xb6fe221fe9eef5aba221c348ba20a1bf5e73624c",
|
|
11527
11527
|
symbol: "rETH",
|
|
11528
11528
|
decimals: re,
|
|
@@ -11657,7 +11657,7 @@ const me = "0x0000000000000000000000000000000000000000", bs = BigInt(
|
|
|
11657
11657
|
symbol: "tBTC",
|
|
11658
11658
|
decimals: re,
|
|
11659
11659
|
value: ""
|
|
11660
|
-
},
|
|
11660
|
+
}, Iu = {
|
|
11661
11661
|
address: me,
|
|
11662
11662
|
symbol: "all",
|
|
11663
11663
|
decimals: re,
|
|
@@ -11720,9 +11720,9 @@ const me = "0x0000000000000000000000000000000000000000", bs = BigInt(
|
|
|
11720
11720
|
Oc
|
|
11721
11721
|
), eI = {
|
|
11722
11722
|
[Oc.RETH_BASE]: {
|
|
11723
|
-
symbol:
|
|
11724
|
-
decimals:
|
|
11725
|
-
address:
|
|
11723
|
+
symbol: Jd.symbol,
|
|
11724
|
+
decimals: Jd.decimals,
|
|
11725
|
+
address: Jd.address
|
|
11726
11726
|
},
|
|
11727
11727
|
[Oc.WBTC_OPTIMISM]: {
|
|
11728
11728
|
symbol: Tl.symbol,
|
|
@@ -11818,7 +11818,7 @@ function gd(t, e, n) {
|
|
|
11818
11818
|
return `${r}/address/${t}`;
|
|
11819
11819
|
}
|
|
11820
11820
|
}
|
|
11821
|
-
var iI = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,
|
|
11821
|
+
var iI = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, eu = Math.ceil, Xt = Math.floor, Dt = "[BigNumber Error] ", Uw = Dt + "Number primitive has more than 15 significant digits: ", hn = 1e14, fe = 14, tu = 9007199254740991, nu = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Zr = 1e7, st = 1e9;
|
|
11822
11822
|
function ug(t) {
|
|
11823
11823
|
var e, n, r, a = T.prototype = { constructor: T, toString: null, valueOf: null }, o = new T(1), s = 20, i = 4, l = -7, c = 21, d = -1e7, u = 1e7, f = !1, m = 1, h = 0, b = {
|
|
11824
11824
|
prefix: "",
|
|
@@ -11878,7 +11878,7 @@ function ug(t) {
|
|
|
11878
11878
|
for (L = 0; N.charCodeAt(L) === 48; L++) ;
|
|
11879
11879
|
for (S = N.length; N.charCodeAt(--S) === 48; ) ;
|
|
11880
11880
|
if (N = N.slice(L, ++S)) {
|
|
11881
|
-
if (S -= L, E && T.DEBUG && S > 15 && (y >
|
|
11881
|
+
if (S -= L, E && T.DEBUG && S > 15 && (y > tu || y !== Xt(y)))
|
|
11882
11882
|
throw Error(Uw + _.s * y);
|
|
11883
11883
|
if ((I = I - L - 1) > u)
|
|
11884
11884
|
_.c = _.e = null;
|
|
@@ -11971,7 +11971,7 @@ function ug(t) {
|
|
|
11971
11971
|
};
|
|
11972
11972
|
return function(g) {
|
|
11973
11973
|
var P, A, I, L, E, S = 0, N = [], _ = new T(o);
|
|
11974
|
-
if (g == null ? g = s : Ye(g, 0, st), L =
|
|
11974
|
+
if (g == null ? g = s : Ye(g, 0, st), L = eu(g / fe), f)
|
|
11975
11975
|
if (crypto.getRandomValues) {
|
|
11976
11976
|
for (P = crypto.getRandomValues(new Uint32Array(L *= 2)); S < L; )
|
|
11977
11977
|
E = P[S] * 131072 + (P[S + 1] >>> 11), E >= 9e15 ? (A = crypto.getRandomValues(new Uint32Array(2)), P[S] = A[0], P[S + 1] = A[1]) : (N.push(E % 1e14), S += 2);
|
|
@@ -11985,7 +11985,7 @@ function ug(t) {
|
|
|
11985
11985
|
if (!f)
|
|
11986
11986
|
for (; S < L; )
|
|
11987
11987
|
E = v(), E < 9e15 && (N[S++] = E % 1e14);
|
|
11988
|
-
for (L = N[--S], g %= fe, L && g && (E =
|
|
11988
|
+
for (L = N[--S], g %= fe, L && g && (E = nu[fe - g], N[S] = Xt(L / E) * E); N[S] === 0; N.pop(), S--) ;
|
|
11989
11989
|
if (S < 0)
|
|
11990
11990
|
N = [I = 0];
|
|
11991
11991
|
else {
|
|
@@ -12135,13 +12135,13 @@ function ug(t) {
|
|
|
12135
12135
|
};
|
|
12136
12136
|
}();
|
|
12137
12137
|
function M(y, v, g, P) {
|
|
12138
|
-
var A, I, L, E, S, N, _, $ = y.c, H =
|
|
12138
|
+
var A, I, L, E, S, N, _, $ = y.c, H = nu;
|
|
12139
12139
|
if ($) {
|
|
12140
12140
|
e: {
|
|
12141
12141
|
for (A = 1, E = $[0]; E >= 10; E /= 10, A++) ;
|
|
12142
12142
|
if (I = v - A, I < 0)
|
|
12143
12143
|
I += fe, L = v, S = $[N = 0], _ = Xt(S / H[A - L - 1] % 10);
|
|
12144
|
-
else if (N =
|
|
12144
|
+
else if (N = eu((I + 1) / fe), N >= $.length)
|
|
12145
12145
|
if (P) {
|
|
12146
12146
|
for (; $.length <= N; $.push(0)) ;
|
|
12147
12147
|
S = _ = 0, A = 1, I %= fe, L = I - fe + 1;
|
|
@@ -12206,7 +12206,7 @@ function ug(t) {
|
|
|
12206
12206
|
} else {
|
|
12207
12207
|
if (y.e > 9 && ($.e > 0 || $.e < -1 || ($.e == 0 ? $.c[0] > 1 || E && $.c[1] >= 24e7 : $.c[0] < 8e13 || E && $.c[0] <= 9999975e7)))
|
|
12208
12208
|
return I = $.s < 0 && vc(y) ? -0 : 0, $.e > -1 && (I = 1 / I), new T(S ? 1 / I : I);
|
|
12209
|
-
h && (I =
|
|
12209
|
+
h && (I = eu(h / fe + 2));
|
|
12210
12210
|
}
|
|
12211
12211
|
for (E ? (g = new T(0.5), S && (y.s = 1), N = vc(y)) : (A = Math.abs(+W(y)), N = A % 2), _ = new T(o); ; ) {
|
|
12212
12212
|
if (N) {
|
|
@@ -12328,7 +12328,7 @@ function ug(t) {
|
|
|
12328
12328
|
}
|
|
12329
12329
|
return y && I.e + 1 > P && (P = I.e + 1), P;
|
|
12330
12330
|
}, a.shiftedBy = function(y) {
|
|
12331
|
-
return Ye(y, -
|
|
12331
|
+
return Ye(y, -tu, tu), this.times("1e" + y);
|
|
12332
12332
|
}, a.squareRoot = a.sqrt = function() {
|
|
12333
12333
|
var y, v, g, P, A, I = this, L = I.c, E = I.s, S = I.e, N = s + 4, _ = new T("0.5");
|
|
12334
12334
|
if (E !== 1 || !L || !L[0])
|
|
@@ -12375,7 +12375,7 @@ function ug(t) {
|
|
|
12375
12375
|
if (y != null && (E = new T(y), !E.isInteger() && (E.c || E.s !== 1) || E.lt(o)))
|
|
12376
12376
|
throw Error(Dt + "Argument " + (E.isInteger() ? "out of range: " : "not an integer: ") + W(E));
|
|
12377
12377
|
if (!Q) return new T(j);
|
|
12378
|
-
for (v = new T(o), N = g = new T(o), P = S = new T(o), H = Kt(Q), I = v.e = H.length - j.e - 1, v.c[0] =
|
|
12378
|
+
for (v = new T(o), N = g = new T(o), P = S = new T(o), H = Kt(Q), I = v.e = H.length - j.e - 1, v.c[0] = nu[(L = I % fe) < 0 ? fe + L : L], y = !y || E.comparedTo(v) > 0 ? I > 0 ? v : N : E, L = u, u = 1 / 0, E = new T(H), S.c[0] = 0; _ = e(E, v, 0, 1), A = g.plus(_.times(P)), A.comparedTo(y) != 1; )
|
|
12379
12379
|
g = P, P = A, N = S.plus(_.times(A = N)), S = A, v = E.minus(_.times(A = v)), E = A;
|
|
12380
12380
|
return A = e(y.minus(g), P, 0, 1), S = S.plus(A.times(N)), g = g.plus(A.times(P)), S.s = N.s = j.s, I = I * 2, $ = e(N, P, I, i).minus(j).abs().comparedTo(
|
|
12381
12381
|
e(S, g, I, i).minus(j).abs()
|
|
@@ -12436,7 +12436,7 @@ function vr(t, e, n) {
|
|
|
12436
12436
|
return t;
|
|
12437
12437
|
}
|
|
12438
12438
|
var X = ug();
|
|
12439
|
-
const Td = (t, e) => t / e * 100, ss = (t, e = re) => new X(t).shiftedBy(-e).toNumber(), zc = (t) => t < 1 ? 4 : t < 10 ? 3 : 2,
|
|
12439
|
+
const Td = (t, e) => t / e * 100, ss = (t, e = re) => new X(t).shiftedBy(-e).toNumber(), zc = (t) => t < 1 ? 4 : t < 10 ? 3 : 2, _u = (t, e = re) => new X(t.toString()).shiftedBy(e).toFixed(0), Hw = (t, e, n, r) => new X(e).dividedBy(n).multipliedBy(t).shiftedBy(-(r || re)).toNumber(), w6 = (t) => !!t && typeof t == "bigint", pg = (t) => !isNaN(parseFloat(t)) && !isNaN(t), Vp = (t) => {
|
|
12440
12440
|
const e = new X(0.01), n = new X(t), r = !n.isZero() && n.lt(e) ? e : n;
|
|
12441
12441
|
return BigInt(r.multipliedBy(100).toFixed(0));
|
|
12442
12442
|
}, lI = ({
|
|
@@ -12450,7 +12450,7 @@ const Td = (t, e) => t / e * 100, ss = (t, e = re) => new X(t).shiftedBy(-e).toN
|
|
|
12450
12450
|
swapDestinationAmount: i,
|
|
12451
12451
|
swapSlippage: l
|
|
12452
12452
|
}) => {
|
|
12453
|
-
const c = new X(i).multipliedBy(1 - l / 100).toFixed(0), d = [
|
|
12453
|
+
const c = new X(i).multipliedBy(1 - l / 100).toFixed(0), d = [Uu(s, { size: 32 }), e];
|
|
12454
12454
|
return [t, [[n, r, d], [a, c]], o];
|
|
12455
12455
|
}, cI = ({
|
|
12456
12456
|
receiveAssetAddress: t,
|
|
@@ -12465,7 +12465,7 @@ const Td = (t, e) => t / e * 100, ss = (t, e = re) => new X(t).shiftedBy(-e).toN
|
|
|
12465
12465
|
if (!i)
|
|
12466
12466
|
return o;
|
|
12467
12467
|
const l = [
|
|
12468
|
-
|
|
12468
|
+
Uu(i.routerKey, { size: 32 }),
|
|
12469
12469
|
i.rawTransaction.data
|
|
12470
12470
|
], c = [s.address, s.rawBalance, l];
|
|
12471
12471
|
return {
|
|
@@ -12503,7 +12503,7 @@ const Td = (t, e) => t / e * 100, ss = (t, e = re) => new X(t).shiftedBy(-e).toN
|
|
|
12503
12503
|
asset: c,
|
|
12504
12504
|
amount: d,
|
|
12505
12505
|
swapData: {
|
|
12506
|
-
routerKey:
|
|
12506
|
+
routerKey: Uu((u == null ? void 0 : u.routerKey) ?? "", { size: 32 }),
|
|
12507
12507
|
txData: (u == null ? void 0 : u.rawTransaction.data) ?? "0x"
|
|
12508
12508
|
}
|
|
12509
12509
|
};
|
|
@@ -12525,7 +12525,7 @@ const Td = (t, e) => t / e * 100, ss = (t, e = re) => new X(t).shiftedBy(-e).toN
|
|
|
12525
12525
|
withdrawData: l,
|
|
12526
12526
|
slippageTolerance: r
|
|
12527
12527
|
};
|
|
12528
|
-
},
|
|
12528
|
+
}, Gp = (t, e) => {
|
|
12529
12529
|
var n;
|
|
12530
12530
|
return ((n = gl[e]) == null ? void 0 : n.nativeTokenSymbol) === t;
|
|
12531
12531
|
}, uI = ({
|
|
@@ -12590,7 +12590,7 @@ const Td = (t, e) => t / e * 100, ss = (t, e = re) => new X(t).shiftedBy(-e).toN
|
|
|
12590
12590
|
}).format(a ? ss(t) : Number(t)), gc = (t, e, n = 0) => {
|
|
12591
12591
|
const r = Td(+t, e);
|
|
12592
12592
|
return xd(r, n);
|
|
12593
|
-
}, yI = (t) => pg(t) ? new X(t).toFixed() : "", pa = (t, e) => yI(new X(t).toFixed(e)),
|
|
12593
|
+
}, yI = (t) => pg(t) ? new X(t).toFixed() : "", pa = (t, e) => yI(new X(t).toFixed(e)), ru = ({
|
|
12594
12594
|
currency: t,
|
|
12595
12595
|
value: e
|
|
12596
12596
|
}) => t === "USD" ? wt({ value: e }) : `${JD[t]} ${pa(
|
|
@@ -12634,7 +12634,7 @@ const hg = (t, e) => vI(t) ? {
|
|
|
12634
12634
|
symbol: e,
|
|
12635
12635
|
precision: n,
|
|
12636
12636
|
truncateSymbol: r
|
|
12637
|
-
}) => `${wI(t, n)} ${gI(e)}`,
|
|
12637
|
+
}) => `${wI(t, n)} ${gI(e)}`, jp = typeof window < "u", wg = (t) => et(dP, t) || et(uP, t), vg = (t) => JP.some(
|
|
12638
12638
|
(e) => et(e, t)
|
|
12639
12639
|
), bg = (t) => eI[t.toLowerCase()] ?? {
|
|
12640
12640
|
symbol: "",
|
|
@@ -12661,7 +12661,7 @@ const hg = (t, e) => vI(t) ? {
|
|
|
12661
12661
|
address: me
|
|
12662
12662
|
}, SI = (t) => rI[t.toLowerCase()];
|
|
12663
12663
|
function OI() {
|
|
12664
|
-
if (
|
|
12664
|
+
if (jp)
|
|
12665
12665
|
try {
|
|
12666
12666
|
const t = localStorage.getItem(
|
|
12667
12667
|
xl.IS_BATCH_TRANSACTIONS_ENABLED
|
|
@@ -12672,7 +12672,7 @@ function OI() {
|
|
|
12672
12672
|
}
|
|
12673
12673
|
}
|
|
12674
12674
|
function CI(t) {
|
|
12675
|
-
if (
|
|
12675
|
+
if (jp)
|
|
12676
12676
|
try {
|
|
12677
12677
|
localStorage.setItem(
|
|
12678
12678
|
xl.IS_BATCH_TRANSACTIONS_ENABLED,
|
|
@@ -13018,7 +13018,7 @@ const Gw = {
|
|
|
13018
13018
|
]
|
|
13019
13019
|
);
|
|
13020
13020
|
return /* @__PURE__ */ p(Eg.Provider, { value: L, children: /* @__PURE__ */ p(xg.Provider, { value: D, children: t }) });
|
|
13021
|
-
}, At = () => ye(xg), He = () => ye(Eg), g6 = () => He().setPoolAddress, T6 = () => He().updateSendTokenInput, x6 = () => He().updateReceiveTokenInput, E6 = () => He().updateTradingSettings, A6 = () => He().setTradingType, S6 = () => He().updateTradingModal, PI = () => He().updatePoolFallbackData, II = () => He().onTransactionError, Ag = () => He().onTradingSettleError, _I = () => He().onTransactionSuccess,
|
|
13021
|
+
}, At = () => ye(xg), He = () => ye(Eg), g6 = () => He().setPoolAddress, T6 = () => He().updateSendTokenInput, x6 = () => He().updateReceiveTokenInput, E6 = () => He().updateTradingSettings, A6 = () => He().setTradingType, S6 = () => He().updateTradingModal, PI = () => He().updatePoolFallbackData, II = () => He().onTransactionError, Ag = () => He().onTradingSettleError, _I = () => He().onTransactionSuccess, Yp = () => He().onTransactionEstimationError, LI = () => He().onTokenSelector, xs = () => He().onLog, NI = () => He().onSimulateTransaction, qp = () => {
|
|
13022
13022
|
const t = He().getSwapData, {
|
|
13023
13023
|
settings: { selectedAggregators: e }
|
|
13024
13024
|
} = At();
|
|
@@ -13073,18 +13073,18 @@ const Gw = {
|
|
|
13073
13073
|
], ct = () => [At().modal, He().updateTradingModal], er = () => [At().type, He().setTradingType], As = () => At().type === "deposit", Ht = () => [
|
|
13074
13074
|
At().transactions,
|
|
13075
13075
|
He().updateTransactions
|
|
13076
|
-
], $I = () => At().defaultChainId,
|
|
13077
|
-
const { chain: t } = Tv(), { chains: e } = yx(), { switchChain: n, switchChainAsync: r } = wx(), a = $I(), o = t == null ? void 0 : t.id, s =
|
|
13076
|
+
], $I = () => At().defaultChainId, au = (t, e) => e.some(({ id: n }) => n === t), ma = () => {
|
|
13077
|
+
const { chain: t } = Tv(), { chains: e } = yx(), { switchChain: n, switchChainAsync: r } = wx(), a = $I(), o = t == null ? void 0 : t.id, s = au(o, e), i = a && au(a, e) ? a : e[0].id;
|
|
13078
13078
|
return {
|
|
13079
13079
|
chain: t,
|
|
13080
13080
|
isSupported: s,
|
|
13081
13081
|
switchNetwork: n,
|
|
13082
13082
|
switchNetworkAsync: r,
|
|
13083
13083
|
chainId: s ? o : void 0,
|
|
13084
|
-
supportedChainId:
|
|
13084
|
+
supportedChainId: au(o, e) ? o : i,
|
|
13085
13085
|
chains: e
|
|
13086
13086
|
};
|
|
13087
|
-
},
|
|
13087
|
+
}, Kp = ({
|
|
13088
13088
|
tokenAddress: t,
|
|
13089
13089
|
ownerAddress: e,
|
|
13090
13090
|
spenderAddress: n,
|
|
@@ -13170,7 +13170,7 @@ class ec extends WI {
|
|
|
13170
13170
|
}
|
|
13171
13171
|
}
|
|
13172
13172
|
const UI = async () => {
|
|
13173
|
-
},
|
|
13173
|
+
}, ou = (t) => {
|
|
13174
13174
|
const e = t[t.length - 1], n = typeof e == "object" && e !== null && ("value" in e || "gas" in e), r = n ? e : {}, a = n ? t.slice(0, -1) : t;
|
|
13175
13175
|
return { transactionOverrides: r, argumentsWithoutOverrides: a };
|
|
13176
13176
|
}, Ir = ({
|
|
@@ -13179,7 +13179,7 @@ const UI = async () => {
|
|
|
13179
13179
|
contractId: n,
|
|
13180
13180
|
onSettled: r
|
|
13181
13181
|
}) => {
|
|
13182
|
-
const { account: a } = _e(), { chainId: o, supportedChainId: s } = ma(), i = bx({ chainId: o }), l =
|
|
13182
|
+
const { account: a } = _e(), { chainId: o, supportedChainId: s } = ma(), i = bx({ chainId: o }), l = Fu({ chainId: o }), c = aI(n), d = e ?? We(n, o ?? s), u = NI(), { writeContract: f } = gx({
|
|
13183
13183
|
mutation: {
|
|
13184
13184
|
onSettled: r
|
|
13185
13185
|
}
|
|
@@ -13187,7 +13187,7 @@ const UI = async () => {
|
|
|
13187
13187
|
async (...x) => {
|
|
13188
13188
|
var D, T, O;
|
|
13189
13189
|
try {
|
|
13190
|
-
const { argumentsWithoutOverrides: R, transactionOverrides: k } =
|
|
13190
|
+
const { argumentsWithoutOverrides: R, transactionOverrides: k } = ou(x), M = await (l == null ? void 0 : l.estimateContractGas({
|
|
13191
13191
|
address: d,
|
|
13192
13192
|
abi: c,
|
|
13193
13193
|
functionName: t,
|
|
@@ -13200,7 +13200,7 @@ const UI = async () => {
|
|
|
13200
13200
|
return { error: Bw, value: BigInt(0) };
|
|
13201
13201
|
const W = Math.round(
|
|
13202
13202
|
Number(M) * KD
|
|
13203
|
-
), y =
|
|
13203
|
+
), y = Zd[o] ?? W, v = BigInt(Math.min(y, W));
|
|
13204
13204
|
return console.debug(
|
|
13205
13205
|
`[core-ui-kit]: estimated gas limit: ${Number(M)}`
|
|
13206
13206
|
), { error: "", value: v };
|
|
@@ -13227,7 +13227,7 @@ const UI = async () => {
|
|
|
13227
13227
|
return { data: null, error: Fw };
|
|
13228
13228
|
if (!l)
|
|
13229
13229
|
return { data: null, error: "Client is not defined" };
|
|
13230
|
-
const { argumentsWithoutOverrides: T, transactionOverrides: O } =
|
|
13230
|
+
const { argumentsWithoutOverrides: T, transactionOverrides: O } = ou(x), R = Ov({
|
|
13231
13231
|
abi: c,
|
|
13232
13232
|
functionName: t,
|
|
13233
13233
|
args: T
|
|
@@ -13238,7 +13238,7 @@ const UI = async () => {
|
|
|
13238
13238
|
from: a,
|
|
13239
13239
|
to: d,
|
|
13240
13240
|
input: R,
|
|
13241
|
-
gas:
|
|
13241
|
+
gas: Zd[o ?? s] ?? 0,
|
|
13242
13242
|
value: (D = O.value) == null ? void 0 : D.toString()
|
|
13243
13243
|
});
|
|
13244
13244
|
return { data: k, error: k == null ? void 0 : k.simulation.error_message };
|
|
@@ -13260,7 +13260,7 @@ const UI = async () => {
|
|
|
13260
13260
|
]
|
|
13261
13261
|
), b = Y(
|
|
13262
13262
|
async (...x) => {
|
|
13263
|
-
const { argumentsWithoutOverrides: D, transactionOverrides: T } =
|
|
13263
|
+
const { argumentsWithoutOverrides: D, transactionOverrides: T } = ou(x);
|
|
13264
13264
|
if (T.gas)
|
|
13265
13265
|
return f({
|
|
13266
13266
|
address: d,
|
|
@@ -13297,7 +13297,7 @@ const UI = async () => {
|
|
|
13297
13297
|
chainId: o,
|
|
13298
13298
|
args: D,
|
|
13299
13299
|
...T,
|
|
13300
|
-
gas: BigInt(
|
|
13300
|
+
gas: BigInt(Zd[o ?? s] ?? 0)
|
|
13301
13301
|
});
|
|
13302
13302
|
}
|
|
13303
13303
|
});
|
|
@@ -13335,7 +13335,7 @@ const UI = async () => {
|
|
|
13335
13335
|
...t == null ? void 0 : t.query,
|
|
13336
13336
|
staleTime: 3e4
|
|
13337
13337
|
}
|
|
13338
|
-
}),
|
|
13338
|
+
}), Xp = (t) => {
|
|
13339
13339
|
se(() => {
|
|
13340
13340
|
t && t.forEach(({ error: e, status: n }) => {
|
|
13341
13341
|
n === "failure" && console.warn(e == null ? void 0 : e.message);
|
|
@@ -13371,8 +13371,8 @@ const UI = async () => {
|
|
|
13371
13371
|
chainId: o,
|
|
13372
13372
|
refetchInterval: s
|
|
13373
13373
|
}) => {
|
|
13374
|
-
const i =
|
|
13375
|
-
return
|
|
13374
|
+
const i = Fu({ chainId: o });
|
|
13375
|
+
return Hu({
|
|
13376
13376
|
queryKey: [{ functionName: e, address: n, args: a, chainId: o }],
|
|
13377
13377
|
queryFn: async ({ queryKey: [l] }) => {
|
|
13378
13378
|
if (l)
|
|
@@ -13387,11 +13387,11 @@ const UI = async () => {
|
|
|
13387
13387
|
enabled: !t && !!o && !yt(n) && !!e,
|
|
13388
13388
|
refetchInterval: s
|
|
13389
13389
|
});
|
|
13390
|
-
},
|
|
13390
|
+
}, Lu = ({
|
|
13391
13391
|
queryKey: t,
|
|
13392
13392
|
watch: e = !0
|
|
13393
13393
|
}) => {
|
|
13394
|
-
const n =
|
|
13394
|
+
const n = zu(), { data: r } = xx({
|
|
13395
13395
|
query: {
|
|
13396
13396
|
refetchInterval: gs
|
|
13397
13397
|
}
|
|
@@ -13399,7 +13399,7 @@ const UI = async () => {
|
|
|
13399
13399
|
se(() => {
|
|
13400
13400
|
e && n.refetchQueries({ queryKey: t, stale: !0 });
|
|
13401
13401
|
}, [e, r]);
|
|
13402
|
-
},
|
|
13402
|
+
}, Qp = "limitOrders", Pg = "getAllLimitOrderIds", Zp = 0, Ig = "100", zI = 1, VI = 5, GI = 2, jI = [
|
|
13403
13403
|
"balanceOf",
|
|
13404
13404
|
"getFundSummary",
|
|
13405
13405
|
"getFundComposition",
|
|
@@ -13411,7 +13411,7 @@ const UI = async () => {
|
|
|
13411
13411
|
"tokenPrice",
|
|
13412
13412
|
"limitOrders",
|
|
13413
13413
|
"calculateAvailableManagerFee",
|
|
13414
|
-
|
|
13414
|
+
Qp,
|
|
13415
13415
|
Pg
|
|
13416
13416
|
], YI = ["allowance"], jw = (t, e) => {
|
|
13417
13417
|
var n, r;
|
|
@@ -13426,8 +13426,8 @@ const UI = async () => {
|
|
|
13426
13426
|
));
|
|
13427
13427
|
}
|
|
13428
13428
|
return !1;
|
|
13429
|
-
},
|
|
13430
|
-
const t =
|
|
13429
|
+
}, Jp = () => {
|
|
13430
|
+
const t = zu(), e = Y(() => {
|
|
13431
13431
|
t.invalidateQueries({
|
|
13432
13432
|
predicate: ({ queryKey: r }) => jw(r, YI)
|
|
13433
13433
|
});
|
|
@@ -13437,7 +13437,7 @@ const UI = async () => {
|
|
|
13437
13437
|
});
|
|
13438
13438
|
}, [t]);
|
|
13439
13439
|
return { invalidateAllowanceQueries: e, invalidateTradingQueries: n };
|
|
13440
|
-
},
|
|
13440
|
+
}, em = () => {
|
|
13441
13441
|
var r, a;
|
|
13442
13442
|
const { chainId: t } = ma(), { data: e } = Ex();
|
|
13443
13443
|
if (!t || !e)
|
|
@@ -13492,7 +13492,7 @@ function KI({
|
|
|
13492
13492
|
d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
|
|
13493
13493
|
}));
|
|
13494
13494
|
}
|
|
13495
|
-
const
|
|
13495
|
+
const tm = /* @__PURE__ */ F.forwardRef(KI);
|
|
13496
13496
|
function XI({
|
|
13497
13497
|
title: t,
|
|
13498
13498
|
titleId: e,
|
|
@@ -13592,7 +13592,7 @@ function t_({
|
|
|
13592
13592
|
d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"
|
|
13593
13593
|
}));
|
|
13594
13594
|
}
|
|
13595
|
-
const
|
|
13595
|
+
const Nu = /* @__PURE__ */ F.forwardRef(t_);
|
|
13596
13596
|
var Lg = { exports: {} };
|
|
13597
13597
|
/*!
|
|
13598
13598
|
Copyright (c) 2018 Jed Watson.
|
|
@@ -13654,9 +13654,9 @@ var Yw = function(e) {
|
|
|
13654
13654
|
var a = r[0], o = r[1];
|
|
13655
13655
|
return n[a] = o, n;
|
|
13656
13656
|
}, {});
|
|
13657
|
-
}, qw = typeof window < "u" && window.document && window.document.createElement ? F.useLayoutEffect : F.useEffect, Pt = "top", an = "bottom", on = "right", It = "left",
|
|
13657
|
+
}, qw = typeof window < "u" && window.document && window.document.createElement ? F.useLayoutEffect : F.useEffect, Pt = "top", an = "bottom", on = "right", It = "left", nm = "auto", tc = [Pt, an, on, It], ls = "start", Ll = "end", a_ = "clippingParents", Ng = "viewport", pl = "popper", o_ = "reference", Kw = /* @__PURE__ */ tc.reduce(function(t, e) {
|
|
13658
13658
|
return t.concat([e + "-" + ls, e + "-" + Ll]);
|
|
13659
|
-
}, []), Rg = /* @__PURE__ */ [].concat(tc, [
|
|
13659
|
+
}, []), Rg = /* @__PURE__ */ [].concat(tc, [nm]).reduce(function(t, e) {
|
|
13660
13660
|
return t.concat([e, e + "-" + ls, e + "-" + Ll]);
|
|
13661
13661
|
}, []), s_ = "beforeRead", i_ = "read", l_ = "afterRead", c_ = "beforeMain", d_ = "main", u_ = "afterMain", p_ = "beforeWrite", m_ = "write", f_ = "afterWrite", h_ = [s_, i_, l_, c_, d_, u_, p_, m_, f_];
|
|
13662
13662
|
function Zn(t) {
|
|
@@ -13679,7 +13679,7 @@ function en(t) {
|
|
|
13679
13679
|
var e = Wt(t).HTMLElement;
|
|
13680
13680
|
return t instanceof e || t instanceof HTMLElement;
|
|
13681
13681
|
}
|
|
13682
|
-
function
|
|
13682
|
+
function rm(t) {
|
|
13683
13683
|
if (typeof ShadowRoot > "u")
|
|
13684
13684
|
return !1;
|
|
13685
13685
|
var e = Wt(t).ShadowRoot;
|
|
@@ -13731,14 +13731,14 @@ function Gn(t) {
|
|
|
13731
13731
|
return t.split("-")[0];
|
|
13732
13732
|
}
|
|
13733
13733
|
var Fo = Math.max, Vc = Math.min, cs = Math.round;
|
|
13734
|
-
function
|
|
13734
|
+
function Ru() {
|
|
13735
13735
|
var t = navigator.userAgentData;
|
|
13736
13736
|
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
13737
13737
|
return e.brand + "/" + e.version;
|
|
13738
13738
|
}).join(" ") : navigator.userAgent;
|
|
13739
13739
|
}
|
|
13740
13740
|
function kg() {
|
|
13741
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
13741
|
+
return !/^((?!chrome|android).)*safari/i.test(Ru());
|
|
13742
13742
|
}
|
|
13743
13743
|
function ds(t, e, n) {
|
|
13744
13744
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
@@ -13756,7 +13756,7 @@ function ds(t, e, n) {
|
|
|
13756
13756
|
y: d
|
|
13757
13757
|
};
|
|
13758
13758
|
}
|
|
13759
|
-
function
|
|
13759
|
+
function am(t) {
|
|
13760
13760
|
var e = ds(t), n = t.offsetWidth, r = t.offsetHeight;
|
|
13761
13761
|
return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
|
|
13762
13762
|
x: t.offsetLeft,
|
|
@@ -13769,7 +13769,7 @@ function $g(t, e) {
|
|
|
13769
13769
|
var n = e.getRootNode && e.getRootNode();
|
|
13770
13770
|
if (t.contains(e))
|
|
13771
13771
|
return !0;
|
|
13772
|
-
if (n &&
|
|
13772
|
+
if (n && rm(n)) {
|
|
13773
13773
|
var r = e;
|
|
13774
13774
|
do {
|
|
13775
13775
|
if (r && t.isSameNode(r))
|
|
@@ -13798,7 +13798,7 @@ function Ad(t) {
|
|
|
13798
13798
|
// $FlowFixMe[prop-missing]
|
|
13799
13799
|
t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
13800
13800
|
t.parentNode || // DOM Element detected
|
|
13801
|
-
(
|
|
13801
|
+
(rm(t) ? t.host : null) || // ShadowRoot detected
|
|
13802
13802
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
13803
13803
|
fa(t)
|
|
13804
13804
|
);
|
|
@@ -13808,14 +13808,14 @@ function Xw(t) {
|
|
|
13808
13808
|
Or(t).position === "fixed" ? null : t.offsetParent;
|
|
13809
13809
|
}
|
|
13810
13810
|
function g_(t) {
|
|
13811
|
-
var e = /firefox/i.test(
|
|
13811
|
+
var e = /firefox/i.test(Ru()), n = /Trident/i.test(Ru());
|
|
13812
13812
|
if (n && en(t)) {
|
|
13813
13813
|
var r = Or(t);
|
|
13814
13814
|
if (r.position === "fixed")
|
|
13815
13815
|
return null;
|
|
13816
13816
|
}
|
|
13817
13817
|
var a = Ad(t);
|
|
13818
|
-
for (
|
|
13818
|
+
for (rm(a) && (a = a.host); en(a) && ["html", "body"].indexOf(Zn(a)) < 0; ) {
|
|
13819
13819
|
var o = Or(a);
|
|
13820
13820
|
if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || e && o.willChange === "filter" || e && o.filter && o.filter !== "none")
|
|
13821
13821
|
return a;
|
|
@@ -13828,7 +13828,7 @@ function nc(t) {
|
|
|
13828
13828
|
n = Xw(n);
|
|
13829
13829
|
return n && (Zn(n) === "html" || Zn(n) === "body" && Or(n).position === "static") ? e : n || g_(t) || e;
|
|
13830
13830
|
}
|
|
13831
|
-
function
|
|
13831
|
+
function om(t) {
|
|
13832
13832
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
13833
13833
|
}
|
|
13834
13834
|
function El(t, e, n) {
|
|
@@ -13860,9 +13860,9 @@ var x_ = function(e, n) {
|
|
|
13860
13860
|
})) : e, Bg(typeof e != "number" ? e : Fg(e, tc));
|
|
13861
13861
|
};
|
|
13862
13862
|
function E_(t) {
|
|
13863
|
-
var e, n = t.state, r = t.name, a = t.options, o = n.elements.arrow, s = n.modifiersData.popperOffsets, i = Gn(n.placement), l =
|
|
13863
|
+
var e, n = t.state, r = t.name, a = t.options, o = n.elements.arrow, s = n.modifiersData.popperOffsets, i = Gn(n.placement), l = om(i), c = [It, on].indexOf(i) >= 0, d = c ? "height" : "width";
|
|
13864
13864
|
if (!(!o || !s)) {
|
|
13865
|
-
var u = x_(a.padding, n), f =
|
|
13865
|
+
var u = x_(a.padding, n), f = am(o), m = l === "y" ? Pt : It, h = l === "y" ? an : on, b = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], x = s[l] - n.rects.reference[l], D = nc(o), T = D ? l === "y" ? D.clientHeight || 0 : D.clientWidth || 0 : 0, O = b / 2 - x / 2, R = u[m], k = T - f[d] - u[h], M = T / 2 - f[d] / 2 + O, W = El(R, M, k), y = l;
|
|
13866
13866
|
n.modifiersData[r] = (e = {}, e[y] = W, e.centerOffset = W - M, e);
|
|
13867
13867
|
}
|
|
13868
13868
|
}
|
|
@@ -14011,15 +14011,15 @@ function Zw(t) {
|
|
|
14011
14011
|
return N_[e];
|
|
14012
14012
|
});
|
|
14013
14013
|
}
|
|
14014
|
-
function
|
|
14014
|
+
function sm(t) {
|
|
14015
14015
|
var e = Wt(t), n = e.pageXOffset, r = e.pageYOffset;
|
|
14016
14016
|
return {
|
|
14017
14017
|
scrollLeft: n,
|
|
14018
14018
|
scrollTop: r
|
|
14019
14019
|
};
|
|
14020
14020
|
}
|
|
14021
|
-
function
|
|
14022
|
-
return ds(fa(t)).left +
|
|
14021
|
+
function im(t) {
|
|
14022
|
+
return ds(fa(t)).left + sm(t).scrollLeft;
|
|
14023
14023
|
}
|
|
14024
14024
|
function R_(t, e) {
|
|
14025
14025
|
var n = Wt(t), r = fa(t), a = n.visualViewport, o = r.clientWidth, s = r.clientHeight, i = 0, l = 0;
|
|
@@ -14031,12 +14031,12 @@ function R_(t, e) {
|
|
|
14031
14031
|
return {
|
|
14032
14032
|
width: o,
|
|
14033
14033
|
height: s,
|
|
14034
|
-
x: i +
|
|
14034
|
+
x: i + im(t),
|
|
14035
14035
|
y: l
|
|
14036
14036
|
};
|
|
14037
14037
|
}
|
|
14038
14038
|
function k_(t) {
|
|
14039
|
-
var e, n = fa(t), r =
|
|
14039
|
+
var e, n = fa(t), r = sm(t), a = (e = t.ownerDocument) == null ? void 0 : e.body, o = Fo(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), s = Fo(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), i = -r.scrollLeft + im(t), l = -r.scrollTop;
|
|
14040
14040
|
return Or(a || n).direction === "rtl" && (i += Fo(n.clientWidth, a ? a.clientWidth : 0) - o), {
|
|
14041
14041
|
width: o,
|
|
14042
14042
|
height: s,
|
|
@@ -14044,23 +14044,23 @@ function k_(t) {
|
|
|
14044
14044
|
y: l
|
|
14045
14045
|
};
|
|
14046
14046
|
}
|
|
14047
|
-
function
|
|
14047
|
+
function lm(t) {
|
|
14048
14048
|
var e = Or(t), n = e.overflow, r = e.overflowX, a = e.overflowY;
|
|
14049
14049
|
return /auto|scroll|overlay|hidden/.test(n + a + r);
|
|
14050
14050
|
}
|
|
14051
14051
|
function Wg(t) {
|
|
14052
|
-
return ["html", "body", "#document"].indexOf(Zn(t)) >= 0 ? t.ownerDocument.body : en(t) &&
|
|
14052
|
+
return ["html", "body", "#document"].indexOf(Zn(t)) >= 0 ? t.ownerDocument.body : en(t) && lm(t) ? t : Wg(Ad(t));
|
|
14053
14053
|
}
|
|
14054
14054
|
function Al(t, e) {
|
|
14055
14055
|
var n;
|
|
14056
14056
|
e === void 0 && (e = []);
|
|
14057
|
-
var r = Wg(t), a = r === ((n = t.ownerDocument) == null ? void 0 : n.body), o = Wt(r), s = a ? [o].concat(o.visualViewport || [],
|
|
14057
|
+
var r = Wg(t), a = r === ((n = t.ownerDocument) == null ? void 0 : n.body), o = Wt(r), s = a ? [o].concat(o.visualViewport || [], lm(r) ? r : []) : r, i = e.concat(s);
|
|
14058
14058
|
return a ? i : (
|
|
14059
14059
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
14060
14060
|
i.concat(Al(Ad(s)))
|
|
14061
14061
|
);
|
|
14062
14062
|
}
|
|
14063
|
-
function
|
|
14063
|
+
function ku(t) {
|
|
14064
14064
|
return Object.assign({}, t, {
|
|
14065
14065
|
left: t.x,
|
|
14066
14066
|
top: t.y,
|
|
@@ -14073,7 +14073,7 @@ function $_(t, e) {
|
|
|
14073
14073
|
return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
14074
14074
|
}
|
|
14075
14075
|
function Jw(t, e, n) {
|
|
14076
|
-
return e === Ng ?
|
|
14076
|
+
return e === Ng ? ku(R_(t, n)) : qo(e) ? $_(e, n) : ku(k_(fa(t)));
|
|
14077
14077
|
}
|
|
14078
14078
|
function M_(t) {
|
|
14079
14079
|
var e = Al(Ad(t)), n = ["absolute", "fixed"].indexOf(Or(t).position) >= 0, r = n && en(t) ? nc(t) : t;
|
|
@@ -14121,7 +14121,7 @@ function Ug(t) {
|
|
|
14121
14121
|
y: e.y
|
|
14122
14122
|
};
|
|
14123
14123
|
}
|
|
14124
|
-
var c = a ?
|
|
14124
|
+
var c = a ? om(a) : null;
|
|
14125
14125
|
if (c != null) {
|
|
14126
14126
|
var d = c === "y" ? "height" : "width";
|
|
14127
14127
|
switch (o) {
|
|
@@ -14141,7 +14141,7 @@ function Nl(t, e) {
|
|
|
14141
14141
|
reference: M,
|
|
14142
14142
|
element: O,
|
|
14143
14143
|
placement: a
|
|
14144
|
-
}), y =
|
|
14144
|
+
}), y = ku(Object.assign({}, O, W)), v = f === pl ? y : M, g = {
|
|
14145
14145
|
top: k.top - v.top + D.top,
|
|
14146
14146
|
bottom: v.bottom - k.bottom + D.bottom,
|
|
14147
14147
|
left: k.left - v.left + D.left,
|
|
@@ -14177,7 +14177,7 @@ function F_(t, e) {
|
|
|
14177
14177
|
});
|
|
14178
14178
|
}
|
|
14179
14179
|
function W_(t) {
|
|
14180
|
-
if (Gn(t) ===
|
|
14180
|
+
if (Gn(t) === nm)
|
|
14181
14181
|
return [];
|
|
14182
14182
|
var e = Cc(t);
|
|
14183
14183
|
return [Zw(t), e, Zw(e)];
|
|
@@ -14186,7 +14186,7 @@ function U_(t) {
|
|
|
14186
14186
|
var e = t.state, n = t.options, r = t.name;
|
|
14187
14187
|
if (!e.modifiersData[r]._skip) {
|
|
14188
14188
|
for (var a = n.mainAxis, o = a === void 0 ? !0 : a, s = n.altAxis, i = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, m = n.flipVariations, h = m === void 0 ? !0 : m, b = n.allowedAutoPlacements, x = e.options.placement, D = Gn(x), T = D === x, O = l || (T || !h ? [Cc(x)] : W_(x)), R = [x].concat(O).reduce(function(ie, z) {
|
|
14189
|
-
return ie.concat(Gn(z) ===
|
|
14189
|
+
return ie.concat(Gn(z) === nm ? F_(e, {
|
|
14190
14190
|
placement: z,
|
|
14191
14191
|
boundary: d,
|
|
14192
14192
|
rootBoundary: u,
|
|
@@ -14328,7 +14328,7 @@ function Q_(t) {
|
|
|
14328
14328
|
rootBoundary: c,
|
|
14329
14329
|
padding: u,
|
|
14330
14330
|
altBoundary: d
|
|
14331
|
-
}), D = Gn(e.placement), T = us(e.placement), O = !T, R =
|
|
14331
|
+
}), D = Gn(e.placement), T = us(e.placement), O = !T, R = om(D), k = X_(R), M = e.modifiersData.popperOffsets, W = e.rects.reference, y = e.rects.popper, v = typeof b == "function" ? b(Object.assign({}, e.rects, {
|
|
14332
14332
|
placement: e.placement
|
|
14333
14333
|
})) : b, g = typeof v == "number" ? {
|
|
14334
14334
|
mainAxis: v,
|
|
@@ -14342,7 +14342,7 @@ function Q_(t) {
|
|
|
14342
14342
|
};
|
|
14343
14343
|
if (M) {
|
|
14344
14344
|
if (o) {
|
|
14345
|
-
var I, L = R === "y" ? Pt : It, E = R === "y" ? an : on, S = R === "y" ? "height" : "width", N = M[R], _ = N + x[L], $ = N - x[E], H = m ? -y[S] / 2 : 0, j = T === ls ? W[S] : y[S], Q = T === ls ? -y[S] : -W[S], V = e.elements.arrow, ie = m && V ?
|
|
14345
|
+
var I, L = R === "y" ? Pt : It, E = R === "y" ? an : on, S = R === "y" ? "height" : "width", N = M[R], _ = N + x[L], $ = N - x[E], H = m ? -y[S] / 2 : 0, j = T === ls ? W[S] : y[S], Q = T === ls ? -y[S] : -W[S], V = e.elements.arrow, ie = m && V ? am(V) : {
|
|
14346
14346
|
width: 0,
|
|
14347
14347
|
height: 0
|
|
14348
14348
|
}, z = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Mg(), ne = z[L], oe = z[E], ae = El(0, W[S], ie[S]), Ee = O ? W[S] / 2 - H - ae - ne - g.mainAxis : j - ae - ne - g.mainAxis, ut = O ? -W[S] / 2 + H + ae + oe + g.mainAxis : Q + ae + oe + g.mainAxis, Pe = e.elements.arrow && nc(e.elements.arrow), pt = Pe ? R === "y" ? Pe.clientTop || 0 : Pe.clientLeft || 0 : 0, Ge = (I = P == null ? void 0 : P[R]) != null ? I : 0, ze = N + Ee - Ge - pt, xe = N + ut - Ge, cn = El(m ? Vc(_, ze) : _, N, m ? Fo($, xe) : $);
|
|
@@ -14369,7 +14369,7 @@ function J_(t) {
|
|
|
14369
14369
|
};
|
|
14370
14370
|
}
|
|
14371
14371
|
function eL(t) {
|
|
14372
|
-
return t === Wt(t) || !en(t) ?
|
|
14372
|
+
return t === Wt(t) || !en(t) ? sm(t) : J_(t);
|
|
14373
14373
|
}
|
|
14374
14374
|
function tL(t) {
|
|
14375
14375
|
var e = t.getBoundingClientRect(), n = cs(e.width) / t.offsetWidth || 1, r = cs(e.height) / t.offsetHeight || 1;
|
|
@@ -14385,7 +14385,7 @@ function nL(t, e, n) {
|
|
|
14385
14385
|
y: 0
|
|
14386
14386
|
};
|
|
14387
14387
|
return (r || !r && !n) && ((Zn(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
14388
|
-
|
|
14388
|
+
lm(o)) && (i = eL(e)), en(e) ? (l = ds(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : o && (l.x = im(o))), {
|
|
14389
14389
|
x: s.left + i.scrollLeft - l.x,
|
|
14390
14390
|
y: s.top + i.scrollTop - l.y,
|
|
14391
14391
|
width: s.width,
|
|
@@ -14493,7 +14493,7 @@ function iL(t) {
|
|
|
14493
14493
|
if (rv(T, O)) {
|
|
14494
14494
|
d.rects = {
|
|
14495
14495
|
reference: nL(T, nc(O), d.options.strategy === "fixed"),
|
|
14496
|
-
popper:
|
|
14496
|
+
popper: am(O)
|
|
14497
14497
|
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(g) {
|
|
14498
14498
|
return d.modifiersData[g.name] = Object.assign({}, g.data);
|
|
14499
14499
|
});
|
|
@@ -14899,7 +14899,7 @@ const xL = ({
|
|
|
14899
14899
|
}
|
|
14900
14900
|
)
|
|
14901
14901
|
] });
|
|
14902
|
-
},
|
|
14902
|
+
}, cm = ({ text: t, ...e }) => /* @__PURE__ */ p(
|
|
14903
14903
|
xL,
|
|
14904
14904
|
{
|
|
14905
14905
|
...e,
|
|
@@ -14909,8 +14909,8 @@ const xL = ({
|
|
|
14909
14909
|
text: t,
|
|
14910
14910
|
placement: e,
|
|
14911
14911
|
iconClassName: n = "dtw-text-[color:var(--panel-secondary-content-color)]",
|
|
14912
|
-
Icon: r =
|
|
14913
|
-
}) => /* @__PURE__ */ p(
|
|
14912
|
+
Icon: r = Nu
|
|
14913
|
+
}) => /* @__PURE__ */ p(cm, { text: t, placement: e, children: /* @__PURE__ */ p(
|
|
14914
14914
|
r,
|
|
14915
14915
|
{
|
|
14916
14916
|
className: le(
|
|
@@ -14934,7 +14934,7 @@ const xL = ({
|
|
|
14934
14934
|
watch: n = !1
|
|
14935
14935
|
}) => {
|
|
14936
14936
|
var u, f;
|
|
14937
|
-
const { account: r } = _e(), a = te(), o =
|
|
14937
|
+
const { account: r } = _e(), a = te(), o = Gp(t, a.chainId), { data: s } = HI({
|
|
14938
14938
|
chainId: a.chainId,
|
|
14939
14939
|
query: {
|
|
14940
14940
|
enabled: o
|
|
@@ -14965,10 +14965,10 @@ const xL = ({
|
|
|
14965
14965
|
enabled: !o && !!r
|
|
14966
14966
|
}
|
|
14967
14967
|
});
|
|
14968
|
-
return
|
|
14968
|
+
return Lu({
|
|
14969
14969
|
watch: n && o,
|
|
14970
14970
|
queryKey: l
|
|
14971
|
-
}),
|
|
14971
|
+
}), Lu({
|
|
14972
14972
|
watch: n && !o,
|
|
14973
14973
|
queryKey: d
|
|
14974
14974
|
}), o ? uI({
|
|
@@ -15011,7 +15011,7 @@ const xL = ({
|
|
|
15011
15011
|
enabled: !yt(t),
|
|
15012
15012
|
select: AL
|
|
15013
15013
|
}
|
|
15014
|
-
}),
|
|
15014
|
+
}), Od = () => {
|
|
15015
15015
|
const { account: t = me } = _e(), { chainId: e, supportedChainId: n } = ma(), { data: { isUserDhedgePool: r } = {} } = SL({
|
|
15016
15016
|
address: t,
|
|
15017
15017
|
chainId: e ?? n
|
|
@@ -15050,7 +15050,7 @@ const xL = ({
|
|
|
15050
15050
|
isCustomCooldownDepositAllowed: t[1].result,
|
|
15051
15051
|
customCooldown: t[2].result,
|
|
15052
15052
|
aaveAssetGuardAddress: t[3].result
|
|
15053
|
-
}),
|
|
15053
|
+
}), Cd = ({ address: t, chainId: e }) => Ut({
|
|
15054
15054
|
contracts: OL({ address: t, chainId: e }),
|
|
15055
15055
|
query: {
|
|
15056
15056
|
enabled: !!t && !yt(t),
|
|
@@ -15061,7 +15061,7 @@ const xL = ({
|
|
|
15061
15061
|
address: t,
|
|
15062
15062
|
chainId: e
|
|
15063
15063
|
}) => {
|
|
15064
|
-
const [n] = Es(), { data: { poolManagerLogic: r } = {} } =
|
|
15064
|
+
const [n] = Es(), { data: { poolManagerLogic: r } = {} } = Cd({
|
|
15065
15065
|
address: t,
|
|
15066
15066
|
chainId: e
|
|
15067
15067
|
});
|
|
@@ -15102,7 +15102,7 @@ const xL = ({
|
|
|
15102
15102
|
minDepositUSD: t[1].result,
|
|
15103
15103
|
isMemberAllowed: t[2].result,
|
|
15104
15104
|
maxSupplyCapD18: t[3].result
|
|
15105
|
-
}),
|
|
15105
|
+
}), Dd = ({
|
|
15106
15106
|
address: t,
|
|
15107
15107
|
chainId: e
|
|
15108
15108
|
}) => {
|
|
@@ -15141,7 +15141,7 @@ const xL = ({
|
|
|
15141
15141
|
getFundComposition: t[0].result,
|
|
15142
15142
|
getSupportedAssets: (e = t[1].result) == null ? void 0 : e.map(({ asset: n }) => n)
|
|
15143
15143
|
};
|
|
15144
|
-
},
|
|
15144
|
+
}, Pd = ({
|
|
15145
15145
|
address: t,
|
|
15146
15146
|
chainId: e
|
|
15147
15147
|
}) => {
|
|
@@ -15333,7 +15333,7 @@ const Yg = /* @__PURE__ */ Hl(aN), qg = ({
|
|
|
15333
15333
|
address: t,
|
|
15334
15334
|
chainId: e
|
|
15335
15335
|
}) => {
|
|
15336
|
-
const { account: n } = _e(), { data: { managerAddress: r } = { managerAddress: me } } = En({ address: t, chainId: e }), { data: { isMemberAllowed: a = !1 } = {} } =
|
|
15336
|
+
const { account: n } = _e(), { data: { managerAddress: r } = { managerAddress: me } } = En({ address: t, chainId: e }), { data: { isMemberAllowed: a = !1 } = {} } = Dd({
|
|
15337
15337
|
address: t,
|
|
15338
15338
|
chainId: e
|
|
15339
15339
|
});
|
|
@@ -15359,7 +15359,7 @@ const Yg = /* @__PURE__ */ Hl(aN), qg = ({
|
|
|
15359
15359
|
getFundComposition: [a, o, s] = []
|
|
15360
15360
|
} = {},
|
|
15361
15361
|
isFetched: i
|
|
15362
|
-
} =
|
|
15362
|
+
} = Pd({ address: t, chainId: e }), l = K(
|
|
15363
15363
|
() => (a == null ? void 0 : a.map(({ asset: d }) => d)) ?? [],
|
|
15364
15364
|
[a]
|
|
15365
15365
|
), { data: c } = Ut({
|
|
@@ -15384,7 +15384,7 @@ const Yg = /* @__PURE__ */ Hl(aN), qg = ({
|
|
|
15384
15384
|
staleTime: 1 / 0
|
|
15385
15385
|
}
|
|
15386
15386
|
});
|
|
15387
|
-
return
|
|
15387
|
+
return Xp(c), K(() => {
|
|
15388
15388
|
if (!(a != null && a.length))
|
|
15389
15389
|
return [];
|
|
15390
15390
|
const d = Yg(c, 2);
|
|
@@ -15423,7 +15423,7 @@ const Yg = /* @__PURE__ */ Hl(aN), qg = ({
|
|
|
15423
15423
|
announcedTimestamp: o
|
|
15424
15424
|
};
|
|
15425
15425
|
}, Kg = (t, e) => {
|
|
15426
|
-
const { data: { getFeeIncreaseInfo: n, minDepositUSD: r } = {} } =
|
|
15426
|
+
const { data: { getFeeIncreaseInfo: n, minDepositUSD: r } = {} } = Dd({ address: t, chainId: e });
|
|
15427
15427
|
return {
|
|
15428
15428
|
...pN(n),
|
|
15429
15429
|
minDepositUSD: +jn(r ?? BigInt(0), re)
|
|
@@ -15470,7 +15470,7 @@ const Yg = /* @__PURE__ */ Hl(aN), qg = ({
|
|
|
15470
15470
|
const r = rc({ address: t, chainId: n }), { data: { totalSupplyD18: a } = {} } = En({ address: t, chainId: n });
|
|
15471
15471
|
return K(() => a ? mN({
|
|
15472
15472
|
composition: r,
|
|
15473
|
-
vaultTokensAmount:
|
|
15473
|
+
vaultTokensAmount: _u(e || 0),
|
|
15474
15474
|
totalSupplyD18: a
|
|
15475
15475
|
}) : [], [e, r, a]);
|
|
15476
15476
|
}, sn = ({
|
|
@@ -15524,11 +15524,11 @@ const Yg = /* @__PURE__ */ Hl(aN), qg = ({
|
|
|
15524
15524
|
]
|
|
15525
15525
|
);
|
|
15526
15526
|
}, hN = () => {
|
|
15527
|
-
const { address: t, chainId: e } = te(), { queryKey: n } =
|
|
15527
|
+
const { address: t, chainId: e } = te(), { queryKey: n } = Pd({
|
|
15528
15528
|
address: t,
|
|
15529
15529
|
chainId: e
|
|
15530
15530
|
});
|
|
15531
|
-
|
|
15531
|
+
Lu({ queryKey: n });
|
|
15532
15532
|
}, xc = Tn.id, yN = (t) => {
|
|
15533
15533
|
const e = We(
|
|
15534
15534
|
"flatcoinPointsModule",
|
|
@@ -15610,7 +15610,7 @@ const Yg = /* @__PURE__ */ Hl(aN), qg = ({
|
|
|
15610
15610
|
if (t <= e)
|
|
15611
15611
|
return n;
|
|
15612
15612
|
return FD;
|
|
15613
|
-
},
|
|
15613
|
+
}, su = (t) => Number((t == null ? void 0 : t.toString()) ?? "0") * 1e3, TN = ({
|
|
15614
15614
|
address: t,
|
|
15615
15615
|
chainId: e
|
|
15616
15616
|
}) => {
|
|
@@ -15623,14 +15623,14 @@ const Yg = /* @__PURE__ */ Hl(aN), qg = ({
|
|
|
15623
15623
|
args: [n ?? me],
|
|
15624
15624
|
query: {
|
|
15625
15625
|
enabled: !!n,
|
|
15626
|
-
select:
|
|
15626
|
+
select: su,
|
|
15627
15627
|
refetchInterval: (r) => {
|
|
15628
15628
|
var a;
|
|
15629
|
-
return gN(
|
|
15629
|
+
return gN(su((a = r.state) == null ? void 0 : a.data));
|
|
15630
15630
|
},
|
|
15631
15631
|
refetchOnWindowFocus: (r) => {
|
|
15632
15632
|
var a;
|
|
15633
|
-
return
|
|
15633
|
+
return su((a = r.state) == null ? void 0 : a.data) > 0;
|
|
15634
15634
|
}
|
|
15635
15635
|
}
|
|
15636
15636
|
});
|
|
@@ -15843,7 +15843,7 @@ function um(t = {}) {
|
|
|
15843
15843
|
const R = O;
|
|
15844
15844
|
if (R.code === yr.code)
|
|
15845
15845
|
throw new yr(R);
|
|
15846
|
-
if (R.code ===
|
|
15846
|
+
if (R.code === kd.code)
|
|
15847
15847
|
throw R;
|
|
15848
15848
|
}
|
|
15849
15849
|
try {
|
|
@@ -15862,7 +15862,7 @@ function um(t = {}) {
|
|
|
15862
15862
|
return e && await ((D = l.storage) == null ? void 0 : D.removeItem(`${this.id}.disconnected`)), t.target || await ((T = l.storage) == null ? void 0 : T.setItem("injected.connected", !0)), { accounts: f, chainId: O };
|
|
15863
15863
|
} catch (O) {
|
|
15864
15864
|
const R = O;
|
|
15865
|
-
throw R.code === yr.code ? new yr(R) : R.code ===
|
|
15865
|
+
throw R.code === yr.code ? new yr(R) : R.code === kd.code ? new kd(R) : R;
|
|
15866
15866
|
}
|
|
15867
15867
|
},
|
|
15868
15868
|
async disconnect() {
|
|
@@ -16223,7 +16223,7 @@ const WN = /* @__PURE__ */ Hl(FN), aT = ({
|
|
|
16223
16223
|
minSlippage: n
|
|
16224
16224
|
}) => {
|
|
16225
16225
|
const { defaultWithdrawSlippage: r } = Fe();
|
|
16226
|
-
return e !== "auto" ? e.toString() : WN(n) ? n.toString() : t === "deposit" ?
|
|
16226
|
+
return e !== "auto" ? e.toString() : WN(n) ? n.toString() : t === "deposit" ? Up.toString() : r.toString();
|
|
16227
16227
|
}, oT = {
|
|
16228
16228
|
depositSlippageWarning: "Excludes entry fee.",
|
|
16229
16229
|
withdrawSlippageWarning: "Slippage occurs in both single asset withdrawals and withdrawals from vaults with Aave debt positions. However, for vaults with Aave debt, slippage is only applied to the portion of the withdrawal that corresponds to the Aave position.",
|
|
@@ -16551,7 +16551,7 @@ function eR({
|
|
|
16551
16551
|
clipRule: "evenodd"
|
|
16552
16552
|
}));
|
|
16553
16553
|
}
|
|
16554
|
-
const
|
|
16554
|
+
const Id = /* @__PURE__ */ F.forwardRef(eR);
|
|
16555
16555
|
function tR({
|
|
16556
16556
|
title: t,
|
|
16557
16557
|
titleId: e,
|
|
@@ -16574,12 +16574,12 @@ function tR({
|
|
|
16574
16574
|
}));
|
|
16575
16575
|
}
|
|
16576
16576
|
const uT = /* @__PURE__ */ F.forwardRef(tR), nR = {
|
|
16577
|
-
[ke.DEFAULT]:
|
|
16577
|
+
[ke.DEFAULT]: Nu,
|
|
16578
16578
|
[ke.ERROR]: is,
|
|
16579
|
-
[ke.SUCCESS]:
|
|
16579
|
+
[ke.SUCCESS]: tm,
|
|
16580
16580
|
[ke.WARNING]: is,
|
|
16581
|
-
[ke.CUSTOM]:
|
|
16582
|
-
},
|
|
16581
|
+
[ke.CUSTOM]: Nu
|
|
16582
|
+
}, iu = ({
|
|
16583
16583
|
tooltipText: t,
|
|
16584
16584
|
value: e,
|
|
16585
16585
|
label: n,
|
|
@@ -16647,9 +16647,9 @@ const uT = /* @__PURE__ */ F.forwardRef(tR), nR = {
|
|
|
16647
16647
|
}) => {
|
|
16648
16648
|
const o = de();
|
|
16649
16649
|
return /* @__PURE__ */ p("div", { className: "dtw-w-full dtw-flex dtw-flex-col dtw-gap-1", children: /* @__PURE__ */ p(Xb, { children: ({ open: s }) => /* @__PURE__ */ B(Te, { children: [
|
|
16650
|
-
e == null ? void 0 : e.map((i) => /* @__PURE__ */ p(
|
|
16651
|
-
/* @__PURE__ */ p(
|
|
16652
|
-
|
|
16650
|
+
e == null ? void 0 : e.map((i) => /* @__PURE__ */ p(iu, { ...i }, i.label)),
|
|
16651
|
+
/* @__PURE__ */ p(gp, { className: "dtw-p-0 dtw-flex dtw-w-full dtw-justify-between dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] hover:dtw-bg-[var(--panel-meta-hover-bg,var(--panel-neutral-color))] focus:dtw-outline-none", children: /* @__PURE__ */ B(
|
|
16652
|
+
iu,
|
|
16653
16653
|
{
|
|
16654
16654
|
tooltipText: o.fullReceiveDetails,
|
|
16655
16655
|
label: o.tradeDetails,
|
|
@@ -16670,8 +16670,8 @@ const uT = /* @__PURE__ */ F.forwardRef(tR), nR = {
|
|
|
16670
16670
|
]
|
|
16671
16671
|
}
|
|
16672
16672
|
) }),
|
|
16673
|
-
/* @__PURE__ */ p(
|
|
16674
|
-
n == null ? void 0 : n.map((i) => /* @__PURE__ */ p(
|
|
16673
|
+
/* @__PURE__ */ p(fp, { show: s, children: /* @__PURE__ */ B(Tp, { className: "dtw-transition dtw-transform dtw-duration-100 dtw-ease-out data-[closed]:opacity-0 data-[closed]:-dtw-translate-y-2.5 dtw-static dtw-text-[length:var(--panel-label-font-size,var(--panel-font-size-xs))] dtw-leading-[var(--panel-label-line-height,var(--panel-line-height-xs))] dtw-text-[color:var(--panel-secondary-content-color)] dtw-font-[var(--panel-meta-font-weight,var(--panel-font-weight-light))] dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] dtw-flex dtw-flex-col dtw-gap-1", children: [
|
|
16674
|
+
n == null ? void 0 : n.map((i) => /* @__PURE__ */ p(iu, { ...i }, i.label)),
|
|
16675
16675
|
t
|
|
16676
16676
|
] }) })
|
|
16677
16677
|
] }) }) });
|
|
@@ -16836,7 +16836,7 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
16836
16836
|
}
|
|
16837
16837
|
)
|
|
16838
16838
|
}
|
|
16839
|
-
)), dR = ({ children: t }) => /* @__PURE__ */ p(
|
|
16839
|
+
)), dR = ({ children: t }) => /* @__PURE__ */ p(_p, { className: "dtw-pt-[var(--panel-content-pt)] dtw-pb-[var(--panel-content-pb)] md:dtw-pb-[var(--panel-content-pb-md)] dtw-px-[var(--panel-content-px)] dtw-flex dtw-flex-col dtw-gap-[var(--panel-content-gap,var(--panel-gap))] dtw-h-full", children: t }), uR = ({
|
|
16840
16840
|
className: t,
|
|
16841
16841
|
iconClassName: e,
|
|
16842
16842
|
onClick: n,
|
|
@@ -16874,7 +16874,7 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
16874
16874
|
]
|
|
16875
16875
|
}
|
|
16876
16876
|
);
|
|
16877
|
-
}, pR = ({ children: t }) => /* @__PURE__ */ p(
|
|
16877
|
+
}, pR = ({ children: t }) => /* @__PURE__ */ p(_p, { children: /* @__PURE__ */ p(uR, { children: t }) }), Ke = {
|
|
16878
16878
|
InputGroup: rR,
|
|
16879
16879
|
Meta: aR,
|
|
16880
16880
|
Settings: pR,
|
|
@@ -16966,14 +16966,14 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
16966
16966
|
if (!t)
|
|
16967
16967
|
throw new Error("ComponentContext is used out of Provider");
|
|
16968
16968
|
return t;
|
|
16969
|
-
},
|
|
16969
|
+
}, $u = ({ children: t, promptText: e }) => {
|
|
16970
16970
|
const { ActionButton: n = Xe } = Se();
|
|
16971
16971
|
return /* @__PURE__ */ B("div", { children: [
|
|
16972
16972
|
/* @__PURE__ */ B("div", { className: "md:dtw-hidden dtw-mb-4 dtw-flex dtw-items-center dtw-justify-center dtw-space-x-1 dtw-text-[var(--panel-warning-content-color)]", children: [
|
|
16973
16973
|
/* @__PURE__ */ p(is, { className: "dtw-h-5 dtw-w-5" }),
|
|
16974
16974
|
/* @__PURE__ */ p("div", { className: "dtw-py-1 dtw-text-xs", children: e })
|
|
16975
16975
|
] }),
|
|
16976
|
-
/* @__PURE__ */ p(
|
|
16976
|
+
/* @__PURE__ */ p(cm, { text: e, children: /* @__PURE__ */ p(n, { disabled: !0, children: /* @__PURE__ */ B("div", { className: "dtw-flex dtw-items-center dtw-justify-center dtw-gap-2", children: [
|
|
16977
16977
|
/* @__PURE__ */ p(e_, { className: "dtw-h-5" }),
|
|
16978
16978
|
/* @__PURE__ */ p("span", { children: t })
|
|
16979
16979
|
] }) }) })
|
|
@@ -16999,7 +16999,7 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
16999
16999
|
a && /* @__PURE__ */ p(_g, { className: r })
|
|
17000
17000
|
]
|
|
17001
17001
|
}
|
|
17002
|
-
),
|
|
17002
|
+
), _d = ({
|
|
17003
17003
|
defaultEnabled: t = !1,
|
|
17004
17004
|
onChange: e,
|
|
17005
17005
|
disabled: n = !1,
|
|
@@ -17021,7 +17021,7 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
17021
17021
|
"dtw-items-center dtw-justify-between": !a
|
|
17022
17022
|
}),
|
|
17023
17023
|
children: [
|
|
17024
|
-
r && /* @__PURE__ */ p(
|
|
17024
|
+
r && /* @__PURE__ */ p(Zu, { className: "dtw-cursor-pointer dtw-text-xs", children: r }),
|
|
17025
17025
|
/* @__PURE__ */ p(
|
|
17026
17026
|
c2,
|
|
17027
17027
|
{
|
|
@@ -17209,7 +17209,7 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
17209
17209
|
),
|
|
17210
17210
|
children: e
|
|
17211
17211
|
}
|
|
17212
|
-
),
|
|
17212
|
+
), lu = (t, e = !1) => {
|
|
17213
17213
|
if (!t) return "";
|
|
17214
17214
|
let n = "";
|
|
17215
17215
|
e && t.startsWith("-") && (n = "-", t = t.slice(1));
|
|
@@ -17217,7 +17217,7 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
17217
17217
|
if (!o) return a ? `${n}0.${a}` : n;
|
|
17218
17218
|
const s = new Intl.NumberFormat().format(Number(o));
|
|
17219
17219
|
return a !== void 0 ? `${n}${s}.${a.replace(/[^\d]/g, "")}` : `${n}${s}`;
|
|
17220
|
-
},
|
|
17220
|
+
}, cu = (t) => t.replace(/,/g, ""), gR = Av(
|
|
17221
17221
|
({
|
|
17222
17222
|
value: t,
|
|
17223
17223
|
onChange: e,
|
|
@@ -17228,15 +17228,15 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
17228
17228
|
const s = (l) => {
|
|
17229
17229
|
const d = l.target.value.replace(r ? /[^0-9.-]/g : /[^0-9.]/g, "").replace(/^(-?\d*\.\d*).*$/, "$1").replace(/^(-?\.)(.*)/, "$1$2");
|
|
17230
17230
|
if (n)
|
|
17231
|
-
e == null || e(d,
|
|
17231
|
+
e == null || e(d, cu(d));
|
|
17232
17232
|
else {
|
|
17233
|
-
const u =
|
|
17234
|
-
e == null || e(u,
|
|
17233
|
+
const u = lu(d, r);
|
|
17234
|
+
e == null || e(u, cu(u));
|
|
17235
17235
|
}
|
|
17236
17236
|
}, i = () => {
|
|
17237
17237
|
if (!n) return;
|
|
17238
|
-
const l =
|
|
17239
|
-
e == null || e(l,
|
|
17238
|
+
const l = lu(t, r);
|
|
17239
|
+
e == null || e(l, cu(l));
|
|
17240
17240
|
};
|
|
17241
17241
|
return /* @__PURE__ */ p(
|
|
17242
17242
|
"input",
|
|
@@ -17245,7 +17245,7 @@ const pT = /* @__PURE__ */ F.forwardRef(iR), qc = ({
|
|
|
17245
17245
|
ref: o,
|
|
17246
17246
|
type: "text",
|
|
17247
17247
|
inputMode: "decimal",
|
|
17248
|
-
value:
|
|
17248
|
+
value: lu(t, r),
|
|
17249
17249
|
onChange: s,
|
|
17250
17250
|
onBlur: i
|
|
17251
17251
|
}
|
|
@@ -17355,7 +17355,7 @@ const Ec = ({ className: t }) => /* @__PURE__ */ p(
|
|
|
17355
17355
|
r && e({ type: "update", txHash: r });
|
|
17356
17356
|
}, [r, e]);
|
|
17357
17357
|
}, SR = () => {
|
|
17358
|
-
const [t, e] = Ht(), n = ct()[1], r = II(), a = _I(), [o] = t, s = o == null ? void 0 : o.batchId, i = o == null ? void 0 : o.txHash, l = o == null ? void 0 : o.action, c = l === "approve", d = o == null ? void 0 : o.chainId, { invalidateTradingQueries: u, invalidateAllowanceQueries: f } =
|
|
17358
|
+
const [t, e] = Ht(), n = ct()[1], r = II(), a = _I(), [o] = t, s = o == null ? void 0 : o.batchId, i = o == null ? void 0 : o.txHash, l = o == null ? void 0 : o.action, c = l === "approve", d = o == null ? void 0 : o.chainId, { invalidateTradingQueries: u, invalidateAllowanceQueries: f } = Jp();
|
|
17359
17359
|
AR({ batchId: s, updatePendingTransactions: e });
|
|
17360
17360
|
const { data: m, error: h } = Ev({
|
|
17361
17361
|
hash: i,
|
|
@@ -17451,7 +17451,7 @@ const Ec = ({ className: t }) => /* @__PURE__ */ p(
|
|
|
17451
17451
|
refetchInterval: n
|
|
17452
17452
|
}
|
|
17453
17453
|
});
|
|
17454
|
-
return
|
|
17454
|
+
return Xp(o), (s = o == null ? void 0 : o[0]) == null ? void 0 : s.result;
|
|
17455
17455
|
}, xn = ({
|
|
17456
17456
|
address: t,
|
|
17457
17457
|
chainId: e,
|
|
@@ -17518,7 +17518,7 @@ const CR = () => {
|
|
|
17518
17518
|
address: t,
|
|
17519
17519
|
chainId: e
|
|
17520
17520
|
}) => {
|
|
17521
|
-
const n =
|
|
17521
|
+
const n = Fu({ chainId: e }), { data: { aaveAssetGuardAddress: r = me } = {} } = Cd({
|
|
17522
17522
|
address: t,
|
|
17523
17523
|
chainId: e
|
|
17524
17524
|
});
|
|
@@ -17533,7 +17533,7 @@ const CR = () => {
|
|
|
17533
17533
|
args: [
|
|
17534
17534
|
t,
|
|
17535
17535
|
a,
|
|
17536
|
-
|
|
17536
|
+
Vp(o)
|
|
17537
17537
|
],
|
|
17538
17538
|
publicClient: n
|
|
17539
17539
|
}),
|
|
@@ -17579,10 +17579,10 @@ const CR = () => {
|
|
|
17579
17579
|
signal: n,
|
|
17580
17580
|
buildKey: ({ sourceAddress: r }) => r
|
|
17581
17581
|
}), _R = (t, e) => {
|
|
17582
|
-
const n =
|
|
17582
|
+
const n = qp(), {
|
|
17583
17583
|
settings: { selectedAggregators: r }
|
|
17584
17584
|
} = At();
|
|
17585
|
-
return
|
|
17585
|
+
return Hu({
|
|
17586
17586
|
queryKey: ["getSwapsData", t, r],
|
|
17587
17587
|
queryFn: async ({ signal: a, queryKey: [, o] }) => IR({ assets: o, getSwapData: n, signal: a }),
|
|
17588
17588
|
...e
|
|
@@ -17590,7 +17590,7 @@ const CR = () => {
|
|
|
17590
17590
|
}, LR = new AbortController(), NR = LR.signal, RR = ({
|
|
17591
17591
|
chainId: t
|
|
17592
17592
|
}) => {
|
|
17593
|
-
const { account: e = me } = _e(), n =
|
|
17593
|
+
const { account: e = me } = _e(), n = qp();
|
|
17594
17594
|
return Y(
|
|
17595
17595
|
async ({
|
|
17596
17596
|
swapParams: r,
|
|
@@ -17619,7 +17619,7 @@ const CR = () => {
|
|
|
17619
17619
|
const n = We(
|
|
17620
17620
|
"aaveLendingPoolV3",
|
|
17621
17621
|
e
|
|
17622
|
-
), { aaveOffchainWithdrawMinValue: r } = Fe(), { data: { getSupportedAssets: a } = {} } =
|
|
17622
|
+
), { aaveOffchainWithdrawMinValue: r } = Fe(), { data: { getSupportedAssets: a } = {} } = Pd({
|
|
17623
17623
|
address: t,
|
|
17624
17624
|
chainId: e
|
|
17625
17625
|
}), o = DR({ address: t, chainId: e }), s = RR({ chainId: e });
|
|
@@ -17634,7 +17634,7 @@ const CR = () => {
|
|
|
17634
17634
|
).shiftedBy(-re).times(l).gt(r);
|
|
17635
17635
|
return await Promise.all(
|
|
17636
17636
|
(a ?? []).map(async (u) => {
|
|
17637
|
-
const f = et(u, n), m =
|
|
17637
|
+
const f = et(u, n), m = Vp(c);
|
|
17638
17638
|
if (d && f)
|
|
17639
17639
|
try {
|
|
17640
17640
|
const h = await o({
|
|
@@ -17836,7 +17836,7 @@ const CR = () => {
|
|
|
17836
17836
|
);
|
|
17837
17837
|
return _R(i, {
|
|
17838
17838
|
enabled: s,
|
|
17839
|
-
refetchInterval:
|
|
17839
|
+
refetchInterval: Hp
|
|
17840
17840
|
});
|
|
17841
17841
|
}, UR = () => {
|
|
17842
17842
|
const [t, e] = De(), { data: n = [] } = nr(), { data: r, isFetching: a, isError: o } = ic();
|
|
@@ -17871,7 +17871,7 @@ const CR = () => {
|
|
|
17871
17871
|
withdraw: t,
|
|
17872
17872
|
isClaim: e
|
|
17873
17873
|
}) => {
|
|
17874
|
-
const n = de(), r = Lt(), { account: a } = _e(), o = te(), [s] = De(), i = ct()[1], l = Ht()[1], c =
|
|
17874
|
+
const n = de(), r = Lt(), { account: a } = _e(), o = te(), [s] = De(), i = ct()[1], l = Ht()[1], c = Yp(), { data: d = [] } = nr(), { isFetching: u } = ic(), f = async () => {
|
|
17875
17875
|
const m = o.chainId, h = d.map(
|
|
17876
17876
|
({ address: x, decimals: D, symbol: T, balance: O }) => ({
|
|
17877
17877
|
address: x,
|
|
@@ -17934,7 +17934,7 @@ const CR = () => {
|
|
|
17934
17934
|
return n === "auto" ? e ? r ?? t : t : n;
|
|
17935
17935
|
};
|
|
17936
17936
|
function cv(t, e, n) {
|
|
17937
|
-
const [r, a] = ce(n), o =
|
|
17937
|
+
const [r, a] = ce(n), o = jp ? t === "sessionStorage" ? sessionStorage : localStorage : null, s = Y(
|
|
17938
17938
|
(i) => {
|
|
17939
17939
|
try {
|
|
17940
17940
|
a(i), o == null || o.setItem(e, JSON.stringify(i));
|
|
@@ -17989,12 +17989,12 @@ const CT = (t, e) => {
|
|
|
17989
17989
|
}, VR = ({
|
|
17990
17990
|
debounceTime: t
|
|
17991
17991
|
} = {}) => {
|
|
17992
|
-
const e = te(), n = ha(), [r] = we(), a = lc(), { data: { getSupportedAssets: o } = {} } =
|
|
17992
|
+
const e = te(), n = ha(), [r] = we(), a = lc(), { data: { getSupportedAssets: o } = {} } = Pd(e), s = CT(
|
|
17993
17993
|
new X(r.value || "0").shiftedBy(re).toFixed(0, X.ROUND_DOWN),
|
|
17994
17994
|
t ?? 0
|
|
17995
17995
|
);
|
|
17996
17996
|
return K(() => {
|
|
17997
|
-
const i =
|
|
17997
|
+
const i = Vp(a), l = BigInt(s), c = (o ?? []).map((d) => ({
|
|
17998
17998
|
supportedAsset: d,
|
|
17999
17999
|
withdrawData: "",
|
|
18000
18000
|
slippageTolerance: i
|
|
@@ -18025,7 +18025,7 @@ const CT = (t, e) => {
|
|
|
18025
18025
|
});
|
|
18026
18026
|
}, vm = () => {
|
|
18027
18027
|
var r;
|
|
18028
|
-
const [t] = De(), { data: e = [] } = jR(), n =
|
|
18028
|
+
const [t] = De(), { data: e = [] } = jR(), n = Od();
|
|
18029
18029
|
return (e == null ? void 0 : e.length) === 1 && et((r = e[0]) == null ? void 0 : r.address, t.address) && !n;
|
|
18030
18030
|
}, YR = () => {
|
|
18031
18031
|
const t = te(), e = ha(), n = vm(), r = zR(), a = Ht()[1], o = e ? "multi_withdraw" : n ? "single_withdraw_and_claim" : "single_withdraw", s = Os(o), i = e ? GD : n ? jD : z0, { send: l } = Ir({
|
|
@@ -18055,7 +18055,7 @@ const CT = (t, e) => {
|
|
|
18055
18055
|
action: o
|
|
18056
18056
|
};
|
|
18057
18057
|
}, DT = (t) => {
|
|
18058
|
-
const e = de(), n = Lt(), { account: r } = _e(), a = te(), [o] = we(), [s] = De(), [i] = er(), l = ct()[1], c = Ht()[1], d =
|
|
18058
|
+
const e = de(), n = Lt(), { account: r } = _e(), a = te(), [o] = we(), [s] = De(), [i] = er(), l = ct()[1], c = Ht()[1], d = Yp(), u = ha(), f = vm(), m = tr({
|
|
18059
18059
|
symbol: o.symbol,
|
|
18060
18060
|
address: o.address
|
|
18061
18061
|
}), h = i === "deposit", b = gT(), x = h ? "deposit" : u ? "multi_withdraw" : f ? "single_withdraw_and_claim" : "single_withdraw", D = async () => {
|
|
@@ -18117,9 +18117,9 @@ const CT = (t, e) => {
|
|
|
18117
18117
|
};
|
|
18118
18118
|
const a = t * e / 100 / n;
|
|
18119
18119
|
return {
|
|
18120
|
-
yearlyEarnings:
|
|
18121
|
-
dailyEarnings:
|
|
18122
|
-
monthlyEarnings:
|
|
18120
|
+
yearlyEarnings: ru({ value: a, currency: r }),
|
|
18121
|
+
dailyEarnings: ru({ value: a / 365, currency: r }),
|
|
18122
|
+
monthlyEarnings: ru({ value: a / 12, currency: r })
|
|
18123
18123
|
};
|
|
18124
18124
|
}, QR = ({
|
|
18125
18125
|
currency: t,
|
|
@@ -18168,8 +18168,8 @@ const CT = (t, e) => {
|
|
|
18168
18168
|
}, JR = (t, e) => {
|
|
18169
18169
|
const {
|
|
18170
18170
|
settings: { selectedAggregators: n }
|
|
18171
|
-
} = At(), r =
|
|
18172
|
-
return
|
|
18171
|
+
} = At(), r = qp();
|
|
18172
|
+
return Hu({
|
|
18173
18173
|
queryKey: [
|
|
18174
18174
|
"getSwapData",
|
|
18175
18175
|
{ ...t, fromAddress: G0 },
|
|
@@ -18178,7 +18178,7 @@ const CT = (t, e) => {
|
|
|
18178
18178
|
queryFn: async ({ signal: a, queryKey: [, o] }) => r({ signal: a, variables: o }),
|
|
18179
18179
|
...e
|
|
18180
18180
|
});
|
|
18181
|
-
},
|
|
18181
|
+
}, Ld = (t = {}) => {
|
|
18182
18182
|
const e = (t == null ? void 0 : t.extendedDebounceTime) ?? !1, [n] = we(), r = CT(
|
|
18183
18183
|
n.value,
|
|
18184
18184
|
e ? U0 : W0
|
|
@@ -18188,7 +18188,7 @@ const CT = (t, e) => {
|
|
|
18188
18188
|
isDebouncing: n.value !== r
|
|
18189
18189
|
};
|
|
18190
18190
|
}, e5 = () => {
|
|
18191
|
-
const t =
|
|
18191
|
+
const t = em(), [{ isBatchTransactionsEnabled: e }] = tt();
|
|
18192
18192
|
return t && e;
|
|
18193
18193
|
}, PT = ({
|
|
18194
18194
|
token: t,
|
|
@@ -18244,7 +18244,7 @@ const CT = (t, e) => {
|
|
|
18244
18244
|
chainId: a,
|
|
18245
18245
|
skip: o = !1
|
|
18246
18246
|
}) => {
|
|
18247
|
-
const { data: s } =
|
|
18247
|
+
const { data: s } = Kp({
|
|
18248
18248
|
tokenAddress: e,
|
|
18249
18249
|
ownerAddress: n,
|
|
18250
18250
|
spenderAddress: r,
|
|
@@ -18268,7 +18268,7 @@ const CT = (t, e) => {
|
|
|
18268
18268
|
}, _T = () => {
|
|
18269
18269
|
const t = de(), [e, n] = t5();
|
|
18270
18270
|
return /* @__PURE__ */ p(
|
|
18271
|
-
|
|
18271
|
+
_d,
|
|
18272
18272
|
{
|
|
18273
18273
|
defaultEnabled: e,
|
|
18274
18274
|
onChange: n,
|
|
@@ -18291,7 +18291,7 @@ const CT = (t, e) => {
|
|
|
18291
18291
|
}, LT = () => {
|
|
18292
18292
|
const t = de(), [e, n] = n5();
|
|
18293
18293
|
return /* @__PURE__ */ p(
|
|
18294
|
-
|
|
18294
|
+
_d,
|
|
18295
18295
|
{
|
|
18296
18296
|
defaultEnabled: e,
|
|
18297
18297
|
onChange: n,
|
|
@@ -18325,7 +18325,7 @@ const CT = (t, e) => {
|
|
|
18325
18325
|
children: [
|
|
18326
18326
|
a,
|
|
18327
18327
|
/* @__PURE__ */ p(
|
|
18328
|
-
|
|
18328
|
+
_d,
|
|
18329
18329
|
{
|
|
18330
18330
|
defaultEnabled: n.includes(a),
|
|
18331
18331
|
onChange: () => r(a),
|
|
@@ -18339,7 +18339,7 @@ const CT = (t, e) => {
|
|
|
18339
18339
|
}
|
|
18340
18340
|
);
|
|
18341
18341
|
}, a5 = () => {
|
|
18342
|
-
const t =
|
|
18342
|
+
const t = em(), e = de();
|
|
18343
18343
|
return /* @__PURE__ */ B(Te, { children: [
|
|
18344
18344
|
/* @__PURE__ */ p(
|
|
18345
18345
|
Wo,
|
|
@@ -18380,7 +18380,7 @@ const CT = (t, e) => {
|
|
|
18380
18380
|
[t, r, e.address, n]
|
|
18381
18381
|
);
|
|
18382
18382
|
}, s5 = () => {
|
|
18383
|
-
const { chainId: t, address: e } = te(), { data: { isCustomCooldownDepositAllowed: n } = {} } =
|
|
18383
|
+
const { chainId: t, address: e } = te(), { data: { isCustomCooldownDepositAllowed: n } = {} } = Cd({
|
|
18384
18384
|
address: e,
|
|
18385
18385
|
chainId: t
|
|
18386
18386
|
});
|
|
@@ -18404,7 +18404,7 @@ const CT = (t, e) => {
|
|
|
18404
18404
|
const o = r.filter(
|
|
18405
18405
|
({ isDeposit: l }) => l
|
|
18406
18406
|
);
|
|
18407
|
-
if (
|
|
18407
|
+
if (Gp(t.symbol, e)) {
|
|
18408
18408
|
const l = o.find(
|
|
18409
18409
|
({ tokenName: c }) => {
|
|
18410
18410
|
var d;
|
|
@@ -18441,7 +18441,7 @@ const CT = (t, e) => {
|
|
|
18441
18441
|
return !et(t.address, e);
|
|
18442
18442
|
}, bm = () => {
|
|
18443
18443
|
const { defaultSwapTransactionSlippage: t } = Fe(), [{ slippage: e }] = tt(), n = cc();
|
|
18444
|
-
return e === "auto" ? n ? t :
|
|
18444
|
+
return e === "auto" ? n ? t : Up : e;
|
|
18445
18445
|
}, RT = () => {
|
|
18446
18446
|
const { defaultNoSwapMinDepositAmountGap: t } = Fe(), { address: e, chainId: n } = te(), [r] = we(), [a] = De(), { data: { entryFee: o } = {} } = En({ address: e, chainId: n }), s = Td(
|
|
18447
18447
|
Number(o ?? "0"),
|
|
@@ -18456,8 +18456,8 @@ const CT = (t, e) => {
|
|
|
18456
18456
|
}
|
|
18457
18457
|
const m = l ? t : c;
|
|
18458
18458
|
return new X(a.value || "0").shiftedBy(a.decimals).times(1 - m / 100).toFixed(0);
|
|
18459
|
-
},
|
|
18460
|
-
const { account: t = me } = _e(), { chainId: e } = te(), [n] = we(), { debouncedSendTokenValue: r } =
|
|
18459
|
+
}, Nd = () => {
|
|
18460
|
+
const { account: t = me } = _e(), { chainId: e } = te(), [n] = we(), { debouncedSendTokenValue: r } = Ld(), { vaultDepositTokenAddress: a } = Cs(), o = cc();
|
|
18461
18461
|
return JR(
|
|
18462
18462
|
{
|
|
18463
18463
|
sourceAddress: n.address,
|
|
@@ -18470,7 +18470,7 @@ const CT = (t, e) => {
|
|
|
18470
18470
|
},
|
|
18471
18471
|
{
|
|
18472
18472
|
enabled: o && !!r,
|
|
18473
|
-
refetchInterval:
|
|
18473
|
+
refetchInterval: Hp
|
|
18474
18474
|
}
|
|
18475
18475
|
);
|
|
18476
18476
|
}, i5 = ({
|
|
@@ -18494,7 +18494,7 @@ const CT = (t, e) => {
|
|
|
18494
18494
|
}), l = Number(n || "0") * a;
|
|
18495
18495
|
return s && i !== 0 ? new X(l / i).shiftedBy(s).times(1 - H0 / 100).toFixed(0) : "0";
|
|
18496
18496
|
}, kT = () => {
|
|
18497
|
-
const [t] = we(), { debouncedSendTokenValue: e } =
|
|
18497
|
+
const [t] = we(), { debouncedSendTokenValue: e } = Ld(), n = cc(), r = i5({
|
|
18498
18498
|
isDepositWithSwapTransaction: n,
|
|
18499
18499
|
sendTokenAddress: t.address,
|
|
18500
18500
|
sendTokenValue: e
|
|
@@ -18504,7 +18504,7 @@ const CT = (t, e) => {
|
|
|
18504
18504
|
depositMethod: t,
|
|
18505
18505
|
vaultDepositTokenAddress: e
|
|
18506
18506
|
}) => {
|
|
18507
|
-
const { address: n } = te(), [r] = we(), a = new X(r.value).shiftedBy(r.decimals).toFixed(0), o = kT(), { data: s } =
|
|
18507
|
+
const { address: n } = te(), [r] = we(), a = new X(r.value).shiftedBy(r.decimals).toFixed(0), o = kT(), { data: s } = Nd(), i = RT(), l = bm();
|
|
18508
18508
|
return K(() => {
|
|
18509
18509
|
const d = t === "zapNativeDeposit" || t === "zapNativeDepositWithCustomCooldown" || t === "zapDeposit" || t === "zapDepositWithCustomCooldown" ? lI({
|
|
18510
18510
|
vaultAddress: n,
|
|
@@ -18655,7 +18655,7 @@ const CT = (t, e) => {
|
|
|
18655
18655
|
spenderAddress: r,
|
|
18656
18656
|
rawAmountToSpend: a,
|
|
18657
18657
|
chainId: e,
|
|
18658
|
-
skip:
|
|
18658
|
+
skip: Gp(n.symbol, e) || a === "0"
|
|
18659
18659
|
});
|
|
18660
18660
|
return { approve: PT({
|
|
18661
18661
|
token: n,
|
|
@@ -18679,7 +18679,7 @@ const CT = (t, e) => {
|
|
|
18679
18679
|
});
|
|
18680
18680
|
return Cg(i), i;
|
|
18681
18681
|
}, v5 = () => {
|
|
18682
|
-
const { address: t, chainId: e } = te(), n = As(), [r] = we(), [a, o] = De(), [, s] = tt(), { isDebouncing: i, debouncedSendTokenValue: l } =
|
|
18682
|
+
const { address: t, chainId: e } = te(), n = As(), [r] = we(), [a, o] = De(), [, s] = tt(), { isDebouncing: i, debouncedSendTokenValue: l } = Ld(), { isFetching: c } = Nd(), { data: d, isFetching: u } = w5({
|
|
18683
18683
|
address: t,
|
|
18684
18684
|
chainId: e
|
|
18685
18685
|
}), f = c || u || i;
|
|
@@ -18727,7 +18727,7 @@ const CT = (t, e) => {
|
|
|
18727
18727
|
i
|
|
18728
18728
|
]);
|
|
18729
18729
|
}, b5 = () => {
|
|
18730
|
-
const t = As(), [e] = De(), [, n] = tt(), { isDebouncing: r } =
|
|
18730
|
+
const t = As(), [e] = De(), [, n] = tt(), { isDebouncing: r } = Ld({
|
|
18731
18731
|
extendedDebounceTime: !0
|
|
18732
18732
|
}), a = bm(), o = MT({ includesEntryFee: !0 });
|
|
18733
18733
|
se(() => {
|
|
@@ -19367,7 +19367,7 @@ Kc.exports;
|
|
|
19367
19367
|
})(Kc, Kc.exports);
|
|
19368
19368
|
var g5 = Kc.exports;
|
|
19369
19369
|
const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
19370
|
-
const { address: t, chainId: e, depositParams: n } = te(), { account: r } = _e(), a = rc({ address: t, chainId: e }), o =
|
|
19370
|
+
const { address: t, chainId: e, depositParams: n } = te(), { account: r } = _e(), a = rc({ address: t, chainId: e }), o = Od(), [{ isCustomDepositOptionsDisabled: s }] = tt(), [i] = kI(), l = K(
|
|
19371
19371
|
() => T5(
|
|
19372
19372
|
[
|
|
19373
19373
|
...a.filter(({ isDeposit: f }) => f).map(({ tokenAddress: f, tokenName: m, precision: h }) => ({
|
|
@@ -19404,7 +19404,7 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19404
19404
|
enabled: d
|
|
19405
19405
|
}
|
|
19406
19406
|
});
|
|
19407
|
-
return
|
|
19407
|
+
return Xp(u), K(() => {
|
|
19408
19408
|
var b, x, D, T, O, R, k, M, W, y;
|
|
19409
19409
|
if (!c)
|
|
19410
19410
|
return [];
|
|
@@ -19477,10 +19477,10 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19477
19477
|
});
|
|
19478
19478
|
return { isVaultDepositLocked: a, isAccountWhitelisted: o };
|
|
19479
19479
|
}, A5 = () => {
|
|
19480
|
-
const { defaultLockTime: t } = Fe(), { chainId: e, address: n } = te(), { data: { customCooldown: r } = {} } =
|
|
19480
|
+
const { defaultLockTime: t } = Fe(), { chainId: e, address: n } = te(), { data: { customCooldown: r } = {} } = Cd({
|
|
19481
19481
|
address: n,
|
|
19482
19482
|
chainId: e
|
|
19483
|
-
}), { depositMethod: a } = Cs(), o = r ?
|
|
19483
|
+
}), { depositMethod: a } = Cs(), o = r ? Wp({ minutes: Number(r) / 60 }) : t;
|
|
19484
19484
|
switch (a) {
|
|
19485
19485
|
case "depositWithCustomCooldown":
|
|
19486
19486
|
case "nativeDepositWithCustomCooldown":
|
|
@@ -19510,7 +19510,7 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19510
19510
|
disabled: a,
|
|
19511
19511
|
label: o,
|
|
19512
19512
|
handleTrade: s
|
|
19513
|
-
} = DT(t), { isError: i, isLoading: l } =
|
|
19513
|
+
} = DT(t), { isError: i, isLoading: l } = Nd(), c = Ds("deposit");
|
|
19514
19514
|
return {
|
|
19515
19515
|
handleClick: () => {
|
|
19516
19516
|
if (i) {
|
|
@@ -19624,12 +19624,12 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19624
19624
|
if (!r) return;
|
|
19625
19625
|
const s = setTimeout(() => {
|
|
19626
19626
|
a(!1);
|
|
19627
|
-
},
|
|
19627
|
+
}, Hp);
|
|
19628
19628
|
return () => clearTimeout(s);
|
|
19629
19629
|
}, [r]), { disabled: n || r, tooltipText: e, handleClick: o };
|
|
19630
19630
|
}, UT = (t) => {
|
|
19631
19631
|
const { disabled: e, tooltipText: n, handleClick: r } = N5(t);
|
|
19632
|
-
return /* @__PURE__ */ p(
|
|
19632
|
+
return /* @__PURE__ */ p(cm, { text: n, children: /* @__PURE__ */ p(
|
|
19633
19633
|
qc,
|
|
19634
19634
|
{
|
|
19635
19635
|
Icon: JN,
|
|
@@ -19643,7 +19643,7 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19643
19643
|
}
|
|
19644
19644
|
) });
|
|
19645
19645
|
}, R5 = () => {
|
|
19646
|
-
const { refetch: t, isFetched: e } =
|
|
19646
|
+
const { refetch: t, isFetched: e } = Nd(), { invalidateTradingQueries: n } = Jp();
|
|
19647
19647
|
return { handleSwapQuoteReload: () => {
|
|
19648
19648
|
n(), t();
|
|
19649
19649
|
}, disabled: !e };
|
|
@@ -19658,7 +19658,7 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19658
19658
|
}
|
|
19659
19659
|
);
|
|
19660
19660
|
}, $5 = () => {
|
|
19661
|
-
const { refetch: t, isFetched: e } = ic(), { invalidateTradingQueries: n } =
|
|
19661
|
+
const { refetch: t, isFetched: e } = ic(), { invalidateTradingQueries: n } = Jp();
|
|
19662
19662
|
return { handleSwapQuoteReload: () => {
|
|
19663
19663
|
n(), t();
|
|
19664
19664
|
}, disabled: !e };
|
|
@@ -19696,7 +19696,7 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19696
19696
|
insufficientBalance: x
|
|
19697
19697
|
} = P5();
|
|
19698
19698
|
return r ? /* @__PURE__ */ p(t, { disabled: !0, children: e.minimumPurchase.replace("{value}", a) }) : s || h ? /* @__PURE__ */ p(
|
|
19699
|
-
|
|
19699
|
+
$u,
|
|
19700
19700
|
{
|
|
19701
19701
|
promptText: l ? e.poolIsInactive.replace("{poolSymbol}", c) : h ? e.poolDepositsAreMaintenance.replace("{poolSymbol}", c) : e.poolIsPrivate,
|
|
19702
19702
|
children: n
|
|
@@ -19752,7 +19752,7 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19752
19752
|
}) => {
|
|
19753
19753
|
const e = de();
|
|
19754
19754
|
return /* @__PURE__ */ p(Xb, { children: ({ open: n }) => /* @__PURE__ */ B(Te, { children: [
|
|
19755
|
-
/* @__PURE__ */ B(
|
|
19755
|
+
/* @__PURE__ */ B(gp, { className: "dtw-px-1.5 dtw-w-[100px] dtw-flex dtw-justify-between dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] hover:dtw-bg-[var(--panel-meta-hover-bg,var(--panel-neutral-color))] focus:dtw-outline-none", children: [
|
|
19756
19756
|
n ? e.hide : e.showAll,
|
|
19757
19757
|
/* @__PURE__ */ p(
|
|
19758
19758
|
uT,
|
|
@@ -19764,7 +19764,7 @@ const T5 = /* @__PURE__ */ Hl(g5), gm = () => {
|
|
|
19764
19764
|
}
|
|
19765
19765
|
)
|
|
19766
19766
|
] }),
|
|
19767
|
-
/* @__PURE__ */ p(
|
|
19767
|
+
/* @__PURE__ */ p(fp, { show: n, children: /* @__PURE__ */ p(Tp, { className: "dtw-mt-1 dtw-transition dtw-transform dtw-duration-100 dtw-ease-out data-[closed]:opacity-0 data-[closed]:-dtw-translate-y-2.5 dtw-static dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] dtw-flex dtw-flex-col dtw-gap-1", children: t }) })
|
|
19768
19768
|
] }) });
|
|
19769
19769
|
}, z5 = (t) => {
|
|
19770
19770
|
const { address: e, chainId: n } = te(), [{ value: r }] = we(), a = fN({
|
|
@@ -20183,7 +20183,7 @@ const J5 = (t) => {
|
|
|
20183
20183
|
}, d = () => {
|
|
20184
20184
|
const { customTokens: u, defaultWithdrawTokenSymbol: f } = t.withdrawParams, m = u.find(
|
|
20185
20185
|
({ symbol: b }) => b === f
|
|
20186
|
-
) ?? u[0] ??
|
|
20186
|
+
) ?? u[0] ?? Iu, h = a ? m : o || n ? Iu : m;
|
|
20187
20187
|
i({
|
|
20188
20188
|
address: t.address,
|
|
20189
20189
|
symbol: t.symbol,
|
|
@@ -20271,7 +20271,7 @@ const J5 = (t) => {
|
|
|
20271
20271
|
)
|
|
20272
20272
|
] });
|
|
20273
20273
|
}, sk = (t) => Math.ceil(ss(t)), ik = () => {
|
|
20274
|
-
const { address: t, chainId: e } = te(), { data: { totalValueD18: n } = {} } = En({ address: t, chainId: e }), { data: { maxSupplyCapD18: r } = {} } =
|
|
20274
|
+
const { address: t, chainId: e } = te(), { data: { totalValueD18: n } = {} } = En({ address: t, chainId: e }), { data: { maxSupplyCapD18: r } = {} } = Dd({
|
|
20275
20275
|
address: t,
|
|
20276
20276
|
chainId: e
|
|
20277
20277
|
});
|
|
@@ -20287,7 +20287,7 @@ const J5 = (t) => {
|
|
|
20287
20287
|
}
|
|
20288
20288
|
});
|
|
20289
20289
|
}, lk = () => {
|
|
20290
|
-
const { address: t, chainId: e } = te(), { data: { maxSupplyCapD18: n } = {} } =
|
|
20290
|
+
const { address: t, chainId: e } = te(), { data: { maxSupplyCapD18: n } = {} } = Dd({
|
|
20291
20291
|
address: t,
|
|
20292
20292
|
chainId: e
|
|
20293
20293
|
}), { data: { totalSupplyD18: r } = {} } = En({ address: t, chainId: e }), [a] = De(), o = sn({ address: t, chainId: e }), { data: s = 0 } = ik();
|
|
@@ -20729,7 +20729,7 @@ const J5 = (t) => {
|
|
|
20729
20729
|
searchQuery: t,
|
|
20730
20730
|
type: e
|
|
20731
20731
|
}) => {
|
|
20732
|
-
const [{ isMultiAssetWithdrawalEnabled: n }] = tt(), { isCompleteWithdrawStep: r } = sc(), a =
|
|
20732
|
+
const [{ isMultiAssetWithdrawalEnabled: n }] = tt(), { isCompleteWithdrawStep: r } = sc(), a = Od(), [o] = er(), { handleReject: s } = ln({ type: e }), { tokens: i, updater: l, activeTokens: c } = Sk(), d = K(
|
|
20733
20733
|
() => t ? i.filter(
|
|
20734
20734
|
({ symbol: f }) => f.toLowerCase().includes(t)
|
|
20735
20735
|
) : i,
|
|
@@ -20791,7 +20791,7 @@ const J5 = (t) => {
|
|
|
20791
20791
|
s && /* @__PURE__ */ p("li", { className: "dtw-cursor-pointer dtw-rounded-xl dtw-p-0.5 even:dtw-bg-[color:var(--panel-popup-list-item-bg-even)] odd:dtw-bg-[color:var(--panel-popup-list-item-bg-odd)] dtw-group", children: /* @__PURE__ */ p(
|
|
20792
20792
|
xk,
|
|
20793
20793
|
{
|
|
20794
|
-
token:
|
|
20794
|
+
token: Iu,
|
|
20795
20795
|
onSelect: o
|
|
20796
20796
|
}
|
|
20797
20797
|
) })
|
|
@@ -20821,13 +20821,13 @@ const J5 = (t) => {
|
|
|
20821
20821
|
] }),
|
|
20822
20822
|
t
|
|
20823
20823
|
] });
|
|
20824
|
-
},
|
|
20824
|
+
}, Mu = (t, e) => {
|
|
20825
20825
|
var n, r;
|
|
20826
20826
|
return t.address in e ? {
|
|
20827
20827
|
balanceInUsd: ((n = e[t.address]) == null ? void 0 : n.balanceInUsd) ?? wt({ value: 0 }),
|
|
20828
20828
|
balanceInUsdNumber: ((r = e[t.address]) == null ? void 0 : r.balanceInUsdNumber) ?? 0
|
|
20829
20829
|
} : { balanceInUsd: wt({ value: 0 }), balanceInUsdNumber: 0 };
|
|
20830
|
-
}, Pk = (t) => (e, n) =>
|
|
20830
|
+
}, Pk = (t) => (e, n) => Mu(n, t).balanceInUsdNumber - Mu(e, t).balanceInUsdNumber, Ik = ({
|
|
20831
20831
|
searchQuery: t,
|
|
20832
20832
|
type: e
|
|
20833
20833
|
}) => {
|
|
@@ -20853,7 +20853,7 @@ const J5 = (t) => {
|
|
|
20853
20853
|
(m) => m.chainId === f && !m.deprecated
|
|
20854
20854
|
).map((m) => ({
|
|
20855
20855
|
...m,
|
|
20856
|
-
|
|
20856
|
+
...Mu(m, n),
|
|
20857
20857
|
isActive: a.address === m.address
|
|
20858
20858
|
})).filter(
|
|
20859
20859
|
({ symbol: m }) => t ? m.toLowerCase().includes(t) : !0
|
|
@@ -20939,7 +20939,7 @@ const J5 = (t) => {
|
|
|
20939
20939
|
return /* @__PURE__ */ B(Ke.Overlay, { className: "dtw-justify-between dtw-gap-y-4", noPadding: !0, children: [
|
|
20940
20940
|
/* @__PURE__ */ B("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-justify-center dtw-gap-2 dtw-pt-1 dtw-px-4 dtw-w-full", children: [
|
|
20941
20941
|
/* @__PURE__ */ B("div", { className: "dtw-text-[color:var(--panel-success-content-color)] dtw-mb-2", children: [
|
|
20942
|
-
/* @__PURE__ */ p(
|
|
20942
|
+
/* @__PURE__ */ p(Id, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0" }),
|
|
20943
20943
|
"Success"
|
|
20944
20944
|
] }),
|
|
20945
20945
|
/* @__PURE__ */ p(Ec, {}),
|
|
@@ -20998,7 +20998,7 @@ const J5 = (t) => {
|
|
|
20998
20998
|
return /* @__PURE__ */ B(Te, { children: [
|
|
20999
20999
|
/* @__PURE__ */ B("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-justify-center dtw-gap-2 dtw-pt-1 dtw-px-4 dtw-w-full dtw-h-full md:dtw-w-1/2 md:dtw-h-1/2", children: [
|
|
21000
21000
|
/* @__PURE__ */ B("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-gap-2 dtw-text-[color:var(--panel-success-content-color)]", children: [
|
|
21001
|
-
/* @__PURE__ */ p(
|
|
21001
|
+
/* @__PURE__ */ p(Id, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0" }),
|
|
21002
21002
|
e.createLimitSellOrder
|
|
21003
21003
|
] }),
|
|
21004
21004
|
r && /* @__PURE__ */ p(
|
|
@@ -21110,7 +21110,7 @@ const J5 = (t) => {
|
|
|
21110
21110
|
noPadding: !0,
|
|
21111
21111
|
children: [
|
|
21112
21112
|
/* @__PURE__ */ B("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-justify-center dtw-gap-3 dtw-pt-1 dtw-px-4 dtw-w-full dtw-h-full", children: [
|
|
21113
|
-
/* @__PURE__ */ p(
|
|
21113
|
+
/* @__PURE__ */ p(Id, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0 dtw-text-[color:var(--panel-success-content-color)]" }),
|
|
21114
21114
|
/* @__PURE__ */ p("div", { className: "dtw-text-center dtw-text-2xl dtw-font-semibold", children: e.withdrawalRequest }),
|
|
21115
21115
|
/* @__PURE__ */ p("div", { className: "dtw-text-center dtw-text-[color:var(--panel-secondary-content-color)]", children: e.expectToReceiveUsdcSoon }),
|
|
21116
21116
|
a && /* @__PURE__ */ p(
|
|
@@ -21141,7 +21141,7 @@ const J5 = (t) => {
|
|
|
21141
21141
|
return i ? /* @__PURE__ */ p(Bk, { type: t }) : s ? /* @__PURE__ */ p(Rk, { type: t }) : l ? /* @__PURE__ */ p(Gk, { type: t }) : /* @__PURE__ */ B(Ke.Notification, { onClose: r, children: [
|
|
21142
21142
|
/* @__PURE__ */ B("div", { className: "dtw-flex dtw-items-center dtw-gap-1.5", children: [
|
|
21143
21143
|
/* @__PURE__ */ p("span", { className: "dtw-font-semibold dtw-drop-shadow-md", children: n }),
|
|
21144
|
-
a ? /* @__PURE__ */ p(
|
|
21144
|
+
a ? /* @__PURE__ */ p(tm, { className: "dtw-h-6 dtw-w-6 dtw-text-[color:var(--panel-success-content-color)]" }) : /* @__PURE__ */ p(c, { className: "dtw-h-5 dtw-w-5 " })
|
|
21145
21145
|
] }),
|
|
21146
21146
|
/* @__PURE__ */ p("div", { className: "dtw-font-light dtw-text-sm dtw-max-h-16 dtw-overflow-y-auto theme-scrollbar dtw-break-all", children: /* @__PURE__ */ p(zk, {}) }),
|
|
21147
21147
|
e && /* @__PURE__ */ p(
|
|
@@ -21319,10 +21319,10 @@ const J5 = (t) => {
|
|
|
21319
21319
|
] })
|
|
21320
21320
|
}
|
|
21321
21321
|
);
|
|
21322
|
-
}, r$ = 7,
|
|
21322
|
+
}, r$ = 7, Bu = 4, uv = (t) => {
|
|
21323
21323
|
if (!t)
|
|
21324
21324
|
return "";
|
|
21325
|
-
const [e = "", n] = t.replace(/,/g, "").split("."), r = n && n.length >
|
|
21325
|
+
const [e = "", n] = t.replace(/,/g, "").split("."), r = n && n.length > Bu ? n.slice(0, Bu) : n, a = e.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
21326
21326
|
return r !== void 0 ? `${a}.${r}` : a;
|
|
21327
21327
|
}, a$ = ({
|
|
21328
21328
|
inputValue: t = "",
|
|
@@ -21340,7 +21340,7 @@ const J5 = (t) => {
|
|
|
21340
21340
|
},
|
|
21341
21341
|
onInputChange: (l) => {
|
|
21342
21342
|
const c = l.target.value.replace(/[^\d.]/g, "").replace(/(\..*)\./g, "$1"), [d = "", u = ""] = c.split(".");
|
|
21343
|
-
e && d.length <= r$ && u.length <=
|
|
21343
|
+
e && d.length <= r$ && u.length <= Bu && /^\d*(\.\d*)?$/.test(c) && (a(uv(c)), e(c));
|
|
21344
21344
|
}
|
|
21345
21345
|
};
|
|
21346
21346
|
}, pv = (t) => {
|
|
@@ -21371,7 +21371,7 @@ const J5 = (t) => {
|
|
|
21371
21371
|
] })
|
|
21372
21372
|
}
|
|
21373
21373
|
);
|
|
21374
|
-
},
|
|
21374
|
+
}, du = ({
|
|
21375
21375
|
title: t,
|
|
21376
21376
|
subtitle: e,
|
|
21377
21377
|
defaultEnabled: n,
|
|
@@ -21385,7 +21385,7 @@ const J5 = (t) => {
|
|
|
21385
21385
|
/* @__PURE__ */ p("span", { children: t }),
|
|
21386
21386
|
/* @__PURE__ */ p("span", { className: "dtw-text-[length:var(--limit-order-font-size-xs)]", children: e })
|
|
21387
21387
|
] }),
|
|
21388
|
-
/* @__PURE__ */ p(
|
|
21388
|
+
/* @__PURE__ */ p(_d, { onChange: (l) => {
|
|
21389
21389
|
s(l), l || r();
|
|
21390
21390
|
}, defaultEnabled: o })
|
|
21391
21391
|
] }),
|
|
@@ -21458,7 +21458,7 @@ const tx = (t) => ({
|
|
|
21458
21458
|
address: me,
|
|
21459
21459
|
symbol: ""
|
|
21460
21460
|
},
|
|
21461
|
-
minAmountInUsd:
|
|
21461
|
+
minAmountInUsd: Zp,
|
|
21462
21462
|
form: {
|
|
21463
21463
|
lowerLimitPrice: "",
|
|
21464
21464
|
upperLimitPrice: ""
|
|
@@ -21664,10 +21664,10 @@ const tx = (t) => ({
|
|
|
21664
21664
|
},
|
|
21665
21665
|
t
|
|
21666
21666
|
),
|
|
21667
|
-
children: /* @__PURE__ */ p(
|
|
21667
|
+
children: /* @__PURE__ */ p(Id, { className: "dtw-opacity-0 dtw-size-[var(--panel-checkbox-icon-size)] dtw-fill-[color:var(--panel-checkbox-color)] group-data-[checked]:dtw-opacity-100 dtw-shrink-0" })
|
|
21668
21668
|
}
|
|
21669
21669
|
),
|
|
21670
|
-
n && /* @__PURE__ */ p(
|
|
21670
|
+
n && /* @__PURE__ */ p(Zu, { className: le("dtw-select-none", r), children: n })
|
|
21671
21671
|
] }), m$ = () => {
|
|
21672
21672
|
const t = An(), {
|
|
21673
21673
|
upperLimitPrice: e,
|
|
@@ -21699,7 +21699,7 @@ const tx = (t) => ({
|
|
|
21699
21699
|
}
|
|
21700
21700
|
),
|
|
21701
21701
|
/* @__PURE__ */ p(
|
|
21702
|
-
|
|
21702
|
+
du,
|
|
21703
21703
|
{
|
|
21704
21704
|
title: t.upperLimitLabel,
|
|
21705
21705
|
subtitle: t.upperLimitSubtitle,
|
|
@@ -21718,7 +21718,7 @@ const tx = (t) => ({
|
|
|
21718
21718
|
}
|
|
21719
21719
|
),
|
|
21720
21720
|
/* @__PURE__ */ p(
|
|
21721
|
-
|
|
21721
|
+
du,
|
|
21722
21722
|
{
|
|
21723
21723
|
title: t.lowerLimitLabel,
|
|
21724
21724
|
subtitle: t.lowerLimitSubtitle,
|
|
@@ -21737,7 +21737,7 @@ const tx = (t) => ({
|
|
|
21737
21737
|
}
|
|
21738
21738
|
),
|
|
21739
21739
|
/* @__PURE__ */ p(
|
|
21740
|
-
|
|
21740
|
+
du,
|
|
21741
21741
|
{
|
|
21742
21742
|
title: t.partialSellLabel,
|
|
21743
21743
|
subtitle: t.partialSellSubtitle,
|
|
@@ -21771,7 +21771,7 @@ const tx = (t) => ({
|
|
|
21771
21771
|
/* @__PURE__ */ p(p$, { className: "dtw-px-2" })
|
|
21772
21772
|
] });
|
|
21773
21773
|
}, f$ = () => {
|
|
21774
|
-
const { account: t = me } = _e(), { vaultAddress: e, vaultChainId: n } = Sn(), r = We("limitOrder", n), a = Em(), { data: o } =
|
|
21774
|
+
const { account: t = me } = _e(), { vaultAddress: e, vaultChainId: n } = Sn(), r = We("limitOrder", n), a = Em(), { data: o } = Kp({
|
|
21775
21775
|
tokenAddress: e,
|
|
21776
21776
|
ownerAddress: t,
|
|
21777
21777
|
spenderAddress: r,
|
|
@@ -21849,21 +21849,21 @@ const tx = (t) => ({
|
|
|
21849
21849
|
user: r,
|
|
21850
21850
|
vault: a,
|
|
21851
21851
|
pricingAsset: o
|
|
21852
|
-
},
|
|
21852
|
+
}, Rd = ({
|
|
21853
21853
|
chainId: t,
|
|
21854
21854
|
userAddress: e,
|
|
21855
21855
|
vaultAddress: n
|
|
21856
21856
|
}) => Cr({
|
|
21857
21857
|
address: We("limitOrder", t),
|
|
21858
|
-
abi:
|
|
21858
|
+
abi: zp,
|
|
21859
21859
|
chainId: t,
|
|
21860
|
-
functionName:
|
|
21860
|
+
functionName: Qp,
|
|
21861
21861
|
args: [s$({ userAddress: e, vaultAddress: n })],
|
|
21862
21862
|
query: {
|
|
21863
21863
|
enabled: !yt(e) && !yt(n),
|
|
21864
21864
|
select: v$
|
|
21865
21865
|
}
|
|
21866
|
-
}), b$ =
|
|
21866
|
+
}), b$ = zp.filter(
|
|
21867
21867
|
({ type: t }) => t === "error"
|
|
21868
21868
|
).map(({ name: t }) => t), g$ = "create", T$ = () => {
|
|
21869
21869
|
const t = An(), { account: e = me } = _e(), {
|
|
@@ -21873,7 +21873,7 @@ const tx = (t) => ({
|
|
|
21873
21873
|
pricingAsset: i,
|
|
21874
21874
|
pendingTransaction: l,
|
|
21875
21875
|
minAmountInUsd: c
|
|
21876
|
-
} = Sn(), d = Em(), { data: u } =
|
|
21876
|
+
} = Sn(), d = Em(), { data: u } = Rd({
|
|
21877
21877
|
userAddress: e,
|
|
21878
21878
|
vaultAddress: n,
|
|
21879
21879
|
chainId: r
|
|
@@ -21889,7 +21889,7 @@ const tx = (t) => ({
|
|
|
21889
21889
|
).gte(c), R = !s || !O, k = !!l;
|
|
21890
21890
|
return {
|
|
21891
21891
|
modifyLimitOrder: async () => {
|
|
21892
|
-
const W = BigInt(a ?
|
|
21892
|
+
const W = BigInt(a ? _u(a, re) : 0), y = o ? BigInt(_u(o, re)) : bs, v = [
|
|
21893
21893
|
d.raw,
|
|
21894
21894
|
W,
|
|
21895
21895
|
y,
|
|
@@ -21947,7 +21947,7 @@ const tx = (t) => ({
|
|
|
21947
21947
|
)
|
|
21948
21948
|
] });
|
|
21949
21949
|
}, E$ = "remove", A$ = () => {
|
|
21950
|
-
const { account: t = me } = _e(), { vaultAddress: e, vaultChainId: n, pendingTransaction: r } = Sn(), { data: a } =
|
|
21950
|
+
const { account: t = me } = _e(), { vaultAddress: e, vaultChainId: n, pendingTransaction: r } = Sn(), { data: a } = Rd({
|
|
21951
21951
|
userAddress: t,
|
|
21952
21952
|
vaultAddress: e,
|
|
21953
21953
|
chainId: n
|
|
@@ -22005,18 +22005,18 @@ const tx = (t) => ({
|
|
|
22005
22005
|
vaultAddress: t,
|
|
22006
22006
|
vaultChainId: e
|
|
22007
22007
|
}) => {
|
|
22008
|
-
const { account: n = me } = _e(), { isFetched: r, data: a } =
|
|
22008
|
+
const { account: n = me } = _e(), { isFetched: r, data: a } = Rd({
|
|
22009
22009
|
vaultAddress: t,
|
|
22010
22010
|
chainId: e,
|
|
22011
22011
|
userAddress: n
|
|
22012
22012
|
}), o = a && a.takeProfitPriceD18 !== bs ? a.takeProfitPrice : "", s = a && a.stopLossPriceD18 !== BigInt(0) ? a.stopLossPrice : "";
|
|
22013
22013
|
return { isFetched: r, upperLimitPrice: o, lowerLimitPrice: s };
|
|
22014
22014
|
}, P$ = [
|
|
22015
|
-
|
|
22015
|
+
Qp,
|
|
22016
22016
|
Pg,
|
|
22017
22017
|
"allowance"
|
|
22018
22018
|
], I$ = () => {
|
|
22019
|
-
const t =
|
|
22019
|
+
const t = zu();
|
|
22020
22020
|
return Y(() => {
|
|
22021
22021
|
t.invalidateQueries({
|
|
22022
22022
|
predicate: ({ queryKey: e }) => {
|
|
@@ -22253,7 +22253,7 @@ const tx = (t) => ({
|
|
|
22253
22253
|
vaultAddress: e,
|
|
22254
22254
|
pricingAsset: n,
|
|
22255
22255
|
translation: r,
|
|
22256
|
-
minAmountInUsd: a =
|
|
22256
|
+
minAmountInUsd: a = Zp,
|
|
22257
22257
|
actions: o,
|
|
22258
22258
|
themeConfig: s
|
|
22259
22259
|
}) => {
|
|
@@ -22351,7 +22351,7 @@ const tx = (t) => ({
|
|
|
22351
22351
|
const [t] = we();
|
|
22352
22352
|
return new X(t.value || "0").shiftedBy(t.decimals);
|
|
22353
22353
|
}, k$ = () => {
|
|
22354
|
-
const { account: t = me } = _e(), { address: e, chainId: n } = te(), r = We("limitOrder", n), a = ux(), { data: o } =
|
|
22354
|
+
const { account: t = me } = _e(), { address: e, chainId: n } = te(), r = We("limitOrder", n), a = ux(), { data: o } = Kp({
|
|
22355
22355
|
tokenAddress: e,
|
|
22356
22356
|
ownerAddress: t,
|
|
22357
22357
|
spenderAddress: r,
|
|
@@ -22401,7 +22401,7 @@ const tx = (t) => ({
|
|
|
22401
22401
|
i(...m), t();
|
|
22402
22402
|
},
|
|
22403
22403
|
[i, t]
|
|
22404
|
-
), c = ux(), { data: d } =
|
|
22404
|
+
), c = ux(), { data: d } = Rd({
|
|
22405
22405
|
userAddress: e,
|
|
22406
22406
|
vaultAddress: n,
|
|
22407
22407
|
chainId: r
|
|
@@ -22440,7 +22440,7 @@ const tx = (t) => ({
|
|
|
22440
22440
|
limitOrderHandler: t,
|
|
22441
22441
|
action: e
|
|
22442
22442
|
}) => {
|
|
22443
|
-
const n = de(), r = Lt(), { account: a } = _e(), o = te(), [s] = we(), i = ct()[1], l = Ht()[1], c =
|
|
22443
|
+
const n = de(), r = Lt(), { account: a } = _e(), o = te(), [s] = we(), i = ct()[1], l = Ht()[1], c = Yp(), d = e === "delete_limit_order_withdraw", u = async () => {
|
|
22444
22444
|
const f = o.chainId;
|
|
22445
22445
|
i({
|
|
22446
22446
|
isOpen: !0,
|
|
@@ -22552,7 +22552,7 @@ const tx = (t) => ({
|
|
|
22552
22552
|
/* @__PURE__ */ p(B$, { children: /* @__PURE__ */ p(z$, { disabled: !a }) })
|
|
22553
22553
|
] }) });
|
|
22554
22554
|
}, Y$ = () => {
|
|
22555
|
-
const t =
|
|
22555
|
+
const t = em(), e = de();
|
|
22556
22556
|
return /* @__PURE__ */ B(Te, { children: [
|
|
22557
22557
|
/* @__PURE__ */ p(
|
|
22558
22558
|
Wo,
|
|
@@ -22793,7 +22793,7 @@ const tx = (t) => ({
|
|
|
22793
22793
|
}, iM = ({ children: t }) => /* @__PURE__ */ B(Ke.Meta, { children: [
|
|
22794
22794
|
/* @__PURE__ */ p(sM, {}),
|
|
22795
22795
|
/* @__PURE__ */ p("div", { className: "dtw-sticky dtw-bottom-0 dtw-bg-[var(--panel-meta-action-panel-bg)]", children: t })
|
|
22796
|
-
] }),
|
|
22796
|
+
] }), uu = [
|
|
22797
22797
|
{
|
|
22798
22798
|
isLeveragedAsset: vg,
|
|
22799
22799
|
getWithdrawAssetByLeverageAddress: bg,
|
|
@@ -22807,41 +22807,41 @@ const tx = (t) => ({
|
|
|
22807
22807
|
getWithdrawAssetByVaultAddress: SI,
|
|
22808
22808
|
isLentAndBorrowedAsset: Ww
|
|
22809
22809
|
}
|
|
22810
|
-
],
|
|
22810
|
+
], pu = {
|
|
22811
22811
|
requiresLeveragedCollateralLiquidity: !1,
|
|
22812
22812
|
leveragedCollateralValueFormatted: "$0"
|
|
22813
|
-
},
|
|
22813
|
+
}, mu = (t) => X(t.amount).shiftedBy(-t.precision).times(t.rate).shiftedBy(-re).toNumber(), px = () => {
|
|
22814
22814
|
var u;
|
|
22815
22815
|
const t = te(), e = rc(t), [n] = we(), r = sn(t), a = e.find(
|
|
22816
|
-
({ tokenAddress: f, amount: m }) =>
|
|
22816
|
+
({ tokenAddress: f, amount: m }) => uu.some(
|
|
22817
22817
|
(h) => h.isLeveragedAsset(f) && m !== "0"
|
|
22818
22818
|
)
|
|
22819
22819
|
);
|
|
22820
22820
|
if (!a)
|
|
22821
|
-
return
|
|
22822
|
-
const o =
|
|
22821
|
+
return pu;
|
|
22822
|
+
const o = uu.find(
|
|
22823
22823
|
(f) => f.isLeveragedAsset(a.tokenAddress)
|
|
22824
22824
|
);
|
|
22825
22825
|
if (!o)
|
|
22826
|
-
return
|
|
22826
|
+
return pu;
|
|
22827
22827
|
const s = ((u = o.getWithdrawAssetByVaultAddress(t.address)) == null ? void 0 : u.address) ?? o.getWithdrawAssetByLeverageAddress(
|
|
22828
22828
|
a.tokenAddress
|
|
22829
22829
|
).address, i = e.find(
|
|
22830
22830
|
({ tokenAddress: f }) => et(s, f)
|
|
22831
22831
|
);
|
|
22832
22832
|
if (!i)
|
|
22833
|
-
return
|
|
22834
|
-
const l = Number(n.value || "0") * Number(r), c =
|
|
22833
|
+
return pu;
|
|
22834
|
+
const l = Number(n.value || "0") * Number(r), c = mu(i);
|
|
22835
22835
|
if (e.find(
|
|
22836
|
-
({ tokenAddress: f, amount: m }) =>
|
|
22836
|
+
({ tokenAddress: f, amount: m }) => uu.some(
|
|
22837
22837
|
(h) => h.isLentAndBorrowedAsset({
|
|
22838
22838
|
address: f,
|
|
22839
22839
|
chainId: t.chainId
|
|
22840
22840
|
}) && m !== "0"
|
|
22841
22841
|
)
|
|
22842
22842
|
)) {
|
|
22843
|
-
const f =
|
|
22844
|
-
(T, O) => T +
|
|
22843
|
+
const f = mu(a), m = e.reduce(
|
|
22844
|
+
(T, O) => T + mu(O),
|
|
22845
22845
|
0
|
|
22846
22846
|
), h = c / m, b = f / m, D = h / (h + b) * m;
|
|
22847
22847
|
return {
|
|
@@ -22858,8 +22858,8 @@ const tx = (t) => ({
|
|
|
22858
22858
|
})
|
|
22859
22859
|
};
|
|
22860
22860
|
}, Am = () => {
|
|
22861
|
-
const { pricingAsset: t, onDemandWithdrawalEnabled: e } = te(), { requiresLeveragedCollateralLiquidity: n } = px();
|
|
22862
|
-
return n && !!t && !!e;
|
|
22861
|
+
const { pricingAsset: t, onDemandWithdrawalEnabled: e } = te(), { requiresLeveragedCollateralLiquidity: n } = px(), r = Od();
|
|
22862
|
+
return n && !!t && !!e && !r;
|
|
22863
22863
|
}, vv = 0, bv = 1, gv = 2, lM = () => {
|
|
22864
22864
|
const t = de(), { isCompleteWithdrawStep: e } = sc(), { canSpend: n } = hm(), r = ha(), a = vm(), o = Am(), s = K(() => {
|
|
22865
22865
|
const l = [
|
|
@@ -22928,7 +22928,7 @@ const tx = (t) => ({
|
|
|
22928
22928
|
}
|
|
22929
22929
|
),
|
|
22930
22930
|
children: [
|
|
22931
|
-
s ? /* @__PURE__ */ p(
|
|
22931
|
+
s ? /* @__PURE__ */ p(tm, { className: "dtw-w-[18px]" }) : /* @__PURE__ */ B("span", { className: "dtw-text-center dtw-text-sm", children: [
|
|
22932
22932
|
o + 1,
|
|
22933
22933
|
"."
|
|
22934
22934
|
] }),
|
|
@@ -23057,7 +23057,7 @@ const tx = (t) => ({
|
|
|
23057
23057
|
const { address: t, chainId: e, maintenance: n, maintenanceWithdrawals: r, symbol: a } = te(), [o] = we(), s = Lt(), i = Am(), l = Sd(), { data: c = 0 } = TN({
|
|
23058
23058
|
address: t,
|
|
23059
23059
|
chainId: e
|
|
23060
|
-
}), d = c > 0, u =
|
|
23060
|
+
}), d = c > 0, u = Wp(
|
|
23061
23061
|
MD({ start: 0, end: c })
|
|
23062
23062
|
), { approve: f, canSpend: m } = hm(), { requiresHighSlippageConfirm: h, confirmHighSlippage: b, slippageToBeUsed: x } = pm(), D = () => {
|
|
23063
23063
|
s({
|
|
@@ -23101,7 +23101,7 @@ const tx = (t) => ({
|
|
|
23101
23101
|
insufficientBalance: b
|
|
23102
23102
|
} = hM();
|
|
23103
23103
|
return f ? /* @__PURE__ */ p(
|
|
23104
|
-
|
|
23104
|
+
$u,
|
|
23105
23105
|
{
|
|
23106
23106
|
promptText: n.poolWithdrawalsAreMaintenance.replace(
|
|
23107
23107
|
"{poolSymbol}",
|
|
@@ -23110,7 +23110,7 @@ const tx = (t) => ({
|
|
|
23110
23110
|
children: r
|
|
23111
23111
|
}
|
|
23112
23112
|
) : a ? /* @__PURE__ */ p(
|
|
23113
|
-
|
|
23113
|
+
$u,
|
|
23114
23114
|
{
|
|
23115
23115
|
promptText: n.withdrawCooldown.replace("{tokenSymbol}", i).replace("{cooldownEndTime}", c),
|
|
23116
23116
|
children: r
|
|
@@ -23286,13 +23286,13 @@ const tx = (t) => ({
|
|
|
23286
23286
|
}, OM = () => {
|
|
23287
23287
|
const { isCompleteWithdrawStep: t } = SM();
|
|
23288
23288
|
return t ? /* @__PURE__ */ p(cM, {}) : /* @__PURE__ */ p(AM, {});
|
|
23289
|
-
}, CM = () => /* @__PURE__ */ p(Ke.Panel, { children: /* @__PURE__ */ p(OM, {}) }), DM = ({ tradingType: t }) => /* @__PURE__ */ B(
|
|
23290
|
-
/* @__PURE__ */ p(
|
|
23291
|
-
/* @__PURE__ */ B(
|
|
23289
|
+
}, CM = () => /* @__PURE__ */ p(Ke.Panel, { children: /* @__PURE__ */ p(OM, {}) }), DM = ({ tradingType: t }) => /* @__PURE__ */ B(Dp, { selectedIndex: ms.indexOf(t), children: [
|
|
23290
|
+
/* @__PURE__ */ p(Pp, { className: "dtw-flex", children: ms.map((e) => /* @__PURE__ */ p(s0, { className: "dtw-hidden" }, e)) }),
|
|
23291
|
+
/* @__PURE__ */ B(Ip, { children: [
|
|
23292
23292
|
/* @__PURE__ */ p(Ke.Settings, { children: /* @__PURE__ */ p(a5, {}) }),
|
|
23293
23293
|
/* @__PURE__ */ p(Ke.Settings, { children: /* @__PURE__ */ p(Y$, {}) })
|
|
23294
23294
|
] })
|
|
23295
|
-
] }), PM = ({ children: t }) => /* @__PURE__ */ B(
|
|
23295
|
+
] }), PM = ({ children: t }) => /* @__PURE__ */ B(Pp, { className: "dtw-flex dtw-px-[var(--panel-tab-group-px)] dtw-justify-between dtw-items-center", children: [
|
|
23296
23296
|
/* @__PURE__ */ p("div", { className: "dtw-bg-[var(--panel-tab-list-bg)] dtw-rounded-[var(--panel-tab-list-radius)] dtw-px-[var(--panel-tab-list-px)] dtw-py-[var(--panel-tab-list-py)]", children: ms.map((e) => /* @__PURE__ */ p(KN, { tradingType: e }, e)) }),
|
|
23297
23297
|
t
|
|
23298
23298
|
] }), IM = ms.reduce(
|
|
@@ -23317,7 +23317,7 @@ const tx = (t) => ({
|
|
|
23317
23317
|
const { type: t, onTabChange: e } = _M();
|
|
23318
23318
|
return /* @__PURE__ */ B("div", { className: "trading-widget dtw-relative dtw-pt-3 dtw-bg-[var(--panel-background-color)] dtw-text-[color:var(--panel-content-color)] dtw-rounded-[var(--widget-radius)] md:dtw-rounded-[var(--widget-radius-md)] dtw-overflow-hidden dtw-h-full", children: [
|
|
23319
23319
|
/* @__PURE__ */ B(
|
|
23320
|
-
|
|
23320
|
+
Dp,
|
|
23321
23321
|
{
|
|
23322
23322
|
selectedIndex: ms.indexOf(t),
|
|
23323
23323
|
onChange: e,
|
|
@@ -23327,7 +23327,7 @@ const tx = (t) => ({
|
|
|
23327
23327
|
/* @__PURE__ */ p(B5, {}),
|
|
23328
23328
|
/* @__PURE__ */ p(DM, { tradingType: t })
|
|
23329
23329
|
] }) }),
|
|
23330
|
-
/* @__PURE__ */ B(
|
|
23330
|
+
/* @__PURE__ */ B(Ip, { className: "dtw-flex-1 dtw-overflow-y-auto", children: [
|
|
23331
23331
|
/* @__PURE__ */ p(fk, {}),
|
|
23332
23332
|
/* @__PURE__ */ p(CM, {})
|
|
23333
23333
|
] })
|
|
@@ -23750,7 +23750,7 @@ const tx = (t) => ({
|
|
|
23750
23750
|
vaultAddress: n,
|
|
23751
23751
|
pricingAsset: r,
|
|
23752
23752
|
translation: a,
|
|
23753
|
-
minAmountInUsd: o =
|
|
23753
|
+
minAmountInUsd: o = Zp,
|
|
23754
23754
|
actions: s,
|
|
23755
23755
|
themeConfig: i,
|
|
23756
23756
|
isModalOpen: l
|
|
@@ -23802,7 +23802,7 @@ export {
|
|
|
23802
23802
|
zP as DAI_OPTIMISM,
|
|
23803
23803
|
YP as DAI_POLYGON,
|
|
23804
23804
|
XM as DEFAULT_DEPOSIT_METHOD,
|
|
23805
|
-
|
|
23805
|
+
Up as DEFAULT_DEPOSIT_SLIPPAGE,
|
|
23806
23806
|
QM as DEFAULT_DEPOSIT_SLIPPAGE_SCALE,
|
|
23807
23807
|
RP as DEFAULT_ERROR_MESSAGE,
|
|
23808
23808
|
WD as DEFAULT_LOCK_TIME,
|
|
@@ -23830,14 +23830,14 @@ export {
|
|
|
23830
23830
|
Pg as GET_ALL_LIMIT_ORDER_IDS_FUNCTION_NAME,
|
|
23831
23831
|
tI as GMX_MARKET_ASSETS,
|
|
23832
23832
|
Ct as GMX_MARKET_ASSETS_MAP,
|
|
23833
|
-
|
|
23833
|
+
Qp as LIMIT_ORDER_READ_FUNCTION_NAME,
|
|
23834
23834
|
a6 as LINK_ARBITRUM,
|
|
23835
23835
|
u6 as LINK_OPTIMISM,
|
|
23836
|
-
|
|
23836
|
+
zp as LimitOrderAbi,
|
|
23837
23837
|
R6 as LimitOrderModal,
|
|
23838
23838
|
Ro as MANAGER_FEE_DENOMINATOR,
|
|
23839
|
-
|
|
23840
|
-
|
|
23839
|
+
Zd as MAX_GAS_LIMIT_MAP,
|
|
23840
|
+
Iu as MULTI_ASSET_TOKEN,
|
|
23841
23841
|
bs as MaxUint256,
|
|
23842
23842
|
qD as NATIVE_TOKEN_DEPOSIT_GAS_LIMIT,
|
|
23843
23843
|
f6 as PAXG_POLYGON,
|
|
@@ -23845,7 +23845,7 @@ export {
|
|
|
23845
23845
|
Ts as PoolFactoryAbi,
|
|
23846
23846
|
Sr as PoolLogicAbi,
|
|
23847
23847
|
Mo as PoolManagerLogicAbi,
|
|
23848
|
-
|
|
23848
|
+
Jd as RETH_BASE,
|
|
23849
23849
|
fP as REWARD_DISTRIBUTION_ADDRESS_OPTIMISM,
|
|
23850
23850
|
IP as RewardDistributionAbi,
|
|
23851
23851
|
d6 as SETH_OPTIMISM,
|
|
@@ -23889,14 +23889,14 @@ export {
|
|
|
23889
23889
|
m6 as WSTETH_OPTIMISM,
|
|
23890
23890
|
qn as arbitrum,
|
|
23891
23891
|
Tn as base,
|
|
23892
|
-
|
|
23892
|
+
jp as clientSide,
|
|
23893
23893
|
sI as commify,
|
|
23894
23894
|
NP as contractsAbisMap,
|
|
23895
23895
|
LP as contractsAddressesMap,
|
|
23896
23896
|
q6 as decodeErrorResult,
|
|
23897
23897
|
K6 as encodeFunctionData,
|
|
23898
23898
|
X6 as erc20Abi,
|
|
23899
|
-
|
|
23899
|
+
ru as formatByCurrency,
|
|
23900
23900
|
Q6 as formatEther,
|
|
23901
23901
|
pa as formatNumberToLimitedDecimals,
|
|
23902
23902
|
gc as formatNumeratorToPercentage,
|
|
@@ -23919,14 +23919,14 @@ export {
|
|
|
23919
23919
|
et as isEqualAddress,
|
|
23920
23920
|
pI as isErrorWithMessage,
|
|
23921
23921
|
wg as isFmpAirdropVaultAddress,
|
|
23922
|
-
|
|
23922
|
+
Gp as isNativeToken,
|
|
23923
23923
|
pg as isNumeric,
|
|
23924
23924
|
yt as isZeroAddress,
|
|
23925
23925
|
ss as normalizeNumber,
|
|
23926
23926
|
nn as optimism,
|
|
23927
23927
|
Xn as polygon,
|
|
23928
23928
|
yI as removeInsignificantTrailingZeros,
|
|
23929
|
-
|
|
23929
|
+
_u as shiftBy,
|
|
23930
23930
|
oI as shortenAddress,
|
|
23931
23931
|
mI as toErrorWithMessage,
|
|
23932
23932
|
gg as transformAddressForAnalytics,
|
|
@@ -23944,7 +23944,7 @@ export {
|
|
|
23944
23944
|
Ir as useContractFunction,
|
|
23945
23945
|
uN as useContractPoolComposition,
|
|
23946
23946
|
Cg as useContractReadErrorLogging,
|
|
23947
|
-
|
|
23947
|
+
Xp as useContractReadsErrorLogging,
|
|
23948
23948
|
kI as useCustomDepositTokensPerChain,
|
|
23949
23949
|
CT as useDebounce,
|
|
23950
23950
|
A5 as useDepositLockTime,
|
|
@@ -23956,13 +23956,13 @@ export {
|
|
|
23956
23956
|
HI as useGasPrice,
|
|
23957
23957
|
Xg as useHasSingleAssetWithdrawBlockers,
|
|
23958
23958
|
I$ as useInvalidateLimitOrderQuery,
|
|
23959
|
-
|
|
23959
|
+
Lu as useInvalidateOnBlock,
|
|
23960
23960
|
hN as useInvalidatePoolContractData,
|
|
23961
|
-
|
|
23962
|
-
|
|
23961
|
+
Jp as useInvalidateTradingQueries,
|
|
23962
|
+
em as useIsBatchContractWritesSupported,
|
|
23963
23963
|
sc as useIsCompleteWithdrawStep,
|
|
23964
23964
|
As as useIsDepositTradingPanelType,
|
|
23965
|
-
|
|
23965
|
+
Od as useIsDhedgeVaultConnected,
|
|
23966
23966
|
Sd as useIsInsufficientBalance,
|
|
23967
23967
|
P6 as useIsPoolAddress,
|
|
23968
23968
|
gT as useIsTradingEnabled,
|
|
@@ -23973,16 +23973,16 @@ export {
|
|
|
23973
23973
|
LI as useOnTokenSelector,
|
|
23974
23974
|
qT as useOnTradingTypeChange,
|
|
23975
23975
|
II as useOnTransactionError,
|
|
23976
|
-
|
|
23976
|
+
Yp as useOnTransactionEstimationError,
|
|
23977
23977
|
_I as useOnTransactionSuccess,
|
|
23978
23978
|
rc as usePoolComposition,
|
|
23979
23979
|
fN as usePoolCompositionWithFraction,
|
|
23980
23980
|
En as usePoolDynamic,
|
|
23981
23981
|
dm as usePoolFees,
|
|
23982
|
-
|
|
23982
|
+
Pd as usePoolManagerDynamic,
|
|
23983
23983
|
Kg as usePoolManagerLogicData,
|
|
23984
|
-
|
|
23985
|
-
|
|
23984
|
+
Dd as usePoolManagerStatic,
|
|
23985
|
+
Cd as usePoolStatic,
|
|
23986
23986
|
sn as usePoolTokenPrice,
|
|
23987
23987
|
QR as useProjectedEarningsCore,
|
|
23988
23988
|
W6 as usePublicClient,
|
|
@@ -23996,7 +23996,7 @@ export {
|
|
|
23996
23996
|
g6 as useSetPoolAddress,
|
|
23997
23997
|
A6 as useSetTradingType,
|
|
23998
23998
|
_6 as useStaticCallQuery,
|
|
23999
|
-
|
|
23999
|
+
Kp as useTokenAllowance,
|
|
24000
24000
|
He as useTradingPanelActions,
|
|
24001
24001
|
xs as useTradingPanelLogger,
|
|
24002
24002
|
ct as useTradingPanelModal,
|
|
@@ -24018,7 +24018,7 @@ export {
|
|
|
24018
24018
|
S6 as useUpdateTradingModal,
|
|
24019
24019
|
E6 as useUpdateTradingSettings,
|
|
24020
24020
|
iN as useUserBalancesDynamic,
|
|
24021
|
-
|
|
24021
|
+
Rd as useUserLimitOrder,
|
|
24022
24022
|
tr as useUserTokenBalance,
|
|
24023
24023
|
EN as useUserVaultBalance,
|
|
24024
24024
|
xN as useUserVaultsBalances,
|