!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define("pdfjs-dist/build/pdf.worker",[],t):"object"==typeofexports?exports["pdfjs-dist/build/pdf.worker"]=t():e["pdfjs-dist/build/pdf.worker"]=e.pdfjsDistBuildPdfWorker=t()}(this,function(){returnfunction(e){functiont(r){if(a[r])returna[r].exports;vari=a[r]={i:r,l:!1,exports:{}};e[r].call(i.exports,i,i.exports,t);i.l=!0;returni.exports}vara={};t.m=e;t.c=a;t.i=function(e){returne};t.d=function(e,a,r){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:r})};t.n=function(e){vara=e&&e.__esModule?function(){returne.default}:function(){returne};t.d(a,"a",a);returna};t.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)};t.p="";returnt(t.s=37)}([function(e,t,a){"use strict";(function(e){functiona(e){$=e}functionr(){return$}functioni(e){$>=Z.infos&&console.log("Info: "+e)}functionn(e){$>=Z.warnings&&console.log("Warning: "+e)}functions(e){console.log("Deprecated API usage: "+e)}functiono(e){if($>=Z.errors){console.log("Error: "+e);console.log(c())}thrownewError(e)}functionc(){try{thrownewError}catch(e){returne.stack?e.stack.split("\n").slice(2).join("\n"):""}}functionl(e,t){e||o(t)}functionh(e,t){try{vara=newURL(e);if(!a.origin||"null"===a.origin)return!1}catch(e){return!1}varr=newURL(t,a);returna.origin===r.origin}functionu(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}functionf(e,t){if(!e)returnnull;try{vara=t?newURL(e,t):newURL(e);if(u(a))returna}catch(e){}returnnull}functiond(e,t,a){Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!1});returna}functiong(e){vart;returnfunction(){if(e){t=Object.create(null);e(t);e=null}returnt}}functionm(e){if("string"!=typeofe){n("The argument for removeNullCharacters must be a string.");returne}returne.replace(he,"")}functionp(e){l(null!==e&&"object"==typeofe&&void0!==e.length,"Invalid argument for bytesToString");vart=e.length,a=8192;if(t<a)returnString.fromCharCode.apply(null,e);for(varr=[],i=0;i<t;i+=a){varn=Math.min(i+a,t),s=e.subarray(i,n);r.push(String.fromCharCode.apply(null,s))}returnr.join("")}functionb(e){l("string"==typeofe,"Invalid argument for stringToBytes");for(vart=e.length,a=newUint8Array(t),r=0;r<t;++r)a[r]=255&e.charCodeAt(r);returna}functionv(e){if(void0!==e.length)returne.length;l(void0!==e.byteLength);returne.byteLength}functiony(e){if(1===e.length&&e[0]instanceofUint8Array)returne[0];vart,a,r,i=0,n=e.length;for(t=0;t<n;t++){a=e[t];r=v(a);i+=r}vars=0,o=newUint8Array(i);for(t=0;t<n;t++){a=e[t];ainstanceofUint8Array||(a="string"==typeofa?b(a):newUint8Array(a));r=a.byteLength;o.set(a,s);s+=r}returno}functionk(e){returnString.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}functionw(e){for(vart=1,a=0;e>t;){t<<=1;a++}returna}functionx(e,t){returne[t]<<24>>24}functionC(e,t){returne[t]<<8|e[t+1]}functionS(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}functionA(){vare=newUint8Array(2);e[0]=1;vart=newUint16Array(e.buffer);return1===t[0]}functionI(){try{newFunction("");return!0}catch(e){return!1}}functionB(e){vart,a=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<a;t+=2)r.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));elsefor(t=0;t<a;++t){vari=me[e.charCodeAt(t)];r.push(i?String.fromCharCode(i):e.charAt(t))}returnr.join("")}functionR(e){returndecodeURIComponent(escape(e))}functionT(e){returnunescape(encodeURIComponent(e))}functionO(e){for(vartine)return!1;return!0}functionP(e){return"boolean"==typeofe}functionM(e){return"number"==typeofe&&(0|e)===e}functionE(e){return"number"==typeofe}functionL(e){return"string"==typeofe}functionD(e){returneinstanceofArray}functionF(e){return"object"==typeofe&&null!==e&&void0!==e.byteLength}functionq(e){return32===e||9===e||13===e||10===e}functionU(){vare={};e.promise=newPromise(function(t,a){e.resolve=t;e.reject=a});returne}function
functione(e,t,a){this.str=e;this.dict=e.dict;this.cachedData=0;this.bitsCached=0;for(varr=4096,i={earlyChange:a,codeLength:9,nextCode:258,dictionaryValues:newUint8Array(r),dictionaryLengths:newUint16Array(r),dictionaryPrevCodes:newUint16Array(r),currentSequence:newUint8Array(r),currentSequenceLength:0},n=0;n<256;++n){i.dictionaryValues[n]=n;i.dictionaryLengths[n]=1}this.lzwState=i;S.call(this,t)}e.prototype=Object.create(S.prototype);e.prototype.readBits=function(e){for(vart=this.bitsCached,a=this.cachedData;t<e;){varr=this.str.getByte();if(r===-1){this.eof=!0;returnnull}a=a<<8|r;t+=8}this.bitsCached=t-=e;this.cachedData=a;this.lastCode=null;returna>>>t&(1<<e)-1};e.prototype.readBlock=function(){vare,t,a,r=512,i=2*r,n=r,s=this.lzwState;if(s){varo=s.earlyChange,c=s.nextCode,l=s.dictionaryValues,h=s.dictionaryLengths,u=s.dictionaryPrevCodes,f=s.codeLength,d=s.prevCode,g=s.currentSequence,m=s.currentSequenceLength,p=0,b=this.bufferLength,v=this.ensureBuffer(this.bufferLength+i);for(e=0;e<r;e++){vary=this.readBits(f),k=m>0;if(y<256){g[0]=y;m=1}else{if(!(y>=258)){if(256===y){f=9;c=258;m=0;continue}this.eof=!0;deletethis.lzwState;break}if(y<c){m=h[y];for(t=m-1,a=y;t>=0;t--){g[t]=l[a];a=u[a]}}elseg[m++]=g[0]}if(k){u[c]=d;h[c]=h[d]+1;l[c]=g[0];c++;f=c+o&c+o-1?f:0|Math.min(Math.log(c+o)/.6931471805599453+1,12)}d=y;p+=m;if(i<p){doi+=n;while(i<p);v=this.ensureBuffer(this.bufferLength+i)}for(t=0;t<m;t++)v[b++]=g[t]}s.nextCode=c;s.codeLength=f;s.prevCode=d;s.currentSequenceLength=m;this.bufferLength=b}};returne}(),q=function(){functione(){x.call(this,newUint8Array(0))}e.prototype=x.prototype;returne}();t.Ascii85Stream=M;t.AsciiHexStream=E;t.CCITTFaxStream=D;t.DecryptStream=P;t.DecodeStream=S;t.FlateStream=I;t.Jbig2Stream=O;t.JpegStream=R;t.JpxStream=T;t.NullStream=q;t.PredictorStream=B;t.RunLengthStream=L;t.Stream=x;t.StreamsSequenceStream=A;t.StringStream=C;t.LZWStream=F},function(e,t,a){"use strict";varr=a(0),i=a(1),n=a(6),s=r.error,o=r.info,c=r.isArray,l=r.isString,h=r.shadow,u=r.warn,f=i.isDict,d=i.isName,g=i.isStream,m=n.PDFFunction,p=function(){functione(e,t,a,r,i,n,s,o){varc=3;s=1!==s?0:s;varl,h,u,f,d=a/i,g=r/n,m=0,p=newUint16Array(i),b=a*c;for(l=0;l<i;l++)p[l]=Math.floor(l*d)*c;for(l=0;l<n;l++){u=Math.floor(l*g)*b;for(h=0;h<i;h++){f=u+p[h];o[m++]=e[f++];o[m++]=e[f++];o[m++]=e[f++];m+=s}}}functiont(){s("should not call ColorSpace constructor")}t.prototype={getRgb:function(e,t){vara=newUint8Array(3);this.getRgbItem(e,t,a,0);returna},getRgbItem:function(e,t,a,r){s("Should not call ColorSpace.getRgbItem")},getRgbBuffer:function(e,t,a,r,i,n,o){s("Should not call ColorSpace.getRgbBuffer")},getOutputLength:function(e,t){s("Should not call ColorSpace.getOutputLength")},isPassthrough:function(e){return!1},fillRgb:function(t,a,r,i,n,s,o,c,l){varh,u,f=a*r,d=null,g=1<<o,m=r!==n||a!==i;if(this.isPassthrough(o))d=c;elseif(1===this.numComps&&f>g&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){varp,b=o<=8?newUint8Array(g):newUint16Array(g);for(h=0;h<g;h++)b[h]=h;varv=newUint8Array(3*g);this.getRgbBuffer(b,0,g,v,0,o,0);vary,k;if(m){d=newUint8Array(3*f);k=0;for(h=0;h<f;++h){p=3*c[h];d[k++]=v[p];d[k++]=v[p+1];d[k++]=v[p+2]}}else{y=0;for(h=0;h<f;++h){p=3*c[h];t[y++]=v[p];t[y++]=v[p+1];t[y++]=v[p+2];y+=l}}}elseif(m){d=newUint8Array(3*f);this.getRgbBuffer(c,0,f,d,0,o,0)}elsethis.getRgbBuffer(c,0,i*s,t,0,o,l);if(d)if(m)e(d,o,a,r,i,n,l,t);else{k=0;y=0;for(h=0,u=i*s;h<u;h++){t[y++]=d[k++];t[y++]=d[k++];t[y++]=d[k++];y+=l}}},usesZeroToOneRange:!0};t.parse=function(e,a,r){vari=t.parseToIR(e,a,r);returniinstanceofb?i:t.fromIR(i)};t.fromIR=function(e){vara,r,i,n=c(e)?e[0]:e;switch(n){case"DeviceGrayCS":returnthis.singletons.gray;case"DeviceRgbCS":returnthis.singletons.rgb;case"DeviceCmykCS":returnthis.singletons.cmyk;case"CalGrayCS":a=e[1];r=e[2];i=e[3];returnnewC(a,r,i);case"CalRGBCS":a=e[1];r=e[2];i=e[3];varo=e[4];returnnewS(a,r,i,o);case"PatternCS":varl=e[1];l&&(l=t.fromIR(l));returnnewv(l);case"IndexedCS":varh=e[1],u=e[2],f=e[3];returnnewy(t.fromIR(h),u,f);case"AlternateCS":vard=e[1],g
t.WinAnsiEncoding=c;t.StandardEncoding=o;t.MacRomanEncoding=s;t.SymbolSetEncoding=l;t.ZapfDingbatsEncoding=h;t.ExpertEncoding=i;t.getEncoding=r},function(e,t,a){"use strict";varr=a(0),i=a(1),n=a(2),s=r.MissingDataException,o=r.StreamType,c=r.assert,l=r.error,h=r.info,u=r.isArray,f=r.isInt,d=r.isNum,g=r.isString,m=r.warn,p=i.EOF,b=i.Cmd,v=i.Dict,y=i.Name,k=i.Ref,w=i.isEOF,x=i.isCmd,C=i.isDict,S=i.isName,A=n.Ascii85Stream,I=n.AsciiHexStream,B=n.CCITTFaxStream,R=n.FlateStream,T=n.Jbig2Stream,O=n.JpegStream,P=n.JpxStream,M=n.LZWStream,E=n.NullStream,L=n.PredictorStream,D=n.RunLengthStream,F=1e3,q=function(){functione(e,t,a,r){this.lexer=e;this.allowStreams=t;this.xref=a;this.recoveryMode=r||!1;this.imageCache=Object.create(null);this.refill()}e.prototype={refill:function(){this.buf1=this.lexer.getObj();this.buf2=this.lexer.getObj()},shift:function(){if(x(this.buf2,"ID")){this.buf1=this.buf2;this.buf2=null}else{this.buf1=this.buf2;this.buf2=this.lexer.getObj()}},tryShift:function(){try{this.shift();return!0}catch(e){if(einstanceofs)throwe;return!1}},getObj:function(e){vart=this.buf1;this.shift();if(tinstanceofb)switch(t.cmd){case"BI":returnthis.makeInlineImage(e);case"[":for(vara=[];!x(this.buf1,"]")&&!w(this.buf1);)a.push(this.getObj(e));if(w(this.buf1)){this.recoveryMode||l("End of file inside array");returna}this.shift();returna;case"<<":for(varr=newv(this.xref);!x(this.buf1,">>")&&!w(this.buf1);)if(S(this.buf1)){vari=this.buf1.name;this.shift();if(w(this.buf1))break;r.set(i,this.getObj(e))}else{h("Malformed dictionary: key must be a name object");this.shift()}if(w(this.buf1)){this.recoveryMode||l("End of file inside dictionary");returnr}if(x(this.buf2,"stream"))returnthis.allowStreams?this.makeStream(r,e):r;this.shift();returnr;default:returnt}if(f(t)){varn=t;if(f(this.buf1)&&x(this.buf2,"R")){vars=newk(n,this.buf1);this.shift();this.shift();returns}returnn}if(g(t)){varo=t;e&&(o=e.decryptString(o));returno}returnt},findDefaultInlineStreamEnd:function(e){for(vart,a,r,i,n=69,s=73,o=32,l=10,h=13,u=e.pos,f=0;(t=e.getByte())!==-1;)if(0===f)f=t===n?1:0;elseif(1===f)f=t===s?2:0;else{c(2===f);if(t===o||t===l||t===h){r=5;i=e.peekBytes(r);for(a=0;a<r;a++){t=i[a];if(t!==l&&t!==h&&(t<o||t>127)){f=0;break}}if(2===f)break}elsef=0}returne.pos-4-u},findDCTDecodeInlineStreamEnd:function(e){for(vart,a,r,i=e.pos,n=!1;(t=e.getByte())!==-1;)if(255===t){switch(e.getByte()){case0:break;case255:e.skip(-1);break;case217:n=!0;break;case192:case193:case194:case195:case197:case198:case199:case201:case202:case203:case205:case206:case207:case196:case204:case218:case219:case220:case221:case222:case223:case224:case225:case226:case227:case228:case229:case230:case231:case232:case233:case234:case235:case236:case237:case238:case239:case254:a=e.getUint16();a>2?e.skip(a-2):e.skip(-2)}if(n)break}r=e.pos-i;if(t===-1){m("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.");e.skip(-r);returnthis.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);returnr},findASCII85DecodeInlineStreamEnd:function(e){for(vart,a,r=126,i=62,n=e.pos;(t=e.getByte())!==-1;)if(t===r&&e.peekByte()===i){e.skip();break}a=e.pos-n;if(t===-1){m("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-a);returnthis.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);returna},findASCIIHexDecodeInlineStreamEnd:function(e){for(vart,a,r=62,i=e.pos;(t=e.getByte())!==-1&&t!==r;);a=e.pos-i;if(t===-1){m("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-a);returnthis.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);returna},inlineStreamSkipEI:function(e){for(vart,a=69,r=73,i=0;(t=e.getByte())!==-1;)if(0===i)i=t===a?1:0;elseif(1===i)i=t===r?2:0;elseif(2===i)break},makeInlineImage:function(e){for(vart=this.lexer,a=t.stream,r=newv(this.xref);!x(this.buf1,"ID")&&!w(this.buf1);){S(this.buf1)||l("Dictionary key must be a name object");vari=this.buf1.name;this.shift();if(w(this.buf1))break;r
functione(e,t,a){this.bytes=e.getBytes();this.properties=t;this.seacAnalysisEnabled=!!a}vart=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],a=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn:function(e,t){e[t-1]=-e[t-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]*e[t-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];e.prototype={parse:function(){vare=this.properties,t=newx;this.cff=t;vara=this.parseHeader(),r=this.parseIndex(a.endPos),i=this.parseIndex(r.endPos),n=this.parseIndex(i.endPos),s=this.parseIndex(n.endPos),o=this.parseDict(i.obj.get(0)),c=this.createDict(B,o,t.strings);t.header=a.obj;t.names=this.parseNameIndex(r.obj);t.strings=this.parseStringIndex(n.obj);t.topDict=c;t.globalSubrIndex=s.obj;this.parsePrivateDict(t.topDict);t.isCIDFont=c.hasName("ROS");varl=c.getByName("CharStrings"),h=this.parseIndex(l).obj,u=c.getByName("FontMatrix");u&&(e.fontMatrix=u);varf=c.getByName("FontBBox");if(f){e.ascent=Math.max(f[3],f[1]);e.descent=Math.min(f[1],f[3]);e.ascentScaled=!0}vard,g;if(t.isCIDFont){for(varm=this.parseIndex(c.getByName("FDArray")).obj,p=0,b=m.count;p<b;++p){varv=m.get(p),y=this.createDict(B,this.parseDict(v),t.strings);this.parsePrivateDict(y);t.fdArray.push(y)}g=null;d=this.parseCharsets(c.getByName("charset"),h.count,t.strings,!0);t.fdSelect=this.parseFDSelect(c.getByName("FDSelect"),h.count)}else{d=this.parseCharsets(c.getByName("charset"),h.count,t.strings,!1);g=this.parseEncoding(c.getByName("Encoding"),e,t.strings,d.charset)}t.charset=d;t.encoding=g;vark=this.parseCharStrings(h,c.privateDict.subrsIndex,s.obj,t.fdSelect,t.fdArray);t.charStrings=k.charStrings;t.seacs=k.seacs;t.widths=k.widths;returnt},parseHeader:function(){for(vare=this.bytes,t=e.length,a=0;a<t&&1!==e[a];)++a;if(a>=t)s("Invalid CFF header");elseif(0!==a){o("cff data is shifted");e=e.subarray(a);this.bytes=e}varr=e[0],i=e[1],n=e[2],c=e[3],l=newC(r,i,n,c);return{obj:l,endPos:n}},parseDict:function(e){functiont(){vart=e[r++];if(30===t)returna();if(28===t){t=e[r++];t=(t<<24|e[r++]<<16)>>16;returnt}if(29===t){t=e[r++];t=t<<8|e[r++];t=t<<8|e[r++];t=t<<8|e[r++];returnt}if(t>=32&&t<=246)returnt-139;if(t>=247&&t<=250)return256*(t-247)+e[r++]+108;if(t>=251&&t<=254)return-(256*(t-251))-e[r++]-108;l('CFFParser_parseDict: "'+t+'" is a reserved command.');returnNaN}functiona(){for(vart="",a=15,i=["0","1","2
this.endTime=Date.now()+i;this.checked=0}};vars=Promise.resolve(),o=1,c=2;t.prototype={hasBlendModes:function(e){if(!j(e))return!1;vart=Object.create(null);e.objId&&(t[e.objId]=!0);for(vara=[e],r=this.xref;a.length;){vari,n,s,o=a.shift(),c=o.get("ExtGState");if(j(c)){varl=c.getKeys();for(n=0,s=l.length;n<s;n++){i=l[n];varh=c.get(i),u=h.get("BM");if(_(u)&&"Normal"!==u.name)return!0}}varf=o.get("XObject");if(j(f)){vard=f.getKeys();for(n=0,s=d.length;n<s;n++){i=d[n];varg=f.getRaw(i);if(z(g)){if(t[g.toString()])continue;g=r.fetch(g)}if(H(g)){if(g.dict.objId){if(t[g.dict.objId])continue;t[g.dict.objId]=!0}varm=g.dict.get("Resources");if(j(m)&&(!m.objId||!t[m.objId])){a.push(m);m.objId&&(t[m.objId]=!0)}}}}}return!1},buildFormXObject:function(e,t,a,r,i,n){vars=t.dict.getArray("Matrix"),o=t.dict.getArray("BBox"),c=t.dict.get("Group");if(c){varl,h={matrix:s,bbox:o,smask:a,isolated:!1,knockout:!1},u=c.get("S");if(_(u,"Transparency")){h.isolated=c.get("I")||!1;h.knockout=c.get("K")||!1;l=c.has("CS")?J.parse(c.get("CS"),this.xref,e):null}if(a&&a.backdrop){l=l||J.singletons.rgb;a.backdrop=l.getRgb(a.backdrop,0)}r.addOp(S.beginGroup,[h])}r.addOp(S.paintFormXObjectBegin,[s,o]);returnthis.getOperatorList(t,i,t.dict.get("Resources")||e,r,n).then(function(){r.addOp(S.paintFormXObjectEnd,[]);c&&r.addOp(S.endGroup,[h])})},buildPaintImageXObject:function(t,a,r,i,n,s){varo=this,c=a.dict,l=c.get("Width","W"),h=c.get("Height","H");if(l&&M(l)&&h&&M(h)){varu=this.options.maxImageSize;if(u!==-1&&l*h>u)D("Image exceeded maximum allowed size and was removed.");else{varf,d,g=c.get("ImageMask","IM")||!1;if(g){varm=c.get("Width","W"),p=c.get("Height","H"),b=m+7>>3,v=a.getBytes(b*p),y=c.getArray("Decode","D"),k=!!y&&y[0]>0;f=Y.createMask(v,m,p,ainstanceofG,k);f.cached=!0;d=[f];i.addOp(S.paintImageMaskXObject,d);n&&(s[n]={fn:S.paintImageMaskXObject,args:d})}else{varw=c.get("SMask","SM")||!1,x=c.get("Mask")||!1,C=200;if(!r||w||x||ainstanceofX||!(l+h<C)){varA=!this.options.disableNativeImageDecoder,I="img_"+this.idFactory.createObjId();i.addDependency(I);d=[I,l,h];if(A&&!w&&!x&&ainstanceofX&&e.isSupported(a,this.xref,t)){i.addOp(S.paintJpegXObject,d);this.handler.send("obj",[I,this.pageIndex,"JpegStream",a.getIR(this.options.forceDataSchema)])}else{varB=null;A&&(ainstanceofX||xinstanceofX||winstanceofX)&&(B=newe(o.xref,t,o.handler,o.options.forceDataSchema));Y.buildImage(o.handler,o.xref,t,a,r,B).then(function(e){vart=e.createImageData(!1);o.handler.send("obj",[I,o.pageIndex,"Image",t],[t.data.buffer])}).then(void0,function(e){D("Unable to decode image: "+e);o.handler.send("obj",[I,o.pageIndex,"Image",null])});i.addOp(S.paintImageXObject,d);n&&(s[n]={fn:S.paintImageXObject,args:d})}}else{varR=newY(this.xref,t,a,r,null,null);f=R.createImageData(!0);i.addOp(S.paintInlineImageXObject,[f])}}}}elseD("Image dimensions are missing, or not numbers.")},handleSMask:function(e,t,a,r,i){varn=e.get("G"),s={subtype:e.get("S").name,backdrop:e.get("BC")},o=e.get("TR");if(ie(o)){for(varc=ne.parse(this.xref,o),l=newUint8Array(256),h=newFloat32Array(1),u=0;u<256;u++){h[0]=u/255;c(h,0,h,0);l[u]=255*h[0]|0}s.transferMap=l}returnthis.buildFormXObject(t,n,s,a,r,i.state.clone())},handleTilingType:function(e,t,a,r,i,n,s){varo=newBe,c=[i.get("Resources"),a],l=F.merge(this.xref,c);returnthis.getOperatorList(r,s,l,o).then(function(){n.addDependencies(o.dependencies);n.addOp(e,oe({fnArray:o.fnArray,argsArray:o.argsArray},i,t))})},handleSetFont:function(e,t,a,r,i,n){vars;if(t){t=t.slice();s=t[0].name}varo=this;returnthis.loadFont(s,a,this.xref,e).then(function(t){returnt.font.isType3Font?t.loadType3Data(o,e,r,i).then(function(){returnt},function(e){o.handler.send("UnsupportedFeature",{featureId:x.font});returnnewIe("g_font_error",newQ("Type3 font load error: "+e),t.font)}):t}).then(function(e){n.font=e.font;e.send(o.handler);returne.loadedName})},handleText:function(e,t){vara=t.font,r=a.charsToGlyphs(e),i=!!(t.textRenderingMode&A.ADD_TO_PATH_FLAG);if(a.data&&(i||this.options.disableFontFace))for(varn=function(e){if(!a.renderer.h
numArgs:1,variableArgs:!1};e.Tf={id:S.setFont,numArgs:2,variableArgs:!1};e.Tr={id:S.setTextRenderingMode,numArgs:1,variableArgs:!1};e.Ts={id:S.setTextRise,numArgs:1,variableArgs:!1};e.Td={id:S.moveText,numArgs:2,variableArgs:!1};e.TD={id:S.setLeadingMoveText,numArgs:2,variableArgs:!1};e.Tm={id:S.setTextMatrix,numArgs:6,variableArgs:!1};e["T*"]={id:S.nextLine,numArgs:0,variableArgs:!1};e.Tj={id:S.showText,numArgs:1,variableArgs:!1};e.TJ={id:S.showSpacedText,numArgs:1,variableArgs:!1};e["'"]={id:S.nextLineShowText,numArgs:1,variableArgs:!1};e['"']={id:S.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1};e.d0={id:S.setCharWidth,numArgs:2,variableArgs:!1};e.d1={id:S.setCharWidthAndBounds,numArgs:6,variableArgs:!1};e.CS={id:S.setStrokeColorSpace,numArgs:1,variableArgs:!1};e.cs={id:S.setFillColorSpace,numArgs:1,variableArgs:!1};e.SC={id:S.setStrokeColor,numArgs:4,variableArgs:!0};e.SCN={id:S.setStrokeColorN,numArgs:33,variableArgs:!0};e.sc={id:S.setFillColor,numArgs:4,variableArgs:!0};e.scn={id:S.setFillColorN,numArgs:33,variableArgs:!0};e.G={id:S.setStrokeGray,numArgs:1,variableArgs:!1};e.g={id:S.setFillGray,numArgs:1,variableArgs:!1};e.RG={id:S.setStrokeRGBColor,numArgs:3,variableArgs:!1};e.rg={id:S.setFillRGBColor,numArgs:3,variableArgs:!1};e.K={id:S.setStrokeCMYKColor,numArgs:4,variableArgs:!1};e.k={id:S.setFillCMYKColor,numArgs:4,variableArgs:!1};e.sh={id:S.shadingFill,numArgs:1,variableArgs:!1};e.BI={id:S.beginInlineImage,numArgs:0,variableArgs:!1};e.ID={id:S.beginImageData,numArgs:0,variableArgs:!1};e.EI={id:S.endInlineImage,numArgs:1,variableArgs:!1};e.Do={id:S.paintXObject,numArgs:1,variableArgs:!1};e.MP={id:S.markPoint,numArgs:1,variableArgs:!1};e.DP={id:S.markPointProps,numArgs:2,variableArgs:!1};e.BMC={id:S.beginMarkedContent,numArgs:1,variableArgs:!1};e.BDC={id:S.beginMarkedContentProps,numArgs:2,variableArgs:!1};e.EMC={id:S.endMarkedContent,numArgs:0,variableArgs:!1};e.BX={id:S.beginCompat,numArgs:0,variableArgs:!1};e.EX={id:S.endCompat,numArgs:0,variableArgs:!1};e.BM=null;e.BD=null;e.true=null;e.fa=null;e.fal=null;e.fals=null;e.false=null;e.nu=null;e.nul=null;e.null=null});e.prototype={getsavedStatesDepth(){returnthis.stateManager.stateStack.length},read:function(e){for(vart=e.args;;){vara=this.parser.getObj();if(N(a)){varr=a.cmd,i=this.opMap[r];if(!i){D('Unknown command "'+r+'"');continue}varn=i.id,s=i.numArgs,o=null!==t?t.length:0;if(i.variableArgs)o>s&&O("Command "+n+": expected [0,"+s+"] args, but received "+o+" args.");else{if(o!==s){for(varc=this.nonProcessedArgs;o>s;){c.push(t.shift());o--}for(;o<s&&0!==c.length;){null===t&&(t=[]);t.unshift(c.pop());o++}}if(o<s){D("Skipping command "+n+": expected "+s+" args, but received "+o+" args.");null!==t&&(t.length=0);continue}}this.preprocessCommand(n,t);e.fn=n;e.args=t;return!0}if(U(a))return!1;if(null!==a){null===t&&(t=[]);t.push(a);B(t.length<=33,"Too many arguments")}}},preprocessCommand:function(e,t){switch(0|e){caseS.save:this.stateManager.save();break;caseS.restore:this.stateManager.restore();break;caseS.transform:this.stateManager.transform(t)}}};returne}(),Me=function(){functione(e,t,a){for(varr=e,i=0,n=t.length-1;i<n;i++){vars=t[i];r=r[s]||(r[s]=[])}r[t[t.length-1]]=a}functiont(e,t,a,r){for(vari=e+2,n=0;n<t;n++){vars=r[i+4*n],o=1===s.length&&s[0];if(!o||1!==o.width||1!==o.height||o.data.length&&(1!==o.data.length||0!==o.data[0]))break;a[i+4*n]=S.paintSolidColorImageMask}returnt-n}functiona(){}varr=[];e(r,[S.save,S.transform,S.paintInlineImageXObject,S.restore],function(e){for(vart=10,a=200,r=1e3,i=1,n=e.fnArray,s=e.argsArray,o=e.iCurr,c=o-3,l=o-2,h=o-1,u=c+4,f=n.length;u+3<f&&n[u]===S.save&&n[u+1]===S.transform&&n[u+2]===S.paintInlineImageXObject&&n[u+3]===S.restore;)u+=4;vard=Math.min((u-c)/4,a);if(d<t)returnu;varg,m=0,p=[],b=0,v=i,y=i;for(g=0;g<d;g++){vark=s[l+(g<<2)],w=s[h+(g<<2)][0];if(v+w.width>r){m=Math.max(m,v);y+=b+2*i;v=0;b=0}p.push({transform:k,x:v,y:y,w:w.width,h:w.height});v+=w.width+2*i;b=Math.max(b,w.height)}varx=Math.max(m,v)+i,A=y+b+i,I=newUint8Array(x*A*4),B=x<<2;for(g=0;g<d;g++){varR=s[h+(g<<2)][0].data,T
varr=a>>1;t|=0;vari,n;for(i=t,n=r+1;n--;i+=2)e[i]-=e[i-1]+e[i+1]+2>>2;for(i=t+1,n=r;n--;i+=2)e[i]+=e[i-1]+e[i+1]>>1};returne}();returne}();t.JpxImage=f},function(e,t,a){"use strict";varr=a(0),i=a(1),n=a(12),s=a(5),o=a(11),c=a(3),l=r.InvalidPDFException,h=r.MissingDataException,u=r.XRefParseException,f=r.assert,d=r.bytesToString,g=r.createPromiseCapability,m=r.error,p=r.info,b=r.isArray,v=r.isBool,y=r.isInt,k=r.isString,w=r.shadow,x=r.stringToPDFString,C=r.stringToUTF8String,S=r.warn,A=r.createValidAbsoluteUrl,I=r.Util,B=i.Ref,R=i.RefSet,T=i.RefSetCache,O=i.isName,P=i.isCmd,M=i.isDict,E=i.isRef,L=i.isRefsEqual,D=i.isStream,F=n.CipherTransformFactory,q=s.Lexer,U=s.Parser,N=o.ChunkedStream,j=c.ColorSpace,_=function(){functione(e,t,a){this.pdfManager=e;this.xref=t;this.catDict=t.getCatalogObj();this.fontCache=newT;f(M(this.catDict),"catalog object is not a dictionary");this.pageFactory=a;this.pagePromises=[]}e.prototype={getmetadata(){vare=this.catDict.getRaw("Metadata");if(!E(e))returnw(this,"metadata",null);vart,a=!!this.xref.encrypt&&this.xref.encrypt.encryptMetadata,r=this.xref.fetch(e,!a);if(r&&M(r.dict)){vari=r.dict.get("Type"),n=r.dict.get("Subtype");if(O(i,"Metadata")&&O(n,"XML"))try{t=C(d(r.getBytes()))}catch(e){p("Skipping invalid metadata.")}}returnw(this,"metadata",t)},gettoplevelPagesDict(){vare=this.catDict.get("Pages");f(M(e),"invalid top-level pages dictionary");returnw(this,"toplevelPagesDict",e)},getdocumentOutline(){vare=null;try{e=this.readDocumentOutline()}catch(e){if(einstanceofh)throwe;S("Unable to read document outline")}returnw(this,"documentOutline",e)},readDocumentOutline:function(){vart=this.catDict.get("Outlines");if(!M(t))returnnull;t=t.getRaw("First");if(!E(t))returnnull;vara={items:[]},r=[{obj:t,parent:a}],i=newR;i.put(t);for(varn=this.xref,s=newUint8Array(3);r.length>0;){varo=r.shift(),c=n.fetchIfRef(o.obj);if(null!==c){f(c.has("Title"),"Invalid outline item");varl={url:null,dest:null};e.parseDestDictionary({destDict:c,resultObj:l,docBaseUrl:this.pdfManager.docBaseUrl});varh=c.get("Title"),u=c.get("F")||0,d=c.getArray("C"),g=s;!b(d)||3!==d.length||0===d[0]&&0===d[1]&&0===d[2]||(g=j.singletons.rgb.getRgb(d,0));varm={dest:l.dest,url:l.url,unsafeUrl:l.unsafeUrl,newWindow:l.newWindow,title:x(h),color:g,count:c.get("Count"),bold:!!(2&u),italic:!!(1&u),items:[]};o.parent.items.push(m);t=c.getRaw("First");if(E(t)&&!i.has(t)){r.push({obj:t,parent:m});i.put(t)}t=c.getRaw("Next");if(E(t)&&!i.has(t)){r.push({obj:t,parent:o.parent});i.put(t)}}}returna.items.length>0?a.items:null},getnumPages(){vare=this.toplevelPagesDict.get("Count");f(y(e),"page count in top level pages object is not an integer");returnw(this,"num",e)},getdestinations(){functione(e){returnM(e)?e.get("D"):e}vart,a,r=this.xref,i={},n=this.catDict.get("Names");n&&n.has("Dests")?t=n.getRaw("Dests"):this.catDict.has("Dests")&&(a=this.catDict.get("Dests"));if(a){n=a;n.forEach(function(t,a){a&&(i[t]=e(a))})}if(t){vars=newG(t,r),o=s.getAll();for(varcino)i[c]=e(o[c])}returnw(this,"destinations",i)},getDestination:function(e){functiont(e){returnM(e)?e.get("D"):e}vara,r,i=this.xref,n=null,s=this.catDict.get("Names");s&&s.has("Dests")?a=s.getRaw("Dests"):this.catDict.has("Dests")&&(r=this.catDict.get("Dests"));if(r){varo=r.get(e);o&&(n=t(o))}if(a){varc=newG(a,i);n=t(c.get(e))}returnn},getpageLabels(){vare=null;try{e=this.readPageLabels()}catch(e){if(einstanceofh)throwe;S("Unable to read page labels.")}returnw(this,"pageLabels",e)},readPageLabels:function(){vare=this.catDict.getRaw("PageLabels");if(!e)returnnull;for(vart=newArray(this.numPages),a=null,r="",i=newX(e,this.xref),n=i.getAll(),s="",o=1,c=0,l=this.numPages;c<l;c++){if(cinn){varh=n[c];f(M(h),"The PageLabel is not a dictionary.");varu=h.get("Type");f(!u||O(u,"PageLabel"),"Invalid type in PageLabel dictionary.");vard=h.get("S");f(!d||O(d),"Invalid style in PageLabel dictionary.");a=d?d.name:null;varg=h.get("P");f(!g||k(g),"Invalid prefix in PageLabel dictionary.");r=g?x(g):"";varm=h.get("St");f(!m||y(m)&&m>=1,"Invalids
this.style=h.SOLID;this.dashArray=[3];this.horizontalCornerRadius=0;this.verticalCornerRadius=0}e.prototype={setWidth:function(e){e===(0|e)&&(this.width=e)},setStyle:function(e){if(e)switch(e.name){case"S":this.style=h.SOLID;break;case"D":this.style=h.DASHED;break;case"B":this.style=h.BEVELED;break;case"I":this.style=h.INSET;break;case"U":this.style=h.UNDERLINE}},setDashArray:function(e){if(p(e)&&e.length>0){for(vart=!0,a=!0,r=0,i=e.length;r<i;r++){varn=e[r],s=+n>=0;if(!s){t=!1;break}n>0&&(a=!1)}t&&!a?this.dashArray=e:this.width=0}elsee&&(this.width=0)},setHorizontalCornerRadius:function(e){e===(0|e)&&(this.horizontalCornerRadius=e)},setVerticalCornerRadius:function(e){e===(0|e)&&(this.verticalCornerRadius=e)}};returne}(),E=function(){functione(e){P.call(this,e);vart=e.dict,a=this.data;a.annotationType=d.WIDGET;a.fieldName=this._constructFieldName(t);a.fieldValue=m.getInheritableProperty(t,"V",!0);a.alternativeText=y(t.get("TU")||"");a.defaultAppearance=m.getInheritableProperty(t,"DA")||"";varr=m.getInheritableProperty(t,"FT");a.fieldType=C(r)?r.name:null;this.fieldResources=m.getInheritableProperty(t,"DR")||w.empty;a.fieldFlags=m.getInheritableProperty(t,"Ff");(!b(a.fieldFlags)||a.fieldFlags<0)&&(a.fieldFlags=0);a.readOnly=this.hasFieldFlag(u.READONLY);"Sig"===a.fieldType&&this.setFlags(f.HIDDEN)}m.inherit(e,P,{_constructFieldName:function(e){if(!e.has("T")&&!e.has("Parent")){k("Unknown field name, falling back to empty field name.");return""}if(!e.has("Parent"))returny(e.get("T"));vart=[];e.has("T")&&t.unshift(y(e.get("T")));for(vara=e;a.has("Parent");){a=a.get("Parent");a.has("T")&&t.unshift(y(a.get("T")))}returnt.join(".")},hasFieldFlag:function(e){return!!(this.data.fieldFlags&e)}});returne}(),L=function(){functione(e){E.call(this,e);this.data.fieldValue=y(this.data.fieldValue||"");vart=m.getInheritableProperty(e.dict,"Q");(!b(t)||t<0||t>2)&&(t=null);this.data.textAlignment=t;vara=m.getInheritableProperty(e.dict,"MaxLen");(!b(a)||a<0)&&(a=null);this.data.maxLen=a;this.data.multiLine=this.hasFieldFlag(u.MULTILINE);this.data.comb=this.hasFieldFlag(u.COMB)&&!this.hasFieldFlag(u.MULTILINE)&&!this.hasFieldFlag(u.PASSWORD)&&!this.hasFieldFlag(u.FILESELECT)&&null!==this.data.maxLen}m.inherit(e,E,{getOperatorList:function(e,t,a){varr=newO;if(a)returnPromise.resolve(r);if(this.appearance)returnP.prototype.getOperatorList.call(this,e,t,a);if(!this.data.defaultAppearance)returnPromise.resolve(r);vari=newA(v(this.data.defaultAppearance));returne.getOperatorList(i,t,this.fieldResources,r).then(function(){returnr})}});returne}(),D=function(){functione(e){E.call(this,e);this.data.checkBox=!this.hasFieldFlag(u.RADIO)&&!this.hasFieldFlag(u.PUSHBUTTON);if(this.data.checkBox){if(!C(this.data.fieldValue))return;this.data.fieldValue=this.data.fieldValue.name}this.data.radioButton=this.hasFieldFlag(u.RADIO)&&!this.hasFieldFlag(u.PUSHBUTTON);if(this.data.radioButton){this.data.fieldValue=this.data.buttonValue=null;vart=e.dict.get("Parent");if(x(t)&&t.has("V")){vara=t.get("V");C(a)&&(this.data.fieldValue=a.name)}varr=e.dict.get("AP");if(!x(r))return;vari=r.get("N");if(!x(i))return;for(varn=i.getKeys(),s=0,o=n.length;s<o;s++)if("Off"!==n[s]){this.data.buttonValue=n[s];break}}}m.inherit(e,E,{getOperatorList:function(e,t,a){varr=newO;returna?Promise.resolve(r):this.appearance?P.prototype.getOperatorList.call(this,e,t,a):Promise.resolve(r)}});returne}(),F=function(){functione(e){E.call(this,e);this.data.options=[];vart=e.dict.get("Opt");if(p(t))for(vara=e.xref,r=0,i=t.length;r<i;r++){varn=a.fetchIfRef(t[r]),s=p(n);this.data.options[r]={exportValue:s?a.fetchIfRef(n[0]):n,displayValue:s?a.fetchIfRef(n[1]):n}}p(this.data.fieldValue)||(this.data.fieldValue=[this.data.fieldValue]);this.data.combo=this.hasFieldFlag(u.COMBO);this.data.multiSelect=this.hasFieldFlag(u.MULTISELECT)}m.inherit(e,E,{getOperatorList:function(e,t,a){varr=newO;returna?Promise.resolve(r):P.prototype.getOperatorList.call(this,e,t,a)}});returne}(),q=function(){functione(e){P.call(this,e);this.data.annotationType=d.TEXT;if(this.data.ha
getentries(){returnk(this,"entries",{Title:y,Author:y,Subject:y,Keywords:y,Creator:y,Producer:y,CreationDate:y,ModDate:y,Trapped:B})}};e.prototype={parse:function(e){this.setup(e);vart=this.catalog.catDict.get("Version");B(t)&&(this.pdfFormatVersion=t.name);try{this.acroForm=this.catalog.catDict.get("AcroForm");if(this.acroForm){this.xfa=this.acroForm.get("XFA");vara=this.acroForm.get("Fields");a&&p(a)&&0!==a.length||this.xfa||(this.acroForm=null)}}catch(e){m("Something wrong with AcroForm entry");this.acroForm=null}},getlinearization(){vare=null;if(this.stream.length)try{e=D.create(this.stream)}catch(e){if(einstanceofu)throwe;m(e)}returnk(this,"linearization",e)},getstartXRef(){vare=this.stream,a=0,r=this.linearization;if(r){e.reset();t(e,"endobj",1024)&&(a=e.pos+6)}else{for(vari=1024,n=!1,s=e.end;!n&&s>0;){s-=i-"startxref".length;s<0&&(s=0);e.pos=s;n=t(e,"startxref",i,!0)}if(n){e.skip(9);varo;doo=e.getByte();while(S(o));for(varc="";o>=32&&o<=57;){c+=String.fromCharCode(o);o=e.getByte()}a=parseInt(c,10);isNaN(a)&&(a=0)}}returnk(this,"startXRef",a)},getmainXRefEntriesOffset(){vare=0,t=this.linearization;t&&(e=t.mainXRefEntriesOffset);returnk(this,"mainXRefEntriesOffset",e)},checkHeader:function(){vare=this.stream;e.reset();if(t(e,"%PDF-",1024)){e.moveStart();for(vara,r=12,i="";(a=e.getByte())>32&&!(i.length>=r);)i+=String.fromCharCode(a);this.pdfFormatVersion||(this.pdfFormatVersion=i.substring(5))}else;},parseStartXRef:function(){vare=this.startXRef;this.xref.setStartXRef(e)},setup:function(e){this.xref.parse(e);vart=this,a={createPage:function(e,a,r,i){returnnew_(t.pdfManager,t.xref,e,a,r,i)}};this.catalog=newM(this.pdfManager,this.xref,a)},getnumPages(){vare=this.linearization,t=e?e.numPages:this.catalog.numPages;returnk(this,"numPages",t)},getdocumentInfo(){vare,t={PDFFormatVersion:this.pdfFormatVersion,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa};try{e=this.xref.trailer.get("Info")}catch(e){m("The document information dictionary is invalid.")}if(e){vara=i.entries;for(varrina)if(e.has(r)){varn=e.get(r);a[r](n)?t[r]="string"!=typeofn?n:x(n):m('Bad value in document info for "'+r+'"')}}returnk(this,"documentInfo",t)},getfingerprint(){vare,t=this.xref,i="",n=t.trailer.get("ID");if(n&&p(n)&&n[0]&&y(n[0])&&n[0]!==r)e=w(n[0]);else{this.stream.ensureRange&&this.stream.ensureRange(0,Math.min(a,this.stream.end));e=F(this.stream.bytes.subarray(0,a),0,a)}for(vars=0,o=e.length;s<o;s++){varc=e[s].toString(16);i+=1===c.length?"0"+c:c}returnk(this,"fingerprint",i)},getPage:function(e){returnthis.catalog.getPage(e)},cleanup:function(){returnthis.catalog.cleanup()}};returne}();t.Page=_;t.PDFDocument=z},function(e,t,a){"use strict";varr=a(0),i=a(2),n=a(7),s=a(4),o=a(10),c=r.Util,l=r.bytesToString,h=r.error,u=i.Stream,f=n.getGlyphsUnicode,d=s.StandardEncoding,g=o.CFFParser,m=function(){functione(e,t){returne[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}functiont(e,t){returne[t]<<8|e[t+1]}functiona(a,r,i){varn,s,o,c=1===t(a,r+2)?e(a,r+8):e(a,r+16),l=t(a,r+c);if(4===l){t(a,r+c+2);varu=t(a,r+c+6)>>1;s=r+c+14;n=[];for(o=0;o<u;o++,s+=2)n[o]={end:t(a,s)};s+=2;for(o=0;o<u;o++,s+=2)n[o].start=t(a,s);for(o=0;o<u;o++,s+=2)n[o].idDelta=t(a,s);for(o=0;o<u;o++,s+=2){varf=t(a,s);if(0!==f){n[o].ids=[];for(vard=0,g=n[o].end-n[o].start+1;d<g;d++){n[o].ids[d]=t(a,s+f);f+=2}}}returnn}if(12===l){e(a,r+c+4);varm=e(a,r+c+12);s=r+c+16;n=[];for(o=0;o<m;o++){n.push({start:e(a,s),end:e(a,s+4),idDelta:e(a,s+8)-e(a,s)});s+=12}returnn}h("not supported cmap: "+l)}functionr(e,t,a,r){vari={},n=newg(newu(e,t,a-t),i,r),s=n.parse();return{glyphs:s.charStrings.objects,subrs:s.topDict.privateDict&&s.topDict.privateDict.subrsIndex&&s.topDict.privateDict.subrsIndex.objects,gsubrs:s.globalSubrIndex&&s.globalSubrIndex.objects}}functioni(e,t,a){varr,i;if(a){r=4;i=function(e,t){returne[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}}else{r=2;i=function(e,t){returne[t]<<9|e[t+1]<<1}}for(varn=[],s=i(t,0),o=r;o<t.length;o+=r){varc=i(t,o);n.push(e.subarray(s,c));s=c}returnn}functionn(e,t){for(vara=t.charCodeAt(0),r=0
b<258?c.push(ue[b]):c.push(g[b-258])}break;case196608:break;default:T("Unknown/unsupported post table version "+o);h=!1;t.defaultEncoding&&(c=t.defaultEncoding)}t.glyphNames=c;returnh}functionb(e){vart=(i.start?i.start:0)+e.offset;i.pos=t;vara=[[],[]],r=e.length,n=t+r,s=i.getUint16(),o=6;if(0!==s||r<o)returna;varc,l,h=i.getUint16(),u=i.getUint16(),f=[],d=12;for(c=0;c<h&&i.pos+d<=n;c++){varg={platform:i.getUint16(),encoding:i.getUint16(),language:i.getUint16(),name:i.getUint16(),length:i.getUint16(),offset:i.getUint16()};(1===g.platform&&0===g.encoding&&0===g.language||3===g.platform&&1===g.encoding&&1033===g.language)&&f.push(g)}for(c=0,l=f.length;c<l;c++){varm=f[c];if(!(m.length<=0)){varp=t+u+m.offset;if(!(p+m.length>n)){i.pos=p;varb=m.name;if(m.encoding){for(varv="",y=0,w=m.length;y<w;y+=2)v+=String.fromCharCode(i.getUint16());a[1][b]=v}elsea[0][b]=k(i.getBytes(m.length))}}}returna}functionv(e,t){for(vara,r,i,n,s,o=e.data,c=0,l=0,h=0,u=[],f=[],d=[],g=t.tooComplexToFollowFunctions,m=!1,p=0,b=0,v=o.length;c<v;){vary=o[c++];if(64===y){r=o[c++];if(m||b)c+=r;elsefor(a=0;a<r;a++)u.push(o[c++])}elseif(65===y){r=o[c++];if(m||b)c+=2*r;elsefor(a=0;a<r;a++){i=o[c++];u.push(i<<8|o[c++])}}elseif(176===(248&y)){r=y-176+1;if(m||b)c+=r;elsefor(a=0;a<r;a++)u.push(o[c++])}elseif(184===(248&y)){r=y-184+1;if(m||b)c+=2*r;elsefor(a=0;a<r;a++){i=o[c++];u.push(i<<8|o[c++])}}elseif(43!==y||g)if(44!==y||g){if(45===y)if(m){m=!1;l=c}else{s=f.pop();if(!s){T("TT: ENDF bad stack");t.hintsValid=!1;return}n=d.pop();o=s.data;c=s.i;t.functionsStackDeltas[n]=u.length-s.stackTop}elseif(137===y){if(m||b){T("TT: nested IDEFs not allowed");g=!0}m=!0;h=c}elseif(88===y)++p;elseif(27===y)b=p;elseif(89===y){b===p&&(b=0);--p}elseif(28===y&&!m&&!b){vark=u[u.length-1];k>0&&(c+=k-1)}}else{if(m||b){T("TT: nested FDEFs not allowed");g=!0}m=!0;h=c;n=u.pop();t.functionsDefined[n]={data:o,i:c}}elseif(!m&&!b){n=u[u.length-1];t.functionsUsed[n]=!0;if(nint.functionsStackDeltas)u.length+=t.functionsStackDeltas[n];elseif(nint.functionsDefined&&d.indexOf(n)<0){f.push({data:o,i:c,stackTop:u.length-1});d.push(n);s=t.functionsDefined[n];if(!s){T("TT: CALL non-existent function");t.hintsValid=!1;return}o=s.data;c=s.i}}if(!m&&!b){varw=y<=142?D[y]:y>=192&&y<=223?-1:y>=224?-2:0;if(y>=113&&y<=117){r=u.pop();isNaN(r)||(w=2*-r)}for(;w<0&&u.length>0;){u.pop();w++}for(;w>0;){u.push(NaN);w--}}}t.tooComplexToFollowFunctions=g;varx=[o];c>o.length&&x.push(newUint8Array(c-o.length));if(h>l){T("TT: complementing a missing function tail");x.push(newUint8Array([34,45]))}B(e,x)}functionI(e,t){if(!e.tooComplexToFollowFunctions)if(e.functionsDefined.length>t){T("TT: more functions defined than expected");e.hintsValid=!1}elsefor(vara=0,r=e.functionsUsed.length;a<r;a++){if(a>t){T("TT: invalid function id: "+a);e.hintsValid=!1;return}if(e.functionsUsed[a]&&!e.functionsDefined[a]){T("TT: undefined function: "+a);e.hintsValid=!1;return}}}functionB(e,t){if(t.length>1){vara,r,i=0;for(a=0,r=t.length;a<r;a++)i+=t[a].length;i=i+3&-4;varn=newUint8Array(i),s=0;for(a=0,r=t.length;a<r;a++){n.set(t[a],s);s+=t[a].length}e.data=n;e.length=i}}functionR(e,t,a,r){vari={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};e&&v(e,i);t&&v(t,i);e&&I(i,r);if(a&&1&a.length){varn=newUint8Array(a.length+1);n.set(a.data);a.data=n}returni.hintsValid}functionL(e,t,a){return!re[e]||(!!(!de&&t>=0&&he.has(t))||!!(fe&&a>=0&&A(fe[a])))}varD=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];i=newM(newUint8Array(i.getBytes()));varU,N,_=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "],z=l(i),H=z.numTables,G=Object.create(null);G["OS/2"
x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],I=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],B=[39717,1941,229,405],R=[32,8],T=17;x.prototype={onPageInformation:function(e){this.currentPageInfo=e;vart=e.width+7>>3,a=newUint8Array(t*e.height);if(e.defaultPixelValue)for(varr=0,i=a.length;r<i;r++)a[r]=255;this.buffer=a},drawBitmap:function(e,t){vara,r,i,s,o=this.currentPageInfo,c=e.width,l=e.height,h=o.width+7>>3,u=o.combinationOperatorOverride?e.combinationOperator:o.combinationOperator,f=this.buffer,d=128>>(7&e.x),g=e.y*h+(e.x>>3);switch(u){case0:for(a=0;a<l;a++){i=d;s=g;for(r=0;r<c;r++){t[a][r]&&(f[s]|=i);i>>=1;if(!i){i=128;s++}}g+=h}break;case2:for(a=0;a<l;a++){i=d;s=g;for(r=0;r<c;r++){t[a][r]&&(f[s]^=i);i>>=1;if(!i){i=128;s++}}g+=h}break;default:n("JBIG2 error: operator "+u+" is not supported")}},onImmediateGenericRegion:function(e,a,r,i){varn=e.info,s=newt(a,r,i),o=f(e.mmr,n.width,n.height,e.template,e.prediction,null,e.at,s);this.drawBitmap(n,o)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(e,a,r,i,s,o){varc;e.huffman&&n("JBIG2 error: huffman is not supported");varl=this.symbols;l||(this.symbols=l={});for(varh=[],u=0,f=r.length;u<f;u++)h=h.concat(l[r[u]]);vard=newt(i,s,o);l[a]=g(e.huffman,e.refinement,h,e.numberOfNewSymbols,e.numberOfExportedSymbols,c,e.template,e.at,e.refinementTemplate,e.refinementAt,d)},onImmediateTextRegion:function(e,a,r,i,n){for(varo,c=e.info,l=this.symbols,h=[],u=0,f=a.length;u<f;u++)h=h.concat(l[a[u]]);vard=s(h.length),g=newt(r,i,n),p=m(e.huffman,e.refinement,c.width,c.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,h,d,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,o,e.refinementTemplate,e.refinementAt,g);this.drawBitmap(c,p)},onImmediateLosslessTextRegion:function(){this.onImmediateTextRegion.apply(this,arguments)}};C.prototype={parseChunks:function(e){returnw(e)}};returnC}();t.Jbig2Image=f},function(e,t,a){"use strict";varr=a(0),i=r.error,n=function(){functione(){this.decodeTransform=null;this.colorTransform=-1}functiont(e,t){for(vara,r,i=0,n=[],s=16;s>0&&!e[s-1];)s--;n.push({children:[],index:0});varo,c=n[0];for(a=0;a<s;a++){for(r=0;r<e[a];r++){c=n.pop();c.children[c.index]=t[i];for(;c.index>0;)c=n.pop();c.index++;n.push(c);for(;n.length<=a;){n.push(o={children:[],index:0});c.children[c.index]=o.children;c=o}i++}if(a+1<s){n.push(o={children:[],index:0});c.children[c.index]=o.children;c=o}}returnn[0].children}functiona(e,t,a){return64*((e.blocksPerLine+1)*t+a)}functionr(e,t,r,n,s,o,l,h,u){functionf(){if(L>0){L--;returnE>>L&1}E=e[t++];if(255===E){vara=e[t++];a&&i("JPEG error: unexpected marker "+(E<<8|a).toString(16))}L=7;returnE>>>7}functiond(e){for(vart=e;;){t=t[f()];if("number"==typeoft)returnt;"object"!=typeoft&&i("JPEG error: invalid huffman sequence")}}functiong(e){for(vart=0;e>0;){t=t<<1|f();e--}returnt}functionm(e){if(1===e)return1===f()?1:-1;vart=g(e);returnt>=1<<e-1?t:t+(-1<<e)+1}functionp(e,t){vara=d(e.huffmanTableDC),r=0===a?0:m(a);e.blockData[t]=e.pred+=r;for(vari=1;i<64;){varn=d(e.huffmanTableAC),s=15&n,o=n>>4;if(0!==s){i+=o;varl=c[i];e.blockData[t+l]=m(s);i++}else{if(o<15)break;i+=16}}}functionb(e,t){vara=d(e.huffmanTableDC),r=0===a?0:m(a)<<u;e.blockData[t]=e.pred+=r}functionv(e,t){e.blockData[t]|=f()<<u}functiony(e,t){if(D>0)D--;elsefor(vara=o,r=l;a<=r;){vari
})}}functions(e){for(vart=e.coords[0][0],a=e.coords[0][1],r=t,i=a,n=1,s=e.coords.length;n<s;n++){varo=e.coords[n][0],c=e.coords[n][1];t=t>o?o:t;a=a>c?c:a;r=r<o?o:r;i=i<c?c:i}e.bounds=[t,a,r,i]}functiono(e){vart,a,r,i,n=e.coords,s=newFloat32Array(2*n.length);for(t=0,r=0,a=n.length;t<a;t++){varo=n[t];s[r++]=o[0];s[r++]=o[1]}e.coords=s;varc=e.colors,l=newUint8Array(3*c.length);for(t=0,r=0,a=c.length;t<a;t++){varh=c[t];l[r++]=h[0];l[r++]=h[1];l[r++]=h[2]}e.colors=l;varu=e.figures;for(t=0,a=u.length;t<a;t++){varf=u[t],d=f.coords,g=f.colors;for(r=0,i=d.length;r<i;r++){d[r]*=2;g[r]*=3}}}functionc(c,l,h,d){u(m(c),"Mesh data is not a stream");varg=c.dict;this.matrix=l;this.shadingType=g.get("ShadingType");this.type="Pattern";this.bbox=g.getArray("BBox");vary=g.get("ColorSpace","CS");y=b.parse(y,h,d);this.cs=y;this.background=g.has("Background")?y.getRgb(g.get("Background"),0):null;vark=g.get("Function"),w=k?p.parseArray(h,k):null;this.coords=[];this.colors=[];this.figures=[];varx={bitsPerCoordinate:g.get("BitsPerCoordinate"),bitsPerComponent:g.get("BitsPerComponent"),bitsPerFlag:g.get("BitsPerFlag"),decode:g.getArray("Decode"),colorFn:w,colorSpace:y,numComps:w?1:y.numComps},C=newe(c,x),S=!1;switch(this.shadingType){casev.FREE_FORM_MESH:t(this,C);break;casev.LATTICE_FORM_MESH:varA=0|g.get("VerticesPerRow");u(A>=2,"Invalid VerticesPerRow");a(this,C,A);break;casev.COONS_PATCH_MESH:i(this,C);S=!0;break;casev.TENSOR_PATCH_MESH:n(this,C);S=!0;break;default:f("Unsupported mesh type.")}if(S){s(this);for(varI=0,B=this.figures.length;I<B;I++)r(this,I)}s(this);o(this)}e.prototype={gethasData(){if(this.stream.end)returnthis.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;vare=this.stream.getByte();if(e<0)return!1;this.buffer=e;this.bufferLength=8;return!0},readBits:function(e){vart=this.buffer,a=this.bufferLength;if(32===e){if(0===a)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();varr=this.stream.getByte();this.buffer=r&(1<<a)-1;return(t<<8-a|(255&r)>>a)>>>0}if(8===e&&0===a)returnthis.stream.getByte();for(;a<e;){t=t<<8|this.stream.getByte();a+=8}a-=e;this.bufferLength=a;this.buffer=t&(1<<a)-1;returnt>>a},align:function(){this.buffer=0;this.bufferLength=0},readFlag:function(){returnthis.readBits(this.context.bitsPerFlag)},readCoordinate:function(){vare=this.context.bitsPerCoordinate,t=this.readBits(e),a=this.readBits(e),r=this.context.decode,i=e<32?1/((1<<e)-1):2.3283064365386963e-10;return[t*i*(r[1]-r[0])+r[0],a*i*(r[3]-r[2])+r[2]]},readComponents:function(){for(vare=this.context.numComps,t=this.context.bitsPerComponent,a=t<32?1/((1<<t)-1):2.3283064365386963e-10,r=this.context.decode,i=this.tmpCompsBuf,n=0,s=4;n<e;n++,s+=2){varo=this.readBits(t);i[n]=o*a*(r[s+1]-r[s])+r[s]}varc=this.tmpCsCompsBuf;this.context.colorFn&&this.context.colorFn(i,0,c,0);returnthis.context.colorSpace.getRgb(c,0)}};varl=3,h=20,d=20,g=function(){functione(e){for(vart=[],a=0;a<=e;a++){varr=a/e,i=1-r;t.push(newFloat32Array([i*i*i,3*r*i*i,3*r*r*i,r*r*r]))}returnt}vart=[];returnfunction(a){t[a]||(t[a]=e(a));returnt[a]}}();c.prototype={getIR:function(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.matrix,this.bbox,this.background]}};returnc}();k.Dummy=function(){functione(){this.type="Pattern"}e.prototype={getIR:function(){return["Dummy"]}};returne}();t.Pattern=y;t.getTilingPatternIR=r},function(e,t,a){"use strict";varr=a(0),i=a(2),n=a(11),s=a(25),o=r.warn,c=r.createValidAbsoluteUrl,l=r.shadow,h=r.NotImplementedException,u=r.MissingDataException,f=r.createPromiseCapability,d=r.Util,g=i.Stream,m=n.ChunkedStreamManager,p=s.PDFDocument,b=function(){functione(){thrownewError("Cannot initialize BaseManagerManager")}e.prototype={getdocId(){returnthis._docId},getpassword(){returnthis._password},getdocBaseUrl(){vare=null;if(this._docBaseUrl){vart=c(this._docBaseUrl);t?e=t.href:o('Invalid absolute docBaseUrl: "'+this._docBaseUrl+'