@lat-murmeldjur/weeb_3 0.0.332001 → 0.0.334001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/service.js +224 -23
- package/weeb_3.d.ts +6 -5
- package/weeb_3.js +60 -25
- package/weeb_3_bg.wasm +0 -0
- package/weeb_3_bg.wasm.d.ts +6 -5
package/package.json
CHANGED
package/service.js
CHANGED
|
@@ -10,10 +10,14 @@ const RAW_ROUTE_KINDS = [
|
|
|
10
10
|
];
|
|
11
11
|
const FETCH_TIMEOUT_MS = 240000;
|
|
12
12
|
const SERVICE_WORKER_MARKER = "forwarder-default20";
|
|
13
|
-
const SERVICE_WORKER_PROTOCOL =
|
|
13
|
+
const SERVICE_WORKER_PROTOCOL = 8;
|
|
14
14
|
const MIB_BYTES = 1024 * 1024;
|
|
15
15
|
const STREAM_STORAGE_WINDOW_BYTES = MIB_BYTES / 2;
|
|
16
16
|
const STREAM_LOOKAHEAD_CHUNKS = 8;
|
|
17
|
+
const HLS_STREAM_LOOKAHEAD_CHUNKS = 4;
|
|
18
|
+
const HLS_STREAM_READY_ADMISSION_THRESHOLD = HLS_STREAM_LOOKAHEAD_CHUNKS - 1;
|
|
19
|
+
const HLS_STREAM_MAX_OUTSTANDING =
|
|
20
|
+
HLS_STREAM_LOOKAHEAD_CHUNKS + HLS_STREAM_READY_ADMISSION_THRESHOLD - 1;
|
|
17
21
|
const HLS_REQUEST_FLIGHTS = new Map();
|
|
18
22
|
const CLIENT_RUNTIME_PROBES = new Map();
|
|
19
23
|
const CLIENT_RUNTIME_PROBE_TIMEOUT_MS = 1_500;
|
|
@@ -604,13 +608,14 @@ function responseHeaders(headerRows) {
|
|
|
604
608
|
return headers;
|
|
605
609
|
}
|
|
606
610
|
|
|
607
|
-
function requestRustRange(clients, url, start, end, networkId) {
|
|
611
|
+
function requestRustRange(clients, url, start, end, networkId, streamToken = "") {
|
|
608
612
|
return messageFirstClient(clients, {
|
|
609
613
|
type: "WEEB3_FETCH_REQUEST",
|
|
610
614
|
url,
|
|
611
615
|
method: "GET",
|
|
612
616
|
range: `bytes=${start}-${end}`,
|
|
613
|
-
networkId
|
|
617
|
+
networkId,
|
|
618
|
+
streamToken
|
|
614
619
|
}).then((response) => {
|
|
615
620
|
if (!response || !response.ok) {
|
|
616
621
|
return response || { ok: false, status: 503, error: "empty weeb-3 range response" };
|
|
@@ -630,56 +635,237 @@ function requestRustRange(clients, url, start, end, networkId) {
|
|
|
630
635
|
});
|
|
631
636
|
}
|
|
632
637
|
|
|
633
|
-
function
|
|
638
|
+
function parseCriticalPrefixWindows(value, size) {
|
|
639
|
+
if (!/^[1-9][0-9]*$/.test(value || "") || !Number.isSafeInteger(size) || size <= 0) {
|
|
640
|
+
return null;
|
|
641
|
+
}
|
|
642
|
+
const requested = Number(value);
|
|
643
|
+
const total = Math.ceil(size / STREAM_STORAGE_WINDOW_BYTES);
|
|
644
|
+
return Number.isSafeInteger(requested) && requested > 0
|
|
645
|
+
? Math.min(requested, total)
|
|
646
|
+
: null;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
function createRustRangeStream(
|
|
650
|
+
clients,
|
|
651
|
+
url,
|
|
652
|
+
size,
|
|
653
|
+
networkId,
|
|
654
|
+
stagedStart,
|
|
655
|
+
streamToken = "",
|
|
656
|
+
criticalPrefixWindows = null
|
|
657
|
+
) {
|
|
634
658
|
let position = 0;
|
|
635
659
|
let schedulePosition = 0;
|
|
636
|
-
|
|
660
|
+
const lookahead = stagedStart ? HLS_STREAM_LOOKAHEAD_CHUNKS : STREAM_LOOKAHEAD_CHUNKS;
|
|
661
|
+
const managedPrefixEnd = stagedStart && Number.isSafeInteger(criticalPrefixWindows)
|
|
662
|
+
? Math.min(size, criticalPrefixWindows * STREAM_STORAGE_WINDOW_BYTES)
|
|
663
|
+
: 0;
|
|
664
|
+
let schedulingAdmissionOpen = true;
|
|
665
|
+
let lookaheadAdmitted = !stagedStart;
|
|
666
|
+
let knownRangeFailure = false;
|
|
637
667
|
const scheduled = new Map();
|
|
668
|
+
const activeRequests = new Map();
|
|
669
|
+
const retainedResponses = new Map();
|
|
670
|
+
|
|
671
|
+
const nextRangeBounds = () => {
|
|
672
|
+
if (!schedulingAdmissionOpen || schedulePosition >= size) {
|
|
673
|
+
return null;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
const start = schedulePosition;
|
|
677
|
+
const end = Math.min(start + STREAM_STORAGE_WINDOW_BYTES - 1, size - 1);
|
|
678
|
+
schedulePosition = end + 1;
|
|
679
|
+
return { start, end };
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
const admitOrdinaryRange = () => {
|
|
683
|
+
const range = nextRangeBounds();
|
|
684
|
+
if (!range) {
|
|
685
|
+
return null;
|
|
686
|
+
}
|
|
687
|
+
const { start, end } = range;
|
|
688
|
+
const request = requestRustRange(clients, url, start, end, networkId, streamToken);
|
|
689
|
+
scheduled.set(start, request);
|
|
690
|
+
return { start, request };
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
const admitStagedRange = () => {
|
|
694
|
+
const range = nextRangeBounds();
|
|
695
|
+
if (!range) {
|
|
696
|
+
return null;
|
|
697
|
+
}
|
|
698
|
+
const { start, end } = range;
|
|
699
|
+
const pending = requestRustRange(clients, url, start, end, networkId, streamToken);
|
|
700
|
+
let request;
|
|
701
|
+
request = pending.then(
|
|
702
|
+
(response) => {
|
|
703
|
+
activeRequests.delete(start);
|
|
704
|
+
const result = { response };
|
|
705
|
+
retainedResponses.set(start, result);
|
|
706
|
+
if (!response || !response.ok) {
|
|
707
|
+
knownRangeFailure = true;
|
|
708
|
+
} else if (schedulingAdmissionOpen && position >= managedPrefixEnd) {
|
|
709
|
+
scheduleMore();
|
|
710
|
+
}
|
|
711
|
+
return result;
|
|
712
|
+
},
|
|
713
|
+
(error) => {
|
|
714
|
+
activeRequests.delete(start);
|
|
715
|
+
const result = { error };
|
|
716
|
+
retainedResponses.set(start, result);
|
|
717
|
+
knownRangeFailure = true;
|
|
718
|
+
return result;
|
|
719
|
+
}
|
|
720
|
+
);
|
|
721
|
+
activeRequests.set(start, request);
|
|
722
|
+
return { start, request };
|
|
723
|
+
};
|
|
638
724
|
|
|
639
725
|
const scheduleMore = () => {
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
schedulePosition
|
|
726
|
+
if (!schedulingAdmissionOpen || !lookaheadAdmitted || knownRangeFailure) {
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
if (!stagedStart) {
|
|
731
|
+
while (schedulePosition < size && scheduled.size < lookahead) {
|
|
732
|
+
if (!admitOrdinaryRange()) {
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
if (position < managedPrefixEnd) {
|
|
740
|
+
if (activeRequests.size + retainedResponses.size < 1) {
|
|
741
|
+
admitStagedRange();
|
|
742
|
+
}
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
while (
|
|
747
|
+
schedulePosition < size
|
|
748
|
+
&& activeRequests.size < HLS_STREAM_LOOKAHEAD_CHUNKS
|
|
749
|
+
&& retainedResponses.size < HLS_STREAM_READY_ADMISSION_THRESHOLD
|
|
750
|
+
&& activeRequests.size + retainedResponses.size < HLS_STREAM_MAX_OUTSTANDING
|
|
751
|
+
) {
|
|
752
|
+
if (!admitStagedRange()) {
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
const drainScheduledRanges = () => {
|
|
759
|
+
const dispatched = stagedStart
|
|
760
|
+
? Array.from(activeRequests.values())
|
|
761
|
+
: Array.from(scheduled.values());
|
|
762
|
+
return Promise.allSettled(dispatched).then(() => {
|
|
763
|
+
activeRequests.clear();
|
|
764
|
+
retainedResponses.clear();
|
|
765
|
+
scheduled.clear();
|
|
766
|
+
});
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
const closeAdmission = () => {
|
|
770
|
+
schedulingAdmissionOpen = false;
|
|
771
|
+
lookaheadAdmitted = false;
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
const failStream = async (controller, error) => {
|
|
775
|
+
if (!schedulingAdmissionOpen) {
|
|
776
|
+
return;
|
|
646
777
|
}
|
|
778
|
+
closeAdmission();
|
|
779
|
+
controller.error(error);
|
|
780
|
+
await drainScheduledRanges();
|
|
647
781
|
};
|
|
648
782
|
|
|
649
783
|
return new ReadableStream({
|
|
650
784
|
async pull(controller) {
|
|
651
785
|
try {
|
|
652
786
|
if (position >= size) {
|
|
787
|
+
closeAdmission();
|
|
653
788
|
controller.close();
|
|
789
|
+
await drainScheduledRanges();
|
|
654
790
|
return;
|
|
655
791
|
}
|
|
656
792
|
|
|
657
|
-
|
|
793
|
+
if (lookaheadAdmitted) {
|
|
794
|
+
scheduleMore();
|
|
795
|
+
}
|
|
658
796
|
const start = Math.floor(position / STREAM_STORAGE_WINDOW_BYTES) * STREAM_STORAGE_WINDOW_BYTES;
|
|
659
|
-
|
|
660
|
-
if (
|
|
661
|
-
|
|
662
|
-
|
|
797
|
+
let response;
|
|
798
|
+
if (stagedStart) {
|
|
799
|
+
let result = retainedResponses.get(start);
|
|
800
|
+
if (!result) {
|
|
801
|
+
let request = activeRequests.get(start);
|
|
802
|
+
if (!request) {
|
|
803
|
+
const foreground = admitStagedRange();
|
|
804
|
+
if (!foreground || foreground.start !== start) {
|
|
805
|
+
await failStream(
|
|
806
|
+
controller,
|
|
807
|
+
new Error("weeb-3 foreground stream window was not admitted")
|
|
808
|
+
);
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
request = foreground.request;
|
|
812
|
+
}
|
|
813
|
+
result = await request;
|
|
814
|
+
}
|
|
815
|
+
retainedResponses.delete(start);
|
|
816
|
+
if (!schedulingAdmissionOpen) {
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
if (result.error) {
|
|
820
|
+
await failStream(
|
|
821
|
+
controller,
|
|
822
|
+
result.error instanceof Error ? result.error : new Error(String(result.error))
|
|
823
|
+
);
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
response = result.response;
|
|
827
|
+
} else {
|
|
828
|
+
let request = scheduled.get(start);
|
|
829
|
+
if (!request) {
|
|
830
|
+
const foreground = admitOrdinaryRange();
|
|
831
|
+
if (!foreground || foreground.start !== start) {
|
|
832
|
+
await failStream(
|
|
833
|
+
controller,
|
|
834
|
+
new Error("weeb-3 foreground stream window was not admitted")
|
|
835
|
+
);
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
request = foreground.request;
|
|
839
|
+
}
|
|
840
|
+
response = await request;
|
|
841
|
+
scheduled.delete(start);
|
|
663
842
|
}
|
|
664
843
|
|
|
665
|
-
|
|
666
|
-
|
|
844
|
+
if (!schedulingAdmissionOpen) {
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
667
847
|
if (!response || !response.ok) {
|
|
668
|
-
|
|
848
|
+
await failStream(
|
|
849
|
+
controller,
|
|
850
|
+
new Error(response && response.error ? response.error : "weeb-3 range request failed")
|
|
851
|
+
);
|
|
669
852
|
return;
|
|
670
853
|
}
|
|
671
854
|
|
|
672
855
|
const body = toUint8Array(response.body);
|
|
673
856
|
position = start + body.byteLength;
|
|
674
857
|
controller.enqueue(body);
|
|
675
|
-
|
|
858
|
+
lookaheadAdmitted = true;
|
|
676
859
|
scheduleMore();
|
|
677
860
|
} catch (error) {
|
|
678
|
-
|
|
861
|
+
if (schedulingAdmissionOpen) {
|
|
862
|
+
await failStream(controller, error);
|
|
863
|
+
}
|
|
679
864
|
}
|
|
680
865
|
},
|
|
681
866
|
cancel() {
|
|
682
|
-
|
|
867
|
+
closeAdmission();
|
|
868
|
+
return drainScheduledRanges();
|
|
683
869
|
}
|
|
684
870
|
});
|
|
685
871
|
}
|
|
@@ -715,7 +901,22 @@ async function forwardRequestToRust(request, event) {
|
|
|
715
901
|
if (response.stream && request.method !== "HEAD") {
|
|
716
902
|
const size = Number(headers.get("Content-Length") || "0");
|
|
717
903
|
const stagedStart = headers.get("X-Weeb3-Stream-Start") === "1";
|
|
718
|
-
|
|
904
|
+
const streamToken = headers.get("X-Weeb3-Stream-Token") || "";
|
|
905
|
+
const criticalPrefixWindows = stagedStart
|
|
906
|
+
? parseCriticalPrefixWindows(
|
|
907
|
+
headers.get("X-Weeb3-HLS-Critical-Prefix-Windows"),
|
|
908
|
+
size
|
|
909
|
+
)
|
|
910
|
+
: null;
|
|
911
|
+
return new Response(createRustRangeStream(
|
|
912
|
+
clients,
|
|
913
|
+
request.url,
|
|
914
|
+
size,
|
|
915
|
+
networkId,
|
|
916
|
+
stagedStart,
|
|
917
|
+
streamToken,
|
|
918
|
+
criticalPrefixWindows
|
|
919
|
+
), {
|
|
719
920
|
status,
|
|
720
921
|
headers
|
|
721
922
|
});
|
package/weeb_3.d.ts
CHANGED
|
@@ -84,11 +84,12 @@ export interface InitOutput {
|
|
|
84
84
|
readonly __wbg_requestarguments_free: (a: number, b: number) => void;
|
|
85
85
|
readonly requestarguments_method: (a: number, b: number) => void;
|
|
86
86
|
readonly requestarguments_params: (a: number) => number;
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
87
|
+
readonly __wasm_bindgen_func_elem_649: (a: number, b: number) => void;
|
|
88
|
+
readonly __wasm_bindgen_func_elem_1753: (a: number, b: number, c: number, d: number) => void;
|
|
89
|
+
readonly __wasm_bindgen_func_elem_1755: (a: number, b: number, c: number, d: number) => void;
|
|
90
|
+
readonly __wasm_bindgen_func_elem_4088: (a: number, b: number, c: number) => void;
|
|
91
|
+
readonly __wasm_bindgen_func_elem_1758: (a: number, b: number) => number;
|
|
92
|
+
readonly __wasm_bindgen_func_elem_4014: (a: number, b: number) => void;
|
|
92
93
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
93
94
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
94
95
|
readonly __wbindgen_export3: (a: number) => void;
|
package/weeb_3.js
CHANGED
|
@@ -619,6 +619,10 @@ function __wbg_get_imports() {
|
|
|
619
619
|
const ret = decodeURIComponent(getStringFromWasm0(arg0, arg1));
|
|
620
620
|
return addHeapObject(ret);
|
|
621
621
|
}, arguments); },
|
|
622
|
+
__wbg_deleteProperty_8c8a05da881fea59: function() { return handleError(function (arg0, arg1) {
|
|
623
|
+
const ret = Reflect.deleteProperty(getObject(arg0), getObject(arg1));
|
|
624
|
+
return ret;
|
|
625
|
+
}, arguments); },
|
|
622
626
|
__wbg_destroy_91b983e1d85d5306: function() { return handleError(function (arg0) {
|
|
623
627
|
getObject(arg0).destroy();
|
|
624
628
|
}, arguments); },
|
|
@@ -634,6 +638,10 @@ function __wbg_get_imports() {
|
|
|
634
638
|
const ret = getObject(arg0).done;
|
|
635
639
|
return ret;
|
|
636
640
|
},
|
|
641
|
+
__wbg_duration_56d63063c1dcc6d7: function(arg0) {
|
|
642
|
+
const ret = getObject(arg0).duration;
|
|
643
|
+
return ret;
|
|
644
|
+
},
|
|
637
645
|
__wbg_encodeURIComponent_46e9eafddd38cb39: function(arg0, arg1) {
|
|
638
646
|
const ret = encodeURIComponent(getStringFromWasm0(arg0, arg1));
|
|
639
647
|
return addHeapObject(ret);
|
|
@@ -1049,6 +1057,10 @@ function __wbg_get_imports() {
|
|
|
1049
1057
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1050
1058
|
return ret;
|
|
1051
1059
|
},
|
|
1060
|
+
__wbg_is_f29129f676e5410c: function(arg0, arg1) {
|
|
1061
|
+
const ret = Object.is(getObject(arg0), getObject(arg1));
|
|
1062
|
+
return ret;
|
|
1063
|
+
},
|
|
1052
1064
|
__wbg_item_c79c0bccbcfd8735: function(arg0, arg1) {
|
|
1053
1065
|
const ret = getObject(arg0).item(arg1 >>> 0);
|
|
1054
1066
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
@@ -1182,7 +1194,7 @@ function __wbg_get_imports() {
|
|
|
1182
1194
|
const a = state0.a;
|
|
1183
1195
|
state0.a = 0;
|
|
1184
1196
|
try {
|
|
1185
|
-
return
|
|
1197
|
+
return __wasm_bindgen_func_elem_1753(a, state0.b, arg0, arg1);
|
|
1186
1198
|
} finally {
|
|
1187
1199
|
state0.a = a;
|
|
1188
1200
|
}
|
|
@@ -1305,6 +1317,10 @@ function __wbg_get_imports() {
|
|
|
1305
1317
|
const ret = getObject(arg0).parentNode;
|
|
1306
1318
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1307
1319
|
},
|
|
1320
|
+
__wbg_parse_708461a1feddfb38: function() { return handleError(function (arg0, arg1) {
|
|
1321
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1322
|
+
return addHeapObject(ret);
|
|
1323
|
+
}, arguments); },
|
|
1308
1324
|
__wbg_pathname_b2267fae358b49a7: function() { return handleError(function (arg0, arg1) {
|
|
1309
1325
|
const ret = getObject(arg1).pathname;
|
|
1310
1326
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -1406,6 +1422,9 @@ function __wbg_get_imports() {
|
|
|
1406
1422
|
const ret = getObject(arg0).register(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
1407
1423
|
return addHeapObject(ret);
|
|
1408
1424
|
},
|
|
1425
|
+
__wbg_reload_c8ca3f3b07f9e534: function() { return handleError(function (arg0) {
|
|
1426
|
+
getObject(arg0).reload();
|
|
1427
|
+
}, arguments); },
|
|
1409
1428
|
__wbg_removeAttribute_87259aab06d9f286: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1410
1429
|
getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2));
|
|
1411
1430
|
}, arguments); },
|
|
@@ -1506,6 +1525,9 @@ function __wbg_get_imports() {
|
|
|
1506
1525
|
__wbg_set_auto_increment_5ef604f4f193fa58: function(arg0, arg1) {
|
|
1507
1526
|
getObject(arg0).autoIncrement = arg1 !== 0;
|
|
1508
1527
|
},
|
|
1528
|
+
__wbg_set_autoplay_a63d23ab32fd1826: function(arg0, arg1) {
|
|
1529
|
+
getObject(arg0).autoplay = arg1 !== 0;
|
|
1530
|
+
},
|
|
1509
1531
|
__wbg_set_binaryType_5bbf62e9f705dc1a: function(arg0, arg1) {
|
|
1510
1532
|
getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
1511
1533
|
},
|
|
@@ -1593,6 +1615,9 @@ function __wbg_get_imports() {
|
|
|
1593
1615
|
__wbg_set_onupgradeneeded_c887b74722b6ce77: function(arg0, arg1) {
|
|
1594
1616
|
getObject(arg0).onupgradeneeded = getObject(arg1);
|
|
1595
1617
|
},
|
|
1618
|
+
__wbg_set_preload_8046ead18b4d246a: function(arg0, arg1, arg2) {
|
|
1619
|
+
getObject(arg0).preload = getStringFromWasm0(arg1, arg2);
|
|
1620
|
+
},
|
|
1596
1621
|
__wbg_set_scope_c18e6f8045aa3843: function(arg0, arg1, arg2) {
|
|
1597
1622
|
getObject(arg0).scope = getStringFromWasm0(arg1, arg2);
|
|
1598
1623
|
},
|
|
@@ -1762,66 +1787,71 @@ function __wbg_get_imports() {
|
|
|
1762
1787
|
console.warn(getObject(arg0));
|
|
1763
1788
|
},
|
|
1764
1789
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1765
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [Externref, Externref], shim_idx:
|
|
1766
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1790
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [Externref, Externref], shim_idx: 22, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1791
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_649, __wasm_bindgen_func_elem_1753);
|
|
1767
1792
|
return addHeapObject(ret);
|
|
1768
1793
|
},
|
|
1769
1794
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1770
1795
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [Externref], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1771
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1796
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_649, __wasm_bindgen_func_elem_4088);
|
|
1772
1797
|
return addHeapObject(ret);
|
|
1773
1798
|
},
|
|
1774
1799
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1775
1800
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1776
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1801
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_649, __wasm_bindgen_func_elem_4088);
|
|
1777
1802
|
return addHeapObject(ret);
|
|
1778
1803
|
},
|
|
1779
1804
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1780
1805
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [NamedExternref("Event")], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1781
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1806
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_649, __wasm_bindgen_func_elem_4088);
|
|
1782
1807
|
return addHeapObject(ret);
|
|
1783
1808
|
},
|
|
1784
1809
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
1785
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx:
|
|
1786
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1810
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 24, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1811
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_649, __wasm_bindgen_func_elem_1755);
|
|
1787
1812
|
return addHeapObject(ret);
|
|
1788
1813
|
},
|
|
1789
1814
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
1790
1815
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1791
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1816
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_649, __wasm_bindgen_func_elem_4088);
|
|
1792
1817
|
return addHeapObject(ret);
|
|
1793
1818
|
},
|
|
1794
1819
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
1795
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [], shim_idx:
|
|
1796
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1820
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [], shim_idx: 101, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1821
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_649, __wasm_bindgen_func_elem_4014);
|
|
1822
|
+
return addHeapObject(ret);
|
|
1823
|
+
},
|
|
1824
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
1825
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 3, function: Function { arguments: [], shim_idx: 26, ret: Externref, inner_ret: Some(Externref) }, mutable: true }) -> Externref`.
|
|
1826
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_649, __wasm_bindgen_func_elem_1758);
|
|
1797
1827
|
return addHeapObject(ret);
|
|
1798
1828
|
},
|
|
1799
|
-
|
|
1829
|
+
__wbindgen_cast_0000000000000009: function(arg0) {
|
|
1800
1830
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1801
1831
|
const ret = arg0;
|
|
1802
1832
|
return addHeapObject(ret);
|
|
1803
1833
|
},
|
|
1804
|
-
|
|
1834
|
+
__wbindgen_cast_000000000000000a: function(arg0) {
|
|
1805
1835
|
// Cast intrinsic for `I64 -> Externref`.
|
|
1806
1836
|
const ret = arg0;
|
|
1807
1837
|
return addHeapObject(ret);
|
|
1808
1838
|
},
|
|
1809
|
-
|
|
1839
|
+
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
1810
1840
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1811
1841
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1812
1842
|
return addHeapObject(ret);
|
|
1813
1843
|
},
|
|
1814
|
-
|
|
1844
|
+
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
1815
1845
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1816
1846
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1817
1847
|
return addHeapObject(ret);
|
|
1818
1848
|
},
|
|
1819
|
-
|
|
1849
|
+
__wbindgen_cast_000000000000000d: function(arg0) {
|
|
1820
1850
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1821
1851
|
const ret = BigInt.asUintN(64, arg0);
|
|
1822
1852
|
return addHeapObject(ret);
|
|
1823
1853
|
},
|
|
1824
|
-
|
|
1854
|
+
__wbindgen_cast_000000000000000e: function(arg0, arg1) {
|
|
1825
1855
|
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
1826
1856
|
wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
|
|
1827
1857
|
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
@@ -1846,22 +1876,27 @@ function __wbg_get_imports() {
|
|
|
1846
1876
|
};
|
|
1847
1877
|
}
|
|
1848
1878
|
|
|
1849
|
-
function
|
|
1850
|
-
wasm.
|
|
1879
|
+
function __wasm_bindgen_func_elem_4014(arg0, arg1) {
|
|
1880
|
+
wasm.__wasm_bindgen_func_elem_4014(arg0, arg1);
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
function __wasm_bindgen_func_elem_1758(arg0, arg1) {
|
|
1884
|
+
const ret = wasm.__wasm_bindgen_func_elem_1758(arg0, arg1);
|
|
1885
|
+
return takeObject(ret);
|
|
1851
1886
|
}
|
|
1852
1887
|
|
|
1853
|
-
function
|
|
1854
|
-
wasm.
|
|
1888
|
+
function __wasm_bindgen_func_elem_4088(arg0, arg1, arg2) {
|
|
1889
|
+
wasm.__wasm_bindgen_func_elem_4088(arg0, arg1, addHeapObject(arg2));
|
|
1855
1890
|
}
|
|
1856
1891
|
|
|
1857
|
-
function
|
|
1858
|
-
wasm.
|
|
1892
|
+
function __wasm_bindgen_func_elem_1753(arg0, arg1, arg2, arg3) {
|
|
1893
|
+
wasm.__wasm_bindgen_func_elem_1753(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1859
1894
|
}
|
|
1860
1895
|
|
|
1861
|
-
function
|
|
1896
|
+
function __wasm_bindgen_func_elem_1755(arg0, arg1, arg2) {
|
|
1862
1897
|
try {
|
|
1863
1898
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1864
|
-
wasm.
|
|
1899
|
+
wasm.__wasm_bindgen_func_elem_1755(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1865
1900
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1866
1901
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1867
1902
|
if (r1) {
|
package/weeb_3_bg.wasm
CHANGED
|
Binary file
|
package/weeb_3_bg.wasm.d.ts
CHANGED
|
@@ -32,11 +32,12 @@ export const weeb3no103_uploadWithRedundancy: (a: number, b: number, c: number,
|
|
|
32
32
|
export const __wbg_requestarguments_free: (a: number, b: number) => void;
|
|
33
33
|
export const requestarguments_method: (a: number, b: number) => void;
|
|
34
34
|
export const requestarguments_params: (a: number) => number;
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
35
|
+
export const __wasm_bindgen_func_elem_649: (a: number, b: number) => void;
|
|
36
|
+
export const __wasm_bindgen_func_elem_1753: (a: number, b: number, c: number, d: number) => void;
|
|
37
|
+
export const __wasm_bindgen_func_elem_1755: (a: number, b: number, c: number, d: number) => void;
|
|
38
|
+
export const __wasm_bindgen_func_elem_4088: (a: number, b: number, c: number) => void;
|
|
39
|
+
export const __wasm_bindgen_func_elem_1758: (a: number, b: number) => number;
|
|
40
|
+
export const __wasm_bindgen_func_elem_4014: (a: number, b: number) => void;
|
|
40
41
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
41
42
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
42
43
|
export const __wbindgen_export3: (a: number) => void;
|