create-opentray 0.22.0 → 0.24.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/assets/create-openspec-template-iOS-Dark-1024@1x.png +0 -0
- package/assets/create-openspec-template-iOS-Default-1024@1x.png +0 -0
- package/assets/inter-glyph.OFL.txt +93 -0
- package/assets/inter-glyph.ttf +0 -0
- package/dist/{bin-Dyfucd3C.mjs → bin-BQb2Bjcu.mjs} +449 -2787
- package/dist/bin-BQb2Bjcu.mjs.map +1 -0
- package/dist/bin.mjs +1 -1
- package/dist/{decode-ico-D3SL2BXi.mjs → decode-ico-BHd2POHf.mjs} +2 -2
- package/dist/{decode-ico-D3SL2BXi.mjs.map → decode-ico-BHd2POHf.mjs.map} +1 -1
- package/dist/index.d.mts +40 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{raster-BQ07mKLu.mjs → raster-DeMbA2zI.mjs} +15 -16
- package/dist/{raster-BQ07mKLu.mjs.map → raster-DeMbA2zI.mjs.map} +1 -1
- package/dist/shell/assets/browse.js +1 -1
- package/dist/shell/assets/index.css +1 -1
- package/dist/shell/assets/index.js +9 -9
- package/dist/shell/assets/index2.js +2 -0
- package/dist/shell/assets/input.js +1 -1
- package/dist/shell/assets/main.js +20 -19
- package/dist/shell/assets/ort.bundle.min.js +2763 -0
- package/dist/shell/assets/ort.bundle.min.mjs +2817 -0
- package/dist/shell/assets/ort.webgpu.bundle.min.js +2763 -0
- package/dist/shell/assets/ort.webgpu.bundle.min.mjs +2817 -0
- package/dist/shell/assets/terminal-pane.js +1 -1
- package/dist/shell/assets/terminal.js +1 -1
- package/dist/shell/browse.html +1 -1
- package/dist/shell/index.html +1 -1
- package/dist/shell/terminal.html +1 -1
- package/dist/webui/assets/browse.js +1 -1
- package/dist/webui/assets/index.css +1 -1
- package/dist/webui/assets/index.js +9 -9
- package/dist/webui/assets/index2.js +2 -0
- package/dist/webui/assets/input.js +1 -1
- package/dist/webui/assets/main.js +20 -19
- package/dist/webui/assets/ort.bundle.min.js +2763 -0
- package/dist/webui/assets/ort.bundle.min.mjs +2817 -0
- package/dist/webui/assets/ort.webgpu.bundle.min.js +2763 -0
- package/dist/webui/assets/ort.webgpu.bundle.min.mjs +2817 -0
- package/dist/webui/assets/terminal-pane.js +1 -1
- package/dist/webui/assets/terminal.js +1 -1
- package/dist/webui/browse.html +1 -1
- package/dist/webui/index.html +1 -1
- package/dist/webui/terminal.html +1 -1
- package/package.json +15 -6
- package/dist/avif-DCXcyYJR.mjs +0 -2
- package/dist/bin-Dyfucd3C.mjs.map +0 -1
- package/dist/decode-C4b5NXc_.mjs +0 -1236
- package/dist/decode-C4b5NXc_.mjs.map +0 -1
- package/dist/decode-Dsj9J0OD.mjs +0 -1214
- package/dist/decode-Dsj9J0OD.mjs.map +0 -1
- package/dist/decode-FysWS28R.mjs +0 -254
- package/dist/decode-FysWS28R.mjs.map +0 -1
- package/dist/decode-Xr7mARKr.mjs +0 -1262
- package/dist/decode-Xr7mARKr.mjs.map +0 -1
- package/dist/full.umd-oM1VUBRH.mjs +0 -3055
- package/dist/full.umd-oM1VUBRH.mjs.map +0 -1
- package/dist/jpeg-B4tsxG5f.mjs +0 -2
- package/dist/png-rD0XEazj.mjs +0 -35
- package/dist/png-rD0XEazj.mjs.map +0 -1
- package/dist/resize-B47sgoOb.mjs +0 -489
- package/dist/resize-B47sgoOb.mjs.map +0 -1
- package/dist/resvg-wasm-fcJTLpJs.mjs +0 -522
- package/dist/resvg-wasm-fcJTLpJs.mjs.map +0 -1
- package/dist/rolldown-runtime-JspESFgx.mjs +0 -35
- package/dist/webp-CcbaCrQ7.mjs +0 -2
package/dist/resize-B47sgoOb.mjs
DELETED
|
@@ -1,489 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/util.js
|
|
2
|
-
/**
|
|
3
|
-
* Copyright 2020 Google Inc. All Rights Reserved.
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
* See the License for the specific language governing permissions and
|
|
12
|
-
* limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
function getContainOffsets(sw, sh, dw, dh) {
|
|
15
|
-
const currentAspect = sw / sh;
|
|
16
|
-
const endAspect = dw / dh;
|
|
17
|
-
if (endAspect > currentAspect) {
|
|
18
|
-
const newSh = sw / endAspect;
|
|
19
|
-
return {
|
|
20
|
-
sw,
|
|
21
|
-
sh: newSh,
|
|
22
|
-
sx: 0,
|
|
23
|
-
sy: (sh - newSh) / 2
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const newSw = sh * endAspect;
|
|
27
|
-
return {
|
|
28
|
-
sh,
|
|
29
|
-
sw: newSw,
|
|
30
|
-
sx: (sw - newSw) / 2,
|
|
31
|
-
sy: 0
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region ../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/lib/resize/pkg/squoosh_resize.js
|
|
36
|
-
let wasm$2;
|
|
37
|
-
let cachedUint8Memory0 = null;
|
|
38
|
-
function getUint8Memory0() {
|
|
39
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) cachedUint8Memory0 = new Uint8Array(wasm$2.memory.buffer);
|
|
40
|
-
return cachedUint8Memory0;
|
|
41
|
-
}
|
|
42
|
-
let WASM_VECTOR_LEN$2 = 0;
|
|
43
|
-
function passArray8ToWasm0$1(arg, malloc) {
|
|
44
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
45
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
46
|
-
WASM_VECTOR_LEN$2 = arg.length;
|
|
47
|
-
return ptr;
|
|
48
|
-
}
|
|
49
|
-
let cachedInt32Memory0$1 = null;
|
|
50
|
-
function getInt32Memory0$1() {
|
|
51
|
-
if (cachedInt32Memory0$1 === null || cachedInt32Memory0$1.byteLength === 0) cachedInt32Memory0$1 = new Int32Array(wasm$2.memory.buffer);
|
|
52
|
-
return cachedInt32Memory0$1;
|
|
53
|
-
}
|
|
54
|
-
let cachedUint8ClampedMemory0 = null;
|
|
55
|
-
function getUint8ClampedMemory0() {
|
|
56
|
-
if (cachedUint8ClampedMemory0 === null || cachedUint8ClampedMemory0.byteLength === 0) cachedUint8ClampedMemory0 = new Uint8ClampedArray(wasm$2.memory.buffer);
|
|
57
|
-
return cachedUint8ClampedMemory0;
|
|
58
|
-
}
|
|
59
|
-
function getClampedArrayU8FromWasm0$1(ptr, len) {
|
|
60
|
-
ptr = ptr >>> 0;
|
|
61
|
-
return getUint8ClampedMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* @param {Uint8Array} input_image
|
|
65
|
-
* @param {number} input_width
|
|
66
|
-
* @param {number} input_height
|
|
67
|
-
* @param {number} output_width
|
|
68
|
-
* @param {number} output_height
|
|
69
|
-
* @param {number} typ_idx
|
|
70
|
-
* @param {boolean} premultiply
|
|
71
|
-
* @param {boolean} color_space_conversion
|
|
72
|
-
* @returns {Uint8ClampedArray}
|
|
73
|
-
*/
|
|
74
|
-
function resize$3(input_image, input_width, input_height, output_width, output_height, typ_idx, premultiply, color_space_conversion) {
|
|
75
|
-
try {
|
|
76
|
-
const retptr = wasm$2.__wbindgen_add_to_stack_pointer(-16);
|
|
77
|
-
const ptr0 = passArray8ToWasm0$1(input_image, wasm$2.__wbindgen_malloc);
|
|
78
|
-
const len0 = WASM_VECTOR_LEN$2;
|
|
79
|
-
wasm$2.resize(retptr, ptr0, len0, input_width, input_height, output_width, output_height, typ_idx, premultiply, color_space_conversion);
|
|
80
|
-
var r0 = getInt32Memory0$1()[retptr / 4 + 0];
|
|
81
|
-
var r1 = getInt32Memory0$1()[retptr / 4 + 1];
|
|
82
|
-
var v2 = getClampedArrayU8FromWasm0$1(r0, r1).slice();
|
|
83
|
-
wasm$2.__wbindgen_free(r0, r1 * 1, 1);
|
|
84
|
-
return v2;
|
|
85
|
-
} finally {
|
|
86
|
-
wasm$2.__wbindgen_add_to_stack_pointer(16);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
async function __wbg_load$2(module, imports) {
|
|
90
|
-
if (typeof Response === "function" && module instanceof Response) {
|
|
91
|
-
if (typeof WebAssembly.instantiateStreaming === "function") try {
|
|
92
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
93
|
-
} catch (e) {
|
|
94
|
-
if (module.headers.get("Content-Type") != "application/wasm") 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);
|
|
95
|
-
else throw e;
|
|
96
|
-
}
|
|
97
|
-
const bytes = await module.arrayBuffer();
|
|
98
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
99
|
-
} else {
|
|
100
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
101
|
-
if (instance instanceof WebAssembly.Instance) return {
|
|
102
|
-
instance,
|
|
103
|
-
module
|
|
104
|
-
};
|
|
105
|
-
else return instance;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
function __wbg_get_imports$2() {
|
|
109
|
-
const imports = {};
|
|
110
|
-
imports.wbg = {};
|
|
111
|
-
return imports;
|
|
112
|
-
}
|
|
113
|
-
function __wbg_finalize_init$2(instance, module) {
|
|
114
|
-
wasm$2 = instance.exports;
|
|
115
|
-
__wbg_init$2.__wbindgen_wasm_module = module;
|
|
116
|
-
cachedInt32Memory0$1 = null;
|
|
117
|
-
cachedUint8Memory0 = null;
|
|
118
|
-
cachedUint8ClampedMemory0 = null;
|
|
119
|
-
return wasm$2;
|
|
120
|
-
}
|
|
121
|
-
async function __wbg_init$2(input) {
|
|
122
|
-
if (wasm$2 !== void 0) return wasm$2;
|
|
123
|
-
if (typeof input === "undefined") input = new URL("squoosh_resize_bg.wasm", import.meta.url);
|
|
124
|
-
const imports = __wbg_get_imports$2();
|
|
125
|
-
if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) input = fetch(input);
|
|
126
|
-
const { instance, module } = await __wbg_load$2(await input, imports);
|
|
127
|
-
return __wbg_finalize_init$2(instance, module);
|
|
128
|
-
}
|
|
129
|
-
const isRunningInCloudFlareWorkers$2 = globalThis.ServiceWorkerGlobalScope !== void 0 && typeof self !== "undefined" && globalThis.caches && globalThis.caches.default !== void 0;
|
|
130
|
-
const isRunningInNode$2 = typeof process === "object" && process.release && process.release.name === "node";
|
|
131
|
-
if (isRunningInCloudFlareWorkers$2 || isRunningInNode$2) {
|
|
132
|
-
if (!globalThis.ImageData) globalThis.ImageData = class ImageData {
|
|
133
|
-
constructor(data, width, height) {
|
|
134
|
-
this.data = data;
|
|
135
|
-
this.width = width;
|
|
136
|
-
this.height = height;
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
if (import.meta.url === void 0) import.meta.url = "https://localhost";
|
|
140
|
-
if (typeof self !== "undefined" && self.location === void 0) self.location = { href: "" };
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region ../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/lib/hqx/pkg/squooshhqx.js
|
|
144
|
-
let wasm$1;
|
|
145
|
-
let cachedUint32Memory0 = null;
|
|
146
|
-
function getUint32Memory0() {
|
|
147
|
-
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) cachedUint32Memory0 = new Uint32Array(wasm$1.memory.buffer);
|
|
148
|
-
return cachedUint32Memory0;
|
|
149
|
-
}
|
|
150
|
-
let WASM_VECTOR_LEN$1 = 0;
|
|
151
|
-
function passArray32ToWasm0(arg, malloc) {
|
|
152
|
-
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
153
|
-
getUint32Memory0().set(arg, ptr / 4);
|
|
154
|
-
WASM_VECTOR_LEN$1 = arg.length;
|
|
155
|
-
return ptr;
|
|
156
|
-
}
|
|
157
|
-
let cachedInt32Memory0 = null;
|
|
158
|
-
function getInt32Memory0() {
|
|
159
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) cachedInt32Memory0 = new Int32Array(wasm$1.memory.buffer);
|
|
160
|
-
return cachedInt32Memory0;
|
|
161
|
-
}
|
|
162
|
-
function getArrayU32FromWasm0(ptr, len) {
|
|
163
|
-
ptr = ptr >>> 0;
|
|
164
|
-
return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* @param {Uint32Array} input_image
|
|
168
|
-
* @param {number} input_width
|
|
169
|
-
* @param {number} input_height
|
|
170
|
-
* @param {number} factor
|
|
171
|
-
* @returns {Uint32Array}
|
|
172
|
-
*/
|
|
173
|
-
function resize$2(input_image, input_width, input_height, factor) {
|
|
174
|
-
try {
|
|
175
|
-
const retptr = wasm$1.__wbindgen_add_to_stack_pointer(-16);
|
|
176
|
-
const ptr0 = passArray32ToWasm0(input_image, wasm$1.__wbindgen_malloc);
|
|
177
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
178
|
-
wasm$1.resize(retptr, ptr0, len0, input_width, input_height, factor);
|
|
179
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
180
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
181
|
-
var v2 = getArrayU32FromWasm0(r0, r1).slice();
|
|
182
|
-
wasm$1.__wbindgen_free(r0, r1 * 4, 4);
|
|
183
|
-
return v2;
|
|
184
|
-
} finally {
|
|
185
|
-
wasm$1.__wbindgen_add_to_stack_pointer(16);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
async function __wbg_load$1(module, imports) {
|
|
189
|
-
if (typeof Response === "function" && module instanceof Response) {
|
|
190
|
-
if (typeof WebAssembly.instantiateStreaming === "function") try {
|
|
191
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
192
|
-
} catch (e) {
|
|
193
|
-
if (module.headers.get("Content-Type") != "application/wasm") 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);
|
|
194
|
-
else throw e;
|
|
195
|
-
}
|
|
196
|
-
const bytes = await module.arrayBuffer();
|
|
197
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
198
|
-
} else {
|
|
199
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
200
|
-
if (instance instanceof WebAssembly.Instance) return {
|
|
201
|
-
instance,
|
|
202
|
-
module
|
|
203
|
-
};
|
|
204
|
-
else return instance;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
function __wbg_get_imports$1() {
|
|
208
|
-
const imports = {};
|
|
209
|
-
imports.wbg = {};
|
|
210
|
-
return imports;
|
|
211
|
-
}
|
|
212
|
-
function __wbg_finalize_init$1(instance, module) {
|
|
213
|
-
wasm$1 = instance.exports;
|
|
214
|
-
__wbg_init$1.__wbindgen_wasm_module = module;
|
|
215
|
-
cachedInt32Memory0 = null;
|
|
216
|
-
cachedUint32Memory0 = null;
|
|
217
|
-
return wasm$1;
|
|
218
|
-
}
|
|
219
|
-
async function __wbg_init$1(input) {
|
|
220
|
-
if (wasm$1 !== void 0) return wasm$1;
|
|
221
|
-
if (typeof input === "undefined") input = new URL("squooshhqx_bg.wasm", import.meta.url);
|
|
222
|
-
const imports = __wbg_get_imports$1();
|
|
223
|
-
if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) input = fetch(input);
|
|
224
|
-
const { instance, module } = await __wbg_load$1(await input, imports);
|
|
225
|
-
return __wbg_finalize_init$1(instance, module);
|
|
226
|
-
}
|
|
227
|
-
const isRunningInCloudFlareWorkers$1 = globalThis.ServiceWorkerGlobalScope !== void 0 && typeof self !== "undefined" && globalThis.caches && globalThis.caches.default !== void 0;
|
|
228
|
-
const isRunningInNode$1 = typeof process === "object" && process.release && process.release.name === "node";
|
|
229
|
-
if (isRunningInCloudFlareWorkers$1 || isRunningInNode$1) {
|
|
230
|
-
if (!globalThis.ImageData) globalThis.ImageData = class ImageData {
|
|
231
|
-
constructor(data, width, height) {
|
|
232
|
-
this.data = data;
|
|
233
|
-
this.width = width;
|
|
234
|
-
this.height = height;
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
if (import.meta.url === void 0) import.meta.url = "https://localhost";
|
|
238
|
-
if (typeof self !== "undefined" && self.location === void 0) self.location = { href: "" };
|
|
239
|
-
}
|
|
240
|
-
//#endregion
|
|
241
|
-
//#region ../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/lib/magic-kernel/pkg/jsquash_magic_kernel.js
|
|
242
|
-
let wasm;
|
|
243
|
-
function getClampedArrayU8FromWasm0(ptr, len) {
|
|
244
|
-
ptr = ptr >>> 0;
|
|
245
|
-
return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
246
|
-
}
|
|
247
|
-
let cachedUint8ArrayMemory0 = null;
|
|
248
|
-
function getUint8ArrayMemory0() {
|
|
249
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
250
|
-
return cachedUint8ArrayMemory0;
|
|
251
|
-
}
|
|
252
|
-
let cachedUint8ClampedArrayMemory0 = null;
|
|
253
|
-
function getUint8ClampedArrayMemory0() {
|
|
254
|
-
if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
|
|
255
|
-
return cachedUint8ClampedArrayMemory0;
|
|
256
|
-
}
|
|
257
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
258
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
259
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
260
|
-
WASM_VECTOR_LEN = arg.length;
|
|
261
|
-
return ptr;
|
|
262
|
-
}
|
|
263
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
264
|
-
if (realloc === void 0) {
|
|
265
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
266
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
267
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
268
|
-
WASM_VECTOR_LEN = buf.length;
|
|
269
|
-
return ptr;
|
|
270
|
-
}
|
|
271
|
-
let len = arg.length;
|
|
272
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
273
|
-
const mem = getUint8ArrayMemory0();
|
|
274
|
-
let offset = 0;
|
|
275
|
-
for (; offset < len; offset++) {
|
|
276
|
-
const code = arg.charCodeAt(offset);
|
|
277
|
-
if (code > 127) break;
|
|
278
|
-
mem[ptr + offset] = code;
|
|
279
|
-
}
|
|
280
|
-
if (offset !== len) {
|
|
281
|
-
if (offset !== 0) arg = arg.slice(offset);
|
|
282
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
283
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
284
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
285
|
-
offset += ret.written;
|
|
286
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
287
|
-
}
|
|
288
|
-
WASM_VECTOR_LEN = offset;
|
|
289
|
-
return ptr;
|
|
290
|
-
}
|
|
291
|
-
const cachedTextEncoder = new TextEncoder();
|
|
292
|
-
if (!("encodeInto" in cachedTextEncoder)) cachedTextEncoder.encodeInto = function(arg, view) {
|
|
293
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
294
|
-
view.set(buf);
|
|
295
|
-
return {
|
|
296
|
-
read: arg.length,
|
|
297
|
-
written: buf.length
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
let WASM_VECTOR_LEN = 0;
|
|
301
|
-
/**
|
|
302
|
-
* @param {Uint8Array} data
|
|
303
|
-
* @param {number} input_width
|
|
304
|
-
* @param {number} input_height
|
|
305
|
-
* @param {number} output_width
|
|
306
|
-
* @param {number} output_height
|
|
307
|
-
* @param {string} version
|
|
308
|
-
* @returns {ImageData}
|
|
309
|
-
*/
|
|
310
|
-
function resize$1(data, input_width, input_height, output_width, output_height, version) {
|
|
311
|
-
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
312
|
-
const len0 = WASM_VECTOR_LEN;
|
|
313
|
-
const ptr1 = passStringToWasm0(version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
314
|
-
const len1 = WASM_VECTOR_LEN;
|
|
315
|
-
return wasm.resize(ptr0, len0, input_width, input_height, output_width, output_height, ptr1, len1);
|
|
316
|
-
}
|
|
317
|
-
const EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set([
|
|
318
|
-
"basic",
|
|
319
|
-
"cors",
|
|
320
|
-
"default"
|
|
321
|
-
]);
|
|
322
|
-
async function __wbg_load(module, imports) {
|
|
323
|
-
if (typeof Response === "function" && module instanceof Response) {
|
|
324
|
-
if (typeof WebAssembly.instantiateStreaming === "function") try {
|
|
325
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
326
|
-
} catch (e) {
|
|
327
|
-
if (module.ok && EXPECTED_RESPONSE_TYPES.has(module.type) && module.headers.get("Content-Type") !== "application/wasm") 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);
|
|
328
|
-
else throw e;
|
|
329
|
-
}
|
|
330
|
-
const bytes = await module.arrayBuffer();
|
|
331
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
332
|
-
} else {
|
|
333
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
334
|
-
if (instance instanceof WebAssembly.Instance) return {
|
|
335
|
-
instance,
|
|
336
|
-
module
|
|
337
|
-
};
|
|
338
|
-
else return instance;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
function __wbg_get_imports() {
|
|
342
|
-
const imports = {};
|
|
343
|
-
imports.wbg = {};
|
|
344
|
-
imports.wbg.__wbg_new_with_owned_u8_clamped_array_and_sh_e8143e95833a3ec3 = function(arg0, arg1, arg2, arg3) {
|
|
345
|
-
var v0 = getClampedArrayU8FromWasm0(arg0, arg1).slice();
|
|
346
|
-
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
347
|
-
return new ImageData(v0, arg2 >>> 0, arg3 >>> 0);
|
|
348
|
-
};
|
|
349
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
350
|
-
const table = wasm.__wbindgen_externrefs;
|
|
351
|
-
const offset = table.grow(4);
|
|
352
|
-
table.set(0, void 0);
|
|
353
|
-
table.set(offset + 0, void 0);
|
|
354
|
-
table.set(offset + 1, null);
|
|
355
|
-
table.set(offset + 2, true);
|
|
356
|
-
table.set(offset + 3, false);
|
|
357
|
-
};
|
|
358
|
-
return imports;
|
|
359
|
-
}
|
|
360
|
-
function __wbg_finalize_init(instance, module) {
|
|
361
|
-
wasm = instance.exports;
|
|
362
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
363
|
-
cachedUint8ArrayMemory0 = null;
|
|
364
|
-
cachedUint8ClampedArrayMemory0 = null;
|
|
365
|
-
wasm.__wbindgen_start();
|
|
366
|
-
return wasm;
|
|
367
|
-
}
|
|
368
|
-
async function __wbg_init(module_or_path) {
|
|
369
|
-
if (wasm !== void 0) return wasm;
|
|
370
|
-
if (typeof module_or_path !== "undefined") if (Object.getPrototypeOf(module_or_path) === Object.prototype) ({module_or_path} = module_or_path);
|
|
371
|
-
else console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
372
|
-
if (typeof module_or_path === "undefined") module_or_path = new URL("jsquash_magic_kernel_bg.wasm", import.meta.url);
|
|
373
|
-
const imports = __wbg_get_imports();
|
|
374
|
-
if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) module_or_path = fetch(module_or_path);
|
|
375
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
376
|
-
return __wbg_finalize_init(instance, module);
|
|
377
|
-
}
|
|
378
|
-
const isRunningInCloudFlareWorkers = globalThis.ServiceWorkerGlobalScope !== void 0 && typeof self !== "undefined" && globalThis.caches && globalThis.caches.default !== void 0;
|
|
379
|
-
const isRunningInNode = typeof process === "object" && process.release && process.release.name === "node";
|
|
380
|
-
if (isRunningInCloudFlareWorkers || isRunningInNode) {
|
|
381
|
-
if (!globalThis.ImageData) globalThis.ImageData = class ImageData {
|
|
382
|
-
constructor(data, width, height) {
|
|
383
|
-
this.data = data;
|
|
384
|
-
this.width = width;
|
|
385
|
-
this.height = height;
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
if (import.meta.url === void 0) import.meta.url = "https://localhost";
|
|
389
|
-
if (typeof self !== "undefined" && self.location === void 0) self.location = { href: "" };
|
|
390
|
-
}
|
|
391
|
-
//#endregion
|
|
392
|
-
//#region ../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/meta.js
|
|
393
|
-
const defaultOptions = {
|
|
394
|
-
width: 1,
|
|
395
|
-
height: 1,
|
|
396
|
-
method: "lanczos3",
|
|
397
|
-
fitMethod: "stretch",
|
|
398
|
-
premultiply: true,
|
|
399
|
-
linearRGB: true
|
|
400
|
-
};
|
|
401
|
-
//#endregion
|
|
402
|
-
//#region ../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/index.js
|
|
403
|
-
const MAGIC_KERNEL_METHODS = [
|
|
404
|
-
"magicKernel",
|
|
405
|
-
"magicKernelSharp2013",
|
|
406
|
-
"magicKernelSharp2021"
|
|
407
|
-
];
|
|
408
|
-
let resizeWasmReady;
|
|
409
|
-
let hqxWasmReady;
|
|
410
|
-
let magicKernelWasmReady;
|
|
411
|
-
function initResize(moduleOrPath) {
|
|
412
|
-
if (!resizeWasmReady) resizeWasmReady = __wbg_init$2(moduleOrPath);
|
|
413
|
-
return resizeWasmReady;
|
|
414
|
-
}
|
|
415
|
-
function initHqx(moduleOrPath) {
|
|
416
|
-
if (!hqxWasmReady) hqxWasmReady = __wbg_init$1(moduleOrPath);
|
|
417
|
-
return hqxWasmReady;
|
|
418
|
-
}
|
|
419
|
-
function initMagicKernel(moduleOrPath) {
|
|
420
|
-
if (!magicKernelWasmReady) magicKernelWasmReady = __wbg_init(moduleOrPath);
|
|
421
|
-
return magicKernelWasmReady;
|
|
422
|
-
}
|
|
423
|
-
function optsIsHqxOpts(opts) {
|
|
424
|
-
return opts.method === "hqx";
|
|
425
|
-
}
|
|
426
|
-
function optsIsMagicKernelOpts(opts) {
|
|
427
|
-
return MAGIC_KERNEL_METHODS.includes(opts.method);
|
|
428
|
-
}
|
|
429
|
-
function crop(data, sx, sy, sw, sh) {
|
|
430
|
-
const inputPixels = new Uint32Array(data.data.buffer);
|
|
431
|
-
for (let y = 0; y < sh; y += 1) {
|
|
432
|
-
const start = (y + sy) * data.width + sx;
|
|
433
|
-
inputPixels.copyWithin(y * sw, start, start + sw);
|
|
434
|
-
}
|
|
435
|
-
return new ImageData(new Uint8ClampedArray(inputPixels.buffer.slice(0, sw * sh * 4)), sw, sh);
|
|
436
|
-
}
|
|
437
|
-
function clamp(num, { min = Number.MIN_VALUE, max = Number.MAX_VALUE }) {
|
|
438
|
-
return Math.min(Math.max(num, min), max);
|
|
439
|
-
}
|
|
440
|
-
/** Resize methods by index */
|
|
441
|
-
const resizeMethods = [
|
|
442
|
-
"triangle",
|
|
443
|
-
"catrom",
|
|
444
|
-
"mitchell",
|
|
445
|
-
"lanczos3"
|
|
446
|
-
];
|
|
447
|
-
async function hqx(input, opts) {
|
|
448
|
-
await initHqx();
|
|
449
|
-
const widthRatio = opts.width / input.width;
|
|
450
|
-
const heightRatio = opts.height / input.height;
|
|
451
|
-
const factor = clamp(Math.ceil(Math.max(widthRatio, heightRatio)), {
|
|
452
|
-
min: 1,
|
|
453
|
-
max: 4
|
|
454
|
-
});
|
|
455
|
-
if (factor === 1) return input;
|
|
456
|
-
const result = resize$2(new Uint32Array(input.data.buffer), input.width, input.height, factor);
|
|
457
|
-
return new ImageData(new Uint8ClampedArray(result.buffer), input.width * factor, input.height * factor);
|
|
458
|
-
}
|
|
459
|
-
async function magicKernel(input, opts) {
|
|
460
|
-
await initMagicKernel();
|
|
461
|
-
return resize$1(new Uint8Array(input.data.buffer), input.width, input.height, opts.width, opts.height, opts.method);
|
|
462
|
-
}
|
|
463
|
-
async function resize(data, overrideOptions) {
|
|
464
|
-
let options = {
|
|
465
|
-
...defaultOptions,
|
|
466
|
-
...overrideOptions
|
|
467
|
-
};
|
|
468
|
-
let input = data;
|
|
469
|
-
initResize();
|
|
470
|
-
if (optsIsHqxOpts(options)) {
|
|
471
|
-
input = await hqx(input, options);
|
|
472
|
-
options = {
|
|
473
|
-
...options,
|
|
474
|
-
method: "catrom"
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
await resizeWasmReady;
|
|
478
|
-
if (options.fitMethod === "contain") {
|
|
479
|
-
const { sx, sy, sw, sh } = getContainOffsets(data.width, data.height, options.width, options.height);
|
|
480
|
-
input = crop(input, Math.round(sx), Math.round(sy), Math.round(sw), Math.round(sh));
|
|
481
|
-
}
|
|
482
|
-
if (optsIsMagicKernelOpts(options)) return magicKernel(input, options);
|
|
483
|
-
const result = resize$3(new Uint8Array(input.data.buffer), input.width, input.height, options.width, options.height, resizeMethods.indexOf(options.method), options.premultiply, options.linearRGB);
|
|
484
|
-
return new ImageData(new Uint8ClampedArray(result.buffer), options.width, options.height);
|
|
485
|
-
}
|
|
486
|
-
//#endregion
|
|
487
|
-
export { resize as default, initResize };
|
|
488
|
-
|
|
489
|
-
//# sourceMappingURL=resize-B47sgoOb.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resize-B47sgoOb.mjs","names":["wasm","WASM_VECTOR_LEN","passArray8ToWasm0","cachedInt32Memory0","getInt32Memory0","getClampedArrayU8FromWasm0","resize","__wbg_load","__wbg_get_imports","__wbg_finalize_init","__wbg_init","isRunningInCloudFlareWorkers","isRunningInNode","wasm","WASM_VECTOR_LEN","resize","__wbg_load","__wbg_get_imports","__wbg_finalize_init","__wbg_init","isRunningInCloudFlareWorkers","isRunningInNode","resize","initResizeWasm","initHqxWasm","initMagicKernelWasm","wasmHqx","wasmMagicKernel","wasmResize"],"sources":["../../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/util.js","../../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/lib/resize/pkg/squoosh_resize.js","../../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/lib/hqx/pkg/squooshhqx.js","../../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/lib/magic-kernel/pkg/jsquash_magic_kernel.js","../../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/meta.js","../../../node_modules/.pnpm/@jsquash+resize@2.1.1/node_modules/@jsquash/resize/index.js"],"sourcesContent":["/**\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 */\nexport function getContainOffsets(sw, sh, dw, dh) {\n const currentAspect = sw / sh;\n const endAspect = dw / dh;\n if (endAspect > currentAspect) {\n const newSh = sw / endAspect;\n const newSy = (sh - newSh) / 2;\n return { sw, sh: newSh, sx: 0, sy: newSy };\n }\n const newSw = sh * endAspect;\n const newSx = (sw - newSw) / 2;\n return { sh, sw: newSw, sx: newSx, sy: 0 };\n}\n","let wasm;\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\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\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/**\n* @param {Uint8Array} input_image\n* @param {number} input_width\n* @param {number} input_height\n* @param {number} output_width\n* @param {number} output_height\n* @param {number} typ_idx\n* @param {boolean} premultiply\n* @param {boolean} color_space_conversion\n* @returns {Uint8ClampedArray}\n*/\nexport function resize(input_image, input_width, input_height, output_width, output_height, typ_idx, premultiply, color_space_conversion) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray8ToWasm0(input_image, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.resize(retptr, ptr0, len0, input_width, input_height, output_width, output_height, typ_idx, premultiply, color_space_conversion);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var v2 = getClampedArrayU8FromWasm0(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\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\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_resize_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","let wasm;\n\nlet cachedUint32Memory0 = null;\n\nfunction getUint32Memory0() {\n if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {\n cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);\n }\n return cachedUint32Memory0;\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction passArray32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getUint32Memory0().set(arg, ptr / 4);\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 getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32Memory0().subarray(ptr / 4, ptr / 4 + len);\n}\n/**\n* @param {Uint32Array} input_image\n* @param {number} input_width\n* @param {number} input_height\n* @param {number} factor\n* @returns {Uint32Array}\n*/\nexport function resize(input_image, input_width, input_height, factor) {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n const ptr0 = passArray32ToWasm0(input_image, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n wasm.resize(retptr, ptr0, len0, input_width, input_height, factor);\n var r0 = getInt32Memory0()[retptr / 4 + 0];\n var r1 = getInt32Memory0()[retptr / 4 + 1];\n var v2 = getArrayU32FromWasm0(r0, r1).slice();\n wasm.__wbindgen_free(r0, r1 * 4, 4);\n return v2;\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\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\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 cachedUint32Memory0 = 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('squooshhqx_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","let wasm;\n\nfunction getClampedArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nlet cachedUint8ClampedArrayMemory0 = null;\nfunction getUint8ClampedArrayMemory0() {\n if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) {\n cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer);\n }\n return cachedUint8ClampedArrayMemory0;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8ArrayMemory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = cachedTextEncoder.encodeInto(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nconst cachedTextEncoder = new TextEncoder();\n\nif (!('encodeInto' in cachedTextEncoder)) {\n cachedTextEncoder.encodeInto = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\n/**\n * @param {Uint8Array} data\n * @param {number} input_width\n * @param {number} input_height\n * @param {number} output_width\n * @param {number} output_height\n * @param {string} version\n * @returns {ImageData}\n */\nexport function resize(data, input_width, input_height, output_width, output_height, version) {\n const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passStringToWasm0(version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.resize(ptr0, len0, input_width, input_height, output_width, output_height, ptr1, len1);\n return ret;\n}\n\nconst EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);\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 } catch (e) {\n const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);\n\n if (validResponse && 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 } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbg_new_with_owned_u8_clamped_array_and_sh_e8143e95833a3ec3 = 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 ret;\n };\n imports.wbg.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_externrefs;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n };\n\n return imports;\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedUint8ArrayMemory0 = null;\n cachedUint8ClampedArrayMemory0 = null;\n\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('jsquash_magic_kernel_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n const { instance, module } = await __wbg_load(await module_or_path, 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 */\nexport const workerResizeMethods = [\n 'triangle',\n 'catrom',\n 'mitchell',\n 'lanczos3',\n 'hqx',\n 'magicKernel',\n 'magicKernelSharp2013',\n 'magicKernelSharp2021',\n];\nexport const defaultOptions = {\n // Width and height will always default to the image size.\n // This is set elsewhere.\n width: 1,\n height: 1,\n // This will be set to 'vector' if the input is SVG.\n method: 'lanczos3',\n fitMethod: 'stretch',\n premultiply: true,\n linearRGB: true,\n};\n","import { getContainOffsets } from './util.js';\nimport initResizeWasm, { resize as wasmResize, } from './lib/resize/pkg/squoosh_resize.js';\nimport initHqxWasm, { resize as wasmHqx } from './lib/hqx/pkg/squooshhqx.js';\nimport initMagicKernelWasm, { resize as wasmMagicKernel, } from './lib/magic-kernel/pkg/jsquash_magic_kernel.js';\nimport { defaultOptions } from './meta.js';\nconst MAGIC_KERNEL_METHODS = [\n 'magicKernel',\n 'magicKernelSharp2013',\n 'magicKernelSharp2021',\n];\nlet resizeWasmReady;\nlet hqxWasmReady;\nlet magicKernelWasmReady;\nexport function initResize(moduleOrPath) {\n if (!resizeWasmReady) {\n resizeWasmReady = initResizeWasm(moduleOrPath);\n }\n return resizeWasmReady;\n}\nexport function initHqx(moduleOrPath) {\n if (!hqxWasmReady) {\n hqxWasmReady = initHqxWasm(moduleOrPath);\n }\n return hqxWasmReady;\n}\nexport function initMagicKernel(moduleOrPath) {\n if (!magicKernelWasmReady) {\n magicKernelWasmReady = initMagicKernelWasm(moduleOrPath);\n }\n return magicKernelWasmReady;\n}\nfunction optsIsHqxOpts(opts) {\n return opts.method === 'hqx';\n}\nfunction optsIsMagicKernelOpts(opts) {\n return MAGIC_KERNEL_METHODS.includes(opts.method);\n}\nfunction crop(data, sx, sy, sw, sh) {\n const inputPixels = new Uint32Array(data.data.buffer);\n // Copy within the same buffer for speed and memory efficiency.\n for (let y = 0; y < sh; y += 1) {\n const start = (y + sy) * data.width + sx;\n inputPixels.copyWithin(y * sw, start, start + sw);\n }\n return new ImageData(new Uint8ClampedArray(inputPixels.buffer.slice(0, sw * sh * 4)), sw, sh);\n}\nfunction clamp(num, { min = Number.MIN_VALUE, max = Number.MAX_VALUE }) {\n return Math.min(Math.max(num, min), max);\n}\n/** Resize methods by index */\nconst resizeMethods = [\n 'triangle',\n 'catrom',\n 'mitchell',\n 'lanczos3',\n];\nasync function hqx(input, opts) {\n await initHqx();\n const widthRatio = opts.width / input.width;\n const heightRatio = opts.height / input.height;\n const ratio = Math.max(widthRatio, heightRatio);\n const factor = clamp(Math.ceil(ratio), { min: 1, max: 4 });\n if (factor === 1)\n return input;\n const result = wasmHqx(new Uint32Array(input.data.buffer), input.width, input.height, factor);\n return new ImageData(new Uint8ClampedArray(result.buffer), input.width * factor, input.height * factor);\n}\nasync function magicKernel(input, opts) {\n await initMagicKernel();\n const result = wasmMagicKernel(new Uint8Array(input.data.buffer), input.width, input.height, opts.width, opts.height, opts.method);\n return result;\n}\nexport default async function resize(data, overrideOptions) {\n let options = {\n ...defaultOptions,\n ...overrideOptions,\n };\n let input = data;\n initResize();\n if (optsIsHqxOpts(options)) {\n input = await hqx(input, options);\n // Regular resize to make up the difference\n options = { ...options, method: 'catrom' };\n }\n await resizeWasmReady;\n if (options.fitMethod === 'contain') {\n const { sx, sy, sw, sh } = getContainOffsets(data.width, data.height, options.width, options.height);\n input = crop(input, Math.round(sx), Math.round(sy), Math.round(sw), Math.round(sh));\n }\n if (optsIsMagicKernelOpts(options)) {\n return magicKernel(input, options);\n }\n const result = wasmResize(new Uint8Array(input.data.buffer), input.width, input.height, options.width, options.height, resizeMethods.indexOf(options.method), options.premultiply, options.linearRGB);\n return new ImageData(new Uint8ClampedArray(result.buffer), options.width, options.height);\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":";;;;;;;;;;;;;AAYA,SAAgB,kBAAkB,IAAI,IAAI,IAAI,IAAI;CAC9C,MAAM,gBAAgB,KAAK;CAC3B,MAAM,YAAY,KAAK;CACvB,IAAI,YAAY,eAAe;EAC3B,MAAM,QAAQ,KAAK;EAEnB,OAAO;GAAE;GAAI,IAAI;GAAO,IAAI;GAAG,KADhB,KAAK,SAAS;EACY;CAC7C;CACA,MAAM,QAAQ,KAAK;CAEnB,OAAO;EAAE;EAAI,IAAI;EAAO,KADT,KAAK,SAAS;EACM,IAAI;CAAE;AAC7C;;;ACvBA,IAAIA;AAEJ,IAAI,qBAAqB;AAEzB,SAAS,kBAAkB;CACvB,IAAI,uBAAuB,QAAQ,mBAAmB,eAAe,GACjE,qBAAqB,IAAI,WAAWA,OAAK,OAAO,MAAM;CAE1D,OAAO;AACX;AAEA,IAAIC,oBAAkB;AAEtB,SAASC,oBAAkB,KAAK,QAAQ;CACpC,MAAM,MAAM,OAAO,IAAI,SAAS,GAAG,CAAC,MAAM;CAC1C,gBAAgB,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC;CAClC,oBAAkB,IAAI;CACtB,OAAO;AACX;AAEA,IAAIC,uBAAqB;AAEzB,SAASC,oBAAkB;CACvB,IAAID,yBAAuB,QAAQA,qBAAmB,eAAe,GACjE,uBAAqB,IAAI,WAAWH,OAAK,OAAO,MAAM;CAE1D,OAAOG;AACX;AAEA,IAAI,4BAA4B;AAEhC,SAAS,yBAAyB;CAC9B,IAAI,8BAA8B,QAAQ,0BAA0B,eAAe,GAC/E,4B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