e.constructor=e;returne}(),oe=function(){functione(e,t){this.begin=e;this.end=t;this.message="Missing data ["+e+", "+t+")"}e.prototype=newError;e.prototype.name="MissingDataException";e.constructor=e;returne}(),ce=function(){functione(e){this.message=e}e.prototype=newError;e.prototype.name="XRefParseException";e.constructor=e;returne}(),le=/\x00/g,he=function(){functione(e,t){this.buffer=e;this.byteLength=e.length;this.length=void0===t?this.byteLength>>2:t;a(this.length)}functiont(e){return{get:function(){vart=this.buffer,a=e<<2;return(t[a]|t[a+1]<<8|t[a+2]<<16|t[a+3]<<24)>>>0},set:function(t){vara=this.buffer,r=e<<2;a[r]=255&t;a[r+1]=t>>8&255;a[r+2]=t>>16&255;a[r+3]=t>>>24&255}}}functiona(a){for(;r<a;){Object.defineProperty(e.prototype,r,t(r));r++}}e.prototype=Object.create(null);varr=0;returne}();e.Uint32ArrayView=he;varue=[1,0,0,1,0,0],fe=function(){functione(){}vart=["rgb(",0,",",0,",",0,")"];e.makeCssRgb=function(e,a,r){t[1]=e;t[3]=a;t[5]=r;returnt.join("")};e.transform=function(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]]};e.applyTransform=function(e,t){vara=e[0]*t[0]+e[1]*t[2]+t[4],r=e[0]*t[1]+e[1]*t[3]+t[5];return[a,r]};e.applyInverseTransform=function(e,t){vara=t[0]*t[3]-t[1]*t[2],r=(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/a,i=(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/a;return[r,i]};e.getAxialAlignedBoundingBox=function(t,a){varr=e.applyTransform(t,a),i=e.applyTransform(t.slice(2,4),a),n=e.applyTransform([t[0],t[3]],a),s=e.applyTransform([t[2],t[1]],a);return[Math.min(r[0],i[0],n[0],s[0]),Math.min(r[1],i[1],n[1],s[1]),Math.max(r[0],i[0],n[0],s[0]),Math.max(r[1],i[1],n[1],s[1])]};e.inverseTransform=function(e){vart=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]};e.apply3dTransform=function(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]]};e.singularValueDecompose2dScale=function(e){vart=[e[0],e[2],e[1],e[3]],a=e[0]*t[0]+e[1]*t[2],r=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],s=(a+n)/2,o=Math.sqrt((a+n)*(a+n)-4*(a*n-i*r))/2,c=s+o||1,l=s-o||1;return[Math.sqrt(c),Math.sqrt(l)]};e.normalizeRect=function(e){vart=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}returnt};e.intersect=function(t,a){functionr(e,t){returne-t}vari=[t[0],t[2],a[0],a[2]].sort(r),n=[t[1],t[3],a[1],a[3]].sort(r),s=[];t=e.normalizeRect(t);a=e.normalizeRect(a);if(!(i[0]===t[0]&&i[1]===a[0]||i[0]===a[0]&&i[1]===t[0]))return!1;s[0]=i[1];s[2]=i[2];if(!(n[0]===t[1]&&n[1]===a[1]||n[0]===a[1]&&n[1]===t[1]))return!1;s[1]=n[1];s[3]=n[2];returns};e.sign=function(e){returne<0?-1:1};vara=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];e.toRoman=function(e,t){c(P(e)&&e>0,"The number should be a positive integer.");for(varr,i=[];e>=1e3;){e-=1e3;i.push("M")}r=e/100|0;e%=100;i.push(a[r]);r=e/10|0;e%=10;i.push(a[10+r]);i.push(a[20+e]);varn=i.join("");returnt?n.toLowerCase():n};e.appendToArray=function(e,t){Array.prototype.push.apply(e,t)};e.prependToArray=function(e,t){Array.prototype.unshift.apply(e,t)};e.extendObj=function(e,t){for(varaint)e[a]=t[a]};e.getInheritableProperty=function(e,t,a){for(;e&&!e.has(t);)e=e.get("Parent");returne?a?e.getArray(t):e.get(t):null};e.inherit=function(e,t,a){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;for(varrina)e.prototype[r]=a[r]};e.loadScript=function(e,t){vara=document.createElement("script"),r=!1;a.setAttribute("src",e);t&&(a.onload=function(){r||t();r=!0});document.getElementsByTagName("head")[0].appendChild(a)};returne}(),de=function(){functione(e,t,a,r,i,n){this.viewBox=e;this.scale=t;this.rotation=a;this.offsetX=r;this.offsetY=i;vars,o,c,l,h=(e[2]+e[0])/2,u=(e[3]+e[1])/2;a%=360;a=a<0?a+360:a;switch(a){case180:s=-1;o=0;c=0;l=1;break;case90:s=0;o=1;c=1;l=0;break;case270:s=0;o=-1;c=-1;l=0;bre
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=f[3];e.descent=f[1];e.ascentScaled=!0}vard,g;if(t.isCIDFont){for(varp=this.parseIndex(c.getByName("FDArray")).obj,m=0,b=p.count;m<b;++m){varv=p.get(m),y=this.createDict(A,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;varw=this.parseCharStrings(h,c.privateDict.subrsIndex,s.obj,t.fdSelect,t.fdArray);t.charStrings=w.charStrings;t.seacs=w.seacs;t.widths=w.widths;returnt},parseHeader:function(){for(vare=this.bytes,t=e.length,a=0;a<t&&1!==e[a];)++a;if(a>=t)i("Invalid CFF header");elseif(0!==a){n("cff data is shifted");e=e.subarray(a);this.bytes=e}varr=e[0],s=e[1],o=e[2],c=e[3],l=neww(r,s,o,c);return{obj:l,endPos:o}},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;o('CFFParser_parseDict: "'+t+'" is a reserved command.');returnNaN}functiona(){for(vart="",a=15,i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],n=e.length;r<n;){vars=e[r++],o=s>>4,c=15&s;if(o===a)break;t+=i[o];if(c===a)break;t+=i[c]}returnparseFloat(t)}varr=0,i=[],n=[];r=0;for(vars=e.length;r<s;){varc=e[r];if(c<=21){12===c&&(c=c<<8|e[++r]);n.push([c,i]);i=[];++r}elsei.push(t())}returnn},parseIndex:function(e){vart,a,r=newx,i=this.bytes,n=i[e++]<<8|i[e++],s=[],o=e;if(0!==n){varc=i[e++],l=e+(n+1)*c-1;for(t=0,a=n+1;t<a;++t){for(varh=0,u=0;u<c;++u){h<<=8;h+=i[e++]}s.push(l+h)}o=s[n]}for(t=0,a=s.length-1;t<a;++t){varf=s[t],d=s[t+1];r.add(i.subarray(f,d))}return{obj:r,endPos:o}},parseNameIndex:function(e){for(vart=[],a=0,r=e.count;a<r;++a){for(vari=e.get(a),n=Math.min(i.length,127),o=[],c=0;c<n;++c){varl=i[c];(0!==c||0!==l)&&(l<33||l>126||91===l||93===l||40===l||41===l||123===l||125===l||60===l||62===l||47===l||37===l||35===l)?o[c]=95:o[c]=l}t.push(s(o))}returnt},parseStringIndex:function(e){for(vart=newC,a=0,r=e.count;a<r;++a){vari=e.get(a);t.add(s(i))}returnt},createDict:function(e,t,a){for(varr=newe(a),i=0,n=t.length;i<n;++i){vars=t[i],o=s[0],c=s[1];r.setByKey(o,c)}returnr},parseCharString:function(e,r,i,n){if(e.callDepth>b)return!1;for(vars=e.stackSize,c=e.stack,l=r.length,h=0;h<l;){varu=r[h++],f=null;if(12===u){vard=r[h++];if(0===d){r[h-2]=139;r[h-1]=22;s=0}elsef=a[d]}elseif(28===u){c[s]=(r[h]<<24|r[h+1]<<16)>>16;h+=2;s++}elseif(14===u){if(s>=4){s-=4;if(this.seacAnalysisEnabled){e.seac=c.slice(s,s+4);return!1}}f=t[u]}elseif(u>=32&&u<=246){c[s]=u-139;s++}elseif(u>=247&&u<=254){c[s]=u<251?(u-247<<8)+r[h]+108:-(u-251<<8)-r[h]-108;h++;s++}elseif(255===u){c[s]=(r[h]<<24|r[h+1]<<16|r[h+2]<<8|r[h+3])/65536;h+=4;s++}elseif(19===u||20===u){e.hints+=s>>1;h+=e.hints+7>>3;s%=2;f=t[u]}else{if(10===u||29===u){varg;g=10===u?i:n;if(!g){f=t[u];o("Missing subrsIndex for "+f.id);return!1}varp=32768;g.count<1240?p=107:g.count<33900&&(p=1131);varm=c[--s]+p;if(m<0||m>=g.count){f=t[u];o("Out of bounds subrIndex for "+f.id);return!1}e.stackSize=s;e.callDepth++;varv=this.parseCharString(e,g.get(m),i,n);if(!v)return!1;e.callDepth--;s=e.stackSize;continue}if(11===u){e.stackSize=s;return!0}f=t[u]}if(f){f.stem&&(e.hints+=s>>1);if("min"inf&&!e.undefStack&&s<f.min){o("Not enough parameters for "+f.id+"; actual: "+s+", expected: "+f.min);return!1}if(e.firstStackClearing&&f.stackClearing){e.firstStackClearing=!1;
e.Parser=D;e.isEOF=i});!function(e,t){t(e.pdfjsCoreType1Parser={},e.pdfjsSharedUtil,e.pdfjsCoreStream,e.pdfjsCoreEncodings)}(this,function(e,t,a,r){vari=t.warn,n=t.isSpace,s=a.Stream,o=r.getEncoding,c=!1,l=function(){functione(){this.width=0;this.lsb=0;this.flexing=!1;this.output=[];this.stack=[]}vart={hstem:[1],vstem:[3],vmoveto:[4],rlineto:[5],hlineto:[6],vlineto:[7],rrcurveto:[8],callsubr:[10],flex:[12,35],drop:[12,18],endchar:[14],rmoveto:[21],hmoveto:[22],vhcurveto:[30],hvcurveto:[31]};e.prototype={convert:function(e,a,r){for(varn,s,o,l=e.length,h=!1,u=0;u<l;u++){varf=e[u];if(f<32){12===f&&(f=(f<<8)+e[++u]);switch(f){case1:if(!c){this.stack=[];break}h=this.executeCommand(2,t.hstem);break;case3:if(!c){this.stack=[];break}h=this.executeCommand(2,t.vstem);break;case4:if(this.flexing){if(this.stack.length<1){h=!0;break}vard=this.stack.pop();this.stack.push(0,d);break}h=this.executeCommand(1,t.vmoveto);break;case5:h=this.executeCommand(2,t.rlineto);break;case6:h=this.executeCommand(1,t.hlineto);break;case7:h=this.executeCommand(1,t.vlineto);break;case8:h=this.executeCommand(6,t.rrcurveto);break;case9:this.stack=[];break;case10:if(this.stack.length<1){h=!0;break}o=this.stack.pop();h=this.convert(a[o],a,r);break;case11:returnh;case13:if(this.stack.length<2){h=!0;break}n=this.stack.pop();s=this.stack.pop();this.lsb=s;this.width=n;this.stack.push(n,s);h=this.executeCommand(2,t.hmoveto);break;case14:this.output.push(t.endchar[0]);break;case21:if(this.flexing)break;h=this.executeCommand(2,t.rmoveto);break;case22:if(this.flexing){this.stack.push(0);break}h=this.executeCommand(1,t.hmoveto);break;case30:h=this.executeCommand(4,t.vhcurveto);break;case31:h=this.executeCommand(4,t.hvcurveto);break;case3072:this.stack=[];break;case3073:if(!c){this.stack=[];break}h=this.executeCommand(2,t.vstem);break;case3074:if(!c){this.stack=[];break}h=this.executeCommand(2,t.hstem);break;case3078:if(r){this.seac=this.stack.splice(-4,4);h=this.executeCommand(0,t.endchar)}elseh=this.executeCommand(4,t.endchar);break;case3079:if(this.stack.length<4){h=!0;break}this.stack.pop();n=this.stack.pop();varg=this.stack.pop();s=this.stack.pop();this.lsb=s;this.width=n;this.stack.push(n,s,g);h=this.executeCommand(3,t.rmoveto);break;case3084:if(this.stack.length<2){h=!0;break}varp=this.stack.pop(),m=this.stack.pop();this.stack.push(m/p);break;case3088:if(this.stack.length<2){h=!0;break}o=this.stack.pop();varb=this.stack.pop();if(0===o&&3===b){varv=this.stack.splice(this.stack.length-17,17);this.stack.push(v[2]+v[0],v[3]+v[1],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14]);h=this.executeCommand(13,t.flex,!0);this.flexing=!1;this.stack.push(v[15],v[16])}else1===o&&0===b&&(this.flexing=!0);break;case3089:break;case3105:this.stack=[];break;default:i('Unknown type 1 charstring command of "'+f+'"')}if(h)break}else{f<=246?f-=139:f=f<=250?256*(f-247)+e[++u]+108:f<=254?-(256*(f-251))-e[++u]-108:(255&e[++u])<<24|(255&e[++u])<<16|(255&e[++u])<<8|(255&e[++u])<<0;this.stack.push(f)}}returnh},executeCommand:function(e,t,a){varr=this.stack.length;if(e>r)return!0;for(vari=r-e,n=i;n<r;n++){vars=this.stack[n];if(s===(0|s))this.output.push(28,s>>8&255,255&s);else{s=65536*s|0;this.output.push(255,s>>24&255,s>>16&255,s>>8&255,255&s)}}this.output.push.apply(this.output,t);a?this.stack.splice(i,e):this.stack.length=0;return!1}};returne}(),h=function(){functione(e){returne>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}functiont(e,t,a){if(a>=e.length)returnnewUint8Array(0);varr,i,n=0|t,s=52845,o=22719;for(r=0;r<a;r++)n=(e[r]+n)*s+o&65535;varc=e.length-a,l=newUint8Array(c);for(r=a,i=0;i<c;r++,i++){varh=e[r];l[i]=h^n>>8;n=(h+n)*s+o&65535}returnl}functiona(t,a,r){vari,n,s=0|a,o=52845,c=22719,l=t.length,h=l>>>1,u=newUint8Array(h);for(i=0,n=0;i<l;i++){varf=t[i];if(e(f)){i++;for(vard;i<l&&!e(d=t[i]);)i++;if(i<l){varg=parseInt(String.fromCharCode(f,d),16);u[n++]=g^s>>8;s=(g+s)*o+c&65535}}}returnArray.prototype.slice.call(u,r,n)}functionr(e){return47===e||91===e||93===e||123===e||125===e||40===e||41===e}functioni(r,i,n){if(
d=u[0]+n-1;O+=B(f)+B(d)+B(M);f=d+1;M=g[n]}O+=B(f)+B(u[1])+B(M)}P="\0\f\0\0"+B(O.length+16)+"\0\0\0\0"+B(O.length/12)}returnl+"\0"+i(T.length+4)+T+P+O}functionT(e){vart=newP(e.data),a=t.getUint16();t.getBytes(60);varr=t.getUint16();if(a<4&&768&r)return!1;vari=t.getUint16(),n=t.getUint16();if(i>n)return!1;t.getBytes(6);vars=t.getUint16();if(0===s)return!1;e.data[8]=e.data[9]=0;return!0}functionO(e,t,a){a=a||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};varr=0,n=0,s=0,o=0,c=null,l=0;if(t)for(varhint){h|=0;(c>h||!c)&&(c=h);l<h&&(l=h);varu=G(h);u<32?r|=1<<u:u<64?n|=1<<u-32:u<96?s|=1<<u-64:u<123?o|=1<<u-96:k("Unicode ranges Bits > 123 are reserved for internal usage")}else{c=0;l=255}varf=e.bbox||[0,0,0,0],d=a.unitsPerEm||1/(e.fontMatrix||m)[0],g=e.ascentScaled?1:d/oe,p=a.ascent||Math.round(g*(e.ascent||f[3])),b=a.descent||Math.round(g*(e.descent||f[1]));b>0&&e.descent>0&&f[1]<0&&(b=-b);varv=a.yMax||p,y=-a.yMin||-b;return"\0$ô\0\0\0»\0\0\0»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+B(r)+B(n)+B(s)+B(o)+"*21*"+i(e.italicAngle?1:0)+i(c||e.firstChar)+i(l||e.lastChar)+i(p)+i(b)+"\0d"+i(v)+i(y)+"\0\0\0\0\0\0\0\0"+i(e.xHeight)+i(e.capHeight)+i(0)+i(c||e.firstChar)+"\0"}functionV(e){vart=Math.floor(e.italicAngle*Math.pow(2,16));return"\0\0\0"+B(t)+"\0\0\0\0"+B(e.fixedPitch)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}functionK(e,t){t||(t=[[],[]]);vara,r,n,s,o,c=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||"",t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],l=[];for(a=0,r=c.length;a<r;a++){o=t[1][a]||c[a];varh=[];for(n=0,s=o.length;n<s;n++)h.push(i(o.charCodeAt(n)));l.push(h.join(""))}varu=[c,l],f=["\0","\0"],d=["\0\0","\0"],g=["\0\0","\t"],p=c.length*f.length,m="\0\0"+i(p)+i(12*p+6),b=0;for(a=0,r=f.length;a<r;a++){varv=u[a];for(n=0,s=v.length;n<s;n++){o=v[n];vary=f[a]+d[a]+g[a]+i(n)+i(o.length)+i(b);m+=y;b+=o.length}}m+=c.join("")+l.join("");returnm}e.getFontID=function(){vare=1;returnfunction(){returnString(e++)}}();e.prototype={name:null,font:null,mimetype:null,encoding:null,getrenderer(){vare=L.create(this,ce);returnI(this,"renderer",e)},exportData:function(){vare={};for(vartinthis)this.hasOwnProperty(t)&&(e[t]=this[t]);returne},checkAndRepair:function(e,i,n){functions(e){vart=y(e.getBytes(4)),a=e.getInt32()>>>0,r=e.getInt32()>>>0,i=e.getInt32()>>>0,n=e.pos;e.pos=e.start?e.start:0;e.skip(r);vars=e.getBytes(i);e.pos=n;if("head"===t){s[8]=s[9]=s[10]=s[11]=0;s[17]|=32}return{tag:t,checksum:a,length:i,offset:r,data:s}}functiono(e){return{version:y(e.getBytes(4)),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}functionc(e,t,a,r){if(!e){R("No cmap table available.");return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}vari,n=(t.start?t.start:0)+e.offset;t.pos=n;for(vars,o=(t.getUint16(),t.getUint16()),c=!1,l=0;l<o;l++){varh=t.getUint16(),u=t.getUint16(),f=t.getInt32()>>>0,d=!1;if(0===h&&0===u)d=!0;elseif(1===h&&0===u)d=!0;elseif(3!==h||1!==u||(a||!r)&&s){if(a&&3===h&&0===u){d=!0;c=!0}}else{d=!0;a||(c=!0)}d&&(s={platformId:h,encodingId:u,offset:f});if(c)break}s&&(t.pos=n+s.offset);if(!s||t.peekByte()===-1){R("Could not find a preferred cmap table.");return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}varg,p,m=t.getUint16(),b=(t.getUint16(),t.getUint16(),!1),v=[];if(0===m){for(g=0;g<256;g++){vary=t.getByte();y&&v.push({charCode:g,glyphId:y})}b=!0}elseif(4===m){vark=t.getUint16()>>1;t.getBytes(6);varw,C=[];for(w=0;w<k;w++)C.push({end:t.getUint16()});t.getUint16();for(w=0;w<k;w++)C[w].start=t.getUint16();for(w=0;w<k;w++)C[w].delta=t.getUint16();varx=0;for(w=0;w<k;w++){i=C[w];varS=t.getUint16();if(S){varA=(S>>1)-(k-w);i.offsetIndex=A;x=Math.max(x,A+i.end-i.start+1)}elsei.offsetIndex=-1}varI=[];for(g=0;g<x;g++)I.push(t.getUint16());for(w=0;w<k;w++){i=C[w];n=i.start;varB=i.end,T=i.delta;A=i.offsetIndex;for(g=n;g<=B;g++)if(65535!==g){p=A<0?g:I[A+g-n];p=p+T&65535;0!==p&&v.push(
},getnumPages(){vare=this.toplevelPagesDict.get("Count");h(b(e),"page count in top level pages object is not an integer");returny(this,"num",e)},getdestinations(){functione(e){returnO(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=newz(t,r),o=s.getAll();for(varcino)i[c]=e(o[c])}returny(this,"destinations",i)},getDestination:function(e){functiont(e){returnO(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=newz(a,i);n=t(c.get(e))}returnn},getpageLabels(){vare=null;try{e=this.readPageLabels()}catch(e){if(einstanceofc)throwe;C("Unable to read page labels.")}returny(this,"pageLabels",e)},readPageLabels:function(){vare=this.catDict.getRaw("PageLabels");if(!e)returnnull;for(vart=newArray(this.numPages),a=null,r="",i=newH(e,this.xref),n=i.getAll(),s="",o=1,c=0,l=this.numPages;c<l;c++){if(cinn){varu=n[c];h(O(u),"The PageLabel is not a dictionary.");varf=u.get("Type");h(!f||R(f,"PageLabel"),"Invalid type in PageLabel dictionary.");vard=u.get("S");h(!d||R(d),"Invalid style in PageLabel dictionary.");a=d?d.name:null;varg=u.get("P");h(!g||v(g),"Invalid prefix in PageLabel dictionary.");r=g?k(g):"";varp=u.get("St");h(!p||b(p)&&p>=1,"Invalid start in PageLabel dictionary.");o=p||1}switch(a){case"D":s=o;break;case"R":case"r":s=S.toRoman(o,"r"===a);break;case"A":case"a":for(varm=26,y=65,w=97,C="a"===a?w:y,x=o-1,A=String.fromCharCode(C+x%m),I=[],B=0,T=x/m|0;B<=T;B++)I.push(A);s=I.join("");break;default:h(!a,'Invalid style "'+a+'" in PageLabel dictionary.')}t[c]=r+s;s="";o++}returnt},getattachments(){vare,t=this.xref,a=null,r=this.catDict.get("Names");r&&(e=r.getRaw("EmbeddedFiles"));if(e){vari=newz(e,t),n=i.getAll();for(varsinn){varo=newG(n[s],t);a||(a=Object.create(null));a[k(s)]=o.serializable}}returny(this,"attachments",a)},getjavaScript(){functione(e){vart=e.get("S");if(R(t,"JavaScript")){vara=e.get("JS");if(E(a))a=u(a.getBytes());elseif(!v(a))return;r.push(k(a))}}vart=this.xref,a=this.catDict.get("Names"),r=[];if(a&&a.has("JavaScript")){vari=newz(a.getRaw("JavaScript"),t),n=i.getAll();for(varsinn){varo=n[s];O(o)&&e(o)}}varc=this.catDict.get("OpenAction");if(O(c,"Action")){varl=c.get("S");if(R(l,"Named")){varh=c.get("N");R(h,"Print")&&r.push("print({});")}elsee(c)}returny(this,"javaScript",r)},cleanup:function(){vare=[];this.fontCache.forEach(function(t){e.push(t)});returnPromise.all(e).then(function(e){for(vart=0,a=e.length;t<a;t++){varr=e[t].dict;deleter.translated}this.fontCache.clear()}.bind(this))},getPage:function(e){einthis.pagePromises||(this.pagePromises[e]=this.getPageDict(e).then(function(t){vara=t[0],r=t[1];returnthis.pageFactory.createPage(e,a,r,this.fontCache)}.bind(this)));returnthis.pagePromises[e]},getPageDict:function(e){functiont(){for(;r.length;){varo=r.pop();if(P(o)){n.fetchAsync(o).then(function(n){if(O(n,"Page")||O(n)&&!n.has("Kids"))if(e===i)a.resolve([n,o]);else{i++;t()}else{r.push(n);t()}},a.reject);return}h(O(o),"page dictionary kid reference points to wrong type of object");varc=o.get("Count");0===c&&(s=!0);if(i+c<=e)i+=c;else{varl=o.get("Kids");h(p(l),"page dictionary kids object is not an array");if(s||c!==l.length)for(varu=l.length-1;u>=0;u--)r.push(l[u]);else{r=[l[e-i]];i=e}}}a.reject("Page index "+e+" not found.")}vara=f(),r=[this.catDict.getRaw("Pages")],i=0,n=this.xref,s=!1;t();returna.promise},getPageIndex:function(e){functiont(t){vara,i=0;returnr.fetchAsync(t).then(function(r){if(M(t,e)&&!O(r,"Page")&&(!O(r)||r.has("Type")||!r.has("Contents")))thrownewError("The reference does not point to a /Page Dict.");if(!r)returnnull;h(O(r),"node must be a Dict.");a=r.getRaw("Parent");returnr.getAsync("Parent")}).then(function(e){if(!e)returnnull;h(O(e),"parent must be a Dict.");returne.
if(U(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(q(u)&&"Normal"!==u.name)return!0}}varf=o.get("XObject");if(U(f)){vard=f.getKeys();for(n=0,s=d.length;n<s;n++){i=d[n];varg=f.getRaw(i);if(j(g)){if(t[g.toString()])continue;g=r.fetch(g)}if(N(g)){if(g.dict.objId){if(t[g.dict.objId])continue;t[g.dict.objId]=!0}varp=g.dict.get("Resources");if(U(p)&&(!p.objId||!t[p.objId])){a.push(p);p.objId&&(t[p.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(q(u,"Transparency")){h.isolated=c.get("I")||!1;h.knockout=c.get("K")||!1;l=c.has("CS")?K.parse(c.get("CS"),this.xref,e):null}if(a&&a.backdrop){l=l||K.singletons.rgb;a.backdrop=l.getRgb(a.backdrop,0)}r.addOp(C.beginGroup,[h])}r.addOp(C.paintFormXObjectBegin,[s,o]);returnthis.getOperatorList(t,i,t.dict.get("Resources")||e,r,n).then(function(){r.addOp(C.paintFormXObjectEnd,[]);c&&r.addOp(C.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&&O(l)&&h&&O(h)){varu=this.options.maxImageSize;if(u!==-1&&l*h>u)E("Image exceeded maximum allowed size and was removed.");else{varf,d,g=c.get("ImageMask","IM")||!1;if(g){varp=c.get("Width","W"),m=c.get("Height","H"),b=p+7>>3,v=a.getBytes(b*m),y=c.getArray("Decode","D"),k=!!y&&y[0]>0;f=V.createMask(v,p,m,ainstanceof_,k);f.cached=!0;d=[f];i.addOp(C.paintImageMaskXObject,d);n&&(s[n]={fn:C.paintImageMaskXObject,args:d})}else{varw=c.get("SMask","SM")||!1,x=c.get("Mask")||!1,S=200;if(!r||w||x||ainstanceofz||!(l+h<S)){varA=this.uniquePrefix||"",I="img_"+A+++this.idCounters.obj;i.addDependency(I);d=[I,l,h];if(!w&&!x&&ainstanceofz&&e.isSupported(a,this.xref,t)){i.addOp(C.paintJpegXObject,d);this.handler.send("obj",[I,this.pageIndex,"JpegStream",a.getIR(this.options.forceDataSchema)])}else{varB=null;(ainstanceofz||xinstanceofz||winstanceofz)&&(B=newe(o.xref,t,o.handler,o.options.forceDataSchema));V.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){E("Unable to decode image: "+e);o.handler.send("obj",[I,o.pageIndex,"Image",null])});i.addOp(C.paintImageXObject,d);n&&(s[n]={fn:C.paintImageXObject,args:d})}}else{varR=newV(this.xref,t,a,r,null,null);f=R.createImageData(!0);i.addOp(C.paintInlineImageXObject,[f])}}}}elseE("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(ae(o)){for(varc=re.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=newAe,c=[i.get("Resources"),a],l=L.merge(this.xref,c);returnthis.getOperatorList(r,s,l,o).then(function(){n.addDependencies(o.dependencies);n.addOp(e,ne({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:k.font});returnnewSe("g_font_error",newJ("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&x.ADD_TO_PATH_FLAG);if(a.data&&(i||this.options.disableFontFace))for(varn=function(e){if(!a.renderer.hasBuiltPath(e)){vart=a.renderer.getPathJs(e);this.handler.send("commonobj",[a.loadedName+"_path_"+e,"FontPath",t])}}.bind(this),s=0,o=r.length;s<o;s++){varc=r[s];n(c.fontChar);varl=c.accent;l&&l.fontChar&&n(l.fontChar)}returnr},setGState:function(e,t,a,r,i,n){for(vars=[],o=t.getKeys(),
};e.TD={id:C.setLeadingMoveText,numArgs:2,variableArgs:!1};e.Tm={id:C.setTextMatrix,numArgs:6,variableArgs:!1};e["T*"]={id:C.nextLine,numArgs:0,variableArgs:!1};e.Tj={id:C.showText,numArgs:1,variableArgs:!1};e.TJ={id:C.showSpacedText,numArgs:1,variableArgs:!1};e["'"]={id:C.nextLineShowText,numArgs:1,variableArgs:!1};e['"']={id:C.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1};e.d0={id:C.setCharWidth,numArgs:2,variableArgs:!1};e.d1={id:C.setCharWidthAndBounds,numArgs:6,variableArgs:!1};e.CS={id:C.setStrokeColorSpace,numArgs:1,variableArgs:!1};e.cs={id:C.setFillColorSpace,numArgs:1,variableArgs:!1};e.SC={id:C.setStrokeColor,numArgs:4,variableArgs:!0};e.SCN={id:C.setStrokeColorN,numArgs:33,variableArgs:!0};e.sc={id:C.setFillColor,numArgs:4,variableArgs:!0};e.scn={id:C.setFillColorN,numArgs:33,variableArgs:!0};e.G={id:C.setStrokeGray,numArgs:1,variableArgs:!1};e.g={id:C.setFillGray,numArgs:1,variableArgs:!1};e.RG={id:C.setStrokeRGBColor,numArgs:3,variableArgs:!1};e.rg={id:C.setFillRGBColor,numArgs:3,variableArgs:!1};e.K={id:C.setStrokeCMYKColor,numArgs:4,variableArgs:!1};e.k={id:C.setFillCMYKColor,numArgs:4,variableArgs:!1};e.sh={id:C.shadingFill,numArgs:1,variableArgs:!1};e.BI={id:C.beginInlineImage,numArgs:0,variableArgs:!1};e.ID={id:C.beginImageData,numArgs:0,variableArgs:!1};e.EI={id:C.endInlineImage,numArgs:1,variableArgs:!1};e.Do={id:C.paintXObject,numArgs:1,variableArgs:!1};e.MP={id:C.markPoint,numArgs:1,variableArgs:!1};e.DP={id:C.markPointProps,numArgs:2,variableArgs:!1};e.BMC={id:C.beginMarkedContent,numArgs:1,variableArgs:!1};e.BDC={id:C.beginMarkedContentProps,numArgs:2,variableArgs:!1};e.EMC={id:C.endMarkedContent,numArgs:0,variableArgs:!1};e.BX={id:C.beginCompat,numArgs:0,variableArgs:!1};e.EX={id:C.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(F(a)){varr=a.cmd,i=this.opMap[r];if(!i){E('Unknown command "'+r+'"');continue}varn=i.id,s=i.numArgs,o=null!==t?t.length:0;if(i.variableArgs)o>s&&R("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){E("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(W(a))return!1;if(null!==a){null===t&&(t=[]);t.push(a);A(t.length<=33,"Too many arguments")}}},preprocessCommand:function(e,t){switch(0|e){caseC.save:this.stateManager.save();break;caseC.restore:this.stateManager.restore();break;caseC.transform:this.stateManager.transform(t)}}};returne}(),Oe=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]=C.paintSolidColorImageMask}returnt-n}functiona(){}varr=[];e(r,[C.save,C.transform,C.paintInlineImageXObject,C.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]===C.save&&n[u+1]===C.transform&&n[u+2]===C.paintInlineImageXObject&&n[u+3]===C.restore;)u+=4;vard=Math.min((u-c)/4,a);if(d<t)returnu;varg,p=0,m=[],b=0,v=i,y=i;for(g=0;g<d;g++){vark=s[l+(g<<2)],x=s[h+(g<<2)][0];if(v+x.width>r){p=Math.max(p,v);y+=b+2*i;v=0;b=0}m.push({transform:k,x:v,y:y,w:x.width,h:x.height});v+=x.width+2*i;b=Math.max(b,x.height)}varS=Math.max(p,v)+i,A=y+b+i,I=newUint8Array(S*A*4),B=S<<2;for(g=0;g<d;g++){varR=s[h+(g<<2)][0].data,T=m[g].w<<2,O=0,P=m[g].x+m[g].y*S<<2;I.set(R.subarray(0,T),P-B);for(varM=0,E=m[g].h;M<E;M++){I.set(R.subarray(O,O+T),P);O+=T;P+=B}I.set(R.subarray(O-T,O),P);for(;P>=0;){R[P-4]=R[P];R[P-3]=R[P+1];R[P-2]=R[P+2];R[P-1]=R[P+3];R[P+
})},createDocumentHandler:function(e,t){functiona(){if(B)thrownewError("Worker was terminated")}functionr(e){P.push(e)}functioni(e){e.finish();vart=P.indexOf(e);P.splice(t,1)}functionn(e){vart=y(),a=function(){vare=x.ensureDoc("numPages"),a=x.ensureDoc("fingerprint"),i=x.ensureXRef("encrypt");Promise.all([e,a,i]).then(function(e){vara={numPages:e[0],fingerprint:e[1],encrypted:!!e[2]};t.resolve(a)},r)},r=function(e){t.reject(e)};x.ensureDoc("checkHeader",[]).then(function(){x.ensureDoc("parseStartXRef",[]).then(function(){x.ensureDoc("parse",[e]).then(a,r)},r)},r);returnt.promise}functionk(e,t){varr,i=y(),n=e.source;if(n.data){try{r=newA(M,n.data,n.password,t,E);i.resolve(r)}catch(e){i.reject(e)}returni.promise}varo;try{if(n.chunkedViewerLoading)o=newT(n,D);else{v(s,"pdfjs/core/network module is not loaded");o=news(e)}}catch(e){i.reject(e);returni.promise}varc=o.getFullReader();c.headersReady.then(function(){c.isStreamingSupported&&c.isRangeSupported||(c.onProgress=function(e){D.send("DocProgress",{loaded:e.loaded,total:e.total})});if(c.isRangeSupported){vare=n.disableAutoFetch||c.isStreamingSupported;r=newI(M,o,{msgHandler:D,url:n.url,password:n.password,length:c.contentLength,disableAutoFetch:e,rangeChunkSize:n.rangeChunkSize},t,E);i.resolve(r);O=null}}).catch(function(e){i.reject(e);O=null});varl=[],h=0,u=function(){vare=b(l);n.length&&e.length!==n.length&&C("reported HTTP length is different from actual");try{r=newA(M,e,n.password,t,E);i.resolve(r)}catch(e){i.reject(e)}l=[]},f=newPromise(function(e,t){vari=function(e){try{a();if(e.done){r||u();O=null;return}varn=e.value;h+=m(n);c.isStreamingSupported||D.send("DocProgress",{loaded:h,total:Math.max(h,c.contentLength||0)});r?r.sendProgressiveData(n):l.push(n);c.read().then(i,t)}catch(e){t(e)}};c.read().then(i,t)});f.catch(function(e){i.reject(e);O=null});O=function(){o.cancelAllRequests("abort")};returni.promise}varx,B=!1,O=null,P=[],M=e.docId,E=e.docBaseUrl,L=e.docId+"_worker",D=newl(L,M,t);D.postMessageTransfers=e.postMessageTransfers;varF=function(e){vart=function(e){a();D.send("GetDoc",{pdfInfo:e})},r=function(e){einstanceoff?e.code===d.NEED_PASSWORD?D.send("NeedPassword",e):e.code===d.INCORRECT_PASSWORD&&D.send("IncorrectPassword",e):einstanceofc?D.send("InvalidPDF",e):einstanceofh?D.send("MissingPDF",e):einstanceofu?D.send("UnexpectedResponse",e):D.send("UnknownError",newg(e.message,e.toString()))};a();vari={url:void0===e.cMapUrl?null:e.cMapUrl,packed:e.cMapPacked===!0},s={forceDataSchema:e.disableCreateObjectURL,maxImageSize:void0===e.maxImageSize?-1:e.maxImageSize,disableFontFace:e.disableFontFace,cMapOptions:i};k(e,s).then(function(e){if(B){e.terminate();thrownewError("Worker was terminated")}x=e;D.send("PDFManagerReady",null);x.onLoadedStream().then(function(e){D.send("DataLoaded",{length:e.bytes.byteLength})})}).then(functione(){a();n(!1).then(t,function(i){a();if(iinstanceofp){x.requestLoadedStream();x.onLoadedStream().then(function(){a();n(!0).then(t,r)})}else{iinstanceoff&&x.passwordChanged().then(e);r(i)}},r)},r)};D.on("GetPage",function(e){returnx.getPage(e.pageIndex).then(function(e){vart=x.ensure(e,"rotate"),a=x.ensure(e,"ref"),r=x.ensure(e,"userUnit"),i=x.ensure(e,"view");returnPromise.all([t,a,r,i]).then(function(e){return{rotate:e[0],ref:e[1],userUnit:e[2],view:e[3]}})})});D.on("GetPageIndex",function(e){vart=newS(e.ref.num,e.ref.gen),a=x.pdfDocument.catalog;returna.getPageIndex(t)});D.on("GetDestinations",function(e){returnx.ensureCatalog("destinations")});D.on("GetDestination",function(e){returnx.ensureCatalog("getDestination",[e.id])});D.on("GetPageLabels",function(e){returnx.ensureCatalog("pageLabels")});D.on("GetAttachments",function(e){returnx.ensureCatalog("attachments")});D.on("GetJavaScript",function(e){returnx.ensureCatalog("javaScript")});D.on("GetOutline",function(e){returnx.ensureCatalog("documentOutline")});D.on("GetMetadata",function(e){returnPromise.all([x.ensureDoc("documentInfo"),x.ensureCatalog("metadata")])});D.on("GetData",function(e){x.requestLoadedStream();return