@docmentis/udoc-viewer 0.6.41 → 0.6.43
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 +7 -6
- package/dist/package.json +7 -1
- package/dist/src/UDocClient.js +1 -1
- package/dist/src/UDocViewer.d.ts +10 -3
- package/dist/src/UDocViewer.d.ts.map +1 -1
- package/dist/src/UDocViewer.js +7 -4
- package/dist/src/UDocViewer.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/ui/viewer/annotation/utils.d.ts +7 -0
- package/dist/src/ui/viewer/annotation/utils.d.ts.map +1 -1
- package/dist/src/ui/viewer/annotation/utils.js +7 -4
- package/dist/src/ui/viewer/annotation/utils.js.map +1 -1
- package/dist/src/ui/viewer/components/LeftPanel.d.ts.map +1 -1
- package/dist/src/ui/viewer/components/LeftPanel.js +16 -11
- package/dist/src/ui/viewer/components/LeftPanel.js.map +1 -1
- package/dist/src/ui/viewer/components/Toolbar.d.ts.map +1 -1
- package/dist/src/ui/viewer/components/Toolbar.js +3 -4
- package/dist/src/ui/viewer/components/Toolbar.js.map +1 -1
- package/dist/src/ui/viewer/state.d.ts +2 -0
- package/dist/src/ui/viewer/state.d.ts.map +1 -1
- package/dist/src/ui/viewer/state.js +11 -2
- package/dist/src/ui/viewer/state.js.map +1 -1
- package/dist/src/ui/viewer/styles-inline.d.ts +1 -1
- package/dist/src/ui/viewer/styles-inline.d.ts.map +1 -1
- package/dist/src/ui/viewer/styles-inline.js +15 -7
- package/dist/src/ui/viewer/styles-inline.js.map +1 -1
- package/dist/src/wasm/udoc.d.ts +898 -865
- package/dist/src/wasm/udoc.js +2038 -1955
- package/dist/src/wasm/udoc_bg.wasm +0 -0
- package/dist/src/wasm/udoc_bg.wasm.d.ts +4 -3
- package/dist/src/worker/worker-inline.js +1 -1
- package/dist/src/worker/worker.js +1980 -1895
- package/package.json +7 -1
|
@@ -1,253 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
3
|
// dist/src/wasm/udoc.js
|
|
4
|
-
var wasm;
|
|
5
|
-
function addHeapObject(obj) {
|
|
6
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
7
|
-
const idx = heap_next;
|
|
8
|
-
heap_next = heap[idx];
|
|
9
|
-
heap[idx] = obj;
|
|
10
|
-
return idx;
|
|
11
|
-
}
|
|
12
|
-
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
13
|
-
}, unregister: () => {
|
|
14
|
-
} } : new FinalizationRegistry((state) => state.dtor(state.a, state.b));
|
|
15
|
-
function debugString(val) {
|
|
16
|
-
const type = typeof val;
|
|
17
|
-
if (type == "number" || type == "boolean" || val == null) {
|
|
18
|
-
return `${val}`;
|
|
19
|
-
}
|
|
20
|
-
if (type == "string") {
|
|
21
|
-
return `"${val}"`;
|
|
22
|
-
}
|
|
23
|
-
if (type == "symbol") {
|
|
24
|
-
const description = val.description;
|
|
25
|
-
if (description == null) {
|
|
26
|
-
return "Symbol";
|
|
27
|
-
} else {
|
|
28
|
-
return `Symbol(${description})`;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
if (type == "function") {
|
|
32
|
-
const name = val.name;
|
|
33
|
-
if (typeof name == "string" && name.length > 0) {
|
|
34
|
-
return `Function(${name})`;
|
|
35
|
-
} else {
|
|
36
|
-
return "Function";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (Array.isArray(val)) {
|
|
40
|
-
const length = val.length;
|
|
41
|
-
let debug = "[";
|
|
42
|
-
if (length > 0) {
|
|
43
|
-
debug += debugString(val[0]);
|
|
44
|
-
}
|
|
45
|
-
for (let i = 1; i < length; i++) {
|
|
46
|
-
debug += ", " + debugString(val[i]);
|
|
47
|
-
}
|
|
48
|
-
debug += "]";
|
|
49
|
-
return debug;
|
|
50
|
-
}
|
|
51
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
52
|
-
let className;
|
|
53
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
54
|
-
className = builtInMatches[1];
|
|
55
|
-
} else {
|
|
56
|
-
return toString.call(val);
|
|
57
|
-
}
|
|
58
|
-
if (className == "Object") {
|
|
59
|
-
try {
|
|
60
|
-
return "Object(" + JSON.stringify(val) + ")";
|
|
61
|
-
} catch (_) {
|
|
62
|
-
return "Object";
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (val instanceof Error) {
|
|
66
|
-
return `${val.name}: ${val.message}
|
|
67
|
-
${val.stack}`;
|
|
68
|
-
}
|
|
69
|
-
return className;
|
|
70
|
-
}
|
|
71
|
-
function dropObject(idx) {
|
|
72
|
-
if (idx < 132) return;
|
|
73
|
-
heap[idx] = heap_next;
|
|
74
|
-
heap_next = idx;
|
|
75
|
-
}
|
|
76
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
77
|
-
ptr = ptr >>> 0;
|
|
78
|
-
const mem = getDataViewMemory0();
|
|
79
|
-
const result = [];
|
|
80
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
81
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
function getArrayU32FromWasm0(ptr, len) {
|
|
86
|
-
ptr = ptr >>> 0;
|
|
87
|
-
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
88
|
-
}
|
|
89
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
90
|
-
ptr = ptr >>> 0;
|
|
91
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
92
|
-
}
|
|
93
|
-
var cachedDataViewMemory0 = null;
|
|
94
|
-
function getDataViewMemory0() {
|
|
95
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
96
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
97
|
-
}
|
|
98
|
-
return cachedDataViewMemory0;
|
|
99
|
-
}
|
|
100
|
-
function getStringFromWasm0(ptr, len) {
|
|
101
|
-
ptr = ptr >>> 0;
|
|
102
|
-
return decodeText(ptr, len);
|
|
103
|
-
}
|
|
104
|
-
var cachedUint32ArrayMemory0 = null;
|
|
105
|
-
function getUint32ArrayMemory0() {
|
|
106
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
107
|
-
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
108
|
-
}
|
|
109
|
-
return cachedUint32ArrayMemory0;
|
|
110
|
-
}
|
|
111
|
-
var cachedUint8ArrayMemory0 = null;
|
|
112
|
-
function getUint8ArrayMemory0() {
|
|
113
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
114
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
115
|
-
}
|
|
116
|
-
return cachedUint8ArrayMemory0;
|
|
117
|
-
}
|
|
118
|
-
function getObject(idx) {
|
|
119
|
-
return heap[idx];
|
|
120
|
-
}
|
|
121
|
-
function handleError(f, args) {
|
|
122
|
-
try {
|
|
123
|
-
return f.apply(this, args);
|
|
124
|
-
} catch (e) {
|
|
125
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
var heap = new Array(128).fill(void 0);
|
|
129
|
-
heap.push(void 0, null, true, false);
|
|
130
|
-
var heap_next = heap.length;
|
|
131
|
-
function isLikeNone(x) {
|
|
132
|
-
return x === void 0 || x === null;
|
|
133
|
-
}
|
|
134
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
135
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
136
|
-
const real = (...args) => {
|
|
137
|
-
state.cnt++;
|
|
138
|
-
const a = state.a;
|
|
139
|
-
state.a = 0;
|
|
140
|
-
try {
|
|
141
|
-
return f(a, state.b, ...args);
|
|
142
|
-
} finally {
|
|
143
|
-
state.a = a;
|
|
144
|
-
real._wbg_cb_unref();
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
real._wbg_cb_unref = () => {
|
|
148
|
-
if (--state.cnt === 0) {
|
|
149
|
-
state.dtor(state.a, state.b);
|
|
150
|
-
state.a = 0;
|
|
151
|
-
CLOSURE_DTORS.unregister(state);
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
155
|
-
return real;
|
|
156
|
-
}
|
|
157
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
158
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
159
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
160
|
-
WASM_VECTOR_LEN = arg.length;
|
|
161
|
-
return ptr;
|
|
162
|
-
}
|
|
163
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
164
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
165
|
-
const mem = getDataViewMemory0();
|
|
166
|
-
for (let i = 0; i < array.length; i++) {
|
|
167
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
168
|
-
}
|
|
169
|
-
WASM_VECTOR_LEN = array.length;
|
|
170
|
-
return ptr;
|
|
171
|
-
}
|
|
172
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
173
|
-
if (realloc === void 0) {
|
|
174
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
175
|
-
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
176
|
-
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
177
|
-
WASM_VECTOR_LEN = buf.length;
|
|
178
|
-
return ptr2;
|
|
179
|
-
}
|
|
180
|
-
let len = arg.length;
|
|
181
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
182
|
-
const mem = getUint8ArrayMemory0();
|
|
183
|
-
let offset = 0;
|
|
184
|
-
for (; offset < len; offset++) {
|
|
185
|
-
const code = arg.charCodeAt(offset);
|
|
186
|
-
if (code > 127) break;
|
|
187
|
-
mem[ptr + offset] = code;
|
|
188
|
-
}
|
|
189
|
-
if (offset !== len) {
|
|
190
|
-
if (offset !== 0) {
|
|
191
|
-
arg = arg.slice(offset);
|
|
192
|
-
}
|
|
193
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
194
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
195
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
196
|
-
offset += ret.written;
|
|
197
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
198
|
-
}
|
|
199
|
-
WASM_VECTOR_LEN = offset;
|
|
200
|
-
return ptr;
|
|
201
|
-
}
|
|
202
|
-
function takeObject(idx) {
|
|
203
|
-
const ret = getObject(idx);
|
|
204
|
-
dropObject(idx);
|
|
205
|
-
return ret;
|
|
206
|
-
}
|
|
207
|
-
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
208
|
-
cachedTextDecoder.decode();
|
|
209
|
-
var MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
210
|
-
var numBytesDecoded = 0;
|
|
211
|
-
function decodeText(ptr, len) {
|
|
212
|
-
numBytesDecoded += len;
|
|
213
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
214
|
-
cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
215
|
-
cachedTextDecoder.decode();
|
|
216
|
-
numBytesDecoded = len;
|
|
217
|
-
}
|
|
218
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
219
|
-
}
|
|
220
|
-
var cachedTextEncoder = new TextEncoder();
|
|
221
|
-
if (!("encodeInto" in cachedTextEncoder)) {
|
|
222
|
-
cachedTextEncoder.encodeInto = function(arg, view) {
|
|
223
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
224
|
-
view.set(buf);
|
|
225
|
-
return {
|
|
226
|
-
read: arg.length,
|
|
227
|
-
written: buf.length
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
var WASM_VECTOR_LEN = 0;
|
|
232
|
-
function __wasm_bindgen_func_elem_4195(arg0, arg1, arg2) {
|
|
233
|
-
wasm.__wasm_bindgen_func_elem_4195(arg0, arg1, addHeapObject(arg2));
|
|
234
|
-
}
|
|
235
|
-
function __wasm_bindgen_func_elem_22589(arg0, arg1, arg2, arg3) {
|
|
236
|
-
wasm.__wasm_bindgen_func_elem_22589(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
237
|
-
}
|
|
238
|
-
var __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
|
|
239
|
-
var __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
|
|
240
|
-
var __wbindgen_enum_GpuSamplerBindingType = ["filtering", "non-filtering", "comparison"];
|
|
241
|
-
var __wbindgen_enum_GpuStorageTextureAccess = ["write-only", "read-only", "read-write"];
|
|
242
|
-
var __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
|
|
243
|
-
var __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
|
|
244
|
-
var __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"];
|
|
245
|
-
var __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "depth", "sint", "uint"];
|
|
246
|
-
var __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
|
|
247
|
-
var __wbindgen_enum_XmlHttpRequestResponseType = ["", "arraybuffer", "blob", "document", "json", "text"];
|
|
248
|
-
var WasmFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
249
|
-
}, unregister: () => {
|
|
250
|
-
} } : new FinalizationRegistry((ptr) => wasm.__wbg_wasm_free(ptr >>> 0, 1));
|
|
251
4
|
var Wasm = class {
|
|
252
5
|
__destroy_into_raw() {
|
|
253
6
|
const ptr = this.__wbg_ptr;
|
|
@@ -260,179 +13,192 @@ ${val.stack}`;
|
|
|
260
13
|
wasm.__wbg_wasm_free(ptr, 0);
|
|
261
14
|
}
|
|
262
15
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* Supports various image formats: JPEG, PNG, GIF, BMP, TIFF, WebP, etc.
|
|
266
|
-
* Multi-page TIFF files will create a document with multiple pages.
|
|
267
|
-
*
|
|
268
|
-
* # Arguments
|
|
269
|
-
* * `bytes` - Raw image file data
|
|
16
|
+
* Get info for all pages in one call.
|
|
270
17
|
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
* @param {
|
|
274
|
-
* @returns {
|
|
18
|
+
* Returns an array of `PageInfo` objects, one per page.
|
|
19
|
+
* More efficient than calling `page_info` for each page.
|
|
20
|
+
* @param {string} id
|
|
21
|
+
* @returns {JsPageInfo[]}
|
|
275
22
|
*/
|
|
276
|
-
|
|
277
|
-
let deferred3_0;
|
|
278
|
-
let deferred3_1;
|
|
23
|
+
all_page_info(id) {
|
|
279
24
|
try {
|
|
280
25
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
281
|
-
const ptr0 =
|
|
26
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
282
27
|
const len0 = WASM_VECTOR_LEN;
|
|
283
|
-
wasm.
|
|
28
|
+
wasm.wasm_all_page_info(retptr, this.__wbg_ptr, ptr0, len0);
|
|
284
29
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
285
30
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
286
31
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
287
32
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
288
|
-
var ptr2 = r0;
|
|
289
|
-
var len2 = r1;
|
|
290
33
|
if (r3) {
|
|
291
|
-
ptr2 = 0;
|
|
292
|
-
len2 = 0;
|
|
293
34
|
throw takeObject(r2);
|
|
294
35
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return
|
|
36
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
37
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
38
|
+
return v2;
|
|
298
39
|
} finally {
|
|
299
40
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
300
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
301
41
|
}
|
|
302
42
|
}
|
|
303
43
|
/**
|
|
304
|
-
*
|
|
44
|
+
* Authenticate with a password to unlock an encrypted document.
|
|
45
|
+
*
|
|
46
|
+
* # Arguments
|
|
47
|
+
* * `id` - Document ID
|
|
48
|
+
* * `password` - Password to try
|
|
49
|
+
*
|
|
50
|
+
* # Returns
|
|
51
|
+
* `true` if authentication succeeded, `false` if the password was incorrect.
|
|
305
52
|
* @param {string} id
|
|
306
|
-
* @
|
|
53
|
+
* @param {string} password
|
|
54
|
+
* @returns {boolean}
|
|
307
55
|
*/
|
|
308
|
-
|
|
56
|
+
authenticate(id, password) {
|
|
309
57
|
try {
|
|
310
58
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
311
59
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
312
60
|
const len0 = WASM_VECTOR_LEN;
|
|
313
|
-
|
|
61
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
62
|
+
const len1 = WASM_VECTOR_LEN;
|
|
63
|
+
wasm.wasm_authenticate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
314
64
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
315
65
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
316
66
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
317
67
|
if (r2) {
|
|
318
68
|
throw takeObject(r1);
|
|
319
69
|
}
|
|
320
|
-
return r0
|
|
70
|
+
return r0 !== 0;
|
|
321
71
|
} finally {
|
|
322
72
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
323
73
|
}
|
|
324
74
|
}
|
|
325
75
|
/**
|
|
326
|
-
*
|
|
76
|
+
* Disable telemetry reporting.
|
|
327
77
|
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
78
|
+
* Only takes effect if the current license includes the `no_telemetry`
|
|
79
|
+
* feature flag. Returns `true` if telemetry was disabled, `false` if the
|
|
80
|
+
* license does not permit it.
|
|
81
|
+
* @returns {boolean}
|
|
82
|
+
*/
|
|
83
|
+
disable_telemetry() {
|
|
84
|
+
const ret = wasm.wasm_disable_telemetry(this.__wbg_ptr);
|
|
85
|
+
return ret !== 0;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get the number of documents currently loaded.
|
|
89
|
+
* @returns {number}
|
|
90
|
+
*/
|
|
91
|
+
get document_count() {
|
|
92
|
+
const ret = wasm.wasm_document_count(this.__wbg_ptr);
|
|
93
|
+
return ret >>> 0;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get the format of a loaded document.
|
|
332
97
|
*
|
|
333
|
-
* Returns
|
|
98
|
+
* Returns one of: "pdf", "docx", "pptx", "xlsx", "image".
|
|
334
99
|
* @param {string} id
|
|
335
|
-
* @returns {
|
|
100
|
+
* @returns {string}
|
|
336
101
|
*/
|
|
337
|
-
|
|
102
|
+
document_format(id) {
|
|
103
|
+
let deferred3_0;
|
|
104
|
+
let deferred3_1;
|
|
338
105
|
try {
|
|
339
106
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
340
107
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
341
108
|
const len0 = WASM_VECTOR_LEN;
|
|
342
|
-
wasm.
|
|
109
|
+
wasm.wasm_document_format(retptr, this.__wbg_ptr, ptr0, len0);
|
|
343
110
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
344
111
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
345
112
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
346
113
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
114
|
+
var ptr2 = r0;
|
|
115
|
+
var len2 = r1;
|
|
347
116
|
if (r3) {
|
|
117
|
+
ptr2 = 0;
|
|
118
|
+
len2 = 0;
|
|
348
119
|
throw takeObject(r2);
|
|
349
120
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
return
|
|
121
|
+
deferred3_0 = ptr2;
|
|
122
|
+
deferred3_1 = len2;
|
|
123
|
+
return getStringFromWasm0(ptr2, len2);
|
|
353
124
|
} finally {
|
|
354
125
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
126
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
355
127
|
}
|
|
356
128
|
}
|
|
357
129
|
/**
|
|
358
|
-
*
|
|
359
|
-
* @
|
|
360
|
-
* @returns {boolean}
|
|
130
|
+
* Get all document IDs.
|
|
131
|
+
* @returns {string[]}
|
|
361
132
|
*/
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
133
|
+
document_ids() {
|
|
134
|
+
try {
|
|
135
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
136
|
+
wasm.wasm_document_ids(retptr, this.__wbg_ptr);
|
|
137
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
138
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
139
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
140
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
141
|
+
return v1;
|
|
142
|
+
} finally {
|
|
143
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
144
|
+
}
|
|
367
145
|
}
|
|
368
146
|
/**
|
|
369
|
-
*
|
|
147
|
+
* Enable Google Fonts.
|
|
370
148
|
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
149
|
+
* When enabled, fonts that are not embedded in the document will be
|
|
150
|
+
* automatically fetched from Google Fonts during rendering. Google Fonts
|
|
151
|
+
* are resolved after any URL fonts registered via `registerFonts`.
|
|
374
152
|
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
153
|
+
* Call this before loading documents.
|
|
154
|
+
*
|
|
155
|
+
* # Example (JavaScript)
|
|
156
|
+
* ```js
|
|
157
|
+
* udoc.enableGoogleFonts();
|
|
158
|
+
* const docId = udoc.loadPptx(pptxBytes);
|
|
159
|
+
* const pixels = udoc.renderPageToRgba(docId, 0, 800, 600);
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
enableGoogleFonts() {
|
|
163
|
+
wasm.wasm_enableGoogleFonts(this.__wbg_ptr);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Get all annotations in the document, grouped by page index.
|
|
167
|
+
*
|
|
168
|
+
* Returns an object mapping page indices (as strings) to arrays of annotations.
|
|
378
169
|
* @param {string} id
|
|
379
|
-
* @returns {
|
|
170
|
+
* @returns {JsAnnotationsByPage}
|
|
380
171
|
*/
|
|
381
|
-
|
|
172
|
+
get_all_annotations(id) {
|
|
382
173
|
try {
|
|
383
174
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
384
175
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
385
176
|
const len0 = WASM_VECTOR_LEN;
|
|
386
|
-
wasm.
|
|
177
|
+
wasm.wasm_get_all_annotations(retptr, this.__wbg_ptr, ptr0, len0);
|
|
387
178
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
388
179
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
389
180
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
throw takeObject(r2);
|
|
181
|
+
if (r2) {
|
|
182
|
+
throw takeObject(r1);
|
|
393
183
|
}
|
|
394
|
-
|
|
395
|
-
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
396
|
-
return v2;
|
|
184
|
+
return takeObject(r0);
|
|
397
185
|
} finally {
|
|
398
186
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
399
187
|
}
|
|
400
188
|
}
|
|
401
189
|
/**
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
* The original documents remain unchanged.
|
|
405
|
-
*
|
|
406
|
-
* # Arguments
|
|
407
|
-
* * `compositions` - Array of compositions. Each composition is an array of picks.
|
|
408
|
-
* Each pick is `{ doc: docIndex, pages: "0-2,4" }` where `docIndex` is the index
|
|
409
|
-
* in the `doc_ids` array and `pages` is a page range string (0-based).
|
|
410
|
-
* * `doc_ids` - Array of document IDs to use as sources (order matters for doc indices)
|
|
411
|
-
*
|
|
412
|
-
* # Example
|
|
413
|
-
* ```js
|
|
414
|
-
* // Create two documents: first has pages 0-2 from doc A, second has page 0 from A and 1 from B
|
|
415
|
-
* const newDocIds = udoc.pdf_compose(
|
|
416
|
-
* [
|
|
417
|
-
* [{ doc: 0, pages: "0-2" }],
|
|
418
|
-
* [{ doc: 0, pages: "0" }, { doc: 1, pages: "1" }]
|
|
419
|
-
* ],
|
|
420
|
-
* ["doc_0", "doc_1"]
|
|
421
|
-
* );
|
|
422
|
-
* ```
|
|
190
|
+
* Get the raw file bytes of a document.
|
|
423
191
|
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
* @
|
|
427
|
-
* @param {string[]} doc_ids
|
|
428
|
-
* @returns {string[]}
|
|
192
|
+
* Returns the original file data for the document.
|
|
193
|
+
* @param {string} id
|
|
194
|
+
* @returns {Uint8Array}
|
|
429
195
|
*/
|
|
430
|
-
|
|
196
|
+
get_bytes(id) {
|
|
431
197
|
try {
|
|
432
198
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
433
|
-
const ptr0 =
|
|
199
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
434
200
|
const len0 = WASM_VECTOR_LEN;
|
|
435
|
-
wasm.
|
|
201
|
+
wasm.wasm_get_bytes(retptr, this.__wbg_ptr, ptr0, len0);
|
|
436
202
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
437
203
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
438
204
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -440,113 +206,114 @@ ${val.stack}`;
|
|
|
440
206
|
if (r3) {
|
|
441
207
|
throw takeObject(r2);
|
|
442
208
|
}
|
|
443
|
-
var v2 =
|
|
444
|
-
wasm.__wbindgen_export4(r0, r1 *
|
|
209
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
210
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
445
211
|
return v2;
|
|
446
212
|
} finally {
|
|
447
213
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
448
214
|
}
|
|
449
215
|
}
|
|
450
216
|
/**
|
|
451
|
-
*
|
|
217
|
+
* Get font usage information for a document.
|
|
452
218
|
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
219
|
+
* Returns an array of `FontUsageEntry` objects describing how each font
|
|
220
|
+
* spec in the document was resolved, including primary resolution and
|
|
221
|
+
* any glyph-fallback fonts used during text shaping.
|
|
455
222
|
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
* @param {string} license_key
|
|
459
|
-
* @returns {LicenseResult}
|
|
460
|
-
*/
|
|
461
|
-
set_license(license_key) {
|
|
462
|
-
const ptr0 = passStringToWasm0(license_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
463
|
-
const len0 = WASM_VECTOR_LEN;
|
|
464
|
-
const ret = wasm.wasm_set_license(this.__wbg_ptr, ptr0, len0);
|
|
465
|
-
return takeObject(ret);
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* Authenticate with a password to unlock an encrypted document.
|
|
223
|
+
* This information is populated during layout — call after rendering at
|
|
224
|
+
* least one page to get results.
|
|
469
225
|
*
|
|
470
226
|
* # Arguments
|
|
471
227
|
* * `id` - Document ID
|
|
472
|
-
* * `password` - Password to try
|
|
473
228
|
*
|
|
474
229
|
* # Returns
|
|
475
|
-
* `
|
|
230
|
+
* `FontUsageEntry[]` — see TypeScript types for shape.
|
|
476
231
|
* @param {string} id
|
|
477
|
-
* @
|
|
478
|
-
* @returns {boolean}
|
|
232
|
+
* @returns {JsFontUsageEntry[]}
|
|
479
233
|
*/
|
|
480
|
-
|
|
234
|
+
get_font_usage(id) {
|
|
481
235
|
try {
|
|
482
236
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
483
237
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
484
238
|
const len0 = WASM_VECTOR_LEN;
|
|
485
|
-
|
|
486
|
-
const len1 = WASM_VECTOR_LEN;
|
|
487
|
-
wasm.wasm_authenticate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
239
|
+
wasm.wasm_get_font_usage(retptr, this.__wbg_ptr, ptr0, len0);
|
|
488
240
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
489
241
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
490
242
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
491
|
-
|
|
492
|
-
|
|
243
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
244
|
+
if (r3) {
|
|
245
|
+
throw takeObject(r2);
|
|
493
246
|
}
|
|
494
|
-
|
|
247
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
248
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
249
|
+
return v2;
|
|
495
250
|
} finally {
|
|
496
251
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
497
252
|
}
|
|
498
253
|
}
|
|
499
254
|
/**
|
|
500
|
-
* Get
|
|
501
|
-
*
|
|
255
|
+
* Get the layout model for a specific page.
|
|
256
|
+
*
|
|
257
|
+
* Returns the hierarchical layout structure (frames, parcels, lines, runs,
|
|
258
|
+
* glyphs, tables, grids) without building the full display list. This is
|
|
259
|
+
* more efficient than `get_page_text` for text selection/search and
|
|
260
|
+
* preserves semantic structure (paragraphs, tables, etc.).
|
|
261
|
+
*
|
|
262
|
+
* All coordinates are in points (1/72 inch). The viewer should scale by
|
|
263
|
+
* `canvasWidth / layoutPage.width` to convert to pixels.
|
|
264
|
+
* @param {string} id
|
|
265
|
+
* @param {number} page_index
|
|
266
|
+
* @returns {JsLayoutPage}
|
|
502
267
|
*/
|
|
503
|
-
|
|
268
|
+
get_layout_page(id, page_index) {
|
|
504
269
|
try {
|
|
505
270
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
506
|
-
wasm.
|
|
271
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
272
|
+
const len0 = WASM_VECTOR_LEN;
|
|
273
|
+
wasm.wasm_get_layout_page(retptr, this.__wbg_ptr, ptr0, len0, page_index);
|
|
507
274
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
508
275
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
509
|
-
var
|
|
510
|
-
|
|
511
|
-
|
|
276
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
277
|
+
if (r2) {
|
|
278
|
+
throw takeObject(r1);
|
|
279
|
+
}
|
|
280
|
+
return takeObject(r0);
|
|
512
281
|
} finally {
|
|
513
282
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
514
283
|
}
|
|
515
284
|
}
|
|
516
285
|
/**
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
286
|
+
* Get a numeric limit from the current license.
|
|
287
|
+
*
|
|
288
|
+
* Returns the limit value if set in the license, otherwise returns the default.
|
|
289
|
+
* @param {string} limit_name
|
|
290
|
+
* @param {bigint} _default
|
|
291
|
+
* @returns {bigint}
|
|
520
292
|
*/
|
|
521
|
-
|
|
522
|
-
const ptr0 = passStringToWasm0(
|
|
293
|
+
get_limit(limit_name, _default) {
|
|
294
|
+
const ptr0 = passStringToWasm0(limit_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
523
295
|
const len0 = WASM_VECTOR_LEN;
|
|
524
|
-
const ret = wasm.
|
|
525
|
-
return ret
|
|
296
|
+
const ret = wasm.wasm_get_limit(this.__wbg_ptr, ptr0, len0, _default);
|
|
297
|
+
return BigInt.asUintN(64, ret);
|
|
526
298
|
}
|
|
527
299
|
/**
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
* Saves the document with full compression options enabled:
|
|
531
|
-
* - Compress stream data using FlateDecode
|
|
532
|
-
* - Pack objects into compressed object streams (PDF 1.5+)
|
|
533
|
-
* - Use compressed xref streams (PDF 1.5+)
|
|
534
|
-
* - Remove unreferenced objects
|
|
300
|
+
* Get the document outline (bookmarks/table of contents).
|
|
535
301
|
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
302
|
+
* Returns an array of outline items, where each item has:
|
|
303
|
+
* - `title`: Display text for the item
|
|
304
|
+
* - `destination`: Optional navigation destination with `pageIndex` and display parameters
|
|
305
|
+
* - `children`: Nested child items
|
|
538
306
|
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
* @
|
|
542
|
-
* @returns {Uint8Array}
|
|
307
|
+
* Returns an empty array if the document has no outline.
|
|
308
|
+
* @param {string} id
|
|
309
|
+
* @returns {JsOutlineItem[]}
|
|
543
310
|
*/
|
|
544
|
-
|
|
311
|
+
get_outline(id) {
|
|
545
312
|
try {
|
|
546
313
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
547
|
-
const ptr0 = passStringToWasm0(
|
|
314
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
548
315
|
const len0 = WASM_VECTOR_LEN;
|
|
549
|
-
wasm.
|
|
316
|
+
wasm.wasm_get_outline(retptr, this.__wbg_ptr, ptr0, len0);
|
|
550
317
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
551
318
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
552
319
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -554,27 +321,35 @@ ${val.stack}`;
|
|
|
554
321
|
if (r3) {
|
|
555
322
|
throw takeObject(r2);
|
|
556
323
|
}
|
|
557
|
-
var v2 =
|
|
558
|
-
wasm.__wbindgen_export4(r0, r1 *
|
|
324
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
325
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
559
326
|
return v2;
|
|
560
327
|
} finally {
|
|
561
328
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
562
329
|
}
|
|
563
330
|
}
|
|
564
331
|
/**
|
|
565
|
-
* Get
|
|
332
|
+
* Get annotations for a specific page.
|
|
566
333
|
*
|
|
567
|
-
* Returns an array of
|
|
568
|
-
*
|
|
334
|
+
* Returns an array of annotation objects for the given page.
|
|
335
|
+
* Uses per-page loading for efficiency (only loads the requested page).
|
|
336
|
+
*
|
|
337
|
+
* All geometry fields on the returned annotations (`bounds`, `quads`,
|
|
338
|
+
* `vertices`, `inkList`, `start`/`end`, …) are in the page's unrotated
|
|
339
|
+
* MediaBox coordinate space — origin top-left, PDF points, +y downward
|
|
340
|
+
* — regardless of the page's `/Rotate` value. The viewer applies
|
|
341
|
+
* rotation as a display transform on top. This matches the input space
|
|
342
|
+
* expected by `pdf_save_annotations`, so the round-trip is consistent.
|
|
569
343
|
* @param {string} id
|
|
570
|
-
* @
|
|
344
|
+
* @param {number} page_index
|
|
345
|
+
* @returns {JsAnnotation[]}
|
|
571
346
|
*/
|
|
572
|
-
|
|
347
|
+
get_page_annotations(id, page_index) {
|
|
573
348
|
try {
|
|
574
349
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
575
350
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
576
351
|
const len0 = WASM_VECTOR_LEN;
|
|
577
|
-
wasm.
|
|
352
|
+
wasm.wasm_get_page_annotations(retptr, this.__wbg_ptr, ptr0, len0, page_index);
|
|
578
353
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
579
354
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
580
355
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -590,37 +365,23 @@ ${val.stack}`;
|
|
|
590
365
|
}
|
|
591
366
|
}
|
|
592
367
|
/**
|
|
593
|
-
* Get
|
|
594
|
-
* @returns {number}
|
|
595
|
-
*/
|
|
596
|
-
get document_count() {
|
|
597
|
-
const ret = wasm.wasm_document_count(this.__wbg_ptr);
|
|
598
|
-
return ret >>> 0;
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* Get font usage information for a document.
|
|
602
|
-
*
|
|
603
|
-
* Returns an array of `FontUsageEntry` objects describing how each font
|
|
604
|
-
* spec in the document was resolved, including primary resolution and
|
|
605
|
-
* any glyph-fallback fonts used during text shaping.
|
|
606
|
-
*
|
|
607
|
-
* This information is populated during layout — call after rendering at
|
|
608
|
-
* least one page to get results.
|
|
368
|
+
* Get all visibility groups for a document.
|
|
609
369
|
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
370
|
+
* Returns an array of objects, each containing:
|
|
371
|
+
* - `id`: Unique identifier string
|
|
372
|
+
* - `name`: Display name for UI
|
|
373
|
+
* - `visible`: Whether the group is currently visible
|
|
612
374
|
*
|
|
613
|
-
*
|
|
614
|
-
* `FontUsageEntry[]` — see TypeScript types for shape.
|
|
375
|
+
* Returns an empty array for documents without visibility groups.
|
|
615
376
|
* @param {string} id
|
|
616
|
-
* @returns {
|
|
377
|
+
* @returns {JsVisibilityGroup[]}
|
|
617
378
|
*/
|
|
618
|
-
|
|
379
|
+
get_visibility_groups(id) {
|
|
619
380
|
try {
|
|
620
381
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
621
382
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
622
383
|
const len0 = WASM_VECTOR_LEN;
|
|
623
|
-
wasm.
|
|
384
|
+
wasm.wasm_get_visibility_groups(retptr, this.__wbg_ptr, ptr0, len0);
|
|
624
385
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
625
386
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
626
387
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -635,6 +396,49 @@ ${val.stack}`;
|
|
|
635
396
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
636
397
|
}
|
|
637
398
|
}
|
|
399
|
+
/**
|
|
400
|
+
* Check if a document with the given ID exists.
|
|
401
|
+
* @param {string} id
|
|
402
|
+
* @returns {boolean}
|
|
403
|
+
*/
|
|
404
|
+
has_document(id) {
|
|
405
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
407
|
+
const ret = wasm.wasm_has_document(this.__wbg_ptr, ptr0, len0);
|
|
408
|
+
return ret !== 0;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Check if a feature is enabled by the current license.
|
|
412
|
+
* @param {string} feature
|
|
413
|
+
* @returns {boolean}
|
|
414
|
+
*/
|
|
415
|
+
has_feature(feature) {
|
|
416
|
+
const ptr0 = passStringToWasm0(feature, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
417
|
+
const len0 = WASM_VECTOR_LEN;
|
|
418
|
+
const ret = wasm.wasm_has_feature(this.__wbg_ptr, ptr0, len0);
|
|
419
|
+
return ret !== 0;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Check whether the GPU render backend is available.
|
|
423
|
+
* @returns {boolean}
|
|
424
|
+
*/
|
|
425
|
+
has_gpu() {
|
|
426
|
+
const ret = wasm.wasm_has_gpu(this.__wbg_ptr);
|
|
427
|
+
return ret !== 0;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Initialize the GPU render backend (Vello + WebGPU).
|
|
431
|
+
*
|
|
432
|
+
* This is async because wgpu device initialization requires yielding
|
|
433
|
+
* to the browser event loop. Call this once after construction.
|
|
434
|
+
* Returns `true` if GPU initialization succeeded, `false` if no
|
|
435
|
+
* WebGPU adapter is available (the CPU backend remains usable).
|
|
436
|
+
* @returns {Promise<boolean>}
|
|
437
|
+
*/
|
|
438
|
+
init_gpu() {
|
|
439
|
+
const ret = wasm.wasm_init_gpu(this.__wbg_ptr);
|
|
440
|
+
return takeObject(ret);
|
|
441
|
+
}
|
|
638
442
|
/**
|
|
639
443
|
* Get current license status.
|
|
640
444
|
* @returns {LicenseResult}
|
|
@@ -644,122 +448,67 @@ ${val.stack}`;
|
|
|
644
448
|
return takeObject(ret);
|
|
645
449
|
}
|
|
646
450
|
/**
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
* Returns `true` if the document is encrypted and requires authentication
|
|
650
|
-
* before pages can be loaded or rendered.
|
|
651
|
-
* @param {string} id
|
|
652
|
-
* @returns {boolean}
|
|
653
|
-
*/
|
|
654
|
-
needs_password(id) {
|
|
655
|
-
try {
|
|
656
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
657
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
658
|
-
const len0 = WASM_VECTOR_LEN;
|
|
659
|
-
wasm.wasm_needs_password(retptr, this.__wbg_ptr, ptr0, len0);
|
|
660
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
661
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
662
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
663
|
-
if (r2) {
|
|
664
|
-
throw takeObject(r1);
|
|
665
|
-
}
|
|
666
|
-
return r0 !== 0;
|
|
667
|
-
} finally {
|
|
668
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* Decompress a PDF document.
|
|
451
|
+
* Load a document by auto-detecting its format from the file contents.
|
|
673
452
|
*
|
|
674
|
-
*
|
|
675
|
-
*
|
|
453
|
+
* Inspects magic bytes to determine the format:
|
|
454
|
+
* - `%PDF` → PDF
|
|
455
|
+
* - `PK\x03\x04` (ZIP) → inspects ZIP entries for `word/` (DOCX), `ppt/` (PPTX), or `xl/` (XLSX)
|
|
456
|
+
* - Image magic bytes (JPEG, PNG, GIF, BMP, TIFF, WebP) → Image
|
|
676
457
|
*
|
|
677
458
|
* # Arguments
|
|
678
|
-
* * `
|
|
459
|
+
* * `bytes` - Raw file data
|
|
679
460
|
*
|
|
680
461
|
* # Returns
|
|
681
|
-
*
|
|
682
|
-
* @param {
|
|
683
|
-
* @returns {
|
|
462
|
+
* A unique document ID that can be used to reference this document.
|
|
463
|
+
* @param {Uint8Array} bytes
|
|
464
|
+
* @returns {string}
|
|
684
465
|
*/
|
|
685
|
-
|
|
466
|
+
load(bytes) {
|
|
467
|
+
let deferred3_0;
|
|
468
|
+
let deferred3_1;
|
|
686
469
|
try {
|
|
687
470
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
688
|
-
const ptr0 =
|
|
471
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
689
472
|
const len0 = WASM_VECTOR_LEN;
|
|
690
|
-
wasm.
|
|
473
|
+
wasm.wasm_load(retptr, this.__wbg_ptr, ptr0, len0);
|
|
691
474
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
692
475
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
693
476
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
694
477
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
478
|
+
var ptr2 = r0;
|
|
479
|
+
var len2 = r1;
|
|
695
480
|
if (r3) {
|
|
481
|
+
ptr2 = 0;
|
|
482
|
+
len2 = 0;
|
|
696
483
|
throw takeObject(r2);
|
|
697
484
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
return
|
|
485
|
+
deferred3_0 = ptr2;
|
|
486
|
+
deferred3_1 = len2;
|
|
487
|
+
return getStringFromWasm0(ptr2, len2);
|
|
701
488
|
} finally {
|
|
702
489
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
490
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
703
491
|
}
|
|
704
492
|
}
|
|
705
493
|
/**
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
* The caller provides a list of all available fonts with their download
|
|
709
|
-
* URLs. During layout, when the engine needs a font, it is fetched from
|
|
710
|
-
* the URL, parsed, and cached for reuse.
|
|
711
|
-
*
|
|
712
|
-
* Call this before loading documents. Registered fonts are automatically
|
|
713
|
-
* applied to every document loaded afterward. URL fonts are always
|
|
714
|
-
* resolved before Google Fonts.
|
|
494
|
+
* Load a DOCX document and return its ID.
|
|
715
495
|
*
|
|
716
496
|
* # Arguments
|
|
717
|
-
* * `
|
|
718
|
-
*
|
|
719
|
-
* # Example (JavaScript)
|
|
720
|
-
* ```js
|
|
721
|
-
* // Register available fonts before loading documents
|
|
722
|
-
* udoc.registerFonts([
|
|
723
|
-
* { typeface: "Roboto", bold: false, italic: false, url: "https://cdn.example.com/Roboto-Regular.woff2" },
|
|
724
|
-
* { typeface: "Roboto", bold: true, italic: false, url: "https://cdn.example.com/Roboto-Bold.woff2" },
|
|
725
|
-
* ]);
|
|
726
|
-
*
|
|
727
|
-
* // Load and render - fonts are fetched on demand during layout
|
|
728
|
-
* const docId = udoc.loadPptx(pptxBytes);
|
|
729
|
-
* const pixels = udoc.renderPageToRgba(docId, 0, 800, 600);
|
|
730
|
-
* ```
|
|
731
|
-
* @param {JsFontRegistration[]} fonts
|
|
732
|
-
*/
|
|
733
|
-
registerFonts(fonts) {
|
|
734
|
-
try {
|
|
735
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
736
|
-
const ptr0 = passArrayJsValueToWasm0(fonts, wasm.__wbindgen_export);
|
|
737
|
-
const len0 = WASM_VECTOR_LEN;
|
|
738
|
-
wasm.wasm_registerFonts(retptr, this.__wbg_ptr, ptr0, len0);
|
|
739
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
740
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
741
|
-
if (r1) {
|
|
742
|
-
throw takeObject(r0);
|
|
743
|
-
}
|
|
744
|
-
} finally {
|
|
745
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* Get the format of a loaded document.
|
|
497
|
+
* * `bytes` - Raw DOCX file data
|
|
750
498
|
*
|
|
751
|
-
* Returns
|
|
752
|
-
*
|
|
499
|
+
* # Returns
|
|
500
|
+
* A unique document ID that can be used to reference this document.
|
|
501
|
+
* @param {Uint8Array} bytes
|
|
753
502
|
* @returns {string}
|
|
754
503
|
*/
|
|
755
|
-
|
|
504
|
+
load_docx(bytes) {
|
|
756
505
|
let deferred3_0;
|
|
757
506
|
let deferred3_1;
|
|
758
507
|
try {
|
|
759
508
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
760
|
-
const ptr0 =
|
|
509
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
761
510
|
const len0 = WASM_VECTOR_LEN;
|
|
762
|
-
wasm.
|
|
511
|
+
wasm.wasm_load_docx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
763
512
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
764
513
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
765
514
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -780,304 +529,245 @@ ${val.stack}`;
|
|
|
780
529
|
}
|
|
781
530
|
}
|
|
782
531
|
/**
|
|
783
|
-
*
|
|
532
|
+
* Load an image file and return its ID.
|
|
784
533
|
*
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
* more efficient than `get_page_text` for text selection/search and
|
|
788
|
-
* preserves semantic structure (paragraphs, tables, etc.).
|
|
534
|
+
* Supports various image formats: JPEG, PNG, GIF, BMP, TIFF, WebP, etc.
|
|
535
|
+
* Multi-page TIFF files will create a document with multiple pages.
|
|
789
536
|
*
|
|
790
|
-
*
|
|
791
|
-
* `
|
|
792
|
-
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
537
|
+
* # Arguments
|
|
538
|
+
* * `bytes` - Raw image file data
|
|
539
|
+
*
|
|
540
|
+
* # Returns
|
|
541
|
+
* A unique document ID that can be used to reference this document.
|
|
542
|
+
* @param {Uint8Array} bytes
|
|
543
|
+
* @returns {string}
|
|
795
544
|
*/
|
|
796
|
-
|
|
545
|
+
load_image(bytes) {
|
|
546
|
+
let deferred3_0;
|
|
547
|
+
let deferred3_1;
|
|
797
548
|
try {
|
|
798
549
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
799
|
-
const ptr0 =
|
|
550
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
800
551
|
const len0 = WASM_VECTOR_LEN;
|
|
801
|
-
wasm.
|
|
552
|
+
wasm.wasm_load_image(retptr, this.__wbg_ptr, ptr0, len0);
|
|
802
553
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
803
554
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
804
555
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
805
|
-
|
|
806
|
-
|
|
556
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
557
|
+
var ptr2 = r0;
|
|
558
|
+
var len2 = r1;
|
|
559
|
+
if (r3) {
|
|
560
|
+
ptr2 = 0;
|
|
561
|
+
len2 = 0;
|
|
562
|
+
throw takeObject(r2);
|
|
807
563
|
}
|
|
808
|
-
|
|
564
|
+
deferred3_0 = ptr2;
|
|
565
|
+
deferred3_1 = len2;
|
|
566
|
+
return getStringFromWasm0(ptr2, len2);
|
|
809
567
|
} finally {
|
|
810
568
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
569
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
811
570
|
}
|
|
812
571
|
}
|
|
813
572
|
/**
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
* Returns true if the document was removed, false if it didn't exist.
|
|
817
|
-
* @param {string} id
|
|
818
|
-
* @returns {boolean}
|
|
819
|
-
*/
|
|
820
|
-
remove_document(id) {
|
|
821
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
822
|
-
const len0 = WASM_VECTOR_LEN;
|
|
823
|
-
const ret = wasm.wasm_remove_document(this.__wbg_ptr, ptr0, len0);
|
|
824
|
-
return ret !== 0;
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* Render a page using the GPU backend (Vello + WebGPU).
|
|
828
|
-
*
|
|
829
|
-
* Returns raw RGBA pixel data in premultiplied alpha format,
|
|
830
|
-
* identical to `render_page_to_rgba` but GPU-accelerated.
|
|
831
|
-
*
|
|
832
|
-
* # Errors
|
|
833
|
-
* Returns an error if the GPU backend is not initialized
|
|
834
|
-
* (call `init_gpu()` first), if the document is not found,
|
|
835
|
-
* or if rendering fails.
|
|
836
|
-
* @param {string} id
|
|
837
|
-
* @param {number} page_index
|
|
838
|
-
* @param {number} width
|
|
839
|
-
* @param {number} height
|
|
840
|
-
* @returns {Promise<Uint8Array>}
|
|
841
|
-
*/
|
|
842
|
-
render_page_gpu(id, page_index, width, height) {
|
|
843
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
844
|
-
const len0 = WASM_VECTOR_LEN;
|
|
845
|
-
const ret = wasm.wasm_render_page_gpu(this.__wbg_ptr, ptr0, len0, page_index, width, height);
|
|
846
|
-
return takeObject(ret);
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* Set the anonymous distinct ID for telemetry tracking.
|
|
850
|
-
*
|
|
851
|
-
* Call this after `new()` once the ID has been read from localStorage
|
|
852
|
-
* (or generated). Must be called before loading documents so that
|
|
853
|
-
* telemetry events include the correct metadata.
|
|
854
|
-
*
|
|
855
|
-
* # Arguments
|
|
856
|
-
* * `distinct_id` - Anonymous UUID for per-user tracking (persisted in localStorage)
|
|
857
|
-
* @param {string} distinct_id
|
|
858
|
-
*/
|
|
859
|
-
setup_telemetry(distinct_id) {
|
|
860
|
-
const ptr0 = passStringToWasm0(distinct_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
861
|
-
const len0 = WASM_VECTOR_LEN;
|
|
862
|
-
wasm.wasm_setup_telemetry(this.__wbg_ptr, ptr0, len0);
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Disable telemetry reporting.
|
|
866
|
-
*
|
|
867
|
-
* Only takes effect if the current license includes the `no_telemetry`
|
|
868
|
-
* feature flag. Returns `true` if telemetry was disabled, `false` if the
|
|
869
|
-
* license does not permit it.
|
|
870
|
-
* @returns {boolean}
|
|
871
|
-
*/
|
|
872
|
-
disable_telemetry() {
|
|
873
|
-
const ret = wasm.wasm_disable_telemetry(this.__wbg_ptr);
|
|
874
|
-
return ret !== 0;
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* Extract all embedded fonts from a PDF document.
|
|
573
|
+
* Load a PDF document and return its ID.
|
|
878
574
|
*
|
|
879
575
|
* # Arguments
|
|
880
|
-
* * `
|
|
576
|
+
* * `bytes` - Raw PDF file data
|
|
881
577
|
*
|
|
882
578
|
* # Returns
|
|
883
|
-
*
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
* - `extension`: File extension (ttf, cff, t1, etc.)
|
|
887
|
-
* - `data`: Raw font data as Uint8Array
|
|
888
|
-
* @param {string} doc_id
|
|
889
|
-
* @returns {JsExtractedFont[]}
|
|
579
|
+
* A unique document ID that can be used to reference this document.
|
|
580
|
+
* @param {Uint8Array} bytes
|
|
581
|
+
* @returns {string}
|
|
890
582
|
*/
|
|
891
|
-
|
|
583
|
+
load_pdf(bytes) {
|
|
584
|
+
let deferred3_0;
|
|
585
|
+
let deferred3_1;
|
|
892
586
|
try {
|
|
893
587
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
894
|
-
const ptr0 =
|
|
588
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
895
589
|
const len0 = WASM_VECTOR_LEN;
|
|
896
|
-
wasm.
|
|
590
|
+
wasm.wasm_load_pdf(retptr, this.__wbg_ptr, ptr0, len0);
|
|
897
591
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
898
592
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
899
593
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
900
594
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
595
|
+
var ptr2 = r0;
|
|
596
|
+
var len2 = r1;
|
|
901
597
|
if (r3) {
|
|
598
|
+
ptr2 = 0;
|
|
599
|
+
len2 = 0;
|
|
902
600
|
throw takeObject(r2);
|
|
903
601
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
return
|
|
602
|
+
deferred3_0 = ptr2;
|
|
603
|
+
deferred3_1 = len2;
|
|
604
|
+
return getStringFromWasm0(ptr2, len2);
|
|
907
605
|
} finally {
|
|
908
606
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
607
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
909
608
|
}
|
|
910
609
|
}
|
|
911
610
|
/**
|
|
912
|
-
*
|
|
611
|
+
* Load a PPTX (PowerPoint) document and return its ID.
|
|
913
612
|
*
|
|
914
613
|
* # Arguments
|
|
915
|
-
* * `
|
|
916
|
-
* * `convert_raw_to_png` - When true, converts raw pixel data to PNG format
|
|
614
|
+
* * `bytes` - Raw PPTX file data
|
|
917
615
|
*
|
|
918
616
|
* # Returns
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
* - `width`: Width in pixels
|
|
923
|
-
* - `height`: Height in pixels
|
|
924
|
-
* - `data`: Raw image data as Uint8Array
|
|
925
|
-
* @param {string} doc_id
|
|
926
|
-
* @param {boolean} convert_raw_to_png
|
|
927
|
-
* @returns {JsExtractedImage[]}
|
|
617
|
+
* A unique document ID that can be used to reference this document.
|
|
618
|
+
* @param {Uint8Array} bytes
|
|
619
|
+
* @returns {string}
|
|
928
620
|
*/
|
|
929
|
-
|
|
621
|
+
load_pptx(bytes) {
|
|
622
|
+
let deferred3_0;
|
|
623
|
+
let deferred3_1;
|
|
930
624
|
try {
|
|
931
625
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
932
|
-
const ptr0 =
|
|
626
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
933
627
|
const len0 = WASM_VECTOR_LEN;
|
|
934
|
-
wasm.
|
|
628
|
+
wasm.wasm_load_pptx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
935
629
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
936
630
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
937
631
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
938
632
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
633
|
+
var ptr2 = r0;
|
|
634
|
+
var len2 = r1;
|
|
939
635
|
if (r3) {
|
|
636
|
+
ptr2 = 0;
|
|
637
|
+
len2 = 0;
|
|
940
638
|
throw takeObject(r2);
|
|
941
639
|
}
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
return
|
|
640
|
+
deferred3_0 = ptr2;
|
|
641
|
+
deferred3_1 = len2;
|
|
642
|
+
return getStringFromWasm0(ptr2, len2);
|
|
945
643
|
} finally {
|
|
946
644
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
645
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
947
646
|
}
|
|
948
647
|
}
|
|
949
648
|
/**
|
|
950
|
-
*
|
|
649
|
+
* Load an XLSX document and return its ID.
|
|
951
650
|
*
|
|
952
651
|
* # Arguments
|
|
953
|
-
* * `
|
|
954
|
-
* * `page_index` - Zero-based page index
|
|
955
|
-
* * `width` - Output width in pixels
|
|
956
|
-
* * `height` - Output height in pixels
|
|
652
|
+
* * `bytes` - Raw XLSX file data
|
|
957
653
|
*
|
|
958
654
|
* # Returns
|
|
959
|
-
*
|
|
960
|
-
* @param {
|
|
961
|
-
* @
|
|
962
|
-
* @param {number} width
|
|
963
|
-
* @param {number} height
|
|
964
|
-
* @returns {Uint8Array}
|
|
655
|
+
* A unique document ID that can be used to reference this document.
|
|
656
|
+
* @param {Uint8Array} bytes
|
|
657
|
+
* @returns {string}
|
|
965
658
|
*/
|
|
966
|
-
|
|
659
|
+
load_xlsx(bytes) {
|
|
660
|
+
let deferred3_0;
|
|
661
|
+
let deferred3_1;
|
|
967
662
|
try {
|
|
968
663
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
969
|
-
const ptr0 =
|
|
664
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
970
665
|
const len0 = WASM_VECTOR_LEN;
|
|
971
|
-
wasm.
|
|
666
|
+
wasm.wasm_load_xlsx(retptr, this.__wbg_ptr, ptr0, len0);
|
|
972
667
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
973
668
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
974
669
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
975
670
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
671
|
+
var ptr2 = r0;
|
|
672
|
+
var len2 = r1;
|
|
976
673
|
if (r3) {
|
|
674
|
+
ptr2 = 0;
|
|
675
|
+
len2 = 0;
|
|
977
676
|
throw takeObject(r2);
|
|
978
677
|
}
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
return
|
|
678
|
+
deferred3_0 = ptr2;
|
|
679
|
+
deferred3_1 = len2;
|
|
680
|
+
return getStringFromWasm0(ptr2, len2);
|
|
982
681
|
} finally {
|
|
983
682
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
683
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
984
684
|
}
|
|
985
685
|
}
|
|
986
686
|
/**
|
|
987
|
-
*
|
|
687
|
+
* Check if a document requires a password to open.
|
|
988
688
|
*
|
|
989
|
-
* Returns
|
|
990
|
-
*
|
|
991
|
-
* - `scrollMode`: `"spread"` | `"continuous"`
|
|
689
|
+
* Returns `true` if the document is encrypted and requires authentication
|
|
690
|
+
* before pages can be loaded or rendered.
|
|
992
691
|
* @param {string} id
|
|
993
|
-
* @returns {
|
|
692
|
+
* @returns {boolean}
|
|
994
693
|
*/
|
|
995
|
-
|
|
694
|
+
needs_password(id) {
|
|
996
695
|
try {
|
|
997
696
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
998
697
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
999
698
|
const len0 = WASM_VECTOR_LEN;
|
|
1000
|
-
wasm.
|
|
699
|
+
wasm.wasm_needs_password(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1001
700
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1002
701
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1003
702
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1004
703
|
if (r2) {
|
|
1005
704
|
throw takeObject(r1);
|
|
1006
705
|
}
|
|
1007
|
-
return
|
|
706
|
+
return r0 !== 0;
|
|
1008
707
|
} finally {
|
|
1009
708
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1010
709
|
}
|
|
1011
710
|
}
|
|
1012
711
|
/**
|
|
1013
|
-
*
|
|
1014
|
-
*
|
|
1015
|
-
* When enabled, fonts that are not embedded in the document will be
|
|
1016
|
-
* automatically fetched from Google Fonts during rendering. Google Fonts
|
|
1017
|
-
* are resolved after any URL fonts registered via `registerFonts`.
|
|
1018
|
-
*
|
|
1019
|
-
* Call this before loading documents.
|
|
712
|
+
* Create a new document viewer.
|
|
1020
713
|
*
|
|
1021
|
-
* #
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1026
|
-
* ```
|
|
714
|
+
* # Arguments
|
|
715
|
+
* * `domain` - Hostname of the embedding page (e.g. from `window.location.hostname`)
|
|
716
|
+
* * `viewer_version` - SDK version string
|
|
717
|
+
* @param {string} domain
|
|
718
|
+
* @param {string} viewer_version
|
|
1027
719
|
*/
|
|
1028
|
-
|
|
1029
|
-
wasm.
|
|
720
|
+
constructor(domain, viewer_version) {
|
|
721
|
+
const ptr0 = passStringToWasm0(domain, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
722
|
+
const len0 = WASM_VECTOR_LEN;
|
|
723
|
+
const ptr1 = passStringToWasm0(viewer_version, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
724
|
+
const len1 = WASM_VECTOR_LEN;
|
|
725
|
+
const ret = wasm.wasm_new(ptr0, len0, ptr1, len1);
|
|
726
|
+
this.__wbg_ptr = ret;
|
|
727
|
+
WasmFinalization.register(this, this.__wbg_ptr, this);
|
|
728
|
+
return this;
|
|
1030
729
|
}
|
|
1031
730
|
/**
|
|
1032
|
-
* Get
|
|
1033
|
-
*
|
|
1034
|
-
* Returns an object mapping page indices (as strings) to arrays of annotations.
|
|
731
|
+
* Get the page count of a document.
|
|
1035
732
|
* @param {string} id
|
|
1036
|
-
* @returns {
|
|
733
|
+
* @returns {number}
|
|
1037
734
|
*/
|
|
1038
|
-
|
|
735
|
+
page_count(id) {
|
|
1039
736
|
try {
|
|
1040
737
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1041
738
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1042
739
|
const len0 = WASM_VECTOR_LEN;
|
|
1043
|
-
wasm.
|
|
740
|
+
wasm.wasm_page_count(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1044
741
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1045
742
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1046
743
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1047
744
|
if (r2) {
|
|
1048
745
|
throw takeObject(r1);
|
|
1049
746
|
}
|
|
1050
|
-
return
|
|
747
|
+
return r0 >>> 0;
|
|
1051
748
|
} finally {
|
|
1052
749
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1053
750
|
}
|
|
1054
751
|
}
|
|
1055
752
|
/**
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
1058
|
-
* The returned data is in premultiplied alpha format, suitable for
|
|
1059
|
-
* use with `ImageData` and canvas rendering.
|
|
753
|
+
* Get the page groups for a document.
|
|
1060
754
|
*
|
|
1061
|
-
*
|
|
1062
|
-
*
|
|
1063
|
-
*
|
|
1064
|
-
* * `width` - Output width in pixels
|
|
1065
|
-
* * `height` - Output height in pixels
|
|
755
|
+
* Each group covers a contiguous range of global page indices with a
|
|
756
|
+
* shared stitching layout. Use this to build per-group canvases (e.g.,
|
|
757
|
+
* one panel per Excel sheet) and group-named sidebars.
|
|
1066
758
|
*
|
|
1067
|
-
*
|
|
1068
|
-
*
|
|
759
|
+
* - PDF/DOCX: one `linear` group covering all pages, no name.
|
|
760
|
+
* - PPTX: one `linear` group (per-section groups once sections are modeled).
|
|
761
|
+
* - XLSX: one `tiled` group per sheet with the sheet name and page-grid dimensions.
|
|
1069
762
|
* @param {string} id
|
|
1070
|
-
* @
|
|
1071
|
-
* @param {number} width
|
|
1072
|
-
* @param {number} height
|
|
1073
|
-
* @returns {Uint8Array}
|
|
763
|
+
* @returns {JsPageGroup[]}
|
|
1074
764
|
*/
|
|
1075
|
-
|
|
765
|
+
page_groups(id) {
|
|
1076
766
|
try {
|
|
1077
767
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1078
768
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1079
769
|
const len0 = WASM_VECTOR_LEN;
|
|
1080
|
-
wasm.
|
|
770
|
+
wasm.wasm_page_groups(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1081
771
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1082
772
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1083
773
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1085,28 +775,71 @@ ${val.stack}`;
|
|
|
1085
775
|
if (r3) {
|
|
1086
776
|
throw takeObject(r2);
|
|
1087
777
|
}
|
|
1088
|
-
var v2 =
|
|
1089
|
-
wasm.__wbindgen_export4(r0, r1 *
|
|
778
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
779
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
1090
780
|
return v2;
|
|
1091
781
|
} finally {
|
|
1092
782
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1093
783
|
}
|
|
1094
784
|
}
|
|
1095
785
|
/**
|
|
1096
|
-
* Get
|
|
1097
|
-
*
|
|
1098
|
-
* Returns an array of annotation objects for the given page.
|
|
1099
|
-
* Uses per-page loading for efficiency (only loads the requested page).
|
|
786
|
+
* Get info for a specific page.
|
|
1100
787
|
* @param {string} id
|
|
1101
788
|
* @param {number} page_index
|
|
1102
|
-
* @returns {
|
|
789
|
+
* @returns {JsPageInfo}
|
|
1103
790
|
*/
|
|
1104
|
-
|
|
791
|
+
page_info(id, page_index) {
|
|
1105
792
|
try {
|
|
1106
793
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1107
794
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1108
795
|
const len0 = WASM_VECTOR_LEN;
|
|
1109
|
-
wasm.
|
|
796
|
+
wasm.wasm_page_info(retptr, this.__wbg_ptr, ptr0, len0, page_index);
|
|
797
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
798
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
799
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
800
|
+
if (r2) {
|
|
801
|
+
throw takeObject(r1);
|
|
802
|
+
}
|
|
803
|
+
return takeObject(r0);
|
|
804
|
+
} finally {
|
|
805
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Compose new PDF documents by cherry-picking pages from source documents.
|
|
810
|
+
*
|
|
811
|
+
* The original documents remain unchanged.
|
|
812
|
+
*
|
|
813
|
+
* # Arguments
|
|
814
|
+
* * `compositions` - Array of compositions. Each composition is an array of picks.
|
|
815
|
+
* Each pick is `{ doc: docIndex, pages: "0-2,4" }` where `docIndex` is the index
|
|
816
|
+
* in the `doc_ids` array and `pages` is a page range string (0-based).
|
|
817
|
+
* * `doc_ids` - Array of document IDs to use as sources (order matters for doc indices)
|
|
818
|
+
*
|
|
819
|
+
* # Example
|
|
820
|
+
* ```js
|
|
821
|
+
* // Create two documents: first has pages 0-2 from doc A, second has page 0 from A and 1 from B
|
|
822
|
+
* const newDocIds = udoc.pdf_compose(
|
|
823
|
+
* [
|
|
824
|
+
* [{ doc: 0, pages: "0-2" }],
|
|
825
|
+
* [{ doc: 0, pages: "0" }, { doc: 1, pages: "1" }]
|
|
826
|
+
* ],
|
|
827
|
+
* ["doc_0", "doc_1"]
|
|
828
|
+
* );
|
|
829
|
+
* ```
|
|
830
|
+
*
|
|
831
|
+
* # Returns
|
|
832
|
+
* Array of IDs for the newly created documents (one per composition).
|
|
833
|
+
* @param {JsCompositions} compositions
|
|
834
|
+
* @param {string[]} doc_ids
|
|
835
|
+
* @returns {string[]}
|
|
836
|
+
*/
|
|
837
|
+
pdf_compose(compositions, doc_ids) {
|
|
838
|
+
try {
|
|
839
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
840
|
+
const ptr0 = passArrayJsValueToWasm0(doc_ids, wasm.__wbindgen_export);
|
|
841
|
+
const len0 = WASM_VECTOR_LEN;
|
|
842
|
+
wasm.wasm_pdf_compose(retptr, this.__wbg_ptr, addHeapObject(compositions), ptr0, len0);
|
|
1110
843
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1111
844
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1112
845
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1122,37 +855,28 @@ ${val.stack}`;
|
|
|
1122
855
|
}
|
|
1123
856
|
}
|
|
1124
857
|
/**
|
|
1125
|
-
*
|
|
858
|
+
* Compress a PDF document.
|
|
1126
859
|
*
|
|
1127
|
-
*
|
|
1128
|
-
*
|
|
1129
|
-
*
|
|
860
|
+
* Saves the document with full compression options enabled:
|
|
861
|
+
* - Compress stream data using FlateDecode
|
|
862
|
+
* - Pack objects into compressed object streams (PDF 1.5+)
|
|
863
|
+
* - Use compressed xref streams (PDF 1.5+)
|
|
864
|
+
* - Remove unreferenced objects
|
|
1130
865
|
*
|
|
1131
866
|
* # Arguments
|
|
1132
|
-
* * `doc_id` - Document ID
|
|
1133
|
-
* * `annotations_by_page` - Object mapping page indices (as strings) to
|
|
1134
|
-
* arrays of annotation objects. Same schema as returned by
|
|
1135
|
-
* `get_all_annotations`.
|
|
867
|
+
* * `doc_id` - Document ID to compress
|
|
1136
868
|
*
|
|
1137
869
|
* # Returns
|
|
1138
|
-
*
|
|
1139
|
-
*
|
|
1140
|
-
* # Example (JavaScript)
|
|
1141
|
-
* ```js
|
|
1142
|
-
* const annotations = udoc.get_all_annotations(docId);
|
|
1143
|
-
* // ... viewer edits annotations ...
|
|
1144
|
-
* const pdfBytes = udoc.pdf_save_annotations(docId, annotations);
|
|
1145
|
-
* ```
|
|
870
|
+
* Compressed PDF data as Uint8Array
|
|
1146
871
|
* @param {string} doc_id
|
|
1147
|
-
* @param {JsAnnotationsByPage} annotations_by_page
|
|
1148
872
|
* @returns {Uint8Array}
|
|
1149
873
|
*/
|
|
1150
|
-
|
|
874
|
+
pdf_compress(doc_id) {
|
|
1151
875
|
try {
|
|
1152
876
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1153
877
|
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1154
878
|
const len0 = WASM_VECTOR_LEN;
|
|
1155
|
-
wasm.
|
|
879
|
+
wasm.wasm_pdf_compress(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1156
880
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1157
881
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1158
882
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1168,59 +892,60 @@ ${val.stack}`;
|
|
|
1168
892
|
}
|
|
1169
893
|
}
|
|
1170
894
|
/**
|
|
1171
|
-
*
|
|
895
|
+
* Decompress a PDF document.
|
|
1172
896
|
*
|
|
1173
|
-
*
|
|
897
|
+
* Removes all filter encodings from streams, resulting in raw,
|
|
898
|
+
* uncompressed stream data. Useful for debugging or inspection.
|
|
1174
899
|
*
|
|
1175
900
|
* # Arguments
|
|
1176
|
-
* * `doc_id` - Document ID to
|
|
1177
|
-
* * `max_level` - Maximum outline level to consider (1 = top level only)
|
|
1178
|
-
* * `split_mid_page` - When true, filters page content when sections share a page
|
|
901
|
+
* * `doc_id` - Document ID to decompress
|
|
1179
902
|
*
|
|
1180
903
|
* # Returns
|
|
1181
|
-
*
|
|
1182
|
-
* - `documentIds`: Array of IDs for the newly created documents
|
|
1183
|
-
* - `sections`: Array of section info objects with `title`, `startPage`, `level`
|
|
904
|
+
* Decompressed PDF data as Uint8Array
|
|
1184
905
|
* @param {string} doc_id
|
|
1185
|
-
* @
|
|
1186
|
-
* @param {boolean} split_mid_page
|
|
1187
|
-
* @returns {JsSplitByOutlineResult}
|
|
906
|
+
* @returns {Uint8Array}
|
|
1188
907
|
*/
|
|
1189
|
-
|
|
908
|
+
pdf_decompress(doc_id) {
|
|
1190
909
|
try {
|
|
1191
910
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1192
911
|
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1193
912
|
const len0 = WASM_VECTOR_LEN;
|
|
1194
|
-
wasm.
|
|
913
|
+
wasm.wasm_pdf_decompress(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1195
914
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1196
915
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1197
916
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1198
|
-
|
|
1199
|
-
|
|
917
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
918
|
+
if (r3) {
|
|
919
|
+
throw takeObject(r2);
|
|
1200
920
|
}
|
|
1201
|
-
|
|
921
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
922
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
923
|
+
return v2;
|
|
1202
924
|
} finally {
|
|
1203
925
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1204
926
|
}
|
|
1205
927
|
}
|
|
1206
928
|
/**
|
|
1207
|
-
*
|
|
929
|
+
* Extract all embedded fonts from a PDF document.
|
|
1208
930
|
*
|
|
1209
|
-
*
|
|
1210
|
-
*
|
|
1211
|
-
* - `name`: Display name for UI
|
|
1212
|
-
* - `visible`: Whether the group is currently visible
|
|
931
|
+
* # Arguments
|
|
932
|
+
* * `doc_id` - Document ID to extract fonts from
|
|
1213
933
|
*
|
|
1214
|
-
* Returns
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
934
|
+
* # Returns
|
|
935
|
+
* Array of extracted font objects, each with:
|
|
936
|
+
* - `name`: Font name from the resource dictionary
|
|
937
|
+
* - `fontType`: Font type (Type1, TrueType, etc.)
|
|
938
|
+
* - `extension`: File extension (ttf, cff, t1, etc.)
|
|
939
|
+
* - `data`: Raw font data as Uint8Array
|
|
940
|
+
* @param {string} doc_id
|
|
941
|
+
* @returns {JsExtractedFont[]}
|
|
1217
942
|
*/
|
|
1218
|
-
|
|
943
|
+
pdf_extract_fonts(doc_id) {
|
|
1219
944
|
try {
|
|
1220
945
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1221
|
-
const ptr0 = passStringToWasm0(
|
|
946
|
+
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1222
947
|
const len0 = WASM_VECTOR_LEN;
|
|
1223
|
-
wasm.
|
|
948
|
+
wasm.wasm_pdf_extract_fonts(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1224
949
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1225
950
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1226
951
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1236,326 +961,381 @@ ${val.stack}`;
|
|
|
1236
961
|
}
|
|
1237
962
|
}
|
|
1238
963
|
/**
|
|
1239
|
-
*
|
|
964
|
+
* Extract all embedded images from a PDF document.
|
|
1240
965
|
*
|
|
1241
966
|
* # Arguments
|
|
1242
|
-
* * `
|
|
1243
|
-
* * `
|
|
1244
|
-
* * `visible` - Whether the group should be visible
|
|
967
|
+
* * `doc_id` - Document ID to extract images from
|
|
968
|
+
* * `convert_raw_to_png` - When true, converts raw pixel data to PNG format
|
|
1245
969
|
*
|
|
1246
|
-
* Returns
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1249
|
-
*
|
|
1250
|
-
*
|
|
970
|
+
* # Returns
|
|
971
|
+
* Array of extracted image objects, each with:
|
|
972
|
+
* - `name`: Image name from the resource dictionary
|
|
973
|
+
* - `format`: Image format (jpeg, png, jp2, etc.)
|
|
974
|
+
* - `width`: Width in pixels
|
|
975
|
+
* - `height`: Height in pixels
|
|
976
|
+
* - `data`: Raw image data as Uint8Array
|
|
977
|
+
* @param {string} doc_id
|
|
978
|
+
* @param {boolean} convert_raw_to_png
|
|
979
|
+
* @returns {JsExtractedImage[]}
|
|
1251
980
|
*/
|
|
1252
|
-
|
|
981
|
+
pdf_extract_images(doc_id, convert_raw_to_png) {
|
|
1253
982
|
try {
|
|
1254
983
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1255
|
-
const ptr0 = passStringToWasm0(
|
|
984
|
+
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1256
985
|
const len0 = WASM_VECTOR_LEN;
|
|
1257
|
-
|
|
1258
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1259
|
-
wasm.wasm_set_visibility_group_visible(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, visible);
|
|
986
|
+
wasm.wasm_pdf_extract_images(retptr, this.__wbg_ptr, ptr0, len0, convert_raw_to_png);
|
|
1260
987
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1261
988
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1262
989
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1263
|
-
|
|
1264
|
-
|
|
990
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
991
|
+
if (r3) {
|
|
992
|
+
throw takeObject(r2);
|
|
1265
993
|
}
|
|
1266
|
-
|
|
994
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
995
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
996
|
+
return v2;
|
|
1267
997
|
} finally {
|
|
1268
998
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1269
999
|
}
|
|
1270
1000
|
}
|
|
1271
1001
|
/**
|
|
1272
|
-
*
|
|
1002
|
+
* Save annotations back to a PDF document.
|
|
1273
1003
|
*
|
|
1274
|
-
*
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1277
|
-
* @param {string} domain
|
|
1278
|
-
* @param {string} viewer_version
|
|
1279
|
-
*/
|
|
1280
|
-
constructor(domain, viewer_version) {
|
|
1281
|
-
const ptr0 = passStringToWasm0(domain, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1282
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1283
|
-
const ptr1 = passStringToWasm0(viewer_version, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1284
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1285
|
-
const ret = wasm.wasm_new(ptr0, len0, ptr1, len1);
|
|
1286
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1287
|
-
WasmFinalization.register(this, this.__wbg_ptr, this);
|
|
1288
|
-
return this;
|
|
1289
|
-
}
|
|
1290
|
-
/**
|
|
1291
|
-
* Load a document by auto-detecting its format from the file contents.
|
|
1004
|
+
* Takes the current document and a set of annotations (grouped by page),
|
|
1005
|
+
* writes them into the PDF's annotation structures, and returns the
|
|
1006
|
+
* modified PDF bytes.
|
|
1292
1007
|
*
|
|
1293
|
-
*
|
|
1294
|
-
*
|
|
1295
|
-
*
|
|
1296
|
-
*
|
|
1008
|
+
* # Coordinate space
|
|
1009
|
+
*
|
|
1010
|
+
* Every geometry field on the supplied annotations (`bounds`, `quads`,
|
|
1011
|
+
* `vertices`, `inkList`, `start`/`end`, `calloutLine`, …) must be in
|
|
1012
|
+
* the page's **unrotated MediaBox** coordinate space:
|
|
1013
|
+
*
|
|
1014
|
+
* - Origin = MediaBox top-left of the page in its natural (pre-`/Rotate`)
|
|
1015
|
+
* orientation. `(0, 0)` does not move when the page is displayed
|
|
1016
|
+
* rotated 90°/180°/270°.
|
|
1017
|
+
* - Units = PDF points (1/72 inch).
|
|
1018
|
+
* - Axes = `+x` right, `+y` downward (Y-flipped relative to PDF's native
|
|
1019
|
+
* bottom-up `/Rect`; this function performs the flip on the way out).
|
|
1020
|
+
* - `CropBox` is ignored — coordinates are MediaBox-relative even when
|
|
1021
|
+
* the page's CropBox trims the visible area.
|
|
1022
|
+
*
|
|
1023
|
+
* This is the same space returned by `get_page_annotations` /
|
|
1024
|
+
* `get_all_annotations`, so a load-edit-save round-trip is consistent.
|
|
1025
|
+
* Pages with no existing `/Annots` array are handled automatically: any
|
|
1026
|
+
* pre-existing array is cleared and a fresh one is created.
|
|
1297
1027
|
*
|
|
1298
1028
|
* # Arguments
|
|
1299
|
-
* * `
|
|
1029
|
+
* * `doc_id` - Document ID
|
|
1030
|
+
* * `annotations_by_page` - Object mapping page indices (as strings) to
|
|
1031
|
+
* arrays of annotation objects. Same schema as returned by
|
|
1032
|
+
* `get_all_annotations`.
|
|
1300
1033
|
*
|
|
1301
1034
|
* # Returns
|
|
1302
|
-
*
|
|
1303
|
-
*
|
|
1304
|
-
*
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1035
|
+
* The modified PDF file bytes with annotations saved.
|
|
1036
|
+
*
|
|
1037
|
+
* # Example (JavaScript)
|
|
1038
|
+
* ```js
|
|
1039
|
+
* const annotations = udoc.get_all_annotations(docId);
|
|
1040
|
+
* // ... viewer edits annotations ...
|
|
1041
|
+
* const pdfBytes = udoc.pdf_save_annotations(docId, annotations);
|
|
1042
|
+
* ```
|
|
1043
|
+
* @param {string} doc_id
|
|
1044
|
+
* @param {JsAnnotationsByPage} annotations_by_page
|
|
1045
|
+
* @returns {Uint8Array}
|
|
1046
|
+
*/
|
|
1047
|
+
pdf_save_annotations(doc_id, annotations_by_page) {
|
|
1309
1048
|
try {
|
|
1310
1049
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1311
|
-
const ptr0 =
|
|
1050
|
+
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1312
1051
|
const len0 = WASM_VECTOR_LEN;
|
|
1313
|
-
wasm.
|
|
1052
|
+
wasm.wasm_pdf_save_annotations(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(annotations_by_page));
|
|
1314
1053
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1315
1054
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1316
1055
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1317
1056
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1318
|
-
var ptr2 = r0;
|
|
1319
|
-
var len2 = r1;
|
|
1320
1057
|
if (r3) {
|
|
1321
|
-
ptr2 = 0;
|
|
1322
|
-
len2 = 0;
|
|
1323
1058
|
throw takeObject(r2);
|
|
1324
1059
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
return
|
|
1060
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1061
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1062
|
+
return v2;
|
|
1328
1063
|
} finally {
|
|
1329
1064
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1330
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1331
1065
|
}
|
|
1332
1066
|
}
|
|
1333
1067
|
/**
|
|
1334
|
-
*
|
|
1335
|
-
* @returns {boolean}
|
|
1336
|
-
*/
|
|
1337
|
-
has_gpu() {
|
|
1338
|
-
const ret = wasm.wasm_has_gpu(this.__wbg_ptr);
|
|
1339
|
-
return ret !== 0;
|
|
1340
|
-
}
|
|
1341
|
-
/**
|
|
1342
|
-
* Initialize the GPU render backend (Vello + WebGPU).
|
|
1068
|
+
* Split a PDF document by its outline (bookmarks) structure.
|
|
1343
1069
|
*
|
|
1344
|
-
*
|
|
1345
|
-
* to the browser event loop. Call this once after construction.
|
|
1346
|
-
* Returns `true` if GPU initialization succeeded, `false` if no
|
|
1347
|
-
* WebGPU adapter is available (the CPU backend remains usable).
|
|
1348
|
-
* @returns {Promise<boolean>}
|
|
1349
|
-
*/
|
|
1350
|
-
init_gpu() {
|
|
1351
|
-
const ret = wasm.wasm_init_gpu(this.__wbg_ptr);
|
|
1352
|
-
return takeObject(ret);
|
|
1353
|
-
}
|
|
1354
|
-
/**
|
|
1355
|
-
* Load a PDF document and return its ID.
|
|
1070
|
+
* Creates multiple documents, one for each outline section at the specified level.
|
|
1356
1071
|
*
|
|
1357
1072
|
* # Arguments
|
|
1358
|
-
* * `
|
|
1073
|
+
* * `doc_id` - Document ID to split
|
|
1074
|
+
* * `max_level` - Maximum outline level to consider (1 = top level only)
|
|
1075
|
+
* * `split_mid_page` - When true, filters page content when sections share a page
|
|
1359
1076
|
*
|
|
1360
1077
|
* # Returns
|
|
1361
|
-
*
|
|
1362
|
-
*
|
|
1363
|
-
*
|
|
1078
|
+
* Object with:
|
|
1079
|
+
* - `documentIds`: Array of IDs for the newly created documents
|
|
1080
|
+
* - `sections`: Array of section info objects with `title`, `startPage`, `level`
|
|
1081
|
+
* @param {string} doc_id
|
|
1082
|
+
* @param {number} max_level
|
|
1083
|
+
* @param {boolean} split_mid_page
|
|
1084
|
+
* @returns {JsSplitByOutlineResult}
|
|
1364
1085
|
*/
|
|
1365
|
-
|
|
1366
|
-
let deferred3_0;
|
|
1367
|
-
let deferred3_1;
|
|
1086
|
+
pdf_split_by_outline(doc_id, max_level, split_mid_page) {
|
|
1368
1087
|
try {
|
|
1369
1088
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1370
|
-
const ptr0 =
|
|
1089
|
+
const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1371
1090
|
const len0 = WASM_VECTOR_LEN;
|
|
1372
|
-
wasm.
|
|
1091
|
+
wasm.wasm_pdf_split_by_outline(retptr, this.__wbg_ptr, ptr0, len0, max_level, split_mid_page);
|
|
1373
1092
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1374
1093
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1375
1094
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
var len2 = r1;
|
|
1379
|
-
if (r3) {
|
|
1380
|
-
ptr2 = 0;
|
|
1381
|
-
len2 = 0;
|
|
1382
|
-
throw takeObject(r2);
|
|
1095
|
+
if (r2) {
|
|
1096
|
+
throw takeObject(r1);
|
|
1383
1097
|
}
|
|
1384
|
-
|
|
1385
|
-
deferred3_1 = len2;
|
|
1386
|
-
return getStringFromWasm0(ptr2, len2);
|
|
1098
|
+
return takeObject(r0);
|
|
1387
1099
|
} finally {
|
|
1388
1100
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1389
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1390
1101
|
}
|
|
1391
1102
|
}
|
|
1392
1103
|
/**
|
|
1393
|
-
*
|
|
1104
|
+
* Register font URLs.
|
|
1394
1105
|
*
|
|
1395
|
-
*
|
|
1396
|
-
*
|
|
1397
|
-
*
|
|
1106
|
+
* The caller provides a list of all available fonts with their download
|
|
1107
|
+
* URLs. During layout, when the engine needs a font, it is fetched from
|
|
1108
|
+
* the URL, parsed, and cached for reuse.
|
|
1109
|
+
*
|
|
1110
|
+
* Call this before loading documents. Registered fonts are automatically
|
|
1111
|
+
* applied to every document loaded afterward. URL fonts are always
|
|
1112
|
+
* resolved before Google Fonts.
|
|
1113
|
+
*
|
|
1114
|
+
* # Arguments
|
|
1115
|
+
* * `fonts` - Array of font entries: `[{ typeface: "Roboto", bold: false, italic: false, url: "https://..." }, ...]`
|
|
1116
|
+
*
|
|
1117
|
+
* # Example (JavaScript)
|
|
1118
|
+
* ```js
|
|
1119
|
+
* // Register available fonts before loading documents
|
|
1120
|
+
* udoc.registerFonts([
|
|
1121
|
+
* { typeface: "Roboto", bold: false, italic: false, url: "https://cdn.example.com/Roboto-Regular.woff2" },
|
|
1122
|
+
* { typeface: "Roboto", bold: true, italic: false, url: "https://cdn.example.com/Roboto-Bold.woff2" },
|
|
1123
|
+
* ]);
|
|
1124
|
+
*
|
|
1125
|
+
* // Load and render - fonts are fetched on demand during layout
|
|
1126
|
+
* const docId = udoc.loadPptx(pptxBytes);
|
|
1127
|
+
* const pixels = udoc.renderPageToRgba(docId, 0, 800, 600);
|
|
1128
|
+
* ```
|
|
1129
|
+
* @param {JsFontRegistration[]} fonts
|
|
1398
1130
|
*/
|
|
1399
|
-
|
|
1131
|
+
registerFonts(fonts) {
|
|
1400
1132
|
try {
|
|
1401
1133
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1402
|
-
const ptr0 =
|
|
1134
|
+
const ptr0 = passArrayJsValueToWasm0(fonts, wasm.__wbindgen_export);
|
|
1403
1135
|
const len0 = WASM_VECTOR_LEN;
|
|
1404
|
-
wasm.
|
|
1136
|
+
wasm.wasm_registerFonts(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1405
1137
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1406
1138
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
if (r3) {
|
|
1410
|
-
throw takeObject(r2);
|
|
1139
|
+
if (r1) {
|
|
1140
|
+
throw takeObject(r0);
|
|
1411
1141
|
}
|
|
1412
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1413
|
-
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1414
|
-
return v2;
|
|
1415
1142
|
} finally {
|
|
1416
1143
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1417
1144
|
}
|
|
1418
1145
|
}
|
|
1419
1146
|
/**
|
|
1420
|
-
*
|
|
1147
|
+
* Remove a document by ID.
|
|
1421
1148
|
*
|
|
1422
|
-
* Returns
|
|
1423
|
-
* @param {string}
|
|
1424
|
-
* @
|
|
1425
|
-
* @returns {bigint}
|
|
1149
|
+
* Returns true if the document was removed, false if it didn't exist.
|
|
1150
|
+
* @param {string} id
|
|
1151
|
+
* @returns {boolean}
|
|
1426
1152
|
*/
|
|
1427
|
-
|
|
1428
|
-
const ptr0 = passStringToWasm0(
|
|
1153
|
+
remove_document(id) {
|
|
1154
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1429
1155
|
const len0 = WASM_VECTOR_LEN;
|
|
1430
|
-
const ret = wasm.
|
|
1431
|
-
return
|
|
1156
|
+
const ret = wasm.wasm_remove_document(this.__wbg_ptr, ptr0, len0);
|
|
1157
|
+
return ret !== 0;
|
|
1432
1158
|
}
|
|
1433
1159
|
/**
|
|
1434
|
-
*
|
|
1160
|
+
* Render a page using the GPU backend (Vello + WebGPU).
|
|
1161
|
+
*
|
|
1162
|
+
* Returns raw RGBA pixel data in premultiplied alpha format,
|
|
1163
|
+
* identical to `render_page_to_rgba` but GPU-accelerated.
|
|
1164
|
+
*
|
|
1165
|
+
* # Errors
|
|
1166
|
+
* Returns an error if the GPU backend is not initialized
|
|
1167
|
+
* (call `init_gpu()` first), if the document is not found,
|
|
1168
|
+
* or if rendering fails.
|
|
1169
|
+
* @param {string} id
|
|
1170
|
+
* @param {number} page_index
|
|
1171
|
+
* @param {number} width
|
|
1172
|
+
* @param {number} height
|
|
1173
|
+
* @returns {Promise<Uint8Array>}
|
|
1174
|
+
*/
|
|
1175
|
+
render_page_gpu(id, page_index, width, height) {
|
|
1176
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1177
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1178
|
+
const ret = wasm.wasm_render_page_gpu(this.__wbg_ptr, ptr0, len0, page_index, width, height);
|
|
1179
|
+
return takeObject(ret);
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Render a page to PNG bytes.
|
|
1435
1183
|
*
|
|
1436
1184
|
* # Arguments
|
|
1437
|
-
* * `
|
|
1185
|
+
* * `id` - Document ID
|
|
1186
|
+
* * `page_index` - Zero-based page index
|
|
1187
|
+
* * `width` - Output width in pixels
|
|
1188
|
+
* * `height` - Output height in pixels
|
|
1438
1189
|
*
|
|
1439
1190
|
* # Returns
|
|
1440
|
-
*
|
|
1441
|
-
* @param {
|
|
1442
|
-
* @
|
|
1191
|
+
* PNG-encoded image data as a byte array.
|
|
1192
|
+
* @param {string} id
|
|
1193
|
+
* @param {number} page_index
|
|
1194
|
+
* @param {number} width
|
|
1195
|
+
* @param {number} height
|
|
1196
|
+
* @returns {Uint8Array}
|
|
1443
1197
|
*/
|
|
1444
|
-
|
|
1445
|
-
let deferred3_0;
|
|
1446
|
-
let deferred3_1;
|
|
1198
|
+
render_page_to_png(id, page_index, width, height) {
|
|
1447
1199
|
try {
|
|
1448
1200
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1449
|
-
const ptr0 =
|
|
1201
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1450
1202
|
const len0 = WASM_VECTOR_LEN;
|
|
1451
|
-
wasm.
|
|
1203
|
+
wasm.wasm_render_page_to_png(retptr, this.__wbg_ptr, ptr0, len0, page_index, width, height);
|
|
1452
1204
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1453
1205
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1454
1206
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1455
1207
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1456
|
-
var ptr2 = r0;
|
|
1457
|
-
var len2 = r1;
|
|
1458
1208
|
if (r3) {
|
|
1459
|
-
ptr2 = 0;
|
|
1460
|
-
len2 = 0;
|
|
1461
1209
|
throw takeObject(r2);
|
|
1462
1210
|
}
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
return
|
|
1211
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1212
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1213
|
+
return v2;
|
|
1466
1214
|
} finally {
|
|
1467
1215
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1468
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1469
1216
|
}
|
|
1470
1217
|
}
|
|
1471
1218
|
/**
|
|
1472
|
-
*
|
|
1219
|
+
* Render a page to raw RGBA pixel data.
|
|
1220
|
+
*
|
|
1221
|
+
* The returned data is in premultiplied alpha format, suitable for
|
|
1222
|
+
* use with `ImageData` and canvas rendering.
|
|
1473
1223
|
*
|
|
1474
1224
|
* # Arguments
|
|
1475
|
-
* * `
|
|
1225
|
+
* * `id` - Document ID
|
|
1226
|
+
* * `page_index` - Zero-based page index
|
|
1227
|
+
* * `width` - Output width in pixels
|
|
1228
|
+
* * `height` - Output height in pixels
|
|
1476
1229
|
*
|
|
1477
1230
|
* # Returns
|
|
1478
|
-
*
|
|
1479
|
-
* @param {
|
|
1480
|
-
* @
|
|
1231
|
+
* Raw RGBA pixel data (width * height * 4 bytes).
|
|
1232
|
+
* @param {string} id
|
|
1233
|
+
* @param {number} page_index
|
|
1234
|
+
* @param {number} width
|
|
1235
|
+
* @param {number} height
|
|
1236
|
+
* @returns {Uint8Array}
|
|
1481
1237
|
*/
|
|
1482
|
-
|
|
1483
|
-
let deferred3_0;
|
|
1484
|
-
let deferred3_1;
|
|
1238
|
+
render_page_to_rgba(id, page_index, width, height) {
|
|
1485
1239
|
try {
|
|
1486
1240
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1487
|
-
const ptr0 =
|
|
1241
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1488
1242
|
const len0 = WASM_VECTOR_LEN;
|
|
1489
|
-
wasm.
|
|
1243
|
+
wasm.wasm_render_page_to_rgba(retptr, this.__wbg_ptr, ptr0, len0, page_index, width, height);
|
|
1490
1244
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1491
1245
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1492
1246
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1493
1247
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1494
|
-
var ptr2 = r0;
|
|
1495
|
-
var len2 = r1;
|
|
1496
1248
|
if (r3) {
|
|
1497
|
-
ptr2 = 0;
|
|
1498
|
-
len2 = 0;
|
|
1499
1249
|
throw takeObject(r2);
|
|
1500
1250
|
}
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
return
|
|
1251
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1252
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1253
|
+
return v2;
|
|
1504
1254
|
} finally {
|
|
1505
1255
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1506
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1507
1256
|
}
|
|
1508
1257
|
}
|
|
1509
1258
|
/**
|
|
1510
|
-
*
|
|
1259
|
+
* Set the license key.
|
|
1511
1260
|
*
|
|
1512
1261
|
* # Arguments
|
|
1513
|
-
* * `
|
|
1262
|
+
* * `license_key` - The license key string
|
|
1514
1263
|
*
|
|
1515
1264
|
* # Returns
|
|
1516
|
-
*
|
|
1517
|
-
* @param {
|
|
1518
|
-
* @returns {
|
|
1265
|
+
* License validation result as JSON.
|
|
1266
|
+
* @param {string} license_key
|
|
1267
|
+
* @returns {LicenseResult}
|
|
1519
1268
|
*/
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1269
|
+
set_license(license_key) {
|
|
1270
|
+
const ptr0 = passStringToWasm0(license_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1271
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1272
|
+
const ret = wasm.wasm_set_license(this.__wbg_ptr, ptr0, len0);
|
|
1273
|
+
return takeObject(ret);
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Set the visibility of a specific visibility group.
|
|
1277
|
+
*
|
|
1278
|
+
* # Arguments
|
|
1279
|
+
* * `id` - Document ID
|
|
1280
|
+
* * `group_id` - Visibility group ID
|
|
1281
|
+
* * `visible` - Whether the group should be visible
|
|
1282
|
+
*
|
|
1283
|
+
* Returns `true` if the group was found and updated, `false` if not found.
|
|
1284
|
+
* @param {string} id
|
|
1285
|
+
* @param {string} group_id
|
|
1286
|
+
* @param {boolean} visible
|
|
1287
|
+
* @returns {boolean}
|
|
1288
|
+
*/
|
|
1289
|
+
set_visibility_group_visible(id, group_id, visible) {
|
|
1523
1290
|
try {
|
|
1524
1291
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1525
|
-
const ptr0 =
|
|
1292
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1526
1293
|
const len0 = WASM_VECTOR_LEN;
|
|
1527
|
-
|
|
1294
|
+
const ptr1 = passStringToWasm0(group_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1295
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1296
|
+
wasm.wasm_set_visibility_group_visible(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, visible);
|
|
1528
1297
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1529
1298
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1530
1299
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
var len2 = r1;
|
|
1534
|
-
if (r3) {
|
|
1535
|
-
ptr2 = 0;
|
|
1536
|
-
len2 = 0;
|
|
1537
|
-
throw takeObject(r2);
|
|
1300
|
+
if (r2) {
|
|
1301
|
+
throw takeObject(r1);
|
|
1538
1302
|
}
|
|
1539
|
-
|
|
1540
|
-
deferred3_1 = len2;
|
|
1541
|
-
return getStringFromWasm0(ptr2, len2);
|
|
1303
|
+
return r0 !== 0;
|
|
1542
1304
|
} finally {
|
|
1543
1305
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1544
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
1545
1306
|
}
|
|
1546
1307
|
}
|
|
1547
1308
|
/**
|
|
1548
|
-
*
|
|
1309
|
+
* Set the anonymous distinct ID for telemetry tracking.
|
|
1310
|
+
*
|
|
1311
|
+
* Call this after `new()` once the ID has been read from localStorage
|
|
1312
|
+
* (or generated). Must be called before loading documents so that
|
|
1313
|
+
* telemetry events include the correct metadata.
|
|
1314
|
+
*
|
|
1315
|
+
* # Arguments
|
|
1316
|
+
* * `distinct_id` - Anonymous UUID for per-user tracking (persisted in localStorage)
|
|
1317
|
+
* @param {string} distinct_id
|
|
1318
|
+
*/
|
|
1319
|
+
setup_telemetry(distinct_id) {
|
|
1320
|
+
const ptr0 = passStringToWasm0(distinct_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1321
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1322
|
+
wasm.wasm_setup_telemetry(this.__wbg_ptr, ptr0, len0);
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Get viewer preferences embedded in the document.
|
|
1326
|
+
*
|
|
1327
|
+
* Returns a `JsViewerPreferences` with optional fields:
|
|
1328
|
+
* - `layoutMode`: `"single-page"` | `"double-page-odd-right"` | `"double-page-odd-left"`
|
|
1329
|
+
* - `scrollMode`: `"spread"` | `"continuous"`
|
|
1549
1330
|
* @param {string} id
|
|
1550
|
-
* @
|
|
1551
|
-
* @returns {JsPageInfo}
|
|
1331
|
+
* @returns {JsViewerPreferences}
|
|
1552
1332
|
*/
|
|
1553
|
-
|
|
1333
|
+
viewer_preferences(id) {
|
|
1554
1334
|
try {
|
|
1555
1335
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1556
1336
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1557
1337
|
const len0 = WASM_VECTOR_LEN;
|
|
1558
|
-
wasm.
|
|
1338
|
+
wasm.wasm_viewer_preferences(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1559
1339
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1560
1340
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1561
1341
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1586,1007 +1366,1313 @@ ${val.stack}`;
|
|
|
1586
1366
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1587
1367
|
}
|
|
1588
1368
|
}
|
|
1589
|
-
var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
|
|
1590
|
-
async function __wbg_load(module2, imports) {
|
|
1591
|
-
if (typeof Response === "function" && module2 instanceof Response) {
|
|
1592
|
-
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
1593
|
-
try {
|
|
1594
|
-
return await WebAssembly.instantiateStreaming(module2, imports);
|
|
1595
|
-
} catch (e) {
|
|
1596
|
-
const validResponse = module2.ok && EXPECTED_RESPONSE_TYPES.has(module2.type);
|
|
1597
|
-
if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
|
|
1598
|
-
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);
|
|
1599
|
-
} else {
|
|
1600
|
-
throw e;
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
const bytes = await module2.arrayBuffer();
|
|
1605
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
1606
|
-
} else {
|
|
1607
|
-
const instance = await WebAssembly.instantiate(module2, imports);
|
|
1608
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
1609
|
-
return { instance, module: module2 };
|
|
1610
|
-
} else {
|
|
1611
|
-
return instance;
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
1369
|
function __wbg_get_imports() {
|
|
1616
|
-
const
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
return addHeapObject(ret);
|
|
1621
|
-
};
|
|
1622
|
-
imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
|
|
1623
|
-
const ret = Number(getObject(arg0));
|
|
1624
|
-
return ret;
|
|
1625
|
-
};
|
|
1626
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1627
|
-
const ret = String(getObject(arg1));
|
|
1628
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1629
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1630
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1631
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1632
|
-
};
|
|
1633
|
-
imports.wbg.__wbg_Window_a4c5a48392f234ba = function(arg0) {
|
|
1634
|
-
const ret = getObject(arg0).Window;
|
|
1635
|
-
return addHeapObject(ret);
|
|
1636
|
-
};
|
|
1637
|
-
imports.wbg.__wbg_WorkerGlobalScope_2b2b89e1ac952b50 = function(arg0) {
|
|
1638
|
-
const ret = getObject(arg0).WorkerGlobalScope;
|
|
1639
|
-
return addHeapObject(ret);
|
|
1640
|
-
};
|
|
1641
|
-
imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
|
|
1642
|
-
const v = getObject(arg1);
|
|
1643
|
-
const ret = typeof v === "bigint" ? v : void 0;
|
|
1644
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1645
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1646
|
-
};
|
|
1647
|
-
imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
1648
|
-
const v = getObject(arg0);
|
|
1649
|
-
const ret = typeof v === "boolean" ? v : void 0;
|
|
1650
|
-
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
1651
|
-
};
|
|
1652
|
-
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
1653
|
-
const ret = debugString(getObject(arg1));
|
|
1654
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1655
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1656
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1657
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1658
|
-
};
|
|
1659
|
-
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
1660
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
1661
|
-
return ret;
|
|
1662
|
-
};
|
|
1663
|
-
imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
1664
|
-
const ret = typeof getObject(arg0) === "bigint";
|
|
1665
|
-
return ret;
|
|
1666
|
-
};
|
|
1667
|
-
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
1668
|
-
const ret = typeof getObject(arg0) === "function";
|
|
1669
|
-
return ret;
|
|
1670
|
-
};
|
|
1671
|
-
imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5 = function(arg0) {
|
|
1672
|
-
const ret = getObject(arg0) === null;
|
|
1673
|
-
return ret;
|
|
1674
|
-
};
|
|
1675
|
-
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
1676
|
-
const val = getObject(arg0);
|
|
1677
|
-
const ret = typeof val === "object" && val !== null;
|
|
1678
|
-
return ret;
|
|
1679
|
-
};
|
|
1680
|
-
imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
1681
|
-
const ret = typeof getObject(arg0) === "string";
|
|
1682
|
-
return ret;
|
|
1683
|
-
};
|
|
1684
|
-
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
1685
|
-
const ret = getObject(arg0) === void 0;
|
|
1686
|
-
return ret;
|
|
1687
|
-
};
|
|
1688
|
-
imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
1689
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
1690
|
-
return ret;
|
|
1691
|
-
};
|
|
1692
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
1693
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
1694
|
-
return ret;
|
|
1695
|
-
};
|
|
1696
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
1697
|
-
const obj = getObject(arg1);
|
|
1698
|
-
const ret = typeof obj === "number" ? obj : void 0;
|
|
1699
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1700
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1701
|
-
};
|
|
1702
|
-
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
1703
|
-
const obj = getObject(arg1);
|
|
1704
|
-
const ret = typeof obj === "string" ? obj : void 0;
|
|
1705
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1706
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1707
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1708
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1709
|
-
};
|
|
1710
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
1711
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1712
|
-
};
|
|
1713
|
-
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
1714
|
-
getObject(arg0)._wbg_cb_unref();
|
|
1715
|
-
};
|
|
1716
|
-
imports.wbg.__wbg_beginComputePass_304dccb30a4db2cc = function(arg0, arg1) {
|
|
1717
|
-
const ret = getObject(arg0).beginComputePass(getObject(arg1));
|
|
1718
|
-
return addHeapObject(ret);
|
|
1719
|
-
};
|
|
1720
|
-
imports.wbg.__wbg_buffer_6cb2fecb1f253d71 = function(arg0) {
|
|
1721
|
-
const ret = getObject(arg0).buffer;
|
|
1722
|
-
return addHeapObject(ret);
|
|
1723
|
-
};
|
|
1724
|
-
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() {
|
|
1725
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
1726
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1727
|
-
return addHeapObject(ret);
|
|
1728
|
-
}, arguments);
|
|
1729
|
-
};
|
|
1730
|
-
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() {
|
|
1731
|
-
return handleError(function(arg0, arg1) {
|
|
1732
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
1370
|
+
const import0 = {
|
|
1371
|
+
__proto__: null,
|
|
1372
|
+
__wbg_Error_ef53bc310eb298a0: function(arg0, arg1) {
|
|
1373
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1733
1374
|
return addHeapObject(ret);
|
|
1734
|
-
},
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1375
|
+
},
|
|
1376
|
+
__wbg_Number_6b506e6536831eaa: function(arg0) {
|
|
1377
|
+
const ret = Number(getObject(arg0));
|
|
1378
|
+
return ret;
|
|
1379
|
+
},
|
|
1380
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
1381
|
+
const ret = String(getObject(arg1));
|
|
1382
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1383
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1384
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1385
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1386
|
+
},
|
|
1387
|
+
__wbg_Window_defb2c76b3875a73: function(arg0) {
|
|
1388
|
+
const ret = getObject(arg0).Window;
|
|
1739
1389
|
return addHeapObject(ret);
|
|
1740
|
-
},
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
getObject(arg0).clearBuffer(getObject(arg1), arg2, arg3);
|
|
1744
|
-
};
|
|
1745
|
-
imports.wbg.__wbg_clearBuffer_e3fa352fcc8ecc67 = function(arg0, arg1, arg2) {
|
|
1746
|
-
getObject(arg0).clearBuffer(getObject(arg1), arg2);
|
|
1747
|
-
};
|
|
1748
|
-
imports.wbg.__wbg_copyBufferToBuffer_38cb6919320bd451 = function() {
|
|
1749
|
-
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1750
|
-
getObject(arg0).copyBufferToBuffer(getObject(arg1), arg2, getObject(arg3), arg4, arg5);
|
|
1751
|
-
}, arguments);
|
|
1752
|
-
};
|
|
1753
|
-
imports.wbg.__wbg_copyBufferToBuffer_8db6b1d1ef2bcea4 = function() {
|
|
1754
|
-
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
1755
|
-
getObject(arg0).copyBufferToBuffer(getObject(arg1), arg2, getObject(arg3), arg4);
|
|
1756
|
-
}, arguments);
|
|
1757
|
-
};
|
|
1758
|
-
imports.wbg.__wbg_copyTextureToBuffer_21b9dc9b4d87baf0 = function() {
|
|
1759
|
-
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1760
|
-
getObject(arg0).copyTextureToBuffer(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1761
|
-
}, arguments);
|
|
1762
|
-
};
|
|
1763
|
-
imports.wbg.__wbg_copyTextureToTexture_0eb51a215ab2cc31 = function() {
|
|
1764
|
-
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1765
|
-
getObject(arg0).copyTextureToTexture(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1766
|
-
}, arguments);
|
|
1767
|
-
};
|
|
1768
|
-
imports.wbg.__wbg_createBindGroupLayout_3fb59c14aed4b64e = function() {
|
|
1769
|
-
return handleError(function(arg0, arg1) {
|
|
1770
|
-
const ret = getObject(arg0).createBindGroupLayout(getObject(arg1));
|
|
1390
|
+
},
|
|
1391
|
+
__wbg_WorkerGlobalScope_184e45d6565eb3f0: function(arg0) {
|
|
1392
|
+
const ret = getObject(arg0).WorkerGlobalScope;
|
|
1771
1393
|
return addHeapObject(ret);
|
|
1772
|
-
},
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
const
|
|
1394
|
+
},
|
|
1395
|
+
__wbg___wbindgen_bigint_get_as_i64_38130e98eecd467d: function(arg0, arg1) {
|
|
1396
|
+
const v = getObject(arg1);
|
|
1397
|
+
const ret = typeof v === "bigint" ? v : void 0;
|
|
1398
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1399
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1400
|
+
},
|
|
1401
|
+
__wbg___wbindgen_boolean_get_1a45e2c38d4d41b9: function(arg0) {
|
|
1402
|
+
const v = getObject(arg0);
|
|
1403
|
+
const ret = typeof v === "boolean" ? v : void 0;
|
|
1404
|
+
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
1405
|
+
},
|
|
1406
|
+
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(arg0, arg1) {
|
|
1407
|
+
const ret = debugString(getObject(arg1));
|
|
1408
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1409
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1410
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1411
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1412
|
+
},
|
|
1413
|
+
__wbg___wbindgen_in_70a403a56e771704: function(arg0, arg1) {
|
|
1414
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
1415
|
+
return ret;
|
|
1416
|
+
},
|
|
1417
|
+
__wbg___wbindgen_is_bigint_6ffd6468a9bc44b9: function(arg0) {
|
|
1418
|
+
const ret = typeof getObject(arg0) === "bigint";
|
|
1419
|
+
return ret;
|
|
1420
|
+
},
|
|
1421
|
+
__wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) {
|
|
1422
|
+
const ret = typeof getObject(arg0) === "function";
|
|
1423
|
+
return ret;
|
|
1424
|
+
},
|
|
1425
|
+
__wbg___wbindgen_is_null_87c3bfe968c6a5ad: function(arg0) {
|
|
1426
|
+
const ret = getObject(arg0) === null;
|
|
1427
|
+
return ret;
|
|
1428
|
+
},
|
|
1429
|
+
__wbg___wbindgen_is_object_56732c2bc353f41d: function(arg0) {
|
|
1430
|
+
const val = getObject(arg0);
|
|
1431
|
+
const ret = typeof val === "object" && val !== null;
|
|
1432
|
+
return ret;
|
|
1433
|
+
},
|
|
1434
|
+
__wbg___wbindgen_is_string_c236cabd84a4d769: function(arg0) {
|
|
1435
|
+
const ret = typeof getObject(arg0) === "string";
|
|
1436
|
+
return ret;
|
|
1437
|
+
},
|
|
1438
|
+
__wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) {
|
|
1439
|
+
const ret = getObject(arg0) === void 0;
|
|
1440
|
+
return ret;
|
|
1441
|
+
},
|
|
1442
|
+
__wbg___wbindgen_jsval_eq_1068e624fa87f6ab: function(arg0, arg1) {
|
|
1443
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
1444
|
+
return ret;
|
|
1445
|
+
},
|
|
1446
|
+
__wbg___wbindgen_jsval_loose_eq_2c56564c75129511: function(arg0, arg1) {
|
|
1447
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
1448
|
+
return ret;
|
|
1449
|
+
},
|
|
1450
|
+
__wbg___wbindgen_number_get_9bb1761122181af2: function(arg0, arg1) {
|
|
1451
|
+
const obj = getObject(arg1);
|
|
1452
|
+
const ret = typeof obj === "number" ? obj : void 0;
|
|
1453
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1454
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1455
|
+
},
|
|
1456
|
+
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) {
|
|
1457
|
+
const obj = getObject(arg1);
|
|
1458
|
+
const ret = typeof obj === "string" ? obj : void 0;
|
|
1459
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1460
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1461
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1462
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1463
|
+
},
|
|
1464
|
+
__wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
|
|
1465
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1466
|
+
},
|
|
1467
|
+
__wbg__wbg_cb_unref_61db23ac97f16c31: function(arg0) {
|
|
1468
|
+
getObject(arg0)._wbg_cb_unref();
|
|
1469
|
+
},
|
|
1470
|
+
__wbg_beginComputePass_1fc169dd9fc89475: function(arg0, arg1) {
|
|
1471
|
+
const ret = getObject(arg0).beginComputePass(getObject(arg1));
|
|
1781
1472
|
return addHeapObject(ret);
|
|
1782
|
-
},
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
const ret = getObject(arg0).createCommandEncoder(getObject(arg1));
|
|
1786
|
-
return addHeapObject(ret);
|
|
1787
|
-
};
|
|
1788
|
-
imports.wbg.__wbg_createComputePipeline_e6192c920efba35b = function(arg0, arg1) {
|
|
1789
|
-
const ret = getObject(arg0).createComputePipeline(getObject(arg1));
|
|
1790
|
-
return addHeapObject(ret);
|
|
1791
|
-
};
|
|
1792
|
-
imports.wbg.__wbg_createPipelineLayout_5039b0679b6b7f36 = function(arg0, arg1) {
|
|
1793
|
-
const ret = getObject(arg0).createPipelineLayout(getObject(arg1));
|
|
1794
|
-
return addHeapObject(ret);
|
|
1795
|
-
};
|
|
1796
|
-
imports.wbg.__wbg_createShaderModule_3facfe98356b79a9 = function(arg0, arg1) {
|
|
1797
|
-
const ret = getObject(arg0).createShaderModule(getObject(arg1));
|
|
1798
|
-
return addHeapObject(ret);
|
|
1799
|
-
};
|
|
1800
|
-
imports.wbg.__wbg_createTexture_49002c91188f6137 = function() {
|
|
1801
|
-
return handleError(function(arg0, arg1) {
|
|
1802
|
-
const ret = getObject(arg0).createTexture(getObject(arg1));
|
|
1473
|
+
},
|
|
1474
|
+
__wbg_buffer_d370c8cae5692933: function(arg0) {
|
|
1475
|
+
const ret = getObject(arg0).buffer;
|
|
1803
1476
|
return addHeapObject(ret);
|
|
1804
|
-
},
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1477
|
+
},
|
|
1478
|
+
__wbg_call_40e4174f169eaca7: function() {
|
|
1479
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1480
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1481
|
+
return addHeapObject(ret);
|
|
1482
|
+
}, arguments);
|
|
1483
|
+
},
|
|
1484
|
+
__wbg_call_8a89609d89f6608a: function() {
|
|
1485
|
+
return handleError(function(arg0, arg1) {
|
|
1486
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
1487
|
+
return addHeapObject(ret);
|
|
1488
|
+
}, arguments);
|
|
1489
|
+
},
|
|
1490
|
+
__wbg_call_9c758de292015997: function() {
|
|
1491
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1492
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1493
|
+
return addHeapObject(ret);
|
|
1494
|
+
}, arguments);
|
|
1495
|
+
},
|
|
1496
|
+
__wbg_clearBuffer_5c4f30438f07155a: function(arg0, arg1, arg2, arg3) {
|
|
1497
|
+
getObject(arg0).clearBuffer(getObject(arg1), arg2, arg3);
|
|
1498
|
+
},
|
|
1499
|
+
__wbg_clearBuffer_de7e8cd418b56c30: function(arg0, arg1, arg2) {
|
|
1500
|
+
getObject(arg0).clearBuffer(getObject(arg1), arg2);
|
|
1501
|
+
},
|
|
1502
|
+
__wbg_copyBufferToBuffer_55e9540007aef863: function() {
|
|
1503
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
1504
|
+
getObject(arg0).copyBufferToBuffer(getObject(arg1), arg2, getObject(arg3), arg4);
|
|
1505
|
+
}, arguments);
|
|
1506
|
+
},
|
|
1507
|
+
__wbg_copyBufferToBuffer_7adcb79ef87447dc: function() {
|
|
1508
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1509
|
+
getObject(arg0).copyBufferToBuffer(getObject(arg1), arg2, getObject(arg3), arg4, arg5);
|
|
1510
|
+
}, arguments);
|
|
1511
|
+
},
|
|
1512
|
+
__wbg_copyTextureToBuffer_09ba100a04b1b001: function() {
|
|
1513
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1514
|
+
getObject(arg0).copyTextureToBuffer(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1515
|
+
}, arguments);
|
|
1516
|
+
},
|
|
1517
|
+
__wbg_copyTextureToTexture_66ab51b863dec546: function() {
|
|
1518
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1519
|
+
getObject(arg0).copyTextureToTexture(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1520
|
+
}, arguments);
|
|
1521
|
+
},
|
|
1522
|
+
__wbg_createBindGroupLayout_1dad97f44fda2929: function() {
|
|
1523
|
+
return handleError(function(arg0, arg1) {
|
|
1524
|
+
const ret = getObject(arg0).createBindGroupLayout(getObject(arg1));
|
|
1525
|
+
return addHeapObject(ret);
|
|
1526
|
+
}, arguments);
|
|
1527
|
+
},
|
|
1528
|
+
__wbg_createBindGroup_0ee0646375643dfb: function(arg0, arg1) {
|
|
1529
|
+
const ret = getObject(arg0).createBindGroup(getObject(arg1));
|
|
1809
1530
|
return addHeapObject(ret);
|
|
1810
|
-
},
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
imports.wbg.__wbg_dispatchWorkgroupsIndirect_6594fbc416b287d6 = function(arg0, arg1, arg2) {
|
|
1820
|
-
getObject(arg0).dispatchWorkgroupsIndirect(getObject(arg1), arg2);
|
|
1821
|
-
};
|
|
1822
|
-
imports.wbg.__wbg_dispatchWorkgroups_4e59e078119b5bab = function(arg0, arg1, arg2, arg3) {
|
|
1823
|
-
getObject(arg0).dispatchWorkgroups(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
|
|
1824
|
-
};
|
|
1825
|
-
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
1826
|
-
const ret = getObject(arg0).done;
|
|
1827
|
-
return ret;
|
|
1828
|
-
};
|
|
1829
|
-
imports.wbg.__wbg_end_ece2bf3a25678f12 = function(arg0) {
|
|
1830
|
-
getObject(arg0).end();
|
|
1831
|
-
};
|
|
1832
|
-
imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
1833
|
-
const ret = Object.entries(getObject(arg0));
|
|
1834
|
-
return addHeapObject(ret);
|
|
1835
|
-
};
|
|
1836
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
1837
|
-
let deferred0_0;
|
|
1838
|
-
let deferred0_1;
|
|
1839
|
-
try {
|
|
1840
|
-
deferred0_0 = arg0;
|
|
1841
|
-
deferred0_1 = arg1;
|
|
1842
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
1843
|
-
} finally {
|
|
1844
|
-
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1845
|
-
}
|
|
1846
|
-
};
|
|
1847
|
-
imports.wbg.__wbg_error_7bc7d576a6aaf855 = function(arg0) {
|
|
1848
|
-
console.error(getObject(arg0));
|
|
1849
|
-
};
|
|
1850
|
-
imports.wbg.__wbg_fetch_cd0acd3c15ec5b5d = function(arg0) {
|
|
1851
|
-
const ret = fetch(getObject(arg0));
|
|
1852
|
-
return addHeapObject(ret);
|
|
1853
|
-
};
|
|
1854
|
-
imports.wbg.__wbg_finish_17a0b297901010d5 = function(arg0) {
|
|
1855
|
-
const ret = getObject(arg0).finish();
|
|
1856
|
-
return addHeapObject(ret);
|
|
1857
|
-
};
|
|
1858
|
-
imports.wbg.__wbg_finish_ab9e01a922269f3a = function(arg0, arg1) {
|
|
1859
|
-
const ret = getObject(arg0).finish(getObject(arg1));
|
|
1860
|
-
return addHeapObject(ret);
|
|
1861
|
-
};
|
|
1862
|
-
imports.wbg.__wbg_getDate_b8071ea9fc4f6838 = function(arg0) {
|
|
1863
|
-
const ret = getObject(arg0).getDate();
|
|
1864
|
-
return ret;
|
|
1865
|
-
};
|
|
1866
|
-
imports.wbg.__wbg_getFullYear_6ac412e8eee86879 = function(arg0) {
|
|
1867
|
-
const ret = getObject(arg0).getFullYear();
|
|
1868
|
-
return ret;
|
|
1869
|
-
};
|
|
1870
|
-
imports.wbg.__wbg_getHours_52eb417ad6e924e8 = function(arg0) {
|
|
1871
|
-
const ret = getObject(arg0).getHours();
|
|
1872
|
-
return ret;
|
|
1873
|
-
};
|
|
1874
|
-
imports.wbg.__wbg_getMappedRange_1229810ff58e27ce = function() {
|
|
1875
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
1876
|
-
const ret = getObject(arg0).getMappedRange(arg1, arg2);
|
|
1531
|
+
},
|
|
1532
|
+
__wbg_createBuffer_474baee88e74f68a: function() {
|
|
1533
|
+
return handleError(function(arg0, arg1) {
|
|
1534
|
+
const ret = getObject(arg0).createBuffer(getObject(arg1));
|
|
1535
|
+
return addHeapObject(ret);
|
|
1536
|
+
}, arguments);
|
|
1537
|
+
},
|
|
1538
|
+
__wbg_createCommandEncoder_5229e112300218b4: function(arg0, arg1) {
|
|
1539
|
+
const ret = getObject(arg0).createCommandEncoder(getObject(arg1));
|
|
1877
1540
|
return addHeapObject(ret);
|
|
1878
|
-
},
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
const ret = getObject(arg0).getMinutes();
|
|
1882
|
-
return ret;
|
|
1883
|
-
};
|
|
1884
|
-
imports.wbg.__wbg_getMonth_48a392071f9e5017 = function(arg0) {
|
|
1885
|
-
const ret = getObject(arg0).getMonth();
|
|
1886
|
-
return ret;
|
|
1887
|
-
};
|
|
1888
|
-
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() {
|
|
1889
|
-
return handleError(function(arg0, arg1) {
|
|
1890
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1891
|
-
}, arguments);
|
|
1892
|
-
};
|
|
1893
|
-
imports.wbg.__wbg_getSeconds_d94762aec8103802 = function(arg0) {
|
|
1894
|
-
const ret = getObject(arg0).getSeconds();
|
|
1895
|
-
return ret;
|
|
1896
|
-
};
|
|
1897
|
-
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
1898
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1899
|
-
return addHeapObject(ret);
|
|
1900
|
-
};
|
|
1901
|
-
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() {
|
|
1902
|
-
return handleError(function(arg0, arg1) {
|
|
1903
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1541
|
+
},
|
|
1542
|
+
__wbg_createComputePipeline_1cd8bf7e02a1a06d: function(arg0, arg1) {
|
|
1543
|
+
const ret = getObject(arg0).createComputePipeline(getObject(arg1));
|
|
1904
1544
|
return addHeapObject(ret);
|
|
1905
|
-
},
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
1909
|
-
return addHeapObject(ret);
|
|
1910
|
-
};
|
|
1911
|
-
imports.wbg.__wbg_gpu_a6bce2913fb8f574 = function(arg0) {
|
|
1912
|
-
const ret = getObject(arg0).gpu;
|
|
1913
|
-
return addHeapObject(ret);
|
|
1914
|
-
};
|
|
1915
|
-
imports.wbg.__wbg_info_ce6bcc489c22f6f0 = function(arg0) {
|
|
1916
|
-
console.info(getObject(arg0));
|
|
1917
|
-
};
|
|
1918
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
1919
|
-
let result;
|
|
1920
|
-
try {
|
|
1921
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1922
|
-
} catch (_) {
|
|
1923
|
-
result = false;
|
|
1924
|
-
}
|
|
1925
|
-
const ret = result;
|
|
1926
|
-
return ret;
|
|
1927
|
-
};
|
|
1928
|
-
imports.wbg.__wbg_instanceof_GpuAdapter_fb230cdccb184887 = function(arg0) {
|
|
1929
|
-
let result;
|
|
1930
|
-
try {
|
|
1931
|
-
result = getObject(arg0) instanceof GPUAdapter;
|
|
1932
|
-
} catch (_) {
|
|
1933
|
-
result = false;
|
|
1934
|
-
}
|
|
1935
|
-
const ret = result;
|
|
1936
|
-
return ret;
|
|
1937
|
-
};
|
|
1938
|
-
imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
|
|
1939
|
-
let result;
|
|
1940
|
-
try {
|
|
1941
|
-
result = getObject(arg0) instanceof Map;
|
|
1942
|
-
} catch (_) {
|
|
1943
|
-
result = false;
|
|
1944
|
-
}
|
|
1945
|
-
const ret = result;
|
|
1946
|
-
return ret;
|
|
1947
|
-
};
|
|
1948
|
-
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
1949
|
-
let result;
|
|
1950
|
-
try {
|
|
1951
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
1952
|
-
} catch (_) {
|
|
1953
|
-
result = false;
|
|
1954
|
-
}
|
|
1955
|
-
const ret = result;
|
|
1956
|
-
return ret;
|
|
1957
|
-
};
|
|
1958
|
-
imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
|
|
1959
|
-
const ret = Array.isArray(getObject(arg0));
|
|
1960
|
-
return ret;
|
|
1961
|
-
};
|
|
1962
|
-
imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
|
|
1963
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1964
|
-
return ret;
|
|
1965
|
-
};
|
|
1966
|
-
imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
1967
|
-
const ret = Symbol.iterator;
|
|
1968
|
-
return addHeapObject(ret);
|
|
1969
|
-
};
|
|
1970
|
-
imports.wbg.__wbg_label_cda985b32d44cee0 = function(arg0, arg1) {
|
|
1971
|
-
const ret = getObject(arg1).label;
|
|
1972
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1973
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1974
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1975
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1976
|
-
};
|
|
1977
|
-
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
1978
|
-
const ret = getObject(arg0).length;
|
|
1979
|
-
return ret;
|
|
1980
|
-
};
|
|
1981
|
-
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
1982
|
-
const ret = getObject(arg0).length;
|
|
1983
|
-
return ret;
|
|
1984
|
-
};
|
|
1985
|
-
imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) {
|
|
1986
|
-
console.log(getObject(arg0));
|
|
1987
|
-
};
|
|
1988
|
-
imports.wbg.__wbg_mapAsync_4a34082bad283ccf = function(arg0, arg1, arg2, arg3) {
|
|
1989
|
-
const ret = getObject(arg0).mapAsync(arg1 >>> 0, arg2, arg3);
|
|
1990
|
-
return addHeapObject(ret);
|
|
1991
|
-
};
|
|
1992
|
-
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
1993
|
-
const ret = getObject(arg0).msCrypto;
|
|
1994
|
-
return addHeapObject(ret);
|
|
1995
|
-
};
|
|
1996
|
-
imports.wbg.__wbg_navigator_11b7299bb7886507 = function(arg0) {
|
|
1997
|
-
const ret = getObject(arg0).navigator;
|
|
1998
|
-
return addHeapObject(ret);
|
|
1999
|
-
};
|
|
2000
|
-
imports.wbg.__wbg_navigator_b49edef831236138 = function(arg0) {
|
|
2001
|
-
const ret = getObject(arg0).navigator;
|
|
2002
|
-
return addHeapObject(ret);
|
|
2003
|
-
};
|
|
2004
|
-
imports.wbg.__wbg_new_0_23cedd11d9b40c9d = function() {
|
|
2005
|
-
const ret = /* @__PURE__ */ new Date();
|
|
2006
|
-
return addHeapObject(ret);
|
|
2007
|
-
};
|
|
2008
|
-
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
2009
|
-
const ret = new Object();
|
|
2010
|
-
return addHeapObject(ret);
|
|
2011
|
-
};
|
|
2012
|
-
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
2013
|
-
const ret = new Array();
|
|
2014
|
-
return addHeapObject(ret);
|
|
2015
|
-
};
|
|
2016
|
-
imports.wbg.__wbg_new_3c79b3bb1b32b7d3 = function() {
|
|
2017
|
-
return handleError(function() {
|
|
2018
|
-
const ret = new Headers();
|
|
1545
|
+
},
|
|
1546
|
+
__wbg_createPipelineLayout_bf0deba7918ca157: function(arg0, arg1) {
|
|
1547
|
+
const ret = getObject(arg0).createPipelineLayout(getObject(arg1));
|
|
2019
1548
|
return addHeapObject(ret);
|
|
2020
|
-
},
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
return handleError(function() {
|
|
2024
|
-
const ret = new XMLHttpRequest();
|
|
1549
|
+
},
|
|
1550
|
+
__wbg_createShaderModule_744311a1dd685c14: function(arg0, arg1) {
|
|
1551
|
+
const ret = getObject(arg0).createShaderModule(getObject(arg1));
|
|
2025
1552
|
return addHeapObject(ret);
|
|
2026
|
-
},
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
try {
|
|
2042
|
-
var state0 = { a: arg0, b: arg1 };
|
|
2043
|
-
var cb0 = (arg02, arg12) => {
|
|
2044
|
-
const a = state0.a;
|
|
2045
|
-
state0.a = 0;
|
|
2046
|
-
try {
|
|
2047
|
-
return __wasm_bindgen_func_elem_22589(a, state0.b, arg02, arg12);
|
|
2048
|
-
} finally {
|
|
2049
|
-
state0.a = a;
|
|
2050
|
-
}
|
|
2051
|
-
};
|
|
2052
|
-
const ret = new Promise(cb0);
|
|
1553
|
+
},
|
|
1554
|
+
__wbg_createTexture_f357c38256411287: function() {
|
|
1555
|
+
return handleError(function(arg0, arg1) {
|
|
1556
|
+
const ret = getObject(arg0).createTexture(getObject(arg1));
|
|
1557
|
+
return addHeapObject(ret);
|
|
1558
|
+
}, arguments);
|
|
1559
|
+
},
|
|
1560
|
+
__wbg_createView_e7a36ec95c4190f3: function() {
|
|
1561
|
+
return handleError(function(arg0, arg1) {
|
|
1562
|
+
const ret = getObject(arg0).createView(getObject(arg1));
|
|
1563
|
+
return addHeapObject(ret);
|
|
1564
|
+
}, arguments);
|
|
1565
|
+
},
|
|
1566
|
+
__wbg_crypto_48300657fced39f9: function(arg0) {
|
|
1567
|
+
const ret = getObject(arg0).crypto;
|
|
2053
1568
|
return addHeapObject(ret);
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
};
|
|
2074
|
-
imports.wbg.__wbg_new_with_str_and_init_c5748f76f5108934 = function() {
|
|
2075
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
2076
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1569
|
+
},
|
|
1570
|
+
__wbg_debug_78b457f1effb3792: function(arg0) {
|
|
1571
|
+
console.debug(getObject(arg0));
|
|
1572
|
+
},
|
|
1573
|
+
__wbg_dispatchWorkgroupsIndirect_cdb624732570d2ab: function(arg0, arg1, arg2) {
|
|
1574
|
+
getObject(arg0).dispatchWorkgroupsIndirect(getObject(arg1), arg2);
|
|
1575
|
+
},
|
|
1576
|
+
__wbg_dispatchWorkgroups_727fa35f9c69d73c: function(arg0, arg1, arg2, arg3) {
|
|
1577
|
+
getObject(arg0).dispatchWorkgroups(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
|
|
1578
|
+
},
|
|
1579
|
+
__wbg_done_60cf307fcc680536: function(arg0) {
|
|
1580
|
+
const ret = getObject(arg0).done;
|
|
1581
|
+
return ret;
|
|
1582
|
+
},
|
|
1583
|
+
__wbg_end_2398df10208cf1ee: function(arg0) {
|
|
1584
|
+
getObject(arg0).end();
|
|
1585
|
+
},
|
|
1586
|
+
__wbg_entries_04b37a02507f1713: function(arg0) {
|
|
1587
|
+
const ret = Object.entries(getObject(arg0));
|
|
2077
1588
|
return addHeapObject(ret);
|
|
2078
|
-
},
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
1589
|
+
},
|
|
1590
|
+
__wbg_error_78ff5b3a29b770e0: function(arg0) {
|
|
1591
|
+
console.error(getObject(arg0));
|
|
1592
|
+
},
|
|
1593
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
1594
|
+
let deferred0_0;
|
|
1595
|
+
let deferred0_1;
|
|
1596
|
+
try {
|
|
1597
|
+
deferred0_0 = arg0;
|
|
1598
|
+
deferred0_1 = arg1;
|
|
1599
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1600
|
+
} finally {
|
|
1601
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
__wbg_fetch_38c2afdf0e494736: function(arg0) {
|
|
1605
|
+
const ret = fetch(getObject(arg0));
|
|
2087
1606
|
return addHeapObject(ret);
|
|
2088
|
-
},
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
const ret = getObject(arg0).node;
|
|
2092
|
-
return addHeapObject(ret);
|
|
2093
|
-
};
|
|
2094
|
-
imports.wbg.__wbg_now_69d776cd24f5215b = function() {
|
|
2095
|
-
const ret = Date.now();
|
|
2096
|
-
return ret;
|
|
2097
|
-
};
|
|
2098
|
-
imports.wbg.__wbg_open_bfb661c1c2740586 = function() {
|
|
2099
|
-
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
2100
|
-
getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);
|
|
2101
|
-
}, arguments);
|
|
2102
|
-
};
|
|
2103
|
-
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
2104
|
-
const ret = getObject(arg0).process;
|
|
2105
|
-
return addHeapObject(ret);
|
|
2106
|
-
};
|
|
2107
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
2108
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
2109
|
-
};
|
|
2110
|
-
imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
|
|
2111
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
2112
|
-
return ret;
|
|
2113
|
-
};
|
|
2114
|
-
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
2115
|
-
const ret = getObject(arg0).queueMicrotask;
|
|
2116
|
-
return addHeapObject(ret);
|
|
2117
|
-
};
|
|
2118
|
-
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
2119
|
-
queueMicrotask(getObject(arg0));
|
|
2120
|
-
};
|
|
2121
|
-
imports.wbg.__wbg_queue_39d4f3bda761adef = function(arg0) {
|
|
2122
|
-
const ret = getObject(arg0).queue;
|
|
2123
|
-
return addHeapObject(ret);
|
|
2124
|
-
};
|
|
2125
|
-
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() {
|
|
2126
|
-
return handleError(function(arg0, arg1) {
|
|
2127
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
2128
|
-
}, arguments);
|
|
2129
|
-
};
|
|
2130
|
-
imports.wbg.__wbg_requestAdapter_55d15e6d14e8392c = function(arg0, arg1) {
|
|
2131
|
-
const ret = getObject(arg0).requestAdapter(getObject(arg1));
|
|
2132
|
-
return addHeapObject(ret);
|
|
2133
|
-
};
|
|
2134
|
-
imports.wbg.__wbg_requestDevice_66e864eaf1ffbb38 = function(arg0, arg1) {
|
|
2135
|
-
const ret = getObject(arg0).requestDevice(getObject(arg1));
|
|
2136
|
-
return addHeapObject(ret);
|
|
2137
|
-
};
|
|
2138
|
-
imports.wbg.__wbg_require_60cc747a6bc5215a = function() {
|
|
2139
|
-
return handleError(function() {
|
|
2140
|
-
const ret = module.require;
|
|
1607
|
+
},
|
|
1608
|
+
__wbg_finish_7370ad1c0e62b448: function(arg0) {
|
|
1609
|
+
const ret = getObject(arg0).finish();
|
|
2141
1610
|
return addHeapObject(ret);
|
|
2142
|
-
},
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
2146
|
-
return addHeapObject(ret);
|
|
2147
|
-
};
|
|
2148
|
-
imports.wbg.__wbg_responseText_7a33f62863958740 = function() {
|
|
2149
|
-
return handleError(function(arg0, arg1) {
|
|
2150
|
-
const ret = getObject(arg1).responseText;
|
|
2151
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2152
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2153
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2154
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2155
|
-
}, arguments);
|
|
2156
|
-
};
|
|
2157
|
-
imports.wbg.__wbg_response_19d1d96c8fc76878 = function() {
|
|
2158
|
-
return handleError(function(arg0) {
|
|
2159
|
-
const ret = getObject(arg0).response;
|
|
1611
|
+
},
|
|
1612
|
+
__wbg_finish_797b32d15bab2338: function(arg0, arg1) {
|
|
1613
|
+
const ret = getObject(arg0).finish(getObject(arg1));
|
|
2160
1614
|
return addHeapObject(ret);
|
|
2161
|
-
},
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
return handleError(function(arg0) {
|
|
2165
|
-
getObject(arg0).send();
|
|
2166
|
-
}, arguments);
|
|
2167
|
-
};
|
|
2168
|
-
imports.wbg.__wbg_setBindGroup_250647fe6341e1db = function() {
|
|
2169
|
-
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
2170
|
-
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2), getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
|
|
2171
|
-
}, arguments);
|
|
2172
|
-
};
|
|
2173
|
-
imports.wbg.__wbg_setBindGroup_92f5fbfaea0311a0 = function(arg0, arg1, arg2) {
|
|
2174
|
-
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2));
|
|
2175
|
-
};
|
|
2176
|
-
imports.wbg.__wbg_setPipeline_95448e1c3bb1e875 = function(arg0, arg1) {
|
|
2177
|
-
getObject(arg0).setPipeline(getObject(arg1));
|
|
2178
|
-
};
|
|
2179
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
2180
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
2181
|
-
};
|
|
2182
|
-
imports.wbg.__wbg_set_425eb8b710d5beee = function() {
|
|
2183
|
-
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
2184
|
-
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2185
|
-
}, arguments);
|
|
2186
|
-
};
|
|
2187
|
-
imports.wbg.__wbg_set_781438a03c0c3c81 = function() {
|
|
2188
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
2189
|
-
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1615
|
+
},
|
|
1616
|
+
__wbg_getDate_3d2f964145b3449d: function(arg0) {
|
|
1617
|
+
const ret = getObject(arg0).getDate();
|
|
2190
1618
|
return ret;
|
|
2191
|
-
},
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
2195
|
-
};
|
|
2196
|
-
imports.wbg.__wbg_set_access_c87a9bdb5c449e6b = function(arg0, arg1) {
|
|
2197
|
-
getObject(arg0).access = __wbindgen_enum_GpuStorageTextureAccess[arg1];
|
|
2198
|
-
};
|
|
2199
|
-
imports.wbg.__wbg_set_array_layer_count_3a8ad1adab3aded1 = function(arg0, arg1) {
|
|
2200
|
-
getObject(arg0).arrayLayerCount = arg1 >>> 0;
|
|
2201
|
-
};
|
|
2202
|
-
imports.wbg.__wbg_set_aspect_4066a62e6528c589 = function(arg0, arg1) {
|
|
2203
|
-
getObject(arg0).aspect = __wbindgen_enum_GpuTextureAspect[arg1];
|
|
2204
|
-
};
|
|
2205
|
-
imports.wbg.__wbg_set_base_array_layer_85c4780859e3e025 = function(arg0, arg1) {
|
|
2206
|
-
getObject(arg0).baseArrayLayer = arg1 >>> 0;
|
|
2207
|
-
};
|
|
2208
|
-
imports.wbg.__wbg_set_base_mip_level_f90525112a282a1d = function(arg0, arg1) {
|
|
2209
|
-
getObject(arg0).baseMipLevel = arg1 >>> 0;
|
|
2210
|
-
};
|
|
2211
|
-
imports.wbg.__wbg_set_bc3a432bdcd60886 = function(arg0, arg1, arg2) {
|
|
2212
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
2213
|
-
};
|
|
2214
|
-
imports.wbg.__wbg_set_beginning_of_pass_write_index_1175eec9e005d722 = function(arg0, arg1) {
|
|
2215
|
-
getObject(arg0).beginningOfPassWriteIndex = arg1 >>> 0;
|
|
2216
|
-
};
|
|
2217
|
-
imports.wbg.__wbg_set_bind_group_layouts_54f980eb55071c87 = function(arg0, arg1) {
|
|
2218
|
-
getObject(arg0).bindGroupLayouts = getObject(arg1);
|
|
2219
|
-
};
|
|
2220
|
-
imports.wbg.__wbg_set_binding_1ddbf5eebabdc48c = function(arg0, arg1) {
|
|
2221
|
-
getObject(arg0).binding = arg1 >>> 0;
|
|
2222
|
-
};
|
|
2223
|
-
imports.wbg.__wbg_set_binding_5ea4d52c77434dfa = function(arg0, arg1) {
|
|
2224
|
-
getObject(arg0).binding = arg1 >>> 0;
|
|
2225
|
-
};
|
|
2226
|
-
imports.wbg.__wbg_set_body_8e743242d6076a4f = function(arg0, arg1) {
|
|
2227
|
-
getObject(arg0).body = getObject(arg1);
|
|
2228
|
-
};
|
|
2229
|
-
imports.wbg.__wbg_set_buffer_2dac3e64a7099038 = function(arg0, arg1) {
|
|
2230
|
-
getObject(arg0).buffer = getObject(arg1);
|
|
2231
|
-
};
|
|
2232
|
-
imports.wbg.__wbg_set_buffer_489d923366e1f63a = function(arg0, arg1) {
|
|
2233
|
-
getObject(arg0).buffer = getObject(arg1);
|
|
2234
|
-
};
|
|
2235
|
-
imports.wbg.__wbg_set_buffer_a3a7f00fa797e1d1 = function(arg0, arg1) {
|
|
2236
|
-
getObject(arg0).buffer = getObject(arg1);
|
|
2237
|
-
};
|
|
2238
|
-
imports.wbg.__wbg_set_bytes_per_row_61fdc31fb1e978f4 = function(arg0, arg1) {
|
|
2239
|
-
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
2240
|
-
};
|
|
2241
|
-
imports.wbg.__wbg_set_bytes_per_row_7eb4ea50ad336975 = function(arg0, arg1) {
|
|
2242
|
-
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
2243
|
-
};
|
|
2244
|
-
imports.wbg.__wbg_set_code_e66de35c80aa100f = function(arg0, arg1, arg2) {
|
|
2245
|
-
getObject(arg0).code = getStringFromWasm0(arg1, arg2);
|
|
2246
|
-
};
|
|
2247
|
-
imports.wbg.__wbg_set_compute_7e84d836a17ec8dc = function(arg0, arg1) {
|
|
2248
|
-
getObject(arg0).compute = getObject(arg1);
|
|
2249
|
-
};
|
|
2250
|
-
imports.wbg.__wbg_set_depth_or_array_layers_57e35a31ded46b97 = function(arg0, arg1) {
|
|
2251
|
-
getObject(arg0).depthOrArrayLayers = arg1 >>> 0;
|
|
2252
|
-
};
|
|
2253
|
-
imports.wbg.__wbg_set_dimension_1e40af745768ac00 = function(arg0, arg1) {
|
|
2254
|
-
getObject(arg0).dimension = __wbindgen_enum_GpuTextureDimension[arg1];
|
|
2255
|
-
};
|
|
2256
|
-
imports.wbg.__wbg_set_dimension_8523a7df804e7839 = function(arg0, arg1) {
|
|
2257
|
-
getObject(arg0).dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2258
|
-
};
|
|
2259
|
-
imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
|
|
2260
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
2261
|
-
return addHeapObject(ret);
|
|
2262
|
-
};
|
|
2263
|
-
imports.wbg.__wbg_set_end_of_pass_write_index_c9e77fba223f5e64 = function(arg0, arg1) {
|
|
2264
|
-
getObject(arg0).endOfPassWriteIndex = arg1 >>> 0;
|
|
2265
|
-
};
|
|
2266
|
-
imports.wbg.__wbg_set_entries_5ebe60dce5e74a0b = function(arg0, arg1) {
|
|
2267
|
-
getObject(arg0).entries = getObject(arg1);
|
|
2268
|
-
};
|
|
2269
|
-
imports.wbg.__wbg_set_entries_9e330e1730f04662 = function(arg0, arg1) {
|
|
2270
|
-
getObject(arg0).entries = getObject(arg1);
|
|
2271
|
-
};
|
|
2272
|
-
imports.wbg.__wbg_set_entry_point_0dd252068a92e7b1 = function(arg0, arg1, arg2) {
|
|
2273
|
-
getObject(arg0).entryPoint = getStringFromWasm0(arg1, arg2);
|
|
2274
|
-
};
|
|
2275
|
-
imports.wbg.__wbg_set_external_texture_c45a65eda8f1c7e7 = function(arg0, arg1) {
|
|
2276
|
-
getObject(arg0).externalTexture = getObject(arg1);
|
|
2277
|
-
};
|
|
2278
|
-
imports.wbg.__wbg_set_format_071b082598e71ae2 = function(arg0, arg1) {
|
|
2279
|
-
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2280
|
-
};
|
|
2281
|
-
imports.wbg.__wbg_set_format_45c59d08eefdcb12 = function(arg0, arg1) {
|
|
2282
|
-
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2283
|
-
};
|
|
2284
|
-
imports.wbg.__wbg_set_format_726ed8f81a287fdc = function(arg0, arg1) {
|
|
2285
|
-
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2286
|
-
};
|
|
2287
|
-
imports.wbg.__wbg_set_has_dynamic_offset_dcbae080558be467 = function(arg0, arg1) {
|
|
2288
|
-
getObject(arg0).hasDynamicOffset = arg1 !== 0;
|
|
2289
|
-
};
|
|
2290
|
-
imports.wbg.__wbg_set_headers_5671cf088e114d2b = function(arg0, arg1) {
|
|
2291
|
-
getObject(arg0).headers = getObject(arg1);
|
|
2292
|
-
};
|
|
2293
|
-
imports.wbg.__wbg_set_height_28e79506f626af82 = function(arg0, arg1) {
|
|
2294
|
-
getObject(arg0).height = arg1 >>> 0;
|
|
2295
|
-
};
|
|
2296
|
-
imports.wbg.__wbg_set_label_03ef288b104476b5 = function(arg0, arg1, arg2) {
|
|
2297
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2298
|
-
};
|
|
2299
|
-
imports.wbg.__wbg_set_label_1183ccaccddf4c32 = function(arg0, arg1, arg2) {
|
|
2300
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2301
|
-
};
|
|
2302
|
-
imports.wbg.__wbg_set_label_3d8a20f328073061 = function(arg0, arg1, arg2) {
|
|
2303
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2304
|
-
};
|
|
2305
|
-
imports.wbg.__wbg_set_label_491466139034563c = function(arg0, arg1, arg2) {
|
|
2306
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2307
|
-
};
|
|
2308
|
-
imports.wbg.__wbg_set_label_53b47ffdebccf638 = function(arg0, arg1, arg2) {
|
|
2309
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2310
|
-
};
|
|
2311
|
-
imports.wbg.__wbg_set_label_7ffda3ed69c72b85 = function(arg0, arg1, arg2) {
|
|
2312
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2313
|
-
};
|
|
2314
|
-
imports.wbg.__wbg_set_label_828e6fe16c83ad61 = function(arg0, arg1, arg2) {
|
|
2315
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2316
|
-
};
|
|
2317
|
-
imports.wbg.__wbg_set_label_95bae3d54f33d3c6 = function(arg0, arg1, arg2) {
|
|
2318
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2319
|
-
};
|
|
2320
|
-
imports.wbg.__wbg_set_label_a1c8caea9f6c17d7 = function(arg0, arg1, arg2) {
|
|
2321
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2322
|
-
};
|
|
2323
|
-
imports.wbg.__wbg_set_label_a3e682ef8c10c947 = function(arg0, arg1, arg2) {
|
|
2324
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2325
|
-
};
|
|
2326
|
-
imports.wbg.__wbg_set_label_c880c612e67bf9d9 = function(arg0, arg1, arg2) {
|
|
2327
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2328
|
-
};
|
|
2329
|
-
imports.wbg.__wbg_set_label_eb73d9dd282c005a = function(arg0, arg1, arg2) {
|
|
2330
|
-
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2331
|
-
};
|
|
2332
|
-
imports.wbg.__wbg_set_layout_934f9127172b906e = function(arg0, arg1) {
|
|
2333
|
-
getObject(arg0).layout = getObject(arg1);
|
|
2334
|
-
};
|
|
2335
|
-
imports.wbg.__wbg_set_layout_a9aebce493b15bfb = function(arg0, arg1) {
|
|
2336
|
-
getObject(arg0).layout = getObject(arg1);
|
|
2337
|
-
};
|
|
2338
|
-
imports.wbg.__wbg_set_mapped_at_creation_37dd8bbd1a910924 = function(arg0, arg1) {
|
|
2339
|
-
getObject(arg0).mappedAtCreation = arg1 !== 0;
|
|
2340
|
-
};
|
|
2341
|
-
imports.wbg.__wbg_set_method_76c69e41b3570627 = function(arg0, arg1, arg2) {
|
|
2342
|
-
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
2343
|
-
};
|
|
2344
|
-
imports.wbg.__wbg_set_min_binding_size_f7d3351b78c71fbc = function(arg0, arg1) {
|
|
2345
|
-
getObject(arg0).minBindingSize = arg1;
|
|
2346
|
-
};
|
|
2347
|
-
imports.wbg.__wbg_set_mip_level_4adfe9f0872d052d = function(arg0, arg1) {
|
|
2348
|
-
getObject(arg0).mipLevel = arg1 >>> 0;
|
|
2349
|
-
};
|
|
2350
|
-
imports.wbg.__wbg_set_mip_level_count_3368440f1c3c34b9 = function(arg0, arg1) {
|
|
2351
|
-
getObject(arg0).mipLevelCount = arg1 >>> 0;
|
|
2352
|
-
};
|
|
2353
|
-
imports.wbg.__wbg_set_mip_level_count_9de96fe0db85420d = function(arg0, arg1) {
|
|
2354
|
-
getObject(arg0).mipLevelCount = arg1 >>> 0;
|
|
2355
|
-
};
|
|
2356
|
-
imports.wbg.__wbg_set_module_0700e7e0b7b4f128 = function(arg0, arg1) {
|
|
2357
|
-
getObject(arg0).module = getObject(arg1);
|
|
2358
|
-
};
|
|
2359
|
-
imports.wbg.__wbg_set_multisampled_dc1cdd807d0170e1 = function(arg0, arg1) {
|
|
2360
|
-
getObject(arg0).multisampled = arg1 !== 0;
|
|
2361
|
-
};
|
|
2362
|
-
imports.wbg.__wbg_set_offset_49dfc93674b6347b = function(arg0, arg1) {
|
|
2363
|
-
getObject(arg0).offset = arg1;
|
|
2364
|
-
};
|
|
2365
|
-
imports.wbg.__wbg_set_offset_51eb43b37f1e9525 = function(arg0, arg1) {
|
|
2366
|
-
getObject(arg0).offset = arg1;
|
|
2367
|
-
};
|
|
2368
|
-
imports.wbg.__wbg_set_offset_a90a41961b1df9b4 = function(arg0, arg1) {
|
|
2369
|
-
getObject(arg0).offset = arg1;
|
|
2370
|
-
};
|
|
2371
|
-
imports.wbg.__wbg_set_origin_154a83d3703121d7 = function(arg0, arg1) {
|
|
2372
|
-
getObject(arg0).origin = getObject(arg1);
|
|
2373
|
-
};
|
|
2374
|
-
imports.wbg.__wbg_set_power_preference_229fffedb859fda8 = function(arg0, arg1) {
|
|
2375
|
-
getObject(arg0).powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
|
|
2376
|
-
};
|
|
2377
|
-
imports.wbg.__wbg_set_query_set_5d767886356c7b79 = function(arg0, arg1) {
|
|
2378
|
-
getObject(arg0).querySet = getObject(arg1);
|
|
2379
|
-
};
|
|
2380
|
-
imports.wbg.__wbg_set_required_features_8135f6ab89e06b58 = function(arg0, arg1) {
|
|
2381
|
-
getObject(arg0).requiredFeatures = getObject(arg1);
|
|
2382
|
-
};
|
|
2383
|
-
imports.wbg.__wbg_set_resource_97233a9ead07e4bc = function(arg0, arg1) {
|
|
2384
|
-
getObject(arg0).resource = getObject(arg1);
|
|
2385
|
-
};
|
|
2386
|
-
imports.wbg.__wbg_set_responseType_df7a5fa93f0dd4be = function(arg0, arg1) {
|
|
2387
|
-
getObject(arg0).responseType = __wbindgen_enum_XmlHttpRequestResponseType[arg1];
|
|
2388
|
-
};
|
|
2389
|
-
imports.wbg.__wbg_set_rows_per_image_b2e56467282d270a = function(arg0, arg1) {
|
|
2390
|
-
getObject(arg0).rowsPerImage = arg1 >>> 0;
|
|
2391
|
-
};
|
|
2392
|
-
imports.wbg.__wbg_set_rows_per_image_ca194ae8c040a0d0 = function(arg0, arg1) {
|
|
2393
|
-
getObject(arg0).rowsPerImage = arg1 >>> 0;
|
|
2394
|
-
};
|
|
2395
|
-
imports.wbg.__wbg_set_sample_count_df26d31cf04a57d8 = function(arg0, arg1) {
|
|
2396
|
-
getObject(arg0).sampleCount = arg1 >>> 0;
|
|
2397
|
-
};
|
|
2398
|
-
imports.wbg.__wbg_set_sample_type_5671a405c6474494 = function(arg0, arg1) {
|
|
2399
|
-
getObject(arg0).sampleType = __wbindgen_enum_GpuTextureSampleType[arg1];
|
|
2400
|
-
};
|
|
2401
|
-
imports.wbg.__wbg_set_sampler_43a3dd77c3b0a5ba = function(arg0, arg1) {
|
|
2402
|
-
getObject(arg0).sampler = getObject(arg1);
|
|
2403
|
-
};
|
|
2404
|
-
imports.wbg.__wbg_set_size_1a3d1e3a2e547ec1 = function(arg0, arg1) {
|
|
2405
|
-
getObject(arg0).size = getObject(arg1);
|
|
2406
|
-
};
|
|
2407
|
-
imports.wbg.__wbg_set_size_a45dd219534f95ed = function(arg0, arg1) {
|
|
2408
|
-
getObject(arg0).size = arg1;
|
|
2409
|
-
};
|
|
2410
|
-
imports.wbg.__wbg_set_size_e0576eacd9f11fed = function(arg0, arg1) {
|
|
2411
|
-
getObject(arg0).size = arg1;
|
|
2412
|
-
};
|
|
2413
|
-
imports.wbg.__wbg_set_storage_texture_4853479f6eb61a57 = function(arg0, arg1) {
|
|
2414
|
-
getObject(arg0).storageTexture = getObject(arg1);
|
|
2415
|
-
};
|
|
2416
|
-
imports.wbg.__wbg_set_texture_5f219a723eb7db43 = function(arg0, arg1) {
|
|
2417
|
-
getObject(arg0).texture = getObject(arg1);
|
|
2418
|
-
};
|
|
2419
|
-
imports.wbg.__wbg_set_texture_84c4ac5434a9ddb5 = function(arg0, arg1) {
|
|
2420
|
-
getObject(arg0).texture = getObject(arg1);
|
|
2421
|
-
};
|
|
2422
|
-
imports.wbg.__wbg_set_timestamp_writes_db44391e390948e2 = function(arg0, arg1) {
|
|
2423
|
-
getObject(arg0).timestampWrites = getObject(arg1);
|
|
2424
|
-
};
|
|
2425
|
-
imports.wbg.__wbg_set_type_0a9fcee42b714ba8 = function(arg0, arg1) {
|
|
2426
|
-
getObject(arg0).type = __wbindgen_enum_GpuBufferBindingType[arg1];
|
|
2427
|
-
};
|
|
2428
|
-
imports.wbg.__wbg_set_type_ba111b7f1813a222 = function(arg0, arg1) {
|
|
2429
|
-
getObject(arg0).type = __wbindgen_enum_GpuSamplerBindingType[arg1];
|
|
2430
|
-
};
|
|
2431
|
-
imports.wbg.__wbg_set_usage_0f3970011718ab12 = function(arg0, arg1) {
|
|
2432
|
-
getObject(arg0).usage = arg1 >>> 0;
|
|
2433
|
-
};
|
|
2434
|
-
imports.wbg.__wbg_set_usage_49bed7c9b47e7849 = function(arg0, arg1) {
|
|
2435
|
-
getObject(arg0).usage = arg1 >>> 0;
|
|
2436
|
-
};
|
|
2437
|
-
imports.wbg.__wbg_set_usage_8a5ac4564d826d9d = function(arg0, arg1) {
|
|
2438
|
-
getObject(arg0).usage = arg1 >>> 0;
|
|
2439
|
-
};
|
|
2440
|
-
imports.wbg.__wbg_set_view_dimension_2e3a58d96671f97a = function(arg0, arg1) {
|
|
2441
|
-
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2442
|
-
};
|
|
2443
|
-
imports.wbg.__wbg_set_view_dimension_88c1a47ce71f7839 = function(arg0, arg1) {
|
|
2444
|
-
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2445
|
-
};
|
|
2446
|
-
imports.wbg.__wbg_set_view_formats_dbd4d0d50ed403ff = function(arg0, arg1) {
|
|
2447
|
-
getObject(arg0).viewFormats = getObject(arg1);
|
|
2448
|
-
};
|
|
2449
|
-
imports.wbg.__wbg_set_visibility_f4f66940005e5c39 = function(arg0, arg1) {
|
|
2450
|
-
getObject(arg0).visibility = arg1 >>> 0;
|
|
2451
|
-
};
|
|
2452
|
-
imports.wbg.__wbg_set_width_64c5783b064042bc = function(arg0, arg1) {
|
|
2453
|
-
getObject(arg0).width = arg1 >>> 0;
|
|
2454
|
-
};
|
|
2455
|
-
imports.wbg.__wbg_set_x_d5236bf9391eb053 = function(arg0, arg1) {
|
|
2456
|
-
getObject(arg0).x = arg1 >>> 0;
|
|
2457
|
-
};
|
|
2458
|
-
imports.wbg.__wbg_set_y_413262ade3cc0d56 = function(arg0, arg1) {
|
|
2459
|
-
getObject(arg0).y = arg1 >>> 0;
|
|
2460
|
-
};
|
|
2461
|
-
imports.wbg.__wbg_set_z_a136ba9bd16085f0 = function(arg0, arg1) {
|
|
2462
|
-
getObject(arg0).z = arg1 >>> 0;
|
|
2463
|
-
};
|
|
2464
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
2465
|
-
const ret = getObject(arg1).stack;
|
|
2466
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2467
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2468
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2469
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2470
|
-
};
|
|
2471
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
2472
|
-
const ret = typeof global === "undefined" ? null : global;
|
|
2473
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2474
|
-
};
|
|
2475
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
2476
|
-
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
2477
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2478
|
-
};
|
|
2479
|
-
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
2480
|
-
const ret = typeof self === "undefined" ? null : self;
|
|
2481
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2482
|
-
};
|
|
2483
|
-
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
2484
|
-
const ret = typeof window === "undefined" ? null : window;
|
|
2485
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2486
|
-
};
|
|
2487
|
-
imports.wbg.__wbg_status_c547ab1614ba835e = function() {
|
|
2488
|
-
return handleError(function(arg0) {
|
|
2489
|
-
const ret = getObject(arg0).status;
|
|
1619
|
+
},
|
|
1620
|
+
__wbg_getFullYear_8b1ba9a648a4de7f: function(arg0) {
|
|
1621
|
+
const ret = getObject(arg0).getFullYear();
|
|
2490
1622
|
return ret;
|
|
2491
|
-
},
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
1623
|
+
},
|
|
1624
|
+
__wbg_getHours_91ac680ae491b8ea: function(arg0) {
|
|
1625
|
+
const ret = getObject(arg0).getHours();
|
|
1626
|
+
return ret;
|
|
1627
|
+
},
|
|
1628
|
+
__wbg_getMappedRange_9f13d158ba3946fd: function() {
|
|
1629
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1630
|
+
const ret = getObject(arg0).getMappedRange(arg1, arg2);
|
|
1631
|
+
return addHeapObject(ret);
|
|
1632
|
+
}, arguments);
|
|
1633
|
+
},
|
|
1634
|
+
__wbg_getMinutes_c1c2573becc0c7b5: function(arg0) {
|
|
1635
|
+
const ret = getObject(arg0).getMinutes();
|
|
1636
|
+
return ret;
|
|
1637
|
+
},
|
|
1638
|
+
__wbg_getMonth_44bdf67c99f2ed79: function(arg0) {
|
|
1639
|
+
const ret = getObject(arg0).getMonth();
|
|
1640
|
+
return ret;
|
|
1641
|
+
},
|
|
1642
|
+
__wbg_getRandomValues_263d0aa5464054ee: function() {
|
|
1643
|
+
return handleError(function(arg0, arg1) {
|
|
1644
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1645
|
+
}, arguments);
|
|
1646
|
+
},
|
|
1647
|
+
__wbg_getSeconds_2716239745eecd0a: function(arg0) {
|
|
1648
|
+
const ret = getObject(arg0).getSeconds();
|
|
1649
|
+
return ret;
|
|
1650
|
+
},
|
|
1651
|
+
__wbg_get_1f8f054ddbaa7db2: function() {
|
|
1652
|
+
return handleError(function(arg0, arg1) {
|
|
1653
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1654
|
+
return addHeapObject(ret);
|
|
1655
|
+
}, arguments);
|
|
1656
|
+
},
|
|
1657
|
+
__wbg_get_2b48c7d0d006a781: function(arg0, arg1) {
|
|
1658
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1659
|
+
return addHeapObject(ret);
|
|
1660
|
+
},
|
|
1661
|
+
__wbg_get_de6a0f7d4d18a304: function() {
|
|
1662
|
+
return handleError(function(arg0, arg1) {
|
|
1663
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1664
|
+
return addHeapObject(ret);
|
|
1665
|
+
}, arguments);
|
|
1666
|
+
},
|
|
1667
|
+
__wbg_get_unchecked_33f6e5c9e2f2d6b2: function(arg0, arg1) {
|
|
1668
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1669
|
+
return addHeapObject(ret);
|
|
1670
|
+
},
|
|
1671
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
1672
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
1673
|
+
return addHeapObject(ret);
|
|
1674
|
+
},
|
|
1675
|
+
__wbg_gpu_ac6dc8fb638a26c3: function(arg0) {
|
|
1676
|
+
const ret = getObject(arg0).gpu;
|
|
1677
|
+
return addHeapObject(ret);
|
|
1678
|
+
},
|
|
1679
|
+
__wbg_info_af7f45292ba9b0ea: function(arg0) {
|
|
1680
|
+
console.info(getObject(arg0));
|
|
1681
|
+
},
|
|
1682
|
+
__wbg_instanceof_ArrayBuffer_8f49811467741499: function(arg0) {
|
|
1683
|
+
let result;
|
|
1684
|
+
try {
|
|
1685
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1686
|
+
} catch (_) {
|
|
1687
|
+
result = false;
|
|
1688
|
+
}
|
|
1689
|
+
const ret = result;
|
|
1690
|
+
return ret;
|
|
1691
|
+
},
|
|
1692
|
+
__wbg_instanceof_GpuAdapter_fb230cdccb184887: function(arg0) {
|
|
1693
|
+
let result;
|
|
1694
|
+
try {
|
|
1695
|
+
result = getObject(arg0) instanceof GPUAdapter;
|
|
1696
|
+
} catch (_) {
|
|
1697
|
+
result = false;
|
|
1698
|
+
}
|
|
1699
|
+
const ret = result;
|
|
1700
|
+
return ret;
|
|
1701
|
+
},
|
|
1702
|
+
__wbg_instanceof_Map_9fc06d9a951bcee6: function(arg0) {
|
|
1703
|
+
let result;
|
|
1704
|
+
try {
|
|
1705
|
+
result = getObject(arg0) instanceof Map;
|
|
1706
|
+
} catch (_) {
|
|
1707
|
+
result = false;
|
|
1708
|
+
}
|
|
1709
|
+
const ret = result;
|
|
1710
|
+
return ret;
|
|
1711
|
+
},
|
|
1712
|
+
__wbg_instanceof_Uint8Array_86f30649f63ef9c2: function(arg0) {
|
|
1713
|
+
let result;
|
|
1714
|
+
try {
|
|
1715
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
1716
|
+
} catch (_) {
|
|
1717
|
+
result = false;
|
|
1718
|
+
}
|
|
1719
|
+
const ret = result;
|
|
1720
|
+
return ret;
|
|
1721
|
+
},
|
|
1722
|
+
__wbg_isArray_67c2c9c4313f4448: function(arg0) {
|
|
1723
|
+
const ret = Array.isArray(getObject(arg0));
|
|
1724
|
+
return ret;
|
|
1725
|
+
},
|
|
1726
|
+
__wbg_isSafeInteger_66acec27e09e99a7: function(arg0) {
|
|
1727
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1728
|
+
return ret;
|
|
1729
|
+
},
|
|
1730
|
+
__wbg_iterator_8732428d309e270e: function() {
|
|
1731
|
+
const ret = Symbol.iterator;
|
|
1732
|
+
return addHeapObject(ret);
|
|
1733
|
+
},
|
|
1734
|
+
__wbg_label_84abde6506fa15b7: function(arg0, arg1) {
|
|
1735
|
+
const ret = getObject(arg1).label;
|
|
1736
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1737
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1738
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1739
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1740
|
+
},
|
|
1741
|
+
__wbg_length_4a591ecaa01354d9: function(arg0) {
|
|
1742
|
+
const ret = getObject(arg0).length;
|
|
1743
|
+
return ret;
|
|
1744
|
+
},
|
|
1745
|
+
__wbg_length_66f1a4b2e9026940: function(arg0) {
|
|
1746
|
+
const ret = getObject(arg0).length;
|
|
1747
|
+
return ret;
|
|
1748
|
+
},
|
|
1749
|
+
__wbg_log_cf2e968649f3384e: function(arg0) {
|
|
1750
|
+
console.log(getObject(arg0));
|
|
1751
|
+
},
|
|
1752
|
+
__wbg_mapAsync_3546b4b874e14738: function(arg0, arg1, arg2, arg3) {
|
|
1753
|
+
const ret = getObject(arg0).mapAsync(arg1 >>> 0, arg2, arg3);
|
|
1754
|
+
return addHeapObject(ret);
|
|
1755
|
+
},
|
|
1756
|
+
__wbg_msCrypto_8c6d45a75ef1d3da: function(arg0) {
|
|
1757
|
+
const ret = getObject(arg0).msCrypto;
|
|
1758
|
+
return addHeapObject(ret);
|
|
1759
|
+
},
|
|
1760
|
+
__wbg_navigator_3833ecdbc19d2757: function(arg0) {
|
|
1761
|
+
const ret = getObject(arg0).navigator;
|
|
1762
|
+
return addHeapObject(ret);
|
|
1763
|
+
},
|
|
1764
|
+
__wbg_navigator_391291470f58c650: function(arg0) {
|
|
1765
|
+
const ret = getObject(arg0).navigator;
|
|
1766
|
+
return addHeapObject(ret);
|
|
1767
|
+
},
|
|
1768
|
+
__wbg_new_0_445c13a750296eb6: function() {
|
|
1769
|
+
const ret = /* @__PURE__ */ new Date();
|
|
1770
|
+
return addHeapObject(ret);
|
|
1771
|
+
},
|
|
1772
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
1773
|
+
const ret = new Error();
|
|
1774
|
+
return addHeapObject(ret);
|
|
1775
|
+
},
|
|
1776
|
+
__wbg_new_2ee370dca414d926: function() {
|
|
1777
|
+
return handleError(function() {
|
|
1778
|
+
const ret = new XMLHttpRequest();
|
|
1779
|
+
return addHeapObject(ret);
|
|
1780
|
+
}, arguments);
|
|
1781
|
+
},
|
|
1782
|
+
__wbg_new_578aeef4b6b94378: function(arg0) {
|
|
1783
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1784
|
+
return addHeapObject(ret);
|
|
1785
|
+
},
|
|
1786
|
+
__wbg_new_622fc80556be2e26: function() {
|
|
1787
|
+
const ret = /* @__PURE__ */ new Map();
|
|
1788
|
+
return addHeapObject(ret);
|
|
1789
|
+
},
|
|
1790
|
+
__wbg_new_b682b81e8eaaf027: function(arg0, arg1) {
|
|
1791
|
+
try {
|
|
1792
|
+
var state0 = { a: arg0, b: arg1 };
|
|
1793
|
+
var cb0 = (arg02, arg12) => {
|
|
1794
|
+
const a = state0.a;
|
|
1795
|
+
state0.a = 0;
|
|
1796
|
+
try {
|
|
1797
|
+
return __wasm_bindgen_func_elem_22734(a, state0.b, arg02, arg12);
|
|
1798
|
+
} finally {
|
|
1799
|
+
state0.a = a;
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
const ret = new Promise(cb0);
|
|
1803
|
+
return addHeapObject(ret);
|
|
1804
|
+
} finally {
|
|
1805
|
+
state0.a = 0;
|
|
1806
|
+
}
|
|
1807
|
+
},
|
|
1808
|
+
__wbg_new_ce1ab61c1c2b300d: function() {
|
|
1809
|
+
const ret = new Object();
|
|
1810
|
+
return addHeapObject(ret);
|
|
1811
|
+
},
|
|
1812
|
+
__wbg_new_d90091b82fdf5b91: function() {
|
|
1813
|
+
const ret = new Array();
|
|
1814
|
+
return addHeapObject(ret);
|
|
1815
|
+
},
|
|
1816
|
+
__wbg_new_e436d06bc8e77460: function() {
|
|
1817
|
+
return handleError(function() {
|
|
1818
|
+
const ret = new Headers();
|
|
1819
|
+
return addHeapObject(ret);
|
|
1820
|
+
}, arguments);
|
|
1821
|
+
},
|
|
1822
|
+
__wbg_new_from_slice_18fa1f71286d66b8: function(arg0, arg1) {
|
|
1823
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1824
|
+
return addHeapObject(ret);
|
|
1825
|
+
},
|
|
1826
|
+
__wbg_new_typed_bf31d18f92484486: function(arg0, arg1) {
|
|
1827
|
+
try {
|
|
1828
|
+
var state0 = { a: arg0, b: arg1 };
|
|
1829
|
+
var cb0 = (arg02, arg12) => {
|
|
1830
|
+
const a = state0.a;
|
|
1831
|
+
state0.a = 0;
|
|
1832
|
+
try {
|
|
1833
|
+
return __wasm_bindgen_func_elem_22734(a, state0.b, arg02, arg12);
|
|
1834
|
+
} finally {
|
|
1835
|
+
state0.a = a;
|
|
1836
|
+
}
|
|
1837
|
+
};
|
|
1838
|
+
const ret = new Promise(cb0);
|
|
1839
|
+
return addHeapObject(ret);
|
|
1840
|
+
} finally {
|
|
1841
|
+
state0.a = 0;
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
__wbg_new_with_byte_offset_and_length_d836f26d916dd9ad: function(arg0, arg1, arg2) {
|
|
1845
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
1846
|
+
return addHeapObject(ret);
|
|
1847
|
+
},
|
|
1848
|
+
__wbg_new_with_length_36a4998e27b014c5: function(arg0) {
|
|
1849
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1850
|
+
return addHeapObject(ret);
|
|
1851
|
+
},
|
|
1852
|
+
__wbg_new_with_str_and_init_bcd02b79a793d27f: function() {
|
|
1853
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1854
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1855
|
+
return addHeapObject(ret);
|
|
1856
|
+
}, arguments);
|
|
1857
|
+
},
|
|
1858
|
+
__wbg_next_9e03acdf51c4960d: function(arg0) {
|
|
1859
|
+
const ret = getObject(arg0).next;
|
|
1860
|
+
return addHeapObject(ret);
|
|
1861
|
+
},
|
|
1862
|
+
__wbg_next_eb8ca7351fa27906: function() {
|
|
1863
|
+
return handleError(function(arg0) {
|
|
1864
|
+
const ret = getObject(arg0).next();
|
|
1865
|
+
return addHeapObject(ret);
|
|
1866
|
+
}, arguments);
|
|
1867
|
+
},
|
|
1868
|
+
__wbg_node_95beb7570492fd97: function(arg0) {
|
|
1869
|
+
const ret = getObject(arg0).node;
|
|
1870
|
+
return addHeapObject(ret);
|
|
1871
|
+
},
|
|
1872
|
+
__wbg_now_190933fa139cc119: function() {
|
|
1873
|
+
const ret = Date.now();
|
|
1874
|
+
return ret;
|
|
1875
|
+
},
|
|
1876
|
+
__wbg_open_837bab9ccb9e06da: function() {
|
|
1877
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1878
|
+
getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);
|
|
1879
|
+
}, arguments);
|
|
1880
|
+
},
|
|
1881
|
+
__wbg_process_b2fea42461d03994: function(arg0) {
|
|
1882
|
+
const ret = getObject(arg0).process;
|
|
1883
|
+
return addHeapObject(ret);
|
|
1884
|
+
},
|
|
1885
|
+
__wbg_prototypesetcall_3249fc62a0fafa30: function(arg0, arg1, arg2) {
|
|
1886
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1887
|
+
},
|
|
1888
|
+
__wbg_push_a6822215aa43e71c: function(arg0, arg1) {
|
|
1889
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
1890
|
+
return ret;
|
|
1891
|
+
},
|
|
1892
|
+
__wbg_queueMicrotask_35c611f4a14830b2: function(arg0) {
|
|
1893
|
+
queueMicrotask(getObject(arg0));
|
|
1894
|
+
},
|
|
1895
|
+
__wbg_queueMicrotask_404ed0a58e0b63cc: function(arg0) {
|
|
1896
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
1897
|
+
return addHeapObject(ret);
|
|
1898
|
+
},
|
|
1899
|
+
__wbg_queue_8cb065d04b06cb13: function(arg0) {
|
|
1900
|
+
const ret = getObject(arg0).queue;
|
|
1901
|
+
return addHeapObject(ret);
|
|
1902
|
+
},
|
|
1903
|
+
__wbg_randomFillSync_ca9f178fb14c88cb: function() {
|
|
1904
|
+
return handleError(function(arg0, arg1) {
|
|
1905
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1906
|
+
}, arguments);
|
|
1907
|
+
},
|
|
1908
|
+
__wbg_requestAdapter_4814cb479d2dcf15: function(arg0, arg1) {
|
|
1909
|
+
const ret = getObject(arg0).requestAdapter(getObject(arg1));
|
|
1910
|
+
return addHeapObject(ret);
|
|
1911
|
+
},
|
|
1912
|
+
__wbg_requestDevice_1b8f321791aa8b00: function(arg0, arg1) {
|
|
1913
|
+
const ret = getObject(arg0).requestDevice(getObject(arg1));
|
|
1914
|
+
return addHeapObject(ret);
|
|
1915
|
+
},
|
|
1916
|
+
__wbg_require_7a9419e39d796c95: function() {
|
|
1917
|
+
return handleError(function() {
|
|
1918
|
+
const ret = module.require;
|
|
1919
|
+
return addHeapObject(ret);
|
|
1920
|
+
}, arguments);
|
|
1921
|
+
},
|
|
1922
|
+
__wbg_resolve_25a7e548d5881dca: function(arg0) {
|
|
1923
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1924
|
+
return addHeapObject(ret);
|
|
1925
|
+
},
|
|
1926
|
+
__wbg_responseText_266ec252b6be1e56: function() {
|
|
1927
|
+
return handleError(function(arg0, arg1) {
|
|
1928
|
+
const ret = getObject(arg1).responseText;
|
|
1929
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1930
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1931
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1932
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1933
|
+
}, arguments);
|
|
1934
|
+
},
|
|
1935
|
+
__wbg_response_8ec82c168e320475: function() {
|
|
1936
|
+
return handleError(function(arg0) {
|
|
1937
|
+
const ret = getObject(arg0).response;
|
|
1938
|
+
return addHeapObject(ret);
|
|
1939
|
+
}, arguments);
|
|
1940
|
+
},
|
|
1941
|
+
__wbg_send_dce79f146638dfda: function() {
|
|
1942
|
+
return handleError(function(arg0) {
|
|
1943
|
+
getObject(arg0).send();
|
|
1944
|
+
}, arguments);
|
|
1945
|
+
},
|
|
1946
|
+
__wbg_setBindGroup_67bd9a0c57486387: function() {
|
|
1947
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1948
|
+
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2), getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
|
|
1949
|
+
}, arguments);
|
|
1950
|
+
},
|
|
1951
|
+
__wbg_setBindGroup_a2a4442ac2a0be99: function(arg0, arg1, arg2) {
|
|
1952
|
+
getObject(arg0).setBindGroup(arg1 >>> 0, getObject(arg2));
|
|
1953
|
+
},
|
|
1954
|
+
__wbg_setPipeline_50cfc53a5d0eb1d7: function(arg0, arg1) {
|
|
1955
|
+
getObject(arg0).setPipeline(getObject(arg1));
|
|
1956
|
+
},
|
|
1957
|
+
__wbg_set_25ef40a9aeff260d: function() {
|
|
1958
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
1959
|
+
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1960
|
+
}, arguments);
|
|
1961
|
+
},
|
|
1962
|
+
__wbg_set_52b1e1eb5bed906a: function(arg0, arg1, arg2) {
|
|
1963
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1964
|
+
return addHeapObject(ret);
|
|
1965
|
+
},
|
|
1966
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1967
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1968
|
+
},
|
|
1969
|
+
__wbg_set_6e30c9374c26414c: function() {
|
|
1970
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1971
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1972
|
+
return ret;
|
|
1973
|
+
}, arguments);
|
|
1974
|
+
},
|
|
1975
|
+
__wbg_set_access_67a4b0ae1c0f32f5: function(arg0, arg1) {
|
|
1976
|
+
getObject(arg0).access = __wbindgen_enum_GpuStorageTextureAccess[arg1];
|
|
1977
|
+
},
|
|
1978
|
+
__wbg_set_array_layer_count_c2e975f5b62596bb: function(arg0, arg1) {
|
|
1979
|
+
getObject(arg0).arrayLayerCount = arg1 >>> 0;
|
|
1980
|
+
},
|
|
1981
|
+
__wbg_set_aspect_a453970e75d8e849: function(arg0, arg1) {
|
|
1982
|
+
getObject(arg0).aspect = __wbindgen_enum_GpuTextureAspect[arg1];
|
|
1983
|
+
},
|
|
1984
|
+
__wbg_set_base_array_layer_b67db9750fbc7053: function(arg0, arg1) {
|
|
1985
|
+
getObject(arg0).baseArrayLayer = arg1 >>> 0;
|
|
1986
|
+
},
|
|
1987
|
+
__wbg_set_base_mip_level_35f2fc3293e96083: function(arg0, arg1) {
|
|
1988
|
+
getObject(arg0).baseMipLevel = arg1 >>> 0;
|
|
1989
|
+
},
|
|
1990
|
+
__wbg_set_beginning_of_pass_write_index_ddfc55f615254cc1: function(arg0, arg1) {
|
|
1991
|
+
getObject(arg0).beginningOfPassWriteIndex = arg1 >>> 0;
|
|
1992
|
+
},
|
|
1993
|
+
__wbg_set_bind_group_layouts_436bd62a9b35e1ab: function(arg0, arg1) {
|
|
1994
|
+
getObject(arg0).bindGroupLayouts = getObject(arg1);
|
|
1995
|
+
},
|
|
1996
|
+
__wbg_set_binding_b575483e08d5ba4a: function(arg0, arg1) {
|
|
1997
|
+
getObject(arg0).binding = arg1 >>> 0;
|
|
1998
|
+
},
|
|
1999
|
+
__wbg_set_binding_c9feebb53a130ebe: function(arg0, arg1) {
|
|
2000
|
+
getObject(arg0).binding = arg1 >>> 0;
|
|
2001
|
+
},
|
|
2002
|
+
__wbg_set_body_36614c7e61546809: function(arg0, arg1) {
|
|
2003
|
+
getObject(arg0).body = getObject(arg1);
|
|
2004
|
+
},
|
|
2005
|
+
__wbg_set_buffer_468874ee2bc9df02: function(arg0, arg1) {
|
|
2006
|
+
getObject(arg0).buffer = getObject(arg1);
|
|
2007
|
+
},
|
|
2008
|
+
__wbg_set_buffer_6c45652fb024e808: function(arg0, arg1) {
|
|
2009
|
+
getObject(arg0).buffer = getObject(arg1);
|
|
2010
|
+
},
|
|
2011
|
+
__wbg_set_buffer_83041e80a2b2c1b9: function(arg0, arg1) {
|
|
2012
|
+
getObject(arg0).buffer = getObject(arg1);
|
|
2013
|
+
},
|
|
2014
|
+
__wbg_set_bytes_per_row_c127092e4fe9be22: function(arg0, arg1) {
|
|
2015
|
+
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
2016
|
+
},
|
|
2017
|
+
__wbg_set_bytes_per_row_fecf7d0d8d5038d0: function(arg0, arg1) {
|
|
2018
|
+
getObject(arg0).bytesPerRow = arg1 >>> 0;
|
|
2019
|
+
},
|
|
2020
|
+
__wbg_set_c775d84916be79ea: function(arg0, arg1, arg2) {
|
|
2021
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
2022
|
+
},
|
|
2023
|
+
__wbg_set_code_0a82fa86cf58ca3b: function(arg0, arg1, arg2) {
|
|
2024
|
+
getObject(arg0).code = getStringFromWasm0(arg1, arg2);
|
|
2025
|
+
},
|
|
2026
|
+
__wbg_set_compute_dc74d722ba27aa5b: function(arg0, arg1) {
|
|
2027
|
+
getObject(arg0).compute = getObject(arg1);
|
|
2028
|
+
},
|
|
2029
|
+
__wbg_set_dca99999bba88a9a: function(arg0, arg1, arg2) {
|
|
2030
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
2031
|
+
},
|
|
2032
|
+
__wbg_set_depth_or_array_layers_17284e1eac0007a1: function(arg0, arg1) {
|
|
2033
|
+
getObject(arg0).depthOrArrayLayers = arg1 >>> 0;
|
|
2034
|
+
},
|
|
2035
|
+
__wbg_set_dimension_3144c827eb67b110: function(arg0, arg1) {
|
|
2036
|
+
getObject(arg0).dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2037
|
+
},
|
|
2038
|
+
__wbg_set_dimension_9054f7ab0acbfd31: function(arg0, arg1) {
|
|
2039
|
+
getObject(arg0).dimension = __wbindgen_enum_GpuTextureDimension[arg1];
|
|
2040
|
+
},
|
|
2041
|
+
__wbg_set_end_of_pass_write_index_786588764311c9aa: function(arg0, arg1) {
|
|
2042
|
+
getObject(arg0).endOfPassWriteIndex = arg1 >>> 0;
|
|
2043
|
+
},
|
|
2044
|
+
__wbg_set_entries_247b5e665db79583: function(arg0, arg1) {
|
|
2045
|
+
getObject(arg0).entries = getObject(arg1);
|
|
2046
|
+
},
|
|
2047
|
+
__wbg_set_entries_bfbb6a7f04b96709: function(arg0, arg1) {
|
|
2048
|
+
getObject(arg0).entries = getObject(arg1);
|
|
2049
|
+
},
|
|
2050
|
+
__wbg_set_entry_point_3b13db51cfe0c5d6: function(arg0, arg1, arg2) {
|
|
2051
|
+
getObject(arg0).entryPoint = getStringFromWasm0(arg1, arg2);
|
|
2052
|
+
},
|
|
2053
|
+
__wbg_set_external_texture_a0db2eb13c76e01c: function(arg0, arg1) {
|
|
2054
|
+
getObject(arg0).externalTexture = getObject(arg1);
|
|
2055
|
+
},
|
|
2056
|
+
__wbg_set_format_237b3e4047d1be9a: function(arg0, arg1) {
|
|
2057
|
+
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2058
|
+
},
|
|
2059
|
+
__wbg_set_format_c9dcecebf9c1e619: function(arg0, arg1) {
|
|
2060
|
+
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2061
|
+
},
|
|
2062
|
+
__wbg_set_format_d9d3420c1a9d1c59: function(arg0, arg1) {
|
|
2063
|
+
getObject(arg0).format = __wbindgen_enum_GpuTextureFormat[arg1];
|
|
2064
|
+
},
|
|
2065
|
+
__wbg_set_has_dynamic_offset_0c8a607543be8069: function(arg0, arg1) {
|
|
2066
|
+
getObject(arg0).hasDynamicOffset = arg1 !== 0;
|
|
2067
|
+
},
|
|
2068
|
+
__wbg_set_headers_7c1e39ece7826bec: function(arg0, arg1) {
|
|
2069
|
+
getObject(arg0).headers = getObject(arg1);
|
|
2070
|
+
},
|
|
2071
|
+
__wbg_set_height_96611e96eee67c44: function(arg0, arg1) {
|
|
2072
|
+
getObject(arg0).height = arg1 >>> 0;
|
|
2073
|
+
},
|
|
2074
|
+
__wbg_set_label_01228663ea03b92f: function(arg0, arg1, arg2) {
|
|
2075
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2076
|
+
},
|
|
2077
|
+
__wbg_set_label_22e57f4c5b38215f: function(arg0, arg1, arg2) {
|
|
2078
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2079
|
+
},
|
|
2080
|
+
__wbg_set_label_382417d222111912: function(arg0, arg1, arg2) {
|
|
2081
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2082
|
+
},
|
|
2083
|
+
__wbg_set_label_4d049edb707ba31c: function(arg0, arg1, arg2) {
|
|
2084
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2085
|
+
},
|
|
2086
|
+
__wbg_set_label_66fc1d23dd10d4f5: function(arg0, arg1, arg2) {
|
|
2087
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2088
|
+
},
|
|
2089
|
+
__wbg_set_label_806446f85d68e201: function(arg0, arg1, arg2) {
|
|
2090
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2091
|
+
},
|
|
2092
|
+
__wbg_set_label_8354c6463558484f: function(arg0, arg1, arg2) {
|
|
2093
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2094
|
+
},
|
|
2095
|
+
__wbg_set_label_b3da7636c69f1a4c: function(arg0, arg1, arg2) {
|
|
2096
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2097
|
+
},
|
|
2098
|
+
__wbg_set_label_b7f797c13bc822c4: function(arg0, arg1, arg2) {
|
|
2099
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2100
|
+
},
|
|
2101
|
+
__wbg_set_label_e026aa2aea731594: function(arg0, arg1, arg2) {
|
|
2102
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2103
|
+
},
|
|
2104
|
+
__wbg_set_label_e6bc3b86ef6deeb8: function(arg0, arg1, arg2) {
|
|
2105
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2106
|
+
},
|
|
2107
|
+
__wbg_set_label_e7f76bba99d72971: function(arg0, arg1, arg2) {
|
|
2108
|
+
getObject(arg0).label = getStringFromWasm0(arg1, arg2);
|
|
2109
|
+
},
|
|
2110
|
+
__wbg_set_layout_44943c4c7d78f826: function(arg0, arg1) {
|
|
2111
|
+
getObject(arg0).layout = getObject(arg1);
|
|
2112
|
+
},
|
|
2113
|
+
__wbg_set_layout_726c6ae6f5919730: function(arg0, arg1) {
|
|
2114
|
+
getObject(arg0).layout = getObject(arg1);
|
|
2115
|
+
},
|
|
2116
|
+
__wbg_set_mapped_at_creation_12773dff1bb6ea0f: function(arg0, arg1) {
|
|
2117
|
+
getObject(arg0).mappedAtCreation = arg1 !== 0;
|
|
2118
|
+
},
|
|
2119
|
+
__wbg_set_method_7a6811dec7a4feff: function(arg0, arg1, arg2) {
|
|
2120
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
2121
|
+
},
|
|
2122
|
+
__wbg_set_min_binding_size_164df827e02821e1: function(arg0, arg1) {
|
|
2123
|
+
getObject(arg0).minBindingSize = arg1;
|
|
2124
|
+
},
|
|
2125
|
+
__wbg_set_mip_level_7f56c1c607dda5cf: function(arg0, arg1) {
|
|
2126
|
+
getObject(arg0).mipLevel = arg1 >>> 0;
|
|
2127
|
+
},
|
|
2128
|
+
__wbg_set_mip_level_count_3402f5315a423b69: function(arg0, arg1) {
|
|
2129
|
+
getObject(arg0).mipLevelCount = arg1 >>> 0;
|
|
2130
|
+
},
|
|
2131
|
+
__wbg_set_mip_level_count_ed029120a0ee12b8: function(arg0, arg1) {
|
|
2132
|
+
getObject(arg0).mipLevelCount = arg1 >>> 0;
|
|
2133
|
+
},
|
|
2134
|
+
__wbg_set_module_af2f871a0bed003c: function(arg0, arg1) {
|
|
2135
|
+
getObject(arg0).module = getObject(arg1);
|
|
2136
|
+
},
|
|
2137
|
+
__wbg_set_multisampled_e9d7bed0e68d1d6f: function(arg0, arg1) {
|
|
2138
|
+
getObject(arg0).multisampled = arg1 !== 0;
|
|
2139
|
+
},
|
|
2140
|
+
__wbg_set_offset_01c04218a4ccfa08: function(arg0, arg1) {
|
|
2141
|
+
getObject(arg0).offset = arg1;
|
|
2142
|
+
},
|
|
2143
|
+
__wbg_set_offset_bd11f79890456c6f: function(arg0, arg1) {
|
|
2144
|
+
getObject(arg0).offset = arg1;
|
|
2145
|
+
},
|
|
2146
|
+
__wbg_set_offset_f07a73165707eb4c: function(arg0, arg1) {
|
|
2147
|
+
getObject(arg0).offset = arg1;
|
|
2148
|
+
},
|
|
2149
|
+
__wbg_set_origin_6be40076fb0623f4: function(arg0, arg1) {
|
|
2150
|
+
getObject(arg0).origin = getObject(arg1);
|
|
2151
|
+
},
|
|
2152
|
+
__wbg_set_power_preference_0721cf46746c0c7d: function(arg0, arg1) {
|
|
2153
|
+
getObject(arg0).powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
|
|
2154
|
+
},
|
|
2155
|
+
__wbg_set_query_set_aadbb433c8390a5c: function(arg0, arg1) {
|
|
2156
|
+
getObject(arg0).querySet = getObject(arg1);
|
|
2157
|
+
},
|
|
2158
|
+
__wbg_set_required_features_5202fa8cd082e531: function(arg0, arg1) {
|
|
2159
|
+
getObject(arg0).requiredFeatures = getObject(arg1);
|
|
2160
|
+
},
|
|
2161
|
+
__wbg_set_resource_c73d0c2d815f7211: function(arg0, arg1) {
|
|
2162
|
+
getObject(arg0).resource = getObject(arg1);
|
|
2163
|
+
},
|
|
2164
|
+
__wbg_set_responseType_cfb49ea8269f8317: function(arg0, arg1) {
|
|
2165
|
+
getObject(arg0).responseType = __wbindgen_enum_XmlHttpRequestResponseType[arg1];
|
|
2166
|
+
},
|
|
2167
|
+
__wbg_set_rows_per_image_00c8e938dae40dae: function(arg0, arg1) {
|
|
2168
|
+
getObject(arg0).rowsPerImage = arg1 >>> 0;
|
|
2169
|
+
},
|
|
2170
|
+
__wbg_set_rows_per_image_e6e2c0c4a7e4fa8d: function(arg0, arg1) {
|
|
2171
|
+
getObject(arg0).rowsPerImage = arg1 >>> 0;
|
|
2172
|
+
},
|
|
2173
|
+
__wbg_set_sample_count_05dcc9952f4fa7ac: function(arg0, arg1) {
|
|
2174
|
+
getObject(arg0).sampleCount = arg1 >>> 0;
|
|
2175
|
+
},
|
|
2176
|
+
__wbg_set_sample_type_93886b8f9794f85c: function(arg0, arg1) {
|
|
2177
|
+
getObject(arg0).sampleType = __wbindgen_enum_GpuTextureSampleType[arg1];
|
|
2178
|
+
},
|
|
2179
|
+
__wbg_set_sampler_02989e99b27a50db: function(arg0, arg1) {
|
|
2180
|
+
getObject(arg0).sampler = getObject(arg1);
|
|
2181
|
+
},
|
|
2182
|
+
__wbg_set_size_b3e6b2bf58d62082: function(arg0, arg1) {
|
|
2183
|
+
getObject(arg0).size = getObject(arg1);
|
|
2184
|
+
},
|
|
2185
|
+
__wbg_set_size_c2a556d5571231f5: function(arg0, arg1) {
|
|
2186
|
+
getObject(arg0).size = arg1;
|
|
2187
|
+
},
|
|
2188
|
+
__wbg_set_size_f7b29f6cb1669c4d: function(arg0, arg1) {
|
|
2189
|
+
getObject(arg0).size = arg1;
|
|
2190
|
+
},
|
|
2191
|
+
__wbg_set_storage_texture_50af47fec531be02: function(arg0, arg1) {
|
|
2192
|
+
getObject(arg0).storageTexture = getObject(arg1);
|
|
2193
|
+
},
|
|
2194
|
+
__wbg_set_texture_884f2777c0fe1e91: function(arg0, arg1) {
|
|
2195
|
+
getObject(arg0).texture = getObject(arg1);
|
|
2196
|
+
},
|
|
2197
|
+
__wbg_set_texture_a1baf7da91d20351: function(arg0, arg1) {
|
|
2198
|
+
getObject(arg0).texture = getObject(arg1);
|
|
2199
|
+
},
|
|
2200
|
+
__wbg_set_timestamp_writes_7fa18118aa24ddc1: function(arg0, arg1) {
|
|
2201
|
+
getObject(arg0).timestampWrites = getObject(arg1);
|
|
2202
|
+
},
|
|
2203
|
+
__wbg_set_type_109702a7ec65b49d: function(arg0, arg1) {
|
|
2204
|
+
getObject(arg0).type = __wbindgen_enum_GpuSamplerBindingType[arg1];
|
|
2205
|
+
},
|
|
2206
|
+
__wbg_set_type_55112c374bcc5a9d: function(arg0, arg1) {
|
|
2207
|
+
getObject(arg0).type = __wbindgen_enum_GpuBufferBindingType[arg1];
|
|
2208
|
+
},
|
|
2209
|
+
__wbg_set_usage_ac04cadda4108c1a: function(arg0, arg1) {
|
|
2210
|
+
getObject(arg0).usage = arg1 >>> 0;
|
|
2211
|
+
},
|
|
2212
|
+
__wbg_set_usage_ad30cd3b0e0f4244: function(arg0, arg1) {
|
|
2213
|
+
getObject(arg0).usage = arg1 >>> 0;
|
|
2214
|
+
},
|
|
2215
|
+
__wbg_set_usage_cc34543608cf3335: function(arg0, arg1) {
|
|
2216
|
+
getObject(arg0).usage = arg1 >>> 0;
|
|
2217
|
+
},
|
|
2218
|
+
__wbg_set_view_dimension_50f3edb06107948f: function(arg0, arg1) {
|
|
2219
|
+
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2220
|
+
},
|
|
2221
|
+
__wbg_set_view_dimension_925bb358df1f2b9d: function(arg0, arg1) {
|
|
2222
|
+
getObject(arg0).viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
|
|
2223
|
+
},
|
|
2224
|
+
__wbg_set_view_formats_3d2a72ffb1f55a75: function(arg0, arg1) {
|
|
2225
|
+
getObject(arg0).viewFormats = getObject(arg1);
|
|
2226
|
+
},
|
|
2227
|
+
__wbg_set_visibility_bdebc70a7c0f236d: function(arg0, arg1) {
|
|
2228
|
+
getObject(arg0).visibility = arg1 >>> 0;
|
|
2229
|
+
},
|
|
2230
|
+
__wbg_set_width_40592253da7b2113: function(arg0, arg1) {
|
|
2231
|
+
getObject(arg0).width = arg1 >>> 0;
|
|
2232
|
+
},
|
|
2233
|
+
__wbg_set_x_3c1cb8191b848172: function(arg0, arg1) {
|
|
2234
|
+
getObject(arg0).x = arg1 >>> 0;
|
|
2235
|
+
},
|
|
2236
|
+
__wbg_set_y_9024331910317eff: function(arg0, arg1) {
|
|
2237
|
+
getObject(arg0).y = arg1 >>> 0;
|
|
2238
|
+
},
|
|
2239
|
+
__wbg_set_z_b6182f4c230116a7: function(arg0, arg1) {
|
|
2240
|
+
getObject(arg0).z = arg1 >>> 0;
|
|
2241
|
+
},
|
|
2242
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
2243
|
+
const ret = getObject(arg1).stack;
|
|
2244
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2245
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2246
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2247
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2248
|
+
},
|
|
2249
|
+
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
2250
|
+
const ret = typeof global === "undefined" ? null : global;
|
|
2251
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2252
|
+
},
|
|
2253
|
+
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
2254
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
2255
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2256
|
+
},
|
|
2257
|
+
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
2258
|
+
const ret = typeof self === "undefined" ? null : self;
|
|
2259
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2260
|
+
},
|
|
2261
|
+
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
2262
|
+
const ret = typeof window === "undefined" ? null : window;
|
|
2263
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2264
|
+
},
|
|
2265
|
+
__wbg_status_214edd0820ca76fc: function() {
|
|
2266
|
+
return handleError(function(arg0) {
|
|
2267
|
+
const ret = getObject(arg0).status;
|
|
2268
|
+
return ret;
|
|
2269
|
+
}, arguments);
|
|
2270
|
+
},
|
|
2271
|
+
__wbg_subarray_4aa221f6a4f5ab22: function(arg0, arg1, arg2) {
|
|
2272
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2273
|
+
return addHeapObject(ret);
|
|
2274
|
+
},
|
|
2275
|
+
__wbg_submit_fc5b9a1154201a58: function(arg0, arg1) {
|
|
2276
|
+
getObject(arg0).submit(getObject(arg1));
|
|
2277
|
+
},
|
|
2278
|
+
__wbg_then_18f476d590e58992: function(arg0, arg1, arg2) {
|
|
2279
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
2280
|
+
return addHeapObject(ret);
|
|
2281
|
+
},
|
|
2282
|
+
__wbg_then_529ea37d9bdbf95d: function(arg0, arg1, arg2) {
|
|
2283
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
2284
|
+
return addHeapObject(ret);
|
|
2285
|
+
},
|
|
2286
|
+
__wbg_then_ac7b025999b52837: function(arg0, arg1) {
|
|
2287
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
2288
|
+
return addHeapObject(ret);
|
|
2289
|
+
},
|
|
2290
|
+
__wbg_toISOString_d485be0388a74494: function(arg0) {
|
|
2291
|
+
const ret = getObject(arg0).toISOString();
|
|
2292
|
+
return addHeapObject(ret);
|
|
2293
|
+
},
|
|
2294
|
+
__wbg_value_f3625092ee4b37f4: function(arg0) {
|
|
2295
|
+
const ret = getObject(arg0).value;
|
|
2296
|
+
return addHeapObject(ret);
|
|
2297
|
+
},
|
|
2298
|
+
__wbg_versions_215a3ab1c9d5745a: function(arg0) {
|
|
2299
|
+
const ret = getObject(arg0).versions;
|
|
2300
|
+
return addHeapObject(ret);
|
|
2301
|
+
},
|
|
2302
|
+
__wbg_warn_410c3261e3c6d686: function(arg0) {
|
|
2303
|
+
console.warn(getObject(arg0));
|
|
2304
|
+
},
|
|
2305
|
+
__wbg_writeBuffer_7d54524c36f1c7e2: function() {
|
|
2306
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
2307
|
+
getObject(arg0).writeBuffer(getObject(arg1), arg2, getObject(arg3), arg4, arg5);
|
|
2308
|
+
}, arguments);
|
|
2309
|
+
},
|
|
2310
|
+
__wbg_writeTexture_9d4c493be748d189: function() {
|
|
2311
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
2312
|
+
getObject(arg0).writeTexture(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
|
|
2313
|
+
}, arguments);
|
|
2314
|
+
},
|
|
2315
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2316
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_22721);
|
|
2317
|
+
return addHeapObject(ret);
|
|
2318
|
+
},
|
|
2319
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2320
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3565);
|
|
2321
|
+
return addHeapObject(ret);
|
|
2322
|
+
},
|
|
2323
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
2324
|
+
const ret = arg0;
|
|
2325
|
+
return addHeapObject(ret);
|
|
2326
|
+
},
|
|
2327
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
2328
|
+
const ret = arg0;
|
|
2329
|
+
return addHeapObject(ret);
|
|
2330
|
+
},
|
|
2331
|
+
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
2332
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2333
|
+
return addHeapObject(ret);
|
|
2334
|
+
},
|
|
2335
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
2336
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2337
|
+
return addHeapObject(ret);
|
|
2338
|
+
},
|
|
2339
|
+
__wbindgen_cast_0000000000000007: function(arg0) {
|
|
2340
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2341
|
+
return addHeapObject(ret);
|
|
2342
|
+
},
|
|
2343
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
2344
|
+
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
2345
|
+
wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
|
|
2346
|
+
const ret = v0;
|
|
2347
|
+
return addHeapObject(ret);
|
|
2348
|
+
},
|
|
2349
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
2350
|
+
const ret = getObject(arg0);
|
|
2351
|
+
return addHeapObject(ret);
|
|
2352
|
+
},
|
|
2353
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
2354
|
+
takeObject(arg0);
|
|
2355
|
+
}
|
|
2554
2356
|
};
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2357
|
+
return {
|
|
2358
|
+
__proto__: null,
|
|
2359
|
+
"./udoc_bg.js": import0
|
|
2558
2360
|
};
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2361
|
+
}
|
|
2362
|
+
function __wasm_bindgen_func_elem_3565(arg0, arg1, arg2) {
|
|
2363
|
+
wasm.__wasm_bindgen_func_elem_3565(arg0, arg1, addHeapObject(arg2));
|
|
2364
|
+
}
|
|
2365
|
+
function __wasm_bindgen_func_elem_22721(arg0, arg1, arg2) {
|
|
2366
|
+
try {
|
|
2367
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2368
|
+
wasm.__wasm_bindgen_func_elem_22721(retptr, arg0, arg1, addHeapObject(arg2));
|
|
2369
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2370
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2371
|
+
if (r1) {
|
|
2372
|
+
throw takeObject(r0);
|
|
2373
|
+
}
|
|
2374
|
+
} finally {
|
|
2375
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
function __wasm_bindgen_func_elem_22734(arg0, arg1, arg2, arg3) {
|
|
2379
|
+
wasm.__wasm_bindgen_func_elem_22734(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
2380
|
+
}
|
|
2381
|
+
var __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
|
|
2382
|
+
var __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
|
|
2383
|
+
var __wbindgen_enum_GpuSamplerBindingType = ["filtering", "non-filtering", "comparison"];
|
|
2384
|
+
var __wbindgen_enum_GpuStorageTextureAccess = ["write-only", "read-only", "read-write"];
|
|
2385
|
+
var __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
|
|
2386
|
+
var __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
|
|
2387
|
+
var __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"];
|
|
2388
|
+
var __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "depth", "sint", "uint"];
|
|
2389
|
+
var __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
|
|
2390
|
+
var __wbindgen_enum_XmlHttpRequestResponseType = ["", "arraybuffer", "blob", "document", "json", "text"];
|
|
2391
|
+
var WasmFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2392
|
+
}, unregister: () => {
|
|
2393
|
+
} } : new FinalizationRegistry((ptr) => wasm.__wbg_wasm_free(ptr, 1));
|
|
2394
|
+
function addHeapObject(obj) {
|
|
2395
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
2396
|
+
const idx = heap_next;
|
|
2397
|
+
heap_next = heap[idx];
|
|
2398
|
+
heap[idx] = obj;
|
|
2399
|
+
return idx;
|
|
2400
|
+
}
|
|
2401
|
+
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2402
|
+
}, unregister: () => {
|
|
2403
|
+
} } : new FinalizationRegistry((state) => wasm.__wbindgen_export5(state.a, state.b));
|
|
2404
|
+
function debugString(val) {
|
|
2405
|
+
const type = typeof val;
|
|
2406
|
+
if (type == "number" || type == "boolean" || val == null) {
|
|
2407
|
+
return `${val}`;
|
|
2408
|
+
}
|
|
2409
|
+
if (type == "string") {
|
|
2410
|
+
return `"${val}"`;
|
|
2411
|
+
}
|
|
2412
|
+
if (type == "symbol") {
|
|
2413
|
+
const description = val.description;
|
|
2414
|
+
if (description == null) {
|
|
2415
|
+
return "Symbol";
|
|
2416
|
+
} else {
|
|
2417
|
+
return `Symbol(${description})`;
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
if (type == "function") {
|
|
2421
|
+
const name = val.name;
|
|
2422
|
+
if (typeof name == "string" && name.length > 0) {
|
|
2423
|
+
return `Function(${name})`;
|
|
2424
|
+
} else {
|
|
2425
|
+
return "Function";
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
if (Array.isArray(val)) {
|
|
2429
|
+
const length = val.length;
|
|
2430
|
+
let debug = "[";
|
|
2431
|
+
if (length > 0) {
|
|
2432
|
+
debug += debugString(val[0]);
|
|
2433
|
+
}
|
|
2434
|
+
for (let i = 1; i < length; i++) {
|
|
2435
|
+
debug += ", " + debugString(val[i]);
|
|
2436
|
+
}
|
|
2437
|
+
debug += "]";
|
|
2438
|
+
return debug;
|
|
2439
|
+
}
|
|
2440
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
2441
|
+
let className;
|
|
2442
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
2443
|
+
className = builtInMatches[1];
|
|
2444
|
+
} else {
|
|
2445
|
+
return toString.call(val);
|
|
2446
|
+
}
|
|
2447
|
+
if (className == "Object") {
|
|
2448
|
+
try {
|
|
2449
|
+
return "Object(" + JSON.stringify(val) + ")";
|
|
2450
|
+
} catch (_) {
|
|
2451
|
+
return "Object";
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
if (val instanceof Error) {
|
|
2455
|
+
return `${val.name}: ${val.message}
|
|
2456
|
+
${val.stack}`;
|
|
2457
|
+
}
|
|
2458
|
+
return className;
|
|
2459
|
+
}
|
|
2460
|
+
function dropObject(idx) {
|
|
2461
|
+
if (idx < 1028) return;
|
|
2462
|
+
heap[idx] = heap_next;
|
|
2463
|
+
heap_next = idx;
|
|
2464
|
+
}
|
|
2465
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
2466
|
+
ptr = ptr >>> 0;
|
|
2467
|
+
const mem = getDataViewMemory0();
|
|
2468
|
+
const result = [];
|
|
2469
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
2470
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
2471
|
+
}
|
|
2472
|
+
return result;
|
|
2473
|
+
}
|
|
2474
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
2475
|
+
ptr = ptr >>> 0;
|
|
2476
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
2477
|
+
}
|
|
2478
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
2479
|
+
ptr = ptr >>> 0;
|
|
2480
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
2481
|
+
}
|
|
2482
|
+
var cachedDataViewMemory0 = null;
|
|
2483
|
+
function getDataViewMemory0() {
|
|
2484
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
2485
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
2486
|
+
}
|
|
2487
|
+
return cachedDataViewMemory0;
|
|
2488
|
+
}
|
|
2489
|
+
function getStringFromWasm0(ptr, len) {
|
|
2490
|
+
return decodeText(ptr >>> 0, len);
|
|
2491
|
+
}
|
|
2492
|
+
var cachedUint32ArrayMemory0 = null;
|
|
2493
|
+
function getUint32ArrayMemory0() {
|
|
2494
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
2495
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
2496
|
+
}
|
|
2497
|
+
return cachedUint32ArrayMemory0;
|
|
2498
|
+
}
|
|
2499
|
+
var cachedUint8ArrayMemory0 = null;
|
|
2500
|
+
function getUint8ArrayMemory0() {
|
|
2501
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
2502
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
2503
|
+
}
|
|
2504
|
+
return cachedUint8ArrayMemory0;
|
|
2505
|
+
}
|
|
2506
|
+
function getObject(idx) {
|
|
2507
|
+
return heap[idx];
|
|
2508
|
+
}
|
|
2509
|
+
function handleError(f, args) {
|
|
2510
|
+
try {
|
|
2511
|
+
return f.apply(this, args);
|
|
2512
|
+
} catch (e) {
|
|
2513
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
var heap = new Array(1024).fill(void 0);
|
|
2517
|
+
heap.push(void 0, null, true, false);
|
|
2518
|
+
var heap_next = heap.length;
|
|
2519
|
+
function isLikeNone(x) {
|
|
2520
|
+
return x === void 0 || x === null;
|
|
2521
|
+
}
|
|
2522
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
2523
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
2524
|
+
const real = (...args) => {
|
|
2525
|
+
state.cnt++;
|
|
2526
|
+
const a = state.a;
|
|
2527
|
+
state.a = 0;
|
|
2528
|
+
try {
|
|
2529
|
+
return f(a, state.b, ...args);
|
|
2530
|
+
} finally {
|
|
2531
|
+
state.a = a;
|
|
2532
|
+
real._wbg_cb_unref();
|
|
2533
|
+
}
|
|
2562
2534
|
};
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2535
|
+
real._wbg_cb_unref = () => {
|
|
2536
|
+
if (--state.cnt === 0) {
|
|
2537
|
+
wasm.__wbindgen_export5(state.a, state.b);
|
|
2538
|
+
state.a = 0;
|
|
2539
|
+
CLOSURE_DTORS.unregister(state);
|
|
2540
|
+
}
|
|
2566
2541
|
};
|
|
2567
|
-
|
|
2568
|
-
|
|
2542
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2543
|
+
return real;
|
|
2544
|
+
}
|
|
2545
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
2546
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
2547
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
2548
|
+
WASM_VECTOR_LEN = arg.length;
|
|
2549
|
+
return ptr;
|
|
2550
|
+
}
|
|
2551
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
2552
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
2553
|
+
const mem = getDataViewMemory0();
|
|
2554
|
+
for (let i = 0; i < array.length; i++) {
|
|
2555
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
2556
|
+
}
|
|
2557
|
+
WASM_VECTOR_LEN = array.length;
|
|
2558
|
+
return ptr;
|
|
2559
|
+
}
|
|
2560
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2561
|
+
if (realloc === void 0) {
|
|
2562
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2563
|
+
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
2564
|
+
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
2565
|
+
WASM_VECTOR_LEN = buf.length;
|
|
2566
|
+
return ptr2;
|
|
2567
|
+
}
|
|
2568
|
+
let len = arg.length;
|
|
2569
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2570
|
+
const mem = getUint8ArrayMemory0();
|
|
2571
|
+
let offset = 0;
|
|
2572
|
+
for (; offset < len; offset++) {
|
|
2573
|
+
const code = arg.charCodeAt(offset);
|
|
2574
|
+
if (code > 127) break;
|
|
2575
|
+
mem[ptr + offset] = code;
|
|
2576
|
+
}
|
|
2577
|
+
if (offset !== len) {
|
|
2578
|
+
if (offset !== 0) {
|
|
2579
|
+
arg = arg.slice(offset);
|
|
2580
|
+
}
|
|
2581
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2582
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2583
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
2584
|
+
offset += ret.written;
|
|
2585
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
2586
|
+
}
|
|
2587
|
+
WASM_VECTOR_LEN = offset;
|
|
2588
|
+
return ptr;
|
|
2589
|
+
}
|
|
2590
|
+
function takeObject(idx) {
|
|
2591
|
+
const ret = getObject(idx);
|
|
2592
|
+
dropObject(idx);
|
|
2593
|
+
return ret;
|
|
2594
|
+
}
|
|
2595
|
+
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
2596
|
+
cachedTextDecoder.decode();
|
|
2597
|
+
var MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2598
|
+
var numBytesDecoded = 0;
|
|
2599
|
+
function decodeText(ptr, len) {
|
|
2600
|
+
numBytesDecoded += len;
|
|
2601
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2602
|
+
cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
2603
|
+
cachedTextDecoder.decode();
|
|
2604
|
+
numBytesDecoded = len;
|
|
2605
|
+
}
|
|
2606
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2607
|
+
}
|
|
2608
|
+
var cachedTextEncoder = new TextEncoder();
|
|
2609
|
+
if (!("encodeInto" in cachedTextEncoder)) {
|
|
2610
|
+
cachedTextEncoder.encodeInto = function(arg, view) {
|
|
2611
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2612
|
+
view.set(buf);
|
|
2613
|
+
return {
|
|
2614
|
+
read: arg.length,
|
|
2615
|
+
written: buf.length
|
|
2616
|
+
};
|
|
2569
2617
|
};
|
|
2570
|
-
return imports;
|
|
2571
2618
|
}
|
|
2619
|
+
var WASM_VECTOR_LEN = 0;
|
|
2620
|
+
var wasmModule;
|
|
2621
|
+
var wasmInstance;
|
|
2622
|
+
var wasm;
|
|
2572
2623
|
function __wbg_finalize_init(instance, module2) {
|
|
2624
|
+
wasmInstance = instance;
|
|
2573
2625
|
wasm = instance.exports;
|
|
2574
|
-
|
|
2626
|
+
wasmModule = module2;
|
|
2575
2627
|
cachedDataViewMemory0 = null;
|
|
2576
2628
|
cachedUint32ArrayMemory0 = null;
|
|
2577
2629
|
cachedUint8ArrayMemory0 = null;
|
|
2578
2630
|
return wasm;
|
|
2579
2631
|
}
|
|
2632
|
+
async function __wbg_load(module2, imports) {
|
|
2633
|
+
if (typeof Response === "function" && module2 instanceof Response) {
|
|
2634
|
+
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
2635
|
+
try {
|
|
2636
|
+
return await WebAssembly.instantiateStreaming(module2, imports);
|
|
2637
|
+
} catch (e) {
|
|
2638
|
+
const validResponse = module2.ok && expectedResponseType(module2.type);
|
|
2639
|
+
if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
|
|
2640
|
+
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);
|
|
2641
|
+
} else {
|
|
2642
|
+
throw e;
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
const bytes = await module2.arrayBuffer();
|
|
2647
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
2648
|
+
} else {
|
|
2649
|
+
const instance = await WebAssembly.instantiate(module2, imports);
|
|
2650
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
2651
|
+
return { instance, module: module2 };
|
|
2652
|
+
} else {
|
|
2653
|
+
return instance;
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
function expectedResponseType(type) {
|
|
2657
|
+
switch (type) {
|
|
2658
|
+
case "basic":
|
|
2659
|
+
case "cors":
|
|
2660
|
+
case "default":
|
|
2661
|
+
return true;
|
|
2662
|
+
}
|
|
2663
|
+
return false;
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2580
2666
|
async function __wbg_init(module_or_path) {
|
|
2581
2667
|
if (wasm !== void 0) return wasm;
|
|
2582
|
-
if (
|
|
2668
|
+
if (module_or_path !== void 0) {
|
|
2583
2669
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2584
2670
|
({ module_or_path } = module_or_path);
|
|
2585
2671
|
} else {
|
|
2586
2672
|
console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
2587
2673
|
}
|
|
2588
2674
|
}
|
|
2589
|
-
if (
|
|
2675
|
+
if (module_or_path === void 0) {
|
|
2590
2676
|
module_or_path = new URL("udoc_bg.wasm", "about:blank");
|
|
2591
2677
|
}
|
|
2592
2678
|
const imports = __wbg_get_imports();
|
|
@@ -2596,7 +2682,6 @@ ${val.stack}`;
|
|
|
2596
2682
|
const { instance, module: module2 } = await __wbg_load(await module_or_path, imports);
|
|
2597
2683
|
return __wbg_finalize_init(instance, module2);
|
|
2598
2684
|
}
|
|
2599
|
-
var udoc_default = __wbg_init;
|
|
2600
2685
|
|
|
2601
2686
|
// dist/src/worker/worker.js
|
|
2602
2687
|
var wasm2 = null;
|
|
@@ -2625,7 +2710,7 @@ ${val.stack}`;
|
|
|
2625
2710
|
try {
|
|
2626
2711
|
switch (request.type) {
|
|
2627
2712
|
case "init": {
|
|
2628
|
-
const exports = await
|
|
2713
|
+
const exports = await __wbg_init(request.wasmUrl ? { module_or_path: request.wasmUrl } : void 0);
|
|
2629
2714
|
wasmMemory = exports.memory ?? null;
|
|
2630
2715
|
wasm2 = new Wasm(request.domain, request.viewerVersion);
|
|
2631
2716
|
if (request.gpu) {
|