@trust0/ridb-core 1.7.36 → 1.7.38

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.
@@ -43,6 +43,13 @@ function takeObject(idx) {
43
43
  dropObject(idx);
44
44
  return ret;
45
45
  }
46
+ function addHeapObject(obj) {
47
+ if (heap_next === heap.length) heap.push(heap.length + 1);
48
+ const idx = heap_next;
49
+ heap_next = heap[idx];
50
+ heap[idx] = obj;
51
+ return idx;
52
+ }
46
53
  var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
47
54
  throw Error("TextDecoder not available");
48
55
  } };
@@ -60,13 +67,6 @@ function getStringFromWasm0(ptr, len) {
60
67
  ptr = ptr >>> 0;
61
68
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
62
69
  }
63
- function addHeapObject(obj) {
64
- if (heap_next === heap.length) heap.push(heap.length + 1);
65
- const idx = heap_next;
66
- heap_next = heap[idx];
67
- heap[idx] = obj;
68
- return idx;
69
- }
70
70
  var WASM_VECTOR_LEN = 0;
71
71
  var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
72
72
  throw Error("TextEncoder not available");
@@ -218,7 +218,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
218
218
  return real;
219
219
  }
220
220
  function __wbg_adapter_56(arg0, arg1, arg2) {
221
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcf4fe6fd0b7ccc8d(arg0, arg1, addHeapObject(arg2));
221
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha7bc4bff3dafa2ad(arg0, arg1, addHeapObject(arg2));
222
222
  }
