@utoo/web 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/utoo/index.js CHANGED
@@ -1,23 +1,30 @@
1
1
  let wasm;
2
- const heap = new Array(128).fill(undefined);
3
- heap.push(undefined, null, true, false);
4
- function getObject(idx) { return heap[idx]; }
5
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
6
- if (typeof TextDecoder !== 'undefined') {
7
- cachedTextDecoder.decode();
8
- }
9
- ;
10
2
  let cachedUint8ArrayMemory0 = null;
11
3
  function getUint8ArrayMemory0() {
12
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
4
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
13
5
  cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
14
6
  }
15
7
  return cachedUint8ArrayMemory0;
16
8
  }
9
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
10
+ cachedTextDecoder.decode();
11
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
12
+ let numBytesDecoded = 0;
13
+ function decodeText(ptr, len) {
14
+ numBytesDecoded += len;
15
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
16
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
17
+ cachedTextDecoder.decode();
18
+ numBytesDecoded = len;
19
+ }
20
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
21
+ }
17
22
  function getStringFromWasm0(ptr, len) {
18
23
  ptr = ptr >>> 0;
19
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
24
+ return decodeText(ptr, len);
20
25
  }
26
+ let heap = new Array(128).fill(undefined);
27
+ heap.push(undefined, null, true, false);
21
28
  let heap_next = heap.length;
22
29
  function addHeapObject(obj) {
23
30
  if (heap_next === heap.length)
@@ -27,39 +34,17 @@ function addHeapObject(obj) {
27
34
  heap[idx] = obj;
28
35
  return idx;
29
36
  }
30
- function handleError(f, args) {
31
- try {
32
- return f.apply(this, args);
33
- }
34
- catch (e) {
35
- wasm.__wbindgen_export_0(addHeapObject(e));
36
- }
37
- }
38
- function dropObject(idx) {
39
- if (idx < 132)
40
- return;
41
- heap[idx] = heap_next;
42
- heap_next = idx;
43
- }
44
- function takeObject(idx) {
45
- const ret = getObject(idx);
46
- dropObject(idx);
47
- return ret;
48
- }
37
+ function getObject(idx) { return heap[idx]; }
49
38
  let WASM_VECTOR_LEN = 0;
50
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
51
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
52
- ? function (arg, view) {
53
- return cachedTextEncoder.encodeInto(arg, view);
54
- }
55
- : function (arg, view) {
56
- const buf = cachedTextEncoder.encode(arg);
57
- view.set(buf);
58
- return {
59
- read: arg.length,
60
- written: buf.length
61
- };
62
- });
39
+ const cachedTextEncoder = new TextEncoder();
40
+ cachedTextEncoder.encodeInto = function (arg, view) {
41
+ const buf = cachedTextEncoder.encode(arg);
42
+ view.set(buf);
43
+ return {
44
+ read: arg.length,
45
+ written: buf.length
46
+ };
47
+ };
63
48
  function passStringToWasm0(arg, malloc, realloc) {
64
49
  if (realloc === undefined) {
65
50
  const buf = cachedTextEncoder.encode(arg);
@@ -84,7 +69,7 @@ function passStringToWasm0(arg, malloc, realloc) {
84
69
  }
85
70
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
86
71
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
87
- const ret = encodeString(arg, view);
72
+ const ret = cachedTextEncoder.encodeInto(arg, view);
88
73
  offset += ret.written;
89
74
  ptr = realloc(ptr, len, offset, 1) >>> 0;
90
75
  }
@@ -93,11 +78,30 @@ function passStringToWasm0(arg, malloc, realloc) {
93
78
  }
94
79
  let cachedDataViewMemory0 = null;
95
80
  function getDataViewMemory0() {
96
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
81
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
97
82
  cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
98
83
  }
99
84
  return cachedDataViewMemory0;
100
85
  }
