@cryptocadet/react-crypto-pay 1.0.0
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/README.md +39 -0
- package/dist/index-DQPobPMI.js +3539 -0
- package/dist/index-DQPobPMI.js.map +1 -0
- package/dist/index-iYZ_Iqex.js +421 -0
- package/dist/index-iYZ_Iqex.js.map +1 -0
- package/dist/react-crypto-pay.es.js +66400 -0
- package/dist/react-crypto-pay.es.js.map +1 -0
- package/dist/react-crypto-pay.umd.js +563 -0
- package/dist/react-crypto-pay.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
const fe = Symbol(), ee = Object.getPrototypeOf, G = /* @__PURE__ */ new WeakMap(), me = (e) => e && (G.has(e) ? G.get(e) : ee(e) === Object.prototype || ee(e) === Array.prototype), ge = (e) => me(e) && e[fe] || null, te = (e, t = !0) => {
|
|
2
|
+
G.set(e, t);
|
|
3
|
+
};
|
|
4
|
+
var z = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
5
|
+
const q = (e) => typeof e == "object" && e !== null, A = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakSet(), he = (e = Object.is, t = (n, h) => new Proxy(n, h), s = (n) => q(n) && !x.has(n) && (Array.isArray(n) || !(Symbol.iterator in n)) && !(n instanceof WeakMap) && !(n instanceof WeakSet) && !(n instanceof Error) && !(n instanceof Number) && !(n instanceof Date) && !(n instanceof String) && !(n instanceof RegExp) && !(n instanceof ArrayBuffer), r = (n) => {
|
|
6
|
+
switch (n.status) {
|
|
7
|
+
case "fulfilled":
|
|
8
|
+
return n.value;
|
|
9
|
+
case "rejected":
|
|
10
|
+
throw n.reason;
|
|
11
|
+
default:
|
|
12
|
+
throw n;
|
|
13
|
+
}
|
|
14
|
+
}, l = /* @__PURE__ */ new WeakMap(), c = (n, h, I = r) => {
|
|
15
|
+
const y = l.get(n);
|
|
16
|
+
if ((y == null ? void 0 : y[0]) === h)
|
|
17
|
+
return y[1];
|
|
18
|
+
const v = Array.isArray(n) ? [] : Object.create(Object.getPrototypeOf(n));
|
|
19
|
+
return te(v, !0), l.set(n, [h, v]), Reflect.ownKeys(n).forEach((P) => {
|
|
20
|
+
if (Object.getOwnPropertyDescriptor(v, P))
|
|
21
|
+
return;
|
|
22
|
+
const W = Reflect.get(n, P), M = {
|
|
23
|
+
value: W,
|
|
24
|
+
enumerable: !0,
|
|
25
|
+
// This is intentional to avoid copying with proxy-compare.
|
|
26
|
+
// It's still non-writable, so it avoids assigning a value.
|
|
27
|
+
configurable: !0
|
|
28
|
+
};
|
|
29
|
+
if (x.has(W))
|
|
30
|
+
te(W, !1);
|
|
31
|
+
else if (W instanceof Promise)
|
|
32
|
+
delete M.value, M.get = () => I(W);
|
|
33
|
+
else if (A.has(W)) {
|
|
34
|
+
const [b, H] = A.get(
|
|
35
|
+
W
|
|
36
|
+
);
|
|
37
|
+
M.value = c(
|
|
38
|
+
b,
|
|
39
|
+
H(),
|
|
40
|
+
I
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
Object.defineProperty(v, P, M);
|
|
44
|
+
}), Object.preventExtensions(v);
|
|
45
|
+
}, m = /* @__PURE__ */ new WeakMap(), f = [1, 1], E = (n) => {
|
|
46
|
+
if (!q(n))
|
|
47
|
+
throw new Error("object required");
|
|
48
|
+
const h = m.get(n);
|
|
49
|
+
if (h)
|
|
50
|
+
return h;
|
|
51
|
+
let I = f[0];
|
|
52
|
+
const y = /* @__PURE__ */ new Set(), v = (a, i = ++f[0]) => {
|
|
53
|
+
I !== i && (I = i, y.forEach((o) => o(a, i)));
|
|
54
|
+
};
|
|
55
|
+
let P = f[1];
|
|
56
|
+
const W = (a = ++f[1]) => (P !== a && !y.size && (P = a, b.forEach(([i]) => {
|
|
57
|
+
const o = i[1](a);
|
|
58
|
+
o > I && (I = o);
|
|
59
|
+
})), I), M = (a) => (i, o) => {
|
|
60
|
+
const g = [...i];
|
|
61
|
+
g[1] = [a, ...g[1]], v(g, o);
|
|
62
|
+
}, b = /* @__PURE__ */ new Map(), H = (a, i) => {
|
|
63
|
+
if ((z ? "production" : void 0) !== "production" && b.has(a))
|
|
64
|
+
throw new Error("prop listener already exists");
|
|
65
|
+
if (y.size) {
|
|
66
|
+
const o = i[3](M(a));
|
|
67
|
+
b.set(a, [i, o]);
|
|
68
|
+
} else
|
|
69
|
+
b.set(a, [i]);
|
|
70
|
+
}, Z = (a) => {
|
|
71
|
+
var i;
|
|
72
|
+
const o = b.get(a);
|
|
73
|
+
o && (b.delete(a), (i = o[1]) == null || i.call(o));
|
|
74
|
+
}, ue = (a) => (y.add(a), y.size === 1 && b.forEach(([o, g], k) => {
|
|
75
|
+
if ((z ? "production" : void 0) !== "production" && g)
|
|
76
|
+
throw new Error("remove already exists");
|
|
77
|
+
const R = o[3](M(k));
|
|
78
|
+
b.set(k, [o, R]);
|
|
79
|
+
}), () => {
|
|
80
|
+
y.delete(a), y.size === 0 && b.forEach(([o, g], k) => {
|
|
81
|
+
g && (g(), b.set(k, [o]));
|
|
82
|
+
});
|
|
83
|
+
}), J = Array.isArray(n) ? [] : Object.create(Object.getPrototypeOf(n)), $ = t(J, {
|
|
84
|
+
deleteProperty(a, i) {
|
|
85
|
+
const o = Reflect.get(a, i);
|
|
86
|
+
Z(i);
|
|
87
|
+
const g = Reflect.deleteProperty(a, i);
|
|
88
|
+
return g && v(["delete", [i], o]), g;
|
|
89
|
+
},
|
|
90
|
+
set(a, i, o, g) {
|
|
91
|
+
const k = Reflect.has(a, i), R = Reflect.get(a, i, g);
|
|
92
|
+
if (k && (e(R, o) || m.has(o) && e(R, m.get(o))))
|
|
93
|
+
return !0;
|
|
94
|
+
Z(i), q(o) && (o = ge(o) || o);
|
|
95
|
+
let V = o;
|
|
96
|
+
if (o instanceof Promise)
|
|
97
|
+
o.then((C) => {
|
|
98
|
+
o.status = "fulfilled", o.value = C, v(["resolve", [i], C]);
|
|
99
|
+
}).catch((C) => {
|
|
100
|
+
o.status = "rejected", o.reason = C, v(["reject", [i], C]);
|
|
101
|
+
});
|
|
102
|
+
else {
|
|
103
|
+
!A.has(o) && s(o) && (V = E(o));
|
|
104
|
+
const C = !x.has(V) && A.get(V);
|
|
105
|
+
C && H(i, C);
|
|
106
|
+
}
|
|
107
|
+
return Reflect.set(a, i, V, g), v(["set", [i], o, R]), !0;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
m.set(n, $);
|
|
111
|
+
const pe = [
|
|
112
|
+
J,
|
|
113
|
+
W,
|
|
114
|
+
c,
|
|
115
|
+
ue
|
|
116
|
+
];
|
|
117
|
+
return A.set($, pe), Reflect.ownKeys(n).forEach((a) => {
|
|
118
|
+
const i = Object.getOwnPropertyDescriptor(
|
|
119
|
+
n,
|
|
120
|
+
a
|
|
121
|
+
);
|
|
122
|
+
"value" in i && ($[a] = n[a], delete i.value, delete i.writable), Object.defineProperty(J, a, i);
|
|
123
|
+
}), $;
|
|
124
|
+
}) => [
|
|
125
|
+
// public functions
|
|
126
|
+
E,
|
|
127
|
+
// shared state
|
|
128
|
+
A,
|
|
129
|
+
x,
|
|
130
|
+
// internal things
|
|
131
|
+
e,
|
|
132
|
+
t,
|
|
133
|
+
s,
|
|
134
|
+
r,
|
|
135
|
+
l,
|
|
136
|
+
c,
|
|
137
|
+
m,
|
|
138
|
+
f
|
|
139
|
+
], [be] = he();
|
|
140
|
+
function j(e = {}) {
|
|
141
|
+
return be(e);
|
|
142
|
+
}
|
|
143
|
+
function S(e, t, s) {
|
|
144
|
+
const r = A.get(e);
|
|
145
|
+
(z ? "production" : void 0) !== "production" && !r && console.warn("Please use proxy object");
|
|
146
|
+
let l;
|
|
147
|
+
const c = [], m = r[3];
|
|
148
|
+
let f = !1;
|
|
149
|
+
const n = m((h) => {
|
|
150
|
+
if (c.push(h), s) {
|
|
151
|
+
t(c.splice(0));
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
l || (l = Promise.resolve().then(() => {
|
|
155
|
+
l = void 0, f && t(c.splice(0));
|
|
156
|
+
}));
|
|
157
|
+
});
|
|
158
|
+
return f = !0, () => {
|
|
159
|
+
f = !1, n();
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function ye(e, t) {
|
|
163
|
+
const s = A.get(e);
|
|
164
|
+
(z ? "production" : void 0) !== "production" && !s && console.warn("Please use proxy object");
|
|
165
|
+
const [r, l, c] = s;
|
|
166
|
+
return c(r, l(), t);
|
|
167
|
+
}
|
|
168
|
+
const d = j({ history: ["ConnectWallet"], view: "ConnectWallet", data: void 0 }), de = { state: d, subscribe(e) {
|
|
169
|
+
return S(d, () => e(d));
|
|
170
|
+
}, push(e, t) {
|
|
171
|
+
e !== d.view && (d.view = e, t && (d.data = t), d.history.push(e));
|
|
172
|
+
}, reset(e) {
|
|
173
|
+
d.view = e, d.history = [e];
|
|
174
|
+
}, replace(e) {
|
|
175
|
+
d.history.length > 1 && (d.history[d.history.length - 1] = e, d.view = e);
|
|
176
|
+
}, goBack() {
|
|
177
|
+
if (d.history.length > 1) {
|
|
178
|
+
d.history.pop();
|
|
179
|
+
const [e] = d.history.slice(-1);
|
|
180
|
+
d.view = e;
|
|
181
|
+
}
|
|
182
|
+
}, setData(e) {
|
|
183
|
+
d.data = e;
|
|
184
|
+
} }, p = { WALLETCONNECT_DEEPLINK_CHOICE: "WALLETCONNECT_DEEPLINK_CHOICE", WCM_VERSION: "WCM_VERSION", RECOMMENDED_WALLET_AMOUNT: 9, isMobile() {
|
|
185
|
+
return typeof window < "u" ? !!(window.matchMedia("(pointer:coarse)").matches || /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)) : !1;
|
|
186
|
+
}, isAndroid() {
|
|
187
|
+
return p.isMobile() && navigator.userAgent.toLowerCase().includes("android");
|
|
188
|
+
}, isIos() {
|
|
189
|
+
const e = navigator.userAgent.toLowerCase();
|
|
190
|
+
return p.isMobile() && (e.includes("iphone") || e.includes("ipad"));
|
|
191
|
+
}, isHttpUrl(e) {
|
|
192
|
+
return e.startsWith("http://") || e.startsWith("https://");
|
|
193
|
+
}, isArray(e) {
|
|
194
|
+
return Array.isArray(e) && e.length > 0;
|
|
195
|
+
}, formatNativeUrl(e, t, s) {
|
|
196
|
+
if (p.isHttpUrl(e))
|
|
197
|
+
return this.formatUniversalUrl(e, t, s);
|
|
198
|
+
let r = e;
|
|
199
|
+
r.includes("://") || (r = e.replaceAll("/", "").replaceAll(":", ""), r = `${r}://`), r.endsWith("/") || (r = `${r}/`), this.setWalletConnectDeepLink(r, s);
|
|
200
|
+
const l = encodeURIComponent(t);
|
|
201
|
+
return `${r}wc?uri=${l}`;
|
|
202
|
+
}, formatUniversalUrl(e, t, s) {
|
|
203
|
+
if (!p.isHttpUrl(e))
|
|
204
|
+
return this.formatNativeUrl(e, t, s);
|
|
205
|
+
let r = e;
|
|
206
|
+
r.endsWith("/") || (r = `${r}/`), this.setWalletConnectDeepLink(r, s);
|
|
207
|
+
const l = encodeURIComponent(t);
|
|
208
|
+
return `${r}wc?uri=${l}`;
|
|
209
|
+
}, async wait(e) {
|
|
210
|
+
return new Promise((t) => {
|
|
211
|
+
setTimeout(t, e);
|
|
212
|
+
});
|
|
213
|
+
}, openHref(e, t) {
|
|
214
|
+
window.open(e, t, "noreferrer noopener");
|
|
215
|
+
}, setWalletConnectDeepLink(e, t) {
|
|
216
|
+
try {
|
|
217
|
+
localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE, JSON.stringify({ href: e, name: t }));
|
|
218
|
+
} catch {
|
|
219
|
+
console.info("Unable to set WalletConnect deep link");
|
|
220
|
+
}
|
|
221
|
+
}, setWalletConnectAndroidDeepLink(e) {
|
|
222
|
+
try {
|
|
223
|
+
const [t] = e.split("?");
|
|
224
|
+
localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE, JSON.stringify({ href: t, name: "Android" }));
|
|
225
|
+
} catch {
|
|
226
|
+
console.info("Unable to set WalletConnect android deep link");
|
|
227
|
+
}
|
|
228
|
+
}, removeWalletConnectDeepLink() {
|
|
229
|
+
try {
|
|
230
|
+
localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE);
|
|
231
|
+
} catch {
|
|
232
|
+
console.info("Unable to remove WalletConnect deep link");
|
|
233
|
+
}
|
|
234
|
+
}, setModalVersionInStorage() {
|
|
235
|
+
try {
|
|
236
|
+
typeof localStorage < "u" && localStorage.setItem(p.WCM_VERSION, "2.6.2");
|
|
237
|
+
} catch {
|
|
238
|
+
console.info("Unable to set Web3Modal version in storage");
|
|
239
|
+
}
|
|
240
|
+
}, getWalletRouterData() {
|
|
241
|
+
var e;
|
|
242
|
+
const t = (e = de.state.data) == null ? void 0 : e.Wallet;
|
|
243
|
+
if (!t)
|
|
244
|
+
throw new Error('Missing "Wallet" view data');
|
|
245
|
+
return t;
|
|
246
|
+
} }, ve = typeof location < "u" && (location.hostname.includes("localhost") || location.protocol.includes("https")), u = j({ enabled: ve, userSessionId: "", events: [], connectedWalletId: void 0 }), we = { state: u, subscribe(e) {
|
|
247
|
+
return S(u.events, () => e(ye(u.events[u.events.length - 1])));
|
|
248
|
+
}, initialize() {
|
|
249
|
+
u.enabled && typeof (crypto == null ? void 0 : crypto.randomUUID) < "u" && (u.userSessionId = crypto.randomUUID());
|
|
250
|
+
}, setConnectedWalletId(e) {
|
|
251
|
+
u.connectedWalletId = e;
|
|
252
|
+
}, click(e) {
|
|
253
|
+
if (u.enabled) {
|
|
254
|
+
const t = { type: "CLICK", name: e.name, userSessionId: u.userSessionId, timestamp: Date.now(), data: e };
|
|
255
|
+
u.events.push(t);
|
|
256
|
+
}
|
|
257
|
+
}, track(e) {
|
|
258
|
+
if (u.enabled) {
|
|
259
|
+
const t = { type: "TRACK", name: e.name, userSessionId: u.userSessionId, timestamp: Date.now(), data: e };
|
|
260
|
+
u.events.push(t);
|
|
261
|
+
}
|
|
262
|
+
}, view(e) {
|
|
263
|
+
if (u.enabled) {
|
|
264
|
+
const t = { type: "VIEW", name: e.name, userSessionId: u.userSessionId, timestamp: Date.now(), data: e };
|
|
265
|
+
u.events.push(t);
|
|
266
|
+
}
|
|
267
|
+
} }, L = j({ chains: void 0, walletConnectUri: void 0, isAuth: !1, isCustomDesktop: !1, isCustomMobile: !1, isDataLoaded: !1, isUiLoaded: !1 }), w = { state: L, subscribe(e) {
|
|
268
|
+
return S(L, () => e(L));
|
|
269
|
+
}, setChains(e) {
|
|
270
|
+
L.chains = e;
|
|
271
|
+
}, setWalletConnectUri(e) {
|
|
272
|
+
L.walletConnectUri = e;
|
|
273
|
+
}, setIsCustomDesktop(e) {
|
|
274
|
+
L.isCustomDesktop = e;
|
|
275
|
+
}, setIsCustomMobile(e) {
|
|
276
|
+
L.isCustomMobile = e;
|
|
277
|
+
}, setIsDataLoaded(e) {
|
|
278
|
+
L.isDataLoaded = e;
|
|
279
|
+
}, setIsUiLoaded(e) {
|
|
280
|
+
L.isUiLoaded = e;
|
|
281
|
+
}, setIsAuth(e) {
|
|
282
|
+
L.isAuth = e;
|
|
283
|
+
} }, B = j({ projectId: "", mobileWallets: void 0, desktopWallets: void 0, walletImages: void 0, chains: void 0, enableAuthMode: !1, enableExplorer: !0, explorerExcludedWalletIds: void 0, explorerRecommendedWalletIds: void 0, termsOfServiceUrl: void 0, privacyPolicyUrl: void 0 }), _ = { state: B, subscribe(e) {
|
|
284
|
+
return S(B, () => e(B));
|
|
285
|
+
}, setConfig(e) {
|
|
286
|
+
var t, s;
|
|
287
|
+
we.initialize(), w.setChains(e.chains), w.setIsAuth(!!e.enableAuthMode), w.setIsCustomMobile(!!((t = e.mobileWallets) != null && t.length)), w.setIsCustomDesktop(!!((s = e.desktopWallets) != null && s.length)), p.setModalVersionInStorage(), Object.assign(B, e);
|
|
288
|
+
} };
|
|
289
|
+
var Ie = Object.defineProperty, se = Object.getOwnPropertySymbols, Le = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable, ne = (e, t, s) => t in e ? Ie(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, We = (e, t) => {
|
|
290
|
+
for (var s in t || (t = {}))
|
|
291
|
+
Le.call(t, s) && ne(e, s, t[s]);
|
|
292
|
+
if (se)
|
|
293
|
+
for (var s of se(t))
|
|
294
|
+
Oe.call(t, s) && ne(e, s, t[s]);
|
|
295
|
+
return e;
|
|
296
|
+
};
|
|
297
|
+
const Q = "https://explorer-api.walletconnect.com", X = "wcm", Y = "js-2.6.2";
|
|
298
|
+
async function K(e, t) {
|
|
299
|
+
const s = We({ sdkType: X, sdkVersion: Y }, t), r = new URL(e, Q);
|
|
300
|
+
return r.searchParams.append("projectId", _.state.projectId), Object.entries(s).forEach(([l, c]) => {
|
|
301
|
+
c && r.searchParams.append(l, String(c));
|
|
302
|
+
}), (await fetch(r)).json();
|
|
303
|
+
}
|
|
304
|
+
const U = { async getDesktopListings(e) {
|
|
305
|
+
return K("/w3m/v1/getDesktopListings", e);
|
|
306
|
+
}, async getMobileListings(e) {
|
|
307
|
+
return K("/w3m/v1/getMobileListings", e);
|
|
308
|
+
}, async getInjectedListings(e) {
|
|
309
|
+
return K("/w3m/v1/getInjectedListings", e);
|
|
310
|
+
}, async getAllListings(e) {
|
|
311
|
+
return K("/w3m/v1/getAllListings", e);
|
|
312
|
+
}, getWalletImageUrl(e) {
|
|
313
|
+
return `${Q}/w3m/v1/getWalletImage/${e}?projectId=${_.state.projectId}&sdkType=${X}&sdkVersion=${Y}`;
|
|
314
|
+
}, getAssetImageUrl(e) {
|
|
315
|
+
return `${Q}/w3m/v1/getAssetImage/${e}?projectId=${_.state.projectId}&sdkType=${X}&sdkVersion=${Y}`;
|
|
316
|
+
} };
|
|
317
|
+
var Ee = Object.defineProperty, oe = Object.getOwnPropertySymbols, Ce = Object.prototype.hasOwnProperty, Ae = Object.prototype.propertyIsEnumerable, re = (e, t, s) => t in e ? Ee(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, je = (e, t) => {
|
|
318
|
+
for (var s in t || (t = {}))
|
|
319
|
+
Ce.call(t, s) && re(e, s, t[s]);
|
|
320
|
+
if (oe)
|
|
321
|
+
for (var s of oe(t))
|
|
322
|
+
Ae.call(t, s) && re(e, s, t[s]);
|
|
323
|
+
return e;
|
|
324
|
+
};
|
|
325
|
+
const ie = p.isMobile(), O = j({ wallets: { listings: [], total: 0, page: 1 }, search: { listings: [], total: 0, page: 1 }, recomendedWallets: [] }), _e = { state: O, async getRecomendedWallets() {
|
|
326
|
+
const { explorerRecommendedWalletIds: e, explorerExcludedWalletIds: t } = _.state;
|
|
327
|
+
if (e === "NONE" || t === "ALL" && !e)
|
|
328
|
+
return O.recomendedWallets;
|
|
329
|
+
if (p.isArray(e)) {
|
|
330
|
+
const s = { recommendedIds: e.join(",") }, { listings: r } = await U.getAllListings(s), l = Object.values(r);
|
|
331
|
+
l.sort((c, m) => {
|
|
332
|
+
const f = e.indexOf(c.id), E = e.indexOf(m.id);
|
|
333
|
+
return f - E;
|
|
334
|
+
}), O.recomendedWallets = l;
|
|
335
|
+
} else {
|
|
336
|
+
const { chains: s, isAuth: r } = w.state, l = s == null ? void 0 : s.join(","), c = p.isArray(t), m = { page: 1, sdks: r ? "auth_v1" : void 0, entries: p.RECOMMENDED_WALLET_AMOUNT, chains: l, version: 2, excludedIds: c ? t.join(",") : void 0 }, { listings: f } = ie ? await U.getMobileListings(m) : await U.getDesktopListings(m);
|
|
337
|
+
O.recomendedWallets = Object.values(f);
|
|
338
|
+
}
|
|
339
|
+
return O.recomendedWallets;
|
|
340
|
+
}, async getWallets(e) {
|
|
341
|
+
const t = je({}, e), { explorerRecommendedWalletIds: s, explorerExcludedWalletIds: r } = _.state, { recomendedWallets: l } = O;
|
|
342
|
+
if (r === "ALL")
|
|
343
|
+
return O.wallets;
|
|
344
|
+
l.length ? t.excludedIds = l.map((I) => I.id).join(",") : p.isArray(s) && (t.excludedIds = s.join(",")), p.isArray(r) && (t.excludedIds = [t.excludedIds, r].filter(Boolean).join(",")), w.state.isAuth && (t.sdks = "auth_v1");
|
|
345
|
+
const { page: c, search: m } = e, { listings: f, total: E } = ie ? await U.getMobileListings(t) : await U.getDesktopListings(t), n = Object.values(f), h = m ? "search" : "wallets";
|
|
346
|
+
return O[h] = { listings: [...O[h].listings, ...n], total: E, page: c ?? 1 }, { listings: n, total: E };
|
|
347
|
+
}, getWalletImageUrl(e) {
|
|
348
|
+
return U.getWalletImageUrl(e);
|
|
349
|
+
}, getAssetImageUrl(e) {
|
|
350
|
+
return U.getAssetImageUrl(e);
|
|
351
|
+
}, resetSearch() {
|
|
352
|
+
O.search = { listings: [], total: 0, page: 1 };
|
|
353
|
+
} }, N = j({ open: !1 }), F = { state: N, subscribe(e) {
|
|
354
|
+
return S(N, () => e(N));
|
|
355
|
+
}, async open(e) {
|
|
356
|
+
return new Promise((t) => {
|
|
357
|
+
const { isUiLoaded: s, isDataLoaded: r } = w.state;
|
|
358
|
+
if (p.removeWalletConnectDeepLink(), w.setWalletConnectUri(e == null ? void 0 : e.uri), w.setChains(e == null ? void 0 : e.chains), de.reset("ConnectWallet"), s && r)
|
|
359
|
+
N.open = !0, t();
|
|
360
|
+
else {
|
|
361
|
+
const l = setInterval(() => {
|
|
362
|
+
const c = w.state;
|
|
363
|
+
c.isUiLoaded && c.isDataLoaded && (clearInterval(l), N.open = !0, t());
|
|
364
|
+
}, 200);
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
}, close() {
|
|
368
|
+
N.open = !1;
|
|
369
|
+
} };
|
|
370
|
+
var Me = Object.defineProperty, ae = Object.getOwnPropertySymbols, Ue = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable, le = (e, t, s) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, Se = (e, t) => {
|
|
371
|
+
for (var s in t || (t = {}))
|
|
372
|
+
Ue.call(t, s) && le(e, s, t[s]);
|
|
373
|
+
if (ae)
|
|
374
|
+
for (var s of ae(t))
|
|
375
|
+
De.call(t, s) && le(e, s, t[s]);
|
|
376
|
+
return e;
|
|
377
|
+
};
|
|
378
|
+
function Pe() {
|
|
379
|
+
return typeof matchMedia < "u" && matchMedia("(prefers-color-scheme: dark)").matches;
|
|
380
|
+
}
|
|
381
|
+
const T = j({ themeMode: Pe() ? "dark" : "light" }), ce = { state: T, subscribe(e) {
|
|
382
|
+
return S(T, () => e(T));
|
|
383
|
+
}, setThemeConfig(e) {
|
|
384
|
+
const { themeMode: t, themeVariables: s } = e;
|
|
385
|
+
t && (T.themeMode = t), s && (T.themeVariables = Se({}, s));
|
|
386
|
+
} }, D = j({ open: !1, message: "", variant: "success" }), Re = { state: D, subscribe(e) {
|
|
387
|
+
return S(D, () => e(D));
|
|
388
|
+
}, openToast(e, t) {
|
|
389
|
+
D.open = !0, D.message = e, D.variant = t;
|
|
390
|
+
}, closeToast() {
|
|
391
|
+
D.open = !1;
|
|
392
|
+
} };
|
|
393
|
+
class ke {
|
|
394
|
+
constructor(t) {
|
|
395
|
+
this.openModal = F.open, this.closeModal = F.close, this.subscribeModal = F.subscribe, this.setTheme = ce.setThemeConfig, ce.setThemeConfig(t), _.setConfig(t), this.initUi();
|
|
396
|
+
}
|
|
397
|
+
async initUi() {
|
|
398
|
+
if (typeof window < "u") {
|
|
399
|
+
await import("./index-DQPobPMI.js");
|
|
400
|
+
const t = document.createElement("wcm-modal");
|
|
401
|
+
document.body.insertAdjacentElement("beforeend", t), w.setIsUiLoaded(!0);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
406
|
+
__proto__: null,
|
|
407
|
+
WalletConnectModal: ke
|
|
408
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
409
|
+
export {
|
|
410
|
+
we as R,
|
|
411
|
+
de as T,
|
|
412
|
+
p as a,
|
|
413
|
+
Te as i,
|
|
414
|
+
ce as n,
|
|
415
|
+
Re as o,
|
|
416
|
+
w as p,
|
|
417
|
+
F as s,
|
|
418
|
+
_e as t,
|
|
419
|
+
_ as y
|
|
420
|
+
};
|
|
421
|
+
//# sourceMappingURL=index-iYZ_Iqex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-iYZ_Iqex.js","sources":["../node_modules/proxy-compare/dist/index.modern.js","../node_modules/valtio/esm/vanilla.mjs","../node_modules/@walletconnect/modal-core/dist/index.js","../node_modules/@walletconnect/modal/dist/index.js"],"sourcesContent":["const e=Symbol(),t=Symbol(),r=\"a\",n=\"w\";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>\"object\"==typeof e&&null!==e,i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(s(e),t)},u=e=>e[t]||e,a=(s,c,f,p)=>{if(!l(s))return s;let g=p&&p.get(s);if(!g){const e=u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===t?o:(f(\"k\",n),a(Reflect.get(e,n),c[r],c.c,c.t)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f(\"h\",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f(\"o\",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=o(h||y,w[0]),f&&f.set(y,w)),w[1][r]=c,w[1].c=f,w[1].t=p,w[1].p},p=(e,t,r,o)=>{if(Object.is(e,t))return!1;if(!f(e)||!f(t))return!0;const s=r.get(u(e));if(!s)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let c=null;try{for(const r of s.h||[])if(c=Reflect.has(e,r)!==Reflect.has(t,r),c)return c;if(!0===s[n]){if(c=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),c)return c}else for(const r of s.o||[])if(c=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),c)return c;for(const n of s.k||[])if(c=p(e[n],t[n],r,o),c)return c;return null===c&&(c=!0),c}finally{o&&o.set(e,{n:t,g:c})}},g=t=>!!l(t)&&e in t,y=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t)},w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;f(e)&&s.add(e);const i=f(e)&&t.get(u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[n]){const e=\":ownKeys\";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!(\"value\"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},O=e=>{o=e};export{w as affectedToPathList,a as createProxy,y as getUntracked,p as isChanged,h as markToTrack,O as replaceNewProxy,g as trackMemo};\n//# sourceMappingURL=index.modern.mjs.map\n","import { markToTrack, getUntracked } from 'proxy-compare';\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nconst proxyStateMap = /* @__PURE__ */ new WeakMap();\nconst refSet = /* @__PURE__ */ new WeakSet();\nconst buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {\n switch (promise.status) {\n case \"fulfilled\":\n return promise.value;\n case \"rejected\":\n throw promise.reason;\n default:\n throw promise;\n }\n}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {\n const cache = snapCache.get(target);\n if ((cache == null ? void 0 : cache[0]) === version) {\n return cache[1];\n }\n const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n markToTrack(snap, true);\n snapCache.set(target, [version, snap]);\n Reflect.ownKeys(target).forEach((key) => {\n if (Object.getOwnPropertyDescriptor(snap, key)) {\n return;\n }\n const value = Reflect.get(target, key);\n const desc = {\n value,\n enumerable: true,\n // This is intentional to avoid copying with proxy-compare.\n // It's still non-writable, so it avoids assigning a value.\n configurable: true\n };\n if (refSet.has(value)) {\n markToTrack(value, false);\n } else if (value instanceof Promise) {\n delete desc.value;\n desc.get = () => handlePromise(value);\n } else if (proxyStateMap.has(value)) {\n const [target2, ensureVersion] = proxyStateMap.get(\n value\n );\n desc.value = createSnapshot(\n target2,\n ensureVersion(),\n handlePromise\n );\n }\n Object.defineProperty(snap, key, desc);\n });\n return Object.preventExtensions(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction = (initialObject) => {\n if (!isObject(initialObject)) {\n throw new Error(\"object required\");\n }\n const found = proxyCache.get(initialObject);\n if (found) {\n return found;\n }\n let version = versionHolder[0];\n const listeners = /* @__PURE__ */ new Set();\n const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n if (version !== nextVersion) {\n version = nextVersion;\n listeners.forEach((listener) => listener(op, nextVersion));\n }\n };\n let checkVersion = versionHolder[1];\n const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n if (checkVersion !== nextCheckVersion && !listeners.size) {\n checkVersion = nextCheckVersion;\n propProxyStates.forEach(([propProxyState]) => {\n const propVersion = propProxyState[1](nextCheckVersion);\n if (propVersion > version) {\n version = propVersion;\n }\n });\n }\n return version;\n };\n const createPropListener = (prop) => (op, nextVersion) => {\n const newOp = [...op];\n newOp[1] = [prop, ...newOp[1]];\n notifyUpdate(newOp, nextVersion);\n };\n const propProxyStates = /* @__PURE__ */ new Map();\n const addPropListener = (prop, propProxyState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && propProxyStates.has(prop)) {\n throw new Error(\"prop listener already exists\");\n }\n if (listeners.size) {\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n } else {\n propProxyStates.set(prop, [propProxyState]);\n }\n };\n const removePropListener = (prop) => {\n var _a;\n const entry = propProxyStates.get(prop);\n if (entry) {\n propProxyStates.delete(prop);\n (_a = entry[1]) == null ? void 0 : _a.call(entry);\n }\n };\n const addListener = (listener) => {\n listeners.add(listener);\n if (listeners.size === 1) {\n propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && prevRemove) {\n throw new Error(\"remove already exists\");\n }\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n });\n }\n const removeListener = () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n propProxyStates.forEach(([propProxyState, remove], prop) => {\n if (remove) {\n remove();\n propProxyStates.set(prop, [propProxyState]);\n }\n });\n }\n };\n return removeListener;\n };\n const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n const handler = {\n deleteProperty(target, prop) {\n const prevValue = Reflect.get(target, prop);\n removePropListener(prop);\n const deleted = Reflect.deleteProperty(target, prop);\n if (deleted) {\n notifyUpdate([\"delete\", [prop], prevValue]);\n }\n return deleted;\n },\n set(target, prop, value, receiver) {\n const hasPrevValue = Reflect.has(target, prop);\n const prevValue = Reflect.get(target, prop, receiver);\n if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {\n return true;\n }\n removePropListener(prop);\n if (isObject(value)) {\n value = getUntracked(value) || value;\n }\n let nextValue = value;\n if (value instanceof Promise) {\n value.then((v) => {\n value.status = \"fulfilled\";\n value.value = v;\n notifyUpdate([\"resolve\", [prop], v]);\n }).catch((e) => {\n value.status = \"rejected\";\n value.reason = e;\n notifyUpdate([\"reject\", [prop], e]);\n });\n } else {\n if (!proxyStateMap.has(value) && canProxy(value)) {\n nextValue = proxyFunction(value);\n }\n const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n if (childProxyState) {\n addPropListener(prop, childProxyState);\n }\n }\n Reflect.set(target, prop, nextValue, receiver);\n notifyUpdate([\"set\", [prop], value, prevValue]);\n return true;\n }\n };\n const proxyObject = newProxy(baseObject, handler);\n proxyCache.set(initialObject, proxyObject);\n const proxyState = [\n baseObject,\n ensureVersion,\n createSnapshot,\n addListener\n ];\n proxyStateMap.set(proxyObject, proxyState);\n Reflect.ownKeys(initialObject).forEach((key) => {\n const desc = Object.getOwnPropertyDescriptor(\n initialObject,\n key\n );\n if (\"value\" in desc) {\n proxyObject[key] = initialObject[key];\n delete desc.value;\n delete desc.writable;\n }\n Object.defineProperty(baseObject, key, desc);\n });\n return proxyObject;\n}) => [\n // public functions\n proxyFunction,\n // shared state\n proxyStateMap,\n refSet,\n // internal things\n objectIs,\n newProxy,\n canProxy,\n defaultHandlePromise,\n snapCache,\n createSnapshot,\n proxyCache,\n versionHolder\n];\nconst [defaultProxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n return defaultProxyFunction(initialObject);\n}\nfunction getVersion(proxyObject) {\n const proxyState = proxyStateMap.get(proxyObject);\n return proxyState == null ? void 0 : proxyState[1]();\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n let promise;\n const ops = [];\n const addListener = proxyState[3];\n let isListenerActive = false;\n const listener = (op) => {\n ops.push(op);\n if (notifyInSync) {\n callback(ops.splice(0));\n return;\n }\n if (!promise) {\n promise = Promise.resolve().then(() => {\n promise = void 0;\n if (isListenerActive) {\n callback(ops.splice(0));\n }\n });\n }\n };\n const removeListener = addListener(listener);\n isListenerActive = true;\n return () => {\n isListenerActive = false;\n removeListener();\n };\n}\nfunction snapshot(proxyObject, handlePromise) {\n const proxyState = proxyStateMap.get(proxyObject);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n const [target, ensureVersion, createSnapshot] = proxyState;\n return createSnapshot(target, ensureVersion(), handlePromise);\n}\nfunction ref(obj) {\n refSet.add(obj);\n return obj;\n}\nconst unstable_buildProxyFunction = buildProxyFunction;\n\nexport { getVersion, proxy, ref, snapshot, subscribe, unstable_buildProxyFunction };\n","import{proxy as u,subscribe as h,snapshot as P}from\"valtio/vanilla\";const o=u({history:[\"ConnectWallet\"],view:\"ConnectWallet\",data:void 0}),T={state:o,subscribe(e){return h(o,()=>e(o))},push(e,t){e!==o.view&&(o.view=e,t&&(o.data=t),o.history.push(e))},reset(e){o.view=e,o.history=[e]},replace(e){o.history.length>1&&(o.history[o.history.length-1]=e,o.view=e)},goBack(){if(o.history.length>1){o.history.pop();const[e]=o.history.slice(-1);o.view=e}},setData(e){o.data=e}},a={WALLETCONNECT_DEEPLINK_CHOICE:\"WALLETCONNECT_DEEPLINK_CHOICE\",WCM_VERSION:\"WCM_VERSION\",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<\"u\"?Boolean(window.matchMedia(\"(pointer:coarse)\").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return a.isMobile()&&navigator.userAgent.toLowerCase().includes(\"android\")},isIos(){const e=navigator.userAgent.toLowerCase();return a.isMobile()&&(e.includes(\"iphone\")||e.includes(\"ipad\"))},isHttpUrl(e){return e.startsWith(\"http://\")||e.startsWith(\"https://\")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(a.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes(\"://\")||(n=e.replaceAll(\"/\",\"\").replaceAll(\":\",\"\"),n=`${n}://`),n.endsWith(\"/\")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const i=encodeURIComponent(t);return`${n}wc?uri=${i}`},formatUniversalUrl(e,t,s){if(!a.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;n.endsWith(\"/\")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const i=encodeURIComponent(t);return`${n}wc?uri=${i}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,\"noreferrer noopener\")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info(\"Unable to set WalletConnect deep link\")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split(\"?\");localStorage.setItem(a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:\"Android\"}))}catch{console.info(\"Unable to set WalletConnect android deep link\")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(a.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info(\"Unable to remove WalletConnect deep link\")}},setModalVersionInStorage(){try{typeof localStorage<\"u\"&&localStorage.setItem(a.WCM_VERSION,\"2.6.2\")}catch{console.info(\"Unable to set Web3Modal version in storage\")}},getWalletRouterData(){var e;const t=(e=T.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing \"Wallet\" view data');return t}},_=typeof location<\"u\"&&(location.hostname.includes(\"localhost\")||location.protocol.includes(\"https\")),r=u({enabled:_,userSessionId:\"\",events:[],connectedWalletId:void 0}),R={state:r,subscribe(e){return h(r.events,()=>e(P(r.events[r.events.length-1])))},initialize(){r.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<\"u\"&&(r.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){r.connectedWalletId=e},click(e){if(r.enabled){const t={type:\"CLICK\",name:e.name,userSessionId:r.userSessionId,timestamp:Date.now(),data:e};r.events.push(t)}},track(e){if(r.enabled){const t={type:\"TRACK\",name:e.name,userSessionId:r.userSessionId,timestamp:Date.now(),data:e};r.events.push(t)}},view(e){if(r.enabled){const t={type:\"VIEW\",name:e.name,userSessionId:r.userSessionId,timestamp:Date.now(),data:e};r.events.push(t)}}},c=u({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),p={state:c,subscribe(e){return h(c,()=>e(c))},setChains(e){c.chains=e},setWalletConnectUri(e){c.walletConnectUri=e},setIsCustomDesktop(e){c.isCustomDesktop=e},setIsCustomMobile(e){c.isCustomMobile=e},setIsDataLoaded(e){c.isDataLoaded=e},setIsUiLoaded(e){c.isUiLoaded=e},setIsAuth(e){c.isAuth=e}},W=u({projectId:\"\",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),y={state:W,subscribe(e){return h(W,()=>e(W))},setConfig(e){var t,s;R.initialize(),p.setChains(e.chains),p.setIsAuth(Boolean(e.enableAuthMode)),p.setIsCustomMobile(Boolean((t=e.mobileWallets)==null?void 0:t.length)),p.setIsCustomDesktop(Boolean((s=e.desktopWallets)==null?void 0:s.length)),a.setModalVersionInStorage(),Object.assign(W,e)}};var V=Object.defineProperty,D=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,M=(e,t,s)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))H.call(t,s)&&M(e,s,t[s]);if(D)for(var s of D(t))B.call(t,s)&&M(e,s,t[s]);return e};const L=\"https://explorer-api.walletconnect.com\",E=\"wcm\",O=\"js-2.6.2\";async function w(e,t){const s=K({sdkType:E,sdkVersion:O},t),n=new URL(e,L);return n.searchParams.append(\"projectId\",y.state.projectId),Object.entries(s).forEach(([i,l])=>{l&&n.searchParams.append(i,String(l))}),(await fetch(n)).json()}const m={async getDesktopListings(e){return w(\"/w3m/v1/getDesktopListings\",e)},async getMobileListings(e){return w(\"/w3m/v1/getMobileListings\",e)},async getInjectedListings(e){return w(\"/w3m/v1/getInjectedListings\",e)},async getAllListings(e){return w(\"/w3m/v1/getAllListings\",e)},getWalletImageUrl(e){return`${L}/w3m/v1/getWalletImage/${e}?projectId=${y.state.projectId}&sdkType=${E}&sdkVersion=${O}`},getAssetImageUrl(e){return`${L}/w3m/v1/getAssetImage/${e}?projectId=${y.state.projectId}&sdkType=${E}&sdkVersion=${O}`}};var z=Object.defineProperty,j=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,k=(e,t,s)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F=(e,t)=>{for(var s in t||(t={}))J.call(t,s)&&k(e,s,t[s]);if(j)for(var s of j(t))q.call(t,s)&&k(e,s,t[s]);return e};const N=a.isMobile(),d=u({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),te={state:d,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=y.state;if(e===\"NONE\"||t===\"ALL\"&&!e)return d.recomendedWallets;if(a.isArray(e)){const s={recommendedIds:e.join(\",\")},{listings:n}=await m.getAllListings(s),i=Object.values(n);i.sort((l,v)=>{const b=e.indexOf(l.id),f=e.indexOf(v.id);return b-f}),d.recomendedWallets=i}else{const{chains:s,isAuth:n}=p.state,i=s?.join(\",\"),l=a.isArray(t),v={page:1,sdks:n?\"auth_v1\":void 0,entries:a.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:l?t.join(\",\"):void 0},{listings:b}=N?await m.getMobileListings(v):await m.getDesktopListings(v);d.recomendedWallets=Object.values(b)}return d.recomendedWallets},async getWallets(e){const t=F({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=y.state,{recomendedWallets:i}=d;if(n===\"ALL\")return d.wallets;i.length?t.excludedIds=i.map(x=>x.id).join(\",\"):a.isArray(s)&&(t.excludedIds=s.join(\",\")),a.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(\",\")),p.state.isAuth&&(t.sdks=\"auth_v1\");const{page:l,search:v}=e,{listings:b,total:f}=N?await m.getMobileListings(t):await m.getDesktopListings(t),A=Object.values(b),U=v?\"search\":\"wallets\";return d[U]={listings:[...d[U].listings,...A],total:f,page:l??1},{listings:A,total:f}},getWalletImageUrl(e){return m.getWalletImageUrl(e)},getAssetImageUrl(e){return m.getAssetImageUrl(e)},resetSearch(){d.search={listings:[],total:0,page:1}}},I=u({open:!1}),se={state:I,subscribe(e){return h(I,()=>e(I))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=p.state;if(a.removeWalletConnectDeepLink(),p.setWalletConnectUri(e?.uri),p.setChains(e?.chains),T.reset(\"ConnectWallet\"),s&&n)I.open=!0,t();else{const i=setInterval(()=>{const l=p.state;l.isUiLoaded&&l.isDataLoaded&&(clearInterval(i),I.open=!0,t())},200)}})},close(){I.open=!1}};var G=Object.defineProperty,$=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,S=(e,t,s)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Y=(e,t)=>{for(var s in t||(t={}))Q.call(t,s)&&S(e,s,t[s]);if($)for(var s of $(t))X.call(t,s)&&S(e,s,t[s]);return e};function Z(){return typeof matchMedia<\"u\"&&matchMedia(\"(prefers-color-scheme: dark)\").matches}const C=u({themeMode:Z()?\"dark\":\"light\"}),ne={state:C,subscribe(e){return h(C,()=>e(C))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(C.themeMode=t),s&&(C.themeVariables=Y({},s))}},g=u({open:!1,message:\"\",variant:\"success\"}),oe={state:g,subscribe(e){return h(g,()=>e(g))},openToast(e,t){g.open=!0,g.message=e,g.variant=t},closeToast(){g.open=!1}};export{y as ConfigCtrl,a as CoreUtil,R as EventsCtrl,te as ExplorerCtrl,se as ModalCtrl,p as OptionsCtrl,T as RouterCtrl,ne as ThemeCtrl,oe as ToastCtrl};\n//# sourceMappingURL=index.js.map\n","import{ModalCtrl as t,ThemeCtrl as o,ConfigCtrl as i,OptionsCtrl as n}from\"@walletconnect/modal-core\";class d{constructor(e){this.openModal=t.open,this.closeModal=t.close,this.subscribeModal=t.subscribe,this.setTheme=o.setThemeConfig,o.setThemeConfig(e),i.setConfig(e),this.initUi()}async initUi(){if(typeof window<\"u\"){await import(\"@walletconnect/modal-ui\");const e=document.createElement(\"wcm-modal\");document.body.insertAdjacentElement(\"beforeend\",e),n.setIsUiLoaded(!0)}}}export{d as WalletConnectModal};\n//# sourceMappingURL=index.js.map\n"],"names":["t","s","c","l","y","h","define_import_meta_env_default","o","u","T","a","n","i","_","r","R","P","p","W","V","D","H","B","M","K","L","E","O","w","m","z","j","J","q","k","F","N","d","te","v","b","f","x","A","U","I","se","G","$","Q","X","S","Y","Z","C","ne","g","oe","e"],"mappings":"AAAK,MAAYA,KAAE,UAAuDC,KAAE,OAAO,gBAA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