223
223
  function makeClosure(arg0, arg1, dtor, f) {
224
224
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
@@ -241,7 +241,7 @@ function makeClosure(arg0, arg1, dtor, f) {
241
241
  function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
242
242
  try {
243
243
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
244
- wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he6024291054ff5aa(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
244
+ wasm._dyn_core__ops__function__Fn__A_B_C___Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h804a1f09b692c771(retptr, arg0, arg1, addHeapObject(arg2), addHeapObject(arg3), addHeapObject(arg4));
245
245
  var r0 = getInt32Memory0()[retptr / 4 + 0];
246
246
  var r1 = getInt32Memory0()[retptr / 4 + 1];
247
247
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -254,7 +254,13 @@ function __wbg_adapter_59(arg0, arg1, arg2, arg3, arg4) {
254
254
  }
255
255
  }
256
256
  function __wbg_adapter_62(arg0, arg1, arg2) {
257
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb6eb1f8e3b5e56e9(arg0, arg1, addHeapObject(arg2));
257
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd4647cb021495324(arg0, arg1, addHeapObject(arg2));
258
+ }
259
+ var stack_pointer = 128;
260
+ function addBorrowedObject(obj) {
261
+ if (stack_pointer == 1) throw new Error("out of js stack");
262
+ heap[--stack_pointer] = obj;
263
+ return stack_pointer;
258
264
  }
259
265
  var cachedUint32Memory0 = null;
260
266
  function getUint32Memory0() {
@@ -273,13 +279,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
273
279
  }
274
280
  return result;
275
281
  }
276
- function main_js() {
277
- wasm.main_js();
278
- }
279
- function is_debug_mode() {
280
- const ret = wasm.is_debug_mode();
281
- return ret !== 0;
282
- }
283
282
  function _assertClass(instance, klass) {
284
283
  if (!(instance instanceof klass)) {
285
284
  throw new Error(`expected instance of ${klass.name}`);
@@ -302,36 +301,40 @@ function handleError(f, args) {
302
301
  wasm.__wbindgen_exn_store(addHeapObject(e));
303
302
  }
304
303
  }
305
- var stack_pointer = 128;
306
- function addBorrowedObject(obj) {
307
- if (stack_pointer == 1) throw new Error("out of js stack");
308
- heap[--stack_pointer] = obj;
309
- return stack_pointer;
304
+ function is_debug_mode() {
305
+ const ret = wasm.is_debug_mode();
306
+ return ret !== 0;
310
307
  }
311
- function __wbgtest_console_log(args) {
308
+ function main_js() {
309
+ wasm.main_js();
310
+ }
311
+ function __wbgtest_console_info(args) {
312
312
  try {
313
- wasm.__wbgtest_console_log(addBorrowedObject(args));
313
+ wasm.__wbgtest_console_info(addBorrowedObject(args));
314
314
  } finally {
315
315
  heap[stack_pointer++] = void 0;
316
316
  }
317
317
  }
318
- function __wbgtest_console_debug(args) {
318
+ function __wbgtest_console_warn(args) {
319
319
  try {
320
- wasm.__wbgtest_console_debug(addBorrowedObject(args));
320
+ wasm.__wbgtest_console_warn(addBorrowedObject(args));
321
321
  } finally {
322
322
  heap[stack_pointer++] = void 0;
323
323
  }
324
324
  }
325
- function __wbgtest_console_info(args) {
325
+ function __wbg_adapter_287(arg0, arg1) {
326
+ wasm.wasm_bindgen__convert__closures__invoke0_mut__hc6452fdbb8c4addc(arg0, arg1);
327
+ }
328
+ function __wbgtest_console_debug(args) {
326
329
  try {
327
- wasm.__wbgtest_console_info(addBorrowedObject(args));
330
+ wasm.__wbgtest_console_debug(addBorrowedObject(args));
328
331
  } finally {
329
332
  heap[stack_pointer++] = void 0;
330
333
  }
331
334
  }
332
- function __wbgtest_console_warn(args) {
335
+ function __wbgtest_console_log(args) {
333
336
  try {
334
- wasm.__wbgtest_console_warn(addBorrowedObject(args));
337
+ wasm.__wbgtest_console_log(addBorrowedObject(args));
335
338
  } finally {
336
339
  heap[stack_pointer++] = void 0;
337
340
  }
@@ -343,14 +346,11 @@ function __wbgtest_console_error(args) {
343
346
  heap[stack_pointer++] = void 0;
344
347
  }
345
348
  }
346
- function __wbg_adapter_297(arg0, arg1) {
347
- wasm.wasm_bindgen__convert__closures__invoke0_mut__hff00333f3d941090(arg0, arg1);
348
- }
349
- function __wbg_adapter_340(arg0, arg1, arg2, arg3, arg4) {
350
- wasm.wasm_bindgen__convert__closures__invoke3_mut__h703f9c33fd3008bf(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
349
+ function __wbg_adapter_378(arg0, arg1, arg2, arg3, arg4) {
350
+ wasm.wasm_bindgen__convert__closures__invoke3_mut__h2f203dbfa61ca113(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
351
351
  }
352
- function __wbg_adapter_397(arg0, arg1, arg2, arg3) {
353
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h97988f5fa0547d24(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
352
+ function __wbg_adapter_395(arg0, arg1, arg2, arg3) {
353
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h42aa995f02b6fdcb(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
354
354
  }
355
355
  var OpType = Object.freeze({
356
356
  /**
@@ -395,6 +395,32 @@ var BasePlugin = class {
395
395
  wasm.__wbg_baseplugin_free(ptr);
396
396
  }
397
397
  /**
398
+ * @returns {any}
399
+ */
400
+ get docCreateHook() {
401
+ const ret = wasm.baseplugin_get_doc_create_hook(this.__wbg_ptr);
402
+ return takeObject(ret);
403
+ }
404
+ /**
405
+ * @param {any} hook
406
+ */
407
+ set docCreateHook(hook) {
408
+ wasm.baseplugin_set_doc_create_hook(this.__wbg_ptr, addHeapObject(hook));
409
+ }
410
+ /**
411
+ * @returns {any}
412
+ */
413
+ get docRecoverHook() {
414
+ const ret = wasm.baseplugin_get_doc_recover_hook(this.__wbg_ptr);
415
+ return takeObject(ret);
416
+ }
417
+ /**
418
+ * @param {any} hook
419
+ */
420
+ set docRecoverHook(hook) {
421
+ wasm.baseplugin_set_doc_recover_hook(this.__wbg_ptr, addHeapObject(hook));
422
+ }
423
+ /**
398
424
  * @param {string} name
399
425
  */
400
426
  constructor(name) {
@@ -422,32 +448,6 @@ var BasePlugin = class {
422
448
  const ret = wasm.baseplugin_name(this.__wbg_ptr);
423
449
  return takeObject(ret);
424
450
  }
425
- /**
426
- * @returns {any}
427
- */
428
- get docCreateHook() {
429
- const ret = wasm.baseplugin_get_doc_create_hook(this.__wbg_ptr);
430
- return takeObject(ret);
431
- }
432
- /**
433
- * @returns {any}
434
- */
435
- get docRecoverHook() {
436
- const ret = wasm.baseplugin_get_doc_recover_hook(this.__wbg_ptr);
437
- return takeObject(ret);
438
- }
439
- /**
440
- * @param {any} hook
441
- */
442
- set docCreateHook(hook) {
443
- wasm.baseplugin_set_doc_create_hook(this.__wbg_ptr, addHeapObject(hook));
444
- }
445
- /**
446
- * @param {any} hook
447
- */
448
- set docRecoverHook(hook) {
449
- wasm.baseplugin_set_doc_recover_hook(this.__wbg_ptr, addHeapObject(hook));
450
- }
451
451
  };
452
452
  var BaseStorageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
453
453
  }, unregister: () => {
@@ -464,66 +464,54 @@ var BaseStorage = class {
464
464
  wasm.__wbg_basestorage_free(ptr);
465
465
  }
466
466
  /**
467
- * Creates a new `BaseStorage` instance with the provided name and schema type.
468
- *
469
- * # Arguments
470
- *
471
- * * `name` - The name of the storage.
472
- * * `schema_type` - The schema type in `JsValue` format.
473
- *
474
- * # Returns
475
- *
476
- * * `Result<BaseStorage, JsValue>` - A result containing the new `BaseStorage` instance or an error.
477
467
  * @param {string} name
478
- * @param {object} schemas_js
479
- * @param {object | undefined} [options]
468
+ * @returns {any}
480
469
  */
481
- constructor(name, schemas_js, options) {
470
+ getOption(name) {
482
471
  try {
483
472
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
484
473
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
485
474
  const len0 = WASM_VECTOR_LEN;
486
- wasm.basestorage_new(retptr, ptr0, len0, addHeapObject(schemas_js), isLikeNone(options) ? 0 : addHeapObject(options));
475
+ wasm.basestorage_getOption(retptr, this.__wbg_ptr, ptr0, len0);
487
476
  var r0 = getInt32Memory0()[retptr / 4 + 0];
488
477
  var r1 = getInt32Memory0()[retptr / 4 + 1];
489
478
  var r2 = getInt32Memory0()[retptr / 4 + 2];
490
479
  if (r2) {
491
480
  throw takeObject(r1);
492
481
  }
493
- this.__wbg_ptr = r0 >>> 0;
494
- return this;
482
+ return takeObject(r0);
495
483
  } finally {
496
484
  wasm.__wbindgen_add_to_stack_pointer(16);
497
485
  }
498
486
  }
499
487
  /**
500
- * @returns {any}
488
+ * @param {string} name
489
+ * @returns {Schema}
501
490
  */
502
- addIndexSchemas() {
491
+ getSchema(name) {
503
492
  try {
504
493
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
505
- wasm.basestorage_addIndexSchemas(retptr, this.__wbg_ptr);
494
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
495
+ const len0 = WASM_VECTOR_LEN;
496
+ wasm.basestorage_getSchema(retptr, this.__wbg_ptr, ptr0, len0);
506
497
  var r0 = getInt32Memory0()[retptr / 4 + 0];
507
498
  var r1 = getInt32Memory0()[retptr / 4 + 1];
508
499
  var r2 = getInt32Memory0()[retptr / 4 + 2];
509
500
  if (r2) {
510
501
  throw takeObject(r1);
511
502
  }
512
- return takeObject(r0);
503
+ return Schema.__wrap(r0);
513
504
  } finally {
514
505
  wasm.__wbindgen_add_to_stack_pointer(16);
515
506
  }
516
507
  }
517
508
  /**
518
- * @param {string} name
519
509
  * @returns {any}
520
510
  */
521
- getOption(name) {
511
+ addIndexSchemas() {
522
512
  try {
523
513
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
524
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
525
- const len0 = WASM_VECTOR_LEN;
526
- wasm.basestorage_getOption(retptr, this.__wbg_ptr, ptr0, len0);
514
+ wasm.basestorage_addIndexSchemas(retptr, this.__wbg_ptr);
527
515
  var r0 = getInt32Memory0()[retptr / 4 + 0];
528
516
  var r1 = getInt32Memory0()[retptr / 4 + 1];
529
517
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -536,22 +524,34 @@ var BaseStorage = class {
536
524
  }
537
525
  }
538
526
  /**
527
+ * Creates a new `BaseStorage` instance with the provided name and schema type.
528
+ *
529
+ * # Arguments
530
+ *
531
+ * * `name` - The name of the storage.
532
+ * * `schema_type` - The schema type in `JsValue` format.
533
+ *
534
+ * # Returns
535
+ *
536
+ * * `Result<BaseStorage, JsValue>` - A result containing the new `BaseStorage` instance or an error.
539
537
  * @param {string} name
540
- * @returns {Schema}
538
+ * @param {object} schemas_js
539
+ * @param {object | undefined} [options]
541
540
  */
542
- getSchema(name) {
541
+ constructor(name, schemas_js, options) {
543
542
  try {
544
543
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
545
544
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
546
545
  const len0 = WASM_VECTOR_LEN;
547
- wasm.basestorage_getSchema(retptr, this.__wbg_ptr, ptr0, len0);
546
+ wasm.basestorage_new(retptr, ptr0, len0, addHeapObject(schemas_js), isLikeNone(options) ? 0 : addHeapObject(options));
548
547
  var r0 = getInt32Memory0()[retptr / 4 + 0];
549
548
  var r1 = getInt32Memory0()[retptr / 4 + 1];
550
549
  var r2 = getInt32Memory0()[retptr / 4 + 2];
551
550
  if (r2) {
552
551
  throw takeObject(r1);
553
552
  }
554
- return Schema.__wrap(r0);
553
+ this.__wbg_ptr = r0 >>> 0;
554
+ return this;
555
555
  } finally {
556
556
  wasm.__wbindgen_add_to_stack_pointer(16);
557
557
  }
@@ -597,38 +597,31 @@ var Collection = class _Collection {
597
597
  wasm.__wbg_collection_free(ptr);
598
598
  }
599
599
  /**
600
- * @returns {string}
600
+ * Finds and returns a single document in the collection by its ID.
601
+ *
602
+ * This function is asynchronous.
603
+ * @param {any} primary_key
604
+ * @returns {Promise<any>}
601
605
  */
602
- get name() {
603
- let deferred1_0;
604
- let deferred1_1;
605
- try {
606
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
607
- wasm.collection_name(retptr, this.__wbg_ptr);
608
- var r0 = getInt32Memory0()[retptr / 4 + 0];
609
- var r1 = getInt32Memory0()[retptr / 4 + 1];
610
- deferred1_0 = r0;
611
- deferred1_1 = r1;
612
- return getStringFromWasm0(r0, r1);
613
- } finally {
614
- wasm.__wbindgen_add_to_stack_pointer(16);
615
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
616
- }
606
+ findById(primary_key) {
607
+ const ret = wasm.collection_findById(this.__wbg_ptr, addHeapObject(primary_key));
608
+ return takeObject(ret);
617
609
  }
618
610
  /**
619
- * @returns {Schema}
611
+ * @param {any} options
612
+ * @returns {QueryOptions}
620
613
  */
621
- get schema() {
614
+ parse_query_options(options) {
622
615
  try {
623
616
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
624
- wasm.collection_schema(retptr, this.__wbg_ptr);
617
+ wasm.collection_parse_query_options(retptr, this.__wbg_ptr, addHeapObject(options));
625
618
  var r0 = getInt32Memory0()[retptr / 4 + 0];
626
619
  var r1 = getInt32Memory0()[retptr / 4 + 1];
627
620
  var r2 = getInt32Memory0()[retptr / 4 + 2];
628
621
  if (r2) {
629
622
  throw takeObject(r1);
630
623
  }
631
- return Schema.__wrap(r0);
624
+ return QueryOptions.__wrap(r0);
632
625
  } finally {
633
626
  wasm.__wbindgen_add_to_stack_pointer(16);
634
627
  }
@@ -647,22 +640,22 @@ var Collection = class _Collection {
647
640
  return takeObject(ret);
648
641
  }
649
642
  /**
650
- * @param {any} options
651
- * @returns {QueryOptions}
643
+ * @returns {string}
652
644
  */
653
- parse_query_options(options) {
645
+ get name() {
646
+ let deferred1_0;
647
+ let deferred1_1;
654
648
  try {
655
649
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
656
- wasm.collection_parse_query_options(retptr, this.__wbg_ptr, addHeapObject(options));
650
+ wasm.collection_name(retptr, this.__wbg_ptr);
657
651
  var r0 = getInt32Memory0()[retptr / 4 + 0];
658
652
  var r1 = getInt32Memory0()[retptr / 4 + 1];
659
- var r2 = getInt32Memory0()[retptr / 4 + 2];
660
- if (r2) {
661
- throw takeObject(r1);
662
- }
663
- return QueryOptions.__wrap(r0);
653
+ deferred1_0 = r0;
654
+ deferred1_1 = r1;
655
+ return getStringFromWasm0(r0, r1);
664
656
  } finally {
665
657
  wasm.__wbindgen_add_to_stack_pointer(16);
658
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
666
659
  }
667
660
  }
668
661
  /**
@@ -679,32 +672,6 @@ var Collection = class _Collection {
679
672
  return takeObject(ret);
680
673
  }
681
674
  /**
682
- * Finds and returns a single document in the collection by its ID.
683
- *
684
- * This function is asynchronous.
685
- * @param {any} primary_key
686
- * @returns {Promise<any>}
687
- */
688
- findById(primary_key) {
689
- const ret = wasm.collection_findById(this.__wbg_ptr, addHeapObject(primary_key));
690
- return takeObject(ret);
691
- }
692
- /**
693
- * Updates a document in the collection with the given data.
694
- *
695
- * This function is asynchronous and returns a `Result` indicating success or failure.
696
- *
697
- * # Arguments
698
- *
699
- * * `document` - A `JsValue` representing the partial document to update.
700
- * @param {any} document
701
- * @returns {Promise<any>}
702
- */
703
- update(document2) {
704
- const ret = wasm.collection_update(this.__wbg_ptr, addHeapObject(document2));
705
- return takeObject(ret);
706
- }
707
- /**
708
675
  * Creates a new document in the collection.
709
676
  *
710
677
  * This function is asynchronous and returns a `Result` indicating success or failure.
@@ -730,19 +697,52 @@ var Collection = class _Collection {
730
697
  const ret = wasm.collection_delete(this.__wbg_ptr, addHeapObject(primary_key));
731
698
  return takeObject(ret);
732
699
  }
733
- };
734
- var CoreStorageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
735
- }, unregister: () => {
736
- } } : new FinalizationRegistry((ptr) => wasm.__wbg_corestorage_free(ptr >>> 0));
737
- var CoreStorage = class _CoreStorage {
738
- static __wrap(ptr) {
739
- ptr = ptr >>> 0;
740
- const obj = Object.create(_CoreStorage.prototype);
741
- obj.__wbg_ptr = ptr;
742
- CoreStorageFinalization.register(obj, obj.__wbg_ptr, obj);
743
- return obj;
744
- }
745
- __destroy_into_raw() {
700
+ /**
701
+ * @returns {Schema}
702
+ */
703
+ get schema() {
704
+ try {
705
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
706
+ wasm.collection_schema(retptr, this.__wbg_ptr);
707
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
708
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
709
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
710
+ if (r2) {
711
+ throw takeObject(r1);
712
+ }
713
+ return Schema.__wrap(r0);
714
+ } finally {
715
+ wasm.__wbindgen_add_to_stack_pointer(16);
716
+ }
717
+ }
718
+ /**
719
+ * Updates a document in the collection with the given data.
720
+ *
721
+ * This function is asynchronous and returns a `Result` indicating success or failure.
722
+ *
723
+ * # Arguments
724
+ *
725
+ * * `document` - A `JsValue` representing the partial document to update.
726
+ * @param {any} document
727
+ * @returns {Promise<any>}
728
+ */
729
+ update(document2) {
730
+ const ret = wasm.collection_update(this.__wbg_ptr, addHeapObject(document2));
731
+ return takeObject(ret);
732
+ }
733
+ };
734
+ var CoreStorageFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
735
+ }, unregister: () => {
736
+ } } : new FinalizationRegistry((ptr) => wasm.__wbg_corestorage_free(ptr >>> 0));
737
+ var CoreStorage = class _CoreStorage {
738
+ static __wrap(ptr) {
739
+ ptr = ptr >>> 0;
740
+ const obj = Object.create(_CoreStorage.prototype);
741
+ obj.__wbg_ptr = ptr;
742
+ CoreStorageFinalization.register(obj, obj.__wbg_ptr, obj);
743
+ return obj;
744
+ }
745
+ __destroy_into_raw() {
746
746
  const ptr = this.__wbg_ptr;
747
747
  this.__wbg_ptr = 0;
748
748
  CoreStorageFinalization.unregister(this);
@@ -753,11 +753,29 @@ var CoreStorage = class _CoreStorage {
753
753
  wasm.__wbg_corestorage_free(ptr);
754
754
  }
755
755
  /**
756
+ * @param {Schema} schema
757
+ * @param {Operation} op
758
+ * @returns {(string)[]}
756
759
  */
757
- constructor() {
758
- const ret = wasm.corestorage_new();
759
- this.__wbg_ptr = ret >>> 0;
760
- return this;
760
+ getIndexes(schema, op) {
761
+ try {
762
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
763
+ _assertClass(schema, Schema);
764
+ _assertClass(op, Operation);
765
+ wasm.corestorage_getIndexes(retptr, this.__wbg_ptr, schema.__wbg_ptr, op.__wbg_ptr);
766
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
767
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
768
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
769
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
770
+ if (r3) {
771
+ throw takeObject(r2);
772
+ }
773
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
774
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
775
+ return v1;
776
+ } finally {
777
+ wasm.__wbindgen_add_to_stack_pointer(16);
778
+ }
761
779
  }
762
780
  /**
763
781
  * @param {any} value
@@ -789,31 +807,6 @@ var CoreStorage = class _CoreStorage {
789
807
  }
790
808
  }
791
809
  /**
792
- * @param {Schema} schema
793
- * @param {Operation} op
794
- * @returns {(string)[]}
795
- */
796
- getIndexes(schema, op) {
797
- try {
798
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
799
- _assertClass(schema, Schema);
800
- _assertClass(op, Operation);
801
- wasm.corestorage_getIndexes(retptr, this.__wbg_ptr, schema.__wbg_ptr, op.__wbg_ptr);
802
- var r0 = getInt32Memory0()[retptr / 4 + 0];
803
- var r1 = getInt32Memory0()[retptr / 4 + 1];
804
- var r2 = getInt32Memory0()[retptr / 4 + 2];
805
- var r3 = getInt32Memory0()[retptr / 4 + 3];
806
- if (r3) {
807
- throw takeObject(r2);
808
- }
809
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
810
- wasm.__wbindgen_free(r0, r1 * 4, 4);
811
- return v1;
812
- } finally {
813
- wasm.__wbindgen_add_to_stack_pointer(16);
814
- }
815
- }
816
- /**
817
810
  * @param {any} document
818
811
  * @param {Query} query
819
812
  * @returns {boolean}
@@ -835,6 +828,13 @@ var CoreStorage = class _CoreStorage {
835
828
  heap[stack_pointer++] = void 0;
836
829
  }
837
830
  }
831
+ /**
832
+ */
833
+ constructor() {
834
+ const ret = wasm.corestorage_new();
835
+ this.__wbg_ptr = ret >>> 0;
836
+ return this;
837
+ }
838
838
  };
839
839
  var DatabaseFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
840
840
  }, unregister: () => {
@@ -858,38 +858,6 @@ var Database = class _Database {
858
858
  wasm.__wbg_database_free(ptr);
859
859
  }
860
860
  /**
861
- * @returns {Promise<any>}
862
- */
863
- start() {
864
- const ret = wasm.database_start(this.__wbg_ptr);
865
- return takeObject(ret);
866
- }
867
- /**
868
- * @returns {Promise<any>}
869
- */
870
- close() {
871
- const ptr = this.__destroy_into_raw();
872
- const ret = wasm.database_close(ptr);
873
- return takeObject(ret);
874
- }
875
- /**
876
- * @returns {boolean}
877
- */
878
- get started() {
879
- const ret = wasm.database_started(this.__wbg_ptr);
880
- return ret !== 0;
881
- }
882
- /**
883
- * @param {string} password
884
- * @returns {Promise<boolean>}
885
- */
886
- authenticate(password) {
887
- const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
888
- const len0 = WASM_VECTOR_LEN;
889
- const ret = wasm.database_authenticate(this.__wbg_ptr, ptr0, len0);
890
- return takeObject(ret);
891
- }
892
- /**
893
861
  * Retrieves the collections in the database.
894
862
  *
895
863
  * This function returns an `Object` containing the collections.
@@ -915,6 +883,31 @@ var Database = class _Database {
915
883
  }
916
884
  }
917
885
  /**
886
+ * @param {string} password
887
+ * @returns {Promise<boolean>}
888
+ */
889
+ authenticate(password) {
890
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
891
+ const len0 = WASM_VECTOR_LEN;
892
+ const ret = wasm.database_authenticate(this.__wbg_ptr, ptr0, len0);
893
+ return takeObject(ret);
894
+ }
895
+ /**
896
+ * @returns {Promise<any>}
897
+ */
898
+ close() {
899
+ const ptr = this.__destroy_into_raw();
900
+ const ret = wasm.database_close(ptr);
901
+ return takeObject(ret);
902
+ }
903
+ /**
904
+ * @returns {Promise<any>}
905
+ */
906
+ start() {
907
+ const ret = wasm.database_start(this.__wbg_ptr);
908
+ return takeObject(ret);
909
+ }
910
+ /**
918
911
  * @param {string} db_name
919
912
  * @param {object} schemas_js
920
913
  * @param {object} migrations_js
@@ -932,6 +925,13 @@ var Database = class _Database {
932
925
  const ret = wasm.database_create(ptr0, len0, addHeapObject(schemas_js), addHeapObject(migrations_js), addHeapObject(plugins), addHeapObject(module2), ptr1, len1, isLikeNone(storage) ? 0 : addHeapObject(storage));
933
926
  return takeObject(ret);
934
927
  }
928
+ /**
929
+ * @returns {boolean}
930
+ */
931
+ get started() {
932
+ const ret = wasm.database_started(this.__wbg_ptr);
933
+ return ret !== 0;
934
+ }
935
935
  };
936
936
  var InMemoryFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
937
937
  }, unregister: () => {
@@ -955,6 +955,17 @@ var InMemory = class _InMemory {
955
955
  wasm.__wbg_inmemory_free(ptr);
956
956
  }
957
957
  /**
958
+ * @param {string} collection_name
959
+ * @param {any} primary_key
960
+ * @returns {Promise<any>}
961
+ */
962
+ findDocumentById(collection_name, primary_key) {
963
+ const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
964
+ const len0 = WASM_VECTOR_LEN;
965
+ const ret = wasm.inmemory_findDocumentById(this.__wbg_ptr, ptr0, len0, addHeapObject(primary_key));
966
+ return takeObject(ret);
967
+ }
968
+ /**
958
969
  * @param {string} name
959
970
  * @param {object} schemas_js
960
971
  * @returns {Promise<InMemory>}
@@ -966,16 +977,6 @@ var InMemory = class _InMemory {
966
977
  return takeObject(ret);
967
978
  }
968
979
  /**
969
- * @param {Operation} op
970
- * @returns {Promise<any>}
971
- */
972
- write(op) {
973
- _assertClass(op, Operation);
974
- var ptr0 = op.__destroy_into_raw();
975
- const ret = wasm.inmemory_write(this.__wbg_ptr, ptr0);
976
- return takeObject(ret);
977
- }
978
- /**
979
980
  * @param {string} collection_name
980
981
  * @param {any} query_js
981
982
  * @param {QueryOptions} options
@@ -990,14 +991,10 @@ var InMemory = class _InMemory {
990
991
  return takeObject(ret);
991
992
  }
992
993
  /**
993
- * @param {string} collection_name
994
- * @param {any} primary_key
995
994
  * @returns {Promise<any>}
996
995
  */
997
- findDocumentById(collection_name, primary_key) {
998
- const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
999
- const len0 = WASM_VECTOR_LEN;
1000
- const ret = wasm.inmemory_findDocumentById(this.__wbg_ptr, ptr0, len0, addHeapObject(primary_key));
996
+ close() {
997
+ const ret = wasm.inmemory_close(this.__wbg_ptr);
1001
998
  return takeObject(ret);
1002
999
  }
1003
1000
  /**
@@ -1017,15 +1014,18 @@ var InMemory = class _InMemory {
1017
1014
  /**
1018
1015
  * @returns {Promise<any>}
1019
1016
  */
1020
- close() {
1021
- const ret = wasm.inmemory_close(this.__wbg_ptr);
1017
+ start() {
1018
+ const ret = wasm.inmemory_start(this.__wbg_ptr);
1022
1019
  return takeObject(ret);
1023
1020
  }
1024
1021
  /**
1022
+ * @param {Operation} op
1025
1023
  * @returns {Promise<any>}
1026
1024
  */
1027
- start() {
1028
- const ret = wasm.inmemory_start(this.__wbg_ptr);
1025
+ write(op) {
1026
+ _assertClass(op, Operation);
1027
+ var ptr0 = op.__destroy_into_raw();
1028
+ const ret = wasm.inmemory_write(this.__wbg_ptr, ptr0);
1029
1029
  return takeObject(ret);
1030
1030
  }
1031
1031
  };
@@ -1072,12 +1072,12 @@ var IndexDB = class _IndexDB {
1072
1072
  * @param {string} store_name
1073
1073
  * @returns {IDBObjectStore}
1074
1074
  */
1075
- get_store(store_name) {
1075
+ get_store_readonly(store_name) {
1076
1076
  try {
1077
1077
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1078
1078
  const ptr0 = passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1079
1079
  const len0 = WASM_VECTOR_LEN;
1080
- wasm.indexdb_get_store(retptr, this.__wbg_ptr, ptr0, len0);
1080
+ wasm.indexdb_get_store_readonly(retptr, this.__wbg_ptr, ptr0, len0);
1081
1081
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1082
1082
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1083
1083
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1090,25 +1090,15 @@ var IndexDB = class _IndexDB {
1090
1090
  }
1091
1091
  }
1092
1092
  /**
1093
- * @param {string} store_name
1094
- * @returns {IDBObjectStore}
1093
+ * @param {string} collection_name
1094
+ * @param {any} primary_key
1095
+ * @returns {Promise<any>}
1095
1096
  */
1096
- get_store_readonly(store_name) {
1097
- try {
1098
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1099
- const ptr0 = passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1100
- const len0 = WASM_VECTOR_LEN;
1101
- wasm.indexdb_get_store_readonly(retptr, this.__wbg_ptr, ptr0, len0);
1102
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1103
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1104
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1105
- if (r2) {
1106
- throw takeObject(r1);
1107
- }
1108
- return takeObject(r0);
1109
- } finally {
1110
- wasm.__wbindgen_add_to_stack_pointer(16);
1111
- }
1097
+ findDocumentById(collection_name, primary_key) {
1098
+ const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1099
+ const len0 = WASM_VECTOR_LEN;
1100
+ const ret = wasm.indexdb_findDocumentById(this.__wbg_ptr, ptr0, len0, addHeapObject(primary_key));
1101
+ return takeObject(ret);
1112
1102
  }
1113
1103
  /**
1114
1104
  * @param {string} name
@@ -1122,16 +1112,6 @@ var IndexDB = class _IndexDB {
1122
1112
  return takeObject(ret);
1123
1113
  }
1124
1114
  /**
1125
- * @param {Operation} op
1126
- * @returns {Promise<any>}
1127
- */
1128
- write(op) {
1129
- _assertClass(op, Operation);
1130
- var ptr0 = op.__destroy_into_raw();
1131
- const ret = wasm.indexdb_write(this.__wbg_ptr, ptr0);
1132
- return takeObject(ret);
1133
- }
1134
- /**
1135
1115
  * @param {string} collection_name
1136
1116
  * @param {any} query
1137
1117
  * @param {QueryOptions} options
@@ -1146,14 +1126,10 @@ var IndexDB = class _IndexDB {
1146
1126
  return takeObject(ret);
1147
1127
  }
1148
1128
  /**
1149
- * @param {string} collection_name
1150
- * @param {any} primary_key
1151
1129
  * @returns {Promise<any>}
1152
1130
  */
1153
- findDocumentById(collection_name, primary_key) {
1154
- const ptr0 = passStringToWasm0(collection_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1155
- const len0 = WASM_VECTOR_LEN;
1156
- const ret = wasm.indexdb_findDocumentById(this.__wbg_ptr, ptr0, len0, addHeapObject(primary_key));
1131
+ close() {
1132
+ const ret = wasm.indexdb_close(this.__wbg_ptr);
1157
1133
  return takeObject(ret);
1158
1134
  }
1159
1135
  /**
@@ -1173,17 +1149,41 @@ var IndexDB = class _IndexDB {
1173
1149
  /**
1174
1150
  * @returns {Promise<any>}
1175
1151
  */
1176
- close() {
1177
- const ret = wasm.indexdb_close(this.__wbg_ptr);
1152
+ start() {
1153
+ const ret = wasm.indexdb_start(this.__wbg_ptr);
1178
1154
  return takeObject(ret);
1179
1155
  }
1180
1156
  /**
1157
+ * @param {Operation} op
1181
1158
  * @returns {Promise<any>}
1182
1159
  */
1183
- start() {
1184
- const ret = wasm.indexdb_start(this.__wbg_ptr);
1160
+ write(op) {
1161
+ _assertClass(op, Operation);
1162
+ var ptr0 = op.__destroy_into_raw();
1163
+ const ret = wasm.indexdb_write(this.__wbg_ptr, ptr0);
1185
1164
  return takeObject(ret);
1186
1165
  }
1166
+ /**
1167
+ * @param {string} store_name
1168
+ * @returns {IDBObjectStore}
1169
+ */
1170
+ get_store(store_name) {
1171
+ try {
1172
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1173
+ const ptr0 = passStringToWasm0(store_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1174
+ const len0 = WASM_VECTOR_LEN;
1175
+ wasm.indexdb_get_store(retptr, this.__wbg_ptr, ptr0, len0);
1176
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1177
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1178
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1179
+ if (r2) {
1180
+ throw takeObject(r1);
1181
+ }
1182
+ return takeObject(r0);
1183
+ } finally {
1184
+ wasm.__wbindgen_add_to_stack_pointer(16);
1185
+ }
1186
+ }
1187
1187
  };
1188
1188
  var OperationFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1189
1189
  }, unregister: () => {
@@ -1231,27 +1231,15 @@ var Operation = class _Operation {
1231
1231
  }
1232
1232
  }
1233
1233
  /**
1234
- * Retrieves the type of operation.
1235
- *
1236
- * # Returns
1237
- *
1238
- * * `OpType` - The type of operation.
1239
- * @returns {OpType}
1240
- */
1241
- get opType() {
1242
- const ret = wasm.operation_opType(this.__wbg_ptr);
1243
- return ret;
1244
- }
1245
- /**
1246
- * Retrieves the data involved in the operation.
1234
+ * Retrieves the primary key value of the current data.
1247
1235
  *
1248
1236
  * # Returns
1249
1237
  *
1250
- * * `JsValue` - The data involved in the operation.
1238
+ * * `Option<JsValue>` - The primary key value of the current data.
1251
1239
  * @returns {any}
1252
1240
  */
1253
- get data() {
1254
- const ret = wasm.operation_data(this.__wbg_ptr);
1241
+ get primaryKey() {
1242
+ const ret = wasm.operation_primaryKey(this.__wbg_ptr);
1255
1243
  return takeObject(ret);
1256
1244
  }
1257
1245
  /**
@@ -1267,18 +1255,6 @@ var Operation = class _Operation {
1267
1255
  return takeObject(ret);
1268
1256
  }
1269
1257
  /**
1270
- * Retrieves the primary key value of the current data.
1271
- *
1272
- * # Returns
1273
- *
1274
- * * `Option<JsValue>` - The primary key value of the current data.
1275
- * @returns {any}
1276
- */
1277
- get primaryKey() {
1278
- const ret = wasm.operation_primaryKey(this.__wbg_ptr);
1279
- return takeObject(ret);
1280
- }
1281
- /**
1282
1258
  * @returns {string}
1283
1259
  */
1284
1260
  get primaryKeyIndex() {
@@ -1306,6 +1282,30 @@ var Operation = class _Operation {
1306
1282
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1307
1283
  }
1308
1284
  }
1285
+ /**
1286
+ * Retrieves the data involved in the operation.
1287
+ *
1288
+ * # Returns
1289
+ *
1290
+ * * `JsValue` - The data involved in the operation.
1291
+ * @returns {any}
1292
+ */
1293
+ get data() {
1294
+ const ret = wasm.operation_data(this.__wbg_ptr);
1295
+ return takeObject(ret);
1296
+ }
1297
+ /**
1298
+ * Retrieves the type of operation.
1299
+ *
1300
+ * # Returns
1301
+ *
1302
+ * * `OpType` - The type of operation.
1303
+ * @returns {OpType}
1304
+ */
1305
+ get opType() {
1306
+ const ret = wasm.operation_opType(this.__wbg_ptr);
1307
+ return ret;
1308
+ }
1309
1309
  };
1310
1310
  var PropertyFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1311
1311
  }, unregister: () => {
@@ -1322,52 +1322,40 @@ var Property = class {
1322
1322
  wasm.__wbg_property_free(ptr);
1323
1323
  }
1324
1324
  /**
1325
- * Checks is the schema is valid.
1325
+ * Retrieves the maximum length of the property.
1326
1326
  *
1327
1327
  * # Returns
1328
1328
  *
1329
- * Throws exception if not valid
1330
- * @returns {boolean}
1329
+ * * `Result<JsValue, JsValue>` - A result containing the maximum length as a `JsValue` or an error.
1330
+ * @returns {any}
1331
1331
  */
1332
- is_valid() {
1332
+ get maxLength() {
1333
1333
  try {
1334
1334
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1335
- wasm.property_is_valid(retptr, this.__wbg_ptr);
1335
+ wasm.property_maxLength(retptr, this.__wbg_ptr);
1336
1336
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1337
1337
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1338
1338
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1339
1339
  if (r2) {
1340
1340
  throw takeObject(r1);
1341
1341
  }
1342
- return r0 !== 0;
1342
+ return takeObject(r0);
1343
1343
  } finally {
1344
1344
  wasm.__wbindgen_add_to_stack_pointer(16);
1345
1345
  }
1346
1346
  }
1347
1347
  /**
1348
- * Retrieves the type of the property.
1349
- *
1350
- * # Returns
1351
- *
1352
- * * `PropertyType` - The type of the property.
1353
- * @returns {any}
1354
- */
1355
- get type() {
1356
- const ret = wasm.property_type(this.__wbg_ptr);
1357
- return takeObject(ret);
1358
- }
1359
- /**
1360
- * Retrieves the items of the property.
1348
+ * Retrieves the minimum length of the property.
1361
1349
  *
1362
1350
  * # Returns
1363
1351
  *
1364
- * * `Result<JsValue, JsValue>` - A result containing the items as a `JsValue` or an error.
1352
+ * * `Result<JsValue, JsValue>` - A result containing the minimum length as a `JsValue` or an error.
1365
1353
  * @returns {any}
1366
1354
  */
1367
- get items() {
1355
+ get minLength() {
1368
1356
  try {
1369
1357
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1370
- wasm.property_items(retptr, this.__wbg_ptr);
1358
+ wasm.property_minLength(retptr, this.__wbg_ptr);
1371
1359
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1372
1360
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1373
1361
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1380,17 +1368,17 @@ var Property = class {
1380
1368
  }
1381
1369
  }
1382
1370
  /**
1383
- * Retrieves the maximum number of items of the property.
1371
+ * Retrieves the nested properties of the property.
1384
1372
  *
1385
1373
  * # Returns
1386
1374
  *
1387
- * * `Result<JsValue, JsValue>` - A result containing the maximum number of items as a `JsValue` or an error.
1375
+ * * `Result<JsValue, JsValue>` - A result containing the nested properties as a `JsValue` or an error.
1388
1376
  * @returns {any}
1389
1377
  */
1390
- get maxItems() {
1378
+ get properties() {
1391
1379
  try {
1392
1380
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1393
- wasm.property_maxItems(retptr, this.__wbg_ptr);
1381
+ wasm.property_properties(retptr, this.__wbg_ptr);
1394
1382
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1395
1383
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1396
1384
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1403,17 +1391,29 @@ var Property = class {
1403
1391
  }
1404
1392
  }
1405
1393
  /**
1406
- * Retrieves the minimum number of items of the property.
1394
+ * Retrieves the type of the property.
1407
1395
  *
1408
1396
  * # Returns
1409
1397
  *
1410
- * * `Result<JsValue, JsValue>` - A result containing the minimum number of items as a `JsValue` or an error.
1398
+ * * `PropertyType` - The type of the property.
1411
1399
  * @returns {any}
1412
1400
  */
1413
- get minItems() {
1401
+ get type() {
1402
+ const ret = wasm.property_type(this.__wbg_ptr);
1403
+ return takeObject(ret);
1404
+ }
1405
+ /**
1406
+ * Retrieves the items of the property.
1407
+ *
1408
+ * # Returns
1409
+ *
1410
+ * * `Result<JsValue, JsValue>` - A result containing the items as a `JsValue` or an error.
1411
+ * @returns {any}
1412
+ */
1413
+ get items() {
1414
1414
  try {
1415
1415
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1416
- wasm.property_minItems(retptr, this.__wbg_ptr);
1416
+ wasm.property_items(retptr, this.__wbg_ptr);
1417
1417
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1418
1418
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1419
1419
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1426,40 +1426,40 @@ var Property = class {
1426
1426
  }
1427
1427
  }
1428
1428
  /**
1429
- * Retrieves the maximum length of the property.
1429
+ * Checks is the schema is valid.
1430
1430
  *
1431
1431
  * # Returns
1432
1432
  *
1433
- * * `Result<JsValue, JsValue>` - A result containing the maximum length as a `JsValue` or an error.
1434
- * @returns {any}
1433
+ * Throws exception if not valid
1434
+ * @returns {boolean}
1435
1435
  */
1436
- get maxLength() {
1436
+ is_valid() {
1437
1437
  try {
1438
1438
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1439
- wasm.property_maxLength(retptr, this.__wbg_ptr);
1439
+ wasm.property_is_valid(retptr, this.__wbg_ptr);
1440
1440
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1441
1441
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1442
1442
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1443
1443
  if (r2) {
1444
1444
  throw takeObject(r1);
1445
1445
  }
1446
- return takeObject(r0);
1446
+ return r0 !== 0;
1447
1447
  } finally {
1448
1448
  wasm.__wbindgen_add_to_stack_pointer(16);
1449
1449
  }
1450
1450
  }
1451
1451
  /**
1452
- * Retrieves the minimum length of the property.
1452
+ * Retrieves the maximum number of items of the property.
1453
1453
  *
1454
1454
  * # Returns
1455
1455
  *
1456
- * * `Result<JsValue, JsValue>` - A result containing the minimum length as a `JsValue` or an error.
1456
+ * * `Result<JsValue, JsValue>` - A result containing the maximum number of items as a `JsValue` or an error.
1457
1457
  * @returns {any}
1458
1458
  */
1459
- get minLength() {
1459
+ get maxItems() {
1460
1460
  try {
1461
1461
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1462
- wasm.property_minLength(retptr, this.__wbg_ptr);
1462
+ wasm.property_maxItems(retptr, this.__wbg_ptr);
1463
1463
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1464
1464
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1465
1465
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1472,17 +1472,17 @@ var Property = class {
1472
1472
  }
1473
1473
  }
1474
1474
  /**
1475
- * Retrieves the nested properties of the property.
1475
+ * Retrieves the minimum number of items of the property.
1476
1476
  *
1477
1477
  * # Returns
1478
1478
  *
1479
- * * `Result<JsValue, JsValue>` - A result containing the nested properties as a `JsValue` or an error.
1479
+ * * `Result<JsValue, JsValue>` - A result containing the minimum number of items as a `JsValue` or an error.
1480
1480
  * @returns {any}
1481
1481
  */
1482
- get properties() {
1482
+ get minItems() {
1483
1483
  try {
1484
1484
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1485
- wasm.property_properties(retptr, this.__wbg_ptr);
1485
+ wasm.property_minItems(retptr, this.__wbg_ptr);
1486
1486
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1487
1487
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1488
1488
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1511,33 +1511,12 @@ var Query = class {
1511
1511
  }
1512
1512
  /**
1513
1513
  * @param {any} query
1514
- * @param {Schema} schema
1515
- */
1516
- constructor(query, schema) {
1517
- try {
1518
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1519
- _assertClass(schema, Schema);
1520
- var ptr0 = schema.__destroy_into_raw();
1521
- wasm.query_new(retptr, addHeapObject(query), ptr0);
1522
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1523
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1524
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1525
- if (r2) {
1526
- throw takeObject(r1);
1527
- }
1528
- this.__wbg_ptr = r0 >>> 0;
1529
- return this;
1530
- } finally {
1531
- wasm.__wbindgen_add_to_stack_pointer(16);
1532
- }
1533
- }
1534
- /**
1535
1514
  * @returns {any}
1536
1515
  */
1537
- get query() {
1516
+ process_query(query) {
1538
1517
  try {
1539
1518
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1540
- wasm.query_query(retptr, this.__wbg_ptr);
1519
+ wasm.query_process_query(retptr, this.__wbg_ptr, addBorrowedObject(query));
1541
1520
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1542
1521
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1543
1522
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1547,6 +1526,7 @@ var Query = class {
1547
1526
  return takeObject(r0);
1548
1527
  } finally {
1549
1528
  wasm.__wbindgen_add_to_stack_pointer(16);
1529
+ heap[stack_pointer++] = void 0;
1550
1530
  }
1551
1531
  }
1552
1532
  /**
@@ -1573,12 +1553,31 @@ var Query = class {
1573
1553
  }
1574
1554
  }
1575
1555
  /**
1556
+ * @returns {boolean}
1557
+ */
1558
+ has_or_operator() {
1559
+ const ret = wasm.query_has_or_operator(this.__wbg_ptr);
1560
+ return ret !== 0;
1561
+ }
1562
+ /**
1563
+ * Returns the value of a property from the (normalized) query by its name.
1564
+ * This will scan the normalized query structure (including arrays, $and/$or blocks, etc.)
1565
+ * to find the first occurrence of the given property name and return its corresponding value.
1566
+ *
1567
+ * If not found, an error is returned.
1568
+ *
1569
+ * Example:
1570
+ * let val = query.get("age")?;
1571
+ * // val is a JsValue that might be a number, string, boolean, array, or object (e.g., { "$gt": 30 })
1572
+ * @param {string} property_name
1576
1573
  * @returns {any}
1577
1574
  */
1578
- parse() {
1575
+ get(property_name) {
1579
1576
  try {
1580
1577
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1581
- wasm.query_parse(retptr, this.__wbg_ptr);
1578
+ const ptr0 = passStringToWasm0(property_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1579
+ const len0 = WASM_VECTOR_LEN;
1580
+ wasm.query_get(retptr, this.__wbg_ptr, ptr0, len0);
1582
1581
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1583
1582
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1584
1583
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1592,43 +1591,33 @@ var Query = class {
1592
1591
  }
1593
1592
  /**
1594
1593
  * @param {any} query
1595
- * @returns {any}
1594
+ * @param {Schema} schema
1596
1595
  */
1597
- process_query(query) {
1596
+ constructor(query, schema) {
1598
1597
  try {
1599
1598
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1600
- wasm.query_process_query(retptr, this.__wbg_ptr, addBorrowedObject(query));
1599
+ _assertClass(schema, Schema);
1600
+ var ptr0 = schema.__destroy_into_raw();
1601
+ wasm.query_new(retptr, addHeapObject(query), ptr0);
1601
1602
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1602
1603
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1603
1604
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1604
1605
  if (r2) {
1605
1606
  throw takeObject(r1);
1606
1607
  }
1607
- return takeObject(r0);
1608
+ this.__wbg_ptr = r0 >>> 0;
1609
+ return this;
1608
1610
  } finally {
1609
1611
  wasm.__wbindgen_add_to_stack_pointer(16);
1610
- heap[stack_pointer++] = void 0;
1611
1612
  }
1612
1613
  }
1613
1614
  /**
1614
- * Returns the value of a property from the (normalized) query by its name.
1615
- * This will scan the normalized query structure (including arrays, $and/$or blocks, etc.)
1616
- * to find the first occurrence of the given property name and return its corresponding value.
1617
- *
1618
- * If not found, an error is returned.
1619
- *
1620
- * Example:
1621
- * let val = query.get("age")?;
1622
- * // val is a JsValue that might be a number, string, boolean, array, or object (e.g., { "$gt": 30 })
1623
- * @param {string} property_name
1624
1615
  * @returns {any}
1625
1616
  */
1626
- get(property_name) {
1617
+ parse() {
1627
1618
  try {
1628
1619
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1629
- const ptr0 = passStringToWasm0(property_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1630
- const len0 = WASM_VECTOR_LEN;
1631
- wasm.query_get(retptr, this.__wbg_ptr, ptr0, len0);
1620
+ wasm.query_parse(retptr, this.__wbg_ptr);
1632
1621
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1633
1622
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1634
1623
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1641,11 +1630,22 @@ var Query = class {
1641
1630
  }
1642
1631
  }
1643
1632
  /**
1644
- * @returns {boolean}
1633
+ * @returns {any}
1645
1634
  */
1646
- has_or_operator() {
1647
- const ret = wasm.query_has_or_operator(this.__wbg_ptr);
1648
- return ret !== 0;
1635
+ get query() {
1636
+ try {
1637
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1638
+ wasm.query_query(retptr, this.__wbg_ptr);
1639
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1640
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1641
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
1642
+ if (r2) {
1643
+ throw takeObject(r1);
1644
+ }
1645
+ return takeObject(r0);
1646
+ } finally {
1647
+ wasm.__wbindgen_add_to_stack_pointer(16);
1648
+ }
1649
1649
  }
1650
1650
  };
1651
1651
  var QueryOptionsFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
@@ -1672,10 +1672,10 @@ var QueryOptions = class _QueryOptions {
1672
1672
  /**
1673
1673
  * @returns {any}
1674
1674
  */
1675
- get limit() {
1675
+ get offset() {
1676
1676
  try {
1677
1677
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1678
- wasm.queryoptions_limit(retptr, this.__wbg_ptr);
1678
+ wasm.queryoptions_offset(retptr, this.__wbg_ptr);
1679
1679
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1680
1680
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1681
1681
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1690,10 +1690,10 @@ var QueryOptions = class _QueryOptions {
1690
1690
  /**
1691
1691
  * @returns {any}
1692
1692
  */
1693
- get offset() {
1693
+ get limit() {
1694
1694
  try {
1695
1695
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1696
- wasm.queryoptions_offset(retptr, this.__wbg_ptr);
1696
+ wasm.queryoptions_limit(retptr, this.__wbg_ptr);
1697
1697
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1698
1698
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1699
1699
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1719,9 +1719,9 @@ var RIDBError = class _RIDBError {
1719
1719
  }
1720
1720
  toJSON() {
1721
1721
  return {
1722
- type: this.type,
1722
+ message: this.message,
1723
1723
  code: this.code,
1724
- message: this.message
1724
+ type: this.type
1725
1725
  };
1726
1726
  }
1727
1727
  toString() {
@@ -1738,44 +1738,15 @@ var RIDBError = class _RIDBError {
1738
1738
  wasm.__wbg_ridberror_free(ptr);
1739
1739
  }
1740
1740
  /**
1741
- * @param {string} err_type
1742
- * @param {string} message
1741
+ * @param {string} err
1743
1742
  * @param {number} code
1743
+ * @returns {RIDBError}
1744
1744
  */
1745
- constructor(err_type, message, code) {
1746
- const ptr0 = passStringToWasm0(err_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1745
+ static validation(err, code) {
1746
+ const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1747
1747
  const len0 = WASM_VECTOR_LEN;
1748
- const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1749
- const len1 = WASM_VECTOR_LEN;
1750
- const ret = wasm.ridberror_new(ptr0, len0, ptr1, len1, code);
1751
- this.__wbg_ptr = ret >>> 0;
1752
- return this;
1753
- }
1754
- /**
1755
- * @returns {string}
1756
- */
1757
- get type() {
1758
- let deferred1_0;
1759
- let deferred1_1;
1760
- try {
1761
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1762
- wasm.ridberror_type(retptr, this.__wbg_ptr);
1763
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1764
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1765
- deferred1_0 = r0;
1766
- deferred1_1 = r1;
1767
- return getStringFromWasm0(r0, r1);
1768
- } finally {
1769
- wasm.__wbindgen_add_to_stack_pointer(16);
1770
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1771
- }
1772
- }
1773
- /**
1774
- * @returns {any}
1775
- */
1776
- get code() {
1777
- const ret = wasm.ridberror_code(this.__wbg_ptr);
1778
- return takeObject(ret);
1748
+ const ret = wasm.ridberror_validation(ptr0, len0, code);
1749
+ return _RIDBError.__wrap(ret);
1779
1750
  }
1780
1751
  /**
1781
1752
  * @returns {string}
@@ -1797,11 +1768,14 @@ var RIDBError = class _RIDBError {
1797
1768
  }
1798
1769
  }
1799
1770
  /**
1800
- * @param {any} err
1771
+ * @param {string} err
1772
+ * @param {number} code
1801
1773
  * @returns {RIDBError}
1802
1774
  */
1803
- static from(err) {
1804
- const ret = wasm.ridberror_from(addHeapObject(err));
1775
+ static serialisation(err, code) {
1776
+ const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1777
+ const len0 = WASM_VECTOR_LEN;
1778
+ const ret = wasm.ridberror_serialisation(ptr0, len0, code);
1805
1779
  return _RIDBError.__wrap(ret);
1806
1780
  }
1807
1781
  /**
@@ -1809,32 +1783,35 @@ var RIDBError = class _RIDBError {
1809
1783
  * @param {number} code
1810
1784
  * @returns {RIDBError}
1811
1785
  */
1812
- static error(err, code) {
1786
+ static authentication(err, code) {
1813
1787
  const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1814
1788
  const len0 = WASM_VECTOR_LEN;
1815
- const ret = wasm.ridberror_error(ptr0, len0, code);
1789
+ const ret = wasm.ridberror_authentication(ptr0, len0, code);
1816
1790
  return _RIDBError.__wrap(ret);
1817
1791
  }
1818
1792
  /**
1819
- * @param {string} err
1793
+ * @param {string} err_type
1794
+ * @param {string} message
1820
1795
  * @param {number} code
1821
- * @returns {RIDBError}
1822
1796
  */
1823
- static query(err, code) {
1824
- const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1797
+ constructor(err_type, message, code) {
1798
+ const ptr0 = passStringToWasm0(err_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1825
1799
  const len0 = WASM_VECTOR_LEN;
1826
- const ret = wasm.ridberror_query(ptr0, len0, code);
1827
- return _RIDBError.__wrap(ret);
1800
+ const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1801
+ const len1 = WASM_VECTOR_LEN;
1802
+ const ret = wasm.ridberror_new(ptr0, len0, ptr1, len1, code);
1803
+ this.__wbg_ptr = ret >>> 0;
1804
+ return this;
1828
1805
  }
1829
1806
  /**
1830
1807
  * @param {string} err
1831
1808
  * @param {number} code
1832
1809
  * @returns {RIDBError}
1833
1810
  */
1834
- static authentication(err, code) {
1811
+ static hook(err, code) {
1835
1812
  const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1836
1813
  const len0 = WASM_VECTOR_LEN;
1837
- const ret = wasm.ridberror_authentication(ptr0, len0, code);
1814
+ const ret = wasm.ridberror_hook(ptr0, len0, code);
1838
1815
  return _RIDBError.__wrap(ret);
1839
1816
  }
1840
1817
  /**
@@ -1842,10 +1819,10 @@ var RIDBError = class _RIDBError {
1842
1819
  * @param {number} code
1843
1820
  * @returns {RIDBError}
1844
1821
  */
1845
- static serialisation(err, code) {
1822
+ static error(err, code) {
1846
1823
  const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1847
1824
  const len0 = WASM_VECTOR_LEN;
1848
- const ret = wasm.ridberror_serialisation(ptr0, len0, code);
1825
+ const ret = wasm.ridberror_error(ptr0, len0, code);
1849
1826
  return _RIDBError.__wrap(ret);
1850
1827
  }
1851
1828
  /**
@@ -1853,23 +1830,46 @@ var RIDBError = class _RIDBError {
1853
1830
  * @param {number} code
1854
1831
  * @returns {RIDBError}
1855
1832
  */
1856
- static validation(err, code) {
1833
+ static query(err, code) {
1857
1834
  const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1858
1835
  const len0 = WASM_VECTOR_LEN;
1859
- const ret = wasm.ridberror_validation(ptr0, len0, code);
1836
+ const ret = wasm.ridberror_query(ptr0, len0, code);
1860
1837
  return _RIDBError.__wrap(ret);
1861
1838
  }
1862
1839
  /**
1863
- * @param {string} err
1864
- * @param {number} code
1840
+ * @returns {any}
1841
+ */
1842
+ get code() {
1843
+ const ret = wasm.ridberror_code(this.__wbg_ptr);
1844
+ return takeObject(ret);
1845
+ }
1846
+ /**
1847
+ * @param {any} err
1865
1848
  * @returns {RIDBError}
1866
1849
  */
1867
- static hook(err, code) {
1868
- const ptr0 = passStringToWasm0(err, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1869
- const len0 = WASM_VECTOR_LEN;
1870
- const ret = wasm.ridberror_hook(ptr0, len0, code);
1850
+ static from(err) {
1851
+ const ret = wasm.ridberror_from(addHeapObject(err));
1871
1852
  return _RIDBError.__wrap(ret);
1872
1853
  }
1854
+ /**
1855
+ * @returns {string}
1856
+ */
1857
+ get type() {
1858
+ let deferred1_0;
1859
+ let deferred1_1;
1860
+ try {
1861
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1862
+ wasm.ridberror_type(retptr, this.__wbg_ptr);
1863
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1864
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1865
+ deferred1_0 = r0;
1866
+ deferred1_1 = r1;
1867
+ return getStringFromWasm0(r0, r1);
1868
+ } finally {
1869
+ wasm.__wbindgen_add_to_stack_pointer(16);
1870
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1871
+ }
1872
+ }
1873
1873
  };
1874
1874
  var SchemaFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
1875
1875
  }, unregister: () => {
@@ -1893,80 +1893,84 @@ var Schema = class _Schema {
1893
1893
  wasm.__wbg_schema_free(ptr);
1894
1894
  }
1895
1895
  /**
1896
- * @param {any} document
1896
+ * Retrieves the indexes of the schema, if any.
1897
+ *
1898
+ * # Returns
1899
+ *
1900
+ * * `Option<Vec<String>>` - The indexes of the schema, if any.
1901
+ * @returns {(string)[] | undefined}
1897
1902
  */
1898
- validate(document2) {
1903
+ get indexes() {
1899
1904
  try {
1900
1905
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1901
- wasm.schema_validate(retptr, this.__wbg_ptr, addHeapObject(document2));
1906
+ wasm.schema_indexes(retptr, this.__wbg_ptr);
1902
1907
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1903
1908
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1904
- if (r1) {
1905
- throw takeObject(r0);
1909
+ let v1;
1910
+ if (r0 !== 0) {
1911
+ v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1912
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
1906
1913
  }
1914
+ return v1;
1907
1915
  } finally {
1908
1916
  wasm.__wbindgen_add_to_stack_pointer(16);
1909
1917
  }
1910
1918
  }
1911
1919
  /**
1912
- * @returns {boolean}
1920
+ * Retrieves the version of the schema.
1921
+ *
1922
+ * # Returns
1923
+ *
1924
+ * * `i32` - The version of the schema.
1925
+ * @returns {number}
1913
1926
  */
1914
- is_valid() {
1927
+ get version() {
1928
+ const ret = wasm.schema_version(this.__wbg_ptr);
1929
+ return ret;
1930
+ }
1931
+ /**
1932
+ * @returns {(string)[] | undefined}
1933
+ */
1934
+ get encrypted() {
1915
1935
  try {
1916
1936
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1917
- wasm.schema_is_valid(retptr, this.__wbg_ptr);
1937
+ wasm.schema_encrypted(retptr, this.__wbg_ptr);
1918
1938
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1919
1939
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1920
- var r2 = getInt32Memory0()[retptr / 4 + 2];
1921
- if (r2) {
1922
- throw takeObject(r1);
1940
+ let v1;
1941
+ if (r0 !== 0) {
1942
+ v1 = getArrayJsValueFromWasm0(r0, r1).slice();
1943
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
1923
1944
  }
1924
- return r0 !== 0;
1945
+ return v1;
1925
1946
  } finally {
1926
1947
  wasm.__wbindgen_add_to_stack_pointer(16);
1927
1948
  }
1928
1949
  }
1929
1950
  /**
1930
- * Creates a new `Schema` instance from a given `JsValue`.
1931
- *
1932
- * # Arguments
1933
- *
1934
- * * `schema` - A `JsValue` representing the schema.
1951
+ * Retrieves the properties of the schema.
1935
1952
  *
1936
1953
  * # Returns
1937
1954
  *
1938
- * * `Result<Schema, JsValue>` - A result containing the new `Schema` instance or an error.
1939
- * @param {any} schema
1940
- * @returns {Schema}
1955
+ * * `Result<JsValue, JsValue>` - A result containing the properties as a `JsValue` or an error.
1956
+ * @returns {any}
1941
1957
  */
1942
- static create(schema) {
1958
+ get properties() {
1943
1959
  try {
1944
1960
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1945
- wasm.schema_create(retptr, addHeapObject(schema));
1961
+ wasm.schema_properties(retptr, this.__wbg_ptr);
1946
1962
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1947
1963
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1948
1964
  var r2 = getInt32Memory0()[retptr / 4 + 2];
1949
1965
  if (r2) {
1950
1966
  throw takeObject(r1);
1951
1967
  }
1952
- return _Schema.__wrap(r0);
1968
+ return takeObject(r0);
1953
1969
  } finally {
1954
1970
  wasm.__wbindgen_add_to_stack_pointer(16);
1955
1971
  }
1956
1972
  }
1957
1973
  /**
1958
- * Retrieves the version of the schema.
1959
- *
1960
- * # Returns
1961
- *
1962
- * * `i32` - The version of the schema.
1963
- * @returns {number}
1964
- */
1965
- get version() {
1966
- const ret = wasm.schema_version(this.__wbg_ptr);
1967
- return ret;
1968
- }
1969
- /**
1970
1974
  * Retrieves the primary key of the schema.
1971
1975
  *
1972
1976
  * # Returns
@@ -2015,67 +2019,63 @@ var Schema = class _Schema {
2015
2019
  }
2016
2020
  }
2017
2021
  /**
2018
- * Retrieves the indexes of the schema, if any.
2019
- *
2020
- * # Returns
2021
- *
2022
- * * `Option<Vec<String>>` - The indexes of the schema, if any.
2023
- * @returns {(string)[] | undefined}
2022
+ * @param {any} document
2024
2023
  */
2025
- get indexes() {
2024
+ validate(document2) {
2026
2025
  try {
2027
2026
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2028
- wasm.schema_indexes(retptr, this.__wbg_ptr);
2027
+ wasm.schema_validate(retptr, this.__wbg_ptr, addHeapObject(document2));
2029
2028
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2030
2029
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2031
- let v1;
2032
- if (r0 !== 0) {
2033
- v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2034
- wasm.__wbindgen_free(r0, r1 * 4, 4);
2030
+ if (r1) {
2031
+ throw takeObject(r0);
2035
2032
  }
2036
- return v1;
2037
2033
  } finally {
2038
2034
  wasm.__wbindgen_add_to_stack_pointer(16);
2039
2035
  }
2040
2036
  }
2041
2037
  /**
2042
- * @returns {(string)[] | undefined}
2038
+ * Creates a new `Schema` instance from a given `JsValue`.
2039
+ *
2040
+ * # Arguments
2041
+ *
2042
+ * * `schema` - A `JsValue` representing the schema.
2043
+ *
2044
+ * # Returns
2045
+ *
2046
+ * * `Result<Schema, JsValue>` - A result containing the new `Schema` instance or an error.
2047
+ * @param {any} schema
2048
+ * @returns {Schema}
2043
2049
  */
2044
- get encrypted() {
2050
+ static create(schema) {
2045
2051
  try {
2046
2052
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2047
- wasm.schema_encrypted(retptr, this.__wbg_ptr);
2053
+ wasm.schema_create(retptr, addHeapObject(schema));
2048
2054
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2049
2055
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2050
- let v1;
2051
- if (r0 !== 0) {
2052
- v1 = getArrayJsValueFromWasm0(r0, r1).slice();
2053
- wasm.__wbindgen_free(r0, r1 * 4, 4);
2056
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2057
+ if (r2) {
2058
+ throw takeObject(r1);
2054
2059
  }
2055
- return v1;
2060
+ return _Schema.__wrap(r0);
2056
2061
  } finally {
2057
2062
  wasm.__wbindgen_add_to_stack_pointer(16);
2058
2063
  }
2059
2064
  }
2060
2065
  /**
2061
- * Retrieves the properties of the schema.
2062
- *
2063
- * # Returns
2064
- *
2065
- * * `Result<JsValue, JsValue>` - A result containing the properties as a `JsValue` or an error.
2066
- * @returns {any}
2066
+ * @returns {boolean}
2067
2067
  */
2068
- get properties() {
2068
+ is_valid() {
2069
2069
  try {
2070
2070
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2071
- wasm.schema_properties(retptr, this.__wbg_ptr);
2071
+ wasm.schema_is_valid(retptr, this.__wbg_ptr);
2072
2072
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2073
2073
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2074
2074
  var r2 = getInt32Memory0()[retptr / 4 + 2];
2075
2075
  if (r2) {
2076
2076
  throw takeObject(r1);
2077
2077
  }
2078
- return takeObject(r0);
2078
+ return r0 !== 0;
2079
2079
  } finally {
2080
2080
  wasm.__wbindgen_add_to_stack_pointer(16);
2081
2081
  }
@@ -2108,16 +2108,6 @@ var WasmBindgenTestContext = class {
2108
2108
  return this;
2109
2109
  }
2110
2110
  /**
2111
- * Inform this context about runtime arguments passed to the test
2112
- * harness.
2113
- * @param {any[]} args
2114
- */
2115
- args(args) {
2116
- const ptr0 = passArrayJsValueToWasm0(args, wasm.__wbindgen_malloc);
2117
- const len0 = WASM_VECTOR_LEN;
2118
- wasm.wasmbindgentestcontext_args(this.__wbg_ptr, ptr0, len0);
2119
- }
2120
- /**
2121
2111
  * Executes a list of tests, returning a promise representing their
2122
2112
  * eventual completion.
2123
2113
  *
@@ -2136,6 +2126,16 @@ var WasmBindgenTestContext = class {
2136
2126
  const ret = wasm.wasmbindgentestcontext_run(this.__wbg_ptr, ptr0, len0);
2137
2127
  return takeObject(ret);
2138
2128
  }
2129
+ /**
2130
+ * Inform this context about runtime arguments passed to the test
2131
+ * harness.
2132
+ * @param {any[]} args
2133
+ */
2134
+ args(args) {
2135
+ const ptr0 = passArrayJsValueToWasm0(args, wasm.__wbindgen_malloc);
2136
+ const len0 = WASM_VECTOR_LEN;
2137
+ wasm.wasmbindgentestcontext_args(this.__wbg_ptr, ptr0, len0);
2138
+ }
2139
2139
  };
2140
2140
  async function __wbg_load(module2, imports) {
2141
2141
  if (typeof Response === "function" && module2 instanceof Response) {
@@ -2167,51 +2167,30 @@ function __wbg_get_imports() {
2167
2167
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2168
2168
  takeObject(arg0);
2169
2169
  };
2170
- imports.wbg.__wbg_count_19db4c3174d573d5 = function() {
2171
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2172
- const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2173
- return addHeapObject(ret);
2174
- }, arguments);
2175
- };
2176
- imports.wbg.__wbg_ridberror_new = function(arg0) {
2177
- const ret = RIDBError.__wrap(arg0);
2170
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2171
+ const ret = getObject(arg0);
2178
2172
  return addHeapObject(ret);
2179
2173
  };
2180
2174
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2181
2175
  const ret = getStringFromWasm0(arg0, arg1);
2182
2176
  return addHeapObject(ret);
2183
2177
  };
2184
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2185
- const ret = getObject(arg0);
2178
+ imports.wbg.__wbindgen_number_new = function(arg0) {
2179
+ const ret = arg0;
2186
2180
  return addHeapObject(ret);
2187
2181
  };
2188
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
2189
- const ret = getObject(arg0) === void 0;
2190
- return ret;
2182
+ imports.wbg.__wbg_ridberror_new = function(arg0) {
2183
+ const ret = RIDBError.__wrap(arg0);
2184
+ return addHeapObject(ret);
2191
2185
  };
2192
2186
  imports.wbg.__wbindgen_is_null = function(arg0) {
2193
2187
  const ret = getObject(arg0) === null;
2194
2188
  return ret;
2195
2189
  };
2196
- imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() {
2197
- return handleError(function(arg0) {
2198
- const ret = getObject(arg0).start();
2199
- return addHeapObject(ret);
2200
- }, arguments);
2201
- };
2202
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
2203
- const obj = takeObject(arg0).original;
2204
- if (obj.cnt-- == 1) {
2205
- obj.a = 0;
2206
- return true;
2207
- }
2208
- const ret = false;
2190
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
2191
+ const ret = getObject(arg0) === void 0;
2209
2192
  return ret;
2210
2193
  };
2211
- imports.wbg.__wbindgen_number_new = function(arg0) {
2212
- const ret = arg0;
2213
- return addHeapObject(ret);
2214
- };
2215
2194
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2216
2195
  const obj = getObject(arg1);
2217
2196
  const ret = typeof obj === "string" ? obj : void 0;
@@ -2220,6 +2199,12 @@ function __wbg_get_imports() {
2220
2199
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2221
2200
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2222
2201
  };
2202
+ imports.wbg.__wbg_count_19db4c3174d573d5 = function() {
2203
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2204
+ const ret = getObject(arg0).count(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2205
+ return addHeapObject(ret);
2206
+ }, arguments);
2207
+ };
2223
2208
  imports.wbg.__wbg_apply_9f557eba1534d597 = function() {
2224
2209
  return handleError(function(arg0, arg1, arg2) {
2225
2210
  const ret = getObject(arg1).apply(takeObject(arg2));
@@ -2233,57 +2218,51 @@ function __wbg_get_imports() {
2233
2218
  const ret = InMemory.__wrap(arg0);
2234
2219
  return addHeapObject(ret);
2235
2220
  };
2221
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
2222
+ const obj = takeObject(arg0).original;
2223
+ if (obj.cnt-- == 1) {
2224
+ obj.a = 0;
2225
+ return true;
2226
+ }
2227
+ const ret = false;
2228
+ return ret;
2229
+ };
2236
2230
  imports.wbg.__wbg_close_6384ed3c27ef25c1 = function() {
2237
2231
  return handleError(function(arg0) {
2238
2232
  const ret = getObject(arg0).close();
2239
2233
  return addHeapObject(ret);
2240
2234
  }, arguments);
2241
2235
  };
2236
+ imports.wbg.__wbg_start_76c138c3b73ae6f8 = function() {
2237
+ return handleError(function(arg0) {
2238
+ const ret = getObject(arg0).start();
2239
+ return addHeapObject(ret);
2240
+ }, arguments);
2241
+ };
2242
2242
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
2243
2243
  const obj = getObject(arg1);
2244
2244
  const ret = typeof obj === "number" ? obj : void 0;
2245
2245
  getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
2246
2246
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
2247
2247
  };
2248
- imports.wbg.__wbg_find_567c5c9f064fe3d2 = function() {
2249
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2250
- const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2251
- return addHeapObject(ret);
2252
- }, arguments);
2253
- };
2254
2248
  imports.wbg.__wbg_findDocumentById_2edf7350e5f12657 = function() {
2255
2249
  return handleError(function(arg0, arg1, arg2, arg3) {
2256
2250
  const ret = getObject(arg0).findDocumentById(getStringFromWasm0(arg1, arg2), takeObject(arg3));
2257
2251
  return addHeapObject(ret);
2258
2252
  }, arguments);
2259
2253
  };
2254
+ imports.wbg.__wbg_find_567c5c9f064fe3d2 = function() {
2255
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2256
+ const ret = getObject(arg0).find(getStringFromWasm0(arg1, arg2), takeObject(arg3), QueryOptions.__wrap(arg4));
2257
+ return addHeapObject(ret);
2258
+ }, arguments);
2259
+ };
2260
2260
  imports.wbg.__wbg_write_1159c67c07f62020 = function() {
2261
2261
  return handleError(function(arg0, arg1) {
2262
2262
  const ret = getObject(arg0).write(Operation.__wrap(arg1));
2263
2263
  return addHeapObject(ret);
2264
2264
  }, arguments);
2265
2265
  };
2266
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2267
- const ret = new Error(getStringFromWasm0(arg0, arg1));
2268
- return addHeapObject(ret);
2269
- };
2270
- imports.wbg.__wbg_database_new = function(arg0) {
2271
- const ret = Database.__wrap(arg0);
2272
- return addHeapObject(ret);
2273
- };
2274
- imports.wbg.__wbg_collection_new = function(arg0) {
2275
- const ret = Collection.__wrap(arg0);
2276
- return addHeapObject(ret);
2277
- };
2278
- imports.wbg.__wbg_indexdb_new = function(arg0) {
2279
- const ret = IndexDB.__wrap(arg0);
2280
- return addHeapObject(ret);
2281
- };
2282
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
2283
- const v = getObject(arg0);
2284
- const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
2285
- return ret;
2286
- };
2287
2266
  imports.wbg.__wbindgen_is_object = function(arg0) {
2288
2267
  const val = getObject(arg0);
2289
2268
  const ret = typeof val === "object" && val !== null;
@@ -2293,26 +2272,31 @@ function __wbg_get_imports() {
2293
2272
  const ret = typeof getObject(arg0) === "string";
2294
2273
  return ret;
2295
2274
  };
2296
- imports.wbg.__wbindgen_is_function = function(arg0) {
2297
- const ret = typeof getObject(arg0) === "function";
2298
- return ret;
2299
- };
2300
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
2301
- const ret = typeof getObject(arg0) === "bigint";
2275
+ imports.wbg.__wbindgen_is_array = function(arg0) {
2276
+ const ret = Array.isArray(getObject(arg0));
2302
2277
  return ret;
2303
2278
  };
2304
2279
  imports.wbg.__wbindgen_is_falsy = function(arg0) {
2305
2280
  const ret = !getObject(arg0);
2306
2281
  return ret;
2307
2282
  };
2308
- imports.wbg.__wbindgen_is_array = function(arg0) {
2309
- const ret = Array.isArray(getObject(arg0));
2283
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
2284
+ const v = getObject(arg0);
2285
+ const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
2310
2286
  return ret;
2311
2287
  };
2312
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2313
- const ret = getObject(arg0) === getObject(arg1);
2288
+ imports.wbg.__wbindgen_is_function = function(arg0) {
2289
+ const ret = typeof getObject(arg0) === "function";
2314
2290
  return ret;
2315
2291
  };
2292
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
2293
+ const ret = typeof getObject(arg0) === "bigint";
2294
+ return ret;
2295
+ };
2296
+ imports.wbg.__wbg_collection_new = function(arg0) {
2297
+ const ret = Collection.__wrap(arg0);
2298
+ return addHeapObject(ret);
2299
+ };
2316
2300
  imports.wbg.__wbindgen_in = function(arg0, arg1) {
2317
2301
  const ret = getObject(arg0) in getObject(arg1);
2318
2302
  return ret;
@@ -2321,10 +2305,26 @@ function __wbg_get_imports() {
2321
2305
  const ret = arg0;
2322
2306
  return addHeapObject(ret);
2323
2307
  };
2308
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2309
+ const ret = getObject(arg0) === getObject(arg1);
2310
+ return ret;
2311
+ };
2324
2312
  imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2325
2313
  const ret = BigInt.asUintN(64, arg0);
2326
2314
  return addHeapObject(ret);
2327
2315
  };
2316
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2317
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2318
+ return addHeapObject(ret);
2319
+ };
2320
+ imports.wbg.__wbg_database_new = function(arg0) {
2321
+ const ret = Database.__wrap(arg0);
2322
+ return addHeapObject(ret);
2323
+ };
2324
+ imports.wbg.__wbg_indexdb_new = function(arg0) {
2325
+ const ret = IndexDB.__wrap(arg0);
2326
+ return addHeapObject(ret);
2327
+ };
2328
2328
  imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
2329
2329
  const ret = getObject(arg0).crypto;
2330
2330
  return addHeapObject(ret);
@@ -2377,6 +2377,12 @@ function __wbg_get_imports() {
2377
2377
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2378
2378
  }, arguments);
2379
2379
  };
2380
+ imports.wbg.__wbg_indexedDB_d312f95759a15fdc = function() {
2381
+ return handleError(function(arg0) {
2382
+ const ret = getObject(arg0).indexedDB;
2383
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2384
+ }, arguments);
2385
+ };
2380
2386
  imports.wbg.__wbg_instanceof_WorkerGlobalScope_46b577f151fad960 = function(arg0) {
2381
2387
  let result;
2382
2388
  try {
@@ -2387,89 +2393,102 @@ function __wbg_get_imports() {
2387
2393
  const ret = result;
2388
2394
  return ret;
2389
2395
  };
2390
- imports.wbg.__wbg_indexedDB_d312f95759a15fdc = function() {
2396
+ imports.wbg.__wbg_continue_f1c3e0815924de62 = function() {
2391
2397
  return handleError(function(arg0) {
2392
- const ret = getObject(arg0).indexedDB;
2393
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2398
+ getObject(arg0).continue();
2394
2399
  }, arguments);
2395
2400
  };
2396
- imports.wbg.__wbg_debug_5fb96680aecf5dc8 = function(arg0) {
2397
- console.debug(getObject(arg0));
2398
- };
2399
- imports.wbg.__wbg_openCursor_425aba9cbe1d4d39 = function() {
2400
- return handleError(function(arg0) {
2401
- const ret = getObject(arg0).openCursor();
2401
+ imports.wbg.__wbg_open_f0d7259fd7e689ce = function() {
2402
+ return handleError(function(arg0, arg1, arg2, arg3) {
2403
+ const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
2402
2404
  return addHeapObject(ret);
2403
2405
  }, arguments);
2404
2406
  };
2405
- imports.wbg.__wbg_openCursor_e3042770817a8d57 = function() {
2406
- return handleError(function(arg0, arg1) {
2407
- const ret = getObject(arg0).openCursor(getObject(arg1));
2407
+ imports.wbg.__wbg_lowerBound_cd1c8a3b3fdf1582 = function() {
2408
+ return handleError(function(arg0) {
2409
+ const ret = IDBKeyRange.lowerBound(getObject(arg0));
2408
2410
  return addHeapObject(ret);
2409
2411
  }, arguments);
2410
2412
  };
2411
- imports.wbg.__wbg_createIndex_b8da1f5571f644be = function() {
2412
- return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
2413
- const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getObject(arg5));
2413
+ imports.wbg.__wbg_upperBound_1e3077b2c05bdd71 = function() {
2414
+ return handleError(function(arg0) {
2415
+ const ret = IDBKeyRange.upperBound(getObject(arg0));
2414
2416
  return addHeapObject(ret);
2415
2417
  }, arguments);
2416
2418
  };
2417
- imports.wbg.__wbg_delete_f60bba7d0ae59a4f = function() {
2419
+ imports.wbg.__wbg_lowerBound_e77f6e14cb69151e = function() {
2418
2420
  return handleError(function(arg0, arg1) {
2419
- const ret = getObject(arg0).delete(getObject(arg1));
2421
+ const ret = IDBKeyRange.lowerBound(getObject(arg0), arg1 !== 0);
2420
2422
  return addHeapObject(ret);
2421
2423
  }, arguments);
2422
2424
  };
2423
- imports.wbg.__wbg_get_5361b64cac0d0826 = function() {
2425
+ imports.wbg.__wbg_upperBound_4c692da072d1a11e = function() {
2424
2426
  return handleError(function(arg0, arg1) {
2425
- const ret = getObject(arg0).get(getObject(arg1));
2427
+ const ret = IDBKeyRange.upperBound(getObject(arg0), arg1 !== 0);
2426
2428
  return addHeapObject(ret);
2427
2429
  }, arguments);
2428
2430
  };
2429
- imports.wbg.__wbg_index_383b6812c1508030 = function() {
2430
- return handleError(function(arg0, arg1, arg2) {
2431
- const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
2431
+ imports.wbg.__wbg_bound_25385469508e98c7 = function() {
2432
+ return handleError(function(arg0, arg1, arg2, arg3) {
2433
+ const ret = IDBKeyRange.bound(getObject(arg0), getObject(arg1), arg2 !== 0, arg3 !== 0);
2432
2434
  return addHeapObject(ret);
2433
2435
  }, arguments);
2434
2436
  };
2435
- imports.wbg.__wbg_openCursor_30d58ae27a327629 = function() {
2437
+ imports.wbg.__wbg_only_cacf767244bdc280 = function() {
2436
2438
  return handleError(function(arg0) {
2437
- const ret = getObject(arg0).openCursor();
2439
+ const ret = IDBKeyRange.only(getObject(arg0));
2438
2440
  return addHeapObject(ret);
2439
2441
  }, arguments);
2440
2442
  };
2441
- imports.wbg.__wbg_openCursor_611b1e488c393dd8 = function() {
2442
- return handleError(function(arg0, arg1) {
2443
- const ret = getObject(arg0).openCursor(getObject(arg1));
2444
- return addHeapObject(ret);
2445
- }, arguments);
2443
+ imports.wbg.__wbg_get_910bbb94abdcf488 = function(arg0, arg1, arg2) {
2444
+ const ret = getObject(arg1)[arg2 >>> 0];
2445
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2446
+ var len1 = WASM_VECTOR_LEN;
2447
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2448
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2446
2449
  };
2447
- imports.wbg.__wbg_put_22792e17580ca18b = function() {
2448
- return handleError(function(arg0, arg1, arg2) {
2449
- const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
2450
+ imports.wbg.__wbg_length_9ae5daf9a690cba9 = function(arg0) {
2451
+ const ret = getObject(arg0).length;
2452
+ return ret;
2453
+ };
2454
+ imports.wbg.__wbg_contains_c65b44400b549286 = function(arg0, arg1, arg2) {
2455
+ const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2456
+ return ret;
2457
+ };
2458
+ imports.wbg.__wbg_value_86d3334f5075b232 = function() {
2459
+ return handleError(function(arg0) {
2460
+ const ret = getObject(arg0).value;
2450
2461
  return addHeapObject(ret);
2451
2462
  }, arguments);
2452
2463
  };
2453
- imports.wbg.__wbg_target_2fc177e386c8b7b0 = function(arg0) {
2454
- const ret = getObject(arg0).target;
2455
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2456
- };
2457
- imports.wbg.__wbg_instanceof_IdbDatabase_db671cf2454a9542 = function(arg0) {
2464
+ imports.wbg.__wbg_instanceof_IdbCursorWithValue_abeb44d13d947bc2 = function(arg0) {
2458
2465
  let result;
2459
2466
  try {
2460
- result = getObject(arg0) instanceof IDBDatabase;
2467
+ result = getObject(arg0) instanceof IDBCursorWithValue;
2461
2468
  } catch (_) {
2462
2469
  result = false;
2463
2470
  }
2464
2471
  const ret = result;
2465
2472
  return ret;
2466
2473
  };
2467
- imports.wbg.__wbg_objectStoreNames_588b5924274239fd = function(arg0) {
2468
- const ret = getObject(arg0).objectStoreNames;
2469
- return addHeapObject(ret);
2474
+ imports.wbg.__wbg_debug_5fb96680aecf5dc8 = function(arg0) {
2475
+ console.debug(getObject(arg0));
2470
2476
  };
2471
- imports.wbg.__wbg_close_6bfe4ca2fe67cb67 = function(arg0) {
2472
- getObject(arg0).close();
2477
+ imports.wbg.__wbg_openCursor_425aba9cbe1d4d39 = function() {
2478
+ return handleError(function(arg0) {
2479
+ const ret = getObject(arg0).openCursor();
2480
+ return addHeapObject(ret);
2481
+ }, arguments);
2482
+ };
2483
+ imports.wbg.__wbg_openCursor_e3042770817a8d57 = function() {
2484
+ return handleError(function(arg0, arg1) {
2485
+ const ret = getObject(arg0).openCursor(getObject(arg1));
2486
+ return addHeapObject(ret);
2487
+ }, arguments);
2488
+ };
2489
+ imports.wbg.__wbg_objectStoreNames_588b5924274239fd = function(arg0) {
2490
+ const ret = getObject(arg0).objectStoreNames;
2491
+ return addHeapObject(ret);
2473
2492
  };
2474
2493
  imports.wbg.__wbg_createObjectStore_882f2f6b1b1ef040 = function() {
2475
2494
  return handleError(function(arg0, arg1, arg2) {
@@ -2489,131 +2508,112 @@ function __wbg_get_imports() {
2489
2508
  return addHeapObject(ret);
2490
2509
  }, arguments);
2491
2510
  };
2492
- imports.wbg.__wbg_objectStore_da468793bd9df17b = function() {
2493
- return handleError(function(arg0, arg1, arg2) {
2494
- const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2495
- return addHeapObject(ret);
2496
- }, arguments);
2497
- };
2498
- imports.wbg.__wbg_continue_f1c3e0815924de62 = function() {
2499
- return handleError(function(arg0) {
2500
- getObject(arg0).continue();
2501
- }, arguments);
2502
- };
2503
- imports.wbg.__wbg_length_9ae5daf9a690cba9 = function(arg0) {
2504
- const ret = getObject(arg0).length;
2505
- return ret;
2506
- };
2507
- imports.wbg.__wbg_contains_c65b44400b549286 = function(arg0, arg1, arg2) {
2508
- const ret = getObject(arg0).contains(getStringFromWasm0(arg1, arg2));
2509
- return ret;
2510
- };
2511
- imports.wbg.__wbg_get_910bbb94abdcf488 = function(arg0, arg1, arg2) {
2512
- const ret = getObject(arg1)[arg2 >>> 0];
2513
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2514
- var len1 = WASM_VECTOR_LEN;
2515
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2516
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2511
+ imports.wbg.__wbg_close_6bfe4ca2fe67cb67 = function(arg0) {
2512
+ getObject(arg0).close();
2517
2513
  };
2518
- imports.wbg.__wbg_instanceof_IdbCursorWithValue_abeb44d13d947bc2 = function(arg0) {
2514
+ imports.wbg.__wbg_instanceof_IdbDatabase_db671cf2454a9542 = function(arg0) {
2519
2515
  let result;
2520
2516
  try {
2521
- result = getObject(arg0) instanceof IDBCursorWithValue;
2517
+ result = getObject(arg0) instanceof IDBDatabase;
2522
2518
  } catch (_) {
2523
2519
  result = false;
2524
2520
  }
2525
2521
  const ret = result;
2526
2522
  return ret;
2527
2523
  };
2528
- imports.wbg.__wbg_value_86d3334f5075b232 = function() {
2524
+ imports.wbg.__wbg_openCursor_30d58ae27a327629 = function() {
2529
2525
  return handleError(function(arg0) {
2530
- const ret = getObject(arg0).value;
2526
+ const ret = getObject(arg0).openCursor();
2531
2527
  return addHeapObject(ret);
2532
2528
  }, arguments);
2533
2529
  };
2534
- imports.wbg.__wbg_open_f0d7259fd7e689ce = function() {
2535
- return handleError(function(arg0, arg1, arg2, arg3) {
2536
- const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
2530
+ imports.wbg.__wbg_put_22792e17580ca18b = function() {
2531
+ return handleError(function(arg0, arg1, arg2) {
2532
+ const ret = getObject(arg0).put(getObject(arg1), getObject(arg2));
2537
2533
  return addHeapObject(ret);
2538
2534
  }, arguments);
2539
2535
  };
2540
- imports.wbg.__wbg_bound_25385469508e98c7 = function() {
2541
- return handleError(function(arg0, arg1, arg2, arg3) {
2542
- const ret = IDBKeyRange.bound(getObject(arg0), getObject(arg1), arg2 !== 0, arg3 !== 0);
2536
+ imports.wbg.__wbg_openCursor_611b1e488c393dd8 = function() {
2537
+ return handleError(function(arg0, arg1) {
2538
+ const ret = getObject(arg0).openCursor(getObject(arg1));
2543
2539
  return addHeapObject(ret);
2544
2540
  }, arguments);
2545
2541
  };
2546
- imports.wbg.__wbg_lowerBound_cd1c8a3b3fdf1582 = function() {
2547
- return handleError(function(arg0) {
2548
- const ret = IDBKeyRange.lowerBound(getObject(arg0));
2542
+ imports.wbg.__wbg_get_5361b64cac0d0826 = function() {
2543
+ return handleError(function(arg0, arg1) {
2544
+ const ret = getObject(arg0).get(getObject(arg1));
2549
2545
  return addHeapObject(ret);
2550
2546
  }, arguments);
2551
2547
  };
2552
- imports.wbg.__wbg_lowerBound_e77f6e14cb69151e = function() {
2553
- return handleError(function(arg0, arg1) {
2554
- const ret = IDBKeyRange.lowerBound(getObject(arg0), arg1 !== 0);
2548
+ imports.wbg.__wbg_createIndex_b8da1f5571f644be = function() {
2549
+ return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
2550
+ const ret = getObject(arg0).createIndex(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getObject(arg5));
2555
2551
  return addHeapObject(ret);
2556
2552
  }, arguments);
2557
2553
  };
2558
- imports.wbg.__wbg_only_cacf767244bdc280 = function() {
2559
- return handleError(function(arg0) {
2560
- const ret = IDBKeyRange.only(getObject(arg0));
2554
+ imports.wbg.__wbg_index_383b6812c1508030 = function() {
2555
+ return handleError(function(arg0, arg1, arg2) {
2556
+ const ret = getObject(arg0).index(getStringFromWasm0(arg1, arg2));
2561
2557
  return addHeapObject(ret);
2562
2558
  }, arguments);
2563
2559
  };
2564
- imports.wbg.__wbg_upperBound_1e3077b2c05bdd71 = function() {
2565
- return handleError(function(arg0) {
2566
- const ret = IDBKeyRange.upperBound(getObject(arg0));
2560
+ imports.wbg.__wbg_delete_f60bba7d0ae59a4f = function() {
2561
+ return handleError(function(arg0, arg1) {
2562
+ const ret = getObject(arg0).delete(getObject(arg1));
2567
2563
  return addHeapObject(ret);
2568
2564
  }, arguments);
2569
2565
  };
2570
- imports.wbg.__wbg_upperBound_4c692da072d1a11e = function() {
2571
- return handleError(function(arg0, arg1) {
2572
- const ret = IDBKeyRange.upperBound(getObject(arg0), arg1 !== 0);
2566
+ imports.wbg.__wbg_target_2fc177e386c8b7b0 = function(arg0) {
2567
+ const ret = getObject(arg0).target;
2568
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2569
+ };
2570
+ imports.wbg.__wbg_setonerror_8479b33e7568a904 = function(arg0, arg1) {
2571
+ getObject(arg0).onerror = getObject(arg1);
2572
+ };
2573
+ imports.wbg.__wbg_setonsuccess_632ce0a1460455c2 = function(arg0, arg1) {
2574
+ getObject(arg0).onsuccess = getObject(arg1);
2575
+ };
2576
+ imports.wbg.__wbg_error_685b20024dc2d6ca = function() {
2577
+ return handleError(function(arg0) {
2578
+ const ret = getObject(arg0).error;
2579
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2580
+ }, arguments);
2581
+ };
2582
+ imports.wbg.__wbg_result_6cedf5f78600a79c = function() {
2583
+ return handleError(function(arg0) {
2584
+ const ret = getObject(arg0).result;
2573
2585
  return addHeapObject(ret);
2574
2586
  }, arguments);
2575
2587
  };
2576
- imports.wbg.__wbg_instanceof_IdbOpenDbRequest_3f4a166bc0340578 = function(arg0) {
2588
+ imports.wbg.__wbg_instanceof_IdbRequest_93249da04f5370b6 = function(arg0) {
2577
2589
  let result;
2578
2590
  try {
2579
- result = getObject(arg0) instanceof IDBOpenDBRequest;
2591
+ result = getObject(arg0) instanceof IDBRequest;
2580
2592
  } catch (_) {
2581
2593
  result = false;
2582
2594
  }
2583
2595
  const ret = result;
2584
2596
  return ret;
2585
2597
  };
2598
+ imports.wbg.__wbg_objectStore_da468793bd9df17b = function() {
2599
+ return handleError(function(arg0, arg1, arg2) {
2600
+ const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2));
2601
+ return addHeapObject(ret);
2602
+ }, arguments);
2603
+ };
2586
2604
  imports.wbg.__wbg_setonupgradeneeded_ad7645373c7d5e1b = function(arg0, arg1) {
2587
2605
  getObject(arg0).onupgradeneeded = getObject(arg1);
2588
2606
  };
2589
- imports.wbg.__wbg_instanceof_IdbRequest_93249da04f5370b6 = function(arg0) {
2607
+ imports.wbg.__wbg_instanceof_IdbOpenDbRequest_3f4a166bc0340578 = function(arg0) {
2590
2608
  let result;
2591
2609
  try {
2592
- result = getObject(arg0) instanceof IDBRequest;
2610
+ result = getObject(arg0) instanceof IDBOpenDBRequest;
2593
2611
  } catch (_) {
2594
2612
  result = false;
2595
2613
  }
2596
2614
  const ret = result;
2597
2615
  return ret;
2598
2616
  };
2599
- imports.wbg.__wbg_result_6cedf5f78600a79c = function() {
2600
- return handleError(function(arg0) {
2601
- const ret = getObject(arg0).result;
2602
- return addHeapObject(ret);
2603
- }, arguments);
2604
- };
2605
- imports.wbg.__wbg_error_685b20024dc2d6ca = function() {
2606
- return handleError(function(arg0) {
2607
- const ret = getObject(arg0).error;
2608
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2609
- }, arguments);
2610
- };
2611
- imports.wbg.__wbg_setonsuccess_632ce0a1460455c2 = function(arg0, arg1) {
2612
- getObject(arg0).onsuccess = getObject(arg1);
2613
- };
2614
- imports.wbg.__wbg_setonerror_8479b33e7568a904 = function(arg0, arg1) {
2615
- getObject(arg0).onerror = getObject(arg1);
2616
- };
2617
2617
  imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2618
2618
  const ret = getObject(arg0) == getObject(arg1);
2619
2619
  return ret;
@@ -2622,13 +2622,6 @@ function __wbg_get_imports() {
2622
2622
  const ret = +getObject(arg0);
2623
2623
  return ret;
2624
2624
  };
2625
- imports.wbg.__wbg_String_389b54bd9d25375f = function(arg0, arg1) {
2626
- const ret = String(getObject(arg1));
2627
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2628
- const len1 = WASM_VECTOR_LEN;
2629
- getInt32Memory0()[arg0 / 4 + 1] = len1;
2630
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2631
- };
2632
2625
  imports.wbg.__wbg_getwithrefkey_4a92a5eca60879b9 = function(arg0, arg1) {
2633
2626
  const ret = getObject(arg0)[getObject(arg1)];
2634
2627
  return addHeapObject(ret);
@@ -2636,22 +2629,15 @@ function __wbg_get_imports() {
2636
2629
  imports.wbg.__wbg_set_9182712abebf82ef = function(arg0, arg1, arg2) {
2637
2630
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2638
2631
  };
2639
- imports.wbg.__wbg_log_28eee4e6432efd24 = function(arg0, arg1) {
2640
- console.log(getStringFromWasm0(arg0, arg1));
2641
- };
2642
- imports.wbg.__wbg_String_55b8bdc4bc243677 = function(arg0, arg1) {
2632
+ imports.wbg.__wbg_String_389b54bd9d25375f = function(arg0, arg1) {
2643
2633
  const ret = String(getObject(arg1));
2644
2634
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2645
2635
  const len1 = WASM_VECTOR_LEN;
2646
2636
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2647
2637
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2648
2638
  };
2649
- imports.wbg.__wbg_getElementById_8458f2a6c28467dc = function(arg0, arg1, arg2) {
2650
- const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
2651
- return addHeapObject(ret);
2652
- };
2653
- imports.wbg.__wbg_settextcontent_fc3ff485b96fcb1d = function(arg0, arg1, arg2) {
2654
- getObject(arg0).textContent = getStringFromWasm0(arg1, arg2);
2639
+ imports.wbg.__wbg_log_28eee4e6432efd24 = function(arg0, arg1) {
2640
+ console.log(getStringFromWasm0(arg0, arg1));
2655
2641
  };
2656
2642
  imports.wbg.__wbg_wbgtestinvoke_8c20f4132af2bded = function() {
2657
2643
  return handleError(function(arg0, arg1) {
@@ -2661,7 +2647,7 @@ function __wbg_get_imports() {
2661
2647
  const a = state0.a;
2662
2648
  state0.a = 0;
2663
2649
  try {
2664
- return __wbg_adapter_297(a, state0.b);
2650
+ return __wbg_adapter_287(a, state0.b);
2665
2651
  } finally {
2666
2652
  state0.a = a;
2667
2653
  }
@@ -2672,13 +2658,20 @@ function __wbg_get_imports() {
2672
2658
  }
2673
2659
  }, arguments);
2674
2660
  };
2675
- imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
2676
- __wbg_test_output_writeln(takeObject(arg0));
2677
- };
2678
- imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
2679
- const ret = getObject(arg0).stack;
2661
+ imports.wbg.__wbg_getElementById_8458f2a6c28467dc = function(arg0, arg1, arg2) {
2662
+ const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
2680
2663
  return addHeapObject(ret);
2681
2664
  };
2665
+ imports.wbg.__wbg_settextcontent_fc3ff485b96fcb1d = function(arg0, arg1, arg2) {
2666
+ getObject(arg0).textContent = getStringFromWasm0(arg1, arg2);
2667
+ };
2668
+ imports.wbg.__wbg_String_55b8bdc4bc243677 = function(arg0, arg1) {
2669
+ const ret = String(getObject(arg1));
2670
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2671
+ const len1 = WASM_VECTOR_LEN;
2672
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
2673
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2674
+ };
2682
2675
  imports.wbg.__wbg_self_55106357ec10ecd4 = function(arg0) {
2683
2676
  const ret = getObject(arg0).self;
2684
2677
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
@@ -2694,8 +2687,12 @@ function __wbg_get_imports() {
2694
2687
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2695
2688
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2696
2689
  };
2697
- imports.wbg.__wbg_textcontent_67e4e811cbdf00fc = function(arg0, arg1) {
2698
- const ret = getObject(arg1).textContent;
2690
+ imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
2691
+ const ret = document;
2692
+ return addHeapObject(ret);
2693
+ };
2694
+ imports.wbg.__wbg_stack_17c77e9f5bfe6714 = function(arg0, arg1) {
2695
+ const ret = getObject(arg1).stack;
2699
2696
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2700
2697
  const len1 = WASM_VECTOR_LEN;
2701
2698
  getInt32Memory0()[arg0 / 4 + 1] = len1;
@@ -2705,17 +2702,20 @@ function __wbg_get_imports() {
2705
2702
  const ret = getObject(arg0).stack;
2706
2703
  return addHeapObject(ret);
2707
2704
  };
2708
- imports.wbg.__wbg_static_accessor_document_d4b6ae7f5578480f = function() {
2709
- const ret = document;
2710
- return addHeapObject(ret);
2711
- };
2712
- imports.wbg.__wbg_stack_17c77e9f5bfe6714 = function(arg0, arg1) {
2713
- const ret = getObject(arg1).stack;
2705
+ imports.wbg.__wbg_textcontent_67e4e811cbdf00fc = function(arg0, arg1) {
2706
+ const ret = getObject(arg1).textContent;
2714
2707
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2715
2708
  const len1 = WASM_VECTOR_LEN;
2716
2709
  getInt32Memory0()[arg0 / 4 + 1] = len1;
2717
2710
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
2718
2711
  };
2712
+ imports.wbg.__wbg_stack_436273c21658169b = function(arg0) {
2713
+ const ret = getObject(arg0).stack;
2714
+ return addHeapObject(ret);
2715
+ };
2716
+ imports.wbg.__wbg_wbgtestoutputwriteln_4db3bd64914ec955 = function(arg0) {
2717
+ __wbg_test_output_writeln(takeObject(arg0));
2718
+ };
2719
2719
  imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
2720
2720
  const ret = new Error();
2721
2721
  return addHeapObject(ret);
@@ -2738,42 +2738,55 @@ function __wbg_get_imports() {
2738
2738
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2739
2739
  }
2740
2740
  };
2741
- imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
2742
- const ret = getObject(arg0).queueMicrotask;
2743
- return addHeapObject(ret);
2744
- };
2745
2741
  imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
2746
2742
  queueMicrotask(getObject(arg0));
2747
2743
  };
2748
- imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
2749
- const ret = getObject(arg0)[arg1 >>> 0];
2744
+ imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
2745
+ const ret = getObject(arg0).queueMicrotask;
2750
2746
  return addHeapObject(ret);
2751
2747
  };
2752
- imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
2753
- const ret = getObject(arg0).length;
2754
- return ret;
2748
+ imports.wbg.__wbg_new_d9bc3a0147634640 = function() {
2749
+ const ret = /* @__PURE__ */ new Map();
2750
+ return addHeapObject(ret);
2755
2751
  };
2756
2752
  imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
2757
2753
  const ret = new Array();
2758
2754
  return addHeapObject(ret);
2759
2755
  };
2756
+ imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
2757
+ const ret = new Object();
2758
+ return addHeapObject(ret);
2759
+ };
2760
2760
  imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
2761
2761
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2762
2762
  return addHeapObject(ret);
2763
2763
  };
2764
- imports.wbg.__wbg_new_d9bc3a0147634640 = function() {
2765
- const ret = /* @__PURE__ */ new Map();
2764
+ imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
2765
+ const ret = new Uint8Array(getObject(arg0));
2766
2766
  return addHeapObject(ret);
2767
2767
  };
2768
- imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
2769
- const ret = getObject(arg0).next;
2768
+ imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
2769
+ const ret = getObject(arg0).buffer;
2770
2770
  return addHeapObject(ret);
2771
2771
  };
2772
- imports.wbg.__wbg_next_196c84450b364254 = function() {
2773
- return handleError(function(arg0) {
2774
- const ret = getObject(arg0).next();
2775
- return addHeapObject(ret);
2776
- }, arguments);
2772
+ imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
2773
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2774
+ return addHeapObject(ret);
2775
+ };
2776
+ imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
2777
+ const ret = new Uint8Array(arg0 >>> 0);
2778
+ return addHeapObject(ret);
2779
+ };
2780
+ imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
2781
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2782
+ };
2783
+ imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
2784
+ const ret = getObject(arg0).length;
2785
+ return ret;
2786
+ };
2787
+ imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
2788
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
2789
+ return addHeapObject(ret);
2777
2790
  };
2778
2791
  imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
2779
2792
  const ret = getObject(arg0).done;
@@ -2783,49 +2796,55 @@ function __wbg_get_imports() {
2783
2796
  const ret = getObject(arg0).value;
2784
2797
  return addHeapObject(ret);
2785
2798
  };
2786
- imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
2787
- const ret = Symbol.iterator;
2788
- return addHeapObject(ret);
2789
- };
2790
- imports.wbg.__wbg_get_e3c254076557e348 = function() {
2791
- return handleError(function(arg0, arg1) {
2792
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
2793
- return addHeapObject(ret);
2794
- }, arguments);
2799
+ imports.wbg.__wbg_instanceof_Object_71ca3c0a59266746 = function(arg0) {
2800
+ let result;
2801
+ try {
2802
+ result = getObject(arg0) instanceof Object;
2803
+ } catch (_) {
2804
+ result = false;
2805
+ }
2806
+ const ret = result;
2807
+ return ret;
2795
2808
  };
2796
- imports.wbg.__wbg_call_27c0f87801dedf93 = function() {
2797
- return handleError(function(arg0, arg1) {
2798
- const ret = getObject(arg0).call(getObject(arg1));
2799
- return addHeapObject(ret);
2800
- }, arguments);
2809
+ imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
2810
+ let result;
2811
+ try {
2812
+ result = getObject(arg0) instanceof Uint8Array;
2813
+ } catch (_) {
2814
+ result = false;
2815
+ }
2816
+ const ret = result;
2817
+ return ret;
2801
2818
  };
2802
- imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
2803
- const ret = new Object();
2819
+ imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
2820
+ let result;
2821
+ try {
2822
+ result = getObject(arg0) instanceof ArrayBuffer;
2823
+ } catch (_) {
2824
+ result = false;
2825
+ }
2826
+ const ret = result;
2827
+ return ret;
2828
+ };
2829
+ imports.wbg.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
2830
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2804
2831
  return addHeapObject(ret);
2805
2832
  };
2806
- imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() {
2807
- return handleError(function() {
2808
- const ret = self.self;
2809
- return addHeapObject(ret);
2810
- }, arguments);
2833
+ imports.wbg.__wbg_new0_7d84e5b2cd9fdc73 = function() {
2834
+ const ret = /* @__PURE__ */ new Date();
2835
+ return addHeapObject(ret);
2811
2836
  };
2812
- imports.wbg.__wbg_window_c6fb939a7f436783 = function() {
2813
- return handleError(function() {
2814
- const ret = window.window;
2815
- return addHeapObject(ret);
2816
- }, arguments);
2837
+ imports.wbg.__wbg_getTime_2bc4375165f02d15 = function(arg0) {
2838
+ const ret = getObject(arg0).getTime();
2839
+ return ret;
2817
2840
  };
2818
- imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() {
2819
- return handleError(function() {
2820
- const ret = globalThis.globalThis;
2821
- return addHeapObject(ret);
2822
- }, arguments);
2841
+ imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
2842
+ const ret = getObject(arg0)[arg1 >>> 0];
2843
+ return addHeapObject(ret);
2823
2844
  };
2824
- imports.wbg.__wbg_global_207b558942527489 = function() {
2825
- return handleError(function() {
2826
- const ret = global.global;
2827
- return addHeapObject(ret);
2828
- }, arguments);
2845
+ imports.wbg.__wbg_of_4a2b313a453ec059 = function(arg0) {
2846
+ const ret = Array.of(getObject(arg0));
2847
+ return addHeapObject(ret);
2829
2848
  };
2830
2849
  imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
2831
2850
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
@@ -2834,6 +2853,14 @@ function __wbg_get_imports() {
2834
2853
  const ret = Array.from(getObject(arg0));
2835
2854
  return addHeapObject(ret);
2836
2855
  };
2856
+ imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
2857
+ const ret = getObject(arg0).length;
2858
+ return ret;
2859
+ };
2860
+ imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
2861
+ const ret = getObject(arg0).push(getObject(arg1));
2862
+ return ret;
2863
+ };
2837
2864
  imports.wbg.__wbg_forEach_2be8de7347d63332 = function(arg0, arg1, arg2) {
2838
2865
  try {
2839
2866
  var state0 = { a: arg1, b: arg2 };
@@ -2841,7 +2868,7 @@ function __wbg_get_imports() {
2841
2868
  const a = state0.a;
2842
2869
  state0.a = 0;
2843
2870
  try {
2844
- return __wbg_adapter_340(a, state0.b, arg02, arg12, arg22);
2871
+ return __wbg_adapter_378(a, state0.b, arg02, arg12, arg22);
2845
2872
  } finally {
2846
2873
  state0.a = a;
2847
2874
  }
@@ -2855,70 +2882,26 @@ function __wbg_get_imports() {
2855
2882
  const ret = Array.isArray(getObject(arg0));
2856
2883
  return ret;
2857
2884
  };
2858
- imports.wbg.__wbg_of_4a2b313a453ec059 = function(arg0) {
2859
- const ret = Array.of(getObject(arg0));
2860
- return addHeapObject(ret);
2861
- };
2862
- imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
2863
- const ret = getObject(arg0).push(getObject(arg1));
2864
- return ret;
2865
- };
2866
- imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
2867
- let result;
2868
- try {
2869
- result = getObject(arg0) instanceof ArrayBuffer;
2870
- } catch (_) {
2871
- result = false;
2872
- }
2873
- const ret = result;
2874
- return ret;
2875
- };
2876
- imports.wbg.__wbg_message_5bf28016c2b49cfb = function(arg0) {
2877
- const ret = getObject(arg0).message;
2878
- return addHeapObject(ret);
2879
- };
2880
2885
  imports.wbg.__wbg_name_e7429f0dda6079e2 = function(arg0) {
2881
2886
  const ret = getObject(arg0).name;
2882
2887
  return addHeapObject(ret);
2883
2888
  };
2884
- imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() {
2885
- return handleError(function(arg0, arg1, arg2) {
2886
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2887
- return addHeapObject(ret);
2888
- }, arguments);
2889
- };
2890
- imports.wbg.__wbg_call_938992c832f74314 = function() {
2891
- return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2892
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2893
- return addHeapObject(ret);
2894
- }, arguments);
2895
- };
2896
- imports.wbg.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
2897
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2889
+ imports.wbg.__wbg_message_5bf28016c2b49cfb = function(arg0) {
2890
+ const ret = getObject(arg0).message;
2898
2891
  return addHeapObject(ret);
2899
2892
  };
2900
2893
  imports.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2 = function(arg0) {
2901
2894
  const ret = Number.isSafeInteger(getObject(arg0));
2902
2895
  return ret;
2903
2896
  };
2904
- imports.wbg.__wbg_getTime_2bc4375165f02d15 = function(arg0) {
2905
- const ret = getObject(arg0).getTime();
2897
+ imports.wbg.__wbg_is_010fdc0f4ab96916 = function(arg0, arg1) {
2898
+ const ret = Object.is(getObject(arg0), getObject(arg1));
2906
2899
  return ret;
2907
2900
  };
2908
- imports.wbg.__wbg_new0_7d84e5b2cd9fdc73 = function() {
2909
- const ret = /* @__PURE__ */ new Date();
2901
+ imports.wbg.__wbg_keys_91e412b4b222659f = function(arg0) {
2902
+ const ret = Object.keys(getObject(arg0));
2910
2903
  return addHeapObject(ret);
2911
2904
  };
2912
- imports.wbg.__wbg_instanceof_Object_71ca3c0a59266746 = function(arg0) {
2913
- let result;
2914
- try {
2915
- result = getObject(arg0) instanceof Object;
2916
- } catch (_) {
2917
- result = false;
2918
- }
2919
- const ret = result;
2920
- return ret;
2921
- };
2922
2905
  imports.wbg.__wbg_assign_496d2d14fecafbcf = function(arg0, arg1) {
2923
2906
  const ret = Object.assign(getObject(arg0), getObject(arg1));
2924
2907
  return addHeapObject(ret);
@@ -2927,14 +2910,40 @@ function __wbg_get_imports() {
2927
2910
  const ret = Object.entries(getObject(arg0));
2928
2911
  return addHeapObject(ret);
2929
2912
  };
2930
- imports.wbg.__wbg_is_010fdc0f4ab96916 = function(arg0, arg1) {
2931
- const ret = Object.is(getObject(arg0), getObject(arg1));
2932
- return ret;
2933
- };
2934
- imports.wbg.__wbg_keys_91e412b4b222659f = function(arg0) {
2935
- const ret = Object.keys(getObject(arg0));
2913
+ imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
2914
+ const ret = Symbol.iterator;
2936
2915
  return addHeapObject(ret);
2937
2916
  };
2917
+ imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() {
2918
+ return handleError(function() {
2919
+ const ret = self.self;
2920
+ return addHeapObject(ret);
2921
+ }, arguments);
2922
+ };
2923
+ imports.wbg.__wbg_window_c6fb939a7f436783 = function() {
2924
+ return handleError(function() {
2925
+ const ret = window.window;
2926
+ return addHeapObject(ret);
2927
+ }, arguments);
2928
+ };
2929
+ imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() {
2930
+ return handleError(function() {
2931
+ const ret = globalThis.globalThis;
2932
+ return addHeapObject(ret);
2933
+ }, arguments);
2934
+ };
2935
+ imports.wbg.__wbg_global_207b558942527489 = function() {
2936
+ return handleError(function() {
2937
+ const ret = global.global;
2938
+ return addHeapObject(ret);
2939
+ }, arguments);
2940
+ };
2941
+ imports.wbg.__wbg_call_27c0f87801dedf93 = function() {
2942
+ return handleError(function(arg0, arg1) {
2943
+ const ret = getObject(arg0).call(getObject(arg1));
2944
+ return addHeapObject(ret);
2945
+ }, arguments);
2946
+ };
2938
2947
  imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
2939
2948
  try {
2940
2949
  var state0 = { a: arg0, b: arg1 };
@@ -2942,7 +2951,7 @@ function __wbg_get_imports() {
2942
2951
  const a = state0.a;
2943
2952
  state0.a = 0;
2944
2953
  try {
2945
- return __wbg_adapter_397(a, state0.b, arg02, arg12);
2954
+ return __wbg_adapter_395(a, state0.b, arg02, arg12);
2946
2955
  } finally {
2947
2956
  state0.a = a;
2948
2957
  }
@@ -2953,10 +2962,6 @@ function __wbg_get_imports() {
2953
2962
  state0.a = state0.b = 0;
2954
2963
  }
2955
2964
  };
2956
- imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
2957
- const ret = Promise.resolve(getObject(arg0));
2958
- return addHeapObject(ret);
2959
- };
2960
2965
  imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
2961
2966
  const ret = getObject(arg0).then(getObject(arg1));
2962
2967
  return addHeapObject(ret);
@@ -2965,46 +2970,47 @@ function __wbg_get_imports() {
2965
2970
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
2966
2971
  return addHeapObject(ret);
2967
2972
  };
2968
- imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
2969
- const ret = getObject(arg0).buffer;
2970
- return addHeapObject(ret);
2971
- };
2972
- imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
2973
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
2973
+ imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
2974
+ const ret = Promise.resolve(getObject(arg0));
2974
2975
  return addHeapObject(ret);
2975
2976
  };
2976
- imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
2977
- const ret = new Uint8Array(getObject(arg0));
2978
- return addHeapObject(ret);
2977
+ imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() {
2978
+ return handleError(function(arg0, arg1, arg2) {
2979
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2980
+ return addHeapObject(ret);
2981
+ }, arguments);
2979
2982
  };
2980
- imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
2981
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
2983
+ imports.wbg.__wbg_call_938992c832f74314 = function() {
2984
+ return handleError(function(arg0, arg1, arg2, arg3, arg4) {
2985
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2986
+ return addHeapObject(ret);
2987
+ }, arguments);
2982
2988
  };
2983
- imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
2984
- const ret = getObject(arg0).length;
2985
- return ret;
2989
+ imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
2990
+ const ret = getObject(arg0).next;
2991
+ return addHeapObject(ret);
2986
2992
  };
2987
- imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
2988
- let result;
2989
- try {
2990
- result = getObject(arg0) instanceof Uint8Array;
2991
- } catch (_) {
2992
- result = false;
2993
- }
2994
- const ret = result;
2995
- return ret;
2993
+ imports.wbg.__wbg_next_196c84450b364254 = function() {
2994
+ return handleError(function(arg0) {
2995
+ const ret = getObject(arg0).next();
2996
+ return addHeapObject(ret);
2997
+ }, arguments);
2996
2998
  };
2997
- imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
2998
- const ret = new Uint8Array(arg0 >>> 0);
2999
- return addHeapObject(ret);
2999
+ imports.wbg.__wbg_get_e3c254076557e348 = function() {
3000
+ return handleError(function(arg0, arg1) {
3001
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
3002
+ return addHeapObject(ret);
3003
+ }, arguments);
3000
3004
  };
3001
- imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
3002
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
3003
- return addHeapObject(ret);
3005
+ imports.wbg.__wbg_parse_66d1801634e099ac = function() {
3006
+ return handleError(function(arg0, arg1) {
3007
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
3008
+ return addHeapObject(ret);
3009
+ }, arguments);
3004
3010
  };
3005
- imports.wbg.__wbg_apply_0a5aa603881e6d79 = function() {
3006
- return handleError(function(arg0, arg1, arg2) {
3007
- const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
3011
+ imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() {
3012
+ return handleError(function(arg0) {
3013
+ const ret = JSON.stringify(getObject(arg0));
3008
3014
  return addHeapObject(ret);
3009
3015
  }, arguments);
3010
3016
  };
@@ -3026,15 +3032,9 @@ function __wbg_get_imports() {
3026
3032
  return ret;
3027
3033
  }, arguments);
3028
3034
  };
3029
- imports.wbg.__wbg_parse_66d1801634e099ac = function() {
3030
- return handleError(function(arg0, arg1) {
3031
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
3032
- return addHeapObject(ret);
3033
- }, arguments);
3034
- };
3035
- imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() {
3036
- return handleError(function(arg0) {
3037
- const ret = JSON.stringify(getObject(arg0));
3035
+ imports.wbg.__wbg_apply_0a5aa603881e6d79 = function() {
3036
+ return handleError(function(arg0, arg1, arg2) {
3037
+ const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
3038
3038
  return addHeapObject(ret);
3039
3039
  }, arguments);
3040
3040
  };
@@ -3044,6 +3044,13 @@ function __wbg_get_imports() {
3044
3044
  getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
3045
3045
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
3046
3046
  };
3047
+ imports.wbg.__wbindgen_memory = function() {
3048
+ const ret = wasm.memory;
3049
+ return addHeapObject(ret);
3050
+ };
3051
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
3052
+ throw new Error(getStringFromWasm0(arg0, arg1));
3053
+ };
3047
3054
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
3048
3055
  const ret = debugString(getObject(arg1));
3049
3056
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -3051,23 +3058,16 @@ function __wbg_get_imports() {
3051
3058
  getInt32Memory0()[arg0 / 4 + 1] = len1;
3052
3059
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
3053
3060
  };
3054
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
3055
- throw new Error(getStringFromWasm0(arg0, arg1));
3056
- };
3057
- imports.wbg.__wbindgen_memory = function() {
3058
- const ret = wasm.memory;
3059
- return addHeapObject(ret);
3060
- };
3061
- imports.wbg.__wbindgen_closure_wrapper563 = function(arg0, arg1, arg2) {
3062
- const ret = makeMutClosure(arg0, arg1, 211, __wbg_adapter_56);
3061
+ imports.wbg.__wbindgen_closure_wrapper515 = function(arg0, arg1, arg2) {
3062
+ const ret = makeMutClosure(arg0, arg1, 181, __wbg_adapter_56);
3063
3063
  return addHeapObject(ret);
3064
3064
  };
3065
- imports.wbg.__wbindgen_closure_wrapper565 = function(arg0, arg1, arg2) {
3066
- const ret = makeClosure(arg0, arg1, 211, __wbg_adapter_59);
3065
+ imports.wbg.__wbindgen_closure_wrapper517 = function(arg0, arg1, arg2) {
3066
+ const ret = makeClosure(arg0, arg1, 181, __wbg_adapter_59);
3067
3067
  return addHeapObject(ret);
3068
3068
  };
3069
- imports.wbg.__wbindgen_closure_wrapper1677 = function(arg0, arg1, arg2) {
3070
- const ret = makeMutClosure(arg0, arg1, 451, __wbg_adapter_62);
3069
+ imports.wbg.__wbindgen_closure_wrapper1702 = function(arg0, arg1, arg2) {
3070
+ const ret = makeMutClosure(arg0, arg1, 465, __wbg_adapter_62);
3071
3071
  return addHeapObject(ret);
3072
3072
  };
3073
3073
  return imports;