@trifle/trifle-hub 1.0.158 → 1.0.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccountIndex-I_m-xJA2.js +119 -0
- package/dist/Earn-eUazTpJq.js +521 -0
- package/dist/{ExchangeController-O21rDxQI.js → ExchangeController-DV12Cckz.js} +1 -1
- package/dist/{Games-urE8dCiQ.js → Games-_af0-zsI.js} +126 -100
- package/dist/{HelpersUtil-CTL0zzpL.js → HelpersUtil-DffXsS4s.js} +2 -2
- package/dist/{Leaderboard-p6FRl_qo.js → Leaderboard-CdNJ6RpN.js} +78 -74
- package/dist/Profile-DQwKnS5C.js +1619 -0
- package/dist/{ReownAuthentication-z0Hzyrdn.js → ReownAuthentication-4hJzNS3a.js} +4 -4
- package/dist/{SocialsButtons-CE7zWqqh.js → SocialsButtons-BXUP5WJn.js} +1 -1
- package/dist/{SwapController-D-08czsg.js → SwapController-RS74Rf8y.js} +1 -1
- package/dist/{TrifleGuide-DBjZze_W.js → TrifleGuide-DV95aOiF.js} +1 -1
- package/dist/components/ReferralSection.vue.d.ts +2 -0
- package/dist/components/TwitterEngagementQuest.vue.d.ts +2 -0
- package/dist/components/TwitterTweetSummary.vue.d.ts +2 -0
- package/dist/config/pointsConfig.d.ts +0 -13
- package/dist/{data-capture-BurHpsk0.js → data-capture-4Zt7Mh-x.js} +10 -10
- package/dist/{email-caSfULEh.js → email-keN3MwiL.js} +8 -8
- package/dist/{embedded-wallet-CEz0Lhvv.js → embedded-wallet-4uVCFENX.js} +15 -15
- package/dist/{features-BwTHxbfn.js → features-DP96zO-E.js} +1 -1
- package/dist/{if-defined-BNumhkgE.js → if-defined-DWpQnkBo.js} +1 -1
- package/dist/{index-C_2OLYwS.js → index-B5bAjn80.js} +5 -5
- package/dist/{index-DodtoSGj.js → index-B6qbfcv3.js} +3 -3
- package/dist/{index-C7eEhpa8.js → index-B8IL-7_U.js} +4 -4
- package/dist/{index-89vSMSlU.js → index-BBl5qF2M.js} +3 -3
- package/dist/{index-CQFGvnA-.js → index-BO7qLY_A.js} +7 -7
- package/dist/{index-msSimcJK.js → index-BPs0GUi0.js} +4 -4
- package/dist/{index-Cb7k9l7V.js → index-Bs_op1YX.js} +3 -3
- package/dist/{index-B6GGU_Yv.js → index-BxFE2Unj.js} +23 -23
- package/dist/{index-K1xv67LI.js → index-C0G7EHjl.js} +29 -29
- package/dist/{index-Dg7_cwWU.js → index-C1P1tCug.js} +5 -5
- package/dist/{index-Bkj3uNfm.js → index-C8z4JeX0.js} +5 -5
- package/dist/{index-B3Kw351e.js → index-CIz85z2d.js} +2 -2
- package/dist/{index-D76hQfB6.js → index-CWQmRKXJ.js} +4 -4
- package/dist/{index-CwAgKs0q.js → index-CcH4ohJ_.js} +4 -4
- package/dist/{index-DXVkuTgx.js → index-CfQ4XGey.js} +5 -5
- package/dist/{index-BHgZhZnd.js → index-CpFp2zWs.js} +2 -2
- package/dist/{index-BestOUlf.js → index-Csp20V_C.js} +97 -58
- package/dist/{index-pCBpwyph.js → index-CyTfW7bb.js} +6 -6
- package/dist/{index-Co_urUVD.js → index-D1PtCSNo.js} +2 -2
- package/dist/{index-B4ypbAaJ.js → index-DDxhg6X6.js} +2 -2
- package/dist/{index-D-P8X6DA.js → index-DKPj-Jsc.js} +3 -3
- package/dist/{index-DpIl6Wev.js → index-DN-NdrN8.js} +3 -3
- package/dist/{index-C7xl7pFK.js → index-DOVqr745.js} +31 -31
- package/dist/{index-BMPcBhgi.js → index-DPm1qXRL.js} +8 -8
- package/dist/{index-5_bOFSu-.js → index-DaRwVfNh.js} +8 -8
- package/dist/{index-BvQv0KlV.js → index-DhdIiv9I.js} +4 -4
- package/dist/{index-DfgpBvgd.js → index-DlHufcDq.js} +7 -7
- package/dist/{index-FhNgcqVw.js → index-DnZf5kFT.js} +4 -4
- package/dist/{index-DkZ5owF-.js → index-E6-HL-vX.js} +5 -5
- package/dist/{index-gh4E7rPC.js → index-G7BEtCTt.js} +3 -3
- package/dist/{index-0UckIGq1.js → index-QJqrYOWX.js} +5 -5
- package/dist/{index-hrWlsaQz.js → index-QxHb_qeo.js} +5 -5
- package/dist/{index-BFnZ3glo.js → index-SB-6jek0.js} +4 -4
- package/dist/{index-C1gHFH6V.js → index-UnIJhvbF.js} +1 -1
- package/dist/{index-DVj-n2n2.js → index-dR4kMyJ7.js} +1 -1
- package/dist/{index-PnMkyIQv.js → index-gjTnuwmH.js} +2 -2
- package/dist/index.es.js +2 -2
- package/dist/{onramp-DDMX8dgQ.js → onramp-BfgwVaz4.js} +23 -23
- package/dist/{pay-with-exchange-DupicqoA.js → pay-with-exchange-IINfHruD.js} +15 -15
- package/dist/{receive-CslAXVA7.js → receive-tK9feGwv.js} +7 -7
- package/dist/{ref-CJX9F_fb.js → ref-CDkfw-zs.js} +2 -2
- package/dist/{send-DkMybs9S.js → send-mES3HGGI.js} +15 -15
- package/dist/{socials-DbW23ibQ.js → socials-U7A0qfan.js} +16 -16
- package/dist/{swaps-4_FZwgjm.js → swaps-CVIliCpc.js} +11 -11
- package/dist/{transactions-CDTgv5JK.js → transactions-C1kMLLvz.js} +3 -3
- package/dist/{w3m-modal-CRjTiieg.js → w3m-modal-DYHBxO0T.js} +12 -12
- package/package.json +1 -1
- package/dist/AccountIndex-Tw5xY7ab.js +0 -1140
- package/dist/AccountLayout-DtKvcqQk.js +0 -28
- package/dist/Earn-wpObjq-V.js +0 -306
- package/dist/Profile-BXTdPhEU.js +0 -246
- /package/dist/{views/Account/UserAccount.vue.d.ts → components/AccountSettings.vue.d.ts} +0 -0
|
@@ -0,0 +1,1619 @@
|
|
|
1
|
+
import { createElementBlock as a, openBlock as t, createElementVNode as e, renderSlot as re, createCommentVNode as i, computed as v, inject as ue, normalizeStyle as fe, toDisplayString as _, ref as h, unref as u, Fragment as T, createTextVNode as b, watch as Be, normalizeClass as A, createBlock as W, renderList as ie, withCtx as P, defineComponent as We, onMounted as we, withDirectives as _e, withKeys as ke, vModelText as Ae, resolveDynamicComponent as Qe, mergeProps as Ee, defineAsyncComponent as Ke, createSlots as Ve, createVNode as Je, vShow as Te, nextTick as Xe } from "vue";
|
|
2
|
+
import { p as De, a5 as Ne, a6 as Me, a7 as Le, a8 as je, a9 as $e, V as Oe, m as Ge } from "./index-Csp20V_C.js";
|
|
3
|
+
import { storeToRefs as Ce } from "pinia";
|
|
4
|
+
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const Ze = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAAB1CAYAAABzn2LRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABnrSURBVHgB7V0JdFzVef5n3/d9tNmSvIDBgZpASdMAcRJoMKQNMZCwBNIkBJwTCgQ4BVIMlMU5YQkkoS5L7aSJWVMcdgIYw8FAbBYDxkACXrAxNsabLEu2pFG/b+YJhJDeaN7cNxrJ851zjwy23rvv3v/++/9fm9RQKVgSicQEh8NxIIbX7/e7mpubc7Nmzep+6qmneqWGGvpj2rRpjkgk/iObzfYB/jNntVr32O32DSCex/Hn65PJzCk+n29qKpVKTp061Scy24p/Z5EqRdVObKygqakps3Hjh1fs2dN5Si6Xc8gna/4p7mKxWDpcLtca/Jt3AoHQazabfUUu1/WW0+nc5PV6t9XX1+8CR+oZ+Hs1jCHMnDnTFo/HZ4AQVuA/c1LY7GIj98mw9IATtXs83vc8Hs9il8v9m3A4dgqIaHIgEIhPmTLFKbVDP3YArhDFRl8H0bNThk8wwyEmcpqdIKZXIOp+B6L8t2g0+rVQKNmSzWbjra2trtmz86LNVNQoVS0ssVjsoI6OjhswDu3t7TVrfT8WURBr3eA+m8Vq/cDlcKwEZ3vPZnO+2Na27U0o2xtBWNtWrFixR2qoPkCJ9QWD4XPAATaLGu5imCOBkKhstzudrjdsNset6XR6itRQVbBAHO3v8wUewkZ1ycgQiy4RQR96YNy4cWGpYeRBUzqZTJ4KHWOjjBx3K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6a2m/kFI/eKhlUdjuhXM+vygRvM6HV+47GG0JGlGDcHs9bybS5XdCrFlAyjaR17rXEol0o/3vtbu4xqezqQXNlj0xTgVEIKLvOLV6/7/pIKHTt6tWrO2UvRJ5oentztGr2uhNTCrRE9kVeb/CSDz5Yt2z71q052ZuBxTjUhHshx4w4Yt87mNKzK9p2rNrB+iGYxWbcIDLaB9uOvardnjtqErwrBWs0mji7CvJ0q2XkTelgMPyrhoaGkhoO7FVADCbt9wcW7uWEQ8uoB36XlYjUf2dMx41UgYnTTHC2WJRGe0cFsXCw4jMWS1yTzTY3Sg3DB/UbEM7NYM+btOqAsUo8eULhN+JbN8Lv8r9akLGmuxTBUGY2L284BAHGUzs7O7/Q1dXFdqJexI4c2u+MZvM8n5BltVpgETnfh1X0sN/vvW39+vV9LWFrKIJim29rampK5nLW1rZdO1o6du6KY6HTWPAwftOC5ff19PTkk6Ot1vyzeIItuVz+Z/7/8c+D/eTfD/bnwf5dH0C09vb2dr6vPzfIv7PfTxn4Z7fbu8Nut7XZbNYNOACbHA73m5FIbHlXl/29deve6EuNqGGYMMIx+nOaSnMdo+/L9ftZI5Ay8f+8FFLxg4KdeQAAAABJRU5ErkJggg==", qe = {}, et = { class: "_p-5 _w-full _flex _flex-col _gap-6 _items-center _overflow-y-scroll-masked _no-scrollbar _relative" }, tt = { class: "_absolute _top-4 _left-4 _z-10" }, at = { class: "_mt-8 _w-full _text-center" }, st = { class: "_size-24 _rounded-full _mx-auto" }, lt = { class: "_mt-5 _flex _flex-col _gap-3 _w-full" }, nt = { class: "_text-5xl _tracking-wide _w-full _text-center _min-w-0" }, ot = { class: "_w-full _flex-1 _flex _flex-col _gap-3" };
|
|
6
|
+
function rt(x, s) {
|
|
7
|
+
return t(), a("div", et, [
|
|
8
|
+
e("div", tt, [
|
|
9
|
+
re(x.$slots, "admin-controls")
|
|
10
|
+
]),
|
|
11
|
+
e("header", at, [
|
|
12
|
+
e("div", st, [
|
|
13
|
+
re(x.$slots, "avatar")
|
|
14
|
+
]),
|
|
15
|
+
e("div", lt, [
|
|
16
|
+
e("h2", nt, [
|
|
17
|
+
re(x.$slots, "title")
|
|
18
|
+
]),
|
|
19
|
+
x.$slots.description ? re(x.$slots, "description", { key: 0 }) : i("", !0)
|
|
20
|
+
])
|
|
21
|
+
]),
|
|
22
|
+
e("section", ot, [
|
|
23
|
+
re(x.$slots, "default")
|
|
24
|
+
])
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
const it = /* @__PURE__ */ Fe(qe, [["render", rt]]), ut = ["disabled"], ct = { class: "_size-7 _rounded-lg _overflow-hidden" }, dt = ["src"], _t = { class: "_flex-1 _min-w-0 _truncate _text-center _text-stroke-md _leading-snug" }, ft = { class: "_size-7 _flex _justify-end _items-center" }, mt = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "_whitespace-nowrap _leading-snug _pr-[0.25em] _pl-[0.4em] _shadow-panel-inset _rounded-full _text-[0.875em] _tracking-tight"
|
|
30
|
+
}, oe = {
|
|
31
|
+
__name: "AuthButton",
|
|
32
|
+
props: {
|
|
33
|
+
platform: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "wallet"
|
|
36
|
+
},
|
|
37
|
+
points: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: void 0
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
setup(x) {
|
|
47
|
+
const s = x, C = v(() => De[s.platform]), r = ue("TrifleHub/store");
|
|
48
|
+
let S = !1;
|
|
49
|
+
const D = async (m) => {
|
|
50
|
+
if (!S)
|
|
51
|
+
switch (S = !0, setTimeout(() => {
|
|
52
|
+
S = !1;
|
|
53
|
+
}, 1e3), m) {
|
|
54
|
+
case "discord":
|
|
55
|
+
await y();
|
|
56
|
+
break;
|
|
57
|
+
case "farcaster":
|
|
58
|
+
await B();
|
|
59
|
+
break;
|
|
60
|
+
case "wallet":
|
|
61
|
+
await o();
|
|
62
|
+
break;
|
|
63
|
+
case "twitter":
|
|
64
|
+
await z();
|
|
65
|
+
break;
|
|
66
|
+
case "telegram":
|
|
67
|
+
await w();
|
|
68
|
+
break;
|
|
69
|
+
default:
|
|
70
|
+
throw new Error(`Unsupported platform: ${m}`);
|
|
71
|
+
}
|
|
72
|
+
}, B = async () => {
|
|
73
|
+
console.log("Farcaster connect clicked");
|
|
74
|
+
try {
|
|
75
|
+
await r.connectFarcaster();
|
|
76
|
+
} catch (m) {
|
|
77
|
+
console.error("Farcaster connection failed:", m), r.addNotification({
|
|
78
|
+
type: "error",
|
|
79
|
+
message: "Farcaster login failed. Try again?"
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}, o = async () => {
|
|
83
|
+
try {
|
|
84
|
+
await r.connectWallet();
|
|
85
|
+
} catch (m) {
|
|
86
|
+
console.error("Wallet connection failed:", m), r.addNotification({
|
|
87
|
+
type: "error",
|
|
88
|
+
message: "Wallet login failed. Try again?"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}, y = async () => {
|
|
92
|
+
try {
|
|
93
|
+
await r.connectDiscord();
|
|
94
|
+
} catch (m) {
|
|
95
|
+
m.message.includes("Authentication window closed") && r.addNotification({
|
|
96
|
+
type: "error",
|
|
97
|
+
message: "Discord login failed. Try again?"
|
|
98
|
+
}), console.error("Discord connection failed:", m);
|
|
99
|
+
}
|
|
100
|
+
}, z = async () => {
|
|
101
|
+
try {
|
|
102
|
+
await r.connectTwitter();
|
|
103
|
+
} catch (m) {
|
|
104
|
+
m.message.includes("Authentication window closed") && r.addNotification({
|
|
105
|
+
type: "error",
|
|
106
|
+
message: "TwitterX login failed. Try again?"
|
|
107
|
+
}), console.error("TwitterX connection failed:", m);
|
|
108
|
+
}
|
|
109
|
+
}, w = async () => {
|
|
110
|
+
try {
|
|
111
|
+
await r.connectTelegram();
|
|
112
|
+
} catch (m) {
|
|
113
|
+
console.error("Telegram connection failed:", m), r.addNotification({
|
|
114
|
+
type: "error",
|
|
115
|
+
message: "Telegram login failed. Try again?"
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return (m, j) => (t(), a("button", {
|
|
120
|
+
class: "_platform-login-btn _bubble-btn-full _p-4.5",
|
|
121
|
+
style: fe({
|
|
122
|
+
filter: `hue-rotate(${C.value.bubbleButtonStyle.hueRotate}deg) saturate(${C.value.bubbleButtonStyle.saturate}) brightness(${C.value.bubbleButtonStyle.brightness || 1})`
|
|
123
|
+
}),
|
|
124
|
+
disabled: s.disabled,
|
|
125
|
+
onClick: j[0] || (j[0] = (N) => s.click || D(s.platform))
|
|
126
|
+
}, [
|
|
127
|
+
e("div", {
|
|
128
|
+
class: "_flex _justify-between _items-center _gap-2.5",
|
|
129
|
+
style: fe({
|
|
130
|
+
filter: `hue-rotate(${C.value.bubbleButtonStyle.hueRotate * -1}deg) saturate(${1 / C.value.bubbleButtonStyle.saturate})`
|
|
131
|
+
})
|
|
132
|
+
}, [
|
|
133
|
+
e("div", ct, [
|
|
134
|
+
e("img", {
|
|
135
|
+
src: C.value.icon,
|
|
136
|
+
class: "_w-full",
|
|
137
|
+
style: fe({ backgroundColor: C.value.iconBgColor })
|
|
138
|
+
}, null, 12, dt)
|
|
139
|
+
]),
|
|
140
|
+
e("div", _t, [
|
|
141
|
+
re(m.$slots, "default")
|
|
142
|
+
]),
|
|
143
|
+
e("div", ft, [
|
|
144
|
+
s.points ? (t(), a("div", mt, _(s.points) + " 🪩 ", 1)) : i("", !0)
|
|
145
|
+
])
|
|
146
|
+
], 4)
|
|
147
|
+
], 12, ut));
|
|
148
|
+
}
|
|
149
|
+
}, vt = { class: "_flex _flex-col _gap-2ff _bg-metallic-linear _shadow-panel _rounded-lg _p-3 _gap-3" }, pt = { class: "_flex _items-center _justify-between _gap-3" }, gt = { class: "_flex _items-center _gap-2.5 _min-w-0" }, ht = { class: "_flex-1 _min-w-0 _leading-tight" }, yt = { class: "_flex-1 _min-w-0 _truncate _text-em-lg _text-gray-500" }, bt = ["disabled"], xt = { class: "_flex-1 _min-w-0 _truncate _text-center _text-stroke-md _leading-snug" }, wt = {
|
|
150
|
+
key: 0,
|
|
151
|
+
class: "_animate-pulse-deep"
|
|
152
|
+
}, kt = {
|
|
153
|
+
__name: "AuthenticateWalletSection",
|
|
154
|
+
props: {
|
|
155
|
+
walletAddress: String,
|
|
156
|
+
walletAvatar: String,
|
|
157
|
+
displayName: String,
|
|
158
|
+
points: String,
|
|
159
|
+
disabled: {
|
|
160
|
+
type: Boolean,
|
|
161
|
+
default: !1
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
setup(x) {
|
|
165
|
+
const s = De.wallet, C = x, r = ue("TrifleHub/store"), S = h(!1), D = async () => {
|
|
166
|
+
if (C.disabled || r.isSimulationMode) {
|
|
167
|
+
r.addNotification({
|
|
168
|
+
message: "Cannot disconnect wallet in simulation mode",
|
|
169
|
+
type: "error"
|
|
170
|
+
});
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
try {
|
|
174
|
+
await r.disconnect(), r.addNotification({ message: "Wallet disconnected" });
|
|
175
|
+
} catch (o) {
|
|
176
|
+
console.error(o), r.addNotification({ type: "error", message: "Failed to disconnect wallet" });
|
|
177
|
+
}
|
|
178
|
+
}, B = async () => {
|
|
179
|
+
if (C.disabled || r.isSimulationMode) {
|
|
180
|
+
r.addNotification({
|
|
181
|
+
message: "Cannot authenticate wallet in simulation mode",
|
|
182
|
+
type: "error"
|
|
183
|
+
});
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
S.value = !0;
|
|
187
|
+
try {
|
|
188
|
+
await r.authenticateWithWallet(C.walletAddress);
|
|
189
|
+
} catch {
|
|
190
|
+
r.addNotification({ type: "error", message: "Authentication failed" });
|
|
191
|
+
} finally {
|
|
192
|
+
S.value = !1;
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
return (o, y) => (t(), a("section", vt, [
|
|
196
|
+
e("div", pt, [
|
|
197
|
+
e("div", gt, [
|
|
198
|
+
y[0] || (y[0] = e("img", {
|
|
199
|
+
src: Ne,
|
|
200
|
+
class: "_size-7 _rounded-md",
|
|
201
|
+
style: { "background-color": "#f1584d" }
|
|
202
|
+
}, null, -1)),
|
|
203
|
+
e("div", ht, [
|
|
204
|
+
e("div", yt, _(x.displayName), 1)
|
|
205
|
+
])
|
|
206
|
+
]),
|
|
207
|
+
e("button", {
|
|
208
|
+
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
209
|
+
"aria-label": "Disconnect wallet",
|
|
210
|
+
onClick: D,
|
|
211
|
+
title: "Disconnect wallet"
|
|
212
|
+
}, y[1] || (y[1] = [
|
|
213
|
+
e("span", null, "⛌", -1)
|
|
214
|
+
]))
|
|
215
|
+
]),
|
|
216
|
+
e("button", {
|
|
217
|
+
class: "_platform-login-btn _bubble-btn _p-4.5 flex-1 basis-1/2ff min-w-0",
|
|
218
|
+
style: fe({
|
|
219
|
+
filter: `hue-rotate(${u(s).bubbleButtonStyle.hueRotate}deg) saturate(${u(s).bubbleButtonStyle.saturate}) brightness(${u(s).bubbleButtonStyle.brightness || 1})`
|
|
220
|
+
}),
|
|
221
|
+
onClick: B,
|
|
222
|
+
disabled: S.value || x.disabled
|
|
223
|
+
}, [
|
|
224
|
+
e("div", xt, [
|
|
225
|
+
S.value ? (t(), a("span", wt, "Confirm in your wallet...")) : (t(), a(T, { key: 1 }, [
|
|
226
|
+
b("Finish Wallet Login")
|
|
227
|
+
], 64))
|
|
228
|
+
])
|
|
229
|
+
], 12, bt)
|
|
230
|
+
]));
|
|
231
|
+
}
|
|
232
|
+
}, At = /* @__PURE__ */ Fe(kt, [["__scopeId", "data-v-1fad0d64"]]), Ct = { class: "_flex _items-center _gap-2.5 _-mt-1.5" }, St = { class: "_text-mlg _opacity-30 _weight-bold" }, Ut = { class: "_flex _flex-col _gap-0.5" }, zt = { class: "_flex _items-center _gap-2" }, Tt = ["disabled"], Bt = ["onClick"], Dt = ["src"], Nt = {
|
|
233
|
+
key: 1,
|
|
234
|
+
class: "_w-full _flex _items-center _justify-center"
|
|
235
|
+
}, Mt = { class: "_flex-1 _min-w-0 _leading-tight" }, Lt = ["onClick"], jt = {
|
|
236
|
+
key: 0,
|
|
237
|
+
class: "_text-em-2xs _text-primary _leading-none _weight-semibold"
|
|
238
|
+
}, $t = {
|
|
239
|
+
key: 0,
|
|
240
|
+
class: "_opacity-30"
|
|
241
|
+
}, Ft = {
|
|
242
|
+
key: 1,
|
|
243
|
+
class: "_text-em-2xs _text-gray-500 _leading-none _weight-semibold"
|
|
244
|
+
}, Ht = ["onClick"], Yt = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, It = {
|
|
245
|
+
key: 0,
|
|
246
|
+
class: "_flex _items-center _gap-2.5 _-mt-1.5"
|
|
247
|
+
}, Pt = { class: "_space-y-0.5" }, Rt = { class: "_flex _items-center _gap-2" }, Wt = ["disabled"], Qt = ["onClick"], Et = ["src"], Kt = {
|
|
248
|
+
key: 1,
|
|
249
|
+
class: "_w-full _flex _items-center _justify-center"
|
|
250
|
+
}, Vt = { class: "_flex-1 _min-w-0 _leading-tight" }, Jt = { class: "_flex-1 _min-w-0 _truncate _text-em-lg" }, Xt = ["onClick"], Ot = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, Gt = {
|
|
251
|
+
key: 0,
|
|
252
|
+
class: "_flex _items-center _gap-2.5 _-mt-1.5"
|
|
253
|
+
}, Zt = { class: "_space-y-0.5" }, qt = { class: "_flex _items-center _gap-2" }, ea = ["disabled"], ta = ["onClick"], aa = ["src"], sa = {
|
|
254
|
+
key: 1,
|
|
255
|
+
class: "_w-full _flex _items-center _justify-center"
|
|
256
|
+
}, la = { class: "_flex-1 _min-w-0 _leading-tight" }, na = { class: "_flex-1 _min-w-0 _truncate _text-em-lg" }, oa = {
|
|
257
|
+
key: 0,
|
|
258
|
+
class: "_text-em-2xs _text-blue-400 _leading-none"
|
|
259
|
+
}, ra = ["onClick"], ia = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, ua = {
|
|
260
|
+
key: 0,
|
|
261
|
+
class: "_flex _items-center _gap-2.5 _-mt-1.5"
|
|
262
|
+
}, ca = { class: "_space-y-0.5" }, da = { class: "_flex _items-center _gap-2" }, _a = ["disabled"], fa = ["onClick"], ma = ["src"], va = {
|
|
263
|
+
key: 1,
|
|
264
|
+
class: "_w-full _flex _items-center _justify-center"
|
|
265
|
+
}, pa = { class: "_flex-1 _min-w-0 _leading-tight" }, ga = { class: "_flex-1 _min-w-0 _truncate _text-em-lg" }, ha = ["onClick"], ya = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, ba = {
|
|
266
|
+
key: 0,
|
|
267
|
+
class: "_flex _items-center _gap-2.5 _-mt-1.5"
|
|
268
|
+
}, xa = { class: "_space-y-0.5" }, wa = { class: "_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg" }, ka = { class: "_flex _items-center _gap-2" }, Aa = ["disabled"], Ca = ["onClick"], Sa = ["src"], Ua = {
|
|
269
|
+
key: 1,
|
|
270
|
+
class: "_w-full _flex _items-center _justify-center"
|
|
271
|
+
}, za = { class: "_flex-1 _min-w-0 _leading-tight" }, Ta = { class: "_flex-1 _min-w-0 _truncate _text-em-lg" }, Ba = ["onClick"], Da = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, Na = {
|
|
272
|
+
__name: "AccountSettings",
|
|
273
|
+
setup(x) {
|
|
274
|
+
const s = ue("TrifleHub/store"), { isAuthenticated: C, backendUrl: r } = Ce(s), S = v(() => s.isFarcaster), D = v(() => s.isSuperApp), B = async () => {
|
|
275
|
+
await s.addFrame();
|
|
276
|
+
}, o = v(() => s.getPlatformData("wallet")), y = v(() => s.getPlatformData("discord").filter((k) => k.username)), z = v(() => s.getPlatformData("farcaster")), w = v(() => s.getPlatformData("twitter").filter((k) => k.username)), m = v(() => s.getPlatformData("telegram").filter((k) => k.username)), j = v(() => y.value.length > 0), N = v(() => z.value.length > 0), R = v(() => w.value.length > 0), Q = v(() => m.value.length > 0), I = v(
|
|
277
|
+
() => o.value.length + y.value.length + z.value.length + w.value.length + m.value.length
|
|
278
|
+
), M = h({ platform: null, id: null }), E = async (k, d, H) => {
|
|
279
|
+
if (H.stopPropagation(), s.isSimulationMode) {
|
|
280
|
+
s.addNotification({
|
|
281
|
+
message: "Cannot disconnect platforms in simulation mode",
|
|
282
|
+
type: "error"
|
|
283
|
+
});
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (M.value.platform === k && M.value.id === d) {
|
|
287
|
+
try {
|
|
288
|
+
await s.disconnectPlatformInstance(k, d);
|
|
289
|
+
} catch (X) {
|
|
290
|
+
console.error(`Failed to disconnect ${k} instance:`, X);
|
|
291
|
+
}
|
|
292
|
+
M.value = { platform: null, id: null };
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
M.value = { platform: k, id: d };
|
|
296
|
+
}, V = () => {
|
|
297
|
+
M.value = { platform: null, id: null };
|
|
298
|
+
};
|
|
299
|
+
Be(M, (k) => {
|
|
300
|
+
k.platform ? window.addEventListener("click", V, { once: !0 }) : window.removeEventListener("click", V);
|
|
301
|
+
});
|
|
302
|
+
const ae = (k) => k ? `0x${k.slice(2, 6).toUpperCase()}...${k.slice(-4).toUpperCase()}` : "", se = async () => {
|
|
303
|
+
try {
|
|
304
|
+
await s.disconnect(), console.log("User logged out");
|
|
305
|
+
} catch (k) {
|
|
306
|
+
console.error("Logout failed:", k);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
v(() => s.isWalletAuthenticated(s.accountAddress));
|
|
310
|
+
const p = v(() => s.accountAddress), f = v(() => p.value ? o.value.find((k) => {
|
|
311
|
+
var d, H;
|
|
312
|
+
return ((d = k.id) == null ? void 0 : d.toLowerCase()) === ((H = p.value) == null ? void 0 : H.toLowerCase());
|
|
313
|
+
}) : null), L = async () => {
|
|
314
|
+
try {
|
|
315
|
+
await s.openAccountModal();
|
|
316
|
+
} catch {
|
|
317
|
+
s.addNotification({ type: "error", message: "Couldn't open wallet modal" });
|
|
318
|
+
}
|
|
319
|
+
}, J = async (k, d) => {
|
|
320
|
+
if (s.isSimulationMode) {
|
|
321
|
+
s.addNotification({
|
|
322
|
+
message: "Cannot set avatar in simulation mode",
|
|
323
|
+
type: "error"
|
|
324
|
+
});
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
try {
|
|
328
|
+
if (!(await fetch(`${r.value}/auth/update-avatar`, {
|
|
329
|
+
method: "POST",
|
|
330
|
+
headers: {
|
|
331
|
+
"Content-Type": "application/json",
|
|
332
|
+
Authorization: `Bearer ${s.authToken}`
|
|
333
|
+
},
|
|
334
|
+
body: JSON.stringify({ platform: k, platformId: d })
|
|
335
|
+
})).ok) throw new Error("Failed to set avatar");
|
|
336
|
+
await s.fetchUserStatus(), s.addNotification({ type: "success", message: "Avatar updated!" });
|
|
337
|
+
} catch (H) {
|
|
338
|
+
s.addNotification({ type: "error", message: "Oops, couldn't set avatar. Try again?" }), console.error("Failed to set avatar:", H);
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
return (k, d) => {
|
|
342
|
+
var H, X, ee, me, ve, pe;
|
|
343
|
+
return t(), a("section", {
|
|
344
|
+
class: A(["_flex _flex-col _gap-[inherit]", k.$attrs.class])
|
|
345
|
+
}, [
|
|
346
|
+
e("section", {
|
|
347
|
+
class: A(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-last": !((H = o.value) != null && H.length) }])
|
|
348
|
+
}, [
|
|
349
|
+
e("div", Ct, [
|
|
350
|
+
e("h3", St, " wallet" + _(o.value.length > 1 ? "s" : ""), 1)
|
|
351
|
+
]),
|
|
352
|
+
e("ul", Ut, [
|
|
353
|
+
(t(!0), a(T, null, ie(o.value, (l) => {
|
|
354
|
+
var $, F, Y, le, ge, ce, ne, O;
|
|
355
|
+
return t(), a("li", {
|
|
356
|
+
key: l.id,
|
|
357
|
+
class: A(["_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg", {
|
|
358
|
+
"_order-first": u(s).accountConnected && l.id.toLowerCase() === (($ = u(s).accountAddress) == null ? void 0 : $.toLowerCase())
|
|
359
|
+
}])
|
|
360
|
+
}, [
|
|
361
|
+
e("div", zt, [
|
|
362
|
+
e("button", {
|
|
363
|
+
class: A(["_size-11 _flex _items-stretch _p-1.5 _group _rounded-md _overflow-hidden", [
|
|
364
|
+
{
|
|
365
|
+
"_shadow-panel": l.avatar,
|
|
366
|
+
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
367
|
+
}
|
|
368
|
+
]]),
|
|
369
|
+
disabled: !l.avatar
|
|
370
|
+
}, [
|
|
371
|
+
l.avatar ? (t(), a("div", {
|
|
372
|
+
key: 0,
|
|
373
|
+
onClick: () => J("wallet", l.id),
|
|
374
|
+
style: { background: "none" },
|
|
375
|
+
type: "button",
|
|
376
|
+
title: "Set as profile avatar"
|
|
377
|
+
}, [
|
|
378
|
+
e("img", {
|
|
379
|
+
src: `${l.avatar}`,
|
|
380
|
+
class: A(["_size-full _rounded-full _duration-150", {
|
|
381
|
+
"group-hover:_scale-[1.8]": l.avatar !== ((Y = u(s).user) == null ? void 0 : Y.avatar)
|
|
382
|
+
}])
|
|
383
|
+
}, null, 10, Dt)
|
|
384
|
+
], 8, Bt)) : (t(), a("div", Nt, d[0] || (d[0] = [
|
|
385
|
+
e("img", {
|
|
386
|
+
src: Ne,
|
|
387
|
+
class: "_size-6 _rounded",
|
|
388
|
+
style: { "background-color": "#f1584d" }
|
|
389
|
+
}, null, -1)
|
|
390
|
+
])))
|
|
391
|
+
], 10, Tt),
|
|
392
|
+
e("div", Mt, [
|
|
393
|
+
e("div", {
|
|
394
|
+
onClick: () => {
|
|
395
|
+
var K;
|
|
396
|
+
return l.id.toLowerCase() == ((K = u(s).accountAddress) == null ? void 0 : K.toLowerCase()) && L();
|
|
397
|
+
},
|
|
398
|
+
class: A(["_flex-1 _min-w-0 _truncate _text-em-lg", {
|
|
399
|
+
"_text-stroke-xl _tracking-wide": o.value.length > 1 && u(s).accountConnected && l.id.toLowerCase() === ((le = u(s).accountAddress) == null ? void 0 : le.toLowerCase()),
|
|
400
|
+
"cursor-pointer": l.id.toLowerCase() == ((ge = u(s).accountAddress) == null ? void 0 : ge.toLowerCase())
|
|
401
|
+
}])
|
|
402
|
+
}, _(l.username == l.id ? ae(l.id) : l.username), 11, Lt),
|
|
403
|
+
u(s).accountConnected && l.id.toLowerCase() === ((ce = u(s).accountAddress) == null ? void 0 : ce.toLowerCase()) ? (t(), a("div", jt, [
|
|
404
|
+
d[1] || (d[1] = b(" connected ")),
|
|
405
|
+
(ne = l.metadata) != null && ne.origin ? (t(), a("span", $t, " via " + _(l.metadata.origin), 1)) : i("", !0)
|
|
406
|
+
])) : (O = l.metadata) != null && O.origin ? (t(), a("div", Ft, " via " + _(l.metadata.origin), 1)) : i("", !0)
|
|
407
|
+
])
|
|
408
|
+
]),
|
|
409
|
+
I.value > 1 ? (t(), a("button", {
|
|
410
|
+
key: 0,
|
|
411
|
+
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
412
|
+
onClick: (K) => E("wallet", l.id, K),
|
|
413
|
+
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
414
|
+
"aria-label": "Remove"
|
|
415
|
+
}, [
|
|
416
|
+
e("span", Yt, [
|
|
417
|
+
M.value.platform == "wallet" && M.value.id == l.id ? (t(), a(T, { key: 0 }, [
|
|
418
|
+
b(" Confirm? ")
|
|
419
|
+
], 64)) : (t(), a(T, { key: 1 }, [
|
|
420
|
+
b(" ⛌ ")
|
|
421
|
+
], 64))
|
|
422
|
+
])
|
|
423
|
+
], 8, Ht)) : i("", !0)
|
|
424
|
+
], 2);
|
|
425
|
+
}), 128)),
|
|
426
|
+
u(C) && u(s).accountConnected && u(s).currentWalletNeedsAuth ? (t(), W(At, {
|
|
427
|
+
key: 0,
|
|
428
|
+
"wallet-address": u(s).accountAddress,
|
|
429
|
+
"wallet-avatar": (X = f.value) == null ? void 0 : X.avatar,
|
|
430
|
+
"display-name": ((ee = f.value) == null ? void 0 : ee.username) || p.value,
|
|
431
|
+
disabled: u(s).isSimulationMode
|
|
432
|
+
}, {
|
|
433
|
+
default: P(() => [
|
|
434
|
+
b(" Authenticate " + _(ae(u(s).accountAddress)), 1)
|
|
435
|
+
]),
|
|
436
|
+
_: 1
|
|
437
|
+
}, 8, ["wallet-address", "wallet-avatar", "display-name", "disabled"])) : i("", !0),
|
|
438
|
+
u(C) && !u(s).accountConnected ? (t(), W(oe, {
|
|
439
|
+
key: 1,
|
|
440
|
+
platform: "wallet",
|
|
441
|
+
points: o.value.length ? void 0 : "+10",
|
|
442
|
+
disabled: u(s).isSimulationMode,
|
|
443
|
+
class: "_w-full"
|
|
444
|
+
}, {
|
|
445
|
+
default: P(() => [
|
|
446
|
+
b(_(o.value.length > 0 ? "Link another Wallet" : "Link Wallet"), 1)
|
|
447
|
+
]),
|
|
448
|
+
_: 1
|
|
449
|
+
}, 8, ["points", "disabled"])) : i("", !0)
|
|
450
|
+
])
|
|
451
|
+
], 2),
|
|
452
|
+
e("section", {
|
|
453
|
+
class: A(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-last": !((me = y.value) != null && me.length) }])
|
|
454
|
+
}, [
|
|
455
|
+
y.value.length ? (t(), a("div", It, d[2] || (d[2] = [
|
|
456
|
+
e("h3", { class: "_text-mlg _opacity-30 _weight-bold" }, "discord", -1)
|
|
457
|
+
]))) : i("", !0),
|
|
458
|
+
e("ul", Pt, [
|
|
459
|
+
(t(!0), a(T, null, ie(y.value, (l) => {
|
|
460
|
+
var $, F;
|
|
461
|
+
return t(), a("li", {
|
|
462
|
+
key: l.id,
|
|
463
|
+
class: "_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg"
|
|
464
|
+
}, [
|
|
465
|
+
e("div", Rt, [
|
|
466
|
+
e("button", {
|
|
467
|
+
class: A(["_size-11 _flex _items-stretch _p-1.5 _group _overflow-hidden _rounded-md", [
|
|
468
|
+
{
|
|
469
|
+
"_shadow-panel": l.avatar,
|
|
470
|
+
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === (($ = u(s).user) == null ? void 0 : $.avatar)
|
|
471
|
+
}
|
|
472
|
+
]]),
|
|
473
|
+
disabled: !l.avatar
|
|
474
|
+
}, [
|
|
475
|
+
l.avatar ? (t(), a("div", {
|
|
476
|
+
key: 0,
|
|
477
|
+
onClick: () => J("discord", l.id),
|
|
478
|
+
style: { background: "none" },
|
|
479
|
+
type: "button",
|
|
480
|
+
title: "Set as profile avatar"
|
|
481
|
+
}, [
|
|
482
|
+
e("img", {
|
|
483
|
+
src: `${l.avatar}`,
|
|
484
|
+
class: A(["_size-full _rounded-full _duration-150", {
|
|
485
|
+
"group-hover:_scale-[1.8]": l.avatar !== ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
486
|
+
}])
|
|
487
|
+
}, null, 10, Et)
|
|
488
|
+
], 8, Qt)) : (t(), a("div", Kt, d[3] || (d[3] = [
|
|
489
|
+
e("img", {
|
|
490
|
+
src: Me,
|
|
491
|
+
class: "_size-6 _rounded",
|
|
492
|
+
style: { "background-color": "#5865f2" }
|
|
493
|
+
}, null, -1)
|
|
494
|
+
])))
|
|
495
|
+
], 10, Wt),
|
|
496
|
+
e("div", Vt, [
|
|
497
|
+
e("div", Jt, _(l.username), 1)
|
|
498
|
+
])
|
|
499
|
+
]),
|
|
500
|
+
I.value > 1 ? (t(), a("button", {
|
|
501
|
+
key: 0,
|
|
502
|
+
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
503
|
+
onClick: (Y) => E("discord", l.id, Y),
|
|
504
|
+
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
505
|
+
"aria-label": "Remove"
|
|
506
|
+
}, [
|
|
507
|
+
e("span", Ot, [
|
|
508
|
+
M.value.platform == "discord" && M.value.id == l.id ? (t(), a(T, { key: 0 }, [
|
|
509
|
+
b(" Confirm? ")
|
|
510
|
+
], 64)) : (t(), a(T, { key: 1 }, [
|
|
511
|
+
b(" ⛌ ")
|
|
512
|
+
], 64))
|
|
513
|
+
])
|
|
514
|
+
], 8, Xt)) : i("", !0)
|
|
515
|
+
]);
|
|
516
|
+
}), 128)),
|
|
517
|
+
j.value ? i("", !0) : (t(), W(oe, {
|
|
518
|
+
key: 0,
|
|
519
|
+
platform: "discord",
|
|
520
|
+
points: "+10",
|
|
521
|
+
disabled: u(s).isSimulationMode,
|
|
522
|
+
class: "_w-full"
|
|
523
|
+
}, {
|
|
524
|
+
default: P(() => [
|
|
525
|
+
b(_(y.value.length > 0 ? "Link Another Discord" : "Link Discord"), 1)
|
|
526
|
+
]),
|
|
527
|
+
_: 1
|
|
528
|
+
}, 8, ["disabled"]))
|
|
529
|
+
])
|
|
530
|
+
], 2),
|
|
531
|
+
e("section", {
|
|
532
|
+
class: A(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-last": !((ve = w.value) != null && ve.length) }])
|
|
533
|
+
}, [
|
|
534
|
+
w.value.length ? (t(), a("div", Gt, d[4] || (d[4] = [
|
|
535
|
+
e("h3", { class: "_text-mlg _opacity-30 _weight-bold" }, "twitter", -1)
|
|
536
|
+
]))) : i("", !0),
|
|
537
|
+
e("ul", Zt, [
|
|
538
|
+
(t(!0), a(T, null, ie(w.value, (l) => {
|
|
539
|
+
var $, F, Y;
|
|
540
|
+
return t(), a("li", {
|
|
541
|
+
key: l.id,
|
|
542
|
+
class: "_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg"
|
|
543
|
+
}, [
|
|
544
|
+
e("div", qt, [
|
|
545
|
+
e("button", {
|
|
546
|
+
class: A(["_size-11 _flex _items-stretch _p-1.5 _group _overflow-hidden _rounded-md", [
|
|
547
|
+
{
|
|
548
|
+
"_shadow-panel": l.avatar,
|
|
549
|
+
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === (($ = u(s).user) == null ? void 0 : $.avatar)
|
|
550
|
+
}
|
|
551
|
+
]]),
|
|
552
|
+
disabled: !l.avatar
|
|
553
|
+
}, [
|
|
554
|
+
l.avatar ? (t(), a("div", {
|
|
555
|
+
key: 0,
|
|
556
|
+
onClick: () => J("twitter", l.id),
|
|
557
|
+
style: { background: "none" },
|
|
558
|
+
type: "button",
|
|
559
|
+
title: "Set as profile avatar"
|
|
560
|
+
}, [
|
|
561
|
+
e("img", {
|
|
562
|
+
src: `${l.avatar}`,
|
|
563
|
+
class: A(["_size-full _rounded-full _duration-150", {
|
|
564
|
+
"group-hover:_scale-[1.8]": l.avatar !== ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
565
|
+
}])
|
|
566
|
+
}, null, 10, aa)
|
|
567
|
+
], 8, ta)) : (t(), a("div", sa, d[5] || (d[5] = [
|
|
568
|
+
e("img", {
|
|
569
|
+
src: Le,
|
|
570
|
+
class: "_size-6 _rounded",
|
|
571
|
+
style: { "background-color": "#000" }
|
|
572
|
+
}, null, -1)
|
|
573
|
+
])))
|
|
574
|
+
], 10, ea),
|
|
575
|
+
e("div", la, [
|
|
576
|
+
e("div", na, _(l.username), 1),
|
|
577
|
+
(Y = l.metadata) != null && Y.verified ? (t(), a("div", oa, " verified ✓ ")) : i("", !0)
|
|
578
|
+
])
|
|
579
|
+
]),
|
|
580
|
+
I.value > 1 ? (t(), a("button", {
|
|
581
|
+
key: 0,
|
|
582
|
+
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
583
|
+
onClick: (le) => E("twitter", l.id, le),
|
|
584
|
+
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
585
|
+
"aria-label": "Remove"
|
|
586
|
+
}, [
|
|
587
|
+
e("span", ia, [
|
|
588
|
+
M.value.platform == "twitter" && M.value.id == l.id ? (t(), a(T, { key: 0 }, [
|
|
589
|
+
b(" Confirm? ")
|
|
590
|
+
], 64)) : (t(), a(T, { key: 1 }, [
|
|
591
|
+
b(" ⛌ ")
|
|
592
|
+
], 64))
|
|
593
|
+
])
|
|
594
|
+
], 8, ra)) : i("", !0)
|
|
595
|
+
]);
|
|
596
|
+
}), 128)),
|
|
597
|
+
R.value ? i("", !0) : (t(), W(oe, {
|
|
598
|
+
key: 0,
|
|
599
|
+
platform: "twitter",
|
|
600
|
+
points: "+10",
|
|
601
|
+
disabled: u(s).isSimulationMode,
|
|
602
|
+
class: "_w-full"
|
|
603
|
+
}, {
|
|
604
|
+
default: P(() => [
|
|
605
|
+
b(_(w.value.length > 0 ? "Link Another TwitterX" : "Link TwitterX"), 1)
|
|
606
|
+
]),
|
|
607
|
+
_: 1
|
|
608
|
+
}, 8, ["disabled"]))
|
|
609
|
+
])
|
|
610
|
+
], 2),
|
|
611
|
+
e("section", {
|
|
612
|
+
class: A(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-last": !((pe = m.value) != null && pe.length) }])
|
|
613
|
+
}, [
|
|
614
|
+
m.value.length ? (t(), a("div", ua, d[6] || (d[6] = [
|
|
615
|
+
e("h3", { class: "_text-mlg _opacity-30 _weight-bold" }, "telegram", -1)
|
|
616
|
+
]))) : i("", !0),
|
|
617
|
+
e("ul", ca, [
|
|
618
|
+
(t(!0), a(T, null, ie(m.value, (l) => {
|
|
619
|
+
var $, F;
|
|
620
|
+
return t(), a("li", {
|
|
621
|
+
key: l.id,
|
|
622
|
+
class: "_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg"
|
|
623
|
+
}, [
|
|
624
|
+
e("div", da, [
|
|
625
|
+
e("button", {
|
|
626
|
+
class: A(["_size-11 _flex _items-stretch _p-1.5 _group _overflow-hidden _rounded-md", [
|
|
627
|
+
{
|
|
628
|
+
"_shadow-panel": l.avatar,
|
|
629
|
+
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === (($ = u(s).user) == null ? void 0 : $.avatar)
|
|
630
|
+
}
|
|
631
|
+
]]),
|
|
632
|
+
disabled: !l.avatar
|
|
633
|
+
}, [
|
|
634
|
+
l.avatar ? (t(), a("div", {
|
|
635
|
+
key: 0,
|
|
636
|
+
onClick: () => J("telegram", l.id),
|
|
637
|
+
style: { background: "none" },
|
|
638
|
+
type: "button",
|
|
639
|
+
title: "Set as profile avatar"
|
|
640
|
+
}, [
|
|
641
|
+
e("img", {
|
|
642
|
+
src: `${l.avatar}`,
|
|
643
|
+
class: A(["_size-full _rounded-full _duration-150", {
|
|
644
|
+
"group-hover:_scale-[1.8]": l.avatar !== ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
645
|
+
}])
|
|
646
|
+
}, null, 10, ma)
|
|
647
|
+
], 8, fa)) : (t(), a("div", va, d[7] || (d[7] = [
|
|
648
|
+
e("img", {
|
|
649
|
+
src: je,
|
|
650
|
+
class: "_size-6 _rounded",
|
|
651
|
+
style: { "background-color": "#0088cc" }
|
|
652
|
+
}, null, -1)
|
|
653
|
+
])))
|
|
654
|
+
], 10, _a),
|
|
655
|
+
e("div", pa, [
|
|
656
|
+
e("div", ga, _(l.username), 1)
|
|
657
|
+
])
|
|
658
|
+
]),
|
|
659
|
+
I.value > 1 ? (t(), a("button", {
|
|
660
|
+
key: 0,
|
|
661
|
+
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
662
|
+
onClick: (Y) => E("telegram", l.id, Y),
|
|
663
|
+
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
664
|
+
"aria-label": "Remove"
|
|
665
|
+
}, [
|
|
666
|
+
e("span", ya, [
|
|
667
|
+
M.value.platform == "telegram" && M.value.id == l.id ? (t(), a(T, { key: 0 }, [
|
|
668
|
+
b(" Confirm? ")
|
|
669
|
+
], 64)) : (t(), a(T, { key: 1 }, [
|
|
670
|
+
b(" ⛌ ")
|
|
671
|
+
], 64))
|
|
672
|
+
])
|
|
673
|
+
], 8, ha)) : i("", !0)
|
|
674
|
+
]);
|
|
675
|
+
}), 128)),
|
|
676
|
+
Q.value ? i("", !0) : (t(), a(T, { key: 0 }, [
|
|
677
|
+
Q.value ? i("", !0) : (t(), W(oe, {
|
|
678
|
+
key: 0,
|
|
679
|
+
platform: "telegram",
|
|
680
|
+
points: "+10",
|
|
681
|
+
disabled: u(s).isSimulationMode
|
|
682
|
+
}, {
|
|
683
|
+
default: P(() => [
|
|
684
|
+
b(_(m.value.length > 0 ? "Link Another Telegram" : "Link Telegram"), 1)
|
|
685
|
+
]),
|
|
686
|
+
_: 1
|
|
687
|
+
}, 8, ["disabled"]))
|
|
688
|
+
], 64))
|
|
689
|
+
])
|
|
690
|
+
], 2),
|
|
691
|
+
e("section", {
|
|
692
|
+
class: A(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-first": u(s).isFarcaster }])
|
|
693
|
+
}, [
|
|
694
|
+
z.value.length ? (t(), a("div", ba, d[8] || (d[8] = [
|
|
695
|
+
e("h3", { class: "_text-mlg _opacity-30 _weight-bold" }, "farcaster", -1)
|
|
696
|
+
]))) : i("", !0),
|
|
697
|
+
e("ul", xa, [
|
|
698
|
+
(t(!0), a(T, null, ie(z.value, (l) => {
|
|
699
|
+
var $, F;
|
|
700
|
+
return t(), a("li", {
|
|
701
|
+
key: l.id
|
|
702
|
+
}, [
|
|
703
|
+
e("div", wa, [
|
|
704
|
+
e("div", ka, [
|
|
705
|
+
e("button", {
|
|
706
|
+
class: A(["_size-11 _flex _items-stretch _p-1.5 _group _overflow-hidden _rounded-md", [
|
|
707
|
+
{
|
|
708
|
+
"_shadow-panel": l.avatar,
|
|
709
|
+
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === (($ = u(s).user) == null ? void 0 : $.avatar)
|
|
710
|
+
}
|
|
711
|
+
]]),
|
|
712
|
+
disabled: !l.avatar
|
|
713
|
+
}, [
|
|
714
|
+
l.avatar ? (t(), a("div", {
|
|
715
|
+
key: 0,
|
|
716
|
+
onClick: () => J("farcaster", l.id),
|
|
717
|
+
style: { background: "none" },
|
|
718
|
+
type: "button",
|
|
719
|
+
title: "Set as profile avatar"
|
|
720
|
+
}, [
|
|
721
|
+
e("img", {
|
|
722
|
+
src: `${l.avatar}`,
|
|
723
|
+
class: A(["_size-full _rounded-full _duration-150", {
|
|
724
|
+
"group-hover:_scale-[1.8]": l.avatar !== ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
725
|
+
}])
|
|
726
|
+
}, null, 10, Sa)
|
|
727
|
+
], 8, Ca)) : (t(), a("div", Ua, d[9] || (d[9] = [
|
|
728
|
+
e("img", {
|
|
729
|
+
src: $e,
|
|
730
|
+
class: "_size-6 _rounded",
|
|
731
|
+
style: { "background-color": "#000" }
|
|
732
|
+
}, null, -1)
|
|
733
|
+
])))
|
|
734
|
+
], 10, Aa),
|
|
735
|
+
e("div", za, [
|
|
736
|
+
e("div", Ta, _(l.username), 1)
|
|
737
|
+
])
|
|
738
|
+
]),
|
|
739
|
+
I.value > 1 ? (t(), a("button", {
|
|
740
|
+
key: 0,
|
|
741
|
+
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
742
|
+
onClick: (Y) => E("farcaster", l.id, Y),
|
|
743
|
+
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
744
|
+
"aria-label": "Remove"
|
|
745
|
+
}, [
|
|
746
|
+
e("span", Da, [
|
|
747
|
+
M.value.platform == "farcaster" && M.value.id == l.id ? (t(), a(T, { key: 0 }, [
|
|
748
|
+
b(" Confirm? ")
|
|
749
|
+
], 64)) : (t(), a(T, { key: 1 }, [
|
|
750
|
+
b(" ⛌ ")
|
|
751
|
+
], 64))
|
|
752
|
+
])
|
|
753
|
+
], 8, Ba)) : i("", !0)
|
|
754
|
+
])
|
|
755
|
+
]);
|
|
756
|
+
}), 128)),
|
|
757
|
+
N.value ? i("", !0) : (t(), W(oe, {
|
|
758
|
+
key: 0,
|
|
759
|
+
platform: "farcaster",
|
|
760
|
+
points: "+10",
|
|
761
|
+
disabled: u(s).isSimulationMode,
|
|
762
|
+
class: "_w-full"
|
|
763
|
+
}, {
|
|
764
|
+
default: P(() => [
|
|
765
|
+
b(_(z.value.length > 0 ? "Link Another Farcaster" : "Link Farcaster"), 1)
|
|
766
|
+
]),
|
|
767
|
+
_: 1
|
|
768
|
+
}, 8, ["disabled"])),
|
|
769
|
+
S.value && !S.value.client.added && D.value ? (t(), W(oe, {
|
|
770
|
+
key: 1,
|
|
771
|
+
platform: "farcaster",
|
|
772
|
+
points: "+10",
|
|
773
|
+
disabled: u(s).isSimulationMode,
|
|
774
|
+
class: "_w-full",
|
|
775
|
+
onClick: B
|
|
776
|
+
}, {
|
|
777
|
+
default: P(() => d[10] || (d[10] = [
|
|
778
|
+
b(" Add this Mini App ")
|
|
779
|
+
])),
|
|
780
|
+
_: 1
|
|
781
|
+
}, 8, ["disabled"])) : i("", !0)
|
|
782
|
+
])
|
|
783
|
+
], 2),
|
|
784
|
+
e("footer", { class: "_order-last _bg-metallic-cone _p-4 _rounded-lg _shadow-panel" }, [
|
|
785
|
+
e("div", { class: "_w-full" }, [
|
|
786
|
+
e("button", {
|
|
787
|
+
onClick: se,
|
|
788
|
+
class: "_bubble-btn-full _h-16 _text-lg _bold"
|
|
789
|
+
}, d[11] || (d[11] = [
|
|
790
|
+
e("span", null, "logout 💤", -1)
|
|
791
|
+
]))
|
|
792
|
+
])
|
|
793
|
+
])
|
|
794
|
+
], 2);
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
}, Ma = { class: "_bg-metallic-linear _shadow-panel _p-4 _space-y-2 _rounded-lg" }, La = { class: "_flex _items-center _justify-between _-mt-1.5" }, ja = {
|
|
798
|
+
key: 0,
|
|
799
|
+
class: "_text-sm _text-red-400"
|
|
800
|
+
}, $a = {
|
|
801
|
+
key: 1,
|
|
802
|
+
class: "_space-y-4"
|
|
803
|
+
}, Fa = { class: "_flex _flex-col _gap-0.5" }, Ha = {
|
|
804
|
+
key: 0,
|
|
805
|
+
class: "_bg-metallic-linear _shadow-panel _p-3 _rounded-lg _flex _flex-col _gap-2.5"
|
|
806
|
+
}, Ya = { class: "_w-full _flex _flex-col _gap-1.5" }, Ia = { class: "_text-xs _text-center _opacity-40" }, Pa = { class: "_font-mono" }, Ra = {
|
|
807
|
+
key: 0,
|
|
808
|
+
class: "_flex _flex-wrap _gap-[inherit] _text-center"
|
|
809
|
+
}, Wa = { class: "_flex-1 _bg-metallic-linear _shadow-panel _rounded-lg _p-3" }, Qa = { class: "_text-3xl _font-bold _text-primary _leading-tight" }, Ea = { class: "_flex-1 _bg-metallic-linear _shadow-panel _rounded-lg _p-3" }, Ka = { class: "_text-md" }, Va = {
|
|
810
|
+
key: 0,
|
|
811
|
+
class: "_bg-metallic-linear _shadow-panel _p-3 _rounded-lg _space-y-2"
|
|
812
|
+
}, Ja = { class: "_flex _items-center _gap-2" }, Xa = ["disabled"], Oa = ["disabled"], Ga = {
|
|
813
|
+
key: 0,
|
|
814
|
+
class: "_text-xs _text-red-500"
|
|
815
|
+
}, Za = {
|
|
816
|
+
key: 1,
|
|
817
|
+
class: "_text-xs _text-emerald-300"
|
|
818
|
+
}, qa = {
|
|
819
|
+
key: 1,
|
|
820
|
+
class: "_text-base"
|
|
821
|
+
}, es = { class: "_font-semibold" }, ts = /* @__PURE__ */ We({
|
|
822
|
+
__name: "ReferralSection",
|
|
823
|
+
setup(x) {
|
|
824
|
+
const s = ue("TrifleHub/store"), { backendUrl: C } = Ce(s), r = h(!0), S = h(null), D = h({
|
|
825
|
+
invited: 0,
|
|
826
|
+
qualified: 0,
|
|
827
|
+
points: 0
|
|
828
|
+
}), B = h(""), o = h(null), y = v(() => !!o.value), z = h(""), w = h(!1), m = h(""), j = h(!1), N = h(!1), R = v(() => {
|
|
829
|
+
var p;
|
|
830
|
+
return ((p = s == null ? void 0 : s.user) == null ? void 0 : p.username) || "";
|
|
831
|
+
}), Q = v(() => o.value ? o.value.username || o.value.displayName : "someone"), I = v(() => {
|
|
832
|
+
const p = B.value || R.value;
|
|
833
|
+
return p ? `${window.location.origin}#ref=${p}` : "";
|
|
834
|
+
});
|
|
835
|
+
v(() => I.value.replace("https://", ""));
|
|
836
|
+
const M = () => {
|
|
837
|
+
const p = {
|
|
838
|
+
"Content-Type": "application/json"
|
|
839
|
+
};
|
|
840
|
+
return s != null && s.authToken && (p.Authorization = `Bearer ${s.authToken}`), p;
|
|
841
|
+
}, E = async () => {
|
|
842
|
+
r.value = !0, S.value = null;
|
|
843
|
+
try {
|
|
844
|
+
if (!C.value || !(s != null && s.isAuthenticated)) {
|
|
845
|
+
r.value = !1;
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
const p = await fetch(`${C.value}/profile/me`, {
|
|
849
|
+
headers: {
|
|
850
|
+
Authorization: `Bearer ${s.authToken}`
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
let f = null;
|
|
854
|
+
try {
|
|
855
|
+
f = await p.json();
|
|
856
|
+
} catch {
|
|
857
|
+
}
|
|
858
|
+
if (!p.ok) {
|
|
859
|
+
const L = f && f.error || "";
|
|
860
|
+
if (p.status === 404 || /no route matches/i.test(L)) {
|
|
861
|
+
r.value = !1;
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
S.value = L || `failed to load referrals (status ${p.status})`;
|
|
865
|
+
return;
|
|
866
|
+
}
|
|
867
|
+
D.value = f.referralStats || { invited: 0, qualified: 0, points: 0 }, B.value = f.referralCode || "", o.value = f.referrer || null;
|
|
868
|
+
} catch (p) {
|
|
869
|
+
console.error("Referral profile fetch error:", p), S.value = p.message || "error loading referrals";
|
|
870
|
+
} finally {
|
|
871
|
+
r.value = !1;
|
|
872
|
+
}
|
|
873
|
+
}, V = () => {
|
|
874
|
+
I.value && (navigator.clipboard.writeText(I.value), N.value = !0, setTimeout(() => {
|
|
875
|
+
N.value = !1;
|
|
876
|
+
}, 2e3));
|
|
877
|
+
}, ae = (p) => {
|
|
878
|
+
const f = p.trim();
|
|
879
|
+
try {
|
|
880
|
+
const L = new URL(f);
|
|
881
|
+
if (L.hash) {
|
|
882
|
+
const d = new URLSearchParams(L.hash.substring(1)).get("ref");
|
|
883
|
+
if (d) return d;
|
|
884
|
+
}
|
|
885
|
+
const J = L.searchParams.get("ref");
|
|
886
|
+
if (J) return J;
|
|
887
|
+
} catch {
|
|
888
|
+
}
|
|
889
|
+
return f;
|
|
890
|
+
}, se = async () => {
|
|
891
|
+
const p = ae(z.value);
|
|
892
|
+
if (!(!p || w.value)) {
|
|
893
|
+
w.value = !0, m.value = "", j.value = !1;
|
|
894
|
+
try {
|
|
895
|
+
const f = await fetch(`${C.value}/profile/referral`, {
|
|
896
|
+
method: "POST",
|
|
897
|
+
headers: M(),
|
|
898
|
+
body: JSON.stringify({ referralCode: p })
|
|
899
|
+
}), L = await f.json();
|
|
900
|
+
if (!f.ok) {
|
|
901
|
+
L.error === "Already referred" ? m.value = "You already have a referrer" : L.error === "Invalid referral code" ? m.value = "Invalid referral code" : L.error === "Cannot refer yourself" ? m.value = "You can't use your own code" : m.value = L.error || "Something went wrong";
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
j.value = !0, z.value = "", await E();
|
|
905
|
+
} catch (f) {
|
|
906
|
+
console.error("Referral submit error:", f), m.value = f.message || "Something went wrong";
|
|
907
|
+
} finally {
|
|
908
|
+
w.value = !1;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
};
|
|
912
|
+
return we(() => {
|
|
913
|
+
E();
|
|
914
|
+
}), (p, f) => (t(), a("section", {
|
|
915
|
+
class: A(["_w-full _max-w-2xl", p.$attrs.class])
|
|
916
|
+
}, [
|
|
917
|
+
e("section", Ma, [
|
|
918
|
+
e("div", La, [
|
|
919
|
+
e("h3", {
|
|
920
|
+
class: A(["_text-mlg _weight-bold", { "_animate-pulse-deep": r.value }])
|
|
921
|
+
}, f[1] || (f[1] = [
|
|
922
|
+
e("span", { class: "_opacity-30" }, "invites", -1)
|
|
923
|
+
]), 2)
|
|
924
|
+
]),
|
|
925
|
+
S.value ? (t(), a("div", ja, _(S.value), 1)) : (t(), a("div", $a, [
|
|
926
|
+
e("section", Fa, [
|
|
927
|
+
B.value ? (t(), a("div", Ha, [
|
|
928
|
+
f[5] || (f[5] = e("div", { class: "_text-base" }, [
|
|
929
|
+
b(" Invite a friend and "),
|
|
930
|
+
e("u", null, "you both"),
|
|
931
|
+
b(" get "),
|
|
932
|
+
e("span", { class: "_font-semiboldff _whitespace-nowrap" }, "10🪩"),
|
|
933
|
+
b(" for every 100🪩 they earn ")
|
|
934
|
+
], -1)),
|
|
935
|
+
e("div", Ya, [
|
|
936
|
+
e("button", {
|
|
937
|
+
class: "_flex-1 _bubble-btn _py-[1em] _text-base",
|
|
938
|
+
style: { filter: "hue-rotate(20deg) saturate(3)" },
|
|
939
|
+
onClick: V
|
|
940
|
+
}, _(N.value ? "Copied!" : "Copy Invite Link"), 1),
|
|
941
|
+
e("div", Ia, [
|
|
942
|
+
f[2] || (f[2] = b(" code: ")),
|
|
943
|
+
e("span", Pa, _(B.value || R.value), 1)
|
|
944
|
+
])
|
|
945
|
+
]),
|
|
946
|
+
D.value.invited > 0 ? (t(), a("div", Ra, [
|
|
947
|
+
e("div", Wa, [
|
|
948
|
+
e("div", Qa, _(D.value.invited), 1),
|
|
949
|
+
f[3] || (f[3] = e("div", { class: "_text-md" }, "invited", -1))
|
|
950
|
+
]),
|
|
951
|
+
e("div", Ea, [
|
|
952
|
+
e("div", {
|
|
953
|
+
class: A(["_text-3xl _font-bold _leading-tight", { "_text-primary": !D.value.points }])
|
|
954
|
+
}, [
|
|
955
|
+
b(_(D.value.points) + " ", 1),
|
|
956
|
+
D.value.points > 0 ? (t(), a(T, { key: 0 }, [
|
|
957
|
+
b("🪩")
|
|
958
|
+
], 64)) : i("", !0)
|
|
959
|
+
], 2),
|
|
960
|
+
e("div", Ka, [
|
|
961
|
+
D.value.points ? i("", !0) : (t(), a(T, { key: 0 }, [
|
|
962
|
+
b("🪩 ")
|
|
963
|
+
], 64)),
|
|
964
|
+
f[4] || (f[4] = b("earned"))
|
|
965
|
+
])
|
|
966
|
+
])
|
|
967
|
+
])) : i("", !0),
|
|
968
|
+
e("div", {
|
|
969
|
+
class: A(["_text-gray-500 _text-xs _-mb-0.5", { "_text-center": D.value.invited > 0, "_text-right": D.value.invited === 0 }])
|
|
970
|
+
}, " Max 100🪩 per friend ", 2)
|
|
971
|
+
])) : i("", !0)
|
|
972
|
+
]),
|
|
973
|
+
y.value ? (t(), a("div", qa, [
|
|
974
|
+
e("div", null, [
|
|
975
|
+
f[7] || (f[7] = b(" invited by ")),
|
|
976
|
+
e("span", es, _(Q.value), 1)
|
|
977
|
+
]),
|
|
978
|
+
f[8] || (f[8] = e("div", { class: "_text-xs _opacity-30 _mt-0.5" }, " you'll both earn 10🪩 when you reach 100🪩! ", -1))
|
|
979
|
+
])) : (t(), a("div", Va, [
|
|
980
|
+
f[6] || (f[6] = e("div", { class: "_text-base" }, "Have an invite?", -1)),
|
|
981
|
+
e("div", Ja, [
|
|
982
|
+
_e(e("input", {
|
|
983
|
+
"onUpdate:modelValue": f[0] || (f[0] = (L) => z.value = L),
|
|
984
|
+
type: "text",
|
|
985
|
+
placeholder: "enter code or invite link",
|
|
986
|
+
class: "_flex-1 _bg-metallic-linear _shadow-panel-inset _rounded-lg _px-3 _h-10 _text-sm _min-w-0",
|
|
987
|
+
disabled: w.value,
|
|
988
|
+
onKeyup: ke(se, ["enter"])
|
|
989
|
+
}, null, 40, Xa), [
|
|
990
|
+
[Ae, z.value]
|
|
991
|
+
]),
|
|
992
|
+
e("button", {
|
|
993
|
+
class: "_bubble-btn _h-12 _text-sm _text-stroke-md _px-[1.5em] _font-bold",
|
|
994
|
+
disabled: !z.value.trim() || w.value,
|
|
995
|
+
style: fe({
|
|
996
|
+
filter: z.value.trim().length > 0 && !w.value ? "hue-rotate(20deg) saturate(3)" : "none"
|
|
997
|
+
}),
|
|
998
|
+
onClick: se
|
|
999
|
+
}, [
|
|
1000
|
+
e("span", {
|
|
1001
|
+
class: A({ "_opacity-30": !z.value.trim() || w.value })
|
|
1002
|
+
}, _(w.value ? "Sending..." : "Apply"), 3)
|
|
1003
|
+
], 12, Oa)
|
|
1004
|
+
]),
|
|
1005
|
+
m.value ? (t(), a("div", Ga, _(m.value), 1)) : i("", !0),
|
|
1006
|
+
j.value ? (t(), a("div", Za, "invite code applied!")) : i("", !0)
|
|
1007
|
+
]))
|
|
1008
|
+
]))
|
|
1009
|
+
])
|
|
1010
|
+
], 2));
|
|
1011
|
+
}
|
|
1012
|
+
}), as = { class: "_flex _w-full _gap-2.5 _items-stretch" }, ss = { class: "_size-9 _flex-shrink-0" }, ls = ["src"], ns = { class: "_flex-1 _flex _flex-col _gap-[0.25em] _justify-center _min-h-8 _text-left _leading-normal _min-w-0" }, os = { class: "_min-w-0 _leading-[1.1]" }, rs = {
|
|
1013
|
+
key: 0,
|
|
1014
|
+
class: "_weight-semiboldff"
|
|
1015
|
+
}, is = {
|
|
1016
|
+
key: 0,
|
|
1017
|
+
class: "_text-em-2xs _opacity-25 _leading-tight _flex _gap-[0.35em] _truncate"
|
|
1018
|
+
}, us = { class: "_flex _items-center _h-9 _text-em-sm _flex-shrink-0 sm:_text-mlg" }, cs = { class: "_rounded-full _bg-metallic-linear _shadow-panel _pl-[0.5em] _pr-[0.25em] _flex _gap-[0.15em]" }, ds = {
|
|
1019
|
+
__name: "PointCard",
|
|
1020
|
+
props: { point: Object },
|
|
1021
|
+
setup(x) {
|
|
1022
|
+
const s = x, C = v(
|
|
1023
|
+
() => Oe.find((o) => o.name === s.point.name || o.id === s.point.name)
|
|
1024
|
+
), r = (o) => {
|
|
1025
|
+
if (!o) return "";
|
|
1026
|
+
const y = /* @__PURE__ */ new Date(), z = new Date(o), w = y - z, m = Math.floor(w / (1e3 * 60)), j = Math.floor(w / (1e3 * 60 * 60)), N = Math.floor(w / (1e3 * 60 * 60 * 24)), R = Math.floor(N / 7), Q = Math.floor(N / 30), I = Math.floor(N / 365);
|
|
1027
|
+
return m < 60 ? `${m}m` : j < 24 ? `${j}h` : N < 7 ? `${N}d` : R < 4 ? `${R}wk` : Q < 12 ? `${Q}mo` : `${I}y`;
|
|
1028
|
+
}, S = (o) => (o = Number(o), o % 1 === 0 ? o : o.toFixed(2)), D = (o) => {
|
|
1029
|
+
if (!o) return "";
|
|
1030
|
+
const y = new Date(o), z = y.toLocaleString("en-US", { month: "short" }).toUpperCase(), w = y.toLocaleString("en-US", { day: "2-digit" });
|
|
1031
|
+
return `${z} ${w}`;
|
|
1032
|
+
}, B = v(() => {
|
|
1033
|
+
var y;
|
|
1034
|
+
let o;
|
|
1035
|
+
try {
|
|
1036
|
+
o = new URL((y = C.value) == null ? void 0 : y.link), ["farcaster", "discord"].includes(o.host.split(".")[0]) && (o = { host: "trifle", origin: o.href });
|
|
1037
|
+
} catch {
|
|
1038
|
+
}
|
|
1039
|
+
return o;
|
|
1040
|
+
});
|
|
1041
|
+
return (o, y) => (t(), W(Qe(B.value ? "a" : "div"), Ee(B.value ? { href: B.value.origin, target: "_blank" } : {}, {
|
|
1042
|
+
class: ["_bg-metallic-linear _shadow-panel _w-full _p-2 _px-2.5 _pr-3 _rounded-lg _block _flex _items-center _min-h-14", { "mouse:hover:_scale-[1.01] _origin-center _duration-150 _group": B.value }]
|
|
1043
|
+
}), {
|
|
1044
|
+
default: P(() => {
|
|
1045
|
+
var z, w;
|
|
1046
|
+
return [
|
|
1047
|
+
e("header", as, [
|
|
1048
|
+
e("div", ss, [
|
|
1049
|
+
C.value && C.value.icon ? (t(), a("img", {
|
|
1050
|
+
key: 0,
|
|
1051
|
+
src: C.value.icon,
|
|
1052
|
+
class: "_w-full _h-full _rounded-lg _block"
|
|
1053
|
+
}, null, 8, ls)) : i("", !0)
|
|
1054
|
+
]),
|
|
1055
|
+
e("div", ns, [
|
|
1056
|
+
e("div", os, [
|
|
1057
|
+
x.point.name === "anybody-daily" ? (t(), a(T, { key: 0 }, [
|
|
1058
|
+
b("Solved " + _(D(x.point.createdAt)), 1)
|
|
1059
|
+
], 64)) : x.point.name === "gm" ? (t(), a(T, { key: 1 }, [
|
|
1060
|
+
b('"' + _(x.point.extra) + '"', 1)
|
|
1061
|
+
], 64)) : x.point.name === "gm-react" ? (t(), a(T, { key: 2 }, [
|
|
1062
|
+
b(_(!x.point.giver || x.point.giver === "???" ? "someone" : x.point.giver) + " ♥︎ ", 1),
|
|
1063
|
+
x.point.gmMessage ? (t(), a("span", rs, '"' + _(x.point.gmMessage) + '"', 1)) : (t(), a(T, { key: 1 }, [
|
|
1064
|
+
b("your gm")
|
|
1065
|
+
], 64))
|
|
1066
|
+
], 64)) : (t(), a(T, { key: 3 }, [
|
|
1067
|
+
b(_(((z = C.value) == null ? void 0 : z.activityText) || ((w = C.value) == null ? void 0 : w.name) || x.point.name), 1)
|
|
1068
|
+
], 64))
|
|
1069
|
+
]),
|
|
1070
|
+
B.value ? (t(), a("div", is, [
|
|
1071
|
+
e("span", null, _(r(x.point.createdAt)), 1),
|
|
1072
|
+
y[0] || (y[0] = e("span", null, "·", -1)),
|
|
1073
|
+
e("u", null, _(B.value.host), 1)
|
|
1074
|
+
])) : i("", !0)
|
|
1075
|
+
]),
|
|
1076
|
+
e("div", us, [
|
|
1077
|
+
e("div", cs, [
|
|
1078
|
+
e("span", null, _(S(x.point.value)), 1),
|
|
1079
|
+
y[1] || (y[1] = e("div", null, "🪩", -1))
|
|
1080
|
+
])
|
|
1081
|
+
])
|
|
1082
|
+
])
|
|
1083
|
+
];
|
|
1084
|
+
}),
|
|
1085
|
+
_: 1
|
|
1086
|
+
}, 16, ["class"]));
|
|
1087
|
+
}
|
|
1088
|
+
}, _s = {
|
|
1089
|
+
key: 0,
|
|
1090
|
+
class: "_flex _flex-col _gap-2"
|
|
1091
|
+
}, fs = {
|
|
1092
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1093
|
+
class: "_size-5 _opacity-60",
|
|
1094
|
+
fill: "none",
|
|
1095
|
+
viewBox: "0 0 24 24",
|
|
1096
|
+
stroke: "currentColor",
|
|
1097
|
+
style: { "pointer-events": "none" }
|
|
1098
|
+
}, ms = {
|
|
1099
|
+
key: 1,
|
|
1100
|
+
class: "_bg-metallic-linear _shadow-panel _rounded-lg _p-3 _space-y-2 _min-w-[200px]"
|
|
1101
|
+
}, vs = {
|
|
1102
|
+
key: 0,
|
|
1103
|
+
class: "_text-xs _font-semibold _text-center _bg-yellow-500/20 _border _border-yellow-500/40 _rounded _py-1"
|
|
1104
|
+
}, ps = {
|
|
1105
|
+
key: 1,
|
|
1106
|
+
class: "_space-y-2"
|
|
1107
|
+
}, gs = ["disabled"], hs = {
|
|
1108
|
+
key: 0,
|
|
1109
|
+
class: "_h-12 _flex _items-center _gap-1 _w-full _justify-center _border _border-transparent"
|
|
1110
|
+
}, ys = { class: "_text-stroke-2xl _min-w-0 _px-0.5" }, bs = {
|
|
1111
|
+
key: 1,
|
|
1112
|
+
class: "_h-12 _flex _items-center _gap-1 _w-full _justify-center _border _border-transparent"
|
|
1113
|
+
}, xs = { class: "_flex _items-center _gap-1 _w-full _justify-center _pl-[1em]" }, ws = { class: "_text-stroke-2xl _min-w-0 _truncate _px-0.5" }, ks = { class: "_relative _h-12 _flex _items-stretch _gap-0.5 _px-1 _rounded-lg _shadow-panel-inset _text-center _bg-metallic-linear" }, As = { class: "_flex _justify-center _gap-2 _h-10 _items-center" }, Cs = ["href"], Ss = ["href"], Us = ["href"], zs = ["href"], Ts = { class: "_whitespace-nowrap _overflow-x-scroll _no-scrollbar _align-top _-ml-[2px] _p-[2px]" }, Bs = { class: "_flex _justify-end _text-2xl _pl-6" }, Ds = {
|
|
1114
|
+
key: 0,
|
|
1115
|
+
class: "_text-stroke-xl _animate-pulse-deep"
|
|
1116
|
+
}, Ns = {
|
|
1117
|
+
key: 1,
|
|
1118
|
+
class: "_text-stroke-xl"
|
|
1119
|
+
}, Ms = { class: "_inline-flex _flex-col _mr-2 _bg-metallic-linear _shadow-panel _px-3 _py-2 _pb-1.5 _rounded-lg" }, Ls = { class: "_flex _justify-end _text-2xl _gap-[0.1em] _pl-6" }, js = {
|
|
1120
|
+
key: 0,
|
|
1121
|
+
class: "_text-stroke-xl _animate-pulse-deep"
|
|
1122
|
+
}, $s = {
|
|
1123
|
+
key: 1,
|
|
1124
|
+
class: "_text-stroke-xl"
|
|
1125
|
+
}, Fs = { key: 2 }, Hs = { class: "_inline-flex _flex-col _bg-metallic-linear _shadow-panel _px-3 _py-2 _pb-1.5 _rounded-lg" }, Ys = { class: "_flex _justify-end _text-2xl _gap-[0.1em] _pl-6" }, Is = {
|
|
1126
|
+
key: 0,
|
|
1127
|
+
class: "_text-stroke-xl _animate-pulse-deep"
|
|
1128
|
+
}, Ps = {
|
|
1129
|
+
key: 1,
|
|
1130
|
+
class: "_text-stroke-xl"
|
|
1131
|
+
}, Rs = { key: 2 }, Ws = { class: "_w-full _max-w-2xl" }, Qs = { class: "_bg-metallic-linear _shadow-panel _p-4 _space-y-2 _rounded-lg" }, Es = { class: "_flex _items-center _justify-between _-mt-1.5" }, Ks = {
|
|
1132
|
+
key: 0,
|
|
1133
|
+
class: "_flex _items-center _gap-2"
|
|
1134
|
+
}, Vs = {
|
|
1135
|
+
key: 0,
|
|
1136
|
+
class: "_text-xs _opacity-30 _tracking-wide"
|
|
1137
|
+
}, Js = { key: 0 }, Xs = { class: "_flex _items-center _gap-1" }, Os = ["disabled"], Gs = ["disabled"], Zs = {
|
|
1138
|
+
key: 0,
|
|
1139
|
+
class: "_text-sm _text-red-400"
|
|
1140
|
+
}, qs = {
|
|
1141
|
+
key: 1,
|
|
1142
|
+
class: "_flex _flex-col _gap-4"
|
|
1143
|
+
}, el = { class: "_space-y-0.5" }, xe = 3, tl = {
|
|
1144
|
+
__name: "Profile",
|
|
1145
|
+
setup(x) {
|
|
1146
|
+
const s = Ke(() => import("./TrifleBall-BzjRmmn0.js")), C = ue("hub"), r = ue("TrifleHub/store"), { currentProfileUsername: S, backendUrl: D, user: B } = Ce(r), o = h(null), y = h(!0), z = h(null), w = h([]), m = h(!1), j = h(null), N = h(1), R = h(!1), Q = h(0), I = v(() => Math.max(1, Math.ceil(Q.value / xe))), M = h(null), E = h(0), V = h(!0), ae = v(() => {
|
|
1147
|
+
const c = M.value;
|
|
1148
|
+
if (!c || isNaN(c)) return "—";
|
|
1149
|
+
const n = Number(c), g = n % 10, U = n % 100;
|
|
1150
|
+
return g === 1 && U !== 11 ? `${n}st` : g === 2 && U !== 12 ? `${n}nd` : g === 3 && U !== 13 ? `${n}rd` : `${n}th`;
|
|
1151
|
+
}), se = v(
|
|
1152
|
+
() => Number(E.value || 0).toLocaleString("en-us")
|
|
1153
|
+
), p = v(() => {
|
|
1154
|
+
var c;
|
|
1155
|
+
return !((c = B.value) != null && c.username) || !S.value ? !1 : B.value.username === S.value;
|
|
1156
|
+
}), f = v(() => {
|
|
1157
|
+
var n, g;
|
|
1158
|
+
return (p.value ? r.getPlatformData("discord") || [] : ((g = (n = o.value) == null ? void 0 : n.linkedAccounts) == null ? void 0 : g.discord) || []).filter((U) => U.username);
|
|
1159
|
+
}), L = v(() => {
|
|
1160
|
+
var n, g;
|
|
1161
|
+
return (p.value ? r.getPlatformData("twitter") || [] : ((g = (n = o.value) == null ? void 0 : n.linkedAccounts) == null ? void 0 : g.twitter) || []).filter((U) => U.username);
|
|
1162
|
+
}), J = v(() => {
|
|
1163
|
+
var n, g;
|
|
1164
|
+
return (p.value ? r.getPlatformData("telegram") || [] : ((g = (n = o.value) == null ? void 0 : n.linkedAccounts) == null ? void 0 : g.telegram) || []).filter((U) => U.username);
|
|
1165
|
+
}), k = v(() => {
|
|
1166
|
+
var c, n;
|
|
1167
|
+
return p.value ? r.getPlatformData("farcaster") || [] : ((n = (c = o.value) == null ? void 0 : c.linkedAccounts) == null ? void 0 : n.farcaster) || [];
|
|
1168
|
+
}), d = v(() => f.value[0] || null), H = v(() => L.value[0] || null), X = v(() => J.value[0] || null), ee = v(() => k.value[0] || null), me = v(
|
|
1169
|
+
() => d.value ? `https://discord.com/users/${d.value.id}` : "#"
|
|
1170
|
+
), ve = v(
|
|
1171
|
+
() => H.value ? `https://x.com/${H.value.username}` : "#"
|
|
1172
|
+
), pe = v(
|
|
1173
|
+
() => X.value ? `https://t.me/${X.value.username}` : "#"
|
|
1174
|
+
), l = v(
|
|
1175
|
+
() => ee.value ? `https://warpcast.com/${ee.value.username}` : "#"
|
|
1176
|
+
), $ = async () => {
|
|
1177
|
+
y.value = !0, z.value = null;
|
|
1178
|
+
try {
|
|
1179
|
+
const c = await fetch(
|
|
1180
|
+
`${D.value}/auth/by-username?username=${encodeURIComponent(
|
|
1181
|
+
S.value
|
|
1182
|
+
)}`
|
|
1183
|
+
);
|
|
1184
|
+
if (!c.ok) throw new Error("Failed to fetch user");
|
|
1185
|
+
const n = await c.json();
|
|
1186
|
+
console.log({ data: n }), o.value = n.user, console.log({ user: o });
|
|
1187
|
+
} catch (c) {
|
|
1188
|
+
z.value = c.message;
|
|
1189
|
+
} finally {
|
|
1190
|
+
y.value = !1;
|
|
1191
|
+
}
|
|
1192
|
+
}, F = async () => {
|
|
1193
|
+
var c;
|
|
1194
|
+
V.value = !0;
|
|
1195
|
+
try {
|
|
1196
|
+
if (!D.value || !((c = o.value) != null && c.id)) return;
|
|
1197
|
+
const n = new URLSearchParams({
|
|
1198
|
+
sortBy: "count",
|
|
1199
|
+
sortDir: "desc",
|
|
1200
|
+
limit: "1",
|
|
1201
|
+
userId: String(o.value.id)
|
|
1202
|
+
}), g = await fetch(`${D.value}/balls/airdrop-points?${n.toString()}`);
|
|
1203
|
+
if (!g.ok) return;
|
|
1204
|
+
const U = await g.json();
|
|
1205
|
+
U.currentUser && (E.value = U.currentUser.totalBalls || 0, M.value = U.currentUser.rank || null);
|
|
1206
|
+
} catch (n) {
|
|
1207
|
+
console.error("Failed to fetch airdrop info", n);
|
|
1208
|
+
} finally {
|
|
1209
|
+
V.value = !1;
|
|
1210
|
+
}
|
|
1211
|
+
}, Y = async () => {
|
|
1212
|
+
m.value = !0, j.value = null;
|
|
1213
|
+
try {
|
|
1214
|
+
let c = `${D.value}/balls/list?page=${N.value}&limit=${xe}&username=${encodeURIComponent(S.value)}`;
|
|
1215
|
+
const n = await fetch(c);
|
|
1216
|
+
if (!n.ok) throw new Error("Failed to fetch points");
|
|
1217
|
+
const g = await n.json();
|
|
1218
|
+
w.value = g.data, R.value = g.data.length === xe, Q.value = g.total || 0;
|
|
1219
|
+
} catch (c) {
|
|
1220
|
+
j.value = c.message;
|
|
1221
|
+
} finally {
|
|
1222
|
+
m.value = !1;
|
|
1223
|
+
}
|
|
1224
|
+
}, le = () => {
|
|
1225
|
+
N.value > 1 && (N.value--, Y());
|
|
1226
|
+
}, ge = () => {
|
|
1227
|
+
R.value && (N.value++, Y());
|
|
1228
|
+
}, ce = async () => {
|
|
1229
|
+
if (!S.value) {
|
|
1230
|
+
y.value = !1;
|
|
1231
|
+
return;
|
|
1232
|
+
}
|
|
1233
|
+
await $(), await Promise.all([F(), Y()]);
|
|
1234
|
+
};
|
|
1235
|
+
we(async () => {
|
|
1236
|
+
console.log("onMounted", S.value), await ce();
|
|
1237
|
+
}), Be(S, async (c, n) => {
|
|
1238
|
+
!c || c === n || (N.value = 1, await ce());
|
|
1239
|
+
});
|
|
1240
|
+
const ne = h(!1);
|
|
1241
|
+
we(() => {
|
|
1242
|
+
setTimeout(() => {
|
|
1243
|
+
ne.value = !0;
|
|
1244
|
+
}, 350);
|
|
1245
|
+
});
|
|
1246
|
+
const O = h(!1), K = h(""), he = h(!1), Se = async () => {
|
|
1247
|
+
var c;
|
|
1248
|
+
if (K.value) {
|
|
1249
|
+
he.value = !0;
|
|
1250
|
+
try {
|
|
1251
|
+
await r.enterSimulationMode(K.value), O.value = !1, K.value = "", r.addNotification({
|
|
1252
|
+
message: `Entered simulation mode for user: ${(c = r.user) == null ? void 0 : c.username}`,
|
|
1253
|
+
type: "success"
|
|
1254
|
+
});
|
|
1255
|
+
} catch (n) {
|
|
1256
|
+
r.addNotification({
|
|
1257
|
+
message: n.message || "Failed to enter simulation mode",
|
|
1258
|
+
type: "error"
|
|
1259
|
+
});
|
|
1260
|
+
} finally {
|
|
1261
|
+
he.value = !1;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}, He = () => {
|
|
1265
|
+
r.exitSimulationMode(), O.value = !1, r.addNotification({
|
|
1266
|
+
message: "Exited simulation mode",
|
|
1267
|
+
type: "success"
|
|
1268
|
+
});
|
|
1269
|
+
}, ye = h(null), de = h(!1), G = h(""), Ue = h(!1), Z = h(""), ze = h(!1), te = h(!0);
|
|
1270
|
+
let be;
|
|
1271
|
+
const Ye = async (c) => {
|
|
1272
|
+
var g;
|
|
1273
|
+
if (!c) {
|
|
1274
|
+
te.value = !0, Z.value = "";
|
|
1275
|
+
return;
|
|
1276
|
+
}
|
|
1277
|
+
if (c === ((g = B.value) == null ? void 0 : g.username)) {
|
|
1278
|
+
te.value = !0, Z.value = "";
|
|
1279
|
+
return;
|
|
1280
|
+
}
|
|
1281
|
+
if (!/^(?!.*--)[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/.test(c)) {
|
|
1282
|
+
Z.value = "Username must be alphanumeric";
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1285
|
+
if (c.length > 22) {
|
|
1286
|
+
Z.value = "Username must be 22 characters or less";
|
|
1287
|
+
return;
|
|
1288
|
+
}
|
|
1289
|
+
ze.value = !0;
|
|
1290
|
+
try {
|
|
1291
|
+
const U = await fetch(
|
|
1292
|
+
`${D.value}/auth/username/check?username=${encodeURIComponent(c)}`
|
|
1293
|
+
);
|
|
1294
|
+
if (!U.ok) throw new Error("Failed to check username availability");
|
|
1295
|
+
const q = await U.json();
|
|
1296
|
+
te.value = q.available, Z.value = q.available ? "" : "This username is already taken";
|
|
1297
|
+
} catch (U) {
|
|
1298
|
+
console.error("Failed to check username:", U), Z.value = "Error checking username";
|
|
1299
|
+
} finally {
|
|
1300
|
+
ze.value = !1;
|
|
1301
|
+
}
|
|
1302
|
+
}, Ie = (c) => {
|
|
1303
|
+
const n = c.target.value.trim();
|
|
1304
|
+
G.value = n, Z.value = "", be && clearTimeout(be), n ? be = setTimeout(() => Ye(n), 500) : te.value = !0;
|
|
1305
|
+
}, Pe = async () => {
|
|
1306
|
+
var c, n, g;
|
|
1307
|
+
if (p.value) {
|
|
1308
|
+
if (r.isSimulationMode) {
|
|
1309
|
+
r.addNotification({
|
|
1310
|
+
message: "Cannot edit username in simulation mode",
|
|
1311
|
+
type: "error"
|
|
1312
|
+
});
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1315
|
+
Z.value = "", G.value = ((c = B.value) == null ? void 0 : c.username) || "", de.value = !0, te.value = !0, await Xe(), (n = ye.value) == null || n.focus(), (g = ye.value) == null || g.select();
|
|
1316
|
+
}
|
|
1317
|
+
}, Re = async () => {
|
|
1318
|
+
var c;
|
|
1319
|
+
if (!G.value.trim()) {
|
|
1320
|
+
r.addNotification({ type: "error", message: "Oops, name can't be empty!" });
|
|
1321
|
+
return;
|
|
1322
|
+
}
|
|
1323
|
+
if (!te.value) {
|
|
1324
|
+
r.addNotification({ type: "error", message: "This name is already taken" });
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
if (G.value.trim() === ((c = B.value) == null ? void 0 : c.username)) {
|
|
1328
|
+
de.value = !1;
|
|
1329
|
+
return;
|
|
1330
|
+
}
|
|
1331
|
+
Ue.value = !0;
|
|
1332
|
+
try {
|
|
1333
|
+
await r.updateUsername(G.value.trim()), de.value = !1, r.addNotification({ type: "success", message: "Name updated!" });
|
|
1334
|
+
} catch (n) {
|
|
1335
|
+
console.error("Failed to update name:", n), r.addNotification({ type: "error", message: "Hmm, something went wrong" });
|
|
1336
|
+
} finally {
|
|
1337
|
+
Ue.value = !1;
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
return (c, n) => (t(), W(it, null, Ve({
|
|
1341
|
+
"admin-controls": P(() => [
|
|
1342
|
+
p.value && u(r).isAdmin ? (t(), a("div", _s, [
|
|
1343
|
+
!O.value && !u(r).isSimulationMode ? (t(), a("button", {
|
|
1344
|
+
key: 0,
|
|
1345
|
+
class: "_p-2 _bg-metallic-linear _shadow-panel _rounded-full _cursor-pointer mouse:hover:_scale-110 _duration-150",
|
|
1346
|
+
onClick: n[0] || (n[0] = (g) => O.value = !0),
|
|
1347
|
+
title: "Admin Mode"
|
|
1348
|
+
}, [
|
|
1349
|
+
(t(), a("svg", fs, n[5] || (n[5] = [
|
|
1350
|
+
e("path", {
|
|
1351
|
+
"stroke-linecap": "round",
|
|
1352
|
+
"stroke-linejoin": "round",
|
|
1353
|
+
"stroke-width": "2",
|
|
1354
|
+
d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z",
|
|
1355
|
+
style: { "pointer-events": "none" }
|
|
1356
|
+
}, null, -1),
|
|
1357
|
+
e("path", {
|
|
1358
|
+
"stroke-linecap": "round",
|
|
1359
|
+
"stroke-linejoin": "round",
|
|
1360
|
+
"stroke-width": "2",
|
|
1361
|
+
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z",
|
|
1362
|
+
style: { "pointer-events": "none" }
|
|
1363
|
+
}, null, -1)
|
|
1364
|
+
])))
|
|
1365
|
+
])) : i("", !0),
|
|
1366
|
+
O.value || u(r).isSimulationMode ? (t(), a("div", ms, [
|
|
1367
|
+
u(r).isSimulationMode ? (t(), a("div", vs, " SIMULATION MODE ")) : i("", !0),
|
|
1368
|
+
u(r).isSimulationMode ? i("", !0) : (t(), a("div", ps, [
|
|
1369
|
+
_e(e("input", {
|
|
1370
|
+
"onUpdate:modelValue": n[1] || (n[1] = (g) => K.value = g),
|
|
1371
|
+
type: "text",
|
|
1372
|
+
placeholder: "Username or ID",
|
|
1373
|
+
autocomplete: "off",
|
|
1374
|
+
"data-1p-ignore": "",
|
|
1375
|
+
class: "_w-full _px-2 _py-1 _text-sm _font-normal _rounded _bg-black/20 _border _border-white/10 _outline-none focus:_border-white/30",
|
|
1376
|
+
onKeyup: ke(Se, ["enter"])
|
|
1377
|
+
}, null, 544), [
|
|
1378
|
+
[Ae, K.value]
|
|
1379
|
+
]),
|
|
1380
|
+
e("button", {
|
|
1381
|
+
class: "_w-full _px-3 _py-1 _text-sm _bg-blue-500/80 _rounded mouse:hover:_bg-blue-500 _duration-150",
|
|
1382
|
+
disabled: !K.value || he.value,
|
|
1383
|
+
onClick: Se
|
|
1384
|
+
}, _(he.value ? "Loading..." : "Simulate User"), 9, gs),
|
|
1385
|
+
e("button", {
|
|
1386
|
+
class: "_w-full _px-3 _py-1 _text-xs _bg-white/10 _rounded mouse:hover:_bg-white/20 _duration-150",
|
|
1387
|
+
onClick: n[2] || (n[2] = (g) => O.value = !1)
|
|
1388
|
+
}, " Cancel ")
|
|
1389
|
+
])),
|
|
1390
|
+
u(r).isSimulationMode ? (t(), a("button", {
|
|
1391
|
+
key: 2,
|
|
1392
|
+
class: "_w-full _px-3 _py-1.5 _text-sm _bg-red-500/80 _rounded mouse:hover:_bg-red-500 _duration-150 _font-semibold",
|
|
1393
|
+
onClick: He
|
|
1394
|
+
}, " Exit Simulation ")) : i("", !0)
|
|
1395
|
+
])) : i("", !0)
|
|
1396
|
+
])) : i("", !0)
|
|
1397
|
+
]),
|
|
1398
|
+
avatar: P(() => {
|
|
1399
|
+
var g, U;
|
|
1400
|
+
return [
|
|
1401
|
+
e("div", {
|
|
1402
|
+
class: A(["_size-full _flex _items-center _justify-center _rounded-full _duration-150 _delay-50", { "_opacity-0": !ne.value }]),
|
|
1403
|
+
style: { "box-shadow": "0 16px 24px 2px rgba(0, 0, 0, 0.4)" }
|
|
1404
|
+
}, [
|
|
1405
|
+
ne.value ? (t(), W(u(s), {
|
|
1406
|
+
key: o.value && ((g = o.value) == null ? void 0 : g.avatar) || "smiley-face",
|
|
1407
|
+
mode: "glass-inner-wall",
|
|
1408
|
+
"image-source": o.value && ((U = o.value) == null ? void 0 : U.avatar) || u(Ge),
|
|
1409
|
+
style: { width: "175%", height: "175%" },
|
|
1410
|
+
class: "_cursor-grab"
|
|
1411
|
+
}, null, 8, ["image-source"])) : i("", !0)
|
|
1412
|
+
], 2)
|
|
1413
|
+
];
|
|
1414
|
+
}),
|
|
1415
|
+
title: P(() => {
|
|
1416
|
+
var g, U;
|
|
1417
|
+
return [
|
|
1418
|
+
p.value ? (t(), a("div", bs, [
|
|
1419
|
+
_e(e("div", xs, [
|
|
1420
|
+
e("span", ws, _(((U = u(B)) == null ? void 0 : U.username) || "Not set"), 1),
|
|
1421
|
+
e("button", {
|
|
1422
|
+
class: "_p-1 _-m-0.5 _leading-none _flex-shrink-0 _block mouse:hover:_scale-[1.2] _duration-150 _rounded-md",
|
|
1423
|
+
onClick: Pe
|
|
1424
|
+
}, n[6] || (n[6] = [
|
|
1425
|
+
e("img", {
|
|
1426
|
+
src: Ze,
|
|
1427
|
+
class: "_h-[0.72em] _opacity-20 _pointer-events-none"
|
|
1428
|
+
}, null, -1)
|
|
1429
|
+
]))
|
|
1430
|
+
], 512), [
|
|
1431
|
+
[Te, !de.value]
|
|
1432
|
+
]),
|
|
1433
|
+
_e(e("div", ks, [
|
|
1434
|
+
_e(e("input", {
|
|
1435
|
+
ref_key: "usernameInput",
|
|
1436
|
+
ref: ye,
|
|
1437
|
+
"onUpdate:modelValue": n[3] || (n[3] = (q) => G.value = q),
|
|
1438
|
+
type: "text",
|
|
1439
|
+
maxlength: "22",
|
|
1440
|
+
autocomplete: "off",
|
|
1441
|
+
"data-1p-ignore": "",
|
|
1442
|
+
class: A(["_flex-1 _text-stroke-2xl _bg-transparent _text-center _w-full _outline-none", { "_border-red-500": !te.value && G.value }]),
|
|
1443
|
+
placeholder: "Enter new username",
|
|
1444
|
+
onInput: Ie,
|
|
1445
|
+
onKeyup: ke(Re, ["enter"])
|
|
1446
|
+
}, null, 34), [
|
|
1447
|
+
[Ae, G.value]
|
|
1448
|
+
])
|
|
1449
|
+
], 512), [
|
|
1450
|
+
[Te, de.value]
|
|
1451
|
+
])
|
|
1452
|
+
])) : (t(), a("div", hs, [
|
|
1453
|
+
e("span", ys, _(((g = o.value) == null ? void 0 : g.username) || "..."), 1)
|
|
1454
|
+
]))
|
|
1455
|
+
];
|
|
1456
|
+
}),
|
|
1457
|
+
default: P(() => {
|
|
1458
|
+
var g, U;
|
|
1459
|
+
return [
|
|
1460
|
+
e("section", Ts, [
|
|
1461
|
+
e("section", {
|
|
1462
|
+
class: "_inline-flex _flex-col _mr-2 _bg-metallic-linear _shadow-panel _px-3 _py-2 _pb-1.5 _rounded-lg",
|
|
1463
|
+
onClick: n[4] || (n[4] = (q) => u(C).openHub("leaderboard"))
|
|
1464
|
+
}, [
|
|
1465
|
+
n[11] || (n[11] = e("header", { class: "_flex _justify-between _items-center _opacity-30 _text-base _leading-snug" }, [
|
|
1466
|
+
e("h3", { class: "_weight-black" }, "rank")
|
|
1467
|
+
], -1)),
|
|
1468
|
+
e("div", Bs, [
|
|
1469
|
+
V.value ? (t(), a("span", Ds, "...")) : (t(), a("span", Ns, _(ae.value), 1))
|
|
1470
|
+
])
|
|
1471
|
+
]),
|
|
1472
|
+
e("section", Ms, [
|
|
1473
|
+
n[12] || (n[12] = e("header", { class: "_flex _justify-between _items-center _opacity-30 _text-base _leading-snug" }, [
|
|
1474
|
+
e("h3", { class: "_weight-black" }, "airdrop points")
|
|
1475
|
+
], -1)),
|
|
1476
|
+
e("div", Ls, [
|
|
1477
|
+
V.value ? (t(), a("span", js, "...")) : (t(), a("span", $s, _(se.value), 1)),
|
|
1478
|
+
V.value ? i("", !0) : (t(), a("span", Fs, "🪂"))
|
|
1479
|
+
])
|
|
1480
|
+
]),
|
|
1481
|
+
e("section", Hs, [
|
|
1482
|
+
n[13] || (n[13] = e("header", { class: "_flex _justify-between _opacity-30 _text-base _leading-snug" }, [
|
|
1483
|
+
e("h3", { class: "_weight-black" }, "balance")
|
|
1484
|
+
], -1)),
|
|
1485
|
+
e("div", Ys, [
|
|
1486
|
+
y.value ? (t(), a("span", Is, "...")) : (t(), a("span", Ps, _(((U = (g = o.value) == null ? void 0 : g.totalPoints) == null ? void 0 : U.toLocaleString()) || 0), 1)),
|
|
1487
|
+
y.value ? i("", !0) : (t(), a("span", Rs, "🪩"))
|
|
1488
|
+
])
|
|
1489
|
+
])
|
|
1490
|
+
]),
|
|
1491
|
+
e("section", Ws, [
|
|
1492
|
+
e("section", Qs, [
|
|
1493
|
+
e("div", Es, [
|
|
1494
|
+
e("h3", {
|
|
1495
|
+
class: A(["_text-mlg _weight-bold", { "_animate-pulse-deep": m.value }])
|
|
1496
|
+
}, n[14] || (n[14] = [
|
|
1497
|
+
e("span", { class: "_opacity-30" }, "activity", -1)
|
|
1498
|
+
]), 2),
|
|
1499
|
+
I.value > 1 ? (t(), a("div", Ks, [
|
|
1500
|
+
N.value > 1 ? (t(), a("div", Vs, [
|
|
1501
|
+
b(" Page " + _(N.value), 1),
|
|
1502
|
+
Q.value ? (t(), a("span", Js, " of " + _(I.value), 1)) : i("", !0)
|
|
1503
|
+
])) : i("", !0),
|
|
1504
|
+
e("div", Xs, [
|
|
1505
|
+
e("button", {
|
|
1506
|
+
class: A(["_size-8 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel _text-xl mouse:hover:_scale-[1.05] _duration-150", { "_opacity-30 _cursor-default": N.value === 1 }]),
|
|
1507
|
+
onClick: le,
|
|
1508
|
+
disabled: N.value === 1,
|
|
1509
|
+
"aria-label": "Previous page"
|
|
1510
|
+
}, " ← ", 10, Os),
|
|
1511
|
+
e("button", {
|
|
1512
|
+
class: A(["_size-8 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel _text-xl mouse:hover:_scale-[1.05] _duration-150", { "_opacity-30 _cursor-default": !R.value }]),
|
|
1513
|
+
onClick: ge,
|
|
1514
|
+
disabled: !R.value,
|
|
1515
|
+
"aria-label": "Next page"
|
|
1516
|
+
}, " → ", 10, Gs)
|
|
1517
|
+
])
|
|
1518
|
+
])) : i("", !0)
|
|
1519
|
+
]),
|
|
1520
|
+
j.value ? (t(), a("div", Zs, _(j.value), 1)) : w.value.length ? (t(), a("section", qs, [
|
|
1521
|
+
e("ul", el, [
|
|
1522
|
+
(t(!0), a(T, null, ie(w.value, (q) => (t(), a("li", {
|
|
1523
|
+
key: q.id
|
|
1524
|
+
}, [
|
|
1525
|
+
Je(ds, { point: q }, null, 8, ["point"])
|
|
1526
|
+
]))), 128))
|
|
1527
|
+
])
|
|
1528
|
+
])) : i("", !0)
|
|
1529
|
+
])
|
|
1530
|
+
]),
|
|
1531
|
+
p.value ? (t(), W(ts, {
|
|
1532
|
+
key: 0,
|
|
1533
|
+
class: "_w-full _max-w-2xl"
|
|
1534
|
+
})) : i("", !0),
|
|
1535
|
+
p.value ? (t(), W(Na, {
|
|
1536
|
+
key: 1,
|
|
1537
|
+
class: "_w-full _max-w-2xl"
|
|
1538
|
+
})) : i("", !0)
|
|
1539
|
+
];
|
|
1540
|
+
}),
|
|
1541
|
+
_: 2
|
|
1542
|
+
}, [
|
|
1543
|
+
!p.value && (d.value || H.value || X.value || ee.value) ? {
|
|
1544
|
+
name: "description",
|
|
1545
|
+
fn: P(() => [
|
|
1546
|
+
e("div", As, [
|
|
1547
|
+
d.value ? (t(), a("a", {
|
|
1548
|
+
key: 0,
|
|
1549
|
+
href: me.value,
|
|
1550
|
+
target: "_blank",
|
|
1551
|
+
rel: "noopener noreferrer",
|
|
1552
|
+
class: "_p-1.5 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel",
|
|
1553
|
+
"aria-label": "View Discord profile"
|
|
1554
|
+
}, n[7] || (n[7] = [
|
|
1555
|
+
e("img", {
|
|
1556
|
+
src: Me,
|
|
1557
|
+
class: "_size-7 _rounded",
|
|
1558
|
+
style: { "background-color": "#5865f2" }
|
|
1559
|
+
}, null, -1)
|
|
1560
|
+
]), 8, Cs)) : i("", !0),
|
|
1561
|
+
H.value ? (t(), a("a", {
|
|
1562
|
+
key: 1,
|
|
1563
|
+
href: ve.value,
|
|
1564
|
+
target: "_blank",
|
|
1565
|
+
rel: "noopener noreferrer",
|
|
1566
|
+
class: "_p-1.5 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel",
|
|
1567
|
+
"aria-label": "View Twitter profile"
|
|
1568
|
+
}, n[8] || (n[8] = [
|
|
1569
|
+
e("img", {
|
|
1570
|
+
src: Le,
|
|
1571
|
+
class: "_size-7 _rounded",
|
|
1572
|
+
style: { "background-color": "#000" }
|
|
1573
|
+
}, null, -1)
|
|
1574
|
+
]), 8, Ss)) : i("", !0),
|
|
1575
|
+
X.value ? (t(), a("a", {
|
|
1576
|
+
key: 2,
|
|
1577
|
+
href: pe.value,
|
|
1578
|
+
target: "_blank",
|
|
1579
|
+
rel: "noopener noreferrer",
|
|
1580
|
+
class: "_p-1.5 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel",
|
|
1581
|
+
"aria-label": "View Telegram profile"
|
|
1582
|
+
}, n[9] || (n[9] = [
|
|
1583
|
+
e("img", {
|
|
1584
|
+
src: je,
|
|
1585
|
+
class: "_size-7 _rounded",
|
|
1586
|
+
style: { "background-color": "#0088cc" }
|
|
1587
|
+
}, null, -1)
|
|
1588
|
+
]), 8, Us)) : i("", !0),
|
|
1589
|
+
ee.value ? (t(), a("a", {
|
|
1590
|
+
key: 3,
|
|
1591
|
+
href: l.value,
|
|
1592
|
+
target: "_blank",
|
|
1593
|
+
rel: "noopener noreferrer",
|
|
1594
|
+
class: "_p-1.5 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel",
|
|
1595
|
+
"aria-label": "View Farcaster profile"
|
|
1596
|
+
}, n[10] || (n[10] = [
|
|
1597
|
+
e("img", {
|
|
1598
|
+
src: $e,
|
|
1599
|
+
class: "_size-7 _rounded",
|
|
1600
|
+
style: { "background-color": "#000" }
|
|
1601
|
+
}, null, -1)
|
|
1602
|
+
]), 8, zs)) : i("", !0)
|
|
1603
|
+
])
|
|
1604
|
+
]),
|
|
1605
|
+
key: "0"
|
|
1606
|
+
} : void 0
|
|
1607
|
+
]), 1024));
|
|
1608
|
+
}
|
|
1609
|
+
}, ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1610
|
+
__proto__: null,
|
|
1611
|
+
default: tl
|
|
1612
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1613
|
+
export {
|
|
1614
|
+
it as A,
|
|
1615
|
+
ol as P,
|
|
1616
|
+
At as S,
|
|
1617
|
+
oe as _,
|
|
1618
|
+
tl as a
|
|
1619
|
+
};
|