1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7372],{63252:function(module,__unused_webpack_exports,__webpack_require__){var process=__webpack_require__(37811),Buffer=__webpack_require__(8914).hp;!function(e,t){module.exports=t()}(0,function(){return(()=>{"use strict";var __webpack_modules__=[,(e,t,r)=>{let s;Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=f,t.deprecated=x,t.getFilenameFromUrl=b,t.getPdfFilenameFromUrl=_,t.isDataScheme=m,t.isFetchSupported=S,t.isPdfFile=A,t.isValidFetchUrl=v,t.loadScript=C,t.StatTimer=t.RenderingCancelledException=t.PDFDateString=t.PageViewport=t.LinkTarget=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.BaseCMapReaderFactory=t.BaseCanvasFactory=void 0;var i=r(2);let n="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=n;let a="http://www.w3.org/2000/svg";class o{constructor(){this.constructor===o&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){(0,i.unreachable)("Abstract method `create` called.")}reset(e,t,r){if(!e.canvas)throw Error("Canvas is not specified");if(t<=0||r<=0)throw Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}destroy(e){if(!e.canvas)throw Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}}t.BaseCanvasFactory=o;class l extends o{constructor({ownerDocument:e=globalThis.document}={}){super(),this._document=e}create(e,t){if(e<=0||t<=0)throw Error("Invalid canvas size");let r=this._document.createElement("canvas"),s=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:s}}}t.DOMCanvasFactory=l;class h{constructor({baseUrl:e=null,isCompressed:t=!1}){this.constructor===h&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw Error("CMap name must be specified.");let t=this.baseUrl+e+(this.isCompressed?".bcmap":""),r=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE;return this._fetchData(t,r).catch(e=>{throw Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)})}_fetchData(e,t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=h;class c extends h{_fetchData(e,t){return S()&&v(e,document.baseURI)?fetch(e).then(async e=>{let r;if(!e.ok)throw Error(e.statusText);return{cMapData:r=this.isCompressed?new Uint8Array(await e.arrayBuffer()):(0,i.stringToBytes)(await e.text()),compressionType:t}}):new Promise((r,s)=>{let n=new XMLHttpRequest;n.open("GET",e,!0),this.isCompressed&&(n.responseType="arraybuffer"),n.onreadystatechange=()=>{if(n.readyState===XMLHttpRequest.DONE){if(200===n.status||0===n.status){let e;if(this.isCompressed&&n.response?e=new Uint8Array(n.response):!this.isCompressed&&n.responseText&&(e=(0,i.stringToBytes)(n.responseText)),e)return void r({cMapData:e,compressionType:t})}s(Error(n.statusText))}},n.send(null)})}}t.DOMCMapReaderFactory=c;class d{create(e,t){(0,i.assert)(e>0&&t>0,"Invalid SVG dimensions");let r=document.createElementNS(a,"svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width",e+"px"),r.setAttribute("height",t+"px"),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 "+e+" "+t),r}createElement(e){return(0,i.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(a,e)}}t.DOMSVGFactory=d;class u{constructor({viewBox:e,scale:t,rotation:r,offsetX:s=0,offsetY:i=0,dontFlip:n=!1}){let a,o,l,h,c,d,u,p;this.viewBox=e,this.scale=t,this.rotation=r,this.offsetX=s,this.offsetY=i;let g=(e[2]+e[0])/2,f=(e[3]+e[1])/2;switch((r%=360)<0&&(r+=360),r){case 180:a=-1,o=0,l=0,h=1;break;case 90:a=0,o=1,l=1,h=0;break;case 270:a=0,o=-1,l=-1,h=0;break;case 0:a=1,o=0,l=0,h=-1;break;default:throw Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}n&&(l=-l,h=-h),0===a?(c=Math.abs(f-e[1])*t+s,d=Math.abs(g-e[0])*t+i,u=Math.abs(e[3]-e[1])*t,p=Math.abs(e[2]-e[0])*t):(c=Math.abs(g-e[0])*t+s,d=Math.abs(f-e[1])*t+i,u=Math.abs(e[2]-e[0])*t,p=Math.abs(e[3]-e[1])*t),this.transform=[a*t,o*t,l*t,h*t,c-a*t*g-l*t*f,d-o*t*g-h*t*f],this.width=u,this.height=p}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:r=this.offsetX,offsetY:s=this.offsetY,dontFlip:i=!1}={}){return new u({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:r,offsetY:s,dontFlip:i})}convertToViewportPoint(e,t){return i.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){let t=i.Util.applyTransform([e[0],e[1]],this.transform),r=i.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}convertToPdfPoint(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=u;class p extends i.BaseException{constructor(e,t){super(e),this.type=t}}t.RenderingCancelledException=p;let g={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function f(e,{url:t,target:r,rel:s,enabled:a=!0}={}){(0,i.assert)(t&&"string"==typeof t,'addLinkAttributes: A valid "url" parameter must provided.');let o=(0,i.removeNullCharacters)(t);a?e.href=e.title=o:(e.href="",e.title=`Disabled: ${o}`,e.onclick=()=>!1);let l="";switch(r){case g.NONE:break;case g.SELF:l="_self";break;case g.BLANK:l="_blank";break;case g.PARENT:l="_parent";break;case g.TOP:l="_top"}e.target=l,e.rel="string"==typeof s?s:n}function m(e){let t=e.length,r=0;for(;r<t&&""===e[r].trim();)r++;return"data:"===e.substring(r,r+5).toLowerCase()}function A(e){return"string"==typeof e&&/\.pdf$/i.test(e)}function b(e){let t=e.indexOf("#"),r=e.indexOf("?"),s=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",s)+1,s)}function _(e,t="document.pdf"){if("string"!=typeof e)return t;if(m(e))return(0,i.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;let r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,s=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e),n=r.exec(s[1])||r.exec(s[2])||r.exec(s[3]);if(n&&(n=n[0]).includes("%"))try{n=r.exec(decodeURIComponent(n))[0]}catch(e){}return n||t}t.LinkTarget=g;class y{constructor(){this.started=Object.create(null),this.times=[]}time(e){e in this.started&&(0,i.warn)(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,i.warn)(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){let e=[],t=0;for(let e of this.times){let r=e.name;r.length>t&&(t=r.length)}for(let r of this.times){let s=r.end-r.start;e.push(`${r.name.padEnd(t)} ${s}ms 2`)}return e.join("")}}function S(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function v(e,t){try{let{protocol:r}=t?new URL(e,t):new URL(e);return"http:"===r||"https:"===r}catch(e){return!1}}function C(e,t=!1){return new Promise((r,s)=>{let i=document.createElement("script");i.src=e,i.onload=function(e){t&&i.remove(),r(e)},i.onerror=function(){s(Error(`Cannot load script at: ${i.src}`))},(document.head||document.documentElement).appendChild(i)})}function x(e){console.log("Deprecated API usage: "+e)}t.StatTimer=y;class P{static toDateObject(e){if(!e||!(0,i.isString)(e))return null;s||(s=RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));let t=s.exec(e);if(!t)return null;let r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;let a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;let o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;let l=parseInt(t[5],10);l=l>=0&&l<=59?l:0;let h=parseInt(t[6],10);h=h>=0&&h<=59?h:0;let c=t[7]||"Z",d=parseInt(t[8],10);d=d>=0&&d<=23?d:0;let u=parseInt(t[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===c?(o+=d,l+=u):"+"===c&&(o-=d,l-=u),new Date(Date.UTC(r,n,a,o,l,h))}}t.PDFDateString=P},(e,t,r)=>
2{Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=T,t.arraysToBytes=k,t.assert=c,t.bytesToString=P,t.createObjectURL=K,t.createPromiseCapability=Y,t.createValidAbsoluteUrl=p,t.escapeString=U,t.getModificationDate=X,t.getVerbosityLevel=a,t.info=o,t.isArrayBuffer=z,t.isArrayEqual=$,t.isAscii=j,t.isBool=W,t.isNum=H,t.isSameOrigin=d,t.isString=V,t.objectFromMap=F,t.objectSize=w,t.removeNullCharacters=x,t.setVerbosityLevel=n,t.shadow=g,t.string32=E,t.stringToBytes=R,t.stringToPDFString=N,t.stringToUTF16BEString=B,t.stringToUTF8String=G,t.unreachable=h,t.utf8StringToString=q,t.warn=l,t.VerbosityLevel=t.Util=t.UNSUPPORTED_FEATURES=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,r(3),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:0x1000000,RICHTEXT:0x2000000,RADIOSINUNISON:0x2000000,COMMITONSELCHANGE:0x4000000},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};let s={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=s,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let i=s.WARNINGS;function n(e){Number.isInteger(e)&&(i=e)}function a(){return i}function o(e){i>=s.INFOS&&console.log(`Info: ${e}`)}function l(e){i>=s.WARNINGS&&console.log(`Warning: ${e}`)}function h(e){throw Error(e)}function c(e,t){e||h(t)}function d(e,t){let r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}let s=new URL(t,r);return r.origin===s.origin}function u(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function p(e,t){if(!e)return null;try{let r=t?new URL(e,t):new URL(e);if(u(r))return r}catch(e){}return null}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}let f=function(){function e(t){this.constructor===e&&h("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=Error(),e.constructor=e,e}();t.BaseException=f;class m extends f{constructor(e,t){super(e),this.code=t}}t.PasswordException=m;class A extends f{constructor(e,t){super(e),this.details=t}}t.UnknownErrorException=A;class b extends f{}t.InvalidPDFException=b;class _ extends f{}t.MissingPDFException=_;class y extends f{constructor(e,t){super(e),this.status=t}}t.UnexpectedResponseException=y;class S extends f{}t.FormatError=S;class v extends f{}t.AbortException=v;let C=/\x00/g;function x(e){return"string"!=typeof e?(l("The argument for removeNullCharacters must be a string."),e):e.replace(C,"")}function P(e){c(null!==e&&"object"==typeof e&&void 0!==e.length,"Invalid argument for bytesToString");let t=e.length,r=8192;if(t<8192)return String.fromCharCode.apply(null,e);let s=[];for(let i=0;i<t;i+=r){let n=Math.min(i+r,t),a=e.subarray(i,n);s.push(String.fromCharCode.apply(null,a))}return s.join("")}function R(e){c("string"==typeof e,"Invalid argument for stringToBytes");let t=e.length,r=new Uint8Array(t);for(let s=0;s<t;++s)r[s]=255&e.charCodeAt(s);return r}function T(e){return void 0!==e.length?e.length:(c(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}function k(e){let t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let r=0;for(let s=0;s<t;s++)r+=T(e[s]);let s=0,i=new Uint8Array(r);for(let r=0;r<t;r++){let t=e[r];t instanceof Uint8Array||(t="string"==typeof t?R(t):new Uint8Array(t));let n=t.byteLength;i.set(t,s),s+=n}return i}function E(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function w(e){return Object.keys(e).length}function F(e){let t=Object.create(null);for(let[r,s]of e)t[r]=s;return t}function L(){let e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}function M(){try{return Function(""),!0}catch(e){return!1}}t.IsLittleEndianCached={get value(){return g(this,"value",L())}},t.IsEvalSupportedCached={get value(){return g(this,"value",M())}};let O=[...Array(256).keys()].map(e=>e.toString(16).padStart(2,"0"));class I{static makeHexColor(e,t,r){return`#${O[e]}${O[t]}${O[r]}`}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){let r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}static getAxialAlignedBoundingBox(e,t){let r=I.applyTransform(e,t),s=I.applyTransform(e.slice(2,4),t),i=I.applyTransform([e[0],e[3]],t),n=I.applyTransform([e[2],e[1]],t);return[Math.min(r[0],s[0],i[0],n[0]),Math.min(r[1],s[1],i[1],n[1]),Math.max(r[0],s[0],i[0],n[0]),Math.max(r[1],s[1],i[1],n[1])]}static inverseTransform(e){let t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static apply3dTransform(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}static singularValueDecompose2dScale(e){let t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],s=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],n=e[2]*t[1]+e[3]*t[3],a=(r+n)/2,o=Math.sqrt((r+n)**2-4*(r*n-i*s))/2;return[Math.sqrt(a+o||1),Math.sqrt(a-o||1)]}static normalizeRect(e){let t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){function r(e,t){return e-t}let s=[e[0],e[2],t[0],t[2]].sort(r),i=[e[1],e[3],t[1],t[3]].sort(r),n=[];return(e=I.normalizeRect(e),t=I.normalizeRect(t),(s[0]!==e[0]||s[1]!==t[0])&&(s[0]!==t[0]||s[1]!==e[0])||(n[0]=s[1],n[2]=s[2],(i[0]!==e[1]||i[1]!==t[1])&&(i[0]!==t[1]||i[1]!==e[1])))?null:(n[1]=i[1],n[3]=i[2],n)}}t.Util=I;let D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function N(e){let t=e.length,r=[];if("\xfe"===e[0]&&"\xff"===e[1])for(let s=2;s<t;s+=2)r.push(String.fromCharCode(e.charCodeAt(s)<<8|e.charCodeAt(s+1)));else if("\xff"===e[0]&&"\xfe"===e[1])for(let s=2;s<t;s+=2)r.push(String.fromCharCode(e.charCodeAt(s+1)<<8|e.charCodeAt(s)));else for(let s=0;s<t;++s){let t=D[e.charCodeAt(s)];r.push(t?String.fromCharCode(t):e.charAt(s))}return r.join("")}function U(e){return e.replace(/([()\\\n\r])/g,e=>"\n"===e?"\\n":"\r"===e?"\\r":`\\${e}`)}function j(e){return/^[\x00-\x7F]*$/.test(e)}function B(e){let t=["\xfe\xff"];for(let r=0,s=e.length;r<s;r++){let s=e.charCodeAt(r);t.push(String.fromCharCode(s>>8&255)),t.push(String.fromCharCode(255&s))}return t.join("")}function G(e){return decodeURIComponent(escape(e))}function q(e){return unescape(encodeURIComponent(e))}function W(e){return"boolean"==typeof e}function H(e){return"number"==typeof e}function V(e){return"string"==typeof e}function z(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength}function $(e,t){if(e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(e[r]!==t[r])return!1;return!0}function X(e=new Date){return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}function Y(){let e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:()=>t}),e.promise=new Promise(function(r,s){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,s(e)}}),e}function K(e,t="",r=!1){if(URL.createObjectURL&&!r)return URL.createObjectURL(new Blob([e],{type:t}));let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/=",i=`data:${t};base64,`;for(let t=0,r=e.length;t<r;t+=3){let n=255&e[t],a=255&e[t+1],o=255&e[t+2],l=n>>2,h=(3&n)<<4|a>>4,c=t+1<r?(15&a)<<2|o>>6:64,d=t+2<r?63&o:64;i+=s[l]+s[h]+s[c]+s[d]}return i}},(e,t,r)=>{r(4)},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0,t.isNodeJS="object"==typeof process&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type)},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{let createPDFNetworkStream;Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultCMapReaderFactory=exports.DefaultCanvasFactory=exports.build=void 0;var _util=__w_pdfjs_require__(2),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(6),_node_utils=__w_pdfjs_require__(7),_annotation_storage=__w_pdfjs_require__(8),_api_compatibility=__w_pdfjs_require__(9),_canvas=__w_pdfjs_require__(10),_worker_options=__w_pdfjs_require__(12),_is_node=__w_pdfjs_require__(4),_message_handler=__w_pdfjs_require__(13),_metadata=__w_pdfjs_require__(14),_optional_content_config=__w_pdfjs_require__(15),_transport_stream=__w_pdfjs_require__(16),_webgl=__w_pdfjs_require__(17);let DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DefaultCanvasFactory=_is_node.isNodeJS?_node_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_is_node.isNodeJS?_node_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){let t,r=new PDFDocumentLoadingTask;if("string"==typeof e||e instanceof URL)t={url:e};else if((0,_util.isArrayBuffer)(e))t={data:e};else if(e instanceof PDFDataRangeTransport)t={range:e};else{if("object"!=typeof e)throw Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!e.url&&!e.data&&!e.range)throw Error("Invalid parameter object: need either .data, .range or .url");t=e}let s=Object.create(null),i=null,n=null;for(let e in t){let r=t[e];switch(e){case"url":if("undefined"!=typeof window)try{s[e]=new URL(r,window.location).href;continue}catch(e){(0,_util.warn)(`Cannot create valid URL: "${e}".`)}else if("string"==typeof r||r instanceof URL){s[e]=r.toString();continue}throw Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":i=r;continue;case"worker":n=r;continue;case"data":if(_is_node.isNodeJS&&void 0!==Buffer&&r instanceof Buffer)s[e]=new Uint8Array(r);else if(r instanceof Uint8Array)break;else if("string"==typeof r)s[e]=(0,_util.stringToBytes)(r);else if("object"!=typeof r||null===r||isNaN(r.length))if((0,_util.isArrayBuffer)(r))s[e]=new Uint8Array(r);else throw Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.");else s[e]=new Uint8Array(r);continue}s[e]=r}if(s.rangeChunkSize=s.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,s.CMapReaderFactory=s.CMapReaderFactory||DefaultCMapReaderFactory,s.ignoreErrors=!0!==s.stopAtErrors,s.fontExtraProperties=!0===s.fontExtraProperties,s.pdfBug=!0===s.pdfBug,s.enableXfa=!0===s.enableXfa,("string"!=typeof s.docBaseUrl||(0,_display_utils.isDataScheme)(s.docBaseUrl))&&(s.docBaseUrl=null),Number.isInteger(s.maxImageSize)||(s.maxImageSize=-1),"boolean"!=typeof s.isEvalSupported&&(s.isEvalSupported=!0),"boolean"!=typeof s.disableFontFace&&(s.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1),void 0===s.ownerDocument&&(s.ownerDocument=globalThis.document),"boolean"!=typeof s.disableRange&&(s.disableRange=!1),"boolean"!=typeof s.disableStream&&(s.disableStream=!1),"boolean"!=typeof s.disableAutoFetch&&(s.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(s.verbosity),!n){let e={verbosity:s.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};r._worker=n=e.port?PDFWorker.fromPort(e):new PDFWorker(e)}let a=r.docId;return n.promise.then(function(){if(r.destroyed)throw Error("Loading aborted");return Promise.all([_fetchDocument(n,s,i,a),new Promise(function(e){let t;i?t=new _transport_stream.PDFDataTransportStream({length:s.length,initialData:s.initialData,progressiveDone:s.progressiveDone,contentDispositionFilename:s.contentDispositionFilename,disableRange:s.disableRange,disableStream:s.disableStream},i):s.data||(t=createPDFNetworkStream({url:s.url,length:s.length,httpHeaders:s.httpHeaders,withCredentials:s.withCredentials,rangeChunkSize:s.rangeChunkSize,disableRange:s.disableRange,disableStream:s.disableStream})),e(t)}
2)]).then(function([e,t]){if(r.destroyed)throw Error("Loading aborted");let i=new _message_handler.MessageHandler(a,e,n.port);i.postMessageTransfers=n.postMessageTransfers;let o=new WorkerTransport(i,r,t,s);r._transport=o,i.send("Ready",null)})}).catch(r._capability.reject),r}function _fetchDocument(e,t,r,s){return e.destroyed?Promise.reject(Error("Worker was destroyed")):(r&&(t.length=r.length,t.initialData=r.initialData,t.progressiveDone=r.progressiveDone,t.contentDispositionFilename=r.contentDispositionFilename),e.messageHandler.sendWithPromise("GetDocRequest",{docId:s,apiVersion:"2.8.335",source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,postMessageTransfers:e.postMessageTransfers,docBaseUrl:t.docBaseUrl,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties,enableXfa:t.enableXfa}).then(function(t){if(e.destroyed)throw Error("Worker was destroyed");return t}))}exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let PDFDocumentLoadingTask=function(){let e=0;class t{constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then(()=>{this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)})}}return t}();class PDFDataRangeTransport{constructor(e,t,r=!1,s=null){this.length=e,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=s,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(let r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then(()=>{for(let r of this._progressListeners)r(e,t)})}onDataProgressiveRead(e){this._readyCapability.promise.then(()=>{for(let t of this._progressiveReadListeners)t(e)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(let e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}get numPages(){return this._pdfInfo.numPages}get fingerprint(){return this._pdfInfo.fingerprint}get isPureXfa(){return this._pdfInfo.isPureXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}
2getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getStats(){return this._transport.getStats()}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}saveDocument(e){return this._transport.saveDocument(e)}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(e,t,r,s,i=!1){this._pageIndex=e,this._pageInfo=t,this._ownerDocument=s,this._transport=r,this._stats=i?new _display_utils.StatTimer:null,this._pdfBug=i,this.commonObjs=r.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:r=0,offsetY:s=0,dontFlip:i=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:s,dontFlip:i})}getAnnotations({intent:e=null}={}){return this._annotationsPromise&&this._annotationsIntent===e||(this._annotationsPromise=this._transport.getAnnotations(this._pageIndex,e),this._annotationsIntent=e),this._annotationsPromise}getJSActions(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}getXfa(){return this._xfaPromise||(this._xfaPromise=this._transport.getPageXfa(this._pageIndex))}render({canvasContext:e,viewport:t,intent:r="display",enableWebGL:s=!1,renderInteractiveForms:i=!1,transform:n=null,imageLayer:a=null,canvasFactory:o=null,background:l=null,annotationStorage:h=null,optionalContentConfigPromise:c=null}){var d;this._stats&&this._stats.time("Overall");let u="print"===r?"print":"display";this.pendingCleanup=!1,c||(c=this._transport.getOptionalContentConfig());let p=this._intentStates.get(u);p||(p=Object.create(null),this._intentStates.set(u,p)),p.streamReaderCancelTimeout&&(clearTimeout(p.streamReaderCancelTimeout),p.streamReaderCancelTimeout=null);let g=o||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),f=new _webgl.WebGLContext({enable:s});p.displayReadyCapability||(p.displayReadyCapability=(0,_util.createPromiseCapability)(),p.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:u,renderInteractiveForms:!0===i,annotationStorage:h?.serializable||null}));let m=e=>{p.renderTasks.delete(A),(this.cleanupAfterRender||"print"===u)&&(this.pendingCleanup=!0),this._tryCleanup(),e?(A.capability.reject(e),this._abortOperatorList({intentState:p,reason:e})):A.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},A=new InternalRenderTask({callback:m,params:{canvasContext:e,viewport:t,transform:n,imageLayer:a,background:l},objs:this.objs,commonObjs:this.commonObjs,operatorList:p.operatorList,pageIndex:this._pageIndex,canvasFactory:g,webGLContext:f,useRequestAnimationFrame:"print"!==u,pdfBug:this._pdfBug});((d=p).renderTasks||(d.renderTasks=new Set)).add(A);let b=A.task;return Promise.all([p.displayReadyCapability.promise,c]).then(([e,t])=>
2{if(this.pendingCleanup)return void m();this._stats&&this._stats.time("Rendering"),A.initializeGraphics({transparency:e,optionalContentConfig:t}),A.operatorListChanged()}).catch(m),b}getOperatorList(){let e;function t(){s.operatorList.lastChunk&&(s.opListReadCapability.resolve(s.operatorList),s.renderTasks.delete(e))}let r="oplist",s=this._intentStates.get(r);if(s||(s=Object.create(null),this._intentStates.set(r,s)),!s.opListReadCapability){var i;(e=Object.create(null)).operatorListChanged=t,s.opListReadCapability=(0,_util.createPromiseCapability)(),((i=s).renderTasks||(i.renderTasks=new Set)).add(e),s.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:r})}return s.opListReadCapability.promise}streamTextContent({normalizeWhitespace:e=!1,disableCombineTextItems:t=!1}={}){let r=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===e,combineTextItems:!0!==t},{highWaterMark:r,size:e=>e.items.length})}getTextContent(e={}){let t=this.streamTextContent(e);return new Promise(function(e,r){function s(){i.read().then(function({value:t,done:r}){if(r)return void e(n);Object.assign(n.styles,t.styles),n.items.push(...t.items),s()},r)}let i=t.getReader(),n={items:[],styles:Object.create(null)};s()})}_destroy(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;let e=[];for(let[t,r]of this._intentStates)if(this._abortOperatorList({intentState:r,reason:Error("Page was destroyed."),force:!0}),"oplist"!==t)for(let t of r.renderTasks)e.push(t.completed),t.cancel();return this.objs.clear(),this._annotationsPromise=null,this._jsActionsPromise=null,this._xfaPromise=null,this.pendingCleanup=!1,Promise.all(e)}cleanup(e=!1){return this.pendingCleanup=!0,this._tryCleanup(e)}_tryCleanup(e=!1){if(!this.pendingCleanup)return!1;for(let{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this._annotationsPromise=null,this._jsActionsPromise=null,this._xfaPromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}_startRenderPage(e,t){let r=this._intentStates.get(t);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}_renderPageChunk(e,t){for(let r=0,s=e.length;r<s;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);for(let r of(t.operatorList.lastChunk=e.lastChunk,t.renderTasks))r.operatorListChanged();e.lastChunk&&this._tryCleanup()}_pumpOperatorList(e){(0,_util.assert)(e.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');let t=this._transport.messageHandler.sendWithStream("GetOperatorList",e).getReader(),r=this._intentStates.get(e.intent);r.streamReader=t;let s=()=>{t.read().then(({value:e,done:t})=>{if(t){r.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(e,r),s())},e=>{if(r.streamReader=null,!this._transport.destroyed){if(r.operatorList){for(let e of(r.operatorList.lastChunk=!0,r.renderTasks))e.operatorListChanged();this._tryCleanup()}if(r.displayReadyCapability)r.displayReadyCapability.reject(e);else if(r.opListReadCapability)r.opListReadCapability.reject(e);else throw e}})};s()}_abortOperatorList({intentState:e,reason:t,force:r=!1}){if((0,_util.assert)(t instanceof Error||"object"==typeof t&&null!==t,'PDFPageProxy._abortOperatorList: Expected "reason" argument.'),e.streamReader){if(!r){if(e.renderTasks.size>0)return;if(t instanceof _display_utils.RenderingCancelledException){e.streamReaderCancelTimeout=setTimeout(()=>{this._abortOperatorList({intentState:e,reason:t,force:!0}),e.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT);return}}if(e.streamReader.cancel(new _util.AbortException(t?.message)),e.streamReader=null,!this._transport.destroyed){for(let[t,r]of this._intentStates)if(r===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){this._listeners=[],this._deferred=Prom
2ise.resolve(void 0)}postMessage(e,t){function r(e){let i,n;if("object"!=typeof e||null===e)return e;if(s.has(e))return s.get(e);if((i=e.buffer)&&(0,_util.isArrayBuffer)(i))return n=t?.includes(i)?new e.constructor(i,e.byteOffset,e.byteLength):new e.constructor(e),s.set(e,n),n;if(e instanceof Map){for(let[t,i]of(n=new Map,s.set(e,n),e))n.set(t,r(i));return n}if(e instanceof Set){for(let t of(n=new Set,s.set(e,n),e))n.add(r(t));return n}for(let t in n=Array.isArray(e)?[]:{},s.set(e,n),e){let s,i=e;for(;!(s=Object.getOwnPropertyDescriptor(i,t));)i=Object.getPrototypeOf(i);if(void 0!==s.value){if("function"==typeof s.value){if(e.hasOwnProperty?.(t))throw Error(`LoopbackPort.postMessage - cannot clone: ${e[t]}`);continue}n[t]=r(s.value)}}return n}let s=new WeakMap,i={data:r(e)};this._deferred.then(()=>{for(let e of this._listeners)e.call(this,i)})}addEventListener(e,t){this._listeners.push(t)}removeEventListener(e,t){let r=this._listeners.indexOf(t);this._listeners.splice(r,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;let PDFWorker=function PDFWorkerClosure(){let fallbackWorkerSrc,fakeWorkerCapability,pdfWorkerPorts=new WeakMap,isWorkerDisabled=!1,nextFakeWorkerId=0;if(_is_node.isNodeJS&&1)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document&&"currentScript"in document){let pdfjsFilePath=document.currentScript?.src;pdfjsFilePath&&(fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(void 0!==fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){let e;try{e=globalThis.pdfjsWorker?.WorkerMessageHandler}catch(e){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();let loader=async function(){let mainWorkerMessageHandler=getMainThreadWorkerMessageHandler();if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS&&1){let worker=eval("require")(getWorkerSrc());return worker.WorkerMessageHandler}return await (0,_display_utils.loadScript)(getWorkerSrc()),window.pdfjsWorker.WorkerMessageHandler};return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){let t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}class PDFWorker{constructor({name:e=null,port:t=null,verbosity:r=(0,_util.getVerbosityLevel)()}={}){if(t&&pdfWorkerPorts.has(t))throw Error("Cannot use more than one PDFWorker per port");if(this.name=e,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=r,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t){pdfWorkerPorts.set(t,this),this._initializeFromPort(t);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}_initialize(){if("undefined"!=typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){let e=getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,e)||(e=createCDNWrapper(new URL(e,window.location).href));let t=new Worker(e),r=new _message_handler.MessageHandler("main","worker",t),s=()=>{t.removeEventListener("error",i),r.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(Error("Worker was destroyed")):this._setupFakeWorker()},i=()=>{this._webWorker||s()};t.addEventListener("error",i),r.on("test",e=>{if(t.removeEventListener("error",i),this.destroyed)return void s();e?(this._messageHandler=r,this._port=t,this._webWorker=t,e.supportTransfers||(this.postMessageTransfers=!1),this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),r.destroy(),t.terminate())}),r.on("ready",e=>{if(t.removeEventListener("error",i),this.destroyed)return void s();try{n()}catch(e){this._setupFakeWorker()}});let n=()=>{let e=new Uint8Array([255*!!this.postMessageTransfers]);try{r.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers."),e[0]=0,r.send("test",e)}};n();return}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then(e=>{if(this.destroyed)return void this._readyCapability.reject(Error("Worker was destroyed"));let t=new LoopbackPort;this._port=t;let r="fake"+nextFakeWorkerId++,s=new _message_handler.MessageHandler(r+"_worker",r,t);e.setup(s,t);let i=new _message_handler.MessageHandler(r,r+"_worker",t);this._messageHandler=i,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})}).catch(e=>{this._readyCapability.reject(Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e||!e.port)throw Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(e.port)?pdfWorkerPorts.get(e.port):new PDFWorker(e)}static getWorkerSrc(){return getWorkerSrc()}}return PDFWorker}();exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(e,t,r,s){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:s.ownerDocument}),this._params=s,this.CMapReaderFactory=new s.CMapReaderFactory({baseUrl:s.cMapUrl,isCompressed:s.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}get loadingTaskSettled(){return this.loadingTask._capability.settled}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(Error("Worker was destroyed during onPassword callback"));let e=[];this.pageCache.forEach(function(t){t&&e.push(t._destroy())}),this.pageCache.length=0,this.pagePromises.length=0;
2let t=this.messageHandler.sendWithPromise("Terminate",null);if(e.push(t),this.loadingTaskSettled){let t=this.loadingTask.promise.then(e=>{e.hasOwnProperty("annotationStorage")&&e.annotationStorage.resetModified()}).catch(()=>{});e.push(t)}return Promise.all(e).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this._hasJSActionsPromise=null,this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:e,loadingTask:t}=this;e.on("GetReader",(e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then(function({value:e,done:r}){if(r)return void t.close();(0,_util.assert)((0,_util.isArrayBuffer)(e),"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e])}).catch(e=>{t.error(e)})},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch(e=>{if(!this.destroyed)throw e})}}),e.on("ReaderHeadersReady",e=>{let r=(0,_util.createPromiseCapability)(),s=this._fullReader;return s.headersReady.then(()=>{s.isStreamingSupported&&s.isRangeSupported||(this._lastProgress&&t.onProgress&&t.onProgress(this._lastProgress),s.onProgress=e=>{t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),r.resolve({isStreamingSupported:s.isStreamingSupported,isRangeSupported:s.isRangeSupported,contentLength:s.contentLength})},r.reject),r.promise}),e.on("GetRangeReader",(e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let r=this._networkStream.getRangeReader(e.begin,e.end);if(!r)return void t.close();t.onPull=()=>{r.read().then(function({value:e,done:r}){if(r)return void t.close();(0,_util.assert)((0,_util.isArrayBuffer)(e),"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e])}).catch(e=>{t.error(e)})},t.onCancel=e=>{r.cancel(e),t.ready.catch(e=>{if(!this.destroyed)throw e})}}),e.on("GetDoc",({pdfInfo:e})=>{this._numPages=e.numPages,t._capability.resolve(new PDFDocumentProxy(e,this))}),e.on("DocException",function(e){let r;switch(e.name){case"PasswordException":r=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":r=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":r=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":r=new _util.UnknownErrorException(e.message,e.details)}if(!(r instanceof Error)){let e="DocException - expected a valid Error.";(0,_util.warn)(e)}t._capability.reject(r)}),e.on("PasswordRequest",e=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),t.onPassword){let r=e=>{this._passwordCapability.resolve({password:e})};try{t.onPassword(r,e.code)}catch(e){this._passwordCapability.reject(e)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise}),e.on("DataLoaded",e=>{t.onProgress&&t.onProgress({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)}),e.on("StartRenderPage",e=>{this.destroyed||this.pageCache[e.pageIndex]._startRenderPage(e.transparency,e.intent)}),e.on("commonobj",t=>{if(this.destroyed)return;let[r,s,i]=t;if(!this.commonObjs.has(r))switch(s){case"Font":let n=this._params;if("error"in i){let e=i.error;(0,_util.warn)(`Error during font loading: ${e}`),this.commonObjs.resolve(r,e);break}let a=null;n.pdfBug&&globalThis.FontInspector?.enabled&&(a={registerFont(e,t){globalThis.FontInspector.fontAdded(e,t)}});let o=new _font_loader.FontFaceObject(i,{isEvalSupported:n.isEvalSupported,disableFontFace:n.disableFontFace,ignoreErrors:n.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:a});this.fontLoader.bind(o).catch(t=>
2e.sendWithPromise("FontFallback",{id:r})).finally(()=>{!n.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(r,o)});break;case"FontPath":case"Image":this.commonObjs.resolve(r,i);break;default:throw Error(`Got unknown common object type ${s}`)}}),e.on("obj",e=>{if(this.destroyed)return;let[t,r,s,i]=e,n=this.pageCache[r];if(!n.objs.has(t))if("Image"===s){n.objs.resolve(t,i);let e=8e6;i?.data?.length>e&&(n.cleanupAfterRender=!0)}else throw Error(`Got unknown object type ${s}`)}),e.on("DocProgress",e=>{!this.destroyed&&t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),e.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),e.on("FetchBuiltInCMap",(e,t)=>{if(this.destroyed)return void t.error(Error("Worker was destroyed"));let r=!1;t.onPull=()=>{if(r)return void t.close();r=!0,this.CMapReaderFactory.fetch(e).then(function(e){t.enqueue(e,1,[e.cMapData.buffer])}).catch(function(e){t.error(e)})}})}_onUnsupportedFeature({featureId:e}){!this.destroyed&&this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(e)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(Error("Invalid page request"));let t=e-1;if(t in this.pagePromises)return this.pagePromises[t];let r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(e=>{if(this.destroyed)throw Error("Transport destroyed");let r=new PDFPageProxy(t,e,this,this._params.ownerDocument,this._params.pdfBug);return this.pageCache[t]=r,r});return this.pagePromises[t]=r,r}getPageIndex(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){return Promise.reject(Error(e))})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}saveDocument(e){return this.messageHandler.sendWithPromise("SaveDocument",{numPages:this._numPages,annotationStorage:e?.serializable||null,filename:this._fullReader?.filename??null}).finally(()=>{e&&e.resetModified()})}getFieldObjects(){return this.messageHandler.sendWithPromise("GetFieldObjects",null)}hasJSActions(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getPageXfa(e){return this.messageHandler.sendWithPromise("GetPageXfa",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(e=>new _optional_content_config.OptionalContentConfig(e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(e=>({info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}
2getStats(){return this.messageHandler.sendWithPromise("GetStats",null)}async startCleanup(e=!1){if(await this.messageHandler.sendWithPromise("Cleanup",null),!this.destroyed){for(let e=0,t=this.pageCache.length;e<t;e++){let t=this.pageCache[e];if(t&&!t.cleanup())throw Error(`startCleanup: Page ${e+1} is currently rendering.`)}this.commonObjs.clear(),e||this.fontLoader.clear(),this._hasJSActionsPromise=null}}get loadingParams(){let e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,disableFontFace:e.disableFontFace})}}class PDFObjects{constructor(){this._objs=Object.create(null)}_ensureObj(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}get(e,t=null){if(t)return this._ensureObj(e).capability.promise.then(t),null;let r=this._objs[e];if(!r||!r.resolved)throw Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){let t=this._objs[e];return t?.resolved||!1}resolve(e,t){let r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}clear(){this._objs=Object.create(null)}}class RenderTask{constructor(e){this._internalRenderTask=e,this.onContinue=null}get promise(){return this._internalRenderTask.capability.promise}cancel(){this._internalRenderTask.cancel()}}let InternalRenderTask=function(){let e=new WeakSet;class t{constructor({callback:e,params:t,objs:r,commonObjs:s,operatorList:i,pageIndex:n,canvasFactory:a,webGLContext:o,useRequestAnimationFrame:l=!1,pdfBug:h=!1}){this.callback=e,this.params=t,this.objs=r,this.commonObjs=s,this.operatorListIdx=null,this.operatorList=i,this._pageIndex=n,this.canvasFactory=a,this.webGLContext=o,this._pdfBug=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===l&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:r}){if(this.cancelled)return;if(this._canvas){if(e.has(this._canvas))throw Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());let{canvasContext:s,viewport:i,transform:n,imageLayer:a,background:o}=this.params;this.gfx=new _canvas.CanvasGraphics(s,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,a,r),this.gfx.beginDrawing({transform:n,viewport:i,transparency:t,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(t=null){this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas"))}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){!this.cancelled&&(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback())))}}return t}(),version="2.8.335";exports.version=version;let build="228adbf67";exports.build=build},(e,t,r)=>{let s;
2Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var i=r(2);class n{constructor({docId:e,onUnsupportedFeature:t,ownerDocument:r=globalThis.document}){this.constructor===n&&(0,i.unreachable)("Cannot initialize BaseFontLoader."),this.docId=e,this._onUnsupportedFeature=t,this._document=r,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}insertRule(e){let t=this.styleElement;t||((t=this.styleElement=this._document.createElement("style")).id=`PDFJS_FONT_STYLE_TAG_${this.docId}`,this._document.documentElement.getElementsByTagName("head")[0].appendChild(t));let r=t.sheet;r.insertRule(e,r.cssRules.length)}clear(){this.nativeFontFaces.forEach(e=>{this._document.fonts.delete(e)}),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return;if(e.attached=!0,this.isFontLoadingAPISupported){let t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(r){throw this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,i.warn)(`Failed to load font '${t.family}': '${r}'.`),e.disableFontFace=!0,r}}return}let t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise(r=>{let s=this._queueLoadingCallback(r);this._prepareFontLoadEvent([t],[e],s)})}}_queueLoadingCallback(e){(0,i.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){return(0,i.shadow)(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){(0,i.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,i.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(e,t,r){(0,i.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}t.FontLoader=s,t.FontLoader=s=class extends n{constructor(e){super(e),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let e=!1;if("undefined"==typeof navigator)e=!0;else{let t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t?.[1]>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){function t(){for((0,i.assert)(!s.done,"completeRequest() cannot be called twice."),s.done=!0;r.requests.length>0&&r.requests[0].done;)setTimeout(r.requests.shift().callback,0)}let r=this.loadingContext,s={id:`pdfjs-font-loading-${r.nextRequestId++}`,done:!1,complete:t,callback:e};return r.requests.push(s),s}get _loadTestFont(){let e=function(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")};return(0,i.shadow)(this,"_loadTestFont",e())}_prepareFontLoadEvent(e,t,r){let s,n;function a(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function o(e,t,r,s){return e.substring(0,t)+s+e.substring(t+r)}let l=this._document.createElement("canvas");l.width=1,l.height=1;let h=l.getContext("2d"),c=0;function d(e,t){if(++c>30){(0,i.warn)("Load test font never loaded."),t();return}if(h.font="30px "+e,h.fillText(".",0,20),h.getImageData(0,0,1,1).data[3]>0)return void t();setTimeout(d.bind(null,e,t))}let u=`lt${Date.now()}${this.loadTestFontId++}`,p=this._loadTestFont;p=o(p,976,u.length,u);let g=16,f=0x58585858,m=a(p,16);for(s=0,n=u.length-3;s<n;s+=4)m=m-f+a(u,s)|0;s<u.length&&(m=m-f+a(u+"XXX",s)|0),p=o(p,g,4,(0,i.string32)(m));let A=`url(data:font/opentype;base64,${btoa(p)});`,b=`@font-face {font-family:"${u}";src:${A}}`;this.insertRule(b);let _=[];for(s=0,n=t.length;s<n;s++)_.push(t[s].loadedName);_.push(u);let y=this._document.createElement("div");for(s=0,y.style.visibility="hidden",y.style.width=y.style.height="10px",y.style.position="absolute",y.style.top=y.style.left="0px",n=_.length;s<n;++s){let e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=_[s],y.appendChild(e)}this._document.body.appendChild(y),d(u,()=>{this._document.body.removeChild(y),r.complete()})}};class a{constructor(e,{isEvalSupported:t=!0,disableFontFace:r=!1,ignoreErrors:s=!1,onUnsupportedFeature:i,fontRegistry:n=null}){for(let t in this.compiledGlyphs=Object.create(null),e)this[t]=e[t];this.isEvalSupported=!1!==t,this.disableFontFace=!0===r,this.ignoreErrors=!0===s,this._onUnsupportedFeature=i,this.fontRegistry=n}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;let e=(0,i.bytesToString)(new Uint8Array(this.data)),t=`url(data:${this.mimetype};base64,${btoa(e)});`,r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,t),r}getPathGenerator(e,t){let r,s;if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)(`getPathGenerator - ignoring character: "${e}".`),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){let e,i="";for(let t=0,n=r.length;t<n;t++)e=void 0!==(s=r[t]).args?s.args.join(","):"",i+="c."+s.cmd+"("+e+");\n";
2return this.compiledGlyphs[t]=Function("c","size",i)}return this.compiledGlyphs[t]=function(e,t){for(let i=0,n=r.length;i<n;i++)"scale"===(s=r[i]).cmd&&(s.args=[t,-t]),e[s.cmd].apply(e,s.args)}}}t.FontFaceObject=a},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeCMapReaderFactory=t.NodeCanvasFactory=void 0;var s=r(1),i=r(4),n=r(2);let a=class{constructor(){(0,n.unreachable)("Not implemented: NodeCanvasFactory")}};t.NodeCanvasFactory=a;let o=class{constructor(){(0,n.unreachable)("Not implemented: NodeCMapReaderFactory")}};t.NodeCMapReaderFactory=o,i.isNodeJS&&(t.NodeCanvasFactory=a=class extends s.BaseCanvasFactory{create(e,t){if(e<=0||t<=0)throw Error("Invalid canvas size");let r=__webpack_require__(94743).createCanvas(e,t);return{canvas:r,context:r.getContext("2d")}}},t.NodeCMapReaderFactory=o=class extends s.BaseCMapReaderFactory{_fetchData(e,t){return new Promise((r,s)=>{__webpack_require__(28582).readFile(e,(e,i)=>{if(e||!i)return void s(Error(e));r({cMapData:new Uint8Array(i),compressionType:t})})})}})},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationStorage=void 0;var s=r(1),i=r(2);class n{constructor(){this._storage=new Map,this._modified=!1,this.onSetModified=null,this.onResetModified=null}getValue(e,t){let r=this._storage.get(e);return void 0!==r?r:t}getOrCreateValue(e,t){return((0,s.deprecated)("Use getValue instead."),this._storage.has(e))?this._storage.get(e):(this._storage.set(e,t),t)}setValue(e,t){let r=this._storage.get(e),s=!1;if(void 0!==r)for(let[e,i]of Object.entries(t))r[e]!==i&&(s=!0,r[e]=i);else this._storage.set(e,t),s=!0;s&&this._setModified()}getAll(){return this._storage.size>0?(0,i.objectFromMap)(this._storage):null}get size(){return this._storage.size}_setModified(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get serializable(){return this._storage.size>0?this._storage:null}}t.AnnotationStorage=n},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.apiCompatibilityParams=void 0;var s=r(4);let i=Object.create(null);!function(){s.isNodeJS&&(i.disableFontFace=!0)}(),t.apiCompatibilityParams=Object.freeze(i)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var s=r(2),i=r(11);let n=16,a=100,o=4096,l=!0,h=1e3,c=16,d=1.000001;function u(e){if(!e.mozCurrentTransform){e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._originalResetTransform=e.resetTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[];try{let t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"lineWidth");e._setLineWidth=t.set,e._getLineWidth=t.get,Object.defineProperty(e,"lineWidth",{set:function(e){this._setLineWidth(e*d)},get:function(){return this._getLineWidth()}})}catch(e){}Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){let e=this._transformMatrix,t=e[0],r=e[1],s=e[2],i=e[3],n=e[4],a=e[5],o=t*i-r*s,l=r*s-t*i;return[i/o,r/l,s/l,t/o,(i*n-s*a)/l,(r*n-t*a)/o]}}),e.save=function(){let e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){let e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){let r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){let r=this._transformMatrix;r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*t,r[3]=r[3]*t,this._originalScale(e,t)},e.transform=function(t,r,s,i,n,a){let o=this._transformMatrix;this._transformMatrix=[o[0]*t+o[2]*r,o[1]*t+o[3]*r,o[0]*s+o[2]*i,o[1]*s+o[3]*i,o[0]*n+o[2]*a+o[4],o[1]*n+o[3]*a+o[5]],e._originalTransform(t,r,s,i,n,a)},e.setTransform=function(t,r,s,i,n,a){this._transformMatrix=[t,r,s,i,n,a],e._originalSetTransform(t,r,s,i,n,a)},e.resetTransform=function(){this._transformMatrix=[1,0,0,1,0,0],e._originalResetTransform()},e.rotate=function(e){let t=Math.cos(e),r=Math.sin(e),s=this._transformMatrix;
2this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,-(s[0]*r)+s[2]*t,-(s[1]*r)+s[3]*t,s[4],s[5]],this._originalRotate(e)}}}let p=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,r,s){let i;return void 0!==this.cache[e]?(i=this.cache[e],this.canvasFactory.reset(i,t,r),i.context.setTransform(1,0,0,1,0,0)):(i=this.canvasFactory.create(t,r),this.cache[e]=i),s&&u(i.context),i},clear(){for(let e in this.cache){let t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}();function g(e){let t,r,s,i,n=1e3,a=e.width,o=e.height,l=a+1,h=new Uint8Array(l*(o+1)),c=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),d=a+7&-8,u=e.data,p=new Uint8Array(d*o),g=0;for(t=0,r=u.length;t<r;t++){let e=u[t],r=128;for(;r>0;)p[g++]=e&r?0:255,r>>=1}let f=0;for(0!==p[g=0]&&(h[0]=1,++f),s=1;s<a;s++)p[g]!==p[g+1]&&(h[s]=p[g]?2:1,++f),g++;for(0!==p[g]&&(h[s]=2,++f),t=1;t<o;t++){g=t*d,i=t*l,p[g-d]!==p[g]&&(h[i]=p[g]?1:8,++f);let e=4*!!p[g]+8*!!p[g-d];for(s=1;s<a;s++)c[e=(e>>2)+4*!!p[g+1]+8*!!p[g-d+1]]&&(h[i+s]=c[e],++f),g++;if(p[g-d]!==p[g]&&(h[i+s]=p[g]?2:4,++f),f>n)return null}for(g=d*(o-1),i=t*l,0!==p[g]&&(h[i]=8,++f),s=1;s<a;s++)p[g]!==p[g+1]&&(h[i+s]=p[g]?4:8,++f),g++;if(0!==p[g]&&(h[i+s]=4,++f),f>n)return null;let m=new Int32Array([0,l,-1,0,-l,0,0,0,1]),A=[];for(t=0;f&&t<=o;t++){let e=t*l,r=e+a;for(;e<r&&!h[e];)e++;if(e===r)continue;let s=[e%l,t],i=e,n=h[e];do{let t=m[n];do e+=t;while(!h[e]);let r=h[e];5!==r&&10!==r?(n=r,h[e]=0):(n=r&51*n>>4,h[e]&=n>>2|n<<2),s.push(e%l),s.push(e/l|0),!h[e]&&--f}while(i!==e);A.push(s),--t}return function(e){e.save(),e.scale(1/a,-1/o),e.translate(0,-o),e.beginPath();for(let t=0,r=A.length;t<r;t++){let r=A[t];e.moveTo(r[0],r[1]);for(let t=2,s=r.length;t<s;t+=2)e.lineTo(r[t],r[t+1])}e.fill(),e.beginPath(),e.restore()}}let f=function(){function e(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=s.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=s.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=s.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.resumeSMaskCtx=null,this.transferMaps=null}return e.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}},e}();t.CanvasGraphics=function(){let e=15,t=10;function r(e,t,r,s,i,n,a){this.ctx=e,this.current=new f,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=s,this.webGLContext=i,this.imageLayer=n,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.contentVisible=!0,this.markedContentStack=[],this.optionalContentConfig=a,this.cachedCanvases=new p(this.canvasFactory),e&&u(e),this._cachedGetSinglePixelWidth=null}function d(e,t,r=null){let i,n,a,o,l,h,u,p;if("undefined"!=typeof ImageData&&t instanceof ImageData)return void e.putImageData(t,0,0);let g=t.height,f=t.width,m=g%c,A=(g-m)/c,b=0===m?A:A+1,_=e.createImageData(f,c),y=0,S,v=t.data,C=_.data;if(r)switch(r.length){case 1:l=r[0],h=r[0],u=r[0],p=r[0];break;case 4:l=r[0],h=r[1],u=r[2],p=r[3]}if(t.kind===s.ImageKind.GRAYSCALE_1BPP){let t=v.byteLength,r=new Uint32Array(C.buffer,0,C.byteLength>>2),o=r.length,l=f+7>>3,h=0xffffffff,d=s.IsLittleEndianCached.value?0xff000000:255;for(p&&255===p[0]&&0===p[255]&&([h,d]=[d,h]),i=0;i<b;i++){for(n=0,a=i<A?c:m,S=0;n<a;n++){let e=t-y,s=0,i=e>l?f:8*e-7,n=-8&i,a=0,o=0;for(;s<n;s+=8)o=v[y++],r[S++]=128&o?h:d,r[S++]=64&o?h:d,r[S++]=32&o?h:d,r[S++]=16&o?h:d,r[S++]=8&o?h:d,r[S++]=4&o?h:d,r[S++]=2&o?h:d,r[S++]=1&o?h:d;for(;s<i;s++)0===a&&(o=v[y++],a=128),r[S++]=o&a?h:d,a>>=1}for(;S<o;)r[S++]=0;e.putImageData(_,0,i*c)}}else if(t.kind===s.ImageKind.RGBA_32BPP){let t=!!(l||h||u);for(i=0,n=0,o=f*c*4;i<A;i++){if(C.set(v.subarray(y,y+o)),y+=o,t)for(let e=0;e<o;e+=4)l&&(C[e+0]=l[C[e+0]]),h&&(C[e+1]=h[C[e+1]]),u&&(C[e+2]=u[C[e+2]]);e.putImageData(_,0,n),n+=c}if(i<b){if(o=f*m*4,C.set(v.subarray(y,y+o)),t)for(let e=0;e<o;e+=4)l&&(C[e+0]=l[C[e+0]]),h&&(C[e+1]=h[C[e+1]]),u&&(C[e+2]=u[C[e+2]]);e.putImageData(_,0,n)}}else if(t.kind===s.ImageKind.RGB_24BPP){let t=!!(l||h||u);for(i=0,o=f*(a=c);i<b;i++){for(i>=A&&(o=f*(a=m)),S=0,n=o;n--;)C[S++]=v[y++],C[S++]=v[y++],C[S++]=v[y++],C[S++]=255;if(t)for(let e=0;e<S;e+=4)l&&(C[e+0]=l[C[e+0]]),h&&(C[e+1]=h[C[e+1]]),u&&(C[e+2]=u[C[e+2]]);e.putImageData(_,0,i*c)}}else throw Error(`bad image kind: ${t.kind}`)}function m(e,t){let r=t.height,s=t.width,i=r%c,n=(r-i)/c,a=0===i?
2n:n+1,o=e.createImageData(s,c),l=0,h=t.data,d=o.data;for(let t=0;t<a;t++){let r=t<n?c:i,a=3;for(let e=0;e<r;e++){let e,t=0;for(let r=0;r<s;r++)t||(e=h[l++],t=128),d[a]=e&t?0:255,a+=4,t>>=1}e.putImageData(o,0,t*c)}}function A(e,t){let r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"];for(let s=0,i=r.length;s<i;s++){let i=r[s];void 0!==e[i]&&(t[i]=e[i])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function b(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function _(e,t,r,s){let i=e.length;for(let n=3;n<i;n+=4){let i=e[n];if(0===i)e[n-3]=t,e[n-2]=r,e[n-1]=s;else if(i<255){let a=255-i;e[n-3]=e[n-3]*i+t*a>>8,e[n-2]=e[n-2]*i+r*a>>8,e[n-1]=e[n-1]*i+s*a>>8}}}function y(e,t,r){let s=e.length,i=1/255;for(let n=3;n<s;n+=4){let s=r?r[e[n]]:e[n];t[n]=t[n]*s*i|0}}function S(e,t,r){let s=e.length;for(let i=3;i<s;i+=4){let s=77*e[i-3]+152*e[i-2]+28*e[i-1];t[i]=r?t[i]*r[s>>8]>>8:t[i]*s>>16}}function v(e,t,r,s,i,n,a){let o,l=!!n,h=l?n[0]:0,c=l?n[1]:0,d=l?n[2]:0;o="Luminosity"===i?S:y;let u=Math.min(s,Math.ceil(1048576/r));for(let i=0;i<s;i+=u){let n=Math.min(u,s-i),p=e.getImageData(0,i,r,n),g=t.getImageData(0,i,r,n);l&&_(p.data,h,c,d),o(p.data,g.data,a),e.putImageData(g,0,i)}}function C(e,t,r,s){let i=t.canvas,n=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);let a=t.backdrop||null;if(!t.transferMap&&s.isEnabled){let n=s.composeSMask({layer:r.canvas,mask:i,properties:{subtype:t.subtype,backdrop:a}});e.setTransform(1,0,0,1,0,0),e.drawImage(n,t.offsetX,t.offsetY);return}v(n,r,i.width,i.height,t.subtype,a,t.transferMap),e.drawImage(i,0,0)}let x=["butt","round","square"],P=["miter","round","bevel"],R={},T={};for(let c in r.prototype={beginDrawing({transform:e,viewport:t,transparency:r=!1,background:s=null}){let i=this.ctx.canvas.width,n=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=s||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,i,n),this.ctx.restore(),r){let e=this.cachedCanvases.getCanvas("transparent",i,n,!0);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),b(this.ctx),e&&this.ctx.transform.apply(this.ctx,e),this.ctx.transform.apply(this.ctx,t.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this._combinedScaleFactor=Math.hypot(this.baseTransform[0],this.baseTransform[2]),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(r,i,n,a){let o,l=r.argsArray,h=r.fnArray,c=i||0,d=l.length;if(d===c)return c;let u=d-c>t&&"function"==typeof n,p=u?Date.now()+e:0,g=0,f=this.commonObjs,m=this.objs;for(;;){if(void 0!==a&&c===a.nextBreakPoint)return a.breakIt(c,n),c;if((o=h[c])!==s.OPS.dependency)this[o].apply(this,l[c]);else for(let e of l[c]){let t=e.startsWith("g_")?f:m;if(!t.has(e))return t.get(e,n),c}if(++c===d)return c;if(u&&++g>t){if(Date.now()>p)return n(),c;g=0}}},endDrawing:function(){for(;this.stateStack.length||null!==this.current.activeSMask;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=x[e]},setLineJoin:function(e){this.ctx.lineJoin=P[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){let r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)},setRenderingIntent(e){},setFlatness(e){},setGState:function(e){for(let t=0,r=e.length;t<r;t++){let r=e[t],s=r[0],i=r[1];switch(s){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;
2case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=r[1];break;case"ca":this.current.fillAlpha=r[1],this.ctx.globalAlpha=r[1];break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=i?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null;break;case"TR":this.current.transferMaps=i}}},beginSMaskGroup:function(){let e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,s="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(s,t,r,!0),n=this.ctx,a=n.mozCurrentTransform;this.ctx.save();let o=i.context;o.scale(1/e.scaleX,1/e.scaleY),o.translate(-e.offsetX,-e.offsetY),o.transform.apply(o,a),e.startTransformInverse=o.mozCurrentTransformInverse,A(n,o),this.ctx=o,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(n),this.groupLevel++},suspendSMaskGroup:function(){let e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),C(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),A(e,this.ctx),this.current.resumeSMaskCtx=e;let t=s.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()},resumeSMaskGroup:function(){let e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){let e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),C(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),A(e,this.ctx);let t=s.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)},save:function(){this.ctx.save();let e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null!==this.current.activeSMask&&(0===this.stateStack.length||this.stateStack[this.stateStack.length-1].activeSMask!==this.current.activeSMask)&&this.endSMaskGroup(),0!==this.stateStack.length?(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null):this.current.activeSMask=null},transform:function(e,t,r,s,i,n){this.ctx.transform(e,t,r,s,i,n),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){let r=this.ctx,i=this.current,n=i.x,a=i.y;for(let i=0,o=0,l=e.length;i<l;i++)switch(0|e[i]){case s.OPS.rectangle:n=t[o++],a=t[o++];let l=t[o++],h=t[o++],c=n+l,d=a+h;r.moveTo(n,a),0===l||0===h?r.lineTo(c,d):(r.lineTo(c,a),r.lineTo(c,d),r.lineTo(n,d)),r.closePath();break;case s.OPS.moveTo:n=t[o++],a=t[o++],r.moveTo(n,a);break;case s.OPS.lineTo:n=t[o++],a=t[o++],r.lineTo(n,a);break;case s.OPS.curveTo:n=t[o+4],a=t[o+5],r.bezierCurveTo(t[o],t[o+1],t[o+2],t[o+3],n,a),o+=6;break;case s.OPS.curveTo2:r.bezierCurveTo(n,a,t[o],t[o+1],t[o+2],t[o+3]),n=t[o+2],a=t[o+3],o+=4;break;case s.OPS.curveTo3:n=t[o+2],a=t[o+3],r.bezierCurveTo(t[o],t[o+1],n,a,n,a),o+=4;break;case s.OPS.closePath:r.closePath()}i.setCurrentPoint(n,a)},closePath:function(){this.ctx.closePath()},stroke:function(e){e=void 0===e||e;let t=this.ctx,r=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,this.contentVisible)if("object"==typeof r&&r?.getPattern){t.save();let e=t.mozCurrentTransform,i=s.Util.singularValueDecompose2dScale(e)[0];t.strokeStyle=r.getPattern(t,this);let n=this.getSinglePixelWidth(),a=this.current.lineWidth*i;n<0&&-n>=a?(t.resetTransform(),t.lineWidth=Math.round(this._combinedScaleFactor)):t.lineWidth=Math.max(n,a),t.stroke(),t.restore()}else{let e=this.getSinglePixelWidth();e<0&&-e>=this.current.lineWidth?(t.save(),t.resetTransform(),t.lineWidth=Math.round(this._combinedScaleFactor),t.stroke(),t.restore(
2)):(t.lineWidth=Math.max(e,this.current.lineWidth),t.stroke())}e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e=void 0===e||e;let t=this.ctx,r=this.current.fillColor,s=this.current.patternFill,i=!1;s&&(t.save(),this.baseTransform&&t.setTransform.apply(t,this.baseTransform),t.fillStyle=r.getPattern(t,this),i=!0),this.contentVisible&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),i&&t.restore(),e&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=R},eoClip:function(){this.pendingClip=T},beginText:function(){this.current.textMatrix=s.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){let e=this.pendingTextPaths,t=this.ctx;if(void 0===e)return void t.beginPath();t.save(),t.beginPath();for(let r=0;r<e.length;r++){let s=e[r];t.setTransform.apply(t,s.transform),t.translate(s.x,s.y),s.addToPath(t,s.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths},setCharSpacing:function(e){this.current.charSpacing=e},setWordSpacing:function(e){this.current.wordSpacing=e},setHScale:function(e){this.current.textHScale=e/100},setLeading:function(e){this.current.leading=-e},setFont:function(e,t){let r=this.commonObjs.get(e),i=this.current;if(!r)throw Error(`Can't find font for ${e}`);if(i.fontMatrix=r.fontMatrix||s.FONT_IDENTITY_MATRIX,(0===i.fontMatrix[0]||0===i.fontMatrix[3])&&(0,s.warn)("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;let o=r.loadedName||"sans-serif",l="normal";r.black?l="900":r.bold&&(l="bold");let h=r.italic?"italic":"normal",c=`"${o}", ${r.fallbackName}`,d=t;t<n?d=n:t>a&&(d=a),this.current.fontSizeScale=t/d,this.ctx.font=`${h} ${l} ${d}px ${c}`},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,r,s,i,n){this.current.textMatrix=[e,t,r,s,i,n],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar(e,t,r,i,n){let a,o=this.ctx,l=this.current,h=l.font,c=l.textRenderingMode,d=l.fontSize/l.fontSizeScale,u=c&s.TextRenderingMode.FILL_STROKE_MASK,p=!!(c&s.TextRenderingMode.ADD_TO_PATH_FLAG),g=l.patternFill&&!h.missingFile;(h.disableFontFace||p||g)&&(a=h.getPathGenerator(this.commonObjs,e)),h.disableFontFace||g?(o.save(),o.translate(t,r),o.beginPath(),a(o,d),i&&o.setTransform.apply(o,i),(u===s.TextRenderingMode.FILL||u===s.TextRenderingMode.FILL_STROKE)&&o.fill(),(u===s.TextRenderingMode.STROKE||u===s.TextRenderingMode.FILL_STROKE)&&(n&&(o.resetTransform(),o.lineWidth=Math.round(this._combinedScaleFactor)),o.stroke()),o.restore()):((u===s.TextRenderingMode.FILL||u===s.TextRenderingMode.FILL_STROKE)&&o.fillText(e,t,r),(u===s.TextRenderingMode.STROKE||u===s.TextRenderingMode.FILL_STROKE)&&(n?(o.save(),o.moveTo(t,r),o.resetTransform(),o.lineWidth=Math.round(this._combinedScaleFactor),o.strokeText(e,0,0),o.restore()):o.strokeText(e,t,r))),p&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:o.mozCurrentTransform,x:t,y:r,fontSize:d,addToPath:a})},get isFontSubpixelAAEnabled(){let{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);let t=e.getImageData(0,0,10,10).data,r=!1;for(let e=3;e<t.length;e+=4)if(t[e]>0&&t[e]<255){r=!0;break}return(0,s.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){let t,r=this.current,i=r.font;if(i.isType3Font)return this.showType3Text(e);let n=r.fontSize;if(0===n)return;let a=this.ctx,o=r.fontSizeScale,l=r.charSpacing,h=r.wordSpacing,c=r.fontDirection,d=r.textHScale*c,u=e.length,p=i.vertical,g=p?1:-1,f=i.defaultVMetrics,m=n*r.fontMatrix[0],A=r.textRenderingMode===s.TextRenderingMode.FILL&&!i.disableFontFace&&!r.patternFill;if(a.save(),r.patternFill){a.save();let e=r.fillColor.getPattern(a,this);
2t=a.mozCurrentTransform,a.restore(),a.fillStyle=e}a.transform.apply(a,r.textMatrix),a.translate(r.x,r.y+r.textRise),c>0?a.scale(d,-1):a.scale(d,1);let b=r.lineWidth,_=!1,y=r.textMatrixScale;if(0===y||0===b){let e=r.textRenderingMode&s.TextRenderingMode.FILL_STROKE_MASK;(e===s.TextRenderingMode.STROKE||e===s.TextRenderingMode.FILL_STROKE)&&(this._cachedGetSinglePixelWidth=null,_=(b=this.getSinglePixelWidth())<0)}else b/=y;1!==o&&(a.scale(o,o),b/=o),a.lineWidth=b;let S=0,v;for(v=0;v<u;++v){let r,d,u,b=e[v];if((0,s.isNum)(b)){S+=g*b*n/1e3;continue}let y=!1,C=(b.isSpace?h:0)+l,x=b.fontChar,P=b.accent,R=b.width;if(p){let e=b.vmetric||f,t=-(b.vmetric?e[1]:.5*R)*m,s=e[2]*m;R=e?-e[0]:R,r=t/o,d=(S+s)/o}else r=S/o,d=0;if(i.remeasure&&R>0){let e=1e3*a.measureText(x).width/n*o;if(R<e&&this.isFontSubpixelAAEnabled){let t=R/e;y=!0,a.save(),a.scale(t,1),r/=t}else R!==e&&(r+=(R-e)/2e3*n/o)}if(this.contentVisible&&(b.isInFont||i.missingFile)){if(A&&!P)a.fillText(x,r,d);else if(this.paintChar(x,r,d,t,_),P){let e=r+n*P.offset.x/o,s=d-n*P.offset.y/o;this.paintChar(P.fontChar,e,s,t,_)}}S+=u=p?R*m-C*c:R*m+C*c,y&&a.restore()}p?r.y-=S:r.x+=S*d,a.restore()},showType3Text:function(e){let t,r,i,n,a=this.ctx,o=this.current,l=o.font,h=o.fontSize,c=o.fontDirection,d=l.vertical?1:-1,u=o.charSpacing,p=o.wordSpacing,g=o.textHScale*c,f=o.fontMatrix||s.FONT_IDENTITY_MATRIX,m=e.length;if(o.textRenderingMode!==s.TextRenderingMode.INVISIBLE&&0!==h){for(this._cachedGetSinglePixelWidth=null,a.save(),a.transform.apply(a,o.textMatrix),a.translate(o.x,o.y),a.scale(g,c),t=0;t<m;++t){if(r=e[t],(0,s.isNum)(r)){n=d*r*h/1e3,this.ctx.translate(n,0),o.x+=n*g;continue}let c=(r.isSpace?p:0)+u,m=l.charProcOperatorList[r.operatorListId];if(!m){(0,s.warn)(`Type3 character "${r.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=r,this.save(),a.scale(h,h),a.transform.apply(a,f),this.executeOperatorList(m),this.restore()),i=s.Util.applyTransform([r.width,0],f)[0]*h+c,a.translate(i,0),o.x+=i*g}a.restore(),this.processingType3=null}},setCharWidth:function(e,t){},setCharWidthAndBounds:function(e,t,r,s,i,n){this.ctx.rect(r,s,i-r,n-s),this.clip(),this.endPath()},getColorN_Pattern:function(e){let t;if("TilingPattern"===e[0]){let s=e[1],n=this.baseTransform||this.ctx.mozCurrentTransform.slice(),a={createCanvasGraphics:e=>new r(e,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext)};t=new i.TilingPattern(e,s,this.ctx,a,n)}else t=(0,i.getShadingPatternFromIR)(e);return t},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(e,t,r){let i=s.Util.makeHexColor(e,t,r);this.ctx.strokeStyle=i,this.current.strokeColor=i},setFillRGBColor:function(e,t,r){let i=s.Util.makeHexColor(e,t,r);this.ctx.fillStyle=i,this.current.fillColor=i,this.current.patternFill=!1},shadingFill:function(e){if(!this.contentVisible)return;let t=this.ctx;this.save(),t.fillStyle=(0,i.getShadingPatternFromIR)(e).getPattern(t,this,!0);let r=t.mozCurrentTransformInverse;if(r){let e=t.canvas,i=e.width,n=e.height,a=s.Util.applyTransform([0,0],r),o=s.Util.applyTransform([0,n],r),l=s.Util.applyTransform([i,0],r),h=s.Util.applyTransform([i,n],r),c=Math.min(a[0],o[0],l[0],h[0]),d=Math.min(a[1],o[1],l[1],h[1]),u=Math.max(a[0],o[0],l[0],h[0]),p=Math.max(a[1],o[1],l[1],h[1]);this.ctx.fillRect(c,d,u-c,p-d)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,s.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,s.unreachable)("Should not call beginImageData")},paintFormXObjectBegin:function(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t)){let e=t[2]-t[0],r=t[3]-t[1];this.ctx.rect(t[0],t[1],e,r),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())},beginGroup:function(e){if(!this.contentVisible)return;this.save();let t=this.ctx;
2e.isolated||(0,s.info)("TODO: Support non-isolated groups."),e.knockout&&(0,s.warn)("Knockout groups not supported.");let r=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw Error("Bounding box is required.");let i=s.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),n=[0,0,t.canvas.width,t.canvas.height],a=Math.floor((i=s.Util.intersect(i,n)||[0,0,0,0])[0]),l=Math.floor(i[1]),h=Math.max(Math.ceil(i[2])-a,1),c=Math.max(Math.ceil(i[3])-l,1),d=1,u=1;h>o&&(d=h/o,h=o),c>o&&(u=c/o,c=o);let p="groupAt"+this.groupLevel;e.smask&&(p+="_smask_"+this.smaskCounter++%2);let g=this.cachedCanvases.getCanvas(p,h,c,!0),f=g.context;f.scale(1/d,1/u),f.translate(-a,-l),f.transform.apply(f,r),e.smask?this.smaskStack.push({canvas:g.canvas,context:f,offsetX:a,offsetY:l,scaleX:d,scaleY:u,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(a,l),t.scale(d,u)),A(t,f),this.ctx=f,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null},endGroup:function(e){if(!this.contentVisible)return;this.groupLevel--;let t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,r){if(this.save(),b(this.ctx),this.current=new f,Array.isArray(e)&&4===e.length){let t=e[2]-e[0],r=e[3]-e[1];this.ctx.rect(e[0],e[1],t,r),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){if(!this.contentVisible)return;let t=this.ctx,r=e.width,s=e.height,i=this.current.fillColor,n=this.current.patternFill,a=this.processingType3;if(l&&a&&void 0===a.compiled&&(r<=h&&s<=h?a.compiled=g({data:e.data,width:r,height:s}):a.compiled=null),a?.compiled)return void a.compiled(t);let o=this.cachedCanvases.getCanvas("maskCanvas",r,s),c=o.context;c.save(),m(c,e),c.globalCompositeOperation="source-in",c.fillStyle=n?i.getPattern(c,this):i,c.fillRect(0,0,r,s),c.restore(),this.paintInlineImageXObject(o.canvas)},paintImageMaskXObjectRepeat(e,t,r=0,s=0,i,n){if(!this.contentVisible)return;let a=e.width,o=e.height,l=this.current.fillColor,h=this.current.patternFill,c=this.cachedCanvases.getCanvas("maskCanvas",a,o),d=c.context;d.save(),m(d,e),d.globalCompositeOperation="source-in",d.fillStyle=h?l.getPattern(d,this):l,d.fillRect(0,0,a,o),d.restore();let u=this.ctx;for(let e=0,l=n.length;e<l;e+=2)u.save(),u.transform(t,r,s,i,n[e],n[e+1]),u.scale(1,-1),u.drawImage(c.canvas,0,0,a,o,0,-1,1,1),u.restore()},paintImageMaskXObjectGroup:function(e){if(!this.contentVisible)return;let t=this.ctx,r=this.current.fillColor,s=this.current.patternFill;for(let i=0,n=e.length;i<n;i++){let n=e[i],a=n.width,o=n.height,l=this.cachedCanvases.getCanvas("maskCanvas",a,o),h=l.context;h.save(),m(h,n),h.globalCompositeOperation="source-in",h.fillStyle=s?r.getPattern(h,this):r,h.fillRect(0,0,a,o),h.restore(),t.save(),t.transform.apply(t,n.transform),t.scale(1,-1),t.drawImage(l.canvas,0,0,a,o,0,-1,1,1),t.restore()}},paintImageXObject:function(e){if(!this.contentVisible)return;let t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(!t)return void(0,s.warn)("Dependent image isn't ready yet");this.paintInlineImageXObject(t)},paintImageXObjectRepeat:function(e,t,r,i){if(!this.contentVisible)return;let n=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(!n)return void(0,s.warn)("Dependent image isn't ready yet");let a=n.width,o=n.height,l=[];for(let e=0,s=i.length;e<s;e+=2)l.push({transform:[t,0,0,r,i[e],i[e+1]],x:0,y:0,w:a,h:o});this.paintInlineImageXObjectGroup(n,l)},paintInlineImageXObject:function(e){let t,r,s;if(!this.contentVisible)return;
2let i=e.width,n=e.height,a=this.ctx;this.save(),a.scale(1/i,-1/n);let o=a.mozCurrentTransformInverse,l=Math.max(Math.hypot(o[0],o[1]),1),h=Math.max(Math.hypot(o[2],o[3]),1);"function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data?t=e:(d(s=(r=this.cachedCanvases.getCanvas("inlineImage",i,n)).context,e,this.current.transferMaps),t=r.canvas);let c=i,u=n,p="prescale1";for(;l>2&&c>1||h>2&&u>1;){let e=c,i=u;l>2&&c>1&&(e=Math.ceil(c/2),l/=c/e),h>2&&u>1&&(i=Math.ceil(u/2),h/=u/i),(s=(r=this.cachedCanvases.getCanvas(p,e,i)).context).clearRect(0,0,e,i),s.drawImage(t,0,0,c,u,0,0,e,i),t=r.canvas,c=e,u=i,p="prescale1"===p?"prescale2":"prescale1"}if(a.drawImage(t,0,0,c,u,0,-n,i,n),this.imageLayer){let t=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:t[0],top:t[1],width:i/o[0],height:n/o[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,t){if(!this.contentVisible)return;let r=this.ctx,s=e.width,i=e.height,n=this.cachedCanvases.getCanvas("inlineImage",s,i);d(n.context,e,this.current.transferMaps);for(let a=0,o=t.length;a<o;a++){let o=t[a];if(r.save(),r.transform.apply(r,o.transform),r.scale(1,-1),r.drawImage(n.canvas,o.x,o.y,o.w,o.h,0,-1,1,1),this.imageLayer){let t=this.getCanvasPosition(o.x,o.y);this.imageLayer.appendImage({imgData:e,left:t[0],top:t[1],width:s,height:i})}r.restore()}},paintSolidColorImageMask:function(){this.contentVisible&&this.ctx.fillRect(0,0,1,1)},markPoint:function(e){},markPointProps:function(e,t){},beginMarkedContent:function(e){this.markedContentStack.push({visible:!0})},beginMarkedContentProps:function(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()},endMarkedContent:function(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()},beginCompat:function(){},endCompat:function(){},consumePath:function(){let e=this.ctx;this.pendingClip&&(this.pendingClip===T?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()},getSinglePixelWidth(){if(null===this._cachedGetSinglePixelWidth){let e=this.ctx.mozCurrentTransform,t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=e[0]**2+e[2]**2,s=e[1]**2+e[3]**2,i=Math.sqrt(Math.max(r,s))/t;r!==s&&this._combinedScaleFactor*i>1?this._cachedGetSinglePixelWidth=-(this._combinedScaleFactor*i):t>Number.EPSILON?this._cachedGetSinglePixelWidth=i:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth},getCanvasPosition:function(e,t){let r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]},isContentVisible:function(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}},s.OPS)r.prototype[s.OPS[c]]=r.prototype[c];return r}()},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=o,t.TilingPattern=void 0;var s=r(2);let i={};function n(e,t){if(!t||"undefined"==typeof Path2D)return;let r=t[2]-t[0],s=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],r,s),e.clip(i)}i.RadialAxial={fromIR:function(e){let t=e[1],r=e[2],s=e[3],i=e[4],a=e[5],o=e[6],l=e[7];return{getPattern:function(e){let h;n(e,r),"axial"===t?h=e.createLinearGradient(i[0],i[1],a[0],a[1]):"radial"===t&&(h=e.createRadialGradient(i[0],i[1],o,a[0],a[1],l));for(let e=0,t=s.length;e<t;++e){let t=s[e];h.addColorStop(t[0],t[1])}return h}}}};let a=function(){function e(e,t,r,s,i,n,a,o){let l,h,c,d,u,p,g,f,m,A=t.coords,b=t.colors,_=e.data,y=4*e.width;A[r+1]>A[s+1]&&(l=r,r=s,s=l,l=n,n=a,a=l),A[s+1]>A[i+1]&&(l=s,s=i,i=l,l=a,a=o,o=l),A[r+1]>A[s+1]&&(l=r,r=s,s=l,l=n,n=a,a=l);let S=(A[r]+t.offsetX)*t.scaleX,v=(A[r+1]+t.offsetY)*t.scaleY,C=(A[s]+t.offsetX)*t.scaleX,x=(A[s+1]+t.offsetY)*t.scaleY,P=(A[i]+t.offsetX)*t.scaleX,R=(A[i+1]+t.offsetY)*t.scaleY;if(v>=R)return;let T=b[n],k=b[n+1],E=b[n+2],w=b[a],F=b[a+1],L=b[a+2],M=b[o],O=b[o+1],I=b[o+2],D=Math.round(v),N=Math.round(R);for(let e=D;e<=N;e++){let t;if(e<x){let t;h=S-(S-C)*(t=e<v?0:v===x?1:(v-e)/(v-x)),c=T-(T-w)*t,d=k-(k-F)*t,u=E-(E-L)*t}else{let t;h=C-(C-P)*(t=e>R?1:x===R?0:(x-e)/(x-R)),c=w-(w-M)*t,d=F-(F-O)*t,u=L-(L-I)*t}p=S-(S-P)*(t=e<v?0:e>R?1:(v-e)/(v-R)),g=T-(T-M)*t,f=k-(k-O)*t,m=E-(E-I)*t;let r=Math.round(Math.min(h,p)),s=Math.round(Math.max(h,p)),i=y*e+4*r;for(let e=r;e<=s;e++)(t=(h-e)/(h-p))<0?t=0:t>1&&(t=1),_[i++]=c-(c-g)*t|0,_[i++]=d-(d-f)*t|0,_[i++]=u-(u-m)*t|0,_[i++]=255}}function t(t,r,s){let i,n,a=r.coords,o=r.colors;switch(r.type){case"lattice":let l=r.verticesPerRow,h=Math.floor(a.length/l)-1,c=l-1;for(i=0;i<h;i++){let r=i*l;for(let i=0;i<c;i++,r++)e(t,s,a[r],a[r+1],a[r+l],o[r],o[r+1],o[r+l]),e(t,s,a[r+l+1],a[r+1
2],a[r+l],o[r+l+1],o[r+1],o[r+l])}break;case"triangles":for(i=0,n=a.length;i<n;i+=3)e(t,s,a[i],a[i+1],a[i+2],o[i],o[i+1],o[i+2]);break;default:throw Error("illegal figure")}}return function(e,r,s,i,n,a,o,l){let h,c,d,u,p=1.1,g=3e3,f=2,m=Math.floor(e[0]),A=Math.floor(e[1]),b=Math.ceil(e[2])-m,_=Math.ceil(e[3])-A,y=Math.min(Math.ceil(Math.abs(b*r[0]*p)),g),S=Math.min(Math.ceil(Math.abs(_*r[1]*p)),g),v=b/y,C=_/S,x={coords:s,colors:i,offsetX:-m,offsetY:-A,scaleX:1/v,scaleY:1/C},P=y+2*f,R=S+2*f;if(l.isEnabled)h=l.drawFigures({width:y,height:S,backgroundColor:a,figures:n,context:x}),(c=o.getCanvas("mesh",P,R,!1)).context.drawImage(h,f,f),h=c.canvas;else{let e=(c=o.getCanvas("mesh",P,R,!1)).context,r=e.createImageData(y,S);if(a){let e=r.data;for(d=0,u=e.length;d<u;d+=4)e[d]=a[0],e[d+1]=a[1],e[d+2]=a[2],e[d+3]=255}for(d=0;d<n.length;d++)t(r,n[d],x);e.putImageData(r,f,f),h=c.canvas}return{canvas:h,offsetX:m-f*v,offsetY:A-f*C,scaleX:v,scaleY:C}}}();function o(e){let t=i[e[0]];if(!t)throw Error(`Unknown IR type: ${e[0]}`);return t.fromIR(e)}i.Mesh={fromIR:function(e){let t=e[2],r=e[3],i=e[4],o=e[5],l=e[6],h=e[7],c=e[8];return{getPattern:function(e,d,u){let p;if(n(e,h),u)p=s.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(p=s.Util.singularValueDecompose2dScale(d.baseTransform),l){let e=s.Util.singularValueDecompose2dScale(l);p=[p[0]*e[0],p[1]*e[1]]}let g=a(o,p,t,r,i,u?null:c,d.cachedCanvases,d.webGLContext);return!u&&(e.setTransform.apply(e,d.baseTransform),l&&e.transform.apply(e,l)),e.translate(g.offsetX,g.offsetY),e.scale(g.scaleX,g.scaleY),e.createPattern(g.canvas,"no-repeat")}}}},i.Dummy={fromIR:function(){return{getPattern:function(){return"hotpink"}}}},t.TilingPattern=function(){let e={COLORED:1,UNCOLORED:2},t=3e3;function r(e,t,r,s,i){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.canvasGraphicsFactory=s,this.baseTransform=i,this.ctx=r}return r.prototype={createPatternCanvas:function(e){let t=this.operatorList,r=this.bbox,i=this.xstep,n=this.ystep,a=this.paintType,o=this.tilingType,l=this.color,h=this.canvasGraphicsFactory;(0,s.info)("TilingType: "+o);let c=r[0],d=r[1],u=r[2],p=r[3],g=s.Util.singularValueDecompose2dScale(this.matrix),f=s.Util.singularValueDecompose2dScale(this.baseTransform),m=[g[0]*f[0],g[1]*f[1]],A=this.getSizeAndScale(i,this.ctx.canvas.width,m[0]),b=this.getSizeAndScale(n,this.ctx.canvas.height,m[1]),_=e.cachedCanvases.getCanvas("pattern",A.size,b.size,!0),y=_.context,S=h.createCanvasGraphics(y);return S.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(S,a,l),S.transform(A.scale,0,0,b.scale,0,0),S.transform(1,0,0,1,-c,-d),this.clipBbox(S,r,c,d,u,p),S.executeOperatorList(t),this.ctx.transform(1,0,0,1,c,d),this.ctx.scale(1/A.scale,1/b.scale),_.canvas},getSizeAndScale:function(e,r,s){let i=Math.max(t,r),n=Math.ceil((e=Math.abs(e))*s);return n>=i?n=i:s=n/e,{scale:s,size:n}},clipBbox:function(e,t,r,s,i,n){if(Array.isArray(t)&&4===t.length){let t=i-r,a=n-s;e.ctx.rect(r,s,t,a),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(t,r,i){let n=t.ctx,a=t.current;switch(r){case e.COLORED:let o=this.ctx;n.fillStyle=o.fillStyle,n.strokeStyle=o.strokeStyle,a.fillColor=o.fillStyle,a.strokeColor=o.strokeStyle;break;case e.UNCOLORED:let l=s.Util.makeHexColor(i[0],i[1],i[2]);n.fillStyle=l,n.strokeStyle=l,a.fillColor=l,a.strokeColor=l;break;default:throw new s.FormatError(`Unsupported paint type: ${r}`)}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);let r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}()},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;let r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=void 0===r.workerPort?null:r.workerPort,r.workerSrc=void 0===r.workerSrc?"":r.workerSrc},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var s=r(2);let i={DATA:1,ERROR:2},n={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function a(e){if("object"!=typeof e||null===e)return e;switch(e.name){case"AbortException":return new s.AbortException(e.message);case"MissingPDFException":return new s.MissingPDFException(e.message);case"UnexpectedResponseException":return new s.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new s.UnknownErrorException(e.message,e.details);default:return new s.UnknownErrorException(e.message,e.toString())}}class o{constructor(e,t,r){this.sourceName=e,this.targetName=t,this.comObj=r,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{let t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this._processStreamMessage(t);if(t.callback){let e=t.callbackId,r=this.callbackCapabilities[e];if(!r)throw Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],t.callback===i.DATA)r.resolve(t.data);else if(t.callback===i.ERROR)r.reject(a(t.reason));else throw Error("Unexpected callback case");return}let s=this.actionHandler[t.action];if(!s)throw Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){let e=this.sourceName,n=t.sourceName;new Promise(function(e){e(s(t.data))}).then(function(s){r.postMessage({sourceName:e,targetName:n,callback:i.DATA,callbackId:t.callbackId,data:s})},function(s){r.postMessage({sourceName:e,targetName:n,callback:i.ERROR,callbackId:t.callbackId,reason:a(s)})});return}if(t.streamId)return void this._createStreamSink(t);s(t.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){let r=this.actionHandler;if(r[e])throw Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}
2sendWithPromise(e,t,r){let i=this.callbackId++,n=(0,s.createPromiseCapability)();this.callbackCapabilities[i]=n;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},r)}catch(e){n.reject(e)}return n.promise}sendWithStream(e,t,r,i){let o=this.streamId++,l=this.sourceName,h=this.targetName,c=this.comObj;return new ReadableStream({start:r=>{let n=(0,s.createPromiseCapability)();return this.streamControllers[o]={controller:r,startCall:n,pullCall:null,cancelCall:null,isClosed:!1},this._postMessage({sourceName:l,targetName:h,action:e,streamId:o,data:t,desiredSize:r.desiredSize},i),n.promise},pull:e=>{let t=(0,s.createPromiseCapability)();return this.streamControllers[o].pullCall=t,c.postMessage({sourceName:l,targetName:h,stream:n.PULL,streamId:o,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,s.assert)(e instanceof Error,"cancel must have a valid reason");let t=(0,s.createPromiseCapability)();return this.streamControllers[o].cancelCall=t,this.streamControllers[o].isClosed=!0,c.postMessage({sourceName:l,targetName:h,stream:n.CANCEL,streamId:o,reason:a(e)}),t.promise}},r)}_createStreamSink(e){let t=this,r=this.actionHandler[e.action],i=e.streamId,o=this.sourceName,l=e.sourceName,h=this.comObj,c={enqueue(e,r=1,a){if(this.isCancelled)return;let h=this.desiredSize;this.desiredSize-=r,h>0&&this.desiredSize<=0&&(this.sinkCapability=(0,s.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:o,targetName:l,stream:n.ENQUEUE,streamId:i,chunk:e},a)},close(){this.isCancelled||(this.isCancelled=!0,h.postMessage({sourceName:o,targetName:l,stream:n.CLOSE,streamId:i}),delete t.streamSinks[i])},error(e){(0,s.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,h.postMessage({sourceName:o,targetName:l,stream:n.ERROR,streamId:i,reason:a(e)}))},sinkCapability:(0,s.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[i]=c,new Promise(function(t){t(r(e.data,c))}).then(function(){h.postMessage({sourceName:o,targetName:l,stream:n.START_COMPLETE,streamId:i,success:!0})},function(e){h.postMessage({sourceName:o,targetName:l,stream:n.START_COMPLETE,streamId:i,reason:a(e)})})}_processStreamMessage(e){let t=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj;switch(e.stream){case n.START_COMPLETE:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(a(e.reason));break;case n.PULL_COMPLETE:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(a(e.reason));break;case n.PULL:if(!this.streamSinks[t]){o.postMessage({sourceName:r,targetName:i,stream:n.PULL_COMPLETE,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;let{onPull:l}=this.streamSinks[e.streamId];new Promise(function(e){e(l&&l())}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:n.PULL_COMPLETE,streamId:t,success:!0})},function(e){o.postMessage({sourceName:r,targetName:i,stream:n.PULL_COMPLETE,streamId:t,reason:a(e)})});break;case n.ENQUEUE:if((0,s.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case n.CLOSE:if((0,s.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case n.ERROR:(0,s.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(a(e.reason)),this._deleteStreamController(t);break;case n.CANCEL_COMPLETE:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(a(e.reason)),this._deleteStreamController(t);break;case n.CANCEL:if(!this.streamSinks[t])break;let{onCancel:h}=this.streamSinks[e.streamId];new Promise(function(t){t(h&&h(a(e.reason)))}).then(function(){o.postMessage({sourceName:r,targetName:i,stream:n.CANCEL_COMPLETE,streamId:t,success:!0})},function(e){o.postMessage({sourceName:r,targetName:i,stream:n.CANCEL_COMPLETE,streamId:t,reason:a(e)})}),this.streamSinks[t].sinkCapability.reject(a(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw Error("Unexpected stream case")}}async _deleteStreamController(e){await Promise.allSettled([this.streamControllers[e].startCall,this.streamControllers[e].pullCall,this.streamControllers[e].cancelCall].map(function(e){return e&&e.promise})),delete this.streamControllers[e]}_postMessage(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}t.MessageHandler=o},(e,t,r)=>
2{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var s=r(2);class i{constructor({parsedData:e,rawData:t}){this._metadataMap=e,this._data=t}getRaw(){return this._data}get(e){return this._metadataMap.get(e)??null}getAll(){return(0,s.objectFromMap)(this._metadataMap)}has(e){return this._metadataMap.has(e)}}t.Metadata=i},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var s=r(2);class i{constructor(e,t){this.visible=!0,this.name=e,this.intent=t}}class n{constructor(e){if(this.name=null,this.creator=null,this._order=null,this._groups=new Map,null===e)return;for(let t of(this.name=e.name,this.creator=e.creator,this._order=e.order,e.groups))this._groups.set(t.id,new i(t.name,t.intent));if("OFF"===e.baseState)for(let e of this._groups)e.visible=!1;for(let t of e.on)this._groups.get(t).visible=!0;for(let t of e.off)this._groups.get(t).visible=!1}isVisible(e){if("OCG"===e.type)return this._groups.has(e.id)?this._groups.get(e.id).visible:((0,s.warn)(`Optional content group not found: ${e.id}`),!0);if("OCMD"===e.type){if(e.expression&&(0,s.warn)("Visibility expression not supported yet."),e.policy&&"AnyOn"!==e.policy){if("AllOn"===e.policy){for(let t of e.ids){if(!this._groups.has(t)){(0,s.warn)(`Optional content group not found: ${t}`);break}if(!this._groups.get(t).visible)return!1}return!0}else if("AnyOff"===e.policy){for(let t of e.ids){if(!this._groups.has(t))return(0,s.warn)(`Optional content group not found: ${t}`),!0;if(!this._groups.get(t).visible)return!0}return!1}else if("AllOff"===e.policy){for(let t of e.ids){if(!this._groups.has(t)){(0,s.warn)(`Optional content group not found: ${t}`);break}if(this._groups.get(t).visible)return!1}return!0}}else{for(let t of e.ids){if(!this._groups.has(t))return(0,s.warn)(`Optional content group not found: ${t}`),!0;if(this._groups.get(t).visible)return!0}return!1}return(0,s.warn)(`Unknown optional content policy ${e.policy}.`),!0}return(0,s.warn)(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0){if(!this._groups.has(e))return void(0,s.warn)(`Optional content group not found: ${e}`);this._groups.get(e).visible=!!t}getOrder(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}getGroups(){return this._groups.size>0?(0,s.objectFromMap)(this._groups):null}getGroup(e){return this._groups.get(e)||null}}t.OptionalContentConfig=n},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}
2),t.PDFDataTransportStream=void 0;var s=r(2),i=r(1);class n{constructor(e,t){(0,s.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=e.progressiveDone||!1,this._contentDispositionFilename=e.contentDispositionFilename||null;let r=e.initialData;if(r?.length>0){let e=new Uint8Array(r).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._contentLength=e.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((e,t)=>{this._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener((e,t)=>{this._onProgress({loaded:e,total:t})}),this._pdfDataRangeTransport.addProgressiveReadListener(e=>{this._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){let t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{let r=this._rangeReaders.some(function(r){return r._begin===e.begin&&(r._enqueue(t),!0)});(0,s.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){if(void 0===e.total){let t=this._rangeReaders[0];t?.onProgress&&t.onProgress({loaded:e.loaded})}else{let t=this._fullRequestReader;t?.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){let t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,s.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");let e=this._queuedChunks;return this._queuedChunks=null,new a(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let r=new o(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeReaders.slice(0).forEach(function(t){t.cancel(e)}),this._pdfDataRangeTransport.abort()}}t.PDFDataTransportStream=n;class a{constructor(e,t,r=!1,s=null){for(let n of(this._stream=e,this._done=r||!1,this._filename=(0,i.isPdfFile)(s)?s:null,this._queuedChunks=t||[],this._loaded=0,this._queuedChunks))this._loaded+=n.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[]}progressiveDone(){this._done||(this._done=!0)}}class o{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){this._done||(0===this._requests.length?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){let e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};let e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}
2cancel(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._stream._removeRangeReader(this)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var s=r(2);class i{constructor({enable:e=!1}){this._enabled=!0===e}get isEnabled(){let e=this._enabled;return e&&(e=n.tryInitGL()),(0,s.shadow)(this,"isEnabled",e)}composeSMask({layer:e,mask:t,properties:r}){return n.composeSMask(e,t,r)}drawFigures({width:e,height:t,backgroundColor:r,figures:s,context:i}){return n.drawFigures(e,t,r,s,i)}clear(){n.cleanup()}}t.WebGLContext=i;let n=function(){let e,t;function r(e,t,r){let s=e.createShader(r);if(e.shaderSource(s,t),e.compileShader(s),!e.getShaderParameter(s,e.COMPILE_STATUS))throw Error("Error during shader compilation: "+e.getShaderInfoLog(s));return s}function s(e,t){return r(e,t,e.VERTEX_SHADER)}function i(e,t){return r(e,t,e.FRAGMENT_SHADER)}function n(e,t){let r=e.createProgram();for(let s=0,i=t.length;s<i;++s)e.attachShader(r,t[s]);if(e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS))throw Error("Error during program linking: "+e.getProgramInfoLog(r));return r}function a(e,t,r){e.activeTexture(r);let s=e.createTexture();return e.bindTexture(e.TEXTURE_2D,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),s}function o(){e||(e=(t=document.createElement("canvas")).getContext("webgl",{premultipliedalpha:!1}))}let l=" attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ",h=" precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ",c=null;function d(){o();let r=t;t=null;let a=e;e=null;let d=s(a,l),u=i(a,h),p=n(a,[d,u]);a.useProgram(p);let g={};g.gl=a,g.canvas=r,g.resolutionLocation=a.getUniformLocation(p,"u_resolution"),g.positionLocation=a.getAttribLocation(p,"a_position"),g.backdropLocation=a.getUniformLocation(p,"u_backdrop"),g.subtypeLocation=a.getUniformLocation(p,"u_subtype");let f=a.getAttribLocation(p,"a_texCoord"),m=a.getUniformLocation(p,"u_image"),A=a.getUniformLocation(p,"u_mask"),b=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b),a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),a.STATIC_DRAW),a.enableVertexAttribArray(f),a.vertexAttribPointer(f,2,a.FLOAT,!1,0,0),a.uniform1i(m,0),a.uniform1i(A,1),c=g}let u=" attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ",p=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",g=null;function f(){o();let r=t;t=null;let a=e;e=null;let l=s(a,u),h=i(a,p),c=n(a,[l,h]);a.useProgram(c);let d={};d.gl=a,d.canvas=r,d.resolutionLocation=a.getUniformLocation(c,"u_resolution"),d.scaleLocation=a.getUniformLocation(c,"u_scale"),d.offsetLocation=a.getUniformLocation(c,"u_offset"),d.positionLocation=a.getAttribLocation(c,"a_position"),d.colorLocation=a.getAttribLocation(c,"a_color"),g=d}return{tryInitGL(){try{return o(),!!e}catch(e){}return!1}
2,composeSMask:function(e,t,r){let s=e.width,i=e.height;c||d();let n=c,o=n.canvas,l=n.gl;o.width=s,o.height=i,l.viewport(0,0,l.drawingBufferWidth,l.drawingBufferHeight),l.uniform2f(n.resolutionLocation,s,i),r.backdrop?l.uniform4f(n.resolutionLocation,r.backdrop[0],r.backdrop[1],r.backdrop[2],1):l.uniform4f(n.resolutionLocation,0,0,0,0),l.uniform1i(n.subtypeLocation,+("Luminosity"===r.subtype));let h=a(l,e,l.TEXTURE0),u=a(l,t,l.TEXTURE1),p=l.createBuffer();return l.bindBuffer(l.ARRAY_BUFFER,p),l.bufferData(l.ARRAY_BUFFER,new Float32Array([0,0,s,0,0,i,0,i,s,0,s,i]),l.STATIC_DRAW),l.enableVertexAttribArray(n.positionLocation),l.vertexAttribPointer(n.positionLocation,2,l.FLOAT,!1,0,0),l.clearColor(0,0,0,0),l.enable(l.BLEND),l.blendFunc(l.ONE,l.ONE_MINUS_SRC_ALPHA),l.clear(l.COLOR_BUFFER_BIT),l.drawArrays(l.TRIANGLES,0,6),l.flush(),l.deleteTexture(h),l.deleteTexture(u),l.deleteBuffer(p),o},drawFigures:function(e,t,r,s,i){g||f();let n=g,a=n.canvas,o=n.gl;a.width=e,a.height=t,o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),o.uniform2f(n.resolutionLocation,e,t);let l=0;for(let e=0,t=s.length;e<t;e++)switch(s[e].type){case"lattice":l+=((s[e].coords.length/s[e].verticesPerRow|0)-1)*(s[e].verticesPerRow-1)*6;break;case"triangles":l+=s[e].coords.length}let h=new Float32Array(2*l),c=new Uint8Array(3*l),d=i.coords,u=i.colors,p=0,m=0;for(let e=0,t=s.length;e<t;e++){let t=s[e],r=t.coords,i=t.colors;switch(t.type){case"lattice":let n=t.verticesPerRow,a=r.length/n|0;for(let e=1;e<a;e++){let t=e*n+1;for(let e=1;e<n;e++,t++)h[p]=d[r[t-n-1]],h[p+1]=d[r[t-n-1]+1],h[p+2]=d[r[t-n]],h[p+3]=d[r[t-n]+1],h[p+4]=d[r[t-1]],h[p+5]=d[r[t-1]+1],c[m]=u[i[t-n-1]],c[m+1]=u[i[t-n-1]+1],c[m+2]=u[i[t-n-1]+2],c[m+3]=u[i[t-n]],c[m+4]=u[i[t-n]+1],c[m+5]=u[i[t-n]+2],c[m+6]=u[i[t-1]],c[m+7]=u[i[t-1]+1],c[m+8]=u[i[t-1]+2],h[p+6]=h[p+2],h[p+7]=h[p+3],h[p+8]=h[p+4],h[p+9]=h[p+5],h[p+10]=d[r[t]],h[p+11]=d[r[t]+1],c[m+9]=c[m+3],c[m+10]=c[m+4],c[m+11]=c[m+5],c[m+12]=c[m+6],c[m+13]=c[m+7],c[m+14]=c[m+8],c[m+15]=u[i[t]],c[m+16]=u[i[t]+1],c[m+17]=u[i[t]+2],p+=12,m+=18}break;case"triangles":for(let e=0,t=r.length;e<t;e++)h[p]=d[r[e]],h[p+1]=d[r[e]+1],c[m]=u[i[e]],c[m+1]=u[i[e]+1],c[m+2]=u[i[e]+2],p+=2,m+=3}}r?o.clearColor(r[0]/255,r[1]/255,r[2]/255,1):o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT);let A=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,A),o.bufferData(o.ARRAY_BUFFER,h,o.STATIC_DRAW),o.enableVertexAttribArray(n.positionLocation),o.vertexAttribPointer(n.positionLocation,2,o.FLOAT,!1,0,0);let b=o.createBuffer();return o.bindBuffer(o.ARRAY_BUFFER,b),o.bufferData(o.ARRAY_BUFFER,c,o.STATIC_DRAW),o.enableVertexAttribArray(n.colorLocation),o.vertexAttribPointer(n.colorLocation,3,o.UNSIGNED_BYTE,!1,0,0),o.uniform2f(n.scaleLocation,i.scaleX,i.scaleY),o.uniform2f(n.offsetLocation,i.offsetX,i.offsetY),o.drawArrays(o.TRIANGLES,0,l),o.flush(),o.deleteBuffer(A),o.deleteBuffer(b),a},cleanup(){c?.canvas&&(c.canvas.width=0,c.canvas.height=0),g?.canvas&&(g.canvas.width=0,g.canvas.height=0),c=null,g=null}}}()},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var s=r(1),i=r(2),n=r(8),a=r(19);class o{static create(e){switch(e.data.annotationType){case i.AnnotationType.LINK:return new h(e);case i.AnnotationType.TEXT:return new c(e);case i.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new u(e);case"Btn":if(e.data.radioButton)return new g(e);if(e.data.checkBox)return new p(e);return new f(e);case"Ch":return new m(e)}return new d(e);case i.AnnotationType.POPUP:return new A(e);case i.AnnotationType.FREETEXT:return new _(e);case i.AnnotationType.LINE:return new y(e);case i.AnnotationType.SQUARE:return new S(e);case i.AnnotationType.CIRCLE:return new v(e);case i.AnnotationType.POLYLINE:return new C(e);case i.AnnotationType.CARET:return new P(e);case i.AnnotationType.INK:return new R(e);case i.AnnotationType.POLYGON:return new x(e);case i.AnnotationType.HIGHLIGHT:return new T(e);case i.AnnotationType.UNDERLINE:return new k(e);case i.AnnotationType.SQUIGGLY:return new E(e);case i.AnnotationType.STRIKEOUT:return new w(e);case i.AnnotationType.STAMP:return new F(e);case i.AnnotationType.FILEATTACHMENT:return new L(e);default:return new l(e)}}}class l{constructor(e,{isRenderable:t=!1,ignoreBorder:r=!1,createQuadrilaterals:s=!1}={}){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderInteractiveForms=e.renderInteractiveForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._mouseState=e.mouseState,t&&(this.container=this._createContainer(r)),s&&(this.quadrilaterals=this._createQuadrilaterals(r))}_createContainer(e=!1){let t=this.data,r=this.page,s=this.viewport,n=document.createElement("section"),a=t.rect[2]-t.rect[0],o=t.rect[3]-t.rect[1];n.setAttribute("data-annotation-id",t.id);let l=i.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(n.style.transform=`matrix(${s.transform.join(",")})`,n.style.transformOrigin=`${-l[0]}px ${-l[1]}px`,!e&&t.borderStyle.width>0){n.style.borderWidth=`${t.borderStyle.width}px`,t.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(a-=2*t.borderStyle.width,o-=2*t.borderStyle.width);let e=t.borderStyle.horizontalCornerRadius,r=t.borderStyle.verticalCornerRadius;if(e>0||r>0){let t=`${e}px / ${r}px`;n.style.borderRadius=t}switch(t.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:n.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:n.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:n.style.borderBottomStyle="solid"}t.color?n.style.borderColor=i.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):n.style.borderWidth=0}return n.style.left=`${l[0]}px`,n.style.top=`${l[1]}px`,n.style.width=`${a}px`,n.style.height=`${o}px`,n}
2_createQuadrilaterals(e=!1){if(!this.data.quadPoints)return null;let t=[],r=this.data.rect;for(let r of this.data.quadPoints)this.data.rect=[r[2].x,r[2].y,r[1].x,r[1].y],t.push(this._createContainer(e));return this.data.rect=r,t}_createPopup(e,t){let r=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,r=this.quadrilaterals[0]),e||((e=document.createElement("div")).style.height=r.style.height,e.style.width=r.style.width,r.appendChild(e));let s=new b({container:r,trigger:e,color:t.color,title:t.title,modificationDate:t.modificationDate,contents:t.contents,hideWrapper:!0}).render();s.style.left=r.style.width,r.appendChild(s)}_renderQuadrilaterals(e){return this.quadrilaterals.forEach(t=>{t.className=e}),this.quadrilaterals}render(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}}class h extends l{constructor(e){super(e,{isRenderable:!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"])),createQuadrilaterals:!0})}render(){let{data:e,linkService:t}=this,r=document.createElement("a");return(e.url?(0,s.addLinkAttributes)(r,{url:e.url,target:e.newWindow?s.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel,enabled:t.externalLinkEnabled}):e.action?this._bindNamedAction(r,e.action):e.dest?this._bindLink(r,e.dest):e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions?this._bindJSAction(r,e):this._bindLink(r,""),this.quadrilaterals)?this._renderQuadrilaterals("linkAnnotation").map((e,t)=>{let s=0===t?r:r.cloneNode();return e.appendChild(s),e}):(this.container.className="linkAnnotation",this.container.appendChild(r),this.container)}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&(e.className="internalLink")}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),e.className="internalLink"}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");let r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(let s of Object.keys(t.actions)){let i=r.get(s);i&&(e[i]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:s}}),!1))}e.className="internalLink"}}class c extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents)})}render(){this.container.className="textAnnotation";let e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.appendChild(e),this.container}}class d extends l{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}_getKeyModifier(e){return navigator.platform.includes("Win")&&e.ctrlKey||navigator.platform.includes("Mac")&&e.metaKey}_setEventListener(e,t,r,s){t.includes("mouse")?e.addEventListener(t,e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:s(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})}):e.addEventListener(t,e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:e.target.checked}})})}_setEventListeners(e,t,r){for(let[s,i]of t)("Action"===i||this.data.actions?.[i])&&this._setEventListener(e,s,i,r)}_setColor(e){let{detail:t,target:r}=e,{style:s}=r;for(let e of["bgColor","fillColor","fgColor","textColor","borderColor","strokeColor"]){let r=t[e];if(r)switch(r=a.ColorConverters[`${r[0]}_HTML`](r.slice(1)),e){case"bgColor":case"fillColor":s.backgroundColor=r;break;case"fgColor":case"textColor":s.color=r;break;case"borderColor":case"strokeColor":s.borderColor=r}}}}class u extends d{constructor(e){super(e,{isRenderable:e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue})}render(){let e=this.annotationStorage,t=this.data.id;this.container.className="textWidgetAnnotation";let r=null;if(this.renderInteractiveForms){let s=e.getValue(t,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),i=s.valueAsString||s.value||"",n={userValue:null,formattedValue:null,beforeInputSelectionRange:null,beforeInputValue:null};
2this.data.multiLine?(r=document.createElement("textarea")).textContent=i:((r=document.createElement("input")).type="text",r.setAttribute("value",i)),n.userValue=i,r.setAttribute("id",t),r.addEventListener("input",function(r){e.setValue(t,{value:r.target.value})});let a=e=>{n.formattedValue&&(e.target.value=n.formattedValue),e.target.setSelectionRange(0,0),n.beforeInputSelectionRange=null};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",e=>{n.userValue&&(e.target.value=n.userValue)}),r.addEventListener("updatefromsandbox",r=>{let{detail:s}=r,i={value(){n.userValue=s.value||"",e.setValue(t,{value:n.userValue.toString()}),n.formattedValue||(r.target.value=n.userValue)},valueAsString(){n.formattedValue=s.valueAsString||"",r.target!==document.activeElement&&(r.target.value=n.formattedValue),e.setValue(t,{formattedValue:n.formattedValue})},focus(){setTimeout(()=>r.target.focus({preventScroll:!1}),0)},userName(){r.target.title=s.userName},hidden(){r.target.style.visibility=s.hidden?"hidden":"visible",e.setValue(t,{hidden:s.hidden})},editable(){r.target.disabled=!s.editable},selRange(){let[e,t]=s.selRange;e>=0&&t<r.target.value.length&&r.target.setSelectionRange(e,t)}};Object.keys(s).filter(e=>e in i).forEach(e=>i[e]()),this._setColor(r)}),r.addEventListener("keydown",e=>{n.beforeInputValue=e.target.value;let r=-1;"Escape"===e.key?r=0:"Enter"===e.key?r=2:"Tab"===e.key&&(r=3),-1!==r&&(n.userValue=e.target.value,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:e.target.value,willCommit:!0,commitKey:r,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))});let s=a;a=null,r.addEventListener("blur",e=>{this._mouseState.isDown&&(n.userValue=e.target.value,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:e.target.value,willCommit:!0,commitKey:1,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})),s(e)}),r.addEventListener("mousedown",e=>{n.beforeInputValue=e.target.value,n.beforeInputSelectionRange=null}),r.addEventListener("keyup",e=>{e.target.selectionStart===e.target.selectionEnd&&(n.beforeInputSelectionRange=null)}),r.addEventListener("select",e=>{n.beforeInputSelectionRange=[e.target.selectionStart,e.target.selectionEnd]}),this.data.actions?.Keystroke&&r.addEventListener("input",e=>{let r=-1,s=-1;n.beforeInputSelectionRange&&([r,s]=n.beforeInputSelectionRange),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n.beforeInputValue,change:e.data,willCommit:!1,selStart:r,selEnd:s}})}),this._setEventListeners(r,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.value)}if(a&&r.addEventListener("blur",a),r.disabled=this.data.readOnly,r.name=this.data.fieldName,null!==this.data.maxLen&&(r.maxLength=this.data.maxLen),this.data.comb){let e=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;r.classList.add("comb"),r.style.letterSpacing=`calc(${e}px - 1ch)`}}else(r=document.createElement("div")).textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell";return this._setTextStyle(r),this.container.appendChild(r),this.container}_setTextStyle(e){let t=["left","center","right"],{fontSize:r,fontColor:s}=this.data.defaultAppearanceData,n=e.style;r&&(n.fontSize=`${r}px`),n.color=i.Util.makeHexColor(s[0],s[1],s[2]),null!==this.data.textAlignment&&(n.textAlign=t[this.data.textAlignment])}}class p extends d{constructor(e){super(e,{isRenderable:e.renderInteractiveForms})}render(){let e=this.annotationStorage,t=this.data,r=t.id,s=e.getValue(r,{value:t.fieldValue&&(t.exportValue&&t.exportValue===t.fieldValue||!t.exportValue&&"Off"!==t.fieldValue)}).value;this.container.className="buttonWidgetAnnotation checkBox";let i=document.createElement("input");return i.disabled=t.readOnly,i.type="checkbox",i.name=this.data.fieldName,s&&i.setAttribute("checked",!0),i.setAttribute("id",r),i.addEventListener("change",function(t){let s=t.target.name;for(let r of document.getElementsByName(s))r!==t.target&&(r.checked=!1,e.setValue(r.parentNode.getAttribute("data-annotation-id"),{value:!1}));e.setValue(r,{value:t.target.checked})}),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",t=>{let{detail:s}=t,i={value(){t.target.checked="Off"!==s.value,e.setValue(r,{value:t.target.checked})},focus(){setTimeout(()=>
2t.target.focus({preventScroll:!1}),0)},hidden(){t.target.style.visibility=s.hidden?"hidden":"visible",e.setValue(r,{hidden:s.hidden})},editable(){t.target.disabled=!s.editable}};Object.keys(s).filter(e=>e in i).forEach(e=>i[e]()),this._setColor(t)}),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)),this.container.appendChild(i),this.container}}class g extends d{constructor(e){super(e,{isRenderable:e.renderInteractiveForms})}render(){this.container.className="buttonWidgetAnnotation radioButton";let e=this.annotationStorage,t=this.data,r=t.id,s=e.getValue(r,{value:t.fieldValue===t.buttonValue}).value,i=document.createElement("input");if(i.disabled=t.readOnly,i.type="radio",i.name=t.fieldName,s&&i.setAttribute("checked",!0),i.setAttribute("id",r),i.addEventListener("change",function(t){let{target:s}=t;for(let t of document.getElementsByName(s.name))t!==s&&e.setValue(t.getAttribute("id"),{value:!1});e.setValue(r,{value:s.checked})}),this.enableScripting&&this.hasJSActions){let s=t.buttonValue;i.addEventListener("updatefromsandbox",t=>{let{detail:i}=t,n={value(){let n=s===i.value;for(let s of document.getElementsByName(t.target.name)){let t=s.getAttribute("id");s.checked=t===r&&n,e.setValue(t,{value:s.checked})}},focus(){setTimeout(()=>t.target.focus({preventScroll:!1}),0)},hidden(){t.target.style.visibility=i.hidden?"hidden":"visible",e.setValue(r,{hidden:i.hidden})},editable(){t.target.disabled=!i.editable}};Object.keys(i).filter(e=>e in n).forEach(e=>n[e]()),this._setColor(t)}),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)}return this.container.appendChild(i),this.container}}class f extends h{render(){let e=super.render();return e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText),e}}class m extends d{constructor(e){super(e,{isRenderable:e.renderInteractiveForms})}render(){this.container.className="choiceWidgetAnnotation";let e=this.annotationStorage,t=this.data.id;e.getValue(t,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});let r=document.createElement("select");for(let e of(r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.setAttribute("id",t),!this.data.combo&&(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),this.data.options)){let t=document.createElement("option");t.textContent=e.displayValue,t.value=e.exportValue,this.data.fieldValue.includes(e.exportValue)&&t.setAttribute("selected",!0),r.appendChild(t)}let s=(e,t)=>{let r=t?"value":"textContent",s=e.target.options;return e.target.multiple?Array.prototype.filter.call(s,e=>e.selected).map(e=>e[r]):-1===s.selectedIndex?null:s[s.selectedIndex][r]},i=e=>{let t=e.target.options;return Array.prototype.map.call(t,e=>({displayValue:e.textContent,exportValue:e.value}))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",n=>{let{detail:a}=n,o={value(){let i=r.options,o=a.value,l=new Set(Array.isArray(o)?o:[o]);Array.prototype.forEach.call(i,e=>{e.selected=l.has(e.value)}),e.setValue(t,{value:s(n,!0)})},multipleSelection(){r.multiple=!0},remove(){let o=r.options,l=a.remove;o[l].selected=!1,r.remove(l),o.length>0&&-1===Array.prototype.findIndex.call(o,e=>e.selected)&&(o[0].selected=!0),e.setValue(t,{value:s(n,!0),items:i(n)})},clear(){for(;0!==r.length;)r.remove(0);e.setValue(t,{value:null,items:[]})},insert(){let{index:o,displayValue:l,exportValue:h}=a.insert,c=document.createElement("option");c.textContent=l,c.value=h,r.insertBefore(c,r.children[o]),e.setValue(t,{value:s(n,!0),items:i(n)})},items(){let{items:o}=a;for(;0!==r.length;)r.remove(0);for(let e of o){let{displayValue:t,exportValue:s}=e,i=document.createElement("option");i.textContent=t,i.value=s,r.appendChild(i)}r.options.length>0&&(r.options[0].selected=!0),e.setValue(t,{value:s(n,!0),items:i(n)})},indices(){let r=new Set(a.indices),i=n.target.options;Array.prototype.forEach.call(i,(e,t)=>{e.selected=r.has(t)}),e.setValue(t,{value:s(n,!0)})},focus(){setTimeout(()=>
2n.target.focus({preventScroll:!1}),0)},hidden(){n.target.style.visibility=a.hidden?"hidden":"visible",e.setValue(t,{hidden:a.hidden})},editable(){n.target.disabled=!a.editable}};Object.keys(a).filter(e=>e in o).forEach(e=>o[e]()),this._setColor(n)}),r.addEventListener("input",r=>{let i=s(r,!0),n=s(r,!1);e.setValue(t,{value:i}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,changeEx:i,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(r,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],e=>e.target.checked)):r.addEventListener("input",function(r){e.setValue(t,{value:s(r)})}),this.container.appendChild(r),this.container}}class A extends l{constructor(e){super(e,{isRenderable:!!(e.data.title||e.data.contents)})}render(){let e=["Line","Square","Circle","PolyLine","Polygon","Ink"];if(this.container.className="popupAnnotation",e.includes(this.data.parentType))return this.container;let t=`[data-annotation-id="${this.data.parentId}"]`,r=this.layer.querySelectorAll(t);if(0===r.length)return this.container;let s=new b({container:this.container,trigger:Array.from(r),color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),n=this.page,a=i.Util.normalizeRect([this.data.parentRect[0],n.view[3]-this.data.parentRect[1]+n.view[1],this.data.parentRect[2],n.view[3]-this.data.parentRect[3]+n.view[1]]),o=a[0]+this.data.parentRect[2]-this.data.parentRect[0],l=a[1];return this.container.style.transformOrigin=`${-o}px ${-l}px`,this.container.style.left=`${o}px`,this.container.style.top=`${l}px`,this.container.appendChild(s.render()),this.container}}class b{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.title=e.title,this.modificationDate=e.modificationDate,this.contents=e.contents,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){let e=.7,t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.hidden=!0;let r=document.createElement("div");r.className="popup";let n=this.color;if(n){let t=e*(255-n[0])+n[0],s=e*(255-n[1])+n[1],a=e*(255-n[2])+n[2];r.style.backgroundColor=i.Util.makeHexColor(0|t,0|s,0|a)}let a=document.createElement("h1");a.textContent=this.title,r.appendChild(a);let o=s.PDFDateString.toDateObject(this.modificationDate);if(o){let e=document.createElement("span");e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:o.toLocaleDateString(),time:o.toLocaleTimeString()}),r.appendChild(e)}let l=this._formatContents(this.contents);return r.appendChild(l),Array.isArray(this.trigger)||(this.trigger=[this.trigger]),this.trigger.forEach(e=>{e.addEventListener("click",this._toggle.bind(this)),e.addEventListener("mouseover",this._show.bind(this,!1)),e.addEventListener("mouseout",this._hide.bind(this,!1))}),r.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(r),t}_formatContents(e){let t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/);for(let e=0,s=r.length;e<s;++e){let i=r[e];t.appendChild(document.createTextNode(i)),e<s-1&&t.appendChild(document.createElement("br"))}return t}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(e=!1){e&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex+=1)}_hide(e=!0){e&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}class _ extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}render(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class y extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}render(){this.container.className="lineAnnotation";let e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.re
2ct[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),s.appendChild(i),this.container.append(s),this._createPopup(i,e),this.container}}class S extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}render(){this.container.className="squareAnnotation";let e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r),i=e.borderStyle.width,n=this.svgFactory.createElement("svg:rect");return n.setAttribute("x",i/2),n.setAttribute("y",i/2),n.setAttribute("width",t-i),n.setAttribute("height",r-i),n.setAttribute("stroke-width",i||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","none"),s.appendChild(n),this.container.append(s),this._createPopup(n,e),this.container}}class v extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}render(){this.container.className="circleAnnotation";let e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r),i=e.borderStyle.width,n=this.svgFactory.createElement("svg:ellipse");return n.setAttribute("cx",t/2),n.setAttribute("cy",r/2),n.setAttribute("rx",t/2-i/2),n.setAttribute("ry",r/2-i/2),n.setAttribute("stroke-width",i||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","none"),s.appendChild(n),this.container.append(s),this._createPopup(n,e),this.container}}class C extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;let e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r),i=[];for(let t of e.vertices){let r=t.x-e.rect[0],s=e.rect[3]-t.y;i.push(r+","+s)}i=i.join(" ");let n=this.svgFactory.createElement(this.svgElementName);return n.setAttribute("points",i),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","none"),s.appendChild(n),this.container.append(s),this._createPopup(n,e),this.container}}class x extends C{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class P extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class R extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;let e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],s=this.svgFactory.create(t,r);for(let t of e.inkLists){let r=[];for(let s of t){let t=s.x-e.rect[0],i=e.rect[3]-s.y;r.push(`${t},${i}`)}r=r.join(" ");let i=this.svgFactory.createElement(this.svgElementName);i.setAttribute("points",r),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","none"),this._createPopup(i,e),s.appendChild(i)}return this.container.append(s),this.container}}class T extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return(this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals)?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}class k extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return(this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals)?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}class E extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return(this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals)?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}class w extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return(this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals)?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}class F extends l{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.title||e.data.contents),ignoreBorder:!0})}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}
2class L extends l{constructor(e){super(e,{isRenderable:!0});let{filename:t,content:r}=this.data.file;this.filename=(0,s.getFilenameFromUrl)(t),this.content=r,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,id:(0,i.stringToPDFString)(t),filename:t,content:r})}render(){this.container.className="fileAttachmentAnnotation";let e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(this.data.title||this.data.contents)&&this._createPopup(e,this.data),this.container.appendChild(e),this.container}_download(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}class M{static render(e){let t=[],r=[];for(let s of e.annotations)if(s){if(s.annotationType===i.AnnotationType.POPUP){r.push(s);continue}t.push(s)}for(let i of(r.length&&t.push(...r),t)){let t=o.create({data:i,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderInteractiveForms:!1!==e.renderInteractiveForms,svgFactory:new s.DOMSVGFactory,annotationStorage:e.annotationStorage||new n.AnnotationStorage,enableScripting:e.enableScripting,hasJSActions:e.hasJSActions,mouseState:e.mouseState||{isDown:!1}});if(t.isRenderable){let r=t.render();if(i.hidden&&(r.style.visibility="hidden"),Array.isArray(r))for(let t of r)e.div.appendChild(t);else t instanceof A?e.div.prepend(r):e.div.appendChild(r)}}}static update(e){let t=`matrix(${e.viewport.transform.join(",")})`;for(let r of e.annotations){let s=e.div.querySelectorAll(`[data-annotation-id="${r.id}"]`);s&&s.forEach(e=>{e.style.transform=t})}e.div.hidden=!1}}t.AnnotationLayer=M},(e,t)=>{function r(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;class s{static CMYK_G([e,t,r,s]){return["G",1-Math.min(1,.3*e+.59*r+.11*t+s)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_HTML([e]){let t=r(e);return`#${t}${t}${t}`}static RGB_G([e,t,r]){return["G",.3*e+.59*t+.11*r]}static RGB_HTML([e,t,s]){let i=r(e),n=r(t),a=r(s);return`#${i}${n}${a}`}static T_HTML(){return"#00000000"}static CMYK_RGB([e,t,r,s]){return["RGB",1-Math.min(1,e+s),1-Math.min(1,r+s),1-Math.min(1,t+s)]}static CMYK_HTML(e){return this.RGB_HTML(this.CMYK_RGB(e))}static RGB_CMYK([e,t,r]){let s=1-e,i=1-t,n=1-r,a=Math.min(s,i,n);return["CMYK",s,i,n,a]}}t.ColorConverters=s},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=void 0;var s=r(2);t.renderTextLayer=function(){let e=1e5,t=30,r=.8,i=new Map,n=/\S/;function a(e){return!n.test(e)}function o(e,s){let n=i.get(e);if(n)return n;s.save(),s.font=`${t}px ${e}`;let a=s.measureText(""),o=a.fontBoundingBoxAscent,l=Math.abs(a.fontBoundingBoxDescent);if(o){s.restore();let t=o/(o+l);return i.set(e,t),t}s.strokeStyle="red",s.clearRect(0,0,t,t),s.strokeText("g",0,0);let h=s.getImageData(0,0,t,t).data;l=0;for(let e=h.length-1-3;e>=0;e-=4)if(h[e]>0){l=Math.ceil(e/4/t);break}s.clearRect(0,0,t,t),s.strokeText("A",0,t),h=s.getImageData(0,0,t,t).data,o=0;for(let e=0,r=h.length;e<r;e+=4)if(h[e]>0){o=t-Math.floor(e/4/t);break}if(s.restore(),o){let t=o/(o+l);return i.set(e,t),t}return i.set(e,r),r}function l(e,t,r,i){let n,l,h=document.createElement("span"),c={angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(e._textDivs.push(h),a(t.str)){c.isWhitespace=!0,e._textDivProperties.set(h,c);return}let d=s.Util.transform(e._viewport.transform,t.transform),u=Math.atan2(d[1],d[0]),p=r[t.fontName];p.vertical&&(u+=Math.PI/2);let g=Math.hypot(d[2],d[3]),f=g*o(p.fontFamily,i);0===u?(n=d[4],l=d[5]-f):(n=d[4]+f*Math.sin(u),l=d[5]-f*Math.cos(u)),h.style.left=`${n}px`,h.style.top=`${l}px`,h.style.fontSize=`${g}px`,h.style.fontFamily=p.fontFamily,h.textContent=t.str,h.dir=t.dir,e._fontInspectorEnabled&&(h.dataset.fontName=t.fontName),0!==u&&(c.angle=180/Math.PI*u);let m=!1;if(t.str.length>1)m=!0;else if(t.transform[0]!==t.transform[3]){let e=Math.abs(t.transform[0]),r=Math.abs(t.transform[3]);e!==r&&Math.max(e,r)/Math.min(e,r)>1.5&&(m=!0)}if(m&&(p.vertical?c.canvasWidth=t.height*e._viewport.scale:c.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(h,c),e._textContentStream&&e._layoutText(h),e._enhanceTextSelection){let r,i,a=1,o=0;0!==u&&(a=Math.cos(u),o=Math.sin(u));let c=(p.vertical?t.height:t.width)*e._viewport.scale,d=g;0!==u?(r=[a,o,-o,a,n,l],i=s.Util.getAxialAlignedBoundingBox([0,0,c,d],r)):i=[n,l,n+c,l+d],e._bounds.push({left:i[0],top:i[1],right:i[2],bottom:i[3],div:h,size:[c,d],m:r})}}function h(t){if(t._canceled)return;let r=t._textDivs,s=t._capability,i=r.length;if(i>e){t._renderingDone=!0,s.resolve();return}if(!t._textContentStream)for(let e=0;e<i;e++)t._layoutText(r[e]);t._renderingDone=!0,s.resolve()}function c(e,t,r){let s=0;for(let i=0;i<r;i++){let r=e[t++];r>0&&(s=s?Math.min(r,s):r)}return s}function d(e){let t=e._bounds,r=e._viewport,i=u(r.width,r.height,t);for(let r=0;r<i.length;r++){let n=t[r].div,a=e._textDivProperties.get(n);if(0===a.angle){a.paddingLeft=t[r].left-i[r].left,a.paddingTop=t[r].top-i[r].top,a.paddingRight=i[r].right-t[r].right,a.paddingBottom=i[r].bottom-t[r].bottom,e._textDivProperties.set(n,a);continue}let o=i[r],l=t[r],h=l.m,d=h[0],u=h[1],p=[[0,0],[0,l.size[1]],[l.size[0],0],l.size],g=new Float64Array(64);p.forEach(function(e,t){let r=s.Util.applyTransform(e,h);g[t+0]=d&&(o.left-r[0])/d,g[t+4]=u&&(o.top-r[1])/u,g[t+8]=d&&(o.right-r[0])/
2d,g[t+12]=u&&(o.bottom-r[1])/u,g[t+16]=u&&-((o.left-r[0])/u),g[t+20]=d&&(o.top-r[1])/d,g[t+24]=u&&-((o.right-r[0])/u),g[t+28]=d&&(o.bottom-r[1])/d,g[t+32]=d&&-((o.left-r[0])/d),g[t+36]=u&&-((o.top-r[1])/u),g[t+40]=d&&-((o.right-r[0])/d),g[t+44]=u&&-((o.bottom-r[1])/u),g[t+48]=u&&(o.left-r[0])/u,g[t+52]=d&&-((o.top-r[1])/d),g[t+56]=u&&(o.right-r[0])/u,g[t+60]=d&&-((o.bottom-r[1])/d)});let f=1+Math.min(Math.abs(d),Math.abs(u));a.paddingLeft=c(g,32,16)/f,a.paddingTop=c(g,48,16)/f,a.paddingRight=c(g,0,16)/f,a.paddingBottom=c(g,16,16)/f,e._textDivProperties.set(n,a)}}function u(e,t,r){let s=r.map(function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}});p(e,s);let i=Array(r.length);return s.forEach(function(e){i[e.index]={left:e.x1New,top:0,right:e.x2New,bottom:0}}),r.map(function(t,r){let n=i[r],a=s[r];a.x1=t.top,a.y1=e-n.right,a.x2=t.bottom,a.y2=e-n.left,a.index=r,a.x1New=void 0,a.x2New=void 0}),p(t,s),s.forEach(function(e){let t=e.index;i[t].top=e.x1New,i[t].bottom=e.x2New}),i}function p(e,t){t.sort(function(e,t){return e.x1-t.x1||e.index-t.index});let r=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];t.forEach(function(e){let t,s,i=0;for(;i<r.length&&r[i].end<=e.y1;)i++;let n=r.length-1;for(;n>=0&&r[n].start>=e.y2;)n--;let a,o,l=-1/0;for(a=i;a<=n;a++){let i;(i=(s=(t=r[a]).boundary).x2>e.x1?s.index>e.index?s.x1New:e.x1:void 0===s.x2New?(s.x2+e.x1)/2:s.x2New)>l&&(l=i)}for(e.x1New=l,a=i;a<=n;a++)void 0===(s=(t=r[a]).boundary).x2New?s.x2>e.x1?s.index>e.index&&(s.x2New=s.x2):s.x2New=l:s.x2New>l&&(s.x2New=Math.max(l,s.x2));let h=[],c=null;for(a=i;a<=n;a++){let i=(s=(t=r[a]).boundary).x2>e.x2?s:e;c===i?h[h.length-1].end=t.end:(h.push({start:t.start,end:t.end,boundary:i}),c=i)}for(r[i].start<e.y1&&(h[0].start=e.y1,h.unshift({start:r[i].start,end:e.y1,boundary:r[i].boundary})),e.y2<r[n].end&&(h[h.length-1].end=e.y2,h.push({start:e.y2,end:r[n].end,boundary:r[n].boundary})),a=i;a<=n;a++){if(void 0!==(s=(t=r[a]).boundary).x2New)continue;let e=!1;for(o=i-1;!e&&o>=0&&r[o].start>=s.y1;o--)e=r[o].boundary===s;for(o=n+1;!e&&o<r.length&&r[o].end<=s.y2;o++)e=r[o].boundary===s;for(o=0;!e&&o<h.length;o++)e=h[o].boundary===s;e||(s.x2New=l)}Array.prototype.splice.apply(r,[i,n-i+1].concat(h))}),r.forEach(function(t){let r=t.boundary;void 0===r.x2New&&(r.x2New=Math.max(e,r.x2))})}function g({textContent:e,textContentStream:t,container:r,viewport:i,textDivs:n,textContentItemsStr:a,enhanceTextSelection:o}){this._textContent=e,this._textContentStream=t,this._container=r,this._document=r.ownerDocument,this._viewport=i,this._textDivs=n||[],this._textContentItemsStr=a||[],this._enhanceTextSelection=!!o,this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled,this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,s.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally(()=>{this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)}).catch(()=>{})}return g.prototype={get promise(){return this._capability.promise},cancel:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new s.AbortException("TextLayer task cancelled.")),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(Error("TextLayer task cancelled."))},_processItems(e,t){for(let r=0,s=e.length;r<s;r++)this._textContentItemsStr.push(e[r].str),l(this,e[r],t,this._layoutTextCtx)},_layoutText(e){let t=this._textDivProperties.get(e);if(t.isWhitespace)return;let r="";if(0!==t.canvasWidth){let{fontSize:s,fontFamily:i}=e.style;(s!==this._layoutTextLastFontSize||i!==this._layoutTextLastFontFamily)&&(this._layoutTextCtx.font=`${s} ${i}`,this._layoutTextLastFontSize=s,this._layoutTextLastFontFamily=i);let{width:n}=this._layoutTextCtx.measureText(e.textContent);n>0&&(t.scale=t.canvasWidth/n,r=`scaleX(${t.scale})`)}0!==t.angle&&(r=`rotate(${t.angle}deg) ${r}`),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),this._textDivProperties.set(e,t),this._container.appendChild(e)},_render:function(e){let r=(0,s.createPromiseCapability)(),i=Object.create(null),n=this._document.createElement("canvas");if(n.height=n.width=t,n.mozOpaque=!0,this._layoutTextCtx=n.getContext("2d",{alpha:!1}),this._textContent){let e=this._textContent.items,t=this._textContent.styles;this._processItems(e,t),r.resolve()}else if(this._textContentStream){let e=()=>{this._reader.read().then(({value:t,done:s})=>{if(s)return void r.resolve();Object.assign(i,t.styles),this._processItems(t.items,i),e()},r.reject)};this._reader=this._textContentStream.getReader(),e()}else throw Error('Neither "textContent" nor "textContentStream" parameters specified.');r.promise.then(()=>{i=null,e?this._renderTimer=setTimeout(()=>{h(this),this._renderTimer=null},e):h(this)},this._capability.reject)},expandTextDivs:function(e){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(d(this),this._bounds=null);let t=[],r=[];for(let s=0,i=this._textDivs.length;s<i;s++){let i=this._textDivs[s],n=this._textDivProperties.get(i);!n.isWhitespace&&(e?(t.length=0,r.length=0,n.originalTransform&&t.push(n.originalTransform),n.paddingTop>0?(r.push(`${n.paddingTop}
2px`),t.push(`translateY(${-n.paddingTop}px)`)):r.push(0),n.paddingRight>0?r.push(`${n.paddingRight/n.scale}px`):r.push(0),n.paddingBottom>0?r.push(`${n.paddingBottom}px`):r.push(0),n.paddingLeft>0?(r.push(`${n.paddingLeft/n.scale}px`),t.push(`translateX(${-n.paddingLeft/n.scale}px)`)):r.push(0),i.style.padding=r.join(" "),t.length&&(i.style.transform=t.join(" "))):(i.style.padding=null,i.style.transform=n.originalTransform))}}},function(e){let t=new g({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}}()},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var s=r(2),i=r(1),n=r(4);let a=function(){throw Error("Not implemented: SVGGraphics")};t.SVGGraphics=a;{let e={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},r="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/1999/xlink",d=["butt","round","square"],u=["miter","round","bevel"],p=function(){let e=new Uint8Array([137,80,78,71,13,10,26,10]),t=12,r=new Int32Array(256);for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t=1&t?0xedb88320^t>>1&0x7fffffff:t>>1&0x7fffffff;r[e]=t}function i(e,t,s){let i=-1;for(let n=t;n<s;n++){let t=r[(i^e[n])&255];i=i>>>8^t}return -1^i}function a(e,t,r,s){let n=s,a=t.length;r[n]=a>>24&255,r[n+1]=a>>16&255,r[n+2]=a>>8&255,r[n+3]=255&a,r[n+=4]=255&e.charCodeAt(0),r[n+1]=255&e.charCodeAt(1),r[n+2]=255&e.charCodeAt(2),r[n+3]=255&e.charCodeAt(3),n+=4,r.set(t,n);let o=i(r,s+4,n+=t.length);r[n]=o>>24&255,r[n+1]=o>>16&255,r[n+2]=o>>8&255,r[n+3]=255&o}function o(e,t,r){let s=1,i=0;for(let n=t;n<r;++n)i=(i+(s=(s+(255&e[n]))%65521))%65521;return i<<16|s}function l(e){if(!n.isNodeJS)return h(e);try{let t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);let r=__webpack_require__(75e3).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,s.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return h(e)}function h(e){let t=e.length,r=65535,s=Math.ceil(t/65535),i=new Uint8Array(2+t+5*s+4),n=0;i[n++]=120,i[n++]=156;let a=0;for(;t>r;)i[n++]=0,i[n++]=255,i[n++]=255,i[n++]=0,i[n++]=0,i.set(e.subarray(a,a+r),n),n+=r,a+=r,t-=r;i[n++]=1,i[n++]=255&t,i[n++]=t>>8&255,i[n++]=65535&~t&255,i[n++]=(65535&~t)>>8&255,i.set(e.subarray(a),n),n+=e.length-a;let l=o(e,0,e.length);return i[n++]=l>>24&255,i[n++]=l>>16&255,i[n++]=l>>8&255,i[n++]=255&l,i}function c(r,i,n,o){let h,c,d,u=r.width,p=r.height,g=r.data;switch(i){case s.ImageKind.GRAYSCALE_1BPP:c=0,h=1,d=u+7>>3;break;case s.ImageKind.RGB_24BPP:c=2,h=8,d=3*u;break;case s.ImageKind.RGBA_32BPP:c=6,h=8,d=4*u;break;default:throw Error("invalid format")}let f=new Uint8Array((1+d)*p),m=0,A=0;for(let e=0;e<p;++e)f[m++]=0,f.set(g.subarray(A,A+d),m),A+=d,m+=d;if(i===s.ImageKind.GRAYSCALE_1BPP&&o){m=0;for(let e=0;e<p;e++){m++;for(let e=0;e<d;e++)f[m++]^=255}}let b=new Uint8Array([u>>24&255,u>>16&255,u>>8&255,255&u,p>>24&255,p>>16&255,p>>8&255,255&p,h,c,0,0,0]),_=l(f),y=new Uint8Array(e.length+3*t+b.length+_.length),S=0;return y.set(e,S),a("IHDR",b,y,S+=e.length),a("IDATA",_,y,S+=t+b.length),S+=t+_.length,a("IEND",new Uint8Array(0),y,S),(0,s.createObjectURL)(y,"image/png",n)}return function(e,t,r){let i=void 0===e.kind?s.ImageKind.GRAYSCALE_1BPP:e.kind;return c(e,i,t,r)}}();class g{constructor(){this.fontSizeScale=1,this.fontWeight=e.fontWeight,this.fontSize=0,this.textMatrix=s.IDENTITY_MATRIX,this.fontMatrix=s.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=s.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=e.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function o(e){let t=[],r=[];for(let s of e){if("save"===s.fn){t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t[t.length-1].items;continue}"restore"===s.fn?t=r.pop():t.push(s)}return t}function l(e){if(Number.isInteger(e))return e.toString();let t=e.toFixed(10),r=t.length-1;if("0"!==t[r])return t;do r--;while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)}function h(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${l(e[0])} ${l(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2]){let t=180*Math.acos(e[0])/Math.PI;return`rotate(${l(t)})`}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${l(e[4])} ${l(e[5])})`;return`matrix(${l(e[0])} ${l(e[1])} ${l(e[2])} ${l(e[3])} ${l(e[4])} ${l(e[5])})`}let f=0,m=0,A=0;t.SVGGraphics=a=class{constructor(e,t,r=!1){for(let n in this.svgFactory=new i.DOMSVGFactory,this.current=ne
2w g,this.transformMatrix=s.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!r,this._operatorIdMapping=[],s.OPS)this._operatorIdMapping[s.OPS[n]]=n}save(){this.transformStack.push(this.transformMatrix);let e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){let t=e.fnArray,r=e.argsArray;for(let e=0,i=t.length;e<i;e++)if(t[e]===s.OPS.dependency)for(let t of r[e]){let e=t.startsWith("g_")?this.commonObjs:this.objs,r=new Promise(r=>{e.get(t,r)});this.current.dependencies.push(r)}return Promise.all(this.current.dependencies)}transform(e,t,r,i,n,a){let o=[e,t,r,i,n,a];this.transformMatrix=s.Util.transform(this.transformMatrix,o),this.tgrp=null}getSVG(e,t){this.viewport=t;let r=this._initialize(t);return this.loadDependencies(e).then(()=>(this.transformMatrix=s.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),r))}convertOpList(e){let t=this._operatorIdMapping,r=e.argsArray,s=e.fnArray,i=[];for(let e=0,n=s.length;e<n;e++){let n=s[e];i.push({fnId:n,fn:t[n],args:r[e]})}return o(i)}executeOpTree(e){for(let t of e){let e=t.fn,r=t.fnId,i=t.args;switch(0|r){case s.OPS.beginText:this.beginText();break;case s.OPS.dependency:break;case s.OPS.setLeading:this.setLeading(i);break;case s.OPS.setLeadingMoveText:this.setLeadingMoveText(i[0],i[1]);break;case s.OPS.setFont:this.setFont(i);break;case s.OPS.showText:case s.OPS.showSpacedText:this.showText(i[0]);break;case s.OPS.endText:this.endText();break;case s.OPS.moveText:this.moveText(i[0],i[1]);break;case s.OPS.setCharSpacing:this.setCharSpacing(i[0]);break;case s.OPS.setWordSpacing:this.setWordSpacing(i[0]);break;case s.OPS.setHScale:this.setHScale(i[0]);break;case s.OPS.setTextMatrix:this.setTextMatrix(i[0],i[1],i[2],i[3],i[4],i[5]);break;case s.OPS.setTextRise:this.setTextRise(i[0]);break;case s.OPS.setTextRenderingMode:this.setTextRenderingMode(i[0]);break;case s.OPS.setLineWidth:this.setLineWidth(i[0]);break;case s.OPS.setLineJoin:this.setLineJoin(i[0]);break;case s.OPS.setLineCap:this.setLineCap(i[0]);break;case s.OPS.setMiterLimit:this.setMiterLimit(i[0]);break;case s.OPS.setFillRGBColor:this.setFillRGBColor(i[0],i[1],i[2]);break;case s.OPS.setStrokeRGBColor:this.setStrokeRGBColor(i[0],i[1],i[2]);break;case s.OPS.setStrokeColorN:this.setStrokeColorN(i);break;case s.OPS.setFillColorN:this.setFillColorN(i);break;case s.OPS.shadingFill:this.shadingFill(i[0]);break;case s.OPS.setDash:this.setDash(i[0],i[1]);break;case s.OPS.setRenderingIntent:this.setRenderingIntent(i[0]);break;case s.OPS.setFlatness:this.setFlatness(i[0]);break;case s.OPS.setGState:this.setGState(i[0]);break;case s.OPS.fill:this.fill();break;case s.OPS.eoFill:this.eoFill();break;case s.OPS.stroke:this.stroke();break;case s.OPS.fillStroke:this.fillStroke();break;case s.OPS.eoFillStroke:this.eoFillStroke();break;case s.OPS.clip:this.clip("nonzero");break;case s.OPS.eoClip:this.clip("evenodd");break;case s.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case s.OPS.paintImageXObject:this.paintImageXObject(i[0]);break;case s.OPS.paintInlineImageXObject:this.paintInlineImageXObject(i[0]);break;case s.OPS.paintImageMaskXObject:this.paintImageMaskXObject(i[0]);break;case s.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(i[0],i[1]);break;case s.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case s.OPS.closePath:this.closePath();break;case s.OPS.closeStroke:this.closeStroke();break;case s.OPS.closeFillStroke:this.closeFillStroke();break;case s.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case s.OPS.nextLine:this.nextLine();break;case s.OPS.transform:this.transform(i[0],i[1],i[2],i[3],i[4],i[5]);break;case s.OPS.constructPath:this.constructPath(i[0],i[1]);break;case s.OPS.endPath:this.endPath();break;case 92:this.group(t.items);break;default:(0,s.warn)(`Unimplemented operator ${e}`)}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,r,s,i,n){let a=this.current;a.textMatrix=a.lineMatrix=[e,t,r,s,i,n],a.textMatrixScale=Math.hypot(e,t),a.x=a.lineX=0,a.y=a.lineY=0,a.xcoords=[],a.ycoords=[],a.tspan=this.svgFactory.createElement("svg:tspan"),a.tspan.setAttributeNS(null,"font-family",a.fontFamily),a.tspan.setAttributeNS(null,"font-size",`${l(a.fontSize)}px`),a.tspan.setAttributeNS(null,"y",l(-a.y)),a.txtElement=this.svgFactory.createElement("svg:text"),a.txtElement.appendChild(a.tspan)}beginText(){let e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=s.IDENTITY_MATRIX,e.lineMatrix=s.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}moveText(e,t){let r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size",`${l(r.fontSize)}px`),r.tspan.setAttributeNS(null,"y",l(-r.y))}showText(t){let i=this.current,n=i.font,a=i.fontSize;if(0===a)return;let o=i.fontSizeScale,c=i.charSpacing,d=i.wordSpacing,u=i.fontDirection,p=i.textHScale*u,g=n.vertical,f=g?1:-1,m=n.defaultVMetrics,A=a*i.fontMatrix[0],b=0;for(let e of t){let t,r,l;if(null===e){b+=u*d;continue}if((0,s.isNum)(e)){b+=f*e*a/1e3;continue}let h=(e.isSpace?d:0)+c,p=e.fontChar,_=e.width;if(g){let s,i=e.vmetric||m;s=-(s=e.vmetric?i[1]:.5*_)*A;let n=i[2]*A;_=i?-i[0]:_,t=s/o,r=(b+n)/o}else t=b/o,r=0;(e.isInFont||n.missingFile)&&(i.xcoords.push(i.x+t),g&&i.ycoords.push(-i.y+r),i.tspan.textContent+=p),b+=l=g?_*A-h*u:_*A+h*u}i.tspan.setAttributeNS(null,"x",i.xcoords.map(l).join(" ")),g?i.tspan.setAttributeNS(null,"y",i.ycoords.map(l).join(" ")):i.tspan.setAttributeNS(null,"y",l(-i.y)
2),g?i.y-=b:i.x+=b*p,i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",`${l(i.fontSize)}px`),i.fontStyle!==e.fontStyle&&i.tspan.setAttributeNS(null,"font-style",i.fontStyle),i.fontWeight!==e.fontWeight&&i.tspan.setAttributeNS(null,"font-weight",i.fontWeight);let _=i.textRenderingMode&s.TextRenderingMode.FILL_STROKE_MASK;if(_===s.TextRenderingMode.FILL||_===s.TextRenderingMode.FILL_STROKE?(i.fillColor!==e.fillColor&&i.tspan.setAttributeNS(null,"fill",i.fillColor),i.fillAlpha<1&&i.tspan.setAttributeNS(null,"fill-opacity",i.fillAlpha)):i.textRenderingMode===s.TextRenderingMode.ADD_TO_PATH?i.tspan.setAttributeNS(null,"fill","transparent"):i.tspan.setAttributeNS(null,"fill","none"),_===s.TextRenderingMode.STROKE||_===s.TextRenderingMode.FILL_STROKE){let e=1/(i.textMatrixScale||1);this._setStrokeAttributes(i.tspan,e)}let y=i.textMatrix;0!==i.textRise&&(y=y.slice(),y[5]+=i.textRise),i.txtElement.setAttributeNS(null,"transform",`${h(y)} scale(${l(p)}, -1)`),i.txtElement.setAttributeNS(r,"xml:space","preserve"),i.txtElement.appendChild(i.tspan),i.txtgrp.appendChild(i.txtElement),this._ensureTransformGroup().appendChild(i.txtElement)}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(e){if(!e.data)throw Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));let t=(0,s.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${e.loadedName}"; src: url(${t}); } 3`}setFont(e){let t=this.current,r=this.commonObjs.get(e[0]),i=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix||s.FONT_IDENTITY_MATRIX;let n="normal";r.black?n="900":r.bold&&(n="bold");let a=r.italic?"italic":"normal";i<0?(i=-i,t.fontDirection=-1):t.fontDirection=1,t.fontSize=i,t.fontFamily=r.loadedName,t.fontWeight=n,t.fontStyle=a,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",l(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){let e=this.current;e.textRenderingMode&s.TextRenderingMode.ADD_TO_PATH_FLAG&&e.txtElement?.hasChildNodes()&&(e.element=e.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){e>0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=d[e]}setLineJoin(e){this.current.lineJoin=u[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,r){this.current.strokeColor=s.Util.makeHexColor(e,t,r)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,r){this.current.fillColor=s.Util.makeHexColor(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){let t=this.viewport.width,r=this.viewport.height,i=s.Util.inverseTransform(this.transformMatrix),n=s.Util.applyTransform([0,0],i),a=s.Util.applyTransform([0,r],i),o=s.Util.applyTransform([t,0],i),l=s.Util.applyTransform([t,r],i),h=Math.min(n[0],a[0],o[0],l[0]),c=Math.min(n[1],a[1],o[1],l[1]),d=Math.max(n[0],a[0],o[0],l[0]),u=Math.max(n[1],a[1],o[1],l[1]),p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x",h),p.setAttributeNS(null,"y",c),p.setAttributeNS(null,"width",d-h),p.setAttributeNS(null,"height",u-c),p.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(p)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){let t=e[1],r=e[2],i=e[3]||s.IDENTITY_MATRIX,[n,a,o,l]=e[4],h=e[5],c=e[6],d=e[7],u=`shading${A++}`,[p,g]=s.Util.applyTransform([n,a],i),[f,m]=s.Util.applyTransform([o,l],i),[b,_]=s.Util.singularValueDecompose2dScale(i),y=h*b,S=c*_,v=this.svgFactory.createElement("svg:pattern");
3v.setAttributeNS(null,"id",u),v.setAttributeNS(null,"patternUnits","userSpaceOnUse"),v.setAttributeNS(null,"width",y),v.setAttributeNS(null,"height",S),v.setAttributeNS(null,"x",`${p}`),v.setAttributeNS(null,"y",`${g}`);let C=this.svg,x=this.transformMatrix,P=this.current.fillColor,R=this.current.strokeColor,T=this.svgFactory.create(f-p,m-g);if(this.svg=T,this.transformMatrix=i,2===d){let e=s.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(r)),this.svg=C,this.transformMatrix=x,this.current.fillColor=P,this.current.strokeColor=R,v.appendChild(T.childNodes[0]),this.defs.appendChild(v),`url(#${u})`}_makeShadingPattern(e){switch(e[0]){case"RadialAxial":let t,r=`shading${A++}`,i=e[3];switch(e[1]){case"axial":let n=e[4],a=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",n[0]),t.setAttributeNS(null,"y1",n[1]),t.setAttributeNS(null,"x2",a[0]),t.setAttributeNS(null,"y2",a[1]);break;case"radial":let o=e[4],l=e[5],h=e[6],c=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",l[0]),t.setAttributeNS(null,"cy",l[1]),t.setAttributeNS(null,"r",c),t.setAttributeNS(null,"fx",o[0]),t.setAttributeNS(null,"fy",o[1]),t.setAttributeNS(null,"fr",h);break;default:throw Error(`Unknown RadialAxial type: ${e[1]}`)}for(let e of i){let r=this.svgFactory.createElement("svg:stop");r.setAttributeNS(null,"offset",e[0]),r.setAttributeNS(null,"stop-color",e[1]),t.appendChild(r)}return this.defs.appendChild(t),`url(#${r})`;case"Mesh":return(0,s.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw Error(`Unknown IR type: ${e[0]}`)}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){let r=this.current,i=r.x,n=r.y,a=[],o=0;for(let r of e)switch(0|r){case s.OPS.rectangle:i=t[o++],n=t[o++];let e=t[o++],h=t[o++],c=i+e,d=n+h;a.push("M",l(i),l(n),"L",l(c),l(n),"L",l(c),l(d),"L",l(i),l(d),"Z");break;case s.OPS.moveTo:i=t[o++],n=t[o++],a.push("M",l(i),l(n));break;case s.OPS.lineTo:i=t[o++],n=t[o++],a.push("L",l(i),l(n));break;case s.OPS.curveTo:i=t[o+4],n=t[o+5],a.push("C",l(t[o]),l(t[o+1]),l(t[o+2]),l(t[o+3]),l(i),l(n)),o+=6;break;case s.OPS.curveTo2:a.push("C",l(i),l(n),l(t[o]),l(t[o+1]),l(t[o+2]),l(t[o+3])),i=t[o+2],n=t[o+3],o+=4;break;case s.OPS.curveTo3:i=t[o+2],n=t[o+3],a.push("C",l(t[o]),l(t[o+1]),l(i),l(n),l(i),l(n)),o+=4;break;case s.OPS.closePath:a.push("Z")}a=a.join(" "),r.path&&e.length>0&&e[0]!==s.OPS.rectangle&&e[0]!==s.OPS.moveTo?a=r.path.getAttributeNS(null,"d")+a:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(r.path)),r.path.setAttributeNS(null,"d",a),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(i,n)}endPath(){let e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element){this.pendingClip=null;return}let t=`clippath${f++}`,r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",h(this.transformMatrix));let s=e.element.cloneNode(!0);"evenodd"===this.pendingClip?s.setAttributeNS(null,"clip-rule","evenodd"):s.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(s),this.defs.appendChild(r),e.activeClipUrl&&(e.clipGroup=null,this.extraStack.forEach(function(e){e.clipGroup=null}),r.setAttributeNS(null,"clip-path",e.activeClipUrl)),e.activeClipUrl=`url(#${t})`,this.tgrp=null}clip(e){this.pendingClip=e}closePath(){let e=this.current;if(e.path){let t=`${e.path.getAttributeNS(null,"d")}Z`;e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(let[t,r]of e)switch(t){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;
3case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r);break;case"CA":this.setStrokeAlpha(r);break;case"ca":this.setFillAlpha(r);break;default:(0,s.warn)(`Unimplemented graphic state operator ${t}`)}}fill(){let e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){let e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e,t=1){let r=this.current,s=r.dashArray;1!==t&&s.length>0&&(s=s.map(function(e){return t*e})),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",l(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",l(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",s.map(l).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",l(t*r.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){let e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}paintImageXObject(e){let t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(!t)return void(0,s.warn)(`Dependent image with object ID ${e} is not ready yet`);this.paintInlineImageXObject(t)}paintInlineImageXObject(e,t){let r=e.width,s=e.height,i=p(e,this.forceDataSchema,!!t),n=this.svgFactory.createElement("svg:rect");n.setAttributeNS(null,"x","0"),n.setAttributeNS(null,"y","0"),n.setAttributeNS(null,"width",l(r)),n.setAttributeNS(null,"height",l(s)),this.current.element=n,this.clip("nonzero");let a=this.svgFactory.createElement("svg:image");a.setAttributeNS(c,"xlink:href",i),a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y",l(-s)),a.setAttributeNS(null,"width",l(r)+"px"),a.setAttributeNS(null,"height",l(s)+"px"),a.setAttributeNS(null,"transform",`scale(${l(1/r)} ${l(-1/s)})`),t?t.appendChild(a):this._ensureTransformGroup().appendChild(a)}paintImageMaskXObject(e){let t=this.current,r=e.width,s=e.height,i=t.fillColor;t.maskId=`mask${m++}`;let n=this.svgFactory.createElement("svg:mask");n.setAttributeNS(null,"id",t.maskId);let a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",l(r)),a.setAttributeNS(null,"height",l(s)),a.setAttributeNS(null,"fill",i),a.setAttributeNS(null,"mask",`url(#${t.maskId})`),this.defs.appendChild(n),this._ensureTransformGroup().appendChild(a),this.paintInlineImageXObject(e,n)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){let e=t[2]-t[0],r=t[3]-t[1],s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x",t[0]),s.setAttributeNS(null,"y",t[1]),s.setAttributeNS(null,"width",l(e)),s.setAttributeNS(null,"height",l(r)),this.current.element=s,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){let t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;let s=this.svgFactory.createElement("svg:g");return s.setAttributeNS(null,"transform",h(e.transform)),t.appendChild(s),this.svg=s,t}_ensureClipGroup(){if(!this.current.clipGroup){let e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",h(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}}},(e,t)=>
3{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;class r{static setAttributes(e,t){for(let[r,s]of Object.entries(t))null!=s&&("style"!==r?e.setAttribute(r,s):Object.assign(e.style,s))}static render(e){let t=e.xfa,s=document.createElement(t.name);t.attributes&&r.setAttributes(s,t.attributes);let i=[[t,-1,s]],n=e.div;n.appendChild(s);let a=e.viewport.transform.join(",");for(n.style.transform=`matrix(${a})`,n.setAttribute("class","xfaLayer xfaFont");i.length>0;){let[e,t,s]=i[i.length-1];if(t+1===e.children.length){i.pop();continue}let n=e.children[++i[i.length-1][1]];if(null===n)continue;let{name:a}=n;if("#text"===a){s.appendChild(document.createTextNode(n.value));continue}let o=document.createElement(a);s.appendChild(o),n.attributes&&r.setAttributes(o,n.attributes),n.children&&n.children.length>0?i.push([n,-1,o]):n.value&&o.appendChild(document.createTextNode(n.value))}}static update(e){let t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}t.XfaLayer=r},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var s=r(2),i=r(24);let n=__webpack_require__(28582),a=__webpack_require__(22851),o=__webpack_require__(56626),l=__webpack_require__(16843),h=/^file:\/\/\/[a-zA-Z]:\//;function c(e){let t=l.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse(`file:///${e}`):(t.host||(t.protocol="file:"),t)}class d{constructor(e){this.source=e,this.url=c(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new A(this):new f(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let r=this.isFsUrl?new b(this,e,t):new m(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}t.PDFNodeStream=d;class u{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;let t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=(0,s.createPromiseCapability)(),this._headersCapability=(0,s.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let e=this._readableStream.read();return null===e?(this._readCapability=(0,s.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream)return void this._error(e);this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new s.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class p{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,s.createPromiseCapability)();let t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let e=this._readableStream.read();return null===e?(this._readCapability=(0,s.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream)return void this._error(e);this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function g(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class f extends u{constructor(e){super(e);let t=t=>{if(404===t.statusCode){let e=new s.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e,this._headersCapability.reject(e);return}this._headersCapability.resolve(),this._setReadableStream(t);let r=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:n,suggestedLength:a}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=n,this._contentLength=a||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(r)};this._request=null,"http:"===this._url.protocol?this._request=a.request(g(this._url,e.httpHeaders),t):this._request=o.request(g(this._url,e.httpHeaders),t),this._request.on("error",e=>{this._storedError=e,this._headersCapability.reject(e)}),this._request.end()}}class m extends p{constructor(e,t,r){for(let t in super(e),this._httpHeaders={},e.httpHeaders){let r=e.httpHeaders[t];void 0!==r&&(this._httpHeaders[t]=r)}this._httpHeaders.Range=`bytes=${t}-${r-1}`;let i=e=>{if(404===e.statusCode){let e=new s.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e;return}this._setReadableStream(e)};this._request=null,"http:"===this._url.protocol?this._request=a.request(g(this._url,this._httpHeaders),i):this._request=o.request(g(this._url,this._httpHeaders),i),this._request.on("error",e=>{this._storedError=e}),this._request.end()}}class A extends u{constructor(e){super(e);let t=decodeURIComponent(this._url.path);h.test(this._url.href)&&(t=t.replace(/^\//,"")),n.lstat(t,(e,r)=>{if(e){"ENOENT"===e.code&&(e=new s.MissingPDFException(`Missing PDF "${t}".`)),this._storedError=e,this._headersCapability.reject(e);return}this._contentLength=r.size,this._setReadableStream(n.createReadStream(t)),this._headersCapability.resolve()})}}class b extends p{constructor(e,t,r){super(e);let s=decodeURIComponent(this._url.path);h.test(this._url.href)&&(s=s.replace(/^\//,"")),this._setReadableStream(n.createReadStream(s,{start:t,end:r-1}))}}},(e,t,r)=>
3{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=l,t.extractFilenameFromHeader=o,t.validateRangeRequestCapabilities=a,t.validateResponseStatus=h;var s=r(2),i=r(25),n=r(1);function a({getResponseHeader:e,isHttp:t,rangeChunkSize:r,disableRange:i}){(0,s.assert)(r>0,"Range chunk size must be larger than zero");let n={allowRangeRequests:!1,suggestedLength:void 0},a=parseInt(e("Content-Length"),10);return Number.isInteger(a)&&(n.suggestedLength=a,a<=2*r||i||!t||"bytes"!==e("Accept-Ranges")||"identity"!==(e("Content-Encoding")||"identity")||(n.allowRangeRequests=!0)),n}function o(e){let t=e("Content-Disposition");if(t){let e=(0,i.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(e){}if((0,n.isPdfFile)(e))return e}return null}function l(e,t){return 404===e||0===e&&t.startsWith("file:")?new s.MissingPDFException('Missing PDF "'+t+'".'):new s.UnexpectedResponseException(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)}function h(e){return 200===e||206===e}},(e,t)=>{function r(e){let t=!0,r=s("filename\\*","i").exec(e);if(r){let e=o(r=r[1]);return n(e=h(e=l(e=unescape(e))))}if(r=a(e))return n(h(r));if(r=s("filename","i").exec(e)){let e=o(r=r[1]);return n(e=h(e))}function s(e,t){return RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function i(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{let s=new TextDecoder(e,{fatal:!0}),i=Array.from(r,function(e){return 255&e.charCodeAt(0)});r=s.decode(new Uint8Array(i)),t=!1}catch(s){if(/^utf-?8$/i.test(e))try{r=decodeURIComponent(escape(r)),t=!1}catch(e){}}}return r}function n(e){return t&&/[\x80-\xff]/.test(e)&&(e=i("utf-8",e),t&&(e=i("iso-8859-1",e))),e}function a(e){let t,r=[],i=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(t=i.exec(e));){let[,e,s,i]=t;if((e=parseInt(e,10))in r){if(0===e)break;continue}r[e]=[s,i]}let n=[];for(let e=0;e<r.length&&e in r;++e){let[t,s]=r[e];s=o(s),t&&(s=unescape(s),0===e&&(s=l(s))),n.push(s)}return n.join("")}function o(e){if(e.startsWith('"')){let t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){let r=t[e].indexOf('"');-1!==r&&(t[e]=t[e].slice(0,r),t.length=e+1),t[e]=t[e].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function l(e){let t=e.indexOf("'");return -1===t?e:i(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function h(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(e,t,r,s){if("q"===r||"Q"===r)return i(t,s=(s=s.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))}));try{s=atob(s)}catch(e){}return i(t,s)})}return""}Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=r},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var s=r(2),i=r(24);let n=200,a=206;function o(e){let t=e.response;return"string"!=typeof t?t:(0,s.stringToBytes)(t).buffer}class l{constructor(e,t){this.url=e,t=t||{},this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this.withCredentials=t.withCredentials||!1,this.getXhr=t.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){let s={begin:e,end:t};for(let e in r)s[e]=r[e];return this.request(s)}requestFull(e){return this.request(e)}request(e){let t=this.getXhr(),r=this.currXhrId++,s=this.pendingRequests[r]={xhr:t};for(let e in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){let r=this.httpHeaders[e];void 0!==r&&t.setRequestHeader(e,r)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),s.expectedStatus=a):s.expectedStatus=n,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),s.onHeadersReceived=e.onHeadersReceived,s.onDone=e.onDone,s.onError=e.onError,s.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){let r=this.pendingRequests[e];r&&r.onProgress&&r.onProgress(t)}onStateChange(e,t){let r=this.pendingRequests[e];if(!r)return;let s=r.xhr;if(s.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4!==s.readyState||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===s.status&&this.isHttp){r.onError&&r.onError(s.status);return}let i=s.status||n;if((i!==n||r.expectedStatus!==a)&&i!==r.expectedStatus){r.onError&&r.onError(s.status);return}let l=o(s);if(i===a){let e=s.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);r.onDone({begin:parseInt(t[1],10),chunk:l})}else l?r.onDone({begin:0,chunk:l}):r.onError&&r.onError(s.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}
3abortRequest(e){let t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class h{constructor(e){this._source=e,this._manager=new l(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){let t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new c(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){let r=new d(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}t.PDFNetworkStream=h;class c{constructor(e,t){this._manager=e;let r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=(0,s.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){let e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=e=>t.getResponseHeader(e),{allowRangeRequests:s,suggestedLength:n}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});s&&(this._isRangeSupported=!0),this._contentLength=n||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[])}_onError(e){let t=this._url,r=(0,i.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r),this._requests.forEach(function(e){e.reject(r)}),this._requests=[],this._cachedChunks=[]}_onProgress(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class d{constructor(e,t,r){this._manager=e;let s={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=e.requestRange(t,r,s),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}_close(){this.onClosed&&this.onClosed(this)}_onDone(e){let t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._close()}_onProgress(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(null!==this._queuedChunk){let e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};let e=(0,s.createPromiseCapability)();return this._requests.push(e),e.promise}
3cancel(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var s=r(2),i=r(24);function n(e,t,r){return{method:"GET",headers:e,signal:r?.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function a(e){let t=new Headers;for(let r in e){let s=e[r];void 0!==s&&t.append(r,s)}return t}class o{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new l(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;let r=new h(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}t.PDFFetchStream=o;class l{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;let t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=(0,s.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=a(this._stream.httpHeaders);let r=t.url;fetch(r,n(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,r);this._reader=e.body.getReader(),this._headersCapability.resolve();let t=t=>e.headers.get(t),{allowRangeRequests:n,suggestedLength:a}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=n,this._contentLength=a||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new s.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;let{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}class h{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;let o=e.source;this._withCredentials=o.withCredentials||!1,this._readCapability=(0,s.createPromiseCapability)(),this._isStreamingSupported=!o.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=a(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);let l=o.url;fetch(l,n(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,l);this._readCapability.resolve(),this._reader=e.body.getReader()}).catch(e=>{if(e?.name!=="AbortError")throw e}),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;let{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__w_pdfjs_require__),r.exports}var __nested_webpack_exports__={};return(()=>{var e=__nested_webpack_exports__;
3Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLinkAttributes",{enumerable:!0,get:function(){return t.addLinkAttributes}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return t.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return t.getPdfFilenameFromUrl}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return t.isPdfFile}}),Object.defineProperty(e,"LinkTarget",{enumerable:!0,get:function(){return t.LinkTarget}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return t.loadScript}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return t.PDFDateString}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return t.RenderingCancelledException}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return r.LoopbackPort}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return r.version}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return s.CMapCompressionType}}),Object.defineProperty(e,"createObjectURL",{enumerable:!0,get:function(){return s.createObjectURL}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return s.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return s.createValidAbsoluteUrl}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return s.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return s.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return s.OPS}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return s.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return s.PermissionFlag}}),Object.defineProperty(e,"removeNullCharacters",{enumerable:!0,get:function(){return s.removeNullCharacters}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return s.shadow}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return s.UnexpectedResponseException}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return s.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return s.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return s.VerbosityLevel}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return i.AnnotationLayer}}),Object.defineProperty(e,"apiCompatibilityParams",{enumerable:!0,get:function(){return n.apiCompatibilityParams}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return a.GlobalWorkerOptions}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return o.renderTextLayer}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return l.SVGGraphics}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return h.XfaLayer}});var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(5),s=__w_pdfjs_require__(2),i=__w_pdfjs_require__(18),n=__w_pdfjs_require__(9),a=__w_pdfjs_require__(12),o=__w_pdfjs_require__(20),l=__w_pdfjs_require__(21),h=__w_pdfjs_require__(22);{let{isNodeJS:e}=__w_pdfjs_require__(4);if(e){let e=__w_pdfjs_require__(23).PDFNodeStream;(0,r.setPDFNetworkStreamFactory)(t=>new e(t))}else{let e,s=__w_pdfjs_require__(26).PDFNetworkStream;(0,t.isFetchSupported)()&&(e=__w_pdfjs_require__(27).PDFFetchStream),(0,r.setPDFNetworkStreamFactory)(r=>e&&(0,t.isValidFetchUrl)(r.url)?new e(r):new s(r))}}})(),__nested_webpack_exports__})()})}}]); 4//# sourceMappingURL=74f7125a.a26db5f836435374.js.map
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.