import{s as u}from"./index-CWvpOmY5.js";const 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 l(e,i,t={}){let n;return i&&(n=(r,a)=>{const o=new WebAssembly.Instance(i,r);return a(o),o.exports}),e({noInitialRun:!0,instantiateWasm:n,...t})}let s;async function p(e,i){let t=e,n=i;if(arguments.length===1&&!(e instanceof WebAssembly.Module)&&(t=void 0,n=e),await u()){const a=await import("./webp_enc_simd-D5IXDjAy.js");return s=l(a.default,t,n),s}const r=await import("./webp_enc-DIy7VB-T.js");return s=l(r.default,t,n),s}async function f(e,i={}){s||(s=p());const t={...c,...i},r=(await s).encode(e.data,e.width,e.height,t);if(!r)throw new Error("Encoding error.");return r.buffer}export{f as encode};
