@loro-dev/flock 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -421,11 +421,6 @@ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$15$(param
421
421
  this._0 = param0;
422
422
  }
423
423
  $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$15$.prototype.$tag = 4;
424
- const Option$None$16$ = { $tag: 0 };
425
- function Option$Some$16$(param0) {
426
- this._0 = param0;
427
- }
428
- Option$Some$16$.prototype.$tag = 1;
429
424
  const moonbitlang$core$builtin$$MyInt64$convert_to_double_u = (a) => (a.hi >>> 0) * 4294967296.0 + (a.lo >>> 0);
430
425
  const moonbitlang$core$builtin$$MyInt64$reinterpret_as_double = function f(a) {
431
426
  let view = f._view;
@@ -438,14 +433,14 @@ const moonbitlang$core$builtin$$MyInt64$reinterpret_as_double = function f(a) {
438
433
  };
439
434
  const $9218868437227405311L = { hi: 2146435071, lo: -1 };
440
435
  const $_4503599627370497L = { hi: -1048577, lo: -1 };
441
- function Result$Err$17$(param0) {
436
+ function Result$Err$16$(param0) {
442
437
  this._0 = param0;
443
438
  }
444
- Result$Err$17$.prototype.$tag = 0;
445
- function Result$Ok$17$(param0) {
439
+ Result$Err$16$.prototype.$tag = 0;
440
+ function Result$Ok$16$(param0) {
446
441
  this._0 = param0;
447
442
  }
448
- Result$Ok$17$.prototype.$tag = 1;
443
+ Result$Ok$16$.prototype.$tag = 1;
449
444
  const moonbitlang$core$builtin$$get_int64_wasm_helper = function f() {
450
445
  if (f._exports) return f._exports;
451
446
  return f._exports = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11])), {}).exports;
@@ -502,6 +497,15 @@ const moonbitlang$core$builtin$$MyInt64$convert_to_double = (a) => a.hi * 429496
502
497
  const $bytes_literal$0 = new Uint8Array();
503
498
  const moonbitlang$core$builtin$$JSArray$pop = (arr) => arr.pop();
504
499
  const moonbitlang$core$builtin$$JSArray$splice1 = (arr, idx, cnt, val) => arr.splice(idx, cnt, val);
500
+ function Result$Err$17$(param0) {
501
+ this._0 = param0;
502
+ }
503
+ Result$Err$17$.prototype.$tag = 0;
504
+ function Result$Ok$17$(param0) {
505
+ this._0 = param0;
506
+ }
507
+ Result$Ok$17$.prototype.$tag = 1;
508
+ const Yoorkin$jmop$$ffi_typeof = (x) => typeof x;
505
509
  function Result$Err$18$(param0) {
506
510
  this._0 = param0;
507
511
  }
@@ -510,7 +514,6 @@ function Result$Ok$18$(param0) {
510
514
  this._0 = param0;
511
515
  }
512
516
  Result$Ok$18$.prototype.$tag = 1;
513
- const Yoorkin$jmop$$ffi_typeof = (x) => typeof x;
514
517
  function Result$Err$19$(param0) {
515
518
  this._0 = param0;
516
519
  }
@@ -519,6 +522,8 @@ function Result$Ok$19$(param0) {
519
522
  this._0 = param0;
520
523
  }
521
524
  Result$Ok$19$.prototype.$tag = 1;
525
+ const Yoorkin$jmop$$ffi_object_is_null = (x) => x === null;
526
+ const Yoorkin$jmop$$ffi_is_array = (x) => Array.isArray(x);
522
527
  function Result$Err$20$(param0) {
523
528
  this._0 = param0;
524
529
  }
@@ -527,8 +532,8 @@ function Result$Ok$20$(param0) {
527
532
  this._0 = param0;
528
533
  }
529
534
  Result$Ok$20$.prototype.$tag = 1;
530
- const Yoorkin$jmop$$ffi_object_is_null = (x) => x === null;
531
- const Yoorkin$jmop$$ffi_is_array = (x) => Array.isArray(x);
535
+ const Yoorkin$jmop$$ffi_undefined = () => undefined;
536
+ const Yoorkin$jmop$$ffi_is_undefined = (x) => x === undefined;
532
537
  function Result$Err$21$(param0) {
533
538
  this._0 = param0;
534
539
  }
@@ -537,8 +542,6 @@ function Result$Ok$21$(param0) {
537
542
  this._0 = param0;
538
543
  }
539
544
  Result$Ok$21$.prototype.$tag = 1;
540
- const Yoorkin$jmop$$ffi_undefined = () => undefined;
541
- const Yoorkin$jmop$$ffi_is_undefined = (x) => x === undefined;
542
545
  function Result$Err$22$(param0) {
543
546
  this._0 = param0;
544
547
  }
@@ -547,14 +550,6 @@ function Result$Ok$22$(param0) {
547
550
  this._0 = param0;
548
551
  }
549
552
  Result$Ok$22$.prototype.$tag = 1;
