@txnlab/use-wallet-solid 3.9.0 → 3.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk/2PXYBV4S.jsx +883 -0
- package/dist/chunk/3J6PRJNJ.mjs +779 -0
- package/dist/chunk/3YPORCKB.mjs +9324 -0
- package/dist/chunk/ASHSTAAQ.mjs +663 -0
- package/dist/chunk/B3UVEMEI.mjs +835 -0
- package/dist/chunk/BCEWTVZW.mjs +16644 -0
- package/dist/chunk/CL7LX3O4.jsx +50 -0
- package/dist/chunk/DTJ3ICHE.mjs +9 -0
- package/dist/chunk/FNEO6DUO.jsx +14 -0
- package/dist/chunk/GZ2UQYCA.jsx +669 -0
- package/dist/chunk/JH7OXUIR.jsx +9903 -0
- package/dist/chunk/NVDRUCO3.mjs +26243 -0
- package/dist/chunk/QI4NUZHP.jsx +5862 -0
- package/dist/chunk/RBDWDJFQ.jsx +17199 -0
- package/dist/chunk/UC3ZO4ZH.jsx +802 -0
- package/dist/chunk/VDTK67K2.jsx +26395 -0
- package/dist/chunk/VJFC7YOA.jsx +2033 -0
- package/dist/chunk/VN53D6CR.mjs +2017 -0
- package/dist/chunk/VQQ4CVTZ.mjs +5782 -0
- package/dist/chunk/ZKJS654W.mjs +42 -0
- package/dist/dev.jsx +7198 -74
- package/dist/dist/25NR5LQ4.jsx +31 -0
- package/dist/dist/3QPHXTX5.jsx +5761 -0
- package/dist/dist/5PS5TLM7.mjs +5693 -0
- package/dist/dist/COR5WEDJ.jsx +8960 -0
- package/dist/dist/DHO5MJBE.mjs +2155 -0
- package/dist/dist/DZNWO3EY.mjs +1122 -0
- package/dist/dist/H257YD3M.mjs +17103 -0
- package/dist/dist/MZFJYXGG.mjs +25 -0
- package/dist/dist/NMTOQNMX.jsx +17167 -0
- package/dist/dist/OHC5XXJA.jsx +2203 -0
- package/dist/dist/XMT4I4HQ.jsx +1139 -0
- package/dist/dist/YFXWD6WV.mjs +8864 -0
- package/dist/index.es/OIZOTLR7.mjs +9547 -0
- package/dist/index.es/R4EQEDY3.jsx +9843 -0
- package/dist/index.js +126260 -524
- package/dist/index.mjs +7747 -0
- package/dist/lib/H7DSBKBW.mjs +10583 -0
- package/dist/lib/OYOWTODQ.jsx +10641 -0
- package/dist/main.esm/27PE3FUE.jsx +114 -0
- package/dist/main.esm/FGHXFDWN.mjs +112 -0
- package/package.json +2 -2
- package/dist/index.cjs +0 -694
|
@@ -0,0 +1,883 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__commonJS,
|
|
3
|
+
__esm,
|
|
4
|
+
__export,
|
|
5
|
+
__reExport,
|
|
6
|
+
__toCommonJS,
|
|
7
|
+
__toESM
|
|
8
|
+
} from "./CL7LX3O4.jsx";
|
|
9
|
+
|
|
10
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/constants.js
|
|
11
|
+
var PARSE_ERROR, INVALID_REQUEST, METHOD_NOT_FOUND, INVALID_PARAMS, INTERNAL_ERROR, SERVER_ERROR, RESERVED_ERROR_CODES, SERVER_ERROR_CODE_RANGE, STANDARD_ERROR_MAP, DEFAULT_ERROR;
|
|
12
|
+
var init_constants = __esm({
|
|
13
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/constants.js"() {
|
|
14
|
+
"use strict";
|
|
15
|
+
PARSE_ERROR = "PARSE_ERROR";
|
|
16
|
+
INVALID_REQUEST = "INVALID_REQUEST";
|
|
17
|
+
METHOD_NOT_FOUND = "METHOD_NOT_FOUND";
|
|
18
|
+
INVALID_PARAMS = "INVALID_PARAMS";
|
|
19
|
+
INTERNAL_ERROR = "INTERNAL_ERROR";
|
|
20
|
+
SERVER_ERROR = "SERVER_ERROR";
|
|
21
|
+
RESERVED_ERROR_CODES = [-32700, -32600, -32601, -32602, -32603];
|
|
22
|
+
SERVER_ERROR_CODE_RANGE = [-32e3, -32099];
|
|
23
|
+
STANDARD_ERROR_MAP = {
|
|
24
|
+
[PARSE_ERROR]: { code: -32700, message: "Parse error" },
|
|
25
|
+
[INVALID_REQUEST]: { code: -32600, message: "Invalid Request" },
|
|
26
|
+
[METHOD_NOT_FOUND]: { code: -32601, message: "Method not found" },
|
|
27
|
+
[INVALID_PARAMS]: { code: -32602, message: "Invalid params" },
|
|
28
|
+
[INTERNAL_ERROR]: { code: -32603, message: "Internal error" },
|
|
29
|
+
[SERVER_ERROR]: { code: -32e3, message: "Server error" }
|
|
30
|
+
};
|
|
31
|
+
DEFAULT_ERROR = SERVER_ERROR;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/error.js
|
|
36
|
+
function isServerErrorCode(code) {
|
|
37
|
+
return code <= SERVER_ERROR_CODE_RANGE[0] && code >= SERVER_ERROR_CODE_RANGE[1];
|
|
38
|
+
}
|
|
39
|
+
function isReservedErrorCode(code) {
|
|
40
|
+
return RESERVED_ERROR_CODES.includes(code);
|
|
41
|
+
}
|
|
42
|
+
function isValidErrorCode(code) {
|
|
43
|
+
return typeof code === "number";
|
|
44
|
+
}
|
|
45
|
+
function getError(type) {
|
|
46
|
+
if (!Object.keys(STANDARD_ERROR_MAP).includes(type)) {
|
|
47
|
+
return STANDARD_ERROR_MAP[DEFAULT_ERROR];
|
|
48
|
+
}
|
|
49
|
+
return STANDARD_ERROR_MAP[type];
|
|
50
|
+
}
|
|
51
|
+
function getErrorByCode(code) {
|
|
52
|
+
const match = Object.values(STANDARD_ERROR_MAP).find((e2) => e2.code === code);
|
|
53
|
+
if (!match) {
|
|
54
|
+
return STANDARD_ERROR_MAP[DEFAULT_ERROR];
|
|
55
|
+
}
|
|
56
|
+
return match;
|
|
57
|
+
}
|
|
58
|
+
function validateJsonRpcError(response) {
|
|
59
|
+
if (typeof response.error.code === "undefined") {
|
|
60
|
+
return { valid: false, error: "Missing code for JSON-RPC error" };
|
|
61
|
+
}
|
|
62
|
+
if (typeof response.error.message === "undefined") {
|
|
63
|
+
return { valid: false, error: "Missing message for JSON-RPC error" };
|
|
64
|
+
}
|
|
65
|
+
if (!isValidErrorCode(response.error.code)) {
|
|
66
|
+
return {
|
|
67
|
+
valid: false,
|
|
68
|
+
error: `Invalid error code type for JSON-RPC: ${response.error.code}`
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (isReservedErrorCode(response.error.code)) {
|
|
72
|
+
const error = getErrorByCode(response.error.code);
|
|
73
|
+
if (error.message !== STANDARD_ERROR_MAP[DEFAULT_ERROR].message && response.error.message === error.message) {
|
|
74
|
+
return {
|
|
75
|
+
valid: false,
|
|
76
|
+
error: `Invalid error code message for JSON-RPC: ${response.error.code}`
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return { valid: true };
|
|
81
|
+
}
|
|
82
|
+
function parseConnectionError(e2, url, type) {
|
|
83
|
+
return e2.message.includes("getaddrinfo ENOTFOUND") || e2.message.includes("connect ECONNREFUSED") ? new Error(`Unavailable ${type} RPC url at ${url}`) : e2;
|
|
84
|
+
}
|
|
85
|
+
var init_error = __esm({
|
|
86
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/error.js"() {
|
|
87
|
+
"use strict";
|
|
88
|
+
init_constants();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/format.js
|
|
93
|
+
function payloadId(entropy = 3) {
|
|
94
|
+
const date = Date.now() * Math.pow(10, entropy);
|
|
95
|
+
const extra = Math.floor(Math.random() * Math.pow(10, entropy));
|
|
96
|
+
return date + extra;
|
|
97
|
+
}
|
|
98
|
+
function getBigIntRpcId(entropy = 6) {
|
|
99
|
+
return BigInt(payloadId(entropy));
|
|
100
|
+
}
|
|
101
|
+
function formatJsonRpcRequest(method, params, id) {
|
|
102
|
+
return {
|
|
103
|
+
id: id || payloadId(),
|
|
104
|
+
jsonrpc: "2.0",
|
|
105
|
+
method,
|
|
106
|
+
params
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function formatJsonRpcResult(id, result) {
|
|
110
|
+
return {
|
|
111
|
+
id,
|
|
112
|
+
jsonrpc: "2.0",
|
|
113
|
+
result
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function formatJsonRpcError(id, error, data) {
|
|
117
|
+
return {
|
|
118
|
+
id,
|
|
119
|
+
jsonrpc: "2.0",
|
|
120
|
+
error: formatErrorMessage(error, data)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function formatErrorMessage(error, data) {
|
|
124
|
+
if (typeof error === "undefined") {
|
|
125
|
+
return getError(INTERNAL_ERROR);
|
|
126
|
+
}
|
|
127
|
+
if (typeof error === "string") {
|
|
128
|
+
error = Object.assign(Object.assign({}, getError(SERVER_ERROR)), { message: error });
|
|
129
|
+
}
|
|
130
|
+
if (typeof data !== "undefined") {
|
|
131
|
+
error.data = data;
|
|
132
|
+
}
|
|
133
|
+
if (isReservedErrorCode(error.code)) {
|
|
134
|
+
error = getErrorByCode(error.code);
|
|
135
|
+
}
|
|
136
|
+
return error;
|
|
137
|
+
}
|
|
138
|
+
var init_format = __esm({
|
|
139
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/format.js"() {
|
|
140
|
+
"use strict";
|
|
141
|
+
init_error();
|
|
142
|
+
init_constants();
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/validators.js
|
|
147
|
+
function isJsonRpcPayload(payload) {
|
|
148
|
+
return typeof payload === "object" && "id" in payload && "jsonrpc" in payload && payload.jsonrpc === "2.0";
|
|
149
|
+
}
|
|
150
|
+
function isJsonRpcRequest(payload) {
|
|
151
|
+
return isJsonRpcPayload(payload) && "method" in payload;
|
|
152
|
+
}
|
|
153
|
+
function isJsonRpcResponse(payload) {
|
|
154
|
+
return isJsonRpcPayload(payload) && (isJsonRpcResult(payload) || isJsonRpcError(payload));
|
|
155
|
+
}
|
|
156
|
+
function isJsonRpcResult(payload) {
|
|
157
|
+
return "result" in payload;
|
|
158
|
+
}
|
|
159
|
+
function isJsonRpcError(payload) {
|
|
160
|
+
return "error" in payload;
|
|
161
|
+
}
|
|
162
|
+
function isJsonRpcValidationInvalid(validation) {
|
|
163
|
+
return "error" in validation && validation.valid === false;
|
|
164
|
+
}
|
|
165
|
+
var init_validators = __esm({
|
|
166
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/validators.js"() {
|
|
167
|
+
"use strict";
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
// ../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js
|
|
172
|
+
var tslib_es6_exports = {};
|
|
173
|
+
__export(tslib_es6_exports, {
|
|
174
|
+
__assign: () => __assign,
|
|
175
|
+
__asyncDelegator: () => __asyncDelegator,
|
|
176
|
+
__asyncGenerator: () => __asyncGenerator,
|
|
177
|
+
__asyncValues: () => __asyncValues,
|
|
178
|
+
__await: () => __await,
|
|
179
|
+
__awaiter: () => __awaiter,
|
|
180
|
+
__classPrivateFieldGet: () => __classPrivateFieldGet,
|
|
181
|
+
__classPrivateFieldSet: () => __classPrivateFieldSet,
|
|
182
|
+
__createBinding: () => __createBinding,
|
|
183
|
+
__decorate: () => __decorate,
|
|
184
|
+
__exportStar: () => __exportStar,
|
|
185
|
+
__extends: () => __extends,
|
|
186
|
+
__generator: () => __generator,
|
|
187
|
+
__importDefault: () => __importDefault,
|
|
188
|
+
__importStar: () => __importStar,
|
|
189
|
+
__makeTemplateObject: () => __makeTemplateObject,
|
|
190
|
+
__metadata: () => __metadata,
|
|
191
|
+
__param: () => __param,
|
|
192
|
+
__read: () => __read,
|
|
193
|
+
__rest: () => __rest,
|
|
194
|
+
__spread: () => __spread,
|
|
195
|
+
__spreadArrays: () => __spreadArrays,
|
|
196
|
+
__values: () => __values
|
|
197
|
+
});
|
|
198
|
+
function __extends(d, b) {
|
|
199
|
+
extendStatics(d, b);
|
|
200
|
+
function __() {
|
|
201
|
+
this.constructor = d;
|
|
202
|
+
}
|
|
203
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
204
|
+
}
|
|
205
|
+
function __rest(s, e2) {
|
|
206
|
+
var t = {};
|
|
207
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e2.indexOf(p) < 0)
|
|
208
|
+
t[p] = s[p];
|
|
209
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
210
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
211
|
+
if (e2.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
212
|
+
t[p[i]] = s[p[i]];
|
|
213
|
+
}
|
|
214
|
+
return t;
|
|
215
|
+
}
|
|
216
|
+
function __decorate(decorators, target, key, desc) {
|
|
217
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
218
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
219
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
220
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
221
|
+
}
|
|
222
|
+
function __param(paramIndex, decorator) {
|
|
223
|
+
return function(target, key) {
|
|
224
|
+
decorator(target, key, paramIndex);
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function __metadata(metadataKey, metadataValue) {
|
|
228
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
229
|
+
}
|
|
230
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
231
|
+
function adopt(value) {
|
|
232
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
233
|
+
resolve(value);
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
237
|
+
function fulfilled(value) {
|
|
238
|
+
try {
|
|
239
|
+
step(generator.next(value));
|
|
240
|
+
} catch (e2) {
|
|
241
|
+
reject(e2);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function rejected(value) {
|
|
245
|
+
try {
|
|
246
|
+
step(generator["throw"](value));
|
|
247
|
+
} catch (e2) {
|
|
248
|
+
reject(e2);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
function step(result) {
|
|
252
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
253
|
+
}
|
|
254
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
function __generator(thisArg, body) {
|
|
258
|
+
var _ = { label: 0, sent: function() {
|
|
259
|
+
if (t[0] & 1) throw t[1];
|
|
260
|
+
return t[1];
|
|
261
|
+
}, trys: [], ops: [] }, f, y, t, g;
|
|
262
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
263
|
+
return this;
|
|
264
|
+
}), g;
|
|
265
|
+
function verb(n2) {
|
|
266
|
+
return function(v) {
|
|
267
|
+
return step([n2, v]);
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function step(op) {
|
|
271
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
272
|
+
while (_) try {
|
|
273
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
274
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
275
|
+
switch (op[0]) {
|
|
276
|
+
case 0:
|
|
277
|
+
case 1:
|
|
278
|
+
t = op;
|
|
279
|
+
break;
|
|
280
|
+
case 4:
|
|
281
|
+
_.label++;
|
|
282
|
+
return { value: op[1], done: false };
|
|
283
|
+
case 5:
|
|
284
|
+
_.label++;
|
|
285
|
+
y = op[1];
|
|
286
|
+
op = [0];
|
|
287
|
+
continue;
|
|
288
|
+
case 7:
|
|
289
|
+
op = _.ops.pop();
|
|
290
|
+
_.trys.pop();
|
|
291
|
+
continue;
|
|
292
|
+
default:
|
|
293
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
294
|
+
_ = 0;
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
298
|
+
_.label = op[1];
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
302
|
+
_.label = t[1];
|
|
303
|
+
t = op;
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
if (t && _.label < t[2]) {
|
|
307
|
+
_.label = t[2];
|
|
308
|
+
_.ops.push(op);
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
if (t[2]) _.ops.pop();
|
|
312
|
+
_.trys.pop();
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
op = body.call(thisArg, _);
|
|
316
|
+
} catch (e2) {
|
|
317
|
+
op = [6, e2];
|
|
318
|
+
y = 0;
|
|
319
|
+
} finally {
|
|
320
|
+
f = t = 0;
|
|
321
|
+
}
|
|
322
|
+
if (op[0] & 5) throw op[1];
|
|
323
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
function __createBinding(o2, m, k, k2) {
|
|
327
|
+
if (k2 === void 0) k2 = k;
|
|
328
|
+
o2[k2] = m[k];
|
|
329
|
+
}
|
|
330
|
+
function __exportStar(m, exports) {
|
|
331
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
332
|
+
}
|
|
333
|
+
function __values(o2) {
|
|
334
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o2[s], i = 0;
|
|
335
|
+
if (m) return m.call(o2);
|
|
336
|
+
if (o2 && typeof o2.length === "number") return {
|
|
337
|
+
next: function() {
|
|
338
|
+
if (o2 && i >= o2.length) o2 = void 0;
|
|
339
|
+
return { value: o2 && o2[i++], done: !o2 };
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
343
|
+
}
|
|
344
|
+
function __read(o2, n2) {
|
|
345
|
+
var m = typeof Symbol === "function" && o2[Symbol.iterator];
|
|
346
|
+
if (!m) return o2;
|
|
347
|
+
var i = m.call(o2), r2, ar = [], e2;
|
|
348
|
+
try {
|
|
349
|
+
while ((n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done) ar.push(r2.value);
|
|
350
|
+
} catch (error) {
|
|
351
|
+
e2 = { error };
|
|
352
|
+
} finally {
|
|
353
|
+
try {
|
|
354
|
+
if (r2 && !r2.done && (m = i["return"])) m.call(i);
|
|
355
|
+
} finally {
|
|
356
|
+
if (e2) throw e2.error;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
return ar;
|
|
360
|
+
}
|
|
361
|
+
function __spread() {
|
|
362
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
363
|
+
ar = ar.concat(__read(arguments[i]));
|
|
364
|
+
return ar;
|
|
365
|
+
}
|
|
366
|
+
function __spreadArrays() {
|
|
367
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
368
|
+
for (var r2 = Array(s), k = 0, i = 0; i < il; i++)
|
|
369
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
370
|
+
r2[k] = a[j];
|
|
371
|
+
return r2;
|
|
372
|
+
}
|
|
373
|
+
function __await(v) {
|
|
374
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
375
|
+
}
|
|
376
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
377
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
378
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
379
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
380
|
+
return this;
|
|
381
|
+
}, i;
|
|
382
|
+
function verb(n2) {
|
|
383
|
+
if (g[n2]) i[n2] = function(v) {
|
|
384
|
+
return new Promise(function(a, b) {
|
|
385
|
+
q.push([n2, v, a, b]) > 1 || resume(n2, v);
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
function resume(n2, v) {
|
|
390
|
+
try {
|
|
391
|
+
step(g[n2](v));
|
|
392
|
+
} catch (e2) {
|
|
393
|
+
settle(q[0][3], e2);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
function step(r2) {
|
|
397
|
+
r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q[0][2], r2);
|
|
398
|
+
}
|
|
399
|
+
function fulfill(value) {
|
|
400
|
+
resume("next", value);
|
|
401
|
+
}
|
|
402
|
+
function reject(value) {
|
|
403
|
+
resume("throw", value);
|
|
404
|
+
}
|
|
405
|
+
function settle(f, v) {
|
|
406
|
+
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function __asyncDelegator(o2) {
|
|
410
|
+
var i, p;
|
|
411
|
+
return i = {}, verb("next"), verb("throw", function(e2) {
|
|
412
|
+
throw e2;
|
|
413
|
+
}), verb("return"), i[Symbol.iterator] = function() {
|
|
414
|
+
return this;
|
|
415
|
+
}, i;
|
|
416
|
+
function verb(n2, f) {
|
|
417
|
+
i[n2] = o2[n2] ? function(v) {
|
|
418
|
+
return (p = !p) ? { value: __await(o2[n2](v)), done: n2 === "return" } : f ? f(v) : v;
|
|
419
|
+
} : f;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
function __asyncValues(o2) {
|
|
423
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
424
|
+
var m = o2[Symbol.asyncIterator], i;
|
|
425
|
+
return m ? m.call(o2) : (o2 = typeof __values === "function" ? __values(o2) : o2[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
426
|
+
return this;
|
|
427
|
+
}, i);
|
|
428
|
+
function verb(n2) {
|
|
429
|
+
i[n2] = o2[n2] && function(v) {
|
|
430
|
+
return new Promise(function(resolve, reject) {
|
|
431
|
+
v = o2[n2](v), settle(resolve, reject, v.done, v.value);
|
|
432
|
+
});
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
function settle(resolve, reject, d, v) {
|
|
436
|
+
Promise.resolve(v).then(function(v2) {
|
|
437
|
+
resolve({ value: v2, done: d });
|
|
438
|
+
}, reject);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
function __makeTemplateObject(cooked, raw) {
|
|
442
|
+
if (Object.defineProperty) {
|
|
443
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
444
|
+
} else {
|
|
445
|
+
cooked.raw = raw;
|
|
446
|
+
}
|
|
447
|
+
return cooked;
|
|
448
|
+
}
|
|
449
|
+
function __importStar(mod) {
|
|
450
|
+
if (mod && mod.__esModule) return mod;
|
|
451
|
+
var result = {};
|
|
452
|
+
if (mod != null) {
|
|
453
|
+
for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
454
|
+
}
|
|
455
|
+
result.default = mod;
|
|
456
|
+
return result;
|
|
457
|
+
}
|
|
458
|
+
function __importDefault(mod) {
|
|
459
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
460
|
+
}
|
|
461
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
|
462
|
+
if (!privateMap.has(receiver)) {
|
|
463
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
464
|
+
}
|
|
465
|
+
return privateMap.get(receiver);
|
|
466
|
+
}
|
|
467
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
468
|
+
if (!privateMap.has(receiver)) {
|
|
469
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
470
|
+
}
|
|
471
|
+
privateMap.set(receiver, value);
|
|
472
|
+
return value;
|
|
473
|
+
}
|
|
474
|
+
var extendStatics, __assign;
|
|
475
|
+
var init_tslib_es6 = __esm({
|
|
476
|
+
"../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js"() {
|
|
477
|
+
"use strict";
|
|
478
|
+
extendStatics = function(d, b) {
|
|
479
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
480
|
+
d2.__proto__ = b2;
|
|
481
|
+
} || function(d2, b2) {
|
|
482
|
+
for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
|
|
483
|
+
};
|
|
484
|
+
return extendStatics(d, b);
|
|
485
|
+
};
|
|
486
|
+
__assign = function() {
|
|
487
|
+
__assign = Object.assign || function __assign2(t) {
|
|
488
|
+
for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
|
|
489
|
+
s = arguments[i];
|
|
490
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
491
|
+
}
|
|
492
|
+
return t;
|
|
493
|
+
};
|
|
494
|
+
return __assign.apply(this, arguments);
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
// ../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/crypto.js
|
|
500
|
+
var require_crypto = __commonJS({
|
|
501
|
+
"../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/crypto.js"(exports) {
|
|
502
|
+
"use strict";
|
|
503
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
504
|
+
exports.isBrowserCryptoAvailable = exports.getSubtleCrypto = exports.getBrowerCrypto = void 0;
|
|
505
|
+
function getBrowerCrypto() {
|
|
506
|
+
return (global === null || global === void 0 ? void 0 : global.crypto) || (global === null || global === void 0 ? void 0 : global.msCrypto) || {};
|
|
507
|
+
}
|
|
508
|
+
exports.getBrowerCrypto = getBrowerCrypto;
|
|
509
|
+
function getSubtleCrypto() {
|
|
510
|
+
const browserCrypto = getBrowerCrypto();
|
|
511
|
+
return browserCrypto.subtle || browserCrypto.webkitSubtle;
|
|
512
|
+
}
|
|
513
|
+
exports.getSubtleCrypto = getSubtleCrypto;
|
|
514
|
+
function isBrowserCryptoAvailable() {
|
|
515
|
+
return !!getBrowerCrypto() && !!getSubtleCrypto();
|
|
516
|
+
}
|
|
517
|
+
exports.isBrowserCryptoAvailable = isBrowserCryptoAvailable;
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
// ../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/env.js
|
|
522
|
+
var require_env = __commonJS({
|
|
523
|
+
"../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/env.js"(exports) {
|
|
524
|
+
"use strict";
|
|
525
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
526
|
+
exports.isBrowser = exports.isNode = exports.isReactNative = void 0;
|
|
527
|
+
function isReactNative() {
|
|
528
|
+
return typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative";
|
|
529
|
+
}
|
|
530
|
+
exports.isReactNative = isReactNative;
|
|
531
|
+
function isNode2() {
|
|
532
|
+
return typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined";
|
|
533
|
+
}
|
|
534
|
+
exports.isNode = isNode2;
|
|
535
|
+
function isBrowser() {
|
|
536
|
+
return !isReactNative() && !isNode2();
|
|
537
|
+
}
|
|
538
|
+
exports.isBrowser = isBrowser;
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
// ../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/index.js
|
|
543
|
+
var require_cjs = __commonJS({
|
|
544
|
+
"../../node_modules/.pnpm/@walletconnect+environment@1.0.1/node_modules/@walletconnect/environment/dist/cjs/index.js"(exports) {
|
|
545
|
+
"use strict";
|
|
546
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
547
|
+
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
548
|
+
tslib_1.__exportStar(require_crypto(), exports);
|
|
549
|
+
tslib_1.__exportStar(require_env(), exports);
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/env.js
|
|
554
|
+
var env_exports = {};
|
|
555
|
+
__export(env_exports, {
|
|
556
|
+
isNodeJs: () => isNodeJs
|
|
557
|
+
});
|
|
558
|
+
var import_environment, isNodeJs;
|
|
559
|
+
var init_env = __esm({
|
|
560
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/env.js"() {
|
|
561
|
+
"use strict";
|
|
562
|
+
import_environment = __toESM(require_cjs());
|
|
563
|
+
__reExport(env_exports, __toESM(require_cjs()));
|
|
564
|
+
isNodeJs = import_environment.isNode;
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/routing.js
|
|
569
|
+
function isValidRoute(route) {
|
|
570
|
+
if (route.includes("*")) {
|
|
571
|
+
return isValidWildcardRoute(route);
|
|
572
|
+
}
|
|
573
|
+
if (/\W/g.test(route)) {
|
|
574
|
+
return false;
|
|
575
|
+
}
|
|
576
|
+
return true;
|
|
577
|
+
}
|
|
578
|
+
function isValidDefaultRoute(route) {
|
|
579
|
+
return route === "*";
|
|
580
|
+
}
|
|
581
|
+
function isValidWildcardRoute(route) {
|
|
582
|
+
if (isValidDefaultRoute(route)) {
|
|
583
|
+
return true;
|
|
584
|
+
}
|
|
585
|
+
if (!route.includes("*")) {
|
|
586
|
+
return false;
|
|
587
|
+
}
|
|
588
|
+
if (route.split("*").length !== 2) {
|
|
589
|
+
return false;
|
|
590
|
+
}
|
|
591
|
+
if (route.split("*").filter((x) => x.trim() === "").length !== 1) {
|
|
592
|
+
return false;
|
|
593
|
+
}
|
|
594
|
+
return true;
|
|
595
|
+
}
|
|
596
|
+
function isValidLeadingWildcardRoute(route) {
|
|
597
|
+
return !isValidDefaultRoute(route) && isValidWildcardRoute(route) && !route.split("*")[0].trim();
|
|
598
|
+
}
|
|
599
|
+
function isValidTrailingWildcardRoute(route) {
|
|
600
|
+
return !isValidDefaultRoute(route) && isValidWildcardRoute(route) && !route.split("*")[1].trim();
|
|
601
|
+
}
|
|
602
|
+
var init_routing = __esm({
|
|
603
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/routing.js"() {
|
|
604
|
+
"use strict";
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-types@1.0.4/node_modules/@walletconnect/jsonrpc-types/dist/index.es.js
|
|
609
|
+
var e, o, n, r;
|
|
610
|
+
var init_index_es = __esm({
|
|
611
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-types@1.0.4/node_modules/@walletconnect/jsonrpc-types/dist/index.es.js"() {
|
|
612
|
+
"use strict";
|
|
613
|
+
e = class {
|
|
614
|
+
};
|
|
615
|
+
o = class extends e {
|
|
616
|
+
constructor(c) {
|
|
617
|
+
super();
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
n = class extends e {
|
|
621
|
+
constructor() {
|
|
622
|
+
super();
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
r = class extends n {
|
|
626
|
+
constructor(c) {
|
|
627
|
+
super();
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/types.js
|
|
634
|
+
var init_types = __esm({
|
|
635
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/types.js"() {
|
|
636
|
+
"use strict";
|
|
637
|
+
init_index_es();
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/url.js
|
|
642
|
+
function getUrlProtocol(url) {
|
|
643
|
+
const matches = url.match(new RegExp(/^\w+:/, "gi"));
|
|
644
|
+
if (!matches || !matches.length)
|
|
645
|
+
return;
|
|
646
|
+
return matches[0];
|
|
647
|
+
}
|
|
648
|
+
function matchRegexProtocol(url, regex) {
|
|
649
|
+
const protocol = getUrlProtocol(url);
|
|
650
|
+
if (typeof protocol === "undefined")
|
|
651
|
+
return false;
|
|
652
|
+
return new RegExp(regex).test(protocol);
|
|
653
|
+
}
|
|
654
|
+
function isHttpUrl(url) {
|
|
655
|
+
return matchRegexProtocol(url, HTTP_REGEX);
|
|
656
|
+
}
|
|
657
|
+
function isWsUrl(url) {
|
|
658
|
+
return matchRegexProtocol(url, WS_REGEX);
|
|
659
|
+
}
|
|
660
|
+
function isLocalhostUrl(url) {
|
|
661
|
+
return new RegExp("wss?://localhost(:d{2,5})?").test(url);
|
|
662
|
+
}
|
|
663
|
+
var HTTP_REGEX, WS_REGEX;
|
|
664
|
+
var init_url = __esm({
|
|
665
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/url.js"() {
|
|
666
|
+
"use strict";
|
|
667
|
+
HTTP_REGEX = "^https?:";
|
|
668
|
+
WS_REGEX = "^wss?:";
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
// ../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/index.js
|
|
673
|
+
var esm_exports = {};
|
|
674
|
+
__export(esm_exports, {
|
|
675
|
+
DEFAULT_ERROR: () => DEFAULT_ERROR,
|
|
676
|
+
IBaseJsonRpcProvider: () => n,
|
|
677
|
+
IEvents: () => e,
|
|
678
|
+
IJsonRpcConnection: () => o,
|
|
679
|
+
IJsonRpcProvider: () => r,
|
|
680
|
+
INTERNAL_ERROR: () => INTERNAL_ERROR,
|
|
681
|
+
INVALID_PARAMS: () => INVALID_PARAMS,
|
|
682
|
+
INVALID_REQUEST: () => INVALID_REQUEST,
|
|
683
|
+
METHOD_NOT_FOUND: () => METHOD_NOT_FOUND,
|
|
684
|
+
PARSE_ERROR: () => PARSE_ERROR,
|
|
685
|
+
RESERVED_ERROR_CODES: () => RESERVED_ERROR_CODES,
|
|
686
|
+
SERVER_ERROR: () => SERVER_ERROR,
|
|
687
|
+
SERVER_ERROR_CODE_RANGE: () => SERVER_ERROR_CODE_RANGE,
|
|
688
|
+
STANDARD_ERROR_MAP: () => STANDARD_ERROR_MAP,
|
|
689
|
+
formatErrorMessage: () => formatErrorMessage,
|
|
690
|
+
formatJsonRpcError: () => formatJsonRpcError,
|
|
691
|
+
formatJsonRpcRequest: () => formatJsonRpcRequest,
|
|
692
|
+
formatJsonRpcResult: () => formatJsonRpcResult,
|
|
693
|
+
getBigIntRpcId: () => getBigIntRpcId,
|
|
694
|
+
getError: () => getError,
|
|
695
|
+
getErrorByCode: () => getErrorByCode,
|
|
696
|
+
isHttpUrl: () => isHttpUrl,
|
|
697
|
+
isJsonRpcError: () => isJsonRpcError,
|
|
698
|
+
isJsonRpcPayload: () => isJsonRpcPayload,
|
|
699
|
+
isJsonRpcRequest: () => isJsonRpcRequest,
|
|
700
|
+
isJsonRpcResponse: () => isJsonRpcResponse,
|
|
701
|
+
isJsonRpcResult: () => isJsonRpcResult,
|
|
702
|
+
isJsonRpcValidationInvalid: () => isJsonRpcValidationInvalid,
|
|
703
|
+
isLocalhostUrl: () => isLocalhostUrl,
|
|
704
|
+
isNodeJs: () => isNodeJs,
|
|
705
|
+
isReservedErrorCode: () => isReservedErrorCode,
|
|
706
|
+
isServerErrorCode: () => isServerErrorCode,
|
|
707
|
+
isValidDefaultRoute: () => isValidDefaultRoute,
|
|
708
|
+
isValidErrorCode: () => isValidErrorCode,
|
|
709
|
+
isValidLeadingWildcardRoute: () => isValidLeadingWildcardRoute,
|
|
710
|
+
isValidRoute: () => isValidRoute,
|
|
711
|
+
isValidTrailingWildcardRoute: () => isValidTrailingWildcardRoute,
|
|
712
|
+
isValidWildcardRoute: () => isValidWildcardRoute,
|
|
713
|
+
isWsUrl: () => isWsUrl,
|
|
714
|
+
parseConnectionError: () => parseConnectionError,
|
|
715
|
+
payloadId: () => payloadId,
|
|
716
|
+
validateJsonRpcError: () => validateJsonRpcError
|
|
717
|
+
});
|
|
718
|
+
var init_esm = __esm({
|
|
719
|
+
"../../node_modules/.pnpm/@walletconnect+jsonrpc-utils@1.0.8/node_modules/@walletconnect/jsonrpc-utils/dist/esm/index.js"() {
|
|
720
|
+
"use strict";
|
|
721
|
+
init_constants();
|
|
722
|
+
init_error();
|
|
723
|
+
init_env();
|
|
724
|
+
__reExport(esm_exports, env_exports);
|
|
725
|
+
init_format();
|
|
726
|
+
init_routing();
|
|
727
|
+
init_types();
|
|
728
|
+
init_url();
|
|
729
|
+
init_validators();
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
|
|
733
|
+
// ../../node_modules/.pnpm/strict-uri-encode@2.0.0/node_modules/strict-uri-encode/index.js
|
|
734
|
+
var require_strict_uri_encode = __commonJS({
|
|
735
|
+
"../../node_modules/.pnpm/strict-uri-encode@2.0.0/node_modules/strict-uri-encode/index.js"(exports, module) {
|
|
736
|
+
"use strict";
|
|
737
|
+
module.exports = (str) => encodeURIComponent(str).replace(/[!'()*]/g, (x) => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
// ../../node_modules/.pnpm/decode-uri-component@0.2.2/node_modules/decode-uri-component/index.js
|
|
742
|
+
var require_decode_uri_component = __commonJS({
|
|
743
|
+
"../../node_modules/.pnpm/decode-uri-component@0.2.2/node_modules/decode-uri-component/index.js"(exports, module) {
|
|
744
|
+
"use strict";
|
|
745
|
+
var token = "%[a-f0-9]{2}";
|
|
746
|
+
var singleMatcher = new RegExp("(" + token + ")|([^%]+?)", "gi");
|
|
747
|
+
var multiMatcher = new RegExp("(" + token + ")+", "gi");
|
|
748
|
+
function decodeComponents(components, split) {
|
|
749
|
+
try {
|
|
750
|
+
return [decodeURIComponent(components.join(""))];
|
|
751
|
+
} catch (err) {
|
|
752
|
+
}
|
|
753
|
+
if (components.length === 1) {
|
|
754
|
+
return components;
|
|
755
|
+
}
|
|
756
|
+
split = split || 1;
|
|
757
|
+
var left = components.slice(0, split);
|
|
758
|
+
var right = components.slice(split);
|
|
759
|
+
return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
|
|
760
|
+
}
|
|
761
|
+
function decode(input) {
|
|
762
|
+
try {
|
|
763
|
+
return decodeURIComponent(input);
|
|
764
|
+
} catch (err) {
|
|
765
|
+
var tokens = input.match(singleMatcher) || [];
|
|
766
|
+
for (var i = 1; i < tokens.length; i++) {
|
|
767
|
+
input = decodeComponents(tokens, i).join("");
|
|
768
|
+
tokens = input.match(singleMatcher) || [];
|
|
769
|
+
}
|
|
770
|
+
return input;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
function customDecodeURIComponent(input) {
|
|
774
|
+
var replaceMap = {
|
|
775
|
+
"%FE%FF": "\uFFFD\uFFFD",
|
|
776
|
+
"%FF%FE": "\uFFFD\uFFFD"
|
|
777
|
+
};
|
|
778
|
+
var match = multiMatcher.exec(input);
|
|
779
|
+
while (match) {
|
|
780
|
+
try {
|
|
781
|
+
replaceMap[match[0]] = decodeURIComponent(match[0]);
|
|
782
|
+
} catch (err) {
|
|
783
|
+
var result = decode(match[0]);
|
|
784
|
+
if (result !== match[0]) {
|
|
785
|
+
replaceMap[match[0]] = result;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
match = multiMatcher.exec(input);
|
|
789
|
+
}
|
|
790
|
+
replaceMap["%C2"] = "\uFFFD";
|
|
791
|
+
var entries = Object.keys(replaceMap);
|
|
792
|
+
for (var i = 0; i < entries.length; i++) {
|
|
793
|
+
var key = entries[i];
|
|
794
|
+
input = input.replace(new RegExp(key, "g"), replaceMap[key]);
|
|
795
|
+
}
|
|
796
|
+
return input;
|
|
797
|
+
}
|
|
798
|
+
module.exports = function(encodedURI) {
|
|
799
|
+
if (typeof encodedURI !== "string") {
|
|
800
|
+
throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof encodedURI + "`");
|
|
801
|
+
}
|
|
802
|
+
try {
|
|
803
|
+
encodedURI = encodedURI.replace(/\+/g, " ");
|
|
804
|
+
return decodeURIComponent(encodedURI);
|
|
805
|
+
} catch (err) {
|
|
806
|
+
return customDecodeURIComponent(encodedURI);
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
|
|
812
|
+
// ../../node_modules/.pnpm/split-on-first@1.1.0/node_modules/split-on-first/index.js
|
|
813
|
+
var require_split_on_first = __commonJS({
|
|
814
|
+
"../../node_modules/.pnpm/split-on-first@1.1.0/node_modules/split-on-first/index.js"(exports, module) {
|
|
815
|
+
"use strict";
|
|
816
|
+
module.exports = (string, separator) => {
|
|
817
|
+
if (!(typeof string === "string" && typeof separator === "string")) {
|
|
818
|
+
throw new TypeError("Expected the arguments to be of type `string`");
|
|
819
|
+
}
|
|
820
|
+
if (separator === "") {
|
|
821
|
+
return [string];
|
|
822
|
+
}
|
|
823
|
+
const separatorIndex = string.indexOf(separator);
|
|
824
|
+
if (separatorIndex === -1) {
|
|
825
|
+
return [string];
|
|
826
|
+
}
|
|
827
|
+
return [
|
|
828
|
+
string.slice(0, separatorIndex),
|
|
829
|
+
string.slice(separatorIndex + separator.length)
|
|
830
|
+
];
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
|
|
835
|
+
// (disabled):../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
|
|
836
|
+
var require_buffer = __commonJS({
|
|
837
|
+
"(disabled):../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js"() {
|
|
838
|
+
"use strict";
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
|
|
842
|
+
export {
|
|
843
|
+
tslib_es6_exports,
|
|
844
|
+
init_tslib_es6,
|
|
845
|
+
require_strict_uri_encode,
|
|
846
|
+
require_decode_uri_component,
|
|
847
|
+
require_split_on_first,
|
|
848
|
+
require_buffer,
|
|
849
|
+
parseConnectionError,
|
|
850
|
+
require_cjs,
|
|
851
|
+
payloadId,
|
|
852
|
+
getBigIntRpcId,
|
|
853
|
+
formatJsonRpcRequest,
|
|
854
|
+
formatJsonRpcResult,
|
|
855
|
+
formatJsonRpcError,
|
|
856
|
+
r,
|
|
857
|
+
isWsUrl,
|
|
858
|
+
isLocalhostUrl,
|
|
859
|
+
isJsonRpcRequest,
|
|
860
|
+
isJsonRpcResponse,
|
|
861
|
+
isJsonRpcResult,
|
|
862
|
+
isJsonRpcError,
|
|
863
|
+
esm_exports,
|
|
864
|
+
init_esm
|
|
865
|
+
};
|
|
866
|
+
/*! Bundled license information:
|
|
867
|
+
|
|
868
|
+
tslib/tslib.es6.js:
|
|
869
|
+
(*! *****************************************************************************
|
|
870
|
+
Copyright (c) Microsoft Corporation.
|
|
871
|
+
|
|
872
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
873
|
+
purpose with or without fee is hereby granted.
|
|
874
|
+
|
|
875
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
876
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
877
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
878
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
879
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
880
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
881
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
882
|
+
***************************************************************************** *)
|
|
883
|
+
*/
|