/*! ImReso: Unlimited Target-Size Image Compressor — plugin code (c) ImageResizer.cc, GPLv2 or later. Bundled third-party code keeps its own licence: see licenses/ and readme.txt. */
import{a as p}from"./chunk-QZY7QCEA.js";import"./chunk-HWGPDIIB.js";var c={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};function a(e,s,t={}){let n;return s&&(n=(o,r)=>{let l=new WebAssembly.Instance(s,o);return r(l),l.exports}),e({noInitialRun:!0,instantiateWasm:n,...t})}var i;async function u(e,s){let t=e,n=s;if(arguments.length===1&&!(e instanceof WebAssembly.Module)&&(t=void 0,n=e),await p()){let r=await import("./webp_enc_simd-N4MBPTYF.js");return i=a(r.default,t,n),i}let o=await import("./webp_enc-GRSZBXYD.js");return i=a(o.default,t,n),i}async function m(e,s={}){i||(i=u());let t={...c,...s},o=(await i).encode(e.data,e.width,e.height,t);if(!o)throw new Error("Encoding error.");return o.buffer}export{m as default,u as init};