550
- function Result$Err$23$(param0) {
551
- this._0 = param0;
552
- }
553
- Result$Err$23$.prototype.$tag = 0;
554
- function Result$Ok$23$(param0) {
555
- this._0 = param0;
556
- }
557
- Result$Ok$23$.prototype.$tag = 1;
558
553
  const Yoorkin$jmop$$ffi_init = (convert_thrown_error, ) => {
559
554
  globalThis["MoonBit"] = {
560
555
  Result: {
@@ -598,6 +593,14 @@ const Yoorkin$jmop$$ffi_init = (convert_thrown_error, ) => {
598
593
  }
599
594
  }
600
595
  };
596
+ function Result$Err$23$(param0) {
597
+ this._0 = param0;
598
+ }
599
+ Result$Err$23$.prototype.$tag = 0;
600
+ function Result$Ok$23$(param0) {
601
+ this._0 = param0;
602
+ }
603
+ Result$Ok$23$.prototype.$tag = 1;
601
604
  function Result$Err$24$(param0) {
602
605
  this._0 = param0;
603
606
  }
@@ -606,6 +609,10 @@ function Result$Ok$24$(param0) {
606
609
  this._0 = param0;
607
610
  }
608
611
  Result$Ok$24$.prototype.$tag = 1;
612
+ const $64L = { hi: 0, lo: 64 };
613
+ const $56L = { hi: 0, lo: 56 };
614
+ const $127L = { hi: 0, lo: 127 };
615
+ const $255L = { hi: 0, lo: 255 };
609
616
  function Result$Err$25$(param0) {
610
617
  this._0 = param0;
611
618
  }
@@ -614,10 +621,7 @@ function Result$Ok$25$(param0) {
614
621
  this._0 = param0;
615
622
  }
616
623
  Result$Ok$25$.prototype.$tag = 1;
617
- const $64L = { hi: 0, lo: 64 };
618
- const $56L = { hi: 0, lo: 56 };
619
- const $127L = { hi: 0, lo: 127 };
620
- const $255L = { hi: 0, lo: 255 };
624
+ const $256L = { hi: 0, lo: 256 };
621
625
  function Result$Err$26$(param0) {
622
626
  this._0 = param0;
623
627
  }
@@ -626,7 +630,6 @@ function Result$Ok$26$(param0) {
626
630
  this._0 = param0;
627
631
  }
628
632
  Result$Ok$26$.prototype.$tag = 1;
629
- const $256L = { hi: 0, lo: 256 };
630
633
  function Result$Err$27$(param0) {
631
634
  this._0 = param0;
632
635
  }
@@ -635,14 +638,6 @@ function Result$Ok$27$(param0) {
635
638
  this._0 = param0;
636
639
  }
637
640
  Result$Ok$27$.prototype.$tag = 1;
638
- function Result$Err$28$(param0) {
639
- this._0 = param0;
640
- }
641
- Result$Err$28$.prototype.$tag = 0;
642
- function Result$Ok$28$(param0) {
643
- this._0 = param0;
644
- }
645
- Result$Ok$28$.prototype.$tag = 1;
646
641
  function $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$Bytes(param0) {
647
642
  this._0 = param0;
648
643
  }
@@ -661,14 +656,23 @@ function $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$Float(param0) {
661
656
  $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$Float.prototype.$tag = 3;
662
657
  const $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$False = { $tag: 4 };
663
658
  const $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$True = { $tag: 5 };
664
- function Result$Err$29$(param0) {
659
+ function Result$Err$28$(param0) {
660
+ this._0 = param0;
661
+ }
662
+ Result$Err$28$.prototype.$tag = 0;
663
+ function Result$Ok$28$(param0) {
664
+ this._0 = param0;
665
+ }
666
+ Result$Ok$28$.prototype.$tag = 1;
667
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$29$(param0) {
665
668
  this._0 = param0;
666
669
  }
667
- Result$Err$29$.prototype.$tag = 0;
668
- function Result$Ok$29$(param0) {
670
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$29$.prototype.$tag = 0;
671
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$29$(param0) {
669
672
  this._0 = param0;
670
673
  }
671
- Result$Ok$29$.prototype.$tag = 1;
674
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$29$.prototype.$tag = 1;
675
+ const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$ = { $tag: 2 };
672
676
  function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$30$(param0) {
673
677
  this._0 = param0;
674
678
  }
@@ -678,107 +682,120 @@ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$(param0) {
678
682
  }
679
683
  $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$.prototype.$tag = 1;
680
684
  const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$ = { $tag: 2 };
681
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$31$(param0) {
685
+ const Option$None$31$ = { $tag: 0 };
686
+ function Option$Some$31$(param0) {
682
687
  this._0 = param0;
683
688
  }
684
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$31$.prototype.$tag = 0;
685
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$31$(param0) {
689
+ Option$Some$31$.prototype.$tag = 1;
690
+ function Result$Err$32$(param0) {
686
691
  this._0 = param0;
687
692
  }
688
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$31$.prototype.$tag = 1;
689
- const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$31$ = { $tag: 2 };
690
- const Option$None$32$ = { $tag: 0 };
691
- function Option$Some$32$(param0) {
693
+ Result$Err$32$.prototype.$tag = 0;
694
+ function Result$Ok$32$(param0) {
692
695
  this._0 = param0;
693
696
  }
694
- Option$Some$32$.prototype.$tag = 1;
695
- function Result$Err$33$(param0) {
697
+ Result$Ok$32$.prototype.$tag = 1;
698
+ const Option$None$33$ = { $tag: 0 };
699
+ function Option$Some$33$(param0) {
696
700
  this._0 = param0;
697
701
  }
698
- Result$Err$33$.prototype.$tag = 0;
699
- function Result$Ok$33$(param0) {
700
- this._0 = param0;
701
- }
702
- Result$Ok$33$.prototype.$tag = 1;
702
+ Option$Some$33$.prototype.$tag = 1;
703
703
  const Option$None$34$ = { $tag: 0 };
704
704
  function Option$Some$34$(param0) {
705
705
  this._0 = param0;
706
706
  }
707
707
  Option$Some$34$.prototype.$tag = 1;
708
- const Option$None$35$ = { $tag: 0 };
709
- function Option$Some$35$(param0) {
708
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$35$(param0) {
709
+ this._0 = param0;
710
+ }
711
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$35$.prototype.$tag = 0;
712
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$35$(param0) {
713
+ this._0 = param0;
714
+ }
715
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$35$.prototype.$tag = 1;
716
+ const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$35$ = { $tag: 2 };
717
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$36$ = { $tag: 0 };
718
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$36$(param0) {
710
719
  this._0 = param0;
711
720
  }
712
- Option$Some$35$.prototype.$tag = 1;
713
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(param0) {
721
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$36$.prototype.$tag = 1;
722
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$36$(param0) {
714
723
  this._0 = param0;
715
724
  }
716
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$.prototype.$tag = 0;
717
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(param0) {
725
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$36$.prototype.$tag = 2;
726
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$36$(param0) {
718
727
  this._0 = param0;
719
728
  }
720
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$.prototype.$tag = 1;
721
- const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$ = { $tag: 2 };
722
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$37$ = { $tag: 0 };
723
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$37$(param0) {
729
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$36$.prototype.$tag = 3;
730
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$36$(param0) {
724
731
  this._0 = param0;
725
732
  }
726
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$37$.prototype.$tag = 1;
727
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$37$(param0) {
733
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$36$.prototype.$tag = 4;
734
+ function Result$Err$37$(param0) {
728
735
  this._0 = param0;
729
736
  }
730
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$37$.prototype.$tag = 2;
731
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$37$(param0) {
737
+ Result$Err$37$.prototype.$tag = 0;
738
+ function Result$Ok$37$(param0) {
732
739
  this._0 = param0;
733
740
  }
734
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$37$.prototype.$tag = 3;
735
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$37$(param0) {
741
+ Result$Ok$37$.prototype.$tag = 1;
742
+ const Option$None$38$ = { $tag: 0 };
743
+ function Option$Some$38$(param0) {
736
744
  this._0 = param0;
737
745
  }
738
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$37$.prototype.$tag = 4;
739
- function Result$Err$38$(param0) {
746
+ Option$Some$38$.prototype.$tag = 1;
747
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$39$ = { $tag: 0 };
748
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$39$(param0) {
740
749
  this._0 = param0;
741
750
  }
742
- Result$Err$38$.prototype.$tag = 0;
743
- function Result$Ok$38$(param0) {
751
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$39$.prototype.$tag = 1;
752
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$39$(param0) {
744
753
  this._0 = param0;
745
754
  }
746
- Result$Ok$38$.prototype.$tag = 1;
747
- const Option$None$39$ = { $tag: 0 };
748
- function Option$Some$39$(param0) {
755
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$39$.prototype.$tag = 2;
756
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$39$(param0) {
749
757
  this._0 = param0;
750
758
  }
751
- Option$Some$39$.prototype.$tag = 1;
752
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$40$ = { $tag: 0 };
753
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$40$(param0) {
759
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$39$.prototype.$tag = 3;
760
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$39$(param0) {
754
761
  this._0 = param0;
755
762
  }
756
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$40$.prototype.$tag = 1;
757
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$40$(param0) {
763
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$39$.prototype.$tag = 4;
764
+ const Option$None$40$ = { $tag: 0 };
765
+ function Option$Some$40$(param0) {
758
766
  this._0 = param0;
759
767
  }
760
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$40$.prototype.$tag = 2;
761
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$40$(param0) {
768
+ Option$Some$40$.prototype.$tag = 1;
769
+ function Result$Err$41$(param0) {
762
770
  this._0 = param0;
763
771
  }
764
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$40$.prototype.$tag = 3;
765
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$40$(param0) {
772
+ Result$Err$41$.prototype.$tag = 0;
773
+ function Result$Ok$41$(param0) {
766
774
  this._0 = param0;
767
775
  }
768
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$40$.prototype.$tag = 4;
769
- const Option$None$41$ = { $tag: 0 };
770
- function Option$Some$41$(param0) {
776
+ Result$Ok$41$.prototype.$tag = 1;
777
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$42$ = { $tag: 0 };
778
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$42$(param0) {
771
779
  this._0 = param0;
772
780
  }
773
- Option$Some$41$.prototype.$tag = 1;
774
- function Result$Err$42$(param0) {
781
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$42$.prototype.$tag = 1;
782
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$42$(param0) {
775
783
  this._0 = param0;
776
784
  }
777
- Result$Err$42$.prototype.$tag = 0;
778
- function Result$Ok$42$(param0) {
785
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$42$.prototype.$tag = 2;
786
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$42$(param0) {
779
787
  this._0 = param0;
780
788
  }
781
- Result$Ok$42$.prototype.$tag = 1;
789
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$42$.prototype.$tag = 3;
790
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$42$(param0) {
791
+ this._0 = param0;
792
+ }
793
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$42$.prototype.$tag = 4;
794
+ const Option$None$29$ = { $tag: 0 };
795
+ function Option$Some$29$(param0) {
796
+ this._0 = param0;
797
+ }
798
+ Option$Some$29$.prototype.$tag = 1;
782
799
  const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$43$ = { $tag: 0 };
783
800
  function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$43$(param0) {
784
801
  this._0 = param0;
@@ -796,28 +813,6 @@ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$43$(param
796
813
  this._0 = param0;
797
814
  }
798
815
  $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$43$.prototype.$tag = 4;
799
- const Option$None$30$ = { $tag: 0 };
800
- function Option$Some$30$(param0) {
801
- this._0 = param0;
802
- }
803
- Option$Some$30$.prototype.$tag = 1;
804
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$44$ = { $tag: 0 };
805
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$44$(param0) {
806
- this._0 = param0;
807
- }
808
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$44$.prototype.$tag = 1;
809
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$44$(param0) {
810
- this._0 = param0;
811
- }
812
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$44$.prototype.$tag = 2;
813
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$44$(param0) {
814
- this._0 = param0;
815
- }
816
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$44$.prototype.$tag = 3;
817
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$44$(param0) {
818
- this._0 = param0;
819
- }
820
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$44$.prototype.$tag = 4;
821
816
  const zxch3n$flock$flock$$ffi_json_stringify_value = (value) => {
822
817
  const result = JSON.stringify(value);
823
818
  if (result === undefined) {
@@ -828,23 +823,23 @@ const zxch3n$flock$flock$$ffi_json_stringify_value = (value) => {
828
823
  const zxch3n$flock$flock$$ffi_json_parse_to_nullable = (json) => JSON.parse(json);
829
824
  const zxch3n$flock$flock$$ffi_any_is_null = (value) => value === null;
830
825
  const zxch3n$flock$flock$$ffi_any_is_undefined = (value) => value === undefined;
831
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$45$ = { $tag: 0 };
832
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$45$(param0) {
826
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$44$ = { $tag: 0 };
827
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$44$(param0) {
833
828
  this._0 = param0;
834
829
  }
835
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$45$.prototype.$tag = 1;
836
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$45$(param0) {
830
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$44$.prototype.$tag = 1;
831
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$44$(param0) {
837
832
  this._0 = param0;
838
833
  }
839
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$45$.prototype.$tag = 2;
840
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$45$(param0) {
834
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$44$.prototype.$tag = 2;
835
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$44$(param0) {
841
836
  this._0 = param0;
842
837
  }
843
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$45$.prototype.$tag = 3;
844
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$45$(param0) {
838
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$44$.prototype.$tag = 3;
839
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$44$(param0) {
845
840
  this._0 = param0;
846
841
  }
847
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$45$.prototype.$tag = 4;
842
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$44$.prototype.$tag = 4;
848
843
  const zxch3n$flock$flock$$ffi_invoke_listener = (listener, event) => listener(event);
849
844
  const zxch3n$flock$flock$$ffi_make_unsubscribe = (callback) => () => callback();
850
845
  const moonbitlang$core$strconv$$base_err_str = "invalid base";
@@ -946,18 +941,18 @@ const moonbitlang$core$builtin$$null = $64$moonbitlang$47$core$47$builtin$46$Jso
946
941
  const moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$1508 = 0;
947
942
  const moonbitlang$core$builtin$$brute_force_find$46$constr$47$1522 = 0;
948
943
  const gmlewis$sha256$$_K = [1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998];
949
- const gmlewis$sha256$$new$46$42$bind$47$2486 = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225];
944
+ const gmlewis$sha256$$new$46$42$bind$47$2484 = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225];
950
945
  const zxch3n$expect$$to_string$46$42$bind$124$178 = ";";
951
- const zxch3n$expect$$red$46$constr$47$2561 = 1;
952
- const zxch3n$expect$$yellow$46$constr$47$2563 = 3;
953
- const zxch3n$expect$$blue$46$constr$47$2565 = 4;
954
- const zxch3n$flock$sorted_map$$range$46$tuple$47$2964 = { _0: true, _1: true };
955
- const zxch3n$flock$sorted_map$$range$46$tuple$47$2965 = { _0: true, _1: true };
956
- const zxch3n$flock$flock$$from_string$46$42$bind$124$604 = ",";
957
- const zxch3n$flock$flock$$zero$46$record$47$3043 = { physical_time: 0, logical_counter: 0 };
958
- const zxch3n$flock$flock$$new$46$42$bind$47$3223 = { physical_time: 0, logical_counter: 0 };
959
- const zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3465 = new Source$Import("import_json");
960
- const zxch3n$flock$flock$$newFlock$46$42$bind$47$3574 = { physical_time: 0, logical_counter: 0 };
946
+ const zxch3n$expect$$red$46$constr$47$2570 = 1;
947
+ const zxch3n$expect$$yellow$46$constr$47$2572 = 3;
948
+ const zxch3n$expect$$blue$46$constr$47$2574 = 4;
949
+ const zxch3n$flock$sorted_map$$range$46$tuple$47$2971 = { _0: true, _1: true };
950
+ const zxch3n$flock$sorted_map$$range$46$tuple$47$2972 = { _0: true, _1: true };
951
+ const zxch3n$flock$flock$$from_string$46$42$bind$124$593 = ",";
952
+ const zxch3n$flock$flock$$zero$46$record$47$3050 = { physical_time: 0, logical_counter: 0 };
953
+ const zxch3n$flock$flock$$new$46$42$bind$47$3233 = { physical_time: 0, logical_counter: 0 };
954
+ const zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3475 = new Source$Import("import_json");
955
+ const zxch3n$flock$flock$$newFlock$46$42$bind$47$3584 = { physical_time: 0, logical_counter: 0 };
961
956
  (() => {
962
957
  Yoorkin$jmop$$ffi_init(Yoorkin$jmop$$convert_thrown_error);
963
958
  })();
@@ -7675,14 +7670,14 @@ function moonbitlang$core$option$$Option$unwrap_or_else$68$(self, default_) {
7675
7670
  }
7676
7671
  function moonbitlang$core$option$$Option$map$69$(self, f) {
7677
7672
  if (self === undefined) {
7678
- return Option$None$16$;
7673
+ return undefined;
7679
7674
  } else {
7680
7675
  const _Some = self;
7681
7676
  const _t = _Some;
7682
- return new Option$Some$16$(f(_t));
7677
+ return f(_t);
7683
7678
  }
7684
7679
  }
7685
- function moonbitlang$core$option$$Option$map$70$(self, f) {
7680
+ function moonbitlang$core$option$$Option$map$36$(self, f) {
7686
7681
  if (self === undefined) {
7687
7682
  return undefined;
7688
7683
  } else {
@@ -7691,7 +7686,7 @@ function moonbitlang$core$option$$Option$map$70$(self, f) {
7691
7686
  return f(_t);
7692
7687
  }
7693
7688
  }
7694
- function moonbitlang$core$option$$Option$map$36$(self, f) {
7689
+ function moonbitlang$core$option$$Option$bind$70$(self, f) {
7695
7690
  if (self === undefined) {
7696
7691
  return undefined;
7697
7692
  } else {
@@ -7700,14 +7695,6 @@ function moonbitlang$core$option$$Option$map$36$(self, f) {
7700
7695
  return f(_t);
7701
7696
  }
7702
7697
  }
7703
- function moonbitlang$core$option$$Option$flatten$14$(self) {
7704
- if (self.$tag === 1) {
7705
- const _Some = self;
7706
- return _Some._0;
7707
- } else {
7708
- return undefined;
7709
- }
7710
- }
7711
7698
  function moonbitlang$core$int$$Int$next_power_of_two(self) {
7712
7699
  if (self >= 0) {
7713
7700
  if (self <= 1) {
@@ -9233,7 +9220,7 @@ function moonbitlang$core$array$$Array$binary_search_by$42$(self, cmp) {
9233
9220
  continue;
9234
9221
  }
9235
9222
  } else {
9236
- return i < len && cmp(self[i]) === 0 ? new Result$Ok$18$(i) : new Result$Err$18$(i);
9223
+ return i < len && cmp(self[i]) === 0 ? new Result$Ok$17$(i) : new Result$Err$17$(i);
9237
9224
  }
9238
9225
  }
9239
9226
  }
@@ -9242,17 +9229,17 @@ function Yoorkin$jmop$$Value$get_type(self) {
9242
9229
  }
9243
9230
  function Yoorkin$jmop$$Value$to_number(self, loc) {
9244
9231
  if (Yoorkin$jmop$$Value$get_type(self) === "number") {
9245
- return new Result$Ok$19$(self);
9232
+ return new Result$Ok$18$(self);
9246
9233
  } else {
9247
- return new Result$Err$19$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "Double" }));
9234
+ return new Result$Err$18$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "Double" }));
9248
9235
  }
9249
9236
  }
9250
9237
  function Yoorkin$jmop$$Value$to_string(self, loc) {
9251
9238
  const _bind = Yoorkin$jmop$$Value$get_type(self);
9252
9239
  if (_bind === "string") {
9253
- return new Result$Ok$20$(self);
9240
+ return new Result$Ok$19$(self);
9254
9241
  } else {
9255
- return new Result$Err$20$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "String" }));
9242
+ return new Result$Err$19$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "String" }));
9256
9243
  }
9257
9244
  }
9258
9245
  function Yoorkin$jmop$$DynCastResult$rethrow$76$(self, loc) {
@@ -9264,11 +9251,11 @@ function Yoorkin$jmop$$DynCastResult$rethrow$76$(self, loc) {
9264
9251
  const _x$2 = _InvalidCast._0;
9265
9252
  const _value = _x$2._1;
9266
9253
  const _target = _x$2._2;
9267
- return new Result$Err$21$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: _value, _2: _target }));
9254
+ return new Result$Err$20$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: _value, _2: _target }));
9268
9255
  } else {
9269
9256
  const _Ok = _bind;
9270
9257
  const _x = _Ok._0;
9271
- return new Result$Ok$21$(_x);
9258
+ return new Result$Ok$20$(_x);
9272
9259
  }
9273
9260
  }
9274
9261
  function Yoorkin$jmop$$Value$to_array$76$(self, loc) {
@@ -9283,7 +9270,7 @@ function Yoorkin$jmop$$Value$to_array$76$(self, loc) {
9283
9270
  const _p$4 = _tmp;
9284
9271
  if (_p$4 < _p$3) {
9285
9272
  const _p$5 = arr[_p$4];
9286
- const _bind = Yoorkin$jmop$$DynCastResult$rethrow$76$(new Result$Ok$21$(_p$5), "/home/runner/work/flock/flock/.mooncakes/Yoorkin/jmop/value.mbt:156:18-156:50");
9273
+ const _bind = Yoorkin$jmop$$DynCastResult$rethrow$76$(new Result$Ok$20$(_p$5), "/home/runner/work/flock/flock/.mooncakes/Yoorkin/jmop/value.mbt:156:18-156:50");
9287
9274
  let _tmp$2;
9288
9275
  if (_bind.$tag === 1) {
9289
9276
  const _ok = _bind;
@@ -9301,28 +9288,28 @@ function Yoorkin$jmop$$Value$to_array$76$(self, loc) {
9301
9288
  break;
9302
9289
  }
9303
9290
  }
9304
- return new Result$Ok$17$(_p$2);
9291
+ return new Result$Ok$16$(_p$2);
9305
9292
  }
9306
- return new Result$Err$17$(_p);
9293
+ return new Result$Err$16$(_p);
9307
9294
  } else {
9308
- return new Result$Err$17$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "Array" }));
9295
+ return new Result$Err$16$(new Error$Yoorkin$47$jmop$46$InvalidCast$46$InvalidCast({ _0: loc, _1: self, _2: "Array" }));
9309
9296
  }
9310
9297
  }
9311
- function Yoorkin$jmop$$Optional$undefined$4$() {
9298
+ function Yoorkin$jmop$$Optional$undefined$76$() {
9312
9299
  return Yoorkin$jmop$$ffi_undefined();
9313
9300
  }
9314
9301
  function Yoorkin$jmop$$Optional$unwrap$77$(self, loc) {
9315
9302
  if (Yoorkin$jmop$$ffi_is_undefined(self)) {
9316
- return new Result$Err$22$(new Error$Yoorkin$47$jmop$46$UnwrapUndefined$46$UnwrapUndefined(loc));
9303
+ return new Result$Err$21$(new Error$Yoorkin$47$jmop$46$UnwrapUndefined$46$UnwrapUndefined(loc));
9317
9304
  } else {
9318
- return new Result$Ok$22$(self);
9305
+ return new Result$Ok$21$(self);
9319
9306
  }
9320
9307
  }
9321
9308
  function Yoorkin$jmop$$Nullable$unwrap$76$(self, loc) {
9322
9309
  if (Yoorkin$jmop$$ffi_object_is_null(self)) {
9323
- return new Result$Err$23$(new Error$Yoorkin$47$jmop$46$UnwrapNull$46$UnwrapNull(loc));
9310
+ return new Result$Err$22$(new Error$Yoorkin$47$jmop$46$UnwrapNull$46$UnwrapNull(loc));
9324
9311
  } else {
9325
- return new Result$Ok$23$(self);
9312
+ return new Result$Ok$22$(self);
9326
9313
  }
9327
9314
  }
9328
9315
  function Yoorkin$jmop$$Optional$unwrap_value(self, loc) {
@@ -9349,13 +9336,13 @@ function Yoorkin$jmop$$convert_thrown_error(x, payload0, payload1) {
9349
9336
  } else {
9350
9337
  return _bind;
9351
9338
  }
9352
- return new Result$Err$24$(new Error$Yoorkin$47$jmop$46$InvalidNestedPromise$46$InvalidNestedPromise(_tmp));
9339
+ return new Result$Err$23$(new Error$Yoorkin$47$jmop$46$InvalidNestedPromise$46$InvalidNestedPromise(_tmp));
9353
9340
  } else {
9354
- return new Result$Err$25$(new Error$Yoorkin$47$jmop$46$RuntimeError$46$RuntimeError(payload0));
9341
+ return new Result$Err$24$(new Error$Yoorkin$47$jmop$46$RuntimeError$46$RuntimeError(payload0));
9355
9342
  }
9356
9343
  }
9357
9344
  function gmlewis$sha256$$Digest$new() {
9358
- return { h: moonbitlang$core$array$$FixedArray$from_array$53$({ buf: gmlewis$sha256$$new$46$42$bind$47$2486, start: 0, end: 8 }), x: $makebytes(64, 0), nx: 0, len: $0L, name: "sha256" };
9345
+ return { h: moonbitlang$core$array$$FixedArray$from_array$53$({ buf: gmlewis$sha256$$new$46$42$bind$47$2484, start: 0, end: 8 }), x: $makebytes(64, 0), nx: 0, len: $0L, name: "sha256" };
9359
9346
  }
9360
9347
  function gmlewis$sha256$$to_hex(v) {
9361
9348
  return v < 10 ? v + 48 | 0 : (v - 10 | 0) + 97 | 0;
@@ -9621,6 +9608,70 @@ function gmlewis$sha256$$HashFunc$check_sum$78$(self) {
9621
9608
  }
9622
9609
  return moonbitlang$core$bytes$$Bytes$to_unchecked_string$46$inner(moonbitlang$core$buffer$$Buffer$contents(result), 0, undefined);
9623
9610
  }
9611
+ function zxch3n$flock$leb128$$encode_uint64(value) {
9612
+ const result = [];
9613
+ let val = value;
9614
+ while (true) {
9615
+ let byte = moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(val, $127L));
9616
+ val = moonbitlang$core$builtin$$Shr$shr$0$(val, 7);
9617
+ if (moonbitlang$core$builtin$$op_notequal$0$(val, $0L)) {
9618
+ const _p = byte;
9619
+ const _p$2 = 128;
9620
+ byte = (_p | _p$2) & 255;
9621
+ }
9622
+ moonbitlang$core$array$$Array$push$12$(result, byte);
9623
+ if (moonbitlang$core$builtin$$Eq$equal$0$(val, $0L)) {
9624
+ break;
9625
+ }
9626
+ continue;
9627
+ }
9628
+ return moonbitlang$core$bytes$$Bytes$from_array({ buf: result, start: 0, end: result.length });
9629
+ }
9630
+ function zxch3n$flock$leb128$$encode_int64(value) {
9631
+ const result = [];
9632
+ let val = value;
9633
+ let more = true;
9634
+ while (true) {
9635
+ if (more) {
9636
+ let byte = moonbitlang$core$int64$$Int64$to_byte(moonbitlang$core$builtin$$BitAnd$land$22$(val, $127L));
9637
+ val = moonbitlang$core$builtin$$Shr$shr$22$(val, 7);
9638
+ let _tmp;
9639
+ if (moonbitlang$core$builtin$$Eq$equal$22$(val, $0L)) {
9640
+ const _p = byte;
9641
+ const _p$2 = 64;
9642
+ const _p$3 = _p & _p$2 & 255;
9643
+ const _p$4 = 0;
9644
+ _tmp = _p$3 === _p$4;
9645
+ } else {
9646
+ _tmp = false;
9647
+ }
9648
+ if (_tmp) {
9649
+ more = false;
9650
+ } else {
9651
+ let _tmp$2;
9652
+ if (moonbitlang$core$builtin$$Eq$equal$22$(val, $_1L)) {
9653
+ const _p = byte;
9654
+ const _p$2 = 64;
9655
+ _tmp$2 = (_p & _p$2 & 255) !== 0;
9656
+ } else {
9657
+ _tmp$2 = false;
9658
+ }
9659
+ if (_tmp$2) {
9660
+ more = false;
9661
+ } else {
9662
+ const _p = byte;
9663
+ const _p$2 = 128;
9664
+ byte = (_p | _p$2) & 255;
9665
+ }
9666
+ }
9667
+ moonbitlang$core$array$$Array$push$12$(result, byte);
9668
+ continue;
9669
+ } else {
9670
+ break;
9671
+ }
9672
+ }
9673
+ return moonbitlang$core$bytes$$Bytes$from_array({ buf: result, start: 0, end: result.length });
9674
+ }
9624
9675
  function zxch3n$expect$$Color$to_bg_color_code(self) {
9625
9676
  switch (self) {
9626
9677
  case 0: {
@@ -9752,13 +9803,13 @@ function zxch3n$expect$$Formated$format(str) {
9752
9803
  return { str: str, bg_color: undefined, color: undefined, formats: [] };
9753
9804
  }
9754
9805
  function zxch3n$expect$$Formated$red(self) {
9755
- return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$red$46$constr$47$2561, formats: self.formats };
9806
+ return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$red$46$constr$47$2570, formats: self.formats };
9756
9807
  }
9757
9808
  function zxch3n$expect$$Formated$yellow(self) {
9758
- return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$yellow$46$constr$47$2563, formats: self.formats };
9809
+ return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$yellow$46$constr$47$2572, formats: self.formats };
9759
9810
  }
9760
9811
  function zxch3n$expect$$Formated$blue(self) {
9761
- return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$blue$46$constr$47$2565, formats: self.formats };
9812
+ return { str: self.str, bg_color: self.bg_color, color: zxch3n$expect$$blue$46$constr$47$2574, formats: self.formats };
9762
9813
  }
9763
9814
  function zxch3n$expect$$Formated$bold(self) {
9764
9815
  const _tmp = self.str;
@@ -9774,70 +9825,6 @@ function zxch3n$expect$$panic$46$inner$4$(reason, loc) {
9774
9825
  moonbitlang$core$builtin$$println$8$(msg);
9775
9826
  moonbitlang$core$abort$$abort$4$(msg);
9776
9827
  }
9777
- function zxch3n$flock$leb128$$encode_uint64(value) {
9778
- const result = [];
9779
- let val = value;
9780
- while (true) {
9781
- let byte = moonbitlang$core$uint64$$UInt64$to_byte(moonbitlang$core$builtin$$BitAnd$land$0$(val, $127L));
9782
- val = moonbitlang$core$builtin$$Shr$shr$0$(val, 7);
9783
- if (moonbitlang$core$builtin$$op_notequal$0$(val, $0L)) {
9784
- const _p = byte;
9785
- const _p$2 = 128;
9786
- byte = (_p | _p$2) & 255;
9787
- }
9788
- moonbitlang$core$array$$Array$push$12$(result, byte);
9789
- if (moonbitlang$core$builtin$$Eq$equal$0$(val, $0L)) {
9790
- break;
9791
- }
9792
- continue;
9793
- }
9794
- return moonbitlang$core$bytes$$Bytes$from_array({ buf: result, start: 0, end: result.length });
9795
- }
9796
- function zxch3n$flock$leb128$$encode_int64(value) {
9797
- const result = [];
9798
- let val = value;
9799
- let more = true;
9800
- while (true) {
9801
- if (more) {
9802
- let byte = moonbitlang$core$int64$$Int64$to_byte(moonbitlang$core$builtin$$BitAnd$land$22$(val, $127L));
9803
- val = moonbitlang$core$builtin$$Shr$shr$22$(val, 7);
9804
- let _tmp;
9805
- if (moonbitlang$core$builtin$$Eq$equal$22$(val, $0L)) {
9806
- const _p = byte;
9807
- const _p$2 = 64;
9808
- const _p$3 = _p & _p$2 & 255;
9809
- const _p$4 = 0;
9810
- _tmp = _p$3 === _p$4;
9811
- } else {
9812
- _tmp = false;
9813
- }
9814
- if (_tmp) {
9815
- more = false;
9816
- } else {
9817
- let _tmp$2;
9818
- if (moonbitlang$core$builtin$$Eq$equal$22$(val, $_1L)) {
9819
- const _p = byte;
9820
- const _p$2 = 64;
9821
- _tmp$2 = (_p & _p$2 & 255) !== 0;
9822
- } else {
9823
- _tmp$2 = false;
9824
- }
9825
- if (_tmp$2) {
9826
- more = false;
9827
- } else {
9828
- const _p = byte;
9829
- const _p$2 = 128;
9830
- byte = (_p | _p$2) & 255;
9831
- }
9832
- }
9833
- moonbitlang$core$array$$Array$push$12$(result, byte);
9834
- continue;
9835
- } else {
9836
- break;
9837
- }
9838
- }
9839
- return moonbitlang$core$bytes$$Bytes$from_array({ buf: result, start: 0, end: result.length });
9840
- }
9841
9828
  function moonbitlang$core$builtin$$Eq$equal$7$(_x_165, _x_166) {
9842
9829
  return moonbitlang$core$builtin$$Eq$equal$3$(_x_165, _x_166);
9843
9830
  }
@@ -10440,7 +10427,7 @@ function zxch3n$flock$memcomparable$$parse_slice(bytes, start) {
10440
10427
  continue;
10441
10428
  } else {
10442
10429
  const _bind = moonbitlang$core$buffer$$Buffer$contents(output);
10443
- return new Result$Ok$26$({ _0: moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length), _1: i });
10430
+ return new Result$Ok$25$({ _0: moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length), _1: i });
10444
10431
  }
10445
10432
  }
10446
10433
  moonbitlang$core$buffer$$Buffer$write_byte(output, b);
@@ -10449,7 +10436,7 @@ function zxch3n$flock$memcomparable$$parse_slice(bytes, start) {
10449
10436
  break;
10450
10437
  }
10451
10438
  }
10452
- return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10439
+ return new Result$Err$25$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10453
10440
  }
10454
10441
  function zxch3n$flock$memcomparable$$bytes_to_bigint(bytes) {
10455
10442
  let n = moonbitlang$core$bigint$$BigInt$from_int64($0L);
@@ -10482,11 +10469,11 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10482
10469
  const _p = 20;
10483
10470
  const n = (tag - _p | 0) & 255;
10484
10471
  if ((bytes.end - bytes.start | 0) < n) {
10485
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10472
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10486
10473
  }
10487
10474
  const num_bytes = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, 0, n);
10488
10475
  const rest = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, n, undefined);
10489
- return new Result$Ok$27$({ _0: rest, _1: zxch3n$flock$memcomparable$$bytes_to_bigint(num_bytes) });
10476
+ return new Result$Ok$26$({ _0: rest, _1: zxch3n$flock$memcomparable$$bytes_to_bigint(num_bytes) });
10490
10477
  } else {
10491
10478
  let _tmp$2;
10492
10479
  const _p = 20;
@@ -10500,7 +10487,7 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10500
10487
  const _p$3 = 20;
10501
10488
  const n = (_p$3 - tag | 0) & 255;
10502
10489
  if ((bytes.end - bytes.start | 0) < n) {
10503
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10490
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10504
10491
  }
10505
10492
  const num_bytes = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, 0, n);
10506
10493
  const rest = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, n, undefined);
@@ -10519,18 +10506,18 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10519
10506
  }
10520
10507
  }
10521
10508
  const _bind = moonbitlang$core$buffer$$Buffer$contents(inverted);
10522
- return new Result$Ok$27$({ _0: rest, _1: moonbitlang$core$builtin$$Neg$neg$21$(zxch3n$flock$memcomparable$$bytes_to_bigint(moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length))) });
10509
+ return new Result$Ok$26$({ _0: rest, _1: moonbitlang$core$builtin$$Neg$neg$21$(zxch3n$flock$memcomparable$$bytes_to_bigint(moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length))) });
10523
10510
  } else {
10524
10511
  const _p$3 = 11;
10525
10512
  if (tag === _p$3) {
10526
10513
  if ((bytes.end - bytes.start | 0) < 1) {
10527
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10514
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10528
10515
  }
10529
10516
  const raw_length = moonbitlang$core$bytes$$BytesView$at(bytes, 0);
10530
10517
  const _p$4 = 255;
10531
10518
  const n = (raw_length ^ _p$4) & 255;
10532
10519
  if ((bytes.end - bytes.start | 0) < (n + 1 | 0)) {
10533
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10520
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10534
10521
  }
10535
10522
  const num_bytes = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, 1, n + 1 | 0);
10536
10523
  const rest = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, n + 1 | 0, undefined);
