function s(o){const a=o.split(","),r=a[0].match(/:(.*?);/)[1],t=atob(a[1]);let n=t.length;const e=new Uint8Array(n);for(;n--;)e[n]=t.charCodeAt(n);return new Blob([e],{type:r})}function m(o,a){return new Promise((c,r)=>{let t=document.createElement("CANVAS");const n=t.getContext("2d"),e=new Image;e.crossOrigin="",e.onload=function(){if(!t||!n)return r();t.height=e.height,t.width=e.width,n.drawImage(e,0,0);const i=t.toDataURL("image/png");t=null,c(i)},e.src=o})}export{s as d,m as u};
