import{toCanvas as l}from"./toCanvas-7_PhvHvY.js";import"./index-CgQG7qql.js";async function s(o,e){let n=e.type;if(n==="svg"){let t=decodeURIComponent(o.split(",")[1]);return new Blob([t],{type:"image/svg+xml"})}let a=await l(o,e);return new Promise(t=>a.toBlob(i=>t(i),`image/${n}`,e.quality))}export{s as toBlob};