@@ -10549,23 +10536,23 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10549
10536
  }
10550
10537
  }
10551
10538
  const _bind = moonbitlang$core$buffer$$Buffer$contents(inverted);
10552
- return new Result$Ok$27$({ _0: rest, _1: moonbitlang$core$builtin$$Neg$neg$21$(zxch3n$flock$memcomparable$$bytes_to_bigint(moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length))) });
10539
+ return new Result$Ok$26$({ _0: rest, _1: moonbitlang$core$builtin$$Neg$neg$21$(zxch3n$flock$memcomparable$$bytes_to_bigint(moonbitlang$core$bytes$$Bytes$sub$46$inner(_bind, 0, _bind.length))) });
10553
10540
  } else {
10554
10541
  const _p$4 = 29;
10555
10542
  if (tag === _p$4) {
10556
10543
  if ((bytes.end - bytes.start | 0) < 1) {
10557
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10544
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10558
10545
  }
10559
10546
  const raw_length = moonbitlang$core$bytes$$BytesView$at(bytes, 0);
10560
10547
  const n = raw_length;
10561
10548
  if ((bytes.end - bytes.start | 0) < (n + 1 | 0)) {
10562
- return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10549
+ return new Result$Err$26$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10563
10550
  }
10564
10551
  const num_bytes = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, 1, n + 1 | 0);
10565
10552
  const rest = moonbitlang$core$bytes$$BytesView$sub$46$inner(bytes, n + 1 | 0, undefined);
10566
- return new Result$Ok$27$({ _0: rest, _1: zxch3n$flock$memcomparable$$bytes_to_bigint(num_bytes) });
10553
+ return new Result$Ok$26$({ _0: rest, _1: zxch3n$flock$memcomparable$$bytes_to_bigint(num_bytes) });
10567
10554
  } else {
10568
- return new Result$Err$27$(new Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidTag(tag));
10555
+ return new Result$Err$26$(new Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidTag(tag));
10569
10556
  }
10570
10557
  }
10571
10558
  }
@@ -10573,7 +10560,7 @@ function zxch3n$flock$memcomparable$$bigint_from_be_bytes_with_tag(bytes, tag) {
10573
10560
  }
10574
10561
  function zxch3n$flock$memcomparable$$decode_float(bytes, start) {
10575
10562
  if ((start + 8 | 0) > (bytes.end - bytes.start | 0)) {
10576
- return new Result$Err$28$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10563
+ return new Result$Err$27$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$UnexpectedEOF);
10577
10564
  }
10578
10565
  const data = moonbitlang$core$array$$Array$new$46$inner$12$(0);
10579
10566
  let _tmp = 0;
@@ -10589,7 +10576,7 @@ function zxch3n$flock$memcomparable$$decode_float(bytes, start) {
10589
10576
  }
10590
10577
  const bits = zxch3n$flock$memcomparable$$uint64_from_be_bytes(moonbitlang$core$bytes$$Bytes$from_array({ buf: data, start: 0, end: data.length }));
10591
10578
  const f = moonbitlang$core$builtin$$Eq$equal$0$(moonbitlang$core$builtin$$BitAnd$land$0$(bits, $_9223372036854775808L), $0L) ? zxch3n$flock$memcomparable$$double_from_bits(moonbitlang$core$builtin$$BitXOr$lxor$0$(bits, $_1L)) : zxch3n$flock$memcomparable$$double_from_bits(moonbitlang$core$builtin$$BitXOr$lxor$0$(bits, $_9223372036854775808L));
