1function _(o){return o.size<=10485760}async function I(o,i={}){const{maxDimension:a=1200,quality:l=.7,maxOutputSizeKB:g=1024}=i;return new Promise((d,s)=>{const r=new Image;r.onload=()=>{try{const n=document.createElement("canvas");let{width:t,height:e}=r;(t>a||e>a)&&(t>e?(e=Math.round(e*a/t),t=a):(t=Math.round(t*a/e),e=a)),n.width=t,n.height=e;const m=n.getContext("2d");if(!m){s(new Error("Could not get canvas context"));return}m.drawImage(r,0,0,t,e);let c=n.toDataURL("image/jpeg",l);const E=g*1024;let u=l;for(;h(c)>E&&u>.1;)u-=.1,c=n.toDataURL("image/jpeg",u);d(c)}catch(n){s(n)}},r.onerror=()=>s(new Error("Failed to load image for compression")),r.src=o})}function h(o){const i=o.split(",")[1]||"";return Math.round(i.length*3/4)}export{I as c,_ as v};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.