@wormhole-foundation/wormhole-connect 0.3.4-beta.4-development → 0.3.4-beta.5-development
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/assets/{ccip-xr4FQXXG.js → ccip-3Wt6ReJT.js} +1 -1
- package/dist/assets/{cosmos-TcYN7x14.js → cosmos-9t5ds48M.js} +1 -1
- package/dist/assets/{evm-hFktu6UR.js → evm-OtsElgWW.js} +15 -15
- package/dist/assets/index-bti7uInf.js +3 -0
- package/dist/assets/{solana-r3vOVfGL.js → solana-QOFlt-jY.js} +2 -2
- package/dist/assets/{solanaEmbed.esm-8lU7Qhqn.js → solanaEmbed.esm-bag_3ej_.js} +1 -1
- package/dist/main.js +87 -87
- package/dist/src/routes/ntt/chains/solana/nttManager.d.ts +3 -4
- package/dist/src/routes/ntt/chains/solana/nttManager.d.ts.map +1 -1
- package/dist/src/views/Bridge/Bridge.d.ts.map +1 -1
- package/lib/{aptos-yj-TK3PA.js → aptos-FYfrFJAn.js} +1 -1
- package/lib/{aptos-XkxFn0iA.mjs → aptos-yOAGVL0A.mjs} +1 -1
- package/lib/{ccip-fjiaQRuA.js → ccip-4DZ4y4JK.js} +1 -1
- package/lib/{ccip-FGsI2Vy1.mjs → ccip-bVd-xAgW.mjs} +3 -3
- package/lib/{cosmos-MDA8Rp7a.mjs → cosmos-1ZHcemM-.mjs} +3 -3
- package/lib/{cosmos-AUjYaZap.js → cosmos-I3W2GDrq.js} +1 -1
- package/lib/{evm-EK7l4v5F.mjs → evm-6AZAv06H.mjs} +344 -342
- package/lib/{evm-AzWd7TIg.js → evm-Dzswfm9c.js} +12 -12
- package/lib/index-89JtoVA8.js +3 -0
- package/lib/{index-i3M9x9ys.mjs → index-9RUWMOOC.mjs} +2 -2
- package/lib/{index-M5muoSKm.js → index-IL1hzgXP.js} +1 -1
- package/lib/{index-ZqzSOsNH.mjs → index-NnYKIwKJ.mjs} +1 -1
- package/lib/{index-uD29Qviy.js → index-SMvLj77M.js} +1 -1
- package/lib/{index-Lyx2KgEl.js → index-V4A_PX6c.js} +7 -7
- package/lib/{index-e4IwQovx.js → index-Y9Whgj7X.js} +1 -1
- package/lib/{index-GqCbgO6w.mjs → index-aNk0rR65.mjs} +195 -187
- package/lib/{index-0q2THm2w.mjs → index-n7HccAMm.mjs} +3 -3
- package/lib/{index-U4-cs6LF.mjs → index-sTeBL6uV.mjs} +68 -68
- package/lib/{index.es-sWP5wBk1.mjs → index.es-B5KKhbgG.mjs} +1 -1
- package/lib/{index.es-OMs0sEbV.js → index.es-FooOQYo2.js} +1 -1
- package/lib/{index.es-m2T5sCHF.js → index.es-Fw2-l5Vm.js} +1 -1
- package/lib/{index.es-4yp-p17j.mjs → index.es-XUetntT2.mjs} +2 -2
- package/lib/{index.es-3N17U6U-.js → index.es-iJxWQe3h.js} +2 -2
- package/lib/{index.es-D5PlxUXA.mjs → index.es-uE9XWdwW.mjs} +4 -4
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{libsodium-wrappers-LCJ8UHG9.js → libsodium-wrappers-HWiLdcvs.js} +1 -1
- package/lib/{libsodium-wrappers-w6994RX-.mjs → libsodium-wrappers-Iiu5QMxq.mjs} +1 -1
- package/lib/{sei-Oplz3AG7.js → sei-DXA4aJ5R.js} +1 -1
- package/lib/{sei-w_LUpthw.mjs → sei-tHeAuZcQ.mjs} +2 -2
- package/lib/{solana-1K5mHs_m.mjs → solana-tyLp6YrX.mjs} +3 -3
- package/lib/{solana-GtJSObQi.js → solana-zPx_afVl.js} +1 -1
- package/lib/{solanaEmbed.esm-7dEAUE3p.mjs → solanaEmbed.esm-fOkHBl3q.mjs} +2 -2
- package/lib/{solanaEmbed.esm-3t3NYEW9.js → solanaEmbed.esm-tQPC6nIa.js} +1 -1
- package/lib/src/routes/ntt/chains/solana/nttManager.d.ts +3 -4
- package/lib/src/routes/ntt/chains/solana/nttManager.d.ts.map +1 -1
- package/lib/src/views/Bridge/Bridge.d.ts.map +1 -1
- package/lib/{sui-tt-QRxQS.js → sui-ATDAv5fP.js} +1 -1
- package/lib/{sui-Z4KdsJtV.mjs → sui-l6oFo8G_.mjs} +1 -1
- package/package.json +2 -2
- package/dist/assets/index-7UgR9Epe.js +0 -3
- package/lib/index-9vpoegf2.js +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as $, p as Jt, s as Nr, g as jt, a9 as Br, ad as Rr } from "./index-
|
|
1
|
+
import { d as $, p as Jt, s as Nr, g as jt, a9 as Br, ad as Rr } from "./index-aNk0rR65.mjs";
|
|
2
2
|
import { d as Lr } from "./dijkstra-_4avdlbo.mjs";
|
|
3
|
-
import { Q as Mr } from "./index.es-
|
|
4
|
-
import { U as Pr, z as Or } from "./index.es-
|
|
3
|
+
import { Q as Mr } from "./index.es-XUetntT2.mjs";
|
|
4
|
+
import { U as Pr, z as Or } from "./index.es-B5KKhbgG.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
var Ir = function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as P,
|
|
1
|
+
import { q as P, b0 as Ye, d as Z, b1 as Ze, aW as it } from "./index-aNk0rR65.mjs";
|
|
2
2
|
var Je = {}, Qe = { exports: {} }, je = {};
|
|
3
3
|
(function(o) {
|
|
4
4
|
o.fetch = n(P.fetch) && n(P.ReadableStream), o.writableStream = n(P.WritableStream), o.abortController = n(P.AbortController);
|
|
@@ -33,13 +33,13 @@ var Je = {}, Qe = { exports: {} }, je = {};
|
|
|
33
33
|
}
|
|
34
34
|
r = null;
|
|
35
35
|
})(je);
|
|
36
|
-
var
|
|
36
|
+
var xe = {}, Ke = je, ft = Ze, et = Ye(), Ae = xe.readyStates = {
|
|
37
37
|
UNSENT: 0,
|
|
38
38
|
OPENED: 1,
|
|
39
39
|
HEADERS_RECEIVED: 2,
|
|
40
40
|
LOADING: 3,
|
|
41
41
|
DONE: 4
|
|
42
|
-
}, $e =
|
|
42
|
+
}, $e = xe.IncomingMessage = function(o, r, h, f) {
|
|
43
43
|
var n = this;
|
|
44
44
|
if (et.Readable.call(n), n._mode = h, n.headers = {}, n.rawHeaders = [], n.trailers = {}, n.rawTrailers = [], n.on("end", function() {
|
|
45
45
|
Z.process.nextTick(function() {
|
|
@@ -147,11 +147,11 @@ $e.prototype._onXHRProgress = function(o) {
|
|
|
147
147
|
}
|
|
148
148
|
r._xhr.readyState === Ae.DONE && r._mode !== "ms-stream" && (o(!0), r.push(null));
|
|
149
149
|
};
|
|
150
|
-
var he = je, ht =
|
|
150
|
+
var he = je, ht = Ze, tt = xe, ke = Ye(), ut = tt.IncomingMessage, Ve = tt.readyStates;
|
|
151
151
|
function ct(o, r) {
|
|
152
152
|
return he.fetch && r ? "fetch" : he.mozchunkedarraybuffer ? "moz-chunked-arraybuffer" : he.msstream ? "ms-stream" : he.arraybuffer && o ? "arraybuffer" : "text";
|
|
153
153
|
}
|
|
154
|
-
var
|
|
154
|
+
var S = Qe.exports = function(o) {
|
|
155
155
|
var r = this;
|
|
156
156
|
ke.Writable.call(r), r._opts = o, r._body = [], r._headers = {}, o.auth && r.setHeader("Authorization", "Basic " + Z.Buffer.from(o.auth).toString("base64")), Object.keys(o.headers).forEach(function(n) {
|
|
157
157
|
r.setHeader(n, o.headers[n]);
|
|
@@ -171,23 +171,23 @@ var I = Qe.exports = function(o) {
|
|
|
171
171
|
r._onFinish();
|
|
172
172
|
});
|
|
173
173
|
};
|
|
174
|
-
ht(
|
|
175
|
-
|
|
174
|
+
ht(S, ke.Writable);
|
|
175
|
+
S.prototype.setHeader = function(o, r) {
|
|
176
176
|
var h = this, f = o.toLowerCase();
|
|
177
177
|
pt.indexOf(f) === -1 && (h._headers[f] = {
|
|
178
178
|
name: o,
|
|
179
179
|
value: r
|
|
180
180
|
});
|
|
181
181
|
};
|
|
182
|
-
|
|
182
|
+
S.prototype.getHeader = function(o) {
|
|
183
183
|
var r = this._headers[o.toLowerCase()];
|
|
184
184
|
return r ? r.value : null;
|
|
185
185
|
};
|
|
186
|
-
|
|
186
|
+
S.prototype.removeHeader = function(o) {
|
|
187
187
|
var r = this;
|
|
188
188
|
delete r._headers[o.toLowerCase()];
|
|
189
189
|
};
|
|
190
|
-
|
|
190
|
+
S.prototype._onFinish = function() {
|
|
191
191
|
var o = this;
|
|
192
192
|
if (!o._destroyed) {
|
|
193
193
|
var r = o._opts;
|
|
@@ -267,43 +267,43 @@ function lt(o) {
|
|
|
267
267
|
return !1;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
|
|
270
|
+
S.prototype._onXHRProgress = function() {
|
|
271
271
|
var o = this;
|
|
272
272
|
o._resetTimers(!1), !(!lt(o._xhr) || o._destroyed) && (o._response || o._connect(), o._response._onXHRProgress(o._resetTimers.bind(o)));
|
|
273
273
|
};
|
|
274
|
-
|
|
274
|
+
S.prototype._connect = function() {
|
|
275
275
|
var o = this;
|
|
276
276
|
o._destroyed || (o._response = new ut(o._xhr, o._fetchResponse, o._mode, o._resetTimers.bind(o)), o._response.on("error", function(r) {
|
|
277
277
|
o.emit("error", r);
|
|
278
278
|
}), o.emit("response", o._response));
|
|
279
279
|
};
|
|
280
|
-
|
|
280
|
+
S.prototype._write = function(o, r, h) {
|
|
281
281
|
var f = this;
|
|
282
282
|
f._body.push(o), h();
|
|
283
283
|
};
|
|
284
|
-
|
|
284
|
+
S.prototype._resetTimers = function(o) {
|
|
285
285
|
var r = this;
|
|
286
286
|
P.clearTimeout(r._socketTimer), r._socketTimer = null, o ? (P.clearTimeout(r._fetchTimer), r._fetchTimer = null) : r._socketTimeout && (r._socketTimer = P.setTimeout(function() {
|
|
287
287
|
r.emit("timeout");
|
|
288
288
|
}, r._socketTimeout));
|
|
289
289
|
};
|
|
290
|
-
|
|
290
|
+
S.prototype.abort = S.prototype.destroy = function(o) {
|
|
291
291
|
var r = this;
|
|
292
292
|
r._destroyed = !0, r._resetTimers(!0), r._response && (r._response._destroyed = !0), r._xhr ? r._xhr.abort() : r._fetchAbortController && r._fetchAbortController.abort(), o && r.emit("error", o);
|
|
293
293
|
};
|
|
294
|
-
|
|
294
|
+
S.prototype.end = function(o, r, h) {
|
|
295
295
|
var f = this;
|
|
296
296
|
typeof o == "function" && (h = o, o = void 0), ke.Writable.prototype.end.call(f, o, r, h);
|
|
297
297
|
};
|
|
298
|
-
|
|
298
|
+
S.prototype.setTimeout = function(o, r) {
|
|
299
299
|
var h = this;
|
|
300
300
|
r && h.once("timeout", r), h._socketTimeout = o, h._resetTimers(!1);
|
|
301
301
|
};
|
|
302
|
-
|
|
302
|
+
S.prototype.flushHeaders = function() {
|
|
303
303
|
};
|
|
304
|
-
|
|
304
|
+
S.prototype.setNoDelay = function() {
|
|
305
305
|
};
|
|
306
|
-
|
|
306
|
+
S.prototype.setSocketKeepAlive = function() {
|
|
307
307
|
};
|
|
308
308
|
var pt = [
|
|
309
309
|
"accept-charset",
|
|
@@ -405,7 +405,7 @@ qe.exports;
|
|
|
405
405
|
(function(h) {
|
|
406
406
|
var f = r && !r.nodeType && r, n = o && !o.nodeType && o, g = typeof P == "object" && P;
|
|
407
407
|
(g.global === g || g.window === g || g.self === g) && (h = g);
|
|
408
|
-
var u, a = 2147483647, v = 36, T = 1, C = 26, m = 38, A = 700, te = 72, ae = 128,
|
|
408
|
+
var u, a = 2147483647, v = 36, T = 1, C = 26, m = 38, A = 700, te = 72, ae = 128, I = "-", Oe = /^xn--/, Ee = /[^\x20-\x7E]/, Ue = /[\x2E\u3002\uFF0E\uFF61]/g, Le = {
|
|
409
409
|
overflow: "Overflow: input needs wider integers to process",
|
|
410
410
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
411
411
|
"invalid-input": "Invalid input"
|
|
@@ -449,7 +449,7 @@ qe.exports;
|
|
|
449
449
|
}
|
|
450
450
|
function we(i) {
|
|
451
451
|
var p = [], y = i.length, b, w = 0, U = ae, q = te, R, N, B, G, L, H, k, W, Q;
|
|
452
|
-
for (R = i.lastIndexOf(
|
|
452
|
+
for (R = i.lastIndexOf(I), R < 0 && (R = 0), N = 0; N < R; ++N)
|
|
453
453
|
i.charCodeAt(N) >= 128 && J("not-basic"), p.push(i.charCodeAt(N));
|
|
454
454
|
for (B = R > 0 ? R + 1 : 0; B < y; ) {
|
|
455
455
|
for (G = w, L = 1, H = v; B >= y && J("invalid-input"), k = oe(i.charCodeAt(B++)), (k >= v || k > M((a - w) / L)) && J("overflow"), w += k * L, W = H <= q ? T : H >= q + C ? C : H - q, !(k < W); H += v)
|
|
@@ -462,7 +462,7 @@ qe.exports;
|
|
|
462
462
|
var p, y, b, w, U, q, R, N, B, G, L, H = [], k, W, Q, me;
|
|
463
463
|
for (i = Te(i), k = i.length, p = ae, y = 0, U = te, q = 0; q < k; ++q)
|
|
464
464
|
L = i[q], L < 128 && H.push(re(L));
|
|
465
|
-
for (b = w = H.length, w && H.push(
|
|
465
|
+
for (b = w = H.length, w && H.push(I); b < k; ) {
|
|
466
466
|
for (R = a, q = 0; q < k; ++q)
|
|
467
467
|
L = i[q], L >= p && L < R && (R = L);
|
|
468
468
|
for (W = b + 1, R - p > M((a - y) / W) && J("overflow"), y += (R - p) * W, p = R, q = 0; q < k; ++q)
|
|
@@ -479,10 +479,10 @@ qe.exports;
|
|
|
479
479
|
}
|
|
480
480
|
function Pe(i) {
|
|
481
481
|
return be(i, function(p) {
|
|
482
|
-
return
|
|
482
|
+
return Oe.test(p) ? we(p.slice(4).toLowerCase()) : p;
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Se(i) {
|
|
486
486
|
return be(i, function(p) {
|
|
487
487
|
return Ee.test(p) ? "xn--" + Re(p) : p;
|
|
488
488
|
});
|
|
@@ -507,7 +507,7 @@ qe.exports;
|
|
|
507
507
|
},
|
|
508
508
|
decode: we,
|
|
509
509
|
encode: Re,
|
|
510
|
-
toASCII:
|
|
510
|
+
toASCII: Se,
|
|
511
511
|
toUnicode: Pe
|
|
512
512
|
}, f && n)
|
|
513
513
|
if (o.exports == f)
|
|
@@ -539,11 +539,11 @@ var _t = qe.exports;
|
|
|
539
539
|
isNullOrUndefined: function(e) {
|
|
540
540
|
return e == null;
|
|
541
541
|
}
|
|
542
|
-
}, v = g.default, T = a, C = ne, m = Re, A = Pe, te = we, ae =
|
|
543
|
-
function
|
|
542
|
+
}, v = g.default, T = a, C = ne, m = Re, A = Pe, te = we, ae = I;
|
|
543
|
+
function I() {
|
|
544
544
|
this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
|
|
545
545
|
}
|
|
546
|
-
var
|
|
546
|
+
var Oe = /^([a-z0-9.+-]+:)/i, Ee = /:[0-9]*$/, Ue = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Le = ["<", ">", '"', "`", " ", "\r", `
|
|
547
547
|
`, " "], pe = ["{", "}", "|", "\\", "^", "`"].concat(Le), M = ["'"].concat(pe), re = ["%", "/", "?", ";", "#"].concat(M), ie = ["/", "?", "#"], J = 255, de = /^[+a-z0-9A-Z_-]{0,63}$/, be = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Te = {
|
|
548
548
|
javascript: !0,
|
|
549
549
|
"javascript:": !0
|
|
@@ -563,12 +563,12 @@ var _t = qe.exports;
|
|
|
563
563
|
"file:": !0
|
|
564
564
|
}, ce = u.default;
|
|
565
565
|
function ne(e, s, t) {
|
|
566
|
-
if (e && T.isObject(e) && e instanceof
|
|
566
|
+
if (e && T.isObject(e) && e instanceof I)
|
|
567
567
|
return e;
|
|
568
|
-
var l = new
|
|
568
|
+
var l = new I();
|
|
569
569
|
return l.parse(e, s, t), l;
|
|
570
570
|
}
|
|
571
|
-
|
|
571
|
+
I.prototype.parse = function(e, s, t) {
|
|
572
572
|
if (!T.isString(e))
|
|
573
573
|
throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
|
|
574
574
|
var l = e.indexOf("?"), _ = l !== -1 && l < e.indexOf("#") ? "?" : "#", D = e.split(_), j = /\\/g;
|
|
@@ -579,37 +579,37 @@ var _t = qe.exports;
|
|
|
579
579
|
if (K)
|
|
580
580
|
return this.path = c, this.href = c, this.pathname = K[1], K[2] ? (this.search = K[2], s ? this.query = ce.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : s && (this.search = "", this.query = {}), this;
|
|
581
581
|
}
|
|
582
|
-
var
|
|
583
|
-
if (
|
|
584
|
-
|
|
585
|
-
var fe =
|
|
586
|
-
this.protocol = fe, c = c.substr(
|
|
582
|
+
var x = Oe.exec(c);
|
|
583
|
+
if (x) {
|
|
584
|
+
x = x[0];
|
|
585
|
+
var fe = x.toLowerCase();
|
|
586
|
+
this.protocol = fe, c = c.substr(x.length);
|
|
587
587
|
}
|
|
588
|
-
if (t ||
|
|
588
|
+
if (t || x || c.match(/^\/\/[^@\/]+@[^@\/]+/)) {
|
|
589
589
|
var ve = c.substr(0, 2) === "//";
|
|
590
|
-
ve && !(
|
|
590
|
+
ve && !(x && ue[x]) && (c = c.substr(2), this.slashes = !0);
|
|
591
591
|
}
|
|
592
|
-
if (!ue[
|
|
593
|
-
for (var F = -1,
|
|
594
|
-
var ee = c.indexOf(ie[
|
|
592
|
+
if (!ue[x] && (ve || x && !oe[x])) {
|
|
593
|
+
for (var F = -1, O = 0; O < ie.length; O++) {
|
|
594
|
+
var ee = c.indexOf(ie[O]);
|
|
595
595
|
ee !== -1 && (F === -1 || ee < F) && (F = ee);
|
|
596
596
|
}
|
|
597
597
|
var ye, $;
|
|
598
598
|
F === -1 ? $ = c.lastIndexOf("@") : $ = c.lastIndexOf("@", F), $ !== -1 && (ye = c.slice(0, $), c = c.slice($ + 1), this.auth = decodeURIComponent(ye)), F = -1;
|
|
599
|
-
for (var
|
|
600
|
-
var ee = c.indexOf(re[
|
|
599
|
+
for (var O = 0; O < re.length; O++) {
|
|
600
|
+
var ee = c.indexOf(re[O]);
|
|
601
601
|
ee !== -1 && (F === -1 || ee < F) && (F = ee);
|
|
602
602
|
}
|
|
603
603
|
F === -1 && (F = c.length), this.host = c.slice(0, F), c = c.slice(F), this.parseHost(), this.hostname = this.hostname || "";
|
|
604
604
|
var ge = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
605
605
|
if (!ge)
|
|
606
|
-
for (var d = this.hostname.split(/\./),
|
|
607
|
-
var V = d[
|
|
606
|
+
for (var d = this.hostname.split(/\./), O = 0, E = d.length; O < E; O++) {
|
|
607
|
+
var V = d[O];
|
|
608
608
|
if (V && !V.match(de)) {
|
|
609
|
-
for (var z = "", X = 0,
|
|
609
|
+
for (var z = "", X = 0, Ie = V.length; X < Ie; X++)
|
|
610
610
|
V.charCodeAt(X) > 127 ? z += "x" : z += V[X];
|
|
611
611
|
if (!z.match(de)) {
|
|
612
|
-
var se = d.slice(0,
|
|
612
|
+
var se = d.slice(0, O), Y = d.slice(O + 1), le = V.match(be);
|
|
613
613
|
le && (se.push(le[1]), Y.unshift(le[2])), Y.length && (c = "/" + Y.join(".") + c), this.hostname = se.join(".");
|
|
614
614
|
break;
|
|
615
615
|
}
|
|
@@ -620,8 +620,8 @@ var _t = qe.exports;
|
|
|
620
620
|
this.host = st + Fe, this.href += this.host, ge && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), c[0] !== "/" && (c = "/" + c));
|
|
621
621
|
}
|
|
622
622
|
if (!Te[fe])
|
|
623
|
-
for (var
|
|
624
|
-
var _e = M[
|
|
623
|
+
for (var O = 0, E = M.length; O < E; O++) {
|
|
624
|
+
var _e = M[O];
|
|
625
625
|
if (c.indexOf(_e) !== -1) {
|
|
626
626
|
var Me = encodeURIComponent(_e);
|
|
627
627
|
Me === _e && (Me = escape(_e)), c = c.split(_e).join(Me);
|
|
@@ -637,9 +637,9 @@ var _t = qe.exports;
|
|
|
637
637
|
return this.href = this.format(), this;
|
|
638
638
|
};
|
|
639
639
|
function we(e) {
|
|
640
|
-
return T.isString(e) && (e = ne(e)), e instanceof
|
|
640
|
+
return T.isString(e) && (e = ne(e)), e instanceof I ? e.format() : I.prototype.format.call(e);
|
|
641
641
|
}
|
|
642
|
-
|
|
642
|
+
I.prototype.format = function() {
|
|
643
643
|
var e = this.auth || "";
|
|
644
644
|
e && (e = encodeURIComponent(e), e = e.replace(/%3A/i, ":"), e += "@");
|
|
645
645
|
var s = this.protocol || "", t = this.pathname || "", l = this.hash || "", _ = !1, D = "";
|
|
@@ -652,18 +652,18 @@ var _t = qe.exports;
|
|
|
652
652
|
function Re(e, s) {
|
|
653
653
|
return ne(e, !1, !0).resolve(s);
|
|
654
654
|
}
|
|
655
|
-
|
|
655
|
+
I.prototype.resolve = function(e) {
|
|
656
656
|
return this.resolveObject(ne(e, !1, !0)).format();
|
|
657
657
|
};
|
|
658
658
|
function Pe(e, s) {
|
|
659
659
|
return e ? ne(e, !1, !0).resolveObject(s) : s;
|
|
660
660
|
}
|
|
661
|
-
|
|
661
|
+
I.prototype.resolveObject = function(e) {
|
|
662
662
|
if (T.isString(e)) {
|
|
663
|
-
var s = new
|
|
663
|
+
var s = new I();
|
|
664
664
|
s.parse(e, !1, !0), e = s;
|
|
665
665
|
}
|
|
666
|
-
for (var t = new
|
|
666
|
+
for (var t = new I(), l = Object.keys(this), _ = 0; _ < l.length; _++) {
|
|
667
667
|
var D = l[_];
|
|
668
668
|
t[D] = this[D];
|
|
669
669
|
}
|
|
@@ -678,8 +678,8 @@ var _t = qe.exports;
|
|
|
678
678
|
}
|
|
679
679
|
if (e.protocol && e.protocol !== t.protocol) {
|
|
680
680
|
if (!oe[e.protocol]) {
|
|
681
|
-
for (var
|
|
682
|
-
var ve =
|
|
681
|
+
for (var x = Object.keys(e), fe = 0; fe < x.length; fe++) {
|
|
682
|
+
var ve = x[fe];
|
|
683
683
|
t[ve] = e[ve];
|
|
684
684
|
}
|
|
685
685
|
return t.href = t.format(), t;
|
|
@@ -691,8 +691,8 @@ var _t = qe.exports;
|
|
|
691
691
|
} else
|
|
692
692
|
t.pathname = e.pathname;
|
|
693
693
|
if (t.search = e.search, t.query = e.query, t.host = e.host || "", t.auth = e.auth, t.hostname = e.hostname || e.host, t.port = e.port, t.pathname || t.search) {
|
|
694
|
-
var F = t.pathname || "",
|
|
695
|
-
t.path = F +
|
|
694
|
+
var F = t.pathname || "", O = t.search || "";
|
|
695
|
+
t.path = F + O;
|
|
696
696
|
}
|
|
697
697
|
return t.slashes = t.slashes || e.slashes, t.href = t.format(), t;
|
|
698
698
|
}
|
|
@@ -711,12 +711,12 @@ var _t = qe.exports;
|
|
|
711
711
|
}
|
|
712
712
|
if (!d.length)
|
|
713
713
|
return t.pathname = null, t.search ? t.path = "/" + t.search : t.path = null, t.href = t.format(), t;
|
|
714
|
-
for (var X = d.slice(-1)[0],
|
|
714
|
+
for (var X = d.slice(-1)[0], Ie = (t.host || e.host || d.length > 1) && (X === "." || X === "..") || X === "", se = 0, Y = d.length; Y >= 0; Y--)
|
|
715
715
|
X = d[Y], X === "." ? d.splice(Y, 1) : X === ".." ? (d.splice(Y, 1), se++) : se && (d.splice(Y, 1), se--);
|
|
716
716
|
if (!$ && !ge)
|
|
717
717
|
for (; se--; se)
|
|
718
718
|
d.unshift("..");
|
|
719
|
-
$ && d[0] !== "" && (!d[0] || d[0].charAt(0) !== "/") && d.unshift(""),
|
|
719
|
+
$ && d[0] !== "" && (!d[0] || d[0].charAt(0) !== "/") && d.unshift(""), Ie && d.join("/").substr(-1) !== "/" && d.push("");
|
|
720
720
|
var le = d[0] === "" || d[0] && d[0].charAt(0) === "/";
|
|
721
721
|
if (V) {
|
|
722
722
|
t.hostname = t.host = le ? "" : d.length ? d.shift() : "";
|
|
@@ -724,11 +724,11 @@ var _t = qe.exports;
|
|
|
724
724
|
z && (t.auth = z.shift(), t.host = t.hostname = z.shift());
|
|
725
725
|
}
|
|
726
726
|
return $ = $ || t.host && d.length, $ && !le && d.unshift(""), d.length ? t.pathname = d.join("/") : (t.pathname = null, t.path = null), (!T.isNull(t.pathname) || !T.isNull(t.search)) && (t.path = (t.pathname ? t.pathname : "") + (t.search ? t.search : "")), t.auth = e.auth || t.auth, t.slashes = t.slashes || e.slashes, t.href = t.format(), t;
|
|
727
|
-
},
|
|
727
|
+
}, I.prototype.parseHost = function() {
|
|
728
728
|
var e = this.host, s = Ee.exec(e);
|
|
729
729
|
s && (s = s[0], s !== ":" && (this.port = s.substr(1)), e = e.substr(0, e.length - s.length)), e && (this.hostname = e);
|
|
730
730
|
};
|
|
731
|
-
function
|
|
731
|
+
function Se(e, s) {
|
|
732
732
|
for (var t = 0, l = e.length - 1; l >= 0; l--) {
|
|
733
733
|
var _ = e[l];
|
|
734
734
|
_ === "." ? e.splice(l, 1) : _ === ".." ? (e.splice(l, 1), t++) : t && (e.splice(l, 1), t--);
|
|
@@ -747,7 +747,7 @@ var _t = qe.exports;
|
|
|
747
747
|
continue;
|
|
748
748
|
e = l + "/" + e, s = l.charAt(0) === "/";
|
|
749
749
|
}
|
|
750
|
-
return e =
|
|
750
|
+
return e = Se(p(e.split("/"), function(_) {
|
|
751
751
|
return !!_;
|
|
752
752
|
}), !s).join("/"), (s ? "/" : "") + e || ".";
|
|
753
753
|
}
|
|
@@ -859,8 +859,8 @@ var _t = qe.exports;
|
|
|
859
859
|
return b(s);
|
|
860
860
|
if (typeof t != "object" || t === null)
|
|
861
861
|
throw new TypeError('The "options" argument must be of type object.');
|
|
862
|
-
var j = (l = t.auth) != null ? l : !0, c = (_ = t.fragment) != null ? _ : !0, K = (D = t.search) != null ? D : !0,
|
|
863
|
-
return j || (
|
|
862
|
+
var j = (l = t.auth) != null ? l : !0, c = (_ = t.fragment) != null ? _ : !0, K = (D = t.search) != null ? D : !0, x = new R(s.toString());
|
|
863
|
+
return j || (x.username = "", x.password = ""), c || (x.hash = ""), K || (x.search = ""), x.toString();
|
|
864
864
|
}
|
|
865
865
|
), We = {
|
|
866
866
|
format: Xe,
|
|
@@ -879,7 +879,7 @@ var _t = qe.exports;
|
|
|
879
879
|
})(He, He.exports);
|
|
880
880
|
var rt = He.exports;
|
|
881
881
|
(function(o) {
|
|
882
|
-
var r = dt, h =
|
|
882
|
+
var r = dt, h = xe, f = mt, n = gt, g = rt, u = o;
|
|
883
883
|
u.request = function(a, v) {
|
|
884
884
|
typeof a == "string" ? a = g.parse(a) : a = f(a);
|
|
885
885
|
var T = P.location.protocol.search(/^https?:$/) === -1 ? "http:" : "", C = a.protocol || T, m = a.hostname || a.host, A = a.port, te = a.path || "/";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const M=require("./index-Lyx2KgEl.js"),l=require("./index.es-m2T5sCHF.js"),xn=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,In=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Sn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Pn(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){On(r);return}return e}function On(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function ri(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.at(-1)==='"'&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const i=t.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!Sn.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(xn.test(r)||In.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,Pn)}return JSON.parse(r)}catch(i){if(e.strict)throw i;return r}}function Rn(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function $e(r,...e){try{return Rn(r(...e))}catch(t){return Promise.reject(t)}}function Nn(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function Tn(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function ai(r){if(Nn(r))return String(r);if(Tn(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return ai(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function Ws(){if(typeof M.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Ni="base64:";function An(r){if(typeof r=="string")return r;Ws();const e=M.dist.Buffer.from(r).toString("base64");return Ni+e}function Fn(r){return typeof r!="string"||!r.startsWith(Ni)?r:(Ws(),M.dist.Buffer.from(r.slice(Ni.length),"base64"))}function Ye(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function Cn(...r){return Ye(r.join(":"))}function ni(r){return r=Ye(r),r?r+":":""}const Ln="memory",Dn=()=>{const r=new Map;return{name:Ln,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function jn(r={}){const e={mounts:{"":r.driver||Dn()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=c=>{for(const d of e.mountpoints)if(c.startsWith(d))return{base:d,relativeKey:c.slice(d.length),driver:e.mounts[d]};return{base:"",relativeKey:c,driver:e.mounts[""]}},i=(c,d)=>e.mountpoints.filter(m=>m.startsWith(c)||d&&c.startsWith(m)).map(m=>({relativeBase:c.length>m.length?c.slice(m.length):void 0,mountpoint:m,driver:e.mounts[m]})),s=(c,d)=>{if(e.watching){d=Ye(d);for(const m of e.watchListeners)m(c,d)}},n=async()=>{if(!e.watching){e.watching=!0;for(const c in e.mounts)e.unwatch[c]=await os(e.mounts[c],s,c)}},a=async()=>{if(e.watching){for(const c in e.unwatch)await e.unwatch[c]();e.unwatch={},e.watching=!1}},h=(c,d,m)=>{const y=new Map,I=v=>{let N=y.get(v.base);return N||(N={driver:v.driver,base:v.base,items:[]},y.set(v.base,N)),N};for(const v of c){const N=typeof v=="string",z=Ye(N?v:v.key),K=N?void 0:v.value,q=N||!v.options?d:{...d,...v.options},k=t(z);I(k).items.push({key:z,value:K,relativeKey:k.relativeKey,options:q})}return Promise.all([...y.values()].map(v=>m(v))).then(v=>v.flat())},f={hasItem(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return $e(y.hasItem,m,d)},getItem(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return $e(y.getItem,m,d).then(I=>ri(I))},getItems(c,d){return h(c,d,m=>m.driver.getItems?$e(m.driver.getItems,m.items.map(y=>({key:y.relativeKey,options:y.options})),d).then(y=>y.map(I=>({key:Cn(m.base,I.key),value:ri(I.value)}))):Promise.all(m.items.map(y=>$e(m.driver.getItem,y.relativeKey,y.options).then(I=>({key:y.key,value:ri(I)})))))},getItemRaw(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return y.getItemRaw?$e(y.getItemRaw,m,d):$e(y.getItem,m,d).then(I=>Fn(I))},async setItem(c,d,m={}){if(d===void 0)return f.removeItem(c);c=Ye(c);const{relativeKey:y,driver:I}=t(c);I.setItem&&(await $e(I.setItem,y,ai(d),m),I.watch||s("update",c))},async setItems(c,d){await h(c,d,async m=>{m.driver.setItems&&await $e(m.driver.setItems,m.items.map(y=>({key:y.relativeKey,value:ai(y.value),options:y.options})),d),m.driver.setItem&&await Promise.all(m.items.map(y=>$e(m.driver.setItem,y.relativeKey,ai(y.value),y.options)))})},async setItemRaw(c,d,m={}){if(d===void 0)return f.removeItem(c,m);c=Ye(c);const{relativeKey:y,driver:I}=t(c);if(I.setItemRaw)await $e(I.setItemRaw,y,d,m);else if(I.setItem)await $e(I.setItem,y,An(d),m);else return;I.watch||s("update",c)},async removeItem(c,d={}){typeof d=="boolean"&&(d={removeMeta:d}),c=Ye(c);const{relativeKey:m,driver:y}=t(c);y.removeItem&&(await $e(y.removeItem,m,d),(d.removeMeta||d.removeMata)&&await $e(y.removeItem,m+"$",d),y.watch||s("remove",c))},async getMeta(c,d={}){typeof d=="boolean"&&(d={nativeOnly:d}),c=Ye(c);const{relativeKey:m,driver:y}=t(c),I=Object.create(null);if(y.getMeta&&Object.assign(I,await $e(y.getMeta,m,d)),!d.nativeOnly){const v=await $e(y.getItem,m+"$",d).then(N=>ri(N));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(I,v))}return I},setMeta(c,d,m={}){return this.setItem(c+"$",d,m)},removeMeta(c,d={}){return this.removeItem(c+"$",d)},async getKeys(c,d={}){c=ni(c);const m=i(c,!0);let y=[];const I=[];for(const v of m){const z=(await $e(v.driver.getKeys,v.relativeBase,d)).map(K=>v.mountpoint+Ye(K)).filter(K=>!y.some(q=>K.startsWith(q)));I.push(...z),y=[v.mountpoint,...y.filter(K=>!K.startsWith(v.mountpoint))]}return c?I.filter(v=>v.startsWith(c)&&!v.endsWith("$")):I.filter(v=>!v.endsWith("$"))},async clear(c,d={}){c=ni(c),await Promise.all(i(c,!1).map(async m=>{if(m.driver.clear)return $e(m.driver.clear,m.relativeBase,d);if(m.driver.removeItem){const y=await m.driver.getKeys(m.relativeBase||"",d);return Promise.all(y.map(I=>m.driver.removeItem(I,d)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(c=>as(c)))},async watch(c){return await n(),e.watchListeners.push(c),async()=>{e.watchListeners=e.watchListeners.filter(d=>d!==c),e.watchListeners.length===0&&await a()}},async unwatch(){e.watchListeners=[],await a()},mount(c,d){if(c=ni(c),c&&e.mounts[c])throw new Error(`already mounted at ${c}`);return c&&(e.mountpoints.push(c),e.mountpoints.sort((m,y)=>y.length-m.length)),e.mounts[c]=d,e.watching&&Promise.resolve(os(d,s,c)).then(m=>{e.unwatch[c]=m}).catch(console.error),f},async unmount(c,d=!0){c=ni(c),!(!c||!e.mounts[c])&&(e.watching&&c in e.unwatch&&(e.unwatch[c](),delete e.unwatch[c]),d&&await as(e.mounts[c]),e.mountpoints=e.mountpoints.filter(m=>m!==c),delete e.mounts[c])},getMount(c=""){c=Ye(c)+":";const d=t(c);return{driver:d.driver,base:d.base}},getMounts(c="",d={}){return c=Ye(c),i(c,d.parents).map(y=>({driver:y.driver,base:y.mountpoint}))}};return f}function os(r,e,t){return r.watch?r.watch((i,s)=>e(i,t+s)):()=>{}}async function as(r){typeof r.dispose=="function"&&await $e(r.dispose)}function Nt(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function Ys(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const i=Nt(t);return(s,n)=>i.then(a=>n(a.transaction(e,s).objectStore(e)))}let wi;function Wt(){return wi||(wi=Ys("keyval-store","keyval")),wi}function cs(r,e=Wt()){return e("readonly",t=>Nt(t.get(r)))}function $n(r,e,t=Wt()){return t("readwrite",i=>(i.put(e,r),Nt(i.transaction)))}function Mn(r,e=Wt()){return e("readwrite",t=>(t.delete(r),Nt(t.transaction)))}function qn(r=Wt()){return r("readwrite",e=>(e.clear(),Nt(e.transaction)))}function zn(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Nt(r.transaction)}function Un(r=Wt()){return r("readonly",e=>{if(e.getAllKeys)return Nt(e.getAllKeys());const t=[];return zn(e,i=>t.push(i.key)).then(()=>t)})}const Kn=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),Vn=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(i,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Qs(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return Vn(r)}catch{return r}}function Xs(r){return typeof r=="string"?r:Kn(r)||""}const Bn="idb-keyval";var Hn=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=s=>e+s;let i;return r.dbName&&r.storeName&&(i=Ys(r.dbName,r.storeName)),{name:Bn,options:r,async hasItem(s){return!(typeof await cs(t(s),i)>"u")},async getItem(s){return await cs(t(s),i)??null},setItem(s,n){return $n(t(s),n,i)},removeItem(s){return Mn(t(s),i)},getKeys(){return Un(i)},clear(){return qn(i)}}};const Gn="WALLET_CONNECT_V2_INDEXED_DB",kn="keyvaluestorage";class Jn{constructor(){this.indexedDb=jn({driver:Hn({dbName:Gn,storeName:kn})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,Xs(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var bi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof M.dist.global<"u"?M.dist.global:typeof self<"u"?self:{},ci={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,i){this[t]=String(i)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(i){t[i]=void 0,delete t[i]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof bi<"u"&&bi.localStorage?ci.exports=bi.localStorage:typeof window<"u"&&window.localStorage?ci.exports=window.localStorage:ci.exports=new e})();function Wn(r){var e;return[r[0],Qs((e=r[1])!=null?e:"")]}class Yn{constructor(){this.localStorage=ci.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Wn)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return Qs(t)}async setItem(e,t){this.localStorage.setItem(e,Xs(t))}async removeItem(e){this.localStorage.removeItem(e)}}const Qn="wc_storage_version",hs=1,Xn=async(r,e,t)=>{const i=Qn,s=await e.getItem(i);if(s&&s>=hs){t(e);return}const n=await r.getKeys();if(!n.length){t(e);return}const a=[];for(;n.length;){const h=n.shift();if(!h)continue;const f=h.toLowerCase();if(f.includes("wc@")||f.includes("walletconnect")||f.includes("wc_")||f.includes("wallet_connect")){const c=await r.getItem(h);await e.setItem(h,c),a.push(h)}}await e.setItem(i,hs),t(e),Zn(r,a)},Zn=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let eo=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new Yn;this.storage=e;try{const t=new Jn;Xn(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};var Lt={};/*! *****************************************************************************
|
|
1
|
+
"use strict";const M=require("./index-V4A_PX6c.js"),l=require("./index.es-Fw2-l5Vm.js"),xn=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,In=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Sn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Pn(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){On(r);return}return e}function On(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function ri(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.at(-1)==='"'&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const i=t.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!Sn.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(xn.test(r)||In.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,Pn)}return JSON.parse(r)}catch(i){if(e.strict)throw i;return r}}function Rn(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function $e(r,...e){try{return Rn(r(...e))}catch(t){return Promise.reject(t)}}function Nn(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function Tn(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function ai(r){if(Nn(r))return String(r);if(Tn(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return ai(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function Ws(){if(typeof M.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Ni="base64:";function An(r){if(typeof r=="string")return r;Ws();const e=M.dist.Buffer.from(r).toString("base64");return Ni+e}function Fn(r){return typeof r!="string"||!r.startsWith(Ni)?r:(Ws(),M.dist.Buffer.from(r.slice(Ni.length),"base64"))}function Ye(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function Cn(...r){return Ye(r.join(":"))}function ni(r){return r=Ye(r),r?r+":":""}const Ln="memory",Dn=()=>{const r=new Map;return{name:Ln,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function jn(r={}){const e={mounts:{"":r.driver||Dn()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=c=>{for(const d of e.mountpoints)if(c.startsWith(d))return{base:d,relativeKey:c.slice(d.length),driver:e.mounts[d]};return{base:"",relativeKey:c,driver:e.mounts[""]}},i=(c,d)=>e.mountpoints.filter(m=>m.startsWith(c)||d&&c.startsWith(m)).map(m=>({relativeBase:c.length>m.length?c.slice(m.length):void 0,mountpoint:m,driver:e.mounts[m]})),s=(c,d)=>{if(e.watching){d=Ye(d);for(const m of e.watchListeners)m(c,d)}},n=async()=>{if(!e.watching){e.watching=!0;for(const c in e.mounts)e.unwatch[c]=await os(e.mounts[c],s,c)}},a=async()=>{if(e.watching){for(const c in e.unwatch)await e.unwatch[c]();e.unwatch={},e.watching=!1}},h=(c,d,m)=>{const y=new Map,I=v=>{let N=y.get(v.base);return N||(N={driver:v.driver,base:v.base,items:[]},y.set(v.base,N)),N};for(const v of c){const N=typeof v=="string",z=Ye(N?v:v.key),K=N?void 0:v.value,q=N||!v.options?d:{...d,...v.options},k=t(z);I(k).items.push({key:z,value:K,relativeKey:k.relativeKey,options:q})}return Promise.all([...y.values()].map(v=>m(v))).then(v=>v.flat())},f={hasItem(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return $e(y.hasItem,m,d)},getItem(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return $e(y.getItem,m,d).then(I=>ri(I))},getItems(c,d){return h(c,d,m=>m.driver.getItems?$e(m.driver.getItems,m.items.map(y=>({key:y.relativeKey,options:y.options})),d).then(y=>y.map(I=>({key:Cn(m.base,I.key),value:ri(I.value)}))):Promise.all(m.items.map(y=>$e(m.driver.getItem,y.relativeKey,y.options).then(I=>({key:y.key,value:ri(I)})))))},getItemRaw(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return y.getItemRaw?$e(y.getItemRaw,m,d):$e(y.getItem,m,d).then(I=>Fn(I))},async setItem(c,d,m={}){if(d===void 0)return f.removeItem(c);c=Ye(c);const{relativeKey:y,driver:I}=t(c);I.setItem&&(await $e(I.setItem,y,ai(d),m),I.watch||s("update",c))},async setItems(c,d){await h(c,d,async m=>{m.driver.setItems&&await $e(m.driver.setItems,m.items.map(y=>({key:y.relativeKey,value:ai(y.value),options:y.options})),d),m.driver.setItem&&await Promise.all(m.items.map(y=>$e(m.driver.setItem,y.relativeKey,ai(y.value),y.options)))})},async setItemRaw(c,d,m={}){if(d===void 0)return f.removeItem(c,m);c=Ye(c);const{relativeKey:y,driver:I}=t(c);if(I.setItemRaw)await $e(I.setItemRaw,y,d,m);else if(I.setItem)await $e(I.setItem,y,An(d),m);else return;I.watch||s("update",c)},async removeItem(c,d={}){typeof d=="boolean"&&(d={removeMeta:d}),c=Ye(c);const{relativeKey:m,driver:y}=t(c);y.removeItem&&(await $e(y.removeItem,m,d),(d.removeMeta||d.removeMata)&&await $e(y.removeItem,m+"$",d),y.watch||s("remove",c))},async getMeta(c,d={}){typeof d=="boolean"&&(d={nativeOnly:d}),c=Ye(c);const{relativeKey:m,driver:y}=t(c),I=Object.create(null);if(y.getMeta&&Object.assign(I,await $e(y.getMeta,m,d)),!d.nativeOnly){const v=await $e(y.getItem,m+"$",d).then(N=>ri(N));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(I,v))}return I},setMeta(c,d,m={}){return this.setItem(c+"$",d,m)},removeMeta(c,d={}){return this.removeItem(c+"$",d)},async getKeys(c,d={}){c=ni(c);const m=i(c,!0);let y=[];const I=[];for(const v of m){const z=(await $e(v.driver.getKeys,v.relativeBase,d)).map(K=>v.mountpoint+Ye(K)).filter(K=>!y.some(q=>K.startsWith(q)));I.push(...z),y=[v.mountpoint,...y.filter(K=>!K.startsWith(v.mountpoint))]}return c?I.filter(v=>v.startsWith(c)&&!v.endsWith("$")):I.filter(v=>!v.endsWith("$"))},async clear(c,d={}){c=ni(c),await Promise.all(i(c,!1).map(async m=>{if(m.driver.clear)return $e(m.driver.clear,m.relativeBase,d);if(m.driver.removeItem){const y=await m.driver.getKeys(m.relativeBase||"",d);return Promise.all(y.map(I=>m.driver.removeItem(I,d)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(c=>as(c)))},async watch(c){return await n(),e.watchListeners.push(c),async()=>{e.watchListeners=e.watchListeners.filter(d=>d!==c),e.watchListeners.length===0&&await a()}},async unwatch(){e.watchListeners=[],await a()},mount(c,d){if(c=ni(c),c&&e.mounts[c])throw new Error(`already mounted at ${c}`);return c&&(e.mountpoints.push(c),e.mountpoints.sort((m,y)=>y.length-m.length)),e.mounts[c]=d,e.watching&&Promise.resolve(os(d,s,c)).then(m=>{e.unwatch[c]=m}).catch(console.error),f},async unmount(c,d=!0){c=ni(c),!(!c||!e.mounts[c])&&(e.watching&&c in e.unwatch&&(e.unwatch[c](),delete e.unwatch[c]),d&&await as(e.mounts[c]),e.mountpoints=e.mountpoints.filter(m=>m!==c),delete e.mounts[c])},getMount(c=""){c=Ye(c)+":";const d=t(c);return{driver:d.driver,base:d.base}},getMounts(c="",d={}){return c=Ye(c),i(c,d.parents).map(y=>({driver:y.driver,base:y.mountpoint}))}};return f}function os(r,e,t){return r.watch?r.watch((i,s)=>e(i,t+s)):()=>{}}async function as(r){typeof r.dispose=="function"&&await $e(r.dispose)}function Nt(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function Ys(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const i=Nt(t);return(s,n)=>i.then(a=>n(a.transaction(e,s).objectStore(e)))}let wi;function Wt(){return wi||(wi=Ys("keyval-store","keyval")),wi}function cs(r,e=Wt()){return e("readonly",t=>Nt(t.get(r)))}function $n(r,e,t=Wt()){return t("readwrite",i=>(i.put(e,r),Nt(i.transaction)))}function Mn(r,e=Wt()){return e("readwrite",t=>(t.delete(r),Nt(t.transaction)))}function qn(r=Wt()){return r("readwrite",e=>(e.clear(),Nt(e.transaction)))}function zn(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Nt(r.transaction)}function Un(r=Wt()){return r("readonly",e=>{if(e.getAllKeys)return Nt(e.getAllKeys());const t=[];return zn(e,i=>t.push(i.key)).then(()=>t)})}const Kn=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),Vn=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(i,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Qs(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return Vn(r)}catch{return r}}function Xs(r){return typeof r=="string"?r:Kn(r)||""}const Bn="idb-keyval";var Hn=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=s=>e+s;let i;return r.dbName&&r.storeName&&(i=Ys(r.dbName,r.storeName)),{name:Bn,options:r,async hasItem(s){return!(typeof await cs(t(s),i)>"u")},async getItem(s){return await cs(t(s),i)??null},setItem(s,n){return $n(t(s),n,i)},removeItem(s){return Mn(t(s),i)},getKeys(){return Un(i)},clear(){return qn(i)}}};const Gn="WALLET_CONNECT_V2_INDEXED_DB",kn="keyvaluestorage";class Jn{constructor(){this.indexedDb=jn({driver:Hn({dbName:Gn,storeName:kn})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,Xs(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var bi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof M.dist.global<"u"?M.dist.global:typeof self<"u"?self:{},ci={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,i){this[t]=String(i)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(i){t[i]=void 0,delete t[i]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof bi<"u"&&bi.localStorage?ci.exports=bi.localStorage:typeof window<"u"&&window.localStorage?ci.exports=window.localStorage:ci.exports=new e})();function Wn(r){var e;return[r[0],Qs((e=r[1])!=null?e:"")]}class Yn{constructor(){this.localStorage=ci.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Wn)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return Qs(t)}async setItem(e,t){this.localStorage.setItem(e,Xs(t))}async removeItem(e){this.localStorage.removeItem(e)}}const Qn="wc_storage_version",hs=1,Xn=async(r,e,t)=>{const i=Qn,s=await e.getItem(i);if(s&&s>=hs){t(e);return}const n=await r.getKeys();if(!n.length){t(e);return}const a=[];for(;n.length;){const h=n.shift();if(!h)continue;const f=h.toLowerCase();if(f.includes("wc@")||f.includes("walletconnect")||f.includes("wc_")||f.includes("wallet_connect")){const c=await r.getItem(h);await e.setItem(h,c),a.push(h)}}await e.setItem(i,hs),t(e),Zn(r,a)},Zn=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let eo=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new Yn;this.storage=e;try{const t=new Jn;Xn(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};var Lt={};/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|