10592
- return new Result$Ok$28$({ _0: f, _1: start + 8 | 0 });
10579
+ return new Result$Ok$27$({ _0: f, _1: start + 8 | 0 });
10593
10580
  }
10594
10581
  function zxch3n$flock$memcomparable$$Key$decode(bytes) {
10595
10582
  const key = zxch3n$flock$memcomparable$$Key$new();
@@ -10611,7 +10598,7 @@ function zxch3n$flock$memcomparable$$Key$decode(bytes) {
10611
10598
  const _next_i = _bind$2._1;
10612
10599
  const _bind$3 = zxch3n$flock$types$$Utf8Str$from_bytes_view(_data);
10613
10600
  if (_bind$3 === undefined) {
10614
- return new Result$Err$29$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidUTF8);
10601
+ return new Result$Err$28$(Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidUTF8);
10615
10602
  } else {
10616
10603
  const _Some = _bind$3;
10617
10604
  const _s = _Some;
@@ -10667,7 +10654,7 @@ function zxch3n$flock$memcomparable$$Key$decode(bytes) {
10667
10654
  if (tag === 39) {
10668
10655
  zxch3n$flock$memcomparable$$Key$push(key, $64$zxch3n$47$flock$47$memcomparable$46$KeyPart$True);
10669
10656
  } else {
10670
- return new Result$Err$29$(new Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidTag(tag));
10657
+ return new Result$Err$28$(new Error$zxch3n$47$flock$47$memcomparable$46$KeyError$46$InvalidTag(tag));
10671
10658
  }
10672
10659
  }
10673
10660
  }
@@ -10679,7 +10666,7 @@ function zxch3n$flock$memcomparable$$Key$decode(bytes) {
10679
10666
  break;
10680
10667
  }
10681
10668
  }
10682
- return new Result$Ok$29$(key);
10669
+ return new Result$Ok$28$(key);
10683
10670
  }
10684
10671
  function zxch3n$flock$memcomparable$$json_to_key_part(part) {
10685
10672
  switch (part.$tag) {
@@ -10811,7 +10798,7 @@ function zxch3n$flock$memcomparable$$decode_key_to_json(bytes) {
10811
10798
  }
10812
10799
  return parts;
10813
10800
  }
10814
- function zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, root) {
10801
+ function zxch3n$flock$sorted_map$$each$46$dfs$47$2800(f, root) {
10815
10802
  let _tmp = root;
10816
10803
  while (true) {
10817
10804
  const root$2 = _tmp;
@@ -10820,7 +10807,7 @@ function zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, root) {
10820
10807
  } else {
10821
10808
  const _Some = root$2;
10822
10809
  const _root = _Some;
10823
- zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, _root.left);
10810
+ zxch3n$flock$sorted_map$$each$46$dfs$47$2800(f, _root.left);
10824
10811
  f(_root.key, _root.value);
10825
10812
  _tmp = _root.right;
10826
10813
  continue;
@@ -10828,7 +10815,7 @@ function zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, root) {
10828
10815
  }
10829
10816
  }
10830
10817
  function zxch3n$flock$sorted_map$$SortedMap$each$79$(self, f) {
10831
- zxch3n$flock$sorted_map$$each$46$dfs$47$2802(f, self.root);
10818
+ zxch3n$flock$sorted_map$$each$46$dfs$47$2800(f, self.root);
10832
10819
  }
