1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66],{797:function(t,e,a){a.r(e),a.d(e,{renderPlateToDataUrl:function(){return c}});let n=null,i="4.7.76";async function r(){return n||(n=(async()=>{let t=Function("u","return import(u)"),e=await t("https://esm.sh/pdfjs-dist@".concat(i));return e.GlobalWorkerOptions.workerSrc="https://cdn.jsdelivr.net/npm/pdfjs-dist@".concat(i,"/build/pdf.worker.min.mjs"),e})())}async function c(t){let e=await r(),a="/api/charts/plate-pdf?url=".concat(encodeURIComponent(t)),n=e.getDocument({url:a,disableAutoFetch:!1}),i=await n.promise,c=await i.getPage(1),o=c.getViewport({scale:1}),l=1800/Math.max(o.width,o.height),s=c.getViewport({scale:l}),h=document.createElement("canvas");h.width=Math.ceil(s.width),h.height=Math.ceil(s.height);let u=h.getContext("2d");if(!u)throw Error("2D canvas context unavailable");return u.fillStyle="#ffffff",u.fillRect(0,0,h.width,h.height),await c.render({canvasContext:u,viewport:s}).promise,h.toDataURL("image/png")}}}]);
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.