@u1f992/pdfdiff 0.2.1 → 0.3.0
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/.clang-format +3 -0
- package/.github/workflows/gh-pages.yml +6 -1
- package/LICENSE +68 -81
- package/dist/browser.js +1405 -3099
- package/dist/browser.js.map +1 -1
- package/dist/cli-png-worker.d.ts +13 -0
- package/dist/cli-png-worker.d.ts.map +1 -0
- package/dist/cli-png-worker.js +287 -0
- package/dist/cli-png-worker.js.map +1 -0
- package/dist/cli.js +401 -3110
- package/dist/cli.js.map +1 -1
- package/dist/core.wasm +0 -0
- package/dist/decode.d.ts +9 -0
- package/dist/decode.d.ts.map +1 -0
- package/dist/diff.d.ts +2 -1
- package/dist/diff.d.ts.map +1 -1
- package/dist/gs-wasm/gs.js +5821 -0
- package/dist/gs-wasm/gs.wasm +0 -0
- package/dist/gs-wasm/index.js +120 -0
- package/dist/gs-wasm/index.js.map +1 -0
- package/dist/gs-wasm/worker.js +764 -0
- package/dist/gs-wasm/worker.js.map +1 -0
- package/dist/image.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.html +6 -1
- package/dist/index.js +310 -3094
- package/dist/index.js.map +1 -1
- package/dist/iterable.d.ts.map +1 -1
- package/dist/jimp.d.ts +23 -1
- package/dist/jimp.d.ts.map +1 -1
- package/dist/pdf.d.ts +15 -4
- package/dist/pdf.d.ts.map +1 -1
- package/dist/perf.d.ts +16 -0
- package/dist/perf.d.ts.map +1 -0
- package/dist/rgba-color.d.ts.map +1 -1
- package/dist/squoosh_png_bg.wasm +0 -0
- package/dist/style.css +12 -0
- package/dist/transferable.d.ts +11 -0
- package/dist/transferable.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/worker.d.ts +8 -8
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +144 -3210
- package/dist/worker.js.map +1 -1
- package/package.json +11 -4
- package/rollup.config.js +83 -5
- package/scripts/build-wasm.sh +32 -0
- package/src/browser.ts +122 -9
- package/src/cli-png-worker.ts +42 -0
- package/src/cli.ts +113 -34
- package/src/decode.ts +15 -0
- package/src/diff.ts +99 -51
- package/src/image.ts +4 -18
- package/src/index.html +6 -1
- package/src/index.test.ts +10 -18
- package/src/index.ts +176 -76
- package/src/iterable.test.ts +0 -17
- package/src/iterable.ts +0 -17
- package/src/jimp.ts +25 -7
- package/src/pdf.ts +99 -62
- package/src/perf.ts +77 -0
- package/src/rgba-color.test.ts +0 -17
- package/src/rgba-color.ts +0 -17
- package/src/style.css +12 -0
- package/src/transferable.ts +15 -0
- package/src/worker.ts +106 -100
- package/wasm/Makefile +34 -0
- package/wasm/bindings.cpp +76 -0
- package/wasm/core.c +176 -0
- package/wasm/core.h +69 -0
- package/dist/mupdf-wasm.wasm +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-png-worker.d.ts","sourceRoot":"","sources":["../src/cli-png-worker.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { parentPort } from 'node:worker_threads';
|
|
4
|
+
|
|
5
|
+
let wasm;
|
|
6
|
+
|
|
7
|
+
const heap = new Array(128).fill(undefined);
|
|
8
|
+
|
|
9
|
+
heap.push(undefined, null, true, false);
|
|
10
|
+
|
|
11
|
+
let heap_next = heap.length;
|
|
12
|
+
|
|
13
|
+
function addHeapObject(obj) {
|
|
14
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
15
|
+
const idx = heap_next;
|
|
16
|
+
heap_next = heap[idx];
|
|
17
|
+
|
|
18
|
+
heap[idx] = obj;
|
|
19
|
+
return idx;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function getObject(idx) { return heap[idx]; }
|
|
23
|
+
|
|
24
|
+
function dropObject(idx) {
|
|
25
|
+
if (idx < 132) return;
|
|
26
|
+
heap[idx] = heap_next;
|
|
27
|
+
heap_next = idx;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function takeObject(idx) {
|
|
31
|
+
const ret = getObject(idx);
|
|
32
|
+
dropObject(idx);
|
|
33
|
+
return ret;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
37
|
+
|
|
38
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }
|
|
39
|
+
let cachedUint8Memory0 = null;
|
|
40
|
+
|
|
41
|
+
function getUint8Memory0() {
|
|
42
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
43
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
44
|
+
}
|
|
45
|
+
return cachedUint8Memory0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getStringFromWasm0(ptr, len) {
|
|
49
|
+
ptr = ptr >>> 0;
|
|
50
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let cachedUint8ClampedMemory0 = null;
|
|
54
|
+
|
|
55
|
+
function getUint8ClampedMemory0() {
|
|
56
|
+
if (cachedUint8ClampedMemory0 === null || cachedUint8ClampedMemory0.byteLength === 0) {
|
|
57
|
+
cachedUint8ClampedMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
|
|
58
|
+
}
|
|
59
|
+
return cachedUint8ClampedMemory0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getClampedArrayU8FromWasm0(ptr, len) {
|
|
63
|
+
ptr = ptr >>> 0;
|
|
64
|
+
return getUint8ClampedMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
let WASM_VECTOR_LEN = 0;
|
|
68
|
+
|
|
69
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
70
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
71
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
72
|
+
WASM_VECTOR_LEN = arg.length;
|
|
73
|
+
return ptr;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
let cachedInt32Memory0 = null;
|
|
77
|
+
|
|
78
|
+
function getInt32Memory0() {
|
|
79
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
80
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
81
|
+
}
|
|
82
|
+
return cachedInt32Memory0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
86
|
+
ptr = ptr >>> 0;
|
|
87
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @param {Uint8Array} data
|
|
91
|
+
* @param {number} width
|
|
92
|
+
* @param {number} height
|
|
93
|
+
* @param {number} bit_depth
|
|
94
|
+
* @returns {Uint8Array}
|
|
95
|
+
*/
|
|
96
|
+
function encode$1(data, width, height, bit_depth) {
|
|
97
|
+
try {
|
|
98
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
99
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
100
|
+
const len0 = WASM_VECTOR_LEN;
|
|
101
|
+
wasm.encode(retptr, ptr0, len0, width, height, bit_depth);
|
|
102
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
103
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
104
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
105
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
106
|
+
return v2;
|
|
107
|
+
} finally {
|
|
108
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
async function __wbg_load(module, imports) {
|
|
113
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
114
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
115
|
+
try {
|
|
116
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
117
|
+
|
|
118
|
+
} catch (e) {
|
|
119
|
+
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
120
|
+
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);
|
|
121
|
+
|
|
122
|
+
} else {
|
|
123
|
+
throw e;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const bytes = await module.arrayBuffer();
|
|
129
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
130
|
+
|
|
131
|
+
} else {
|
|
132
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
133
|
+
|
|
134
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
135
|
+
return { instance, module };
|
|
136
|
+
|
|
137
|
+
} else {
|
|
138
|
+
return instance;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function __wbg_get_imports() {
|
|
144
|
+
const imports = {};
|
|
145
|
+
imports.wbg = {};
|
|
146
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
147
|
+
const ret = wasm.memory;
|
|
148
|
+
return addHeapObject(ret);
|
|
149
|
+
};
|
|
150
|
+
imports.wbg.__wbg_buffer_a448f833075b71ba = function(arg0) {
|
|
151
|
+
const ret = getObject(arg0).buffer;
|
|
152
|
+
return addHeapObject(ret);
|
|
153
|
+
};
|
|
154
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_099217381c451830 = function(arg0, arg1, arg2) {
|
|
155
|
+
const ret = new Uint16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
156
|
+
return addHeapObject(ret);
|
|
157
|
+
};
|
|
158
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
159
|
+
takeObject(arg0);
|
|
160
|
+
};
|
|
161
|
+
imports.wbg.__wbg_newwithownedu8clampedarrayandsh_91db5987993a08fb = function(arg0, arg1, arg2, arg3) {
|
|
162
|
+
var v0 = getClampedArrayU8FromWasm0(arg0, arg1).slice();
|
|
163
|
+
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
164
|
+
const ret = new ImageData(v0, arg2 >>> 0, arg3 >>> 0);
|
|
165
|
+
return addHeapObject(ret);
|
|
166
|
+
};
|
|
167
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
168
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
return imports;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function __wbg_finalize_init(instance, module) {
|
|
175
|
+
wasm = instance.exports;
|
|
176
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
177
|
+
cachedInt32Memory0 = null;
|
|
178
|
+
cachedUint8Memory0 = null;
|
|
179
|
+
cachedUint8ClampedMemory0 = null;
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
return wasm;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
async function __wbg_init(input) {
|
|
186
|
+
if (wasm !== undefined) return wasm;
|
|
187
|
+
|
|
188
|
+
if (typeof input === 'undefined') {
|
|
189
|
+
input = new URL('squoosh_png_bg.wasm', import.meta.url);
|
|
190
|
+
}
|
|
191
|
+
const imports = __wbg_get_imports();
|
|
192
|
+
|
|
193
|
+
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
194
|
+
input = fetch(input);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const { instance, module } = await __wbg_load(await input, imports);
|
|
198
|
+
|
|
199
|
+
return __wbg_finalize_init(instance, module);
|
|
200
|
+
}
|
|
201
|
+
const isServiceWorker = globalThis.ServiceWorkerGlobalScope !== undefined;
|
|
202
|
+
const isRunningInCloudFlareWorkers = isServiceWorker && typeof self !== 'undefined' && globalThis.caches && globalThis.caches.default !== undefined;
|
|
203
|
+
const isRunningInNode = typeof process === 'object' && process.release && process.release.name === 'node';
|
|
204
|
+
|
|
205
|
+
if (isRunningInCloudFlareWorkers || isRunningInNode) {
|
|
206
|
+
if (!globalThis.ImageData) {
|
|
207
|
+
// Simple Polyfill for ImageData Object
|
|
208
|
+
globalThis.ImageData = class ImageData {
|
|
209
|
+
constructor(data, width, height) {
|
|
210
|
+
this.data = data;
|
|
211
|
+
this.width = width;
|
|
212
|
+
this.height = height;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (import.meta.url === undefined) {
|
|
218
|
+
import.meta.url = 'https://localhost';
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (typeof self !== 'undefined' && self.location === undefined) {
|
|
222
|
+
self.location = { href: '' };
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Copyright 2020 Google Inc. All Rights Reserved.
|
|
228
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
229
|
+
* you may not use this file except in compliance with the License.
|
|
230
|
+
* You may obtain a copy of the License at
|
|
231
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
232
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
233
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
234
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
235
|
+
* See the License for the specific language governing permissions and
|
|
236
|
+
* limitations under the License.
|
|
237
|
+
*/
|
|
238
|
+
let pngModule;
|
|
239
|
+
async function init(moduleOrPath) {
|
|
240
|
+
if (!pngModule) {
|
|
241
|
+
pngModule = __wbg_init(moduleOrPath);
|
|
242
|
+
}
|
|
243
|
+
return pngModule;
|
|
244
|
+
}
|
|
245
|
+
async function encode(data, options = {}) {
|
|
246
|
+
var _a;
|
|
247
|
+
await init();
|
|
248
|
+
const bitDepth = (_a = options === null || options === void 0 ? void 0 : options.bitDepth) !== null && _a !== void 0 ? _a : 8;
|
|
249
|
+
if (bitDepth !== 8 && bitDepth !== 16) {
|
|
250
|
+
throw new Error('Invalid bit depth. Must be either 8 or 16.');
|
|
251
|
+
}
|
|
252
|
+
const isUint16Array = data.data instanceof Uint16Array;
|
|
253
|
+
if (isUint16Array && bitDepth !== 16) {
|
|
254
|
+
throw new Error('Invalid bit depth, must be 16 for Uint16Array or manually convert to RGB8 values with Uint8Array.');
|
|
255
|
+
}
|
|
256
|
+
if (!isUint16Array && bitDepth === 16) {
|
|
257
|
+
throw new Error('Invalid bit depth, must be 8 for Uint8Array or manually convert to RGB16 values with Uint16Array.');
|
|
258
|
+
}
|
|
259
|
+
const encodeData = new Uint8Array(data.data.buffer);
|
|
260
|
+
const output = await encode$1(encodeData, data.width, data.height, bitDepth);
|
|
261
|
+
if (!output)
|
|
262
|
+
throw new Error('Encoding error.');
|
|
263
|
+
return output.buffer;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const wasmPath = fileURLToPath(new URL("./squoosh_png_bg.wasm", import.meta.url));
|
|
267
|
+
await init(fs.readFileSync(wasmPath));
|
|
268
|
+
if (!parentPort) {
|
|
269
|
+
throw new Error("cli-png-worker must be run as a worker_threads worker");
|
|
270
|
+
}
|
|
271
|
+
const port = parentPort;
|
|
272
|
+
port.on("message", async (job) => {
|
|
273
|
+
try {
|
|
274
|
+
const png = await encode(new ImageData(new Uint8ClampedArray(job.data), job.width, job.height));
|
|
275
|
+
fs.writeFileSync(job.path, new Uint8Array(png));
|
|
276
|
+
const reply = { ok: true };
|
|
277
|
+
port.postMessage(reply);
|
|
278
|
+
}
|
|
279
|
+
catch (e) {
|
|
280
|
+
const reply = {
|
|
281
|
+
ok: false,
|
|
282
|
+
error: e instanceof Error ? `${e.message}\n${e.stack}` : String(e),
|
|
283
|
+
};
|
|
284
|
+
port.postMessage(reply);
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
//# sourceMappingURL=cli-png-worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-png-worker.js","sources":["../node_modules/@jsquash/png/codec/pkg/squoosh_png.js","../node_modules/@jsquash/png/encode.js","../src/cli-png-worker.ts"],"sourcesContent":["let wasm;\n\nconst heap = new Array(128).fill(undefined);\n\nheap.push(undefined, null, true, false);\n\nlet heap_next = heap.length;\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nfunction getObject(idx) { return heap[idx]; }\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8Memory0 = null;\n\nfunction getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n}\n\nlet cachedUint8ClampedMemory0 = null;\n\nfunction getUint8ClampedMemory0() {\n if (cachedUint8ClampedMemory0 === null || cachedUint8ClampedMemory0.byteLength === 0) {\n cachedUint8ClampedMemory0 = new Uint8ClampedArray(wasm.memory.buffer);\n }\n return cachedUint8ClampedMemory0;\n}\n\nfunction getClampedArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ClampedMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nlet cachedInt32Memory0 = null;\n\nfunction getInt32Memory0() {\n if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {\n cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);\n }\n return cachedInt32Memory0;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);\n}\n/**\n* @param {Uint8Array} data\n* @param {number} width\n* @param {number} height\n* @param {number} bit_depth\n* @returns {Uint8Array}\n*/\nexport function encode(data, width, height, bit_depth) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.encode(retptr, ptr0, len0, width, height, bit_depth);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var v2 = getArrayU8FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 1, 1);\n return v2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n}\n\n/**\n* @param {Uint8Array} data\n* @returns {ImageData}\n*/\nexport function decode(data) {\n const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.decode(ptr0, len0);\n return takeObject(ret);\n}\n\n/**\n* @param {Uint8Array} data\n* @returns {ImageDataRGBA16}\n*/\nexport function decode_rgba16(data) {\n const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.decode_rgba16(ptr0, len0);\n return ImageDataRGBA16.__wrap(ret);\n}\n\n/**\n*/\nexport class ImageDataRGBA16 {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ImageDataRGBA16.prototype);\n obj.__wbg_ptr = ptr;\n\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_imagedatargba16_free(ptr);\n }\n /**\n * @returns {number}\n */\n get width() {\n const ret = wasm.imagedatargba16_width(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {number}\n */\n get height() {\n const ret = wasm.imagedatargba16_height(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @returns {Uint16Array}\n */\n get data() {\n const ret = wasm.imagedatargba16_data(this.__wbg_ptr);\n return takeObject(ret);\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n 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);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_buffer_a448f833075b71ba = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_099217381c451830 = function(arg0, arg1, arg2) {\n const ret = new Uint16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_newwithownedu8clampedarrayandsh_91db5987993a08fb = function(arg0, arg1, arg2, arg3) {\n var v0 = getClampedArrayU8FromWasm0(arg0, arg1).slice();\n wasm.__wbindgen_free(arg0, arg1 * 1, 1);\n const ret = new ImageData(v0, arg2 >>> 0, arg3 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, maybe_memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedInt32Memory0 = null;\n cachedUint8Memory0 = null;\n cachedUint8ClampedMemory0 = null;\n\n\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(input) {\n if (wasm !== undefined) return wasm;\n\n if (typeof input === 'undefined') {\n input = new URL('squoosh_png_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {\n input = fetch(input);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await input, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync }\nexport default __wbg_init;\nconst isServiceWorker = globalThis.ServiceWorkerGlobalScope !== undefined;\nconst isRunningInCloudFlareWorkers = isServiceWorker && typeof self !== 'undefined' && globalThis.caches && globalThis.caches.default !== undefined;\nconst isRunningInNode = typeof process === 'object' && process.release && process.release.name === 'node';\n\nif (isRunningInCloudFlareWorkers || isRunningInNode) {\n if (!globalThis.ImageData) {\n // Simple Polyfill for ImageData Object\n globalThis.ImageData = class ImageData {\n constructor(data, width, height) {\n this.data = data;\n this.width = width;\n this.height = height;\n }\n };\n }\n\n if (import.meta.url === undefined) {\n import.meta.url = 'https://localhost';\n }\n\n if (typeof self !== 'undefined' && self.location === undefined) {\n self.location = { href: '' };\n }\n}\n","/**\n * Copyright 2020 Google Inc. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport initPngModule, { encode as pngEncode } from './codec/pkg/squoosh_png.js';\nlet pngModule;\nexport async function init(moduleOrPath) {\n if (!pngModule) {\n pngModule = initPngModule(moduleOrPath);\n }\n return pngModule;\n}\nexport default async function encode(data, options = {}) {\n var _a;\n await init();\n const bitDepth = (_a = options === null || options === void 0 ? void 0 : options.bitDepth) !== null && _a !== void 0 ? _a : 8;\n if (bitDepth !== 8 && bitDepth !== 16) {\n throw new Error('Invalid bit depth. Must be either 8 or 16.');\n }\n const isUint16Array = data.data instanceof Uint16Array;\n if (isUint16Array && bitDepth !== 16) {\n throw new Error('Invalid bit depth, must be 16 for Uint16Array or manually convert to RGB8 values with Uint8Array.');\n }\n if (!isUint16Array && bitDepth === 16) {\n throw new Error('Invalid bit depth, must be 8 for Uint8Array or manually convert to RGB16 values with Uint16Array.');\n }\n const encodeData = new Uint8Array(data.data.buffer);\n const output = await pngEncode(encodeData, data.width, data.height, bitDepth);\n if (!output)\n throw new Error('Encoding error.');\n return output.buffer;\n}\n",null],"names":["encode","initPngModule","pngEncode"],"mappings":";;;;AAAA,IAAI,IAAI;;AAER,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;;AAE3C,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC;;AAEvC,IAAI,SAAS,GAAG,IAAI,CAAC,MAAM;;AAE3B,SAAS,aAAa,CAAC,GAAG,EAAE;AAC5B,IAAI,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AAC7D,IAAI,MAAM,GAAG,GAAG,SAAS;AACzB,IAAI,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC;;AAEzB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG;AACnB,IAAI,OAAO,GAAG;AACd;;AAEA,SAAS,SAAS,CAAC,GAAG,EAAE,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;;AAE3C,SAAS,UAAU,CAAC,GAAG,EAAE;AACzB,IAAI,IAAI,GAAG,GAAG,GAAG,EAAE;AACnB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS;A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