10833
10820
  function zxch3n$flock$sorted_map$$SortedMap$to_array$74$(self) {
10834
10821
  const arr = moonbitlang$core$array$$Array$new$46$inner$52$(self.size);
@@ -10843,7 +10830,7 @@ function zxch3n$flock$sorted_map$$SortedMap$new$74$() {
10843
10830
  function zxch3n$flock$sorted_map$$SortedMap$new$80$() {
10844
10831
  return { root: undefined, size: 0 };
10845
10832
  }
10846
- function zxch3n$flock$sorted_map$$height_ge$74$(x1, x2) {
10833
+ function zxch3n$flock$sorted_map$$height_ge$80$(x1, x2) {
10847
10834
  if (x2 === undefined) {
10848
10835
  return true;
10849
10836
  } else {
@@ -10858,7 +10845,7 @@ function zxch3n$flock$sorted_map$$height_ge$74$(x1, x2) {
10858
10845
  }
10859
10846
  }
10860
10847
  }
10861
- function zxch3n$flock$sorted_map$$height_ge$80$(x1, x2) {
10848
+ function zxch3n$flock$sorted_map$$height_ge$74$(x1, x2) {
10862
10849
  if (x2 === undefined) {
10863
10850
  return true;
10864
10851
  } else {
@@ -10873,7 +10860,7 @@ function zxch3n$flock$sorted_map$$height_ge$80$(x1, x2) {
10873
10860
  }
10874
10861
  }
10875
10862
  }
10876
- function zxch3n$flock$sorted_map$$Node$update_height$74$(self) {
10863
+ function zxch3n$flock$sorted_map$$Node$update_height$80$(self) {
10877
10864
  const _p = self.left;
10878
10865
  let _p$2;
10879
10866
  if (_p === undefined) {
@@ -10894,7 +10881,7 @@ function zxch3n$flock$sorted_map$$Node$update_height$74$(self) {
10894
10881
  }
10895
10882
  self.height = 1 + (_p$2 > _p$4 ? _p$2 : _p$4) | 0;
10896
10883
  }
10897
- function zxch3n$flock$sorted_map$$Node$update_height$80$(self) {
10884
+ function zxch3n$flock$sorted_map$$Node$update_height$74$(self) {
10898
10885
  const _p = self.left;
10899
10886
  let _p$2;
10900
10887
  if (_p === undefined) {
@@ -10915,7 +10902,7 @@ function zxch3n$flock$sorted_map$$Node$update_height$80$(self) {
10915
10902
  }
10916
10903
  self.height = 1 + (_p$2 > _p$4 ? _p$2 : _p$4) | 0;
10917
10904
  }
10918
- function zxch3n$flock$sorted_map$$rotate_l$74$(n) {
10905
+ function zxch3n$flock$sorted_map$$rotate_l$80$(n) {
10919
10906
  const _p = n.right;
10920
10907
  let r;
10921
10908
  if (_p === undefined) {
@@ -10926,11 +10913,11 @@ function zxch3n$flock$sorted_map$$rotate_l$74$(n) {
10926
10913
  }
10927
10914
  n.right = r.left;
10928
10915
  r.left = n;
10929
- zxch3n$flock$sorted_map$$Node$update_height$74$(n);
10930
- zxch3n$flock$sorted_map$$Node$update_height$74$(r);
10916
+ zxch3n$flock$sorted_map$$Node$update_height$80$(n);
10917
+ zxch3n$flock$sorted_map$$Node$update_height$80$(r);
10931
10918
  return r;
10932
10919
  }
10933
- function zxch3n$flock$sorted_map$$rotate_l$80$(n) {
10920
+ function zxch3n$flock$sorted_map$$rotate_l$74$(n) {
10934
10921
  const _p = n.right;
10935
10922
  let r;
10936
10923
  if (_p === undefined) {
@@ -10941,11 +10928,11 @@ function zxch3n$flock$sorted_map$$rotate_l$80$(n) {
10941
10928
  }
10942
10929
  n.right = r.left;
10943
10930
  r.left = n;
10944
- zxch3n$flock$sorted_map$$Node$update_height$80$(n);
10945
- zxch3n$flock$sorted_map$$Node$update_height$80$(r);
10931
+ zxch3n$flock$sorted_map$$Node$update_height$74$(n);
10932
+ zxch3n$flock$sorted_map$$Node$update_height$74$(r);
10946
10933
  return r;
10947
10934
  }
10948
- function zxch3n$flock$sorted_map$$rotate_r$74$(n) {
10935
+ function zxch3n$flock$sorted_map$$rotate_r$80$(n) {
10949
10936
  const _p = n.left;
10950
10937
  let l;
10951
10938
  if (_p === undefined) {
@@ -10956,11 +10943,11 @@ function zxch3n$flock$sorted_map$$rotate_r$74$(n) {
10956
10943
  }
10957
10944
  n.left = l.right;
10958
10945
  l.right = n;
10959
- zxch3n$flock$sorted_map$$Node$update_height$74$(n);
10960
- zxch3n$flock$sorted_map$$Node$update_height$74$(l);
10946
+ zxch3n$flock$sorted_map$$Node$update_height$80$(n);
10947
+ zxch3n$flock$sorted_map$$Node$update_height$80$(l);
10961
10948
  return l;
10962
10949
  }
10963
- function zxch3n$flock$sorted_map$$rotate_r$80$(n) {
10950
+ function zxch3n$flock$sorted_map$$rotate_r$74$(n) {
10964
10951
  const _p = n.left;
10965
10952
  let l;
10966
10953
  if (_p === undefined) {
@@ -10971,11 +10958,11 @@ function zxch3n$flock$sorted_map$$rotate_r$80$(n) {
10971
10958
  }
10972
10959
  n.left = l.right;
10973
10960
  l.right = n;
10974
- zxch3n$flock$sorted_map$$Node$update_height$80$(n);
10975
- zxch3n$flock$sorted_map$$Node$update_height$80$(l);
10961
+ zxch3n$flock$sorted_map$$Node$update_height$74$(n);
10962
+ zxch3n$flock$sorted_map$$Node$update_height$74$(l);
10976
10963
  return l;
10977
10964
  }
10978
- function zxch3n$flock$sorted_map$$rotate_lr$74$(n) {
10965
+ function zxch3n$flock$sorted_map$$rotate_lr$80$(n) {
10979
10966
  const _p = n.left;
10980
10967
  let l;
10981
10968
  if (_p === undefined) {
@@ -10984,11 +10971,11 @@ function zxch3n$flock$sorted_map$$rotate_lr$74$(n) {
10984
10971
  const _p$2 = _p;
10985
10972
  l = _p$2;
10986
10973
  }
10987
- const v = zxch3n$flock$sorted_map$$rotate_l$74$(l);
10974
+ const v = zxch3n$flock$sorted_map$$rotate_l$80$(l);
10988
10975
  n.left = v;
10989
- return zxch3n$flock$sorted_map$$rotate_r$74$(n);
10976
+ return zxch3n$flock$sorted_map$$rotate_r$80$(n);
10990
10977
  }
10991
- function zxch3n$flock$sorted_map$$rotate_lr$80$(n) {
10978
+ function zxch3n$flock$sorted_map$$rotate_lr$74$(n) {
10992
10979
  const _p = n.left;
10993
10980
  let l;
10994
10981
  if (_p === undefined) {
@@ -10997,11 +10984,11 @@ function zxch3n$flock$sorted_map$$rotate_lr$80$(n) {
10997
10984
  const _p$2 = _p;
10998
10985
  l = _p$2;
10999
10986
  }
11000
- const v = zxch3n$flock$sorted_map$$rotate_l$80$(l);
10987
+ const v = zxch3n$flock$sorted_map$$rotate_l$74$(l);
11001
10988
  n.left = v;
11002
- return zxch3n$flock$sorted_map$$rotate_r$80$(n);
10989
+ return zxch3n$flock$sorted_map$$rotate_r$74$(n);
11003
10990
  }
11004
- function zxch3n$flock$sorted_map$$rotate_rl$74$(n) {
10991
+ function zxch3n$flock$sorted_map$$rotate_rl$80$(n) {
11005
10992
  const _p = n.right;
11006
10993
  let r;
11007
10994
  if (_p === undefined) {
@@ -11010,11 +10997,11 @@ function zxch3n$flock$sorted_map$$rotate_rl$74$(n) {
11010
10997
  const _p$2 = _p;
11011
10998
  r = _p$2;
11012
10999
  }
11013
- const v = zxch3n$flock$sorted_map$$rotate_r$74$(r);
11000
+ const v = zxch3n$flock$sorted_map$$rotate_r$80$(r);
11014
11001
  n.right = v;
11015
- return zxch3n$flock$sorted_map$$rotate_l$74$(n);
11002
+ return zxch3n$flock$sorted_map$$rotate_l$80$(n);
11016
11003
  }
11017
- function zxch3n$flock$sorted_map$$rotate_rl$80$(n) {
11004
+ function zxch3n$flock$sorted_map$$rotate_rl$74$(n) {
11018
11005
  const _p = n.right;
11019
11006
  let r;
11020
11007
  if (_p === undefined) {
@@ -11023,11 +11010,11 @@ function zxch3n$flock$sorted_map$$rotate_rl$80$(n) {
11023
11010
  const _p$2 = _p;
11024
11011
  r = _p$2;
11025
11012
  }
11026
- const v = zxch3n$flock$sorted_map$$rotate_r$80$(r);
11013
+ const v = zxch3n$flock$sorted_map$$rotate_r$74$(r);
11027
11014
  n.right = v;
11028
- return zxch3n$flock$sorted_map$$rotate_l$80$(n);
11015
+ return zxch3n$flock$sorted_map$$rotate_l$74$(n);
11029
11016
  }
11030
- function zxch3n$flock$sorted_map$$balance$74$(root) {
11017
+ function zxch3n$flock$sorted_map$$balance$80$(root) {
11031
11018
  const l = root.left;
11032
11019
  const r = root.right;
11033
11020
  let hl;
@@ -11057,7 +11044,7 @@ function zxch3n$flock$sorted_map$$balance$74$(root) {
11057
11044
  }
11058
11045
  const _ll = _bind.left;
11059
11046
  const _lr = _bind.right;
11060
- new_root = zxch3n$flock$sorted_map$$height_ge$74$(_ll, _lr) ? zxch3n$flock$sorted_map$$rotate_r$74$(root) : zxch3n$flock$sorted_map$$rotate_lr$74$(root);
11047
+ new_root = zxch3n$flock$sorted_map$$height_ge$80$(_ll, _lr) ? zxch3n$flock$sorted_map$$rotate_r$80$(root) : zxch3n$flock$sorted_map$$rotate_lr$80$(root);
11061
11048
  } else {
11062
11049
  if (hr > (hl + 1 | 0)) {
11063
11050
  let _bind;
@@ -11069,15 +11056,15 @@ function zxch3n$flock$sorted_map$$balance$74$(root) {
11069
11056
  }
11070
11057
  const _rl = _bind.left;
11071
11058
  const _rr = _bind.right;
11072
- new_root = zxch3n$flock$sorted_map$$height_ge$74$(_rr, _rl) ? zxch3n$flock$sorted_map$$rotate_l$74$(root) : zxch3n$flock$sorted_map$$rotate_rl$74$(root);
11059
+ new_root = zxch3n$flock$sorted_map$$height_ge$80$(_rr, _rl) ? zxch3n$flock$sorted_map$$rotate_l$80$(root) : zxch3n$flock$sorted_map$$rotate_rl$80$(root);
11073
11060
  } else {
11074
11061
  new_root = root;
11075
11062
  }
11076
11063
  }
11077
- zxch3n$flock$sorted_map$$Node$update_height$74$(new_root);
11064
+ zxch3n$flock$sorted_map$$Node$update_height$80$(new_root);
11078
11065
  return new_root;
11079
11066
  }
11080
- function zxch3n$flock$sorted_map$$balance$80$(root) {
11067
+ function zxch3n$flock$sorted_map$$balance$74$(root) {
11081
11068
  const l = root.left;
11082
11069
  const r = root.right;
11083
11070
  let hl;
@@ -11107,7 +11094,7 @@ function zxch3n$flock$sorted_map$$balance$80$(root) {
11107
11094
  }
11108
11095
  const _ll = _bind.left;
11109
11096
  const _lr = _bind.right;
11110
- new_root = zxch3n$flock$sorted_map$$height_ge$80$(_ll, _lr) ? zxch3n$flock$sorted_map$$rotate_r$80$(root) : zxch3n$flock$sorted_map$$rotate_lr$80$(root);
11097
+ new_root = zxch3n$flock$sorted_map$$height_ge$74$(_ll, _lr) ? zxch3n$flock$sorted_map$$rotate_r$74$(root) : zxch3n$flock$sorted_map$$rotate_lr$74$(root);
11111
11098
  } else {
11112
11099
  if (hr > (hl + 1 | 0)) {
11113
11100
  let _bind;
@@ -11119,23 +11106,23 @@ function zxch3n$flock$sorted_map$$balance$80$(root) {
11119
11106
  }
11120
11107
  const _rl = _bind.left;
11121
11108
  const _rr = _bind.right;
11122
- new_root = zxch3n$flock$sorted_map$$height_ge$80$(_rr, _rl) ? zxch3n$flock$sorted_map$$rotate_l$80$(root) : zxch3n$flock$sorted_map$$rotate_rl$80$(root);
11109
+ new_root = zxch3n$flock$sorted_map$$height_ge$74$(_rr, _rl) ? zxch3n$flock$sorted_map$$rotate_l$74$(root) : zxch3n$flock$sorted_map$$rotate_rl$74$(root);
11123
11110
  } else {
11124
11111
  new_root = root;
11125
11112
  }
11126
11113
  }
11127
- zxch3n$flock$sorted_map$$Node$update_height$80$(new_root);
11114
+ zxch3n$flock$sorted_map$$Node$update_height$74$(new_root);
11128
11115
  return new_root;
11129
11116
  }
11130
- function zxch3n$flock$sorted_map$$new_node$74$(key, value) {
11117
+ function zxch3n$flock$sorted_map$$new_node$80$(key, value) {
11131
11118
  return { key: key, value: value, left: undefined, right: undefined, height: 1 };
11132
11119
  }
11133
- function zxch3n$flock$sorted_map$$new_node$80$(key, value) {
11120
+ function zxch3n$flock$sorted_map$$new_node$74$(key, value) {
11134
11121
  return { key: key, value: value, left: undefined, right: undefined, height: 1 };
11135
11122
  }
11136
- function zxch3n$flock$sorted_map$$add_node$74$(root, key, value) {
11123
+ function zxch3n$flock$sorted_map$$add_node$80$(root, key, value) {
11137
11124
  if (root === undefined) {
11138
- return { _0: zxch3n$flock$sorted_map$$new_node$74$(key, value), _1: true };
11125
+ return { _0: zxch3n$flock$sorted_map$$new_node$80$(key, value), _1: true };
11139
11126
  } else {
11140
11127
  const _Some = root;
11141
11128
  const _n = _Some;
@@ -11146,24 +11133,24 @@ function zxch3n$flock$sorted_map$$add_node$74$(root, key, value) {
11146
11133
  const l = _n.left;
11147
11134
  const r = _n.right;
11148
11135
  if (moonbitlang$core$builtin$$Compare$op_lt$57$(key, _n.key)) {
11149
- const _bind = zxch3n$flock$sorted_map$$add_node$74$(l, key, value);
11136
+ const _bind = zxch3n$flock$sorted_map$$add_node$80$(l, key, value);
11150
11137
  const _nl = _bind._0;
11151
11138
  const _inserted = _bind._1;
11152
11139
  _n.left = _nl;
11153
- return { _0: zxch3n$flock$sorted_map$$balance$74$(_n), _1: _inserted };
11140
+ return { _0: zxch3n$flock$sorted_map$$balance$80$(_n), _1: _inserted };
11154
11141
  } else {
11155
- const _bind = zxch3n$flock$sorted_map$$add_node$74$(r, key, value);
11142
+ const _bind = zxch3n$flock$sorted_map$$add_node$80$(r, key, value);
11156
11143
  const _nr = _bind._0;
11157
11144
  const _inserted = _bind._1;
11158
11145
  _n.right = _nr;
11159
- return { _0: zxch3n$flock$sorted_map$$balance$74$(_n), _1: _inserted };
11146
+ return { _0: zxch3n$flock$sorted_map$$balance$80$(_n), _1: _inserted };
11160
11147
  }
11161
11148
  }
11162
11149
  }
11163
11150
  }
11164
- function zxch3n$flock$sorted_map$$add_node$80$(root, key, value) {
11151
+ function zxch3n$flock$sorted_map$$add_node$74$(root, key, value) {
11165
11152
  if (root === undefined) {
11166
- return { _0: zxch3n$flock$sorted_map$$new_node$80$(key, value), _1: true };
11153
+ return { _0: zxch3n$flock$sorted_map$$new_node$74$(key, value), _1: true };
11167
11154
  } else {
11168
11155
  const _Some = root;
11169
11156
  const _n = _Some;
@@ -11174,23 +11161,23 @@ function zxch3n$flock$sorted_map$$add_node$80$(root, key, value) {
11174
11161
  const l = _n.left;
11175
11162
  const r = _n.right;
11176
11163
  if (moonbitlang$core$builtin$$Compare$op_lt$57$(key, _n.key)) {
11177
- const _bind = zxch3n$flock$sorted_map$$add_node$80$(l, key, value);
11164
+ const _bind = zxch3n$flock$sorted_map$$add_node$74$(l, key, value);
11178
11165
  const _nl = _bind._0;
11179
11166
  const _inserted = _bind._1;
11180
11167
  _n.left = _nl;
11181
- return { _0: zxch3n$flock$sorted_map$$balance$80$(_n), _1: _inserted };
11168
+ return { _0: zxch3n$flock$sorted_map$$balance$74$(_n), _1: _inserted };
11182
11169
  } else {
11183
- const _bind = zxch3n$flock$sorted_map$$add_node$80$(r, key, value);
11170
+ const _bind = zxch3n$flock$sorted_map$$add_node$74$(r, key, value);
11184
11171
  const _nr = _bind._0;
11185
11172
  const _inserted = _bind._1;
11186
11173
  _n.right = _nr;
11187
- return { _0: zxch3n$flock$sorted_map$$balance$80$(_n), _1: _inserted };
11174
+ return { _0: zxch3n$flock$sorted_map$$balance$74$(_n), _1: _inserted };
11188
11175
  }
11189
11176
  }
11190
11177
  }
11191
11178
  }
11192
- function zxch3n$flock$sorted_map$$SortedMap$set$74$(self, key, value) {
11193
- const _bind = zxch3n$flock$sorted_map$$add_node$74$(self.root, key, value);
11179
+ function zxch3n$flock$sorted_map$$SortedMap$set$80$(self, key, value) {
11180
+ const _bind = zxch3n$flock$sorted_map$$add_node$80$(self.root, key, value);
11194
11181
  const _new_root = _bind._0;
11195
11182
  const _inserted = _bind._1;
11196
11183
  if (moonbitlang$core$builtin$$op_notequal$46$(self.root, _new_root)) {
@@ -11203,8 +11190,8 @@ function zxch3n$flock$sorted_map$$SortedMap$set$74$(self, key, value) {
11203
11190
  return;
11204
11191
  }
11205
11192
  }
11206
- function zxch3n$flock$sorted_map$$SortedMap$set$80$(self, key, value) {
11207
- const _bind = zxch3n$flock$sorted_map$$add_node$80$(self.root, key, value);
11193
+ function zxch3n$flock$sorted_map$$SortedMap$set$74$(self, key, value) {
11194
+ const _bind = zxch3n$flock$sorted_map$$add_node$74$(self.root, key, value);
11208
11195
  const _new_root = _bind._0;
11209
11196
  const _inserted = _bind._1;
11210
11197
  if (moonbitlang$core$builtin$$op_notequal$48$(self.root, _new_root)) {
@@ -11222,13 +11209,13 @@ function zxch3n$flock$sorted_map$$SortedMap$get$80$(self, key) {
11222
11209
  while (true) {
11223
11210
  const _param = _tmp;
11224
11211
  if (_param === undefined) {
11225
- return Option$None$32$;
11212
+ return Option$None$31$;
11226
11213
  } else {
11227
11214
  const _Some = _param;
11228
11215
  const _node = _Some;
11229
11216
  const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11230
11217
  if (cmp === 0) {
11231
- return new Option$Some$32$(_node.value);
11218
+ return new Option$Some$31$(_node.value);
11232
11219
  } else {
11233
11220
  if (cmp > 0) {
11234
11221
  _tmp = _node.right;
@@ -11265,6 +11252,34 @@ function zxch3n$flock$sorted_map$$SortedMap$get$74$(self, key) {
11265
11252
  }
11266
11253
  }
11267
11254
  }
11255
+ function zxch3n$flock$sorted_map$$SortedMap$entry$74$(self, key) {
11256
+ let _tmp = self.root;
11257
+ while (true) {
11258
+ const _param = _tmp;
11259
+ if (_param === undefined) {
11260
+ return { _0: undefined, _1: (v) => {
11261
+ zxch3n$flock$sorted_map$$SortedMap$set$74$(self, key, v);
11262
+ } };
11263
+ } else {
11264
+ const _Some = _param;
11265
+ const _node = _Some;
11266
+ const cmp = moonbitlang$core$builtin$$Compare$compare$7$(key, _node.key);
11267
+ if (cmp === 0) {
11268
+ return { _0: _node.value, _1: (v) => {
11269
+ _node.value = v;
11270
+ } };
11271
+ } else {
11272
+ if (cmp > 0) {
11273
+ _tmp = _node.right;
11274
+ continue;
11275
+ } else {
11276
+ _tmp = _node.left;
11277
+ continue;
11278
+ }
11279
+ }
11280
+ }
11281
+ }
11282
+ }
11268
11283
  function zxch3n$flock$sorted_map$$SortedMap$at$80$(self, key) {
11269
11284
  let _tmp = self.root;
11270
11285
  while (true) {
@@ -11297,7 +11312,7 @@ function zxch3n$flock$sorted_map$$SortedMap$contains$80$(self, key) {
11297
11312
  return false;
11298
11313
  }
11299
11314
  }
11300
- function zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, x) {
11315
+ function zxch3n$flock$sorted_map$$iter2$46$go$47$2955(yield_, x) {
11301
11316
  let _tmp = x;
11302
11317
  while (true) {
11303
11318
  const x$2 = _tmp;
@@ -11310,7 +11325,7 @@ function zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, x) {
11310
11325
  const _right = _x.right;
11311
11326
  const _key = _x.key;
11312
11327
  const _value = _x.value;
11313
- const _bind = zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, _left);
11328
+ const _bind = zxch3n$flock$sorted_map$$iter2$46$go$47$2955(yield_, _left);
11314
11329
  if (_bind === 0) {
11315
11330
  return 0;
11316
11331
  } else {
@@ -11326,10 +11341,10 @@ function zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, x) {
11326
11341
  }
11327
11342
  }
11328
11343
  function zxch3n$flock$sorted_map$$SortedMap$iter2$74$(self) {
11329
- const _p = (yield_) => zxch3n$flock$sorted_map$$iter2$46$go$47$2948(yield_, self.root);
11344
+ const _p = (yield_) => zxch3n$flock$sorted_map$$iter2$46$go$47$2955(yield_, self.root);
11330
11345
  return _p;
11331
11346
  }
11332
- function zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, x) {
11347
+ function zxch3n$flock$sorted_map$$range$46$go$47$2970(_env, x) {
11333
11348
  const yield_ = _env._4;
11334
11349
  const low = _env._3;
11335
11350
  const tuple = _env._2;
@@ -11393,7 +11408,7 @@ function zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, x) {
11393
11408
  const _within_high = _bind$2._1;
11394
11409
  _L: {
11395
11410
  if (_go_left) {
11396
- const _bind$3 = zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, _left);
11411
+ const _bind$3 = zxch3n$flock$sorted_map$$range$46$go$47$2970(_env, _left);
11397
11412
  if (_bind$3 === 0) {
11398
11413
  return 0;
11399
11414
  } else {
@@ -11430,8 +11445,8 @@ function zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, x) {
11430
11445
  }
11431
11446
  function zxch3n$flock$sorted_map$$SortedMap$range$74$(self, low, high) {
11432
11447
  const _p = (yield_) => {
11433
- const _env = { _0: zxch3n$flock$sorted_map$$range$46$tuple$47$2964, _1: high, _2: zxch3n$flock$sorted_map$$range$46$tuple$47$2965, _3: low, _4: yield_ };
11434
- return zxch3n$flock$sorted_map$$range$46$go$47$2963(_env, self.root);
11448
+ const _env = { _0: zxch3n$flock$sorted_map$$range$46$tuple$47$2971, _1: high, _2: zxch3n$flock$sorted_map$$range$46$tuple$47$2972, _3: low, _4: yield_ };
11449
+ return zxch3n$flock$sorted_map$$range$46$go$47$2970(_env, self.root);
11435
11450
  };
11436
11451
  return _p;
11437
11452
  }
@@ -11566,7 +11581,7 @@ function zxch3n$flock$flock$$HlcWithPeer$to_string(self) {
11566
11581
  return `${zxch3n$flock$flock$$Hlc$to_string(self.hlc)},${zxch3n$flock$flock$$bytes_to_hex(self.peer)}`;
11567
11582
  }
11568
11583
  function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
11569
- const _bind = moonbitlang$core$builtin$$Iter$collect$16$(moonbitlang$core$string$$StringView$split(s, { str: zxch3n$flock$flock$$from_string$46$42$bind$124$604, start: 0, end: zxch3n$flock$flock$$from_string$46$42$bind$124$604.length }));
11584
+ const _bind = moonbitlang$core$builtin$$Iter$collect$16$(moonbitlang$core$string$$StringView$split(s, { str: zxch3n$flock$flock$$from_string$46$42$bind$124$593, start: 0, end: zxch3n$flock$flock$$from_string$46$42$bind$124$593.length }));
11570
11585
  if (_bind.length === 3) {
11571
11586
  const _a = _bind[0];
11572
11587
  const _b = _bind[1];
@@ -11981,40 +11996,42 @@ function zxch3n$flock$flock$$Flock$record_pending_change$46$inner(self, remove_d
11981
11996
  }
11982
11997
  }
11983
11998
  }
11984
- function zxch3n$flock$flock$$Flock$apply_entry(self, entry) {
11999
+ function zxch3n$flock$flock$$Flock$apply_entry(self, entry, skip_same_value) {
11985
12000
  const entry_key = entry.key;
11986
12001
  const peer = entry.value.clock.peer;
11987
- const maybe_existing = zxch3n$flock$sorted_map$$SortedMap$get$74$(self.kv, entry_key);
12002
+ const _bind = zxch3n$flock$sorted_map$$SortedMap$entry$74$(self.kv, entry_key);
12003
+ const _maybe_existing = _bind._0;
12004
+ const _setter = _bind._1;
11988
12005
  let should_apply;
11989
- if (maybe_existing === undefined) {
12006
+ if (_maybe_existing === undefined) {
11990
12007
  should_apply = true;
11991
12008
  } else {
11992
- const _Some = maybe_existing;
12009
+ const _Some = _maybe_existing;
11993
12010
  const _existing = _Some;
11994
- should_apply = moonbitlang$core$builtin$$Compare$op_gt$55$(entry.value.clock, _existing.value.clock);
12011
+ should_apply = moonbitlang$core$builtin$$Compare$op_gt$55$(entry.value.clock, _existing.value.clock) || skip_same_value && moonbitlang$core$builtin$$Eq$equal$45$(entry.value.data, _existing.value.data);
11995
12012
  }
11996
12013
  if (!should_apply) {
11997
12014
  return false;
11998
12015
  }
11999
12016
  let removed_digest = undefined;
12000
- if (maybe_existing === undefined) {
12017
+ if (_maybe_existing === undefined) {
12001
12018
  } else {
12002
- const _Some = maybe_existing;
12019
+ const _Some = _maybe_existing;
12003
12020
  const _existing = _Some;
12004
12021
  removed_digest = zxch3n$flock$flock$$Entry$digest(_existing);
12005
12022
  _existing.overridden = true;
12006
12023
  }
12007
- const added_digest = moonbitlang$core$option$$Option$map$70$(entry.value.data, (_discard_) => zxch3n$flock$flock$$Entry$digest(entry));
12008
- zxch3n$flock$sorted_map$$SortedMap$set$74$(self.kv, entry_key, entry);
12024
+ const added_digest = moonbitlang$core$option$$Option$map$69$(entry.value.data, (_discard_) => zxch3n$flock$flock$$Entry$digest(entry));
12025
+ _setter(entry);
12009
12026
  if (!zxch3n$flock$sorted_map$$SortedMap$contains$80$(self.updates, peer)) {
12010
12027
  zxch3n$flock$sorted_map$$SortedMap$set$80$(self.updates, peer, []);
12011
12028
  }
12012
12029
  const updates = zxch3n$flock$sorted_map$$SortedMap$at$80$(self.updates, peer);
12013
12030
  let meet_rare_case = false;
12014
- const _bind = moonbitlang$core$array$$Array$last$42$(updates);
12015
- if (_bind === undefined) {
12031
+ const _bind$2 = moonbitlang$core$array$$Array$last$42$(updates);
12032
+ if (_bind$2 === undefined) {
12016
12033
  } else {
12017
- const _Some = _bind;
12034
+ const _Some = _bind$2;
12018
12035
  const _last = _Some;
12019
12036
  if (moonbitlang$core$builtin$$Compare$op_gt$55$(_last.value.clock, entry.value.clock)) {
12020
12037
  meet_rare_case = true;
@@ -12159,7 +12176,7 @@ function zxch3n$flock$flock$$Flock$new(peer_id) {
12159
12176
  const _bind$3 = zxch3n$flock$sorted_map$$SortedMap$new$80$();
12160
12177
  const _bind$4 = zxch3n$flock$flock$$SubscriberSet$new$81$();
12161
12178
  const _bind$5 = undefined;
12162
- return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$new$46$42$bind$47$3223, vv: _bind, kv: _bind$2, updates: _bind$3, subscribers: _bind$4, digest: _bind$5 };
12179
+ return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$new$46$42$bind$47$3233, vv: _bind, kv: _bind$2, updates: _bind$3, subscribers: _bind$4, digest: _bind$5 };
12163
12180
  }
12164
12181
  function zxch3n$flock$flock$$Flock$set_peer_id(self, peer_id) {
12165
12182
  self.peer_id = peer_id;
@@ -12194,11 +12211,11 @@ function zxch3n$flock$flock$$Flock$check_consistency(a, b) {
12194
12211
  }
12195
12212
  return true;
12196
12213
  }
12197
- function zxch3n$flock$flock$$Flock$check_invariants(self) {}
12214
+ function zxch3n$flock$flock$$Flock$check_invariants(_self) {}
12198
12215
  function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata, now, hooks) {
12199
12216
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(key);
12200
12217
  if (_bind === undefined) {
12201
- return new Result$Err$33$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidKey(moonbitlang$core$builtin$$ToJson$to_json$32$(key)));
12218
+ return new Result$Err$32$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidKey(moonbitlang$core$builtin$$ToJson$to_json$32$(key)));
12202
12219
  } else {
12203
12220
  const _Some = _bind;
12204
12221
  const _encoded_key = _Some;
@@ -12236,9 +12253,9 @@ function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata,
12236
12253
  }
12237
12254
  const final_value = { data: transformed_value.data, metadata: transformed_value.metadata, clock: clock };
12238
12255
  const final_entry = zxch3n$flock$flock$$make_entry(_encoded_key, final_value);
12239
- const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry);
12256
+ const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry, true);
12240
12257
  if (!applied) {
12241
- return new Result$Ok$33$(undefined);
12258
+ return new Result$Ok$32$(undefined);
12242
12259
  }
12243
12260
  const final_clock = final_entry.value.clock.hlc;
12244
12261
  self.max_hlc = final_clock;
@@ -12246,9 +12263,9 @@ function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata,
12246
12263
  if (!zxch3n$flock$flock$$SubscriberSet$is_empty$81$(self.subscribers)) {
12247
12264
  const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
12248
12265
  const event_payload = zxch3n$flock$flock$$clone_raw_value(final_entry.value);
12249
- return new Result$Ok$33$(zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: Source$Local, events: [{ _0: event_key, _1: event_payload }] }));
12266
+ return new Result$Ok$32$(zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: Source$Local, events: [{ _0: event_key, _1: event_payload }] }));
12250
12267
  } else {
12251
- return new Result$Ok$33$(undefined);
12268
+ return new Result$Ok$32$(undefined);
12252
12269
  }
12253
12270
  }
12254
12271
  }
@@ -12304,10 +12321,10 @@ function zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, metadata$46$o
12304
12321
  return zxch3n$flock$flock$$Flock$put_with_meta$46$inner(self, key, value, metadata, now, hooks);
12305
12322
  }
12306
12323
  function zxch3n$flock$flock$$Flock$put$46$inner(self, key, value, now) {
12307
- return zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, Option$None$34$, now, Option$None$35$);
12324
+ return zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, Option$None$33$, now, Option$None$34$);
12308
12325
  }
12309
12326
  function zxch3n$flock$flock$$Flock$delete$46$inner(self, key, now) {
12310
- return zxch3n$flock$flock$$Flock$put_inner(self, key, undefined, Option$None$34$, now, Option$None$35$);
12327
+ return zxch3n$flock$flock$$Flock$put_inner(self, key, undefined, Option$None$33$, now, Option$None$34$);
12311
12328
  }
12312
12329
  function zxch3n$flock$flock$$Flock$get(self, key) {
12313
12330
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(key);
@@ -12316,7 +12333,7 @@ function zxch3n$flock$flock$$Flock$get(self, key) {
12316
12333
  } else {
12317
12334
  const _Some = _bind;
12318
12335
  const _encoded_key = _Some;
12319
- return moonbitlang$core$option$$Option$flatten$14$(moonbitlang$core$option$$Option$map$69$(zxch3n$flock$sorted_map$$SortedMap$get$74$(self.kv, _encoded_key), (entry) => entry.value.data));
12336
+ return moonbitlang$core$option$$Option$bind$70$(zxch3n$flock$sorted_map$$SortedMap$get$74$(self.kv, _encoded_key), (entry) => entry.value.data);
12320
12337
  }
12321
12338
  }
12322
12339
  function zxch3n$flock$flock$$empty_scan_iter() {
@@ -12368,7 +12385,7 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
12368
12385
  }
12369
12386
  return undefined;
12370
12387
  }
12371
- function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, bytes, inclusive) {
12388
+ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, bytes, inclusive) {
12372
12389
  const lower_inclusive = _env._1;
12373
12390
  const lower_bytes = _env._0;
12374
12391
  const _bind = lower_bytes.val;
@@ -12394,9 +12411,9 @@ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, bytes, i
12394
12411
  }
12395
12412
  }
12396
12413
  }
12397
- function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$386(_env, bytes, inclusive) {
12398
- const upper_bytes = _env._1;
12399
- const upper_inclusive = _env._0;
12414
+ function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env, bytes, inclusive) {
12415
+ const upper_inclusive = _env._1;
12416
+ const upper_bytes = _env._0;
12400
12417
  const _bind = upper_bytes.val;
12401
12418
  if (_bind === undefined) {
12402
12419
  upper_bytes.val = bytes;
@@ -12451,7 +12468,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12451
12468
  } else {
12452
12469
  const _Some = _bind;
12453
12470
  const _encoded_start = _Some;
12454
- start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(_encoded_start);
12471
+ start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$35$(_encoded_start);
12455
12472
  }
12456
12473
  break;
12457
12474
  }
@@ -12464,12 +12481,12 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12464
12481
  } else {
12465
12482
  const _Some = _bind$2;
12466
12483
  const _encoded_start = _Some;
12467
- start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(_encoded_start);
12484
+ start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$35$(_encoded_start);
12468
12485
  }
12469
12486
  break;
12470
12487
  }
12471
12488
  default: {
12472
- start_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$;
12489
+ start_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$35$;
12473
12490
  }
12474
12491
  }
12475
12492
  let end_bound_bytes;
@@ -12483,7 +12500,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12483
12500
  } else {
12484
12501
  const _Some = _bind$3;
12485
12502
  const _encoded_end = _Some;
12486
- end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(_encoded_end);
12503
+ end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$35$(_encoded_end);
12487
12504
  }
12488
12505
  break;
12489
12506
  }
@@ -12496,12 +12513,12 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12496
12513
  } else {
12497
12514
  const _Some = _bind$4;
12498
12515
  const _encoded_end = _Some;
12499
- end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(_encoded_end);
12516
+ end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$35$(_encoded_end);
12500
12517
  }
12501
12518
  break;
12502
12519
  }
12503
12520
  default: {
12504
- end_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$;
12521
+ end_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$35$;
12505
12522
  }
12506
12523
  }
12507
12524
  const lower_bytes = { val: undefined };
@@ -12512,63 +12529,63 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12512
12529
  } else {
12513
12530
  const _Some = _bind$5;
12514
12531
  const _prefix_key = _Some;
12515
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, _prefix_key, true);
12532
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, _prefix_key, true);
12516
12533
  }
12517
12534
  switch (start_bound_bytes.$tag) {
12518
12535
  case 0: {
12519
12536
  const _Inclusive$3 = start_bound_bytes;
12520
12537
  const _start_key = _Inclusive$3._0;
12521
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, _start_key, true);
12538
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, _start_key, true);
12522
12539
  break;
12523
12540
  }
12524
12541
  case 1: {
12525
12542
  const _Exclusive$3 = start_bound_bytes;
12526
12543
  const _start_key$2 = _Exclusive$3._0;
12527
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$374(_env, _start_key$2, false);
12544
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$375(_env, _start_key$2, false);
12528
12545
  break;
12529
12546
  }
12530
12547
  }
12531
12548
  const _bind$6 = lower_bytes.val;
12532
12549
  let low_bound;
12533
12550
  if (_bind$6 === undefined) {
12534
- low_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$31$;
12551
+ low_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
12535
12552
  } else {
12536
12553
  const _Some = _bind$6;
12537
12554
  const _bytes = _Some;
12538
- low_bound = lower_inclusive.val ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$31$(_bytes) : new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$31$(_bytes);
12555
+ low_bound = lower_inclusive.val ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$30$(_bytes) : new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$(_bytes);
12539
12556
  }
12540
12557
  const upper_bytes = { val: undefined };
12541
12558
  const upper_inclusive = { val: true };
12542
- const _env$2 = { _0: upper_inclusive, _1: upper_bytes };
12559
+ const _env$2 = { _0: upper_bytes, _1: upper_inclusive };
12543
12560
  const _bind$7 = prefix_upper_bytes;
12544
12561
  if (_bind$7 === undefined) {
12545
12562
  } else {
12546
12563
  const _Some = _bind$7;
12547
12564
  const _prefix_upper = _Some;
12548
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$386(_env$2, _prefix_upper, false);
12565
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env$2, _prefix_upper, false);
12549
12566
  }
12550
12567
  switch (end_bound_bytes.$tag) {
12551
12568
  case 0: {
12552
12569
  const _Inclusive$4 = end_bound_bytes;
12553
12570
  const _end_key = _Inclusive$4._0;
12554
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$386(_env$2, _end_key, true);
12571
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env$2, _end_key, true);
12555
12572
  break;
12556
12573
  }
12557
12574
  case 1: {
12558
12575
  const _Exclusive$4 = end_bound_bytes;
12559
12576
  const _end_key$2 = _Exclusive$4._0;
12560
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$386(_env$2, _end_key$2, false);
12577
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$387(_env$2, _end_key$2, false);
12561
12578
  break;
12562
12579
  }
12563
12580
  }
12564
12581
  const _bind$8 = upper_bytes.val;
12565
12582
  let high_bound;
12566
12583
  if (_bind$8 === undefined) {
12567
- high_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$31$;
12584
+ high_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
12568
12585
  } else {
12569
12586
  const _Some = _bind$8;
12570
12587
  const _bytes = _Some;
12571
- high_bound = upper_inclusive.val ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$31$(_bytes) : new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$31$(_bytes);
12588
+ high_bound = upper_inclusive.val ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$30$(_bytes) : new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$(_bytes);
12572
12589
  }
12573
12590
  const range_iter = zxch3n$flock$sorted_map$$SortedMap$range$74$(self.kv, low_bound, high_bound);
12574
12591
  const _p = (yield_) => moonbitlang$core$builtin$$Iter2$run$74$(range_iter, (encoded_key, entry) => {
@@ -12608,14 +12625,14 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
12608
12625
  function zxch3n$flock$flock$$Flock$scan(self, start$46$opt, end$46$opt, prefix) {
12609
12626
  let start;
12610
12627
  if (start$46$opt === undefined) {
12611
- start = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
12628
+ start = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
12612
12629
  } else {
12613
12630
  const _Some = start$46$opt;
12614
12631
  start = _Some;
12615
12632
  }
12616
12633
  let end;
12617
12634
  if (end$46$opt === undefined) {
12618
- end = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
12635
+ end = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
12619
12636
  } else {
12620
12637
  const _Some = end$46$opt;
12621
12638
  end = _Some;
@@ -12642,13 +12659,13 @@ function zxch3n$flock$flock$$Flock$export_json(self, from) {
12642
12659
  const _Some = from;
12643
12660
  const _f = _Some;
12644
12661
  if (!(_f.size === 0)) {
12645
- let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$37$;
12662
+ let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$36$;
12646
12663
  const _bind = moonbitlang$core$builtin$$Map$iter2$71$(self.vv);
12647
12664
  _bind((peer, clock) => {
12648
12665
  const _p$3 = moonbitlang$core$builtin$$Map$get$71$(_f, peer);
12649
12666
  let v;
12650
12667
  if (_p$3 === undefined) {
12651
- v = zxch3n$flock$flock$$zero$46$record$47$3043;
12668
+ v = zxch3n$flock$flock$$zero$46$record$47$3050;
12652
12669
  } else {
12653
12670
  const _p$4 = _p$3;
12654
12671
  v = _p$4;
@@ -12743,7 +12760,7 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12743
12760
  _L$2: {
12744
12761
  const _bind = moonbitlang$core$builtin$$Map$get$37$(_map, "version");
12745
12762
  if (_bind === undefined) {
12746
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "The imported json does not contain a version field"));
12763
+ return new Result$Err$37$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "The imported json does not contain a version field"));
12747
12764
  } else {
12748
12765
  const _Some = _bind;
12749
12766
  const _x = _Some;
@@ -12762,11 +12779,11 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12762
12779
  }
12763
12780
  break _L;
12764
12781
  }
12765
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, `The imported json uses an unsupported version ${moonbitlang$core$builtin$$Show$to_string$60$(version)}`));
12782
+ return new Result$Err$37$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, `The imported json uses an unsupported version ${moonbitlang$core$builtin$$Show$to_string$60$(version)}`));
12766
12783
  }
12767
- const events = { val: Option$None$39$ };
12784
+ const events = { val: Option$None$38$ };
12768
12785
  if (!zxch3n$flock$flock$$SubscriberSet$is_empty$81$(self.subscribers)) {
12769
- events.val = new Option$Some$39$(moonbitlang$core$array$$Array$new$46$inner$51$(0));
12786
+ events.val = new Option$Some$38$(moonbitlang$core$array$$Array$new$46$inner$51$(0));
12770
12787
  }
12771
12788
  const skipped_entries = moonbitlang$core$array$$Array$new$46$inner$50$(0);
12772
12789
  const accepted = { val: 0 };
@@ -12788,9 +12805,9 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12788
12805
  }
12789
12806
  break _L$2;
12790
12807
  }
12791
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "entries is not an object"));
12808
+ return new Result$Err$37$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "entries is not an object"));
12792
12809
  }
12793
- const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$40$ };
12810
+ const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$39$ };
12794
12811
  const _bind = moonbitlang$core$builtin$$Map$iter2$37$(entries);
12795
12812
  _bind((raw_key, raw_value_json) => {
12796
12813
  let _foreach_error;
@@ -12867,7 +12884,7 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12867
12884
  accepted.val = accepted.val + 1 | 0;
12868
12885
  const peer = final_entry.value.clock.peer;
12869
12886
  const clock = final_entry.value.clock.hlc;
12870
- const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry);
12887
+ const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry, false);
12871
12888
  if (moonbitlang$core$builtin$$Compare$op_lt$54$(self.max_hlc, clock)) {
12872
12889
  self.max_hlc = clock;
12873
12890
  }
@@ -12898,7 +12915,7 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12898
12915
  }
12899
12916
  return 1;
12900
12917
  }
