1"use strict";(self.webpackChunkedafter=self.webpackChunkedafter||[]).push([[2186],{23023:(e,t,o)=>{o.r(t),o.d(t,{default:()=>r});var n=o(67294);o(57697);function i(e){let{pdf:t,pageIndex:o,rectangles:i,onAddRectangle:r,rectColor:a}=e;const l=(0,n.useRef)(null),s=(0,n.useRef)(null),[c,d]=(0,n.useState)(1),[u,p]=(0,n.useState)(0),[h,g]=(0,n.useState)(!1),[f,_]=(0,n.useState)({x:0,y:0}),[m,b]=(0,n.useState)(null);(0,n.useEffect)((()=>{let e=!0;return async function(){if(t&&l.current)try{const n=await t.getPage(o+1);let i=1;const r=n.getViewport({scale:1});if(s.current){const e=s.current.clientWidth;e>0&&(i=e/r.width,i>1.5&&(i=1.5))}const a=n.getViewport({scale:i});e&&(d(i),p(a.height));const c=l.current,u=c.getContext("2d");c.height=a.height,c.width=a.width,await n.render({canvasContext:u,viewport:a}).promise}catch(n){console.error("Failed to render page",n)}}(),()=>{e=!1}}),[t,o]);const x=()=>{if(h){if(g(!1),m&&m.width>5&&m.height>5){const e=m.x/c,t=m.width/c,n=m.height/c,i=m.y+m.height;r({pageIndex:o,x:e,y:(u-i)/c,width:t,height:n})}b(null)}};return n.createElement("div",{style:{position:"relative",border:"1px solid #ccc",marginBottom:"16px",background:"#fff",display:"inline-block",maxWidth:"100%",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},ref:s},n.createElement("div",{style:{position:"absolute",top:"-24px",left:"0",fontSize:"12px",color:"#666"}},"Page ",o+1),n.createElement("canvas",{ref:l,style:{display:"block",maxWidth:"100%"}}),n.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,cursor:"crosshair"},onMouseDown:e=>{const t=s.current.getBoundingClientRect(),o=e.clientX-t.left,n=e.clientY-t.top;g(!0),_({x:o,y:n}),b({x:o,y:n,width:0,height:0})},onMouseMove:e=>{if(!h)return;const t=s.current.getBoundingClientRect(),o=e.clientX-t.left,n=e.clientY-t.top;b({x:Math.min(o,f.x),y:Math.min(n,f.y),width:Math.abs(o-f.x),height:Math.abs(n-f.y)})},onMouseUp:x,onMouseLeave:x},i.filter((e=>e.pageIndex===o)).map(((e,t)=>{const o=e.width*c,i=e.height*c,r=e.x*c,l=u-e.y*c-i;return n.createElement("div",{key:t,style:{position:"absolute",left:r,top:l,width:o,height:i,backgroundColor:a,pointerEvents:"none"}})})),m&&n.createElement("div",{style:{position:"absolute",left:m.x,top:m.y,width:m.width,height:m.height,backgroundColor:a,border:"1px solid #000",pointerEvents:"none"}})))}function r(e){let{file:t=null,rectangles:r=[],onAddRectangle:a=(()=>{}),rectColor:l="rgba(255, 255, 0, 0.4)"}=e;
1const[s,c]=(0,n.useState)(null),[d,u]=(0,n.useState)(0);return(0,n.useEffect)((()=>{let e=!0;return async function(){if(t)try{const n=await t.arrayBuffer(),i=await o.e(8541).then(o.bind(o,28541));i.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${i.version}/build/pdf.worker.min.mjs`;const r=i.getDocument({data:n}),a=await r.promise;e&&(c(a),u(a.numPages))}catch(n){console.error("Failed to load PDF",n)}}(),()=>{e=!1}}),[t]),s?n.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",maxHeight:"80vh",overflowY:"auto",padding:"32px 16px",background:"#e0e0e0",borderRadius:"8px"}},Array.from({length:d}).map(((e,t)=>n.createElement(i,{key:t,pdf:s,pageIndex:t,rectangles:r,onAddRectangle:a,rectColor:l})))):n.createElement("div",null,"Loading PDF preview...")}},57697:(e,t,o)=>{o.d(t,{Z:()=>n});const n={container:"container_bqtv",shell:"shell_drcu",heroSection:"heroSection_XYO5",toolsGrid:"toolsGrid_J9kP",toolCard:"toolCard_B_iF",toolIcon:"toolIcon_c4l0",header:"header_L3_2",brand:"brand_Pz5q",title:"title_ki16",grid:"grid_KLyR",panel:"panel_vz3P",inputGroup:"inputGroup_ApdR",controlRow:"controlRow_zGje",primaryButton:"primaryButton_LKJN",secondaryButton:"secondaryButton__jdH",fileInputContainer:"fileInputContainer_G09m",dropzone:"dropzone_5W5j",dropzoneIcon:"dropzoneIcon_RoJZ",dropzoneText:"dropzoneText_p3eQ",dropzoneSubtext:"dropzoneSubtext_EYH8",fileList:"fileList_OjQB",fileRow:"fileRow_R0OO",fileInfo:"fileInfo_FtSl",fileName:"fileName_bPU3",fileMeta:"fileMeta__8PF",fileActions:"fileActions_zBso",iconButton:"iconButton_ympQ",danger:"danger__Hhc",resultPanel:"resultPanel_qnkf",slideUp:"slideUp_FRBc",resultHeader:"resultHeader_SXKG",resultActions:"resultActions_bEEm",continueWith:"continueWith_rVr5",continueGrid:"continueGrid_zjGM",continueTool:"continueTool_MXns",statusMessage:"statusMessage_hf9V",statusError:"statusError_Thf8",small:"small_pXaK",pageList:"pageList_FWuQ",pageItem:"pageItem_Gafq",pageNumber:"pageNumber_eCTg",pageLabel:"pageLabel_i8cf",pageActions:"pageActions_WwSo",redactWarning:"redactWarning_u1kZ",positionGrid:"positionGrid_mpbH",positionCell:"positionCell_QpXr",active:"active_hm69"}}}]);
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.