@freqhole/midden 0.1.31 → 0.2.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/README.md +81 -58
- package/midden.d.ts +265 -21
- package/midden.js +2 -2
- package/midden_bg.js +920 -244
- package/midden_bg.wasm +0 -0
- package/package.json +1 -1
package/midden_bg.js
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export class BiStream {
|
|
13
13
|
static __wrap(ptr) {
|
|
14
|
-
ptr = ptr >>> 0;
|
|
15
14
|
const obj = Object.create(BiStream.prototype);
|
|
16
15
|
obj.__wbg_ptr = ptr;
|
|
17
16
|
BiStreamFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -147,7 +146,7 @@ export class BiStream {
|
|
|
147
146
|
* race the QUIC flush -- the peer's `read_to_end` then errors with
|
|
148
147
|
* "connection lost" mid-payload because the in-flight frames are
|
|
149
148
|
* torn down with the connection. matters most for large payloads
|
|
150
|
-
* (e.g. base64-encoded blob bodies in `
|
|
149
|
+
* (e.g. base64-encoded blob bodies in `api_response`).
|
|
151
150
|
* @param {Uint8Array} data
|
|
152
151
|
* @returns {Promise<void>}
|
|
153
152
|
*/
|
|
@@ -160,12 +159,120 @@ export class BiStream {
|
|
|
160
159
|
}
|
|
161
160
|
if (Symbol.dispose) BiStream.prototype[Symbol.dispose] = BiStream.prototype.free;
|
|
162
161
|
|
|
162
|
+
/**
|
|
163
|
+
* incremental blake3 hasher for streaming uploads — feed fixed-size chunks
|
|
164
|
+
* via update() and read the final hex hash from finalize(). lets JS hash a
|
|
165
|
+
* File while streaming it (file.stream() reader loop) instead of holding
|
|
166
|
+
* the whole payload in memory for a one-shot hash_blake3().
|
|
167
|
+
*/
|
|
168
|
+
export class Blake3Hasher {
|
|
169
|
+
__destroy_into_raw() {
|
|
170
|
+
const ptr = this.__wbg_ptr;
|
|
171
|
+
this.__wbg_ptr = 0;
|
|
172
|
+
Blake3HasherFinalization.unregister(this);
|
|
173
|
+
return ptr;
|
|
174
|
+
}
|
|
175
|
+
free() {
|
|
176
|
+
const ptr = this.__destroy_into_raw();
|
|
177
|
+
wasm.__wbg_blake3hasher_free(ptr, 0);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* finish and return the hash as a 64-char hex string. the hasher can
|
|
181
|
+
* keep absorbing after this (blake3 finalize is non-destructive), but
|
|
182
|
+
* callers should treat the session as done.
|
|
183
|
+
* @returns {string}
|
|
184
|
+
*/
|
|
185
|
+
finalize() {
|
|
186
|
+
let deferred1_0;
|
|
187
|
+
let deferred1_1;
|
|
188
|
+
try {
|
|
189
|
+
const ret = wasm.blake3hasher_finalize(this.__wbg_ptr);
|
|
190
|
+
deferred1_0 = ret[0];
|
|
191
|
+
deferred1_1 = ret[1];
|
|
192
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
193
|
+
} finally {
|
|
194
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
constructor() {
|
|
198
|
+
const ret = wasm.blake3hasher_new();
|
|
199
|
+
this.__wbg_ptr = ret;
|
|
200
|
+
Blake3HasherFinalization.register(this, this.__wbg_ptr, this);
|
|
201
|
+
return this;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* absorb the next chunk of data.
|
|
205
|
+
* @param {Uint8Array} chunk
|
|
206
|
+
*/
|
|
207
|
+
update(chunk) {
|
|
208
|
+
const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_malloc);
|
|
209
|
+
const len0 = WASM_VECTOR_LEN;
|
|
210
|
+
wasm.blake3hasher_update(this.__wbg_ptr, ptr0, len0);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (Symbol.dispose) Blake3Hasher.prototype[Symbol.dispose] = Blake3Hasher.prototype.free;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* cooperative cancellation for in-flight downloads (pause/cancel from JS).
|
|
217
|
+
* the download loops select on `cancelled()` between progress events —
|
|
218
|
+
* cancellation takes effect at the next event boundary, and the partial
|
|
219
|
+
* data stays in the store, so a later download of the same hash resumes
|
|
220
|
+
* from the persisted bitfield (only missing ranges transfer).
|
|
221
|
+
*/
|
|
222
|
+
export class CancelToken {
|
|
223
|
+
static __wrap(ptr) {
|
|
224
|
+
const obj = Object.create(CancelToken.prototype);
|
|
225
|
+
obj.__wbg_ptr = ptr;
|
|
226
|
+
CancelTokenFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
227
|
+
return obj;
|
|
228
|
+
}
|
|
229
|
+
__destroy_into_raw() {
|
|
230
|
+
const ptr = this.__wbg_ptr;
|
|
231
|
+
this.__wbg_ptr = 0;
|
|
232
|
+
CancelTokenFinalization.unregister(this);
|
|
233
|
+
return ptr;
|
|
234
|
+
}
|
|
235
|
+
free() {
|
|
236
|
+
const ptr = this.__destroy_into_raw();
|
|
237
|
+
wasm.__wbg_canceltoken_free(ptr, 0);
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* request cancellation. idempotent.
|
|
241
|
+
*/
|
|
242
|
+
cancel() {
|
|
243
|
+
wasm.canceltoken_cancel(this.__wbg_ptr);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* return a new CancelToken sharing the same cancellation state.
|
|
247
|
+
* needed because passing a wasm class by value consumes the JS handle —
|
|
248
|
+
* callers keep the original and pass a clone into download calls.
|
|
249
|
+
* @returns {CancelToken}
|
|
250
|
+
*/
|
|
251
|
+
clone_token() {
|
|
252
|
+
const ret = wasm.canceltoken_clone_token(this.__wbg_ptr);
|
|
253
|
+
return CancelToken.__wrap(ret);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @returns {boolean}
|
|
257
|
+
*/
|
|
258
|
+
is_cancelled() {
|
|
259
|
+
const ret = wasm.canceltoken_is_cancelled(this.__wbg_ptr);
|
|
260
|
+
return ret !== 0;
|
|
261
|
+
}
|
|
262
|
+
constructor() {
|
|
263
|
+
const ret = wasm.canceltoken_new();
|
|
264
|
+
this.__wbg_ptr = ret;
|
|
265
|
+
CancelTokenFinalization.register(this, this.__wbg_ptr, this);
|
|
266
|
+
return this;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (Symbol.dispose) CancelToken.prototype[Symbol.dispose] = CancelToken.prototype.free;
|
|
270
|
+
|
|
163
271
|
/**
|
|
164
272
|
* result from fetching the server hello image from a peer
|
|
165
273
|
*/
|
|
166
274
|
export class HelloImageResult {
|
|
167
275
|
static __wrap(ptr) {
|
|
168
|
-
ptr = ptr >>> 0;
|
|
169
276
|
const obj = Object.create(HelloImageResult.prototype);
|
|
170
277
|
obj.__wbg_ptr = ptr;
|
|
171
278
|
HelloImageResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -203,6 +310,65 @@ export class HelloImageResult {
|
|
|
203
310
|
}
|
|
204
311
|
if (Symbol.dispose) HelloImageResult.prototype[Symbol.dispose] = HelloImageResult.prototype.free;
|
|
205
312
|
|
|
313
|
+
/**
|
|
314
|
+
* chunked import session — the streaming counterpart to import_blob.
|
|
315
|
+
*
|
|
316
|
+
* created via MiddenNode::start_import(). JS feeds fixed-size chunks with
|
|
317
|
+
* push() (backpressured: the promise resolves only once the chunk is
|
|
318
|
+
* queued), then finish() completes the import and returns the blake3 hash.
|
|
319
|
+
* the wasm boundary never sees the whole payload at once; the store's
|
|
320
|
+
* ImportByteStream machinery computes the bao tree incrementally.
|
|
321
|
+
*
|
|
322
|
+
* the finished blob is pinned in the node's active_tags (same as
|
|
323
|
+
* import_blob) until release_blob() is called.
|
|
324
|
+
*/
|
|
325
|
+
export class ImportSession {
|
|
326
|
+
static __wrap(ptr) {
|
|
327
|
+
const obj = Object.create(ImportSession.prototype);
|
|
328
|
+
obj.__wbg_ptr = ptr;
|
|
329
|
+
ImportSessionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
330
|
+
return obj;
|
|
331
|
+
}
|
|
332
|
+
__destroy_into_raw() {
|
|
333
|
+
const ptr = this.__wbg_ptr;
|
|
334
|
+
this.__wbg_ptr = 0;
|
|
335
|
+
ImportSessionFinalization.unregister(this);
|
|
336
|
+
return ptr;
|
|
337
|
+
}
|
|
338
|
+
free() {
|
|
339
|
+
const ptr = this.__destroy_into_raw();
|
|
340
|
+
wasm.__wbg_importsession_free(ptr, 0);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* abort the import. any partially-imported data is left to GC.
|
|
344
|
+
*/
|
|
345
|
+
abort() {
|
|
346
|
+
wasm.importsession_abort(this.__wbg_ptr);
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* signal end-of-stream, wait for the import to complete, pin the
|
|
350
|
+
* resulting blob, and return its blake3 hash as a hex string.
|
|
351
|
+
* @returns {Promise<string>}
|
|
352
|
+
*/
|
|
353
|
+
finish() {
|
|
354
|
+
const ret = wasm.importsession_finish(this.__wbg_ptr);
|
|
355
|
+
return ret;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* queue the next chunk. resolves once the chunk has been accepted by
|
|
359
|
+
* the import stream (bounded channel — this is the backpressure point).
|
|
360
|
+
* @param {Uint8Array} chunk
|
|
361
|
+
* @returns {Promise<void>}
|
|
362
|
+
*/
|
|
363
|
+
push(chunk) {
|
|
364
|
+
const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_malloc);
|
|
365
|
+
const len0 = WASM_VECTOR_LEN;
|
|
366
|
+
const ret = wasm.importsession_push(this.__wbg_ptr, ptr0, len0);
|
|
367
|
+
return ret;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
if (Symbol.dispose) ImportSession.prototype[Symbol.dispose] = ImportSession.prototype.free;
|
|
371
|
+
|
|
206
372
|
export class IntoUnderlyingByteSource {
|
|
207
373
|
__destroy_into_raw() {
|
|
208
374
|
const ptr = this.__wbg_ptr;
|
|
@@ -318,12 +484,11 @@ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderly
|
|
|
318
484
|
* browser P2P node for freqhole federation
|
|
319
485
|
*
|
|
320
486
|
* supports two protocols:
|
|
321
|
-
* - freqhole/1: API
|
|
487
|
+
* - freqhole/1: API requests and small blob streaming
|
|
322
488
|
* - iroh-blobs: verified streaming for audio files
|
|
323
489
|
*/
|
|
324
490
|
export class MiddenNode {
|
|
325
491
|
static __wrap(ptr) {
|
|
326
|
-
ptr = ptr >>> 0;
|
|
327
492
|
const obj = Object.create(MiddenNode.prototype);
|
|
328
493
|
obj.__wbg_ptr = ptr;
|
|
329
494
|
MiddenNodeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -363,6 +528,40 @@ export class MiddenNode {
|
|
|
363
528
|
const ret = wasm.middennode_active_blob_count(this.__wbg_ptr);
|
|
364
529
|
return ret >>> 0;
|
|
365
530
|
}
|
|
531
|
+
/**
|
|
532
|
+
* send an API request to a peer
|
|
533
|
+
* peer_addr can be plain node_id or full endpoint JSON with relay/IP hints
|
|
534
|
+
* @param {string} peer_addr
|
|
535
|
+
* @param {string} method
|
|
536
|
+
* @param {string} path
|
|
537
|
+
* @param {string | null} [body]
|
|
538
|
+
* @returns {Promise<any>}
|
|
539
|
+
*/
|
|
540
|
+
api_request(peer_addr, method, path, body) {
|
|
541
|
+
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
542
|
+
const len0 = WASM_VECTOR_LEN;
|
|
543
|
+
const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
544
|
+
const len1 = WASM_VECTOR_LEN;
|
|
545
|
+
const ptr2 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
546
|
+
const len2 = WASM_VECTOR_LEN;
|
|
547
|
+
var ptr3 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
548
|
+
var len3 = WASM_VECTOR_LEN;
|
|
549
|
+
const ret = wasm.middennode_api_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
550
|
+
return ret;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* PROTOTYPE: remove a hash's restriction, returning it to the default
|
|
554
|
+
* (served to anyone) state.
|
|
555
|
+
* @param {string} blake3_hash
|
|
556
|
+
*/
|
|
557
|
+
clear_blob_restriction(blake3_hash) {
|
|
558
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
559
|
+
const len0 = WASM_VECTOR_LEN;
|
|
560
|
+
const ret = wasm.middennode_clear_blob_restriction(this.__wbg_ptr, ptr0, len0);
|
|
561
|
+
if (ret[1]) {
|
|
562
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
366
565
|
/**
|
|
367
566
|
* compute blake3 hash for a blob on demand
|
|
368
567
|
*
|
|
@@ -384,39 +583,70 @@ export class MiddenNode {
|
|
|
384
583
|
return ret;
|
|
385
584
|
}
|
|
386
585
|
/**
|
|
387
|
-
* create a new node with random identity
|
|
388
|
-
* waits for relay connection before returning
|
|
586
|
+
* create a new node with random identity, an in-memory blob store, and
|
|
587
|
+
* the default ALPN set. waits for relay connection before returning.
|
|
588
|
+
*
|
|
589
|
+
* deprecated: use `create_with_options` instead.
|
|
590
|
+
*
|
|
591
|
+
* `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
|
|
592
|
+
* (defaults to 10s when omitted/undefined).
|
|
593
|
+
* @param {number | null} [connect_timeout_ms]
|
|
389
594
|
* @returns {Promise<MiddenNode>}
|
|
390
595
|
*/
|
|
391
|
-
static create() {
|
|
392
|
-
const ret = wasm.middennode_create();
|
|
596
|
+
static create(connect_timeout_ms) {
|
|
597
|
+
const ret = wasm.middennode_create(isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
|
|
393
598
|
return ret;
|
|
394
599
|
}
|
|
395
600
|
/**
|
|
396
601
|
* create a node from existing secret key bytes (for persistence)
|
|
397
|
-
* key_bytes must be exactly 32 bytes
|
|
602
|
+
* key_bytes must be exactly 32 bytes.
|
|
603
|
+
*
|
|
604
|
+
* deprecated: use `create_with_options` instead.
|
|
605
|
+
*
|
|
606
|
+
* `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
|
|
607
|
+
* (defaults to 10s when omitted/undefined).
|
|
398
608
|
* @param {Uint8Array} key_bytes
|
|
609
|
+
* @param {number | null} [connect_timeout_ms]
|
|
399
610
|
* @returns {Promise<MiddenNode>}
|
|
400
611
|
*/
|
|
401
|
-
static create_from_key(key_bytes) {
|
|
612
|
+
static create_from_key(key_bytes, connect_timeout_ms) {
|
|
402
613
|
const ptr0 = passArray8ToWasm0(key_bytes, wasm.__wbindgen_malloc);
|
|
403
614
|
const len0 = WASM_VECTOR_LEN;
|
|
404
|
-
const ret = wasm.middennode_create_from_key(ptr0, len0);
|
|
615
|
+
const ret = wasm.middennode_create_from_key(ptr0, len0, isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
|
|
405
616
|
return ret;
|
|
406
617
|
}
|
|
407
618
|
/**
|
|
408
619
|
* create a node from existing secret key with additional ALPN protocols.
|
|
409
620
|
*
|
|
621
|
+
* deprecated: use `create_with_options` instead.
|
|
622
|
+
*
|
|
410
623
|
* `extra_alpns` is a JS array of strings (e.g. ["iroh/automerge-repo/1"]).
|
|
411
|
-
* the node always registers
|
|
624
|
+
* the node always registers the default ALPN set plus whatever extra ALPNs are given.
|
|
625
|
+
*
|
|
626
|
+
* `connect_timeout_ms` is an optional per-dial timeout for `open_bi`
|
|
627
|
+
* (defaults to 10s when omitted/undefined).
|
|
412
628
|
* @param {Uint8Array} key_bytes
|
|
413
629
|
* @param {Array<any>} extra_alpns
|
|
630
|
+
* @param {number | null} [connect_timeout_ms]
|
|
414
631
|
* @returns {Promise<MiddenNode>}
|
|
415
632
|
*/
|
|
416
|
-
static create_with_alpns(key_bytes, extra_alpns) {
|
|
633
|
+
static create_with_alpns(key_bytes, extra_alpns, connect_timeout_ms) {
|
|
417
634
|
const ptr0 = passArray8ToWasm0(key_bytes, wasm.__wbindgen_malloc);
|
|
418
635
|
const len0 = WASM_VECTOR_LEN;
|
|
419
|
-
const ret = wasm.middennode_create_with_alpns(ptr0, len0, extra_alpns);
|
|
636
|
+
const ret = wasm.middennode_create_with_alpns(ptr0, len0, extra_alpns, isLikeNone(connect_timeout_ms) ? Number.MAX_SAFE_INTEGER : (connect_timeout_ms) >>> 0);
|
|
637
|
+
return ret;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* create a node from an options bag. this is the single canonical
|
|
641
|
+
* constructor — `create`/`create_from_key`/`create_with_alpns` below
|
|
642
|
+
* are deprecated wrappers kept for existing callers (spume, playlistz).
|
|
643
|
+
* @param {MiddenNodeOptions} options
|
|
644
|
+
* @returns {Promise<MiddenNode>}
|
|
645
|
+
*/
|
|
646
|
+
static create_with_options(options) {
|
|
647
|
+
_assertClass(options, MiddenNodeOptions);
|
|
648
|
+
var ptr0 = options.__destroy_into_raw();
|
|
649
|
+
const ret = wasm.middennode_create_with_options(ptr0);
|
|
420
650
|
return ret;
|
|
421
651
|
}
|
|
422
652
|
/**
|
|
@@ -460,6 +690,25 @@ export class MiddenNode {
|
|
|
460
690
|
const ret = wasm.middennode_download_verified_by_id(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
461
691
|
return ret;
|
|
462
692
|
}
|
|
693
|
+
/**
|
|
694
|
+
* full pipeline from blob_id with progress reporting.
|
|
695
|
+
*
|
|
696
|
+
* computes blake3 on demand, then uses verified download with progress.
|
|
697
|
+
* returns [data: Uint8Array, blake3: string].
|
|
698
|
+
* @param {string} peer_addr
|
|
699
|
+
* @param {string} blob_id
|
|
700
|
+
* @param {number} total_size
|
|
701
|
+
* @param {Function} on_progress
|
|
702
|
+
* @returns {Promise<Array<any>>}
|
|
703
|
+
*/
|
|
704
|
+
download_verified_by_id_progress(peer_addr, blob_id, total_size, on_progress) {
|
|
705
|
+
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
706
|
+
const len0 = WASM_VECTOR_LEN;
|
|
707
|
+
const ptr1 = passStringToWasm0(blob_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
708
|
+
const len1 = WASM_VECTOR_LEN;
|
|
709
|
+
const ret = wasm.middennode_download_verified_by_id_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress);
|
|
710
|
+
return ret;
|
|
711
|
+
}
|
|
463
712
|
/**
|
|
464
713
|
* download a verified blob and stream chunks to JS via callback
|
|
465
714
|
*
|
|
@@ -484,33 +733,46 @@ export class MiddenNode {
|
|
|
484
733
|
* @param {number} total_size
|
|
485
734
|
* @param {Function} on_chunk
|
|
486
735
|
* @param {Function} on_progress
|
|
736
|
+
* @param {CancelToken | null} [cancel]
|
|
487
737
|
* @returns {Promise<number>}
|
|
488
738
|
*/
|
|
489
|
-
download_verified_streaming(peer_addr, blake3_hash, total_size, on_chunk, on_progress) {
|
|
739
|
+
download_verified_streaming(peer_addr, blake3_hash, total_size, on_chunk, on_progress, cancel) {
|
|
490
740
|
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
491
741
|
const len0 = WASM_VECTOR_LEN;
|
|
492
742
|
const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
493
743
|
const len1 = WASM_VECTOR_LEN;
|
|
494
|
-
|
|
744
|
+
let ptr2 = 0;
|
|
745
|
+
if (!isLikeNone(cancel)) {
|
|
746
|
+
_assertClass(cancel, CancelToken);
|
|
747
|
+
ptr2 = cancel.__destroy_into_raw();
|
|
748
|
+
}
|
|
749
|
+
const ret = wasm.middennode_download_verified_streaming(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_chunk, on_progress, ptr2);
|
|
495
750
|
return ret;
|
|
496
751
|
}
|
|
497
752
|
/**
|
|
498
753
|
* streaming download with auto ensure+retry. first attempts the streaming
|
|
499
754
|
* download; if the verified download fails (blob not in peer's store), calls
|
|
500
|
-
* ensure_blob to load it, then retries.
|
|
755
|
+
* ensure_blob to load it, then retries. a deliberate cancellation is NOT
|
|
756
|
+
* retried — it propagates immediately with the "download cancelled" message.
|
|
501
757
|
* @param {string} peer_addr
|
|
502
758
|
* @param {string} blake3_hash
|
|
503
759
|
* @param {number} total_size
|
|
504
760
|
* @param {Function} on_chunk
|
|
505
761
|
* @param {Function} on_progress
|
|
762
|
+
* @param {CancelToken | null} [cancel]
|
|
506
763
|
* @returns {Promise<number>}
|
|
507
764
|
*/
|
|
508
|
-
download_verified_streaming_with_ensure(peer_addr, blake3_hash, total_size, on_chunk, on_progress) {
|
|
765
|
+
download_verified_streaming_with_ensure(peer_addr, blake3_hash, total_size, on_chunk, on_progress, cancel) {
|
|
509
766
|
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
510
767
|
const len0 = WASM_VECTOR_LEN;
|
|
511
768
|
const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
512
769
|
const len1 = WASM_VECTOR_LEN;
|
|
513
|
-
|
|
770
|
+
let ptr2 = 0;
|
|
771
|
+
if (!isLikeNone(cancel)) {
|
|
772
|
+
_assertClass(cancel, CancelToken);
|
|
773
|
+
ptr2 = cancel.__destroy_into_raw();
|
|
774
|
+
}
|
|
775
|
+
const ret = wasm.middennode_download_verified_streaming_with_ensure(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_chunk, on_progress, ptr2);
|
|
514
776
|
return ret;
|
|
515
777
|
}
|
|
516
778
|
/**
|
|
@@ -530,6 +792,71 @@ export class MiddenNode {
|
|
|
530
792
|
const ret = wasm.middennode_download_verified_with_ensure(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
531
793
|
return ret;
|
|
532
794
|
}
|
|
795
|
+
/**
|
|
796
|
+
* download with ensure + retry and progress reporting.
|
|
797
|
+
*
|
|
798
|
+
* tries download first; if blob not in peer's FsStore, calls ensure_blob
|
|
799
|
+
* then retries. progress callback receives fraction (0.0 to 1.0).
|
|
800
|
+
* `cancel`: optional cooperative cancellation (pause) — a deliberate
|
|
801
|
+
* cancellation is NOT retried, it propagates immediately.
|
|
802
|
+
*
|
|
803
|
+
* NOTE: any failure on the first attempt triggers this same
|
|
804
|
+
* ensure-then-retry fallback, not just the "blob not in FsStore yet"
|
|
805
|
+
* case the fallback was designed for. for a large blob, the first
|
|
806
|
+
* attempt can stream a substantial fraction of the bytes (driving
|
|
807
|
+
* `on_progress` most/all of the way to 1.0) before failing late, so the
|
|
808
|
+
* caller-visible symptom is a full 0->100% progress cycle that silently
|
|
809
|
+
* restarts from 0 for a second full cycle. logging the first attempt's
|
|
810
|
+
* error and explicitly resetting progress to 0 here makes this restart
|
|
811
|
+
* visible/diagnosable instead of looking like a silent glitch.
|
|
812
|
+
* @param {string} peer_addr
|
|
813
|
+
* @param {string} blake3_hash
|
|
814
|
+
* @param {number} total_size
|
|
815
|
+
* @param {Function} on_progress
|
|
816
|
+
* @param {CancelToken | null} [cancel]
|
|
817
|
+
* @returns {Promise<Uint8Array>}
|
|
818
|
+
*/
|
|
819
|
+
download_verified_with_ensure_progress(peer_addr, blake3_hash, total_size, on_progress, cancel) {
|
|
820
|
+
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
821
|
+
const len0 = WASM_VECTOR_LEN;
|
|
822
|
+
const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
823
|
+
const len1 = WASM_VECTOR_LEN;
|
|
824
|
+
let ptr2 = 0;
|
|
825
|
+
if (!isLikeNone(cancel)) {
|
|
826
|
+
_assertClass(cancel, CancelToken);
|
|
827
|
+
ptr2 = cancel.__destroy_into_raw();
|
|
828
|
+
}
|
|
829
|
+
const ret = wasm.middennode_download_verified_with_ensure_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress, ptr2);
|
|
830
|
+
return ret;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* download a blob with progress reporting via JS callback
|
|
834
|
+
*
|
|
835
|
+
* same as download_verified but calls on_progress(fraction) where
|
|
836
|
+
* fraction is bytes_received / total_size (0.0 to 1.0).
|
|
837
|
+
* total_size should come from the caller's known size field.
|
|
838
|
+
* `cancel`: optional cooperative cancellation (pause) — see
|
|
839
|
+
* download_verified_streaming for the semantics.
|
|
840
|
+
* @param {string} peer_addr
|
|
841
|
+
* @param {string} blake3_hash
|
|
842
|
+
* @param {number} total_size
|
|
843
|
+
* @param {Function} on_progress
|
|
844
|
+
* @param {CancelToken | null} [cancel]
|
|
845
|
+
* @returns {Promise<Uint8Array>}
|
|
846
|
+
*/
|
|
847
|
+
download_verified_with_progress(peer_addr, blake3_hash, total_size, on_progress, cancel) {
|
|
848
|
+
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
849
|
+
const len0 = WASM_VECTOR_LEN;
|
|
850
|
+
const ptr1 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
851
|
+
const len1 = WASM_VECTOR_LEN;
|
|
852
|
+
let ptr2 = 0;
|
|
853
|
+
if (!isLikeNone(cancel)) {
|
|
854
|
+
_assertClass(cancel, CancelToken);
|
|
855
|
+
ptr2 = cancel.__destroy_into_raw();
|
|
856
|
+
}
|
|
857
|
+
const ret = wasm.middennode_download_verified_with_progress(this.__wbg_ptr, ptr0, len0, ptr1, len1, total_size, on_progress, ptr2);
|
|
858
|
+
return ret;
|
|
859
|
+
}
|
|
533
860
|
/**
|
|
534
861
|
* ensure a blob is loaded into the peer's FsStore by blake3 hash
|
|
535
862
|
*
|
|
@@ -563,7 +890,7 @@ export class MiddenNode {
|
|
|
563
890
|
return ret;
|
|
564
891
|
}
|
|
565
892
|
/**
|
|
566
|
-
* check whether a blob with the given blake3 hash is currently held in the
|
|
893
|
+
* check whether a blob with the given blake3 hash is currently held in the store
|
|
567
894
|
* via an active TempTag. avoids expensive OPFS read + bao recomputation when the
|
|
568
895
|
* blob is already loaded.
|
|
569
896
|
* @param {string} blake3_hash
|
|
@@ -575,6 +902,20 @@ export class MiddenNode {
|
|
|
575
902
|
const ret = wasm.middennode_has_active_blob(this.__wbg_ptr, ptr0, len0);
|
|
576
903
|
return ret !== 0;
|
|
577
904
|
}
|
|
905
|
+
/**
|
|
906
|
+
* check whether a COMPLETE blob with this hash exists in the blob store
|
|
907
|
+
* itself — with the persistent opfs store this is true across reloads,
|
|
908
|
+
* even when no TempTag pins it. lets serving paths skip re-imports
|
|
909
|
+
* entirely.
|
|
910
|
+
* @param {string} blake3_hash
|
|
911
|
+
* @returns {Promise<boolean>}
|
|
912
|
+
*/
|
|
913
|
+
has_complete_blob(blake3_hash) {
|
|
914
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
915
|
+
const len0 = WASM_VECTOR_LEN;
|
|
916
|
+
const ret = wasm.middennode_has_complete_blob(this.__wbg_ptr, ptr0, len0);
|
|
917
|
+
return ret;
|
|
918
|
+
}
|
|
578
919
|
/**
|
|
579
920
|
* import a blob from its pre-computed bao-encoded bytes, skipping the
|
|
580
921
|
* expensive bao tree computation. `blake3_hash` is the 64-char hex hash,
|
|
@@ -600,7 +941,7 @@ export class MiddenNode {
|
|
|
600
941
|
* import raw bytes into the iroh-blobs store, returning the blake3 hash.
|
|
601
942
|
* this makes the blob available for verified download by peers.
|
|
602
943
|
* the blob stays in the store as long as its TempTag is held in active_tags.
|
|
603
|
-
* call release_blob() to allow GC
|
|
944
|
+
* call release_blob() to allow GC.
|
|
604
945
|
* @param {Uint8Array} data
|
|
605
946
|
* @returns {Promise<string>}
|
|
606
947
|
*/
|
|
@@ -625,6 +966,34 @@ export class MiddenNode {
|
|
|
625
966
|
const ret = wasm.middennode_import_blob_and_export_bao(this.__wbg_ptr, ptr0, len0);
|
|
626
967
|
return ret;
|
|
627
968
|
}
|
|
969
|
+
/**
|
|
970
|
+
* get our full endpoint address as JSON (node_id + relay url + any direct addrs).
|
|
971
|
+
*
|
|
972
|
+
* after `online()` has resolved this includes the home relay url, which is
|
|
973
|
+
* enough for a remote peer to dial us directly via the relay without doing
|
|
974
|
+
* a pkarr/DNS discovery lookup first. pass the returned string straight to
|
|
975
|
+
* `open_bi`/`connect` on the other side - `parse_peer_addr` accepts this
|
|
976
|
+
* same JSON shape. avoids the discovery propagation race on fresh boots.
|
|
977
|
+
* @returns {string}
|
|
978
|
+
*/
|
|
979
|
+
node_addr() {
|
|
980
|
+
let deferred2_0;
|
|
981
|
+
let deferred2_1;
|
|
982
|
+
try {
|
|
983
|
+
const ret = wasm.middennode_node_addr(this.__wbg_ptr);
|
|
984
|
+
var ptr1 = ret[0];
|
|
985
|
+
var len1 = ret[1];
|
|
986
|
+
if (ret[3]) {
|
|
987
|
+
ptr1 = 0; len1 = 0;
|
|
988
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
989
|
+
}
|
|
990
|
+
deferred2_0 = ptr1;
|
|
991
|
+
deferred2_1 = len1;
|
|
992
|
+
return getStringFromWasm0(ptr1, len1);
|
|
993
|
+
} finally {
|
|
994
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
995
|
+
}
|
|
996
|
+
}
|
|
628
997
|
/**
|
|
629
998
|
* get our node_id (iroh public key)
|
|
630
999
|
* @returns {string}
|
|
@@ -645,7 +1014,7 @@ export class MiddenNode {
|
|
|
645
1014
|
* open a bidirectional stream to a peer on a specific ALPN.
|
|
646
1015
|
*
|
|
647
1016
|
* `peer_addr` can be a plain node_id hex string or a full endpoint
|
|
648
|
-
* address JSON (same format as
|
|
1017
|
+
* address JSON (same format as api_request). `alpn` is the protocol
|
|
649
1018
|
* to negotiate (e.g. "iroh/automerge-repo/1").
|
|
650
1019
|
*
|
|
651
1020
|
* returns a BiStream for length-delimited message exchange.
|
|
@@ -661,6 +1030,20 @@ export class MiddenNode {
|
|
|
661
1030
|
const ret = wasm.middennode_open_bi(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
662
1031
|
return ret;
|
|
663
1032
|
}
|
|
1033
|
+
/**
|
|
1034
|
+
* pin a hash so gc won't sweep it (e.g. a paused partial download).
|
|
1035
|
+
* idempotent. pair with unprotect_blob when the partial is resumed to
|
|
1036
|
+
* completion or discarded.
|
|
1037
|
+
* @param {string} blake3_hash
|
|
1038
|
+
*/
|
|
1039
|
+
protect_blob(blake3_hash) {
|
|
1040
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1041
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1042
|
+
const ret = wasm.middennode_protect_blob(this.__wbg_ptr, ptr0, len0);
|
|
1043
|
+
if (ret[1]) {
|
|
1044
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
664
1047
|
/**
|
|
665
1048
|
* dispatch a typed admin command to a peer over the freqhole-admin/1 ALPN.
|
|
666
1049
|
*
|
|
@@ -683,27 +1066,6 @@ export class MiddenNode {
|
|
|
683
1066
|
const ret = wasm.middennode_proxy_admin(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
684
1067
|
return ret;
|
|
685
1068
|
}
|
|
686
|
-
/**
|
|
687
|
-
* send an API request to a peer
|
|
688
|
-
* peer_addr can be plain node_id or full endpoint JSON with relay/IP hints
|
|
689
|
-
* @param {string} peer_addr
|
|
690
|
-
* @param {string} method
|
|
691
|
-
* @param {string} path
|
|
692
|
-
* @param {string | null} [body]
|
|
693
|
-
* @returns {Promise<any>}
|
|
694
|
-
*/
|
|
695
|
-
proxy_request(peer_addr, method, path, body) {
|
|
696
|
-
const ptr0 = passStringToWasm0(peer_addr, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
697
|
-
const len0 = WASM_VECTOR_LEN;
|
|
698
|
-
const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
699
|
-
const len1 = WASM_VECTOR_LEN;
|
|
700
|
-
const ptr2 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
|
-
const len2 = WASM_VECTOR_LEN;
|
|
702
|
-
var ptr3 = isLikeNone(body) ? 0 : passStringToWasm0(body, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
703
|
-
var len3 = WASM_VECTOR_LEN;
|
|
704
|
-
const ret = wasm.middennode_proxy_request(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
705
|
-
return ret;
|
|
706
|
-
}
|
|
707
1069
|
/**
|
|
708
1070
|
* release a blob's TempTag, allowing the store to garbage-collect it.
|
|
709
1071
|
* blake3_hash should be the 64-char hex string returned by import_blob.
|
|
@@ -717,6 +1079,27 @@ export class MiddenNode {
|
|
|
717
1079
|
throw takeFromExternrefTable0(ret[0]);
|
|
718
1080
|
}
|
|
719
1081
|
}
|
|
1082
|
+
/**
|
|
1083
|
+
* PROTOTYPE: restrict a blob (by blake3 hex hash) so only the given
|
|
1084
|
+
* peer node ids may fetch it over the `iroh-blobs/*` ALPN. a hash with
|
|
1085
|
+
* no restriction registered is served to anyone (today's default
|
|
1086
|
+
* behavior, unchanged) — calling this is what opts a specific hash
|
|
1087
|
+
* into gating.
|
|
1088
|
+
*
|
|
1089
|
+
* this is a stopgap/demo hook, not the real canvas-ACL integration: it
|
|
1090
|
+
* has to be called explicitly, from JS, with an already-resolved list
|
|
1091
|
+
* of allowed peer node ids for this one hash.
|
|
1092
|
+
* @param {string} blake3_hash
|
|
1093
|
+
* @param {Array<any>} peer_node_ids
|
|
1094
|
+
*/
|
|
1095
|
+
restrict_blob_to_peers(blake3_hash, peer_node_ids) {
|
|
1096
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1097
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1098
|
+
const ret = wasm.middennode_restrict_blob_to_peers(this.__wbg_ptr, ptr0, len0, peer_node_ids);
|
|
1099
|
+
if (ret[1]) {
|
|
1100
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
720
1103
|
/**
|
|
721
1104
|
* get the secret key bytes for persistence (32 bytes)
|
|
722
1105
|
* store this in IndexedDB to maintain the same identity across sessions
|
|
@@ -746,6 +1129,16 @@ export class MiddenNode {
|
|
|
746
1129
|
start_blob_server() {
|
|
747
1130
|
wasm.middennode_start_blob_server(this.__wbg_ptr);
|
|
748
1131
|
}
|
|
1132
|
+
/**
|
|
1133
|
+
* begin a chunked import — the streaming counterpart to import_blob for
|
|
1134
|
+
* payloads that shouldn't be materialized as one contiguous &[u8] across
|
|
1135
|
+
* the wasm boundary. see ImportSession for the push/finish protocol.
|
|
1136
|
+
* @returns {ImportSession}
|
|
1137
|
+
*/
|
|
1138
|
+
start_import() {
|
|
1139
|
+
const ret = wasm.middennode_start_import(this.__wbg_ptr);
|
|
1140
|
+
return ImportSession.__wrap(ret);
|
|
1141
|
+
}
|
|
749
1142
|
/**
|
|
750
1143
|
* connect to a freqhole radio broadcaster.
|
|
751
1144
|
*
|
|
@@ -775,9 +1168,128 @@ export class MiddenNode {
|
|
|
775
1168
|
const ret = wasm.middennode_tune_radio(this.__wbg_ptr, ptr0, len0, ptr1, len1, on_hello, on_meta, on_chunk);
|
|
776
1169
|
return ret;
|
|
777
1170
|
}
|
|
1171
|
+
/**
|
|
1172
|
+
* remove a gc pin added by protect_blob (or by a cancelled download).
|
|
1173
|
+
* @param {string} blake3_hash
|
|
1174
|
+
*/
|
|
1175
|
+
unprotect_blob(blake3_hash) {
|
|
1176
|
+
const ptr0 = passStringToWasm0(blake3_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1177
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1178
|
+
const ret = wasm.middennode_unprotect_blob(this.__wbg_ptr, ptr0, len0);
|
|
1179
|
+
if (ret[1]) {
|
|
1180
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
778
1183
|
}
|
|
779
1184
|
if (Symbol.dispose) MiddenNode.prototype[Symbol.dispose] = MiddenNode.prototype.free;
|
|
780
1185
|
|
|
1186
|
+
/**
|
|
1187
|
+
* options bag for `MiddenNode::create_with_options`, the single canonical
|
|
1188
|
+
* constructor. build one, set whichever fields are needed, and pass it in:
|
|
1189
|
+
*
|
|
1190
|
+
* ```js
|
|
1191
|
+
* const opts = new MiddenNodeOptions();
|
|
1192
|
+
* opts.opfs_store_dir = "midden-blob-store";
|
|
1193
|
+
* opts.connect_timeout_ms = 5000;
|
|
1194
|
+
* const node = await MiddenNode.create_with_options(opts);
|
|
1195
|
+
* ```
|
|
1196
|
+
*
|
|
1197
|
+
* `create`/`create_from_key`/`create_with_alpns` remain as deprecated
|
|
1198
|
+
* wrappers over this constructor for existing callers (spume, playlistz).
|
|
1199
|
+
*/
|
|
1200
|
+
export class MiddenNodeOptions {
|
|
1201
|
+
__destroy_into_raw() {
|
|
1202
|
+
const ptr = this.__wbg_ptr;
|
|
1203
|
+
this.__wbg_ptr = 0;
|
|
1204
|
+
MiddenNodeOptionsFinalization.unregister(this);
|
|
1205
|
+
return ptr;
|
|
1206
|
+
}
|
|
1207
|
+
free() {
|
|
1208
|
+
const ptr = this.__destroy_into_raw();
|
|
1209
|
+
wasm.__wbg_middennodeoptions_free(ptr, 0);
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* per-dial timeout (ms) for `open_bi`/`connect` (defaults to 10s).
|
|
1213
|
+
* @returns {number | undefined}
|
|
1214
|
+
*/
|
|
1215
|
+
get connect_timeout_ms() {
|
|
1216
|
+
const ret = wasm.middennodeoptions_get_connect_timeout_ms(this.__wbg_ptr);
|
|
1217
|
+
return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* additional ALPN protocols to register beyond the default set.
|
|
1221
|
+
* @returns {string[] | undefined}
|
|
1222
|
+
*/
|
|
1223
|
+
get extra_alpns() {
|
|
1224
|
+
const ret = wasm.middennodeoptions_get_extra_alpns(this.__wbg_ptr);
|
|
1225
|
+
let v1;
|
|
1226
|
+
if (ret[0] !== 0) {
|
|
1227
|
+
v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1228
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1229
|
+
}
|
|
1230
|
+
return v1;
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* when given, blobs persist in an OPFS-backed store under this
|
|
1234
|
+
* directory (worker context required); otherwise (or when OPFS is
|
|
1235
|
+
* unavailable) an in-memory store is used.
|
|
1236
|
+
* @returns {string | undefined}
|
|
1237
|
+
*/
|
|
1238
|
+
get opfs_store_dir() {
|
|
1239
|
+
const ret = wasm.middennodeoptions_get_opfs_store_dir(this.__wbg_ptr);
|
|
1240
|
+
let v1;
|
|
1241
|
+
if (ret[0] !== 0) {
|
|
1242
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
1243
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1244
|
+
}
|
|
1245
|
+
return v1;
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* the node's secret key (32 raw bytes). omit (or pass null/undefined)
|
|
1249
|
+
* to generate a random identity.
|
|
1250
|
+
* @returns {Uint8Array | undefined}
|
|
1251
|
+
*/
|
|
1252
|
+
get secret_key() {
|
|
1253
|
+
const ret = wasm.middennodeoptions_get_secret_key(this.__wbg_ptr);
|
|
1254
|
+
return ret;
|
|
1255
|
+
}
|
|
1256
|
+
constructor() {
|
|
1257
|
+
const ret = wasm.middennodeoptions_new();
|
|
1258
|
+
this.__wbg_ptr = ret;
|
|
1259
|
+
MiddenNodeOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
1260
|
+
return this;
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* @param {number | null} [ms]
|
|
1264
|
+
*/
|
|
1265
|
+
set connect_timeout_ms(ms) {
|
|
1266
|
+
wasm.middennodeoptions_set_connect_timeout_ms(this.__wbg_ptr, isLikeNone(ms) ? Number.MAX_SAFE_INTEGER : (ms) >>> 0);
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* @param {string[] | null} [alpns]
|
|
1270
|
+
*/
|
|
1271
|
+
set extra_alpns(alpns) {
|
|
1272
|
+
var ptr0 = isLikeNone(alpns) ? 0 : passArrayJsValueToWasm0(alpns, wasm.__wbindgen_malloc);
|
|
1273
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1274
|
+
wasm.middennodeoptions_set_extra_alpns(this.__wbg_ptr, ptr0, len0);
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* @param {string | null} [dir]
|
|
1278
|
+
*/
|
|
1279
|
+
set opfs_store_dir(dir) {
|
|
1280
|
+
var ptr0 = isLikeNone(dir) ? 0 : passStringToWasm0(dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1281
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1282
|
+
wasm.middennodeoptions_set_opfs_store_dir(this.__wbg_ptr, ptr0, len0);
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* @param {Uint8Array | null} [key]
|
|
1286
|
+
*/
|
|
1287
|
+
set secret_key(key) {
|
|
1288
|
+
wasm.middennodeoptions_set_secret_key(this.__wbg_ptr, isLikeNone(key) ? 0 : addToExternrefTable0(key));
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
if (Symbol.dispose) MiddenNodeOptions.prototype[Symbol.dispose] = MiddenNodeOptions.prototype.free;
|
|
1292
|
+
|
|
781
1293
|
/**
|
|
782
1294
|
* handle returned to JS for a tuned-in radio session. dropping the handle
|
|
783
1295
|
* (or calling `leave()`) closes the iroh connection, which tears down both
|
|
@@ -785,7 +1297,6 @@ if (Symbol.dispose) MiddenNode.prototype[Symbol.dispose] = MiddenNode.prototype.
|
|
|
785
1297
|
*/
|
|
786
1298
|
export class RadioHandle {
|
|
787
1299
|
static __wrap(ptr) {
|
|
788
|
-
ptr = ptr >>> 0;
|
|
789
1300
|
const obj = Object.create(RadioHandle.prototype);
|
|
790
1301
|
obj.__wbg_ptr = ptr;
|
|
791
1302
|
RadioHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -831,10 +1342,33 @@ export function hash_blake3(data) {
|
|
|
831
1342
|
}
|
|
832
1343
|
}
|
|
833
1344
|
|
|
1345
|
+
/**
|
|
1346
|
+
* opfs store selftest — runs the full import/export round trip against
|
|
1347
|
+
* real OPFS through the real iroh-blobs api. worker context required
|
|
1348
|
+
* (sync access handles). wasm-only debug helper, used for manual
|
|
1349
|
+
* debugging from the blob worker, not from automated tests.
|
|
1350
|
+
* @returns {Promise<string>}
|
|
1351
|
+
*/
|
|
1352
|
+
export function opfs_store_selftest() {
|
|
1353
|
+
const ret = wasm.opfs_store_selftest();
|
|
1354
|
+
return ret;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* persistence selftest: blobs + tags survive a store shutdown/reopen over
|
|
1359
|
+
* the same OPFS directory. worker context required. wasm-only debug
|
|
1360
|
+
* helper, used for manual debugging from the blob worker.
|
|
1361
|
+
* @returns {Promise<string>}
|
|
1362
|
+
*/
|
|
1363
|
+
export function opfs_store_selftest_persistence() {
|
|
1364
|
+
const ret = wasm.opfs_store_selftest_persistence();
|
|
1365
|
+
return ret;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
834
1368
|
export function start() {
|
|
835
1369
|
wasm.start();
|
|
836
1370
|
}
|
|
837
|
-
export function
|
|
1371
|
+
export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
|
|
838
1372
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
839
1373
|
return ret;
|
|
840
1374
|
}
|
|
@@ -845,36 +1379,36 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
|
845
1379
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
846
1380
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
847
1381
|
}
|
|
848
|
-
export function
|
|
1382
|
+
export function __wbg___wbindgen_boolean_get_fa956cfa2d1bd751(arg0) {
|
|
849
1383
|
const v = arg0;
|
|
850
1384
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
851
1385
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
852
1386
|
}
|
|
853
|
-
export function
|
|
1387
|
+
export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
|
|
854
1388
|
const ret = debugString(arg1);
|
|
855
1389
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
856
1390
|
const len1 = WASM_VECTOR_LEN;
|
|
857
1391
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
858
1392
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
859
1393
|
}
|
|
860
|
-
export function
|
|
1394
|
+
export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
|
|
861
1395
|
const ret = typeof(arg0) === 'function';
|
|
862
1396
|
return ret;
|
|
863
1397
|
}
|
|
864
|
-
export function
|
|
1398
|
+
export function __wbg___wbindgen_is_object_a27215656b807791(arg0) {
|
|
865
1399
|
const val = arg0;
|
|
866
1400
|
const ret = typeof(val) === 'object' && val !== null;
|
|
867
1401
|
return ret;
|
|
868
1402
|
}
|
|
869
|
-
export function
|
|
1403
|
+
export function __wbg___wbindgen_is_string_ea5e6cc2e4141dfe(arg0) {
|
|
870
1404
|
const ret = typeof(arg0) === 'string';
|
|
871
1405
|
return ret;
|
|
872
1406
|
}
|
|
873
|
-
export function
|
|
1407
|
+
export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
|
|
874
1408
|
const ret = arg0 === undefined;
|
|
875
1409
|
return ret;
|
|
876
1410
|
}
|
|
877
|
-
export function
|
|
1411
|
+
export function __wbg___wbindgen_string_get_b0ca35b86a603356(arg0, arg1) {
|
|
878
1412
|
const obj = arg1;
|
|
879
1413
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
880
1414
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -882,25 +1416,25 @@ export function __wbg___wbindgen_string_get_395e606bd0ee4427(arg0, arg1) {
|
|
|
882
1416
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
883
1417
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
884
1418
|
}
|
|
885
|
-
export function
|
|
1419
|
+
export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
|
|
886
1420
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
887
1421
|
}
|
|
888
|
-
export function
|
|
1422
|
+
export function __wbg__wbg_cb_unref_fffb441def202758(arg0) {
|
|
889
1423
|
arg0._wbg_cb_unref();
|
|
890
1424
|
}
|
|
891
|
-
export function
|
|
1425
|
+
export function __wbg_abort_8bae0f33e7833997(arg0) {
|
|
892
1426
|
arg0.abort();
|
|
893
1427
|
}
|
|
894
|
-
export function
|
|
1428
|
+
export function __wbg_abort_eee9248a6d680839(arg0, arg1) {
|
|
895
1429
|
arg0.abort(arg1);
|
|
896
1430
|
}
|
|
897
|
-
export function
|
|
1431
|
+
export function __wbg_addEventListener_c33b246adf950d7c() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
898
1432
|
arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
899
1433
|
}, arguments); }
|
|
900
|
-
export function
|
|
1434
|
+
export function __wbg_append_01c74e5c6b58aa64() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
901
1435
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
902
1436
|
}, arguments); }
|
|
903
|
-
export function
|
|
1437
|
+
export function __wbg_arrayBuffer_3b637f0fa65c5351() { return handleError(function (arg0) {
|
|
904
1438
|
const ret = arg0.arrayBuffer();
|
|
905
1439
|
return ret;
|
|
906
1440
|
}, arguments); }
|
|
@@ -908,75 +1442,86 @@ export function __wbg_bistream_new(arg0) {
|
|
|
908
1442
|
const ret = BiStream.__wrap(arg0);
|
|
909
1443
|
return ret;
|
|
910
1444
|
}
|
|
911
|
-
export function
|
|
1445
|
+
export function __wbg_body_18c9f2ac15ead4b2(arg0) {
|
|
912
1446
|
const ret = arg0.body;
|
|
913
1447
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
914
1448
|
}
|
|
915
|
-
export function
|
|
1449
|
+
export function __wbg_buffer_54b87055582c8a81(arg0) {
|
|
916
1450
|
const ret = arg0.buffer;
|
|
917
1451
|
return ret;
|
|
918
1452
|
}
|
|
919
|
-
export function
|
|
1453
|
+
export function __wbg_byobRequest_06b654bb15590436(arg0) {
|
|
920
1454
|
const ret = arg0.byobRequest;
|
|
921
1455
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
922
1456
|
}
|
|
923
|
-
export function
|
|
1457
|
+
export function __wbg_byteLength_41862ca4020b9c43(arg0) {
|
|
924
1458
|
const ret = arg0.byteLength;
|
|
925
1459
|
return ret;
|
|
926
1460
|
}
|
|
927
|
-
export function
|
|
1461
|
+
export function __wbg_byteOffset_d42e18c4441f628b(arg0) {
|
|
928
1462
|
const ret = arg0.byteOffset;
|
|
929
1463
|
return ret;
|
|
930
1464
|
}
|
|
931
|
-
export function
|
|
932
|
-
const ret = arg0.call(arg1, arg2);
|
|
1465
|
+
export function __wbg_call_44b7209e1e252e6a() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1466
|
+
const ret = arg0.call(arg1, arg2, arg3, arg4);
|
|
933
1467
|
return ret;
|
|
934
1468
|
}, arguments); }
|
|
935
|
-
export function
|
|
936
|
-
const ret = arg0.call(arg1
|
|
1469
|
+
export function __wbg_call_8a2dd23819f8a60a() { return handleError(function (arg0, arg1) {
|
|
1470
|
+
const ret = arg0.call(arg1);
|
|
937
1471
|
return ret;
|
|
938
1472
|
}, arguments); }
|
|
939
|
-
export function
|
|
940
|
-
const ret = arg0.call(arg1, arg2
|
|
1473
|
+
export function __wbg_call_a6e5c5dce5018821() { return handleError(function (arg0, arg1, arg2) {
|
|
1474
|
+
const ret = arg0.call(arg1, arg2);
|
|
941
1475
|
return ret;
|
|
942
1476
|
}, arguments); }
|
|
943
|
-
export function
|
|
1477
|
+
export function __wbg_call_e3b662382210db98() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1478
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
1479
|
+
return ret;
|
|
1480
|
+
}, arguments); }
|
|
1481
|
+
export function __wbg_cancel_3983a93e24cc66b3(arg0) {
|
|
944
1482
|
const ret = arg0.cancel();
|
|
945
1483
|
return ret;
|
|
946
1484
|
}
|
|
947
|
-
export function
|
|
1485
|
+
export function __wbg_catch_c1a60df4c30d76d3(arg0, arg1) {
|
|
948
1486
|
const ret = arg0.catch(arg1);
|
|
949
1487
|
return ret;
|
|
950
1488
|
}
|
|
951
|
-
export function
|
|
1489
|
+
export function __wbg_clearTimeout_333bba87532ab9d3(arg0) {
|
|
952
1490
|
const ret = clearTimeout(arg0);
|
|
953
1491
|
return ret;
|
|
954
1492
|
}
|
|
955
1493
|
export function __wbg_clearTimeout_47a40e3be01ed7a3() { return handleError(function (arg0, arg1) {
|
|
956
1494
|
arg0.clearTimeout(arg1);
|
|
957
1495
|
}, arguments); }
|
|
958
|
-
export function
|
|
1496
|
+
export function __wbg_close_249a23304523681b() { return handleError(function (arg0) {
|
|
959
1497
|
arg0.close();
|
|
960
1498
|
}, arguments); }
|
|
961
|
-
export function
|
|
1499
|
+
export function __wbg_close_72d318d9c16e83ef() { return handleError(function (arg0) {
|
|
962
1500
|
arg0.close();
|
|
963
1501
|
}, arguments); }
|
|
964
|
-
export function
|
|
1502
|
+
export function __wbg_close_c65ca0257e895318() { return handleError(function (arg0) {
|
|
965
1503
|
arg0.close();
|
|
966
1504
|
}, arguments); }
|
|
967
|
-
export function
|
|
1505
|
+
export function __wbg_close_d00f4cb641f9db10(arg0) {
|
|
1506
|
+
arg0.close();
|
|
1507
|
+
}
|
|
1508
|
+
export function __wbg_code_1fc52b4142a112ac(arg0) {
|
|
968
1509
|
const ret = arg0.code;
|
|
969
1510
|
return ret;
|
|
970
1511
|
}
|
|
971
|
-
export function
|
|
1512
|
+
export function __wbg_code_cb4327cfc515673b(arg0) {
|
|
972
1513
|
const ret = arg0.code;
|
|
973
1514
|
return ret;
|
|
974
1515
|
}
|
|
1516
|
+
export function __wbg_createSyncAccessHandle_0caafebe31e4f2d9(arg0) {
|
|
1517
|
+
const ret = arg0.createSyncAccessHandle();
|
|
1518
|
+
return ret;
|
|
1519
|
+
}
|
|
975
1520
|
export function __wbg_crypto_38df2bab126b63dc(arg0) {
|
|
976
1521
|
const ret = arg0.crypto;
|
|
977
1522
|
return ret;
|
|
978
1523
|
}
|
|
979
|
-
export function
|
|
1524
|
+
export function __wbg_data_328de4280640da92(arg0) {
|
|
980
1525
|
const ret = arg0.data;
|
|
981
1526
|
return ret;
|
|
982
1527
|
}
|
|
@@ -985,14 +1530,14 @@ export function __wbg_debug_eaef3b49d572d680(arg0, arg1) {
|
|
|
985
1530
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
986
1531
|
console.debug(...v0);
|
|
987
1532
|
}
|
|
988
|
-
export function
|
|
1533
|
+
export function __wbg_done_89b2b13e91a60321(arg0) {
|
|
989
1534
|
const ret = arg0.done;
|
|
990
1535
|
return ret;
|
|
991
1536
|
}
|
|
992
|
-
export function
|
|
1537
|
+
export function __wbg_enqueue_6d83b4c6281bafd6() { return handleError(function (arg0, arg1) {
|
|
993
1538
|
arg0.enqueue(arg1);
|
|
994
1539
|
}, arguments); }
|
|
995
|
-
export function
|
|
1540
|
+
export function __wbg_entries_900cefd6f70eb290(arg0) {
|
|
996
1541
|
const ret = arg0.entries();
|
|
997
1542
|
return ret;
|
|
998
1543
|
}
|
|
@@ -1012,45 +1557,64 @@ export function __wbg_error_a6fa202b58aa1cd3(arg0, arg1) {
|
|
|
1012
1557
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1013
1558
|
}
|
|
1014
1559
|
}
|
|
1015
|
-
export function
|
|
1560
|
+
export function __wbg_fetch_074561c3e313c86f(arg0) {
|
|
1016
1561
|
const ret = fetch(arg0);
|
|
1017
1562
|
return ret;
|
|
1018
1563
|
}
|
|
1019
|
-
export function
|
|
1564
|
+
export function __wbg_fetch_b5951fc96f52f786(arg0, arg1) {
|
|
1020
1565
|
const ret = arg0.fetch(arg1);
|
|
1021
1566
|
return ret;
|
|
1022
1567
|
}
|
|
1023
|
-
export function
|
|
1024
|
-
|
|
1568
|
+
export function __wbg_flush_a4bd8d4e05ad23f6() { return handleError(function (arg0) {
|
|
1569
|
+
arg0.flush();
|
|
1025
1570
|
}, arguments); }
|
|
1571
|
+
export function __wbg_getDirectoryHandle_cf175faf1a75a384(arg0, arg1, arg2, arg3) {
|
|
1572
|
+
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
1573
|
+
return ret;
|
|
1574
|
+
}
|
|
1575
|
+
export function __wbg_getDirectory_389283588dfb8117(arg0) {
|
|
1576
|
+
const ret = arg0.getDirectory();
|
|
1577
|
+
return ret;
|
|
1578
|
+
}
|
|
1579
|
+
export function __wbg_getFileHandle_72de55ab3ca9ad57(arg0, arg1, arg2, arg3) {
|
|
1580
|
+
const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
1581
|
+
return ret;
|
|
1582
|
+
}
|
|
1026
1583
|
export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
|
|
1027
1584
|
arg0.getRandomValues(arg1);
|
|
1028
1585
|
}, arguments); }
|
|
1586
|
+
export function __wbg_getRandomValues_cc7f052a444bb2ce() { return handleError(function (arg0, arg1) {
|
|
1587
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1588
|
+
}, arguments); }
|
|
1029
1589
|
export function __wbg_getReader_9facd4f899beac89() { return handleError(function (arg0) {
|
|
1030
1590
|
const ret = arg0.getReader();
|
|
1031
1591
|
return ret;
|
|
1032
1592
|
}, arguments); }
|
|
1033
|
-
export function
|
|
1034
|
-
const ret =
|
|
1593
|
+
export function __wbg_getSize_29187e13478442fb() { return handleError(function (arg0) {
|
|
1594
|
+
const ret = arg0.getSize();
|
|
1035
1595
|
return ret;
|
|
1036
1596
|
}, arguments); }
|
|
1037
|
-
export function
|
|
1597
|
+
export function __wbg_get_507a50627bffa49b(arg0, arg1) {
|
|
1038
1598
|
const ret = arg0[arg1 >>> 0];
|
|
1039
1599
|
return ret;
|
|
1040
1600
|
}
|
|
1041
|
-
export function
|
|
1601
|
+
export function __wbg_get_78f252d074a84d0b() { return handleError(function (arg0, arg1) {
|
|
1602
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1603
|
+
return ret;
|
|
1604
|
+
}, arguments); }
|
|
1605
|
+
export function __wbg_get_done_670108eb06ecbe46(arg0) {
|
|
1042
1606
|
const ret = arg0.done;
|
|
1043
1607
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1044
1608
|
}
|
|
1045
|
-
export function
|
|
1609
|
+
export function __wbg_get_value_f465f5be30aa0963(arg0) {
|
|
1046
1610
|
const ret = arg0.value;
|
|
1047
1611
|
return ret;
|
|
1048
1612
|
}
|
|
1049
|
-
export function
|
|
1613
|
+
export function __wbg_has_8374cf06984d8bfc() { return handleError(function (arg0, arg1) {
|
|
1050
1614
|
const ret = Reflect.has(arg0, arg1);
|
|
1051
1615
|
return ret;
|
|
1052
1616
|
}, arguments); }
|
|
1053
|
-
export function
|
|
1617
|
+
export function __wbg_headers_cf9c80f30e2a4eff(arg0) {
|
|
1054
1618
|
const ret = arg0.headers;
|
|
1055
1619
|
return ret;
|
|
1056
1620
|
}
|
|
@@ -1058,7 +1622,7 @@ export function __wbg_helloimageresult_new(arg0) {
|
|
|
1058
1622
|
const ret = HelloImageResult.__wrap(arg0);
|
|
1059
1623
|
return ret;
|
|
1060
1624
|
}
|
|
1061
|
-
export function
|
|
1625
|
+
export function __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb(arg0) {
|
|
1062
1626
|
let result;
|
|
1063
1627
|
try {
|
|
1064
1628
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -1068,7 +1632,7 @@ export function __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6(arg0) {
|
|
|
1068
1632
|
const ret = result;
|
|
1069
1633
|
return ret;
|
|
1070
1634
|
}
|
|
1071
|
-
export function
|
|
1635
|
+
export function __wbg_instanceof_Blob_c6523f92a32c8695(arg0) {
|
|
1072
1636
|
let result;
|
|
1073
1637
|
try {
|
|
1074
1638
|
result = arg0 instanceof Blob;
|
|
@@ -1078,7 +1642,37 @@ export function __wbg_instanceof_Blob_c91af000f11c2d0b(arg0) {
|
|
|
1078
1642
|
const ret = result;
|
|
1079
1643
|
return ret;
|
|
1080
1644
|
}
|
|
1081
|
-
export function
|
|
1645
|
+
export function __wbg_instanceof_FileSystemDirectoryHandle_c9ab7c5cdb7a7c30(arg0) {
|
|
1646
|
+
let result;
|
|
1647
|
+
try {
|
|
1648
|
+
result = arg0 instanceof FileSystemDirectoryHandle;
|
|
1649
|
+
} catch (_) {
|
|
1650
|
+
result = false;
|
|
1651
|
+
}
|
|
1652
|
+
const ret = result;
|
|
1653
|
+
return ret;
|
|
1654
|
+
}
|
|
1655
|
+
export function __wbg_instanceof_FileSystemFileHandle_68e80b30532d5f04(arg0) {
|
|
1656
|
+
let result;
|
|
1657
|
+
try {
|
|
1658
|
+
result = arg0 instanceof FileSystemFileHandle;
|
|
1659
|
+
} catch (_) {
|
|
1660
|
+
result = false;
|
|
1661
|
+
}
|
|
1662
|
+
const ret = result;
|
|
1663
|
+
return ret;
|
|
1664
|
+
}
|
|
1665
|
+
export function __wbg_instanceof_FileSystemSyncAccessHandle_db0b7504516129c1(arg0) {
|
|
1666
|
+
let result;
|
|
1667
|
+
try {
|
|
1668
|
+
result = arg0 instanceof FileSystemSyncAccessHandle;
|
|
1669
|
+
} catch (_) {
|
|
1670
|
+
result = false;
|
|
1671
|
+
}
|
|
1672
|
+
const ret = result;
|
|
1673
|
+
return ret;
|
|
1674
|
+
}
|
|
1675
|
+
export function __wbg_instanceof_Response_c8b64b2256f01bec(arg0) {
|
|
1082
1676
|
let result;
|
|
1083
1677
|
try {
|
|
1084
1678
|
result = arg0 instanceof Response;
|
|
@@ -1088,15 +1682,35 @@ export function __wbg_instanceof_Response_9b4d9fd451e051b1(arg0) {
|
|
|
1088
1682
|
const ret = result;
|
|
1089
1683
|
return ret;
|
|
1090
1684
|
}
|
|
1091
|
-
export function
|
|
1685
|
+
export function __wbg_instanceof_Window_05ba1ee4f6781663(arg0) {
|
|
1686
|
+
let result;
|
|
1687
|
+
try {
|
|
1688
|
+
result = arg0 instanceof Window;
|
|
1689
|
+
} catch (_) {
|
|
1690
|
+
result = false;
|
|
1691
|
+
}
|
|
1692
|
+
const ret = result;
|
|
1693
|
+
return ret;
|
|
1694
|
+
}
|
|
1695
|
+
export function __wbg_instanceof_WorkerGlobalScope_8ec07b5e040a41c3(arg0) {
|
|
1696
|
+
let result;
|
|
1697
|
+
try {
|
|
1698
|
+
result = arg0 instanceof WorkerGlobalScope;
|
|
1699
|
+
} catch (_) {
|
|
1700
|
+
result = false;
|
|
1701
|
+
}
|
|
1702
|
+
const ret = result;
|
|
1703
|
+
return ret;
|
|
1704
|
+
}
|
|
1705
|
+
export function __wbg_isArray_0677c962b281d01a(arg0) {
|
|
1092
1706
|
const ret = Array.isArray(arg0);
|
|
1093
1707
|
return ret;
|
|
1094
1708
|
}
|
|
1095
|
-
export function
|
|
1709
|
+
export function __wbg_length_1f0964f4a5e2c6d8(arg0) {
|
|
1096
1710
|
const ret = arg0.length;
|
|
1097
1711
|
return ret;
|
|
1098
1712
|
}
|
|
1099
|
-
export function
|
|
1713
|
+
export function __wbg_length_370319915dc99107(arg0) {
|
|
1100
1714
|
const ret = arg0.length;
|
|
1101
1715
|
return ret;
|
|
1102
1716
|
}
|
|
@@ -1105,7 +1719,7 @@ export function __wbg_log_7a0760e115750083(arg0, arg1) {
|
|
|
1105
1719
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1106
1720
|
console.log(...v0);
|
|
1107
1721
|
}
|
|
1108
|
-
export function
|
|
1722
|
+
export function __wbg_message_fb0e6e7854e6ea7a(arg0, arg1) {
|
|
1109
1723
|
const ret = arg1.message;
|
|
1110
1724
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1111
1725
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -1120,7 +1734,15 @@ export function __wbg_msCrypto_bd5a034af96bcba6(arg0) {
|
|
|
1120
1734
|
const ret = arg0.msCrypto;
|
|
1121
1735
|
return ret;
|
|
1122
1736
|
}
|
|
1123
|
-
export function
|
|
1737
|
+
export function __wbg_navigator_51379c10a84aeec9(arg0) {
|
|
1738
|
+
const ret = arg0.navigator;
|
|
1739
|
+
return ret;
|
|
1740
|
+
}
|
|
1741
|
+
export function __wbg_navigator_99621db14b3f1099(arg0) {
|
|
1742
|
+
const ret = arg0.navigator;
|
|
1743
|
+
return ret;
|
|
1744
|
+
}
|
|
1745
|
+
export function __wbg_new_0d809930cd1354c6() { return handleError(function () {
|
|
1124
1746
|
const ret = new Headers();
|
|
1125
1747
|
return ret;
|
|
1126
1748
|
}, arguments); }
|
|
@@ -1128,46 +1750,46 @@ export function __wbg_new_227d7c05414eb861() {
|
|
|
1128
1750
|
const ret = new Error();
|
|
1129
1751
|
return ret;
|
|
1130
1752
|
}
|
|
1131
|
-
export function
|
|
1132
|
-
const ret = new Map();
|
|
1133
|
-
return ret;
|
|
1134
|
-
}
|
|
1135
|
-
export function __wbg_new_5f486cdf45a04d78(arg0) {
|
|
1136
|
-
const ret = new Uint8Array(arg0);
|
|
1137
|
-
return ret;
|
|
1138
|
-
}
|
|
1139
|
-
export function __wbg_new_a70fbab9066b301f() {
|
|
1753
|
+
export function __wbg_new_32b398fb48b6d94a() {
|
|
1140
1754
|
const ret = new Array();
|
|
1141
1755
|
return ret;
|
|
1142
1756
|
}
|
|
1143
|
-
export function
|
|
1144
|
-
const ret = new Object();
|
|
1145
|
-
return ret;
|
|
1146
|
-
}
|
|
1147
|
-
export function __wbg_new_c518c60af666645b() { return handleError(function () {
|
|
1757
|
+
export function __wbg_new_4339b2a2675a03e3() { return handleError(function () {
|
|
1148
1758
|
const ret = new AbortController();
|
|
1149
1759
|
return ret;
|
|
1150
1760
|
}, arguments); }
|
|
1151
|
-
export function
|
|
1761
|
+
export function __wbg_new_7796ffc7ed656783() {
|
|
1762
|
+
const ret = new Map();
|
|
1763
|
+
return ret;
|
|
1764
|
+
}
|
|
1765
|
+
export function __wbg_new_b667d279fd5aa943(arg0, arg1) {
|
|
1152
1766
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1153
1767
|
return ret;
|
|
1154
1768
|
}
|
|
1155
|
-
export function
|
|
1769
|
+
export function __wbg_new_bf8729ffe10e9ee7() { return handleError(function (arg0, arg1) {
|
|
1156
1770
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
1157
1771
|
return ret;
|
|
1158
1772
|
}, arguments); }
|
|
1159
|
-
export function
|
|
1773
|
+
export function __wbg_new_cd45aabdf6073e84(arg0) {
|
|
1774
|
+
const ret = new Uint8Array(arg0);
|
|
1775
|
+
return ret;
|
|
1776
|
+
}
|
|
1777
|
+
export function __wbg_new_da52cf8fe3429cb2() {
|
|
1778
|
+
const ret = new Object();
|
|
1779
|
+
return ret;
|
|
1780
|
+
}
|
|
1781
|
+
export function __wbg_new_from_slice_77cdfb7977362f3c(arg0, arg1) {
|
|
1160
1782
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1161
1783
|
return ret;
|
|
1162
1784
|
}
|
|
1163
|
-
export function
|
|
1785
|
+
export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
|
|
1164
1786
|
try {
|
|
1165
1787
|
var state0 = {a: arg0, b: arg1};
|
|
1166
1788
|
var cb0 = (arg0, arg1) => {
|
|
1167
1789
|
const a = state0.a;
|
|
1168
1790
|
state0.a = 0;
|
|
1169
1791
|
try {
|
|
1170
|
-
return
|
|
1792
|
+
return wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1171
1793
|
} finally {
|
|
1172
1794
|
state0.a = a;
|
|
1173
1795
|
}
|
|
@@ -1175,26 +1797,26 @@ export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
|
|
|
1175
1797
|
const ret = new Promise(cb0);
|
|
1176
1798
|
return ret;
|
|
1177
1799
|
} finally {
|
|
1178
|
-
state0.a =
|
|
1800
|
+
state0.a = 0;
|
|
1179
1801
|
}
|
|
1180
1802
|
}
|
|
1181
|
-
export function
|
|
1803
|
+
export function __wbg_new_with_byte_offset_and_length_54c7724ee3ec7d82(arg0, arg1, arg2) {
|
|
1182
1804
|
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1183
1805
|
return ret;
|
|
1184
1806
|
}
|
|
1185
|
-
export function
|
|
1807
|
+
export function __wbg_new_with_length_e6785c33c8e4cce8(arg0) {
|
|
1186
1808
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1187
1809
|
return ret;
|
|
1188
1810
|
}
|
|
1189
|
-
export function
|
|
1811
|
+
export function __wbg_new_with_str_and_init_d95cbe11ce28e65e() { return handleError(function (arg0, arg1, arg2) {
|
|
1190
1812
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1191
1813
|
return ret;
|
|
1192
1814
|
}, arguments); }
|
|
1193
|
-
export function
|
|
1815
|
+
export function __wbg_new_with_str_sequence_2de2f569c29910ad() { return handleError(function (arg0, arg1, arg2) {
|
|
1194
1816
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
1195
1817
|
return ret;
|
|
1196
1818
|
}, arguments); }
|
|
1197
|
-
export function
|
|
1819
|
+
export function __wbg_next_71f2aa1cb3d1e37e() { return handleError(function (arg0) {
|
|
1198
1820
|
const ret = arg0.next();
|
|
1199
1821
|
return ret;
|
|
1200
1822
|
}, arguments); }
|
|
@@ -1202,7 +1824,7 @@ export function __wbg_node_84ea875411254db1(arg0) {
|
|
|
1202
1824
|
const ret = arg0.node;
|
|
1203
1825
|
return ret;
|
|
1204
1826
|
}
|
|
1205
|
-
export function
|
|
1827
|
+
export function __wbg_now_86c0d4ba3fa605b8() {
|
|
1206
1828
|
const ret = Date.now();
|
|
1207
1829
|
return ret;
|
|
1208
1830
|
}
|
|
@@ -1218,25 +1840,25 @@ export function __wbg_process_44c7a14e11e9f69e(arg0) {
|
|
|
1218
1840
|
const ret = arg0.process;
|
|
1219
1841
|
return ret;
|
|
1220
1842
|
}
|
|
1221
|
-
export function
|
|
1843
|
+
export function __wbg_protocol_14b3b1c4bf71cd4a(arg0, arg1) {
|
|
1222
1844
|
const ret = arg1.protocol;
|
|
1223
1845
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1224
1846
|
const len1 = WASM_VECTOR_LEN;
|
|
1225
1847
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1226
1848
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1227
1849
|
}
|
|
1228
|
-
export function
|
|
1850
|
+
export function __wbg_prototypesetcall_4770620bbe4688a0(arg0, arg1, arg2) {
|
|
1229
1851
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1230
1852
|
}
|
|
1231
|
-
export function
|
|
1853
|
+
export function __wbg_push_d2ae3af0c1217ae6(arg0, arg1) {
|
|
1232
1854
|
const ret = arg0.push(arg1);
|
|
1233
1855
|
return ret;
|
|
1234
1856
|
}
|
|
1235
|
-
export function
|
|
1857
|
+
export function __wbg_queueMicrotask_0ab5b2d2393e99b9(arg0) {
|
|
1236
1858
|
const ret = arg0.queueMicrotask;
|
|
1237
1859
|
return ret;
|
|
1238
1860
|
}
|
|
1239
|
-
export function
|
|
1861
|
+
export function __wbg_queueMicrotask_6a09b7bc46549209(arg0) {
|
|
1240
1862
|
queueMicrotask(arg0);
|
|
1241
1863
|
}
|
|
1242
1864
|
export function __wbg_radiohandle_new(arg0) {
|
|
@@ -1246,109 +1868,130 @@ export function __wbg_radiohandle_new(arg0) {
|
|
|
1246
1868
|
export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
|
|
1247
1869
|
arg0.randomFillSync(arg1);
|
|
1248
1870
|
}, arguments); }
|
|
1249
|
-
export function
|
|
1871
|
+
export function __wbg_random_039a7d5d06e0d333() {
|
|
1872
|
+
const ret = Math.random();
|
|
1873
|
+
return ret;
|
|
1874
|
+
}
|
|
1875
|
+
export function __wbg_read_27d98fb08886b1fc() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1876
|
+
const ret = arg0.read(getArrayU8FromWasm0(arg1, arg2), arg3);
|
|
1877
|
+
return ret;
|
|
1878
|
+
}, arguments); }
|
|
1879
|
+
export function __wbg_read_8afa15f12a160ef8(arg0) {
|
|
1250
1880
|
const ret = arg0.read();
|
|
1251
1881
|
return ret;
|
|
1252
1882
|
}
|
|
1253
|
-
export function
|
|
1883
|
+
export function __wbg_readyState_50bc38c2a9e83db6(arg0) {
|
|
1254
1884
|
const ret = arg0.readyState;
|
|
1255
1885
|
return ret;
|
|
1256
1886
|
}
|
|
1257
|
-
export function
|
|
1887
|
+
export function __wbg_reason_5dc8e429d537d6a9(arg0, arg1) {
|
|
1258
1888
|
const ret = arg1.reason;
|
|
1259
1889
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1260
1890
|
const len1 = WASM_VECTOR_LEN;
|
|
1261
1891
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1262
1892
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1263
1893
|
}
|
|
1264
|
-
export function
|
|
1894
|
+
export function __wbg_releaseLock_5b92874cad775644(arg0) {
|
|
1265
1895
|
arg0.releaseLock();
|
|
1266
1896
|
}
|
|
1267
|
-
export function
|
|
1897
|
+
export function __wbg_removeEntry_e38219fa4a98cfb3(arg0, arg1, arg2) {
|
|
1898
|
+
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
1899
|
+
return ret;
|
|
1900
|
+
}
|
|
1901
|
+
export function __wbg_removeEventListener_eb8291c80ca9056d() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1268
1902
|
arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
1269
1903
|
}, arguments); }
|
|
1270
1904
|
export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function () {
|
|
1271
1905
|
const ret = module.require;
|
|
1272
1906
|
return ret;
|
|
1273
1907
|
}, arguments); }
|
|
1274
|
-
export function
|
|
1908
|
+
export function __wbg_resolve_2191a4dfe481c25b(arg0) {
|
|
1275
1909
|
const ret = Promise.resolve(arg0);
|
|
1276
1910
|
return ret;
|
|
1277
1911
|
}
|
|
1278
|
-
export function
|
|
1912
|
+
export function __wbg_respond_510e32df8aeb6817() { return handleError(function (arg0, arg1) {
|
|
1279
1913
|
arg0.respond(arg1 >>> 0);
|
|
1280
1914
|
}, arguments); }
|
|
1281
|
-
export function
|
|
1282
|
-
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
1283
|
-
}, arguments); }
|
|
1284
|
-
export function __wbg_send_d31a693c975dea74() { return handleError(function (arg0, arg1, arg2) {
|
|
1915
|
+
export function __wbg_send_a321b376d40ec867() { return handleError(function (arg0, arg1, arg2) {
|
|
1285
1916
|
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
1286
1917
|
}, arguments); }
|
|
1918
|
+
export function __wbg_send_df98dd5ede9b3f4d() { return handleError(function (arg0, arg1, arg2) {
|
|
1919
|
+
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
1920
|
+
}, arguments); }
|
|
1921
|
+
export function __wbg_setTimeout_3a808dd861dd3c12(arg0, arg1) {
|
|
1922
|
+
const ret = setTimeout(arg0, arg1);
|
|
1923
|
+
return ret;
|
|
1924
|
+
}
|
|
1287
1925
|
export function __wbg_setTimeout_6613a51400c1bf9f() { return handleError(function (arg0, arg1, arg2) {
|
|
1288
1926
|
const ret = arg0.setTimeout(arg1, arg2);
|
|
1289
1927
|
return ret;
|
|
1290
1928
|
}, arguments); }
|
|
1291
|
-
export function
|
|
1292
|
-
|
|
1293
|
-
return ret;
|
|
1929
|
+
export function __wbg_set_4d7dd76f3dae2926(arg0, arg1, arg2) {
|
|
1930
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
1294
1931
|
}
|
|
1295
|
-
export function
|
|
1296
|
-
|
|
1932
|
+
export function __wbg_set_575dd786d51585f8(arg0, arg1, arg2) {
|
|
1933
|
+
const ret = arg0.set(arg1, arg2);
|
|
1934
|
+
return ret;
|
|
1297
1935
|
}
|
|
1298
1936
|
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1299
1937
|
arg0[arg1] = arg2;
|
|
1300
1938
|
}
|
|
1301
|
-
export function
|
|
1939
|
+
export function __wbg_set_8535240470bf2500() { return handleError(function (arg0, arg1, arg2) {
|
|
1302
1940
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1303
1941
|
return ret;
|
|
1304
1942
|
}, arguments); }
|
|
1305
|
-
export function
|
|
1306
|
-
arg0
|
|
1943
|
+
export function __wbg_set_8a16b38e4805b298(arg0, arg1, arg2) {
|
|
1944
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1307
1945
|
}
|
|
1308
|
-
export function
|
|
1309
|
-
|
|
1310
|
-
return ret;
|
|
1946
|
+
export function __wbg_set_at_674f6538cd77adef(arg0, arg1) {
|
|
1947
|
+
arg0.at = arg1;
|
|
1311
1948
|
}
|
|
1312
|
-
export function
|
|
1949
|
+
export function __wbg_set_binaryType_a37b086c78ca7c29(arg0, arg1) {
|
|
1313
1950
|
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
1314
1951
|
}
|
|
1315
|
-
export function
|
|
1952
|
+
export function __wbg_set_body_029f2d171e0a005f(arg0, arg1) {
|
|
1316
1953
|
arg0.body = arg1;
|
|
1317
1954
|
}
|
|
1318
|
-
export function
|
|
1955
|
+
export function __wbg_set_cache_b4a740b195c051f4(arg0, arg1) {
|
|
1319
1956
|
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1320
1957
|
}
|
|
1321
|
-
export function
|
|
1958
|
+
export function __wbg_set_create_a807a6e9ac628698(arg0, arg1) {
|
|
1959
|
+
arg0.create = arg1 !== 0;
|
|
1960
|
+
}
|
|
1961
|
+
export function __wbg_set_create_fa1dfa475fac91e9(arg0, arg1) {
|
|
1962
|
+
arg0.create = arg1 !== 0;
|
|
1963
|
+
}
|
|
1964
|
+
export function __wbg_set_credentials_bb34a40189e3b43b(arg0, arg1) {
|
|
1322
1965
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1323
1966
|
}
|
|
1324
|
-
export function
|
|
1967
|
+
export function __wbg_set_handle_event_dd6bc370a8cb4486(arg0, arg1) {
|
|
1325
1968
|
arg0.handleEvent = arg1;
|
|
1326
1969
|
}
|
|
1327
|
-
export function
|
|
1970
|
+
export function __wbg_set_headers_9c61d123c3ee1f10(arg0, arg1) {
|
|
1328
1971
|
arg0.headers = arg1;
|
|
1329
1972
|
}
|
|
1330
|
-
export function
|
|
1973
|
+
export function __wbg_set_method_5532d59b92d76467(arg0, arg1, arg2) {
|
|
1331
1974
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1332
1975
|
}
|
|
1333
|
-
export function
|
|
1976
|
+
export function __wbg_set_mode_66c79886ad78fc05(arg0, arg1) {
|
|
1334
1977
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1335
1978
|
}
|
|
1336
|
-
export function
|
|
1979
|
+
export function __wbg_set_onclose_f706475385ecce07(arg0, arg1) {
|
|
1337
1980
|
arg0.onclose = arg1;
|
|
1338
1981
|
}
|
|
1339
|
-
export function
|
|
1982
|
+
export function __wbg_set_onerror_9f5773fd31512333(arg0, arg1) {
|
|
1340
1983
|
arg0.onerror = arg1;
|
|
1341
1984
|
}
|
|
1342
|
-
export function
|
|
1985
|
+
export function __wbg_set_onmessage_836d2f72130b4706(arg0, arg1) {
|
|
1343
1986
|
arg0.onmessage = arg1;
|
|
1344
1987
|
}
|
|
1345
|
-
export function
|
|
1988
|
+
export function __wbg_set_onopen_4f65470ae522a61a(arg0, arg1) {
|
|
1346
1989
|
arg0.onopen = arg1;
|
|
1347
1990
|
}
|
|
1348
|
-
export function
|
|
1991
|
+
export function __wbg_set_signal_c4ef8faddb4c1446(arg0, arg1) {
|
|
1349
1992
|
arg0.signal = arg1;
|
|
1350
1993
|
}
|
|
1351
|
-
export function
|
|
1994
|
+
export function __wbg_signal_dad7cb35193abd31(arg0) {
|
|
1352
1995
|
const ret = arg0.signal;
|
|
1353
1996
|
return ret;
|
|
1354
1997
|
}
|
|
@@ -1359,53 +2002,64 @@ export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
|
|
|
1359
2002
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1360
2003
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1361
2004
|
}
|
|
1362
|
-
export function
|
|
2005
|
+
export function __wbg_static_accessor_GLOBAL_4ef717fb391d88b7() {
|
|
1363
2006
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1364
2007
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1365
2008
|
}
|
|
1366
|
-
export function
|
|
2009
|
+
export function __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4() {
|
|
1367
2010
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1368
2011
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1369
2012
|
}
|
|
1370
|
-
export function
|
|
2013
|
+
export function __wbg_static_accessor_SELF_146583524fe1469b() {
|
|
1371
2014
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1372
2015
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1373
2016
|
}
|
|
1374
|
-
export function
|
|
2017
|
+
export function __wbg_static_accessor_WINDOW_f2829a2234d7819e() {
|
|
1375
2018
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1376
2019
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1377
2020
|
}
|
|
1378
|
-
export function
|
|
2021
|
+
export function __wbg_status_c45b3b9b3033184a(arg0) {
|
|
1379
2022
|
const ret = arg0.status;
|
|
1380
2023
|
return ret;
|
|
1381
2024
|
}
|
|
1382
|
-
export function
|
|
1383
|
-
const ret = arg0.
|
|
2025
|
+
export function __wbg_storage_3c893ad40b9e831e(arg0) {
|
|
2026
|
+
const ret = arg0.storage;
|
|
1384
2027
|
return ret;
|
|
1385
2028
|
}
|
|
1386
|
-
export function
|
|
1387
|
-
const ret = arg0.
|
|
2029
|
+
export function __wbg_storage_756400487605531a(arg0) {
|
|
2030
|
+
const ret = arg0.storage;
|
|
2031
|
+
return ret;
|
|
2032
|
+
}
|
|
2033
|
+
export function __wbg_subarray_3ed232c8a6baee09(arg0, arg1, arg2) {
|
|
2034
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1388
2035
|
return ret;
|
|
1389
2036
|
}
|
|
1390
|
-
export function
|
|
2037
|
+
export function __wbg_then_16d107c451e9905d(arg0, arg1, arg2) {
|
|
1391
2038
|
const ret = arg0.then(arg1, arg2);
|
|
1392
2039
|
return ret;
|
|
1393
2040
|
}
|
|
1394
|
-
export function
|
|
2041
|
+
export function __wbg_then_6ec10ae38b3e92f7(arg0, arg1) {
|
|
2042
|
+
const ret = arg0.then(arg1);
|
|
2043
|
+
return ret;
|
|
2044
|
+
}
|
|
2045
|
+
export function __wbg_truncate_98a6032d23095328() { return handleError(function (arg0, arg1) {
|
|
2046
|
+
arg0.truncate(arg1);
|
|
2047
|
+
}, arguments); }
|
|
2048
|
+
export function __wbg_url_a410c0bec2fb1b2c(arg0, arg1) {
|
|
1395
2049
|
const ret = arg1.url;
|
|
1396
2050
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1397
2051
|
const len1 = WASM_VECTOR_LEN;
|
|
1398
2052
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1399
2053
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1400
2054
|
}
|
|
1401
|
-
export function
|
|
2055
|
+
export function __wbg_url_abdb8fb08377f8c0(arg0, arg1) {
|
|
1402
2056
|
const ret = arg1.url;
|
|
1403
2057
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1404
2058
|
const len1 = WASM_VECTOR_LEN;
|
|
1405
2059
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1406
2060
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1407
2061
|
}
|
|
1408
|
-
export function
|
|
2062
|
+
export function __wbg_value_a5d5488a9589444a(arg0) {
|
|
1409
2063
|
const ret = arg0.value;
|
|
1410
2064
|
return ret;
|
|
1411
2065
|
}
|
|
@@ -1413,7 +2067,7 @@ export function __wbg_versions_276b2795b1c6a219(arg0) {
|
|
|
1413
2067
|
const ret = arg0.versions;
|
|
1414
2068
|
return ret;
|
|
1415
2069
|
}
|
|
1416
|
-
export function
|
|
2070
|
+
export function __wbg_view_21f1d4a4f175dfa9(arg0) {
|
|
1417
2071
|
const ret = arg0.view;
|
|
1418
2072
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1419
2073
|
}
|
|
@@ -1422,71 +2076,70 @@ export function __wbg_warn_3a37cdd7216f1479(arg0, arg1) {
|
|
|
1422
2076
|
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1423
2077
|
console.warn(...v0);
|
|
1424
2078
|
}
|
|
1425
|
-
export function
|
|
2079
|
+
export function __wbg_wasClean_3c7aa2335da09e74(arg0) {
|
|
1426
2080
|
const ret = arg0.wasClean;
|
|
1427
2081
|
return ret;
|
|
1428
2082
|
}
|
|
2083
|
+
export function __wbg_write_e557b5312ec23477() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2084
|
+
const ret = arg0.write(getArrayU8FromWasm0(arg1, arg2), arg3);
|
|
2085
|
+
return ret;
|
|
2086
|
+
}, arguments); }
|
|
1429
2087
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1430
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1431
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2088
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3530, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2089
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_);
|
|
1432
2090
|
return ret;
|
|
1433
2091
|
}
|
|
1434
2092
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1435
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1436
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2093
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5576, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
2094
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_);
|
|
1437
2095
|
return ret;
|
|
1438
2096
|
}
|
|
1439
2097
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1440
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1441
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2098
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 2808, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2099
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_);
|
|
1442
2100
|
return ret;
|
|
1443
2101
|
}
|
|
1444
2102
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1445
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1446
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2103
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 4161, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2104
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_);
|
|
1447
2105
|
return ret;
|
|
1448
2106
|
}
|
|
1449
2107
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
1450
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1451
|
-
const ret =
|
|
2108
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3449, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2109
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_);
|
|
1452
2110
|
return ret;
|
|
1453
2111
|
}
|
|
1454
2112
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
1455
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1456
|
-
const ret =
|
|
2113
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3703, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
2114
|
+
const ret = makeClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_);
|
|
1457
2115
|
return ret;
|
|
1458
2116
|
}
|
|
1459
2117
|
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
1460
|
-
// Cast intrinsic for `Closure(Closure {
|
|
1461
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1462
|
-
return ret;
|
|
1463
|
-
}
|
|
1464
|
-
export function __wbindgen_cast_0000000000000008(arg0, arg1) {
|
|
1465
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 5070, function: Function { arguments: [Externref], shim_idx: 5071, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1466
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb75a498ac0db6fe5, wasm_bindgen__convert__closures_____invoke__h190e8892b208884b);
|
|
2118
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5540, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2119
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_);
|
|
1467
2120
|
return ret;
|
|
1468
2121
|
}
|
|
1469
|
-
export function
|
|
2122
|
+
export function __wbindgen_cast_0000000000000008(arg0) {
|
|
1470
2123
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1471
2124
|
const ret = arg0;
|
|
1472
2125
|
return ret;
|
|
1473
2126
|
}
|
|
1474
|
-
export function
|
|
2127
|
+
export function __wbindgen_cast_0000000000000009(arg0) {
|
|
1475
2128
|
// Cast intrinsic for `I64 -> Externref`.
|
|
1476
2129
|
const ret = arg0;
|
|
1477
2130
|
return ret;
|
|
1478
2131
|
}
|
|
1479
|
-
export function
|
|
2132
|
+
export function __wbindgen_cast_000000000000000a(arg0, arg1) {
|
|
1480
2133
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1481
2134
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1482
2135
|
return ret;
|
|
1483
2136
|
}
|
|
1484
|
-
export function
|
|
2137
|
+
export function __wbindgen_cast_000000000000000b(arg0, arg1) {
|
|
1485
2138
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1486
2139
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1487
2140
|
return ret;
|
|
1488
2141
|
}
|
|
1489
|
-
export function
|
|
2142
|
+
export function __wbindgen_cast_000000000000000c(arg0) {
|
|
1490
2143
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1491
2144
|
const ret = BigInt.asUintN(64, arg0);
|
|
1492
2145
|
return ret;
|
|
@@ -1500,43 +2153,39 @@ export function __wbindgen_init_externref_table() {
|
|
|
1500
2153
|
table.set(offset + 2, true);
|
|
1501
2154
|
table.set(offset + 3, false);
|
|
1502
2155
|
}
|
|
1503
|
-
function
|
|
1504
|
-
wasm.
|
|
2156
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
2157
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true_(arg0, arg1);
|
|
1505
2158
|
}
|
|
1506
2159
|
|
|
1507
|
-
function
|
|
1508
|
-
wasm.
|
|
2160
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_(arg0, arg1) {
|
|
2161
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__1_(arg0, arg1);
|
|
1509
2162
|
}
|
|
1510
2163
|
|
|
1511
|
-
function
|
|
1512
|
-
wasm.
|
|
2164
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_(arg0, arg1) {
|
|
2165
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke_______true__2_(arg0, arg1);
|
|
1513
2166
|
}
|
|
1514
2167
|
|
|
1515
|
-
function
|
|
1516
|
-
wasm.
|
|
2168
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_(arg0, arg1, arg2) {
|
|
2169
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue______true_(arg0, arg1, arg2);
|
|
1517
2170
|
}
|
|
1518
2171
|
|
|
1519
|
-
function
|
|
1520
|
-
wasm.
|
|
2172
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2) {
|
|
2173
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2);
|
|
1521
2174
|
}
|
|
1522
2175
|
|
|
1523
|
-
function
|
|
1524
|
-
wasm.
|
|
2176
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_(arg0, arg1, arg2) {
|
|
2177
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___web_sys_a9844cda14584e26___features__gen_MessageEvent__MessageEvent______true_(arg0, arg1, arg2);
|
|
1525
2178
|
}
|
|
1526
2179
|
|
|
1527
|
-
function
|
|
1528
|
-
wasm.
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
function wasm_bindgen__convert__closures_____invoke__h190e8892b208884b(arg0, arg1, arg2) {
|
|
1532
|
-
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h190e8892b208884b(arg0, arg1, arg2);
|
|
2180
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_(arg0, arg1, arg2) {
|
|
2181
|
+
const ret = wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___wasm_bindgen_eec8db4f48ed3396___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_eec8db4f48ed3396___JsError___true_(arg0, arg1, arg2);
|
|
1533
2182
|
if (ret[1]) {
|
|
1534
2183
|
throw takeFromExternrefTable0(ret[0]);
|
|
1535
2184
|
}
|
|
1536
2185
|
}
|
|
1537
2186
|
|
|
1538
|
-
function
|
|
1539
|
-
wasm.
|
|
2187
|
+
function wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
2188
|
+
wasm.wasm_bindgen_eec8db4f48ed3396___convert__closures_____invoke___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined___js_sys_4d6744c9ee3fc402___Function_fn_wasm_bindgen_eec8db4f48ed3396___JsValue_____wasm_bindgen_eec8db4f48ed3396___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
1540
2189
|
}
|
|
1541
2190
|
|
|
1542
2191
|
|
|
@@ -1555,25 +2204,37 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
|
1555
2204
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1556
2205
|
const BiStreamFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1557
2206
|
? { register: () => {}, unregister: () => {} }
|
|
1558
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_bistream_free(ptr
|
|
2207
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bistream_free(ptr, 1));
|
|
2208
|
+
const Blake3HasherFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2209
|
+
? { register: () => {}, unregister: () => {} }
|
|
2210
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_blake3hasher_free(ptr, 1));
|
|
2211
|
+
const CancelTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2212
|
+
? { register: () => {}, unregister: () => {} }
|
|
2213
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_canceltoken_free(ptr, 1));
|
|
1559
2214
|
const HelloImageResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1560
2215
|
? { register: () => {}, unregister: () => {} }
|
|
1561
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_helloimageresult_free(ptr
|
|
2216
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_helloimageresult_free(ptr, 1));
|
|
2217
|
+
const ImportSessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2218
|
+
? { register: () => {}, unregister: () => {} }
|
|
2219
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_importsession_free(ptr, 1));
|
|
1562
2220
|
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1563
2221
|
? { register: () => {}, unregister: () => {} }
|
|
1564
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr
|
|
2222
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
|
|
1565
2223
|
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1566
2224
|
? { register: () => {}, unregister: () => {} }
|
|
1567
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr
|
|
2225
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
|
|
1568
2226
|
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1569
2227
|
? { register: () => {}, unregister: () => {} }
|
|
1570
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr
|
|
2228
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
|
|
1571
2229
|
const MiddenNodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1572
2230
|
? { register: () => {}, unregister: () => {} }
|
|
1573
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_middennode_free(ptr
|
|
2231
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_middennode_free(ptr, 1));
|
|
2232
|
+
const MiddenNodeOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2233
|
+
? { register: () => {}, unregister: () => {} }
|
|
2234
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_middennodeoptions_free(ptr, 1));
|
|
1574
2235
|
const RadioHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1575
2236
|
? { register: () => {}, unregister: () => {} }
|
|
1576
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_radiohandle_free(ptr
|
|
2237
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_radiohandle_free(ptr, 1));
|
|
1577
2238
|
|
|
1578
2239
|
function addToExternrefTable0(obj) {
|
|
1579
2240
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1581,9 +2242,15 @@ function addToExternrefTable0(obj) {
|
|
|
1581
2242
|
return idx;
|
|
1582
2243
|
}
|
|
1583
2244
|
|
|
2245
|
+
function _assertClass(instance, klass) {
|
|
2246
|
+
if (!(instance instanceof klass)) {
|
|
2247
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
|
|
1584
2251
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1585
2252
|
? { register: () => {}, unregister: () => {} }
|
|
1586
|
-
: new FinalizationRegistry(state =>
|
|
2253
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
1587
2254
|
|
|
1588
2255
|
function debugString(val) {
|
|
1589
2256
|
// primitive types
|
|
@@ -1675,8 +2342,7 @@ function getDataViewMemory0() {
|
|
|
1675
2342
|
}
|
|
1676
2343
|
|
|
1677
2344
|
function getStringFromWasm0(ptr, len) {
|
|
1678
|
-
|
|
1679
|
-
return decodeText(ptr, len);
|
|
2345
|
+
return decodeText(ptr >>> 0, len);
|
|
1680
2346
|
}
|
|
1681
2347
|
|
|
1682
2348
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -1700,8 +2366,8 @@ function isLikeNone(x) {
|
|
|
1700
2366
|
return x === undefined || x === null;
|
|
1701
2367
|
}
|
|
1702
2368
|
|
|
1703
|
-
function makeClosure(arg0, arg1,
|
|
1704
|
-
const state = { a: arg0, b: arg1, cnt: 1
|
|
2369
|
+
function makeClosure(arg0, arg1, f) {
|
|
2370
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1705
2371
|
const real = (...args) => {
|
|
1706
2372
|
|
|
1707
2373
|
// First up with a closure we increment the internal reference
|
|
@@ -1716,7 +2382,7 @@ function makeClosure(arg0, arg1, dtor, f) {
|
|
|
1716
2382
|
};
|
|
1717
2383
|
real._wbg_cb_unref = () => {
|
|
1718
2384
|
if (--state.cnt === 0) {
|
|
1719
|
-
|
|
2385
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
1720
2386
|
state.a = 0;
|
|
1721
2387
|
CLOSURE_DTORS.unregister(state);
|
|
1722
2388
|
}
|
|
@@ -1725,8 +2391,8 @@ function makeClosure(arg0, arg1, dtor, f) {
|
|
|
1725
2391
|
return real;
|
|
1726
2392
|
}
|
|
1727
2393
|
|
|
1728
|
-
function makeMutClosure(arg0, arg1,
|
|
1729
|
-
const state = { a: arg0, b: arg1, cnt: 1
|
|
2394
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
2395
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1730
2396
|
const real = (...args) => {
|
|
1731
2397
|
|
|
1732
2398
|
// First up with a closure we increment the internal reference
|
|
@@ -1744,7 +2410,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
1744
2410
|
};
|
|
1745
2411
|
real._wbg_cb_unref = () => {
|
|
1746
2412
|
if (--state.cnt === 0) {
|
|
1747
|
-
|
|
2413
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
1748
2414
|
state.a = 0;
|
|
1749
2415
|
CLOSURE_DTORS.unregister(state);
|
|
1750
2416
|
}
|
|
@@ -1760,6 +2426,16 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
1760
2426
|
return ptr;
|
|
1761
2427
|
}
|
|
1762
2428
|
|
|
2429
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
2430
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
2431
|
+
for (let i = 0; i < array.length; i++) {
|
|
2432
|
+
const add = addToExternrefTable0(array[i]);
|
|
2433
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
2434
|
+
}
|
|
2435
|
+
WASM_VECTOR_LEN = array.length;
|
|
2436
|
+
return ptr;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
1763
2439
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
1764
2440
|
if (realloc === undefined) {
|
|
1765
2441
|
const buf = cachedTextEncoder.encode(arg);
|