@senlinz/import-export-wasm 0.0.1-beta.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.
- package/README.md +2 -0
- package/package.json +38 -0
- package/pkg/imexport_wasm.d.ts +157 -0
- package/pkg/imexport_wasm.js +795 -0
- package/pkg/imexport_wasm_bg.wasm +0 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@senlinz/import-export-wasm",
|
|
3
|
+
"version": "0.0.1-beta.1",
|
|
4
|
+
"description": "Rust WebAssembly for import/export excel files",
|
|
5
|
+
"main": "pkg/imexport_wasm.js",
|
|
6
|
+
"types": "pkg/imexport_wasm.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"pkg/imexport_wasm_bg.wasm",
|
|
9
|
+
"pkg/imexport_wasm.bg.wasm.d.ts",
|
|
10
|
+
"pkg/imexport_wasm.js",
|
|
11
|
+
"pkg/imexport_wasm.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"author": "senlin",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/gui-xie/import-export.git"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"rust",
|
|
21
|
+
"wasm",
|
|
22
|
+
"import",
|
|
23
|
+
"export",
|
|
24
|
+
"excel",
|
|
25
|
+
"xlsx",
|
|
26
|
+
"sheet",
|
|
27
|
+
"spreadsheet",
|
|
28
|
+
"OpenXML",
|
|
29
|
+
"browser",
|
|
30
|
+
"client"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "wasm-pack build --release --target web",
|
|
34
|
+
"test": "wasm-pack test --headless --firefox",
|
|
35
|
+
"publish-dry-run": "pnpm publish --dry-run --no-git-checks",
|
|
36
|
+
"cargo-test": "cargo test"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* @param {ExcelInfo} info
|
|
5
|
+
* @returns {Uint8Array}
|
|
6
|
+
*/
|
|
7
|
+
export function createTemplate(info: ExcelInfo): Uint8Array;
|
|
8
|
+
/**
|
|
9
|
+
* @param {ExcelInfo} info
|
|
10
|
+
* @param {Uint8Array} excel_bytes
|
|
11
|
+
* @returns {ExcelData}
|
|
12
|
+
*/
|
|
13
|
+
export function importData(info: ExcelInfo, excel_bytes: Uint8Array): ExcelData;
|
|
14
|
+
/**
|
|
15
|
+
* @param {ExcelInfo} info
|
|
16
|
+
* @param {ExcelData} data
|
|
17
|
+
* @returns {Uint8Array}
|
|
18
|
+
*/
|
|
19
|
+
export function exportData(info: ExcelInfo, data: ExcelData): Uint8Array;
|
|
20
|
+
/**
|
|
21
|
+
*/
|
|
22
|
+
export class ExcelColumnData {
|
|
23
|
+
free(): void;
|
|
24
|
+
/**
|
|
25
|
+
* @param {string} key
|
|
26
|
+
* @param {string} value
|
|
27
|
+
*/
|
|
28
|
+
constructor(key: string, value: string);
|
|
29
|
+
/**
|
|
30
|
+
*/
|
|
31
|
+
key: string;
|
|
32
|
+
/**
|
|
33
|
+
*/
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
*/
|
|
38
|
+
export class ExcelColumnInfo {
|
|
39
|
+
free(): void;
|
|
40
|
+
/**
|
|
41
|
+
* @param {string} key
|
|
42
|
+
* @param {string} name
|
|
43
|
+
*/
|
|
44
|
+
constructor(key: string, name: string);
|
|
45
|
+
/**
|
|
46
|
+
*/
|
|
47
|
+
key: string;
|
|
48
|
+
/**
|
|
49
|
+
*/
|
|
50
|
+
name: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
*/
|
|
54
|
+
export class ExcelData {
|
|
55
|
+
free(): void;
|
|
56
|
+
/**
|
|
57
|
+
* @param {(ExcelRowData)[]} rows
|
|
58
|
+
*/
|
|
59
|
+
constructor(rows: (ExcelRowData)[]);
|
|
60
|
+
/**
|
|
61
|
+
*/
|
|
62
|
+
rows: (ExcelRowData)[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
*/
|
|
66
|
+
export class ExcelInfo {
|
|
67
|
+
free(): void;
|
|
68
|
+
/**
|
|
69
|
+
* @param {string} name
|
|
70
|
+
* @param {string} sheet_name
|
|
71
|
+
* @param {(ExcelColumnInfo)[]} columns
|
|
72
|
+
*/
|
|
73
|
+
constructor(name: string, sheet_name: string, columns: (ExcelColumnInfo)[]);
|
|
74
|
+
/**
|
|
75
|
+
*/
|
|
76
|
+
columns: (ExcelColumnInfo)[];
|
|
77
|
+
/**
|
|
78
|
+
*/
|
|
79
|
+
name: string;
|
|
80
|
+
/**
|
|
81
|
+
*/
|
|
82
|
+
sheet_name: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
*/
|
|
86
|
+
export class ExcelRowData {
|
|
87
|
+
free(): void;
|
|
88
|
+
/**
|
|
89
|
+
* @param {(ExcelColumnData)[]} columns
|
|
90
|
+
*/
|
|
91
|
+
constructor(columns: (ExcelColumnData)[]);
|
|
92
|
+
/**
|
|
93
|
+
*/
|
|
94
|
+
columns: (ExcelColumnData)[];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
98
|
+
|
|
99
|
+
export interface InitOutput {
|
|
100
|
+
readonly memory: WebAssembly.Memory;
|
|
101
|
+
readonly __wbg_exceldata_free: (a: number, b: number) => void;
|
|
102
|
+
readonly __wbg_get_exceldata_rows: (a: number, b: number) => void;
|
|
103
|
+
readonly __wbg_set_exceldata_rows: (a: number, b: number, c: number) => void;
|
|
104
|
+
readonly exceldata_new: (a: number, b: number) => number;
|
|
105
|
+
readonly __wbg_excelrowdata_free: (a: number, b: number) => void;
|
|
106
|
+
readonly __wbg_get_excelrowdata_columns: (a: number, b: number) => void;
|
|
107
|
+
readonly __wbg_set_excelrowdata_columns: (a: number, b: number, c: number) => void;
|
|
108
|
+
readonly excelrowdata_new: (a: number, b: number) => number;
|
|
109
|
+
readonly __wbg_excelcolumndata_free: (a: number, b: number) => void;
|
|
110
|
+
readonly __wbg_get_excelcolumndata_key: (a: number, b: number) => void;
|
|
111
|
+
readonly __wbg_set_excelcolumndata_key: (a: number, b: number, c: number) => void;
|
|
112
|
+
readonly __wbg_get_excelcolumndata_value: (a: number, b: number) => void;
|
|
113
|
+
readonly __wbg_set_excelcolumndata_value: (a: number, b: number, c: number) => void;
|
|
114
|
+
readonly excelcolumndata_new: (a: number, b: number, c: number, d: number) => number;
|
|
115
|
+
readonly createTemplate: (a: number, b: number) => void;
|
|
116
|
+
readonly importData: (a: number, b: number, c: number) => number;
|
|
117
|
+
readonly exportData: (a: number, b: number, c: number) => void;
|
|
118
|
+
readonly __wbg_excelinfo_free: (a: number, b: number) => void;
|
|
119
|
+
readonly __wbg_get_excelinfo_columns: (a: number, b: number) => void;
|
|
120
|
+
readonly __wbg_set_excelinfo_columns: (a: number, b: number, c: number) => void;
|
|
121
|
+
readonly excelinfo_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
122
|
+
readonly __wbg_excelcolumninfo_free: (a: number, b: number) => void;
|
|
123
|
+
readonly __wbg_get_excelcolumninfo_key: (a: number, b: number) => void;
|
|
124
|
+
readonly __wbg_set_excelcolumninfo_key: (a: number, b: number, c: number) => void;
|
|
125
|
+
readonly __wbg_get_excelcolumninfo_name: (a: number, b: number) => void;
|
|
126
|
+
readonly __wbg_set_excelcolumninfo_name: (a: number, b: number, c: number) => void;
|
|
127
|
+
readonly excelcolumninfo_new: (a: number, b: number, c: number, d: number) => number;
|
|
128
|
+
readonly __wbg_get_excelinfo_name: (a: number, b: number) => void;
|
|
129
|
+
readonly __wbg_get_excelinfo_sheet_name: (a: number, b: number) => void;
|
|
130
|
+
readonly __wbg_set_excelinfo_name: (a: number, b: number, c: number) => void;
|
|
131
|
+
readonly __wbg_set_excelinfo_sheet_name: (a: number, b: number, c: number) => void;
|
|
132
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
133
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
134
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
135
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
139
|
+
/**
|
|
140
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
141
|
+
* a precompiled `WebAssembly.Module`.
|
|
142
|
+
*
|
|
143
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
144
|
+
*
|
|
145
|
+
* @returns {InitOutput}
|
|
146
|
+
*/
|
|
147
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
151
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
152
|
+
*
|
|
153
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
154
|
+
*
|
|
155
|
+
* @returns {Promise<InitOutput>}
|
|
156
|
+
*/
|
|
157
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
@@ -0,0 +1,795 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
|
|
3
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
4
|
+
|
|
5
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
6
|
+
|
|
7
|
+
let cachedUint8ArrayMemory0 = null;
|
|
8
|
+
|
|
9
|
+
function getUint8ArrayMemory0() {
|
|
10
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
11
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
12
|
+
}
|
|
13
|
+
return cachedUint8ArrayMemory0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function getStringFromWasm0(ptr, len) {
|
|
17
|
+
ptr = ptr >>> 0;
|
|
18
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let cachedDataViewMemory0 = null;
|
|
22
|
+
|
|
23
|
+
function getDataViewMemory0() {
|
|
24
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
25
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
26
|
+
}
|
|
27
|
+
return cachedDataViewMemory0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const heap = new Array(128).fill(undefined);
|
|
31
|
+
|
|
32
|
+
heap.push(undefined, null, true, false);
|
|
33
|
+
|
|
34
|
+
function getObject(idx) { return heap[idx]; }
|
|
35
|
+
|
|
36
|
+
let heap_next = heap.length;
|
|
37
|
+
|
|
38
|
+
function dropObject(idx) {
|
|
39
|
+
if (idx < 132) return;
|
|
40
|
+
heap[idx] = heap_next;
|
|
41
|
+
heap_next = idx;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function takeObject(idx) {
|
|
45
|
+
const ret = getObject(idx);
|
|
46
|
+
dropObject(idx);
|
|
47
|
+
return ret;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
51
|
+
ptr = ptr >>> 0;
|
|
52
|
+
const mem = getDataViewMemory0();
|
|
53
|
+
const result = [];
|
|
54
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
55
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let WASM_VECTOR_LEN = 0;
|
|
61
|
+
|
|
62
|
+
function addHeapObject(obj) {
|
|
63
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
64
|
+
const idx = heap_next;
|
|
65
|
+
heap_next = heap[idx];
|
|
66
|
+
|
|
67
|
+
heap[idx] = obj;
|
|
68
|
+
return idx;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
72
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
73
|
+
const mem = getDataViewMemory0();
|
|
74
|
+
for (let i = 0; i < array.length; i++) {
|
|
75
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
76
|
+
}
|
|
77
|
+
WASM_VECTOR_LEN = array.length;
|
|
78
|
+
return ptr;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
82
|
+
|
|
83
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
84
|
+
? function (arg, view) {
|
|
85
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
86
|
+
}
|
|
87
|
+
: function (arg, view) {
|
|
88
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
89
|
+
view.set(buf);
|
|
90
|
+
return {
|
|
91
|
+
read: arg.length,
|
|
92
|
+
written: buf.length
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
97
|
+
|
|
98
|
+
if (realloc === undefined) {
|
|
99
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
100
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
101
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
102
|
+
WASM_VECTOR_LEN = buf.length;
|
|
103
|
+
return ptr;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
let len = arg.length;
|
|
107
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
108
|
+
|
|
109
|
+
const mem = getUint8ArrayMemory0();
|
|
110
|
+
|
|
111
|
+
let offset = 0;
|
|
112
|
+
|
|
113
|
+
for (; offset < len; offset++) {
|
|
114
|
+
const code = arg.charCodeAt(offset);
|
|
115
|
+
if (code > 0x7F) break;
|
|
116
|
+
mem[ptr + offset] = code;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (offset !== len) {
|
|
120
|
+
if (offset !== 0) {
|
|
121
|
+
arg = arg.slice(offset);
|
|
122
|
+
}
|
|
123
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
124
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
125
|
+
const ret = encodeString(arg, view);
|
|
126
|
+
|
|
127
|
+
offset += ret.written;
|
|
128
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
WASM_VECTOR_LEN = offset;
|
|
132
|
+
return ptr;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function _assertClass(instance, klass) {
|
|
136
|
+
if (!(instance instanceof klass)) {
|
|
137
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
138
|
+
}
|
|
139
|
+
return instance.ptr;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
143
|
+
ptr = ptr >>> 0;
|
|
144
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @param {ExcelInfo} info
|
|
148
|
+
* @returns {Uint8Array}
|
|
149
|
+
*/
|
|
150
|
+
export function createTemplate(info) {
|
|
151
|
+
try {
|
|
152
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
153
|
+
_assertClass(info, ExcelInfo);
|
|
154
|
+
var ptr0 = info.__destroy_into_raw();
|
|
155
|
+
wasm.createTemplate(retptr, ptr0);
|
|
156
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
157
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
158
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
159
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
160
|
+
return v2;
|
|
161
|
+
} finally {
|
|
162
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
167
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
168
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
169
|
+
WASM_VECTOR_LEN = arg.length;
|
|
170
|
+
return ptr;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @param {ExcelInfo} info
|
|
174
|
+
* @param {Uint8Array} excel_bytes
|
|
175
|
+
* @returns {ExcelData}
|
|
176
|
+
*/
|
|
177
|
+
export function importData(info, excel_bytes) {
|
|
178
|
+
_assertClass(info, ExcelInfo);
|
|
179
|
+
var ptr0 = info.__destroy_into_raw();
|
|
180
|
+
const ptr1 = passArray8ToWasm0(excel_bytes, wasm.__wbindgen_malloc);
|
|
181
|
+
const len1 = WASM_VECTOR_LEN;
|
|
182
|
+
const ret = wasm.importData(ptr0, ptr1, len1);
|
|
183
|
+
return ExcelData.__wrap(ret);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @param {ExcelInfo} info
|
|
188
|
+
* @param {ExcelData} data
|
|
189
|
+
* @returns {Uint8Array}
|
|
190
|
+
*/
|
|
191
|
+
export function exportData(info, data) {
|
|
192
|
+
try {
|
|
193
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
194
|
+
_assertClass(info, ExcelInfo);
|
|
195
|
+
var ptr0 = info.__destroy_into_raw();
|
|
196
|
+
_assertClass(data, ExcelData);
|
|
197
|
+
var ptr1 = data.__destroy_into_raw();
|
|
198
|
+
wasm.exportData(retptr, ptr0, ptr1);
|
|
199
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
200
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
201
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
202
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
203
|
+
return v3;
|
|
204
|
+
} finally {
|
|
205
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const ExcelColumnDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
210
|
+
? { register: () => {}, unregister: () => {} }
|
|
211
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_excelcolumndata_free(ptr >>> 0, 1));
|
|
212
|
+
/**
|
|
213
|
+
*/
|
|
214
|
+
export class ExcelColumnData {
|
|
215
|
+
|
|
216
|
+
static __wrap(ptr) {
|
|
217
|
+
ptr = ptr >>> 0;
|
|
218
|
+
const obj = Object.create(ExcelColumnData.prototype);
|
|
219
|
+
obj.__wbg_ptr = ptr;
|
|
220
|
+
ExcelColumnDataFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
221
|
+
return obj;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
static __unwrap(jsValue) {
|
|
225
|
+
if (!(jsValue instanceof ExcelColumnData)) {
|
|
226
|
+
return 0;
|
|
227
|
+
}
|
|
228
|
+
return jsValue.__destroy_into_raw();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
__destroy_into_raw() {
|
|
232
|
+
const ptr = this.__wbg_ptr;
|
|
233
|
+
this.__wbg_ptr = 0;
|
|
234
|
+
ExcelColumnDataFinalization.unregister(this);
|
|
235
|
+
return ptr;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
free() {
|
|
239
|
+
const ptr = this.__destroy_into_raw();
|
|
240
|
+
wasm.__wbg_excelcolumndata_free(ptr, 0);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* @returns {string}
|
|
244
|
+
*/
|
|
245
|
+
get key() {
|
|
246
|
+
let deferred1_0;
|
|
247
|
+
let deferred1_1;
|
|
248
|
+
try {
|
|
249
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
250
|
+
wasm.__wbg_get_excelcolumndata_key(retptr, this.__wbg_ptr);
|
|
251
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
252
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
253
|
+
deferred1_0 = r0;
|
|
254
|
+
deferred1_1 = r1;
|
|
255
|
+
return getStringFromWasm0(r0, r1);
|
|
256
|
+
} finally {
|
|
257
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
258
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* @param {string} arg0
|
|
263
|
+
*/
|
|
264
|
+
set key(arg0) {
|
|
265
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
266
|
+
const len0 = WASM_VECTOR_LEN;
|
|
267
|
+
wasm.__wbg_set_excelcolumndata_key(this.__wbg_ptr, ptr0, len0);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @returns {string}
|
|
271
|
+
*/
|
|
272
|
+
get value() {
|
|
273
|
+
let deferred1_0;
|
|
274
|
+
let deferred1_1;
|
|
275
|
+
try {
|
|
276
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
277
|
+
wasm.__wbg_get_excelcolumndata_value(retptr, this.__wbg_ptr);
|
|
278
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
279
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
280
|
+
deferred1_0 = r0;
|
|
281
|
+
deferred1_1 = r1;
|
|
282
|
+
return getStringFromWasm0(r0, r1);
|
|
283
|
+
} finally {
|
|
284
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
285
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* @param {string} arg0
|
|
290
|
+
*/
|
|
291
|
+
set value(arg0) {
|
|
292
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
|
+
const len0 = WASM_VECTOR_LEN;
|
|
294
|
+
wasm.__wbg_set_excelcolumndata_value(this.__wbg_ptr, ptr0, len0);
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* @param {string} key
|
|
298
|
+
* @param {string} value
|
|
299
|
+
*/
|
|
300
|
+
constructor(key, value) {
|
|
301
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
302
|
+
const len0 = WASM_VECTOR_LEN;
|
|
303
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
304
|
+
const len1 = WASM_VECTOR_LEN;
|
|
305
|
+
const ret = wasm.excelcolumndata_new(ptr0, len0, ptr1, len1);
|
|
306
|
+
this.__wbg_ptr = ret >>> 0;
|
|
307
|
+
ExcelColumnDataFinalization.register(this, this.__wbg_ptr, this);
|
|
308
|
+
return this;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
const ExcelColumnInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
313
|
+
? { register: () => {}, unregister: () => {} }
|
|
314
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_excelcolumninfo_free(ptr >>> 0, 1));
|
|
315
|
+
/**
|
|
316
|
+
*/
|
|
317
|
+
export class ExcelColumnInfo {
|
|
318
|
+
|
|
319
|
+
static __wrap(ptr) {
|
|
320
|
+
ptr = ptr >>> 0;
|
|
321
|
+
const obj = Object.create(ExcelColumnInfo.prototype);
|
|
322
|
+
obj.__wbg_ptr = ptr;
|
|
323
|
+
ExcelColumnInfoFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
324
|
+
return obj;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
static __unwrap(jsValue) {
|
|
328
|
+
if (!(jsValue instanceof ExcelColumnInfo)) {
|
|
329
|
+
return 0;
|
|
330
|
+
}
|
|
331
|
+
return jsValue.__destroy_into_raw();
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
__destroy_into_raw() {
|
|
335
|
+
const ptr = this.__wbg_ptr;
|
|
336
|
+
this.__wbg_ptr = 0;
|
|
337
|
+
ExcelColumnInfoFinalization.unregister(this);
|
|
338
|
+
return ptr;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
free() {
|
|
342
|
+
const ptr = this.__destroy_into_raw();
|
|
343
|
+
wasm.__wbg_excelcolumninfo_free(ptr, 0);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* @returns {string}
|
|
347
|
+
*/
|
|
348
|
+
get key() {
|
|
349
|
+
let deferred1_0;
|
|
350
|
+
let deferred1_1;
|
|
351
|
+
try {
|
|
352
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
353
|
+
wasm.__wbg_get_excelcolumninfo_key(retptr, this.__wbg_ptr);
|
|
354
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
355
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
356
|
+
deferred1_0 = r0;
|
|
357
|
+
deferred1_1 = r1;
|
|
358
|
+
return getStringFromWasm0(r0, r1);
|
|
359
|
+
} finally {
|
|
360
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
361
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* @param {string} arg0
|
|
366
|
+
*/
|
|
367
|
+
set key(arg0) {
|
|
368
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
369
|
+
const len0 = WASM_VECTOR_LEN;
|
|
370
|
+
wasm.__wbg_set_excelcolumninfo_key(this.__wbg_ptr, ptr0, len0);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* @returns {string}
|
|
374
|
+
*/
|
|
375
|
+
get name() {
|
|
376
|
+
let deferred1_0;
|
|
377
|
+
let deferred1_1;
|
|
378
|
+
try {
|
|
379
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
380
|
+
wasm.__wbg_get_excelcolumninfo_name(retptr, this.__wbg_ptr);
|
|
381
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
382
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
383
|
+
deferred1_0 = r0;
|
|
384
|
+
deferred1_1 = r1;
|
|
385
|
+
return getStringFromWasm0(r0, r1);
|
|
386
|
+
} finally {
|
|
387
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
388
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* @param {string} arg0
|
|
393
|
+
*/
|
|
394
|
+
set name(arg0) {
|
|
395
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
396
|
+
const len0 = WASM_VECTOR_LEN;
|
|
397
|
+
wasm.__wbg_set_excelcolumninfo_name(this.__wbg_ptr, ptr0, len0);
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* @param {string} key
|
|
401
|
+
* @param {string} name
|
|
402
|
+
*/
|
|
403
|
+
constructor(key, name) {
|
|
404
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
405
|
+
const len0 = WASM_VECTOR_LEN;
|
|
406
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
407
|
+
const len1 = WASM_VECTOR_LEN;
|
|
408
|
+
const ret = wasm.excelcolumninfo_new(ptr0, len0, ptr1, len1);
|
|
409
|
+
this.__wbg_ptr = ret >>> 0;
|
|
410
|
+
ExcelColumnInfoFinalization.register(this, this.__wbg_ptr, this);
|
|
411
|
+
return this;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
const ExcelDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
416
|
+
? { register: () => {}, unregister: () => {} }
|
|
417
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_exceldata_free(ptr >>> 0, 1));
|
|
418
|
+
/**
|
|
419
|
+
*/
|
|
420
|
+
export class ExcelData {
|
|
421
|
+
|
|
422
|
+
static __wrap(ptr) {
|
|
423
|
+
ptr = ptr >>> 0;
|
|
424
|
+
const obj = Object.create(ExcelData.prototype);
|
|
425
|
+
obj.__wbg_ptr = ptr;
|
|
426
|
+
ExcelDataFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
427
|
+
return obj;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
__destroy_into_raw() {
|
|
431
|
+
const ptr = this.__wbg_ptr;
|
|
432
|
+
this.__wbg_ptr = 0;
|
|
433
|
+
ExcelDataFinalization.unregister(this);
|
|
434
|
+
return ptr;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
free() {
|
|
438
|
+
const ptr = this.__destroy_into_raw();
|
|
439
|
+
wasm.__wbg_exceldata_free(ptr, 0);
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* @returns {(ExcelRowData)[]}
|
|
443
|
+
*/
|
|
444
|
+
get rows() {
|
|
445
|
+
try {
|
|
446
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
447
|
+
wasm.__wbg_get_exceldata_rows(retptr, this.__wbg_ptr);
|
|
448
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
449
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
450
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
451
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
452
|
+
return v1;
|
|
453
|
+
} finally {
|
|
454
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* @param {(ExcelRowData)[]} arg0
|
|
459
|
+
*/
|
|
460
|
+
set rows(arg0) {
|
|
461
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
462
|
+
const len0 = WASM_VECTOR_LEN;
|
|
463
|
+
wasm.__wbg_set_exceldata_rows(this.__wbg_ptr, ptr0, len0);
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* @param {(ExcelRowData)[]} rows
|
|
467
|
+
*/
|
|
468
|
+
constructor(rows) {
|
|
469
|
+
const ptr0 = passArrayJsValueToWasm0(rows, wasm.__wbindgen_malloc);
|
|
470
|
+
const len0 = WASM_VECTOR_LEN;
|
|
471
|
+
const ret = wasm.exceldata_new(ptr0, len0);
|
|
472
|
+
this.__wbg_ptr = ret >>> 0;
|
|
473
|
+
ExcelDataFinalization.register(this, this.__wbg_ptr, this);
|
|
474
|
+
return this;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const ExcelInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
479
|
+
? { register: () => {}, unregister: () => {} }
|
|
480
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_excelinfo_free(ptr >>> 0, 1));
|
|
481
|
+
/**
|
|
482
|
+
*/
|
|
483
|
+
export class ExcelInfo {
|
|
484
|
+
|
|
485
|
+
__destroy_into_raw() {
|
|
486
|
+
const ptr = this.__wbg_ptr;
|
|
487
|
+
this.__wbg_ptr = 0;
|
|
488
|
+
ExcelInfoFinalization.unregister(this);
|
|
489
|
+
return ptr;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
free() {
|
|
493
|
+
const ptr = this.__destroy_into_raw();
|
|
494
|
+
wasm.__wbg_excelinfo_free(ptr, 0);
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* @returns {string}
|
|
498
|
+
*/
|
|
499
|
+
get name() {
|
|
500
|
+
let deferred1_0;
|
|
501
|
+
let deferred1_1;
|
|
502
|
+
try {
|
|
503
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
504
|
+
wasm.__wbg_get_excelcolumninfo_key(retptr, this.__wbg_ptr);
|
|
505
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
506
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
507
|
+
deferred1_0 = r0;
|
|
508
|
+
deferred1_1 = r1;
|
|
509
|
+
return getStringFromWasm0(r0, r1);
|
|
510
|
+
} finally {
|
|
511
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
512
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* @param {string} arg0
|
|
517
|
+
*/
|
|
518
|
+
set name(arg0) {
|
|
519
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
520
|
+
const len0 = WASM_VECTOR_LEN;
|
|
521
|
+
wasm.__wbg_set_excelcolumninfo_key(this.__wbg_ptr, ptr0, len0);
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* @returns {string}
|
|
525
|
+
*/
|
|
526
|
+
get sheet_name() {
|
|
527
|
+
let deferred1_0;
|
|
528
|
+
let deferred1_1;
|
|
529
|
+
try {
|
|
530
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
531
|
+
wasm.__wbg_get_excelcolumninfo_name(retptr, this.__wbg_ptr);
|
|
532
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
533
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
534
|
+
deferred1_0 = r0;
|
|
535
|
+
deferred1_1 = r1;
|
|
536
|
+
return getStringFromWasm0(r0, r1);
|
|
537
|
+
} finally {
|
|
538
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
539
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* @param {string} arg0
|
|
544
|
+
*/
|
|
545
|
+
set sheet_name(arg0) {
|
|
546
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
547
|
+
const len0 = WASM_VECTOR_LEN;
|
|
548
|
+
wasm.__wbg_set_excelcolumninfo_name(this.__wbg_ptr, ptr0, len0);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* @returns {(ExcelColumnInfo)[]}
|
|
552
|
+
*/
|
|
553
|
+
get columns() {
|
|
554
|
+
try {
|
|
555
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
556
|
+
wasm.__wbg_get_excelinfo_columns(retptr, this.__wbg_ptr);
|
|
557
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
558
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
559
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
560
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
561
|
+
return v1;
|
|
562
|
+
} finally {
|
|
563
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* @param {(ExcelColumnInfo)[]} arg0
|
|
568
|
+
*/
|
|
569
|
+
set columns(arg0) {
|
|
570
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
571
|
+
const len0 = WASM_VECTOR_LEN;
|
|
572
|
+
wasm.__wbg_set_excelinfo_columns(this.__wbg_ptr, ptr0, len0);
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* @param {string} name
|
|
576
|
+
* @param {string} sheet_name
|
|
577
|
+
* @param {(ExcelColumnInfo)[]} columns
|
|
578
|
+
*/
|
|
579
|
+
constructor(name, sheet_name, columns) {
|
|
580
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
581
|
+
const len0 = WASM_VECTOR_LEN;
|
|
582
|
+
const ptr1 = passStringToWasm0(sheet_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
583
|
+
const len1 = WASM_VECTOR_LEN;
|
|
584
|
+
const ptr2 = passArrayJsValueToWasm0(columns, wasm.__wbindgen_malloc);
|
|
585
|
+
const len2 = WASM_VECTOR_LEN;
|
|
586
|
+
const ret = wasm.excelinfo_new(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
587
|
+
this.__wbg_ptr = ret >>> 0;
|
|
588
|
+
ExcelInfoFinalization.register(this, this.__wbg_ptr, this);
|
|
589
|
+
return this;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
const ExcelRowDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
594
|
+
? { register: () => {}, unregister: () => {} }
|
|
595
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_excelrowdata_free(ptr >>> 0, 1));
|
|
596
|
+
/**
|
|
597
|
+
*/
|
|
598
|
+
export class ExcelRowData {
|
|
599
|
+
|
|
600
|
+
static __wrap(ptr) {
|
|
601
|
+
ptr = ptr >>> 0;
|
|
602
|
+
const obj = Object.create(ExcelRowData.prototype);
|
|
603
|
+
obj.__wbg_ptr = ptr;
|
|
604
|
+
ExcelRowDataFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
605
|
+
return obj;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
static __unwrap(jsValue) {
|
|
609
|
+
if (!(jsValue instanceof ExcelRowData)) {
|
|
610
|
+
return 0;
|
|
611
|
+
}
|
|
612
|
+
return jsValue.__destroy_into_raw();
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
__destroy_into_raw() {
|
|
616
|
+
const ptr = this.__wbg_ptr;
|
|
617
|
+
this.__wbg_ptr = 0;
|
|
618
|
+
ExcelRowDataFinalization.unregister(this);
|
|
619
|
+
return ptr;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
free() {
|
|
623
|
+
const ptr = this.__destroy_into_raw();
|
|
624
|
+
wasm.__wbg_excelrowdata_free(ptr, 0);
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* @returns {(ExcelColumnData)[]}
|
|
628
|
+
*/
|
|
629
|
+
get columns() {
|
|
630
|
+
try {
|
|
631
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
632
|
+
wasm.__wbg_get_excelrowdata_columns(retptr, this.__wbg_ptr);
|
|
633
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
634
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
635
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
636
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
637
|
+
return v1;
|
|
638
|
+
} finally {
|
|
639
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* @param {(ExcelColumnData)[]} arg0
|
|
644
|
+
*/
|
|
645
|
+
set columns(arg0) {
|
|
646
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
647
|
+
const len0 = WASM_VECTOR_LEN;
|
|
648
|
+
wasm.__wbg_set_excelrowdata_columns(this.__wbg_ptr, ptr0, len0);
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* @param {(ExcelColumnData)[]} columns
|
|
652
|
+
*/
|
|
653
|
+
constructor(columns) {
|
|
654
|
+
const ptr0 = passArrayJsValueToWasm0(columns, wasm.__wbindgen_malloc);
|
|
655
|
+
const len0 = WASM_VECTOR_LEN;
|
|
656
|
+
const ret = wasm.excelrowdata_new(ptr0, len0);
|
|
657
|
+
this.__wbg_ptr = ret >>> 0;
|
|
658
|
+
ExcelRowDataFinalization.register(this, this.__wbg_ptr, this);
|
|
659
|
+
return this;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
async function __wbg_load(module, imports) {
|
|
664
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
665
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
666
|
+
try {
|
|
667
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
668
|
+
|
|
669
|
+
} catch (e) {
|
|
670
|
+
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
671
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
672
|
+
|
|
673
|
+
} else {
|
|
674
|
+
throw e;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
const bytes = await module.arrayBuffer();
|
|
680
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
681
|
+
|
|
682
|
+
} else {
|
|
683
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
684
|
+
|
|
685
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
686
|
+
return { instance, module };
|
|
687
|
+
|
|
688
|
+
} else {
|
|
689
|
+
return instance;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
function __wbg_get_imports() {
|
|
695
|
+
const imports = {};
|
|
696
|
+
imports.wbg = {};
|
|
697
|
+
imports.wbg.__wbg_excelcolumndata_new = function(arg0) {
|
|
698
|
+
const ret = ExcelColumnData.__wrap(arg0);
|
|
699
|
+
return addHeapObject(ret);
|
|
700
|
+
};
|
|
701
|
+
imports.wbg.__wbg_excelcolumninfo_new = function(arg0) {
|
|
702
|
+
const ret = ExcelColumnInfo.__wrap(arg0);
|
|
703
|
+
return addHeapObject(ret);
|
|
704
|
+
};
|
|
705
|
+
imports.wbg.__wbg_excelrowdata_new = function(arg0) {
|
|
706
|
+
const ret = ExcelRowData.__wrap(arg0);
|
|
707
|
+
return addHeapObject(ret);
|
|
708
|
+
};
|
|
709
|
+
imports.wbg.__wbg_excelrowdata_unwrap = function(arg0) {
|
|
710
|
+
const ret = ExcelRowData.__unwrap(takeObject(arg0));
|
|
711
|
+
return ret;
|
|
712
|
+
};
|
|
713
|
+
imports.wbg.__wbg_excelcolumndata_unwrap = function(arg0) {
|
|
714
|
+
const ret = ExcelColumnData.__unwrap(takeObject(arg0));
|
|
715
|
+
return ret;
|
|
716
|
+
};
|
|
717
|
+
imports.wbg.__wbg_excelcolumninfo_unwrap = function(arg0) {
|
|
718
|
+
const ret = ExcelColumnInfo.__unwrap(takeObject(arg0));
|
|
719
|
+
return ret;
|
|
720
|
+
};
|
|
721
|
+
imports.wbg.__wbg_now_b7a162010a9e75b4 = function() {
|
|
722
|
+
const ret = Date.now();
|
|
723
|
+
return ret;
|
|
724
|
+
};
|
|
725
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
726
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
return imports;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
function __wbg_init_memory(imports, memory) {
|
|
733
|
+
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
function __wbg_finalize_init(instance, module) {
|
|
737
|
+
wasm = instance.exports;
|
|
738
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
739
|
+
cachedDataViewMemory0 = null;
|
|
740
|
+
cachedUint8ArrayMemory0 = null;
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
return wasm;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
function initSync(module) {
|
|
748
|
+
if (wasm !== undefined) return wasm;
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
if (typeof module !== 'undefined' && Object.getPrototypeOf(module) === Object.prototype)
|
|
752
|
+
({module} = module)
|
|
753
|
+
else
|
|
754
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
755
|
+
|
|
756
|
+
const imports = __wbg_get_imports();
|
|
757
|
+
|
|
758
|
+
__wbg_init_memory(imports);
|
|
759
|
+
|
|
760
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
761
|
+
module = new WebAssembly.Module(module);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
765
|
+
|
|
766
|
+
return __wbg_finalize_init(instance, module);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
async function __wbg_init(module_or_path) {
|
|
770
|
+
if (wasm !== undefined) return wasm;
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
if (typeof module_or_path !== 'undefined' && Object.getPrototypeOf(module_or_path) === Object.prototype)
|
|
774
|
+
({module_or_path} = module_or_path)
|
|
775
|
+
else
|
|
776
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
777
|
+
|
|
778
|
+
if (typeof module_or_path === 'undefined') {
|
|
779
|
+
module_or_path = new URL('imexport_wasm_bg.wasm', import.meta.url);
|
|
780
|
+
}
|
|
781
|
+
const imports = __wbg_get_imports();
|
|
782
|
+
|
|
783
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
784
|
+
module_or_path = fetch(module_or_path);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
__wbg_init_memory(imports);
|
|
788
|
+
|
|
789
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
790
|
+
|
|
791
|
+
return __wbg_finalize_init(instance, module);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
export { initSync };
|
|
795
|
+
export default __wbg_init;
|
|
Binary file
|