Initial boiler plate project
This commit is contained in:
32
node_modules/next/dist/server/lib/squoosh/avif/avif_enc.d.ts
generated
vendored
Normal file
32
node_modules/next/dist/server/lib/squoosh/avif/avif_enc.d.ts
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
// eslint-disable-next-line no-shadow
|
||||
export const enum AVIFTune {
|
||||
auto,
|
||||
psnr,
|
||||
ssim,
|
||||
}
|
||||
|
||||
export interface EncodeOptions {
|
||||
cqLevel: number
|
||||
denoiseLevel: number
|
||||
cqAlphaLevel: number
|
||||
tileRowsLog2: number
|
||||
tileColsLog2: number
|
||||
speed: number
|
||||
subsample: number
|
||||
chromaDeltaQ: boolean
|
||||
sharpness: number
|
||||
tune: AVIFTune
|
||||
}
|
||||
|
||||
export interface AVIFModule extends EmscriptenWasm.Module {
|
||||
encode(
|
||||
data: BufferSource,
|
||||
width: number,
|
||||
height: number,
|
||||
options: EncodeOptions
|
||||
): Uint8Array
|
||||
}
|
||||
|
||||
declare var moduleFactory: EmscriptenWasm.ModuleFactory<AVIFModule>
|
||||
|
||||
export default moduleFactory
|
||||
1532
node_modules/next/dist/server/lib/squoosh/avif/avif_node_dec.js
generated
vendored
Normal file
1532
node_modules/next/dist/server/lib/squoosh/avif/avif_node_dec.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/next/dist/server/lib/squoosh/avif/avif_node_dec.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/avif/avif_node_dec.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
node_modules/next/dist/server/lib/squoosh/avif/avif_node_dec.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/avif/avif_node_dec.wasm
generated
vendored
Normal file
Binary file not shown.
1721
node_modules/next/dist/server/lib/squoosh/avif/avif_node_enc.js
generated
vendored
Normal file
1721
node_modules/next/dist/server/lib/squoosh/avif/avif_node_enc.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/next/dist/server/lib/squoosh/avif/avif_node_enc.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/avif/avif_node_enc.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
node_modules/next/dist/server/lib/squoosh/avif/avif_node_enc.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/avif/avif_node_enc.wasm
generated
vendored
Normal file
Binary file not shown.
158
node_modules/next/dist/server/lib/squoosh/codecs.d.ts
generated
vendored
Normal file
158
node_modules/next/dist/server/lib/squoosh/codecs.d.ts
generated
vendored
Normal file
@ -0,0 +1,158 @@
|
||||
/// <reference types="node" />
|
||||
interface DecodeModule extends EmscriptenWasm.Module {
|
||||
decode: (data: Uint8Array) => ImageData;
|
||||
}
|
||||
export interface ResizeOptions {
|
||||
width?: number;
|
||||
height?: number;
|
||||
method: 'triangle' | 'catrom' | 'mitchell' | 'lanczos3';
|
||||
premultiply: boolean;
|
||||
linearRGB: boolean;
|
||||
}
|
||||
export interface RotateOptions {
|
||||
numRotations: number;
|
||||
}
|
||||
import type { MozJPEGModule as MozJPEGEncodeModule } from './mozjpeg/mozjpeg_enc';
|
||||
import type { WebPModule as WebPEncodeModule } from './webp/webp_enc';
|
||||
import type { AVIFModule as AVIFEncodeModule } from './avif/avif_enc';
|
||||
import ImageData from './image_data';
|
||||
export declare const preprocessors: {
|
||||
readonly resize: {
|
||||
readonly name: "Resize";
|
||||
readonly description: "Resize the image before compressing";
|
||||
readonly instantiate: () => Promise<(buffer: Uint8Array, input_width: number, input_height: number, { width, height, method, premultiply, linearRGB }: ResizeOptions) => ImageData>;
|
||||
readonly defaultOptions: {
|
||||
readonly method: "lanczos3";
|
||||
readonly fitMethod: "stretch";
|
||||
readonly premultiply: true;
|
||||
readonly linearRGB: true;
|
||||
};
|
||||
};
|
||||
readonly rotate: {
|
||||
readonly name: "Rotate";
|
||||
readonly description: "Rotate image";
|
||||
readonly instantiate: () => Promise<(buffer: Uint8Array, width: number, height: number, { numRotations }: RotateOptions) => Promise<ImageData>>;
|
||||
readonly defaultOptions: {
|
||||
readonly numRotations: 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
export declare const codecs: {
|
||||
readonly mozjpeg: {
|
||||
readonly name: "MozJPEG";
|
||||
readonly extension: "jpg";
|
||||
readonly detectors: readonly [RegExp];
|
||||
readonly dec: () => Promise<DecodeModule>;
|
||||
readonly enc: () => Promise<MozJPEGEncodeModule>;
|
||||
readonly defaultEncoderOptions: {
|
||||
readonly quality: 75;
|
||||
readonly baseline: false;
|
||||
readonly arithmetic: false;
|
||||
readonly progressive: true;
|
||||
readonly optimize_coding: true;
|
||||
readonly smoothing: 0;
|
||||
readonly color_space: 3;
|
||||
readonly quant_table: 3;
|
||||
readonly trellis_multipass: false;
|
||||
readonly trellis_opt_zero: false;
|
||||
readonly trellis_opt_table: false;
|
||||
readonly trellis_loops: 1;
|
||||
readonly auto_subsample: true;
|
||||
readonly chroma_subsample: 2;
|
||||
readonly separate_chroma_quality: false;
|
||||
readonly chroma_quality: 75;
|
||||
};
|
||||
readonly autoOptimize: {
|
||||
readonly option: "quality";
|
||||
readonly min: 0;
|
||||
readonly max: 100;
|
||||
};
|
||||
};
|
||||
readonly webp: {
|
||||
readonly name: "WebP";
|
||||
readonly extension: "webp";
|
||||
readonly detectors: readonly [RegExp];
|
||||
readonly dec: () => Promise<DecodeModule>;
|
||||
readonly enc: () => Promise<WebPEncodeModule>;
|
||||
readonly defaultEncoderOptions: {
|
||||
readonly quality: 75;
|
||||
readonly target_size: 0;
|
||||
readonly target_PSNR: 0;
|
||||
readonly method: 4;
|
||||
readonly sns_strength: 50;
|
||||
readonly filter_strength: 60;
|
||||
readonly filter_sharpness: 0;
|
||||
readonly filter_type: 1;
|
||||
readonly partitions: 0;
|
||||
readonly segments: 4;
|
||||
readonly pass: 1;
|
||||
readonly show_compressed: 0;
|
||||
readonly preprocessing: 0;
|
||||
readonly autofilter: 0;
|
||||
readonly partition_limit: 0;
|
||||
readonly alpha_compression: 1;
|
||||
readonly alpha_filtering: 1;
|
||||
readonly alpha_quality: 100;
|
||||
readonly lossless: 0;
|
||||
readonly exact: 0;
|
||||
readonly image_hint: 0;
|
||||
readonly emulate_jpeg_size: 0;
|
||||
readonly thread_level: 0;
|
||||
readonly low_memory: 0;
|
||||
readonly near_lossless: 100;
|
||||
readonly use_delta_palette: 0;
|
||||
readonly use_sharp_yuv: 0;
|
||||
};
|
||||
readonly autoOptimize: {
|
||||
readonly option: "quality";
|
||||
readonly min: 0;
|
||||
readonly max: 100;
|
||||
};
|
||||
};
|
||||
readonly avif: {
|
||||
readonly name: "AVIF";
|
||||
readonly extension: "avif";
|
||||
readonly detectors: readonly [RegExp];
|
||||
readonly dec: () => Promise<DecodeModule>;
|
||||
readonly enc: () => Promise<AVIFEncodeModule>;
|
||||
readonly defaultEncoderOptions: {
|
||||
readonly cqLevel: 33;
|
||||
readonly cqAlphaLevel: -1;
|
||||
readonly denoiseLevel: 0;
|
||||
readonly tileColsLog2: 0;
|
||||
readonly tileRowsLog2: 0;
|
||||
readonly speed: 6;
|
||||
readonly subsample: 1;
|
||||
readonly chromaDeltaQ: false;
|
||||
readonly sharpness: 0;
|
||||
readonly tune: 0;
|
||||
};
|
||||
readonly autoOptimize: {
|
||||
readonly option: "cqLevel";
|
||||
readonly min: 62;
|
||||
readonly max: 0;
|
||||
};
|
||||
};
|
||||
readonly oxipng: {
|
||||
readonly name: "OxiPNG";
|
||||
readonly extension: "png";
|
||||
readonly detectors: readonly [RegExp];
|
||||
readonly dec: () => Promise<{
|
||||
decode: (buffer: Buffer | Uint8Array) => any;
|
||||
}>;
|
||||
readonly enc: () => Promise<{
|
||||
encode: (buffer: Uint8ClampedArray | ArrayBuffer, width: number, height: number, opts: {
|
||||
level: number;
|
||||
}) => any;
|
||||
}>;
|
||||
readonly defaultEncoderOptions: {
|
||||
readonly level: 2;
|
||||
};
|
||||
readonly autoOptimize: {
|
||||
readonly option: "level";
|
||||
readonly min: 6;
|
||||
readonly max: 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
export {};
|
||||
327
node_modules/next/dist/server/lib/squoosh/codecs.js
generated
vendored
Normal file
327
node_modules/next/dist/server/lib/squoosh/codecs.js
generated
vendored
Normal file
@ -0,0 +1,327 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
codecs: null,
|
||||
preprocessors: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
codecs: function() {
|
||||
return codecs;
|
||||
},
|
||||
preprocessors: function() {
|
||||
return preprocessors;
|
||||
}
|
||||
});
|
||||
const _fs = require("fs");
|
||||
const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
||||
const _emscriptenutils = require("./emscripten-utils.js");
|
||||
const _mozjpeg_node_enc = /*#__PURE__*/ _interop_require_default(require("./mozjpeg/mozjpeg_node_enc.js"));
|
||||
const _mozjpeg_node_dec = /*#__PURE__*/ _interop_require_default(require("./mozjpeg/mozjpeg_node_dec.js"));
|
||||
const _webp_node_enc = /*#__PURE__*/ _interop_require_default(require("./webp/webp_node_enc.js"));
|
||||
const _webp_node_dec = /*#__PURE__*/ _interop_require_default(require("./webp/webp_node_dec.js"));
|
||||
const _avif_node_enc = /*#__PURE__*/ _interop_require_default(require("./avif/avif_node_enc.js"));
|
||||
const _avif_node_dec = /*#__PURE__*/ _interop_require_default(require("./avif/avif_node_dec.js"));
|
||||
const _squoosh_png = /*#__PURE__*/ _interop_require_wildcard(require("./png/squoosh_png.js"));
|
||||
const _squoosh_oxipng = /*#__PURE__*/ _interop_require_wildcard(require("./png/squoosh_oxipng.js"));
|
||||
const _squoosh_resize = /*#__PURE__*/ _interop_require_wildcard(require("./resize/squoosh_resize.js"));
|
||||
const _image_data = /*#__PURE__*/ _interop_require_default(require("./image_data"));
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function _getRequireWildcardCache(nodeInterop) {
|
||||
if (typeof WeakMap !== "function") return null;
|
||||
var cacheBabelInterop = new WeakMap();
|
||||
var cacheNodeInterop = new WeakMap();
|
||||
return (_getRequireWildcardCache = function(nodeInterop) {
|
||||
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
||||
})(nodeInterop);
|
||||
}
|
||||
function _interop_require_wildcard(obj, nodeInterop) {
|
||||
if (!nodeInterop && obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
||||
return {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
var cache = _getRequireWildcardCache(nodeInterop);
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {
|
||||
__proto__: null
|
||||
};
|
||||
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for(var key in obj){
|
||||
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
const mozEncWasm = _path.resolve(__dirname, "./mozjpeg/mozjpeg_node_enc.wasm");
|
||||
const mozDecWasm = _path.resolve(__dirname, "./mozjpeg/mozjpeg_node_dec.wasm");
|
||||
const webpEncWasm = _path.resolve(__dirname, "./webp/webp_node_enc.wasm");
|
||||
const webpDecWasm = _path.resolve(__dirname, "./webp/webp_node_dec.wasm");
|
||||
const avifEncWasm = _path.resolve(__dirname, "./avif/avif_node_enc.wasm");
|
||||
const avifDecWasm = _path.resolve(__dirname, "./avif/avif_node_dec.wasm");
|
||||
const pngEncDecWasm = _path.resolve(__dirname, "./png/squoosh_png_bg.wasm");
|
||||
const pngEncDecInit = ()=>_squoosh_png.default(_fs.promises.readFile((0, _emscriptenutils.pathify)(pngEncDecWasm)));
|
||||
const oxipngWasm = _path.resolve(__dirname, "./png/squoosh_oxipng_bg.wasm");
|
||||
const oxipngInit = ()=>_squoosh_oxipng.default(_fs.promises.readFile((0, _emscriptenutils.pathify)(oxipngWasm)));
|
||||
const resizeWasm = _path.resolve(__dirname, "./resize/squoosh_resize_bg.wasm");
|
||||
const resizeInit = ()=>_squoosh_resize.default(_fs.promises.readFile((0, _emscriptenutils.pathify)(resizeWasm)));
|
||||
// rotate
|
||||
const rotateWasm = _path.resolve(__dirname, "./rotate/rotate.wasm");
|
||||
globalThis.ImageData = _image_data.default;
|
||||
function resizeNameToIndex(name) {
|
||||
switch(name){
|
||||
case "triangle":
|
||||
return 0;
|
||||
case "catrom":
|
||||
return 1;
|
||||
case "mitchell":
|
||||
return 2;
|
||||
case "lanczos3":
|
||||
return 3;
|
||||
default:
|
||||
throw Error(`Unknown resize algorithm "${name}"`);
|
||||
}
|
||||
}
|
||||
function resizeWithAspect({ input_width, input_height, target_width, target_height }) {
|
||||
if (!target_width && !target_height) {
|
||||
throw Error("Need to specify at least width or height when resizing");
|
||||
}
|
||||
if (target_width && target_height) {
|
||||
return {
|
||||
width: target_width,
|
||||
height: target_height
|
||||
};
|
||||
}
|
||||
if (!target_width) {
|
||||
return {
|
||||
width: Math.round(input_width / input_height * target_height),
|
||||
height: target_height
|
||||
};
|
||||
}
|
||||
return {
|
||||
width: target_width,
|
||||
height: Math.round(input_height / input_width * target_width)
|
||||
};
|
||||
}
|
||||
const preprocessors = {
|
||||
resize: {
|
||||
name: "Resize",
|
||||
description: "Resize the image before compressing",
|
||||
instantiate: async ()=>{
|
||||
await resizeInit();
|
||||
return (buffer, input_width, input_height, { width, height, method, premultiply, linearRGB })=>{
|
||||
({ width, height } = resizeWithAspect({
|
||||
input_width,
|
||||
input_height,
|
||||
target_width: width,
|
||||
target_height: height
|
||||
}));
|
||||
const imageData = new _image_data.default(_squoosh_resize.resize(buffer, input_width, input_height, width, height, resizeNameToIndex(method), premultiply, linearRGB), width, height);
|
||||
_squoosh_resize.cleanup();
|
||||
return imageData;
|
||||
};
|
||||
},
|
||||
defaultOptions: {
|
||||
method: "lanczos3",
|
||||
fitMethod: "stretch",
|
||||
premultiply: true,
|
||||
linearRGB: true
|
||||
}
|
||||
},
|
||||
rotate: {
|
||||
name: "Rotate",
|
||||
description: "Rotate image",
|
||||
instantiate: async ()=>{
|
||||
return async (buffer, width, height, { numRotations })=>{
|
||||
const degrees = numRotations * 90 % 360;
|
||||
const sameDimensions = degrees === 0 || degrees === 180;
|
||||
const size = width * height * 4;
|
||||
const instance = (await WebAssembly.instantiate(await _fs.promises.readFile((0, _emscriptenutils.pathify)(rotateWasm)))).instance;
|
||||
const { memory } = instance.exports;
|
||||
const additionalPagesNeeded = Math.ceil((size * 2 - memory.buffer.byteLength + 8) / (64 * 1024));
|
||||
if (additionalPagesNeeded > 0) {
|
||||
memory.grow(additionalPagesNeeded);
|
||||
}
|
||||
const view = new Uint8ClampedArray(memory.buffer);
|
||||
view.set(buffer, 8);
|
||||
instance.exports.rotate(width, height, degrees);
|
||||
return new _image_data.default(view.slice(size + 8, size * 2 + 8), sameDimensions ? width : height, sameDimensions ? height : width);
|
||||
};
|
||||
},
|
||||
defaultOptions: {
|
||||
numRotations: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
const codecs = {
|
||||
mozjpeg: {
|
||||
name: "MozJPEG",
|
||||
extension: "jpg",
|
||||
detectors: [
|
||||
/^\xFF\xD8\xFF/
|
||||
],
|
||||
dec: ()=>(0, _emscriptenutils.instantiateEmscriptenWasm)(_mozjpeg_node_dec.default, mozDecWasm),
|
||||
enc: ()=>(0, _emscriptenutils.instantiateEmscriptenWasm)(_mozjpeg_node_enc.default, mozEncWasm),
|
||||
defaultEncoderOptions: {
|
||||
quality: 75,
|
||||
baseline: false,
|
||||
arithmetic: false,
|
||||
progressive: true,
|
||||
optimize_coding: true,
|
||||
smoothing: 0,
|
||||
color_space: 3 /*YCbCr*/ ,
|
||||
quant_table: 3,
|
||||
trellis_multipass: false,
|
||||
trellis_opt_zero: false,
|
||||
trellis_opt_table: false,
|
||||
trellis_loops: 1,
|
||||
auto_subsample: true,
|
||||
chroma_subsample: 2,
|
||||
separate_chroma_quality: false,
|
||||
chroma_quality: 75
|
||||
},
|
||||
autoOptimize: {
|
||||
option: "quality",
|
||||
min: 0,
|
||||
max: 100
|
||||
}
|
||||
},
|
||||
webp: {
|
||||
name: "WebP",
|
||||
extension: "webp",
|
||||
detectors: [
|
||||
/^RIFF....WEBPVP8[LX ]/s
|
||||
],
|
||||
dec: ()=>(0, _emscriptenutils.instantiateEmscriptenWasm)(_webp_node_dec.default, webpDecWasm),
|
||||
enc: ()=>(0, _emscriptenutils.instantiateEmscriptenWasm)(_webp_node_enc.default, webpEncWasm),
|
||||
defaultEncoderOptions: {
|
||||
quality: 75,
|
||||
target_size: 0,
|
||||
target_PSNR: 0,
|
||||
method: 4,
|
||||
sns_strength: 50,
|
||||
filter_strength: 60,
|
||||
filter_sharpness: 0,
|
||||
filter_type: 1,
|
||||
partitions: 0,
|
||||
segments: 4,
|
||||
pass: 1,
|
||||
show_compressed: 0,
|
||||
preprocessing: 0,
|
||||
autofilter: 0,
|
||||
partition_limit: 0,
|
||||
alpha_compression: 1,
|
||||
alpha_filtering: 1,
|
||||
alpha_quality: 100,
|
||||
lossless: 0,
|
||||
exact: 0,
|
||||
image_hint: 0,
|
||||
emulate_jpeg_size: 0,
|
||||
thread_level: 0,
|
||||
low_memory: 0,
|
||||
near_lossless: 100,
|
||||
use_delta_palette: 0,
|
||||
use_sharp_yuv: 0
|
||||
},
|
||||
autoOptimize: {
|
||||
option: "quality",
|
||||
min: 0,
|
||||
max: 100
|
||||
}
|
||||
},
|
||||
avif: {
|
||||
name: "AVIF",
|
||||
extension: "avif",
|
||||
// eslint-disable-next-line no-control-regex
|
||||
detectors: [
|
||||
/^\x00\x00\x00 ftypavif\x00\x00\x00\x00/
|
||||
],
|
||||
dec: ()=>(0, _emscriptenutils.instantiateEmscriptenWasm)(_avif_node_dec.default, avifDecWasm),
|
||||
enc: async ()=>{
|
||||
return (0, _emscriptenutils.instantiateEmscriptenWasm)(_avif_node_enc.default, avifEncWasm);
|
||||
},
|
||||
defaultEncoderOptions: {
|
||||
cqLevel: 33,
|
||||
cqAlphaLevel: -1,
|
||||
denoiseLevel: 0,
|
||||
tileColsLog2: 0,
|
||||
tileRowsLog2: 0,
|
||||
speed: 6,
|
||||
subsample: 1,
|
||||
chromaDeltaQ: false,
|
||||
sharpness: 0,
|
||||
tune: 0 /* AVIFTune.auto */
|
||||
},
|
||||
autoOptimize: {
|
||||
option: "cqLevel",
|
||||
min: 62,
|
||||
max: 0
|
||||
}
|
||||
},
|
||||
oxipng: {
|
||||
name: "OxiPNG",
|
||||
extension: "png",
|
||||
// eslint-disable-next-line no-control-regex
|
||||
detectors: [
|
||||
/^\x89PNG\x0D\x0A\x1A\x0A/
|
||||
],
|
||||
dec: async ()=>{
|
||||
await pngEncDecInit();
|
||||
return {
|
||||
decode: (buffer)=>{
|
||||
const imageData = _squoosh_png.decode(buffer);
|
||||
_squoosh_png.cleanup();
|
||||
return imageData;
|
||||
}
|
||||
};
|
||||
},
|
||||
enc: async ()=>{
|
||||
await pngEncDecInit();
|
||||
await oxipngInit();
|
||||
return {
|
||||
encode: (buffer, width, height, opts)=>{
|
||||
const simplePng = _squoosh_png.encode(new Uint8Array(buffer), width, height);
|
||||
const imageData = _squoosh_oxipng.optimise(simplePng, opts.level, false);
|
||||
_squoosh_oxipng.cleanup();
|
||||
return imageData;
|
||||
}
|
||||
};
|
||||
},
|
||||
defaultEncoderOptions: {
|
||||
level: 2
|
||||
},
|
||||
autoOptimize: {
|
||||
option: "level",
|
||||
min: 6,
|
||||
max: 1
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=codecs.js.map
|
||||
1
node_modules/next/dist/server/lib/squoosh/codecs.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/codecs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
121
node_modules/next/dist/server/lib/squoosh/emscripten-types.d.ts
generated
vendored
Normal file
121
node_modules/next/dist/server/lib/squoosh/emscripten-types.d.ts
generated
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
// These types roughly model the object that the JS files generated by Emscripten define. Copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/emscripten/index.d.ts and turned into a type definition rather than a global to support our way of using Emscripten.
|
||||
declare namespace EmscriptenWasm {
|
||||
type ModuleFactory<T extends Module = Module> = (
|
||||
moduleOverrides?: ModuleOpts
|
||||
) => Promise<T>
|
||||
|
||||
type EnvironmentType = 'WEB' | 'NODE' | 'SHELL' | 'WORKER'
|
||||
|
||||
// Options object for modularized Emscripten files. Shoe-horned by @surma.
|
||||
// FIXME: This an incomplete definition!
|
||||
interface ModuleOpts {
|
||||
mainScriptUrlOrBlob?: string
|
||||
noInitialRun?: boolean
|
||||
locateFile?: (url: string) => string
|
||||
onRuntimeInitialized?: () => void
|
||||
}
|
||||
|
||||
interface Module {
|
||||
print(str: string): void
|
||||
printErr(str: string): void
|
||||
arguments: string[]
|
||||
environment: EnvironmentType
|
||||
preInit: { (): void }[]
|
||||
preRun: { (): void }[]
|
||||
postRun: { (): void }[]
|
||||
preinitializedWebGLContext: WebGLRenderingContext
|
||||
noInitialRun: boolean
|
||||
noExitRuntime: boolean
|
||||
logReadFiles: boolean
|
||||
filePackagePrefixURL: string
|
||||
wasmBinary: ArrayBuffer
|
||||
|
||||
destroy(object: object): void
|
||||
getPreloadedPackage(
|
||||
remotePackageName: string,
|
||||
remotePackageSize: number
|
||||
): ArrayBuffer
|
||||
instantiateWasm(
|
||||
imports: WebAssembly.Imports,
|
||||
successCallback: (module: WebAssembly.Module) => void
|
||||
): WebAssembly.Exports
|
||||
locateFile(url: string): string
|
||||
onCustomMessage(event: MessageEvent): void
|
||||
|
||||
Runtime: any
|
||||
|
||||
ccall(
|
||||
ident: string,
|
||||
returnType: string | null,
|
||||
argTypes: string[],
|
||||
args: any[]
|
||||
): any
|
||||
cwrap(ident: string, returnType: string | null, argTypes: string[]): any
|
||||
|
||||
setValue(ptr: number, value: any, type: string, noSafe?: boolean): void
|
||||
getValue(ptr: number, type: string, noSafe?: boolean): number
|
||||
|
||||
ALLOC_NORMAL: number
|
||||
ALLOC_STACK: number
|
||||
ALLOC_STATIC: number
|
||||
ALLOC_DYNAMIC: number
|
||||
ALLOC_NONE: number
|
||||
|
||||
allocate(slab: any, types: string, allocator: number, ptr: number): number
|
||||
allocate(slab: any, types: string[], allocator: number, ptr: number): number
|
||||
|
||||
Pointer_stringify(ptr: number, length?: number): string
|
||||
UTF16ToString(ptr: number): string
|
||||
stringToUTF16(str: string, outPtr: number): void
|
||||
UTF32ToString(ptr: number): string
|
||||
stringToUTF32(str: string, outPtr: number): void
|
||||
|
||||
// USE_TYPED_ARRAYS == 1
|
||||
HEAP: Int32Array
|
||||
IHEAP: Int32Array
|
||||
FHEAP: Float64Array
|
||||
|
||||
// USE_TYPED_ARRAYS == 2
|
||||
HEAP8: Int8Array
|
||||
HEAP16: Int16Array
|
||||
HEAP32: Int32Array
|
||||
HEAPU8: Uint8Array
|
||||
HEAPU16: Uint16Array
|
||||
HEAPU32: Uint32Array
|
||||
HEAPF32: Float32Array
|
||||
HEAPF64: Float64Array
|
||||
|
||||
TOTAL_STACK: number
|
||||
TOTAL_MEMORY: number
|
||||
FAST_MEMORY: number
|
||||
|
||||
addOnPreRun(cb: () => any): void
|
||||
addOnInit(cb: () => any): void
|
||||
addOnPreMain(cb: () => any): void
|
||||
addOnExit(cb: () => any): void
|
||||
addOnPostRun(cb: () => any): void
|
||||
|
||||
// Tools
|
||||
intArrayFromString(
|
||||
stringy: string,
|
||||
dontAddNull?: boolean,
|
||||
length?: number
|
||||
): number[]
|
||||
intArrayToString(array: number[]): string
|
||||
writeStringToMemory(str: string, buffer: number, dontAddNull: boolean): void
|
||||
writeArrayToMemory(array: number[], buffer: number): void
|
||||
writeAsciiToMemory(str: string, buffer: number, dontAddNull: boolean): void
|
||||
|
||||
addRunDependency(id: any): void
|
||||
removeRunDependency(id: any): void
|
||||
|
||||
preloadedImages: any
|
||||
preloadedAudios: any
|
||||
|
||||
_malloc(size: number): number
|
||||
_free(ptr: number): void
|
||||
|
||||
// Augmentations below by @surma.
|
||||
onRuntimeInitialized: () => void | null
|
||||
}
|
||||
}
|
||||
2
node_modules/next/dist/server/lib/squoosh/emscripten-utils.d.ts
generated
vendored
Normal file
2
node_modules/next/dist/server/lib/squoosh/emscripten-utils.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare function pathify(path: string): string;
|
||||
export declare function instantiateEmscriptenWasm<T extends EmscriptenWasm.Module>(factory: EmscriptenWasm.ModuleFactory<T>, path: string, workerJS?: string): Promise<T>;
|
||||
44
node_modules/next/dist/server/lib/squoosh/emscripten-utils.js
generated
vendored
Normal file
44
node_modules/next/dist/server/lib/squoosh/emscripten-utils.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
instantiateEmscriptenWasm: null,
|
||||
pathify: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
instantiateEmscriptenWasm: function() {
|
||||
return instantiateEmscriptenWasm;
|
||||
},
|
||||
pathify: function() {
|
||||
return pathify;
|
||||
}
|
||||
});
|
||||
const _url = require("url");
|
||||
function pathify(path) {
|
||||
if (path.startsWith("file://")) {
|
||||
path = (0, _url.fileURLToPath)(path);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
function instantiateEmscriptenWasm(factory, path, workerJS = "") {
|
||||
return factory({
|
||||
locateFile (requestPath) {
|
||||
// The glue code generated by emscripten uses the original
|
||||
// file names of the worker file and the wasm binary.
|
||||
// These will have changed in the bundling process and
|
||||
// we need to inject them here.
|
||||
if (requestPath.endsWith(".wasm")) return pathify(path);
|
||||
if (requestPath.endsWith(".worker.js")) return pathify(workerJS);
|
||||
return requestPath;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=emscripten-utils.js.map
|
||||
1
node_modules/next/dist/server/lib/squoosh/emscripten-utils.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/emscripten-utils.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/server/lib/squoosh/emscripten-utils.ts"],"names":["instantiateEmscriptenWasm","pathify","path","startsWith","fileURLToPath","factory","workerJS","locateFile","requestPath","endsWith"],"mappings":";;;;;;;;;;;;;;;IASgBA,yBAAyB;eAAzBA;;IAPAC,OAAO;eAAPA;;;qBAFc;AAEvB,SAASA,QAAQC,IAAY;IAClC,IAAIA,KAAKC,UAAU,CAAC,YAAY;QAC9BD,OAAOE,IAAAA,kBAAa,EAACF;IACvB;IACA,OAAOA;AACT;AAEO,SAASF,0BACdK,OAAwC,EACxCH,IAAY,EACZI,WAAmB,EAAE;IAErB,OAAOD,QAAQ;QACbE,YAAWC,WAAW;YACpB,0DAA0D;YAC1D,qDAAqD;YACrD,sDAAsD;YACtD,+BAA+B;YAC/B,IAAIA,YAAYC,QAAQ,CAAC,UAAU,OAAOR,QAAQC;YAClD,IAAIM,YAAYC,QAAQ,CAAC,eAAe,OAAOR,QAAQK;YACvD,OAAOE;QACT;IACF;AACF"}
|
||||
9
node_modules/next/dist/server/lib/squoosh/image_data.d.ts
generated
vendored
Normal file
9
node_modules/next/dist/server/lib/squoosh/image_data.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/// <reference types="node" />
|
||||
export default class ImageData {
|
||||
static from(input: ImageData): ImageData;
|
||||
private _data;
|
||||
width: number;
|
||||
height: number;
|
||||
get data(): Buffer;
|
||||
constructor(data: Buffer | Uint8Array | Uint8ClampedArray, width: number, height: number);
|
||||
}
|
||||
31
node_modules/next/dist/server/lib/squoosh/image_data.js
generated
vendored
Normal file
31
node_modules/next/dist/server/lib/squoosh/image_data.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return ImageData;
|
||||
}
|
||||
});
|
||||
class ImageData {
|
||||
static from(input) {
|
||||
return new ImageData(input.data || input._data, input.width, input.height);
|
||||
}
|
||||
get data() {
|
||||
if (Object.prototype.toString.call(this._data) === "[object Object]") {
|
||||
return Buffer.from(Object.values(this._data));
|
||||
}
|
||||
if (this._data instanceof Buffer || this._data instanceof Uint8Array || this._data instanceof Uint8ClampedArray) {
|
||||
return Buffer.from(this._data);
|
||||
}
|
||||
throw new Error("invariant");
|
||||
}
|
||||
constructor(data, width, height){
|
||||
this._data = data;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=image_data.js.map
|
||||
1
node_modules/next/dist/server/lib/squoosh/image_data.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/image_data.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/server/lib/squoosh/image_data.ts"],"names":["ImageData","from","input","data","_data","width","height","Object","prototype","toString","call","Buffer","values","Uint8Array","Uint8ClampedArray","Error","constructor"],"mappings":";;;;+BAAA;;;eAAqBA;;;AAAN,MAAMA;IACnB,OAAOC,KAAKC,KAAgB,EAAa;QACvC,OAAO,IAAIF,UAAUE,MAAMC,IAAI,IAAID,MAAME,KAAK,EAAEF,MAAMG,KAAK,EAAEH,MAAMI,MAAM;IAC3E;IAMA,IAAIH,OAAe;QACjB,IAAII,OAAOC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAAC,IAAI,CAACN,KAAK,MAAM,mBAAmB;YACpE,OAAOO,OAAOV,IAAI,CAACM,OAAOK,MAAM,CAAC,IAAI,CAACR,KAAK;QAC7C;QACA,IACE,IAAI,CAACA,KAAK,YAAYO,UACtB,IAAI,CAACP,KAAK,YAAYS,cACtB,IAAI,CAACT,KAAK,YAAYU,mBACtB;YACA,OAAOH,OAAOV,IAAI,CAAC,IAAI,CAACG,KAAK;QAC/B;QACA,MAAM,IAAIW,MAAM;IAClB;IAEAC,YACEb,IAA6C,EAC7CE,KAAa,EACbC,MAAc,CACd;QACA,IAAI,CAACF,KAAK,GAAGD;QACb,IAAI,CAACE,KAAK,GAAGA;QACb,IAAI,CAACC,MAAM,GAAGA;IAChB;AACF"}
|
||||
28
node_modules/next/dist/server/lib/squoosh/impl.d.ts
generated
vendored
Normal file
28
node_modules/next/dist/server/lib/squoosh/impl.d.ts
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/// <reference types="node" />
|
||||
import ImageData from './image_data';
|
||||
export declare function decodeBuffer(_buffer: Buffer | Uint8Array): Promise<ImageData>;
|
||||
export declare function rotate(image: ImageData, numRotations: number): Promise<ImageData>;
|
||||
type ResizeOpts = {
|
||||
image: ImageData;
|
||||
} & ({
|
||||
width: number;
|
||||
height?: never;
|
||||
} | {
|
||||
height: number;
|
||||
width?: never;
|
||||
} | {
|
||||
height: number;
|
||||
width: number;
|
||||
});
|
||||
export declare function resize({ image, width, height }: ResizeOpts): Promise<ImageData>;
|
||||
export declare function encodeJpeg(image: ImageData, { quality }: {
|
||||
quality: number;
|
||||
}): Promise<Buffer | Uint8Array>;
|
||||
export declare function encodeWebp(image: ImageData, { quality }: {
|
||||
quality: number;
|
||||
}): Promise<Buffer | Uint8Array>;
|
||||
export declare function encodeAvif(image: ImageData, { quality }: {
|
||||
quality: number;
|
||||
}): Promise<Buffer | Uint8Array>;
|
||||
export declare function encodePng(image: ImageData): Promise<Buffer | Uint8Array>;
|
||||
export {};
|
||||
124
node_modules/next/dist/server/lib/squoosh/impl.js
generated
vendored
Normal file
124
node_modules/next/dist/server/lib/squoosh/impl.js
generated
vendored
Normal file
@ -0,0 +1,124 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
decodeBuffer: null,
|
||||
encodeAvif: null,
|
||||
encodeJpeg: null,
|
||||
encodePng: null,
|
||||
encodeWebp: null,
|
||||
resize: null,
|
||||
rotate: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
decodeBuffer: function() {
|
||||
return decodeBuffer;
|
||||
},
|
||||
encodeAvif: function() {
|
||||
return encodeAvif;
|
||||
},
|
||||
encodeJpeg: function() {
|
||||
return encodeJpeg;
|
||||
},
|
||||
encodePng: function() {
|
||||
return encodePng;
|
||||
},
|
||||
encodeWebp: function() {
|
||||
return encodeWebp;
|
||||
},
|
||||
resize: function() {
|
||||
return resize;
|
||||
},
|
||||
rotate: function() {
|
||||
return rotate;
|
||||
}
|
||||
});
|
||||
const _codecs = require("./codecs");
|
||||
const _image_data = /*#__PURE__*/ _interop_require_default(require("./image_data"));
|
||||
function _interop_require_default(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
async function decodeBuffer(_buffer) {
|
||||
var _Object_entries_find;
|
||||
const buffer = Buffer.from(_buffer);
|
||||
const firstChunk = buffer.slice(0, 16);
|
||||
const firstChunkString = Array.from(firstChunk).map((v)=>String.fromCodePoint(v)).join("");
|
||||
const key = (_Object_entries_find = Object.entries(_codecs.codecs).find(([, { detectors }])=>detectors.some((detector)=>detector.exec(firstChunkString)))) == null ? void 0 : _Object_entries_find[0];
|
||||
if (!key) {
|
||||
throw Error(`Buffer has an unsupported format`);
|
||||
}
|
||||
const encoder = _codecs.codecs[key];
|
||||
const mod = await encoder.dec();
|
||||
const rgba = mod.decode(new Uint8Array(buffer));
|
||||
return rgba;
|
||||
}
|
||||
async function rotate(image, numRotations) {
|
||||
image = _image_data.default.from(image);
|
||||
const m = await _codecs.preprocessors["rotate"].instantiate();
|
||||
return await m(image.data, image.width, image.height, {
|
||||
numRotations
|
||||
});
|
||||
}
|
||||
async function resize({ image, width, height }) {
|
||||
image = _image_data.default.from(image);
|
||||
const p = _codecs.preprocessors["resize"];
|
||||
const m = await p.instantiate();
|
||||
return await m(image.data, image.width, image.height, {
|
||||
...p.defaultOptions,
|
||||
width,
|
||||
height
|
||||
});
|
||||
}
|
||||
async function encodeJpeg(image, { quality }) {
|
||||
image = _image_data.default.from(image);
|
||||
const e = _codecs.codecs["mozjpeg"];
|
||||
const m = await e.enc();
|
||||
const r = await m.encode(image.data, image.width, image.height, {
|
||||
...e.defaultEncoderOptions,
|
||||
quality
|
||||
});
|
||||
return Buffer.from(r);
|
||||
}
|
||||
async function encodeWebp(image, { quality }) {
|
||||
image = _image_data.default.from(image);
|
||||
const e = _codecs.codecs["webp"];
|
||||
const m = await e.enc();
|
||||
const r = await m.encode(image.data, image.width, image.height, {
|
||||
...e.defaultEncoderOptions,
|
||||
quality
|
||||
});
|
||||
return Buffer.from(r);
|
||||
}
|
||||
async function encodeAvif(image, { quality }) {
|
||||
image = _image_data.default.from(image);
|
||||
const e = _codecs.codecs["avif"];
|
||||
const m = await e.enc();
|
||||
const val = e.autoOptimize.min || 62;
|
||||
const r = await m.encode(image.data, image.width, image.height, {
|
||||
...e.defaultEncoderOptions,
|
||||
// Think of cqLevel as the "amount" of quantization (0 to 62),
|
||||
// so a lower value yields higher quality (0 to 100).
|
||||
cqLevel: Math.round(val - quality / 100 * val)
|
||||
});
|
||||
return Buffer.from(r);
|
||||
}
|
||||
async function encodePng(image) {
|
||||
image = _image_data.default.from(image);
|
||||
const e = _codecs.codecs["oxipng"];
|
||||
const m = await e.enc();
|
||||
const r = await m.encode(image.data, image.width, image.height, {
|
||||
...e.defaultEncoderOptions
|
||||
});
|
||||
return Buffer.from(r);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=impl.js.map
|
||||
1
node_modules/next/dist/server/lib/squoosh/impl.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/impl.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/server/lib/squoosh/impl.ts"],"names":["decodeBuffer","encodeAvif","encodeJpeg","encodePng","encodeWebp","resize","rotate","_buffer","Object","buffer","Buffer","from","firstChunk","slice","firstChunkString","Array","map","v","String","fromCodePoint","join","key","entries","supportedFormats","find","detectors","some","detector","exec","Error","encoder","mod","dec","rgba","decode","Uint8Array","image","numRotations","ImageData","m","preprocessors","instantiate","data","width","height","p","defaultOptions","quality","e","enc","r","encode","defaultEncoderOptions","val","autoOptimize","min","cqLevel","Math","round"],"mappings":";;;;;;;;;;;;;;;;;;;;IAKsBA,YAAY;eAAZA;;IA8EAC,UAAU;eAAVA;;IA9BAC,UAAU;eAAVA;;IAgDAC,SAAS;eAATA;;IAjCAC,UAAU;eAAVA;;IA3BAC,MAAM;eAANA;;IAhBAC,MAAM;eAANA;;;wBAzBoC;mEACpC;;;;;;AAIf,eAAeN,aACpBO,OAA4B;QAOhBC;IALZ,MAAMC,SAASC,OAAOC,IAAI,CAACJ;IAC3B,MAAMK,aAAaH,OAAOI,KAAK,CAAC,GAAG;IACnC,MAAMC,mBAAmBC,MAAMJ,IAAI,CAACC,YACjCI,GAAG,CAAC,CAACC,IAAMC,OAAOC,aAAa,CAACF,IAChCG,IAAI,CAAC;IACR,MAAMC,OAAMb,uBAAAA,OAAOc,OAAO,CAACC,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AAM,EAAE;QAC9D,GAAGI,EAAEI,qBAAqB;IAC5B;IACA,OAAO1C,OAAOC,IAAI,CAACuC;AACrB"}
|
||||
26
node_modules/next/dist/server/lib/squoosh/main.d.ts
generated
vendored
Normal file
26
node_modules/next/dist/server/lib/squoosh/main.d.ts
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/// <reference types="node" />
|
||||
type RotateOperation = {
|
||||
type: 'rotate';
|
||||
numRotations: number;
|
||||
};
|
||||
type ResizeOperation = {
|
||||
type: 'resize';
|
||||
} & ({
|
||||
width: number;
|
||||
height?: never;
|
||||
} | {
|
||||
height: number;
|
||||
width?: never;
|
||||
} | {
|
||||
width: number;
|
||||
height: number;
|
||||
});
|
||||
export type Operation = RotateOperation | ResizeOperation;
|
||||
export type Encoding = 'jpeg' | 'png' | 'webp' | 'avif';
|
||||
export declare function getMetadata(buffer: Buffer): Promise<{
|
||||
width: number;
|
||||
height: number;
|
||||
}>;
|
||||
export declare function processBuffer(buffer: Buffer, operations: Operation[], encoding: Encoding, quality: number): Promise<Buffer>;
|
||||
export declare function decodeBuffer(buffer: Buffer): Promise<import("./image_data").default>;
|
||||
export {};
|
||||
136
node_modules/next/dist/server/lib/squoosh/main.js
generated
vendored
Normal file
136
node_modules/next/dist/server/lib/squoosh/main.js
generated
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
decodeBuffer: null,
|
||||
getMetadata: null,
|
||||
processBuffer: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
decodeBuffer: function() {
|
||||
return decodeBuffer;
|
||||
},
|
||||
getMetadata: function() {
|
||||
return getMetadata;
|
||||
},
|
||||
processBuffer: function() {
|
||||
return processBuffer;
|
||||
}
|
||||
});
|
||||
const _jestworker = require("next/dist/compiled/jest-worker");
|
||||
const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
||||
const _utils = require("../../../shared/lib/utils");
|
||||
const _os = require("os");
|
||||
function _getRequireWildcardCache(nodeInterop) {
|
||||
if (typeof WeakMap !== "function") return null;
|
||||
var cacheBabelInterop = new WeakMap();
|
||||
var cacheNodeInterop = new WeakMap();
|
||||
return (_getRequireWildcardCache = function(nodeInterop) {
|
||||
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
||||
})(nodeInterop);
|
||||
}
|
||||
function _interop_require_wildcard(obj, nodeInterop) {
|
||||
if (!nodeInterop && obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
||||
return {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
var cache = _getRequireWildcardCache(nodeInterop);
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {
|
||||
__proto__: null
|
||||
};
|
||||
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for(var key in obj){
|
||||
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
const getWorker = (0, _utils.execOnce)(()=>new _jestworker.Worker(_path.resolve(__dirname, "impl"), {
|
||||
enableWorkerThreads: true,
|
||||
// There will be at most 6 workers needed since each worker will take
|
||||
// at least 1 operation type.
|
||||
numWorkers: Math.max(1, Math.min((0, _os.cpus)().length - 1, 6)),
|
||||
computeWorkerKey: (method)=>method
|
||||
}));
|
||||
async function getMetadata(buffer) {
|
||||
const worker = getWorker();
|
||||
const { width, height } = await worker.decodeBuffer(buffer);
|
||||
return {
|
||||
width,
|
||||
height
|
||||
};
|
||||
}
|
||||
async function processBuffer(buffer, operations, encoding, quality) {
|
||||
const worker = getWorker();
|
||||
let imageData = await worker.decodeBuffer(buffer);
|
||||
for (const operation of operations){
|
||||
if (operation.type === "rotate") {
|
||||
imageData = await worker.rotate(imageData, operation.numRotations);
|
||||
} else if (operation.type === "resize") {
|
||||
const opt = {
|
||||
image: imageData,
|
||||
width: 0,
|
||||
height: 0
|
||||
};
|
||||
if (operation.width && imageData.width && imageData.width > operation.width) {
|
||||
opt.width = operation.width;
|
||||
}
|
||||
if (operation.height && imageData.height && imageData.height > operation.height) {
|
||||
opt.height = operation.height;
|
||||
}
|
||||
if (opt.width > 0 || opt.height > 0) {
|
||||
imageData = await worker.resize(opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
switch(encoding){
|
||||
case "jpeg":
|
||||
return Buffer.from(await worker.encodeJpeg(imageData, {
|
||||
quality
|
||||
}));
|
||||
case "webp":
|
||||
return Buffer.from(await worker.encodeWebp(imageData, {
|
||||
quality
|
||||
}));
|
||||
case "avif":
|
||||
const avifQuality = quality - 20;
|
||||
return Buffer.from(await worker.encodeAvif(imageData, {
|
||||
quality: Math.max(avifQuality, 0)
|
||||
}));
|
||||
case "png":
|
||||
return Buffer.from(await worker.encodePng(imageData));
|
||||
default:
|
||||
throw Error(`Unsupported encoding format`);
|
||||
}
|
||||
}
|
||||
async function decodeBuffer(buffer) {
|
||||
const worker = getWorker();
|
||||
const imageData = await worker.decodeBuffer(buffer);
|
||||
return imageData;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=main.js.map
|
||||
1
node_modules/next/dist/server/lib/squoosh/main.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/main.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/server/lib/squoosh/main.ts"],"names":["decodeBuffer","getMetadata","processBuffer","getWorker","execOnce","Worker","path","resolve","__dirname","enableWorkerThreads","numWorkers","Math","max","min","cpus","length","computeWorkerKey","method","buffer","worker","width","height","operations","encoding","quality","imageData","operation","type","rotate","numRotations","opt","image","resize","Buffer","from","encodeJpeg","encodeWebp","avifQuality","encodeAvif","encodePng","Error"],"mappings":";;;;;;;;;;;;;;;;IA4FsBA,YAAY;eAAZA;;IA9DAC,WAAW;eAAXA;;IAQAC,aAAa;eAAbA;;;4BAtCC;8DACD;uBACG;oBACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBrB,MAAMC,YAAYC,IAAAA,eAAQ,EACxB,IACE,IAAIC,kBAAM,CAACC,MAAKC,OAAO,CAACC,WAAW,SAAS;QAC1CC,qBAAqB;QACrB,qEAAqE;QACrE,6BAA6B;QAC7BC,YAAYC,KAAKC,GAAG,CAAC,GAAGD,KAAKE,GAAG,CAACC,IAAAA,QAAI,IAAGC,MAAM,GAAG,GAAG;QACpDC,kBAAkB,CAACC,SAAWA;IAChC;AAGG,eAAehB,YACpBiB,MAAc;IAEd,MAAMC,SAAkChB;IACxC,MAAM,EAAEiB,KAAK,EAAEC,MAAM,EAAE,GAAG,MAAMF,OAAOnB,YAAY,CAACkB;IACpD,OAAO;QAAEE;QAAOC;IAAO;AACzB;AAEO,eAAenB,cACpBgB,MAAc,EACdI,UAAuB,EACvBC,QAAkB,EAClBC,OAAe;IAEf,MAAML,SAAkChB;IAExC,IAAIsB,YAAY,MAAMN,OAAOnB,YAAY,CAACkB;IAC1C,KAAK,MAAMQ,aAAaJ,WAAY;QAClC,IAAII,UAAUC,IAAI,KAAK,UAAU;YAC/BF,YAAY,MAAMN,OAAOS,MAAM,CAACH,WAAWC,UAAUG,YAAY;QACnE,OAAO,IAAIH,UAAUC,IAAI,KAAK,UAAU;YACtC,MAAMG,MAAM;gBAAEC,OAAON;gBAAWL,OAAO;gBAAGC,QAAQ;YAAE;YACpD,IACEK,UAAUN,KAAK,IACfK,UAAUL,KAAK,IACfK,UAAUL,KAAK,GAAGM,UAAUN,KAAK,EACjC;gBACAU,IAAIV,KAAK,GAAGM,UAAUN,KAAK;YAC7B;YACA,IACEM,UAAUL,MAAM,IAChBI,UAAUJ,MAAM,IAChBI,UAAUJ,MAAM,GAAGK,UAAUL,MAAM,EACnC;gBACAS,IAAIT,MAAM,GAAGK,UAAUL,MAAM;YAC/B;YAEA,IAAIS,IAAIV,KAAK,GAAG,KAAKU,IAAIT,MAAM,GAAG,GAAG;gBACnCI,YAAY,MAAMN,OAAOa,MAAM,CAACF;YAClC;QACF;IACF;IAEA,OAAQP;QACN,KAAK;YACH,OAAOU,OAAOC,IAAI,CAAC,MAAMf,OAAOgB,UAAU,CAACV,WAAW;gBAAED;YAAQ;QAClE,KAAK;YACH,OAAOS,OAAOC,IAAI,CAAC,MAAMf,OAAOiB,UAAU,CAACX,WAAW;gBAAED;YAAQ;QAClE,KAAK;YACH,MAAMa,cAAcb,UAAU;YAC9B,OAAOS,OAAOC,IAAI,CAChB,MAAMf,OAAOmB,UAAU,CAACb,WAAW;gBACjCD,SAASb,KAAKC,GAAG,CAACyB,aAAa;YACjC;QAEJ,KAAK;YACH,OAAOJ,OAAOC,IAAI,CAAC,MAAMf,OAAOoB,SAAS,CAACd;QAC5C;YACE,MAAMe,MAAM,CAAC,2BAA2B,CAAC;IAC7C;AACF;AAEO,eAAexC,aAAakB,MAAc;IAC/C,MAAMC,SAAkChB;IACxC,MAAMsB,YAAY,MAAMN,OAAOnB,YAAY,CAACkB;IAC5C,OAAOO;AACT"}
|
||||
38
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_enc.d.ts
generated
vendored
Normal file
38
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_enc.d.ts
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
// eslint-disable-next-line no-shadow
|
||||
export const enum MozJpegColorSpace {
|
||||
GRAYSCALE = 1,
|
||||
RGB,
|
||||
YCbCr,
|
||||
}
|
||||
|
||||
export interface EncodeOptions {
|
||||
quality: number
|
||||
baseline: boolean
|
||||
arithmetic: boolean
|
||||
progressive: boolean
|
||||
optimize_coding: boolean
|
||||
smoothing: number
|
||||
color_space: MozJpegColorSpace
|
||||
quant_table: number
|
||||
trellis_multipass: boolean
|
||||
trellis_opt_zero: boolean
|
||||
trellis_opt_table: boolean
|
||||
trellis_loops: number
|
||||
auto_subsample: boolean
|
||||
chroma_subsample: number
|
||||
separate_chroma_quality: boolean
|
||||
chroma_quality: number
|
||||
}
|
||||
|
||||
export interface MozJPEGModule extends EmscriptenWasm.Module {
|
||||
encode(
|
||||
data: BufferSource,
|
||||
width: number,
|
||||
height: number,
|
||||
options: EncodeOptions
|
||||
): Uint8Array
|
||||
}
|
||||
|
||||
declare var moduleFactory: EmscriptenWasm.ModuleFactory<MozJPEGModule>
|
||||
|
||||
export default moduleFactory
|
||||
1545
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_dec.js
generated
vendored
Normal file
1545
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_dec.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_dec.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_dec.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_dec.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_dec.wasm
generated
vendored
Normal file
Binary file not shown.
1635
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_enc.js
generated
vendored
Normal file
1635
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_enc.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_enc.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_enc.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_enc.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/mozjpeg/mozjpeg_node_enc.wasm
generated
vendored
Normal file
Binary file not shown.
115
node_modules/next/dist/server/lib/squoosh/png/squoosh_oxipng.js
generated
vendored
Normal file
115
node_modules/next/dist/server/lib/squoosh/png/squoosh_oxipng.js
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
cleanup: null,
|
||||
default: null,
|
||||
optimise: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
cleanup: function() {
|
||||
return cleanup;
|
||||
},
|
||||
default: function() {
|
||||
return _default;
|
||||
},
|
||||
optimise: function() {
|
||||
return optimise;
|
||||
}
|
||||
});
|
||||
let wasm;
|
||||
let cachedTextDecoder = new TextDecoder("utf-8", {
|
||||
ignoreBOM: true,
|
||||
fatal: true
|
||||
});
|
||||
cachedTextDecoder.decode();
|
||||
let cachegetUint8Memory0 = null;
|
||||
function getUint8Memory0() {
|
||||
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
||||
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetUint8Memory0;
|
||||
}
|
||||
function getStringFromWasm0(ptr, len) {
|
||||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
||||
}
|
||||
let WASM_VECTOR_LEN = 0;
|
||||
function passArray8ToWasm0(arg, malloc) {
|
||||
const ptr = malloc(arg.length * 1);
|
||||
getUint8Memory0().set(arg, ptr / 1);
|
||||
WASM_VECTOR_LEN = arg.length;
|
||||
return ptr;
|
||||
}
|
||||
let cachegetInt32Memory0 = null;
|
||||
function getInt32Memory0() {
|
||||
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
||||
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetInt32Memory0;
|
||||
}
|
||||
function getArrayU8FromWasm0(ptr, len) {
|
||||
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
||||
}
|
||||
function optimise(data, level, interlace) {
|
||||
try {
|
||||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
||||
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
||||
var len0 = WASM_VECTOR_LEN;
|
||||
wasm.optimise(retptr, ptr0, len0, level, interlace);
|
||||
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
||||
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
||||
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
||||
wasm.__wbindgen_free(r0, r1 * 1);
|
||||
return v1;
|
||||
} finally{
|
||||
wasm.__wbindgen_add_to_stack_pointer(16);
|
||||
}
|
||||
}
|
||||
async function load(module1, imports) {
|
||||
if (typeof Response === "function" && module1 instanceof Response) {
|
||||
if (typeof WebAssembly.instantiateStreaming === "function") {
|
||||
return await WebAssembly.instantiateStreaming(module1, imports);
|
||||
}
|
||||
const bytes = await module1.arrayBuffer();
|
||||
return await WebAssembly.instantiate(bytes, imports);
|
||||
} else {
|
||||
const instance = await WebAssembly.instantiate(module1, imports);
|
||||
if (instance instanceof WebAssembly.Instance) {
|
||||
return {
|
||||
instance,
|
||||
module: module1
|
||||
};
|
||||
} else {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
async function init(input) {
|
||||
const imports = {};
|
||||
imports.wbg = {};
|
||||
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
||||
throw new Error(getStringFromWasm0(arg0, arg1));
|
||||
};
|
||||
if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
|
||||
input = fetch(input);
|
||||
}
|
||||
const { instance, module: module1 } = await load(await input, imports);
|
||||
wasm = instance.exports;
|
||||
init.__wbindgen_wasm_module = module1;
|
||||
return wasm;
|
||||
}
|
||||
const _default = init;
|
||||
function cleanup() {
|
||||
wasm = null;
|
||||
cachegetUint8Memory0 = null;
|
||||
cachegetInt32Memory0 = null;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=squoosh_oxipng.js.map
|
||||
1
node_modules/next/dist/server/lib/squoosh/png/squoosh_oxipng.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/png/squoosh_oxipng.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/server/lib/squoosh/png/squoosh_oxipng.js"],"names":["cleanup","optimise","wasm","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","decode","cachegetUint8Memory0","getUint8Memory0","buffer","memory","Uint8Array","getStringFromWasm0","ptr","len","subarray","WASM_VECTOR_LEN","passArray8ToWasm0","arg","malloc","length","set","cachegetInt32Memory0","getInt32Memory0","Int32Array","getArrayU8FromWasm0","data","level","interlace","retptr","__wbindgen_add_to_stack_pointer","ptr0","__wbindgen_malloc","len0","r0","r1","v1","slice","__wbindgen_free","load","module","imports","Response","WebAssembly","instantiateStreaming","bytes","arrayBuffer","instantiate","instance","Instance","init","input","wbg","__wbindgen_throw","arg0","arg1","Error","Request","URL","fetch","exports","__wbindgen_wasm_module"],"mappings":";;;;;;;;;;;;;;;;IAkHgBA,OAAO;eAAPA;;IAHhB,OAAmB;eAAnB;;IA1DgBC,QAAQ;eAARA;;;AArDhB,IAAIC;AAEJ,IAAIC,oBAAoB,IAAIC,YAAY,SAAS;IAC/CC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squoosh/png/squoosh_oxipng_bg.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/png/squoosh_oxipng_bg.wasm
generated
vendored
Normal file
Binary file not shown.
165
node_modules/next/dist/server/lib/squoosh/png/squoosh_png.js
generated
vendored
Normal file
165
node_modules/next/dist/server/lib/squoosh/png/squoosh_png.js
generated
vendored
Normal file
@ -0,0 +1,165 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
cleanup: null,
|
||||
decode: null,
|
||||
default: null,
|
||||
encode: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
cleanup: function() {
|
||||
return cleanup;
|
||||
},
|
||||
decode: function() {
|
||||
return decode;
|
||||
},
|
||||
default: function() {
|
||||
return _default;
|
||||
},
|
||||
encode: function() {
|
||||
return encode;
|
||||
}
|
||||
});
|
||||
let wasm;
|
||||
let cachedTextDecoder = new TextDecoder("utf-8", {
|
||||
ignoreBOM: true,
|
||||
fatal: true
|
||||
});
|
||||
cachedTextDecoder.decode();
|
||||
let cachegetUint8Memory0 = null;
|
||||
function getUint8Memory0() {
|
||||
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
||||
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetUint8Memory0;
|
||||
}
|
||||
function getStringFromWasm0(ptr, len) {
|
||||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
||||
}
|
||||
let cachegetUint8ClampedMemory0 = null;
|
||||
function getUint8ClampedMemory0() {
|
||||
if (cachegetUint8ClampedMemory0 === null || cachegetUint8ClampedMemory0.buffer !== wasm.memory.buffer) {
|
||||
cachegetUint8ClampedMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetUint8ClampedMemory0;
|
||||
}
|
||||
function getClampedArrayU8FromWasm0(ptr, len) {
|
||||
return getUint8ClampedMemory0().subarray(ptr / 1, ptr / 1 + len);
|
||||
}
|
||||
const heap = new Array(32).fill(undefined);
|
||||
heap.push(undefined, null, true, false);
|
||||
let heap_next = heap.length;
|
||||
function addHeapObject(obj) {
|
||||
if (heap_next === heap.length) heap.push(heap.length + 1);
|
||||
const idx = heap_next;
|
||||
heap_next = heap[idx];
|
||||
heap[idx] = obj;
|
||||
return idx;
|
||||
}
|
||||
let WASM_VECTOR_LEN = 0;
|
||||
function passArray8ToWasm0(arg, malloc) {
|
||||
const ptr = malloc(arg.length * 1);
|
||||
getUint8Memory0().set(arg, ptr / 1);
|
||||
WASM_VECTOR_LEN = arg.length;
|
||||
return ptr;
|
||||
}
|
||||
let cachegetInt32Memory0 = null;
|
||||
function getInt32Memory0() {
|
||||
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
||||
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetInt32Memory0;
|
||||
}
|
||||
function getArrayU8FromWasm0(ptr, len) {
|
||||
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
||||
}
|
||||
function encode(data, width, height) {
|
||||
try {
|
||||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
||||
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
||||
var len0 = WASM_VECTOR_LEN;
|
||||
wasm.encode(retptr, ptr0, len0, width, height);
|
||||
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
||||
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
||||
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
||||
wasm.__wbindgen_free(r0, r1 * 1);
|
||||
return v1;
|
||||
} finally{
|
||||
wasm.__wbindgen_add_to_stack_pointer(16);
|
||||
}
|
||||
}
|
||||
function getObject(idx) {
|
||||
return heap[idx];
|
||||
}
|
||||
function dropObject(idx) {
|
||||
if (idx < 36) return;
|
||||
heap[idx] = heap_next;
|
||||
heap_next = idx;
|
||||
}
|
||||
function takeObject(idx) {
|
||||
const ret = getObject(idx);
|
||||
dropObject(idx);
|
||||
return ret;
|
||||
}
|
||||
function decode(data) {
|
||||
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
||||
var len0 = WASM_VECTOR_LEN;
|
||||
var ret = wasm.decode(ptr0, len0);
|
||||
return takeObject(ret);
|
||||
}
|
||||
async function load(module1, imports) {
|
||||
if (typeof Response === "function" && module1 instanceof Response) {
|
||||
if (typeof WebAssembly.instantiateStreaming === "function") {
|
||||
return await WebAssembly.instantiateStreaming(module1, imports);
|
||||
}
|
||||
const bytes = await module1.arrayBuffer();
|
||||
return await WebAssembly.instantiate(bytes, imports);
|
||||
} else {
|
||||
const instance = await WebAssembly.instantiate(module1, imports);
|
||||
if (instance instanceof WebAssembly.Instance) {
|
||||
return {
|
||||
instance,
|
||||
module: module1
|
||||
};
|
||||
} else {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
async function init(input) {
|
||||
const imports = {};
|
||||
imports.wbg = {};
|
||||
imports.wbg.__wbg_newwithownedu8clampedarrayandsh_787b2db8ea6bfd62 = function(arg0, arg1, arg2, arg3) {
|
||||
var v0 = getClampedArrayU8FromWasm0(arg0, arg1).slice();
|
||||
wasm.__wbindgen_free(arg0, arg1 * 1);
|
||||
var ret = new ImageData(v0, arg2 >>> 0, arg3 >>> 0);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
||||
throw new Error(getStringFromWasm0(arg0, arg1));
|
||||
};
|
||||
if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
|
||||
input = fetch(input);
|
||||
}
|
||||
const { instance, module: module1 } = await load(await input, imports);
|
||||
wasm = instance.exports;
|
||||
init.__wbindgen_wasm_module = module1;
|
||||
return wasm;
|
||||
}
|
||||
const _default = init;
|
||||
function cleanup() {
|
||||
wasm = null;
|
||||
cachegetUint8ClampedMemory0 = null;
|
||||
cachegetUint8Memory0 = null;
|
||||
cachegetInt32Memory0 = null;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=squoosh_png.js.map
|
||||
1
node_modules/next/dist/server/lib/squoosh/png/squoosh_png.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/png/squoosh_png.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/server/lib/squoosh/png/squoosh_png.js"],"names":["cleanup","decode","encode","wasm","cachedTextDecoder","TextDecoder","ignoreBOM","fatal","cachegetUint8Memory0","getUint8Memory0","buffer","memory","Uint8Array","getStringFromWasm0","ptr","len","subarray","cachegetUint8ClampedMemory0","getUint8ClampedMemory0","Uint8ClampedArray","getClampedArrayU8FromWasm0","heap","Array","fill","undefined","push","heap_next","length","addHeapObject","obj","idx","WASM_VECTOR_LEN","passArray8ToWasm0","arg","malloc","set","cachegetInt32Memory0","getInt32Memory0","Int32Array","getArrayU8FromWasm0","data","width","height","retptr","__wbindgen_add_to_stack_pointer","ptr0","__wbindgen_malloc","len0","r0","r1","v1","slice","__wbindgen_free","getObject","dropObject","takeObject","ret","load","module","imports","Response","WebAssembly","instantiateStreaming","bytes","arrayBuffer","instantiate","instance","Instance","init","input","wbg","__wbg_newwithownedu8clampedarrayandsh_787b2db8ea6bfd62","arg0","arg1","arg2","arg3","v0","ImageData","__wbindgen_throw","Error","Request","URL","fetch","exports","__wbindgen_wasm_module"],"mappings":";;;;;;;;;;;;;;;;;IAiLgBA,OAAO;eAAPA;;IA3DAC,MAAM;eAANA;;IAwDhB,OAAmB;eAAnB;;IA3FgBC,MAAM;eAANA;;;AAnFhB,IAAIC;AAEJ,IAAIC,oBAAoB,IAAIC,YAAY,SAAS;IAC/CC,WAAW;IACXC,OAAO;AACT;AAEA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AG1B;IAE9B,OAAOvD;AACT;MAEA,WAAeiE;AAGR,SAASpE;IACdG,OAAO;IACPc,8BAA8B;IAC9BT,uBAAuB;IACvB4B,uBAAuB;AACzB"}
|
||||
BIN
node_modules/next/dist/server/lib/squoosh/png/squoosh_png_bg.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/png/squoosh_png_bg.wasm
generated
vendored
Normal file
Binary file not shown.
110
node_modules/next/dist/server/lib/squoosh/resize/squoosh_resize.js
generated
vendored
Normal file
110
node_modules/next/dist/server/lib/squoosh/resize/squoosh_resize.js
generated
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
0 && (module.exports = {
|
||||
cleanup: null,
|
||||
default: null,
|
||||
resize: null
|
||||
});
|
||||
function _export(target, all) {
|
||||
for(var name in all)Object.defineProperty(target, name, {
|
||||
enumerable: true,
|
||||
get: all[name]
|
||||
});
|
||||
}
|
||||
_export(exports, {
|
||||
cleanup: function() {
|
||||
return cleanup;
|
||||
},
|
||||
default: function() {
|
||||
return _default;
|
||||
},
|
||||
resize: function() {
|
||||
return resize;
|
||||
}
|
||||
});
|
||||
let wasm;
|
||||
let cachegetUint8Memory0 = null;
|
||||
function getUint8Memory0() {
|
||||
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
||||
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetUint8Memory0;
|
||||
}
|
||||
let WASM_VECTOR_LEN = 0;
|
||||
function passArray8ToWasm0(arg, malloc) {
|
||||
const ptr = malloc(arg.length * 1);
|
||||
getUint8Memory0().set(arg, ptr / 1);
|
||||
WASM_VECTOR_LEN = arg.length;
|
||||
return ptr;
|
||||
}
|
||||
let cachegetInt32Memory0 = null;
|
||||
function getInt32Memory0() {
|
||||
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
||||
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetInt32Memory0;
|
||||
}
|
||||
let cachegetUint8ClampedMemory0 = null;
|
||||
function getUint8ClampedMemory0() {
|
||||
if (cachegetUint8ClampedMemory0 === null || cachegetUint8ClampedMemory0.buffer !== wasm.memory.buffer) {
|
||||
cachegetUint8ClampedMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetUint8ClampedMemory0;
|
||||
}
|
||||
function getClampedArrayU8FromWasm0(ptr, len) {
|
||||
return getUint8ClampedMemory0().subarray(ptr / 1, ptr / 1 + len);
|
||||
}
|
||||
function resize(input_image, input_width, input_height, output_width, output_height, typ_idx, premultiply, color_space_conversion) {
|
||||
try {
|
||||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
||||
var ptr0 = passArray8ToWasm0(input_image, wasm.__wbindgen_malloc);
|
||||
var len0 = WASM_VECTOR_LEN;
|
||||
wasm.resize(retptr, ptr0, len0, input_width, input_height, output_width, output_height, typ_idx, premultiply, color_space_conversion);
|
||||
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
||||
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
||||
var v1 = getClampedArrayU8FromWasm0(r0, r1).slice();
|
||||
wasm.__wbindgen_free(r0, r1 * 1);
|
||||
return v1;
|
||||
} finally{
|
||||
wasm.__wbindgen_add_to_stack_pointer(16);
|
||||
}
|
||||
}
|
||||
async function load(module1, imports) {
|
||||
if (typeof Response === "function" && module1 instanceof Response) {
|
||||
if (typeof WebAssembly.instantiateStreaming === "function") {
|
||||
return await WebAssembly.instantiateStreaming(module1, imports);
|
||||
}
|
||||
const bytes = await module1.arrayBuffer();
|
||||
return await WebAssembly.instantiate(bytes, imports);
|
||||
} else {
|
||||
const instance = await WebAssembly.instantiate(module1, imports);
|
||||
if (instance instanceof WebAssembly.Instance) {
|
||||
return {
|
||||
instance,
|
||||
module: module1
|
||||
};
|
||||
} else {
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
async function init(input) {
|
||||
const imports = {};
|
||||
if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
|
||||
input = fetch(input);
|
||||
}
|
||||
const { instance, module: module1 } = await load(await input, imports);
|
||||
wasm = instance.exports;
|
||||
init.__wbindgen_wasm_module = module1;
|
||||
return wasm;
|
||||
}
|
||||
const _default = init;
|
||||
function cleanup() {
|
||||
wasm = null;
|
||||
cachegetUint8Memory0 = null;
|
||||
cachegetInt32Memory0 = null;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=squoosh_resize.js.map
|
||||
1
node_modules/next/dist/server/lib/squoosh/resize/squoosh_resize.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/resize/squoosh_resize.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../../src/server/lib/squoosh/resize/squoosh_resize.js"],"names":["cleanup","resize","wasm","cachegetUint8Memory0","getUint8Memory0","buffer","memory","Uint8Array","WASM_VECTOR_LEN","passArray8ToWasm0","arg","malloc","ptr","length","set","cachegetInt32Memory0","getInt32Memory0","Int32Array","cachegetUint8ClampedMemory0","getUint8ClampedMemory0","Uint8ClampedArray","getClampedArrayU8FromWasm0","len","subarray","input_image","input_width","input_height","output_width","output_height","typ_idx","premultiply","color_space_conversion","retptr","__wbindgen_add_to_stack_pointer","ptr0","__wbindgen_malloc","len0","r0","r1","v1","slice","__wbindgen_free","load","module","imports","Response","WebAssembly","instantiateStreaming","bytes","arrayBuffer","instantiate","instance","Instance","init","input","Request","URL","fetch","exports","__wbindgen_wasm_module"],"mappings":";;;;;;;;;;;;;;;;IAuIgBA,OAAO;eAAPA;;IAHhB,OAAmB;eAAnB;;IA1EgBC,MAAM;eAANA;;;AA1DhB,IAAIC;AAEJ,IAAIC,uBAAuB;AAC3B,SAASC;IACP,IACED,yBAAyB,QACzBA,qBAAqBE,M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B,iBAAiB,CAACgB,SAAS,IAAI,EAAE;QAC1C,IAAIO,KAAKlB,2BAA2BgB,IAAIC,IAAIE,KAAK;QACjDtC,KAAKuC,eAAe,CAACJ,IAAIC,KAAK;QAC9B,OAAOC;IACT,SAAU;QACRrC,KAAK+B,+BAA+B,CAAC;IACvC;AACF;AAEA,eAAeS,KAAKC,OAAM,EAAEC,OAAO;IACjC,IAAI,OAAOC,aAAa,cAAcF,mBAAkBE,UAAU;QAChE,IAAI,OAAOC,YAAYC,oBAAoB,KAAK,YAAY;YAC1D,OAAO,MAAMD,YAAYC,oBAAoB,CAACJ,SAAQC;QACxD;QAEA,MAAMI,QAAQ,MAAML,QAAOM,WAAW;QACtC,OAAO,MAAMH,YAAYI,WAAW,CAACF,OAAOJ;IAC9C,OAAO;QACL,MAAMO,WAAW,MAAML,YAAYI,WAAW,CAACP,SAAQC;QAEvD,IAAIO,oBAAoBL,YAAYM,QAAQ,EAAE;YAC5C,OAAO;gBAAED;gBAAUR,QAAAA;YAAO;QAC5B,OAAO;YACL,OAAOQ;QACT;IACF;AACF;AAEA,eAAeE,KAAKC,KAAK;IACvB,MAAMV,UAAU,CAAC;IAEjB,IACE,OAAOU,UAAU,YAChB,OAAOC,YAAY,cAAcD,iBAAiBC,WAClD,OAAOC,QAAQ,cAAcF,iBAAiBE,KAC/C;QACAF,QAAQG,MAAMH;IAChB;IAEA,MAAM,EAAEH,QAAQ,EAAER,QAAAA,OAAM,EAAE,GAAG,MAAMD,KAAK,MAAMY,OAAOV;IAErD1C,OAAOiD,SAASO,OAAO;IACvBL,KAAKM,sBAAsB,GAAGhB;IAE9B,OAAOzC;AACT;MAEA,WAAemD;AAGR,SAASrD;IACdE,OAAO;IACPC,uBAAuB;IACvBY,uBAAuB;AACzB"}
|
||||
BIN
node_modules/next/dist/server/lib/squoosh/resize/squoosh_resize_bg.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/resize/squoosh_resize_bg.wasm
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/next/dist/server/lib/squoosh/rotate/rotate.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/rotate/rotate.wasm
generated
vendored
Normal file
Binary file not shown.
42
node_modules/next/dist/server/lib/squoosh/webp/webp_enc.d.ts
generated
vendored
Normal file
42
node_modules/next/dist/server/lib/squoosh/webp/webp_enc.d.ts
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
export interface EncodeOptions {
|
||||
quality: number
|
||||
target_size: number
|
||||
target_PSNR: number
|
||||
method: number
|
||||
sns_strength: number
|
||||
filter_strength: number
|
||||
filter_sharpness: number
|
||||
filter_type: number
|
||||
partitions: number
|
||||
segments: number
|
||||
pass: number
|
||||
show_compressed: number
|
||||
preprocessing: number
|
||||
autofilter: number
|
||||
partition_limit: number
|
||||
alpha_compression: number
|
||||
alpha_filtering: number
|
||||
alpha_quality: number
|
||||
lossless: number
|
||||
exact: number
|
||||
image_hint: number
|
||||
emulate_jpeg_size: number
|
||||
thread_level: number
|
||||
low_memory: number
|
||||
near_lossless: number
|
||||
use_delta_palette: number
|
||||
use_sharp_yuv: number
|
||||
}
|
||||
|
||||
export interface WebPModule extends EmscriptenWasm.Module {
|
||||
encode(
|
||||
data: BufferSource,
|
||||
width: number,
|
||||
height: number,
|
||||
options: EncodeOptions
|
||||
): Uint8Array
|
||||
}
|
||||
|
||||
declare var moduleFactory: EmscriptenWasm.ModuleFactory<WebPModule>
|
||||
|
||||
export default moduleFactory
|
||||
1394
node_modules/next/dist/server/lib/squoosh/webp/webp_node_dec.js
generated
vendored
Normal file
1394
node_modules/next/dist/server/lib/squoosh/webp/webp_node_dec.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/next/dist/server/lib/squoosh/webp/webp_node_dec.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/webp/webp_node_dec.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
node_modules/next/dist/server/lib/squoosh/webp/webp_node_dec.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/webp/webp_node_dec.wasm
generated
vendored
Normal file
Binary file not shown.
1542
node_modules/next/dist/server/lib/squoosh/webp/webp_node_enc.js
generated
vendored
Normal file
1542
node_modules/next/dist/server/lib/squoosh/webp/webp_node_enc.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/next/dist/server/lib/squoosh/webp/webp_node_enc.js.map
generated
vendored
Normal file
1
node_modules/next/dist/server/lib/squoosh/webp/webp_node_enc.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
node_modules/next/dist/server/lib/squoosh/webp/webp_node_enc.wasm
generated
vendored
Normal file
BIN
node_modules/next/dist/server/lib/squoosh/webp/webp_node_enc.wasm
generated
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user