12901
- _foreach_result.val = new $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$40$(_foreach_error);
12918
+ _foreach_result.val = new $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$39$(_foreach_error);
12902
12919
  return 0;
12903
12920
  });
12904
12921
  const _tmp = _foreach_result.val;
@@ -12913,11 +12930,11 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12913
12930
  }
12914
12931
  case 2: {
12915
12932
  const _return = _tmp;
12916
- return new Result$Ok$38$(_return._0);
12933
+ return new Result$Ok$37$(_return._0);
12917
12934
  }
12918
12935
  case 3: {
12919
12936
  const _error = _tmp;
12920
- return new Result$Err$38$(_error._0);
12937
+ return new Result$Err$37$(_error._0);
12921
12938
  }
12922
12939
  default: {
12923
12940
  $panic();
@@ -12928,12 +12945,12 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
12928
12945
  const _Some = _bind$2;
12929
12946
  const _events = _Some._0;
12930
12947
  if (_events.length > 0) {
12931
- zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3465, events: _events });
12948
+ zxch3n$flock$flock$$SubscriberSet$notify$81$(self.subscribers, { by: zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3475, events: _events });
12932
12949
  }
12933
12950
  }
12934
- return new Result$Ok$38$({ accepted: accepted.val, skipped: skipped_entries });
12951
+ return new Result$Ok$37$({ accepted: accepted.val, skipped: skipped_entries });
12935
12952
  } else {
12936
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "not an object"));
12953
+ return new Result$Err$37$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "not an object"));
12937
12954
  }
