lebai_sdk 0.1.3 → 0.1.4
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/lebai_sdk_bg.js +35 -35
- package/lebai_sdk_bg.wasm +0 -0
- package/package.json +1 -1
package/lebai_sdk_bg.js
CHANGED
@@ -1,25 +1,30 @@
|
|
1
1
|
import * as wasm from './lebai_sdk_bg.wasm';
|
2
2
|
|
3
|
-
const
|
3
|
+
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
4
4
|
|
5
|
-
|
5
|
+
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
6
6
|
|
7
|
-
|
7
|
+
cachedTextDecoder.decode();
|
8
8
|
|
9
|
-
let
|
9
|
+
let cachedUint8Memory0 = new Uint8Array();
|
10
10
|
|
11
|
-
function
|
12
|
-
if (
|
13
|
-
|
14
|
-
|
11
|
+
function getUint8Memory0() {
|
12
|
+
if (cachedUint8Memory0.byteLength === 0) {
|
13
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
14
|
+
}
|
15
|
+
return cachedUint8Memory0;
|
15
16
|
}
|
16
17
|
|
17
|
-
function
|
18
|
-
|
19
|
-
dropObject(idx);
|
20
|
-
return ret;
|
18
|
+
function getStringFromWasm0(ptr, len) {
|
19
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
21
20
|
}
|
22
21
|
|
22
|
+
const heap = new Array(32).fill(undefined);
|
23
|
+
|
24
|
+
heap.push(undefined, null, true, false);
|
25
|
+
|
26
|
+
let heap_next = heap.length;
|
27
|
+
|
23
28
|
function addHeapObject(obj) {
|
24
29
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
25
30
|
const idx = heap_next;
|
@@ -29,23 +34,18 @@ function addHeapObject(obj) {
|
|
29
34
|
return idx;
|
30
35
|
}
|
31
36
|
|
32
|
-
|
33
|
-
|
34
|
-
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
35
|
-
|
36
|
-
cachedTextDecoder.decode();
|
37
|
-
|
38
|
-
let cachedUint8Memory0 = new Uint8Array();
|
37
|
+
function getObject(idx) { return heap[idx]; }
|
39
38
|
|
40
|
-
function
|
41
|
-
if (
|
42
|
-
|
43
|
-
|
44
|
-
return cachedUint8Memory0;
|
39
|
+
function dropObject(idx) {
|
40
|
+
if (idx < 36) return;
|
41
|
+
heap[idx] = heap_next;
|
42
|
+
heap_next = idx;
|
45
43
|
}
|
46
44
|
|
47
|
-
function
|
48
|
-
|
45
|
+
function takeObject(idx) {
|
46
|
+
const ret = getObject(idx);
|
47
|
+
dropObject(idx);
|
48
|
+
return ret;
|
49
49
|
}
|
50
50
|
|
51
51
|
let WASM_VECTOR_LEN = 0;
|
@@ -978,6 +978,11 @@ export class RobotSubscription {
|
|
978
978
|
}
|
979
979
|
}
|
980
980
|
|
981
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
982
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
983
|
+
return addHeapObject(ret);
|
984
|
+
};
|
985
|
+
|
981
986
|
export function __wbindgen_object_drop_ref(arg0) {
|
982
987
|
takeObject(arg0);
|
983
988
|
};
|
@@ -987,18 +992,13 @@ export function __wbindgen_number_new(arg0) {
|
|
987
992
|
return addHeapObject(ret);
|
988
993
|
};
|
989
994
|
|
990
|
-
export function
|
991
|
-
const ret =
|
992
|
-
return addHeapObject(ret);
|
993
|
-
};
|
994
|
-
|
995
|
-
export function __wbindgen_string_new(arg0, arg1) {
|
996
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
995
|
+
export function __wbg_robot_new(arg0) {
|
996
|
+
const ret = Robot.__wrap(arg0);
|
997
997
|
return addHeapObject(ret);
|
998
998
|
};
|
999
999
|
|
1000
|
-
export function
|
1001
|
-
const ret =
|
1000
|
+
export function __wbg_robotsubscription_new(arg0) {
|
1001
|
+
const ret = RobotSubscription.__wrap(arg0);
|
1002
1002
|
return addHeapObject(ret);
|
1003
1003
|
};
|
1004
1004
|
|
package/lebai_sdk_bg.wasm
CHANGED
Binary file
|