@pyefi/widget 0.1.1
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/LICENSE +21 -0
- package/README.md +76 -0
- package/dist/index.d.ts +16 -0
- package/dist/pye-widget.es.js +2351 -0
- package/dist/pye-widget.es.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,2351 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as tt, useContext as nt, useRef as K, useState as he, useMemo as Y, useEffect as j, useCallback as Qe } from "react";
|
|
3
|
+
import { useWallet as ge, useConnection as Ae, ConnectionProvider as rt, WalletProvider as ot } from "@solana/wallet-adapter-react";
|
|
4
|
+
import { PhantomWalletAdapter as it, SolflareWalletAdapter as lt, TorusWalletAdapter as at, LedgerWalletAdapter as st, WalletConnectWalletAdapter as dt } from "@solana/wallet-adapter-wallets";
|
|
5
|
+
import { WalletAdapterNetwork as ct } from "@solana/wallet-adapter-base";
|
|
6
|
+
import { buildPtLookup as We, maturities as V, getPyeConfig as pt, fetchEpochSyncedNowTs as be, lookupBondByVoteAccount as Ne, estimateRtFromStake as xe, applyTradingFee as Ye, PYE_TRADING_FEE_BPS as je, checkSellLiquidity as ut, executeStakeDeposit as ht, executeRtSell as gt, executeDepositAndSell as yt, fetchBalances as Ve, fetchUserStakeAccounts as Ge, allowedLockups as mt, validators as ke, executeRedeem as ft, configurePyeSDK as bt } from "@pyefi/sdk";
|
|
7
|
+
import { useBalanceStore as W, useWalletStore as J, useMarketStore as ve, useApyStore as xt, PyeSDKProvider as At, WalletSyncer as kt, BalanceSyncer as vt, MarketSyncer as wt, ApySyncer as St } from "@pyefi/sdk/react";
|
|
8
|
+
import { createStore as Ct } from "zustand/vanilla";
|
|
9
|
+
import { immer as Et } from "zustand/middleware/immer";
|
|
10
|
+
import { useStore as Lt } from "zustand";
|
|
11
|
+
import { createPortal as Mt } from "react-dom";
|
|
12
|
+
const De = {
|
|
13
|
+
screen: "yield-forward-intro",
|
|
14
|
+
screenHistory: [],
|
|
15
|
+
selectedStakeAccountPubkey: null,
|
|
16
|
+
selectedStakeAccountBalance: 0,
|
|
17
|
+
selectedValidatorName: null,
|
|
18
|
+
selectedValidatorIcon: null,
|
|
19
|
+
selectedValidatorVoteAccount: null,
|
|
20
|
+
selectedValidatorAltPubkey: null,
|
|
21
|
+
depositAmount: "",
|
|
22
|
+
selectedMaturityId: null,
|
|
23
|
+
advancedOpen: !1,
|
|
24
|
+
slippageBps: 100,
|
|
25
|
+
txStatus: "idle",
|
|
26
|
+
txStep: "idle",
|
|
27
|
+
depositTxSignature: null,
|
|
28
|
+
sellTxSignature: null,
|
|
29
|
+
txSignature: null,
|
|
30
|
+
txError: null,
|
|
31
|
+
sellAmountSol: null,
|
|
32
|
+
redeemingMint: null,
|
|
33
|
+
redeemError: null,
|
|
34
|
+
redeemAmountSol: null,
|
|
35
|
+
redeemTxSignature: null
|
|
36
|
+
};
|
|
37
|
+
function Rt() {
|
|
38
|
+
return Ct()(
|
|
39
|
+
Et((r) => ({
|
|
40
|
+
...De,
|
|
41
|
+
navigate(n) {
|
|
42
|
+
r((o) => {
|
|
43
|
+
o.screenHistory.push(o.screen), o.screen = n;
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
goBack() {
|
|
47
|
+
r((n) => {
|
|
48
|
+
const o = n.screenHistory.pop();
|
|
49
|
+
o && (n.screen = o), n.txStatus === "error" && (n.txStatus = "idle", n.txStep = "idle", n.txError = null), n.redeemError = null;
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
selectStakeAccount(n, o, d, u, l, h) {
|
|
53
|
+
r((g) => {
|
|
54
|
+
g.selectedStakeAccountPubkey = n, g.selectedStakeAccountBalance = o, g.selectedValidatorName = d ?? null, g.selectedValidatorIcon = u ?? null, g.selectedValidatorVoteAccount = l ?? null, g.selectedValidatorAltPubkey = h ?? null;
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
setDepositAmount(n) {
|
|
58
|
+
r((o) => {
|
|
59
|
+
o.depositAmount = n;
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
setSelectedMaturity(n) {
|
|
63
|
+
r((o) => {
|
|
64
|
+
o.selectedMaturityId = n;
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
setAdvancedOpen(n) {
|
|
68
|
+
r((o) => {
|
|
69
|
+
o.advancedOpen = n;
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
setSlippageBps(n) {
|
|
73
|
+
r((o) => {
|
|
74
|
+
o.slippageBps = n;
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
setSellAmountSol(n) {
|
|
78
|
+
r((o) => {
|
|
79
|
+
o.sellAmountSol = n;
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
setRedeemingMint(n) {
|
|
83
|
+
r((o) => {
|
|
84
|
+
o.redeemingMint = n;
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
setRedeemError(n) {
|
|
88
|
+
r((o) => {
|
|
89
|
+
o.redeemError = n;
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
setRedeemAmountSol(n) {
|
|
93
|
+
r((o) => {
|
|
94
|
+
o.redeemAmountSol = n;
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
setRedeemTxSignature(n) {
|
|
98
|
+
r((o) => {
|
|
99
|
+
o.redeemTxSignature = n;
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
setTxStep(n) {
|
|
103
|
+
r((o) => {
|
|
104
|
+
o.txStep = n;
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
setTxStatus(n, o, d) {
|
|
108
|
+
r((u) => {
|
|
109
|
+
u.txStatus = n, u.txSignature = o ?? null, u.txError = d ?? null, n === "idle" && (u.txStep = "idle", u.depositTxSignature = null, u.sellTxSignature = null);
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
reset() {
|
|
113
|
+
r(() => ({ ...De }));
|
|
114
|
+
},
|
|
115
|
+
resetForWalletChange() {
|
|
116
|
+
r((n) => {
|
|
117
|
+
n.selectedStakeAccountPubkey = null, n.selectedStakeAccountBalance = 0, n.selectedValidatorName = null, n.selectedValidatorIcon = null, n.selectedValidatorVoteAccount = null, n.selectedValidatorAltPubkey = null, n.depositAmount = "", n.selectedMaturityId = null, n.txStatus = "idle", n.txStep = "idle", n.depositTxSignature = null, n.sellTxSignature = null, n.txSignature = null, n.txError = null, n.sellAmountSol = null, n.redeemingMint = null, n.redeemError = null, n.redeemAmountSol = null, n.redeemTxSignature = null, (n.screen === "choose-amount" || n.screen === "choose-duration" || n.screen === "review-quote" || n.screen === "complete" || n.screen === "redeem-complete" || n.screen === "redeem-list") && (n.screen = "welcome", n.screenHistory = []);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}))
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
const Ke = tt(null);
|
|
124
|
+
function f(r) {
|
|
125
|
+
const n = nt(Ke);
|
|
126
|
+
if (!n)
|
|
127
|
+
throw new Error("useWidgetStore must be used within WidgetStoreProvider");
|
|
128
|
+
return Lt(n, r);
|
|
129
|
+
}
|
|
130
|
+
const t = {
|
|
131
|
+
bg: "var(--c-bg)",
|
|
132
|
+
surface: "var(--c-surface)",
|
|
133
|
+
raised: "var(--c-raised)",
|
|
134
|
+
lowered: "var(--c-lowered)",
|
|
135
|
+
shadow: "var(--c-shadow)",
|
|
136
|
+
highlight: "var(--c-highlight)",
|
|
137
|
+
primary: "var(--c-primary)",
|
|
138
|
+
secondary: "var(--c-secondary)",
|
|
139
|
+
muted: "var(--c-muted)",
|
|
140
|
+
green: "#0d9c5e",
|
|
141
|
+
purple: "var(--c-brand)",
|
|
142
|
+
red: "#D93B3B"
|
|
143
|
+
}, It = `
|
|
144
|
+
[data-theme] *, [data-theme] *::before, [data-theme] *::after { box-sizing: border-box; }
|
|
145
|
+
:root, [data-theme="pye-light"] {
|
|
146
|
+
--c-bg: #e6e3e0;
|
|
147
|
+
--c-surface: #f1efed;
|
|
148
|
+
--c-raised: #f8f7f6;
|
|
149
|
+
--c-lowered: #eceae8;
|
|
150
|
+
--c-shadow: #e0ddd9;
|
|
151
|
+
--c-highlight: #ffffff;
|
|
152
|
+
--c-primary: #24201c;
|
|
153
|
+
--c-secondary: #5b554c;
|
|
154
|
+
--c-muted: #a09b96;
|
|
155
|
+
--c-brand: #9a4dff;
|
|
156
|
+
--c-brand-hi: #b78eff;
|
|
157
|
+
--c-brand-sh: #6c24c2;
|
|
158
|
+
--c-brand-text: #ffffff;
|
|
159
|
+
}
|
|
160
|
+
[data-theme="pye-dark"] {
|
|
161
|
+
--c-bg: #110F14;
|
|
162
|
+
--c-surface: #1F1C26;
|
|
163
|
+
--c-raised: #2B2735;
|
|
164
|
+
--c-lowered: #110F14;
|
|
165
|
+
--c-shadow: #0A090C;
|
|
166
|
+
--c-highlight: #3C364A;
|
|
167
|
+
--c-primary: #FFFFFF;
|
|
168
|
+
--c-secondary: #D7D4DD;
|
|
169
|
+
--c-muted: rgba(255,255,255,0.4);
|
|
170
|
+
--c-brand: #9a4dff;
|
|
171
|
+
--c-brand-hi: #b78eff;
|
|
172
|
+
--c-brand-sh: #6c24c2;
|
|
173
|
+
--c-brand-text: #ffffff;
|
|
174
|
+
--fill-0: #ffffff;
|
|
175
|
+
}
|
|
176
|
+
[data-theme="graphite"] {
|
|
177
|
+
--c-bg: #1c1c1e;
|
|
178
|
+
--c-surface: #2c2c2e;
|
|
179
|
+
--c-raised: #3a3a3c;
|
|
180
|
+
--c-lowered: #111113;
|
|
181
|
+
--c-shadow: #000000;
|
|
182
|
+
--c-highlight: #48484a;
|
|
183
|
+
--c-primary: #ffffff;
|
|
184
|
+
--c-secondary: #aeaeb2;
|
|
185
|
+
--c-muted: #8e8e93;
|
|
186
|
+
--c-brand: #ffffff;
|
|
187
|
+
--c-brand-hi: rgba(255,255,255,0.2);
|
|
188
|
+
--c-brand-sh: rgba(0,0,0,0.2);
|
|
189
|
+
--c-brand-text: #000000;
|
|
190
|
+
--fill-0: #ffffff;
|
|
191
|
+
}
|
|
192
|
+
/* WalletConnect / Reown AppKit modal stacks at --w3m-z-index (default 999),
|
|
193
|
+
but host pages typically wrap the widget in a scrim around z-index 9999,
|
|
194
|
+
which would cover the QR modal. Bump it above any realistic scrim. */
|
|
195
|
+
w3m-modal, wcm-modal { --w3m-z-index: 2147483647; }
|
|
196
|
+
|
|
197
|
+
/* ─── Hover rules (replaces JS useState hover state) ─────────────── */
|
|
198
|
+
.pye-hoverable {
|
|
199
|
+
transition: background 160ms cubic-bezier(0.2,0.9,0.2,1),
|
|
200
|
+
transform 160ms cubic-bezier(0.2,0.9,0.2,1),
|
|
201
|
+
box-shadow 160ms cubic-bezier(0.2,0.9,0.2,1) !important;
|
|
202
|
+
}
|
|
203
|
+
.pye-hoverable:hover {
|
|
204
|
+
background: var(--c-highlight) !important;
|
|
205
|
+
transform: translateY(-1px);
|
|
206
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 -1px 0 var(--c-shadow) !important;
|
|
207
|
+
}
|
|
208
|
+
.pye-pill:not(.pye-pill--selected):hover { background: var(--c-highlight) !important; }
|
|
209
|
+
.pye-cta-purple:hover:not(:disabled) { filter: brightness(1.15); }
|
|
210
|
+
.pye-cta-default:hover:not(:disabled) { background: var(--c-highlight) !important; }
|
|
211
|
+
.pye-redeem-btn:hover:not(:disabled) { filter: brightness(1.15); }
|
|
212
|
+
|
|
213
|
+
/* ─── Press feedback (scale 0.98 on active) ──────────────────────── */
|
|
214
|
+
.pye-cta-purple, .pye-cta-default, .pye-redeem-btn, .pye-pill {
|
|
215
|
+
transition: background 120ms cubic-bezier(0.2,0.9,0.2,1),
|
|
216
|
+
filter 120ms cubic-bezier(0.2,0.9,0.2,1),
|
|
217
|
+
transform 120ms cubic-bezier(0.2,0.9,0.2,1) !important;
|
|
218
|
+
}
|
|
219
|
+
.pye-cta-purple:active:not(:disabled),
|
|
220
|
+
.pye-cta-default:active:not(:disabled),
|
|
221
|
+
.pye-redeem-btn:active:not(:disabled),
|
|
222
|
+
.pye-pill:active {
|
|
223
|
+
transform: scale(0.98);
|
|
224
|
+
}
|
|
225
|
+
@media (prefers-reduced-motion: reduce) {
|
|
226
|
+
.pye-hoverable, .pye-hoverable:hover,
|
|
227
|
+
.pye-cta-purple, .pye-cta-default, .pye-redeem-btn, .pye-pill,
|
|
228
|
+
.pye-cta-purple:active, .pye-cta-default:active, .pye-redeem-btn:active, .pye-pill:active {
|
|
229
|
+
transform: none !important;
|
|
230
|
+
transition: background 120ms, filter 120ms !important;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* ─── Skeleton shimmer ───────────────────────────────────────── */
|
|
235
|
+
@keyframes pye-skeleton-pulse {
|
|
236
|
+
0%, 100% { opacity: 0.55; }
|
|
237
|
+
50% { opacity: 0.85; }
|
|
238
|
+
}
|
|
239
|
+
.pye-skeleton {
|
|
240
|
+
animation: pye-skeleton-pulse 1.4s ease-in-out infinite;
|
|
241
|
+
background: linear-gradient(
|
|
242
|
+
90deg,
|
|
243
|
+
var(--c-lowered) 0%,
|
|
244
|
+
var(--c-shadow) 50%,
|
|
245
|
+
var(--c-lowered) 100%
|
|
246
|
+
);
|
|
247
|
+
background-size: 200% 100%;
|
|
248
|
+
border-radius: 4px;
|
|
249
|
+
}
|
|
250
|
+
@media (prefers-reduced-motion: reduce) {
|
|
251
|
+
.pye-skeleton { animation: none; opacity: 0.7; }
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* ─── Step transition: subtle translate + fade on mount ──────── */
|
|
255
|
+
@keyframes pye-step-in {
|
|
256
|
+
0% { transform: translateY(8px); opacity: 0; }
|
|
257
|
+
100% { transform: translateY(0); opacity: 1; }
|
|
258
|
+
}
|
|
259
|
+
.pye-step-in {
|
|
260
|
+
animation: pye-step-in 280ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
|
|
261
|
+
will-change: transform, opacity;
|
|
262
|
+
display: flex;
|
|
263
|
+
flex-direction: column;
|
|
264
|
+
gap: 16px;
|
|
265
|
+
flex: 1;
|
|
266
|
+
min-height: 0;
|
|
267
|
+
}
|
|
268
|
+
@media (prefers-reduced-motion: reduce) {
|
|
269
|
+
.pye-step-in { animation: none; }
|
|
270
|
+
}
|
|
271
|
+
`, Dt = "'Inter', sans-serif", a = (r, n = t.primary, o = 400) => ({
|
|
272
|
+
fontFamily: "'Inter', sans-serif",
|
|
273
|
+
fontSize: r,
|
|
274
|
+
fontWeight: o,
|
|
275
|
+
color: n,
|
|
276
|
+
lineHeight: 1.5,
|
|
277
|
+
margin: 0,
|
|
278
|
+
fontFeatureSettings: "'zero' 1"
|
|
279
|
+
}), U = (r, n = t.primary, o = 400) => ({
|
|
280
|
+
fontFamily: Dt,
|
|
281
|
+
fontSize: r,
|
|
282
|
+
fontWeight: o,
|
|
283
|
+
color: n,
|
|
284
|
+
lineHeight: 1.2,
|
|
285
|
+
fontFeatureSettings: "'zero' 1",
|
|
286
|
+
margin: 0
|
|
287
|
+
}), Je = 0.85;
|
|
288
|
+
function O(r, n = 4) {
|
|
289
|
+
if (r === 0) return "0";
|
|
290
|
+
const o = r < 1 ? Math.max(n, -Math.floor(Math.log10(Math.abs(r))) + 1) : n;
|
|
291
|
+
return r.toFixed(o);
|
|
292
|
+
}
|
|
293
|
+
const Bt = !1, Pt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAEDRJREFUeAHtXXmQHGUV/3X3nLuzs3eym4schpgAkUOjJRQgRYGEQygOCwxHIVJyFAIiBoo/kJKrDMo/SBRQtBAUwUIIR3EJRJBLQBIghIQsIcnuJntldnbu7va9r2eSEGY3O9s9Mz3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dt3H0TPrgPCcKypX2YBpdsXSRDOwZkfJqG4AmfmDiHEKIrZSdEeRZR8GzIARwLh5Ccp9/8yCcBvksqsXP+3GtW8y5Pe3odQxwCKV2i2WzMi4S7Or6HGhToPwdj5KoUm99CMP0AG0S5yH9vqcug0D3DvnqeQbOvGyKXTmL4zgizpXTNkImwaiBKjomQjlMg6N03Lq+5d3XirRBzLK1IgqUhGZ4jSd3mKCOYprlCkjyUMYLIx+gYxcOAQki3VReDu6xcL8OBh8RHvTs3DnrqB0tRlijFcACjoZI6TOsrMMxSKXLVLCBTqpknVuQO1Us0CoJK+CvVQ5qmxA1pDJ8H5IYR6n0S4l2Z690Gorf2kyjbvgOlkSzv2P/+6GPixG5eQXZoXs7NE8F+gGcqnnsvikI34KbIMiQWgxJBP32bJFKemNTQ2Y9uuJ9Czcx9C4eqib4HenSSvhz+7n0eYq2EXJ1EiuyE/ekFs1GFNniZjclqoUlVsPV7jezZyXkBp4hqKt8/DaCeYb98FJZbEgzhR9F6aGh3G7aFzWJqdEPk3VQ8JI61eLRGnnPBOXCIARMlGQp/ePU+jq28AVW0+WJ/GwMlReHr6OkyyH4y+J2F0Vx8A8mlDAvAoUYEs/9ErZzBx85owFjUjVLM+vptcgSY2BYR4dVTPjt3o3/s0wvEGfBzoYyMATMyoyVvXMUZokFqYEQKgQEXtO/Ly7OY9AWw0NLXJWT+wq6bI4qNKHysB8Cm7OEsq4TymxkZENK/Wo+7Z49BDEXT2DqBvzxOINwXbduUvE30sBYDJImNtdmKUEoSFmo65FZ42IYpB8Ym27u3QQvXZFvdRo4+tAGxRMPr4KLMtqom2BOAxpy0BeMxpSwAec9oSgMectgTgMactAXjMaUsAHnPaEoDHnLYE4DGnLQF4zGlLAB5z2hKAx5z+P352FSSkh4qJAAAAAElFTkSuQmCC";
|
|
294
|
+
function Ft() {
|
|
295
|
+
return /* @__PURE__ */ i("svg", { width: "33", height: "16", viewBox: "0 0 33.0001 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { display: "block", flexShrink: 0 }, children: [
|
|
296
|
+
/* @__PURE__ */ e("path", { d: "M32.9338 2.19869V4.83327H24.0205V6.46108H32.4867V8.92786H24.0205V10.7068H33.0001V13.3918H20.707V2.19869H32.9338Z", fill: "var(--fill-0, #24201C)" }),
|
|
297
|
+
/* @__PURE__ */ e("path", { d: "M23.9528 1.65254C21.8438 0.595304 19.4691 0 16.9568 0C14.4445 0 12.1791 0.567895 10.1067 1.58001C9.97635 1.64385 9.89253 1.77655 9.89253 1.92329V16L24.0043 1.70335C23.9924 1.68196 23.9749 1.66424 23.9528 1.65254Z", fill: "url(#pye-radial)" }),
|
|
298
|
+
/* @__PURE__ */ e("path", { d: "M24.0043 1.70338L9.89253 16H14.27C14.4832 16 14.6878 15.9141 14.8386 15.7614L24.0218 6.45812L24.0211 1.76589C24.0211 1.74349 24.0149 1.7221 24.0043 1.70338Z", fill: "url(#pye-linear)" }),
|
|
299
|
+
/* @__PURE__ */ e("path", { d: "M0.000119395 2.25921H8.83059C9.15069 2.25921 9.41601 2.26489 9.62589 2.27592C9.83544 2.28728 10.007 2.29832 10.1394 2.30935C10.272 2.32071 10.4152 2.33742 10.57 2.35982C11.0891 2.43837 11.5227 2.56104 11.8705 2.72883C12.2184 2.89663 12.4946 3.13729 12.6988 3.45048C12.9031 3.76368 13.0467 4.16378 13.1295 4.65045C13.2123 5.13712 13.2536 5.73844 13.2536 6.45441C13.2536 7.08114 13.2232 7.61527 13.1625 8.05682C13.1018 8.49903 13.0021 8.87373 12.8642 9.18124C12.7259 9.48909 12.5437 9.73777 12.3174 9.92796C12.091 10.1182 11.8121 10.2749 11.4808 10.3979C11.2927 10.4651 11.0967 10.5183 10.8928 10.5574C10.6882 10.5968 10.4426 10.6272 10.1555 10.6496C9.86811 10.672 9.52029 10.6891 9.11175 10.7001C8.70288 10.7115 8.20062 10.7168 7.60398 10.7168H3.36315V13.452H0.000119395V2.25921ZM7.57164 7.91443C7.95807 7.91443 8.26167 7.91175 8.48277 7.90607C8.70354 7.90072 8.87745 7.89203 9.0045 7.881C9.13122 7.86997 9.22527 7.85326 9.28599 7.83053C9.34671 7.80813 9.4104 7.77471 9.4764 7.72992C9.63084 7.62931 9.73875 7.48959 9.79947 7.31043C9.86019 7.13161 9.89055 6.84616 9.89055 6.45475C9.89055 6.06334 9.84897 5.75582 9.76614 5.5653C9.68331 5.37511 9.53151 5.24107 9.31041 5.16253C9.25497 5.14013 9.20283 5.12342 9.153 5.11205C9.10317 5.10102 9.02298 5.09267 8.91276 5.08698C8.80221 5.0813 8.64216 5.07595 8.43228 5.07027C8.2224 5.06492 7.9353 5.06192 7.57065 5.06192H3.36315V7.91476H7.57131L7.57164 7.91443Z", fill: "var(--fill-0, #24201C)" }),
|
|
300
|
+
/* @__PURE__ */ i("defs", { children: [
|
|
301
|
+
/* @__PURE__ */ i("radialGradient", { id: "pye-radial", cx: "0", cy: "0", r: "1", gradientUnits: "userSpaceOnUse", gradientTransform: "translate(16.9047 16.0398) scale(15.743 15.9459)", children: [
|
|
302
|
+
/* @__PURE__ */ e("stop", { stopColor: "#D59EFF" }),
|
|
303
|
+
/* @__PURE__ */ e("stop", { offset: "0.14", stopColor: "#C881FF" }),
|
|
304
|
+
/* @__PURE__ */ e("stop", { offset: "0.44", stopColor: "#AF48FF" }),
|
|
305
|
+
/* @__PURE__ */ e("stop", { offset: "0.66", stopColor: "#9F24FF" }),
|
|
306
|
+
/* @__PURE__ */ e("stop", { offset: "0.78", stopColor: "#9A17FF" }),
|
|
307
|
+
/* @__PURE__ */ e("stop", { offset: "1", stopColor: "#662D91" })
|
|
308
|
+
] }),
|
|
309
|
+
/* @__PURE__ */ i("linearGradient", { id: "pye-linear", x1: "16.9572", y1: "16", x2: "16.9572", y2: "1.73781", gradientUnits: "userSpaceOnUse", children: [
|
|
310
|
+
/* @__PURE__ */ e("stop", { stopColor: "#331647" }),
|
|
311
|
+
/* @__PURE__ */ e("stop", { offset: "0.33", stopColor: "#6B2F98" }),
|
|
312
|
+
/* @__PURE__ */ e("stop", { offset: "0.54", stopColor: "#8A3CC4" }),
|
|
313
|
+
/* @__PURE__ */ e("stop", { offset: "0.89", stopColor: "#AE4CF8" }),
|
|
314
|
+
/* @__PURE__ */ e("stop", { offset: "1", stopColor: "#B34FFF" })
|
|
315
|
+
] })
|
|
316
|
+
] })
|
|
317
|
+
] });
|
|
318
|
+
}
|
|
319
|
+
function Ht({ name: r, size: n = 32 }) {
|
|
320
|
+
const o = { Phantom: Pt, Backpack: Tt, Metamask: Ot }, d = { Phantom: "#AB9FF2", Backpack: "#E33B3B", Metamask: "#F5841F" }, u = o[r];
|
|
321
|
+
return u ? /* @__PURE__ */ e("img", { src: u, alt: r, style: {
|
|
322
|
+
width: n,
|
|
323
|
+
height: n,
|
|
324
|
+
borderRadius: 8,
|
|
325
|
+
flexShrink: 0,
|
|
326
|
+
objectFit: "cover",
|
|
327
|
+
boxShadow: "0px 4px 8px 0px rgba(0,0,0,0.07)"
|
|
328
|
+
} }) : /* @__PURE__ */ e("div", { style: {
|
|
329
|
+
width: n,
|
|
330
|
+
height: n,
|
|
331
|
+
borderRadius: 8,
|
|
332
|
+
flexShrink: 0,
|
|
333
|
+
background: d[r] || "#ccc",
|
|
334
|
+
display: "flex",
|
|
335
|
+
alignItems: "center",
|
|
336
|
+
justifyContent: "center"
|
|
337
|
+
}, children: /* @__PURE__ */ e("span", { style: a(11, "#fff", 700), children: r[0] }) });
|
|
338
|
+
}
|
|
339
|
+
function re({ children: r }) {
|
|
340
|
+
return /* @__PURE__ */ e("div", { style: {
|
|
341
|
+
width: "min(420px, calc(100vw - 32px))",
|
|
342
|
+
height: 600,
|
|
343
|
+
borderRadius: 10,
|
|
344
|
+
boxShadow: "0px 4px 8px rgba(0,0,0,0.07)",
|
|
345
|
+
display: "flex",
|
|
346
|
+
flexDirection: "column",
|
|
347
|
+
background: t.surface
|
|
348
|
+
}, children: r });
|
|
349
|
+
}
|
|
350
|
+
function ie({ children: r, padding: n = 24, style: o }) {
|
|
351
|
+
return /* @__PURE__ */ i("div", { style: {
|
|
352
|
+
flex: 1,
|
|
353
|
+
display: "flex",
|
|
354
|
+
flexDirection: "column",
|
|
355
|
+
minHeight: 0,
|
|
356
|
+
background: t.surface,
|
|
357
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
358
|
+
...o
|
|
359
|
+
}, children: [
|
|
360
|
+
/* @__PURE__ */ e("div", { style: {
|
|
361
|
+
flex: 1,
|
|
362
|
+
display: "flex",
|
|
363
|
+
flexDirection: "column",
|
|
364
|
+
padding: n,
|
|
365
|
+
gap: 16,
|
|
366
|
+
minHeight: 0,
|
|
367
|
+
overflowY: "auto"
|
|
368
|
+
}, children: r }),
|
|
369
|
+
/* @__PURE__ */ e("div", { style: { height: 0, borderTop: `1px solid ${t.shadow}`, flexShrink: 0 } })
|
|
370
|
+
] });
|
|
371
|
+
}
|
|
372
|
+
function q() {
|
|
373
|
+
return /* @__PURE__ */ e("div", { style: { flex: 1 } });
|
|
374
|
+
}
|
|
375
|
+
function Be({ step: r, total: n, onBack: o, hideStep: d, label: u, tooltipText: l }) {
|
|
376
|
+
const h = !d && r != null && n != null && n > 0, g = h ? Math.round(r / n * 100) : 0, b = /* @__PURE__ */ e("button", { onClick: o, style: {
|
|
377
|
+
background: "none",
|
|
378
|
+
border: "none",
|
|
379
|
+
cursor: "pointer",
|
|
380
|
+
padding: 0,
|
|
381
|
+
display: "flex",
|
|
382
|
+
alignItems: "center",
|
|
383
|
+
visibility: o ? "visible" : "hidden",
|
|
384
|
+
color: t.secondary,
|
|
385
|
+
flexShrink: 0
|
|
386
|
+
}, children: /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 16 16", fill: "none", style: { display: "block" }, children: /* @__PURE__ */ e("path", { d: "M13 8H3M3 8L7 4M3 8L7 12", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }) });
|
|
387
|
+
return /* @__PURE__ */ i("div", { style: {
|
|
388
|
+
display: "flex",
|
|
389
|
+
alignItems: "center",
|
|
390
|
+
gap: 14,
|
|
391
|
+
padding: "20px 24px",
|
|
392
|
+
flexShrink: 0,
|
|
393
|
+
background: t.surface,
|
|
394
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
395
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
396
|
+
borderRadius: "10px 10px 0 0"
|
|
397
|
+
}, children: [
|
|
398
|
+
b,
|
|
399
|
+
!h && u && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
400
|
+
/* @__PURE__ */ e("span", { style: { ...a(15, t.primary, 500) }, children: u }),
|
|
401
|
+
l && /* @__PURE__ */ e(Z, { position: "below", text: l })
|
|
402
|
+
] }),
|
|
403
|
+
h && /* @__PURE__ */ i("div", { style: { flex: 1, display: "flex", alignItems: "center", gap: 10 }, children: [
|
|
404
|
+
/* @__PURE__ */ e("div", { style: {
|
|
405
|
+
flex: 1,
|
|
406
|
+
height: 3,
|
|
407
|
+
background: t.shadow,
|
|
408
|
+
borderRadius: 2,
|
|
409
|
+
overflow: "hidden"
|
|
410
|
+
}, children: /* @__PURE__ */ e("div", { style: {
|
|
411
|
+
height: "100%",
|
|
412
|
+
width: `${g}%`,
|
|
413
|
+
background: t.purple,
|
|
414
|
+
borderRadius: 2,
|
|
415
|
+
transition: "width 0.25s ease"
|
|
416
|
+
} }) }),
|
|
417
|
+
/* @__PURE__ */ i("span", { style: {
|
|
418
|
+
...a(13, t.secondary),
|
|
419
|
+
lineHeight: 1,
|
|
420
|
+
whiteSpace: "nowrap",
|
|
421
|
+
fontVariantNumeric: "tabular-nums"
|
|
422
|
+
}, children: [
|
|
423
|
+
r,
|
|
424
|
+
"/",
|
|
425
|
+
n
|
|
426
|
+
] })
|
|
427
|
+
] })
|
|
428
|
+
] });
|
|
429
|
+
}
|
|
430
|
+
function ye({ title: r, subtitle: n }) {
|
|
431
|
+
return /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
432
|
+
/* @__PURE__ */ e("p", { style: a(18, t.primary, 500), children: r }),
|
|
433
|
+
n && /* @__PURE__ */ e("p", { style: a(14, t.secondary), children: n })
|
|
434
|
+
] });
|
|
435
|
+
}
|
|
436
|
+
function Z({ text: r, bg: n, position: o = "above" }) {
|
|
437
|
+
const d = n ?? t.raised, u = o === "below", l = K(null), [h, g] = he(null), b = () => {
|
|
438
|
+
const p = l.current;
|
|
439
|
+
if (!p) return;
|
|
440
|
+
const x = p.getBoundingClientRect();
|
|
441
|
+
g({
|
|
442
|
+
top: u ? x.bottom + 8 : x.top - 8,
|
|
443
|
+
left: x.left + x.width / 2
|
|
444
|
+
});
|
|
445
|
+
}, c = h ? Mt(
|
|
446
|
+
/* @__PURE__ */ i("div", { style: {
|
|
447
|
+
position: "fixed",
|
|
448
|
+
top: u ? h.top : void 0,
|
|
449
|
+
bottom: u ? void 0 : `calc(100vh - ${h.top}px)`,
|
|
450
|
+
left: h.left,
|
|
451
|
+
transform: "translateX(-50%)",
|
|
452
|
+
width: 210,
|
|
453
|
+
background: d,
|
|
454
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
455
|
+
boxShadow: `0 4px 16px rgba(0,0,0,0.15), inset 0 -1px 0 ${t.shadow}`,
|
|
456
|
+
borderRadius: 8,
|
|
457
|
+
padding: "8px 10px",
|
|
458
|
+
zIndex: 1e4,
|
|
459
|
+
pointerEvents: "none"
|
|
460
|
+
}, children: [
|
|
461
|
+
/* @__PURE__ */ e("p", { style: { ...a(11, t.secondary), lineHeight: 1.5 }, children: r }),
|
|
462
|
+
/* @__PURE__ */ e("div", { style: {
|
|
463
|
+
position: "absolute",
|
|
464
|
+
...u ? { top: -4 } : { bottom: -4 },
|
|
465
|
+
left: "50%",
|
|
466
|
+
transform: "translateX(-50%) rotate(45deg)",
|
|
467
|
+
width: 8,
|
|
468
|
+
height: 8,
|
|
469
|
+
background: d,
|
|
470
|
+
boxShadow: u ? `-1px -1px 0 ${t.shadow}` : `1px 1px 0 ${t.shadow}`
|
|
471
|
+
} })
|
|
472
|
+
] }),
|
|
473
|
+
document.body
|
|
474
|
+
) : null;
|
|
475
|
+
return /* @__PURE__ */ i(
|
|
476
|
+
"div",
|
|
477
|
+
{
|
|
478
|
+
ref: l,
|
|
479
|
+
onMouseEnter: b,
|
|
480
|
+
onMouseLeave: () => g(null),
|
|
481
|
+
style: { position: "relative", display: "inline-flex", flexShrink: 0 },
|
|
482
|
+
children: [
|
|
483
|
+
/* @__PURE__ */ e(
|
|
484
|
+
"div",
|
|
485
|
+
{
|
|
486
|
+
style: {
|
|
487
|
+
width: 16,
|
|
488
|
+
height: 16,
|
|
489
|
+
borderRadius: "50%",
|
|
490
|
+
background: d,
|
|
491
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
492
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
493
|
+
display: "flex",
|
|
494
|
+
alignItems: "center",
|
|
495
|
+
justifyContent: "center",
|
|
496
|
+
cursor: "default",
|
|
497
|
+
flexShrink: 0
|
|
498
|
+
},
|
|
499
|
+
children: /* @__PURE__ */ e("span", { style: { ...a(9, t.muted), lineHeight: 1, userSelect: "none", fontWeight: 500 }, children: "?" })
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
c
|
|
503
|
+
]
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
function qe({ children: r }) {
|
|
508
|
+
return /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: r });
|
|
509
|
+
}
|
|
510
|
+
function Qt({ icon: r, label: n, sub: o, amount: d, selected: u, onClick: l }) {
|
|
511
|
+
const h = u ? t.bg : t.raised, g = u ? `inset 0 1px 0 ${t.shadow}, inset 0 -1px 0 ${t.highlight}` : `inset 0 1px 0 ${t.highlight}, inset 0 -1px 0 ${t.shadow}`;
|
|
512
|
+
return /* @__PURE__ */ i(
|
|
513
|
+
"div",
|
|
514
|
+
{
|
|
515
|
+
className: u ? void 0 : "pye-hoverable",
|
|
516
|
+
onClick: l,
|
|
517
|
+
style: {
|
|
518
|
+
display: "flex",
|
|
519
|
+
alignItems: "center",
|
|
520
|
+
justifyContent: "space-between",
|
|
521
|
+
padding: 12,
|
|
522
|
+
borderRadius: 8,
|
|
523
|
+
background: h,
|
|
524
|
+
boxShadow: g,
|
|
525
|
+
cursor: "pointer",
|
|
526
|
+
transition: "background 0.1s"
|
|
527
|
+
},
|
|
528
|
+
children: [
|
|
529
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
530
|
+
r,
|
|
531
|
+
/* @__PURE__ */ i("div", { children: [
|
|
532
|
+
/* @__PURE__ */ e("p", { style: a(15, t.primary), children: n }),
|
|
533
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: o })
|
|
534
|
+
] })
|
|
535
|
+
] }),
|
|
536
|
+
d && /* @__PURE__ */ i("div", { style: { textAlign: "right" }, children: [
|
|
537
|
+
/* @__PURE__ */ e("p", { style: a(15, t.primary), children: d }),
|
|
538
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "SOL" })
|
|
539
|
+
] })
|
|
540
|
+
]
|
|
541
|
+
}
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
function Pe() {
|
|
545
|
+
return /* @__PURE__ */ i("div", { style: {
|
|
546
|
+
display: "flex",
|
|
547
|
+
alignItems: "center",
|
|
548
|
+
gap: 12,
|
|
549
|
+
padding: 16,
|
|
550
|
+
borderRadius: 10,
|
|
551
|
+
minHeight: 76,
|
|
552
|
+
background: t.raised,
|
|
553
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
554
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`
|
|
555
|
+
}, children: [
|
|
556
|
+
/* @__PURE__ */ e("div", { className: "pye-skeleton", style: { width: 44, height: 44, borderRadius: 10, flexShrink: 0 } }),
|
|
557
|
+
/* @__PURE__ */ i("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: 8, minWidth: 0 }, children: [
|
|
558
|
+
/* @__PURE__ */ e("div", { className: "pye-skeleton", style: { width: "55%", height: 14 } }),
|
|
559
|
+
/* @__PURE__ */ e("div", { className: "pye-skeleton", style: { width: "75%", height: 12 } })
|
|
560
|
+
] })
|
|
561
|
+
] });
|
|
562
|
+
}
|
|
563
|
+
function le({ label: r, onClick: n, disabled: o, purple: d }) {
|
|
564
|
+
return d ? /* @__PURE__ */ e(
|
|
565
|
+
"button",
|
|
566
|
+
{
|
|
567
|
+
className: "pye-cta-purple",
|
|
568
|
+
onClick: o ? void 0 : n,
|
|
569
|
+
disabled: o,
|
|
570
|
+
style: {
|
|
571
|
+
width: "100%",
|
|
572
|
+
height: 40,
|
|
573
|
+
borderRadius: 6,
|
|
574
|
+
border: "none",
|
|
575
|
+
borderTop: "1px solid var(--c-brand-hi)",
|
|
576
|
+
cursor: o ? "not-allowed" : "pointer",
|
|
577
|
+
background: t.purple,
|
|
578
|
+
...a(15, "var(--c-brand-text)"),
|
|
579
|
+
boxShadow: "inset 0 -1px 0 var(--c-brand-sh)",
|
|
580
|
+
opacity: o ? 0.5 : 1,
|
|
581
|
+
transition: "filter 0.1s, opacity 0.1s",
|
|
582
|
+
flexShrink: 0
|
|
583
|
+
},
|
|
584
|
+
children: r
|
|
585
|
+
}
|
|
586
|
+
) : /* @__PURE__ */ e(
|
|
587
|
+
"button",
|
|
588
|
+
{
|
|
589
|
+
className: "pye-cta-default",
|
|
590
|
+
onClick: n,
|
|
591
|
+
disabled: o,
|
|
592
|
+
style: {
|
|
593
|
+
width: "100%",
|
|
594
|
+
height: 40,
|
|
595
|
+
borderRadius: 6,
|
|
596
|
+
border: "none",
|
|
597
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
598
|
+
cursor: o ? "not-allowed" : "pointer",
|
|
599
|
+
background: t.raised,
|
|
600
|
+
...a(15, t.primary),
|
|
601
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
602
|
+
opacity: o ? 0.5 : 1,
|
|
603
|
+
transition: "background 0.1s, opacity 0.1s",
|
|
604
|
+
flexShrink: 0
|
|
605
|
+
},
|
|
606
|
+
children: r
|
|
607
|
+
}
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
function ze({ label: r, onClose: n }) {
|
|
611
|
+
return /* @__PURE__ */ i("div", { style: {
|
|
612
|
+
height: 48,
|
|
613
|
+
display: "flex",
|
|
614
|
+
alignItems: "center",
|
|
615
|
+
padding: "0 24px",
|
|
616
|
+
flexShrink: 0,
|
|
617
|
+
gap: 8,
|
|
618
|
+
background: t.surface,
|
|
619
|
+
borderRadius: "10px 10px 0 0",
|
|
620
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
621
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`
|
|
622
|
+
}, children: [
|
|
623
|
+
/* @__PURE__ */ e("div", { style: {
|
|
624
|
+
width: 20,
|
|
625
|
+
height: 20,
|
|
626
|
+
borderRadius: "50%",
|
|
627
|
+
flexShrink: 0,
|
|
628
|
+
background: "rgba(13, 156, 94, 0.15)",
|
|
629
|
+
display: "flex",
|
|
630
|
+
alignItems: "center",
|
|
631
|
+
justifyContent: "center"
|
|
632
|
+
}, children: /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 8.5L6.5 12L13 5", stroke: "#0d9c5e", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
|
|
633
|
+
/* @__PURE__ */ e("p", { style: { ...a(15, t.primary), flex: 1 }, children: r }),
|
|
634
|
+
/* @__PURE__ */ e("button", { onClick: n, style: {
|
|
635
|
+
background: "none",
|
|
636
|
+
border: "none",
|
|
637
|
+
cursor: "pointer",
|
|
638
|
+
padding: 0,
|
|
639
|
+
width: 28,
|
|
640
|
+
height: 28,
|
|
641
|
+
marginRight: -7,
|
|
642
|
+
display: "flex",
|
|
643
|
+
alignItems: "center",
|
|
644
|
+
justifyContent: "center",
|
|
645
|
+
borderRadius: 8,
|
|
646
|
+
flexShrink: 0
|
|
647
|
+
}, children: /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M1 1L13 13M13 1L1 13", stroke: t.secondary, strokeWidth: "1", strokeLinecap: "round" }) }) })
|
|
648
|
+
] });
|
|
649
|
+
}
|
|
650
|
+
function oe() {
|
|
651
|
+
return /* @__PURE__ */ e("div", { style: {
|
|
652
|
+
height: 44,
|
|
653
|
+
display: "flex",
|
|
654
|
+
alignItems: "center",
|
|
655
|
+
justifyContent: "center",
|
|
656
|
+
gap: 8,
|
|
657
|
+
flexShrink: 0,
|
|
658
|
+
background: t.surface,
|
|
659
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
660
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
661
|
+
borderRadius: "0 0 10px 10px"
|
|
662
|
+
}, children: /* @__PURE__ */ i("a", { href: "https://pye.fi/", target: "_blank", rel: "noopener noreferrer", style: { display: "flex", alignItems: "center", gap: 8, textDecoration: "none" }, children: [
|
|
663
|
+
/* @__PURE__ */ e("span", { style: a(15, t.secondary), children: "Powered by" }),
|
|
664
|
+
/* @__PURE__ */ e(Ft, {})
|
|
665
|
+
] }) });
|
|
666
|
+
}
|
|
667
|
+
function Wt({ message: r }) {
|
|
668
|
+
return r ? /* @__PURE__ */ e("p", { style: { ...a(14, t.red), marginTop: 4 }, children: r }) : null;
|
|
669
|
+
}
|
|
670
|
+
const Te = 1e9;
|
|
671
|
+
function me({
|
|
672
|
+
icon: r,
|
|
673
|
+
label: n,
|
|
674
|
+
sub: o,
|
|
675
|
+
subColor: d,
|
|
676
|
+
onClick: u,
|
|
677
|
+
disabled: l
|
|
678
|
+
}) {
|
|
679
|
+
return /* @__PURE__ */ i(
|
|
680
|
+
"div",
|
|
681
|
+
{
|
|
682
|
+
className: l ? void 0 : "pye-hoverable",
|
|
683
|
+
onClick: l ? void 0 : u,
|
|
684
|
+
style: {
|
|
685
|
+
display: "flex",
|
|
686
|
+
alignItems: "center",
|
|
687
|
+
gap: 12,
|
|
688
|
+
padding: 16,
|
|
689
|
+
borderRadius: 10,
|
|
690
|
+
minHeight: 76,
|
|
691
|
+
background: t.raised,
|
|
692
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
693
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
694
|
+
cursor: l ? "not-allowed" : "pointer",
|
|
695
|
+
opacity: l ? 0.5 : 1,
|
|
696
|
+
transition: "background 0.1s"
|
|
697
|
+
},
|
|
698
|
+
children: [
|
|
699
|
+
r,
|
|
700
|
+
/* @__PURE__ */ i("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: 2, minWidth: 0 }, children: [
|
|
701
|
+
/* @__PURE__ */ e("p", { style: a(15, t.primary, 600), children: n }),
|
|
702
|
+
/* @__PURE__ */ e("p", { style: a(14, d ?? t.secondary), children: o })
|
|
703
|
+
] }),
|
|
704
|
+
/* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0 }, children: /* @__PURE__ */ e("path", { d: "M6 4L10 8L6 12", stroke: t.muted, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
705
|
+
]
|
|
706
|
+
}
|
|
707
|
+
);
|
|
708
|
+
}
|
|
709
|
+
function Nt({ address: r, onSwitch: n }) {
|
|
710
|
+
const o = `${r.slice(0, 4)}...${r.slice(-4)}`;
|
|
711
|
+
return /* @__PURE__ */ i(
|
|
712
|
+
"button",
|
|
713
|
+
{
|
|
714
|
+
className: "pye-hoverable",
|
|
715
|
+
onClick: n,
|
|
716
|
+
style: {
|
|
717
|
+
display: "flex",
|
|
718
|
+
alignItems: "center",
|
|
719
|
+
justifyContent: "space-between",
|
|
720
|
+
padding: 20,
|
|
721
|
+
borderRadius: 10,
|
|
722
|
+
width: "100%",
|
|
723
|
+
background: t.raised,
|
|
724
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
725
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
726
|
+
border: "none",
|
|
727
|
+
cursor: "pointer",
|
|
728
|
+
transition: "background 0.1s"
|
|
729
|
+
},
|
|
730
|
+
children: [
|
|
731
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
732
|
+
/* @__PURE__ */ e("div", { style: {
|
|
733
|
+
width: 4,
|
|
734
|
+
height: 4,
|
|
735
|
+
borderRadius: 9,
|
|
736
|
+
background: t.green
|
|
737
|
+
} }),
|
|
738
|
+
/* @__PURE__ */ e("span", { style: { ...a(15, t.primary), fontVariantNumeric: "tabular-nums" }, children: o })
|
|
739
|
+
] }),
|
|
740
|
+
/* @__PURE__ */ e("span", { style: a(15, t.secondary), children: "Switch" })
|
|
741
|
+
]
|
|
742
|
+
}
|
|
743
|
+
);
|
|
744
|
+
}
|
|
745
|
+
function Yt() {
|
|
746
|
+
return /* @__PURE__ */ e("div", { style: {
|
|
747
|
+
flexShrink: 0,
|
|
748
|
+
width: 44,
|
|
749
|
+
height: 44,
|
|
750
|
+
borderRadius: 10,
|
|
751
|
+
background: "color-mix(in srgb, var(--c-brand) 20%, transparent)",
|
|
752
|
+
borderTop: "1px solid rgba(255,255,255,0.2)",
|
|
753
|
+
boxShadow: "0 4px 8px rgba(0,0,0,0.07), inset 0 -1px 0 rgba(0,0,0,0.2)",
|
|
754
|
+
display: "flex",
|
|
755
|
+
alignItems: "center",
|
|
756
|
+
justifyContent: "center"
|
|
757
|
+
}, children: /* @__PURE__ */ i("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", style: { color: "var(--c-brand)" }, children: [
|
|
758
|
+
/* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
759
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "5", stroke: "currentColor", strokeWidth: "1.5", fill: "none" })
|
|
760
|
+
] }) });
|
|
761
|
+
}
|
|
762
|
+
function jt() {
|
|
763
|
+
return /* @__PURE__ */ e("div", { style: {
|
|
764
|
+
flexShrink: 0,
|
|
765
|
+
width: 44,
|
|
766
|
+
height: 44,
|
|
767
|
+
borderRadius: 10,
|
|
768
|
+
background: `color-mix(in srgb, ${t.secondary} 15%, transparent)`,
|
|
769
|
+
borderTop: "1px solid rgba(255,255,255,0.2)",
|
|
770
|
+
boxShadow: "0 4px 8px rgba(0,0,0,0.07), inset 0 -1px 0 rgba(0,0,0,0.2)",
|
|
771
|
+
display: "flex",
|
|
772
|
+
alignItems: "center",
|
|
773
|
+
justifyContent: "center"
|
|
774
|
+
}, children: /* @__PURE__ */ i("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", style: { color: t.secondary }, children: [
|
|
775
|
+
/* @__PURE__ */ e("path", { d: "M4 3h8a2 2 0 0 1 2 2v12H6a2 2 0 0 1-2-2V3z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
|
|
776
|
+
/* @__PURE__ */ e("path", { d: "M4 15a2 2 0 0 1 2-2h8", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
777
|
+
/* @__PURE__ */ e("path", { d: "M7 7h4M7 10h3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
778
|
+
] }) });
|
|
779
|
+
}
|
|
780
|
+
function Vt() {
|
|
781
|
+
return /* @__PURE__ */ e("div", { style: {
|
|
782
|
+
flexShrink: 0,
|
|
783
|
+
width: 44,
|
|
784
|
+
height: 44,
|
|
785
|
+
borderRadius: 10,
|
|
786
|
+
background: "color-mix(in srgb, #0d9c5e 20%, transparent)",
|
|
787
|
+
borderTop: "1px solid rgba(255,255,255,0.2)",
|
|
788
|
+
boxShadow: "0 4px 8px rgba(0,0,0,0.07), inset 0 -1px 0 rgba(0,0,0,0.2)",
|
|
789
|
+
display: "flex",
|
|
790
|
+
alignItems: "center",
|
|
791
|
+
justifyContent: "center"
|
|
792
|
+
}, children: /* @__PURE__ */ i("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", style: { color: "#0d9c5e" }, children: [
|
|
793
|
+
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "14", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
794
|
+
/* @__PURE__ */ e("path", { d: "M3 9H17", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
795
|
+
/* @__PURE__ */ e("circle", { cx: "13", cy: "12.5", r: "1", fill: "currentColor" })
|
|
796
|
+
] }) });
|
|
797
|
+
}
|
|
798
|
+
function Gt({ validatorName: r }) {
|
|
799
|
+
const n = f((m) => m.navigate), o = W((m) => m.walletBalances), d = W((m) => m.userStakeAccounts), u = W((m) => m.userStakeAccountsLoading), l = J((m) => m.publicKey), { disconnect: h } = ge(), g = We(), { totalPtSol: b, maturedPtSol: c } = Y(() => {
|
|
800
|
+
const m = Date.now() / 1e3;
|
|
801
|
+
let S = 0, E = 0;
|
|
802
|
+
for (const [C, I] of Object.entries(o)) {
|
|
803
|
+
if (I <= 0) continue;
|
|
804
|
+
const B = g.get(C);
|
|
805
|
+
if (!B) continue;
|
|
806
|
+
const A = I / Te;
|
|
807
|
+
S += A;
|
|
808
|
+
const R = Number(V[B.maturityId].maturity_timestamp);
|
|
809
|
+
m >= R && (E += A);
|
|
810
|
+
}
|
|
811
|
+
return { totalPtSol: S, maturedPtSol: E };
|
|
812
|
+
}, [o, g]), p = Y(() => {
|
|
813
|
+
let m = 0;
|
|
814
|
+
for (const S of d)
|
|
815
|
+
S.state === "active" && (m += S.lamports);
|
|
816
|
+
return m / Te;
|
|
817
|
+
}, [d]), x = b > 0, k = p > 0, v = Object.values(o).some((m) => m > 0), w = u && d.length === 0 && !v, M = x ? c > 0 ? `${O(c)} PT ready to redeem` : `${O(b)} PT locked` : "No PT positions", s = k ? `${O(p, 2)} SOL across active stake` : "No active stake";
|
|
818
|
+
return /* @__PURE__ */ i(ie, { style: { borderRadius: "10px 10px 0 0" }, children: [
|
|
819
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
820
|
+
/* @__PURE__ */ e("p", { style: { ...U(32, t.primary), letterSpacing: "-0.02em", lineHeight: 1.5 }, children: "Welcome back" }),
|
|
821
|
+
/* @__PURE__ */ e("p", { style: a(15, t.secondary), children: w ? "Loading your positions…" : x && k ? "We found active staked SOL positions and PTs ready to redeem. What would you like to do?" : x ? "We found PTs ready to redeem. What would you like to do?" : k ? "We found active staked SOL positions. Sell your future rewards upfront." : `Stake SOL with ${r ?? "your validator"} to get started.` })
|
|
822
|
+
] }),
|
|
823
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 10, marginTop: 8 }, children: w ? /* @__PURE__ */ i(N, { children: [
|
|
824
|
+
/* @__PURE__ */ e(Pe, {}),
|
|
825
|
+
/* @__PURE__ */ e(Pe, {})
|
|
826
|
+
] }) : /* @__PURE__ */ i(N, { children: [
|
|
827
|
+
/* @__PURE__ */ e(
|
|
828
|
+
me,
|
|
829
|
+
{
|
|
830
|
+
icon: /* @__PURE__ */ e(Vt, {}),
|
|
831
|
+
label: "Sell future rewards",
|
|
832
|
+
sub: s,
|
|
833
|
+
disabled: !k,
|
|
834
|
+
onClick: () => n("select-position")
|
|
835
|
+
}
|
|
836
|
+
),
|
|
837
|
+
/* @__PURE__ */ e(
|
|
838
|
+
me,
|
|
839
|
+
{
|
|
840
|
+
icon: /* @__PURE__ */ e(Yt, {}),
|
|
841
|
+
label: "Redeem PTs",
|
|
842
|
+
sub: M,
|
|
843
|
+
subColor: c > 0 ? t.green : void 0,
|
|
844
|
+
disabled: !x,
|
|
845
|
+
onClick: () => n("redeem-list")
|
|
846
|
+
}
|
|
847
|
+
),
|
|
848
|
+
/* @__PURE__ */ e(
|
|
849
|
+
me,
|
|
850
|
+
{
|
|
851
|
+
icon: /* @__PURE__ */ e(jt, {}),
|
|
852
|
+
label: "Learn more",
|
|
853
|
+
sub: "Read the docs",
|
|
854
|
+
onClick: () => window.open("https://docs.pye.fi/", "_blank", "noopener,noreferrer")
|
|
855
|
+
}
|
|
856
|
+
)
|
|
857
|
+
] }) }),
|
|
858
|
+
/* @__PURE__ */ e(q, {}),
|
|
859
|
+
l && /* @__PURE__ */ e(
|
|
860
|
+
Nt,
|
|
861
|
+
{
|
|
862
|
+
address: l,
|
|
863
|
+
onSwitch: () => {
|
|
864
|
+
h().catch(() => {
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
)
|
|
869
|
+
] });
|
|
870
|
+
}
|
|
871
|
+
function Kt({ name: r, iconUrl: n, connecting: o, onConnect: d }) {
|
|
872
|
+
const u = o === r, l = o != null && !u;
|
|
873
|
+
return /* @__PURE__ */ i(
|
|
874
|
+
"div",
|
|
875
|
+
{
|
|
876
|
+
className: o ? void 0 : "pye-hoverable",
|
|
877
|
+
onClick: () => !o && d(r),
|
|
878
|
+
style: {
|
|
879
|
+
display: "flex",
|
|
880
|
+
alignItems: "center",
|
|
881
|
+
justifyContent: "space-between",
|
|
882
|
+
padding: 12,
|
|
883
|
+
borderRadius: 8,
|
|
884
|
+
background: t.raised,
|
|
885
|
+
boxShadow: `inset 0 1px 0 ${t.highlight}, inset 0 -1px 0 ${t.shadow}`,
|
|
886
|
+
cursor: o ? "default" : "pointer",
|
|
887
|
+
opacity: l ? 0.4 : 1,
|
|
888
|
+
transition: "background 0.1s, opacity 0.2s"
|
|
889
|
+
},
|
|
890
|
+
children: [
|
|
891
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
892
|
+
n ? /* @__PURE__ */ e("img", { src: n, alt: "", style: { width: 32, height: 32, borderRadius: 8, objectFit: "cover" } }) : /* @__PURE__ */ e(Ht, { name: r, size: 32 }),
|
|
893
|
+
/* @__PURE__ */ e("p", { style: a(15, t.primary), children: r })
|
|
894
|
+
] }),
|
|
895
|
+
/* @__PURE__ */ e("p", { style: a(14, u ? t.purple : t.secondary), children: u ? "Connecting…" : "Detected" })
|
|
896
|
+
]
|
|
897
|
+
}
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
function Jt() {
|
|
901
|
+
const { wallets: r, wallet: n, select: o, connecting: d } = ge(), u = f((p) => p.navigate), l = J((p) => p.status);
|
|
902
|
+
j(() => {
|
|
903
|
+
l === "connected" && u("welcome");
|
|
904
|
+
}, [l, u]);
|
|
905
|
+
const h = d ? (n == null ? void 0 : n.adapter.name) ?? null : null, b = [...Array.from(
|
|
906
|
+
new Map(r.map((p) => [p.adapter.name, p])).values()
|
|
907
|
+
)].sort((p, x) => {
|
|
908
|
+
const k = p.readyState === "Installed" ? 0 : 1, v = x.readyState === "Installed" ? 0 : 1;
|
|
909
|
+
return k - v;
|
|
910
|
+
}), c = (p) => {
|
|
911
|
+
const x = r.find((k) => k.adapter.name === p);
|
|
912
|
+
x && o(x.adapter.name);
|
|
913
|
+
};
|
|
914
|
+
return /* @__PURE__ */ i(N, { children: [
|
|
915
|
+
/* @__PURE__ */ e(
|
|
916
|
+
ye,
|
|
917
|
+
{
|
|
918
|
+
title: "Connect your wallet",
|
|
919
|
+
subtitle: "Connect to see your existing stake and SOL balance."
|
|
920
|
+
}
|
|
921
|
+
),
|
|
922
|
+
/* @__PURE__ */ e(qe, { children: b.map((p) => /* @__PURE__ */ e(
|
|
923
|
+
Kt,
|
|
924
|
+
{
|
|
925
|
+
name: p.adapter.name,
|
|
926
|
+
iconUrl: p.adapter.icon,
|
|
927
|
+
connecting: h,
|
|
928
|
+
onConnect: c
|
|
929
|
+
},
|
|
930
|
+
p.adapter.name
|
|
931
|
+
)) }),
|
|
932
|
+
/* @__PURE__ */ e(q, {})
|
|
933
|
+
] });
|
|
934
|
+
}
|
|
935
|
+
const qt = 0.07, fe = 100;
|
|
936
|
+
function zt() {
|
|
937
|
+
const r = f((c) => c.navigate), o = J((c) => c.status) === "connected", d = ve((c) => c.markets), u = xt((c) => c.apyByVoteAccount), l = Y(() => {
|
|
938
|
+
const c = pt();
|
|
939
|
+
if (c.voteAccount && u[c.voteAccount] != null)
|
|
940
|
+
return u[c.voteAccount];
|
|
941
|
+
const p = Object.values(u);
|
|
942
|
+
return p.length > 0 ? p.reduce((x, k) => x + k, 0) / p.length : qt;
|
|
943
|
+
}, [u]), { sellToday: h, holdToUnlock: g, maturityLabel: b } = Y(() => {
|
|
944
|
+
let c = null;
|
|
945
|
+
for (const [M, s] of Object.entries(d))
|
|
946
|
+
if (M.endsWith("-q32026-RT") && s.bestBidPrice != null) {
|
|
947
|
+
c = s.bestBidPrice;
|
|
948
|
+
break;
|
|
949
|
+
}
|
|
950
|
+
const p = Number(V.q32026.maturity_timestamp), x = Date.now() / 1e3, k = Math.max(0, (p - x) / (365 * 24 * 60 * 60)), v = l * k * fe;
|
|
951
|
+
return {
|
|
952
|
+
sellToday: c != null ? c * fe : v * 0.96,
|
|
953
|
+
holdToUnlock: v,
|
|
954
|
+
maturityLabel: V.q32026.human_readable
|
|
955
|
+
};
|
|
956
|
+
}, [d, l]);
|
|
957
|
+
return /* @__PURE__ */ i(N, { children: [
|
|
958
|
+
/* @__PURE__ */ e("p", { style: { ...U(45, t.primary), letterSpacing: "-0.02em" }, children: "Get your future staking rewards today." }),
|
|
959
|
+
/* @__PURE__ */ e(q, {}),
|
|
960
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 24 }, children: [
|
|
961
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
962
|
+
/* @__PURE__ */ i("p", { style: a(12, t.primary), children: [
|
|
963
|
+
"Example: Stake ",
|
|
964
|
+
fe,
|
|
965
|
+
" SOL for 6 months"
|
|
966
|
+
] }),
|
|
967
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", gap: 8 }, children: [
|
|
968
|
+
/* @__PURE__ */ i("div", { style: {
|
|
969
|
+
flex: 1,
|
|
970
|
+
borderRadius: 6,
|
|
971
|
+
padding: 12,
|
|
972
|
+
background: t.raised,
|
|
973
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
974
|
+
boxShadow: `0 4px 8px rgba(0,0,0,0.07), inset 0 -1px 0 ${t.shadow}`
|
|
975
|
+
}, children: [
|
|
976
|
+
/* @__PURE__ */ e("p", { style: a(12, t.secondary), children: "Sell rewards today" }),
|
|
977
|
+
/* @__PURE__ */ i("p", { style: { ...U(24, t.green), fontVariantNumeric: "lining-nums tabular-nums", lineHeight: 1.2, margin: "4px 0 2px" }, children: [
|
|
978
|
+
"+",
|
|
979
|
+
O(h),
|
|
980
|
+
" SOL"
|
|
981
|
+
] }),
|
|
982
|
+
/* @__PURE__ */ e("p", { style: a(12, t.secondary), children: "Yours now" })
|
|
983
|
+
] }),
|
|
984
|
+
/* @__PURE__ */ i("div", { style: {
|
|
985
|
+
flex: 1,
|
|
986
|
+
borderRadius: 6,
|
|
987
|
+
padding: 12,
|
|
988
|
+
background: t.lowered,
|
|
989
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
990
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`
|
|
991
|
+
}, children: [
|
|
992
|
+
/* @__PURE__ */ e("p", { style: a(12, t.secondary), children: "Hold to unlock" }),
|
|
993
|
+
/* @__PURE__ */ i("p", { style: { ...U(24, t.primary), fontVariantNumeric: "lining-nums tabular-nums", lineHeight: 1.2, margin: "4px 0 2px" }, children: [
|
|
994
|
+
"+",
|
|
995
|
+
O(g)
|
|
996
|
+
] }),
|
|
997
|
+
/* @__PURE__ */ i("p", { style: a(12, t.secondary), children: [
|
|
998
|
+
"Available ",
|
|
999
|
+
b
|
|
1000
|
+
] })
|
|
1001
|
+
] })
|
|
1002
|
+
] })
|
|
1003
|
+
] }),
|
|
1004
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 12 }, children: [
|
|
1005
|
+
/* @__PURE__ */ e(
|
|
1006
|
+
le,
|
|
1007
|
+
{
|
|
1008
|
+
label: o ? "Continue" : "Connect Wallet",
|
|
1009
|
+
onClick: () => r(o ? "select-position" : "connect-wallet"),
|
|
1010
|
+
purple: !0
|
|
1011
|
+
}
|
|
1012
|
+
),
|
|
1013
|
+
/* @__PURE__ */ e(
|
|
1014
|
+
"a",
|
|
1015
|
+
{
|
|
1016
|
+
href: "https://docs.pye.fi/",
|
|
1017
|
+
target: "_blank",
|
|
1018
|
+
rel: "noopener noreferrer",
|
|
1019
|
+
style: { ...a(12, t.secondary), textDecoration: "none" },
|
|
1020
|
+
children: "Learn more — read the docs"
|
|
1021
|
+
}
|
|
1022
|
+
)
|
|
1023
|
+
] })
|
|
1024
|
+
] })
|
|
1025
|
+
] });
|
|
1026
|
+
}
|
|
1027
|
+
const Oe = 1e9;
|
|
1028
|
+
function Zt() {
|
|
1029
|
+
const r = f((l) => l.navigate), n = f((l) => l.selectStakeAccount), d = W((l) => l.userStakeAccounts).filter((l) => l.state === "active"), u = (l, h, g, b, c, p) => {
|
|
1030
|
+
n(l, h / Oe, g, b, c, p), r("choose-amount");
|
|
1031
|
+
};
|
|
1032
|
+
return /* @__PURE__ */ i(N, { children: [
|
|
1033
|
+
/* @__PURE__ */ e(
|
|
1034
|
+
ye,
|
|
1035
|
+
{
|
|
1036
|
+
title: "Select a position",
|
|
1037
|
+
subtitle: "We'll sell the future rewards from this position upfront."
|
|
1038
|
+
}
|
|
1039
|
+
),
|
|
1040
|
+
/* @__PURE__ */ e("div", { style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: /* @__PURE__ */ e(qe, { children: d.map((l) => /* @__PURE__ */ e(
|
|
1041
|
+
Qt,
|
|
1042
|
+
{
|
|
1043
|
+
icon: /* @__PURE__ */ e(
|
|
1044
|
+
"img",
|
|
1045
|
+
{
|
|
1046
|
+
src: l.validatorLogo ?? l.validatorIcon,
|
|
1047
|
+
alt: l.validatorName,
|
|
1048
|
+
onError: (h) => {
|
|
1049
|
+
const g = h.currentTarget;
|
|
1050
|
+
g.src !== l.validatorIcon && (g.src = l.validatorIcon);
|
|
1051
|
+
},
|
|
1052
|
+
style: {
|
|
1053
|
+
width: 36,
|
|
1054
|
+
height: 36,
|
|
1055
|
+
borderRadius: "50%",
|
|
1056
|
+
flexShrink: 0,
|
|
1057
|
+
objectFit: "cover",
|
|
1058
|
+
boxShadow: "0px 4px 8px 0px rgba(0,0,0,0.07)"
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
),
|
|
1062
|
+
label: "Staked SOL",
|
|
1063
|
+
sub: l.validatorName || `${l.pubkey.slice(0, 8)}...`,
|
|
1064
|
+
amount: (l.lamports / Oe).toFixed(4),
|
|
1065
|
+
onClick: () => u(l.pubkey, l.lamports, l.validatorName, l.validatorIcon, l.validatorVoteAccount, l.validatorAltPubkey)
|
|
1066
|
+
},
|
|
1067
|
+
l.pubkey
|
|
1068
|
+
)) }) })
|
|
1069
|
+
] });
|
|
1070
|
+
}
|
|
1071
|
+
const Ut = `
|
|
1072
|
+
.pye-amount-slider {
|
|
1073
|
+
-webkit-appearance: none;
|
|
1074
|
+
appearance: none;
|
|
1075
|
+
width: 100%;
|
|
1076
|
+
height: 4px;
|
|
1077
|
+
border-radius: 999px;
|
|
1078
|
+
background: transparent;
|
|
1079
|
+
outline: none;
|
|
1080
|
+
cursor: pointer;
|
|
1081
|
+
}
|
|
1082
|
+
.pye-amount-slider::-webkit-slider-runnable-track {
|
|
1083
|
+
height: 4px;
|
|
1084
|
+
border-radius: 999px;
|
|
1085
|
+
background: linear-gradient(to right, var(--c-brand) var(--pye-slider-pct, 0%), var(--c-shadow) var(--pye-slider-pct, 0%));
|
|
1086
|
+
}
|
|
1087
|
+
.pye-amount-slider::-moz-range-track {
|
|
1088
|
+
height: 4px;
|
|
1089
|
+
border-radius: 999px;
|
|
1090
|
+
background: var(--c-shadow);
|
|
1091
|
+
}
|
|
1092
|
+
.pye-amount-slider::-moz-range-progress {
|
|
1093
|
+
height: 4px;
|
|
1094
|
+
border-radius: 999px;
|
|
1095
|
+
background: var(--c-brand);
|
|
1096
|
+
}
|
|
1097
|
+
.pye-amount-slider::-webkit-slider-thumb {
|
|
1098
|
+
-webkit-appearance: none;
|
|
1099
|
+
appearance: none;
|
|
1100
|
+
width: 18px;
|
|
1101
|
+
height: 18px;
|
|
1102
|
+
border-radius: 50%;
|
|
1103
|
+
background: var(--c-surface);
|
|
1104
|
+
border: 2px solid var(--c-brand);
|
|
1105
|
+
margin-top: -7px;
|
|
1106
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.15);
|
|
1107
|
+
cursor: pointer;
|
|
1108
|
+
}
|
|
1109
|
+
.pye-amount-slider::-moz-range-thumb {
|
|
1110
|
+
width: 18px;
|
|
1111
|
+
height: 18px;
|
|
1112
|
+
border-radius: 50%;
|
|
1113
|
+
background: var(--c-surface);
|
|
1114
|
+
border: 2px solid var(--c-brand);
|
|
1115
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.15);
|
|
1116
|
+
cursor: pointer;
|
|
1117
|
+
}
|
|
1118
|
+
`;
|
|
1119
|
+
function Xt() {
|
|
1120
|
+
const r = f((A) => A.navigate), n = f((A) => A.depositAmount), o = f((A) => A.setDepositAmount), d = f((A) => A.selectedStakeAccountBalance), u = f((A) => A.selectedStakeAccountPubkey), l = f((A) => A.selectedValidatorName), h = d, g = parseFloat(n) || 0, b = [0.25, 0.5, 0.75, 1], c = K(null);
|
|
1121
|
+
j(() => () => {
|
|
1122
|
+
c.current != null && cancelAnimationFrame(c.current);
|
|
1123
|
+
}, []);
|
|
1124
|
+
const p = (A) => (Math.floor(A * 1e4) / 1e4).toFixed(4), x = (A) => {
|
|
1125
|
+
var F;
|
|
1126
|
+
c.current != null && cancelAnimationFrame(c.current);
|
|
1127
|
+
const R = g;
|
|
1128
|
+
if (Math.abs(A - R) < 1e-9) return;
|
|
1129
|
+
if ((F = window.matchMedia) == null ? void 0 : F.call(window, "(prefers-reduced-motion: reduce)").matches) {
|
|
1130
|
+
o(p(A));
|
|
1131
|
+
return;
|
|
1132
|
+
}
|
|
1133
|
+
const D = 500, X = performance.now(), ce = (_) => 1 - Math.pow(1 - _, 3);
|
|
1134
|
+
let z = "";
|
|
1135
|
+
const $ = (_) => {
|
|
1136
|
+
const ee = Math.min(1, (_ - X) / D), Q = R + (A - R) * ce(ee), ae = p(Q);
|
|
1137
|
+
ae !== z && (z = ae, o(ae)), ee < 1 ? c.current = requestAnimationFrame($) : c.current = null;
|
|
1138
|
+
};
|
|
1139
|
+
c.current = requestAnimationFrame($);
|
|
1140
|
+
}, k = u === "liquid-sol", v = 0.01;
|
|
1141
|
+
let w = null, M = null;
|
|
1142
|
+
n && g <= 0 && (w = "Amount must be greater than 0"), n && g > h && (w = `Maximum available is ${h} SOL`), !w && k && g > 0 && g >= h - v && (M = "This leaves very little SOL for transaction fees");
|
|
1143
|
+
const s = !!n && !w && g > 0, m = h > 0 ? h : 1, S = Math.min(g, m), E = h > 0 ? Math.min(100, S / h * 100) : 0, C = Math.max(1e-4, h / 1e3), I = O(h), B = l ? `${l} balance detected: ${I} SOL.` : `Balance detected: ${I} SOL.`;
|
|
1144
|
+
return /* @__PURE__ */ i(N, { children: [
|
|
1145
|
+
/* @__PURE__ */ e("style", { children: Ut }),
|
|
1146
|
+
/* @__PURE__ */ e(ye, { title: "How much of your stake do you want to sell rewards for?", subtitle: B }),
|
|
1147
|
+
/* @__PURE__ */ i("div", { style: {
|
|
1148
|
+
background: t.raised,
|
|
1149
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
1150
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
1151
|
+
borderRadius: 8,
|
|
1152
|
+
padding: 16,
|
|
1153
|
+
marginTop: 8,
|
|
1154
|
+
display: "flex",
|
|
1155
|
+
flexDirection: "column",
|
|
1156
|
+
gap: 16
|
|
1157
|
+
}, children: [
|
|
1158
|
+
/* @__PURE__ */ i("div", { style: {
|
|
1159
|
+
display: "flex",
|
|
1160
|
+
alignItems: "center",
|
|
1161
|
+
justifyContent: "space-between",
|
|
1162
|
+
background: t.bg,
|
|
1163
|
+
borderRadius: 8,
|
|
1164
|
+
padding: "8px 16px",
|
|
1165
|
+
borderTop: `1px solid ${w ? t.red : t.shadow}`,
|
|
1166
|
+
boxShadow: w ? `inset 0 -1px 0 ${t.highlight}, 0 0 0 1px ${t.red}` : `inset 0 -1px 0 ${t.highlight}`
|
|
1167
|
+
}, children: [
|
|
1168
|
+
/* @__PURE__ */ e(
|
|
1169
|
+
"input",
|
|
1170
|
+
{
|
|
1171
|
+
type: "number",
|
|
1172
|
+
value: n,
|
|
1173
|
+
onChange: (A) => o(A.target.value),
|
|
1174
|
+
min: 1e-4,
|
|
1175
|
+
max: h,
|
|
1176
|
+
placeholder: "0",
|
|
1177
|
+
style: {
|
|
1178
|
+
background: "none",
|
|
1179
|
+
border: "none",
|
|
1180
|
+
outline: "none",
|
|
1181
|
+
...a(24, t.green, 500),
|
|
1182
|
+
width: "100%",
|
|
1183
|
+
fontVariantNumeric: "tabular-nums"
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
),
|
|
1187
|
+
/* @__PURE__ */ e("span", { style: a(15, t.secondary), children: "SOL" })
|
|
1188
|
+
] }),
|
|
1189
|
+
/* @__PURE__ */ e(
|
|
1190
|
+
"input",
|
|
1191
|
+
{
|
|
1192
|
+
type: "range",
|
|
1193
|
+
className: "pye-amount-slider",
|
|
1194
|
+
min: 0,
|
|
1195
|
+
max: m,
|
|
1196
|
+
step: C,
|
|
1197
|
+
value: S,
|
|
1198
|
+
onChange: (A) => {
|
|
1199
|
+
const R = p(parseFloat(A.target.value));
|
|
1200
|
+
R !== n && o(R);
|
|
1201
|
+
},
|
|
1202
|
+
style: { "--pye-slider-pct": `${E}%` }
|
|
1203
|
+
}
|
|
1204
|
+
),
|
|
1205
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", gap: 8 }, children: b.map((A) => /* @__PURE__ */ i(
|
|
1206
|
+
"button",
|
|
1207
|
+
{
|
|
1208
|
+
type: "button",
|
|
1209
|
+
className: "pye-pill",
|
|
1210
|
+
onClick: () => {
|
|
1211
|
+
const R = A === 1 ? k ? Math.max(0, h - v) : h : h * A;
|
|
1212
|
+
x(R);
|
|
1213
|
+
},
|
|
1214
|
+
style: {
|
|
1215
|
+
flex: 1,
|
|
1216
|
+
borderRadius: 8,
|
|
1217
|
+
border: "none",
|
|
1218
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
1219
|
+
cursor: "pointer",
|
|
1220
|
+
background: t.surface,
|
|
1221
|
+
...a(14, t.secondary),
|
|
1222
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
1223
|
+
padding: "8px 4px",
|
|
1224
|
+
transition: "background 0.1s"
|
|
1225
|
+
},
|
|
1226
|
+
children: [
|
|
1227
|
+
A * 100,
|
|
1228
|
+
"%"
|
|
1229
|
+
]
|
|
1230
|
+
},
|
|
1231
|
+
A
|
|
1232
|
+
)) })
|
|
1233
|
+
] }),
|
|
1234
|
+
/* @__PURE__ */ e(Wt, { message: w ?? "" }),
|
|
1235
|
+
!w && M && /* @__PURE__ */ e("p", { style: { ...a(14, t.red), marginTop: 4 }, children: M }),
|
|
1236
|
+
/* @__PURE__ */ e(q, {}),
|
|
1237
|
+
/* @__PURE__ */ e(
|
|
1238
|
+
le,
|
|
1239
|
+
{
|
|
1240
|
+
label: "Continue",
|
|
1241
|
+
onClick: () => r("choose-duration"),
|
|
1242
|
+
disabled: !s,
|
|
1243
|
+
purple: !0
|
|
1244
|
+
}
|
|
1245
|
+
)
|
|
1246
|
+
] });
|
|
1247
|
+
}
|
|
1248
|
+
const $t = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
1249
|
+
function G({ value: r, style: n, duration: o = 1200, stagger: d = 80 }) {
|
|
1250
|
+
var g;
|
|
1251
|
+
const u = typeof window < "u" && ((g = window.matchMedia) == null ? void 0 : g.call(window, "(prefers-reduced-motion: reduce)").matches), l = [...r];
|
|
1252
|
+
let h = 0;
|
|
1253
|
+
return /* @__PURE__ */ e(
|
|
1254
|
+
"span",
|
|
1255
|
+
{
|
|
1256
|
+
style: {
|
|
1257
|
+
display: "inline-flex",
|
|
1258
|
+
alignItems: "baseline",
|
|
1259
|
+
fontVariantNumeric: "lining-nums tabular-nums",
|
|
1260
|
+
whiteSpace: "pre",
|
|
1261
|
+
...n
|
|
1262
|
+
},
|
|
1263
|
+
children: l.map((b, c) => {
|
|
1264
|
+
if (!/\d/.test(b))
|
|
1265
|
+
return /* @__PURE__ */ e("span", { children: b }, c);
|
|
1266
|
+
const p = u ? 0 : h * d;
|
|
1267
|
+
return h++, /* @__PURE__ */ e(
|
|
1268
|
+
_t,
|
|
1269
|
+
{
|
|
1270
|
+
digit: Number(b),
|
|
1271
|
+
delay: p,
|
|
1272
|
+
duration: u ? 0 : o
|
|
1273
|
+
},
|
|
1274
|
+
c
|
|
1275
|
+
);
|
|
1276
|
+
})
|
|
1277
|
+
}
|
|
1278
|
+
);
|
|
1279
|
+
}
|
|
1280
|
+
function _t({ digit: r, delay: n, duration: o }) {
|
|
1281
|
+
const [d, u] = he(0), l = K(null);
|
|
1282
|
+
return j(() => (l.current = requestAnimationFrame(() => u(r)), () => {
|
|
1283
|
+
l.current != null && cancelAnimationFrame(l.current);
|
|
1284
|
+
}), [r]), /* @__PURE__ */ e(
|
|
1285
|
+
"span",
|
|
1286
|
+
{
|
|
1287
|
+
"aria-hidden": !0,
|
|
1288
|
+
style: {
|
|
1289
|
+
display: "inline-block",
|
|
1290
|
+
height: "1em",
|
|
1291
|
+
lineHeight: 1,
|
|
1292
|
+
overflow: "hidden",
|
|
1293
|
+
verticalAlign: "baseline"
|
|
1294
|
+
},
|
|
1295
|
+
children: /* @__PURE__ */ e(
|
|
1296
|
+
"span",
|
|
1297
|
+
{
|
|
1298
|
+
style: {
|
|
1299
|
+
display: "flex",
|
|
1300
|
+
flexDirection: "column",
|
|
1301
|
+
transform: `translateY(-${d}em)`,
|
|
1302
|
+
transition: o === 0 ? "none" : `transform ${o}ms cubic-bezier(0.2, 0.9, 0.2, 1) ${n}ms`,
|
|
1303
|
+
willChange: "transform"
|
|
1304
|
+
},
|
|
1305
|
+
children: $t.map((h) => /* @__PURE__ */ e("span", { style: { height: "1em", lineHeight: 1 }, children: h }, h))
|
|
1306
|
+
}
|
|
1307
|
+
)
|
|
1308
|
+
}
|
|
1309
|
+
);
|
|
1310
|
+
}
|
|
1311
|
+
const en = {
|
|
1312
|
+
q22026: { label: "30 Jun 2026", pts: null },
|
|
1313
|
+
q32026: { label: "30 Sep 2026", pts: "2x points" },
|
|
1314
|
+
q42026: { label: "31 Dec 2026", pts: "3x points" },
|
|
1315
|
+
q12026: { label: "31 Mar 2026", pts: null }
|
|
1316
|
+
}, tn = ["q12026", "q22026", "q32026", "q42026"], nn = 2880 * 60;
|
|
1317
|
+
function rn() {
|
|
1318
|
+
const r = Date.now() / 1e3;
|
|
1319
|
+
return tn.filter((n) => Number(V[n].maturity_timestamp) - r > nn);
|
|
1320
|
+
}
|
|
1321
|
+
function on() {
|
|
1322
|
+
const { connection: r } = Ae(), n = f((s) => s.navigate), o = f((s) => s.selectedMaturityId), d = f((s) => s.setSelectedMaturity), u = f((s) => s.depositAmount), l = f((s) => s.selectedValidatorVoteAccount), h = ve((s) => s.markets), [g, b] = he(null);
|
|
1323
|
+
j(() => {
|
|
1324
|
+
be(r).then(b).catch(() => {
|
|
1325
|
+
b(Date.now() / 1e3);
|
|
1326
|
+
});
|
|
1327
|
+
}, [r]);
|
|
1328
|
+
const c = Y(() => rn(), []), p = Y(() => {
|
|
1329
|
+
if (!l) return null;
|
|
1330
|
+
for (const s of c) {
|
|
1331
|
+
const m = Ne(l, s);
|
|
1332
|
+
if (m) return m.validatorId;
|
|
1333
|
+
}
|
|
1334
|
+
return null;
|
|
1335
|
+
}, [l, c]);
|
|
1336
|
+
j(() => {
|
|
1337
|
+
!o && c.length > 0 && d(c[0]);
|
|
1338
|
+
}, [o, d, c]);
|
|
1339
|
+
const x = parseFloat(u) || 0, k = g ?? Date.now() / 1e3, v = c.map((s) => {
|
|
1340
|
+
var X;
|
|
1341
|
+
const m = en[s] ?? {
|
|
1342
|
+
label: ((X = V[s]) == null ? void 0 : X.human_readable) ?? s,
|
|
1343
|
+
pts: null
|
|
1344
|
+
}, S = p ? `${p}-${s}-RT` : Object.keys(h).find((ce) => ce.endsWith(`-${s}-RT`)), E = S ? h[S] ?? null : null, C = (E == null ? void 0 : E.bestBidPrice) ?? null, I = V[s], B = xe({
|
|
1345
|
+
amountSol: x,
|
|
1346
|
+
maturity: I,
|
|
1347
|
+
nowTs: k
|
|
1348
|
+
}), A = Number(I.maturity_timestamp), R = Math.max(0, (A - k) / (365.25 * 86400)), L = C != null ? C * B : x * (Je / 100) * R, D = Ye(L);
|
|
1349
|
+
return { matId: s, ...m, bestBid: C, grossYield: L, netYield: D };
|
|
1350
|
+
}), w = (je / 100).toFixed(2), M = v.find((s) => s.matId === o);
|
|
1351
|
+
return /* @__PURE__ */ i(N, { children: [
|
|
1352
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
1353
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
1354
|
+
/* @__PURE__ */ e("p", { style: a(18, t.primary, 500), children: "Choose a staking duration" }),
|
|
1355
|
+
/* @__PURE__ */ e(Z, { position: "below", text: "Lock your stake until the chosen date. All staking rewards for the period are sold to you upfront today. Your full SOL stake is returned at maturity." })
|
|
1356
|
+
] }),
|
|
1357
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "All rewards for the period are paid to you today. Your stake is returned in full at the end." })
|
|
1358
|
+
] }),
|
|
1359
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
1360
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: v.map((s) => {
|
|
1361
|
+
const m = o === s.matId;
|
|
1362
|
+
return /* @__PURE__ */ i(
|
|
1363
|
+
"div",
|
|
1364
|
+
{
|
|
1365
|
+
className: m ? "pye-pill pye-pill--selected" : "pye-pill",
|
|
1366
|
+
onClick: () => d(s.matId),
|
|
1367
|
+
style: {
|
|
1368
|
+
width: "100%",
|
|
1369
|
+
minHeight: 48,
|
|
1370
|
+
display: "flex",
|
|
1371
|
+
alignItems: "center",
|
|
1372
|
+
justifyContent: "space-between",
|
|
1373
|
+
padding: "10px 16px",
|
|
1374
|
+
borderRadius: 8,
|
|
1375
|
+
cursor: "pointer",
|
|
1376
|
+
background: m ? t.bg : t.raised,
|
|
1377
|
+
borderTop: `1px solid ${m ? t.shadow : t.highlight}`,
|
|
1378
|
+
boxShadow: m ? `inset 0 -1px 0 ${t.highlight}` : `inset 0 -1px 0 ${t.shadow}`,
|
|
1379
|
+
transition: "background 0.1s"
|
|
1380
|
+
},
|
|
1381
|
+
children: [
|
|
1382
|
+
/* @__PURE__ */ e("span", { style: a(15, m ? t.primary : t.secondary, m ? 500 : 400), children: s.label }),
|
|
1383
|
+
Bt
|
|
1384
|
+
]
|
|
1385
|
+
},
|
|
1386
|
+
s.matId
|
|
1387
|
+
);
|
|
1388
|
+
}) }),
|
|
1389
|
+
M && /* @__PURE__ */ i(
|
|
1390
|
+
"div",
|
|
1391
|
+
{
|
|
1392
|
+
style: {
|
|
1393
|
+
background: t.lowered,
|
|
1394
|
+
borderRadius: 8,
|
|
1395
|
+
padding: 12,
|
|
1396
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
1397
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`,
|
|
1398
|
+
display: "flex",
|
|
1399
|
+
flexDirection: "column",
|
|
1400
|
+
gap: 4
|
|
1401
|
+
},
|
|
1402
|
+
children: [
|
|
1403
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "You receive today" }),
|
|
1404
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: M.netYield < 1e-4 ? /* @__PURE__ */ e(
|
|
1405
|
+
"p",
|
|
1406
|
+
{
|
|
1407
|
+
style: {
|
|
1408
|
+
...U(32, t.green),
|
|
1409
|
+
lineHeight: 1.2,
|
|
1410
|
+
fontVariantNumeric: "lining-nums tabular-nums"
|
|
1411
|
+
},
|
|
1412
|
+
children: "< 0.0001 SOL"
|
|
1413
|
+
}
|
|
1414
|
+
) : /* @__PURE__ */ e(
|
|
1415
|
+
G,
|
|
1416
|
+
{
|
|
1417
|
+
value: `+${O(M.netYield, 3)} SOL`,
|
|
1418
|
+
style: { ...U(32, t.green), lineHeight: 1.2 }
|
|
1419
|
+
}
|
|
1420
|
+
) }),
|
|
1421
|
+
/* @__PURE__ */ i("p", { style: a(12, t.muted), children: [
|
|
1422
|
+
"Quote includes a ",
|
|
1423
|
+
w,
|
|
1424
|
+
"% Pye protocol fee."
|
|
1425
|
+
] })
|
|
1426
|
+
]
|
|
1427
|
+
}
|
|
1428
|
+
)
|
|
1429
|
+
] }),
|
|
1430
|
+
/* @__PURE__ */ e(q, {}),
|
|
1431
|
+
/* @__PURE__ */ e(
|
|
1432
|
+
le,
|
|
1433
|
+
{
|
|
1434
|
+
label: "Review",
|
|
1435
|
+
onClick: () => n("review-quote"),
|
|
1436
|
+
disabled: !o,
|
|
1437
|
+
purple: !0
|
|
1438
|
+
}
|
|
1439
|
+
)
|
|
1440
|
+
] });
|
|
1441
|
+
}
|
|
1442
|
+
function ln({
|
|
1443
|
+
value: r,
|
|
1444
|
+
onChange: n
|
|
1445
|
+
}) {
|
|
1446
|
+
const o = K(null), d = 0, u = 5, l = (r - d) / (u - d) * 100, h = (p) => {
|
|
1447
|
+
const x = o.current.getBoundingClientRect(), k = Math.max(0, Math.min(p - x.left, x.width)), v = d + k / x.width * (u - d);
|
|
1448
|
+
return Math.round(v * 100) / 100;
|
|
1449
|
+
}, g = (p) => {
|
|
1450
|
+
p.preventDefault(), o.current.setPointerCapture(p.pointerId), n(h(p.clientX));
|
|
1451
|
+
}, b = (p) => {
|
|
1452
|
+
p.buttons !== 0 && n(h(p.clientX));
|
|
1453
|
+
}, c = r > 3 ? "#D93B3B" : "#0d9c5e";
|
|
1454
|
+
return /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
1455
|
+
/* @__PURE__ */ i(
|
|
1456
|
+
"div",
|
|
1457
|
+
{
|
|
1458
|
+
ref: o,
|
|
1459
|
+
onPointerDown: g,
|
|
1460
|
+
onPointerMove: b,
|
|
1461
|
+
style: { position: "relative", height: 12, display: "flex", alignItems: "center", cursor: "pointer", userSelect: "none" },
|
|
1462
|
+
children: [
|
|
1463
|
+
/* @__PURE__ */ e("div", { style: {
|
|
1464
|
+
position: "absolute",
|
|
1465
|
+
left: 0,
|
|
1466
|
+
width: `${l}%`,
|
|
1467
|
+
height: 8,
|
|
1468
|
+
background: c,
|
|
1469
|
+
borderRadius: l > 98 ? "999px" : "999px 0 0 999px",
|
|
1470
|
+
borderTop: "1px solid rgba(255,255,255,0.3)",
|
|
1471
|
+
boxShadow: "inset 0 -1px 0 rgba(0,0,0,0.2)",
|
|
1472
|
+
minWidth: l > 0 ? 4 : 0
|
|
1473
|
+
} }),
|
|
1474
|
+
/* @__PURE__ */ e("div", { style: {
|
|
1475
|
+
position: "absolute",
|
|
1476
|
+
left: `${l}%`,
|
|
1477
|
+
right: 0,
|
|
1478
|
+
height: 8,
|
|
1479
|
+
background: t.bg,
|
|
1480
|
+
borderRadius: l < 2 ? "999px" : "0 999px 999px 0",
|
|
1481
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
1482
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`
|
|
1483
|
+
} }),
|
|
1484
|
+
/* @__PURE__ */ e("div", { style: {
|
|
1485
|
+
position: "absolute",
|
|
1486
|
+
left: `calc(${l}% - 8px)`,
|
|
1487
|
+
width: 16,
|
|
1488
|
+
height: 16,
|
|
1489
|
+
borderRadius: "50%",
|
|
1490
|
+
background: "#fdfcfc",
|
|
1491
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
1492
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
1493
|
+
zIndex: 1,
|
|
1494
|
+
flexShrink: 0
|
|
1495
|
+
} })
|
|
1496
|
+
]
|
|
1497
|
+
}
|
|
1498
|
+
),
|
|
1499
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", justifyContent: "space-between" }, children: ["0%", "1%", "2%", "3%", "4%", "5%"].map((p) => /* @__PURE__ */ e("span", { style: {
|
|
1500
|
+
...a(14, t.secondary),
|
|
1501
|
+
textTransform: "uppercase",
|
|
1502
|
+
letterSpacing: "0.04em",
|
|
1503
|
+
width: 24,
|
|
1504
|
+
textAlign: p === "0%" ? "left" : p === "5%" ? "right" : "center"
|
|
1505
|
+
}, children: p }, p)) })
|
|
1506
|
+
] });
|
|
1507
|
+
}
|
|
1508
|
+
function an(r) {
|
|
1509
|
+
var g;
|
|
1510
|
+
const n = r.split("-");
|
|
1511
|
+
if (n.length < 3) return null;
|
|
1512
|
+
n.pop();
|
|
1513
|
+
const o = n.pop(), d = n.join("-"), l = (g = mt()[d]) == null ? void 0 : g[o];
|
|
1514
|
+
if (!l) return null;
|
|
1515
|
+
const h = ke[d];
|
|
1516
|
+
return {
|
|
1517
|
+
validatorId: d,
|
|
1518
|
+
maturityId: o,
|
|
1519
|
+
bondPubkey: l.pubkey,
|
|
1520
|
+
principalTokenMint: l.pt_address,
|
|
1521
|
+
yieldTokenMint: l.rt_address,
|
|
1522
|
+
voteAccount: (h == null ? void 0 : h.vote_account) ?? ""
|
|
1523
|
+
};
|
|
1524
|
+
}
|
|
1525
|
+
function sn() {
|
|
1526
|
+
var Me, Re;
|
|
1527
|
+
const { connection: r } = Ae(), n = ge(), [o, d] = he(null);
|
|
1528
|
+
j(() => {
|
|
1529
|
+
be(r).then(d).catch(() => {
|
|
1530
|
+
d(Date.now() / 1e3);
|
|
1531
|
+
});
|
|
1532
|
+
}, [r]);
|
|
1533
|
+
const u = f((y) => y.navigate), l = f((y) => y.txStatus), h = f((y) => y.txStep), g = f((y) => y.txError), b = f((y) => y.setTxStatus), c = f((y) => y.setTxStep), p = f((y) => y.setSellAmountSol), x = f((y) => y.advancedOpen), k = f((y) => y.setAdvancedOpen), v = f((y) => y.slippageBps), w = f((y) => y.setSlippageBps), M = f((y) => y.depositAmount), s = f((y) => y.selectedMaturityId), m = f((y) => y.selectedStakeAccountPubkey), S = f((y) => y.selectedStakeAccountBalance), E = f((y) => y.selectedValidatorAltPubkey), C = ve((y) => y.markets), I = W((y) => y.userStakeAccounts), B = W((y) => y.setWalletBalances), A = W((y) => y.setUserStakeAccounts), R = J((y) => y.setBalanceLamports), L = parseFloat(M) || 0, D = s ? V[s] : null, X = (D == null ? void 0 : D.human_readable) ?? "Sep 30, 2026";
|
|
1534
|
+
D && { JUN: "Q3", SEP: "Q4", DEC: "Q1", MAR: "Q2" }[D.month];
|
|
1535
|
+
const z = m !== "liquid-sol" ? I.find((y) => y.pubkey === m) : null, $ = z == null ? void 0 : z.validatorVoteAccount, F = $ && s ? Ne($, s) : null, _ = F == null ? void 0 : F.validatorId, ee = s ? _ ? `${_}-${s}-RT` : Object.keys(C).find((y) => y.endsWith(`-${s}-RT`)) : null, Q = ee ? C[ee] ?? null : null, ae = o ?? Date.now() / 1e3, pe = D ? xe({
|
|
1536
|
+
amountSol: L,
|
|
1537
|
+
maturity: D,
|
|
1538
|
+
nowTs: ae
|
|
1539
|
+
}) : 0, P = (Me = Q == null ? void 0 : Q.bids) != null && Me.length ? ut(Q.bids, pe) : null, we = (P == null ? void 0 : P.isSufficientLiquidity) ?? !1, Se = (P == null ? void 0 : P.slippageBps) ?? 0, te = (P == null ? void 0 : P.expectedFillPrice) != null ? P.expectedFillPrice * pe : pe * (Je / 100), ne = Ye(te), Ze = te - ne, Ce = (je / 100).toFixed(2), ue = v / 100, Ee = l === "loading", Ue = m === "liquid-sol" || m !== null && I.some((y) => y.pubkey === m), Xe = !!m && !!s && !Ee && we && Ue, Le = F ? null : ee ?? (s ? Object.keys(C).find((y) => y.endsWith(`-${s}-PT`)) : null), $e = Le ? an(Le) : null, H = F ? {
|
|
1540
|
+
validatorId: F.validatorId,
|
|
1541
|
+
maturityId: s,
|
|
1542
|
+
bondPubkey: F.pubkey,
|
|
1543
|
+
principalTokenMint: F.pt_address,
|
|
1544
|
+
yieldTokenMint: F.rt_address,
|
|
1545
|
+
voteAccount: $
|
|
1546
|
+
} : $e, _e = Qe(async () => {
|
|
1547
|
+
if (!m || !s) return;
|
|
1548
|
+
if (!H) throw new Error("Could not resolve bond data for this market");
|
|
1549
|
+
if (!Q) throw new Error("No RT market found for this maturity");
|
|
1550
|
+
if (!D) throw new Error("No maturity selected");
|
|
1551
|
+
b("loading"), c("depositing");
|
|
1552
|
+
const y = Math.max(te * (1 - ue / 100), 0), se = await be(r).catch(
|
|
1553
|
+
() => Date.now() / 1e3
|
|
1554
|
+
), de = xe({
|
|
1555
|
+
amountSol: L,
|
|
1556
|
+
maturity: D,
|
|
1557
|
+
nowTs: se
|
|
1558
|
+
});
|
|
1559
|
+
try {
|
|
1560
|
+
if (m === "liquid-sol") {
|
|
1561
|
+
await ht({
|
|
1562
|
+
connection: r,
|
|
1563
|
+
wallet: n,
|
|
1564
|
+
bondPubkey: H.bondPubkey,
|
|
1565
|
+
principalTokenMint: H.principalTokenMint,
|
|
1566
|
+
yieldTokenMint: H.yieldTokenMint,
|
|
1567
|
+
validatorVoteAccount: H.voteAccount,
|
|
1568
|
+
amountSol: L
|
|
1569
|
+
}), c("selling");
|
|
1570
|
+
const T = await gt({
|
|
1571
|
+
connection: r,
|
|
1572
|
+
wallet: n,
|
|
1573
|
+
marketPubkey: Q.marketPubkey,
|
|
1574
|
+
rtMint: H.yieldTokenMint,
|
|
1575
|
+
orderSizeTokens: de,
|
|
1576
|
+
minReceiveTokens: y,
|
|
1577
|
+
expectedSolOut: te
|
|
1578
|
+
});
|
|
1579
|
+
c("complete"), p(ne), b("success", T.signature), u("complete");
|
|
1580
|
+
} else {
|
|
1581
|
+
if (!E)
|
|
1582
|
+
throw new Error(
|
|
1583
|
+
"Sell Yield is not yet enabled for this validator. An Address Lookup Table hasn't been deployed yet — please contact the Pye team."
|
|
1584
|
+
);
|
|
1585
|
+
const T = await yt({
|
|
1586
|
+
connection: r,
|
|
1587
|
+
wallet: n,
|
|
1588
|
+
bondPubkey: H.bondPubkey,
|
|
1589
|
+
principalTokenMint: H.principalTokenMint,
|
|
1590
|
+
yieldTokenMint: H.yieldTokenMint,
|
|
1591
|
+
validatorVoteAccount: H.voteAccount,
|
|
1592
|
+
stakeAccountPubkey: m,
|
|
1593
|
+
amountSol: L,
|
|
1594
|
+
rtAmountToSell: de,
|
|
1595
|
+
stakeBalanceSol: S,
|
|
1596
|
+
marketPubkey: Q.marketPubkey,
|
|
1597
|
+
minReceiveTokens: y,
|
|
1598
|
+
expectedSolOut: te,
|
|
1599
|
+
altPubkey: E
|
|
1600
|
+
});
|
|
1601
|
+
c("complete"), p(ne), b("success", T.signature), u("complete");
|
|
1602
|
+
}
|
|
1603
|
+
} catch (T) {
|
|
1604
|
+
b(
|
|
1605
|
+
"error",
|
|
1606
|
+
null,
|
|
1607
|
+
T instanceof Error ? T.message : "Transaction failed"
|
|
1608
|
+
);
|
|
1609
|
+
} finally {
|
|
1610
|
+
const T = n.publicKey;
|
|
1611
|
+
r.getBalance(T, "confirmed").then(R).catch(() => {
|
|
1612
|
+
}), Ve(r, T).then(B).catch(() => {
|
|
1613
|
+
}), Ge(r, T).then(A).catch(() => {
|
|
1614
|
+
});
|
|
1615
|
+
}
|
|
1616
|
+
}, [
|
|
1617
|
+
Q,
|
|
1618
|
+
H,
|
|
1619
|
+
z,
|
|
1620
|
+
m,
|
|
1621
|
+
s,
|
|
1622
|
+
E,
|
|
1623
|
+
r,
|
|
1624
|
+
n,
|
|
1625
|
+
L,
|
|
1626
|
+
D,
|
|
1627
|
+
S,
|
|
1628
|
+
ne,
|
|
1629
|
+
te,
|
|
1630
|
+
ue,
|
|
1631
|
+
b,
|
|
1632
|
+
c,
|
|
1633
|
+
p,
|
|
1634
|
+
u,
|
|
1635
|
+
R,
|
|
1636
|
+
B,
|
|
1637
|
+
A
|
|
1638
|
+
]);
|
|
1639
|
+
return /* @__PURE__ */ i(N, { children: [
|
|
1640
|
+
/* @__PURE__ */ e(ye, { title: "Approve in your wallet" }),
|
|
1641
|
+
(() => {
|
|
1642
|
+
const y = [
|
|
1643
|
+
{
|
|
1644
|
+
key: "receive",
|
|
1645
|
+
left: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
|
|
1646
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "You receive today" }),
|
|
1647
|
+
/* @__PURE__ */ e(Z, { text: "Estimated upfront payout based on current market rates, net of fees. The final amount is confirmed when your order fills on the Pye orderbook." })
|
|
1648
|
+
] }),
|
|
1649
|
+
right: /* @__PURE__ */ e(
|
|
1650
|
+
G,
|
|
1651
|
+
{
|
|
1652
|
+
value: `+${O(ne)} SOL`,
|
|
1653
|
+
style: { ...a(15, t.green, 500), whiteSpace: "nowrap", flexShrink: 0, fontVariantNumeric: "tabular-nums" }
|
|
1654
|
+
}
|
|
1655
|
+
)
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
key: "stake",
|
|
1659
|
+
left: /* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Stake amount" }),
|
|
1660
|
+
right: /* @__PURE__ */ e(
|
|
1661
|
+
G,
|
|
1662
|
+
{
|
|
1663
|
+
value: `${L} SOL`,
|
|
1664
|
+
style: { ...a(14, t.primary), whiteSpace: "nowrap", flexShrink: 0, fontVariantNumeric: "tabular-nums" }
|
|
1665
|
+
}
|
|
1666
|
+
)
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
key: "pt",
|
|
1670
|
+
left: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
|
|
1671
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "PTs you'll receive" }),
|
|
1672
|
+
/* @__PURE__ */ e(Z, { text: "Your PT is a token receipt for your staked SOL. At the redeem date, redeem it 1:1 for your full stake." })
|
|
1673
|
+
] }),
|
|
1674
|
+
right: /* @__PURE__ */ e(
|
|
1675
|
+
G,
|
|
1676
|
+
{
|
|
1677
|
+
value: `${L} PT`,
|
|
1678
|
+
style: { ...a(14, t.primary), whiteSpace: "nowrap", flexShrink: 0, fontVariantNumeric: "tabular-nums" }
|
|
1679
|
+
}
|
|
1680
|
+
)
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
key: "redeem",
|
|
1684
|
+
left: /* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Redeem date" }),
|
|
1685
|
+
right: /* @__PURE__ */ e("p", { style: { ...a(14, t.primary), whiteSpace: "nowrap", flexShrink: 0 }, children: X })
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
key: "fee",
|
|
1689
|
+
left: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
|
|
1690
|
+
/* @__PURE__ */ i("p", { style: a(14, t.secondary), children: [
|
|
1691
|
+
"Pye protocol fee (",
|
|
1692
|
+
Ce,
|
|
1693
|
+
"%)"
|
|
1694
|
+
] }),
|
|
1695
|
+
/* @__PURE__ */ e(Z, { text: `A ${Ce}% fee is taken from the SOL proceeds of your sale and routed to the Pye treasury.` })
|
|
1696
|
+
] }),
|
|
1697
|
+
right: /* @__PURE__ */ e(
|
|
1698
|
+
G,
|
|
1699
|
+
{
|
|
1700
|
+
value: `−${O(Ze)} SOL`,
|
|
1701
|
+
style: { ...a(14, t.primary), whiteSpace: "nowrap", flexShrink: 0, fontVariantNumeric: "tabular-nums" }
|
|
1702
|
+
}
|
|
1703
|
+
)
|
|
1704
|
+
}
|
|
1705
|
+
];
|
|
1706
|
+
return /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 0 }, children: y.map((se, de) => {
|
|
1707
|
+
const T = de === 0, Ie = de === y.length - 1, et = T && Ie ? 8 : T ? "8px 8px 0 0" : Ie ? "0 0 8px 8px" : 0;
|
|
1708
|
+
return /* @__PURE__ */ i(
|
|
1709
|
+
"div",
|
|
1710
|
+
{
|
|
1711
|
+
style: {
|
|
1712
|
+
background: t.lowered,
|
|
1713
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
1714
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`,
|
|
1715
|
+
borderRadius: et,
|
|
1716
|
+
padding: "12px 12px",
|
|
1717
|
+
display: "flex",
|
|
1718
|
+
alignItems: "center",
|
|
1719
|
+
justifyContent: "space-between",
|
|
1720
|
+
gap: 12
|
|
1721
|
+
},
|
|
1722
|
+
children: [
|
|
1723
|
+
se.left,
|
|
1724
|
+
se.right
|
|
1725
|
+
]
|
|
1726
|
+
},
|
|
1727
|
+
se.key
|
|
1728
|
+
);
|
|
1729
|
+
}) });
|
|
1730
|
+
})(),
|
|
1731
|
+
/* @__PURE__ */ i(
|
|
1732
|
+
"div",
|
|
1733
|
+
{
|
|
1734
|
+
onClick: () => k(!x),
|
|
1735
|
+
style: {
|
|
1736
|
+
display: "flex",
|
|
1737
|
+
alignItems: "center",
|
|
1738
|
+
justifyContent: "space-between",
|
|
1739
|
+
cursor: "pointer",
|
|
1740
|
+
padding: "2px 0",
|
|
1741
|
+
userSelect: "none"
|
|
1742
|
+
},
|
|
1743
|
+
children: [
|
|
1744
|
+
/* @__PURE__ */ e("span", { style: a(14, t.secondary), children: "Advanced" }),
|
|
1745
|
+
/* @__PURE__ */ e("svg", { width: "10", height: "6", viewBox: "0 0 10 6", fill: "none", style: {
|
|
1746
|
+
transform: x ? "rotate(180deg)" : "none",
|
|
1747
|
+
transition: "transform 0.2s"
|
|
1748
|
+
}, children: /* @__PURE__ */ e("path", { d: "M1 1L5 5L9 1", stroke: t.secondary, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1749
|
+
]
|
|
1750
|
+
}
|
|
1751
|
+
),
|
|
1752
|
+
/* @__PURE__ */ e("div", { style: {
|
|
1753
|
+
display: "grid",
|
|
1754
|
+
gridTemplateRows: x ? "1fr" : "0fr",
|
|
1755
|
+
transition: "grid-template-rows 280ms cubic-bezier(0.2,0.9,0.2,1)"
|
|
1756
|
+
}, children: /* @__PURE__ */ e("div", { style: {
|
|
1757
|
+
overflow: "hidden",
|
|
1758
|
+
opacity: x ? 1 : 0,
|
|
1759
|
+
transition: "opacity 200ms cubic-bezier(0.2,0.9,0.2,1)"
|
|
1760
|
+
}, children: /* @__PURE__ */ e("div", { style: {
|
|
1761
|
+
background: t.raised,
|
|
1762
|
+
borderRadius: 8,
|
|
1763
|
+
padding: 12,
|
|
1764
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
1765
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
1766
|
+
display: "flex",
|
|
1767
|
+
flexDirection: "column",
|
|
1768
|
+
gap: 16
|
|
1769
|
+
}, children: /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
1770
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", justifyContent: "space-between" }, children: [
|
|
1771
|
+
/* @__PURE__ */ i("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
1772
|
+
/* @__PURE__ */ e("span", { style: a(14, t.secondary), children: "Max slippage tolerance" }),
|
|
1773
|
+
/* @__PURE__ */ e(Z, { bg: t.highlight, text: "Slippage is the maximum difference between the quoted price and the price you actually receive. A higher tolerance means your order is more likely to fill, but you may receive slightly less SOL." })
|
|
1774
|
+
] }),
|
|
1775
|
+
Se > 0 && /* @__PURE__ */ i("span", { style: a(14, t.secondary), children: [
|
|
1776
|
+
"Est. slippage: ",
|
|
1777
|
+
(Se / 100).toFixed(2),
|
|
1778
|
+
"%"
|
|
1779
|
+
] })
|
|
1780
|
+
] }),
|
|
1781
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "baseline", gap: 4 }, children: [
|
|
1782
|
+
/* @__PURE__ */ e("span", { style: { ...a(18, t.primary), transition: "color 0.15s" }, children: ue.toFixed(2) }),
|
|
1783
|
+
/* @__PURE__ */ e("span", { style: a(14, t.secondary), children: "% max slippage" })
|
|
1784
|
+
] }),
|
|
1785
|
+
/* @__PURE__ */ e(ln, { value: ue, onChange: (y) => w(Math.round(y * 100)) })
|
|
1786
|
+
] }) }) }) }),
|
|
1787
|
+
!we && pe > 0 && /* @__PURE__ */ i("div", { style: {
|
|
1788
|
+
background: "rgba(255,181,77,0.15)",
|
|
1789
|
+
borderTop: "1px solid rgba(255,255,255,0.2)",
|
|
1790
|
+
boxShadow: "inset 0 -1px 0 rgba(0,0,0,0.08)",
|
|
1791
|
+
borderRadius: 6,
|
|
1792
|
+
padding: 12,
|
|
1793
|
+
display: "flex",
|
|
1794
|
+
flexDirection: "column",
|
|
1795
|
+
gap: 2
|
|
1796
|
+
}, children: [
|
|
1797
|
+
/* @__PURE__ */ e("p", { style: { ...a(14, t.primary), fontWeight: 500 }, children: "Insufficient liquidity" }),
|
|
1798
|
+
/* @__PURE__ */ i("p", { style: a(14, t.secondary), children: [
|
|
1799
|
+
"Only ",
|
|
1800
|
+
((Re = P == null ? void 0 : P.totalAvailableSize) == null ? void 0 : Re.toFixed(2)) ?? "0",
|
|
1801
|
+
" RT available on the order book. Your order may partially fill or not fill at all."
|
|
1802
|
+
] })
|
|
1803
|
+
] }),
|
|
1804
|
+
l === "error" && g && /* @__PURE__ */ e("div", { style: {
|
|
1805
|
+
...a(14, t.red),
|
|
1806
|
+
background: `${t.red}12`,
|
|
1807
|
+
borderRadius: 6,
|
|
1808
|
+
padding: "8px 12px"
|
|
1809
|
+
}, children: g }),
|
|
1810
|
+
/* @__PURE__ */ e(q, {}),
|
|
1811
|
+
/* @__PURE__ */ e(
|
|
1812
|
+
le,
|
|
1813
|
+
{
|
|
1814
|
+
label: Ee ? h === "selling" ? "Selling rewards..." : "Confirming..." : `Sell Rewards — get ${O(ne, 3)} SOL`,
|
|
1815
|
+
onClick: _e,
|
|
1816
|
+
disabled: !Xe,
|
|
1817
|
+
purple: !0
|
|
1818
|
+
}
|
|
1819
|
+
)
|
|
1820
|
+
] });
|
|
1821
|
+
}
|
|
1822
|
+
const Fe = 1e9;
|
|
1823
|
+
function dn({ position: r, onRedeem: n, isRedeeming: o }) {
|
|
1824
|
+
return /* @__PURE__ */ i("div", { style: {
|
|
1825
|
+
display: "flex",
|
|
1826
|
+
alignItems: "center",
|
|
1827
|
+
gap: 8,
|
|
1828
|
+
padding: "12px 16px",
|
|
1829
|
+
background: t.surface,
|
|
1830
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
1831
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`
|
|
1832
|
+
}, children: [
|
|
1833
|
+
/* @__PURE__ */ e(
|
|
1834
|
+
"img",
|
|
1835
|
+
{
|
|
1836
|
+
src: r.validatorPtIcon,
|
|
1837
|
+
alt: `${r.validatorName} PT`,
|
|
1838
|
+
style: { width: 32, height: 32, borderRadius: 8, flexShrink: 0, objectFit: "cover" }
|
|
1839
|
+
}
|
|
1840
|
+
),
|
|
1841
|
+
/* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1842
|
+
/* @__PURE__ */ i("p", { style: a(15, t.primary), children: [
|
|
1843
|
+
O(r.ptAmount),
|
|
1844
|
+
" PT"
|
|
1845
|
+
] }),
|
|
1846
|
+
/* @__PURE__ */ i("p", { style: a(14, t.secondary), children: [
|
|
1847
|
+
r.validatorName,
|
|
1848
|
+
" · ",
|
|
1849
|
+
r.maturityLabel
|
|
1850
|
+
] })
|
|
1851
|
+
] }),
|
|
1852
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8, flexShrink: 0 }, children: [
|
|
1853
|
+
/* @__PURE__ */ e("p", { style: { ...a(14, r.isMatured ? t.green : t.secondary), whiteSpace: "nowrap" }, children: r.isMatured ? "Unlocked" : `${r.daysLeft}d left` }),
|
|
1854
|
+
/* @__PURE__ */ e(
|
|
1855
|
+
"button",
|
|
1856
|
+
{
|
|
1857
|
+
className: "pye-redeem-btn",
|
|
1858
|
+
onClick: r.isMatured && !o ? () => n(r) : void 0,
|
|
1859
|
+
disabled: !r.isMatured || o,
|
|
1860
|
+
style: {
|
|
1861
|
+
height: 26,
|
|
1862
|
+
width: 72,
|
|
1863
|
+
borderRadius: 6,
|
|
1864
|
+
border: "none",
|
|
1865
|
+
padding: "0 10px",
|
|
1866
|
+
borderTop: "1px solid var(--c-brand-hi)",
|
|
1867
|
+
cursor: r.isMatured ? o ? "wait" : "pointer" : "not-allowed",
|
|
1868
|
+
background: t.purple,
|
|
1869
|
+
...a(14, "var(--c-brand-text)"),
|
|
1870
|
+
boxShadow: "inset 0 -1px 0 var(--c-brand-sh)",
|
|
1871
|
+
transition: "filter 0.1s",
|
|
1872
|
+
opacity: r.isMatured ? o ? 0.7 : 1 : 0.5,
|
|
1873
|
+
whiteSpace: "nowrap"
|
|
1874
|
+
},
|
|
1875
|
+
children: o ? "..." : "Redeem"
|
|
1876
|
+
}
|
|
1877
|
+
)
|
|
1878
|
+
] })
|
|
1879
|
+
] });
|
|
1880
|
+
}
|
|
1881
|
+
function cn() {
|
|
1882
|
+
const { connection: r } = Ae(), n = ge(), o = W((s) => s.walletBalances), d = f((s) => s.navigate), u = f((s) => s.redeemingMint), l = f((s) => s.setRedeemingMint), h = f((s) => s.redeemError), g = f((s) => s.setRedeemError), b = f((s) => s.setRedeemAmountSol), c = f((s) => s.setRedeemTxSignature), p = W((s) => s.setWalletBalances), x = W((s) => s.setUserStakeAccounts), k = J((s) => s.setBalanceLamports), v = We(), w = Y(() => {
|
|
1883
|
+
const s = Date.now() / 1e3, m = [];
|
|
1884
|
+
for (const [S, E] of Object.entries(o)) {
|
|
1885
|
+
if (E <= 0) continue;
|
|
1886
|
+
const C = v.get(S);
|
|
1887
|
+
if (!C) continue;
|
|
1888
|
+
const I = V[C.maturityId], B = Number(I.maturity_timestamp), A = s >= B, R = A ? 0 : Math.ceil((B * 1e3 - Date.now()) / (1e3 * 60 * 60 * 24)), L = ke[C.validatorId];
|
|
1889
|
+
m.push({
|
|
1890
|
+
ptMint: S,
|
|
1891
|
+
validatorId: C.validatorId,
|
|
1892
|
+
maturityId: C.maturityId,
|
|
1893
|
+
bond: C.bond,
|
|
1894
|
+
ptAmount: E / Fe,
|
|
1895
|
+
ptAmountLamports: E,
|
|
1896
|
+
maturityTimestamp: B,
|
|
1897
|
+
maturityLabel: I.human_readable,
|
|
1898
|
+
isMatured: A,
|
|
1899
|
+
daysLeft: R,
|
|
1900
|
+
validatorName: (L == null ? void 0 : L.name) ?? C.validatorId,
|
|
1901
|
+
validatorPtIcon: (L == null ? void 0 : L.pt_sol) ?? ""
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1904
|
+
return m.sort((S, E) => S.maturityTimestamp - E.maturityTimestamp), m;
|
|
1905
|
+
}, [o, v]), M = Qe(async (s) => {
|
|
1906
|
+
g(null), l(s.ptMint);
|
|
1907
|
+
try {
|
|
1908
|
+
const { signature: m } = await ft({
|
|
1909
|
+
connection: r,
|
|
1910
|
+
wallet: n,
|
|
1911
|
+
bondPubkey: s.bond.pubkey,
|
|
1912
|
+
principalTokenMint: s.bond.pt_address,
|
|
1913
|
+
yieldTokenMint: s.bond.rt_address,
|
|
1914
|
+
ptAmountLamports: s.ptAmountLamports,
|
|
1915
|
+
rtAmountLamports: 0
|
|
1916
|
+
});
|
|
1917
|
+
b(s.ptAmountLamports / Fe), c(m), d("redeem-complete");
|
|
1918
|
+
} catch (m) {
|
|
1919
|
+
g(m instanceof Error ? m.message : "Redeem failed");
|
|
1920
|
+
} finally {
|
|
1921
|
+
l(null);
|
|
1922
|
+
const m = n.publicKey;
|
|
1923
|
+
r.getBalance(m, "confirmed").then(k).catch(() => {
|
|
1924
|
+
}), Ve(r, m).then(p).catch(() => {
|
|
1925
|
+
}), Ge(r, m).then(x).catch(() => {
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1928
|
+
}, [r, n, g, l, b, c, d, k, p, x]);
|
|
1929
|
+
return /* @__PURE__ */ e(ie, { padding: 0, style: { borderTop: "none" }, children: /* @__PURE__ */ i("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: [
|
|
1930
|
+
h && /* @__PURE__ */ e("div", { style: {
|
|
1931
|
+
padding: "8px 16px",
|
|
1932
|
+
background: `${t.red}12`,
|
|
1933
|
+
...a(14, t.red)
|
|
1934
|
+
}, children: h }),
|
|
1935
|
+
w.length > 0 ? /* @__PURE__ */ e("div", { style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: w.map((s) => /* @__PURE__ */ e(
|
|
1936
|
+
dn,
|
|
1937
|
+
{
|
|
1938
|
+
position: s,
|
|
1939
|
+
onRedeem: M,
|
|
1940
|
+
isRedeeming: u === s.ptMint
|
|
1941
|
+
},
|
|
1942
|
+
s.ptMint
|
|
1943
|
+
)) }) : /* @__PURE__ */ i("div", { style: {
|
|
1944
|
+
flex: 1,
|
|
1945
|
+
display: "flex",
|
|
1946
|
+
flexDirection: "column",
|
|
1947
|
+
alignItems: "center",
|
|
1948
|
+
justifyContent: "center",
|
|
1949
|
+
gap: 6,
|
|
1950
|
+
padding: 24,
|
|
1951
|
+
textAlign: "center"
|
|
1952
|
+
}, children: [
|
|
1953
|
+
/* @__PURE__ */ e("p", { style: a(15, t.primary), children: "No active positions" }),
|
|
1954
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Sell future rewards to create a position." })
|
|
1955
|
+
] })
|
|
1956
|
+
] }) });
|
|
1957
|
+
}
|
|
1958
|
+
function pn() {
|
|
1959
|
+
const r = f((p) => p.reset), n = f((p) => p.txSignature), o = f((p) => p.depositAmount), d = f((p) => p.selectedMaturityId), u = f((p) => p.sellAmountSol), l = parseFloat(o) || 0, h = u ?? 0, g = d ? V[d] : null, b = (g == null ? void 0 : g.human_readable) ?? "Sep 30, 2026", c = n ? `https://solscan.io/tx/${n}` : "https://solscan.io";
|
|
1960
|
+
return /* @__PURE__ */ i(N, { children: [
|
|
1961
|
+
/* @__PURE__ */ e(ze, { label: "Transaction confirmed", onClose: () => r() }),
|
|
1962
|
+
/* @__PURE__ */ i(ie, { children: [
|
|
1963
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Your future staking rewards have been sold upfront." }),
|
|
1964
|
+
(() => {
|
|
1965
|
+
const p = [
|
|
1966
|
+
{
|
|
1967
|
+
key: "received",
|
|
1968
|
+
left: /* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Rewards sold upfront" }),
|
|
1969
|
+
right: /* @__PURE__ */ e(
|
|
1970
|
+
G,
|
|
1971
|
+
{
|
|
1972
|
+
value: `+${O(h)} SOL`,
|
|
1973
|
+
style: { ...a(15, t.green, 500), whiteSpace: "nowrap", flexShrink: 0, fontVariantNumeric: "tabular-nums" }
|
|
1974
|
+
}
|
|
1975
|
+
)
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
key: "pt",
|
|
1979
|
+
left: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
|
|
1980
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "PT received" }),
|
|
1981
|
+
/* @__PURE__ */ e(Z, { text: "A PT (Principal Token) is a 1:1 tokenised claim on your staked SOL. It accrues no rewards — those were sold upfront. Redeem it at maturity to get your full stake back." })
|
|
1982
|
+
] }),
|
|
1983
|
+
right: /* @__PURE__ */ e(
|
|
1984
|
+
G,
|
|
1985
|
+
{
|
|
1986
|
+
value: `+${l} PT`,
|
|
1987
|
+
style: { ...a(14, t.primary), whiteSpace: "nowrap", flexShrink: 0, fontVariantNumeric: "tabular-nums" }
|
|
1988
|
+
}
|
|
1989
|
+
)
|
|
1990
|
+
},
|
|
1991
|
+
{
|
|
1992
|
+
key: "stake",
|
|
1993
|
+
left: /* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Stake returned" }),
|
|
1994
|
+
right: /* @__PURE__ */ e("p", { style: { ...a(14, t.primary), whiteSpace: "nowrap", flexShrink: 0 }, children: b })
|
|
1995
|
+
},
|
|
1996
|
+
{
|
|
1997
|
+
key: "tx",
|
|
1998
|
+
left: /* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Transaction" }),
|
|
1999
|
+
right: /* @__PURE__ */ i(
|
|
2000
|
+
"a",
|
|
2001
|
+
{
|
|
2002
|
+
href: c,
|
|
2003
|
+
target: "_blank",
|
|
2004
|
+
rel: "noreferrer",
|
|
2005
|
+
style: { ...a(14, t.purple), textDecoration: "none", display: "flex", alignItems: "center", gap: 4, flexShrink: 0 },
|
|
2006
|
+
children: [
|
|
2007
|
+
"Solscan",
|
|
2008
|
+
/* @__PURE__ */ e("svg", { width: "11", height: "11", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M7 1h4v4M11 1L5.5 6.5M5 2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V8", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
2009
|
+
]
|
|
2010
|
+
}
|
|
2011
|
+
)
|
|
2012
|
+
}
|
|
2013
|
+
];
|
|
2014
|
+
return /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 0 }, children: p.map((x, k) => {
|
|
2015
|
+
const v = k === 0, w = k === p.length - 1, M = v && w ? 8 : v ? "8px 8px 0 0" : w ? "0 0 8px 8px" : 0;
|
|
2016
|
+
return /* @__PURE__ */ i(
|
|
2017
|
+
"div",
|
|
2018
|
+
{
|
|
2019
|
+
style: {
|
|
2020
|
+
background: t.lowered,
|
|
2021
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
2022
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`,
|
|
2023
|
+
borderRadius: M,
|
|
2024
|
+
padding: "12px 12px",
|
|
2025
|
+
display: "flex",
|
|
2026
|
+
alignItems: "center",
|
|
2027
|
+
justifyContent: "space-between",
|
|
2028
|
+
gap: 12
|
|
2029
|
+
},
|
|
2030
|
+
children: [
|
|
2031
|
+
x.left,
|
|
2032
|
+
x.right
|
|
2033
|
+
]
|
|
2034
|
+
},
|
|
2035
|
+
x.key
|
|
2036
|
+
);
|
|
2037
|
+
}) });
|
|
2038
|
+
})(),
|
|
2039
|
+
/* @__PURE__ */ i("div", { style: {
|
|
2040
|
+
background: t.raised,
|
|
2041
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
2042
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
2043
|
+
borderRadius: 8,
|
|
2044
|
+
padding: 12,
|
|
2045
|
+
display: "flex",
|
|
2046
|
+
alignItems: "flex-start",
|
|
2047
|
+
gap: 10
|
|
2048
|
+
}, children: [
|
|
2049
|
+
/* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0, marginTop: 2 }, children: [
|
|
2050
|
+
/* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "6.5", stroke: t.secondary, strokeWidth: "1.2" }),
|
|
2051
|
+
/* @__PURE__ */ e("path", { d: "M8 7.5v3.5M8 5v.5", stroke: t.secondary, strokeWidth: "1.4", strokeLinecap: "round" })
|
|
2052
|
+
] }),
|
|
2053
|
+
/* @__PURE__ */ i("p", { style: a(12, t.secondary), children: [
|
|
2054
|
+
"Your PT tokens may be hidden in your wallet — enable them via ",
|
|
2055
|
+
/* @__PURE__ */ e("span", { style: { color: t.primary }, children: "Manage Tokens" }),
|
|
2056
|
+
" to see your balance."
|
|
2057
|
+
] })
|
|
2058
|
+
] }),
|
|
2059
|
+
/* @__PURE__ */ e(q, {}),
|
|
2060
|
+
/* @__PURE__ */ i("div", { style: {
|
|
2061
|
+
background: t.raised,
|
|
2062
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
2063
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
2064
|
+
borderRadius: 8,
|
|
2065
|
+
padding: 12,
|
|
2066
|
+
display: "flex",
|
|
2067
|
+
alignItems: "center",
|
|
2068
|
+
gap: 12
|
|
2069
|
+
}, children: [
|
|
2070
|
+
/* @__PURE__ */ i("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
2071
|
+
/* @__PURE__ */ e("p", { style: a(14, t.primary), children: "Learn more about Pye" }),
|
|
2072
|
+
/* @__PURE__ */ i(
|
|
2073
|
+
"a",
|
|
2074
|
+
{
|
|
2075
|
+
href: "https://docs.pye.fi/how-pye-works",
|
|
2076
|
+
target: "_blank",
|
|
2077
|
+
rel: "noreferrer",
|
|
2078
|
+
style: { ...a(11, t.secondary), textDecoration: "none", display: "flex", alignItems: "center", gap: 4 },
|
|
2079
|
+
children: [
|
|
2080
|
+
"Read the docs",
|
|
2081
|
+
/* @__PURE__ */ e("svg", { width: "11", height: "11", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M7 1h4v4M11 1L5.5 6.5M5 2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V8", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
2082
|
+
]
|
|
2083
|
+
}
|
|
2084
|
+
)
|
|
2085
|
+
] }),
|
|
2086
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", gap: 8, flexShrink: 0, alignSelf: "center" }, children: [
|
|
2087
|
+
/* @__PURE__ */ e(
|
|
2088
|
+
"a",
|
|
2089
|
+
{
|
|
2090
|
+
href: "https://t.me/pyefi",
|
|
2091
|
+
target: "_blank",
|
|
2092
|
+
rel: "noreferrer",
|
|
2093
|
+
style: { display: "flex", alignItems: "center", justifyContent: "center", width: 28, height: 28, borderRadius: 8, background: t.highlight, borderTop: `1px solid ${t.highlight}`, boxShadow: `inset 0 -1px 0 ${t.shadow}`, textDecoration: "none" },
|
|
2094
|
+
children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: t.secondary, children: /* @__PURE__ */ e("path", { d: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z" }) })
|
|
2095
|
+
}
|
|
2096
|
+
),
|
|
2097
|
+
/* @__PURE__ */ e(
|
|
2098
|
+
"a",
|
|
2099
|
+
{
|
|
2100
|
+
href: "https://x.com/pyefinance",
|
|
2101
|
+
target: "_blank",
|
|
2102
|
+
rel: "noreferrer",
|
|
2103
|
+
style: { display: "flex", alignItems: "center", justifyContent: "center", width: 28, height: 28, borderRadius: 8, background: t.highlight, borderTop: `1px solid ${t.highlight}`, boxShadow: `inset 0 -1px 0 ${t.shadow}`, textDecoration: "none" },
|
|
2104
|
+
children: /* @__PURE__ */ e("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: t.secondary, children: /* @__PURE__ */ e("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.744l7.73-8.835L1.254 2.25H8.08l4.253 5.622 5.912-5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) })
|
|
2105
|
+
}
|
|
2106
|
+
)
|
|
2107
|
+
] })
|
|
2108
|
+
] }),
|
|
2109
|
+
/* @__PURE__ */ e(le, { label: "Sell more rewards", onClick: () => r() })
|
|
2110
|
+
] })
|
|
2111
|
+
] });
|
|
2112
|
+
}
|
|
2113
|
+
function un() {
|
|
2114
|
+
const r = f((l) => l.reset), n = f((l) => l.redeemAmountSol), o = f((l) => l.redeemTxSignature), d = n ?? 12.5, u = o ? `https://solscan.io/tx/${o}` : "https://solscan.io";
|
|
2115
|
+
return /* @__PURE__ */ i(N, { children: [
|
|
2116
|
+
/* @__PURE__ */ e(ze, { label: "Redeem confirmed", onClose: () => r() }),
|
|
2117
|
+
/* @__PURE__ */ i(ie, { children: [
|
|
2118
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Your staked SOL has been returned to your wallet." }),
|
|
2119
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
2120
|
+
/* @__PURE__ */ i("div", { style: {
|
|
2121
|
+
background: t.lowered,
|
|
2122
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
2123
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`,
|
|
2124
|
+
borderRadius: "8px 8px 0 0",
|
|
2125
|
+
padding: 12,
|
|
2126
|
+
display: "flex",
|
|
2127
|
+
flexDirection: "column",
|
|
2128
|
+
gap: 12
|
|
2129
|
+
}, children: [
|
|
2130
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Staked SOL returned" }),
|
|
2131
|
+
/* @__PURE__ */ e(
|
|
2132
|
+
G,
|
|
2133
|
+
{
|
|
2134
|
+
value: `${O(d)} SOL`,
|
|
2135
|
+
style: { ...U(32, t.green), lineHeight: 1.2 }
|
|
2136
|
+
}
|
|
2137
|
+
)
|
|
2138
|
+
] }),
|
|
2139
|
+
/* @__PURE__ */ i("div", { style: {
|
|
2140
|
+
background: t.lowered,
|
|
2141
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
2142
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`,
|
|
2143
|
+
borderRadius: "0 0 8px 8px",
|
|
2144
|
+
padding: 12,
|
|
2145
|
+
display: "flex",
|
|
2146
|
+
justifyContent: "space-between",
|
|
2147
|
+
alignItems: "center"
|
|
2148
|
+
}, children: [
|
|
2149
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Received as a stake account" }),
|
|
2150
|
+
/* @__PURE__ */ i(
|
|
2151
|
+
"a",
|
|
2152
|
+
{
|
|
2153
|
+
href: u,
|
|
2154
|
+
target: "_blank",
|
|
2155
|
+
rel: "noreferrer",
|
|
2156
|
+
style: { ...a(14, t.purple), textDecoration: "none", display: "flex", alignItems: "center", gap: 4 },
|
|
2157
|
+
children: [
|
|
2158
|
+
"Solscan",
|
|
2159
|
+
/* @__PURE__ */ e("svg", { width: "11", height: "11", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M7 1h4v4M11 1L5.5 6.5M5 2H2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V8", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
2160
|
+
]
|
|
2161
|
+
}
|
|
2162
|
+
)
|
|
2163
|
+
] })
|
|
2164
|
+
] }),
|
|
2165
|
+
/* @__PURE__ */ i("div", { style: {
|
|
2166
|
+
background: t.raised,
|
|
2167
|
+
borderTop: `1px solid ${t.highlight}`,
|
|
2168
|
+
boxShadow: `inset 0 -1px 0 ${t.shadow}`,
|
|
2169
|
+
borderRadius: 8,
|
|
2170
|
+
padding: 12,
|
|
2171
|
+
display: "flex",
|
|
2172
|
+
flexDirection: "column",
|
|
2173
|
+
gap: 12
|
|
2174
|
+
}, children: [
|
|
2175
|
+
/* @__PURE__ */ e("p", { style: a(14, t.primary), children: /* @__PURE__ */ e("strong", { style: { fontWeight: 600 }, children: "What to do next" }) }),
|
|
2176
|
+
/* @__PURE__ */ e("p", { style: a(14, t.secondary), children: "Two more steps to make it liquid." }),
|
|
2177
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", gap: 10 }, children: [
|
|
2178
|
+
/* @__PURE__ */ e("div", { style: {
|
|
2179
|
+
width: 20,
|
|
2180
|
+
height: 20,
|
|
2181
|
+
borderRadius: "50%",
|
|
2182
|
+
flexShrink: 0,
|
|
2183
|
+
background: t.lowered,
|
|
2184
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
2185
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`,
|
|
2186
|
+
display: "flex",
|
|
2187
|
+
alignItems: "center",
|
|
2188
|
+
justifyContent: "center",
|
|
2189
|
+
...a(11, t.secondary)
|
|
2190
|
+
}, children: "1" }),
|
|
2191
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
2192
|
+
/* @__PURE__ */ e("p", { style: a(14, t.primary), children: "Deactivate the stake account" }),
|
|
2193
|
+
/* @__PURE__ */ e("p", { style: a(11, t.secondary), children: "Deactivate in your wallet app. Takes ~1 epoch (~2 days)." })
|
|
2194
|
+
] })
|
|
2195
|
+
] }),
|
|
2196
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", gap: 10 }, children: [
|
|
2197
|
+
/* @__PURE__ */ e("div", { style: {
|
|
2198
|
+
width: 20,
|
|
2199
|
+
height: 20,
|
|
2200
|
+
borderRadius: "50%",
|
|
2201
|
+
flexShrink: 0,
|
|
2202
|
+
background: t.lowered,
|
|
2203
|
+
borderTop: `1px solid ${t.shadow}`,
|
|
2204
|
+
boxShadow: `inset 0 -1px 0 ${t.highlight}`,
|
|
2205
|
+
display: "flex",
|
|
2206
|
+
alignItems: "center",
|
|
2207
|
+
justifyContent: "center",
|
|
2208
|
+
...a(11, t.secondary)
|
|
2209
|
+
}, children: "2" }),
|
|
2210
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
2211
|
+
/* @__PURE__ */ e("p", { style: a(14, t.primary), children: "Withdraw to liquid SOL" }),
|
|
2212
|
+
/* @__PURE__ */ e("p", { style: a(11, t.secondary), children: "Once deactivated, withdraw to get liquid SOL." })
|
|
2213
|
+
] })
|
|
2214
|
+
] })
|
|
2215
|
+
] }),
|
|
2216
|
+
/* @__PURE__ */ e(q, {}),
|
|
2217
|
+
/* @__PURE__ */ e(le, { label: "Done", onClick: () => r() })
|
|
2218
|
+
] })
|
|
2219
|
+
] });
|
|
2220
|
+
}
|
|
2221
|
+
const hn = {
|
|
2222
|
+
"select-position": { step: 1, total: 4 },
|
|
2223
|
+
"choose-amount": { step: 2, total: 4 },
|
|
2224
|
+
"choose-duration": { step: 3, total: 4 },
|
|
2225
|
+
"review-quote": { step: 4, total: 4 }
|
|
2226
|
+
}, gn = "Each PT (Principal Token) is a 1:1 tokenised claim on your staked SOL. It accrues no rewards — those were sold upfront. Redeem at maturity to receive your full SOL stake back.";
|
|
2227
|
+
function He({ screen: r, children: n }) {
|
|
2228
|
+
return /* @__PURE__ */ i(re, { children: [
|
|
2229
|
+
/* @__PURE__ */ e(ie, { style: { borderRadius: "10px 10px 0 0", borderTop: "none" }, children: /* @__PURE__ */ e("div", { className: "pye-step-in", children: n }, r) }),
|
|
2230
|
+
/* @__PURE__ */ e(oe, {})
|
|
2231
|
+
] });
|
|
2232
|
+
}
|
|
2233
|
+
function yn({ validatorName: r }) {
|
|
2234
|
+
const n = f((c) => c.screen), o = f((c) => c.goBack), d = f((c) => c.reset), u = f((c) => c.navigate), l = J((c) => c.publicKey), h = J((c) => c.status), g = K(null);
|
|
2235
|
+
if (j(() => {
|
|
2236
|
+
const c = h === "connected", p = n === "yield-forward-intro" || n === "connect-wallet";
|
|
2237
|
+
c && p ? u("welcome") : !c && !p && d();
|
|
2238
|
+
}, [h, n, u, d]), j(() => {
|
|
2239
|
+
if (!l) {
|
|
2240
|
+
g.current = null;
|
|
2241
|
+
return;
|
|
2242
|
+
}
|
|
2243
|
+
g.current && g.current !== l && (d(), u("welcome")), g.current = l;
|
|
2244
|
+
}, [l, d, u]), n === "complete")
|
|
2245
|
+
return /* @__PURE__ */ i(re, { children: [
|
|
2246
|
+
/* @__PURE__ */ e(pn, {}),
|
|
2247
|
+
/* @__PURE__ */ e(oe, {})
|
|
2248
|
+
] });
|
|
2249
|
+
if (n === "redeem-complete")
|
|
2250
|
+
return /* @__PURE__ */ i(re, { children: [
|
|
2251
|
+
/* @__PURE__ */ e(un, {}),
|
|
2252
|
+
/* @__PURE__ */ e(oe, {})
|
|
2253
|
+
] });
|
|
2254
|
+
if (n === "welcome")
|
|
2255
|
+
return /* @__PURE__ */ i(re, { children: [
|
|
2256
|
+
/* @__PURE__ */ e(Gt, { validatorName: r }),
|
|
2257
|
+
/* @__PURE__ */ e(oe, {})
|
|
2258
|
+
] });
|
|
2259
|
+
if (n === "yield-forward-intro")
|
|
2260
|
+
return /* @__PURE__ */ e(He, { screen: n, children: /* @__PURE__ */ e(zt, {}) });
|
|
2261
|
+
if (n === "connect-wallet")
|
|
2262
|
+
return /* @__PURE__ */ e(He, { screen: n, children: /* @__PURE__ */ e(Jt, {}) });
|
|
2263
|
+
if (n === "redeem-list")
|
|
2264
|
+
return /* @__PURE__ */ i(re, { children: [
|
|
2265
|
+
/* @__PURE__ */ e(Be, { hideStep: !0, label: "Your positions", tooltipText: gn, onBack: o }),
|
|
2266
|
+
/* @__PURE__ */ e(cn, {}),
|
|
2267
|
+
/* @__PURE__ */ e(oe, {})
|
|
2268
|
+
] });
|
|
2269
|
+
const b = hn[n];
|
|
2270
|
+
return /* @__PURE__ */ i(re, { children: [
|
|
2271
|
+
/* @__PURE__ */ e(
|
|
2272
|
+
Be,
|
|
2273
|
+
{
|
|
2274
|
+
step: b == null ? void 0 : b.step,
|
|
2275
|
+
total: b == null ? void 0 : b.total,
|
|
2276
|
+
hideStep: !(b != null && b.step),
|
|
2277
|
+
onBack: o
|
|
2278
|
+
}
|
|
2279
|
+
),
|
|
2280
|
+
/* @__PURE__ */ e(ie, { children: /* @__PURE__ */ i("div", { className: "pye-step-in", children: [
|
|
2281
|
+
n === "select-position" && /* @__PURE__ */ e(Zt, {}),
|
|
2282
|
+
n === "choose-amount" && /* @__PURE__ */ e(Xt, {}),
|
|
2283
|
+
n === "choose-duration" && /* @__PURE__ */ e(on, {}),
|
|
2284
|
+
n === "review-quote" && /* @__PURE__ */ e(sn, {})
|
|
2285
|
+
] }, n) }),
|
|
2286
|
+
/* @__PURE__ */ e(oe, {})
|
|
2287
|
+
] });
|
|
2288
|
+
}
|
|
2289
|
+
function mn() {
|
|
2290
|
+
const r = J((d) => d.publicKey), n = f((d) => d.resetForWalletChange), o = K(null);
|
|
2291
|
+
return j(() => {
|
|
2292
|
+
const d = r ? String(r) : null;
|
|
2293
|
+
o.current !== null && o.current !== d && n(), o.current = d;
|
|
2294
|
+
}, [r, n]), null;
|
|
2295
|
+
}
|
|
2296
|
+
const fn = "7b89b9d2ef5d0298961c3eeb879793b0";
|
|
2297
|
+
function bn(r) {
|
|
2298
|
+
if (r) {
|
|
2299
|
+
for (const n of Object.values(ke))
|
|
2300
|
+
if (n.vote_account === r) return n.name;
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
function In({
|
|
2304
|
+
rpcUrl: r,
|
|
2305
|
+
supabaseUrl: n,
|
|
2306
|
+
supabaseAnonKey: o,
|
|
2307
|
+
voteAccount: d,
|
|
2308
|
+
theme: u = "pye-light",
|
|
2309
|
+
onClose: l
|
|
2310
|
+
}) {
|
|
2311
|
+
const h = K(!1);
|
|
2312
|
+
h.current || (bt({ rpcUrl: r, supabaseUrl: n, supabaseAnonKey: o, voteAccount: d }), h.current = !0);
|
|
2313
|
+
const g = Y(() => bn(d), [d]), b = Y(
|
|
2314
|
+
() => [
|
|
2315
|
+
new it(),
|
|
2316
|
+
new lt(),
|
|
2317
|
+
new at(),
|
|
2318
|
+
new st(),
|
|
2319
|
+
new dt({
|
|
2320
|
+
network: ct.Mainnet,
|
|
2321
|
+
options: {
|
|
2322
|
+
projectId: fn,
|
|
2323
|
+
metadata: {
|
|
2324
|
+
name: "Pye",
|
|
2325
|
+
description: "Earn staking rewards upfront",
|
|
2326
|
+
url: "https://pye.fi",
|
|
2327
|
+
icons: ["https://pye.fi/icon.png"]
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
})
|
|
2331
|
+
],
|
|
2332
|
+
[]
|
|
2333
|
+
), c = K(void 0);
|
|
2334
|
+
return c.current || (c.current = Rt()), /* @__PURE__ */ i("div", { "data-theme": u, children: [
|
|
2335
|
+
/* @__PURE__ */ e("style", { children: It }),
|
|
2336
|
+
/* @__PURE__ */ e(rt, { endpoint: r, children: /* @__PURE__ */ e(ot, { wallets: b, autoConnect: !0, children: /* @__PURE__ */ i(At, { children: [
|
|
2337
|
+
/* @__PURE__ */ e(kt, {}),
|
|
2338
|
+
/* @__PURE__ */ e(vt, {}),
|
|
2339
|
+
/* @__PURE__ */ e(wt, {}),
|
|
2340
|
+
/* @__PURE__ */ e(St, {}),
|
|
2341
|
+
/* @__PURE__ */ i(Ke.Provider, { value: c.current, children: [
|
|
2342
|
+
/* @__PURE__ */ e(mn, {}),
|
|
2343
|
+
/* @__PURE__ */ e(yn, { validatorName: g })
|
|
2344
|
+
] })
|
|
2345
|
+
] }) }) })
|
|
2346
|
+
] });
|
|
2347
|
+
}
|
|
2348
|
+
export {
|
|
2349
|
+
In as PyeWidget
|
|
2350
|
+
};
|
|
2351
|
+
//# sourceMappingURL=pye-widget.es.js.map
|