!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=36)}([function(e,t,a){"use strict";(function(e){functionr(e){ie=e}functioni(){returnie}functionn(e){ie>=te.infos&&console.log("Info: "+e)}functions(e){ie>=te.warnings&&console.log("Warning: "+e)}functiono(e){console.log("Deprecated API usage: "+e)}functionc(e){if(ie>=te.errors){console.log("Error: "+e);console.log(l())}thrownewError(e)}functionl(){try{thrownewError}catch(e){returne.stack?e.stack.split("\n").slice(2).join("\n"):""}}functionh(e,t){e||c(t)}functionu(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}functionf(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}functiond(e,t){if(!e)returnnull;try{vara=t?newURL(e,t):newURL(e);if(f(a))returna}catch(e){}returnnull}functiong(e,t,a){Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!1});returna}functionp(e){vart;returnfunction(){if(e){t=Object.create(null);e(t);e=null}returnt}}functionm(e){if("string"!=typeofe){s("The argument for removeNullCharacters must be a string.");returne}returne.replace(pe,"")}functionb(e){h(null!==e&&"object"===(void0===e?"undefined":H(e))&&void0!==e.length,"Invalid argument for bytesToString");vart=e.length;if(t<8192)returnString.fromCharCode.apply(null,e);for(vara=[],r=0;r<t;r+=8192){vari=Math.min(r+8192,t),n=e.subarray(r,i);a.push(String.fromCharCode.apply(null,n))}returna.join("")}functionv(e){h("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}functiony(e){if(void0!==e.length)returne.length;h(void0!==e.byteLength);returne.byteLength}functionk(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=y(a);i+=r}vars=0,o=newUint8Array(i);for(t=0;t<n;t++){a=e[t];ainstanceofUint8Array||(a="string"==typeofa?v(a):newUint8Array(a));r=a.byteLength;o.set(a,s);s+=r}returno}functionw(e){returnString.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}functionC(e){for(vart=1,a=0;e>t;){t<<=1;a++}returna}functionx(e,t){returne[t]<<24>>24}functionS(e,t){returne[t]<<8|e[t+1]}functionA(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}functionI(){vare=newUint8Array(4);e[0]=1;return1===newUint32Array(e.buffer,0,1)[0]}functionB(){try{newFunction("");return!0}catch(e){return!1}}functionT(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=ye[e.charCodeAt(t)];r.push(i?String.fromCharCode(i):e.charAt(t))}returnr.join("")}functionR(e){returndecodeURIComponent(escape(e))}functionO(e){returnunescape(encodeURIComponent(e))}functionE(e){for(vartine)return!1;return!0}functionP(e){return"boolean"==typeofe}functionM(e){return"number"==typeofe&&(0|e)===e}functionL(e){return"number"==typeofe}functionD(e){return"string"==typeofe}functionF(e){returneinstanceofArray}functionq(e){return"object"===(void0===e?"undefined":H(e))&&null!==e&&void0!==e.byteLength}functionU(e){return32===e||9===e||13===e||10===e}functionN(){return"undefined"==typeof__pdfjsdev_
;varT=B>>16;T>0&&(T=this.getBits(T));s=(65535&B)+T;B=this.getCode(u);B=r[B];T=B>>16;T>0&&(T=this.getBits(T));varR=(65535&B)+T;if(I+s>=A){e=this.ensureBuffer(I+s);A=e.length}for(varO=0;O<s;++O,++I)e[I]=e[I-R]}}}else{varE;-1===(E=o.getByte())&&l("Bad block header in flate stream");varP=E;-1===(E=o.getByte())&&l("Bad block header in flate stream");P|=E<<8;-1===(E=o.getByte())&&l("Bad block header in flate stream");varM=E;-1===(E=o.getByte())&&l("Bad block header in flate stream");M|=E<<8;M===(65535&~P)||0===P&&0===M||l("Bad uncompressed block length in flate stream");this.codeBuf=0;this.codeSize=0;varL=this.bufferLength;e=this.ensureBuffer(L+P);varD=L+P;this.bufferLength=D;if(0===P)-1===o.peekByte()&&(this.eof=!0);elsefor(varF=L;F<D;++F){if(-1===(E=o.getByte())){this.eof=!0;break}e[F]=E}}};returne}(),B=function(){functione(e,t,a){if(!b(a))returne;varr=this.predictor=a.get("Predictor")||1;if(r<=1)returne;2!==r&&(r<10||r>15)&&l("Unsupported predictor: "+r);this.readBlock=2===r?this.readBlockTiff:this.readBlockPng;this.str=e;this.dict=e.dict;vari=this.colors=a.get("Colors")||1,n=this.bits=a.get("BitsPerComponent")||8,s=this.columns=a.get("Columns")||1;this.pixBytes=i*n+7>>3;this.rowBytes=s*i*n+7>>3;S.call(this,t);returnthis}e.prototype=Object.create(S.prototype);e.prototype.readBlockTiff=function(){vare=this.rowBytes,t=this.bufferLength,a=this.ensureBuffer(t+e),r=this.bits,i=this.colors,n=this.str.getBytes(e);this.eof=!n.length;if(!this.eof){vars,o=0,c=0,l=0,h=0,u=t;if(1===r&&1===i)for(s=0;s<e;++s){varf=n[s]^o;f^=f>>1;f^=f>>2;f^=f>>4;o=(1&f)<<7;a[u++]=f}elseif(8===r){for(s=0;s<i;++s)a[u++]=n[s];for(;s<e;++s){a[u]=a[u-i]+n[s];u++}}else{vard=newUint8Array(i+1),g=(1<<r)-1,p=0,m=t,b=this.columns;for(s=0;s<b;++s)for(varv=0;v<i;++v){if(l<r){o=o<<8|255&n[p++];l+=8}d[v]=d[v]+(o>>l-r)&g;l-=r;c=c<<r|d[v];h+=r;if(h>=8){a[m++]=c>>h-8&255;h-=8}}h>0&&(a[m++]=(c<<8-h)+(o&(1<<8-h)-1))}this.bufferLength+=e}};e.prototype.readBlockPng=function(){vare=this.rowBytes,t=this.pixBytes,a=this.str.getByte(),r=this.str.getBytes(e);this.eof=!r.length;if(!this.eof){vari=this.bufferLength,n=this.ensureBuffer(i+e),s=n.subarray(i-e,i);0===s.length&&(s=newUint8Array(e));varo,c,h,u=i;switch(a){case0:for(o=0;o<e;++o)n[u++]=r[o];break;case1:for(o=0;o<t;++o)n[u++]=r[o];for(;o<e;++o){n[u]=n[u-t]+r[o]&255;u++}break;case2:for(o=0;o<e;++o)n[u++]=s[o]+r[o]&255;break;case3:for(o=0;o<t;++o)n[u++]=(s[o]>>1)+r[o];for(;o<e;++o){n[u]=(s[o]+n[u-t]>>1)+r[o]&255;u++}break;case4:for(o=0;o<t;++o){c=s[o];h=r[o];n[u++]=c+h}for(;o<e;++o){c=s[o];varf=s[o-t],d=n[u-t],g=d+c-f,p=g-d;p<0&&(p=-p);varm=g-c;m<0&&(m=-m);varb=g-f;b<0&&(b=-b);h=r[o];n[u++]=p<=m&&p<=b?d+h:m<=b?c+h:f+h}break;default:l("Unsupported predictor: "+a)}this.bufferLength+=e}};returne}(),T=function(){functione(e,t,a,r){for(vari;-1!==(i=e.getByte());)if(255===i){e.skip(-1);break}this.stream=e;this.maybeLength=t;this.dict=a;this.params=r;S.call(this,t)}e.prototype=Object.create(S.prototype);Object.defineProperty(e.prototype,"bytes",{get:function(){returng(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0});e.prototype.ensureBuffer=function(e){if(!this.bufferLength){vart=newk,a=this.dict.getArray("Decode","D");if(this.forceRGB&&f(a)){for(varr=this.dict.get("BitsPerComponent")||8,i=a.length,n=newInt32Array(i),s=!1,o=(1<<r)-1,c=0;c<i;c+=2){n[c]=256*(a[c+1]-a[c])|0;n[c+1]=a[c]*o|0;256===n[c]&&0===n[c+1]||(s=!0)}s&&(t.decodeTransform=n)}if(b(this.params)){varl=this.params.get("ColorTransform");u(l)&&(t.colorTransform=l)}t.parse(this.bytes);varh=t.getData(this.drawWidth,this.drawHeight,this.forceRGB);this.buffer=h;this.bufferLength=h.length;this.eof=!0}};e.prototype.getBytes=function(e){this.ensureBuffer();returnthis.buffer};e.prototype.getIR=function(e){returnd(this.bytes,"image/jpeg",e)};returne}(),R=function(){functione(e,t,a,r){this.stream=e;this.maybeLength=t;this.dict=a;this.params=r;S.call(this,t)}e.prototype=Object.create(S.prototype);Object.defineProperty(e.prototype,"bytes",{get:function(){returng(this,"bytes",this.stream.getBytes(this.maybeLengt
varn=e[t+0]*a,s=e[t+1]*a,o=e[t+2]*a,c=e[t+3]*a,l=n*(-4.387332384609988*n+54.48615194189176*s+18.82290502165302*o+212.25662451639585*c-285.2331026137004)+s*(1.7149763477362134*s-5.6096736904047315*o+-17.873870861415444*c-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*c+17.5119270841813)+c*(-21.86122147463605*c-189.48180835922747)+255|0,h=n*(8.841041422036149*n+60.118027045597366*s+6.871425592049007*o+31.159100130055922*c-79.2970844816548)+s*(-15.310361306967817*s+17.575251261109482*o+131.35250912493976*c-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*c-24.86741582555878)+c*(-20.737325471181034*c-187.80453709719578)+255|0,u=n*(.8842522430003296*n+8.078677503112928*s+30.89978309703729*o-.23883238689178934*c-14.183576799673286)+s*(10.49593273432072*s+63.02378494754052*o+50.606957656360734*c-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*c-193.58209356861505)+c*(-22.33816807309886*c-180.12613974708367)+255|0;r[i]=l>255?255:l<0?0:l;r[i+1]=h>255?255:h<0?0:h;r[i+2]=u>255?255:u<0?0:u}functiont(){this.name="DeviceCMYK";this.numComps=4;this.defaultColor=newFloat32Array(this.numComps);this.defaultColor[3]=1}t.prototype={getRgb:m.prototype.getRgb,getRgbItem:function(t,a,r,i){e(t,a,1,r,i)},getRgbBuffer:function(t,a,r,i,n,s,o){for(varc=1/((1<<s)-1),l=0;l<r;l++){e(t,a,c,i,n);a+=4;n+=3+o}},getOutputLength:function(e,t){returne/4*(3+t)|0},isPassthrough:m.prototype.isPassthrough,fillRgb:m.prototype.fillRgb,isDefaultDecode:function(e){returnm.isDefaultDecode(e,this.numComps)},usesZeroToOneRange:!0};returnt}(),x=function(){functione(e,t,a){this.name="CalGray";this.numComps=1;this.defaultColor=newFloat32Array(this.numComps);e||s("WhitePoint missing - required for color space CalGray");t=t||[0,0,0];a=a||1;this.XW=e[0];this.YW=e[1];this.ZW=e[2];this.XB=t[0];this.YB=t[1];this.ZB=t[2];this.G=a;(this.XW<0||this.ZW<0||1!==this.YW)&&s("Invalid WhitePoint components for "+this.name+", no fallback available");if(this.XB<0||this.YB<0||this.ZB<0){o("Invalid BlackPoint for "+this.name+", falling back to default");this.XB=this.YB=this.ZB=0}0===this.XB&&0===this.YB&&0===this.ZB||u(this.name+", BlackPoint: XB: "+this.XB+", YB: "+this.YB+", ZB: "+this.ZB+", only default values are supported.");if(this.G<1){o("Invalid Gamma: "+this.G+" for "+this.name+", falling back to default");this.G=1}}functiont(e,t,a,r,i,n){vars=t[a]*n,o=Math.pow(s,e.G),c=e.YW*o,l=0|Math.max(295.8*Math.pow(c,.3333333333333333)-40.8,0);r[i]=l;r[i+1]=l;r[i+2]=l}e.prototype={getRgb:m.prototype.getRgb,getRgbItem:function(e,a,r,i){t(this,e,a,r,i,1)},getRgbBuffer:function(e,a,r,i,n,s,o){for(varc=1/((1<<s)-1),l=0;l<r;++l){t(this,e,a,i,n,c);a+=1;n+=3+o}},getOutputLength:function(e,t){returne*(3+t)},isPassthrough:m.prototype.isPassthrough,fillRgb:m.prototype.fillRgb,isDefaultDecode:function(e){returnm.isDefaultDecode(e,this.numComps)},usesZeroToOneRange:!0};returne}(),S=function(){functione(e,t,a,r){this.name="CalRGB";this.numComps=3;this.defaultColor=newFloat32Array(this.numComps);e||s("WhitePoint missing - required for color space CalRGB");t=t||newFloat32Array(3);a=a||newFloat32Array([1,1,1]);r=r||newFloat32Array([1,0,0,0,1,0,0,0,1]);vari=e[0],n=e[1],c=e[2];this.whitePoint=e;varl=t[0],h=t[1],u=t[2];this.blackPoint=t;this.GR=a[0];this.GG=a[1];this.GB=a[2];this.MXA=r[0];this.MYA=r[1];this.MZA=r[2];this.MXB=r[3];this.MYB=r[4];this.MZB=r[5];this.MXC=r[6];this.MYC=r[7];this.MZC=r[8];(i<0||c<0||1!==n)&&s("Invalid WhitePoint components for "+this.name+", no fallback available");if(l<0||h<0||u<0){o("Invalid BlackPoint for "+this.name+" ["+l+", "+h+", "+u+"], falling back to default");this.blackPoint=newFloat32Array(3)}if(this.GR<0||this.GG<0||this.GB<0){o("Invalid Gamma ["+this.GR+", "+this.GG+", "+this.GB+"] for "+this.name+", falling back to default");this.GR=this.GG=this.GB=1}if(this.MXA<0||this.MYA<0||this.MZA<0||this.MXB<0||this.MYB<0||this.MZB<0||this.MXC<0||this.MYC<0||this.MZC<0){o("Invalid Matrix for "+this.name+" ["+this.MXA+", "+this.MYA+", "+this.MZA+this.MXB+", "+this.MYB+", "+this.MZB+this.MXC+", "+this.MYC+", "+this.MZC+"
;if(r>=48&&r<=55){i=!1;n=(n<<3)+(15&r)}}a.push(String.fromCharCode(n));break;case13:10===this.peekChar()&&this.nextChar();break;case10:break;default:a.push(String.fromCharCode(r))}break;default:a.push(String.fromCharCode(r))}if(t)break;i||(r=this.nextChar())}returna.join("")},getName:function(){vare,r,i=this.strBuf;i.length=0;for(;(e=this.nextChar())>=0&&!a[e];)if(35===e){e=this.nextChar();if(a[e]){p("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.");i.push("#");break}varn=t(e);if(-1!==n){r=e;e=this.nextChar();vars=t(e);if(-1===s){p("Lexer_getName: Illegal digit ("+String.fromCharCode(e)+") in hexadecimal number.");i.push("#",String.fromCharCode(r));if(a[e])break;i.push(String.fromCharCode(e));continue}i.push(String.fromCharCode(n<<4|s))}elsei.push("#",String.fromCharCode(e))}elsei.push(String.fromCharCode(e));i.length>127&&p("name token is longer than allowed by the spec: "+i.length);returny.get(i.join(""))},getHexString:function(){vare=this.strBuf;e.length=0;for(varr,i,n=this.currentChar,s=!0;;){if(n<0){p("Unterminated hex string");break}if(62===n){this.nextChar();break}if(1!==a[n]){if(s){r=t(n);if(-1===r){p('Ignoring invalid character "'+n+'" in hex string');n=this.nextChar();continue}}else{i=t(n);if(-1===i){p('Ignoring invalid character "'+n+'" in hex string');n=this.nextChar();continue}e.push(String.fromCharCode(r<<4|i))}s=!s;n=this.nextChar()}elsen=this.nextChar()}returne.join("")},getObj:function(){for(vare=!1,t=this.currentChar;;){if(t<0)returnm;if(e)10!==t&&13!==t||(e=!1);elseif(37===t)e=!0;elseif(1!==a[t])break;t=this.nextChar()}switch(0|t){case48:case49:case50:case51:case52:case53:case54:case55:case56:case57:case43:case45:case46:returnthis.getNumber();case40:returnthis.getString();case47:returnthis.getName();case91:this.nextChar();returnb.get("[");case93:this.nextChar();returnb.get("]");case60:t=this.nextChar();if(60===t){this.nextChar();returnb.get("<<")}returnthis.getHexString();case62:t=this.nextChar();if(62===t){this.nextChar();returnb.get(">>")}returnb.get(">");case123:this.nextChar();returnb.get("{");case125:this.nextChar();returnb.get("}");case41:this.nextChar();l("Illegal character: "+t)}for(varr=String.fromCharCode(t),i=this.knownCommands,n=i&&void0!==i[r];(t=this.nextChar())>=0&&!a[t];){vars=r+String.fromCharCode(t);if(n&&void0===i[s])break;128===r.length&&l("Command token too long: "+r.length);r=s;n=i&&void0!==i[r]}return"true"===r||"false"!==r&&("null"===r?null:b.get(r))},skipToNextLine:function(){for(vare=this.currentChar;e>=0;){if(13===e){e=this.nextChar();10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}};returne}(),U={create:function(e){functiont(e,t){vara=c.get(e);if(f(a)&&(t?a>=0:a>0))returna;thrownewError('The "'+e+'" parameter in the linearization dictionary is invalid.')}vara,r,i=newF(newq(e),!1,null),n=i.getObj(),s=i.getObj(),o=i.getObj(),c=i.getObj();if(!(f(n)&&f(s)&&C(o,"obj")&&x(c)&&d(a=c.get("Linearized"))&&a>0))returnnull;if((r=t("L"))!==e.length)thrownewError('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:r,hints:function(){vare,t,a=c.get("H");if(u(a)&&(2===(e=a.length)||4===e)){for(varr=0;r<e;r++)if(!(f(t=a[r])&&t>0))thrownewError("Hint ("+r+") in the linearization dictionary is invalid.");returna}thrownewError("Hint array in the linearization dictionary is invalid.")}(),objectNumberFirst:t("O"),endFirst:t("E"),numPages:t("N"),mainXRefEntriesOffset:t("T"),pageFirst:c.has("P")?t("P",!0):0}}};t.Lexer=q;t.Linearization=U;t.Parser=F},function(e,t,a){"use strict";functionr(e){vart;if("object"!==(void0===e?"undefined":i(e)))return!1;if(f(e))t=e;else{if(!d(e))return!1;t=e.dict}returnt.has("FunctionType")}vari="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},n=a(0),s=a(1),o=a(34),c=n.error,l=n.info,h=n.isArray,u=n.isBool,f=s.isDict,d=s.isStream,g=o
f=t[u]}elseif(u>=32&&u<=246){o[s]=u-139;s++}elseif(u>=247&&u<=254){o[s]=u<251?(u-247<<8)+r[h]+108:-(u-251<<8)-r[h]-108;h++;s++}elseif(255===u){o[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];l("Missing subrsIndex for "+f.id);return!1}varp=32768;g.count<1240?p=107:g.count<33900&&(p=1131);varm=o[--s]+p;if(m<0||m>=g.count||isNaN(m)){f=t[u];l("Out of bounds subrIndex for "+f.id);return!1}e.stackSize=s;e.callDepth++;varb=this.parseCharString(e,g.get(m),i,n);if(!b)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){l("Not enough parameters for "+f.id+"; actual: "+s+", expected: "+f.min);return!1}if(e.firstStackClearing&&f.stackClearing){e.firstStackClearing=!1;s-=f.min;s>=2&&f.stem?s%=2:s>1&&l("Found too many parameters for stack-clearing command");s>0&&o[s-1]>=0&&(e.width=o[s-1])}if("stackDelta"inf){"stackFn"inf&&f.stackFn(o,s);s+=f.stackDelta}elseif(f.stackClearing)s=0;elseif(f.resetStack){s=0;e.undefStack=!1}elseif(f.undefStack){s=0;e.undefStack=!0;e.firstStackClearing=!1}}}e.stackSize=s;return!0},parseCharStrings:function(e,t,a,r,i){for(varn=[],s=[],o=e.count,c=0;c<o;c++){varh=e.get(c),u={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null},f=!0,d=null;if(r&&i.length){varg=r.getFDIndex(c);if(-1===g){l("Glyph index is not in fd select.");f=!1}if(g>=i.length){l("Invalid fd index for glyph index.");f=!1}f&&(d=i[g].privateDict.subrsIndex)}elset&&(d=t);f&&(f=this.parseCharString(u,h,d,a));null!==u.width&&(s[c]=u.width);null!==u.seac&&(n[c]=u.seac);f||e.set(c,newUint8Array([14]))}return{charStrings:e,seacs:n,widths:s}},emptyPrivateDictionary:function(e){vart=this.createDict(B,[],e.strings);e.setByKey(18,[0,0]);e.privateDict=t},parsePrivateDict:function(e){if(e.hasName("Private")){vart=e.getByName("Private");if(h(t)&&2===t.length){vara=t[0],r=t[1];if(0===a||r>=this.bytes.length)this.emptyPrivateDictionary(e);else{vari=r+a,n=this.bytes.subarray(r,i),s=this.parseDict(n),o=this.createDict(B,s,e.strings);e.privateDict=o;if(o.getByName("Subrs")){varc=o.getByName("Subrs"),l=r+c;if(0===c||l>=this.bytes.length)this.emptyPrivateDictionary(e);else{varu=this.parseIndex(l);o.subrsIndex=u.obj}}}}elsee.removeByName("Private")}elsethis.emptyPrivateDictionary(e)},parseCharsets:function(e,t,a,r){if(0===e)returnnewR(!0,T.ISO_ADOBE,g);if(1===e)returnnewR(!0,T.EXPERT,p);if(2===e)returnnewR(!0,T.EXPERT_SUBSET,m);vari,n,o,c=this.bytes,l=e,h=c[e++],u=[".notdef"];t-=1;switch(h){case0:for(o=0;o<t;o++){i=c[e++]<<8|c[e++];u.push(r?i:a.get(i))}break;case1:for(;u.length<=t;){i=c[e++]<<8|c[e++];n=c[e++];for(o=0;o<=n;o++)u.push(r?i++:a.get(i++))}break;case2:for(;u.length<=t;){i=c[e++]<<8|c[e++];n=c[e++]<<8|c[e++];for(o=0;o<=n;o++)u.push(r?i++:a.get(i++))}break;default:s("Unknown charset format")}varf=e,d=c.subarray(l,f);returnnewR(!1,h,u,d)},parseEncoding:function(e,t,a,r){vari,n,o,c=Object.create(null),l=this.bytes,h=!1,u=null;if(0===e||1===e){h=!0;i=e;varf=e?v:b;for(n=0,o=r.length;n<o;n++){vard=f.indexOf(r[n]);-1!==d&&(c[d]=n)}}else{varg=e;i=l[e++];switch(127&i){case0:varp=l[e++];for(n=1;n<=p;n++)c[l[e++]]=n;break;case1:varm=l[e++],y=1;for(n=0;n<m;n++)for(vark=l[e++],w=l[e++],C=k;C<=k+w;C++)c[C]=y++;break;default:s("Unknown encoding format: "+i+" in CFF")}varx=e;if(128&i){l[g]&=127;!function(){vart=l[e++];for(n=0;n<t;n++){vari=l[e++],s=(l[e++]<<8)+(255&l[e++]);c[i]=r.indexOf(a.get(s))}}()}u=l.subarray(g,x)}i&=127;returnnewO(h,i,c,u)},parseFDSelect:function(e,t){vara,r,i=e,n=this.bytes,o=n[e++],c=[],h=!1;switch(o){case0:for(r=0;r<t;++r){varu=n[e++];c.push(u)}a=n.subarray(i,e);break;case3:varf=n[e++]<<8|n[e++];for(r=0;r<f;++r){varg=n[e++]<<8|n[e++];if(0===r&&0!==g){l("parseFDSelect: The first range must have a first GID of 0 -- trying to recover.");h=!0;g=0}for(varp=n[e++],m=n[e]<<8|n[e+1],b=g;b<m;++b)c.push(p)}e+=2;a=n.suba
;i.addOp(S.paintImageXObject,d);n&&(s[n]={fn:S.paintImageXObject,args:d})}}else{f=newZ(this.xref,t,a,r,null,null).createImageData(!0);i.addOp(S.paintInlineImageXObject,[f])}}}}elseq("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(se(o)){for(varc=oe.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=newRe,c=[i.get("Resources"),a],l=U.merge(this.xref,c);returnthis.getOperatorList({stream:r,task:s,resources:l,operatorList:o}).then(function(){n.addDependencies(o.dependencies);n.addOp(e,le({fnArray:o.fnArray,argsArray:o.argsArray},i,t))})},handleSetFont:function(e,t,a,r,i,n){vars,o=this;if(t){t=t.slice();s=t[0].name}returnthis.loadFont(s,a,e).then(function(t){returnt.font.isType3Font?t.loadType3Data(o,e,r,i).then(function(){returnt}).catch(function(e){o.handler.send("UnsupportedFeature",{featureId:C.font});returnnewTe("g_font_error",newee("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=this,r=t.font,i=r.charsToGlyphs(e),n=!!(t.textRenderingMode&I.ADD_TO_PATH_FLAG);if(r.data&&(n||this.options.disableFontFace))for(vars=function(e){if(!r.renderer.hasBuiltPath(e)){vart=r.renderer.getPathJs(e);a.handler.send("commonobj",[r.loadedName+"_path_"+e,"FontPath",t])}},o=0,c=i.length;o<c;o++){varl=i[o];s(l.fontChar);varh=l.accent;h&&h.fontChar&&s(h.fontChar)}returni},setGState:function(e,t,a,i,n){for(vars=this,o=[],c=t.getKeys(),l=Promise.resolve(),h=0,u=c.length;h<u;h++)!function(){varu=c[h],f=t.get(u);switch(u){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":o.push([u,f]);break;case"Font":l=l.then(function(){returns.handleSetFont(e,null,f[0],a,i,n.state).then(function(e){a.addDependency(e);o.push([u,[e,f[1]]])})});break;case"BM":o.push([u,r(f)]);break;case"SMask":if(H(f,"None")){o.push([u,!1]);break}if(z(f)){l=l.then(function(){returns.handleSMask(f,e,a,i,n)});o.push([u,!0])}elseq("Unsupported SMask type");break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":P("graphic state operator "+u);break;default:P("Unknown graphic state operator "+u)}}();returnl.then(function(){o.length>0&&a.addOp(S.setGState,[o])})},loadFont:function(e,t,a){functionr(){returnPromise.resolve(newTe("g_font_error",newee("Font "+e+" is not available"),t))}vari,n=this,s=this.xref;if(t){R(G(t));i=t}else{varo=a.get("Font");if(!o){q("fontRes not available");returnr()}i=o.getRaw(e)}if(!i){q("fontRef not available");returnr()}if(this.fontCache.has(i))returnthis.fontCache.get(i);t=s.fetchIfRef(i);if(!z(t))returnr();if(t.translated)returnt.translated;varc,l=O(),h=this.preEvaluateFont(t),u=h.descriptor,f=G(i);f&&(c=i.toString());if(z(u)){u.fontAliases||(u.fontAliases=Object.create(null));vard=u.fontAliases,g=h.hash;if(d[g]){varp=d[g].aliasRef;if(f&&p&&this.fontCache.has(p)){this.fontCache.putAlias(i,p);returnthis.fontCache.get(i)}}elsed[g]={fontID:ae.getFontID()};f&&(d[g].aliasRef=i);c=d[g].fontID}if(f)this.fontCache.put(i,l.promise);else{c||(c=this.idFactory.createObjId());this.fontCache.put("id_"+c,l.promise)}R(c,'The "fontID" must be defined.');t.loadedName="g_"+this.pdfManager.docId+"_f"+c;t.translated=l.promise;varm;try{m=this.translateFont(h)}catch(e){m=Promise.reject(e)}m.then(function(e){if(void0!==e.fontType){s.stats.fontTypes[e.fontType]=!0}l.resolve(newTe(t.loadedName,e,t))}).catch(function(e){n.handler.send("UnsupportedFeature",{featureId:C.font});try{vara=h.descriptor,r=a&&a.get("FontFile3"),i=r&&r.get("Subtype"),o=ne(h.type,i&&i.name);s.stats.fontTypes[o]=!0}catch(e){}l.resolve(newTe(t.loadedName,newee(einstanceofError?e.message:e),t))});returnl.promise},buildPath:function(e,t,a){varr=e.
;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(_(a)){varr=a.cmd,i=this.opMap[r];if(!i){q('Unknown command "'+r+'"');continue}varn=i.id,s=i.numArgs,o=null!==t?t.length:0;if(i.variableArgs)o>s&&P("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){q("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(j(a))return!1;if(null!==a){null===t&&(t=[]);t.push(a);R(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}(),Le=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=e.fnArray,a=e.argsArray,r=e.iCurr,i=r-3,n=r-2,s=r-1,o=i+4,c=t.length;o+3<c&&t[o]===S.save&&t[o+1]===S.transform&&t[o+2]===S.paintInlineImageXObject&&t[o+3]===S.restore;)o+=4;varl=Math.min((o-i)/4,200);if(l<10)returno;varh,u=0,f=[],d=0,g=1,p=1;for(h=0;h<l;h++){varm=a[n+(h<<2)],b=a[s+(h<<2)][0];if(g+b.width>1e3){u=Math.max(u,g);p+=d+2;g=0;d=0}f.push({transform:m,x:g,y:p,w:b.width,h:b.height});g+=b.width+2;d=Math.max(d,b.height)}varv=Math.max(u,g)+1,y=p+d+1,k=newUint8Array(v*y*4),w=v<<2;for(h=0;h<l;h++){varC=a[s+(h<<2)][0].data,A=f[h].w<<2,I=0,B=f[h].x+f[h].y*v<<2;k.set(C.subarray(0,A),B-w);for(varT=0,R=f[h].h;T<R;T++){k.set(C.subarray(I,I+A),B);I+=A;B+=w}k.set(C.subarray(I-A,I),B);for(;B>=0;){C[B-4]=C[B];C[B-3]=C[B+1];C[B-2]=C[B+2];C[B-1]=C[B+3];C[B+A]=C[B+A-4];C[B+A+1]=C[B+A-3];C[B+A+2]=C[B+A-2];C[B+A+3]=C[B+A-1];B-=w}}t.splice(i,4*l,S.paintInlineImageXObjectGroup);a.splice(i,4*l,[{width:v,height:y,kind:x.RGBA_32BPP,data:k},f]);returni+1});e(r,[S.save,S.transform,S.paintImageMaskXObject,S.restore],function(e){for(vara=e.fnArray,r=e.argsArray,i=e.iCurr,n=i-3,s=i-2,o=i-1,c=n+4,l=a.length;c+3<l&&a[c]===S.save&&a[c+1]===S.transform&&a[c+2]===S.paintImageMaskXObject&&a[c+3]===S.restore;)c+=4;varh=(c-n)/4;h=t(n,h,a,r);if(h<10)returnc;varu,f,d,g=!1,p=r[o][0];if(0===r[s][1]&&0===r[s][2]){g=!0;varm=r[s][0],b=r[s][3];f=s+4;varv=o+4;for(u=1;u<h;u++,f+=4,v+=4){d=r[f];if(r[v][0]!==p||d[0]!==m||0!==d[1]||0!==d[2]||d[3]!==b){u<10?g=!1:h=u;break}}}if(g){h=Math.min(h,1e3);vary=newFloat32Array(2*h);f=s;for(u=0;u<h;u++,f+=4){d=r[f];y[u<<1]=d[4];y[1+(u<<1)]=d[5]}a.splice(n,4*h,S.paintImageMaskXObjectRepeat);r.splice(n,4*h,[p,m,b,y])}else{h=Math.min(h,100);vark=[];for(u=0;u<h;u++){d=r[s+(u<<2)];varw=r[o+(u<<2)][0];k.push({data:w.data,width:w.width,height:w.height,transform:d})}a.splice(n,4*h,S.paintImageMaskXObjectGroup);r.splice(n,4*h,[k])}returnn+1});e(r,[S.save,S.transform,S.paintImageXObject,S.restore],function(e){vart=e.fnArray,a=e.argsArray,r=e.iCurr,i=r-3,n=r-2,s=r-1,o=r;if(0!==a[n][1]||0!==a[n][2])returno+1;for(varc=a[s][0],l=a[n][0],h=a[n][3],u=i+4,f=t.length;u+3<f&&t[u]===S.save&&t[u+1]===S.transform&&t[u+2]===S.paintImageXObject&&t[u+3]===S.restore&&a[u+1][0]===l&&0===a[u+1][1]&&0===a[u+1][2]&&a[u+1][3]===h&&a[u+2][0]===c;)u+=4;vard=Math.min((u-i)/4,1e3);if(d<3)returnu;for(varg=newFloat32Array
vari=r.dict.get("Type"),n=r.dict.get("Subtype");if(M(i,"Metadata")&&M(n,"XML"))try{t=A(p(r.getBytes()))}catch(e){if(einstanceoff)throwe;v("Skipping invalid metadata.")}}returnx(this,"metadata",t)},gettoplevelPagesDict(){vare=this.catDict.get("Pages");g(D(e),"invalid top-level pages dictionary");returnx(this,"toplevelPagesDict",e)},getdocumentOutline(){vare=null;try{e=this.readDocumentOutline()}catch(e){if(einstanceoff)throwe;I("Unable to read document outline")}returnx(this,"documentOutline",e)},readDocumentOutline:function(){vart=this.catDict.get("Outlines");if(!D(t))returnnull;t=t.getRaw("First");if(!F(t))returnnull;vara={items:[]},r=[{obj:t,parent:a}],i=newE;i.put(t);for(varn=this.xref,s=newUint8Array(3);r.length>0;){varo=r.shift(),c=n.fetchIfRef(o.obj);if(null!==c){g(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,f=c.getArray("C"),d=s;!y(f)||3!==f.length||0===f[0]&&0===f[1]&&0===f[2]||(d=H.singletons.rgb.getRgb(f,0));varp={dest:l.dest,url:l.url,unsafeUrl:l.unsafeUrl,newWindow:l.newWindow,title:S(h),color:d,count:c.get("Count"),bold:!!(2&u),italic:!!(1&u),items:[]};o.parent.items.push(p);t=c.getRaw("First");if(F(t)&&!i.has(t)){r.push({obj:t,parent:p});i.put(t)}t=c.getRaw("Next");if(F(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");g(w(e),"page count in top level pages object is not an integer");returnx(this,"num",e)},getdestinations(){functione(e){returnD(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=newW(t,r),o=s.getAll();for(varcino)i[c]=e(o[c])}returnx(this,"destinations",i)},getDestination:function(e){functiont(e){returnD(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){n=t(newW(a,i).get(e))}returnn},getpageLabels(){vare=null;try{e=this.readPageLabels()}catch(e){if(einstanceoff)throwe;I("Unable to read page labels.")}returnx(this,"pageLabels",e)},readPageLabels:function(){vare=this.catDict.getRaw("PageLabels");if(!e)returnnull;for(vart=newArray(this.numPages),a=null,r="",i=newK(e,this.xref),n=i.getAll(),s="",o=1,c=0,l=this.numPages;c<l;c++){if(cinn){varh=n[c];g(D(h),"The PageLabel is not a dictionary.");varu=h.get("Type");g(!u||M(u,"PageLabel"),"Invalid type in PageLabel dictionary.");varf=h.get("S");g(!f||M(f),"Invalid style in PageLabel dictionary.");a=f?f.name:null;vard=h.get("P");g(!d||C(d),"Invalid prefix in PageLabel dictionary.");r=d?S(d):"";varp=h.get("St");g(!p||w(p)&&p>=1,"Invalid start in PageLabel dictionary.");o=p||1}switch(a){case"D":s=o;break;case"R":case"r":s=T.toRoman(o,"r"===a);break;case"A":case"a":for(varm="a"===a?97:65,b=o-1,v=String.fromCharCode(m+b%26),y=[],k=0,x=b/26|0;k<=x;k++)y.push(v);s=y.join("");break;default:g(!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=newW(e,t),n=i.getAll();for(varsinn){varo=newY(n[s],t);a||(a=Object.create(null));a[S(s)]=o.serializable}}returnx(this,"attachments",a)},getjavaScript(){functione(e){vart=e.get("S");if(M(t,"JavaScript")){vara=e.get("JS");if(U(a))a=p(a.getBytes());elseif(!C(a))return;r.push(S(a))}}vart=this.xref,a=this.catDict.get("Names"),r=[];if(a&&a.has("JavaScript")){vari=newW(a.getRaw("JavaScript"),t),n=i.getAll();for(varsinn){varo=n[s];D(o)&&e(o)}}varc=this.catDict.get("OpenAction");if(D(c,"Action")){varl=c.get("S");if(M(l,"Named")){varh=c.get("N");M(h,"Print")&&r.push("print({});")}elsee(c)}returnx(this,"javaScript",r)},cleanup:function(){vare=t
;if(!C(a))break;a.has("T")&&t.unshift(y(a.get("T")))}returnt.join(".")},hasFieldFlag:function(e){return!!(this.data.fieldFlags&e)}});returne}(),D=function(){functione(e){L.call(this,e);this.data.fieldValue=y(this.data.fieldValue||"");vart=p.getInheritableProperty(e.dict,"Q");(!b(t)||t<0||t>2)&&(t=null);this.data.textAlignment=t;vara=p.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}p.inherit(e,L,{getOperatorList:function(e,t,a){varr=newE;if(a)returnPromise.resolve(r);if(this.appearance)returnP.prototype.getOperatorList.call(this,e,t,a);if(!this.data.defaultAppearance)returnPromise.resolve(r);vari=newI(v(this.data.defaultAppearance));returne.getOperatorList({stream:i,task:t,resources:this.fieldResources,operatorList:r}).then(function(){returnr})}});returne}(),F=function(){functione(e){L.call(this,e);this.data.checkBox=!this.hasFieldFlag(u.RADIO)&&!this.hasFieldFlag(u.PUSHBUTTON);if(this.data.checkBox){if(!x(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(C(t)&&t.has("V")){vara=t.get("V");x(a)&&(this.data.fieldValue=a.name)}varr=e.dict.get("AP");if(!C(r))return;vari=r.get("N");if(!C(i))return;for(varn=i.getKeys(),s=0,o=n.length;s<o;s++)if("Off"!==n[s]){this.data.buttonValue=n[s];break}}}p.inherit(e,L,{getOperatorList:function(e,t,a){varr=newE;returna?Promise.resolve(r):this.appearance?P.prototype.getOperatorList.call(this,e,t,a):Promise.resolve(r)}});returne}(),q=function(){functione(e){L.call(this,e);this.data.options=[];vart=p.getInheritableProperty(e.dict,"Opt");if(m(t))for(vara=e.xref,r=0,i=t.length;r<i;r++){varn=a.fetchIfRef(t[r]),s=m(n);this.data.options[r]={exportValue:s?a.fetchIfRef(n[0]):n,displayValue:s?a.fetchIfRef(n[1]):n}}m(this.data.fieldValue)||(this.data.fieldValue=[this.data.fieldValue]);this.data.combo=this.hasFieldFlag(u.COMBO);this.data.multiSelect=this.hasFieldFlag(u.MULTISELECT)}p.inherit(e,L,{getOperatorList:function(e,t,a){varr=newE;returna?Promise.resolve(r):P.prototype.getOperatorList.call(this,e,t,a)}});returne}(),U=function(){functione(e){P.call(this,e);this.data.annotationType=d.TEXT;if(this.data.hasAppearance)this.data.name="NoIcon";else{this.data.rect[1]=this.data.rect[3]-t;this.data.rect[2]=this.data.rect[0]+t;this.data.name=e.dict.has("Name")?e.dict.get("Name").name:"Note"}this._preparePopup(e.dict)}vart=22;p.inherit(e,P,{});returne}(),N=function(){functione(e){P.call(this,e);vart=this.data;t.annotationType=d.LINK;T.parseDestDictionary({destDict:e.dict,resultObj:t,docBaseUrl:e.pdfManager.docBaseUrl})}p.inherit(e,P,{});returne}(),j=function(){functione(e){P.call(this,e);this.data.annotationType=d.POPUP;vart=e.dict,a=t.get("Parent");if(a){varr=a.get("Subtype");this.data.parentType=x(r)?r.name:null;this.data.parentId=t.getRaw("Parent").toString();this.data.title=y(a.get("T")||"");this.data.contents=y(a.get("Contents")||"");if(a.has("C")){this.setColor(a.getArray("C"));this.data.color=this.color}elsethis.data.color=null;if(!this.viewable){vari=a.get("F");this._isViewable(i)&&this.setFlags(i)}}elsek("Popup annotation has a missing or invalid parent annotation.")}p.inherit(e,P,{});returne}(),_=function(){functione(e){P.call(this,e);this.data.annotationType=d.LINE;vart=e.dict;this.data.lineCoordinates=p.normalizeRect(t.getArray("L"));this._preparePopup(t)}p.inherit(e,P,{});returne}(),z=function(){functione(e){P.call(this,e);this.data.annotationType=d.HIGHLIGHT;this._preparePopup(e.dict)}p.inherit(e,P,{});returne}(),H=function(){functione(e){P.call(this,e);this.data.annotationType=d.UNDERLINE;this._preparePopup(e.dict)}p.inherit(e,P,{});returne}(),G=function(){functione(e){P.call(this,e);t
returnC(this,"linearization",e)},getstartXRef(){vare=this.stream,a=0;if(this.linearization){e.reset();t(e,"endobj",1024)&&(a=e.pos+6)}else{for(varr=!1,i=e.end;!r&&i>0;){i-=1024-"startxref".length;i<0&&(i=0);e.pos=i;r=t(e,"startxref",1024,!0)}if(r){e.skip(9);varn;do{n=e.getByte()}while(I(n));for(vars="";n>=32&&n<=57;){s+=String.fromCharCode(n);n=e.getByte()}a=parseInt(s,10);isNaN(a)&&(a=0)}}returnC(this,"startXRef",a)},getmainXRefEntriesOffset(){vare=0,t=this.linearization;t&&(e=t.mainXRefEntriesOffset);returnC(this,"mainXRefEntriesOffset",e)},checkHeader:function(){vare=this.stream;e.reset();if(t(e,"%PDF-",1024)){e.moveStart();for(vara,r="";(a=e.getByte())>32&&!(r.length>=12);)r+=String.fromCharCode(a);this.pdfFormatVersion||(this.pdfFormatVersion=r.substring(5))}},parseStartXRef:function(){vare=this.startXRef;this.xref.setStartXRef(e)},setup:function(e){vart=this;this.xref.parse(e);vara={createPage:function(e,a,r,i,n){returnnewz(t.pdfManager,t.xref,e,a,r,i,n)}};this.catalog=newL(this.pdfManager,this.xref,a)},getnumPages(){vare=this.linearization,t=e?e.numPages:this.catalog.numPages;returnC(this,"numPages",t)},getdocumentInfo(){vare,t={PDFFormatVersion:this.pdfFormatVersion,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa};try{e=this.xref.trailer.get("Info")}catch(e){if(einstanceofd)throwe;b("The document information dictionary is invalid.")}if(e){vara=r.entries;for(variina)if(e.has(i)){varn=e.get(i);a[i](n)?t[i]="string"!=typeofn?n:S(n):b('Bad value in document info for "'+i+'"')}}returnC(this,"documentInfo",t)},getfingerprint(){vare,t=this.xref,r="",i=t.trailer.get("ID");if(i&&v(i)&&i[0]&&w(i[0])&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==i[0])e=x(i[0]);else{this.stream.ensureRange&&this.stream.ensureRange(0,Math.min(a,this.stream.end));e=U(this.stream.bytes.subarray(0,a),0,a)}for(varn=0,s=e.length;n<s;n++){varo=e[n].toString(16);r+=1===o.length?"0"+o:o}returnC(this,"fingerprint",r)},getPage:function(e){returnthis.catalog.getPage(e)},cleanup:function(){returnthis.catalog.cleanup()}};returne}();t.Page=z;t.PDFDocument=H},function(e,t,a){"use strict";varr=a(0),i=a(2),n=a(7),s=a(4),o=a(11),c=r.Util,l=r.bytesToString,h=r.error,u=i.Stream,f=n.getGlyphsUnicode,d=s.StandardEncoding,g=o.CFFParser,p=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);varp=e(a,r+c+12);s=r+c+16;n=[];for(o=0;o<p;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,i=0,n=e.length-1;i<n;){vars=i+n+1>>1;a<e[s].start?n=s-1:i=s}e[i].start<=a&&a<=e[i].end&&(r=e[i].idDelta+(e[i].ids?e[i].ids[a-e[i].start]:a)&65535);return{charCode:a,glyphId:r}}functions(e,t,a){functionr(e,a,r,i){t.push({cmd:"quadraticCurveTo",args:[e,a,r,i]})}vari,n=0,o=(e[n]<<24|e[n+1]<<16)>>16,c=0,l=0;n+=10;if(o<0)do{i=e[n]<<8|e[n+1];varh=e[n+2]<<8|e[n+3];n+=4;varu,f;if(1&i){u=(e[n]<<24|e[n+1]<<16)>>16;f=(e[n+2]<<24|e[n+3]<<16)>>16;n+=4}else{u=e[n++];f=e[n++]}if(2&i){c=u;l=f}else{c=0;l=0}vard=1,g=1,p=0,m=0;if(8&i){d=g=(e[n]<<24|e[n+1]<<16)/1073741824;n+=2}elseif(64&i){d=(e[n]<<2
;B.head||w('Required "head" table is not found');!function(e,a,r){vari=e.data,n=o(i[0],i[1],i[2],i[3]);if(n>>16!=1){C("Attempting to fix invalid version in head table: "+n);i[0]=0;i[1]=1;i[2]=0;i[3]=0}vars=t(i[50],i[51]);if(s<0||s>1){C("Attempting to fix invalid indexToLocFormat in head table: "+s);varc=a+1;if(r===c<<1){i[50]=0;i[51]=0}elseif(r===c<<2){i[50]=0;i[51]=1}elseR("Could not fix indexToLocFormat: "+s)}}(B.head,N,D?B.loca.length:0);varG=Object.create(null);if(D){varX=t(B.head.data[50],B.head.data[51]);G=function(e,t,a,r,i,n){vars,o,l;if(r){s=4;o=function(e,t){returne[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};l=function(e,t,a){e[t]=a>>>24&255;e[t+1]=a>>16&255;e[t+2]=a>>8&255;e[t+3]=255&a}}else{s=2;o=function(e,t){returne[t]<<9|e[t+1]<<1};l=function(e,t,a){e[t]=a>>9&255;e[t+1]=a>>1&255}}varh=e.data,u=s*(1+a);if(h.length!==u){h=newUint8Array(u);h.set(e.data.subarray(0,u));e.data=h}varf=t.data,d=f.length,g=newUint8Array(d),p=o(h,0),m=0,b=Object.create(null);l(h,0,m);varv,y;for(v=0,y=s;v<a;v++,y+=s){vark=o(h,y);k>d&&(d+3&-4)===k&&(k=d);if(k>d){l(h,y,m);p=k}else{p===k&&(b[v]=!0);m+=c(f,p,k,g,m,i);l(h,y,m);p=k}}if(0===m){varw=newUint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(v=0,y=s;v<a;v++,y+=s)l(h,y,w.length);t.data=w;returnb}if(n){varC=o(h,s);if(g.length>C+m)t.data=g.subarray(0,C+m);else{t.data=newUint8Array(C+m);t.data.set(g.subarray(0,m))}t.data.set(g.subarray(0,C),m);l(e.data,h.length-s,m+C)}elset.data=g.subarray(0,m);returnb}(B.loca,B.glyf,N,X,H,z)}B.hhea||w('Required "hhea" table is not found');if(0===B.hhea.data[10]&&0===B.hhea.data[11]){B.hhea.data[10]=255;B.hhea.data[11]=255}varV={unitsPerEm:t(B.head.data[18],B.head.data[19]),yMax:t(B.head.data[42],B.head.data[43]),yMin:a(B.head.data[38],B.head.data[39]),ascent:t(B.hhea.data[4],B.hhea.data[5]),descent:a(B.hhea.data[6],B.hhea.data[7])};this.ascent=V.ascent/V.unitsPerEm;this.descent=V.descent/V.unitsPerEm;if(B.post){(function(e,t,a){varr=(i.start?i.start:0)+e.offset;i.pos=r;varn=e.length,s=r+n,o=i.getInt32();i.getBytes(28);varc,l,h=!0;switch(o){case65536:c=ue;break;case131072:varu=i.getUint16();if(u!==a){h=!1;break}varf=[];for(l=0;l<u;++l){vard=i.getUint16();if(d>=32768){h=!1;break}f.push(d)}if(!h)break;for(varg=[],p=[];i.pos<s;){varm=i.getByte();p.length=m;for(l=0;l<m;++l)p[l]=String.fromCharCode(i.getByte());g.push(p.join(""))}c=[];for(l=0;l<u;++l){varb=f[l];b<258?c.push(ue[b]):c.push(g[b-258])}break;case196608:break;default:R("Unknown/unsupported post table version "+o);h=!1;t.defaultEncoding&&(c=t.defaultEncoding)}t.glyphNames=c;returnh})(B.post,n,N)||(B.post=null)}varW,Y=[],Q=n.toUnicode,$=n.widths,ee=Qinstanceofge||65536===Q.length;if(n.composite){varte=n.cidToGidMap||[],ae=0===te.length;n.cMap.forEach(function(e,t){y(t<=65535,"Max size of CID is 65,535");vara=-1;ae?a=t:void0!==te[t]&&(a=te[t]);a>=0&&a<N&&f(a,e,t)&&(Y[e]=a)});!z||!ae&&Y[0]||(Y[0]=N-1)}else{varre=function(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;t.getUint16();for(vars,o=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||!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||-1===t.peekByte()){R("Could not find a preferred cmap table.");return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}varg=t.getUint16();t.getUint16();t.getUint16();varp,m,b=!1,v=[];if(0===g){for(p=0;p<256;p++){vary=t.getByte();y&&v.push({charCode:p,glyphId:y})}b=!0}elseif(4===g){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(p=0;p<x;p++)I.push(t.getUint16());for
}]}],B=[39717,1941,229,405],T=[32,8],R=17;C.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){e.huffman&&n("JBIG2 error: huffman is not supported");varc=this.symbols;c||(this.symbols=c={});for(varl=[],h=0,u=r.length;h<u;h++)l=l.concat(c[r[h]]);varf=newt(i,s,o);c[a]=g(e.huffman,e.refinement,l,e.numberOfNewSymbols,e.numberOfExportedSymbols,void0,e.template,e.at,e.refinementTemplate,e.refinementAt,f)},onImmediateTextRegion:function(e,a,r,i,n){for(varo=e.info,c=this.symbols,l=[],h=0,u=a.length;h<u;h++)l=l.concat(c[a[h]]);varf=s(l.length),d=newt(r,i,n),g=p(e.huffman,e.refinement,o.width,o.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,l,f,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,void0,e.refinementTemplate,e.refinementAt,d);this.drawBitmap(o,g)},onImmediateLosslessTextRegion:function(){this.onImmediateTextRegion.apply(this,arguments)}};x.prototype={parseChunks:function(e){returnw(e)}};returnx}();t.Jbig2Image=f},function(e,t,a){"use strict";varr="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},i=a(0),n=i.warn,s=i.error,o=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)}functioni(e,t,i,o,c,l,f,d,g){functionp(){if(D>0){D--;returnL>>D&1}L=e[t++];if(255===L){vara=e[t++];a&&s("JPEG error: unexpected marker "+(L<<8|a).toString(16))}D=7;returnL>>>7}functionm(e){for(vart=e;;){t=t[p()];if("number"==typeoft)returnt;"object"!==(void0===t?"undefined":r(t))&&s("JPEG error: invalid huffman sequence")}}functionb(e){for(vart=0;e>0;){t=t<<1|p();e--}returnt}functionv(e){if(1===e)return1===p()?1:-1;vart=b(e);returnt>=1<<e-1?t:t+(-1<<e)+1}functiony(e,t){vara=m(e.huffmanTableDC),r=0===a?0:v(a);e.blockData[t]=e.pred+=r;for(vari=1;i<64;){varn=m(e.huffmanTableAC),s=15&n,o=n>>4;if(0!==s){i+=o;varc=u[i];e.blockData[t+c]=v(s);i++}else{if(o<15)break;i+=16}}}functionk(e,t){vara=m(e.huffmanTableDC),r=0===a?0:v(a)<<g;e.blockData[t]=e.pred+=r}functionw(e,t){e.blockData[t]|=p()<<g}functionC(e,t){if(F>0)F--;elsefor(vara=l,r=f;a<=r;){vari=m(e.huffmanTableAC),n=15&i,s=i>>4;if(0!==n){a+=s;varo=u[a];e.blockData[t+o]=v(n)*(1<<g);a++}else{if(s<15){F=b(s)+(1<<s)-1;break}a+=16}}}functionx(e,t){for(vara,r,i=l,n=f,o=0;i<=n;){varc=u[i];switch(q){case0:r=m(e.huffmanTableAC);a=15&r;o=r>>4;if(0===a)if(o<15){F=b(o)+(1<<o);q=4}else{o=16;q=1}else{1!==a&&s("JPEG error: invalid ACn encoding");S=v(a);q=o?2:3}continue;case1:case2:if(e.blockData[t+c])e.blockData[t+c]+=p()<<g;else{o--;0===o&&(q=2===q?3:0)}break;case3:if(e.blockData[t+c])e.blockData[t+c]+=
;i[13]=l+0;i[14]=l+1;i[15]=l+2;i[8]=i[1];i[9]=l+9;i[10]=l+10;i[11]=l+3;i[4]=i[2];i[5]=l+8;i[6]=l+11;i[7]=l+4;i[0]=i[3];i[1]=l+7;i[2]=l+6;i[3]=l+5;n[2]=n[0];n[3]=h;n[0]=n[1];n[1]=h+1}e.figures.push({type:"patch",coords:newInt32Array(i),colors:newInt32Array(n)})}}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(p(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?m.parseArray(h,k):null;this.coords=[];this.colors=[];this.figures=[];varC={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},x=newe(c,C),S=!1;switch(this.shadingType){casev.FREE_FORM_MESH:t(this,x);break;casev.LATTICE_FORM_MESH:varA=0|g.get("VerticesPerRow");u(A>=2,"Invalid VerticesPerRow");a(this,x,A);break;casev.COONS_PATCH_MESH:i(this,x);S=!0;break;casev.TENSOR_PATCH_MESH:n(this,x);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(12),s=a(24),o=r.warn,c=r.createValidAbsoluteUrl,l=r.shadow,h=r.NotImplementedException,u=r.MissingDataException,f=r.createPromiseCapability,d=r.Util,g=i.Stream,p=n.ChunkedStreamManager,m=s.PDFDocument,b=function(){functione(){thrownewError("C
;this._password=o._password;breake}if("/"===k||"\\"===k){"\\"===k&&c("\\ is an invalid code point.");l="relative slash"}elseif("?"===k){this._host=o._host;this._port=o._port;this._path=o._path.slice();this._query="?";this._username=o._username;this._password=o._password;l="query"}else{if("#"!==k){varw=t[h+1],C=t[h+2];if("file"!==this._scheme||!p.test(k)||":"!==w&&"|"!==w||C!==g&&"/"!==C&&"\\"!==C&&"?"!==C&&"#"!==C){this._host=o._host;this._port=o._port;this._username=o._username;this._password=o._password;this._path=o._path.slice();this._path.pop()}l="relative path";continue}this._host=o._host;this._port=o._port;this._path=o._path.slice();this._query=o._query;this._fragment="#";this._username=o._username;this._password=o._password;l="fragment"}break;case"relative slash":if("/"!==k&&"\\"!==k){if("file"!==this._scheme){this._host=o._host;this._port=o._port;this._username=o._username;this._password=o._password}l="relative path";continue}"\\"===k&&c("\\ is an invalid code point.");l="file"===this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!==k){c("Expected '/', got: "+k);l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":l="authority ignore slashes";if("/"!==k){c("Expected '/', got: "+k);continue}break;case"authority ignore slashes":if("/"!==k&&"\\"!==k){l="authority";continue}c("Expected authority, got: "+k);break;case"authority":if("@"===k){if(b){c("@ already seen.");u+="%40"}b=!0;for(varx=0;x<u.length;x++){varS=u[x];if("\t"!==S&&"\n"!==S&&"\r"!==S)if(":"!==S||null!==this._password){varA=n(S);null!==this._password?this._password+=A:this._username+=A}elsethis._password="";elsec("Invalid whitespace in authority.")}u=""}else{if(k===g||"/"===k||"\\"===k||"?"===k||"#"===k){h-=u.length;u="";l="host";continue}u+=k}break;case"file host":if(k===g||"/"===k||"\\"===k||"?"===k||"#"===k){if(2!==u.length||!p.test(u[0])||":"!==u[1]&&"|"!==u[1])if(0===u.length)l="relative path start";else{this._host=i.call(this,u);u="";l="relative path start"}elsel="relative path";continue}"\t"===k||"\n"===k||"\r"===k?c("Invalid whitespace in file host."):u+=k;break;case"host":case"hostname":if(":"!==k||v){if(k===g||"/"===k||"\\"===k||"?"===k||"#"===k){this._host=i.call(this,u);u="";l="relative path start";if(a)breake;continue}if("\t"!==k&&"\n"!==k&&"\r"!==k){"["===k?v=!0:"]"===k&&(v=!1);u+=k}elsec("Invalid code point in host/hostname: "+k)}else{this._host=i.call(this,u);u="";l="port";if("hostname"===a)breake}break;case"port":if(/[0-9]/.test(k))u+=k;else{if(k===g||"/"===k||"\\"===k||"?"===k||"#"===k||a){if(""!==u){varI=parseInt(u,10);I!==f[this._scheme]&&(this._port=I+"");u=""}if(a)breake;l="relative path start";continue}"\t"===k||"\n"===k||"\r"===k?c("Invalid code point in port: "+k):r.call(this)}break;case"relative path start":"\\"===k&&c("'\\' not allowed in path.");l="relative path";if("/"!==k&&"\\"!==k)continue;break;case"relative path":if(k!==g&&"/"!==k&&"\\"!==k&&(a||"?"!==k&&"#"!==k))"\t"!==k&&"\n"!==k&&"\r"!==k&&(u+=n(k));else{"\\"===k&&c("\\ not allowed in relative path.");varB;(B=d[u.toLowerCase()])&&(u=B);if(".."===u){this._path.pop();"/"!==k&&"\\"!==k&&this._path.push("")}elseif("."===u&&"/"!==k&&"\\"!==k)this._path.push("");elseif("."!==u){"file"===this._scheme&&0===this._path.length&&2===u.length&&p.test(u[0])&&"|"===u[1]&&(u=u[0]+":");this._path.push(u)}u="";if("?"===k){this._query="?";l="query"}elseif("#"===k){this._fragment="#";l="fragment"}}break;case"query":if(a||"#"!==k)k!==g&&"\t"!==k&&"\n"!==k&&"\r"!==k&&(this._query+=s(k));else{this._fragment="#";l="fragment"}break;case"fragment":k!==g&&"\t"!==k&&"\n"!==k&&"\r"!==k&&(this._fragment+=k)}h++}}functionc(){this._scheme="";this._schemeData="";this._username="";this._password=null;this._host="";this._port="";this._path=[];this._query="";this._fragment="";this._isInvalid=!1;this._isRelative=!1}functionl(e,t){void0===t||tinstanceofl||(t=newl(String(t)));this._url=e;c.call(this);vara=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");o.call(this,a,null,t)}varh=!1;try{if("functio