@typerighter/rpc-client 0.0.0 → 0.1.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.
@@ -0,0 +1,732 @@
1
+ export class RpcClient {
2
+ static __wrap(ptr) {
3
+ const obj = Object.create(RpcClient.prototype);
4
+ obj.__wbg_ptr = ptr;
5
+ RpcClientFinalization.register(obj, obj.__wbg_ptr, obj);
6
+ return obj;
7
+ }
8
+ __destroy_into_raw() {
9
+ const ptr = this.__wbg_ptr;
10
+ this.__wbg_ptr = 0;
11
+ RpcClientFinalization.unregister(this);
12
+ return ptr;
13
+ }
14
+ free() {
15
+ const ptr = this.__destroy_into_raw();
16
+ wasm.__wbg_rpcclient_free(ptr, 0);
17
+ }
18
+ /**
19
+ * @param {string} addr
20
+ * @param {number} port
21
+ * @returns {Promise<RpcClient>}
22
+ */
23
+ static connect(addr, port) {
24
+ const ptr0 = passStringToWasm0(addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
25
+ const len0 = WASM_VECTOR_LEN;
26
+ const ret = wasm.rpcclient_connect(ptr0, len0, port);
27
+ return ret;
28
+ }
29
+ /**
30
+ * @returns {Promise<TdSiteConfig>}
31
+ */
32
+ getConfig() {
33
+ const ret = wasm.rpcclient_getConfig(this.__wbg_ptr);
34
+ return ret;
35
+ }
36
+ /**
37
+ * @param {string} schema
38
+ * @returns {Promise<TdSchemaInfo>}
39
+ */
40
+ getSchema(schema) {
41
+ const ptr0 = passStringToWasm0(schema, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
42
+ const len0 = WASM_VECTOR_LEN;
43
+ const ret = wasm.rpcclient_getSchema(this.__wbg_ptr, ptr0, len0);
44
+ return ret;
45
+ }
46
+ /**
47
+ * @returns {Promise<any>}
48
+ */
49
+ listFilesGroupedBySchema() {
50
+ const ret = wasm.rpcclient_listFilesGroupedBySchema(this.__wbg_ptr);
51
+ return ret;
52
+ }
53
+ /**
54
+ * @returns {Promise<string[]>}
55
+ */
56
+ listSchemas() {
57
+ const ret = wasm.rpcclient_listSchemas(this.__wbg_ptr);
58
+ return ret;
59
+ }
60
+ /**
61
+ * @returns {Promise<string[]>}
62
+ */
63
+ listVault() {
64
+ const ret = wasm.rpcclient_listVault(this.__wbg_ptr);
65
+ return ret;
66
+ }
67
+ /**
68
+ * @param {Function} callback
69
+ */
70
+ onConfigChanged(callback) {
71
+ wasm.rpcclient_onConfigChanged(this.__wbg_ptr, callback);
72
+ }
73
+ /**
74
+ * @param {Function} callback
75
+ */
76
+ onContentChanged(callback) {
77
+ wasm.rpcclient_onContentChanged(this.__wbg_ptr, callback);
78
+ }
79
+ /**
80
+ * @param {Function} callback
81
+ */
82
+ onContentCreated(callback) {
83
+ wasm.rpcclient_onContentCreated(this.__wbg_ptr, callback);
84
+ }
85
+ /**
86
+ * @param {Function} callback
87
+ */
88
+ onContentDeleted(callback) {
89
+ wasm.rpcclient_onContentDeleted(this.__wbg_ptr, callback);
90
+ }
91
+ /**
92
+ * @param {Function} callback
93
+ */
94
+ onDisconnect(callback) {
95
+ wasm.rpcclient_onDisconnect(this.__wbg_ptr, callback);
96
+ }
97
+ /**
98
+ * @param {Function} callback
99
+ */
100
+ onSchemaChanged(callback) {
101
+ wasm.rpcclient_onSchemaChanged(this.__wbg_ptr, callback);
102
+ }
103
+ /**
104
+ * @param {Function} callback
105
+ */
106
+ onSchemaCreated(callback) {
107
+ wasm.rpcclient_onSchemaCreated(this.__wbg_ptr, callback);
108
+ }
109
+ /**
110
+ * @param {Function} callback
111
+ */
112
+ onSchemaDeleted(callback) {
113
+ wasm.rpcclient_onSchemaDeleted(this.__wbg_ptr, callback);
114
+ }
115
+ /**
116
+ * @param {string} path
117
+ * @returns {Promise<TdBuiltResource>}
118
+ */
119
+ requestFile(path) {
120
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
121
+ const len0 = WASM_VECTOR_LEN;
122
+ const ret = wasm.rpcclient_requestFile(this.__wbg_ptr, ptr0, len0);
123
+ return ret;
124
+ }
125
+ /**
126
+ * @param {string[]} paths
127
+ * @returns {Promise<TdBuiltResource[]>}
128
+ */
129
+ requestFiles(paths) {
130
+ const ptr0 = passArrayJsValueToWasm0(paths, wasm.__wbindgen_malloc);
131
+ const len0 = WASM_VECTOR_LEN;
132
+ const ret = wasm.rpcclient_requestFiles(this.__wbg_ptr, ptr0, len0);
133
+ return ret;
134
+ }
135
+ }
136
+ if (Symbol.dispose) RpcClient.prototype[Symbol.dispose] = RpcClient.prototype.free;
137
+ export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
138
+ const ret = Error(getStringFromWasm0(arg0, arg1));
139
+ return ret;
140
+ }
141
+ export function __wbg_String_8564e559799eccda(arg0, arg1) {
142
+ const ret = String(arg1);
143
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
144
+ const len1 = WASM_VECTOR_LEN;
145
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
146
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
147
+ }
148
+ export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
149
+ const ret = debugString(arg1);
150
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
151
+ const len1 = WASM_VECTOR_LEN;
152
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
153
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
154
+ }
155
+ export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
156
+ const ret = typeof(arg0) === 'function';
157
+ return ret;
158
+ }
159
+ export function __wbg___wbindgen_is_string_ea5e6cc2e4141dfe(arg0) {
160
+ const ret = typeof(arg0) === 'string';
161
+ return ret;
162
+ }
163
+ export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
164
+ const ret = arg0 === undefined;
165
+ return ret;
166
+ }
167
+ export function __wbg___wbindgen_string_get_b0ca35b86a603356(arg0, arg1) {
168
+ const obj = arg1;
169
+ const ret = typeof(obj) === 'string' ? obj : undefined;
170
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
171
+ var len1 = WASM_VECTOR_LEN;
172
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
173
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
174
+ }
175
+ export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
176
+ throw new Error(getStringFromWasm0(arg0, arg1));
177
+ }
178
+ export function __wbg__wbg_cb_unref_fffb441def202758(arg0) {
179
+ arg0._wbg_cb_unref();
180
+ }
181
+ export function __wbg_addEventListener_520e749bbae24529() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
182
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3, arg4);
183
+ }, arguments); }
184
+ export function __wbg_addEventListener_d85450ee1320c989() { return handleError(function (arg0, arg1, arg2, arg3) {
185
+ arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
186
+ }, arguments); }
187
+ export function __wbg_apply_3ac86a26fdb56c05() { return handleError(function (arg0, arg1, arg2) {
188
+ const ret = arg0.apply(arg1, arg2);
189
+ return ret;
190
+ }, arguments); }
191
+ export function __wbg_call_a6e5c5dce5018821() { return handleError(function (arg0, arg1, arg2) {
192
+ const ret = arg0.call(arg1, arg2);
193
+ return ret;
194
+ }, arguments); }
195
+ export function __wbg_clearTimeout_3629d6209dfcc46e(arg0) {
196
+ const ret = clearTimeout(arg0);
197
+ return ret;
198
+ }
199
+ export function __wbg_close_c65ca0257e895318() { return handleError(function (arg0) {
200
+ arg0.close();
201
+ }, arguments); }
202
+ export function __wbg_code_1fc52b4142a112ac(arg0) {
203
+ const ret = arg0.code;
204
+ return ret;
205
+ }
206
+ export function __wbg_data_328de4280640da92(arg0) {
207
+ const ret = arg0.data;
208
+ return ret;
209
+ }
210
+ export function __wbg_dispatchEvent_ca78eaf3d469bc25() { return handleError(function (arg0, arg1) {
211
+ const ret = arg0.dispatchEvent(arg1);
212
+ return ret;
213
+ }, arguments); }
214
+ export function __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb(arg0) {
215
+ let result;
216
+ try {
217
+ result = arg0 instanceof ArrayBuffer;
218
+ } catch (_) {
219
+ result = false;
220
+ }
221
+ const ret = result;
222
+ return ret;
223
+ }
224
+ export function __wbg_instanceof_Error_1fdac9f13a8181ba(arg0) {
225
+ let result;
226
+ try {
227
+ result = arg0 instanceof Error;
228
+ } catch (_) {
229
+ result = false;
230
+ }
231
+ const ret = result;
232
+ return ret;
233
+ }
234
+ export function __wbg_length_1f0964f4a5e2c6d8(arg0) {
235
+ const ret = arg0.length;
236
+ return ret;
237
+ }
238
+ export function __wbg_message_8326fb1d549bebc5(arg0) {
239
+ const ret = arg0.message;
240
+ return ret;
241
+ }
242
+ export function __wbg_name_b0b4809690944614(arg0) {
243
+ const ret = arg0.name;
244
+ return ret;
245
+ }
246
+ export function __wbg_new_32b398fb48b6d94a() {
247
+ const ret = new Array();
248
+ return ret;
249
+ }
250
+ export function __wbg_new_7796ffc7ed656783() {
251
+ const ret = new Map();
252
+ return ret;
253
+ }
254
+ export function __wbg_new_bf8729ffe10e9ee7() { return handleError(function (arg0, arg1) {
255
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
256
+ return ret;
257
+ }, arguments); }
258
+ export function __wbg_new_cd45aabdf6073e84(arg0) {
259
+ const ret = new Uint8Array(arg0);
260
+ return ret;
261
+ }
262
+ export function __wbg_new_da52cf8fe3429cb2() {
263
+ const ret = new Object();
264
+ return ret;
265
+ }
266
+ export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
267
+ try {
268
+ var state0 = {a: arg0, b: arg1};
269
+ var cb0 = (arg0, arg1) => {
270
+ const a = state0.a;
271
+ state0.a = 0;
272
+ try {
273
+ return wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___js_sys_3791bf2f7732a58b___Function_fn_wasm_bindgen_3ca2b102c05f61f4___JsValue_____wasm_bindgen_3ca2b102c05f61f4___sys__Undefined___js_sys_3791bf2f7732a58b___Function_fn_wasm_bindgen_3ca2b102c05f61f4___JsValue_____wasm_bindgen_3ca2b102c05f61f4___sys__Undefined_______true_(a, state0.b, arg0, arg1);
274
+ } finally {
275
+ state0.a = a;
276
+ }
277
+ };
278
+ const ret = new Promise(cb0);
279
+ return ret;
280
+ } finally {
281
+ state0.a = 0;
282
+ }
283
+ }
284
+ export function __wbg_new_with_event_init_dict_7b62c0f9fb241877() { return handleError(function (arg0, arg1, arg2) {
285
+ const ret = new CloseEvent(getStringFromWasm0(arg0, arg1), arg2);
286
+ return ret;
287
+ }, arguments); }
288
+ export function __wbg_prototypesetcall_4770620bbe4688a0(arg0, arg1, arg2) {
289
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
290
+ }
291
+ export function __wbg_push_d2ae3af0c1217ae6(arg0, arg1) {
292
+ const ret = arg0.push(arg1);
293
+ return ret;
294
+ }
295
+ export function __wbg_queueMicrotask_0ab5b2d2393e99b9(arg0) {
296
+ const ret = arg0.queueMicrotask;
297
+ return ret;
298
+ }
299
+ export function __wbg_queueMicrotask_6a09b7bc46549209(arg0) {
300
+ queueMicrotask(arg0);
301
+ }
302
+ export function __wbg_readyState_50bc38c2a9e83db6(arg0) {
303
+ const ret = arg0.readyState;
304
+ return ret;
305
+ }
306
+ export function __wbg_reason_5dc8e429d537d6a9(arg0, arg1) {
307
+ const ret = arg1.reason;
308
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
309
+ const len1 = WASM_VECTOR_LEN;
310
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
311
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
312
+ }
313
+ export function __wbg_removeEventListener_a3f23c70077bdcc1() { return handleError(function (arg0, arg1, arg2, arg3) {
314
+ arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
315
+ }, arguments); }
316
+ export function __wbg_resolve_2191a4dfe481c25b(arg0) {
317
+ const ret = Promise.resolve(arg0);
318
+ return ret;
319
+ }
320
+ export function __wbg_rpcclient_new(arg0) {
321
+ const ret = RpcClient.__wrap(arg0);
322
+ return ret;
323
+ }
324
+ export function __wbg_send_a321b376d40ec867() { return handleError(function (arg0, arg1, arg2) {
325
+ arg0.send(getArrayU8FromWasm0(arg1, arg2));
326
+ }, arguments); }
327
+ export function __wbg_send_df98dd5ede9b3f4d() { return handleError(function (arg0, arg1, arg2) {
328
+ arg0.send(getStringFromWasm0(arg1, arg2));
329
+ }, arguments); }
330
+ export function __wbg_setTimeout_56bcdccbad22fd44() { return handleError(function (arg0, arg1) {
331
+ const ret = setTimeout(arg0, arg1);
332
+ return ret;
333
+ }, arguments); }
334
+ export function __wbg_set_575dd786d51585f8(arg0, arg1, arg2) {
335
+ const ret = arg0.set(arg1, arg2);
336
+ return ret;
337
+ }
338
+ export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
339
+ arg0[arg1] = arg2;
340
+ }
341
+ export function __wbg_set_8a16b38e4805b298(arg0, arg1, arg2) {
342
+ arg0[arg1 >>> 0] = arg2;
343
+ }
344
+ export function __wbg_set_binaryType_a37b086c78ca7c29(arg0, arg1) {
345
+ arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
346
+ }
347
+ export function __wbg_set_code_9d09aecd77d789f4(arg0, arg1) {
348
+ arg0.code = arg1;
349
+ }
350
+ export function __wbg_set_once_51a9fb6b8af8a72b(arg0, arg1) {
351
+ arg0.once = arg1 !== 0;
352
+ }
353
+ export function __wbg_set_reason_18dc06ea0d60243b(arg0, arg1, arg2) {
354
+ arg0.reason = getStringFromWasm0(arg1, arg2);
355
+ }
356
+ export function __wbg_static_accessor_GLOBAL_4ef717fb391d88b7() {
357
+ const ret = typeof global === 'undefined' ? null : global;
358
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
359
+ }
360
+ export function __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4() {
361
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
362
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
363
+ }
364
+ export function __wbg_static_accessor_SELF_146583524fe1469b() {
365
+ const ret = typeof self === 'undefined' ? null : self;
366
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
367
+ }
368
+ export function __wbg_static_accessor_WINDOW_f2829a2234d7819e() {
369
+ const ret = typeof window === 'undefined' ? null : window;
370
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
371
+ }
372
+ export function __wbg_then_6ec10ae38b3e92f7(arg0, arg1) {
373
+ const ret = arg0.then(arg1);
374
+ return ret;
375
+ }
376
+ export function __wbg_toString_bac9199ff382784d(arg0) {
377
+ const ret = arg0.toString();
378
+ return ret;
379
+ }
380
+ export function __wbg_wasClean_3c7aa2335da09e74(arg0) {
381
+ const ret = arg0.wasClean;
382
+ return ret;
383
+ }
384
+ export function __wbindgen_cast_0000000000000001(arg0, arg1) {
385
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 249, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
386
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___wasm_bindgen_3ca2b102c05f61f4___JsValue__core_3929dc75095e48e2___result__Result_____wasm_bindgen_3ca2b102c05f61f4___JsError___true_);
387
+ return ret;
388
+ }
389
+ export function __wbindgen_cast_0000000000000002(arg0, arg1) {
390
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 153, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
391
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true_);
392
+ return ret;
393
+ }
394
+ export function __wbindgen_cast_0000000000000003(arg0, arg1) {
395
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 153, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
396
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true__2);
397
+ return ret;
398
+ }
399
+ export function __wbindgen_cast_0000000000000004(arg0, arg1) {
400
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 153, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
401
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true__3);
402
+ return ret;
403
+ }
404
+ export function __wbindgen_cast_0000000000000005(arg0, arg1) {
405
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 157, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
406
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke_______true_);
407
+ return ret;
408
+ }
409
+ export function __wbindgen_cast_0000000000000006(arg0, arg1) {
410
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 228, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
411
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke_______true__1_);
412
+ return ret;
413
+ }
414
+ export function __wbindgen_cast_0000000000000007(arg0) {
415
+ // Cast intrinsic for `F64 -> Externref`.
416
+ const ret = arg0;
417
+ return ret;
418
+ }
419
+ export function __wbindgen_cast_0000000000000008(arg0) {
420
+ // Cast intrinsic for `I64 -> Externref`.
421
+ const ret = arg0;
422
+ return ret;
423
+ }
424
+ export function __wbindgen_cast_0000000000000009(arg0, arg1) {
425
+ // Cast intrinsic for `Ref(String) -> Externref`.
426
+ const ret = getStringFromWasm0(arg0, arg1);
427
+ return ret;
428
+ }
429
+ export function __wbindgen_cast_000000000000000a(arg0) {
430
+ // Cast intrinsic for `U64 -> Externref`.
431
+ const ret = BigInt.asUintN(64, arg0);
432
+ return ret;
433
+ }
434
+ export function __wbindgen_cast_000000000000000b(arg0, arg1) {
435
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
436
+ wasm.__wbindgen_free(arg0, arg1 * 4, 4);
437
+ // Cast intrinsic for `Vector(NamedExternref("TdBuiltResource")) -> Externref`.
438
+ const ret = v0;
439
+ return ret;
440
+ }
441
+ export function __wbindgen_cast_000000000000000c(arg0, arg1) {
442
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
443
+ wasm.__wbindgen_free(arg0, arg1 * 4, 4);
444
+ // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
445
+ const ret = v0;
446
+ return ret;
447
+ }
448
+ export function __wbindgen_init_externref_table() {
449
+ const table = wasm.__wbindgen_externrefs;
450
+ const offset = table.grow(4);
451
+ table.set(0, undefined);
452
+ table.set(offset + 0, undefined);
453
+ table.set(offset + 1, null);
454
+ table.set(offset + 2, true);
455
+ table.set(offset + 3, false);
456
+ }
457
+ function wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke_______true_(arg0, arg1) {
458
+ wasm.wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke_______true_(arg0, arg1);
459
+ }
460
+
461
+ function wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke_______true__1_(arg0, arg1) {
462
+ wasm.wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke_______true__1_(arg0, arg1);
463
+ }
464
+
465
+ function wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2) {
466
+ wasm.wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2);
467
+ }
468
+
469
+ function wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true__2(arg0, arg1, arg2) {
470
+ wasm.wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true__2(arg0, arg1, arg2);
471
+ }
472
+
473
+ function wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true__3(arg0, arg1, arg2) {
474
+ wasm.wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___web_sys_1c3b2f77efeb93e0___features__gen_CloseEvent__CloseEvent______true__3(arg0, arg1, arg2);
475
+ }
476
+
477
+ function wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___wasm_bindgen_3ca2b102c05f61f4___JsValue__core_3929dc75095e48e2___result__Result_____wasm_bindgen_3ca2b102c05f61f4___JsError___true_(arg0, arg1, arg2) {
478
+ const ret = wasm.wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___wasm_bindgen_3ca2b102c05f61f4___JsValue__core_3929dc75095e48e2___result__Result_____wasm_bindgen_3ca2b102c05f61f4___JsError___true_(arg0, arg1, arg2);
479
+ if (ret[1]) {
480
+ throw takeFromExternrefTable0(ret[0]);
481
+ }
482
+ }
483
+
484
+ function wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___js_sys_3791bf2f7732a58b___Function_fn_wasm_bindgen_3ca2b102c05f61f4___JsValue_____wasm_bindgen_3ca2b102c05f61f4___sys__Undefined___js_sys_3791bf2f7732a58b___Function_fn_wasm_bindgen_3ca2b102c05f61f4___JsValue_____wasm_bindgen_3ca2b102c05f61f4___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
485
+ wasm.wasm_bindgen_3ca2b102c05f61f4___convert__closures_____invoke___js_sys_3791bf2f7732a58b___Function_fn_wasm_bindgen_3ca2b102c05f61f4___JsValue_____wasm_bindgen_3ca2b102c05f61f4___sys__Undefined___js_sys_3791bf2f7732a58b___Function_fn_wasm_bindgen_3ca2b102c05f61f4___JsValue_____wasm_bindgen_3ca2b102c05f61f4___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
486
+ }
487
+
488
+
489
+ const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
490
+ const RpcClientFinalization = (typeof FinalizationRegistry === 'undefined')
491
+ ? { register: () => {}, unregister: () => {} }
492
+ : new FinalizationRegistry(ptr => wasm.__wbg_rpcclient_free(ptr, 1));
493
+
494
+ function addToExternrefTable0(obj) {
495
+ const idx = wasm.__externref_table_alloc();
496
+ wasm.__wbindgen_externrefs.set(idx, obj);
497
+ return idx;
498
+ }
499
+
500
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
501
+ ? { register: () => {}, unregister: () => {} }
502
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
503
+
504
+ function debugString(val) {
505
+ // primitive types
506
+ const type = typeof val;
507
+ if (type == 'number' || type == 'boolean' || val == null) {
508
+ return `${val}`;
509
+ }
510
+ if (type == 'string') {
511
+ return `"${val}"`;
512
+ }
513
+ if (type == 'symbol') {
514
+ const description = val.description;
515
+ if (description == null) {
516
+ return 'Symbol';
517
+ } else {
518
+ return `Symbol(${description})`;
519
+ }
520
+ }
521
+ if (type == 'function') {
522
+ const name = val.name;
523
+ if (typeof name == 'string' && name.length > 0) {
524
+ return `Function(${name})`;
525
+ } else {
526
+ return 'Function';
527
+ }
528
+ }
529
+ // objects
530
+ if (Array.isArray(val)) {
531
+ const length = val.length;
532
+ let debug = '[';
533
+ if (length > 0) {
534
+ debug += debugString(val[0]);
535
+ }
536
+ for(let i = 1; i < length; i++) {
537
+ debug += ', ' + debugString(val[i]);
538
+ }
539
+ debug += ']';
540
+ return debug;
541
+ }
542
+ // Test for built-in
543
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
544
+ let className;
545
+ if (builtInMatches && builtInMatches.length > 1) {
546
+ className = builtInMatches[1];
547
+ } else {
548
+ // Failed to match the standard '[object ClassName]'
549
+ return toString.call(val);
550
+ }
551
+ if (className == 'Object') {
552
+ // we're a user defined class or Object
553
+ // JSON.stringify avoids problems with cycles, and is generally much
554
+ // easier than looping through ownProperties of `val`.
555
+ try {
556
+ return 'Object(' + JSON.stringify(val) + ')';
557
+ } catch (_) {
558
+ return 'Object';
559
+ }
560
+ }
561
+ // errors
562
+ if (val instanceof Error) {
563
+ return `${val.name}: ${val.message}\n${val.stack}`;
564
+ }
565
+ // TODO we could test for more things here, like `Set`s and `Map`s.
566
+ return className;
567
+ }
568
+
569
+ function getArrayJsValueFromWasm0(ptr, len) {
570
+ ptr = ptr >>> 0;
571
+ const mem = getDataViewMemory0();
572
+ const result = [];
573
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
574
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
575
+ }
576
+ wasm.__externref_drop_slice(ptr, len);
577
+ return result;
578
+ }
579
+
580
+ function getArrayU8FromWasm0(ptr, len) {
581
+ ptr = ptr >>> 0;
582
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
583
+ }
584
+
585
+ let cachedDataViewMemory0 = null;
586
+ function getDataViewMemory0() {
587
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
588
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
589
+ }
590
+ return cachedDataViewMemory0;
591
+ }
592
+
593
+ function getStringFromWasm0(ptr, len) {
594
+ return decodeText(ptr >>> 0, len);
595
+ }
596
+
597
+ let cachedUint8ArrayMemory0 = null;
598
+ function getUint8ArrayMemory0() {
599
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
600
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
601
+ }
602
+ return cachedUint8ArrayMemory0;
603
+ }
604
+
605
+ function handleError(f, args) {
606
+ try {
607
+ return f.apply(this, args);
608
+ } catch (e) {
609
+ const idx = addToExternrefTable0(e);
610
+ wasm.__wbindgen_exn_store(idx);
611
+ }
612
+ }
613
+
614
+ function isLikeNone(x) {
615
+ return x === undefined || x === null;
616
+ }
617
+
618
+ function makeMutClosure(arg0, arg1, f) {
619
+ const state = { a: arg0, b: arg1, cnt: 1 };
620
+ const real = (...args) => {
621
+
622
+ // First up with a closure we increment the internal reference
623
+ // count. This ensures that the Rust closure environment won't
624
+ // be deallocated while we're invoking it.
625
+ state.cnt++;
626
+ const a = state.a;
627
+ state.a = 0;
628
+ try {
629
+ return f(a, state.b, ...args);
630
+ } finally {
631
+ state.a = a;
632
+ real._wbg_cb_unref();
633
+ }
634
+ };
635
+ real._wbg_cb_unref = () => {
636
+ if (--state.cnt === 0) {
637
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
638
+ state.a = 0;
639
+ CLOSURE_DTORS.unregister(state);
640
+ }
641
+ };
642
+ CLOSURE_DTORS.register(real, state, state);
643
+ return real;
644
+ }
645
+
646
+ function passArrayJsValueToWasm0(array, malloc) {
647
+ const ptr = malloc(array.length * 4, 4) >>> 0;
648
+ for (let i = 0; i < array.length; i++) {
649
+ const add = addToExternrefTable0(array[i]);
650
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
651
+ }
652
+ WASM_VECTOR_LEN = array.length;
653
+ return ptr;
654
+ }
655
+
656
+ function passStringToWasm0(arg, malloc, realloc) {
657
+ if (realloc === undefined) {
658
+ const buf = cachedTextEncoder.encode(arg);
659
+ const ptr = malloc(buf.length, 1) >>> 0;
660
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
661
+ WASM_VECTOR_LEN = buf.length;
662
+ return ptr;
663
+ }
664
+
665
+ let len = arg.length;
666
+ let ptr = malloc(len, 1) >>> 0;
667
+
668
+ const mem = getUint8ArrayMemory0();
669
+
670
+ let offset = 0;
671
+
672
+ for (; offset < len; offset++) {
673
+ const code = arg.charCodeAt(offset);
674
+ if (code > 0x7F) break;
675
+ mem[ptr + offset] = code;
676
+ }
677
+ if (offset !== len) {
678
+ if (offset !== 0) {
679
+ arg = arg.slice(offset);
680
+ }
681
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
682
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
683
+ const ret = cachedTextEncoder.encodeInto(arg, view);
684
+
685
+ offset += ret.written;
686
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
687
+ }
688
+
689
+ WASM_VECTOR_LEN = offset;
690
+ return ptr;
691
+ }
692
+
693
+ function takeFromExternrefTable0(idx) {
694
+ const value = wasm.__wbindgen_externrefs.get(idx);
695
+ wasm.__externref_table_dealloc(idx);
696
+ return value;
697
+ }
698
+
699
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
700
+ cachedTextDecoder.decode();
701
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
702
+ let numBytesDecoded = 0;
703
+ function decodeText(ptr, len) {
704
+ numBytesDecoded += len;
705
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
706
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
707
+ cachedTextDecoder.decode();
708
+ numBytesDecoded = len;
709
+ }
710
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
711
+ }
712
+
713
+ const cachedTextEncoder = new TextEncoder();
714
+
715
+ if (!('encodeInto' in cachedTextEncoder)) {
716
+ cachedTextEncoder.encodeInto = function (arg, view) {
717
+ const buf = cachedTextEncoder.encode(arg);
718
+ view.set(buf);
719
+ return {
720
+ read: arg.length,
721
+ written: buf.length
722
+ };
723
+ };
724
+ }
725
+
726
+ let WASM_VECTOR_LEN = 0;
727
+
728
+
729
+ let wasm;
730
+ export function __wbg_set_wasm(val) {
731
+ wasm = val;
732
+ }