1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[386],{10386:(e,t,n)=>{n.r(t),n.d(t,{Document:()=>_,Outline:()=>U,Page:()=>ee,PasswordResponses:()=>y,Thumbnail:()=>et,pdfjs:()=>r,useDocumentContext:()=>V,useOutlineContext:()=>I,usePageContext:()=>W});var r=n(74376),o=n(98887),i=n(49711),a=n(71986),u=Object.prototype.hasOwnProperty;function l(e,t,n){for(n of e.keys())if(s(n,t))return n}function s(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&s(e[r],t[r]););return -1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((o=r)&&"object"==typeof o&&!(o=l(t,o))||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((o=r[0])&&"object"==typeof o&&!(o=l(t,o))||!s(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!n||"object"==typeof e){for(n in r=0,e)if(u.call(e,n)&&++r&&!u.call(t,n)||!(n in t)||!s(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}function c(e){let t=!1;return{promise:new Promise((n,r)=>{e.then(e=>!t&&n(e)).catch(e=>!t&&r(e))}),cancel(){t=!0}}}let f=["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onBlur","onInput","onInvalid","onReset","onSubmit","onLoad","onError","onKeyDown","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onChange","onToggle"];function d(e,t){let n={};for(let r of f){let o=e[r];o&&(t?n[r]=e=>o(e,t(r)):n[r]=o)}return n}function p(e,t){if(!e)throw Error("Invariant failed")}var g=n(71264);let h=(0,i.createContext)(null);class m{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(e){this.pdfDocument=e}setViewer(e){this.pdfViewer=e}setExternalLinkRel(e){this.externalLinkRel=e}setExternalLinkTarget(e){this.externalLinkTarget=e}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return p(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(e){p(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=e}get rotation(){return 0}set rotation(e){}goToDestination(e){return new Promise(t=>{p(this.pdfDocument,"PDF document not loaded."),p(e,"Destination is not specified."),"string"==typeof e?this.pdfDocument.getDestination(e).then(t):Array.isArray(e)?t(e):e.then(t)}).then(e=>{p(Array.isArray(e),`"${e}" is not a valid destination array.`);let t=e[0];new Promise(e=>{p(this.pdfDocument,"PDF document not loaded."),t instanceof Object?this.pdfDocument.getPageIndex(t).then(t=>{e(t)}).catch(()=>{p(!1,`"${t}" is not a valid page reference.`)}):"number"==typeof t?e(t):p(!1,`"${t}" is not a valid destination reference.`)}).then(t=>{let n=t+1;p(this.pdfViewer,"PDF viewer is not initialized."),p(n>=1&&n<=this.pagesCount,`"${n}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:e,pageIndex:t,pageNumber:n})})})}navigateTo(e){this.goToDestination(e)}goToPage(e){p(this.pdfViewer,"PDF viewer is not initialized."),p(e>=1&&e<=this.pagesCount,`"${e}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:e-1,pageNumber:e})}
1addLinkAttributes(e,t,n){e.href=t,e.rel=this.externalLinkRel||"noopener noreferrer nofollow",e.target=n?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}function E({children:e,type:t}){return(0,o.jsx)("div",{className:`react-pdf__message react-pdf__message--${t}`,children:e})}let y={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};function v(e,t){switch(t.type){case"RESOLVE":return{value:t.value,error:void 0};case"REJECT":return{value:!1,error:t.error};case"RESET":return{value:void 0,error:void 0};default:return e}}function w(){return(0,i.useReducer)(v,{value:void 0,error:void 0})}let b="undefined"!=typeof window,x=b&&"file:"===window.location.protocol;function S(e){return null!=e}function R(e){return"string"==typeof e&&/^data:/.test(e)}function T(e){p(R(e),"Invalid data URI.");let[t="",n=""]=e.split(",");return -1!==t.split(";").indexOf("base64")?atob(n):unescape(n)}let P="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function L(){g(!x,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${P}`)}function C(e){(null==e?void 0:e.cancel)&&e.cancel()}function D(e,t){return Object.defineProperty(e,"width",{get(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get(){return this.view[3]},configurable:!0}),e}let{PDFDataRangeTransport:A}=r,k=(e,t)=>{switch(t){case y.NEED_PASSWORD:e(prompt("Enter the password to open this PDF file."));break;case y.INCORRECT_PASSWORD:e(prompt("Invalid password. Please try again."))}};function j(e){return"object"==typeof e&&null!==e&&("data"in e||"range"in e||"url"in e)}let _=(0,i.forwardRef)(function(e,t){let{children:n,className:u,error:l="Failed to load PDF file.",externalLinkRel:f,externalLinkTarget:y,file:v,inputRef:x,imageResourcesPath:S,loading:P="Loading PDFâ¦",noData:D="No PDF file specified.",onItemClick:_,onLoadError:O,onLoadProgress:M,onLoadSuccess:N,onPassword:V=k,onSourceError:I,onSourceSuccess:F,options:U,renderMode:G,rotate:H,scale:W,...B}=e,[z,$]=w(),{value:J,error:q}=z,[K,Y]=w(),{value:Q,error:X}=K,Z=(0,i.useRef)(new m),ee=(0,i.useRef)([]),et=(0,i.useRef)(void 0),en=(0,i.useRef)(void 0);v&&v!==et.current&&j(v)&&(g(!s(v,et.current),'File prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.'),et.current=v),U&&U!==en.current&&(g(!s(U,en.current),'Options prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.'),en.current=U);let er=(0,i.useRef)({scrollPageIntoView:e=>{let{dest:t,pageNumber:n,pageIndex:r=n-1}=e;if(_){_({dest:t,pageIndex:r,pageNumber:n});return}let o=ee.current[r];if(o){o.scrollIntoView();return}g(!1,"An internal link leading to page ".concat(n," was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>."))}});(0,i.useImperativeHandle)(t,()=>({linkService:Z,pages:ee,viewer:er}),[]),(0,i.useEffect)(function(){$({type:"RESET"})},[v,$]);let eo=(0,i.useCallback)(async()=>{if(!v)return null;if("string"==typeof v)return R(v)?{data:T(v)}:(L(),{url:v});if(v instanceof A)return{range:v};if(v instanceof ArrayBuffer)return{data:v};if(b){if(p(b,"isBlob can only be used in a browser environment"),v instanceof Blob)return{data:await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>{if(!n.result)return t(Error("Error while reading a file."));e(n.result)},n.onerror=e=>{if(!e.target)return t(Error("Error while reading a file."));let{error:n}=e.target;if(!n)return t(Error("Error while reading a file."));switch(n.code){case n.NOT_FOUND_ERR:return t(Error("Error while reading a file: File not found."));case n.SECURITY_ERR:return t(Error("Error while reading a file: Security error."));case n.ABORT_ERR:return t(Error("Error while reading a file: Aborted."));default:return t(Error("Error while reading a file."))}},n.readAsArrayBuffer(v)})}}if(p("object"==typeof v,"Invalid parameter in file, need either Uint8Array, string or a parameter object"),p(j(v),"Invalid parameter object: need either .data, .range or .url"),"url"in v&&"string"==typeof v.url){if(R(v.url)){let{url:e,...t}=v;return{data:T(e),...t}}L()}return v},[v]);(0,i.useEffect)(()=>{let e=c(eo());return e.promise.then(e=>{$({type:"RESOLVE",value:e})}).catch(e=>{$({type:"REJECT",error:e})}),()=>{C(e)}},[eo,$]),(0,i.useEffect)(()=>
1{if(void 0!==J){if(!1===J){q&&(g(!1,q.toString()),I&&I(q));return}F&&F()}},[J]),(0,i.useEffect)(function(){Y({type:"RESET"})},[Y,J]),(0,i.useEffect)(function(){if(!J)return;let e=U?{...J,...U}:J,t=r.getDocument(e);M&&(t.onProgress=M),V&&(t.onPassword=V);let n=t.promise.then(e=>{Y({type:"RESOLVE",value:e})}).catch(e=>{t.destroyed||Y({type:"REJECT",error:e})});return()=>{n.finally(()=>t.destroy())}},[U,Y,J]),(0,i.useEffect)(()=>{if(void 0!==Q){if(!1===Q){X&&(g(!1,X.toString()),O&&O(X));return}Q&&(N&&N(Q),ee.current=Array(Q.numPages),Z.current.setDocument(Q))}},[Q]),(0,i.useEffect)(function(){Z.current.setViewer(er.current),Z.current.setExternalLinkRel(f),Z.current.setExternalLinkTarget(y)},[f,y]);let ei=(0,i.useCallback)((e,t)=>{ee.current[e]=t},[]),ea=(0,i.useCallback)(e=>{delete ee.current[e]},[]),eu=(0,i.useMemo)(()=>({imageResourcesPath:S,linkService:Z.current,onItemClick:_,pdf:Q,registerPage:ei,renderMode:G,rotate:H,scale:W,unregisterPage:ea}),[S,_,Q,ei,G,H,W,ea]),el=(0,i.useMemo)(()=>d(B,()=>Q),[B,Q]);return(0,o.jsx)("div",{className:(0,a.A)("react-pdf__Document",u),ref:x,...el,children:function(){if(!v)return(0,o.jsx)(E,{type:"no-data",children:"function"==typeof D?D():D});if(null==Q)return(0,o.jsx)(E,{type:"loading",children:"function"==typeof P?P():P});if(!1===Q)return(0,o.jsx)(E,{type:"error",children:"function"==typeof l?l():l});if(!(null==eu?void 0:eu.pdf))throw Error("pdf is undefined");let e="function"==typeof n?n(eu):n;return(0,o.jsx)(h.Provider,{value:eu,children:e})}()})}),O=(0,i.createContext)(null);class M{constructor({num:e,gen:t}){this.num=e,this.gen=t}toString(){let e=`${this.num}R`;return 0!==this.gen&&(e+=this.gen),e}}function N(e){let t=(0,i.useRef)(void 0),n=t.current;return void 0!==n?()=>n:()=>{let n=e();return t.current=n,n}}function V(){return(0,i.useContext)(h)}function I(){return(0,i.useContext)(O)}function F(e){let t=V(),n=I();p(n,"Unable to find Outline context.");let{item:r,linkService:i,onItemClick:a,pdf:u,...l}={...t,...n,...e};p(u,"Attempted to load an outline, but no document was specified. Wrap <Outline /> in a <Document /> or pass explicit `pdf` prop.");let s=N(()=>"string"==typeof r.dest?u.getDestination(r.dest):r.dest),c=N(async()=>{let e=await s();if(!e)throw Error("Destination not found.");let[t]=e;return u.getPageIndex(new M(t))}),f=N(async()=>await c()+1);return(0,o.jsxs)("li",{children:[(0,o.jsx)("a",{href:"#",onClick:function(e){e.preventDefault(),p(a||i,"Either onItemClick callback or linkService must be defined in order to navigate to an outline item."),a?Promise.all([s(),c(),f()]).then(([e,t,n])=>{a({dest:e,pageIndex:t,pageNumber:n})}):i&&i.goToDestination(r.dest)},children:r.title}),function(){if(!r.items||!r.items.length)return null;let{items:e}=r;return(0,o.jsx)("ul",{children:e.map((e,t)=>(0,o.jsx)(F,{item:e,pdf:u,...l},"string"==typeof e.dest?e.dest:t))})}()]})}function U(e){let{className:t,inputRef:n,onItemClick:r,onLoadError:u,onLoadSuccess:l,pdf:s,...f}={...V(),...e};p(s,"Attempted to load an outline, but no document was specified. Wrap <Outline /> in a <Document /> or pass explicit `pdf` prop.");let[h,m]=w(),{value:E,error:y}=h;(0,i.useEffect)(function(){m({type:"RESET"})},[m,s]),(0,i.useEffect)(function(){if(!s)return;let e=c(s.getOutline());return e.promise.then(e=>{m({type:"RESOLVE",value:e})}).catch(e=>{m({type:"REJECT",error:e})}),()=>C(e)},[m,s]),(0,i.useEffect)(()=>{if(void 0!==E){if(!1===E){y&&(g(!1,y.toString()),u&&u(y));return}void 0!==E&&!1!==E&&l&&l(E)}},[E]);let v=(0,i.useMemo)(()=>({onItemClick:r}),[r]),b=(0,i.useMemo)(()=>d(f,()=>E),[f,E]);return E?(0,o.jsx)("div",{className:(0,a.A)("react-pdf__Outline",t),ref:n,...b,children:(0,o.jsx)(O.Provider,{value:v,children:E?(0,o.jsx)("ul",{children:E.map((e,t)=>(0,o.jsx)(F,{item:e,pdf:s},"string"==typeof e.dest?e.dest:t))}):null})}):null}function G(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(Boolean);return n.length<=1?n[0]||null:function(e){for(var t=0;t<n.length;t++){var r=n[t];"function"==typeof r?r(e):r&&(r.current=e)}}}let H=(0,i.createContext)(null);function W(){return(0,i.useContext)(H)}function B(){let e=V(),t=W();p(t,"Unable to find Page context.");let{imageResourcesPath:n,linkService:u,onGetAnnotationsError:l,onGetAnnotationsSuccess:s,onRenderAnnotationLayerError:f,onRenderAnnotationLayerSuccess:d,page:h,pdf:m,renderForms:E,rotate:y,scale:v=1}={...e,...t};p(m,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),p(h,"Attempted to load page annotations, but no page was specified."),p(u,"Attempted to load page annotations, but no linkService was specified.");let[b,x]=w(),{value:S,error:R}=b,T=(0,i.useRef)(null);g(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10),"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations"),(0,i.useEffect)(function(){x({type:"RESET"})},[x,h]),(0,i.useEffect)(function(){if(!h)return;let e=c(h.getAnnotations());return e.promise.then(e=>{x({type:"RESOLVE",value:e})}).catch(e=>{x({type:"REJECT",error:e})}),()=>{C(e)}},[x,h]),(0,i.useEffect)(()=>
1{if(void 0!==S){if(!1===S){R&&(g(!1,R.toString()),l&&l(R));return}S&&s&&s(S)}},[S]);let P=(0,i.useMemo)(()=>h.getViewport({scale:v,rotation:y}),[h,y,v]);return(0,i.useEffect)(function(){if(!m||!h||!u||!S)return;let{current:e}=T;if(!e)return;let t=P.clone({dontFlip:!0}),o={annotations:S,annotationStorage:m.annotationStorage,div:e,imageResourcesPath:n,linkService:u,page:h,renderForms:E,viewport:t};e.innerHTML="";try{new r.AnnotationLayer({accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:e,l10n:null,page:h,structTreeLayer:null,viewport:t}).render(o),d&&d()}catch(e){g(!1,"".concat(e)),f&&f(e)}return()=>{}},[S,n,u,h,m,E,P]),(0,o.jsx)("div",{className:(0,a.A)("react-pdf__Page__annotations","annotationLayer"),ref:T})}let z={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},$=/^H(\d+)$/;function J(e){return"children"in e}function q(e){return!!J(e)&&1===e.children.length&&0 in e.children&&"id"in e.children[0]}function K({className:e,node:t}){let n=(0,i.useMemo)(()=>t?{...function(e){let t={};if(J(e)){let{role:n}=e,r=n.match($);if(r)t.role="heading",t["aria-level"]=Number(r[1]);else if(n in z){let e=z[n];e&&(t.role=e)}}return t}(t),...function e(t){let n={};if(J(t)){if(void 0!==t.alt&&(n["aria-label"]=t.alt),void 0!==t.lang&&(n.lang=t.lang),q(t)){let[r]=t.children;if(r){let t=e(r);return{...n,...t}}}}else"id"in t&&(n["aria-owns"]=t.id);return n}(t)}:null,[t]),r=(0,i.useMemo)(()=>!J(t)||q(t)?null:t.children.map((e,t)=>(0,o.jsx)(K,{node:e},t)),[t]);return(0,o.jsx)("span",{className:e,...n,children:r})}function Y(){let e=W();p(e,"Unable to find Page context.");let{onGetStructTreeError:t,onGetStructTreeSuccess:n}=e,[r,a]=w(),{value:u,error:l}=r,{customTextRenderer:s,page:f}=e;return((0,i.useEffect)(function(){a({type:"RESET"})},[a,f]),(0,i.useEffect)(function(){if(s||!f)return;let e=c(f.getStructTree());return e.promise.then(e=>{a({type:"RESOLVE",value:e})}).catch(e=>{a({type:"REJECT",error:e})}),()=>C(e)},[s,f,a]),(0,i.useEffect)(()=>{if(void 0!==u){if(!1===u){l&&(g(!1,l.toString()),t&&t(l));return}u&&n&&n(u)}},[u]),u)?(0,o.jsx)(K,{className:"react-pdf__Page__structTree structTree",node:u}):null}let Q=r.AnnotationMode;function X(e){let t=W();p(t,"Unable to find Page context.");let{_className:n,canvasBackground:r,devicePixelRatio:a=b&&window.devicePixelRatio||1,onRenderError:u,onRenderSuccess:l,page:s,renderForms:c,renderTextLayer:f,rotate:d,scale:h}={...t,...e},{canvasRef:m}=e;p(s,"Attempted to render page canvas, but no page was specified.");let E=(0,i.useRef)(null);function y(e){"RenderingCancelledException"!==e.name&&(g(!1,e.toString()),u&&u(e))}let v=(0,i.useMemo)(()=>s.getViewport({scale:h*a,rotation:d}),[a,s,d,h]),w=(0,i.useMemo)(()=>s.getViewport({scale:h,rotation:d}),[s,d,h]);(0,i.useEffect)(function(){if(!s)return;s.cleanup();let{current:e}=E;if(!e)return;e.width=v.width,e.height=v.height,e.style.width="".concat(Math.floor(w.width),"px"),e.style.height="".concat(Math.floor(w.height),"px"),e.style.visibility="hidden";let t={annotationMode:c?Q.ENABLE_FORMS:Q.ENABLE,canvasContext:e.getContext("2d",{alpha:!1}),viewport:v};r&&(t.background=r);let n=s.render(t);return n.promise.then(()=>{e.style.visibility="",s&&l&&l(D(s,h))}).catch(y),()=>C(n)},[r,s,c,v,w]);let x=(0,i.useCallback)(()=>{let{current:e}=E;e&&(e.width=0,e.height=0)},[]);return(0,i.useEffect)(()=>x,[x]),(0,o.jsx)("canvas",{className:"".concat(n,"__canvas"),dir:"ltr",ref:G(m,E),style:{display:"block",userSelect:"none"},children:f?(0,o.jsx)(Y,{}):null})}function Z(){let e=W();p(e,"Unable to find Page context.");let{customTextRenderer:t,onGetTextError:n,onGetTextSuccess:u,onRenderTextLayerError:l,onRenderTextLayerSuccess:s,page:f,pageIndex:d,pageNumber:h,rotate:m,scale:E}=e;p(f,"Attempted to load page text content, but no page was specified.");let[y,v]=w(),{value:b,error:x}=y,S=(0,i.useRef)(null);g(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10),"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer"),(0,i.useEffect)(function(){v({type:"RESET"})},[f,v]),(0,i.useEffect)(function(){if(!f)return;let e=c(f.getTextContent());return e.promise.then(e=>{v({type:"RESOLVE",value:e})}).catch(e=>{v({type:"REJECT",error:e})}),()=>C(e)},[f,v]),(0,i.useEffect)(()=>
1{if(void 0!==b){if(!1===b){x&&(g(!1,x.toString()),n&&n(x));return}b&&u&&u(b)}},[b]);let R=(0,i.useCallback)(()=>{s&&s()},[s]),T=(0,i.useCallback)(e=>{g(!1,e.toString()),l&&l(e)},[l]),P=(0,i.useMemo)(()=>f.getViewport({scale:E,rotation:m}),[f,m,E]);return(0,i.useLayoutEffect)(function(){if(!f||!b)return;let{current:e}=S;if(!e)return;e.innerHTML="";let n=f.streamTextContent({includeMarkedContent:!0}),o=new r.TextLayer({container:e,textContentSource:n,viewport:P});return o.render().then(()=>{let n=document.createElement("div");n.className="endOfContent",e.append(n);let r=e.querySelectorAll('[role="presentation"]');if(t){let e=0;b.items.forEach((n,o)=>{if(!("str"in n))return;let i=r[e];i&&(i.innerHTML=t({pageIndex:d,pageNumber:h,itemIndex:o,...n}),e+=n.str&&n.hasEOL?2:1)})}R()}).catch(T),()=>C(o)},[t,T,R,f,d,h,b,P]),(0,o.jsx)("div",{className:(0,a.A)("react-pdf__Page__textContent","textLayer"),onMouseUp:function(){let e=S.current;e&&e.classList.remove("selecting")},onMouseDown:function(){let e=S.current;e&&e.classList.add("selecting")},ref:S})}function ee(e){let{_className:t="react-pdf__Page",_enableRegisterUnregisterPage:n=!0,canvasBackground:r,canvasRef:u,children:l,className:s,customRenderer:f,customTextRenderer:h,devicePixelRatio:m,error:y="Failed to load the page.",height:v,inputRef:b,loading:x="Loading pageâ¦",noData:R="No page specified.",onGetAnnotationsError:T,onGetAnnotationsSuccess:P,onGetStructTreeError:L,onGetStructTreeSuccess:A,onGetTextError:k,onGetTextSuccess:j,onLoadError:_,onLoadSuccess:O,onRenderAnnotationLayerError:M,onRenderAnnotationLayerSuccess:N,onRenderError:I,onRenderSuccess:F,onRenderTextLayerError:U,onRenderTextLayerSuccess:W,pageIndex:z,pageNumber:$,pdf:J,registerPage:q,renderAnnotationLayer:K=!0,renderForms:Y=!1,renderMode:Q="canvas",renderTextLayer:ee=!0,rotate:et,scale:en=1,unregisterPage:er,width:eo,...ei}={...V(),...e},[ea,eu]=w(),{value:el,error:es}=ea,ec=(0,i.useRef)(null);p(J,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");let ef=S($)?$-1:null!=z?z:null,ed=null!=$?$:S(z)?z+1:null,ep=null!=et?et:el?el.rotate:null,eg=(0,i.useMemo)(()=>{if(!el)return null;let e=1,t=null!=en?en:1;if(eo||v){let t=el.getViewport({scale:1,rotation:ep});eo?e=eo/t.width:v&&(e=v/t.height)}return t*e},[v,el,ep,en,eo]);(0,i.useEffect)(function(){return()=>{S(ef)&&n&&er&&er(ef)}},[n,J,ef,er]),(0,i.useEffect)(function(){eu({type:"RESET"})},[eu,J,ef]),(0,i.useEffect)(function(){if(!J||!ed)return;let e=c(J.getPage(ed));return e.promise.then(e=>{eu({type:"RESOLVE",value:e})}).catch(e=>{eu({type:"REJECT",error:e})}),()=>C(e)},[eu,J,ed]),(0,i.useEffect)(()=>{if(void 0!==el){if(!1===el){es&&(g(!1,es.toString()),_&&_(es));return}!function(){if(O){if(!el||!eg)return;O(D(el,eg))}if(n&&q){if(!S(ef)||!ec.current)return;q(ef,ec.current)}}()}},[el,eg]);let eh=(0,i.useMemo)(()=>S(ef)&&ed&&S(ep)&&S(eg)?{_className:t,canvasBackground:r,customTextRenderer:h,devicePixelRatio:m,onGetAnnotationsError:T,onGetAnnotationsSuccess:P,onGetStructTreeError:L,onGetStructTreeSuccess:A,onGetTextError:k,onGetTextSuccess:j,onRenderAnnotationLayerError:M,onRenderAnnotationLayerSuccess:N,onRenderError:I,onRenderSuccess:F,onRenderTextLayerError:U,onRenderTextLayerSuccess:W,page:el,pageIndex:ef,pageNumber:ed,renderForms:Y,renderTextLayer:ee,rotate:ep,scale:eg}:null,[t,r,h,m,T,P,L,A,k,j,M,N,I,F,U,W,el,ef,ed,Y,ee,ep,eg]),em=(0,i.useMemo)(()=>d(ei,()=>el?eg?D(el,eg):void 0:el),[ei,el,eg]),eE="".concat(ef,"@").concat(eg,"/").concat(ep);return(0,o.jsx)("div",{className:(0,a.A)(t,s),"data-page-number":ed,ref:G(b,ec),style:{"--scale-round-x":"1px","--scale-round-y":"1px","--scale-factor":"1","--user-unit":"".concat(eg),"--total-scale-factor":"calc(var(--scale-factor) * var(--user-unit))",backgroundColor:r||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"},...em,children:function(){if(!ed)return(0,o.jsx)(E,{type:"no-data",children:"function"==typeof R?R():R});if(null===J||null==el)return(0,o.jsx)(E,{type:"loading",children:"function"==typeof x?x():x});if(!1===J||!1===el)return(0,o.jsx)(E,{type:"error",children:"function"==typeof y?y():y});if(!(null==eh?void 0:eh.page))throw Error("page is undefined");let e="function"==typeof l?l(eh):l;return(0,o.jsxs)(H.Provider,{value:eh,children:[function(){switch(Q){case"custom"
1:return p(f,'renderMode was set to "custom", but no customRenderer was passed.'),(0,o.jsx)(f,{},"".concat(eE,"_custom"));case"none":return null;default:return(0,o.jsx)(X,{canvasRef:u},"".concat(eE,"_canvas"))}}(),ee?(0,o.jsx)(Z,{},"".concat(eE,"_text")):null,K?(0,o.jsx)(B,{},"".concat(eE,"_annotations")):null,e]})}()})}function et(e){let{className:t,linkService:n,onItemClick:r,pageIndex:i,pageNumber:u,pdf:l}={...V(),...e};p(l,"Attempted to load a thumbnail, but no document was specified. Wrap <Thumbnail /> in a <Document /> or pass explicit `pdf` prop.");let s=S(u)?u-1:null!=i?i:null,c=null!=u?u:S(i)?i+1:null,{className:f,onItemClick:d,...g}=e;return(0,o.jsx)("a",{className:(0,a.A)("react-pdf__Thumbnail",t),href:c?"#":void 0,onClick:function(e){e.preventDefault(),S(s)&&c&&(p(r||n,"Either onItemClick callback or linkService must be defined in order to navigate to an outline item."),r?r({pageIndex:s,pageNumber:c}):n&&n.goToPage(c))},children:(0,o.jsx)(ee,{...g,_className:"react-pdf__Thumbnail__page",_enableRegisterUnregisterPage:!1,renderAnnotationLayer:!1,renderTextLayer:!1})})}g(!x,`Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ${P}`),r.GlobalWorkerOptions.workerSrc="pdf.worker.mjs"},71264:e=>{e.exports=function(){}}}]);
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.