86
+ function handleError(f, args) {
87
+ try {
88
+ return f.apply(this, args);
89
+ }
90
+ catch (e) {
91
+ wasm.__wbindgen_export_3(addHeapObject(e));
92
+ }
93
+ }
94
+ function dropObject(idx) {
95
+ if (idx < 132)
96
+ return;
97
+ heap[idx] = heap_next;
98
+ heap_next = idx;
99
+ }
100
+ function takeObject(idx) {
101
+ const ret = getObject(idx);
102
+ dropObject(idx);
103
+ return ret;
104
+ }
101
105
  function getArrayU8FromWasm0(ptr, len) {
102
106
  ptr = ptr >>> 0;
103
107
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -105,37 +109,6 @@ function getArrayU8FromWasm0(ptr, len) {
105
109
  function isLikeNone(x) {
106
110
  return x === undefined || x === null;
107
111
  }
108
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
109
- ? { register: () => { }, unregister: () => { } }
110
- : new FinalizationRegistry(state => {
111
- wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);
112
- });
113
- function makeMutClosure(arg0, arg1, dtor, f) {
114
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
115
- const real = (...args) => {
116
- // First up with a closure we increment the internal reference
117
- // count. This ensures that the Rust closure environment won't
118
- // be deallocated while we're invoking it.
119
- state.cnt++;
120
- const a = state.a;
121
- state.a = 0;
122
- try {
123
- return f(a, state.b, ...args);
124
- }
125
- finally {
126
- if (--state.cnt === 0) {
127
- wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
128
- CLOSURE_DTORS.unregister(state);
129
- }
130
- else {
131
- state.a = a;
132
- }
133
- }
134
- };
135
- real.original = state;
136
- CLOSURE_DTORS.register(real, state, state);
137
- return real;
138
- }
139
112
  function debugString(val) {
140
113
  // primitive types
141
114
  const type = typeof val;
@@ -204,19 +177,118 @@ function debugString(val) {
204
177
  // TODO we could test for more things here, like `Set`s and `Map`s.
205
178
  return className;
206
179
  }
207
- function __wbg_adapter_28(arg0, arg1) {
208
- wasm.__wbindgen_export_5(arg0, arg1);
180
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
181
+ ? { register: () => { }, unregister: () => { } }
182
+ : new FinalizationRegistry(state => {
183
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
184
+ });
185
+ function makeMutClosure(arg0, arg1, dtor, f) {
186
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
187
+ const real = (...args) => {
188
+ // First up with a closure we increment the internal reference
189
+ // count. This ensures that the Rust closure environment won't
190
+ // be deallocated while we're invoking it.
191
+ state.cnt++;
192
+ const a = state.a;
193
+ state.a = 0;
194
+ try {
195
+ return f(a, state.b, ...args);
196
+ }
197
+ finally {
198
+ if (--state.cnt === 0) {
199
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
200
+ CLOSURE_DTORS.unregister(state);
201
+ }
202
+ else {
203
+ state.a = a;
204
+ }
205
+ }
206
+ };
207
+ real.original = state;
208
+ CLOSURE_DTORS.register(real, state, state);
209
+ return real;
210
+ }
211
+ function makeClosure(arg0, arg1, dtor, f) {
212
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
213
+ const real = (...args) => {
214
+ // First up with a closure we increment the internal reference
215
+ // count. This ensures that the Rust closure environment won't
216
+ // be deallocated while we're invoking it.
217
+ state.cnt++;
218
+ try {
219
+ return f(state.a, state.b, ...args);
220
+ }
221
+ finally {
222
+ if (--state.cnt === 0) {
223
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
224
+ state.a = 0;
225
+ CLOSURE_DTORS.unregister(state);
226
+ }
227
+ }
228
+ };
229
+ real.original = state;
230
+ CLOSURE_DTORS.register(real, state, state);
231
+ return real;
232
+ }
233
+ function getArrayJsValueFromWasm0(ptr, len) {
234
+ ptr = ptr >>> 0;
235
+ const mem = getDataViewMemory0();
236
+ const result = [];
237
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
238
+ result.push(takeObject(mem.getUint32(i, true)));
239
+ }
240
+ return result;
241
+ }
242
+ export function init_pack() {
243
+ wasm.init_pack();
244
+ }
245
+ function passArray8ToWasm0(arg, malloc) {
246
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
247
+ getUint8ArrayMemory0().set(arg, ptr / 1);
248
+ WASM_VECTOR_LEN = arg.length;
249
+ return ptr;
250
+ }
251
+ /**
252
+ * Entry point for web workers
253
+ * @param {number} ptr
254
+ */
255
+ export function wasm_thread_entry_point(ptr) {
256
+ wasm.wasm_thread_entry_point(ptr);
257
+ }
258
+ let stack_pointer = 128;
259
+ function addBorrowedObject(obj) {
260
+ if (stack_pointer == 1)
261
+ throw new Error('out of js stack');
262
+ heap[--stack_pointer] = obj;
263
+ return stack_pointer;
264
+ }
265
+ function __wbg_adapter_4(arg0, arg1, arg2) {
266
+ try {
267
+ wasm.__wbindgen_export_6(arg0, arg1, addBorrowedObject(arg2));
268
+ }
269
+ finally {
270
+ heap[stack_pointer++] = undefined;
271
+ }
272
+ }
273
+ function __wbg_adapter_17(arg0, arg1, arg2) {
274
+ wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
209
275
  }
210
- function __wbg_adapter_31(arg0, arg1, arg2) {
211
- wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
276
+ function __wbg_adapter_22(arg0, arg1, arg2) {
277
+ wasm.__wbindgen_export_8(arg0, arg1, addHeapObject(arg2));
212
278
  }
213
- function __wbg_adapter_66(arg0, arg1, arg2, arg3) {
214
- wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
279
+ function __wbg_adapter_25(arg0, arg1) {
280
+ wasm.__wbindgen_export_9(arg0, arg1);
281
+ }
282
+ function __wbg_adapter_102(arg0, arg1, arg2, arg3) {
283
+ wasm.__wbindgen_export_10(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
215
284
  }
216
285
  const __wbindgen_enum_DirEntryType = ["file", "directory"];
286
+ const __wbindgen_enum_FileSystemChangeRecordType = ["appeared", "disappeared", "errored", "modified", "moved", "unknown"];
217
287
  const __wbindgen_enum_FileSystemHandleKind = ["file", "directory"];
288
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
218
289
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
219
290
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
291
+ const __wbindgen_enum_WorkerType = ["classic", "module"];
220
292
  const CreateSyncAccessHandleOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
221
293
  ? { register: () => { }, unregister: () => { } }
222
294
  : new FinalizationRegistry(ptr => wasm.__wbg_createsyncaccesshandleoptions_free(ptr >>> 0, 1));
@@ -239,12 +311,11 @@ export class CreateSyncAccessHandleOptions {
239
311
  wasm.__wbg_createsyncaccesshandleoptions_free(ptr, 0);
240
312
  }
241
313
  }
314
+ if (Symbol.dispose)
315
+ CreateSyncAccessHandleOptions.prototype[Symbol.dispose] = CreateSyncAccessHandleOptions.prototype.free;
242
316
  const DirEntryFinalization = (typeof FinalizationRegistry === 'undefined')
243
317
  ? { register: () => { }, unregister: () => { } }
244
318
  : new FinalizationRegistry(ptr => wasm.__wbg_direntry_free(ptr >>> 0, 1));
245
- /**
246
- * Directory entry with name and type information
247
- */
248
319
  export class DirEntry {
249
320
  static __wrap(ptr) {
250
321
  ptr = ptr >>> 0;
@@ -253,6 +324,15 @@ export class DirEntry {
253
324
  DirEntryFinalization.register(obj, obj.__wbg_ptr, obj);
254
325
  return obj;
255
326
  }
327
+ toJSON() {
328
+ return {
329
+ name: this.name,
330
+ type: this.type,
331
+ };
332
+ }
333
+ toString() {
334
+ return JSON.stringify(this);
335
+ }
256
336
  __destroy_into_raw() {
257
337
  const ptr = this.__wbg_ptr;
258
338
  this.__wbg_ptr = 0;
@@ -305,6 +385,38 @@ export class DirEntry {
305
385
  wasm.__wbg_set_direntry_type(this.__wbg_ptr, (__wbindgen_enum_DirEntryType.indexOf(arg0) + 1 || 3) - 1);
306
386
  }
307
387
  }
388
+ if (Symbol.dispose)
389
+ DirEntry.prototype[Symbol.dispose] = DirEntry.prototype.free;
390
+ const MetadataFinalization = (typeof FinalizationRegistry === 'undefined')
391
+ ? { register: () => { }, unregister: () => { } }
392
+ : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0, 1));
393
+ export class Metadata {
394
+ static __wrap(ptr) {
395
+ ptr = ptr >>> 0;
396
+ const obj = Object.create(Metadata.prototype);
397
+ obj.__wbg_ptr = ptr;
398
+ MetadataFinalization.register(obj, obj.__wbg_ptr, obj);
399
+ return obj;
400
+ }
401
+ toJSON() {
402
+ return {};
403
+ }
404
+ toString() {
405
+ return JSON.stringify(this);
406
+ }
407
+ __destroy_into_raw() {
408
+ const ptr = this.__wbg_ptr;
409
+ this.__wbg_ptr = 0;
410
+ MetadataFinalization.unregister(this);
411
+ return ptr;
412
+ }
413
+ free() {
414
+ const ptr = this.__destroy_into_raw();
415
+ wasm.__wbg_metadata_free(ptr, 0);
416
+ }
417
+ }
418
+ if (Symbol.dispose)
419
+ Metadata.prototype[Symbol.dispose] = Metadata.prototype.free;
308
420
  const ProjectFinalization = (typeof FinalizationRegistry === 'undefined')
309
421
  ? { register: () => { }, unregister: () => { } }
310
422
  : new FinalizationRegistry(ptr => wasm.__wbg_project_free(ptr >>> 0, 1));
@@ -320,61 +432,34 @@ export class Project {
320
432
  wasm.__wbg_project_free(ptr, 0);
321
433
  }
322
434
  /**
323
- * @param {string} cwd
324
- */
325
- constructor(cwd) {
326
- const ptr0 = passStringToWasm0(cwd, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
327
- const len0 = WASM_VECTOR_LEN;
328
- const ret = wasm.project_new(ptr0, len0);
329
- this.__wbg_ptr = ret >>> 0;
330
- ProjectFinalization.register(this, this.__wbg_ptr, this);
331
- return this;
332
- }
333
- /**
334
- * @returns {string}
335
- */
336
- get cwd() {
337
- let deferred1_0;
338
- let deferred1_1;
339
- try {
340
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
341
- wasm.project_cwd(retptr, this.__wbg_ptr);
342
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
343
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
344
- deferred1_0 = r0;
345
- deferred1_1 = r1;
346
- return getStringFromWasm0(r0, r1);
347
- }
348
- finally {
349
- wasm.__wbindgen_add_to_stack_pointer(16);
350
- wasm.__wbindgen_export_4(deferred1_0, deferred1_1, 1);
351
- }
352
- }
353
- /**
354
- * @param {string} package_lock
435
+ * @param {string} path
355
436
  * @returns {Promise<void>}
356
437
  */
357
- install(package_lock) {
358
- const ptr0 = passStringToWasm0(package_lock, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
438
+ createDir(path) {
439
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
359
440
  const len0 = WASM_VECTOR_LEN;
360
- const ret = wasm.project_install(this.__wbg_ptr, ptr0, len0);
441
+ const ret = wasm.project_createDir(this.__wbg_ptr, ptr0, len0);
361
442
  return takeObject(ret);
362
443
  }
363
444
  /**
445
+ * @param {string} path
446
+ * @param {boolean} recursive
364
447
  * @returns {Promise<void>}
365
448
  */
366
- build() {
367
- const ret = wasm.project_build(this.__wbg_ptr);
449
+ removeDir(path, recursive) {
450
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
451
+ const len0 = WASM_VECTOR_LEN;
452
+ const ret = wasm.project_removeDir(this.__wbg_ptr, ptr0, len0, recursive);
368
453
  return takeObject(ret);
369
454
  }
370
455
  /**
371
456
  * @param {string} path
372
- * @returns {Promise<string>}
457
+ * @returns {Promise<void>}
373
458
  */
374
- readFile(path) {
459
+ removeFile(path) {
375
460
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
376
461
  const len0 = WASM_VECTOR_LEN;
377
- const ret = wasm.project_readFile(this.__wbg_ptr, ptr0, len0);
462
+ const ret = wasm.project_removeFile(this.__wbg_ptr, ptr0, len0);
378
463
  return takeObject(ret);
379
464
  }
380
465
  /**
@@ -382,66 +467,201 @@ export class Project {
382
467
  * @param {string} content
383
468
  * @returns {Promise<void>}
384
469
  */
385
- writeFile(path, content) {
470
+ writeString(path, content) {
386
471
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
387
472
  const len0 = WASM_VECTOR_LEN;
388
473
  const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
389
474
  const len1 = WASM_VECTOR_LEN;
390
- const ret = wasm.project_writeFile(this.__wbg_ptr, ptr0, len0, ptr1, len1);
475
+ const ret = wasm.project_writeString(this.__wbg_ptr, ptr0, len0, ptr1, len1);
391
476
  return takeObject(ret);
392
477
  }
393
478
  /**
394
479
  * @param {string} path
395
- * @returns {Promise<DirEntry[]>}
480
+ * @returns {Promise<void>}
396
481
  */
397
- readDir(path) {
482
+ createDirAll(path) {
398
483
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
399
484
  const len0 = WASM_VECTOR_LEN;
400
- const ret = wasm.project_readDir(this.__wbg_ptr, ptr0, len0);
485
+ const ret = wasm.project_createDirAll(this.__wbg_ptr, ptr0, len0);
401
486
  return takeObject(ret);
402
487
  }
403
488
  /**
404
489
  * @param {string} path
405
- * @returns {Promise<void>}
490
+ * @returns {Promise<string>}
406
491
  */
407
- createDir(path) {
492
+ readToString(path) {
408
493
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
409
494
  const len0 = WASM_VECTOR_LEN;
410
- const ret = wasm.project_createDir(this.__wbg_ptr, ptr0, len0);
495
+ const ret = wasm.project_readToString(this.__wbg_ptr, ptr0, len0);
411
496
  return takeObject(ret);
412
497
  }
413
498
  /**
414
- * @param {string} path
415
- * @returns {Promise<void>}
499
+ * @returns {string}
416
500
  */
417
- createDirAll(path) {
418
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
419
- const len0 = WASM_VECTOR_LEN;
420
- const ret = wasm.project_createDirAll(this.__wbg_ptr, ptr0, len0);
421
- return takeObject(ret);
501
+ get cwd() {
502
+ let deferred1_0;
503
+ let deferred1_1;
504
+ try {
505
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
506
+ wasm.project_cwd(retptr, this.__wbg_ptr);
507
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
508
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
509
+ deferred1_0 = r0;
510
+ deferred1_1 = r1;
511
+ return getStringFromWasm0(r0, r1);
512
+ }
513
+ finally {
514
+ wasm.__wbindgen_add_to_stack_pointer(16);
515
+ wasm.__wbindgen_export_4(deferred1_0, deferred1_1, 1);
516
+ }
422
517
  }
423
518
  /**
424
- * @param {string} src
425
- * @param {string} dst
426
- * @returns {Promise<void>}
519
+ * @param {string} cwd
520
+ * @param {string} thread_url
427
521
  */
428
- copyFile(src, dst) {
429
- const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
522
+ constructor(cwd, thread_url) {
523
+ const ptr0 = passStringToWasm0(cwd, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
430
524
  const len0 = WASM_VECTOR_LEN;
431
- const ptr1 = passStringToWasm0(dst, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
525
+ const ptr1 = passStringToWasm0(thread_url, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
432
526
  const len1 = WASM_VECTOR_LEN;
433
- const ret = wasm.project_copyFile(this.__wbg_ptr, ptr0, len0, ptr1, len1);
434
- return takeObject(ret);
527
+ const ret = wasm.project_new(ptr0, len0, ptr1, len1);
528
+ this.__wbg_ptr = ret >>> 0;
529
+ ProjectFinalization.register(this, this.__wbg_ptr, this);
530
+ return this;
435
531
  }
436
- }
437
- async function __wbg_load(module, imports) {
438
- if (typeof Response === 'function' && module instanceof Response) {
439
- if (typeof WebAssembly.instantiateStreaming === 'function') {
440
- try {
532
+ /**
533
+ * Create a tar.gz archive and return bytes (no file I/O)
534
+ * This is useful for main thread execution without OPFS access
535
+ * @param {any} files
536
+ * @returns {Uint8Array}
537
+ */
538
+ gzip(files) {
539
+ try {
540
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
541
+ wasm.project_gzip(retptr, this.__wbg_ptr, addHeapObject(files));
542
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
543
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
544
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
545
+ if (r2) {
546
+ throw takeObject(r1);
547
+ }
548
+ return takeObject(r0);
549
+ }
550
+ finally {
551
+ wasm.__wbindgen_add_to_stack_pointer(16);
552
+ }
553
+ }
554
+ /**
555
+ * @param {string} path
556
+ * @returns {Promise<Uint8Array>}
557
+ */
558
+ read(path) {
559
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
560
+ const len0 = WASM_VECTOR_LEN;
561
+ const ret = wasm.project_read(this.__wbg_ptr, ptr0, len0);
562
+ return takeObject(ret);
563
+ }
564
+ /**
565
+ * @returns {Promise<any>}
566
+ */
567
+ build() {
568
+ const ret = wasm.project_build(this.__wbg_ptr);
569
+ return takeObject(ret);
570
+ }
571
+ /**
572
+ * @param {string} path
573
+ * @param {Uint8Array} content
574
+ * @returns {Promise<void>}
575
+ */
576
+ write(path, content) {
577
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
578
+ const len0 = WASM_VECTOR_LEN;
579
+ const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
580
+ const len1 = WASM_VECTOR_LEN;
581
+ const ret = wasm.project_write(this.__wbg_ptr, ptr0, len0, ptr1, len1);
582
+ return takeObject(ret);
583
+ }
584
+ /**
585
+ * @param {string} package_lock
586
+ * @param {number | null} [max_concurrent_downloads]
587
+ * @returns {Promise<void>}
588
+ */
589
+ install(package_lock, max_concurrent_downloads) {
590
+ const ptr0 = passStringToWasm0(package_lock, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
591
+ const len0 = WASM_VECTOR_LEN;
592
+ const ret = wasm.project_install(this.__wbg_ptr, ptr0, len0, isLikeNone(max_concurrent_downloads) ? 0x100000001 : (max_concurrent_downloads) >>> 0);
593
+ return takeObject(ret);
594
+ }
595
+ /**
596
+ * Calculate MD5 hash of byte content
597
+ * @param {Uint8Array} content
598
+ * @returns {string}
599
+ */
600
+ sigMd5(content) {
601
+ let deferred2_0;
602
+ let deferred2_1;
603
+ try {
604
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
605
+ const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
606
+ const len0 = WASM_VECTOR_LEN;
607
+ wasm.project_sigMd5(retptr, this.__wbg_ptr, ptr0, len0);
608
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
609
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
610
+ deferred2_0 = r0;
611
+ deferred2_1 = r1;
612
+ return getStringFromWasm0(r0, r1);
613
+ }
614
+ finally {
615
+ wasm.__wbindgen_add_to_stack_pointer(16);
616
+ wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
617
+ }
618
+ }
619
+ /**
620
+ * @param {string} path
621
+ * @returns {Promise<Metadata>}
622
+ */
623
+ metadata(path) {
624
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
625
+ const len0 = WASM_VECTOR_LEN;
626
+ const ret = wasm.project_metadata(this.__wbg_ptr, ptr0, len0);
627
+ return takeObject(ret);
628
+ }
629
+ /**
630
+ * @param {string} path
631
+ * @returns {Promise<DirEntry[]>}
632
+ */
633
+ readDir(path) {
634
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
635
+ const len0 = WASM_VECTOR_LEN;
636
+ const ret = wasm.project_readDir(this.__wbg_ptr, ptr0, len0);
637
+ return takeObject(ret);
638
+ }
639
+ /**
640
+ * @param {string} src
641
+ * @param {string} dst
642
+ * @returns {Promise<void>}
643
+ */
644
+ copyFile(src, dst) {
645
+ const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
646
+ const len0 = WASM_VECTOR_LEN;
647
+ const ptr1 = passStringToWasm0(dst, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
648
+ const len1 = WASM_VECTOR_LEN;
649
+ const ret = wasm.project_copyFile(this.__wbg_ptr, ptr0, len0, ptr1, len1);
650
+ return takeObject(ret);
651
+ }
652
+ }
653
+ if (Symbol.dispose)
654
+ Project.prototype[Symbol.dispose] = Project.prototype.free;
655
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
656
+ async function __wbg_load(module, imports) {
657
+ if (typeof Response === 'function' && module instanceof Response) {
658
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
659
+ try {
441
660
  return await WebAssembly.instantiateStreaming(module, imports);
442
661
  }
443
662
  catch (e) {
444
- if (module.headers.get('Content-Type') != 'application/wasm') {
663
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
664
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
445
665
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
446
666
  }
447
667
  else {
@@ -465,113 +685,221 @@ async function __wbg_load(module, imports) {
465
685
  function __wbg_get_imports() {
466
686
  const imports = {};
467
687
  imports.wbg = {};
468
- imports.wbg.__wbg_abort_410ec47a64ac6117 = function (arg0, arg1) {
469
- getObject(arg0).abort(getObject(arg1));
688
+ imports.wbg.__wbg_Error_e17e777aac105295 = function (arg0, arg1) {
689
+ const ret = Error(getStringFromWasm0(arg0, arg1));
690
+ return addHeapObject(ret);
691
+ };
692
+ imports.wbg.__wbg_Number_998bea33bd87c3e0 = function (arg0) {
693
+ const ret = Number(getObject(arg0));
694
+ return ret;
695
+ };
696
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
697
+ const ret = String(getObject(arg1));
698
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
699
+ const len1 = WASM_VECTOR_LEN;
700
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
701
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
470
702
  };
471
- imports.wbg.__wbg_abort_775ef1d17fc65868 = function (arg0) {
703
+ imports.wbg.__wbg_abort_67e1b49bf6614565 = function (arg0) {
472
704
  getObject(arg0).abort();
473
705
  };
474
- imports.wbg.__wbg_append_8c7dd8d641a5f01b = function () {
706
+ imports.wbg.__wbg_abort_d830bf2e9aa6ec5b = function (arg0, arg1) {
707
+ getObject(arg0).abort(getObject(arg1));
708
+ };
709
+ imports.wbg.__wbg_append_72a3c0addd2bce38 = function () {
475
710
  return handleError(function (arg0, arg1, arg2, arg3, arg4) {
476
711
  getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
477
712
  }, arguments);
478
713
  };
479
- imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function () {
714
+ imports.wbg.__wbg_arrayBuffer_9c99b8e2809e8cbb = function () {
480
715
  return handleError(function (arg0) {
481
716
  const ret = getObject(arg0).arrayBuffer();
482
717
  return addHeapObject(ret);
483
718
  }, arguments);
484
719
  };
485
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
720
+ imports.wbg.__wbg_async_d65ec5b7c88f9d4a = function (arg0) {
721
+ const ret = getObject(arg0).async;
722
+ return ret;
723
+ };
724
+ imports.wbg.__wbg_buffer_40c0928cc927f62a = function (arg0) {
486
725
  const ret = getObject(arg0).buffer;
487
726
  return addHeapObject(ret);
488
727
  };
489
- imports.wbg.__wbg_call_672a4d21634d4a24 = function () {
728
+ imports.wbg.__wbg_call_13410aac570ffff7 = function () {
490
729
  return handleError(function (arg0, arg1) {
491
730
  const ret = getObject(arg0).call(getObject(arg1));
492
731
  return addHeapObject(ret);
493
732
  }, arguments);
494
733
  };
495
- imports.wbg.__wbg_call_7cccdd69e0791ae2 = function () {
734
+ imports.wbg.__wbg_call_a5400b25a865cfd8 = function () {
496
735
  return handleError(function (arg0, arg1, arg2) {
497
736
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
498
737
  return addHeapObject(ret);
499
738
  }, arguments);
500
739
  };
501
- imports.wbg.__wbg_clearTimeout_0b53d391c1b94dda = function (arg0) {
740
+ imports.wbg.__wbg_changedHandle_51cdba7dd85fac27 = function (arg0) {
741
+ const ret = getObject(arg0).changedHandle;
742
+ return addHeapObject(ret);
743
+ };
744
+ imports.wbg.__wbg_clearTimeout_6222fede17abcb1a = function (arg0) {
502
745
  const ret = clearTimeout(takeObject(arg0));
503
746
  return addHeapObject(ret);
504
747
  };
505
- imports.wbg.__wbg_close_a17af48266bd9942 = function (arg0) {
748
+ imports.wbg.__wbg_close_9870d6f25f3c1f31 = function (arg0) {
506
749
  getObject(arg0).close();
507
750
  };
751
+ imports.wbg.__wbg_createObjectURL_c80225986d2b928b = function () {
752
+ return handleError(function (arg0, arg1) {
753
+ const ret = URL.createObjectURL(getObject(arg1));
754
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
755
+ const len1 = WASM_VECTOR_LEN;
756
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
757
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
758
+ }, arguments);
759
+ };
508
760
  imports.wbg.__wbg_createsyncaccesshandleoptions_new = function (arg0) {
509
761
  const ret = CreateSyncAccessHandleOptions.__wrap(arg0);
510
762
  return addHeapObject(ret);
511
763
  };
764
+ imports.wbg.__wbg_data_9ab529722bcc4e6c = function (arg0) {
765
+ const ret = getObject(arg0).data;
766
+ return addHeapObject(ret);
767
+ };
768
+ imports.wbg.__wbg_debug_7f3000e7358ea482 = function (arg0, arg1, arg2, arg3) {
769
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
770
+ };
771
+ imports.wbg.__wbg_debug_c906769d2f88c17b = function (arg0) {
772
+ console.debug(getObject(arg0));
773
+ };
512
774
  imports.wbg.__wbg_direntry_new = function (arg0) {
513
775
  const ret = DirEntry.__wrap(arg0);
514
776
  return addHeapObject(ret);
515
777
  };
516
- imports.wbg.__wbg_done_769e5ede4b31c67b = function (arg0) {
778
+ imports.wbg.__wbg_done_75ed0ee6dd243d9d = function (arg0) {
517
779
  const ret = getObject(arg0).done;
518
780
  return ret;
519
781
  };
520
- imports.wbg.__wbg_entries_19efe296f7d36df9 = function (arg0) {
782
+ imports.wbg.__wbg_entries_1a3c3b9544532397 = function (arg0) {
521
783
  const ret = getObject(arg0).entries();
522
784
  return addHeapObject(ret);
523
785
  };
524
- imports.wbg.__wbg_fetch_11bff8299d0ecd2b = function (arg0) {
525
- const ret = fetch(getObject(arg0));
526
- return addHeapObject(ret);
786
+ imports.wbg.__wbg_error_0889f151acea569e = function (arg0, arg1, arg2, arg3) {
787
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
527
788
  };
528
- imports.wbg.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
789
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
790
+ let deferred0_0;
791
+ let deferred0_1;
792
+ try {
793
+ deferred0_0 = arg0;
794
+ deferred0_1 = arg1;
795
+ console.error(getStringFromWasm0(arg0, arg1));
796
+ }
797
+ finally {
798
+ wasm.__wbindgen_export_4(deferred0_0, deferred0_1, 1);
799
+ }
800
+ };
801
+ imports.wbg.__wbg_error_99981e16d476aa5c = function (arg0) {
802
+ console.error(getObject(arg0));
803
+ };
804
+ imports.wbg.__wbg_eval_631dc78d65611b94 = function () {
805
+ return handleError(function (arg0, arg1) {
806
+ const ret = eval(getStringFromWasm0(arg0, arg1));
807
+ return addHeapObject(ret);
808
+ }, arguments);
809
+ };
810
+ imports.wbg.__wbg_fetch_87aed7f306ec6d63 = function (arg0, arg1) {
529
811
  const ret = getObject(arg0).fetch(getObject(arg1));
530
812
  return addHeapObject(ret);
531
813
  };
532
- imports.wbg.__wbg_from_2a5d3e218e67aa85 = function (arg0) {
814
+ imports.wbg.__wbg_fetch_f156d10be9a5c88a = function (arg0) {
815
+ const ret = fetch(getObject(arg0));
816
+ return addHeapObject(ret);
817
+ };
818
+ imports.wbg.__wbg_flush_d2487a24f3bc3cf4 = function () {
819
+ return handleError(function (arg0) {
820
+ getObject(arg0).flush();
821
+ }, arguments);
822
+ };
823
+ imports.wbg.__wbg_from_88bc52ce20ba6318 = function (arg0) {
533
824
  const ret = Array.from(getObject(arg0));
534
825
  return addHeapObject(ret);
535
826
  };
536
- imports.wbg.__wbg_getDirectoryHandle_c48a138373d79b3d = function (arg0, arg1, arg2, arg3) {
827
+ imports.wbg.__wbg_getDirectoryHandle_0fb26677897f1e21 = function (arg0, arg1, arg2, arg3) {
537
828
  const ret = getObject(arg0).getDirectoryHandle(getStringFromWasm0(arg1, arg2), getObject(arg3));
538
829
  return addHeapObject(ret);
539
830
  };
540
- imports.wbg.__wbg_getDirectory_c206b0540c9acc0f = function (arg0) {
831
+ imports.wbg.__wbg_getDirectory_8564f4b4ae7ee35c = function (arg0) {
541
832
  const ret = getObject(arg0).getDirectory();
542
833
  return addHeapObject(ret);
543
834
  };
544
- imports.wbg.__wbg_getFileHandle_5fb877d1ecc74d52 = function (arg0, arg1, arg2, arg3) {
835
+ imports.wbg.__wbg_getFileHandle_9f23d09c2497fa5f = function (arg0, arg1, arg2, arg3) {
545
836
  const ret = getObject(arg0).getFileHandle(getStringFromWasm0(arg1, arg2), getObject(arg3));
546
837
  return addHeapObject(ret);
547
838
  };
548
- imports.wbg.__wbg_getSize_e7dbd5ffa0b43df1 = function () {
839
+ imports.wbg.__wbg_getRandomValues_80578b2ff2a093ba = function () {
840
+ return handleError(function (arg0) {
841
+ globalThis.crypto.getRandomValues(getObject(arg0));
842
+ }, arguments);
843
+ };
844
+ imports.wbg.__wbg_getSize_56a06761973a6cd7 = function () {
549
845
  return handleError(function (arg0) {
550
846
  const ret = getObject(arg0).getSize();
551
847
  return ret;
552
848
  }, arguments);
553
849
  };
554
- imports.wbg.__wbg_get_67b2ba62fc30de12 = function () {
850
+ imports.wbg.__wbg_get_0da715ceaecea5c8 = function (arg0, arg1) {
851
+ const ret = getObject(arg0)[arg1 >>> 0];
852
+ return addHeapObject(ret);
853
+ };
854
+ imports.wbg.__wbg_get_458e874b43b18b25 = function () {
555
855
  return handleError(function (arg0, arg1) {
556
856
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
557
857
  return addHeapObject(ret);
558
858
  }, arguments);
559
859
  };
560
- imports.wbg.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
561
- const ret = getObject(arg0)[arg1 >>> 0];
860
+ imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function (arg0, arg1) {
861
+ const ret = getObject(arg0)[getObject(arg1)];
562
862
  return addHeapObject(ret);
563
863
  };
564
- imports.wbg.__wbg_has_a5ea9117f258a0ec = function () {
864
+ imports.wbg.__wbg_has_b89e451f638123e3 = function () {
565
865
  return handleError(function (arg0, arg1) {
566
866
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
567
867
  return ret;
568
868
  }, arguments);
569
869
  };
570
- imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
870
+ imports.wbg.__wbg_headers_29fec3c72865cd75 = function (arg0) {
571
871
  const ret = getObject(arg0).headers;
572
872
  return addHeapObject(ret);
573
873
  };
574
- imports.wbg.__wbg_instanceof_DomException_ed1ccb7aaf39034c = function (arg0) {
874
+ imports.wbg.__wbg_info_15c3631232fceddb = function (arg0, arg1, arg2, arg3) {
875
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
876
+ };
877
+ imports.wbg.__wbg_info_6cf68c1a86a92f6a = function (arg0) {
878
+ console.info(getObject(arg0));
879
+ };
880
+ imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function (arg0) {
881
+ let result;
882
+ try {
883
+ result = getObject(arg0) instanceof ArrayBuffer;
884
+ }
885
+ catch (_) {
886
+ result = false;
887
+ }
888
+ const ret = result;
889
+ return ret;
890
+ };
891
+ imports.wbg.__wbg_instanceof_DedicatedWorkerGlobalScope_a054a9af652220ba = function (arg0) {
892
+ let result;
893
+ try {
894
+ result = getObject(arg0) instanceof DedicatedWorkerGlobalScope;
895
+ }
896
+ catch (_) {
897
+ result = false;
898
+ }
899
+ const ret = result;
900
+ return ret;
901
+ };
902
+ imports.wbg.__wbg_instanceof_DomException_bd63c2a0e0b53ed5 = function (arg0) {
575
903
  let result;
576
904
  try {
577
905
  result = getObject(arg0) instanceof DOMException;
@@ -582,7 +910,18 @@ function __wbg_get_imports() {
582
910
  const ret = result;
583
911
  return ret;
584
912
  };
585
- imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
913
+ imports.wbg.__wbg_instanceof_FileSystemDirectoryHandle_ef2de8bfd438118c = function (arg0) {
914
+ let result;
915
+ try {
916
+ result = getObject(arg0) instanceof FileSystemDirectoryHandle;
917
+ }
918
+ catch (_) {
919
+ result = false;
920
+ }
921
+ const ret = result;
922
+ return ret;
923
+ };
924
+ imports.wbg.__wbg_instanceof_Response_50fde2cd696850bf = function (arg0) {
586
925
  let result;
587
926
  try {
588
927
  result = getObject(arg0) instanceof Response;
@@ -593,43 +932,83 @@ function __wbg_get_imports() {
593
932
  const ret = result;
594
933
  return ret;
595
934
  };
596
- imports.wbg.__wbg_iterator_9a24c88df860dc65 = function () {
935
+ imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function (arg0) {
936
+ let result;
937
+ try {
938
+ result = getObject(arg0) instanceof Uint8Array;
939
+ }
940
+ catch (_) {
941
+ result = false;
942
+ }
943
+ const ret = result;
944
+ return ret;
945
+ };
946
+ imports.wbg.__wbg_isArray_030cce220591fb41 = function (arg0) {
947
+ const ret = Array.isArray(getObject(arg0));
948
+ return ret;
949
+ };
950
+ imports.wbg.__wbg_isSafeInteger_1c0d1af5542e102a = function (arg0) {
951
+ const ret = Number.isSafeInteger(getObject(arg0));
952
+ return ret;
953
+ };
954
+ imports.wbg.__wbg_iterator_f370b34483c71a1c = function () {
597
955
  const ret = Symbol.iterator;
598
956
  return addHeapObject(ret);
599
957
  };
600
- imports.wbg.__wbg_kind_e326a1c6387aad5e = function (arg0) {
958
+ imports.wbg.__wbg_kind_56b64eb6cc62543d = function (arg0) {
601
959
  const ret = getObject(arg0).kind;
602
960
  return (__wbindgen_enum_FileSystemHandleKind.indexOf(ret) + 1 || 3) - 1;
603
961
  };
604
- imports.wbg.__wbg_length_a446193dc22c12f8 = function (arg0) {
962
+ imports.wbg.__wbg_length_186546c51cd61acd = function (arg0) {
605
963
  const ret = getObject(arg0).length;
606
964
  return ret;
607
965
  };
608
- imports.wbg.__wbg_name_f2d27098bfd843e7 = function (arg0, arg1) {
966
+ imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function (arg0) {
967
+ const ret = getObject(arg0).length;
968
+ return ret;
969
+ };
970
+ imports.wbg.__wbg_message_702ebc62fa8b0c7c = function (arg0, arg1) {
971
+ const ret = getObject(arg1).message;
972
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
973
+ const len1 = WASM_VECTOR_LEN;
974
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
975
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
976
+ };
977
+ imports.wbg.__wbg_metadata_new = function (arg0) {
978
+ const ret = Metadata.__wrap(arg0);
979
+ return addHeapObject(ret);
980
+ };
981
+ imports.wbg.__wbg_name_f75f535832c8ea6b = function (arg0, arg1) {
609
982
  const ret = getObject(arg1).name;
610
983
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
611
984
  const len1 = WASM_VECTOR_LEN;
612
985
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
613
986
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
614
987
  };
615
- imports.wbg.__wbg_navigator_0a9bf1120e24fec2 = function (arg0) {
988
+ imports.wbg.__wbg_navigator_bfaf1b0b0eb48da2 = function (arg0) {
616
989
  const ret = getObject(arg0).navigator;
617
990
  return addHeapObject(ret);
618
991
  };
619
- imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function () {
620
- return handleError(function () {
621
- const ret = new Headers();
622
- return addHeapObject(ret);
623
- }, arguments);
992
+ imports.wbg.__wbg_new_19c25a3f2fa63a02 = function () {
993
+ const ret = new Object();
994
+ return addHeapObject(ret);
995
+ };
996
+ imports.wbg.__wbg_new_1f3a344cf3123716 = function () {
997
+ const ret = new Array();
998
+ return addHeapObject(ret);
999
+ };
1000
+ imports.wbg.__wbg_new_2368e31ffa149431 = function (arg0) {
1001
+ const ret = new Int32Array(getObject(arg0));
1002
+ return addHeapObject(ret);
624
1003
  };
625
- imports.wbg.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
1004
+ imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function (arg0, arg1) {
626
1005
  try {
627
1006
  var state0 = { a: arg0, b: arg1 };
628
1007
  var cb0 = (arg0, arg1) => {
629
1008
  const a = state0.a;
630
1009
  state0.a = 0;
631
1010
  try {
632
- return __wbg_adapter_66(a, state0.b, arg0, arg1);
1011
+ return __wbg_adapter_102(a, state0.b, arg0, arg1);
633
1012
  }
634
1013
  finally {
635
1014
  state0.a = a;
@@ -642,178 +1021,352 @@ function __wbg_get_imports() {
642
1021
  state0.a = state0.b = 0;
643
1022
  }
644
1023
  };
645
- imports.wbg.__wbg_new_405e22f390576ce2 = function () {
646
- const ret = new Object();
1024
+ imports.wbg.__wbg_new_2ff1f68f3676ea53 = function () {
1025
+ const ret = new Map();
647
1026
  return addHeapObject(ret);
648
1027
  };
649
- imports.wbg.__wbg_new_a12002a7f91c75be = function (arg0) {
1028
+ imports.wbg.__wbg_new_638ebfaedbf32a5e = function (arg0) {
650
1029
  const ret = new Uint8Array(getObject(arg0));
651
1030
  return addHeapObject(ret);
652
1031
  };
653
- imports.wbg.__wbg_new_e25e5aab09ff45db = function () {
1032
+ imports.wbg.__wbg_new_66b9434b4e59b63e = function () {
654
1033
  return handleError(function () {
655
1034
  const ret = new AbortController();
656
1035
  return addHeapObject(ret);
657
1036
  }, arguments);
658
1037
  };
659
- imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
1038
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function () {
1039
+ const ret = new Error();
1040
+ return addHeapObject(ret);
1041
+ };
1042
+ imports.wbg.__wbg_new_9b2344bc56f77a2b = function (arg0) {
1043
+ const ret = new FileSystemObserver(getObject(arg0));
1044
+ return addHeapObject(ret);
1045
+ };
1046
+ imports.wbg.__wbg_new_9d476835fd376de6 = function () {
1047
+ return handleError(function (arg0, arg1) {
1048
+ const ret = new Worker(getStringFromWasm0(arg0, arg1));
1049
+ return addHeapObject(ret);
1050
+ }, arguments);
1051
+ };
1052
+ imports.wbg.__wbg_new_f6e53210afea8e45 = function () {
1053
+ return handleError(function () {
1054
+ const ret = new Headers();
1055
+ return addHeapObject(ret);
1056
+ }, arguments);
1057
+ };
1058
+ imports.wbg.__wbg_newfromslice_074c56947bd43469 = function (arg0, arg1) {
1059
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1060
+ return addHeapObject(ret);
1061
+ };
1062
+ imports.wbg.__wbg_newnoargs_254190557c45b4ec = function (arg0, arg1) {
660
1063
  const ret = new Function(getStringFromWasm0(arg0, arg1));
661
1064
  return addHeapObject(ret);
662
1065
  };
663
- imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
664
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1066
+ imports.wbg.__wbg_newwithlength_a167dcc7aaa3ba77 = function (arg0) {
1067
+ const ret = new Uint8Array(arg0 >>> 0);
665
1068
  return addHeapObject(ret);
666
1069
  };
667
- imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
1070
+ imports.wbg.__wbg_newwithoptions_4fd7ce7655102e6f = function () {
1071
+ return handleError(function (arg0, arg1, arg2) {
1072
+ const ret = new Worker(getStringFromWasm0(arg0, arg1), getObject(arg2));
1073
+ return addHeapObject(ret);
1074
+ }, arguments);
1075
+ };
1076
+ imports.wbg.__wbg_newwithstrandinit_b5d168a29a3fd85f = function () {
668
1077
  return handleError(function (arg0, arg1, arg2) {
669
1078
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
670
1079
  return addHeapObject(ret);
671
1080
  }, arguments);
672
1081
  };
673
- imports.wbg.__wbg_next_25feadfc0913fea9 = function (arg0) {
674
- const ret = getObject(arg0).next;
675
- return addHeapObject(ret);
1082
+ imports.wbg.__wbg_newwithstrsequence_a1a92f1d042bca10 = function () {
1083
+ return handleError(function (arg0) {
1084
+ const ret = new Blob(getObject(arg0));
1085
+ return addHeapObject(ret);
1086
+ }, arguments);
1087
+ };
1088
+ imports.wbg.__wbg_newwithstrsequenceandoptions_5b257525e688af7d = function () {
1089
+ return handleError(function (arg0, arg1) {
1090
+ const ret = new Blob(getObject(arg0), getObject(arg1));
1091
+ return addHeapObject(ret);
1092
+ }, arguments);
676
1093
  };
677
- imports.wbg.__wbg_next_6574e1a8a62d1055 = function () {
1094
+ imports.wbg.__wbg_next_1142e1658f75ec63 = function () {
678
1095
  return handleError(function (arg0) {
679
1096
  const ret = getObject(arg0).next();
680
1097
  return addHeapObject(ret);
681
1098
  }, arguments);
682
1099
  };
683
- imports.wbg.__wbg_next_c3ab0d59847b3b5c = function () {
1100
+ imports.wbg.__wbg_next_5b3530e612fde77d = function (arg0) {
1101
+ const ret = getObject(arg0).next;
1102
+ return addHeapObject(ret);
1103
+ };
1104
+ imports.wbg.__wbg_next_692e82279131b03c = function () {
684
1105
  return handleError(function (arg0) {
685
1106
  const ret = getObject(arg0).next();
686
1107
  return addHeapObject(ret);
687
1108
  }, arguments);
688
1109
  };
689
- imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
1110
+ imports.wbg.__wbg_now_0dc4920a47cf7280 = function (arg0) {
1111
+ const ret = getObject(arg0).now();
1112
+ return ret;
1113
+ };
1114
+ imports.wbg.__wbg_now_1e80617bcee43265 = function () {
1115
+ const ret = Date.now();
1116
+ return ret;
1117
+ };
1118
+ imports.wbg.__wbg_observe_a98641e2bc5e6a17 = function (arg0, arg1, arg2) {
1119
+ const ret = getObject(arg0).observe(getObject(arg1), getObject(arg2));
1120
+ return addHeapObject(ret);
1121
+ };
1122
+ imports.wbg.__wbg_of_26ef42cc9a4270a1 = function (arg0, arg1, arg2) {
1123
+ const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));
1124
+ return addHeapObject(ret);
1125
+ };
1126
+ imports.wbg.__wbg_performance_6adc3b899e448a23 = function (arg0) {
1127
+ const ret = getObject(arg0).performance;
1128
+ return addHeapObject(ret);
1129
+ };
1130
+ imports.wbg.__wbg_postMessage_38909232d65f5870 = function () {
1131
+ return handleError(function (arg0, arg1) {
1132
+ getObject(arg0).postMessage(getObject(arg1));
1133
+ }, arguments);
1134
+ };
1135
+ imports.wbg.__wbg_postMessage_50e57097ede408b9 = function () {
1136
+ return handleError(function (arg0, arg1) {
1137
+ getObject(arg0).postMessage(getObject(arg1));
1138
+ }, arguments);
1139
+ };
1140
+ imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function (arg0, arg1, arg2) {
1141
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1142
+ };
1143
+ imports.wbg.__wbg_push_330b2eb93e4e1212 = function (arg0, arg1) {
1144
+ const ret = getObject(arg0).push(getObject(arg1));
1145
+ return ret;
1146
+ };
1147
+ imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function (arg0) {
690
1148
  queueMicrotask(getObject(arg0));
691
1149
  };
692
- imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function (arg0) {
1150
+ imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function (arg0) {
693
1151
  const ret = getObject(arg0).queueMicrotask;
694
1152
  return addHeapObject(ret);
695
1153
  };
696
- imports.wbg.__wbg_read_f8fdd4b410209222 = function () {
1154
+ imports.wbg.__wbg_random_7ed63a0b38ee3b75 = function () {
1155
+ const ret = Math.random();
1156
+ return ret;
1157
+ };
1158
+ imports.wbg.__wbg_read_a43bb46027f02ee9 = function () {
697
1159
  return handleError(function (arg0, arg1, arg2, arg3) {
698
1160
  const ret = getObject(arg0).read(getArrayU8FromWasm0(arg1, arg2), getObject(arg3));
699
1161
  return ret;
700
1162
  }, arguments);
701
1163
  };
702
- imports.wbg.__wbg_resolve_4851785c9c5f573d = function (arg0) {
1164
+ imports.wbg.__wbg_read_c8c5b5e1fd6b9760 = function () {
1165
+ return handleError(function (arg0, arg1, arg2) {
1166
+ const ret = getObject(arg0).read(getArrayU8FromWasm0(arg1, arg2));
1167
+ return ret;
1168
+ }, arguments);
1169
+ };
1170
+ imports.wbg.__wbg_relativePathComponents_71b7af6cc056eaa1 = function (arg0) {
1171
+ const ret = getObject(arg0).relativePathComponents;
1172
+ return addHeapObject(ret);
1173
+ };
1174
+ imports.wbg.__wbg_removeEntry_beea80e74f68ed5b = function (arg0, arg1, arg2, arg3) {
1175
+ const ret = getObject(arg0).removeEntry(getStringFromWasm0(arg1, arg2), getObject(arg3));
1176
+ return addHeapObject(ret);
1177
+ };
1178
+ imports.wbg.__wbg_resolve_4055c623acdd6a1b = function (arg0) {
703
1179
  const ret = Promise.resolve(getObject(arg0));
704
1180
  return addHeapObject(ret);
705
1181
  };
706
- imports.wbg.__wbg_setTimeout_73ce8df12de4f2f2 = function (arg0, arg1) {
1182
+ imports.wbg.__wbg_revokeObjectURL_651b859c81bf1af0 = function () {
1183
+ return handleError(function (arg0, arg1) {
1184
+ URL.revokeObjectURL(getStringFromWasm0(arg0, arg1));
1185
+ }, arguments);
1186
+ };
1187
+ imports.wbg.__wbg_setTimeout_2b339866a2aa3789 = function (arg0, arg1) {
707
1188
  const ret = setTimeout(getObject(arg0), arg1);
708
1189
  return addHeapObject(ret);
709
1190
  };
710
- imports.wbg.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
711
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1191
+ imports.wbg.__wbg_setTimeout_63008613644b07af = function () {
1192
+ return handleError(function (arg0, arg1, arg2) {
1193
+ const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
1194
+ return addHeapObject(ret);
1195
+ }, arguments);
1196
+ };
1197
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
1198
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1199
+ };
1200
+ imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function (arg0, arg1, arg2) {
1201
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
712
1202
  };
713
- imports.wbg.__wbg_setat_2a071a392643c10e = function (arg0, arg1) {
1203
+ imports.wbg.__wbg_set_b7f1cf4fae26fe2a = function (arg0, arg1, arg2) {
1204
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1205
+ return addHeapObject(ret);
1206
+ };
1207
+ imports.wbg.__wbg_setat_f8fc70f546036b10 = function (arg0, arg1) {
714
1208
  getObject(arg0).at = arg1;
715
1209
  };
716
- imports.wbg.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
1210
+ imports.wbg.__wbg_setbody_c8460bdf44147df8 = function (arg0, arg1) {
717
1211
  getObject(arg0).body = getObject(arg1);
718
1212
  };
719
- imports.wbg.__wbg_setcreate_139bad94b2874fb5 = function (arg0, arg1) {
1213
+ imports.wbg.__wbg_setcache_90ca4ad8a8ad40d3 = function (arg0, arg1) {
1214
+ getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
1215
+ };
1216
+ imports.wbg.__wbg_setcreate_1eb73f4ea713c1ad = function (arg0, arg1) {
720
1217
  getObject(arg0).create = arg1 !== 0;
721
1218
  };
722
- imports.wbg.__wbg_setcreate_4ca762e23d9f78da = function (arg0, arg1) {
1219
+ imports.wbg.__wbg_setcreate_2d32aa4bbcd1d7af = function (arg0, arg1) {
723
1220
  getObject(arg0).create = arg1 !== 0;
724
1221
  };
725
- imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function (arg0, arg1) {
1222
+ imports.wbg.__wbg_setcredentials_9cd60d632c9d5dfc = function (arg0, arg1) {
726
1223
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
727
1224
  };
728
- imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function (arg0, arg1) {
1225
+ imports.wbg.__wbg_setheaders_0052283e2f3503d1 = function (arg0, arg1) {
729
1226
  getObject(arg0).headers = getObject(arg1);
730
1227
  };
731
- imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function (arg0, arg1, arg2) {
1228
+ imports.wbg.__wbg_setmethod_9b504d5b855b329c = function (arg0, arg1, arg2) {
732
1229
  getObject(arg0).method = getStringFromWasm0(arg1, arg2);
733
1230
  };
734
- imports.wbg.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
1231
+ imports.wbg.__wbg_setmode_a23e1a2ad8b512f8 = function (arg0, arg1) {
735
1232
  getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
736
1233
  };
737
- imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
1234
+ imports.wbg.__wbg_setname_6c6a9da905405176 = function (arg0, arg1, arg2) {
1235
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
1236
+ };
1237
+ imports.wbg.__wbg_setonerror_d1f7d212a8fc3389 = function (arg0, arg1) {
1238
+ getObject(arg0).onerror = getObject(arg1);
1239
+ };
1240
+ imports.wbg.__wbg_setonmessage_c943f7891405ab22 = function (arg0, arg1) {
1241
+ getObject(arg0).onmessage = getObject(arg1);
1242
+ };
1243
+ imports.wbg.__wbg_setrecursive_072599988d5f7e8d = function (arg0, arg1) {
1244
+ getObject(arg0).recursive = arg1 !== 0;
1245
+ };
1246
+ imports.wbg.__wbg_setrecursive_0b3e76f293311ab5 = function (arg0, arg1) {
1247
+ getObject(arg0).recursive = arg1 !== 0;
1248
+ };
1249
+ imports.wbg.__wbg_setsignal_8c45ad1247a74809 = function (arg0, arg1) {
738
1250
  getObject(arg0).signal = getObject(arg1);
739
1251
  };
740
- imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
1252
+ imports.wbg.__wbg_settype_298968e371b58a33 = function (arg0, arg1, arg2) {
1253
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1254
+ };
1255
+ imports.wbg.__wbg_settype_3dc790721d11b6f5 = function (arg0, arg1) {
1256
+ getObject(arg0).type = __wbindgen_enum_WorkerType[arg1];
1257
+ };
1258
+ imports.wbg.__wbg_signal_da4d466ce86118b5 = function (arg0) {
741
1259
  const ret = getObject(arg0).signal;
742
1260
  return addHeapObject(ret);
743
1261
  };
744
- imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
1262
+ imports.wbg.__wbg_size_8f84e7768fba0589 = function (arg0) {
1263
+ const ret = getObject(arg0).size;
1264
+ return ret;
1265
+ };
1266
+ imports.wbg.__wbg_slice_337130a0e2389850 = function () {
1267
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1268
+ const ret = getObject(arg0).slice(arg1, arg2, getStringFromWasm0(arg3, arg4));
1269
+ return addHeapObject(ret);
1270
+ }, arguments);
1271
+ };
1272
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
1273
+ const ret = getObject(arg1).stack;
1274
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
1275
+ const len1 = WASM_VECTOR_LEN;
1276
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1277
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1278
+ };
1279
+ imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function () {
745
1280
  const ret = typeof global === 'undefined' ? null : global;
746
1281
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
747
1282
  };
748
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
1283
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function () {
749
1284
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
750
1285
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
751
1286
  };
752
- imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
1287
+ imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function () {
753
1288
  const ret = typeof self === 'undefined' ? null : self;
754
1289
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
755
1290
  };
756
- imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
1291
+ imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function () {
757
1292
  const ret = typeof window === 'undefined' ? null : window;
758
1293
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
759
1294
  };
760
- imports.wbg.__wbg_status_f6360336ca686bf0 = function (arg0) {
1295
+ imports.wbg.__wbg_status_3fea3036088621d6 = function (arg0) {
761
1296
  const ret = getObject(arg0).status;
762
1297
  return ret;
763
1298
  };
764
- imports.wbg.__wbg_storage_07eb754b88898955 = function (arg0) {
1299
+ imports.wbg.__wbg_storage_32b4ac688c114c3d = function (arg0) {
765
1300
  const ret = getObject(arg0).storage;
766
1301
  return addHeapObject(ret);
767
1302
  };
768
- imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function () {
1303
+ imports.wbg.__wbg_stringify_b98c93d0a190446a = function () {
769
1304
  return handleError(function (arg0) {
770
1305
  const ret = JSON.stringify(getObject(arg0));
771
1306
  return addHeapObject(ret);
772
1307
  }, arguments);
773
1308
  };
774
- imports.wbg.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
775
- const ret = getObject(arg0).then(getObject(arg1));
1309
+ imports.wbg.__wbg_subarray_70fd07feefe14294 = function (arg0, arg1, arg2) {
1310
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
776
1311
  return addHeapObject(ret);
777
1312
  };
778
- imports.wbg.__wbg_then_48b406749878a531 = function (arg0, arg1, arg2) {
1313
+ imports.wbg.__wbg_then_b33a773d723afa3e = function (arg0, arg1, arg2) {
779
1314
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
780
1315
  return addHeapObject(ret);
781
1316
  };
782
- imports.wbg.__wbg_toString_5285597960676b7b = function (arg0) {
1317
+ imports.wbg.__wbg_then_e22500defe16819f = function (arg0, arg1) {
1318
+ const ret = getObject(arg0).then(getObject(arg1));
1319
+ return addHeapObject(ret);
1320
+ };
1321
+ imports.wbg.__wbg_toString_78df35411a4fd40c = function (arg0) {
783
1322
  const ret = getObject(arg0).toString();
784
1323
  return addHeapObject(ret);
785
1324
  };
786
- imports.wbg.__wbg_truncate_29261a6365c72b01 = function () {
1325
+ imports.wbg.__wbg_truncate_0fe935591188a14c = function () {
787
1326
  return handleError(function (arg0, arg1) {
788
1327
  getObject(arg0).truncate(arg1 >>> 0);
789
1328
  }, arguments);
790
1329
  };
791
- imports.wbg.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
1330
+ imports.wbg.__wbg_type_7ef9242007bd4c65 = function (arg0) {
1331
+ const ret = getObject(arg0).type;
1332
+ return (__wbindgen_enum_FileSystemChangeRecordType.indexOf(ret) + 1 || 7) - 1;
1333
+ };
1334
+ imports.wbg.__wbg_url_e5720dfacf77b05e = function (arg0, arg1) {
792
1335
  const ret = getObject(arg1).url;
793
1336
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
794
1337
  const len1 = WASM_VECTOR_LEN;
795
1338
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
796
1339
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
797
1340
  };
798
- imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function (arg0) {
1341
+ imports.wbg.__wbg_value_ade0f87d71d4aecc = function (arg0) {
799
1342
  const ret = getObject(arg0).value;
800
1343
  return addHeapObject(ret);
801
1344
  };
802
- imports.wbg.__wbg_write_530d3c84df874f53 = function () {
803
- return handleError(function (arg0, arg1, arg2, arg3) {
804
- const ret = getObject(arg0).write(getArrayU8FromWasm0(arg1, arg2), getObject(arg3));
805
- return ret;
806
- }, arguments);
1345
+ imports.wbg.__wbg_value_dd9372230531eade = function (arg0) {
1346
+ const ret = getObject(arg0).value;
1347
+ return addHeapObject(ret);
1348
+ };
1349
+ imports.wbg.__wbg_waitAsync_213e79486ffecd82 = function () {
1350
+ const ret = Atomics.waitAsync;
1351
+ return addHeapObject(ret);
807
1352
  };
808
- imports.wbg.__wbindgen_array_new = function () {
809
- const ret = [];
1353
+ imports.wbg.__wbg_waitAsync_402c2db0645a44e0 = function (arg0, arg1, arg2) {
1354
+ const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
810
1355
  return addHeapObject(ret);
811
1356
  };
812
- imports.wbg.__wbindgen_array_push = function (arg0, arg1) {
813
- getObject(arg0).push(takeObject(arg1));
1357
+ imports.wbg.__wbg_warn_90eb15d986910fe9 = function (arg0, arg1, arg2, arg3) {
1358
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
814
1359
  };
815
- imports.wbg.__wbindgen_cb_drop = function (arg0) {
816
- const obj = takeObject(arg0).original;
1360
+ imports.wbg.__wbg_warn_e2ada06313f92f09 = function (arg0) {
1361
+ console.warn(getObject(arg0));
1362
+ };
1363
+ imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function (arg0) {
1364
+ const v = getObject(arg0);
1365
+ const ret = typeof (v) === 'boolean' ? v : undefined;
1366
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1367
+ };
1368
+ imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function (arg0) {
1369
+ const obj = getObject(arg0).original;
817
1370
  if (obj.cnt-- == 1) {
818
1371
  obj.a = 0;
819
1372
  return true;
@@ -821,46 +1374,60 @@ function __wbg_get_imports() {
821
1374
  const ret = false;
822
1375
  return ret;
823
1376
  };
824
- imports.wbg.__wbindgen_closure_wrapper1051 = function (arg0, arg1, arg2) {
825
- const ret = makeMutClosure(arg0, arg1, 172, __wbg_adapter_28);
826
- return addHeapObject(ret);
827
- };
828
- imports.wbg.__wbindgen_closure_wrapper1669 = function (arg0, arg1, arg2) {
829
- const ret = makeMutClosure(arg0, arg1, 443, __wbg_adapter_31);
830
- return addHeapObject(ret);
831
- };
832
- imports.wbg.__wbindgen_debug_string = function (arg0, arg1) {
1377
+ imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function (arg0, arg1) {
833
1378
  const ret = debugString(getObject(arg1));
834
1379
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
835
1380
  const len1 = WASM_VECTOR_LEN;
836
1381
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
837
1382
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
838
1383
  };
839
- imports.wbg.__wbindgen_is_function = function (arg0) {
1384
+ imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function (arg0, arg1) {
1385
+ const ret = getObject(arg0) in getObject(arg1);
1386
+ return ret;
1387
+ };
1388
+ imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function (arg0) {
840
1389
  const ret = typeof (getObject(arg0)) === 'function';
841
1390
  return ret;
842
1391
  };
843
- imports.wbg.__wbindgen_is_object = function (arg0) {
1392
+ imports.wbg.__wbg_wbindgenisnull_f3037694abe4d97a = function (arg0) {
1393
+ const ret = getObject(arg0) === null;
1394
+ return ret;
1395
+ };
1396
+ imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function (arg0) {
844
1397
  const val = getObject(arg0);
845
1398
  const ret = typeof (val) === 'object' && val !== null;
846
1399
  return ret;
847
1400
  };
848
- imports.wbg.__wbindgen_is_undefined = function (arg0) {
1401
+ imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function (arg0) {
1402
+ const ret = typeof (getObject(arg0)) === 'string';
1403
+ return ret;
1404
+ };
1405
+ imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function (arg0) {
849
1406
  const ret = getObject(arg0) === undefined;
850
1407
  return ret;
851
1408
  };
852
- imports.wbg.__wbindgen_memory = function () {
1409
+ imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function (arg0, arg1) {
1410
+ const ret = getObject(arg0) == getObject(arg1);
1411
+ return ret;
1412
+ };
1413
+ imports.wbg.__wbg_wbindgenmemory_d84da70f7c42d172 = function () {
853
1414
  const ret = wasm.memory;
854
1415
  return addHeapObject(ret);
855
1416
  };
856
- imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
857
- const ret = getObject(arg0);
1417
+ imports.wbg.__wbg_wbindgenmodule_7e59019f6366ff9c = function () {
1418
+ const ret = __wbg_init.__wbindgen_wasm_module;
858
1419
  return addHeapObject(ret);
859
1420
  };
860
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
861
- takeObject(arg0);
1421
+ imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function (arg0, arg1) {
1422
+ const obj = getObject(arg1);
1423
+ const ret = typeof (obj) === 'number' ? obj : undefined;
1424
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1425
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1426
+ };
1427
+ imports.wbg.__wbg_wbindgenrethrow_01815c9239d70cc2 = function (arg0) {
1428
+ throw takeObject(arg0);
862
1429
  };
863
- imports.wbg.__wbindgen_string_get = function (arg0, arg1) {
1430
+ imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function (arg0, arg1) {
864
1431
  const obj = getObject(arg1);
865
1432
  const ret = typeof (obj) === 'string' ? obj : undefined;
866
1433
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
@@ -868,49 +1435,154 @@ function __wbg_get_imports() {
868
1435
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
869
1436
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
870
1437
  };
871
- imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
1438
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function (arg0, arg1) {
1439
+ throw new Error(getStringFromWasm0(arg0, arg1));
1440
+ };
1441
+ imports.wbg.__wbg_write_9ac6a5f58a8c835c = function () {
1442
+ return handleError(function (arg0, arg1, arg2, arg3) {
1443
+ const ret = getObject(arg0).write(getArrayU8FromWasm0(arg1, arg2), getObject(arg3));
1444
+ return ret;
1445
+ }, arguments);
1446
+ };
1447
+ imports.wbg.__wbg_write_b652d19332a4ce1e = function () {
1448
+ return handleError(function (arg0, arg1, arg2) {
1449
+ const ret = getObject(arg0).write(getArrayU8FromWasm0(arg1, arg2));
1450
+ return ret;
1451
+ }, arguments);
1452
+ };
1453
+ imports.wbg.__wbindgen_cast_1ca0782ec1faf942 = function (arg0, arg1) {
1454
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 604, function: Function { arguments: [], shim_idx: 605, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1455
+ const ret = makeMutClosure(arg0, arg1, 604, __wbg_adapter_25);
1456
+ return addHeapObject(ret);
1457
+ };
1458
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
1459
+ // Cast intrinsic for `Ref(String) -> Externref`.
872
1460
  const ret = getStringFromWasm0(arg0, arg1);
873
1461
  return addHeapObject(ret);
874
1462
  };
875
- imports.wbg.__wbindgen_throw = function (arg0, arg1) {
876
- throw new Error(getStringFromWasm0(arg0, arg1));
1463
+ imports.wbg.__wbindgen_cast_2bf53ab5a6985333 = function (arg0, arg1) {
1464
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8791, function: Function { arguments: [Externref], shim_idx: 8792, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1465
+ const ret = makeMutClosure(arg0, arg1, 8791, __wbg_adapter_17);
1466
+ return addHeapObject(ret);
1467
+ };
1468
+ imports.wbg.__wbindgen_cast_33aa391726f172ef = function (arg0, arg1) {
1469
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 9074, function: Function { arguments: [], shim_idx: 605, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1470
+ const ret = makeMutClosure(arg0, arg1, 9074, __wbg_adapter_25);
1471
+ return addHeapObject(ret);
1472
+ };
1473
+ imports.wbg.__wbindgen_cast_34e5558c5d1de712 = function (arg0, arg1) {
1474
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8791, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 8792, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1475
+ const ret = makeMutClosure(arg0, arg1, 8791, __wbg_adapter_17);
1476
+ return addHeapObject(ret);
1477
+ };
1478
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function (arg0) {
1479
+ // Cast intrinsic for `U64 -> Externref`.
1480
+ const ret = BigInt.asUintN(64, arg0);
1481
+ return addHeapObject(ret);
1482
+ };
1483
+ imports.wbg.__wbindgen_cast_4a3e076a883393e0 = function (arg0, arg1) {
1484
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 9058, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 9059, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1485
+ const ret = makeClosure(arg0, arg1, 9058, __wbg_adapter_22);
1486
+ return addHeapObject(ret);
1487
+ };
1488
+ imports.wbg.__wbindgen_cast_690c59a3c7b902df = function (arg0, arg1) {
1489
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8791, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 8792, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1490
+ const ret = makeMutClosure(arg0, arg1, 8791, __wbg_adapter_17);
1491
+ return addHeapObject(ret);
1492
+ };
1493
+ imports.wbg.__wbindgen_cast_76322aab70622876 = function (arg0, arg1) {
1494
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
1495
+ wasm.__wbindgen_export_4(arg0, arg1 * 4, 4);
1496
+ // Cast intrinsic for `Vector(NamedExternref("DirEntry")) -> Externref`.
1497
+ const ret = v0;
1498
+ return addHeapObject(ret);
1499
+ };
1500
+ imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function (arg0, arg1) {
1501
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
1502
+ wasm.__wbindgen_export_4(arg0, arg1 * 1, 1);
1503
+ // Cast intrinsic for `Vector(U8) -> Externref`.
1504
+ const ret = v0;
1505
+ return addHeapObject(ret);
1506
+ };
1507
+ imports.wbg.__wbindgen_cast_9a09b473951e479b = function (arg0, arg1) {
1508
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 9058, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 9072, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1509
+ const ret = makeMutClosure(arg0, arg1, 9058, __wbg_adapter_4);
1510
+ return addHeapObject(ret);
1511
+ };
1512
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function (arg0) {
1513
+ // Cast intrinsic for `I64 -> Externref`.
1514
+ const ret = arg0;
1515
+ return addHeapObject(ret);
1516
+ };
1517
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
1518
+ // Cast intrinsic for `F64 -> Externref`.
1519
+ const ret = arg0;
1520
+ return addHeapObject(ret);
1521
+ };
1522
+ imports.wbg.__wbindgen_link_dd5153a359f2e504 = function (arg0) {
1523
+ const val = `onmessage = function (ev) {
1524
+ let [ia, index, value] = ev.data;
1525
+ ia = new Int32Array(ia.buffer);
1526
+ let result = Atomics.wait(ia, index, value);
1527
+ postMessage(result);
1528
+ };
1529
+ `;
1530
+ const ret = typeof URL.createObjectURL === 'undefined' ? "data:application/javascript," + encodeURIComponent(val) : URL.createObjectURL(new Blob([val], { type: "text/javascript" }));
1531
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
1532
+ const len1 = WASM_VECTOR_LEN;
1533
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1534
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1535
+ };
1536
+ imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
1537
+ const ret = getObject(arg0);
1538
+ return addHeapObject(ret);
1539
+ };
1540
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
1541
+ takeObject(arg0);
877
1542
  };
878
1543
  return imports;
879
1544
  }
880
1545
  function __wbg_init_memory(imports, memory) {
1546
+ imports.wbg.memory = memory || new WebAssembly.Memory({ initial: 128, maximum: 16384, shared: true });
881
1547
  }
882
- function __wbg_finalize_init(instance, module) {
1548
+ function __wbg_finalize_init(instance, module, thread_stack_size) {
883
1549
  wasm = instance.exports;
884
1550
  __wbg_init.__wbindgen_wasm_module = module;
885
1551
  cachedDataViewMemory0 = null;
886
1552
  cachedUint8ArrayMemory0 = null;
1553
+ if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) {
1554
+ throw 'invalid stack size';
1555
+ }
1556
+ wasm.__wbindgen_start(thread_stack_size);
887
1557
  return wasm;
888
1558
  }
889
- function initSync(module) {
1559
+ function initSync(module, memory) {
890
1560
  if (wasm !== undefined)
891
1561
  return wasm;
1562
+ let thread_stack_size;
892
1563
  if (typeof module !== 'undefined') {
893
1564
  if (Object.getPrototypeOf(module) === Object.prototype) {
894
- ({ module } = module);
1565
+ ({ module, memory, thread_stack_size } = module);
895
1566
  }
896
1567
  else {
897
1568
  console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
898
1569
  }
899
1570
  }
900
1571
  const imports = __wbg_get_imports();
901
- __wbg_init_memory(imports);
1572
+ __wbg_init_memory(imports, memory);
902
1573
  if (!(module instanceof WebAssembly.Module)) {
903
1574
  module = new WebAssembly.Module(module);
904
1575
  }
905
1576
  const instance = new WebAssembly.Instance(module, imports);
906
- return __wbg_finalize_init(instance, module);
1577
+ return __wbg_finalize_init(instance, module, thread_stack_size);
907
1578
  }
908
- async function __wbg_init(module_or_path) {
1579
+ async function __wbg_init(module_or_path, memory) {
909
1580
  if (wasm !== undefined)
910
1581
  return wasm;
1582
+ let thread_stack_size;
911
1583
  if (typeof module_or_path !== 'undefined') {
912
1584
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
913
- ({ module_or_path } = module_or_path);
1585
+ ({ module_or_path, memory, thread_stack_size } = module_or_path);
914
1586
  }
915
1587
  else {
916
1588
  console.warn('using deprecated parameters for the initialization function; pass a single object instead');
@@ -923,9 +1595,9 @@ async function __wbg_init(module_or_path) {
923
1595
  if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
924
1596
  module_or_path = fetch(module_or_path);
925
1597
  }
926
- __wbg_init_memory(imports);
1598
+ __wbg_init_memory(imports, memory);
927
1599
  const { instance, module } = await __wbg_load(await module_or_path, imports);
928
- return __wbg_finalize_init(instance, module);
1600
+ return __wbg_finalize_init(instance, module, thread_stack_size);
929
1601
  }
930
1602
  export { initSync };
931
1603
  export default __wbg_init;