12938
12955
  }
12939
12956
  function zxch3n$flock$flock$$Flock$import_json(self, json, hooks$46$opt) {
@@ -12950,7 +12967,7 @@ function zxch3n$flock$flock$$Flock$merge(self, other) {
12950
12967
  let _try_err;
12951
12968
  _L: {
12952
12969
  _L$2: {
12953
- const _bind = zxch3n$flock$flock$$Flock$import_json(self, zxch3n$flock$flock$$Flock$export_json(other, zxch3n$flock$flock$$Flock$version(self)), Option$None$41$);
12970
+ const _bind = zxch3n$flock$flock$$Flock$import_json(self, zxch3n$flock$flock$$Flock$export_json(other, zxch3n$flock$flock$$Flock$version(self)), Option$None$40$);
12954
12971
  if (_bind.$tag === 1) {
12955
12972
  const _ok = _bind;
12956
12973
  _ok._0;
@@ -12967,7 +12984,7 @@ function zxch3n$flock$flock$$Flock$merge(self, other) {
12967
12984
  }
12968
12985
  function zxch3n$flock$flock$$Flock$from_json(json, peer_id) {
12969
12986
  const flock = zxch3n$flock$flock$$Flock$new(peer_id);
12970
- const _bind = zxch3n$flock$flock$$Flock$import_json(flock, json, Option$None$41$);
12987
+ const _bind = zxch3n$flock$flock$$Flock$import_json(flock, json, Option$None$40$);
12971
12988
  let report;
12972
12989
  if (_bind.$tag === 1) {
12973
12990
  const _ok = _bind;
@@ -12975,14 +12992,14 @@ function zxch3n$flock$flock$$Flock$from_json(json, peer_id) {
12975
12992
  } else {
12976
12993
  return _bind;
12977
12994
  }
12978
- return new Result$Ok$42$(flock);
12995
+ return new Result$Ok$41$(flock);
12979
12996
  }
12980
12997
  function zxch3n$flock$flock$$Flock$kv_to_json(self) {
12981
12998
  return zxch3n$flock$flock$$Flock$export_json(self, undefined);
12982
12999
  }
12983
13000
  function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
12984
- const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$43$ };
12985
- const _bind = zxch3n$flock$flock$$Flock$scan(self, undefined, undefined, new Option$Some$30$(key));
13001
+ const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$42$ };
13002
+ const _bind = zxch3n$flock$flock$$Flock$scan(self, undefined, undefined, new Option$Some$29$(key));
12986
13003
  _bind((k, v) => {
12987
13004
  let _foreach_error;
12988
13005
  _L: {
@@ -13002,7 +13019,7 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13002
13019
  }
13003
13020
  return 1;
13004
13021
  }
13005
- _foreach_result.val = new $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$43$(_foreach_error);
13022
+ _foreach_result.val = new $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$42$(_foreach_error);
13006
13023
  return 0;
13007
13024
  });
13008
13025
  const _tmp = _foreach_result.val;
@@ -13017,11 +13034,11 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13017
13034
  }
13018
13035
  case 2: {
13019
13036
  const _return = _tmp;
13020
- return new Result$Ok$33$(_return._0);
13037
+ return new Result$Ok$32$(_return._0);
13021
13038
  }
13022
13039
  case 3: {
13023
13040
  const _error = _tmp;
13024
- return new Result$Err$33$(_error._0);
13041
+ return new Result$Err$32$(_error._0);
13025
13042
  }
13026
13043
  default: {
13027
13044
  $panic();
@@ -13043,17 +13060,17 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13043
13060
  }
13044
13061
  break _L;
13045
13062
  }
13046
- return new Result$Err$33$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidValueForMvr(value));
13063
+ return new Result$Err$32$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidValueForMvr(value));
13047
13064
  }
13048
13065
  moonbitlang$core$array$$Array$push$14$(key$2, value);
13049
13066
  const _p = true;
13050
13067
  const _tmp$2 = _p ? $64$moonbitlang$47$core$47$builtin$46$Json$True : $64$moonbitlang$47$core$47$builtin$46$Json$False;
13051
- return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$34$, now, Option$None$35$);
13068
+ return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$33$, now, Option$None$34$);
13052
13069
  }
13053
13070
  function zxch3n$flock$flock$$Flock$get_mvr(self, key) {
13054
13071
  const ans = [];
13055
- let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$44$;
13056
- const _bind = zxch3n$flock$flock$$Flock$scan(self, undefined, undefined, new Option$Some$30$(key));
13072
+ let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$43$;
13073
+ const _bind = zxch3n$flock$flock$$Flock$scan(self, undefined, undefined, new Option$Some$29$(key));
13057
13074
  _bind((k, v) => {
13058
13075
  let _tmp;
13059
13076
  if (k.length !== (key.length + 1 | 0)) {
@@ -13100,7 +13117,7 @@ function zxch3n$flock$flock$$Flock$newFlock(peer_id) {
13100
13117
  const _bind$3 = zxch3n$flock$sorted_map$$SortedMap$new$80$();
13101
13118
  const _bind$4 = zxch3n$flock$flock$$SubscriberSet$new$81$();
13102
13119
  const _bind$5 = undefined;
13103
- return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$newFlock$46$42$bind$47$3574, vv: _bind, kv: _bind$2, updates: _bind$3, subscribers: _bind$4, digest: _bind$5 };
13120
+ return { peer_id: peer_id, max_hlc: zxch3n$flock$flock$$newFlock$46$42$bind$47$3584, vv: _bind, kv: _bind$2, updates: _bind$3, subscribers: _bind$4, digest: _bind$5 };
13104
13121
  }
13105
13122
  function zxch3n$flock$flock$$json_stringify_value(value) {
13106
13123
  return zxch3n$flock$flock$$ffi_json_stringify_value(value);
@@ -13174,7 +13191,7 @@ function zxch3n$flock$flock$$Flock$put_ffi(self, key, value, now) {
13174
13191
  }
13175
13192
  }
13176
13193
  const key_arr$2 = _p;
13177
- const _bind$4 = zxch3n$flock$flock$$Flock$put_inner(self, key_arr$2, value$2, Option$None$34$, new Option$Some$8$(now), Option$None$35$);
13194
+ const _bind$4 = zxch3n$flock$flock$$Flock$put_inner(self, key_arr$2, value$2, Option$None$33$, new Option$Some$8$(now), Option$None$34$);
13178
13195
  if (_bind$4.$tag === 1) {
13179
13196
  const _ok = _bind$4;
13180
13197
  _ok._0;
@@ -13269,8 +13286,8 @@ function zxch3n$flock$flock$$Flock$get_ffi(self, key) {
13269
13286
  const key_arr$2 = _p;
13270
13287
  const ans = zxch3n$flock$flock$$Flock$get(self, key_arr$2);
13271
13288
  if (ans === undefined) {
13272
- const _p$3 = Yoorkin$jmop$$Optional$undefined$4$();
13273
- return _p$3;
13289
+ const a = Yoorkin$jmop$$Optional$undefined$76$();
13290
+ return a;
13274
13291
  } else {
13275
13292
  const _Some = ans;
13276
13293
  const _value = _Some;
@@ -13335,7 +13352,7 @@ function zxch3n$flock$flock$$Flock$export_json_ffi(self, from) {
13335
13352
  if (zxch3n$flock$flock$$any_is_undefined(from) || zxch3n$flock$flock$$any_is_null(from)) {
13336
13353
  export_from = undefined;
13337
13354
  } else {
13338
- const _bind = Yoorkin$jmop$$Any$unwrap_value(from, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:75:32-75:51");
13355
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(from, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:78:32-78:51");
13339
13356
  let _tmp;
13340
13357
  if (_bind.$tag === 1) {
13341
13358
  const _ok = _bind;
@@ -13366,7 +13383,7 @@ function zxch3n$flock$flock$$Flock$import_json_ffi(self, json) {
13366
13383
  let _try_err;
13367
13384
  _L: {
13368
13385
  if (!(zxch3n$flock$flock$$any_is_undefined(json) || zxch3n$flock$flock$$any_is_null(json))) {
13369
- const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:92:32-92:51");
13386
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:95:32-95:51");
13370
13387
  let _tmp;
13371
13388
  if (_bind.$tag === 1) {
13372
13389
  const _ok = _bind;
@@ -13382,7 +13399,7 @@ function zxch3n$flock$flock$$Flock$import_json_ffi(self, json) {
13382
13399
  let _try_err$2;
13383
13400
  _L$2: {
13384
13401
  _L$3: {
13385
- const _bind$2 = zxch3n$flock$flock$$Flock$import_json(self, parsed, Option$None$41$);
13402
+ const _bind$2 = zxch3n$flock$flock$$Flock$import_json(self, parsed, Option$None$40$);
13386
13403
  if (_bind$2.$tag === 1) {
13387
13404
  const _ok = _bind$2;
13388
13405
  report = _ok._0;
@@ -13497,7 +13514,7 @@ function zxch3n$flock$flock$$bound_from_json(json) {
13497
13514
  }
13498
13515
  key = moonbitlang$core$abort$$abort$9$("bound.key must be an array");
13499
13516
  }
13500
- return kind === "inclusive" ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$30$(key) : kind === "exclusive" ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$30$(key) : kind === "unbounded" ? $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$ : moonbitlang$core$abort$$abort$10$("unexpected bound.kind");
13517
+ return kind === "inclusive" ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$29$(key) : kind === "exclusive" ? new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$29$(key) : kind === "unbounded" ? $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$ : moonbitlang$core$abort$$abort$10$("unexpected bound.kind");
13501
13518
  } else {
13502
13519
  return moonbitlang$core$abort$$abort$10$("bound must be an object");
13503
13520
  }
@@ -13511,7 +13528,7 @@ function zxch3n$flock$flock$$Flock$check_invariants_ffi(self) {
13511
13528
  function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13512
13529
  let _try_err;
13513
13530
  _L: {
13514
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:207:21-207:39");
13531
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:210:21-210:39");
13515
13532
  let key_value;
13516
13533
  if (_bind.$tag === 1) {
13517
13534
  const _ok = _bind;
@@ -13522,7 +13539,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13522
13539
  _try_err = _tmp;
13523
13540
  break _L;
13524
13541
  }
13525
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:208:40-208:60");
13542
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:211:40-211:60");
13526
13543
  let key_arr;
13527
13544
  if (_bind$2.$tag === 1) {
13528
13545
  const _ok = _bind$2;
@@ -13548,7 +13565,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13548
13565
  }
13549
13566
  }
13550
13567
  const key_json = _p;
13551
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:210:36-210:56");
13568
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:213:36-213:56");
13552
13569
  let _tmp$2;
13553
13570
  if (_bind$3.$tag === 1) {
13554
13571
  const _ok = _bind$3;
@@ -13564,7 +13581,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13564
13581
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13565
13582
  now_value = Option$None$8$;
13566
13583
  } else {
13567
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:214:12-214:30");
13584
+ const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:217:12-217:30");
13568
13585
  let _tmp$3;
13569
13586
  if (_bind$4.$tag === 1) {
13570
13587
  const _ok = _bind$4;
@@ -13575,7 +13592,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13575
13592
  _try_err = _tmp$4;
13576
13593
  break _L;
13577
13594
  }
13578
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:214:12-214:42");
13595
+ const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:217:12-217:42");
13579
13596
  let _tmp$4;
13580
13597
  if (_bind$5.$tag === 1) {
13581
13598
  const _ok = _bind$5;
@@ -13605,7 +13622,7 @@ function zxch3n$flock$flock$$Flock$put_json_ffi(self, key, value, now) {
13605
13622
  function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata, now) {
13606
13623
  let _try_err;
13607
13624
  _L: {
13608
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:229:21-229:39");
13625
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:232:21-232:39");
13609
13626
  let key_value;
13610
13627
  if (_bind.$tag === 1) {
13611
13628
  const _ok = _bind;
@@ -13616,7 +13633,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13616
13633
  _try_err = _tmp;
13617
13634
  break _L;
13618
13635
  }
13619
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:230:40-230:60");
13636
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:233:40-233:60");
13620
13637
  let key_arr;
13621
13638
  if (_bind$2.$tag === 1) {
13622
13639
  const _ok = _bind$2;
@@ -13642,7 +13659,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13642
13659
  }
13643
13660
  }
13644
13661
  const key_json = _p;
13645
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:232:36-232:56");
13662
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:235:36-235:56");
13646
13663
  let _tmp$2;
13647
13664
  if (_bind$3.$tag === 1) {
13648
13665
  const _ok = _bind$3;
@@ -13658,7 +13675,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13658
13675
  if (zxch3n$flock$flock$$any_is_undefined(metadata) || zxch3n$flock$flock$$any_is_null(metadata)) {
13659
13676
  metadata_value = undefined;
13660
13677
  } else {
13661
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(metadata, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:236:41-236:64");
13678
+ const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(metadata, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:239:41-239:64");
13662
13679
  let _tmp$3;
13663
13680
  if (_bind$4.$tag === 1) {
13664
13681
  const _ok = _bind$4;
@@ -13676,7 +13693,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13676
13693
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13677
13694
  now_value = Option$None$8$;
13678
13695
  } else {
13679
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:242:12-242:30");
13696
+ const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:245:12-245:30");
13680
13697
  let _tmp$3;
13681
13698
  if (_bind$4.$tag === 1) {
13682
13699
  const _ok = _bind$4;
@@ -13687,7 +13704,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13687
13704
  _try_err = _tmp$4;
13688
13705
  break _L;
13689
13706
  }
13690
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:242:12-242:42");
13707
+ const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:245:12-245:42");
13691
13708
  let _tmp$4;
13692
13709
  if (_bind$5.$tag === 1) {
13693
13710
  const _ok = _bind$5;
@@ -13701,7 +13718,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13701
13718
  now_value = new Option$Some$8$(_tmp$4);
13702
13719
  }
13703
13720
  if (metadata_value === undefined) {
13704
- const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, Option$None$34$, now_value, Option$None$35$);
13721
+ const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, Option$None$33$, now_value, Option$None$34$);
13705
13722
  if (_bind$4.$tag === 1) {
13706
13723
  const _ok = _bind$4;
13707
13724
  _ok._0;
@@ -13715,7 +13732,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13715
13732
  } else {
13716
13733
  const _Some = metadata_value;
13717
13734
  const _meta = _Some;
13718
- const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, new Option$Some$34$(_meta), now_value, Option$None$35$);
13735
+ const _bind$4 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, new Option$Some$33$(_meta), now_value, Option$None$34$);
13719
13736
  if (_bind$4.$tag === 1) {
13720
13737
  const _ok = _bind$4;
13721
13738
  _ok._0;
@@ -13733,7 +13750,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
13733
13750
  function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13734
13751
  let _try_err;
13735
13752
  _L: {
13736
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:260:21-260:39");
13753
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:267:21-267:39");
13737
13754
  let key_value;
13738
13755
  if (_bind.$tag === 1) {
13739
13756
  const _ok = _bind;
@@ -13744,7 +13761,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13744
13761
  _try_err = _tmp;
13745
13762
  break _L;
13746
13763
  }
13747
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:261:40-261:60");
13764
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:268:40-268:60");
13748
13765
  let key_arr;
13749
13766
  if (_bind$2.$tag === 1) {
13750
13767
  const _ok = _bind$2;
@@ -13774,7 +13791,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13774
13791
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
13775
13792
  now_value = Option$None$8$;
13776
13793
  } else {
13777
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:266:12-266:30");
13794
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:273:12-273:30");
13778
13795
  let _tmp$2;
13779
13796
  if (_bind$3.$tag === 1) {
13780
13797
  const _ok = _bind$3;
@@ -13785,7 +13802,7 @@ function zxch3n$flock$flock$$Flock$delete_ffi(self, key, now) {
13785
13802
  _try_err = _tmp$3;
13786
13803
  break _L;
13787
13804
  }
13788
- const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:266:12-266:42");
13805
+ const _bind$4 = Yoorkin$jmop$$Value$to_number(_tmp$2, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:273:12-273:42");
13789
13806
  let _tmp$3;
13790
13807
  if (_bind$4.$tag === 1) {
13791
13808
  const _ok = _bind$4;
@@ -13850,7 +13867,7 @@ function zxch3n$flock$flock$$FlockDigest$xor(self, digest) {
13850
13867
  }
13851
13868
  function zxch3n$flock$flock$$Flock$recompute_full_digest(self) {
13852
13869
  const sum = { val: zxch3n$flock$flock$$FlockDigest$zero() };
13853
- let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$45$;
13870
+ let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$44$;
13854
13871
  const _bind = zxch3n$flock$sorted_map$$SortedMap$iter2$74$(self.kv);
13855
13872
  _bind((__, entry) => {
13856
13873
  const _bind$2 = entry.value.data;
@@ -13951,7 +13968,7 @@ function zxch3n$flock$flock$$Flock$digest_hex_ffi(self) {
13951
13968
  function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
13952
13969
  let _try_err;
13953
13970
  _L: {
13954
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:300:21-300:39");
13971
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:307:21-307:39");
13955
13972
  let key_value;
13956
13973
  if (_bind.$tag === 1) {
13957
13974
  const _ok = _bind;
@@ -13962,7 +13979,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
13962
13979
  _try_err = _tmp;
13963
13980
  break _L;
13964
13981
  }
13965
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:301:40-301:60");
13982
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:308:40-308:60");
13966
13983
  let key_arr;
13967
13984
  if (_bind$2.$tag === 1) {
13968
13985
  const _ok = _bind$2;
@@ -13988,7 +14005,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
13988
14005
  }
13989
14006
  }
13990
14007
  const key_json = _p;
13991
- const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:303:36-303:56");
14008
+ const _bind$3 = Yoorkin$jmop$$Any$unwrap_value(value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:310:36-310:56");
13992
14009
  let _tmp$2;
13993
14010
  if (_bind$3.$tag === 1) {
13994
14011
  const _ok = _bind$3;
@@ -14004,7 +14021,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14004
14021
  if (zxch3n$flock$flock$$any_is_undefined(now) || zxch3n$flock$flock$$any_is_null(now)) {
14005
14022
  now_value = Option$None$8$;
14006
14023
  } else {
14007
- const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:307:12-307:30");
14024
+ const _bind$4 = Yoorkin$jmop$$Any$unwrap_value(now, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:314:12-314:30");
14008
14025
  let _tmp$3;
14009
14026
  if (_bind$4.$tag === 1) {
14010
14027
  const _ok = _bind$4;
@@ -14015,7 +14032,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14015
14032
  _try_err = _tmp$4;
14016
14033
  break _L;
14017
14034
  }
14018
- const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:307:12-307:42");
14035
+ const _bind$5 = Yoorkin$jmop$$Value$to_number(_tmp$3, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:314:12-314:42");
14019
14036
  let _tmp$4;
14020
14037
  if (_bind$5.$tag === 1) {
14021
14038
  const _ok = _bind$5;
@@ -14045,7 +14062,7 @@ function zxch3n$flock$flock$$Flock$put_mvr_ffi(self, key, value, now) {
14045
14062
  function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14046
14063
  let _try_err;
14047
14064
  _L: {
14048
- const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:316:21-316:39");
14065
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(key, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:323:21-323:39");
14049
14066
  let key_value;
14050
14067
  if (_bind.$tag === 1) {
14051
14068
  const _ok = _bind;
@@ -14056,7 +14073,7 @@ function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14056
14073
  _try_err = _tmp;
14057
14074
  break _L;
14058
14075
  }
14059
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:317:40-317:60");
14076
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(key_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:324:40-324:60");
14060
14077
  let key_arr;
14061
14078
  if (_bind$2.$tag === 1) {
14062
14079
  const _ok = _bind$2;
@@ -14091,7 +14108,7 @@ function zxch3n$flock$flock$$Flock$get_mvr_ffi(self, key) {
14091
14108
  function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14092
14109
  let _try_err;
14093
14110
  _L: {
14094
- const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:327:22-327:41");
14111
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(json, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:334:22-334:41");
14095
14112
  let json_value;
14096
14113
  if (_bind.$tag === 1) {
14097
14114
  const _ok = _bind;
@@ -14103,7 +14120,7 @@ function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14103
14120
  break _L;
14104
14121
  }
14105
14122
  const parsed = zxch3n$flock$flock$$value_to_json(json_value);
14106
- const _bind$2 = Yoorkin$jmop$$Any$unwrap_value(peer_id, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:329:22-329:44");
14123
+ const _bind$2 = Yoorkin$jmop$$Any$unwrap_value(peer_id, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:336:22-336:44");
14107
14124
  let peer_value;
14108
14125
  if (_bind$2.$tag === 1) {
14109
14126
  const _ok = _bind$2;
@@ -14114,7 +14131,7 @@ function zxch3n$flock$flock$$from_json_ffi(json, peer_id) {
14114
14131
  _try_err = _tmp;
14115
14132
  break _L;
14116
14133
  }
14117
- const _bind$3 = Yoorkin$jmop$$Value$to_string(peer_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:330:20-330:42");
14134
+ const _bind$3 = Yoorkin$jmop$$Value$to_string(peer_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:337:20-337:42");
14118
14135
  let peer_hex;
14119
14136
  if (_bind$3.$tag === 1) {
14120
14137
  const _ok = _bind$3;
@@ -14143,9 +14160,9 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14143
14160
  _L: {
14144
14161
  let start_bound;
14145
14162
  if (zxch3n$flock$flock$$any_is_undefined(start) || zxch3n$flock$flock$$any_is_null(start)) {
14146
- start_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
14163
+ start_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
14147
14164
  } else {
14148
- const _bind = Yoorkin$jmop$$Any$unwrap_value(start, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:346:25-346:45");
14165
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(start, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:353:25-353:45");
14149
14166
  let start_value;
14150
14167
  if (_bind.$tag === 1) {
14151
14168
  const _ok = _bind;
@@ -14160,9 +14177,9 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14160
14177
  }
14161
14178
  let end_bound;
14162
14179
  if (zxch3n$flock$flock$$any_is_undefined(end) || zxch3n$flock$flock$$any_is_null(end)) {
14163
- end_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$30$;
14180
+ end_bound = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$29$;
14164
14181
  } else {
14165
- const _bind = Yoorkin$jmop$$Any$unwrap_value(end, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:352:23-352:41");
14182
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(end, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:359:23-359:41");
14166
14183
  let end_value;
14167
14184
  if (_bind.$tag === 1) {
14168
14185
  const _ok = _bind;
@@ -14177,9 +14194,9 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14177
14194
  }
14178
14195
  let prefix_filter;
14179
14196
  if (zxch3n$flock$flock$$any_is_undefined(prefix) || zxch3n$flock$flock$$any_is_null(prefix)) {
14180
- prefix_filter = Option$None$30$;
14197
+ prefix_filter = Option$None$29$;
14181
14198
  } else {
14182
- const _bind = Yoorkin$jmop$$Any$unwrap_value(prefix, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:358:26-358:47");
14199
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(prefix, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:365:26-365:47");
14183
14200
  let prefix_value;
14184
14201
  if (_bind.$tag === 1) {
14185
14202
  const _ok = _bind;
@@ -14190,7 +14207,7 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14190
14207
  _try_err = _tmp;
14191
14208
  break _L;
14192
14209
  }
14193
- const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(prefix_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:359:45-359:68");
14210
+ const _bind$2 = Yoorkin$jmop$$Value$to_array$76$(prefix_value, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:366:45-366:68");
14194
14211
  let prefix_arr;
14195
14212
  if (_bind$2.$tag === 1) {
14196
14213
  const _ok = _bind$2;
@@ -14215,16 +14232,16 @@ function zxch3n$flock$flock$$Flock$scan_ffi(self, start, end, prefix) {
14215
14232
  break;
14216
14233
  }
14217
14234
  }
14218
- prefix_filter = new Option$Some$30$(_p);
14235
+ prefix_filter = new Option$Some$29$(_p);
14219
14236
  }
14220
14237
  const rows = moonbitlang$core$array$$Array$new$46$inner$14$(0);
14221
14238
  let scan_iter;
14222
14239
  if (prefix_filter.$tag === 1) {
14223
14240
  const _Some = prefix_filter;
14224
14241
  const _prefix_value = _Some._0;
14225
- scan_iter = zxch3n$flock$flock$$Flock$scan$46$inner(self, start_bound, end_bound, new Option$Some$30$(_prefix_value));
14242
+ scan_iter = zxch3n$flock$flock$$Flock$scan$46$inner(self, start_bound, end_bound, new Option$Some$29$(_prefix_value));
14226
14243
  } else {
14227
- scan_iter = zxch3n$flock$flock$$Flock$scan$46$inner(self, start_bound, end_bound, Option$None$30$);
14244
+ scan_iter = zxch3n$flock$flock$$Flock$scan$46$inner(self, start_bound, end_bound, Option$None$29$);
14228
14245
  }
14229
14246
  moonbitlang$core$builtin$$Iter2$run$73$(scan_iter, (key, entry) => {
14230
14247
  const obj = moonbitlang$core$builtin$$Map$new$46$inner$37$(8);
@@ -14286,7 +14303,7 @@ function zxch3n$flock$flock$$raw_value_payload_to_json(value) {
14286
14303
  function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
14287
14304
  let _try_err;
14288
14305
  _L: {
14289
- const _bind = Yoorkin$jmop$$Any$unwrap_value(listener, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:408:26-408:49");
14306
+ const _bind = Yoorkin$jmop$$Any$unwrap_value(listener, "/home/runner/work/flock/flock/moon/flock/ffi-js.mbt:415:26-415:49");
14290
14307
  let listener_value;
14291
14308
  if (_bind.$tag === 1) {
14292
14309
  const _ok = _bind;